Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1201)

Unified Diff: media/gpu/avda_surface_bundle.cc

Issue 2707703002: Group AVDA output surface into AVDASurfaceBundle. (Closed)
Patch Set: minor fixes after testing Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« media/gpu/avda_surface_bundle.h ('K') | « media/gpu/avda_surface_bundle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b0f7217e1397de45374bab551109945493f46102
--- /dev/null
+++ b/media/gpu/avda_surface_bundle.cc
@@ -0,0 +1,19 @@
+// 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 id) : surface_id(id) {}
watk 2017/02/22 20:38:56 s/id/surface_id/ to match header
liberato (no reviews please) 2017/02/23 18:18:46 Done.
+
+AVDASurfaceBundle::~AVDASurfaceBundle() {
+ // Explicitly free the surface first, just to be sure.
watk 2017/02/22 20:38:56 Unclear what you want to be sure of here. That it'
liberato (no reviews please) 2017/02/23 18:18:46 yes, done.
+ surface = gl::ScopedJavaSurface();
+ // TODO(liberato): should we ReleaseSurfaceTexture here, in case this isn't
+ // the last reference?
+ surface_texture = nullptr;
watk 2017/02/22 20:38:56 Yes I think so. If you drop the bundle you're drop
liberato (no reviews please) 2017/02/23 18:18:46 i'm not sure that it's safe, the more that i think
watk 2017/02/23 20:03:47 But this is what we've always done right? The Post
liberato (no reviews please) 2017/03/06 22:59:36 ah, really good catch! done.
+}
+
+} // namespace media
« media/gpu/avda_surface_bundle.h ('K') | « media/gpu/avda_surface_bundle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698