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

Side by Side Diff: include/gpu/effects/GrExtractAlphaFragmentProcessor.h

Issue 1313573005: Revert of Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Created 5 years, 3 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 | « include/gpu/effects/GrConstColorProcessor.h ('k') | src/core/SkBitmapProcShader.h » ('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 2015 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 GrExtractAlphaFragmentProcessor_DEFINED
9 #define GrExtractAlphaFragmentProcessor_DEFINED
10
11 #include "GrFragmentProcessor.h"
12
13 /** This processor extracts the incoming color's alpha, ignores r, g, and b, and feeds
14 the replicated alpha to it's inner processor. */
15 class GrExtractAlphaFragmentProcessor : public GrFragmentProcessor {
16 public:
17 static GrFragmentProcessor* Create(const GrFragmentProcessor* processor) {
18 if (!processor) {
19 return nullptr;
20 }
21 return SkNEW_ARGS(GrExtractAlphaFragmentProcessor, (processor));
22 }
23
24 ~GrExtractAlphaFragmentProcessor() override {}
25
26 const char* name() const override { return "Extract Alpha"; }
27
28 private:
29 GrExtractAlphaFragmentProcessor(const GrFragmentProcessor* processor) {
30 this->initClassID<GrExtractAlphaFragmentProcessor>();
31 this->registerChildProcessor(processor);
32 }
33
34 GrGLFragmentProcessor* onCreateGLInstance() const override;
35
36 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov erride;
37
38 bool onIsEqual(const GrFragmentProcessor&) const override;
39
40 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
41
42 typedef GrFragmentProcessor INHERITED;
43 };
44
45 #endif
OLDNEW
« no previous file with comments | « include/gpu/effects/GrConstColorProcessor.h ('k') | src/core/SkBitmapProcShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698