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

Unified Diff: src/gpu/GrResourceCache2.cpp

Issue 833913002: Cast the scratch resource key in order to fix a warning (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comment 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..0a6705a5c4dd13b4bce1a7779c0ab1e6f649483b 100644
--- a/src/gpu/GrResourceCache2.cpp
+++ b/src/gpu/GrResourceCache2.cpp
@@ -21,12 +21,12 @@ DECLARE_SKMESSAGEBUS_MESSAGE(GrResourceInvalidatedMessage);
GrScratchKey::ResourceType GrScratchKey::GenerateResourceType() {
static int32_t gType = kInvalidResourceType + 1;
- int32_t type = sk_atomic_inc(&gType);
+ ResourceType type = static_cast<ResourceType>(sk_atomic_inc(&gType));
if (kInvalidResourceType == type) {
SkFAIL("Too many Resource Types");
}
- return static_cast<ResourceType>(type);
+ return type;
}
« 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