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

Unified Diff: include/core/SkBitmapDevice.h

Issue 933043006: Implement SkBaseDevice snapshot support Base URL: https://skia.googlesource.com/skia.git@skimage-filters-04-snapshot-devices
Patch Set: Created 5 years, 9 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 | « no previous file | include/core/SkCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkBitmapDevice.h
diff --git a/include/core/SkBitmapDevice.h b/include/core/SkBitmapDevice.h
index a35f9df412cd86c6302c772eb4269385367fd231..30abd32601988ae5694159ba45e17d16689e5b77 100644
--- a/include/core/SkBitmapDevice.h
+++ b/include/core/SkBitmapDevice.h
@@ -34,9 +34,11 @@ public:
static SkBitmapDevice* Create(const SkImageInfo& info) {
return Create(info, NULL);
}
-
+ ~SkBitmapDevice();
SkImageInfo imageInfo() const SK_OVERRIDE;
+ SkImage* newImageSnapshot() SK_OVERRIDE;
+ void discard() SK_OVERRIDE;
protected:
bool onShouldDisableLCD(const SkPaint&) const SK_OVERRIDE;
@@ -137,13 +139,15 @@ private:
friend class SkDeviceImageFilterProxy;
friend class SkSurface_Raster;
+ friend class SkRasterDevice;
// used to change the backend's pixels (and possibly config/rowbytes)
// but cannot change the width/height, so there should be no change to
// any clip information.
- void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRIDE;
+ void deepCopyBackendIfNeeded();
SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) SK_OVERRIDE;
+ virtual SkImage* onNewImageSnapshot();
SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE;
const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE;
@@ -151,7 +155,7 @@ private:
SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE;
SkBitmap fBitmap;
-
+ SkAutoTUnref<SkImage> fSnapshot;
typedef SkBaseDevice INHERITED;
};
« no previous file with comments | « no previous file | include/core/SkCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698