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

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

Issue 1213383005: Rework GrPipelineInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixed 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 /**
111 * The draw can be skipped completely. 107 * The draw can be skipped completely.
112 */ 108 */
113 kSkipDraw_OptFlag = 0x1, 109 kSkipDraw_OptFlag = 0x1,
114 /** 110 /**
115 * GrXferProcessor will ignore color, thus no need to provide 111 * GrXferProcessor will ignore color, thus no need to provide
116 */ 112 */
117 kIgnoreColor_OptFlag = 0x2, 113 kIgnoreColor_OptFlag = 0x2,
118 /** 114 /**
119 * GrXferProcessor will ignore coverage, thus no need to provide 115 * GrXferProcessor will ignore coverage, thus no need to provide
120 */ 116 */
121 kIgnoreCoverage_OptFlag = 0x4, 117 kIgnoreCoverage_OptFlag = 0x4,
122 /** 118 /**
123 * Clear color stages and override input color to that returned by getOp timizations 119 * Clear color stages and override input color to that returned by getOp timizations
124 */ 120 */
125 kOverrideColor_OptFlag = 0x8, 121 kOverrideColor_OptFlag = 0x8,
126 /** 122 /**
127 * Can tweak alpha for coverage. Currently this flag should only be used by a batch 123 * Can tweak alpha for coverage. Currently this flag should only be used by a batch
128 */ 124 */
129 kCanTweakAlphaForCoverage_OptFlag = 0x20, 125 kCanTweakAlphaForCoverage_OptFlag = 0x20,
130 }; 126 };
131 127
128 static const OptFlags kNone_OptFlags = (OptFlags)0;
129
132 GR_DECL_BITFIELD_OPS_FRIENDS(OptFlags); 130 GR_DECL_BITFIELD_OPS_FRIENDS(OptFlags);
133 131
134 /** 132 /**
135 * Determines which optimizations (as described by the ptFlags above) can be performed by 133 * Determines which optimizations (as described by the ptFlags above) can be performed by
136 * the draw with this xfer processor. If this function is called, the xfer p rocessor may change 134 * the draw with this xfer processor. If this function is called, the xfer p rocessor may change
137 * its state to reflected the given blend optimizations. If the XP needs to see a specific input 135 * its state to reflected the given blend optimizations. If the XP needs to see a specific input
138 * color to blend correctly, it will set the OverrideColor flag and the outp ut parameter 136 * color to blend correctly, it will set the OverrideColor flag and the outp ut parameter
139 * overrideColor will be the required value that should be passed into the X P. 137 * overrideColor will be the required value that should be passed into the X P.
140 * A caller who calls this function on a XP is required to honor the returne d OptFlags 138 * A caller who calls this function on a XP is required to honor the returne d OptFlags
141 * and color values for its draw. 139 * and color values for its draw.
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 enum { 398 enum {
401 kIllegalXPFClassID = 0, 399 kIllegalXPFClassID = 0,
402 }; 400 };
403 static int32_t gCurrXPFClassID; 401 static int32_t gCurrXPFClassID;
404 402
405 typedef GrProgramElement INHERITED; 403 typedef GrProgramElement INHERITED;
406 }; 404 };
407 405
408 #endif 406 #endif
409 407
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