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

Issue 12194015: cc: Rasterize cheap tiles immediately (Closed)

Created:
7 years, 10 months ago by Sami
Modified:
7 years, 10 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, brianderson
Visibility:
Public.

Description

cc: Rasterize cheap tiles immediately Rasterize cheap tiles immediately on the impl thread instead of delegating them to the raster workers. This improves tile update latency, because it avoids the communication and synchronization overhead with the worker threads. BUG=173426 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=183608

Patch Set 1 #

Total comments: 12

Patch Set 2 : Refactoring. Limit number of pending uploads. #

Patch Set 3 : Cleanup. #

Patch Set 4 : Limit number of rasters and time spent rasterizing. #

Patch Set 5 : Respect smoothness mode. #

Patch Set 6 : Trace event for cheap rasters that weren't. #

Total comments: 24

Patch Set 7 : Consider tiles with finished decodes for cheap raster. Deadline for cheap rasters. LTHI in charge o… #

Patch Set 8 : Rebased. #

Total comments: 1

Patch Set 9 : Nat's suggestion for posterity. #

Patch Set 10 : Schedule cheap tasks in worker pool. #

Total comments: 4

Patch Set 11 : David's feedback. Fixed double destruction of picture_pile_ for cheap tasks. #

Patch Set 12 : Post a task to run cheap tasks. #

Total comments: 14

Patch Set 13 : Add ScheduleRunCheapTasks. #

Patch Set 14 : Clone pictures for cheap tasks too. #

Patch Set 15 : Call RunCheapTasks from TileManager. #

Patch Set 16 : Fix picture pile reference management. Post a task for running cheap tasks. #

Total comments: 10

Patch Set 17 : David's comments. #

Total comments: 3

