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

Unified Diff: cc/raster/tile_task_worker_pool.cc

Issue 1248253003: Add better support for RGBA_4444 textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO and fix rebase 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/raster/one_copy_tile_task_worker_pool.cc ('k') | cc/raster/zero_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « cc/raster/one_copy_tile_task_worker_pool.cc ('k') | cc/raster/zero_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698