| 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 PipelineInfo(GrPipelineBuilder* pipelineBuilder, GrScissorState* scissor
, | 643 PipelineInfo(GrPipelineBuilder* pipelineBuilder, GrScissorState* scissor
, |
| 644 const GrPrimitiveProcessor* primProc, | 644 const GrPrimitiveProcessor* primProc, |
| 645 const SkRect* devBounds, GrDrawTarget* target); | 645 const SkRect* devBounds, GrDrawTarget* target); |
| 646 | 646 |
| 647 PipelineInfo(GrPipelineBuilder* pipelineBuilder, GrScissorState* scissor
, | 647 PipelineInfo(GrPipelineBuilder* pipelineBuilder, GrScissorState* scissor
, |
| 648 const GrBatch* batch, const SkRect* devBounds, | 648 const GrBatch* batch, const SkRect* devBounds, |
| 649 GrDrawTarget* target); | 649 GrDrawTarget* target); |
| 650 | 650 |
| 651 // Returns false if an early reject was detected and the draw can be ski
pped. | 651 // Returns false if an early reject was detected and the draw can be ski
pped. |
| 652 bool getConservativeDrawBounds(SkIRect*) const; | 652 bool getConservativeDrawBounds(SkIRect*) const; |
| 653 void getQuickDrawBounds(SkIRect*) const; |
| 653 | 654 |
| 654 bool hasCustomDstCopy() const { return SkToBool(fCustomDstCopy.texture()
); } | 655 bool hasCustomDstCopy() const { return SkToBool(fCustomDstCopy.texture()
); } |
| 655 | 656 |
| 656 const GrDeviceCoordTexture* getCustomDstCopy() const { | 657 const GrDeviceCoordTexture* getCustomDstCopy() const { |
| 657 return this->hasCustomDstCopy() ? &fCustomDstCopy : NULL; | 658 return this->hasCustomDstCopy() ? &fCustomDstCopy : NULL; |
| 658 } | 659 } |
| 659 | |
| 660 bool willBlendWithDst(const GrPrimitiveProcessor* primProc) const { | |
| 661 return fPipelineBuilder->willBlendWithDst(primProc); | |
| 662 } | |
| 663 private: | 660 private: |
| 664 friend class GrDrawTarget; | 661 friend class GrDrawTarget; |
| 665 | 662 |
| 666 bool mustSkipDraw() const { return (NULL == fPipelineBuilder); } | 663 bool mustSkipDraw() const { return (NULL == fPipelineBuilder); } |
| 667 | 664 |
| 668 GrPipelineBuilder* fPipelineBuilder; | 665 GrPipelineBuilder* fPipelineBuilder; |
| 669 GrScissorState* fScissor; | 666 GrScissorState* fScissor; |
| 670 bool fHasDrawBounds; | 667 bool fHasDrawBounds; |
| 671 SkRect fDrawBounds; | 668 SkRect fDrawBounds; |
| 672 GrProcOptInfo fColorPOI; | 669 GrProcOptInfo fColorPOI; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 virtual bool setupClip(GrPipelineBuilder*, | 844 virtual bool setupClip(GrPipelineBuilder*, |
| 848 GrPipelineBuilder::AutoRestoreFragmentProcessors*, | 845 GrPipelineBuilder::AutoRestoreFragmentProcessors*, |
| 849 GrPipelineBuilder::AutoRestoreStencil*, | 846 GrPipelineBuilder::AutoRestoreStencil*, |
| 850 GrScissorState* scissorState, | 847 GrScissorState* scissorState, |
| 851 const SkRect* devBounds) override; | 848 const SkRect* devBounds) override; |
| 852 | 849 |
| 853 typedef GrDrawTarget INHERITED; | 850 typedef GrDrawTarget INHERITED; |
| 854 }; | 851 }; |
| 855 | 852 |
| 856 #endif | 853 #endif |
| OLD | NEW |