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

Unified Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 439273007: Don't compare constant color and coverage between GrDrawStates when they are provided by vertex att… (Closed) Base URL: https://skia.googlesource.com/skia.git@compat
Patch Set: Remove AutoColorRestore Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.cpp
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 6e447590b01720462a50224feafd723aa128888c..954437c933cc915bbc8fa359c7feaf63397bbba9 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()) {
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698