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

Side by Side Diff: content/renderer/media/video_frame_compositor.h

Issue 214823005: Remove requirement of compositing a video frame for dropped frame count. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/media/video_frame_compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_RENDERER_MEDIA_VIDEO_FRAME_COMPOSITOR_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_FRAME_COMPOSITOR_H_
6 #define CONTENT_RENDERER_MEDIA_VIDEO_FRAME_COMPOSITOR_H_ 6 #define CONTENT_RENDERER_MEDIA_VIDEO_FRAME_COMPOSITOR_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, 45 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
46 const base::Callback<void(gfx::Size)>& natural_size_changed_cb); 46 const base::Callback<void(gfx::Size)>& natural_size_changed_cb);
47 ~VideoFrameCompositor(); 47 ~VideoFrameCompositor();
48 48
49 cc::VideoFrameProvider* GetVideoFrameProvider(); 49 cc::VideoFrameProvider* GetVideoFrameProvider();
50 50
51 // Updates the current frame and notifies the compositor. 51 // Updates the current frame and notifies the compositor.
52 void UpdateCurrentFrame(const scoped_refptr<media::VideoFrame>& frame); 52 void UpdateCurrentFrame(const scoped_refptr<media::VideoFrame>& frame);
53 53
54 // Retrieves the last frame set via UpdateCurrentFrame() for non-compositing 54 // Retrieves the last frame set via UpdateCurrentFrame() for non-compositing
55 // purposes (e.g., painting to a canvas). Frames retrieved in this manner will 55 // purposes (e.g., painting to a canvas).
56 // not be counted as being composited for frame drop counting.
57 // 56 //
58 // Note that the compositor retrieves frames via the cc::VideoFrameProvider 57 // Note that the compositor retrieves frames via the cc::VideoFrameProvider
59 // interface instead of using this method. 58 // interface instead of using this method.
60 scoped_refptr<media::VideoFrame> GetCurrentFrame(); 59 scoped_refptr<media::VideoFrame> GetCurrentFrame();
61 60
62 // Returns the number of frames dropped before the compositor was notified as 61 // Returns the number of frames dropped before the compositor was notified
63 // well as being able to composite the previous frame. 62 // of a new frame.
64 uint32 GetFramesDroppedBeforeComposite(); 63 uint32 GetFramesDroppedBeforeCompositorWasNotified();
65 64
66 void SetFramesDroppedBeforeCompositeForTesting(uint32 dropped_frames); 65 void SetFramesDroppedBeforeCompositorWasNotifiedForTesting(
66 uint32 dropped_frames);
67 67
68 private: 68 private:
69 class Internal; 69 class Internal;
70 Internal* internal_; 70 Internal* internal_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(VideoFrameCompositor); 72 DISALLOW_COPY_AND_ASSIGN(VideoFrameCompositor);
73 }; 73 };
74 74
75 } // namespace content 75 } // namespace content
76 76
77 #endif // CONTENT_RENDERER_MEDIA_VIDEO_FRAME_COMPOSITOR_H_ 77 #endif // CONTENT_RENDERER_MEDIA_VIDEO_FRAME_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/video_frame_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698