aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGpuDevice.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/gpu/SkGpuDevice.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/gpu/SkGpuDevice.cpp')
-rw-r--r--src/gpu/SkGpuDevice.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 4314b450fd..0197a6e663 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1315,15 +1315,15 @@ sk_sp<SkSpecialImage> SkGpuDevice::makeSpecial(const SkImage* image) {
}
sk_sp<SkSpecialImage> SkGpuDevice::snapSpecial() {
- sk_sp<GrSurfaceProxy> sProxy(this->accessRenderTargetContext()->asTextureProxyRef());
- if (!sProxy) {
+ sk_sp<GrTextureProxy> proxy(this->accessRenderTargetContext()->asTextureProxyRef());
+ if (!proxy) {
// When the device doesn't have a texture, we create a temporary texture.
// TODO: we should actually only copy the portion of the source needed to apply the image
// filter
- sProxy = GrSurfaceProxy::Copy(fContext.get(),
- this->accessRenderTargetContext()->asSurfaceProxy(),
- SkBudgeted::kYes);
- if (!sProxy) {
+ proxy = GrSurfaceProxy::Copy(fContext.get(),
+ this->accessRenderTargetContext()->asSurfaceProxy(),
+ SkBudgeted::kYes);
+ if (!proxy) {
return nullptr;
}
}
@@ -1334,7 +1334,7 @@ sk_sp<SkSpecialImage> SkGpuDevice::snapSpecial() {
return SkSpecialImage::MakeDeferredFromGpu(fContext.get(),
srcRect,
kNeedNewImageUniqueID_SpecialImage,
- sProxy,
+ std::move(proxy),
ii.refColorSpace(),
&this->surfaceProps());
}