| 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 | 9 |
| 10 #ifndef GrDrawTarget_DEFINED | 10 #ifndef GrDrawTarget_DEFINED |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 // shifts the start vertex | 647 // shifts the start vertex |
| 648 void adjustStartVertex(int vertexOffset); | 648 void adjustStartVertex(int vertexOffset); |
| 649 // shifts the start index | 649 // shifts the start index |
| 650 void adjustStartIndex(int indexOffset); | 650 void adjustStartIndex(int indexOffset); |
| 651 | 651 |
| 652 void setDevBounds(const SkRect& bounds) { | 652 void setDevBounds(const SkRect& bounds) { |
| 653 fDevBoundsStorage = bounds; | 653 fDevBoundsStorage = bounds; |
| 654 fDevBounds = &fDevBoundsStorage; | 654 fDevBounds = &fDevBoundsStorage; |
| 655 } | 655 } |
| 656 const SkRect* getDevBounds() const { return fDevBounds; } | 656 const SkRect* getDevBounds() const { return fDevBounds; } |
| 657 |
| 658 bool getDevIBounds(SkIRect* bounds) const { |
| 659 if (NULL != fDevBounds) { |
| 660 fDevBounds->roundOut(bounds); |
| 661 return true; |
| 662 } else { |
| 663 return false; |
| 664 } |
| 665 } |
| 657 | 666 |
| 658 // NULL if no copy of the dst is needed for the draw. | 667 // NULL if no copy of the dst is needed for the draw. |
| 659 const GrDeviceCoordTexture* getDstCopy() const { | 668 const GrDeviceCoordTexture* getDstCopy() const { |
| 660 if (NULL != fDstCopy.texture()) { | 669 if (NULL != fDstCopy.texture()) { |
| 661 return &fDstCopy; | 670 return &fDstCopy; |
| 662 } else { | 671 } else { |
| 663 return NULL; | 672 return NULL; |
| 664 } | 673 } |
| 665 } | 674 } |
| 666 | 675 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 const GrClipData* fClip; | 745 const GrClipData* fClip; |
| 737 GrDrawState* fDrawState; | 746 GrDrawState* fDrawState; |
| 738 GrDrawState fDefaultDraw
State; | 747 GrDrawState fDefaultDraw
State; |
| 739 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. | 748 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. |
| 740 GrContext* fContext; | 749 GrContext* fContext; |
| 741 | 750 |
| 742 typedef GrRefCnt INHERITED; | 751 typedef GrRefCnt INHERITED; |
| 743 }; | 752 }; |
| 744 | 753 |
| 745 #endif | 754 #endif |
| OLD | NEW |