This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
GLFW example with dirty region management #35057
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
14cf4a6
Update the GLFW example callbacks.
10dd868
Update the dart example.
fb92e45
Update CMakeLists
3edbb40
Update library dependencies in the BUILD file.
31839d1
Documenting.
1125309
Formatting.
acc691e
Update the callback name.
7f75cf9
Move glfw_drm example to a new folder.
ceb6d03
Create new example folder for drm_embedder.
581ee79
Add the flutter spinkit dependency
6bfaea5
Update BUILD files.
c9c480d
Do not compile glfw_drm example if running it on mac.
e6ca4ef
Update the executable name for the glfw_drm example.
71f4820
Avoid looking for the surface and display every time since they are a…
f42d759
Formatting.
b42dc00
GN formatting.
0c76b74
Update the way the user malloc's the existing damage
938d74e
Update comment
0db51f4
Update example and add gitignore.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| debug/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Copyright 2013 The Flutter Authors. All rights reserved. | ||
| # Use of this source code is governed by a BSD-style license that can be | ||
| # found in the LICENSE file. | ||
|
|
||
| import("//flutter/examples/examples.gni") | ||
|
|
||
| if (build_embedder_examples) { | ||
| executable("glfw_drm") { | ||
| output_name = "embedder_example_drm" | ||
|
|
||
| sources = [ "FlutterEmbedderGLFW.cc" ] | ||
|
|
||
| deps = [ | ||
| "//flutter/shell/platform/embedder:embedder", | ||
| "//third_party/glfw", | ||
| ] | ||
|
|
||
| libs = [ "EGL" ] | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| cmake_minimum_required(VERSION 3.15) | ||
| project(FlutterEmbedderGLFW) | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" ) | ||
|
|
||
| add_executable(flutter_glfw FlutterEmbedderGLFW.cc) | ||
|
|
||
| ############################################################ | ||
| # GLFW | ||
| ############################################################ | ||
| option(GLFW_BUILD_EXAMPLES "" OFF) | ||
| option(GLFW_BUILD_TESTS "" OFF) | ||
| option(GLFW_BUILD_DOCS "" OFF) | ||
| option(GLFW_INSTALL "" OFF) | ||
| find_package(OpenGL REQUIRED COMPONENTS EGL) | ||
| include_directories(${OPENGL_INCLUDE_DIRS}) | ||
| add_subdirectory(${CMAKE_SOURCE_DIR}/../../../third_party/glfw glfw) | ||
| target_link_libraries(flutter_glfw glfw OpenGL::EGL) | ||
| include_directories(${CMAKE_SOURCE_DIR}/../../../third_party/glfw/include) | ||
|
|
||
| ############################################################ | ||
| # Flutter Engine | ||
| ############################################################ | ||
| # This is assuming you've built a local version of the Flutter Engine. If you | ||
| # downloaded yours is from the internet you'll have to change this. | ||
| include_directories(${CMAKE_SOURCE_DIR}/../../shell/platform/embedder) | ||
| find_library(FLUTTER_LIB flutter_engine PATHS ${CMAKE_SOURCE_DIR}/../../../out/host_debug_unopt) | ||
| target_link_libraries(flutter_glfw ${FLUTTER_LIB}) | ||
|
|
||
| # Copy the flutter library here since the shared library | ||
| # name is `./libflutter_engine.dylib`. | ||
| add_custom_command( | ||
| TARGET flutter_glfw POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E copy | ||
| ${FLUTTER_LIB} | ||
| ${CMAKE_CURRENT_BINARY_DIR}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.