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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 GrPendingIOResource<const GrIndexBuffer, kRead_GrIOType> fIndexBuffer; | 566 GrPendingIOResource<const GrIndexBuffer, kRead_GrIOType> fIndexBuffer; |
567 }; | 567 }; |
568 | 568 |
569 /** | 569 /** |
570 * Used to populate the vertex and index buffer on the draw info before onDr
aw is called. | 570 * Used to populate the vertex and index buffer on the draw info before onDr
aw is called. |
571 */ | 571 */ |
572 virtual void setDrawBuffers(DrawInfo*, size_t vertexStride) = 0;; | 572 virtual void setDrawBuffers(DrawInfo*, size_t vertexStride) = 0;; |
573 bool programUnitTest(int maxStages); | 573 bool programUnitTest(int maxStages); |
574 | 574 |
575 protected: | 575 protected: |
| 576 friend class GrTargetCommands; // for PipelineInfo |
| 577 |
576 enum GeometrySrcType { | 578 enum GeometrySrcType { |
577 kNone_GeometrySrcType, //<! src has not been specified | 579 kNone_GeometrySrcType, //<! src has not been specified |
578 kReserved_GeometrySrcType, //<! src was set using reserve*Space | 580 kReserved_GeometrySrcType, //<! src was set using reserve*Space |
579 kBuffer_GeometrySrcType //<! src was set using set*SourceToBuffer | 581 kBuffer_GeometrySrcType //<! src was set using set*SourceToBuffer |
580 }; | 582 }; |
581 | 583 |
582 struct GeometrySrcState { | 584 struct GeometrySrcState { |
583 GeometrySrcType fVertexSrc; | 585 GeometrySrcType fVertexSrc; |
584 union { | 586 union { |
585 // valid if src type is buffer | 587 // valid if src type is buffer |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 virtual bool setupClip(GrPipelineBuilder*, | 852 virtual bool setupClip(GrPipelineBuilder*, |
851 GrPipelineBuilder::AutoRestoreFragmentProcessors*, | 853 GrPipelineBuilder::AutoRestoreFragmentProcessors*, |
852 GrPipelineBuilder::AutoRestoreStencil*, | 854 GrPipelineBuilder::AutoRestoreStencil*, |
853 GrScissorState* scissorState, | 855 GrScissorState* scissorState, |
854 const SkRect* devBounds) SK_OVERRIDE; | 856 const SkRect* devBounds) SK_OVERRIDE; |
855 | 857 |
856 typedef GrDrawTarget INHERITED; | 858 typedef GrDrawTarget INHERITED; |
857 }; | 859 }; |
858 | 860 |
859 #endif | 861 #endif |
OLD | NEW |