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

Side by Side Diff: views/touchui/touch_factory.h

Issue 7312028: Fixing signed/unsigned char bug on ARM for TouchFactory (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef VIEWS_TOUCHUI_TOUCH_FACTORY_H_ 5 #ifndef VIEWS_TOUCHUI_TOUCH_FACTORY_H_
6 #define VIEWS_TOUCHUI_TOUCH_FACTORY_H_ 6 #define VIEWS_TOUCHUI_TOUCH_FACTORY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <bitset> 9 #include <bitset>
10 #include <vector> 10 #include <vector>
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 std::bitset<kMaxDeviceNum> touch_device_lookup_; 167 std::bitset<kMaxDeviceNum> touch_device_lookup_;
168 168
169 // The list of touch devices. 169 // The list of touch devices.
170 std::vector<int> touch_device_list_; 170 std::vector<int> touch_device_list_;
171 171
172 // Index table to find the valuator for the TouchParam on the specific device 172 // Index table to find the valuator for the TouchParam on the specific device
173 // by valuator_lookup_[device_id][touch_params]. Use 2-D array to get fast 173 // by valuator_lookup_[device_id][touch_params]. Use 2-D array to get fast
174 // index at the expense of space. If the kMaxDeviceNum grows larger that the 174 // index at the expense of space. If the kMaxDeviceNum grows larger that the
175 // space waste becomes a concern, the 2D lookup table can be replaced by a 175 // space waste becomes a concern, the 2D lookup table can be replaced by a
176 // hash map. 176 // hash map.
177 char valuator_lookup_[kMaxDeviceNum][TP_LAST_ENTRY]; 177 signed char valuator_lookup_[kMaxDeviceNum][TP_LAST_ENTRY];
178 178
179 // Index table to find the min & max value of the TouchParam on a specific 179 // Index table to find the min & max value of the TouchParam on a specific
180 // device. 180 // device.
181 int touch_param_min_[kMaxDeviceNum][TP_LAST_ENTRY]; 181 int touch_param_min_[kMaxDeviceNum][TP_LAST_ENTRY];
182 int touch_param_max_[kMaxDeviceNum][TP_LAST_ENTRY]; 182 int touch_param_max_[kMaxDeviceNum][TP_LAST_ENTRY];
183 183
184 // Maximum simultaneous touch points. 184 // Maximum simultaneous touch points.
185 static const int kMaxTouchPoints = 32; 185 static const int kMaxTouchPoints = 32;
186 186
187 // A lookup table for slots in use for a touch event. 187 // A lookup table for slots in use for a touch event.
188 std::bitset<kMaxTouchPoints> slots_used_; 188 std::bitset<kMaxTouchPoints> slots_used_;
189 189
190 DISALLOW_COPY_AND_ASSIGN(TouchFactory); 190 DISALLOW_COPY_AND_ASSIGN(TouchFactory);
191 }; 191 };
192 192
193 } // namespace views 193 } // namespace views
194 194
195 #endif // VIEWS_TOUCHUI_TOUCH_FACTORY_H_ 195 #endif // VIEWS_TOUCHUI_TOUCH_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698