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

Unified Diff: ui/display/chromeos/x11/touchscreen_delegate_x11.cc

Issue 280833002: Re-land "Issue 191223007: Move touch CTM from X into Chrome" (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: adding missing file again 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/display/chromeos/x11/touchscreen_delegate_x11.h ('k') | ui/events/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/chromeos/x11/touchscreen_delegate_x11.cc
diff --git a/ui/display/chromeos/x11/touchscreen_delegate_x11.cc b/ui/display/chromeos/x11/touchscreen_delegate_x11.cc
index 3b69d3aa3a0ce7a54c35e1b2b279c0e7ce952f44..b76d62e90448a9febcbabc74f890ac4a3237ad61 100644
--- a/ui/display/chromeos/x11/touchscreen_delegate_x11.cc
+++ b/ui/display/chromeos/x11/touchscreen_delegate_x11.cc
@@ -129,54 +129,4 @@ void TouchscreenDelegateX11::AssociateTouchscreens(
XIFreeDeviceInfo(info);
}
-void TouchscreenDelegateX11::ConfigureCTM(
- int touch_device_id,
- const DisplayConfigurator::CoordinateTransformation& ctm) {
- VLOG(1) << "ConfigureCTM: id=" << touch_device_id << " scale=" << ctm.x_scale
- << "x" << ctm.y_scale << " offset=(" << ctm.x_offset << ", "
- << ctm.y_offset << ")";
- int ndevices = 0;
- XIDeviceInfo* info = XIQueryDevice(display_, touch_device_id, &ndevices);
- Atom prop = XInternAtom(display_, "Coordinate Transformation Matrix", False);
- Atom float_atom = XInternAtom(display_, "FLOAT", False);
- if (ndevices == 1 && prop != None && float_atom != None) {
- Atom type;
- int format;
- unsigned long num_items;
- unsigned long bytes_after;
- unsigned char* data = NULL;
- // Verify that the property exists with correct format, type, etc.
- int status = XIGetProperty(display_,
- info->deviceid,
- prop,
- 0,
- 0,
- False,
- AnyPropertyType,
- &type,
- &format,
- &num_items,
- &bytes_after,
- &data);
- if (data)
- XFree(data);
- if (status == Success && type == float_atom && format == 32) {
- float value[3][3] = {
- { ctm.x_scale, 0.0, ctm.x_offset },
- { 0.0, ctm.y_scale, ctm.y_offset },
- { 0.0, 0.0, 1.0 }
- };
- XIChangeProperty(display_,
- info->deviceid,
- prop,
- type,
- format,
- PropModeReplace,
- reinterpret_cast<unsigned char*>(value),
- 9);
- }
- }
- XIFreeDeviceInfo(info);
-}
-
} // namespace ui
« no previous file with comments | « ui/display/chromeos/x11/touchscreen_delegate_x11.h ('k') | ui/events/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698