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

Unified Diff: ui/display/chromeos/display_configurator.h

Issue 294943007: Merge 270252 "Re-land "Move touch CTM from X into Chrome"" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1985/src/
Patch Set: Created 6 years, 7 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 | « ui/aura/window_tree_host_x11.cc ('k') | ui/display/chromeos/display_configurator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/chromeos/display_configurator.h
===================================================================
--- ui/display/chromeos/display_configurator.h (revision 271938)
+++ ui/display/chromeos/display_configurator.h (working copy)
@@ -19,6 +19,7 @@
#include "ui/display/display_export.h"
#include "ui/display/types/chromeos/native_display_observer.h"
#include "ui/display/types/display_constants.h"
+#include "ui/gfx/geometry/size.h"
namespace gfx {
class Point;
@@ -36,16 +37,6 @@
typedef uint64_t ContentProtectionClientId;
static const ContentProtectionClientId kInvalidClientId = 0;
- struct CoordinateTransformation {
- // Initialized to the identity transformation.
- CoordinateTransformation();
-
- float x_scale;
- float x_offset;
- float y_scale;
- float y_offset;
- };
-
struct DisplayState {
DisplayState();
@@ -54,8 +45,6 @@
// XInput device ID or 0 if this display isn't a touchscreen.
int touch_device_id;
- CoordinateTransformation transform;
-
// User-selected mode for the display.
const DisplayMode* selected_mode;
@@ -117,14 +106,6 @@
// If a touchscreen with same resolution as a display's native mode
// is detected, its id will be stored in this display.
virtual void AssociateTouchscreens(std::vector<DisplayState>* displays) = 0;
-
- // Configures XInput's Coordinate Transformation Matrix property.
- // |touch_device_id| the ID of the touchscreen device to configure.
- // |ctm| contains the desired transformation parameters. The offsets
- // in it should be normalized so that 1 corresponds to the X or Y axis
- // size for the corresponding offset.
- virtual void ConfigureCTM(int touch_device_id,
- const CoordinateTransformation& ctm) = 0;
};
// Helper class used by tests.
@@ -171,6 +152,7 @@
MultipleDisplayState display_state() const { return display_state_; }
chromeos::DisplayPowerState power_state() const { return power_state_; }
+ const gfx::Size framebuffer_size() const { return framebuffer_size_; }
const std::vector<DisplayState>& cached_displays() const {
return cached_displays_;
}
@@ -335,21 +317,6 @@
MultipleDisplayState ChooseDisplayState(
chromeos::DisplayPowerState power_state) const;
- // Computes the relevant transformation for mirror mode.
- // |display| is the display on which mirror mode is being applied.
- // Returns the transformation or identity if computations fail.
- CoordinateTransformation GetMirrorModeCTM(const DisplayState& display);
-
- // Computes the relevant transformation for extended mode. |display| is the
- // display on which extended mode is being applied. |new_origin| is the
- // position of the display on the framebuffer. |framebuffer_size| is the
- // size of the combined framebuffer.
- // Returns the transformation or identity if computations fail.
- CoordinateTransformation GetExtendedModeCTM(
- const DisplayState& display,
- const gfx::Point& new_origin,
- const gfx::Size& framebuffer_size);
-
// Returns the ratio between mirrored mode area and native mode area:
// (mirror_mode_width * mirrow_mode_height) / (native_width * native_height)
float GetMirroredDisplayAreaRatio(const DisplayState& display);
@@ -383,6 +350,8 @@
// The current display state.
MultipleDisplayState display_state_;
+ gfx::Size framebuffer_size_;
+
// The current power state.
chromeos::DisplayPowerState power_state_;
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/display/chromeos/display_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698