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

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

Issue 1293973003: Path stenciling in GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@rmcode
Patch Set: header order tweak Created 5 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrTargetCommands.h ('k') | src/gpu/batches/GrStencilPathBatch.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::StencilPath::execute(GrBatchFlushState* state) {
47 GrPathRendering::StencilPathArgs args(fUseHWAA, fRenderTarget.get(), &fViewM atrix, &fScissor,
48 &fStencil);
49 state->gpu()->pathRendering()->stencilPath(args, this->path());
50 }
51
52 void GrTargetCommands::DrawPath::execute(GrBatchFlushState* state) { 46 void GrTargetCommands::DrawPath::execute(GrBatchFlushState* state) {
53 if (!fState->fCompiled) { 47 if (!fState->fCompiled) {
54 state->gpu()->buildProgramDesc(&fState->fDesc, *fState->fPrimitiveProces sor, 48 state->gpu()->buildProgramDesc(&fState->fDesc, *fState->fPrimitiveProces sor,
55 *fState->getPipeline(), fState->fBatchTra cker); 49 *fState->getPipeline(), fState->fBatchTra cker);
56 fState->fCompiled = true; 50 fState->fCompiled = true;
57 } 51 }
58 GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState ->getPipeline(), 52 GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState ->getPipeline(),
59 &fState->fDesc, &fState->fBatchTracker, & fStencilSettings); 53 &fState->fDesc, &fState->fBatchTracker, & fStencilSettings);
60 state->gpu()->pathRendering()->drawPath(args, this->path()); 54 state->gpu()->pathRendering()->drawPath(args, this->path());
61 } 55 }
62 56
63 void GrTargetCommands::DrawPaths::execute(GrBatchFlushState* state) { 57 void GrTargetCommands::DrawPaths::execute(GrBatchFlushState* state) {
64 if (!fState->fCompiled) { 58 if (!fState->fCompiled) {
65 state->gpu()->buildProgramDesc(&fState->fDesc, *fState->fPrimitiveProces sor, 59 state->gpu()->buildProgramDesc(&fState->fDesc, *fState->fPrimitiveProces sor,
66 *fState->getPipeline(), fState->fBatchTra cker); 60 *fState->getPipeline(), fState->fBatchTra cker);
67 fState->fCompiled = true; 61 fState->fCompiled = true;
68 } 62 }
69 GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState ->getPipeline(), 63 GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState ->getPipeline(),
70 &fState->fDesc, &fState->fBatchTracker, & fStencilSettings); 64 &fState->fDesc, &fState->fBatchTracker, & fStencilSettings);
71 state->gpu()->pathRendering()->drawPaths(args, this->pathRange(), fIndices, fIndexType, 65 state->gpu()->pathRendering()->drawPaths(args, this->pathRange(), fIndices, fIndexType,
72 fTransforms, fTransformType, fCount ); 66 fTransforms, fTransformType, fCount );
73 } 67 }
74 68
75 void GrTargetCommands::DrawBatch::execute(GrBatchFlushState* state) { 69 void GrTargetCommands::DrawBatch::execute(GrBatchFlushState* state) {
76 fBatch->draw(state); 70 fBatch->draw(state);
77 } 71 }
OLDNEW
« no previous file with comments | « src/gpu/GrTargetCommands.h ('k') | src/gpu/batches/GrStencilPathBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698