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

Unified Diff: src/gpu/GrImageIDTextureAdjuster.h

Issue 2241353002: pin as texture api (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use refPinnedTexture in GpuDevice Created 4 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
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/gpu/GrImageIDTextureAdjuster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. */
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/gpu/GrImageIDTextureAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698