aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/GrColorSpaceXform.cpp10
-rw-r--r--src/gpu/GrColorSpaceXform.h13
-rw-r--r--src/gpu/GrYUVProvider.cpp4
-rw-r--r--src/gpu/GrYUVProvider.h4
-rw-r--r--src/gpu/effects/GrNonlinearColorSpaceXformEffect.cpp4
-rw-r--r--src/gpu/effects/GrNonlinearColorSpaceXformEffect.h3
-rw-r--r--src/image/SkImage_Lazy.cpp5
7 files changed, 18 insertions, 25 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"; }
diff --git a/src/image/SkImage_Lazy.cpp b/src/image/SkImage_Lazy.cpp
index 19b324beaa..f06c963f37 100644
--- a/src/image/SkImage_Lazy.cpp
+++ b/src/image/SkImage_Lazy.cpp
@@ -820,9 +820,8 @@ sk_sp<GrTextureProxy> SkImage_Lazy::lockTextureProxy(GrContext* ctx,
// has been called then this will not match this image's color space. To correct this, apply
// a color space conversion from the generator's color space to this image's color space.
// Note that we can only do this conversion (on the GPU) if both color spaces are XYZ type.
- const SkColorSpace* generatorColorSpace =
- fSharedGenerator->fGenerator->getInfo().colorSpace();
- const SkColorSpace* thisColorSpace = fInfo.colorSpace();
+ SkColorSpace* generatorColorSpace = fSharedGenerator->fGenerator->getInfo().colorSpace();
+ SkColorSpace* thisColorSpace = fInfo.colorSpace();
if ((!generatorColorSpace || generatorColorSpace->toXYZD50()) &&
(!thisColorSpace || thisColorSpace->toXYZD50())) {