| 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);
|
|
|