OLD | NEW |
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 "GrInOrderCommandBuilder.h" | 8 #include "GrInOrderCommandBuilder.h" |
9 | 9 |
10 #include "GrBufferedDrawTarget.h" | 10 #include "GrBufferedDrawTarget.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 GrBATCH_INFO("\tBatching with (%s, %u)\n", | 35 GrBATCH_INFO("\tBatching with (%s, %u)\n", |
36 previous->batch()->name(), previous->batch()->uniqueID(
)); | 36 previous->batch()->name(), previous->batch()->uniqueID(
)); |
37 return NULL; | 37 return NULL; |
38 } | 38 } |
39 } | 39 } |
40 | 40 |
41 return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (batch)); | 41 return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (batch)); |
42 } | 42 } |
43 | 43 |
44 GrTargetCommands::Cmd* | 44 GrTargetCommands::Cmd* |
45 GrInOrderCommandBuilder::recordStencilPath(const GrPipelineBuilder& pipelineBuil
der, | |
46 const GrPathProcessor* pathProc, | |
47 const GrPath* path, | |
48 const GrScissorState& scissorState, | |
49 const GrStencilSettings& stencilSetti
ngs) { | |
50 StencilPath* sp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), StencilPath, | |
51 (path, pipelineBuilder.getRenderT
arget())); | |
52 | |
53 sp->fScissor = scissorState; | |
54 sp->fUseHWAA = pipelineBuilder.isHWAntialias(); | |
55 sp->fViewMatrix = pathProc->viewMatrix(); | |
56 sp->fStencil = stencilSettings; | |
57 return sp; | |
58 } | |
59 | |
60 GrTargetCommands::Cmd* | |
61 GrInOrderCommandBuilder::recordDrawPath(State* state, | 45 GrInOrderCommandBuilder::recordDrawPath(State* state, |
62 const GrPathProcessor* pathProc, | 46 const GrPathProcessor* pathProc, |
63 const GrPath* path, | 47 const GrPath* path, |
64 const GrStencilSettings& stencilSettings
) { | 48 const GrStencilSettings& stencilSettings
) { |
65 DrawPath* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPath, (state
, path)); | 49 DrawPath* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPath, (state
, path)); |
66 dp->fStencilSettings = stencilSettings; | 50 dp->fStencilSettings = stencilSettings; |
67 return dp; | 51 return dp; |
68 } | 52 } |
69 | 53 |
70 GrTargetCommands::Cmd* | 54 GrTargetCommands::Cmd* |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 105 |
122 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta
te, pathRange)); | 106 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta
te, pathRange)); |
123 dp->fIndices = savedIndices; | 107 dp->fIndices = savedIndices; |
124 dp->fIndexType = indexType; | 108 dp->fIndexType = indexType; |
125 dp->fTransforms = savedTransforms; | 109 dp->fTransforms = savedTransforms; |
126 dp->fTransformType = transformType; | 110 dp->fTransformType = transformType; |
127 dp->fCount = count; | 111 dp->fCount = count; |
128 dp->fStencilSettings = stencilSettings; | 112 dp->fStencilSettings = stencilSettings; |
129 return dp; | 113 return dp; |
130 } | 114 } |
OLD | NEW |