Commit d81f6b55 authored by Dean Liao's avatar Dean Liao Committed by Commit Bot

media/base: Export IsStorageTypeMappable().

IsStorageTypeMappable() was defined and used in video_frame.cc only.
Export it as VideoFrame::IsStorageTypeMappable() to use in other
places.

BUG=None
TEST=Pass CQ.

Change-Id: Ib3bcf5291e64464c8a75f0e9c5fe2f4c62b179d5
Reviewed-on: https://chromium-review.googlesource.com/c/1356459Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Shuo-Peng Liao <deanliao@google.com>
Cr-Commit-Position: refs/heads/master@{#613010}
parent 49e85eef
...@@ -78,9 +78,8 @@ static std::string StorageTypeToString( ...@@ -78,9 +78,8 @@ static std::string StorageTypeToString(
return "INVALID"; return "INVALID";
} }
// Returns true if |frame| is accesible mapped in the VideoFrame memory space.
// static // static
static bool IsStorageTypeMappable(VideoFrame::StorageType storage_type) { bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) {
return return
#if defined(OS_LINUX) #if defined(OS_LINUX)
// This is not strictly needed but makes explicit that, at VideoFrame // This is not strictly needed but makes explicit that, at VideoFrame
......
...@@ -344,6 +344,10 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { ...@@ -344,6 +344,10 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
static void HashFrameForTesting(base::MD5Context* context, static void HashFrameForTesting(base::MD5Context* context,
const scoped_refptr<VideoFrame>& frame); const scoped_refptr<VideoFrame>& frame);
// Returns true if |frame| is accesible mapped in the VideoFrame memory space.
// static
static bool IsStorageTypeMappable(VideoFrame::StorageType storage_type);
// Returns true if |frame| is accessible and mapped in the VideoFrame memory // Returns true if |frame| is accessible and mapped in the VideoFrame memory
// space. If false, clients should refrain from accessing data(), // space. If false, clients should refrain from accessing data(),
// visible_data() etc. // visible_data() etc.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment