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

Issue 57713004: Make tree id sequence in LayerTreeHost thread-safe. (Closed)

Created:
7 years, 1 month ago by dshwang
Modified:
7 years, 1 month ago
Reviewers:
Ian Vollick, jamesr, caseq
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Make tree id sequence in LayerTreeHost thread-safe. LayerTreeHost instances can exists in multiple threads. e.g. Aura with --single-process. So this CL makes the sequence thread-safe. In addition, this CL removes unused s_num_layer_tree_instances. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=233047

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use lock #

Patch Set 3 : rebase to upstream #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -14 lines) Patch
M cc/trees/layer_tree_host.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 6 chunks +11 lines, -11 lines 2 comments Download

Messages

Total messages: 19 (0 generated)
dshwang
7 years, 1 month ago (2013-11-04 18:37:19 UTC) #1
jamesr
https://codereview.chromium.org/57713004/diff/1/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/57713004/diff/1/cc/trees/layer_tree_host.cc#newcode51 cc/trees/layer_tree_host.cc:51: (void)initializeTo1; what does this line do? I don't think ...
7 years, 1 month ago (2013-11-04 19:18:01 UTC) #2
dshwang
https://codereview.chromium.org/57713004/diff/1/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/57713004/diff/1/cc/trees/layer_tree_host.cc#newcode51 cc/trees/layer_tree_host.cc:51: (void)initializeTo1; On 2013/11/04 19:18:01, jamesr wrote: > what does ...
7 years, 1 month ago (2013-11-04 19:34:47 UTC) #3
jamesr
lgtm
7 years, 1 month ago (2013-11-04 20:11:26 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/57713004/90001
7 years, 1 month ago (2013-11-04 20:56:31 UTC) #5
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=184511
7 years, 1 month ago (2013-11-05 01:22:59 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/57713004/90001
7 years, 1 month ago (2013-11-05 07:13:31 UTC) #7
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=219494
7 years, 1 month ago (2013-11-05 10:00:14 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/57713004/90001
7 years, 1 month ago (2013-11-05 10:47:17 UTC) #9
commit-bot: I haz the power
Failed to apply patch for cc/trees/layer_tree_host.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 1 month ago (2013-11-05 14:27:55 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/57713004/380001
7 years, 1 month ago (2013-11-05 14:54:59 UTC) #11
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=185101
7 years, 1 month ago (2013-11-05 16:59:15 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/57713004/380001
7 years, 1 month ago (2013-11-05 17:13:37 UTC) #13
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 1 month ago (2013-11-05 17:20:27 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/57713004/380001
7 years, 1 month ago (2013-11-05 18:19:43 UTC) #15
commit-bot: I haz the power
Change committed as 233047
7 years, 1 month ago (2013-11-05 19:11:20 UTC) #16
caseq
https://codereview.chromium.org/57713004/diff/380001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/57713004/diff/380001/cc/trees/layer_tree_host.cc#newcode51 cc/trees/layer_tree_host.cc:51: base::AutoLock lock(s_next_tree_id_lock.Get()); Any reason to not use StaticAtomicSequenceNumber here?
7 years, 1 month ago (2013-11-07 09:20:02 UTC) #17
dshwang
https://codereview.chromium.org/57713004/diff/380001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/57713004/diff/380001/cc/trees/layer_tree_host.cc#newcode51 cc/trees/layer_tree_host.cc:51: base::AutoLock lock(s_next_tree_id_lock.Get()); On 2013/11/07 09:20:03, caseq wrote: > Any ...
7 years, 1 month ago (2013-11-07 09:46:02 UTC) #18
caseq
7 years, 1 month ago (2013-11-07 10:05:24 UTC) #19
Message was sent while issue was closed.
On 2013/11/07 09:46:02, dshwang wrote:
>
https://codereview.chromium.org/57713004/diff/380001/cc/trees/layer_tree_host.cc
> File cc/trees/layer_tree_host.cc (right):
> 
>
https://codereview.chromium.org/57713004/diff/380001/cc/trees/layer_tree_host...
> cc/trees/layer_tree_host.cc:51: base::AutoLock
lock(s_next_tree_id_lock.Get());
> On 2013/11/07 09:20:03, caseq wrote:
> > Any reason to not use StaticAtomicSequenceNumber here?
> 
> Hi, Patch Set 1 used AtomicSequenceNumber, but AtomicSequenceNumber is
> initialized to 0, so there was additional code to set 1 to it.
> It looked a bit complicated, and this is very rare called. so we decided to
use
> lock.

Ugh, I see, I missed the first ps, sorry! But why don't we just do GetNext() + 1
then? I think this is overall a shorter and easier to understand code. I'm
changing to this as a drive-by in https://codereview.chromium.org/60353002/, if
you mind this, please state it there.

Powered by Google App Engine
This is Rietveld 408576698