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

Unified Diff: remoting/client/x11_view.h

Issue 3305001: Move decoder into separate thread, clean up API layering, and redo update protocl (Closed)
Patch Set: Fix compile error. Created 10 years, 2 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/x11_client.cc ('k') | remoting/client/x11_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/x11_view.h
diff --git a/remoting/client/x11_view.h b/remoting/client/x11_view.h
index 3ae7f2a8d0f6b08f1b2fe8135fe3ea3f38375e8b..5da6220c6f57d16d7670ca381144f8f2cbf32cf5 100644
--- a/remoting/client/x11_view.h
+++ b/remoting/client/x11_view.h
@@ -5,9 +5,11 @@
#ifndef REMOTING_CLIENT_X11_VIEW_H_
#define REMOTING_CLIENT_X11_VIEW_H_
-#include "base/basictypes.h"
#include "base/scoped_ptr.h"
+#include "base/task.h"
#include "media/base/video_frame.h"
+#include "remoting/base/decoder.h" // For UpdatedRects
+#include "remoting/client/frame_consumer.h"
#include "remoting/client/chromoting_view.h"
typedef unsigned long XID;
@@ -16,7 +18,7 @@ typedef struct _XDisplay Display;
namespace remoting {
// A ChromotingView implemented using X11 and XRender.
-class X11View : public ChromotingView {
+class X11View : public ChromotingView, public FrameConsumer {
public:
X11View();
virtual ~X11View();
@@ -28,17 +30,25 @@ class X11View : public ChromotingView {
virtual void SetSolidFill(uint32 color);
virtual void UnsetSolidFill();
virtual void SetViewport(int x, int y, int width, int height);
- virtual void SetHostScreenSize(int width, int height);
- virtual void HandleBeginUpdateStream(ChromotingHostMessage* msg);
- virtual void HandleUpdateStreamPacket(ChromotingHostMessage* msg);
- virtual void HandleEndUpdateStream(ChromotingHostMessage* msg);
+
+ // FrameConsumer implementation.
+ virtual void AllocateFrame(media::VideoFrame::Format format,
+ size_t width,
+ size_t height,
+ base::TimeDelta timestamp,
+ base::TimeDelta duration,
+ scoped_refptr<media::VideoFrame>* frame_out,
+ Task* done);
+ virtual void ReleaseFrame(media::VideoFrame* frame);
+ virtual void OnPartialFrameOutput(media::VideoFrame* frame,
+ UpdatedRects* rects,
+ Task* done);
Display* display() { return display_; }
private:
void InitPaintTarget();
- void OnPartialDecodeDone();
- void OnDecodeDone();
+ void PaintRect(media::VideoFrame* frame, const gfx::Rect& clip);
Display* display_;
XID window_;
« no previous file with comments | « remoting/client/x11_client.cc ('k') | remoting/client/x11_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698