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

Unified Diff: src/gpu/GrCacheID.cpp

Issue 858123002: Add specialized content key class for resources. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove default template arg 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 | « src/effects/SkColorCubeFilter.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrCacheID.cpp
diff --git a/src/gpu/GrCacheID.cpp b/src/gpu/GrCacheID.cpp
deleted file mode 100644
index 8d0be0da5a9ad195f387fde24d00aa4fb04585dc..0000000000000000000000000000000000000000
--- a/src/gpu/GrCacheID.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "GrTypes.h"
-#include "SkThread.h" // for sk_atomic_inc
-
-// Well, the dummy_ "fix" caused a warning on windows, so hiding all of it
-// until we can find a universal fix.
-#if 0
-// This used to be a global scope, but we got a warning about unused variable
-// so we moved it into here. We just want it to compile, so we can test the
-// static asserts.
-static inline void dummy_function_to_avoid_unused_var_warning() {
- GrCacheID::Key kAssertKey;
- GR_STATIC_ASSERT(sizeof(kAssertKey.fData8) == sizeof(kAssertKey.fData32));
- GR_STATIC_ASSERT(sizeof(kAssertKey.fData8) == sizeof(kAssertKey.fData64));
- GR_STATIC_ASSERT(sizeof(kAssertKey.fData8) == sizeof(kAssertKey));
-}
-#endif
-
-GrCacheID::Domain GrCacheID::GenerateDomain() {
- static int32_t gNextDomain = kInvalid_Domain + 1;
-
- int32_t domain = sk_atomic_inc(&gNextDomain);
- if (domain >= 1 << (8 * sizeof(Domain))) {
- SkFAIL("Too many Cache Domains");
- }
-
- return static_cast<Domain>(domain);
-}
« no previous file with comments | « src/effects/SkColorCubeFilter.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698