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

Unified Diff: include/core/SkDevice.h

Issue 196543004: make onReadPixels protected and have default impl (so we can remove chrome override) (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 | « no previous file | src/core/SkDevice.cpp » ('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 b78dfbff90df347fa7afc790bd8dd6928ef08872..90bdfa335d723c70f5d3b73819633b21a2119f5b 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -336,17 +336,6 @@ protected:
*/
virtual const SkBitmap& onAccessBitmap() = 0;
- /**
- * Implements readPixels API. The caller will ensure that:
- * 1. bitmap has pixel config kARGB_8888_Config.
- * 2. bitmap has pixels.
- * 3. The rectangle (x, y, x + bitmap->width(), y + bitmap->height()) is
- * contained in the device bounds.
- */
- virtual bool onReadPixels(const SkBitmap& bitmap,
- int x, int y,
- SkCanvas::Config8888 config8888) = 0;
-
/** Called when this device is installed into a Canvas. Balanced by a call
to unlockPixels() when the device is removed from a Canvas.
*/
@@ -392,6 +381,17 @@ protected:
virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes);
/**
+ * Implements readPixels API. The caller will ensure that:
+ * 1. bitmap has pixel config kARGB_8888_Config.
+ * 2. bitmap has pixels.
+ * 3. The rectangle (x, y, x + bitmap->width(), y + bitmap->height()) is
+ * contained in the device bounds.
+ */
+ virtual bool onReadPixels(const SkBitmap& bitmap,
+ int x, int y,
+ SkCanvas::Config8888 config8888);
+
+ /**
* The caller is responsible for "pre-clipping" the src. The impl can assume that the src
* image at the specified x,y offset will fit within the device's bounds.
*
« no previous file with comments | « no previous file | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698