Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: src/gpu/GrResourceCache2.cpp

Issue 827923006: Cap id size returned by GrScratchKey::GenerateResourceType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698