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

Unified Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 777673003: move program descriptor generation to flush (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix builder bug Created 6 years 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 55331748531a67749c1a1c4ef2f4534d9fffa939..83b9701f09207d83c583f4f2515324be1d448a4d 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -394,7 +394,7 @@ void GrInOrderDrawBuffer::onFlush() {
// Updated every time we find a set state cmd to reflect the current state in the playback
// stream.
- const GrOptDrawState* currentOptState = NULL;
+ GrOptDrawState* currentOptState = NULL;
while (iter.next()) {
GrGpuTraceMarker newMarker("", -1);
@@ -409,6 +409,7 @@ void GrInOrderDrawBuffer::onFlush() {
if (kSetState_Cmd == strip_trace_bit(iter->fType)) {
SetState* ss = reinterpret_cast<SetState*>(iter.get());
currentOptState = &ss->fState;
+ currentOptState->finalize(this->getGpu());
} else {
iter->execute(this, currentOptState);
}
@@ -486,7 +487,8 @@ bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrDrawState& ds,
const GrClipMaskManager::ScissorState& scissor,
const GrDeviceCoordTexture* dstCopy) {
SetState* ss = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, SetState,
- (ds, this->getGpu(), scissor, dstCopy, drawType));
+ (ds, *this->getGpu()->caps(), scissor, dstCopy,
+ drawType));
if (ss->fState.mustSkip()) {
fCmdBuffer.pop_back();
return false;
« 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