aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrTextureOp.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-11-30 11:30:48 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-01 20:25:39 +0000
commitbbf05759dedafcc924fe2247f2cbdd30688a3bfe (patch)
treeee238fc8b75f0c1f0f67455d4c5c483ca0adfd82 /src/gpu/ops/GrTextureOp.cpp
parent096074af2c6fcbf622f0a42b2f7c56d0c66fbd80 (diff)
Reland "Set multitexturing threshold for NVIDIA"
This is a reland of b4ec10431818200a41a082cfe2e82fe58a9b1ecc Original change's description: > Set multitexturing threshold for NVIDIA > > Change-Id: Ie992b34b8fdd3bf569241cce7c851880258f05df > Reviewed-on: https://skia-review.googlesource.com/78261 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> Change-Id: I13254698530e6f7b13f632a4a7b034ea6aef130f Reviewed-on: https://skia-review.googlesource.com/79262 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/ops/GrTextureOp.cpp')
-rw-r--r--src/gpu/ops/GrTextureOp.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp
index be37bd303d..f9600e5d44 100644
--- a/src/gpu/ops/GrTextureOp.cpp
+++ b/src/gpu/ops/GrTextureOp.cpp
@@ -488,6 +488,11 @@ __attribute__((no_sanitize("float-cast-overflow")))
fDraws[i].fTextureIdx = map[fDraws[i].fTextureIdx];
}
} else {
+ // We can get here when one of the ops is already multitextured but the other cannot
+ // be because of the dst rect size.
+ if (fProxyCnt > 1 || that->fProxyCnt > 1) {
+ return false;
+ }
if (fProxy0->uniqueID() != that->fProxy0->uniqueID() || fFilter0 != that->fFilter0) {
return false;
}
@@ -580,13 +585,13 @@ __attribute__((no_sanitize("float-cast-overflow")))
GrTextureProxy* fProxy0;
GrTextureProxy** fProxyArray;
};
+ size_t fMaxApproxDstPixelArea;
// The next four members should pack.
GrSamplerState::Filter fFilter0;
uint8_t fProxyCnt;
// Used to track whether fProxy is ref'ed or has a pending IO after finalize() is called.
uint8_t fFinalized;
uint8_t fAllowSRGBInputs;
- size_t fMaxApproxDstPixelArea;
typedef GrMeshDrawOp INHERITED;
};