Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion flutter/shell/platform/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ source_set("common_cpp") {
# API surface there will be.
source_set("common_cpp_core") {
public = [
"geometry.h",
"path_utils.h",
"windowing.h",
]
Expand Down
1 change: 1 addition & 0 deletions flutter/shell/platform/common/accessibility_bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ AccessibilityBridge::FromFlutterSemanticsNode(

result.flags = flutter_node.flags2;
result.actions = flutter_node.actions;
result.heading_level = flutter_node.heading_level;
result.text_selection_base = flutter_node.text_selection_base;
result.text_selection_extent = flutter_node.text_selection_extent;
result.scroll_child_count = flutter_node.scroll_child_count;
Expand Down
1 change: 1 addition & 0 deletions flutter/shell/platform/common/accessibility_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ class AccessibilityBridge
FlutterTransformation transform;
std::vector<int32_t> children_in_traversal_order;
std::vector<int32_t> custom_accessibility_actions;
int32_t heading_level;
} SemanticsNode;

// See FlutterSemanticsCustomAction in embedder.h
Expand Down
107 changes: 0 additions & 107 deletions flutter/shell/platform/common/geometry.h

This file was deleted.

2 changes: 1 addition & 1 deletion flutter/shell/platform/common/json_message_codec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ std::unique_ptr<std::vector<uint8_t>> JsonMessageCodec::EncodeMessageInternal(
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
// clang-tidy has trouble reasoning about some of the complicated array and
// pointer-arithmetic code in rapidjson.
// NOLINTNEXTLINE(clang-analyzer-core.*)
// NOLINTNEXTLINE(clang-analyzer-core.*,clang-analyzer-security.*)
message.Accept(writer);
const char* buffer_start = buffer.GetString();
return std::make_unique<std::vector<uint8_t>>(
Expand Down
53 changes: 51 additions & 2 deletions flutter/shell/platform/embedder/embedder.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ typedef enum {
/// Request that scrolls the current scrollable container to a given scroll
/// offset.
kFlutterSemanticsActionScrollToOffset = 1 << 23,
/// A request that the node should be expanded.
kFlutterSemanticsActionExpand = 1 << 24,
/// A request that the node should be collapsed.
kFlutterSemanticsActionCollapse = 1 << 25,
} FlutterSemanticsAction;

/// The set of properties that may be associated with a semantics node.
Expand Down Expand Up @@ -924,6 +928,9 @@ typedef void* FlutterVulkanQueueHandle;
/// Alias for VkImage.
typedef uint64_t FlutterVulkanImageHandle;

/// Alias for VkDeviceMemory.
typedef uint64_t FlutterVulkanDeviceMemoryHandle;

typedef struct {
/// The size of this struct. Must be sizeof(FlutterVulkanImage).
size_t struct_size;
Expand Down Expand Up @@ -952,6 +959,36 @@ typedef bool (*FlutterVulkanPresentCallback)(
void* /* user data */,
const FlutterVulkanImage* /* image */);

typedef struct {
/// Handle to the VkImage that is owned by the embedder. The engine will
/// bind this image for writing the frame.
FlutterVulkanImageHandle image;
/// The VkDeviceMemory that backs the iamge.
FlutterVulkanDeviceMemoryHandle image_memory;
/// The VkFormat of the image (for example: VK_FORMAT_R8G8B8A8_UNORM).
uint32_t format;
/// User data to be returned on the invocation of the destruction callback.
void* user_data;
/// Callback invoked (on an engine managed thread) that asks the embedder to
/// collect the texture.
VoidCallback destruction_callback;
/// Optional parameters for texture height/width, default is 0, non-zero means
/// the texture has the specified width/height.
/// Width of the texture.
size_t width;
/// Height of the texture.
size_t height;
} FlutterVulkanTexture;

/// Callback to provide an external texture for a given texture_id.
/// See: external_texture_frame_callback.
typedef bool (*FlutterVulkanTextureFrameCallback)(
void* /* user data */,
int64_t /* texture identifier */,
size_t /* width */,
size_t /* height */,
FlutterVulkanTexture* /* texture out */);

typedef struct {
/// The size of this struct. Must be sizeof(FlutterVulkanRendererConfig).
size_t struct_size;
Expand Down Expand Up @@ -1015,7 +1052,11 @@ typedef struct {
/// without any additional synchronization.
/// Not used if a FlutterCompositor is supplied in FlutterProjectArgs.
FlutterVulkanPresentCallback present_image_callback;

/// When the embedder specifies that a texture has a frame available, the
/// engine will call this method (on an internal engine managed thread) so
/// that external texture details can be supplied to the engine for subsequent
/// composition.
FlutterVulkanTextureFrameCallback external_texture_frame_callback;
} FlutterVulkanRendererConfig;

typedef struct {
Expand Down Expand Up @@ -1593,6 +1634,10 @@ typedef struct {
FlutterPlatformViewIdentifier platform_view_id;
/// A textual tooltip attached to the node.
const char* tooltip;
/// The heading level for this node. A value of 0 means the node is not a
/// heading; higher values (1, 2, …) indicate the heading rank, with lower
/// numbers being higher-level headings.
int32_t heading_level;
} FlutterSemanticsNode;

/// A node in the Flutter semantics tree.
Expand Down Expand Up @@ -1700,6 +1745,10 @@ typedef struct {
// The set of semantics flags associated with this node. Prefer to use this
// over `flags__deprecated__`.
FlutterSemanticsFlags* flags2;
/// The heading level for this node. A value of 0 means the node is not a
/// heading; higher values (1, 2, …) indicate the heading rank, with lower
/// numbers being higher-level headings.
int32_t heading_level;
} FlutterSemanticsNode2;

/// `FlutterSemanticsCustomAction` ID used as a sentinel to signal the end of a
Expand Down Expand Up @@ -3361,7 +3410,7 @@ uint64_t FlutterEngineGetCurrentTime();

//------------------------------------------------------------------------------
/// @brief Inform the engine to run the specified task. This task has been
/// given to the engine via the
/// given to the embedder via the
/// `FlutterTaskRunnerDescription.post_task_callback`. This call
/// must only be made at the target time specified in that callback.
/// Running the task before that time is undefined behavior.
Expand Down