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

Unified Diff: src/image/SkSurface_Gpu.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 | « src/image/SkSurface_Base.h ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface_Gpu.h
diff --git a/src/image/SkSurface_Gpu.h b/src/image/SkSurface_Gpu.h
index 90c00c4b4570b0aacb2fbcdda07cbcd8981d9be4..0348d44235df57c7070425cb451000ba6229bc32 100644
--- a/src/image/SkSurface_Gpu.h
+++ b/src/image/SkSurface_Gpu.h
@@ -24,15 +24,20 @@ public:
SkCanvas* onNewCanvas() SK_OVERRIDE;
SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE;
SkImage* onNewImageSnapshot(Budgeted) SK_OVERRIDE;
- virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y,
- const SkPaint*) SK_OVERRIDE;
- void onCopyOnWrite(ContentChangeMode) SK_OVERRIDE;
- void onDiscard() SK_OVERRIDE;
+ uint32_t generationID() SK_OVERRIDE;
SkGpuDevice* getDevice() { return fDevice; }
+ void notifyContentWillChange() {
+ fGenerationID = 0;
+ }
+
+ // For the tests. Going through getDevice()->accessRenderTarget() will detach the snapshot,
+ // which most of the tests try to test.
+ bool isBackendBudgeted() const;
private:
SkGpuDevice* fDevice;
+ uint32_t fGenerationID;
typedef SkSurface_Base INHERITED;
};
« no previous file with comments | « src/image/SkSurface_Base.h ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698