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

Issue 10914028: Add CDM allocator interface. (Closed)

Created:
8 years, 3 months ago by Tom Finegan
Modified:
8 years, 3 months ago
Visibility:
Public.

Description

Add CDM allocator interface. This allows CDMs to allocate shared memory while hiding the ppapi implementation details from the CDM. It also removes one extra memcpy from the Decrypt path. BUG=138139 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157406

Patch Set 1 #

Patch Set 2 : It works, and this removes a copy in Decrypt/DeliverBlock. #

Total comments: 33

Patch Set 3 : Some iteratative work plus work related to xhwang's comments. #

Total comments: 51

Patch Set 4 : Rebased. No other changes. #

Patch Set 5 : Refactored... quite a bit. Sorry for rebase noise on top of everything else! #

Total comments: 64

Patch Set 6 : Iteration per comments #

Patch Set 7 : Fixed compile errors, and changed ReleaseBuffer to return void. #

Patch Set 8 : Fix gyp file (remove cdm_allocator.h). #

Total comments: 8

Patch Set 9 : Address comments. #

Total comments: 19

Patch Set 10 : Rebased (sorry! wfh tonight...) #

Patch Set 11 : Address comments. #

Patch Set 12 : Fix OutputBuffer. #

Patch Set 13 : Fix double delete, and possible KeyMessage leak. #

Total comments: 63

Patch Set 14 : Rebase to pick up fix for crash in Decrypt on Windows #

Patch Set 15 : Make KeyMessage and OutputBuffer interfaces... #

Total comments: 27

Patch Set 16 : Use linked_ptr from base instead of tr1::shared_ptr. #

Total comments: 4

Patch Set 17 : Replace Allocator::Release with Buffer::Destroy. #

Patch Set 18 : Fix compile error... not sure what code MSVC was using... ;) #

Total comments: 8

Patch Set 19 : Fix compile error. #

Patch Set 20 : Address comments. #

