diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-07 18:26:22 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-07 18:26:22 +0000 |
commit | 2b4e370a2fe00168838e43f5a78ccc3b371609f5 (patch) | |
tree | b4a5b60609c6d24f01f575a4f97ca98dd2897c73 /src/gpu | |
parent | c96268d792e8807e0f5ba71fc70caa9f0357edf3 (diff) |
Convert SkPicture's generation ID to a unique ID
This CL addresses linger code review comments on r14037 (Add generation ID to SkPicture https://codereview.chromium.org/222683002/)
R=reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/225283014
git-svn-id: http://skia.googlecode.com/svn/trunk@14079 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrLayerCache.cpp | 10 | ||||
-rw-r--r-- | src/gpu/GrLayerCache.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp index 12da5893a3..9305d1a2dd 100644 --- a/src/gpu/GrLayerCache.cpp +++ b/src/gpu/GrLayerCache.cpp @@ -69,16 +69,16 @@ void GrLayerCache::freeAll() { GrAtlasedLayer* GrLayerCache::createLayer(SkPicture* picture, int layerID) { GrAtlasedLayer* layer = fLayerPool.alloc(); - SkASSERT(picture->getGenerationID() != SkPicture::kInvalidGenID); - layer->init(picture->getGenerationID(), layerID); - fLayerHash.insert(PictureLayerKey(picture->getGenerationID(), layerID), layer); + SkASSERT(picture->uniqueID() != SK_InvalidGenID); + layer->init(picture->uniqueID(), layerID); + fLayerHash.insert(PictureLayerKey(picture->uniqueID(), layerID), layer); return layer; } const GrAtlasedLayer* GrLayerCache::findLayerOrCreate(SkPicture* picture, int layerID) { - SkASSERT(picture->getGenerationID() != SkPicture::kInvalidGenID); - GrAtlasedLayer* layer = fLayerHash.find(PictureLayerKey(picture->getGenerationID(), layerID)); + SkASSERT(picture->uniqueID() != SK_InvalidGenID); + GrAtlasedLayer* layer = fLayerHash.find(PictureLayerKey(picture->uniqueID(), layerID)); if (NULL == layer) { layer = this->createLayer(picture, layerID); } diff --git a/src/gpu/GrLayerCache.h b/src/gpu/GrLayerCache.h index eef20ff23e..0624736338 100644 --- a/src/gpu/GrLayerCache.h +++ b/src/gpu/GrLayerCache.h @@ -47,7 +47,7 @@ private: // It is roughly equivalent to a GrGlyph in the font caching system class GrAtlasedLayer { public: - GrAtlasedLayer() : fPictureID(SkPicture::kInvalidGenID) { } + GrAtlasedLayer() : fPictureID(SK_InvalidGenID) { } uint32_t pictureID() const { return fPictureID; } int layerID() const { return fLayerID; } |