aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProxyProvider.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-04-16 11:24:10 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-16 17:05:20 +0000
commite3204864899651a132d3387422d7fd599c21b3ac (patch)
treedcc19da5c650a435de56317f73044eb03b82a3c4 /src/gpu/GrProxyProvider.cpp
parent45c92203ef43d09ca6444430bd4081ac97b71237 (diff)
Don't allow ganesh to allocate mip maps for wrapped textures.
We will not allocate new mips on a wrapped texture but we will use mips if the wrapped texture already has one. If we need mips for a draw this will trigger a copy to occur. Also some cleanup up of our InternalSurfaceFlags in general. Bug: skia:7806 Change-Id: I7aa666478cc91bba6e0644b323825fcc9b49793a Reviewed-on: https://skia-review.googlesource.com/121348 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrProxyProvider.cpp')
-rw-r--r--src/gpu/GrProxyProvider.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index a4b8d61cf3..49e57df35b 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -552,7 +552,6 @@ sk_sp<GrTextureProxy> GrProxyProvider::createLazyProxy(LazyInstantiateCallback&&
return nullptr;
}
- surfaceFlags |= GrInternalSurfaceFlags::kNoPendingIO;
#ifdef SK_DEBUG
if (SkToBool(kRenderTarget_GrSurfaceFlag & desc.fFlags)) {
@@ -585,7 +584,6 @@ sk_sp<GrRenderTargetProxy> GrProxyProvider::createLazyRenderTargetProxy(
}
SkASSERT(SkToBool(kRenderTarget_GrSurfaceFlag & desc.fFlags));
- surfaceFlags |= GrInternalSurfaceFlags::kNoPendingIO;
#ifdef SK_DEBUG
if (SkToBool(surfaceFlags & GrInternalSurfaceFlags::kMixedSampled)) {
@@ -616,7 +614,7 @@ sk_sp<GrTextureProxy> GrProxyProvider::createFullyLazyProxy(LazyInstantiateCallb
GrSurfaceOrigin origin,
GrPixelConfig config) {
GrSurfaceDesc desc;
- GrInternalSurfaceFlags surfaceFlags = GrInternalSurfaceFlags::kNone;
+ GrInternalSurfaceFlags surfaceFlags = GrInternalSurfaceFlags::kNoPendingIO;
if (Renderable::kYes == renderable) {
desc.fFlags = kRenderTarget_GrSurfaceFlag;
if (fCaps->maxWindowRectangles() > 0) {