| 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" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 fStartVertex = di.fStartVertex; | 28 fStartVertex = di.fStartVertex; |
| 29 fStartIndex = di.fStartIndex; | 29 fStartIndex = di.fStartIndex; |
| 30 fVertexCount = di.fVertexCount; | 30 fVertexCount = di.fVertexCount; |
| 31 fIndexCount = di.fIndexCount; | 31 fIndexCount = di.fIndexCount; |
| 32 | 32 |
| 33 fInstanceCount = di.fInstanceCount; | 33 fInstanceCount = di.fInstanceCount; |
| 34 fVerticesPerInstance = di.fVerticesPerInstance; | 34 fVerticesPerInstance = di.fVerticesPerInstance; |
| 35 fIndicesPerInstance = di.fIndicesPerInstance; | 35 fIndicesPerInstance = di.fIndicesPerInstance; |
| 36 fMaxInstancesPerDraw = di.fMaxInstancesPerDraw; | 36 fMaxInstancesPerDraw = di.fMaxInstancesPerDraw; |
| 37 | 37 |
| 38 fVertexBuffer.reset(di.vertexBuffer()); | 38 fVertexBuffer.reset(di.vertexBuffer(), NULL); |
| 39 fIndexBuffer.reset(di.indexBuffer()); | 39 fIndexBuffer.reset(di.indexBuffer(), NULL); |
| 40 | 40 |
| 41 return *this; | 41 return *this; |
| 42 } | 42 } |
| 43 | 43 |
| 44 //////////////////////////////////////////////////////////////////////////////// | 44 //////////////////////////////////////////////////////////////////////////////// |
| 45 | 45 |
| 46 GrGpu::GrGpu(GrContext* context) | 46 GrGpu::GrGpu(GrContext* context) |
| 47 : fResetTimestamp(kExpiredTimestamp+1) | 47 : fResetTimestamp(kExpiredTimestamp+1) |
| 48 , fResetBits(kAll_GrBackendState) | 48 , fResetBits(kAll_GrBackendState) |
| 49 , fContext(context) { | 49 , fContext(context) { |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 this->xferBarrier(args.fPipeline->getRenderTarget(), barrierType); | 343 this->xferBarrier(args.fPipeline->getRenderTarget(), barrierType); |
| 344 } | 344 } |
| 345 | 345 |
| 346 GrVertices::Iterator iter; | 346 GrVertices::Iterator iter; |
| 347 const GrNonInstancedVertices* verts = iter.init(vertices); | 347 const GrNonInstancedVertices* verts = iter.init(vertices); |
| 348 do { | 348 do { |
| 349 this->onDraw(args, *verts); | 349 this->onDraw(args, *verts); |
| 350 fStats.incNumDraws(); | 350 fStats.incNumDraws(); |
| 351 } while ((verts = iter.next())); | 351 } while ((verts = iter.next())); |
| 352 } | 352 } |
| OLD | NEW |