aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-01-26 09:32:33 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-26 15:27:49 +0000
commit964dec3948721808491b21b4ff4ff41a466443ec (patch)
tree57e3d48e97aecafc872a9cce6285e9edea775cf8 /include
parentd6016013bdf843013f7fb8648fc5a64ce7e77005 (diff)
Move SkGammaColorFilter to tools, limit to sRGB
Similarly, limit GrGammaEffect to sRGB (and rename it). BUG=skia: Change-Id: I88feef11ab7040bca2fa4c2eed71923ded87a0d0 Reviewed-on: https://skia-review.googlesource.com/7375 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/effects/SkGammaColorFilter.h44
1 files changed, 0 insertions, 44 deletions
diff --git a/include/effects/SkGammaColorFilter.h b/include/effects/SkGammaColorFilter.h
deleted file mode 100644
index 72c464e33b..0000000000
--- a/include/effects/SkGammaColorFilter.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2016 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkGammaColorFilter_DEFINED
-#define SkGammaColorFilter_DEFINED
-
-#include "SkColorFilter.h"
-#include "SkRefCnt.h"
-
-// This colorfilter can be used to perform pixel-by-pixel conversion between linear and
-// power-law color spaces. A gamma of 2.2 is interpreted to mean convert from sRGB to linear
-// while a gamma of 1/2.2 is interpreted to mean convert from linear to sRGB. Any other
-// values are just directly applied (i.e., out = in^gamma)
-//
-// More complicated color space mapping (i.e., ICC profiles) should be handled via the
-// SkColorSpace object.
-class SK_API SkGammaColorFilter : public SkColorFilter {
-public:
- static sk_sp<SkColorFilter> Make(SkScalar gamma);
-
- void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override;
-
-#if SK_SUPPORT_GPU
- sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*, SkColorSpace*) const override;
-#endif
-
- SK_TO_STRING_OVERRIDE()
- SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLumaColorFilter)
-
-protected:
- void flatten(SkWriteBuffer&) const override;
-
-private:
- SkGammaColorFilter(SkScalar gamma);
-
- SkScalar fGamma;
- typedef SkColorFilter INHERITED;
-};
-
-#endif