| 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 #include "GrDrawTarget.h" | 9 #include "GrDrawTarget.h" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 fPrimitiveType = di.fPrimitiveType; | 30 fPrimitiveType = di.fPrimitiveType; |
| 31 fStartVertex = di.fStartVertex; | 31 fStartVertex = di.fStartVertex; |
| 32 fStartIndex = di.fStartIndex; | 32 fStartIndex = di.fStartIndex; |
| 33 fVertexCount = di.fVertexCount; | 33 fVertexCount = di.fVertexCount; |
| 34 fIndexCount = di.fIndexCount; | 34 fIndexCount = di.fIndexCount; |
| 35 | 35 |
| 36 fInstanceCount = di.fInstanceCount; | 36 fInstanceCount = di.fInstanceCount; |
| 37 fVerticesPerInstance = di.fVerticesPerInstance; | 37 fVerticesPerInstance = di.fVerticesPerInstance; |
| 38 fIndicesPerInstance = di.fIndicesPerInstance; | 38 fIndicesPerInstance = di.fIndicesPerInstance; |
| 39 | 39 |
| 40 if (di.fDevBounds) { | 40 fVertexBuffer.reset(di.vertexBuffer()); |
| 41 SkASSERT(di.fDevBounds == &di.fDevBoundsStorage); | 41 fIndexBuffer.reset(di.indexBuffer()); |
| 42 fDevBoundsStorage = di.fDevBoundsStorage; | |
| 43 fDevBounds = &fDevBoundsStorage; | |
| 44 } else { | |
| 45 fDevBounds = NULL; | |
| 46 } | |
| 47 | |
| 48 this->setVertexBuffer(di.vertexBuffer()); | |
| 49 this->setIndexBuffer(di.indexBuffer()); | |
| 50 | 42 |
| 51 return *this; | 43 return *this; |
| 52 } | 44 } |
| 53 | 45 |
| 54 //////////////////////////////////////////////////////////////////////////////// | 46 //////////////////////////////////////////////////////////////////////////////// |
| 55 | 47 |
| 56 #define DEBUG_INVAL_BUFFER 0xdeadcafe | 48 #define DEBUG_INVAL_BUFFER 0xdeadcafe |
| 57 #define DEBUG_INVAL_START_IDX -1 | 49 #define DEBUG_INVAL_START_IDX -1 |
| 58 | 50 |
| 59 GrDrawTarget::GrDrawTarget(GrContext* context, | 51 GrDrawTarget::GrDrawTarget(GrContext* context, |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 GrPipelineBuilder::AutoRestoreFragmentProcessors* a
rfp, | 782 GrPipelineBuilder::AutoRestoreFragmentProcessors* a
rfp, |
| 791 GrPipelineBuilder::AutoRestoreStencil* ars, | 783 GrPipelineBuilder::AutoRestoreStencil* ars, |
| 792 GrScissorState* scissorState, | 784 GrScissorState* scissorState, |
| 793 const SkRect* devBounds) { | 785 const SkRect* devBounds) { |
| 794 return fClipMaskManager.setupClipping(pipelineBuilder, | 786 return fClipMaskManager.setupClipping(pipelineBuilder, |
| 795 arfp, | 787 arfp, |
| 796 ars, | 788 ars, |
| 797 scissorState, | 789 scissorState, |
| 798 devBounds); | 790 devBounds); |
| 799 } | 791 } |
| OLD | NEW |