Index: src/gpu/GrImageIDTextureAdjuster.h |
diff --git a/src/gpu/GrImageIDTextureAdjuster.h b/src/gpu/GrImageIDTextureAdjuster.h |
index 6092fcf7bd544cdbbeacb4a1dbd6c0f9f5321f7d..2eb5c55a3a8b3149d47ed9c9cb9c6a570450b51f 100644 |
--- a/src/gpu/GrImageIDTextureAdjuster.h |
+++ b/src/gpu/GrImageIDTextureAdjuster.h |
@@ -15,25 +15,32 @@ class SkBitmap; |
class SkImage_Base; |
class SkImageCacherator; |
-/** Implementation for texture-backed SkImages. The image must stay in scope and unmodified while |
- this object exists. */ |
-class GrImageTextureAdjuster : public GrTextureAdjuster { |
+/** Implementation for texture-backed SkImages. The texture/image must stay in scope and |
+ * unmodified while this object exists. |
+ */ |
+class GrRawTextureAdjuster : public GrTextureAdjuster { |
public: |
- explicit GrImageTextureAdjuster(const SkImage_Base* img); |
+ GrRawTextureAdjuster(GrTexture*, const SkISize& size, uint32_t uniqueID, SkColorSpace*); |
protected: |
SkColorSpace* getColorSpace() override; |
private: |
void makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) override; |
- |
void didCacheCopy(const GrUniqueKey& copyKey) override; |
- const SkImage_Base* fImageBase; |
+ SkColorSpace* fColorSpace; |
+ SkISize fSize; |
+ uint32_t fUniqueID; |
typedef GrTextureAdjuster INHERITED; |
}; |
+class GrImageTextureAdjuster : public GrRawTextureAdjuster { |
bsalomon
2016/08/15 19:10:39
I wonder if we should make GrTextureAdjuster a fin
reed1
2016/08/16 16:41:33
Done.
|
+public: |
+ explicit GrImageTextureAdjuster(const SkImage_Base* img); |
+}; |
+ |
/** This class manages the conversion of SW-backed bitmaps to GrTextures. If the input bitmap is |
non-volatile the texture is cached using a key created from the pixels' image id and the |
subset of the pixelref specified by the bitmap. */ |