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

Unified Diff: src/gpu/GrTextureParamsAdjuster.h

Issue 2250403003: Add alpha type to texture producer (Closed) Base URL: https://skia.googlesource.com/skia.git@image-alpha-type
Patch Set: 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/gpu/GrImageIDTextureAdjuster.cpp ('k') | src/gpu/GrTextureParamsAdjuster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextureParamsAdjuster.h
diff --git a/src/gpu/GrTextureParamsAdjuster.h b/src/gpu/GrTextureParamsAdjuster.h
index 879c6605f8e7d880cd4d75f06a5708aca51f557c..3de4db7441c4523939493de54b726dbd78fbe61c 100644
--- a/src/gpu/GrTextureParamsAdjuster.h
+++ b/src/gpu/GrTextureParamsAdjuster.h
@@ -73,6 +73,7 @@ public:
int width() const { return fWidth; }
int height() const { return fHeight; }
bool isAlphaOnly() const { return fIsAlphaOnly; }
+ virtual SkAlphaType alphaType() const = 0;
virtual SkColorSpace* getColorSpace() = 0;
protected:
@@ -144,9 +145,11 @@ public:
// We do not ref the texture nor the colorspace, so the caller must keep them in scope while
// this Adjuster is alive.
- GrTextureAdjuster(GrTexture*, const SkIRect& area, uint32_t uniqueID, SkColorSpace*);
+ GrTextureAdjuster(GrTexture*, SkAlphaType, const SkIRect& area, uint32_t uniqueID,
+ SkColorSpace*);
protected:
+ SkAlphaType alphaType() const override { return fAlphaType; }
SkColorSpace* getColorSpace() override;
void makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) override;
void didCacheCopy(const GrUniqueKey& copyKey) override;
@@ -159,6 +162,7 @@ protected:
private:
SkTLazy<SkIRect> fContentArea;
GrTexture* fOriginal;
+ SkAlphaType fAlphaType;
SkColorSpace* fColorSpace;
uint32_t fUniqueID;
« no previous file with comments | « src/gpu/GrImageIDTextureAdjuster.cpp ('k') | src/gpu/GrTextureParamsAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698