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

Side by Side Diff: content/renderer/media/renderer_gpu_video_accelerator_factories.h

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 6 years 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 unified diff | Download patch
OLDNEW
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 CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
6 #define CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 6 #define CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/synchronization/waitable_event.h" 13 #include "base/synchronization/waitable_event.h"
14 #include "content/child/thread_safe_sender.h" 14 #include "content/child/thread_safe_sender.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "gpu/config/gpu_info.h"
16 #include "media/filters/gpu_video_accelerator_factories.h" 17 #include "media/filters/gpu_video_accelerator_factories.h"
17 #include "ui/gfx/size.h" 18 #include "ui/gfx/size.h"
18 19
19 namespace base { 20 namespace base {
20 class WaitableEvent; 21 class WaitableEvent;
21 } 22 }
22 23
23 namespace content { 24 namespace content {
24 class ContextProviderCommandBuffer; 25 class ContextProviderCommandBuffer;
25 class GLHelper; 26 class GLHelper;
(...skipping 30 matching lines...) Expand all
56 std::vector<uint32>* texture_ids, 57 std::vector<uint32>* texture_ids,
57 std::vector<gpu::Mailbox>* texture_mailboxes, 58 std::vector<gpu::Mailbox>* texture_mailboxes,
58 uint32 texture_target) override; 59 uint32 texture_target) override;
59 void DeleteTexture(uint32 texture_id) override; 60 void DeleteTexture(uint32 texture_id) override;
60 void WaitSyncPoint(uint32 sync_point) override; 61 void WaitSyncPoint(uint32 sync_point) override;
61 void ReadPixels(uint32 texture_id, 62 void ReadPixels(uint32 texture_id,
62 const gfx::Rect& visible_rect, 63 const gfx::Rect& visible_rect,
63 const SkBitmap& pixels) override; 64 const SkBitmap& pixels) override;
64 scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) override; 65 scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) override;
65 scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() override; 66 scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() override;
67
68 media::VideoDecodeAccelerator::SupportedResolution
69 ConvertGpuToMediaResolution(
70 const gpu::VideoDecodeAcceleratorSupportedResolution& gpu_resolution);
71 media::VideoDecodeAccelerator::SupportedResolution
72 GetVideoDecodeAcceleratorSupportedResolution() override;
66 std::vector<media::VideoEncodeAccelerator::SupportedProfile> 73 std::vector<media::VideoEncodeAccelerator::SupportedProfile>
67 GetVideoEncodeAcceleratorSupportedProfiles() override; 74 GetVideoEncodeAcceleratorSupportedProfiles() override;
68 75
69 private: 76 private:
70 friend class base::RefCountedThreadSafe<RendererGpuVideoAcceleratorFactories>; 77 friend class base::RefCountedThreadSafe<RendererGpuVideoAcceleratorFactories>;
71 RendererGpuVideoAcceleratorFactories( 78 RendererGpuVideoAcceleratorFactories(
72 GpuChannelHost* gpu_channel_host, 79 GpuChannelHost* gpu_channel_host,
73 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 80 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
74 const scoped_refptr<ContextProviderCommandBuffer>& context_provider); 81 const scoped_refptr<ContextProviderCommandBuffer>& context_provider);
75 ~RendererGpuVideoAcceleratorFactories() override; 82 ~RendererGpuVideoAcceleratorFactories() override;
76 83
77 // Helper to bind |context_provider| to the |task_runner_| thread after 84 // Helper to bind |context_provider| to the |task_runner_| thread after
(...skipping 12 matching lines...) Expand all
90 97
91 // For sending requests to allocate shared memory in the Browser process. 98 // For sending requests to allocate shared memory in the Browser process.
92 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 99 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
93 100
94 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories); 101 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories);
95 }; 102 };
96 103
97 } // namespace content 104 } // namespace content
98 105
99 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 106 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698