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

Issue 1033563002: cc: Various code safety improvements in video compositing code. (Closed)

Created:
5 years, 9 months ago by sunnyps
Modified:
5 years, 8 months ago
Reviewers:
danakj, DaleCurtis
CC:
chromium-reviews, feature-media-reviews_chromium.org, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Various code safety improvements in video compositing code. This CL adds comments and DHCECKs clarifying the thread safety aspects of VideoFrameProviderClientImpl. BUG=336733 Committed: https://crrev.com/a528172f25699f80a201e405d046eb376df9dfa1 Cr-Commit-Position: refs/heads/master@{#322521}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Address comments. #

Total comments: 8

Patch Set 3 : Rebase. #

Patch Set 4 : Address comments #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -71 lines) Patch
M cc/layers/video_frame_provider.h View 2 chunks +3 lines, -2 lines 0 comments Download
M cc/layers/video_frame_provider_client_impl.h View 1 2 3 2 chunks +23 lines, -11 lines 0 comments Download
M cc/layers/video_frame_provider_client_impl.cc View 1 2 3 4 chunks +28 lines, -16 lines 0 comments Download
M cc/layers/video_layer_impl.h View 1 3 chunks +7 lines, -8 lines 3 comments Download
M cc/layers/video_layer_impl.cc View 1 2 3 4 chunks +17 lines, -26 lines 0 comments Download
M cc/layers/video_layer_impl_unittest.cc View 1 7 chunks +18 lines, -8 lines 0 comments Download

Messages

Total messages: 17 (4 generated)
sunnyps
PTAL. I've split out the various code safety improvements I made out of my previous ...
5 years, 9 months ago (2015-03-24 01:47:11 UTC) #2
danakj
https://codereview.chromium.org/1033563002/diff/1/cc/layers/video_frame_provider_client_impl.cc File cc/layers/video_frame_provider_client_impl.cc (right): https://codereview.chromium.org/1033563002/diff/1/cc/layers/video_frame_provider_client_impl.cc#newcode93 cc/layers/video_frame_provider_client_impl.cc:93: // Block the provider from shutting down until the ...
5 years, 9 months ago (2015-03-24 17:38:01 UTC) #3
sunnyps
PTAL. Addressed all comments. I renamed the Stop/Stopped methods to Destroy/Destroyed and removed Start/Started - ...
5 years, 9 months ago (2015-03-24 19:43:38 UTC) #4
sunnyps
ping
5 years, 8 months ago (2015-03-26 18:24:50 UTC) #5
danakj
LGTM https://codereview.chromium.org/1033563002/diff/20001/cc/layers/video_frame_provider.h File cc/layers/video_frame_provider.h (right): https://codereview.chromium.org/1033563002/diff/20001/cc/layers/video_frame_provider.h#newcode22 cc/layers/video_frame_provider.h:22: class CC_EXPORT VideoFrameProvider { we don't need to ...
5 years, 8 months ago (2015-03-26 22:38:35 UTC) #6
sunnyps
Thanks! https://codereview.chromium.org/1033563002/diff/20001/cc/layers/video_frame_provider.h File cc/layers/video_frame_provider.h (right): https://codereview.chromium.org/1033563002/diff/20001/cc/layers/video_frame_provider.h#newcode22 cc/layers/video_frame_provider.h:22: class CC_EXPORT VideoFrameProvider { On 2015/03/26 22:38:35, danakj ...
5 years, 8 months ago (2015-03-27 00:38:46 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033563002/60001
5 years, 8 months ago (2015-03-27 00:39:20 UTC) #10
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 8 months ago (2015-03-27 02:40:00 UTC) #11
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/a528172f25699f80a201e405d046eb376df9dfa1 Cr-Commit-Position: refs/heads/master@{#322521}
5 years, 8 months ago (2015-03-27 02:41:07 UTC) #12
DaleCurtis
https://codereview.chromium.org/1033563002/diff/60001/cc/layers/video_layer_impl.h File cc/layers/video_layer_impl.h (right): https://codereview.chromium.org/1033563002/diff/60001/cc/layers/video_layer_impl.h#newcode51 cc/layers/video_layer_impl.h:51: scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl, I realize this is just copying existing ...
5 years, 8 months ago (2015-03-27 16:45:07 UTC) #14
danakj
https://codereview.chromium.org/1033563002/diff/60001/cc/layers/video_layer_impl.h File cc/layers/video_layer_impl.h (right): https://codereview.chromium.org/1033563002/diff/60001/cc/layers/video_layer_impl.h#newcode51 cc/layers/video_layer_impl.h:51: scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl, On 2015/03/27 16:45:07, DaleCurtis wrote: > I ...
5 years, 8 months ago (2015-03-27 16:55:15 UTC) #15
sunnyps
On 2015/03/27 16:55:15, danakj wrote: > https://codereview.chromium.org/1033563002/diff/60001/cc/layers/video_layer_impl.h > File cc/layers/video_layer_impl.h (right): > > https://codereview.chromium.org/1033563002/diff/60001/cc/layers/video_layer_impl.h#newcode51 > ...
5 years, 8 months ago (2015-03-27 18:58:28 UTC) #16
DaleCurtis
5 years, 8 months ago (2015-03-27 19:53:26 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/1033563002/diff/60001/cc/layers/video_layer_i...
File cc/layers/video_layer_impl.h (right):

https://codereview.chromium.org/1033563002/diff/60001/cc/layers/video_layer_i...
cc/layers/video_layer_impl.h:51: scoped_refptr<VideoFrameProviderClientImpl>
provider_client_impl,
On 2015/03/27 16:55:15, danakj wrote:
> On 2015/03/27 16:45:07, DaleCurtis wrote:
> > I realize this is just copying existing style, but this should really be a
> > const& to avoid extra potential ref/unref steps (which if
RefCountedThreadSafe
> > are atomic operations).
> 
> I guess, this happens once per video being loaded, I think that it won't
matter.
> A const& would be fine, or alternatively, we can swap() it into the member
> variable in the constructor.
> 
> We should really get r-value reference support for scoped_refptr so we can do
> this properly with a Pass() or the like.

Yeah, it's not really an issue in this case, just one of those in aggregate
style things.

Powered by Google App Engine
This is Rietveld 408576698