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