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

Side by Side Diff: content/renderer/render_thread_impl.h

Issue 13890012: Integrate VDA with WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments and update tests Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDER_THREAD_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "base/timer.h" 14 #include "base/timer.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "content/child/child_process.h" 16 #include "content/child/child_process.h"
17 #include "content/child/child_thread.h" 17 #include "content/child/child_thread.h"
18 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
19 #include "content/common/gpu/client/gpu_channel_host.h" 19 #include "content/common/gpu/client/gpu_channel_host.h"
20 #include "content/common/gpu/gpu_process_launch_causes.h" 20 #include "content/common/gpu/gpu_process_launch_causes.h"
21 #include "content/public/renderer/render_thread.h" 21 #include "content/public/renderer/render_thread.h"
22 #include "ipc/ipc_channel_proxy.h" 22 #include "ipc/ipc_channel_proxy.h"
23 #include "media/filters/gpu_video_decoder.h"
23 #include "ui/gfx/native_widget_types.h" 24 #include "ui/gfx/native_widget_types.h"
24 25
25 class GrContext; 26 class GrContext;
26 class SkBitmap; 27 class SkBitmap;
27 struct ViewMsg_New_Params; 28 struct ViewMsg_New_Params;
28 29
29 namespace WebKit { 30 namespace WebKit {
30 class WebGraphicsContext3D; 31 class WebGraphicsContext3D;
31 class WebMediaStreamCenter; 32 class WebMediaStreamCenter;
32 class WebMediaStreamCenterClient; 33 class WebMediaStreamCenterClient;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // Returns a MessageLoopProxy instance corresponding to the message loop 262 // Returns a MessageLoopProxy instance corresponding to the message loop
262 // of the thread on which media operations should be run. Must be called 263 // of the thread on which media operations should be run. Must be called
263 // on the renderer's main thread. 264 // on the renderer's main thread.
264 scoped_refptr<base::MessageLoopProxy> GetMediaThreadMessageLoopProxy(); 265 scoped_refptr<base::MessageLoopProxy> GetMediaThreadMessageLoopProxy();
265 266
266 // Causes the idle handler to skip sending idle notifications 267 // Causes the idle handler to skip sending idle notifications
267 // on the two next scheduled calls, so idle notifications are 268 // on the two next scheduled calls, so idle notifications are
268 // not sent for at least one notification delay. 269 // not sent for at least one notification delay.
269 void PostponeIdleNotification(); 270 void PostponeIdleNotification();
270 271
272 // Gets gpu factories. Returns NULL if VDA is disabled or a graphics context
273 // cannot be obtained.
274 scoped_refptr<media::GpuVideoDecoder::Factories> GetGpuFactories();
275
271 // Returns a graphics context shared among all 276 // Returns a graphics context shared among all
272 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned 277 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned
273 // by this class and must be null-tested before each use to detect context 278 // by this class and must be null-tested before each use to detect context
274 // loss. The returned context is only valid on the compositor thread when 279 // loss. The returned context is only valid on the compositor thread when
275 // threaded compositing is enabled. 280 // threaded compositing is enabled.
276 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); 281 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D();
277 282
278 // Handle loss of the shared GpuVDAContext3D context above. 283 // Handle loss of the shared GpuVDAContext3D context above.
279 static void OnGpuVDAContextLoss(); 284 static void OnGpuVDAContextLoss();
280 285
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_; 464 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_;
460 465
461 HistogramCustomizer histogram_customizer_; 466 HistogramCustomizer histogram_customizer_;
462 467
463 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 468 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
464 }; 469 };
465 470
466 } // namespace content 471 } // namespace content
467 472
468 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 473 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698