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

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

Issue 26167002: Make skia almost compile again with clang. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkMatrix.cpp ('k') | src/core/SkRTree.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
2 /* 1 /*
3 * Copyright 2009 The Android Open Source Project 2 * Copyright 2009 The Android Open Source Project
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9
10 #include "SkQuadClipper.h" 8 #include "SkQuadClipper.h"
11 #include "SkGeometry.h" 9 #include "SkGeometry.h"
12 10
13 static inline void clamp_le(SkScalar& value, SkScalar max) {
14 if (value > max) {
15 value = max;
16 }
17 }
18
19 static inline void clamp_ge(SkScalar& value, SkScalar min) {
20 if (value < min) {
21 value = min;
22 }
23 }
24
25 SkQuadClipper::SkQuadClipper() { 11 SkQuadClipper::SkQuadClipper() {
26 fClip.setEmpty(); 12 fClip.setEmpty();
27 } 13 }
28 14
29 void SkQuadClipper::setClip(const SkIRect& clip) { 15 void SkQuadClipper::setClip(const SkIRect& clip) {
30 // conver to scalars, since that's where we'll see the points 16 // conver to scalars, since that's where we'll see the points
31 fClip.set(clip); 17 fClip.set(clip);
32 } 18 }
33 19
34 /////////////////////////////////////////////////////////////////////////////// 20 ///////////////////////////////////////////////////////////////////////////////
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 105 }
120 } 106 }
121 } 107 }
122 } 108 }
123 109
124 if (reverse) { 110 if (reverse) {
125 SkTSwap<SkPoint>(dst[0], dst[2]); 111 SkTSwap<SkPoint>(dst[0], dst[2]);
126 } 112 }
127 return true; 113 return true;
128 } 114 }
OLDNEW
« no previous file with comments | « src/core/SkMatrix.cpp ('k') | src/core/SkRTree.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698