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

Side by Side Diff: include/core/SkDraw.h

Issue 1955633002: Take SkStrokeRec::InitStyle rather than SkPaint::Style in mask filter and DrawMask (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix xps change Created 4 years, 7 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 | « no previous file | include/core/SkMaskFilter.h » ('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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkDraw_DEFINED 10 #ifndef SkDraw_DEFINED
11 #define SkDraw_DEFINED 11 #define SkDraw_DEFINED
12 12
13 #include "SkCanvas.h" 13 #include "SkCanvas.h"
14 #include "SkMask.h" 14 #include "SkMask.h"
15 #include "SkPaint.h" 15 #include "SkPaint.h"
16 #include "SkStrokeRec.h"
16 17
17 class SkBitmap; 18 class SkBitmap;
18 class SkClipStack; 19 class SkClipStack;
19 class SkBaseDevice; 20 class SkBaseDevice;
20 class SkBlitter; 21 class SkBlitter;
21 class SkMatrix; 22 class SkMatrix;
22 class SkPath; 23 class SkPath;
23 class SkRegion; 24 class SkRegion;
24 class SkRasterClip; 25 class SkRasterClip;
25 struct SkDrawProcs; 26 struct SkDrawProcs;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 87 }
87 88
88 /** Helper function that creates a mask from a path and an optional maskfilt er. 89 /** Helper function that creates a mask from a path and an optional maskfilt er.
89 Note however, that the resulting mask will not have been actually filter ed, 90 Note however, that the resulting mask will not have been actually filter ed,
90 that must be done afterwards (by calling filterMask). The maskfilter is provided 91 that must be done afterwards (by calling filterMask). The maskfilter is provided
91 solely to assist in computing the mask's bounds (if the mode requests th at). 92 solely to assist in computing the mask's bounds (if the mode requests th at).
92 */ 93 */
93 static bool DrawToMask(const SkPath& devPath, const SkIRect* clipBounds, 94 static bool DrawToMask(const SkPath& devPath, const SkIRect* clipBounds,
94 const SkMaskFilter*, const SkMatrix* filterMatrix, 95 const SkMaskFilter*, const SkMatrix* filterMatrix,
95 SkMask* mask, SkMask::CreateMode mode, 96 SkMask* mask, SkMask::CreateMode mode,
96 SkPaint::Style style); 97 SkStrokeRec::InitStyle style);
97 98
98 enum RectType { 99 enum RectType {
99 kHair_RectType, 100 kHair_RectType,
100 kFill_RectType, 101 kFill_RectType,
101 kStroke_RectType, 102 kStroke_RectType,
102 kPath_RectType 103 kPath_RectType
103 }; 104 };
104 105
105 /** 106 /**
106 * Based on the paint's style, strokeWidth, and the matrix, classify how 107 * Based on the paint's style, strokeWidth, and the matrix, classify how
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 SkBaseDevice* fDevice; // optional, may be null 152 SkBaseDevice* fDevice; // optional, may be null
152 153
153 #ifdef SK_DEBUG 154 #ifdef SK_DEBUG
154 void validate() const; 155 void validate() const;
155 #else 156 #else
156 void validate() const {} 157 void validate() const {}
157 #endif 158 #endif
158 }; 159 };
159 160
160 #endif 161 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkMaskFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698