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

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

Issue 1291663005: Revert of drawBitmapImage can batch across AA rects (Closed) Base URL: https://skia.googlesource.com/skia.git@gmfordrawimagerect
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
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | 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 "GrAAFillRectBatch.h"
12 #include "GrBWFillRectBatch.h" 12 #include "GrBWFillRectBatch.h"
13 #include "GrColor.h" 13 #include "GrColor.h"
14 14
15 class GrBatch; 15 class GrBatch;
16 class SkMatrix; 16 class SkMatrix;
17 struct SkRect; 17 struct SkRect;
18 class SkStrokeRec; 18 class SkStrokeRec;
19 19
20 /* 20 /*
21 * A factory for returning batches which can draw rectangles. 21 * A factory for returning batches which can draw rectangles.
22 */ 22 */
23 namespace GrRectBatchFactory { 23 namespace GrRectBatchFactory {
24 24
25 inline GrDrawBatch* CreateFillBW(GrColor color, 25 inline GrDrawBatch* CreateFillBW(GrColor color,
26 const SkMatrix& viewMatrix, 26 const SkMatrix& viewMatrix,
27 const SkRect& rect, 27 const SkRect& rect,
28 const SkRect* localRect, 28 const SkRect* localRect,
29 const SkMatrix* localMatrix) { 29 const SkMatrix* localMatrix) {
30 return GrBWFillRectBatch::Create(color, viewMatrix, rect, localRect, localMa trix); 30 return GrBWFillRectBatch::Create(color, viewMatrix, rect, localRect, localMa trix);
31 } 31 }
32 32
33 inline GrDrawBatch* CreateFillAA(GrColor color, 33 inline GrDrawBatch* CreateFillAA(GrColor color,
34 const SkMatrix& viewMatrix, 34 const SkMatrix& viewMatrix,
35 const SkRect& rect, 35 const SkRect& rect,
36 const SkRect& devRect) { 36 const SkRect& devRect) {
37 return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect); 37 return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect);
38 } 38 }
39 39
40 inline GrDrawBatch* CreateFillAA(GrColor color,
41 const SkMatrix& viewMatrix,
42 const SkMatrix& localMatrix,
43 const SkRect& rect,
44 const SkRect& devRect) {
45 return GrAAFillRectBatch::Create(color, viewMatrix, localMatrix, rect, devRe ct);
46 }
47
48 GrDrawBatch* CreateStrokeBW(GrColor color, 40 GrDrawBatch* CreateStrokeBW(GrColor color,
49 const SkMatrix& viewMatrix, 41 const SkMatrix& viewMatrix,
50 const SkRect& rect, 42 const SkRect& rect,
51 SkScalar strokeWidth, 43 SkScalar strokeWidth,
52 bool snapToPixelCenters); 44 bool snapToPixelCenters);
53 45
54 GrDrawBatch* CreateStrokeAA(GrColor, 46 GrDrawBatch* CreateStrokeAA(GrColor,
55 const SkMatrix& viewMatrix, 47 const SkMatrix& viewMatrix,
56 const SkRect& rect, 48 const SkRect& rect,
57 const SkRect& devRect, 49 const SkRect& devRect,
58 const SkStrokeRec& stroke); 50 const SkStrokeRec& stroke);
59 51
60 // First rect is outer; second rect is inner 52 // First rect is outer; second rect is inner
61 GrDrawBatch* CreateFillNestedRectsAA(GrColor, 53 GrDrawBatch* CreateFillNestedRectsAA(GrColor,
62 const SkMatrix& viewMatrix, 54 const SkMatrix& viewMatrix,
63 const SkRect rects[2]); 55 const SkRect rects[2]);
64 56
65 }; 57 };
66 58
67 #endif 59 #endif
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698