diff options
author | 2013-04-01 12:49:31 +0000 | |
---|---|---|
committer | 2013-04-01 12:49:31 +0000 | |
commit | bb5c46591c50d05418467cd1c4e927ceb85c2ba9 (patch) | |
tree | a82f0f7b695901adfffa91721b29238803c8cb84 /src/gpu/GrDrawState.h | |
parent | d55846d100bb09448b398b41798bd4ab100a753a (diff) |
Trim the copy of the dst made for dst-reading effects using the clip and dev-bounds of draw.
Adds dev bounds to circles and rects drawn by GrDrawTarget base class (GrIODB already provides rect bounds).
Author: bsalomon@google.com
Reviewed By: robertphilips@google.com,jvanverth@google.com,robertphillips@google.com
Review URL: https://chromiumcodereview.appspot.com/13222004
git-svn-id: http://skia.googlecode.com/svn/trunk@8453 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrDrawState.h')
-rw-r--r-- | src/gpu/GrDrawState.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h index 002c4ede34..d16efa893c 100644 --- a/src/gpu/GrDrawState.h +++ b/src/gpu/GrDrawState.h @@ -507,6 +507,18 @@ public: } } } + + /** + * Checks whether any of the effects will read the dst pixel color. + */ + bool willEffectReadDst() const { + for (int s = 0; s < kNumStages; ++s) { + if (this->isStageEnabled(s) && (*this->getStage(s).getEffect())->willReadDst()) { + return true; + } + } + return false; + } /// @} |