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

Side by Side Diff: src/gpu/gl/GrGLFragmentProcessor.h

Issue 1301523003: added emitChild() to GrGLFragmentProcessor; removed AutoFragmentChildProcAdvance class (Closed) Base URL: https://skia.googlesource.com/skia@cs3_glinstances2
Patch Set: changed emitted comment before child's emitted code 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 | « no previous file | src/gpu/gl/GrGLFragmentProcessor.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 2013 Google Inc. 2 * Copyright 2013 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 GrGLFragmentProcessor_DEFINED 8 #ifndef GrGLFragmentProcessor_DEFINED
9 #define GrGLFragmentProcessor_DEFINED 9 #define GrGLFragmentProcessor_DEFINED
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void setData(const GrGLProgramDataManager& pdman, const GrFragmentProcessor& processor); 73 void setData(const GrGLProgramDataManager& pdman, const GrFragmentProcessor& processor);
74 74
75 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuil der*) {} 75 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuil der*) {}
76 76
77 int numChildProcessors() const { return fChildProcessors.count(); } 77 int numChildProcessors() const { return fChildProcessors.count(); }
78 78
79 GrGLFragmentProcessor* childProcessor(int index) const { 79 GrGLFragmentProcessor* childProcessor(int index) const {
80 return fChildProcessors[index]; 80 return fChildProcessors[index];
81 } 81 }
82 82
83 void emitChild(int childIndex, const char* inputColor, SkString* outputColor , EmitArgs& args);
84
83 protected: 85 protected:
84 /** A GrGLFragmentProcessor instance can be reused with any GrFragmentProces sor that produces 86 /** A GrGLFragmentProcessor instance can be reused with any GrFragmentProces sor that produces
85 the same stage key; this function reads data from a GrFragmentProcessor and uploads any 87 the same stage key; this function reads data from a GrFragmentProcessor and uploads any
86 uniform variables required by the shaders created in emitCode(). The GrFragm entProcessor 88 uniform variables required by the shaders created in emitCode(). The GrFragm entProcessor
87 parameter is guaranteed to be of the same type that created this GrGLFragmen tProcessor and 89 parameter is guaranteed to be of the same type that created this GrGLFragmen tProcessor and
88 to have an identical processor key as the one that created this GrGLFragment Processor. */ 90 to have an identical processor key as the one that created this GrGLFragment Processor. */
89 // TODO update this to pass in GrFragmentProcessor 91 // TODO update this to pass in GrFragmentProcessor
90 virtual void onSetData(const GrGLProgramDataManager&, const GrProcessor&) {} 92 virtual void onSetData(const GrGLProgramDataManager&, const GrProcessor&) {}
91 93
92 private: 94 private:
93 SkTArray<GrGLFragmentProcessor*, true> fChildProcessors; 95 SkTArray<GrGLFragmentProcessor*, true> fChildProcessors;
94 96
95 friend class GrFragmentProcessor; 97 friend class GrFragmentProcessor;
96 typedef GrGLProcessor INHERITED; 98 typedef GrGLProcessor INHERITED;
97 }; 99 };
98 100
99 #endif 101 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLFragmentProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698