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

Unified Diff: cc/layer_tree_host_common.cc

Issue 12082012: Implement desktop compatibility viewport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aelias
Patch Set: Created 7 years, 11 months 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/layer_tree_host_common.h ('k') | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_common.cc
diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc
index 7c559b7420b180ae1c09b92751505c04aa62d82e..7cb27044781b2d6f742dba68e427480611e474ef 100644
--- a/cc/layer_tree_host_common.cc
+++ b/cc/layer_tree_host_common.cc
@@ -338,6 +338,16 @@ gfx::Transform computeScrollCompensationForThisLayer(LayerImpl* scrollingLayer,
gfx::Transform scrollCompensationForThisLayer = partialLayerOriginTransform; // Step 3
scrollCompensationForThisLayer.Translate(scrollingLayer->scrollDelta().x(), scrollingLayer->scrollDelta().y()); // Step 2
+ gfx::Vector2dF desktopCompatibilityViewportDelta = scrollingLayer->desktopCompatibilityViewportOffsetFromScrollPositionDelta();
+ scrollCompensationForThisLayer.Translate(desktopCompatibilityViewportDelta.x(), desktopCompatibilityViewportDelta.y());
+
+ {
+ gfx::Vector2dF tmp = scrollingLayer->desktopCompatibilityViewportOffsetFromScrollPosition();
+ gfx::Vector2dF tmp2 = scrollingLayer->desktopCompatibilityViewportOffsetFromScrollPositionDelta();
+ fprintf (stderr, "offset: %f %f\n", tmp.x(), tmp.y());
+ fprintf (stderr, "delta : %f %f\n", tmp2.x(), tmp2.y());
+ }
+
gfx::Transform inversePartialLayerOriginTransform(gfx::Transform::kSkipInitialization);
if (!partialLayerOriginTransform.GetInverse(&inversePartialLayerOriginTransform)) {
// TODO(shawnsingh): Either we need to handle uninvertible transforms
« no previous file with comments | « cc/layer_tree_host_common.h ('k') | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698