OLD | NEW |
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 149 |
150 void stencilPath(const StencilPathArgs& args, const GrPath* path) { | 150 void stencilPath(const StencilPathArgs& args, const GrPath* path) { |
151 fGpu->handleDirtyContext(); | 151 fGpu->handleDirtyContext(); |
152 this->onStencilPath(args, path); | 152 this->onStencilPath(args, path); |
153 } | 153 } |
154 | 154 |
155 struct DrawPathArgs : public GrGpu::DrawArgs { | 155 struct DrawPathArgs : public GrGpu::DrawArgs { |
156 DrawPathArgs(const GrPrimitiveProcessor* primProc, | 156 DrawPathArgs(const GrPrimitiveProcessor* primProc, |
157 const GrPipeline* pipeline, | 157 const GrPipeline* pipeline, |
158 const GrProgramDesc* desc, | 158 const GrProgramDesc* desc, |
159 const GrBatchTracker* batchTracker, | |
160 const GrStencilSettings* stencil) | 159 const GrStencilSettings* stencil) |
161 : DrawArgs(primProc, pipeline, desc, batchTracker) | 160 : DrawArgs(primProc, pipeline, desc) |
162 , fStencil(stencil) { | 161 , fStencil(stencil) { |
163 } | 162 } |
164 | 163 |
165 const GrStencilSettings* fStencil; | 164 const GrStencilSettings* fStencil; |
166 }; | 165 }; |
167 | 166 |
168 void drawPath(const DrawPathArgs& args, const GrPath* path) { | 167 void drawPath(const DrawPathArgs& args, const GrPath* path) { |
169 fGpu->handleDirtyContext(); | 168 fGpu->handleDirtyContext(); |
170 if (GrXferBarrierType barrierType = args.fPipeline->xferBarrierType(*fGp
u->caps())) { | 169 if (GrXferBarrierType barrierType = args.fPipeline->xferBarrierType(*fGp
u->caps())) { |
171 fGpu->xferBarrier(args.fPipeline->getRenderTarget(), barrierType); | 170 fGpu->xferBarrier(args.fPipeline->getRenderTarget(), barrierType); |
(...skipping 21 matching lines...) Expand all Loading... |
193 virtual void onDrawPath(const DrawPathArgs&, const GrPath*) = 0; | 192 virtual void onDrawPath(const DrawPathArgs&, const GrPath*) = 0; |
194 virtual void onDrawPaths(const DrawPathArgs&, const GrPathRange*, const void
*, PathIndexType, | 193 virtual void onDrawPaths(const DrawPathArgs&, const GrPathRange*, const void
*, PathIndexType, |
195 const float[], PathTransformType, int) = 0; | 194 const float[], PathTransformType, int) = 0; |
196 | 195 |
197 GrGpu* fGpu; | 196 GrGpu* fGpu; |
198 private: | 197 private: |
199 GrPathRendering& operator=(const GrPathRendering&); | 198 GrPathRendering& operator=(const GrPathRendering&); |
200 }; | 199 }; |
201 | 200 |
202 #endif | 201 #endif |
OLD | NEW |