diff --git a/engine/src/flutter/flow/layers/child_scene_layer.cc b/engine/src/flutter/flow/layers/child_scene_layer.cc index bd375700ae..a033d0534e 100644 --- a/engine/src/flutter/flow/layers/child_scene_layer.cc +++ b/engine/src/flutter/flow/layers/child_scene_layer.cc @@ -19,7 +19,9 @@ ChildSceneLayer::~ChildSceneLayer() { void ChildSceneLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) { transform_ = matrix; - transform_.postTranslate(offset_.x(), offset_.y()); + transform_.preTranslate(offset_.x(), offset_.y()); + float inverse_device_pixel_ratio = 1.f / device_pixel_ratio_; + transform_.preScale(inverse_device_pixel_ratio, inverse_device_pixel_ratio); } void ChildSceneLayer::Paint(PaintContext::ScopedFrame& frame) { @@ -39,8 +41,8 @@ void ChildSceneLayer::UpdateScene(mojo::gfx::composition::SceneUpdate* update, child_node->op->set_scene(mojo::gfx::composition::SceneNodeOp::New()); child_node->op->get_scene()->scene_resource_id = id; child_node->content_clip = mojo::RectF::New(); - child_node->content_clip->width = physical_size_.width() / device_pixel_ratio_; - child_node->content_clip->height = physical_size_.height() / device_pixel_ratio_; + child_node->content_clip->width = physical_size_.width(); + child_node->content_clip->height = physical_size_.height(); child_node->content_transform = mojo::Transform::From(transform_); update->nodes.insert(id, child_node.Pass()); container->child_node_ids.push_back(id);