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

Unified Diff: src/core/SkImageCacherator.h

Issue 1409163002: Rewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object a say in what… (Closed) Base URL: https://skia.googlesource.com/skia.git@move
Patch Set: tidy Created 5 years, 2 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 | « include/gpu/SkGr.h ('k') | src/core/SkImageCacherator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageCacherator.h
diff --git a/src/core/SkImageCacherator.h b/src/core/SkImageCacherator.h
index 7508f34fe7d1530fa310ba0be61956ff159ac486..ac112d78cb679c519953e49563c3e2f63556a59e 100644
--- a/src/core/SkImageCacherator.h
+++ b/src/core/SkImageCacherator.h
@@ -13,7 +13,8 @@
#include "SkTemplates.h"
class GrContext;
-class GrTextureParams;
+class GrTextureParams;
+class GrUniqueKey;
class SkBitmap;
class SkImage;
@@ -60,7 +61,9 @@ private:
bool generateBitmap(SkBitmap*);
bool tryLockAsBitmap(SkBitmap*, const SkImage*);
#if SK_SUPPORT_GPU
- GrTexture* lockUnstretchedTexture(GrContext*, const SkImage* client);
+ // Returns the texture. If the cacherator is generating the texture and wants to cache it,
+ // it should use the passed in key (if the key is valid).
+ GrTexture* lockTexture(GrContext*, const GrUniqueKey& key, const SkImage* client);
#endif
class ScopedGenerator {
@@ -83,7 +86,7 @@ private:
const SkIPoint fOrigin;
const uint32_t fUniqueID;
- friend class Cacherator_GrTextureMaker;
+ friend class Cacherator_GrTextureParamsAdjuster;
};
#endif
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/core/SkImageCacherator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698