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

Unified Diff: ui/gfx/vector3d_f.cc

Issue 12335009: Implementation of principal-component color reduction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« ui/gfx/color_utils_unittest.cc ('K') | « ui/gfx/vector3d_f.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/vector3d_f.cc
diff --git a/ui/gfx/vector3d_f.cc b/ui/gfx/vector3d_f.cc
index 02f0378832491261cca41986fefe7abedee86502..a6fd6116d47d2ff3509942c85fe90221905fac1a 100644
--- a/ui/gfx/vector3d_f.cc
+++ b/ui/gfx/vector3d_f.cc
@@ -72,8 +72,8 @@ void Vector3dF::Cross(const Vector3dF& other) {
z_ = z;
}
-float DotProduct(const Vector3dF& lhs, const Vector3dF& rhs) {
- return lhs.x() * rhs.x() + lhs.y() * rhs.y() + lhs.z() * rhs.z();
+float DotProduct(const Vector3dF& lhs, float x, float y, float z) {
Alexei Svitkine (slow) 2013/02/21 16:49:59 Instead of this, can you make a Vector3dF construc
motek. 2013/02/21 18:38:43 Well, I would need to call this, in a typical imag
reed1 2013/02/21 19:36:37 +1 -- the inner loop is no place to unnecessarily
Alexei Svitkine (slow) 2013/02/21 19:54:31 I'd be surprised if the compilers we use don't pro
reed1 2013/02/21 19:57:09 Possibly, or the reverse, where we would need a co
+ return lhs.x() * x + lhs.y() * y + lhs.z() * z;
}
Vector3dF ScaleVector3d(const Vector3dF& v,
« ui/gfx/color_utils_unittest.cc ('K') | « ui/gfx/vector3d_f.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698