joshualitt | ecd1a69 | 2015-08-10 10:08:26 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrRectBatchFactory_DEFINED |
| 9 | #define GrRectBatchFactory_DEFINED |
| 10 | |
| 11 | #include "GrColor.h" |
| 12 | |
| 13 | class GrBatch; |
| 14 | class SkMatrix; |
| 15 | struct SkRect; |
| 16 | |
| 17 | /* |
| 18 | * A factory for returning batches which can draw rectangles. Right now this only handles non-AA |
| 19 | * rects |
| 20 | */ |
| 21 | namespace GrRectBatchFactory { |
| 22 | |
joshualitt | 7fc2a26 | 2015-08-10 10:30:14 -0700 | [diff] [blame] | 23 | GrBatch* CreateFillBW(GrColor color, |
| 24 | const SkMatrix& viewMatrix, |
| 25 | const SkRect& rect, |
| 26 | const SkRect* localRect, |
| 27 | const SkMatrix* localMatrix); |
| 28 | |
| 29 | GrBatch* CreateStrokeBW(GrColor color, |
| 30 | const SkMatrix& viewMatrix, |
| 31 | const SkRect& rect, |
| 32 | SkScalar strokeWidth, |
| 33 | bool snapToPixelCenters); |
joshualitt | ecd1a69 | 2015-08-10 10:08:26 -0700 | [diff] [blame] | 34 | |
| 35 | }; |
| 36 | |
| 37 | #endif |