summaryrefslogtreecommitdiffstats
path: root/chromium/cc/resources/skpicture_content_layer_updater.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/cc/resources/skpicture_content_layer_updater.h')
-rw-r--r--chromium/cc/resources/skpicture_content_layer_updater.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/chromium/cc/resources/skpicture_content_layer_updater.h b/chromium/cc/resources/skpicture_content_layer_updater.h
index 511d8ee9bfd..a567976a2d8 100644
--- a/chromium/cc/resources/skpicture_content_layer_updater.h
+++ b/chromium/cc/resources/skpicture_content_layer_updater.h
@@ -6,6 +6,7 @@
#define CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_
#include "cc/resources/content_layer_updater.h"
+#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkPicture.h"
class SkCanvas;
@@ -14,11 +15,8 @@ namespace cc {
class LayerPainter;
-// This class records the content_rect into an SkPicture. Subclasses, provide
-// different implementations of tile updating based on this recorded picture.
-// The BitmapSkPictureContentLayerUpdater and
-// FrameBufferSkPictureContentLayerUpdater are two examples of such
-// implementations.
+// This class records the content_rect into an SkPicture. Subclass provides
+// SkCanvas to DrawPicture() for tile updating based on this recorded picture.
class SkPictureContentLayerUpdater : public ContentLayerUpdater {
protected:
SkPictureContentLayerUpdater(
@@ -27,16 +25,15 @@ class SkPictureContentLayerUpdater : public ContentLayerUpdater {
int layer_id);
virtual ~SkPictureContentLayerUpdater();
- virtual void PrepareToUpdate(gfx::Rect content_rect,
- gfx::Size tile_size,
+ virtual void PrepareToUpdate(const gfx::Rect& content_rect,
+ const gfx::Size& tile_size,
float contents_width_scale,
float contents_height_scale,
gfx::Rect* resulting_opaque_rect) OVERRIDE;
void DrawPicture(SkCanvas* canvas);
private:
- // Recording canvas.
- SkPicture picture_;
+ skia::RefPtr<SkPicture> picture_;
DISALLOW_COPY_AND_ASSIGN(SkPictureContentLayerUpdater);
};