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

Side by Side Diff: src/gpu/GrPathRendering.h

Issue 1382013002: Make path range loading explicit (Closed) Base URL: https://skia.googlesource.com/skia.git@upload4_cache
Patch Set: Fix clang build Created 5 years, 2 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 | « src/gpu/GrPathRange.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.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 GrPathRendering_DEFINED 8 #ifndef GrPathRendering_DEFINED
9 #define GrPathRendering_DEFINED 9 #define GrPathRendering_DEFINED
10 10
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 this->onDrawPath(args, path); 172 this->onDrawPath(args, path);
173 } 173 }
174 174
175 void drawPaths(const DrawPathArgs& args, const GrPathRange* pathRange, const void* indices, 175 void drawPaths(const DrawPathArgs& args, const GrPathRange* pathRange, const void* indices,
176 PathIndexType indexType, const float transformValues[], 176 PathIndexType indexType, const float transformValues[],
177 PathTransformType transformType, int count) { 177 PathTransformType transformType, int count) {
178 fGpu->handleDirtyContext(); 178 fGpu->handleDirtyContext();
179 if (GrXferBarrierType barrierType = args.fPipeline->xferBarrierType(*fGp u->caps())) { 179 if (GrXferBarrierType barrierType = args.fPipeline->xferBarrierType(*fGp u->caps())) {
180 fGpu->xferBarrier(args.fPipeline->getRenderTarget(), barrierType); 180 fGpu->xferBarrier(args.fPipeline->getRenderTarget(), barrierType);
181 } 181 }
182 pathRange->willDrawPaths(indices, indexType, count); 182 #ifdef SK_DEBUG
183 pathRange->assertPathsLoaded(indices, indexType, count);
184 #endif
183 this->onDrawPaths(args, pathRange, indices, indexType, transformValues, transformType, 185 this->onDrawPaths(args, pathRange, indices, indexType, transformValues, transformType,
184 count); 186 count);
185 } 187 }
186 188
187 protected: 189 protected:
188 GrPathRendering(GrGpu* gpu) 190 GrPathRendering(GrGpu* gpu)
189 : fGpu(gpu) { 191 : fGpu(gpu) {
190 } 192 }
191 virtual void onStencilPath(const StencilPathArgs&, const GrPath*) = 0; 193 virtual void onStencilPath(const StencilPathArgs&, const GrPath*) = 0;
192 virtual void onDrawPath(const DrawPathArgs&, const GrPath*) = 0; 194 virtual void onDrawPath(const DrawPathArgs&, const GrPath*) = 0;
193 virtual void onDrawPaths(const DrawPathArgs&, const GrPathRange*, const void *, PathIndexType, 195 virtual void onDrawPaths(const DrawPathArgs&, const GrPathRange*, const void *, PathIndexType,
194 const float[], PathTransformType, int) = 0; 196 const float[], PathTransformType, int) = 0;
195 197
196 GrGpu* fGpu; 198 GrGpu* fGpu;
197 private: 199 private:
198 GrPathRendering& operator=(const GrPathRendering&); 200 GrPathRendering& operator=(const GrPathRendering&);
199 }; 201 };
200 202
201 #endif 203 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPathRange.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698