160 {
161 {
162 size_t num_bytes = 0;
163 for (const auto& value : update) {
165 num_bytes +=
168 num_bytes +=
value.second.customAccessibilityActions.size() *
170 num_bytes +=
172 num_bytes +=
174 num_bytes +=
value.second.increasedValueAttributes.size() *
176 num_bytes +=
value.second.decreasedValueAttributes.size() *
178 num_bytes +=
180 }
181
182
183
184
185
186
187
188
189 std::vector<uint8_t>
buffer(num_bytes);
190 int32_t* buffer_int32 =
reinterpret_cast<int32_t*
>(&
buffer[0]);
191 float* buffer_float32 =
reinterpret_cast<float*
>(&
buffer[0]);
192
193 std::vector<std::string> strings;
194 std::vector<std::vector<uint8_t>> string_attribute_args;
195 size_t position = 0;
196 for (const auto& value : update) {
197
198
199
201 buffer_int32[position++] = node.
id;
202 int64_t flags = flagsToInt64(node.
flags);
203 std::memcpy(&buffer_int32[position], &flags, 8);
204 position += 2;
205 buffer_int32[position++] = node.
actions;
214 buffer_float32[position++] =
static_cast<float>(node.
scrollPosition);
217
218 putStringIntoBuffer(node.
identifier, buffer_int32, &position, strings);
219
220 putStringIntoBuffer(node.
label, buffer_int32, &position, strings);
222 &position, string_attribute_args);
223
224 putStringIntoBuffer(node.
value, buffer_int32, &position, strings);
226 &position, string_attribute_args);
227
229 strings);
231 &position, string_attribute_args);
232
234 strings);
236 &position, string_attribute_args);
237
238 putStringIntoBuffer(node.
hint, buffer_int32, &position, strings);
240 &position, string_attribute_args);
241
242 putStringIntoBuffer(node.
tooltip, buffer_int32, &position, strings);
243 putStringIntoBuffer(node.
linkUrl, buffer_int32, &position, strings);
244 putStringIntoBuffer(node.
locale, buffer_int32, &position, strings);
245
248 buffer_float32[position++] = node.
rect.left();
249 buffer_float32[position++] = node.
rect.top();
250 buffer_float32[position++] = node.
rect.right();
251 buffer_float32[position++] = node.
rect.bottom();
252 node.
transform.getColMajor(&buffer_float32[position]);
253 position += 16;
255 position += 16;
257 for (int32_t child : node.childrenInTraversalOrder) {
258 buffer_int32[position++] = child;
259 }
260
262 for (int32_t child : node.childrenInHitTestOrder) {
263 buffer_int32[position++] = child;
264 }
265
267 for (int32_t child : node.customAccessibilityActions) {
268 buffer_int32[position++] = child;
269 }
270 }
271
272
274 std::vector<uint8_t> actions_buffer(num_action_bytes);
275 int32_t* actions_buffer_int32 =
276 reinterpret_cast<int32_t*>(&actions_buffer[0]);
277
278 std::vector<std::string> action_strings;
279 size_t actions_position = 0;
280 for (const auto& value : actions) {
281
282
283
285 actions_buffer_int32[actions_position++] =
action.id;
286 actions_buffer_int32[actions_position++] =
action.overrideId;
287 putStringIntoBuffer(
action.label, actions_buffer_int32, &actions_position,
288 action_strings);
289 putStringIntoBuffer(
action.hint, actions_buffer_int32, &actions_position,
290 action_strings);
291 }
292
293
294
295 if (!actions_buffer.empty()) {
296 jni_facade_->FlutterViewUpdateCustomAccessibilityActions(actions_buffer,
297 action_strings);
298 }
299
301 jni_facade_->FlutterViewUpdateSemantics(buffer, strings,
302 string_attribute_args);
303 }
304 }
305}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set profile Make the profiler discard new samples once the profiler sample buffer is full When this flag is not the profiler sample buffer is used as a ring buffer
StringAttributes decreasedValueAttributes
std::string increasedValue
StringAttributes hintAttributes
StringAttributes increasedValueAttributes
StringAttributes valueAttributes
StringAttributes labelAttributes
std::vector< int32_t > childrenInHitTestOrder
int32_t textSelectionExtent
int32_t currentValueLength
std::vector< int32_t > customAccessibilityActions
std::string decreasedValue
std::vector< int32_t > childrenInTraversalOrder
int32_t textSelectionBase