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

Unified Diff: remoting/client/rectangle_update_decoder.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/rectangle_update_decoder.h
diff --git a/remoting/client/rectangle_update_decoder.h b/remoting/client/rectangle_update_decoder.h
index e2833c25be0e6d15171ac4a99498ce09679cf9bf..64b00b0c2d5acb451da489c7a9dd510920cefc6d 100644
--- a/remoting/client/rectangle_update_decoder.h
+++ b/remoting/client/rectangle_update_decoder.h
@@ -8,13 +8,16 @@
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "media/base/video_frame.h"
#include "remoting/base/decoder.h"
namespace base {
class MessageLoopProxy;
} // namespace base
+namespace pp {
+class ImageData;
+};
+
namespace remoting {
class FrameConsumer;
@@ -36,55 +39,43 @@ class RectangleUpdateDecoder :
// Initializes decoder with the infromation from the protocol config.
void Initialize(const protocol::SessionConfig& config);
- // Decodes the contents of |packet| calling OnPartialFrameOutput() in the
- // regsitered as data is avaialable. DecodePacket may keep a reference to
+ // Decodes the contents of |packet| calling OnFrameReady() in the
+ // registered as data is avaialable. DecodePacket may keep a reference to
Wez 2012/02/07 01:56:31 This class doesn't have an OnFrameReady, though?
alexeypa (please no reviews) 2012/02/15 23:06:22 Done.
// |packet| so the |packet| must remain alive and valid until |done| is
// executed.
Wez 2012/02/07 01:56:31 nit: If we pass |packet| as a scoped_ptr<> then we
alexeypa (please no reviews) 2012/02/15 23:06:22 I'd postpone this change till later. This change i
void DecodePacket(const VideoPacket* packet, const base::Closure& done);
- // Set the output dimensions to scale video output to.
- void SetOutputSize(const SkISize& size);
-
- // Set a new clipping rectangle for the decoder. Decoder should respect
- // this clipping rectangle and only decode content in this rectangle and
- // report dirty rectangles accordingly to enhance performance.
- void UpdateClipRect(const SkIRect& clip_rect);
-
// Force the decoder to output the last decoded video frame without any
// clipping.
void RefreshFullFrame();
private:
friend class base::RefCountedThreadSafe<RectangleUpdateDecoder>;
- friend class PartialFrameCleanup;
~RectangleUpdateDecoder();
- void AllocateFrame(const VideoPacket* packet, const base::Closure& done);
- void ProcessPacketData(const VideoPacket* packet, const base::Closure& done);
-
// Obtain updated rectangles from decoder and submit it to the consumer.
void SubmitToConsumer();
- // Use |refresh_rects_| to do a refresh to the backing video frame.
- // When done the affected rectangles are submitted to the consumer.
- void DoRefresh();
-
- // Callback for FrameConsumer::OnPartialFrameOutput()
- void OnFrameConsumed(SkRegion* region);
+ // Callback for FrameConsumer::OnFrameReady()
+ void OnPaintFrame();
scoped_refptr<base::MessageLoopProxy> message_loop_;
FrameConsumer* consumer_;
+ scoped_ptr<Decoder> decoder_;
+
+ // Remote screen size in pixels.
SkISize screen_size_;
- SkIRect clip_rect_;
- SkRegion refresh_region_;
- scoped_ptr<Decoder> decoder_;
- bool decoder_needs_reset_;
+ // True while drawing operation is in progress.
+ bool update_pending_;
- // The video frame that the decoder writes to.
- scoped_refptr<media::VideoFrame> frame_;
+ // Frame consumer's data captured for the duration of drawing to
+ // the backing store.
+ SkISize view_size_;
+ SkIRect clip_area_;
+ scoped_ptr<pp::ImageData> backing_store_;
};
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698