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

Unified Diff: cc/video_frame_provider.h

Issue 12603013: Part 10 of cc/ directory shuffles: layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « cc/trees/tree_synchronizer_unittest.cc ('k') | cc/video_frame_provider_client_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/video_frame_provider.h
diff --git a/cc/video_frame_provider.h b/cc/video_frame_provider.h
deleted file mode 100644
index dadcc145c163596599a0c35cb836f46f4b238d99..0000000000000000000000000000000000000000
--- a/cc/video_frame_provider.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2012 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 CC_VIDEO_FRAME_PROVIDER_H_
-#define CC_VIDEO_FRAME_PROVIDER_H_
-
-#include "base/memory/ref_counted.h"
-
-namespace media {
-class VideoFrame;
-}
-
-namespace cc {
-
-// Threading notes: This class may be used in a multi threaded manner.
-// Specifically, the implementation may call getCurrentFrame() or
-// putCurrentFrame() from the compositor thread. If so, the caller is
-// responsible for making sure Client::didReceiveFrame and
-// Client::didUpdateMatrix are only called from this same thread.
-class VideoFrameProvider {
- public:
- virtual ~VideoFrameProvider() {}
-
- class Client {
- public:
- // Provider will call this method to tell the client to stop using it.
- // StopUsingProvider() may be called from any thread. The client should
- // block until it has PutCurrentFrame() any outstanding frames.
- virtual void StopUsingProvider() = 0;
-
- // Notifies the provider's client that a call to GetCurrentFrame() will
- // return new data.
- virtual void DidReceiveFrame() = 0;
-
- // Notifies the provider's client of a new UV transform matrix to be used.
- virtual void DidUpdateMatrix(const float* matrix) = 0;
- };
-
- // May be called from any thread, but there must be some external guarantee
- // that the provider is not destroyed before this call returns.
- virtual void SetVideoFrameProviderClient(Client* client) = 0;
-
- // This function places a lock on the current frame and returns a pointer to
- // it. Calls to this method should always be followed with a call to
- // PutCurrentFrame().
- // Only the current provider client should call this function.
- virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() = 0;
-
- // This function releases the lock on the video frame. It should always be
- // called after GetCurrentFrame(). Frames passed into this method
- // should no longer be referenced after the call is made. Only the current
- // provider client should call this function.
- virtual void PutCurrentFrame(
- const scoped_refptr<media::VideoFrame>& frame) = 0;
-};
-
-} // namespace cc
-
-#endif // CC_VIDEO_FRAME_PROVIDER_H_
« no previous file with comments | « cc/trees/tree_synchronizer_unittest.cc ('k') | cc/video_frame_provider_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698