| 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 "GrBufferAllocPool.h" | 10 #include "GrBufferAllocPool.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 BatchTracker fBatch; | 294 BatchTracker fBatch; |
| 295 SkSTArray<1, Geometry, true> fGeoData; | 295 SkSTArray<1, Geometry, true> fGeoData; |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 void GrInOrderDrawBuffer::onDrawRect(GrPipelineBuilder* pipelineBuilder, | 298 void GrInOrderDrawBuffer::onDrawRect(GrPipelineBuilder* pipelineBuilder, |
| 299 GrColor color, | 299 GrColor color, |
| 300 const SkMatrix& viewMatrix, | 300 const SkMatrix& viewMatrix, |
| 301 const SkRect& rect, | 301 const SkRect& rect, |
| 302 const SkRect* localRect, | 302 const SkRect* localRect, |
| 303 const SkMatrix* localMatrix) { | 303 const SkMatrix* localMatrix) { |
| 304 GrPipelineBuilder::AutoRestoreEffects are(pipelineBuilder); | |
| 305 RectBatch::Geometry geometry; | 304 RectBatch::Geometry geometry; |
| 306 geometry.fColor = color; | 305 geometry.fColor = color; |
| 307 geometry.fViewMatrix = viewMatrix; | 306 geometry.fViewMatrix = viewMatrix; |
| 308 geometry.fRect = rect; | 307 geometry.fRect = rect; |
| 309 | 308 |
| 310 if (localRect) { | 309 if (localRect) { |
| 311 geometry.fHasLocalRect = true; | 310 geometry.fHasLocalRect = true; |
| 312 geometry.fLocalRect = *localRect; | 311 geometry.fLocalRect = *localRect; |
| 313 } else { | 312 } else { |
| 314 geometry.fHasLocalRect = false; | 313 geometry.fHasLocalRect = false; |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 } | 773 } |
| 775 } | 774 } |
| 776 | 775 |
| 777 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount, | 776 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount, |
| 778 size_t vertexStride, | 777 size_t vertexStride, |
| 779 int indexCount) { | 778 int indexCount) { |
| 780 this->closeBatch(); | 779 this->closeBatch(); |
| 781 | 780 |
| 782 this->INHERITED::willReserveVertexAndIndexSpace(vertexCount, vertexStride, i
ndexCount); | 781 this->INHERITED::willReserveVertexAndIndexSpace(vertexCount, vertexStride, i
ndexCount); |
| 783 } | 782 } |
| OLD | NEW |