Patch Set 18 : Refactoring PostTask. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -73 lines) Patch
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M cc/picture.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M cc/picture.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M cc/raster_worker_pool.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M cc/raster_worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +9 lines, -8 lines 0 comments Download
M cc/tile_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +5 lines, -7 lines 0 comments Download
M cc/tile_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 10 chunks +24 lines, -32 lines 0 comments Download
M cc/worker_pool.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +23 lines, -5 lines 0 comments Download
M cc/worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 12 chunks +110 lines, -19 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
Sami
https://codereview.chromium.org/12194015/diff/1/cc/tile_manager.cc File cc/tile_manager.cc (right): https://codereview.chromium.org/12194015/diff/1/cc/tile_manager.cc#newcode655 cc/tile_manager.cc:655: RunRasterTask(resource_pool_->resource_provider()->mapPixelBuffer( Just checking: do I need to clone the ...
7 years, 10 months ago (2013-02-04 13:37:48 UTC) #1
Sami
[+brianderson@]
7 years, 10 months ago (2013-02-04 13:47:45 UTC) #2
nduca
+reveman
7 years, 10 months ago (2013-02-04 22:02:00 UTC) #3
vangelis
https://codereview.chromium.org/12194015/diff/1/cc/tile_manager.cc File cc/tile_manager.cc (right): https://codereview.chromium.org/12194015/diff/1/cc/tile_manager.cc#newcode655 cc/tile_manager.cc:655: RunRasterTask(resource_pool_->resource_provider()->mapPixelBuffer( On 2013/02/04 13:37:48, Sami wrote: > Just checking: ...
7 years, 10 months ago (2013-02-04 22:33:50 UTC) #4
reveman
think some simple re-factoring can help make this look more as part of the tile ...
7 years, 10 months ago (2013-02-04 22:53:24 UTC) #5
Sami
On 2013/02/04 22:33:50, vangelis wrote: > You're already on the impl thread here. It doesn't ...
7 years, 10 months ago (2013-02-05 10:47:54 UTC) #6
Sami
This version addresses all comments. I've also added a check against the maximum number of ...
7 years, 10 months ago (2013-02-05 12:26:23 UTC) #7
Sami
I decided to implement the max count/time for cheap rasters in this patch since it ...
7 years, 10 months ago (2013-02-05 15:32:43 UTC) #8
reveman
My greatest concern here is what the effect of looping for 6ms in DispatchMoreTasks without ...
7 years, 10 months ago (2013-02-05 20:59:13 UTC) #9
nduca
I think your concerns are valid, but do you think that given that this is ...
7 years, 10 months ago (2013-02-05 23:47:06 UTC) #10
nduca
Talked offline with @reveman. Lets get this landed behind a flag with the comments before ...
7 years, 10 months ago (2013-02-06 08:21:13 UTC) #11
nduca
https://codereview.chromium.org/12194015/diff/16001/cc/layer_tree_host_impl.cc File cc/layer_tree_host_impl.cc (right): https://codereview.chromium.org/12194015/diff/16001/cc/layer_tree_host_impl.cc#newcode850 cc/layer_tree_host_impl.cc:850: m_tileManager->ResetCheapRasterBudget(); Please invert the direciton of this; tile manager ...
7 years, 10 months ago (2013-02-06 08:34:57 UTC) #12
Sami
Thanks for the in-depth review guys. This should address all comments. Setting the frame period ...
7 years, 10 months ago (2013-02-06 15:25:14 UTC) #13
Sami
FYI, I'm seeing some crashes on Android with this patch combined with sync uploads -- ...
7 years, 10 months ago (2013-02-08 19:09:04 UTC) #14
Sami
The crash was happening because DispatchMoreTasks() isn't re-entrant and as a side effect of DidUploadVisibleHighResolutionTile() ...
7 years, 10 months ago (2013-02-11 19:55:38 UTC) #15
Sami
Since the Nexus 4 problems only affect async uploads (i.e., https://codereview.chromium.org/12185024/), I don't think there's ...
7 years, 10 months ago (2013-02-11 22:47:45 UTC) #16
nduca
Do you have a clean blacklisting story for n4?
7 years, 10 months ago (2013-02-11 22:49:40 UTC) #17
nduca
Can you give this another spin based on the feedback below? https://codereview.chromium.org/12194015/diff/16011/cc/tile_manager.cc File cc/tile_manager.cc (right): ...
7 years, 10 months ago (2013-02-13 07:17:56 UTC) #18
reveman
In the light of https://codereview.chromium.org/12217105/ I think we should consider doing this by adding a ...
7 years, 10 months ago (2013-02-13 16:58:40 UTC) #19
Sami
Is this at all along the lines you meant, David? I think it otherwise fits ...
7 years, 10 months ago (2013-02-13 21:41:22 UTC) #20
reveman
wow great job! thanks for implementing both solutions. below you'll find a few comments on ...
7 years, 10 months ago (2013-02-13 22:17:36 UTC) #21
Sami
> https://codereview.chromium.org/12194015/diff/27001/cc/tile_manager.cc#newcode669 > cc/tile_manager.cc:669: if (raster_worker_pool_->RunCheapTasks()) > this can be handled internally in the worker ...
7 years, 10 months ago (2013-02-14 19:14:59 UTC) #22
reveman
On 2013/02/14 19:14:59, Sami wrote: > > > https://codereview.chromium.org/12194015/diff/27001/cc/tile_manager.cc#newcode669 > > cc/tile_manager.cc:669: if (raster_worker_pool_->RunCheapTasks()) > ...
7 years, 10 months ago (2013-02-14 19:38:49 UTC) #23
Sami
On 2013/02/14 19:38:49, David Reveman wrote: > Yes, I was hoping we could schedule a ...
7 years, 10 months ago (2013-02-14 19:56:41 UTC) #24
reveman
https://codereview.chromium.org/12194015/diff/35001/cc/raster_worker_pool.cc File cc/raster_worker_pool.cc (right): https://codereview.chromium.org/12194015/diff/35001/cc/raster_worker_pool.cc#newcode31 cc/raster_worker_pool.cc:31: picture_pile_->GetCloneForDrawingOnThread(thread); DCHECK(!picture_pile_clone_) before this statement? maybe this does the ...
7 years, 10 months ago (2013-02-14 21:10:49 UTC) #25
Sami
Thanks David. Some concerns about the scheduling below. https://codereview.chromium.org/12194015/diff/35001/cc/raster_worker_pool.cc File cc/raster_worker_pool.cc (right): https://codereview.chromium.org/12194015/diff/35001/cc/raster_worker_pool.cc#newcode31 cc/raster_worker_pool.cc:31: picture_pile_->GetCloneForDrawingOnThread(thread); ...
7 years, 10 months ago (2013-02-15 16:41:22 UTC) #26
Sami
This fixes a problem with the previous patch where it'd access already freed pictures because ...
7 years, 10 months ago (2013-02-15 17:51:23 UTC) #27
Sami
Here's my attempt to fix the above problem. TileManager calls ScheduleCheapTasks() and there's no cloning ...
7 years, 10 months ago (2013-02-15 18:41:26 UTC) #28
reveman
It's not clear to me why we were using already freed pictures in the previous ...
7 years, 10 months ago (2013-02-16 00:41:46 UTC) #29
Sami
On 2013/02/16 00:41:46, David Reveman wrote: > It's not clear to me why we were ...
7 years, 10 months ago (2013-02-18 12:31:07 UTC) #30
reveman
Recap from vc discussion. - Cheap tasks keeping a ref to the picture pile should ...
7 years, 10 months ago (2013-02-19 02:00:13 UTC) #31
Sami
Thanks for walking through the issues with me David. This version should match your summary. ...
7 years, 10 months ago (2013-02-19 15:14:14 UTC) #32
reveman
This looks great. Just a few minor things before this is ready to land. https://codereview.chromium.org/12194015/diff/46002/cc/raster_worker_pool.cc ...
7 years, 10 months ago (2013-02-19 18:05:22 UTC) #33
nduca
Sorry there's a lot of chatter here that I haven't read. Can someone update me ...
7 years, 10 months ago (2013-02-19 21:31:06 UTC) #34
Sami
Thanks David, one more look? > Sorry there's a lot of chatter here that I ...
7 years, 10 months ago (2013-02-19 22:24:38 UTC) #35
reveman
just one more thing. https://codereview.chromium.org/12194015/diff/52002/cc/worker_pool.cc File cc/worker_pool.cc (right): https://codereview.chromium.org/12194015/diff/52002/cc/worker_pool.cc#newcode108 cc/worker_pool.cc:108: worker_pool_->WillPostTask(); Lets remove WorkerPool::WillPostTask() and ...
7 years, 10 months ago (2013-02-20 04:33:41 UTC) #36
Sami
Thanks, all comments addressed. It's getting close, I can feel it :)
7 years, 10 months ago (2013-02-20 16:18:13 UTC) #37
reveman
lgtm
7 years, 10 months ago (2013-02-20 18:15:51 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/12194015/55001
7 years, 10 months ago (2013-02-20 18:30:08 UTC) #39
commit-bot: I haz the power
7 years, 10 months ago (2013-02-20 20:31:48 UTC) #40
Message was sent while issue was closed.
Change committed as 183608

Powered by Google App Engine
This is Rietveld 408576698