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

Unified Diff: content/renderer/render_thread_impl.h

Issue 10832264: Fix lifecycle-vs-threads of GpuVDAContext3D. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fwd declare callback class. Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
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..dfcdb6585b2a99e78d38e50de9fb3e43f752a1cc 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -218,9 +218,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 +302,8 @@ class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread,
ObserverList<content::RenderProcessObserver> observers_;
+ class GpuVDAContextLostCallback;
+ scoped_ptr<GpuVDAContextLostCallback> context_lost_cb_;
scoped_ptr<WebGraphicsContext3DCommandBufferImpl> gpu_vda_context3d_;
scoped_ptr<content::AudioRendererMixerManager> audio_renderer_mixer_manager_;
« no previous file with comments | « content/renderer/media/renderer_gpu_video_decoder_factories.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698