OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 GrEffect_DEFINED | 8 #ifndef GrEffect_DEFINED |
9 #define GrEffect_DEFINED | 9 #define GrEffect_DEFINED |
10 | 10 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 SkSTArray<4, const GrTextureAccess*, true> fTextureAccesses; | 211 SkSTArray<4, const GrTextureAccess*, true> fTextureAccesses; |
212 SkSTArray<kMaxVertexAttribs, GrSLType, true> fVertexAttribTypes; | 212 SkSTArray<kMaxVertexAttribs, GrSLType, true> fVertexAttribTypes; |
213 bool fWillReadDstColor; | 213 bool fWillReadDstColor; |
214 bool fWillReadFragmentPosition; | 214 bool fWillReadFragmentPosition; |
215 bool fWillUseInputColor; | 215 bool fWillUseInputColor; |
216 bool fHasVertexCode; | 216 bool fHasVertexCode; |
217 | 217 |
218 typedef SkRefCnt INHERITED; | 218 typedef SkRefCnt INHERITED; |
219 }; | 219 }; |
220 | 220 |
221 typedef GrEffect GrEffectRef; | |
222 | |
223 /** | 221 /** |
224 * This creates an effect outside of the effect memory pool. The effect's destru
ctor will be called | 222 * This creates an effect outside of the effect memory pool. The effect's destru
ctor will be called |
225 * at global destruction time. NAME will be the name of the created GrEffect. | 223 * at global destruction time. NAME will be the name of the created GrEffect. |
226 */ | 224 */ |
227 #define GR_CREATE_STATIC_EFFECT(NAME, EFFECT_CLASS, ARGS)
\ | 225 #define GR_CREATE_STATIC_EFFECT(NAME, EFFECT_CLASS, ARGS)
\ |
228 static SkAlignedSStorage<sizeof(EFFECT_CLASS)> g_##NAME##_Storage;
\ | 226 static SkAlignedSStorage<sizeof(EFFECT_CLASS)> g_##NAME##_Storage;
\ |
229 static GrEffect* NAME SkNEW_PLACEMENT_ARGS(g_##NAME##_Storage.get(), EFFECT_CLAS
S, ARGS); \ | 227 static GrEffect* NAME SkNEW_PLACEMENT_ARGS(g_##NAME##_Storage.get(), EFFECT_CLAS
S, ARGS); \ |
230 static SkAutoTDestroy<GrEffect> NAME##_ad(NAME); | 228 static SkAutoTDestroy<GrEffect> NAME##_ad(NAME); |
231 | 229 |
232 | 230 |
233 #endif | 231 #endif |
OLD | NEW |