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

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

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 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 unified diff | Download patch
« no previous file with comments | « cc/trees/proxy.h ('k') | cc/trees/quad_culler_unittest.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/quad_culler.h" 5 #include "cc/trees/quad_culler.h"
6 6
7 #include "cc/debug/debug_colors.h" 7 #include "cc/debug/debug_colors.h"
8 #include "cc/debug/overdraw_metrics.h" 8 #include "cc/debug/overdraw_metrics.h"
9 #include "cc/layers/append_quads_data.h" 9 #include "cc/layers/append_quads_data.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 24 matching lines...) Expand all
35 scoped_ptr<SharedQuadState> shared_quad_state) { 35 scoped_ptr<SharedQuadState> shared_quad_state) {
36 // TODO(danakj): If all quads are culled for the shared_quad_state, we can 36 // TODO(danakj): If all quads are culled for the shared_quad_state, we can
37 // drop it from the list. 37 // drop it from the list.
38 current_shared_quad_state_ = shared_quad_state.get(); 38 current_shared_quad_state_ = shared_quad_state.get();
39 shared_quad_state_list_->push_back(shared_quad_state.Pass()); 39 shared_quad_state_list_->push_back(shared_quad_state.Pass());
40 return current_shared_quad_state_; 40 return current_shared_quad_state_;
41 } 41 }
42 42
43 static inline bool AppendQuadInternal( 43 static inline bool AppendQuadInternal(
44 scoped_ptr<DrawQuad> draw_quad, 44 scoped_ptr<DrawQuad> draw_quad,
45 gfx::Rect culled_rect, 45 const gfx::Rect& culled_rect,
46 QuadList* quad_list, 46 QuadList* quad_list,
47 const OcclusionTrackerImpl& occlusion_tracker, 47 const OcclusionTrackerImpl& occlusion_tracker,
48 const LayerImpl* layer, 48 const LayerImpl* layer,
49 bool create_debug_border_quads) { 49 bool create_debug_border_quads) {
50 bool keep_quad = !culled_rect.IsEmpty(); 50 bool keep_quad = !culled_rect.IsEmpty();
51 if (keep_quad) 51 if (keep_quad)
52 draw_quad->visible_rect = culled_rect; 52 draw_quad->visible_rect = culled_rect;
53 53
54 occlusion_tracker.overdraw_metrics()->DidCullForDrawing( 54 occlusion_tracker.overdraw_metrics()->DidCullForDrawing(
55 draw_quad->quadTransform(), draw_quad->rect, culled_rect); 55 draw_quad->quadTransform(), draw_quad->rect, culled_rect);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 return AppendQuadInternal(draw_quad.Pass(), 100 return AppendQuadInternal(draw_quad.Pass(),
101 culled_rect, 101 culled_rect,
102 quad_list_, 102 quad_list_,
103 occlusion_tracker_, 103 occlusion_tracker_,
104 layer_, 104 layer_,
105 show_culling_with_debug_border_quads_); 105 show_culling_with_debug_border_quads_);
106 } 106 }
107 107
108 } // namespace cc 108 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy.h ('k') | cc/trees/quad_culler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698