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

Unified Diff: media/video/gpu_memory_buffer_video_frame_copier.h

Issue 1874733002: media: split GpuMemoryBufferVideoFramePool into GpuMemoryBufferVideoFrameCopier/Pool Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add GpuMemoryBufferVideoFramePoolTest Created 4 years, 8 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/video/gpu_memory_buffer_video_frame_copier.h
diff --git a/media/video/gpu_memory_buffer_video_frame_pool.h b/media/video/gpu_memory_buffer_video_frame_copier.h
similarity index 59%
copy from media/video/gpu_memory_buffer_video_frame_pool.h
copy to media/video/gpu_memory_buffer_video_frame_copier.h
index ed4b3617e53cd39b0cf78d7f7dd7e6b9d16ddd47..922b008b0951bd9ba1a2224deb63be599a26180d 100644
--- a/media/video/gpu_memory_buffer_video_frame_pool.h
+++ b/media/video/gpu_memory_buffer_video_frame_copier.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_
-#define MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_
+#ifndef MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_COPIER_H_
+#define MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_COPIER_H_
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -17,21 +17,16 @@ class SingleThreadTaskRunner;
namespace media {
class GpuVideoAcceleratorFactories;
-// Interface to a pool of GpuMemoryBuffers/textures/images that can be used to
-// transform software VideoFrames to VideoFrames backed by native textures.
-// The resources used by the VideoFrame created by the pool will be
-// automatically put back into the pool once the frame is destroyed.
-// The pool recycles resources to a void unnecessarily allocating and
-// destroying textures, images and GpuMemoryBuffer that could result
-// in a round trip to the browser/GPU process.
-class MEDIA_EXPORT GpuMemoryBufferVideoFramePool {
+// Interface to a copier that can be used to transform software VideoFrames to
+// VideoFrames backed by native textures.
+class MEDIA_EXPORT GpuMemoryBufferVideoFrameCopier {
public:
- GpuMemoryBufferVideoFramePool();
- GpuMemoryBufferVideoFramePool(
+ GpuMemoryBufferVideoFrameCopier();
+ GpuMemoryBufferVideoFrameCopier(
const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
const scoped_refptr<base::TaskRunner>& worker_task_runner,
GpuVideoAcceleratorFactories* gpu_factories);
- virtual ~GpuMemoryBufferVideoFramePool();
+ virtual ~GpuMemoryBufferVideoFrameCopier();
// Callback used by MaybeCreateHardwareFrame to deliver a new VideoFrame
// after it has been copied to GpuMemoryBuffers.
@@ -49,12 +44,12 @@ class MEDIA_EXPORT GpuMemoryBufferVideoFramePool {
const FrameReadyCB& frame_ready_cb);
private:
- class PoolImpl;
- scoped_refptr<PoolImpl> pool_impl_;
+ class CopierImpl;
+ scoped_refptr<CopierImpl> copier_impl_;
- DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferVideoFramePool);
+ DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferVideoFrameCopier);
};
} // namespace media
-#endif // MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_
+#endif // MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_COPIER_H_
« no previous file with comments | « media/renderers/video_renderer_impl_unittest.cc ('k') | media/video/gpu_memory_buffer_video_frame_copier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698