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

Unified Diff: content/renderer/media/renderer_gpu_video_decoder_factories.cc

Issue 16256018: Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrectly modified code Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/media_stream_dispatcher.cc ('k') | content/renderer/pepper/pepper_broker_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/renderer_gpu_video_decoder_factories.cc
diff --git a/content/renderer/media/renderer_gpu_video_decoder_factories.cc b/content/renderer/media/renderer_gpu_video_decoder_factories.cc
index 43da85d4c35eed8fcd81bebdffe5ee51879323c2..b3f8c72cc82b2f5b6f08f5909771e6b28b3df885 100644
--- a/content/renderer/media/renderer_gpu_video_decoder_factories.cc
+++ b/content/renderer/media/renderer_gpu_video_decoder_factories.cc
@@ -49,7 +49,7 @@ RendererGpuVideoDecoderFactories::RendererGpuVideoDecoderFactories(
void RendererGpuVideoDecoderFactories::AsyncGetContext(
WebGraphicsContext3DCommandBufferImpl* context) {
context_ = context->AsWeakPtr();
- if (context_) {
+ if (context_.get()) {
if (context_->makeContextCurrent()) {
// Called once per media player, but is a no-op after the first one in
// each renderer.
@@ -89,10 +89,9 @@ void RendererGpuVideoDecoderFactories::AsyncCreateVideoDecodeAccelerator(
media::VideoDecodeAccelerator::Client* client) {
DCHECK(message_loop_->BelongsToCurrentThread());
- if (context_ && context_->GetCommandBufferProxy()) {
+ if (context_.get() && context_->GetCommandBufferProxy()) {
vda_ = gpu_channel_host_->CreateVideoDecoder(
- context_->GetCommandBufferProxy()->GetRouteID(),
- profile, client);
+ context_->GetCommandBufferProxy()->GetRouteID(), profile, client);
}
compositor_loop_async_waiter_.Signal();
}
@@ -119,7 +118,7 @@ void RendererGpuVideoDecoderFactories::AsyncCreateTextures(
DCHECK(message_loop_->BelongsToCurrentThread());
DCHECK(texture_target);
- if (!context_) {
+ if (!context_.get()) {
compositor_loop_async_waiter_.Signal();
return;
}
@@ -155,7 +154,7 @@ void RendererGpuVideoDecoderFactories::DeleteTexture(uint32 texture_id) {
void RendererGpuVideoDecoderFactories::AsyncDeleteTexture(uint32 texture_id) {
DCHECK(message_loop_->BelongsToCurrentThread());
- if (!context_)
+ if (!context_.get())
return;
gpu::gles2::GLES2Implementation* gles2 = context_->GetImplementation();
@@ -189,7 +188,7 @@ void RendererGpuVideoDecoderFactories::ReadPixels(
void RendererGpuVideoDecoderFactories::AsyncReadPixels(
uint32 texture_id, uint32 texture_target, const gfx::Size& size) {
DCHECK(message_loop_->BelongsToCurrentThread());
- if (!context_) {
+ if (!context_.get()) {
compositor_loop_async_waiter_.Signal();
return;
}
« no previous file with comments | « content/renderer/media/media_stream_dispatcher.cc ('k') | content/renderer/pepper/pepper_broker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698