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

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

Issue 12912010: cc: Convert non-const reference arguments to pointers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ui/compositor Created 7 years, 8 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
« no previous file with comments | « cc/trees/layer_sorter.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 float contents_scale = raster_scale * device_scale_factor; 551 float contents_scale = raster_scale * device_scale_factor;
552 if (!layer->bounds_contain_page_scale()) 552 if (!layer->bounds_contain_page_scale())
553 contents_scale *= page_scale_factor; 553 contents_scale *= page_scale_factor;
554 554
555 CalculateContentsScale(layer, contents_scale, animating_transform_to_screen); 555 CalculateContentsScale(layer, contents_scale, animating_transform_to_screen);
556 } 556 }
557 557
558 template <typename LayerType, typename LayerList> 558 template <typename LayerType, typename LayerList>
559 static inline void RemoveSurfaceForEarlyExit( 559 static inline void RemoveSurfaceForEarlyExit(
560 LayerType* layer_to_remove, 560 LayerType* layer_to_remove,
561 LayerList& render_surface_layer_list) { 561 LayerList* render_surface_layer_list) {
562 DCHECK(layer_to_remove->render_surface()); 562 DCHECK(layer_to_remove->render_surface());
563 // Technically, we know that the layer we want to remove should be 563 // Technically, we know that the layer we want to remove should be
564 // at the back of the render_surface_layer_list. However, we have had 564 // at the back of the render_surface_layer_list. However, we have had
565 // bugs before that added unnecessary layers here 565 // bugs before that added unnecessary layers here
566 // (https://bugs.webkit.org/show_bug.cgi?id=74147), but that causes 566 // (https://bugs.webkit.org/show_bug.cgi?id=74147), but that causes
567 // things to crash. So here we proactively remove any additional 567 // things to crash. So here we proactively remove any additional
568 // layers from the end of the list. 568 // layers from the end of the list.
569 while (render_surface_layer_list->back() != layer_to_remove) { 569 while (render_surface_layer_list->back() != layer_to_remove) {
570 render_surface_layer_list->back()->ClearRenderSurface(); 570 render_surface_layer_list->back()->ClearRenderSurface();
571 render_surface_layer_list->pop_back(); 571 render_surface_layer_list->pop_back();
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 // At this point, we think the point does hit the touch event handler region 1576 // At this point, we think the point does hit the touch event handler region
1577 // on the layer, but we need to walk up the parents to ensure that the layer 1577 // on the layer, but we need to walk up the parents to ensure that the layer
1578 // was not clipped in such a way that the hit point actually should not hit 1578 // was not clipped in such a way that the hit point actually should not hit
1579 // the layer. 1579 // the layer.
1580 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl)) 1580 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl))
1581 return false; 1581 return false;
1582 1582
1583 return true; 1583 return true;
1584 } 1584 }
1585 } // namespace cc 1585 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_sorter.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698