| 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 "GrInOrderDrawBuffer.h" | 8 #include "GrInOrderDrawBuffer.h" |
| 9 | 9 |
| 10 #include "GrDefaultGeoProcFactory.h" | 10 #include "GrDefaultGeoProcFactory.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 stencilSettings == previous->fStencilSettings && | 325 stencilSettings == previous->fStencilSettings && |
| 326 path_fill_type_is_winding(stencilSettings) && | 326 path_fill_type_is_winding(stencilSettings) && |
| 327 !ds.willBlendWithDst(color, GrColor_WHITE)) { | 327 !ds.willBlendWithDst(color, GrColor_WHITE)) { |
| 328 // Fold this DrawPaths call into the one previous. | 328 // Fold this DrawPaths call into the one previous. |
| 329 previous->fCount += count; | 329 previous->fCount += count; |
| 330 return; | 330 return; |
| 331 } | 331 } |
| 332 } | 332 } |
| 333 | 333 |
| 334 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, DrawPaths, (pathRange))
; | 334 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, DrawPaths, (pathRange))
; |
| 335 dp->fIndicesLocation = savedIndices - fPathIndexBuffer.begin(); | 335 dp->fIndicesLocation = SkToU32(savedIndices - fPathIndexBuffer.begin()); |
| 336 dp->fIndexType = indexType; | 336 dp->fIndexType = indexType; |
| 337 dp->fTransformsLocation = savedTransforms - fPathTransformBuffer.begin(); | 337 dp->fTransformsLocation = SkToU32(savedTransforms - fPathTransformBuffer.beg
in()); |
| 338 dp->fTransformType = transformType; | 338 dp->fTransformType = transformType; |
| 339 dp->fCount = count; | 339 dp->fCount = count; |
| 340 dp->fStencilSettings = stencilSettings; | 340 dp->fStencilSettings = stencilSettings; |
| 341 | 341 |
| 342 this->recordTraceMarkersIfNecessary(); | 342 this->recordTraceMarkersIfNecessary(); |
| 343 } | 343 } |
| 344 | 344 |
| 345 void GrInOrderDrawBuffer::onClear(const SkIRect* rect, GrColor color, | 345 void GrInOrderDrawBuffer::onClear(const SkIRect* rect, GrColor color, |
| 346 bool canIgnoreRect, GrRenderTarget* renderTarg
et) { | 346 bool canIgnoreRect, GrRenderTarget* renderTarg
et) { |
| 347 SkASSERT(renderTarget); | 347 SkASSERT(renderTarget); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 | 513 |
| 514 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary() { | 514 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary() { |
| 515 SkASSERT(!fCmdBuffer.empty()); | 515 SkASSERT(!fCmdBuffer.empty()); |
| 516 SkASSERT(!cmd_has_trace_marker(fCmdBuffer.back().fType)); | 516 SkASSERT(!cmd_has_trace_marker(fCmdBuffer.back().fType)); |
| 517 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers(); | 517 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers(); |
| 518 if (activeTraceMarkers.count() > 0) { | 518 if (activeTraceMarkers.count() > 0) { |
| 519 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); | 519 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); |
| 520 fGpuCmdMarkers.push_back(activeTraceMarkers); | 520 fGpuCmdMarkers.push_back(activeTraceMarkers); |
| 521 } | 521 } |
| 522 } | 522 } |
| OLD | NEW |