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

Unified Diff: src/core/SkImageCacherator.h

Issue 1301633002: Add subsets to SkImageGenerator and SkImageCacherator . (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix release-build warning Created 5 years, 4 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
Index: src/core/SkImageCacherator.h
diff --git a/src/core/SkImageCacherator.h b/src/core/SkImageCacherator.h
index 2403a50a04497da60354e604b65325af5f094ac0..f05147e5710be6f45da800d3c12248e6854d1fc2 100644
--- a/src/core/SkImageCacherator.h
+++ b/src/core/SkImageCacherator.h
@@ -19,12 +19,12 @@ class SkBitmap;
class SkImageCacherator {
public:
// Takes ownership of the generator
- static SkImageCacherator* NewFromGenerator(SkImageGenerator*);
+ static SkImageCacherator* NewFromGenerator(SkImageGenerator*, const SkIRect* subset = nullptr);
~SkImageCacherator();
- const SkImageInfo& info() const { return fGenerator->getInfo(); }
- SkImageGenerator* generator() const { return fGenerator; }
+ const SkImageInfo& info() const { return fInfo; }
+ uint32_t uniqueID() const { return fUniqueID; }
/**
* On success (true), bitmap will point to the pixels for this generator. If this returns
@@ -41,12 +41,15 @@ public:
GrTexture* lockAsTexture(GrContext*, SkImageUsageType);
private:
- SkImageCacherator(SkImageGenerator* gen);
+ SkImageCacherator(SkImageGenerator*, const SkImageInfo&, const SkIPoint&, uint32_t uniqueID);
bool tryLockAsBitmap(SkBitmap*);
GrTexture* tryLockAsTexture(GrContext*, SkImageUsageType);
- SkImageGenerator* fGenerator;
+ SkImageGenerator* fGenerator;
+ const SkImageInfo fInfo;
+ const SkIPoint fOrigin;
+ const uint32_t fUniqueID;
};
#endif

Powered by Google App Engine
This is Rietveld 408576698