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

Unified Diff: src/utils/SkCamera.cpp

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkFontHost_win_dw.cpp ('k') | src/utils/SkPathUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkCamera.cpp
diff --git a/src/utils/SkCamera.cpp b/src/utils/SkCamera.cpp
index a7c0b1483d833dab1e52cb5793e251a16a0c80c5..f5b51d52595deaf7200d7e7b71f63451e5afb3ad 100644
--- a/src/utils/SkCamera.cpp
+++ b/src/utils/SkCamera.cpp
@@ -365,23 +365,23 @@ void Sk3DView::restore() {
#ifdef SK_BUILD_FOR_ANDROID
void Sk3DView::setCameraLocation(SkScalar x, SkScalar y, SkScalar z) {
// the camera location is passed in inches, set in pt
- SkScalar lz = z * SkFloatToScalar(72.0f);
- fCamera.fLocation.set(x * SkFloatToScalar(72.0f), y * SkFloatToScalar(72.0f), lz);
+ SkScalar lz = z * 72.0f;
+ fCamera.fLocation.set(x * 72.0f, y * 72.0f, lz);
fCamera.fObserver.set(0, 0, lz);
fCamera.update();
}
SkScalar Sk3DView::getCameraLocationX() {
- return fCamera.fLocation.fX / SkFloatToScalar(72.0f);
+ return fCamera.fLocation.fX / 72.0f;
}
SkScalar Sk3DView::getCameraLocationY() {
- return fCamera.fLocation.fY / SkFloatToScalar(72.0f);
+ return fCamera.fLocation.fY / 72.0f;
}
SkScalar Sk3DView::getCameraLocationZ() {
- return fCamera.fLocation.fZ / SkFloatToScalar(72.0f);
+ return fCamera.fLocation.fZ / 72.0f;
}
#endif
« no previous file with comments | « src/ports/SkFontHost_win_dw.cpp ('k') | src/utils/SkPathUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698