Lines Matching refs:msg
41 static void sanitizeMessage(const InputMessage& msg, InputMessage* outMsg) { in sanitizeMessage() argument
45 outMsg->header.type = msg.header.type; in sanitizeMessage()
46 outMsg->header.seq = msg.header.seq; in sanitizeMessage()
49 switch(msg.header.type) { in sanitizeMessage()
52 outMsg->body.key.eventId = msg.body.key.eventId; in sanitizeMessage()
54 outMsg->body.key.eventTime = msg.body.key.eventTime; in sanitizeMessage()
56 outMsg->body.key.deviceId = msg.body.key.deviceId; in sanitizeMessage()
58 outMsg->body.key.source = msg.body.key.source; in sanitizeMessage()
60 outMsg->body.key.displayId = msg.body.key.displayId; in sanitizeMessage()
62 outMsg->body.key.hmac = msg.body.key.hmac; in sanitizeMessage()
64 outMsg->body.key.action = msg.body.key.action; in sanitizeMessage()
66 outMsg->body.key.flags = msg.body.key.flags; in sanitizeMessage()
68 outMsg->body.key.keyCode = msg.body.key.keyCode; in sanitizeMessage()
70 outMsg->body.key.scanCode = msg.body.key.scanCode; in sanitizeMessage()
72 outMsg->body.key.metaState = msg.body.key.metaState; in sanitizeMessage()
74 outMsg->body.key.repeatCount = msg.body.key.repeatCount; in sanitizeMessage()
76 outMsg->body.key.downTime = msg.body.key.downTime; in sanitizeMessage()
81 outMsg->body.motion.eventId = msg.body.key.eventId; in sanitizeMessage()
83 outMsg->body.motion.eventTime = msg.body.motion.eventTime; in sanitizeMessage()
85 outMsg->body.motion.deviceId = msg.body.motion.deviceId; in sanitizeMessage()
87 outMsg->body.motion.source = msg.body.motion.source; in sanitizeMessage()
89 outMsg->body.motion.displayId = msg.body.motion.displayId; in sanitizeMessage()
91 outMsg->body.motion.hmac = msg.body.motion.hmac; in sanitizeMessage()
93 outMsg->body.motion.action = msg.body.motion.action; in sanitizeMessage()
95 outMsg->body.motion.actionButton = msg.body.motion.actionButton; in sanitizeMessage()
97 outMsg->body.motion.flags = msg.body.motion.flags; in sanitizeMessage()
99 outMsg->body.motion.metaState = msg.body.motion.metaState; in sanitizeMessage()
101 outMsg->body.motion.buttonState = msg.body.motion.buttonState; in sanitizeMessage()
103 outMsg->body.motion.classification = msg.body.motion.classification; in sanitizeMessage()
105 outMsg->body.motion.edgeFlags = msg.body.motion.edgeFlags; in sanitizeMessage()
107 outMsg->body.motion.downTime = msg.body.motion.downTime; in sanitizeMessage()
109 outMsg->body.motion.dsdx = msg.body.motion.dsdx; in sanitizeMessage()
111 outMsg->body.motion.dtdx = msg.body.motion.dtdx; in sanitizeMessage()
113 outMsg->body.motion.dtdy = msg.body.motion.dtdy; in sanitizeMessage()
115 outMsg->body.motion.dsdy = msg.body.motion.dsdy; in sanitizeMessage()
117 outMsg->body.motion.tx = msg.body.motion.tx; in sanitizeMessage()
119 outMsg->body.motion.ty = msg.body.motion.ty; in sanitizeMessage()
121 outMsg->body.motion.xPrecision = msg.body.motion.xPrecision; in sanitizeMessage()
123 outMsg->body.motion.yPrecision = msg.body.motion.yPrecision; in sanitizeMessage()
125 outMsg->body.motion.xCursorPosition = msg.body.motion.xCursorPosition; in sanitizeMessage()
127 outMsg->body.motion.yCursorPosition = msg.body.motion.yCursorPosition; in sanitizeMessage()
129 outMsg->body.motion.displayOrientation = msg.body.motion.displayOrientation; in sanitizeMessage()
131 outMsg->body.motion.displayWidth = msg.body.motion.displayWidth; in sanitizeMessage()
133 outMsg->body.motion.displayHeight = msg.body.motion.displayHeight; in sanitizeMessage()
135 outMsg->body.motion.pointerCount = msg.body.motion.pointerCount; in sanitizeMessage()
137 for (size_t i = 0; i < msg.body.motion.pointerCount; i++) { in sanitizeMessage()
140 msg.body.motion.pointers[i].properties.id; in sanitizeMessage()
142 msg.body.motion.pointers[i].properties.toolType; in sanitizeMessage()
145 msg.body.motion.pointers[i].coords.bits; in sanitizeMessage()
146 const uint32_t count = BitSet64::count(msg.body.motion.pointers[i].coords.bits); in sanitizeMessage()
148 &msg.body.motion.pointers[i].coords.values[0], in sanitizeMessage()
149 count * sizeof(msg.body.motion.pointers[i].coords.values[0])); in sanitizeMessage()
154 outMsg->body.finished.handled = msg.body.finished.handled; in sanitizeMessage()
155 outMsg->body.finished.consumeTime = msg.body.finished.consumeTime; in sanitizeMessage()
159 outMsg->body.focus.eventId = msg.body.focus.eventId; in sanitizeMessage()
160 outMsg->body.focus.hasFocus = msg.body.focus.hasFocus; in sanitizeMessage()
161 outMsg->body.focus.inTouchMode = msg.body.focus.inTouchMode; in sanitizeMessage()
165 outMsg->body.capture.eventId = msg.body.capture.eventId; in sanitizeMessage()
166 outMsg->body.capture.pointerCaptureEnabled = msg.body.capture.pointerCaptureEnabled; in sanitizeMessage()
170 outMsg->body.capture.eventId = msg.body.capture.eventId; in sanitizeMessage()
171 outMsg->body.drag.isExiting = msg.body.drag.isExiting; in sanitizeMessage()
172 outMsg->body.drag.x = msg.body.drag.x; in sanitizeMessage()
173 outMsg->body.drag.y = msg.body.drag.y; in sanitizeMessage()
177 outMsg->body.timeline.eventId = msg.body.timeline.eventId; in sanitizeMessage()
178 outMsg->body.timeline.graphicsTimeline = msg.body.timeline.graphicsTimeline; in sanitizeMessage()
184 static void makeMessageValid(InputMessage& msg) { in makeMessageValid() argument
185 InputMessage::Type type = msg.header.type; in makeMessageValid()
188 msg.body.motion.pointerCount = MAX_POINTERS; in makeMessageValid()
192 msg.body.timeline.graphicsTimeline[GraphicsTimeline::GPU_COMPLETED_TIME] = 10; in makeMessageValid()
193 msg.body.timeline.graphicsTimeline[GraphicsTimeline::PRESENT_TIME] = 20; in makeMessageValid()