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

Unified Diff: media/base/video_frame.cc

Issue 2395913003: Cleanup of passing GpuMemoryBuffer backed video frames (Closed)
Patch Set: Rebase Created 4 years, 2 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
« no previous file with comments | « media/base/video_frame.h ('k') | media/gpu/ipc/client/gpu_video_encode_accelerator_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 62b347dca3f953bff4e5184d3b21de374f0ec6c2..fd4788026434039525f9b5cdfe76c69210af25af 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -57,8 +57,6 @@ static std::string StorageTypeToString(
case VideoFrame::STORAGE_DMABUFS:
return "DMABUFS";
#endif
- case VideoFrame::STORAGE_GPU_MEMORY_BUFFERS:
- return "GPU_MEMORY_BUFFERS";
case VideoFrame::STORAGE_MOJO_SHARED_BUFFER:
return "MOJO_SHARED_BUFFER";
}
@@ -79,7 +77,6 @@ static bool IsStorageTypeMappable(VideoFrame::StorageType storage_type) {
(storage_type == VideoFrame::STORAGE_UNOWNED_MEMORY ||
storage_type == VideoFrame::STORAGE_OWNED_MEMORY ||
storage_type == VideoFrame::STORAGE_SHMEM ||
- storage_type == VideoFrame::STORAGE_GPU_MEMORY_BUFFERS ||
storage_type == VideoFrame::STORAGE_MOJO_SHARED_BUFFER);
}
@@ -246,44 +243,6 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalYuvData(
}
// static
-scoped_refptr<VideoFrame> VideoFrame::WrapExternalYuvGpuMemoryBuffers(
- VideoPixelFormat format,
- const gfx::Size& coded_size,
- const gfx::Rect& visible_rect,
- const gfx::Size& natural_size,
- int32_t y_stride,
- int32_t u_stride,
- int32_t v_stride,
- uint8_t* y_data,
- uint8_t* u_data,
- uint8_t* v_data,
- const gfx::GpuMemoryBufferHandle& y_handle,
- const gfx::GpuMemoryBufferHandle& u_handle,
- const gfx::GpuMemoryBufferHandle& v_handle,
- base::TimeDelta timestamp) {
- const StorageType storage = STORAGE_GPU_MEMORY_BUFFERS;
- if (!IsValidConfig(format, storage, coded_size, visible_rect, natural_size)) {
- LOG(DFATAL) << __func__ << " Invalid config."
- << ConfigToString(format, storage, coded_size, visible_rect,
- natural_size);
- return nullptr;
- }
-
- scoped_refptr<VideoFrame> frame(new VideoFrame(
- format, storage, coded_size, visible_rect, natural_size, timestamp));
- frame->strides_[kYPlane] = y_stride;
- frame->strides_[kUPlane] = u_stride;
- frame->strides_[kVPlane] = v_stride;
- frame->data_[kYPlane] = y_data;
- frame->data_[kUPlane] = u_data;
- frame->data_[kVPlane] = v_data;
- frame->gpu_memory_buffer_handles_.push_back(y_handle);
- frame->gpu_memory_buffer_handles_.push_back(u_handle);
- frame->gpu_memory_buffer_handles_.push_back(v_handle);
- return frame;
-}
-
-// static
scoped_refptr<VideoFrame> VideoFrame::WrapExternalYuvaData(
VideoPixelFormat format,
const gfx::Size& coded_size,
@@ -722,13 +681,6 @@ size_t VideoFrame::shared_memory_offset() const {
return shared_memory_offset_;
}
-const std::vector<gfx::GpuMemoryBufferHandle>&
-VideoFrame::gpu_memory_buffer_handles() const {
- DCHECK_EQ(storage_type_, STORAGE_GPU_MEMORY_BUFFERS);
- DCHECK(!gpu_memory_buffer_handles_.empty());
- return gpu_memory_buffer_handles_;
-}
-
#if defined(OS_LINUX)
int VideoFrame::dmabuf_fd(size_t plane) const {
DCHECK_EQ(storage_type_, STORAGE_DMABUFS);
« no previous file with comments | « media/base/video_frame.h ('k') | media/gpu/ipc/client/gpu_video_encode_accelerator_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698