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

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

Issue 456823002: Use GLHelper for glReadPixels and format detection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Integrate feedback from oetuaho-nv Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/media/renderer_gpu_video_accelerator_factories.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "media/filters/gpu_video_accelerator_factories.h" 16 #include "media/filters/gpu_video_accelerator_factories.h"
17 #include "ui/gfx/size.h" 17 #include "ui/gfx/size.h"
18 18
19 namespace base { 19 namespace base {
20 class WaitableEvent; 20 class WaitableEvent;
21 } 21 }
22 22
23 namespace content { 23 namespace content {
24 class ContextProviderCommandBuffer; 24 class ContextProviderCommandBuffer;
25 class GLHelper;
25 class GpuChannelHost; 26 class GpuChannelHost;
26 class WebGraphicsContext3DCommandBufferImpl; 27 class WebGraphicsContext3DCommandBufferImpl;
27 28
28 // Glue code to expose functionality needed by media::GpuVideoAccelerator to 29 // Glue code to expose functionality needed by media::GpuVideoAccelerator to
29 // RenderViewImpl. This class is entirely an implementation detail of 30 // RenderViewImpl. This class is entirely an implementation detail of
30 // RenderViewImpl and only has its own header to allow extraction of its 31 // RenderViewImpl and only has its own header to allow extraction of its
31 // implementation from render_view_impl.cc which is already far too large. 32 // implementation from render_view_impl.cc which is already far too large.
32 // 33 //
33 // The RendererGpuVideoAcceleratorFactories can be constructed on any thread, 34 // The RendererGpuVideoAcceleratorFactories can be constructed on any thread,
34 // but subsequent calls to all public methods of the class must be called from 35 // but subsequent calls to all public methods of the class must be called from
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 const scoped_refptr<ContextProviderCommandBuffer>& context_provider); 72 const scoped_refptr<ContextProviderCommandBuffer>& context_provider);
72 virtual ~RendererGpuVideoAcceleratorFactories(); 73 virtual ~RendererGpuVideoAcceleratorFactories();
73 74
74 // Helper to bind |context_provider| to the |task_runner_| thread after 75 // Helper to bind |context_provider| to the |task_runner_| thread after
75 // construction. 76 // construction.
76 void BindContext(); 77 void BindContext();
77 78
78 // Helper to get a pointer to the WebGraphicsContext3DCommandBufferImpl, 79 // Helper to get a pointer to the WebGraphicsContext3DCommandBufferImpl,
79 // if it has not been lost yet. 80 // if it has not been lost yet.
80 WebGraphicsContext3DCommandBufferImpl* GetContext3d(); 81 WebGraphicsContext3DCommandBufferImpl* GetContext3d();
82 GLHelper* GetGLHelper();
81 83
82 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 84 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
83 scoped_refptr<GpuChannelHost> gpu_channel_host_; 85 scoped_refptr<GpuChannelHost> gpu_channel_host_;
84 scoped_refptr<ContextProviderCommandBuffer> context_provider_; 86 scoped_refptr<ContextProviderCommandBuffer> context_provider_;
87 scoped_ptr<GLHelper> gl_helper_;
85 88
86 // For sending requests to allocate shared memory in the Browser process. 89 // For sending requests to allocate shared memory in the Browser process.
87 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 90 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
88 91
89 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories); 92 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories);
90 }; 93 };
91 94
92 } // namespace content 95 } // namespace content
93 96
94 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 97 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/renderer_gpu_video_accelerator_factories.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698