diff options
author | Mike Reed <reed@google.com> | 2017-07-21 11:01:18 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-21 15:27:23 +0000 |
commit | 353196f44f8c4f5fc3dc3783241faef264b80927 (patch) | |
tree | 2dd4d14e7bb5991dcfdbed98e2ecb4d54d4ddda5 /src/core/SkDevice.cpp | |
parent | 35a5e418b96053bbdebef2cceb33db995f960010 (diff) |
clean read/write pixels signatures, augment SkSurface API
For now, not adding writePixels to surface, since it appears we may not
be able to remove writePixels from canvas :(
Bug: skia:3216
Change-Id: I64ccebb31effacffe615ae4537fb46a161a6768d
Reviewed-on: https://skia-review.googlesource.com/25562
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkDevice.cpp')
-rw-r--r-- | src/core/SkDevice.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp index ddc3d33aef..bf71fdebd6 100644 --- a/src/core/SkDevice.cpp +++ b/src/core/SkDevice.cpp @@ -292,20 +292,19 @@ sk_sp<SkSpecialImage> SkBaseDevice::snapSpecial() { return nullptr; } /////////////////////////////////////////////////////////////////////////////////////////////////// -bool SkBaseDevice::readPixels(const SkImageInfo& info, void* dstP, size_t rowBytes, int x, int y) { - return this->onReadPixels(info, dstP, rowBytes, x, y); +bool SkBaseDevice::readPixels(const SkPixmap& pm, int x, int y) { + return this->onReadPixels(pm, x, y); } -bool SkBaseDevice::writePixels(const SkImageInfo& info, const void* pixels, size_t rowBytes, - int x, int y) { - return this->onWritePixels(info, pixels, rowBytes, x, y); +bool SkBaseDevice::writePixels(const SkPixmap& pm, int x, int y) { + return this->onWritePixels(pm, x, y); } -bool SkBaseDevice::onWritePixels(const SkImageInfo&, const void*, size_t, int, int) { +bool SkBaseDevice::onWritePixels(const SkPixmap&, int, int) { return false; } -bool SkBaseDevice::onReadPixels(const SkImageInfo&, void*, size_t, int x, int y) { +bool SkBaseDevice::onReadPixels(const SkPixmap&, int x, int y) { return false; } |