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

Unified Diff: ui/events/devices/device_data_manager.h

Issue 922843002: Fix software mirror mode on Ozone part 2/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: ui/events/devices/device_data_manager.h
diff --git a/ui/events/devices/device_data_manager.h b/ui/events/devices/device_data_manager.h
index 4896ad86fd23a85aaff02d76af937558e7bd324d..66f378b95d2ab868f856dae575239e9c7e516ee2 100644
--- a/ui/events/devices/device_data_manager.h
+++ b/ui/events/devices/device_data_manager.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <map>
#include <vector>
#include "base/macros.h"
@@ -16,6 +17,7 @@
#include "ui/events/devices/events_devices_export.h"
#include "ui/events/devices/keyboard_device.h"
#include "ui/events/devices/touchscreen_device.h"
+#include "ui/gfx/display.h"
#include "ui/gfx/transform.h"
namespace ui {
@@ -33,12 +35,13 @@ class EVENTS_DEVICES_EXPORT DeviceDataManager
static DeviceDataManager* GetInstance();
static bool HasInstance();
- void ClearTouchTransformerRecord();
- void UpdateTouchInfoForDisplay(int64_t display_id,
+ void ClearTouchDeviceAssociations();
+ void UpdateTouchInfoForDisplay(const gfx::Display& display,
unsigned int touch_device_id,
const gfx::Transform& touch_transformer);
void ApplyTouchTransformer(unsigned int touch_device_id, float* x, float* y);
- int64_t GetDisplayForTouchDevice(unsigned int touch_device_id) const;
+ gfx::Display GetDisplayForTouchDevice(
+ unsigned int touch_device_id) const;
void UpdateTouchRadiusScale(unsigned int touch_device_id, double scale);
void ApplyTouchRadiusScale(unsigned int touch_device_id, double* radius);
@@ -77,7 +80,7 @@ class EVENTS_DEVICES_EXPORT DeviceDataManager
double touch_radius_scale_map_[kMaxDeviceNum];
// Table to keep track of which display id is mapped to which touch device.
- int64_t touch_device_to_display_map_[kMaxDeviceNum];
+ std::map<unsigned int, gfx::Display> touch_device_to_display_map_;
// Index table to find the TouchTransformer for a touch device.
gfx::Transform touch_device_transformer_map_[kMaxDeviceNum];

Powered by Google App Engine
This is Rietveld 408576698