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

Side by Side Diff: content/renderer/media/renderer_gpu_video_accelerator_factories.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 | « no previous file | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/media/renderer_gpu_video_accelerator_factories.h" 5 #include "content/renderer/media/renderer_gpu_video_accelerator_factories.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 unsigned image_texture_target, 52 unsigned image_texture_target,
53 bool enable_video_accelerator) 53 bool enable_video_accelerator)
54 : task_runner_(task_runner), 54 : task_runner_(task_runner),
55 gpu_channel_host_(gpu_channel_host), 55 gpu_channel_host_(gpu_channel_host),
56 context_provider_(context_provider), 56 context_provider_(context_provider),
57 image_texture_target_(image_texture_target), 57 image_texture_target_(image_texture_target),
58 video_accelerator_enabled_(enable_video_accelerator), 58 video_accelerator_enabled_(enable_video_accelerator),
59 gpu_memory_buffer_manager_( 59 gpu_memory_buffer_manager_(
60 ChildThreadImpl::current()->gpu_memory_buffer_manager()), 60 ChildThreadImpl::current()->gpu_memory_buffer_manager()),
61 thread_safe_sender_(ChildThreadImpl::current()->thread_safe_sender()) { 61 thread_safe_sender_(ChildThreadImpl::current()->thread_safe_sender()) {
62 DCHECK(gpu_channel_host_.get());
62 } 63 }
63 64
64 RendererGpuVideoAcceleratorFactories::~RendererGpuVideoAcceleratorFactories() {} 65 RendererGpuVideoAcceleratorFactories::~RendererGpuVideoAcceleratorFactories() {}
65 66
66 void RendererGpuVideoAcceleratorFactories::BindContext() { 67 void RendererGpuVideoAcceleratorFactories::BindContext() {
67 DCHECK(task_runner_->BelongsToCurrentThread()); 68 DCHECK(task_runner_->BelongsToCurrentThread());
68 if (!context_provider_->BindToCurrentThread()) 69 if (!context_provider_->BindToCurrentThread())
69 context_provider_ = NULL; 70 context_provider_ = NULL;
70 } 71 }
71 72
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 266
266 media::VideoEncodeAccelerator::SupportedProfiles 267 media::VideoEncodeAccelerator::SupportedProfiles
267 RendererGpuVideoAcceleratorFactories:: 268 RendererGpuVideoAcceleratorFactories::
268 GetVideoEncodeAcceleratorSupportedProfiles() { 269 GetVideoEncodeAcceleratorSupportedProfiles() {
269 return GpuVideoAcceleratorUtil::ConvertGpuToMediaEncodeProfiles( 270 return GpuVideoAcceleratorUtil::ConvertGpuToMediaEncodeProfiles(
270 gpu_channel_host_->gpu_info() 271 gpu_channel_host_->gpu_info()
271 .video_encode_accelerator_supported_profiles); 272 .video_encode_accelerator_supported_profiles);
272 } 273 }
273 274
274 } // namespace content 275 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698