GrSurfaceContext not ref counted.
Also don't specify redundant width/height to SkGpuDevice.
Change-Id: I389df5c4b073c2c05632ba6b7c95b02a22dfaf98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235824
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/image/SkImage_GpuBase.cpp b/src/image/SkImage_GpuBase.cpp
index 0d2fb5e..a47d3d2 100644
--- a/src/image/SkImage_GpuBase.cpp
+++ b/src/image/SkImage_GpuBase.cpp
@@ -92,11 +92,8 @@
this->colorType(),
texProxy->backendFormat());
- sk_sp<GrSurfaceContext> sContext =
- direct->priv().makeWrappedSurfaceContext(std::move(texProxy),
- grColorType,
- this->alphaType(),
- this->refColorSpace());
+ auto sContext = direct->priv().makeWrappedSurfaceContext(
+ std::move(texProxy), grColorType, this->alphaType(), this->refColorSpace());
if (!sContext) {
return false;
}
@@ -150,7 +147,7 @@
this->colorType(),
texProxy->backendFormat());
- sk_sp<GrSurfaceContext> sContext = direct->priv().makeWrappedSurfaceContext(
+ auto sContext = direct->priv().makeWrappedSurfaceContext(
std::move(texProxy), grColorType, this->alphaType(), this->refColorSpace());
if (!sContext) {
return false;