mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #6214 - glennw:parse-transforms, r=pcwalton
* Add parser support for 3d transforms. * Change ComputedMatrix to a representation that suits interpolation. * Switch stacking contexts to use 4x4 matrices. The transforms themselves are still converted to 2d and handled by azure for now, but this is a small standalone part that can be landed now to make it easier to review. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6214) <!-- Reviewable:end -->
This commit is contained in:
commit
05212b702d
9 changed files with 527 additions and 183 deletions
|
@ -12,7 +12,8 @@ use paint_context::PaintContext;
|
|||
|
||||
use azure::azure_hl::{SurfaceFormat, Color, DrawTarget, BackendType};
|
||||
use azure::AzFloat;
|
||||
use geom::matrix2d::Matrix2D;
|
||||
use geom::Matrix4;
|
||||
use geom::matrix::identity;
|
||||
use geom::point::Point2D;
|
||||
use geom::rect::Rect;
|
||||
use geom::size::Size2D;
|
||||
|
@ -621,10 +622,11 @@ impl WorkerThread {
|
|||
stacking_context.overflow.origin.y.to_f32_px()));
|
||||
|
||||
// Apply the translation to paint the tile we want.
|
||||
let matrix: Matrix2D<AzFloat> = Matrix2D::identity();
|
||||
let matrix = matrix.scale(scale as AzFloat, scale as AzFloat);
|
||||
let matrix: Matrix4<AzFloat> = identity();
|
||||
let matrix = matrix.scale(scale as AzFloat, scale as AzFloat, 1.0);
|
||||
let matrix = matrix.translate(-tile_bounds.origin.x as AzFloat,
|
||||
-tile_bounds.origin.y as AzFloat);
|
||||
-tile_bounds.origin.y as AzFloat,
|
||||
0.0);
|
||||
|
||||
// Clear the buffer.
|
||||
paint_context.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue