| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/avda_shared_state.h" | 5 #include "media/gpu/avda_shared_state.h" |
| 6 | 6 |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "content/common/gpu/media/avda_codec_image.h" | 8 #include "media/gpu/avda_codec_image.h" |
| 9 #include "ui/gl/gl_bindings.h" | 9 #include "ui/gl/gl_bindings.h" |
| 10 #include "ui/gl/scoped_make_current.h" | 10 #include "ui/gl/scoped_make_current.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace media { |
| 13 | 13 |
| 14 AVDASharedState::AVDASharedState() | 14 AVDASharedState::AVDASharedState() |
| 15 : surface_texture_service_id_(0), | 15 : surface_texture_service_id_(0), |
| 16 frame_available_event_(false, false), | 16 frame_available_event_(false, false), |
| 17 surface_texture_is_attached_(false) {} | 17 surface_texture_is_attached_(false) {} |
| 18 | 18 |
| 19 AVDASharedState::~AVDASharedState() {} | 19 AVDASharedState::~AVDASharedState() {} |
| 20 | 20 |
| 21 void AVDASharedState::SignalFrameAvailable() { | 21 void AVDASharedState::SignalFrameAvailable() { |
| 22 frame_available_event_.Signal(); | 22 frame_available_event_.Signal(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 DCHECK(codec_images_.find(picture_buffer_id) == codec_images_.end()); | 60 DCHECK(codec_images_.find(picture_buffer_id) == codec_images_.end()); |
| 61 codec_images_[picture_buffer_id] = image; | 61 codec_images_[picture_buffer_id] = image; |
| 62 } | 62 } |
| 63 | 63 |
| 64 AVDACodecImage* AVDASharedState::GetImageForPicture( | 64 AVDACodecImage* AVDASharedState::GetImageForPicture( |
| 65 int picture_buffer_id) const { | 65 int picture_buffer_id) const { |
| 66 auto it = codec_images_.find(picture_buffer_id); | 66 auto it = codec_images_.find(picture_buffer_id); |
| 67 return it == codec_images_.end() ? nullptr : it->second; | 67 return it == codec_images_.end() ? nullptr : it->second; |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace content | 70 } // namespace media |
| OLD | NEW |