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

Unified Diff: src/core/SkImageCacherator.h

Issue 1463373002: scaling API on SkPixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/core/SkBitmapProvider.cpp ('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 48a281418684902c30b8cec7df156c5180fbe0db..5ba5422181fb332c27bdd753c1097450eca54023 100644
--- a/src/core/SkImageCacherator.h
+++ b/src/core/SkImageCacherator.h
@@ -36,7 +36,8 @@ public:
* If not NULL, the client will be notified (->notifyAddedToCache()) when resources are
* added to the cache on its behalf.
*/
- bool lockAsBitmap(SkBitmap*, const SkImage* client);
+ bool lockAsBitmap(SkBitmap*, const SkImage* client,
+ SkImage::CachingHint = SkImage::kAllow_CachingHint);
/**
* Returns a ref() on the texture produced by this generator. The caller must call unref()
@@ -47,7 +48,8 @@ public:
*
* The caller is responsible for calling texture->unref() when they are done.
*/
- GrTexture* lockAsTexture(GrContext*, const GrTextureParams&, const SkImage* client);
+ GrTexture* lockAsTexture(GrContext*, const GrTextureParams&, const SkImage* client,
+ SkImage::CachingHint = SkImage::kAllow_CachingHint);
/**
* If the underlying src naturally is represented by an encoded blob (in SkData), this returns
@@ -59,11 +61,12 @@ private:
SkImageCacherator(SkImageGenerator*, const SkImageInfo&, const SkIPoint&, uint32_t uniqueID);
bool generateBitmap(SkBitmap*);
- bool tryLockAsBitmap(SkBitmap*, const SkImage*);
+ bool tryLockAsBitmap(SkBitmap*, const SkImage*, SkImage::CachingHint);
#if SK_SUPPORT_GPU
// 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);
+ GrTexture* lockTexture(GrContext*, const GrUniqueKey& key, const SkImage* client,
+ SkImage::CachingHint);
#endif
class ScopedGenerator {
« no previous file with comments | « src/core/SkBitmapProvider.cpp ('k') | src/core/SkImageCacherator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698