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

Unified Diff: media/mojo/services/mojo_cdm_allocator.h

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 side-by-side diff with in-line comments
Download patch
Index: media/mojo/services/mojo_cdm_allocator.h
diff --git a/media/mojo/services/mojo_cdm_allocator.h b/media/mojo/services/mojo_cdm_allocator.h
index f0a010355b09b1344add9cf4caaaf739300d8f4f..eab430a3f173c8e625e61b66f3abb9d6c545dff8 100644
--- a/media/mojo/services/mojo_cdm_allocator.h
+++ b/media/mojo/services/mojo_cdm_allocator.h
@@ -5,6 +5,7 @@
#ifndef MEDIA_MOJO_SERVICES_MOJO_CDM_ALLOCATOR_H_
#define MEDIA_MOJO_SERVICES_MOJO_CDM_ALLOCATOR_H_
+#include <stddef.h>
#include <stdint.h>
#include <map>
@@ -25,7 +26,7 @@ class MojoCdmAllocator : public CdmAllocator {
~MojoCdmAllocator() final;
// CdmAllocator implementation.
- cdm::Buffer* CreateCdmBuffer(uint32_t capacity) final;
+ cdm::Buffer* CreateCdmBuffer(size_t capacity) final;
scoped_ptr<VideoFrameImpl> CreateCdmVideoFrame() final;
private:
@@ -35,17 +36,17 @@ class MojoCdmAllocator : public CdmAllocator {
// ScopedSharedBufferHandle so that we can efficiently find an available
// buffer of a particular size. Any buffers in the map are unmapped.
using AvailableBufferMap =
- std::multimap<uint32_t, mojo::ScopedSharedBufferHandle>;
+ std::multimap<size_t, mojo::ScopedSharedBufferHandle>;
// Allocates a mojo::SharedBufferHandle of at least |capacity| bytes.
// |capacity| will be changed to reflect the actual size of the buffer
// allocated.
- mojo::ScopedSharedBufferHandle AllocateNewBuffer(uint32_t* capacity);
+ mojo::ScopedSharedBufferHandle AllocateNewBuffer(size_t* capacity);
// Returns |buffer| to the map of available buffers, ready to be used the
// next time CreateCdmBuffer() is called.
void AddBufferToAvailableMap(mojo::ScopedSharedBufferHandle buffer,
- uint32_t capacity);
+ size_t capacity);
// Returns the MojoHandle for a cdm::Buffer allocated by this class.
MojoHandle GetHandleForTesting(cdm::Buffer* buffer);
« no previous file with comments | « media/mojo/common/mojo_shared_buffer_video_frame_unittest.cc ('k') | media/mojo/services/mojo_cdm_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698