aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImage_Gpu.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-02-15 14:19:01 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-15 20:17:29 +0000
commit63c67461ed07b5fca35182ac62657b2cb16afbb4 (patch)
tree461c958cfca8c01c1fba552438a6c05f9da2bb45 /src/image/SkImage_Gpu.cpp
parentca4c60f5413ba2af4ddfce7160ddd226e8738e02 (diff)
Tighten up GrSurfaceProxy typing
This may reduce the number of "why not GrTextureProxy" issues Change-Id: I9e0e5042f5801ba9a933b697a380cb0cb54b4522 Reviewed-on: https://skia-review.googlesource.com/8510 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/image/SkImage_Gpu.cpp')
-rw-r--r--src/image/SkImage_Gpu.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 98a7101e6b..05caf867a3 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -94,12 +94,7 @@ bool SkImage_Gpu::getROPixels(SkBitmap* dst, SkColorSpace* dstColorSpace,
}
sk_sp<GrTextureProxy> SkImage_Gpu::asTextureProxyRef() const {
- sk_sp<GrSurfaceProxy> sProxy = GrSurfaceProxy::MakeWrapped(fTexture);
- if (!sProxy) {
- return nullptr;
- }
-
- return sk_ref_sp(sProxy->asTextureProxy());
+ return GrSurfaceProxy::MakeWrapped(fTexture);
}
GrTexture* SkImage_Gpu::asTextureRef(GrContext* ctx, const GrSamplerParams& params,