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

Unified Diff: cc/trees/layer_tree_host_impl.h

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/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index c6a17389e194f87d9bb3e64a621a4e405c87ad61..3f8f3a9b673ae970910006855cbad355aec38690 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -67,7 +67,7 @@ class LayerTreeHostImplClient {
// Please call these 2 functions through
// LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect().
virtual void SetNeedsRedrawOnImplThread() = 0;
- virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) = 0;
+ virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0;
virtual void DidInitializeVisibleTileOnImplThread() = 0;
virtual void SetNeedsCommitOnImplThread() = 0;
virtual void SetNeedsManageTilesOnImplThread() = 0;
@@ -170,7 +170,7 @@ class CC_EXPORT LayerTreeHostImpl
void MainThreadHasStoppedFlinging();
void UpdateBackgroundAnimateTicking(bool should_background_tick);
void DidAnimateScrollOffset();
- void SetViewportDamage(gfx::Rect damage_rect);
+ void SetViewportDamage(const gfx::Rect& damage_rect);
virtual void ManageTiles();
@@ -179,7 +179,7 @@ class CC_EXPORT LayerTreeHostImpl
// must also be called, regardless of whether DrawLayers is called between the
// two.
virtual bool PrepareToDraw(FrameData* frame,
- gfx::Rect device_viewport_damage_rect);
+ const gfx::Rect& damage_rect);
virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time);
// Must be called if and only if PrepareToDraw was called.
void DidDrawAllLayers(const FrameData& frame);
@@ -220,12 +220,12 @@ class CC_EXPORT LayerTreeHostImpl
virtual bool DeferredInitialize(
scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE;
virtual void ReleaseGL() OVERRIDE;
- virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE;
+ virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE;
virtual void BeginImplFrame(const BeginFrameArgs& args) OVERRIDE;
virtual void SetExternalDrawConstraints(
const gfx::Transform& transform,
- gfx::Rect viewport,
- gfx::Rect clip,
+ const gfx::Rect& viewport,
+ const gfx::Rect& clip,
bool valid_for_tile_management) OVERRIDE;
virtual void DidLoseOutputSurface() OVERRIDE;
virtual void DidSwapBuffers() OVERRIDE;
@@ -263,7 +263,7 @@ class CC_EXPORT LayerTreeHostImpl
void SetNeedsBeginImplFrame(bool enable);
void DidModifyTilePriorities();
- void Readback(void* pixels, gfx::Rect rect_in_device_viewport);
+ void Readback(void* pixels, const gfx::Rect& rect_in_device_viewport);
LayerTreeImpl* active_tree() { return active_tree_.get(); }
const LayerTreeImpl* active_tree() const { return active_tree_.get(); }
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698