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

Unified Diff: include/core/SkDevice.h

Issue 197433002: support direct writing to top layer (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 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 | « include/core/SkCanvas.h ('k') | include/utils/SkDeferredCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkDevice.h
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 90bdfa335d723c70f5d3b73819633b21a2119f5b..b3be78085f483b890b0dc941854456914a20d602 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -138,6 +138,8 @@ public:
bool writePixelsDirect(const SkImageInfo&, const void*, size_t rowBytes, int x, int y);
+ void* accessPixels(SkImageInfo* info, size_t* rowBytes);
+
/**
* Return the device's associated gpu render target, or NULL.
*/
@@ -400,6 +402,11 @@ protected:
virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int x, int y);
/**
+ * Default impl returns NULL.
+ */
+ virtual void* onAccessPixels(SkImageInfo* info, size_t* rowBytes);
+
+ /**
* Leaky properties are those which the device should be applying but it isn't.
* These properties will be applied by the draw, when and as it can.
* If the device does handle a property, that property should be set to the identity value
@@ -414,7 +421,7 @@ private:
friend class SkDrawIter;
friend class SkDeviceFilteredPaint;
friend class SkDeviceImageFilterProxy;
- friend class DeferredDevice; // for newSurface
+ friend class SkDeferredDevice; // for newSurface
friend class SkSurface_Raster;
« no previous file with comments | « include/core/SkCanvas.h ('k') | include/utils/SkDeferredCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698