| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "GrGpu.h" | 10 #include "GrGpu.h" |
| 11 | 11 |
| 12 #include "GrCaps.h" | 12 #include "GrCaps.h" |
| 13 #include "GrContext.h" | 13 #include "GrContext.h" |
| 14 #include "GrGpuResourcePriv.h" | 14 #include "GrGpuResourcePriv.h" |
| 15 #include "GrIndexBuffer.h" | 15 #include "GrIndexBuffer.h" |
| 16 #include "GrPathRendering.h" |
| 16 #include "GrResourceCache.h" | 17 #include "GrResourceCache.h" |
| 17 #include "GrRenderTargetPriv.h" | 18 #include "GrRenderTargetPriv.h" |
| 18 #include "GrStencilAttachment.h" | 19 #include "GrStencilAttachment.h" |
| 19 #include "GrVertexBuffer.h" | 20 #include "GrVertexBuffer.h" |
| 20 #include "GrVertices.h" | 21 #include "GrVertices.h" |
| 21 | 22 |
| 22 GrVertices& GrVertices::operator =(const GrVertices& di) { | 23 GrVertices& GrVertices::operator =(const GrVertices& di) { |
| 23 fPrimitiveType = di.fPrimitiveType; | 24 fPrimitiveType = di.fPrimitiveType; |
| 24 fStartVertex = di.fStartVertex; | 25 fStartVertex = di.fStartVertex; |
| 25 fStartIndex = di.fStartIndex; | 26 fStartIndex = di.fStartIndex; |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 //////////////////////////////////////////////////////////////////////////////// | 294 //////////////////////////////////////////////////////////////////////////////// |
| 294 | 295 |
| 295 void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) { | 296 void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) { |
| 296 this->handleDirtyContext(); | 297 this->handleDirtyContext(); |
| 297 GrVertices::Iterator iter; | 298 GrVertices::Iterator iter; |
| 298 const GrNonInstancedVertices* verts = iter.init(vertices); | 299 const GrNonInstancedVertices* verts = iter.init(vertices); |
| 299 do { | 300 do { |
| 300 this->onDraw(args, *verts); | 301 this->onDraw(args, *verts); |
| 301 } while ((verts = iter.next())); | 302 } while ((verts = iter.next())); |
| 302 } | 303 } |
| 303 | |
| 304 void GrGpu::stencilPath(const GrPath* path, const StencilPathState& state) { | |
| 305 this->handleDirtyContext(); | |
| 306 this->onStencilPath(path, state); | |
| 307 } | |
| 308 | |
| 309 void GrGpu::drawPath(const DrawArgs& args, | |
| 310 const GrPath* path, | |
| 311 const GrStencilSettings& stencilSettings) { | |
| 312 this->handleDirtyContext(); | |
| 313 this->onDrawPath(args, path, stencilSettings); | |
| 314 } | |
| 315 | |
| 316 void GrGpu::drawPaths(const DrawArgs& args, | |
| 317 const GrPathRange* pathRange, | |
| 318 const void* indices, | |
| 319 GrDrawTarget::PathIndexType indexType, | |
| 320 const float transformValues[], | |
| 321 GrDrawTarget::PathTransformType transformType, | |
| 322 int count, | |
| 323 const GrStencilSettings& stencilSettings) { | |
| 324 this->handleDirtyContext(); | |
| 325 pathRange->willDrawPaths(indices, indexType, count); | |
| 326 this->onDrawPaths(args, pathRange, indices, indexType, transformValues, | |
| 327 transformType, count, stencilSettings); | |
| 328 } | |
| OLD | NEW |