diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 10:20:33 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 10:20:33 +0000 |
commit | 15e7b6c7f10e09714e47179015acce8ba87164e8 (patch) | |
tree | 5c4951dab6847f5652ad087e0027fbb1df3706ec /remoting/client/plugin/pepper_view.h | |
parent | 6bede3d585e84feb3b21f97d0b09559b40b21af9 (diff) | |
download | chromium_src-15e7b6c7f10e09714e47179015acce8ba87164e8.zip chromium_src-15e7b6c7f10e09714e47179015acce8ba87164e8.tar.gz chromium_src-15e7b6c7f10e09714e47179015acce8ba87164e8.tar.bz2 |
Refactoring of the client-side input pipeline and scaling dimension management.
The main changes are:
* Express key-release, mouse coordinate scaling and clamping as InputStubs.
* KeyEventTracker handles key release.
* MouseInputFilter handles mouse scaling & clamping.
* PepperInputHandler converts Pepper events to InputStub events.
* Replace scaling ratios with host and view dimensions.
This resulted in some related changes
* The DecoderVp8 enforces a <=1:1 output-size before converting the frame.
* The setScaleToFit() API now has no effect.
* ChromotingView has become a pure interface again.
Things this CL is currently missing:
* Unit-tests for the new components.
Future work:
* Move the non-Pepper-specific input pipeline components to ChromotingClient.
* Rework the decode / convert / scale / render pipeline.
BUG=93552
TEST=remoting_unittests, and manual testing.
Review URL: http://codereview.chromium.org/8985007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115511 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/plugin/pepper_view.h')
-rw-r--r-- | remoting/client/plugin/pepper_view.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/remoting/client/plugin/pepper_view.h b/remoting/client/plugin/pepper_view.h index a64ae7f..eab7f59 100644 --- a/remoting/client/plugin/pepper_view.h +++ b/remoting/client/plugin/pepper_view.h @@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// This class is an implementation of the ChromotingView using Pepper devices -// as the backing stores. This class is used only on pepper thread. -// Chromoting objects access this object through PepperViewProxy which -// delegates method calls on the pepper thread. +// This class is an implementation of the ChromotingView for Pepper. It is +// callable only on the Pepper thread. #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ #define REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ @@ -28,8 +26,8 @@ class ClientContext; class PepperView : public ChromotingView, public FrameConsumer { public: - // Constructs a PepperView that draws to the |rendering_device|. The - // |rendering_device| instance must outlive this class. + // Constructs a PepperView for the |instance|. The |instance| and + // |context| must outlive this class. PepperView(ChromotingInstance* instance, ClientContext* context); virtual ~PepperView(); @@ -42,8 +40,6 @@ class PepperView : public ChromotingView, virtual void SetConnectionState( protocol::ConnectionToHost::State state, protocol::ConnectionToHost::Error error) OVERRIDE; - virtual double GetHorizontalScaleRatio() const OVERRIDE; - virtual double GetVerticalScaleRatio() const OVERRIDE; // FrameConsumer implementation. virtual void AllocateFrame(media::VideoFrame::Format format, @@ -55,9 +51,17 @@ class PepperView : public ChromotingView, RectVector* rects, const base::Closure& done) OVERRIDE; - // This is called when the dimension of the plugin element has changed. - // Return true if plugin size has changed, false otherwise. - bool SetPluginSize(const SkISize& plugin_size); + // Sets the display size of this view. Returns true if plugin size has + // changed, false otherwise. + bool SetViewSize(const SkISize& plugin_size); + + // 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_; + } private: void OnPaintDone(base::Time paint_start); @@ -95,7 +99,7 @@ class PepperView : public ChromotingView, bool flush_blocked_; // The size of the plugin element. - SkISize plugin_size_; + SkISize view_size_; // The size of the host screen. SkISize host_size_; |