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

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

Issue 1287023009: Added tree structure to GrGLFragmentProcessor, i.e. GL instances (Closed) Base URL: https://skia.googlesource.com/skia@cs3_isequal_nonrecursive
Patch Set: moved onSetData from public to protected, onCreateGLInstance from public to private in subclasses Created 5 years, 4 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/GrFragmentProcessor.h ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrColorProcessor_DEFINED 8 #ifndef GrColorProcessor_DEFINED
9 #define GrColorProcessor_DEFINED 9 #define GrColorProcessor_DEFINED
10 10
(...skipping 18 matching lines...) Expand all
29 static const int kInputModeCnt = kLastInputMode + 1; 29 static const int kInputModeCnt = kLastInputMode + 1;
30 30
31 static GrFragmentProcessor* Create(GrColor color, InputMode mode) { 31 static GrFragmentProcessor* Create(GrColor color, InputMode mode) {
32 return SkNEW_ARGS(GrConstColorProcessor, (color, mode)); 32 return SkNEW_ARGS(GrConstColorProcessor, (color, mode));
33 } 33 }
34 34
35 ~GrConstColorProcessor() override {} 35 ~GrConstColorProcessor() override {}
36 36
37 const char* name() const override { return "Color"; } 37 const char* name() const override { return "Color"; }
38 38
39 GrGLFragmentProcessor* createGLInstance() const override;
40
41 GrColor color() const { return fColor; } 39 GrColor color() const { return fColor; }
42 40
43 InputMode inputMode() const { return fMode; } 41 InputMode inputMode() const { return fMode; }
44 42
45 private: 43 private:
46 GrConstColorProcessor(GrColor color, InputMode mode) : fColor(color), fMode( mode) { 44 GrConstColorProcessor(GrColor color, InputMode mode) : fColor(color), fMode( mode) {
47 this->initClassID<GrConstColorProcessor>(); 45 this->initClassID<GrConstColorProcessor>();
48 } 46 }
49 47
48 GrGLFragmentProcessor* onCreateGLInstance() const override;
49
50 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov erride; 50 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov erride;
51 51
52 bool onIsEqual(const GrFragmentProcessor&) const override; 52 bool onIsEqual(const GrFragmentProcessor&) const override;
53 53
54 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; 54 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
55 55
56 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 56 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
57 57
58 GrColor fColor; 58 GrColor fColor;
59 InputMode fMode; 59 InputMode fMode;
60 60
61 typedef GrFragmentProcessor INHERITED; 61 typedef GrFragmentProcessor INHERITED;
62 }; 62 };
63 63
64 #endif 64 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrFragmentProcessor.h ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698