Rm makeRenderTargetContext in favor of deferred version (take 3)
This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version)
TBR=bsalomon@google.com
Change-Id: If81f4d9fb889c091cd37ffde133d906fb3e37773
Reviewed-on: https://skia-review.googlesource.com/14027
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 7046f1c..6ddae65 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -168,7 +168,8 @@
GrPixelConfig config = SkImageInfo2GrPixelConfig(origInfo, *context->caps());
// This method is used to create SkGpuDevice's for SkSurface_Gpus. In this case
// they need to be exact.
- return context->makeRenderTargetContext(SkBackingFit::kExact,
+ return context->makeDeferredRenderTargetContext(
+ SkBackingFit::kExact,
origInfo.width(), origInfo.height(),
config, origInfo.refColorSpace(), sampleCount,
origin, surfaceProps, budgeted);
@@ -1329,7 +1330,6 @@
const SkImageInfo ii = this->imageInfo();
const SkIRect srcRect = SkIRect::MakeWH(ii.width(), ii.height());
- SkASSERT(proxy->priv().isExact());
return SkSpecialImage::MakeDeferredFromGpu(fContext.get(),
srcRect,
kNeedNewImageUniqueID_SpecialImage,
@@ -1760,13 +1760,13 @@
SkBackingFit fit = kNever_TileUsage == cinfo.fTileUsage ? SkBackingFit::kApprox
: SkBackingFit::kExact;
- sk_sp<GrRenderTargetContext> rtc(fContext->makeRenderTargetContext(
+ sk_sp<GrRenderTargetContext> rtc(fContext->makeDeferredRenderTargetContext(
fit,
cinfo.fInfo.width(), cinfo.fInfo.height(),
- fRenderTargetContext->config(),
- fRenderTargetContext->refColorSpace(),
- fRenderTargetContext->desc().fSampleCnt,
- kDefault_GrSurfaceOrigin,
+ fRenderTargetContext->config(),
+ fRenderTargetContext->refColorSpace(),
+ fRenderTargetContext->desc().fSampleCnt,
+ kBottomLeft_GrSurfaceOrigin,
&props));
if (!rtc) {
return nullptr;