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

Issue 2584953002: exo::CompositorFrameSinkHolder's release callbacks hold ref (Closed)

Created:
4 years ago by Alex Z.
Modified:
3 years, 11 months ago
Reviewers:
reveman
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Buffer holds reference to CompositorFrameSinkHolder so the CompositorFrameSinkHolder lives until resources are released or Buffer is destroyed. CompositorFrameSinkHolder no longer holds references to itself in the field release_callback_. BUG=675004 Committed: https://crrev.com/d40f036aa8e40227403313246418c4ce8b908368 Cr-Commit-Position: refs/heads/master@{#441269}

Patch Set 1 #

Patch Set 2 : Added comments explaining the fix #

Total comments: 7

Patch Set 3 : NOT FOR COMMIT: use ThreadTaskRunnerHandle to run SingleReleaseCallback #

Patch Set 4 : Removed unrelated changes #

Total comments: 9

Patch Set 5 : Successfully using PostTask() #

Patch Set 6 : Callback holds a reference to CompositorFrameSinkHolder #

Patch Set 7 : Use base::ScopedClosureRunner instead of ThreadTaskRunnerHandle #

Patch Set 8 : Use local ref ptr #

Patch Set 9 : Release callbakcs hold onto refs to CompositorFrameSinkHolder #

Patch Set 10 : Updated comments #

Patch Set 11 : Use ScopedClosureRunner #

Total comments: 10

Patch Set 12 : Addressed nits #

Patch Set 13 : Added ReleaseTextureAndCompositorFrameSinkHolder() and ReleaseContentsTextureAndCompositorFrameSink… #

Total comments: 8

Patch Set 14 : Addressed comments #

Total comments: 2

Patch Set 15 : Use PostTask() #

Patch Set 16 : Added wrapper callback to surface.cc #

Patch Set 17 : NOT FOR COMMIT: Buffer references sink_holder #

Total comments: 7

Patch Set 18 : NOT FOR COMMIT: SEGV_MAPERR in Callback::Run() #

Total comments: 1

Patch Set 19 : All exo unit tests passed. #

Total comments: 20

Patch Set 20 : Addressed comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -93 lines) Patch
M components/exo/buffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +14 lines, -8 lines 1 comment Download
M components/exo/buffer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +38 lines, -19 lines 1 comment Download
M components/exo/buffer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +48 lines, -19 lines 0 comments Download
M components/exo/compositor_frame_sink_holder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +5 lines, -12 lines 0 comments Download
M components/exo/compositor_frame_sink_holder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +12 lines, -9 lines 0 comments Download
M components/exo/surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +5 lines, -26 lines 0 comments Download

Messages

