From 72336ed7e16d2672543e0ceca9ddb843c63c8df6 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Tue, 5 Aug 2014 07:35:56 -0700 Subject: 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 --- src/gpu/GrInOrderDrawBuffer.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/gpu/GrInOrderDrawBuffer.cpp') 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()) { -- cgit v1.2.3