Index: content/renderer/render_thread_impl.h |
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h |
index 5ffdda184c02ec26dee41f10d9817c7e46796466..75f6728319c74e3ce132bc2c190e782339fd2d50 100644 |
--- a/content/renderer/render_thread_impl.h |
+++ b/content/renderer/render_thread_impl.h |
@@ -21,6 +21,7 @@ |
#include "content/common/gpu/gpu_process_launch_causes.h" |
#include "content/public/renderer/render_thread.h" |
#include "ipc/ipc_channel_proxy.h" |
+#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" |
#include "ui/gfx/native_widget_types.h" |
class AppCacheDispatcher; |
@@ -218,9 +219,12 @@ class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread, |
// Returns a graphics context shared among all |
// RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned |
// by this class and must be null-tested before each use to detect context |
- // loss. The returned WeakPtr<> is only valid on the compositor thread when |
+ // loss. The returned context is only valid on the compositor thread when |
// threaded compositing is enabled. |
- base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> GetGpuVDAContext3D(); |
+ WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); |
+ |
+ // Handle loss of the shared GpuVDAContext3D context above. |
+ static void OnGpuVDAContextLoss(); |
// AudioRendererMixerManager instance which manages renderer side mixer |
// instances shared based on configured audio parameters. Lazily created on |
@@ -299,6 +303,15 @@ class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread, |
ObserverList<content::RenderProcessObserver> observers_; |
+ class GpuVDAContextLostCallback |
+ : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { |
piman
2012/08/13 17:45:06
Note: I'm fine with this, but FYI you can declare
Ami GONE FROM CHROMIUM
2012/08/13 17:55:38
Taking advantage of the scoped_ptr for auto-dtor g
piman
2012/08/13 18:35:57
Nah, you only need it with the destructor of Rende
|
+ public: |
+ GpuVDAContextLostCallback(); |
+ virtual ~GpuVDAContextLostCallback(); |
+ virtual void onContextLost(); |
+ }; |
+ |
+ scoped_ptr<GpuVDAContextLostCallback> context_lost_cb_; |
scoped_ptr<WebGraphicsContext3DCommandBufferImpl> gpu_vda_context3d_; |
scoped_ptr<content::AudioRendererMixerManager> audio_renderer_mixer_manager_; |