Total messages: 70 (26 generated)
Alex Z.
Please review the changes.
4 years ago (2016-12-16 21:00:30 UTC) #2
Alex Z.
Please review my changes
4 years ago (2016-12-19 15:10:06 UTC) #7
reveman
I'm failing to see how this fixes the bug. Please explain and add a comment ...
4 years ago (2016-12-19 17:14:10 UTC) #8
Alex Z.
On 2016/12/19 17:14:10, reveman wrote: > I'm failing to see how this fixes the bug. ...
4 years ago (2016-12-19 17:50:40 UTC) #9
reveman
https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc#newcode87 components/exo/compositor_frame_sink_holder.cc:87: // |callback_pair| is a std::pair<scoped_refptr<CompositorFrameSinkHolder>, So why doesn't simply: ...
4 years ago (2016-12-19 18:20:02 UTC) #10
Alex Z.
https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc#newcode87 components/exo/compositor_frame_sink_holder.cc:87: // |callback_pair| is a std::pair<scoped_refptr<CompositorFrameSinkHolder>, On 2016/12/19 18:20:02, reveman ...
4 years ago (2016-12-19 18:34:03 UTC) #11
reveman
https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc#newcode87 components/exo/compositor_frame_sink_holder.cc:87: // |callback_pair| is a std::pair<scoped_refptr<CompositorFrameSinkHolder>, On 2016/12/19 at 18:34:03, ...
4 years ago (2016-12-19 19:30:02 UTC) #12
Alex Z.
https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc#newcode87 components/exo/compositor_frame_sink_holder.cc:87: // |callback_pair| is a std::pair<scoped_refptr<CompositorFrameSinkHolder>, On 2016/12/19 19:30:02, reveman ...
4 years ago (2016-12-19 19:37:50 UTC) #13
Alex Z.
https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc#newcode87 components/exo/compositor_frame_sink_holder.cc:87: // |callback_pair| is a std::pair<scoped_refptr<CompositorFrameSinkHolder>, On 2016/12/19 19:30:02, reveman ...
4 years ago (2016-12-19 20:05:39 UTC) #14
reveman
https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc#newcode87 components/exo/compositor_frame_sink_holder.cc:87: // |callback_pair| is a std::pair<scoped_refptr<CompositorFrameSinkHolder>, On 2016/12/19 at 19:37:50, ...
4 years ago (2016-12-19 20:18:15 UTC) #15
Alex Z.
https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc#newcode87 components/exo/compositor_frame_sink_holder.cc:87: // |callback_pair| is a std::pair<scoped_refptr<CompositorFrameSinkHolder>, On 2016/12/19 20:18:15, reveman ...
4 years ago (2016-12-19 20:54:07 UTC) #16
reveman
On 2016/12/19 at 20:54:07, staraz wrote: > https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc > File components/exo/compositor_frame_sink_holder.cc (right): > > https://codereview.chromium.org/2584953002/diff/20001/components/exo/compositor_frame_sink_holder.cc#newcode87 ...
4 years ago (2016-12-19 21:03:12 UTC) #17
Alex Z.
On 2016/12/19 21:03:12, reveman wrote: > On 2016/12/19 at 20:54:07, staraz wrote: > > > ...
4 years ago (2016-12-19 21:29:19 UTC) #18
reveman
On 2016/12/19 at 21:29:19, staraz wrote: > On 2016/12/19 21:03:12, reveman wrote: > > On ...
4 years ago (2016-12-19 23:04:42 UTC) #19
Alex Z.
On 2016/12/19 23:04:42, reveman wrote: > On 2016/12/19 at 21:29:19, staraz wrote: > > On ...
4 years ago (2016-12-20 16:16:50 UTC) #20
reveman
How are you checking that this runs? You'll need to have a running message loop ...
4 years ago (2016-12-20 16:34:28 UTC) #21
Alex Z.
On 2016/12/20 16:34:28, reveman wrote: > How are you checking that this runs? You'll need ...
4 years ago (2016-12-20 16:43:55 UTC) #22
Alex Z.
On 2016/12/20 16:43:55, StarAZ1 wrote: > On 2016/12/20 16:34:28, reveman wrote: > > How are ...
4 years ago (2016-12-20 16:50:43 UTC) #23
Alex Z.
https://codereview.chromium.org/2584953002/diff/60001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/60001/components/exo/compositor_frame_sink_holder.cc#newcode13 components/exo/compositor_frame_sink_holder.cc:13: void RunSingleReleaseCallback(cc::SingleReleaseCallback* callback, On 2016/12/20 16:34:28, reveman wrote: > ...
4 years ago (2016-12-20 17:54:01 UTC) #26
reveman
On 2016/12/20 at 16:50:43, staraz wrote: > On 2016/12/20 16:43:55, StarAZ1 wrote: > > On ...
4 years ago (2016-12-20 18:10:03 UTC) #27
Alex Z.
On 2016/12/20 18:10:03, reveman wrote: > On 2016/12/20 at 16:50:43, staraz wrote: > > On ...
4 years ago (2016-12-20 19:05:07 UTC) #30
reveman
Please update the description of this CL to explain what the problem is and how ...
4 years ago (2016-12-21 03:38:59 UTC) #31
Alex Z.
On 2016/12/21 03:38:59, reveman wrote: > Please update the description of this CL to explain ...
4 years ago (2016-12-21 16:15:32 UTC) #33
reveman
We need to fix the design of this. CompositorFrameSinkHolder owning a number of references to ...
4 years ago (2016-12-21 16:39:07 UTC) #37
Alex Z.
On 2016/12/21 16:39:07, reveman wrote: > We need to fix the design of this. CompositorFrameSinkHolder ...
4 years ago (2016-12-21 19:47:37 UTC) #40
reveman
https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.cc File components/exo/buffer.cc (right): https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.cc#newcode467 components/exo/buffer.cc:467: (compositor_frame_sink_holder)))); s/(compositor_frame_sink_holder)/compositor_frame_sink_holder/ https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.h File components/exo/buffer.h (right): https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.h#newcode62 components/exo/buffer.h:62: scoped_refptr<CompositorFrameSinkHolder> ...
4 years ago (2016-12-21 20:05:42 UTC) #42
Alex Z.
https://codereview.chromium.org/2584953002/diff/200001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/200001/components/exo/compositor_frame_sink_holder.cc#newcode84 components/exo/compositor_frame_sink_holder.cc:84: scoped_refptr<CompositorFrameSinkHolder> holder(this); On 2016/12/21 20:05:42, reveman wrote: > Please ...
4 years ago (2016-12-21 21:30:11 UTC) #43
Alex Z.
https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.h File components/exo/buffer.h (right): https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.h#newcode90 components/exo/buffer.h:90: scoped_refptr<CompositorFrameSinkHolder> compositor_frame_sink_holder); On 2016/12/21 20:05:42, reveman wrote: > these ...
4 years ago (2016-12-21 21:53:20 UTC) #44
Alex Z.
https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.cc File components/exo/buffer.cc (right): https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.cc#newcode467 components/exo/buffer.cc:467: (compositor_frame_sink_holder)))); On 2016/12/21 20:05:42, reveman wrote: > s/(compositor_frame_sink_holder)/compositor_frame_sink_holder/ Done.
4 years ago (2016-12-21 22:35:33 UTC) #45
reveman
https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.h File components/exo/buffer.h (right): https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.h#newcode90 components/exo/buffer.h:90: scoped_refptr<CompositorFrameSinkHolder> compositor_frame_sink_holder); On 2016/12/21 at 21:53:20, StarAZ1 wrote: > ...
4 years ago (2016-12-21 22:46:00 UTC) #46
Alex Z.
https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.h File components/exo/buffer.h (right): https://codereview.chromium.org/2584953002/diff/200001/components/exo/buffer.h#newcode62 components/exo/buffer.h:62: scoped_refptr<CompositorFrameSinkHolder> compositor_frame_sink_holder); On 2016/12/21 20:05:42, reveman wrote: > nit: ...
4 years ago (2016-12-22 16:33:25 UTC) #47
reveman
https://codereview.chromium.org/2584953002/diff/240001/components/exo/buffer.h File components/exo/buffer.h (right): https://codereview.chromium.org/2584953002/diff/240001/components/exo/buffer.h#newcode62 components/exo/buffer.h:62: scoped_refptr<CompositorFrameSinkHolder> compositor_frame_sink_holder); nit: s/scoped_refptr<CompositorFrameSinkHolder>/CompositorFrameSinkHolder*/ https://codereview.chromium.org/2584953002/diff/240001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/240001/components/exo/compositor_frame_sink_holder.cc#newcode87 ...
4 years ago (2016-12-22 17:00:53 UTC) #48
Alex Z.
https://codereview.chromium.org/2584953002/diff/240001/components/exo/buffer.h File components/exo/buffer.h (right): https://codereview.chromium.org/2584953002/diff/240001/components/exo/buffer.h#newcode62 components/exo/buffer.h:62: scoped_refptr<CompositorFrameSinkHolder> compositor_frame_sink_holder); On 2016/12/22 17:00:53, reveman wrote: > nit: ...
4 years ago (2016-12-22 18:08:48 UTC) #49
reveman
https://codereview.chromium.org/2584953002/diff/240001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/240001/components/exo/compositor_frame_sink_holder.cc#newcode87 components/exo/compositor_frame_sink_holder.cc:87: base::ScopedClosureRunner runner(base::Bind( On 2016/12/22 at 18:08:48, StarAZ1 wrote: > ...
4 years ago (2016-12-22 20:29:50 UTC) #50
Alex Z.
https://codereview.chromium.org/2584953002/diff/240001/components/exo/compositor_frame_sink_holder.cc File components/exo/compositor_frame_sink_holder.cc (right): https://codereview.chromium.org/2584953002/diff/240001/components/exo/compositor_frame_sink_holder.cc#newcode87 components/exo/compositor_frame_sink_holder.cc:87: base::ScopedClosureRunner runner(base::Bind( On 2016/12/22 20:29:49, reveman wrote: > On ...
3 years, 12 months ago (2016-12-23 22:45:38 UTC) #55
reveman
This design is still wrong afaict. Here are some key questions that I think will ...
3 years, 12 months ago (2016-12-24 21:37:46 UTC) #56
Alex Z.
On 2016/12/24 21:37:46, reveman wrote: > This design is still wrong afaict. Here are some ...
3 years, 11 months ago (2017-01-02 17:17:59 UTC) #57
reveman
On 2017/01/02 at 17:17:59, staraz wrote: > On 2016/12/24 21:37:46, reveman wrote: > > This ...
3 years, 11 months ago (2017-01-02 19:57:56 UTC) #58
reveman
https://codereview.chromium.org/2584953002/diff/340001/components/exo/buffer.h File components/exo/buffer.h (right): https://codereview.chromium.org/2584953002/diff/340001/components/exo/buffer.h#newcode134 components/exo/buffer.h:134: // The refptr is reset when the release callback ...
3 years, 11 months ago (2017-01-03 23:24:47 UTC) #60
Alex Z.
https://codereview.chromium.org/2584953002/diff/360001/components/exo/buffer.cc File components/exo/buffer.cc (right): https://codereview.chromium.org/2584953002/diff/360001/components/exo/buffer.cc#newcode560 components/exo/buffer.cc:560: if (this) On 2017/01/03 23:24:46, reveman wrote: > remove ...
3 years, 11 months ago (2017-01-03 23:39:15 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2584953002/380001
3 years, 11 months ago (2017-01-03 23:39:55 UTC) #64
reveman
This new design looks much better. Thanks! LGTM with two minor nits https://codereview.chromium.org/2584953002/diff/380001/components/exo/buffer.cc File components/exo/buffer.cc ...
3 years, 11 months ago (2017-01-03 23:48:34 UTC) #65
commit-bot: I haz the power
Committed patchset #20 (id:380001)
3 years, 11 months ago (2017-01-04 00:46:48 UTC) #68
commit-bot: I haz the power
3 years, 11 months ago (2017-01-04 00:51:06 UTC) #70
Message was sent while issue was closed.
Patchset 20 (id:??) landed as
https://crrev.com/d40f036aa8e40227403313246418c4ce8b908368
Cr-Commit-Position: refs/heads/master@{#441269}

Powered by Google App Engine
This is Rietveld 408576698