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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 if (!stub->decoder()->MakeCurrent()) { | 54 if (!stub->decoder()->MakeCurrent()) { |
55 DLOG(ERROR) << "Failed to MakeCurrent()"; | 55 DLOG(ERROR) << "Failed to MakeCurrent()"; |
56 return false; | 56 return false; |
57 } | 57 } |
58 | 58 |
59 return true; | 59 return true; |
60 } | 60 } |
61 | 61 |
62 // DebugAutoLock works like AutoLock but only acquires the lock when | 62 // DebugAutoLock works like AutoLock but only acquires the lock when |
63 // DCHECK is on. | 63 // DCHECK is on. |
64 #if DCHECK_IS_ON | 64 #if DCHECK_IS_ON() |
65 typedef base::AutoLock DebugAutoLock; | 65 typedef base::AutoLock DebugAutoLock; |
66 #else | 66 #else |
67 class DebugAutoLock { | 67 class DebugAutoLock { |
68 public: | 68 public: |
69 explicit DebugAutoLock(base::Lock&) {} | 69 explicit DebugAutoLock(base::Lock&) {} |
70 }; | 70 }; |
71 #endif | 71 #endif |
72 | 72 |
73 class GpuVideoDecodeAccelerator::MessageFilter : public IPC::MessageFilter { | 73 class GpuVideoDecodeAccelerator::MessageFilter : public IPC::MessageFilter { |
74 public: | 74 public: |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 return stub_->channel()->Send(message); | 505 return stub_->channel()->Send(message); |
506 } | 506 } |
507 | 507 |
508 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, | 508 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, |
509 bool succeeded) { | 509 bool succeeded) { |
510 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); | 510 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); |
511 Send(message); | 511 Send(message); |
512 } | 512 } |
513 | 513 |
514 } // namespace content | 514 } // namespace content |
OLD | NEW |