aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkSpecialImage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkSpecialImage.cpp')
-rw-r--r--src/core/SkSpecialImage.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp
index 339341a8e8..fad5d1471c 100644
--- a/src/core/SkSpecialImage.cpp
+++ b/src/core/SkSpecialImage.cpp
@@ -17,6 +17,7 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
+#include "GrContextPriv.h"
#include "GrResourceProvider.h"
#include "GrSurfaceContext.h"
#include "GrSurfaceProxyPriv.h"
@@ -416,14 +417,13 @@ public:
return false;
}
- // Reading back to an SkBitmap ends deferral
- GrTexture* texture = fTextureProxy->instantiate(fContext->resourceProvider());
- if (!texture) {
+ sk_sp<GrSurfaceContext> sContext = fContext->contextPriv().makeWrappedSurfaceContext(
+ fTextureProxy, nullptr);
+ if (!sContext) {
return false;
}
- if (!texture->readPixels(0, 0, dst->width(), dst->height(), kSkia8888_GrPixelConfig,
- dst->getPixels(), dst->rowBytes())) {
+ if (!sContext->readPixels(info, dst->getPixels(), dst->rowBytes(), 0, 0)) {
return false;
}