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

Unified Diff: cc/resources/picture.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/resources/layer_updater.h ('k') | cc/resources/picture.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture.h
diff --git a/cc/resources/picture.h b/cc/resources/picture.h
index 9facb4397d304d3d380c6ab943461cb3e0ecc2f5..92afccd03fb8061e4e73f49605aa92a756327a4a 100644
--- a/cc/resources/picture.h
+++ b/cc/resources/picture.h
@@ -43,7 +43,7 @@ class CC_EXPORT Picture
typedef std::vector<SkPixelRef*> PixelRefs;
typedef base::hash_map<PixelRefMapKey, PixelRefs> PixelRefMap;
- static scoped_refptr<Picture> Create(gfx::Rect layer_rect);
+ static scoped_refptr<Picture> Create(const gfx::Rect& layer_rect);
static scoped_refptr<Picture> CreateFromValue(const base::Value* value);
static scoped_refptr<Picture> CreateFromSkpValue(const base::Value* value);
@@ -84,7 +84,7 @@ class CC_EXPORT Picture
class CC_EXPORT PixelRefIterator {
public:
PixelRefIterator();
- PixelRefIterator(gfx::Rect layer_rect, const Picture* picture);
+ PixelRefIterator(const gfx::Rect& layer_rect, const Picture* picture);
~PixelRefIterator();
SkPixelRef* operator->() const {
@@ -120,17 +120,17 @@ class CC_EXPORT Picture
bool WillPlayBackBitmaps() const { return picture_->willPlayBackBitmaps(); }
private:
- explicit Picture(gfx::Rect layer_rect);
+ explicit Picture(const gfx::Rect& layer_rect);
// This constructor assumes SkPicture is already ref'd and transfers
// ownership to this picture.
Picture(const skia::RefPtr<SkPicture>&,
- gfx::Rect layer_rect,
- gfx::Rect opaque_rect,
+ const gfx::Rect& layer_rect,
+ const gfx::Rect& opaque_rect,
const PixelRefMap& pixel_refs);
// This constructor will call AdoptRef on the SkPicture.
Picture(SkPicture*,
- gfx::Rect layer_rect,
- gfx::Rect opaque_rect);
+ const gfx::Rect& layer_rect,
+ const gfx::Rect& opaque_rect);
~Picture();
gfx::Rect layer_rect_;
« no previous file with comments | « cc/resources/layer_updater.h ('k') | cc/resources/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698