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

Side by Side Diff: cc/trees/layer_tree_host_common.cc

Issue 13863015: Add flag for drawing layers to screen with Ganesh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Base files missing. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 // The surface's cached clip rect value propagates regardless of what 1260 // The surface's cached clip rect value propagates regardless of what
1261 // clipping goes on between layers here. 1261 // clipping goes on between layers here.
1262 clip_rect_for_subtree_in_descendant_space = 1262 clip_rect_for_subtree_in_descendant_space =
1263 clip_rect_from_ancestor_in_descendant_space; 1263 clip_rect_from_ancestor_in_descendant_space;
1264 1264
1265 // Layers that are not their own render_target will render into the target 1265 // Layers that are not their own render_target will render into the target
1266 // of their nearest ancestor. 1266 // of their nearest ancestor.
1267 layer_draw_properties.render_target = layer->parent()->render_target(); 1267 layer_draw_properties.render_target = layer->parent()->render_target();
1268 } 1268 }
1269 1269
1270 layer_draw_properties.can_draw_directly_to_backbuffer =
danakj 2013/05/16 15:17:55 Can you leave a comment explaining the checks done
enne (OOO) 2013/05/16 20:34:11 Done.
1271 IsRootLayer(layer_draw_properties.render_target) &&
1272 layer->draw_properties().opacity == 1.f &&
1273 !animating_opacity_to_screen;
danakj 2013/05/16 15:17:55 Why this? We'll generate a new frame with a new op
enne (OOO) 2013/05/16 20:34:11 Sure, but then for animation of opacity=1 to opaci
1274
1270 if (adjust_text_aa) 1275 if (adjust_text_aa)
1271 layer_draw_properties.can_use_lcd_text = layer_can_use_lcd_text; 1276 layer_draw_properties.can_use_lcd_text = layer_can_use_lcd_text;
1272 1277
1273 gfx::Rect rect_in_target_space = ToEnclosingRect( 1278 gfx::Rect rect_in_target_space = ToEnclosingRect(
1274 MathUtil::MapClippedRect(layer->draw_transform(), content_rect)); 1279 MathUtil::MapClippedRect(layer->draw_transform(), content_rect));
1275 1280
1276 if (LayerClipsSubtree(layer)) { 1281 if (LayerClipsSubtree(layer)) {
1277 subtree_should_be_clipped = true; 1282 subtree_should_be_clipped = true;
1278 if (ancestor_clips_subtree && !layer->render_surface()) { 1283 if (ancestor_clips_subtree && !layer->render_surface()) {
1279 clip_rect_for_subtree = clip_rect_from_ancestor; 1284 clip_rect_for_subtree = clip_rect_from_ancestor;
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 // At this point, we think the point does hit the touch event handler region 1811 // At this point, we think the point does hit the touch event handler region
1807 // on the layer, but we need to walk up the parents to ensure that the layer 1812 // on the layer, but we need to walk up the parents to ensure that the layer
1808 // was not clipped in such a way that the hit point actually should not hit 1813 // was not clipped in such a way that the hit point actually should not hit
1809 // the layer. 1814 // the layer.
1810 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl)) 1815 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl))
1811 return false; 1816 return false;
1812 1817
1813 return true; 1818 return true;
1814 } 1819 }
1815 } // namespace cc 1820 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698