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

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

Issue 1217573002: remove SkInstCnt (Closed) Base URL: https://skia.googlesource.com/skia@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 | « include/gpu/GrPathRendererChain.h ('k') | include/gpu/GrProgramElement.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 GrProcessor_DEFINED 8 #ifndef GrProcessor_DEFINED
9 #define GrProcessor_DEFINED 9 #define GrProcessor_DEFINED
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 /** Provides custom shader code to the Ganesh shading pipeline. GrProcessor obje cts *must* be 51 /** Provides custom shader code to the Ganesh shading pipeline. GrProcessor obje cts *must* be
52 immutable: after being constructed, their fields may not change. 52 immutable: after being constructed, their fields may not change.
53 53
54 Dynamically allocated GrProcessors are managed by a per-thread memory pool. The ref count of an 54 Dynamically allocated GrProcessors are managed by a per-thread memory pool. The ref count of an
55 processor must reach 0 before the thread terminates and the pool is destroye d. To create a 55 processor must reach 0 before the thread terminates and the pool is destroye d. To create a
56 static processor use the helper macro GR_CREATE_STATIC_PROCESSOR declared be low. 56 static processor use the helper macro GR_CREATE_STATIC_PROCESSOR declared be low.
57 */ 57 */
58 class GrProcessor : public GrProgramElement { 58 class GrProcessor : public GrProgramElement {
59 public: 59 public:
60 SK_DECLARE_INST_COUNT(GrProcessor)
61
62 virtual ~GrProcessor(); 60 virtual ~GrProcessor();
63 61
64 /** Human-meaningful string to identify this prcoessor; may be embedded 62 /** Human-meaningful string to identify this prcoessor; may be embedded
65 in generated shader code. */ 63 in generated shader code. */
66 virtual const char* name() const = 0; 64 virtual const char* name() const = 0;
67 65
68 int numTextures() const { return fTextureAccesses.count(); } 66 int numTextures() const { return fTextureAccesses.count(); }
69 67
70 /** Returns the access pattern for the texture at index. index must be valid according to 68 /** Returns the access pattern for the texture at index. index must be valid according to
71 numTextures(). */ 69 numTextures(). */
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 /** 146 /**
149 * This creates a processor outside of the memory pool. The processor's destruct or will be called 147 * This creates a processor outside of the memory pool. The processor's destruct or will be called
150 * at global destruction time. NAME will be the name of the created instance. 148 * at global destruction time. NAME will be the name of the created instance.
151 */ 149 */
152 #define GR_CREATE_STATIC_PROCESSOR(NAME, PROC_CLASS, ARGS) \ 150 #define GR_CREATE_STATIC_PROCESSOR(NAME, PROC_CLASS, ARGS) \
153 static SkAlignedSStorage<sizeof(PROC_CLASS)> g_##NAME##_Storage; \ 151 static SkAlignedSStorage<sizeof(PROC_CLASS)> g_##NAME##_Storage; \
154 static PROC_CLASS* NAME SkNEW_PLACEMENT_ARGS(g_##NAME##_Storage.get(), PROC_CLAS S, ARGS); \ 152 static PROC_CLASS* NAME SkNEW_PLACEMENT_ARGS(g_##NAME##_Storage.get(), PROC_CLAS S, ARGS); \
155 static SkAutoTDestroy<GrProcessor> NAME##_ad(NAME); 153 static SkAutoTDestroy<GrProcessor> NAME##_ad(NAME);
156 154
157 #endif 155 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrPathRendererChain.h ('k') | include/gpu/GrProgramElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698