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

Unified Diff: media/gpu/avda_surface_tracker.h

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_codec_allocator_unittest.cc ('k') | media/gpu/avda_surface_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/avda_surface_tracker.h
diff --git a/media/gpu/avda_surface_tracker.h b/media/gpu/avda_surface_tracker.h
deleted file mode 100644
index 0f35ff6663cd5dff4627ac3265a21311ced8eabc..0000000000000000000000000000000000000000
--- a/media/gpu/avda_surface_tracker.h
+++ /dev/null
@@ -1,52 +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.
-
-#ifndef MEDIA_GPU_AVDA_SURFACE_TRACKER_H_
-#define MEDIA_GPU_AVDA_SURFACE_TRACKER_H_
-
-#include <vector>
-
-#include "base/callback.h"
-#include "base/threading/thread_checker.h"
-#include "media/gpu/media_gpu_export.h"
-
-namespace media {
-
-using OnDestroyingSurfaceCallback = base::Callback<void(int)>;
-
-// AVDASurfaceTracker provides AndroidVideoDecodeAccelerators a way to register
-// callbacks that will be called when surfaces are destroyed. This is important
-// because Android SurfaceView Surfaces can be destroyed by the framework at any
-// time and we must stop rendering to them before returning from
-// onSurfaceDestroyed().
-// This is not thread safe. All access should be on the gpu main thread.
-// Callbacks will be run on the same thread.
-class MEDIA_GPU_EXPORT AVDASurfaceTracker {
- public:
- AVDASurfaceTracker();
- ~AVDASurfaceTracker();
-
- static AVDASurfaceTracker* GetInstance();
-
- void RegisterOnDestroyingSurfaceCallback(
- const OnDestroyingSurfaceCallback& cb);
-
- // Unregister a callback that was previously registered.
- void UnregisterOnDestroyingSurfaceCallback(
- const OnDestroyingSurfaceCallback& cb);
-
- // Called in response to a message from the Browser indicating that the given
- // surface is in the process of being destroyed.
- void NotifyDestroyingSurface(int surface_id);
-
- private:
- std::vector<OnDestroyingSurfaceCallback> callbacks_;
- base::ThreadChecker thread_checker_;
-
- DISALLOW_COPY_AND_ASSIGN(AVDASurfaceTracker);
-};
-
-} // namespace media
-
-#endif // MEDIA_GPU_AVDA_SURFACE_TRACKER_H_
« no previous file with comments | « media/gpu/avda_codec_allocator_unittest.cc ('k') | media/gpu/avda_surface_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698