Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1692)

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp

Issue 2473453002: cc : Reland move screen space scale factor to root transform node (Closed)
Patch Set: comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/property_tree_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
index c74657e3ba39534a300335674b14ab1b33f9e895..45863e473a9403740480412346f7967cedda4202 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -453,8 +453,17 @@ class PropertyTreeManager {
};
void PropertyTreeManager::setDeviceScaleFactor(float deviceScaleFactor) {
- auto& rootTransformNode = *transformTree().Node(kSecondaryRootNodeId);
- rootTransformNode.local.Scale(deviceScaleFactor, deviceScaleFactor);
+ // TODO(jaydasika): We shouldn't set ToScreeen and FromScreen of root
+ // transform node here. They should be set while updating transform tree in
+ // cc.
+ gfx::Transform toScreen;
+ toScreen.Scale(deviceScaleFactor, deviceScaleFactor);
+ transformTree().SetToScreen(kRealRootNodeId, toScreen);
+ gfx::Transform fromScreen;
+ bool invertible = toScreen.GetInverse(&fromScreen);
+ DCHECK(invertible);
+ transformTree().SetFromScreen(kRealRootNodeId, fromScreen);
+ transformTree().set_needs_update(true);
}
int PropertyTreeManager::compositorIdForTransformNode(
« no previous file with comments | « cc/trees/property_tree_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698