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

Unified Diff: media/gpu/avda_surface_tracker.cc

Issue 2508053002: media: Do a TimedWait() for video surface teardown in AVDA (Closed)
Patch Set: change timeout to 2 Created 4 years, 1 month 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
« no previous file with comments | « media/gpu/avda_surface_tracker.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_tracker.cc
diff --git a/media/gpu/avda_surface_tracker.cc b/media/gpu/avda_surface_tracker.cc
deleted file mode 100644
index 8638f5ce50af7ab2d30cf659c9404c7caa137474..0000000000000000000000000000000000000000
--- a/media/gpu/avda_surface_tracker.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2016 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_tracker.h"
-
-#include "base/callback.h"
-#include "base/lazy_instance.h"
-#include "base/threading/thread_checker.h"
-
-namespace media {
-
-namespace {
-static base::LazyInstance<AVDASurfaceTracker> g_lazy_instance =
- LAZY_INSTANCE_INITIALIZER;
-}
-
-AVDASurfaceTracker::AVDASurfaceTracker() {}
-
-AVDASurfaceTracker::~AVDASurfaceTracker() {}
-
-void AVDASurfaceTracker::RegisterOnDestroyingSurfaceCallback(
- const OnDestroyingSurfaceCallback& cb) {
- DCHECK(thread_checker_.CalledOnValidThread());
- callbacks_.push_back(cb);
-}
-
-void AVDASurfaceTracker::UnregisterOnDestroyingSurfaceCallback(
- const OnDestroyingSurfaceCallback& cb) {
- DCHECK(thread_checker_.CalledOnValidThread());
- for (auto it = callbacks_.begin(); it != callbacks_.end(); ++it) {
- if (it->Equals(cb)) {
- callbacks_.erase(it);
- return;
- }
- }
-}
-
-void AVDASurfaceTracker::NotifyDestroyingSurface(int surface_id) {
- DCHECK(thread_checker_.CalledOnValidThread());
- for (const auto& cb : callbacks_)
- cb.Run(surface_id);
-}
-
-AVDASurfaceTracker* AVDASurfaceTracker::GetInstance() {
- return g_lazy_instance.Pointer();
-}
-
-} // namespace media
« no previous file with comments | « media/gpu/avda_surface_tracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698