Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 5 #ifndef MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
| 6 #define MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 6 #define MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 virtual void DeleteTexture(uint32_t texture_id) = 0; | 80 virtual void DeleteTexture(uint32_t texture_id) = 0; |
| 81 | 81 |
| 82 virtual void WaitSyncToken(const gpu::SyncToken& sync_token) = 0; | 82 virtual void WaitSyncToken(const gpu::SyncToken& sync_token) = 0; |
| 83 | 83 |
| 84 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 84 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
| 85 const gfx::Size& size, | 85 const gfx::Size& size, |
| 86 gfx::BufferFormat format, | 86 gfx::BufferFormat format, |
| 87 gfx::BufferUsage usage) = 0; | 87 gfx::BufferUsage usage) = 0; |
| 88 | 88 |
| 89 virtual bool ShouldUseGpuMemoryBuffersForVideoFrames() const = 0; | 89 virtual bool ShouldUseGpuMemoryBuffersForVideoFrames() const = 0; |
| 90 virtual unsigned ImageTextureTarget() = 0; | 90 virtual std::vector<unsigned> ImageTextureTargets() = 0; |
|
reveman
2016/01/25 18:50:56
nit: "virtual unsigned ImageTextureTarget(gfx::Buf
Daniele Castagna
2016/01/25 20:49:01
Done.
| |
| 91 // Pixel format of the hardware video frames created when GpuMemoryBuffers | 91 // Pixel format of the hardware video frames created when GpuMemoryBuffers |
| 92 // video frames are enabled. | 92 // video frames are enabled. |
| 93 virtual VideoPixelFormat VideoFrameOutputFormat() = 0; | 93 virtual VideoPixelFormat VideoFrameOutputFormat() = 0; |
| 94 | 94 |
| 95 virtual scoped_ptr<ScopedGLContextLock> GetGLContextLock() = 0; | 95 virtual scoped_ptr<ScopedGLContextLock> GetGLContextLock() = 0; |
| 96 | 96 |
| 97 // Allocate & return a shared memory segment. | 97 // Allocate & return a shared memory segment. |
| 98 virtual scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) = 0; | 98 virtual scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) = 0; |
| 99 | 99 |
| 100 // Returns the task runner the video accelerator runs on. | 100 // Returns the task runner the video accelerator runs on. |
| 101 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0; | 101 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0; |
| 102 | 102 |
| 103 // Return the capabilities of video decode accelerator, which includes the | 103 // Return the capabilities of video decode accelerator, which includes the |
| 104 // supported codec profiles. | 104 // supported codec profiles. |
| 105 virtual VideoDecodeAccelerator::Capabilities | 105 virtual VideoDecodeAccelerator::Capabilities |
| 106 GetVideoDecodeAcceleratorCapabilities() = 0; | 106 GetVideoDecodeAcceleratorCapabilities() = 0; |
| 107 | 107 |
| 108 // Returns the supported codec profiles of video encode accelerator. | 108 // Returns the supported codec profiles of video encode accelerator. |
| 109 virtual VideoEncodeAccelerator::SupportedProfiles | 109 virtual VideoEncodeAccelerator::SupportedProfiles |
| 110 GetVideoEncodeAcceleratorSupportedProfiles() = 0; | 110 GetVideoEncodeAcceleratorSupportedProfiles() = 0; |
| 111 | 111 |
| 112 protected: | 112 protected: |
| 113 friend class base::RefCounted<GpuVideoAcceleratorFactories>; | 113 friend class base::RefCounted<GpuVideoAcceleratorFactories>; |
| 114 virtual ~GpuVideoAcceleratorFactories() {} | 114 virtual ~GpuVideoAcceleratorFactories() {} |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 } // namespace media | 117 } // namespace media |
| 118 | 118 |
| 119 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 119 #endif // MEDIA_RENDERERS_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
| OLD | NEW |