Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: src/gpu/effects/GrColorSpaceEffect.h

Issue 1919993002: Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel buffer on Windows. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Plumb gamma to shader, fix window title Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrColorSpaceEffect_DEFINED
9 #define GrColorSpaceEffect_DEFINED
10
11 #include "GrSingleTextureEffect.h"
12
13 #include "SkColorSpace.h"
14
15 class GrColorSpaceEffect : public GrSingleTextureEffect {
16 public:
17 /**
18 * Creates an effect that performs linear -> sRGB conversion.
19 */
20 static const GrFragmentProcessor* Create(GrTexture*,
21 const SkColorSpace* srcColorSpace,
22 const SkColorSpace* dstColorSpace,
23 uint32_t colorSpaceOpsFlags);
24
25 const char* name() const override { return "Color Space"; }
26
27 bool manualDstGamma() const { return fManualDstGamma; }
28 bool gammaIsSRGB() const { return fGammaIsSRGB; }
29 const SkFloat3& gamma() const { return fGamma; }
30
31 private:
32 GrColorSpaceEffect(GrTexture*, const SkColorSpace* srcColorSpace,
33 const SkColorSpace* dstColorSpace, uint32_t colorSpaceOps Flags);
34
35 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
36
37 void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
38
39 bool onIsEqual(const GrFragmentProcessor&) const override;
40
41 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
42
43 bool fManualDstGamma;
44 bool fGammaIsSRGB;
45 SkFloat3 fGamma;
46
47 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
48
49 typedef GrSingleTextureEffect INHERITED;
50 };
51
52 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698