OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "media/gpu/avda_surface_bundle.h" | 5 #include "media/gpu/avda_surface_bundle.h" |
| 6 #include "media/base/android/android_overlay.h" |
6 | 7 |
7 namespace media { | 8 namespace media { |
8 | 9 |
9 AVDASurfaceBundle::AVDASurfaceBundle(int surface_id) : surface_id(surface_id) {} | 10 AVDASurfaceBundle::AVDASurfaceBundle(int surface_id) : surface_id(surface_id) {} |
10 | 11 |
11 AVDASurfaceBundle::~AVDASurfaceBundle() { | 12 AVDASurfaceBundle::~AVDASurfaceBundle() { |
12 // Explicitly free the surface first, just to be sure that it's deleted before | 13 // Explicitly free the surface first, just to be sure that it's deleted before |
13 // the SurfaceTexture is. | 14 // the SurfaceTexture is. |
14 surface = gl::ScopedJavaSurface(); | 15 surface_texture_surface = gl::ScopedJavaSurface(); |
| 16 |
15 // Also release the back buffers. We might want to let the consumer do this | 17 // Also release the back buffers. We might want to let the consumer do this |
16 // after it has swapped the back buffer it wants, but we don't. | 18 // after it has swapped the back buffer it wants, but we don't. |
17 if (surface_texture) | 19 if (surface_texture) |
18 surface_texture->ReleaseSurfaceTexture(); | 20 surface_texture->ReleaseSurfaceTexture(); |
19 surface_texture = nullptr; | 21 surface_texture = nullptr; |
20 } | 22 } |
21 | 23 |
22 } // namespace media | 24 } // namespace media |
OLD | NEW |