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

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

Issue 10828298: Don't try to set context callback if the context failed to be created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 } 786 }
787 } 787 }
788 788
789 WebGraphicsContext3DCommandBufferImpl* 789 WebGraphicsContext3DCommandBufferImpl*
790 RenderThreadImpl::GetGpuVDAContext3D() { 790 RenderThreadImpl::GetGpuVDAContext3D() {
791 if (!gpu_vda_context3d_.get()) { 791 if (!gpu_vda_context3d_.get()) {
792 gpu_vda_context3d_.reset( 792 gpu_vda_context3d_.reset(
793 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 793 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
794 this, WebKit::WebGraphicsContext3D::Attributes(), 794 this, WebKit::WebGraphicsContext3D::Attributes(),
795 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"))); 795 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D")));
796 gpu_vda_context3d_->setContextLostCallback(context_lost_cb_.get()); 796 if (gpu_vda_context3d_.get())
797 gpu_vda_context3d_->setContextLostCallback(context_lost_cb_.get());
797 } 798 }
798 return gpu_vda_context3d_.get(); 799 return gpu_vda_context3d_.get();
799 } 800 }
800 801
801 content::AudioRendererMixerManager* 802 content::AudioRendererMixerManager*
802 RenderThreadImpl::GetAudioRendererMixerManager() { 803 RenderThreadImpl::GetAudioRendererMixerManager() {
803 if (!audio_renderer_mixer_manager_.get()) { 804 if (!audio_renderer_mixer_manager_.get()) {
804 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager( 805 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager(
805 audio_hardware::GetOutputSampleRate(), 806 audio_hardware::GetOutputSampleRate(),
806 audio_hardware::GetOutputBufferSize())); 807 audio_hardware::GetOutputBufferSize()));
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 1071
1071 scoped_refptr<base::MessageLoopProxy> 1072 scoped_refptr<base::MessageLoopProxy>
1072 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1073 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1073 DCHECK(message_loop() == MessageLoop::current()); 1074 DCHECK(message_loop() == MessageLoop::current());
1074 if (!file_thread_.get()) { 1075 if (!file_thread_.get()) {
1075 file_thread_.reset(new base::Thread("Renderer::FILE")); 1076 file_thread_.reset(new base::Thread("Renderer::FILE"));
1076 file_thread_->Start(); 1077 file_thread_->Start();
1077 } 1078 }
1078 return file_thread_->message_loop_proxy(); 1079 return file_thread_->message_loop_proxy();
1079 } 1080 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698