Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: src/gpu/GrDrawTarget.h

Issue 13222004: Trim the copy of the dst made for dst-reading effects using the clip and dev-bounds of draw. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698