| OLD | NEW |
| 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/memory/memory_pressure_listener.h" | 12 #include "base/memory/memory_pressure_listener.h" |
| 13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 // Returns a MessageLoopProxy instance corresponding to the message loop | 247 // Returns a MessageLoopProxy instance corresponding to the message loop |
| 247 // of the thread on which media operations should be run. Must be called | 248 // of the thread on which media operations should be run. Must be called |
| 248 // on the renderer's main thread. | 249 // on the renderer's main thread. |
| 249 scoped_refptr<base::MessageLoopProxy> GetMediaThreadMessageLoopProxy(); | 250 scoped_refptr<base::MessageLoopProxy> GetMediaThreadMessageLoopProxy(); |
| 250 | 251 |
| 251 // Causes the idle handler to skip sending idle notifications | 252 // Causes the idle handler to skip sending idle notifications |
| 252 // on the two next scheduled calls, so idle notifications are | 253 // on the two next scheduled calls, so idle notifications are |
| 253 // not sent for at least one notification delay. | 254 // not sent for at least one notification delay. |
| 254 void PostponeIdleNotification(); | 255 void PostponeIdleNotification(); |
| 255 | 256 |
| 257 // Gets gpu factories. Returns NULL if VDA is disabled or a graphics context |
| 258 // cannot be obtained. |
| 259 scoped_refptr<media::GpuVideoDecoder::Factories> GetGpuFactories(); |
| 260 |
| 256 // Returns a graphics context shared among all | 261 // Returns a graphics context shared among all |
| 257 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned | 262 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned |
| 258 // by this class and must be null-tested before each use to detect context | 263 // by this class and must be null-tested before each use to detect context |
| 259 // loss. The returned context is only valid on the compositor thread when | 264 // loss. The returned context is only valid on the compositor thread when |
| 260 // threaded compositing is enabled. | 265 // threaded compositing is enabled. |
| 261 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); | 266 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); |
| 262 | 267 |
| 263 // Handle loss of the shared GpuVDAContext3D context above. | 268 // Handle loss of the shared GpuVDAContext3D context above. |
| 264 static void OnGpuVDAContextLoss(); | 269 static void OnGpuVDAContextLoss(); |
| 265 | 270 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 HistogramCustomizer histogram_customizer_; | 476 HistogramCustomizer histogram_customizer_; |
| 472 | 477 |
| 473 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 478 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
| 474 | 479 |
| 475 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 480 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 476 }; | 481 }; |
| 477 | 482 |
| 478 } // namespace content | 483 } // namespace content |
| 479 | 484 |
| 480 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 485 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |