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

Unified Diff: cc/layer_tree_host_common.cc

Issue 12040011: cc: Clip delegated quads to the correct clip rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased-on-no-clipped_rect_in_target 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/delegated_renderer_layer_impl_unittest.cc ('k') | no next file » | 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 f4bf6341ad4f770176ff0528278fcdb6921a3f53..7c559b7420b180ae1c09b92751505c04aa62d82e 100644
--- a/cc/layer_tree_host_common.cc
+++ b/cc/layer_tree_host_common.cc
@@ -132,7 +132,7 @@ static bool isSurfaceBackFaceVisible(LayerType* layer, const gfx::Transform& dra
template<typename LayerType>
static inline bool layerClipsSubtree(LayerType* layer)
{
- return layer->masksToBounds() || layer->maskLayer() || layer->hasDelegatedContent();
+ return layer->masksToBounds() || layer->maskLayer();
}
template<typename LayerType>
@@ -291,7 +291,8 @@ static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig
}
// If the layer clips its descendants but it is not axis-aligned with respect to its parent.
- if (layerClipsSubtree(layer) && !axisAlignedWithRespectToParent && !layer->drawProperties().descendants_can_clip_selves)
+ bool layerClipsExternalContent = layerClipsSubtree(layer) || layer->hasDelegatedContent();
+ if (layerClipsExternalContent && !axisAlignedWithRespectToParent && !layer->drawProperties().descendants_can_clip_selves)
{
TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface clipping");
return true;
« no previous file with comments | « cc/delegated_renderer_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698