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

Issue 23648014: cc: Move TextureMailbox::ReleaseCallback to SingleReleaseCallback. (Closed)

Created:
7 years, 3 months ago by danakj
Modified:
7 years, 3 months ago
Reviewers:
jamesr, piman, awong, enne (OOO)
CC:
chromium-reviews, feature-media-reviews_chromium.org, cc-bugs_chromium.org, darin-cc_chromium.org, jbauman
Visibility:
Public.

Description

cc: Move TextureMailbox::ReleaseCallback to SingleReleaseCallback. This moves the release callback out of the TextureMailbox so that we can use it for other resource types than just texture mailboxes. While doing this, we make a SingleReleaseCallback class that is held in a scoped_ptr. This class DCHECKs that the callback is run before it is destroyed, and ensures clear ownership semantics as you must Pass() the callback around. No change in behaviour, covered by existing tests. R=piman BUG=263069 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223500

Patch Set 1 #

Total comments: 2

Patch Set 2 : releasecallback: nits #

Patch Set 3 : releasecallback: missingfiles #

Total comments: 7

Patch Set 4 : releasecallback: scoped_ptr<ScopedReleaseCallback> #

Patch Set 5 : releasecallback: dchecks #

Total comments: 2

Patch Set 6 : releasecallback: rebase #

Total comments: 2

Patch Set 7 : releasecallback: nits/rebasefix #

Patch Set 8 : releasecallback: android #

Patch Set 9 : releasecallback: androidinclude2 #

Patch Set 10 : releasecallback: androidnamespace #

