OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "GrBufferedDrawTarget.h" | 8 #include "GrBufferedDrawTarget.h" |
9 | 9 |
10 // We will use the reordering buffer, unless we have NVPR. | 10 // We will use the reordering buffer, unless we have NVPR. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 int count, | 59 int count, |
60 const GrStencilSettings& stencilSettings, | 60 const GrStencilSettings& stencilSettings, |
61 const PipelineInfo& pipelineInfo) { | 61 const PipelineInfo& pipelineInfo) { |
62 GrPipelineOptimizations opts; | 62 GrPipelineOptimizations opts; |
63 StateForPathDraw* state = this->createStateForPathDraw(pathProc, pipelineInf
o, &opts); | 63 StateForPathDraw* state = this->createStateForPathDraw(pathProc, pipelineInf
o, &opts); |
64 if (!state) { | 64 if (!state) { |
65 return; | 65 return; |
66 } | 66 } |
67 fCommands->recordDrawPaths(state, this, pathProc, pathRange, indices, indexT
ype, | 67 fCommands->recordDrawPaths(state, this, pathProc, pathRange, indices, indexT
ype, |
68 transformValues, transformType, count, stencilSet
tings, | 68 transformValues, transformType, count, stencilSet
tings, |
69 pipelineInfo); | 69 opts); |
70 } | 70 } |
71 | 71 |
72 void GrBufferedDrawTarget::onClear(const SkIRect& rect, GrColor color, | 72 void GrBufferedDrawTarget::onClear(const SkIRect& rect, GrColor color, |
73 GrRenderTarget* renderTarget) { | 73 GrRenderTarget* renderTarget) { |
74 fCommands->recordClear(rect, color, renderTarget); | 74 fCommands->recordClear(rect, color, renderTarget); |
75 } | 75 } |
76 | 76 |
77 void GrBufferedDrawTarget::clearStencilClip(const SkIRect& rect, | 77 void GrBufferedDrawTarget::clearStencilClip(const SkIRect& rect, |
78 bool insideClip, | 78 bool insideClip, |
79 GrRenderTarget* renderTarget) { | 79 GrRenderTarget* renderTarget) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 *state->fPrimitiveProcesso
r, | 131 *state->fPrimitiveProcesso
r, |
132 state->fBatchTracker) && | 132 state->fBatchTracker) && |
133 GrPipeline::AreEqual(*fPrevState->getPipeline(), *state->getPipeline(),
false)) { | 133 GrPipeline::AreEqual(*fPrevState->getPipeline(), *state->getPipeline(),
false)) { |
134 this->unallocState(state); | 134 this->unallocState(state); |
135 } else { | 135 } else { |
136 fPrevState.reset(state); | 136 fPrevState.reset(state); |
137 } | 137 } |
138 | 138 |
139 return fPrevState; | 139 return fPrevState; |
140 } | 140 } |
OLD | NEW |