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 std::vector<std::string> strings;
191 std::vector<std::vector<uint8_t>> string_attribute_args;
192
194 int32_t* buffer_int32 =
reinterpret_cast<int32_t*
>(
buffer.data());
195 float* buffer_float32 =
reinterpret_cast<float*
>(
buffer.data());
196
197 size_t position = 0;
198 for (const auto& value : update) {
199
200
201
203 buffer_int32[position++] = node.
id;
204 int64_t flags = flagsToInt64(node.
flags);
205 std::memcpy(&buffer_int32[position], &flags, 8);
206 position += 2;
207 buffer_int32[position++] = node.
actions;
216 buffer_float32[position++] =
static_cast<float>(node.
scrollPosition);
219 buffer_int32[position++] =
static_cast<int32_t
>(node.
role);
220
221 putStringIntoBuffer(node.
identifier, buffer_int32, &position, strings);
222
223 putStringIntoBuffer(node.
label, buffer_int32, &position, strings);
225 &position, string_attribute_args);
226
227 putStringIntoBuffer(node.
value, buffer_int32, &position, strings);
229 &position, string_attribute_args);
230
232 strings);
234 buffer_int32, &position,
235 string_attribute_args);
236
238 strings);
240 buffer_int32, &position,
241 string_attribute_args);
242
243 putStringIntoBuffer(node.
hint, buffer_int32, &position, strings);
245 &position, string_attribute_args);
246
247 putStringIntoBuffer(node.
tooltip, buffer_int32, &position, strings);
248 putStringIntoBuffer(node.
linkUrl, buffer_int32, &position, strings);
249 putStringIntoBuffer(node.
locale, buffer_int32, &position, strings);
250 putStringIntoBuffer(node.
minValue, buffer_int32, &position, strings);
251 putStringIntoBuffer(node.
maxValue, buffer_int32, &position, strings);
252
255 buffer_float32[position++] = node.
rect.left();
256 buffer_float32[position++] = node.
rect.top();
257 buffer_float32[position++] = node.
rect.right();
258 buffer_float32[position++] = node.
rect.bottom();
259 node.
transform.getColMajor(&buffer_float32[position]);
260 position += 16;
262 position += 16;
264 for (int32_t child : node.childrenInTraversalOrder) {
265 buffer_int32[position++] = child;
266 }
267
269 for (int32_t child : node.childrenInHitTestOrder) {
270 buffer_int32[position++] = child;
271 }
272
274 for (int32_t child : node.customAccessibilityActions) {
275 buffer_int32[position++] = child;
276 }
277 }
278 }
279
280
282 std::vector<uint8_t> actions_buffer(num_action_bytes);
283
284 if (!actions_buffer.empty()) {
285 int32_t* actions_buffer_int32 =
286 reinterpret_cast<int32_t*>(actions_buffer.data());
287
288 std::vector<std::string> action_strings;
289 size_t actions_position = 0;
290 for (const auto& value : actions) {
291
292
293
295 actions_buffer_int32[actions_position++] =
action.id;
296 actions_buffer_int32[actions_position++] =
action.overrideId;
297 putStringIntoBuffer(
action.label, actions_buffer_int32,
298 &actions_position, action_strings);
299 putStringIntoBuffer(
action.hint, actions_buffer_int32,
300 &actions_position, action_strings);
301 }
302
303
304 jni_facade_->FlutterViewUpdateCustomAccessibilityActions(actions_buffer,
305 action_strings);
306 }
307
309 jni_facade_->FlutterViewUpdateSemantics(buffer, strings,
310 string_attribute_args);
311 }
312 }
313}
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