Index: src/core/SkSpecialImage.cpp |
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp |
index 991e16351586674ad01272215071f043c72d8408..426a44ebff26ed4a4a8059f3f34a79ad8a4ea90f 100644 |
--- a/src/core/SkSpecialImage.cpp |
+++ b/src/core/SkSpecialImage.cpp |
@@ -136,6 +136,7 @@ SkImageFilter::Proxy* SkSpecialImage::internal_getProxy() const { |
/////////////////////////////////////////////////////////////////////////////// |
#include "SkImage.h" |
#if SK_SUPPORT_GPU |
+#include "GrContext.h" |
#include "SkGrPriv.h" |
#endif |
@@ -206,7 +207,7 @@ public: |
#if SK_SUPPORT_GPU |
GrTexture* texture = as_IB(fImage.get())->peekTexture(); |
if (texture) { |
- GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info); |
+ GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info, *texture->getContext()->caps()); |
desc.fFlags = kRenderTarget_GrSurfaceFlag; |
return SkSpecialSurface::MakeRenderTarget(this->proxy(), texture->getContext(), desc); |
@@ -430,7 +431,7 @@ public: |
} |
sk_sp<SkSpecialSurface> onMakeSurface(const SkImageInfo& info) const override { |
- GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info); |
+ GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info, *fTexture->getContext()->caps()); |
desc.fFlags = kRenderTarget_GrSurfaceFlag; |
return SkSpecialSurface::MakeRenderTarget(this->proxy(), fTexture->getContext(), desc); |