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

Unified Diff: remoting/client/plugin/pepper_view.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/plugin/pepper_view.h
diff --git a/remoting/client/plugin/pepper_view.h b/remoting/client/plugin/pepper_view.h
index 426ced09f7b4581eee1828cf2366c26d0a7f67de..a7e6631762230f9735fe3257adcf8de9dd7dc62c 100644
--- a/remoting/client/plugin/pepper_view.h
+++ b/remoting/client/plugin/pepper_view.h
@@ -12,7 +12,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "media/base/video_frame.h"
#include "ppapi/cpp/graphics_2d.h"
#include "ppapi/cpp/point.h"
#include "remoting/client/chromoting_view.h"
@@ -42,41 +41,31 @@ class PepperView : public ChromotingView,
protocol::ConnectionToHost::Error error) OVERRIDE;
// FrameConsumer implementation.
- virtual void AllocateFrame(media::VideoFrame::Format format,
- const SkISize& size,
- scoped_refptr<media::VideoFrame>* frame_out,
- const base::Closure& done) OVERRIDE;
- virtual void ReleaseFrame(media::VideoFrame* frame) OVERRIDE;
- virtual void OnPartialFrameOutput(media::VideoFrame* frame,
- SkRegion* region,
- const base::Closure& done) OVERRIDE;
-
- // Sets the display size of this view. Returns true if plugin size has
- // changed, false otherwise.
- bool SetViewSize(const SkISize& plugin_size);
+ virtual void OnFrameReady(const SkISize& screen_size,
+ SkISize* view_size_out,
+ SkIRect* clip_area_out,
+ scoped_ptr<pp::ImageData>* backing_store_out,
+ const base::Closure& done) OVERRIDE;
+ virtual void OnPaintDone(scoped_ptr<pp::ImageData> backing_store,
+ scoped_ptr<SkRegion> updated_region) OVERRIDE;
+
+ // Sets the display size and clipping area of this view. Returns true
+ // if plugin size or clipping area has changed, false otherwise.
+ bool SetView(const SkISize& view_size, const SkIRect& clip_area);
// Return the client view and original host dimensions.
const SkISize& get_view_size() const {
return view_size_;
}
- const SkISize& get_host_size() const {
- return host_size_;
+ const SkISize& get_screen_size() const {
+ return screen_size_;
}
private:
- void OnPaintDone(base::Time paint_start);
+ void OnFlushDone(base::Time paint_start);
// Set the dimension of the entire host screen.
- void SetHostSize(const SkISize& host_size);
-
- void PaintFrame(media::VideoFrame* frame, const SkRegion& region);
-
- // Render the rectangle of |frame| to the backing store.
- // Returns true if this rectangle is not clipped.
- bool PaintRect(media::VideoFrame* frame, const SkIRect& rect);
-
- // Blanks out a rectangle in an image.
- void BlankRect(pp::ImageData& image_data, const pp::Rect& rect);
+ void SetScreenSize(const SkISize& screen_size);
// Perform a flush on the graphics context.
void FlushGraphics(base::Time paint_start);
@@ -98,11 +87,17 @@ class PepperView : public ChromotingView,
// true if the last flush returns a PP_ERROR_INPROGRESS error.
bool flush_blocked_;
+ // True is view dimensions or clipping area has been changed.
+ bool view_changed_;
+
// The size of the plugin element.
SkISize view_size_;
+ // The current clip area rectangle.
+ SkIRect clip_area_;
+
// The size of the host screen.
- SkISize host_size_;
+ SkISize screen_size_;
bool is_static_fill_;
uint32 static_fill_color_;

Powered by Google App Engine
This is Rietveld 408576698