diff options
author | 2017-03-21 13:26:13 +0000 | |
---|---|---|
committer | 2017-03-21 13:26:22 +0000 | |
commit | eaa78c45002b4a6e43f4fe2028652b050132dad2 (patch) | |
tree | 00c45b889ac05a1a7e34a33f0e301bb2f73b4e5c /src/gpu/SkGpuDevice.cpp | |
parent | 107524c2a26e81ebeb2edaa62a96df3bcde0d0c7 (diff) |
Revert "Make SkImage_Gpu be deferred"
This reverts commit 0db235bc0278887c344eb25b4681e9cca4cf892a.
Reason for revert: cc_unittests failing
Original change's description:
> Make SkImage_Gpu be deferred
>
> This CL removes the GrTexture-based ctor forcing everyone to create deferred SkImage_Gpus.
>
> split out into:
> https://skia-review.googlesource.com/c/9106/ (Remove atlas creation from GrResourceProvider)
>
> Change-Id: I266bbe089c242fe54d5b7adcc7895aa5a39440a0
> Reviewed-on: https://skia-review.googlesource.com/6680
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ia15590a1fae04b52723713760fdbf0492ad36286
Reviewed-on: https://skia-review.googlesource.com/9962
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 8a6d973394..676dc2b9d9 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -14,7 +14,6 @@ #include "GrImageTextureMaker.h" #include "GrRenderTargetContextPriv.h" #include "GrStyle.h" -#include "GrSurfaceProxyPriv.h" #include "GrTextureAdjuster.h" #include "GrTextureProxy.h" #include "GrTracing.h" @@ -166,9 +165,7 @@ sk_sp<GrRenderTargetContext> SkGpuDevice::MakeRenderTargetContext( } 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->makeRenderTargetContext(SkBackingFit::kExact, // Why exact? origInfo.width(), origInfo.height(), config, origInfo.refColorSpace(), sampleCount, origin, surfaceProps, budgeted); @@ -248,19 +245,16 @@ void SkGpuDevice::replaceRenderTargetContext(bool shouldRetainContent) { SkBudgeted budgeted = fRenderTargetContext->priv().isBudgeted(); - // This entry point is used by SkSurface_Gpu::onCopyOnWrite so it must create a - // kExact-backed render target context. sk_sp<GrRenderTargetContext> newRTC(MakeRenderTargetContext( this->context(), budgeted, this->imageInfo(), - fRenderTargetContext->numColorSamples(), - fRenderTargetContext->origin(), + fRenderTargetContext->numColorSamples(), + fRenderTargetContext->origin(), &this->surfaceProps())); if (!newRTC) { return; } - SkASSERT(newRTC->asSurfaceProxy()->priv().isExact()); if (shouldRetainContent) { if (fRenderTargetContext->wasAbandoned()) { @@ -1332,7 +1326,6 @@ sk_sp<SkSpecialImage> SkGpuDevice::snapSpecial() { 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, |