aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureProxy.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-02-12 12:07:39 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-12 18:51:28 +0000
commitd2d8e92e5e6014b746e9928a8ffc1ba4b95cb016 (patch)
treef93946c1835903aebed7c8c019774e2c28909ac3 /src/gpu/GrTextureProxy.cpp
parent82040a9a056cd830027e255c7da845dcb5c026ed (diff)
Remove tracking of SkDestinationSurfaceColorMode on GrTextureProxy for mips
When we create a new surface from a proxy we were always using legacy and when we wrapped an existing surface we never actaully had to use the value we pulled off of it since the proxy was already instantiatied. Bug: skia: Change-Id: Ifcb5f3ac2f1dcf41b01a98c554d682ae57028d5a Reviewed-on: https://skia-review.googlesource.com/106207 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrTextureProxy.cpp')
-rw-r--r--src/gpu/GrTextureProxy.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp
index 834d92b345..9245221ef3 100644
--- a/src/gpu/GrTextureProxy.cpp
+++ b/src/gpu/GrTextureProxy.cpp
@@ -19,7 +19,6 @@ GrTextureProxy::GrTextureProxy(const GrSurfaceDesc& srcDesc, SkBackingFit fit, S
const void* srcData, size_t /*rowBytes*/, uint32_t flags)
: INHERITED(srcDesc, fit, budgeted, flags)
, fMipMapped(GrMipMapped::kNo)
- , fMipColorMode(SkDestinationSurfaceColorMode::kLegacy)
, fProxyProvider(nullptr)
, fDeferredUploader(nullptr) {
SkASSERT(!srcData); // currently handled in Make()
@@ -31,7 +30,6 @@ GrTextureProxy::GrTextureProxy(LazyInstantiateCallback&& callback, LazyInstantia
SkBudgeted budgeted, uint32_t flags)
: INHERITED(std::move(callback), lazyType, desc, fit, budgeted, flags)
, fMipMapped(mipMapped)
- , fMipColorMode(SkDestinationSurfaceColorMode::kLegacy)
, fProxyProvider(nullptr)
, fDeferredUploader(nullptr) {
}
@@ -40,7 +38,6 @@ GrTextureProxy::GrTextureProxy(LazyInstantiateCallback&& callback, LazyInstantia
GrTextureProxy::GrTextureProxy(sk_sp<GrSurface> surf, GrSurfaceOrigin origin)
: INHERITED(std::move(surf), origin, SkBackingFit::kExact)
, fMipMapped(fTarget->asTexture()->texturePriv().mipMapped())
- , fMipColorMode(fTarget->asTexture()->texturePriv().mipColorMode())
, fProxyProvider(nullptr)
, fDeferredUploader(nullptr) {
if (fTarget->getUniqueKey().isValid()) {
@@ -65,7 +62,7 @@ bool GrTextureProxy::instantiate(GrResourceProvider* resourceProvider) {
return false;
}
if (!this->instantiateImpl(resourceProvider, 1, /* needsStencil = */ false,
- kNone_GrSurfaceFlags, fMipMapped, fMipColorMode,
+ kNone_GrSurfaceFlags, fMipMapped,
fUniqueKey.isValid() ? &fUniqueKey : nullptr)) {
return false;
}
@@ -79,7 +76,7 @@ sk_sp<GrSurface> GrTextureProxy::createSurface(GrResourceProvider* resourceProvi
sk_sp<GrSurface> surface= this->createSurfaceImpl(resourceProvider, 1,
/* needsStencil = */ false,
kNone_GrSurfaceFlags,
- fMipMapped, fMipColorMode);
+ fMipMapped);
if (!surface) {
return nullptr;
}