OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |