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

Issue 2616403003: Replacing SurfaceReferenceBase and SequenceSurfaceReference with Closures (Closed)

Created:
3 years, 11 months ago by Saman Sami
Modified:
3 years, 11 months ago
CC:
chromium-reviews, kalyank, cc-bugs_chromium.org, sadrul
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replacing SurfaceReferenceBase and SequenceSurfaceReference with Closures The sole purpose of SurfaceReferenceBase and SequenceSurfaceReference was to be able to return the reference later on, but the same goal can be achieved using closures with much less complexity. From now on, SurfaceReferenceFactory::CreateReference returns a closure that returns the reference once its called. TBR=sadrul@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2616403003 Cr-Commit-Position: refs/heads/master@{#442984} Committed: https://chromium.googlesource.com/chromium/src/+/6c267ca6a4bc8f207d58a682a4c98f0b9b697ad4

Patch Set 1 #

Patch Set 2 : comment #

Patch Set 3 : build #

Total comments: 1

Patch Set 4 : c #

Total comments: 8

Patch Set 5 : up #

Patch Set 6 : c #

Patch Set 7 : c #

Patch Set 8 : c #

Total comments: 15

Patch Set 9 : c #

Total comments: 3

Patch Set 10 : callback unittest #

Total comments: 1

Patch Set 11 : dot #

Patch Set 12 : c #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -189 lines) Patch
M base/callback_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -0 lines 0 comments Download
M cc/layers/surface_layer.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -4 lines 0 comments Download
M cc/layers/surface_layer.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +11 lines, -10 lines 0 comments Download
M cc/surfaces/BUILD.gn View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
D cc/surfaces/sequence_surface_reference.h View 1 chunk +0 lines, -32 lines 0 comments Download
D cc/surfaces/sequence_surface_reference.cc View 1 chunk +0 lines, -18 lines 0 comments Download
M cc/surfaces/sequence_surface_reference_factory.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -10 lines 0 comments Download
M cc/surfaces/sequence_surface_reference_factory.cc View 1 2 3 4 1 chunk +6 lines, -15 lines 0 comments Download
D cc/surfaces/surface_reference_base.h View 1 chunk +0 lines, -43 lines 0 comments Download
D cc/surfaces/surface_reference_base.cc View 1 chunk +0 lines, -24 lines 0 comments Download
M cc/surfaces/surface_reference_factory.h View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -12 lines 0 comments Download
M ui/aura/mus/client_surface_embedder.cc View 1 2 3 4 1 chunk +2 lines, -17 lines 0 comments Download

Messages

Total messages: 72 (48 generated)
Fady Samuel
lgtm
3 years, 11 months ago (2017-01-09 17:46:59 UTC) #10
Saman Sami
danakj and jbauman: Please review all files.
3 years, 11 months ago (2017-01-09 18:27:30 UTC) #12
jbauman
lgtm
3 years, 11 months ago (2017-01-09 23:51:29 UTC) #15
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/2616403003/40001
3 years, 11 months ago (2017-01-10 00:06:37 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/337929)
3 years, 11 months ago (2017-01-10 02:30:11 UTC) #19
Fady Samuel
https://codereview.chromium.org/2616403003/diff/40001/ui/aura/mus/client_surface_embedder.cc File ui/aura/mus/client_surface_embedder.cc (right): https://codereview.chromium.org/2616403003/diff/40001/ui/aura/mus/client_surface_embedder.cc#newcode15 ui/aura/mus/client_surface_embedder.cc:15: class StubSurfaceReference : public cc::ScopedSurfaceReferenceBase { I just noticed ...
3 years, 11 months ago (2017-01-10 03:05:30 UTC) #20
danakj
https://codereview.chromium.org/2616403003/diff/60001/cc/layers/surface_layer.cc File cc/layers/surface_layer.cc (right): https://codereview.chromium.org/2616403003/diff/60001/cc/layers/surface_layer.cc#newcode70 cc/layers/surface_layer.cc:70: current_ref_ = Everything is using the base types so ...
3 years, 11 months ago (2017-01-10 16:46:30 UTC) #27
Fady Samuel
https://codereview.chromium.org/2616403003/diff/60001/cc/layers/surface_layer.cc File cc/layers/surface_layer.cc (right): https://codereview.chromium.org/2616403003/diff/60001/cc/layers/surface_layer.cc#newcode70 cc/layers/surface_layer.cc:70: current_ref_ = On 2017/01/10 16:46:30, danakj (slow) wrote: > ...
3 years, 11 months ago (2017-01-10 18:14:01 UTC) #28
danakj
https://codereview.chromium.org/2616403003/diff/60001/cc/surfaces/sequence_surface_reference_factory.cc File cc/surfaces/sequence_surface_reference_factory.cc (right): https://codereview.chromium.org/2616403003/diff/60001/cc/surfaces/sequence_surface_reference_factory.cc#newcode18 cc/surfaces/sequence_surface_reference_factory.cc:18: return base::MakeUnique<ScopedSurfaceSequence>(make_scoped_refptr(this), seq); On 2017/01/10 18:14:01, Fady Samuel wrote: ...
3 years, 11 months ago (2017-01-10 18:22:02 UTC) #29
Saman Sami
PTAL I replaced the scoped reference classes with closures.
3 years, 11 months ago (2017-01-10 19:31:05 UTC) #36
Fady Samuel
Net negative lines of code! I love it! Please update the description! LGTM
3 years, 11 months ago (2017-01-10 19:31:12 UTC) #37
danakj
Sorry, a few off-topic question/comments while reading the code also. https://codereview.chromium.org/2616403003/diff/140001/cc/layers/surface_layer.cc File cc/layers/surface_layer.cc (right): https://codereview.chromium.org/2616403003/diff/140001/cc/layers/surface_layer.cc#newcode112 ...
3 years, 11 months ago (2017-01-10 21:12:06 UTC) #43
Fady Samuel
https://codereview.chromium.org/2616403003/diff/140001/cc/layers/surface_layer.cc File cc/layers/surface_layer.cc (right): https://codereview.chromium.org/2616403003/diff/140001/cc/layers/surface_layer.cc#newcode112 cc/layers/surface_layer.cc:112: std::move(reference_returner_), base::ThreadTaskRunnerHandle::Get()); On 2017/01/10 21:12:06, danakj (slow) wrote: > ...
3 years, 11 months ago (2017-01-10 21:33:07 UTC) #46
Saman Sami
https://codereview.chromium.org/2616403003/diff/140001/cc/layers/surface_layer.cc File cc/layers/surface_layer.cc (right): https://codereview.chromium.org/2616403003/diff/140001/cc/layers/surface_layer.cc#newcode112 cc/layers/surface_layer.cc:112: std::move(reference_returner_), base::ThreadTaskRunnerHandle::Get()); On 2017/01/10 21:12:06, danakj (slow) wrote: > ...
3 years, 11 months ago (2017-01-10 21:56:14 UTC) #48
danakj
https://codereview.chromium.org/2616403003/diff/140001/cc/surfaces/surface_reference_factory.h File cc/surfaces/surface_reference_factory.h (right): https://codereview.chromium.org/2616403003/diff/140001/cc/surfaces/surface_reference_factory.h#newcode25 cc/surfaces/surface_reference_factory.h:25: SurfaceReferenceFactory() = default; On 2017/01/10 21:56:14, Saman Sami wrote: ...
3 years, 11 months ago (2017-01-11 15:25:28 UTC) #54
danakj
https://codereview.chromium.org/2616403003/diff/160001/cc/layers/surface_layer.cc File cc/layers/surface_layer.cc (right): https://codereview.chromium.org/2616403003/diff/160001/cc/layers/surface_layer.cc#newcode113 cc/layers/surface_layer.cc:113: layer_tree_host()->GetTaskRunnerProvider()->MainThreadTaskRunner()); On 2017/01/11 15:25:28, danakj (slow) wrote: > One ...
3 years, 11 months ago (2017-01-11 15:40:38 UTC) #55
Saman Sami
PTAL I created the unit test. https://codereview.chromium.org/2616403003/diff/140001/cc/surfaces/surface_reference_factory.h File cc/surfaces/surface_reference_factory.h (right): https://codereview.chromium.org/2616403003/diff/140001/cc/surfaces/surface_reference_factory.h#newcode25 cc/surfaces/surface_reference_factory.h:25: SurfaceReferenceFactory() = default; ...
3 years, 11 months ago (2017-01-11 16:19:16 UTC) #58
danakj
On 2017/01/11 16:19:16, Saman Sami wrote: > PTAL > > I created the unit test. ...
3 years, 11 months ago (2017-01-11 16:20:51 UTC) #59
danakj
Thanks for the test LGTM https://codereview.chromium.org/2616403003/diff/180001/base/callback_unittest.cc File base/callback_unittest.cc (right): https://codereview.chromium.org/2616403003/diff/180001/base/callback_unittest.cc#newcode119 base/callback_unittest.cc:119: // Moving should reset ...
3 years, 11 months ago (2017-01-11 16:21:37 UTC) #60
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/2616403003/200001
3 years, 11 months ago (2017-01-11 16:23:09 UTC) #63
sadrul
lgtm
3 years, 11 months ago (2017-01-11 16:25:49 UTC) #64
commit-bot: I haz the power
Failed to apply patch for cc/layers/surface_layer.cc: While running git apply --index -p1; error: patch failed: ...
3 years, 11 months ago (2017-01-11 17:35:34 UTC) #66
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/2616403003/160002
3 years, 11 months ago (2017-01-11 18:10:29 UTC) #69
commit-bot: I haz the power
3 years, 11 months ago (2017-01-11 19:45:01 UTC) #72
Message was sent while issue was closed.
Committed patchset #12 (id:160002) as
https://chromium.googlesource.com/chromium/src/+/6c267ca6a4bc8f207d58a682a4c9...

Powered by Google App Engine
This is Rietveld 408576698