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

Side by Side Diff: cc/layers/render_surface_impl.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/layers/render_surface_impl.h ('k') | cc/layers/scrollbar_layer_impl_base.h » ('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/layers/render_surface_impl.h" 5 #include "cc/layers/render_surface_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return base::StringPrintf("RenderSurfaceImpl(id=%i,owner=%s)", 57 return base::StringPrintf("RenderSurfaceImpl(id=%i,owner=%s)",
58 owning_layer_->id(), 58 owning_layer_->id(),
59 owning_layer_->debug_name().data()); 59 owning_layer_->debug_name().data());
60 } 60 }
61 61
62 int RenderSurfaceImpl::OwningLayerId() const { 62 int RenderSurfaceImpl::OwningLayerId() const {
63 return owning_layer_ ? owning_layer_->id() : 0; 63 return owning_layer_ ? owning_layer_->id() : 0;
64 } 64 }
65 65
66 66
67 void RenderSurfaceImpl::SetClipRect(gfx::Rect clip_rect) { 67 void RenderSurfaceImpl::SetClipRect(const gfx::Rect& clip_rect) {
68 if (clip_rect_ == clip_rect) 68 if (clip_rect_ == clip_rect)
69 return; 69 return;
70 70
71 surface_property_changed_ = true; 71 surface_property_changed_ = true;
72 clip_rect_ = clip_rect; 72 clip_rect_ = clip_rect;
73 } 73 }
74 74
75 bool RenderSurfaceImpl::ContentsChanged() const { 75 bool RenderSurfaceImpl::ContentsChanged() const {
76 return !damage_tracker_->current_damage_rect().IsEmpty(); 76 return !damage_tracker_->current_damage_rect().IsEmpty();
77 } 77 }
78 78
79 void RenderSurfaceImpl::SetContentRect(gfx::Rect content_rect) { 79 void RenderSurfaceImpl::SetContentRect(const gfx::Rect& content_rect) {
80 if (content_rect_ == content_rect) 80 if (content_rect_ == content_rect)
81 return; 81 return;
82 82
83 surface_property_changed_ = true; 83 surface_property_changed_ = true;
84 content_rect_ = content_rect; 84 content_rect_ = content_rect;
85 } 85 }
86 86
87 bool RenderSurfaceImpl::SurfacePropertyChanged() const { 87 bool RenderSurfaceImpl::SurfacePropertyChanged() const {
88 // Surface property changes are tracked as follows: 88 // Surface property changes are tracked as follows:
89 // 89 //
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 for_replica, 227 for_replica,
228 mask_resource_id, 228 mask_resource_id,
229 contents_changed_since_last_frame, 229 contents_changed_since_last_frame,
230 mask_uv_rect, 230 mask_uv_rect,
231 owning_layer_->filters(), 231 owning_layer_->filters(),
232 owning_layer_->background_filters()); 232 owning_layer_->background_filters());
233 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); 233 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data);
234 } 234 }
235 235
236 } // namespace cc 236 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/render_surface_impl.h ('k') | cc/layers/scrollbar_layer_impl_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698