Patch Set 11 : releasecallback: SingleReleaseCallback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+603 lines, -371 lines) Patch
M cc/cc.gyp View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M cc/layers/texture_layer.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +9 lines, -4 lines 0 comments Download
M cc/layers/texture_layer.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +32 lines, -16 lines 0 comments Download
M cc/layers/texture_layer_client.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -2 lines 0 comments Download
M cc/layers/texture_layer_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -1 line 0 comments Download
M cc/layers/texture_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +16 lines, -4 lines 0 comments Download
M cc/layers/texture_layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 44 chunks +123 lines, -71 lines 0 comments Download
M cc/layers/video_layer_impl.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M cc/layers/video_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -3 lines 0 comments Download
M cc/output/copy_output_request.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -1 line 0 comments Download
M cc/output/copy_output_request.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -5 lines 0 comments Download
M cc/output/copy_output_result.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +13 lines, -6 lines 0 comments Download
M cc/output/copy_output_result.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +17 lines, -9 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -7 lines 0 comments Download
A cc/resources/release_callback.h View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
M cc/resources/resource_provider.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -1 line 0 comments Download
M cc/resources/resource_provider.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +8 lines, -5 lines 0 comments Download
M cc/resources/resource_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 10 chunks +37 lines, -29 lines 0 comments Download
A cc/resources/single_release_callback.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +33 lines, -0 lines 0 comments Download
A cc/resources/single_release_callback.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +29 lines, -0 lines 0 comments Download
M cc/resources/texture_mailbox.h View 2 chunks +3 lines, -18 lines 0 comments Download
M cc/resources/texture_mailbox.cc View 3 chunks +16 lines, -51 lines 0 comments Download
M cc/resources/texture_mailbox_deleter.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -4 lines 0 comments Download
M cc/resources/texture_mailbox_deleter.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +18 lines, -15 lines 0 comments Download
M cc/resources/texture_mailbox_deleter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +7 lines, -2 lines 0 comments Download
M cc/resources/video_resource_updater.h View 2 chunks +3 lines, -1 line 0 comments Download
M cc/resources/video_resource_updater.cc View 3 chunks +10 lines, -15 lines 0 comments Download
M cc/test/layer_tree_pixel_test.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -1 line 0 comments Download
M cc/test/layer_tree_pixel_test.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +17 lines, -9 lines 0 comments Download
M cc/trees/layer_tree_host_pixeltest_readback.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +12 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +41 lines, -28 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_compositing_helper.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -9 lines 0 comments Download
M content/renderer/pepper/pepper_graphics_2d_host.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -2 lines 0 comments Download
M content/renderer/pepper/pepper_graphics_2d_host.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -6 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -2 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -2 lines 0 comments Download
M ui/compositor/layer.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +8 lines, -4 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +10 lines, -7 lines 0 comments Download
M webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -3 lines 0 comments Download
M webkit/renderer/compositor_bindings/web_external_texture_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +16 lines, -12 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
danakj
7 years, 3 months ago (2013-09-12 00:42:45 UTC) #1
danakj
I'm thinking if it'd be nice to make a ScopedTextureMailbox that wraps a TM and ...
7 years, 3 months ago (2013-09-12 00:43:18 UTC) #2
piman
https://codereview.chromium.org/23648014/diff/1/cc/layers/texture_layer.h File cc/layers/texture_layer.h (right): https://codereview.chromium.org/23648014/diff/1/cc/layers/texture_layer.h#newcode14 cc/layers/texture_layer.h:14: #include "cc/resources/scoped_release_callback.h" File is missing from the CL :(
7 years, 3 months ago (2013-09-12 01:13:03 UTC) #3
danakj
https://codereview.chromium.org/23648014/diff/1/cc/layers/texture_layer.h File cc/layers/texture_layer.h (right): https://codereview.chromium.org/23648014/diff/1/cc/layers/texture_layer.h#newcode14 cc/layers/texture_layer.h:14: #include "cc/resources/scoped_release_callback.h" On 2013/09/12 01:13:03, piman wrote: > File ...
7 years, 3 months ago (2013-09-12 01:20:15 UTC) #4
piman
LGTM+nits. +awong to take a look at the move emulation in ScopeReleaseCallback - I think ...
7 years, 3 months ago (2013-09-13 06:08:30 UTC) #5
awong
move semantics look correct (though I don't know how I feel about seeing more and ...
7 years, 3 months ago (2013-09-13 07:07:19 UTC) #6
danakj
https://codereview.chromium.org/23648014/diff/8001/cc/resources/scoped_release_callback.cc File cc/resources/scoped_release_callback.cc (right): https://codereview.chromium.org/23648014/diff/8001/cc/resources/scoped_release_callback.cc#newcode14 cc/resources/scoped_release_callback.cc:14: ScopedReleaseCallback::ScopedReleaseCallback(const ReleaseCallback& callback) On 2013/09/13 07:07:19, awong wrote: > ...
7 years, 3 months ago (2013-09-13 17:32:59 UTC) #7
awong
On 2013/09/13 17:32:59, danakj wrote: > https://codereview.chromium.org/23648014/diff/8001/cc/resources/scoped_release_callback.cc > File cc/resources/scoped_release_callback.cc (right): > > https://codereview.chromium.org/23648014/diff/8001/cc/resources/scoped_release_callback.cc#newcode14 > ...
7 years, 3 months ago (2013-09-13 17:48:56 UTC) #8
danakj
On Fri, Sep 13, 2013 at 1:48 PM, <ajwong@chromium.org> wrote: > On 2013/09/13 17:32:59, danakj ...
7 years, 3 months ago (2013-09-13 18:50:51 UTC) #9
awong
Brainstormy crazy idea. Not sure it's a great idea so feel free to ignore: // ...
7 years, 3 months ago (2013-09-13 19:08:29 UTC) #10
danakj
On Fri, Sep 13, 2013 at 3:08 PM, Albert J. Wong (王重傑) <ajwong@chromium.org>wrote: > Brainstormy ...
7 years, 3 months ago (2013-09-13 19:17:15 UTC) #11
awong
On Fri, Sep 13, 2013 at 12:16 PM, Dana Jansens <danakj@chromium.org> wrote: > On Fri, ...
7 years, 3 months ago (2013-09-13 19:24:35 UTC) #12
danakj
On Fri, Sep 13, 2013 at 3:24 PM, Albert J. Wong (王重傑) <ajwong@chromium.org>wrote: > On ...
7 years, 3 months ago (2013-09-13 20:27:34 UTC) #13
danakj
On Fri, Sep 13, 2013 at 4:27 PM, Dana Jansens <danakj@chromium.org> wrote: > On Fri, ...
7 years, 3 months ago (2013-09-13 20:29:15 UTC) #14
awong
On Fri, Sep 13, 2013 at 1:28 PM, Dana Jansens <danakj@chromium.org> wrote: > On Fri, ...
7 years, 3 months ago (2013-09-13 20:33:26 UTC) #15
danakj
On Fri, Sep 13, 2013 at 4:33 PM, Albert J. Wong (王重傑) <ajwong@chromium.org>wrote: > > ...
7 years, 3 months ago (2013-09-13 20:38:26 UTC) #16
danakj
PTAL. Here's how it looks with scoped_ptr<ScopedReleaseCallback>. Also, i fixed all the code outside cc/
7 years, 3 months ago (2013-09-14 00:14:03 UTC) #17
danakj
rebased
7 years, 3 months ago (2013-09-14 01:30:07 UTC) #18
piman
lgtm https://codereview.chromium.org/23648014/diff/28001/content/renderer/pepper/pepper_graphics_2d_host.cc File content/renderer/pepper/pepper_graphics_2d_host.cc (right): https://codereview.chromium.org/23648014/diff/28001/content/renderer/pepper/pepper_graphics_2d_host.cc#newcode579 content/renderer/pepper/pepper_graphics_2d_host.cc:579: *mailbox = cc::TextureMailbox(mem, pixel_image_size); nit: you can now ...
7 years, 3 months ago (2013-09-14 01:51:33 UTC) #19
danakj
https://codereview.chromium.org/23648014/diff/28001/content/renderer/pepper/pepper_graphics_2d_host.cc File content/renderer/pepper/pepper_graphics_2d_host.cc (right): https://codereview.chromium.org/23648014/diff/28001/content/renderer/pepper/pepper_graphics_2d_host.cc#newcode579 content/renderer/pepper/pepper_graphics_2d_host.cc:579: *mailbox = cc::TextureMailbox(mem, pixel_image_size); On 2013/09/14 01:51:33, piman wrote: ...
7 years, 3 months ago (2013-09-16 16:42:20 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/23648014/7001
7 years, 3 months ago (2013-09-16 16:42:45 UTC) #21
danakj
+enne/jamesr for webkit/
7 years, 3 months ago (2013-09-16 16:43:01 UTC) #22
enne (OOO)
webkit/ lgtm rubberstamp
7 years, 3 months ago (2013-09-16 21:01:01 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/23648014/75001
7 years, 3 months ago (2013-09-16 21:03:12 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/23648014/85001
7 years, 3 months ago (2013-09-16 21:22:11 UTC) #25
commit-bot: I haz the power
7 years, 3 months ago (2013-09-17 01:24:18 UTC) #26
Message was sent while issue was closed.
Change committed as 223500

Powered by Google App Engine
This is Rietveld 408576698