Chromium Code Reviews| Index: media/gpu/avda_surface_bundle.cc |
| diff --git a/media/gpu/avda_surface_bundle.cc b/media/gpu/avda_surface_bundle.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..265c2b0dfdbc9eb2722c3e0492ed0d0e0bab7b1c |
| --- /dev/null |
| +++ b/media/gpu/avda_surface_bundle.cc |
| @@ -0,0 +1,22 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "media/gpu/avda_surface_bundle.h" |
| + |
| +namespace media { |
| + |
| +AVDASurfaceBundle::AVDASurfaceBundle(int surface_id) : surface_id(surface_id) {} |
| + |
| +AVDASurfaceBundle::~AVDASurfaceBundle() { |
| + // Explicitly free the surface first, just to be sure that it's deleted before |
| + // the SurfaceTexture is. |
| + surface = gl::ScopedJavaSurface(); |
| + // We do not ReleaseSurfaceTexture here, since the consumer might still have |
| + // a reference to |surface_texture|, and might have a back buffer to swap. |
| + // If we knew that there was no pending back buffer, then we could release |
| + // ithere since the producer side is shut down. |
|
watk
2017/02/23 20:03:47
s/ithere/it there/
liberato (no reviews please)
2017/03/06 22:59:36
Done.
|
| + surface_texture = nullptr; |
| +} |
| + |
| +} // namespace media |