diff options
author | reed <reed@google.com> | 2016-07-19 14:33:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-19 14:33:20 -0700 |
commit | e51c356ae4e074b9c286c50a4efce11205f7463c (patch) | |
tree | 5955b6697e9db747ba502c04aeacd1e621aad627 /src/gpu | |
parent | a3f3caccdfa6e5e044cc1c76e256e55b8a6004ad (diff) |
pre-land special methods on device
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2161233002
Review-Url: https://codereview.chromium.org/2161233002
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 5 | ||||
-rw-r--r-- | src/gpu/SkGpuDevice.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 23f5798c1a..8ce4b30ff7 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -1426,7 +1426,7 @@ sk_sp<SkSpecialImage> SkGpuDevice::makeSpecial(const SkBitmap& bitmap) { &this->surfaceProps()); } -sk_sp<SkSpecialImage> SkGpuDevice::makeSpecial(SkImage* image) { +sk_sp<SkSpecialImage> SkGpuDevice::makeSpecial(const SkImage* image) { SkPixmap pm; if (image->isTextureBacked()) { GrTexture* texture = as_IB(image)->peekTexture(); @@ -1457,8 +1457,7 @@ sk_sp<SkSpecialImage> SkGpuDevice::snapSpecial() { return nullptr; } - if (!fContext->copySurface(this->accessDrawContext()->accessRenderTarget(), - texture.get())) { + if (!fContext->copySurface(texture.get(), this->accessDrawContext()->accessRenderTarget())){ return nullptr; } } diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h index 85764467cb..8fec082ffd 100644 --- a/src/gpu/SkGpuDevice.h +++ b/src/gpu/SkGpuDevice.h @@ -134,7 +134,7 @@ public: void drawSpecial(const SkDraw&, SkSpecialImage*, int left, int top, const SkPaint& paint) override; sk_sp<SkSpecialImage> makeSpecial(const SkBitmap&) override; - sk_sp<SkSpecialImage> makeSpecial(SkImage*) override; + sk_sp<SkSpecialImage> makeSpecial(const SkImage*) override; sk_sp<SkSpecialImage> snapSpecial() override; void flush() override; |