diff options
author | 2016-07-25 05:12:53 -0700 | |
---|---|---|
committer | 2016-07-25 05:12:53 -0700 | |
commit | 1638c0deea80e4a580fe43babeb04279dd163e98 (patch) | |
tree | 3397b189513a586c7187434a6edc113a78037059 /src/gpu/SkGrPriv.h | |
parent | b560b5c8c03fe1b9b1b8a90c546481b8db7f043e (diff) |
Add destination color space to AsFPArgs. Eliminates last XFORMTODO.
This is going to be needed in many more places as I finish connecting the
dots. Even better - I'd like to switch to a world where SkColorSpace !=
nullptr is the only signal we use for gamma-correct rendering, so I can
eliminate SkSourceGammaTreatment and SkSurfaceProps::isGammaCorrect.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2180503002
Review-Url: https://codereview.chromium.org/2180503002
Diffstat (limited to 'src/gpu/SkGrPriv.h')
-rw-r--r-- | src/gpu/SkGrPriv.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gpu/SkGrPriv.h b/src/gpu/SkGrPriv.h index 7188856ce8..ad1e88a1e0 100644 --- a/src/gpu/SkGrPriv.h +++ b/src/gpu/SkGrPriv.h @@ -49,12 +49,14 @@ bool SkPaintToGrPaint(GrContext*, const SkPaint& skPaint, const SkMatrix& viewM, bool allowSRGBInputs, + SkColorSpace* dstColorSpace, GrPaint* grPaint); /** Same as above but ignores the SkShader (if any) on skPaint. */ bool SkPaintToGrPaintNoShader(GrContext* context, const SkPaint& skPaint, bool allowSRGBInputs, + SkColorSpace* dstColorSpace, GrPaint* grPaint); /** Replaces the SkShader (if any) on skPaint with the passed in GrFragmentProcessor. The processor @@ -64,6 +66,7 @@ bool SkPaintToGrPaintReplaceShader(GrContext*, const SkPaint& skPaint, sk_sp<GrFragmentProcessor> shaderFP, bool allowSRGBInputs, + SkColorSpace* dstColorSpace, GrPaint* grPaint); /** Blends the SkPaint's shader (or color if no shader) with the color which specified via a @@ -76,6 +79,7 @@ bool SkPaintToGrPaintWithXfermode(GrContext* context, SkXfermode::Mode primColorMode, bool primitiveIsSrc, bool allowSRGBInputs, + SkColorSpace* dstColorSpace, GrPaint* grPaint); /** This is used when there is a primitive color, but the shader should be ignored. Currently, @@ -83,9 +87,10 @@ bool SkPaintToGrPaintWithXfermode(GrContext* context, unpremultiplied so that interpolation is done in unpremul space. The paint's alpha will be applied to the primitive color after interpolation. */ inline bool SkPaintToGrPaintWithPrimitiveColor(GrContext* context, const SkPaint& skPaint, - bool allowSRGBInputs, GrPaint* grPaint) { + bool allowSRGBInputs, SkColorSpace* dstColorSpace, + GrPaint* grPaint) { return SkPaintToGrPaintWithXfermode(context, skPaint, SkMatrix::I(), SkXfermode::kDst_Mode, - false, allowSRGBInputs, grPaint); + false, allowSRGBInputs, dstColorSpace, grPaint); } /** This is used when there may or may not be a shader, and the caller wants to plugin a texture @@ -96,6 +101,7 @@ bool SkPaintToGrPaintWithTexture(GrContext* context, sk_sp<GrFragmentProcessor> fp, bool textureIsAlphaOnly, bool allowSRGBInputs, + SkColorSpace* dstColorSpace, GrPaint* grPaint); ////////////////////////////////////////////////////////////////////////////// |