Patch Set 21 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+334 lines, -128 lines) Patch
M webkit/media/crypto/ppapi/cdm_wrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 11 chunks +205 lines, -59 lines 0 comments Download
M webkit/media/crypto/ppapi/clear_key_cdm.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -4 lines 0 comments Download
M webkit/media/crypto/ppapi/clear_key_cdm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +29 lines, -16 lines 0 comments Download
M webkit/media/crypto/ppapi/content_decryption_module.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +80 lines, -43 lines 0 comments Download
A + webkit/media/crypto/ppapi/linked_ptr.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +10 lines, -6 lines 0 comments Download
M webkit/media/webkit_media.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
Tom Finegan
ddorwin, dmichael, fgalligan1, xhwang: PTAL, this needs review. The code works, but I suspect I ...
8 years, 3 months ago (2012-08-31 23:57:01 UTC) #1
Tom Finegan
Took a quick look at things, and added comments for obvious stuff. Not sure about ...
8 years, 3 months ago (2012-09-01 05:00:09 UTC) #2
xhwang
http://codereview.chromium.org/10914028/diff/2001/webkit/media/crypto/ppapi/cdm_allocator.h File webkit/media/crypto/ppapi/cdm_allocator.h (right): http://codereview.chromium.org/10914028/diff/2001/webkit/media/crypto/ppapi/cdm_allocator.h#newcode17 webkit/media/crypto/ppapi/cdm_allocator.h:17: class CdmAllocatorInterface { We don't usually use "Interface" suffix ...
8 years, 3 months ago (2012-09-01 13:49:09 UTC) #3
Tom Finegan
ddorwin, dmichael: Updated per some of xhwang's comments, but some open questions remain. PTAL at ...
8 years, 3 months ago (2012-09-01 21:32:48 UTC) #4
Tom Finegan
ddorwin, dmichael: Err, PTAL at the patchset 2 comments. Sorry for the extra spam!
8 years, 3 months ago (2012-09-01 21:33:50 UTC) #5
ddorwin
Replied to a few items in PS 2. Most comments are in PS 3. http://codereview.chromium.org/10914028/diff/2001/webkit/media/crypto/ppapi/cdm_allocator.h ...
8 years, 3 months ago (2012-09-04 09:53:14 UTC) #6
dmichael (off chromium)
http://codereview.chromium.org/10914028/diff/1004/webkit/media/crypto/ppapi/cdm_wrapper.cc File webkit/media/crypto/ppapi/cdm_wrapper.cc (right): http://codereview.chromium.org/10914028/diff/1004/webkit/media/crypto/ppapi/cdm_wrapper.cc#newcode63 webkit/media/crypto/ppapi/cdm_wrapper.cc:63: class CdmWrapper : public CdmAllocator, Is there any reason ...
8 years, 3 months ago (2012-09-04 18:06:01 UTC) #7
ddorwin
http://codereview.chromium.org/10914028/diff/1004/webkit/media/crypto/ppapi/content_decryption_module.h File webkit/media/crypto/ppapi/content_decryption_module.h (right): http://codereview.chromium.org/10914028/diff/1004/webkit/media/crypto/ppapi/content_decryption_module.h#newcode135 webkit/media/crypto/ppapi/content_decryption_module.h:135: int32_t buffer_id; // Buffer identifier. Issued by CdmAllocator, and ...
8 years, 3 months ago (2012-09-05 13:44:51 UTC) #8
Tom Finegan
PTAL, refactored and responded to comments. Lots of changes, but it doesn't leak and seems ...
8 years, 3 months ago (2012-09-07 00:46:35 UTC) #9
ddorwin
One comment in patch set 3; he rest in 5. http://codereview.chromium.org/10914028/diff/1004/webkit/media/crypto/ppapi/content_decryption_module.h File webkit/media/crypto/ppapi/content_decryption_module.h (right): http://codereview.chromium.org/10914028/diff/1004/webkit/media/crypto/ppapi/content_decryption_module.h#newcode135 ...
8 years, 3 months ago (2012-09-07 09:48:48 UTC) #10
dmichael (off chromium)
http://codereview.chromium.org/10914028/diff/13001/ppapi/cpp/private/content_decryptor_private.h File ppapi/cpp/private/content_decryptor_private.h (right): http://codereview.chromium.org/10914028/diff/13001/ppapi/cpp/private/content_decryptor_private.h#newcode58 ppapi/cpp/private/content_decryptor_private.h:58: void DeliverBlock(PP_Resource decrypted_block, What's the benefit to this part ...
8 years, 3 months ago (2012-09-07 16:43:43 UTC) #11
Tom Finegan
I think I've addressed all comment, but maybe not satisfactorily. PTAL/Thanks! http://codereview.chromium.org/10914028/diff/1004/webkit/media/crypto/ppapi/content_decryption_module.h File webkit/media/crypto/ppapi/content_decryption_module.h (right): ...
8 years, 3 months ago (2012-09-08 01:02:46 UTC) #12
dmichael (off chromium)
http://codereview.chromium.org/10914028/diff/1014/webkit/media/crypto/ppapi/cdm_wrapper.cc File webkit/media/crypto/ppapi/cdm_wrapper.cc (right): http://codereview.chromium.org/10914028/diff/1014/webkit/media/crypto/ppapi/cdm_wrapper.cc#newcode79 webkit/media/crypto/ppapi/cdm_wrapper.cc:79: }; It kind of looks like you don't expect ...
8 years, 3 months ago (2012-09-10 16:10:35 UTC) #13
Tom Finegan
http://codereview.chromium.org/10914028/diff/1014/webkit/media/crypto/ppapi/cdm_wrapper.cc File webkit/media/crypto/ppapi/cdm_wrapper.cc (right): http://codereview.chromium.org/10914028/diff/1014/webkit/media/crypto/ppapi/cdm_wrapper.cc#newcode79 webkit/media/crypto/ppapi/cdm_wrapper.cc:79: }; On 2012/09/10 16:10:35, dmichael wrote: > It kind ...
8 years, 3 months ago (2012-09-11 02:58:06 UTC) #14
dmichael (off chromium)
lgtm
8 years, 3 months ago (2012-09-11 15:56:56 UTC) #15
ddorwin
http://codereview.chromium.org/10914028/diff/3021/webkit/media/crypto/ppapi/cdm_wrapper.cc File webkit/media/crypto/ppapi/cdm_wrapper.cc (right): http://codereview.chromium.org/10914028/diff/3021/webkit/media/crypto/ppapi/cdm_wrapper.cc#newcode65 webkit/media/crypto/ppapi/cdm_wrapper.cc:65: // Constructs a buffer object containing all information necessary ...
8 years, 3 months ago (2012-09-12 23:53:01 UTC) #16
Tom Finegan
Couldn't sleep/not feeling well. Thought I'd hack on this some more. I don't really like ...
8 years, 3 months ago (2012-09-13 10:33:39 UTC) #17
xhwang
Didn't follow the whole thread. Just a few comments when looking at the last patch. ...
8 years, 3 months ago (2012-09-13 14:35:44 UTC) #18
ddorwin
The allocation stuff looks good, with some minor changes needed. However, KeyMessage and OutputBuffer are ...
8 years, 3 months ago (2012-09-13 19:47:00 UTC) #19
ddorwin
http://codereview.chromium.org/10914028/diff/13009/webkit/media/crypto/ppapi/cdm_wrapper.cc File webkit/media/crypto/ppapi/cdm_wrapper.cc (right): http://codereview.chromium.org/10914028/diff/13009/webkit/media/crypto/ppapi/cdm_wrapper.cc#newcode65 webkit/media/crypto/ppapi/cdm_wrapper.cc:65: uint8_t* buffer() const OVERRIDE { I don't think this ...
8 years, 3 months ago (2012-09-14 00:20:39 UTC) #20
Tom Finegan
ddorwin, dmicheal, xhwang, PTAL, I think this has changed enough to warrant another look. pp::CompletionCallback ...
8 years, 3 months ago (2012-09-15 08:03:14 UTC) #21
ddorwin
Thanks. I think we have something that will work. We can learn from use and ...
8 years, 3 months ago (2012-09-17 21:19:23 UTC) #22
Tom Finegan
I think I've addressed all comments, but I have to run off and sign a ...
8 years, 3 months ago (2012-09-18 01:08:02 UTC) #23
ddorwin
Thanks. Almost there. http://codereview.chromium.org/10914028/diff/9017/webkit/media/crypto/ppapi/cdm_wrapper.cc File webkit/media/crypto/ppapi/cdm_wrapper.cc (right): http://codereview.chromium.org/10914028/diff/9017/webkit/media/crypto/ppapi/cdm_wrapper.cc#newcode431 webkit/media/crypto/ppapi/cdm_wrapper.cc:431: PP_DCHECK(status == cdm::kSuccess); On 2012/09/18 01:08:02, ...
8 years, 3 months ago (2012-09-18 01:26:08 UTC) #24
Tom Finegan
http://codereview.chromium.org/10914028/diff/17001/webkit/media/crypto/ppapi/cdm_wrapper.cc File webkit/media/crypto/ppapi/cdm_wrapper.cc (right): http://codereview.chromium.org/10914028/diff/17001/webkit/media/crypto/ppapi/cdm_wrapper.cc#newcode291 webkit/media/crypto/ppapi/cdm_wrapper.cc:291: delete static_cast<PpbBuffer*>(buffer); On 2012/09/18 01:26:08, ddorwin wrote: > Why ...
8 years, 3 months ago (2012-09-18 04:19:10 UTC) #25
ddorwin
lgtm assuming these changes are made. Thanks for persevering! http://codereview.chromium.org/10914028/diff/21002/webkit/media/crypto/ppapi/cdm_wrapper.cc File webkit/media/crypto/ppapi/cdm_wrapper.cc (right): http://codereview.chromium.org/10914028/diff/21002/webkit/media/crypto/ppapi/cdm_wrapper.cc#newcode67 webkit/media/crypto/ppapi/cdm_wrapper.cc:67: ...
8 years, 3 months ago (2012-09-18 04:53:14 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tomfinegan@chromium.org/10914028/24007
8 years, 3 months ago (2012-09-18 05:18:48 UTC) #27
Tom Finegan
http://codereview.chromium.org/10914028/diff/21002/webkit/media/crypto/ppapi/cdm_wrapper.cc File webkit/media/crypto/ppapi/cdm_wrapper.cc (right): http://codereview.chromium.org/10914028/diff/21002/webkit/media/crypto/ppapi/cdm_wrapper.cc#newcode67 webkit/media/crypto/ppapi/cdm_wrapper.cc:67: void Destroy() OVERRIDE { delete this; } On 2012/09/18 ...
8 years, 3 months ago (2012-09-18 06:02:31 UTC) #28
commit-bot: I haz the power
Failed to apply patch for webkit/media/crypto/ppapi/content_decryption_module.h: While running patch -p1 --forward --force; patching file webkit/media/crypto/ppapi/content_decryption_module.h ...
8 years, 3 months ago (2012-09-18 09:00:47 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tomfinegan@chromium.org/10914028/21003
8 years, 3 months ago (2012-09-18 17:30:44 UTC) #30
commit-bot: I haz the power
8 years, 3 months ago (2012-09-18 19:53:03 UTC) #31
Change committed as 157406

Powered by Google App Engine
This is Rietveld 408576698