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

Unified Diff: cc/trees/occlusion_tracker_unittest.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/occlusion_tracker.cc ('k') | cc/trees/proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/occlusion_tracker_unittest.cc
diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc
index 89afe4f909b1d3a1322246e0c7343c326ec06bb2..e7f3dffa0e2efb3576fc09387a0ba74bbb17c0d2 100644
--- a/cc/trees/occlusion_tracker_unittest.cc
+++ b/cc/trees/occlusion_tracker_unittest.cc
@@ -39,7 +39,7 @@ class TestContentLayer : public Layer {
return gfx::IntersectRects(opaque_contents_rect_, visible_content_rect());
return Layer::VisibleContentOpaqueRegion();
}
- void SetOpaqueContentsRect(gfx::Rect opaque_contents_rect) {
+ void SetOpaqueContentsRect(const gfx::Rect& opaque_contents_rect) {
override_opaque_contents_rect_ = true;
opaque_contents_rect_ = opaque_contents_rect;
}
@@ -63,7 +63,7 @@ class TestContentLayerImpl : public LayerImpl {
return gfx::IntersectRects(opaque_contents_rect_, visible_content_rect());
return LayerImpl::VisibleContentOpaqueRegion();
}
- void SetOpaqueContentsRect(gfx::Rect opaque_contents_rect) {
+ void SetOpaqueContentsRect(const gfx::Rect& opaque_contents_rect) {
override_opaque_contents_rect_ = true;
opaque_contents_rect_ = opaque_contents_rect;
}
@@ -84,17 +84,17 @@ template <typename LayerType, typename RenderSurfaceType>
class TestOcclusionTrackerWithClip
: public TestOcclusionTrackerBase<LayerType, RenderSurfaceType> {
public:
- TestOcclusionTrackerWithClip(gfx::Rect viewport_rect,
+ TestOcclusionTrackerWithClip(const gfx::Rect& viewport_rect,
bool record_metrics_for_frame)
: TestOcclusionTrackerBase<LayerType, RenderSurfaceType>(
viewport_rect,
record_metrics_for_frame) {}
- explicit TestOcclusionTrackerWithClip(gfx::Rect viewport_rect)
+ explicit TestOcclusionTrackerWithClip(const gfx::Rect& viewport_rect)
: TestOcclusionTrackerBase<LayerType, RenderSurfaceType>(viewport_rect,
false) {}
bool OccludedLayer(const LayerType* layer,
- gfx::Rect content_rect) const {
+ const gfx::Rect& content_rect) const {
DCHECK(layer->visible_content_rect().Contains(content_rect));
return this->Occluded(layer->render_target(),
content_rect,
@@ -105,7 +105,7 @@ class TestOcclusionTrackerWithClip
// Gives an unoccluded sub-rect of |content_rect| in the content space of the
// layer. Simple wrapper around UnoccludedContentRect.
gfx::Rect UnoccludedLayerContentRect(const LayerType* layer,
- gfx::Rect content_rect) const {
+ const gfx::Rect& content_rect) const {
DCHECK(layer->visible_content_rect().Contains(content_rect));
return this->UnoccludedContentRect(
layer->render_target(),
« no previous file with comments | « cc/trees/occlusion_tracker.cc ('k') | cc/trees/proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698