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

Unified Diff: cc/raster/one_copy_tile_task_worker_pool.cc

Issue 1266103005: cc: Handle overflow/underflow in MathUtil::RoundUp/RoundDown functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small nit. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/playback/pixel_ref_map.cc ('k') | cc/resources/resource_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/raster/one_copy_tile_task_worker_pool.cc
diff --git a/cc/raster/one_copy_tile_task_worker_pool.cc b/cc/raster/one_copy_tile_task_worker_pool.cc
index 78e6b106ce94308185987f79f3d47d8bd282c630..4fef126b9e70b23addfb52adb9d505b946124859 100644
--- a/cc/raster/one_copy_tile_task_worker_pool.cc
+++ b/cc/raster/one_copy_tile_task_worker_pool.cc
@@ -366,7 +366,7 @@ OneCopyTileTaskWorkerPool::PlaybackAndScheduleCopyOnWorkerThread(
int chunk_size_in_rows =
std::max(1, max_bytes_per_copy_operation_ / bytes_per_row);
// Align chunk size to 4. Required to support compressed texture formats.
- chunk_size_in_rows = MathUtil::RoundUp(chunk_size_in_rows, 4);
+ chunk_size_in_rows = MathUtil::UncheckedRoundUp(chunk_size_in_rows, 4);
int y = 0;
int height = raster_resource->size().height();
while (y < height) {
« no previous file with comments | « cc/playback/pixel_ref_map.cc ('k') | cc/resources/resource_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698