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

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

Issue 1278043003: Move AAFillRect into CPP for templatization (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more 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
« no previous file with comments | « src/gpu/batches/GrAAFillRectBatch.cpp ('k') | src/gpu/batches/GrRectBatchFactory.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "GrColor.h" 12 #include "GrColor.h"
12 13
13 class GrBatch; 14 class GrBatch;
14 class SkMatrix; 15 class SkMatrix;
15 struct SkRect; 16 struct SkRect;
16 class SkStrokeRec; 17 class SkStrokeRec;
17 18
18 /* 19 /*
19 * A factory for returning batches which can draw rectangles. 20 * A factory for returning batches which can draw rectangles.
20 */ 21 */
21 namespace GrRectBatchFactory { 22 namespace GrRectBatchFactory {
22 23
23 GrBatch* CreateFillBW(GrColor color, 24 GrBatch* CreateFillBW(GrColor color,
24 const SkMatrix& viewMatrix, 25 const SkMatrix& viewMatrix,
25 const SkRect& rect, 26 const SkRect& rect,
26 const SkRect* localRect, 27 const SkRect* localRect,
27 const SkMatrix* localMatrix); 28 const SkMatrix* localMatrix);
28 29
29 GrBatch* CreateFillAA(GrColor color, 30 static GrBatch* CreateFillAA(GrColor color,
30 const SkMatrix& viewMatrix, 31 const SkMatrix& viewMatrix,
31 const SkRect& rect, 32 const SkRect& rect,
32 const SkRect& devRect); 33 const SkRect& devRect) {
34 return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect);
35 }
33 36
34 GrBatch* CreateStrokeBW(GrColor color, 37 GrBatch* CreateStrokeBW(GrColor color,
35 const SkMatrix& viewMatrix, 38 const SkMatrix& viewMatrix,
36 const SkRect& rect, 39 const SkRect& rect,
37 SkScalar strokeWidth, 40 SkScalar strokeWidth,
38 bool snapToPixelCenters); 41 bool snapToPixelCenters);
39 42
40 GrBatch* CreateStrokeAA(GrColor, 43 GrBatch* CreateStrokeAA(GrColor,
41 const SkMatrix& viewMatrix, 44 const SkMatrix& viewMatrix,
42 const SkRect& rect, 45 const SkRect& rect,
43 const SkRect& devRect, 46 const SkRect& devRect,
44 const SkStrokeRec& stroke); 47 const SkStrokeRec& stroke);
45 48
46 // First rect is outer; second rect is inner 49 // First rect is outer; second rect is inner
47 GrBatch* CreateFillNestedRectsAA(GrColor, 50 GrBatch* CreateFillNestedRectsAA(GrColor,
48 const SkMatrix& viewMatrix, 51 const SkMatrix& viewMatrix,
49 const SkRect rects[2]); 52 const SkRect rects[2]);
50 53
51 }; 54 };
52 55
53 #endif 56 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAFillRectBatch.cpp ('k') | src/gpu/batches/GrRectBatchFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698