summaryrefslogtreecommitdiffstats
path: root/cc/raster
diff options
context:
space:
mode:
authorreveman <reveman@chromium.org>2015-11-20 10:37:46 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-20 18:38:23 +0000
commit4999636198979de49765e69fe1cad7486df87c95 (patch)
treeb6d087a676879a1c3b46096263bd963d2e61a6b4 /cc/raster
parentd25575fd25407ebd361a83621a8dfcb05c281c1c (diff)
downloadchromium_src-4999636198979de49765e69fe1cad7486df87c95.zip
chromium_src-4999636198979de49765e69fe1cad7486df87c95.tar.gz
chromium_src-4999636198979de49765e69fe1cad7486df87c95.tar.bz2
cc: Pass correct stride to SkCanvas::readPixels.
Use buffer stride as provided instead of assuming that it is width*bpp aligned to 4 bytes. BUG=531430,293728 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1466673002 Cr-Commit-Position: refs/heads/master@{#360863}
Diffstat (limited to 'cc/raster')
-rw-r--r--cc/raster/tile_task_worker_pool.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/cc/raster/tile_task_worker_pool.cc b/cc/raster/tile_task_worker_pool.cc
index 34c84cb..e1e6ac3 100644
--- a/cc/raster/tile_task_worker_pool.cc
+++ b/cc/raster/tile_task_worker_pool.cc
@@ -225,13 +225,8 @@ void TileTaskWorkerPool::PlaybackToMemory(
SkImageInfo dst_info =
SkImageInfo::Make(info.width(), info.height(), buffer_color_type,
info.alphaType(), info.profileType());
- // TODO(kaanb): The GL pipeline assumes a 4-byte alignment for the
- // bitmap data. There will be no need to call SkAlign4 once crbug.com/293728
- // is fixed.
- const size_t dst_row_bytes = SkAlign4(dst_info.minRowBytes());
- DCHECK_EQ(0u, dst_row_bytes % 4);
- bool success = canvas->readPixels(dst_info, memory, dst_row_bytes, 0, 0);
- DCHECK_EQ(true, success);
+ bool rv = canvas->readPixels(dst_info, memory, stride, 0, 0);
+ DCHECK(rv);
}
}