Index: src/gpu/GrResourceCache2.cpp |
diff --git a/src/gpu/GrResourceCache2.cpp b/src/gpu/GrResourceCache2.cpp |
index ccfe382733fa94383c09bd48da8cef75bfe5a86b..1db96ec1cce8352ee468d95372b76b3df287576d 100644 |
--- a/src/gpu/GrResourceCache2.cpp |
+++ b/src/gpu/GrResourceCache2.cpp |
@@ -22,7 +22,7 @@ GrScratchKey::ResourceType GrScratchKey::GenerateResourceType() { |
static int32_t gType = kInvalidResourceType + 1; |
int32_t type = sk_atomic_inc(&gType); |
- if (kInvalidResourceType == type) { |
+ if (type > SK_MaxU16) { |
SkFAIL("Too many Resource Types"); |
} |