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

Unified Diff: remoting/client/frame_consumer.h

Issue 9331003: Improving the decoder pipeline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
Index: remoting/client/frame_consumer.h
diff --git a/remoting/client/frame_consumer.h b/remoting/client/frame_consumer.h
index de56d816925bb8aa1522e0b8e5bb0e35bef39e46..1cd52168cef5a8668c0fb545395d7d207d7920d1 100644
--- a/remoting/client/frame_consumer.h
+++ b/remoting/client/frame_consumer.h
@@ -5,7 +5,15 @@
#ifndef REMOTING_CLIENT_FRAME_CONSUMER_H_
#define REMOTING_CLIENT_FRAME_CONSUMER_H_
-#include "remoting/base/decoder.h" // For UpdatedRects
+#include "base/callback_forward.h"
+#include "base/memory/scoped_ptr.h"
+#include "third_party/skia/include/core/SkRect.h"
+#include "third_party/skia/include/core/SkRegion.h"
+#include "third_party/skia/include/core/SkSize.h"
+
+namespace pp {
+class ImageData;
+} // namespace pp
namespace remoting {
@@ -14,40 +22,19 @@ class FrameConsumer {
FrameConsumer() {}
virtual ~FrameConsumer() {}
- // Request a frame be allocated from the FrameConsumer.
- //
- // If a frame cannot be allocated to fit the format, and |size|
- // requirements, |frame_out| will be set to NULL.
- //
- // An allocated frame will have at least the |size| requested, but
- // may be bigger. Query the retrun frame for the actual frame size,
- // stride, etc.
- //
- // The AllocateFrame call is asynchronous. From invocation, until when the
- // |done| callback is invoked, |frame_out| should be considered to be locked
- // by the FrameConsumer, must remain a valid pointer, and should not be
- // examined or modified. After |done| is called, the |frame_out| will
- // contain a result of the allocation. If a frame could not be allocated,
- // |frame_out| will be NULL.
- //
- // All frames retrieved via the AllocateFrame call must be released by a
- // corresponding call ReleaseFrame(scoped_refptr<VideoFrame>* frame_out.
- virtual void AllocateFrame(media::VideoFrame::Format format,
- const SkISize& size,
- scoped_refptr<media::VideoFrame>* frame_out,
- const base::Closure& done) = 0;
-
- virtual void ReleaseFrame(media::VideoFrame* frame) = 0;
-
- // OnPartialFrameOutput() is called every time at least one rectangle of
- // output is produced. The |frame| is guaranteed to have valid data for all
- // of |region|.
- //
- // Both |frame| and |region| are guaranteed to be valid until the |done|
- // callback is invoked.
- virtual void OnPartialFrameOutput(media::VideoFrame* frame,
- SkRegion* region,
- const base::Closure& done) = 0;
+ // OnFrameReady() is called every time at least one rectangle of
+ // output is produced. The routine captures the view parameters and
+ // the backing store where the updated pixels should be written to.
Wez 2012/02/07 01:56:31 Not sure what it means for it to "capture" them?
Wez 2012/02/07 01:56:31 It looks like OnFrameReady() is used to indicate t
alexeypa (please no reviews) 2012/02/15 23:06:22 This interface was completely changed. So this com
+ virtual void OnFrameReady(const SkISize& screen_size,
+ SkISize* view_size_out,
+ SkIRect* clip_area_out,
+ scoped_ptr<pp::ImageData>* backing_store_out,
Wez 2012/02/07 01:56:31 Rather than having out-parameters, define a frame-
+ const base::Closure& done) = 0;
+
+ // OnPaintDone is called when painting has been done and the backing
+ // store should be flushed to the screen.
+ virtual void OnPaintDone(scoped_ptr<pp::ImageData> backing_store,
+ scoped_ptr<SkRegion> updated_region) = 0;
Wez 2012/02/07 01:56:31 No completion indicator? How do we rate-limit to
private:
DISALLOW_COPY_AND_ASSIGN(FrameConsumer);

Powered by Google App Engine
This is Rietveld 408576698