Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Flutter Engine to head. #20

Merged
merged 1 commit into from
Nov 1, 2023
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/libtess2.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/flatbuffers.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/fml.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_base.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_blobcat.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_shader_archive.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_core.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_geometry.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_renderer.cmake)
Expand Down
2 changes: 1 addition & 1 deletion cmake/impeller_renderer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ target_include_directories(impeller_renderer

target_link_libraries(impeller_renderer
PUBLIC
fml impeller_base impeller_blobcat impeller_geometry)
fml impeller_base impeller_shader_archive impeller_geometry)
target_include_directories(impeller_renderer
PUBLIC
$<BUILD_INTERFACE:${FLUTTER_INCLUDE_DIR}> # For includes starting with "flutter/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,63 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

set(IMPELLER_BLOBCAT_DIR ${FLUTTER_ENGINE_DIR}/impeller/blobcat
CACHE STRING "Location of the Impeller blobcat sources.")
set(IMPELLER_SHADER_ARCHIVE_DIR ${FLUTTER_ENGINE_DIR}/impeller/shader_archive
CACHE STRING "Location of the Impeller shader_archive sources.")

file(GLOB BLOBCAT_SOURCES ${IMPELLER_BLOBCAT_DIR}/*.cc)
list(FILTER BLOBCAT_SOURCES EXCLUDE REGEX ".*_unittests?\\.cc$")
list(REMOVE_ITEM BLOBCAT_SOURCES "${IMPELLER_BLOBCAT_DIR}/blobcat_main.cc")
file(GLOB SHADER_ARCHIVE_SOURCES ${IMPELLER_SHADER_ARCHIVE_DIR}/*.cc)
list(FILTER SHADER_ARCHIVE_SOURCES EXCLUDE REGEX ".*_unittests?\\.cc$")
list(REMOVE_ITEM SHADER_ARCHIVE_SOURCES "${IMPELLER_SHADER_ARCHIVE_DIR}/shader_archive_main.cc")

add_library(impeller_blobcat STATIC ${BLOBCAT_SOURCES})
add_library(impeller_shader_archive STATIC ${SHADER_ARCHIVE_SOURCES})

flatbuffers_schema(
TARGET impeller_blobcat
INPUT ${IMPELLER_BLOBCAT_DIR}/blob.fbs
OUTPUT_DIR ${IMPELLER_GENERATED_DIR}/impeller/blobcat)
TARGET impeller_shader_archive
INPUT ${IMPELLER_SHADER_ARCHIVE_DIR}/shader_archive.fbs
OUTPUT_DIR ${IMPELLER_GENERATED_DIR}/impeller/shader_archive)

target_include_directories(impeller_blobcat
flatbuffers_schema(
TARGET impeller_shader_archive
INPUT ${IMPELLER_SHADER_ARCHIVE_DIR}/multi_arch_shader_archive.fbs
OUTPUT_DIR ${IMPELLER_GENERATED_DIR}/impeller/shader_archive)

target_include_directories(impeller_shader_archive
PUBLIC
$<BUILD_INTERFACE:${FLUTTER_INCLUDE_DIR}> # For includes starting with "flutter/"
$<BUILD_INTERFACE:${FLUTTER_ENGINE_DIR}> # For includes starting with "impeller/"
$<BUILD_INTERFACE:${IMPELLER_GENERATED_DIR}>) # For generated flatbuffer schemas
target_link_libraries(impeller_blobcat PUBLIC fml impeller_base)
target_link_libraries(impeller_shader_archive PUBLIC fml impeller_base)

add_executable(blobcat "${IMPELLER_BLOBCAT_DIR}/blobcat_main.cc")
target_include_directories(blobcat
add_executable(shader_archive "${IMPELLER_SHADER_ARCHIVE_DIR}/shader_archive_main.cc")
target_include_directories(shader_archive
PUBLIC
$<BUILD_INTERFACE:${FLUTTER_INCLUDE_DIR}> # For includes starting with "flutter/"
$<BUILD_INTERFACE:${FLUTTER_ENGINE_DIR}>) # For includes starting with "impeller/"
target_link_libraries(blobcat PUBLIC impeller_blobcat)
target_link_libraries(shader_archive PUBLIC impeller_shader_archive)

# blobcat(OUTPUT filename INPUTS filename;filename)
function(blobcat)
# shader_archive(OUTPUT filename INPUTS filename;filename)
function(shader_archive)
cmake_parse_arguments(ARG "" "OUTPUT" "INPUTS" ${ARGN})
blobcat_parse(CLI
shader_archive_parse(CLI
OUTPUT ${ARG_OUTPUT} INPUTS ${ARG_INPUTS} ${ARG_UNPARSED_ARGUMENTS})

get_filename_component(OUTPUT_DIR "${ARG_OUTPUT}" ABSOLUTE)
get_filename_component(OUTPUT_DIR "${OUTPUT_DIR}" DIRECTORY)

add_custom_command(
COMMAND ${CMAKE_COMMAND} -E make_directory "${OUTPUT_DIR}"
COMMAND "$<TARGET_FILE:blobcat>" ${CLI}
COMMAND "$<TARGET_FILE:shader_archive>" ${CLI}
DEPENDS ${ARG_INPUTS}
OUTPUT ${ARG_OUTPUT}
COMMENT "Building blob ${ARG_OUTPUT}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
endfunction()

# blobcat_parse(
# shader_archive_parse(
# cli_out
# OUTPUT filename
# INPUTS filename;filename
# )
function(blobcat_parse CLI_OUT)
function(shader_archive_parse CLI_OUT)
cmake_parse_arguments(ARG "" "OUTPUT" "INPUTS" ${ARGN})
set(CLI "")

Expand Down
2 changes: 1 addition & 1 deletion cmake/impellerc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function(add_gles_shader_library)
list(APPEND BLOB_FILES ${ARG_OUTPUT_DIR}/${INPUT_FILENAME}.gles)
endforeach()

blobcat(
shader_archive(
OUTPUT ${ARG_OUTPUT_DIR}/${ARG_NAME}_gles.blob
INPUTS ${BLOB_FILES})

Expand Down
2 changes: 1 addition & 1 deletion third_party/flutter
Submodule flutter updated 819 files