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

Unified Diff: cc/resources/image_raster_worker_pool.cc

Issue 454843002: cc: Do bitmap conversion for RasterBuffer in the worker thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. Created 6 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
Index: cc/resources/image_raster_worker_pool.cc
diff --git a/cc/resources/image_raster_worker_pool.cc b/cc/resources/image_raster_worker_pool.cc
index 8ac59d306ed332b48fee6649a68673395d2dbcaa..d0f75e13b90c262e7f12498528b6ca3cad4ffd02 100644
--- a/cc/resources/image_raster_worker_pool.cc
+++ b/cc/resources/image_raster_worker_pool.cc
@@ -141,16 +141,16 @@ void ImageRasterWorkerPool::CheckForCompletedTasks() {
completed_tasks_.clear();
}
-SkCanvas* ImageRasterWorkerPool::AcquireCanvasForRaster(RasterTask* task) {
- return resource_provider_->MapImageRasterBuffer(task->resource()->id());
+RasterBuffer* ImageRasterWorkerPool::AcquireBufferForRaster(RasterTask* task) {
+ return resource_provider_->AcquireImageRasterBuffer(task->resource()->id());
}
-void ImageRasterWorkerPool::ReleaseCanvasForRaster(RasterTask* task) {
- resource_provider_->UnmapImageRasterBuffer(task->resource()->id());
+void ImageRasterWorkerPool::ReleaseBufferForRaster(RasterTask* task) {
+ resource_provider_->ReleaseImageRasterBuffer(task->resource()->id());
- // Map/UnmapImageRasterBuffer provides direct access to the memory used by the
- // GPU. Read lock fences are required to ensure that we're not trying to map a
- // resource that is currently in-use by the GPU.
+ // Acquire/ReleaseImageRasterBuffer provides direct access to the memory used
+ // by the GPU. Read lock fences are required to ensure that we're not trying
+ // to map a resource that is currently in-use by the GPU.
resource_provider_->EnableReadLockFences(task->resource()->id());
}

Powered by Google App Engine
This is Rietveld 408576698