diff options
author | 2014-03-07 03:25:16 +0000 | |
---|---|---|
committer | 2014-03-07 03:25:16 +0000 | |
commit | 4cd9e2169e35cd67ee7358acea6541245e1d1744 (patch) | |
tree | 6e78d84ef91181b41f5c45a73bab003c63780f10 /include/core/SkBitmapDevice.h | |
parent | a5572e5bb2a2bbeeb59de0741c2527869d365a0c (diff) |
Add SkCanvas::writePixels that takes info+pixels directly
add corresponding methods to device (w/ diff name to avoid colliding with exising virtuals)
BUG=skia:
R=bsalomon@google.com, robertphillips@google.com, junov@google.com, junov@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/180113010
git-svn-id: http://skia.googlecode.com/svn/trunk@13697 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkBitmapDevice.h')
-rw-r--r-- | include/core/SkBitmapDevice.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/core/SkBitmapDevice.h b/include/core/SkBitmapDevice.h index 1d181555e0..a34507134d 100644 --- a/include/core/SkBitmapDevice.h +++ b/include/core/SkBitmapDevice.h @@ -86,6 +86,7 @@ public: virtual SkImageInfo imageInfo() const SK_OVERRIDE; +#ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG /** * DEPRECATED: This will be made protected once WebKit stops using it. * Instead use Canvas' writePixels method. @@ -103,7 +104,7 @@ public: */ virtual void writePixels(const SkBitmap& bitmap, int x, int y, SkCanvas::Config8888 config8888) SK_OVERRIDE; - +#endif /** * Return the device's associated gpu render target, or NULL. */ @@ -215,9 +216,8 @@ protected: * 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) SK_OVERRIDE; + virtual bool onReadPixels(const SkBitmap&, int x, int y, SkCanvas::Config8888) SK_OVERRIDE; + virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) SK_OVERRIDE; /** Called when this device is installed into a Canvas. Balanced by a call to unlockPixels() when the device is removed from a Canvas. |