OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrDrawTarget_DEFINED | 8 #ifndef GrDrawTarget_DEFINED |
9 #define GrDrawTarget_DEFINED | 9 #define GrDrawTarget_DEFINED |
10 | 10 |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 int fVerticesPerInstance; | 572 int fVerticesPerInstance; |
573 int fIndicesPerInstance; | 573 int fIndicesPerInstance; |
574 | 574 |
575 SkRect fDevBoundsStorage; | 575 SkRect fDevBoundsStorage; |
576 SkRect* fDevBounds; | 576 SkRect* fDevBounds; |
577 | 577 |
578 GrPendingIOResource<const GrVertexBuffer, kRead_GrIOType> fVertexBuffer; | 578 GrPendingIOResource<const GrVertexBuffer, kRead_GrIOType> fVertexBuffer; |
579 GrPendingIOResource<const GrIndexBuffer, kRead_GrIOType> fIndexBuffer; | 579 GrPendingIOResource<const GrIndexBuffer, kRead_GrIOType> fIndexBuffer; |
580 }; | 580 }; |
581 | 581 |
582 virtual void setDrawBuffers(DrawInfo*) = 0;; | 582 /** |
| 583 * Used to populate the vertex and index buffer on the draw info before onDr
aw is called. |
| 584 */ |
| 585 virtual void setDrawBuffers(DrawInfo*, size_t vertexStride) = 0;; |
583 bool programUnitTest(int maxStages); | 586 bool programUnitTest(int maxStages); |
584 | 587 |
585 protected: | 588 protected: |
586 enum GeometrySrcType { | 589 enum GeometrySrcType { |
587 kNone_GeometrySrcType, //<! src has not been specified | 590 kNone_GeometrySrcType, //<! src has not been specified |
588 kReserved_GeometrySrcType, //<! src was set using reserve*Space | 591 kReserved_GeometrySrcType, //<! src was set using reserve*Space |
589 kBuffer_GeometrySrcType //<! src was set using set*SourceToBuffer | 592 kBuffer_GeometrySrcType //<! src was set using set*SourceToBuffer |
590 }; | 593 }; |
591 | 594 |
592 struct GeometrySrcState { | 595 struct GeometrySrcState { |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 virtual bool setupClip(const SkRect* devBounds, | 836 virtual bool setupClip(const SkRect* devBounds, |
834 GrDrawState::AutoRestoreEffects* are, | 837 GrDrawState::AutoRestoreEffects* are, |
835 GrDrawState::AutoRestoreStencil* ars, | 838 GrDrawState::AutoRestoreStencil* ars, |
836 GrDrawState*, | 839 GrDrawState*, |
837 GrClipMaskManager::ScissorState* scissorState) SK_OVE
RRIDE; | 840 GrClipMaskManager::ScissorState* scissorState) SK_OVE
RRIDE; |
838 | 841 |
839 typedef GrDrawTarget INHERITED; | 842 typedef GrDrawTarget INHERITED; |
840 }; | 843 }; |
841 | 844 |
842 #endif | 845 #endif |
OLD | NEW |