Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: src/gpu/batches/GrRectBatchFactory.h

Issue 1294553003: Move GrRectBatch to GrBWFillRectBatch and make internal (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef GrRectBatchFactory_DEFINED 8 #ifndef GrRectBatchFactory_DEFINED
9 #define GrRectBatchFactory_DEFINED 9 #define GrRectBatchFactory_DEFINED
10 10
11 #include "GrAAFillRectBatch.h" 11 #include "GrAAFillRectBatch.h"
12 #include "GrBWFillRectBatch.h"
12 #include "GrColor.h" 13 #include "GrColor.h"
13 14
14 class GrBatch; 15 class GrBatch;
15 class SkMatrix; 16 class SkMatrix;
16 struct SkRect; 17 struct SkRect;
17 class SkStrokeRec; 18 class SkStrokeRec;
18 19
19 /* 20 /*
20 * A factory for returning batches which can draw rectangles. 21 * A factory for returning batches which can draw rectangles.
21 */ 22 */
22 namespace GrRectBatchFactory { 23 namespace GrRectBatchFactory {
23 24
24 GrBatch* CreateFillBW(GrColor color, 25 inline GrBatch* CreateFillBW(GrColor color,
25 const SkMatrix& viewMatrix, 26 const SkMatrix& viewMatrix,
26 const SkRect& rect, 27 const SkRect& rect,
27 const SkRect* localRect, 28 const SkRect* localRect,
28 const SkMatrix* localMatrix); 29 const SkMatrix* localMatrix) {
30 return GrBWFillRectBatch::Create(color, viewMatrix, rect, localRect, localMa trix);
31 }
29 32
30 static GrBatch* CreateFillAA(GrColor color, 33 inline GrBatch* CreateFillAA(GrColor color,
31 const SkMatrix& viewMatrix, 34 const SkMatrix& viewMatrix,
32 const SkRect& rect, 35 const SkRect& rect,
33 const SkRect& devRect) { 36 const SkRect& devRect) {
34 return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect); 37 return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect);
35 } 38 }
36 39
37 GrBatch* CreateStrokeBW(GrColor color, 40 GrBatch* CreateStrokeBW(GrColor color,
38 const SkMatrix& viewMatrix, 41 const SkMatrix& viewMatrix,
39 const SkRect& rect, 42 const SkRect& rect,
40 SkScalar strokeWidth, 43 SkScalar strokeWidth,
41 bool snapToPixelCenters); 44 bool snapToPixelCenters);
42 45
43 GrBatch* CreateStrokeAA(GrColor, 46 GrBatch* CreateStrokeAA(GrColor,
44 const SkMatrix& viewMatrix, 47 const SkMatrix& viewMatrix,
45 const SkRect& rect, 48 const SkRect& rect,
46 const SkRect& devRect, 49 const SkRect& devRect,
47 const SkStrokeRec& stroke); 50 const SkStrokeRec& stroke);
48 51
49 // First rect is outer; second rect is inner 52 // First rect is outer; second rect is inner
50 GrBatch* CreateFillNestedRectsAA(GrColor, 53 GrBatch* CreateFillNestedRectsAA(GrColor,
51 const SkMatrix& viewMatrix, 54 const SkMatrix& viewMatrix,
52 const SkRect rects[2]); 55 const SkRect rects[2]);
53 56
54 }; 57 };
55 58
56 #endif 59 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698