aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImage.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-02-07 11:59:16 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-07 21:41:00 +0000
commite88cf6b7aa5deaeaa9dab18ada7d9d11e1e4be12 (patch)
tree9b3eef7407120c74dd9e9a7a38579d57ff52fe39 /src/image/SkImage.cpp
parent0766e9b55e307eb1db9c683a12b8333833d65247 (diff)
Remove asTextureRef from SkSpecialImage & update effects accordingly
This CL also renames SkSpecialImage::asTextureProxy to asTextureProxyRef Change-Id: I5ed8e475bb9688453b825ae4500ed0e8d324b5ac Reviewed-on: https://skia-review.googlesource.com/7995 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/image/SkImage.cpp')
-rw-r--r--src/image/SkImage.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp
index 67c96d7ed2..e798935710 100644
--- a/src/image/SkImage.cpp
+++ b/src/image/SkImage.cpp
@@ -291,9 +291,7 @@ sk_sp<SkImage> SkImage::makeWithFilter(const SkImageFilter* filter, const SkIRec
SkImageFilter::OutputProperties outputProperties(colorSpace);
SkImageFilter::Context context(SkMatrix::I(), clipBounds, cache.get(), outputProperties);
- sk_sp<SkSpecialImage> result =
- filter->filterImage(srcSpecialImage.get(), context, offset);
-
+ sk_sp<SkSpecialImage> result = filter->filterImage(srcSpecialImage.get(), context, offset);
if (!result) {
return nullptr;
}
@@ -302,11 +300,13 @@ sk_sp<SkImage> SkImage::makeWithFilter(const SkImageFilter* filter, const SkIRec
#if SK_SUPPORT_GPU
if (result->isTextureBacked()) {
GrContext* context = result->getContext();
- sk_sp<GrTexture> texture = result->asTextureRef(context);
- if (!texture) {
+ sk_sp<GrTextureProxy> proxy = result->asTextureProxyRef(context);
+ if (!proxy) {
return nullptr;
}
- fullSize = SkIRect::MakeWH(texture->width(), texture->height());
+ // MDB TODO: This is okay for now but will need to updated when we have deferred
+ // SkImage_Gpu objects
+ fullSize = SkIRect::MakeWH(proxy->width(), proxy->height());
}
#endif
*outSubset = SkIRect::MakeWH(result->width(), result->height());