| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/debug/trace_event.h" | 6 #include "base/debug/trace_event.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 // Notify the client a picture is ready to be displayed. | 182 // Notify the client a picture is ready to be displayed. |
| 183 ++num_frames_at_client_; | 183 ++num_frames_at_client_; |
| 184 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_); | 184 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_); |
| 185 DVLOG(4) << "Notifying output picture id " << output_id | 185 DVLOG(4) << "Notifying output picture id " << output_id |
| 186 << " for input "<< input_id << " is ready"; | 186 << " for input "<< input_id << " is ready"; |
| 187 // TODO(posciak): Use visible size from decoder here instead | 187 // TODO(posciak): Use visible size from decoder here instead |
| 188 // (crbug.com/402760). | 188 // (crbug.com/402760). |
| 189 if (client_) | 189 if (client_) |
| 190 client_->PictureReady( | 190 client_->PictureReady( |
| 191 media::Picture(output_id, input_id, gfx::Rect(picture->size()), false)); | 191 media::Picture(output_id, input_id, gfx::Rect(picture->size()))); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void VaapiVideoDecodeAccelerator::TryOutputSurface() { | 194 void VaapiVideoDecodeAccelerator::TryOutputSurface() { |
| 195 DCHECK_EQ(message_loop_, base::MessageLoop::current()); | 195 DCHECK_EQ(message_loop_, base::MessageLoop::current()); |
| 196 | 196 |
| 197 // Handle Destroy() arriving while pictures are queued for output. | 197 // Handle Destroy() arriving while pictures are queued for output. |
| 198 if (!client_) | 198 if (!client_) |
| 199 return; | 199 return; |
| 200 | 200 |
| 201 if (pending_output_cbs_.empty() || output_buffers_.empty()) | 201 if (pending_output_cbs_.empty() || output_buffers_.empty()) |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 DCHECK_EQ(message_loop_, base::MessageLoop::current()); | 732 DCHECK_EQ(message_loop_, base::MessageLoop::current()); |
| 733 Cleanup(); | 733 Cleanup(); |
| 734 delete this; | 734 delete this; |
| 735 } | 735 } |
| 736 | 736 |
| 737 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { | 737 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { |
| 738 return false; | 738 return false; |
| 739 } | 739 } |
| 740 | 740 |
| 741 } // namespace content | 741 } // namespace content |
| OLD | NEW |