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

Unified Diff: Source/core/platform/graphics/IntPoint.cpp

Issue 18551004: Miscellaneous cleanup to reduce number of includes in platform/graphics/ Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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
« no previous file with comments | « Source/core/platform/graphics/IntPoint.h ('k') | Source/core/platform/graphics/RoundedRect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/IntPoint.cpp
diff --git a/Source/core/loader/UniqueIdentifier.cpp b/Source/core/platform/graphics/IntPoint.cpp
similarity index 88%
copy from Source/core/loader/UniqueIdentifier.cpp
copy to Source/core/platform/graphics/IntPoint.cpp
index 0ad56563e3e214a67acd8c53decb085ad4250cb9..c4e18b9960ceaccdd0a202986f6d2d8c11c645cf 100644
--- a/Source/core/loader/UniqueIdentifier.cpp
+++ b/Source/core/platform/graphics/IntPoint.cpp
@@ -29,16 +29,16 @@
*/
#include "config.h"
-#include "core/loader/UniqueIdentifier.h"
+#include "core/platform/graphics/IntPoint.h"
-namespace WebCore {
+#include "wtf/MathExtras.h"
-static unsigned long s_uniqueIdentifier = 0;
+namespace WebCore {
-unsigned long createUniqueIdentifier()
+void IntPoint::scale(float sx, float sy)
{
- return ++s_uniqueIdentifier;
+ m_x = lroundf(static_cast<float>(m_x * sx));
+ m_y = lroundf(static_cast<float>(m_y * sy));
}
} // namespace WebCore
-
« no previous file with comments | « Source/core/platform/graphics/IntPoint.h ('k') | Source/core/platform/graphics/RoundedRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698