Chromium Code Reviews| Index: cc/raster/tile_task_worker_pool.cc |
| diff --git a/cc/raster/tile_task_worker_pool.cc b/cc/raster/tile_task_worker_pool.cc |
| index f9862fbab1a203c56774038e5a86f0718787630f..f591097d7a9e763da1a078b9d1b51874485d32c8 100644 |
| --- a/cc/raster/tile_task_worker_pool.cc |
| +++ b/cc/raster/tile_task_worker_pool.cc |
| @@ -224,19 +224,25 @@ void TileTaskWorkerPool::PlaybackToMemory(void* memory, |
| skia::AdoptRef(SkSurface::NewRaster(info, &surface_props)); |
| skia::RefPtr<SkCanvas> canvas = skia::SharePtr(surface->getCanvas()); |
| canvas->setDrawFilter(image_filter.get()); |
| + // TODO(reveman): Improve partial raster support by reducing the size of |
| + // playback rect passed to PlaybackToCanvas. crbug.com/519070 |
| raster_source->PlaybackToCanvas(canvas.get(), canvas_bitmap_rect, |
| - canvas_playback_rect, scale); |
| - |
| - 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); |
| + canvas_bitmap_rect, scale); |
| + |
| + { |
| + TRACE_EVENT0("cc", "TileTaskWorkerPool::PlaybackToMemory::ConvertPixels"); |
|
vmpstr
2015/08/11 17:46:17
nit: can you add a trace at the top of the functio
reveman
2015/08/11 18:11:29
Done.
|
| + |
| + 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); |
| + } |
| } |
| } // namespace cc |