blob: 70ceac2c397b1a1e533308bbcf22fdbeaca1d9aa [file] [log] [blame]
joshualittecd1a692015-08-10 10:08:26 -07001/*
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
13class GrBatch;
14class SkMatrix;
15struct SkRect;
16
17/*
18 * A factory for returning batches which can draw rectangles. Right now this only handles non-AA
19 * rects
20 */
21namespace GrRectBatchFactory {
22
joshualitt7fc2a262015-08-10 10:30:14 -070023GrBatch* CreateFillBW(GrColor color,
24 const SkMatrix& viewMatrix,
25 const SkRect& rect,
26 const SkRect* localRect,
27 const SkMatrix* localMatrix);
28
29GrBatch* CreateStrokeBW(GrColor color,
30 const SkMatrix& viewMatrix,
31 const SkRect& rect,
32 SkScalar strokeWidth,
33 bool snapToPixelCenters);
joshualittecd1a692015-08-10 10:08:26 -070034
35};
36
37#endif