// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef REMOTING_CLIENT_DUAL_BUFFER_FRAME_CONSUMER_H_ #define REMOTING_CLIENT_DUAL_BUFFER_FRAME_CONSUMER_H_ #include "base/functional/callback.h" #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" #include "base/task/single_thread_task_runner.h" #include "base/threading/thread_checker.h" #include "remoting/protocol/frame_consumer.h" #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" #include "third_party/webrtc/modules/desktop_capture/shared_desktop_frame.h" namespace remoting { // This class continuously uses two BasicDesktopFrame as buffer for decoding // updated regions until the resolution is changed. // This class should be used and destroyed on the same thread. If |task_runner| // is null |callback| will be run directly upon the stack of DrawFrame, // otherwise a task will be posted to feed the callback on the thread of // |task_runner|. // Only areas bound by updated_region() on the buffer are considered valid to // |callback|. Please use RequestFullDesktopFrame() if you want to get a full // desktop frame. class DualBufferFrameConsumer : public protocol::FrameConsumer { … }; } // namespace remoting #endif // REMOTING_CLIENT_DUAL_BUFFER_FRAME_CONSUMER_H_