| 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 "GrBWFillRectBatch.h" | 8 #include "GrBWFillRectBatch.h" |
| 9 | 9 |
| 10 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
| 11 #include "GrColor.h" | 11 #include "GrColor.h" |
| 12 #include "GrDefaultGeoProcFactory.h" | 12 #include "GrDefaultGeoProcFactory.h" |
| 13 #include "GrPrimitiveProcessor.h" | 13 #include "GrPrimitiveProcessor.h" |
| 14 #include "GrQuad.h" |
| 14 #include "GrResourceProvider.h" | 15 #include "GrResourceProvider.h" |
| 15 #include "GrTInstanceBatch.h" | 16 #include "GrTInstanceBatch.h" |
| 16 #include "GrVertexBatch.h" | 17 #include "GrVertexBatch.h" |
| 17 | 18 |
| 18 // Common functions | 19 // Common functions |
| 19 class BWFillRectBatchBase { | 20 class BWFillRectBatchBase { |
| 20 public: | 21 public: |
| 21 static const int kVertsPerInstance = 4; | 22 static const int kVertsPerInstance = 4; |
| 22 static const int kIndicesPerInstance = 6; | 23 static const int kIndicesPerInstance = 6; |
| 23 | 24 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); | 297 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); |
| 297 SkMatrix localMatrix = GrTest::TestMatrix(random); | 298 SkMatrix localMatrix = GrTest::TestMatrix(random); |
| 298 | 299 |
| 299 bool hasLocalRect = random->nextBool(); | 300 bool hasLocalRect = random->nextBool(); |
| 300 bool hasLocalMatrix = random->nextBool(); | 301 bool hasLocalMatrix = random->nextBool(); |
| 301 return GrBWFillRectBatch::Create(color, viewMatrix, rect, hasLocalRect ? &lo
calRect : nullptr, | 302 return GrBWFillRectBatch::Create(color, viewMatrix, rect, hasLocalRect ? &lo
calRect : nullptr, |
| 302 hasLocalMatrix ? &localMatrix : nullptr); | 303 hasLocalMatrix ? &localMatrix : nullptr); |
| 303 } | 304 } |
| 304 | 305 |
| 305 #endif | 306 #endif |
| OLD | NEW |