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

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

Issue 1213013003: Revert of Rework GrPipelineInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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/effects/SkArithmeticMode_gpu.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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 /** Returns a new instance of the appropriate *GL* implementation class 97 /** Returns a new instance of the appropriate *GL* implementation class
98 for the given GrXferProcessor; caller is responsible for deleting 98 for the given GrXferProcessor; caller is responsible for deleting
99 the object. */ 99 the object. */
100 virtual GrGLXferProcessor* createGLInstance() const = 0; 100 virtual GrGLXferProcessor* createGLInstance() const = 0;
101 101
102 /** 102 /**
103 * Optimizations for blending / coverage that an OptDrawState should apply t o itself. 103 * Optimizations for blending / coverage that an OptDrawState should apply t o itself.
104 */ 104 */
105 enum OptFlags { 105 enum OptFlags {
106 /** 106 /**
107 * No optimizations needed
108 */
109 kNone_Opt = 0,
110 /**
107 * The draw can be skipped completely. 111 * The draw can be skipped completely.
108 */ 112 */
109 kSkipDraw_OptFlag = 0x1, 113 kSkipDraw_OptFlag = 0x1,
110 /** 114 /**
111 * GrXferProcessor will ignore color, thus no need to provide 115 * GrXferProcessor will ignore color, thus no need to provide
112 */ 116 */
113 kIgnoreColor_OptFlag = 0x2, 117 kIgnoreColor_OptFlag = 0x2,
114 /** 118 /**
115 * GrXferProcessor will ignore coverage, thus no need to provide 119 * GrXferProcessor will ignore coverage, thus no need to provide
116 */ 120 */
117 kIgnoreCoverage_OptFlag = 0x4, 121 kIgnoreCoverage_OptFlag = 0x4,
118 /** 122 /**
119 * Clear color stages and override input color to that returned by getOp timizations 123 * Clear color stages and override input color to that returned by getOp timizations
120 */ 124 */
121 kOverrideColor_OptFlag = 0x8, 125 kOverrideColor_OptFlag = 0x8,
122 /** 126 /**
123 * Can tweak alpha for coverage. Currently this flag should only be used by a batch 127 * Can tweak alpha for coverage. Currently this flag should only be used by a batch
124 */ 128 */
125 kCanTweakAlphaForCoverage_OptFlag = 0x20, 129 kCanTweakAlphaForCoverage_OptFlag = 0x20,
126 }; 130 };
127 131
128 static const OptFlags kNone_OptFlags = (OptFlags)0;
129
130 GR_DECL_BITFIELD_OPS_FRIENDS(OptFlags); 132 GR_DECL_BITFIELD_OPS_FRIENDS(OptFlags);
131 133
132 /** 134 /**
133 * Determines which optimizations (as described by the ptFlags above) can be performed by 135 * Determines which optimizations (as described by the ptFlags above) can be performed by
134 * the draw with this xfer processor. If this function is called, the xfer p rocessor may change 136 * the draw with this xfer processor. If this function is called, the xfer p rocessor may change
135 * its state to reflected the given blend optimizations. If the XP needs to see a specific input 137 * its state to reflected the given blend optimizations. If the XP needs to see a specific input
136 * color to blend correctly, it will set the OverrideColor flag and the outp ut parameter 138 * color to blend correctly, it will set the OverrideColor flag and the outp ut parameter
137 * overrideColor will be the required value that should be passed into the X P. 139 * overrideColor will be the required value that should be passed into the X P.
138 * A caller who calls this function on a XP is required to honor the returne d OptFlags 140 * A caller who calls this function on a XP is required to honor the returne d OptFlags
139 * and color values for its draw. 141 * and color values for its draw.
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 enum { 400 enum {
399 kIllegalXPFClassID = 0, 401 kIllegalXPFClassID = 0,
400 }; 402 };
401 static int32_t gCurrXPFClassID; 403 static int32_t gCurrXPFClassID;
402 404
403 typedef GrProgramElement INHERITED; 405 typedef GrProgramElement INHERITED;
404 }; 406 };
405 407
406 #endif 408 #endif
407 409
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698