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

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

Issue 1246783003: Check that |gpu_channel_host_| is not NULL before passing it along. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add message. Created 5 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
« no previous file with comments | « content/renderer/media/renderer_gpu_video_accelerator_factories.cc ('k') | 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 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1442 } 1442 }
1443 if (gpu_va_context_provider_.get()) { 1443 if (gpu_va_context_provider_.get()) {
1444 bool enable_video_accelerator = 1444 bool enable_video_accelerator =
1445 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); 1445 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
1446 std::string image_texture_target_string = 1446 std::string image_texture_target_string =
1447 cmd_line->GetSwitchValueASCII(switches::kContentImageTextureTarget); 1447 cmd_line->GetSwitchValueASCII(switches::kContentImageTextureTarget);
1448 unsigned image_texture_target = 0; 1448 unsigned image_texture_target = 0;
1449 bool parsed_image_texture_target = 1449 bool parsed_image_texture_target =
1450 base::StringToUint(image_texture_target_string, &image_texture_target); 1450 base::StringToUint(image_texture_target_string, &image_texture_target);
1451 DCHECK(parsed_image_texture_target); 1451 DCHECK(parsed_image_texture_target);
1452 CHECK(gpu_channel_host.get()) << "Have gpu_va_context_provider but no "
1453 "gpu_channel_host. See crbug.com/495185.";
1452 gpu_factories = RendererGpuVideoAcceleratorFactories::Create( 1454 gpu_factories = RendererGpuVideoAcceleratorFactories::Create(
1453 gpu_channel_host.get(), media_task_runner, gpu_va_context_provider_, 1455 gpu_channel_host.get(), media_task_runner, gpu_va_context_provider_,
1454 image_texture_target, enable_video_accelerator); 1456 image_texture_target, enable_video_accelerator);
1455 } 1457 }
1456 return gpu_factories; 1458 return gpu_factories;
1457 } 1459 }
1458 1460
1459 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> 1461 scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
1460 RenderThreadImpl::CreateOffscreenContext3d() { 1462 RenderThreadImpl::CreateOffscreenContext3d() {
1461 blink::WebGraphicsContext3D::Attributes attributes(GetOffscreenAttribs()); 1463 blink::WebGraphicsContext3D::Attributes attributes(GetOffscreenAttribs());
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 } 2035 }
2034 2036
2035 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 2037 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2036 size_t erased = 2038 size_t erased =
2037 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 2039 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2038 routing_id_); 2040 routing_id_);
2039 DCHECK_EQ(1u, erased); 2041 DCHECK_EQ(1u, erased);
2040 } 2042 }
2041 2043
2042 } // namespace content 2044 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/renderer_gpu_video_accelerator_factories.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698