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

Unified Diff: cc/base/util.h

Issue 14230007: cc: Do GatherPixelRefs from skia at record time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more reviews Created 7 years, 8 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 | « no previous file | cc/resources/picture.h » ('j') | cc/resources/picture.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/util.h
diff --git a/cc/base/util.h b/cc/base/util.h
index b5a58c76b3b1199a4b9ebc0ce0bacc5a5dc78e36..e12d347b5797fc622de3611b8f22b00c7b1525a7 100644
--- a/cc/base/util.h
+++ b/cc/base/util.h
@@ -11,6 +11,11 @@ template <typename T> T RoundUp(T n, T mul) {
return ((n + mul - 1) / mul) * mul;
}
+template <typename T> T RoundDown(T value, T multiple) {
reveman 2013/04/24 14:10:52 nit: make the parameter names consistent with Roun
vmpstr 2013/04/24 21:11:10 Done.
+ return (value < 0) ? ((value - multiple + 1) / multiple) * multiple
+ : (value / multiple) * multiple;
reveman 2013/04/24 14:10:52 RoundUp doesn't seem to handle negative numbers co
vmpstr 2013/04/24 21:11:10 Done. I also checked and the current uses of Round
+}
+
} // namespace cc
#endif // CC_BASE_UTIL_H_
« no previous file with comments | « no previous file | cc/resources/picture.h » ('j') | cc/resources/picture.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698