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

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: Rebase 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
« no previous file with comments | « src/gpu/GrProcessor.cpp ('k') | src/gpu/effects/GrGammaEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. The source texture is alway s
17 * sampled unfiltered and with clamping.
18 */
19 static const GrFragmentProcessor* Create(GrTexture*, SkScalar gamma);
20
21 const char* name() const override { return "Gamma"; }
22
23 bool gammaIsSRGB() const { return fGammaIsSRGB; }
24 SkScalar gamma() const { return fGamma; }
25
26 private:
27 GrGammaEffect(GrTexture*, SkScalar gamma);
28
29 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
30 void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
31 bool onIsEqual(const GrFragmentProcessor&) const override;
32 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
33
34 bool fGammaIsSRGB;
35 SkScalar fGamma;
36
37 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
38
39 typedef GrSingleTextureEffect INHERITED;
40 };
41
42 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrProcessor.cpp ('k') | src/gpu/effects/GrGammaEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698