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 "ui/gl/gl_bindings.h" | 8 #include "ui/gl/gl_bindings.h" |
9 #include "ui/gl/scoped_make_current.h" | 9 #include "ui/gl/scoped_make_current.h" |
10 | 10 |
11 namespace content { | 11 namespace media { |
12 | 12 |
13 AVDASharedState::AVDASharedState() | 13 AVDASharedState::AVDASharedState() |
14 : surface_texture_service_id_(0), | 14 : surface_texture_service_id_(0), |
15 frame_available_event_(false, false), | 15 frame_available_event_(false, false), |
16 surface_texture_is_attached_(false) {} | 16 surface_texture_is_attached_(false) {} |
17 | 17 |
18 AVDASharedState::~AVDASharedState() {} | 18 AVDASharedState::~AVDASharedState() {} |
19 | 19 |
20 void AVDASharedState::SignalFrameAvailable() { | 20 void AVDASharedState::SignalFrameAvailable() { |
21 frame_available_event_.Signal(); | 21 frame_available_event_.Signal(); |
(...skipping 14 matching lines...) Expand all Loading... |
36 | 36 |
37 surface_texture_is_attached_ = true; | 37 surface_texture_is_attached_ = true; |
38 } | 38 } |
39 | 39 |
40 void AVDASharedState::DidDetachSurfaceTexture() { | 40 void AVDASharedState::DidDetachSurfaceTexture() { |
41 context_ = nullptr; | 41 context_ = nullptr; |
42 surface_ = nullptr; | 42 surface_ = nullptr; |
43 surface_texture_is_attached_ = false; | 43 surface_texture_is_attached_ = false; |
44 } | 44 } |
45 | 45 |
46 } // namespace content | 46 } // namespace media |
OLD | NEW |