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

Side by Side Diff: include/gpu/GrXferProcessor.h

Issue 794843002: Revert of Remove GP from drawstate, revision of invariant output for GP (Closed) Base URL: https://skia.googlesource.com/skia.git@color-to-gp
Patch Set: Created 6 years 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/GrProcessor.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 2014 Google Inc. 2 * Copyright 2014 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 GrXferProcessor_DEFINED 8 #ifndef GrXferProcessor_DEFINED
9 #define GrXferProcessor_DEFINED 9 #define GrXferProcessor_DEFINED
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 protected: 127 protected:
128 GrXferProcessor() : fWillReadDstColor(false) {} 128 GrXferProcessor() : fWillReadDstColor(false) {}
129 129
130 /** 130 /**
131 * If the prceossor subclass will read the destination pixel value then it m ust call this 131 * If the prceossor subclass will read the destination pixel value then it m ust call this
132 * function from its constructor. Otherwise, when its generated backend-spec ific prceossor class 132 * function from its constructor. Otherwise, when its generated backend-spec ific prceossor class
133 * attempts to generate code that reads the destination pixel it will fail. 133 * attempts to generate code that reads the destination pixel it will fail.
134 */ 134 */
135 void setWillReadDstColor() { fWillReadDstColor = true; } 135 void setWillReadDstColor() { fWillReadDstColor = true; }
136 136
137 /**
138 * Subclass implements this to support getConstantColorComponents(...).
139 */
140 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const = 0;
141
142 private: 137 private:
143 virtual bool onIsEqual(const GrXferProcessor&) const = 0; 138 virtual bool onIsEqual(const GrXferProcessor&) const = 0;
144 139
145 bool fWillReadDstColor; 140 bool fWillReadDstColor;
146 141
147 typedef GrFragmentProcessor INHERITED; 142 typedef GrFragmentProcessor INHERITED;
148 }; 143 };
149 144
150 GR_MAKE_BITFIELD_OPS(GrXferProcessor::OptFlags); 145 GR_MAKE_BITFIELD_OPS(GrXferProcessor::OptFlags);
151 146
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 enum { 243 enum {
249 kIllegalXPFClassID = 0, 244 kIllegalXPFClassID = 0,
250 }; 245 };
251 static int32_t gCurrXPFClassID; 246 static int32_t gCurrXPFClassID;
252 247
253 typedef GrProgramElement INHERITED; 248 typedef GrProgramElement INHERITED;
254 }; 249 };
255 250
256 #endif 251 #endif
257 252
OLDNEW
« no previous file with comments | « include/gpu/GrProcessor.h ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698