aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/effects/GrTextureStripAtlas.cpp2
-rw-r--r--src/gpu/effects/GrTextureStripAtlas.h8
2 files changed, 4 insertions, 6 deletions
diff --git a/src/gpu/effects/GrTextureStripAtlas.cpp b/src/gpu/effects/GrTextureStripAtlas.cpp
index 09c67bd828..1a8a93b90a 100644
--- a/src/gpu/effects/GrTextureStripAtlas.cpp
+++ b/src/gpu/effects/GrTextureStripAtlas.cpp
@@ -59,7 +59,7 @@ GrTextureStripAtlas* GrTextureStripAtlas::GetAtlas(const GrTextureStripAtlas::De
}
GrTextureStripAtlas::GrTextureStripAtlas(GrTextureStripAtlas::Desc desc)
- : fCacheID(kCacheDomain + sk_atomic_inc(&gCacheCount))
+ : fCacheID(sk_atomic_inc(&gCacheCount))
, fLockedRows(0)
, fDesc(desc)
, fNumRows(desc.fHeight / desc.fRowHeight)
diff --git a/src/gpu/effects/GrTextureStripAtlas.h b/src/gpu/effects/GrTextureStripAtlas.h
index 10b50c0189..22e2e4765c 100644
--- a/src/gpu/effects/GrTextureStripAtlas.h
+++ b/src/gpu/effects/GrTextureStripAtlas.h
@@ -129,13 +129,11 @@ private:
void validate();
#endif
- // We increment fCacheCount for each atlas, kCacheDomain is just an arbitrary number we add to
- // it in hopes of preventing collisions (this is only until resource domains get worked out).
+ // We increment gCacheCount for each atlas
static int32_t gCacheCount;
- static const uint64_t kCacheDomain = 0xfffffffffffffff0;
- // A unique ID for this texture (formed with: kCacheDomain + gCacheCount++), so we can be sure
- // that if we get a texture back from the texture cache, that it's the same one we last used.
+ // A unique ID for this texture (formed with: gCacheCount++), so we can be sure that if we
+ // get a texture back from the texture cache, that it's the same one we last used.
const uint64_t fCacheID;
// Total locks on all rows (when this reaches zero, we can unlock our texture)