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

Side by Side Diff: include/effects/SkPoint3.h

Issue 1269383003: Remove SK_LEGACY_SKPOINT3_CTORS flag (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
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 | « include/effects/SkLightingImageFilter.h ('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 SkPoint3_DEFINED 8 #ifndef SkPoint3_DEFINED
9 #define SkPoint3_DEFINED 9 #define SkPoint3_DEFINED
10 10
11 #include "SkScalar.h" 11 #include "SkScalar.h"
12 12
13 struct SK_API SkPoint3 { 13 struct SK_API SkPoint3 {
14 SkScalar fX, fY, fZ; 14 SkScalar fX, fY, fZ;
15 15
16 #ifdef SK_LEGACY_SKPOINT3_CTORS
17 // TODO: remove these - they are needed for Chromium staging
18 SkPoint3() {}
19 SkPoint3(SkScalar x, SkScalar y, SkScalar z) : fX(x), fY(y), fZ(z) {}
20 #endif
21
22 static SkPoint3 Make(SkScalar x, SkScalar y, SkScalar z) { 16 static SkPoint3 Make(SkScalar x, SkScalar y, SkScalar z) {
23 SkPoint3 pt; 17 SkPoint3 pt;
24 pt.set(x, y, z); 18 pt.set(x, y, z);
25 return pt; 19 return pt;
26 } 20 }
27 21
28 SkScalar x() const { return fX; } 22 SkScalar x() const { return fX; }
29 SkScalar y() const { return fY; } 23 SkScalar y() const { return fY; }
30 SkScalar z() const { return fZ; } 24 SkScalar z() const { return fZ; }
31 25
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 99
106 SkScalar dot(const SkPoint3& vec) const { 100 SkScalar dot(const SkPoint3& vec) const {
107 return DotProduct(*this, vec); 101 return DotProduct(*this, vec);
108 } 102 }
109 }; 103 };
110 104
111 typedef SkPoint3 SkVector3; 105 typedef SkPoint3 SkVector3;
112 typedef SkPoint3 SkColor3f; 106 typedef SkPoint3 SkColor3f;
113 107
114 #endif 108 #endif
OLDNEW
« no previous file with comments | « include/effects/SkLightingImageFilter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698