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

Unified Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 862933005: remove drawtype (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/GrTest.cpp » ('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 1c7cb252710bb022e853e24b0fbd4c3b1231a687..5b1f00891e991dc4cccafa02d93a03672ebd6c80 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -245,9 +245,7 @@ void GrInOrderDrawBuffer::onDraw(const GrDrawState& ds,
const GrDeviceCoordTexture* dstCopy) {
SkASSERT(info.vertexBuffer() && (!info.isIndexed() || info.indexBuffer()));
- if (!this->recordStateAndShouldDraw(ds, gp,
- GrGpu::PrimTypeToDrawType(info.primitiveType()),
- scissorState, dstCopy)) {
+ if (!this->recordStateAndShouldDraw(ds, gp, scissorState, dstCopy)) {
return;
}
@@ -287,8 +285,7 @@ void GrInOrderDrawBuffer::onDrawPath(const GrDrawState& ds,
const GrStencilSettings& stencilSettings,
const GrDeviceCoordTexture* dstCopy) {
// TODO: Only compare the subset of GrDrawState relevant to path covering?
- if (!this->recordStateAndShouldDraw(ds, pathProc, GrGpu::kDrawPath_DrawType,
- scissorState, dstCopy)) {
+ if (!this->recordStateAndShouldDraw(ds, pathProc, scissorState, dstCopy)) {
return;
}
DrawPath* dp = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, DrawPath, (path));
@@ -311,8 +308,7 @@ void GrInOrderDrawBuffer::onDrawPaths(const GrDrawState& ds,
SkASSERT(indices);
SkASSERT(transformValues);
- if (!this->recordStateAndShouldDraw(ds, pathProc, GrGpu::kDrawPath_DrawType, scissorState,
- dstCopy)) {
+ if (!this->recordStateAndShouldDraw(ds, pathProc, scissorState, dstCopy)) {
return;
}
@@ -435,8 +431,7 @@ void GrInOrderDrawBuffer::onFlush() {
SetState* ss = reinterpret_cast<SetState*>(iter.get());
this->getGpu()->buildProgramDesc(&ss->fDesc, *ss->fPrimitiveProcessor, ss->fState,
- ss->fState.descInfo(), ss->fDrawType,
- ss->fBatchTracker);
+ ss->fState.descInfo(), ss->fBatchTracker);
currentState = ss;
} else {
@@ -455,7 +450,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->fDrawType);
+ &state->fBatchTracker);
buf->getGpu()->draw(args, fInfo);
}
@@ -473,14 +468,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->fDrawType);
+ &state->fBatchTracker);
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->fDrawType);
+ &state->fBatchTracker);
buf->getGpu()->drawPaths(args, this->pathRange(),
&buf->fPathIndexBuffer[fIndicesLocation], fIndexType,
&buf->fPathTransformBuffer[fTransformsLocation], fTransformType,
@@ -521,12 +516,11 @@ bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst,
bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrDrawState& ds,
const GrPrimitiveProcessor* primProc,
- GrGpu::DrawType drawType,
const GrScissorState& scissor,
const GrDeviceCoordTexture* dstCopy) {
SetState* ss = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, SetState,
(ds, primProc, *this->getGpu()->caps(), scissor,
- dstCopy, drawType));
+ dstCopy));
if (ss->fState.mustSkip()) {
fCmdBuffer.pop_back();
return false;
@@ -536,7 +530,6 @@ 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/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698