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

Unified Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 864853002: remove drawType from optState (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleaning Created 5 years, 11 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/GrInOrderDrawBuffer.h ('k') | src/gpu/GrOptDrawState.h » ('j') | 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 f504f093176c8c6cb69d00cbcecd6c8e603d2e13..1c7cb252710bb022e853e24b0fbd4c3b1231a687 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -435,7 +435,7 @@ void GrInOrderDrawBuffer::onFlush() {
SetState* ss = reinterpret_cast<SetState*>(iter.get());
this->getGpu()->buildProgramDesc(&ss->fDesc, *ss->fPrimitiveProcessor, ss->fState,
- ss->fState.descInfo(), ss->fState.drawType(),
+ ss->fState.descInfo(), ss->fDrawType,
ss->fBatchTracker);
currentState = ss;
@@ -455,7 +455,7 @@ void GrInOrderDrawBuffer::onFlush() {
void GrInOrderDrawBuffer::Draw::execute(GrInOrderDrawBuffer* buf, const SetState* state) {
SkASSERT(state);
DrawArgs args(state->fPrimitiveProcessor.get(), &state->fState, &state->fDesc,
- &state->fBatchTracker);
+ &state->fBatchTracker, state->fDrawType);
buf->getGpu()->draw(args, fInfo);
}
@@ -473,14 +473,14 @@ void GrInOrderDrawBuffer::StencilPath::execute(GrInOrderDrawBuffer* buf, const S
void GrInOrderDrawBuffer::DrawPath::execute(GrInOrderDrawBuffer* buf, const SetState* state) {
SkASSERT(state);
DrawArgs args(state->fPrimitiveProcessor.get(), &state->fState, &state->fDesc,
- &state->fBatchTracker);
+ &state->fBatchTracker, state->fDrawType);
buf->getGpu()->drawPath(args, this->path(), fStencilSettings);
}
void GrInOrderDrawBuffer::DrawPaths::execute(GrInOrderDrawBuffer* buf, const SetState* state) {
SkASSERT(state);
DrawArgs args(state->fPrimitiveProcessor.get(), &state->fState, &state->fDesc,
- &state->fBatchTracker);
+ &state->fBatchTracker, state->fDrawType);
buf->getGpu()->drawPaths(args, this->pathRange(),
&buf->fPathIndexBuffer[fIndicesLocation], fIndexType,
&buf->fPathTransformBuffer[fTransformsLocation], fTransformType,
@@ -536,6 +536,7 @@ bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrDrawState& ds,
ss->fState.getInitBatchTracker());
if (fPrevState &&
+ fPrevState->fDrawType == ss->fDrawType &&
fPrevState->fPrimitiveProcessor->canMakeEqual(fPrevState->fBatchTracker,
*ss->fPrimitiveProcessor,
ss->fBatchTracker) &&
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.h ('k') | src/gpu/GrOptDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698