| Index: remoting/client/plugin/pepper_view.h
|
| diff --git a/remoting/client/plugin/pepper_view.h b/remoting/client/plugin/pepper_view.h
|
| index 949703acdb3f26dddaac5e24b7a485e83401bc2d..3b8ef2c091296da6ae4a20f50cc4a34ace82625f 100644
|
| --- a/remoting/client/plugin/pepper_view.h
|
| +++ b/remoting/client/plugin/pepper_view.h
|
| @@ -12,6 +12,7 @@
|
|
|
| #include "base/memory/weak_ptr.h"
|
| #include "ppapi/cpp/graphics_2d.h"
|
| +#include "ppapi/cpp/view.h"
|
| #include "ppapi/cpp/point.h"
|
| #include "remoting/client/chromoting_view.h"
|
| #include "remoting/client/frame_consumer.h"
|
| @@ -50,10 +51,10 @@ class PepperView : public ChromotingView,
|
| virtual void ReturnBuffer(pp::ImageData* buffer) OVERRIDE;
|
| virtual void SetSourceSize(const SkISize& source_size) OVERRIDE;
|
|
|
| - // Sets the display size and clipping area of this view.
|
| - void SetView(const SkISize& view_size, const SkIRect& clip_area);
|
| + // Updates the PepperView's size, clipping area and scale factor.
|
| + void SetView(const pp::View& view);
|
|
|
| - // Return the client view and original host dimensions.
|
| + // Return the dimensions of the view and source in device pixels.
|
| const SkISize& get_view_size() const {
|
| return view_size_;
|
| }
|
| @@ -61,6 +62,12 @@ class PepperView : public ChromotingView,
|
| return source_size_;
|
| }
|
|
|
| + // Return the dimensions of the view in Density Independent Pixels (DIPs).
|
| + // On high-DPI devices this will be smaller than the size in device pixels.
|
| + const SkISize& get_view_size_dips() const {
|
| + return view_size_dips_;
|
| + }
|
| +
|
| private:
|
| // This routine allocates an image buffer.
|
| pp::ImageData* AllocateBuffer();
|
| @@ -97,19 +104,22 @@ class PepperView : public ChromotingView,
|
| // List of allocated image buffers.
|
| std::list<pp::ImageData*> buffers_;
|
|
|
| + // Queued buffer to paint, with clip area and dirty region in device pixels.
|
| pp::ImageData* merge_buffer_;
|
| SkIRect merge_clip_area_;
|
| SkRegion merge_region_;
|
|
|
| - // The size of the plugin element.
|
| + // View size, clip area and host dimensions, in device pixels.
|
| SkISize view_size_;
|
| -
|
| - // The current clip area rectangle.
|
| SkIRect clip_area_;
|
| -
|
| - // The size of the host screen.
|
| SkISize source_size_;
|
|
|
| + // View size in Density-Independent pixels.
|
| + SkISize view_size_dips_;
|
| +
|
| + // DIP-to-device pixel scale factor.
|
| + float view_scale_;
|
| +
|
| // True if there is already a Flush() pending on the Graphics2D context.
|
| bool flush_pending_;
|
|
|
|
|