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

Side by Side Diff: media/cdm/simple_cdm_allocator.cc

Issue 1802183002: Convert CreateCdmBuffer() to use size_t for |capacity| (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove cast Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/cdm/simple_cdm_allocator.h ('k') | media/cdm/simple_cdm_buffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cdm/simple_cdm_allocator.h" 5 #include "media/cdm/simple_cdm_allocator.h"
6 6
7 #include "media/base/video_frame.h" 7 #include "media/base/video_frame.h"
8 #include "media/cdm/cdm_helpers.h" 8 #include "media/cdm/cdm_helpers.h"
9 #include "media/cdm/simple_cdm_buffer.h" 9 #include "media/cdm/simple_cdm_buffer.h"
10 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 } // namespace 52 } // namespace
53 53
54 SimpleCdmAllocator::SimpleCdmAllocator() {} 54 SimpleCdmAllocator::SimpleCdmAllocator() {}
55 55
56 SimpleCdmAllocator::~SimpleCdmAllocator() {} 56 SimpleCdmAllocator::~SimpleCdmAllocator() {}
57 57
58 // Creates a new SimpleCdmBuffer on every request. It does not keep track of 58 // Creates a new SimpleCdmBuffer on every request. It does not keep track of
59 // the memory allocated, so the caller is responsible for calling Destroy() 59 // the memory allocated, so the caller is responsible for calling Destroy()
60 // on the buffer when it is no longer needed. 60 // on the buffer when it is no longer needed.
61 cdm::Buffer* SimpleCdmAllocator::CreateCdmBuffer(uint32_t capacity) { 61 cdm::Buffer* SimpleCdmAllocator::CreateCdmBuffer(size_t capacity) {
62 if (!capacity) 62 if (!capacity)
63 return nullptr; 63 return nullptr;
64 64
65 return SimpleCdmBuffer::Create(capacity); 65 return SimpleCdmBuffer::Create(capacity);
66 } 66 }
67 67
68 // Creates a new SimpleCdmVideoFrame on every request. 68 // Creates a new SimpleCdmVideoFrame on every request.
69 scoped_ptr<VideoFrameImpl> SimpleCdmAllocator::CreateCdmVideoFrame() { 69 scoped_ptr<VideoFrameImpl> SimpleCdmAllocator::CreateCdmVideoFrame() {
70 return make_scoped_ptr(new SimpleCdmVideoFrame()); 70 return make_scoped_ptr(new SimpleCdmVideoFrame());
71 } 71 }
72 72
73 } // namespace media 73 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/simple_cdm_allocator.h ('k') | media/cdm/simple_cdm_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698