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

Unified Diff: src/gpu/GrTextureParamsAdjuster.h

Issue 2037413002: Add SkSourceGammaTreatment enum so we know how to create mips (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix DM compilation Created 4 years, 6 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 c02f5b34f7edadce837cb9801586dd4cb89f71c7..5f0f2715beb3046358400aed0bb521a137397260 100644
--- a/src/gpu/GrTextureParamsAdjuster.h
+++ b/src/gpu/GrTextureParamsAdjuster.h
@@ -64,7 +64,8 @@ public:
const SkRect& constraintRect,
FilterConstraint filterConstraint,
bool coordsLimitedToConstraintRect,
- const GrTextureParams::FilterMode* filterOrNullForBicubic) = 0;
+ const GrTextureParams::FilterMode* filterOrNullForBicubic,
+ SkSourceGammaTreatment) = 0;
virtual ~GrTextureProducer() {}
@@ -127,14 +128,16 @@ public:
outOffset will be the top-left corner of the subset if a copy is not made. Otherwise,
the copy will be tight to the contents and outOffset will be (0, 0). If the copy's size
does not match subset's dimensions then the contents are scaled to fit the copy.*/
- GrTexture* refTextureSafeForParams(const GrTextureParams&, SkIPoint* outOffset);
+ GrTexture* refTextureSafeForParams(const GrTextureParams&, SkSourceGammaTreatment,
+ SkIPoint* outOffset);
const GrFragmentProcessor* createFragmentProcessor(
const SkMatrix& textureMatrix,
const SkRect& constraintRect,
FilterConstraint,
bool coordsLimitedToConstraintRect,
- const GrTextureParams::FilterMode* filterOrNullForBicubic) override;
+ const GrTextureParams::FilterMode* filterOrNullForBicubic,
+ SkSourceGammaTreatment) override;
protected:
/** The whole texture is content. */
@@ -167,14 +170,15 @@ public:
/** Returns a texture that is safe for use with the params. If the size of the returned texture
does not match width()/height() then the contents of the original must be scaled to fit
the texture. */
- GrTexture* refTextureForParams(const GrTextureParams&);
+ GrTexture* refTextureForParams(const GrTextureParams&, SkSourceGammaTreatment);
const GrFragmentProcessor* createFragmentProcessor(
const SkMatrix& textureMatrix,
const SkRect& constraintRect,
FilterConstraint filterConstraint,
bool coordsLimitedToConstraintRect,
- const GrTextureParams::FilterMode* filterOrNullForBicubic) override;
+ const GrTextureParams::FilterMode* filterOrNullForBicubic,
+ SkSourceGammaTreatment) override;
protected:
GrTextureMaker(GrContext* context, int width, int height, bool isAlphaOnly)
@@ -185,7 +189,7 @@ protected:
* Return the maker's "original" texture. It is the responsibility of the maker to handle any
* caching of the original if desired.
*/
- virtual GrTexture* refOriginalTexture(bool willBeMipped) = 0;
+ virtual GrTexture* refOriginalTexture(bool willBeMipped, SkSourceGammaTreatment) = 0;
/**
* Return a new (uncached) texture that is the stretch of the maker's original.
@@ -197,7 +201,8 @@ protected:
* Subclass may override this if they can handle creating the texture more directly than
* by copying.
*/
- virtual GrTexture* generateTextureForParams(const CopyParams&, bool willBeMipped);
+ virtual GrTexture* generateTextureForParams(const CopyParams&, bool willBeMipped,
+ SkSourceGammaTreatment);
GrContext* context() const { return fContext; }
« 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