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

Side by Side Diff: src/gpu/GrTargetCommands.cpp

Issue 1315563003: GrPathRangeBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix init order warning Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrTargetCommands.h ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrTargetCommands.h" 8 #include "GrTargetCommands.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 25 matching lines...) Expand all
36 36
37 flushState.preIssueDraws(); 37 flushState.preIssueDraws();
38 38
39 CmdBuffer::Iter iter(fCmdBuffer); 39 CmdBuffer::Iter iter(fCmdBuffer);
40 while (iter.next()) { 40 while (iter.next()) {
41 iter->execute(&flushState); 41 iter->execute(&flushState);
42 } 42 }
43 fLastFlushToken = flushState.lastFlushedToken(); 43 fLastFlushToken = flushState.lastFlushedToken();
44 } 44 }
45 45
46 void GrTargetCommands::DrawPath::execute(GrBatchFlushState* state) {
47 if (!fState->fCompiled) {
48 state->gpu()->buildProgramDesc(&fState->fDesc, *fState->fPrimitiveProces sor,
49 *fState->getPipeline(), fState->fBatchTra cker);
50 fState->fCompiled = true;
51 }
52 GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState ->getPipeline(),
53 &fState->fDesc, &fState->fBatchTracker, & fStencilSettings);
54 state->gpu()->pathRendering()->drawPath(args, this->path());
55 }
56
57 void GrTargetCommands::DrawPaths::execute(GrBatchFlushState* state) {
58 if (!fState->fCompiled) {
59 state->gpu()->buildProgramDesc(&fState->fDesc, *fState->fPrimitiveProces sor,
60 *fState->getPipeline(), fState->fBatchTra cker);
61 fState->fCompiled = true;
62 }
63 GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState ->getPipeline(),
64 &fState->fDesc, &fState->fBatchTracker, & fStencilSettings);
65 state->gpu()->pathRendering()->drawPaths(args, this->pathRange(), fIndices, fIndexType,
66 fTransforms, fTransformType, fCount );
67 }
68
69 void GrTargetCommands::DrawBatch::execute(GrBatchFlushState* state) { 46 void GrTargetCommands::DrawBatch::execute(GrBatchFlushState* state) {
70 fBatch->draw(state); 47 fBatch->draw(state);
71 } 48 }
OLDNEW
« no previous file with comments | « src/gpu/GrTargetCommands.h ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698