aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPrimitiveProcessor.cpp
diff options
context:
space:
mode:
authorGravatar wangyix <wangyix@google.com>2015-08-20 07:25:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-20 07:25:02 -0700
commita7f4c435bc1dcd845990a5515828bbe8cccfab41 (patch)
treec50c8943436572a75ad43af56af2e7ee7344ca5c /src/gpu/GrPrimitiveProcessor.cpp
parent87e4752fc1f7b079a65208e4b3543925a35c3e54 (diff)
For a frag proc, its key will be a concatenation of all its descendant procs' keys in postorder traversal.
Diffstat (limited to 'src/gpu/GrPrimitiveProcessor.cpp')
-rw-r--r--src/gpu/GrPrimitiveProcessor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/GrPrimitiveProcessor.cpp b/src/gpu/GrPrimitiveProcessor.cpp
index 673656821b..180217e261 100644
--- a/src/gpu/GrPrimitiveProcessor.cpp
+++ b/src/gpu/GrPrimitiveProcessor.cpp
@@ -37,9 +37,10 @@ enum MatrixType {
};
uint32_t
-GrPrimitiveProcessor::getTransformKey(const SkTArray<const GrCoordTransform*, true>& coords) const {
+GrPrimitiveProcessor::getTransformKey(const SkTArray<const GrCoordTransform*, true>& coords,
+ int numCoords) const {
uint32_t totalKey = 0;
- for (int t = 0; t < coords.count(); ++t) {
+ for (int t = 0; t < numCoords; ++t) {
uint32_t key = 0;
const GrCoordTransform* coordTransform = coords[t];
if (coordTransform->getMatrix().hasPerspective()) {