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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 15579002: Implement transform/clip support for Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address joth's code review Created 7 years, 7 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
Index: cc/trees/layer_tree_host_common.cc
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index b8ab367d60755965c57d02ea1d75181810c5b816..9dc5f52ca2165c0a3ae616cc0b77825a595e12bb 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -798,6 +798,7 @@ static void CalculateDrawPropertiesInternal(
const gfx::Transform& parent_matrix,
const gfx::Transform& full_hierarchy_matrix,
const gfx::Transform& current_scroll_compensation_matrix,
+ const gfx::Transform& next_sublayer_matrix,
enne (OOO) 2013/05/29 20:34:12 I'm always skeptical about adding more parameters
LayerType* current_fixed_container,
gfx::Rect clip_rect_from_ancestor,
gfx::Rect clip_rect_from_ancestor_in_descendant_space,
@@ -1311,6 +1312,8 @@ static void CalculateDrawPropertiesInternal(
-layer->anchor_point().y() * bounds.height());
}
+ sublayer_matrix.PreconcatTransform(next_sublayer_matrix);
+
LayerList& descendants =
(layer->render_surface() ? layer->render_surface()->layer_list()
: *layer_list);
@@ -1337,11 +1340,13 @@ static void CalculateDrawPropertiesInternal(
LayerType* child =
LayerTreeHostCommon::get_child_as_raw_ptr(layer->children(), i);
gfx::Rect drawable_content_rect_of_child_subtree;
+ gfx::Transform identity_matrix;
CalculateDrawPropertiesInternal<LayerType, LayerList, RenderSurfaceType>(
child,
sublayer_matrix,
next_hierarchy_matrix,
next_scroll_compensation_matrix,
+ identity_matrix,
next_fixed_container,
clip_rect_for_subtree,
clip_rect_for_subtree_in_descendant_space,
@@ -1551,9 +1556,10 @@ void LayerTreeHostCommon::CalculateDrawProperties(
PreCalculateMetaInformation<Layer>(root_layer);
CalculateDrawPropertiesInternal<Layer, LayerList, RenderSurface>(
root_layer,
- device_scale_transform,
identity_matrix,
identity_matrix,
+ identity_matrix,
+ device_scale_transform,
NULL,
device_viewport_rect,
device_viewport_rect,
@@ -1581,6 +1587,7 @@ void LayerTreeHostCommon::CalculateDrawProperties(
void LayerTreeHostCommon::CalculateDrawProperties(
LayerImpl* root_layer,
gfx::Size device_viewport_size,
+ const gfx::Transform& device_transform,
float device_scale_factor,
float page_scale_factor,
LayerImpl* page_scale_application_layer,
@@ -1590,8 +1597,6 @@ void LayerTreeHostCommon::CalculateDrawProperties(
LayerImplList* render_surface_layer_list) {
gfx::Rect total_drawable_content_rect;
gfx::Transform identity_matrix;
- gfx::Transform device_scale_transform;
- device_scale_transform.Scale(device_scale_factor, device_scale_factor);
LayerImplList dummy_layer_list;
LayerSorter layer_sorter;
@@ -1609,9 +1614,10 @@ void LayerTreeHostCommon::CalculateDrawProperties(
LayerImplList,
RenderSurfaceImpl>(
root_layer,
- device_scale_transform,
identity_matrix,
identity_matrix,
+ identity_matrix,
+ device_transform,
NULL,
device_viewport_rect,
device_viewport_rect,

Powered by Google App Engine
This is Rietveld 408576698