diff options
author | bsalomon <bsalomon@google.com> | 2014-08-05 07:35:56 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-05 07:35:56 -0700 |
commit | 72336ed7e16d2672543e0ceca9ddb843c63c8df6 (patch) | |
tree | 21e5aa3197ad502577f5a5e90d72b8166a4312aa /src/gpu/GrInOrderDrawBuffer.cpp | |
parent | 36ea6c81c2a249ef344d438943050ec960631f0d (diff) |
Don't compare constant color and coverage between GrDrawStates when they are provided by vertex attributes.
R=egdaniel@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/439273007
Diffstat (limited to 'src/gpu/GrInOrderDrawBuffer.cpp')
-rw-r--r-- | src/gpu/GrInOrderDrawBuffer.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp index 6e447590b0..954437c933 100644 --- a/src/gpu/GrInOrderDrawBuffer.cpp +++ b/src/gpu/GrInOrderDrawBuffer.cpp @@ -139,8 +139,6 @@ static bool cmd_has_trace_marker(uint8_t cmd) { void GrInOrderDrawBuffer::onDrawRect(const SkRect& rect, const SkRect* localRect, const SkMatrix* localMatrix) { - GrDrawState::AutoColorRestore acr; - GrDrawState* drawState = this->drawState(); GrColor color = drawState->getColor(); @@ -150,14 +148,6 @@ void GrInOrderDrawBuffer::onDrawRect(const SkRect& rect, this->caps()->dualSourceBlendingSupport() || drawState->hasSolidCoverage(), NULL != localRect, &colorOffset, &localOffset); - if (colorOffset >= 0) { - // We set the draw state's color to white here. This is done so that any batching performed - // in our subclass's onDraw() won't get a false from GrDrawState::op== due to a color - // mismatch. TODO: Once vertex layout is owned by GrDrawState it should skip comparing the - // constant color in its op== when the kColor layout bit is set and then we can remove - // this. - acr.set(drawState, 0xFFFFFFFF); - } AutoReleaseGeometry geo(this, 4, 0); if (!geo.succeeded()) { |