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

Side by Side Diff: src/core/SkScan.cpp

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
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 #include "SkScan.h" 10 #include "SkScan.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 void SkScan::FillXRect(const SkXRect& xr, const SkRegion* clip, 48 void SkScan::FillXRect(const SkXRect& xr, const SkRegion* clip,
49 SkBlitter* blitter) { 49 SkBlitter* blitter) {
50 SkIRect r; 50 SkIRect r;
51 51
52 XRect_round(xr, &r); 52 XRect_round(xr, &r);
53 SkScan::FillIRect(r, clip, blitter); 53 SkScan::FillIRect(r, clip, blitter);
54 } 54 }
55 55
56 #ifdef SK_SCALAR_IS_FLOAT
57
58 void SkScan::FillRect(const SkRect& r, const SkRegion* clip, 56 void SkScan::FillRect(const SkRect& r, const SkRegion* clip,
59 SkBlitter* blitter) { 57 SkBlitter* blitter) {
60 SkIRect ir; 58 SkIRect ir;
61 59
62 r.round(&ir); 60 r.round(&ir);
63 SkScan::FillIRect(ir, clip, blitter); 61 SkScan::FillIRect(ir, clip, blitter);
64 } 62 }
65 63
66 #endif
67
68 /////////////////////////////////////////////////////////////////////////////// 64 ///////////////////////////////////////////////////////////////////////////////
69 65
70 void SkScan::FillIRect(const SkIRect& r, const SkRasterClip& clip, 66 void SkScan::FillIRect(const SkIRect& r, const SkRasterClip& clip,
71 SkBlitter* blitter) { 67 SkBlitter* blitter) {
72 if (clip.isEmpty() || r.isEmpty()) { 68 if (clip.isEmpty() || r.isEmpty()) {
73 return; 69 return;
74 } 70 }
75 71
76 if (clip.isBW()) { 72 if (clip.isBW()) {
77 FillIRect(r, &clip.bwRgn(), blitter); 73 FillIRect(r, &clip.bwRgn(), blitter);
(...skipping 12 matching lines...) Expand all
90 86
91 if (clip.isBW()) { 87 if (clip.isBW()) {
92 FillXRect(xr, &clip.bwRgn(), blitter); 88 FillXRect(xr, &clip.bwRgn(), blitter);
93 return; 89 return;
94 } 90 }
95 91
96 SkAAClipBlitterWrapper wrapper(clip, blitter); 92 SkAAClipBlitterWrapper wrapper(clip, blitter);
97 FillXRect(xr, &wrapper.getRgn(), wrapper.getBlitter()); 93 FillXRect(xr, &wrapper.getRgn(), wrapper.getBlitter());
98 } 94 }
99 95
100 #ifdef SK_SCALAR_IS_FLOAT
101
102 void SkScan::FillRect(const SkRect& r, const SkRasterClip& clip, 96 void SkScan::FillRect(const SkRect& r, const SkRasterClip& clip,
103 SkBlitter* blitter) { 97 SkBlitter* blitter) {
104 if (clip.isEmpty() || r.isEmpty()) { 98 if (clip.isEmpty() || r.isEmpty()) {
105 return; 99 return;
106 } 100 }
107 101
108 if (clip.isBW()) { 102 if (clip.isBW()) {
109 FillRect(r, &clip.bwRgn(), blitter); 103 FillRect(r, &clip.bwRgn(), blitter);
110 return; 104 return;
111 } 105 }
112 106
113 SkAAClipBlitterWrapper wrapper(clip, blitter); 107 SkAAClipBlitterWrapper wrapper(clip, blitter);
114 FillRect(r, &wrapper.getRgn(), wrapper.getBlitter()); 108 FillRect(r, &wrapper.getRgn(), wrapper.getBlitter());
115 } 109 }
116
117 #endif
OLDNEW
« src/core/SkCanvas.cpp ('K') | « src/core/SkScan.h ('k') | src/core/SkScan_AntiPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698