| Index: webrtc/modules/desktop_capture/screen_capture_frame_queue.cc
|
| diff --git a/webrtc/modules/desktop_capture/screen_capture_frame_queue.cc b/webrtc/modules/desktop_capture/screen_capture_frame_queue.cc
|
| index 94d8a27b137600db17dda571b3f5366ec5d637c4..b8bc1c609d60061d0cbd6bedae49cba26b92b12f 100644
|
| --- a/webrtc/modules/desktop_capture/screen_capture_frame_queue.cc
|
| +++ b/webrtc/modules/desktop_capture/screen_capture_frame_queue.cc
|
| @@ -10,35 +10,23 @@
|
|
|
| #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
|
|
|
| -#include <assert.h>
|
| #include <algorithm>
|
|
|
| -#include "webrtc/modules/desktop_capture/desktop_frame.h"
|
| +#include "webrtc/base/checks.h"
|
| #include "webrtc/modules/desktop_capture/shared_desktop_frame.h"
|
| -#include "webrtc/system_wrappers/include/logging.h"
|
| -#include "webrtc/typedefs.h"
|
|
|
| namespace webrtc {
|
|
|
| -ScreenCaptureFrameQueue::ScreenCaptureFrameQueue() : current_(0) {}
|
| -
|
| -ScreenCaptureFrameQueue::~ScreenCaptureFrameQueue() {}
|
| -
|
| void ScreenCaptureFrameQueue::MoveToNextFrame() {
|
| - current_ = (current_ + 1) % kQueueLength;
|
| + MoveToNext();
|
|
|
| // Verify that the frame is not shared, i.e. that consumer has released it
|
| // before attempting to capture again.
|
| - assert(!frames_[current_].get() || !frames_[current_]->IsShared());
|
| + RTC_DCHECK(!current() || !current()->IsShared());
|
| }
|
|
|
| void ScreenCaptureFrameQueue::ReplaceCurrentFrame(DesktopFrame* frame) {
|
| - frames_[current_].reset(SharedDesktopFrame::Wrap(frame));
|
| -}
|
| -
|
| -void ScreenCaptureFrameQueue::Reset() {
|
| - for (int i = 0; i < kQueueLength; ++i)
|
| - frames_[i].reset();
|
| + ReplaceCurrent(SharedDesktopFrame::Wrap(frame));
|
| }
|
|
|
| } // namespace webrtc
|
|
|