diff options
author | Brian Osman <brianosman@google.com> | 2018-06-14 09:14:03 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-14 13:40:27 +0000 |
commit | 861ea5b7b24ed272a76aa27b3d6fd3fb18c4e8cc (patch) | |
tree | fb665086ae1dec43ce239024f40699a9af2c3431 /src/gpu | |
parent | 8760e2f42857b3a59c203212ffdc2b5a6cdcb72c (diff) |
Remove const from (immutable) SkColorSpace args to some functions
Another piece of https://skia-review.googlesource.com/c/skia/+/132090
that I'd like to land separately.
Change-Id: I64d8968cf7e0fb0d288eca71c79d361410c924b8
Reviewed-on: https://skia-review.googlesource.com/134782
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrColorSpaceXform.cpp | 10 | ||||
-rw-r--r-- | src/gpu/GrColorSpaceXform.h | 13 | ||||
-rw-r--r-- | src/gpu/GrYUVProvider.cpp | 4 | ||||
-rw-r--r-- | src/gpu/GrYUVProvider.h | 4 | ||||
-rw-r--r-- | src/gpu/effects/GrNonlinearColorSpaceXformEffect.cpp | 4 | ||||
-rw-r--r-- | src/gpu/effects/GrNonlinearColorSpaceXformEffect.h | 3 |
6 files changed, 16 insertions, 22 deletions
diff --git a/src/gpu/GrColorSpaceXform.cpp b/src/gpu/GrColorSpaceXform.cpp index 66158daf30..84c6bdba0e 100644 --- a/src/gpu/GrColorSpaceXform.cpp +++ b/src/gpu/GrColorSpaceXform.cpp @@ -62,9 +62,8 @@ GrColorSpaceXform::GrColorSpaceXform(const SkColorSpaceTransferFn& srcTransferFn static SkSpinlock gColorSpaceXformCacheSpinlock; -sk_sp<GrColorSpaceXform> GrColorSpaceXform::Make(const SkColorSpace* src, - GrPixelConfig srcConfig, - const SkColorSpace* dst) { +sk_sp<GrColorSpaceXform> GrColorSpaceXform::Make(SkColorSpace* src, GrPixelConfig srcConfig, + SkColorSpace* dst) { if (!dst) { // No transformation is performed in legacy mode return nullptr; @@ -291,9 +290,8 @@ GrFragmentProcessor::OptimizationFlags GrColorSpaceXformEffect::OptFlags( std::unique_ptr<GrFragmentProcessor> GrColorSpaceXformEffect::Make( std::unique_ptr<GrFragmentProcessor> child, - const SkColorSpace* src, - GrPixelConfig srcConfig, - const SkColorSpace* dst) { + SkColorSpace* src, GrPixelConfig srcConfig, + SkColorSpace* dst) { if (!child) { return nullptr; } diff --git a/src/gpu/GrColorSpaceXform.h b/src/gpu/GrColorSpaceXform.h index f63b1660f3..b3e0587eca 100644 --- a/src/gpu/GrColorSpaceXform.h +++ b/src/gpu/GrColorSpaceXform.h @@ -21,11 +21,9 @@ class GrColorSpaceXform : public SkRefCnt { public: GrColorSpaceXform(const SkColorSpaceTransferFn&, const SkMatrix44&, uint32_t); - static sk_sp<GrColorSpaceXform> Make(const SkColorSpace* src, - GrPixelConfig srcConfig, - const SkColorSpace* dst); - static sk_sp<GrColorSpaceXform> MakeGamutXform(const SkColorSpace* src, - const SkColorSpace* dst) { + static sk_sp<GrColorSpaceXform> Make(SkColorSpace* src, GrPixelConfig srcConfig, + SkColorSpace* dst); + static sk_sp<GrColorSpaceXform> MakeGamutXform(SkColorSpace* src, SkColorSpace* dst) { auto result = Make(src, kUnknown_GrPixelConfig, dst); SkASSERT(!result || 0 == (result->fFlags & ~kApplyGamutXform_Flag)); return result; @@ -78,9 +76,8 @@ public: * the color space of the output from src to dst. */ static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> child, - const SkColorSpace* src, - GrPixelConfig srcConfig, - const SkColorSpace* dst); + SkColorSpace* src, GrPixelConfig srcConfig, + SkColorSpace* dst); const char* name() const override { return "ColorSpaceXform"; } std::unique_ptr<GrFragmentProcessor> clone() const override; diff --git a/src/gpu/GrYUVProvider.cpp b/src/gpu/GrYUVProvider.cpp index 9d19b4085f..65dd46d71a 100644 --- a/src/gpu/GrYUVProvider.cpp +++ b/src/gpu/GrYUVProvider.cpp @@ -68,8 +68,8 @@ void GrYUVProvider::YUVGen_DataReleaseProc(const void*, void* data) { } sk_sp<GrTextureProxy> GrYUVProvider::refAsTextureProxy(GrContext* ctx, const GrSurfaceDesc& desc, - const SkColorSpace* srcColorSpace, - const SkColorSpace* dstColorSpace) { + SkColorSpace* srcColorSpace, + SkColorSpace* dstColorSpace) { SkYUVPlanesCache::Info yuvInfo; void* planes[3]; diff --git a/src/gpu/GrYUVProvider.h b/src/gpu/GrYUVProvider.h index daaa07f906..42a823ae8e 100644 --- a/src/gpu/GrYUVProvider.h +++ b/src/gpu/GrYUVProvider.h @@ -39,8 +39,8 @@ public: * On failure (e.g. the provider had no data), this returns NULL. */ sk_sp<GrTextureProxy> refAsTextureProxy(GrContext*, const GrSurfaceDesc&, - const SkColorSpace* srcColorSpace, - const SkColorSpace* dstColorSpace); + SkColorSpace* srcColorSpace, + SkColorSpace* dstColorSpace); virtual uint32_t onGetID() = 0; diff --git a/src/gpu/effects/GrNonlinearColorSpaceXformEffect.cpp b/src/gpu/effects/GrNonlinearColorSpaceXformEffect.cpp index d5a4cd63dd..5471f563fb 100644 --- a/src/gpu/effects/GrNonlinearColorSpaceXformEffect.cpp +++ b/src/gpu/effects/GrNonlinearColorSpaceXformEffect.cpp @@ -218,8 +218,8 @@ GrGLSLFragmentProcessor* GrNonlinearColorSpaceXformEffect::onCreateGLSLInstance( return new GrGLNonlinearColorSpaceXformEffect(); } -std::unique_ptr<GrFragmentProcessor> GrNonlinearColorSpaceXformEffect::Make( - const SkColorSpace* src, const SkColorSpace* dst) { +std::unique_ptr<GrFragmentProcessor> GrNonlinearColorSpaceXformEffect::Make(SkColorSpace* src, + SkColorSpace* dst) { if (!src || !dst || SkColorSpace::Equals(src, dst)) { // No conversion possible (or necessary) return nullptr; diff --git a/src/gpu/effects/GrNonlinearColorSpaceXformEffect.h b/src/gpu/effects/GrNonlinearColorSpaceXformEffect.h index 109ec10d89..6dfb778071 100644 --- a/src/gpu/effects/GrNonlinearColorSpaceXformEffect.h +++ b/src/gpu/effects/GrNonlinearColorSpaceXformEffect.h @@ -27,8 +27,7 @@ public: * This will return nullptr if either space is nullptr, if both spaces are equal, or if either * space has a non-parametric transfer funcion (e.g. lookup table or A2B). */ - static std::unique_ptr<GrFragmentProcessor> Make(const SkColorSpace* src, - const SkColorSpace* dst); + static std::unique_ptr<GrFragmentProcessor> Make(SkColorSpace* src, SkColorSpace* dst); const char* name() const override { return "NonlinearColorSpaceXform"; } |