Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
434 commits
Select commit Hold shift + click to select a range
25f39f7
Minor build fixups.
chinmaygarde Nov 3, 2021
a05ee53
Merge entity renderer impl into the entity renderer.
chinmaygarde Nov 3, 2021
1bc2d90
Move entity shaders to their own directory.
chinmaygarde Nov 3, 2021
6d95783
Shorten names of the render target attachment descriptors.
chinmaygarde Nov 8, 2021
c43ed6d
Fixup names of pipeline descriptors.
chinmaygarde Nov 8, 2021
254d400
Minor fixups to pipeline creation.
chinmaygarde Nov 9, 2021
23fd56f
Make pipelines store pipeline descriptors.
chinmaygarde Nov 10, 2021
b291063
Start consolidating content rendering.
chinmaygarde Nov 10, 2021
843e97a
Separate save layer calls into a canvas pass.
chinmaygarde Nov 12, 2021
62f353a
Start wiring up the entity playground.
chinmaygarde Nov 15, 2021
ff6a2b7
Allow shader libraries to look at multiple shader dylibs.
chinmaygarde Nov 15, 2021
4271bad
Implement texture mapping.
chinmaygarde Nov 16, 2021
ff40284
WIP on stroke rendering.
chinmaygarde Nov 16, 2021
89952c2
Insert additional padding at the end of the struct if the size of the…
chinmaygarde Nov 18, 2021
b0f5b46
Fix struct padding calculations.
chinmaygarde Nov 18, 2021
180ecd3
Rendering of continuous strokes.
chinmaygarde Nov 18, 2021
a27c98b
Cleanup entity API.
chinmaygarde Nov 18, 2021
da131d8
WIP Add test for clip rendering.
chinmaygarde Nov 18, 2021
75e827b
Add support for typed commands.
chinmaygarde Nov 19, 2021
b93f3c1
Give the default render target a stencil buffer.
chinmaygarde Nov 20, 2021
564b3e4
Implement stencil-only clips.
chinmaygarde Nov 20, 2021
98528fe
Rework canvas passes in prep for subpasses.
chinmaygarde Nov 22, 2021
a56bab4
Renderer components no longer need a surface reference to function.
chinmaygarde Nov 22, 2021
bf2fc9b
WIP on creating utils for creating offscreen render targets.
chinmaygarde Nov 22, 2021
46003e3
Fix bug in texture usage mask.
chinmaygarde Nov 22, 2021
8c78d91
Setup aiks for canvas subpasses.
chinmaygarde Nov 23, 2021
89e71b6
Setup canvas pass hierarchies.
chinmaygarde Nov 25, 2021
c21c5c0
Canvas subpasses rendering into their own command buffers.
chinmaygarde Nov 25, 2021
c717bb8
Work towards making canvas subpasses configure postprocessing effects.
chinmaygarde Nov 26, 2021
7dd5e24
Fix alpha writes while rendering to texture.
chinmaygarde Nov 28, 2021
22dcbec
Fixup ortho calculations and add ostream printers for geometry utils.
chinmaygarde Nov 28, 2021
dadb471
Setup a framework to collapse passes.
chinmaygarde Nov 28, 2021
8526be0
Move entity pass management to the entity framework.
chinmaygarde Nov 28, 2021
aef77f7
Setup a paint pass delgate.
chinmaygarde Nov 28, 2021
5e74c56
Allow entity passes to be elided based on their contents.
chinmaygarde Nov 28, 2021
ff259c5
Turn on full-screen 4xMSAA by default and additional render target va…
chinmaygarde Nov 30, 2021
e6a67e4
Add render pass and pipeline sample count validation.
chinmaygarde Dec 1, 2021
6eb72ad
All creation of pipeline variants from a pipeline.
chinmaygarde Dec 1, 2021
e682751
Allow for the on-demand creation and caching of pipeline variants fro…
chinmaygarde Dec 1, 2021
4b653ef
Add more validation logs instead of FML logs.
chinmaygarde Dec 2, 2021
df7b796
Implement Canvas::Skew.
chinmaygarde Dec 2, 2021
7033886
Implement Canvas::SaveLayer with bounds.
chinmaygarde Dec 4, 2021
c2292c8
Minor: Add Canvas::Transform.
chinmaygarde Dec 4, 2021
255b8d6
Rect union and intersection.
chinmaygarde Dec 4, 2021
c371120
Don't let subpass coverage exceed entity coverage.
chinmaygarde Dec 4, 2021
7964f5d
Remove unused and confusing API in TRect.
chinmaygarde Dec 4, 2021
e395045
Add macOS availability checks.
chinmaygarde Dec 6, 2021
dade71a
Add missing availability check for macOS 10.12.
chinmaygarde Dec 6, 2021
2d2f40e
Fix broken test.
chinmaygarde Dec 7, 2021
6990772
Support non-uniform rounding radii.
chinmaygarde Dec 8, 2021
2758936
Stub out a display list dispatcher.
chinmaygarde Dec 8, 2021
a37bc06
Support path fill types.
chinmaygarde Dec 8, 2021
9e0df78
Add support for path composition in path builder.
chinmaygarde Dec 9, 2021
9505eea
Implement conversion SkPath to Impeller paths.
chinmaygarde Dec 9, 2021
5e44170
Import the archivist framework.
chinmaygarde Dec 10, 2021
a30d15b
Update translation units for style guide.
chinmaygarde Dec 10, 2021
5f1ee5e
Cleanup archive structure.
chinmaygarde Dec 10, 2021
7763e90
Separate archive_location into its own TU.
chinmaygarde Dec 11, 2021
2edcf88
Clearer names for primary keys.
chinmaygarde Dec 11, 2021
e42e373
Add uncommitted patches from a previous change.
chinmaygarde Dec 11, 2021
bf346dc
More use of optionals in archivist.
chinmaygarde Dec 11, 2021
23d34bf
Make primary keys optional.
chinmaygarde Dec 11, 2021
f84da3e
Minor: Rename primary key variable name.
chinmaygarde Dec 11, 2021
9d8f9fd
Support user readable table names.
chinmaygarde Dec 11, 2021
80ee43d
Add error message for incorrect member lookup.
chinmaygarde Dec 12, 2021
cdba383
Remove superfluous auto_key from ArchiveDef.
chinmaygarde Dec 12, 2021
40189f2
Cleanup macros in archive statement.
chinmaygarde Dec 12, 2021
b6720c7
Remove remaining C-Style casts.
chinmaygarde Dec 12, 2021
02bc878
Fix temporary database file deletion.
chinmaygarde Dec 12, 2021
a4a3bff
Fix iOS compilation issues.
chinmaygarde Dec 13, 2021
7265c7a
Update GN rules for Flutter updates.
chinmaygarde Dec 22, 2021
e0d051d
Minor: Rename the Impeller dispatcher to be something sane and prep f…
chinmaygarde Dec 22, 2021
78764d1
Rework the confusingly named renderer subsystem instances.
chinmaygarde Dec 29, 2021
515bbd0
Make the Metal drawable wrapping routine from the playground a utility.
chinmaygarde Dec 29, 2021
d1b6dbc
Minor: Change the names of the intermediates for the wrapped render t…
chinmaygarde Dec 29, 2021
4edb5b0
Allow resizing the playground.
chinmaygarde Dec 29, 2021
e1f20a7
Holy size savings Batman!
chinmaygarde Dec 30, 2021
3a80477
Forward targets specification to the code generator in impellerc.
chinmaygarde Dec 30, 2021
a5265e2
Shader data can now be compiled into the binary.
chinmaygarde Dec 31, 2021
4af74f0
Fix pipeline library issue related to not tracking pending futures.
chinmaygarde Jan 4, 2022
a00220c
Don't waste space on an unnecessary depth buffer.
chinmaygarde Jan 5, 2022
e92b74b
Setup default pixel formats.
chinmaygarde Jan 6, 2022
59ebc25
Remove support for the weird 5 byte pixel format.
chinmaygarde Jan 6, 2022
217b51b
Minor: Account for macro namespacing.
chinmaygarde Jan 31, 2022
546fa19
IOS macros have not been namespaced yet.
chinmaygarde Jan 31, 2022
d9f3c70
Gate the minimum iOS deployment versions in the generated shaders.
chinmaygarde Jan 31, 2022
8ac6996
Cross reference issues and add additional tracing.
chinmaygarde Feb 1, 2022
bbb71a7
Add a README.
chinmaygarde Feb 2, 2022
8bc0573
Fixup minor Markdown formatting issues in the README.
chinmaygarde Feb 2, 2022
8b980ed
Add an image overview of the shader compilation pipeline.
chinmaygarde Feb 2, 2022
e522051
Link to the shader pipeline from the README.
chinmaygarde Feb 2, 2022
7b752f5
Enable playgrounds in all tests and fix default sample counts.
chinmaygarde Feb 3, 2022
7a920fd
Update tests to account for sample count defaults.
chinmaygarde Feb 3, 2022
10d5d62
Back out changes to the Impeller dispatcher stub that depend on WIP i…
chinmaygarde Feb 3, 2022
14cb122
create scorecards-analysis.yml (#4)
godofredoc Feb 3, 2022
5a2d0b6
Use -M0 instead of -frecord-sources (#5)
zanderso Feb 4, 2022
f4f6c37
Compensate for change to saveLayer (#6)
zanderso Feb 4, 2022
51cb05a
Adds a GN flag for playgrounds (#7)
zanderso Feb 6, 2022
163b227
Wrap all MD files at 80 cols, minor cleanup of headers/indenting (#8)
dnfield Feb 16, 2022
de0983f
Fix Rect::Compare bugs (#10)
bdero Feb 16, 2022
56cfb37
adopt new DlColorFilter objects (#12)
flar Feb 16, 2022
a476b92
Support 16bit index buffers (#11)
bdero Feb 16, 2022
3c95a89
Add viewport and scissor support (#9)
bdero Feb 16, 2022
eefea2d
Add cull mode to command (#13)
bdero Feb 17, 2022
3cefd90
Support nested clips & clip state restoration (#14)
bdero Feb 17, 2022
1d99df1
Fix bug introduced in a476b92 which broke a bunch of tests (#15)
bdero Feb 18, 2022
cabe96e
changes for new DlMaskFilter objects (#17)
flar Feb 18, 2022
b5f4b77
Add baseVertex (#16)
bdero Feb 18, 2022
467ea5c
Fix index size check to respect 16 bit buffers (#19)
bdero Feb 22, 2022
4b729ec
Add mixed type specializations on algebraic ops in TPoint (#21)
bdero Feb 22, 2022
dbe06cd
Respect TextureContents/Canvas::DrawImageRect source rect (#22)
bdero Feb 22, 2022
f80bb19
Add an ImGui backend targetting Impeller to the playground (#20)
bdero Feb 23, 2022
485ee1f
Fix prod build (#23)
bdero Feb 23, 2022
42b6208
Bad cubic tests (#24)
dnfield Feb 24, 2022
be7d04d
Match skia's path param ordering (#25)
bdero Feb 24, 2022
2979397
Do not include the leading point for cubic polylines (#29)
dnfield Feb 24, 2022
6415924
Add assignment operators to point (#26)
bdero Feb 24, 2022
48ff4a1
Add entity playground callback (#27)
bdero Feb 24, 2022
d3180f5
adopt new DlAttributeType enum naming (#30)
flar Feb 24, 2022
476ecac
Support subcontours in strokes, lay groundwork for fills (#31)
dnfield Feb 25, 2022
0cea3cc
Add immediate mode manipulator widget macros for the playground (#28)
bdero Feb 25, 2022
01bbb3f
Fix MoveTo for fills (#32)
dnfield Feb 25, 2022
4e5ae50
Add dot and cross product to Point (#33)
bdero Feb 25, 2022
9c39cd8
Remove duplicate points between connected components when generating …
bdero Feb 25, 2022
dbae526
Handle all corner cases for stroke geometry, add bevel join & cap/joi…
bdero Feb 25, 2022
6766288
Add `//impeller/typographer`. (#36)
chinmaygarde Feb 25, 2022
2bda26a
Remove schedule runs of scorecards. (#38)
godofredoc Feb 26, 2022
a6f8fd9
Bump ossf/scorecard-action from 1.0.3 to 1.0.4 (#40)
dependabot[bot] Feb 26, 2022
edc8791
Fix license to make the license script happy (#37)
bdero Feb 26, 2022
357895e
Bump github/codeql-action from 1.0.26 to 1.1.3 (#39)
dependabot[bot] Feb 26, 2022
4545a20
Remove break corner cases, simplify strokes, and generate closed path…
bdero Feb 28, 2022
e382f13
Account for glyph extents in the atlas. (#42)
chinmaygarde Feb 28, 2022
9d760a5
Relay text color from Paint. (#43)
chinmaygarde Feb 28, 2022
8284c94
Account for updated macro name in //flutter/fml/build_config.h (#44)
chinmaygarde Feb 28, 2022
21411fc
Setup join/cap proc (#45)
bdero Feb 28, 2022
01db57a
Avoid depending on STB in //flutter/impeller/image. (#47)
chinmaygarde Mar 1, 2022
ed59229
Add square cap (#48)
bdero Mar 1, 2022
b9de1e5
Point: Add reflect and make scalar ops more flexible (#51)
bdero Mar 2, 2022
36a0856
Add miter join (#49)
bdero Mar 2, 2022
53e59a1
Add round caps and joins (#52)
bdero Mar 2, 2022
7e1764d
Move Contents classes into separate translation units (#53)
bdero Mar 3, 2022
149a0f2
Expose C API for tessellator, move to own subdir (#18)
dnfield Mar 5, 2022
a85214d
Fix ScalarNearlyEqual test (#56)
bdero Mar 7, 2022
46f95c3
Add color premultiply/unpremultiply (#57)
bdero Mar 7, 2022
d0b9f21
Add pipeline blend modes & demo (#55)
bdero Mar 8, 2022
a7d5e62
Bump github/codeql-action from 1.1.3 to 1.1.4 (#58)
dependabot[bot] Mar 8, 2022
a360f63
Remove FML dependency on geometry, tessellator (#59)
dnfield Mar 8, 2022
5d99bb9
Make Path::Polyline::GetContourPointBounds safe for OOB (#60)
dnfield Mar 8, 2022
40e6f0b
Add LICENSE file. (#61)
chinmaygarde Mar 8, 2022
63c925c
Move impeller::Comparable to //impeller/base. (#62)
chinmaygarde Mar 8, 2022
aac4baa
Add a script that checks that all source files have a valid license b…
chinmaygarde Mar 8, 2022
62ede22
Correct polyline bounds test (#64)
bdero Mar 8, 2022
cb6949c
Bump actions/upload-artifact from 2.3.1 to 3 (#54)
dependabot[bot] Mar 9, 2022
a02dd2e
Bump actions/checkout from 2.4.0 to 3 (#50)
dependabot[bot] Mar 9, 2022
42bea84
[tessellator]Expose and document smoothing approximation via the C/Da…
dnfield Mar 9, 2022
0b8e95c
Fix top-level build group to not include the compiler and fixup heade…
chinmaygarde Mar 9, 2022
5e12e7d
Hack to prevent back-to-back playground tests from hanging (#68)
bdero Mar 10, 2022
a91403f
Correct default blend mode, fix solid stroke shader to respect premul…
bdero Mar 10, 2022
ae818a6
Chainable texture filters (#67)
bdero Mar 10, 2022
6763e96
Document GN rules and make targets that cannot be built on the platfo…
chinmaygarde Mar 10, 2022
aabab0d
Fix diagnostic on iOS simulators. (#71)
chinmaygarde Mar 10, 2022
565cfdc
Only depend on FML for tracing when building executables. (#72)
chinmaygarde Mar 11, 2022
32705a1
Fix loop-range-construct warnings added in newer versions of Clang. (…
chinmaygarde Mar 14, 2022
121f454
Add remaining additive blends (#76)
bdero Mar 14, 2022
61c6d48
Fix issues with constexpr correctness. (#77)
chinmaygarde Mar 14, 2022
5d80431
Add case necessary on 32-bit arm builds. (#79)
chinmaygarde Mar 15, 2022
c89d49f
Use new DlColorSource objects (#73)
flar Mar 15, 2022
9559a00
update the linear gradient code to the new accessor names (#80)
flar Mar 15, 2022
6805309
Impelement DisplayListDispatcher::transformReset. (#82)
chinmaygarde Mar 16, 2022
7c16c5d
Don't use `Add[Thing]` operations when emulating Skia path components…
bdero Mar 16, 2022
c645362
Transform clips by the entity's transform (#87)
bdero Mar 17, 2022
65fc02e
Add blend filter support for advanced blends (#81)
bdero Mar 17, 2022
97a9ba7
Bump github/codeql-action from 1.1.4 to 1.1.5 (#83)
dependabot[bot] Mar 17, 2022
8510dff
Add directional + 2D gaussian blur (#84)
bdero Mar 17, 2022
19c47af
Add ClearContents to apply specified contents to the entire render ta…
chinmaygarde Mar 17, 2022
769306b
Add blend mode setting to Entity, Aiks paint, and the dispatcher (#89)
bdero Mar 17, 2022
477c9c1
Forward blend mode from the dispatchers drawColor call. (#90)
chinmaygarde Mar 17, 2022
5636562
Apply Aiks transforms in the canvas space, not world space (#91)
bdero Mar 19, 2022
f9c352b
Use new DlBlendMode object (#78)
JsouLiang Mar 19, 2022
b2447f6
switch dispatcher methods to new DlImageFilter objects (#92)
flar Mar 21, 2022
5a2cc44
Separate filters into different TUs (#93)
bdero Mar 22, 2022
7916cfb
Implement impeller::DisplayListDispatcher::drawTextBlob. (#94)
chinmaygarde Mar 22, 2022
370da62
Add support for instanced rendering and shader storage buffers. (#95)
chinmaygarde Mar 22, 2022
e943d0d
Use 8bpp glyph atlases. (#96)
chinmaygarde Mar 22, 2022
634fdc2
Draw all glyphs in a text run using a single draw call. (#97)
chinmaygarde Mar 23, 2022
e9df4f3
Batch all draw calls in the entire text frame. (#100)
chinmaygarde Mar 23, 2022
2ecb8e8
Make the filter DAG render all textures at the correct resolution (#99)
bdero Mar 24, 2022
e1dffc9
Render glyphs at the correct resolution with respect to the current t…
bdero Mar 25, 2022
2eaae68
Add difference clipping (#104)
bdero Mar 28, 2022
b00d7c6
Wire up stroke cap/join/miter limit display list ops (#105)
bdero Mar 28, 2022
4f28758
Premultiply gradient colors (#106)
bdero Mar 28, 2022
d33a9a0
Use display list images. (#102)
chinmaygarde Mar 29, 2022
6b6b3a4
Make filter inputs lazy and sharable (#103)
bdero Mar 30, 2022
4810c61
Implement drawArc (#109)
bdero Mar 30, 2022
2f2acb1
support new DlVertices object in dispatcher (#108)
flar Mar 30, 2022
e95ebb5
Bump github/codeql-action from 1.1.5 to 2.1.6 (#110)
dependabot[bot] Apr 1, 2022
5ba3e4e
Add blur styles to gaussian blur (#107)
bdero Apr 4, 2022
e4db675
Fix solid stroke contour switching + round cap smoothing, and add tra…
bdero Apr 5, 2022
ed720e8
Fix SaveLayer/entity subpass behavioral problems (#111)
bdero Apr 5, 2022
af7ab80
Wire up enhanced command buffer error reporting. (#113)
chinmaygarde Apr 5, 2022
6708397
Remove extra point from DrawRect; skip over duplicate contour points …
bdero Apr 5, 2022
2ff900b
Explicitly wait for subpass buffers to be scheduled. (#115)
chinmaygarde Apr 5, 2022
be9f4f7
Bump github/codeql-action from 2.1.6 to 2.1.7 (#116)
dependabot[bot] Apr 5, 2022
ac82d23
Add static thread safety analysis ready synchronization primitives. (…
chinmaygarde Apr 6, 2022
f732f90
Standardize around "coverage" terminology; make coverage optional eve…
bdero Apr 7, 2022
474ae88
Add explicit scaling methods for Point/Vector2 (#119)
bdero Apr 7, 2022
51e87dd
Ignore the stencil in the imgui pipeline (#120)
bdero Apr 7, 2022
479a609
Use the stencil buffer to avoid overdraw when rendering non-opaque so…
bdero Apr 7, 2022
38d7544
Remove base.h from base/BUILD (#122)
bdero Apr 7, 2022
2f5a290
Standardize around blur sigma<->radius conversion factor (#123)
bdero Apr 7, 2022
cdf4e84
No newline in depfile output, which seems to confuse ninja (#125)
dnfield Apr 8, 2022
0b278bc
Fix Path::GetBoundingBox crash for cubics with no local min/max (#126)
bdero Apr 9, 2022
78afffd
Add solid stroke coverage override (#127)
bdero Apr 9, 2022
5056cbd
Allow building targets that do not create metal shaders on all platfo…
dnfield Apr 13, 2022
56d7439
Move rendering TUs behind own flag (#134)
dnfield Apr 13, 2022
aa36cee
Build fixes for roll (#135)
dnfield Apr 13, 2022
21f8eb9
Remove extra premultiply from solid stroke/fill (#124)
bdero Apr 13, 2022
ac71ceb
Fix enum typedef for older mac SDKs (#136)
dnfield Apr 14, 2022
254db27
Filters: Replace Snapshot position with a full transform (#130)
bdero Apr 14, 2022
c34c0dc
Move static methods to anonymous namespace (#137)
dnfield Apr 14, 2022
ef93d06
Adds --sksl target to impellerc (#131)
zanderso Apr 14, 2022
f55545d
Bump github/codeql-action from 2.1.7 to 2.1.8 (#128)
dependabot[bot] Apr 14, 2022
aa4c256
Border mask blur (#132)
bdero Apr 14, 2022
8539052
Add impellerc options to compile OpenGL Desktop and ES variant shader…
chinmaygarde Apr 17, 2022
8306951
Compute text coverage; use blend mode in savelayer; conservative pass…
bdero Apr 18, 2022
1f45d87
Add an OpenGL ES stub and parameterize all playgrounds on rendering b…
chinmaygarde Apr 18, 2022
6463081
Fix subpass ordering (#143)
bdero Apr 19, 2022
862f6d0
Windows (#144)
dnfield Apr 20, 2022
191d3bf
Compile and package all shaders for the OpenGL ES backend. (#146)
chinmaygarde Apr 20, 2022
03e9a79
Implement mask blur in display list dispatcher (#142)
bdero Apr 20, 2022
bd80be6
Fix Mac compilation issue. (#147)
chinmaygarde Apr 20, 2022
397d0fa
Fix up build/test issues when building on or off of mac (#148)
dnfield Apr 20, 2022
528e68d
Filters: Add local transforms (#140)
bdero Apr 21, 2022
4a5c875
Fix minor mask blur issues (#149)
bdero Apr 21, 2022
68bd71e
Untie paths from entities (#145)
bdero Apr 21, 2022
73900c0
Bump actions/checkout from 3.0.0 to 3.0.2 (#151)
dependabot[bot] Apr 21, 2022
057e57d
Remove dependency on Dart, add crash handler to impellerc (#150)
dnfield Apr 22, 2022
615de63
Use New DlPathEffect Object (#98)
JsouLiang Apr 22, 2022
59f264c
implement drawDisplayList in impeller dispatcher (#153)
flar Apr 22, 2022
471ca0c
Revert "Use New DlPathEffect Object (#98)" (#154)
flar Apr 22, 2022
0586ecb
Separate FilterInput variants into their own TUs (#152)
bdero Apr 24, 2022
c720de5
Another coverage fix for border mask blur (#158)
bdero Apr 25, 2022
3c6e7a9
Make it an error for a stage input to take more than one slot. (#161)
chinmaygarde Apr 25, 2022
ecdbd5e
Avoid instancing/SSBOs for text to support GLES (#160)
dnfield Apr 25, 2022
63533c5
Set path for linear gradient contents; don't fail renders for failed …
bdero Apr 26, 2022
b790919
Check if sub_command_buffer is null before setting label (#163)
iskakaushik Apr 26, 2022
376f6a1
Merge remote-tracking branch 'impeller/main' into merge_impeller
dnfield Apr 26, 2022
9436240
format
dnfield Apr 26, 2022
d098586
Missing files
dnfield Apr 26, 2022
7621fb2
temporarily increase clang_tidy test limits
dnfield Apr 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,3 @@ app.*.symbols

# Prebuilt binaries.
/prebuilts/

# DEPS'd in impeller
/impeller/
3 changes: 0 additions & 3 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ allowed_hosts = [
deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '79aa4b0233325e6590dcd45a9af1526d9d2ad13b',

'src/flutter/impeller':
Var('github_git') + '/flutter/impeller' + '@' + '3fc18967345f5e4971259a9efabb11731b751df3',

# Fuchsia compatibility
#
# The dependencies in this section should match the layout in the Fuchsia gn
Expand Down
5 changes: 5 additions & 0 deletions impeller/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Defines the Chromium style for automatic reformatting.
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Chromium
Standard: c++17
EmptyLineBeforeAccessModifier: Always
24 changes: 24 additions & 0 deletions impeller/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-*,readability-identifier-naming,-google-explicit-constructor,cppcoreguidelines-prefer-member-initializer,modernize-use-default-member-init'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: none
CheckOptions:
- key: readability-identifier-naming.PrivateMemberCase
value: 'lower_case'
- key: readability-identifier-naming.EnumConstantCase
value: 'CamelCase'
- key: readability-identifier-naming.EnumConstantPrefix
value: 'k'
- key: readability-identifier-naming.PrivateMemberSuffix
value: '_'
- key: readability-identifier-naming.PublicMethodCase
value: 'CamelCase'
- key: readability-identifier-naming.PrivateMethodCase
value: 'CamelCase'
- key: cppcoreguidelines-prefer-member-initializer.UseAssignment
value: true
- key: modernize-use-default-member-init.UseAssignment
value: true
...
16 changes: 16 additions & 0 deletions impeller/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See Dependabot documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
reviewers:
- "hixie"
- "godofredoc"
labels:
- "team"
- "team: infra"
- "waiting for tree to go green"
53 changes: 53 additions & 0 deletions impeller/.github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Scorecards supply-chain security
on:
# Only the default branch is supported.
branch_protection_rule:
push:
branches: [ main ]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
actions: read
contents: read

steps:
- name: "Checkout code"
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@c1aec4ac820532bab364f02a81873c555a0ba3a1
with:
results_file: results.sarif
results_format: sarif
# Read-only PAT token. To create it,
# follow the steps in https://github.com/ossf/scorecard-action#pat-token-creation.
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
# Publish the results to enable scorecard badges. For more details, see
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`,
# regardless of the value entered here.
publish_results: true

# Upload the results as artifacts (optional).
- name: "Upload artifact"
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@1ed1437484560351c5be56cf73a48a279d116b78
with:
sarif_file: results.sarif
26 changes: 26 additions & 0 deletions impeller/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

# commonly generated files
*.pyc
*~
.*.sw?
.ccls-cache
.checkstyle
.clangd
.classpath
.cproject
.DS_Store
.gdb_history
.gdbinit
.idea
.ignore
.landmines
.packages
.project
.pub
.pydevproject
.vscode
compile_commands.json
cscope.*
Session.vim
tags
Thumbs.db
74 changes: 74 additions & 0 deletions impeller/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 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("tools/impeller.gni")

config("impeller_public_config") {
include_dirs = [ ".." ]

defines = []

if (impeller_supports_platform) {
defines += [ "IMPELLER_SUPPORTS_PLATFORM=1" ]
}

if (impeller_supports_rendering) {
defines += [ "IMPELLER_SUPPORTS_RENDERING=1" ]
}

if (is_win) {
defines += [
"_USE_MATH_DEFINES",

# TODO(dnfield): https://github.com/flutter/flutter/issues/50053
"_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING",
]
}
}

group("impeller") {
public_deps = [
"archivist",
"base",
"geometry",
"tessellator",
]

if (impeller_supports_rendering) {
public_deps += [
"aiks",
"display_list",
"entity",
"image",
"renderer",
"typographer",
]
}
}

executable("impeller_unittests") {
testonly = true

deps = [
"archivist:archivist_unittests",
"base:base_unittests",
"blobcat:blobcat_unittests",
"compiler:compiler_unittests",
"geometry:geometry_unittests",
"tessellator:tessellator_unittests",
]

if (impeller_supports_rendering) {
deps += [
"aiks:aiks_unittests",
"display_list:display_list_unittests",
"entity:entity_unittests",
"fixtures",
"image:image_unittests",
"playground",
"renderer:renderer_unittests",
"typographer:typographer_unittests",
]
}
}
151 changes: 151 additions & 0 deletions impeller/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
```
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
----------------- ___ _ _ --------------------
----------------- |_ _|_ __ ___ _ __ ___| | | ___ _ __ --------------------
----------------- | || '_ ` _ \| '_ \ / _ \ | |/ _ \ '__| --------------------
----------------- | || | | | | | |_) | __/ | | __/ | --------------------
----------------- |___|_| |_| |_| .__/ \___|_|_|\___|_| --------------------
----------------- |_| --------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
```

⚠️ Impeller is a Prototype and Work-In-Progress. Proceed with caution. ⚠️

Impeller is a rendering runtime for Flutter with the following objectives:

* **Predictable Performance**: All shader compilation and reflection is
performed offline at build time. All pipeline state objects are built upfront.
Caching is explicit and under the control of the engine.
* **Instrumentable**: All graphics resources (textures, buffers, pipeline state
objects, etc..) are tagged and labeled. Animations can be captured and
persisted to disk without affecting per-frame rendering performance.
* **Portable**: Not tied to a specific client rendering API. Shaders are
authored once and converted as necessary.
* **Uses Modern Graphics APIs Effectively**: Makes heavy use of (but doesn’t
depend on) features available in Modern APIs like Metal and Vulkan.
* **Makes Effective Use of Concurrency**: Can distribute single-frame workloads
across multiple threads if necessary.

## Project Organization

Impeller is a meta-framework. While a user of Impeller may choose to include the
whole enchilada (in `//impeller/:impeller`), the various sub-frameworks have
clearly defined responsibilities and adhere to a strict hierarchy.

Impeller itself may not depend on anything in `//flutter` except `//flutter/fml`
and `flutter/display_list`. FML is a base library for C++ projects and Impeller
implements the display list dispatcher interface to make it easy for Flutter to
swap the renderer with Impeller. Impeller is meant to be used by the Flow
(`//flutter/flow`) subsystem. Hence the name. The tessellator and geometry
libraries are exceptions - they unconditionally may not depend on anything from
`//flutter`.

An overview of the major sub-frameworks, their responsibilities, and, relative
states of completion:

* **`//impeller/compiler`**: The offline shader compiler. Takes GLSL 4.60 shader
source code and converts it into a backend specific shader representation
(like Metal Shading Language). It also generates C++ bindings that callers can
include as a GN `source_set`s so there is no runtime shader reflection either.
The target is an executable called `impellerc` which is never shipped into the
binary or as an artifact.
* **`//impeller/renderer`**: The very lowest level of the renderer that is still
backend agnostic. Allows users to build a renderer from scratch with few
restrictions. Has utilities for creating allocators, generating pipeline state
objects from bindings generated by `//impeller/compiler`, setting up render
passes, managing jumbo uniform-buffers, tessellators, etc..
* **`//impeller/renderer/backend`**: Contains all the implementation details
for a specific client rendering API. The interfaces in these targets are
meant to be private for non-WSI user targets. No Impeller sub-frameworks
may depend on these targets.
* **`//impeller/archivist`**: Allows persisting objects to disk as performantly
as possible (usually on a background thread). The framework is meant to be
used for storing frame meta-data and related profiling/instrumentation
information. Collection of information should succeed despite process crashes
and retrieval of traces must not use inordinate amounts of time or memory
(which usually leads to crashes).
* **`//impeller/geometry`**: All (or, most of) the math! This C++ mathematics
library is used extensively by Impeller and its clients. The reasonably
interesting bit about this library is that all types can be used
interchangeably in device and host memory. Various Impeller subsystems
understand these types and can take care of packing and alignment concerns
w.r.t these types.
* **`//impeller/playground`**: When working with graphics APIs, it is often
necessary to visually verify rendering results as a specific feature is being
worked upon. Moreover, it is useful to attach frame debuggers or profilers to
specific test cases. The playground framework provides Google Test fixtures
that open the current state of various rendering related objects in a window
in which rendering results can be visualized, or, to which frame debuggers can
be attached. Most Impeller sub-frameworks that have a test harness also have a
custom playground subclass. This sub-framework is only meant to provide
utilities for tests and will not be compiled into any shipping binary.
* **`//impeller/entity`:** Sits one level above `//impeller/renderer` and
provides a framework for building 2D renderers. Most of the pipeline state
objects generated from shaders authored at build time reside in this
framework. The render-pass optimization and pass-rewriting framework also
resides there. This allows authoring composable 2D rendering optimizations
(like collapsing passes, or, eliding them completely).
* **`//impeller/aiks`**: Aiks wraps `//impeller/entity` into an API that
resembles Skia. This makes it easy to mechanically replace Skia calls with
their Impeller counterparts even though the `//impeller/entity` framework API
is different from Skia. This presence of this sub-framework is probably
short-lived as integration of Impeller into Flutter should likely happen via a
custom Display List implementation in `//impeller/display_list`. The
roadblocks to this today are graphics package agnosticism in the Display List
interface.
* **`//impeller/display_list`**: The replacement for `//impeller/aiks` to serve
in the integration of Impeller in `//flutter/flow`. This is pending graphics
package agnosticism in the Impeller interface. This sub-framework primarily
provides a custom implementation of the `flutter::DisplayListDispatcher` that
forwards Flutter rendering intent to Impeller.
* **`//impeller/base`**: Contains C++ utilities that are used throughout the
Impeller family of frameworks. Ideally, these should go in `//flutter/fml` but
their use is probably not widespread enough to at this time.
* **`//impeller/image`**: The Impeller renderer works with textures whose memory
is resident in device memory. However, pending the migration of
`//flutter/display_list` to graphics package agnosticism and the subsequent
migration of the image decoders to work with the package agnostic types, there
needs to be a way for tests and such to decode compressed image data. This
sub-framework provides that functionality. This sub-framework is slated for
removal and must not be used outside of tests.
* **`//fixtures`**: Contains test fixtures used by the various test harnesses.
This depends on `//flutter/testing`.
* **`//tools`**: Contains all GN rules and python scripts for working with
Impeller. These include GN rules processing GLSL shaders, including reflected
shader information as source set targets, and, including compiled shader
intermediate representations into the final executable as binary blobs for
easier packaging.

## The Offline Shader Compilation Pipeline

* Shaders are authored once in GLSL 4.60. This choice of shading language is
consistent across all backends. Shader code resides in the Impeller source
tree like any other source file.
* At build time, the Impeller Shader Compiler (`impellerc`) converts the GLSL
into SPIRV. No optimizations are performed on the generated SPIRV at this
stage. This is to preserve all debugging and instrumentation information.
* Using the SPIRV, a backend specific transpiler converts the SPIRV to the
appropriate high-level shading language. This is controlled using flags to the
`impellerc`.
* All the files generated in the high-level shading language are compiled,
optimized, and linked into a single binary blob.
* The binary blob containing the compiled and optimized high-level shading
language is included as a hex dump (see `xxd.py`) into a C source file with a
generated GN target. Executable targets that want to include the compiled code
in their binaries just need to depend on the generated GN target. This eases
any shader packaging concerns.
* In parallel, the SPIRV is processed by a reflector. This produces C++
translation units that allow for the easy creation of pipeline state objects
at runtime. The headers for these translation units include any structs (with
appropriate padding and alignment) such that uniform data as well as vertex
information can be specified to the shader without having to deal with
bindings, vertex descriptors, etc.. This also makes iterating on shaders
easier as changes to the shader interface lead to compile time errors.
* The C++ translation units generated from reflected shader information are made
available to callers as a generated GN target that callers may use if
necessary. It is possible for callers to perform reflection at runtime but
there are no Impeller components that do this currently.

![Shader Compilation Pipeline](docs/shader_pipeline.png)
Loading