Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index 4cb90c658e1b3346d9220812a202332d7970a6f2..75c9536c14cdc6bfcb0e08487ef93deb12651a49 100644 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -357,7 +357,8 @@ bool GrContext::writeSurfacePixels(GrSurface* surface, |
} |
SkMatrix matrix; |
matrix.setTranslate(SkIntToScalar(left), SkIntToScalar(top)); |
- sk_sp<GrDrawContext> drawContext(this->drawContext(sk_ref_sp(renderTarget))); |
+ sk_sp<GrDrawContext> drawContext(this->drawContext(surface->width(), surface->height(), |
+ sk_ref_sp(renderTarget))); |
if (!drawContext) { |
return false; |
} |
@@ -534,7 +535,8 @@ bool GrContext::applyGamma(GrRenderTarget* dst, GrTexture* src, SkScalar gamma){ |
SkSurfaceProps props(SkSurfaceProps::kGammaCorrect_Flag, |
SkSurfaceProps::kLegacyFontHost_InitType); |
- sk_sp<GrDrawContext> drawContext(this->drawContext(sk_ref_sp(dst), &props)); |
+ sk_sp<GrDrawContext> drawContext(this->drawContext(dst->width(), dst->height(), |
+ sk_ref_sp(dst), &props)); |
if (!drawContext) { |
return false; |
} |
@@ -596,7 +598,8 @@ bool GrContext::copySurface(GrSurface* dst, GrSurface* src, const SkIRect& srcRe |
src->flushWrites(); |
return fGpu->copySurface(dst, src, clippedSrcRect, clippedDstPoint); |
} |
- sk_sp<GrDrawContext> drawContext(this->drawContext(sk_ref_sp(dst->asRenderTarget()))); |
+ sk_sp<GrDrawContext> drawContext(this->drawContext(dst->width(), dst->height(), |
+ sk_ref_sp(dst->asRenderTarget()))); |
if (!drawContext) { |
return false; |
} |
@@ -635,10 +638,10 @@ int GrContext::getRecommendedSampleCount(GrPixelConfig config, |
} |
-sk_sp<GrDrawContext> GrContext::drawContext(sk_sp<GrRenderTarget> rt, |
+sk_sp<GrDrawContext> GrContext::drawContext(int width, int height, sk_sp<GrRenderTarget> rt, |
const SkSurfaceProps* surfaceProps) { |
ASSERT_SINGLE_OWNER |
- return fDrawingManager->drawContext(std::move(rt), surfaceProps); |
+ return fDrawingManager->drawContext(width, height, std::move(rt), surfaceProps); |
} |
sk_sp<GrDrawContext> GrContext::newDrawContext(SkBackingFit fit, |
@@ -666,8 +669,9 @@ sk_sp<GrDrawContext> GrContext::newDrawContext(SkBackingFit fit, |
return nullptr; |
} |
- sk_sp<GrDrawContext> drawContext(this->drawContext(sk_ref_sp(tex->asRenderTarget()), |
- surfaceProps)); |
+ sk_sp<GrDrawContext> drawContext(fDrawingManager->drawContext(width, height, |
+ sk_ref_sp(tex->asRenderTarget()), |
+ surfaceProps)); |
if (!drawContext) { |
return nullptr; |
} |