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

Side by Side Diff: src/gpu/GrDrawState.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 | « include/core/SkTLazy.h ('k') | src/gpu/GrDrawTarget.h » ('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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 GrDrawState_DEFINED 8 #ifndef GrDrawState_DEFINED
9 #define GrDrawState_DEFINED 9 #define GrDrawState_DEFINED
10 10
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 * correct local coordinates. oldToNew gives the transformation from the old coord system in 500 * correct local coordinates. oldToNew gives the transformation from the old coord system in
501 * which the geometry was specified to the new coordinate system from which it will be rendered. 501 * which the geometry was specified to the new coordinate system from which it will be rendered.
502 */ 502 */
503 void localCoordChange(const SkMatrix& oldToNew) { 503 void localCoordChange(const SkMatrix& oldToNew) {
504 for (int i = 0; i < kNumStages; ++i) { 504 for (int i = 0; i < kNumStages; ++i) {
505 if (this->isStageEnabled(i)) { 505 if (this->isStageEnabled(i)) {
506 fStages[i].localCoordChange(oldToNew); 506 fStages[i].localCoordChange(oldToNew);
507 } 507 }
508 } 508 }
509 } 509 }
510
511 /**
512 * Checks whether any of the effects will read the dst pixel color.
513 */
514 bool willEffectReadDst() const {
515 for (int s = 0; s < kNumStages; ++s) {
516 if (this->isStageEnabled(s) && (*this->getStage(s).getEffect())->wil lReadDst()) {
517 return true;
518 }
519 }
520 return false;
521 }
510 522
511 /// @} 523 /// @}
512 524
513 /////////////////////////////////////////////////////////////////////////// 525 ///////////////////////////////////////////////////////////////////////////
514 /// @name Coverage / Color Stages 526 /// @name Coverage / Color Stages
515 //// 527 ////
516 528
517 /** 529 /**
518 * A common pattern is to compute a color with the initial stages and then 530 * A common pattern is to compute a color with the initial stages and then
519 * modulate that color by a coverage value in later stage(s) (AA, mask- 531 * modulate that color by a coverage value in later stage(s) (AA, mask-
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 int fAttribIndices[kAttribIndexCount]; 1237 int fAttribIndices[kAttribIndexCount];
1226 GrVertexAttribArray<kVertexAttribCnt> fVertexAttribs; 1238 GrVertexAttribArray<kVertexAttribCnt> fVertexAttribs;
1227 GrEffectStage fStages[kNumStages]; 1239 GrEffectStage fStages[kNumStages];
1228 1240
1229 typedef GrRefCnt INHERITED; 1241 typedef GrRefCnt INHERITED;
1230 }; 1242 };
1231 1243
1232 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); 1244 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags);
1233 1245
1234 #endif 1246 #endif
OLDNEW
« no previous file with comments | « include/core/SkTLazy.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698