From f61c7463a945ebc891e2eead79051e4411bbeb57 Mon Sep 17 00:00:00 2001 From: "rileya@google.com" Date: Mon, 13 Aug 2012 21:03:39 +0000 Subject: Mac 10.6 build fix: got rid of now-unecessary GrTextureStripAtlas tex cache id component. Unreviewed. git-svn-id: http://skia.googlecode.com/svn/trunk@5071 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/effects/GrTextureStripAtlas.cpp | 2 +- src/gpu/effects/GrTextureStripAtlas.h | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/gpu/effects') 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) -- cgit v1.2.3