aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSurfaceProxy.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/GrSurfaceProxy.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/GrSurfaceProxy.cpp')
-rw-r--r--src/gpu/GrSurfaceProxy.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index 5026d0e1d0..e311a820e1 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -114,9 +114,9 @@ bool GrSurfaceProxyPriv::AttachStencilIfNeeded(GrResourceProvider* resourceProvi
sk_sp<GrSurface> GrSurfaceProxy::createSurfaceImpl(
GrResourceProvider* resourceProvider,
int sampleCnt, bool needsStencil,
- GrSurfaceFlags flags, GrMipMapped mipMapped,
- SkDestinationSurfaceColorMode mipColorMode) const {
+ GrSurfaceFlags flags, GrMipMapped mipMapped) const {
SkASSERT(GrSurfaceProxy::LazyState::kNot == this->lazyInstantiationState());
+ SkASSERT(!fTarget);
SkASSERT(GrMipMapped::kNo == mipMapped);
GrSurfaceDesc desc;
desc.fFlags = flags;
@@ -139,8 +139,6 @@ sk_sp<GrSurface> GrSurfaceProxy::createSurfaceImpl(
return nullptr;
}
- surface->asTexture()->texturePriv().setMipColorMode(mipColorMode);
-
if (!GrSurfaceProxyPriv::AttachStencilIfNeeded(resourceProvider, surface.get(), needsStencil)) {
return nullptr;
}
@@ -162,7 +160,6 @@ void GrSurfaceProxy::assign(sk_sp<GrSurface> surface) {
bool GrSurfaceProxy::instantiateImpl(GrResourceProvider* resourceProvider, int sampleCnt,
bool needsStencil, GrSurfaceFlags flags, GrMipMapped mipMapped,
- SkDestinationSurfaceColorMode mipColorMode,
const GrUniqueKey* uniqueKey) {
SkASSERT(LazyState::kNot == this->lazyInstantiationState());
if (fTarget) {
@@ -173,7 +170,7 @@ bool GrSurfaceProxy::instantiateImpl(GrResourceProvider* resourceProvider, int s
}
sk_sp<GrSurface> surface = this->createSurfaceImpl(resourceProvider, sampleCnt, needsStencil,
- flags, mipMapped, mipColorMode);
+ flags, mipMapped);
if (!surface) {
return false;
}