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

Side by Side Diff: cc/layers/video_frame_provider.h

Issue 1134663005: cc: Video layers without a frame should not occlude (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add HasCurrentFrame Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ 5 #ifndef CC_LAYERS_VIDEO_FRAME_PROVIDER_H_
6 #define CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ 6 #define CC_LAYERS_VIDEO_FRAME_PROVIDER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // Called by the client on a regular interval. Returns true if a new frame 61 // Called by the client on a regular interval. Returns true if a new frame
62 // will be available via GetCurrentFrame() which should be displayed within 62 // will be available via GetCurrentFrame() which should be displayed within
63 // the presentation interval [|deadline_min|, |deadline_max|]. 63 // the presentation interval [|deadline_min|, |deadline_max|].
64 // 64 //
65 // Implementations may use this to drive frame acquisition from underlying 65 // Implementations may use this to drive frame acquisition from underlying
66 // sources, so it must be called by clients before calling GetCurrentFrame(). 66 // sources, so it must be called by clients before calling GetCurrentFrame().
67 virtual bool UpdateCurrentFrame(base::TimeTicks deadline_min, 67 virtual bool UpdateCurrentFrame(base::TimeTicks deadline_min,
68 base::TimeTicks deadline_max) = 0; 68 base::TimeTicks deadline_max) = 0;
69 69
70 virtual bool HasCurrentFrame() const = 0;
danakj 2015/05/18 18:15:45 can you comment what this is?
hendrikw 2015/05/18 18:33:59 Done.
71
70 // Returns the current frame, which may have been updated by a recent call to 72 // Returns the current frame, which may have been updated by a recent call to
71 // UpdateCurrentFrame(). A call to this method does not ensure that the frame 73 // UpdateCurrentFrame(). A call to this method does not ensure that the frame
72 // will be rendered. A subsequent call to PutCurrentFrame() must be made if 74 // will be rendered. A subsequent call to PutCurrentFrame() must be made if
73 // the frame is expected to be rendered. 75 // the frame is expected to be rendered.
74 // 76 //
75 // Clients should call this in response to UpdateCurrentFrame() returning true 77 // Clients should call this in response to UpdateCurrentFrame() returning true
76 // or in response to a DidReceiveFrame() call. 78 // or in response to a DidReceiveFrame() call.
77 // 79 //
78 // TODO(dalecurtis): Remove text about DidReceiveFrame() once the old path 80 // TODO(dalecurtis): Remove text about DidReceiveFrame() once the old path
79 // has been removed. http://crbug.com/439548 81 // has been removed. http://crbug.com/439548
80 virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() = 0; 82 virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() = 0;
81 83
82 // Indicates that the last frame returned via GetCurrentFrame() is expected to 84 // Indicates that the last frame returned via GetCurrentFrame() is expected to
83 // be rendered. Must only occur after a previous call to GetCurrentFrame(). 85 // be rendered. Must only occur after a previous call to GetCurrentFrame().
84 virtual void PutCurrentFrame() = 0; 86 virtual void PutCurrentFrame() = 0;
85 87
86 protected: 88 protected:
87 virtual ~VideoFrameProvider() {} 89 virtual ~VideoFrameProvider() {}
88 }; 90 };
89 91
90 } // namespace cc 92 } // namespace cc
91 93
92 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ 94 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/video_frame_provider_client_impl.h » ('j') | content/renderer/media/android/webmediaplayer_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698