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

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

Issue 10766008: Avoid SEGVing in WebGraphicsContext3DCommandBufferImpl::IsCommandBufferContextLost() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 } 725 }
726 726
727 void RenderThreadImpl::PostponeIdleNotification() { 727 void RenderThreadImpl::PostponeIdleNotification() {
728 idle_notifications_to_skip_ = 2; 728 idle_notifications_to_skip_ = 2;
729 } 729 }
730 730
731 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> 731 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>
732 RenderThreadImpl::GetGpuVDAContext3D() { 732 RenderThreadImpl::GetGpuVDAContext3D() {
733 // If we already handed out a pointer to a context and it's been lost, create 733 // If we already handed out a pointer to a context and it's been lost, create
734 // a new one. 734 // a new one.
735 if (gpu_vda_context3d_.get() && 735 if (gpu_vda_context3d_.get() && gpu_vda_context3d_->isContextLost()) {
736 gpu_vda_context3d_->IsCommandBufferContextLost()) {
737 if (compositor_thread()) { 736 if (compositor_thread()) {
738 compositor_thread()->GetWebThread()->message_loop()->DeleteSoon( 737 compositor_thread()->GetWebThread()->message_loop()->DeleteSoon(
739 FROM_HERE, gpu_vda_context3d_.release()); 738 FROM_HERE, gpu_vda_context3d_.release());
740 } else { 739 } else {
741 gpu_vda_context3d_.reset(); 740 gpu_vda_context3d_.reset();
742 } 741 }
743 } 742 }
744 if (!gpu_vda_context3d_.get()) { 743 if (!gpu_vda_context3d_.get()) {
745 gpu_vda_context3d_.reset( 744 gpu_vda_context3d_.reset(
746 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 745 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 1024
1026 scoped_refptr<base::MessageLoopProxy> 1025 scoped_refptr<base::MessageLoopProxy>
1027 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1026 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1028 DCHECK(message_loop() == MessageLoop::current()); 1027 DCHECK(message_loop() == MessageLoop::current());
1029 if (!file_thread_.get()) { 1028 if (!file_thread_.get()) {
1030 file_thread_.reset(new base::Thread("Renderer::FILE")); 1029 file_thread_.reset(new base::Thread("Renderer::FILE"));
1031 file_thread_->Start(); 1030 file_thread_->Start();
1032 } 1031 }
1033 return file_thread_->message_loop_proxy(); 1032 return file_thread_->message_loop_proxy();
1034 } 1033 }
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