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

Issue 595553002: Use the skmultipicture to perform GPU rasterization (Closed)

Created:
6 years, 3 months ago by hendrikw
Modified:
6 years, 3 months ago
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

cc: Use SkMultiPicture for GPU rasterization GpuRasterWorkerPool holds an SkMultiPicture, the RasterBufferImpl is created with a pointer to SkMultiPicture, and returns the SkPictureRecorder's canvas when AquireSkCanvas is called. When the canvas is released, we get the surface canvas and pass it to the multipicture along with the recorded picture. When we're finished with all of the tiles, we draw the multipicture. Updated Picture::Raster() to call canvas->drawPicture(), instead of picture->draw(). This is required to prevent parsing the skia ops twice when using the multipicturedraw, since picture->draw() always parses the ops, whereas canvas->drawPicture() might parse the ops, or it might simply place the whole picture on the canvas (as it will for the recorder's canvas) BUG=skia:2315 Committed: https://crrev.com/04cea97063df4790c91607bce25000c07119028e Cr-Commit-Position: refs/heads/master@{#296227}

Patch Set 1 #

Total comments: 12

Patch Set 2 : If we don't have a surface, return a nullcanvas #

Patch Set 3 : Fixed comment and bad if statement #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -7 lines) Patch
M cc/resources/gpu_raster_worker_pool.h View 2 chunks +2 lines, -0 lines 0 comments Download
M cc/resources/gpu_raster_worker_pool.cc View 1 2 5 chunks +25 lines, -6 lines 0 comments Download
M cc/resources/picture.cc View 1 2 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 21 (3 generated)
hendrikw
PTAL
6 years, 3 months ago (2014-09-22 15:53:28 UTC) #2
robertphillips
The Skia calls look good but I defer to others for the embedding in gpu_raster_worker_pool.
6 years, 3 months ago (2014-09-22 17:05:52 UTC) #4
reveman
https://codereview.chromium.org/595553002/diff/1/cc/resources/gpu_raster_worker_pool.cc File cc/resources/gpu_raster_worker_pool.cc (right): https://codereview.chromium.org/595553002/diff/1/cc/resources/gpu_raster_worker_pool.cc#newcode45 cc/resources/gpu_raster_worker_pool.cc:45: canvas->save(); do we still need this save/restore pair? https://codereview.chromium.org/595553002/diff/1/cc/resources/gpu_raster_worker_pool.cc#newcode55 ...
6 years, 3 months ago (2014-09-22 21:29:05 UTC) #5
hendrikw
https://codereview.chromium.org/595553002/diff/1/cc/resources/gpu_raster_worker_pool.cc File cc/resources/gpu_raster_worker_pool.cc (right): https://codereview.chromium.org/595553002/diff/1/cc/resources/gpu_raster_worker_pool.cc#newcode45 cc/resources/gpu_raster_worker_pool.cc:45: canvas->save(); On 2014/09/22 21:29:05, reveman wrote: > do we ...
6 years, 3 months ago (2014-09-22 21:48:39 UTC) #6
hendrikw
On 2014/09/22 21:48:39, Hendrik wrote: > https://codereview.chromium.org/595553002/diff/1/cc/resources/gpu_raster_worker_pool.cc > File cc/resources/gpu_raster_worker_pool.cc (right): > > https://codereview.chromium.org/595553002/diff/1/cc/resources/gpu_raster_worker_pool.cc#newcode45 > ...
6 years, 3 months ago (2014-09-22 22:04:25 UTC) #7
hendrikw
Updated to return the null canvas immediately if we're missing the surface, added a comment, ...
6 years, 3 months ago (2014-09-22 22:32:16 UTC) #8
reveman
lgtm after adding a comment to picture.cc https://codereview.chromium.org/595553002/diff/1/cc/resources/gpu_raster_worker_pool.cc File cc/resources/gpu_raster_worker_pool.cc (right): https://codereview.chromium.org/595553002/diff/1/cc/resources/gpu_raster_worker_pool.cc#newcode45 cc/resources/gpu_raster_worker_pool.cc:45: canvas->save(); On ...
6 years, 3 months ago (2014-09-22 22:41:09 UTC) #9
robertphillips
https://codereview.chromium.org/595553002/diff/1/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/595553002/diff/1/cc/resources/picture.cc#newcode357 cc/resources/picture.cc:357: } We have renamed SkPicture::draw to be SkPicture::playback in ...
6 years, 3 months ago (2014-09-23 12:54:55 UTC) #10
reveman
https://codereview.chromium.org/595553002/diff/1/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/595553002/diff/1/cc/resources/picture.cc#newcode357 cc/resources/picture.cc:357: } On 2014/09/23 12:54:55, robertphillips wrote: > We have ...
6 years, 3 months ago (2014-09-23 14:59:46 UTC) #11
hendrikw
On 2014/09/23 14:59:46, reveman wrote: > https://codereview.chromium.org/595553002/diff/1/cc/resources/picture.cc > File cc/resources/picture.cc (right): > > https://codereview.chromium.org/595553002/diff/1/cc/resources/picture.cc#newcode357 > ...
6 years, 3 months ago (2014-09-23 15:39:12 UTC) #12
hendrikw
Fixed comments and wrong early return
6 years, 3 months ago (2014-09-23 15:41:53 UTC) #13
reveman
lgtm but please adjust the description before landing. it should preferably be in this format: ...
6 years, 3 months ago (2014-09-23 16:25:10 UTC) #14
robertphillips
> Robert, should I wait for the skia roll before committing this? There will be ...
6 years, 3 months ago (2014-09-23 16:43:41 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/595553002/40001
6 years, 3 months ago (2014-09-23 16:49:36 UTC) #17
hendrikw
On 2014/09/23 16:43:41, robertphillips wrote: > > Robert, should I wait for the skia roll ...
6 years, 3 months ago (2014-09-23 16:58:57 UTC) #18
robertphillips
> But only if we call drawPicture(), since we call draw() in this case, we ...
6 years, 3 months ago (2014-09-23 17:12:13 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001) as 3174de34644c359462ce0595fc4125d76f829332
6 years, 3 months ago (2014-09-23 20:51:01 UTC) #20
commit-bot: I haz the power
6 years, 3 months ago (2014-09-23 20:51:33 UTC) #21
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/04cea97063df4790c91607bce25000c07119028e
Cr-Commit-Position: refs/heads/master@{#296227}

Powered by Google App Engine
This is Rietveld 408576698