From c85651751be2767cc35d98d6dc516a5d99c3038f Mon Sep 17 00:00:00 2001 From: Hui Shu Date: Mon, 1 Dec 2014 10:19:14 -0800 Subject: Fork: Clip a layer when its render target's render surface is clipped. Cherry pick from Chromium: https://codereview.chromium.org/751453005/ Only the fix part from the original CL is cherry picked. The other changes in the original CL are all tests. Original description: An empty clip rect of a render surface does not necessarily mean the surface is unclippped. BUG=435797 BUG: 18343246 Change-Id: I56b8f2d557b21aa75619157e611ab4da9bd4688c --- cc/trees/layer_tree_host_common.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '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 227c5874bf..1ea340705d 100644 --- a/cc/trees/layer_tree_host_common.cc +++ b/cc/trees/layer_tree_host_common.cc @@ -392,7 +392,7 @@ static gfx::Rect CalculateVisibleContentRect( gfx::Rect visible_rect_in_target_surface_space = layer->drawable_content_rect(); - if (!layer->render_target()->render_surface()->clip_rect().IsEmpty()) { + if (layer->render_target()->render_surface()->is_clipped()) { // The |layer| L has a target T which owns a surface Ts. The surface Ts // has a target TsT. // -- cgit v1.2.3