mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
First step towards 3d transforms.
* 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.
This commit is contained in:
parent
09f2977cc9
commit
f47ba6fd33
12 changed files with 530 additions and 186 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;
|
||||
|
@ -579,10 +580,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