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

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

Issue 1298233002: Added fNumTransformsExclChildren and fNumTexturesExclChildren; changed emitChild() to forward search (Closed) Base URL: https://skia.googlesource.com/skia@cs3_emitchild
Patch Set: Created 5 years, 4 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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 protected: 95 protected:
96 GrProcessor() : fClassID(kIllegalProcessorClassID), fWillReadFragmentPositio n(false) {} 96 GrProcessor() : fClassID(kIllegalProcessorClassID), fWillReadFragmentPositio n(false) {}
97 97
98 /** 98 /**
99 * Subclasses call this from their constructor to register GrTextureAccesses . The processor 99 * Subclasses call this from their constructor to register GrTextureAccesses . The processor
100 * subclass manages the lifetime of the accesses (this function only stores a pointer). The 100 * subclass manages the lifetime of the accesses (this function only stores a pointer). The
101 * GrTextureAccess is typically a member field of the GrProcessor subclass. This must only be 101 * GrTextureAccess is typically a member field of the GrProcessor subclass. This must only be
102 * called from the constructor because GrProcessors are immutable. 102 * called from the constructor because GrProcessors are immutable.
103 */ 103 */
104 void addTextureAccess(const GrTextureAccess* textureAccess); 104 virtual void addTextureAccess(const GrTextureAccess* textureAccess);
105 105
106 bool hasSameTextureAccesses(const GrProcessor&) const; 106 bool hasSameTextureAccesses(const GrProcessor&) const;
107 107
108 /** 108 /**
109 * If the prcoessor will generate a backend-specific processor that will rea d the fragment 109 * If the prcoessor will generate a backend-specific processor that will rea d the fragment
110 * position in the FS then it must call this method from its constructor. Ot herwise, the 110 * position in the FS then it must call this method from its constructor. Ot herwise, the
111 * request to access the fragment position will be denied. 111 * request to access the fragment position will be denied.
112 */ 112 */
113 void setWillReadFragmentPosition() { fWillReadFragmentPosition = true; } 113 void setWillReadFragmentPosition() { fWillReadFragmentPosition = true; }
114 114
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 /** 146 /**
147 * 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
148 * 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.
149 */ 149 */
150 #define GR_CREATE_STATIC_PROCESSOR(NAME, PROC_CLASS, ARGS) \ 150 #define GR_CREATE_STATIC_PROCESSOR(NAME, PROC_CLASS, ARGS) \
151 static SkAlignedSStorage<sizeof(PROC_CLASS)> g_##NAME##_Storage; \ 151 static SkAlignedSStorage<sizeof(PROC_CLASS)> g_##NAME##_Storage; \
152 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); \
153 static SkAutoTDestroy<GrProcessor> NAME##_ad(NAME); 153 static SkAutoTDestroy<GrProcessor> NAME##_ad(NAME);
154 154
155 #endif 155 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698