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

Side by Side Diff: src/gpu/effects/GrGammaEffect.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: More cleanup 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 GrGammaEffect_DEFINED
9 #define GrGammaEffect_DEFINED
10
11 #include "GrSingleTextureEffect.h"
12
13 class GrGammaEffect : public GrSingleTextureEffect {
14 public:
15 /**
16 * Creates an effect that applies a gamma curve.
bsalomon 2016/04/29 18:27:20 Doc how src is sampled (always nearest)?
Brian Osman 2016/05/02 21:02:45 Done.
17 */
18 static const GrFragmentProcessor* Create(GrTexture*, SkScalar gamma);
19
20 const char* name() const override { return "Gamma"; }
21
22 bool gammaIsSRGB() const { return fGammaIsSRGB; }
23 SkScalar gamma() const { return fGamma; }
24
25 private:
26 GrGammaEffect(GrTexture*, SkScalar gamma);
27
28 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
29 void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
30 bool onIsEqual(const GrFragmentProcessor&) const override;
31 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
32
33 bool fGammaIsSRGB;
34 SkScalar fGamma;
35
36 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
37
38 typedef GrSingleTextureEffect INHERITED;
39 };
40
41 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698