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

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

Issue 374923002: Goodbye GrEffectRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@noref3
Patch Set: Address comments Created 6 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 | « include/gpu/GrContext.h ('k') | include/gpu/SkGr.h » ('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 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
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
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | include/gpu/SkGr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698