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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.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, 6 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
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/common/gpu/media/gpu_video_decode_accelerator.h" 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 24 matching lines...) Expand all
35 35
36 #include "gpu/command_buffer/service/texture_manager.h" 36 #include "gpu/command_buffer/service/texture_manager.h"
37 #include "ui/gfx/size.h" 37 #include "ui/gfx/size.h"
38 38
39 using gpu::gles2::TextureManager; 39 using gpu::gles2::TextureManager;
40 40
41 namespace content { 41 namespace content {
42 42
43 static bool MakeDecoderContextCurrent( 43 static bool MakeDecoderContextCurrent(
44 const base::WeakPtr<GpuCommandBufferStub> stub) { 44 const base::WeakPtr<GpuCommandBufferStub> stub) {
45 if (!stub) { 45 if (!stub.get()) {
46 DLOG(ERROR) << "Stub is gone; won't MakeCurrent()."; 46 DLOG(ERROR) << "Stub is gone; won't MakeCurrent().";
47 return false; 47 return false;
48 } 48 }
49 49
50 if (!stub->decoder()->MakeCurrent()) { 50 if (!stub->decoder()->MakeCurrent()) {
51 DLOG(ERROR) << "Failed to MakeCurrent()"; 51 DLOG(ERROR) << "Failed to MakeCurrent()";
52 return false; 52 return false;
53 } 53 }
54 54
55 return true; 55 return true;
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 void GpuVideoDecodeAccelerator::OnWillDestroyStub() { 342 void GpuVideoDecodeAccelerator::OnWillDestroyStub() {
343 delete this; 343 delete this;
344 } 344 }
345 345
346 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { 346 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) {
347 DCHECK(stub_); 347 DCHECK(stub_);
348 return stub_->channel()->Send(message); 348 return stub_->channel()->Send(message);
349 } 349 }
350 350
351 } // namespace content 351 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | content/plugin/webplugin_delegate_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698