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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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>
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy(); 211 scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy();
212 212
213 // Causes the idle handler to skip sending idle notifications 213 // Causes the idle handler to skip sending idle notifications
214 // on the two next scheduled calls, so idle notifications are 214 // on the two next scheduled calls, so idle notifications are
215 // not sent for at least one notification delay. 215 // not sent for at least one notification delay.
216 void PostponeIdleNotification(); 216 void PostponeIdleNotification();
217 217
218 // Returns a graphics context shared among all 218 // Returns a graphics context shared among all
219 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned 219 // RendererGpuVideoDecoderFactories, or NULL on error. Context remains owned
220 // by this class and must be null-tested before each use to detect context 220 // by this class and must be null-tested before each use to detect context
221 // loss. The returned WeakPtr<> is only valid on the compositor thread when 221 // loss. The returned context is only valid on the compositor thread when
222 // threaded compositing is enabled. 222 // threaded compositing is enabled.
223 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> GetGpuVDAContext3D(); 223 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D();
224
225 // Handle loss of the shared GpuVDAContext3D context above.
226 static void OnGpuVDAContextLoss();
224 227
225 // AudioRendererMixerManager instance which manages renderer side mixer 228 // AudioRendererMixerManager instance which manages renderer side mixer
226 // instances shared based on configured audio parameters. Lazily created on 229 // instances shared based on configured audio parameters. Lazily created on
227 // first call. 230 // first call.
228 content::AudioRendererMixerManager* GetAudioRendererMixerManager(); 231 content::AudioRendererMixerManager* GetAudioRendererMixerManager();
229 232
230 private: 233 private:
231 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; 234 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE;
232 235
233 void Init(); 236 void Init();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 295
293 // A lazily initiated thread on which file operations are run. 296 // A lazily initiated thread on which file operations are run.
294 scoped_ptr<base::Thread> file_thread_; 297 scoped_ptr<base::Thread> file_thread_;
295 298
296 bool compositor_initialized_; 299 bool compositor_initialized_;
297 scoped_ptr<CompositorThread> compositor_thread_; 300 scoped_ptr<CompositorThread> compositor_thread_;
298 scoped_ptr<content::old::BrowserPluginRegistry> browser_plugin_registry_; 301 scoped_ptr<content::old::BrowserPluginRegistry> browser_plugin_registry_;
299 302
300 ObserverList<content::RenderProcessObserver> observers_; 303 ObserverList<content::RenderProcessObserver> observers_;
301 304
305 class GpuVDAContextLostCallback;
306 scoped_ptr<GpuVDAContextLostCallback> context_lost_cb_;
302 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> gpu_vda_context3d_; 307 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> gpu_vda_context3d_;
303 308
304 scoped_ptr<content::AudioRendererMixerManager> audio_renderer_mixer_manager_; 309 scoped_ptr<content::AudioRendererMixerManager> audio_renderer_mixer_manager_;
305 310
306 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 311 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
307 }; 312 };
308 313
309 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 314 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW
« 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