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

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

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, 9 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/events/devices/device_data_manager.h ('k') | ui/events/devices/x11/device_data_manager_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/devices/device_data_manager.cc
diff --git a/ui/events/devices/device_data_manager.cc b/ui/events/devices/device_data_manager.cc
index fdf99563f55db76ad6dab6cace32a3058c4f5d6d..2bdbac9847424c6533133f812afa04285b5a7ac3 100644
--- a/ui/events/devices/device_data_manager.cc
+++ b/ui/events/devices/device_data_manager.cc
@@ -31,10 +31,7 @@ DeviceDataManager::DeviceDataManager() {
base::AtExitManager::RegisterTask(
base::Bind(&base::DeletePointer<DeviceDataManager>, this));
- for (int i = 0; i < kMaxDeviceNum; ++i) {
- touch_device_to_display_map_[i] = gfx::Display::kInvalidDisplayID;
- touch_radius_scale_map_[i] = 1.0;
- }
+ ClearTouchDeviceAssociations();
}
DeviceDataManager::~DeviceDataManager() {
@@ -64,10 +61,10 @@ bool DeviceDataManager::HasInstance() {
return instance_ != NULL;
}
-void DeviceDataManager::ClearTouchTransformerRecord() {
+void DeviceDataManager::ClearTouchDeviceAssociations() {
for (int i = 0; i < kMaxDeviceNum; i++) {
touch_device_transformer_map_[i] = gfx::Transform();
- touch_device_to_display_map_[i] = gfx::Display::kInvalidDisplayID;
+ touch_device_to_target_display_map_[i] = gfx::Display::kInvalidDisplayID;
touch_radius_scale_map_[i] = 1.0;
}
}
@@ -78,11 +75,11 @@ bool DeviceDataManager::IsTouchDeviceIdValid(
}
void DeviceDataManager::UpdateTouchInfoForDisplay(
- int64_t display_id,
+ int64_t target_display_id,
unsigned int touch_device_id,
const gfx::Transform& touch_transformer) {
if (IsTouchDeviceIdValid(touch_device_id)) {
- touch_device_to_display_map_[touch_device_id] = display_id;
+ touch_device_to_target_display_map_[touch_device_id] = target_display_id;
touch_device_transformer_map_[touch_device_id] = touch_transformer;
}
}
@@ -112,10 +109,10 @@ void DeviceDataManager::ApplyTouchTransformer(unsigned int touch_device_id,
}
}
-int64_t DeviceDataManager::GetDisplayForTouchDevice(
+int64_t DeviceDataManager::GetTargetDisplayForTouchDevice(
unsigned int touch_device_id) const {
if (IsTouchDeviceIdValid(touch_device_id))
- return touch_device_to_display_map_[touch_device_id];
+ return touch_device_to_target_display_map_[touch_device_id];
return gfx::Display::kInvalidDisplayID;
}
« no previous file with comments | « ui/events/devices/device_data_manager.h ('k') | ui/events/devices/x11/device_data_manager_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698