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

Unified Diff: cc/picture.h

Issue 11299324: Make PicturePile pile. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix signed/unsigned mismatch warning Created 8 years 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 | « no previous file | cc/picture.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture.h
diff --git a/cc/picture.h b/cc/picture.h
index bd8889ae3fdf21e73b1b8c23214d6b2d02565e72..563a5b7f50964dcdc758ac328428e7f281546acd 100644
--- a/cc/picture.h
+++ b/cc/picture.h
@@ -19,24 +19,27 @@ struct RenderingStats;
class CC_EXPORT Picture
: public base::RefCountedThreadSafe<Picture> {
public:
- static scoped_refptr<Picture> Create();
+ static scoped_refptr<Picture> Create(gfx::Rect layer_rect);
const gfx::Rect& LayerRect() const { return layer_rect_; }
const gfx::Rect& OpaqueRect() const { return opaque_rect_; }
// Make a thread-safe clone for rasterizing with.
- scoped_refptr<Picture> Clone();
+ scoped_refptr<Picture> Clone() const;
// Record a paint operation. To be able to safely use this SkPicture for
// playback on a different thread this can only be called once.
- void Record(ContentLayerClient*, gfx::Rect layer_rect, RenderingStats&);
+ void Record(ContentLayerClient*, RenderingStats&);
+
+ // Has Record() been called yet?
+ bool HasRecording() const { return picture_.get(); }
// Raster this Picture's layer_rect into the given canvas.
// Assumes contentsScale have already been applied.
void Raster(SkCanvas* canvas);
private:
- Picture();
+ Picture(gfx::Rect layer_rect);
// This constructor assumes SkPicture is already ref'd and transfers
// ownership to this picture.
Picture(SkPicture*, gfx::Rect layer_rect, gfx::Rect opaque_rect);
« no previous file with comments | « no previous file | cc/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698