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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 16703020: Rewrite scoped_ptr<T>(NULL) to use the default ctor in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up insanity 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
56 } 56 }
57 57
58 GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator( 58 GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator(int32 host_route_id,
59 int32 host_route_id, 59 GpuCommandBufferStub* stub)
60 GpuCommandBufferStub* stub)
61 : init_done_msg_(NULL), 60 : init_done_msg_(NULL),
62 host_route_id_(host_route_id), 61 host_route_id_(host_route_id),
63 stub_(stub), 62 stub_(stub),
64 video_decode_accelerator_(NULL),
65 texture_target_(0) { 63 texture_target_(0) {
66 DCHECK(stub_); 64 DCHECK(stub_);
67 stub_->AddDestructionObserver(this); 65 stub_->AddDestructionObserver(this);
68 stub_->channel()->AddRoute(host_route_id_, this); 66 stub_->channel()->AddRoute(host_route_id_, this);
69 make_context_current_ = 67 make_context_current_ =
70 base::Bind(&MakeDecoderContextCurrent, stub_->AsWeakPtr()); 68 base::Bind(&MakeDecoderContextCurrent, stub_->AsWeakPtr());
71 } 69 }
72 70
73 GpuVideoDecodeAccelerator::~GpuVideoDecodeAccelerator() { 71 GpuVideoDecodeAccelerator::~GpuVideoDecodeAccelerator() {
74 DCHECK(stub_); 72 DCHECK(stub_);
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 void GpuVideoDecodeAccelerator::OnWillDestroyStub() { 340 void GpuVideoDecodeAccelerator::OnWillDestroyStub() {
343 delete this; 341 delete this;
344 } 342 }
345 343
346 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { 344 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) {
347 DCHECK(stub_); 345 DCHECK(stub_);
348 return stub_->channel()->Send(message); 346 return stub_->channel()->Send(message);
349 } 347 }
350 348
351 } // namespace content 349 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_manager_unittest.cc ('k') | content/public/test/test_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698