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

Issue 157293002: cc: Refactor WorkerPoolTaskClient::AcquireBufferForRaster (Closed)

Created:
6 years, 10 months ago by alokp
Modified:
6 years, 10 months ago
Reviewers:
reveman, vmpstr
CC:
chromium-reviews, cc-bugs_chromium.org, Vangelis Kokkevis, jbauman
Visibility:
Public.

Description

cc: Refactor WorkerPoolTaskClient::AcquireBufferForRaster With the introduction of GPU rasterization, we no longer rasterize to a bitmap. We rasterize directly to a texture-backed SkCanvas. This patch refactors AcquireBufferForRaster into AcquireCanvasForRaster to unify the API used by software and gpu rasterization. It also allows us to cache the gpu canvas with the resource so that we do not need to re-create it whenever a tile needs to be repainted. Creating a new gpu canvas is expensive on command-buffer - both on client and service side. The client side adds a flush every time an FBO is created or destroyed. The service side checks for FBO completeness. This patch eliminates the setup/destroy cost of gpu canvas. BUG=334492 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=250924

Patch Set 1 #

Patch Set 2 : rebase origin/master #

Patch Set 3 : implement acquire/release/map/unmap #

Total comments: 8

Patch Set 4 : addressed comments #

Patch Set 5 : rebase #

Patch Set 6 : updated unittests #

Total comments: 3

Patch Set 7 : rebase #

Patch Set 8 : added comments for the new API #

Patch Set 9 : fixed cc_perftests compile error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+531 lines, -240 lines) Patch
M cc/resources/image_raster_worker_pool.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M cc/resources/image_raster_worker_pool.cc View 1 2 3 4 5 6 1 chunk +10 lines, -8 lines 0 comments Download
M cc/resources/pixel_buffer_raster_worker_pool.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M cc/resources/pixel_buffer_raster_worker_pool.cc View 1 2 3 4 5 6 3 chunks +15 lines, -11 lines 0 comments Download
M cc/resources/raster_worker_pool.h View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M cc/resources/raster_worker_pool.cc View 1 2 3 4 5 6 11 chunks +16 lines, -99 lines 0 comments Download
M cc/resources/raster_worker_pool_perftest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -2 lines 0 comments Download
M cc/resources/raster_worker_pool_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -6 lines 0 comments Download
M cc/resources/resource_provider.h View 1 2 3 4 5 6 7 8 chunks +140 lines, -23 lines 0 comments Download
M cc/resources/resource_provider.cc View 1 2 3 4 5 6 15 chunks +289 lines, -34 lines 0 comments Download
M cc/resources/resource_provider_unittest.cc View 1 2 3 4 5 6 15 chunks +52 lines, -49 lines 0 comments Download
M cc/test/fake_tile_manager.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
alokp
I still need to update the unittests. Please let me know if the API seems ...
6 years, 10 months ago (2014-02-11 00:24:52 UTC) #1
reveman
This looks nice. https://codereview.chromium.org/157293002/diff/40001/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (left): https://codereview.chromium.org/157293002/diff/40001/cc/resources/raster_worker_pool.cc#oldcode315 cc/resources/raster_worker_pool.cc:315: } Where does this bitmap conversion ...
6 years, 10 months ago (2014-02-11 02:00:43 UTC) #2
alokp
https://codereview.chromium.org/157293002/diff/40001/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (left): https://codereview.chromium.org/157293002/diff/40001/cc/resources/raster_worker_pool.cc#oldcode315 cc/resources/raster_worker_pool.cc:315: } On 2014/02/11 02:00:44, David Reveman wrote: > Where ...
6 years, 10 months ago (2014-02-11 07:05:21 UTC) #3
alokp
Dave: This is ready to review. I have also updated the affected unit-tests to use ...
6 years, 10 months ago (2014-02-11 22:26:59 UTC) #4
reveman
https://codereview.chromium.org/157293002/diff/100002/cc/resources/resource_provider.h File cc/resources/resource_provider.h (right): https://codereview.chromium.org/157293002/diff/100002/cc/resources/resource_provider.h#newcode314 cc/resources/resource_provider.h:314: void UnmapDirectRasterBuffer(ResourceId id); Not clear to me what the ...
6 years, 10 months ago (2014-02-12 01:45:12 UTC) #5
alokp
https://codereview.chromium.org/157293002/diff/100002/cc/resources/resource_provider.h File cc/resources/resource_provider.h (right): https://codereview.chromium.org/157293002/diff/100002/cc/resources/resource_provider.h#newcode314 cc/resources/resource_provider.h:314: void UnmapDirectRasterBuffer(ResourceId id); On 2014/02/12 01:45:12, David Reveman wrote: ...
6 years, 10 months ago (2014-02-12 07:17:42 UTC) #6
reveman
Sorry for delay here and thanks for being patient with me. I think I just ...
6 years, 10 months ago (2014-02-12 17:23:39 UTC) #7
alokp
+jbauman I agree. We should move GPU raster to a separate RWP. Please let me ...
6 years, 10 months ago (2014-02-12 18:13:00 UTC) #8
alokp
The CQ bit was checked by alokp@chromium.org
6 years, 10 months ago (2014-02-12 19:39:48 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alokp@chromium.org/157293002/390001
6 years, 10 months ago (2014-02-12 19:55:42 UTC) #10
commit-bot: I haz the power
6 years, 10 months ago (2014-02-13 03:48:19 UTC) #11
Message was sent while issue was closed.
Change committed as 250924

Powered by Google App Engine
This is Rietveld 408576698