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

Unified Diff: src/gpu/GrLayerCache.cpp

Issue 609403003: Move offset and CTM from LayerCache Key to per-hoisted-layer info (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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') | src/gpu/GrLayerHoister.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrLayerCache.cpp
diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp
index 11a97e4c666e1a56f1291f451be7f687a2ac0f0b..6ec07580c85485dfe98ceb52ad10af8a907aed09 100644
--- a/src/gpu/GrLayerCache.cpp
+++ b/src/gpu/GrLayerCache.cpp
@@ -14,7 +14,7 @@ DECLARE_SKMESSAGEBUS_MESSAGE(GrPictureDeletedMessage);
#ifdef SK_DEBUG
void GrCachedLayer::validate(const GrTexture* backingTexture) const {
SkASSERT(SK_InvalidGenID != fKey.pictureID());
- SkASSERT(fKey.start() > 0 && fKey.stop() > 0);
+ SkASSERT(fKey.start() > 0);
if (fTexture) {
@@ -119,33 +119,30 @@ void GrLayerCache::freeAll() {
GrCachedLayer* GrLayerCache::createLayer(uint32_t pictureID,
int start, int stop,
- const SkIPoint& offset,
const SkMatrix& ctm,
const SkPaint* paint) {
SkASSERT(pictureID != SK_InvalidGenID && start > 0 && stop > 0);
- GrCachedLayer* layer = SkNEW_ARGS(GrCachedLayer, (pictureID, start, stop, offset, ctm, paint));
+ GrCachedLayer* layer = SkNEW_ARGS(GrCachedLayer, (pictureID, start, stop, ctm, paint));
fLayerHash.add(layer);
return layer;
}
GrCachedLayer* GrLayerCache::findLayer(uint32_t pictureID,
- int start, int stop,
- const SkIPoint& offset,
+ int start,
const SkMatrix& ctm) {
- SkASSERT(pictureID != SK_InvalidGenID && start > 0 && stop > 0);
- return fLayerHash.find(GrCachedLayer::Key(pictureID, start, stop, offset, ctm));
+ SkASSERT(pictureID != SK_InvalidGenID && start > 0);
+ return fLayerHash.find(GrCachedLayer::Key(pictureID, start, ctm));
}
GrCachedLayer* GrLayerCache::findLayerOrCreate(uint32_t pictureID,
int start, int stop,
- const SkIPoint& offset,
const SkMatrix& ctm,
const SkPaint* paint) {
SkASSERT(pictureID != SK_InvalidGenID && start > 0 && stop > 0);
- GrCachedLayer* layer = fLayerHash.find(GrCachedLayer::Key(pictureID, start, stop, offset, ctm));
+ GrCachedLayer* layer = fLayerHash.find(GrCachedLayer::Key(pictureID, start, ctm));
if (NULL == layer) {
- layer = this->createLayer(pictureID, start, stop, offset, ctm, paint);
+ layer = this->createLayer(pictureID, start, stop, ctm, paint);
}
return layer;
« no previous file with comments | « src/gpu/GrLayerCache.h ('k') | src/gpu/GrLayerHoister.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698