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

Unified Diff: src/gpu/GrLayerCache.cpp

Issue 225283014: Convert SkPicture's generation ID to a unique ID (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 8 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/gpu/GrLayerCache.h ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrLayerCache.cpp
===================================================================
--- src/gpu/GrLayerCache.cpp (revision 14074)
+++ src/gpu/GrLayerCache.cpp (working copy)
@@ -69,16 +69,16 @@
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);
}
« no previous file with comments | « src/gpu/GrLayerCache.h ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698