diff options
author | Brian Osman <brianosman@google.com> | 2016-12-09 14:51:59 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-09 20:31:23 +0000 |
commit | 61624f0c716b576706659750d87b6956f4c15722 (patch) | |
tree | 00122b478cf21327b70364fefc5f3f9a6169377e /include | |
parent | 073285c0595d46205d1482cc19af2d7d891bfeae (diff) |
Plumb dst color space in many places, rather than "mode"
This is less to type in most cases, and gives us more information
(for things like picture-backed images, where we need to know all
about the destination surface).
Additionally, strip out the plumbing entirely for bitmap sources,
where we don't need to know anything.
BUG=skia:
Change-Id: I4deff6c7c345fcf62eb08b2aff0560adae4313da
Reviewed-on: https://skia-review.googlesource.com/5748
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkShader.h | 7 | ||||
-rw-r--r-- | include/gpu/GrRenderTargetContext.h | 4 | ||||
-rw-r--r-- | include/gpu/SkGr.h | 6 |
3 files changed, 4 insertions, 13 deletions
diff --git a/include/core/SkShader.h b/include/core/SkShader.h index cafeedd0d1..6d24c1a73c 100644 --- a/include/core/SkShader.h +++ b/include/core/SkShader.h @@ -342,21 +342,18 @@ public: const SkMatrix* viewMatrix, const SkMatrix* localMatrix, SkFilterQuality filterQuality, - SkColorSpace* dstColorSpace, - SkDestinationSurfaceColorMode colorMode) + SkColorSpace* dstColorSpace) : fContext(context) , fViewMatrix(viewMatrix) , fLocalMatrix(localMatrix) , fFilterQuality(filterQuality) - , fDstColorSpace(dstColorSpace) - , fColorMode(colorMode) {} + , fDstColorSpace(dstColorSpace) {} GrContext* fContext; const SkMatrix* fViewMatrix; const SkMatrix* fLocalMatrix; SkFilterQuality fFilterQuality; SkColorSpace* fDstColorSpace; - SkDestinationSurfaceColorMode fColorMode; }; /** diff --git a/include/gpu/GrRenderTargetContext.h b/include/gpu/GrRenderTargetContext.h index 7ef572abce..3468528f57 100644 --- a/include/gpu/GrRenderTargetContext.h +++ b/include/gpu/GrRenderTargetContext.h @@ -344,10 +344,6 @@ public: GrPixelConfig config() const { return fRenderTargetProxy->config(); } int numColorSamples() const { return fRenderTargetProxy->numColorSamples(); } bool isGammaCorrect() const { return SkToBool(fColorSpace.get()); } - SkDestinationSurfaceColorMode colorMode() const { - return this->isGammaCorrect() ? SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware - : SkDestinationSurfaceColorMode::kLegacy; - } const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } SkColorSpace* getColorSpace() const { return fColorSpace.get(); } GrColorSpaceXform* getColorXformFromSRGB() const { return fColorXformFromSRGB.get(); } diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h index 0e58e72aca..e59720e82d 100644 --- a/include/gpu/SkGr.h +++ b/include/gpu/SkGr.h @@ -79,11 +79,9 @@ static inline GrColor SkPMColorToGrColor(SkPMColor c) { /** Returns a texture representing the bitmap that is compatible with the GrSamplerParams. The texture is inserted into the cache (unless the bitmap is marked volatile) and can be retrieved again via this function. */ -GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrSamplerParams&, - SkDestinationSurfaceColorMode); +GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrSamplerParams&); -sk_sp<GrTexture> GrMakeCachedBitmapTexture(GrContext*, const SkBitmap&, const GrSamplerParams&, - SkDestinationSurfaceColorMode); +sk_sp<GrTexture> GrMakeCachedBitmapTexture(GrContext*, const SkBitmap&, const GrSamplerParams&); // TODO: Move SkImageInfo2GrPixelConfig to SkGrPriv.h (requires cleanup to SkWindow its subclasses). GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType, const SkColorSpace*, |