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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 GrPendingIOResource<const GrVertexBuffer, kRead_GrIOType> fVertexBuffer; | 600 GrPendingIOResource<const GrVertexBuffer, kRead_GrIOType> fVertexBuffer; |
601 GrPendingIOResource<const GrIndexBuffer, kRead_GrIOType> fIndexBuffer; | 601 GrPendingIOResource<const GrIndexBuffer, kRead_GrIOType> fIndexBuffer; |
602 | 602 |
603 GrDeviceCoordTexture fDstCopy; | 603 GrDeviceCoordTexture fDstCopy; |
604 }; | 604 }; |
605 | 605 |
606 virtual void setDrawBuffers(DrawInfo*) = 0;; | 606 virtual void setDrawBuffers(DrawInfo*) = 0;; |
607 bool programUnitTest(int maxStages); | 607 bool programUnitTest(int maxStages); |
608 | 608 |
609 protected: | 609 protected: |
610 // Extend access to GrDrawState::convertToPEndeingExec to subclasses. | |
611 void convertDrawStateToPendingExec(GrDrawState* ds) { | |
612 ds->convertToPendingExec(); | |
613 } | |
614 | |
615 enum GeometrySrcType { | 610 enum GeometrySrcType { |
616 kNone_GeometrySrcType, //<! src has not been specified | 611 kNone_GeometrySrcType, //<! src has not been specified |
617 kReserved_GeometrySrcType, //<! src was set using reserve*Space | 612 kReserved_GeometrySrcType, //<! src was set using reserve*Space |
618 kBuffer_GeometrySrcType //<! src was set using set*SourceToBuffer | 613 kBuffer_GeometrySrcType //<! src was set using set*SourceToBuffer |
619 }; | 614 }; |
620 | 615 |
621 struct GeometrySrcState { | 616 struct GeometrySrcState { |
622 GeometrySrcType fVertexSrc; | 617 GeometrySrcType fVertexSrc; |
623 union { | 618 union { |
624 // valid if src type is buffer | 619 // valid if src type is buffer |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 virtual bool setupClip(const SkRect* devBounds, | 816 virtual bool setupClip(const SkRect* devBounds, |
822 GrDrawState::AutoRestoreEffects* are, | 817 GrDrawState::AutoRestoreEffects* are, |
823 GrDrawState::AutoRestoreStencil* ars, | 818 GrDrawState::AutoRestoreStencil* ars, |
824 GrDrawState*, | 819 GrDrawState*, |
825 GrClipMaskManager::ScissorState* scissorState) SK_OVE
RRIDE; | 820 GrClipMaskManager::ScissorState* scissorState) SK_OVE
RRIDE; |
826 | 821 |
827 typedef GrDrawTarget INHERITED; | 822 typedef GrDrawTarget INHERITED; |
828 }; | 823 }; |
829 | 824 |
830 #endif | 825 #endif |
OLD | NEW |