diff options
author | Brian Osman <brianosman@google.com> | 2017-09-28 17:45:20 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-28 17:45:32 +0000 |
commit | 9f8d4d36b514ffe3cc3a4a48900e3dc1fecb2a96 (patch) | |
tree | 332ff8c62c1dff41f48672c001bddedf956a43b6 /src/gpu/GrTextureProxy.cpp | |
parent | abb8bb307cea0cf2fae605bd0e80a81854da760e (diff) |
Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"""
This reverts commit e8b8397664666bfcba8f088ea073ede915da8a41.
Reason for revert: More crashing.
Original change's description:
> Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""
>
> This reverts commit 837c6c7c0cc76bdb9d61a05244ca5f31e7573c37.
>
> Bug: skia:
> Change-Id: I1821f1b2b772c67f1b749692b398eb757d8073c9
> Reviewed-on: https://skia-review.googlesource.com/52744
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com
Change-Id: I1c8a81ed1000446c298d646d2cd5e7ebd212f18c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/52860
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrTextureProxy.cpp')
-rw-r--r-- | src/gpu/GrTextureProxy.cpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp index 534adaa709..8b9e58b594 100644 --- a/src/gpu/GrTextureProxy.cpp +++ b/src/gpu/GrTextureProxy.cpp @@ -6,11 +6,10 @@ */ #include "GrTextureProxy.h" -#include "GrTextureProxyPriv.h" #include "GrContext.h" -#include "GrDeferredProxyUploader.h" #include "GrResourceCache.h" + #include "GrTexturePriv.h" GrTextureProxy::GrTextureProxy(const GrSurfaceDesc& srcDesc, SkBackingFit fit, SkBudgeted budgeted, @@ -18,8 +17,7 @@ GrTextureProxy::GrTextureProxy(const GrSurfaceDesc& srcDesc, SkBackingFit fit, S : INHERITED(srcDesc, fit, budgeted, flags) , fIsMipMapped(false) , fMipColorMode(SkDestinationSurfaceColorMode::kLegacy) - , fCache(nullptr) - , fDeferredUploader(nullptr) { + , fCache(nullptr) { SkASSERT(!srcData); // currently handled in Make() } @@ -27,8 +25,7 @@ GrTextureProxy::GrTextureProxy(sk_sp<GrSurface> surf, GrSurfaceOrigin origin) : INHERITED(std::move(surf), origin, SkBackingFit::kExact) , fIsMipMapped(fTarget->asTexture()->texturePriv().hasMipMaps()) , fMipColorMode(fTarget->asTexture()->texturePriv().mipColorMode()) - , fCache(nullptr) - , fDeferredUploader(nullptr) { + , fCache(nullptr) { if (fTarget->getUniqueKey().isValid()) { fCache = fTarget->asTexture()->getContext()->getResourceCache(); fCache->adoptUniqueKeyFromSurface(this, fTarget); @@ -70,25 +67,6 @@ sk_sp<GrSurface> GrTextureProxy::createSurface(GrResourceProvider* resourceProvi return surface; } -void GrTextureProxyPriv::setDeferredUploader(std::unique_ptr<GrDeferredProxyUploader> uploader) { - SkASSERT(!fTextureProxy->fDeferredUploader); - fTextureProxy->fDeferredUploader = std::move(uploader); -} - -void GrTextureProxyPriv::scheduleUpload(GrOpFlushState* flushState) { - SkASSERT(fTextureProxy->fDeferredUploader); - - // Instantiate might have failed - if (fTextureProxy->fTarget) { - fTextureProxy->fDeferredUploader->scheduleUpload(flushState, fTextureProxy); - } -} - -void GrTextureProxyPriv::resetDeferredUploader() { - SkASSERT(fTextureProxy->fDeferredUploader); - fTextureProxy->fDeferredUploader.reset(); -} - // This method parallels the highest_filter_mode functions in GrGLTexture & GrVkTexture. GrSamplerState::Filter GrTextureProxy::highestFilterMode() const { if (fTarget) { |