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 "GrAAFillRectBatch.h" | 8 #include "GrAAFillRectBatch.h" |
9 | 9 |
10 #include "GrBatch.h" | |
11 #include "GrColor.h" | 10 #include "GrColor.h" |
12 #include "GrDefaultGeoProcFactory.h" | 11 #include "GrDefaultGeoProcFactory.h" |
13 #include "GrResourceKey.h" | 12 #include "GrResourceKey.h" |
14 #include "GrResourceProvider.h" | 13 #include "GrResourceProvider.h" |
15 #include "GrTypes.h" | 14 #include "GrTypes.h" |
| 15 #include "GrVertexBatch.h" |
16 #include "SkMatrix.h" | 16 #include "SkMatrix.h" |
17 #include "SkRect.h" | 17 #include "SkRect.h" |
18 | 18 |
19 GR_DECLARE_STATIC_UNIQUE_KEY(gAAFillRectIndexBufferKey); | 19 GR_DECLARE_STATIC_UNIQUE_KEY(gAAFillRectIndexBufferKey); |
20 | 20 |
21 static void set_inset_fan(SkPoint* pts, size_t stride, | 21 static void set_inset_fan(SkPoint* pts, size_t stride, |
22 const SkRect& r, SkScalar dx, SkScalar dy) { | 22 const SkRect& r, SkScalar dx, SkScalar dy) { |
23 pts->setRectFan(r.fLeft + dx, r.fTop + dy, | 23 pts->setRectFan(r.fLeft + dx, r.fTop + dy, |
24 r.fRight - dx, r.fBottom - dy, stride); | 24 r.fRight - dx, r.fBottom - dy, stride); |
25 } | 25 } |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 AAFillRectBatchLocalMatrix::Geometry& geo = *batch->geometry(); | 450 AAFillRectBatchLocalMatrix::Geometry& geo = *batch->geometry(); |
451 geo.fColor = GrRandomColor(random); | 451 geo.fColor = GrRandomColor(random); |
452 geo.fViewMatrix = GrTest::TestMatrix(random); | 452 geo.fViewMatrix = GrTest::TestMatrix(random); |
453 geo.fLocalMatrix = GrTest::TestMatrix(random); | 453 geo.fLocalMatrix = GrTest::TestMatrix(random); |
454 geo.fDevRect = GrTest::TestRect(random); | 454 geo.fDevRect = GrTest::TestRect(random); |
455 batch->init(); | 455 batch->init(); |
456 return batch; | 456 return batch; |
457 } | 457 } |
458 | 458 |
459 #endif | 459 #endif |
OLD | NEW |