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

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: Integer ScaleRect 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
« no previous file with comments | « remoting/client/chromoting_view.h ('k') | remoting/client/frame_consumer_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/frame_consumer.h
diff --git a/remoting/client/frame_consumer.h b/remoting/client/frame_consumer.h
index de56d816925bb8aa1522e0b8e5bb0e35bef39e46..ce852b4fe599b1cf5a8f342067423d69d71a1a78 100644
--- a/remoting/client/frame_consumer.h
+++ b/remoting/client/frame_consumer.h
@@ -5,7 +5,13 @@
#ifndef REMOTING_CLIENT_FRAME_CONSUMER_H_
#define REMOTING_CLIENT_FRAME_CONSUMER_H_
-#include "remoting/base/decoder.h" // For UpdatedRects
+#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 +20,26 @@ 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|.
+ // Accepts a buffer to be painted to the screen. The buffer's dimensions and
+ // relative position within the frame are specified by |clip_area|. Only
+ // pixels falling within |region| and the current clipping area are painted.
+ // The function assumes that the passed buffer was scaled to fit a window
+ // having |view_size| dimensions.
//
- // 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;
+ // N.B. Both |clip_area| and |region| are in output coordinates relative to
+ // the frame.
+ virtual void ApplyBuffer(const SkISize& view_size,
+ const SkIRect& clip_area,
+ pp::ImageData* buffer,
+ const SkRegion& region) = 0;
+
+ // Accepts a buffer that couldn't be used for drawing for any reason (shutdown
+ // is in progress, the view area has changed, etc.). The accepted buffer can
+ // be freed or reused for another drawing operation.
+ virtual void ReturnBuffer(pp::ImageData* buffer) = 0;
+
+ // Set the dimension of the entire host screen.
+ virtual void SetSourceSize(const SkISize& source_size) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(FrameConsumer);
« no previous file with comments | « remoting/client/chromoting_view.h ('k') | remoting/client/frame_consumer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698