aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-07-03 17:43:57 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-07-03 17:55:17 +0200
commit49277f5c3f3bb5a9ce2ceeb3f02cd7638a8da1e7 (patch)
treee051984a9ae1d7c59a5e8d1941eae1aa6a7cf9a6
parentc19eb800de71bf06736781ca1cf9d57620d66f8d (diff)
downloadservo-49277f5c3f3bb5a9ce2ceeb3f02cd7638a8da1e7.tar.gz
servo-49277f5c3f3bb5a9ce2ceeb3f02cd7638a8da1e7.zip
Vendor the current version of WebRender
This is a step toward upgrading WebRender, which will be upgraded and patched in the `third_party` directory. This change vendors the current private branch of WebRender that we use and adds a `patches` directory which tracks the changes on top of the upstream WebRender commit described by third_party/webrender/patches/head.
-rw-r--r--Cargo.lock6
-rw-r--r--Cargo.toml10
-rw-r--r--components/canvas/Cargo.toml4
-rw-r--r--components/canvas_traits/Cargo.toml2
-rw-r--r--components/compositing/Cargo.toml4
-rw-r--r--components/constellation/Cargo.toml2
-rw-r--r--components/embedder_traits/Cargo.toml2
-rw-r--r--components/gfx/Cargo.toml2
-rw-r--r--components/gfx_traits/Cargo.toml2
-rw-r--r--components/layout/Cargo.toml2
-rw-r--r--components/layout_2020/Cargo.toml2
-rw-r--r--components/layout_thread/Cargo.toml2
-rw-r--r--components/layout_thread_2020/Cargo.toml2
-rw-r--r--components/layout_traits/Cargo.toml2
-rw-r--r--components/malloc_size_of/Cargo.toml2
-rw-r--r--components/media/Cargo.toml2
-rw-r--r--components/msg/Cargo.toml2
-rw-r--r--components/net/Cargo.toml2
-rw-r--r--components/script/Cargo.toml2
-rw-r--r--components/script_traits/Cargo.toml2
-rw-r--r--components/servo/Cargo.toml4
-rw-r--r--components/style_traits/Cargo.toml2
-rw-r--r--components/webgpu/Cargo.toml2
-rw-r--r--components/webrender_traits/Cargo.toml2
-rw-r--r--rustfmt.toml1
-rw-r--r--third_party/webrender/.gitignore27
-rw-r--r--third_party/webrender/.taskcluster.yml176
-rw-r--r--third_party/webrender/Cargo.lock2267
-rw-r--r--third_party/webrender/Cargo.toml25
-rw-r--r--third_party/webrender/LICENSE374
-rw-r--r--third_party/webrender/README.md53
-rw-r--r--third_party/webrender/ci-scripts/docker-image/Dockerfile12
-rwxr-xr-xthird_party/webrender/ci-scripts/docker-image/setup.sh37
-rwxr-xr-xthird_party/webrender/ci-scripts/linux-debug-tests.sh36
-rwxr-xr-xthird_party/webrender/ci-scripts/linux-release-tests.sh22
-rwxr-xr-xthird_party/webrender/ci-scripts/macos-debug-tests.sh42
-rwxr-xr-xthird_party/webrender/ci-scripts/macos-release-tests.sh29
-rw-r--r--third_party/webrender/ci-scripts/set-screenresolution.ps1124
-rwxr-xr-xthird_party/webrender/ci-scripts/windows-tests.cmd36
-rw-r--r--third_party/webrender/debugger/.babelrc6
-rw-r--r--third_party/webrender/debugger/.gitignore11
-rw-r--r--third_party/webrender/debugger/README.md23
-rw-r--r--third_party/webrender/debugger/dist/build.js13
-rw-r--r--third_party/webrender/debugger/dist/build.js.map1
-rw-r--r--third_party/webrender/debugger/index.html11
-rw-r--r--third_party/webrender/debugger/package-lock.json7606
-rw-r--r--third_party/webrender/debugger/package.json36
-rw-r--r--third_party/webrender/debugger/src/App.vue55
-rw-r--r--third_party/webrender/debugger/src/components/ClipScrollTreeViewPage.vue37
-rw-r--r--third_party/webrender/debugger/src/components/DocumentViewPage.vue37
-rw-r--r--third_party/webrender/debugger/src/components/NavBar.vue41
-rw-r--r--third_party/webrender/debugger/src/components/NavMenu.vue33
-rw-r--r--third_party/webrender/debugger/src/components/OptionsPage.vue162
-rw-r--r--third_party/webrender/debugger/src/components/PassViewPage.vue37
-rw-r--r--third_party/webrender/debugger/src/components/RenderTaskViewPage.vue37
-rw-r--r--third_party/webrender/debugger/src/components/ScreenshotPage.vue32
-rw-r--r--third_party/webrender/debugger/src/components/TreeView.vue40
-rw-r--r--third_party/webrender/debugger/src/main.js14
-rw-r--r--third_party/webrender/debugger/src/store/index.js105
-rw-r--r--third_party/webrender/debugger/webpack.config.js81
-rw-r--r--third_party/webrender/direct-composition/Cargo.toml14
-rw-r--r--third_party/webrender/direct-composition/src/com.rs112
-rw-r--r--third_party/webrender/direct-composition/src/egl.rs174
-rw-r--r--third_party/webrender/direct-composition/src/lib.rs179
-rw-r--r--third_party/webrender/direct-composition/src/main.rs11
-rw-r--r--third_party/webrender/direct-composition/src/main_windows.rs212
-rw-r--r--third_party/webrender/example-compositor/compositor-windows/Cargo.toml9
-rw-r--r--third_party/webrender/example-compositor/compositor-windows/build.rs25
-rw-r--r--third_party/webrender/example-compositor/compositor-windows/src/lib.cpp802
-rw-r--r--third_party/webrender/example-compositor/compositor-windows/src/lib.rs261
-rw-r--r--third_party/webrender/example-compositor/compositor/Cargo.toml13
-rw-r--r--third_party/webrender/example-compositor/compositor/src/main.rs484
-rw-r--r--third_party/webrender/examples/Cargo.toml71
-rw-r--r--third_party/webrender/examples/README.md8
-rw-r--r--third_party/webrender/examples/alpha_perf.rs93
-rw-r--r--third_party/webrender/examples/animation.rs219
-rw-r--r--third_party/webrender/examples/basic.rs321
-rw-r--r--third_party/webrender/examples/blob.rs289
-rw-r--r--third_party/webrender/examples/common/boilerplate.rs338
-rw-r--r--third_party/webrender/examples/common/image_helper.rs19
-rw-r--r--third_party/webrender/examples/document.rs149
-rw-r--r--third_party/webrender/examples/frame_output.rs238
-rw-r--r--third_party/webrender/examples/iframe.rs95
-rw-r--r--third_party/webrender/examples/image_resize.rs121
-rw-r--r--third_party/webrender/examples/multiwindow.rs326
-rw-r--r--third_party/webrender/examples/scrolling.rs231
-rw-r--r--third_party/webrender/examples/texture_cache_stress.rs322
-rw-r--r--third_party/webrender/examples/yuv.rs226
-rw-r--r--third_party/webrender/glsl-to-cxx/Cargo.toml11
-rw-r--r--third_party/webrender/glsl-to-cxx/README.md3
-rw-r--r--third_party/webrender/glsl-to-cxx/src/hir.rs3856
-rw-r--r--third_party/webrender/glsl-to-cxx/src/lib.rs3706
-rw-r--r--third_party/webrender/glsl-to-cxx/src/main.rs8
-rw-r--r--third_party/webrender/patches/0001-Add-signal-handler-to-catch-segfault-in-build-script.patch226
-rw-r--r--third_party/webrender/patches/0002-Bug-1646741-Update-gleam-to-0.12.-r-kvark.patch174
-rw-r--r--third_party/webrender/patches/0003-Bug-1651889.-Update-to-gleam-0.12.1.-r-kvark.patch107
-rw-r--r--third_party/webrender/patches/0004-Bug-1654699.-Update-core-foundation-core-graphics.-r.patch328
-rw-r--r--third_party/webrender/patches/0005-Bug-1656236-Update-to-euclid-0.22.-r-kvark.patch9059
-rw-r--r--third_party/webrender/patches/0006-Bump-procedural-masquerade-to-0.1.7.patch53
-rw-r--r--third_party/webrender/patches/head1
-rw-r--r--third_party/webrender/patches/series6
-rw-r--r--third_party/webrender/peek-poke/Cargo.toml17
-rw-r--r--third_party/webrender/peek-poke/LICENSE-APACHE201
-rw-r--r--third_party/webrender/peek-poke/LICENSE-MIT44
-rw-r--r--third_party/webrender/peek-poke/README.md54
-rw-r--r--third_party/webrender/peek-poke/peek-poke-derive/Cargo.toml19
-rw-r--r--third_party/webrender/peek-poke/peek-poke-derive/LICENSE-APACHE201
-rw-r--r--third_party/webrender/peek-poke/peek-poke-derive/LICENSE-MIT44
-rw-r--r--third_party/webrender/peek-poke/peek-poke-derive/README.md54
-rw-r--r--third_party/webrender/peek-poke/peek-poke-derive/src/lib.rs266
-rw-r--r--third_party/webrender/peek-poke/src/euclid.rs170
-rw-r--r--third_party/webrender/peek-poke/src/lib.rs427
-rw-r--r--third_party/webrender/peek-poke/src/slice_ext.rs19
-rw-r--r--third_party/webrender/peek-poke/src/vec_ext.rs26
-rw-r--r--third_party/webrender/peek-poke/tests/max_size.rs117
-rw-r--r--third_party/webrender/peek-poke/tests/round_trip.rs275
-rw-r--r--third_party/webrender/rustfmt.toml6
-rw-r--r--third_party/webrender/servo-tidy.toml39
-rw-r--r--third_party/webrender/swgl/Cargo.toml15
-rw-r--r--third_party/webrender/swgl/README.md4
-rw-r--r--third_party/webrender/swgl/build.rs150
-rw-r--r--third_party/webrender/swgl/src/gl.cc4015
-rw-r--r--third_party/webrender/swgl/src/gl_defs.h176
-rw-r--r--third_party/webrender/swgl/src/glsl.h3240
-rw-r--r--third_party/webrender/swgl/src/lib.rs12
-rw-r--r--third_party/webrender/swgl/src/program.h164
-rw-r--r--third_party/webrender/swgl/src/swgl_fns.rs2253
-rw-r--r--third_party/webrender/swgl/src/texture.h127
-rw-r--r--third_party/webrender/swgl/src/vector_type.h478
-rw-r--r--third_party/webrender/tileview/Cargo.toml15
-rw-r--r--third_party/webrender/tileview/src/main.rs721
-rw-r--r--third_party/webrender/tileview/src/tilecache.js187
-rw-r--r--third_party/webrender/tileview/src/tilecache_base.css109
-rw-r--r--third_party/webrender/webrender/Cargo.toml77
-rw-r--r--third_party/webrender/webrender/backtrace.rs103
-rw-r--r--third_party/webrender/webrender/build.rs317
-rw-r--r--third_party/webrender/webrender/doc/CLIPPING_AND_POSITIONING.md150
-rw-r--r--third_party/webrender/webrender/doc/blob.md43
-rw-r--r--third_party/webrender/webrender/doc/swizzling.md31
-rw-r--r--third_party/webrender/webrender/doc/text-rendering.md720
-rw-r--r--third_party/webrender/webrender/res/Proggy.ttfbin0 -> 5284 bytes
-rw-r--r--third_party/webrender/webrender/res/area-lut.tgabin0 -> 65580 bytes
-rw-r--r--third_party/webrender/webrender/res/base.glsl53
-rw-r--r--third_party/webrender/webrender/res/brush.glsl317
-rw-r--r--third_party/webrender/webrender/res/brush_blend.glsl335
-rw-r--r--third_party/webrender/webrender/res/brush_conic_gradient.glsl147
-rw-r--r--third_party/webrender/webrender/res/brush_image.glsl346
-rw-r--r--third_party/webrender/webrender/res/brush_linear_gradient.glsl137
-rw-r--r--third_party/webrender/webrender/res/brush_mix_blend.glsl302
-rw-r--r--third_party/webrender/webrender/res/brush_multi.glsl296
-rw-r--r--third_party/webrender/webrender/res/brush_opacity.glsl91
-rw-r--r--third_party/webrender/webrender/res/brush_radial_gradient.glsl176
-rw-r--r--third_party/webrender/webrender/res/brush_solid.frag.h15
-rw-r--r--third_party/webrender/webrender/res/brush_solid.glsl65
-rw-r--r--third_party/webrender/webrender/res/brush_yuv_image.glsl113
-rw-r--r--third_party/webrender/webrender/res/clip_shared.glsl97
-rw-r--r--third_party/webrender/webrender/res/composite.glsl144
-rw-r--r--third_party/webrender/webrender/res/cs_blur.glsl164
-rw-r--r--third_party/webrender/webrender/res/cs_border_segment.glsl453
-rw-r--r--third_party/webrender/webrender/res/cs_border_solid.glsl176
-rw-r--r--third_party/webrender/webrender/res/cs_clip_box_shadow.glsl121
-rw-r--r--third_party/webrender/webrender/res/cs_clip_image.glsl73
-rw-r--r--third_party/webrender/webrender/res/cs_clip_rectangle.glsl158
-rw-r--r--third_party/webrender/webrender/res/cs_gradient.glsl56
-rw-r--r--third_party/webrender/webrender/res/cs_line_decoration.glsl163
-rw-r--r--third_party/webrender/webrender/res/cs_scale.glsl40
-rw-r--r--third_party/webrender/webrender/res/cs_svg_filter.glsl591
-rw-r--r--third_party/webrender/webrender/res/debug_color.glsl24
-rw-r--r--third_party/webrender/webrender/res/debug_font.glsl28
-rw-r--r--third_party/webrender/webrender/res/ellipse.glsl93
-rw-r--r--third_party/webrender/webrender/res/gpu_cache.glsl138
-rw-r--r--third_party/webrender/webrender/res/gpu_cache_update.glsl27
-rw-r--r--third_party/webrender/webrender/res/pf_vector_cover.glsl77
-rw-r--r--third_party/webrender/webrender/res/pf_vector_stencil.glsl111
-rw-r--r--third_party/webrender/webrender/res/pls_init.glsl27
-rw-r--r--third_party/webrender/webrender/res/pls_resolve.glsl29
-rw-r--r--third_party/webrender/webrender/res/prim_shared.glsl320
-rw-r--r--third_party/webrender/webrender/res/ps_clear.glsl25
-rw-r--r--third_party/webrender/webrender/res/ps_split_composite.glsl118
-rw-r--r--third_party/webrender/webrender/res/ps_text_run.glsl335
-rw-r--r--third_party/webrender/webrender/res/rect.glsl42
-rw-r--r--third_party/webrender/webrender/res/render_task.glsl118
-rw-r--r--third_party/webrender/webrender/res/shared.glsl241
-rw-r--r--third_party/webrender/webrender/res/shared_other.glsl33
-rw-r--r--third_party/webrender/webrender/res/transform.glsl124
-rw-r--r--third_party/webrender/webrender/res/yuv.glsl156
-rw-r--r--third_party/webrender/webrender/src/batch.rs3439
-rw-r--r--third_party/webrender/webrender/src/border.rs1491
-rw-r--r--third_party/webrender/webrender/src/box_shadow.rs277
-rw-r--r--third_party/webrender/webrender/src/capture.rs290
-rw-r--r--third_party/webrender/webrender/src/clip.rs1953
-rw-r--r--third_party/webrender/webrender/src/composite.rs1007
-rw-r--r--third_party/webrender/webrender/src/debug_colors.rs159
-rw-r--r--third_party/webrender/webrender/src/debug_font_data.rs1914
-rw-r--r--third_party/webrender/webrender/src/debug_render.rs389
-rw-r--r--third_party/webrender/webrender/src/debug_server.rs402
-rw-r--r--third_party/webrender/webrender/src/device/gl.rs4046
-rw-r--r--third_party/webrender/webrender/src/device/mod.rs9
-rw-r--r--third_party/webrender/webrender/src/device/query_gl.rs325
-rw-r--r--third_party/webrender/webrender/src/ellipse.rs187
-rw-r--r--third_party/webrender/webrender/src/filterdata.rs214
-rw-r--r--third_party/webrender/webrender/src/frame_builder.rs1097
-rw-r--r--third_party/webrender/webrender/src/freelist.rs263
-rw-r--r--third_party/webrender/webrender/src/gamma_lut.rs414
-rw-r--r--third_party/webrender/webrender/src/glyph_cache.rs284
-rw-r--r--third_party/webrender/webrender/src/glyph_rasterizer/mod.rs1193
-rw-r--r--third_party/webrender/webrender/src/gpu_cache.rs924
-rw-r--r--third_party/webrender/webrender/src/gpu_types.rs832
-rw-r--r--third_party/webrender/webrender/src/hit_test.rs620
-rw-r--r--third_party/webrender/webrender/src/intern.rs377
-rw-r--r--third_party/webrender/webrender/src/internal_types.rs602
-rw-r--r--third_party/webrender/webrender/src/lib.rs226
-rw-r--r--third_party/webrender/webrender/src/lru_cache.rs675
-rw-r--r--third_party/webrender/webrender/src/picture.rs7185
-rw-r--r--third_party/webrender/webrender/src/platform/macos/font.rs854
-rw-r--r--third_party/webrender/webrender/src/platform/unix/font.rs1038
-rw-r--r--third_party/webrender/webrender/src/platform/windows/font.rs603
-rw-r--r--third_party/webrender/webrender/src/prim_store/backdrop.rs97
-rw-r--r--third_party/webrender/webrender/src/prim_store/borders.rs368
-rw-r--r--third_party/webrender/webrender/src/prim_store/gradient.rs1007
-rw-r--r--third_party/webrender/webrender/src/prim_store/image.rs511
-rw-r--r--third_party/webrender/webrender/src/prim_store/interned.rs14
-rw-r--r--third_party/webrender/webrender/src/prim_store/line_dec.rs183
-rw-r--r--third_party/webrender/webrender/src/prim_store/mod.rs4529
-rw-r--r--third_party/webrender/webrender/src/prim_store/picture.rs319
-rw-r--r--third_party/webrender/webrender/src/prim_store/text_run.rs444
-rw-r--r--third_party/webrender/webrender/src/print_tree.rs105
-rw-r--r--third_party/webrender/webrender/src/profiler.rs1901
-rw-r--r--third_party/webrender/webrender/src/render_backend.rs2009
-rw-r--r--third_party/webrender/webrender/src/render_target.rs1091
-rw-r--r--third_party/webrender/webrender/src/render_task.rs1564
-rw-r--r--third_party/webrender/webrender/src/render_task_cache.rs267
-rw-r--r--third_party/webrender/webrender/src/render_task_graph.rs887
-rw-r--r--third_party/webrender/webrender/src/renderer.rs7671
-rw-r--r--third_party/webrender/webrender/src/resource_cache.rs1829
-rw-r--r--third_party/webrender/webrender/src/scene.rs354
-rw-r--r--third_party/webrender/webrender/src/scene_builder_thread.rs911
-rw-r--r--third_party/webrender/webrender/src/scene_building.rs4090
-rw-r--r--third_party/webrender/webrender/src/screen_capture.rs493
-rw-r--r--third_party/webrender/webrender/src/segment.rs1326
-rw-r--r--third_party/webrender/webrender/src/shade.rs1189
-rw-r--r--third_party/webrender/webrender/src/spatial_node.rs959
-rw-r--r--third_party/webrender/webrender/src/spatial_tree.rs965
-rw-r--r--third_party/webrender/webrender/src/storage.rs134
-rw-r--r--third_party/webrender/webrender/src/texture_allocator.rs270
-rw-r--r--third_party/webrender/webrender/src/texture_cache.rs1782
-rw-r--r--third_party/webrender/webrender/src/util.rs1221
-rw-r--r--third_party/webrender/webrender/tests/angle_shader_validation.rs62
-rw-r--r--third_party/webrender/webrender/tests/bug_124.html5
-rw-r--r--third_party/webrender/webrender/tests/bug_134.html29
-rw-r--r--third_party/webrender/webrender/tests/bug_137.html25
-rw-r--r--third_party/webrender/webrender/tests/bug_143.html11
-rw-r--r--third_party/webrender/webrender/tests/bug_159.html2
-rw-r--r--third_party/webrender/webrender/tests/bug_166.html10
-rw-r--r--third_party/webrender/webrender/tests/bug_176.html1
-rw-r--r--third_party/webrender/webrender/tests/bug_177.html23
-rw-r--r--third_party/webrender/webrender/tests/bug_178.html24
-rw-r--r--third_party/webrender/webrender/tests/bug_203a.html13
-rw-r--r--third_party/webrender/webrender/tests/bug_203b.html14
-rw-r--r--third_party/webrender/webrender/tests/bug_servo_10136.html11
-rw-r--r--third_party/webrender/webrender/tests/bug_servo_10164.html19
-rw-r--r--third_party/webrender/webrender/tests/bug_servo_10307.html12
-rw-r--r--third_party/webrender/webrender/tests/bug_servo_11358.html12
-rw-r--r--third_party/webrender/webrender/tests/bug_servo_9983a.html17
-rw-r--r--third_party/webrender/webrender/tests/color_pattern_1.pngbin0 -> 1693 bytes
-rw-r--r--third_party/webrender/webrender/tests/color_pattern_2.pngbin0 -> 49144 bytes
-rw-r--r--third_party/webrender/webrender/tests/fixed-position.html62
-rw-r--r--third_party/webrender/webrender/tests/mix-blend-mode-2.html85
-rw-r--r--third_party/webrender/webrender/tests/mix-blend-mode.html47
-rw-r--r--third_party/webrender/webrender/tests/nav-1.html15
-rw-r--r--third_party/webrender/webrender/tests/nav-2.html15
-rw-r--r--third_party/webrender/webrender_api/Cargo.toml32
-rw-r--r--third_party/webrender/webrender_api/src/api.rs2123
-rw-r--r--third_party/webrender/webrender_api/src/channel.rs131
-rw-r--r--third_party/webrender/webrender_api/src/color.rs160
-rw-r--r--third_party/webrender/webrender_api/src/display_item.rs1589
-rw-r--r--third_party/webrender/webrender_api/src/display_item_cache.rs115
-rw-r--r--third_party/webrender/webrender_api/src/display_list.rs1969
-rw-r--r--third_party/webrender/webrender_api/src/font.rs604
-rw-r--r--third_party/webrender/webrender_api/src/gradient_builder.rs178
-rw-r--r--third_party/webrender/webrender_api/src/image.rs595
-rw-r--r--third_party/webrender/webrender_api/src/image_tiling.rs815
-rw-r--r--third_party/webrender/webrender_api/src/lib.rs64
-rw-r--r--third_party/webrender/webrender_api/src/resources.rs327
-rw-r--r--third_party/webrender/webrender_api/src/units.rs324
-rw-r--r--third_party/webrender/webrender_build/Cargo.toml16
-rw-r--r--third_party/webrender/webrender_build/src/lib.rs19
-rw-r--r--third_party/webrender/webrender_build/src/shader.rs222
-rw-r--r--third_party/webrender/webrender_build/src/shader_features.rs152
-rw-r--r--third_party/webrender/wr_malloc_size_of/Cargo.toml14
-rw-r--r--third_party/webrender/wr_malloc_size_of/LICENSE-APACHE201
-rw-r--r--third_party/webrender/wr_malloc_size_of/LICENSE-MIT23
-rw-r--r--third_party/webrender/wr_malloc_size_of/lib.rs435
-rw-r--r--third_party/webrender/wrench/.gitignore7
-rw-r--r--third_party/webrender/wrench/Cargo.toml73
-rw-r--r--third_party/webrender/wrench/README.md35
-rw-r--r--third_party/webrender/wrench/android.txt93
-rw-r--r--third_party/webrender/wrench/benchmarks/aligned-gradient.yaml62
-rw-r--r--third_party/webrender/wrench/benchmarks/benchmarks.list11
-rw-r--r--third_party/webrender/wrench/benchmarks/box-shadow-large.yaml17
-rw-r--r--third_party/webrender/wrench/benchmarks/clip-clear.yaml48
-rw-r--r--third_party/webrender/wrench/benchmarks/large-blur-radius.yaml10
-rw-r--r--third_party/webrender/wrench/benchmarks/large-boxshadow-ellipse-2.yaml15
-rw-r--r--third_party/webrender/wrench/benchmarks/large-boxshadow-ellipse.yaml15
-rw-r--r--third_party/webrender/wrench/benchmarks/large-clip-rect.yaml33
-rw-r--r--third_party/webrender/wrench/benchmarks/many-box-shadows.yaml125
-rw-r--r--third_party/webrender/wrench/benchmarks/many-images.yaml16386
-rw-r--r--third_party/webrender/wrench/benchmarks/overlapping-text-shadows.yaml807
-rw-r--r--third_party/webrender/wrench/benchmarks/radial-gradient.yaml52
-rw-r--r--third_party/webrender/wrench/benchmarks/simple-batching.yaml45
-rw-r--r--third_party/webrender/wrench/benchmarks/text-rendering.yaml260
-rw-r--r--third_party/webrender/wrench/benchmarks/transforms-simple.yaml44
-rw-r--r--third_party/webrender/wrench/benchmarks/unaligned-gradient.yaml62
-rw-r--r--third_party/webrender/wrench/build.rs28
-rw-r--r--third_party/webrender/wrench/examples/animated.anim13
-rw-r--r--third_party/webrender/wrench/examples/animated.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/aa/aa-dist-bug-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/aa/aa-dist-bug.yaml43
-rw-r--r--third_party/webrender/wrench/reftests/aa/fractional-radii-ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/aa/fractional-radii.yaml42
-rw-r--r--third_party/webrender/wrench/reftests/aa/reftest.list3
-rw-r--r--third_party/webrender/wrench/reftests/aa/rounded-rects-ref.pngbin0 -> 10881 bytes
-rw-r--r--third_party/webrender/wrench/reftests/aa/rounded-rects.yaml41
-rw-r--r--third_party/webrender/wrench/reftests/backface/backface-3d-leaf.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/backface/backface-both-sides-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/backface/backface-both-sides.yaml25
-rw-r--r--third_party/webrender/wrench/reftests/backface/backface-double-flip.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/backface/backface-hidden.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/backface/backface-leaf-ref.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/backface/backface-leaf.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/backface/backface-picture-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/backface/backface-picture.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/backface/backface-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/backface/backface-sc.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/backface/blank.yaml2
-rw-r--r--third_party/webrender/wrench/reftests/backface/reftest.list7
-rw-r--r--third_party/webrender/wrench/reftests/blend/blank.yaml2
-rw-r--r--third_party/webrender/wrench/reftests/blend/darken-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/blend/darken.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/blend/difference-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/blend/difference-transparent-ref.yaml23
-rw-r--r--third_party/webrender/wrench/reftests/blend/difference-transparent.yaml22
-rw-r--r--third_party/webrender/wrench/reftests/blend/difference.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/blend/isolated-2-ref.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/blend/isolated-2.yaml25
-rw-r--r--third_party/webrender/wrench/reftests/blend/isolated-premultiplied-2-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/blend/isolated-premultiplied-2.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/blend/isolated-premultiplied.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/blend/isolated-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/blend/isolated-with-filter.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/blend/isolated.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/blend/large-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/blend/large.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/blend/lighten-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/blend/lighten.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/blend/multi-mix-blend-mode-ref.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/blend/multi-mix-blend-mode.yaml25
-rw-r--r--third_party/webrender/wrench/reftests/blend/multiply-2-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/blend/multiply-2.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/blend/multiply-3.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/blend/multiply-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/blend/multiply.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/blend/reftest.list24
-rw-r--r--third_party/webrender/wrench/reftests/blend/repeated-difference-ref.yaml7
-rw-r--r--third_party/webrender/wrench/reftests/blend/repeated-difference.yaml31
-rw-r--r--third_party/webrender/wrench/reftests/blend/transparent-composite-1-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/blend/transparent-composite-1.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/blend/transparent-composite-2-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/blend/transparent-composite-2.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/blend/transparent-white.pngbin0 -> 303 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/blank.yaml3
-rw-r--r--third_party/webrender/wrench/reftests/border/border-clamp-corner-radius.pngbin0 -> 12198 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-clamp-corner-radius.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/border/border-dashed-dotted-caching.pngbin0 -> 6863 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-dashed-dotted-caching.yaml76
-rw-r--r--third_party/webrender/wrench/reftests/border/border-double-1px-ref.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/border/border-double-1px.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/border/border-double-simple-2-ref.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/border-double-simple-2.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/border-double-simple-ref.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/border/border-double-simple.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/border-gradient-nine-patch.pngbin0 -> 1051 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-gradient-nine-patch.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/border-gradient-simple-ref.yaml55
-rw-r--r--third_party/webrender/wrench/reftests/border/border-gradient-simple.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/border/border-groove-simple-ref.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/border/border-groove-simple.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/border-image-crash-ref.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/border/border-image-crash.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/border/border-image-empty-slice-ref.pngbin0 -> 16010 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-image-empty-slice.yaml50
-rw-r--r--third_party/webrender/wrench/reftests/border/border-image-fill-ref.pngbin0 -> 28383 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-image-fill.yaml54
-rw-r--r--third_party/webrender/wrench/reftests/border/border-image-ref.pngbin0 -> 4044 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-image-round-ref.pngbin0 -> 20108 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-image-round.yaml42
-rw-r--r--third_party/webrender/wrench/reftests/border/border-image-src.pngbin0 -> 1247 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-image.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/border/border-invisible-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/border/border-invisible.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/border/border-no-bogus-line-ref.pngbin0 -> 2253 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-no-bogus-line.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/border/border-none-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/border/border-none.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/border-overlapping-corner-ref.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/border/border-overlapping-corner.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/border/border-overlapping-edge-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/border/border-overlapping-edge.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/border-radial-gradient-nine-patch.pngbin0 -> 977 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-radial-gradient-nine-patch.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/border-radial-gradient-simple-ref.yaml54
-rw-r--r--third_party/webrender/wrench/reftests/border/border-radial-gradient-simple.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/border/border-radii.pngbin0 -> 1130 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-radii.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/border/border-ridge-simple-ref.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/border/border-ridge-simple.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/border-suite-2.pngbin0 -> 48919 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-suite-2.yaml171
-rw-r--r--third_party/webrender/wrench/reftests/border/border-suite-3.pngbin0 -> 26021 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-suite-3.yaml57
-rw-r--r--third_party/webrender/wrench/reftests/border/border-suite.pngbin0 -> 64147 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/border-suite.yaml351
-rw-r--r--third_party/webrender/wrench/reftests/border/degenerate-curve.pngbin0 -> 20581 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/degenerate-curve.yaml258
-rw-r--r--third_party/webrender/wrench/reftests/border/discontinued-dash.pngbin0 -> 1915 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/discontinued-dash.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/dotted-corner-small-radius.pngbin0 -> 8724 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/dotted-corner-small-radius.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/border/green-square.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/border/max-scale-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/border/max-scale.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/no-aa.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/border/overlapping.pngbin0 -> 4096 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/overlapping.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/border/reftest.list34
-rw-r--r--third_party/webrender/wrench/reftests/border/small-dotted-border.pngbin0 -> 1556 bytes
-rw-r--r--third_party/webrender/wrench/reftests/border/small-dotted-border.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/border/small-inset-outset-notref.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/small-inset-outset.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/border/zero-width.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/blank.yaml2
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii-ref.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-border-radii.pngbin0 -> 12336 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-border-radii.yaml36
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-cache.pngbin0 -> 35970 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-cache.yaml98
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-clip-ref.yaml40
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-clip.yaml32
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-empty.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-huge-radius.pngbin0 -> 16290 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-huge-radius.yaml128
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.pngbin0 -> 151753 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.pngbin0 -> 60187 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread-radii-ref.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread-radii.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread.pngbin0 -> 7471 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread.yaml68
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.pngbin0 -> 16139 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.pngbin0 -> 6245 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-blur.pngbin0 -> 86569 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-blur.yaml154
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-no-blur.pngbin0 -> 21181 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-no-blur.yaml134
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/boxshadow-spread-only-ref.pngbin0 -> 19279 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/boxshadow-spread-only.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-alpha.pngbin0 -> 1670 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-alpha.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-border-radius-ref.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-border-radius.pngbin0 -> 3711 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-border-radius.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-downscale.pngbin0 -> 13809 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-downscale.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-empty.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-large-offset-ref.pngbin0 -> 2472 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-large-offset.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-mask-region.pngbin0 -> 23384 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-mask-region.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-neg-offset.pngbin0 -> 3607 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-neg-offset.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-no-blur-radius-ref.pngbin0 -> 674 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-no-blur-radius.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-offset.pngbin0 -> 3500 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-offset.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-simple-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-simple.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-spread-large-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-spread-large.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-spread-ref.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-spread.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-subpx.pngbin0 -> 1810 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/inset-subpx.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/invalid-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/invalid.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/no-stretch.pngbin0 -> 3957 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/no-stretch.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/overlap1.pngbin0 -> 11085 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/overlap1.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/overlap2.pngbin0 -> 8490 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/overlap2.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/reftest.list37
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/rounding-ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/rounding.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/scale.pngbin0 -> 13527 bytes
-rw-r--r--third_party/webrender/wrench/reftests/boxshadow/scale.yaml183
-rw-r--r--third_party/webrender/wrench/reftests/clip/blank.yaml2
-rw-r--r--third_party/webrender/wrench/reftests/clip/border-with-rounded-clip.pngbin0 -> 1900 bytes
-rw-r--r--third_party/webrender/wrench/reftests/clip/border-with-rounded-clip.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-3d-transform-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-3d-transform.yaml30
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-45-degree-rotation-ref.pngbin0 -> 13358 bytes
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-45-degree-rotation.yaml32
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-and-filter-with-rotation-ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-and-filter-with-rotation.yaml35
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-corner-overlap-ref.yaml113
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-corner-overlap.yaml61
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-ellipse.pngbin0 -> 9486 bytes
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-ellipse.yaml63
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-empty-inner-rect-ref.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-empty-inner-rect.yaml28
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-mode.pngbin0 -> 2740 bytes
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-mode.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-out-rotation.yaml41
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-thin-rotated-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/clip/clip-thin-rotated.yaml41
-rw-r--r--third_party/webrender/wrench/reftests/clip/clipped-occlusion-ref.yaml7
-rw-r--r--third_party/webrender/wrench/reftests/clip/clipped-occlusion.yaml23
-rw-r--r--third_party/webrender/wrench/reftests/clip/custom-clip-chain-node-ancestors-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/clip/custom-clip-chain-node-ancestors.yaml32
-rw-r--r--third_party/webrender/wrench/reftests/clip/custom-clip-chains-ref.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/clip/custom-clip-chains.yaml62
-rw-r--r--third_party/webrender/wrench/reftests/clip/fixed-position-clipping-ref.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/clip/fixed-position-clipping.yaml49
-rw-r--r--third_party/webrender/wrench/reftests/clip/iframe-nested-in-stacking-context-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/clip/iframe-nested-in-stacking-context.yaml23
-rw-r--r--third_party/webrender/wrench/reftests/clip/reftest.list18
-rw-r--r--third_party/webrender/wrench/reftests/clip/segmentation-across-rotation-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/clip/segmentation-across-rotation.yaml30
-rw-r--r--third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.pngbin0 -> 763 bytes
-rw-r--r--third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.yaml47
-rw-r--r--third_party/webrender/wrench/reftests/clip/snapping-ref.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/clip/snapping.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/clip/stacking-context-clip-ref.yaml32
-rw-r--r--third_party/webrender/wrench/reftests/clip/stacking-context-clip.yaml36
-rw-r--r--third_party/webrender/wrench/reftests/filters/backdrop-filter-basic-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/filters/backdrop-filter-basic.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/filters/backdrop-filter-perspective.pngbin0 -> 60142 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/backdrop-filter-perspective.yaml28
-rw-r--r--third_party/webrender/wrench/reftests/filters/blank.yaml2
-rw-r--r--third_party/webrender/wrench/reftests/filters/blend-clipped.pngbin0 -> 2102 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/blend-clipped.yaml105
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-blur-clamping-ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-blur-clamping.yaml30
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-blur-huge.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-blur-scaled-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-blur-scaled-xonly.pngbin0 -> 3214 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-blur-scaled-xonly.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-blur-scaled.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-blur.pngbin0 -> 58574 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-blur.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-brightness-2-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-brightness-2.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-brightness-3-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-brightness-3.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-brightness-4-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-brightness-4.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-brightness-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-brightness.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-color-matrix-ref.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-color-matrix.yaml53
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-component-transfer-ref.yaml51
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-component-transfer.yaml352
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-contrast-gray-alpha-1-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-contrast-gray-alpha-1.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-blur-clamping-ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-blur-clamping.yaml30
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-2.pngbin0 -> 3115 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-3.pngbin0 -> 37433 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml37
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip.pngbin0 -> 12738 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip.yaml25
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-huge.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.pngbin0 -> 12248 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-scaled-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-scaled.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow-transform-huge.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow.pngbin0 -> 79646 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-drop-shadow.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-grayscale-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-grayscale.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-hue-rotate-1-ref.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-hue-rotate-1.yaml37
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-hue-rotate-alpha-1-ref.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-hue-rotate-alpha-1.yaml37
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-invert-2-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-invert-2.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-invert-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-invert.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-large-blur-radius.pngbin0 -> 115399 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-large-blur-radius.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-long-chain.pngbin0 -> 20983 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-long-chain.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-mix-blend-mode-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-mix-blend-mode.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-mix-blend-scaling-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-mix-blend-scaling.yaml23
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-blue-1-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-blue-1.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-blue-2-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-blue-2.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-blue-3-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-blue-3.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-blue-alpha-1-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-blue-alpha-1.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-green-1-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-green-1.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-green-2-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-green-2.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-green-3-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-green-3.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-green-alpha-1-ref.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-green-alpha-1.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-red-1-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-red-1.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-red-2-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-red-2.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-red-3-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-red-3.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-red-alpha-1-ref.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-saturate-red-alpha-1.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-segments-ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-segments.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-small-blur-radius.pngbin0 -> 17466 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/filter-small-blur-radius.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/filters/firefox.pngbin0 -> 45376 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/iframe-dropshadow-ref.yaml22
-rw-r--r--third_party/webrender/wrench/reftests/filters/iframe-dropshadow.yaml34
-rw-r--r--third_party/webrender/wrench/reftests/filters/invisible-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/filters/invisible.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/filters/isolated-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/isolated.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/opacity-combined-ref.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/filters/opacity-combined.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/filters/opacity-overlap-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/filters/opacity-overlap.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/filters/opacity-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/filters/opacity.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/filters/reftest.list68
-rw-r--r--third_party/webrender/wrench/reftests/filters/srgb-to-linear-2.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/filters/srgb-to-linear-ref.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/filters/srgb-to-linear.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-blend-ref.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-blend.yaml83
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-blur-transforms.pngbin0 -> 6159 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-blur-transforms.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-blur.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-color-matrix.yaml69
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-component-transfer.yaml382
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-composite-ref.yaml73
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-composite.yaml124
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.pngbin0 -> 12410 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-perspective.pngbin0 -> 13036 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml22
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-rotate-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-rotate.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow.pngbin0 -> 79573 bytes
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-flood-ref.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-flood.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-offset-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-filter-offset.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/filters/svg-srgb-to-linear.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-angle-wraparound-negative.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-angle-wraparound.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-angle.pngbin0 -> 24700 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-angle.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-backdrop-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-backdrop-with-spacing-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-backdrop-with-spacing.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-backdrop.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-center.pngbin0 -> 3117 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-center.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-color-wheel.pngbin0 -> 36018 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-color-wheel.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-simple.pngbin0 -> 24158 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic-simple.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/conic.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_vertical.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_vertical_ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_clamp.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_clamp_ref.yaml30
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_clip.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_clip_ref.yaml28
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_ref.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_repeat.yaml119
-rw-r--r--third_party/webrender/wrench/reftests/gradient/gradient_cache_repeat_ref.yaml119
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-adjust-tile-size-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-adjust-tile-size.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-aligned-border-radius.pngbin0 -> 6832 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-aligned-border-radius.yaml46
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-aligned-clip-ref.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-aligned-clip.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-backdrop-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-backdrop-with-spacing-ref.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-backdrop-with-spacing.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-backdrop.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-clamp-1-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-clamp-1a.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-clamp-1b.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-clamp-2-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-clamp-2.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-double.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-hard-stop-ref.pngbin0 -> 2026 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-hard-stop.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-ref.pngbin0 -> 3576 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-reverse.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-stops-ref.pngbin0 -> 912 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear-stops.yaml7
-rw-r--r--third_party/webrender/wrench/reftests/gradient/linear.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-conic-1-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-conic-1.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-conic-2-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-conic-2.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-conic-3-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-conic-3.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-conic-4-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-conic-4.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-conic-degenerate-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-conic-degenerate.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-linear-1-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-linear-1.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-linear-2-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-linear-2.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-linear-3-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-linear-3.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-linear-4-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-linear-4.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-linear-degenerate-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-linear-degenerate.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-radial-1-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-radial-1.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-radial-2-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-radial-2.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-radial-3-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-radial-3.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-radial-degenerate-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/norm-radial-degenerate.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-aligned-2.pngbin0 -> 10340 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-aligned-2.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-aligned.pngbin0 -> 12560 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-aligned.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-angle-2.pngbin0 -> 19390 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-angle-2.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-angle.pngbin0 -> 18453 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-angle.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-conic-2.pngbin0 -> 14475 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-conic-2.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-conic.pngbin0 -> 16782 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-conic.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-radial-2.pngbin0 -> 14593 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-radial-2.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-radial.pngbin0 -> 18857 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/premultiplied-radial.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-backdrop-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-backdrop-with-spacing-ref.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-backdrop-with-spacing.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-backdrop.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-circle-ref.pngbin0 -> 48655 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-circle.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-ellipse-ref.pngbin0 -> 39749 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-ellipse.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-zero-size-1.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-zero-size-2.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-zero-size-3.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/gradient/radial-zero-size-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/gradient/reftest.list106
-rw-r--r--third_party/webrender/wrench/reftests/gradient/repeat-border-radius.pngbin0 -> 31964 bytes
-rw-r--r--third_party/webrender/wrench/reftests/gradient/repeat-border-radius.yaml137
-rw-r--r--third_party/webrender/wrench/reftests/gradient/repeat-conic-negative.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/repeat-conic-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/gradient/repeat-conic.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/repeat-linear-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/gradient/repeat-linear-reverse.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/repeat-linear.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/repeat-radial-negative.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/repeat-radial-ref.yaml38
-rw-r--r--third_party/webrender/wrench/reftests/gradient/repeat-radial.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-conic-1-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-conic-1.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-conic-2-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-conic-2.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-conic-3-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-conic-3.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-linear-1-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-linear-1.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-linear-2-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-linear-2.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-linear-3-ref.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-linear-3.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-radial-1-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-radial-1.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-radial-2-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-radial-2.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-radial-3-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-radial-3.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-radial-4-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/gradient/tiling-radial-4.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/image/colorrect.pngbin0 -> 256 bytes
-rw-r--r--third_party/webrender/wrench/reftests/image/downscale.pngbin0 -> 14074 bytes
-rw-r--r--third_party/webrender/wrench/reftests/image/downscale.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/image/firefox.pngbin0 -> 25927 bytes
-rw-r--r--third_party/webrender/wrench/reftests/image/occlusion.pngbin0 -> 49427 bytes
-rw-r--r--third_party/webrender/wrench/reftests/image/occlusion.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/image/reftest.list14
-rw-r--r--third_party/webrender/wrench/reftests/image/rgb_composite.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/image/rgb_composite_ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/image/segments.pngbin0 -> 7182 bytes
-rw-r--r--third_party/webrender/wrench/reftests/image/segments.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/image/spacex-u.pngbin0 -> 81302 bytes
-rw-r--r--third_party/webrender/wrench/reftests/image/spacex-uv.pngbin0 -> 202309 bytes
-rw-r--r--third_party/webrender/wrench/reftests/image/spacex-v.pngbin0 -> 97851 bytes
-rw-r--r--third_party/webrender/wrench/reftests/image/spacex-y.pngbin0 -> 128761 bytes
-rw-r--r--third_party/webrender/wrench/reftests/image/spacex-yuv.pngbin0 -> 310131 bytes
-rw-r--r--third_party/webrender/wrench/reftests/image/texture-rect-ref.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/image/texture-rect.yaml7
-rw-r--r--third_party/webrender/wrench/reftests/image/tile-repeat-prim-or-decompose-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/image/tile-repeat-prim-or-decompose.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/image/tile-size-ref.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/image/tile-size.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/image/tile-with-spacing-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/image/tile-with-spacing.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/image/tiled-clip-chain-ref.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/image/tiled-clip-chain.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/image/tiled-complex-clip-ref.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/image/tiled-complex-clip.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/image/very-big-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/image/very-big-tile-size-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/image/very-big-tile-size.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/image/very-big.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/image/yuv.pngbin0 -> 621771 bytes
-rw-r--r--third_party/webrender/wrench/reftests/image/yuv.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/invalidation/one-rounded-rect-green.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/invalidation/one-rounded-rect.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/invalidation/reftest.list1
-rw-r--r--third_party/webrender/wrench/reftests/invalidation/rounded-rects.yaml42
-rw-r--r--third_party/webrender/wrench/reftests/invalidation/two-rounded-rects.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/mask/aligned-layer-rect-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/mask/aligned-layer-rect.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/mask/checkerboard-tiling.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/mask/checkerboard.pngbin0 -> 11433 bytes
-rw-r--r--third_party/webrender/wrench/reftests/mask/checkerboard.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/mask/green.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask-atomicity-ref.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask-atomicity-tiling.yaml25
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask-atomicity.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask-perspective-tiling.yaml23
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask-perspective.pngbin0 -> 311 bytes
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask-perspective.yaml22
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask-tiling.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask-transformed-to-empty-rect-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask-transformed-to-empty-rect.yaml26
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask.pngbin0 -> 187 bytes
-rw-r--r--third_party/webrender/wrench/reftests/mask/mask.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/mask/missing-mask-ref.yaml7
-rw-r--r--third_party/webrender/wrench/reftests/mask/missing-mask.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/mask/nested-mask-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/mask/nested-mask-tiling.yaml22
-rw-r--r--third_party/webrender/wrench/reftests/mask/nested-mask.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/mask/out-of-bounds.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/mask/reftest.list16
-rw-r--r--third_party/webrender/wrench/reftests/mask/rounded-corners.pngbin0 -> 1720 bytes
-rw-r--r--third_party/webrender/wrench/reftests/mask/rounded-corners.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/mask/tiny-check-mask.pngbin0 -> 138 bytes
-rw-r--r--third_party/webrender/wrench/reftests/performance/compositor-surface-opaque-slice-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/performance/compositor-surface-opaque-slice.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/performance/no-clip-mask.pngbin0 -> 2776 bytes
-rw-r--r--third_party/webrender/wrench/reftests/performance/no-clip-mask.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/performance/reftest.list2
-rw-r--r--third_party/webrender/wrench/reftests/reftest.list18
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/clip-and-scroll-property-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/clip-and-scroll-property.yaml30
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/empty-mask-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/empty-mask.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/ext-scroll-offset-1-ref.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/ext-scroll-offset-1.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/fixed-position-ref.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/fixed-position-scrolling-clip-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/fixed-position-scrolling-clip.yaml28
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/fixed-position.yaml55
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/mask.pngbin0 -> 282 bytes
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/nested-scroll-offset-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/nested-scroll-offset.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/nested-stickys-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/nested-stickys.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/out-of-bounds-scroll-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/out-of-bounds-scroll.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/reftest.list19
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/root-scroll-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/root-scroll.yaml7
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/scale-offsets-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/scale-offsets.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/scroll-layer-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/scroll-layer.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/sibling-hidden-clip-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/sibling-hidden-clip.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/simple-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/simple.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/sticky-applied-ref.yaml70
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/sticky-applied.yaml307
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/sticky-nested.yaml215
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/sticky-ref.yaml40
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/sticky-transformed-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/sticky-transformed.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/sticky.yaml167
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/translate-nested-ref.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/translate-nested.yaml28
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/viewport-offset-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/scrolling/viewport-offset.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/snap/preserve-3d.pngbin0 -> 6807 bytes
-rw-r--r--third_party/webrender/wrench/reftests/snap/preserve-3d.yaml55
-rw-r--r--third_party/webrender/wrench/reftests/snap/reftest.list3
-rw-r--r--third_party/webrender/wrench/reftests/snap/snap.pngbin0 -> 2885 bytes
-rw-r--r--third_party/webrender/wrench/reftests/snap/snap.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/snap/transform.pngbin0 -> 3012 bytes
-rw-r--r--third_party/webrender/wrench/reftests/snap/transform.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/split/cross-ref.yaml36
-rw-r--r--third_party/webrender/wrench/reftests/split/cross.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/split/filter-ref.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/split/filter.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/split/gradient-ref.yaml39
-rw-r--r--third_party/webrender/wrench/reftests/split/gradient.yaml42
-rw-r--r--third_party/webrender/wrench/reftests/split/intermediate-1-ref.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/split/intermediate-1.yaml38
-rw-r--r--third_party/webrender/wrench/reftests/split/intermediate-2.yaml34
-rw-r--r--third_party/webrender/wrench/reftests/split/mixed-order-ref.yaml22
-rw-r--r--third_party/webrender/wrench/reftests/split/mixed-order.yaml25
-rw-r--r--third_party/webrender/wrench/reftests/split/near-plane.pngbin0 -> 3210 bytes
-rw-r--r--third_party/webrender/wrench/reftests/split/near-plane.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/split/nested-coord-systems-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/split/nested-coord-systems.yaml28
-rw-r--r--third_party/webrender/wrench/reftests/split/nested-preserve3d-crash.yaml37
-rw-r--r--third_party/webrender/wrench/reftests/split/nested-ref.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/split/nested.yaml25
-rw-r--r--third_party/webrender/wrench/reftests/split/order-1-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/split/order-1.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/split/order-2-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/split/order-2.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/split/order-3-ref.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/split/order-3.yaml31
-rw-r--r--third_party/webrender/wrench/reftests/split/ordering-ref.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/split/ordering.yaml25
-rw-r--r--third_party/webrender/wrench/reftests/split/perspective-clipping-ref.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/split/perspective-clipping.yaml23
-rw-r--r--third_party/webrender/wrench/reftests/split/reftest.list22
-rw-r--r--third_party/webrender/wrench/reftests/split/same-plane.pngbin0 -> 4279 bytes
-rw-r--r--third_party/webrender/wrench/reftests/split/same-plane.yaml33
-rw-r--r--third_party/webrender/wrench/reftests/split/simple-ref.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/split/simple.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/split/split-intersect1-ref.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/split/split-intersect1.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/text/1658-ref.yaml26
-rw-r--r--third_party/webrender/wrench/reftests/text/1658.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/text/Ahem.ttfbin0 -> 21768 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/FreeSans.ttfbin0 -> 714456 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/Proggy-License.txt10
-rw-r--r--third_party/webrender/wrench/reftests/text/Proggy.ttfbin0 -> 5284 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/VeraBd.ttfbin0 -> 58716 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/ahem-ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/text/ahem.yaml243
-rw-r--r--third_party/webrender/wrench/reftests/text/allow-subpixel-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/text/allow-subpixel.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/text/alpha-transform.pngbin0 -> 23930 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/alpha-transform.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/bg-color-ref.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/text/bg-color.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/text/blank.yaml2
-rw-r--r--third_party/webrender/wrench/reftests/text/blurred-shadow-local-clip-rect-ref.pngbin0 -> 19504 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/blurred-shadow-local-clip-rect.yaml48
-rw-r--r--third_party/webrender/wrench/reftests/text/border-radius-alpha.pngbin0 -> 14101 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/border-radius-subpx.pngbin0 -> 14411 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/border-radius.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/text/clipped-transform.pngbin0 -> 1792 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/clipped-transform.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/text/color-bitmap-shadow-ref.yaml30
-rw-r--r--third_party/webrender/wrench/reftests/text/color-bitmap-shadow.yaml34
-rw-r--r--third_party/webrender/wrench/reftests/text/colors-alpha.pngbin0 -> 93670 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/colors-subpx.pngbin0 -> 132119 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/colors.yaml211
-rw-r--r--third_party/webrender/wrench/reftests/text/decorations-ref.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/text/decorations-suite.pngbin0 -> 24087 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/decorations-suite.yaml348
-rw-r--r--third_party/webrender/wrench/reftests/text/decorations.yaml36
-rw-r--r--third_party/webrender/wrench/reftests/text/diacritics-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/text/diacritics.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/text/embedded-bitmaps.pngbin0 -> 2288 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/embedded-bitmaps.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/text/intermediate-transform.yaml54
-rw-r--r--third_party/webrender/wrench/reftests/text/isolated-text.pngbin0 -> 6737 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/isolated-text.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/text/large-glyphs.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/text/large-line-decoration.yaml43
-rw-r--r--third_party/webrender/wrench/reftests/text/long-text.yaml610
-rw-r--r--third_party/webrender/wrench/reftests/text/negative-pos.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/non-opaque-notref.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/non-opaque.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/perspective-clip.pngbin0 -> 1753 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/perspective-clip.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/text/raster-space-snap-ref.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/raster-space-snap.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/raster-space.pngbin0 -> 64740 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/raster-space.yaml28
-rw-r--r--third_party/webrender/wrench/reftests/text/raster_root_C_8192.yaml385
-rw-r--r--third_party/webrender/wrench/reftests/text/raster_root_C_ref.yaml385
-rw-r--r--third_party/webrender/wrench/reftests/text/reftest.list84
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-atomic-ref.yaml81
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-atomic.yaml42
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-border.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-clip-rect.yaml45
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-clip-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-clip.yaml25
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-clipped-text.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-complex.yaml46
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-cover-1.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-cover-2.yaml26
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-fast-clip-ref.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-fast-clip.yaml22
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-grey-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-grey-transparent.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-grey.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-huge-ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-huge.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-image.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-many.yaml30
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-ordering-ref.yaml131
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-ordering.yaml48
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-partial-glyph-ref.yaml50
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-partial-glyph.yaml43
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-red-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-red.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-ref.yaml25
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-rotate.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-single.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-solid-ref.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-transforms.pngbin0 -> 96541 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow-transforms.yaml58
-rw-r--r--third_party/webrender/wrench/reftests/text/shadow.yaml33
-rw-r--r--third_party/webrender/wrench/reftests/text/snap-clip-ref.yaml7
-rw-r--r--third_party/webrender/wrench/reftests/text/snap-clip.yaml8
-rw-r--r--third_party/webrender/wrench/reftests/text/snap-text-offset-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/text/snap-text-offset.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/split-batch-ref.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/text/split-batch.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/text/subpixel-rotate.pngbin0 -> 19021 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/subpixel-rotate.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/subpixel-scale.pngbin0 -> 14063 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/subpixel-scale.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/subpixel-skew.pngbin0 -> 15337 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/subpixel-skew.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/subpixel-translate-ref.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/text/subpixel-translate.yaml13
-rw-r--r--third_party/webrender/wrench/reftests/text/subtle-shadow-ref.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/text/subtle-shadow.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/text/synthetic-bold-not-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/text/synthetic-bold-transparent-ref.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/synthetic-bold-transparent.yaml7
-rw-r--r--third_party/webrender/wrench/reftests/text/synthetic-bold.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/text/synthetic-italics-custom.yaml7
-rw-r--r--third_party/webrender/wrench/reftests/text/synthetic-italics-ref.yaml5
-rw-r--r--third_party/webrender/wrench/reftests/text/synthetic-italics.yaml7
-rw-r--r--third_party/webrender/wrench/reftests/text/text-fixed-slice-fast.pngbin0 -> 5025 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/text-fixed-slice-slow.pngbin0 -> 6024 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/text-fixed-slice.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/text/text-masking-alpha.pngbin0 -> 18885 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/text-masking-mask.pngbin0 -> 129 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/text-masking-subpx.pngbin0 -> 28989 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/text-masking.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/text/text.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/text/transparent-no-aa-ref.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/text/transparent-no-aa.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/text/two-shadows.pngbin0 -> 11350 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/two-shadows.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/text/white-opacity.pngbin0 -> 8266 bytes
-rw-r--r--third_party/webrender/wrench/reftests/text/white-opacity.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/text/writing-modes-ref.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/text/writing-modes.yaml15
-rw-r--r--third_party/webrender/wrench/reftests/tiles/prim-suite.yaml45
-rw-r--r--third_party/webrender/wrench/reftests/tiles/rect.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/tiles/reftest.list4
-rw-r--r--third_party/webrender/wrench/reftests/tiles/simple-gradient.yaml9
-rw-r--r--third_party/webrender/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/transforms/big-axis-aligned-scale.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/transforms/blank.yaml2
-rw-r--r--third_party/webrender/wrench/reftests/transforms/border-scale-2.pngbin0 -> 6817 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/border-scale-2.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/transforms/border-scale-3.pngbin0 -> 6562 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/border-scale-3.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/transforms/border-scale-4.pngbin0 -> 6545 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/border-scale-4.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/transforms/border-scale.pngbin0 -> 7232 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/border-scale.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/transforms/border-zoom.pngbin0 -> 27613 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/border-zoom.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/transforms/clip-translate-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/transforms/clip-translate.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/transforms/complex-preserve-3d.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/transforms/content-offset.pngbin0 -> 2121 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/content-offset.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/transforms/coord-system.pngbin0 -> 4234 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/coord-system.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/transforms/flatten-preserve-3d-root.yaml23
-rw-r--r--third_party/webrender/wrench/reftests/transforms/flatten-twice-ref.yaml6
-rw-r--r--third_party/webrender/wrench/reftests/transforms/flatten-twice.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/transforms/image-rotated-clip.pngbin0 -> 3824 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/image-rotated-clip.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/transforms/image.pngbin0 -> 528 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/large-raster-root.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/transforms/local-clip.pngbin0 -> 2138 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/local-clip.yaml26
-rw-r--r--third_party/webrender/wrench/reftests/transforms/near-plane-clip.pngbin0 -> 69832 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/near-plane-clip.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/transforms/nested-preserve-3d.pngbin0 -> 3830 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/nested-preserve-3d.yaml28
-rw-r--r--third_party/webrender/wrench/reftests/transforms/nested-rotate-x-flat.pngbin0 -> 4593 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/nested-rotate-x-flat.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/transforms/nested-rotate-x.pngbin0 -> 3832 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/nested-rotate-x.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-border-radius.pngbin0 -> 11839 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-border-radius.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-box-shadow-ref.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-box-shadow.yaml23
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-clip-1.pngbin0 -> 2019 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-clip-1.yaml25
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-clip.pngbin0 -> 16932 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-clip.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-mask.pngbin0 -> 2285 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-mask.yaml22
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-origin.pngbin0 -> 47142 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-origin.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-shadow.pngbin0 -> 10342 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective-shadow.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective.pngbin0 -> 134799 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/perspective.yaml54
-rw-r--r--third_party/webrender/wrench/reftests/transforms/prim-suite.pngbin0 -> 48510 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/prim-suite.yaml45
-rw-r--r--third_party/webrender/wrench/reftests/transforms/raster-root-huge-scale.yaml30
-rw-r--r--third_party/webrender/wrench/reftests/transforms/raster-root-large-mask.yaml29
-rw-r--r--third_party/webrender/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml11
-rw-r--r--third_party/webrender/wrench/reftests/transforms/raster-root-scaling-2.yaml22
-rw-r--r--third_party/webrender/wrench/reftests/transforms/raster-root-scaling-ref.yaml10
-rw-r--r--third_party/webrender/wrench/reftests/transforms/raster-root-scaling.yaml16
-rw-r--r--third_party/webrender/wrench/reftests/transforms/raster_root_A_8192.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/transforms/raster_root_A_ref.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/transforms/raster_root_B_8192.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/transforms/raster_root_B_ref.yaml14
-rw-r--r--third_party/webrender/wrench/reftests/transforms/reftest.list54
-rw-r--r--third_party/webrender/wrench/reftests/transforms/rotate-clip-ref.yaml7
-rw-r--r--third_party/webrender/wrench/reftests/transforms/rotate-clip.yaml18
-rw-r--r--third_party/webrender/wrench/reftests/transforms/rotated-clip-large.pngbin0 -> 7420 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/rotated-clip-large.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/transforms/rotated-clip.pngbin0 -> 3789 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/rotated-clip.yaml17
-rw-r--r--third_party/webrender/wrench/reftests/transforms/rotated-image.pngbin0 -> 7441 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/rotated-image.yaml75
-rw-r--r--third_party/webrender/wrench/reftests/transforms/screen-space-blit-trivial.pngbin0 -> 75011 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/screen-space-blit-trivial.yaml22
-rw-r--r--third_party/webrender/wrench/reftests/transforms/screen-space-blit.pngbin0 -> 73453 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/screen-space-blit.yaml22
-rw-r--r--third_party/webrender/wrench/reftests/transforms/screen-space-blur.pngbin0 -> 234783 bytes
-rw-r--r--third_party/webrender/wrench/reftests/transforms/screen-space-blur.yaml20
-rw-r--r--third_party/webrender/wrench/reftests/transforms/segments-bug-ref.yaml24
-rw-r--r--third_party/webrender/wrench/reftests/transforms/segments-bug.yaml27
-rw-r--r--third_party/webrender/wrench/reftests/transforms/singular-ref.yaml28
-rw-r--r--third_party/webrender/wrench/reftests/transforms/singular.yaml39
-rw-r--r--third_party/webrender/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml19
-rw-r--r--third_party/webrender/wrench/reftests/transforms/snapped-preserve-3d.yaml21
-rw-r--r--third_party/webrender/wrench/reftests/transforms/strange-w-ref.yaml12
-rw-r--r--third_party/webrender/wrench/reftests/transforms/strange-w.yaml15
-rw-r--r--third_party/webrender/wrench/res/wrench.exe.manifest24
-rw-r--r--third_party/webrender/wrench/script/benchmark_server.py59
-rw-r--r--third_party/webrender/wrench/script/gen-many-images.py15
-rwxr-xr-xthird_party/webrender/wrench/script/headless.py154
-rw-r--r--third_party/webrender/wrench/script/reftest-analyzer.xhtml857
-rwxr-xr-xthird_party/webrender/wrench/script/reftest-debugger.py15
-rwxr-xr-xthird_party/webrender/wrench/script/wrench_with_renderer.py52
-rw-r--r--third_party/webrender/wrench/src/angle.rs62
-rw-r--r--third_party/webrender/wrench/src/args.yaml222
-rw-r--r--third_party/webrender/wrench/src/blob.rs213
-rw-r--r--third_party/webrender/wrench/src/egl.rs611
-rw-r--r--third_party/webrender/wrench/src/main.rs1056
-rw-r--r--third_party/webrender/wrench/src/parse_function.rs134
-rw-r--r--third_party/webrender/wrench/src/perf.rs352
-rw-r--r--third_party/webrender/wrench/src/png.rs118
-rw-r--r--third_party/webrender/wrench/src/premultiply.rs56
-rw-r--r--third_party/webrender/wrench/src/rawtest.rs1463
-rw-r--r--third_party/webrender/wrench/src/reftest.rs995
-rw-r--r--third_party/webrender/wrench/src/wrench.rs681
-rw-r--r--third_party/webrender/wrench/src/yaml_frame_reader.rs2245
-rw-r--r--third_party/webrender/wrench/src/yaml_helper.rs805
1215 files changed, 185677 insertions, 34 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 9ca73c7080b..4cb6c042dc8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4396,7 +4396,6 @@ dependencies = [
[[package]]
name = "peek-poke"
version = "0.2.0"
-source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#415b9ba32648667313f6f4ce7965752285bf0b26"
dependencies = [
"euclid",
"peek-poke-derive",
@@ -4405,7 +4404,6 @@ dependencies = [
[[package]]
name = "peek-poke-derive"
version = "0.2.1"
-source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#415b9ba32648667313f6f4ce7965752285bf0b26"
dependencies = [
"proc-macro2",
"quote",
@@ -6990,7 +6988,6 @@ dependencies = [
[[package]]
name = "webrender"
version = "0.61.0"
-source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#415b9ba32648667313f6f4ce7965752285bf0b26"
dependencies = [
"backtrace",
"base64 0.10.1",
@@ -7034,7 +7031,6 @@ dependencies = [
[[package]]
name = "webrender_api"
version = "0.61.0"
-source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#415b9ba32648667313f6f4ce7965752285bf0b26"
dependencies = [
"app_units",
"bitflags",
@@ -7055,7 +7051,6 @@ dependencies = [
[[package]]
name = "webrender_build"
version = "0.0.1"
-source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#415b9ba32648667313f6f4ce7965752285bf0b26"
dependencies = [
"bitflags",
"lazy_static",
@@ -7320,7 +7315,6 @@ dependencies = [
[[package]]
name = "wr_malloc_size_of"
version = "0.0.1"
-source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#415b9ba32648667313f6f4ce7965752285bf0b26"
dependencies = [
"app_units",
"euclid",
diff --git a/Cargo.toml b/Cargo.toml
index 62b661f5acd..db89ad5fa9b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -78,6 +78,8 @@ unicode-script = "0.5"
url = "2.0"
uuid = { version = "1.3.4", features = ["v4"] }
webdriver = "0.48.0"
+webrender = { git = "https://github.com/servo/webrender", features = ["capture"] }
+webrender_api = { git = "https://github.com/servo/webrender" }
winapi = "0.3"
xi-unicode = "0.1.0"
xml5ever = "0.17"
@@ -104,7 +106,9 @@ mio = { git = "https://github.com/servo/mio.git", branch = "servo-mio-0.6.22" }
# fork that bumps crates since the original repo is archived.
immeta = { git = "https://github.com/fabricedesre/immeta.git" }
-# https://github.com/servo/servo/issues/27515#issuecomment-671474054
+
+# This is required because we want all dependencies that use WebRender to
+# use our vendored version.
[patch."https://github.com/servo/webrender"]
-webrender = { git = "https://github.com/jdm/webrender", branch = "crash-backtrace" }
-webrender_api = { git = "https://github.com/jdm/webrender", branch = "crash-backtrace" }
+webrender = { path = "third_party/webrender/webrender" }
+webrender_api = { path = "third_party/webrender/webrender_api" }
diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml
index c7e7c7c8abe..f7ff8629da4 100644
--- a/components/canvas/Cargo.toml
+++ b/components/canvas/Cargo.toml
@@ -44,8 +44,8 @@ surfman = { workspace = true, features = ["sm-angle","sm-angle-default"] }
surfman-chains = { workspace = true }
surfman-chains-api = { workspace = true }
time = { workspace = true, optional = true }
-webrender = { git = "https://github.com/servo/webrender" }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender = { workspace = true }
+webrender_api = { workspace = true }
webrender_surfman = { path = "../webrender_surfman" }
webrender_traits = { path = "../webrender_traits" }
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
diff --git a/components/canvas_traits/Cargo.toml b/components/canvas_traits/Cargo.toml
index 4db44f09eb1..9199be4edf3 100644
--- a/components/canvas_traits/Cargo.toml
+++ b/components/canvas_traits/Cargo.toml
@@ -29,5 +29,5 @@ servo_config = { path = "../config" }
sparkle = { workspace = true }
style = { path = "../style" }
time = { workspace = true, optional = true }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml
index 92b86235471..6421de7db7e 100644
--- a/components/compositing/Cargo.toml
+++ b/components/compositing/Cargo.toml
@@ -39,8 +39,8 @@ servo_geometry = { path = "../geometry" }
servo_url = { path = "../url" }
style_traits = { path = "../style_traits" }
time = { workspace = true }
-webrender = { git = "https://github.com/servo/webrender", features = ["capture"] }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender = { workspace = true }
+webrender_api = { workspace = true }
webrender_surfman = { path = "../webrender_surfman" }
webxr = { git = "https://github.com/servo/webxr" }
diff --git a/components/constellation/Cargo.toml b/components/constellation/Cargo.toml
index dac014e178d..3704d404b62 100644
--- a/components/constellation/Cargo.toml
+++ b/components/constellation/Cargo.toml
@@ -42,7 +42,7 @@ servo_remutex = { path = "../remutex" }
servo_url = { path = "../url" }
style_traits = { path = "../style_traits" }
webgpu = { path = "../webgpu" }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
webrender_traits = { path = "../webrender_traits" }
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
diff --git a/components/embedder_traits/Cargo.toml b/components/embedder_traits/Cargo.toml
index 430a57090f5..82621113882 100644
--- a/components/embedder_traits/Cargo.toml
+++ b/components/embedder_traits/Cargo.toml
@@ -21,5 +21,5 @@ num-derive = "0.3"
num-traits = { workspace = true }
serde = { workspace = true }
servo_url = { path = "../url" }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml
index 294ec44d16a..924d39902ff 100644
--- a/components/gfx/Cargo.toml
+++ b/components/gfx/Cargo.toml
@@ -38,7 +38,7 @@ time = { workspace = true }
ucd = "0.1.1"
unicode-bidi = { workspace = true, features = ["with_serde"] }
unicode-script = { workspace = true }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
xi-unicode = { workspace = true }
[target.'cfg(target_os = "macos")'.dependencies]
diff --git a/components/gfx_traits/Cargo.toml b/components/gfx_traits/Cargo.toml
index 142a644e394..8163bb49b5d 100644
--- a/components/gfx_traits/Cargo.toml
+++ b/components/gfx_traits/Cargo.toml
@@ -15,4 +15,4 @@ malloc_size_of = { path = "../malloc_size_of" }
malloc_size_of_derive = { workspace = true }
range = { path = "../range" }
serde = { workspace = true }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml
index 9e5d56a49d9..c73e56e186c 100644
--- a/components/layout/Cargo.toml
+++ b/components/layout/Cargo.toml
@@ -49,7 +49,7 @@ style = { path = "../style", features = ["servo", "servo-layout-2013"] }
style_traits = { path = "../style_traits" }
unicode-bidi = { workspace = true, features = ["with_serde"] }
unicode-script = { workspace = true }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
xi-unicode = { workspace = true }
[dev-dependencies]
diff --git a/components/layout_2020/Cargo.toml b/components/layout_2020/Cargo.toml
index 701eebe1d7e..ca7ca77bfe3 100644
--- a/components/layout_2020/Cargo.toml
+++ b/components/layout_2020/Cargo.toml
@@ -44,7 +44,7 @@ servo_url = { path = "../url" }
style = { path = "../style", features = ["servo", "servo-layout-2020"] }
style_traits = { path = "../style_traits" }
unicode-script = { workspace = true }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
[dev-dependencies]
lazy_static = { workspace = true }
diff --git a/components/layout_thread/Cargo.toml b/components/layout_thread/Cargo.toml
index 3e47a9ebe7d..9f9dbee4d1f 100644
--- a/components/layout_thread/Cargo.toml
+++ b/components/layout_thread/Cargo.toml
@@ -49,4 +49,4 @@ servo_url = { path = "../url" }
style = { path = "../style" }
style_traits = { path = "../style_traits" }
time = { workspace = true }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
diff --git a/components/layout_thread_2020/Cargo.toml b/components/layout_thread_2020/Cargo.toml
index 72a7c0f7230..e94ece4f934 100644
--- a/components/layout_thread_2020/Cargo.toml
+++ b/components/layout_thread_2020/Cargo.toml
@@ -45,4 +45,4 @@ servo_config = { path = "../config" }
servo_url = { path = "../url" }
style = { path = "../style" }
style_traits = { path = "../style_traits" }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
diff --git a/components/layout_traits/Cargo.toml b/components/layout_traits/Cargo.toml
index 2fe80f7cbbf..532d358fd42 100644
--- a/components/layout_traits/Cargo.toml
+++ b/components/layout_traits/Cargo.toml
@@ -20,4 +20,4 @@ net_traits = { path = "../net_traits" }
profile_traits = { path = "../profile_traits" }
script_traits = { path = "../script_traits" }
servo_url = { path = "../url" }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
diff --git a/components/malloc_size_of/Cargo.toml b/components/malloc_size_of/Cargo.toml
index 23d7a79d371..e90b36b5104 100644
--- a/components/malloc_size_of/Cargo.toml
+++ b/components/malloc_size_of/Cargo.toml
@@ -49,5 +49,5 @@ tokio = { workspace = true }
url = { workspace = true, optional = true }
uuid = { workspace = true, optional = true }
void = "1.0.2"
-webrender_api = { git = "https://github.com/servo/webrender", optional = true }
+webrender_api = { workspace = true, optional = true }
xml5ever = { workspace = true, optional = true }
diff --git a/components/media/Cargo.toml b/components/media/Cargo.toml
index 9b600270bf6..e667638e1ba 100644
--- a/components/media/Cargo.toml
+++ b/components/media/Cargo.toml
@@ -19,5 +19,5 @@ log = { workspace = true }
serde = { workspace = true }
servo-media = { git = "https://github.com/servo/media" }
servo_config = { path = "../config" }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
webrender_traits = { path = "../webrender_traits" }
diff --git a/components/msg/Cargo.toml b/components/msg/Cargo.toml
index 9f076c63bf1..8bcf5680a2d 100644
--- a/components/msg/Cargo.toml
+++ b/components/msg/Cargo.toml
@@ -19,7 +19,7 @@ malloc_size_of = { path = "../malloc_size_of" }
malloc_size_of_derive = { workspace = true }
parking_lot = { workspace = true }
serde = { workspace = true }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
[dev-dependencies]
size_of_test = { path = "../size_of_test" }
diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml
index 773546efa7f..f54ffe4d7be 100644
--- a/components/net/Cargo.toml
+++ b/components/net/Cargo.toml
@@ -65,7 +65,7 @@ tokio-stream = "0.1"
tungstenite = "0.19"
url = { workspace = true }
uuid = { workspace = true }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
[dev-dependencies]
futures = {version = "0.3", features = ["compat"]}
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index c1ad657c685..d4095bf6f19 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -117,7 +117,7 @@ utf-8 = "0.7"
uuid = { workspace = true, features = ["serde"] }
webdriver = { workspace = true }
webgpu = { path = "../webgpu" }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
xml5ever = { workspace = true }
diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml
index 2c79116a48c..f9f79814a9c 100644
--- a/components/script_traits/Cargo.toml
+++ b/components/script_traits/Cargo.toml
@@ -43,7 +43,7 @@ time = { workspace = true }
uuid = { workspace = true }
webdriver = { workspace = true }
webgpu = { path = "../webgpu" }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
[dev-dependencies]
diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml
index 017114ccc92..2d3d46cc8c0 100644
--- a/components/servo/Cargo.toml
+++ b/components/servo/Cargo.toml
@@ -81,8 +81,8 @@ style_traits = { path = "../style_traits", features = ["servo"] }
surfman = { workspace = true }
webdriver_server = { path = "../webdriver_server", optional = true }
webgpu = { path = "../webgpu" }
-webrender = { git = "https://github.com/servo/webrender" }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender = { workspace = true }
+webrender_api = { workspace = true }
webrender_surfman = { path = "../webrender_surfman" }
webrender_traits = { path = "../webrender_traits" }
webxr = { git = "https://github.com/servo/webxr" }
diff --git a/components/style_traits/Cargo.toml b/components/style_traits/Cargo.toml
index f7cb05c1a3a..779bb5487b5 100644
--- a/components/style_traits/Cargo.toml
+++ b/components/style_traits/Cargo.toml
@@ -29,4 +29,4 @@ servo_atoms = { path = "../atoms", optional = true }
servo_url = { path = "../url", optional = true }
to_shmem = { path = "../to_shmem" }
to_shmem_derive = { path = "../to_shmem_derive" }
-webrender_api = { git = "https://github.com/servo/webrender", optional = true }
+webrender_api = { workspace = true, optional = true }
diff --git a/components/webgpu/Cargo.toml b/components/webgpu/Cargo.toml
index 868f9c656c4..c096852c687 100644
--- a/components/webgpu/Cargo.toml
+++ b/components/webgpu/Cargo.toml
@@ -20,7 +20,7 @@ msg = { path = "../msg" }
serde = { workspace = true, features = ["serde_derive"] }
servo_config = { path = "../config" }
smallvec = { workspace = true, features = ["serde"] }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
webrender_traits = { path = "../webrender_traits" }
wgpu-core = { version = "0.6.0", git = "https://github.com/gfx-rs/wgpu", features = ["replay", "trace", "serial-pass"], rev = "e72724a6e393503c73f37e86aa9317a5c62e32b8" }
wgpu-types = { version = "0.6.0", git = "https://github.com/gfx-rs/wgpu", features = ["replay", "trace"], rev = "e72724a6e393503c73f37e86aa9317a5c62e32b8" }
diff --git a/components/webrender_traits/Cargo.toml b/components/webrender_traits/Cargo.toml
index 69af8e92d3a..98dd3c4e5e4 100644
--- a/components/webrender_traits/Cargo.toml
+++ b/components/webrender_traits/Cargo.toml
@@ -12,5 +12,5 @@ path = "lib.rs"
[dependencies]
euclid = { workspace = true }
-webrender_api = { git = "https://github.com/servo/webrender" }
+webrender_api = { workspace = true }
diff --git a/rustfmt.toml b/rustfmt.toml
index de839baed13..90fcdc76cd8 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -1,3 +1,4 @@
match_block_trailing_comma = true
binop_separator = "Back"
reorder_imports = true
+ignore = [ "third_party" ]
diff --git a/third_party/webrender/.gitignore b/third_party/webrender/.gitignore
new file mode 100644
index 00000000000..849001b76c2
--- /dev/null
+++ b/third_party/webrender/.gitignore
@@ -0,0 +1,27 @@
+target/
+*~
+*#
+
+# WR internals
+captures
+wrench/json_frames
+wrench/ron_frames
+
+# Editors
+*.swp
+*.swo
+
+# IntelliJ
+.idea
+*.iws
+*.iml
+
+# Gradle
+.gradle
+
+# VSCode
+.vscode
+.vs
+
+# System
+.fuse_hidden*
diff --git a/third_party/webrender/.taskcluster.yml b/third_party/webrender/.taskcluster.yml
new file mode 100644
index 00000000000..f7289169e50
--- /dev/null
+++ b/third_party/webrender/.taskcluster.yml
@@ -0,0 +1,176 @@
+# This file specifies the configuration needed to test WebRender using the
+# Taskcluster infrastructure. Most of this should be relatively
+# self-explanatory; this file was originally generated by using the
+# Taskcluster-GitHub integration quickstart tool which no longer exists.
+#
+# See https://community-tc.services.mozilla.com/docs
+version: 1
+policy:
+ pullRequests: public
+
+# This file triggers a set of tasks; the ones targeting Linux are run in a docker
+# container using docker-worker (which is a worker type provided by TaskCluster).
+# The OS X ones are run in a custom worker type, for which we have worker
+# instances configured and running.
+tasks:
+ $if: 'tasks_for in ["github-push", "github-pull-request"]'
+ then:
+ $let:
+ should_run:
+ $if: 'tasks_for == "github-push"'
+ # for pushes, run on any branch but master
+ then: {$eval: 'event.ref != "refs/heads/master"'}
+ # for PRs, run for opened and synchronized events
+ else: {$eval: 'event.action in ["opened", "synchronize"]'}
+ repo_url:
+ $if: 'tasks_for == "github-push"'
+ then: ${event.repository.clone_url}
+ else: ${event.pull_request.head.repo.clone_url}
+ sha:
+ $if: 'tasks_for == "github-push"'
+ then: ${event.after}
+ else: ${event.pull_request.head.sha}
+ login: ${event.sender.login}
+ branch:
+ $if: 'tasks_for == "github-push"'
+ then:
+ $if: 'event.ref[:11] == "refs/heads/"'
+ then: ${event.ref[11:]}
+ else: ${event.ref}
+ else: ${event.pull_request.head.ref}
+ in:
+ $if: should_run
+ then:
+ # For the docker-worker tasks, the Docker image used
+ # (staktrace/webrender-test:debian-v6) was created using the Dockerfile in
+ # ci-scripts/docker-image.
+ #
+ # The docker image may need to be updated over time if the set of required
+ # packages increases. Note in particular that rust/cargo are not part of the
+ # docker image, and are re-installed using rustup on each CI run. This ensures
+ # the latest stable rust compiler is always used.
+ # CI runs will be triggered on opening PRs, updating PRs, and pushes to the
+ # repository.
+ - metadata:
+ name: Linux release tests
+ description: Runs release-mode WebRender CI stuff on a Linux TC worker
+ owner: noreply@mozilla.com
+ source: ${repo_url}
+ provisionerId: proj-webrender
+ workerType: ci-linux
+ deadline: {$fromNow: '1 day'}
+ payload:
+ maxRunTime: 7200
+ image: 'staktrace/webrender-test:debian-v6'
+ env:
+ RUST_BACKTRACE: 'full'
+ RUSTFLAGS: '--deny warnings'
+ command:
+ - /bin/bash
+ - '--login'
+ - '-c'
+ - >-
+ curl https://sh.rustup.rs -sSf | sh -s -- -y &&
+ source $HOME/.cargo/env &&
+ git clone ${repo_url} webrender && cd webrender &&
+ git checkout ${sha} &&
+ servo-tidy &&
+ ci-scripts/linux-release-tests.sh
+ routes:
+ - "index.project.webrender.ci.${login}.${branch}.linux-release"
+ - metadata:
+ name: Linux debug tests
+ description: Runs debug-mode WebRender CI stuff on a Linux TC worker
+ owner: noreply@mozilla.com
+ source: ${repo_url}
+ provisionerId: proj-webrender
+ workerType: ci-linux
+ deadline: {$fromNow: '1 day'}
+ payload:
+ maxRunTime: 7200
+ image: 'staktrace/webrender-test:debian-v6'
+ env:
+ RUST_BACKTRACE: 'full'
+ RUSTFLAGS: '--deny warnings'
+ command:
+ - /bin/bash
+ - '--login'
+ - '-c'
+ - >-
+ curl https://sh.rustup.rs -sSf | sh -s -- -y &&
+ source $HOME/.cargo/env &&
+ git clone ${repo_url} webrender && cd webrender &&
+ git checkout ${sha} &&
+ servo-tidy &&
+ ci-scripts/linux-debug-tests.sh
+ routes:
+ - "index.project.webrender.ci.${login}.${branch}.linux-debug"
+ # For the OS X jobs we use a pool of machines that we are managing, because
+ # Mozilla releng doesn't have any spare OS X machines for us at this time.
+ # Talk to :kats or :jrmuizel if you need more details about this. The machines
+ # are hooked up to taskcluster using taskcluster-worker; they use a workerpool
+ # of proj-webrender/ci-macos. They are set up with all the dependencies needed
+ # to build and test webrender, including Rust (currently 1.41.1), servo-tidy,
+ # mako, zlib, etc. Note that unlike the docker-worker used for Linux, these
+ # machines WILL persist state from one run to the next, so any cleanup needs
+ # to be handled explicitly.
+
+ # macOS tasks currently disabled, see bug 1639217.
+ # - metadata:
+ # name: OS X release tests
+ # description: Runs release-mode WebRender CI stuff on a OS X TC worker
+ # owner: noreply@mozilla.com
+ # source: ${repo_url}
+ # provisionerId: 'proj-webrender'
+ # workerType: 'ci-macos'
+ # deadline: {$fromNow: '1 day'}
+ # payload:
+ # maxRunTime: 3600
+ # command:
+ # - - /bin/bash
+ # - '--login'
+ # - '-vec'
+ # - |
+ # git clone ${repo_url} webrender
+ # cd webrender
+ # git checkout ${sha}
+ # source $HOME/servotidy-venv/bin/activate
+ # servo-tidy
+ # export RUST_BACKTRACE=full
+ # export RUSTFLAGS='--deny warnings'
+ # export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig:$PKG_CONFIG_PATH"
+ # echo 'exec make -j1 "$@"' > $HOME/make # See #2638
+ # chmod +x $HOME/make
+ # export MAKE="$HOME/make"
+ # ci-scripts/macos-release-tests.sh
+ # routes:
+ # - "index.project.webrender.ci.${login}.${branch}.osx-release"
+ # - metadata:
+ # name: OS X debug tests
+ # description: Runs debug-mode WebRender CI stuff on a OS X TC worker
+ # owner: noreply@mozilla.com
+ # source: ${repo_url}
+ # provisionerId: 'proj-webrender'
+ # workerType: 'ci-macos'
+ # deadline: {$fromNow: '1 day'}
+ # payload:
+ # maxRunTime: 3600
+ # command:
+ # - - /bin/bash
+ # - '--login'
+ # - '-vec'
+ # - |
+ # git clone ${repo_url} webrender
+ # cd webrender
+ # git checkout ${sha}
+ # source $HOME/servotidy-venv/bin/activate
+ # servo-tidy
+ # export RUST_BACKTRACE=full
+ # export RUSTFLAGS='--deny warnings'
+ # export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig:$PKG_CONFIG_PATH"
+ # echo 'exec make -j1 "$@"' > $HOME/make # See #2638
+ # chmod +x $HOME/make
+ # export MAKE="$HOME/make"
+ # ci-scripts/macos-debug-tests.sh
+ # routes:
+ # - "index.project.webrender.ci.${login}.${branch}.osx-debug"
diff --git a/third_party/webrender/Cargo.lock b/third_party/webrender/Cargo.lock
new file mode 100644
index 00000000000..b7055733e57
--- /dev/null
+++ b/third_party/webrender/Cargo.lock
@@ -0,0 +1,2267 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+[[package]]
+name = "adler32"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "aho-corasick"
+version = "0.7.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "andrew"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "line_drawing 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rusttype 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "xml-rs 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "android_glue"
+version = "0.2.3"
+source = "git+https://github.com/rust-windowing/android-rs-glue.git?rev=e3ac6edea5814e1faca0c31ea8fac6877cb929ea#e3ac6edea5814e1faca0c31ea8fac6877cb929ea"
+
+[[package]]
+name = "ansi_term"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "app_units"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "approx"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "hermit-abi 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "backtrace"
+version = "0.3.46"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "backtrace-sys 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "backtrace-sys"
+version = "0.1.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "base64"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "binary-space-partition"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "bincode"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "bitflags"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "block"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "block-buffer"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "block-padding"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "build-parallel"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "byte-tools"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "bytemuck"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "byteorder"
+version = "1.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "bytes"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "cc"
+version = "1.0.50"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "cfg-if"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "cgl"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "gleam 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "chrono"
+version = "0.2.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "clap"
+version = "2.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "cloudabi"
+version = "0.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "cmake"
+version = "0.1.42"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "cocoa"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "compositor"
+version = "0.1.0"
+dependencies = [
+ "compositor-windows 0.1.0",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+]
+
+[[package]]
+name = "compositor-windows"
+version = "0.1.0"
+dependencies = [
+ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "core-foundation-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "core-graphics"
+version = "0.17.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "core-graphics"
+version = "0.22.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics-types 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "core-graphics-types"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "core-text"
+version = "19.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "crossbeam"
+version = "0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memoffset 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "crossbeam-queue"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "cstr"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cstr-macros 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "procedural-masquerade 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "cstr-macros"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "procedural-masquerade 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "deflate"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "derive_more"
+version = "0.99.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "digest"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "direct-composition"
+version = "0.1.0"
+dependencies = [
+ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winit 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "dlib"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "downcast-rs"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "dwrote"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wio 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "either"
+version = "1.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "env_logger"
+version = "0.5.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "euclid"
+version = "0.22.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "expat-sys"
+version = "2.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "fake-simd"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "font-loader"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-text 19.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-fontconfig 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "freetype"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "freetype-sys 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "freetype-sys"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "fuchsia-cprng"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "fuchsia-zircon"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "fuchsia-zircon-sys"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "gl_generator"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "khronos_api 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "xml-rs 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "gl_generator"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "khronos_api 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "xml-rs 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "gleam"
+version = "0.6.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "gleam"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "gl_generator 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "glsl"
+version = "4.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "nom 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "glsl-to-cxx"
+version = "0.1.0"
+dependencies = [
+ "glsl 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "glslopt"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "glutin"
+version = "0.21.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "android_glue 0.2.3 (git+https://github.com/rust-windowing/android-rs-glue.git?rev=e3ac6edea5814e1faca0c31ea8fac6877cb929ea)",
+ "cgl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cocoa 0.18.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin_egl_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin_emscripten_sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin_gles2_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin_glx_sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin_wgl_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winit 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "glutin_egl_sys"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "glutin_emscripten_sys"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "glutin_gles2_sys"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "glutin_glx_sys"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "x11-dl 2.18.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "glutin_wgl_sys"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "httparse"
+version = "1.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "humantime"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "idna"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "image"
+version = "0.23.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bytemuck 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-rational 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "png 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "inflate"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "iovec"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "itoa"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "jobserver"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "kernel32-sys"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "khronos_api"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "lazycell"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "libc"
+version = "0.2.68"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "libloading"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "line_drawing"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "linked-hash-map"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "lock_api"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "log"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "malloc_buf"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "malloc_size_of_derive"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
+ "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "matches"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "maybe-uninit"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "memchr"
+version = "2.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "memmap"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "memoffset"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "minidl"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "mio"
+version = "0.6.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
+ "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "mio-extras"
+version = "2.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "miow"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "mozangle"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "net2"
+version = "0.2.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "nix"
+version = "0.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "nom"
+version = "5.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "num"
+version = "0.1.42"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.42"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "num-iter"
+version = "0.1.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "num-rational"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "hermit-abi 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "objc"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "opaque-debug"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "ordered-float"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "osmesa-src"
+version = "0.1.1"
+source = "git+https://github.com/servo/osmesa-src#1a9519c3675ebc1117cbb18ed6db420b5941cb8b"
+
+[[package]]
+name = "osmesa-sys"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "peek-poke"
+version = "0.2.0"
+dependencies = [
+ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "peek-poke-derive 0.2.1",
+]
+
+[[package]]
+name = "peek-poke-derive"
+version = "0.2.1"
+dependencies = [
+ "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
+ "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "plane-split"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "png"
+version = "0.16.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "deflate 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "inflate 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "proc-macro2"
+version = "0.4.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "procedural-masquerade"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "quick-error"
+version = "1.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "quote"
+version = "0.6.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "rand_core"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_hc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "raw-window-handle"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rayon"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rdrand"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.1.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "regex"
+version = "1.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)",
+ "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "ron"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "rustc_version"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rusttype"
+version = "0.7.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rusttype 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rusttype"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "approx 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "stb_truetype 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi-util 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "semver"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "semver-parser"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "serde"
+version = "1.0.106"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "serde_bytes"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.106"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.51"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ryu 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "servo-fontconfig"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-fontconfig-sys 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "servo-fontconfig-sys"
+version = "5.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "expat-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "freetype-sys 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "sha-1"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "shared_library"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "sig"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "slab"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "smallvec"
+version = "0.6.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "smithay-client-toolkit"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "andrew 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-commons 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-protocols 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "stb_truetype"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "strsim"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "svg_fmt"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "swgl"
+version = "0.1.0"
+dependencies = [
+ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glsl-to-cxx 0.1.0",
+ "webrender_build 0.0.1",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "synstructure"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi-util 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "tileview"
+version = "0.1.0"
+dependencies = [
+ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+ "webrender_api 0.61.0",
+]
+
+[[package]]
+name = "time"
+version = "0.1.42"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "tracy-rs"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "minidl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "typenum"
+version = "1.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "unicode-bidi"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "unicode-normalization"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "smallvec 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "unicode-width"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "unicode-xid"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "url"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "vec_map"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "version_check"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "void"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "walkdir"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-util 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "wasi"
+version = "0.9.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "wayland-client"
+version = "0.21.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "downcast-rs 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-commons 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-scanner 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-sys 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "wayland-commons"
+version = "0.21.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-sys 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "wayland-protocols"
+version = "0.21.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-commons 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-scanner 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-sys 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "wayland-scanner"
+version = "0.21.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "xml-rs 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "wayland-sys"
+version = "0.21.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "webrender"
+version = "0.61.0"
+dependencies = [
+ "backtrace 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)",
+ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "build-parallel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-text 19.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cstr 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "dwrote 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "freetype 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glslopt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "image 0.23.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "plane-split 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "png 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)",
+ "sig 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "smallvec 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "svg_fmt 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tracy-rs 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender_api 0.61.0",
+ "webrender_build 0.0.1",
+ "wr_malloc_size_of 0.0.1",
+ "ws 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "webrender-examples"
+version = "0.1.0"
+dependencies = [
+ "app_units 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+ "winit 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "webrender_api"
+version = "0.61.0"
+dependencies = [
+ "app_units 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "derive_more 0.99.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "peek-poke 0.2.0",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_bytes 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wr_malloc_size_of 0.0.1",
+]
+
+[[package]]
+name = "webrender_build"
+version = "0.0.1"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "winapi"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "winapi"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "winapi-build"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "winit"
+version = "0.19.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "android_glue 0.2.3 (git+https://github.com/rust-windowing/android-rs-glue.git?rev=e3ac6edea5814e1faca0c31ea8fac6877cb929ea)",
+ "backtrace 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cocoa 0.18.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "smithay-client-toolkit 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "x11-dl 2.18.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "wio"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "wr_malloc_size_of"
+version = "0.0.1"
+dependencies = [
+ "app_units 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "wrench"
+version = "0.3.0"
+dependencies = [
+ "app_units 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "dwrote 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "font-loader 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "image 0.23.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "osmesa-src 0.1.1 (git+https://github.com/servo/osmesa-src)",
+ "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)",
+ "swgl 0.1.0",
+ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+ "webrender_api 0.61.0",
+ "winit 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "ws"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "ws2_32-sys"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "x11-dl"
+version = "2.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "xdg"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "xml-rs"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "yaml-rust"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "yaml-rust"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[metadata]
+"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2"
+"checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada"
+"checksum andrew 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9b7f09f89872c2b6b29e319377b1fbe91c6f5947df19a25596e121cf19a7b35e"
+"checksum android_glue 0.2.3 (git+https://github.com/rust-windowing/android-rs-glue.git?rev=e3ac6edea5814e1faca0c31ea8fac6877cb929ea)" = "<none>"
+"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
+"checksum app_units 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fc3ec9d4c47b25a5a9e5c848e053640331c7cedb1637434d75db68b79fee8a7f"
+"checksum approx 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3"
+"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
+"checksum backtrace 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)" = "b1e692897359247cc6bb902933361652380af0f1b7651ae5c5013407f30e109e"
+"checksum backtrace-sys 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7de8aba10a69c8e8d7622c5710229485ec32e9d55fdad160ea559c086fdcd118"
+"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
+"checksum binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff"
+"checksum bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf"
+"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
+"checksum block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
+"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
+"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
+"checksum build-parallel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4b5f8b148c1884e660514fb1205f36b595e96df4daac5ad526a23db44937de77"
+"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
+"checksum bytemuck 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37fa13df2292ecb479ec23aa06f4507928bef07839be9ef15281411076629431"
+"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
+"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"
+"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd"
+"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
+"checksum cgl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "55e7ec0b74fe5897894cbc207092c577e87c52f8a59e8ca8d97ef37551f60a49"
+"checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"
+"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
+"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
+"checksum cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62"
+"checksum cocoa 0.18.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1706996401131526e36b3b49f0c4d912639ce110996f3ca144d78946727bce54"
+"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d"
+"checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171"
+"checksum core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3b5ed8e7e76c45974e15e41bfa8d5b0483cd90191639e01d8f5f1e606299d3fb"
+"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b"
+"checksum core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
+"checksum core-foundation-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9a21fa21941700a3cd8fcb4091f361a6a712fac632f85d9f487cc892045d55c6"
+"checksum core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56790968ab1c8a1202a102e6de05fc6e1ec87da99e4e93e9a7d13efbfc1e95a9"
+"checksum core-graphics 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f6082396a349fa49674ba1bda4077332a18bf150e8fa75745ece07085e29a113"
+"checksum core-graphics-types 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e92f5d519093a4178296707dbaa3880eae85a5ef5386675f361a1cf25376e93c"
+"checksum core-text 19.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "04dfae50af11e72657fe7174cddb1ecddc5398037f7f6f39533ad69207c9a4e2"
+"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
+"checksum crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "bd66663db5a988098a89599d4857919b3acf7f61402e61365acfd3919857b9be"
+"checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285"
+"checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
+"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db"
+"checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
+"checksum cstr 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "19f7a08ed4ecd7e077d4cee63937473e6f7cf57b702a9114ef41751b2cbc0f60"
+"checksum cstr-macros 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "cd670e5ff58768ef624207fb95709ce63b8d05573fb9a05165f0eef471ea6a3a"
+"checksum deflate 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e7e5d2a2273fed52a7f947ee55b092c4057025d7a3e04e5ecdbd25d6c3fb1bd7"
+"checksum derive_more 0.99.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e2323f3f47db9a0e77ce7a300605d8d2098597fc451ed1a97bb1f6411bb550a7"
+"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
+"checksum dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "77e51249a9d823a4cb79e3eca6dcd756153e8ed0157b6c04775d04bf1b13b76a"
+"checksum downcast-rs 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "52ba6eb47c2131e784a38b726eb54c1e1484904f013e576a25354d0124161af6"
+"checksum dwrote 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b"
+"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
+"checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38"
+"checksum euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7ab0e07e345fb061928646949fdf5fb888e5d75a57385e7f5856e45be289e745"
+"checksum expat-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa"
+"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
+"checksum font-loader 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c49d6b4c11dca1a1dd931a34a9f397e2da91abe3de4110505f3530a80e560b52"
+"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+"checksum freetype 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bee38378a9e3db1cc693b4f88d166ae375338a0ff75cb8263e1c601d51f35dc6"
+"checksum freetype-sys 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a"
+"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
+"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
+"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
+"checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
+"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
+"checksum gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ca98bbde17256e02d17336a6bdb5a50f7d0ccacee502e191d3e3d0ec2f96f84a"
+"checksum gl_generator 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d"
+"checksum gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdef5b9df6d3a261b80a5ac55e13bf93945725df2463c1b0a2e5a527dce0d37"
+"checksum gleam 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "cae10d7c99d0e77b4766e850a60898a17c1abaf01075531f1066f03dc7dc5fc5"
+"checksum glsl 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "766443890761b3c4edcce86cafaac97971b200662fbdd0446eb7c6b99b4401ea"
+"checksum glslopt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f22b383fcf6f85c4a268af39a0758ec40970e5f9f8fe9809e4415d48409b8379"
+"checksum glutin 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5371b35b309dace06be1b81b5f6adb1c9de578b7dbe1e74bf7e4ef762cf6febd"
+"checksum glutin_egl_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "772edef3b28b8ad41e4ea202748e65eefe8e5ffd1f4535f1219793dbb20b3d4c"
+"checksum glutin_emscripten_sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80de4146df76e8a6c32b03007bc764ff3249dcaeb4f675d68a06caf1bac363f1"
+"checksum glutin_gles2_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07e853d96bebcb8e53e445225c3009758c6f5960d44f2543245f6f07b567dae0"
+"checksum glutin_glx_sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "08c243de74d6cf5ea100c788826d2fb9319de315485dd4b310811a663b3809c3"
+"checksum glutin_wgl_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a93dba7ee3a0feeac0f437141ff25e71ce2066bcf1a706acab1559ffff94eb6a"
+"checksum hermit-abi 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "725cf19794cf90aa94e65050cb4191ff5d8fa87a498383774c47b332e3af952e"
+"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"
+"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
+"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
+"checksum image 0.23.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bfc5483f8d5afd3653b38a196c52294dcb239c3e1a5bade1990353ea13bcf387"
+"checksum inflate 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff"
+"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
+"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e"
+"checksum jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2"
+"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
+"checksum khronos_api 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
+"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"
+"checksum libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0"
+"checksum libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753"
+"checksum line_drawing 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5cc7ad3d82c845bdb5dde34ffdcc7a5fb4d2996e1e1ee0f19c33bc80e15196b9"
+"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83"
+"checksum lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75"
+"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
+"checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
+"checksum malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e37c5d4cd9473c5f4c9c111f033f15d4df9bd378fdf615944e360a4f55a05f0b"
+"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
+"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
+"checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
+"checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
+"checksum memoffset 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8"
+"checksum minidl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "647da2489d438eb707e9bcffe0e47fb6f3f355ed288120740fc1e614cfadb9e9"
+"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f"
+"checksum mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19"
+"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
+"checksum mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b74826530a7c9fffbe28d27d0499433bd51f67b4f45d658ba23e62499307cc17"
+"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
+"checksum nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce"
+"checksum nom 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b471253da97532da4b61552249c521e01e736071f71c1a4f7ebbfbf0a06aad6"
+"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e"
+"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba"
+"checksum num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00"
+"checksum num-rational 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef"
+"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
+"checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6"
+"checksum objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
+"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
+"checksum ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518"
+"checksum osmesa-src 0.1.1 (git+https://github.com/servo/osmesa-src)" = "<none>"
+"checksum osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b"
+"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"
+"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"
+"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
+"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"
+"checksum plane-split 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2211e7ccc9b6260779dd9bad59f7b10889d6361974623b9e405afd7e7e764654"
+"checksum png 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)" = "910f09135b1ed14bb16be445a8c23ddf0777eca485fbfc7cee00d81fecab158a"
+"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b"
+"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
+"checksum proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3"
+"checksum procedural-masquerade 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1383dff4092fe903ac180e391a8d4121cc48f08ccf850614b0290c6673b69d"
+"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
+"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
+"checksum quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f"
+"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"
+"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
+"checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
+"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
+"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
+"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+"checksum raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211"
+"checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098"
+"checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9"
+"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
+"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
+"checksum regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7f6946991529684867e47d86474e3a6d0c0ab9b82d5821e314b1ede31fa3a4b3"
+"checksum regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae"
+"checksum ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ece421e0c4129b90e4a35b6f625e472e96c552136f5093a2f4fa2bbb75a62d5"
+"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
+"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
+"checksum rusttype 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "310942406a39981bed7e12b09182a221a29e0990f3e7e0c971f131922ed135d5"
+"checksum rusttype 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f61411055101f7b60ecf1041d87fb74205fb20b0c7a723f07ef39174cf6b4c0"
+"checksum ryu 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535622e6be132bccd223f4bb2b8ac8d53cda3c7a6394944d3b2b33fb974f9d76"
+"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+"checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
+"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
+"checksum serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)" = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399"
+"checksum serde_bytes 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "325a073952621257820e7a3469f55ba4726d8b28657e7e36653d1c36dc2c84ae"
+"checksum serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)" = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c"
+"checksum serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)" = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9"
+"checksum servo-fontconfig 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c"
+"checksum servo-fontconfig-sys 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388"
+"checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df"
+"checksum shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11"
+"checksum sig 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6567e29578f9bfade6a5d94a32b9a4256348358d2a3f448cab0021f9a02614a2"
+"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
+"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6"
+"checksum smallvec 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05720e22615919e4734f6a99ceae50d00226c3c5aca406e102ebc33298214e0a"
+"checksum smithay-client-toolkit 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2ccb8c57049b2a34d2cc2b203fa785020ba0129d31920ef0d317430adaf748fa"
+"checksum stb_truetype 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51"
+"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
+"checksum svg_fmt 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb1df15f412ee2e9dfc1c504260fa695c1c3f10fe9f4a6ee2d2184d7d6450e2"
+"checksum syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "0df0eb663f387145cab623dea85b09c2c5b4b0aef44e945d928e682fce71bb03"
+"checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545"
+"checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f"
+"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
+"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
+"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
+"checksum tracy-rs 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dbbb439715d4c258415c7cbf137be32a4f54f7348724076145ede565ee2142e8"
+"checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9"
+"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
+"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4"
+"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
+"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
+"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
+"checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb"
+"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
+"checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce"
+"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
+"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d"
+"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+"checksum wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "49963e5f9eeaf637bfcd1b9f0701c99fd5cd05225eb51035550d4272806f2713"
+"checksum wayland-commons 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "40c08896768b667e1df195d88a62a53a2d1351a1ed96188be79c196b35bb32ec"
+"checksum wayland-protocols 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "4afde2ea2a428eee6d7d2c8584fdbe8b82eee8b6c353e129a434cd6e07f42145"
+"checksum wayland-scanner 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3828c568714507315ee425a9529edc4a4aa9901409e373e9e0027e7622b79e"
+"checksum wayland-sys 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "520ab0fd578017a0ee2206623ba9ef4afe5e8f23ca7b42f6acfba2f4e66b1628"
+"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
+"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
+"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
+"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+"checksum winapi-util 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fa515c5163a99cc82bab70fd3bfdd36d827be85de63737b40fcef2ce084a436e"
+"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+"checksum winit 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1e96eb4bb472fa43e718e8fa4aef82f86cd9deac9483a1e1529230babdb394a8"
+"checksum wio 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5"
+"checksum ws 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a2c47b5798ccc774ffb93ff536aec7c4275d722fd9c740c83cdd1af1f2d94"
+"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
+"checksum x11-dl 2.18.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8"
+"checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57"
+"checksum xml-rs 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2bb76e5c421bbbeb8924c60c030331b345555024d56261dae8f3e786ed817c23"
+"checksum yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992"
+"checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d"
diff --git a/third_party/webrender/Cargo.toml b/third_party/webrender/Cargo.toml
new file mode 100644
index 00000000000..bb6b204412a
--- /dev/null
+++ b/third_party/webrender/Cargo.toml
@@ -0,0 +1,25 @@
+[workspace]
+members = [
+ "direct-composition",
+ "examples",
+ "webrender",
+ "webrender_api",
+ "wrench",
+ "example-compositor/compositor",
+ "tileview",
+]
+
+[profile.release]
+debug = true
+panic = "abort"
+
+[profile.dev]
+panic = "abort"
+
+# Running wrench on android built with master cargo-apk results in a crash
+# due to a mismatched version of android_glue (a dependency of winit).
+# Override it to use a suitable version of android_glue.
+# See https://github.com/rust-windowing/android-rs-glue/issues/239.
+# This can be removed once a new version of android_glue is published to crates.io.
+[patch.crates-io]
+android_glue = { git = "https://github.com/rust-windowing/android-rs-glue.git", rev = "e3ac6edea5814e1faca0c31ea8fac6877cb929ea" }
diff --git a/third_party/webrender/LICENSE b/third_party/webrender/LICENSE
new file mode 100644
index 00000000000..398385c9fb9
--- /dev/null
+++ b/third_party/webrender/LICENSE
@@ -0,0 +1,374 @@
+ Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+means each individual or legal entity that creates, contributes to
+the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+means the combination of the Contributions of others (if any) used
+by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+means Source Code Form to which the initial Contributor has attached
+the notice in Exhibit A, the Executable Form of such Source Code
+Form, and Modifications of such Source Code Form, in each case
+including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+means
+
+(a) that the initial Contributor has attached the notice described
+in Exhibit B to the Covered Software; or
+
+(b) that the Covered Software was made available under the terms of
+version 1.1 or earlier of the License, but not also under the
+terms of a Secondary License.
+
+1.6. "Executable Form"
+means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+means a work that combines Covered Software with other material, in
+a separate file or files, that is not Covered Software.
+
+1.8. "License"
+means this document.
+
+1.9. "Licensable"
+means having the right to grant, to the maximum extent possible,
+whether at the time of the initial grant or subsequently, any and
+all of the rights conveyed by this License.
+
+1.10. "Modifications"
+means any of the following:
+
+(a) any file in Source Code Form that results from an addition to,
+deletion from, or modification of the contents of Covered
+Software; or
+
+(b) any new file in Source Code Form that contains any Covered
+Software.
+
+1.11. "Patent Claims" of a Contributor
+means any patent claim(s), including without limitation, method,
+process, and apparatus claims, in any patent Licensable by such
+Contributor that would be infringed, but for the grant of the
+License, by the making, using, selling, offering for sale, having
+made, import, or transfer of either its Contributions or its
+Contributor Version.
+
+1.12. "Secondary License"
+means either the GNU General Public License, Version 2.0, the GNU
+Lesser General Public License, Version 2.1, the GNU Affero General
+Public License, Version 3.0, or any later versions of those
+licenses.
+
+1.13. "Source Code Form"
+means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+means an individual or a legal entity exercising rights under this
+License. For legal entities, "You" includes any entity that
+controls, is controlled by, or is under common control with You. For
+purposes of this definition, "control" means (a) the power, direct
+or indirect, to cause the direction or management of such entity,
+whether by contract or otherwise, or (b) ownership of more than
+fifty percent (50%) of the outstanding shares or beneficial
+ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+Licensable by such Contributor to use, reproduce, make available,
+modify, display, perform, distribute, and otherwise exploit its
+Contributions, either on an unmodified basis, with Modifications, or
+as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+for sale, have made, import, and otherwise transfer either its
+Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+or
+
+(b) for infringements caused by: (i) Your and any other third party's
+modifications of Covered Software, or (ii) the combination of its
+Contributions with other software (except as part of its Contributor
+Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+Form, as described in Section 3.1, and You must inform recipients of
+the Executable Form how they can obtain a copy of such Source Code
+Form by reasonable means in a timely manner, at a charge no more
+than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+License, or sublicense it under different terms, provided that the
+license for the Executable Form does not attempt to limit or alter
+the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+This Source Code Form is subject to the terms of the Mozilla Public
+License, v. 2.0. If a copy of the MPL was not distributed with this
+file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+This Source Code Form is "Incompatible With Secondary Licenses", as
+defined by the Mozilla Public License, v. 2.0.
+
diff --git a/third_party/webrender/README.md b/third_party/webrender/README.md
new file mode 100644
index 00000000000..6162a5f86b1
--- /dev/null
+++ b/third_party/webrender/README.md
@@ -0,0 +1,53 @@
+# WebRender
+
+[![Version](https://img.shields.io/crates/v/webrender.svg)](https://crates.io/crates/webrender)
+
+WebRender is a GPU-based 2D rendering engine written in [Rust](https://www.rust-lang.org/). [Firefox](https://www.mozilla.org/firefox), the research web browser [Servo](https://github.com/servo/servo), and other GUI frameworks draw with it. It currently uses the OpenGL API internally.
+
+Note that the canonical home for this code is in gfx/wr folder of the
+mozilla-central repository at https://hg.mozilla.org/mozilla-central. The
+Github repository at https://github.com/servo/webrender should be considered
+a downstream mirror, although it contains additional metadata (such as Github
+wiki pages) that do not exist in mozilla-central. Pull requests against the
+Github repository are still being accepted, although once reviewed, they will
+be landed on mozilla-central first and then mirrored back. If you are familiar
+with the mozilla-central contribution workflow, filing bugs in
+[Bugzilla](https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=Graphics%3A%20WebRender)
+and submitting patches there would be preferred.
+
+## Update as a Dependency
+After updating shaders in WebRender, go to servo and:
+
+ * Go to the servo directory and do ./mach update-cargo -p webrender
+ * Create a pull request to servo
+
+
+## Use WebRender with Servo
+To use a local copy of WebRender with servo, go to your servo build directory and:
+
+ * Edit Cargo.toml
+ * Add at the end of the file:
+
+```
+[patch."https://github.com/servo/webrender"]
+"webrender" = { path = "<path>/webrender" }
+"webrender_api" = { path = "<path>/webrender_api" }
+```
+
+where `<path>` is the path to your local copy of WebRender.
+
+ * Build as normal
+
+## Documentation
+
+The Wiki has a [few pages](https://github.com/servo/webrender/wiki/) describing the internals and conventions of WebRender.
+
+## Testing
+
+Tests run using OSMesa to get consistent rendering across platforms.
+
+Still there may be differences depending on font libraries on your system, for
+example.
+
+See [this gist](https://gist.github.com/finalfantasia/129cae811e02bf4551ac) for
+how to make the text tests useful in Fedora, for example.
diff --git a/third_party/webrender/ci-scripts/docker-image/Dockerfile b/third_party/webrender/ci-scripts/docker-image/Dockerfile
new file mode 100644
index 00000000000..c187172f5db
--- /dev/null
+++ b/third_party/webrender/ci-scripts/docker-image/Dockerfile
@@ -0,0 +1,12 @@
+FROM debian:buster-20200422
+
+# Debian 10 doesn't have openjdk-8, so add the Debian 9 repository, which contains it.
+RUN sed s/buster/stretch/ /etc/apt/sources.list | tee /etc/apt/sources.list.d/stretch.list
+
+COPY setup.sh /root
+RUN cd /root && ./setup.sh
+
+RUN useradd -d /home/worker -s /bin/bash -m worker
+USER worker
+WORKDIR /home/worker
+CMD /bin/bash
diff --git a/third_party/webrender/ci-scripts/docker-image/setup.sh b/third_party/webrender/ci-scripts/docker-image/setup.sh
new file mode 100755
index 00000000000..4a20147f3b0
--- /dev/null
+++ b/third_party/webrender/ci-scripts/docker-image/setup.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+set -o errexit
+set -o nounset
+set -o pipefail
+set -o xtrace
+
+test "$(whoami)" == 'root'
+
+# Install stuff we need
+apt-get -y update
+apt-get install -y \
+ bzip2 \
+ cmake \
+ curl \
+ gcc \
+ git \
+ g++ \
+ libfontconfig1-dev \
+ libgl1-mesa-dev \
+ libx11-dev \
+ openjdk-8-jdk \
+ pkg-config \
+ python \
+ python-mako \
+ python-pip \
+ python-setuptools \
+ python-voluptuous \
+ python-yaml \
+ software-properties-common
+
+# Other stuff we need
+pip install servo-tidy==0.3.0
diff --git a/third_party/webrender/ci-scripts/linux-debug-tests.sh b/third_party/webrender/ci-scripts/linux-debug-tests.sh
new file mode 100755
index 00000000000..2c2fc756b63
--- /dev/null
+++ b/third_party/webrender/ci-scripts/linux-debug-tests.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+# This must be run from the root webrender directory!
+# Users may set the CARGOFLAGS environment variable to pass
+# additional flags to cargo if desired.
+
+set -o errexit
+set -o nounset
+set -o pipefail
+set -o xtrace
+
+CARGOFLAGS=${CARGOFLAGS:-"--verbose"} # default to --verbose if not set
+
+pushd webrender
+cargo build ${CARGOFLAGS} --no-default-features
+cargo build ${CARGOFLAGS} --no-default-features --features capture
+cargo build ${CARGOFLAGS} --features capture,profiler
+cargo build ${CARGOFLAGS} --features replay
+popd
+
+pushd wrench
+cargo build ${CARGOFLAGS} --features env_logger
+OPTIMIZED=0 python script/headless.py reftest
+popd
+
+pushd examples
+cargo build ${CARGOFLAGS}
+popd
+
+cargo test ${CARGOFLAGS} \
+ --all --exclude compositor-windows --exclude compositor \
+ --exclude glsl-to-cxx --exclude swgl
diff --git a/third_party/webrender/ci-scripts/linux-release-tests.sh b/third_party/webrender/ci-scripts/linux-release-tests.sh
new file mode 100755
index 00000000000..f89fc43c44f
--- /dev/null
+++ b/third_party/webrender/ci-scripts/linux-release-tests.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+# This must be run from the root webrender directory!
+# Users may set the CARGOFLAGS environment variable to pass
+# additional flags to cargo if desired.
+
+set -o errexit
+set -o nounset
+set -o pipefail
+set -o xtrace
+
+CARGOFLAGS=${CARGOFLAGS:-""} # default to empty if not set
+
+pushd wrench
+python script/headless.py reftest
+python script/headless.py rawtest
+cargo build ${CARGOFLAGS} --release
+popd
diff --git a/third_party/webrender/ci-scripts/macos-debug-tests.sh b/third_party/webrender/ci-scripts/macos-debug-tests.sh
new file mode 100755
index 00000000000..2325475d90d
--- /dev/null
+++ b/third_party/webrender/ci-scripts/macos-debug-tests.sh
@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+# This must be run from the root webrender directory!
+# Users may set the CARGOFLAGS environment variable to pass
+# additional flags to cargo if desired.
+
+# Note that this script is run in a special cross-compiling configuration,
+# where CARGOTESTFLAGS includes `--no-run`, and the binaries produced by
+# `cargo test` are run on a different machine. When making changes to this
+# file, please ensure any such binaries produced by `cargo test` are not
+# deleted, or they may not get run as expected.
+
+set -o errexit
+set -o nounset
+set -o pipefail
+set -o xtrace
+
+CARGOFLAGS=${CARGOFLAGS:-"--verbose"} # default to --verbose if not set
+CARGOTESTFLAGS=${CARGOTESTFLAGS:-""}
+
+pushd webrender
+cargo check ${CARGOFLAGS} --no-default-features
+cargo check ${CARGOFLAGS} --no-default-features --features capture
+cargo check ${CARGOFLAGS} --features capture,profiler
+cargo check ${CARGOFLAGS} --features replay
+popd
+
+pushd wrench
+cargo check ${CARGOFLAGS} --features env_logger
+popd
+
+pushd examples
+cargo check ${CARGOFLAGS}
+popd
+
+cargo test ${CARGOFLAGS} ${CARGOTESTFLAGS} \
+ --all --exclude compositor-windows --exclude compositor \
+ --exclude glsl-to-cxx --exclude swgl
diff --git a/third_party/webrender/ci-scripts/macos-release-tests.sh b/third_party/webrender/ci-scripts/macos-release-tests.sh
new file mode 100755
index 00000000000..dc8c205ad53
--- /dev/null
+++ b/third_party/webrender/ci-scripts/macos-release-tests.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+# This must be run from the root webrender directory!
+# Users may set the CARGOFLAGS environment variable to pass
+# additional flags to cargo if desired.
+# The WRENCH_BINARY environment variable, if set, is used to run
+# the precached reftest.
+
+set -o errexit
+set -o nounset
+set -o pipefail
+set -o xtrace
+
+CARGOFLAGS=${CARGOFLAGS:-""} # default to empty if not set
+WRENCH_BINARY=${WRENCH_BINARY:-""}
+
+pushd wrench
+python script/headless.py reftest
+if [[ -z "${WRENCH_BINARY}" ]]; then
+ cargo build ${CARGOFLAGS} --release
+ WRENCH_BINARY="../target/release/wrench"
+fi
+"${WRENCH_BINARY}" --precache \
+ reftest reftests/clip/fixed-position-clipping.yaml
+popd
diff --git a/third_party/webrender/ci-scripts/set-screenresolution.ps1 b/third_party/webrender/ci-scripts/set-screenresolution.ps1
new file mode 100644
index 00000000000..2f584434177
--- /dev/null
+++ b/third_party/webrender/ci-scripts/set-screenresolution.ps1
@@ -0,0 +1,124 @@
+# http://blogs.technet.com/b/heyscriptingguy/archive/2010/07/07/hey-scripting-guy-how-can-i-change-my-desktop-monitor-resolution-via-windows-powershell.aspx
+
+Function Set-ScreenResolution {
+param (
+[Parameter(Mandatory=$true,
+ Position = 0)]
+[int]
+$Width,
+[Parameter(Mandatory=$true,
+ Position = 1)]
+[int]
+$Height
+)
+$pinvokeCode = @"
+using System;
+using System.Runtime.InteropServices;
+namespace Resolution
+{
+ [StructLayout(LayoutKind.Sequential)]
+ public struct DEVMODE1
+ {
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string dmDeviceName;
+ public short dmSpecVersion;
+ public short dmDriverVersion;
+ public short dmSize;
+ public short dmDriverExtra;
+ public int dmFields;
+ public short dmOrientation;
+ public short dmPaperSize;
+ public short dmPaperLength;
+ public short dmPaperWidth;
+ public short dmScale;
+ public short dmCopies;
+ public short dmDefaultSource;
+ public short dmPrintQuality;
+ public short dmColor;
+ public short dmDuplex;
+ public short dmYResolution;
+ public short dmTTOption;
+ public short dmCollate;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string dmFormName;
+ public short dmLogPixels;
+ public short dmBitsPerPel;
+ public int dmPelsWidth;
+ public int dmPelsHeight;
+ public int dmDisplayFlags;
+ public int dmDisplayFrequency;
+ public int dmICMMethod;
+ public int dmICMIntent;
+ public int dmMediaType;
+ public int dmDitherType;
+ public int dmReserved1;
+ public int dmReserved2;
+ public int dmPanningWidth;
+ public int dmPanningHeight;
+ };
+ class User_32
+ {
+ [DllImport("user32.dll")]
+ public static extern int EnumDisplaySettings(string deviceName, int modeNum, ref DEVMODE1 devMode);
+ [DllImport("user32.dll")]
+ public static extern int ChangeDisplaySettings(ref DEVMODE1 devMode, int flags);
+ public const int ENUM_CURRENT_SETTINGS = -1;
+ public const int CDS_UPDATEREGISTRY = 0x01;
+ public const int CDS_TEST = 0x02;
+ public const int DISP_CHANGE_SUCCESSFUL = 0;
+ public const int DISP_CHANGE_RESTART = 1;
+ public const int DISP_CHANGE_FAILED = -1;
+ }
+ public class PrmaryScreenResolution
+ {
+ static public string ChangeResolution(int width, int height)
+ {
+ DEVMODE1 dm = GetDevMode1();
+ if (0 != User_32.EnumDisplaySettings(null, User_32.ENUM_CURRENT_SETTINGS, ref dm))
+ {
+ dm.dmPelsWidth = width;
+ dm.dmPelsHeight = height;
+ int iRet = User_32.ChangeDisplaySettings(ref dm, User_32.CDS_TEST);
+ if (iRet == User_32.DISP_CHANGE_FAILED)
+ {
+ return "Unable To Process Your Request. Sorry For This Inconvenience.";
+ }
+ else
+ {
+ iRet = User_32.ChangeDisplaySettings(ref dm, User_32.CDS_UPDATEREGISTRY);
+ switch (iRet)
+ {
+ case User_32.DISP_CHANGE_SUCCESSFUL:
+ {
+ return "Success";
+ }
+ case User_32.DISP_CHANGE_RESTART:
+ {
+ return "You Need To Reboot For The Change To Happen.\n If You Feel Any Problem After Rebooting Your Machine\nThen Try To Change Resolution In Safe Mode.";
+ }
+ default:
+ {
+ return "Failed To Change The Resolution";
+ }
+ }
+ }
+ }
+ else
+ {
+ return "Failed To Change The Resolution.";
+ }
+ }
+ private static DEVMODE1 GetDevMode1()
+ {
+ DEVMODE1 dm = new DEVMODE1();
+ dm.dmDeviceName = new String(new char[32]);
+ dm.dmFormName = new String(new char[32]);
+ dm.dmSize = (short)Marshal.SizeOf(dm);
+ return dm;
+ }
+ }
+}
+"@
+Add-Type $pinvokeCode -ErrorAction SilentlyContinue
+[Resolution.PrmaryScreenResolution]::ChangeResolution($width,$height)
+}
diff --git a/third_party/webrender/ci-scripts/windows-tests.cmd b/third_party/webrender/ci-scripts/windows-tests.cmd
new file mode 100755
index 00000000000..c3607a90287
--- /dev/null
+++ b/third_party/webrender/ci-scripts/windows-tests.cmd
@@ -0,0 +1,36 @@
+:: This Source Code Form is subject to the terms of the Mozilla Public
+:: License, v. 2.0. If a copy of the MPL was not distributed with this
+:: file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+:: This must be run from the root webrender directory!
+:: Users may set the CARGOFLAGS environment variable to pass
+:: additional flags to cargo if desired.
+
+if NOT DEFINED CARGOFLAGS SET CARGOFLAGS=--verbose
+
+pushd webrender_api
+cargo test %CARGOFLAGS%
+if %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
+popd
+
+pushd webrender
+cargo test %CARGOFLAGS%
+if %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
+popd
+
+pushd wrench
+cargo test --verbose
+if %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
+cargo run --release -- --angle reftest
+if %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
+popd
+
+pushd examples
+cargo check --verbose
+if %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
+popd
+
+pushd direct-composition
+cargo check --verbose
+if %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
+popd
diff --git a/third_party/webrender/debugger/.babelrc b/third_party/webrender/debugger/.babelrc
new file mode 100644
index 00000000000..e81239406e3
--- /dev/null
+++ b/third_party/webrender/debugger/.babelrc
@@ -0,0 +1,6 @@
+{
+ "presets": [
+ ["env", { "modules": false }],
+ "stage-3"
+ ]
+}
diff --git a/third_party/webrender/debugger/.gitignore b/third_party/webrender/debugger/.gitignore
new file mode 100644
index 00000000000..15115487ab7
--- /dev/null
+++ b/third_party/webrender/debugger/.gitignore
@@ -0,0 +1,11 @@
+.DS_Store
+node_modules/
+npm-debug.log
+yarn-error.log
+
+# Editor directories and files
+.idea
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
diff --git a/third_party/webrender/debugger/README.md b/third_party/webrender/debugger/README.md
new file mode 100644
index 00000000000..d41b5ce16aa
--- /dev/null
+++ b/third_party/webrender/debugger/README.md
@@ -0,0 +1,23 @@
+# WebRender Debugger
+A web based debugger for WebRender.
+
+## Using the debugger
+Build your application with the debugger feature enabled, for example in wrench:
+
+```
+cargo build --features=debugger
+```
+
+Now, open your browser and open the debugger/index.html file. Click Connect and
+the debugger will attempt to connect to WR via websocket.
+
+## Using the debugger with Gecko
+
+In the Gecko source tree, open ```gfx/webrender_bindings/Cargo.toml``` in a text editor.
+
+Add ```features = ['debugger']``` to the end of the file (in the ```dependencies.webrender``` section).
+
+Vendor the rust dependencies locally for the debugger (we don't want these committed to the repo):
+```./mach vendor rust```
+
+Now, build and run as usual, and the debugger will be available.
diff --git a/third_party/webrender/debugger/dist/build.js b/third_party/webrender/debugger/dist/build.js
new file mode 100644
index 00000000000..e8d4439034d
--- /dev/null
+++ b/third_party/webrender/debugger/dist/build.js
@@ -0,0 +1,13 @@
+!function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var i={};t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=16)}([function(e,t){function i(e,t){var i=e[1]||"",o=e[3];if(!o)return i;if(t&&"function"==typeof btoa){var a=n(o);return[i].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([a]).join("\n")}return[i].join("\n")}function n(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=i(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(n[a]=!0)}for(o=0;o<e.length;o++){var r=e[o];"number"==typeof r[0]&&n[r[0]]||(i&&!r[2]?r[2]=i:i&&(r[2]="("+r[2]+") and ("+i+")"),t.push(r))}},t}},function(e,t,i){function n(e){for(var t=0;t<e.length;t++){var i=e[t],n=d[i.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](i.parts[o]);for(;o<i.parts.length;o++)n.parts.push(a(i.parts[o]));n.parts.length>i.parts.length&&(n.parts.length=i.parts.length)}else{for(var r=[],o=0;o<i.parts.length;o++)r.push(a(i.parts[o]));d[i.id]={id:i.id,refs:1,parts:r}}}}function o(){var e=document.createElement("style");return e.type="text/css",u.appendChild(e),e}function a(e){var t,i,n=document.querySelector("style["+g+'~="'+e.id+'"]');if(n){if(h)return b;n.parentNode.removeChild(n)}if(v){var a=p++;n=f||(f=o()),t=r.bind(null,n,a,!1),i=r.bind(null,n,a,!0)}else n=o(),t=s.bind(null,n),i=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else i()}}function r(e,t,i,n){var o=i?"":n.css;if(e.styleSheet)e.styleSheet.cssText=k(t,o);else{var a=document.createTextNode(o),r=e.childNodes;r[t]&&e.removeChild(r[t]),r.length?e.insertBefore(a,r[t]):e.appendChild(a)}}function s(e,t){var i=t.css,n=t.media,o=t.sourceMap;if(n&&e.setAttribute("media",n),m.ssrId&&e.setAttribute(g,t.id),o&&(i+="\n/*# sourceURL="+o.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var c=i(23),d={},u=l&&(document.head||document.getElementsByTagName("head")[0]),f=null,p=0,h=!1,b=function(){},m=null,g="data-vue-ssr-id",v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,i,o){h=i,m=o||{};var a=c(e,t);return n(a),function(t){for(var i=[],o=0;o<a.length;o++){var r=a[o],s=d[r.id];s.refs--,i.push(s)}t?(a=c(e,t),n(a)):a=[];for(var o=0;o<i.length;o++){var s=i[o];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete d[s.id]}}}};var k=function(){var e=[];return function(t,i){return e[t]=i,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e,t,i,n,o,a){var r,s=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(r=e,s=e.default);var c="function"==typeof s?s.options:s;t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId=o);var d;if(a?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=d):n&&(d=n),d){var u=c.functional,f=u?c.render:c.beforeCreate;u?(c._injectStyles=d,c.render=function(e,t){return d.call(t),f(e,t)}):c.beforeCreate=f?[].concat(f,d):[d]}return{esModule:r,exports:s,options:c}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,i){function n(e){return void 0===e||null===e}function o(e){return void 0!==e&&null!==e}function a(e){return!0===e}function r(e){return!1===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function l(e){return null!==e&&"object"==typeof e}function c(e){return"[object Object]"===zn.call(e)}function d(e){return"[object RegExp]"===zn.call(e)}function u(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function f(e){return o(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function p(e){return null==e?"":Array.isArray(e)||c(e)&&e.toString===zn?JSON.stringify(e,null,2):String(e)}function h(e){var t=parseFloat(e);return isNaN(t)?e:t}function b(e,t){for(var i=Object.create(null),n=e.split(","),o=0;o<n.length;o++)i[n[o]]=!0;return t?function(e){return i[e.toLowerCase()]}:function(e){return i[e]}}function m(e,t){if(e.length){var i=e.indexOf(t);if(i>-1)return e.splice(i,1)}}function g(e,t){return An.call(e,t)}function v(e){var t=Object.create(null);return function(i){return t[i]||(t[i]=e(i))}}function k(e,t){function i(i){var n=arguments.length;return n?n>1?e.apply(t,arguments):e.call(t,i):e.call(t)}return i._length=e.length,i}function x(e,t){return e.bind(t)}function w(e,t){t=t||0;for(var i=e.length-t,n=new Array(i);i--;)n[i]=e[i+t];return n}function y(e,t){for(var i in t)e[i]=t[i];return e}function _(e){for(var t={},i=0;i<e.length;i++)e[i]&&y(t,e[i]);return t}function C(e,t,i){}function S(e,t){if(e===t)return!0;var i=l(e),n=l(t);if(!i||!n)return!i&&!n&&String(e)===String(t);try{var o=Array.isArray(e),a=Array.isArray(t);if(o&&a)return e.length===t.length&&e.every(function(e,i){return S(e,t[i])});if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(o||a)return!1;var r=Object.keys(e),s=Object.keys(t);return r.length===s.length&&r.every(function(i){return S(e[i],t[i])})}catch(e){return!1}}function $(e,t){for(var i=0;i<e.length;i++)if(S(e[i],t))return i;return-1}function D(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}function z(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function O(e,t,i,n){Object.defineProperty(e,t,{value:i,enumerable:!!n,writable:!0,configurable:!0})}function A(e){if(!qn.test(e)){var t=e.split(".");return function(e){for(var i=0;i<t.length;i++){if(!e)return;e=e[t[i]]}return e}}}function T(e){return"function"==typeof e&&/native code/.test(e.toString())}function M(e){po.push(e),fo.target=e}function j(){po.pop(),fo.target=po[po.length-1]}function P(e){return new ho(void 0,void 0,void 0,String(e))}function E(e){var t=new ho(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}function F(e){xo=e}function B(e,t){e.__proto__=t}function V(e,t,i){for(var n=0,o=i.length;n<o;n++){var a=i[n];O(e,a,t[a])}}function I(e,t){if(l(e)&&!(e instanceof ho)){var i;return g(e,"__ob__")&&e.__ob__ instanceof wo?i=e.__ob__:xo&&!ro()&&(Array.isArray(e)||c(e))&&Object.isExtensible(e)&&!e._isVue&&(i=new wo(e)),t&&i&&i.vmCount++,i}}function N(e,t,i,n,o){var a=new fo,r=Object.getOwnPropertyDescriptor(e,t);if(!r||!1!==r.configurable){var s=r&&r.get,l=r&&r.set;s&&!l||2!==arguments.length||(i=e[t]);var c=!o&&I(i);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):i;return fo.target&&(a.depend(),c&&(c.dep.depend(),Array.isArray(t)&&H(t))),t},set:function(t){var n=s?s.call(e):i;t===n||t!==t&&n!==n||s&&!l||(l?l.call(e,t):i=t,c=!o&&I(t),a.notify())}})}}function R(e,t,i){if(Array.isArray(e)&&u(t))return e.length=Math.max(e.length,t),e.splice(t,1,i),i;if(t in e&&!(t in Object.prototype))return e[t]=i,i;var n=e.__ob__;return e._isVue||n&&n.vmCount?i:n?(N(n.value,t,i),n.dep.notify(),i):(e[t]=i,i)}function L(e,t){if(Array.isArray(e)&&u(t))return void e.splice(t,1);var i=e.__ob__;e._isVue||i&&i.vmCount||g(e,t)&&(delete e[t],i&&i.dep.notify())}function H(e){for(var t=void 0,i=0,n=e.length;i<n;i++)t=e[i],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&H(t)}function q(e,t){if(!t)return e;for(var i,n,o,a=lo?Reflect.ownKeys(t):Object.keys(t),r=0;r<a.length;r++)"__ob__"!==(i=a[r])&&(n=e[i],o=t[i],g(e,i)?n!==o&&c(n)&&c(o)&&q(n,o):R(e,i,o));return e}function U(e,t,i){return i?function(){var n="function"==typeof t?t.call(i,i):t,o="function"==typeof e?e.call(i,i):e;return n?q(n,o):o}:t?e?function(){return q("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function W(e,t){var i=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return i?Y(i):i}function Y(e){for(var t=[],i=0;i<e.length;i++)-1===t.indexOf(e[i])&&t.push(e[i]);return t}function G(e,t,i,n){var o=Object.create(e||null);return t?y(o,t):o}function K(e,t){var i=e.props;if(i){var n,o,a,r={};if(Array.isArray(i))for(n=i.length;n--;)"string"==typeof(o=i[n])&&(a=Mn(o),r[a]={type:null});else if(c(i))for(var s in i)o=i[s],a=Mn(s),r[a]=c(o)?o:{type:o};e.props=r}}function X(e,t){var i=e.inject;if(i){var n=e.inject={};if(Array.isArray(i))for(var o=0;o<i.length;o++)n[i[o]]={from:i[o]};else if(c(i))for(var a in i){var r=i[a];n[a]=c(r)?y({from:a},r):{from:r}}}}function J(e){var t=e.directives;if(t)for(var i in t){var n=t[i];"function"==typeof n&&(t[i]={bind:n,update:n})}}function Q(e,t,i){function n(n){var o=yo[n]||Co;s[n]=o(e[n],t[n],i,n)}if("function"==typeof t&&(t=t.options),K(t,i),X(t,i),J(t),!t._base&&(t.extends&&(e=Q(e,t.extends,i)),t.mixins))for(var o=0,a=t.mixins.length;o<a;o++)e=Q(e,t.mixins[o],i);var r,s={};for(r in e)n(r);for(r in t)g(e,r)||n(r);return s}function Z(e,t,i,n){if("string"==typeof i){var o=e[t];if(g(o,i))return o[i];var a=Mn(i);if(g(o,a))return o[a];var r=jn(a);if(g(o,r))return o[r];return o[i]||o[a]||o[r]}}function ee(e,t,i,n){var o=t[e],a=!g(i,e),r=i[e],s=oe(Boolean,o.type);if(s>-1)if(a&&!g(o,"default"))r=!1;else if(""===r||r===En(e)){var l=oe(String,o.type);(l<0||s<l)&&(r=!0)}if(void 0===r){r=te(n,o,e);var c=xo;F(!0),I(r),F(c)}return r}function te(e,t,i){if(g(t,"default")){var n=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[i]&&void 0!==e._props[i]?e._props[i]:"function"==typeof n&&"Function"!==ie(t.type)?n.call(e):n}}function ie(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function ne(e,t){return ie(e)===ie(t)}function oe(e,t){if(!Array.isArray(t))return ne(t,e)?0:-1;for(var i=0,n=t.length;i<n;i++)if(ne(t[i],e))return i;return-1}function ae(e,t,i){M();try{if(t)for(var n=t;n=n.$parent;){var o=n.$options.errorCaptured;if(o)for(var a=0;a<o.length;a++)try{var r=!1===o[a].call(n,e,t,i);if(r)return}catch(e){se(e,n,"errorCaptured hook")}}se(e,t,i)}finally{j()}}function re(e,t,i,n,o){var a;try{a=i?e.apply(t,i):e.call(t),a&&!a._isVue&&f(a)&&!a._handled&&(a.catch(function(e){return ae(e,n,o+" (Promise/async)")}),a._handled=!0)}catch(e){ae(e,n,o)}return a}function se(e,t,i){if(Ln.errorHandler)try{return Ln.errorHandler.call(null,e,t,i)}catch(t){t!==e&&le(t,null,"config.errorHandler")}le(e,t,i)}function le(e,t,i){if(!Wn&&!Yn||"undefined"==typeof console)throw e;console.error(e)}function ce(){Do=!1;var e=$o.slice(0);$o.length=0;for(var t=0;t<e.length;t++)e[t]()}function de(e,t){var i;if($o.push(function(){if(e)try{e.call(t)}catch(e){ae(e,t,"nextTick")}else i&&i(t)}),Do||(Do=!0,_o()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){i=e})}function ue(e){fe(e,Mo),Mo.clear()}function fe(e,t){var i,n,o=Array.isArray(e);if(!(!o&&!l(e)||Object.isFrozen(e)||e instanceof ho)){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(o)for(i=e.length;i--;)fe(e[i],t);else for(n=Object.keys(e),i=n.length;i--;)fe(e[n[i]],t)}}function pe(e,t){function i(){var e=arguments,n=i.fns;if(!Array.isArray(n))return re(n,null,arguments,t,"v-on handler");for(var o=n.slice(),a=0;a<o.length;a++)re(o[a],null,e,t,"v-on handler")}return i.fns=e,i}function he(e,t,i,o,r,s){var l,c,d,u;for(l in e)c=e[l],d=t[l],u=jo(l),n(c)||(n(d)?(n(c.fns)&&(c=e[l]=pe(c,s)),a(u.once)&&(c=e[l]=r(u.name,c,u.capture)),i(u.name,c,u.capture,u.passive,u.params)):c!==d&&(d.fns=c,e[l]=d));for(l in t)n(e[l])&&(u=jo(l),o(u.name,t[l],u.capture))}function be(e,t,i){function r(){i.apply(this,arguments),m(s.fns,r)}e instanceof ho&&(e=e.data.hook||(e.data.hook={}));var s,l=e[t];n(l)?s=pe([r]):o(l.fns)&&a(l.merged)?(s=l,s.fns.push(r)):s=pe([l,r]),s.merged=!0,e[t]=s}function me(e,t,i){var a=t.options.props;if(!n(a)){var r={},s=e.attrs,l=e.props;if(o(s)||o(l))for(var c in a){var d=En(c);ge(r,l,c,d,!0)||ge(r,s,c,d,!1)}return r}}function ge(e,t,i,n,a){if(o(t)){if(g(t,i))return e[i]=t[i],a||delete t[i],!0;if(g(t,n))return e[i]=t[n],a||delete t[n],!0}return!1}function ve(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}function ke(e){return s(e)?[P(e)]:Array.isArray(e)?we(e):void 0}function xe(e){return o(e)&&o(e.text)&&r(e.isComment)}function we(e,t){var i,r,l,c,d=[];for(i=0;i<e.length;i++)r=e[i],n(r)||"boolean"==typeof r||(l=d.length-1,c=d[l],Array.isArray(r)?r.length>0&&(r=we(r,(t||"")+"_"+i),xe(r[0])&&xe(c)&&(d[l]=P(c.text+r[0].text),r.shift()),d.push.apply(d,r)):s(r)?xe(c)?d[l]=P(c.text+r):""!==r&&d.push(P(r)):xe(r)&&xe(c)?d[l]=P(c.text+r.text):(a(e._isVList)&&o(r.tag)&&n(r.key)&&o(t)&&(r.key="__vlist"+t+"_"+i+"__"),d.push(r)));return d}function ye(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}function _e(e){var t=Ce(e.$options.inject,e);t&&(F(!1),Object.keys(t).forEach(function(i){N(e,i,t[i])}),F(!0))}function Ce(e,t){if(e){for(var i=Object.create(null),n=lo?Reflect.ownKeys(e):Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__ob__"!==a){for(var r=e[a].from,s=t;s;){if(s._provided&&g(s._provided,r)){i[a]=s._provided[r];break}s=s.$parent}if(!s&&"default"in e[a]){var l=e[a].default;i[a]="function"==typeof l?l.call(t):l}}}return i}}function Se(e,t){if(!e||!e.length)return{};for(var i={},n=0,o=e.length;n<o;n++){var a=e[n],r=a.data;if(r&&r.attrs&&r.attrs.slot&&delete r.attrs.slot,a.context!==t&&a.fnContext!==t||!r||null==r.slot)(i.default||(i.default=[])).push(a);else{var s=r.slot,l=i[s]||(i[s]=[]);"template"===a.tag?l.push.apply(l,a.children||[]):l.push(a)}}for(var c in i)i[c].every($e)&&delete i[c];return i}function $e(e){return e.isComment&&!e.asyncFactory||" "===e.text}function De(e,t,i){var n,o=Object.keys(t).length>0,a=e?!!e.$stable:!o,r=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&i&&i!==Dn&&r===i.$key&&!o&&!i.$hasNormal)return i;n={};for(var s in e)e[s]&&"$"!==s[0]&&(n[s]=ze(t,s,e[s]))}else n={};for(var l in t)l in n||(n[l]=Oe(t,l));return e&&Object.isExtensible(e)&&(e._normalized=n),O(n,"$stable",a),O(n,"$key",r),O(n,"$hasNormal",o),n}function ze(e,t,i){var n=function(){var e=arguments.length?i.apply(null,arguments):i({});return e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:ke(e),e&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return i.proxy&&Object.defineProperty(e,t,{get:n,enumerable:!0,configurable:!0}),n}function Oe(e,t){return function(){return e[t]}}function Ae(e,t){var i,n,a,r,s;if(Array.isArray(e)||"string"==typeof e)for(i=new Array(e.length),n=0,a=e.length;n<a;n++)i[n]=t(e[n],n);else if("number"==typeof e)for(i=new Array(e),n=0;n<e;n++)i[n]=t(n+1,n);else if(l(e))if(lo&&e[Symbol.iterator]){i=[];for(var c=e[Symbol.iterator](),d=c.next();!d.done;)i.push(t(d.value,i.length)),d=c.next()}else for(r=Object.keys(e),i=new Array(r.length),n=0,a=r.length;n<a;n++)s=r[n],i[n]=t(e[s],s,n);return o(i)||(i=[]),i._isVList=!0,i}function Te(e,t,i,n){var o,a=this.$scopedSlots[e];a?(i=i||{},n&&(i=y(y({},n),i)),o=a(i)||t):o=this.$slots[e]||t;var r=i&&i.slot;return r?this.$createElement("template",{slot:r},o):o}function Me(e){return Z(this.$options,"filters",e,!0)||Vn}function je(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function Pe(e,t,i,n,o){var a=Ln.keyCodes[t]||i;return o&&n&&!Ln.keyCodes[t]?je(o,n):a?je(a,e):n?En(n)!==t:void 0}function Ee(e,t,i,n,o){if(i)if(l(i)){Array.isArray(i)&&(i=_(i));var a;for(var r in i)!function(r){if("class"===r||"style"===r||On(r))a=e;else{var s=e.attrs&&e.attrs.type;a=n||Ln.mustUseProp(t,s,r)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var l=Mn(r),c=En(r);if(!(l in a||c in a)&&(a[r]=i[r],o)){(e.on||(e.on={}))["update:"+r]=function(e){i[r]=e}}}(r)}else;return e}function Fe(e,t){var i=this._staticTrees||(this._staticTrees=[]),n=i[e];return n&&!t?n:(n=i[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),Ve(n,"__static__"+e,!1),n)}function Be(e,t,i){return Ve(e,"__once__"+t+(i?"_"+i:""),!0),e}function Ve(e,t,i){if(Array.isArray(e))for(var n=0;n<e.length;n++)e[n]&&"string"!=typeof e[n]&&Ie(e[n],t+"_"+n,i);else Ie(e,t,i)}function Ie(e,t,i){e.isStatic=!0,e.key=t,e.isOnce=i}function Ne(e,t){if(t)if(c(t)){var i=e.on=e.on?y({},e.on):{};for(var n in t){var o=i[n],a=t[n];i[n]=o?[].concat(o,a):a}}else;return e}function Re(e,t,i,n){t=t||{$stable:!i};for(var o=0;o<e.length;o++){var a=e[o];Array.isArray(a)?Re(a,t,i):a&&(a.proxy&&(a.fn.proxy=!0),t[a.key]=a.fn)}return n&&(t.$key=n),t}function Le(e,t){for(var i=0;i<t.length;i+=2){var n=t[i];"string"==typeof n&&n&&(e[t[i]]=t[i+1])}return e}function He(e,t){return"string"==typeof e?t+e:e}function qe(e){e._o=Be,e._n=h,e._s=p,e._l=Ae,e._t=Te,e._q=S,e._i=$,e._m=Fe,e._f=Me,e._k=Pe,e._b=Ee,e._v=P,e._e=mo,e._u=Re,e._g=Ne,e._d=Le,e._p=He}function Ue(e,t,i,n,o){var r,s=this,l=o.options;g(n,"_uid")?(r=Object.create(n),r._original=n):(r=n,n=n._original);var c=a(l._compiled),d=!c;this.data=e,this.props=t,this.children=i,this.parent=n,this.listeners=e.on||Dn,this.injections=Ce(l.inject,n),this.slots=function(){return s.$slots||De(e.scopedSlots,s.$slots=Se(i,n)),s.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return De(e.scopedSlots,this.slots())}}),c&&(this.$options=l,this.$slots=this.slots(),this.$scopedSlots=De(e.scopedSlots,this.$slots)),l._scopeId?this._c=function(e,t,i,o){var a=et(r,e,t,i,o,d);return a&&!Array.isArray(a)&&(a.fnScopeId=l._scopeId,a.fnContext=n),a}:this._c=function(e,t,i,n){return et(r,e,t,i,n,d)}}function We(e,t,i,n,a){var r=e.options,s={},l=r.props;if(o(l))for(var c in l)s[c]=ee(c,l,t||Dn);else o(i.attrs)&&Ge(s,i.attrs),o(i.props)&&Ge(s,i.props);var d=new Ue(i,s,a,n,e),u=r.render.call(null,d._c,d);if(u instanceof ho)return Ye(u,i,d.parent,r,d);if(Array.isArray(u)){for(var f=ke(u)||[],p=new Array(f.length),h=0;h<f.length;h++)p[h]=Ye(f[h],i,d.parent,r,d);return p}}function Ye(e,t,i,n,o){var a=E(e);return a.fnContext=i,a.fnOptions=n,t.slot&&((a.data||(a.data={})).slot=t.slot),a}function Ge(e,t){for(var i in t)e[Mn(i)]=t[i]}function Ke(e,t,i,r,s){if(!n(e)){var c=i.$options._base;if(l(e)&&(e=c.extend(e)),"function"==typeof e){var d;if(n(e.cid)&&(d=e,void 0===(e=st(d,c))))return rt(d,t,i,r,s);t=t||{},Lt(e),o(t.model)&&Ze(e.options,t);var u=me(t,e,s);if(a(e.options.functional))return We(e,u,t,i,r);var f=t.on;if(t.on=t.nativeOn,a(e.options.abstract)){var p=t.slot;t={},p&&(t.slot=p)}Je(t);var h=e.options.name||s;return new ho("vue-component-"+e.cid+(h?"-"+h:""),t,void 0,void 0,void 0,i,{Ctor:e,propsData:u,listeners:f,tag:s,children:r},d)}}}function Xe(e,t){var i={_isComponent:!0,_parentVnode:e,parent:t},n=e.data.inlineTemplate;return o(n)&&(i.render=n.render,i.staticRenderFns=n.staticRenderFns),new e.componentOptions.Ctor(i)}function Je(e){for(var t=e.hook||(e.hook={}),i=0;i<Fo.length;i++){var n=Fo[i],o=t[n],a=Eo[n];o===a||o&&o._merged||(t[n]=o?Qe(a,o):a)}}function Qe(e,t){var i=function(i,n){e(i,n),t(i,n)};return i._merged=!0,i}function Ze(e,t){var i=e.model&&e.model.prop||"value",n=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[i]=t.model.value;var a=t.on||(t.on={}),r=a[n],s=t.model.callback;o(r)?(Array.isArray(r)?-1===r.indexOf(s):r!==s)&&(a[n]=[s].concat(r)):a[n]=s}function et(e,t,i,n,o,r){return(Array.isArray(i)||s(i))&&(o=n,n=i,i=void 0),a(r)&&(o=Vo),tt(e,t,i,n,o)}function tt(e,t,i,n,a){if(o(i)&&o(i.__ob__))return mo();if(o(i)&&o(i.is)&&(t=i.is),!t)return mo();Array.isArray(n)&&"function"==typeof n[0]&&(i=i||{},i.scopedSlots={default:n[0]},n.length=0),a===Vo?n=ke(n):a===Bo&&(n=ve(n));var r,s;if("string"==typeof t){var l;s=e.$vnode&&e.$vnode.ns||Ln.getTagNamespace(t),r=Ln.isReservedTag(t)?new ho(Ln.parsePlatformTagName(t),i,n,void 0,void 0,e):i&&i.pre||!o(l=Z(e.$options,"components",t))?new ho(t,i,n,void 0,void 0,e):Ke(l,i,e,n,t)}else r=Ke(t,i,e,n);return Array.isArray(r)?r:o(r)?(o(s)&&it(r,s),o(i)&&nt(i),r):mo()}function it(e,t,i){if(e.ns=t,"foreignObject"===e.tag&&(t=void 0,i=!0),o(e.children))for(var r=0,s=e.children.length;r<s;r++){var l=e.children[r];o(l.tag)&&(n(l.ns)||a(i)&&"svg"!==l.tag)&&it(l,t,i)}}function nt(e){l(e.style)&&ue(e.style),l(e.class)&&ue(e.class)}function ot(e){e._vnode=null,e._staticTrees=null;var t=e.$options,i=e.$vnode=t._parentVnode,n=i&&i.context;e.$slots=Se(t._renderChildren,n),e.$scopedSlots=Dn,e._c=function(t,i,n,o){return et(e,t,i,n,o,!1)},e.$createElement=function(t,i,n,o){return et(e,t,i,n,o,!0)};var o=i&&i.data;N(e,"$attrs",o&&o.attrs||Dn,null,!0),N(e,"$listeners",t._parentListeners||Dn,null,!0)}function at(e,t){return(e.__esModule||lo&&"Module"===e[Symbol.toStringTag])&&(e=e.default),l(e)?t.extend(e):e}function rt(e,t,i,n,o){var a=mo();return a.asyncFactory=e,a.asyncMeta={data:t,context:i,children:n,tag:o},a}function st(e,t){if(a(e.error)&&o(e.errorComp))return e.errorComp;if(o(e.resolved))return e.resolved;var i=Io;if(i&&o(e.owners)&&-1===e.owners.indexOf(i)&&e.owners.push(i),a(e.loading)&&o(e.loadingComp))return e.loadingComp;if(i&&!o(e.owners)){var r=e.owners=[i],s=!0,c=null,d=null;i.$on("hook:destroyed",function(){return m(r,i)});var u=function(e){for(var t=0,i=r.length;t<i;t++)r[t].$forceUpdate();e&&(r.length=0,null!==c&&(clearTimeout(c),c=null),null!==d&&(clearTimeout(d),d=null))},p=D(function(i){e.resolved=at(i,t),s?r.length=0:u(!0)}),h=D(function(t){o(e.errorComp)&&(e.error=!0,u(!0))}),b=e(p,h);return l(b)&&(f(b)?n(e.resolved)&&b.then(p,h):f(b.component)&&(b.component.then(p,h),o(b.error)&&(e.errorComp=at(b.error,t)),o(b.loading)&&(e.loadingComp=at(b.loading,t),0===b.delay?e.loading=!0:c=setTimeout(function(){c=null,n(e.resolved)&&n(e.error)&&(e.loading=!0,u(!1))},b.delay||200)),o(b.timeout)&&(d=setTimeout(function(){d=null,n(e.resolved)&&h(null)},b.timeout)))),s=!1,e.loading?e.loadingComp:e.resolved}}function lt(e){return e.isComment&&e.asyncFactory}function ct(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var i=e[t];if(o(i)&&(o(i.componentOptions)||lt(i)))return i}}function dt(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&ht(e,t)}function ut(e,t){Po.$on(e,t)}function ft(e,t){Po.$off(e,t)}function pt(e,t){var i=Po;return function n(){null!==t.apply(null,arguments)&&i.$off(e,n)}}function ht(e,t,i){Po=e,he(t,i||{},ut,ft,pt,e),Po=void 0}function bt(e){var t=No;return No=e,function(){No=t}}function mt(e){var t=e.$options,i=t.parent;if(i&&!t.abstract){for(;i.$options.abstract&&i.$parent;)i=i.$parent;i.$children.push(e)}e.$parent=i,e.$root=i?i.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}function gt(e,t,i){e.$el=t,e.$options.render||(e.$options.render=mo),yt(e,"beforeMount");var n;return n=function(){e._update(e._render(),i)},new Jo(e,n,C,{before:function(){e._isMounted&&!e._isDestroyed&&yt(e,"beforeUpdate")}},!0),i=!1,null==e.$vnode&&(e._isMounted=!0,yt(e,"mounted")),e}function vt(e,t,i,n,o){var a=n.data.scopedSlots,r=e.$scopedSlots,s=!!(a&&!a.$stable||r!==Dn&&!r.$stable||a&&e.$scopedSlots.$key!==a.$key),l=!!(o||e.$options._renderChildren||s);if(e.$options._parentVnode=n,e.$vnode=n,e._vnode&&(e._vnode.parent=n),e.$options._renderChildren=o,e.$attrs=n.data.attrs||Dn,e.$listeners=i||Dn,t&&e.$options.props){F(!1);for(var c=e._props,d=e.$options._propKeys||[],u=0;u<d.length;u++){var f=d[u],p=e.$options.props;c[f]=ee(f,p,t,e)}F(!0),e.$options.propsData=t}i=i||Dn;var h=e.$options._parentListeners;e.$options._parentListeners=i,ht(e,i,h),l&&(e.$slots=Se(o,n.context),e.$forceUpdate())}function kt(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function xt(e,t){if(t){if(e._directInactive=!1,kt(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var i=0;i<e.$children.length;i++)xt(e.$children[i]);yt(e,"activated")}}function wt(e,t){if(!(t&&(e._directInactive=!0,kt(e))||e._inactive)){e._inactive=!0;for(var i=0;i<e.$children.length;i++)wt(e.$children[i]);yt(e,"deactivated")}}function yt(e,t){M();var i=e.$options[t],n=t+" hook";if(i)for(var o=0,a=i.length;o<a;o++)re(i[o],e,null,e,n);e._hasHookEvent&&e.$emit("hook:"+t),j()}function _t(){Wo=Ro.length=Lo.length=0,Ho={},qo=Uo=!1}function Ct(){Yo=Go(),Uo=!0;var e,t;for(Ro.sort(function(e,t){return e.id-t.id}),Wo=0;Wo<Ro.length;Wo++)e=Ro[Wo],e.before&&e.before(),t=e.id,Ho[t]=null,e.run();var i=Lo.slice(),n=Ro.slice();_t(),Dt(i),St(n),so&&Ln.devtools&&so.emit("flush")}function St(e){for(var t=e.length;t--;){var i=e[t],n=i.vm;n._watcher===i&&n._isMounted&&!n._isDestroyed&&yt(n,"updated")}}function $t(e){e._inactive=!1,Lo.push(e)}function Dt(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,xt(e[t],!0)}function zt(e){var t=e.id;if(null==Ho[t]){if(Ho[t]=!0,Uo){for(var i=Ro.length-1;i>Wo&&Ro[i].id>e.id;)i--;Ro.splice(i+1,0,e)}else Ro.push(e);qo||(qo=!0,de(Ct))}}function Ot(e,t,i){Qo.get=function(){return this[t][i]},Qo.set=function(e){this[t][i]=e},Object.defineProperty(e,i,Qo)}function At(e){e._watchers=[];var t=e.$options;t.props&&Tt(e,t.props),t.methods&&Vt(e,t.methods),t.data?Mt(e):I(e._data={},!0),t.computed&&Pt(e,t.computed),t.watch&&t.watch!==to&&It(e,t.watch)}function Tt(e,t){var i=e.$options.propsData||{},n=e._props={},o=e.$options._propKeys=[],a=!e.$parent;a||F(!1);for(var r in t)!function(a){o.push(a);var r=ee(a,t,i,e);N(n,a,r),a in e||Ot(e,"_props",a)}(r);F(!0)}function Mt(e){var t=e.$options.data;t=e._data="function"==typeof t?jt(t,e):t||{},c(t)||(t={});for(var i=Object.keys(t),n=e.$options.props,o=(e.$options.methods,i.length);o--;){var a=i[o];n&&g(n,a)||z(a)||Ot(e,"_data",a)}I(t,!0)}function jt(e,t){M();try{return e.call(t,t)}catch(e){return ae(e,t,"data()"),{}}finally{j()}}function Pt(e,t){var i=e._computedWatchers=Object.create(null),n=ro();for(var o in t){var a=t[o],r="function"==typeof a?a:a.get;n||(i[o]=new Jo(e,r||C,C,Zo)),o in e||Et(e,o,a)}}function Et(e,t,i){var n=!ro();"function"==typeof i?(Qo.get=n?Ft(t):Bt(i),Qo.set=C):(Qo.get=i.get?n&&!1!==i.cache?Ft(t):Bt(i.get):C,Qo.set=i.set||C),Object.defineProperty(e,t,Qo)}function Ft(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),fo.target&&t.depend(),t.value}}function Bt(e){return function(){return e.call(this,this)}}function Vt(e,t){e.$options.props;for(var i in t)e[i]="function"!=typeof t[i]?C:Fn(t[i],e)}function It(e,t){for(var i in t){var n=t[i];if(Array.isArray(n))for(var o=0;o<n.length;o++)Nt(e,i,n[o]);else Nt(e,i,n)}}function Nt(e,t,i,n){return c(i)&&(n=i,i=i.handler),"string"==typeof i&&(i=e[i]),e.$watch(t,i,n)}function Rt(e,t){var i=e.$options=Object.create(e.constructor.options),n=t._parentVnode;i.parent=t.parent,i._parentVnode=n;var o=n.componentOptions;i.propsData=o.propsData,i._parentListeners=o.listeners,i._renderChildren=o.children,i._componentTag=o.tag,t.render&&(i.render=t.render,i.staticRenderFns=t.staticRenderFns)}function Lt(e){var t=e.options;if(e.super){var i=Lt(e.super);if(i!==e.superOptions){e.superOptions=i;var n=Ht(e);n&&y(e.extendOptions,n),t=e.options=Q(i,e.extendOptions),t.name&&(t.components[t.name]=e)}}return t}function Ht(e){var t,i=e.options,n=e.sealedOptions;for(var o in i)i[o]!==n[o]&&(t||(t={}),t[o]=i[o]);return t}function qt(e){this._init(e)}function Ut(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var i=w(arguments,1);return i.unshift(this),"function"==typeof e.install?e.install.apply(e,i):"function"==typeof e&&e.apply(null,i),t.push(e),this}}function Wt(e){e.mixin=function(e){return this.options=Q(this.options,e),this}}function Yt(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var i=this,n=i.cid,o=e._Ctor||(e._Ctor={});if(o[n])return o[n];var a=e.name||i.options.name,r=function(e){this._init(e)};return r.prototype=Object.create(i.prototype),r.prototype.constructor=r,r.cid=t++,r.options=Q(i.options,e),r.super=i,r.options.props&&Gt(r),r.options.computed&&Kt(r),r.extend=i.extend,r.mixin=i.mixin,r.use=i.use,Nn.forEach(function(e){r[e]=i[e]}),a&&(r.options.components[a]=r),r.superOptions=i.options,r.extendOptions=e,r.sealedOptions=y({},r.options),o[n]=r,r}}function Gt(e){var t=e.options.props;for(var i in t)Ot(e.prototype,"_props",i)}function Kt(e){var t=e.options.computed;for(var i in t)Et(e.prototype,i,t[i])}function Xt(e){Nn.forEach(function(t){e[t]=function(e,i){return i?("component"===t&&c(i)&&(i.name=i.name||e,i=this.options._base.extend(i)),"directive"===t&&"function"==typeof i&&(i={bind:i,update:i}),this.options[t+"s"][e]=i,i):this.options[t+"s"][e]}})}function Jt(e){return e&&(e.Ctor.options.name||e.tag)}function Qt(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!d(e)&&e.test(t)}function Zt(e,t){var i=e.cache,n=e.keys,o=e._vnode;for(var a in i){var r=i[a];if(r){var s=Jt(r.componentOptions);s&&!t(s)&&ei(i,a,n,o)}}}function ei(e,t,i,n){var o=e[t];!o||n&&o.tag===n.tag||o.componentInstance.$destroy(),e[t]=null,m(i,t)}function ti(e){for(var t=e.data,i=e,n=e;o(n.componentInstance);)(n=n.componentInstance._vnode)&&n.data&&(t=ii(n.data,t));for(;o(i=i.parent);)i&&i.data&&(t=ii(t,i.data));return ni(t.staticClass,t.class)}function ii(e,t){return{staticClass:oi(e.staticClass,t.staticClass),class:o(e.class)?[e.class,t.class]:t.class}}function ni(e,t){return o(e)||o(t)?oi(e,ai(t)):""}function oi(e,t){return e?t?e+" "+t:e:t||""}function ai(e){return Array.isArray(e)?ri(e):l(e)?si(e):"string"==typeof e?e:""}function ri(e){for(var t,i="",n=0,a=e.length;n<a;n++)o(t=ai(e[n]))&&""!==t&&(i&&(i+=" "),i+=t);return i}function si(e){var t="";for(var i in e)e[i]&&(t&&(t+=" "),t+=i);return t}function li(e){return xa(e)?"svg":"math"===e?"math":void 0}function ci(e){if(!Wn)return!0;if(wa(e))return!1;if(e=e.toLowerCase(),null!=ya[e])return ya[e];var t=document.createElement(e);return e.indexOf("-")>-1?ya[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:ya[e]=/HTMLUnknownElement/.test(t.toString())}function di(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function ui(e,t){var i=document.createElement(e);return"select"!==e?i:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&i.setAttribute("multiple","multiple"),i)}function fi(e,t){return document.createElementNS(va[e],t)}function pi(e){return document.createTextNode(e)}function hi(e){return document.createComment(e)}function bi(e,t,i){e.insertBefore(t,i)}function mi(e,t){e.removeChild(t)}function gi(e,t){e.appendChild(t)}function vi(e){return e.parentNode}function ki(e){return e.nextSibling}function xi(e){return e.tagName}function wi(e,t){e.textContent=t}function yi(e,t){e.setAttribute(t,"")}function _i(e,t){var i=e.data.ref;if(o(i)){var n=e.context,a=e.componentInstance||e.elm,r=n.$refs;t?Array.isArray(r[i])?m(r[i],a):r[i]===a&&(r[i]=void 0):e.data.refInFor?Array.isArray(r[i])?r[i].indexOf(a)<0&&r[i].push(a):r[i]=[a]:r[i]=a}}function Ci(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&o(e.data)===o(t.data)&&Si(e,t)||a(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&n(t.asyncFactory.error))}function Si(e,t){if("input"!==e.tag)return!0;var i,n=o(i=e.data)&&o(i=i.attrs)&&i.type,a=o(i=t.data)&&o(i=i.attrs)&&i.type;return n===a||_a(n)&&_a(a)}function $i(e,t,i){var n,a,r={};for(n=t;n<=i;++n)a=e[n].key,o(a)&&(r[a]=n);return r}function Di(e,t){(e.data.directives||t.data.directives)&&zi(e,t)}function zi(e,t){var i,n,o,a=e===$a,r=t===$a,s=Oi(e.data.directives,e.context),l=Oi(t.data.directives,t.context),c=[],d=[];for(i in l)n=s[i],o=l[i],n?(o.oldValue=n.value,o.oldArg=n.arg,Ti(o,"update",t,e),o.def&&o.def.componentUpdated&&d.push(o)):(Ti(o,"bind",t,e),o.def&&o.def.inserted&&c.push(o));if(c.length){var u=function(){for(var i=0;i<c.length;i++)Ti(c[i],"inserted",t,e)};a?be(t,"insert",u):u()}if(d.length&&be(t,"postpatch",function(){for(var i=0;i<d.length;i++)Ti(d[i],"componentUpdated",t,e)}),!a)for(i in s)l[i]||Ti(s[i],"unbind",e,e,r)}function Oi(e,t){var i=Object.create(null);if(!e)return i;var n,o;for(n=0;n<e.length;n++)o=e[n],o.modifiers||(o.modifiers=Oa),i[Ai(o)]=o,o.def=Z(t.$options,"directives",o.name,!0);return i}function Ai(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function Ti(e,t,i,n,o){var a=e.def&&e.def[t];if(a)try{a(i.elm,e,i,n,o)}catch(n){ae(n,i.context,"directive "+e.name+" "+t+" hook")}}function Mi(e,t){var i=t.componentOptions;if(!(o(i)&&!1===i.Ctor.options.inheritAttrs||n(e.data.attrs)&&n(t.data.attrs))){var a,r,s=t.elm,l=e.data.attrs||{},c=t.data.attrs||{};o(c.__ob__)&&(c=t.data.attrs=y({},c));for(a in c)r=c[a],l[a]!==r&&ji(s,a,r);(Xn||Qn)&&c.value!==l.value&&ji(s,"value",c.value);for(a in l)n(c[a])&&(ba(a)?s.removeAttributeNS(ha,ma(a)):da(a)||s.removeAttribute(a))}}function ji(e,t,i){e.tagName.indexOf("-")>-1?Pi(e,t,i):pa(t)?ga(i)?e.removeAttribute(t):(i="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,i)):da(t)?e.setAttribute(t,fa(t,i)):ba(t)?ga(i)?e.removeAttributeNS(ha,ma(t)):e.setAttributeNS(ha,t,i):Pi(e,t,i)}function Pi(e,t,i){if(ga(i))e.removeAttribute(t);else{if(Xn&&!Jn&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==i&&!e.__ieph){var n=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",n)};e.addEventListener("input",n),e.__ieph=!0}e.setAttribute(t,i)}}function Ei(e,t){var i=t.elm,a=t.data,r=e.data;if(!(n(a.staticClass)&&n(a.class)&&(n(r)||n(r.staticClass)&&n(r.class)))){var s=ti(t),l=i._transitionClasses;o(l)&&(s=oi(s,ai(l))),s!==i._prevClass&&(i.setAttribute("class",s),i._prevClass=s)}}function Fi(e){if(o(e[ja])){var t=Xn?"change":"input";e[t]=[].concat(e[ja],e[t]||[]),delete e[ja]}o(e[Pa])&&(e.change=[].concat(e[Pa],e.change||[]),delete e[Pa])}function Bi(e,t,i){var n=oa;return function o(){null!==t.apply(null,arguments)&&Ii(e,o,i,n)}}function Vi(e,t,i,n){if(Ea){var o=Yo,a=t;t=a._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=o||e.timeStamp<=0||e.target.ownerDocument!==document)return a.apply(this,arguments)}}oa.addEventListener(e,t,io?{capture:i,passive:n}:i)}function Ii(e,t,i,n){(n||oa).removeEventListener(e,t._wrapper||t,i)}function Ni(e,t){if(!n(e.data.on)||!n(t.data.on)){var i=t.data.on||{},o=e.data.on||{};oa=t.elm,Fi(i),he(i,o,Vi,Ii,Bi,t.context),oa=void 0}}function Ri(e,t){if(!n(e.data.domProps)||!n(t.data.domProps)){var i,a,r=t.elm,s=e.data.domProps||{},l=t.data.domProps||{};o(l.__ob__)&&(l=t.data.domProps=y({},l));for(i in s)i in l||(r[i]="");for(i in l){if(a=l[i],"textContent"===i||"innerHTML"===i){if(t.children&&(t.children.length=0),a===s[i])continue;1===r.childNodes.length&&r.removeChild(r.childNodes[0])}if("value"===i&&"PROGRESS"!==r.tagName){r._value=a;var c=n(a)?"":String(a);Li(r,c)&&(r.value=c)}else if("innerHTML"===i&&xa(r.tagName)&&n(r.innerHTML)){aa=aa||document.createElement("div"),aa.innerHTML="<svg>"+a+"</svg>";for(var d=aa.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;d.firstChild;)r.appendChild(d.firstChild)}else if(a!==s[i])try{r[i]=a}catch(e){}}}}function Li(e,t){return!e.composing&&("OPTION"===e.tagName||Hi(e,t)||qi(e,t))}function Hi(e,t){var i=!0;try{i=document.activeElement!==e}catch(e){}return i&&e.value!==t}function qi(e,t){var i=e.value,n=e._vModifiers;if(o(n)){if(n.number)return h(i)!==h(t);if(n.trim)return i.trim()!==t.trim()}return i!==t}function Ui(e){var t=Wi(e.style);return e.staticStyle?y(e.staticStyle,t):t}function Wi(e){return Array.isArray(e)?_(e):"string"==typeof e?Va(e):e}function Yi(e,t){var i,n={};if(t)for(var o=e;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(i=Ui(o.data))&&y(n,i);(i=Ui(e.data))&&y(n,i);for(var a=e;a=a.parent;)a.data&&(i=Ui(a.data))&&y(n,i);return n}function Gi(e,t){var i=t.data,a=e.data;if(!(n(i.staticStyle)&&n(i.style)&&n(a.staticStyle)&&n(a.style))){var r,s,l=t.elm,c=a.staticStyle,d=a.normalizedStyle||a.style||{},u=c||d,f=Wi(t.data.style)||{};t.data.normalizedStyle=o(f.__ob__)?y({},f):f;var p=Yi(t,!0);for(s in u)n(p[s])&&Ra(l,s,"");for(s in p)(r=p[s])!==u[s]&&Ra(l,s,null==r?"":r)}}function Ki(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Ua).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var i=" "+(e.getAttribute("class")||"")+" ";i.indexOf(" "+t+" ")<0&&e.setAttribute("class",(i+t).trim())}}function Xi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Ua).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var i=" "+(e.getAttribute("class")||"")+" ",n=" "+t+" ";i.indexOf(n)>=0;)i=i.replace(n," ");i=i.trim(),i?e.setAttribute("class",i):e.removeAttribute("class")}}function Ji(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&y(t,Wa(e.name||"v")),y(t,e),t}return"string"==typeof e?Wa(e):void 0}}function Qi(e){er(function(){er(e)})}function Zi(e,t){var i=e._transitionClasses||(e._transitionClasses=[]);i.indexOf(t)<0&&(i.push(t),Ki(e,t))}function en(e,t){e._transitionClasses&&m(e._transitionClasses,t),Xi(e,t)}function tn(e,t,i){var n=nn(e,t),o=n.type,a=n.timeout,r=n.propCount;if(!o)return i();var s=o===Ga?Ja:Za,l=0,c=function(){e.removeEventListener(s,d),i()},d=function(t){t.target===e&&++l>=r&&c()};setTimeout(function(){l<r&&c()},a+1),e.addEventListener(s,d)}function nn(e,t){var i,n=window.getComputedStyle(e),o=(n[Xa+"Delay"]||"").split(", "),a=(n[Xa+"Duration"]||"").split(", "),r=on(o,a),s=(n[Qa+"Delay"]||"").split(", "),l=(n[Qa+"Duration"]||"").split(", "),c=on(s,l),d=0,u=0;return t===Ga?r>0&&(i=Ga,d=r,u=a.length):t===Ka?c>0&&(i=Ka,d=c,u=l.length):(d=Math.max(r,c),i=d>0?r>c?Ga:Ka:null,u=i?i===Ga?a.length:l.length:0),{type:i,timeout:d,propCount:u,hasTransform:i===Ga&&tr.test(n[Xa+"Property"])}}function on(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map(function(t,i){return an(t)+an(e[i])}))}function an(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function rn(e,t){var i=e.elm;o(i._leaveCb)&&(i._leaveCb.cancelled=!0,i._leaveCb());var a=Ji(e.data.transition);if(!n(a)&&!o(i._enterCb)&&1===i.nodeType){for(var r=a.css,s=a.type,c=a.enterClass,d=a.enterToClass,u=a.enterActiveClass,f=a.appearClass,p=a.appearToClass,b=a.appearActiveClass,m=a.beforeEnter,g=a.enter,v=a.afterEnter,k=a.enterCancelled,x=a.beforeAppear,w=a.appear,y=a.afterAppear,_=a.appearCancelled,C=a.duration,S=No,$=No.$vnode;$&&$.parent;)S=$.context,$=$.parent;var z=!S._isMounted||!e.isRootInsert;if(!z||w||""===w){var O=z&&f?f:c,A=z&&b?b:u,T=z&&p?p:d,M=z?x||m:m,j=z&&"function"==typeof w?w:g,P=z?y||v:v,E=z?_||k:k,F=h(l(C)?C.enter:C),B=!1!==r&&!Jn,V=cn(j),I=i._enterCb=D(function(){B&&(en(i,T),en(i,A)),I.cancelled?(B&&en(i,O),E&&E(i)):P&&P(i),i._enterCb=null});e.data.show||be(e,"insert",function(){var t=i.parentNode,n=t&&t._pending&&t._pending[e.key];n&&n.tag===e.tag&&n.elm._leaveCb&&n.elm._leaveCb(),j&&j(i,I)}),M&&M(i),B&&(Zi(i,O),Zi(i,A),Qi(function(){en(i,O),I.cancelled||(Zi(i,T),V||(ln(F)?setTimeout(I,F):tn(i,s,I)))})),e.data.show&&(t&&t(),j&&j(i,I)),B||V||I()}}}function sn(e,t){function i(){_.cancelled||(!e.data.show&&a.parentNode&&((a.parentNode._pending||(a.parentNode._pending={}))[e.key]=e),p&&p(a),x&&(Zi(a,d),Zi(a,f),Qi(function(){en(a,d),_.cancelled||(Zi(a,u),w||(ln(y)?setTimeout(_,y):tn(a,c,_)))})),b&&b(a,_),x||w||_())}var a=e.elm;o(a._enterCb)&&(a._enterCb.cancelled=!0,a._enterCb());var r=Ji(e.data.transition);if(n(r)||1!==a.nodeType)return t();if(!o(a._leaveCb)){var s=r.css,c=r.type,d=r.leaveClass,u=r.leaveToClass,f=r.leaveActiveClass,p=r.beforeLeave,b=r.leave,m=r.afterLeave,g=r.leaveCancelled,v=r.delayLeave,k=r.duration,x=!1!==s&&!Jn,w=cn(b),y=h(l(k)?k.leave:k),_=a._leaveCb=D(function(){a.parentNode&&a.parentNode._pending&&(a.parentNode._pending[e.key]=null),x&&(en(a,u),en(a,f)),_.cancelled?(x&&en(a,d),g&&g(a)):(t(),m&&m(a)),a._leaveCb=null});v?v(i):i()}}function ln(e){return"number"==typeof e&&!isNaN(e)}function cn(e){if(n(e))return!1;var t=e.fns;return o(t)?cn(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function dn(e,t){!0!==t.data.show&&rn(t)}function un(e,t,i){fn(e,t,i),(Xn||Qn)&&setTimeout(function(){fn(e,t,i)},0)}function fn(e,t,i){var n=t.value,o=e.multiple;if(!o||Array.isArray(n)){for(var a,r,s=0,l=e.options.length;s<l;s++)if(r=e.options[s],o)a=$(n,hn(r))>-1,r.selected!==a&&(r.selected=a);else if(S(hn(r),n))return void(e.selectedIndex!==s&&(e.selectedIndex=s));o||(e.selectedIndex=-1)}}function pn(e,t){return t.every(function(t){return!S(t,e)})}function hn(e){return"_value"in e?e._value:e.value}function bn(e){e.target.composing=!0}function mn(e){e.target.composing&&(e.target.composing=!1,gn(e.target,"input"))}function gn(e,t){var i=document.createEvent("HTMLEvents");i.initEvent(t,!0,!0),e.dispatchEvent(i)}function vn(e){return!e.componentInstance||e.data&&e.data.transition?e:vn(e.componentInstance._vnode)}function kn(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?kn(ct(t.children)):e}function xn(e){var t={},i=e.$options;for(var n in i.propsData)t[n]=e[n];var o=i._parentListeners;for(var a in o)t[Mn(a)]=o[a];return t}function wn(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function yn(e){for(;e=e.parent;)if(e.data.transition)return!0}function _n(e,t){return t.key===e.key&&t.tag===e.tag}function Cn(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Sn(e){e.data.newPos=e.elm.getBoundingClientRect()}function $n(e){var t=e.data.pos,i=e.data.newPos,n=t.left-i.left,o=t.top-i.top;if(n||o){e.data.moved=!0;var a=e.elm.style;a.transform=a.WebkitTransform="translate("+n+"px,"+o+"px)",a.transitionDuration="0s"}}/*!
+ * Vue.js v2.6.10
+ * (c) 2014-2019 Evan You
+ * Released under the MIT License.
+ */
+var Dn=Object.freeze({}),zn=Object.prototype.toString,On=(b("slot,component",!0),b("key,ref,slot,slot-scope,is")),An=Object.prototype.hasOwnProperty,Tn=/-(\w)/g,Mn=v(function(e){return e.replace(Tn,function(e,t){return t?t.toUpperCase():""})}),jn=v(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),Pn=/\B([A-Z])/g,En=v(function(e){return e.replace(Pn,"-$1").toLowerCase()}),Fn=Function.prototype.bind?x:k,Bn=function(e,t,i){return!1},Vn=function(e){return e},In="data-server-rendered",Nn=["component","directive","filter"],Rn=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],Ln={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:Bn,isReservedAttr:Bn,isUnknownElement:Bn,getTagNamespace:C,parsePlatformTagName:Vn,mustUseProp:Bn,async:!0,_lifecycleHooks:Rn},Hn=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/,qn=new RegExp("[^"+Hn.source+".$_\\d]"),Un="__proto__"in{},Wn="undefined"!=typeof window,Yn="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,Gn=Yn&&WXEnvironment.platform.toLowerCase(),Kn=Wn&&window.navigator.userAgent.toLowerCase(),Xn=Kn&&/msie|trident/.test(Kn),Jn=Kn&&Kn.indexOf("msie 9.0")>0,Qn=Kn&&Kn.indexOf("edge/")>0,Zn=(Kn&&Kn.indexOf("android"),Kn&&/iphone|ipad|ipod|ios/.test(Kn)||"ios"===Gn),eo=(Kn&&/chrome\/\d+/.test(Kn),Kn&&/phantomjs/.test(Kn),Kn&&Kn.match(/firefox\/(\d+)/)),to={}.watch,io=!1;if(Wn)try{var no={};Object.defineProperty(no,"passive",{get:function(){io=!0}}),window.addEventListener("test-passive",null,no)}catch(e){}var oo,ao,ro=function(){return void 0===oo&&(oo=!Wn&&!Yn&&void 0!==e&&(e.process&&"server"===e.process.env.VUE_ENV)),oo},so=Wn&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,lo="undefined"!=typeof Symbol&&T(Symbol)&&"undefined"!=typeof Reflect&&T(Reflect.ownKeys);ao="undefined"!=typeof Set&&T(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var co=C,uo=0,fo=function(){this.id=uo++,this.subs=[]};fo.prototype.addSub=function(e){this.subs.push(e)},fo.prototype.removeSub=function(e){m(this.subs,e)},fo.prototype.depend=function(){fo.target&&fo.target.addDep(this)},fo.prototype.notify=function(){for(var e=this.subs.slice(),t=0,i=e.length;t<i;t++)e[t].update()},fo.target=null;var po=[],ho=function(e,t,i,n,o,a,r,s){this.tag=e,this.data=t,this.children=i,this.text=n,this.elm=o,this.ns=void 0,this.context=a,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=r,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},bo={child:{configurable:!0}};bo.child.get=function(){return this.componentInstance},Object.defineProperties(ho.prototype,bo);var mo=function(e){void 0===e&&(e="");var t=new ho;return t.text=e,t.isComment=!0,t},go=Array.prototype,vo=Object.create(go);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=go[e];O(vo,e,function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var o,a=t.apply(this,i),r=this.__ob__;switch(e){case"push":case"unshift":o=i;break;case"splice":o=i.slice(2)}return o&&r.observeArray(o),r.dep.notify(),a})});var ko=Object.getOwnPropertyNames(vo),xo=!0,wo=function(e){this.value=e,this.dep=new fo,this.vmCount=0,O(e,"__ob__",this),Array.isArray(e)?(Un?B(e,vo):V(e,vo,ko),this.observeArray(e)):this.walk(e)};wo.prototype.walk=function(e){for(var t=Object.keys(e),i=0;i<t.length;i++)N(e,t[i])},wo.prototype.observeArray=function(e){for(var t=0,i=e.length;t<i;t++)I(e[t])};var yo=Ln.optionMergeStrategies;yo.data=function(e,t,i){return i?U(e,t,i):t&&"function"!=typeof t?e:U(e,t)},Rn.forEach(function(e){yo[e]=W}),Nn.forEach(function(e){yo[e+"s"]=G}),yo.watch=function(e,t,i,n){if(e===to&&(e=void 0),t===to&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var o={};y(o,e);for(var a in t){var r=o[a],s=t[a];r&&!Array.isArray(r)&&(r=[r]),o[a]=r?r.concat(s):Array.isArray(s)?s:[s]}return o},yo.props=yo.methods=yo.inject=yo.computed=function(e,t,i,n){if(!e)return t;var o=Object.create(null);return y(o,e),t&&y(o,t),o},yo.provide=U;var _o,Co=function(e,t){return void 0===t?e:t},So=!1,$o=[],Do=!1;if("undefined"!=typeof Promise&&T(Promise)){var zo=Promise.resolve();_o=function(){zo.then(ce),Zn&&setTimeout(C)},So=!0}else if(Xn||"undefined"==typeof MutationObserver||!T(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())_o=void 0!==i&&T(i)?function(){i(ce)}:function(){setTimeout(ce,0)};else{var Oo=1,Ao=new MutationObserver(ce),To=document.createTextNode(String(Oo));Ao.observe(To,{characterData:!0}),_o=function(){Oo=(Oo+1)%2,To.data=String(Oo)},So=!0}var Mo=new ao,jo=v(function(e){var t="&"===e.charAt(0);e=t?e.slice(1):e;var i="~"===e.charAt(0);e=i?e.slice(1):e;var n="!"===e.charAt(0);return e=n?e.slice(1):e,{name:e,once:i,capture:n,passive:t}});qe(Ue.prototype);var Po,Eo={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var i=e;Eo.prepatch(i,i)}else{(e.componentInstance=Xe(e,No)).$mount(t?e.elm:void 0,t)}},prepatch:function(e,t){var i=t.componentOptions;vt(t.componentInstance=e.componentInstance,i.propsData,i.listeners,t,i.children)},insert:function(e){var t=e.context,i=e.componentInstance;i._isMounted||(i._isMounted=!0,yt(i,"mounted")),e.data.keepAlive&&(t._isMounted?$t(i):xt(i,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?wt(t,!0):t.$destroy())}},Fo=Object.keys(Eo),Bo=1,Vo=2,Io=null,No=null,Ro=[],Lo=[],Ho={},qo=!1,Uo=!1,Wo=0,Yo=0,Go=Date.now;if(Wn&&!Xn){var Ko=window.performance;Ko&&"function"==typeof Ko.now&&Go()>document.createEvent("Event").timeStamp&&(Go=function(){return Ko.now()})}var Xo=0,Jo=function(e,t,i,n,o){this.vm=e,o&&(e._watcher=this),e._watchers.push(this),n?(this.deep=!!n.deep,this.user=!!n.user,this.lazy=!!n.lazy,this.sync=!!n.sync,this.before=n.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=i,this.id=++Xo,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ao,this.newDepIds=new ao,this.expression="","function"==typeof t?this.getter=t:(this.getter=A(t),this.getter||(this.getter=C)),this.value=this.lazy?void 0:this.get()};Jo.prototype.get=function(){M(this);var e,t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;ae(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ue(e),j(),this.cleanupDeps()}return e},Jo.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},Jo.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var i=this.depIds;this.depIds=this.newDepIds,this.newDepIds=i,this.newDepIds.clear(),i=this.deps,this.deps=this.newDeps,this.newDeps=i,this.newDeps.length=0},Jo.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():zt(this)},Jo.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||l(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){ae(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Jo.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Jo.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},Jo.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||m(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var Qo={enumerable:!0,configurable:!0,get:C,set:C},Zo={lazy:!0},ea=0;!function(e){e.prototype._init=function(e){var t=this;t._uid=ea++,t._isVue=!0,e&&e._isComponent?Rt(t,e):t.$options=Q(Lt(t.constructor),e||{},t),t._renderProxy=t,t._self=t,mt(t),dt(t),ot(t),yt(t,"beforeCreate"),_e(t),At(t),ye(t),yt(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(qt),function(e){var t={};t.get=function(){return this._data};var i={};i.get=function(){return this._props},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",i),e.prototype.$set=R,e.prototype.$delete=L,e.prototype.$watch=function(e,t,i){var n=this;if(c(t))return Nt(n,e,t,i);i=i||{},i.user=!0;var o=new Jo(n,e,t,i);if(i.immediate)try{t.call(n,o.value)}catch(e){ae(e,n,'callback for immediate watcher "'+o.expression+'"')}return function(){o.teardown()}}}(qt),function(e){var t=/^hook:/;e.prototype.$on=function(e,i){var n=this;if(Array.isArray(e))for(var o=0,a=e.length;o<a;o++)n.$on(e[o],i);else(n._events[e]||(n._events[e]=[])).push(i),t.test(e)&&(n._hasHookEvent=!0);return n},e.prototype.$once=function(e,t){function i(){n.$off(e,i),t.apply(n,arguments)}var n=this;return i.fn=t,n.$on(e,i),n},e.prototype.$off=function(e,t){var i=this;if(!arguments.length)return i._events=Object.create(null),i;if(Array.isArray(e)){for(var n=0,o=e.length;n<o;n++)i.$off(e[n],t);return i}var a=i._events[e];if(!a)return i;if(!t)return i._events[e]=null,i;for(var r,s=a.length;s--;)if((r=a[s])===t||r.fn===t){a.splice(s,1);break}return i},e.prototype.$emit=function(e){var t=this,i=t._events[e];if(i){i=i.length>1?w(i):i;for(var n=w(arguments,1),o='event handler for "'+e+'"',a=0,r=i.length;a<r;a++)re(i[a],t,n,t,o)}return t}}(qt),function(e){e.prototype._update=function(e,t){var i=this,n=i.$el,o=i._vnode,a=bt(i);i._vnode=e,i.$el=o?i.__patch__(o,e):i.__patch__(i.$el,e,t,!1),a(),n&&(n.__vue__=null),i.$el&&(i.$el.__vue__=i),i.$vnode&&i.$parent&&i.$vnode===i.$parent._vnode&&(i.$parent.$el=i.$el)},e.prototype.$forceUpdate=function(){var e=this;e._watcher&&e._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){yt(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||m(t.$children,e),e._watcher&&e._watcher.teardown();for(var i=e._watchers.length;i--;)e._watchers[i].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),yt(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(qt),function(e){qe(e.prototype),e.prototype.$nextTick=function(e){return de(e,this)},e.prototype._render=function(){var e=this,t=e.$options,i=t.render,n=t._parentVnode;n&&(e.$scopedSlots=De(n.data.scopedSlots,e.$slots,e.$scopedSlots)),e.$vnode=n;var o;try{Io=e,o=i.call(e._renderProxy,e.$createElement)}catch(t){ae(t,e,"render"),o=e._vnode}finally{Io=null}return Array.isArray(o)&&1===o.length&&(o=o[0]),o instanceof ho||(o=mo()),o.parent=n,o}}(qt);var ta=[String,RegExp,Array],ia={name:"keep-alive",abstract:!0,props:{include:ta,exclude:ta,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)ei(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",function(t){Zt(e,function(e){return Qt(t,e)})}),this.$watch("exclude",function(t){Zt(e,function(e){return!Qt(t,e)})})},render:function(){var e=this.$slots.default,t=ct(e),i=t&&t.componentOptions;if(i){var n=Jt(i),o=this,a=o.include,r=o.exclude;if(a&&(!n||!Qt(a,n))||r&&n&&Qt(r,n))return t;var s=this,l=s.cache,c=s.keys,d=null==t.key?i.Ctor.cid+(i.tag?"::"+i.tag:""):t.key;l[d]?(t.componentInstance=l[d].componentInstance,m(c,d),c.push(d)):(l[d]=t,c.push(d),this.max&&c.length>parseInt(this.max)&&ei(l,c[0],c,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}},na={KeepAlive:ia};!function(e){var t={};t.get=function(){return Ln},Object.defineProperty(e,"config",t),e.util={warn:co,extend:y,mergeOptions:Q,defineReactive:N},e.set=R,e.delete=L,e.nextTick=de,e.observable=function(e){return I(e),e},e.options=Object.create(null),Nn.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,y(e.options.components,na),Ut(e),Wt(e),Yt(e),Xt(e)}(qt),Object.defineProperty(qt.prototype,"$isServer",{get:ro}),Object.defineProperty(qt.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(qt,"FunctionalRenderContext",{value:Ue}),qt.version="2.6.10";var oa,aa,ra,sa=b("style,class"),la=b("input,textarea,option,select,progress"),ca=function(e,t,i){return"value"===i&&la(e)&&"button"!==t||"selected"===i&&"option"===e||"checked"===i&&"input"===e||"muted"===i&&"video"===e},da=b("contenteditable,draggable,spellcheck"),ua=b("events,caret,typing,plaintext-only"),fa=function(e,t){return ga(t)||"false"===t?"false":"contenteditable"===e&&ua(t)?t:"true"},pa=b("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),ha="http://www.w3.org/1999/xlink",ba=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},ma=function(e){return ba(e)?e.slice(6,e.length):""},ga=function(e){return null==e||!1===e},va={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},ka=b("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),xa=b("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),wa=function(e){return ka(e)||xa(e)},ya=Object.create(null),_a=b("text,number,password,search,email,tel,url"),Ca=Object.freeze({createElement:ui,createElementNS:fi,createTextNode:pi,createComment:hi,insertBefore:bi,removeChild:mi,appendChild:gi,parentNode:vi,nextSibling:ki,tagName:xi,setTextContent:wi,setStyleScope:yi}),Sa={create:function(e,t){_i(t)},update:function(e,t){e.data.ref!==t.data.ref&&(_i(e,!0),_i(t))},destroy:function(e){_i(e,!0)}},$a=new ho("",{},[]),Da=["create","activate","update","remove","destroy"],za={create:Di,update:Di,destroy:function(e){Di(e,$a)}},Oa=Object.create(null),Aa=[Sa,za],Ta={create:Mi,update:Mi},Ma={create:Ei,update:Ei},ja="__r",Pa="__c",Ea=So&&!(eo&&Number(eo[1])<=53),Fa={create:Ni,update:Ni},Ba={create:Ri,update:Ri},Va=v(function(e){var t={},i=/;(?![^(]*\))/g,n=/:(.+)/;return e.split(i).forEach(function(e){if(e){var i=e.split(n);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}),Ia=/^--/,Na=/\s*!important$/,Ra=function(e,t,i){if(Ia.test(t))e.style.setProperty(t,i);else if(Na.test(i))e.style.setProperty(En(t),i.replace(Na,""),"important");else{var n=Ha(t);if(Array.isArray(i))for(var o=0,a=i.length;o<a;o++)e.style[n]=i[o];else e.style[n]=i}},La=["Webkit","Moz","ms"],Ha=v(function(e){if(ra=ra||document.createElement("div").style,"filter"!==(e=Mn(e))&&e in ra)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<La.length;i++){var n=La[i]+t;if(n in ra)return n}}),qa={create:Gi,update:Gi},Ua=/\s+/,Wa=v(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),Ya=Wn&&!Jn,Ga="transition",Ka="animation",Xa="transition",Ja="transitionend",Qa="animation",Za="animationend";Ya&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Xa="WebkitTransition",Ja="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Qa="WebkitAnimation",Za="webkitAnimationEnd"));var er=Wn?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()},tr=/\b(transform|all)(,|$)/,ir=Wn?{create:dn,activate:dn,remove:function(e,t){!0!==e.data.show?sn(e,t):t()}}:{},nr=[Ta,Ma,Fa,Ba,qa,ir],or=nr.concat(Aa),ar=function(e){function t(e){return new ho(T.tagName(e).toLowerCase(),{},[],void 0,e)}function i(e,t){function i(){0==--i.listeners&&r(e)}return i.listeners=t,i}function r(e){var t=T.parentNode(e);o(t)&&T.removeChild(t,e)}function l(e,t,i,n,r,s,l){if(o(e.elm)&&o(s)&&(e=s[l]=E(e)),e.isRootInsert=!r,!c(e,t,i,n)){var d=e.data,u=e.children,h=e.tag;o(h)?(e.elm=e.ns?T.createElementNS(e.ns,h):T.createElement(h,e),g(e),p(e,u,t),o(d)&&m(e,t),f(i,e.elm,n)):a(e.isComment)?(e.elm=T.createComment(e.text),f(i,e.elm,n)):(e.elm=T.createTextNode(e.text),f(i,e.elm,n))}}function c(e,t,i,n){var r=e.data;if(o(r)){var s=o(e.componentInstance)&&r.keepAlive;if(o(r=r.hook)&&o(r=r.init)&&r(e,!1),o(e.componentInstance))return d(e,t),f(i,e.elm,n),a(s)&&u(e,t,i,n),!0}}function d(e,t){o(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,h(e)?(m(e,t),g(e)):(_i(e),t.push(e))}function u(e,t,i,n){for(var a,r=e;r.componentInstance;)if(r=r.componentInstance._vnode,o(a=r.data)&&o(a=a.transition)){for(a=0;a<O.activate.length;++a)O.activate[a]($a,r);t.push(r);break}f(i,e.elm,n)}function f(e,t,i){o(e)&&(o(i)?T.parentNode(i)===e&&T.insertBefore(e,t,i):T.appendChild(e,t))}function p(e,t,i){if(Array.isArray(t))for(var n=0;n<t.length;++n)l(t[n],i,e.elm,null,!0,t,n);else s(e.text)&&T.appendChild(e.elm,T.createTextNode(String(e.text)))}function h(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return o(e.tag)}function m(e,t){for(var i=0;i<O.create.length;++i)O.create[i]($a,e);D=e.data.hook,o(D)&&(o(D.create)&&D.create($a,e),o(D.insert)&&t.push(e))}function g(e){var t;if(o(t=e.fnScopeId))T.setStyleScope(e.elm,t);else for(var i=e;i;)o(t=i.context)&&o(t=t.$options._scopeId)&&T.setStyleScope(e.elm,t),i=i.parent;o(t=No)&&t!==e.context&&t!==e.fnContext&&o(t=t.$options._scopeId)&&T.setStyleScope(e.elm,t)}function v(e,t,i,n,o,a){for(;n<=o;++n)l(i[n],a,e,t,!1,i,n)}function k(e){var t,i,n=e.data;if(o(n))for(o(t=n.hook)&&o(t=t.destroy)&&t(e),t=0;t<O.destroy.length;++t)O.destroy[t](e);if(o(t=e.children))for(i=0;i<e.children.length;++i)k(e.children[i])}function x(e,t,i,n){for(;i<=n;++i){var a=t[i];o(a)&&(o(a.tag)?(w(a),k(a)):r(a.elm))}}function w(e,t){if(o(t)||o(e.data)){var n,a=O.remove.length+1;for(o(t)?t.listeners+=a:t=i(e.elm,a),o(n=e.componentInstance)&&o(n=n._vnode)&&o(n.data)&&w(n,t),n=0;n<O.remove.length;++n)O.remove[n](e,t);o(n=e.data.hook)&&o(n=n.remove)?n(e,t):t()}else r(e.elm)}function y(e,t,i,a,r){for(var s,c,d,u,f=0,p=0,h=t.length-1,b=t[0],m=t[h],g=i.length-1,k=i[0],w=i[g],y=!r;f<=h&&p<=g;)n(b)?b=t[++f]:n(m)?m=t[--h]:Ci(b,k)?(C(b,k,a,i,p),b=t[++f],k=i[++p]):Ci(m,w)?(C(m,w,a,i,g),m=t[--h],w=i[--g]):Ci(b,w)?(C(b,w,a,i,g),y&&T.insertBefore(e,b.elm,T.nextSibling(m.elm)),b=t[++f],w=i[--g]):Ci(m,k)?(C(m,k,a,i,p),y&&T.insertBefore(e,m.elm,b.elm),m=t[--h],k=i[++p]):(n(s)&&(s=$i(t,f,h)),c=o(k.key)?s[k.key]:_(k,t,f,h),n(c)?l(k,a,e,b.elm,!1,i,p):(d=t[c],Ci(d,k)?(C(d,k,a,i,p),t[c]=void 0,y&&T.insertBefore(e,d.elm,b.elm)):l(k,a,e,b.elm,!1,i,p)),k=i[++p]);f>h?(u=n(i[g+1])?null:i[g+1].elm,v(e,u,i,p,g,a)):p>g&&x(e,t,f,h)}function _(e,t,i,n){for(var a=i;a<n;a++){var r=t[a];if(o(r)&&Ci(e,r))return a}}function C(e,t,i,r,s,l){if(e!==t){o(t.elm)&&o(r)&&(t=r[s]=E(t));var c=t.elm=e.elm;if(a(e.isAsyncPlaceholder))return void(o(t.asyncFactory.resolved)?$(e.elm,t,i):t.isAsyncPlaceholder=!0);if(a(t.isStatic)&&a(e.isStatic)&&t.key===e.key&&(a(t.isCloned)||a(t.isOnce)))return void(t.componentInstance=e.componentInstance);var d,u=t.data;o(u)&&o(d=u.hook)&&o(d=d.prepatch)&&d(e,t);var f=e.children,p=t.children;if(o(u)&&h(t)){for(d=0;d<O.update.length;++d)O.update[d](e,t);o(d=u.hook)&&o(d=d.update)&&d(e,t)}n(t.text)?o(f)&&o(p)?f!==p&&y(c,f,p,i,l):o(p)?(o(e.text)&&T.setTextContent(c,""),v(c,null,p,0,p.length-1,i)):o(f)?x(c,f,0,f.length-1):o(e.text)&&T.setTextContent(c,""):e.text!==t.text&&T.setTextContent(c,t.text),o(u)&&o(d=u.hook)&&o(d=d.postpatch)&&d(e,t)}}function S(e,t,i){if(a(i)&&o(e.parent))e.parent.data.pendingInsert=t;else for(var n=0;n<t.length;++n)t[n].data.hook.insert(t[n])}function $(e,t,i,n){var r,s=t.tag,l=t.data,c=t.children;if(n=n||l&&l.pre,t.elm=e,a(t.isComment)&&o(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(o(l)&&(o(r=l.hook)&&o(r=r.init)&&r(t,!0),o(r=t.componentInstance)))return d(t,i),!0;if(o(s)){if(o(c))if(e.hasChildNodes())if(o(r=l)&&o(r=r.domProps)&&o(r=r.innerHTML)){if(r!==e.innerHTML)return!1}else{for(var u=!0,f=e.firstChild,h=0;h<c.length;h++){if(!f||!$(f,c[h],i,n)){u=!1;break}f=f.nextSibling}if(!u||f)return!1}else p(t,c,i);if(o(l)){var b=!1;for(var g in l)if(!M(g)){b=!0,m(t,i);break}!b&&l.class&&ue(l.class)}}else e.data!==t.text&&(e.data=t.text);return!0}var D,z,O={},A=e.modules,T=e.nodeOps;for(D=0;D<Da.length;++D)for(O[Da[D]]=[],z=0;z<A.length;++z)o(A[z][Da[D]])&&O[Da[D]].push(A[z][Da[D]]);var M=b("attrs,class,staticClass,staticStyle,key");return function(e,i,r,s){if(n(i))return void(o(e)&&k(e));var c=!1,d=[];if(n(e))c=!0,l(i,d);else{var u=o(e.nodeType);if(!u&&Ci(e,i))C(e,i,d,null,null,s);else{if(u){if(1===e.nodeType&&e.hasAttribute(In)&&(e.removeAttribute(In),r=!0),a(r)&&$(e,i,d))return S(i,d,!0),e;e=t(e)}var f=e.elm,p=T.parentNode(f);if(l(i,d,f._leaveCb?null:p,T.nextSibling(f)),o(i.parent))for(var b=i.parent,m=h(i);b;){for(var g=0;g<O.destroy.length;++g)O.destroy[g](b);if(b.elm=i.elm,m){for(var v=0;v<O.create.length;++v)O.create[v]($a,b);var w=b.data.hook.insert;if(w.merged)for(var y=1;y<w.fns.length;y++)w.fns[y]()}else _i(b);b=b.parent}o(p)?x(p,[e],0,0):o(e.tag)&&k(e)}}return S(i,d,c),i.elm}}({nodeOps:Ca,modules:or});Jn&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&gn(e,"input")});var rr={inserted:function(e,t,i,n){"select"===i.tag?(n.elm&&!n.elm._vOptions?be(i,"postpatch",function(){rr.componentUpdated(e,t,i)}):un(e,t,i.context),e._vOptions=[].map.call(e.options,hn)):("textarea"===i.tag||_a(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",bn),e.addEventListener("compositionend",mn),e.addEventListener("change",mn),Jn&&(e.vmodel=!0)))},componentUpdated:function(e,t,i){if("select"===i.tag){un(e,t,i.context);var n=e._vOptions,o=e._vOptions=[].map.call(e.options,hn);if(o.some(function(e,t){return!S(e,n[t])})){(e.multiple?t.value.some(function(e){return pn(e,o)}):t.value!==t.oldValue&&pn(t.value,o))&&gn(e,"change")}}}},sr={bind:function(e,t,i){var n=t.value;i=vn(i);var o=i.data&&i.data.transition,a=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;n&&o?(i.data.show=!0,rn(i,function(){e.style.display=a})):e.style.display=n?a:"none"},update:function(e,t,i){var n=t.value;!n!=!t.oldValue&&(i=vn(i),i.data&&i.data.transition?(i.data.show=!0,n?rn(i,function(){e.style.display=e.__vOriginalDisplay}):sn(i,function(){e.style.display="none"})):e.style.display=n?e.__vOriginalDisplay:"none")},unbind:function(e,t,i,n,o){o||(e.style.display=e.__vOriginalDisplay)}},lr={model:rr,show:sr},cr={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]},dr=function(e){return e.tag||lt(e)},ur=function(e){return"show"===e.name},fr={name:"transition",props:cr,abstract:!0,render:function(e){var t=this,i=this.$slots.default;if(i&&(i=i.filter(dr),i.length)){var n=this.mode,o=i[0];if(yn(this.$vnode))return o;var a=kn(o);if(!a)return o;if(this._leaving)return wn(e,o);var r="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?r+"comment":r+a.tag:s(a.key)?0===String(a.key).indexOf(r)?a.key:r+a.key:a.key;var l=(a.data||(a.data={})).transition=xn(this),c=this._vnode,d=kn(c);if(a.data.directives&&a.data.directives.some(ur)&&(a.data.show=!0),d&&d.data&&!_n(a,d)&&!lt(d)&&(!d.componentInstance||!d.componentInstance._vnode.isComment)){var u=d.data.transition=y({},l);if("out-in"===n)return this._leaving=!0,be(u,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),wn(e,o);if("in-out"===n){if(lt(a))return c;var f,p=function(){f()};be(l,"afterEnter",p),be(l,"enterCancelled",p),be(u,"delayLeave",function(e){f=e})}}return o}}},pr=y({tag:String,moveClass:String},cr);delete pr.mode;var hr={props:pr,beforeMount:function(){var e=this,t=this._update;this._update=function(i,n){var o=bt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,o(),t.call(e,i,n)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",i=Object.create(null),n=this.prevChildren=this.children,o=this.$slots.default||[],a=this.children=[],r=xn(this),s=0;s<o.length;s++){var l=o[s];if(l.tag)if(null!=l.key&&0!==String(l.key).indexOf("__vlist"))a.push(l),i[l.key]=l,(l.data||(l.data={})).transition=r;else;}if(n){for(var c=[],d=[],u=0;u<n.length;u++){var f=n[u];f.data.transition=r,f.data.pos=f.elm.getBoundingClientRect(),i[f.key]?c.push(f):d.push(f)}this.kept=e(t,null,c),this.removed=d}return e(t,null,a)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(Cn),e.forEach(Sn),e.forEach($n),this._reflow=document.body.offsetHeight,e.forEach(function(e){if(e.data.moved){var i=e.elm,n=i.style;Zi(i,t),n.transform=n.WebkitTransform=n.transitionDuration="",i.addEventListener(Ja,i._moveCb=function e(n){n&&n.target!==i||n&&!/transform$/.test(n.propertyName)||(i.removeEventListener(Ja,e),i._moveCb=null,en(i,t))})}}))},methods:{hasMove:function(e,t){if(!Ya)return!1;if(this._hasMove)return this._hasMove;var i=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){Xi(i,e)}),Ki(i,t),i.style.display="none",this.$el.appendChild(i);var n=nn(i);return this.$el.removeChild(i),this._hasMove=n.hasTransform}}},br={Transition:fr,TransitionGroup:hr};qt.config.mustUseProp=ca,qt.config.isReservedTag=wa,qt.config.isReservedAttr=sa,qt.config.getTagNamespace=li,qt.config.isUnknownElement=ci,y(qt.options.directives,lr),y(qt.options.components,br),qt.prototype.__patch__=Wn?ar:C,qt.prototype.$mount=function(e,t){return e=e&&Wn?di(e):void 0,gt(this,e,t)},Wn&&setTimeout(function(){Ln.devtools&&so&&so.emit("init",qt)},0),t.default=qt}.call(t,i(4),i(17).setImmediate)},function(e,t){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";function n(e){i(48)}var o=i(12),a=i(50),r=i(2),s=n,l=r(o.a,a.a,!1,s,null,null);t.a=l.exports},function(e,t,i){"use strict";var n=i(29),o=i(33),a=i(37),r=i(41),s=i(45),l=i(52),c=i(56),d=i(60);t.a={name:"app",components:{"app-navbar":n.a,"app-navmenu":o.a,"app-options":a.a,"app-passview":r.a,"app-rendertaskview":s.a,"app-documentview":l.a,"app-clipscrolltreeview":c.a,"app-screenshotview":d.a},computed:{page:function(){return this.$store.state.page}}}},function(e,t,i){"use strict";t.a={computed:{isConnected:function(){return this.$store.state.connected}},methods:{connect:function(){this.$store.dispatch("connect")},disconnect:function(){this.$store.dispatch("disconnect")}}}},function(e,t,i){"use strict";t.a={methods:{setPage:function(e){this.$store.commit("setPage",e)}},computed:{page:function(){return this.$store.state.page}}}},function(e,t,i){"use strict";t.a={computed:{disabled:function(){return!this.$store.state.connected}},methods:{setProfiler:function(e){e?this.$store.dispatch("sendMessage","enable_profiler"):this.$store.dispatch("sendMessage","disable_profiler")},setTextureCacheDebugger:function(e){e?this.$store.dispatch("sendMessage","enable_texture_cache_debug"):this.$store.dispatch("sendMessage","disable_texture_cache_debug")},setRenderTargetDebugger:function(e){e?this.$store.dispatch("sendMessage","enable_render_target_debug"):this.$store.dispatch("sendMessage","disable_render_target_debug")},setAlphaRectsDebugger:function(e){e?this.$store.dispatch("sendMessage","enable_alpha_rects_debug"):this.$store.dispatch("sendMessage","disable_alpha_rects_debug")},setGpuTimeQueries:function(e){e?this.$store.dispatch("sendMessage","enable_gpu_time_queries"):this.$store.dispatch("sendMessage","disable_gpu_time_queries")},setGpuSampleQueries:function(e){e?this.$store.dispatch("sendMessage","enable_gpu_sample_queries"):this.$store.dispatch("sendMessage","disable_gpu_sample_queries")},setOpaquePass:function(e){e?this.$store.dispatch("sendMessage","enable_opaque_pass"):this.$store.dispatch("sendMessage","disable_opaque_pass")},setAlphaPass:function(e){e?this.$store.dispatch("sendMessage","enable_alpha_pass"):this.$store.dispatch("sendMessage","disable_alpha_pass")},setClipMasks:function(e){e?this.$store.dispatch("sendMessage","enable_clip_masks"):this.$store.dispatch("sendMessage","disable_clip_masks")},setTextPrims:function(e){e?this.$store.dispatch("sendMessage","enable_text_prims"):this.$store.dispatch("sendMessage","disable_text_prims")},setGradientPrims:function(e){e?this.$store.dispatch("sendMessage","enable_gradient_prims"):this.$store.dispatch("sendMessage","disable_gradient_prims")}}}},function(e,t,i){"use strict";t.a={methods:{fetch:function(){this.$store.dispatch("sendMessage","fetch_passes")}},computed:{disabled:function(){return!this.$store.state.connected},passes:function(){return this.$store.state.passes}}}},function(e,t,i){"use strict";var n=i(5);t.a={components:{"app-treeview":n.a},methods:{fetch:function(){this.$store.dispatch("sendMessage","fetch_render_tasks")}},computed:{disabled:function(){return!this.$store.state.connected},render_tasks:function(){return this.$store.state.render_tasks}}}},function(e,t,i){"use strict";t.a={name:"treeview",props:["model"],data:function(){return{open:!1}},computed:{isFolder:function(){return this.model.children&&this.model.children.length}},methods:{toggle:function(){this.isFolder&&(this.open=!this.open)}}}},function(e,t,i){"use strict";var n=i(5);t.a={components:{"app-treeview":n.a},methods:{fetch:function(){this.$store.dispatch("sendMessage","fetch_documents")}},computed:{disabled:function(){return!this.$store.state.connected},documents:function(){return this.$store.state.documents}}}},function(e,t,i){"use strict";var n=i(5);t.a={components:{"app-treeview":n.a},methods:{fetch:function(){this.$store.dispatch("sendMessage","fetch_clip_scroll_tree")}},computed:{disabled:function(){return!this.$store.state.connected},clip_scroll_tree:function(){return this.$store.state.clip_scroll_tree}}}},function(e,t,i){"use strict";t.a={computed:{disabled:function(){return!this.$store.state.connected},screenshot:function(){return this.$store.state.screenshot}},methods:{fetch:function(){this.$store.dispatch("sendMessage","fetch_screenshot")}}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(3),o=i(20),a=i.n(o),r=i(21),s=(i.n(r),i(24)),l=(i.n(s),i(26)),c=i(65);n.default.use(a.a),new n.default({el:"#app",store:c.a,render:function(e){return e(l.a)}})},function(e,t,i){(function(e){function n(e,t){this._id=e,this._clearFn=t}var o=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;t.setTimeout=function(){return new n(a.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new n(a.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},i(18),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,i(4))},function(e,t,i){(function(e,t){!function(e,i){"use strict";function n(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var n={callback:e,args:t};return c[l]=n,s(l),l++}function o(e){delete c[e]}function a(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(i,n)}}function r(e){if(d)setTimeout(r,0,e);else{var t=c[e];if(t){d=!0;try{a(t)}finally{o(e),d=!1}}}}if(!e.setImmediate){var s,l=1,c={},d=!1,u=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){r(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}}()?function(){var t="setImmediate$"+Math.random()+"$",i=function(i){i.source===e&&"string"==typeof i.data&&0===i.data.indexOf(t)&&r(+i.data.slice(t.length))};e.addEventListener?e.addEventListener("message",i,!1):e.attachEvent("onmessage",i),s=function(i){e.postMessage(t+i,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){r(e.data)},s=function(t){e.port2.postMessage(t)}}():u&&"onreadystatechange"in u.createElement("script")?function(){var e=u.documentElement;s=function(t){var i=u.createElement("script");i.onreadystatechange=function(){r(t),i.onreadystatechange=null,e.removeChild(i),i=null},e.appendChild(i)}}():function(){s=function(e){setTimeout(r,0,e)}}(),f.setImmediate=n,f.clearImmediate=o}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,i(4),i(19))},function(e,t){function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(d===setTimeout)return setTimeout(e,0);if((d===i||!d)&&setTimeout)return d=setTimeout,setTimeout(e,0);try{return d(e,0)}catch(t){try{return d.call(null,e,0)}catch(t){return d.call(this,e,0)}}}function a(e){if(u===clearTimeout)return clearTimeout(e);if((u===n||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(e);try{return u(e)}catch(t){try{return u.call(null,e)}catch(t){return u.call(this,e)}}}function r(){b&&p&&(b=!1,p.length?h=p.concat(h):m=-1,h.length&&s())}function s(){if(!b){var e=o(r);b=!0;for(var t=h.length;t;){for(p=h,h=[];++m<t;)p&&p[m].run();m=-1,t=h.length}p=null,b=!1,a(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var d,u,f=e.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:i}catch(e){d=i}try{u="function"==typeof clearTimeout?clearTimeout:n}catch(e){u=n}}();var p,h=[],b=!1,m=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];h.push(new l(e,t)),1!==h.length||b||o(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t,i){/*! Buefy v0.6.7 | MIT License | github.com/buefy/buefy */
+!function(t,n){e.exports=n(i(3))}("undefined"!=typeof self&&self,function(e){return function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=68)}([function(e,t){e.exports=function(e,t,i,n,o){var a,r=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(a=e,r=e.default);var l="function"==typeof r?r.options:r;t&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns),n&&(l._scopeId=n);var c;if(o?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},l._ssrRegister=c):i&&(c=i),c){var d=l.functional,u=d?l.render:l.beforeCreate;d?l.render=function(e,t){return c.call(t),u(e,t)}:l.beforeCreate=u?[].concat(u,c):[c]}return{esModule:a,exports:r,options:l}}},function(e,t,i){"use strict";t.__esModule=!0;var n=i(100),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e,t,i){return t in e?(0,o.default)(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}},function(e,t,i){"use strict";i.d(t,"b",function(){return o});var n={defaultContainerElement:null,defaultIconPack:"mdi",defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultToastDuration:2e3,defaultTooltipType:"is-primary",defaultTooltipAnimated:!1,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0};t.a=n;var o=function(e){n=e}},function(e,t,i){var n=i(0)(i(104),i(105),null,null,null);e.exports=n.exports},function(e,t,i){var n=i(34)("wks"),o=i(25),a=i(7).Symbol,r="function"==typeof a;(e.exports=function(e){return n[e]||(n[e]=r&&a[e]||(r?a:o)("Symbol."+e))}).store=n},function(e,t,i){e.exports={default:i(87),__esModule:!0}},function(e,t,i){"use strict";function n(e,t){return t.split(".").reduce(function(e,t){return e[t]},e)}function o(e,t,i){if(!e)return-1;if(!i||"function"!=typeof i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(e[n],t))return n;return-1}function a(e){void 0!==e.remove?e.remove():e.parentNode.removeChild(e)}function r(e){return e?e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):e}t.b=n,t.c=o,i.d(t,"d",function(){return s}),t.e=a,t.a=r;var s={Android:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Android/i)},BlackBerry:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/IEMobile/i)},any:function(){return s.Android()||s.BlackBerry()||s.iOS()||s.Opera()||s.Windows()}}},function(e,t){var i=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(e,t){var i=e.exports={version:"2.5.5"};"number"==typeof __e&&(__e=i)},function(e,t,i){var n=i(16),o=i(47),a=i(29),r=Object.defineProperty;t.f=i(10)?Object.defineProperty:function(e,t,i){if(n(e),t=a(t,!0),n(i),o)try{return r(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[t]=i.value),e}},function(e,t,i){e.exports=!i(20)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},function(e,t,i){"use strict";var n=i(13);t.a={mixins:[n.a],props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,autocomplete:String,maxlength:[Number,String]},data:function(){return{isValid:!0,isFocused:!1}},computed:{parentField:function(){for(var e=this.$parent,t=0;t<3;t++)e&&!e.$data._isField&&(e=e.$parent);return e},statusType:function(){if(this.parentField)return this.parentField.newType},statusMessage:function(){if(this.parentField)return this.parentField.newMessage},iconSize:function(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus:function(){var e=this;void 0!==this.$data._elementRef&&this.$nextTick(function(){return e.$el.querySelector(e.$data._elementRef).focus()})},onBlur:function(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus:function(e){this.isFocused=!0,this.$emit("focus",e)},checkHtml5Validity:function(){if(void 0!==this.$refs[this.$data._elementRef]){var e=this.$el.querySelector(this.$data._elementRef),t=null,i=null,n=!0;return e.checkValidity()||(t="is-danger",i=e.validationMessage,n=!1),this.isValid=n,this.parentField&&(this.parentField.type||(this.parentField.newType=t),this.parentField.message||(this.parentField.newMessage=i)),this.isValid}}}}},function(e,t,i){"use strict";var n=i(2);t.a={props:{iconPack:String},data:function(){return{newIconPack:this.iconPack||n.a.defaultIconPack}}}},function(e,t,i){e.exports={default:i(69),__esModule:!0}},function(e,t,i){var n=i(9),o=i(21);e.exports=i(10)?function(e,t,i){return n.f(e,t,o(1,i))}:function(e,t,i){return e[t]=i,e}},function(e,t,i){var n=i(19);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,i){var n=i(50),o=i(31);e.exports=function(e){return n(o(e))}},function(e,t,i){var n=i(7),o=i(8),a=i(46),r=i(15),s=i(11),l=function(e,t,i){var c,d,u,f=e&l.F,p=e&l.G,h=e&l.S,b=e&l.P,m=e&l.B,g=e&l.W,v=p?o:o[t]||(o[t]={}),k=v.prototype,x=p?n:h?n[t]:(n[t]||{}).prototype;p&&(i=t);for(c in i)(d=!f&&x&&void 0!==x[c])&&s(v,c)||(u=d?x[c]:i[c],v[c]=p&&"function"!=typeof x[c]?i[c]:m&&d?a(u,n):g&&x[c]==u?function(e){var t=function(t,i,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,i)}return new e(t,i,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(u):b&&"function"==typeof u?a(Function.call,u):u,b&&((v.virtual||(v.virtual={}))[c]=u,e&l.R&&k&&!k[c]&&r(k,c,u)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(t,i){t.exports=e},function(e,t,i){var n=i(49),o=i(35);e.exports=Object.keys||function(e){return n(e,o)}},function(e,t){var i=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++i+n).toString(36))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,i){var n=i(0)(i(103),i(106),null,null,null);e.exports=n.exports},function(e,t,i){var n=i(0)(i(126),i(127),null,null,null);e.exports=n.exports},function(e,t,i){var n=i(19);e.exports=function(e,t){if(!n(e))return e;var i,o;if(t&&"function"==typeof(i=e.toString)&&!n(o=i.call(e)))return o;if("function"==typeof(i=e.valueOf)&&!n(o=i.call(e)))return o;if(!t&&"function"==typeof(i=e.toString)&&!n(o=i.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var i=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:i)(e)}},function(e,t,i){var n=i(34)("keys"),o=i(25);e.exports=function(e){return n[e]||(n[e]=o(e))}},function(e,t,i){var n=i(7),o=n["__core-js_shared__"]||(n["__core-js_shared__"]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,i){var n=i(31);e.exports=function(e){return Object(n(e))}},function(e,t,i){"use strict";var n=i(79)(!0);i(54)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,i=this._i;return i>=t.length?{value:void 0,done:!0}:(e=n(t,i),this._i+=e.length,{value:e,done:!1})})},function(e,t){e.exports=!0},function(e,t,i){var n=i(9).f,o=i(11),a=i(4)("toStringTag");e.exports=function(e,t,i){e&&!o(e=i?e:e.prototype,a)&&n(e,a,{configurable:!0,value:t})}},function(e,t,i){t.f=i(4)},function(e,t,i){var n=i(7),o=i(8),a=i(39),r=i(41),s=i(9).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=a?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:r.f(e)})}},function(e,t,i){var n=i(0)(i(118),i(119),null,null,null);e.exports=n.exports},function(e,t,i){var n=i(0)(i(120),i(121),null,null,null);e.exports=n.exports},function(e,t,i){var n=i(0)(i(122),i(125),null,null,null);e.exports=n.exports},function(e,t,i){var n=i(71);e.exports=function(e,t,i){if(n(e),void 0===t)return e;switch(i){case 1:return function(i){return e.call(t,i)};case 2:return function(i,n){return e.call(t,i,n)};case 3:return function(i,n,o){return e.call(t,i,n,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,i){e.exports=!i(10)&&!i(20)(function(){return 7!=Object.defineProperty(i(48)("div"),"a",{get:function(){return 7}}).a})},function(e,t,i){var n=i(19),o=i(7).document,a=n(o)&&n(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,i){var n=i(11),o=i(17),a=i(73)(!1),r=i(33)("IE_PROTO");e.exports=function(e,t){var i,s=o(e),l=0,c=[];for(i in s)i!=r&&n(s,i)&&c.push(i);for(;t.length>l;)n(s,i=t[l++])&&(~a(c,i)||c.push(i));return c}},function(e,t,i){var n=i(30);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,i){var n=i(32),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t,i){var n=i(0)(i(76),i(107),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=i(77),a=n(o),r=i(5),s=n(r),l="function"==typeof s.default&&"symbol"==typeof a.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};t.default="function"==typeof s.default&&"symbol"===l(a.default)?function(e){return void 0===e?"undefined":l(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":l(e)}},function(e,t,i){"use strict";var n=i(39),o=i(18),a=i(55),r=i(15),s=i(22),l=i(80),c=i(40),d=i(83),u=i(4)("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,i,h,b,m,g){l(i,t,h);var v,k,x,w=function(e){if(!f&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new i(this,e)}}return function(){return new i(this,e)}},y=t+" Iterator",_="values"==b,C=!1,S=e.prototype,$=S[u]||S["@@iterator"]||b&&S[b],D=$||w(b),z=b?_?w("entries"):D:void 0,O="Array"==t?S.entries||$:$;if(O&&(x=d(O.call(new e)))!==Object.prototype&&x.next&&(c(x,y,!0),n||"function"==typeof x[u]||r(x,u,p)),_&&$&&"values"!==$.name&&(C=!0,D=function(){return $.call(this)}),n&&!g||!f&&!C&&S[u]||r(S,u,D),s[t]=D,s[y]=p,b)if(v={values:_?D:w("values"),keys:m?D:w("keys"),entries:z},g)for(k in v)k in S||a(S,k,v[k]);else o(o.P+o.F*(f||C),t,v);return v}},function(e,t,i){e.exports=i(15)},function(e,t,i){var n=i(16),o=i(81),a=i(35),r=i(33)("IE_PROTO"),s=function(){},l=function(){var e,t=i(48)("iframe"),n=a.length;for(t.style.display="none",i(82).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;n--;)delete l.prototype[a[n]];return l()};e.exports=Object.create||function(e,t){var i;return null!==e?(s.prototype=n(e),i=new s,s.prototype=null,i[r]=e):i=l(),void 0===t?i:o(i,t)}},function(e,t,i){i(84);for(var n=i(7),o=i(15),a=i(22),r=i(4)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var c=s[l],d=n[c],u=d&&d.prototype;u&&!u[r]&&o(u,r,c),a[c]=a.Array}},function(e,t,i){var n=i(49),o=i(35).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},function(e,t,i){e.exports={default:i(97),__esModule:!0}},function(e,t,i){var n=i(99),o=i(4)("iterator"),a=i(22);e.exports=i(8).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||a[n(e)]}},function(e,t,i){var n=i(0)(i(108),i(109),null,null,null);e.exports=n.exports},function(e,t,i){var n=i(0)(i(137),i(138),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";var n=i(1),o=i.n(n),a=i(3),r=i.n(a),s=i(13);t.a={mixins:[s.a],components:o()({},r.a.name,r.a),props:{active:{type:Boolean,default:!0},title:String,closable:{type:Boolean,default:!0},type:String,hasIcon:Boolean,size:String,iconSize:String,autoClose:{type:Boolean,default:!1},duration:{type:Number,default:5e3}},data:function(){return{isActive:this.active}},watch:{active:function(e){this.isActive=e},isActive:function(e){e?this.setAutoClose():this.timer&&clearTimeout(this.timer)}},computed:{icon:function(){switch(this.type){case"is-info":return"information";case"is-success":return"check-circle";case"is-warning":return"alert";case"is-danger":return"alert-circle";default:return null}}},methods:{close:function(){this.isActive=!1,this.$emit("close"),this.$emit("update:active",!1)},setAutoClose:function(){var e=this;this.autoClose&&(this.timer=setTimeout(function(){e.isActive&&e.close()},this.duration))}},mounted:function(){this.setAutoClose()}}},function(e,t,i){var n=i(0)(i(149),i(150),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";var n=i(2),o=i(6);t.a={props:{type:{type:String,default:"is-dark"},message:String,duration:Number,queue:{type:Boolean,default:void 0},position:{type:String,default:"is-top",validator:function(e){return["is-top-right","is-top","is-top-left","is-bottom-right","is-bottom","is-bottom-left"].indexOf(e)>-1}},container:String},data:function(){return{isActive:!1,parentTop:null,parentBottom:null,newContainer:this.container||n.a.defaultContainerElement}},computed:{correctParent:function(){switch(this.position){case"is-top-right":case"is-top":case"is-top-left":return this.parentTop;case"is-bottom-right":case"is-bottom":case"is-bottom-left":return this.parentBottom}},transition:function(){switch(this.position){case"is-top-right":case"is-top":case"is-top-left":return{enter:"fadeInDown",leave:"fadeOut"};case"is-bottom-right":case"is-bottom":case"is-bottom-left":return{enter:"fadeInUp",leave:"fadeOut"}}}},methods:{shouldQueue:function(){return!!(void 0!==this.queue?this.queue:n.a.defaultNoticeQueue)&&(this.parentTop.childElementCount>0||this.parentBottom.childElementCount>0)},close:function(){var e=this;clearTimeout(this.timer),this.isActive=!1,setTimeout(function(){e.$destroy(),Object(o.e)(e.$el)},150)},showNotice:function(){var e=this;if(this.shouldQueue())return void setTimeout(function(){return e.showNotice()},250);this.correctParent.insertAdjacentElement("afterbegin",this.$el),this.isActive=!0,this.indefinite||(this.timer=setTimeout(function(){return e.close()},this.newDuration))},setupContainer:function(){if(this.parentTop=document.querySelector(".notices.is-top"),this.parentBottom=document.querySelector(".notices.is-bottom"),!this.parentTop||!this.parentBottom){this.parentTop||(this.parentTop=document.createElement("div"),this.parentTop.className="notices is-top"),this.parentBottom||(this.parentBottom=document.createElement("div"),this.parentBottom.className="notices is-bottom");var e=document.querySelector(this.newContainer)||document.body;e.appendChild(this.parentTop),e.appendChild(this.parentBottom),this.newContainer&&(this.parentTop.classList.add("has-custom-container"),this.parentBottom.classList.add("has-custom-container"))}}},beforeMount:function(){this.setupContainer()},mounted:function(){this.showNotice()}}},function(e,t,i){var n=i(0)(i(179),i(180),null,null,null);e.exports=n.exports},function(e,t,i){var n=i(0)(i(188),i(189),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";function n(e){return new(("undefined"!=typeof window&&window.Vue?window.Vue:O.a).extend(T.a))({el:document.createElement("div"),propsData:e})}Object.defineProperty(t,"__esModule",{value:!0});var o={};i.d(o,"Autocomplete",function(){return p}),i.d(o,"Checkbox",function(){return k}),i.d(o,"Collapse",function(){return _}),i.d(o,"Datepicker",function(){return D}),i.d(o,"Dialog",function(){return P}),i.d(o,"Dropdown",function(){return N}),i.d(o,"Field",function(){return q}),i.d(o,"Icon",function(){return G}),i.d(o,"Input",function(){return Q}),i.d(o,"Loading",function(){return ne}),i.d(o,"Message",function(){return se}),i.d(o,"Modal",function(){return fe}),i.d(o,"Notification",function(){return me}),i.d(o,"Pagination",function(){return xe}),i.d(o,"Panel",function(){return Ce}),i.d(o,"Radio",function(){return Ae}),i.d(o,"Select",function(){return Pe}),i.d(o,"Snackbar",function(){return Ie}),i.d(o,"Switch",function(){return He}),i.d(o,"Table",function(){return Ke}),i.d(o,"Tabs",function(){return tt}),i.d(o,"Tag",function(){return st}),i.d(o,"Taginput",function(){return ut}),i.d(o,"Timepicker",function(){return bt}),i.d(o,"Toast",function(){return xt}),i.d(o,"Tooltip",function(){return Ct}),i.d(o,"Upload",function(){return zt});var a=i(14),r=i.n(a),s=(i(75),i(52)),l=i.n(s),c=function(e){"undefined"!=typeof window&&window.Vue&&window.Vue.use(e)},d=function(e,t){e.component(t.name,t)},u=function(e,t,i){e.prototype[t]=i},f={install:function(e){d(e,l.a)}};c(f);var p=f,h=i(61),b=i.n(h),m=i(110),g=i.n(m),v={install:function(e){d(e,b.a),d(e,g.a)}};c(v);var k=v,x=i(113),w=i.n(x),y={install:function(e){d(e,w.a)}};c(y);var _=y,C=i(116),S=i.n(C),$={install:function(e){d(e,S.a)}};c($);var D=$,z=i(23),O=i.n(z),A=i(135),T=i.n(A),M={alert:function(e){var t=void 0;"string"==typeof e&&(t=e);var i={canCancel:!1,message:t};return n(r()(i,e))},confirm:function(e){var t={};return n(r()(t,e))},prompt:function(e){var t={hasInput:!0,confirmText:"Done"};return n(r()(t,e))}},j={install:function(e){d(e,T.a),u(e,"$dialog",M)}};c(j);var P=j,E=i(43),F=i.n(E),B=i(44),V=i.n(B),I={install:function(e){d(e,F.a),d(e,V.a)}};c(I);var N=I,R=i(45),L=i.n(R),H={install:function(e){d(e,L.a)}};c(H);var q=H,U=i(3),W=i.n(U),Y={install:function(e){d(e,W.a)}};c(Y);var G=Y,K=i(27),X=i.n(K),J={install:function(e){d(e,X.a)}};c(J);var Q=J,Z=i(140),ee=i.n(Z),te={open:function(e){var t={programmatic:!0},i=r()(t,e);return new(("undefined"!=typeof window&&window.Vue?window.Vue:O.a).extend(ee.a))({el:document.createElement("div"),propsData:i})}},ie={install:function(e){d(e,ee.a),u(e,"$loading",te)}};c(ie);var ne=ie,oe=i(143),ae=i.n(oe),re={install:function(e){d(e,ae.a)}};c(re);var se=re,le=i(62),ce=i.n(le),de={open:function(e){var t=void 0,i=void 0;"string"==typeof e&&(t=e);var n={programmatic:!0,content:t};e.parent&&(i=e.parent,delete e.parent);var o=r()(n,e);return new(("undefined"!=typeof window&&window.Vue?window.Vue:O.a).extend(ce.a))({parent:i,el:document.createElement("div"),propsData:o})}},ue={install:function(e){d(e,ce.a),u(e,"$modal",de)}};c(ue);var fe=ue,pe=i(146),he=i.n(pe),be={install:function(e){d(e,he.a)}};c(be);var me=be,ge=i(64),ve=i.n(ge),ke={install:function(e){d(e,ve.a)}};c(ke);var xe=ke,we=i(151),ye=i.n(we),_e={install:function(e){d(e,ye.a)}};c(_e);var Ce=_e,Se=i(154),$e=i.n(Se),De=i(157),ze=i.n(De),Oe={install:function(e){d(e,$e.a),d(e,ze.a)}};c(Oe);var Ae=Oe,Te=i(28),Me=i.n(Te),je={install:function(e){d(e,Me.a)}};c(je);var Pe=je,Ee=i(160),Fe=i.n(Ee),Be={open:function(e){var t=void 0;"string"==typeof e&&(t=e);var i={type:"is-success",position:"is-bottom-right",message:t},n=r()(i,e);return new(("undefined"!=typeof window&&window.Vue?window.Vue:O.a).extend(Fe.a))({el:document.createElement("div"),propsData:n})}},Ve={install:function(e){u(e,"$snackbar",Be)}};c(Ve);var Ie=Ve,Ne=i(163),Re=i.n(Ne),Le={install:function(e){d(e,Re.a)}};c(Le);var He=Le,qe=i(166),Ue=i.n(qe),We=i(66),Ye=i.n(We),Ge={install:function(e){d(e,Ue.a),d(e,Ye.a)}};c(Ge);var Ke=Ge,Xe=i(182),Je=i.n(Xe),Qe=i(185),Ze=i.n(Qe),et={install:function(e){d(e,Je.a),d(e,Ze.a)}};c(et);var tt=et,it=i(67),nt=i.n(it),ot=i(190),at=i.n(ot),rt={install:function(e){d(e,nt.a),d(e,at.a)}};c(rt);var st=rt,lt=i(193),ct=i.n(lt),dt={install:function(e){d(e,ct.a)}};c(dt);var ut=dt,ft=i(196),pt=i.n(ft),ht={install:function(e){d(e,pt.a)}};c(ht);var bt=ht,mt=i(199),gt=i.n(mt),vt={open:function(e){var t=void 0;"string"==typeof e&&(t=e);var i={message:t},n=r()(i,e);return new(("undefined"!=typeof window&&window.Vue?window.Vue:O.a).extend(gt.a))({el:document.createElement("div"),propsData:n})}},kt={install:function(e){u(e,"$toast",vt)}};c(kt);var xt=kt,wt=i(202),yt=i.n(wt),_t={install:function(e){d(e,yt.a)}};c(_t);var Ct=_t,St=i(205),$t=i.n(St),Dt={install:function(e){d(e,$t.a)}};c(Dt);var zt=Dt,Ot=i(2),At={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(Ot.b)(r()(Ot.a,t));for(var i in o)e.use(o[i])}};c(At);t.default=At},function(e,t,i){i(70),e.exports=i(8).Object.assign},function(e,t,i){var n=i(18);n(n.S+n.F,"Object",{assign:i(72)})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,i){"use strict";var n=i(24),o=i(36),a=i(26),r=i(37),s=i(50),l=Object.assign;e.exports=!l||i(20)(function(){var e={},t={},i=Symbol(),n="abcdefghijklmnopqrst";return e[i]=7,n.split("").forEach(function(e){t[e]=e}),7!=l({},e)[i]||Object.keys(l({},t)).join("")!=n})?function(e,t){for(var i=r(e),l=arguments.length,c=1,d=o.f,u=a.f;l>c;)for(var f,p=s(arguments[c++]),h=d?n(p).concat(d(p)):n(p),b=h.length,m=0;b>m;)u.call(p,f=h[m++])&&(i[f]=p[f]);return i}:l},function(e,t,i){var n=i(17),o=i(51),a=i(74);e.exports=function(e){return function(t,i,r){var s,l=n(t),c=o(l.length),d=a(r,c);if(e&&i!=i){for(;c>d;)if((s=l[d++])!=s)return!0}else for(;c>d;d++)if((e||d in l)&&l[d]===i)return e||d||0;return!e&&-1}}},function(e,t,i){var n=i(32),o=Math.max,a=Math.min;e.exports=function(e,t){return e=n(e),e<0?o(e+t,0):a(e,t)}},function(e,t){},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(53),o=i.n(n),a=i(59),r=i.n(a),s=i(1),l=i.n(s),c=i(6),d=i(12),u=i(27),f=i.n(u);t.default={name:"BAutocomplete",components:l()({},f.a.name,f.a),mixins:[d.a],inheritAttrs:!1,props:{value:[Number,String],data:{type:Array,default:function(){return[]}},field:{type:String,default:"value"},keepFirst:Boolean,clearOnSelect:Boolean,openOnFocus:Boolean},data:function(){return{selected:null,hovered:null,isActive:!1,newValue:this.value,isListInViewportVertically:!0,hasFocus:!1,_isAutocomplete:!0,_elementRef:"input"}},computed:{whiteList:function(){var e=[];if(e.push(this.$refs.input.$el.querySelector("input")),e.push(this.$refs.dropdown),void 0!==this.$refs.dropdown){var t=this.$refs.dropdown.querySelectorAll("*"),i=!0,n=!1,o=void 0;try{for(var a,s=r()(t);!(i=(a=s.next()).done);i=!0){var l=a.value;e.push(l)}}catch(e){n=!0,o=e}finally{try{!i&&s.return&&s.return()}finally{if(n)throw o}}}return e},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasEmptySlot:function(){return!!this.$slots.empty},hasHeaderSlot:function(){return!!this.$slots.header}},watch:{isActive:function(e){var t=this;e?this.calcDropdownInViewportVertical():(this.$nextTick(function(){return t.setHovered(null)}),setTimeout(function(){t.calcDropdownInViewportVertical()},100))},newValue:function(e){this.$emit("input",e);var t=this.getValue(this.selected);t&&t!==e&&this.setSelected(null,!1),!this.hasFocus||this.openOnFocus&&!e||(this.isActive=!!e)},value:function(e){this.newValue=e,!this.isValid&&this.$refs.input.checkHtml5Validity()},data:function(e){this.keepFirst&&this.selectFirstOption(e)}},methods:{setHovered:function(e){void 0!==e&&(this.hovered=e)},setSelected:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];void 0!==e&&(this.selected=e,this.$emit("select",this.selected),null!==this.selected&&(this.newValue=this.clearOnSelect?"":this.getValue(this.selected)),i&&this.$nextTick(function(){t.isActive=!1}))},selectFirstOption:function(e){var t=this;this.$nextTick(function(){e.length?(t.openOnFocus||""!==t.newValue&&t.hovered!==e[0])&&t.setHovered(e[0]):t.setHovered(null)})},enterPressed:function(){null!==this.hovered&&this.setSelected(this.hovered)},tabPressed:function(){if(null===this.hovered)return void(this.isActive=!1);this.setSelected(this.hovered)},clickedOutside:function(e){this.whiteList.indexOf(e.target)<0&&(this.isActive=!1)},getValue:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var i="object"===(void 0===e?"undefined":o()(e))?Object(c.b)(e,this.field):e,n="string"==typeof this.newValue?Object(c.a)(this.newValue):this.newValue,a=new RegExp("("+n+")","gi");return t?i.replace(a,"<b>$1</b>"):i}},calcDropdownInViewportVertical:function(){var e=this;this.$nextTick(function(){if(void 0!==e.$refs.dropdown){var t=e.$refs.dropdown.getBoundingClientRect();e.isListInViewportVertically=t.top>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)}})},keyArrows:function(e){var t="down"===e?1:-1;if(this.isActive){var i=this.data.indexOf(this.hovered)+t;i=i>this.data.length-1?this.data.length:i,i=i<0?0:i,this.setHovered(this.data[i]);var n=this.$refs.dropdown.querySelector(".dropdown-content"),o=n.querySelectorAll(".dropdown-item:not(.is-disabled)")[i];if(!o)return;var a=n.scrollTop,r=n.scrollTop+n.clientHeight-o.clientHeight;o.offsetTop<a?n.scrollTop=o.offsetTop:o.offsetTop>=r&&(n.scrollTop=o.offsetTop-n.clientHeight+o.clientHeight)}else this.isActive=!0},focused:function(e){this.getValue(this.selected)===this.newValue&&this.$el.querySelector("input").select(),this.openOnFocus&&(this.isActive=!0,this.keepFirst&&this.selectFirstOption(this.data)),this.hasFocus=!0,this.$emit("focus",e)},onBlur:function(e){this.hasFocus=!1,this.$emit("blur",e)}},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),window.addEventListener("resize",this.calcDropdownInViewportVertical))},beforeDestroy:function(){"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),window.removeEventListener("resize",this.calcDropdownInViewportVertical))}}},function(e,t,i){e.exports={default:i(78),__esModule:!0}},function(e,t,i){i(38),i(57),e.exports=i(41).f("iterator")},function(e,t,i){var n=i(32),o=i(31);e.exports=function(e){return function(t,i){var a,r,s=String(o(t)),l=n(i),c=s.length;return l<0||l>=c?e?"":void 0:(a=s.charCodeAt(l),a<55296||a>56319||l+1===c||(r=s.charCodeAt(l+1))<56320||r>57343?e?s.charAt(l):a:e?s.slice(l,l+2):r-56320+(a-55296<<10)+65536)}}},function(e,t,i){"use strict";var n=i(56),o=i(21),a=i(40),r={};i(15)(r,i(4)("iterator"),function(){return this}),e.exports=function(e,t,i){e.prototype=n(r,{next:o(1,i)}),a(e,t+" Iterator")}},function(e,t,i){var n=i(9),o=i(16),a=i(24);e.exports=i(10)?Object.defineProperties:function(e,t){o(e);for(var i,r=a(t),s=r.length,l=0;s>l;)n.f(e,i=r[l++],t[i]);return e}},function(e,t,i){var n=i(7).document;e.exports=n&&n.documentElement},function(e,t,i){var n=i(11),o=i(37),a=i(33)("IE_PROTO"),r=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?r:null}},function(e,t,i){"use strict";var n=i(85),o=i(86),a=i(22),r=i(17);e.exports=i(54)(Array,"Array",function(e,t){this._t=r(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,i=this._i++;return!e||i>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,i):"values"==t?o(0,e[i]):o(0,[i,e[i]])},"values"),a.Arguments=a.Array,n("keys"),n("values"),n("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,i){i(88),i(94),i(95),i(96),e.exports=i(8).Symbol},function(e,t,i){"use strict";var n=i(7),o=i(11),a=i(10),r=i(18),s=i(55),l=i(89).KEY,c=i(20),d=i(34),u=i(40),f=i(25),p=i(4),h=i(41),b=i(42),m=i(90),g=i(91),v=i(16),k=i(19),x=i(17),w=i(29),y=i(21),_=i(56),C=i(92),S=i(93),$=i(9),D=i(24),z=S.f,O=$.f,A=C.f,T=n.Symbol,M=n.JSON,j=M&&M.stringify,P=p("_hidden"),E=p("toPrimitive"),F={}.propertyIsEnumerable,B=d("symbol-registry"),V=d("symbols"),I=d("op-symbols"),N=Object.prototype,R="function"==typeof T,L=n.QObject,H=!L||!L.prototype||!L.prototype.findChild,q=a&&c(function(){return 7!=_(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a})?function(e,t,i){var n=z(N,t);n&&delete N[t],O(e,t,i),n&&e!==N&&O(N,t,n)}:O,U=function(e){var t=V[e]=_(T.prototype);return t._k=e,t},W=R&&"symbol"==typeof T.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof T},Y=function(e,t,i){return e===N&&Y(I,t,i),v(e),t=w(t,!0),v(i),o(V,t)?(i.enumerable?(o(e,P)&&e[P][t]&&(e[P][t]=!1),i=_(i,{enumerable:y(0,!1)})):(o(e,P)||O(e,P,y(1,{})),e[P][t]=!0),q(e,t,i)):O(e,t,i)},G=function(e,t){v(e);for(var i,n=m(t=x(t)),o=0,a=n.length;a>o;)Y(e,i=n[o++],t[i]);return e},K=function(e,t){return void 0===t?_(e):G(_(e),t)},X=function(e){var t=F.call(this,e=w(e,!0));return!(this===N&&o(V,e)&&!o(I,e))&&(!(t||!o(this,e)||!o(V,e)||o(this,P)&&this[P][e])||t)},J=function(e,t){if(e=x(e),t=w(t,!0),e!==N||!o(V,t)||o(I,t)){var i=z(e,t);return!i||!o(V,t)||o(e,P)&&e[P][t]||(i.enumerable=!0),i}},Q=function(e){for(var t,i=A(x(e)),n=[],a=0;i.length>a;)o(V,t=i[a++])||t==P||t==l||n.push(t);return n},Z=function(e){for(var t,i=e===N,n=A(i?I:x(e)),a=[],r=0;n.length>r;)!o(V,t=n[r++])||i&&!o(N,t)||a.push(V[t]);return a};R||(T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(i){this===N&&t.call(I,i),o(this,P)&&o(this[P],e)&&(this[P][e]=!1),q(this,e,y(1,i))};return a&&H&&q(N,e,{configurable:!0,set:t}),U(e)},s(T.prototype,"toString",function(){return this._k}),S.f=J,$.f=Y,i(58).f=C.f=Q,i(26).f=X,i(36).f=Z,a&&!i(39)&&s(N,"propertyIsEnumerable",X,!0),h.f=function(e){return U(p(e))}),r(r.G+r.W+r.F*!R,{Symbol:T});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)p(ee[te++]);for(var ie=D(p.store),ne=0;ie.length>ne;)b(ie[ne++]);r(r.S+r.F*!R,"Symbol",{for:function(e){return o(B,e+="")?B[e]:B[e]=T(e)},keyFor:function(e){if(!W(e))throw TypeError(e+" is not a symbol!");for(var t in B)if(B[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),r(r.S+r.F*!R,"Object",{create:K,defineProperty:Y,defineProperties:G,getOwnPropertyDescriptor:J,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),M&&r(r.S+r.F*(!R||c(function(){var e=T();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))})),"JSON",{stringify:function(e){for(var t,i,n=[e],o=1;arguments.length>o;)n.push(arguments[o++]);if(i=t=n[1],(k(t)||void 0!==e)&&!W(e))return g(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!W(t))return t}),n[1]=t,j.apply(M,n)}}),T.prototype[E]||i(15)(T.prototype,E,T.prototype.valueOf),u(T,"Symbol"),u(Math,"Math",!0),u(n.JSON,"JSON",!0)},function(e,t,i){var n=i(25)("meta"),o=i(19),a=i(11),r=i(9).f,s=0,l=Object.isExtensible||function(){return!0},c=!i(20)(function(){return l(Object.preventExtensions({}))}),d=function(e){r(e,n,{value:{i:"O"+ ++s,w:{}}})},u=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,n)){if(!l(e))return"F";if(!t)return"E";d(e)}return e[n].i},f=function(e,t){if(!a(e,n)){if(!l(e))return!0;if(!t)return!1;d(e)}return e[n].w},p=function(e){return c&&h.NEED&&l(e)&&!a(e,n)&&d(e),e},h=e.exports={KEY:n,NEED:!1,fastKey:u,getWeak:f,onFreeze:p}},function(e,t,i){var n=i(24),o=i(36),a=i(26);e.exports=function(e){var t=n(e),i=o.f;if(i)for(var r,s=i(e),l=a.f,c=0;s.length>c;)l.call(e,r=s[c++])&&t.push(r);return t}},function(e,t,i){var n=i(30);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,i){var n=i(17),o=i(58).f,a={}.toString,r="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return o(e)}catch(e){return r.slice()}};e.exports.f=function(e){return r&&"[object Window]"==a.call(e)?s(e):o(n(e))}},function(e,t,i){var n=i(26),o=i(21),a=i(17),r=i(29),s=i(11),l=i(47),c=Object.getOwnPropertyDescriptor;t.f=i(10)?c:function(e,t){if(e=a(e),t=r(t,!0),l)try{return c(e,t)}catch(e){}if(s(e,t))return o(!n.f.call(e,t),e[t])}},function(e,t){},function(e,t,i){i(42)("asyncIterator")},function(e,t,i){i(42)("observable")},function(e,t,i){i(57),i(38),e.exports=i(98)},function(e,t,i){var n=i(16),o=i(60);e.exports=i(8).getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},function(e,t,i){var n=i(30),o=i(4)("toStringTag"),a="Arguments"==n(function(){return arguments}()),r=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,i,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=r(t=Object(e),o))?i:a?n(t):"Object"==(s=n(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,i){e.exports={default:i(101),__esModule:!0}},function(e,t,i){i(102);var n=i(8).Object;e.exports=function(e,t,i){return n.defineProperty(e,t,i)}},function(e,t,i){var n=i(18);n(n.S+n.F*!i(10),"Object",{defineProperty:i(9).f})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i.n(n),a=i(3),r=i.n(a),s=i(2),l=i(12);t.default={name:"BInput",components:o()({},r.a.name,r.a),mixins:[l.a],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},passwordReveal:Boolean,hasCounter:{type:Boolean,default:function(){return s.a.defaultInputHasCounter}}},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||s.a.defaultInputAutocomplete,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{rootClasses:function(){return[this.iconPosition,this.size,{"is-expanded":this.expanded,"is-loading":this.loading,"is-clearfix":!this.hasMessage}]},inputClasses:function(){return[this.statusType,this.size,{"is-rounded":this.rounded}]},hasIconRight:function(){return this.passwordReveal||this.loading||this.statusType},iconPosition:function(){return this.icon&&this.hasIconRight?"has-icons-left has-icons-right":!this.icon&&this.hasIconRight?"has-icons-right":this.icon?"has-icons-left":void 0},statusTypeIcon:function(){switch(this.statusType){case"is-success":return"check";case"is-danger":return"alert-circle";case"is-info":return"information";case"is-warning":return"alert"}},hasMessage:function(){return!!this.statusMessage},passwordVisibleIcon:function(){return this.isPasswordVisible?"eye-off":"eye"},valueLength:function(){return"string"==typeof this.newValue?this.newValue.length:"number"==typeof this.newValue?this.newValue.toString().length:0}},watch:{value:function(e){this.newValue=e},newValue:function(e){this.$emit("input",e),!this.isValid&&this.checkHtml5Validity()}},methods:{togglePasswordVisibility:function(){var e=this;this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick(function(){e.$refs.input.focus()})},onInput:function(e){var t=this;this.$nextTick(function(){t.newValue=e.target.value})}}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2);t.default={name:"BIcon",props:{type:String,pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{newIcon:function(){return this.both?"mdi"===this.newPack?this.newPack+"-"+this.icon:"fa-"+this.getEquivalentIconOf(this.icon):"mdi"===this.newPack?this.newPack+"-"+this.icon:"fa-"+this.icon},newPack:function(){return this.pack||n.a.defaultIconPack},newType:function(){if(this.type){var e=this.type.split("-");if(e.length)return"has-text-"+e[1]}},newCustomSize:function(){return this.customSize||this.customSizeByPack},customSizeByPack:function(){var e="mdi"===this.newPack?"mdi-24px":"fa-lg",t="mdi"===this.newPack?"mdi-36px":"fa-2x",i="mdi"===this.newPack?"mdi-48px":"fa-3x";switch(this.size){case"is-small":return;case"is-medium":return t;case"is-large":return i;default:return e}}},methods:{getEquivalentIconOf:function(e){switch(e){case"check":return"check";case"information":return"info-circle";case"check-circle":return"check-circle";case"alert":return"exclamation-triangle";case"alert-circle":return"exclamation-circle";case"arrow-up":return"arrow-up";case"chevron-right":return"angle-right";case"chevron-left":return"angle-left";case"chevron-down":return"angle-down";case"eye":return"eye";case"eye-off":return"eye-slash";case"menu-down":return"caret-down";case"menu-up":return"caret-up";default:return e}}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"icon",class:[e.newType,e.size]},[i("i",{class:[e.newPack,e.newIcon,e.newCustomSize,e.customClass]})])},staticRenderFns:[]}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"control",class:e.rootClasses},["textarea"!==e.type?i("input",e._b({ref:"input",staticClass:"input",class:e.inputClasses,attrs:{type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength},domProps:{value:e.newValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"input",e.$attrs,!1)):i("textarea",e._b({ref:"textarea",staticClass:"textarea",class:e.inputClasses,attrs:{maxlength:e.maxlength},domProps:{value:e.newValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"textarea",e.$attrs,!1)),e._v(" "),e.icon?i("b-icon",{staticClass:"is-left",attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize}}):e._e(),e._v(" "),e.loading||!e.passwordReveal&&!e.statusType?e._e():i("b-icon",{staticClass:"is-right",class:{"is-clickable":e.passwordReveal},attrs:{icon:e.passwordReveal?e.passwordVisibleIcon:e.statusTypeIcon,pack:e.iconPack,size:e.iconSize,type:e.passwordReveal?"is-primary":e.statusType,both:""},nativeOn:{click:function(t){e.togglePasswordVisibility(t)}}}),e._v(" "),e.maxlength&&e.hasCounter&&"number"!==e.type?i("small",{staticClass:"help counter",class:{"is-invisible":!e.isFocused}},[e._v("\n "+e._s(e.valueLength)+" / "+e._s(e.maxlength)+"\n ")]):e._e()],1)},staticRenderFns:[]}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"autocomplete control",class:{"is-expanded":e.expanded}},[i("b-input",e._b({ref:"input",attrs:{size:e.size,loading:e.loading,rounded:e.rounded,icon:e.icon,"icon-pack":e.iconPack,maxlength:e.maxlength,autocomplete:"off"},on:{focus:e.focused,blur:e.onBlur},nativeOn:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"esc",27,t.key))return null;t.preventDefault(),e.isActive=!1},keydown:[function(t){if(!("button"in t)&&e._k(t.keyCode,"tab",9,t.key))return null;e.tabPressed(t)},function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key))return null;t.preventDefault(),e.enterPressed(t)},function(t){if(!("button"in t)&&e._k(t.keyCode,"up",38,t.key))return null;t.preventDefault(),e.keyArrows("up")},function(t){if(!("button"in t)&&e._k(t.keyCode,"down",40,t.key))return null;t.preventDefault(),e.keyArrows("down")}]},model:{value:e.newValue,callback:function(t){e.newValue=t},expression:"newValue"}},"b-input",e.$attrs,!1)),e._v(" "),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive&&(e.data.length>0||e.hasEmptySlot||e.hasHeaderSlot),expression:"isActive && (data.length > 0 || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{"is-opened-top":!e.isListInViewportVertically}},[i("div",{staticClass:"dropdown-content"},[e.hasHeaderSlot?i("div",{staticClass:"dropdown-item"},[e._t("header")],2):e._e(),e._v(" "),e._l(e.data,function(t,n){return i("a",{key:n,staticClass:"dropdown-item",class:{"is-hovered":t===e.hovered},on:{click:function(i){e.setSelected(t)}}},[e.hasDefaultSlot?e._t("default",null,{option:t,index:n}):i("span",{domProps:{innerHTML:e._s(e.getValue(t,!0))}})],2)}),e._v(" "),0===e.data.length&&e.hasEmptySlot?i("div",{staticClass:"dropdown-item is-disabled"},[e._t("empty")],2):e._e()],2)])])],1)},staticRenderFns:[]}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=i.n(n);t.default={name:"BCheckbox",props:{value:[String,Number,Boolean,Function,Object,Array,o.a],nativeValue:[String,Number,Boolean,Function,Object,Array,o.a],type:String,disabled:Boolean,required:Boolean,name:String,size:String,trueValue:{type:[String,Number,Boolean,Function,Object,Array,o.a],default:!0},falseValue:{type:[String,Number,Boolean,Function,Object,Array,o.a],default:!1}},data:function(){return{newValue:this.value}},watch:{value:function(e){this.newValue=e},newValue:function(e){this.$emit("input",e)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("label",{ref:"label",staticClass:"b-checkbox checkbox",class:[e.size,{"is-disabled":e.disabled}],attrs:{disabled:e.disabled,tabindex:!e.disabled&&0},on:{keydown:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key)&&e._k(t.keyCode,"space",32,t.key))return null;t.preventDefault(),e.$refs.label.click()}}},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.newValue,expression:"newValue"}],attrs:{type:"checkbox",disabled:e.disabled,required:e.required,name:e.name,"true-value":e.trueValue,"false-value":e.falseValue},domProps:{value:e.nativeValue,checked:Array.isArray(e.newValue)?e._i(e.newValue,e.nativeValue)>-1:e._q(e.newValue,e.trueValue)},on:{change:function(t){var i=e.newValue,n=t.target,o=n.checked?e.trueValue:e.falseValue;if(Array.isArray(i)){var a=e.nativeValue,r=e._i(i,a);n.checked?r<0&&(e.newValue=i.concat([a])):r>-1&&(e.newValue=i.slice(0,r).concat(i.slice(r+1)))}else e.newValue=o}}}),e._v(" "),i("span",{staticClass:"check",class:e.type}),e._v(" "),i("span",{staticClass:"control-label"},[e._t("default")],2)])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(111),i(112),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=i.n(n);t.default={name:"BCheckboxButton",props:{value:[String,Number,Boolean,Function,Object,Array,o.a],nativeValue:[String,Number,Boolean,Function,Object,Array,o.a],disabled:Boolean,name:String,size:String,type:{type:String,default:"is-primary"}},data:function(){return{newValue:this.value}},computed:{checked:function(){return Array.isArray(this.newValue)?this.newValue.indexOf(this.nativeValue)>=0:this.newValue===this.nativeValue}},watch:{value:function(e){this.newValue=e},newValue:function(e){this.$emit("input",e)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"control"},[i("label",{ref:"label",staticClass:"b-checkbox checkbox button",class:[e.checked?e.type:null,e.size,{"is-disabled":e.disabled}],attrs:{disabled:e.disabled,tabindex:!e.disabled&&0},on:{keydown:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key)&&e._k(t.keyCode,"space",32,t.key))return null;t.preventDefault(),e.$refs.label.click()}}},[e._t("default"),e._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:e.newValue,expression:"newValue"}],attrs:{type:"checkbox",disabled:e.disabled,name:e.name},domProps:{value:e.nativeValue,checked:Array.isArray(e.newValue)?e._i(e.newValue,e.nativeValue)>-1:e.newValue},on:{change:function(t){var i=e.newValue,n=t.target,o=!!n.checked;if(Array.isArray(i)){var a=e.nativeValue,r=e._i(i,a);n.checked?r<0&&(e.newValue=i.concat([a])):r>-1&&(e.newValue=i.slice(0,r).concat(i.slice(r+1)))}else e.newValue=o}}})],2)])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(114),i(115),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"BCollapse",props:{open:{type:Boolean,default:!0},animation:{type:String,default:"fade"}},data:function(){return{isOpen:this.open}},watch:{open:function(e){this.isOpen=e}},methods:{toggle:function(){this.isOpen=!this.isOpen,this.$emit("update:open",this.isOpen),this.$emit(this.isOpen?"open":"close")}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"collapse"},[i("div",{staticClass:"collapse-trigger",on:{click:e.toggle}},[e._t("trigger",null,{open:e.isOpen})],2),e._v(" "),i("transition",{attrs:{name:e.animation}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"collapse-content"},[e._t("default")],2)])],1)},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(117),i(134),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=i(1),a=i.n(o),r=i(12),s=i(6),l=i(2),c=i(43),d=i.n(c),u=i(44),f=i.n(u),p=i(27),h=i.n(p),b=i(45),m=i.n(b),g=i(28),v=i.n(g),k=i(3),x=i.n(k),w=i(128),y=i.n(w);t.default={name:"BDatepicker",components:(n={},a()(n,y.a.name,y.a),a()(n,h.a.name,h.a),a()(n,m.a.name,m.a),a()(n,v.a.name,v.a),a()(n,x.a.name,x.a),a()(n,d.a.name,d.a),a()(n,f.a.name,f.a),n),mixins:[r.a],inheritAttrs:!1,props:{value:Date,dayNames:{type:Array,default:function(){return Array.isArray(l.a.defaultDayNames)?l.a.defaultDayNames:["Su","M","Tu","W","Th","F","S"]}},monthNames:{type:Array,default:function(){return Array.isArray(l.a.defaultMonthNames)?l.a.defaultMonthNames:["January","February","March","April","May","June","July","August","September","October","November","December"]}},firstDayOfWeek:{type:Number,default:function(){return"number"==typeof l.a.defaultFirstDayOfWeek?l.a.defaultFirstDayOfWeek:0}},inline:Boolean,minDate:Date,maxDate:Date,focusedDate:Date,placeholder:String,readonly:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},unselectableDates:Array,unselectableDaysOfWeek:{type:Array,default:function(){return l.a.defaultUnselectableDaysOfWeek}},selectableDates:Array,dateFormatter:{type:Function,default:function(e){if("function"==typeof l.a.defaultDateFormatter)return l.a.defaultDateFormatter(e);var t=e.getFullYear()+"/"+(e.getMonth()+1)+"/"+e.getDate();return new Date(t).toLocaleDateString()}},dateParser:{type:Function,default:function(e){return"function"==typeof l.a.defaultDateParser?l.a.defaultDateParser(e):new Date(Date.parse(e))}},mobileNative:{type:Boolean,default:function(){return l.a.defaultDatepickerMobileNative}},position:String,events:Array,indicators:{type:String,default:"dots"}},data:function(){var e=this.value||this.focusedDate||new Date;return{dateSelected:this.value,focusedDateData:{month:e.getMonth(),year:e.getFullYear()},_elementRef:"input",_isDatepicker:!0}},computed:{listOfYears:function(){for(var e=this.maxDate?this.maxDate.getFullYear():Math.max((new Date).getFullYear(),this.focusedDateData.year)+3,t=this.minDate?this.minDate.getFullYear():1900,i=[],n=t;n<=e;n++)i.push(n);return i.reverse()},isFirstMonth:function(){return!!this.minDate&&new Date(this.focusedDateData.year,this.focusedDateData.month)<=new Date(this.minDate.getFullYear(),this.minDate.getMonth())},isLastMonth:function(){return!!this.maxDate&&new Date(this.focusedDateData.year,this.focusedDateData.month)>=new Date(this.maxDate.getFullYear(),this.maxDate.getMonth())},isMobile:function(){return this.mobileNative&&s.d.any()}},watch:{dateSelected:function(e){var t=e||new Date;this.focusedDateData={month:t.getMonth(),year:t.getFullYear()},this.$emit("input",e),this.$refs.dropdown&&(this.$refs.dropdown.isActive=!1)},value:function(e){this.dateSelected=e,!this.isValid&&this.$refs.input.checkHtml5Validity()},focusedDate:function(e){e&&(this.focusedDateData={month:e.getMonth(),year:e.getFullYear()})},"focusedDateData.month":function(e){this.$emit("change-month",e)},"focusedDateData.year":function(e){this.$emit("change-year",e)}},methods:{updateSelectedDate:function(e){this.dateSelected=e},onChange:function(e){var t=this.dateParser(e);t&&!isNaN(t)?this.dateSelected=t:(this.dateSelected=null,this.$refs.input.newValue=this.dateSelected)},formatValue:function(e){return e&&!isNaN(e)?this.dateFormatter(e):null},decrementMonth:function(){this.disabled||(this.focusedDateData.month>0?this.focusedDateData.month-=1:(this.focusedDateData.month=11,this.focusedDateData.year-=1))},incrementMonth:function(){this.disabled||(this.focusedDateData.month<11?this.focusedDateData.month+=1:(this.focusedDateData.month=0,this.focusedDateData.year+=1))},formatYYYYMMDD:function(e){var t=new Date(e);if(e&&!isNaN(t)){var i=t.getFullYear(),n=t.getMonth()+1,o=t.getDate();return i+"-"+(n<10?"0":"")+n+"-"+(o<10?"0":"")+o}return""},onChangeNativePicker:function(e){var t=e.target.value;this.dateSelected=t?new Date(t.replace(/-/g,"/")):null}}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(59),o=i.n(n),a=i(5),r=i.n(a);t.default={name:"BDropdown",props:{value:{type:[String,Number,Boolean,Object,Array,r.a,Function],default:null},disabled:Boolean,hoverable:Boolean,inline:Boolean,position:{type:String,validator:function(e){return["is-top-right","is-top-left","is-bottom-left"].indexOf(e)>-1}},mobileModal:{type:Boolean,default:!0}},data:function(){return{selected:this.value,isActive:!1,_isDropdown:!0}},computed:{rootClasses:function(){return[this.position,{"is-disabled":this.disabled,"is-hoverable":this.hoverable,"is-inline":this.inline,"is-active":this.isActive||this.inline,"is-mobile-modal":this.isMobileModal}]},isMobileModal:function(){return this.mobileModal&&!this.inline&&!this.hoverable}},watch:{value:function(e){this.selected=e},isActive:function(e){this.$emit("active-change",e)}},methods:{selectItem:function(e){this.selected!==e&&(this.$emit("change",e),this.selected=e),this.$emit("input",e),this.isActive=!1},isInWhiteList:function(e){if(e===this.$refs.dropdownMenu)return!0;if(e===this.$refs.trigger)return!0;if(void 0!==this.$refs.dropdownMenu){var t=this.$refs.dropdownMenu.querySelectorAll("*"),i=!0,n=!1,a=void 0;try{for(var r,s=o()(t);!(i=(r=s.next()).done);i=!0){if(e===r.value)return!0}}catch(e){n=!0,a=e}finally{try{!i&&s.return&&s.return()}finally{if(n)throw a}}}if(void 0!==this.$refs.trigger){var l=this.$refs.trigger.querySelectorAll("*"),c=!0,d=!1,u=void 0;try{for(var f,p=o()(l);!(c=(f=p.next()).done);c=!0){if(e===f.value)return!0}}catch(e){d=!0,u=e}finally{try{!c&&p.return&&p.return()}finally{if(d)throw u}}}return!1},clickedOutside:function(e){this.inline||this.isInWhiteList(e.target)||(this.isActive=!1)},toggle:function(){var e=this;this.disabled||this.hoverable||(this.isActive?this.isActive=!this.isActive:this.$nextTick(function(){e.isActive=!e.isActive}))}},created:function(){"undefined"!=typeof window&&document.addEventListener("click",this.clickedOutside)},beforeDestroy:function(){"undefined"!=typeof window&&document.removeEventListener("click",this.clickedOutside)}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"dropdown",class:e.rootClasses},[e.inline?e._e():i("div",{ref:"trigger",staticClass:"dropdown-trigger",attrs:{role:"button"},on:{click:e.toggle}},[e._t("trigger")],2),e._v(" "),i("transition",{attrs:{name:"fade"}},[e.isMobileModal?i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"background"}):e._e()]),e._v(" "),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:!e.disabled&&(e.isActive||e.hoverable)||e.inline,expression:"(!disabled && (isActive || hoverable)) || inline"}],ref:"dropdownMenu",staticClass:"dropdown-menu"},[i("div",{staticClass:"dropdown-content"},[e._t("default")],2)])])],1)},staticRenderFns:[]}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=i.n(n);t.default={name:"BDropdownItem",props:{value:{type:[String,Number,Boolean,Object,Array,o.a,Function],default:null},separator:Boolean,disabled:Boolean,custom:Boolean,paddingless:Boolean,hasLink:Boolean},computed:{anchorClasses:function(){return{"is-disabled":this.$parent.disabled||this.disabled,"is-paddingless":this.paddingless,"is-active":null!==this.value&&this.value===this.$parent.selected}},itemClasses:function(){return{"dropdown-item":!this.hasLink,"is-disabled":this.disabled,"is-paddingless":this.paddingless,"is-active":null!==this.value&&this.value===this.$parent.selected,"has-link":this.hasLink}},isClickable:function(){return!(this.$parent.disabled||this.separator||this.disabled||this.custom)}},methods:{selectItem:function(){this.isClickable&&(this.$parent.selectItem(this.value),this.$emit("click"))}},created:function(){if(!this.$parent.$data._isDropdown)throw this.$destroy(),new Error("You should wrap bDropdownItem on a bDropdown")}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.separator?i("hr",{staticClass:"dropdown-divider"}):e.custom||e.hasLink?i("div",{class:e.itemClasses,on:{click:e.selectItem}},[e._t("default")],2):i("a",{staticClass:"dropdown-item",class:e.anchorClasses,on:{click:e.selectItem}},[e._t("default")],2)},staticRenderFns:[]}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i.n(n),a=i(123),r=i.n(a);t.default={name:"BField",components:o()({},r.a.name,r.a),props:{type:String,label:String,labelFor:String,message:[String,Array],grouped:Boolean,groupMultiline:Boolean,position:String,expanded:Boolean,horizontal:Boolean,addons:{type:Boolean,default:!0},customClass:String},data:function(){return{newType:this.type,newMessage:this.message,fieldLabelSize:null,_isField:!0}},computed:{rootClasses:function(){return[this.newPosition,{"is-expanded":this.expanded,"is-grouped-multiline":this.groupMultiline,"is-horizontal":this.horizontal}]},newPosition:function(){if(void 0!==this.position){var e=this.position.split("-");if(!(e.length<1)){var t=this.grouped?"is-grouped-":"has-addons-";return this.position?t+e[1]:void 0}}},formattedMessage:function(){return this.newMessage&&Array.isArray(this.newMessage)?this.newMessage.filter(function(e){if(e)return e}).join(" <br> "):this.newMessage}},watch:{type:function(e){this.newType=e},message:function(e){this.newMessage=e}},methods:{fieldType:function(){if(this.grouped)return"is-grouped";var e=0;return this.$slots.default&&(e=this.$slots.default.reduce(function(e,t){return t.tag?e+1:e},0)),e>1&&this.addons&&!this.horizontal?"has-addons":void 0}},mounted:function(){if(this.horizontal){this.$el.querySelectorAll(".input, .select, .button, .textarea").length>0&&(this.fieldLabelSize="is-normal")}}}},function(e,t,i){var n=i(0)(i(124),null,null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"BFieldBody",props:{message:{type:[String]},type:{type:[String]}},render:function(e){var t=this;return e("div",{attrs:{class:"field-body"}},this.$slots.default.map(function(i){return i.tag?t.message?e("b-field",{attrs:{message:t.message,type:t.type}},[i]):e("b-field",{attrs:{type:t.type}},[i]):i}))}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"field",class:[e.rootClasses,e.fieldType()]},[e.horizontal?i("div",{staticClass:"field-label",class:[e.customClass,e.fieldLabelSize]},[e.label?i("label",{staticClass:"label",attrs:{for:e.labelFor}},[e._v("\n "+e._s(e.label)+"\n ")]):e._e()]):[e.label?i("label",{staticClass:"label",class:e.customClass,attrs:{for:e.labelFor}},[e._v("\n "+e._s(e.label)+"\n ")]):e._e()],e._v(" "),e.horizontal?i("b-field-body",{attrs:{message:e.newMessage?e.formattedMessage:"",type:e.newType}},[e._t("default")],2):[e._t("default")],e._v(" "),e.newMessage&&!e.horizontal?i("p",{staticClass:"help",class:e.newType,domProps:{innerHTML:e._s(e.formattedMessage)}}):e._e()],2)},staticRenderFns:[]}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=i.n(n),a=i(1),r=i.n(a),s=i(3),l=i.n(s),c=i(12);t.default={name:"BSelect",components:r()({},l.a.name,l.a),mixins:[c.a],inheritAttrs:!1,props:{value:{type:[String,Number,Boolean,Object,Array,o.a,Function],default:null},placeholder:String,multiple:Boolean,nativeSize:[String,Number]},data:function(){return{selected:this.value,_isSelect:!0,_elementRef:"select"}},computed:{spanClasses:function(){return[this.size,this.statusType,{"is-fullwidth":this.expanded,"is-loading":this.loading,"is-multiple":this.multiple,"is-rounded":this.rounded,"is-empty":null===this.selected}]}},watch:{value:function(e){this.selected=e,!this.isValid&&this.checkHtml5Validity()},selected:function(e){this.$emit("input",e),!this.isValid&&this.checkHtml5Validity()}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"control",class:{"is-expanded":e.expanded,"has-icons-left":e.icon}},[i("span",{staticClass:"select",class:e.spanClasses},[i("select",e._b({directives:[{name:"model",rawName:"v-model",value:e.selected,expression:"selected"}],ref:"select",attrs:{multiple:e.multiple,size:e.nativeSize},on:{blur:function(t){e.$emit("blur",t)&&e.checkHtml5Validity()},focus:function(t){e.$emit("focus",t)},change:function(t){var i=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){return"_value"in e?e._value:e.value});e.selected=t.target.multiple?i:i[0]}}},"select",e.$attrs,!1),[e.placeholder?i("option",{attrs:{selected:"",disabled:"",hidden:""},domProps:{value:null}},[e._v("\n "+e._s(e.placeholder)+"\n ")]):e._e(),e._v(" "),e._t("default")],2)]),e._v(" "),e.icon?i("b-icon",{staticClass:"is-left",attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize}}):e._e()],1)},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(129),i(133),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i.n(n),a=i(130),r=i.n(a);t.default={name:"BDatepickerTable",components:o()({},r.a.name,r.a),props:{value:Date,dayNames:Array,monthNames:Array,firstDayOfWeek:Number,events:Array,indicators:String,minDate:Date,maxDate:Date,focused:Object,disabled:Boolean,unselectableDates:Array,unselectableDaysOfWeek:Array,selectableDates:Array},computed:{visibleDayNames:function(){for(var e=[],t=this.firstDayOfWeek;e.length<this.dayNames.length;){var i=this.dayNames[t%this.dayNames.length];e.push(i),t++}return e},hasEvents:function(){return this.events&&this.events.length},eventsInThisMonth:function(){if(!this.events)return[];for(var e=[],t=0;t<this.events.length;t++){var i=this.events[t];i.hasOwnProperty("date")||(i={date:i}),i.hasOwnProperty("type")||(i.type="is-primary"),i.date.getMonth()===this.focused.month&&i.date.getFullYear()===this.focused.year&&e.push(i)}return e}},methods:{updateSelectedDate:function(e){this.$emit("input",e)},weekBuilder:function(e,t,i){for(var n=new Date(i,t),o=[],a=new Date(i,t,e).getDay(),r=a>=this.firstDayOfWeek?a-this.firstDayOfWeek:7-this.firstDayOfWeek+a,s=1,l=0;l<r;l++)o.unshift(new Date(n.getFullYear(),n.getMonth(),e-s)),s++;o.push(new Date(i,t,e));for(var c=1;o.length<7;)o.push(new Date(i,t,e+c)),c++;return o},weeksInThisMonth:function(e,t){for(var i=[],n=new Date(t,e+1,0).getDate(),o=1;o<=n+6;){var a=this.weekBuilder(o,e,t),r=!1;a.forEach(function(t){t.getMonth()===e&&(r=!0)}),r&&i.push(a),o+=7}return i},eventsInThisWeek:function(e,t){if(!this.eventsInThisMonth.length)return[];var i=[],n=[];n=this.weeksInThisMonth(this.focused.month,this.focused.year);for(var o=0;o<n[t].length;o++)for(var a=0;a<this.eventsInThisMonth.length;a++){var r=this.eventsInThisMonth[a].date.getTime();r===n[t][o].getTime()&&i.push(this.eventsInThisMonth[a])}return i}}}},function(e,t,i){var n=i(0)(i(131),i(132),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"BDatepickerTableRow",props:{selectedDate:Date,week:{type:Array,required:!0},month:{type:Number,required:!0},minDate:Date,maxDate:Date,disabled:Boolean,unselectableDates:Array,unselectableDaysOfWeek:Array,selectableDates:Array,events:Array,indicators:String},methods:{selectableDate:function(e){var t=[];if(this.minDate&&t.push(e>=this.minDate),this.maxDate&&t.push(e<=this.maxDate),t.push(e.getMonth()===this.month),this.selectableDates)for(var i=0;i<this.selectableDates.length;i++){var n=this.selectableDates[i];if(e.getDate()===n.getDate()&&e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth())return!0;t.push(!1)}if(this.unselectableDates)for(var o=0;o<this.unselectableDates.length;o++){var a=this.unselectableDates[o];t.push(e.getDate()!==a.getDate()||e.getFullYear()!==a.getFullYear()||e.getMonth()!==a.getMonth())}if(this.unselectableDaysOfWeek)for(var r=0;r<this.unselectableDaysOfWeek.length;r++){var s=this.unselectableDaysOfWeek[r];t.push(e.getDay()!==s)}return t.indexOf(!1)<0},emitChosenDate:function(e){this.disabled||this.selectableDate(e)&&this.$emit("select",e)},eventsDateMatch:function(e){if(!this.events.length)return!1;for(var t=[],i=0;i<this.events.length;i++)this.events[i].date.getDay()===e.getDay()&&t.push(this.events[i]);return!!t.length&&t},classObject:function(e){function t(e,t){return!(!e||!t)&&(e.getDate()===t.getDate()&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())}return{"is-selected":t(e,this.selectedDate),"is-today":t(e,new Date),"is-selectable":this.selectableDate(e)&&!this.disabled,"is-unselectable":!this.selectableDate(e)||this.disabled}}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"datepicker-row"},[e._l(e.week,function(t,n){return[e.selectableDate(t)&&!e.disabled?i("a",{key:n,staticClass:"datepicker-cell",class:[e.classObject(t),{"has-event":e.eventsDateMatch(t)},e.indicators],attrs:{role:"button",href:"#",disabled:e.disabled},on:{click:function(i){i.preventDefault(),e.emitChosenDate(t)},keydown:[function(i){if(!("button"in i)&&e._k(i.keyCode,"enter",13,i.key))return null;i.preventDefault(),e.emitChosenDate(t)},function(i){if(!("button"in i)&&e._k(i.keyCode,"space",32,i.key))return null;i.preventDefault(),e.emitChosenDate(t)}]}},[e._v("\n "+e._s(t.getDate())+"\n\n "),e.eventsDateMatch(t)?i("div",{staticClass:"events"},e._l(e.eventsDateMatch(t),function(e,t){return i("div",{key:t,staticClass:"event",class:e.type})})):e._e()]):i("div",{key:n,staticClass:"datepicker-cell",class:e.classObject(t)},[e._v("\n "+e._s(t.getDate())+"\n ")])]})],2)},staticRenderFns:[]}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("section",{staticClass:"datepicker-table"},[i("header",{staticClass:"datepicker-header"},e._l(e.visibleDayNames,function(t,n){return i("div",{key:n,staticClass:"datepicker-cell"},[e._v("\n "+e._s(t)+"\n ")])})),e._v(" "),i("div",{staticClass:"datepicker-body",class:{"has-events":e.hasEvents}},e._l(e.weeksInThisMonth(e.focused.month,e.focused.year),function(t,n){return i("b-datepicker-table-row",{key:n,attrs:{"selected-date":e.value,week:t,month:e.focused.month,"min-date":e.minDate,"max-date":e.maxDate,disabled:e.disabled,"unselectable-dates":e.unselectableDates,"unselectable-days-of-week":e.unselectableDaysOfWeek,"selectable-dates":e.selectableDates,events:e.eventsInThisWeek(t,n),indicators:e.indicators},on:{select:e.updateSelectedDate}})}))])},staticRenderFns:[]}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"datepicker control",class:[e.size,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?i("b-dropdown",{ref:"dropdown",attrs:{position:e.position,disabled:e.disabled,inline:e.inline}},[e.inline?e._e():i("b-input",e._b({ref:"input",attrs:{slot:"trigger",autocomplete:"off",value:e.formatValue(e.dateSelected),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,rounded:e.rounded,loading:e.loading,disabled:e.disabled,readonly:e.readonly},on:{focus:function(t){e.$emit("focus",t)},blur:function(t){e.$emit("blur",t)&&e.checkHtml5Validity()}},nativeOn:{change:function(t){e.onChange(t.target.value)}},slot:"trigger"},"b-input",e.$attrs,!1)),e._v(" "),i("b-dropdown-item",{attrs:{disabled:e.disabled,custom:""}},[i("header",{staticClass:"datepicker-header"},[void 0!==e.$slots.header&&e.$slots.header.length?[e._t("header")]:i("div",{staticClass:"pagination field is-centered"},[e.isFirstMonth||e.disabled?e._e():i("a",{staticClass:"pagination-previous",attrs:{role:"button",href:"#",disabled:e.disabled},on:{click:function(t){t.preventDefault(),e.decrementMonth(t)},keydown:[function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key))return null;t.preventDefault(),e.decrementMonth(t)},function(t){if(!("button"in t)&&e._k(t.keyCode,"space",32,t.key))return null;t.preventDefault(),e.decrementMonth(t)}]}},[i("b-icon",{attrs:{icon:"chevron-left",pack:e.iconPack,both:"",type:"is-primary is-clickable"}})],1),e._v(" "),i("a",{directives:[{name:"show",rawName:"v-show",value:!e.isLastMonth&&!e.disabled,expression:"!isLastMonth && !disabled"}],staticClass:"pagination-next",attrs:{role:"button",href:"#",disabled:e.disabled},on:{click:function(t){t.preventDefault(),e.incrementMonth(t)},keydown:[function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key))return null;t.preventDefault(),e.incrementMonth(t)},function(t){if(!("button"in t)&&e._k(t.keyCode,"space",32,t.key))return null;t.preventDefault(),e.incrementMonth(t)}]}},[i("b-icon",{attrs:{icon:"chevron-right",pack:e.iconPack,both:"",type:"is-primary is-clickable"}})],1),e._v(" "),i("div",{staticClass:"pagination-list"},[i("b-field",[i("b-select",{attrs:{disabled:e.disabled},model:{value:e.focusedDateData.month,callback:function(t){e.$set(e.focusedDateData,"month",t)},expression:"focusedDateData.month"}},e._l(e.monthNames,function(t,n){return i("option",{key:t,domProps:{value:n}},[e._v("\n "+e._s(t)+"\n ")])})),e._v(" "),i("b-select",{attrs:{disabled:e.disabled},model:{value:e.focusedDateData.year,callback:function(t){e.$set(e.focusedDateData,"year",t)},expression:"focusedDateData.year"}},e._l(e.listOfYears,function(t){return i("option",{key:t,domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])}))],1)],1)])],2),e._v(" "),i("b-datepicker-table",{attrs:{"day-names":e.dayNames,"month-names":e.monthNames,"first-day-of-week":e.firstDayOfWeek,"min-date":e.minDate,"max-date":e.maxDate,focused:e.focusedDateData,disabled:e.disabled,"unselectable-dates":e.unselectableDates,"unselectable-days-of-week":e.unselectableDaysOfWeek,"selectable-dates":e.selectableDates,events:e.events,indicators:e.indicators},on:{close:function(t){e.$refs.dropdown.isActive=!1}},model:{value:e.dateSelected,callback:function(t){e.dateSelected=t},expression:"dateSelected"}}),e._v(" "),void 0!==e.$slots.default&&e.$slots.default.length?i("footer",{staticClass:"datepicker-footer"},[e._t("default")],2):e._e()],1)],1):i("b-input",e._b({ref:"input",attrs:{type:"date",autocomplete:"off",value:e.formatYYYYMMDD(e.value),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,max:e.formatYYYYMMDD(e.maxDate),min:e.formatYYYYMMDD(e.minDate),disabled:e.disabled,readonly:!1},on:{focus:function(t){e.$emit("focus",t)},blur:function(t){e.$emit("blur",t)&&e.checkHtml5Validity()}},nativeOn:{change:function(t){e.onChangeNativePicker(t)}}},"b-input",e.$attrs,!1))],1)},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(136),i(139),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i.n(n),a=i(3),r=i.n(a),s=i(62),l=i.n(s),c=i(2),d=i(6),u=i(13);t.default={name:"BDialog",components:o()({},r.a.name,r.a),extends:l.a,mixins:[u.a],props:{title:String,message:String,icon:String,hasIcon:Boolean,type:{type:String,default:"is-primary"},size:String,confirmText:{type:String,default:function(){return c.a.defaultDialogConfirmText?c.a.defaultDialogConfirmText:"OK"}},cancelText:{type:String,default:function(){return c.a.defaultDialogCancelText?c.a.defaultDialogCancelText:"Cancel"}},hasInput:Boolean,inputAttrs:{type:Object,default:function(){return{}}},onConfirm:{type:Function,default:function(){}},focusOn:{type:String,default:"confirm"}},data:function(){return{prompt:this.hasInput?this.inputAttrs.value||"":"",isActive:!1,validationMessage:""}},computed:{iconByType:function(){switch(this.type){case"is-info":return"information";case"is-success":return"check-circle";case"is-warning":return"alert";case"is-danger":return"alert-circle";default:return null}},showCancel:function(){return this.cancelOptions.indexOf("button")>=0}},methods:{confirm:function(){var e=this;if(void 0!==this.$refs.input&&!this.$refs.input.checkValidity())return this.validationMessage=this.$refs.input.validationMessage,void this.$nextTick(function(){return e.$refs.input.select()});this.onConfirm(this.prompt),this.close()},close:function(){var e=this;this.isActive=!1,setTimeout(function(){e.$destroy(),Object(d.e)(e.$el)},150)}},beforeMount:function(){document.body.appendChild(this.$el)},mounted:function(){var e=this;this.isActive=!0,void 0===this.inputAttrs.required&&this.$set(this.inputAttrs,"required",!0),this.$nextTick(function(){e.hasInput?e.$refs.input.focus():"cancel"===e.focusOn&&e.showCancel?e.$refs.cancelButton.focus():e.$refs.confirmButton.focus()})}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(6),o=i(2);t.default={name:"BModal",props:{active:Boolean,component:[Object,Function],content:String,programmatic:Boolean,props:Object,events:Object,width:{type:[String,Number],default:960},hasModalCard:Boolean,animation:{type:String,default:"zoom-out"},canCancel:{type:[Array,Boolean],default:function(){return["escape","x","outside","button"]}},onCancel:{type:Function,default:function(){}},scroll:{type:String,default:function(){return o.a.defaultModalScroll?o.a.defaultModalScroll:"clip"},validator:function(e){return["clip","keep"].indexOf(e)>=0}}},data:function(){return{isActive:this.active||!1,savedScrollTop:null,newWidth:"number"==typeof this.width?this.width+"px":this.width}},computed:{cancelOptions:function(){return"boolean"==typeof this.canCancel?this.canCancel?["escape","x","outside","button"]:[]:this.canCancel},showX:function(){return this.cancelOptions.indexOf("x")>=0}},watch:{active:function(e){this.isActive=e},isActive:function(){this.handleScroll()}},methods:{handleScroll:function(){if("undefined"!=typeof window){if("clip"===this.scroll)return void(this.isActive?document.documentElement.classList.add("is-clipped"):document.documentElement.classList.remove("is-clipped"));if(this.savedScrollTop=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop,this.isActive?document.body.classList.add("is-noscroll"):document.body.classList.remove("is-noscroll"),this.isActive)return void(document.body.style.top="-"+this.savedScrollTop+"px");document.documentElement.scrollTop=this.savedScrollTop,document.body.style.top=null,this.savedScrollTop=null}},cancel:function(e){this.cancelOptions.indexOf(e)<0||(this.onCancel.apply(null,arguments),this.close())},close:function(){var e=this;this.$emit("close"),this.$emit("update:active",!1),this.programmatic&&(this.isActive=!1,setTimeout(function(){e.$destroy(),Object(n.e)(e.$el)},150))},keyPress:function(e){this.isActive&&27===e.keyCode&&this.cancel("escape")}},created:function(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeMount:function(){this.programmatic&&document.body.appendChild(this.$el)},mounted:function(){this.programmatic?this.isActive=!0:this.isActive&&this.handleScroll()},beforeDestroy:function(){if("undefined"!=typeof window){document.removeEventListener("keyup",this.keyPress),document.documentElement.classList.remove("is-clipped");var e=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop;document.body.classList.remove("is-noscroll"),document.documentElement.scrollTop=e,document.body.style.top=null}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{name:e.animation}},[e.isActive?i("div",{staticClass:"modal is-active"},[i("div",{staticClass:"modal-background",on:{click:function(t){e.cancel("outside")}}}),e._v(" "),i("div",{staticClass:"animation-content",class:{"modal-content":!e.hasModalCard},style:{maxWidth:e.newWidth}},[e.component?i(e.component,e._g(e._b({tag:"component",on:{close:e.close}},"component",e.props,!1),e.events)):e.content?i("div",{domProps:{innerHTML:e._s(e.content)}}):e._t("default")],2),e._v(" "),e.showX?i("button",{staticClass:"modal-close is-large",attrs:{type:"button"},on:{click:function(t){e.cancel("x")}}}):e._e()]):e._e()])},staticRenderFns:[]}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{name:e.animation}},[e.isActive?i("div",{staticClass:"dialog modal is-active",class:e.size},[i("div",{staticClass:"modal-background",on:{click:function(t){e.cancel("outside")}}}),e._v(" "),i("div",{staticClass:"modal-card animation-content"},[e.title?i("header",{staticClass:"modal-card-head"},[i("p",{staticClass:"modal-card-title"},[e._v(e._s(e.title))])]):e._e(),e._v(" "),i("section",{staticClass:"modal-card-body",class:{"is-titleless":!e.title,"is-flex":e.hasIcon}},[i("div",{staticClass:"media"},[e.hasIcon?i("div",{staticClass:"media-left"},[i("b-icon",{attrs:{icon:e.icon?e.icon:e.iconByType,pack:e.iconPack,type:e.type,both:!e.icon,size:"is-large"}})],1):e._e(),e._v(" "),i("div",{staticClass:"media-content"},[i("p",{domProps:{innerHTML:e._s(e.message)}}),e._v(" "),e.hasInput?i("div",{staticClass:"field"},[i("div",{staticClass:"control"},[i("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.prompt,expression:"prompt"}],ref:"input",staticClass:"input",class:{"is-danger":e.validationMessage},domProps:{value:e.prompt},on:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key))return null;e.confirm(t)},input:function(t){t.target.composing||(e.prompt=t.target.value)}}},"input",e.inputAttrs,!1))]),e._v(" "),i("p",{staticClass:"help is-danger"},[e._v(e._s(e.validationMessage))])]):e._e()])])]),e._v(" "),i("footer",{staticClass:"modal-card-foot"},[e.showCancel?i("button",{ref:"cancelButton",staticClass:"button",on:{click:function(t){e.cancel("button")}}},[e._v("\n "+e._s(e.cancelText)+"\n ")]):e._e(),e._v(" "),i("button",{ref:"confirmButton",staticClass:"button",class:e.type,on:{click:e.confirm}},[e._v("\n "+e._s(e.confirmText)+"\n ")])])])]):e._e()])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(141),i(142),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(6),o="undefined"==typeof window,a=o?Object:window.HTMLElement;t.default={name:"BLoading",props:{active:Boolean,programmatic:Boolean,container:[Object,Function,a],isFullPage:{type:Boolean,default:!0},animation:{type:String,default:"fade"},canCancel:{type:Boolean,default:!1},onCancel:{type:Function,default:function(){}}},data:function(){return{isActive:this.active||!1}},watch:{active:function(e){this.isActive=e}},methods:{cancel:function(){this.canCancel&&this.isActive&&this.close()},close:function(){var e=this;this.onCancel.apply(null,arguments),this.$emit("close"),this.$emit("update:active",!1),this.programmatic&&(this.isActive=!1,setTimeout(function(){e.$destroy(),Object(n.e)(e.$el)},150))},keyPress:function(e){27===e.keyCode&&this.cancel()}},created:function(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeMount:function(){this.programmatic&&(this.container?(this.isFullPage=!1,this.container.appendChild(this.$el)):document.body.appendChild(this.$el))},mounted:function(){this.programmatic&&(this.isActive=!0)},beforeDestroy:function(){"undefined"!=typeof window&&document.removeEventListener("keyup",this.keyPress)}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{name:e.animation}},[e.isActive?i("div",{staticClass:"loading-overlay is-active",class:{"is-full-page":e.isFullPage}},[i("div",{staticClass:"loading-background",on:{click:e.cancel}}),e._v(" "),i("div",{staticClass:"loading-icon"})]):e._e()])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(144),i(145),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63);t.default={name:"BMessage",mixins:[n.a],data:function(){return{newIconSize:this.iconSize||this.size||"is-large"}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{name:"fade"}},[e.isActive?i("article",{staticClass:"message",class:[e.type,e.size]},[e.title?i("header",{staticClass:"message-header"},[i("p",[e._v(e._s(e.title))]),e._v(" "),e.closable?i("button",{staticClass:"delete",attrs:{type:"button"},on:{click:e.close}}):e._e()]):e._e(),e._v(" "),i("section",{staticClass:"message-body"},[i("div",{staticClass:"media"},[e.icon&&e.hasIcon?i("div",{staticClass:"media-left"},[i("b-icon",{class:e.type,attrs:{icon:e.icon,"icon-pack":e.iconPack,both:"",size:e.newIconSize}})],1):e._e(),e._v(" "),i("div",{staticClass:"media-content"},[e._t("default")],2)])])]):e._e()])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(147),i(148),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63);t.default={name:"BNotification",mixins:[n.a]}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{name:"fade"}},[e.isActive?i("article",{staticClass:"notification",class:e.type},[e.closable?i("button",{staticClass:"delete",attrs:{type:"button"},on:{click:e.close}}):e._e(),e._v(" "),i("div",{staticClass:"media"},[e.icon&&e.hasIcon?i("div",{staticClass:"media-left"},[i("b-icon",{attrs:{icon:e.icon,"icon-pack":e.iconPack,both:"",size:"is-large"}})],1):e._e(),e._v(" "),i("div",{staticClass:"media-content"},[e._t("default")],2)])]):e._e()])},staticRenderFns:[]}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i.n(n),a=i(3),r=i.n(a),s=i(13);t.default={name:"BPagination",components:o()({},r.a.name,r.a),mixins:[s.a],props:{total:[Number,String],perPage:{type:[Number,String],default:20},current:{type:[Number,String],default:1},size:String,simple:Boolean,rounded:Boolean,order:String},computed:{rootClasses:function(){return[this.order,this.size,{"is-simple":this.simple,"is-rounded":this.rounded}]},pageCount:function(){return Math.ceil(this.total/this.perPage)},firstItem:function(){var e=this.current*this.perPage-this.perPage+1;return e>=0?e:0},hasPrev:function(){return this.current>1},hasFirst:function(){return this.current>=3},hasFirstEllipsis:function(){return this.current>=4},hasLast:function(){return this.current<=this.pageCount-2},hasLastEllipsis:function(){return this.current<this.pageCount-2&&this.current<=this.pageCount-3},hasNext:function(){return this.current<this.pageCount},pagesInRange:function(){var e=this;if(!this.simple){for(var t=Math.max(1,this.current-1),i=Math.min(this.current+1,this.pageCount),n=[],o=t;o<=i;o++)!function(t){n.push({number:t,isCurrent:e.current===t,click:function(i){e.current!==t&&(e.$emit("change",t),e.$emit("update:current",t),e.$nextTick(function(){return i.target.focus()}))}})}(o);return n}}},watch:{pageCount:function(e){this.current>e&&this.last()}},methods:{prev:function(){this.hasPrev&&(this.$emit("change",this.current-1),this.$emit("update:current",this.current-1))},first:function(){this.$emit("change",1),this.$emit("update:current",1)},last:function(){this.$emit("change",this.pageCount),this.$emit("update:current",this.pageCount)},next:function(){this.hasNext&&(this.$emit("change",this.current+1),this.$emit("update:current",this.current+1))}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"pagination",class:e.rootClasses},[i("a",{staticClass:"pagination-previous",attrs:{role:"button",href:"#",disabled:!e.hasPrev},on:{click:function(t){t.preventDefault(),e.prev(t)}}},[i("b-icon",{attrs:{icon:"chevron-left","icon-pack":e.iconPack,both:""}})],1),e._v(" "),i("a",{staticClass:"pagination-next",attrs:{role:"button",href:"#",disabled:!e.hasNext},on:{click:function(t){t.preventDefault(),e.next(t)}}},[i("b-icon",{attrs:{icon:"chevron-right","icon-pack":e.iconPack,both:""}})],1),e._v(" "),e.simple?e._e():i("ul",{staticClass:"pagination-list"},[e.hasFirst?i("li",[i("a",{staticClass:"pagination-link",attrs:{role:"button",href:"#"},on:{click:function(t){t.preventDefault(),e.first(t)}}},[e._v("\n 1\n ")])]):e._e(),e._v(" "),e.hasFirstEllipsis?i("li",[i("span",{staticClass:"pagination-ellipsis"},[e._v("…")])]):e._e(),e._v(" "),e._l(e.pagesInRange,function(t){return i("li",{key:t.number},[i("a",{staticClass:"pagination-link",class:{"is-current":t.isCurrent},attrs:{role:"button",href:"#"},on:{click:function(e){e.preventDefault(),t.click(e)}}},[e._v("\n "+e._s(t.number)+"\n ")])])}),e._v(" "),e.hasLastEllipsis?i("li",[i("span",{staticClass:"pagination-ellipsis"},[e._v("…")])]):e._e(),e._v(" "),e.hasLast?i("li",[i("a",{staticClass:"pagination-link",attrs:{role:"button",href:"#"},on:{click:function(t){t.preventDefault(),e.last(t)}}},[e._v("\n "+e._s(e.pageCount)+"\n ")])]):e._e()],2),e._v(" "),e.simple?i("small",{staticClass:"info"},[1==e.perPage?[e._v("\n "+e._s(e.firstItem)+" / "+e._s(e.total)+"\n ")]:[e._v("\n "+e._s(e.firstItem)+"-"+e._s(Math.min(e.current*e.perPage,e.total))+" / "+e._s(e.total)+"\n ")]],2):e._e()])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(152),i(153),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i.n(n),a=i(3),r=i.n(a),s=i(13);t.default={name:"BPanel",components:o()({},r.a.name,r.a),mixins:[s.a],props:{collapsible:{type:Boolean,default:!1},open:{type:Boolean,default:!0},hasCustomTemplate:{type:Boolean,default:!1},header:String,content:String,animation:{type:String,default:"fade"}},data:function(){return{isOpen:this.open}},watch:{open:function(e){this.isOpen=e}},methods:{toggle:function(){this.collapsible&&(this.isOpen=!this.isOpen,this.$emit("update:open",this.isOpen),this.isOpen?this.$emit("open"):this.$emit("close"))}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("nav",{staticClass:"panel"},[i("div",{staticClass:"panel-heading",class:{"is-collapsible":e.collapsible},on:{click:e.toggle}},[e.header?i("span",{domProps:{innerHTML:e._s(e.header)}}):e._t("header"),e._v(" "),e.collapsible?i("b-icon",{staticClass:"is-pulled-right",attrs:{both:"",icon:e.isOpen?"menu-up":"menu-down","icon-pack":e.iconPack}}):e._e()],2),e._v(" "),i("transition",{attrs:{name:e.animation}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"panel-content",class:{"panel-block":!e.hasCustomTemplate}},[e.content?i("div",{domProps:{innerHTML:e._s(e.content)}}):e._t("default")],2)])],1)},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(155),i(156),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=i.n(n);t.default={name:"BRadio",props:{value:[String,Number,Boolean,Function,Object,Array,o.a],nativeValue:[String,Number,Boolean,Function,Object,Array,o.a],type:String,disabled:Boolean,required:Boolean,name:String,size:String},data:function(){return{newValue:this.value}},watch:{value:function(e){this.newValue=e},newValue:function(e){e===this.nativeValue&&this.$emit("input",e)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("label",{ref:"label",staticClass:"b-radio radio",class:[e.size,{"is-disabled":e.disabled}],attrs:{disabled:e.disabled,tabindex:!e.disabled&&0},on:{keydown:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key)&&e._k(t.keyCode,"space",32,t.key))return null;t.preventDefault(),e.$refs.label.click()}}},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.newValue,expression:"newValue"}],attrs:{type:"radio",disabled:e.disabled,required:e.required,name:e.name},domProps:{value:e.nativeValue,checked:e._q(e.newValue,e.nativeValue)},on:{change:function(t){e.newValue=e.nativeValue}}}),e._v(" "),i("span",{staticClass:"check",class:e.type}),e._v(" "),i("span",{staticClass:"control-label"},[e._t("default")],2)])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(158),i(159),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=i.n(n);t.default={name:"BRadioButton",props:{value:[String,Number,Boolean,Function,Object,Array,o.a],nativeValue:[String,Number,Boolean,Function,Object,Array,o.a],type:{type:String,default:"is-primary"},disabled:Boolean,name:String,size:String},data:function(){return{newValue:this.value}},watch:{value:function(e){this.newValue=e},newValue:function(e){e===this.nativeValue&&this.$emit("input",e)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"control"},[i("label",{ref:"label",staticClass:"b-radio radio button",class:[e.newValue===e.nativeValue?e.type:null,e.size],attrs:{disabled:e.disabled,tabindex:!e.disabled&&0},on:{keydown:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key)&&e._k(t.keyCode,"space",32,t.key))return null;t.preventDefault(),e.$refs.label.click()}}},[e._t("default"),e._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:e.newValue,expression:"newValue"}],attrs:{type:"radio",disabled:e.disabled,name:e.name},domProps:{value:e.nativeValue,checked:e._q(e.newValue,e.nativeValue)},on:{change:function(t){e.newValue=e.nativeValue}}})],2)])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(161),i(162),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),o=i(65);t.default={name:"BSnackbar",mixins:[o.a],props:{actionText:{type:String,default:"OK"},onAction:{type:Function,default:function(){}},indefinite:{type:Boolean,default:!1}},data:function(){return{newDuration:this.duration||n.a.defaultSnackbarDuration}},methods:{action:function(){this.onAction(),this.close()}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{"enter-active-class":e.transition.enter,"leave-active-class":e.transition.leave}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"snackbar",class:[e.type,e.position]},[i("p",{staticClass:"text"},[e._v(e._s(e.message))]),e._v(" "),e.actionText?i("div",{staticClass:"action",class:e.type,on:{click:e.action}},[i("button",{staticClass:"button is-dark"},[e._v(e._s(e.actionText))])]):e._e()])])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(164),i(165),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=i.n(n);t.default={name:"BSwitch",props:{value:[String,Number,Boolean,Function,Object,Array,o.a],nativeValue:[String,Number,Boolean,Function,Object,Array,o.a],disabled:Boolean,type:String,name:String,size:String,trueValue:{type:[String,Number,Boolean,Function,Object,Array,o.a],default:!0},falseValue:{type:[String,Number,Boolean,Function,Object,Array,o.a],default:!1}},data:function(){return{newValue:this.value,isMouseDown:!1}},watch:{value:function(e){this.newValue=e},newValue:function(e){this.$emit("input",e)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("label",{ref:"label",staticClass:"switch",class:[e.size,{"is-disabled":e.disabled}],attrs:{disabled:e.disabled,tabindex:!e.disabled&&0},on:{keydown:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key)&&e._k(t.keyCode,"space",32,t.key))return null;t.preventDefault(),e.$refs.label.click()},mousedown:function(t){e.isMouseDown=!0},mouseup:function(t){e.isMouseDown=!1},mouseout:function(t){e.isMouseDown=!1},blur:function(t){e.isMouseDown=!1}}},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.newValue,expression:"newValue"}],attrs:{type:"checkbox",disabled:e.disabled,name:e.name,"true-value":e.trueValue,"false-value":e.falseValue},domProps:{value:e.nativeValue,checked:Array.isArray(e.newValue)?e._i(e.newValue,e.nativeValue)>-1:e._q(e.newValue,e.trueValue)},on:{click:function(e){e.stopPropagation()},change:function(t){var i=e.newValue,n=t.target,o=n.checked?e.trueValue:e.falseValue;if(Array.isArray(i)){var a=e.nativeValue,r=e._i(i,a);n.checked?r<0&&(e.newValue=i.concat([a])):r>-1&&(e.newValue=i.slice(0,r).concat(i.slice(r+1)))}else e.newValue=o}}}),e._v(" "),i("span",{staticClass:"check",class:[{"is-elastic":e.isMouseDown&&!e.disabled},e.type]}),e._v(" "),i("span",{staticClass:"control-label"},[e._t("default")],2)])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(167),i(181),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=i(168),a=i.n(o),r=i(1),s=i.n(r),l=i(6),c=i(61),d=i.n(c),u=i(3),f=i.n(u),p=i(64),h=i.n(p),b=i(176),m=i.n(b),g=i(66),v=i.n(g),k=i(13);t.default={name:"BTable",components:(n={},s()(n,d.a.name,d.a),s()(n,f.a.name,f.a),s()(n,h.a.name,h.a),s()(n,m.a.name,m.a),s()(n,v.a.name,v.a),n),mixins:[k.a],props:{data:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},bordered:Boolean,striped:Boolean,narrowed:Boolean,hoverable:Boolean,loading:Boolean,detailed:Boolean,checkable:Boolean,selected:Object,focusable:Boolean,customIsChecked:Function,isRowCheckable:{type:Function,default:function(){return!0}},checkedRows:{type:Array,default:function(){return[]}},mobileCards:{type:Boolean,default:!0},defaultSort:[String,Array],defaultSortDirection:{type:String,default:"asc"},paginated:Boolean,currentPage:{type:Number,default:1},perPage:{type:[Number,String],default:20},paginationSimple:Boolean,paginationSize:String,backendSorting:Boolean,rowClass:{type:Function,default:function(){return""}},openedDetailed:{type:Array,default:function(){return[]}},hasDetailedVisible:{type:Function,default:function(){return!0}},detailKey:{type:String,default:""},backendPagination:Boolean,total:{type:[Number,String],default:0}},data:function(){return{getValueByPath:l.b,newColumns:[].concat(a()(this.columns)),visibleDetailRows:this.openedDetailed,newData:this.data,newDataTotal:this.backendPagination?this.total:this.data.length,newCheckedRows:[].concat(a()(this.checkedRows)),newCurrentPage:this.currentPage,currentSortColumn:{},isAsc:!0,firstTimeSort:!0,_isTable:!0}},computed:{tableClasses:function(){return{"is-bordered":this.bordered,"is-striped":this.striped,"is-narrow":this.narrowed,"has-mobile-cards":this.mobileCards,"is-hoverable":(this.hoverable||this.focusable)&&this.visibleData.length}},visibleData:function(){if(!this.paginated)return this.newData;var e=this.newCurrentPage,t=this.perPage;if(this.newData.length<=t)return this.newData;var i=(e-1)*t,n=parseInt(i,10)+parseInt(t,10);return this.newData.slice(i,n)},isAllChecked:function(){var e=this,t=this.visibleData.filter(function(t){return e.isRowCheckable(t)});return 0!==t.length&&!t.some(function(t){return Object(l.c)(e.newCheckedRows,t,e.customIsChecked)<0})},isAllUncheckable:function(){var e=this;return 0===this.visibleData.filter(function(t){return e.isRowCheckable(t)}).length},hasSortablenewColumns:function(){return this.newColumns.some(function(e){return e.sortable})},columnCount:function(){var e=this.newColumns.length;return e+=this.checkable?1:0,e+=this.detailed?1:0}},watch:{data:function(e){var t=this,i=this.newColumns;this.newColumns=[],this.newData=e,this.$nextTick(function(){t.newColumns.length||(t.newColumns=i)}),this.backendSorting||this.sort(this.currentSortColumn,!0),this.backendPagination||(this.newDataTotal=e.length)},total:function(e){this.backendPagination&&(this.newDataTotal=e)},checkedRows:function(e){this.newCheckedRows=[].concat(a()(e))},columns:function(e){this.newColumns=[].concat(a()(e))},newColumns:function(e){if(e.length&&this.firstTimeSort)this.initSort(),this.firstTimeSort=!1;else if(e.length&&this.currentSortColumn.field)for(var t=0;t<e.length;t++)if(e[t].field===this.currentSortColumn.field){this.currentSortColumn=e[t];break}},openedDetailed:function(e){this.visibleDetailRows=e},currentPage:function(e){this.newCurrentPage=e}},methods:{sortBy:function(e,t,i,n){return i&&"function"==typeof i?[].concat(a()(e)).sort(function(e,t){return i(e,t,n)}):[].concat(a()(e)).sort(function(e,i){var o=Object(l.b)(e,t),a=Object(l.b)(i,t);return o||0===o?a||0===a?o===a?0:(o="string"==typeof o?o.toUpperCase():o,a="string"==typeof a?a.toUpperCase():a,n?o>a?1:-1:o>a?-1:1):-1:1})},sort:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&e.sortable&&(t||(this.isAsc=e===this.currentSortColumn?!this.isAsc:"desc"!==this.defaultSortDirection.toLowerCase()),this.firstTimeSort||this.$emit("sort",e.field,this.isAsc?"asc":"desc"),this.backendSorting||(this.newData=this.sortBy(this.newData,e.field,e.customSort,this.isAsc)),this.currentSortColumn=e)},isRowChecked:function(e){return Object(l.c)(this.newCheckedRows,e,this.customIsChecked)>=0},removeCheckedRow:function(e){var t=Object(l.c)(this.newCheckedRows,e,this.customIsChecked);t>=0&&this.newCheckedRows.splice(t,1)},checkAll:function(){var e=this,t=this.isAllChecked;this.visibleData.forEach(function(i){e.removeCheckedRow(i),t||e.isRowCheckable(i)&&e.newCheckedRows.push(i)}),this.$emit("check",this.newCheckedRows),this.$emit("check-all",this.newCheckedRows),this.$emit("update:checkedRows",this.newCheckedRows)},checkRow:function(e){this.isRowChecked(e)?this.removeCheckedRow(e):this.newCheckedRows.push(e),this.$emit("check",this.newCheckedRows,e),this.$emit("update:checkedRows",this.newCheckedRows)},selectRow:function(e,t){this.$emit("click",e),this.selected!==e&&(this.$emit("select",e,this.selected),this.$emit("update:selected",e))},pageChanged:function(e){this.newCurrentPage=e>0?e:1,this.$emit("page-change",this.newCurrentPage),this.$emit("update:currentPage",this.newCurrentPage)},toggleDetails:function(e){this.isVisibleDetailRow(e)?(this.closeDetailRow(e),this.$emit("details-close",e)):(this.openDetailRow(e),this.$emit("details-open",e)),this.$emit("update:openedDetailed",this.visibleDetailRows)},openDetailRow:function(e){var t=this.handleDetailKey(e);this.visibleDetailRows.push(t)},closeDetailRow:function(e){var t=this.handleDetailKey(e),i=this.visibleDetailRows.indexOf(t);this.visibleDetailRows.splice(i,1)},isVisibleDetailRow:function(e){var t=this.handleDetailKey(e);return this.visibleDetailRows.indexOf(t)>=0},handleDetailKey:function(e){var t=this.detailKey;return t.length?e[t]:e},checkPredefinedDetailedRows:function(){if(this.openedDetailed.length>0&&!this.detailKey.length)throw new Error('If you set a predefined opened-detailed, you must provide an unique key using the prop "detail-key"')},hasCustomFooterSlot:function(){if(this.$slots.footer.length>1)return!0;var e=this.$slots.footer[0].tag;return"th"===e||"td"===e},hasBottomLeftSlot:function(){return void 0!==this.$slots["bottom-left"]},pressedArrow:function(e){if(this.visibleData.length){var t=this.visibleData.indexOf(this.selected)+e;t=t<0?0:t>this.visibleData.length-1?this.visibleData.length-1:t,this.selectRow(this.visibleData[t])}},focus:function(){this.focusable&&this.$el.querySelector("table").focus()},initSort:function(){var e=this;if(this.defaultSort){var t="",i=this.defaultSortDirection;Array.isArray(this.defaultSort)?(t=this.defaultSort[0],this.defaultSort[1]&&(i=this.defaultSort[1])):t=this.defaultSort,this.newColumns.forEach(function(n){n.field===t&&(e.isAsc="desc"!==i.toLowerCase(),e.sort(n,!0))})}}},mounted:function(){this.checkPredefinedDetailedRows()}}},function(e,t,i){"use strict";t.__esModule=!0;var n=i(169),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return(0,o.default)(e)}},function(e,t,i){e.exports={default:i(170),__esModule:!0}},function(e,t,i){i(38),i(171),e.exports=i(8).Array.from},function(e,t,i){"use strict";var n=i(46),o=i(18),a=i(37),r=i(172),s=i(173),l=i(51),c=i(174),d=i(60);o(o.S+o.F*!i(175)(function(e){Array.from(e)}),"Array",{from:function(e){var t,i,o,u,f=a(e),p="function"==typeof this?this:Array,h=arguments.length,b=h>1?arguments[1]:void 0,m=void 0!==b,g=0,v=d(f);if(m&&(b=n(b,h>2?arguments[2]:void 0,2)),void 0==v||p==Array&&s(v))for(t=l(f.length),i=new p(t);t>g;g++)c(i,g,m?b(f[g],g):f[g]);else for(u=v.call(f),i=new p;!(o=u.next()).done;g++)c(i,g,m?r(u,b,[o.value,g],!0):o.value);return i.length=g,i}})},function(e,t,i){var n=i(16);e.exports=function(e,t,i,o){try{return o?t(n(i)[0],i[1]):t(i)}catch(t){var a=e.return;throw void 0!==a&&n(a.call(e)),t}}},function(e,t,i){var n=i(22),o=i(4)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||a[o]===e)}},function(e,t,i){"use strict";var n=i(9),o=i(21);e.exports=function(e,t,i){t in e?n.f(e,t,o(0,i)):e[t]=i}},function(e,t,i){var n=i(4)("iterator"),o=!1;try{var a=[7][n]();a.return=function(){o=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var i=!1;try{var a=[7],r=a[n]();r.next=function(){return{done:i=!0}},a[n]=function(){return r},e(a)}catch(e){}return i}},function(e,t,i){var n=i(0)(i(177),i(178),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=i(1),a=i.n(o),r=i(28),s=i.n(r),l=i(3),c=i.n(l);t.default={name:"BTableMobileSort",components:(n={},a()(n,s.a.name,s.a),a()(n,c.a.name,c.a),n),props:{currentSortColumn:Object,isAsc:Boolean,columns:Array},data:function(){return{mobileSort:this.currentSortColumn}},watch:{mobileSort:function(e){this.currentSortColumn!==e&&this.$emit("sort",e)},currentSortColumn:function(e){this.mobileSort=e}},methods:{sort:function(){this.$emit("sort",this.mobileSort)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"field table-mobile-sort"},[i("div",{staticClass:"field has-addons"},[i("b-select",{attrs:{expanded:""},model:{value:e.mobileSort,callback:function(t){e.mobileSort=t},expression:"mobileSort"}},e._l(e.columns,function(t,n){return t.sortable?i("option",{key:n,domProps:{value:t}},[e._v("\n "+e._s(t.label)+"\n ")]):e._e()})),e._v(" "),i("div",{staticClass:"control"},[i("button",{staticClass:"button is-primary",on:{click:e.sort}},[i("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.currentSortColumn===e.mobileSort,expression:"currentSortColumn === mobileSort"}],class:{"is-desc":!e.isAsc},attrs:{icon:"arrow-up",size:"is-small",both:""}})],1)])],1)])},staticRenderFns:[]}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=i.n(n);t.default={name:"BTableColumn",props:{label:String,customKey:[String,Number],field:String,meta:[String,Number,Boolean,Function,Object,Array,o.a],width:[Number,String],numeric:Boolean,centered:Boolean,sortable:Boolean,visible:{type:Boolean,default:!0},customSort:Function,internal:Boolean},data:function(){return{newKey:this.customKey||this.label}},computed:{rootClasses:function(){return{"has-text-right":this.numeric&&!this.centered,"has-text-centered":this.centered}}},beforeMount:function(){var e=this;if(!this.$parent.$data._isTable)throw this.$destroy(),new Error("You should wrap bTableColumn on a bTable");if(!this.internal){!this.$parent.columns.some(function(t){return t.newKey===e.newKey})&&this.$parent.columns.push(this)}},beforeDestroy:function(){var e=this.$parent.columns.map(function(e){return e.newKey}).indexOf(this.newKey);e>=0&&this.$parent.columns.splice(e,1)}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.visible?i("td",{class:e.rootClasses,attrs:{"data-label":e.label}},[i("span",[e._t("default")],2)]):e._e()},staticRenderFns:[]}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"b-table",class:{"is-loading":e.loading}},[e.mobileCards&&e.hasSortablenewColumns?i("b-table-mobile-sort",{attrs:{"current-sort-column":e.currentSortColumn,"is-asc":e.isAsc,columns:e.newColumns},on:{sort:function(t){return e.sort(t)}}}):e._e(),e._v(" "),i("div",{staticClass:"table-wrapper"},[i("table",{staticClass:"table",class:e.tableClasses,attrs:{tabindex:!!e.focusable&&0},on:{keydown:[function(t){if(!("button"in t)&&e._k(t.keyCode,"up",38,t.key))return null;t.preventDefault(),e.pressedArrow(-1)},function(t){if(!("button"in t)&&e._k(t.keyCode,"down",40,t.key))return null;t.preventDefault(),e.pressedArrow(1)}]}},[e.newColumns.length?i("thead",[i("tr",[e.detailed?i("th",{attrs:{width:"40px"}}):e._e(),e._v(" "),e.checkable?i("th",{staticClass:"checkbox-cell"},[i("b-checkbox",{attrs:{value:e.isAllChecked,disabled:e.isAllUncheckable},nativeOn:{change:function(t){e.checkAll(t)}}})],1):e._e(),e._v(" "),e._l(e.newColumns,function(t,n){return t.visible||void 0===t.visible?i("th",{key:n,class:{"is-current-sort":e.currentSortColumn===t,"is-sortable":t.sortable},style:{width:t.width+"px"},on:{click:function(i){i.stopPropagation(),e.sort(t)}}},[i("div",{staticClass:"th-wrap",class:{"is-numeric":t.numeric,"is-centered":t.centered}},[e.$scopedSlots.header?e._t("header",null,{column:t,index:n}):[e._v(e._s(t.label))],e._v(" "),i("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.currentSortColumn===t,expression:"currentSortColumn === column"}],class:{"is-desc":!e.isAsc},attrs:{icon:"arrow-up","icon-pack":e.iconPack,both:"",size:"is-small"}})],2)]):e._e()})],2)]):e._e(),e._v(" "),e.visibleData.length?i("tbody",[e._l(e.visibleData,function(t,n){return[i("tr",{key:n,class:[e.rowClass(t,n),{"is-selected":t===e.selected,"is-checked":e.isRowChecked(t)}],on:{click:function(i){e.selectRow(t)},dblclick:function(i){e.$emit("dblclick",t)}}},[e.detailed?i("td",{staticClass:"chevron-cell"},[e.hasDetailedVisible(t)?i("a",{attrs:{role:"button"},on:{click:function(i){i.stopPropagation(),e.toggleDetails(t)}}},[i("b-icon",{class:{"is-expanded":e.isVisibleDetailRow(t)},attrs:{icon:"chevron-right","icon-pack":e.iconPack,both:""}})],1):e._e()]):e._e(),e._v(" "),e.checkable?i("td",{staticClass:"checkbox-cell"},[i("b-checkbox",{attrs:{disabled:!e.isRowCheckable(t),value:e.isRowChecked(t)},nativeOn:{change:function(i){e.checkRow(t)}}})],1):e._e(),e._v(" "),e.$scopedSlots.default?e._t("default",null,{row:t,index:n}):e._l(e.newColumns,function(n){return i("BTableColumn",e._b({key:n.field,attrs:{internal:""}},"BTableColumn",n,!1),[n.renderHtml?i("span",{domProps:{innerHTML:e._s(e.getValueByPath(t,n.field))}}):[e._v("\n "+e._s(e.getValueByPath(t,n.field))+"\n ")]],2)})],2),e._v(" "),e.detailed&&e.isVisibleDetailRow(t)?i("tr",{staticClass:"detail"},[i("td",{attrs:{colspan:e.columnCount}},[i("div",{staticClass:"detail-container"},[e._t("detail",null,{row:t,index:n})],2)])]):e._e()]})],2):i("tbody",[i("tr",{staticClass:"is-empty"},[i("td",{attrs:{colspan:e.columnCount}},[e._t("empty")],2)])]),e._v(" "),void 0!==e.$slots.footer?i("tfoot",[i("tr",{staticClass:"table-footer"},[e.hasCustomFooterSlot()?e._t("footer"):i("th",{attrs:{colspan:e.columnCount}},[e._t("footer")],2)],2)]):e._e()])]),e._v(" "),e.checkable&&e.hasBottomLeftSlot()||e.paginated?i("div",{staticClass:"level"},[i("div",{staticClass:"level-left"},[e._t("bottom-left")],2),e._v(" "),i("div",{staticClass:"level-right"},[e.paginated?i("div",{staticClass:"level-item"},[i("b-pagination",{attrs:{"icon-pack":e.iconPack,total:e.newDataTotal,"per-page":e.perPage,simple:e.paginationSimple,size:e.paginationSize,current:e.newCurrentPage},on:{change:e.pageChanged}})],1):e._e()])]):e._e()],1)},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(183),i(184),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=i(1),a=i.n(o),r=i(3),s=i.n(r),l={name:"BSlotComponent",props:{component:{type:Object,required:!0},name:{type:String,default:"default"},tag:{type:String,default:"div"},event:{type:String,default:"hook:updated"}},methods:{refresh:function(){this.$forceUpdate()},isVueComponent:function(){return this.component&&this.component._isVue}},created:function(){this.isVueComponent()&&this.component.$on(this.event,this.refresh)},beforeDestroy:function(){this.isVueComponent()&&this.component.$off(this.event,this.refresh)},render:function(e){if(this.isVueComponent()){var t=this.component.$slots[this.name];return e(this.tag,{},t)}}};t.default={name:"BTabs",components:(n={},a()(n,s.a.name,s.a),a()(n,l.name,l),n),props:{value:[String,Number],expanded:Boolean,type:String,size:String,position:String,animated:{type:Boolean,default:!0}},data:function(){return{activeTab:this.value||0,tabItems:[],contentHeight:0,_isTabs:!0}},computed:{navClasses:function(){return[this.type,this.size,this.position,{"is-fullwidth":this.expanded,"is-toggle-rounded is-toggle":"is-toggle-rounded"===this.type}]}},watch:{value:function(e){this.changeTab(e)},tabItems:function(){this.tabItems.length&&(this.tabItems[this.activeTab].isActive=!0)}},methods:{changeTab:function(e){this.activeTab!==e&&(this.tabItems[this.activeTab].deactivate(this.activeTab,e),this.tabItems[e].activate(this.activeTab,e),this.activeTab=e,this.$emit("change",e))},tabClick:function(e){this.$emit("input",e),this.changeTab(e)}},mounted:function(){this.tabItems.length&&(this.tabItems[this.activeTab].isActive=!0)}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"b-tabs",class:{"is-fullwidth":e.expanded}},[i("nav",{staticClass:"tabs",class:e.navClasses},[i("ul",e._l(e.tabItems,function(t,n){return i("li",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"tabItem.visible"}],key:n,class:{"is-active":e.activeTab===n,"is-disabled":t.disabled}},[i("a",{on:{click:function(t){e.tabClick(n)}}},[t.$slots.header?[i("b-slot-component",{attrs:{component:t,name:"header",tag:"span"}})]:[t.icon?i("b-icon",{attrs:{icon:t.icon,pack:t.iconPack,size:e.size}}):e._e(),e._v(" "),i("span",[e._v(e._s(t.label))])]],2)])}))]),e._v(" "),i("section",{staticClass:"tab-content"},[e._t("default")],2)])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(186),i(187),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(13);t.default={name:"BTabItem",mixins:[n.a],props:{label:String,icon:String,disabled:Boolean,visible:{type:Boolean,default:!0}},data:function(){return{isActive:!1,transitionName:null}},methods:{activate:function(e,t){this.$parent.animated?this.transitionName=t<e?"slide-next":"slide-prev":this.transitionName=null,this.isActive=!0},deactivate:function(e,t){this.$parent.animated?this.transitionName=t<e?"slide-next":"slide-prev":this.transitionName=null,this.isActive=!1}},created:function(){if(!this.$parent.$data._isTabs)throw this.$destroy(),new Error("You should wrap bTabItem on a bTabs");this.$parent.tabItems.push(this)},beforeDestroy:function(){var e=this.$parent.tabItems.indexOf(this);e>=0&&this.$parent.tabItems.splice(e,1)}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{name:e.transitionName}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive&&e.visible,expression:"isActive && visible"}],staticClass:"tab-item"},[e._t("default")],2)])},staticRenderFns:[]}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"BTag",props:{attached:Boolean,closable:Boolean,type:String,size:String,rounded:Boolean,disabled:Boolean,ellipsis:Boolean,tabstop:{type:Boolean,default:!0}},methods:{close:function(){this.disabled||this.$emit("close")}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.attached&&e.closable?i("div",{staticClass:"tags has-addons"},[i("span",{staticClass:"tag",class:[e.type,e.size,{"is-rounded":e.rounded}]},[i("span",{class:{"has-ellipsis":e.ellipsis}},[e._t("default")],2)]),e._v(" "),i("a",{staticClass:"tag is-delete",class:[e.size,{"is-rounded":e.rounded}],attrs:{role:"button",tabindex:!!e.tabstop&&0,disabled:e.disabled},on:{click:function(t){e.close()},keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"delete",[8,46],t.key))return null;t.preventDefault(),e.close()}}})]):i("span",{staticClass:"tag",class:[e.type,e.size,{"is-rounded":e.rounded}]},[i("span",{class:{"has-ellipsis":e.ellipsis}},[e._t("default")],2),e._v(" "),e.closable?i("a",{staticClass:"delete is-small",attrs:{role:"button",disabled:e.disabled,tabindex:!!e.tabstop&&0},on:{click:function(t){e.close()},keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"delete",[8,46],t.key))return null;t.preventDefault(),e.close()}}}):e._e()])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(191),i(192),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"BTaglist",props:{attached:Boolean}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"tags",class:{"has-addons":e.attached}},[e._t("default")],2)},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(194),i(195),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=i(53),a=i.n(o),r=i(1),s=i.n(r),l=i(6),c=i(67),d=i.n(c),u=i(52),f=i.n(u),p=i(12);t.default={name:"BTaginput",components:(n={},s()(n,f.a.name,f.a),s()(n,d.a.name,d.a),n),mixins:[p.a],inheritAttrs:!1,props:{value:{type:Array,default:function(){return[]}},data:{type:Array,default:function(){return[]}},type:String,rounded:{type:Boolean,default:!1},attached:{type:Boolean,default:!1},maxtags:{type:[Number,String],required:!1},field:{type:String,default:"value"},autocomplete:Boolean,disabled:Boolean,ellipsis:Boolean,confirmKeyCodes:{type:Array,default:function(){return[13,188]}},removeOnKeys:{type:Array,default:function(){return[8]}},allowNew:Boolean,onPasteSeparators:{type:Array,default:function(){return[","]}},beforeAdding:{type:Function,default:function(){return!0}},allowDuplicates:{type:Boolean,default:!1}},data:function(){return{tags:this.value||[],newTag:"",_elementRef:"input",_isTaginput:!0}},computed:{rootClasses:function(){return{"is-expanded":this.expanded}},containerClasses:function(){return{"is-focused":this.isFocused,"is-focusable":this.hasInput}},valueLength:function(){return this.newTag.trim().length},defaultSlotName:function(){return this.hasDefaultSlot?"default":"dontrender"},emptySlotName:function(){return this.hasEmptySlot?"empty":"dontrender"},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasEmptySlot:function(){return!!this.$slots.empty},hasInput:function(){return null==this.maxtags||this.tagsLength<this.maxtags},tagsLength:function(){return this.tags.length},separatorsAsRegExp:function(){var e=this.onPasteSeparators;return e.length?new RegExp(e.map(function(e){return e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):null}).join("|"),"g"):null}},watch:{value:function(e){this.tags=e},newTag:function(e){this.$emit("typing",e.trim())},hasInput:function(){this.hasInput||this.onBlur()}},methods:{addTag:function(e){var t=e||this.newTag.trim();if(t){if(!this.autocomplete){var i=this.separatorsAsRegExp;if(i&&t.match(i))return void t.split(i).map(function(e){return e.trim()}).filter(function(e){return 0!==e.length}).map(this.addTag)}(!!this.allowDuplicates||-1===this.tags.indexOf(t))&&this.beforeAdding(t)&&(this.tags.push(t),this.$emit("input",this.tags),this.$emit("add",t))}this.newTag=""},getNormalizedTagText:function(e){return"object"===(void 0===e?"undefined":a()(e))?Object(l.b)(e,this.field):e},customOnBlur:function(e){this.autocomplete||this.addTag(),this.onBlur(e)},onSelect:function(e){var t=this;e&&(this.addTag(e),this.$nextTick(function(){t.newTag=""}))},removeTag:function(e){var t=this.tags.splice(e,1)[0];return this.$emit("input",this.tags),this.$emit("remove",t),t},removeLastTag:function(){this.tagsLength>0&&this.removeTag(this.tagsLength-1)},keydown:function(e){-1===this.removeOnKeys.indexOf(e.keyCode)||this.newTag.length||this.removeLastTag(),this.autocomplete&&!this.allowNew||this.confirmKeyCodes.indexOf(e.keyCode)>=0&&(e.preventDefault(),this.addTag())}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"taginput control",class:e.rootClasses},[i("div",{staticClass:"taginput-container",class:[e.statusType,e.size,e.containerClasses],attrs:{disabled:e.disabled},on:{click:function(t){e.hasInput&&e.focus(t)}}},[e._l(e.tags,function(t,n){return i("b-tag",{key:n,attrs:{type:e.type,size:e.size,rounded:e.rounded,attached:e.attached,tabstop:!1,disabled:e.disabled,ellipsis:e.ellipsis,closable:""},on:{close:function(t){e.removeTag(n)}}},[e._v("\n "+e._s(e.getNormalizedTagText(t))+"\n ")])}),e._v(" "),e.hasInput?i("b-autocomplete",e._b({ref:"autocomplete",attrs:{data:e.data,field:e.field,icon:e.icon,"icon-pack":e.iconPack,maxlength:e.maxlength,"has-counter":!1,size:e.size,disabled:e.disabled,loading:e.loading,"keep-first":""},on:{focus:e.onFocus,blur:e.customOnBlur,select:e.onSelect},nativeOn:{keydown:function(t){e.keydown(t)}},scopedSlots:e._u([{key:e.defaultSlotName,fn:function(t){return[e._t("default",null,{option:t.option,index:t.index})]}}]),model:{value:e.newTag,callback:function(t){e.newTag=t},expression:"newTag"}},"b-autocomplete",e.$attrs,!1),[i("template",{slot:e.emptySlotName},[e._t("empty")],2)],2):e._e()],2),e._v(" "),e.maxtags||e.maxlength?i("p",{staticClass:"help counter"},[e.maxlength&&e.valueLength>0?[e._v("\n "+e._s(e.valueLength)+" / "+e._s(e.maxlength)+"\n ")]:e.maxtags?[e._v("\n "+e._s(e.tagsLength)+" / "+e._s(e.maxtags)+"\n ")]:e._e()],2):e._e()])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(197),i(198),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=i(1),a=i.n(o),r=i(12),s=i(6),l=i(2),c=i(43),d=i.n(c),u=i(44),f=i.n(u),p=i(27),h=i.n(p),b=i(45),m=i.n(b),g=i(28),v=i.n(g),k=i(3),x=i.n(k),w="AM",y="PM",_=function(e){return(e<10?"0":"")+e},C=function(e,t){var i=e.getHours(),n=e.getMinutes(),o=!1;return"12"===t.hourFormat&&(o=i<12,i>12?i-=12:0===i&&(i=12)),_(i)+":"+_(n)+("12"===t.hourFormat?" "+(o?w:y):"")},S=function(e,t){if(e){var i=e,n=!1;if("12"===t.hourFormat){var o=e.split(" ");i=o[0],n=o[1]===w}var a=i.split(":"),r=parseInt(a[0],10),s=parseInt(a[1],10);if(isNaN(r)||r<0||r>23||"12"===t.hourFormat&&(r<1||r>12)||isNaN(s)||s<0||s>59)return null;var l=null;return t.dateSelected&&!isNaN(t.dateSelected)?l=new Date(t.dateSelected):(l=new Date,l.setMilliseconds(0),l.setSeconds(0)),l.setMinutes(s),"12"===t.hourFormat&&(n&&12===r?r=0:n||12===r||(r+=12)),l.setHours(r),l}return null};t.default={name:"BTimepicker",components:(n={},a()(n,h.a.name,h.a),a()(n,m.a.name,m.a),a()(n,v.a.name,v.a),a()(n,x.a.name,x.a),a()(n,d.a.name,d.a),a()(n,f.a.name,f.a),n),mixins:[r.a],inheritAttrs:!1,props:{value:Date,inline:Boolean,minTime:Date,maxTime:Date,placeholder:String,readonly:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},hourFormat:{type:String,default:"24",validator:function(e){return"24"===e||"12"===e}},incrementMinutes:{type:Number,default:1},timeFormatter:{type:Function,default:function(e,t){return"function"==typeof l.a.defaultTimeFormatter?l.a.defaultTimeFormatter(e):C(e,t)}},timeParser:{type:Function,default:function(e,t){return"function"==typeof l.a.defaultTimeParser?l.a.defaultTimeParser(e):S(e,t)}},mobileNative:{type:Boolean,default:function(){return l.a.defaultTimepickerMobileNative}},position:String,unselectableTimes:Array},data:function(){return{dateSelected:this.value,hoursSelected:null,minutesSelected:null,meridienSelected:null,_elementRef:"input",_isTimepicker:!0}},computed:{hours:function(){for(var e=[],t=this.isHourFormat24?24:12,i=0;i<t;i++){var n=i,o=n;this.isHourFormat24||(n=i+1,o=n,this.meridienSelected===w?12===n&&(n=0):this.meridienSelected===y&&12!==n&&(n+=12)),e.push({label:_(o),value:n})}return e},minutes:function(){for(var e=[],t=0;t<60;t+=this.incrementMinutes)e.push({label:_(t),value:t});return e},meridiens:function(){return[w,y]},isMobile:function(){return this.mobileNative&&s.d.any()},isHourFormat24:function(){return"24"===this.hourFormat}},watch:{hourFormat:function(e){null!==this.hoursSelected&&(this.meridienSelected=this.hoursSelected>=12?y:w)},dateSelected:function(e){this.$emit("input",e)},value:function(e){this.updateInternalState(e),this.dateSelected=e,!this.isValid&&this.$refs.input.checkHtml5Validity()}},methods:{onMeridienChange:function(e){null!==this.hoursSelected&&(e===y?0===this.hoursSelected?this.hoursSelected=12:this.hoursSelected+=12:e===w&&(12===this.hoursSelected?this.hoursSelected=0:this.hoursSelected-=12)),this.updateDateSelected(this.hoursSelected,this.minutesSelected,e)},onHoursChange:function(e){this.updateDateSelected(parseInt(e,10),this.minutesSelected,this.meridienSelected)},onMinutesChange:function(e){this.updateDateSelected(this.hoursSelected,parseInt(e,10),this.meridienSelected)},updateDateSelected:function(e,t,i){null!=e&&null!=t&&(!this.isHourFormat24&&null!==i||this.isHourFormat24)&&(this.dateSelected&&!isNaN(this.dateSelected)?this.dateSelected=new Date(this.dateSelected):(this.dateSelected=new Date,this.dateSelected.setMilliseconds(0),this.dateSelected.setSeconds(0)),this.dateSelected.setHours(e),this.dateSelected.setMinutes(t))},updateInternalState:function(e){e?(this.hoursSelected=e.getHours(),this.minutesSelected=e.getMinutes(),this.meridienSelected=e.getHours()>=12?y:w):(this.hoursSelected=null,this.minutesSelected=null,this.meridienSelected=w)},isHourDisabled:function(e){var t=this,i=!1;if(this.minTime){var n=this.minTime.getHours();i=e<n}if(this.maxTime&&!i){var o=this.maxTime.getHours();i=e>o}if(this.unselectableTimes&&!i)if(null!==this.minutesSelected){var a=this.unselectableTimes.filter(function(i){return i.getHours()===e&&i.getMinutes()===t.minutesSelected});i=a.length>0}else{var r=this.unselectableTimes.filter(function(t){return t.getHours()===e});i=r.length===this.minutes.length}return i},isMinuteDisabled:function(e){var t=this,i=!1;if(null!==this.hoursSelected){if(this.isHourDisabled(this.hoursSelected))i=!0;else{if(this.minTime){var n=this.minTime.getHours(),o=this.minTime.getMinutes();i=this.hoursSelected===n&&e<o}if(this.maxTime&&!i){var a=this.maxTime.getHours(),r=this.maxTime.getMinutes();i=this.hoursSelected===a&&e>r}}if(this.unselectableTimes&&!i){i=this.unselectableTimes.filter(function(i){return i.getHours()===t.hoursSelected&&i.getMinutes()===e}).length>0}}return i},onChange:function(e){var t=this.timeParser(e,this);this.updateInternalState(t),t&&!isNaN(t)?this.dateSelected=t:(this.dateSelected=null,this.$refs.input.newValue=this.dateSelected)},formatValue:function(e){return e&&!isNaN(e)?this.timeFormatter(e,this):null},close:function(){this.$refs.dropdown&&(this.$refs.dropdown.isActive=!1)},formatHHMMSS:function(e){var t=new Date(e);if(e&&!isNaN(t)){var i=t.getHours(),n=t.getMinutes();return _(i)+":"+_(n)+":00"}return""},onChangeNativePicker:function(e){var t=e.target.value;if(t){this.dateSelected&&!isNaN(this.dateSelected)?this.dateSelected=new Date(this.dateSelected):(this.dateSelected=new Date,this.dateSelected.setMilliseconds(0),this.dateSelected.setSeconds(0));var i=t.split(":");this.dateSelected.setHours(parseInt(i[0],10)),this.dateSelected.setMinutes(parseInt(i[1],10))}else this.dateSelected=null}},mounted:function(){this.updateInternalState(this.value)}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"timepicker control",class:[e.size,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?i("b-dropdown",{ref:"dropdown",attrs:{position:e.position,disabled:e.disabled,inline:e.inline}},[e.inline?e._e():i("b-input",e._b({ref:"input",attrs:{slot:"trigger",autocomplete:"off",value:e.formatValue(e.dateSelected),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,disabled:e.disabled,readonly:e.readonly,rounded:e.rounded},on:{focus:function(t){e.$emit("focus",t)},blur:function(t){e.$emit("blur",t)&&e.checkHtml5Validity()}},nativeOn:{change:function(t){e.onChange(t.target.value)}},slot:"trigger"},"b-input",e.$attrs,!1)),e._v(" "),i("b-dropdown-item",{attrs:{disabled:e.disabled,custom:""}},[i("div",{staticClass:"pagination-list"},[i("b-field",[i("b-select",{attrs:{disabled:e.disabled,placeholder:"00"},nativeOn:{change:function(t){e.onHoursChange(t.target.value)}},model:{value:e.hoursSelected,callback:function(t){e.hoursSelected=t},expression:"hoursSelected"}},e._l(e.hours,function(t){return i("option",{key:t.value,attrs:{disabled:e.isHourDisabled(t.value)},domProps:{value:t.value}},[e._v("\n "+e._s(t.label)+"\n ")])})),e._v(" "),i("b-select",{attrs:{disabled:e.disabled,placeholder:"00"},nativeOn:{change:function(t){e.onMinutesChange(t.target.value)}},model:{value:e.minutesSelected,callback:function(t){e.minutesSelected=t},expression:"minutesSelected"}},e._l(e.minutes,function(t){return i("option",{key:t.value,attrs:{disabled:e.isMinuteDisabled(t.value)},domProps:{value:t.value}},[e._v("\n "+e._s(t.label)+"\n ")])})),e._v(" "),e.isHourFormat24?e._e():i("b-select",{attrs:{disabled:e.disabled},nativeOn:{change:function(t){e.onMeridienChange(t.target.value)}},model:{value:e.meridienSelected,callback:function(t){e.meridienSelected=t},expression:"meridienSelected"}},e._l(e.meridiens,function(t){return i("option",{key:t,domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])}))],1)],1),e._v(" "),void 0!==e.$slots.default&&e.$slots.default.length?i("footer",{staticClass:"timepicker-footer"},[e._t("default")],2):e._e()])],1):i("b-input",e._b({ref:"input",attrs:{type:"time",autocomplete:"off",value:e.formatHHMMSS(e.value),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,max:e.formatHHMMSS(e.maxTime),min:e.formatHHMMSS(e.minTime),disabled:e.disabled,readonly:!1},on:{focus:function(t){e.$emit("focus",t)},blur:function(t){e.$emit("blur",t)&&e.checkHtml5Validity()}},nativeOn:{change:function(t){e.onChangeNativePicker(t)}}},"b-input",e.$attrs,!1))],1)},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(200),i(201),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),o=i(65);t.default={name:"BToast",mixins:[o.a],data:function(){return{newDuration:this.duration||n.a.defaultToastDuration}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{"enter-active-class":e.transition.enter,"leave-active-class":e.transition.leave}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"toast",class:[e.type,e.position]},[i("div",{domProps:{innerHTML:e._s(e.message)}})])])},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(203),i(204),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2);t.default={name:"BTooltip",props:{active:{type:Boolean,default:!0},type:String,label:String,position:{type:String,default:"is-top",validator:function(e){return["is-top","is-bottom","is-left","is-right"].indexOf(e)>-1}},always:Boolean,animated:Boolean,square:Boolean,dashed:Boolean,multilined:Boolean,size:{type:String,default:"is-medium"}},computed:{newType:function(){return this.type||n.a.defaultTooltipType},newAnimated:function(){return this.animated||n.a.defaultTooltipAnimated}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("span",{class:[e.newType,e.position,e.size,{tooltip:e.active,"is-square":e.square,"is-animated":e.newAnimated,"is-always":e.always,"is-multiline":e.multilined,"is-dashed":e.dashed}],attrs:{"data-label":e.label}},[e._t("default")],2)},staticRenderFns:[]}},function(e,t,i){var n=i(0)(i(206),i(207),null,null,null);e.exports=n.exports},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(12);t.default={name:"BUpload",mixins:[n.a],inheritAttrs:!1,props:{value:{type:Array,default:function(){return[]}},multiple:Boolean,disabled:Boolean,accept:String,dragDrop:Boolean,type:{type:String,default:"is-primary"},native:{type:Boolean,default:!1}},data:function(){return{newValue:this.value||[],dragDropFocus:!1,_elementRef:"input"}},watch:{value:function(e){this.newValue=e,this.newValue&&0!==this.newValue.length||(this.$refs.input.value=null),!this.isValid&&!this.dragDrop&&this.checkHtml5Validity()}},methods:{onFileChange:function(e){if(!this.disabled&&!this.loading){this.dragDrop&&this.updateDragDropFocus(!1);var t=e.target.files||e.dataTransfer.files;if(t&&t.length){if(this.multiple)this.native&&(this.newValue=[]);else if(this.dragDrop){if(1!==t.length)return!1;this.newValue=[]}else this.newValue=[];for(var i=0;i<t.length;i++){var n=t[i];this.checkType(n)&&this.newValue.push(n)}}this.$emit("input",this.newValue),!this.dragDrop&&this.checkHtml5Validity()}},updateDragDropFocus:function(e){this.disabled||this.loading||(this.dragDropFocus=e)},checkType:function(e){if(!this.accept)return!0;var t=this.accept.split(",");if(0===t.length)return!0;for(var i=!1,n=0;n<t.length&&!i;n++){var o=t[n].trim();if(o)if("."===o.substring(0,1)){var a=e.name.lastIndexOf(".");a>=0&&e.name.substring(a)===o&&(i=!0)}else e.type.match(o)&&(i=!0)}return i}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("label",{staticClass:"upload control"},[e.dragDrop?i("div",{staticClass:"upload-draggable",class:[e.type,{"is-loading":e.loading,"is-disabled":e.disabled,"is-hovered":e.dragDropFocus}],on:{dragover:function(t){t.preventDefault(),e.updateDragDropFocus(!0)},dragleave:function(t){t.preventDefault(),e.updateDragDropFocus(!1)},dragenter:function(t){t.preventDefault(),e.updateDragDropFocus(!0)},drop:function(t){t.preventDefault(),e.onFileChange(t)}}},[e._t("default")],2):[e._t("default")],e._v(" "),i("input",e._b({ref:"input",attrs:{type:"file",multiple:e.multiple,accept:e.accept,disabled:e.disabled},on:{change:e.onFileChange}},"input",e.$attrs,!1))],2)},staticRenderFns:[]}}])})},function(e,t,i){var n=i(22);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("6e4843aa",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"/*! Buefy v0.6.7 | MIT License | github.com/buefy/buefy */ \n/*! bulma.io v0.7.1 | MIT License | github.com/jgthms/bulma */@keyframes spinAround{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.b-checkbox.checkbox,.b-radio.radio,.breadcrumb,.button,.delete,.file,.icon,.is-unselectable,.modal-close,.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous,.switch,.tabs{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-link:after,.select:not(.is-multiple):not(.is-loading):after{border:3px solid transparent;border-radius:2px;border-right:0;border-top:0;content:\" \";display:block;height:.625em;margin-top:-.4375em;pointer-events:none;position:absolute;top:50%;transform:rotate(-45deg);transform-origin:center;width:.625em}.block:not(:last-child),.box:not(:last-child),.breadcrumb:not(:last-child),.content:not(:last-child),.highlight:not(:last-child),.level:not(:last-child),.message:not(:last-child),.notification:not(:last-child),.progress:not(:last-child),.subtitle:not(:last-child),.table-container:not(:last-child),.table:not(:last-child),.tabs:not(:last-child),.title:not(:last-child){margin-bottom:1.5rem}.delete,.modal-close{-moz-appearance:none;-webkit-appearance:none;background-color:hsla(0,0%,4%,.2);border:none;border-radius:290486px;cursor:pointer;display:inline-block;flex-grow:0;flex-shrink:0;font-size:0;height:20px;max-height:20px;max-width:20px;min-height:20px;min-width:20px;outline:none;position:relative;vertical-align:top;width:20px}.delete:after,.delete:before,.modal-close:after,.modal-close:before{background-color:#fff;content:\"\";display:block;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) rotate(45deg);transform-origin:center center}.delete:before,.modal-close:before{height:2px;width:50%}.delete:after,.modal-close:after{height:50%;width:2px}.delete:focus,.delete:hover,.modal-close:focus,.modal-close:hover{background-color:hsla(0,0%,4%,.3)}.delete:active,.modal-close:active{background-color:hsla(0,0%,4%,.4)}.is-small.delete,.is-small.modal-close{height:16px;max-height:16px;max-width:16px;min-height:16px;min-width:16px;width:16px}.is-medium.delete,.is-medium.modal-close{height:24px;max-height:24px;max-width:24px;min-height:24px;min-width:24px;width:24px}.is-large.delete,.is-large.modal-close{height:32px;max-height:32px;max-width:32px;min-height:32px;min-width:32px;width:32px}.b-table.is-loading:after,.button.is-loading:after,.control.is-loading:after,.loader,.loading-overlay .loading-icon:after,.select.is-loading:after,.upload .upload-draggable.is-loading:after{animation:spinAround .5s infinite linear;border:2px solid #dbdbdb;border-radius:290486px;border-right-color:transparent;border-top-color:transparent;content:\"\";display:block;height:1em;position:relative;width:1em}.dropdown .background,.hero-video,.image.is-1by1 img,.image.is-1by2 img,.image.is-1by3 img,.image.is-2by1 img,.image.is-2by3 img,.image.is-3by1 img,.image.is-3by2 img,.image.is-3by4 img,.image.is-3by5 img,.image.is-4by3 img,.image.is-4by5 img,.image.is-5by3 img,.image.is-5by4 img,.image.is-9by16 img,.image.is-16by9 img,.image.is-square img,.is-overlay,.loading-overlay,.loading-overlay .loading-background,.modal,.modal-background{bottom:0;left:0;position:absolute;right:0;top:0}.button,.file-cta,.file-name,.input,.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous,.select select,.taginput .taginput-container.is-focusable,.textarea{-moz-appearance:none;-webkit-appearance:none;align-items:center;border:1px solid transparent;border-radius:4px;box-shadow:none;display:inline-flex;font-size:1rem;height:2.25em;justify-content:flex-start;line-height:1.5;padding:calc(.375em - 1px) calc(.625em - 1px);position:relative;vertical-align:top}.button:active,.button:focus,.file-cta:active,.file-cta:focus,.file-name:active,.file-name:focus,.input:active,.input:focus,.is-active.button,.is-active.file-cta,.is-active.file-name,.is-active.input,.is-active.pagination-ellipsis,.is-active.pagination-link,.is-active.pagination-next,.is-active.pagination-previous,.is-active.textarea,.is-focused.button,.is-focused.file-cta,.is-focused.file-name,.is-focused.input,.is-focused.pagination-ellipsis,.is-focused.pagination-link,.is-focused.pagination-next,.is-focused.pagination-previous,.is-focused.textarea,.pagination-ellipsis:active,.pagination-ellipsis:focus,.pagination-link:active,.pagination-link:focus,.pagination-next:active,.pagination-next:focus,.pagination-previous:active,.pagination-previous:focus,.select select.is-active,.select select.is-focused,.select select:active,.select select:focus,.taginput .is-active.taginput-container.is-focusable,.taginput .is-focused.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:active,.taginput .taginput-container.is-focusable:focus,.textarea:active,.textarea:focus{outline:none}.select select[disabled],.taginput [disabled].taginput-container.is-focusable,[disabled].button,[disabled].file-cta,[disabled].file-name,[disabled].input,[disabled].pagination-ellipsis,[disabled].pagination-link,[disabled].pagination-next,[disabled].pagination-previous,[disabled].textarea{cursor:not-allowed}\n\n/*! minireset.css v0.0.3 | MIT License | github.com/jgthms/minireset.css */blockquote,body,dd,dl,dt,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,html,iframe,legend,li,ol,p,pre,textarea,ul{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}audio,img,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0;text-align:left}html{background-color:#fff;font-size:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;min-width:300px;overflow-x:hidden;overflow-y:scroll;text-rendering:optimizeLegibility;text-size-adjust:100%}article,aside,figure,footer,header,hgroup,section{display:block}body,button,input,select,textarea{font-family:BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif}code,pre{-moz-osx-font-smoothing:auto;-webkit-font-smoothing:auto;font-family:monospace}body{color:#4a4a4a;font-size:1rem;font-weight:400;line-height:1.5}a{color:#3273dc;cursor:pointer;text-decoration:none}a strong{color:currentColor}a:hover{color:#363636}code{color:#ff3860;font-size:.875em;font-weight:400;padding:.25em .5em}code,hr{background-color:#f5f5f5}hr{border:none;display:block;height:2px;margin:1.5rem 0}img{height:auto;max-width:100%}input[type=checkbox],input[type=radio]{vertical-align:baseline}small{font-size:.875em}span{font-style:inherit;font-weight:inherit}strong{color:#363636;font-weight:700}pre{-webkit-overflow-scrolling:touch;background-color:#f5f5f5;color:#4a4a4a;font-size:.875em;overflow-x:auto;padding:1.25rem 1.5rem;white-space:pre;word-wrap:normal}pre code{background-color:transparent;color:currentColor;font-size:1em;padding:0}table td,table th{text-align:left;vertical-align:top}table th{color:#363636}.is-clearfix:after{clear:both;content:\" \";display:table}.is-pulled-left{float:left!important}.is-pulled-right{float:right!important}.is-clipped{overflow:hidden!important}.is-size-1{font-size:3rem!important}.is-size-2{font-size:2.5rem!important}.is-size-3{font-size:2rem!important}.is-size-4{font-size:1.5rem!important}.is-size-5{font-size:1.25rem!important}.is-size-6{font-size:1rem!important}.is-size-7{font-size:.75rem!important}@media screen and (max-width:768px){.is-size-1-mobile{font-size:3rem!important}.is-size-2-mobile{font-size:2.5rem!important}.is-size-3-mobile{font-size:2rem!important}.is-size-4-mobile{font-size:1.5rem!important}.is-size-5-mobile{font-size:1.25rem!important}.is-size-6-mobile{font-size:1rem!important}.is-size-7-mobile{font-size:.75rem!important}}@media print,screen and (min-width:769px){.is-size-1-tablet{font-size:3rem!important}.is-size-2-tablet{font-size:2.5rem!important}.is-size-3-tablet{font-size:2rem!important}.is-size-4-tablet{font-size:1.5rem!important}.is-size-5-tablet{font-size:1.25rem!important}.is-size-6-tablet{font-size:1rem!important}.is-size-7-tablet{font-size:.75rem!important}}@media screen and (max-width:1087px){.is-size-1-touch{font-size:3rem!important}.is-size-2-touch{font-size:2.5rem!important}.is-size-3-touch{font-size:2rem!important}.is-size-4-touch{font-size:1.5rem!important}.is-size-5-touch{font-size:1.25rem!important}.is-size-6-touch{font-size:1rem!important}.is-size-7-touch{font-size:.75rem!important}}@media screen and (min-width:1088px){.is-size-1-desktop{font-size:3rem!important}.is-size-2-desktop{font-size:2.5rem!important}.is-size-3-desktop{font-size:2rem!important}.is-size-4-desktop{font-size:1.5rem!important}.is-size-5-desktop{font-size:1.25rem!important}.is-size-6-desktop{font-size:1rem!important}.is-size-7-desktop{font-size:.75rem!important}}@media screen and (min-width:1280px){.is-size-1-widescreen{font-size:3rem!important}.is-size-2-widescreen{font-size:2.5rem!important}.is-size-3-widescreen{font-size:2rem!important}.is-size-4-widescreen{font-size:1.5rem!important}.is-size-5-widescreen{font-size:1.25rem!important}.is-size-6-widescreen{font-size:1rem!important}.is-size-7-widescreen{font-size:.75rem!important}}@media screen and (min-width:1472px){.is-size-1-fullhd{font-size:3rem!important}.is-size-2-fullhd{font-size:2.5rem!important}.is-size-3-fullhd{font-size:2rem!important}.is-size-4-fullhd{font-size:1.5rem!important}.is-size-5-fullhd{font-size:1.25rem!important}.is-size-6-fullhd{font-size:1rem!important}.is-size-7-fullhd{font-size:.75rem!important}}.has-text-centered{text-align:center!important}.has-text-justified{text-align:justify!important}.has-text-left{text-align:left!important}.has-text-right{text-align:right!important}@media screen and (max-width:768px){.has-text-centered-mobile{text-align:center!important}}@media print,screen and (min-width:769px){.has-text-centered-tablet{text-align:center!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-centered-tablet-only{text-align:center!important}}@media screen and (max-width:1087px){.has-text-centered-touch{text-align:center!important}}@media screen and (min-width:1088px){.has-text-centered-desktop{text-align:center!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-centered-desktop-only{text-align:center!important}}@media screen and (min-width:1280px){.has-text-centered-widescreen{text-align:center!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-centered-widescreen-only{text-align:center!important}}@media screen and (min-width:1472px){.has-text-centered-fullhd{text-align:center!important}}@media screen and (max-width:768px){.has-text-justified-mobile{text-align:justify!important}}@media print,screen and (min-width:769px){.has-text-justified-tablet{text-align:justify!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-justified-tablet-only{text-align:justify!important}}@media screen and (max-width:1087px){.has-text-justified-touch{text-align:justify!important}}@media screen and (min-width:1088px){.has-text-justified-desktop{text-align:justify!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-justified-desktop-only{text-align:justify!important}}@media screen and (min-width:1280px){.has-text-justified-widescreen{text-align:justify!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-justified-widescreen-only{text-align:justify!important}}@media screen and (min-width:1472px){.has-text-justified-fullhd{text-align:justify!important}}@media screen and (max-width:768px){.has-text-left-mobile{text-align:left!important}}@media print,screen and (min-width:769px){.has-text-left-tablet{text-align:left!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-left-tablet-only{text-align:left!important}}@media screen and (max-width:1087px){.has-text-left-touch{text-align:left!important}}@media screen and (min-width:1088px){.has-text-left-desktop{text-align:left!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-left-desktop-only{text-align:left!important}}@media screen and (min-width:1280px){.has-text-left-widescreen{text-align:left!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-left-widescreen-only{text-align:left!important}}@media screen and (min-width:1472px){.has-text-left-fullhd{text-align:left!important}}@media screen and (max-width:768px){.has-text-right-mobile{text-align:right!important}}@media print,screen and (min-width:769px){.has-text-right-tablet{text-align:right!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-right-tablet-only{text-align:right!important}}@media screen and (max-width:1087px){.has-text-right-touch{text-align:right!important}}@media screen and (min-width:1088px){.has-text-right-desktop{text-align:right!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-right-desktop-only{text-align:right!important}}@media screen and (min-width:1280px){.has-text-right-widescreen{text-align:right!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-right-widescreen-only{text-align:right!important}}@media screen and (min-width:1472px){.has-text-right-fullhd{text-align:right!important}}.is-capitalized{text-transform:capitalize!important}.is-lowercase{text-transform:lowercase!important}.is-uppercase{text-transform:uppercase!important}.is-italic{font-style:italic!important}.has-text-white{color:#fff!important}a.has-text-white:focus,a.has-text-white:hover{color:#e6e6e6!important}.has-background-white{background-color:#fff!important}.has-text-black{color:#0a0a0a!important}a.has-text-black:focus,a.has-text-black:hover{color:#000!important}.has-background-black{background-color:#0a0a0a!important}.has-text-light{color:#f5f5f5!important}a.has-text-light:focus,a.has-text-light:hover{color:#dbdbdb!important}.has-background-light{background-color:#f5f5f5!important}.has-text-dark{color:#363636!important}a.has-text-dark:focus,a.has-text-dark:hover{color:#1c1c1c!important}.has-background-dark{background-color:#363636!important}.has-text-primary{color:#00d1b2!important}a.has-text-primary:focus,a.has-text-primary:hover{color:#009e86!important}.has-background-primary{background-color:#00d1b2!important}.has-text-link{color:#3273dc!important}a.has-text-link:focus,a.has-text-link:hover{color:#205bbc!important}.has-background-link{background-color:#3273dc!important}.has-text-info{color:#209cee!important}a.has-text-info:focus,a.has-text-info:hover{color:#0f81cc!important}.has-background-info{background-color:#209cee!important}.has-text-success{color:#23d160!important}a.has-text-success:focus,a.has-text-success:hover{color:#1ca64c!important}.has-background-success{background-color:#23d160!important}.has-text-warning{color:#ffdd57!important}a.has-text-warning:focus,a.has-text-warning:hover{color:#ffd324!important}.has-background-warning{background-color:#ffdd57!important}.has-text-danger{color:#ff3860!important}a.has-text-danger:focus,a.has-text-danger:hover{color:#ff0537!important}.has-background-danger{background-color:#ff3860!important}.has-text-black-bis{color:#121212!important}.has-background-black-bis{background-color:#121212!important}.has-text-black-ter{color:#242424!important}.has-background-black-ter{background-color:#242424!important}.has-text-grey-darker{color:#363636!important}.has-background-grey-darker{background-color:#363636!important}.has-text-grey-dark{color:#4a4a4a!important}.has-background-grey-dark{background-color:#4a4a4a!important}.has-text-grey{color:#7a7a7a!important}.has-background-grey{background-color:#7a7a7a!important}.has-text-grey-light{color:#b5b5b5!important}.has-background-grey-light{background-color:#b5b5b5!important}.has-text-grey-lighter{color:#dbdbdb!important}.has-background-grey-lighter{background-color:#dbdbdb!important}.has-text-white-ter{color:#f5f5f5!important}.has-background-white-ter{background-color:#f5f5f5!important}.has-text-white-bis{color:#fafafa!important}.has-background-white-bis{background-color:#fafafa!important}.has-text-weight-light{font-weight:300!important}.has-text-weight-normal{font-weight:400!important}.has-text-weight-semibold{font-weight:600!important}.has-text-weight-bold{font-weight:700!important}.is-block{display:block!important}@media screen and (max-width:768px){.is-block-mobile{display:block!important}}@media print,screen and (min-width:769px){.is-block-tablet{display:block!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-block-tablet-only{display:block!important}}@media screen and (max-width:1087px){.is-block-touch{display:block!important}}@media screen and (min-width:1088px){.is-block-desktop{display:block!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-block-desktop-only{display:block!important}}@media screen and (min-width:1280px){.is-block-widescreen{display:block!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-block-widescreen-only{display:block!important}}@media screen and (min-width:1472px){.is-block-fullhd{display:block!important}}.is-flex{display:flex!important}@media screen and (max-width:768px){.is-flex-mobile{display:flex!important}}@media print,screen and (min-width:769px){.is-flex-tablet{display:flex!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-flex-tablet-only{display:flex!important}}@media screen and (max-width:1087px){.is-flex-touch{display:flex!important}}@media screen and (min-width:1088px){.is-flex-desktop{display:flex!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-flex-desktop-only{display:flex!important}}@media screen and (min-width:1280px){.is-flex-widescreen{display:flex!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-flex-widescreen-only{display:flex!important}}@media screen and (min-width:1472px){.is-flex-fullhd{display:flex!important}}.is-inline{display:inline!important}@media screen and (max-width:768px){.is-inline-mobile{display:inline!important}}@media print,screen and (min-width:769px){.is-inline-tablet{display:inline!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-tablet-only{display:inline!important}}@media screen and (max-width:1087px){.is-inline-touch{display:inline!important}}@media screen and (min-width:1088px){.is-inline-desktop{display:inline!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-desktop-only{display:inline!important}}@media screen and (min-width:1280px){.is-inline-widescreen{display:inline!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-widescreen-only{display:inline!important}}@media screen and (min-width:1472px){.is-inline-fullhd{display:inline!important}}.is-inline-block{display:inline-block!important}@media screen and (max-width:768px){.is-inline-block-mobile{display:inline-block!important}}@media print,screen and (min-width:769px){.is-inline-block-tablet{display:inline-block!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-block-tablet-only{display:inline-block!important}}@media screen and (max-width:1087px){.is-inline-block-touch{display:inline-block!important}}@media screen and (min-width:1088px){.is-inline-block-desktop{display:inline-block!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-block-desktop-only{display:inline-block!important}}@media screen and (min-width:1280px){.is-inline-block-widescreen{display:inline-block!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-block-widescreen-only{display:inline-block!important}}@media screen and (min-width:1472px){.is-inline-block-fullhd{display:inline-block!important}}.is-inline-flex{display:inline-flex!important}@media screen and (max-width:768px){.is-inline-flex-mobile{display:inline-flex!important}}@media print,screen and (min-width:769px){.is-inline-flex-tablet{display:inline-flex!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-flex-tablet-only{display:inline-flex!important}}@media screen and (max-width:1087px){.is-inline-flex-touch{display:inline-flex!important}}@media screen and (min-width:1088px){.is-inline-flex-desktop{display:inline-flex!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-flex-desktop-only{display:inline-flex!important}}@media screen and (min-width:1280px){.is-inline-flex-widescreen{display:inline-flex!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-flex-widescreen-only{display:inline-flex!important}}@media screen and (min-width:1472px){.is-inline-flex-fullhd{display:inline-flex!important}}.is-hidden{display:none!important}@media screen and (max-width:768px){.is-hidden-mobile{display:none!important}}@media print,screen and (min-width:769px){.is-hidden-tablet{display:none!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-hidden-tablet-only{display:none!important}}@media screen and (max-width:1087px){.is-hidden-touch{display:none!important}}@media screen and (min-width:1088px){.is-hidden-desktop{display:none!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-hidden-desktop-only{display:none!important}}@media screen and (min-width:1280px){.is-hidden-widescreen{display:none!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-hidden-widescreen-only{display:none!important}}@media screen and (min-width:1472px){.is-hidden-fullhd{display:none!important}}.is-invisible{visibility:hidden!important}@media screen and (max-width:768px){.is-invisible-mobile{visibility:hidden!important}}@media print,screen and (min-width:769px){.is-invisible-tablet{visibility:hidden!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-invisible-tablet-only{visibility:hidden!important}}@media screen and (max-width:1087px){.is-invisible-touch{visibility:hidden!important}}@media screen and (min-width:1088px){.is-invisible-desktop{visibility:hidden!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-invisible-desktop-only{visibility:hidden!important}}@media screen and (min-width:1280px){.is-invisible-widescreen{visibility:hidden!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-invisible-widescreen-only{visibility:hidden!important}}@media screen and (min-width:1472px){.is-invisible-fullhd{visibility:hidden!important}}.is-marginless{margin:0!important}.is-paddingless{padding:0!important}.is-radiusless{border-radius:0!important}.is-shadowless{box-shadow:none!important}.box{background-color:#fff;border-radius:6px;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);color:#4a4a4a;display:block;padding:1.25rem}a.box:focus,a.box:hover{box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px #3273dc}a.box:active{box-shadow:inset 0 1px 2px hsla(0,0%,4%,.2),0 0 0 1px #3273dc}.button{background-color:#fff;border-color:#dbdbdb;border-width:1px;color:#363636;cursor:pointer;justify-content:center;padding:calc(.375em - 1px) .75em;text-align:center;white-space:nowrap}.button strong{color:inherit}.button .icon,.button .icon.is-large,.button .icon.is-medium,.button .icon.is-small{height:1.5em;width:1.5em}.button .icon:first-child:not(:last-child){margin-left:calc(-.375em - 1px);margin-right:.1875em}.button .icon:last-child:not(:first-child){margin-left:.1875em;margin-right:calc(-.375em - 1px)}.button .icon:first-child:last-child{margin-left:calc(-.375em - 1px);margin-right:calc(-.375em - 1px)}.button.is-hovered,.button:hover{border-color:#b5b5b5;color:#363636}.button.is-focused,.button:focus{border-color:#3273dc;color:#363636}.button.is-focused:not(:active),.button:focus:not(:active){box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.button.is-active,.button:active{border-color:#4a4a4a;color:#363636}.button.is-text{background-color:transparent;border-color:transparent;color:#4a4a4a;text-decoration:underline}.button.is-text.is-focused,.button.is-text.is-hovered,.button.is-text:focus,.button.is-text:hover{background-color:#f5f5f5;color:#363636}.button.is-text.is-active,.button.is-text:active{background-color:#e8e8e8;color:#363636}.button.is-text[disabled]{background-color:transparent;border-color:transparent;box-shadow:none}.button.is-white{background-color:#fff;border-color:transparent;color:#0a0a0a}.button.is-white.is-hovered,.button.is-white:hover{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.button.is-white.is-focused,.button.is-white:focus{border-color:transparent;color:#0a0a0a}.button.is-white.is-focused:not(:active),.button.is-white:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.button.is-white.is-active,.button.is-white:active{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.button.is-white[disabled]{background-color:#fff;border-color:transparent;box-shadow:none}.button.is-white.is-inverted{background-color:#0a0a0a;color:#fff}.button.is-white.is-inverted:hover{background-color:#000}.button.is-white.is-inverted[disabled]{background-color:#0a0a0a;border-color:transparent;box-shadow:none;color:#fff}.button.is-white.is-loading:after{border-color:transparent transparent #0a0a0a #0a0a0a!important}.button.is-white.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-white.is-outlined:focus,.button.is-white.is-outlined:hover{background-color:#fff;border-color:#fff;color:#0a0a0a}.button.is-white.is-outlined.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-white.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-white.is-inverted.is-outlined{background-color:transparent;border-color:#0a0a0a;color:#0a0a0a}.button.is-white.is-inverted.is-outlined:focus,.button.is-white.is-inverted.is-outlined:hover{background-color:#0a0a0a;color:#fff}.button.is-white.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#0a0a0a;box-shadow:none;color:#0a0a0a}.button.is-black{background-color:#0a0a0a;border-color:transparent;color:#fff}.button.is-black.is-hovered,.button.is-black:hover{background-color:#040404;border-color:transparent;color:#fff}.button.is-black.is-focused,.button.is-black:focus{border-color:transparent;color:#fff}.button.is-black.is-focused:not(:active),.button.is-black:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.button.is-black.is-active,.button.is-black:active{background-color:#000;border-color:transparent;color:#fff}.button.is-black[disabled]{background-color:#0a0a0a;border-color:transparent;box-shadow:none}.button.is-black.is-inverted{background-color:#fff;color:#0a0a0a}.button.is-black.is-inverted:hover{background-color:#f2f2f2}.button.is-black.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#0a0a0a}.button.is-black.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-black.is-outlined{background-color:transparent;border-color:#0a0a0a;color:#0a0a0a}.button.is-black.is-outlined:focus,.button.is-black.is-outlined:hover{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.button.is-black.is-outlined.is-loading:after{border-color:transparent transparent #0a0a0a #0a0a0a!important}.button.is-black.is-outlined[disabled]{background-color:transparent;border-color:#0a0a0a;box-shadow:none;color:#0a0a0a}.button.is-black.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-black.is-inverted.is-outlined:focus,.button.is-black.is-inverted.is-outlined:hover{background-color:#fff;color:#0a0a0a}.button.is-black.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-light{background-color:#f5f5f5;border-color:transparent;color:#363636}.button.is-light.is-hovered,.button.is-light:hover{background-color:#eee;border-color:transparent;color:#363636}.button.is-light.is-focused,.button.is-light:focus{border-color:transparent;color:#363636}.button.is-light.is-focused:not(:active),.button.is-light:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.button.is-light.is-active,.button.is-light:active{background-color:#e8e8e8;border-color:transparent;color:#363636}.button.is-light[disabled]{background-color:#f5f5f5;border-color:transparent;box-shadow:none}.button.is-light.is-inverted{background-color:#363636;color:#f5f5f5}.button.is-light.is-inverted:hover{background-color:#292929}.button.is-light.is-inverted[disabled]{background-color:#363636;border-color:transparent;box-shadow:none;color:#f5f5f5}.button.is-light.is-loading:after{border-color:transparent transparent #363636 #363636!important}.button.is-light.is-outlined{background-color:transparent;border-color:#f5f5f5;color:#f5f5f5}.button.is-light.is-outlined:focus,.button.is-light.is-outlined:hover{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.button.is-light.is-outlined.is-loading:after{border-color:transparent transparent #f5f5f5 #f5f5f5!important}.button.is-light.is-outlined[disabled]{background-color:transparent;border-color:#f5f5f5;box-shadow:none;color:#f5f5f5}.button.is-light.is-inverted.is-outlined{background-color:transparent;border-color:#363636;color:#363636}.button.is-light.is-inverted.is-outlined:focus,.button.is-light.is-inverted.is-outlined:hover{background-color:#363636;color:#f5f5f5}.button.is-light.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#363636;box-shadow:none;color:#363636}.button.is-dark{background-color:#363636;border-color:transparent;color:#f5f5f5}.button.is-dark.is-hovered,.button.is-dark:hover{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.button.is-dark.is-focused,.button.is-dark:focus{border-color:transparent;color:#f5f5f5}.button.is-dark.is-focused:not(:active),.button.is-dark:focus:not(:active){box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.button.is-dark.is-active,.button.is-dark:active{background-color:#292929;border-color:transparent;color:#f5f5f5}.button.is-dark[disabled]{background-color:#363636;border-color:transparent;box-shadow:none}.button.is-dark.is-inverted{background-color:#f5f5f5;color:#363636}.button.is-dark.is-inverted:hover{background-color:#e8e8e8}.button.is-dark.is-inverted[disabled]{background-color:#f5f5f5;border-color:transparent;box-shadow:none;color:#363636}.button.is-dark.is-loading:after{border-color:transparent transparent #f5f5f5 #f5f5f5!important}.button.is-dark.is-outlined{background-color:transparent;border-color:#363636;color:#363636}.button.is-dark.is-outlined:focus,.button.is-dark.is-outlined:hover{background-color:#363636;border-color:#363636;color:#f5f5f5}.button.is-dark.is-outlined.is-loading:after{border-color:transparent transparent #363636 #363636!important}.button.is-dark.is-outlined[disabled]{background-color:transparent;border-color:#363636;box-shadow:none;color:#363636}.button.is-dark.is-inverted.is-outlined{background-color:transparent;border-color:#f5f5f5;color:#f5f5f5}.button.is-dark.is-inverted.is-outlined:focus,.button.is-dark.is-inverted.is-outlined:hover{background-color:#f5f5f5;color:#363636}.button.is-dark.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#f5f5f5;box-shadow:none;color:#f5f5f5}.button.is-primary{background-color:#00d1b2;border-color:transparent;color:#fff}.button.is-primary.is-hovered,.button.is-primary:hover{background-color:#00c4a7;border-color:transparent;color:#fff}.button.is-primary.is-focused,.button.is-primary:focus{border-color:transparent;color:#fff}.button.is-primary.is-focused:not(:active),.button.is-primary:focus:not(:active){box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.button.is-primary.is-active,.button.is-primary:active{background-color:#00b89c;border-color:transparent;color:#fff}.button.is-primary[disabled]{background-color:#00d1b2;border-color:transparent;box-shadow:none}.button.is-primary.is-inverted{background-color:#fff;color:#00d1b2}.button.is-primary.is-inverted:hover{background-color:#f2f2f2}.button.is-primary.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#00d1b2}.button.is-primary.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-primary.is-outlined{background-color:transparent;border-color:#00d1b2;color:#00d1b2}.button.is-primary.is-outlined:focus,.button.is-primary.is-outlined:hover{background-color:#00d1b2;border-color:#00d1b2;color:#fff}.button.is-primary.is-outlined.is-loading:after{border-color:transparent transparent #00d1b2 #00d1b2!important}.button.is-primary.is-outlined[disabled]{background-color:transparent;border-color:#00d1b2;box-shadow:none;color:#00d1b2}.button.is-primary.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-primary.is-inverted.is-outlined:focus,.button.is-primary.is-inverted.is-outlined:hover{background-color:#fff;color:#00d1b2}.button.is-primary.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-link{background-color:#3273dc;border-color:transparent;color:#fff}.button.is-link.is-hovered,.button.is-link:hover{background-color:#276cda;border-color:transparent;color:#fff}.button.is-link.is-focused,.button.is-link:focus{border-color:transparent;color:#fff}.button.is-link.is-focused:not(:active),.button.is-link:focus:not(:active){box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.button.is-link.is-active,.button.is-link:active{background-color:#2366d1;border-color:transparent;color:#fff}.button.is-link[disabled]{background-color:#3273dc;border-color:transparent;box-shadow:none}.button.is-link.is-inverted{background-color:#fff;color:#3273dc}.button.is-link.is-inverted:hover{background-color:#f2f2f2}.button.is-link.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#3273dc}.button.is-link.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-link.is-outlined{background-color:transparent;border-color:#3273dc;color:#3273dc}.button.is-link.is-outlined:focus,.button.is-link.is-outlined:hover{background-color:#3273dc;border-color:#3273dc;color:#fff}.button.is-link.is-outlined.is-loading:after{border-color:transparent transparent #3273dc #3273dc!important}.button.is-link.is-outlined[disabled]{background-color:transparent;border-color:#3273dc;box-shadow:none;color:#3273dc}.button.is-link.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-link.is-inverted.is-outlined:focus,.button.is-link.is-inverted.is-outlined:hover{background-color:#fff;color:#3273dc}.button.is-link.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-info{background-color:#209cee;border-color:transparent;color:#fff}.button.is-info.is-hovered,.button.is-info:hover{background-color:#1496ed;border-color:transparent;color:#fff}.button.is-info.is-focused,.button.is-info:focus{border-color:transparent;color:#fff}.button.is-info.is-focused:not(:active),.button.is-info:focus:not(:active){box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.button.is-info.is-active,.button.is-info:active{background-color:#118fe4;border-color:transparent;color:#fff}.button.is-info[disabled]{background-color:#209cee;border-color:transparent;box-shadow:none}.button.is-info.is-inverted{background-color:#fff;color:#209cee}.button.is-info.is-inverted:hover{background-color:#f2f2f2}.button.is-info.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#209cee}.button.is-info.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-info.is-outlined{background-color:transparent;border-color:#209cee;color:#209cee}.button.is-info.is-outlined:focus,.button.is-info.is-outlined:hover{background-color:#209cee;border-color:#209cee;color:#fff}.button.is-info.is-outlined.is-loading:after{border-color:transparent transparent #209cee #209cee!important}.button.is-info.is-outlined[disabled]{background-color:transparent;border-color:#209cee;box-shadow:none;color:#209cee}.button.is-info.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-info.is-inverted.is-outlined:focus,.button.is-info.is-inverted.is-outlined:hover{background-color:#fff;color:#209cee}.button.is-info.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-success{background-color:#23d160;border-color:transparent;color:#fff}.button.is-success.is-hovered,.button.is-success:hover{background-color:#22c65b;border-color:transparent;color:#fff}.button.is-success.is-focused,.button.is-success:focus{border-color:transparent;color:#fff}.button.is-success.is-focused:not(:active),.button.is-success:focus:not(:active){box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.button.is-success.is-active,.button.is-success:active{background-color:#20bc56;border-color:transparent;color:#fff}.button.is-success[disabled]{background-color:#23d160;border-color:transparent;box-shadow:none}.button.is-success.is-inverted{background-color:#fff;color:#23d160}.button.is-success.is-inverted:hover{background-color:#f2f2f2}.button.is-success.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#23d160}.button.is-success.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-success.is-outlined{background-color:transparent;border-color:#23d160;color:#23d160}.button.is-success.is-outlined:focus,.button.is-success.is-outlined:hover{background-color:#23d160;border-color:#23d160;color:#fff}.button.is-success.is-outlined.is-loading:after{border-color:transparent transparent #23d160 #23d160!important}.button.is-success.is-outlined[disabled]{background-color:transparent;border-color:#23d160;box-shadow:none;color:#23d160}.button.is-success.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-success.is-inverted.is-outlined:focus,.button.is-success.is-inverted.is-outlined:hover{background-color:#fff;color:#23d160}.button.is-success.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-warning{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-hovered,.button.is-warning:hover{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-focused,.button.is-warning:focus{border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-focused:not(:active),.button.is-warning:focus:not(:active){box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.button.is-warning.is-active,.button.is-warning:active{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning[disabled]{background-color:#ffdd57;border-color:transparent;box-shadow:none}.button.is-warning.is-inverted{color:#ffdd57}.button.is-warning.is-inverted,.button.is-warning.is-inverted:hover{background-color:rgba(0,0,0,.7)}.button.is-warning.is-inverted[disabled]{background-color:rgba(0,0,0,.7);border-color:transparent;box-shadow:none;color:#ffdd57}.button.is-warning.is-loading:after{border-color:transparent transparent rgba(0,0,0,.7) rgba(0,0,0,.7)!important}.button.is-warning.is-outlined{background-color:transparent;border-color:#ffdd57;color:#ffdd57}.button.is-warning.is-outlined:focus,.button.is-warning.is-outlined:hover{background-color:#ffdd57;border-color:#ffdd57;color:rgba(0,0,0,.7)}.button.is-warning.is-outlined.is-loading:after{border-color:transparent transparent #ffdd57 #ffdd57!important}.button.is-warning.is-outlined[disabled]{background-color:transparent;border-color:#ffdd57;box-shadow:none;color:#ffdd57}.button.is-warning.is-inverted.is-outlined{background-color:transparent;border-color:rgba(0,0,0,.7);color:rgba(0,0,0,.7)}.button.is-warning.is-inverted.is-outlined:focus,.button.is-warning.is-inverted.is-outlined:hover{background-color:rgba(0,0,0,.7);color:#ffdd57}.button.is-warning.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:rgba(0,0,0,.7);box-shadow:none;color:rgba(0,0,0,.7)}.button.is-danger{background-color:#ff3860;border-color:transparent;color:#fff}.button.is-danger.is-hovered,.button.is-danger:hover{background-color:#ff2b56;border-color:transparent;color:#fff}.button.is-danger.is-focused,.button.is-danger:focus{border-color:transparent;color:#fff}.button.is-danger.is-focused:not(:active),.button.is-danger:focus:not(:active){box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.button.is-danger.is-active,.button.is-danger:active{background-color:#ff1f4b;border-color:transparent;color:#fff}.button.is-danger[disabled]{background-color:#ff3860;border-color:transparent;box-shadow:none}.button.is-danger.is-inverted{background-color:#fff;color:#ff3860}.button.is-danger.is-inverted:hover{background-color:#f2f2f2}.button.is-danger.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#ff3860}.button.is-danger.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-danger.is-outlined{background-color:transparent;border-color:#ff3860;color:#ff3860}.button.is-danger.is-outlined:focus,.button.is-danger.is-outlined:hover{background-color:#ff3860;border-color:#ff3860;color:#fff}.button.is-danger.is-outlined.is-loading:after{border-color:transparent transparent #ff3860 #ff3860!important}.button.is-danger.is-outlined[disabled]{background-color:transparent;border-color:#ff3860;box-shadow:none;color:#ff3860}.button.is-danger.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-danger.is-inverted.is-outlined:focus,.button.is-danger.is-inverted.is-outlined:hover{background-color:#fff;color:#ff3860}.button.is-danger.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-small{border-radius:2px;font-size:.75rem}.button.is-medium{font-size:1.25rem}.button.is-large{font-size:1.5rem}.button[disabled]{background-color:#fff;border-color:#dbdbdb;box-shadow:none;opacity:.5}.button.is-fullwidth{display:flex;width:100%}.button.is-loading{color:transparent!important;pointer-events:none}.button.is-loading:after{position:absolute;left:calc(50% - 0.5em);top:calc(50% - 0.5em);position:absolute!important}.button.is-static{background-color:#f5f5f5;border-color:#dbdbdb;color:#7a7a7a;box-shadow:none;pointer-events:none}.button.is-rounded{border-radius:290486px;padding-left:1em;padding-right:1em}.buttons{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.buttons .button{margin-bottom:.5rem}.buttons .button:not(:last-child){margin-right:.5rem}.buttons:last-child{margin-bottom:-.5rem}.buttons:not(:last-child){margin-bottom:1rem}.buttons.has-addons .button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.buttons.has-addons .button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.buttons.has-addons .button:last-child{margin-right:0}.buttons.has-addons .button.is-hovered,.buttons.has-addons .button:hover{z-index:2}.buttons.has-addons .button.is-active,.buttons.has-addons .button.is-focused,.buttons.has-addons .button.is-selected,.buttons.has-addons .button:active,.buttons.has-addons .button:focus{z-index:3}.buttons.has-addons .button.is-active:hover,.buttons.has-addons .button.is-focused:hover,.buttons.has-addons .button.is-selected:hover,.buttons.has-addons .button:active:hover,.buttons.has-addons .button:focus:hover{z-index:4}.buttons.has-addons .button.is-expanded{flex-grow:1}.buttons.is-centered{justify-content:center}.buttons.is-right{justify-content:flex-end}.container{margin:0 auto;position:relative}@media screen and (min-width:1088px){.container{max-width:960px;width:960px}.container.is-fluid{margin-left:64px;margin-right:64px;max-width:none;width:auto}}@media screen and (max-width:1279px){.container.is-widescreen{max-width:1152px;width:auto}}@media screen and (max-width:1471px){.container.is-fullhd{max-width:1344px;width:auto}}@media screen and (min-width:1280px){.container{max-width:1152px;width:1152px}}@media screen and (min-width:1472px){.container{max-width:1344px;width:1344px}}.content li+li{margin-top:.25em}.content blockquote:not(:last-child),.content dl:not(:last-child),.content ol:not(:last-child),.content p:not(:last-child),.content pre:not(:last-child),.content table:not(:last-child),.content ul:not(:last-child){margin-bottom:1em}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6{color:#363636;font-weight:600;line-height:1.125}.content h1{font-size:2em;margin-bottom:.5em}.content h1:not(:first-child){margin-top:1em}.content h2{font-size:1.75em;margin-bottom:.5714em}.content h2:not(:first-child){margin-top:1.1428em}.content h3{font-size:1.5em;margin-bottom:.6666em}.content h3:not(:first-child){margin-top:1.3333em}.content h4{font-size:1.25em;margin-bottom:.8em}.content h5{font-size:1.125em;margin-bottom:.8888em}.content h6{font-size:1em;margin-bottom:1em}.content blockquote{background-color:#f5f5f5;border-left:5px solid #dbdbdb;padding:1.25em 1.5em}.content ol{list-style:decimal outside}.content ol,.content ul{margin-left:2em;margin-top:1em}.content ul{list-style:disc outside}.content ul ul{list-style-type:circle;margin-top:.5em}.content ul ul ul{list-style-type:square}.content dd{margin-left:2em}.content figure{margin-left:2em;margin-right:2em;text-align:center}.content figure:not(:first-child){margin-top:2em}.content figure:not(:last-child){margin-bottom:2em}.content figure img{display:inline-block}.content figure figcaption{font-style:italic}.content pre{-webkit-overflow-scrolling:touch;overflow-x:auto;padding:1.25em 1.5em;white-space:pre;word-wrap:normal}.content sub,.content sup{font-size:75%}.content table{width:100%}.content table td,.content table th{border:1px solid #dbdbdb;border-width:0 0 1px;padding:.5em .75em;vertical-align:top}.content table th{color:#363636;text-align:left}.content table thead td,.content table thead th{border-width:0 0 2px;color:#363636}.content table tfoot td,.content table tfoot th{border-width:2px 0 0;color:#363636}.content table tbody tr:last-child td,.content table tbody tr:last-child th{border-bottom-width:0}.content.is-small{font-size:.75rem}.content.is-medium{font-size:1.25rem}.content.is-large{font-size:1.5rem}.input,.taginput .taginput-container.is-focusable,.textarea{background-color:#fff;border-color:#dbdbdb;color:#363636;box-shadow:inset 0 1px 2px hsla(0,0%,4%,.1);max-width:100%;width:100%}.input::-moz-placeholder,.taginput .taginput-container.is-focusable::-moz-placeholder,.textarea::-moz-placeholder{color:rgba(54,54,54,.3)}.input::-webkit-input-placeholder,.taginput .taginput-container.is-focusable::-webkit-input-placeholder,.textarea::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.input:-moz-placeholder,.taginput .taginput-container.is-focusable:-moz-placeholder,.textarea:-moz-placeholder{color:rgba(54,54,54,.3)}.input:-ms-input-placeholder,.taginput .taginput-container.is-focusable:-ms-input-placeholder,.textarea:-ms-input-placeholder{color:rgba(54,54,54,.3)}.input.is-hovered,.input:hover,.taginput .is-hovered.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:hover,.textarea.is-hovered,.textarea:hover{border-color:#b5b5b5}.input.is-active,.input.is-focused,.input:active,.input:focus,.taginput .is-active.taginput-container.is-focusable,.taginput .is-focused.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:active,.taginput .taginput-container.is-focusable:focus,.textarea.is-active,.textarea.is-focused,.textarea:active,.textarea:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.input[disabled],.taginput [disabled].taginput-container.is-focusable,.textarea[disabled]{background-color:#f5f5f5;border-color:#f5f5f5;box-shadow:none;color:#7a7a7a}.input[disabled]::-moz-placeholder,.taginput [disabled].taginput-container.is-focusable::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]::-webkit-input-placeholder,.taginput [disabled].taginput-container.is-focusable::-webkit-input-placeholder,.textarea[disabled]::-webkit-input-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]:-moz-placeholder,.taginput [disabled].taginput-container.is-focusable:-moz-placeholder,.textarea[disabled]:-moz-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]:-ms-input-placeholder,.taginput [disabled].taginput-container.is-focusable:-ms-input-placeholder,.textarea[disabled]:-ms-input-placeholder{color:hsla(0,0%,48%,.3)}.input[readonly],.taginput [readonly].taginput-container.is-focusable,.textarea[readonly]{box-shadow:none}.input.is-white,.taginput .is-white.taginput-container.is-focusable,.textarea.is-white{border-color:#fff}.input.is-white.is-active,.input.is-white.is-focused,.input.is-white:active,.input.is-white:focus,.taginput .is-white.is-active.taginput-container.is-focusable,.taginput .is-white.is-focused.taginput-container.is-focusable,.taginput .is-white.taginput-container.is-focusable:active,.taginput .is-white.taginput-container.is-focusable:focus,.textarea.is-white.is-active,.textarea.is-white.is-focused,.textarea.is-white:active,.textarea.is-white:focus{box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.input.is-black,.taginput .is-black.taginput-container.is-focusable,.textarea.is-black{border-color:#0a0a0a}.input.is-black.is-active,.input.is-black.is-focused,.input.is-black:active,.input.is-black:focus,.taginput .is-black.is-active.taginput-container.is-focusable,.taginput .is-black.is-focused.taginput-container.is-focusable,.taginput .is-black.taginput-container.is-focusable:active,.taginput .is-black.taginput-container.is-focusable:focus,.textarea.is-black.is-active,.textarea.is-black.is-focused,.textarea.is-black:active,.textarea.is-black:focus{box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.input.is-light,.taginput .is-light.taginput-container.is-focusable,.textarea.is-light{border-color:#f5f5f5}.input.is-light.is-active,.input.is-light.is-focused,.input.is-light:active,.input.is-light:focus,.taginput .is-light.is-active.taginput-container.is-focusable,.taginput .is-light.is-focused.taginput-container.is-focusable,.taginput .is-light.taginput-container.is-focusable:active,.taginput .is-light.taginput-container.is-focusable:focus,.textarea.is-light.is-active,.textarea.is-light.is-focused,.textarea.is-light:active,.textarea.is-light:focus{box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.input.is-dark,.taginput .is-dark.taginput-container.is-focusable,.textarea.is-dark{border-color:#363636}.input.is-dark.is-active,.input.is-dark.is-focused,.input.is-dark:active,.input.is-dark:focus,.taginput .is-dark.is-active.taginput-container.is-focusable,.taginput .is-dark.is-focused.taginput-container.is-focusable,.taginput .is-dark.taginput-container.is-focusable:active,.taginput .is-dark.taginput-container.is-focusable:focus,.textarea.is-dark.is-active,.textarea.is-dark.is-focused,.textarea.is-dark:active,.textarea.is-dark:focus{box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.input.is-primary,.taginput .is-primary.taginput-container.is-focusable,.textarea.is-primary{border-color:#00d1b2}.input.is-primary.is-active,.input.is-primary.is-focused,.input.is-primary:active,.input.is-primary:focus,.taginput .is-primary.is-active.taginput-container.is-focusable,.taginput .is-primary.is-focused.taginput-container.is-focusable,.taginput .is-primary.taginput-container.is-focusable:active,.taginput .is-primary.taginput-container.is-focusable:focus,.textarea.is-primary.is-active,.textarea.is-primary.is-focused,.textarea.is-primary:active,.textarea.is-primary:focus{box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.input.is-link,.taginput .is-link.taginput-container.is-focusable,.textarea.is-link{border-color:#3273dc}.input.is-link.is-active,.input.is-link.is-focused,.input.is-link:active,.input.is-link:focus,.taginput .is-link.is-active.taginput-container.is-focusable,.taginput .is-link.is-focused.taginput-container.is-focusable,.taginput .is-link.taginput-container.is-focusable:active,.taginput .is-link.taginput-container.is-focusable:focus,.textarea.is-link.is-active,.textarea.is-link.is-focused,.textarea.is-link:active,.textarea.is-link:focus{box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.input.is-info,.taginput .is-info.taginput-container.is-focusable,.textarea.is-info{border-color:#209cee}.input.is-info.is-active,.input.is-info.is-focused,.input.is-info:active,.input.is-info:focus,.taginput .is-info.is-active.taginput-container.is-focusable,.taginput .is-info.is-focused.taginput-container.is-focusable,.taginput .is-info.taginput-container.is-focusable:active,.taginput .is-info.taginput-container.is-focusable:focus,.textarea.is-info.is-active,.textarea.is-info.is-focused,.textarea.is-info:active,.textarea.is-info:focus{box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.input.is-success,.taginput .is-success.taginput-container.is-focusable,.textarea.is-success{border-color:#23d160}.input.is-success.is-active,.input.is-success.is-focused,.input.is-success:active,.input.is-success:focus,.taginput .is-success.is-active.taginput-container.is-focusable,.taginput .is-success.is-focused.taginput-container.is-focusable,.taginput .is-success.taginput-container.is-focusable:active,.taginput .is-success.taginput-container.is-focusable:focus,.textarea.is-success.is-active,.textarea.is-success.is-focused,.textarea.is-success:active,.textarea.is-success:focus{box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.input.is-warning,.taginput .is-warning.taginput-container.is-focusable,.textarea.is-warning{border-color:#ffdd57}.input.is-warning.is-active,.input.is-warning.is-focused,.input.is-warning:active,.input.is-warning:focus,.taginput .is-warning.is-active.taginput-container.is-focusable,.taginput .is-warning.is-focused.taginput-container.is-focusable,.taginput .is-warning.taginput-container.is-focusable:active,.taginput .is-warning.taginput-container.is-focusable:focus,.textarea.is-warning.is-active,.textarea.is-warning.is-focused,.textarea.is-warning:active,.textarea.is-warning:focus{box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.input.is-danger,.taginput .is-danger.taginput-container.is-focusable,.textarea.is-danger{border-color:#ff3860}.input.is-danger.is-active,.input.is-danger.is-focused,.input.is-danger:active,.input.is-danger:focus,.taginput .is-danger.is-active.taginput-container.is-focusable,.taginput .is-danger.is-focused.taginput-container.is-focusable,.taginput .is-danger.taginput-container.is-focusable:active,.taginput .is-danger.taginput-container.is-focusable:focus,.textarea.is-danger.is-active,.textarea.is-danger.is-focused,.textarea.is-danger:active,.textarea.is-danger:focus{box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.input.is-small,.taginput .is-small.taginput-container.is-focusable,.textarea.is-small{border-radius:2px;font-size:.75rem}.input.is-medium,.taginput .is-medium.taginput-container.is-focusable,.textarea.is-medium{font-size:1.25rem}.input.is-large,.taginput .is-large.taginput-container.is-focusable,.textarea.is-large{font-size:1.5rem}.input.is-fullwidth,.taginput .is-fullwidth.taginput-container.is-focusable,.textarea.is-fullwidth{display:block;width:100%}.input.is-inline,.taginput .is-inline.taginput-container.is-focusable,.textarea.is-inline{display:inline;width:auto}.input.is-rounded,.taginput .is-rounded.taginput-container.is-focusable{border-radius:290486px;padding-left:1em;padding-right:1em}.input.is-static,.taginput .is-static.taginput-container.is-focusable{background-color:transparent;border-color:transparent;box-shadow:none;padding-left:0;padding-right:0}.textarea{display:block;max-width:100%;min-width:100%;padding:.625em;resize:vertical}.textarea:not([rows]){max-height:600px;min-height:120px}.textarea[rows]{height:auto}.textarea.has-fixed-size{resize:none}.checkbox,.radio{cursor:pointer;display:inline-block;line-height:1.25;position:relative}.checkbox input,.radio input{cursor:pointer}.checkbox:hover,.radio:hover{color:#363636}.checkbox[disabled],.radio[disabled]{color:#7a7a7a;cursor:not-allowed}.radio+.radio{margin-left:.5em}.select{display:inline-block;max-width:100%;position:relative;vertical-align:top}.select:not(.is-multiple){height:2.25em}.select:not(.is-multiple):not(.is-loading):after{border-color:#3273dc;right:1.125em;z-index:4}.select.is-rounded select{border-radius:290486px;padding-left:1em}.select select{background-color:#fff;border-color:#dbdbdb;color:#363636;cursor:pointer;display:block;font-size:1em;max-width:100%;outline:none}.select select::-moz-placeholder{color:rgba(54,54,54,.3)}.select select::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.select select:-moz-placeholder{color:rgba(54,54,54,.3)}.select select:-ms-input-placeholder{color:rgba(54,54,54,.3)}.select select.is-hovered,.select select:hover{border-color:#b5b5b5}.select select.is-active,.select select.is-focused,.select select:active,.select select:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.select select[disabled]{background-color:#f5f5f5;border-color:#f5f5f5;box-shadow:none;color:#7a7a7a}.select select[disabled]::-moz-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]::-webkit-input-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]:-moz-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]:-ms-input-placeholder{color:hsla(0,0%,48%,.3)}.select select::-ms-expand{display:none}.select select[disabled]:hover{border-color:#f5f5f5}.select select:not([multiple]){padding-right:2.5em}.select select[multiple]{height:auto;padding:0}.select select[multiple] option{padding:.5em 1em}.select:not(.is-multiple):not(.is-loading):hover:after{border-color:#363636}.select.is-white:not(:hover):after,.select.is-white select{border-color:#fff}.select.is-white select.is-hovered,.select.is-white select:hover{border-color:#f2f2f2}.select.is-white select.is-active,.select.is-white select.is-focused,.select.is-white select:active,.select.is-white select:focus{box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.select.is-black:not(:hover):after,.select.is-black select{border-color:#0a0a0a}.select.is-black select.is-hovered,.select.is-black select:hover{border-color:#000}.select.is-black select.is-active,.select.is-black select.is-focused,.select.is-black select:active,.select.is-black select:focus{box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.select.is-light:not(:hover):after,.select.is-light select{border-color:#f5f5f5}.select.is-light select.is-hovered,.select.is-light select:hover{border-color:#e8e8e8}.select.is-light select.is-active,.select.is-light select.is-focused,.select.is-light select:active,.select.is-light select:focus{box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.select.is-dark:not(:hover):after,.select.is-dark select{border-color:#363636}.select.is-dark select.is-hovered,.select.is-dark select:hover{border-color:#292929}.select.is-dark select.is-active,.select.is-dark select.is-focused,.select.is-dark select:active,.select.is-dark select:focus{box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.select.is-primary:not(:hover):after,.select.is-primary select{border-color:#00d1b2}.select.is-primary select.is-hovered,.select.is-primary select:hover{border-color:#00b89c}.select.is-primary select.is-active,.select.is-primary select.is-focused,.select.is-primary select:active,.select.is-primary select:focus{box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.select.is-link:not(:hover):after,.select.is-link select{border-color:#3273dc}.select.is-link select.is-hovered,.select.is-link select:hover{border-color:#2366d1}.select.is-link select.is-active,.select.is-link select.is-focused,.select.is-link select:active,.select.is-link select:focus{box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.select.is-info:not(:hover):after,.select.is-info select{border-color:#209cee}.select.is-info select.is-hovered,.select.is-info select:hover{border-color:#118fe4}.select.is-info select.is-active,.select.is-info select.is-focused,.select.is-info select:active,.select.is-info select:focus{box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.select.is-success:not(:hover):after,.select.is-success select{border-color:#23d160}.select.is-success select.is-hovered,.select.is-success select:hover{border-color:#20bc56}.select.is-success select.is-active,.select.is-success select.is-focused,.select.is-success select:active,.select.is-success select:focus{box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.select.is-warning:not(:hover):after,.select.is-warning select{border-color:#ffdd57}.select.is-warning select.is-hovered,.select.is-warning select:hover{border-color:#ffd83d}.select.is-warning select.is-active,.select.is-warning select.is-focused,.select.is-warning select:active,.select.is-warning select:focus{box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.select.is-danger:not(:hover):after,.select.is-danger select{border-color:#ff3860}.select.is-danger select.is-hovered,.select.is-danger select:hover{border-color:#ff1f4b}.select.is-danger select.is-active,.select.is-danger select.is-focused,.select.is-danger select:active,.select.is-danger select:focus{box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.select.is-small{border-radius:2px;font-size:.75rem}.select.is-medium{font-size:1.25rem}.select.is-large{font-size:1.5rem}.select.is-disabled:after{border-color:#7a7a7a}.select.is-fullwidth,.select.is-fullwidth select{width:100%}.select.is-loading:after{margin-top:0;position:absolute;right:.625em;top:.625em;transform:none}.select.is-loading.is-small:after{font-size:.75rem}.select.is-loading.is-medium:after{font-size:1.25rem}.select.is-loading.is-large:after{font-size:1.5rem}.file{align-items:stretch;display:flex;justify-content:flex-start;position:relative}.file.is-white .file-cta{background-color:#fff;border-color:transparent;color:#0a0a0a}.file.is-white.is-hovered .file-cta,.file.is-white:hover .file-cta{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.file.is-white.is-focused .file-cta,.file.is-white:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,100%,.25);color:#0a0a0a}.file.is-white.is-active .file-cta,.file.is-white:active .file-cta{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.file.is-black .file-cta{background-color:#0a0a0a;border-color:transparent;color:#fff}.file.is-black.is-hovered .file-cta,.file.is-black:hover .file-cta{background-color:#040404;border-color:transparent;color:#fff}.file.is-black.is-focused .file-cta,.file.is-black:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,4%,.25);color:#fff}.file.is-black.is-active .file-cta,.file.is-black:active .file-cta{background-color:#000;border-color:transparent;color:#fff}.file.is-light .file-cta{background-color:#f5f5f5;border-color:transparent;color:#363636}.file.is-light.is-hovered .file-cta,.file.is-light:hover .file-cta{background-color:#eee;border-color:transparent;color:#363636}.file.is-light.is-focused .file-cta,.file.is-light:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,96%,.25);color:#363636}.file.is-light.is-active .file-cta,.file.is-light:active .file-cta{background-color:#e8e8e8;border-color:transparent;color:#363636}.file.is-dark .file-cta{background-color:#363636;border-color:transparent;color:#f5f5f5}.file.is-dark.is-hovered .file-cta,.file.is-dark:hover .file-cta{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.file.is-dark.is-focused .file-cta,.file.is-dark:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(54,54,54,.25);color:#f5f5f5}.file.is-dark.is-active .file-cta,.file.is-dark:active .file-cta{background-color:#292929;border-color:transparent;color:#f5f5f5}.file.is-primary .file-cta{background-color:#00d1b2;border-color:transparent;color:#fff}.file.is-primary.is-hovered .file-cta,.file.is-primary:hover .file-cta{background-color:#00c4a7;border-color:transparent;color:#fff}.file.is-primary.is-focused .file-cta,.file.is-primary:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(0,209,178,.25);color:#fff}.file.is-primary.is-active .file-cta,.file.is-primary:active .file-cta{background-color:#00b89c;border-color:transparent;color:#fff}.file.is-link .file-cta{background-color:#3273dc;border-color:transparent;color:#fff}.file.is-link.is-hovered .file-cta,.file.is-link:hover .file-cta{background-color:#276cda;border-color:transparent;color:#fff}.file.is-link.is-focused .file-cta,.file.is-link:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(50,115,220,.25);color:#fff}.file.is-link.is-active .file-cta,.file.is-link:active .file-cta{background-color:#2366d1;border-color:transparent;color:#fff}.file.is-info .file-cta{background-color:#209cee;border-color:transparent;color:#fff}.file.is-info.is-hovered .file-cta,.file.is-info:hover .file-cta{background-color:#1496ed;border-color:transparent;color:#fff}.file.is-info.is-focused .file-cta,.file.is-info:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(32,156,238,.25);color:#fff}.file.is-info.is-active .file-cta,.file.is-info:active .file-cta{background-color:#118fe4;border-color:transparent;color:#fff}.file.is-success .file-cta{background-color:#23d160;border-color:transparent;color:#fff}.file.is-success.is-hovered .file-cta,.file.is-success:hover .file-cta{background-color:#22c65b;border-color:transparent;color:#fff}.file.is-success.is-focused .file-cta,.file.is-success:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(35,209,96,.25);color:#fff}.file.is-success.is-active .file-cta,.file.is-success:active .file-cta{background-color:#20bc56;border-color:transparent;color:#fff}.file.is-warning .file-cta{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-hovered .file-cta,.file.is-warning:hover .file-cta{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-focused .file-cta,.file.is-warning:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(255,221,87,.25);color:rgba(0,0,0,.7)}.file.is-warning.is-active .file-cta,.file.is-warning:active .file-cta{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-danger .file-cta{background-color:#ff3860;border-color:transparent;color:#fff}.file.is-danger.is-hovered .file-cta,.file.is-danger:hover .file-cta{background-color:#ff2b56;border-color:transparent;color:#fff}.file.is-danger.is-focused .file-cta,.file.is-danger:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(255,56,96,.25);color:#fff}.file.is-danger.is-active .file-cta,.file.is-danger:active .file-cta{background-color:#ff1f4b;border-color:transparent;color:#fff}.file.is-small{font-size:.75rem}.file.is-medium{font-size:1.25rem}.file.is-medium .file-icon .fa{font-size:21px}.file.is-large{font-size:1.5rem}.file.is-large .file-icon .fa{font-size:28px}.file.has-name .file-cta{border-bottom-right-radius:0;border-top-right-radius:0}.file.has-name .file-name{border-bottom-left-radius:0;border-top-left-radius:0}.file.has-name.is-empty .file-cta{border-radius:4px}.file.has-name.is-empty .file-name{display:none}.file.is-boxed .file-label{flex-direction:column}.file.is-boxed .file-cta{flex-direction:column;height:auto;padding:1em 3em}.file.is-boxed .file-name{border-width:0 1px 1px}.file.is-boxed .file-icon{height:1.5em;width:1.5em}.file.is-boxed .file-icon .fa{font-size:21px}.file.is-boxed.is-small .file-icon .fa{font-size:14px}.file.is-boxed.is-medium .file-icon .fa{font-size:28px}.file.is-boxed.is-large .file-icon .fa{font-size:35px}.file.is-boxed.has-name .file-cta{border-radius:4px 4px 0 0}.file.is-boxed.has-name .file-name{border-radius:0 0 4px 4px;border-width:0 1px 1px}.file.is-centered{justify-content:center}.file.is-fullwidth .file-label{width:100%}.file.is-fullwidth .file-name{flex-grow:1;max-width:none}.file.is-right{justify-content:flex-end}.file.is-right .file-cta{border-radius:0 4px 4px 0}.file.is-right .file-name{border-radius:4px 0 0 4px;border-width:1px 0 1px 1px;order:-1}.file-label{align-items:stretch;display:flex;cursor:pointer;justify-content:flex-start;overflow:hidden;position:relative}.file-label:hover .file-cta{background-color:#eee;color:#363636}.file-label:hover .file-name{border-color:#d5d5d5}.file-label:active .file-cta{background-color:#e8e8e8;color:#363636}.file-label:active .file-name{border-color:#cfcfcf}.file-input{height:.01em;left:0;outline:none;position:absolute;top:0;width:.01em}.file-cta,.file-name{border-color:#dbdbdb;border-radius:4px;font-size:1em;padding-left:1em;padding-right:1em;white-space:nowrap}.file-cta{background-color:#f5f5f5;color:#4a4a4a}.file-name{border-color:#dbdbdb;border-style:solid;border-width:1px 1px 1px 0;display:block;max-width:16em;overflow:hidden;text-align:left;text-overflow:ellipsis}.file-icon{align-items:center;display:flex;height:1em;justify-content:center;margin-right:.5em;width:1em}.file-icon .fa{font-size:14px}.label{color:#363636;display:block;font-size:1rem;font-weight:700}.label:not(:last-child){margin-bottom:.5em}.label.is-small{font-size:.75rem}.label.is-medium{font-size:1.25rem}.label.is-large{font-size:1.5rem}.help{display:block;font-size:.75rem;margin-top:.25rem}.help.is-white{color:#fff}.help.is-black{color:#0a0a0a}.help.is-light{color:#f5f5f5}.help.is-dark{color:#363636}.help.is-primary{color:#00d1b2}.help.is-link{color:#3273dc}.help.is-info{color:#209cee}.help.is-success{color:#23d160}.help.is-warning{color:#ffdd57}.help.is-danger{color:#ff3860}.field:not(:last-child){margin-bottom:.75rem}.field.has-addons{display:flex;justify-content:flex-start}.field.has-addons .control:not(:last-child){margin-right:-1px}.field.has-addons .control:not(:first-child):not(:last-child) .button,.field.has-addons .control:not(:first-child):not(:last-child) .input,.field.has-addons .control:not(:first-child):not(:last-child) .select select,.field.has-addons .control:not(:first-child):not(:last-child) .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:not(:first-child):not(:last-child) .taginput-container.is-focusable{border-radius:0}.field.has-addons .control:first-child .button,.field.has-addons .control:first-child .input,.field.has-addons .control:first-child .select select,.field.has-addons .control:first-child .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:first-child .taginput-container.is-focusable{border-bottom-right-radius:0;border-top-right-radius:0}.field.has-addons .control:last-child .button,.field.has-addons .control:last-child .input,.field.has-addons .control:last-child .select select,.field.has-addons .control:last-child .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:last-child .taginput-container.is-focusable{border-bottom-left-radius:0;border-top-left-radius:0}.field.has-addons .control .button.is-hovered,.field.has-addons .control .button:hover,.field.has-addons .control .input.is-hovered,.field.has-addons .control .input:hover,.field.has-addons .control .select select.is-hovered,.field.has-addons .control .select select:hover,.field.has-addons .control .taginput .is-hovered.taginput-container.is-focusable,.field.has-addons .control .taginput .taginput-container.is-focusable:hover,.taginput .field.has-addons .control .is-hovered.taginput-container.is-focusable,.taginput .field.has-addons .control .taginput-container.is-focusable:hover{z-index:2}.field.has-addons .control .button.is-active,.field.has-addons .control .button.is-focused,.field.has-addons .control .button:active,.field.has-addons .control .button:focus,.field.has-addons .control .input.is-active,.field.has-addons .control .input.is-focused,.field.has-addons .control .input:active,.field.has-addons .control .input:focus,.field.has-addons .control .select select.is-active,.field.has-addons .control .select select.is-focused,.field.has-addons .control .select select:active,.field.has-addons .control .select select:focus,.field.has-addons .control .taginput .is-active.taginput-container.is-focusable,.field.has-addons .control .taginput .is-focused.taginput-container.is-focusable,.field.has-addons .control .taginput .taginput-container.is-focusable:active,.field.has-addons .control .taginput .taginput-container.is-focusable:focus,.taginput .field.has-addons .control .is-active.taginput-container.is-focusable,.taginput .field.has-addons .control .is-focused.taginput-container.is-focusable,.taginput .field.has-addons .control .taginput-container.is-focusable:active,.taginput .field.has-addons .control .taginput-container.is-focusable:focus{z-index:3}.field.has-addons .control .button.is-active:hover,.field.has-addons .control .button.is-focused:hover,.field.has-addons .control .button:active:hover,.field.has-addons .control .button:focus:hover,.field.has-addons .control .input.is-active:hover,.field.has-addons .control .input.is-focused:hover,.field.has-addons .control .input:active:hover,.field.has-addons .control .input:focus:hover,.field.has-addons .control .select select.is-active:hover,.field.has-addons .control .select select.is-focused:hover,.field.has-addons .control .select select:active:hover,.field.has-addons .control .select select:focus:hover,.field.has-addons .control .taginput .is-active.taginput-container.is-focusable:hover,.field.has-addons .control .taginput .is-focused.taginput-container.is-focusable:hover,.field.has-addons .control .taginput .taginput-container.is-focusable:active:hover,.field.has-addons .control .taginput .taginput-container.is-focusable:focus:hover,.taginput .field.has-addons .control .is-active.taginput-container.is-focusable:hover,.taginput .field.has-addons .control .is-focused.taginput-container.is-focusable:hover,.taginput .field.has-addons .control .taginput-container.is-focusable:active:hover,.taginput .field.has-addons .control .taginput-container.is-focusable:focus:hover{z-index:4}.field.has-addons .control.is-expanded{flex-grow:1}.field.has-addons.has-addons-centered{justify-content:center}.field.has-addons.has-addons-right{justify-content:flex-end}.field.has-addons.has-addons-fullwidth .control{flex-grow:1;flex-shrink:0}.field.is-grouped{display:flex;justify-content:flex-start}.field.is-grouped>.control{flex-shrink:0}.field.is-grouped>.control:not(:last-child){margin-bottom:0;margin-right:.75rem}.field.is-grouped>.control.is-expanded{flex-grow:1;flex-shrink:1}.field.is-grouped.is-grouped-centered{justify-content:center}.field.is-grouped.is-grouped-right{justify-content:flex-end}.field.is-grouped.is-grouped-multiline{flex-wrap:wrap}.field.is-grouped.is-grouped-multiline>.control:last-child,.field.is-grouped.is-grouped-multiline>.control:not(:last-child){margin-bottom:.75rem}.field.is-grouped.is-grouped-multiline:last-child{margin-bottom:-.75rem}.field.is-grouped.is-grouped-multiline:not(:last-child){margin-bottom:0}@media print,screen and (min-width:769px){.field.is-horizontal{display:flex}}.field-label .label{font-size:inherit}@media screen and (max-width:768px){.field-label{margin-bottom:.5rem}}@media print,screen and (min-width:769px){.field-label{flex-basis:0;flex-grow:1;flex-shrink:0;margin-right:1.5rem;text-align:right}.field-label.is-small{font-size:.75rem;padding-top:.375em}.field-label.is-normal{padding-top:.375em}.field-label.is-medium{font-size:1.25rem;padding-top:.375em}.field-label.is-large{font-size:1.5rem;padding-top:.375em}}.field-body .field .field{margin-bottom:0}@media print,screen and (min-width:769px){.field-body{display:flex;flex-basis:0;flex-grow:5;flex-shrink:1}.field-body .field{margin-bottom:0}.field-body>.field{flex-shrink:1}.field-body>.field:not(.is-narrow){flex-grow:1}.field-body>.field:not(:last-child){margin-right:.75rem}}.control{font-size:1rem;position:relative;text-align:left}.control.has-icon .icon{color:#dbdbdb;height:2.25em;pointer-events:none;position:absolute;top:0;width:2.25em;z-index:4}.control.has-icon .input:focus+.icon,.control.has-icon .taginput .taginput-container.is-focusable:focus+.icon,.taginput .control.has-icon .taginput-container.is-focusable:focus+.icon{color:#7a7a7a}.control.has-icon .input.is-small+.icon,.control.has-icon .taginput .is-small.taginput-container.is-focusable+.icon,.taginput .control.has-icon .is-small.taginput-container.is-focusable+.icon{font-size:.75rem}.control.has-icon .input.is-medium+.icon,.control.has-icon .taginput .is-medium.taginput-container.is-focusable+.icon,.taginput .control.has-icon .is-medium.taginput-container.is-focusable+.icon{font-size:1.25rem}.control.has-icon .input.is-large+.icon,.control.has-icon .taginput .is-large.taginput-container.is-focusable+.icon,.taginput .control.has-icon .is-large.taginput-container.is-focusable+.icon{font-size:1.5rem}.control.has-icon:not(.has-icon-right) .icon{left:0}.control.has-icon:not(.has-icon-right) .input,.control.has-icon:not(.has-icon-right) .taginput .taginput-container.is-focusable,.taginput .control.has-icon:not(.has-icon-right) .taginput-container.is-focusable{padding-left:2.25em}.control.has-icon.has-icon-right .icon{right:0}.control.has-icon.has-icon-right .input,.control.has-icon.has-icon-right .taginput .taginput-container.is-focusable,.taginput .control.has-icon.has-icon-right .taginput-container.is-focusable{padding-right:2.25em}.control.has-icons-left .input:focus~.icon,.control.has-icons-left .select:focus~.icon,.control.has-icons-left .taginput .taginput-container.is-focusable:focus~.icon,.control.has-icons-right .input:focus~.icon,.control.has-icons-right .select:focus~.icon,.control.has-icons-right .taginput .taginput-container.is-focusable:focus~.icon,.taginput .control.has-icons-left .taginput-container.is-focusable:focus~.icon,.taginput .control.has-icons-right .taginput-container.is-focusable:focus~.icon{color:#7a7a7a}.control.has-icons-left .input.is-small~.icon,.control.has-icons-left .select.is-small~.icon,.control.has-icons-left .taginput .is-small.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-small~.icon,.control.has-icons-right .select.is-small~.icon,.control.has-icons-right .taginput .is-small.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-small.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-small.taginput-container.is-focusable~.icon{font-size:.75rem}.control.has-icons-left .input.is-medium~.icon,.control.has-icons-left .select.is-medium~.icon,.control.has-icons-left .taginput .is-medium.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-medium~.icon,.control.has-icons-right .select.is-medium~.icon,.control.has-icons-right .taginput .is-medium.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-medium.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-medium.taginput-container.is-focusable~.icon{font-size:1.25rem}.control.has-icons-left .input.is-large~.icon,.control.has-icons-left .select.is-large~.icon,.control.has-icons-left .taginput .is-large.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-large~.icon,.control.has-icons-right .select.is-large~.icon,.control.has-icons-right .taginput .is-large.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-large.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-large.taginput-container.is-focusable~.icon{font-size:1.5rem}.control.has-icons-left .icon,.control.has-icons-right .icon{color:#dbdbdb;height:2.25em;pointer-events:none;position:absolute;top:0;width:2.25em;z-index:4}.control.has-icons-left .input,.control.has-icons-left .select select,.control.has-icons-left .taginput .taginput-container.is-focusable,.taginput .control.has-icons-left .taginput-container.is-focusable{padding-left:2.25em}.control.has-icons-left .icon.is-left{left:0}.control.has-icons-right .input,.control.has-icons-right .select select,.control.has-icons-right .taginput .taginput-container.is-focusable,.taginput .control.has-icons-right .taginput-container.is-focusable{padding-right:2.25em}.control.has-icons-right .icon.is-right{right:0}.control.is-loading:after{position:absolute!important;right:.625em;top:.625em;z-index:4}.control.is-loading.is-small:after{font-size:.75rem}.control.is-loading.is-medium:after{font-size:1.25rem}.control.is-loading.is-large:after{font-size:1.5rem}.icon{align-items:center;display:inline-flex;justify-content:center;height:1.5rem;width:1.5rem}.icon.is-small{height:1rem;width:1rem}.icon.is-medium{height:2rem;width:2rem}.icon.is-large{height:3rem;width:3rem}.image{display:block;position:relative}.image img{display:block;height:auto;width:100%}.image img.is-rounded{border-radius:290486px}.image.is-1by1 img,.image.is-1by2 img,.image.is-1by3 img,.image.is-2by1 img,.image.is-2by3 img,.image.is-3by1 img,.image.is-3by2 img,.image.is-3by4 img,.image.is-3by5 img,.image.is-4by3 img,.image.is-4by5 img,.image.is-5by3 img,.image.is-5by4 img,.image.is-9by16 img,.image.is-16by9 img,.image.is-square img{height:100%;width:100%}.image.is-1by1,.image.is-square{padding-top:100%}.image.is-5by4{padding-top:80%}.image.is-4by3{padding-top:75%}.image.is-3by2{padding-top:66.6666%}.image.is-5by3{padding-top:60%}.image.is-16by9{padding-top:56.25%}.image.is-2by1{padding-top:50%}.image.is-3by1{padding-top:33.3333%}.image.is-4by5{padding-top:125%}.image.is-3by4{padding-top:133.3333%}.image.is-2by3{padding-top:150%}.image.is-3by5{padding-top:166.6666%}.image.is-9by16{padding-top:177.7777%}.image.is-1by2{padding-top:200%}.image.is-1by3{padding-top:300%}.image.is-16x16{height:16px;width:16px}.image.is-24x24{height:24px;width:24px}.image.is-32x32{height:32px;width:32px}.image.is-48x48{height:48px;width:48px}.image.is-64x64{height:64px;width:64px}.image.is-96x96{height:96px;width:96px}.image.is-128x128{height:128px;width:128px}.notification{background-color:#f5f5f5;border-radius:4px;padding:1.25rem 2.5rem 1.25rem 1.5rem;position:relative}.notification a:not(.button){color:currentColor;text-decoration:underline}.notification strong{color:currentColor}.notification code,.notification pre{background:#fff}.notification pre code{background:transparent}.notification>.delete{position:absolute;right:.5rem;top:.5rem}.notification .content,.notification .subtitle,.notification .title{color:currentColor}.notification.is-white{background-color:#fff;color:#0a0a0a}.notification.is-black{background-color:#0a0a0a;color:#fff}.notification.is-light{background-color:#f5f5f5;color:#363636}.notification.is-dark{background-color:#363636;color:#f5f5f5}.notification.is-primary{background-color:#00d1b2;color:#fff}.notification.is-link{background-color:#3273dc;color:#fff}.notification.is-info{background-color:#209cee;color:#fff}.notification.is-success{background-color:#23d160;color:#fff}.notification.is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.notification.is-danger{background-color:#ff3860;color:#fff}.progress{-moz-appearance:none;-webkit-appearance:none;border:none;border-radius:290486px;display:block;height:1rem;overflow:hidden;padding:0;width:100%}.progress::-webkit-progress-bar{background-color:#dbdbdb}.progress::-webkit-progress-value{background-color:#4a4a4a}.progress::-moz-progress-bar{background-color:#4a4a4a}.progress::-ms-fill{background-color:#4a4a4a;border:none}.progress.is-white::-webkit-progress-value{background-color:#fff}.progress.is-white::-moz-progress-bar{background-color:#fff}.progress.is-white::-ms-fill{background-color:#fff}.progress.is-black::-webkit-progress-value{background-color:#0a0a0a}.progress.is-black::-moz-progress-bar{background-color:#0a0a0a}.progress.is-black::-ms-fill{background-color:#0a0a0a}.progress.is-light::-webkit-progress-value{background-color:#f5f5f5}.progress.is-light::-moz-progress-bar{background-color:#f5f5f5}.progress.is-light::-ms-fill{background-color:#f5f5f5}.progress.is-dark::-webkit-progress-value{background-color:#363636}.progress.is-dark::-moz-progress-bar{background-color:#363636}.progress.is-dark::-ms-fill{background-color:#363636}.progress.is-primary::-webkit-progress-value{background-color:#00d1b2}.progress.is-primary::-moz-progress-bar{background-color:#00d1b2}.progress.is-primary::-ms-fill{background-color:#00d1b2}.progress.is-link::-webkit-progress-value{background-color:#3273dc}.progress.is-link::-moz-progress-bar{background-color:#3273dc}.progress.is-link::-ms-fill{background-color:#3273dc}.progress.is-info::-webkit-progress-value{background-color:#209cee}.progress.is-info::-moz-progress-bar{background-color:#209cee}.progress.is-info::-ms-fill{background-color:#209cee}.progress.is-success::-webkit-progress-value{background-color:#23d160}.progress.is-success::-moz-progress-bar{background-color:#23d160}.progress.is-success::-ms-fill{background-color:#23d160}.progress.is-warning::-webkit-progress-value{background-color:#ffdd57}.progress.is-warning::-moz-progress-bar{background-color:#ffdd57}.progress.is-warning::-ms-fill{background-color:#ffdd57}.progress.is-danger::-webkit-progress-value{background-color:#ff3860}.progress.is-danger::-moz-progress-bar{background-color:#ff3860}.progress.is-danger::-ms-fill{background-color:#ff3860}.progress.is-small{height:.75rem}.progress.is-medium{height:1.25rem}.progress.is-large{height:1.5rem}.table{background-color:#fff;color:#363636}.table td,.table th{border:1px solid #dbdbdb;border-width:0 0 1px;padding:.5em .75em;vertical-align:top}.table td.is-white,.table th.is-white{background-color:#fff;border-color:#fff;color:#0a0a0a}.table td.is-black,.table th.is-black{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.table td.is-light,.table th.is-light{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.table td.is-dark,.table th.is-dark{background-color:#363636;border-color:#363636;color:#f5f5f5}.table td.is-primary,.table th.is-primary{background-color:#00d1b2;border-color:#00d1b2;color:#fff}.table td.is-link,.table th.is-link{background-color:#3273dc;border-color:#3273dc;color:#fff}.table td.is-info,.table th.is-info{background-color:#209cee;border-color:#209cee;color:#fff}.table td.is-success,.table th.is-success{background-color:#23d160;border-color:#23d160;color:#fff}.table td.is-warning,.table th.is-warning{background-color:#ffdd57;border-color:#ffdd57;color:rgba(0,0,0,.7)}.table td.is-danger,.table th.is-danger{background-color:#ff3860;border-color:#ff3860;color:#fff}.table td.is-narrow,.table th.is-narrow{white-space:nowrap;width:1%}.table td.is-selected,.table th.is-selected{background-color:#00d1b2;color:#fff}.table td.is-selected a,.table td.is-selected strong,.table th.is-selected a,.table th.is-selected strong{color:currentColor}.table th{color:#363636;text-align:left}.table tr.is-selected{background-color:#00d1b2;color:#fff}.table tr.is-selected a,.table tr.is-selected strong{color:currentColor}.table tr.is-selected td,.table tr.is-selected th{border-color:#fff;color:currentColor}.table thead td,.table thead th{border-width:0 0 2px;color:#363636}.table tfoot td,.table tfoot th{border-width:2px 0 0;color:#363636}.table tbody tr:last-child td,.table tbody tr:last-child th{border-bottom-width:0}.table.is-bordered td,.table.is-bordered th{border-width:1px}.table.is-bordered tr:last-child td,.table.is-bordered tr:last-child th{border-bottom-width:1px}.table.is-fullwidth{width:100%}.table.is-hoverable tbody tr:not(.is-selected):hover{background-color:#fafafa}.table.is-hoverable.is-striped tbody tr:not(.is-selected):hover{background-color:#f5f5f5}.table.is-narrow td,.table.is-narrow th{padding:.25em .5em}.table.is-striped tbody tr:not(.is-selected):nth-child(2n){background-color:#fafafa}.table-container{-webkit-overflow-scrolling:touch;overflow:auto;overflow-y:hidden;max-width:100%}.tags{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.tags .tag{margin-bottom:.5rem}.tags .tag:not(:last-child){margin-right:.5rem}.tags:last-child{margin-bottom:-.5rem}.tags:not(:last-child){margin-bottom:1rem}.tags.has-addons .tag{margin-right:0}.tags.has-addons .tag:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.tags.has-addons .tag:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.tags.is-centered{justify-content:center}.tags.is-centered .tag{margin-right:.25rem;margin-left:.25rem}.tags.is-right{justify-content:flex-end}.tags.is-right .tag:not(:first-child){margin-left:.5rem}.tags.is-right .tag:not(:last-child){margin-right:0}.tag:not(body){align-items:center;background-color:#f5f5f5;border-radius:4px;color:#4a4a4a;display:inline-flex;font-size:.75rem;height:2em;justify-content:center;line-height:1.5;padding-left:.75em;padding-right:.75em;white-space:nowrap}.tag:not(body) .delete{margin-left:.25rem;margin-right:-.375rem}.tag:not(body).is-white{background-color:#fff;color:#0a0a0a}.tag:not(body).is-black{background-color:#0a0a0a;color:#fff}.tag:not(body).is-light{background-color:#f5f5f5;color:#363636}.tag:not(body).is-dark{background-color:#363636;color:#f5f5f5}.tag:not(body).is-primary{background-color:#00d1b2;color:#fff}.tag:not(body).is-link{background-color:#3273dc;color:#fff}.tag:not(body).is-info{background-color:#209cee;color:#fff}.tag:not(body).is-success{background-color:#23d160;color:#fff}.tag:not(body).is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.tag:not(body).is-danger{background-color:#ff3860;color:#fff}.tag:not(body).is-medium{font-size:1rem}.tag:not(body).is-large{font-size:1.25rem}.tag:not(body) .icon:first-child:not(:last-child){margin-left:-.375em;margin-right:.1875em}.tag:not(body) .icon:last-child:not(:first-child){margin-left:.1875em;margin-right:-.375em}.tag:not(body) .icon:first-child:last-child{margin-left:-.375em;margin-right:-.375em}.tag:not(body).is-delete{margin-left:1px;padding:0;position:relative;width:2em}.tag:not(body).is-delete:after,.tag:not(body).is-delete:before{background-color:currentColor;content:\"\";display:block;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) rotate(45deg);transform-origin:center center}.tag:not(body).is-delete:before{height:1px;width:50%}.tag:not(body).is-delete:after{height:50%;width:1px}.tag:not(body).is-delete:focus,.tag:not(body).is-delete:hover{background-color:#e8e8e8}.tag:not(body).is-delete:active{background-color:#dbdbdb}.tag:not(body).is-rounded{border-radius:290486px}a.tag:hover{text-decoration:underline}.subtitle,.title{word-break:break-word}.subtitle em,.subtitle span,.title em,.title span{font-weight:inherit}.subtitle sub,.subtitle sup,.title sub,.title sup{font-size:.75em}.subtitle .tag,.title .tag{vertical-align:middle}.title{color:#363636;font-size:2rem;font-weight:600;line-height:1.125}.title strong{color:inherit;font-weight:inherit}.title+.highlight{margin-top:-.75rem}.title:not(.is-spaced)+.subtitle{margin-top:-1.25rem}.title.is-1{font-size:3rem}.title.is-2{font-size:2.5rem}.title.is-3{font-size:2rem}.title.is-4{font-size:1.5rem}.title.is-5{font-size:1.25rem}.title.is-6{font-size:1rem}.title.is-7{font-size:.75rem}.subtitle{color:#4a4a4a;font-size:1.25rem;font-weight:400;line-height:1.25}.subtitle strong{color:#363636;font-weight:600}.subtitle:not(.is-spaced)+.title{margin-top:-1.25rem}.subtitle.is-1{font-size:3rem}.subtitle.is-2{font-size:2.5rem}.subtitle.is-3{font-size:2rem}.subtitle.is-4{font-size:1.5rem}.subtitle.is-5{font-size:1.25rem}.subtitle.is-6{font-size:1rem}.subtitle.is-7{font-size:.75rem}.heading{display:block;font-size:11px;letter-spacing:1px;margin-bottom:5px;text-transform:uppercase}.highlight{font-weight:400;max-width:100%;overflow:hidden;padding:0}.highlight pre{overflow:auto;max-width:100%}.number{align-items:center;background-color:#f5f5f5;border-radius:290486px;display:inline-flex;font-size:1.25rem;height:2em;justify-content:center;margin-right:1.5rem;min-width:2.5em;padding:.25rem .5rem;text-align:center;vertical-align:top}.breadcrumb{font-size:1rem;white-space:nowrap}.breadcrumb a{align-items:center;color:#3273dc;display:flex;justify-content:center;padding:0 .75em}.breadcrumb a:hover{color:#363636}.breadcrumb li{align-items:center;display:flex}.breadcrumb li:first-child a{padding-left:0}.breadcrumb li.is-active a{color:#363636;cursor:default;pointer-events:none}.breadcrumb li+li:before{color:#b5b5b5;content:\"/\"}.breadcrumb ol,.breadcrumb ul{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-start}.breadcrumb .icon:first-child{margin-right:.5em}.breadcrumb .icon:last-child{margin-left:.5em}.breadcrumb.is-centered ol,.breadcrumb.is-centered ul{justify-content:center}.breadcrumb.is-right ol,.breadcrumb.is-right ul{justify-content:flex-end}.breadcrumb.is-small{font-size:.75rem}.breadcrumb.is-medium{font-size:1.25rem}.breadcrumb.is-large{font-size:1.5rem}.breadcrumb.has-arrow-separator li+li:before{content:\"\\2192\"}.breadcrumb.has-bullet-separator li+li:before{content:\"\\2022\"}.breadcrumb.has-dot-separator li+li:before{content:\"\\B7\"}.breadcrumb.has-succeeds-separator li+li:before{content:\"\\227B\"}.card{background-color:#fff;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);color:#4a4a4a;max-width:100%;position:relative}.card-header{background-color:none;align-items:stretch;box-shadow:0 1px 2px hsla(0,0%,4%,.1);display:flex}.card-header-title{align-items:center;color:#363636;display:flex;flex-grow:1;font-weight:700;padding:.75rem}.card-header-icon,.card-header-title.is-centered{justify-content:center}.card-header-icon{align-items:center;cursor:pointer;display:flex;padding:.75rem}.card-image{display:block;position:relative}.card-content{background-color:none;padding:1.5rem}.card-footer{background-color:none;border-top:1px solid #dbdbdb;align-items:stretch;display:flex}.card-footer-item{align-items:center;display:flex;flex-basis:0;flex-grow:1;flex-shrink:0;justify-content:center;padding:.75rem}.card-footer-item:not(:last-child){border-right:1px solid #dbdbdb}.card .media:not(:last-child){margin-bottom:.75rem}.dropdown{display:inline-flex;position:relative;vertical-align:top}.dropdown.is-active .dropdown-menu,.dropdown.is-hoverable:hover .dropdown-menu{display:block}.dropdown.is-right .dropdown-menu{left:auto;right:0}.dropdown.is-up .dropdown-menu{bottom:100%;padding-bottom:4px;padding-top:0;top:auto}.dropdown-menu{display:none;left:0;min-width:12rem;padding-top:4px;position:absolute;top:100%;z-index:20}.dropdown-content{background-color:#fff;border-radius:4px;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);padding-bottom:.5rem;padding-top:.5rem}.dropdown-item,.dropdown .dropdown-menu .has-link a{color:#4a4a4a;display:block;font-size:.875rem;line-height:1.5;padding:.375rem 1rem;position:relative}.dropdown .dropdown-menu .has-link a,a.dropdown-item{padding-right:3rem;white-space:nowrap}.dropdown .dropdown-menu .has-link a:hover,a.dropdown-item:hover{background-color:#f5f5f5;color:#0a0a0a}.dropdown .dropdown-menu .has-link a.is-active,a.dropdown-item.is-active{background-color:#3273dc;color:#fff}.dropdown-divider{background-color:#dbdbdb;border:none;display:block;height:1px;margin:.5rem 0}.level{align-items:center;justify-content:space-between}.level code{border-radius:4px}.level img{display:inline-block;vertical-align:top}.level.is-mobile,.level.is-mobile .level-left,.level.is-mobile .level-right{display:flex}.level.is-mobile .level-left+.level-right{margin-top:0}.level.is-mobile .level-item{margin-right:.75rem}.level.is-mobile .level-item:not(:last-child){margin-bottom:0}.level.is-mobile .level-item:not(.is-narrow){flex-grow:1}@media print,screen and (min-width:769px){.level{display:flex}.level>.level-item:not(.is-narrow){flex-grow:1}}.level-item{align-items:center;display:flex;flex-basis:auto;flex-grow:0;flex-shrink:0;justify-content:center}.level-item .subtitle,.level-item .title{margin-bottom:0}@media screen and (max-width:768px){.level-item:not(:last-child){margin-bottom:.75rem}}.level-left,.level-right{flex-basis:auto;flex-grow:0;flex-shrink:0}.level-left .level-item.is-flexible,.level-right .level-item.is-flexible{flex-grow:1}@media print,screen and (min-width:769px){.level-left .level-item:not(:last-child),.level-right .level-item:not(:last-child){margin-right:.75rem}}.level-left{align-items:center;justify-content:flex-start}@media screen and (max-width:768px){.level-left+.level-right{margin-top:1.5rem}}@media print,screen and (min-width:769px){.level-left{display:flex}}.level-right{align-items:center;justify-content:flex-end}@media print,screen and (min-width:769px){.level-right{display:flex}}.media{align-items:flex-start;display:flex;text-align:left}.media .content:not(:last-child){margin-bottom:.75rem}.media .media{border-top:1px solid hsla(0,0%,86%,.5);display:flex;padding-top:.75rem}.media .media .content:not(:last-child),.media .media .control:not(:last-child){margin-bottom:.5rem}.media .media .media{padding-top:.5rem}.media .media .media+.media{margin-top:.5rem}.media+.media{border-top:1px solid hsla(0,0%,86%,.5);margin-top:1rem;padding-top:1rem}.media.is-large+.media{margin-top:1.5rem;padding-top:1.5rem}.media-left,.media-right{flex-basis:auto;flex-grow:0;flex-shrink:0}.media-left{margin-right:1rem}.media-right{margin-left:1rem}.media-content{flex-basis:auto;flex-grow:1;flex-shrink:1;text-align:left}.menu{font-size:1rem}.menu.is-small{font-size:.75rem}.menu.is-medium{font-size:1.25rem}.menu.is-large{font-size:1.5rem}.menu-list{line-height:1.25}.menu-list a{border-radius:2px;color:#4a4a4a;display:block;padding:.5em .75em}.menu-list a:hover{background-color:#f5f5f5;color:#363636}.menu-list a.is-active{background-color:#3273dc;color:#fff}.menu-list li ul{border-left:1px solid #dbdbdb;margin:.75em;padding-left:.75em}.menu-label{color:#7a7a7a;font-size:.75em;letter-spacing:.1em;text-transform:uppercase}.menu-label:not(:first-child){margin-top:1em}.menu-label:not(:last-child){margin-bottom:1em}.message{background-color:#f5f5f5;border-radius:4px;font-size:1rem}.message strong{color:currentColor}.message a:not(.button):not(.tag){color:currentColor;text-decoration:underline}.message.is-small{font-size:.75rem}.message.is-medium{font-size:1.25rem}.message.is-large{font-size:1.5rem}.message.is-white{background-color:#fff}.message.is-white .message-header{background-color:#fff;color:#0a0a0a}.message.is-white .message-body{border-color:#fff;color:#4d4d4d}.message.is-black{background-color:#fafafa}.message.is-black .message-header{background-color:#0a0a0a;color:#fff}.message.is-black .message-body{border-color:#0a0a0a;color:#090909}.message.is-light{background-color:#fafafa}.message.is-light .message-header{background-color:#f5f5f5;color:#363636}.message.is-light .message-body{border-color:#f5f5f5;color:#505050}.message.is-dark{background-color:#fafafa}.message.is-dark .message-header{background-color:#363636;color:#f5f5f5}.message.is-dark .message-body{border-color:#363636;color:#2a2a2a}.message.is-primary{background-color:#f5fffd}.message.is-primary .message-header{background-color:#00d1b2;color:#fff}.message.is-primary .message-body{border-color:#00d1b2;color:#021310}.message.is-link{background-color:#f6f9fe}.message.is-link .message-header{background-color:#3273dc;color:#fff}.message.is-link .message-body{border-color:#3273dc;color:#22509a}.message.is-info{background-color:#f6fbfe}.message.is-info .message-header{background-color:#209cee;color:#fff}.message.is-info .message-body{border-color:#209cee;color:#12537e}.message.is-success{background-color:#f6fef9}.message.is-success .message-header{background-color:#23d160;color:#fff}.message.is-success .message-body{border-color:#23d160;color:#0e301a}.message.is-warning{background-color:#fffdf5}.message.is-warning .message-header{background-color:#ffdd57;color:rgba(0,0,0,.7)}.message.is-warning .message-body{border-color:#ffdd57;color:#3b3108}.message.is-danger{background-color:#fff5f7}.message.is-danger .message-header{background-color:#ff3860;color:#fff}.message.is-danger .message-body{border-color:#ff3860;color:#cd0930}.message-header{align-items:center;background-color:#4a4a4a;border-radius:4px 4px 0 0;color:#fff;display:flex;font-weight:700;justify-content:space-between;line-height:1.25;padding:.75em 1em;position:relative}.message-header .delete{flex-grow:0;flex-shrink:0;margin-left:.75em}.message-header+.message-body{border-width:0;border-top-left-radius:0;border-top-right-radius:0}.message-body{border-color:#dbdbdb;border-radius:4px;border-style:solid;border-width:0 0 0 4px;color:#4a4a4a;padding:1.25em 1.5em}.message-body code,.message-body pre{background-color:#fff}.message-body pre code{background-color:transparent}.modal{align-items:center;display:none;justify-content:center;overflow:hidden;position:fixed;z-index:40}.modal.is-active{display:flex}.modal-background{background-color:hsla(0,0%,4%,.86)}.modal-card,.modal-content{margin:0 20px;max-height:calc(100vh - 160px);overflow:auto;position:relative;width:100%}@media print,screen and (min-width:769px){.modal-card,.modal-content{margin:0 auto;max-height:calc(100vh - 40px);width:640px}}.modal-close{background:none;height:40px;position:fixed;right:20px;top:20px;width:40px}.modal-card{display:flex;flex-direction:column;max-height:calc(100vh - 40px);overflow:hidden}.modal-card-foot,.modal-card-head{align-items:center;background-color:#f5f5f5;display:flex;flex-shrink:0;justify-content:flex-start;padding:20px;position:relative}.modal-card-head{border-bottom:1px solid #dbdbdb;border-top-left-radius:6px;border-top-right-radius:6px}.modal-card-title{color:#363636;flex-grow:1;flex-shrink:0;font-size:1.5rem;line-height:1}.modal-card-foot{border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:1px solid #dbdbdb}.modal-card-foot .button:not(:last-child){margin-right:10px}.modal-card-body{-webkit-overflow-scrolling:touch;background-color:#fff;flex-grow:1;flex-shrink:1;overflow:auto;padding:20px}.navbar{background-color:#fff;min-height:3.25rem;position:relative;z-index:30}.navbar.is-white{background-color:#fff;color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link,.navbar.is-white .navbar-brand>.navbar-item{color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link.is-active,.navbar.is-white .navbar-brand .navbar-link:hover,.navbar.is-white .navbar-brand>a.navbar-item.is-active,.navbar.is-white .navbar-brand>a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link:after{border-color:#0a0a0a}@media screen and (min-width:1088px){.navbar.is-white .navbar-end .navbar-link,.navbar.is-white .navbar-end>.navbar-item,.navbar.is-white .navbar-start .navbar-link,.navbar.is-white .navbar-start>.navbar-item{color:#0a0a0a}.navbar.is-white .navbar-end .navbar-link.is-active,.navbar.is-white .navbar-end .navbar-link:hover,.navbar.is-white .navbar-end>a.navbar-item.is-active,.navbar.is-white .navbar-end>a.navbar-item:hover,.navbar.is-white .navbar-start .navbar-link.is-active,.navbar.is-white .navbar-start .navbar-link:hover,.navbar.is-white .navbar-start>a.navbar-item.is-active,.navbar.is-white .navbar-start>a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-end .navbar-link:after,.navbar.is-white .navbar-start .navbar-link:after{border-color:#0a0a0a}.navbar.is-white .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-white .navbar-item.has-dropdown:hover .navbar-link{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-dropdown a.navbar-item.is-active{background-color:#fff;color:#0a0a0a}}.navbar.is-black{background-color:#0a0a0a;color:#fff}.navbar.is-black .navbar-brand .navbar-link,.navbar.is-black .navbar-brand>.navbar-item{color:#fff}.navbar.is-black .navbar-brand .navbar-link.is-active,.navbar.is-black .navbar-brand .navbar-link:hover,.navbar.is-black .navbar-brand>a.navbar-item.is-active,.navbar.is-black .navbar-brand>a.navbar-item:hover{background-color:#000;color:#fff}.navbar.is-black .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-black .navbar-end .navbar-link,.navbar.is-black .navbar-end>.navbar-item,.navbar.is-black .navbar-start .navbar-link,.navbar.is-black .navbar-start>.navbar-item{color:#fff}.navbar.is-black .navbar-end .navbar-link.is-active,.navbar.is-black .navbar-end .navbar-link:hover,.navbar.is-black .navbar-end>a.navbar-item.is-active,.navbar.is-black .navbar-end>a.navbar-item:hover,.navbar.is-black .navbar-start .navbar-link.is-active,.navbar.is-black .navbar-start .navbar-link:hover,.navbar.is-black .navbar-start>a.navbar-item.is-active,.navbar.is-black .navbar-start>a.navbar-item:hover{background-color:#000;color:#fff}.navbar.is-black .navbar-end .navbar-link:after,.navbar.is-black .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-black .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-black .navbar-item.has-dropdown:hover .navbar-link{background-color:#000;color:#fff}.navbar.is-black .navbar-dropdown a.navbar-item.is-active{background-color:#0a0a0a;color:#fff}}.navbar.is-light{background-color:#f5f5f5;color:#363636}.navbar.is-light .navbar-brand .navbar-link,.navbar.is-light .navbar-brand>.navbar-item{color:#363636}.navbar.is-light .navbar-brand .navbar-link.is-active,.navbar.is-light .navbar-brand .navbar-link:hover,.navbar.is-light .navbar-brand>a.navbar-item.is-active,.navbar.is-light .navbar-brand>a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-brand .navbar-link:after{border-color:#363636}@media screen and (min-width:1088px){.navbar.is-light .navbar-end .navbar-link,.navbar.is-light .navbar-end>.navbar-item,.navbar.is-light .navbar-start .navbar-link,.navbar.is-light .navbar-start>.navbar-item{color:#363636}.navbar.is-light .navbar-end .navbar-link.is-active,.navbar.is-light .navbar-end .navbar-link:hover,.navbar.is-light .navbar-end>a.navbar-item.is-active,.navbar.is-light .navbar-end>a.navbar-item:hover,.navbar.is-light .navbar-start .navbar-link.is-active,.navbar.is-light .navbar-start .navbar-link:hover,.navbar.is-light .navbar-start>a.navbar-item.is-active,.navbar.is-light .navbar-start>a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-end .navbar-link:after,.navbar.is-light .navbar-start .navbar-link:after{border-color:#363636}.navbar.is-light .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-light .navbar-item.has-dropdown:hover .navbar-link{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#363636}}.navbar.is-dark{background-color:#363636;color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link,.navbar.is-dark .navbar-brand>.navbar-item{color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link.is-active,.navbar.is-dark .navbar-brand .navbar-link:hover,.navbar.is-dark .navbar-brand>a.navbar-item.is-active,.navbar.is-dark .navbar-brand>a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link:after{border-color:#f5f5f5}@media screen and (min-width:1088px){.navbar.is-dark .navbar-end .navbar-link,.navbar.is-dark .navbar-end>.navbar-item,.navbar.is-dark .navbar-start .navbar-link,.navbar.is-dark .navbar-start>.navbar-item{color:#f5f5f5}.navbar.is-dark .navbar-end .navbar-link.is-active,.navbar.is-dark .navbar-end .navbar-link:hover,.navbar.is-dark .navbar-end>a.navbar-item.is-active,.navbar.is-dark .navbar-end>a.navbar-item:hover,.navbar.is-dark .navbar-start .navbar-link.is-active,.navbar.is-dark .navbar-start .navbar-link:hover,.navbar.is-dark .navbar-start>a.navbar-item.is-active,.navbar.is-dark .navbar-start>a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-end .navbar-link:after,.navbar.is-dark .navbar-start .navbar-link:after{border-color:#f5f5f5}.navbar.is-dark .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-dark .navbar-item.has-dropdown:hover .navbar-link{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-dropdown a.navbar-item.is-active{background-color:#363636;color:#f5f5f5}}.navbar.is-primary{background-color:#00d1b2;color:#fff}.navbar.is-primary .navbar-brand .navbar-link,.navbar.is-primary .navbar-brand>.navbar-item{color:#fff}.navbar.is-primary .navbar-brand .navbar-link.is-active,.navbar.is-primary .navbar-brand .navbar-link:hover,.navbar.is-primary .navbar-brand>a.navbar-item.is-active,.navbar.is-primary .navbar-brand>a.navbar-item:hover{background-color:#00b89c;color:#fff}.navbar.is-primary .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-primary .navbar-end .navbar-link,.navbar.is-primary .navbar-end>.navbar-item,.navbar.is-primary .navbar-start .navbar-link,.navbar.is-primary .navbar-start>.navbar-item{color:#fff}.navbar.is-primary .navbar-end .navbar-link.is-active,.navbar.is-primary .navbar-end .navbar-link:hover,.navbar.is-primary .navbar-end>a.navbar-item.is-active,.navbar.is-primary .navbar-end>a.navbar-item:hover,.navbar.is-primary .navbar-start .navbar-link.is-active,.navbar.is-primary .navbar-start .navbar-link:hover,.navbar.is-primary .navbar-start>a.navbar-item.is-active,.navbar.is-primary .navbar-start>a.navbar-item:hover{background-color:#00b89c;color:#fff}.navbar.is-primary .navbar-end .navbar-link:after,.navbar.is-primary .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-primary .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-primary .navbar-item.has-dropdown:hover .navbar-link{background-color:#00b89c;color:#fff}.navbar.is-primary .navbar-dropdown a.navbar-item.is-active{background-color:#00d1b2;color:#fff}}.navbar.is-link{background-color:#3273dc;color:#fff}.navbar.is-link .navbar-brand .navbar-link,.navbar.is-link .navbar-brand>.navbar-item{color:#fff}.navbar.is-link .navbar-brand .navbar-link.is-active,.navbar.is-link .navbar-brand .navbar-link:hover,.navbar.is-link .navbar-brand>a.navbar-item.is-active,.navbar.is-link .navbar-brand>a.navbar-item:hover{background-color:#2366d1;color:#fff}.navbar.is-link .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-link .navbar-end .navbar-link,.navbar.is-link .navbar-end>.navbar-item,.navbar.is-link .navbar-start .navbar-link,.navbar.is-link .navbar-start>.navbar-item{color:#fff}.navbar.is-link .navbar-end .navbar-link.is-active,.navbar.is-link .navbar-end .navbar-link:hover,.navbar.is-link .navbar-end>a.navbar-item.is-active,.navbar.is-link .navbar-end>a.navbar-item:hover,.navbar.is-link .navbar-start .navbar-link.is-active,.navbar.is-link .navbar-start .navbar-link:hover,.navbar.is-link .navbar-start>a.navbar-item.is-active,.navbar.is-link .navbar-start>a.navbar-item:hover{background-color:#2366d1;color:#fff}.navbar.is-link .navbar-end .navbar-link:after,.navbar.is-link .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-link .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-link .navbar-item.has-dropdown:hover .navbar-link{background-color:#2366d1;color:#fff}.navbar.is-link .navbar-dropdown a.navbar-item.is-active{background-color:#3273dc;color:#fff}}.navbar.is-info{background-color:#209cee;color:#fff}.navbar.is-info .navbar-brand .navbar-link,.navbar.is-info .navbar-brand>.navbar-item{color:#fff}.navbar.is-info .navbar-brand .navbar-link.is-active,.navbar.is-info .navbar-brand .navbar-link:hover,.navbar.is-info .navbar-brand>a.navbar-item.is-active,.navbar.is-info .navbar-brand>a.navbar-item:hover{background-color:#118fe4;color:#fff}.navbar.is-info .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-info .navbar-end .navbar-link,.navbar.is-info .navbar-end>.navbar-item,.navbar.is-info .navbar-start .navbar-link,.navbar.is-info .navbar-start>.navbar-item{color:#fff}.navbar.is-info .navbar-end .navbar-link.is-active,.navbar.is-info .navbar-end .navbar-link:hover,.navbar.is-info .navbar-end>a.navbar-item.is-active,.navbar.is-info .navbar-end>a.navbar-item:hover,.navbar.is-info .navbar-start .navbar-link.is-active,.navbar.is-info .navbar-start .navbar-link:hover,.navbar.is-info .navbar-start>a.navbar-item.is-active,.navbar.is-info .navbar-start>a.navbar-item:hover{background-color:#118fe4;color:#fff}.navbar.is-info .navbar-end .navbar-link:after,.navbar.is-info .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-info .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-info .navbar-item.has-dropdown:hover .navbar-link{background-color:#118fe4;color:#fff}.navbar.is-info .navbar-dropdown a.navbar-item.is-active{background-color:#209cee;color:#fff}}.navbar.is-success{background-color:#23d160;color:#fff}.navbar.is-success .navbar-brand .navbar-link,.navbar.is-success .navbar-brand>.navbar-item{color:#fff}.navbar.is-success .navbar-brand .navbar-link.is-active,.navbar.is-success .navbar-brand .navbar-link:hover,.navbar.is-success .navbar-brand>a.navbar-item.is-active,.navbar.is-success .navbar-brand>a.navbar-item:hover{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-success .navbar-end .navbar-link,.navbar.is-success .navbar-end>.navbar-item,.navbar.is-success .navbar-start .navbar-link,.navbar.is-success .navbar-start>.navbar-item{color:#fff}.navbar.is-success .navbar-end .navbar-link.is-active,.navbar.is-success .navbar-end .navbar-link:hover,.navbar.is-success .navbar-end>a.navbar-item.is-active,.navbar.is-success .navbar-end>a.navbar-item:hover,.navbar.is-success .navbar-start .navbar-link.is-active,.navbar.is-success .navbar-start .navbar-link:hover,.navbar.is-success .navbar-start>a.navbar-item.is-active,.navbar.is-success .navbar-start>a.navbar-item:hover{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-end .navbar-link:after,.navbar.is-success .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-success .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-success .navbar-item.has-dropdown:hover .navbar-link{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-dropdown a.navbar-item.is-active{background-color:#23d160;color:#fff}}.navbar.is-warning{background-color:#ffdd57}.navbar.is-warning,.navbar.is-warning .navbar-brand .navbar-link,.navbar.is-warning .navbar-brand>.navbar-item{color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-brand .navbar-link.is-active,.navbar.is-warning .navbar-brand .navbar-link:hover,.navbar.is-warning .navbar-brand>a.navbar-item.is-active,.navbar.is-warning .navbar-brand>a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-brand .navbar-link:after{border-color:rgba(0,0,0,.7)}@media screen and (min-width:1088px){.navbar.is-warning .navbar-end .navbar-link,.navbar.is-warning .navbar-end>.navbar-item,.navbar.is-warning .navbar-start .navbar-link,.navbar.is-warning .navbar-start>.navbar-item{color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-end .navbar-link.is-active,.navbar.is-warning .navbar-end .navbar-link:hover,.navbar.is-warning .navbar-end>a.navbar-item.is-active,.navbar.is-warning .navbar-end>a.navbar-item:hover,.navbar.is-warning .navbar-start .navbar-link.is-active,.navbar.is-warning .navbar-start .navbar-link:hover,.navbar.is-warning .navbar-start>a.navbar-item.is-active,.navbar.is-warning .navbar-start>a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-end .navbar-link:after,.navbar.is-warning .navbar-start .navbar-link:after{border-color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-warning .navbar-item.has-dropdown:hover .navbar-link{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-dropdown a.navbar-item.is-active{background-color:#ffdd57;color:rgba(0,0,0,.7)}}.navbar.is-danger{background-color:#ff3860;color:#fff}.navbar.is-danger .navbar-brand .navbar-link,.navbar.is-danger .navbar-brand>.navbar-item{color:#fff}.navbar.is-danger .navbar-brand .navbar-link.is-active,.navbar.is-danger .navbar-brand .navbar-link:hover,.navbar.is-danger .navbar-brand>a.navbar-item.is-active,.navbar.is-danger .navbar-brand>a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-danger .navbar-end .navbar-link,.navbar.is-danger .navbar-end>.navbar-item,.navbar.is-danger .navbar-start .navbar-link,.navbar.is-danger .navbar-start>.navbar-item{color:#fff}.navbar.is-danger .navbar-end .navbar-link.is-active,.navbar.is-danger .navbar-end .navbar-link:hover,.navbar.is-danger .navbar-end>a.navbar-item.is-active,.navbar.is-danger .navbar-end>a.navbar-item:hover,.navbar.is-danger .navbar-start .navbar-link.is-active,.navbar.is-danger .navbar-start .navbar-link:hover,.navbar.is-danger .navbar-start>a.navbar-item.is-active,.navbar.is-danger .navbar-start>a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-end .navbar-link:after,.navbar.is-danger .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-danger .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-danger .navbar-item.has-dropdown:hover .navbar-link{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-dropdown a.navbar-item.is-active{background-color:#ff3860;color:#fff}}.navbar>.container{align-items:stretch;display:flex;min-height:3.25rem;width:100%}.navbar.has-shadow{box-shadow:0 2px 0 0 #f5f5f5}.navbar.is-fixed-bottom,.navbar.is-fixed-top{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom{bottom:0}.navbar.is-fixed-bottom.has-shadow{box-shadow:0 -2px 0 0 #f5f5f5}.navbar.is-fixed-top{top:0}body.has-navbar-fixed-top,html.has-navbar-fixed-top{padding-top:3.25rem}body.has-navbar-fixed-bottom,html.has-navbar-fixed-bottom{padding-bottom:3.25rem}.navbar-brand,.navbar-tabs{align-items:stretch;display:flex;flex-shrink:0;min-height:3.25rem}.navbar-brand a.navbar-item:hover{background-color:transparent}.navbar-tabs{-webkit-overflow-scrolling:touch;max-width:100vw;overflow-x:auto;overflow-y:hidden}.navbar-burger{cursor:pointer;display:block;height:3.25rem;position:relative;width:3.25rem;margin-left:auto}.navbar-burger span{background-color:currentColor;display:block;height:1px;left:calc(50% - 8px);position:absolute;transform-origin:center;transition-duration:86ms;transition-property:background-color,opacity,transform;transition-timing-function:ease-out;width:16px}.navbar-burger span:first-child{top:calc(50% - 6px)}.navbar-burger span:nth-child(2){top:calc(50% - 1px)}.navbar-burger span:nth-child(3){top:calc(50% + 4px)}.navbar-burger:hover{background-color:rgba(0,0,0,.05)}.navbar-burger.is-active span:first-child{transform:translateY(5px) rotate(45deg)}.navbar-burger.is-active span:nth-child(2){opacity:0}.navbar-burger.is-active span:nth-child(3){transform:translateY(-5px) rotate(-45deg)}.navbar-menu{display:none}.navbar-item,.navbar-link{color:#4a4a4a;display:block;line-height:1.5;padding:.5rem .75rem;position:relative}.navbar-item .icon:only-child,.navbar-link .icon:only-child{margin-left:-.25rem;margin-right:-.25rem}.navbar-link,a.navbar-item{cursor:pointer}.navbar-link.is-active,.navbar-link:hover,a.navbar-item.is-active,a.navbar-item:hover{background-color:#fafafa;color:#3273dc}.navbar-item{display:block;flex-grow:0;flex-shrink:0}.navbar-item img{max-height:1.75rem}.navbar-item.has-dropdown{padding:0}.navbar-item.is-expanded{flex-grow:1;flex-shrink:1}.navbar-item.is-tab{border-bottom:1px solid transparent;min-height:3.25rem;padding-bottom:calc(.5rem - 1px)}.navbar-item.is-tab.is-active,.navbar-item.is-tab:hover{background-color:transparent;border-bottom-color:#3273dc}.navbar-item.is-tab.is-active{border-bottom-style:solid;border-bottom-width:3px;color:#3273dc;padding-bottom:calc(.5rem - 3px)}.navbar-content{flex-grow:1;flex-shrink:1}.navbar-link{padding-right:2.5em}.navbar-link:after{border-color:#3273dc;margin-top:-.375em;right:1.125em}.navbar-dropdown{font-size:.875rem;padding-bottom:.5rem;padding-top:.5rem}.navbar-dropdown .navbar-item{padding-left:1.5rem;padding-right:1.5rem}.navbar-divider{background-color:#f5f5f5;border:none;display:none;height:2px;margin:.5rem 0}@media screen and (max-width:1087px){.navbar>.container{display:block}.navbar-brand .navbar-item,.navbar-tabs .navbar-item{align-items:center;display:flex}.navbar-link:after{display:none}.navbar-menu{background-color:#fff;box-shadow:0 8px 16px hsla(0,0%,4%,.1);padding:.5rem 0}.navbar-menu.is-active{display:block}.navbar.is-fixed-bottom-touch,.navbar.is-fixed-top-touch{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-touch{bottom:0}.navbar.is-fixed-bottom-touch.has-shadow{box-shadow:0 -2px 3px hsla(0,0%,4%,.1)}.navbar.is-fixed-top-touch{top:0}.navbar.is-fixed-top-touch .navbar-menu,.navbar.is-fixed-top .navbar-menu{-webkit-overflow-scrolling:touch;max-height:calc(100vh - 3.25rem);overflow:auto}body.has-navbar-fixed-top-touch,html.has-navbar-fixed-top-touch{padding-top:3.25rem}body.has-navbar-fixed-bottom-touch,html.has-navbar-fixed-bottom-touch{padding-bottom:3.25rem}}@media screen and (min-width:1088px){.navbar,.navbar-end,.navbar-menu,.navbar-start{align-items:stretch;display:flex}.navbar{min-height:3.25rem}.navbar.is-spaced{padding:1rem 2rem}.navbar.is-spaced .navbar-end,.navbar.is-spaced .navbar-start{align-items:center}.navbar.is-spaced .navbar-link,.navbar.is-spaced a.navbar-item{border-radius:4px}.navbar.is-transparent .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-transparent .navbar-item.has-dropdown.is-hoverable:hover .navbar-link,.navbar.is-transparent .navbar-link.is-active,.navbar.is-transparent .navbar-link:hover,.navbar.is-transparent a.navbar-item.is-active,.navbar.is-transparent a.navbar-item:hover{background-color:transparent!important}.navbar.is-transparent .navbar-dropdown a.navbar-item:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar.is-transparent .navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#3273dc}.navbar-burger{display:none}.navbar-item,.navbar-link{align-items:center;display:flex}.navbar-item{display:flex}.navbar-item.has-dropdown{align-items:stretch}.navbar-item.has-dropdown-up .navbar-link:after{transform:rotate(135deg) translate(.25em,-.25em)}.navbar-item.has-dropdown-up .navbar-dropdown{border-bottom:2px solid #dbdbdb;border-radius:6px 6px 0 0;border-top:none;bottom:100%;box-shadow:0 -8px 8px hsla(0,0%,4%,.1);top:auto}.navbar-item.is-active .navbar-dropdown,.navbar-item.is-hoverable:hover .navbar-dropdown{display:block}.navbar-item.is-active .navbar-dropdown.is-boxed,.navbar-item.is-hoverable:hover .navbar-dropdown.is-boxed,.navbar.is-spaced .navbar-item.is-active .navbar-dropdown,.navbar.is-spaced .navbar-item.is-hoverable:hover .navbar-dropdown{opacity:1;pointer-events:auto;transform:translateY(0)}.navbar-menu{flex-grow:1;flex-shrink:0}.navbar-start{justify-content:flex-start;margin-right:auto}.navbar-end{justify-content:flex-end;margin-left:auto}.navbar-dropdown{background-color:#fff;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:2px solid #dbdbdb;box-shadow:0 8px 8px hsla(0,0%,4%,.1);display:none;font-size:.875rem;left:0;min-width:100%;position:absolute;top:100%;z-index:20}.navbar-dropdown .navbar-item{padding:.375rem 1rem;white-space:nowrap}.navbar-dropdown a.navbar-item{padding-right:3rem}.navbar-dropdown a.navbar-item:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#3273dc}.navbar-dropdown.is-boxed,.navbar.is-spaced .navbar-dropdown{border-radius:6px;border-top:none;box-shadow:0 8px 8px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);display:block;opacity:0;pointer-events:none;top:calc(100% + -4px);transform:translateY(-5px);transition-duration:86ms;transition-property:opacity,transform}.navbar-dropdown.is-right{left:auto;right:0}.navbar-divider{display:block}.container>.navbar .navbar-brand,.navbar>.container .navbar-brand{margin-left:-1rem}.container>.navbar .navbar-menu,.navbar>.container .navbar-menu{margin-right:-1rem}.navbar.is-fixed-bottom-desktop,.navbar.is-fixed-top-desktop{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-desktop{bottom:0}.navbar.is-fixed-bottom-desktop.has-shadow{box-shadow:0 -2px 3px hsla(0,0%,4%,.1)}.navbar.is-fixed-top-desktop{top:0}body.has-navbar-fixed-top-desktop,html.has-navbar-fixed-top-desktop{padding-top:3.25rem}body.has-navbar-fixed-bottom-desktop,html.has-navbar-fixed-bottom-desktop{padding-bottom:3.25rem}body.has-spaced-navbar-fixed-top,html.has-spaced-navbar-fixed-top{padding-top:5.25rem}body.has-spaced-navbar-fixed-bottom,html.has-spaced-navbar-fixed-bottom{padding-bottom:5.25rem}.navbar-link.is-active,a.navbar-item.is-active{color:#0a0a0a}.navbar-link.is-active:not(:hover),a.navbar-item.is-active:not(:hover){background-color:transparent}.navbar-item.has-dropdown.is-active .navbar-link,.navbar-item.has-dropdown:hover .navbar-link{background-color:#fafafa}}.pagination{font-size:1rem;margin:-.25rem}.pagination.is-small{font-size:.75rem}.pagination.is-medium{font-size:1.25rem}.pagination.is-large{font-size:1.5rem}.pagination.is-rounded .pagination-next,.pagination.is-rounded .pagination-previous{padding-left:1em;padding-right:1em;border-radius:290486px}.pagination.is-rounded .pagination-link{border-radius:290486px}.pagination,.pagination-list{align-items:center;display:flex;justify-content:center;text-align:center}.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous{font-size:1em;padding-left:.5em;padding-right:.5em;justify-content:center;margin:.25rem;text-align:center}.pagination-link,.pagination-next,.pagination-previous{border-color:#dbdbdb;color:#363636;min-width:2.25em}.pagination-link:hover,.pagination-next:hover,.pagination-previous:hover{border-color:#b5b5b5;color:#363636}.pagination-link:focus,.pagination-next:focus,.pagination-previous:focus{border-color:#3273dc}.pagination-link:active,.pagination-next:active,.pagination-previous:active{box-shadow:inset 0 1px 2px hsla(0,0%,4%,.2)}.pagination-link[disabled],.pagination-next[disabled],.pagination-previous[disabled]{background-color:#dbdbdb;border-color:#dbdbdb;box-shadow:none;color:#7a7a7a;opacity:.5}.pagination-next,.pagination-previous{padding-left:.75em;padding-right:.75em;white-space:nowrap}.pagination-link.is-current{background-color:#3273dc;border-color:#3273dc;color:#fff}.pagination-ellipsis{color:#b5b5b5;pointer-events:none}.pagination-list{flex-wrap:wrap}@media screen and (max-width:768px){.pagination{flex-wrap:wrap}.pagination-list li,.pagination-next,.pagination-previous{flex-grow:1;flex-shrink:1}}@media print,screen and (min-width:769px){.pagination-list{flex-grow:1;flex-shrink:1;justify-content:flex-start;order:1}.pagination-previous{order:2}.pagination-next{order:3}.pagination{justify-content:space-between}.pagination.is-centered .pagination-previous{order:1}.pagination.is-centered .pagination-list{justify-content:center;order:2}.pagination.is-centered .pagination-next{order:3}.pagination.is-right .pagination-previous{order:1}.pagination.is-right .pagination-next{order:2}.pagination.is-right .pagination-list{justify-content:flex-end;order:3}}.panel{font-size:1rem}.panel:not(:last-child){margin-bottom:1.5rem}.panel-block,.panel-heading,.panel-tabs{border-bottom:1px solid #dbdbdb;border-left:1px solid #dbdbdb;border-right:1px solid #dbdbdb}.panel-block:first-child,.panel-heading:first-child,.panel-tabs:first-child{border-top:1px solid #dbdbdb}.panel-heading{background-color:#f5f5f5;border-radius:4px 4px 0 0;color:#363636;font-size:1.25em;font-weight:300;line-height:1.25;padding:.5em .75em}.panel-tabs{align-items:flex-end;display:flex;font-size:.875em;justify-content:center}.panel-tabs a{border-bottom:1px solid #dbdbdb;margin-bottom:-1px;padding:.5em}.panel-tabs a.is-active{border-bottom-color:#4a4a4a;color:#363636}.panel-list a{color:#4a4a4a}.panel-list a:hover{color:#3273dc}.panel-block{align-items:center;color:#363636;display:flex;justify-content:flex-start;padding:.5em .75em}.panel-block input[type=checkbox]{margin-right:.75em}.panel-block>.control{flex-grow:1;flex-shrink:1;width:100%}.panel-block.is-wrapped{flex-wrap:wrap}.panel-block.is-active{border-left-color:#3273dc;color:#363636}.panel-block.is-active .panel-icon{color:#3273dc}a.panel-block,label.panel-block{cursor:pointer}a.panel-block:hover,label.panel-block:hover{background-color:#f5f5f5}.panel-icon{display:inline-block;font-size:14px;height:1em;line-height:1em;text-align:center;vertical-align:top;width:1em;color:#7a7a7a;margin-right:.75em}.panel-icon .fa{font-size:inherit;line-height:inherit}.tabs{-webkit-overflow-scrolling:touch;align-items:stretch;display:flex;font-size:1rem;justify-content:space-between;overflow:hidden;overflow-x:auto;white-space:nowrap}.tabs a{align-items:center;border-bottom-color:#dbdbdb;border-bottom-style:solid;border-bottom-width:1px;color:#4a4a4a;display:flex;justify-content:center;margin-bottom:-1px;padding:.5em 1em;vertical-align:top}.tabs a:hover{border-bottom-color:#363636;color:#363636}.tabs li{display:block}.tabs li.is-active a{border-bottom-color:#3273dc;color:#3273dc}.tabs ul{align-items:center;border-bottom-color:#dbdbdb;border-bottom-style:solid;border-bottom-width:1px;display:flex;flex-grow:1;flex-shrink:0;justify-content:flex-start}.tabs ul.is-center,.tabs ul.is-left{padding-right:.75em}.tabs ul.is-center{flex:none;justify-content:center;padding-left:.75em}.tabs ul.is-right{justify-content:flex-end;padding-left:.75em}.tabs .icon:first-child{margin-right:.5em}.tabs .icon:last-child{margin-left:.5em}.tabs.is-centered ul{justify-content:center}.tabs.is-right ul{justify-content:flex-end}.tabs.is-boxed a{border:1px solid transparent;border-radius:4px 4px 0 0}.tabs.is-boxed a:hover{background-color:#f5f5f5;border-bottom-color:#dbdbdb}.tabs.is-boxed li.is-active a{background-color:#fff;border-color:#dbdbdb;border-bottom-color:transparent!important}.tabs.is-fullwidth li{flex-grow:1;flex-shrink:0}.tabs.is-toggle a{border:1px solid #dbdbdb;margin-bottom:0;position:relative}.tabs.is-toggle a:hover{background-color:#f5f5f5;border-color:#b5b5b5;z-index:2}.tabs.is-toggle li+li{margin-left:-1px}.tabs.is-toggle li:first-child a{border-radius:4px 0 0 4px}.tabs.is-toggle li:last-child a{border-radius:0 4px 4px 0}.tabs.is-toggle li.is-active a{background-color:#3273dc;border-color:#3273dc;color:#fff;z-index:1}.tabs.is-toggle ul{border-bottom:none}.tabs.is-toggle.is-toggle-rounded li:first-child a{border-bottom-left-radius:290486px;border-top-left-radius:290486px;padding-left:1.25em}.tabs.is-toggle.is-toggle-rounded li:last-child a{border-bottom-right-radius:290486px;border-top-right-radius:290486px;padding-right:1.25em}.tabs.is-small{font-size:.75rem}.tabs.is-medium{font-size:1.25rem}.tabs.is-large{font-size:1.5rem}.column{display:block;flex-basis:0;flex-grow:1;flex-shrink:1;padding:.75rem}.columns.is-mobile>.column.is-narrow{flex:none}.columns.is-mobile>.column.is-full{flex:none;width:100%}.columns.is-mobile>.column.is-three-quarters{flex:none;width:75%}.columns.is-mobile>.column.is-two-thirds{flex:none;width:66.6666%}.columns.is-mobile>.column.is-half{flex:none;width:50%}.columns.is-mobile>.column.is-one-third{flex:none;width:33.3333%}.columns.is-mobile>.column.is-one-quarter{flex:none;width:25%}.columns.is-mobile>.column.is-one-fifth{flex:none;width:20%}.columns.is-mobile>.column.is-two-fifths{flex:none;width:40%}.columns.is-mobile>.column.is-three-fifths{flex:none;width:60%}.columns.is-mobile>.column.is-four-fifths{flex:none;width:80%}.columns.is-mobile>.column.is-offset-three-quarters{margin-left:75%}.columns.is-mobile>.column.is-offset-two-thirds{margin-left:66.6666%}.columns.is-mobile>.column.is-offset-half{margin-left:50%}.columns.is-mobile>.column.is-offset-one-third{margin-left:33.3333%}.columns.is-mobile>.column.is-offset-one-quarter{margin-left:25%}.columns.is-mobile>.column.is-offset-one-fifth{margin-left:20%}.columns.is-mobile>.column.is-offset-two-fifths{margin-left:40%}.columns.is-mobile>.column.is-offset-three-fifths{margin-left:60%}.columns.is-mobile>.column.is-offset-four-fifths{margin-left:80%}.columns.is-mobile>.column.is-1{flex:none;width:8.33333%}.columns.is-mobile>.column.is-offset-1{margin-left:8.33333%}.columns.is-mobile>.column.is-2{flex:none;width:16.66667%}.columns.is-mobile>.column.is-offset-2{margin-left:16.66667%}.columns.is-mobile>.column.is-3{flex:none;width:25%}.columns.is-mobile>.column.is-offset-3{margin-left:25%}.columns.is-mobile>.column.is-4{flex:none;width:33.33333%}.columns.is-mobile>.column.is-offset-4{margin-left:33.33333%}.columns.is-mobile>.column.is-5{flex:none;width:41.66667%}.columns.is-mobile>.column.is-offset-5{margin-left:41.66667%}.columns.is-mobile>.column.is-6{flex:none;width:50%}.columns.is-mobile>.column.is-offset-6{margin-left:50%}.columns.is-mobile>.column.is-7{flex:none;width:58.33333%}.columns.is-mobile>.column.is-offset-7{margin-left:58.33333%}.columns.is-mobile>.column.is-8{flex:none;width:66.66667%}.columns.is-mobile>.column.is-offset-8{margin-left:66.66667%}.columns.is-mobile>.column.is-9{flex:none;width:75%}.columns.is-mobile>.column.is-offset-9{margin-left:75%}.columns.is-mobile>.column.is-10{flex:none;width:83.33333%}.columns.is-mobile>.column.is-offset-10{margin-left:83.33333%}.columns.is-mobile>.column.is-11{flex:none;width:91.66667%}.columns.is-mobile>.column.is-offset-11{margin-left:91.66667%}.columns.is-mobile>.column.is-12{flex:none;width:100%}.columns.is-mobile>.column.is-offset-12{margin-left:100%}@media screen and (max-width:768px){.column.is-narrow-mobile{flex:none}.column.is-full-mobile{flex:none;width:100%}.column.is-three-quarters-mobile{flex:none;width:75%}.column.is-two-thirds-mobile{flex:none;width:66.6666%}.column.is-half-mobile{flex:none;width:50%}.column.is-one-third-mobile{flex:none;width:33.3333%}.column.is-one-quarter-mobile{flex:none;width:25%}.column.is-one-fifth-mobile{flex:none;width:20%}.column.is-two-fifths-mobile{flex:none;width:40%}.column.is-three-fifths-mobile{flex:none;width:60%}.column.is-four-fifths-mobile{flex:none;width:80%}.column.is-offset-three-quarters-mobile{margin-left:75%}.column.is-offset-two-thirds-mobile{margin-left:66.6666%}.column.is-offset-half-mobile{margin-left:50%}.column.is-offset-one-third-mobile{margin-left:33.3333%}.column.is-offset-one-quarter-mobile{margin-left:25%}.column.is-offset-one-fifth-mobile{margin-left:20%}.column.is-offset-two-fifths-mobile{margin-left:40%}.column.is-offset-three-fifths-mobile{margin-left:60%}.column.is-offset-four-fifths-mobile{margin-left:80%}.column.is-1-mobile{flex:none;width:8.33333%}.column.is-offset-1-mobile{margin-left:8.33333%}.column.is-2-mobile{flex:none;width:16.66667%}.column.is-offset-2-mobile{margin-left:16.66667%}.column.is-3-mobile{flex:none;width:25%}.column.is-offset-3-mobile{margin-left:25%}.column.is-4-mobile{flex:none;width:33.33333%}.column.is-offset-4-mobile{margin-left:33.33333%}.column.is-5-mobile{flex:none;width:41.66667%}.column.is-offset-5-mobile{margin-left:41.66667%}.column.is-6-mobile{flex:none;width:50%}.column.is-offset-6-mobile{margin-left:50%}.column.is-7-mobile{flex:none;width:58.33333%}.column.is-offset-7-mobile{margin-left:58.33333%}.column.is-8-mobile{flex:none;width:66.66667%}.column.is-offset-8-mobile{margin-left:66.66667%}.column.is-9-mobile{flex:none;width:75%}.column.is-offset-9-mobile{margin-left:75%}.column.is-10-mobile{flex:none;width:83.33333%}.column.is-offset-10-mobile{margin-left:83.33333%}.column.is-11-mobile{flex:none;width:91.66667%}.column.is-offset-11-mobile{margin-left:91.66667%}.column.is-12-mobile{flex:none;width:100%}.column.is-offset-12-mobile{margin-left:100%}}@media print,screen and (min-width:769px){.column.is-narrow,.column.is-narrow-tablet{flex:none}.column.is-full,.column.is-full-tablet{flex:none;width:100%}.column.is-three-quarters,.column.is-three-quarters-tablet{flex:none;width:75%}.column.is-two-thirds,.column.is-two-thirds-tablet{flex:none;width:66.6666%}.column.is-half,.column.is-half-tablet{flex:none;width:50%}.column.is-one-third,.column.is-one-third-tablet{flex:none;width:33.3333%}.column.is-one-quarter,.column.is-one-quarter-tablet{flex:none;width:25%}.column.is-one-fifth,.column.is-one-fifth-tablet{flex:none;width:20%}.column.is-two-fifths,.column.is-two-fifths-tablet{flex:none;width:40%}.column.is-three-fifths,.column.is-three-fifths-tablet{flex:none;width:60%}.column.is-four-fifths,.column.is-four-fifths-tablet{flex:none;width:80%}.column.is-offset-three-quarters,.column.is-offset-three-quarters-tablet{margin-left:75%}.column.is-offset-two-thirds,.column.is-offset-two-thirds-tablet{margin-left:66.6666%}.column.is-offset-half,.column.is-offset-half-tablet{margin-left:50%}.column.is-offset-one-third,.column.is-offset-one-third-tablet{margin-left:33.3333%}.column.is-offset-one-quarter,.column.is-offset-one-quarter-tablet{margin-left:25%}.column.is-offset-one-fifth,.column.is-offset-one-fifth-tablet{margin-left:20%}.column.is-offset-two-fifths,.column.is-offset-two-fifths-tablet{margin-left:40%}.column.is-offset-three-fifths,.column.is-offset-three-fifths-tablet{margin-left:60%}.column.is-offset-four-fifths,.column.is-offset-four-fifths-tablet{margin-left:80%}.column.is-1,.column.is-1-tablet{flex:none;width:8.33333%}.column.is-offset-1,.column.is-offset-1-tablet{margin-left:8.33333%}.column.is-2,.column.is-2-tablet{flex:none;width:16.66667%}.column.is-offset-2,.column.is-offset-2-tablet{margin-left:16.66667%}.column.is-3,.column.is-3-tablet{flex:none;width:25%}.column.is-offset-3,.column.is-offset-3-tablet{margin-left:25%}.column.is-4,.column.is-4-tablet{flex:none;width:33.33333%}.column.is-offset-4,.column.is-offset-4-tablet{margin-left:33.33333%}.column.is-5,.column.is-5-tablet{flex:none;width:41.66667%}.column.is-offset-5,.column.is-offset-5-tablet{margin-left:41.66667%}.column.is-6,.column.is-6-tablet{flex:none;width:50%}.column.is-offset-6,.column.is-offset-6-tablet{margin-left:50%}.column.is-7,.column.is-7-tablet{flex:none;width:58.33333%}.column.is-offset-7,.column.is-offset-7-tablet{margin-left:58.33333%}.column.is-8,.column.is-8-tablet{flex:none;width:66.66667%}.column.is-offset-8,.column.is-offset-8-tablet{margin-left:66.66667%}.column.is-9,.column.is-9-tablet{flex:none;width:75%}.column.is-offset-9,.column.is-offset-9-tablet{margin-left:75%}.column.is-10,.column.is-10-tablet{flex:none;width:83.33333%}.column.is-offset-10,.column.is-offset-10-tablet{margin-left:83.33333%}.column.is-11,.column.is-11-tablet{flex:none;width:91.66667%}.column.is-offset-11,.column.is-offset-11-tablet{margin-left:91.66667%}.column.is-12,.column.is-12-tablet{flex:none;width:100%}.column.is-offset-12,.column.is-offset-12-tablet{margin-left:100%}}@media screen and (max-width:1087px){.column.is-narrow-touch{flex:none}.column.is-full-touch{flex:none;width:100%}.column.is-three-quarters-touch{flex:none;width:75%}.column.is-two-thirds-touch{flex:none;width:66.6666%}.column.is-half-touch{flex:none;width:50%}.column.is-one-third-touch{flex:none;width:33.3333%}.column.is-one-quarter-touch{flex:none;width:25%}.column.is-one-fifth-touch{flex:none;width:20%}.column.is-two-fifths-touch{flex:none;width:40%}.column.is-three-fifths-touch{flex:none;width:60%}.column.is-four-fifths-touch{flex:none;width:80%}.column.is-offset-three-quarters-touch{margin-left:75%}.column.is-offset-two-thirds-touch{margin-left:66.6666%}.column.is-offset-half-touch{margin-left:50%}.column.is-offset-one-third-touch{margin-left:33.3333%}.column.is-offset-one-quarter-touch{margin-left:25%}.column.is-offset-one-fifth-touch{margin-left:20%}.column.is-offset-two-fifths-touch{margin-left:40%}.column.is-offset-three-fifths-touch{margin-left:60%}.column.is-offset-four-fifths-touch{margin-left:80%}.column.is-1-touch{flex:none;width:8.33333%}.column.is-offset-1-touch{margin-left:8.33333%}.column.is-2-touch{flex:none;width:16.66667%}.column.is-offset-2-touch{margin-left:16.66667%}.column.is-3-touch{flex:none;width:25%}.column.is-offset-3-touch{margin-left:25%}.column.is-4-touch{flex:none;width:33.33333%}.column.is-offset-4-touch{margin-left:33.33333%}.column.is-5-touch{flex:none;width:41.66667%}.column.is-offset-5-touch{margin-left:41.66667%}.column.is-6-touch{flex:none;width:50%}.column.is-offset-6-touch{margin-left:50%}.column.is-7-touch{flex:none;width:58.33333%}.column.is-offset-7-touch{margin-left:58.33333%}.column.is-8-touch{flex:none;width:66.66667%}.column.is-offset-8-touch{margin-left:66.66667%}.column.is-9-touch{flex:none;width:75%}.column.is-offset-9-touch{margin-left:75%}.column.is-10-touch{flex:none;width:83.33333%}.column.is-offset-10-touch{margin-left:83.33333%}.column.is-11-touch{flex:none;width:91.66667%}.column.is-offset-11-touch{margin-left:91.66667%}.column.is-12-touch{flex:none;width:100%}.column.is-offset-12-touch{margin-left:100%}}@media screen and (min-width:1088px){.column.is-narrow-desktop{flex:none}.column.is-full-desktop{flex:none;width:100%}.column.is-three-quarters-desktop{flex:none;width:75%}.column.is-two-thirds-desktop{flex:none;width:66.6666%}.column.is-half-desktop{flex:none;width:50%}.column.is-one-third-desktop{flex:none;width:33.3333%}.column.is-one-quarter-desktop{flex:none;width:25%}.column.is-one-fifth-desktop{flex:none;width:20%}.column.is-two-fifths-desktop{flex:none;width:40%}.column.is-three-fifths-desktop{flex:none;width:60%}.column.is-four-fifths-desktop{flex:none;width:80%}.column.is-offset-three-quarters-desktop{margin-left:75%}.column.is-offset-two-thirds-desktop{margin-left:66.6666%}.column.is-offset-half-desktop{margin-left:50%}.column.is-offset-one-third-desktop{margin-left:33.3333%}.column.is-offset-one-quarter-desktop{margin-left:25%}.column.is-offset-one-fifth-desktop{margin-left:20%}.column.is-offset-two-fifths-desktop{margin-left:40%}.column.is-offset-three-fifths-desktop{margin-left:60%}.column.is-offset-four-fifths-desktop{margin-left:80%}.column.is-1-desktop{flex:none;width:8.33333%}.column.is-offset-1-desktop{margin-left:8.33333%}.column.is-2-desktop{flex:none;width:16.66667%}.column.is-offset-2-desktop{margin-left:16.66667%}.column.is-3-desktop{flex:none;width:25%}.column.is-offset-3-desktop{margin-left:25%}.column.is-4-desktop{flex:none;width:33.33333%}.column.is-offset-4-desktop{margin-left:33.33333%}.column.is-5-desktop{flex:none;width:41.66667%}.column.is-offset-5-desktop{margin-left:41.66667%}.column.is-6-desktop{flex:none;width:50%}.column.is-offset-6-desktop{margin-left:50%}.column.is-7-desktop{flex:none;width:58.33333%}.column.is-offset-7-desktop{margin-left:58.33333%}.column.is-8-desktop{flex:none;width:66.66667%}.column.is-offset-8-desktop{margin-left:66.66667%}.column.is-9-desktop{flex:none;width:75%}.column.is-offset-9-desktop{margin-left:75%}.column.is-10-desktop{flex:none;width:83.33333%}.column.is-offset-10-desktop{margin-left:83.33333%}.column.is-11-desktop{flex:none;width:91.66667%}.column.is-offset-11-desktop{margin-left:91.66667%}.column.is-12-desktop{flex:none;width:100%}.column.is-offset-12-desktop{margin-left:100%}}@media screen and (min-width:1280px){.column.is-narrow-widescreen{flex:none}.column.is-full-widescreen{flex:none;width:100%}.column.is-three-quarters-widescreen{flex:none;width:75%}.column.is-two-thirds-widescreen{flex:none;width:66.6666%}.column.is-half-widescreen{flex:none;width:50%}.column.is-one-third-widescreen{flex:none;width:33.3333%}.column.is-one-quarter-widescreen{flex:none;width:25%}.column.is-one-fifth-widescreen{flex:none;width:20%}.column.is-two-fifths-widescreen{flex:none;width:40%}.column.is-three-fifths-widescreen{flex:none;width:60%}.column.is-four-fifths-widescreen{flex:none;width:80%}.column.is-offset-three-quarters-widescreen{margin-left:75%}.column.is-offset-two-thirds-widescreen{margin-left:66.6666%}.column.is-offset-half-widescreen{margin-left:50%}.column.is-offset-one-third-widescreen{margin-left:33.3333%}.column.is-offset-one-quarter-widescreen{margin-left:25%}.column.is-offset-one-fifth-widescreen{margin-left:20%}.column.is-offset-two-fifths-widescreen{margin-left:40%}.column.is-offset-three-fifths-widescreen{margin-left:60%}.column.is-offset-four-fifths-widescreen{margin-left:80%}.column.is-1-widescreen{flex:none;width:8.33333%}.column.is-offset-1-widescreen{margin-left:8.33333%}.column.is-2-widescreen{flex:none;width:16.66667%}.column.is-offset-2-widescreen{margin-left:16.66667%}.column.is-3-widescreen{flex:none;width:25%}.column.is-offset-3-widescreen{margin-left:25%}.column.is-4-widescreen{flex:none;width:33.33333%}.column.is-offset-4-widescreen{margin-left:33.33333%}.column.is-5-widescreen{flex:none;width:41.66667%}.column.is-offset-5-widescreen{margin-left:41.66667%}.column.is-6-widescreen{flex:none;width:50%}.column.is-offset-6-widescreen{margin-left:50%}.column.is-7-widescreen{flex:none;width:58.33333%}.column.is-offset-7-widescreen{margin-left:58.33333%}.column.is-8-widescreen{flex:none;width:66.66667%}.column.is-offset-8-widescreen{margin-left:66.66667%}.column.is-9-widescreen{flex:none;width:75%}.column.is-offset-9-widescreen{margin-left:75%}.column.is-10-widescreen{flex:none;width:83.33333%}.column.is-offset-10-widescreen{margin-left:83.33333%}.column.is-11-widescreen{flex:none;width:91.66667%}.column.is-offset-11-widescreen{margin-left:91.66667%}.column.is-12-widescreen{flex:none;width:100%}.column.is-offset-12-widescreen{margin-left:100%}}@media screen and (min-width:1472px){.column.is-narrow-fullhd{flex:none}.column.is-full-fullhd{flex:none;width:100%}.column.is-three-quarters-fullhd{flex:none;width:75%}.column.is-two-thirds-fullhd{flex:none;width:66.6666%}.column.is-half-fullhd{flex:none;width:50%}.column.is-one-third-fullhd{flex:none;width:33.3333%}.column.is-one-quarter-fullhd{flex:none;width:25%}.column.is-one-fifth-fullhd{flex:none;width:20%}.column.is-two-fifths-fullhd{flex:none;width:40%}.column.is-three-fifths-fullhd{flex:none;width:60%}.column.is-four-fifths-fullhd{flex:none;width:80%}.column.is-offset-three-quarters-fullhd{margin-left:75%}.column.is-offset-two-thirds-fullhd{margin-left:66.6666%}.column.is-offset-half-fullhd{margin-left:50%}.column.is-offset-one-third-fullhd{margin-left:33.3333%}.column.is-offset-one-quarter-fullhd{margin-left:25%}.column.is-offset-one-fifth-fullhd{margin-left:20%}.column.is-offset-two-fifths-fullhd{margin-left:40%}.column.is-offset-three-fifths-fullhd{margin-left:60%}.column.is-offset-four-fifths-fullhd{margin-left:80%}.column.is-1-fullhd{flex:none;width:8.33333%}.column.is-offset-1-fullhd{margin-left:8.33333%}.column.is-2-fullhd{flex:none;width:16.66667%}.column.is-offset-2-fullhd{margin-left:16.66667%}.column.is-3-fullhd{flex:none;width:25%}.column.is-offset-3-fullhd{margin-left:25%}.column.is-4-fullhd{flex:none;width:33.33333%}.column.is-offset-4-fullhd{margin-left:33.33333%}.column.is-5-fullhd{flex:none;width:41.66667%}.column.is-offset-5-fullhd{margin-left:41.66667%}.column.is-6-fullhd{flex:none;width:50%}.column.is-offset-6-fullhd{margin-left:50%}.column.is-7-fullhd{flex:none;width:58.33333%}.column.is-offset-7-fullhd{margin-left:58.33333%}.column.is-8-fullhd{flex:none;width:66.66667%}.column.is-offset-8-fullhd{margin-left:66.66667%}.column.is-9-fullhd{flex:none;width:75%}.column.is-offset-9-fullhd{margin-left:75%}.column.is-10-fullhd{flex:none;width:83.33333%}.column.is-offset-10-fullhd{margin-left:83.33333%}.column.is-11-fullhd{flex:none;width:91.66667%}.column.is-offset-11-fullhd{margin-left:91.66667%}.column.is-12-fullhd{flex:none;width:100%}.column.is-offset-12-fullhd{margin-left:100%}}.columns{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.columns:last-child{margin-bottom:-.75rem}.columns:not(:last-child){margin-bottom:0.75rem}.columns.is-centered{justify-content:center}.columns.is-gapless{margin-left:0;margin-right:0;margin-top:0}.columns.is-gapless>.column{margin:0;padding:0!important}.columns.is-gapless:not(:last-child){margin-bottom:1.5rem}.columns.is-gapless:last-child{margin-bottom:0}.columns.is-mobile{display:flex}.columns.is-multiline{flex-wrap:wrap}.columns.is-vcentered{align-items:center}@media print,screen and (min-width:769px){.columns:not(.is-desktop){display:flex}}@media screen and (min-width:1088px){.columns.is-desktop{display:flex}}.columns.is-variable{--columnGap:0.75rem;margin-left:calc(-1 * var(--columnGap));margin-right:calc(-1 * var(--columnGap))}.columns.is-variable .column{padding-left:var(--columnGap);padding-right:var(--columnGap)}.columns.is-variable.is-0{--columnGap:0rem}.columns.is-variable.is-1{--columnGap:0.25rem}.columns.is-variable.is-2{--columnGap:0.5rem}.columns.is-variable.is-3{--columnGap:0.75rem}.columns.is-variable.is-4{--columnGap:1rem}.columns.is-variable.is-5{--columnGap:1.25rem}.columns.is-variable.is-6{--columnGap:1.5rem}.columns.is-variable.is-7{--columnGap:1.75rem}.columns.is-variable.is-8{--columnGap:2rem}.tile{align-items:stretch;display:block;flex-basis:0;flex-grow:1;flex-shrink:1;min-height:min-content}.tile.is-ancestor{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.tile.is-ancestor:last-child{margin-bottom:-.75rem}.tile.is-ancestor:not(:last-child){margin-bottom:.75rem}.tile.is-child{margin:0!important}.tile.is-parent{padding:.75rem}.tile.is-vertical{flex-direction:column}.tile.is-vertical>.tile.is-child:not(:last-child){margin-bottom:1.5rem!important}@media print,screen and (min-width:769px){.tile:not(.is-child){display:flex}.tile.is-1{flex:none;width:8.33333%}.tile.is-2{flex:none;width:16.66667%}.tile.is-3{flex:none;width:25%}.tile.is-4{flex:none;width:33.33333%}.tile.is-5{flex:none;width:41.66667%}.tile.is-6{flex:none;width:50%}.tile.is-7{flex:none;width:58.33333%}.tile.is-8{flex:none;width:66.66667%}.tile.is-9{flex:none;width:75%}.tile.is-10{flex:none;width:83.33333%}.tile.is-11{flex:none;width:91.66667%}.tile.is-12{flex:none;width:100%}}.hero{align-items:stretch;display:flex;flex-direction:column;justify-content:space-between}.hero .navbar{background:none}.hero .tabs ul{border-bottom:none}.hero.is-white{background-color:#fff;color:#0a0a0a}.hero.is-white a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-white strong{color:inherit}.hero.is-white .title{color:#0a0a0a}.hero.is-white .subtitle{color:hsla(0,0%,4%,.9)}.hero.is-white .subtitle a:not(.button),.hero.is-white .subtitle strong{color:#0a0a0a}@media screen and (max-width:1087px){.hero.is-white .navbar-menu{background-color:#fff}}.hero.is-white .navbar-item,.hero.is-white .navbar-link{color:hsla(0,0%,4%,.7)}.hero.is-white .navbar-link.is-active,.hero.is-white .navbar-link:hover,.hero.is-white a.navbar-item.is-active,.hero.is-white a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.hero.is-white .tabs a{color:#0a0a0a;opacity:.9}.hero.is-white .tabs a:hover,.hero.is-white .tabs li.is-active a{opacity:1}.hero.is-white .tabs.is-boxed a,.hero.is-white .tabs.is-toggle a{color:#0a0a0a}.hero.is-white .tabs.is-boxed a:hover,.hero.is-white .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-white .tabs.is-boxed li.is-active a,.hero.is-white .tabs.is-boxed li.is-active a:hover,.hero.is-white .tabs.is-toggle li.is-active a,.hero.is-white .tabs.is-toggle li.is-active a:hover{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.hero.is-white.is-bold{background-image:linear-gradient(141deg,#e6e6e6,#fff 71%,#fff)}@media screen and (max-width:768px){.hero.is-white.is-bold .navbar-menu{background-image:linear-gradient(141deg,#e6e6e6,#fff 71%,#fff)}}.hero.is-black{background-color:#0a0a0a;color:#fff}.hero.is-black a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-black strong{color:inherit}.hero.is-black .title{color:#fff}.hero.is-black .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-black .subtitle a:not(.button),.hero.is-black .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-black .navbar-menu{background-color:#0a0a0a}}.hero.is-black .navbar-item,.hero.is-black .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-black .navbar-link.is-active,.hero.is-black .navbar-link:hover,.hero.is-black a.navbar-item.is-active,.hero.is-black a.navbar-item:hover{background-color:#000;color:#fff}.hero.is-black .tabs a{color:#fff;opacity:.9}.hero.is-black .tabs a:hover,.hero.is-black .tabs li.is-active a{opacity:1}.hero.is-black .tabs.is-boxed a,.hero.is-black .tabs.is-toggle a{color:#fff}.hero.is-black .tabs.is-boxed a:hover,.hero.is-black .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-black .tabs.is-boxed li.is-active a,.hero.is-black .tabs.is-boxed li.is-active a:hover,.hero.is-black .tabs.is-toggle li.is-active a,.hero.is-black .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#0a0a0a}.hero.is-black.is-bold{background-image:linear-gradient(141deg,#000,#0a0a0a 71%,#181616)}@media screen and (max-width:768px){.hero.is-black.is-bold .navbar-menu{background-image:linear-gradient(141deg,#000,#0a0a0a 71%,#181616)}}.hero.is-light{background-color:#f5f5f5;color:#363636}.hero.is-light a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-light strong{color:inherit}.hero.is-light .title{color:#363636}.hero.is-light .subtitle{color:rgba(54,54,54,.9)}.hero.is-light .subtitle a:not(.button),.hero.is-light .subtitle strong{color:#363636}@media screen and (max-width:1087px){.hero.is-light .navbar-menu{background-color:#f5f5f5}}.hero.is-light .navbar-item,.hero.is-light .navbar-link{color:rgba(54,54,54,.7)}.hero.is-light .navbar-link.is-active,.hero.is-light .navbar-link:hover,.hero.is-light a.navbar-item.is-active,.hero.is-light a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.hero.is-light .tabs a{color:#363636;opacity:.9}.hero.is-light .tabs a:hover,.hero.is-light .tabs li.is-active a{opacity:1}.hero.is-light .tabs.is-boxed a,.hero.is-light .tabs.is-toggle a{color:#363636}.hero.is-light .tabs.is-boxed a:hover,.hero.is-light .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-light .tabs.is-boxed li.is-active a,.hero.is-light .tabs.is-boxed li.is-active a:hover,.hero.is-light .tabs.is-toggle li.is-active a,.hero.is-light .tabs.is-toggle li.is-active a:hover{background-color:#363636;border-color:#363636;color:#f5f5f5}.hero.is-light.is-bold{background-image:linear-gradient(141deg,#dfd8d9,#f5f5f5 71%,#fff)}@media screen and (max-width:768px){.hero.is-light.is-bold .navbar-menu{background-image:linear-gradient(141deg,#dfd8d9,#f5f5f5 71%,#fff)}}.hero.is-dark{background-color:#363636;color:#f5f5f5}.hero.is-dark a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-dark strong{color:inherit}.hero.is-dark .title{color:#f5f5f5}.hero.is-dark .subtitle{color:hsla(0,0%,96%,.9)}.hero.is-dark .subtitle a:not(.button),.hero.is-dark .subtitle strong{color:#f5f5f5}@media screen and (max-width:1087px){.hero.is-dark .navbar-menu{background-color:#363636}}.hero.is-dark .navbar-item,.hero.is-dark .navbar-link{color:hsla(0,0%,96%,.7)}.hero.is-dark .navbar-link.is-active,.hero.is-dark .navbar-link:hover,.hero.is-dark a.navbar-item.is-active,.hero.is-dark a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.hero.is-dark .tabs a{color:#f5f5f5;opacity:.9}.hero.is-dark .tabs a:hover,.hero.is-dark .tabs li.is-active a{opacity:1}.hero.is-dark .tabs.is-boxed a,.hero.is-dark .tabs.is-toggle a{color:#f5f5f5}.hero.is-dark .tabs.is-boxed a:hover,.hero.is-dark .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-dark .tabs.is-boxed li.is-active a,.hero.is-dark .tabs.is-boxed li.is-active a:hover,.hero.is-dark .tabs.is-toggle li.is-active a,.hero.is-dark .tabs.is-toggle li.is-active a:hover{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.hero.is-dark.is-bold{background-image:linear-gradient(141deg,#1f191a,#363636 71%,#46403f)}@media screen and (max-width:768px){.hero.is-dark.is-bold .navbar-menu{background-image:linear-gradient(141deg,#1f191a,#363636 71%,#46403f)}}.hero.is-primary{background-color:#00d1b2;color:#fff}.hero.is-primary a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-primary strong{color:inherit}.hero.is-primary .title{color:#fff}.hero.is-primary .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-primary .subtitle a:not(.button),.hero.is-primary .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-primary .navbar-menu{background-color:#00d1b2}}.hero.is-primary .navbar-item,.hero.is-primary .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-primary .navbar-link.is-active,.hero.is-primary .navbar-link:hover,.hero.is-primary a.navbar-item.is-active,.hero.is-primary a.navbar-item:hover{background-color:#00b89c;color:#fff}.hero.is-primary .tabs a{color:#fff;opacity:.9}.hero.is-primary .tabs a:hover,.hero.is-primary .tabs li.is-active a{opacity:1}.hero.is-primary .tabs.is-boxed a,.hero.is-primary .tabs.is-toggle a{color:#fff}.hero.is-primary .tabs.is-boxed a:hover,.hero.is-primary .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-primary .tabs.is-boxed li.is-active a,.hero.is-primary .tabs.is-boxed li.is-active a:hover,.hero.is-primary .tabs.is-toggle li.is-active a,.hero.is-primary .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#00d1b2}.hero.is-primary.is-bold{background-image:linear-gradient(141deg,#009e6c,#00d1b2 71%,#00e7eb)}@media screen and (max-width:768px){.hero.is-primary.is-bold .navbar-menu{background-image:linear-gradient(141deg,#009e6c,#00d1b2 71%,#00e7eb)}}.hero.is-link{background-color:#3273dc;color:#fff}.hero.is-link a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-link strong{color:inherit}.hero.is-link .title{color:#fff}.hero.is-link .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-link .subtitle a:not(.button),.hero.is-link .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-link .navbar-menu{background-color:#3273dc}}.hero.is-link .navbar-item,.hero.is-link .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-link .navbar-link.is-active,.hero.is-link .navbar-link:hover,.hero.is-link a.navbar-item.is-active,.hero.is-link a.navbar-item:hover{background-color:#2366d1;color:#fff}.hero.is-link .tabs a{color:#fff;opacity:.9}.hero.is-link .tabs a:hover,.hero.is-link .tabs li.is-active a{opacity:1}.hero.is-link .tabs.is-boxed a,.hero.is-link .tabs.is-toggle a{color:#fff}.hero.is-link .tabs.is-boxed a:hover,.hero.is-link .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-link .tabs.is-boxed li.is-active a,.hero.is-link .tabs.is-boxed li.is-active a:hover,.hero.is-link .tabs.is-toggle li.is-active a,.hero.is-link .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#3273dc}.hero.is-link.is-bold{background-image:linear-gradient(141deg,#1577c6,#3273dc 71%,#4366e5)}@media screen and (max-width:768px){.hero.is-link.is-bold .navbar-menu{background-image:linear-gradient(141deg,#1577c6,#3273dc 71%,#4366e5)}}.hero.is-info{background-color:#209cee;color:#fff}.hero.is-info a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-info strong{color:inherit}.hero.is-info .title{color:#fff}.hero.is-info .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-info .subtitle a:not(.button),.hero.is-info .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-info .navbar-menu{background-color:#209cee}}.hero.is-info .navbar-item,.hero.is-info .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-info .navbar-link.is-active,.hero.is-info .navbar-link:hover,.hero.is-info a.navbar-item.is-active,.hero.is-info a.navbar-item:hover{background-color:#118fe4;color:#fff}.hero.is-info .tabs a{color:#fff;opacity:.9}.hero.is-info .tabs a:hover,.hero.is-info .tabs li.is-active a{opacity:1}.hero.is-info .tabs.is-boxed a,.hero.is-info .tabs.is-toggle a{color:#fff}.hero.is-info .tabs.is-boxed a:hover,.hero.is-info .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-info .tabs.is-boxed li.is-active a,.hero.is-info .tabs.is-boxed li.is-active a:hover,.hero.is-info .tabs.is-toggle li.is-active a,.hero.is-info .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#209cee}.hero.is-info.is-bold{background-image:linear-gradient(141deg,#04a6d7,#209cee 71%,#3287f5)}@media screen and (max-width:768px){.hero.is-info.is-bold .navbar-menu{background-image:linear-gradient(141deg,#04a6d7,#209cee 71%,#3287f5)}}.hero.is-success{background-color:#23d160;color:#fff}.hero.is-success a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-success strong{color:inherit}.hero.is-success .title{color:#fff}.hero.is-success .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-success .subtitle a:not(.button),.hero.is-success .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-success .navbar-menu{background-color:#23d160}}.hero.is-success .navbar-item,.hero.is-success .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-success .navbar-link.is-active,.hero.is-success .navbar-link:hover,.hero.is-success a.navbar-item.is-active,.hero.is-success a.navbar-item:hover{background-color:#20bc56;color:#fff}.hero.is-success .tabs a{color:#fff;opacity:.9}.hero.is-success .tabs a:hover,.hero.is-success .tabs li.is-active a{opacity:1}.hero.is-success .tabs.is-boxed a,.hero.is-success .tabs.is-toggle a{color:#fff}.hero.is-success .tabs.is-boxed a:hover,.hero.is-success .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-success .tabs.is-boxed li.is-active a,.hero.is-success .tabs.is-boxed li.is-active a:hover,.hero.is-success .tabs.is-toggle li.is-active a,.hero.is-success .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#23d160}.hero.is-success.is-bold{background-image:linear-gradient(141deg,#12af2f,#23d160 71%,#2ce28a)}@media screen and (max-width:768px){.hero.is-success.is-bold .navbar-menu{background-image:linear-gradient(141deg,#12af2f,#23d160 71%,#2ce28a)}}.hero.is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.hero.is-warning a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-warning strong{color:inherit}.hero.is-warning .title{color:rgba(0,0,0,.7)}.hero.is-warning .subtitle{color:rgba(0,0,0,.9)}.hero.is-warning .subtitle a:not(.button),.hero.is-warning .subtitle strong{color:rgba(0,0,0,.7)}@media screen and (max-width:1087px){.hero.is-warning .navbar-menu{background-color:#ffdd57}}.hero.is-warning .navbar-item,.hero.is-warning .navbar-link{color:rgba(0,0,0,.7)}.hero.is-warning .navbar-link.is-active,.hero.is-warning .navbar-link:hover,.hero.is-warning a.navbar-item.is-active,.hero.is-warning a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.hero.is-warning .tabs a{color:rgba(0,0,0,.7);opacity:.9}.hero.is-warning .tabs a:hover,.hero.is-warning .tabs li.is-active a{opacity:1}.hero.is-warning .tabs.is-boxed a,.hero.is-warning .tabs.is-toggle a{color:rgba(0,0,0,.7)}.hero.is-warning .tabs.is-boxed a:hover,.hero.is-warning .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-warning .tabs.is-boxed li.is-active a,.hero.is-warning .tabs.is-boxed li.is-active a:hover,.hero.is-warning .tabs.is-toggle li.is-active a,.hero.is-warning .tabs.is-toggle li.is-active a:hover{background-color:rgba(0,0,0,.7);border-color:rgba(0,0,0,.7);color:#ffdd57}.hero.is-warning.is-bold{background-image:linear-gradient(141deg,#ffaf24,#ffdd57 71%,#fffa70)}@media screen and (max-width:768px){.hero.is-warning.is-bold .navbar-menu{background-image:linear-gradient(141deg,#ffaf24,#ffdd57 71%,#fffa70)}}.hero.is-danger{background-color:#ff3860;color:#fff}.hero.is-danger a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-danger strong{color:inherit}.hero.is-danger .title{color:#fff}.hero.is-danger .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-danger .subtitle a:not(.button),.hero.is-danger .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-danger .navbar-menu{background-color:#ff3860}}.hero.is-danger .navbar-item,.hero.is-danger .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-danger .navbar-link.is-active,.hero.is-danger .navbar-link:hover,.hero.is-danger a.navbar-item.is-active,.hero.is-danger a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.hero.is-danger .tabs a{color:#fff;opacity:.9}.hero.is-danger .tabs a:hover,.hero.is-danger .tabs li.is-active a{opacity:1}.hero.is-danger .tabs.is-boxed a,.hero.is-danger .tabs.is-toggle a{color:#fff}.hero.is-danger .tabs.is-boxed a:hover,.hero.is-danger .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-danger .tabs.is-boxed li.is-active a,.hero.is-danger .tabs.is-boxed li.is-active a:hover,.hero.is-danger .tabs.is-toggle li.is-active a,.hero.is-danger .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#ff3860}.hero.is-danger.is-bold{background-image:linear-gradient(141deg,#ff0561,#ff3860 71%,#ff5257)}@media screen and (max-width:768px){.hero.is-danger.is-bold .navbar-menu{background-image:linear-gradient(141deg,#ff0561,#ff3860 71%,#ff5257)}}.hero.is-small .hero-body{padding-bottom:1.5rem;padding-top:1.5rem}@media print,screen and (min-width:769px){.hero.is-medium .hero-body{padding-bottom:9rem;padding-top:9rem}}@media print,screen and (min-width:769px){.hero.is-large .hero-body{padding-bottom:18rem;padding-top:18rem}}.hero.is-fullheight .hero-body,.hero.is-halfheight .hero-body{align-items:center;display:flex}.hero.is-fullheight .hero-body>.container,.hero.is-halfheight .hero-body>.container{flex-grow:1;flex-shrink:1}.hero.is-halfheight{min-height:50vh}.hero.is-fullheight{min-height:100vh}.hero-video{overflow:hidden}.hero-video video{left:50%;min-height:100%;min-width:100%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.hero-video.is-transparent{opacity:.3}@media screen and (max-width:768px){.hero-video{display:none}}.hero-buttons{margin-top:1.5rem}@media screen and (max-width:768px){.hero-buttons .button{display:flex}.hero-buttons .button:not(:last-child){margin-bottom:.75rem}}@media print,screen and (min-width:769px){.hero-buttons{display:flex;justify-content:center}.hero-buttons .button:not(:last-child){margin-right:1.5rem}}.hero-foot,.hero-head{flex-grow:0;flex-shrink:0}.hero-body{flex-grow:1;flex-shrink:0}.hero-body,.section{padding:3rem 1.5rem}@media screen and (min-width:1088px){.section.is-medium{padding:9rem 1.5rem}.section.is-large{padding:18rem 1.5rem}}.footer{background-color:#fafafa;padding:3rem 1.5rem 6rem}.is-noscroll{position:fixed;overflow-y:hidden;width:100%;bottom:0}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{animation-name:fadeOut}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;transform:translate3d(0,100%,0)}}.fadeOutDown{animation-name:fadeOutDown}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;transform:translate3d(0,-100%,0)}}.fadeOutUp{animation-name:fadeOutUp}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{animation-name:fadeIn}@keyframes fadeInDown{0%{opacity:0;transform:translate3d(0,-100%,0)}to{opacity:1;transform:none}}.fadeInDown{animation-name:fadeInDown}@keyframes fadeInUp{0%{opacity:0;transform:translate3d(0,100%,0)}to{opacity:1;transform:none}}.fadeInUp{animation-name:fadeInUp}.fade-enter-active,.fade-leave-active{transition:opacity .15s ease-out}.fade-enter,.fade-leave-to{opacity:0}.zoom-in-enter-active,.zoom-in-leave-active{transition:opacity .15s ease-out}.zoom-in-enter-active .animation-content,.zoom-in-leave-active .animation-content{transition:transform .15s ease-out}.zoom-in-enter,.zoom-in-leave-active{opacity:0}.zoom-in-enter .animation-content,.zoom-in-leave-active .animation-content{transform:scale(.95)}.zoom-out-enter-active,.zoom-out-leave-active{transition:opacity .15s ease-out}.zoom-out-enter-active .animation-content,.zoom-out-leave-active .animation-content{transition:transform .15s ease-out}.zoom-out-enter,.zoom-out-leave-active{opacity:0}.zoom-out-enter .animation-content,.zoom-out-leave-active .animation-content{transform:scale(1.05)}.slide-next-enter-active,.slide-next-leave-active,.slide-prev-enter-active,.slide-prev-leave-active{transition:transform .25s cubic-bezier(.785,.135,.15,.86)}.slide-next-enter,.slide-prev-leave-to{transform:translate3d(-100%,0,0);position:absolute;width:100%}.slide-next-leave-to,.slide-prev-enter{transform:translate3d(100%,0,0);position:absolute;width:100%}.autocomplete{position:relative}.autocomplete .dropdown-menu{display:block;min-width:100%;max-width:100%}.autocomplete .dropdown-menu.is-opened-top{top:auto;bottom:100%}.autocomplete .dropdown-content{overflow:auto;max-height:200px}.autocomplete .dropdown-item,.autocomplete .dropdown .dropdown-menu .has-link a,.dropdown .dropdown-menu .has-link .autocomplete a{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.autocomplete .dropdown-item.is-hovered,.autocomplete .dropdown .dropdown-menu .has-link a.is-hovered,.dropdown .dropdown-menu .has-link .autocomplete a.is-hovered{background:#f5f5f5;color:#0a0a0a}.autocomplete .dropdown-item.is-disabled,.autocomplete .dropdown .dropdown-menu .has-link a.is-disabled,.dropdown .dropdown-menu .has-link .autocomplete a.is-disabled{opacity:.5;cursor:not-allowed}.autocomplete.is-small{border-radius:2px;font-size:.75rem}.autocomplete.is-medium{font-size:1.25rem}.autocomplete.is-large{font-size:1.5rem}.b-checkbox.checkbox{outline:none;display:inline-flex;align-items:center}.b-checkbox.checkbox+.checkbox{margin-left:.5em}.b-checkbox.checkbox input[type=checkbox]{position:absolute;left:0;opacity:0;outline:none;z-index:-1}.b-checkbox.checkbox input[type=checkbox]+.check{width:1.25em;height:1.25em;flex-shrink:0;border-radius:4px;border:2px solid #7a7a7a;transition:background .15s ease-out}.b-checkbox.checkbox input[type=checkbox]:checked+.check{background:#00d1b2 url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\") no-repeat 50%;border-color:#00d1b2}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-white{background:#fff url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%230a0a0a'/%3E%3C/svg%3E\") no-repeat 50%;border-color:#fff}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-black{background:#0a0a0a url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\") no-repeat 50%;border-color:#0a0a0a}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-light{background:#f5f5f5 url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23363636'/%3E%3C/svg%3E\") no-repeat 50%;border-color:#f5f5f5}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-dark{background:#363636 url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23f5f5f5'/%3E%3C/svg%3E\") no-repeat 50%;border-color:#363636}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-primary{background:#00d1b2 url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\") no-repeat 50%;border-color:#00d1b2}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-link{background:#3273dc url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\") no-repeat 50%;border-color:#3273dc}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-info{background:#209cee url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\") no-repeat 50%;border-color:#209cee}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-success{background:#23d160 url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\") no-repeat 50%;border-color:#23d160}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-warning{background:#ffdd57 url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='rgba(0,0,0,.7)'/%3E%3C/svg%3E\") no-repeat 50%;border-color:#ffdd57}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-danger{background:#ff3860 url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\") no-repeat 50%;border-color:#ff3860}.b-checkbox.checkbox .control-label{padding-left:.5em}.b-checkbox.checkbox[disabled]{opacity:.5}.b-checkbox.checkbox:hover input[type=checkbox]+.check{border-color:#00d1b2}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-white{border-color:#fff}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-black{border-color:#0a0a0a}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-light{border-color:#f5f5f5}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-dark{border-color:#363636}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-primary{border-color:#00d1b2}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-link{border-color:#3273dc}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-info{border-color:#209cee}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-success{border-color:#23d160}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-warning{border-color:#ffdd57}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-danger{border-color:#ff3860}.b-checkbox.checkbox:focus input[type=checkbox]+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-primary{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-link{box-shadow:0 0 .5em rgba(50,115,220,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-info{box-shadow:0 0 .5em rgba(32,156,238,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.b-checkbox.checkbox.is-small{border-radius:2px;font-size:.75rem}.b-checkbox.checkbox.is-medium{font-size:1.25rem}.b-checkbox.checkbox.is-large{font-size:1.5rem}.collapse .collapse-trigger{display:inline;cursor:pointer}.collapse .collapse-content{display:inherit}.datepicker{font-size:.875rem}.datepicker .dropdown,.datepicker .dropdown-trigger{width:100%}.datepicker .dropdown-item,.datepicker .dropdown .dropdown-menu .has-link a,.dropdown .dropdown-menu .has-link .datepicker a{font-size:inherit}.datepicker .datepicker-header{padding-bottom:.875rem;margin-bottom:.875rem;border-bottom:1px solid #dbdbdb}.datepicker .datepicker-footer{padding-top:.875rem;border-top:1px solid #dbdbdb}.datepicker .datepicker-table{display:table;margin:0 auto .875rem}.datepicker .datepicker-table .datepicker-cell{text-align:center;vertical-align:middle;display:table-cell;border-radius:4px;padding:.5rem .75rem}.datepicker .datepicker-table .datepicker-header{display:table-header-group}.datepicker .datepicker-table .datepicker-header .datepicker-cell{color:#7a7a7a;font-weight:600}.datepicker .datepicker-table .datepicker-body{display:table-row-group}.datepicker .datepicker-table .datepicker-body .datepicker-row{display:table-row}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-unselectable{color:#b5b5b5}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-today{border:1px solid rgba(0,209,178,.5)}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable{color:#4a4a4a}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable:focus:not(.is-selected),.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable:hover:not(.is-selected){background-color:#f5f5f5;color:#0a0a0a;cursor:pointer}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selected{background-color:#00d1b2;color:#fff}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell{padding:.3rem .75rem .75rem}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event{position:relative}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events{bottom:.425rem;display:flex;justify-content:center;left:0;padding:0 .35rem;position:absolute;width:100%}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-white{background-color:#fff}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-black{background-color:#0a0a0a}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-light{background-color:#f5f5f5}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-dark{background-color:#363636}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-primary{background-color:#00d1b2}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-link{background-color:#3273dc}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-info{background-color:#209cee}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-success{background-color:#23d160}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-warning{background-color:#ffdd57}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-danger{background-color:#ff3860}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event.dots .event{border-radius:50%;height:.35em;margin:0 .1em;width:.35em}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event.bars .event{height:.25em;width:100%}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.is-selected{overflow:hidden}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.is-selected .events .event.is-primary{background-color:#1fffdd}.datepicker.is-small{border-radius:2px;font-size:.75rem}.datepicker.is-medium{font-size:1.25rem}.datepicker.is-large{font-size:1.5rem}@media screen and (min-width:769px) and (max-width:1087px){.datepicker .datepicker-table .datepicker-cell{padding:.75rem 1rem}}@media screen and (max-width:768px){.datepicker .datepicker-table .datepicker-cell{padding:.25rem .5rem}}.dialog .modal-card{max-width:460px;width:auto}.dialog .modal-card .modal-card-head{font-size:1.25rem;font-weight:600}.dialog .modal-card .modal-card-body .field{margin-top:16px}.dialog .modal-card .modal-card-body.is-titleless{border-top-left-radius:6px;border-top-right-radius:6px}.dialog .modal-card .modal-card-foot{justify-content:flex-end}.dialog .modal-card .modal-card-foot .button{display:inline;min-width:5em;font-weight:600}@media print,screen and (min-width:769px){.dialog .modal-card{min-width:320px}}.dialog.is-small .button,.dialog.is-small .input,.dialog.is-small .modal-card,.dialog.is-small .taginput .taginput-container.is-focusable,.taginput .dialog.is-small .taginput-container.is-focusable{border-radius:2px;font-size:.75rem}.dialog.is-medium .button,.dialog.is-medium .input,.dialog.is-medium .modal-card,.dialog.is-medium .taginput .taginput-container.is-focusable,.taginput .dialog.is-medium .taginput-container.is-focusable{font-size:1.25rem}.dialog.is-large .button,.dialog.is-large .input,.dialog.is-large .modal-card,.dialog.is-large .taginput .taginput-container.is-focusable,.taginput .dialog.is-large .taginput-container.is-focusable{font-size:1.5rem}.dropdown+.dropdown{margin-left:.5em}.dropdown .background{position:fixed;background-color:hsla(0,0%,4%,.86);z-index:10;cursor:pointer}@media screen and (min-width:1088px){.dropdown .background{display:none}}.dropdown .dropdown-menu .dropdown-item.is-disabled,.dropdown .dropdown-menu .has-link a.is-disabled{cursor:not-allowed}.dropdown .dropdown-menu .dropdown-item.is-disabled:hover,.dropdown .dropdown-menu .has-link a.is-disabled:hover{background:inherit;color:inherit}.dropdown .dropdown-menu .has-link a{padding-right:3rem;white-space:nowrap}.dropdown:not(.is-disabled) .dropdown-menu .dropdown-item.is-disabled,.dropdown:not(.is-disabled) .dropdown-menu .has-link a.is-disabled{opacity:.5}.dropdown .navbar-item{height:100%}.dropdown.is-disabled{opacity:.5;cursor:not-allowed}.dropdown.is-disabled .dropdown-trigger{pointer-events:none}.dropdown.is-inline .dropdown-menu{position:static;display:inline-block;padding:0}.dropdown.is-top-right .dropdown-menu{top:auto;bottom:100%}.dropdown.is-top-left .dropdown-menu{top:auto;bottom:100%;right:0;left:auto}.dropdown.is-bottom-left .dropdown-menu{right:0;left:auto}@media screen and (max-width:1087px){.dropdown.is-mobile-modal .dropdown-menu{position:fixed;width:calc(100vw - 40px);max-width:460px;max-height:calc(100vh - 120px);top:25%!important;left:50%!important;bottom:auto!important;right:auto!important;transform:translate3d(-50%,-25%,0);white-space:normal;overflow-y:auto}.dropdown.is-mobile-modal .dropdown-menu .dropdown-item,.dropdown.is-mobile-modal .dropdown-menu .has-link a{padding:1rem 1.5rem}}.label{font-weight:600}.field.is-grouped .field{flex-shrink:0}.field.is-grouped .field+.field{margin-left:.75rem}.field.is-grouped .field.is-expanded{flex-grow:1;flex-shrink:1}.field.has-addons .control:first-child .control .button,.field.has-addons .control:first-child .control .input,.field.has-addons .control:first-child .control .select select,.field.has-addons .control:first-child .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:first-child .control .taginput-container.is-focusable{border-bottom-left-radius:4px;border-top-left-radius:4px}.field.has-addons .control:last-child .control .button,.field.has-addons .control:last-child .control .input,.field.has-addons .control:last-child .control .select select,.field.has-addons .control:last-child .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:last-child .control .taginput-container.is-focusable{border-bottom-right-radius:4px;border-top-right-radius:4px}.field.has-addons .control .control .button,.field.has-addons .control .control .input,.field.has-addons .control .control .select select,.field.has-addons .control .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control .control .taginput-container.is-focusable{border-radius:0}.control .help.counter{float:right;margin-left:.5em}.control .icon.is-clickable{pointer-events:auto;cursor:pointer}.icon{cursor:inherit}.icon svg{background-color:transparent;fill:currentColor;stroke-width:0;stroke:currentColor;pointer-events:none;width:1.5rem;height:1.5rem}.loading-overlay{align-items:center;display:none;justify-content:center;overflow:hidden}.loading-overlay.is-active{display:flex}.loading-overlay.is-full-page{z-index:999;position:fixed}.loading-overlay.is-full-page .loading-icon:after{top:calc(50% - 2.5em);left:calc(50% - 2.5em);width:5em;height:5em}.loading-overlay .loading-background{background:#7f7f7f;background:hsla(0,0%,100%,.5)}.loading-overlay .loading-icon{position:relative}.loading-overlay .loading-icon:after{position:absolute;top:calc(50% - 1.5em);left:calc(50% - 1.5em);width:3em;height:3em;border-width:.25em}.message .media,.notification .media{padding-top:0;border:0}.notification>.delete{right:.5rem!important;top:.5rem!important}.modal .animation-content{margin:0 20px}.modal .animation-content .modal-card{margin:0}@media screen and (max-width:768px){.modal .animation-content{width:100%}}.notices{position:fixed;display:flex;top:0;bottom:0;left:0;right:0;padding:2em;overflow:hidden;z-index:1000;pointer-events:none}.notices .toast{display:inline-flex;animation-duration:.15s;margin:.5em 0;text-align:center;box-shadow:0 1px 4px rgba(0,0,0,.12),0 0 6px rgba(0,0,0,.04);border-radius:2em;padding:.75em 1.5em;pointer-events:auto;opacity:.92}.notices .toast.is-white{color:#0a0a0a;background:#fff}.notices .toast.is-black{color:#fff;background:#0a0a0a}.notices .toast.is-light{color:#363636;background:#f5f5f5}.notices .toast.is-dark{color:#f5f5f5;background:#363636}.notices .toast.is-primary{color:#fff;background:#00d1b2}.notices .toast.is-link{color:#fff;background:#3273dc}.notices .toast.is-info{color:#fff;background:#209cee}.notices .toast.is-success{color:#fff;background:#23d160}.notices .toast.is-warning{color:rgba(0,0,0,.7);background:#ffdd57}.notices .toast.is-danger{color:#fff;background:#ff3860}.notices .snackbar{display:inline-flex;align-items:center;justify-content:space-around;animation-duration:.15s;margin:.5em 0;box-shadow:0 1px 4px rgba(0,0,0,.12),0 0 6px rgba(0,0,0,.04);border-radius:4px;pointer-events:auto;background:#363636;color:#f5f5f5;min-height:3em}.notices .snackbar .text{padding:.5em 1em}.notices .snackbar .action{margin-left:auto;padding:.5em;padding-left:0}.notices .snackbar .action .button{font-weight:600;text-transform:uppercase}.notices .snackbar .action.is-white .button{color:#fff}.notices .snackbar .action.is-black .button{color:#0a0a0a}.notices .snackbar .action.is-light .button{color:#f5f5f5}.notices .snackbar .action.is-dark .button{color:#363636}.notices .snackbar .action.is-primary .button{color:#00d1b2}.notices .snackbar .action.is-link .button{color:#3273dc}.notices .snackbar .action.is-info .button{color:#209cee}.notices .snackbar .action.is-success .button{color:#23d160}.notices .snackbar .action.is-warning .button{color:#ffdd57}.notices .snackbar .action.is-danger .button{color:#ff3860}@media screen and (max-width:768px){.notices .snackbar{width:100%;margin:0;border-radius:0}}@media print,screen and (min-width:769px){.notices .snackbar{min-width:350px;max-width:600px;overflow:hidden}}.notices .snackbar.is-bottom,.notices .snackbar.is-top,.notices .toast.is-bottom,.notices .toast.is-top{align-self:center}.notices .snackbar.is-bottom-right,.notices .snackbar.is-top-right,.notices .toast.is-bottom-right,.notices .toast.is-top-right{align-self:flex-end}.notices .snackbar.is-bottom-left,.notices .snackbar.is-top-left,.notices .toast.is-bottom-left,.notices .toast.is-top-left{align-self:flex-start}.notices .snackbar.is-toast,.notices .toast.is-toast{opacity:.92}.notices.is-top{flex-direction:column}.notices.is-bottom{flex-direction:column-reverse}.notices.has-custom-container{position:absolute}@media screen and (max-width:768px){.notices{padding:0;position:fixed!important}}.pagination .pagination-next,.pagination .pagination-previous{padding-left:.25em;padding-right:.25em}.pagination .pagination-next.is-disabled,.pagination .pagination-previous.is-disabled{pointer-events:none;cursor:not-allowed;opacity:.5}.pagination.is-simple{justify-content:normal}.pagination .is-current{pointer-events:none;cursor:not-allowed}.panel .panel-heading.is-collapsible{cursor:pointer}.panel .panel-content{width:100%}.b-radio.radio{outline:none;display:inline-flex;align-items:center}.b-radio.radio+.radio{margin-left:.5em}.b-radio.radio input[type=radio]{position:absolute;left:0;opacity:0;outline:none;z-index:-1}.b-radio.radio input[type=radio]+.check{display:flex;align-items:center;justify-content:center;width:1.25em;height:1.25em;border:2px solid #7a7a7a;border-radius:50%;transition:background .15s ease-out}.b-radio.radio input[type=radio]+.check:before{content:\"\";border-radius:50%;width:.625em;height:.625em;background:#00d1b2;transform:scale(0);transition:transform .15s ease-out}.b-radio.radio input[type=radio]+.check.is-white:before{background:#fff}.b-radio.radio input[type=radio]+.check.is-black:before{background:#0a0a0a}.b-radio.radio input[type=radio]+.check.is-light:before{background:#f5f5f5}.b-radio.radio input[type=radio]+.check.is-dark:before{background:#363636}.b-radio.radio input[type=radio]+.check.is-primary:before{background:#00d1b2}.b-radio.radio input[type=radio]+.check.is-link:before{background:#3273dc}.b-radio.radio input[type=radio]+.check.is-info:before{background:#209cee}.b-radio.radio input[type=radio]+.check.is-success:before{background:#23d160}.b-radio.radio input[type=radio]+.check.is-warning:before{background:#ffdd57}.b-radio.radio input[type=radio]+.check.is-danger:before{background:#ff3860}.b-radio.radio input[type=radio]:checked+.check{border-color:#00d1b2}.b-radio.radio input[type=radio]:checked+.check.is-white{border-color:#fff}.b-radio.radio input[type=radio]:checked+.check.is-black{border-color:#0a0a0a}.b-radio.radio input[type=radio]:checked+.check.is-light{border-color:#f5f5f5}.b-radio.radio input[type=radio]:checked+.check.is-dark{border-color:#363636}.b-radio.radio input[type=radio]:checked+.check.is-primary{border-color:#00d1b2}.b-radio.radio input[type=radio]:checked+.check.is-link{border-color:#3273dc}.b-radio.radio input[type=radio]:checked+.check.is-info{border-color:#209cee}.b-radio.radio input[type=radio]:checked+.check.is-success{border-color:#23d160}.b-radio.radio input[type=radio]:checked+.check.is-warning{border-color:#ffdd57}.b-radio.radio input[type=radio]:checked+.check.is-danger{border-color:#ff3860}.b-radio.radio input[type=radio]:checked+.check:before{transform:scale(1)}.b-radio.radio .control-label{padding-left:.5em}.b-radio.radio[disabled]{opacity:.5}.b-radio.radio:hover input[type=radio]+.check{border-color:#00d1b2}.b-radio.radio:hover input[type=radio]+.check.is-white{border-color:#fff}.b-radio.radio:hover input[type=radio]+.check.is-black{border-color:#0a0a0a}.b-radio.radio:hover input[type=radio]+.check.is-light{border-color:#f5f5f5}.b-radio.radio:hover input[type=radio]+.check.is-dark{border-color:#363636}.b-radio.radio:hover input[type=radio]+.check.is-primary{border-color:#00d1b2}.b-radio.radio:hover input[type=radio]+.check.is-link{border-color:#3273dc}.b-radio.radio:hover input[type=radio]+.check.is-info{border-color:#209cee}.b-radio.radio:hover input[type=radio]+.check.is-success{border-color:#23d160}.b-radio.radio:hover input[type=radio]+.check.is-warning{border-color:#ffdd57}.b-radio.radio:hover input[type=radio]+.check.is-danger{border-color:#ff3860}.b-radio.radio:focus input[type=radio]+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-primary{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-link{box-shadow:0 0 .5em rgba(50,115,220,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-info{box-shadow:0 0 .5em rgba(32,156,238,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.b-radio.radio.is-small{border-radius:2px;font-size:.75rem}.b-radio.radio.is-medium{font-size:1.25rem}.b-radio.radio.is-large{font-size:1.5rem}.select select{padding-right:2.5em}.select select option{color:#4a4a4a;padding:.25em .5em}.select select option:disabled{cursor:not-allowed;opacity:.5}.select select optgroup{color:#b5b5b5;font-weight:400;font-style:normal;padding:.25em 0}.select.is-empty select{color:hsla(0,0%,48%,.7)}.switch{cursor:pointer;display:inline-flex;align-items:center}.switch+.switch{margin-left:.5em}.switch input[type=checkbox]{display:none}.switch input[type=checkbox]+.check{display:flex;align-items:center;flex-shrink:0;width:2.75em;height:1.575em;padding:.2em;background:#b5b5b5;border-radius:1em;transition:background .15s ease-out}.switch input[type=checkbox]+.check:before{content:\"\";border-radius:1em;width:1.175em;height:1.175em;background:#f5f5f5;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);transition:transform .15s ease-out,width .15s ease-out;will-change:transform}.switch input[type=checkbox]+.check.is-elastic:before{width:1.75em}.switch input[type=checkbox]:checked+.check{background:#00d1b2}.switch input[type=checkbox]:checked+.check.is-white{background:#fff}.switch input[type=checkbox]:checked+.check.is-black{background:#0a0a0a}.switch input[type=checkbox]:checked+.check.is-light{background:#f5f5f5}.switch input[type=checkbox]:checked+.check.is-dark{background:#363636}.switch input[type=checkbox]:checked+.check.is-primary{background:#00d1b2}.switch input[type=checkbox]:checked+.check.is-link{background:#3273dc}.switch input[type=checkbox]:checked+.check.is-info{background:#209cee}.switch input[type=checkbox]:checked+.check.is-success{background:#23d160}.switch input[type=checkbox]:checked+.check.is-warning{background:#ffdd57}.switch input[type=checkbox]:checked+.check.is-danger{background:#ff3860}.switch input[type=checkbox]:checked+.check:before{transform:translate3d(100%,0,0)}.switch input[type=checkbox]:checked+.check.is-elastic:before{transform:translate3d(36.36364%,0,0)}.switch .control-label{padding-left:.5em}.switch:hover input[type=checkbox]+.check{background:hsla(0,0%,71%,.9)}.switch:hover input[type=checkbox]:checked+.check{background:rgba(0,209,178,.9)}.switch:hover input[type=checkbox]:checked+.check.is-white{background:hsla(0,0%,100%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-black{background:hsla(0,0%,4%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-light{background:hsla(0,0%,96%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-dark{background:rgba(54,54,54,.9)}.switch:hover input[type=checkbox]:checked+.check.is-primary{background:rgba(0,209,178,.9)}.switch:hover input[type=checkbox]:checked+.check.is-link{background:rgba(50,115,220,.9)}.switch:hover input[type=checkbox]:checked+.check.is-info{background:rgba(32,156,238,.9)}.switch:hover input[type=checkbox]:checked+.check.is-success{background:rgba(35,209,96,.9)}.switch:hover input[type=checkbox]:checked+.check.is-warning{background:rgba(255,221,87,.9)}.switch:hover input[type=checkbox]:checked+.check.is-danger{background:rgba(255,56,96,.9)}.switch:focus{outline:none}.switch:focus input[type=checkbox]+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.6)}.switch:focus input[type=checkbox]:checked+.check{box-shadow:0 0 .5em rgba(0,209,178,.8)}.switch:focus input[type=checkbox]:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.switch:focus input[type=checkbox]:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.switch:focus input[type=checkbox]:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.switch:focus input[type=checkbox]:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.switch:focus input[type=checkbox]:checked+.check.is-primary{box-shadow:0 0 .5em rgba(0,209,178,.8)}.switch:focus input[type=checkbox]:checked+.check.is-link{box-shadow:0 0 .5em rgba(50,115,220,.8)}.switch:focus input[type=checkbox]:checked+.check.is-info{box-shadow:0 0 .5em rgba(32,156,238,.8)}.switch:focus input[type=checkbox]:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.switch:focus input[type=checkbox]:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.switch:focus input[type=checkbox]:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.switch.is-small{border-radius:2px;font-size:.75rem}.switch.is-medium{font-size:1.25rem}.switch.is-large{font-size:1.5rem}.switch[disabled]{opacity:.5;cursor:not-allowed;color:#7a7a7a}.table-wrapper .table{margin-bottom:0}.table-wrapper:not(:last-child){margin-bottom:1.5rem}@media screen and (max-width:1087px){.table-wrapper{overflow-x:auto}}.b-table{transition:opacity 86ms ease-out}@media print,screen and (min-width:769px){.b-table .table-mobile-sort{display:none}}.b-table .icon{transition:transform .15s ease-out,opacity 86ms ease-out}.b-table .icon.is-desc{transform:rotate(180deg)}.b-table .icon.is-expanded{transform:rotate(90deg)}.b-table .table{width:100%;border:1px solid transparent;border-radius:4px;border-collapse:separate}.b-table .table th{font-weight:600}.b-table .table th .th-wrap{display:flex;align-items:center}.b-table .table th .th-wrap .icon{margin-left:.5rem;margin-right:0;font-size:1rem}.b-table .table th .th-wrap.is-numeric{flex-direction:row-reverse;text-align:right}.b-table .table th .th-wrap.is-numeric .icon{margin-left:0;margin-right:.5rem}.b-table .table th .th-wrap.is-centered{justify-content:center;text-align:center}.b-table .table th.is-current-sort{border-color:#7a7a7a;font-weight:700}.b-table .table th.is-sortable:hover{border-color:#7a7a7a}.b-table .table th.is-sortable,.b-table .table th.is-sortable .th-wrap{cursor:pointer}.b-table .table tr.is-selected .checkbox input:checked+.check{background:#fff url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%2300d1b2'/%3E%3C/svg%3E\") no-repeat 50%}.b-table .table tr.is-selected .checkbox input+.check{border-color:#fff}.b-table .table tr.is-empty:hover{background-color:transparent}.b-table .table .chevron-cell{vertical-align:middle}.b-table .table .checkbox-cell{width:40px}.b-table .table .checkbox-cell .checkbox{vertical-align:middle}.b-table .table .checkbox-cell .checkbox .check{transition:none}.b-table .table tr.detail{box-shadow:inset 0 1px 3px #dbdbdb;background:#fafafa}.b-table .table tr.detail .detail-container{padding:1rem}.b-table .table:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.b-table .table.is-bordered th.is-current-sort,.b-table .table.is-bordered th.is-sortable:hover{border-color:#dbdbdb;background:#f5f5f5}@media screen and (max-width:768px){.b-table .table.has-mobile-cards thead{display:none}.b-table .table.has-mobile-cards tfoot th{border:0;display:inherit}.b-table .table.has-mobile-cards tr{box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);max-width:100%;position:relative;display:block}.b-table .table.has-mobile-cards tr td{border:0;display:inherit}.b-table .table.has-mobile-cards tr td:last-child{border-bottom:0}.b-table .table.has-mobile-cards tr:not(:last-child){margin-bottom:1rem}.b-table .table.has-mobile-cards tr:not([class*=is-]){background:inherit}.b-table .table.has-mobile-cards tr:not([class*=is-]):hover{background-color:inherit}.b-table .table.has-mobile-cards tr.detail{margin-top:-1rem}.b-table .table.has-mobile-cards tr:not(.detail):not(.is-empty):not(.table-footer) td{display:flex;width:auto;justify-content:space-between;text-align:right;border-bottom:1px solid #f5f5f5}.b-table .table.has-mobile-cards tr:not(.detail):not(.is-empty):not(.table-footer) td:before{content:attr(data-label);font-weight:600;padding-right:.5em;text-align:left}}.b-table .level{padding-bottom:1.5rem}.b-table.is-loading{position:relative;pointer-events:none;opacity:.5}.b-table.is-loading:after{position:absolute;top:4em;left:calc(50% - 2.5em);width:5em;height:5em;border-width:.25em}.b-tabs .tabs{margin-bottom:0;flex-shrink:0}.b-tabs .is-disabled{pointer-events:none;cursor:not-allowed;opacity:.5}.b-tabs .tab-content{position:relative;overflow:hidden;display:flex;flex-direction:column;padding:1rem}.b-tabs .tab-content .tab-item{flex-shrink:0;flex-basis:auto}.b-tabs:not(:last-child){margin-bottom:1.5rem}.b-tabs.is-fullwidth{width:100%}.tag .has-ellipsis{max-width:10em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.taginput .taginput-container.is-focusable{padding-bottom:0;padding-top:calc(.275em - 1px);align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start;height:auto;cursor:text}.taginput .taginput-container>.tag,.taginput .taginput-container>.tags{margin-bottom:calc(.275em - 1px);font-size:.9em;height:1.7em}.taginput .taginput-container>.tag .tag,.taginput .taginput-container>.tags .tag{margin-bottom:0;font-size:.9em;height:1.7em}.taginput .taginput-container>.tag:not(:last-child),.taginput .taginput-container>.tags:not(:last-child){margin-right:.275rem}.taginput .taginput-container .autocomplete{flex:1}.taginput .taginput-container .autocomplete input{height:1.7em;margin-bottom:calc(.275em - 1px);padding-top:0;padding-bottom:0;border:none;box-shadow:none;min-width:8em}.taginput .taginput-container .autocomplete input:focus{box-shadow:none!important}.taginput .taginput-container .autocomplete .icon{height:1.7em}.taginput .taginput-container .autocomplete>.control.is-loading:after{top:.375em}.timepicker .dropdown,.timepicker .dropdown-trigger{width:100%}.dropdown .dropdown-menu .has-link .timepicker a,.timepicker .dropdown-item,.timepicker .dropdown .dropdown-menu .has-link a{font-size:inherit}.timepicker .timepicker-footer{padding-top:.875rem}.timepicker .control .select{font-size:2.5rem}.timepicker .control .select select{font-weight:600;padding-right:calc(.625em - 1px)}.timepicker .control .select select option{font-size:1.5rem}.timepicker .control .select select option:disabled{color:hsla(0,0%,48%,.7)}.timepicker .control .select:after{display:none}.timepicker .control:first-child .select select{border-right:none}.timepicker .control:first-child .select:before{content:\":\";color:#b5b5b5;display:inline-block;position:absolute;z-index:6;font-size:3rem;right:-.325rem;top:.25rem}.timepicker .control:nth-child(2) .select select{border-left:none}.timepicker.is-small{border-radius:2px;font-size:.75rem}.timepicker.is-medium{font-size:1.25rem}.timepicker.is-large{font-size:1.5rem}.tooltip{position:relative;display:inline-flex}.tooltip.is-top:after,.tooltip.is-top:before{top:auto;right:auto;bottom:calc(100% + 5px + 2px);left:50%;transform:translateX(-50%)}.tooltip.is-top.is-white:before{border-top:5px solid #fff}.tooltip.is-top.is-black:before,.tooltip.is-top.is-white:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-black:before{border-top:5px solid #0a0a0a}.tooltip.is-top.is-light:before{border-top:5px solid #f5f5f5}.tooltip.is-top.is-dark:before,.tooltip.is-top.is-light:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-dark:before{border-top:5px solid #363636}.tooltip.is-top.is-primary:before{border-top:5px solid #00d1b2}.tooltip.is-top.is-link:before,.tooltip.is-top.is-primary:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-link:before{border-top:5px solid #3273dc}.tooltip.is-top.is-info:before{border-top:5px solid #209cee}.tooltip.is-top.is-info:before,.tooltip.is-top.is-success:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-success:before{border-top:5px solid #23d160}.tooltip.is-top.is-warning:before{border-top:5px solid #ffdd57}.tooltip.is-top.is-danger:before,.tooltip.is-top.is-warning:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-danger:before{border-top:5px solid #ff3860}.tooltip.is-top.is-multiline.is-small:after{width:180px}.tooltip.is-top.is-multiline.is-medium:after{width:240px}.tooltip.is-top.is-multiline.is-large:after{width:300px}.tooltip.is-right:after,.tooltip.is-right:before{top:50%;right:auto;bottom:auto;left:calc(100% + 5px + 2px);transform:translateY(-50%)}.tooltip.is-right.is-white:before{border-right:5px solid #fff}.tooltip.is-right.is-black:before,.tooltip.is-right.is-white:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-black:before{border-right:5px solid #0a0a0a}.tooltip.is-right.is-light:before{border-right:5px solid #f5f5f5}.tooltip.is-right.is-dark:before,.tooltip.is-right.is-light:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-dark:before{border-right:5px solid #363636}.tooltip.is-right.is-primary:before{border-right:5px solid #00d1b2}.tooltip.is-right.is-link:before,.tooltip.is-right.is-primary:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-link:before{border-right:5px solid #3273dc}.tooltip.is-right.is-info:before{border-right:5px solid #209cee}.tooltip.is-right.is-info:before,.tooltip.is-right.is-success:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-success:before{border-right:5px solid #23d160}.tooltip.is-right.is-warning:before{border-right:5px solid #ffdd57}.tooltip.is-right.is-danger:before,.tooltip.is-right.is-warning:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-danger:before{border-right:5px solid #ff3860}.tooltip.is-right.is-multiline.is-small:after{width:180px}.tooltip.is-right.is-multiline.is-medium:after{width:240px}.tooltip.is-right.is-multiline.is-large:after{width:300px}.tooltip.is-bottom:after,.tooltip.is-bottom:before{top:calc(100% + 5px + 2px);right:auto;bottom:auto;left:50%;transform:translateX(-50%)}.tooltip.is-bottom.is-white:before{border-bottom:5px solid #fff}.tooltip.is-bottom.is-black:before,.tooltip.is-bottom.is-white:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-black:before{border-bottom:5px solid #0a0a0a}.tooltip.is-bottom.is-light:before{border-bottom:5px solid #f5f5f5}.tooltip.is-bottom.is-dark:before,.tooltip.is-bottom.is-light:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-dark:before{border-bottom:5px solid #363636}.tooltip.is-bottom.is-primary:before{border-bottom:5px solid #00d1b2}.tooltip.is-bottom.is-link:before,.tooltip.is-bottom.is-primary:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-link:before{border-bottom:5px solid #3273dc}.tooltip.is-bottom.is-info:before{border-bottom:5px solid #209cee}.tooltip.is-bottom.is-info:before,.tooltip.is-bottom.is-success:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-success:before{border-bottom:5px solid #23d160}.tooltip.is-bottom.is-warning:before{border-bottom:5px solid #ffdd57}.tooltip.is-bottom.is-danger:before,.tooltip.is-bottom.is-warning:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-danger:before{border-bottom:5px solid #ff3860}.tooltip.is-bottom.is-multiline.is-small:after{width:180px}.tooltip.is-bottom.is-multiline.is-medium:after{width:240px}.tooltip.is-bottom.is-multiline.is-large:after{width:300px}.tooltip.is-left:after,.tooltip.is-left:before{top:50%;right:calc(100% + 5px + 2px);bottom:auto;left:auto;transform:translateY(-50%)}.tooltip.is-left.is-white:before{border-left:5px solid #fff}.tooltip.is-left.is-black:before,.tooltip.is-left.is-white:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-black:before{border-left:5px solid #0a0a0a}.tooltip.is-left.is-light:before{border-left:5px solid #f5f5f5}.tooltip.is-left.is-dark:before,.tooltip.is-left.is-light:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-dark:before{border-left:5px solid #363636}.tooltip.is-left.is-primary:before{border-left:5px solid #00d1b2}.tooltip.is-left.is-link:before,.tooltip.is-left.is-primary:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-link:before{border-left:5px solid #3273dc}.tooltip.is-left.is-info:before{border-left:5px solid #209cee}.tooltip.is-left.is-info:before,.tooltip.is-left.is-success:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-success:before{border-left:5px solid #23d160}.tooltip.is-left.is-warning:before{border-left:5px solid #ffdd57}.tooltip.is-left.is-danger:before,.tooltip.is-left.is-warning:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-danger:before{border-left:5px solid #ff3860}.tooltip.is-left.is-multiline.is-small:after{width:180px}.tooltip.is-left.is-multiline.is-medium:after{width:240px}.tooltip.is-left.is-multiline.is-large:after{width:300px}.tooltip:after,.tooltip:before{position:absolute;content:\"\";opacity:0;visibility:hidden;pointer-events:none}.tooltip:before{z-index:889}.tooltip:after{content:attr(data-label);width:auto;padding:.35rem .75rem;border-radius:6px;font-size:.85rem;font-weight:400;box-shadow:0 1px 2px 1px rgba(0,1,0,.2);z-index:888;white-space:nowrap}.tooltip:not([data-label=\"\"]):hover:after,.tooltip:not([data-label=\"\"]):hover:before{opacity:1;visibility:visible}.tooltip.is-white:after{background:#fff;color:#0a0a0a}.tooltip.is-black:after{background:#0a0a0a;color:#fff}.tooltip.is-light:after{background:#f5f5f5;color:#363636}.tooltip.is-dark:after{background:#363636;color:#f5f5f5}.tooltip.is-primary:after{background:#00d1b2;color:#fff}.tooltip.is-link:after{background:#3273dc;color:#fff}.tooltip.is-info:after{background:#209cee;color:#fff}.tooltip.is-success:after{background:#23d160;color:#fff}.tooltip.is-warning:after{background:#ffdd57;color:rgba(0,0,0,.7)}.tooltip.is-danger:after{background:#ff3860;color:#fff}.tooltip:not([data-label=\"\"]).is-always:after,.tooltip:not([data-label=\"\"]).is-always:before{opacity:1;visibility:visible}.tooltip.is-multiline:after{display:flex-block;text-align:center;white-space:normal}.tooltip.is-dashed{border-bottom:1px dashed #b5b5b5;cursor:default}.tooltip.is-square:after{border-radius:0}.tooltip.is-animated:after,.tooltip.is-animated:before{transition:opacity 86ms ease-out,visibility 86ms ease-out}.upload{position:relative}.upload input[type=file]{position:absolute;top:0;left:0;width:100%;opacity:0;outline:none;z-index:-1}.upload .upload-draggable{display:inline-block;cursor:pointer;padding:.25em;border:1px dashed #b5b5b5;border-radius:6px}.upload .upload-draggable.is-disabled{opacity:.5;cursor:not-allowed}.upload .upload-draggable.is-loading{position:relative;pointer-events:none;opacity:.5}.upload .upload-draggable.is-loading:after{top:0;left:calc(50% - 1.5em);width:3em;height:3em;border-width:.25em}.upload .upload-draggable.is-hovered.is-white,.upload .upload-draggable:hover.is-white{border-color:#fff;background:hsla(0,0%,100%,.05)}.upload .upload-draggable.is-hovered.is-black,.upload .upload-draggable:hover.is-black{border-color:#0a0a0a;background:hsla(0,0%,4%,.05)}.upload .upload-draggable.is-hovered.is-light,.upload .upload-draggable:hover.is-light{border-color:#f5f5f5;background:hsla(0,0%,96%,.05)}.upload .upload-draggable.is-hovered.is-dark,.upload .upload-draggable:hover.is-dark{border-color:#363636;background:rgba(54,54,54,.05)}.upload .upload-draggable.is-hovered.is-primary,.upload .upload-draggable:hover.is-primary{border-color:#00d1b2;background:rgba(0,209,178,.05)}.upload .upload-draggable.is-hovered.is-link,.upload .upload-draggable:hover.is-link{border-color:#3273dc;background:rgba(50,115,220,.05)}.upload .upload-draggable.is-hovered.is-info,.upload .upload-draggable:hover.is-info{border-color:#209cee;background:rgba(32,156,238,.05)}.upload .upload-draggable.is-hovered.is-success,.upload .upload-draggable:hover.is-success{border-color:#23d160;background:rgba(35,209,96,.05)}.upload .upload-draggable.is-hovered.is-warning,.upload .upload-draggable:hover.is-warning{border-color:#ffdd57;background:rgba(255,221,87,.05)}.upload .upload-draggable.is-hovered.is-danger,.upload .upload-draggable:hover.is-danger{border-color:#ff3860;background:rgba(255,56,96,.05)}",""])},function(e,t){e.exports=function(e,t){for(var i=[],n={},o=0;o<t.length;o++){var a=t[o],r=a[0],s=a[1],l=a[2],c=a[3],d={id:e+":"+o,css:s,media:l,sourceMap:c};n[r]?n[r].parts.push(d):i.push(n[r]={id:r,parts:[d]})}return i}},function(e,t,i){var n=i(25);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("bf15a564",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,".material-design-icon{display:inline-flex;align-self:center;position:relative;height:1em;width:1em;>.material-design-icon__svg{height:1em;width:1em;fill:currentColor;position:absolute;bottom:-.125em}}",""])},function(e,t,i){"use strict";function n(e){i(27)}var o=i(6),a=i(64),r=i(2),s=n,l=r(o.a,a.a,!1,s,null,null);t.a=l.exports},function(e,t,i){var n=i(28);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("0abd6ea6",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"",""])},function(e,t,i){"use strict";function n(e){i(30)}var o=i(7),a=i(32),r=i(2),s=n,l=r(o.a,a.a,!1,s,null,null);t.a=l.exports},function(e,t,i){var n=i(31);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("432a0e31",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"",""])},function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("nav",{staticClass:"navbar has-shadow"},[e._m(0),e._v(" "),i("div",{staticClass:"navbar-menu"},[i("div",{staticClass:"navbar-start"}),e._v(" "),i("div",{staticClass:"navbar-end"},[i("div",{staticClass:"navbar-item"},[i("p",{staticClass:"control"},[e.isConnected?i("button",{staticClass:"button is-danger",on:{click:e.disconnect}},[e._v("Disconnect")]):i("button",{staticClass:"button is-success",on:{click:e.connect}},[e._v("Connect")])])])])])])},o=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"navbar-brand"},[i("a",{staticClass:"navbar-item",attrs:{href:"#"}},[e._v("WebRender Debugger")])])}],a={render:n,staticRenderFns:o};t.a=a},function(e,t,i){"use strict";function n(e){i(34)}var o=i(8),a=i(36),r=i(2),s=n,l=r(o.a,a.a,!1,s,null,null);t.a=l.exports},function(e,t,i){var n=i(35);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("e4edc9ba",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"",""])},function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("aside",{staticClass:"menu"},[i("p",{staticClass:"menu-label"},[e._v("\n Pages\n ")]),e._v(" "),i("ul",{staticClass:"menu-list"},[i("li",[i("a",{class:{"is-active":"options"==e.page},on:{click:function(t){return e.setPage("options")}}},[e._v("Debug Options")])]),e._v(" "),i("li",[i("a",{class:{"is-active":"passes"==e.page},on:{click:function(t){return e.setPage("passes")}}},[e._v("Passes")])]),e._v(" "),i("li",[i("a",{class:{"is-active":"render_tasks"==e.page},on:{click:function(t){return e.setPage("render_tasks")}}},[e._v("Render Tasks")])]),e._v(" "),i("li",[i("a",{class:{"is-active":"documents"==e.page},on:{click:function(t){return e.setPage("documents")}}},[e._v("Documents")])]),e._v(" "),i("li",[i("a",{class:{"is-active":"clip_scroll_tree"==e.page},on:{click:function(t){return e.setPage("clip_scroll_tree")}}},[e._v("Clip-Scroll Tree")])]),e._v(" "),i("li",[i("a",{class:{"is-active":"screenshot"==e.page},on:{click:function(t){return e.setPage("screenshot")}}},[e._v("Screenshot")])])])])},o=[],a={render:n,staticRenderFns:o};t.a=a},function(e,t,i){"use strict";function n(e){i(38)}var o=i(9),a=i(40),r=i(2),s=n,l=r(o.a,a.a,!1,s,null,null);t.a=l.exports},function(e,t,i){var n=i(39);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("0e6ffcbb",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"",""])},function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"box"},[i("div",{staticClass:"field"},[i("label",{staticClass:"checkbox"},[i("input",{attrs:{type:"checkbox",disabled:e.disabled},on:{click:function(t){return e.setProfiler(t.target.checked)}}}),e._v("\n Profiler\n ")])]),e._v(" "),i("div",{staticClass:"field"},[i("label",{staticClass:"checkbox"},[i("input",{attrs:{type:"checkbox",disabled:e.disabled},on:{click:function(t){return e.setTextureCacheDebugger(t.target.checked)}}}),e._v("\n Texture cache debugger\n ")])]),e._v(" "),i("div",{staticClass:"field"},[i("label",{staticClass:"checkbox"},[i("input",{attrs:{type:"checkbox",disabled:e.disabled},on:{click:function(t){return e.setRenderTargetDebugger(t.target.checked)}}}),e._v("\n Render target debugger\n ")])]),e._v(" "),i("div",{staticClass:"field"},[i("label",{staticClass:"checkbox"},[i("input",{attrs:{type:"checkbox",disabled:e.disabled},on:{click:function(t){return e.setAlphaRectsDebugger(t.target.checked)}}}),e._v("\n Alpha primitive rects debugger\n ")])]),e._v(" "),i("div",{staticClass:"field"},[i("label",{staticClass:"checkbox"},[i("input",{attrs:{type:"checkbox",disabled:e.disabled},on:{click:function(t){return e.setGpuTimeQueries(t.target.checked)}}}),e._v("\n Enable GPU time queries\n ")])]),e._v(" "),i("div",{staticClass:"field"},[i("label",{staticClass:"checkbox"},[i("input",{attrs:{type:"checkbox",disabled:e.disabled},on:{click:function(t){return e.setGpuSampleQueries(t.target.checked)}}}),e._v("\n Enable GPU sample queries\n ")])]),e._v(" "),i("div",{staticClass:"field"},[i("label",{staticClass:"checkbox"},[i("input",{attrs:{type:"checkbox",disabled:e.disabled},on:{click:function(t){return e.setOpaquePass(!t.target.checked)}}}),e._v("\n Disable opaque pass\n ")])]),e._v(" "),i("div",{staticClass:"field"},[i("label",{staticClass:"checkbox"},[i("input",{attrs:{type:"checkbox",disabled:e.disabled},on:{click:function(t){return e.setAlphaPass(!t.target.checked)}}}),e._v("\n Disable alpha pass\n ")])]),e._v(" "),i("div",{staticClass:"field"},[i("label",{staticClass:"checkbox"},[i("input",{attrs:{type:"checkbox",disabled:e.disabled},on:{click:function(t){return e.setClipMasks(!t.target.checked)}}}),e._v("\n Disable clip masks\n ")])]),e._v(" "),i("div",{staticClass:"field"},[i("label",{staticClass:"checkbox"},[i("input",{attrs:{type:"checkbox",disabled:e.disabled},on:{click:function(t){return e.setTextPrims(!t.target.checked)}}}),e._v("\n Disable text primitives\n ")])]),e._v(" "),i("div",{staticClass:"field"},[i("label",{staticClass:"checkbox"},[i("input",{attrs:{type:"checkbox",disabled:e.disabled},on:{click:function(t){return e.setGradientPrims(!t.target.checked)}}}),e._v("\n Disable gradient primitives\n ")])])])},o=[],a={render:n,staticRenderFns:o};t.a=a},function(e,t,i){"use strict";function n(e){i(42)}var o=i(10),a=i(44),r=i(2),s=n,l=r(o.a,a.a,!1,s,null,null);t.a=l.exports},function(e,t,i){var n=i(43);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("05673d18",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"",""])},function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"box"},[i("h1",{staticClass:"title"},[e._v("Passes "),i("a",{staticClass:"button is-info",attrs:{disabled:e.disabled},on:{click:e.fetch}},[e._v("Refresh")])]),e._v(" "),i("hr"),e._v(" "),e._l(e.passes,function(t,n){return i("div",[i("p",{staticClass:"has-text-black-bis"},[e._v("Pass "+e._s(n))]),e._v(" "),e._l(t.targets,function(t,n){return i("div",[i("p",{staticClass:"has-text-grey-dark",staticStyle:{"text-indent":"2em"}},[e._v("Target "+e._s(n)+" ("+e._s(t.kind)+")")]),e._v(" "),e._l(t.batches,function(t,n){return i("div",[i("p",{staticClass:"has-text-grey",staticStyle:{"text-indent":"4em"}},[e._v("Batch "+e._s(n)+" ("+e._s(t.description)+", "+e._s(t.kind)+", "+e._s(t.count)+" instances)")])])})],2)}),e._v(" "),i("hr")],2)})],2)},o=[],a={render:n,staticRenderFns:o};t.a=a},function(e,t,i){"use strict";function n(e){i(46)}var o=i(11),a=i(51),r=i(2),s=n,l=r(o.a,a.a,!1,s,null,null);t.a=l.exports},function(e,t,i){var n=i(47);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("0d80f44e",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"",""])},function(e,t,i){var n=i(49);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("77142b62",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"",""])},function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("li",[i("div",{on:{click:e.toggle}},[e.isFolder?i("span",[e._v("["+e._s(e.open?"-":"+")+"]")]):e._e(),e._v("\n "+e._s(e.model.description)+"\n ")]),e._v(" "),e.isFolder?i("ul",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}],staticStyle:{"padding-left":"1em","line-height":"1.5em"}},e._l(e.model.children,function(e){return i("treeview",{attrs:{model:e}})}),1):e._e()])},o=[],a={render:n,staticRenderFns:o};t.a=a},function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"box"},[i("h1",{staticClass:"title"},[e._v("Render Tasks "),i("a",{staticClass:"button is-info",attrs:{disabled:e.disabled},on:{click:e.fetch}},[e._v("Refresh")])]),e._v(" "),i("hr"),e._v(" "),i("div",[i("ul",[i("app-treeview",{attrs:{model:e.render_tasks}})],1)])])},o=[],a={render:n,staticRenderFns:o};t.a=a},function(e,t,i){"use strict";function n(e){i(53)}var o=i(13),a=i(55),r=i(2),s=n,l=r(o.a,a.a,!1,s,null,null);t.a=l.exports},function(e,t,i){var n=i(54);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("7b986bc8",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"",""])},function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"box"},[i("h1",{staticClass:"title"},[e._v("Documents "),i("a",{staticClass:"button is-info",attrs:{disabled:e.disabled},on:{click:e.fetch}},[e._v("Refresh")])]),e._v(" "),i("hr"),e._v(" "),i("div",[i("ul",[i("app-treeview",{attrs:{model:e.documents}})],1)])])},o=[],a={render:n,staticRenderFns:o};t.a=a},function(e,t,i){"use strict";function n(e){i(57)}var o=i(14),a=i(59),r=i(2),s=n,l=r(o.a,a.a,!1,s,null,null);t.a=l.exports},function(e,t,i){var n=i(58);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("3d63fa5b",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"",""])},function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"box"},[i("h1",{staticClass:"title"},[e._v("Clip-Scroll Tree "),i("a",{staticClass:"button is-info",attrs:{disabled:e.disabled},on:{click:e.fetch}},[e._v("Refresh")])]),e._v(" "),i("hr"),e._v(" "),i("div",[i("ul",[i("app-treeview",{attrs:{model:e.clip_scroll_tree}})],1)])])},o=[],a={render:n,staticRenderFns:o};t.a=a},function(e,t,i){"use strict";function n(e){i(61)}var o=i(15),a=i(63),r=i(2),s=n,l=r(o.a,a.a,!1,s,null,null);t.a=l.exports},function(e,t,i){var n=i(62);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);i(1)("3900c1de",n,!0,{})},function(e,t,i){t=e.exports=i(0)(!1),t.push([e.i,"",""])},function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"box"},[i("h1",{staticClass:"title"},[e._v("Screenshot "),i("a",{staticClass:"button is-info",attrs:{disabled:e.disabled},on:{click:e.fetch}},[e._v("Refresh")])]),e._v(" "),i("hr"),e._v(" "),i("div",[i("ul",[e.screenshot.length>0?i("img",{staticStyle:{transform:"scaleY(-1)",width:"1024px",height:"768px"},attrs:{src:"data:image/png;base64,"+e.screenshot}}):e._e()])])])},o=[],a={render:n,staticRenderFns:o};t.a=a},function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("app-navbar"),e._v(" "),i("div",{staticClass:"section"},[i("div",{staticClass:"container"},[i("div",{staticClass:"columns"},[i("div",{staticClass:"column is-3"},[i("app-navmenu")],1),e._v(" "),i("div",{staticClass:"column"},["options"==e.page?i("app-options"):e._e(),e._v(" "),"passes"==e.page?i("app-passview"):e._e(),e._v(" "),"render_tasks"==e.page?i("app-rendertaskview"):e._e(),e._v(" "),"documents"==e.page?i("app-documentview"):e._e(),e._v(" "),"clip_scroll_tree"==e.page?i("app-clipscrolltreeview"):e._e(),e._v(" "),"screenshot"==e.page?i("app-screenshotview"):e._e()],1)])])])],1)},o=[],a={render:n,staticRenderFns:o};t.a=a},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=i(3),a=i(66),r=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();o.default.use(a.a);var s=function(){function e(){n(this,e),this.ws=null}return r(e,[{key:"connect",value:function(e){var t=new WebSocket("ws://127.0.0.1:3583");t.onopen=function(){e.commit("setConnected",!0)},t.onmessage=function(t){var i=JSON.parse(t.data);"passes"==i.kind?e.commit("setPasses",i.passes):"render_tasks"==i.kind?e.commit("setRenderTasks",i.root):"documents"==i.kind?e.commit("setDocuments",i.root):"clip_scroll_tree"==i.kind?e.commit("setClipScrollTree",i.root):"screenshot"==i.kind?e.commit("setScreenshot",i.data):console.warn("unknown message kind: "+i.kind)},t.onclose=function(){e.commit("setConnected",!1)},this.ws=t}},{key:"send",value:function(e){null!==this.ws&&this.ws.send(e)}},{key:"disconnect",value:function(){null!==this.ws&&(this.ws.close(),this.ws=null)}}]),e}(),l=new s,c=new a.a.Store({strict:!0,state:{connected:!1,page:"options",passes:[],render_tasks:[],documents:[],clip_scroll_tree:[],screenshot:[]},mutations:{setConnected:function(e,t){e.connected=t},setPage:function(e,t){e.page=t},setPasses:function(e,t){e.passes=t},setRenderTasks:function(e,t){e.render_tasks=t},setDocuments:function(e,t){e.documents=t},setClipScrollTree:function(e,t){e.clip_scroll_tree=t},setScreenshot:function(e,t){e.screenshot=t}},actions:{connect:function(e){l.connect(e)},disconnect:function(e){l.disconnect()},sendMessage:function(e,t){l.send(t)}}});t.a=c},function(e,t,i){"use strict";/**
+ * vuex v3.1.0
+ * (c) 2019 Evan You
+ * @license MIT
+ */
+function n(e){function t(){var e=this.$options;e.store?this.$store="function"==typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}if(Number(e.version.split(".")[0])>=2)e.mixin({beforeCreate:t});else{var i=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[t].concat(e.init):t,i.call(this,e)}}}function o(e){S&&(e._devtoolHook=S,S.emit("vuex:init",e),S.on("vuex:travel-to-state",function(t){e.replaceState(t)}),e.subscribe(function(e,t){S.emit("vuex:mutation",e,t)}))}function a(e,t){Object.keys(e).forEach(function(i){return t(e[i],i)})}function r(e){return null!==e&&"object"==typeof e}function s(e){return e&&"function"==typeof e.then}function l(e,t,i){if(t.update(i),i.modules)for(var n in i.modules){if(!t.getChild(n))return;l(e.concat(n),t.getChild(n),i.modules[n])}}function c(e,t){return t.indexOf(e)<0&&t.push(e),function(){var i=t.indexOf(e);i>-1&&t.splice(i,1)}}function d(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var i=e.state;f(e,i,[],e._modules.root,!0),u(e,i,t)}function u(e,t,i){var n=e._vm;e.getters={};var o=e._wrappedGetters,r={};a(o,function(t,i){r[i]=function(){return t(e)},Object.defineProperty(e.getters,i,{get:function(){return e._vm[i]},enumerable:!0})});var s=O.config.silent;O.config.silent=!0,e._vm=new O({data:{$$state:t},computed:r}),O.config.silent=s,e.strict&&v(e),n&&(i&&e._withCommit(function(){n._data.$$state=null}),O.nextTick(function(){return n.$destroy()}))}function f(e,t,i,n,o){var a=!i.length,r=e._modules.getNamespace(i);if(n.namespaced&&(e._modulesNamespaceMap[r]=n),!a&&!o){var s=k(t,i.slice(0,-1)),l=i[i.length-1];e._withCommit(function(){O.set(s,l,n.state)})}var c=n.context=p(e,r,i);n.forEachMutation(function(t,i){b(e,r+i,t,c)}),n.forEachAction(function(t,i){var n=t.root?i:r+i,o=t.handler||t;m(e,n,o,c)}),n.forEachGetter(function(t,i){g(e,r+i,t,c)}),n.forEachChild(function(n,a){f(e,t,i.concat(a),n,o)})}function p(e,t,i){var n=""===t,o={dispatch:n?e.dispatch:function(i,n,o){var a=x(i,n,o),r=a.payload,s=a.options,l=a.type;return s&&s.root||(l=t+l),e.dispatch(l,r)},commit:n?e.commit:function(i,n,o){var a=x(i,n,o),r=a.payload,s=a.options,l=a.type;s&&s.root||(l=t+l),e.commit(l,r,s)}};return Object.defineProperties(o,{getters:{get:n?function(){return e.getters}:function(){return h(e,t)}},state:{get:function(){return k(e.state,i)}}}),o}function h(e,t){var i={},n=t.length;return Object.keys(e.getters).forEach(function(o){if(o.slice(0,n)===t){var a=o.slice(n);Object.defineProperty(i,a,{get:function(){return e.getters[o]},enumerable:!0})}}),i}function b(e,t,i,n){(e._mutations[t]||(e._mutations[t]=[])).push(function(t){i.call(e,n.state,t)})}function m(e,t,i,n){(e._actions[t]||(e._actions[t]=[])).push(function(t,o){var a=i.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},t,o);return s(a)||(a=Promise.resolve(a)),e._devtoolHook?a.catch(function(t){throw e._devtoolHook.emit("vuex:error",t),t}):a})}function g(e,t,i,n){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return i(n.state,n.getters,e.state,e.getters)})}function v(e){e._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}function k(e,t){return t.length?t.reduce(function(e,t){return e[t]},e):e}function x(e,t,i){return r(e)&&e.type&&(i=t,t=e,e=e.type),{type:e,payload:t,options:i}}function w(e){O&&e===O||(O=e,n(O))}function y(e){return Array.isArray(e)?e.map(function(e){return{key:e,val:e}}):Object.keys(e).map(function(t){return{key:t,val:e[t]}})}function _(e){return function(t,i){return"string"!=typeof t?(i=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,i)}}function C(e,t,i){return e._modulesNamespaceMap[i]}var S="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,$=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var i=e.state;this.state=("function"==typeof i?i():i)||{}},D={namespaced:{configurable:!0}};D.namespaced.get=function(){return!!this._rawModule.namespaced},$.prototype.addChild=function(e,t){this._children[e]=t},$.prototype.removeChild=function(e){delete this._children[e]},$.prototype.getChild=function(e){return this._children[e]},$.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},$.prototype.forEachChild=function(e){a(this._children,e)},$.prototype.forEachGetter=function(e){this._rawModule.getters&&a(this._rawModule.getters,e)},$.prototype.forEachAction=function(e){this._rawModule.actions&&a(this._rawModule.actions,e)},$.prototype.forEachMutation=function(e){this._rawModule.mutations&&a(this._rawModule.mutations,e)},Object.defineProperties($.prototype,D);var z=function(e){this.register([],e,!1)};z.prototype.get=function(e){return e.reduce(function(e,t){return e.getChild(t)},this.root)},z.prototype.getNamespace=function(e){var t=this.root;return e.reduce(function(e,i){return t=t.getChild(i),e+(t.namespaced?i+"/":"")},"")},z.prototype.update=function(e){l([],this.root,e)},z.prototype.register=function(e,t,i){var n=this;void 0===i&&(i=!0);var o=new $(t,i);if(0===e.length)this.root=o;else{this.get(e.slice(0,-1)).addChild(e[e.length-1],o)}t.modules&&a(t.modules,function(t,o){n.register(e.concat(o),t,i)})},z.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),i=e[e.length-1];t.getChild(i).runtime&&t.removeChild(i)};var O,A=function(e){var t=this;void 0===e&&(e={}),!O&&"undefined"!=typeof window&&window.Vue&&w(window.Vue);var i=e.plugins;void 0===i&&(i=[]);var n=e.strict;void 0===n&&(n=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new z(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new O;var a=this,r=this,s=r.dispatch,l=r.commit;this.dispatch=function(e,t){return s.call(a,e,t)},this.commit=function(e,t,i){return l.call(a,e,t,i)},this.strict=n;var c=this._modules.root.state;f(this,c,[],this._modules.root),u(this,c),i.forEach(function(e){return e(t)}),(void 0!==e.devtools?e.devtools:O.config.devtools)&&o(this)},T={state:{configurable:!0}};T.state.get=function(){return this._vm._data.$$state},T.state.set=function(e){},A.prototype.commit=function(e,t,i){var n=this,o=x(e,t,i),a=o.type,r=o.payload,s=(o.options,{type:a,payload:r}),l=this._mutations[a];l&&(this._withCommit(function(){l.forEach(function(e){e(r)})}),this._subscribers.forEach(function(e){return e(s,n.state)}))},A.prototype.dispatch=function(e,t){var i=this,n=x(e,t),o=n.type,a=n.payload,r={type:o,payload:a},s=this._actions[o];if(s){try{this._actionSubscribers.filter(function(e){return e.before}).forEach(function(e){return e.before(r,i.state)})}catch(e){}return(s.length>1?Promise.all(s.map(function(e){return e(a)})):s[0](a)).then(function(e){try{i._actionSubscribers.filter(function(e){return e.after}).forEach(function(e){return e.after(r,i.state)})}catch(e){}return e})}},A.prototype.subscribe=function(e){return c(e,this._subscribers)},A.prototype.subscribeAction=function(e){return c("function"==typeof e?{before:e}:e,this._actionSubscribers)},A.prototype.watch=function(e,t,i){var n=this;return this._watcherVM.$watch(function(){return e(n.state,n.getters)},t,i)},A.prototype.replaceState=function(e){var t=this;this._withCommit(function(){t._vm._data.$$state=e})},A.prototype.registerModule=function(e,t,i){void 0===i&&(i={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),f(this,this.state,e,this._modules.get(e),i.preserveState),u(this,this.state)},A.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit(function(){var i=k(t.state,e.slice(0,-1));O.delete(i,e[e.length-1])}),d(this)},A.prototype.hotUpdate=function(e){this._modules.update(e),d(this,!0)},A.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(A.prototype,T);var M=_(function(e,t){var i={};return y(t).forEach(function(t){var n=t.key,o=t.val;i[n]=function(){var t=this.$store.state,i=this.$store.getters;if(e){var n=C(this.$store,"mapState",e);if(!n)return;t=n.context.state,i=n.context.getters}return"function"==typeof o?o.call(this,t,i):t[o]},i[n].vuex=!0}),i}),j=_(function(e,t){var i={};return y(t).forEach(function(t){var n=t.key,o=t.val;i[n]=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];var n=this.$store.commit;if(e){var a=C(this.$store,"mapMutations",e);if(!a)return;n=a.context.commit}return"function"==typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}}),i}),P=_(function(e,t){var i={};return y(t).forEach(function(t){var n=t.key,o=t.val;o=e+o,i[n]=function(){if(!e||C(this.$store,"mapGetters",e))return this.$store.getters[o]},i[n].vuex=!0}),i}),E=_(function(e,t){var i={};return y(t).forEach(function(t){var n=t.key,o=t.val;i[n]=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];var n=this.$store.dispatch;if(e){var a=C(this.$store,"mapActions",e);if(!a)return;n=a.context.dispatch}return"function"==typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}}),i}),F=function(e){return{mapState:M.bind(null,e),mapGetters:P.bind(null,e),mapMutations:j.bind(null,e),mapActions:E.bind(null,e)}},B={Store:A,install:w,version:"3.1.0",mapState:M,mapMutations:j,mapGetters:P,mapActions:E,createNamespacedHelpers:F};t.a=B}]);
+//# sourceMappingURL=build.js.map \ No newline at end of file
diff --git a/third_party/webrender/debugger/dist/build.js.map b/third_party/webrender/debugger/dist/build.js.map
new file mode 100644
index 00000000000..5c6748b94d0
--- /dev/null
+++ b/third_party/webrender/debugger/dist/build.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///build.js","webpack:///webpack/bootstrap cd2236c5c64656562cc5","webpack:///./node_modules/css-loader/lib/css-base.js","webpack:///./node_modules/vue-style-loader/lib/addStylesClient.js","webpack:///./node_modules/vue-loader/lib/component-normalizer.js","webpack:///./node_modules/vue/dist/vue.runtime.esm.js","webpack:///(webpack)/buildin/global.js","webpack:///./src/components/TreeView.vue","webpack:///src/App.vue","webpack:///src/components/NavBar.vue","webpack:///src/components/NavMenu.vue","webpack:///src/components/OptionsPage.vue","webpack:///src/components/PassViewPage.vue","webpack:///src/components/RenderTaskViewPage.vue","webpack:///src/components/TreeView.vue","webpack:///src/components/DocumentViewPage.vue","webpack:///src/components/ClipScrollTreeViewPage.vue","webpack:///src/components/ScreenshotPage.vue","webpack:///./src/main.js","webpack:///./node_modules/timers-browserify/main.js","webpack:///./node_modules/setimmediate/setImmediate.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/buefy/dist/buefy.js","webpack:///./node_modules/buefy/dist/buefy.css?4403","webpack:///./node_modules/buefy/dist/buefy.css","webpack:///./node_modules/vue-style-loader/lib/listToStyles.js","webpack:///./node_modules/vue-material-design-icons/styles.css?c376","webpack:///./node_modules/vue-material-design-icons/styles.css","webpack:///./src/App.vue","webpack:///./src/App.vue?dec0","webpack:///./src/App.vue?32a8","webpack:///./src/components/NavBar.vue","webpack:///./src/components/NavBar.vue?49e8","webpack:///./src/components/NavBar.vue?8c74","webpack:///./src/components/NavBar.vue?1e10","webpack:///./src/components/NavMenu.vue","webpack:///./src/components/NavMenu.vue?b014","webpack:///./src/components/NavMenu.vue?a863","webpack:///./src/components/NavMenu.vue?fc73","webpack:///./src/components/OptionsPage.vue","webpack:///./src/components/OptionsPage.vue?7a62","webpack:///./src/components/OptionsPage.vue?2eb4","webpack:///./src/components/OptionsPage.vue?4dbb","webpack:///./src/components/PassViewPage.vue","webpack:///./src/components/PassViewPage.vue?d45d","webpack:///./src/components/PassViewPage.vue?1474","webpack:///./src/components/PassViewPage.vue?ba8d","webpack:///./src/components/RenderTaskViewPage.vue","webpack:///./src/components/RenderTaskViewPage.vue?8e9b","webpack:///./src/components/RenderTaskViewPage.vue?9881","webpack:///./src/components/TreeView.vue?3aad","webpack:///./src/components/TreeView.vue?828d","webpack:///./src/components/TreeView.vue?618e","webpack:///./src/components/RenderTaskViewPage.vue?ffdd","webpack:///./src/components/DocumentViewPage.vue","webpack:///./src/components/DocumentViewPage.vue?34ab","webpack:///./src/components/DocumentViewPage.vue?2072","webpack:///./src/components/DocumentViewPage.vue?2e34","webpack:///./src/components/ClipScrollTreeViewPage.vue","webpack:///./src/components/ClipScrollTreeViewPage.vue?60b5","webpack:///./src/components/ClipScrollTreeViewPage.vue?36ca","webpack:///./src/components/ClipScrollTreeViewPage.vue?da15","webpack:///./src/components/ScreenshotPage.vue","webpack:///./src/components/ScreenshotPage.vue?c861","webpack:///./src/components/ScreenshotPage.vue?ef61","webpack:///./src/components/ScreenshotPage.vue?1e6f","webpack:///./src/App.vue?d93d","webpack:///./src/store/index.js","webpack:///./node_modules/vuex/dist/vuex.esm.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","cssWithMappingToString","item","useSourceMap","content","cssMapping","btoa","sourceMapping","toComment","concat","sources","map","source","sourceRoot","join","sourceMap","unescape","encodeURIComponent","JSON","stringify","list","toString","this","mediaQuery","alreadyImportedModules","length","id","push","addStylesToDom","styles","domStyle","stylesInDom","refs","j","parts","addStyle","createStyleElement","styleElement","document","createElement","type","head","appendChild","obj","update","remove","querySelector","ssrIdKey","isProduction","noop","parentNode","removeChild","isOldIE","styleIndex","singletonCounter","singletonElement","applyToSingletonTag","bind","applyToTag","newObj","css","media","index","styleSheet","cssText","replaceText","cssNode","createTextNode","childNodes","insertBefore","setAttribute","options","ssrId","firstChild","hasDocument","DEBUG","Error","listToStyles","getElementsByTagName","navigator","test","userAgent","toLowerCase","parentId","_isProduction","_options","newList","mayRemove","textStore","replacement","filter","Boolean","rawScriptExports","compiledTemplate","functionalTemplate","injectStyles","scopeId","moduleIdentifier","esModule","scriptExports","default","render","staticRenderFns","_compiled","functional","_scopeId","hook","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","existing","beforeCreate","_injectStyles","h","__webpack_exports__","value","global","setImmediate","isUndef","v","undefined","isDef","isTrue","isFalse","isPrimitive","isObject","isPlainObject","_toString","isRegExp","isValidArrayIndex","val","parseFloat","String","Math","floor","isFinite","isPromise","then","catch","Array","isArray","toNumber","isNaN","makeMap","str","expectsLowerCase","create","split","arr","indexOf","splice","hasOwn","key","cached","fn","cache","polyfillBind","ctx","boundFn","a","arguments","apply","_length","nativeBind","toArray","start","ret","extend","to","_from","toObject","res","b","looseEqual","isObjectA","isObjectB","isArrayA","isArrayB","every","e","Date","getTime","keysA","keys","keysB","looseIndexOf","once","called","isReserved","charCodeAt","def","writable","parsePath","path","bailRE","segments","isNative","Ctor","pushTarget","target","targetStack","Dep","popTarget","pop","createTextVNode","VNode","cloneVNode","vnode","cloned","tag","data","children","slice","text","elm","componentOptions","asyncFactory","ns","isStatic","isComment","fnContext","fnOptions","fnScopeId","asyncMeta","isCloned","toggleObserving","shouldObserve","protoAugment","src","__proto__","copyAugment","observe","asRootData","ob","__ob__","Observer","isServerRendering","isExtensible","_isVue","vmCount","defineReactive$$1","customSetter","shallow","dep","getOwnPropertyDescriptor","setter","set","childOb","depend","dependArray","newVal","notify","max","del","mergeData","from","toVal","fromVal","hasSymbol","Reflect","ownKeys","mergeDataOrFn","parentVal","childVal","vm","instanceData","defaultData","mergeHook","dedupeHooks","hooks","mergeAssets","normalizeProps","props","camelize","normalizeInject","inject","normalized","normalizeDirectives","dirs","directives","def$$1","mergeOptions","child","mergeField","strat","strats","defaultStrat","_base","extends","mixins","resolveAsset","warnMissing","assets","camelizedId","PascalCaseId","capitalize","validateProp","propOptions","propsData","prop","absent","booleanIndex","getTypeIndex","hyphenate","stringIndex","getPropDefaultValue","prevShouldObserve","$options","_props","getType","match","isSameType","expectedTypes","len","handleError","err","info","cur","$parent","errorCaptured","capture","globalHandleError","invokeWithErrorHandling","handler","args","_handled","config","errorHandler","logError","inBrowser","inWeex","console","error","flushCallbacks","pending","copies","callbacks","nextTick","cb","_resolve","timerFunc","Promise","resolve","traverse","_traverse","seenObjects","clear","seen","isA","isFrozen","depId","has","createFnInvoker","fns","invoker","arguments$1","updateListeners","on","oldOn","remove$$1","createOnceHandler","old","event","normalizeEvent","passive","params","mergeVNodeHook","hookKey","wrappedHook","oldHook","merged","extractPropsFromVNodeData","attrs","altKey","checkProp","hash","preserve","simpleNormalizeChildren","normalizeChildren","normalizeArrayChildren","isTextNode","node","nestedIndex","lastIndex","last","shift","_isVList","initProvide","provide","_provided","initInjections","result","resolveInject","forEach","provideKey","provideDefault","resolveSlots","slots","slot","name$1","isWhitespace","normalizeScopedSlots","normalSlots","prevSlots","hasNormalSlots","isStable","$stable","$key","_normalized","emptyObject","$hasNormal","key$1","normalizeScopedSlot","key$2","proxyNormalSlot","proxy","renderList","Symbol","iterator","next","done","renderSlot","fallback","bindObject","nodes","scopedSlotFn","$scopedSlots","$slots","$createElement","resolveFilter","identity","isKeyNotMatch","expect","actual","checkKeyCodes","eventKeyCode","builtInKeyCode","eventKeyName","builtInKeyName","mappedKeyCode","keyCodes","bindObjectProps","asProp","isSync","isReservedAttribute","mustUseProp","domProps","camelizedKey","hyphenatedKey","$event","renderStatic","isInFor","_staticTrees","tree","_renderProxy","markStatic","markOnce","isOnce","markStaticNode","bindObjectListeners","ours","resolveScopedSlots","hasDynamicKeys","contentHashKey","bindDynamicKeys","baseObj","values","prependModifier","symbol","installRenderHelpers","_o","_n","_s","_l","_t","_q","_i","_m","_f","_k","_b","_v","_e","createEmptyVNode","_u","_g","_d","_p","FunctionalRenderContext","contextVm","this$1","_original","isCompiled","needNormalization","listeners","injections","scopedSlots","_c","createFunctionalComponent","mergeProps","renderContext","cloneAndMarkFunctionalResult","vnodes","clone","createComponent","baseCtor","cid","resolveAsyncComponent","createAsyncPlaceholder","resolveConstructorOptions","model","transformModel","nativeOn","abstract","installComponentHooks","createComponentInstanceForVnode","_isComponent","_parentVnode","inlineTemplate","hooksToMerge","toMerge","componentVNodeHooks","_merged","mergeHook$1","f1","f2","callback","normalizationType","alwaysNormalize","ALWAYS_NORMALIZE","_createElement","is","SIMPLE_NORMALIZE","getTagNamespace","isReservedTag","parsePlatformTagName","pre","applyNS","registerDeepBindings","force","style","class","initRender","_vnode","parentVnode","_renderChildren","parentData","_parentListeners","ensureCtor","comp","base","toStringTag","factory","errorComp","resolved","owner","currentRenderingInstance","owners","loading","loadingComp","sync","timerLoading","timerTimeout","$on","forceRender","renderCompleted","$forceUpdate","clearTimeout","reject","reason","component","delay","setTimeout","timeout","isAsyncPlaceholder","getFirstComponentChild","initEvents","_events","_hasHookEvent","updateComponentListeners","remove$1","$off","_target","onceHandler","oldListeners","setActiveInstance","prevActiveInstance","activeInstance","initLifecycle","$children","$root","$refs","_watcher","_inactive","_directInactive","_isMounted","_isDestroyed","_isBeingDestroyed","mountComponent","el","hydrating","$el","callHook","updateComponent","_update","_render","Watcher","before","updateChildComponent","renderChildren","newScopedSlots","oldScopedSlots","hasDynamicScopedSlot","needsForceUpdate","$attrs","$listeners","propKeys","_propKeys","isInInactiveTree","activateChildComponent","direct","deactivateChildComponent","handlers","$emit","resetSchedulerState","queue","activatedChildren","waiting","flushing","flushSchedulerQueue","currentFlushTimestamp","getNow","watcher","sort","run","activatedQueue","updatedQueue","callActivatedHooks","callUpdatedHooks","devtools","emit","queueActivatedComponent","queueWatcher","sourceKey","sharedPropertyDefinition","initState","_watchers","opts","initProps","methods","initMethods","initData","_data","computed","initComputed","watch","nativeWatch","initWatch","propsOptions","isRoot","getData","watchers","_computedWatchers","isSSR","userDef","computedWatcherOptions","defineComputed","shouldCache","createComputedGetter","createGetterInvoker","dirty","evaluate","createWatcher","expOrFn","$watch","initInternalComponent","constructor","vnodeComponentOptions","_componentTag","super","superOptions","modifiedOptions","resolveModifiedOptions","extendOptions","components","modified","latest","sealed","sealedOptions","Vue","_init","initUse","use","plugin","installedPlugins","_installedPlugins","unshift","install","initMixin$1","mixin","initExtend","Super","SuperId","cachedCtors","_Ctor","Sub","initProps$1","initComputed$1","ASSET_TYPES","Comp","initAssetRegisters","definition","getComponentName","matches","pattern","pruneCache","keepAliveInstance","cachedNode","pruneCacheEntry","current","cached$$1","componentInstance","$destroy","genClassForVnode","childNode","mergeClassData","renderClass","staticClass","dynamicClass","stringifyClass","stringifyArray","stringifyObject","stringified","isSVG","isUnknownElement","unknownElementCache","window","HTMLUnknownElement","HTMLElement","query","selected","createElement$1","tagName","multiple","createElementNS","namespace","namespaceMap","createComment","newNode","referenceNode","nextSibling","setTextContent","textContent","setStyleScope","registerRef","isRemoval","ref","refInFor","sameVnode","sameInputType","typeA","typeB","isTextInputType","createKeyToOldIdx","beginIdx","endIdx","updateDirectives","oldVnode","oldDir","dir","isCreate","emptyNode","isDestroy","oldDirs","normalizeDirectives$1","newDirs","dirsWithInsert","dirsWithPostpatch","oldValue","oldArg","arg","callHook$1","componentUpdated","inserted","callInsert","modifiers","emptyModifiers","getRawDirName","rawName","updateAttrs","inheritAttrs","oldAttrs","setAttr","isIE","isEdge","isXlink","removeAttributeNS","xlinkNS","getXlinkProp","isEnumeratedAttr","removeAttribute","baseSetAttr","isBooleanAttr","isFalsyAttrValue","convertEnumeratedValue","setAttributeNS","isIE9","__ieph","blocker","stopImmediatePropagation","removeEventListener","addEventListener","updateClass","oldData","cls","transitionClass","_transitionClasses","_prevClass","normalizeEvents","RANGE_TOKEN","CHECKBOX_RADIO_TOKEN","change","createOnceHandler$1","target$1","remove$2","add$1","useMicrotaskFix","attachedTimestamp","original","_wrapper","currentTarget","timeStamp","ownerDocument","supportsPassive","updateDOMListeners","updateDOMProps","oldProps","_value","strCur","shouldUpdateValue","innerHTML","svgContainer","svg","checkVal","composing","isNotInFocusAndDirty","isDirtyWithModifiers","notInFocus","activeElement","_vModifiers","number","trim","normalizeStyleData","normalizeStyleBinding","staticStyle","bindingStyle","parseStyleText","getStyle","checkChild","styleData","updateStyle","oldStaticStyle","oldStyleBinding","normalizedStyle","oldStyle","newStyle","setProp","addClass","classList","whitespaceRE","getAttribute","removeClass","tar","replace","resolveTransition","autoCssTransition","nextFrame","raf","addTransitionClass","transitionClasses","removeTransitionClass","whenTransitionEnds","expectedType","getTransitionInfo","propCount","TRANSITION","transitionEndEvent","animationEndEvent","ended","end","onEnd","getComputedStyle","transitionDelays","transitionProp","transitionDurations","transitionTimeout","getTimeout","animationDelays","animationProp","animationDurations","animationTimeout","ANIMATION","hasTransform","transformRE","delays","durations","toMs","Number","enter","toggleDisplay","_leaveCb","cancelled","transition","_enterCb","nodeType","enterClass","enterToClass","enterActiveClass","appearClass","appearToClass","appearActiveClass","beforeEnter","afterEnter","enterCancelled","beforeAppear","appear","afterAppear","appearCancelled","duration","transitionNode","isAppear","isRootInsert","startClass","activeClass","toClass","beforeEnterHook","enterHook","afterEnterHook","enterCancelledHook","explicitEnterDuration","expectsCSS","userWantsControl","getHookArgumentsLength","show","pendingNode","_pending","isValidDuration","leave","rm","performLeave","beforeLeave","leaveClass","leaveActiveClass","leaveToClass","explicitLeaveDuration","afterLeave","leaveCancelled","delayLeave","invokerFns","_enter","_","setSelected","binding","actuallySetSelected","isMultiple","option","getValue","selectedIndex","hasNoMatchingOption","onCompositionStart","onCompositionEnd","trigger","createEvent","initEvent","dispatchEvent","locateNode","getRealChild","compOptions","extractTransitionData","placeholder","rawChild","hasParentTransition","isSameChild","oldChild","callPendingCbs","_moveCb","recordPosition","newPos","getBoundingClientRect","applyTranslation","oldPos","pos","dx","left","dy","top","moved","transform","WebkitTransform","transitionDuration","freeze","camelizeRE","toUpperCase","charAt","hyphenateRE","Function","no","SSR_ATTR","LIFECYCLE_HOOKS","optionMergeStrategies","silent","productionTip","performance","warnHandler","ignoredElements","isReservedAttr","async","_lifecycleHooks","unicodeRegExp","RegExp","hasProto","WXEnvironment","platform","weexPlatform","UA","isIOS","isFF","_isServer","_Set","env","VUE_ENV","__VUE_DEVTOOLS_GLOBAL_HOOK__","Set","warn","uid","subs","addSub","sub","removeSub","addDep","raw","prototypeAccessors","defineProperties","arrayProto","arrayMethods","method","observeArray","arrayKeys","getOwnPropertyNames","walk","items","isUsingMicroTask","MutationObserver","counter","observer","textNode","characterData","once$$1","init","keepAlive","mountedNode","prepatch","$mount","insert","destroy","now","uid$2","isRenderWatcher","deep","user","lazy","active","deps","newDeps","depIds","newDepIds","expression","cleanupDeps","tmp","teardown","uid$3","_uid","_self","dataDef","propsDef","$set","$delete","immediate","hookRE","$once","i$1","cbs","prevEl","prevVnode","restoreActiveInstance","__patch__","__vue__","$nextTick","patternTypes","KeepAlive","include","exclude","created","destroyed","mounted","ref$1","parseInt","builtInComponents","configDef","util","defineReactive","delete","observable","version","emptyStyle","acceptValue","attr","isValidContentEditableValue","math","isHTMLTag","nodeOps","baseModules","klass","events","listDelimiter","propertyDelimiter","cssVarRE","importantRE","setProperty","normalizedName","normalize","vendorNames","capName","hasTransition","ontransitionend","onwebkittransitionend","onanimationend","onwebkitanimationend","requestAnimationFrame","activate","platformModules","patch","backend","emptyNodeAt","createRmCb","childElm","removeNode","createElm","insertedVnodeQueue","parentElm","refElm","nested","ownerArray","setScope","createChildren","invokeCreateHooks","isReactivated","initComponent","reactivateComponent","pendingInsert","isPatchable","innerNode","ref$$1","ancestor","addVnodes","startIdx","invokeDestroyHook","removeVnodes","ch","removeAndInvokeRemoveHook","updateChildren","oldCh","newCh","removeOnly","oldKeyToIdx","idxInOld","vnodeToMove","oldStartIdx","newStartIdx","oldEndIdx","oldStartVnode","oldEndVnode","newEndIdx","newStartVnode","newEndVnode","canMove","patchVnode","findIdxInOld","hydrate","postpatch","invokeInsertHook","initial","inVPre","hasChildNodes","childrenMatch","fullInvoke","isRenderedModule","isInitialPatch","isRealElement","hasAttribute","oldElm","patchable","i$2","vmodel","directive","_vOptions","prevOptions","curOptions","some","transition$$1","originalDisplay","__vOriginalDisplay","display","unbind","platformDirectives","transitionProps","mode","isNotTextNode","isVShowDirective","Transition","_leaving","oldRawChild","delayedLeave","moveClass","TransitionGroup","beforeMount","kept","prevChildren","rawChildren","transitionData","removed","c$1","updated","hasMove","_reflow","body","offsetHeight","propertyName","_hasMove","cloneNode","platformComponents","g","eval","injectStyle","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_TreeView_vue__","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_44998ed8_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_TreeView_vue__","normalizeComponent","__vue_styles__","Component","__WEBPACK_IMPORTED_MODULE_0__components_NavBar_vue__","__WEBPACK_IMPORTED_MODULE_1__components_NavMenu_vue__","__WEBPACK_IMPORTED_MODULE_2__components_OptionsPage_vue__","__WEBPACK_IMPORTED_MODULE_3__components_PassViewPage_vue__","__WEBPACK_IMPORTED_MODULE_4__components_RenderTaskViewPage_vue__","__WEBPACK_IMPORTED_MODULE_5__components_DocumentViewPage_vue__","__WEBPACK_IMPORTED_MODULE_6__components_ClipScrollTreeViewPage_vue__","__WEBPACK_IMPORTED_MODULE_7__components_ScreenshotPage_vue__","app-navbar","app-navmenu","app-options","app-passview","app-rendertaskview","app-documentview","app-clipscrolltreeview","app-screenshotview","page","$store","state","isConnected","connected","connect","dispatch","disconnect","setPage","commit","disabled","setProfiler","enabled","setTextureCacheDebugger","setRenderTargetDebugger","setAlphaRectsDebugger","setGpuTimeQueries","setGpuSampleQueries","setOpaquePass","setAlphaPass","setClipMasks","setTextPrims","setGradientPrims","fetch","passes","__WEBPACK_IMPORTED_MODULE_0__TreeView_vue__","app-treeview","render_tasks","open","isFolder","toggle","documents","clip_scroll_tree","screenshot","__WEBPACK_IMPORTED_MODULE_0_vue__","__WEBPACK_IMPORTED_MODULE_1_buefy__","__WEBPACK_IMPORTED_MODULE_1_buefy___default","__WEBPACK_IMPORTED_MODULE_2_buefy_dist_buefy_css__","__WEBPACK_IMPORTED_MODULE_3_vue_material_design_icons_styles_css__","__WEBPACK_IMPORTED_MODULE_4__App_vue__","__WEBPACK_IMPORTED_MODULE_5__store__","Buefy","store","App","Timeout","clearFn","_id","_clearFn","scope","self","setInterval","clearInterval","close","unref","enroll","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","_onTimeout","clearImmediate","process","task","tasksByHandle","nextHandle","registerImmediate","handle","runIfPresent","currentlyRunningATask","doc","attachTo","getPrototypeOf","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","messagePrefix","random","onGlobalMessage","attachEvent","MessageChannel","channel","port1","port2","html","documentElement","script","onreadystatechange","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","Item","array","title","browser","argv","versions","addListener","off","removeListener","removeAllListeners","prependListener","prependOnceListener","cwd","chdir","umask","root","__WEBPACK_EXTERNAL_MODULE_23__","_defineProperty","_defineProperty2","setOptions","defaultContainerElement","defaultIconPack","defaultDialogConfirmText","defaultDialogCancelText","defaultSnackbarDuration","defaultToastDuration","defaultTooltipType","defaultTooltipAnimated","defaultInputAutocomplete","defaultDateFormatter","defaultDateParser","defaultDayNames","defaultMonthNames","defaultFirstDayOfWeek","defaultUnselectableDaysOfWeek","defaultTimeFormatter","defaultTimeParser","defaultModalScroll","defaultDatepickerMobileNative","defaultTimepickerMobileNative","defaultNoticeQueue","defaultInputHasCounter","USE_SYMBOL","getValueByPath","reduce","removeElement","escapeRegExpChars","isMobile","Android","BlackBerry","iOS","Opera","Windows","any","__g","core","__e","anObject","IE8_DOM_DEFINE","toPrimitive","dP","f","O","P","Attributes","TypeError","it","__WEBPACK_IMPORTED_MODULE_0__BaseElementMixin__","size","expanded","rounded","icon","autocomplete","maxlength","isValid","isFocused","parentField","$data","_isField","statusType","newType","statusMessage","newMessage","iconSize","newIconPack","focus","_this","_elementRef","onBlur","checkHtml5Validity","onFocus","message","checkValidity","validationMessage","__WEBPACK_IMPORTED_MODULE_0__config__","iconPack","createDesc","IObject","defined","hide","$export","own","out","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","S","IS_PROTO","IS_BIND","B","IS_WRAP","W","expProto","C","virtual","R","U","exec","bitmap","$keys","enumBugKeys","px","propertyIsEnumerable","valueOf","ceil","shared","getOwnPropertySymbols","$at","iterated","point","TAG","stat","LIBRARY","wksExt","$Symbol","aFunction","that","toIObject","arrayIndexOf","IE_PROTO","names","cof","toInteger","min","_interopRequireDefault","_iterator","_iterator2","_symbol","_symbol2","_typeof","redefine","Iterators","$iterCreate","setToStringTag","ITERATOR","BUGGY","returnThis","Base","NAME","Constructor","DEFAULT","IS_SET","FORCED","IteratorPrototype","getMethod","kind","proto","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","entries","dPs","Empty","createDict","iframeDocument","iframe","contentWindow","write","lt","Properties","TO_STRING_TAG","DOMIterables","Collection","hiddenKeys","classof","getIteratorMethod","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default","__WEBPACK_IMPORTED_MODULE_1__components_icon_Icon__","__WEBPACK_IMPORTED_MODULE_1__components_icon_Icon___default","__WEBPACK_IMPORTED_MODULE_2__BaseElementMixin__","closable","hasIcon","autoClose","isActive","setAutoClose","timer","__WEBPACK_IMPORTED_MODULE_1__helpers__","position","validator","container","parentTop","parentBottom","newContainer","correctParent","shouldQueue","childElementCount","showNotice","_this2","insertAdjacentElement","indefinite","newDuration","setupContainer","className","dialog_open","external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default","Dialog_default","components_namespaceObject","components_checkbox","collapse","datepicker","dialog","dropdown","field","input","components_message","modal","notification","pagination","panel","components_radio","components_select","snackbar","components_switch","table","tabs","taginput","timepicker","toast","tooltip","upload","object_assign","assign_default","Autocomplete","Autocomplete_default","registerComponent","registerComponentProgrammatic","Plugin","Checkbox","Checkbox_default","CheckboxButton","CheckboxButton_default","checkbox_Plugin","Collapse","Collapse_default","collapse_Plugin","Datepicker","Datepicker_default","datepicker_Plugin","external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue__","Dialog","DialogProgrammatic","alert","defaultParam","canCancel","confirm","prompt","hasInput","confirmText","dialog_Plugin","Dropdown","Dropdown_default","DropdownItem","DropdownItem_default","dropdown_Plugin","Field","Field_default","field_Plugin","Icon","Icon_default","icon_Plugin","Input","Input_default","input_Plugin","Loading","Loading_default","LoadingProgrammatic","programmatic","loading_Plugin","Message","Message_default","message_Plugin","Modal","Modal_default","ModalProgrammatic","modal_Plugin","Notification","Notification_default","notification_Plugin","Pagination","Pagination_default","pagination_Plugin","Panel","Panel_default","panel_Plugin","Radio","Radio_default","RadioButton","RadioButton_default","radio_Plugin","Select","Select_default","select_Plugin","Snackbar","Snackbar_default","SnackbarProgrammatic","snackbar_Plugin","Switch","Switch_default","switch_Plugin","Table","Table_default","TableColumn","TableColumn_default","table_Plugin","Tabs","Tabs_default","TabItem","TabItem_default","tabs_Plugin","Tag","Tag_default","Taglist","Taglist_default","tag_Plugin","Taginput","Taginput_default","taginput_Plugin","Timepicker","Timepicker_default","timepicker_Plugin","Toast","Toast_default","ToastProgrammatic","toast_Plugin","Tooltip","Tooltip_default","tooltip_Plugin","Upload","Upload_default","upload_Plugin","componentKey","assign","getKeys","gOPS","pIE","$assign","A","K","k","T","aLen","getSymbols","isEnum","toLength","toAbsoluteIndex","IS_INCLUDES","$this","fromIndex","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator__","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator___default","__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty__","__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty___default","__WEBPACK_IMPORTED_MODULE_3__utils_helpers__","__WEBPACK_IMPORTED_MODULE_4__utils_FormElementMixin__","__WEBPACK_IMPORTED_MODULE_5__input_Input__","__WEBPACK_IMPORTED_MODULE_5__input_Input___default","keepFirst","clearOnSelect","openOnFocus","hovered","newValue","isListInViewportVertically","hasFocus","_isAutocomplete","whiteList","querySelectorAll","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","return","hasDefaultSlot","hasEmptySlot","empty","hasHeaderSlot","header","calcDropdownInViewportVertical","setHovered","currentValue","selectFirstOption","closeDropdown","_this3","enterPressed","tabPressed","clickedOutside","isHighlight","escapedValue","regex","_this4","rect","bottom","innerHeight","clientHeight","keyArrows","direction","sum","element","visMin","scrollTop","visMax","offsetTop","focused","select","beforeDestroy","TO_STRING","descriptor","ObjectProto","addToUnscopables","step","Arguments","DESCRIPTORS","META","KEY","$fails","wks","wksDefine","enumKeys","_create","gOPNExt","$GOPD","$DP","gOPD","gOPN","$JSON","_stringify","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","USE_NATIVE","QObject","findChild","setSymbolDesc","D","protoDesc","wrap","sym","isSymbol","$defineProperty","$defineProperties","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","es6Symbols","wellKnownSymbols","for","keyFor","useSetter","useSimple","replacer","$replacer","setDesc","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","symbols","windowNames","getWindowNames","getIterator","iterFn","ARG","tryGet","callee","$Object","desc","__WEBPACK_IMPORTED_MODULE_1__icon_Icon__","__WEBPACK_IMPORTED_MODULE_1__icon_Icon___default","__WEBPACK_IMPORTED_MODULE_2__utils_config__","__WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__","passwordReveal","hasCounter","newAutocomplete","isPasswordVisible","rootClasses","iconPosition","is-expanded","is-loading","is-clearfix","hasMessage","inputClasses","is-rounded","hasIconRight","statusTypeIcon","passwordVisibleIcon","valueLength","togglePasswordVisibility","onInput","__WEBPACK_IMPORTED_MODULE_0__utils_config__","pack","customSize","customClass","both","newIcon","newPack","getEquivalentIconOf","splitType","newCustomSize","customSizeByPack","defaultSize","mediumSize","largeSize","_vm","_h","blur","is-clickable","click","is-invisible","icon-pack","keyup","keyCode","preventDefault","keydown","$$v","is-opened-top","is-hovered","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default","nativeValue","required","trueValue","falseValue","is-disabled","tabindex","label","true-value","false-value","checked","$$a","$$el","$$c","$$i","animation","isOpen","_components","__WEBPACK_IMPORTED_MODULE_1__utils_FormElementMixin__","__WEBPACK_IMPORTED_MODULE_2__utils_helpers__","__WEBPACK_IMPORTED_MODULE_3__utils_config__","__WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown__","__WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default","__WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem__","__WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default","__WEBPACK_IMPORTED_MODULE_6__input_Input__","__WEBPACK_IMPORTED_MODULE_6__input_Input___default","__WEBPACK_IMPORTED_MODULE_7__field_Field__","__WEBPACK_IMPORTED_MODULE_7__field_Field___default","__WEBPACK_IMPORTED_MODULE_8__select_Select__","__WEBPACK_IMPORTED_MODULE_8__select_Select___default","__WEBPACK_IMPORTED_MODULE_9__icon_Icon__","__WEBPACK_IMPORTED_MODULE_9__icon_Icon___default","__WEBPACK_IMPORTED_MODULE_10__DatepickerTable__","__WEBPACK_IMPORTED_MODULE_10__DatepickerTable___default","dayNames","monthNames","firstDayOfWeek","inline","minDate","maxDate","focusedDate","readonly","unselectableDates","unselectableDaysOfWeek","selectableDates","dateFormatter","date","yyyyMMdd","getFullYear","getMonth","getDate","toLocaleDateString","dateParser","parse","mobileNative","indicators","dateSelected","focusedDateData","month","year","_isDatepicker","listOfYears","latestYear","earliestYear","arrayOfYears","reverse","isFirstMonth","isLastMonth","currentDate","focusedDateData.month","focusedDateData.year","updateSelectedDate","onChange","formatValue","decrementMonth","incrementMonth","formatYYYYMMDD","day","onChangeNativePicker","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator__","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator___default","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol__","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol___default","hoverable","mobileModal","_isDropdown","is-hoverable","is-inline","is-active","is-mobile-modal","isMobileModal","selectItem","isInWhiteList","dropdownMenu","_children","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","role","separator","custom","paddingless","hasLink","anchorClasses","is-paddingless","itemClasses","dropdown-item","has-link","isClickable","__WEBPACK_IMPORTED_MODULE_1__FieldBody__","__WEBPACK_IMPORTED_MODULE_1__FieldBody___default","labelFor","grouped","groupMultiline","horizontal","addons","fieldLabelSize","newPosition","is-grouped-multiline","is-horizontal","prefix","formattedMessage","fieldType","renderedNode","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default","__WEBPACK_IMPORTED_MODULE_2__icon_Icon__","__WEBPACK_IMPORTED_MODULE_2__icon_Icon___default","nativeSize","_isSelect","spanClasses","is-fullwidth","is-multiple","is-empty","has-icons-left","$$selectedVal","hidden","__WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow__","__WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow___default","visibleDayNames","currentDayName","hasEvents","eventsInThisMonth","monthEvents","weekBuilder","startingDate","thisMonth","thisWeek","dayOfWeek","getDay","daysAgo","daysForward","weeksInThisMonth","daysInThisMonth","startingDay","newWeek","weekValid","eventsInThisWeek","week","weekEvents","selectedDate","selectableDate","validity","enabledDate","disabledDate","_i2","emitChosenDate","eventsDateMatch","dayEvents","classObject","dateMatch","dateOne","dateTwo","is-selected","is-today","is-selectable","is-unselectable","has-event","href","has-events","selected-date","min-date","max-date","unselectable-dates","unselectable-days-of-week","selectable-dates","day-names","month-names","first-day-of-week","__WEBPACK_IMPORTED_MODULE_2__modal_Modal__","__WEBPACK_IMPORTED_MODULE_2__modal_Modal___default","__WEBPACK_IMPORTED_MODULE_4__utils_helpers__","__WEBPACK_IMPORTED_MODULE_5__utils_BaseElementMixin__","cancelText","inputAttrs","onConfirm","focusOn","iconByType","showCancel","cancelOptions","cancelButton","confirmButton","__WEBPACK_IMPORTED_MODULE_0__utils_helpers__","__WEBPACK_IMPORTED_MODULE_1__utils_config__","width","hasModalCard","onCancel","scroll","savedScrollTop","newWidth","showX","handleScroll","cancel","keyPress","modal-content","maxWidth","is-titleless","is-flex","is-danger","helpers","isFullPage","is-full-page","__WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__","newIconSize","__WEBPACK_IMPORTED_MODULE_2__utils_BaseElementMixin__","total","perPage","simple","order","is-simple","pageCount","firstItem","hasPrev","hasFirst","hasFirstEllipsis","hasLast","hasLastEllipsis","hasNext","pagesInRange","right","pages","isCurrent","prev","first","is-current","collapsible","hasCustomTemplate","is-collapsible","panel-block","__WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__","actionText","onAction","action","enter-active-class","leave-active-class","isMouseDown","mousedown","mouseup","mouseout","stopPropagation","is-elastic","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray__","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default","__WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox__","__WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox___default","__WEBPACK_IMPORTED_MODULE_4__icon_Icon__","__WEBPACK_IMPORTED_MODULE_4__icon_Icon___default","__WEBPACK_IMPORTED_MODULE_5__pagination_Pagination__","__WEBPACK_IMPORTED_MODULE_5__pagination_Pagination___default","__WEBPACK_IMPORTED_MODULE_6__TableMobileSort__","__WEBPACK_IMPORTED_MODULE_6__TableMobileSort___default","__WEBPACK_IMPORTED_MODULE_7__TableColumn__","__WEBPACK_IMPORTED_MODULE_7__TableColumn___default","__WEBPACK_IMPORTED_MODULE_8__utils_BaseElementMixin__","columns","bordered","striped","narrowed","detailed","checkable","focusable","customIsChecked","isRowCheckable","checkedRows","mobileCards","defaultSort","defaultSortDirection","paginated","currentPage","paginationSimple","paginationSize","backendSorting","rowClass","openedDetailed","hasDetailedVisible","detailKey","backendPagination","newColumns","visibleDetailRows","newData","newDataTotal","newCheckedRows","newCurrentPage","currentSortColumn","isAsc","firstTimeSort","_isTable","tableClasses","is-bordered","is-striped","is-narrow","has-mobile-cards","visibleData","isAllChecked","validVisibleData","row","currentVisibleRow","isAllUncheckable","hasSortablenewColumns","column","sortable","columnCount","count","newTotal","rows","_newColumns","initSort","expandedRows","sortBy","newA","newB","updatingData","customSort","isRowChecked","removeCheckedRow","checkAll","currentRow","checkRow","selectRow","pageChanged","toggleDetails","isVisibleDetailRow","closeDetailRow","openDetailRow","handleDetailKey","checkPredefinedDetailedRows","hasCustomFooterSlot","footer","hasBottomLeftSlot","pressedArrow","_this5","sortField","sortDirection","_from2","arr2","isArrayIter","createProperty","getIterFn","iter","arrayLike","mapfn","mapping","ArrayProto","SAFE_CLOSING","riter","skipClosing","safe","__WEBPACK_IMPORTED_MODULE_1__select_Select__","__WEBPACK_IMPORTED_MODULE_1__select_Select___default","mobileSort","is-desc","customKey","numeric","centered","visible","internal","newKey","has-text-right","has-text-centered","data-label","current-sort-column","is-asc","is-current-sort","is-sortable","is-numeric","is-centered","is-checked","dblclick","colspan","per-page","defineProperty_default","SlotComponent","refresh","isVueComponent","animated","activeTab","tabItems","contentHeight","_isTabs","navClasses","is-toggle-rounded is-toggle","changeTab","newIndex","deactivate","tabClick","tabItem","__WEBPACK_IMPORTED_MODULE_0__utils_BaseElementMixin__","transitionName","oldIndex","attached","ellipsis","tabstop","has-ellipsis","has-addons","__WEBPACK_IMPORTED_MODULE_3__tag_Tag__","__WEBPACK_IMPORTED_MODULE_3__tag_Tag___default","__WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete__","__WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete___default","__WEBPACK_IMPORTED_MODULE_5__utils_FormElementMixin__","maxtags","confirmKeyCodes","removeOnKeys","allowNew","onPasteSeparators","beforeAdding","allowDuplicates","tags","newTag","_isTaginput","containerClasses","is-focused","is-focusable","defaultSlotName","emptySlotName","tagsLength","separatorsAsRegExp","sep","addTag","tagToAdd","reg","t","getNormalizedTagText","customOnBlur","onSelect","removeTag","removeLastTag","has-counter","keep-first","AM","PM","formatNumber","timeFormatter","hours","getHours","minutes","getMinutes","am","hourFormat","timeParser","dateString","dateString12","time","setMilliseconds","setSeconds","setMinutes","setHours","minTime","maxTime","incrementMinutes","unselectableTimes","hoursSelected","minutesSelected","meridienSelected","_isTimepicker","numberOfHours","isHourFormat24","meridiens","updateInternalState","onMeridienChange","updateDateSelected","onHoursChange","onMinutesChange","isHourDisabled","hour","minHours","maxHours","unselectable","_unselectable","isMinuteDisabled","minute","minMinutes","_minMinutes","formatHHMMSS","meridien","always","square","dashed","multilined","newAnimated","is-square","is-animated","is-always","is-multiline","is-dashed","__WEBPACK_IMPORTED_MODULE_0__utils_FormElementMixin__","accept","dragDrop","native","dragDropFocus","onFileChange","updateDragDropFocus","files","dataTransfer","file","checkType","types","valid","substring","extIndex","lastIndexOf","dragover","dragleave","dragenter","drop","locals","newStyles","part","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3e910c9a_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_NavBar_vue__","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_657ba0aa_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_NavBar_vue__","esExports","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_NavMenu_vue__","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_e621d982_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_NavMenu_vue__","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_OptionsPage_vue__","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_61a8a336_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_OptionsPage_vue__","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_PassViewPage_vue__","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_329e01f6_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_PassViewPage_vue__","pass","pass_index","target_index","text-indent","batch","batch_index","description","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_RenderTaskViewPage_vue__","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_49dfebc9_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_RenderTaskViewPage_vue__","padding-left","line-height","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_DocumentViewPage_vue__","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_1b68865d_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_DocumentViewPage_vue__","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ClipScrollTreeViewPage_vue__","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_31f0a1d9_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ClipScrollTreeViewPage_vue__","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ScreenshotPage_vue__","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_29affa2a_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ScreenshotPage_vue__","height","_classCallCheck","instance","__WEBPACK_IMPORTED_MODULE_1_vuex__","_createClass","protoProps","staticProps","Vuex","Connection","ws","WebSocket","onopen","evt","json","onclose","msg","send","connection","Store","strict","mutations","setConnected","setPasses","setRenderTasks","setDocuments","setClipScrollTree","setScreenshot","actions","sendMessage","applyMixin","vuexInit","devtoolPlugin","devtoolHook","_devtoolHook","targetState","replaceState","subscribe","mutation","forEachValue","targetModule","newModule","getChild","genericSubscribe","resetStore","hot","_actions","_mutations","_wrappedGetters","_modulesNamespaceMap","installModule","_modules","resetStoreVM","oldVm","getters","wrappedGetters","$$state","enableStrictMode","_withCommit","rootState","getNamespace","namespaced","parentState","getNestedState","moduleName","local","makeLocalContext","forEachMutation","registerMutation","forEachAction","registerAction","forEachGetter","registerGetter","forEachChild","noNamespace","_type","_payload","unifyObjectStyle","payload","makeLocalGetters","gettersProxy","splitPos","localType","rootGetters","rawGetter","_Vue","normalizeMap","normalizeNamespace","getModuleByNamespace","helper","Module","rawModule","runtime","_rawModule","rawState","addChild","ModuleCollection","rawRootModule","register","rawChildModule","unregister","plugins","_committing","_actionSubscribers","_subscribers","_watcherVM","prototypeAccessors$1","entry","all","after","subscribeAction","registerModule","preserveState","unregisterModule","hotUpdate","newOptions","committing","mapState","states","vuex","mapMutations","mapGetters","mapActions","createNamespacedHelpers","index_esm"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,SAGAzB,IAAA0B,EAAA,MDMM,SAAUtB,EAAQD,GElBxB,QAAAwB,GAAAC,EAAAC,GACA,GAAAC,GAAAF,EAAA,OACAG,EAAAH,EAAA,EACA,KAAAG,EACA,MAAAD,EAGA,IAAAD,GAAA,kBAAAG,MAAA,CACA,GAAAC,GAAAC,EAAAH,EAKA,QAAAD,GAAAK,OAJAJ,EAAAK,QAAAC,IAAA,SAAAC,GACA,uBAAAP,EAAAQ,WAAAD,EAAA,S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A8zD,eAAAn/E,KAAA,KAAAqrB,GACAg0D,aAAAr/E,KAAA,KAAAqrB,KAgDAk0D,GACAzG,QACAzwD,UACAga,QAAA,QACA28C,WACAG,eACAC,aACAC,aACAC,0BAGAx7E,GAAA","file":"build.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/dist/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 16);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\n/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\nvar listToStyles = __webpack_require__(23)\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nmodule.exports = function (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file.\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = injectStyles\n }\n\n if (hook) {\n var functional = options.functional\n var existing = functional\n ? options.render\n : options.beforeCreate\n\n if (!functional) {\n // inject component registration as beforeCreate hook\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n } else {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return existing(h, context)\n }\n }\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*!\n * Vue.js v2.6.10\n * (c) 2014-2019 Evan You\n * Released under the MIT License.\n */\n/* */\n\nvar emptyObject = Object.freeze({});\n\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef (v) {\n return v === undefined || v === null\n}\n\nfunction isDef (v) {\n return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n return v === true\n}\n\nfunction isFalse (v) {\n return v === false\n}\n\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive (value) {\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n // $flow-disable-line\n typeof value === 'symbol' ||\n typeof value === 'boolean'\n )\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nvar _toString = Object.prototype.toString;\n\nfunction toRawType (value) {\n return _toString.call(value).slice(8, -1)\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject (obj) {\n return _toString.call(obj) === '[object Object]'\n}\n\nfunction isRegExp (v) {\n return _toString.call(v) === '[object RegExp]'\n}\n\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex (val) {\n var n = parseFloat(String(val));\n return n >= 0 && Math.floor(n) === n && isFinite(val)\n}\n\nfunction isPromise (val) {\n return (\n isDef(val) &&\n typeof val.then === 'function' &&\n typeof val.catch === 'function'\n )\n}\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString (val) {\n return val == null\n ? ''\n : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n ? JSON.stringify(val, null, 2)\n : String(val)\n}\n\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n var n = parseFloat(val);\n return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n str,\n expectsLowerCase\n) {\n var map = Object.create(null);\n var list = str.split(',');\n for (var i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase\n ? function (val) { return map[val.toLowerCase()]; }\n : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Check if an attribute is a reserved attribute.\n */\nvar isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n\n/**\n * Remove an item from an array.\n */\nfunction remove (arr, item) {\n if (arr.length) {\n var index = arr.indexOf(item);\n if (index > -1) {\n return arr.splice(index, 1)\n }\n }\n}\n\n/**\n * Check whether an object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n var cache = Object.create(null);\n return (function cachedFn (str) {\n var hit = cache[str];\n return hit || (cache[str] = fn(str))\n })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cached(function (str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n});\n\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n\n/* istanbul ignore next */\nfunction polyfillBind (fn, ctx) {\n function boundFn (a) {\n var l = arguments.length;\n return l\n ? l > 1\n ? fn.apply(ctx, arguments)\n : fn.call(ctx, a)\n : fn.call(ctx)\n }\n\n boundFn._length = fn.length;\n return boundFn\n}\n\nfunction nativeBind (fn, ctx) {\n return fn.bind(ctx)\n}\n\nvar bind = Function.prototype.bind\n ? nativeBind\n : polyfillBind;\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n for (var key in _from) {\n to[key] = _from[key];\n }\n return to\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n}\n\n/* eslint-disable no-unused-vars */\n\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop (a, b, c) {}\n\n/**\n * Always return false.\n */\nvar no = function (a, b, c) { return false; };\n\n/* eslint-enable no-unused-vars */\n\n/**\n * Return the same value.\n */\nvar identity = function (_) { return _; };\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf (arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) { return i }\n }\n return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n }\n}\n\nvar SSR_ATTR = 'data-server-rendered';\n\nvar ASSET_TYPES = [\n 'component',\n 'directive',\n 'filter'\n];\n\nvar LIFECYCLE_HOOKS = [\n 'beforeCreate',\n 'created',\n 'beforeMount',\n 'mounted',\n 'beforeUpdate',\n 'updated',\n 'beforeDestroy',\n 'destroyed',\n 'activated',\n 'deactivated',\n 'errorCaptured',\n 'serverPrefetch'\n];\n\n/* */\n\n\n\nvar config = ({\n /**\n * Option merge strategies (used in core/util/options)\n */\n // $flow-disable-line\n optionMergeStrategies: Object.create(null),\n\n /**\n * Whether to suppress warnings.\n */\n silent: false,\n\n /**\n * Show production mode tip message on boot?\n */\n productionTip: \"production\" !== 'production',\n\n /**\n * Whether to enable devtools\n */\n devtools: \"production\" !== 'production',\n\n /**\n * Whether to record perf\n */\n performance: false,\n\n /**\n * Error handler for watcher errors\n */\n errorHandler: null,\n\n /**\n * Warn handler for watcher warns\n */\n warnHandler: null,\n\n /**\n * Ignore certain custom elements\n */\n ignoredElements: [],\n\n /**\n * Custom user key aliases for v-on\n */\n // $flow-disable-line\n keyCodes: Object.create(null),\n\n /**\n * Check if a tag is reserved so that it cannot be registered as a\n * component. This is platform-dependent and may be overwritten.\n */\n isReservedTag: no,\n\n /**\n * Check if an attribute is reserved so that it cannot be used as a component\n * prop. This is platform-dependent and may be overwritten.\n */\n isReservedAttr: no,\n\n /**\n * Check if a tag is an unknown element.\n * Platform-dependent.\n */\n isUnknownElement: no,\n\n /**\n * Get the namespace of an element\n */\n getTagNamespace: noop,\n\n /**\n * Parse the real tag name for the specific platform.\n */\n parsePlatformTagName: identity,\n\n /**\n * Check if an attribute must be bound using property, e.g. value\n * Platform-dependent.\n */\n mustUseProp: no,\n\n /**\n * Perform updates asynchronously. Intended to be used by Vue Test Utils\n * This will significantly reduce performance if set to false.\n */\n async: true,\n\n /**\n * Exposed for legacy reasons\n */\n _lifecycleHooks: LIFECYCLE_HOOKS\n});\n\n/* */\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nvar unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n var c = (str + '').charCodeAt(0);\n return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n Object.defineProperty(obj, key, {\n value: val,\n enumerable: !!enumerable,\n writable: true,\n configurable: true\n });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = new RegExp((\"[^\" + (unicodeRegExp.source) + \".$_\\\\d]\"));\nfunction parsePath (path) {\n if (bailRE.test(path)) {\n return\n }\n var segments = path.split('.');\n return function (obj) {\n for (var i = 0; i < segments.length; i++) {\n if (!obj) { return }\n obj = obj[segments[i]];\n }\n return obj\n }\n}\n\n/* */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;\nvar weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');\nvar isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\nvar isPhantomJS = UA && /phantomjs/.test(UA);\nvar isFF = UA && UA.match(/firefox\\/(\\d+)/);\n\n// Firefox has a \"watch\" function on Object.prototype...\nvar nativeWatch = ({}).watch;\n\nvar supportsPassive = false;\nif (inBrowser) {\n try {\n var opts = {};\n Object.defineProperty(opts, 'passive', ({\n get: function get () {\n /* istanbul ignore next */\n supportsPassive = true;\n }\n })); // https://github.com/facebook/flow/issues/285\n window.addEventListener('test-passive', null, opts);\n } catch (e) {}\n}\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n if (_isServer === undefined) {\n /* istanbul ignore if */\n if (!inBrowser && !inWeex && typeof global !== 'undefined') {\n // detect presence of vue-server-renderer and avoid\n // Webpack shimming the process\n _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';\n } else {\n _isServer = false;\n }\n }\n return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n typeof Symbol !== 'undefined' && isNative(Symbol) &&\n typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\nvar _Set;\n/* istanbul ignore if */ // $flow-disable-line\nif (typeof Set !== 'undefined' && isNative(Set)) {\n // use native Set when available.\n _Set = Set;\n} else {\n // a non-standard Set polyfill that only works with primitive keys.\n _Set = /*@__PURE__*/(function () {\n function Set () {\n this.set = Object.create(null);\n }\n Set.prototype.has = function has (key) {\n return this.set[key] === true\n };\n Set.prototype.add = function add (key) {\n this.set[key] = true;\n };\n Set.prototype.clear = function clear () {\n this.set = Object.create(null);\n };\n\n return Set;\n }());\n}\n\n/* */\n\nvar warn = noop;\nvar tip = noop;\nvar generateComponentTrace = (noop); // work around flow check\nvar formatComponentName = (noop);\n\nif (false) {\n var hasConsole = typeof console !== 'undefined';\n var classifyRE = /(?:^|[-_])(\\w)/g;\n var classify = function (str) { return str\n .replace(classifyRE, function (c) { return c.toUpperCase(); })\n .replace(/[-_]/g, ''); };\n\n warn = function (msg, vm) {\n var trace = vm ? generateComponentTrace(vm) : '';\n\n if (config.warnHandler) {\n config.warnHandler.call(null, msg, vm, trace);\n } else if (hasConsole && (!config.silent)) {\n console.error((\"[Vue warn]: \" + msg + trace));\n }\n };\n\n tip = function (msg, vm) {\n if (hasConsole && (!config.silent)) {\n console.warn(\"[Vue tip]: \" + msg + (\n vm ? generateComponentTrace(vm) : ''\n ));\n }\n };\n\n formatComponentName = function (vm, includeFile) {\n if (vm.$root === vm) {\n return '<Root>'\n }\n var options = typeof vm === 'function' && vm.cid != null\n ? vm.options\n : vm._isVue\n ? vm.$options || vm.constructor.options\n : vm;\n var name = options.name || options._componentTag;\n var file = options.__file;\n if (!name && file) {\n var match = file.match(/([^/\\\\]+)\\.vue$/);\n name = match && match[1];\n }\n\n return (\n (name ? (\"<\" + (classify(name)) + \">\") : \"<Anonymous>\") +\n (file && includeFile !== false ? (\" at \" + file) : '')\n )\n };\n\n var repeat = function (str, n) {\n var res = '';\n while (n) {\n if (n % 2 === 1) { res += str; }\n if (n > 1) { str += str; }\n n >>= 1;\n }\n return res\n };\n\n generateComponentTrace = function (vm) {\n if (vm._isVue && vm.$parent) {\n var tree = [];\n var currentRecursiveSequence = 0;\n while (vm) {\n if (tree.length > 0) {\n var last = tree[tree.length - 1];\n if (last.constructor === vm.constructor) {\n currentRecursiveSequence++;\n vm = vm.$parent;\n continue\n } else if (currentRecursiveSequence > 0) {\n tree[tree.length - 1] = [last, currentRecursiveSequence];\n currentRecursiveSequence = 0;\n }\n }\n tree.push(vm);\n vm = vm.$parent;\n }\n return '\\n\\nfound in\\n\\n' + tree\n .map(function (vm, i) { return (\"\" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)\n ? ((formatComponentName(vm[0])) + \"... (\" + (vm[1]) + \" recursive calls)\")\n : formatComponentName(vm))); })\n .join('\\n')\n } else {\n return (\"\\n\\n(found in \" + (formatComponentName(vm)) + \")\")\n }\n };\n}\n\n/* */\n\nvar uid = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n this.id = uid++;\n this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n if (Dep.target) {\n Dep.target.addDep(this);\n }\n};\n\nDep.prototype.notify = function notify () {\n // stabilize the subscriber list first\n var subs = this.subs.slice();\n if (false) {\n // subs aren't sorted in scheduler if not running async\n // we need to sort them now to make sure they fire in correct\n // order\n subs.sort(function (a, b) { return a.id - b.id; });\n }\n for (var i = 0, l = subs.length; i < l; i++) {\n subs[i].update();\n }\n};\n\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (target) {\n targetStack.push(target);\n Dep.target = target;\n}\n\nfunction popTarget () {\n targetStack.pop();\n Dep.target = targetStack[targetStack.length - 1];\n}\n\n/* */\n\nvar VNode = function VNode (\n tag,\n data,\n children,\n text,\n elm,\n context,\n componentOptions,\n asyncFactory\n) {\n this.tag = tag;\n this.data = data;\n this.children = children;\n this.text = text;\n this.elm = elm;\n this.ns = undefined;\n this.context = context;\n this.fnContext = undefined;\n this.fnOptions = undefined;\n this.fnScopeId = undefined;\n this.key = data && data.key;\n this.componentOptions = componentOptions;\n this.componentInstance = undefined;\n this.parent = undefined;\n this.raw = false;\n this.isStatic = false;\n this.isRootInsert = true;\n this.isComment = false;\n this.isCloned = false;\n this.isOnce = false;\n this.asyncFactory = asyncFactory;\n this.asyncMeta = undefined;\n this.isAsyncPlaceholder = false;\n};\n\nvar prototypeAccessors = { child: { configurable: true } };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function (text) {\n if ( text === void 0 ) text = '';\n\n var node = new VNode();\n node.text = text;\n node.isComment = true;\n return node\n};\n\nfunction createTextVNode (val) {\n return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(),\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);\n\nvar methodsToPatch = [\n 'push',\n 'pop',\n 'shift',\n 'unshift',\n 'splice',\n 'sort',\n 'reverse'\n];\n\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n // cache original method\n var original = arrayProto[method];\n def(arrayMethods, method, function mutator () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var result = original.apply(this, args);\n var ob = this.__ob__;\n var inserted;\n switch (method) {\n case 'push':\n case 'unshift':\n inserted = args;\n break\n case 'splice':\n inserted = args.slice(2);\n break\n }\n if (inserted) { ob.observeArray(inserted); }\n // notify change\n ob.dep.notify();\n return result\n });\n});\n\n/* */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nvar shouldObserve = true;\n\nfunction toggleObserving (value) {\n shouldObserve = value;\n}\n\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nvar Observer = function Observer (value) {\n this.value = value;\n this.dep = new Dep();\n this.vmCount = 0;\n def(value, '__ob__', this);\n if (Array.isArray(value)) {\n if (hasProto) {\n protoAugment(value, arrayMethods);\n } else {\n copyAugment(value, arrayMethods, arrayKeys);\n }\n this.observeArray(value);\n } else {\n this.walk(value);\n }\n};\n\n/**\n * Walk through all properties and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n defineReactive$$1(obj, keys[i]);\n }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n for (var i = 0, l = items.length; i < l; i++) {\n observe(items[i]);\n }\n};\n\n// helpers\n\n/**\n * Augment a target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}\n\n/**\n * Augment a target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n def(target, key, src[key]);\n }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n if (false\n ) {\n warn((\"Cannot set reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val\n }\n if (key in target && !(key in Object.prototype)) {\n target[key] = val;\n return val\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return val\n }\n if (!ob) {\n target[key] = val;\n return val\n }\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n}\n\n/* */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (false) {\n strats.el = strats.propsData = function (parent, child, vm, key) {\n if (!vm) {\n warn(\n \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n 'creation with the `new` keyword.'\n );\n }\n return defaultStrat(parent, child)\n };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}\n\n/**\n * Data\n */\nfunction mergeDataOrFn (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n // in a Vue.extend merge, both should be functions\n if (!childVal) {\n return parentVal\n }\n if (!parentVal) {\n return childVal\n }\n // when parentVal & childVal are both present,\n // we need to return a function that returns the\n // merged result of both functions... no need to\n // check if parentVal is a function here because\n // it has to be a function to pass previous merges.\n return function mergedDataFn () {\n return mergeData(\n typeof childVal === 'function' ? childVal.call(this, this) : childVal,\n typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal\n )\n }\n } else {\n return function mergedInstanceDataFn () {\n // instance merge\n var instanceData = typeof childVal === 'function'\n ? childVal.call(vm, vm)\n : childVal;\n var defaultData = typeof parentVal === 'function'\n ? parentVal.call(vm, vm)\n : parentVal;\n if (instanceData) {\n return mergeData(instanceData, defaultData)\n } else {\n return defaultData\n }\n }\n }\n}\n\nstrats.data = function (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n if (childVal && typeof childVal !== 'function') {\n \"production\" !== 'production' && warn(\n 'The \"data\" option should be a function ' +\n 'that returns a per-instance value in component ' +\n 'definitions.',\n vm\n );\n\n return parentVal\n }\n return mergeDataOrFn(parentVal, childVal)\n }\n\n return mergeDataOrFn(parentVal, childVal, vm)\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n parentVal,\n childVal\n) {\n var res = childVal\n ? parentVal\n ? parentVal.concat(childVal)\n : Array.isArray(childVal)\n ? childVal\n : [childVal]\n : parentVal;\n return res\n ? dedupeHooks(res)\n : res\n}\n\nfunction dedupeHooks (hooks) {\n var res = [];\n for (var i = 0; i < hooks.length; i++) {\n if (res.indexOf(hooks[i]) === -1) {\n res.push(hooks[i]);\n }\n }\n return res\n}\n\nLIFECYCLE_HOOKS.forEach(function (hook) {\n strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}\n\nASSET_TYPES.forEach(function (type) {\n strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n // work around Firefox's Object.prototype.watch...\n if (parentVal === nativeWatch) { parentVal = undefined; }\n if (childVal === nativeWatch) { childVal = undefined; }\n /* istanbul ignore if */\n if (!childVal) { return Object.create(parentVal || null) }\n if (false) {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = {};\n extend(ret, parentVal);\n for (var key$1 in childVal) {\n var parent = ret[key$1];\n var child = childVal[key$1];\n if (parent && !Array.isArray(parent)) {\n parent = [parent];\n }\n ret[key$1] = parent\n ? parent.concat(child)\n : Array.isArray(child) ? child : [child];\n }\n return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.inject =\nstrats.computed = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n if (childVal && \"production\" !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = Object.create(null);\n extend(ret, parentVal);\n if (childVal) { extend(ret, childVal); }\n return ret\n};\nstrats.provide = mergeDataOrFn;\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n for (var key in options.components) {\n validateComponentName(key);\n }\n}\n\nfunction validateComponentName (name) {\n if (!new RegExp((\"^[a-zA-Z][\\\\-\\\\.0-9_\" + (unicodeRegExp.source) + \"]*$\")).test(name)) {\n warn(\n 'Invalid component name: \"' + name + '\". Component names ' +\n 'should conform to valid custom element name in html5 specification.'\n );\n }\n if (isBuiltInTag(name) || config.isReservedTag(name)) {\n warn(\n 'Do not use built-in or reserved HTML elements as component ' +\n 'id: ' + name\n );\n }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}\n\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n var dirs = options.directives;\n if (dirs) {\n for (var key in dirs) {\n var def$$1 = dirs[key];\n if (typeof def$$1 === 'function') {\n dirs[key] = { bind: def$$1, update: def$$1 };\n }\n }\n }\n}\n\nfunction assertObjectType (name, value, vm) {\n if (!isPlainObject(value)) {\n warn(\n \"Invalid value for option \\\"\" + name + \"\\\": expected an Object, \" +\n \"but got \" + (toRawType(value)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n parent,\n child,\n vm\n) {\n if (false) {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n\n // Apply extends and mixins on the child options,\n // but only if it is a raw options object that isn't\n // the result of another mergeOptions call.\n // Only merged options has the _base property.\n if (!child._base) {\n if (child.extends) {\n parent = mergeOptions(parent, child.extends, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n }\n\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (false) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}\n\n/* */\n\n\n\nfunction validateProp (\n key,\n propOptions,\n propsData,\n vm\n) {\n var prop = propOptions[key];\n var absent = !hasOwn(propsData, key);\n var value = propsData[key];\n // boolean casting\n var booleanIndex = getTypeIndex(Boolean, prop.type);\n if (booleanIndex > -1) {\n if (absent && !hasOwn(prop, 'default')) {\n value = false;\n } else if (value === '' || value === hyphenate(key)) {\n // only cast empty string / same name to boolean if\n // boolean has higher priority\n var stringIndex = getTypeIndex(String, prop.type);\n if (stringIndex < 0 || booleanIndex < stringIndex) {\n value = true;\n }\n }\n }\n // check default value\n if (value === undefined) {\n value = getPropDefaultValue(vm, prop, key);\n // since the default value is a fresh copy,\n // make sure to observe it.\n var prevShouldObserve = shouldObserve;\n toggleObserving(true);\n observe(value);\n toggleObserving(prevShouldObserve);\n }\n if (\n false\n ) {\n assertProp(prop, key, value, vm, absent);\n }\n return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (false) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n\n if (!valid) {\n warn(\n getInvalidTypeMessage(name, value, expectedTypes),\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}\n\nvar simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;\n\nfunction assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (simpleCheckRE.test(expectedType)) {\n var t = typeof value;\n valid = t === expectedType.toLowerCase();\n // for primitive wrapper objects\n if (!valid && t === 'object') {\n valid = value instanceof type;\n }\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}\n\nfunction isSameType (a, b) {\n return getType(a) === getType(b)\n}\n\nfunction getTypeIndex (type, expectedTypes) {\n if (!Array.isArray(expectedTypes)) {\n return isSameType(expectedTypes, type) ? 0 : -1\n }\n for (var i = 0, len = expectedTypes.length; i < len; i++) {\n if (isSameType(expectedTypes[i], type)) {\n return i\n }\n }\n return -1\n}\n\nfunction getInvalidTypeMessage (name, value, expectedTypes) {\n var message = \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', '));\n var expectedType = expectedTypes[0];\n var receivedType = toRawType(value);\n var expectedValue = styleValue(value, expectedType);\n var receivedValue = styleValue(value, receivedType);\n // check if we need to specify expected value\n if (expectedTypes.length === 1 &&\n isExplicable(expectedType) &&\n !isBoolean(expectedType, receivedType)) {\n message += \" with value \" + expectedValue;\n }\n message += \", got \" + receivedType + \" \";\n // check if we need to specify received value\n if (isExplicable(receivedType)) {\n message += \"with value \" + receivedValue + \".\";\n }\n return message\n}\n\nfunction styleValue (value, type) {\n if (type === 'String') {\n return (\"\\\"\" + value + \"\\\"\")\n } else if (type === 'Number') {\n return (\"\" + (Number(value)))\n } else {\n return (\"\" + value)\n }\n}\n\nfunction isExplicable (value) {\n var explicitTypes = ['string', 'number', 'boolean'];\n return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })\n}\n\nfunction isBoolean () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })\n}\n\n/* */\n\nfunction handleError (err, vm, info) {\n // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n // See: https://github.com/vuejs/vuex/issues/1505\n pushTarget();\n try {\n if (vm) {\n var cur = vm;\n while ((cur = cur.$parent)) {\n var hooks = cur.$options.errorCaptured;\n if (hooks) {\n for (var i = 0; i < hooks.length; i++) {\n try {\n var capture = hooks[i].call(cur, err, vm, info) === false;\n if (capture) { return }\n } catch (e) {\n globalHandleError(e, cur, 'errorCaptured hook');\n }\n }\n }\n }\n }\n globalHandleError(err, vm, info);\n } finally {\n popTarget();\n }\n}\n\nfunction invokeWithErrorHandling (\n handler,\n context,\n args,\n vm,\n info\n) {\n var res;\n try {\n res = args ? handler.apply(context, args) : handler.call(context);\n if (res && !res._isVue && isPromise(res) && !res._handled) {\n res.catch(function (e) { return handleError(e, vm, info + \" (Promise/async)\"); });\n // issue #9511\n // avoid catch triggering multiple times when nested calls\n res._handled = true;\n }\n } catch (e) {\n handleError(e, vm, info);\n }\n return res\n}\n\nfunction globalHandleError (err, vm, info) {\n if (config.errorHandler) {\n try {\n return config.errorHandler.call(null, err, vm, info)\n } catch (e) {\n // if the user intentionally throws the original error in the handler,\n // do not log it twice\n if (e !== err) {\n logError(e, null, 'config.errorHandler');\n }\n }\n }\n logError(err, vm, info);\n}\n\nfunction logError (err, vm, info) {\n if (false) {\n warn((\"Error in \" + info + \": \\\"\" + (err.toString()) + \"\\\"\"), vm);\n }\n /* istanbul ignore else */\n if ((inBrowser || inWeex) && typeof console !== 'undefined') {\n console.error(err);\n } else {\n throw err\n }\n}\n\n/* */\n\nvar isUsingMicroTask = false;\n\nvar callbacks = [];\nvar pending = false;\n\nfunction flushCallbacks () {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks.length = 0;\n for (var i = 0; i < copies.length; i++) {\n copies[i]();\n }\n}\n\n// Here we have async deferring wrappers using microtasks.\n// In 2.5 we used (macro) tasks (in combination with microtasks).\n// However, it has subtle problems when state is changed right before repaint\n// (e.g. #6813, out-in transitions).\n// Also, using (macro) tasks in event handler would cause some weird behaviors\n// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n// So we now use microtasks everywhere, again.\n// A major drawback of this tradeoff is that there are some scenarios\n// where microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690, which have workarounds)\n// or even between bubbling of the same event (#6566).\nvar timerFunc;\n\n// The nextTick behavior leverages the microtask queue, which can be accessed\n// via either native Promise.then or MutationObserver.\n// MutationObserver has wider support, however it is seriously bugged in\n// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n// completely stops working after triggering a few times... so, if native\n// Promise is available, we will use it:\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n var p = Promise.resolve();\n timerFunc = function () {\n p.then(flushCallbacks);\n // In problematic UIWebViews, Promise.then doesn't completely break, but\n // it can get stuck in a weird state where callbacks are pushed into the\n // microtask queue but the queue isn't being flushed, until the browser\n // needs to do some other work, e.g. handle a timer. Therefore we can\n // \"force\" the microtask queue to be flushed by adding an empty timer.\n if (isIOS) { setTimeout(noop); }\n };\n isUsingMicroTask = true;\n} else if (!isIE && typeof MutationObserver !== 'undefined' && (\n isNative(MutationObserver) ||\n // PhantomJS and iOS 7.x\n MutationObserver.toString() === '[object MutationObserverConstructor]'\n)) {\n // Use MutationObserver where native Promise is not available,\n // e.g. PhantomJS, iOS7, Android 4.4\n // (#6466 MutationObserver is unreliable in IE11)\n var counter = 1;\n var observer = new MutationObserver(flushCallbacks);\n var textNode = document.createTextNode(String(counter));\n observer.observe(textNode, {\n characterData: true\n });\n timerFunc = function () {\n counter = (counter + 1) % 2;\n textNode.data = String(counter);\n };\n isUsingMicroTask = true;\n} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n // Fallback to setImmediate.\n // Techinically it leverages the (macro) task queue,\n // but it is still a better choice than setTimeout.\n timerFunc = function () {\n setImmediate(flushCallbacks);\n };\n} else {\n // Fallback to setTimeout.\n timerFunc = function () {\n setTimeout(flushCallbacks, 0);\n };\n}\n\nfunction nextTick (cb, ctx) {\n var _resolve;\n callbacks.push(function () {\n if (cb) {\n try {\n cb.call(ctx);\n } catch (e) {\n handleError(e, ctx, 'nextTick');\n }\n } else if (_resolve) {\n _resolve(ctx);\n }\n });\n if (!pending) {\n pending = true;\n timerFunc();\n }\n // $flow-disable-line\n if (!cb && typeof Promise !== 'undefined') {\n return new Promise(function (resolve) {\n _resolve = resolve;\n })\n }\n}\n\n/* */\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (false) {\n var allowedGlobals = makeMap(\n 'Infinity,undefined,NaN,isFinite,isNaN,' +\n 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n 'require' // for Webpack/Browserify\n );\n\n var warnNonPresent = function (target, key) {\n warn(\n \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n 'referenced during render. Make sure that this property is reactive, ' +\n 'either in the data option, or for class-based components, by ' +\n 'initializing the property. ' +\n 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',\n target\n );\n };\n\n var warnReservedPrefix = function (target, key) {\n warn(\n \"Property \\\"\" + key + \"\\\" must be accessed with \\\"$data.\" + key + \"\\\" because \" +\n 'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n 'prevent conflicts with Vue internals' +\n 'See: https://vuejs.org/v2/api/#data',\n target\n );\n };\n\n var hasProxy =\n typeof Proxy !== 'undefined' && isNative(Proxy);\n\n if (hasProxy) {\n var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n config.keyCodes = new Proxy(config.keyCodes, {\n set: function set (target, key, value) {\n if (isBuiltInModifier(key)) {\n warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n return false\n } else {\n target[key] = value;\n return true\n }\n }\n });\n }\n\n var hasHandler = {\n has: function has (target, key) {\n var has = key in target;\n var isAllowed = allowedGlobals(key) ||\n (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));\n if (!has && !isAllowed) {\n if (key in target.$data) { warnReservedPrefix(target, key); }\n else { warnNonPresent(target, key); }\n }\n return has || !isAllowed\n }\n };\n\n var getHandler = {\n get: function get (target, key) {\n if (typeof key === 'string' && !(key in target)) {\n if (key in target.$data) { warnReservedPrefix(target, key); }\n else { warnNonPresent(target, key); }\n }\n return target[key]\n }\n };\n\n initProxy = function initProxy (vm) {\n if (hasProxy) {\n // determine which proxy handler to use\n var options = vm.$options;\n var handlers = options.render && options.render._withStripped\n ? getHandler\n : hasHandler;\n vm._renderProxy = new Proxy(vm, handlers);\n } else {\n vm._renderProxy = vm;\n }\n };\n}\n\n/* */\n\nvar seenObjects = new _Set();\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}\n\nfunction _traverse (val, seen) {\n var i, keys;\n var isA = Array.isArray(val);\n if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {\n return\n }\n if (val.__ob__) {\n var depId = val.__ob__.dep.id;\n if (seen.has(depId)) {\n return\n }\n seen.add(depId);\n }\n if (isA) {\n i = val.length;\n while (i--) { _traverse(val[i], seen); }\n } else {\n keys = Object.keys(val);\n i = keys.length;\n while (i--) { _traverse(val[keys[i]], seen); }\n }\n}\n\nvar mark;\nvar measure;\n\nif (false) {\n var perf = inBrowser && window.performance;\n /* istanbul ignore if */\n if (\n perf &&\n perf.mark &&\n perf.measure &&\n perf.clearMarks &&\n perf.clearMeasures\n ) {\n mark = function (tag) { return perf.mark(tag); };\n measure = function (name, startTag, endTag) {\n perf.measure(name, startTag, endTag);\n perf.clearMarks(startTag);\n perf.clearMarks(endTag);\n // perf.clearMeasures(name)\n };\n }\n}\n\n/* */\n\nvar normalizeEvent = cached(function (name) {\n var passive = name.charAt(0) === '&';\n name = passive ? name.slice(1) : name;\n var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n name = once$$1 ? name.slice(1) : name;\n var capture = name.charAt(0) === '!';\n name = capture ? name.slice(1) : name;\n return {\n name: name,\n once: once$$1,\n capture: capture,\n passive: passive\n }\n});\n\nfunction createFnInvoker (fns, vm) {\n function invoker () {\n var arguments$1 = arguments;\n\n var fns = invoker.fns;\n if (Array.isArray(fns)) {\n var cloned = fns.slice();\n for (var i = 0; i < cloned.length; i++) {\n invokeWithErrorHandling(cloned[i], null, arguments$1, vm, \"v-on handler\");\n }\n } else {\n // return handler return value for single handlers\n return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\")\n }\n }\n invoker.fns = fns;\n return invoker\n}\n\nfunction updateListeners (\n on,\n oldOn,\n add,\n remove$$1,\n createOnceHandler,\n vm\n) {\n var name, def$$1, cur, old, event;\n for (name in on) {\n def$$1 = cur = on[name];\n old = oldOn[name];\n event = normalizeEvent(name);\n if (isUndef(cur)) {\n \"production\" !== 'production' && warn(\n \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n vm\n );\n } else if (isUndef(old)) {\n if (isUndef(cur.fns)) {\n cur = on[name] = createFnInvoker(cur, vm);\n }\n if (isTrue(event.once)) {\n cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n }\n add(event.name, cur, event.capture, event.passive, event.params);\n } else if (cur !== old) {\n old.fns = cur;\n on[name] = old;\n }\n }\n for (name in oldOn) {\n if (isUndef(on[name])) {\n event = normalizeEvent(name);\n remove$$1(event.name, oldOn[name], event.capture);\n }\n }\n}\n\n/* */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n if (def instanceof VNode) {\n def = def.data.hook || (def.data.hook = {});\n }\n var invoker;\n var oldHook = def[hookKey];\n\n function wrappedHook () {\n hook.apply(this, arguments);\n // important: remove merged hook to ensure it's called only once\n // and prevent memory leak\n remove(invoker.fns, wrappedHook);\n }\n\n if (isUndef(oldHook)) {\n // no existing hook\n invoker = createFnInvoker([wrappedHook]);\n } else {\n /* istanbul ignore if */\n if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n // already a merged invoker\n invoker = oldHook;\n invoker.fns.push(wrappedHook);\n } else {\n // existing plain hook\n invoker = createFnInvoker([oldHook, wrappedHook]);\n }\n }\n\n invoker.merged = true;\n def[hookKey] = invoker;\n}\n\n/* */\n\nfunction extractPropsFromVNodeData (\n data,\n Ctor,\n tag\n) {\n // we are only extracting raw values here.\n // validation and default values are handled in the child\n // component itself.\n var propOptions = Ctor.options.props;\n if (isUndef(propOptions)) {\n return\n }\n var res = {};\n var attrs = data.attrs;\n var props = data.props;\n if (isDef(attrs) || isDef(props)) {\n for (var key in propOptions) {\n var altKey = hyphenate(key);\n if (false) {\n var keyInLowerCase = key.toLowerCase();\n if (\n key !== keyInLowerCase &&\n attrs && hasOwn(attrs, keyInLowerCase)\n ) {\n tip(\n \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n \" \\\"\" + key + \"\\\". \" +\n \"Note that HTML attributes are case-insensitive and camelCased \" +\n \"props need to use their kebab-case equivalents when using in-DOM \" +\n \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n );\n }\n }\n checkProp(res, props, key, altKey, true) ||\n checkProp(res, attrs, key, altKey, false);\n }\n }\n return res\n}\n\nfunction checkProp (\n res,\n hash,\n key,\n altKey,\n preserve\n) {\n if (isDef(hash)) {\n if (hasOwn(hash, key)) {\n res[key] = hash[key];\n if (!preserve) {\n delete hash[key];\n }\n return true\n } else if (hasOwn(hash, altKey)) {\n res[key] = hash[altKey];\n if (!preserve) {\n delete hash[altKey];\n }\n return true\n }\n }\n return false\n}\n\n/* */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children)\n }\n }\n return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}\n\nfunction isTextNode (node) {\n return isDef(node) && isDef(node.text) && isFalse(node.isComment)\n}\n\nfunction normalizeArrayChildren (children, nestedIndex) {\n var res = [];\n var i, c, lastIndex, last;\n for (i = 0; i < children.length; i++) {\n c = children[i];\n if (isUndef(c) || typeof c === 'boolean') { continue }\n lastIndex = res.length - 1;\n last = res[lastIndex];\n // nested\n if (Array.isArray(c)) {\n if (c.length > 0) {\n c = normalizeArrayChildren(c, ((nestedIndex || '') + \"_\" + i));\n // merge adjacent text nodes\n if (isTextNode(c[0]) && isTextNode(last)) {\n res[lastIndex] = createTextVNode(last.text + (c[0]).text);\n c.shift();\n }\n res.push.apply(res, c);\n }\n } else if (isPrimitive(c)) {\n if (isTextNode(last)) {\n // merge adjacent text nodes\n // this is necessary for SSR hydration because text nodes are\n // essentially merged when rendered to HTML strings\n res[lastIndex] = createTextVNode(last.text + c);\n } else if (c !== '') {\n // convert primitive to vnode\n res.push(createTextVNode(c));\n }\n } else {\n if (isTextNode(c) && isTextNode(last)) {\n // merge adjacent text nodes\n res[lastIndex] = createTextVNode(last.text + c.text);\n } else {\n // default key for nested array children (likely generated by v-for)\n if (isTrue(children._isVList) &&\n isDef(c.tag) &&\n isUndef(c.key) &&\n isDef(nestedIndex)) {\n c.key = \"__vlist\" + nestedIndex + \"_\" + i + \"__\";\n }\n res.push(c);\n }\n }\n }\n return res\n}\n\n/* */\n\nfunction initProvide (vm) {\n var provide = vm.$options.provide;\n if (provide) {\n vm._provided = typeof provide === 'function'\n ? provide.call(vm)\n : provide;\n }\n}\n\nfunction initInjections (vm) {\n var result = resolveInject(vm.$options.inject, vm);\n if (result) {\n toggleObserving(false);\n Object.keys(result).forEach(function (key) {\n /* istanbul ignore else */\n if (false) {\n defineReactive$$1(vm, key, result[key], function () {\n warn(\n \"Avoid mutating an injected value directly since the changes will be \" +\n \"overwritten whenever the provided component re-renders. \" +\n \"injection being mutated: \\\"\" + key + \"\\\"\",\n vm\n );\n });\n } else {\n defineReactive$$1(vm, key, result[key]);\n }\n });\n toggleObserving(true);\n }\n}\n\nfunction resolveInject (inject, vm) {\n if (inject) {\n // inject is :any because flow is not smart enough to figure out cached\n var result = Object.create(null);\n var keys = hasSymbol\n ? Reflect.ownKeys(inject)\n : Object.keys(inject);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n // #6574 in case the inject object is observed...\n if (key === '__ob__') { continue }\n var provideKey = inject[key].from;\n var source = vm;\n while (source) {\n if (source._provided && hasOwn(source._provided, provideKey)) {\n result[key] = source._provided[provideKey];\n break\n }\n source = source.$parent;\n }\n if (!source) {\n if ('default' in inject[key]) {\n var provideDefault = inject[key].default;\n result[key] = typeof provideDefault === 'function'\n ? provideDefault.call(vm)\n : provideDefault;\n } else if (false) {\n warn((\"Injection \\\"\" + key + \"\\\" not found\"), vm);\n }\n }\n }\n return result\n }\n}\n\n/* */\n\n\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots (\n children,\n context\n) {\n if (!children || !children.length) {\n return {}\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}\n\nfunction isWhitespace (node) {\n return (node.isComment && !node.asyncFactory) || node.text === ' '\n}\n\n/* */\n\nfunction normalizeScopedSlots (\n slots,\n normalSlots,\n prevSlots\n) {\n var res;\n var hasNormalSlots = Object.keys(normalSlots).length > 0;\n var isStable = slots ? !!slots.$stable : !hasNormalSlots;\n var key = slots && slots.$key;\n if (!slots) {\n res = {};\n } else if (slots._normalized) {\n // fast path 1: child component re-render only, parent did not change\n return slots._normalized\n } else if (\n isStable &&\n prevSlots &&\n prevSlots !== emptyObject &&\n key === prevSlots.$key &&\n !hasNormalSlots &&\n !prevSlots.$hasNormal\n ) {\n // fast path 2: stable scoped slots w/ no normal slots to proxy,\n // only need to normalize once\n return prevSlots\n } else {\n res = {};\n for (var key$1 in slots) {\n if (slots[key$1] && key$1[0] !== '$') {\n res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);\n }\n }\n }\n // expose normal slots on scopedSlots\n for (var key$2 in normalSlots) {\n if (!(key$2 in res)) {\n res[key$2] = proxyNormalSlot(normalSlots, key$2);\n }\n }\n // avoriaz seems to mock a non-extensible $scopedSlots object\n // and when that is passed down this would cause an error\n if (slots && Object.isExtensible(slots)) {\n (slots)._normalized = res;\n }\n def(res, '$stable', isStable);\n def(res, '$key', key);\n def(res, '$hasNormal', hasNormalSlots);\n return res\n}\n\nfunction normalizeScopedSlot(normalSlots, key, fn) {\n var normalized = function () {\n var res = arguments.length ? fn.apply(null, arguments) : fn({});\n res = res && typeof res === 'object' && !Array.isArray(res)\n ? [res] // single vnode\n : normalizeChildren(res);\n return res && (\n res.length === 0 ||\n (res.length === 1 && res[0].isComment) // #9658\n ) ? undefined\n : res\n };\n // this is a slot using the new v-slot syntax without scope. although it is\n // compiled as a scoped slot, render fn users would expect it to be present\n // on this.$slots because the usage is semantically a normal slot.\n if (fn.proxy) {\n Object.defineProperty(normalSlots, key, {\n get: normalized,\n enumerable: true,\n configurable: true\n });\n }\n return normalized\n}\n\nfunction proxyNormalSlot(slots, key) {\n return function () { return slots[key]; }\n}\n\n/* */\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n if (hasSymbol && val[Symbol.iterator]) {\n ret = [];\n var iterator = val[Symbol.iterator]();\n var result = iterator.next();\n while (!result.done) {\n ret.push(render(result.value, ret.length));\n result = iterator.next();\n }\n } else {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n}\n\n/* */\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot (\n name,\n fallback,\n props,\n bindObject\n) {\n var scopedSlotFn = this.$scopedSlots[name];\n var nodes;\n if (scopedSlotFn) { // scoped slot\n props = props || {};\n if (bindObject) {\n if (false) {\n warn(\n 'slot v-bind without argument expects an Object',\n this\n );\n }\n props = extend(extend({}, bindObject), props);\n }\n nodes = scopedSlotFn(props) || fallback;\n } else {\n nodes = this.$slots[name] || fallback;\n }\n\n var target = props && props.slot;\n if (target) {\n return this.$createElement('template', { slot: target }, nodes)\n } else {\n return nodes\n }\n}\n\n/* */\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter (id) {\n return resolveAsset(this.$options, 'filters', id, true) || identity\n}\n\n/* */\n\nfunction isKeyNotMatch (expect, actual) {\n if (Array.isArray(expect)) {\n return expect.indexOf(actual) === -1\n } else {\n return expect !== actual\n }\n}\n\n/**\n * Runtime helper for checking keyCodes from config.\n * exposed as Vue.prototype._k\n * passing in eventKeyName as last argument separately for backwards compat\n */\nfunction checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}\n\n/* */\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}\n\n/* */\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic (\n index,\n isInFor\n) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(\n this._renderProxy,\n null,\n this // for render fns generated for functional component templates\n );\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n}\n\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce (\n tree,\n index,\n key\n) {\n markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n return tree\n}\n\nfunction markStatic (\n tree,\n key,\n isOnce\n) {\n if (Array.isArray(tree)) {\n for (var i = 0; i < tree.length; i++) {\n if (tree[i] && typeof tree[i] !== 'string') {\n markStaticNode(tree[i], (key + \"_\" + i), isOnce);\n }\n }\n } else {\n markStaticNode(tree, key, isOnce);\n }\n}\n\nfunction markStaticNode (node, key, isOnce) {\n node.isStatic = true;\n node.key = key;\n node.isOnce = isOnce;\n}\n\n/* */\n\nfunction bindObjectListeners (data, value) {\n if (value) {\n if (!isPlainObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-on without argument expects an Object value',\n this\n );\n } else {\n var on = data.on = data.on ? extend({}, data.on) : {};\n for (var key in value) {\n var existing = on[key];\n var ours = value[key];\n on[key] = existing ? [].concat(existing, ours) : ours;\n }\n }\n }\n return data\n}\n\n/* */\n\nfunction resolveScopedSlots (\n fns, // see flow/vnode\n res,\n // the following are added in 2.6\n hasDynamicKeys,\n contentHashKey\n) {\n res = res || { $stable: !hasDynamicKeys };\n for (var i = 0; i < fns.length; i++) {\n var slot = fns[i];\n if (Array.isArray(slot)) {\n resolveScopedSlots(slot, res, hasDynamicKeys);\n } else if (slot) {\n // marker for reverse proxying v-slot without scope on this.$slots\n if (slot.proxy) {\n slot.fn.proxy = true;\n }\n res[slot.key] = slot.fn;\n }\n }\n if (contentHashKey) {\n (res).$key = contentHashKey;\n }\n return res\n}\n\n/* */\n\nfunction bindDynamicKeys (baseObj, values) {\n for (var i = 0; i < values.length; i += 2) {\n var key = values[i];\n if (typeof key === 'string' && key) {\n baseObj[values[i]] = values[i + 1];\n } else if (false) {\n // null is a speical value for explicitly removing a binding\n warn(\n (\"Invalid value for dynamic directive argument (expected string or null): \" + key),\n this\n );\n }\n }\n return baseObj\n}\n\n// helper to dynamically append modifier runtime markers to event names.\n// ensure only append when value is already string, otherwise it will be cast\n// to string and cause the type check to miss.\nfunction prependModifier (value, symbol) {\n return typeof value === 'string' ? symbol + value : value\n}\n\n/* */\n\nfunction installRenderHelpers (target) {\n target._o = markOnce;\n target._n = toNumber;\n target._s = toString;\n target._l = renderList;\n target._t = renderSlot;\n target._q = looseEqual;\n target._i = looseIndexOf;\n target._m = renderStatic;\n target._f = resolveFilter;\n target._k = checkKeyCodes;\n target._b = bindObjectProps;\n target._v = createTextVNode;\n target._e = createEmptyVNode;\n target._u = resolveScopedSlots;\n target._g = bindObjectListeners;\n target._d = bindDynamicKeys;\n target._p = prependModifier;\n}\n\n/* */\n\nfunction FunctionalRenderContext (\n data,\n props,\n children,\n parent,\n Ctor\n) {\n var this$1 = this;\n\n var options = Ctor.options;\n // ensure the createElement function in functional components\n // gets a unique context - this is necessary for correct named slot check\n var contextVm;\n if (hasOwn(parent, '_uid')) {\n contextVm = Object.create(parent);\n // $flow-disable-line\n contextVm._original = parent;\n } else {\n // the context vm passed in is a functional context as well.\n // in this case we want to make sure we are able to get a hold to the\n // real context instance.\n contextVm = parent;\n // $flow-disable-line\n parent = parent._original;\n }\n var isCompiled = isTrue(options._compiled);\n var needNormalization = !isCompiled;\n\n this.data = data;\n this.props = props;\n this.children = children;\n this.parent = parent;\n this.listeners = data.on || emptyObject;\n this.injections = resolveInject(options.inject, parent);\n this.slots = function () {\n if (!this$1.$slots) {\n normalizeScopedSlots(\n data.scopedSlots,\n this$1.$slots = resolveSlots(children, parent)\n );\n }\n return this$1.$slots\n };\n\n Object.defineProperty(this, 'scopedSlots', ({\n enumerable: true,\n get: function get () {\n return normalizeScopedSlots(data.scopedSlots, this.slots())\n }\n }));\n\n // support for compiled functional template\n if (isCompiled) {\n // exposing $options for renderStatic()\n this.$options = options;\n // pre-resolve slots for renderSlot()\n this.$slots = this.slots();\n this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);\n }\n\n if (options._scopeId) {\n this._c = function (a, b, c, d) {\n var vnode = createElement(contextVm, a, b, c, d, needNormalization);\n if (vnode && !Array.isArray(vnode)) {\n vnode.fnScopeId = options._scopeId;\n vnode.fnContext = parent;\n }\n return vnode\n };\n } else {\n this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };\n }\n}\n\ninstallRenderHelpers(FunctionalRenderContext.prototype);\n\nfunction createFunctionalComponent (\n Ctor,\n propsData,\n data,\n contextVm,\n children\n) {\n var options = Ctor.options;\n var props = {};\n var propOptions = options.props;\n if (isDef(propOptions)) {\n for (var key in propOptions) {\n props[key] = validateProp(key, propOptions, propsData || emptyObject);\n }\n } else {\n if (isDef(data.attrs)) { mergeProps(props, data.attrs); }\n if (isDef(data.props)) { mergeProps(props, data.props); }\n }\n\n var renderContext = new FunctionalRenderContext(\n data,\n props,\n children,\n contextVm,\n Ctor\n );\n\n var vnode = options.render.call(null, renderContext._c, renderContext);\n\n if (vnode instanceof VNode) {\n return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)\n } else if (Array.isArray(vnode)) {\n var vnodes = normalizeChildren(vnode) || [];\n var res = new Array(vnodes.length);\n for (var i = 0; i < vnodes.length; i++) {\n res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);\n }\n return res\n }\n}\n\nfunction cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {\n // #7817 clone node before setting fnContext, otherwise if the node is reused\n // (e.g. it was from a cached normal slot) the fnContext causes named slots\n // that should not be matched to match.\n var clone = cloneVNode(vnode);\n clone.fnContext = contextVm;\n clone.fnOptions = options;\n if (false) {\n (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;\n }\n if (data.slot) {\n (clone.data || (clone.data = {})).slot = data.slot;\n }\n return clone\n}\n\nfunction mergeProps (to, from) {\n for (var key in from) {\n to[camelize(key)] = from[key];\n }\n}\n\n/* */\n\n/* */\n\n/* */\n\n/* */\n\n// inline hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n init: function init (vnode, hydrating) {\n if (\n vnode.componentInstance &&\n !vnode.componentInstance._isDestroyed &&\n vnode.data.keepAlive\n ) {\n // kept-alive components, treat as a patch\n var mountedNode = vnode; // work around flow\n componentVNodeHooks.prepatch(mountedNode, mountedNode);\n } else {\n var child = vnode.componentInstance = createComponentInstanceForVnode(\n vnode,\n activeInstance\n );\n child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n }\n },\n\n prepatch: function prepatch (oldVnode, vnode) {\n var options = vnode.componentOptions;\n var child = vnode.componentInstance = oldVnode.componentInstance;\n updateChildComponent(\n child,\n options.propsData, // updated props\n options.listeners, // updated listeners\n vnode, // new parent vnode\n options.children // new children\n );\n },\n\n insert: function insert (vnode) {\n var context = vnode.context;\n var componentInstance = vnode.componentInstance;\n if (!componentInstance._isMounted) {\n componentInstance._isMounted = true;\n callHook(componentInstance, 'mounted');\n }\n if (vnode.data.keepAlive) {\n if (context._isMounted) {\n // vue-router#1212\n // During updates, a kept-alive component's child components may\n // change, so directly walking the tree here may call activated hooks\n // on incorrect children. Instead we push them into a queue which will\n // be processed after the whole patch process ended.\n queueActivatedComponent(componentInstance);\n } else {\n activateChildComponent(componentInstance, true /* direct */);\n }\n }\n },\n\n destroy: function destroy (vnode) {\n var componentInstance = vnode.componentInstance;\n if (!componentInstance._isDestroyed) {\n if (!vnode.data.keepAlive) {\n componentInstance.$destroy();\n } else {\n deactivateChildComponent(componentInstance, true /* direct */);\n }\n }\n }\n};\n\nvar hooksToMerge = Object.keys(componentVNodeHooks);\n\nfunction createComponent (\n Ctor,\n data,\n context,\n children,\n tag\n) {\n if (isUndef(Ctor)) {\n return\n }\n\n var baseCtor = context.$options._base;\n\n // plain options object: turn it into a constructor\n if (isObject(Ctor)) {\n Ctor = baseCtor.extend(Ctor);\n }\n\n // if at this stage it's not a constructor or an async component factory,\n // reject.\n if (typeof Ctor !== 'function') {\n if (false) {\n warn((\"Invalid Component definition: \" + (String(Ctor))), context);\n }\n return\n }\n\n // async component\n var asyncFactory;\n if (isUndef(Ctor.cid)) {\n asyncFactory = Ctor;\n Ctor = resolveAsyncComponent(asyncFactory, baseCtor);\n if (Ctor === undefined) {\n // return a placeholder node for async component, which is rendered\n // as a comment node but preserves all the raw information for the node.\n // the information will be used for async server-rendering and hydration.\n return createAsyncPlaceholder(\n asyncFactory,\n data,\n context,\n children,\n tag\n )\n }\n }\n\n data = data || {};\n\n // resolve constructor options in case global mixins are applied after\n // component constructor creation\n resolveConstructorOptions(Ctor);\n\n // transform component v-model data into props & events\n if (isDef(data.model)) {\n transformModel(Ctor.options, data);\n }\n\n // extract props\n var propsData = extractPropsFromVNodeData(data, Ctor, tag);\n\n // functional component\n if (isTrue(Ctor.options.functional)) {\n return createFunctionalComponent(Ctor, propsData, data, context, children)\n }\n\n // extract listeners, since these needs to be treated as\n // child component listeners instead of DOM listeners\n var listeners = data.on;\n // replace with listeners with .native modifier\n // so it gets processed during parent component patch.\n data.on = data.nativeOn;\n\n if (isTrue(Ctor.options.abstract)) {\n // abstract components do not keep anything\n // other than props & listeners & slot\n\n // work around flow\n var slot = data.slot;\n data = {};\n if (slot) {\n data.slot = slot;\n }\n }\n\n // install component management hooks onto the placeholder node\n installComponentHooks(data);\n\n // return a placeholder vnode\n var name = Ctor.options.name || tag;\n var vnode = new VNode(\n (\"vue-component-\" + (Ctor.cid) + (name ? (\"-\" + name) : '')),\n data, undefined, undefined, undefined, context,\n { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },\n asyncFactory\n );\n\n return vnode\n}\n\nfunction createComponentInstanceForVnode (\n vnode, // we know it's MountedComponentVNode but flow doesn't\n parent // activeInstance in lifecycle state\n) {\n var options = {\n _isComponent: true,\n _parentVnode: vnode,\n parent: parent\n };\n // check inline-template render functions\n var inlineTemplate = vnode.data.inlineTemplate;\n if (isDef(inlineTemplate)) {\n options.render = inlineTemplate.render;\n options.staticRenderFns = inlineTemplate.staticRenderFns;\n }\n return new vnode.componentOptions.Ctor(options)\n}\n\nfunction installComponentHooks (data) {\n var hooks = data.hook || (data.hook = {});\n for (var i = 0; i < hooksToMerge.length; i++) {\n var key = hooksToMerge[i];\n var existing = hooks[key];\n var toMerge = componentVNodeHooks[key];\n if (existing !== toMerge && !(existing && existing._merged)) {\n hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;\n }\n }\n}\n\nfunction mergeHook$1 (f1, f2) {\n var merged = function (a, b) {\n // flow complains about extra args which is why we use any\n f1(a, b);\n f2(a, b);\n };\n merged._merged = true;\n return merged\n}\n\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n}\n\n/* */\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement (\n context,\n tag,\n data,\n children,\n normalizationType,\n alwaysNormalize\n) {\n if (Array.isArray(data) || isPrimitive(data)) {\n normalizationType = children;\n children = data;\n data = undefined;\n }\n if (isTrue(alwaysNormalize)) {\n normalizationType = ALWAYS_NORMALIZE;\n }\n return _createElement(context, tag, data, children, normalizationType)\n}\n\nfunction _createElement (\n context,\n tag,\n data,\n children,\n normalizationType\n) {\n if (isDef(data) && isDef((data).__ob__)) {\n \"production\" !== 'production' && warn(\n \"Avoid using observed data object as vnode data: \" + (JSON.stringify(data)) + \"\\n\" +\n 'Always create fresh vnode data objects in each render!',\n context\n );\n return createEmptyVNode()\n }\n // object syntax in v-bind\n if (isDef(data) && isDef(data.is)) {\n tag = data.is;\n }\n if (!tag) {\n // in case of component :is set to falsy value\n return createEmptyVNode()\n }\n // warn against non-primitive key\n if (false\n ) {\n {\n warn(\n 'Avoid using non-primitive value as key, ' +\n 'use string/number value instead.',\n context\n );\n }\n }\n // support single function children as default scoped slot\n if (Array.isArray(children) &&\n typeof children[0] === 'function'\n ) {\n data = data || {};\n data.scopedSlots = { default: children[0] };\n children.length = 0;\n }\n if (normalizationType === ALWAYS_NORMALIZE) {\n children = normalizeChildren(children);\n } else if (normalizationType === SIMPLE_NORMALIZE) {\n children = simpleNormalizeChildren(children);\n }\n var vnode, ns;\n if (typeof tag === 'string') {\n var Ctor;\n ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n if (config.isReservedTag(tag)) {\n // platform built-in elements\n vnode = new VNode(\n config.parsePlatformTagName(tag), data, children,\n undefined, undefined, context\n );\n } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {\n // component\n vnode = createComponent(Ctor, data, context, children, tag);\n } else {\n // unknown or unlisted namespaced elements\n // check at runtime because it may get assigned a namespace when its\n // parent normalizes children\n vnode = new VNode(\n tag, data, children,\n undefined, undefined, context\n );\n }\n } else {\n // direct component options / constructor\n vnode = createComponent(tag, data, context, children);\n }\n if (Array.isArray(vnode)) {\n return vnode\n } else if (isDef(vnode)) {\n if (isDef(ns)) { applyNS(vnode, ns); }\n if (isDef(data)) { registerDeepBindings(data); }\n return vnode\n } else {\n return createEmptyVNode()\n }\n}\n\nfunction applyNS (vnode, ns, force) {\n vnode.ns = ns;\n if (vnode.tag === 'foreignObject') {\n // use default namespace inside foreignObject\n ns = undefined;\n force = true;\n }\n if (isDef(vnode.children)) {\n for (var i = 0, l = vnode.children.length; i < l; i++) {\n var child = vnode.children[i];\n if (isDef(child.tag) && (\n isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n applyNS(child, ns, force);\n }\n }\n }\n}\n\n// ref #5318\n// necessary to ensure parent re-render when deep bindings like :style and\n// :class are used on slot nodes\nfunction registerDeepBindings (data) {\n if (isObject(data.style)) {\n traverse(data.style);\n }\n if (isObject(data.class)) {\n traverse(data.class);\n }\n}\n\n/* */\n\nfunction initRender (vm) {\n vm._vnode = null; // the root of the child tree\n vm._staticTrees = null; // v-once cached trees\n var options = vm.$options;\n var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree\n var renderContext = parentVnode && parentVnode.context;\n vm.$slots = resolveSlots(options._renderChildren, renderContext);\n vm.$scopedSlots = emptyObject;\n // bind the createElement fn to this instance\n // so that we get proper render context inside it.\n // args order: tag, data, children, normalizationType, alwaysNormalize\n // internal version is used by render functions compiled from templates\n vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\n // normalization is always applied for the public version, used in\n // user-written render functions.\n vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\n\n // $attrs & $listeners are exposed for easier HOC creation.\n // they need to be reactive so that HOCs using them are always updated\n var parentData = parentVnode && parentVnode.data;\n\n /* istanbul ignore else */\n if (false) {\n defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {\n !isUpdatingChildComponent && warn(\"$attrs is readonly.\", vm);\n }, true);\n defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {\n !isUpdatingChildComponent && warn(\"$listeners is readonly.\", vm);\n }, true);\n } else {\n defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, null, true);\n defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, null, true);\n }\n}\n\nvar currentRenderingInstance = null;\n\nfunction renderMixin (Vue) {\n // install runtime convenience helpers\n installRenderHelpers(Vue.prototype);\n\n Vue.prototype.$nextTick = function (fn) {\n return nextTick(fn, this)\n };\n\n Vue.prototype._render = function () {\n var vm = this;\n var ref = vm.$options;\n var render = ref.render;\n var _parentVnode = ref._parentVnode;\n\n if (_parentVnode) {\n vm.$scopedSlots = normalizeScopedSlots(\n _parentVnode.data.scopedSlots,\n vm.$slots,\n vm.$scopedSlots\n );\n }\n\n // set parent vnode. this allows render functions to have access\n // to the data on the placeholder node.\n vm.$vnode = _parentVnode;\n // render self\n var vnode;\n try {\n // There's no need to maintain a stack becaues all render fns are called\n // separately from one another. Nested component's render fns are called\n // when parent component is patched.\n currentRenderingInstance = vm;\n vnode = render.call(vm._renderProxy, vm.$createElement);\n } catch (e) {\n handleError(e, vm, \"render\");\n // return error render result,\n // or previous vnode to prevent render error causing blank component\n /* istanbul ignore else */\n if (false) {\n try {\n vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n } catch (e) {\n handleError(e, vm, \"renderError\");\n vnode = vm._vnode;\n }\n } else {\n vnode = vm._vnode;\n }\n } finally {\n currentRenderingInstance = null;\n }\n // if the returned array contains only a single node, allow it\n if (Array.isArray(vnode) && vnode.length === 1) {\n vnode = vnode[0];\n }\n // return empty vnode in case the render function errored out\n if (!(vnode instanceof VNode)) {\n if (false) {\n warn(\n 'Multiple root nodes returned from render function. Render function ' +\n 'should return a single root node.',\n vm\n );\n }\n vnode = createEmptyVNode();\n }\n // set parent\n vnode.parent = _parentVnode;\n return vnode\n };\n}\n\n/* */\n\nfunction ensureCtor (comp, base) {\n if (\n comp.__esModule ||\n (hasSymbol && comp[Symbol.toStringTag] === 'Module')\n ) {\n comp = comp.default;\n }\n return isObject(comp)\n ? base.extend(comp)\n : comp\n}\n\nfunction createAsyncPlaceholder (\n factory,\n data,\n context,\n children,\n tag\n) {\n var node = createEmptyVNode();\n node.asyncFactory = factory;\n node.asyncMeta = { data: data, context: context, children: children, tag: tag };\n return node\n}\n\nfunction resolveAsyncComponent (\n factory,\n baseCtor\n) {\n if (isTrue(factory.error) && isDef(factory.errorComp)) {\n return factory.errorComp\n }\n\n if (isDef(factory.resolved)) {\n return factory.resolved\n }\n\n var owner = currentRenderingInstance;\n if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {\n // already pending\n factory.owners.push(owner);\n }\n\n if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n return factory.loadingComp\n }\n\n if (owner && !isDef(factory.owners)) {\n var owners = factory.owners = [owner];\n var sync = true;\n var timerLoading = null;\n var timerTimeout = null\n\n ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });\n\n var forceRender = function (renderCompleted) {\n for (var i = 0, l = owners.length; i < l; i++) {\n (owners[i]).$forceUpdate();\n }\n\n if (renderCompleted) {\n owners.length = 0;\n if (timerLoading !== null) {\n clearTimeout(timerLoading);\n timerLoading = null;\n }\n if (timerTimeout !== null) {\n clearTimeout(timerTimeout);\n timerTimeout = null;\n }\n }\n };\n\n var resolve = once(function (res) {\n // cache resolved\n factory.resolved = ensureCtor(res, baseCtor);\n // invoke callbacks only if this is not a synchronous resolve\n // (async resolves are shimmed as synchronous during SSR)\n if (!sync) {\n forceRender(true);\n } else {\n owners.length = 0;\n }\n });\n\n var reject = once(function (reason) {\n \"production\" !== 'production' && warn(\n \"Failed to resolve async component: \" + (String(factory)) +\n (reason ? (\"\\nReason: \" + reason) : '')\n );\n if (isDef(factory.errorComp)) {\n factory.error = true;\n forceRender(true);\n }\n });\n\n var res = factory(resolve, reject);\n\n if (isObject(res)) {\n if (isPromise(res)) {\n // () => Promise\n if (isUndef(factory.resolved)) {\n res.then(resolve, reject);\n }\n } else if (isPromise(res.component)) {\n res.component.then(resolve, reject);\n\n if (isDef(res.error)) {\n factory.errorComp = ensureCtor(res.error, baseCtor);\n }\n\n if (isDef(res.loading)) {\n factory.loadingComp = ensureCtor(res.loading, baseCtor);\n if (res.delay === 0) {\n factory.loading = true;\n } else {\n timerLoading = setTimeout(function () {\n timerLoading = null;\n if (isUndef(factory.resolved) && isUndef(factory.error)) {\n factory.loading = true;\n forceRender(false);\n }\n }, res.delay || 200);\n }\n }\n\n if (isDef(res.timeout)) {\n timerTimeout = setTimeout(function () {\n timerTimeout = null;\n if (isUndef(factory.resolved)) {\n reject(\n false\n ? (\"timeout (\" + (res.timeout) + \"ms)\")\n : null\n );\n }\n }, res.timeout);\n }\n }\n }\n\n sync = false;\n // return in case resolved synchronously\n return factory.loading\n ? factory.loadingComp\n : factory.resolved\n }\n}\n\n/* */\n\nfunction isAsyncPlaceholder (node) {\n return node.isComment && node.asyncFactory\n}\n\n/* */\n\nfunction getFirstComponentChild (children) {\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n var c = children[i];\n if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n return c\n }\n }\n }\n}\n\n/* */\n\n/* */\n\nfunction initEvents (vm) {\n vm._events = Object.create(null);\n vm._hasHookEvent = false;\n // init parent attached events\n var listeners = vm.$options._parentListeners;\n if (listeners) {\n updateComponentListeners(vm, listeners);\n }\n}\n\nvar target;\n\nfunction add (event, fn) {\n target.$on(event, fn);\n}\n\nfunction remove$1 (event, fn) {\n target.$off(event, fn);\n}\n\nfunction createOnceHandler (event, fn) {\n var _target = target;\n return function onceHandler () {\n var res = fn.apply(null, arguments);\n if (res !== null) {\n _target.$off(event, onceHandler);\n }\n }\n}\n\nfunction updateComponentListeners (\n vm,\n listeners,\n oldListeners\n) {\n target = vm;\n updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);\n target = undefined;\n}\n\nfunction eventsMixin (Vue) {\n var hookRE = /^hook:/;\n Vue.prototype.$on = function (event, fn) {\n var vm = this;\n if (Array.isArray(event)) {\n for (var i = 0, l = event.length; i < l; i++) {\n vm.$on(event[i], fn);\n }\n } else {\n (vm._events[event] || (vm._events[event] = [])).push(fn);\n // optimize hook:event cost by using a boolean flag marked at registration\n // instead of a hash lookup\n if (hookRE.test(event)) {\n vm._hasHookEvent = true;\n }\n }\n return vm\n };\n\n Vue.prototype.$once = function (event, fn) {\n var vm = this;\n function on () {\n vm.$off(event, on);\n fn.apply(vm, arguments);\n }\n on.fn = fn;\n vm.$on(event, on);\n return vm\n };\n\n Vue.prototype.$off = function (event, fn) {\n var vm = this;\n // all\n if (!arguments.length) {\n vm._events = Object.create(null);\n return vm\n }\n // array of events\n if (Array.isArray(event)) {\n for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {\n vm.$off(event[i$1], fn);\n }\n return vm\n }\n // specific event\n var cbs = vm._events[event];\n if (!cbs) {\n return vm\n }\n if (!fn) {\n vm._events[event] = null;\n return vm\n }\n // specific handler\n var cb;\n var i = cbs.length;\n while (i--) {\n cb = cbs[i];\n if (cb === fn || cb.fn === fn) {\n cbs.splice(i, 1);\n break\n }\n }\n return vm\n };\n\n Vue.prototype.$emit = function (event) {\n var vm = this;\n if (false) {\n var lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n tip(\n \"Event \\\"\" + lowerCaseEvent + \"\\\" is emitted in component \" +\n (formatComponentName(vm)) + \" but the handler is registered for \\\"\" + event + \"\\\". \" +\n \"Note that HTML attributes are case-insensitive and you cannot use \" +\n \"v-on to listen to camelCase events when using in-DOM templates. \" +\n \"You should probably use \\\"\" + (hyphenate(event)) + \"\\\" instead of \\\"\" + event + \"\\\".\"\n );\n }\n }\n var cbs = vm._events[event];\n if (cbs) {\n cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n var args = toArray(arguments, 1);\n var info = \"event handler for \\\"\" + event + \"\\\"\";\n for (var i = 0, l = cbs.length; i < l; i++) {\n invokeWithErrorHandling(cbs[i], vm, args, vm, info);\n }\n }\n return vm\n };\n}\n\n/* */\n\nvar activeInstance = null;\nvar isUpdatingChildComponent = false;\n\nfunction setActiveInstance(vm) {\n var prevActiveInstance = activeInstance;\n activeInstance = vm;\n return function () {\n activeInstance = prevActiveInstance;\n }\n}\n\nfunction initLifecycle (vm) {\n var options = vm.$options;\n\n // locate first non-abstract parent\n var parent = options.parent;\n if (parent && !options.abstract) {\n while (parent.$options.abstract && parent.$parent) {\n parent = parent.$parent;\n }\n parent.$children.push(vm);\n }\n\n vm.$parent = parent;\n vm.$root = parent ? parent.$root : vm;\n\n vm.$children = [];\n vm.$refs = {};\n\n vm._watcher = null;\n vm._inactive = null;\n vm._directInactive = false;\n vm._isMounted = false;\n vm._isDestroyed = false;\n vm._isBeingDestroyed = false;\n}\n\nfunction lifecycleMixin (Vue) {\n Vue.prototype._update = function (vnode, hydrating) {\n var vm = this;\n var prevEl = vm.$el;\n var prevVnode = vm._vnode;\n var restoreActiveInstance = setActiveInstance(vm);\n vm._vnode = vnode;\n // Vue.prototype.__patch__ is injected in entry points\n // based on the rendering backend used.\n if (!prevVnode) {\n // initial render\n vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);\n } else {\n // updates\n vm.$el = vm.__patch__(prevVnode, vnode);\n }\n restoreActiveInstance();\n // update __vue__ reference\n if (prevEl) {\n prevEl.__vue__ = null;\n }\n if (vm.$el) {\n vm.$el.__vue__ = vm;\n }\n // if parent is an HOC, update its $el as well\n if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\n vm.$parent.$el = vm.$el;\n }\n // updated hook is called by the scheduler to ensure that children are\n // updated in a parent's updated hook.\n };\n\n Vue.prototype.$forceUpdate = function () {\n var vm = this;\n if (vm._watcher) {\n vm._watcher.update();\n }\n };\n\n Vue.prototype.$destroy = function () {\n var vm = this;\n if (vm._isBeingDestroyed) {\n return\n }\n callHook(vm, 'beforeDestroy');\n vm._isBeingDestroyed = true;\n // remove self from parent\n var parent = vm.$parent;\n if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n remove(parent.$children, vm);\n }\n // teardown watchers\n if (vm._watcher) {\n vm._watcher.teardown();\n }\n var i = vm._watchers.length;\n while (i--) {\n vm._watchers[i].teardown();\n }\n // remove reference from data ob\n // frozen object may not have observer.\n if (vm._data.__ob__) {\n vm._data.__ob__.vmCount--;\n }\n // call the last hook...\n vm._isDestroyed = true;\n // invoke destroy hooks on current rendered tree\n vm.__patch__(vm._vnode, null);\n // fire destroyed hook\n callHook(vm, 'destroyed');\n // turn off all instance listeners.\n vm.$off();\n // remove __vue__ reference\n if (vm.$el) {\n vm.$el.__vue__ = null;\n }\n // release circular reference (#6759)\n if (vm.$vnode) {\n vm.$vnode.parent = null;\n }\n };\n}\n\nfunction mountComponent (\n vm,\n el,\n hydrating\n) {\n vm.$el = el;\n if (!vm.$options.render) {\n vm.$options.render = createEmptyVNode;\n if (false) {\n /* istanbul ignore if */\n if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n vm.$options.el || el) {\n warn(\n 'You are using the runtime-only build of Vue where the template ' +\n 'compiler is not available. Either pre-compile the templates into ' +\n 'render functions, or use the compiler-included build.',\n vm\n );\n } else {\n warn(\n 'Failed to mount component: template or render function not defined.',\n vm\n );\n }\n }\n }\n callHook(vm, 'beforeMount');\n\n var updateComponent;\n /* istanbul ignore if */\n if (false) {\n updateComponent = function () {\n var name = vm._name;\n var id = vm._uid;\n var startTag = \"vue-perf-start:\" + id;\n var endTag = \"vue-perf-end:\" + id;\n\n mark(startTag);\n var vnode = vm._render();\n mark(endTag);\n measure((\"vue \" + name + \" render\"), startTag, endTag);\n\n mark(startTag);\n vm._update(vnode, hydrating);\n mark(endTag);\n measure((\"vue \" + name + \" patch\"), startTag, endTag);\n };\n } else {\n updateComponent = function () {\n vm._update(vm._render(), hydrating);\n };\n }\n\n // we set this to vm._watcher inside the watcher's constructor\n // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n // component's mounted hook), which relies on vm._watcher being already defined\n new Watcher(vm, updateComponent, noop, {\n before: function before () {\n if (vm._isMounted && !vm._isDestroyed) {\n callHook(vm, 'beforeUpdate');\n }\n }\n }, true /* isRenderWatcher */);\n hydrating = false;\n\n // manually mounted instance, call mounted on self\n // mounted is called for render-created child components in its inserted hook\n if (vm.$vnode == null) {\n vm._isMounted = true;\n callHook(vm, 'mounted');\n }\n return vm\n}\n\nfunction updateChildComponent (\n vm,\n propsData,\n listeners,\n parentVnode,\n renderChildren\n) {\n if (false) {\n isUpdatingChildComponent = true;\n }\n\n // determine whether component has slot children\n // we need to do this before overwriting $options._renderChildren.\n\n // check if there are dynamic scopedSlots (hand-written or compiled but with\n // dynamic slot names). Static scoped slots compiled from template has the\n // \"$stable\" marker.\n var newScopedSlots = parentVnode.data.scopedSlots;\n var oldScopedSlots = vm.$scopedSlots;\n var hasDynamicScopedSlot = !!(\n (newScopedSlots && !newScopedSlots.$stable) ||\n (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||\n (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)\n );\n\n // Any static slot children from the parent may have changed during parent's\n // update. Dynamic scoped slots may also have changed. In such cases, a forced\n // update is necessary to ensure correctness.\n var needsForceUpdate = !!(\n renderChildren || // has new static slots\n vm.$options._renderChildren || // has old static slots\n hasDynamicScopedSlot\n );\n\n vm.$options._parentVnode = parentVnode;\n vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n\n if (vm._vnode) { // update child tree's parent\n vm._vnode.parent = parentVnode;\n }\n vm.$options._renderChildren = renderChildren;\n\n // update $attrs and $listeners hash\n // these are also reactive so they may trigger child update if the child\n // used them during render\n vm.$attrs = parentVnode.data.attrs || emptyObject;\n vm.$listeners = listeners || emptyObject;\n\n // update props\n if (propsData && vm.$options.props) {\n toggleObserving(false);\n var props = vm._props;\n var propKeys = vm.$options._propKeys || [];\n for (var i = 0; i < propKeys.length; i++) {\n var key = propKeys[i];\n var propOptions = vm.$options.props; // wtf flow?\n props[key] = validateProp(key, propOptions, propsData, vm);\n }\n toggleObserving(true);\n // keep a copy of raw propsData\n vm.$options.propsData = propsData;\n }\n\n // update listeners\n listeners = listeners || emptyObject;\n var oldListeners = vm.$options._parentListeners;\n vm.$options._parentListeners = listeners;\n updateComponentListeners(vm, listeners, oldListeners);\n\n // resolve slots + force update if has children\n if (needsForceUpdate) {\n vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n vm.$forceUpdate();\n }\n\n if (false) {\n isUpdatingChildComponent = false;\n }\n}\n\nfunction isInInactiveTree (vm) {\n while (vm && (vm = vm.$parent)) {\n if (vm._inactive) { return true }\n }\n return false\n}\n\nfunction activateChildComponent (vm, direct) {\n if (direct) {\n vm._directInactive = false;\n if (isInInactiveTree(vm)) {\n return\n }\n } else if (vm._directInactive) {\n return\n }\n if (vm._inactive || vm._inactive === null) {\n vm._inactive = false;\n for (var i = 0; i < vm.$children.length; i++) {\n activateChildComponent(vm.$children[i]);\n }\n callHook(vm, 'activated');\n }\n}\n\nfunction deactivateChildComponent (vm, direct) {\n if (direct) {\n vm._directInactive = true;\n if (isInInactiveTree(vm)) {\n return\n }\n }\n if (!vm._inactive) {\n vm._inactive = true;\n for (var i = 0; i < vm.$children.length; i++) {\n deactivateChildComponent(vm.$children[i]);\n }\n callHook(vm, 'deactivated');\n }\n}\n\nfunction callHook (vm, hook) {\n // #7573 disable dep collection when invoking lifecycle hooks\n pushTarget();\n var handlers = vm.$options[hook];\n var info = hook + \" hook\";\n if (handlers) {\n for (var i = 0, j = handlers.length; i < j; i++) {\n invokeWithErrorHandling(handlers[i], vm, null, vm, info);\n }\n }\n if (vm._hasHookEvent) {\n vm.$emit('hook:' + hook);\n }\n popTarget();\n}\n\n/* */\n\nvar MAX_UPDATE_COUNT = 100;\n\nvar queue = [];\nvar activatedChildren = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}\n\n// Async edge case #6566 requires saving the timestamp when event listeners are\n// attached. However, calling performance.now() has a perf overhead especially\n// if the page has thousands of event listeners. Instead, we take a timestamp\n// every time the scheduler flushes and use that for all event listeners\n// attached during that flush.\nvar currentFlushTimestamp = 0;\n\n// Async edge case fix requires storing an event listener's attach timestamp.\nvar getNow = Date.now;\n\n// Determine what event timestamp the browser is using. Annoyingly, the\n// timestamp can either be hi-res (relative to page load) or low-res\n// (relative to UNIX epoch), so in order to compare time we have to use the\n// same timestamp type when saving the flush timestamp.\n// All IE versions use low-res event timestamps, and have problematic clock\n// implementations (#9632)\nif (inBrowser && !isIE) {\n var performance = window.performance;\n if (\n performance &&\n typeof performance.now === 'function' &&\n getNow() > document.createEvent('Event').timeStamp\n ) {\n // if the event timestamp, although evaluated AFTER the Date.now(), is\n // smaller than it, it means the event is using a hi-res timestamp,\n // and we need to use the hi-res version for event listener timestamps as\n // well.\n getNow = function () { return performance.now(); };\n }\n}\n\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (false) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}\n\nfunction callUpdatedHooks (queue) {\n var i = queue.length;\n while (i--) {\n var watcher = queue[i];\n var vm = watcher.vm;\n if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {\n callHook(vm, 'updated');\n }\n }\n}\n\n/**\n * Queue a kept-alive component that was activated during patch.\n * The queue will be processed after the entire tree has been patched.\n */\nfunction queueActivatedComponent (vm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n vm._inactive = false;\n activatedChildren.push(vm);\n}\n\nfunction callActivatedHooks (queue) {\n for (var i = 0; i < queue.length; i++) {\n queue[i]._inactive = true;\n activateChildComponent(queue[i], true /* true */);\n }\n}\n\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (false) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}\n\n/* */\n\n\n\nvar uid$2 = 0;\n\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n */\nvar Watcher = function Watcher (\n vm,\n expOrFn,\n cb,\n options,\n isRenderWatcher\n) {\n this.vm = vm;\n if (isRenderWatcher) {\n vm._watcher = this;\n }\n vm._watchers.push(this);\n // options\n if (options) {\n this.deep = !!options.deep;\n this.user = !!options.user;\n this.lazy = !!options.lazy;\n this.sync = !!options.sync;\n this.before = options.before;\n } else {\n this.deep = this.user = this.lazy = this.sync = false;\n }\n this.cb = cb;\n this.id = ++uid$2; // uid for batching\n this.active = true;\n this.dirty = this.lazy; // for lazy watchers\n this.deps = [];\n this.newDeps = [];\n this.depIds = new _Set();\n this.newDepIds = new _Set();\n this.expression = false\n ? expOrFn.toString()\n : '';\n // parse expression for getter\n if (typeof expOrFn === 'function') {\n this.getter = expOrFn;\n } else {\n this.getter = parsePath(expOrFn);\n if (!this.getter) {\n this.getter = noop;\n \"production\" !== 'production' && warn(\n \"Failed watching path: \\\"\" + expOrFn + \"\\\" \" +\n 'Watcher only accepts simple dot-delimited paths. ' +\n 'For full control, use a function instead.',\n vm\n );\n }\n }\n this.value = this.lazy\n ? undefined\n : this.get();\n};\n\n/**\n * Evaluate the getter, and re-collect dependencies.\n */\nWatcher.prototype.get = function get () {\n pushTarget(this);\n var value;\n var vm = this.vm;\n try {\n value = this.getter.call(vm, vm);\n } catch (e) {\n if (this.user) {\n handleError(e, vm, (\"getter for watcher \\\"\" + (this.expression) + \"\\\"\"));\n } else {\n throw e\n }\n } finally {\n // \"touch\" every property so they are all tracked as\n // dependencies for deep watching\n if (this.deep) {\n traverse(value);\n }\n popTarget();\n this.cleanupDeps();\n }\n return value\n};\n\n/**\n * Add a dependency to this directive.\n */\nWatcher.prototype.addDep = function addDep (dep) {\n var id = dep.id;\n if (!this.newDepIds.has(id)) {\n this.newDepIds.add(id);\n this.newDeps.push(dep);\n if (!this.depIds.has(id)) {\n dep.addSub(this);\n }\n }\n};\n\n/**\n * Clean up for dependency collection.\n */\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\n var i = this.deps.length;\n while (i--) {\n var dep = this.deps[i];\n if (!this.newDepIds.has(dep.id)) {\n dep.removeSub(this);\n }\n }\n var tmp = this.depIds;\n this.depIds = this.newDepIds;\n this.newDepIds = tmp;\n this.newDepIds.clear();\n tmp = this.deps;\n this.deps = this.newDeps;\n this.newDeps = tmp;\n this.newDeps.length = 0;\n};\n\n/**\n * Subscriber interface.\n * Will be called when a dependency changes.\n */\nWatcher.prototype.update = function update () {\n /* istanbul ignore else */\n if (this.lazy) {\n this.dirty = true;\n } else if (this.sync) {\n this.run();\n } else {\n queueWatcher(this);\n }\n};\n\n/**\n * Scheduler job interface.\n * Will be called by the scheduler.\n */\nWatcher.prototype.run = function run () {\n if (this.active) {\n var value = this.get();\n if (\n value !== this.value ||\n // Deep watchers and watchers on Object/Arrays should fire even\n // when the value is the same, because the value may\n // have mutated.\n isObject(value) ||\n this.deep\n ) {\n // set new value\n var oldValue = this.value;\n this.value = value;\n if (this.user) {\n try {\n this.cb.call(this.vm, value, oldValue);\n } catch (e) {\n handleError(e, this.vm, (\"callback for watcher \\\"\" + (this.expression) + \"\\\"\"));\n }\n } else {\n this.cb.call(this.vm, value, oldValue);\n }\n }\n }\n};\n\n/**\n * Evaluate the value of the watcher.\n * This only gets called for lazy watchers.\n */\nWatcher.prototype.evaluate = function evaluate () {\n this.value = this.get();\n this.dirty = false;\n};\n\n/**\n * Depend on all deps collected by this watcher.\n */\nWatcher.prototype.depend = function depend () {\n var i = this.deps.length;\n while (i--) {\n this.deps[i].depend();\n }\n};\n\n/**\n * Remove self from all dependencies' subscriber list.\n */\nWatcher.prototype.teardown = function teardown () {\n if (this.active) {\n // remove self from vm's watcher list\n // this is a somewhat expensive operation so we skip it\n // if the vm is being destroyed.\n if (!this.vm._isBeingDestroyed) {\n remove(this.vm._watchers, this);\n }\n var i = this.deps.length;\n while (i--) {\n this.deps[i].removeSub(this);\n }\n this.active = false;\n }\n};\n\n/* */\n\nvar sharedPropertyDefinition = {\n enumerable: true,\n configurable: true,\n get: noop,\n set: noop\n};\n\nfunction proxy (target, sourceKey, key) {\n sharedPropertyDefinition.get = function proxyGetter () {\n return this[sourceKey][key]\n };\n sharedPropertyDefinition.set = function proxySetter (val) {\n this[sourceKey][key] = val;\n };\n Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction initState (vm) {\n vm._watchers = [];\n var opts = vm.$options;\n if (opts.props) { initProps(vm, opts.props); }\n if (opts.methods) { initMethods(vm, opts.methods); }\n if (opts.data) {\n initData(vm);\n } else {\n observe(vm._data = {}, true /* asRootData */);\n }\n if (opts.computed) { initComputed(vm, opts.computed); }\n if (opts.watch && opts.watch !== nativeWatch) {\n initWatch(vm, opts.watch);\n }\n}\n\nfunction initProps (vm, propsOptions) {\n var propsData = vm.$options.propsData || {};\n var props = vm._props = {};\n // cache prop keys so that future props updates can iterate using Array\n // instead of dynamic object key enumeration.\n var keys = vm.$options._propKeys = [];\n var isRoot = !vm.$parent;\n // root instance props should be converted\n if (!isRoot) {\n toggleObserving(false);\n }\n var loop = function ( key ) {\n keys.push(key);\n var value = validateProp(key, propsOptions, propsData, vm);\n /* istanbul ignore else */\n if (false) {\n var hyphenatedKey = hyphenate(key);\n if (isReservedAttribute(hyphenatedKey) ||\n config.isReservedAttr(hyphenatedKey)) {\n warn(\n (\"\\\"\" + hyphenatedKey + \"\\\" is a reserved attribute and cannot be used as component prop.\"),\n vm\n );\n }\n defineReactive$$1(props, key, value, function () {\n if (!isRoot && !isUpdatingChildComponent) {\n warn(\n \"Avoid mutating a prop directly since the value will be \" +\n \"overwritten whenever the parent component re-renders. \" +\n \"Instead, use a data or computed property based on the prop's \" +\n \"value. Prop being mutated: \\\"\" + key + \"\\\"\",\n vm\n );\n }\n });\n } else {\n defineReactive$$1(props, key, value);\n }\n // static props are already proxied on the component's prototype\n // during Vue.extend(). We only need to proxy props defined at\n // instantiation here.\n if (!(key in vm)) {\n proxy(vm, \"_props\", key);\n }\n };\n\n for (var key in propsOptions) loop( key );\n toggleObserving(true);\n}\n\nfunction initData (vm) {\n var data = vm.$options.data;\n data = vm._data = typeof data === 'function'\n ? getData(data, vm)\n : data || {};\n if (!isPlainObject(data)) {\n data = {};\n \"production\" !== 'production' && warn(\n 'data functions should return an object:\\n' +\n 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\n vm\n );\n }\n // proxy data on instance\n var keys = Object.keys(data);\n var props = vm.$options.props;\n var methods = vm.$options.methods;\n var i = keys.length;\n while (i--) {\n var key = keys[i];\n if (false) {\n if (methods && hasOwn(methods, key)) {\n warn(\n (\"Method \\\"\" + key + \"\\\" has already been defined as a data property.\"),\n vm\n );\n }\n }\n if (props && hasOwn(props, key)) {\n \"production\" !== 'production' && warn(\n \"The data property \\\"\" + key + \"\\\" is already declared as a prop. \" +\n \"Use prop default value instead.\",\n vm\n );\n } else if (!isReserved(key)) {\n proxy(vm, \"_data\", key);\n }\n }\n // observe data\n observe(data, true /* asRootData */);\n}\n\nfunction getData (data, vm) {\n // #7573 disable dep collection when invoking data getters\n pushTarget();\n try {\n return data.call(vm, vm)\n } catch (e) {\n handleError(e, vm, \"data()\");\n return {}\n } finally {\n popTarget();\n }\n}\n\nvar computedWatcherOptions = { lazy: true };\n\nfunction initComputed (vm, computed) {\n // $flow-disable-line\n var watchers = vm._computedWatchers = Object.create(null);\n // computed properties are just getters during SSR\n var isSSR = isServerRendering();\n\n for (var key in computed) {\n var userDef = computed[key];\n var getter = typeof userDef === 'function' ? userDef : userDef.get;\n if (false) {\n warn(\n (\"Getter is missing for computed property \\\"\" + key + \"\\\".\"),\n vm\n );\n }\n\n if (!isSSR) {\n // create internal watcher for the computed property.\n watchers[key] = new Watcher(\n vm,\n getter || noop,\n noop,\n computedWatcherOptions\n );\n }\n\n // component-defined computed properties are already defined on the\n // component prototype. We only need to define computed properties defined\n // at instantiation here.\n if (!(key in vm)) {\n defineComputed(vm, key, userDef);\n } else if (false) {\n if (key in vm.$data) {\n warn((\"The computed property \\\"\" + key + \"\\\" is already defined in data.\"), vm);\n } else if (vm.$options.props && key in vm.$options.props) {\n warn((\"The computed property \\\"\" + key + \"\\\" is already defined as a prop.\"), vm);\n }\n }\n }\n}\n\nfunction defineComputed (\n target,\n key,\n userDef\n) {\n var shouldCache = !isServerRendering();\n if (typeof userDef === 'function') {\n sharedPropertyDefinition.get = shouldCache\n ? createComputedGetter(key)\n : createGetterInvoker(userDef);\n sharedPropertyDefinition.set = noop;\n } else {\n sharedPropertyDefinition.get = userDef.get\n ? shouldCache && userDef.cache !== false\n ? createComputedGetter(key)\n : createGetterInvoker(userDef.get)\n : noop;\n sharedPropertyDefinition.set = userDef.set || noop;\n }\n if (false) {\n sharedPropertyDefinition.set = function () {\n warn(\n (\"Computed property \\\"\" + key + \"\\\" was assigned to but it has no setter.\"),\n this\n );\n };\n }\n Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction createComputedGetter (key) {\n return function computedGetter () {\n var watcher = this._computedWatchers && this._computedWatchers[key];\n if (watcher) {\n if (watcher.dirty) {\n watcher.evaluate();\n }\n if (Dep.target) {\n watcher.depend();\n }\n return watcher.value\n }\n }\n}\n\nfunction createGetterInvoker(fn) {\n return function computedGetter () {\n return fn.call(this, this)\n }\n}\n\nfunction initMethods (vm, methods) {\n var props = vm.$options.props;\n for (var key in methods) {\n if (false) {\n if (typeof methods[key] !== 'function') {\n warn(\n \"Method \\\"\" + key + \"\\\" has type \\\"\" + (typeof methods[key]) + \"\\\" in the component definition. \" +\n \"Did you reference the function correctly?\",\n vm\n );\n }\n if (props && hasOwn(props, key)) {\n warn(\n (\"Method \\\"\" + key + \"\\\" has already been defined as a prop.\"),\n vm\n );\n }\n if ((key in vm) && isReserved(key)) {\n warn(\n \"Method \\\"\" + key + \"\\\" conflicts with an existing Vue instance method. \" +\n \"Avoid defining component methods that start with _ or $.\"\n );\n }\n }\n vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);\n }\n}\n\nfunction initWatch (vm, watch) {\n for (var key in watch) {\n var handler = watch[key];\n if (Array.isArray(handler)) {\n for (var i = 0; i < handler.length; i++) {\n createWatcher(vm, key, handler[i]);\n }\n } else {\n createWatcher(vm, key, handler);\n }\n }\n}\n\nfunction createWatcher (\n vm,\n expOrFn,\n handler,\n options\n) {\n if (isPlainObject(handler)) {\n options = handler;\n handler = handler.handler;\n }\n if (typeof handler === 'string') {\n handler = vm[handler];\n }\n return vm.$watch(expOrFn, handler, options)\n}\n\nfunction stateMixin (Vue) {\n // flow somehow has problems with directly declared definition object\n // when using Object.defineProperty, so we have to procedurally build up\n // the object here.\n var dataDef = {};\n dataDef.get = function () { return this._data };\n var propsDef = {};\n propsDef.get = function () { return this._props };\n if (false) {\n dataDef.set = function () {\n warn(\n 'Avoid replacing instance root $data. ' +\n 'Use nested data properties instead.',\n this\n );\n };\n propsDef.set = function () {\n warn(\"$props is readonly.\", this);\n };\n }\n Object.defineProperty(Vue.prototype, '$data', dataDef);\n Object.defineProperty(Vue.prototype, '$props', propsDef);\n\n Vue.prototype.$set = set;\n Vue.prototype.$delete = del;\n\n Vue.prototype.$watch = function (\n expOrFn,\n cb,\n options\n ) {\n var vm = this;\n if (isPlainObject(cb)) {\n return createWatcher(vm, expOrFn, cb, options)\n }\n options = options || {};\n options.user = true;\n var watcher = new Watcher(vm, expOrFn, cb, options);\n if (options.immediate) {\n try {\n cb.call(vm, watcher.value);\n } catch (error) {\n handleError(error, vm, (\"callback for immediate watcher \\\"\" + (watcher.expression) + \"\\\"\"));\n }\n }\n return function unwatchFn () {\n watcher.teardown();\n }\n };\n}\n\n/* */\n\nvar uid$3 = 0;\n\nfunction initMixin (Vue) {\n Vue.prototype._init = function (options) {\n var vm = this;\n // a uid\n vm._uid = uid$3++;\n\n var startTag, endTag;\n /* istanbul ignore if */\n if (false) {\n startTag = \"vue-perf-start:\" + (vm._uid);\n endTag = \"vue-perf-end:\" + (vm._uid);\n mark(startTag);\n }\n\n // a flag to avoid this being observed\n vm._isVue = true;\n // merge options\n if (options && options._isComponent) {\n // optimize internal component instantiation\n // since dynamic options merging is pretty slow, and none of the\n // internal component options needs special treatment.\n initInternalComponent(vm, options);\n } else {\n vm.$options = mergeOptions(\n resolveConstructorOptions(vm.constructor),\n options || {},\n vm\n );\n }\n /* istanbul ignore else */\n if (false) {\n initProxy(vm);\n } else {\n vm._renderProxy = vm;\n }\n // expose real self\n vm._self = vm;\n initLifecycle(vm);\n initEvents(vm);\n initRender(vm);\n callHook(vm, 'beforeCreate');\n initInjections(vm); // resolve injections before data/props\n initState(vm);\n initProvide(vm); // resolve provide after data/props\n callHook(vm, 'created');\n\n /* istanbul ignore if */\n if (false) {\n vm._name = formatComponentName(vm, false);\n mark(endTag);\n measure((\"vue \" + (vm._name) + \" init\"), startTag, endTag);\n }\n\n if (vm.$options.el) {\n vm.$mount(vm.$options.el);\n }\n };\n}\n\nfunction initInternalComponent (vm, options) {\n var opts = vm.$options = Object.create(vm.constructor.options);\n // doing this because it's faster than dynamic enumeration.\n var parentVnode = options._parentVnode;\n opts.parent = options.parent;\n opts._parentVnode = parentVnode;\n\n var vnodeComponentOptions = parentVnode.componentOptions;\n opts.propsData = vnodeComponentOptions.propsData;\n opts._parentListeners = vnodeComponentOptions.listeners;\n opts._renderChildren = vnodeComponentOptions.children;\n opts._componentTag = vnodeComponentOptions.tag;\n\n if (options.render) {\n opts.render = options.render;\n opts.staticRenderFns = options.staticRenderFns;\n }\n}\n\nfunction resolveConstructorOptions (Ctor) {\n var options = Ctor.options;\n if (Ctor.super) {\n var superOptions = resolveConstructorOptions(Ctor.super);\n var cachedSuperOptions = Ctor.superOptions;\n if (superOptions !== cachedSuperOptions) {\n // super option changed,\n // need to resolve new options.\n Ctor.superOptions = superOptions;\n // check if there are any late-modified/attached options (#4976)\n var modifiedOptions = resolveModifiedOptions(Ctor);\n // update base extend options\n if (modifiedOptions) {\n extend(Ctor.extendOptions, modifiedOptions);\n }\n options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n if (options.name) {\n options.components[options.name] = Ctor;\n }\n }\n }\n return options\n}\n\nfunction resolveModifiedOptions (Ctor) {\n var modified;\n var latest = Ctor.options;\n var sealed = Ctor.sealedOptions;\n for (var key in latest) {\n if (latest[key] !== sealed[key]) {\n if (!modified) { modified = {}; }\n modified[key] = latest[key];\n }\n }\n return modified\n}\n\nfunction Vue (options) {\n if (false\n ) {\n warn('Vue is a constructor and should be called with the `new` keyword');\n }\n this._init(options);\n}\n\ninitMixin(Vue);\nstateMixin(Vue);\neventsMixin(Vue);\nlifecycleMixin(Vue);\nrenderMixin(Vue);\n\n/* */\n\nfunction initUse (Vue) {\n Vue.use = function (plugin) {\n var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));\n if (installedPlugins.indexOf(plugin) > -1) {\n return this\n }\n\n // additional parameters\n var args = toArray(arguments, 1);\n args.unshift(this);\n if (typeof plugin.install === 'function') {\n plugin.install.apply(plugin, args);\n } else if (typeof plugin === 'function') {\n plugin.apply(null, args);\n }\n installedPlugins.push(plugin);\n return this\n };\n}\n\n/* */\n\nfunction initMixin$1 (Vue) {\n Vue.mixin = function (mixin) {\n this.options = mergeOptions(this.options, mixin);\n return this\n };\n}\n\n/* */\n\nfunction initExtend (Vue) {\n /**\n * Each instance constructor, including Vue, has a unique\n * cid. This enables us to create wrapped \"child\n * constructors\" for prototypal inheritance and cache them.\n */\n Vue.cid = 0;\n var cid = 1;\n\n /**\n * Class inheritance\n */\n Vue.extend = function (extendOptions) {\n extendOptions = extendOptions || {};\n var Super = this;\n var SuperId = Super.cid;\n var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n if (cachedCtors[SuperId]) {\n return cachedCtors[SuperId]\n }\n\n var name = extendOptions.name || Super.options.name;\n if (false) {\n validateComponentName(name);\n }\n\n var Sub = function VueComponent (options) {\n this._init(options);\n };\n Sub.prototype = Object.create(Super.prototype);\n Sub.prototype.constructor = Sub;\n Sub.cid = cid++;\n Sub.options = mergeOptions(\n Super.options,\n extendOptions\n );\n Sub['super'] = Super;\n\n // For props and computed properties, we define the proxy getters on\n // the Vue instances at extension time, on the extended prototype. This\n // avoids Object.defineProperty calls for each instance created.\n if (Sub.options.props) {\n initProps$1(Sub);\n }\n if (Sub.options.computed) {\n initComputed$1(Sub);\n }\n\n // allow further extension/mixin/plugin usage\n Sub.extend = Super.extend;\n Sub.mixin = Super.mixin;\n Sub.use = Super.use;\n\n // create asset registers, so extended classes\n // can have their private assets too.\n ASSET_TYPES.forEach(function (type) {\n Sub[type] = Super[type];\n });\n // enable recursive self-lookup\n if (name) {\n Sub.options.components[name] = Sub;\n }\n\n // keep a reference to the super options at extension time.\n // later at instantiation we can check if Super's options have\n // been updated.\n Sub.superOptions = Super.options;\n Sub.extendOptions = extendOptions;\n Sub.sealedOptions = extend({}, Sub.options);\n\n // cache constructor\n cachedCtors[SuperId] = Sub;\n return Sub\n };\n}\n\nfunction initProps$1 (Comp) {\n var props = Comp.options.props;\n for (var key in props) {\n proxy(Comp.prototype, \"_props\", key);\n }\n}\n\nfunction initComputed$1 (Comp) {\n var computed = Comp.options.computed;\n for (var key in computed) {\n defineComputed(Comp.prototype, key, computed[key]);\n }\n}\n\n/* */\n\nfunction initAssetRegisters (Vue) {\n /**\n * Create asset registration methods.\n */\n ASSET_TYPES.forEach(function (type) {\n Vue[type] = function (\n id,\n definition\n ) {\n if (!definition) {\n return this.options[type + 's'][id]\n } else {\n /* istanbul ignore if */\n if (false) {\n validateComponentName(id);\n }\n if (type === 'component' && isPlainObject(definition)) {\n definition.name = definition.name || id;\n definition = this.options._base.extend(definition);\n }\n if (type === 'directive' && typeof definition === 'function') {\n definition = { bind: definition, update: definition };\n }\n this.options[type + 's'][id] = definition;\n return definition\n }\n };\n });\n}\n\n/* */\n\n\n\nfunction getComponentName (opts) {\n return opts && (opts.Ctor.options.name || opts.tag)\n}\n\nfunction matches (pattern, name) {\n if (Array.isArray(pattern)) {\n return pattern.indexOf(name) > -1\n } else if (typeof pattern === 'string') {\n return pattern.split(',').indexOf(name) > -1\n } else if (isRegExp(pattern)) {\n return pattern.test(name)\n }\n /* istanbul ignore next */\n return false\n}\n\nfunction pruneCache (keepAliveInstance, filter) {\n var cache = keepAliveInstance.cache;\n var keys = keepAliveInstance.keys;\n var _vnode = keepAliveInstance._vnode;\n for (var key in cache) {\n var cachedNode = cache[key];\n if (cachedNode) {\n var name = getComponentName(cachedNode.componentOptions);\n if (name && !filter(name)) {\n pruneCacheEntry(cache, key, keys, _vnode);\n }\n }\n }\n}\n\nfunction pruneCacheEntry (\n cache,\n key,\n keys,\n current\n) {\n var cached$$1 = cache[key];\n if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {\n cached$$1.componentInstance.$destroy();\n }\n cache[key] = null;\n remove(keys, key);\n}\n\nvar patternTypes = [String, RegExp, Array];\n\nvar KeepAlive = {\n name: 'keep-alive',\n abstract: true,\n\n props: {\n include: patternTypes,\n exclude: patternTypes,\n max: [String, Number]\n },\n\n created: function created () {\n this.cache = Object.create(null);\n this.keys = [];\n },\n\n destroyed: function destroyed () {\n for (var key in this.cache) {\n pruneCacheEntry(this.cache, key, this.keys);\n }\n },\n\n mounted: function mounted () {\n var this$1 = this;\n\n this.$watch('include', function (val) {\n pruneCache(this$1, function (name) { return matches(val, name); });\n });\n this.$watch('exclude', function (val) {\n pruneCache(this$1, function (name) { return !matches(val, name); });\n });\n },\n\n render: function render () {\n var slot = this.$slots.default;\n var vnode = getFirstComponentChild(slot);\n var componentOptions = vnode && vnode.componentOptions;\n if (componentOptions) {\n // check pattern\n var name = getComponentName(componentOptions);\n var ref = this;\n var include = ref.include;\n var exclude = ref.exclude;\n if (\n // not included\n (include && (!name || !matches(include, name))) ||\n // excluded\n (exclude && name && matches(exclude, name))\n ) {\n return vnode\n }\n\n var ref$1 = this;\n var cache = ref$1.cache;\n var keys = ref$1.keys;\n var key = vnode.key == null\n // same constructor may get registered as different local components\n // so cid alone is not enough (#3269)\n ? componentOptions.Ctor.cid + (componentOptions.tag ? (\"::\" + (componentOptions.tag)) : '')\n : vnode.key;\n if (cache[key]) {\n vnode.componentInstance = cache[key].componentInstance;\n // make current key freshest\n remove(keys, key);\n keys.push(key);\n } else {\n cache[key] = vnode;\n keys.push(key);\n // prune oldest entry\n if (this.max && keys.length > parseInt(this.max)) {\n pruneCacheEntry(cache, keys[0], keys, this._vnode);\n }\n }\n\n vnode.data.keepAlive = true;\n }\n return vnode || (slot && slot[0])\n }\n};\n\nvar builtInComponents = {\n KeepAlive: KeepAlive\n};\n\n/* */\n\nfunction initGlobalAPI (Vue) {\n // config\n var configDef = {};\n configDef.get = function () { return config; };\n if (false) {\n configDef.set = function () {\n warn(\n 'Do not replace the Vue.config object, set individual fields instead.'\n );\n };\n }\n Object.defineProperty(Vue, 'config', configDef);\n\n // exposed util methods.\n // NOTE: these are not considered part of the public API - avoid relying on\n // them unless you are aware of the risk.\n Vue.util = {\n warn: warn,\n extend: extend,\n mergeOptions: mergeOptions,\n defineReactive: defineReactive$$1\n };\n\n Vue.set = set;\n Vue.delete = del;\n Vue.nextTick = nextTick;\n\n // 2.6 explicit observable API\n Vue.observable = function (obj) {\n observe(obj);\n return obj\n };\n\n Vue.options = Object.create(null);\n ASSET_TYPES.forEach(function (type) {\n Vue.options[type + 's'] = Object.create(null);\n });\n\n // this is used to identify the \"base\" constructor to extend all plain-object\n // components with in Weex's multi-instance scenarios.\n Vue.options._base = Vue;\n\n extend(Vue.options.components, builtInComponents);\n\n initUse(Vue);\n initMixin$1(Vue);\n initExtend(Vue);\n initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue);\n\nObject.defineProperty(Vue.prototype, '$isServer', {\n get: isServerRendering\n});\n\nObject.defineProperty(Vue.prototype, '$ssrContext', {\n get: function get () {\n /* istanbul ignore next */\n return this.$vnode && this.$vnode.ssrContext\n }\n});\n\n// expose FunctionalRenderContext for ssr runtime helper installation\nObject.defineProperty(Vue, 'FunctionalRenderContext', {\n value: FunctionalRenderContext\n});\n\nVue.version = '2.6.10';\n\n/* */\n\n// these are reserved for web because they are directly compiled away\n// during template compilation\nvar isReservedAttr = makeMap('style,class');\n\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select,progress');\nvar mustUseProp = function (tag, type, attr) {\n return (\n (attr === 'value' && acceptValue(tag)) && type !== 'button' ||\n (attr === 'selected' && tag === 'option') ||\n (attr === 'checked' && tag === 'input') ||\n (attr === 'muted' && tag === 'video')\n )\n};\n\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n\nvar isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');\n\nvar convertEnumeratedValue = function (key, value) {\n return isFalsyAttrValue(value) || value === 'false'\n ? 'false'\n // allow arbitrary string value for contenteditable\n : key === 'contenteditable' && isValidContentEditableValue(value)\n ? value\n : 'true'\n};\n\nvar isBooleanAttr = makeMap(\n 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n 'required,reversed,scoped,seamless,selected,sortable,translate,' +\n 'truespeed,typemustmatch,visible'\n);\n\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\n\nvar isXlink = function (name) {\n return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'\n};\n\nvar getXlinkProp = function (name) {\n return isXlink(name) ? name.slice(6, name.length) : ''\n};\n\nvar isFalsyAttrValue = function (val) {\n return val == null || val === false\n};\n\n/* */\n\nfunction genClassForVnode (vnode) {\n var data = vnode.data;\n var parentNode = vnode;\n var childNode = vnode;\n while (isDef(childNode.componentInstance)) {\n childNode = childNode.componentInstance._vnode;\n if (childNode && childNode.data) {\n data = mergeClassData(childNode.data, data);\n }\n }\n while (isDef(parentNode = parentNode.parent)) {\n if (parentNode && parentNode.data) {\n data = mergeClassData(data, parentNode.data);\n }\n }\n return renderClass(data.staticClass, data.class)\n}\n\nfunction mergeClassData (child, parent) {\n return {\n staticClass: concat(child.staticClass, parent.staticClass),\n class: isDef(child.class)\n ? [child.class, parent.class]\n : parent.class\n }\n}\n\nfunction renderClass (\n staticClass,\n dynamicClass\n) {\n if (isDef(staticClass) || isDef(dynamicClass)) {\n return concat(staticClass, stringifyClass(dynamicClass))\n }\n /* istanbul ignore next */\n return ''\n}\n\nfunction concat (a, b) {\n return a ? b ? (a + ' ' + b) : a : (b || '')\n}\n\nfunction stringifyClass (value) {\n if (Array.isArray(value)) {\n return stringifyArray(value)\n }\n if (isObject(value)) {\n return stringifyObject(value)\n }\n if (typeof value === 'string') {\n return value\n }\n /* istanbul ignore next */\n return ''\n}\n\nfunction stringifyArray (value) {\n var res = '';\n var stringified;\n for (var i = 0, l = value.length; i < l; i++) {\n if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {\n if (res) { res += ' '; }\n res += stringified;\n }\n }\n return res\n}\n\nfunction stringifyObject (value) {\n var res = '';\n for (var key in value) {\n if (value[key]) {\n if (res) { res += ' '; }\n res += key;\n }\n }\n return res\n}\n\n/* */\n\nvar namespaceMap = {\n svg: 'http://www.w3.org/2000/svg',\n math: 'http://www.w3.org/1998/Math/MathML'\n};\n\nvar isHTMLTag = makeMap(\n 'html,body,base,head,link,meta,style,title,' +\n 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +\n 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n 'embed,object,param,source,canvas,script,noscript,del,ins,' +\n 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n 'output,progress,select,textarea,' +\n 'details,dialog,menu,menuitem,summary,' +\n 'content,element,shadow,template,blockquote,iframe,tfoot'\n);\n\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap(\n 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',\n true\n);\n\nvar isReservedTag = function (tag) {\n return isHTMLTag(tag) || isSVG(tag)\n};\n\nfunction getTagNamespace (tag) {\n if (isSVG(tag)) {\n return 'svg'\n }\n // basic support for MathML\n // note it doesn't support other MathML elements being component roots\n if (tag === 'math') {\n return 'math'\n }\n}\n\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement (tag) {\n /* istanbul ignore if */\n if (!inBrowser) {\n return true\n }\n if (isReservedTag(tag)) {\n return false\n }\n tag = tag.toLowerCase();\n /* istanbul ignore if */\n if (unknownElementCache[tag] != null) {\n return unknownElementCache[tag]\n }\n var el = document.createElement(tag);\n if (tag.indexOf('-') > -1) {\n // http://stackoverflow.com/a/28210364/1070244\n return (unknownElementCache[tag] = (\n el.constructor === window.HTMLUnknownElement ||\n el.constructor === window.HTMLElement\n ))\n } else {\n return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))\n }\n}\n\nvar isTextInputType = makeMap('text,number,password,search,email,tel,url');\n\n/* */\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n \"production\" !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}\n\n/* */\n\nfunction createElement$1 (tagName, vnode) {\n var elm = document.createElement(tagName);\n if (tagName !== 'select') {\n return elm\n }\n // false or null will remove the attribute but undefined will not\n if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {\n elm.setAttribute('multiple', 'multiple');\n }\n return elm\n}\n\nfunction createElementNS (namespace, tagName) {\n return document.createElementNS(namespaceMap[namespace], tagName)\n}\n\nfunction createTextNode (text) {\n return document.createTextNode(text)\n}\n\nfunction createComment (text) {\n return document.createComment(text)\n}\n\nfunction insertBefore (parentNode, newNode, referenceNode) {\n parentNode.insertBefore(newNode, referenceNode);\n}\n\nfunction removeChild (node, child) {\n node.removeChild(child);\n}\n\nfunction appendChild (node, child) {\n node.appendChild(child);\n}\n\nfunction parentNode (node) {\n return node.parentNode\n}\n\nfunction nextSibling (node) {\n return node.nextSibling\n}\n\nfunction tagName (node) {\n return node.tagName\n}\n\nfunction setTextContent (node, text) {\n node.textContent = text;\n}\n\nfunction setStyleScope (node, scopeId) {\n node.setAttribute(scopeId, '');\n}\n\nvar nodeOps = /*#__PURE__*/Object.freeze({\n createElement: createElement$1,\n createElementNS: createElementNS,\n createTextNode: createTextNode,\n createComment: createComment,\n insertBefore: insertBefore,\n removeChild: removeChild,\n appendChild: appendChild,\n parentNode: parentNode,\n nextSibling: nextSibling,\n tagName: tagName,\n setTextContent: setTextContent,\n setStyleScope: setStyleScope\n});\n\n/* */\n\nvar ref = {\n create: function create (_, vnode) {\n registerRef(vnode);\n },\n update: function update (oldVnode, vnode) {\n if (oldVnode.data.ref !== vnode.data.ref) {\n registerRef(oldVnode, true);\n registerRef(vnode);\n }\n },\n destroy: function destroy (vnode) {\n registerRef(vnode, true);\n }\n};\n\nfunction registerRef (vnode, isRemoval) {\n var key = vnode.data.ref;\n if (!isDef(key)) { return }\n\n var vm = vnode.context;\n var ref = vnode.componentInstance || vnode.elm;\n var refs = vm.$refs;\n if (isRemoval) {\n if (Array.isArray(refs[key])) {\n remove(refs[key], ref);\n } else if (refs[key] === ref) {\n refs[key] = undefined;\n }\n } else {\n if (vnode.data.refInFor) {\n if (!Array.isArray(refs[key])) {\n refs[key] = [ref];\n } else if (refs[key].indexOf(ref) < 0) {\n // $flow-disable-line\n refs[key].push(ref);\n }\n } else {\n refs[key] = ref;\n }\n }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\n\nvar emptyNode = new VNode('', {}, []);\n\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n\nfunction sameVnode (a, b) {\n return (\n a.key === b.key && (\n (\n a.tag === b.tag &&\n a.isComment === b.isComment &&\n isDef(a.data) === isDef(b.data) &&\n sameInputType(a, b)\n ) || (\n isTrue(a.isAsyncPlaceholder) &&\n a.asyncFactory === b.asyncFactory &&\n isUndef(b.asyncFactory.error)\n )\n )\n )\n}\n\nfunction sameInputType (a, b) {\n if (a.tag !== 'input') { return true }\n var i;\n var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;\n var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;\n return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)\n}\n\nfunction createKeyToOldIdx (children, beginIdx, endIdx) {\n var i, key;\n var map = {};\n for (i = beginIdx; i <= endIdx; ++i) {\n key = children[i].key;\n if (isDef(key)) { map[key] = i; }\n }\n return map\n}\n\nfunction createPatchFunction (backend) {\n var i, j;\n var cbs = {};\n\n var modules = backend.modules;\n var nodeOps = backend.nodeOps;\n\n for (i = 0; i < hooks.length; ++i) {\n cbs[hooks[i]] = [];\n for (j = 0; j < modules.length; ++j) {\n if (isDef(modules[j][hooks[i]])) {\n cbs[hooks[i]].push(modules[j][hooks[i]]);\n }\n }\n }\n\n function emptyNodeAt (elm) {\n return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)\n }\n\n function createRmCb (childElm, listeners) {\n function remove$$1 () {\n if (--remove$$1.listeners === 0) {\n removeNode(childElm);\n }\n }\n remove$$1.listeners = listeners;\n return remove$$1\n }\n\n function removeNode (el) {\n var parent = nodeOps.parentNode(el);\n // element may have already been removed due to v-html / v-text\n if (isDef(parent)) {\n nodeOps.removeChild(parent, el);\n }\n }\n\n function isUnknownElement$$1 (vnode, inVPre) {\n return (\n !inVPre &&\n !vnode.ns &&\n !(\n config.ignoredElements.length &&\n config.ignoredElements.some(function (ignore) {\n return isRegExp(ignore)\n ? ignore.test(vnode.tag)\n : ignore === vnode.tag\n })\n ) &&\n config.isUnknownElement(vnode.tag)\n )\n }\n\n var creatingElmInVPre = 0;\n\n function createElm (\n vnode,\n insertedVnodeQueue,\n parentElm,\n refElm,\n nested,\n ownerArray,\n index\n ) {\n if (isDef(vnode.elm) && isDef(ownerArray)) {\n // This vnode was used in a previous render!\n // now it's used as a new node, overwriting its elm would cause\n // potential patch errors down the road when it's used as an insertion\n // reference node. Instead, we clone the node on-demand before creating\n // associated DOM element for it.\n vnode = ownerArray[index] = cloneVNode(vnode);\n }\n\n vnode.isRootInsert = !nested; // for transition enter check\n if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n return\n }\n\n var data = vnode.data;\n var children = vnode.children;\n var tag = vnode.tag;\n if (isDef(tag)) {\n if (false) {\n if (data && data.pre) {\n creatingElmInVPre++;\n }\n if (isUnknownElement$$1(vnode, creatingElmInVPre)) {\n warn(\n 'Unknown custom element: <' + tag + '> - did you ' +\n 'register the component correctly? For recursive components, ' +\n 'make sure to provide the \"name\" option.',\n vnode.context\n );\n }\n }\n\n vnode.elm = vnode.ns\n ? nodeOps.createElementNS(vnode.ns, tag)\n : nodeOps.createElement(tag, vnode);\n setScope(vnode);\n\n /* istanbul ignore if */\n {\n createChildren(vnode, children, insertedVnodeQueue);\n if (isDef(data)) {\n invokeCreateHooks(vnode, insertedVnodeQueue);\n }\n insert(parentElm, vnode.elm, refElm);\n }\n\n if (false) {\n creatingElmInVPre--;\n }\n } else if (isTrue(vnode.isComment)) {\n vnode.elm = nodeOps.createComment(vnode.text);\n insert(parentElm, vnode.elm, refElm);\n } else {\n vnode.elm = nodeOps.createTextNode(vnode.text);\n insert(parentElm, vnode.elm, refElm);\n }\n }\n\n function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n var i = vnode.data;\n if (isDef(i)) {\n var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n if (isDef(i = i.hook) && isDef(i = i.init)) {\n i(vnode, false /* hydrating */);\n }\n // after calling the init hook, if the vnode is a child component\n // it should've created a child instance and mounted it. the child\n // component also has set the placeholder vnode's elm.\n // in that case we can just return the element and be done.\n if (isDef(vnode.componentInstance)) {\n initComponent(vnode, insertedVnodeQueue);\n insert(parentElm, vnode.elm, refElm);\n if (isTrue(isReactivated)) {\n reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n }\n return true\n }\n }\n }\n\n function initComponent (vnode, insertedVnodeQueue) {\n if (isDef(vnode.data.pendingInsert)) {\n insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n vnode.data.pendingInsert = null;\n }\n vnode.elm = vnode.componentInstance.$el;\n if (isPatchable(vnode)) {\n invokeCreateHooks(vnode, insertedVnodeQueue);\n setScope(vnode);\n } else {\n // empty component root.\n // skip all element-related modules except for ref (#3455)\n registerRef(vnode);\n // make sure to invoke the insert hook\n insertedVnodeQueue.push(vnode);\n }\n }\n\n function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n var i;\n // hack for #4339: a reactivated component with inner transition\n // does not trigger because the inner node's created hooks are not called\n // again. It's not ideal to involve module-specific logic in here but\n // there doesn't seem to be a better way to do it.\n var innerNode = vnode;\n while (innerNode.componentInstance) {\n innerNode = innerNode.componentInstance._vnode;\n if (isDef(i = innerNode.data) && isDef(i = i.transition)) {\n for (i = 0; i < cbs.activate.length; ++i) {\n cbs.activate[i](emptyNode, innerNode);\n }\n insertedVnodeQueue.push(innerNode);\n break\n }\n }\n // unlike a newly created component,\n // a reactivated keep-alive component doesn't insert itself\n insert(parentElm, vnode.elm, refElm);\n }\n\n function insert (parent, elm, ref$$1) {\n if (isDef(parent)) {\n if (isDef(ref$$1)) {\n if (nodeOps.parentNode(ref$$1) === parent) {\n nodeOps.insertBefore(parent, elm, ref$$1);\n }\n } else {\n nodeOps.appendChild(parent, elm);\n }\n }\n }\n\n function createChildren (vnode, children, insertedVnodeQueue) {\n if (Array.isArray(children)) {\n if (false) {\n checkDuplicateKeys(children);\n }\n for (var i = 0; i < children.length; ++i) {\n createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);\n }\n } else if (isPrimitive(vnode.text)) {\n nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));\n }\n }\n\n function isPatchable (vnode) {\n while (vnode.componentInstance) {\n vnode = vnode.componentInstance._vnode;\n }\n return isDef(vnode.tag)\n }\n\n function invokeCreateHooks (vnode, insertedVnodeQueue) {\n for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n cbs.create[i$1](emptyNode, vnode);\n }\n i = vnode.data.hook; // Reuse variable\n if (isDef(i)) {\n if (isDef(i.create)) { i.create(emptyNode, vnode); }\n if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }\n }\n }\n\n // set scope id attribute for scoped CSS.\n // this is implemented as a special case to avoid the overhead\n // of going through the normal attribute patching process.\n function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }\n\n function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n for (; startIdx <= endIdx; ++startIdx) {\n createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);\n }\n }\n\n function invokeDestroyHook (vnode) {\n var i, j;\n var data = vnode.data;\n if (isDef(data)) {\n if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }\n for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }\n }\n if (isDef(i = vnode.children)) {\n for (j = 0; j < vnode.children.length; ++j) {\n invokeDestroyHook(vnode.children[j]);\n }\n }\n }\n\n function removeVnodes (parentElm, vnodes, startIdx, endIdx) {\n for (; startIdx <= endIdx; ++startIdx) {\n var ch = vnodes[startIdx];\n if (isDef(ch)) {\n if (isDef(ch.tag)) {\n removeAndInvokeRemoveHook(ch);\n invokeDestroyHook(ch);\n } else { // Text node\n removeNode(ch.elm);\n }\n }\n }\n }\n\n function removeAndInvokeRemoveHook (vnode, rm) {\n if (isDef(rm) || isDef(vnode.data)) {\n var i;\n var listeners = cbs.remove.length + 1;\n if (isDef(rm)) {\n // we have a recursively passed down rm callback\n // increase the listeners count\n rm.listeners += listeners;\n } else {\n // directly removing\n rm = createRmCb(vnode.elm, listeners);\n }\n // recursively invoke hooks on child component root node\n if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {\n removeAndInvokeRemoveHook(i, rm);\n }\n for (i = 0; i < cbs.remove.length; ++i) {\n cbs.remove[i](vnode, rm);\n }\n if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {\n i(vnode, rm);\n } else {\n rm();\n }\n } else {\n removeNode(vnode.elm);\n }\n }\n\n function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n var oldStartIdx = 0;\n var newStartIdx = 0;\n var oldEndIdx = oldCh.length - 1;\n var oldStartVnode = oldCh[0];\n var oldEndVnode = oldCh[oldEndIdx];\n var newEndIdx = newCh.length - 1;\n var newStartVnode = newCh[0];\n var newEndVnode = newCh[newEndIdx];\n var oldKeyToIdx, idxInOld, vnodeToMove, refElm;\n\n // removeOnly is a special flag used only by <transition-group>\n // to ensure removed elements stay in correct relative positions\n // during leaving transitions\n var canMove = !removeOnly;\n\n if (false) {\n checkDuplicateKeys(newCh);\n }\n\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (isUndef(oldStartVnode)) {\n oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n } else if (isUndef(oldEndVnode)) {\n oldEndVnode = oldCh[--oldEndIdx];\n } else if (sameVnode(oldStartVnode, newStartVnode)) {\n patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n } else if (sameVnode(oldEndVnode, newEndVnode)) {\n patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right\n patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n oldStartVnode = oldCh[++oldStartIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left\n patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n oldEndVnode = oldCh[--oldEndIdx];\n newStartVnode = newCh[++newStartIdx];\n } else {\n if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }\n idxInOld = isDef(newStartVnode.key)\n ? oldKeyToIdx[newStartVnode.key]\n : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);\n if (isUndef(idxInOld)) { // New element\n createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n } else {\n vnodeToMove = oldCh[idxInOld];\n if (sameVnode(vnodeToMove, newStartVnode)) {\n patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n oldCh[idxInOld] = undefined;\n canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);\n } else {\n // same key but different element. treat as new element\n createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n }\n }\n newStartVnode = newCh[++newStartIdx];\n }\n }\n if (oldStartIdx > oldEndIdx) {\n refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n } else if (newStartIdx > newEndIdx) {\n removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n }\n }\n\n function checkDuplicateKeys (children) {\n var seenKeys = {};\n for (var i = 0; i < children.length; i++) {\n var vnode = children[i];\n var key = vnode.key;\n if (isDef(key)) {\n if (seenKeys[key]) {\n warn(\n (\"Duplicate keys detected: '\" + key + \"'. This may cause an update error.\"),\n vnode.context\n );\n } else {\n seenKeys[key] = true;\n }\n }\n }\n }\n\n function findIdxInOld (node, oldCh, start, end) {\n for (var i = start; i < end; i++) {\n var c = oldCh[i];\n if (isDef(c) && sameVnode(node, c)) { return i }\n }\n }\n\n function patchVnode (\n oldVnode,\n vnode,\n insertedVnodeQueue,\n ownerArray,\n index,\n removeOnly\n ) {\n if (oldVnode === vnode) {\n return\n }\n\n if (isDef(vnode.elm) && isDef(ownerArray)) {\n // clone reused vnode\n vnode = ownerArray[index] = cloneVNode(vnode);\n }\n\n var elm = vnode.elm = oldVnode.elm;\n\n if (isTrue(oldVnode.isAsyncPlaceholder)) {\n if (isDef(vnode.asyncFactory.resolved)) {\n hydrate(oldVnode.elm, vnode, insertedVnodeQueue);\n } else {\n vnode.isAsyncPlaceholder = true;\n }\n return\n }\n\n // reuse element for static trees.\n // note we only do this if the vnode is cloned -\n // if the new node is not cloned it means the render functions have been\n // reset by the hot-reload-api and we need to do a proper re-render.\n if (isTrue(vnode.isStatic) &&\n isTrue(oldVnode.isStatic) &&\n vnode.key === oldVnode.key &&\n (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))\n ) {\n vnode.componentInstance = oldVnode.componentInstance;\n return\n }\n\n var i;\n var data = vnode.data;\n if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {\n i(oldVnode, vnode);\n }\n\n var oldCh = oldVnode.children;\n var ch = vnode.children;\n if (isDef(data) && isPatchable(vnode)) {\n for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }\n if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }\n }\n if (isUndef(vnode.text)) {\n if (isDef(oldCh) && isDef(ch)) {\n if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }\n } else if (isDef(ch)) {\n if (false) {\n checkDuplicateKeys(ch);\n }\n if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }\n addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n } else if (isDef(oldCh)) {\n removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n } else if (isDef(oldVnode.text)) {\n nodeOps.setTextContent(elm, '');\n }\n } else if (oldVnode.text !== vnode.text) {\n nodeOps.setTextContent(elm, vnode.text);\n }\n if (isDef(data)) {\n if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }\n }\n }\n\n function invokeInsertHook (vnode, queue, initial) {\n // delay insert hooks for component root nodes, invoke them after the\n // element is really inserted\n if (isTrue(initial) && isDef(vnode.parent)) {\n vnode.parent.data.pendingInsert = queue;\n } else {\n for (var i = 0; i < queue.length; ++i) {\n queue[i].data.hook.insert(queue[i]);\n }\n }\n }\n\n var hydrationBailed = false;\n // list of modules that can skip create hook during hydration because they\n // are already rendered on the client or has no need for initialization\n // Note: style is excluded because it relies on initial clone for future\n // deep updates (#7063).\n var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');\n\n // Note: this is a browser-only function so we can assume elms are DOM nodes.\n function hydrate (elm, vnode, insertedVnodeQueue, inVPre) {\n var i;\n var tag = vnode.tag;\n var data = vnode.data;\n var children = vnode.children;\n inVPre = inVPre || (data && data.pre);\n vnode.elm = elm;\n\n if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {\n vnode.isAsyncPlaceholder = true;\n return true\n }\n // assert node match\n if (false) {\n if (!assertNodeMatch(elm, vnode, inVPre)) {\n return false\n }\n }\n if (isDef(data)) {\n if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }\n if (isDef(i = vnode.componentInstance)) {\n // child component. it should have hydrated its own tree.\n initComponent(vnode, insertedVnodeQueue);\n return true\n }\n }\n if (isDef(tag)) {\n if (isDef(children)) {\n // empty element, allow client to pick up and populate children\n if (!elm.hasChildNodes()) {\n createChildren(vnode, children, insertedVnodeQueue);\n } else {\n // v-html and domProps: innerHTML\n if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {\n if (i !== elm.innerHTML) {\n /* istanbul ignore if */\n if (false\n ) {\n hydrationBailed = true;\n console.warn('Parent: ', elm);\n console.warn('server innerHTML: ', i);\n console.warn('client innerHTML: ', elm.innerHTML);\n }\n return false\n }\n } else {\n // iterate and compare children lists\n var childrenMatch = true;\n var childNode = elm.firstChild;\n for (var i$1 = 0; i$1 < children.length; i$1++) {\n if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {\n childrenMatch = false;\n break\n }\n childNode = childNode.nextSibling;\n }\n // if childNode is not null, it means the actual childNodes list is\n // longer than the virtual children list.\n if (!childrenMatch || childNode) {\n /* istanbul ignore if */\n if (false\n ) {\n hydrationBailed = true;\n console.warn('Parent: ', elm);\n console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n }\n return false\n }\n }\n }\n }\n if (isDef(data)) {\n var fullInvoke = false;\n for (var key in data) {\n if (!isRenderedModule(key)) {\n fullInvoke = true;\n invokeCreateHooks(vnode, insertedVnodeQueue);\n break\n }\n }\n if (!fullInvoke && data['class']) {\n // ensure collecting deps for deep class bindings for future updates\n traverse(data['class']);\n }\n }\n } else if (elm.data !== vnode.text) {\n elm.data = vnode.text;\n }\n return true\n }\n\n function assertNodeMatch (node, vnode, inVPre) {\n if (isDef(vnode.tag)) {\n return vnode.tag.indexOf('vue-component') === 0 || (\n !isUnknownElement$$1(vnode, inVPre) &&\n vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())\n )\n } else {\n return node.nodeType === (vnode.isComment ? 8 : 3)\n }\n }\n\n return function patch (oldVnode, vnode, hydrating, removeOnly) {\n if (isUndef(vnode)) {\n if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }\n return\n }\n\n var isInitialPatch = false;\n var insertedVnodeQueue = [];\n\n if (isUndef(oldVnode)) {\n // empty mount (likely as component), create new root element\n isInitialPatch = true;\n createElm(vnode, insertedVnodeQueue);\n } else {\n var isRealElement = isDef(oldVnode.nodeType);\n if (!isRealElement && sameVnode(oldVnode, vnode)) {\n // patch existing root node\n patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);\n } else {\n if (isRealElement) {\n // mounting to a real element\n // check if this is server-rendered content and if we can perform\n // a successful hydration.\n if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {\n oldVnode.removeAttribute(SSR_ATTR);\n hydrating = true;\n }\n if (isTrue(hydrating)) {\n if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n invokeInsertHook(vnode, insertedVnodeQueue, true);\n return oldVnode\n } else if (false) {\n warn(\n 'The client-side rendered virtual DOM tree is not matching ' +\n 'server-rendered content. This is likely caused by incorrect ' +\n 'HTML markup, for example nesting block-level elements inside ' +\n '<p>, or missing <tbody>. Bailing hydration and performing ' +\n 'full client-side render.'\n );\n }\n }\n // either not server-rendered, or hydration failed.\n // create an empty node and replace it\n oldVnode = emptyNodeAt(oldVnode);\n }\n\n // replacing existing element\n var oldElm = oldVnode.elm;\n var parentElm = nodeOps.parentNode(oldElm);\n\n // create new node\n createElm(\n vnode,\n insertedVnodeQueue,\n // extremely rare edge case: do not insert if old element is in a\n // leaving transition. Only happens when combining transition +\n // keep-alive + HOCs. (#4590)\n oldElm._leaveCb ? null : parentElm,\n nodeOps.nextSibling(oldElm)\n );\n\n // update parent placeholder node element, recursively\n if (isDef(vnode.parent)) {\n var ancestor = vnode.parent;\n var patchable = isPatchable(vnode);\n while (ancestor) {\n for (var i = 0; i < cbs.destroy.length; ++i) {\n cbs.destroy[i](ancestor);\n }\n ancestor.elm = vnode.elm;\n if (patchable) {\n for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n cbs.create[i$1](emptyNode, ancestor);\n }\n // #6513\n // invoke insert hooks that may have been merged by create hooks.\n // e.g. for directives that uses the \"inserted\" hook.\n var insert = ancestor.data.hook.insert;\n if (insert.merged) {\n // start at index 1 to avoid re-invoking component mounted hook\n for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {\n insert.fns[i$2]();\n }\n }\n } else {\n registerRef(ancestor);\n }\n ancestor = ancestor.parent;\n }\n }\n\n // destroy old node\n if (isDef(parentElm)) {\n removeVnodes(parentElm, [oldVnode], 0, 0);\n } else if (isDef(oldVnode.tag)) {\n invokeDestroyHook(oldVnode);\n }\n }\n }\n\n invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n return vnode.elm\n }\n}\n\n/* */\n\nvar directives = {\n create: updateDirectives,\n update: updateDirectives,\n destroy: function unbindDirectives (vnode) {\n updateDirectives(vnode, emptyNode);\n }\n};\n\nfunction updateDirectives (oldVnode, vnode) {\n if (oldVnode.data.directives || vnode.data.directives) {\n _update(oldVnode, vnode);\n }\n}\n\nfunction _update (oldVnode, vnode) {\n var isCreate = oldVnode === emptyNode;\n var isDestroy = vnode === emptyNode;\n var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\n var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\n\n var dirsWithInsert = [];\n var dirsWithPostpatch = [];\n\n var key, oldDir, dir;\n for (key in newDirs) {\n oldDir = oldDirs[key];\n dir = newDirs[key];\n if (!oldDir) {\n // new directive, bind\n callHook$1(dir, 'bind', vnode, oldVnode);\n if (dir.def && dir.def.inserted) {\n dirsWithInsert.push(dir);\n }\n } else {\n // existing directive, update\n dir.oldValue = oldDir.value;\n dir.oldArg = oldDir.arg;\n callHook$1(dir, 'update', vnode, oldVnode);\n if (dir.def && dir.def.componentUpdated) {\n dirsWithPostpatch.push(dir);\n }\n }\n }\n\n if (dirsWithInsert.length) {\n var callInsert = function () {\n for (var i = 0; i < dirsWithInsert.length; i++) {\n callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n }\n };\n if (isCreate) {\n mergeVNodeHook(vnode, 'insert', callInsert);\n } else {\n callInsert();\n }\n }\n\n if (dirsWithPostpatch.length) {\n mergeVNodeHook(vnode, 'postpatch', function () {\n for (var i = 0; i < dirsWithPostpatch.length; i++) {\n callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n }\n });\n }\n\n if (!isCreate) {\n for (key in oldDirs) {\n if (!newDirs[key]) {\n // no longer present, unbind\n callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n }\n }\n }\n}\n\nvar emptyModifiers = Object.create(null);\n\nfunction normalizeDirectives$1 (\n dirs,\n vm\n) {\n var res = Object.create(null);\n if (!dirs) {\n // $flow-disable-line\n return res\n }\n var i, dir;\n for (i = 0; i < dirs.length; i++) {\n dir = dirs[i];\n if (!dir.modifiers) {\n // $flow-disable-line\n dir.modifiers = emptyModifiers;\n }\n res[getRawDirName(dir)] = dir;\n dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\n }\n // $flow-disable-line\n return res\n}\n\nfunction getRawDirName (dir) {\n return dir.rawName || ((dir.name) + \".\" + (Object.keys(dir.modifiers || {}).join('.')))\n}\n\nfunction callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {\n var fn = dir.def && dir.def[hook];\n if (fn) {\n try {\n fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n } catch (e) {\n handleError(e, vnode.context, (\"directive \" + (dir.name) + \" \" + hook + \" hook\"));\n }\n }\n}\n\nvar baseModules = [\n ref,\n directives\n];\n\n/* */\n\nfunction updateAttrs (oldVnode, vnode) {\n var opts = vnode.componentOptions;\n if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n return\n }\n if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n return\n }\n var key, cur, old;\n var elm = vnode.elm;\n var oldAttrs = oldVnode.data.attrs || {};\n var attrs = vnode.data.attrs || {};\n // clone observed objects, as the user probably wants to mutate it\n if (isDef(attrs.__ob__)) {\n attrs = vnode.data.attrs = extend({}, attrs);\n }\n\n for (key in attrs) {\n cur = attrs[key];\n old = oldAttrs[key];\n if (old !== cur) {\n setAttr(elm, key, cur);\n }\n }\n // #4391: in IE9, setting type can reset value for input[type=radio]\n // #6666: IE/Edge forces progress value down to 1 before setting a max\n /* istanbul ignore if */\n if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n setAttr(elm, 'value', attrs.value);\n }\n for (key in oldAttrs) {\n if (isUndef(attrs[key])) {\n if (isXlink(key)) {\n elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n } else if (!isEnumeratedAttr(key)) {\n elm.removeAttribute(key);\n }\n }\n }\n}\n\nfunction setAttr (el, key, value) {\n if (el.tagName.indexOf('-') > -1) {\n baseSetAttr(el, key, value);\n } else if (isBooleanAttr(key)) {\n // set attribute for blank value\n // e.g. <option disabled>Select one</option>\n if (isFalsyAttrValue(value)) {\n el.removeAttribute(key);\n } else {\n // technically allowfullscreen is a boolean attribute for <iframe>,\n // but Flash expects a value of \"true\" when used on <embed> tag\n value = key === 'allowfullscreen' && el.tagName === 'EMBED'\n ? 'true'\n : key;\n el.setAttribute(key, value);\n }\n } else if (isEnumeratedAttr(key)) {\n el.setAttribute(key, convertEnumeratedValue(key, value));\n } else if (isXlink(key)) {\n if (isFalsyAttrValue(value)) {\n el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n } else {\n el.setAttributeNS(xlinkNS, key, value);\n }\n } else {\n baseSetAttr(el, key, value);\n }\n}\n\nfunction baseSetAttr (el, key, value) {\n if (isFalsyAttrValue(value)) {\n el.removeAttribute(key);\n } else {\n // #7138: IE10 & 11 fires input event when setting placeholder on\n // <textarea>... block the first input event and remove the blocker\n // immediately.\n /* istanbul ignore if */\n if (\n isIE && !isIE9 &&\n el.tagName === 'TEXTAREA' &&\n key === 'placeholder' && value !== '' && !el.__ieph\n ) {\n var blocker = function (e) {\n e.stopImmediatePropagation();\n el.removeEventListener('input', blocker);\n };\n el.addEventListener('input', blocker);\n // $flow-disable-line\n el.__ieph = true; /* IE placeholder patched */\n }\n el.setAttribute(key, value);\n }\n}\n\nvar attrs = {\n create: updateAttrs,\n update: updateAttrs\n};\n\n/* */\n\nfunction updateClass (oldVnode, vnode) {\n var el = vnode.elm;\n var data = vnode.data;\n var oldData = oldVnode.data;\n if (\n isUndef(data.staticClass) &&\n isUndef(data.class) && (\n isUndef(oldData) || (\n isUndef(oldData.staticClass) &&\n isUndef(oldData.class)\n )\n )\n ) {\n return\n }\n\n var cls = genClassForVnode(vnode);\n\n // handle transition classes\n var transitionClass = el._transitionClasses;\n if (isDef(transitionClass)) {\n cls = concat(cls, stringifyClass(transitionClass));\n }\n\n // set the class\n if (cls !== el._prevClass) {\n el.setAttribute('class', cls);\n el._prevClass = cls;\n }\n}\n\nvar klass = {\n create: updateClass,\n update: updateClass\n};\n\n/* */\n\n/* */\n\n/* */\n\n/* */\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\n\n/* */\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents (on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}\n\nvar target$1;\n\nfunction createOnceHandler$1 (event, handler, capture) {\n var _target = target$1; // save current target element in closure\n return function onceHandler () {\n var res = handler.apply(null, arguments);\n if (res !== null) {\n remove$2(event, onceHandler, capture, _target);\n }\n }\n}\n\n// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp\n// implementation and does not fire microtasks in between event propagation, so\n// safe to exclude.\nvar useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);\n\nfunction add$1 (\n name,\n handler,\n capture,\n passive\n) {\n // async edge case #6566: inner click event triggers patch, event handler\n // attached to outer element during patch, and triggered again. This\n // happens because browsers fire microtask ticks between event propagation.\n // the solution is simple: we save the timestamp when a handler is attached,\n // and the handler would only fire if the event passed to it was fired\n // AFTER it was attached.\n if (useMicrotaskFix) {\n var attachedTimestamp = currentFlushTimestamp;\n var original = handler;\n handler = original._wrapper = function (e) {\n if (\n // no bubbling, should always fire.\n // this is just a safety net in case event.timeStamp is unreliable in\n // certain weird environments...\n e.target === e.currentTarget ||\n // event is fired after handler attachment\n e.timeStamp >= attachedTimestamp ||\n // bail for environments that have buggy event.timeStamp implementations\n // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState\n // #9681 QtWebEngine event.timeStamp is negative value\n e.timeStamp <= 0 ||\n // #9448 bail if event is fired in another document in a multi-page\n // electron/nw.js app, since event.timeStamp will be using a different\n // starting reference\n e.target.ownerDocument !== document\n ) {\n return original.apply(this, arguments)\n }\n };\n }\n target$1.addEventListener(\n name,\n handler,\n supportsPassive\n ? { capture: capture, passive: passive }\n : capture\n );\n}\n\nfunction remove$2 (\n name,\n handler,\n capture,\n _target\n) {\n (_target || target$1).removeEventListener(\n name,\n handler._wrapper || handler,\n capture\n );\n}\n\nfunction updateDOMListeners (oldVnode, vnode) {\n if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {\n return\n }\n var on = vnode.data.on || {};\n var oldOn = oldVnode.data.on || {};\n target$1 = vnode.elm;\n normalizeEvents(on);\n updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context);\n target$1 = undefined;\n}\n\nvar events = {\n create: updateDOMListeners,\n update: updateDOMListeners\n};\n\n/* */\n\nvar svgContainer;\n\nfunction updateDOMProps (oldVnode, vnode) {\n if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {\n return\n }\n var key, cur;\n var elm = vnode.elm;\n var oldProps = oldVnode.data.domProps || {};\n var props = vnode.data.domProps || {};\n // clone observed objects, as the user probably wants to mutate it\n if (isDef(props.__ob__)) {\n props = vnode.data.domProps = extend({}, props);\n }\n\n for (key in oldProps) {\n if (!(key in props)) {\n elm[key] = '';\n }\n }\n\n for (key in props) {\n cur = props[key];\n // ignore children if the node has textContent or innerHTML,\n // as these will throw away existing DOM nodes and cause removal errors\n // on subsequent patches (#3360)\n if (key === 'textContent' || key === 'innerHTML') {\n if (vnode.children) { vnode.children.length = 0; }\n if (cur === oldProps[key]) { continue }\n // #6601 work around Chrome version <= 55 bug where single textNode\n // replaced by innerHTML/textContent retains its parentNode property\n if (elm.childNodes.length === 1) {\n elm.removeChild(elm.childNodes[0]);\n }\n }\n\n if (key === 'value' && elm.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified\n elm._value = cur;\n // avoid resetting cursor position when value is the same\n var strCur = isUndef(cur) ? '' : String(cur);\n if (shouldUpdateValue(elm, strCur)) {\n elm.value = strCur;\n }\n } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) {\n // IE doesn't support innerHTML for SVG elements\n svgContainer = svgContainer || document.createElement('div');\n svgContainer.innerHTML = \"<svg>\" + cur + \"</svg>\";\n var svg = svgContainer.firstChild;\n while (elm.firstChild) {\n elm.removeChild(elm.firstChild);\n }\n while (svg.firstChild) {\n elm.appendChild(svg.firstChild);\n }\n } else if (\n // skip the update if old and new VDOM state is the same.\n // `value` is handled separately because the DOM value may be temporarily\n // out of sync with VDOM state due to focus, composition and modifiers.\n // This #4521 by skipping the unnecesarry `checked` update.\n cur !== oldProps[key]\n ) {\n // some property updates can throw\n // e.g. `value` on <progress> w/ non-finite value\n try {\n elm[key] = cur;\n } catch (e) {}\n }\n }\n}\n\n// check platforms/web/util/attrs.js acceptValue\n\n\nfunction shouldUpdateValue (elm, checkVal) {\n return (!elm.composing && (\n elm.tagName === 'OPTION' ||\n isNotInFocusAndDirty(elm, checkVal) ||\n isDirtyWithModifiers(elm, checkVal)\n ))\n}\n\nfunction isNotInFocusAndDirty (elm, checkVal) {\n // return true when textbox (.number and .trim) loses focus and its value is\n // not equal to the updated value\n var notInFocus = true;\n // #6157\n // work around IE bug when accessing document.activeElement in an iframe\n try { notInFocus = document.activeElement !== elm; } catch (e) {}\n return notInFocus && elm.value !== checkVal\n}\n\nfunction isDirtyWithModifiers (elm, newVal) {\n var value = elm.value;\n var modifiers = elm._vModifiers; // injected by v-model runtime\n if (isDef(modifiers)) {\n if (modifiers.number) {\n return toNumber(value) !== toNumber(newVal)\n }\n if (modifiers.trim) {\n return value.trim() !== newVal.trim()\n }\n }\n return value !== newVal\n}\n\nvar domProps = {\n create: updateDOMProps,\n update: updateDOMProps\n};\n\n/* */\n\nvar parseStyleText = cached(function (cssText) {\n var res = {};\n var listDelimiter = /;(?![^(]*\\))/g;\n var propertyDelimiter = /:(.+)/;\n cssText.split(listDelimiter).forEach(function (item) {\n if (item) {\n var tmp = item.split(propertyDelimiter);\n tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return res\n});\n\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData (data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle\n ? extend(data.staticStyle, style)\n : style\n}\n\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding (bindingStyle) {\n if (Array.isArray(bindingStyle)) {\n return toObject(bindingStyle)\n }\n if (typeof bindingStyle === 'string') {\n return parseStyleText(bindingStyle)\n }\n return bindingStyle\n}\n\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (\n childNode && childNode.data &&\n (styleData = normalizeStyleData(childNode.data))\n ) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n}\n\n/* */\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n /* istanbul ignore if */\n if (cssVarRE.test(name)) {\n el.style.setProperty(name, val);\n } else if (importantRE.test(val)) {\n el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');\n } else {\n var normalizedName = normalize(name);\n if (Array.isArray(val)) {\n // Support values array created by autoprefixer, e.g.\n // {display: [\"-webkit-box\", \"-ms-flexbox\", \"flex\"]}\n // Set them one by one, and the browser will only set those it can recognize\n for (var i = 0, len = val.length; i < len; i++) {\n el.style[normalizedName] = val[i];\n }\n } else {\n el.style[normalizedName] = val;\n }\n }\n};\n\nvar vendorNames = ['Webkit', 'Moz', 'ms'];\n\nvar emptyStyle;\nvar normalize = cached(function (prop) {\n emptyStyle = emptyStyle || document.createElement('div').style;\n prop = camelize(prop);\n if (prop !== 'filter' && (prop in emptyStyle)) {\n return prop\n }\n var capName = prop.charAt(0).toUpperCase() + prop.slice(1);\n for (var i = 0; i < vendorNames.length; i++) {\n var name = vendorNames[i] + capName;\n if (name in emptyStyle) {\n return name\n }\n }\n});\n\nfunction updateStyle (oldVnode, vnode) {\n var data = vnode.data;\n var oldData = oldVnode.data;\n\n if (isUndef(data.staticStyle) && isUndef(data.style) &&\n isUndef(oldData.staticStyle) && isUndef(oldData.style)\n ) {\n return\n }\n\n var cur, name;\n var el = vnode.elm;\n var oldStaticStyle = oldData.staticStyle;\n var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};\n\n // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n var oldStyle = oldStaticStyle || oldStyleBinding;\n\n var style = normalizeStyleBinding(vnode.data.style) || {};\n\n // store normalized style under a different key for next diff\n // make sure to clone it if it's reactive, since the user likely wants\n // to mutate it.\n vnode.data.normalizedStyle = isDef(style.__ob__)\n ? extend({}, style)\n : style;\n\n var newStyle = getStyle(vnode, true);\n\n for (name in oldStyle) {\n if (isUndef(newStyle[name])) {\n setProp(el, name, '');\n }\n }\n for (name in newStyle) {\n cur = newStyle[name];\n if (cur !== oldStyle[name]) {\n // ie9 setting to null has no effect, must use empty string\n setProp(el, name, cur == null ? '' : cur);\n }\n }\n}\n\nvar style = {\n create: updateStyle,\n update: updateStyle\n};\n\n/* */\n\nvar whitespaceRE = /\\s+/;\n\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass (el, cls) {\n /* istanbul ignore if */\n if (!cls || !(cls = cls.trim())) {\n return\n }\n\n /* istanbul ignore else */\n if (el.classList) {\n if (cls.indexOf(' ') > -1) {\n cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); });\n } else {\n el.classList.add(cls);\n }\n } else {\n var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n if (cur.indexOf(' ' + cls + ' ') < 0) {\n el.setAttribute('class', (cur + cls).trim());\n }\n }\n}\n\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass (el, cls) {\n /* istanbul ignore if */\n if (!cls || !(cls = cls.trim())) {\n return\n }\n\n /* istanbul ignore else */\n if (el.classList) {\n if (cls.indexOf(' ') > -1) {\n cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); });\n } else {\n el.classList.remove(cls);\n }\n if (!el.classList.length) {\n el.removeAttribute('class');\n }\n } else {\n var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n var tar = ' ' + cls + ' ';\n while (cur.indexOf(tar) >= 0) {\n cur = cur.replace(tar, ' ');\n }\n cur = cur.trim();\n if (cur) {\n el.setAttribute('class', cur);\n } else {\n el.removeAttribute('class');\n }\n }\n}\n\n/* */\n\nfunction resolveTransition (def$$1) {\n if (!def$$1) {\n return\n }\n /* istanbul ignore else */\n if (typeof def$$1 === 'object') {\n var res = {};\n if (def$$1.css !== false) {\n extend(res, autoCssTransition(def$$1.name || 'v'));\n }\n extend(res, def$$1);\n return res\n } else if (typeof def$$1 === 'string') {\n return autoCssTransition(def$$1)\n }\n}\n\nvar autoCssTransition = cached(function (name) {\n return {\n enterClass: (name + \"-enter\"),\n enterToClass: (name + \"-enter-to\"),\n enterActiveClass: (name + \"-enter-active\"),\n leaveClass: (name + \"-leave\"),\n leaveToClass: (name + \"-leave-to\"),\n leaveActiveClass: (name + \"-leave-active\")\n }\n});\n\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n /* istanbul ignore if */\n if (window.ontransitionend === undefined &&\n window.onwebkittransitionend !== undefined\n ) {\n transitionProp = 'WebkitTransition';\n transitionEndEvent = 'webkitTransitionEnd';\n }\n if (window.onanimationend === undefined &&\n window.onwebkitanimationend !== undefined\n ) {\n animationProp = 'WebkitAnimation';\n animationEndEvent = 'webkitAnimationEnd';\n }\n}\n\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser\n ? window.requestAnimationFrame\n ? window.requestAnimationFrame.bind(window)\n : setTimeout\n : /* istanbul ignore next */ function (fn) { return fn(); };\n\nfunction nextFrame (fn) {\n raf(function () {\n raf(fn);\n });\n}\n\nfunction addTransitionClass (el, cls) {\n var transitionClasses = el._transitionClasses || (el._transitionClasses = []);\n if (transitionClasses.indexOf(cls) < 0) {\n transitionClasses.push(cls);\n addClass(el, cls);\n }\n}\n\nfunction removeTransitionClass (el, cls) {\n if (el._transitionClasses) {\n remove(el._transitionClasses, cls);\n }\n removeClass(el, cls);\n}\n\nfunction whenTransitionEnds (\n el,\n expectedType,\n cb\n) {\n var ref = getTransitionInfo(el, expectedType);\n var type = ref.type;\n var timeout = ref.timeout;\n var propCount = ref.propCount;\n if (!type) { return cb() }\n var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n var ended = 0;\n var end = function () {\n el.removeEventListener(event, onEnd);\n cb();\n };\n var onEnd = function (e) {\n if (e.target === el) {\n if (++ended >= propCount) {\n end();\n }\n }\n };\n setTimeout(function () {\n if (ended < propCount) {\n end();\n }\n }, timeout + 1);\n el.addEventListener(event, onEnd);\n}\n\nvar transformRE = /\\b(transform|all)(,|$)/;\n\nfunction getTransitionInfo (el, expectedType) {\n var styles = window.getComputedStyle(el);\n // JSDOM may return undefined for transition properties\n var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');\n var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');\n var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');\n var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');\n var animationTimeout = getTimeout(animationDelays, animationDurations);\n\n var type;\n var timeout = 0;\n var propCount = 0;\n /* istanbul ignore if */\n if (expectedType === TRANSITION) {\n if (transitionTimeout > 0) {\n type = TRANSITION;\n timeout = transitionTimeout;\n propCount = transitionDurations.length;\n }\n } else if (expectedType === ANIMATION) {\n if (animationTimeout > 0) {\n type = ANIMATION;\n timeout = animationTimeout;\n propCount = animationDurations.length;\n }\n } else {\n timeout = Math.max(transitionTimeout, animationTimeout);\n type = timeout > 0\n ? transitionTimeout > animationTimeout\n ? TRANSITION\n : ANIMATION\n : null;\n propCount = type\n ? type === TRANSITION\n ? transitionDurations.length\n : animationDurations.length\n : 0;\n }\n var hasTransform =\n type === TRANSITION &&\n transformRE.test(styles[transitionProp + 'Property']);\n return {\n type: type,\n timeout: timeout,\n propCount: propCount,\n hasTransform: hasTransform\n }\n}\n\nfunction getTimeout (delays, durations) {\n /* istanbul ignore next */\n while (delays.length < durations.length) {\n delays = delays.concat(delays);\n }\n\n return Math.max.apply(null, durations.map(function (d, i) {\n return toMs(d) + toMs(delays[i])\n }))\n}\n\n// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers\n// in a locale-dependent way, using a comma instead of a dot.\n// If comma is not replaced with a dot, the input will be rounded down (i.e. acting\n// as a floor function) causing unexpected behaviors\nfunction toMs (s) {\n return Number(s.slice(0, -1).replace(',', '.')) * 1000\n}\n\n/* */\n\nfunction enter (vnode, toggleDisplay) {\n var el = vnode.elm;\n\n // call leave callback now\n if (isDef(el._leaveCb)) {\n el._leaveCb.cancelled = true;\n el._leaveCb();\n }\n\n var data = resolveTransition(vnode.data.transition);\n if (isUndef(data)) {\n return\n }\n\n /* istanbul ignore if */\n if (isDef(el._enterCb) || el.nodeType !== 1) {\n return\n }\n\n var css = data.css;\n var type = data.type;\n var enterClass = data.enterClass;\n var enterToClass = data.enterToClass;\n var enterActiveClass = data.enterActiveClass;\n var appearClass = data.appearClass;\n var appearToClass = data.appearToClass;\n var appearActiveClass = data.appearActiveClass;\n var beforeEnter = data.beforeEnter;\n var enter = data.enter;\n var afterEnter = data.afterEnter;\n var enterCancelled = data.enterCancelled;\n var beforeAppear = data.beforeAppear;\n var appear = data.appear;\n var afterAppear = data.afterAppear;\n var appearCancelled = data.appearCancelled;\n var duration = data.duration;\n\n // activeInstance will always be the <transition> component managing this\n // transition. One edge case to check is when the <transition> is placed\n // as the root node of a child component. In that case we need to check\n // <transition>'s parent for appear check.\n var context = activeInstance;\n var transitionNode = activeInstance.$vnode;\n while (transitionNode && transitionNode.parent) {\n context = transitionNode.context;\n transitionNode = transitionNode.parent;\n }\n\n var isAppear = !context._isMounted || !vnode.isRootInsert;\n\n if (isAppear && !appear && appear !== '') {\n return\n }\n\n var startClass = isAppear && appearClass\n ? appearClass\n : enterClass;\n var activeClass = isAppear && appearActiveClass\n ? appearActiveClass\n : enterActiveClass;\n var toClass = isAppear && appearToClass\n ? appearToClass\n : enterToClass;\n\n var beforeEnterHook = isAppear\n ? (beforeAppear || beforeEnter)\n : beforeEnter;\n var enterHook = isAppear\n ? (typeof appear === 'function' ? appear : enter)\n : enter;\n var afterEnterHook = isAppear\n ? (afterAppear || afterEnter)\n : afterEnter;\n var enterCancelledHook = isAppear\n ? (appearCancelled || enterCancelled)\n : enterCancelled;\n\n var explicitEnterDuration = toNumber(\n isObject(duration)\n ? duration.enter\n : duration\n );\n\n if (false) {\n checkDuration(explicitEnterDuration, 'enter', vnode);\n }\n\n var expectsCSS = css !== false && !isIE9;\n var userWantsControl = getHookArgumentsLength(enterHook);\n\n var cb = el._enterCb = once(function () {\n if (expectsCSS) {\n removeTransitionClass(el, toClass);\n removeTransitionClass(el, activeClass);\n }\n if (cb.cancelled) {\n if (expectsCSS) {\n removeTransitionClass(el, startClass);\n }\n enterCancelledHook && enterCancelledHook(el);\n } else {\n afterEnterHook && afterEnterHook(el);\n }\n el._enterCb = null;\n });\n\n if (!vnode.data.show) {\n // remove pending leave element on enter by injecting an insert hook\n mergeVNodeHook(vnode, 'insert', function () {\n var parent = el.parentNode;\n var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n if (pendingNode &&\n pendingNode.tag === vnode.tag &&\n pendingNode.elm._leaveCb\n ) {\n pendingNode.elm._leaveCb();\n }\n enterHook && enterHook(el, cb);\n });\n }\n\n // start enter transition\n beforeEnterHook && beforeEnterHook(el);\n if (expectsCSS) {\n addTransitionClass(el, startClass);\n addTransitionClass(el, activeClass);\n nextFrame(function () {\n removeTransitionClass(el, startClass);\n if (!cb.cancelled) {\n addTransitionClass(el, toClass);\n if (!userWantsControl) {\n if (isValidDuration(explicitEnterDuration)) {\n setTimeout(cb, explicitEnterDuration);\n } else {\n whenTransitionEnds(el, type, cb);\n }\n }\n }\n });\n }\n\n if (vnode.data.show) {\n toggleDisplay && toggleDisplay();\n enterHook && enterHook(el, cb);\n }\n\n if (!expectsCSS && !userWantsControl) {\n cb();\n }\n}\n\nfunction leave (vnode, rm) {\n var el = vnode.elm;\n\n // call enter callback now\n if (isDef(el._enterCb)) {\n el._enterCb.cancelled = true;\n el._enterCb();\n }\n\n var data = resolveTransition(vnode.data.transition);\n if (isUndef(data) || el.nodeType !== 1) {\n return rm()\n }\n\n /* istanbul ignore if */\n if (isDef(el._leaveCb)) {\n return\n }\n\n var css = data.css;\n var type = data.type;\n var leaveClass = data.leaveClass;\n var leaveToClass = data.leaveToClass;\n var leaveActiveClass = data.leaveActiveClass;\n var beforeLeave = data.beforeLeave;\n var leave = data.leave;\n var afterLeave = data.afterLeave;\n var leaveCancelled = data.leaveCancelled;\n var delayLeave = data.delayLeave;\n var duration = data.duration;\n\n var expectsCSS = css !== false && !isIE9;\n var userWantsControl = getHookArgumentsLength(leave);\n\n var explicitLeaveDuration = toNumber(\n isObject(duration)\n ? duration.leave\n : duration\n );\n\n if (false) {\n checkDuration(explicitLeaveDuration, 'leave', vnode);\n }\n\n var cb = el._leaveCb = once(function () {\n if (el.parentNode && el.parentNode._pending) {\n el.parentNode._pending[vnode.key] = null;\n }\n if (expectsCSS) {\n removeTransitionClass(el, leaveToClass);\n removeTransitionClass(el, leaveActiveClass);\n }\n if (cb.cancelled) {\n if (expectsCSS) {\n removeTransitionClass(el, leaveClass);\n }\n leaveCancelled && leaveCancelled(el);\n } else {\n rm();\n afterLeave && afterLeave(el);\n }\n el._leaveCb = null;\n });\n\n if (delayLeave) {\n delayLeave(performLeave);\n } else {\n performLeave();\n }\n\n function performLeave () {\n // the delayed leave may have already been cancelled\n if (cb.cancelled) {\n return\n }\n // record leaving element\n if (!vnode.data.show && el.parentNode) {\n (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;\n }\n beforeLeave && beforeLeave(el);\n if (expectsCSS) {\n addTransitionClass(el, leaveClass);\n addTransitionClass(el, leaveActiveClass);\n nextFrame(function () {\n removeTransitionClass(el, leaveClass);\n if (!cb.cancelled) {\n addTransitionClass(el, leaveToClass);\n if (!userWantsControl) {\n if (isValidDuration(explicitLeaveDuration)) {\n setTimeout(cb, explicitLeaveDuration);\n } else {\n whenTransitionEnds(el, type, cb);\n }\n }\n }\n });\n }\n leave && leave(el, cb);\n if (!expectsCSS && !userWantsControl) {\n cb();\n }\n }\n}\n\n// only used in dev mode\nfunction checkDuration (val, name, vnode) {\n if (typeof val !== 'number') {\n warn(\n \"<transition> explicit \" + name + \" duration is not a valid number - \" +\n \"got \" + (JSON.stringify(val)) + \".\",\n vnode.context\n );\n } else if (isNaN(val)) {\n warn(\n \"<transition> explicit \" + name + \" duration is NaN - \" +\n 'the duration expression might be incorrect.',\n vnode.context\n );\n }\n}\n\nfunction isValidDuration (val) {\n return typeof val === 'number' && !isNaN(val)\n}\n\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength (fn) {\n if (isUndef(fn)) {\n return false\n }\n var invokerFns = fn.fns;\n if (isDef(invokerFns)) {\n // invoker\n return getHookArgumentsLength(\n Array.isArray(invokerFns)\n ? invokerFns[0]\n : invokerFns\n )\n } else {\n return (fn._length || fn.length) > 1\n }\n}\n\nfunction _enter (_, vnode) {\n if (vnode.data.show !== true) {\n enter(vnode);\n }\n}\n\nvar transition = inBrowser ? {\n create: _enter,\n activate: _enter,\n remove: function remove$$1 (vnode, rm) {\n /* istanbul ignore else */\n if (vnode.data.show !== true) {\n leave(vnode, rm);\n } else {\n rm();\n }\n }\n} : {};\n\nvar platformModules = [\n attrs,\n klass,\n events,\n domProps,\n style,\n transition\n];\n\n/* */\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules = platformModules.concat(baseModules);\n\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n\n/* istanbul ignore if */\nif (isIE9) {\n // http://www.matts411.com/post/internet-explorer-9-oninput/\n document.addEventListener('selectionchange', function () {\n var el = document.activeElement;\n if (el && el.vmodel) {\n trigger(el, 'input');\n }\n });\n}\n\nvar directive = {\n inserted: function inserted (el, binding, vnode, oldVnode) {\n if (vnode.tag === 'select') {\n // #6903\n if (oldVnode.elm && !oldVnode.elm._vOptions) {\n mergeVNodeHook(vnode, 'postpatch', function () {\n directive.componentUpdated(el, binding, vnode);\n });\n } else {\n setSelected(el, binding, vnode.context);\n }\n el._vOptions = [].map.call(el.options, getValue);\n } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {\n el._vModifiers = binding.modifiers;\n if (!binding.modifiers.lazy) {\n el.addEventListener('compositionstart', onCompositionStart);\n el.addEventListener('compositionend', onCompositionEnd);\n // Safari < 10.2 & UIWebView doesn't fire compositionend when\n // switching focus before confirming composition choice\n // this also fixes the issue where some browsers e.g. iOS Chrome\n // fires \"change\" instead of \"input\" on autocomplete.\n el.addEventListener('change', onCompositionEnd);\n /* istanbul ignore if */\n if (isIE9) {\n el.vmodel = true;\n }\n }\n }\n },\n\n componentUpdated: function componentUpdated (el, binding, vnode) {\n if (vnode.tag === 'select') {\n setSelected(el, binding, vnode.context);\n // in case the options rendered by v-for have changed,\n // it's possible that the value is out-of-sync with the rendered options.\n // detect such cases and filter out values that no longer has a matching\n // option in the DOM.\n var prevOptions = el._vOptions;\n var curOptions = el._vOptions = [].map.call(el.options, getValue);\n if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {\n // trigger change event if\n // no matching option found for at least one value\n var needReset = el.multiple\n ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })\n : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);\n if (needReset) {\n trigger(el, 'change');\n }\n }\n }\n }\n};\n\nfunction setSelected (el, binding, vm) {\n actuallySetSelected(el, binding, vm);\n /* istanbul ignore if */\n if (isIE || isEdge) {\n setTimeout(function () {\n actuallySetSelected(el, binding, vm);\n }, 0);\n }\n}\n\nfunction actuallySetSelected (el, binding, vm) {\n var value = binding.value;\n var isMultiple = el.multiple;\n if (isMultiple && !Array.isArray(value)) {\n \"production\" !== 'production' && warn(\n \"<select multiple v-model=\\\"\" + (binding.expression) + \"\\\"> \" +\n \"expects an Array value for its binding, but got \" + (Object.prototype.toString.call(value).slice(8, -1)),\n vm\n );\n return\n }\n var selected, option;\n for (var i = 0, l = el.options.length; i < l; i++) {\n option = el.options[i];\n if (isMultiple) {\n selected = looseIndexOf(value, getValue(option)) > -1;\n if (option.selected !== selected) {\n option.selected = selected;\n }\n } else {\n if (looseEqual(getValue(option), value)) {\n if (el.selectedIndex !== i) {\n el.selectedIndex = i;\n }\n return\n }\n }\n }\n if (!isMultiple) {\n el.selectedIndex = -1;\n }\n}\n\nfunction hasNoMatchingOption (value, options) {\n return options.every(function (o) { return !looseEqual(o, value); })\n}\n\nfunction getValue (option) {\n return '_value' in option\n ? option._value\n : option.value\n}\n\nfunction onCompositionStart (e) {\n e.target.composing = true;\n}\n\nfunction onCompositionEnd (e) {\n // prevent triggering an input event for no reason\n if (!e.target.composing) { return }\n e.target.composing = false;\n trigger(e.target, 'input');\n}\n\nfunction trigger (el, type) {\n var e = document.createEvent('HTMLEvents');\n e.initEvent(type, true, true);\n el.dispatchEvent(e);\n}\n\n/* */\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}\n\nvar show = {\n bind: function bind (el, ref, vnode) {\n var value = ref.value;\n\n vnode = locateNode(vnode);\n var transition$$1 = vnode.data && vnode.data.transition;\n var originalDisplay = el.__vOriginalDisplay =\n el.style.display === 'none' ? '' : el.style.display;\n if (value && transition$$1) {\n vnode.data.show = true;\n enter(vnode, function () {\n el.style.display = originalDisplay;\n });\n } else {\n el.style.display = value ? originalDisplay : 'none';\n }\n },\n\n update: function update (el, ref, vnode) {\n var value = ref.value;\n var oldValue = ref.oldValue;\n\n /* istanbul ignore if */\n if (!value === !oldValue) { return }\n vnode = locateNode(vnode);\n var transition$$1 = vnode.data && vnode.data.transition;\n if (transition$$1) {\n vnode.data.show = true;\n if (value) {\n enter(vnode, function () {\n el.style.display = el.__vOriginalDisplay;\n });\n } else {\n leave(vnode, function () {\n el.style.display = 'none';\n });\n }\n } else {\n el.style.display = value ? el.__vOriginalDisplay : 'none';\n }\n },\n\n unbind: function unbind (\n el,\n binding,\n vnode,\n oldVnode,\n isDestroy\n ) {\n if (!isDestroy) {\n el.style.display = el.__vOriginalDisplay;\n }\n }\n};\n\nvar platformDirectives = {\n model: directive,\n show: show\n};\n\n/* */\n\nvar transitionProps = {\n name: String,\n appear: Boolean,\n css: Boolean,\n mode: String,\n type: String,\n enterClass: String,\n leaveClass: String,\n enterToClass: String,\n leaveToClass: String,\n enterActiveClass: String,\n leaveActiveClass: String,\n appearClass: String,\n appearActiveClass: String,\n appearToClass: String,\n duration: [Number, String, Object]\n};\n\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild (vnode) {\n var compOptions = vnode && vnode.componentOptions;\n if (compOptions && compOptions.Ctor.options.abstract) {\n return getRealChild(getFirstComponentChild(compOptions.children))\n } else {\n return vnode\n }\n}\n\nfunction extractTransitionData (comp) {\n var data = {};\n var options = comp.$options;\n // props\n for (var key in options.propsData) {\n data[key] = comp[key];\n }\n // events.\n // extract listeners and pass them directly to the transition methods\n var listeners = options._parentListeners;\n for (var key$1 in listeners) {\n data[camelize(key$1)] = listeners[key$1];\n }\n return data\n}\n\nfunction placeholder (h, rawChild) {\n if (/\\d-keep-alive$/.test(rawChild.tag)) {\n return h('keep-alive', {\n props: rawChild.componentOptions.propsData\n })\n }\n}\n\nfunction hasParentTransition (vnode) {\n while ((vnode = vnode.parent)) {\n if (vnode.data.transition) {\n return true\n }\n }\n}\n\nfunction isSameChild (child, oldChild) {\n return oldChild.key === child.key && oldChild.tag === child.tag\n}\n\nvar isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };\n\nvar isVShowDirective = function (d) { return d.name === 'show'; };\n\nvar Transition = {\n name: 'transition',\n props: transitionProps,\n abstract: true,\n\n render: function render (h) {\n var this$1 = this;\n\n var children = this.$slots.default;\n if (!children) {\n return\n }\n\n // filter out text nodes (possible whitespaces)\n children = children.filter(isNotTextNode);\n /* istanbul ignore if */\n if (!children.length) {\n return\n }\n\n // warn multiple elements\n if (false) {\n warn(\n '<transition> can only be used on a single element. Use ' +\n '<transition-group> for lists.',\n this.$parent\n );\n }\n\n var mode = this.mode;\n\n // warn invalid mode\n if (false\n ) {\n warn(\n 'invalid <transition> mode: ' + mode,\n this.$parent\n );\n }\n\n var rawChild = children[0];\n\n // if this is a component root node and the component's\n // parent container node also has transition, skip.\n if (hasParentTransition(this.$vnode)) {\n return rawChild\n }\n\n // apply transition data to child\n // use getRealChild() to ignore abstract components e.g. keep-alive\n var child = getRealChild(rawChild);\n /* istanbul ignore if */\n if (!child) {\n return rawChild\n }\n\n if (this._leaving) {\n return placeholder(h, rawChild)\n }\n\n // ensure a key that is unique to the vnode type and to this transition\n // component instance. This key will be used to remove pending leaving nodes\n // during entering.\n var id = \"__transition-\" + (this._uid) + \"-\";\n child.key = child.key == null\n ? child.isComment\n ? id + 'comment'\n : id + child.tag\n : isPrimitive(child.key)\n ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)\n : child.key;\n\n var data = (child.data || (child.data = {})).transition = extractTransitionData(this);\n var oldRawChild = this._vnode;\n var oldChild = getRealChild(oldRawChild);\n\n // mark v-show\n // so that the transition module can hand over the control to the directive\n if (child.data.directives && child.data.directives.some(isVShowDirective)) {\n child.data.show = true;\n }\n\n if (\n oldChild &&\n oldChild.data &&\n !isSameChild(child, oldChild) &&\n !isAsyncPlaceholder(oldChild) &&\n // #6687 component root is a comment node\n !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)\n ) {\n // replace old child transition data with fresh one\n // important for dynamic transitions!\n var oldData = oldChild.data.transition = extend({}, data);\n // handle transition mode\n if (mode === 'out-in') {\n // return placeholder node and queue update when leave finishes\n this._leaving = true;\n mergeVNodeHook(oldData, 'afterLeave', function () {\n this$1._leaving = false;\n this$1.$forceUpdate();\n });\n return placeholder(h, rawChild)\n } else if (mode === 'in-out') {\n if (isAsyncPlaceholder(child)) {\n return oldRawChild\n }\n var delayedLeave;\n var performLeave = function () { delayedLeave(); };\n mergeVNodeHook(data, 'afterEnter', performLeave);\n mergeVNodeHook(data, 'enterCancelled', performLeave);\n mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });\n }\n }\n\n return rawChild\n }\n};\n\n/* */\n\nvar props = extend({\n tag: String,\n moveClass: String\n}, transitionProps);\n\ndelete props.mode;\n\nvar TransitionGroup = {\n props: props,\n\n beforeMount: function beforeMount () {\n var this$1 = this;\n\n var update = this._update;\n this._update = function (vnode, hydrating) {\n var restoreActiveInstance = setActiveInstance(this$1);\n // force removing pass\n this$1.__patch__(\n this$1._vnode,\n this$1.kept,\n false, // hydrating\n true // removeOnly (!important, avoids unnecessary moves)\n );\n this$1._vnode = this$1.kept;\n restoreActiveInstance();\n update.call(this$1, vnode, hydrating);\n };\n },\n\n render: function render (h) {\n var tag = this.tag || this.$vnode.data.tag || 'span';\n var map = Object.create(null);\n var prevChildren = this.prevChildren = this.children;\n var rawChildren = this.$slots.default || [];\n var children = this.children = [];\n var transitionData = extractTransitionData(this);\n\n for (var i = 0; i < rawChildren.length; i++) {\n var c = rawChildren[i];\n if (c.tag) {\n if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n children.push(c);\n map[c.key] = c\n ;(c.data || (c.data = {})).transition = transitionData;\n } else if (false) {\n var opts = c.componentOptions;\n var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;\n warn((\"<transition-group> children must be keyed: <\" + name + \">\"));\n }\n }\n }\n\n if (prevChildren) {\n var kept = [];\n var removed = [];\n for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {\n var c$1 = prevChildren[i$1];\n c$1.data.transition = transitionData;\n c$1.data.pos = c$1.elm.getBoundingClientRect();\n if (map[c$1.key]) {\n kept.push(c$1);\n } else {\n removed.push(c$1);\n }\n }\n this.kept = h(tag, null, kept);\n this.removed = removed;\n }\n\n return h(tag, null, children)\n },\n\n updated: function updated () {\n var children = this.prevChildren;\n var moveClass = this.moveClass || ((this.name || 'v') + '-move');\n if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n return\n }\n\n // we divide the work into three loops to avoid mixing DOM reads and writes\n // in each iteration - which helps prevent layout thrashing.\n children.forEach(callPendingCbs);\n children.forEach(recordPosition);\n children.forEach(applyTranslation);\n\n // force reflow to put everything in position\n // assign to this to avoid being removed in tree-shaking\n // $flow-disable-line\n this._reflow = document.body.offsetHeight;\n\n children.forEach(function (c) {\n if (c.data.moved) {\n var el = c.elm;\n var s = el.style;\n addTransitionClass(el, moveClass);\n s.transform = s.WebkitTransform = s.transitionDuration = '';\n el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {\n if (e && e.target !== el) {\n return\n }\n if (!e || /transform$/.test(e.propertyName)) {\n el.removeEventListener(transitionEndEvent, cb);\n el._moveCb = null;\n removeTransitionClass(el, moveClass);\n }\n });\n }\n });\n },\n\n methods: {\n hasMove: function hasMove (el, moveClass) {\n /* istanbul ignore if */\n if (!hasTransition) {\n return false\n }\n /* istanbul ignore if */\n if (this._hasMove) {\n return this._hasMove\n }\n // Detect whether an element with the move class applied has\n // CSS transitions. Since the element may be inside an entering\n // transition at this very moment, we make a clone of it and remove\n // all other transition classes applied to ensure only the move class\n // is applied.\n var clone = el.cloneNode();\n if (el._transitionClasses) {\n el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });\n }\n addClass(clone, moveClass);\n clone.style.display = 'none';\n this.$el.appendChild(clone);\n var info = getTransitionInfo(clone);\n this.$el.removeChild(clone);\n return (this._hasMove = info.hasTransform)\n }\n }\n};\n\nfunction callPendingCbs (c) {\n /* istanbul ignore if */\n if (c.elm._moveCb) {\n c.elm._moveCb();\n }\n /* istanbul ignore if */\n if (c.elm._enterCb) {\n c.elm._enterCb();\n }\n}\n\nfunction recordPosition (c) {\n c.data.newPos = c.elm.getBoundingClientRect();\n}\n\nfunction applyTranslation (c) {\n var oldPos = c.data.pos;\n var newPos = c.data.newPos;\n var dx = oldPos.left - newPos.left;\n var dy = oldPos.top - newPos.top;\n if (dx || dy) {\n c.data.moved = true;\n var s = c.elm.style;\n s.transform = s.WebkitTransform = \"translate(\" + dx + \"px,\" + dy + \"px)\";\n s.transitionDuration = '0s';\n }\n}\n\nvar platformComponents = {\n Transition: Transition,\n TransitionGroup: TransitionGroup\n};\n\n/* */\n\n// install platform specific utils\nVue.config.mustUseProp = mustUseProp;\nVue.config.isReservedTag = isReservedTag;\nVue.config.isReservedAttr = isReservedAttr;\nVue.config.getTagNamespace = getTagNamespace;\nVue.config.isUnknownElement = isUnknownElement;\n\n// install platform runtime directives & components\nextend(Vue.options.directives, platformDirectives);\nextend(Vue.options.components, platformComponents);\n\n// install platform patch function\nVue.prototype.__patch__ = inBrowser ? patch : noop;\n\n// public mount method\nVue.prototype.$mount = function (\n el,\n hydrating\n) {\n el = el && inBrowser ? query(el) : undefined;\n return mountComponent(this, el, hydrating)\n};\n\n// devtools global hook\n/* istanbul ignore next */\nif (inBrowser) {\n setTimeout(function () {\n if (config.devtools) {\n if (devtools) {\n devtools.emit('init', Vue);\n } else if (\n false\n ) {\n console[console.info ? 'info' : 'log'](\n 'Download the Vue Devtools extension for a better development experience:\\n' +\n 'https://github.com/vuejs/vue-devtools'\n );\n }\n }\n if (false\n ) {\n console[console.info ? 'info' : 'log'](\n \"You are running Vue in development mode.\\n\" +\n \"Make sure to turn on production mode when deploying for production.\\n\" +\n \"See more tips at https://vuejs.org/guide/deployment.html\"\n );\n }\n }, 0);\n}\n\n/* */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Vue);\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(4), __webpack_require__(17).setImmediate))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nvar g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_TreeView_vue__ = __webpack_require__(12);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_44998ed8_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_TreeView_vue__ = __webpack_require__(50);\nfunction injectStyle (ssrContext) {\n __webpack_require__(48)\n}\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_TreeView_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_44998ed8_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_TreeView_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_NavBar_vue__ = __webpack_require__(29);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_NavMenu_vue__ = __webpack_require__(33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_OptionsPage_vue__ = __webpack_require__(37);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_PassViewPage_vue__ = __webpack_require__(41);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_RenderTaskViewPage_vue__ = __webpack_require__(45);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_DocumentViewPage_vue__ = __webpack_require__(52);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_ClipScrollTreeViewPage_vue__ = __webpack_require__(56);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__components_ScreenshotPage_vue__ = __webpack_require__(60);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n name: 'app',\n components: {\n 'app-navbar': __WEBPACK_IMPORTED_MODULE_0__components_NavBar_vue__[\"a\" /* default */],\n 'app-navmenu': __WEBPACK_IMPORTED_MODULE_1__components_NavMenu_vue__[\"a\" /* default */],\n 'app-options': __WEBPACK_IMPORTED_MODULE_2__components_OptionsPage_vue__[\"a\" /* default */],\n 'app-passview': __WEBPACK_IMPORTED_MODULE_3__components_PassViewPage_vue__[\"a\" /* default */],\n 'app-rendertaskview': __WEBPACK_IMPORTED_MODULE_4__components_RenderTaskViewPage_vue__[\"a\" /* default */],\n 'app-documentview': __WEBPACK_IMPORTED_MODULE_5__components_DocumentViewPage_vue__[\"a\" /* default */],\n 'app-clipscrolltreeview': __WEBPACK_IMPORTED_MODULE_6__components_ClipScrollTreeViewPage_vue__[\"a\" /* default */],\n 'app-screenshotview': __WEBPACK_IMPORTED_MODULE_7__components_ScreenshotPage_vue__[\"a\" /* default */]\n },\n computed: {\n page: function page() {\n return this.$store.state.page;\n }\n }\n});\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n computed: {\n isConnected: function isConnected() {\n return this.$store.state.connected;\n }\n },\n methods: {\n connect: function connect() {\n this.$store.dispatch('connect');\n },\n disconnect: function disconnect() {\n this.$store.dispatch('disconnect');\n }\n }\n});\n\n/***/ }),\n/* 8 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n methods: {\n setPage: function setPage(name) {\n this.$store.commit('setPage', name);\n }\n },\n computed: {\n page: function page() {\n return this.$store.state.page;\n }\n }\n});\n\n/***/ }),\n/* 9 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n computed: {\n disabled: function disabled() {\n return !this.$store.state.connected;\n }\n },\n methods: {\n setProfiler: function setProfiler(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_profiler\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_profiler\");\n }\n },\n setTextureCacheDebugger: function setTextureCacheDebugger(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_texture_cache_debug\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_texture_cache_debug\");\n }\n },\n setRenderTargetDebugger: function setRenderTargetDebugger(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_render_target_debug\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_render_target_debug\");\n }\n },\n setAlphaRectsDebugger: function setAlphaRectsDebugger(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_alpha_rects_debug\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_alpha_rects_debug\");\n }\n },\n setGpuTimeQueries: function setGpuTimeQueries(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_gpu_time_queries\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_gpu_time_queries\");\n }\n },\n setGpuSampleQueries: function setGpuSampleQueries(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_gpu_sample_queries\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_gpu_sample_queries\");\n }\n },\n setOpaquePass: function setOpaquePass(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_opaque_pass\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_opaque_pass\");\n }\n },\n setAlphaPass: function setAlphaPass(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_alpha_pass\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_alpha_pass\");\n }\n },\n setClipMasks: function setClipMasks(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_clip_masks\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_clip_masks\");\n }\n },\n setTextPrims: function setTextPrims(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_text_prims\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_text_prims\");\n }\n },\n setGradientPrims: function setGradientPrims(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_gradient_prims\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_gradient_prims\");\n }\n }\n }\n});\n\n/***/ }),\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n methods: {\n fetch: function fetch() {\n this.$store.dispatch('sendMessage', \"fetch_passes\");\n }\n },\n computed: {\n disabled: function disabled() {\n return !this.$store.state.connected;\n },\n passes: function passes() {\n return this.$store.state.passes;\n }\n }\n});\n\n/***/ }),\n/* 11 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__TreeView_vue__ = __webpack_require__(5);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n components: {\n 'app-treeview': __WEBPACK_IMPORTED_MODULE_0__TreeView_vue__[\"a\" /* default */]\n },\n methods: {\n fetch: function fetch() {\n this.$store.dispatch('sendMessage', \"fetch_render_tasks\");\n }\n },\n computed: {\n disabled: function disabled() {\n return !this.$store.state.connected;\n },\n render_tasks: function render_tasks() {\n return this.$store.state.render_tasks;\n }\n }\n});\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n name: 'treeview',\n props: ['model'],\n data: function data() {\n return {\n open: false\n };\n },\n computed: {\n isFolder: function isFolder() {\n return this.model.children && this.model.children.length;\n }\n },\n methods: {\n toggle: function toggle() {\n if (this.isFolder) {\n this.open = !this.open;\n }\n }\n }\n});\n\n/***/ }),\n/* 13 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__TreeView_vue__ = __webpack_require__(5);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n components: {\n 'app-treeview': __WEBPACK_IMPORTED_MODULE_0__TreeView_vue__[\"a\" /* default */]\n },\n methods: {\n fetch: function fetch() {\n this.$store.dispatch('sendMessage', \"fetch_documents\");\n }\n },\n computed: {\n disabled: function disabled() {\n return !this.$store.state.connected;\n },\n documents: function documents() {\n return this.$store.state.documents;\n }\n }\n});\n\n/***/ }),\n/* 14 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__TreeView_vue__ = __webpack_require__(5);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n components: {\n 'app-treeview': __WEBPACK_IMPORTED_MODULE_0__TreeView_vue__[\"a\" /* default */]\n },\n methods: {\n fetch: function fetch() {\n this.$store.dispatch('sendMessage', \"fetch_clip_scroll_tree\");\n }\n },\n computed: {\n disabled: function disabled() {\n return !this.$store.state.connected;\n },\n clip_scroll_tree: function clip_scroll_tree() {\n return this.$store.state.clip_scroll_tree;\n }\n }\n});\n\n/***/ }),\n/* 15 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n computed: {\n disabled: function disabled() {\n return !this.$store.state.connected;\n },\n screenshot: function screenshot() {\n return this.$store.state.screenshot;\n }\n },\n methods: {\n fetch: function fetch() {\n this.$store.dispatch('sendMessage', \"fetch_screenshot\");\n }\n }\n});\n\n/***/ }),\n/* 16 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_buefy__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_buefy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_buefy__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_buefy_dist_buefy_css__ = __webpack_require__(21);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_buefy_dist_buefy_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_buefy_dist_buefy_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_vue_material_design_icons_styles_css__ = __webpack_require__(24);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_vue_material_design_icons_styles_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_vue_material_design_icons_styles_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__App_vue__ = __webpack_require__(26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__store__ = __webpack_require__(65);\n\n\n\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_0_vue__[\"default\"].use(__WEBPACK_IMPORTED_MODULE_1_buefy___default.a);\n\nnew __WEBPACK_IMPORTED_MODULE_0_vue__[\"default\"]({\n el: '#app',\n store: __WEBPACK_IMPORTED_MODULE_5__store__[\"a\" /* default */],\n render: function render(h) {\n return h(__WEBPACK_IMPORTED_MODULE_4__App_vue__[\"a\" /* default */]);\n }\n});\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(18);\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4), __webpack_require__(19)))\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*! Buefy v0.6.7 | MIT License | github.com/buefy/buefy */ \n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory(__webpack_require__(3));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"vue\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Buefy\"] = factory(require(\"vue\"));\n\telse\n\t\troot[\"Buefy\"] = factory(root[\"Vue\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_23__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 68);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\n/* globals __VUE_SSR_CONTEXT__ */\n\n// this module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = injectStyles\n }\n\n if (hook) {\n var functional = options.functional\n var existing = functional\n ? options.render\n : options.beforeCreate\n if (!functional) {\n // inject component registration as beforeCreate hook\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n } else {\n // register for functioal component in vue file\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return existing(h, context)\n }\n }\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _defineProperty = __webpack_require__(100);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (obj, key, value) {\n if (key in obj) {\n (0, _defineProperty2.default)(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return setOptions; });\nvar config = {\n defaultContainerElement: null,\n defaultIconPack: 'mdi',\n defaultDialogConfirmText: null,\n defaultDialogCancelText: null,\n defaultSnackbarDuration: 3500,\n defaultToastDuration: 2000,\n defaultTooltipType: 'is-primary',\n defaultTooltipAnimated: false,\n defaultInputAutocomplete: 'on',\n defaultDateFormatter: null,\n defaultDateParser: null,\n defaultDayNames: null,\n defaultMonthNames: null,\n defaultFirstDayOfWeek: null,\n defaultUnselectableDaysOfWeek: null,\n defaultTimeFormatter: null,\n defaultTimeParser: null,\n defaultModalScroll: null,\n defaultDatepickerMobileNative: true,\n defaultTimepickerMobileNative: true,\n defaultNoticeQueue: true,\n defaultInputHasCounter: true\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (config);\n\nvar setOptions = function setOptions(options) {\n config = options;\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(104),\n /* template */\n __webpack_require__(105),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar store = __webpack_require__(34)('wks');\nvar uid = __webpack_require__(25);\nvar Symbol = __webpack_require__(7).Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(87), __esModule: true };\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = getValueByPath;\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = indexOf;\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return isMobile; });\n/* harmony export (immutable) */ __webpack_exports__[\"e\"] = removeElement;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = escapeRegExpChars;\n/**\r\n * Get value of an object property/path even if it's nested\r\n */\nfunction getValueByPath(obj, path) {\n var value = path.split('.').reduce(function (o, i) {\n return o[i];\n }, obj);\n return value;\n}\n\n/**\r\n * Extension of indexOf method by equality function if specified\r\n */\nfunction indexOf(array, obj, fn) {\n if (!array) return -1;\n\n if (!fn || typeof fn !== 'function') return array.indexOf(obj);\n\n for (var i = 0; i < array.length; i++) {\n if (fn(array[i], obj)) {\n return i;\n }\n }\n\n return -1;\n}\n\n/**\r\n * Mobile detection\r\n * https://www.abeautifulsite.net/detecting-mobile-devices-with-javascript\r\n */\nvar isMobile = {\n Android: function Android() {\n return typeof window !== 'undefined' && window.navigator.userAgent.match(/Android/i);\n },\n BlackBerry: function BlackBerry() {\n return typeof window !== 'undefined' && window.navigator.userAgent.match(/BlackBerry/i);\n },\n iOS: function iOS() {\n return typeof window !== 'undefined' && window.navigator.userAgent.match(/iPhone|iPad|iPod/i);\n },\n Opera: function Opera() {\n return typeof window !== 'undefined' && window.navigator.userAgent.match(/Opera Mini/i);\n },\n Windows: function Windows() {\n return typeof window !== 'undefined' && window.navigator.userAgent.match(/IEMobile/i);\n },\n any: function any() {\n return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows();\n }\n};\n\nfunction removeElement(el) {\n if (typeof el.remove !== 'undefined') {\n el.remove();\n } else {\n el.parentNode.removeChild(el);\n }\n}\n\n/**\r\n * Escape regex characters\r\n * http://stackoverflow.com/a/6969486\r\n */\nfunction escapeRegExpChars(value) {\n if (!value) return value;\n\n // eslint-disable-next-line\n return value.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n}\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports) {\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\nvar core = module.exports = { version: '2.5.5' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(16);\nvar IE8_DOM_DEFINE = __webpack_require__(47);\nvar toPrimitive = __webpack_require__(29);\nvar dP = Object.defineProperty;\n\nexports.f = __webpack_require__(10) ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(20)(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\nvar hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BaseElementMixin__ = __webpack_require__(13);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n mixins: [__WEBPACK_IMPORTED_MODULE_0__BaseElementMixin__[\"a\" /* default */]],\n props: {\n size: String,\n expanded: Boolean,\n loading: Boolean,\n rounded: Boolean,\n icon: String,\n // Native options to use in HTML5 validation\n autocomplete: String,\n maxlength: [Number, String]\n },\n data: function data() {\n return {\n isValid: true,\n isFocused: false\n };\n },\n\n computed: {\n /**\r\n * Find parent Field, max 3 levels deep.\r\n */\n parentField: function parentField() {\n var parent = this.$parent;\n for (var i = 0; i < 3; i++) {\n if (parent && !parent.$data._isField) {\n parent = parent.$parent;\n }\n }\n return parent;\n },\n\n\n /**\r\n * Get the type prop from parent if it's a Field.\r\n */\n statusType: function statusType() {\n if (!this.parentField) return;\n\n return this.parentField.newType;\n },\n\n\n /**\r\n * Get the message prop from parent if it's a Field.\r\n */\n statusMessage: function statusMessage() {\n if (!this.parentField) return;\n\n return this.parentField.newMessage;\n },\n\n\n /**\r\n * Fix icon size for inputs, large was too big\r\n */\n iconSize: function iconSize() {\n switch (this.size) {\n case 'is-small':\n return this.size;\n case 'is-medium':\n return;\n case 'is-large':\n return this.newIconPack === 'mdi' ? 'is-medium' : '';\n }\n }\n },\n methods: {\n /**\r\n * Focus method that work dynamically depending on the component.\r\n */\n focus: function focus() {\n var _this = this;\n\n if (this.$data._elementRef === undefined) return;\n\n this.$nextTick(function () {\n return _this.$el.querySelector(_this.$data._elementRef).focus();\n });\n },\n onBlur: function onBlur($event) {\n this.isFocused = false;\n this.$emit('blur', $event);\n this.checkHtml5Validity();\n },\n onFocus: function onFocus($event) {\n this.isFocused = true;\n this.$emit('focus', $event);\n },\n\n\n /**\r\n * Check HTML5 validation, set isValid property.\r\n * If validation fail, send 'is-danger' type,\r\n * and error message to parent if it's a Field.\r\n */\n checkHtml5Validity: function checkHtml5Validity() {\n if (this.$refs[this.$data._elementRef] === undefined) return;\n\n var el = this.$el.querySelector(this.$data._elementRef);\n\n var type = null;\n var message = null;\n var isValid = true;\n if (!el.checkValidity()) {\n type = 'is-danger';\n message = el.validationMessage;\n isValid = false;\n }\n this.isValid = isValid;\n\n if (this.parentField) {\n // Set type only if not defined\n if (!this.parentField.type) {\n this.parentField.newType = type;\n }\n // Set message only if not defined\n if (!this.parentField.message) {\n this.parentField.newMessage = message;\n }\n }\n\n return this.isValid;\n }\n }\n});\n\n/***/ }),\n/* 13 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(2);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n props: {\n iconPack: String\n },\n data: function data() {\n return {\n newIconPack: this.iconPack || __WEBPACK_IMPORTED_MODULE_0__config__[\"a\" /* default */].defaultIconPack\n };\n }\n});\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(69), __esModule: true };\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dP = __webpack_require__(9);\nvar createDesc = __webpack_require__(21);\nmodule.exports = __webpack_require__(10) ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(19);\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = __webpack_require__(50);\nvar defined = __webpack_require__(31);\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(7);\nvar core = __webpack_require__(8);\nvar ctx = __webpack_require__(46);\nvar hide = __webpack_require__(15);\nvar has = __webpack_require__(11);\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && has(exports, key)) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports) {\n\nmodule.exports = {};\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_23__;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = __webpack_require__(49);\nvar enumBugKeys = __webpack_require__(35);\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\nvar id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\nexports.f = {}.propertyIsEnumerable;\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(103),\n /* template */\n __webpack_require__(106),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(126),\n /* template */\n __webpack_require__(127),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = __webpack_require__(19);\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports) {\n\nvar toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports) {\n\n// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports) {\n\n// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar shared = __webpack_require__(34)('keys');\nvar uid = __webpack_require__(25);\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(7);\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports) {\n\n// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports) {\n\nexports.f = Object.getOwnPropertySymbols;\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.13 ToObject(argument)\nvar defined = __webpack_require__(31);\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $at = __webpack_require__(79)(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\n__webpack_require__(54)(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports) {\n\nmodule.exports = true;\n\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar def = __webpack_require__(9).f;\nvar has = __webpack_require__(11);\nvar TAG = __webpack_require__(4)('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports.f = __webpack_require__(4);\n\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(7);\nvar core = __webpack_require__(8);\nvar LIBRARY = __webpack_require__(39);\nvar wksExt = __webpack_require__(41);\nvar defineProperty = __webpack_require__(9).f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(118),\n /* template */\n __webpack_require__(119),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(120),\n /* template */\n __webpack_require__(121),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(122),\n /* template */\n __webpack_require__(125),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// optional / simple context binding\nvar aFunction = __webpack_require__(71);\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = !__webpack_require__(10) && !__webpack_require__(20)(function () {\n return Object.defineProperty(__webpack_require__(48)('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(19);\nvar document = __webpack_require__(7).document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar has = __webpack_require__(11);\nvar toIObject = __webpack_require__(17);\nvar arrayIndexOf = __webpack_require__(73)(false);\nvar IE_PROTO = __webpack_require__(33)('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = __webpack_require__(30);\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.15 ToLength\nvar toInteger = __webpack_require__(32);\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(76),\n /* template */\n __webpack_require__(107),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _iterator = __webpack_require__(77);\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = __webpack_require__(5);\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar LIBRARY = __webpack_require__(39);\nvar $export = __webpack_require__(18);\nvar redefine = __webpack_require__(55);\nvar hide = __webpack_require__(15);\nvar Iterators = __webpack_require__(22);\nvar $iterCreate = __webpack_require__(80);\nvar setToStringTag = __webpack_require__(40);\nvar getPrototypeOf = __webpack_require__(83);\nvar ITERATOR = __webpack_require__(4)('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(15);\n\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = __webpack_require__(16);\nvar dPs = __webpack_require__(81);\nvar enumBugKeys = __webpack_require__(35);\nvar IE_PROTO = __webpack_require__(33)('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(48)('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n __webpack_require__(82).appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(84);\nvar global = __webpack_require__(7);\nvar hide = __webpack_require__(15);\nvar Iterators = __webpack_require__(22);\nvar TO_STRING_TAG = __webpack_require__(4)('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = __webpack_require__(49);\nvar hiddenKeys = __webpack_require__(35).concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(97), __esModule: true };\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar classof = __webpack_require__(99);\nvar ITERATOR = __webpack_require__(4)('iterator');\nvar Iterators = __webpack_require__(22);\nmodule.exports = __webpack_require__(8).getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(108),\n /* template */\n __webpack_require__(109),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(137),\n /* template */\n __webpack_require__(138),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 63 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__components_icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__BaseElementMixin__ = __webpack_require__(13);\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n mixins: [__WEBPACK_IMPORTED_MODULE_2__BaseElementMixin__[\"a\" /* default */]],\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon___default.a),\n props: {\n active: {\n type: Boolean,\n default: true\n },\n title: String,\n closable: {\n type: Boolean,\n default: true\n },\n type: String,\n hasIcon: Boolean,\n size: String,\n iconSize: String,\n autoClose: {\n type: Boolean,\n default: false\n },\n duration: {\n type: Number,\n default: 5000\n }\n },\n data: function data() {\n return {\n isActive: this.active\n };\n },\n\n watch: {\n active: function active(value) {\n this.isActive = value;\n },\n isActive: function isActive(value) {\n if (value) {\n this.setAutoClose();\n } else {\n if (this.timer) {\n clearTimeout(this.timer);\n }\n }\n }\n },\n computed: {\n /**\r\n * Icon name (MDI) based on type.\r\n */\n icon: function icon() {\n switch (this.type) {\n case 'is-info':\n return 'information';\n case 'is-success':\n return 'check-circle';\n case 'is-warning':\n return 'alert';\n case 'is-danger':\n return 'alert-circle';\n default:\n return null;\n }\n }\n },\n methods: {\n /**\r\n * Close the Message and emit events.\r\n */\n close: function close() {\n this.isActive = false;\n this.$emit('close');\n this.$emit('update:active', false);\n },\n\n /**\r\n * Set timer to auto close message\r\n */\n setAutoClose: function setAutoClose() {\n var _this = this;\n\n if (this.autoClose) {\n this.timer = setTimeout(function () {\n if (_this.isActive) {\n _this.close();\n }\n }, this.duration);\n }\n }\n },\n mounted: function mounted() {\n this.setAutoClose();\n }\n});\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(149),\n /* template */\n __webpack_require__(150),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 65 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helpers__ = __webpack_require__(6);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n props: {\n type: {\n type: String,\n default: 'is-dark'\n },\n message: String,\n duration: Number,\n queue: {\n type: Boolean,\n default: undefined\n },\n position: {\n type: String,\n default: 'is-top',\n validator: function validator(value) {\n return ['is-top-right', 'is-top', 'is-top-left', 'is-bottom-right', 'is-bottom', 'is-bottom-left'].indexOf(value) > -1;\n }\n },\n container: String\n },\n data: function data() {\n return {\n isActive: false,\n parentTop: null,\n parentBottom: null,\n newContainer: this.container || __WEBPACK_IMPORTED_MODULE_0__config__[\"a\" /* default */].defaultContainerElement\n };\n },\n\n computed: {\n correctParent: function correctParent() {\n switch (this.position) {\n case 'is-top-right':\n case 'is-top':\n case 'is-top-left':\n return this.parentTop;\n\n case 'is-bottom-right':\n case 'is-bottom':\n case 'is-bottom-left':\n return this.parentBottom;\n }\n },\n transition: function transition() {\n switch (this.position) {\n case 'is-top-right':\n case 'is-top':\n case 'is-top-left':\n return {\n enter: 'fadeInDown',\n leave: 'fadeOut'\n };\n case 'is-bottom-right':\n case 'is-bottom':\n case 'is-bottom-left':\n return {\n enter: 'fadeInUp',\n leave: 'fadeOut'\n };\n }\n }\n },\n methods: {\n shouldQueue: function shouldQueue() {\n var queue = this.queue !== undefined ? this.queue : __WEBPACK_IMPORTED_MODULE_0__config__[\"a\" /* default */].defaultNoticeQueue;\n\n if (!queue) return false;\n\n return this.parentTop.childElementCount > 0 || this.parentBottom.childElementCount > 0;\n },\n close: function close() {\n var _this = this;\n\n clearTimeout(this.timer);\n this.isActive = false;\n\n // Timeout for the animation complete before destroying\n setTimeout(function () {\n _this.$destroy();\n Object(__WEBPACK_IMPORTED_MODULE_1__helpers__[\"e\" /* removeElement */])(_this.$el);\n }, 150);\n },\n showNotice: function showNotice() {\n var _this2 = this;\n\n if (this.shouldQueue()) {\n // Call recursively if should queue\n setTimeout(function () {\n return _this2.showNotice();\n }, 250);\n return;\n }\n this.correctParent.insertAdjacentElement('afterbegin', this.$el);\n this.isActive = true;\n\n if (!this.indefinite) {\n this.timer = setTimeout(function () {\n return _this2.close();\n }, this.newDuration);\n }\n },\n setupContainer: function setupContainer() {\n this.parentTop = document.querySelector('.notices.is-top');\n this.parentBottom = document.querySelector('.notices.is-bottom');\n\n if (this.parentTop && this.parentBottom) return;\n\n if (!this.parentTop) {\n this.parentTop = document.createElement('div');\n this.parentTop.className = 'notices is-top';\n }\n\n if (!this.parentBottom) {\n this.parentBottom = document.createElement('div');\n this.parentBottom.className = 'notices is-bottom';\n }\n\n var container = document.querySelector(this.newContainer) || document.body;\n\n container.appendChild(this.parentTop);\n container.appendChild(this.parentBottom);\n\n if (this.newContainer) {\n this.parentTop.classList.add('has-custom-container');\n this.parentBottom.classList.add('has-custom-container');\n }\n }\n },\n beforeMount: function beforeMount() {\n this.setupContainer();\n },\n mounted: function mounted() {\n this.showNotice();\n }\n});\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(179),\n /* template */\n __webpack_require__(180),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(188),\n /* template */\n __webpack_require__(189),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 68 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\nvar components_namespaceObject = {};\n__webpack_require__.d(components_namespaceObject, \"Autocomplete\", function() { return autocomplete; });\n__webpack_require__.d(components_namespaceObject, \"Checkbox\", function() { return components_checkbox; });\n__webpack_require__.d(components_namespaceObject, \"Collapse\", function() { return collapse; });\n__webpack_require__.d(components_namespaceObject, \"Datepicker\", function() { return datepicker; });\n__webpack_require__.d(components_namespaceObject, \"Dialog\", function() { return dialog; });\n__webpack_require__.d(components_namespaceObject, \"Dropdown\", function() { return dropdown; });\n__webpack_require__.d(components_namespaceObject, \"Field\", function() { return field; });\n__webpack_require__.d(components_namespaceObject, \"Icon\", function() { return icon; });\n__webpack_require__.d(components_namespaceObject, \"Input\", function() { return input; });\n__webpack_require__.d(components_namespaceObject, \"Loading\", function() { return loading; });\n__webpack_require__.d(components_namespaceObject, \"Message\", function() { return components_message; });\n__webpack_require__.d(components_namespaceObject, \"Modal\", function() { return modal; });\n__webpack_require__.d(components_namespaceObject, \"Notification\", function() { return notification; });\n__webpack_require__.d(components_namespaceObject, \"Pagination\", function() { return pagination; });\n__webpack_require__.d(components_namespaceObject, \"Panel\", function() { return panel; });\n__webpack_require__.d(components_namespaceObject, \"Radio\", function() { return components_radio; });\n__webpack_require__.d(components_namespaceObject, \"Select\", function() { return components_select; });\n__webpack_require__.d(components_namespaceObject, \"Snackbar\", function() { return snackbar; });\n__webpack_require__.d(components_namespaceObject, \"Switch\", function() { return components_switch; });\n__webpack_require__.d(components_namespaceObject, \"Table\", function() { return table; });\n__webpack_require__.d(components_namespaceObject, \"Tabs\", function() { return tabs; });\n__webpack_require__.d(components_namespaceObject, \"Tag\", function() { return tag; });\n__webpack_require__.d(components_namespaceObject, \"Taginput\", function() { return taginput; });\n__webpack_require__.d(components_namespaceObject, \"Timepicker\", function() { return timepicker; });\n__webpack_require__.d(components_namespaceObject, \"Toast\", function() { return toast; });\n__webpack_require__.d(components_namespaceObject, \"Tooltip\", function() { return tooltip; });\n__webpack_require__.d(components_namespaceObject, \"Upload\", function() { return upload; });\n\n// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/assign.js\nvar object_assign = __webpack_require__(14);\nvar assign_default = /*#__PURE__*/__webpack_require__.n(object_assign);\n\n// EXTERNAL MODULE: ./src/scss/buefy-build.scss\nvar buefy_build = __webpack_require__(75);\nvar buefy_build_default = /*#__PURE__*/__webpack_require__.n(buefy_build);\n\n// EXTERNAL MODULE: ./src/components/autocomplete/Autocomplete.vue\nvar Autocomplete = __webpack_require__(52);\nvar Autocomplete_default = /*#__PURE__*/__webpack_require__.n(Autocomplete);\n\n// CONCATENATED MODULE: ./src/utils/plugins.js\n\nvar use = function use(plugin) {\n if (typeof window !== 'undefined' && window.Vue) {\n window.Vue.use(plugin);\n }\n};\n\nvar registerComponent = function registerComponent(Vue, component) {\n Vue.component(component.name, component);\n};\n\nvar registerComponentProgrammatic = function registerComponentProgrammatic(Vue, property, component) {\n Vue.prototype[property] = component;\n};\n// CONCATENATED MODULE: ./src/components/autocomplete/index.js\n\n\n\n\nvar Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Autocomplete_default.a);\n }\n};\n\nuse(Plugin);\n\n/* harmony default export */ var autocomplete = (Plugin);\n// EXTERNAL MODULE: ./src/components/checkbox/Checkbox.vue\nvar Checkbox = __webpack_require__(61);\nvar Checkbox_default = /*#__PURE__*/__webpack_require__.n(Checkbox);\n\n// EXTERNAL MODULE: ./src/components/checkbox/CheckboxButton.vue\nvar CheckboxButton = __webpack_require__(110);\nvar CheckboxButton_default = /*#__PURE__*/__webpack_require__.n(CheckboxButton);\n\n// CONCATENATED MODULE: ./src/components/checkbox/index.js\n\n\n\n\n\nvar checkbox_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Checkbox_default.a);\n registerComponent(Vue, CheckboxButton_default.a);\n }\n};\n\nuse(checkbox_Plugin);\n\n/* harmony default export */ var components_checkbox = (checkbox_Plugin);\n// EXTERNAL MODULE: ./src/components/collapse/Collapse.vue\nvar Collapse = __webpack_require__(113);\nvar Collapse_default = /*#__PURE__*/__webpack_require__.n(Collapse);\n\n// CONCATENATED MODULE: ./src/components/collapse/index.js\n\n\n\n\nvar collapse_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Collapse_default.a);\n }\n};\n\nuse(collapse_Plugin);\n\n/* harmony default export */ var collapse = (collapse_Plugin);\n// EXTERNAL MODULE: ./src/components/datepicker/Datepicker.vue\nvar Datepicker = __webpack_require__(116);\nvar Datepicker_default = /*#__PURE__*/__webpack_require__.n(Datepicker);\n\n// CONCATENATED MODULE: ./src/components/datepicker/index.js\n\n\n\n\nvar datepicker_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Datepicker_default.a);\n }\n};\n\nuse(datepicker_Plugin);\n\n/* harmony default export */ var datepicker = (datepicker_Plugin);\n// EXTERNAL MODULE: external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"amd\":\"vue\",\"root\":\"Vue\"}\nvar external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue__ = __webpack_require__(23);\nvar external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default = /*#__PURE__*/__webpack_require__.n(external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue__);\n\n// EXTERNAL MODULE: ./src/components/dialog/Dialog.vue\nvar Dialog = __webpack_require__(135);\nvar Dialog_default = /*#__PURE__*/__webpack_require__.n(Dialog);\n\n// CONCATENATED MODULE: ./src/components/dialog/index.js\n\n\n\n\n\n\nfunction dialog_open(propsData) {\n var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a;\n var DialogComponent = vm.extend(Dialog_default.a);\n return new DialogComponent({\n el: document.createElement('div'),\n propsData: propsData\n });\n}\n\nvar DialogProgrammatic = {\n alert: function alert(params) {\n var message = void 0;\n if (typeof params === 'string') message = params;\n var defaultParam = {\n canCancel: false,\n message: message\n };\n var propsData = assign_default()(defaultParam, params);\n return dialog_open(propsData);\n },\n confirm: function confirm(params) {\n var defaultParam = {};\n var propsData = assign_default()(defaultParam, params);\n return dialog_open(propsData);\n },\n prompt: function prompt(params) {\n var defaultParam = {\n hasInput: true,\n confirmText: 'Done'\n };\n var propsData = assign_default()(defaultParam, params);\n return dialog_open(propsData);\n }\n};\n\nvar dialog_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Dialog_default.a);\n registerComponentProgrammatic(Vue, '$dialog', DialogProgrammatic);\n }\n};\n\nuse(dialog_Plugin);\n\n/* harmony default export */ var dialog = (dialog_Plugin);\n// EXTERNAL MODULE: ./src/components/dropdown/Dropdown.vue\nvar Dropdown = __webpack_require__(43);\nvar Dropdown_default = /*#__PURE__*/__webpack_require__.n(Dropdown);\n\n// EXTERNAL MODULE: ./src/components/dropdown/DropdownItem.vue\nvar DropdownItem = __webpack_require__(44);\nvar DropdownItem_default = /*#__PURE__*/__webpack_require__.n(DropdownItem);\n\n// CONCATENATED MODULE: ./src/components/dropdown/index.js\n\n\n\n\n\nvar dropdown_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Dropdown_default.a);\n registerComponent(Vue, DropdownItem_default.a);\n }\n};\n\nuse(dropdown_Plugin);\n\n/* harmony default export */ var dropdown = (dropdown_Plugin);\n// EXTERNAL MODULE: ./src/components/field/Field.vue\nvar Field = __webpack_require__(45);\nvar Field_default = /*#__PURE__*/__webpack_require__.n(Field);\n\n// CONCATENATED MODULE: ./src/components/field/index.js\n\n\n\n\nvar field_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Field_default.a);\n }\n};\n\nuse(field_Plugin);\n\n/* harmony default export */ var field = (field_Plugin);\n// EXTERNAL MODULE: ./src/components/icon/Icon.vue\nvar Icon = __webpack_require__(3);\nvar Icon_default = /*#__PURE__*/__webpack_require__.n(Icon);\n\n// CONCATENATED MODULE: ./src/components/icon/index.js\n\n\n\n\nvar icon_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Icon_default.a);\n }\n};\n\nuse(icon_Plugin);\n\n/* harmony default export */ var icon = (icon_Plugin);\n// EXTERNAL MODULE: ./src/components/input/Input.vue\nvar Input = __webpack_require__(27);\nvar Input_default = /*#__PURE__*/__webpack_require__.n(Input);\n\n// CONCATENATED MODULE: ./src/components/input/index.js\n\n\n\n\nvar input_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Input_default.a);\n }\n};\n\nuse(input_Plugin);\n\n/* harmony default export */ var input = (input_Plugin);\n// EXTERNAL MODULE: ./src/components/loading/Loading.vue\nvar Loading = __webpack_require__(140);\nvar Loading_default = /*#__PURE__*/__webpack_require__.n(Loading);\n\n// CONCATENATED MODULE: ./src/components/loading/index.js\n\n\n\n\n\n\nvar LoadingProgrammatic = {\n open: function open(params) {\n var defaultParam = {\n programmatic: true\n };\n var propsData = assign_default()(defaultParam, params);\n\n var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a;\n var LoadingComponent = vm.extend(Loading_default.a);\n return new LoadingComponent({\n el: document.createElement('div'),\n propsData: propsData\n });\n }\n};\n\nvar loading_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Loading_default.a);\n registerComponentProgrammatic(Vue, '$loading', LoadingProgrammatic);\n }\n};\n\nuse(loading_Plugin);\n\n/* harmony default export */ var loading = (loading_Plugin);\n// EXTERNAL MODULE: ./src/components/message/Message.vue\nvar Message = __webpack_require__(143);\nvar Message_default = /*#__PURE__*/__webpack_require__.n(Message);\n\n// CONCATENATED MODULE: ./src/components/message/index.js\n\n\n\n\nvar message_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Message_default.a);\n }\n};\n\nuse(message_Plugin);\n\n/* harmony default export */ var components_message = (message_Plugin);\n// EXTERNAL MODULE: ./src/components/modal/Modal.vue\nvar Modal = __webpack_require__(62);\nvar Modal_default = /*#__PURE__*/__webpack_require__.n(Modal);\n\n// CONCATENATED MODULE: ./src/components/modal/index.js\n\n\n\n\n\n\nvar ModalProgrammatic = {\n open: function open(params) {\n var content = void 0;\n var parent = void 0;\n if (typeof params === 'string') content = params;\n\n var defaultParam = {\n programmatic: true,\n content: content\n };\n if (params.parent) {\n parent = params.parent;\n delete params.parent;\n }\n var propsData = assign_default()(defaultParam, params);\n\n var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a;\n var ModalComponent = vm.extend(Modal_default.a);\n return new ModalComponent({\n parent: parent,\n el: document.createElement('div'),\n propsData: propsData\n });\n }\n};\n\nvar modal_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Modal_default.a);\n registerComponentProgrammatic(Vue, '$modal', ModalProgrammatic);\n }\n};\n\nuse(modal_Plugin);\n\n/* harmony default export */ var modal = (modal_Plugin);\n// EXTERNAL MODULE: ./src/components/notification/Notification.vue\nvar Notification = __webpack_require__(146);\nvar Notification_default = /*#__PURE__*/__webpack_require__.n(Notification);\n\n// CONCATENATED MODULE: ./src/components/notification/index.js\n\n\n\n\nvar notification_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Notification_default.a);\n }\n};\n\nuse(notification_Plugin);\n\n/* harmony default export */ var notification = (notification_Plugin);\n// EXTERNAL MODULE: ./src/components/pagination/Pagination.vue\nvar Pagination = __webpack_require__(64);\nvar Pagination_default = /*#__PURE__*/__webpack_require__.n(Pagination);\n\n// CONCATENATED MODULE: ./src/components/pagination/index.js\n\n\n\n\nvar pagination_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Pagination_default.a);\n }\n};\n\nuse(pagination_Plugin);\n\n/* harmony default export */ var pagination = (pagination_Plugin);\n// EXTERNAL MODULE: ./src/components/panel/Panel.vue\nvar Panel = __webpack_require__(151);\nvar Panel_default = /*#__PURE__*/__webpack_require__.n(Panel);\n\n// CONCATENATED MODULE: ./src/components/panel/index.js\n\n\n\n\nvar panel_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Panel_default.a);\n }\n};\n\nuse(panel_Plugin);\n\n/* harmony default export */ var panel = (panel_Plugin);\n// EXTERNAL MODULE: ./src/components/radio/Radio.vue\nvar Radio = __webpack_require__(154);\nvar Radio_default = /*#__PURE__*/__webpack_require__.n(Radio);\n\n// EXTERNAL MODULE: ./src/components/radio/RadioButton.vue\nvar RadioButton = __webpack_require__(157);\nvar RadioButton_default = /*#__PURE__*/__webpack_require__.n(RadioButton);\n\n// CONCATENATED MODULE: ./src/components/radio/index.js\n\n\n\n\n\nvar radio_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Radio_default.a);\n registerComponent(Vue, RadioButton_default.a);\n }\n};\n\nuse(radio_Plugin);\n\n/* harmony default export */ var components_radio = (radio_Plugin);\n// EXTERNAL MODULE: ./src/components/select/Select.vue\nvar Select = __webpack_require__(28);\nvar Select_default = /*#__PURE__*/__webpack_require__.n(Select);\n\n// CONCATENATED MODULE: ./src/components/select/index.js\n\n\n\n\nvar select_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Select_default.a);\n }\n};\n\nuse(select_Plugin);\n\n/* harmony default export */ var components_select = (select_Plugin);\n// EXTERNAL MODULE: ./src/components/snackbar/Snackbar.vue\nvar Snackbar = __webpack_require__(160);\nvar Snackbar_default = /*#__PURE__*/__webpack_require__.n(Snackbar);\n\n// CONCATENATED MODULE: ./src/components/snackbar/index.js\n\n\n\n\n\n\nvar SnackbarProgrammatic = {\n open: function open(params) {\n var message = void 0;\n if (typeof params === 'string') message = params;\n\n var defaultParam = {\n type: 'is-success',\n position: 'is-bottom-right',\n message: message\n };\n var propsData = assign_default()(defaultParam, params);\n\n var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a;\n var SnackbarComponent = vm.extend(Snackbar_default.a);\n return new SnackbarComponent({\n el: document.createElement('div'),\n propsData: propsData\n });\n }\n};\n\nvar snackbar_Plugin = {\n install: function install(Vue) {\n registerComponentProgrammatic(Vue, '$snackbar', SnackbarProgrammatic);\n }\n};\n\nuse(snackbar_Plugin);\n\n/* harmony default export */ var snackbar = (snackbar_Plugin);\n// EXTERNAL MODULE: ./src/components/switch/Switch.vue\nvar Switch = __webpack_require__(163);\nvar Switch_default = /*#__PURE__*/__webpack_require__.n(Switch);\n\n// CONCATENATED MODULE: ./src/components/switch/index.js\n\n\n\n\nvar switch_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Switch_default.a);\n }\n};\n\nuse(switch_Plugin);\n\n/* harmony default export */ var components_switch = (switch_Plugin);\n// EXTERNAL MODULE: ./src/components/table/Table.vue\nvar Table = __webpack_require__(166);\nvar Table_default = /*#__PURE__*/__webpack_require__.n(Table);\n\n// EXTERNAL MODULE: ./src/components/table/TableColumn.vue\nvar TableColumn = __webpack_require__(66);\nvar TableColumn_default = /*#__PURE__*/__webpack_require__.n(TableColumn);\n\n// CONCATENATED MODULE: ./src/components/table/index.js\n\n\n\n\n\nvar table_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Table_default.a);\n registerComponent(Vue, TableColumn_default.a);\n }\n};\n\nuse(table_Plugin);\n\n/* harmony default export */ var table = (table_Plugin);\n// EXTERNAL MODULE: ./src/components/tabs/Tabs.vue\nvar Tabs = __webpack_require__(182);\nvar Tabs_default = /*#__PURE__*/__webpack_require__.n(Tabs);\n\n// EXTERNAL MODULE: ./src/components/tabs/TabItem.vue\nvar TabItem = __webpack_require__(185);\nvar TabItem_default = /*#__PURE__*/__webpack_require__.n(TabItem);\n\n// CONCATENATED MODULE: ./src/components/tabs/index.js\n\n\n\n\n\nvar tabs_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Tabs_default.a);\n registerComponent(Vue, TabItem_default.a);\n }\n};\n\nuse(tabs_Plugin);\n\n/* harmony default export */ var tabs = (tabs_Plugin);\n// EXTERNAL MODULE: ./src/components/tag/Tag.vue\nvar Tag = __webpack_require__(67);\nvar Tag_default = /*#__PURE__*/__webpack_require__.n(Tag);\n\n// EXTERNAL MODULE: ./src/components/tag/Taglist.vue\nvar Taglist = __webpack_require__(190);\nvar Taglist_default = /*#__PURE__*/__webpack_require__.n(Taglist);\n\n// CONCATENATED MODULE: ./src/components/tag/index.js\n\n\n\n\n\nvar tag_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Tag_default.a);\n registerComponent(Vue, Taglist_default.a);\n }\n};\n\nuse(tag_Plugin);\n\n/* harmony default export */ var tag = (tag_Plugin);\n// EXTERNAL MODULE: ./src/components/taginput/Taginput.vue\nvar Taginput = __webpack_require__(193);\nvar Taginput_default = /*#__PURE__*/__webpack_require__.n(Taginput);\n\n// CONCATENATED MODULE: ./src/components/taginput/index.js\n\n\n\n\nvar taginput_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Taginput_default.a);\n }\n};\n\nuse(taginput_Plugin);\n\n/* harmony default export */ var taginput = (taginput_Plugin);\n// EXTERNAL MODULE: ./src/components/timepicker/Timepicker.vue\nvar Timepicker = __webpack_require__(196);\nvar Timepicker_default = /*#__PURE__*/__webpack_require__.n(Timepicker);\n\n// CONCATENATED MODULE: ./src/components/timepicker/index.js\n\n\n\n\nvar timepicker_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Timepicker_default.a);\n }\n};\n\nuse(timepicker_Plugin);\n\n/* harmony default export */ var timepicker = (timepicker_Plugin);\n// EXTERNAL MODULE: ./src/components/toast/Toast.vue\nvar Toast = __webpack_require__(199);\nvar Toast_default = /*#__PURE__*/__webpack_require__.n(Toast);\n\n// CONCATENATED MODULE: ./src/components/toast/index.js\n\n\n\n\n\n\nvar ToastProgrammatic = {\n open: function open(params) {\n var message = void 0;\n if (typeof params === 'string') message = params;\n\n var defaultParam = { message: message };\n var propsData = assign_default()(defaultParam, params);\n\n var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a;\n var ToastComponent = vm.extend(Toast_default.a);\n return new ToastComponent({\n el: document.createElement('div'),\n propsData: propsData\n });\n }\n};\n\nvar toast_Plugin = {\n install: function install(Vue) {\n registerComponentProgrammatic(Vue, '$toast', ToastProgrammatic);\n }\n};\n\nuse(toast_Plugin);\n\n/* harmony default export */ var toast = (toast_Plugin);\n// EXTERNAL MODULE: ./src/components/tooltip/Tooltip.vue\nvar Tooltip = __webpack_require__(202);\nvar Tooltip_default = /*#__PURE__*/__webpack_require__.n(Tooltip);\n\n// CONCATENATED MODULE: ./src/components/tooltip/index.js\n\n\n\n\nvar tooltip_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Tooltip_default.a);\n }\n};\n\nuse(tooltip_Plugin);\n\n/* harmony default export */ var tooltip = (tooltip_Plugin);\n// EXTERNAL MODULE: ./src/components/upload/Upload.vue\nvar Upload = __webpack_require__(205);\nvar Upload_default = /*#__PURE__*/__webpack_require__.n(Upload);\n\n// CONCATENATED MODULE: ./src/components/upload/index.js\n\n\n\n\nvar upload_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Upload_default.a);\n }\n};\n\nuse(upload_Plugin);\n\n/* harmony default export */ var upload = (upload_Plugin);\n// CONCATENATED MODULE: ./src/components/index.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// EXTERNAL MODULE: ./src/utils/config.js\nvar config = __webpack_require__(2);\n\n// CONCATENATED MODULE: ./src/index.js\n\n\n\n\n\n\n\n\n\nvar Buefy = {\n install: function install(Vue) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Options\n Object(config[\"b\" /* setOptions */])(assign_default()(config[\"a\" /* default */], options));\n // Components\n for (var componentKey in components_namespaceObject) {\n Vue.use(components_namespaceObject[componentKey]);\n }\n }\n};\n\nuse(Buefy);\n\n/* harmony default export */ var src = __webpack_exports__[\"default\"] = (Buefy);\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(70);\nmodule.exports = __webpack_require__(8).Object.assign;\n\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.3.1 Object.assign(target, source)\nvar $export = __webpack_require__(18);\n\n$export($export.S + $export.F, 'Object', { assign: __webpack_require__(72) });\n\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = __webpack_require__(24);\nvar gOPS = __webpack_require__(36);\nvar pIE = __webpack_require__(26);\nvar toObject = __webpack_require__(37);\nvar IObject = __webpack_require__(50);\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || __webpack_require__(20)(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(17);\nvar toLength = __webpack_require__(51);\nvar toAbsoluteIndex = __webpack_require__(74);\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(32);\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 76 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__ = __webpack_require__(53);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator__ = __webpack_require__(59);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_FormElementMixin__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__input_Input__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__input_Input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__input_Input__);\n\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BAutocomplete',\n components: __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_5__input_Input___default.a.name, __WEBPACK_IMPORTED_MODULE_5__input_Input___default.a),\n mixins: [__WEBPACK_IMPORTED_MODULE_4__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: [Number, String],\n data: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n field: {\n type: String,\n default: 'value'\n },\n keepFirst: Boolean,\n clearOnSelect: Boolean,\n openOnFocus: Boolean\n },\n data: function data() {\n return {\n selected: null,\n hovered: null,\n isActive: false,\n newValue: this.value,\n isListInViewportVertically: true,\n hasFocus: false,\n _isAutocomplete: true,\n _elementRef: 'input'\n };\n },\n\n computed: {\n /**\n * White-listed items to not close when clicked.\n * Add input, dropdown and all children.\n */\n whiteList: function whiteList() {\n var whiteList = [];\n whiteList.push(this.$refs.input.$el.querySelector('input'));\n whiteList.push(this.$refs.dropdown);\n // Add all chidren from dropdown\n if (this.$refs.dropdown !== undefined) {\n var children = this.$refs.dropdown.querySelectorAll('*');\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator___default()(children), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var child = _step.value;\n\n whiteList.push(child);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n }\n\n return whiteList;\n },\n\n\n /**\n * Check if exists default slot\n */\n hasDefaultSlot: function hasDefaultSlot() {\n return !!this.$scopedSlots.default;\n },\n\n\n /**\n * Check if exists \"empty\" slot\n */\n hasEmptySlot: function hasEmptySlot() {\n return !!this.$slots.empty;\n },\n\n\n /**\n * Check if exists \"header\" slot\n */\n hasHeaderSlot: function hasHeaderSlot() {\n return !!this.$slots.header;\n }\n },\n watch: {\n /**\n * When dropdown is toggled, check the visibility to know when\n * to open upwards.\n */\n isActive: function isActive(active) {\n var _this = this;\n\n if (active) {\n this.calcDropdownInViewportVertical();\n } else {\n this.$nextTick(function () {\n return _this.setHovered(null);\n });\n // Timeout to wait for the animation to finish before recalculating\n setTimeout(function () {\n _this.calcDropdownInViewportVertical();\n }, 100);\n }\n },\n\n\n /**\n * When updating input's value\n * 1. Emit changes\n * 2. If value isn't the same as selected, set null\n * 3. Close dropdown if value is clear or else open it\n */\n newValue: function newValue(value) {\n this.$emit('input', value);\n // Check if selected is invalid\n var currentValue = this.getValue(this.selected);\n if (currentValue && currentValue !== value) {\n this.setSelected(null, false);\n }\n // Close dropdown if input is clear or else open it\n if (this.hasFocus && (!this.openOnFocus || value)) {\n this.isActive = !!value;\n }\n },\n\n\n /**\n * When v-model is changed:\n * 1. Update internal value.\n * 2. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.newValue = _value;\n !this.isValid && this.$refs.input.checkHtml5Validity();\n },\n\n\n /**\n * Select first option if \"keep-first\n */\n data: function data(value) {\n // Keep first option always pre-selected\n if (this.keepFirst) {\n this.selectFirstOption(value);\n }\n }\n },\n methods: {\n /**\n * Set which option is currently hovered.\n */\n setHovered: function setHovered(option) {\n if (option === undefined) return;\n\n this.hovered = option;\n },\n\n\n /**\n * Set which option is currently selected, update v-model,\n * update input value and close dropdown.\n */\n setSelected: function setSelected(option) {\n var _this2 = this;\n\n var closeDropdown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (option === undefined) return;\n\n this.selected = option;\n this.$emit('select', this.selected);\n if (this.selected !== null) {\n this.newValue = this.clearOnSelect ? '' : this.getValue(this.selected);\n }\n closeDropdown && this.$nextTick(function () {\n _this2.isActive = false;\n });\n },\n\n\n /**\n * Select first option\n */\n selectFirstOption: function selectFirstOption(options) {\n var _this3 = this;\n\n this.$nextTick(function () {\n if (options.length) {\n // If has visible data or open on focus, keep updating the hovered\n if (_this3.openOnFocus || _this3.newValue !== '' && _this3.hovered !== options[0]) {\n _this3.setHovered(options[0]);\n }\n } else {\n _this3.setHovered(null);\n }\n });\n },\n\n\n /**\n * Enter key listener.\n * Select the hovered option.\n */\n enterPressed: function enterPressed() {\n if (this.hovered === null) return;\n this.setSelected(this.hovered);\n },\n\n\n /**\n * Tab key listener.\n * Select hovered option if it exists, close dropdown, then allow\n * native handling to move to next tabbable element.\n */\n tabPressed: function tabPressed() {\n if (this.hovered === null) {\n this.isActive = false;\n return;\n }\n this.setSelected(this.hovered);\n },\n\n\n /**\n * Close dropdown if clicked outside.\n */\n clickedOutside: function clickedOutside(event) {\n if (this.whiteList.indexOf(event.target) < 0) this.isActive = false;\n },\n\n\n /**\n * Return display text for the input.\n * If object, get value from path, or else just the value.\n * If hightlight, find the text with regex and make bold.\n */\n getValue: function getValue(option) {\n var isHighlight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!option) return;\n\n var value = (typeof option === 'undefined' ? 'undefined' : __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default()(option)) === 'object' ? Object(__WEBPACK_IMPORTED_MODULE_3__utils_helpers__[\"b\" /* getValueByPath */])(option, this.field) : option;\n\n var escapedValue = typeof this.newValue === 'string' ? Object(__WEBPACK_IMPORTED_MODULE_3__utils_helpers__[\"a\" /* escapeRegExpChars */])(this.newValue) : this.newValue;\n var regex = new RegExp('(' + escapedValue + ')', 'gi');\n\n return isHighlight ? value.replace(regex, '<b>$1</b>') : value;\n },\n\n\n /**\n * Calculate if the dropdown is vertically visible when activated,\n * otherwise it is openened upwards.\n */\n calcDropdownInViewportVertical: function calcDropdownInViewportVertical() {\n var _this4 = this;\n\n this.$nextTick(function () {\n /**\n * this.$refs.dropdown may be undefined\n * when Autocomplete is conditional rendered\n */\n if (_this4.$refs.dropdown === undefined) return;\n\n var rect = _this4.$refs.dropdown.getBoundingClientRect();\n\n _this4.isListInViewportVertically = rect.top >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight);\n });\n },\n\n\n /**\n * Arrows keys listener.\n * If dropdown is active, set hovered option, or else just open.\n */\n keyArrows: function keyArrows(direction) {\n var sum = direction === 'down' ? 1 : -1;\n if (this.isActive) {\n var index = this.data.indexOf(this.hovered) + sum;\n index = index > this.data.length - 1 ? this.data.length : index;\n index = index < 0 ? 0 : index;\n\n this.setHovered(this.data[index]);\n\n var list = this.$refs.dropdown.querySelector('.dropdown-content');\n var element = list.querySelectorAll('.dropdown-item:not(.is-disabled)')[index];\n\n if (!element) return;\n\n var visMin = list.scrollTop;\n var visMax = list.scrollTop + list.clientHeight - element.clientHeight;\n\n if (element.offsetTop < visMin) {\n list.scrollTop = element.offsetTop;\n } else if (element.offsetTop >= visMax) {\n list.scrollTop = element.offsetTop - list.clientHeight + element.clientHeight;\n }\n } else {\n this.isActive = true;\n }\n },\n\n\n /**\n * Focus listener.\n * If value is the same as selected, select all text.\n */\n focused: function focused(event) {\n if (this.getValue(this.selected) === this.newValue) {\n this.$el.querySelector('input').select();\n }\n if (this.openOnFocus) {\n this.isActive = true;\n if (this.keepFirst) {\n this.selectFirstOption(this.data);\n }\n }\n this.hasFocus = true;\n this.$emit('focus', event);\n },\n\n\n /**\n * Blur listener.\n */\n onBlur: function onBlur(event) {\n this.hasFocus = false;\n this.$emit('blur', event);\n }\n },\n created: function created() {\n if (typeof window !== 'undefined') {\n document.addEventListener('click', this.clickedOutside);\n window.addEventListener('resize', this.calcDropdownInViewportVertical);\n }\n },\n beforeDestroy: function beforeDestroy() {\n if (typeof window !== 'undefined') {\n document.removeEventListener('click', this.clickedOutside);\n window.removeEventListener('resize', this.calcDropdownInViewportVertical);\n }\n }\n});\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(78), __esModule: true };\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(38);\n__webpack_require__(57);\nmodule.exports = __webpack_require__(41).f('iterator');\n\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(32);\nvar defined = __webpack_require__(31);\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar create = __webpack_require__(56);\nvar descriptor = __webpack_require__(21);\nvar setToStringTag = __webpack_require__(40);\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(15)(IteratorPrototype, __webpack_require__(4)('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dP = __webpack_require__(9);\nvar anObject = __webpack_require__(16);\nvar getKeys = __webpack_require__(24);\n\nmodule.exports = __webpack_require__(10) ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar document = __webpack_require__(7).document;\nmodule.exports = document && document.documentElement;\n\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = __webpack_require__(11);\nvar toObject = __webpack_require__(37);\nvar IE_PROTO = __webpack_require__(33)('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar addToUnscopables = __webpack_require__(85);\nvar step = __webpack_require__(86);\nvar Iterators = __webpack_require__(22);\nvar toIObject = __webpack_require__(17);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(54)(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports) {\n\nmodule.exports = function () { /* empty */ };\n\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(88);\n__webpack_require__(94);\n__webpack_require__(95);\n__webpack_require__(96);\nmodule.exports = __webpack_require__(8).Symbol;\n\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// ECMAScript 6 symbols shim\nvar global = __webpack_require__(7);\nvar has = __webpack_require__(11);\nvar DESCRIPTORS = __webpack_require__(10);\nvar $export = __webpack_require__(18);\nvar redefine = __webpack_require__(55);\nvar META = __webpack_require__(89).KEY;\nvar $fails = __webpack_require__(20);\nvar shared = __webpack_require__(34);\nvar setToStringTag = __webpack_require__(40);\nvar uid = __webpack_require__(25);\nvar wks = __webpack_require__(4);\nvar wksExt = __webpack_require__(41);\nvar wksDefine = __webpack_require__(42);\nvar enumKeys = __webpack_require__(90);\nvar isArray = __webpack_require__(91);\nvar anObject = __webpack_require__(16);\nvar isObject = __webpack_require__(19);\nvar toIObject = __webpack_require__(17);\nvar toPrimitive = __webpack_require__(29);\nvar createDesc = __webpack_require__(21);\nvar _create = __webpack_require__(56);\nvar gOPNExt = __webpack_require__(92);\nvar $GOPD = __webpack_require__(93);\nvar $DP = __webpack_require__(9);\nvar $keys = __webpack_require__(24);\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(58).f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(26).f = $propertyIsEnumerable;\n __webpack_require__(36).f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !__webpack_require__(39)) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(15)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar META = __webpack_require__(25)('meta');\nvar isObject = __webpack_require__(19);\nvar has = __webpack_require__(11);\nvar setDesc = __webpack_require__(9).f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !__webpack_require__(20)(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// all enumerable object keys, includes symbols\nvar getKeys = __webpack_require__(24);\nvar gOPS = __webpack_require__(36);\nvar pIE = __webpack_require__(26);\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.2.2 IsArray(argument)\nvar cof = __webpack_require__(30);\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(17);\nvar gOPN = __webpack_require__(58).f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar pIE = __webpack_require__(26);\nvar createDesc = __webpack_require__(21);\nvar toIObject = __webpack_require__(17);\nvar toPrimitive = __webpack_require__(29);\nvar has = __webpack_require__(11);\nvar IE8_DOM_DEFINE = __webpack_require__(47);\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = __webpack_require__(10) ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports) {\n\n\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(42)('asyncIterator');\n\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(42)('observable');\n\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(57);\n__webpack_require__(38);\nmodule.exports = __webpack_require__(98);\n\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(16);\nvar get = __webpack_require__(60);\nmodule.exports = __webpack_require__(8).getIterator = function (it) {\n var iterFn = get(it);\n if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');\n return anObject(iterFn.call(it));\n};\n\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = __webpack_require__(30);\nvar TAG = __webpack_require__(4)('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(101), __esModule: true };\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(102);\nvar $Object = __webpack_require__(8).Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $export = __webpack_require__(18);\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !__webpack_require__(10), 'Object', { defineProperty: __webpack_require__(9).f });\n\n\n/***/ }),\n/* 103 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__ = __webpack_require__(12);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BInput',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a),\n mixins: [__WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: [Number, String],\n type: {\n type: String,\n default: 'text'\n },\n passwordReveal: Boolean,\n hasCounter: {\n type: Boolean,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_2__utils_config__[\"a\" /* default */].defaultInputHasCounter;\n }\n }\n },\n data: function data() {\n return {\n newValue: this.value,\n newType: this.type,\n newAutocomplete: this.autocomplete || __WEBPACK_IMPORTED_MODULE_2__utils_config__[\"a\" /* default */].defaultInputAutocomplete,\n isPasswordVisible: false,\n _elementRef: this.type === 'textarea' ? 'textarea' : 'input'\n };\n },\n\n computed: {\n rootClasses: function rootClasses() {\n return [this.iconPosition, this.size, {\n 'is-expanded': this.expanded,\n 'is-loading': this.loading,\n 'is-clearfix': !this.hasMessage\n }];\n },\n inputClasses: function inputClasses() {\n return [this.statusType, this.size, { 'is-rounded': this.rounded }];\n },\n hasIconRight: function hasIconRight() {\n return this.passwordReveal || this.loading || this.statusType;\n },\n\n\n /**\n * Position of the icon or if it's both sides.\n */\n iconPosition: function iconPosition() {\n if (this.icon && this.hasIconRight) {\n return 'has-icons-left has-icons-right';\n } else if (!this.icon && this.hasIconRight) {\n return 'has-icons-right';\n } else if (this.icon) {\n return 'has-icons-left';\n }\n },\n\n\n /**\n * Icon name (MDI) based on the type.\n */\n statusTypeIcon: function statusTypeIcon() {\n switch (this.statusType) {\n case 'is-success':\n return 'check';\n case 'is-danger':\n return 'alert-circle';\n case 'is-info':\n return 'information';\n case 'is-warning':\n return 'alert';\n }\n },\n\n\n /**\n * Check if have any message prop from parent if it's a Field.\n */\n hasMessage: function hasMessage() {\n return !!this.statusMessage;\n },\n\n\n /**\n * Current password-reveal icon name.\n */\n passwordVisibleIcon: function passwordVisibleIcon() {\n return !this.isPasswordVisible ? 'eye' : 'eye-off';\n },\n\n /**\n * Get value length\n */\n valueLength: function valueLength() {\n if (typeof this.newValue === 'string') {\n return this.newValue.length;\n } else if (typeof this.newValue === 'number') {\n return this.newValue.toString().length;\n }\n return 0;\n }\n },\n watch: {\n /**\n * When v-model is changed:\n * 1. Set internal value.\n * 2. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n\n /**\n * Update user's v-model and validate again whenever\n * internal value is changed.\n */\n newValue: function newValue(value) {\n this.$emit('input', value);\n !this.isValid && this.checkHtml5Validity();\n }\n },\n methods: {\n /**\n * Toggle the visibility of a password-reveal input\n * by changing the type and focus the input right away.\n */\n togglePasswordVisibility: function togglePasswordVisibility() {\n var _this = this;\n\n this.isPasswordVisible = !this.isPasswordVisible;\n this.newType = this.isPasswordVisible ? 'text' : 'password';\n\n this.$nextTick(function () {\n _this.$refs.input.focus();\n });\n },\n\n\n /**\n * Input's 'input' event listener, 'nextTick' is used to prevent event firing\n * before ui update, helps when using masks (Cleavejs and potentially others).\n */\n onInput: function onInput(event) {\n var _this2 = this;\n\n this.$nextTick(function () {\n _this2.newValue = event.target.value;\n });\n }\n }\n});\n\n/***/ }),\n/* 104 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2);\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BIcon',\n props: {\n type: String,\n pack: String,\n icon: String,\n size: String,\n customSize: String,\n customClass: String,\n both: Boolean // This is used internally to show both MDI and FA icon\n },\n computed: {\n /**\n * Internal icon name based on the pack.\n * If pack is 'fa', gets the equivalent FA icon name of the MDI,\n * internal icons are always MDI.\n */\n newIcon: function newIcon() {\n if (!this.both) {\n if (this.newPack === 'mdi') {\n return this.newPack + '-' + this.icon;\n } else {\n return 'fa-' + this.icon;\n }\n }\n\n return this.newPack === 'mdi' ? this.newPack + '-' + this.icon : 'fa-' + this.getEquivalentIconOf(this.icon);\n },\n newPack: function newPack() {\n return this.pack || __WEBPACK_IMPORTED_MODULE_0__utils_config__[\"a\" /* default */].defaultIconPack;\n },\n newType: function newType() {\n if (!this.type) return;\n\n var splitType = this.type.split('-');\n if (!splitType.length) return;\n\n return 'has-text-' + splitType[1];\n },\n newCustomSize: function newCustomSize() {\n return this.customSize || this.customSizeByPack;\n },\n customSizeByPack: function customSizeByPack() {\n var defaultSize = this.newPack === 'mdi' ? 'mdi-24px' : 'fa-lg';\n var mediumSize = this.newPack === 'mdi' ? 'mdi-36px' : 'fa-2x';\n var largeSize = this.newPack === 'mdi' ? 'mdi-48px' : 'fa-3x';\n switch (this.size) {\n case 'is-small':\n return;\n case 'is-medium':\n return mediumSize;\n case 'is-large':\n return largeSize;\n default:\n return defaultSize;\n }\n }\n },\n methods: {\n /**\n * Equivalent FA icon name of the MDI.\n */\n getEquivalentIconOf: function getEquivalentIconOf(value) {\n switch (value) {\n case 'check':\n return 'check';\n case 'information':\n return 'info-circle';\n case 'check-circle':\n return 'check-circle';\n case 'alert':\n return 'exclamation-triangle';\n case 'alert-circle':\n return 'exclamation-circle';\n case 'arrow-up':\n return 'arrow-up';\n case 'chevron-right':\n return 'angle-right';\n case 'chevron-left':\n return 'angle-left';\n case 'chevron-down':\n return 'angle-down';\n case 'eye':\n return 'eye';\n case 'eye-off':\n return 'eye-slash';\n case 'menu-down':\n return 'caret-down';\n case 'menu-up':\n return 'caret-up';\n default:\n return value;\n }\n }\n }\n});\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('span', {\n staticClass: \"icon\",\n class: [_vm.newType, _vm.size]\n }, [_c('i', {\n class: [_vm.newPack, _vm.newIcon, _vm.newCustomSize, _vm.customClass]\n })])\n},staticRenderFns: []}\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"control\",\n class: _vm.rootClasses\n }, [(_vm.type !== 'textarea') ? _c('input', _vm._b({\n ref: \"input\",\n staticClass: \"input\",\n class: _vm.inputClasses,\n attrs: {\n \"type\": _vm.newType,\n \"autocomplete\": _vm.newAutocomplete,\n \"maxlength\": _vm.maxlength\n },\n domProps: {\n \"value\": _vm.newValue\n },\n on: {\n \"input\": _vm.onInput,\n \"blur\": _vm.onBlur,\n \"focus\": _vm.onFocus\n }\n }, 'input', _vm.$attrs, false)) : _c('textarea', _vm._b({\n ref: \"textarea\",\n staticClass: \"textarea\",\n class: _vm.inputClasses,\n attrs: {\n \"maxlength\": _vm.maxlength\n },\n domProps: {\n \"value\": _vm.newValue\n },\n on: {\n \"input\": _vm.onInput,\n \"blur\": _vm.onBlur,\n \"focus\": _vm.onFocus\n }\n }, 'textarea', _vm.$attrs, false)), _vm._v(\" \"), (_vm.icon) ? _c('b-icon', {\n staticClass: \"is-left\",\n attrs: {\n \"icon\": _vm.icon,\n \"pack\": _vm.iconPack,\n \"size\": _vm.iconSize\n }\n }) : _vm._e(), _vm._v(\" \"), (!_vm.loading && (_vm.passwordReveal || _vm.statusType)) ? _c('b-icon', {\n staticClass: \"is-right\",\n class: {\n 'is-clickable': _vm.passwordReveal\n },\n attrs: {\n \"icon\": _vm.passwordReveal ? _vm.passwordVisibleIcon : _vm.statusTypeIcon,\n \"pack\": _vm.iconPack,\n \"size\": _vm.iconSize,\n \"type\": !_vm.passwordReveal ? _vm.statusType : 'is-primary',\n \"both\": \"\"\n },\n nativeOn: {\n \"click\": function($event) {\n _vm.togglePasswordVisibility($event)\n }\n }\n }) : _vm._e(), _vm._v(\" \"), (_vm.maxlength && _vm.hasCounter && _vm.type !== 'number') ? _c('small', {\n staticClass: \"help counter\",\n class: {\n 'is-invisible': !_vm.isFocused\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.valueLength) + \" / \" + _vm._s(_vm.maxlength) + \"\\n \")]) : _vm._e()], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"autocomplete control\",\n class: {\n 'is-expanded': _vm.expanded\n }\n }, [_c('b-input', _vm._b({\n ref: \"input\",\n attrs: {\n \"size\": _vm.size,\n \"loading\": _vm.loading,\n \"rounded\": _vm.rounded,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"maxlength\": _vm.maxlength,\n \"autocomplete\": \"off\"\n },\n on: {\n \"focus\": _vm.focused,\n \"blur\": _vm.onBlur\n },\n nativeOn: {\n \"keyup\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"esc\", 27, $event.key)) { return null; }\n $event.preventDefault();\n _vm.isActive = false\n },\n \"keydown\": [function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"tab\", 9, $event.key)) { return null; }\n _vm.tabPressed($event)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n $event.preventDefault();\n _vm.enterPressed($event)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"up\", 38, $event.key)) { return null; }\n $event.preventDefault();\n _vm.keyArrows('up')\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"down\", 40, $event.key)) { return null; }\n $event.preventDefault();\n _vm.keyArrows('down')\n }]\n },\n model: {\n value: (_vm.newValue),\n callback: function($$v) {\n _vm.newValue = $$v\n },\n expression: \"newValue\"\n }\n }, 'b-input', _vm.$attrs, false)), _vm._v(\" \"), _c('transition', {\n attrs: {\n \"name\": \"fade\"\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isActive && (_vm.data.length > 0 || _vm.hasEmptySlot || _vm.hasHeaderSlot)),\n expression: \"isActive && (data.length > 0 || hasEmptySlot || hasHeaderSlot)\"\n }],\n ref: \"dropdown\",\n staticClass: \"dropdown-menu\",\n class: {\n 'is-opened-top': !_vm.isListInViewportVertically\n }\n }, [_c('div', {\n staticClass: \"dropdown-content\"\n }, [(_vm.hasHeaderSlot) ? _c('div', {\n staticClass: \"dropdown-item\"\n }, [_vm._t(\"header\")], 2) : _vm._e(), _vm._v(\" \"), _vm._l((_vm.data), function(option, index) {\n return _c('a', {\n key: index,\n staticClass: \"dropdown-item\",\n class: {\n 'is-hovered': option === _vm.hovered\n },\n on: {\n \"click\": function($event) {\n _vm.setSelected(option)\n }\n }\n }, [(_vm.hasDefaultSlot) ? _vm._t(\"default\", null, {\n option: option,\n index: index\n }) : _c('span', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.getValue(option, true))\n }\n })], 2)\n }), _vm._v(\" \"), (_vm.data.length === 0 && _vm.hasEmptySlot) ? _c('div', {\n staticClass: \"dropdown-item is-disabled\"\n }, [_vm._t(\"empty\")], 2) : _vm._e()], 2)])])], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 108 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BCheckbox',\n props: {\n value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n type: String,\n disabled: Boolean,\n required: Boolean,\n name: String,\n size: String,\n trueValue: {\n type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n default: true\n },\n falseValue: {\n type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n default: false\n }\n },\n data: function data() {\n return {\n newValue: this.value\n };\n },\n\n watch: {\n /**\n * When v-model change, set internal value.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n /**\n * Emit input event to update the user v-model.\n */\n newValue: function newValue(value) {\n this.$emit('input', value);\n }\n }\n});\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('label', {\n ref: \"label\",\n staticClass: \"b-checkbox checkbox\",\n class: [_vm.size, {\n 'is-disabled': _vm.disabled\n }],\n attrs: {\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.disabled ? false : 0\n },\n on: {\n \"keydown\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.$refs.label.click()\n }\n }\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newValue),\n expression: \"newValue\"\n }],\n attrs: {\n \"type\": \"checkbox\",\n \"disabled\": _vm.disabled,\n \"required\": _vm.required,\n \"name\": _vm.name,\n \"true-value\": _vm.trueValue,\n \"false-value\": _vm.falseValue\n },\n domProps: {\n \"value\": _vm.nativeValue,\n \"checked\": Array.isArray(_vm.newValue) ? _vm._i(_vm.newValue, _vm.nativeValue) > -1 : _vm._q(_vm.newValue, _vm.trueValue)\n },\n on: {\n \"change\": function($event) {\n var $$a = _vm.newValue,\n $$el = $event.target,\n $$c = $$el.checked ? (_vm.trueValue) : (_vm.falseValue);\n if (Array.isArray($$a)) {\n var $$v = _vm.nativeValue,\n $$i = _vm._i($$a, $$v);\n if ($$el.checked) {\n $$i < 0 && (_vm.newValue = $$a.concat([$$v]))\n } else {\n $$i > -1 && (_vm.newValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1)))\n }\n } else {\n _vm.newValue = $$c\n }\n }\n }\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"check\",\n class: _vm.type\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"control-label\"\n }, [_vm._t(\"default\")], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(111),\n /* template */\n __webpack_require__(112),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 111 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BCheckboxButton',\n props: {\n value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n disabled: Boolean,\n name: String,\n size: String,\n type: {\n type: String,\n default: 'is-primary'\n }\n },\n data: function data() {\n return {\n newValue: this.value\n };\n },\n\n computed: {\n checked: function checked() {\n if (Array.isArray(this.newValue)) {\n return this.newValue.indexOf(this.nativeValue) >= 0;\n }\n return this.newValue === this.nativeValue;\n }\n },\n watch: {\n /**\n * When v-model change, set internal value.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n /**\n * Emit input event to update the user v-model.\n */\n newValue: function newValue(value) {\n this.$emit('input', value);\n }\n }\n});\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"control\"\n }, [_c('label', {\n ref: \"label\",\n staticClass: \"b-checkbox checkbox button\",\n class: [_vm.checked ? _vm.type : null, _vm.size, {\n 'is-disabled': _vm.disabled\n }],\n attrs: {\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.disabled ? false : 0\n },\n on: {\n \"keydown\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.$refs.label.click()\n }\n }\n }, [_vm._t(\"default\"), _vm._v(\" \"), _c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newValue),\n expression: \"newValue\"\n }],\n attrs: {\n \"type\": \"checkbox\",\n \"disabled\": _vm.disabled,\n \"name\": _vm.name\n },\n domProps: {\n \"value\": _vm.nativeValue,\n \"checked\": Array.isArray(_vm.newValue) ? _vm._i(_vm.newValue, _vm.nativeValue) > -1 : (_vm.newValue)\n },\n on: {\n \"change\": function($event) {\n var $$a = _vm.newValue,\n $$el = $event.target,\n $$c = $$el.checked ? (true) : (false);\n if (Array.isArray($$a)) {\n var $$v = _vm.nativeValue,\n $$i = _vm._i($$a, $$v);\n if ($$el.checked) {\n $$i < 0 && (_vm.newValue = $$a.concat([$$v]))\n } else {\n $$i > -1 && (_vm.newValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1)))\n }\n } else {\n _vm.newValue = $$c\n }\n }\n }\n })], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(114),\n /* template */\n __webpack_require__(115),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 114 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BCollapse',\n props: {\n open: {\n type: Boolean,\n default: true\n },\n animation: {\n type: String,\n default: 'fade'\n }\n },\n data: function data() {\n return {\n isOpen: this.open\n };\n },\n\n watch: {\n open: function open(value) {\n this.isOpen = value;\n }\n },\n methods: {\n /**\n * Toggle and emit events\n */\n toggle: function toggle() {\n this.isOpen = !this.isOpen;\n this.$emit('update:open', this.isOpen);\n this.$emit(this.isOpen ? 'open' : 'close');\n }\n }\n});\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"collapse\"\n }, [_c('div', {\n staticClass: \"collapse-trigger\",\n on: {\n \"click\": _vm.toggle\n }\n }, [_vm._t(\"trigger\", null, {\n open: _vm.isOpen\n })], 2), _vm._v(\" \"), _c('transition', {\n attrs: {\n \"name\": _vm.animation\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isOpen),\n expression: \"isOpen\"\n }],\n staticClass: \"collapse-content\"\n }, [_vm._t(\"default\")], 2)])], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(117),\n /* template */\n __webpack_require__(134),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 117 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_FormElementMixin__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown__ = __webpack_require__(43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem__ = __webpack_require__(44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__input_Input__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__input_Input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__input_Input__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__field_Field__ = __webpack_require__(45);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__field_Field___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__field_Field__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__select_Select__ = __webpack_require__(28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__select_Select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__select_Select__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__DatepickerTable__ = __webpack_require__(128);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__DatepickerTable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__DatepickerTable__);\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDatepicker',\n components: (_components = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_10__DatepickerTable___default.a.name, __WEBPACK_IMPORTED_MODULE_10__DatepickerTable___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_6__input_Input___default.a.name, __WEBPACK_IMPORTED_MODULE_6__input_Input___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_7__field_Field___default.a.name, __WEBPACK_IMPORTED_MODULE_7__field_Field___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_8__select_Select___default.a.name, __WEBPACK_IMPORTED_MODULE_8__select_Select___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default.a.name, __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default.a.name, __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default.a), _components),\n mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: Date,\n dayNames: {\n type: Array,\n default: function _default() {\n if (Array.isArray(__WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDayNames)) {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDayNames;\n } else {\n return ['Su', 'M', 'Tu', 'W', 'Th', 'F', 'S'];\n }\n }\n },\n monthNames: {\n type: Array,\n default: function _default() {\n if (Array.isArray(__WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultMonthNames)) {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultMonthNames;\n } else {\n return ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n }\n }\n },\n firstDayOfWeek: {\n type: Number,\n default: function _default() {\n if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultFirstDayOfWeek === 'number') {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultFirstDayOfWeek;\n } else {\n return 0;\n }\n }\n },\n inline: Boolean,\n minDate: Date,\n maxDate: Date,\n focusedDate: Date,\n placeholder: String,\n readonly: {\n type: Boolean,\n default: true\n },\n disabled: {\n type: Boolean,\n default: false\n },\n unselectableDates: Array,\n unselectableDaysOfWeek: {\n type: Array,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultUnselectableDaysOfWeek;\n }\n },\n selectableDates: Array,\n dateFormatter: {\n type: Function,\n default: function _default(date) {\n if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDateFormatter === 'function') {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDateFormatter(date);\n } else {\n var yyyyMMdd = date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate();\n var d = new Date(yyyyMMdd);\n return d.toLocaleDateString();\n }\n }\n },\n dateParser: {\n type: Function,\n default: function _default(date) {\n if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDateParser === 'function') {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDateParser(date);\n } else {\n return new Date(Date.parse(date));\n }\n }\n },\n mobileNative: {\n type: Boolean,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDatepickerMobileNative;\n }\n },\n position: String,\n events: Array,\n indicators: {\n type: String,\n default: 'dots'\n }\n },\n data: function data() {\n var focusedDate = this.value || this.focusedDate || new Date();\n\n return {\n dateSelected: this.value,\n focusedDateData: {\n month: focusedDate.getMonth(),\n year: focusedDate.getFullYear()\n },\n _elementRef: 'input',\n _isDatepicker: true\n };\n },\n\n computed: {\n /*\n * Returns an array of years for the year dropdown. If earliest/latest\n * dates are set by props, range of years will fall within those dates.\n */\n listOfYears: function listOfYears() {\n var latestYear = this.maxDate ? this.maxDate.getFullYear() : Math.max(new Date().getFullYear(), this.focusedDateData.year) + 3;\n\n var earliestYear = this.minDate ? this.minDate.getFullYear() : 1900;\n\n var arrayOfYears = [];\n for (var i = earliestYear; i <= latestYear; i++) {\n arrayOfYears.push(i);\n }\n\n return arrayOfYears.reverse();\n },\n isFirstMonth: function isFirstMonth() {\n if (!this.minDate) return false;\n var dateToCheck = new Date(this.focusedDateData.year, this.focusedDateData.month);\n var date = new Date(this.minDate.getFullYear(), this.minDate.getMonth());\n return dateToCheck <= date;\n },\n isLastMonth: function isLastMonth() {\n if (!this.maxDate) return false;\n var dateToCheck = new Date(this.focusedDateData.year, this.focusedDateData.month);\n var date = new Date(this.maxDate.getFullYear(), this.maxDate.getMonth());\n return dateToCheck >= date;\n },\n isMobile: function isMobile() {\n return this.mobileNative && __WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"d\" /* isMobile */].any();\n }\n },\n watch: {\n /*\n * Emit input event with selected date as payload, set isActive to false.\n * Update internal focusedDateData\n */\n dateSelected: function dateSelected(value) {\n var currentDate = !value ? new Date() : value;\n this.focusedDateData = {\n month: currentDate.getMonth(),\n year: currentDate.getFullYear()\n };\n this.$emit('input', value);\n if (this.$refs.dropdown) {\n this.$refs.dropdown.isActive = false;\n }\n },\n\n\n /**\n * When v-model is changed:\n * 1. Update internal value.\n * 2. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.dateSelected = _value;\n\n !this.isValid && this.$refs.input.checkHtml5Validity();\n },\n focusedDate: function focusedDate(value) {\n if (value) {\n this.focusedDateData = {\n month: value.getMonth(),\n year: value.getFullYear()\n };\n }\n },\n\n\n /*\n * Emit input event on month and/or year change\n */\n 'focusedDateData.month': function focusedDateDataMonth(value) {\n this.$emit('change-month', value);\n },\n 'focusedDateData.year': function focusedDateDataYear(value) {\n this.$emit('change-year', value);\n }\n },\n methods: {\n /*\n * Emit input event with selected date as payload for v-model in parent\n */\n updateSelectedDate: function updateSelectedDate(date) {\n this.dateSelected = date;\n },\n\n\n /*\n * Parse string into date\n */\n onChange: function onChange(value) {\n var date = this.dateParser(value);\n if (date && !isNaN(date)) {\n this.dateSelected = date;\n } else {\n // Force refresh input value when not valid date\n this.dateSelected = null;\n this.$refs.input.newValue = this.dateSelected;\n }\n },\n\n\n /*\n * Format date into string\n */\n formatValue: function formatValue(value) {\n if (value && !isNaN(value)) {\n return this.dateFormatter(value);\n } else {\n return null;\n }\n },\n\n\n /*\n * Either decrement month by 1 if not January or decrement year by 1\n * and set month to 11 (December)\n */\n decrementMonth: function decrementMonth() {\n if (this.disabled) return;\n\n if (this.focusedDateData.month > 0) {\n this.focusedDateData.month -= 1;\n } else {\n this.focusedDateData.month = 11;\n this.focusedDateData.year -= 1;\n }\n },\n\n\n /*\n * Either increment month by 1 if not December or increment year by 1\n * and set month to 0 (January)\n */\n incrementMonth: function incrementMonth() {\n if (this.disabled) return;\n\n if (this.focusedDateData.month < 11) {\n this.focusedDateData.month += 1;\n } else {\n this.focusedDateData.month = 0;\n this.focusedDateData.year += 1;\n }\n },\n\n\n /*\n * Format date into string 'YYYY-MM-DD'\n */\n formatYYYYMMDD: function formatYYYYMMDD(value) {\n var date = new Date(value);\n if (value && !isNaN(date)) {\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n return year + '-' + ((month < 10 ? '0' : '') + month) + '-' + ((day < 10 ? '0' : '') + day);\n }\n return '';\n },\n\n\n /*\n * Parse date from string\n */\n onChangeNativePicker: function onChangeNativePicker(event) {\n var date = event.target.value;\n this.dateSelected = date ? new Date(date.replace(/-/g, '/')) : null;\n }\n }\n});\n\n/***/ }),\n/* 118 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator__ = __webpack_require__(59);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol__);\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDropdown',\n props: {\n value: {\n type: [String, Number, Boolean, Object, Array, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol___default.a, Function],\n default: null\n },\n disabled: Boolean,\n hoverable: Boolean,\n inline: Boolean,\n position: {\n type: String,\n validator: function validator(value) {\n return ['is-top-right', 'is-top-left', 'is-bottom-left'].indexOf(value) > -1;\n }\n },\n mobileModal: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n selected: this.value,\n isActive: false,\n _isDropdown: true // Used internally by DropdownItem\n };\n },\n\n computed: {\n rootClasses: function rootClasses() {\n return [this.position, {\n 'is-disabled': this.disabled,\n 'is-hoverable': this.hoverable,\n 'is-inline': this.inline,\n 'is-active': this.isActive || this.inline,\n 'is-mobile-modal': this.isMobileModal\n }];\n },\n isMobileModal: function isMobileModal() {\n return this.mobileModal && !this.inline && !this.hoverable;\n }\n },\n watch: {\n /**\n * When v-model is changed set the new selected item.\n */\n value: function value(_value) {\n this.selected = _value;\n },\n\n\n /**\n * Emit event when isActive value is changed.\n */\n isActive: function isActive(value) {\n this.$emit('active-change', value);\n }\n },\n methods: {\n /**\n * Click listener from DropdownItem.\n * 1. Set new selected item.\n * 2. Emit input event to update the user v-model.\n * 3. Close the dropdown.\n */\n selectItem: function selectItem(value) {\n if (this.selected !== value) {\n this.$emit('change', value);\n this.selected = value;\n }\n this.$emit('input', value);\n this.isActive = false;\n },\n\n\n /**\n * White-listed items to not close when clicked.\n */\n isInWhiteList: function isInWhiteList(el) {\n if (el === this.$refs.dropdownMenu) return true;\n if (el === this.$refs.trigger) return true;\n // All chidren from dropdown\n if (this.$refs.dropdownMenu !== undefined) {\n var children = this.$refs.dropdownMenu.querySelectorAll('*');\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator___default()(children), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var child = _step.value;\n\n if (el === child) {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n }\n // All children from trigger\n if (this.$refs.trigger !== undefined) {\n var _children = this.$refs.trigger.querySelectorAll('*');\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator___default()(_children), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var _child = _step2.value;\n\n if (el === _child) {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n\n return false;\n },\n\n\n /**\n * Close dropdown if clicked outside.\n */\n clickedOutside: function clickedOutside(event) {\n if (this.inline) return;\n\n if (!this.isInWhiteList(event.target)) this.isActive = false;\n },\n\n\n /**\n * Toggle dropdown if it's not disabled.\n */\n toggle: function toggle() {\n var _this = this;\n\n if (this.disabled || this.hoverable) return;\n\n if (!this.isActive) {\n // if not active, toggle after clickOutside event\n // this fixes toggling programmatic\n this.$nextTick(function () {\n _this.isActive = !_this.isActive;\n });\n } else {\n this.isActive = !this.isActive;\n }\n }\n },\n created: function created() {\n if (typeof window !== 'undefined') {\n document.addEventListener('click', this.clickedOutside);\n }\n },\n beforeDestroy: function beforeDestroy() {\n if (typeof window !== 'undefined') {\n document.removeEventListener('click', this.clickedOutside);\n }\n }\n});\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"dropdown\",\n class: _vm.rootClasses\n }, [(!_vm.inline) ? _c('div', {\n ref: \"trigger\",\n staticClass: \"dropdown-trigger\",\n attrs: {\n \"role\": \"button\"\n },\n on: {\n \"click\": _vm.toggle\n }\n }, [_vm._t(\"trigger\")], 2) : _vm._e(), _vm._v(\" \"), _c('transition', {\n attrs: {\n \"name\": \"fade\"\n }\n }, [(_vm.isMobileModal) ? _c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isActive),\n expression: \"isActive\"\n }],\n staticClass: \"background\"\n }) : _vm._e()]), _vm._v(\" \"), _c('transition', {\n attrs: {\n \"name\": \"fade\"\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: ((!_vm.disabled && (_vm.isActive || _vm.hoverable)) || _vm.inline),\n expression: \"(!disabled && (isActive || hoverable)) || inline\"\n }],\n ref: \"dropdownMenu\",\n staticClass: \"dropdown-menu\"\n }, [_c('div', {\n staticClass: \"dropdown-content\"\n }, [_vm._t(\"default\")], 2)])])], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 120 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDropdownItem',\n props: {\n value: {\n type: [String, Number, Boolean, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a, Function],\n default: null\n },\n separator: Boolean,\n disabled: Boolean,\n custom: Boolean,\n paddingless: Boolean,\n hasLink: Boolean\n },\n computed: {\n anchorClasses: function anchorClasses() {\n return {\n 'is-disabled': this.$parent.disabled || this.disabled,\n 'is-paddingless': this.paddingless,\n 'is-active': this.value !== null && this.value === this.$parent.selected\n };\n },\n itemClasses: function itemClasses() {\n return {\n 'dropdown-item': !this.hasLink,\n 'is-disabled': this.disabled,\n 'is-paddingless': this.paddingless,\n 'is-active': this.value !== null && this.value === this.$parent.selected,\n 'has-link': this.hasLink\n };\n },\n\n /**\n * Check if item can be clickable.\n */\n isClickable: function isClickable() {\n return !this.$parent.disabled && !this.separator && !this.disabled && !this.custom;\n }\n },\n methods: {\n /**\n * Click listener, select the item.\n */\n selectItem: function selectItem() {\n if (!this.isClickable) return;\n\n this.$parent.selectItem(this.value);\n this.$emit('click');\n }\n },\n created: function created() {\n if (!this.$parent.$data._isDropdown) {\n this.$destroy();\n throw new Error('You should wrap bDropdownItem on a bDropdown');\n }\n }\n});\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return (_vm.separator) ? _c('hr', {\n staticClass: \"dropdown-divider\"\n }) : (!_vm.custom && !_vm.hasLink) ? _c('a', {\n staticClass: \"dropdown-item\",\n class: _vm.anchorClasses,\n on: {\n \"click\": _vm.selectItem\n }\n }, [_vm._t(\"default\")], 2) : _c('div', {\n class: _vm.itemClasses,\n on: {\n \"click\": _vm.selectItem\n }\n }, [_vm._t(\"default\")], 2)\n},staticRenderFns: []}\n\n/***/ }),\n/* 122 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__FieldBody__ = __webpack_require__(123);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__FieldBody___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__FieldBody__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BField',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__FieldBody___default.a.name, __WEBPACK_IMPORTED_MODULE_1__FieldBody___default.a),\n props: {\n type: String,\n label: String,\n labelFor: String,\n message: [String, Array],\n grouped: Boolean,\n groupMultiline: Boolean,\n position: String,\n expanded: Boolean,\n horizontal: Boolean,\n addons: {\n type: Boolean,\n default: true\n },\n customClass: String\n },\n data: function data() {\n return {\n newType: this.type,\n newMessage: this.message,\n fieldLabelSize: null,\n _isField: true // Used internally by Input and Select\n };\n },\n\n computed: {\n rootClasses: function rootClasses() {\n return [this.newPosition, {\n 'is-expanded': this.expanded,\n 'is-grouped-multiline': this.groupMultiline,\n 'is-horizontal': this.horizontal\n }];\n },\n\n /**\n * Correct Bulma class for the side of the addon or group.\n *\n * This is not kept like the others (is-small, etc.),\n * because since 'has-addons' is set automatically it\n * doesn't make sense to teach users what addons are exactly.\n */\n newPosition: function newPosition() {\n if (this.position === undefined) return;\n\n var position = this.position.split('-');\n if (position.length < 1) return;\n\n var prefix = this.grouped ? 'is-grouped-' : 'has-addons-';\n\n if (this.position) return prefix + position[1];\n },\n\n /**\n * Formatted message in case it's an array\n * (each element is separated by <br> tag)\n */\n formattedMessage: function formattedMessage() {\n if (this.newMessage) {\n if (Array.isArray(this.newMessage)) {\n return this.newMessage.filter(function (value) {\n if (value) {\n return value;\n }\n }).join(' <br> ');\n } else {\n return this.newMessage;\n }\n } else {\n return this.newMessage;\n }\n }\n },\n watch: {\n /**\n * Set internal type when prop change.\n */\n type: function type(value) {\n this.newType = value;\n },\n\n\n /**\n * Set internal message when prop change.\n */\n message: function message(value) {\n this.newMessage = value;\n }\n },\n methods: {\n /**\n * Field has addons if there are more than one slot\n * (element / component) in the Field.\n * Or is grouped when prop is set.\n * Is a method to be called when component re-render.\n */\n fieldType: function fieldType() {\n if (this.grouped) return 'is-grouped';\n\n var renderedNode = 0;\n if (this.$slots.default) {\n renderedNode = this.$slots.default.reduce(function (i, node) {\n return node.tag ? i + 1 : i;\n }, 0);\n }\n if (renderedNode > 1 && this.addons && !this.horizontal) {\n return 'has-addons';\n }\n }\n },\n mounted: function mounted() {\n if (this.horizontal) {\n // Bulma docs: .is-normal for any .input or .button\n var elements = this.$el.querySelectorAll('.input, .select, .button, .textarea');\n if (elements.length > 0) {\n this.fieldLabelSize = 'is-normal';\n }\n }\n }\n});\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(124),\n /* template */\n null,\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 124 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BFieldBody',\n props: {\n message: {\n type: [String]\n },\n type: {\n type: [String]\n }\n },\n render: function render(h) {\n var _this = this;\n\n return h('div', { attrs: { 'class': 'field-body' } }, this.$slots.default.map(function (v) {\n // skip returns and comments\n if (!v.tag) {\n return v;\n }\n if (_this.message) {\n return h('b-field', { attrs: { message: _this.message, 'type': _this.type } }, [v]);\n }\n return h('b-field', { attrs: { 'type': _this.type } }, [v]);\n }));\n }\n});\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"field\",\n class: [_vm.rootClasses, _vm.fieldType()]\n }, [(_vm.horizontal) ? _c('div', {\n staticClass: \"field-label\",\n class: [_vm.customClass, _vm.fieldLabelSize]\n }, [(_vm.label) ? _c('label', {\n staticClass: \"label\",\n attrs: {\n \"for\": _vm.labelFor\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.label) + \"\\n \")]) : _vm._e()]) : [(_vm.label) ? _c('label', {\n staticClass: \"label\",\n class: _vm.customClass,\n attrs: {\n \"for\": _vm.labelFor\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.label) + \"\\n \")]) : _vm._e()], _vm._v(\" \"), (_vm.horizontal) ? _c('b-field-body', {\n attrs: {\n \"message\": _vm.newMessage ? _vm.formattedMessage : '',\n \"type\": _vm.newType\n }\n }, [_vm._t(\"default\")], 2) : [_vm._t(\"default\")], _vm._v(\" \"), (_vm.newMessage && !_vm.horizontal) ? _c('p', {\n staticClass: \"help\",\n class: _vm.newType,\n domProps: {\n \"innerHTML\": _vm._s(_vm.formattedMessage)\n }\n }) : _vm._e()], 2)\n},staticRenderFns: []}\n\n/***/ }),\n/* 126 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__ = __webpack_require__(12);\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BSelect',\n components: __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a),\n mixins: [__WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: {\n type: [String, Number, Boolean, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a, Function],\n default: null\n },\n placeholder: String,\n multiple: Boolean,\n nativeSize: [String, Number]\n },\n data: function data() {\n return {\n selected: this.value,\n _isSelect: true,\n _elementRef: 'select'\n };\n },\n\n computed: {\n spanClasses: function spanClasses() {\n return [this.size, this.statusType, {\n 'is-fullwidth': this.expanded,\n 'is-loading': this.loading,\n 'is-multiple': this.multiple,\n 'is-rounded': this.rounded,\n 'is-empty': this.selected === null\n }];\n }\n },\n watch: {\n /**\n * When v-model is changed:\n * 1. Set the selected option.\n * 2. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.selected = _value;\n !this.isValid && this.checkHtml5Validity();\n },\n\n /**\n * When selected:\n * 1. Emit input event to update the user v-model.\n * 2. If it's invalid, validate again.\n */\n selected: function selected(value) {\n this.$emit('input', value);\n !this.isValid && this.checkHtml5Validity();\n }\n }\n});\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"control\",\n class: {\n 'is-expanded': _vm.expanded, 'has-icons-left': _vm.icon\n }\n }, [_c('span', {\n staticClass: \"select\",\n class: _vm.spanClasses\n }, [_c('select', _vm._b({\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.selected),\n expression: \"selected\"\n }],\n ref: \"select\",\n attrs: {\n \"multiple\": _vm.multiple,\n \"size\": _vm.nativeSize\n },\n on: {\n \"blur\": function($event) {\n _vm.$emit('blur', $event) && _vm.checkHtml5Validity()\n },\n \"focus\": function($event) {\n _vm.$emit('focus', $event)\n },\n \"change\": function($event) {\n var $$selectedVal = Array.prototype.filter.call($event.target.options, function(o) {\n return o.selected\n }).map(function(o) {\n var val = \"_value\" in o ? o._value : o.value;\n return val\n });\n _vm.selected = $event.target.multiple ? $$selectedVal : $$selectedVal[0]\n }\n }\n }, 'select', _vm.$attrs, false), [(_vm.placeholder) ? _c('option', {\n attrs: {\n \"selected\": \"\",\n \"disabled\": \"\",\n \"hidden\": \"\"\n },\n domProps: {\n \"value\": null\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.placeholder) + \"\\n \")]) : _vm._e(), _vm._v(\" \"), _vm._t(\"default\")], 2)]), _vm._v(\" \"), (_vm.icon) ? _c('b-icon', {\n staticClass: \"is-left\",\n attrs: {\n \"icon\": _vm.icon,\n \"pack\": _vm.iconPack,\n \"size\": _vm.iconSize\n }\n }) : _vm._e()], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(129),\n /* template */\n __webpack_require__(133),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 129 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow__ = __webpack_require__(130);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDatepickerTable',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow___default.a.name, __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow___default.a),\n props: {\n value: Date,\n dayNames: Array,\n monthNames: Array,\n firstDayOfWeek: Number,\n events: Array,\n indicators: String,\n minDate: Date,\n maxDate: Date,\n focused: Object,\n disabled: Boolean,\n unselectableDates: Array,\n unselectableDaysOfWeek: Array,\n selectableDates: Array\n },\n computed: {\n visibleDayNames: function visibleDayNames() {\n var visibleDayNames = [];\n var index = this.firstDayOfWeek;\n while (visibleDayNames.length < this.dayNames.length) {\n var currentDayName = this.dayNames[index % this.dayNames.length];\n visibleDayNames.push(currentDayName);\n index++;\n }\n return visibleDayNames;\n },\n hasEvents: function hasEvents() {\n return this.events && this.events.length;\n },\n\n\n /*\n * Return array of all events in the specified month\n */\n eventsInThisMonth: function eventsInThisMonth() {\n if (!this.events) return [];\n\n var monthEvents = [];\n\n for (var i = 0; i < this.events.length; i++) {\n var event = this.events[i];\n\n if (!event.hasOwnProperty('date')) {\n event = { date: event };\n }\n if (!event.hasOwnProperty('type')) {\n event.type = 'is-primary';\n }\n if (event.date.getMonth() === this.focused.month && event.date.getFullYear() === this.focused.year) {\n monthEvents.push(event);\n }\n }\n\n return monthEvents;\n }\n },\n methods: {\n /*\n * Emit input event with selected date as payload for v-model in parent\n */\n updateSelectedDate: function updateSelectedDate(date) {\n this.$emit('input', date);\n },\n\n\n /*\n * Return array of all days in the week that the startingDate is within\n */\n weekBuilder: function weekBuilder(startingDate, month, year) {\n var thisMonth = new Date(year, month);\n\n var thisWeek = [];\n\n var dayOfWeek = new Date(year, month, startingDate).getDay();\n\n var end = dayOfWeek >= this.firstDayOfWeek ? dayOfWeek - this.firstDayOfWeek : 7 - this.firstDayOfWeek + dayOfWeek;\n\n var daysAgo = 1;\n for (var i = 0; i < end; i++) {\n thisWeek.unshift(new Date(thisMonth.getFullYear(), thisMonth.getMonth(), startingDate - daysAgo));\n daysAgo++;\n }\n\n thisWeek.push(new Date(year, month, startingDate));\n\n var daysForward = 1;\n while (thisWeek.length < 7) {\n thisWeek.push(new Date(year, month, startingDate + daysForward));\n daysForward++;\n }\n\n return thisWeek;\n },\n\n\n /*\n * Return array of all weeks in the specified month\n */\n weeksInThisMonth: function weeksInThisMonth(month, year) {\n var weeksInThisMonth = [];\n var daysInThisMonth = new Date(year, month + 1, 0).getDate();\n\n var startingDay = 1;\n\n while (startingDay <= daysInThisMonth + 6) {\n var newWeek = this.weekBuilder(startingDay, month, year);\n var weekValid = false;\n\n newWeek.forEach(function (day) {\n if (day.getMonth() === month) {\n weekValid = true;\n }\n });\n\n if (weekValid) {\n weeksInThisMonth.push(newWeek);\n }\n\n startingDay += 7;\n }\n\n return weeksInThisMonth;\n },\n eventsInThisWeek: function eventsInThisWeek(week, index) {\n if (!this.eventsInThisMonth.length) return [];\n\n var weekEvents = [];\n\n var weeksInThisMonth = [];\n weeksInThisMonth = this.weeksInThisMonth(this.focused.month, this.focused.year);\n\n for (var d = 0; d < weeksInThisMonth[index].length; d++) {\n for (var e = 0; e < this.eventsInThisMonth.length; e++) {\n var eventsInThisMonth = this.eventsInThisMonth[e].date.getTime();\n if (eventsInThisMonth === weeksInThisMonth[index][d].getTime()) {\n weekEvents.push(this.eventsInThisMonth[e]);\n }\n }\n }\n\n return weekEvents;\n }\n }\n});\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(131),\n /* template */\n __webpack_require__(132),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 131 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDatepickerTableRow',\n props: {\n selectedDate: Date,\n week: {\n type: Array,\n required: true\n },\n month: {\n type: Number,\n required: true\n },\n minDate: Date,\n maxDate: Date,\n disabled: Boolean,\n unselectableDates: Array,\n unselectableDaysOfWeek: Array,\n selectableDates: Array,\n events: Array,\n indicators: String\n },\n methods: {\n /*\n * Check that selected day is within earliest/latest params and\n * is within this month\n */\n selectableDate: function selectableDate(day) {\n var validity = [];\n\n if (this.minDate) {\n validity.push(day >= this.minDate);\n }\n\n if (this.maxDate) {\n validity.push(day <= this.maxDate);\n }\n\n validity.push(day.getMonth() === this.month);\n\n if (this.selectableDates) {\n for (var i = 0; i < this.selectableDates.length; i++) {\n var enabledDate = this.selectableDates[i];\n if (day.getDate() === enabledDate.getDate() && day.getFullYear() === enabledDate.getFullYear() && day.getMonth() === enabledDate.getMonth()) {\n return true;\n } else {\n validity.push(false);\n }\n }\n }\n\n if (this.unselectableDates) {\n for (var _i = 0; _i < this.unselectableDates.length; _i++) {\n var disabledDate = this.unselectableDates[_i];\n validity.push(day.getDate() !== disabledDate.getDate() || day.getFullYear() !== disabledDate.getFullYear() || day.getMonth() !== disabledDate.getMonth());\n }\n }\n\n if (this.unselectableDaysOfWeek) {\n for (var _i2 = 0; _i2 < this.unselectableDaysOfWeek.length; _i2++) {\n var dayOfWeek = this.unselectableDaysOfWeek[_i2];\n validity.push(day.getDay() !== dayOfWeek);\n }\n }\n\n return validity.indexOf(false) < 0;\n },\n\n\n /*\n * Emit select event with chosen date as payload\n */\n emitChosenDate: function emitChosenDate(day) {\n if (this.disabled) return;\n\n if (this.selectableDate(day)) {\n this.$emit('select', day);\n }\n },\n eventsDateMatch: function eventsDateMatch(day) {\n if (!this.events.length) return false;\n\n var dayEvents = [];\n\n for (var i = 0; i < this.events.length; i++) {\n if (this.events[i].date.getDay() === day.getDay()) {\n dayEvents.push(this.events[i]);\n }\n }\n\n if (!dayEvents.length) {\n return false;\n }\n\n return dayEvents;\n },\n\n\n /*\n * Build classObject for cell using validations\n */\n classObject: function classObject(day) {\n function dateMatch(dateOne, dateTwo) {\n // if either date is null or undefined, return false\n if (!dateOne || !dateTwo) {\n return false;\n }\n\n return dateOne.getDate() === dateTwo.getDate() && dateOne.getFullYear() === dateTwo.getFullYear() && dateOne.getMonth() === dateTwo.getMonth();\n }\n\n return {\n 'is-selected': dateMatch(day, this.selectedDate),\n 'is-today': dateMatch(day, new Date()),\n 'is-selectable': this.selectableDate(day) && !this.disabled,\n 'is-unselectable': !this.selectableDate(day) || this.disabled\n };\n }\n }\n});\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"datepicker-row\"\n }, [_vm._l((_vm.week), function(day, index) {\n return [(_vm.selectableDate(day) && !_vm.disabled) ? _c('a', {\n key: index,\n staticClass: \"datepicker-cell\",\n class: [_vm.classObject(day), {\n 'has-event': _vm.eventsDateMatch(day)\n }, _vm.indicators],\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\",\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.emitChosenDate(day)\n },\n \"keydown\": [function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n $event.preventDefault();\n _vm.emitChosenDate(day)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.emitChosenDate(day)\n }]\n }\n }, [_vm._v(\"\\n \" + _vm._s(day.getDate()) + \"\\n\\n \"), (_vm.eventsDateMatch(day)) ? _c('div', {\n staticClass: \"events\"\n }, _vm._l((_vm.eventsDateMatch(day)), function(event, index) {\n return _c('div', {\n key: index,\n staticClass: \"event\",\n class: event.type\n })\n })) : _vm._e()]) : _c('div', {\n key: index,\n staticClass: \"datepicker-cell\",\n class: _vm.classObject(day)\n }, [_vm._v(\"\\n \" + _vm._s(day.getDate()) + \"\\n \")])]\n })], 2)\n},staticRenderFns: []}\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('section', {\n staticClass: \"datepicker-table\"\n }, [_c('header', {\n staticClass: \"datepicker-header\"\n }, _vm._l((_vm.visibleDayNames), function(day, index) {\n return _c('div', {\n key: index,\n staticClass: \"datepicker-cell\"\n }, [_vm._v(\"\\n \" + _vm._s(day) + \"\\n \")])\n })), _vm._v(\" \"), _c('div', {\n staticClass: \"datepicker-body\",\n class: {\n 'has-events': _vm.hasEvents\n }\n }, _vm._l((_vm.weeksInThisMonth(_vm.focused.month, _vm.focused.year)), function(week, index) {\n return _c('b-datepicker-table-row', {\n key: index,\n attrs: {\n \"selected-date\": _vm.value,\n \"week\": week,\n \"month\": _vm.focused.month,\n \"min-date\": _vm.minDate,\n \"max-date\": _vm.maxDate,\n \"disabled\": _vm.disabled,\n \"unselectable-dates\": _vm.unselectableDates,\n \"unselectable-days-of-week\": _vm.unselectableDaysOfWeek,\n \"selectable-dates\": _vm.selectableDates,\n \"events\": _vm.eventsInThisWeek(week, index),\n \"indicators\": _vm.indicators\n },\n on: {\n \"select\": _vm.updateSelectedDate\n }\n })\n }))])\n},staticRenderFns: []}\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"datepicker control\",\n class: [_vm.size, {\n 'is-expanded': _vm.expanded\n }]\n }, [(!_vm.isMobile || _vm.inline) ? _c('b-dropdown', {\n ref: \"dropdown\",\n attrs: {\n \"position\": _vm.position,\n \"disabled\": _vm.disabled,\n \"inline\": _vm.inline\n }\n }, [(!_vm.inline) ? _c('b-input', _vm._b({\n ref: \"input\",\n attrs: {\n \"slot\": \"trigger\",\n \"autocomplete\": \"off\",\n \"value\": _vm.formatValue(_vm.dateSelected),\n \"placeholder\": _vm.placeholder,\n \"size\": _vm.size,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"rounded\": _vm.rounded,\n \"loading\": _vm.loading,\n \"disabled\": _vm.disabled,\n \"readonly\": _vm.readonly\n },\n on: {\n \"focus\": function($event) {\n _vm.$emit('focus', $event)\n },\n \"blur\": function($event) {\n _vm.$emit('blur', $event) && _vm.checkHtml5Validity()\n }\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onChange($event.target.value)\n }\n },\n slot: \"trigger\"\n }, 'b-input', _vm.$attrs, false)) : _vm._e(), _vm._v(\" \"), _c('b-dropdown-item', {\n attrs: {\n \"disabled\": _vm.disabled,\n \"custom\": \"\"\n }\n }, [_c('header', {\n staticClass: \"datepicker-header\"\n }, [(_vm.$slots.header !== undefined && _vm.$slots.header.length) ? [_vm._t(\"header\")] : _c('div', {\n staticClass: \"pagination field is-centered\"\n }, [(!_vm.isFirstMonth && !_vm.disabled) ? _c('a', {\n staticClass: \"pagination-previous\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\",\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.decrementMonth($event)\n },\n \"keydown\": [function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n $event.preventDefault();\n _vm.decrementMonth($event)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.decrementMonth($event)\n }]\n }\n }, [_c('b-icon', {\n attrs: {\n \"icon\": \"chevron-left\",\n \"pack\": _vm.iconPack,\n \"both\": \"\",\n \"type\": \"is-primary is-clickable\"\n }\n })], 1) : _vm._e(), _vm._v(\" \"), _c('a', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (!_vm.isLastMonth && !_vm.disabled),\n expression: \"!isLastMonth && !disabled\"\n }],\n staticClass: \"pagination-next\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\",\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.incrementMonth($event)\n },\n \"keydown\": [function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n $event.preventDefault();\n _vm.incrementMonth($event)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.incrementMonth($event)\n }]\n }\n }, [_c('b-icon', {\n attrs: {\n \"icon\": \"chevron-right\",\n \"pack\": _vm.iconPack,\n \"both\": \"\",\n \"type\": \"is-primary is-clickable\"\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"pagination-list\"\n }, [_c('b-field', [_c('b-select', {\n attrs: {\n \"disabled\": _vm.disabled\n },\n model: {\n value: (_vm.focusedDateData.month),\n callback: function($$v) {\n _vm.$set(_vm.focusedDateData, \"month\", $$v)\n },\n expression: \"focusedDateData.month\"\n }\n }, _vm._l((_vm.monthNames), function(month, index) {\n return _c('option', {\n key: month,\n domProps: {\n \"value\": index\n }\n }, [_vm._v(\"\\n \" + _vm._s(month) + \"\\n \")])\n })), _vm._v(\" \"), _c('b-select', {\n attrs: {\n \"disabled\": _vm.disabled\n },\n model: {\n value: (_vm.focusedDateData.year),\n callback: function($$v) {\n _vm.$set(_vm.focusedDateData, \"year\", $$v)\n },\n expression: \"focusedDateData.year\"\n }\n }, _vm._l((_vm.listOfYears), function(year) {\n return _c('option', {\n key: year,\n domProps: {\n \"value\": year\n }\n }, [_vm._v(\"\\n \" + _vm._s(year) + \"\\n \")])\n }))], 1)], 1)])], 2), _vm._v(\" \"), _c('b-datepicker-table', {\n attrs: {\n \"day-names\": _vm.dayNames,\n \"month-names\": _vm.monthNames,\n \"first-day-of-week\": _vm.firstDayOfWeek,\n \"min-date\": _vm.minDate,\n \"max-date\": _vm.maxDate,\n \"focused\": _vm.focusedDateData,\n \"disabled\": _vm.disabled,\n \"unselectable-dates\": _vm.unselectableDates,\n \"unselectable-days-of-week\": _vm.unselectableDaysOfWeek,\n \"selectable-dates\": _vm.selectableDates,\n \"events\": _vm.events,\n \"indicators\": _vm.indicators\n },\n on: {\n \"close\": function($event) {\n _vm.$refs.dropdown.isActive = false\n }\n },\n model: {\n value: (_vm.dateSelected),\n callback: function($$v) {\n _vm.dateSelected = $$v\n },\n expression: \"dateSelected\"\n }\n }), _vm._v(\" \"), (_vm.$slots.default !== undefined && _vm.$slots.default.length) ? _c('footer', {\n staticClass: \"datepicker-footer\"\n }, [_vm._t(\"default\")], 2) : _vm._e()], 1)], 1) : _c('b-input', _vm._b({\n ref: \"input\",\n attrs: {\n \"type\": \"date\",\n \"autocomplete\": \"off\",\n \"value\": _vm.formatYYYYMMDD(_vm.value),\n \"placeholder\": _vm.placeholder,\n \"size\": _vm.size,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"loading\": _vm.loading,\n \"max\": _vm.formatYYYYMMDD(_vm.maxDate),\n \"min\": _vm.formatYYYYMMDD(_vm.minDate),\n \"disabled\": _vm.disabled,\n \"readonly\": false\n },\n on: {\n \"focus\": function($event) {\n _vm.$emit('focus', $event)\n },\n \"blur\": function($event) {\n _vm.$emit('blur', $event) && _vm.checkHtml5Validity()\n }\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onChangeNativePicker($event)\n }\n }\n }, 'b-input', _vm.$attrs, false))], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(136),\n /* template */\n __webpack_require__(139),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 136 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__modal_Modal__ = __webpack_require__(62);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__modal_Modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__modal_Modal__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_BaseElementMixin__ = __webpack_require__(13);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDialog',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a),\n extends: __WEBPACK_IMPORTED_MODULE_2__modal_Modal___default.a,\n mixins: [__WEBPACK_IMPORTED_MODULE_5__utils_BaseElementMixin__[\"a\" /* default */]],\n props: {\n title: String,\n message: String,\n icon: String,\n hasIcon: Boolean,\n type: {\n type: String,\n default: 'is-primary'\n },\n size: String,\n confirmText: {\n type: String,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDialogConfirmText ? __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDialogConfirmText : 'OK';\n }\n },\n cancelText: {\n type: String,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDialogCancelText ? __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDialogCancelText : 'Cancel';\n }\n },\n hasInput: Boolean, // Used internally to know if it's prompt\n inputAttrs: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n onConfirm: {\n type: Function,\n default: function _default() {}\n },\n focusOn: {\n type: String,\n default: 'confirm'\n }\n },\n data: function data() {\n var prompt = this.hasInput ? this.inputAttrs.value || '' : '';\n\n return {\n prompt: prompt,\n isActive: false,\n validationMessage: ''\n };\n },\n\n computed: {\n /**\n * Icon name (MDI) based on the type.\n */\n iconByType: function iconByType() {\n switch (this.type) {\n case 'is-info':\n return 'information';\n case 'is-success':\n return 'check-circle';\n case 'is-warning':\n return 'alert';\n case 'is-danger':\n return 'alert-circle';\n default:\n return null;\n }\n },\n showCancel: function showCancel() {\n return this.cancelOptions.indexOf('button') >= 0;\n }\n },\n methods: {\n /**\n * If it's a prompt Dialog, validate the input.\n * Call the onConfirm prop (function) and close the Dialog.\n */\n confirm: function confirm() {\n var _this = this;\n\n if (this.$refs.input !== undefined) {\n if (!this.$refs.input.checkValidity()) {\n this.validationMessage = this.$refs.input.validationMessage;\n this.$nextTick(function () {\n return _this.$refs.input.select();\n });\n return;\n }\n }\n\n this.onConfirm(this.prompt);\n this.close();\n },\n\n\n /**\n * Close the Dialog.\n */\n close: function close() {\n var _this2 = this;\n\n this.isActive = false;\n // Timeout for the animation complete before destroying\n setTimeout(function () {\n _this2.$destroy();\n Object(__WEBPACK_IMPORTED_MODULE_4__utils_helpers__[\"e\" /* removeElement */])(_this2.$el);\n }, 150);\n }\n },\n beforeMount: function beforeMount() {\n // Insert the Dialog component in body tag\n document.body.appendChild(this.$el);\n },\n mounted: function mounted() {\n var _this3 = this;\n\n this.isActive = true;\n\n if (typeof this.inputAttrs.required === 'undefined') {\n this.$set(this.inputAttrs, 'required', true);\n }\n\n this.$nextTick(function () {\n // Handle which element receives focus\n if (_this3.hasInput) {\n _this3.$refs.input.focus();\n } else if (_this3.focusOn === 'cancel' && _this3.showCancel) {\n _this3.$refs.cancelButton.focus();\n } else {\n _this3.$refs.confirmButton.focus();\n }\n });\n }\n});\n\n/***/ }),\n/* 137 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_config__ = __webpack_require__(2);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BModal',\n props: {\n active: Boolean,\n component: [Object, Function],\n content: String,\n programmatic: Boolean,\n props: Object,\n events: Object,\n width: {\n type: [String, Number],\n default: 960\n },\n hasModalCard: Boolean,\n animation: {\n type: String,\n default: 'zoom-out'\n },\n canCancel: {\n type: [Array, Boolean],\n default: function _default() {\n return ['escape', 'x', 'outside', 'button'];\n }\n },\n onCancel: {\n type: Function,\n default: function _default() {}\n },\n scroll: {\n type: String,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_1__utils_config__[\"a\" /* default */].defaultModalScroll ? __WEBPACK_IMPORTED_MODULE_1__utils_config__[\"a\" /* default */].defaultModalScroll : 'clip';\n },\n validator: function validator(value) {\n return ['clip', 'keep'].indexOf(value) >= 0;\n }\n }\n },\n data: function data() {\n return {\n isActive: this.active || false,\n savedScrollTop: null,\n newWidth: typeof this.width === 'number' ? this.width + 'px' : this.width\n };\n },\n\n computed: {\n cancelOptions: function cancelOptions() {\n return typeof this.canCancel === 'boolean' ? this.canCancel ? ['escape', 'x', 'outside', 'button'] : [] : this.canCancel;\n },\n showX: function showX() {\n return this.cancelOptions.indexOf('x') >= 0;\n }\n },\n watch: {\n active: function active(value) {\n this.isActive = value;\n },\n isActive: function isActive() {\n this.handleScroll();\n }\n },\n methods: {\n handleScroll: function handleScroll() {\n if (typeof window === 'undefined') return;\n\n if (this.scroll === 'clip') {\n if (this.isActive) {\n document.documentElement.classList.add('is-clipped');\n } else {\n document.documentElement.classList.remove('is-clipped');\n }\n return;\n }\n\n this.savedScrollTop = !this.savedScrollTop ? document.documentElement.scrollTop : this.savedScrollTop;\n\n if (this.isActive) {\n document.body.classList.add('is-noscroll');\n } else {\n document.body.classList.remove('is-noscroll');\n }\n\n if (this.isActive) {\n document.body.style.top = '-' + this.savedScrollTop + 'px';\n return;\n }\n\n document.documentElement.scrollTop = this.savedScrollTop;\n document.body.style.top = null;\n this.savedScrollTop = null;\n },\n\n\n /**\n * Close the Modal if canCancel and call the onCancel prop (function).\n */\n cancel: function cancel(method) {\n if (this.cancelOptions.indexOf(method) < 0) return;\n\n this.onCancel.apply(null, arguments);\n this.close();\n },\n\n\n /**\n * Call the onCancel prop (function).\n * Emit events, and destroy modal if it's programmatic.\n */\n close: function close() {\n var _this = this;\n\n this.$emit('close');\n this.$emit('update:active', false);\n\n // Timeout for the animation complete before destroying\n if (this.programmatic) {\n this.isActive = false;\n setTimeout(function () {\n _this.$destroy();\n Object(__WEBPACK_IMPORTED_MODULE_0__utils_helpers__[\"e\" /* removeElement */])(_this.$el);\n }, 150);\n }\n },\n\n\n /**\n * Keypress event that is bound to the document.\n */\n keyPress: function keyPress(event) {\n // Esc key\n if (this.isActive && event.keyCode === 27) this.cancel('escape');\n }\n },\n created: function created() {\n if (typeof window !== 'undefined') {\n document.addEventListener('keyup', this.keyPress);\n }\n },\n beforeMount: function beforeMount() {\n // Insert the Modal component in body tag\n // only if it's programmatic\n this.programmatic && document.body.appendChild(this.$el);\n },\n mounted: function mounted() {\n if (this.programmatic) this.isActive = true;else if (this.isActive) this.handleScroll();\n },\n beforeDestroy: function beforeDestroy() {\n if (typeof window !== 'undefined') {\n document.removeEventListener('keyup', this.keyPress);\n // reset scroll\n document.documentElement.classList.remove('is-clipped');\n var savedScrollTop = !this.savedScrollTop ? document.documentElement.scrollTop : this.savedScrollTop;\n document.body.classList.remove('is-noscroll');\n document.documentElement.scrollTop = savedScrollTop;\n document.body.style.top = null;\n }\n }\n});\n\n/***/ }),\n/* 138 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": _vm.animation\n }\n }, [(_vm.isActive) ? _c('div', {\n staticClass: \"modal is-active\"\n }, [_c('div', {\n staticClass: \"modal-background\",\n on: {\n \"click\": function($event) {\n _vm.cancel('outside')\n }\n }\n }), _vm._v(\" \"), _c('div', {\n staticClass: \"animation-content\",\n class: {\n 'modal-content': !_vm.hasModalCard\n },\n style: ({\n maxWidth: _vm.newWidth\n })\n }, [(_vm.component) ? _c(_vm.component, _vm._g(_vm._b({\n tag: \"component\",\n on: {\n \"close\": _vm.close\n }\n }, 'component', _vm.props, false), _vm.events)) : (_vm.content) ? _c('div', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.content)\n }\n }) : _vm._t(\"default\")], 2), _vm._v(\" \"), (_vm.showX) ? _c('button', {\n staticClass: \"modal-close is-large\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n _vm.cancel('x')\n }\n }\n }) : _vm._e()]) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 139 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": _vm.animation\n }\n }, [(_vm.isActive) ? _c('div', {\n staticClass: \"dialog modal is-active\",\n class: _vm.size\n }, [_c('div', {\n staticClass: \"modal-background\",\n on: {\n \"click\": function($event) {\n _vm.cancel('outside')\n }\n }\n }), _vm._v(\" \"), _c('div', {\n staticClass: \"modal-card animation-content\"\n }, [(_vm.title) ? _c('header', {\n staticClass: \"modal-card-head\"\n }, [_c('p', {\n staticClass: \"modal-card-title\"\n }, [_vm._v(_vm._s(_vm.title))])]) : _vm._e(), _vm._v(\" \"), _c('section', {\n staticClass: \"modal-card-body\",\n class: {\n 'is-titleless': !_vm.title, 'is-flex': _vm.hasIcon\n }\n }, [_c('div', {\n staticClass: \"media\"\n }, [(_vm.hasIcon) ? _c('div', {\n staticClass: \"media-left\"\n }, [_c('b-icon', {\n attrs: {\n \"icon\": _vm.icon ? _vm.icon : _vm.iconByType,\n \"pack\": _vm.iconPack,\n \"type\": _vm.type,\n \"both\": !_vm.icon,\n \"size\": \"is-large\"\n }\n })], 1) : _vm._e(), _vm._v(\" \"), _c('div', {\n staticClass: \"media-content\"\n }, [_c('p', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.message)\n }\n }), _vm._v(\" \"), (_vm.hasInput) ? _c('div', {\n staticClass: \"field\"\n }, [_c('div', {\n staticClass: \"control\"\n }, [_c('input', _vm._b({\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.prompt),\n expression: \"prompt\"\n }],\n ref: \"input\",\n staticClass: \"input\",\n class: {\n 'is-danger': _vm.validationMessage\n },\n domProps: {\n \"value\": (_vm.prompt)\n },\n on: {\n \"keyup\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n _vm.confirm($event)\n },\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.prompt = $event.target.value\n }\n }\n }, 'input', _vm.inputAttrs, false))]), _vm._v(\" \"), _c('p', {\n staticClass: \"help is-danger\"\n }, [_vm._v(_vm._s(_vm.validationMessage))])]) : _vm._e()])])]), _vm._v(\" \"), _c('footer', {\n staticClass: \"modal-card-foot\"\n }, [(_vm.showCancel) ? _c('button', {\n ref: \"cancelButton\",\n staticClass: \"button\",\n on: {\n \"click\": function($event) {\n _vm.cancel('button')\n }\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.cancelText) + \"\\n \")]) : _vm._e(), _vm._v(\" \"), _c('button', {\n ref: \"confirmButton\",\n staticClass: \"button\",\n class: _vm.type,\n on: {\n \"click\": _vm.confirm\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.confirmText) + \"\\n \")])])])]) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 140 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(141),\n /* template */\n __webpack_require__(142),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 141 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// EXTERNAL MODULE: ./src/utils/helpers.js\nvar helpers = __webpack_require__(6);\n\n// CONCATENATED MODULE: ./src/utils/ssr.js\n// Polyfills for SSR\n\nvar isSSR = typeof window === 'undefined';\n\nvar HTMLElement = isSSR ? Object : window.HTMLElement;\n// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/loading/Loading.vue\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ var Loading = __webpack_exports__[\"default\"] = ({\n name: 'BLoading',\n props: {\n active: Boolean,\n programmatic: Boolean,\n container: [Object, Function, HTMLElement],\n isFullPage: {\n type: Boolean,\n default: true\n },\n animation: {\n type: String,\n default: 'fade'\n },\n canCancel: {\n type: Boolean,\n default: false\n },\n onCancel: {\n type: Function,\n default: function _default() {}\n }\n },\n data: function data() {\n return {\n isActive: this.active || false\n };\n },\n\n watch: {\n active: function active(value) {\n this.isActive = value;\n }\n },\n methods: {\n /**\n * Close the Modal if canCancel.\n */\n cancel: function cancel() {\n if (!this.canCancel || !this.isActive) return;\n\n this.close();\n },\n\n /**\n * Emit events, and destroy modal if it's programmatic.\n */\n close: function close() {\n var _this = this;\n\n this.onCancel.apply(null, arguments);\n this.$emit('close');\n this.$emit('update:active', false);\n\n // Timeout for the animation complete before destroying\n if (this.programmatic) {\n this.isActive = false;\n setTimeout(function () {\n _this.$destroy();\n Object(helpers[\"e\" /* removeElement */])(_this.$el);\n }, 150);\n }\n },\n\n /**\n * Keypress event that is bound to the document.\n */\n keyPress: function keyPress(event) {\n // Esc key\n if (event.keyCode === 27) this.cancel();\n }\n },\n created: function created() {\n if (typeof window !== 'undefined') {\n document.addEventListener('keyup', this.keyPress);\n }\n },\n beforeMount: function beforeMount() {\n // Insert the Loading component in body tag\n // only if it's programmatic\n if (this.programmatic) {\n if (!this.container) {\n document.body.appendChild(this.$el);\n } else {\n this.isFullPage = false;\n this.container.appendChild(this.$el);\n }\n }\n },\n mounted: function mounted() {\n if (this.programmatic) this.isActive = true;\n },\n beforeDestroy: function beforeDestroy() {\n if (typeof window !== 'undefined') {\n document.removeEventListener('keyup', this.keyPress);\n }\n }\n});\n\n/***/ }),\n/* 142 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": _vm.animation\n }\n }, [(_vm.isActive) ? _c('div', {\n staticClass: \"loading-overlay is-active\",\n class: {\n 'is-full-page': _vm.isFullPage\n }\n }, [_c('div', {\n staticClass: \"loading-background\",\n on: {\n \"click\": _vm.cancel\n }\n }), _vm._v(\" \"), _c('div', {\n staticClass: \"loading-icon\"\n })]) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 143 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(144),\n /* template */\n __webpack_require__(145),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 144 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__ = __webpack_require__(63);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BMessage',\n mixins: [__WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__[\"a\" /* default */]],\n data: function data() {\n return {\n newIconSize: this.iconSize || this.size || 'is-large'\n };\n }\n});\n\n/***/ }),\n/* 145 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": \"fade\"\n }\n }, [(_vm.isActive) ? _c('article', {\n staticClass: \"message\",\n class: [_vm.type, _vm.size]\n }, [(_vm.title) ? _c('header', {\n staticClass: \"message-header\"\n }, [_c('p', [_vm._v(_vm._s(_vm.title))]), _vm._v(\" \"), (_vm.closable) ? _c('button', {\n staticClass: \"delete\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": _vm.close\n }\n }) : _vm._e()]) : _vm._e(), _vm._v(\" \"), _c('section', {\n staticClass: \"message-body\"\n }, [_c('div', {\n staticClass: \"media\"\n }, [(_vm.icon && _vm.hasIcon) ? _c('div', {\n staticClass: \"media-left\"\n }, [_c('b-icon', {\n class: _vm.type,\n attrs: {\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\",\n \"size\": _vm.newIconSize\n }\n })], 1) : _vm._e(), _vm._v(\" \"), _c('div', {\n staticClass: \"media-content\"\n }, [_vm._t(\"default\")], 2)])])]) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 146 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(147),\n /* template */\n __webpack_require__(148),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 147 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__ = __webpack_require__(63);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BNotification',\n mixins: [__WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__[\"a\" /* default */]]\n});\n\n/***/ }),\n/* 148 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": \"fade\"\n }\n }, [(_vm.isActive) ? _c('article', {\n staticClass: \"notification\",\n class: _vm.type\n }, [(_vm.closable) ? _c('button', {\n staticClass: \"delete\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": _vm.close\n }\n }) : _vm._e(), _vm._v(\" \"), _c('div', {\n staticClass: \"media\"\n }, [(_vm.icon && _vm.hasIcon) ? _c('div', {\n staticClass: \"media-left\"\n }, [_c('b-icon', {\n attrs: {\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\",\n \"size\": \"is-large\"\n }\n })], 1) : _vm._e(), _vm._v(\" \"), _c('div', {\n staticClass: \"media-content\"\n }, [_vm._t(\"default\")], 2)])]) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 149 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_BaseElementMixin__ = __webpack_require__(13);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BPagination',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a),\n mixins: [__WEBPACK_IMPORTED_MODULE_2__utils_BaseElementMixin__[\"a\" /* default */]],\n props: {\n total: [Number, String],\n perPage: {\n type: [Number, String],\n default: 20\n },\n current: {\n type: [Number, String],\n default: 1\n },\n size: String,\n simple: Boolean,\n rounded: Boolean,\n order: String\n },\n computed: {\n rootClasses: function rootClasses() {\n return [this.order, this.size, {\n 'is-simple': this.simple,\n 'is-rounded': this.rounded\n }];\n },\n\n\n /**\n * Total page size (count).\n */\n pageCount: function pageCount() {\n return Math.ceil(this.total / this.perPage);\n },\n\n\n /**\n * First item of the page (count).\n */\n firstItem: function firstItem() {\n var firstItem = this.current * this.perPage - this.perPage + 1;\n return firstItem >= 0 ? firstItem : 0;\n },\n\n\n /**\n * Check if previous button is available.\n */\n hasPrev: function hasPrev() {\n return this.current > 1;\n },\n\n\n /**\n * Check if first page button should be visible.\n */\n hasFirst: function hasFirst() {\n return this.current >= 3;\n },\n\n\n /**\n * Check if first ellipsis should be visible.\n */\n hasFirstEllipsis: function hasFirstEllipsis() {\n return this.current >= 4;\n },\n\n\n /**\n * Check if last page button should be visible.\n */\n hasLast: function hasLast() {\n return this.current <= this.pageCount - 2;\n },\n\n\n /**\n * Check if last ellipsis should be visible.\n */\n hasLastEllipsis: function hasLastEllipsis() {\n return this.current < this.pageCount - 2 && this.current <= this.pageCount - 3;\n },\n\n\n /**\n * Check if next button is available.\n */\n hasNext: function hasNext() {\n return this.current < this.pageCount;\n },\n\n\n /**\n * Get near pages, 1 before and 1 after the current.\n * Also add the click event to the array.\n */\n pagesInRange: function pagesInRange() {\n var _this = this;\n\n if (this.simple) return;\n\n var left = Math.max(1, this.current - 1);\n var right = Math.min(this.current + 1, this.pageCount);\n\n var pages = [];\n\n var _loop = function _loop(i) {\n pages.push({\n number: i,\n isCurrent: _this.current === i,\n click: function click(event) {\n if (_this.current === i) return;\n _this.$emit('change', i);\n _this.$emit('update:current', i);\n\n // Set focus on element to keep tab order\n _this.$nextTick(function () {\n return event.target.focus();\n });\n }\n });\n };\n\n for (var i = left; i <= right; i++) {\n _loop(i);\n }\n return pages;\n }\n },\n watch: {\n /**\n * If current page is trying to be greater than page count, set to last.\n */\n pageCount: function pageCount(value) {\n if (this.current > value) this.last();\n }\n },\n methods: {\n /**\n * Previous button click listener.\n */\n prev: function prev() {\n if (!this.hasPrev) return;\n this.$emit('change', this.current - 1);\n this.$emit('update:current', this.current - 1);\n },\n\n\n /**\n * First button click listener.\n */\n first: function first() {\n this.$emit('change', 1);\n this.$emit('update:current', 1);\n },\n\n\n /**\n * Last button click listener.\n */\n last: function last() {\n this.$emit('change', this.pageCount);\n this.$emit('update:current', this.pageCount);\n },\n\n\n /**\n * Next button click listener.\n */\n next: function next() {\n if (!this.hasNext) return;\n this.$emit('change', this.current + 1);\n this.$emit('update:current', this.current + 1);\n }\n }\n});\n\n/***/ }),\n/* 150 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"pagination\",\n class: _vm.rootClasses\n }, [_c('a', {\n staticClass: \"pagination-previous\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\",\n \"disabled\": !_vm.hasPrev\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.prev($event)\n }\n }\n }, [_c('b-icon', {\n attrs: {\n \"icon\": \"chevron-left\",\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\"\n }\n })], 1), _vm._v(\" \"), _c('a', {\n staticClass: \"pagination-next\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\",\n \"disabled\": !_vm.hasNext\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.next($event)\n }\n }\n }, [_c('b-icon', {\n attrs: {\n \"icon\": \"chevron-right\",\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\"\n }\n })], 1), _vm._v(\" \"), (!_vm.simple) ? _c('ul', {\n staticClass: \"pagination-list\"\n }, [(_vm.hasFirst) ? _c('li', [_c('a', {\n staticClass: \"pagination-link\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.first($event)\n }\n }\n }, [_vm._v(\"\\n 1\\n \")])]) : _vm._e(), _vm._v(\" \"), (_vm.hasFirstEllipsis) ? _c('li', [_c('span', {\n staticClass: \"pagination-ellipsis\"\n }, [_vm._v(\"…\")])]) : _vm._e(), _vm._v(\" \"), _vm._l((_vm.pagesInRange), function(page) {\n return _c('li', {\n key: page.number\n }, [_c('a', {\n staticClass: \"pagination-link\",\n class: {\n 'is-current': page.isCurrent\n },\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n page.click($event)\n }\n }\n }, [_vm._v(\"\\n \" + _vm._s(page.number) + \"\\n \")])])\n }), _vm._v(\" \"), (_vm.hasLastEllipsis) ? _c('li', [_c('span', {\n staticClass: \"pagination-ellipsis\"\n }, [_vm._v(\"…\")])]) : _vm._e(), _vm._v(\" \"), (_vm.hasLast) ? _c('li', [_c('a', {\n staticClass: \"pagination-link\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.last($event)\n }\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.pageCount) + \"\\n \")])]) : _vm._e()], 2) : _vm._e(), _vm._v(\" \"), (_vm.simple) ? _c('small', {\n staticClass: \"info\"\n }, [(_vm.perPage == 1) ? [_vm._v(\"\\n \" + _vm._s(_vm.firstItem) + \" / \" + _vm._s(_vm.total) + \"\\n \")] : [_vm._v(\"\\n \" + _vm._s(_vm.firstItem) + \"-\" + _vm._s(Math.min(_vm.current * _vm.perPage, _vm.total)) + \" / \" + _vm._s(_vm.total) + \"\\n \")]], 2) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 151 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(152),\n /* template */\n __webpack_require__(153),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 152 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_BaseElementMixin__ = __webpack_require__(13);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BPanel',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a),\n mixins: [__WEBPACK_IMPORTED_MODULE_2__utils_BaseElementMixin__[\"a\" /* default */]],\n props: {\n collapsible: {\n type: Boolean,\n default: false\n },\n open: {\n type: Boolean,\n default: true\n },\n hasCustomTemplate: {\n type: Boolean,\n default: false\n },\n header: String,\n content: String,\n animation: {\n type: String,\n default: 'fade'\n }\n },\n data: function data() {\n return {\n isOpen: this.open\n };\n },\n\n watch: {\n open: function open(value) {\n this.isOpen = value;\n }\n },\n methods: {\n /**\n * Toggle the Panel and emit events if collapsible.\n */\n toggle: function toggle() {\n if (!this.collapsible) return;\n\n this.isOpen = !this.isOpen;\n this.$emit('update:open', this.isOpen);\n\n if (this.isOpen) {\n this.$emit('open');\n } else {\n this.$emit('close');\n }\n }\n }\n});\n\n/***/ }),\n/* 153 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('nav', {\n staticClass: \"panel\"\n }, [_c('div', {\n staticClass: \"panel-heading\",\n class: {\n 'is-collapsible': _vm.collapsible\n },\n on: {\n \"click\": _vm.toggle\n }\n }, [(_vm.header) ? _c('span', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.header)\n }\n }) : _vm._t(\"header\"), _vm._v(\" \"), (_vm.collapsible) ? _c('b-icon', {\n staticClass: \"is-pulled-right\",\n attrs: {\n \"both\": \"\",\n \"icon\": _vm.isOpen ? 'menu-up' : 'menu-down',\n \"icon-pack\": _vm.iconPack\n }\n }) : _vm._e()], 2), _vm._v(\" \"), _c('transition', {\n attrs: {\n \"name\": _vm.animation\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isOpen),\n expression: \"isOpen\"\n }],\n staticClass: \"panel-content\",\n class: {\n 'panel-block': !_vm.hasCustomTemplate\n }\n }, [(_vm.content) ? _c('div', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.content)\n }\n }) : _vm._t(\"default\")], 2)])], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 154 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(155),\n /* template */\n __webpack_require__(156),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 155 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BRadio',\n props: {\n value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n type: String,\n disabled: Boolean,\n required: Boolean,\n name: String,\n size: String\n },\n data: function data() {\n return {\n newValue: this.value\n };\n },\n\n watch: {\n /**\n * When v-model change, set internal value.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n /**\n * Emit input event to update the user v-model.\n */\n newValue: function newValue(value) {\n // only trigger input event\n // when current bRadioButton is clicked.\n if (value === this.nativeValue) {\n this.$emit('input', value);\n }\n }\n }\n});\n\n/***/ }),\n/* 156 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('label', {\n ref: \"label\",\n staticClass: \"b-radio radio\",\n class: [_vm.size, {\n 'is-disabled': _vm.disabled\n }],\n attrs: {\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.disabled ? false : 0\n },\n on: {\n \"keydown\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.$refs.label.click()\n }\n }\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newValue),\n expression: \"newValue\"\n }],\n attrs: {\n \"type\": \"radio\",\n \"disabled\": _vm.disabled,\n \"required\": _vm.required,\n \"name\": _vm.name\n },\n domProps: {\n \"value\": _vm.nativeValue,\n \"checked\": _vm._q(_vm.newValue, _vm.nativeValue)\n },\n on: {\n \"change\": function($event) {\n _vm.newValue = _vm.nativeValue\n }\n }\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"check\",\n class: _vm.type\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"control-label\"\n }, [_vm._t(\"default\")], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 157 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(158),\n /* template */\n __webpack_require__(159),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 158 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BRadioButton',\n props: {\n value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n type: {\n type: String,\n default: 'is-primary'\n },\n disabled: Boolean,\n name: String,\n size: String\n },\n data: function data() {\n return {\n newValue: this.value\n };\n },\n\n watch: {\n /**\n * When v-model change, set internal value.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n /**\n * Emit input event to update the user v-model.\n */\n newValue: function newValue(value) {\n // only trigger input event\n // when current bRadioButton is clicked.\n if (value === this.nativeValue) {\n this.$emit('input', value);\n }\n }\n }\n});\n\n/***/ }),\n/* 159 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"control\"\n }, [_c('label', {\n ref: \"label\",\n staticClass: \"b-radio radio button\",\n class: [_vm.newValue === _vm.nativeValue ? _vm.type : null, _vm.size],\n attrs: {\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.disabled ? false : 0\n },\n on: {\n \"keydown\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.$refs.label.click()\n }\n }\n }, [_vm._t(\"default\"), _vm._v(\" \"), _c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newValue),\n expression: \"newValue\"\n }],\n attrs: {\n \"type\": \"radio\",\n \"disabled\": _vm.disabled,\n \"name\": _vm.name\n },\n domProps: {\n \"value\": _vm.nativeValue,\n \"checked\": _vm._q(_vm.newValue, _vm.nativeValue)\n },\n on: {\n \"change\": function($event) {\n _vm.newValue = _vm.nativeValue\n }\n }\n })], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 160 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(161),\n /* template */\n __webpack_require__(162),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 161 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__ = __webpack_require__(65);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BSnackbar',\n mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__[\"a\" /* default */]],\n props: {\n actionText: {\n type: String,\n default: 'OK'\n },\n onAction: {\n type: Function,\n default: function _default() {}\n },\n indefinite: {\n type: Boolean,\n default: false\n }\n },\n data: function data() {\n return {\n newDuration: this.duration || __WEBPACK_IMPORTED_MODULE_0__utils_config__[\"a\" /* default */].defaultSnackbarDuration\n };\n },\n\n methods: {\n /**\n * Click listener.\n * Call action prop before closing (from Mixin).\n */\n action: function action() {\n this.onAction();\n this.close();\n }\n }\n});\n\n/***/ }),\n/* 162 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"enter-active-class\": _vm.transition.enter,\n \"leave-active-class\": _vm.transition.leave\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isActive),\n expression: \"isActive\"\n }],\n staticClass: \"snackbar\",\n class: [_vm.type, _vm.position]\n }, [_c('p', {\n staticClass: \"text\"\n }, [_vm._v(_vm._s(_vm.message))]), _vm._v(\" \"), (_vm.actionText) ? _c('div', {\n staticClass: \"action\",\n class: _vm.type,\n on: {\n \"click\": _vm.action\n }\n }, [_c('button', {\n staticClass: \"button is-dark\"\n }, [_vm._v(_vm._s(_vm.actionText))])]) : _vm._e()])])\n},staticRenderFns: []}\n\n/***/ }),\n/* 163 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(164),\n /* template */\n __webpack_require__(165),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 164 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BSwitch',\n props: {\n value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n disabled: Boolean,\n type: String,\n name: String,\n size: String,\n trueValue: {\n type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n default: true\n },\n falseValue: {\n type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n default: false\n }\n },\n data: function data() {\n return {\n newValue: this.value,\n isMouseDown: false\n };\n },\n\n watch: {\n /**\n * When v-model change, set internal value.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n /**\n * Emit input event to update the user v-model.\n */\n newValue: function newValue(value) {\n this.$emit('input', value);\n }\n }\n});\n\n/***/ }),\n/* 165 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('label', {\n ref: \"label\",\n staticClass: \"switch\",\n class: [_vm.size, {\n 'is-disabled': _vm.disabled\n }],\n attrs: {\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.disabled ? false : 0\n },\n on: {\n \"keydown\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.$refs.label.click()\n },\n \"mousedown\": function($event) {\n _vm.isMouseDown = true\n },\n \"mouseup\": function($event) {\n _vm.isMouseDown = false\n },\n \"mouseout\": function($event) {\n _vm.isMouseDown = false\n },\n \"blur\": function($event) {\n _vm.isMouseDown = false\n }\n }\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newValue),\n expression: \"newValue\"\n }],\n attrs: {\n \"type\": \"checkbox\",\n \"disabled\": _vm.disabled,\n \"name\": _vm.name,\n \"true-value\": _vm.trueValue,\n \"false-value\": _vm.falseValue\n },\n domProps: {\n \"value\": _vm.nativeValue,\n \"checked\": Array.isArray(_vm.newValue) ? _vm._i(_vm.newValue, _vm.nativeValue) > -1 : _vm._q(_vm.newValue, _vm.trueValue)\n },\n on: {\n \"click\": function($event) {\n $event.stopPropagation();\n },\n \"change\": function($event) {\n var $$a = _vm.newValue,\n $$el = $event.target,\n $$c = $$el.checked ? (_vm.trueValue) : (_vm.falseValue);\n if (Array.isArray($$a)) {\n var $$v = _vm.nativeValue,\n $$i = _vm._i($$a, $$v);\n if ($$el.checked) {\n $$i < 0 && (_vm.newValue = $$a.concat([$$v]))\n } else {\n $$i > -1 && (_vm.newValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1)))\n }\n } else {\n _vm.newValue = $$c\n }\n }\n }\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"check\",\n class: [{\n 'is-elastic': _vm.isMouseDown && !_vm.disabled\n }, _vm.type]\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"control-label\"\n }, [_vm._t(\"default\")], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 166 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(167),\n /* template */\n __webpack_require__(181),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 167 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray__ = __webpack_require__(168);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox__ = __webpack_require__(61);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination__ = __webpack_require__(64);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__pagination_Pagination__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__TableMobileSort__ = __webpack_require__(176);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__TableMobileSort___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__TableMobileSort__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__TableColumn__ = __webpack_require__(66);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__TableColumn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__TableColumn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_BaseElementMixin__ = __webpack_require__(13);\n\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTable',\n components: (_components = {}, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox___default.a.name, __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_4__icon_Icon___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination___default.a.name, __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_6__TableMobileSort___default.a.name, __WEBPACK_IMPORTED_MODULE_6__TableMobileSort___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_7__TableColumn___default.a.name, __WEBPACK_IMPORTED_MODULE_7__TableColumn___default.a), _components),\n mixins: [__WEBPACK_IMPORTED_MODULE_8__utils_BaseElementMixin__[\"a\" /* default */]],\n props: {\n data: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n columns: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n bordered: Boolean,\n striped: Boolean,\n narrowed: Boolean,\n hoverable: Boolean,\n loading: Boolean,\n detailed: Boolean,\n checkable: Boolean,\n selected: Object,\n focusable: Boolean,\n customIsChecked: Function,\n isRowCheckable: {\n type: Function,\n default: function _default() {\n return true;\n }\n },\n checkedRows: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n mobileCards: {\n type: Boolean,\n default: true\n },\n defaultSort: [String, Array],\n defaultSortDirection: {\n type: String,\n default: 'asc'\n },\n paginated: Boolean,\n currentPage: {\n type: Number,\n default: 1\n },\n perPage: {\n type: [Number, String],\n default: 20\n },\n paginationSimple: Boolean,\n paginationSize: String,\n backendSorting: Boolean,\n rowClass: {\n type: Function,\n default: function _default() {\n return '';\n }\n },\n openedDetailed: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n hasDetailedVisible: {\n type: Function,\n default: function _default() {\n return true;\n }\n },\n detailKey: {\n type: String,\n default: ''\n },\n backendPagination: Boolean,\n total: {\n type: [Number, String],\n default: 0\n }\n },\n data: function data() {\n return {\n getValueByPath: __WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"b\" /* getValueByPath */],\n newColumns: [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(this.columns)),\n visibleDetailRows: this.openedDetailed,\n newData: this.data,\n newDataTotal: this.backendPagination ? this.total : this.data.length,\n newCheckedRows: [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(this.checkedRows)),\n newCurrentPage: this.currentPage,\n currentSortColumn: {},\n isAsc: true,\n firstTimeSort: true, // Used by first time initSort\n _isTable: true // Used by TableColumn\n };\n },\n\n computed: {\n tableClasses: function tableClasses() {\n return {\n 'is-bordered': this.bordered,\n 'is-striped': this.striped,\n 'is-narrow': this.narrowed,\n 'has-mobile-cards': this.mobileCards,\n 'is-hoverable': (this.hoverable || this.focusable) && this.visibleData.length\n };\n },\n\n\n /**\n * Splitted data based on the pagination.\n */\n visibleData: function visibleData() {\n if (!this.paginated) return this.newData;\n\n var currentPage = this.newCurrentPage;\n var perPage = this.perPage;\n\n if (this.newData.length <= perPage) {\n return this.newData;\n } else {\n var start = (currentPage - 1) * perPage;\n var end = parseInt(start, 10) + parseInt(perPage, 10);\n return this.newData.slice(start, end);\n }\n },\n\n\n /**\n * Check if all rows in the page are checked.\n */\n isAllChecked: function isAllChecked() {\n var _this = this;\n\n var validVisibleData = this.visibleData.filter(function (row) {\n return _this.isRowCheckable(row);\n });\n if (validVisibleData.length === 0) return false;\n var isAllChecked = validVisibleData.some(function (currentVisibleRow) {\n return Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"c\" /* indexOf */])(_this.newCheckedRows, currentVisibleRow, _this.customIsChecked) < 0;\n });\n return !isAllChecked;\n },\n\n\n /**\n * Check if all rows in the page are checkable.\n */\n isAllUncheckable: function isAllUncheckable() {\n var _this2 = this;\n\n var validVisibleData = this.visibleData.filter(function (row) {\n return _this2.isRowCheckable(row);\n });\n return validVisibleData.length === 0;\n },\n\n\n /**\n * Check if has any sortable column.\n */\n hasSortablenewColumns: function hasSortablenewColumns() {\n return this.newColumns.some(function (column) {\n return column.sortable;\n });\n },\n\n\n /**\n * Return total column count based if it's checkable or expanded\n */\n columnCount: function columnCount() {\n var count = this.newColumns.length;\n count += this.checkable ? 1 : 0;\n count += this.detailed ? 1 : 0;\n\n return count;\n }\n },\n watch: {\n /**\n * When data prop change:\n * 1. Update internal value.\n * 2. Reset newColumns (thead), in case it's on a v-for loop.\n * 3. Sort again if it's not backend-sort.\n * 4. Set new total if it's not backend-paginated.\n */\n data: function data(value) {\n var _this3 = this;\n\n // Save newColumns before resetting\n var newColumns = this.newColumns;\n\n this.newColumns = [];\n this.newData = value;\n\n // Prevent table from being headless, data could change and created hook\n // on column might not trigger\n this.$nextTick(function () {\n if (!_this3.newColumns.length) _this3.newColumns = newColumns;\n });\n\n if (!this.backendSorting) {\n this.sort(this.currentSortColumn, true);\n }\n if (!this.backendPagination) {\n this.newDataTotal = value.length;\n }\n },\n\n\n /**\n * When Pagination total change, update internal total\n * only if it's backend-paginated.\n */\n total: function total(newTotal) {\n if (!this.backendPagination) return;\n\n this.newDataTotal = newTotal;\n },\n\n\n /**\n * When checkedRows prop change, update internal value without\n * mutating original data.\n */\n checkedRows: function checkedRows(rows) {\n this.newCheckedRows = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(rows));\n },\n columns: function columns(value) {\n this.newColumns = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(value));\n },\n\n\n /**\n * When newColumns change, call initSort only first time (For example async data).\n */\n newColumns: function newColumns(_newColumns) {\n if (_newColumns.length && this.firstTimeSort) {\n this.initSort();\n this.firstTimeSort = false;\n } else if (_newColumns.length) {\n if (this.currentSortColumn.field) {\n for (var i = 0; i < _newColumns.length; i++) {\n if (_newColumns[i].field === this.currentSortColumn.field) {\n this.currentSortColumn = _newColumns[i];\n break;\n }\n }\n }\n }\n },\n\n\n /**\n * When the user wants to control the detailed rows via props.\n * Or wants to open the details of certain row with the router for example.\n */\n openedDetailed: function openedDetailed(expandedRows) {\n this.visibleDetailRows = expandedRows;\n },\n currentPage: function currentPage(newVal) {\n this.newCurrentPage = newVal;\n }\n },\n methods: {\n /**\n * Sort an array by key without mutating original data.\n * Call the user sort function if it was passed.\n */\n sortBy: function sortBy(array, key, fn, isAsc) {\n var sorted = [];\n // Sorting without mutating original data\n if (fn && typeof fn === 'function') {\n sorted = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(array)).sort(function (a, b) {\n return fn(a, b, isAsc);\n });\n } else {\n sorted = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(array)).sort(function (a, b) {\n // Get nested values from objects\n var newA = Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"b\" /* getValueByPath */])(a, key);\n var newB = Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"b\" /* getValueByPath */])(b, key);\n\n if (!newA && newA !== 0) return 1;\n if (!newB && newB !== 0) return -1;\n if (newA === newB) return 0;\n\n newA = typeof newA === 'string' ? newA.toUpperCase() : newA;\n newB = typeof newB === 'string' ? newB.toUpperCase() : newB;\n\n return isAsc ? newA > newB ? 1 : -1 : newA > newB ? -1 : 1;\n });\n }\n\n return sorted;\n },\n\n\n /**\n * Sort the column.\n * Toggle current direction on column if it's sortable\n * and not just updating the prop.\n */\n sort: function sort(column) {\n var updatingData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!column || !column.sortable) return;\n\n if (!updatingData) {\n this.isAsc = column === this.currentSortColumn ? !this.isAsc : this.defaultSortDirection.toLowerCase() !== 'desc';\n }\n if (!this.firstTimeSort) {\n this.$emit('sort', column.field, this.isAsc ? 'asc' : 'desc');\n }\n if (!this.backendSorting) {\n this.newData = this.sortBy(this.newData, column.field, column.customSort, this.isAsc);\n }\n this.currentSortColumn = column;\n },\n\n\n /**\n * Check if the row is checked (is added to the array).\n */\n isRowChecked: function isRowChecked(row) {\n return Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"c\" /* indexOf */])(this.newCheckedRows, row, this.customIsChecked) >= 0;\n },\n\n\n /**\n * Remove a checked row from the array.\n */\n removeCheckedRow: function removeCheckedRow(row) {\n var index = Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"c\" /* indexOf */])(this.newCheckedRows, row, this.customIsChecked);\n if (index >= 0) {\n this.newCheckedRows.splice(index, 1);\n }\n },\n\n\n /**\n * Header checkbox click listener.\n * Add or remove all rows in current page.\n */\n checkAll: function checkAll() {\n var _this4 = this;\n\n var isAllChecked = this.isAllChecked;\n this.visibleData.forEach(function (currentRow) {\n _this4.removeCheckedRow(currentRow);\n if (!isAllChecked) {\n if (_this4.isRowCheckable(currentRow)) {\n _this4.newCheckedRows.push(currentRow);\n }\n }\n });\n\n this.$emit('check', this.newCheckedRows);\n this.$emit('check-all', this.newCheckedRows);\n\n // Emit checked rows to update user variable\n this.$emit('update:checkedRows', this.newCheckedRows);\n },\n\n\n /**\n * Row checkbox click listener.\n * Add or remove a single row.\n */\n checkRow: function checkRow(row) {\n if (!this.isRowChecked(row)) {\n this.newCheckedRows.push(row);\n } else {\n this.removeCheckedRow(row);\n }\n\n this.$emit('check', this.newCheckedRows, row);\n\n // Emit checked rows to update user variable\n this.$emit('update:checkedRows', this.newCheckedRows);\n },\n\n\n /**\n * Row click listener.\n * Emit all necessary events.\n */\n selectRow: function selectRow(row, index) {\n this.$emit('click', row);\n\n if (this.selected === row) return;\n\n // Emit new and old row\n this.$emit('select', row, this.selected);\n\n // Emit new row to update user variable\n this.$emit('update:selected', row);\n },\n\n\n /**\n * Paginator change listener.\n */\n pageChanged: function pageChanged(page) {\n this.newCurrentPage = page > 0 ? page : 1;\n this.$emit('page-change', this.newCurrentPage);\n this.$emit('update:currentPage', this.newCurrentPage);\n },\n\n\n /**\n * Toggle to show/hide details slot\n */\n toggleDetails: function toggleDetails(obj) {\n var found = this.isVisibleDetailRow(obj);\n\n if (found) {\n this.closeDetailRow(obj);\n this.$emit('details-close', obj);\n } else {\n this.openDetailRow(obj);\n this.$emit('details-open', obj);\n }\n\n // Syncs the detailed rows with the parent component\n this.$emit('update:openedDetailed', this.visibleDetailRows);\n },\n openDetailRow: function openDetailRow(obj) {\n var index = this.handleDetailKey(obj);\n this.visibleDetailRows.push(index);\n },\n closeDetailRow: function closeDetailRow(obj) {\n var index = this.handleDetailKey(obj);\n var i = this.visibleDetailRows.indexOf(index);\n this.visibleDetailRows.splice(i, 1);\n },\n isVisibleDetailRow: function isVisibleDetailRow(obj) {\n var index = this.handleDetailKey(obj);\n var result = this.visibleDetailRows.indexOf(index) >= 0;\n return result;\n },\n\n\n /**\n * When the detailKey is defined we use the object[detailKey] as index.\n * If not, use the object reference by default.\n */\n handleDetailKey: function handleDetailKey(index) {\n var key = this.detailKey;\n return !key.length ? index : index[key];\n },\n checkPredefinedDetailedRows: function checkPredefinedDetailedRows() {\n var defaultExpandedRowsDefined = this.openedDetailed.length > 0;\n if (defaultExpandedRowsDefined && !this.detailKey.length) {\n throw new Error('If you set a predefined opened-detailed, you must provide an unique key using the prop \"detail-key\"');\n }\n },\n\n\n /**\n * Check if footer slot has custom content.\n */\n hasCustomFooterSlot: function hasCustomFooterSlot() {\n if (this.$slots.footer.length > 1) return true;\n\n var tag = this.$slots.footer[0].tag;\n if (tag !== 'th' && tag !== 'td') return false;\n\n return true;\n },\n\n\n /**\n * Check if bottom-left slot exists.\n */\n hasBottomLeftSlot: function hasBottomLeftSlot() {\n return typeof this.$slots['bottom-left'] !== 'undefined';\n },\n\n\n /**\n * Table arrow keys listener, change selection.\n */\n pressedArrow: function pressedArrow(pos) {\n if (!this.visibleData.length) return;\n\n var index = this.visibleData.indexOf(this.selected) + pos;\n\n // Prevent from going up from first and down from last\n index = index < 0 ? 0 : index > this.visibleData.length - 1 ? this.visibleData.length - 1 : index;\n\n this.selectRow(this.visibleData[index]);\n },\n\n\n /**\n * Focus table element if has selected prop.\n */\n focus: function focus() {\n if (!this.focusable) return;\n\n this.$el.querySelector('table').focus();\n },\n\n\n /**\n * Initial sorted column based on the default-sort prop.\n */\n initSort: function initSort() {\n var _this5 = this;\n\n if (!this.defaultSort) return;\n\n var sortField = '';\n var sortDirection = this.defaultSortDirection;\n\n if (Array.isArray(this.defaultSort)) {\n sortField = this.defaultSort[0];\n if (this.defaultSort[1]) {\n sortDirection = this.defaultSort[1];\n }\n } else {\n sortField = this.defaultSort;\n }\n\n this.newColumns.forEach(function (column) {\n if (column.field === sortField) {\n _this5.isAsc = sortDirection.toLowerCase() !== 'desc';\n _this5.sort(column, true);\n }\n });\n }\n },\n\n mounted: function mounted() {\n this.checkPredefinedDetailedRows();\n }\n});\n\n/***/ }),\n/* 168 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _from = __webpack_require__(169);\n\nvar _from2 = _interopRequireDefault(_from);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return (0, _from2.default)(arr);\n }\n};\n\n/***/ }),\n/* 169 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(170), __esModule: true };\n\n/***/ }),\n/* 170 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(38);\n__webpack_require__(171);\nmodule.exports = __webpack_require__(8).Array.from;\n\n\n/***/ }),\n/* 171 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ctx = __webpack_require__(46);\nvar $export = __webpack_require__(18);\nvar toObject = __webpack_require__(37);\nvar call = __webpack_require__(172);\nvar isArrayIter = __webpack_require__(173);\nvar toLength = __webpack_require__(51);\nvar createProperty = __webpack_require__(174);\nvar getIterFn = __webpack_require__(60);\n\n$export($export.S + $export.F * !__webpack_require__(175)(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n\n\n/***/ }),\n/* 172 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// call something on iterator step with safe closing on error\nvar anObject = __webpack_require__(16);\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n\n\n/***/ }),\n/* 173 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// check on default Array iterator\nvar Iterators = __webpack_require__(22);\nvar ITERATOR = __webpack_require__(4)('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n\n/***/ }),\n/* 174 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $defineProperty = __webpack_require__(9);\nvar createDesc = __webpack_require__(21);\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n\n\n/***/ }),\n/* 175 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar ITERATOR = __webpack_require__(4)('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n\n\n/***/ }),\n/* 176 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(177),\n /* template */\n __webpack_require__(178),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 177 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__select_Select__ = __webpack_require__(28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__select_Select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__select_Select__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__icon_Icon__);\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTableMobileSort',\n components: (_components = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_1__select_Select___default.a.name, __WEBPACK_IMPORTED_MODULE_1__select_Select___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a), _components),\n props: {\n currentSortColumn: Object,\n isAsc: Boolean,\n columns: Array\n },\n data: function data() {\n return {\n mobileSort: this.currentSortColumn\n };\n },\n\n watch: {\n mobileSort: function mobileSort(column) {\n if (this.currentSortColumn === column) return;\n\n this.$emit('sort', column);\n },\n currentSortColumn: function currentSortColumn(column) {\n this.mobileSort = column;\n }\n },\n methods: {\n sort: function sort() {\n this.$emit('sort', this.mobileSort);\n }\n }\n});\n\n/***/ }),\n/* 178 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"field table-mobile-sort\"\n }, [_c('div', {\n staticClass: \"field has-addons\"\n }, [_c('b-select', {\n attrs: {\n \"expanded\": \"\"\n },\n model: {\n value: (_vm.mobileSort),\n callback: function($$v) {\n _vm.mobileSort = $$v\n },\n expression: \"mobileSort\"\n }\n }, _vm._l((_vm.columns), function(column, index) {\n return (column.sortable) ? _c('option', {\n key: index,\n domProps: {\n \"value\": column\n }\n }, [_vm._v(\"\\n \" + _vm._s(column.label) + \"\\n \")]) : _vm._e()\n })), _vm._v(\" \"), _c('div', {\n staticClass: \"control\"\n }, [_c('button', {\n staticClass: \"button is-primary\",\n on: {\n \"click\": _vm.sort\n }\n }, [_c('b-icon', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.currentSortColumn === _vm.mobileSort),\n expression: \"currentSortColumn === mobileSort\"\n }],\n class: {\n 'is-desc': !_vm.isAsc\n },\n attrs: {\n \"icon\": \"arrow-up\",\n \"size\": \"is-small\",\n \"both\": \"\"\n }\n })], 1)])], 1)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 179 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTableColumn',\n props: {\n label: String,\n customKey: [String, Number],\n field: String,\n meta: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n width: [Number, String],\n numeric: Boolean,\n centered: Boolean,\n sortable: Boolean,\n visible: {\n type: Boolean,\n default: true\n },\n customSort: Function,\n internal: Boolean // Used internally by Table\n },\n data: function data() {\n return {\n newKey: this.customKey || this.label\n };\n },\n\n computed: {\n rootClasses: function rootClasses() {\n return {\n 'has-text-right': this.numeric && !this.centered,\n 'has-text-centered': this.centered\n };\n }\n },\n beforeMount: function beforeMount() {\n var _this = this;\n\n if (!this.$parent.$data._isTable) {\n this.$destroy();\n throw new Error('You should wrap bTableColumn on a bTable');\n }\n\n if (this.internal) return;\n\n // Since we're using scoped prop the columns gonna be multiplied,\n // this finds when to stop based on the newKey property.\n var repeated = this.$parent.columns.some(function (column) {\n return column.newKey === _this.newKey;\n });\n !repeated && this.$parent.columns.push(this);\n },\n beforeDestroy: function beforeDestroy() {\n var index = this.$parent.columns.map(function (column) {\n return column.newKey;\n }).indexOf(this.newKey);\n if (index >= 0) {\n this.$parent.columns.splice(index, 1);\n }\n }\n});\n\n/***/ }),\n/* 180 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return (_vm.visible) ? _c('td', {\n class: _vm.rootClasses,\n attrs: {\n \"data-label\": _vm.label\n }\n }, [_c('span', [_vm._t(\"default\")], 2)]) : _vm._e()\n},staticRenderFns: []}\n\n/***/ }),\n/* 181 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"b-table\",\n class: {\n 'is-loading': _vm.loading\n }\n }, [(_vm.mobileCards && _vm.hasSortablenewColumns) ? _c('b-table-mobile-sort', {\n attrs: {\n \"current-sort-column\": _vm.currentSortColumn,\n \"is-asc\": _vm.isAsc,\n \"columns\": _vm.newColumns\n },\n on: {\n \"sort\": function (column) { return _vm.sort(column); }\n }\n }) : _vm._e(), _vm._v(\" \"), _c('div', {\n staticClass: \"table-wrapper\"\n }, [_c('table', {\n staticClass: \"table\",\n class: _vm.tableClasses,\n attrs: {\n \"tabindex\": !_vm.focusable ? false : 0\n },\n on: {\n \"keydown\": [function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"up\", 38, $event.key)) { return null; }\n $event.preventDefault();\n _vm.pressedArrow(-1)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"down\", 40, $event.key)) { return null; }\n $event.preventDefault();\n _vm.pressedArrow(1)\n }]\n }\n }, [(_vm.newColumns.length) ? _c('thead', [_c('tr', [(_vm.detailed) ? _c('th', {\n attrs: {\n \"width\": \"40px\"\n }\n }) : _vm._e(), _vm._v(\" \"), (_vm.checkable) ? _c('th', {\n staticClass: \"checkbox-cell\"\n }, [_c('b-checkbox', {\n attrs: {\n \"value\": _vm.isAllChecked,\n \"disabled\": _vm.isAllUncheckable\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.checkAll($event)\n }\n }\n })], 1) : _vm._e(), _vm._v(\" \"), _vm._l((_vm.newColumns), function(column, index) {\n return (column.visible || column.visible === undefined) ? _c('th', {\n key: index,\n class: {\n 'is-current-sort': _vm.currentSortColumn === column,\n 'is-sortable': column.sortable\n },\n style: ({\n width: column.width + 'px'\n }),\n on: {\n \"click\": function($event) {\n $event.stopPropagation();\n _vm.sort(column)\n }\n }\n }, [_c('div', {\n staticClass: \"th-wrap\",\n class: {\n 'is-numeric': column.numeric,\n 'is-centered': column.centered\n }\n }, [(_vm.$scopedSlots.header) ? _vm._t(\"header\", null, {\n column: column,\n index: index\n }) : [_vm._v(_vm._s(column.label))], _vm._v(\" \"), _c('b-icon', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.currentSortColumn === column),\n expression: \"currentSortColumn === column\"\n }],\n class: {\n 'is-desc': !_vm.isAsc\n },\n attrs: {\n \"icon\": \"arrow-up\",\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\",\n \"size\": \"is-small\"\n }\n })], 2)]) : _vm._e()\n })], 2)]) : _vm._e(), _vm._v(\" \"), (_vm.visibleData.length) ? _c('tbody', [_vm._l((_vm.visibleData), function(row, index) {\n return [_c('tr', {\n key: index,\n class: [_vm.rowClass(row, index), {\n 'is-selected': row === _vm.selected,\n 'is-checked': _vm.isRowChecked(row)\n }],\n on: {\n \"click\": function($event) {\n _vm.selectRow(row)\n },\n \"dblclick\": function($event) {\n _vm.$emit('dblclick', row)\n }\n }\n }, [(_vm.detailed) ? _c('td', {\n staticClass: \"chevron-cell\"\n }, [(_vm.hasDetailedVisible(row)) ? _c('a', {\n attrs: {\n \"role\": \"button\"\n },\n on: {\n \"click\": function($event) {\n $event.stopPropagation();\n _vm.toggleDetails(row)\n }\n }\n }, [_c('b-icon', {\n class: {\n 'is-expanded': _vm.isVisibleDetailRow(row)\n },\n attrs: {\n \"icon\": \"chevron-right\",\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\"\n }\n })], 1) : _vm._e()]) : _vm._e(), _vm._v(\" \"), (_vm.checkable) ? _c('td', {\n staticClass: \"checkbox-cell\"\n }, [_c('b-checkbox', {\n attrs: {\n \"disabled\": !_vm.isRowCheckable(row),\n \"value\": _vm.isRowChecked(row)\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.checkRow(row)\n }\n }\n })], 1) : _vm._e(), _vm._v(\" \"), (_vm.$scopedSlots.default) ? _vm._t(\"default\", null, {\n row: row,\n index: index\n }) : _vm._l((_vm.newColumns), function(column) {\n return _c('BTableColumn', _vm._b({\n key: column.field,\n attrs: {\n \"internal\": \"\"\n }\n }, 'BTableColumn', column, false), [(column.renderHtml) ? _c('span', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.getValueByPath(row, column.field))\n }\n }) : [_vm._v(\"\\n \" + _vm._s(_vm.getValueByPath(row, column.field)) + \"\\n \")]], 2)\n })], 2), _vm._v(\" \"), (_vm.detailed && _vm.isVisibleDetailRow(row)) ? _c('tr', {\n staticClass: \"detail\"\n }, [_c('td', {\n attrs: {\n \"colspan\": _vm.columnCount\n }\n }, [_c('div', {\n staticClass: \"detail-container\"\n }, [_vm._t(\"detail\", null, {\n row: row,\n index: index\n })], 2)])]) : _vm._e()]\n })], 2) : _c('tbody', [_c('tr', {\n staticClass: \"is-empty\"\n }, [_c('td', {\n attrs: {\n \"colspan\": _vm.columnCount\n }\n }, [_vm._t(\"empty\")], 2)])]), _vm._v(\" \"), (_vm.$slots.footer !== undefined) ? _c('tfoot', [_c('tr', {\n staticClass: \"table-footer\"\n }, [(_vm.hasCustomFooterSlot()) ? _vm._t(\"footer\") : _c('th', {\n attrs: {\n \"colspan\": _vm.columnCount\n }\n }, [_vm._t(\"footer\")], 2)], 2)]) : _vm._e()])]), _vm._v(\" \"), ((_vm.checkable && _vm.hasBottomLeftSlot()) || _vm.paginated) ? _c('div', {\n staticClass: \"level\"\n }, [_c('div', {\n staticClass: \"level-left\"\n }, [_vm._t(\"bottom-left\")], 2), _vm._v(\" \"), _c('div', {\n staticClass: \"level-right\"\n }, [(_vm.paginated) ? _c('div', {\n staticClass: \"level-item\"\n }, [_c('b-pagination', {\n attrs: {\n \"icon-pack\": _vm.iconPack,\n \"total\": _vm.newDataTotal,\n \"per-page\": _vm.perPage,\n \"simple\": _vm.paginationSimple,\n \"size\": _vm.paginationSize,\n \"current\": _vm.newCurrentPage\n },\n on: {\n \"change\": _vm.pageChanged\n }\n })], 1) : _vm._e()])]) : _vm._e()], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 182 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(183),\n /* template */\n __webpack_require__(184),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 183 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js\nvar defineProperty = __webpack_require__(1);\nvar defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);\n\n// EXTERNAL MODULE: ./src/components/icon/Icon.vue\nvar Icon = __webpack_require__(3);\nvar Icon_default = /*#__PURE__*/__webpack_require__.n(Icon);\n\n// CONCATENATED MODULE: ./src/utils/SlotComponent.js\n/* harmony default export */ var SlotComponent = ({\n name: 'BSlotComponent',\n props: {\n component: {\n type: Object,\n required: true\n },\n name: {\n type: String,\n default: 'default'\n },\n tag: {\n type: String,\n default: 'div'\n },\n event: {\n type: String,\n default: 'hook:updated'\n }\n },\n methods: {\n refresh: function refresh() {\n this.$forceUpdate();\n },\n isVueComponent: function isVueComponent() {\n return this.component && this.component._isVue;\n }\n },\n created: function created() {\n if (this.isVueComponent()) {\n this.component.$on(this.event, this.refresh);\n }\n },\n beforeDestroy: function beforeDestroy() {\n if (this.isVueComponent()) {\n this.component.$off(this.event, this.refresh);\n }\n },\n render: function render(h) {\n if (this.isVueComponent()) {\n var slots = this.component.$slots[this.name];\n return h(this.tag, {}, slots);\n }\n }\n});\n// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/tabs/Tabs.vue\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ var Tabs = __webpack_exports__[\"default\"] = ({\n name: 'BTabs',\n components: (_components = {}, defineProperty_default()(_components, Icon_default.a.name, Icon_default.a), defineProperty_default()(_components, SlotComponent.name, SlotComponent), _components),\n props: {\n value: [String, Number],\n expanded: Boolean,\n type: String,\n size: String,\n position: String,\n animated: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n activeTab: this.value || 0,\n tabItems: [],\n contentHeight: 0,\n _isTabs: true // Used internally by TabItem\n };\n },\n\n computed: {\n navClasses: function navClasses() {\n return [this.type, this.size, this.position, {\n 'is-fullwidth': this.expanded,\n 'is-toggle-rounded is-toggle': this.type === 'is-toggle-rounded'\n }];\n }\n },\n watch: {\n /**\n * When v-model is changed set the new active tab.\n */\n value: function value(_value) {\n this.changeTab(_value);\n },\n\n\n /**\n * When tab-items are updated, set active one.\n */\n tabItems: function tabItems() {\n if (this.tabItems.length) {\n this.tabItems[this.activeTab].isActive = true;\n }\n }\n },\n methods: {\n /**\n * Change the active tab and emit change event.\n */\n changeTab: function changeTab(newIndex) {\n if (this.activeTab === newIndex) return;\n\n this.tabItems[this.activeTab].deactivate(this.activeTab, newIndex);\n this.tabItems[newIndex].activate(this.activeTab, newIndex);\n this.activeTab = newIndex;\n this.$emit('change', newIndex);\n },\n\n\n /**\n * Tab click listener, emit input event and change active tab.\n */\n tabClick: function tabClick(value) {\n this.$emit('input', value);\n this.changeTab(value);\n }\n },\n mounted: function mounted() {\n if (this.tabItems.length) {\n this.tabItems[this.activeTab].isActive = true;\n }\n }\n});\n\n/***/ }),\n/* 184 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"b-tabs\",\n class: {\n 'is-fullwidth': _vm.expanded\n }\n }, [_c('nav', {\n staticClass: \"tabs\",\n class: _vm.navClasses\n }, [_c('ul', _vm._l((_vm.tabItems), function(tabItem, index) {\n return _c('li', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (tabItem.visible),\n expression: \"tabItem.visible\"\n }],\n key: index,\n class: {\n 'is-active': _vm.activeTab === index, 'is-disabled': tabItem.disabled\n }\n }, [_c('a', {\n on: {\n \"click\": function($event) {\n _vm.tabClick(index)\n }\n }\n }, [(tabItem.$slots.header) ? [_c('b-slot-component', {\n attrs: {\n \"component\": tabItem,\n \"name\": \"header\",\n \"tag\": \"span\"\n }\n })] : [(tabItem.icon) ? _c('b-icon', {\n attrs: {\n \"icon\": tabItem.icon,\n \"pack\": tabItem.iconPack,\n \"size\": _vm.size\n }\n }) : _vm._e(), _vm._v(\" \"), _c('span', [_vm._v(_vm._s(tabItem.label))])]], 2)])\n }))]), _vm._v(\" \"), _c('section', {\n staticClass: \"tab-content\"\n }, [_vm._t(\"default\")], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 185 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(186),\n /* template */\n __webpack_require__(187),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 186 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_BaseElementMixin__ = __webpack_require__(13);\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTabItem',\n mixins: [__WEBPACK_IMPORTED_MODULE_0__utils_BaseElementMixin__[\"a\" /* default */]],\n props: {\n label: String,\n icon: String,\n disabled: Boolean,\n visible: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n isActive: false,\n transitionName: null\n };\n },\n\n methods: {\n /**\n * Activate tab, alter animation name based on the index.\n */\n activate: function activate(oldIndex, index) {\n if (!this.$parent.animated) {\n this.transitionName = null;\n } else {\n this.transitionName = index < oldIndex ? 'slide-next' : 'slide-prev';\n }\n this.isActive = true;\n },\n\n\n /**\n * Deactivate tab, alter animation name based on the index.\n */\n deactivate: function deactivate(oldIndex, index) {\n if (!this.$parent.animated) {\n this.transitionName = null;\n } else {\n this.transitionName = index < oldIndex ? 'slide-next' : 'slide-prev';\n }\n this.isActive = false;\n }\n },\n created: function created() {\n if (!this.$parent.$data._isTabs) {\n this.$destroy();\n throw new Error('You should wrap bTabItem on a bTabs');\n }\n this.$parent.tabItems.push(this);\n },\n beforeDestroy: function beforeDestroy() {\n var index = this.$parent.tabItems.indexOf(this);\n if (index >= 0) {\n this.$parent.tabItems.splice(index, 1);\n }\n }\n});\n\n/***/ }),\n/* 187 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": _vm.transitionName\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isActive && _vm.visible),\n expression: \"isActive && visible\"\n }],\n staticClass: \"tab-item\"\n }, [_vm._t(\"default\")], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 188 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTag',\n props: {\n attached: Boolean,\n closable: Boolean,\n type: String,\n size: String,\n rounded: Boolean,\n disabled: Boolean,\n ellipsis: Boolean,\n tabstop: {\n type: Boolean,\n default: true\n }\n },\n methods: {\n /**\n * Emit close event when delete button is clicked\n * or delete key is pressed.\n */\n close: function close() {\n if (this.disabled) return;\n\n this.$emit('close');\n }\n }\n});\n\n/***/ }),\n/* 189 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return (_vm.attached && _vm.closable) ? _c('div', {\n staticClass: \"tags has-addons\"\n }, [_c('span', {\n staticClass: \"tag\",\n class: [_vm.type, _vm.size, {\n 'is-rounded': _vm.rounded\n }]\n }, [_c('span', {\n class: {\n 'has-ellipsis': _vm.ellipsis\n }\n }, [_vm._t(\"default\")], 2)]), _vm._v(\" \"), _c('a', {\n staticClass: \"tag is-delete\",\n class: [_vm.size, {\n 'is-rounded': _vm.rounded\n }],\n attrs: {\n \"role\": \"button\",\n \"tabindex\": _vm.tabstop ? 0 : false,\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": function($event) {\n _vm.close()\n },\n \"keyup\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"delete\", [8, 46], $event.key)) { return null; }\n $event.preventDefault();\n _vm.close()\n }\n }\n })]) : _c('span', {\n staticClass: \"tag\",\n class: [_vm.type, _vm.size, {\n 'is-rounded': _vm.rounded\n }]\n }, [_c('span', {\n class: {\n 'has-ellipsis': _vm.ellipsis\n }\n }, [_vm._t(\"default\")], 2), _vm._v(\" \"), (_vm.closable) ? _c('a', {\n staticClass: \"delete is-small\",\n attrs: {\n \"role\": \"button\",\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.tabstop ? 0 : false\n },\n on: {\n \"click\": function($event) {\n _vm.close()\n },\n \"keyup\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"delete\", [8, 46], $event.key)) { return null; }\n $event.preventDefault();\n _vm.close()\n }\n }\n }) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 190 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(191),\n /* template */\n __webpack_require__(192),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 191 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTaglist',\n props: {\n attached: Boolean\n }\n});\n\n/***/ }),\n/* 192 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"tags\",\n class: {\n 'has-addons': _vm.attached\n }\n }, [_vm._t(\"default\")], 2)\n},staticRenderFns: []}\n\n/***/ }),\n/* 193 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(194),\n /* template */\n __webpack_require__(195),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 194 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__ = __webpack_require__(53);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__tag_Tag__ = __webpack_require__(67);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__tag_Tag___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__tag_Tag__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete__ = __webpack_require__(52);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_FormElementMixin__ = __webpack_require__(12);\n\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTaginput',\n components: (_components = {}, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete___default.a.name, __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_3__tag_Tag___default.a.name, __WEBPACK_IMPORTED_MODULE_3__tag_Tag___default.a), _components),\n mixins: [__WEBPACK_IMPORTED_MODULE_5__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n data: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n type: String,\n rounded: {\n type: Boolean,\n default: false\n },\n attached: {\n type: Boolean,\n default: false\n },\n maxtags: {\n type: [Number, String],\n required: false\n },\n field: {\n type: String,\n default: 'value'\n },\n autocomplete: Boolean,\n disabled: Boolean,\n ellipsis: Boolean,\n confirmKeyCodes: {\n type: Array,\n default: function _default() {\n return [13, 188];\n }\n },\n removeOnKeys: {\n type: Array,\n default: function _default() {\n return [8];\n }\n },\n allowNew: Boolean,\n onPasteSeparators: {\n type: Array,\n default: function _default() {\n return [','];\n }\n },\n beforeAdding: {\n type: Function,\n default: function _default() {\n return true;\n }\n },\n allowDuplicates: {\n type: Boolean,\n default: false\n }\n },\n data: function data() {\n return {\n tags: this.value || [],\n newTag: '',\n _elementRef: 'input',\n _isTaginput: true\n };\n },\n\n computed: {\n rootClasses: function rootClasses() {\n return {\n 'is-expanded': this.expanded\n };\n },\n containerClasses: function containerClasses() {\n return {\n 'is-focused': this.isFocused,\n 'is-focusable': this.hasInput\n };\n },\n valueLength: function valueLength() {\n return this.newTag.trim().length;\n },\n defaultSlotName: function defaultSlotName() {\n return this.hasDefaultSlot ? 'default' : 'dontrender';\n },\n emptySlotName: function emptySlotName() {\n return this.hasEmptySlot ? 'empty' : 'dontrender';\n },\n hasDefaultSlot: function hasDefaultSlot() {\n return !!this.$scopedSlots.default;\n },\n hasEmptySlot: function hasEmptySlot() {\n return !!this.$slots.empty;\n },\n\n\n /**\n * Show the input field if a maxtags hasn't been set or reached.\n */\n hasInput: function hasInput() {\n return this.maxtags == null || this.tagsLength < this.maxtags;\n },\n tagsLength: function tagsLength() {\n return this.tags.length;\n },\n\n\n /**\n * If Taginput has onPasteSeparators prop,\n * returning new RegExp used to split pasted string.\n */\n separatorsAsRegExp: function separatorsAsRegExp() {\n var sep = this.onPasteSeparators;\n\n return sep.length ? new RegExp(sep.map(function (s) {\n return s ? s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&') : null;\n }).join('|'), 'g') : null;\n }\n },\n watch: {\n /**\n * When v-model is changed set internal value.\n */\n value: function value(_value) {\n this.tags = _value;\n },\n newTag: function newTag(value) {\n this.$emit('typing', value.trim());\n },\n hasInput: function hasInput() {\n if (!this.hasInput) this.onBlur();\n }\n },\n methods: {\n addTag: function addTag(tag) {\n var tagToAdd = tag || this.newTag.trim();\n\n if (tagToAdd) {\n if (!this.autocomplete) {\n var reg = this.separatorsAsRegExp;\n if (reg && tagToAdd.match(reg)) {\n tagToAdd.split(reg).map(function (t) {\n return t.trim();\n }).filter(function (t) {\n return t.length !== 0;\n }).map(this.addTag);\n return;\n }\n }\n\n // Add the tag input if it is not blank\n // or previously added (if not allowDuplicates).\n var add = !this.allowDuplicates ? this.tags.indexOf(tagToAdd) === -1 : true;\n if (add && this.beforeAdding(tagToAdd)) {\n this.tags.push(tagToAdd);\n this.$emit('input', this.tags);\n this.$emit('add', tagToAdd);\n }\n }\n\n this.newTag = '';\n },\n getNormalizedTagText: function getNormalizedTagText(tag) {\n if ((typeof tag === 'undefined' ? 'undefined' : __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default()(tag)) === 'object') {\n return Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"b\" /* getValueByPath */])(tag, this.field);\n }\n\n return tag;\n },\n customOnBlur: function customOnBlur($event) {\n // Add tag on-blur if not select only\n if (!this.autocomplete) this.addTag();\n\n this.onBlur($event);\n },\n onSelect: function onSelect(option) {\n var _this = this;\n\n if (!option) return;\n\n this.addTag(option);\n this.$nextTick(function () {\n _this.newTag = '';\n });\n },\n removeTag: function removeTag(index) {\n var tag = this.tags.splice(index, 1)[0];\n this.$emit('input', this.tags);\n this.$emit('remove', tag);\n return tag;\n },\n removeLastTag: function removeLastTag() {\n if (this.tagsLength > 0) {\n this.removeTag(this.tagsLength - 1);\n }\n },\n keydown: function keydown(event) {\n if (this.removeOnKeys.indexOf(event.keyCode) !== -1 && !this.newTag.length) {\n this.removeLastTag();\n }\n // Stop if is to accept select only\n if (this.autocomplete && !this.allowNew) return;\n\n if (this.confirmKeyCodes.indexOf(event.keyCode) >= 0) {\n event.preventDefault();\n this.addTag();\n }\n }\n }\n});\n\n/***/ }),\n/* 195 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"taginput control\",\n class: _vm.rootClasses\n }, [_c('div', {\n staticClass: \"taginput-container\",\n class: [_vm.statusType, _vm.size, _vm.containerClasses],\n attrs: {\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": function($event) {\n _vm.hasInput && _vm.focus($event)\n }\n }\n }, [_vm._l((_vm.tags), function(tag, index) {\n return _c('b-tag', {\n key: index,\n attrs: {\n \"type\": _vm.type,\n \"size\": _vm.size,\n \"rounded\": _vm.rounded,\n \"attached\": _vm.attached,\n \"tabstop\": false,\n \"disabled\": _vm.disabled,\n \"ellipsis\": _vm.ellipsis,\n \"closable\": \"\"\n },\n on: {\n \"close\": function($event) {\n _vm.removeTag(index)\n }\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.getNormalizedTagText(tag)) + \"\\n \")])\n }), _vm._v(\" \"), (_vm.hasInput) ? _c('b-autocomplete', _vm._b({\n ref: \"autocomplete\",\n attrs: {\n \"data\": _vm.data,\n \"field\": _vm.field,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"maxlength\": _vm.maxlength,\n \"has-counter\": false,\n \"size\": _vm.size,\n \"disabled\": _vm.disabled,\n \"loading\": _vm.loading,\n \"keep-first\": \"\"\n },\n on: {\n \"focus\": _vm.onFocus,\n \"blur\": _vm.customOnBlur,\n \"select\": _vm.onSelect\n },\n nativeOn: {\n \"keydown\": function($event) {\n _vm.keydown($event)\n }\n },\n scopedSlots: _vm._u([{\n key: _vm.defaultSlotName,\n fn: function(props) {\n return [_vm._t(\"default\", null, {\n option: props.option,\n index: props.index\n })]\n }\n }]),\n model: {\n value: (_vm.newTag),\n callback: function($$v) {\n _vm.newTag = $$v\n },\n expression: \"newTag\"\n }\n }, 'b-autocomplete', _vm.$attrs, false), [_c('template', {\n slot: _vm.emptySlotName\n }, [_vm._t(\"empty\")], 2)], 2) : _vm._e()], 2), _vm._v(\" \"), (_vm.maxtags || _vm.maxlength) ? _c('p', {\n staticClass: \"help counter\"\n }, [(_vm.maxlength && _vm.valueLength > 0) ? [_vm._v(\"\\n \" + _vm._s(_vm.valueLength) + \" / \" + _vm._s(_vm.maxlength) + \"\\n \")] : (_vm.maxtags) ? [_vm._v(\"\\n \" + _vm._s(_vm.tagsLength) + \" / \" + _vm._s(_vm.maxtags) + \"\\n \")] : _vm._e()], 2) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 196 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(197),\n /* template */\n __webpack_require__(198),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 197 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_FormElementMixin__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown__ = __webpack_require__(43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem__ = __webpack_require__(44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__input_Input__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__input_Input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__input_Input__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__field_Field__ = __webpack_require__(45);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__field_Field___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__field_Field__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__select_Select__ = __webpack_require__(28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__select_Select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__select_Select__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__icon_Icon__);\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n\n\nvar AM = 'AM';\nvar PM = 'PM';\nvar HOUR_FORMAT_24 = '24';\nvar HOUR_FORMAT_12 = '12';\n\nvar formatNumber = function formatNumber(value) {\n return (value < 10 ? '0' : '') + value;\n};\n\nvar timeFormatter = function timeFormatter(date, vm) {\n var hours = date.getHours();\n var minutes = date.getMinutes();\n var am = false;\n if (vm.hourFormat === HOUR_FORMAT_12) {\n am = hours < 12;\n if (hours > 12) {\n hours -= 12;\n } else if (hours === 0) {\n hours = 12;\n }\n }\n return formatNumber(hours) + ':' + formatNumber(minutes) + (vm.hourFormat === HOUR_FORMAT_12 ? ' ' + (am ? AM : PM) : '');\n};\n\nvar timeParser = function timeParser(date, vm) {\n if (date) {\n var dateString = date;\n var am = false;\n if (vm.hourFormat === HOUR_FORMAT_12) {\n var dateString12 = date.split(' ');\n dateString = dateString12[0];\n am = dateString12[1] === AM;\n }\n var time = dateString.split(':');\n var hours = parseInt(time[0], 10);\n var minutes = parseInt(time[1], 10);\n if (isNaN(hours) || hours < 0 || hours > 23 || vm.hourFormat === HOUR_FORMAT_12 && (hours < 1 || hours > 12) || isNaN(minutes) || minutes < 0 || minutes > 59) {\n return null;\n }\n var d = null;\n if (vm.dateSelected && !isNaN(vm.dateSelected)) {\n d = new Date(vm.dateSelected);\n } else {\n d = new Date();\n d.setMilliseconds(0);\n d.setSeconds(0);\n }\n d.setMinutes(minutes);\n if (vm.hourFormat === HOUR_FORMAT_12) {\n if (am && hours === 12) {\n hours = 0;\n } else if (!am && hours !== 12) {\n hours += 12;\n }\n }\n d.setHours(hours);\n return d;\n }\n return null;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTimepicker',\n components: (_components = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_6__input_Input___default.a.name, __WEBPACK_IMPORTED_MODULE_6__input_Input___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_7__field_Field___default.a.name, __WEBPACK_IMPORTED_MODULE_7__field_Field___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_8__select_Select___default.a.name, __WEBPACK_IMPORTED_MODULE_8__select_Select___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default.a.name, __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default.a.name, __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default.a), _components),\n mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: Date,\n inline: Boolean,\n minTime: Date,\n maxTime: Date,\n placeholder: String,\n readonly: {\n type: Boolean,\n default: true\n },\n disabled: {\n type: Boolean,\n default: false\n },\n hourFormat: {\n type: String,\n default: HOUR_FORMAT_24,\n validator: function validator(value) {\n return value === HOUR_FORMAT_24 || value === HOUR_FORMAT_12;\n }\n },\n incrementMinutes: {\n type: Number,\n default: 1\n },\n timeFormatter: {\n type: Function,\n default: function _default(date, vm) {\n if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultTimeFormatter === 'function') {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultTimeFormatter(date);\n } else {\n return timeFormatter(date, vm);\n }\n }\n },\n timeParser: {\n type: Function,\n default: function _default(date, vm) {\n if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultTimeParser === 'function') {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultTimeParser(date);\n } else {\n return timeParser(date, vm);\n }\n }\n },\n mobileNative: {\n type: Boolean,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultTimepickerMobileNative;\n }\n },\n position: String,\n unselectableTimes: Array\n },\n data: function data() {\n return {\n dateSelected: this.value,\n hoursSelected: null,\n minutesSelected: null,\n meridienSelected: null,\n _elementRef: 'input',\n _isTimepicker: true\n };\n },\n\n computed: {\n hours: function hours() {\n var hours = [];\n var numberOfHours = this.isHourFormat24 ? 24 : 12;\n for (var i = 0; i < numberOfHours; i++) {\n var value = i;\n var label = value;\n if (!this.isHourFormat24) {\n value = i + 1;\n label = value;\n if (this.meridienSelected === AM) {\n if (value === 12) {\n value = 0;\n }\n } else if (this.meridienSelected === PM) {\n if (value !== 12) {\n value += 12;\n }\n }\n }\n hours.push({\n label: formatNumber(label),\n value: value\n });\n }\n return hours;\n },\n minutes: function minutes() {\n var minutes = [];\n for (var i = 0; i < 60; i += this.incrementMinutes) {\n minutes.push({\n label: formatNumber(i),\n value: i\n });\n }\n return minutes;\n },\n meridiens: function meridiens() {\n return [AM, PM];\n },\n isMobile: function isMobile() {\n return this.mobileNative && __WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"d\" /* isMobile */].any();\n },\n isHourFormat24: function isHourFormat24() {\n return this.hourFormat === HOUR_FORMAT_24;\n }\n },\n watch: {\n hourFormat: function hourFormat(value) {\n if (this.hoursSelected !== null) {\n this.meridienSelected = this.hoursSelected >= 12 ? PM : AM;\n }\n },\n\n\n /**\n * Emit input event with selected date as payload.\n */\n dateSelected: function dateSelected(value) {\n this.$emit('input', value);\n },\n\n\n /**\n * When v-model is changed:\n * 1. Update internal value.\n * 2. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.updateInternalState(_value);\n this.dateSelected = _value;\n\n !this.isValid && this.$refs.input.checkHtml5Validity();\n }\n },\n methods: {\n onMeridienChange: function onMeridienChange(value) {\n if (this.hoursSelected !== null) {\n if (value === PM) {\n if (this.hoursSelected === 0) {\n this.hoursSelected = 12;\n } else {\n this.hoursSelected += 12;\n }\n } else if (value === AM) {\n if (this.hoursSelected === 12) {\n this.hoursSelected = 0;\n } else {\n this.hoursSelected -= 12;\n }\n }\n }\n this.updateDateSelected(this.hoursSelected, this.minutesSelected, value);\n },\n onHoursChange: function onHoursChange(value) {\n this.updateDateSelected(parseInt(value, 10), this.minutesSelected, this.meridienSelected);\n },\n onMinutesChange: function onMinutesChange(value) {\n this.updateDateSelected(this.hoursSelected, parseInt(value, 10), this.meridienSelected);\n },\n updateDateSelected: function updateDateSelected(hours, minutes, meridiens) {\n if (hours != null && minutes != null && (!this.isHourFormat24 && meridiens !== null || this.isHourFormat24)) {\n if (this.dateSelected && !isNaN(this.dateSelected)) {\n this.dateSelected = new Date(this.dateSelected);\n } else {\n this.dateSelected = new Date();\n this.dateSelected.setMilliseconds(0);\n this.dateSelected.setSeconds(0);\n }\n this.dateSelected.setHours(hours);\n this.dateSelected.setMinutes(minutes);\n }\n },\n updateInternalState: function updateInternalState(value) {\n if (value) {\n this.hoursSelected = value.getHours();\n this.minutesSelected = value.getMinutes();\n this.meridienSelected = value.getHours() >= 12 ? PM : AM;\n } else {\n this.hoursSelected = null;\n this.minutesSelected = null;\n this.meridienSelected = AM;\n }\n },\n isHourDisabled: function isHourDisabled(hour) {\n var _this = this;\n\n var disabled = false;\n if (this.minTime) {\n var minHours = this.minTime.getHours();\n disabled = hour < minHours;\n }\n if (this.maxTime) {\n if (!disabled) {\n var maxHours = this.maxTime.getHours();\n disabled = hour > maxHours;\n }\n }\n if (this.unselectableTimes) {\n if (!disabled) {\n if (this.minutesSelected !== null) {\n var unselectable = this.unselectableTimes.filter(function (time) {\n return time.getHours() === hour && time.getMinutes() === _this.minutesSelected;\n });\n disabled = unselectable.length > 0;\n } else {\n var _unselectable = this.unselectableTimes.filter(function (time) {\n return time.getHours() === hour;\n });\n disabled = _unselectable.length === this.minutes.length;\n }\n }\n }\n return disabled;\n },\n isMinuteDisabled: function isMinuteDisabled(minute) {\n var _this2 = this;\n\n var disabled = false;\n if (this.hoursSelected !== null) {\n if (this.isHourDisabled(this.hoursSelected)) {\n disabled = true;\n } else {\n if (this.minTime) {\n var minHours = this.minTime.getHours();\n var minMinutes = this.minTime.getMinutes();\n disabled = this.hoursSelected === minHours && minute < minMinutes;\n }\n if (this.maxTime) {\n if (!disabled) {\n var maxHours = this.maxTime.getHours();\n var _minMinutes = this.maxTime.getMinutes();\n disabled = this.hoursSelected === maxHours && minute > _minMinutes;\n }\n }\n }\n if (this.unselectableTimes) {\n if (!disabled) {\n var unselectable = this.unselectableTimes.filter(function (time) {\n return time.getHours() === _this2.hoursSelected && time.getMinutes() === minute;\n });\n disabled = unselectable.length > 0;\n }\n }\n }\n return disabled;\n },\n\n\n /*\n * Parse string into date\n */\n onChange: function onChange(value) {\n var date = this.timeParser(value, this);\n this.updateInternalState(date);\n if (date && !isNaN(date)) {\n this.dateSelected = date;\n } else {\n // Force refresh input value when not valid date\n this.dateSelected = null;\n this.$refs.input.newValue = this.dateSelected;\n }\n },\n\n\n /*\n * Format date into string\n */\n formatValue: function formatValue(value) {\n if (value && !isNaN(value)) {\n return this.timeFormatter(value, this);\n } else {\n return null;\n }\n },\n\n\n /*\n * Close dropdown time picker\n */\n close: function close() {\n if (this.$refs.dropdown) {\n this.$refs.dropdown.isActive = false;\n }\n },\n\n\n /*\n * Format date into string 'HH-MM-SS'\n */\n formatHHMMSS: function formatHHMMSS(value) {\n var date = new Date(value);\n if (value && !isNaN(date)) {\n var hours = date.getHours();\n var minutes = date.getMinutes();\n return formatNumber(hours) + ':' + formatNumber(minutes) + ':00';\n }\n return '';\n },\n\n\n /*\n * Parse time from string\n */\n onChangeNativePicker: function onChangeNativePicker(event) {\n var date = event.target.value;\n if (date) {\n if (this.dateSelected && !isNaN(this.dateSelected)) {\n this.dateSelected = new Date(this.dateSelected);\n } else {\n this.dateSelected = new Date();\n this.dateSelected.setMilliseconds(0);\n this.dateSelected.setSeconds(0);\n }\n var time = date.split(':');\n this.dateSelected.setHours(parseInt(time[0], 10));\n this.dateSelected.setMinutes(parseInt(time[1], 10));\n } else {\n this.dateSelected = null;\n }\n }\n },\n mounted: function mounted() {\n this.updateInternalState(this.value);\n }\n});\n\n/***/ }),\n/* 198 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"timepicker control\",\n class: [_vm.size, {\n 'is-expanded': _vm.expanded\n }]\n }, [(!_vm.isMobile || _vm.inline) ? _c('b-dropdown', {\n ref: \"dropdown\",\n attrs: {\n \"position\": _vm.position,\n \"disabled\": _vm.disabled,\n \"inline\": _vm.inline\n }\n }, [(!_vm.inline) ? _c('b-input', _vm._b({\n ref: \"input\",\n attrs: {\n \"slot\": \"trigger\",\n \"autocomplete\": \"off\",\n \"value\": _vm.formatValue(_vm.dateSelected),\n \"placeholder\": _vm.placeholder,\n \"size\": _vm.size,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"loading\": _vm.loading,\n \"disabled\": _vm.disabled,\n \"readonly\": _vm.readonly,\n \"rounded\": _vm.rounded\n },\n on: {\n \"focus\": function($event) {\n _vm.$emit('focus', $event)\n },\n \"blur\": function($event) {\n _vm.$emit('blur', $event) && _vm.checkHtml5Validity()\n }\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onChange($event.target.value)\n }\n },\n slot: \"trigger\"\n }, 'b-input', _vm.$attrs, false)) : _vm._e(), _vm._v(\" \"), _c('b-dropdown-item', {\n attrs: {\n \"disabled\": _vm.disabled,\n \"custom\": \"\"\n }\n }, [_c('div', {\n staticClass: \"pagination-list\"\n }, [_c('b-field', [_c('b-select', {\n attrs: {\n \"disabled\": _vm.disabled,\n \"placeholder\": \"00\"\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onHoursChange($event.target.value)\n }\n },\n model: {\n value: (_vm.hoursSelected),\n callback: function($$v) {\n _vm.hoursSelected = $$v\n },\n expression: \"hoursSelected\"\n }\n }, _vm._l((_vm.hours), function(hour) {\n return _c('option', {\n key: hour.value,\n attrs: {\n \"disabled\": _vm.isHourDisabled(hour.value)\n },\n domProps: {\n \"value\": hour.value\n }\n }, [_vm._v(\"\\n \" + _vm._s(hour.label) + \"\\n \")])\n })), _vm._v(\" \"), _c('b-select', {\n attrs: {\n \"disabled\": _vm.disabled,\n \"placeholder\": \"00\"\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onMinutesChange($event.target.value)\n }\n },\n model: {\n value: (_vm.minutesSelected),\n callback: function($$v) {\n _vm.minutesSelected = $$v\n },\n expression: \"minutesSelected\"\n }\n }, _vm._l((_vm.minutes), function(minute) {\n return _c('option', {\n key: minute.value,\n attrs: {\n \"disabled\": _vm.isMinuteDisabled(minute.value)\n },\n domProps: {\n \"value\": minute.value\n }\n }, [_vm._v(\"\\n \" + _vm._s(minute.label) + \"\\n \")])\n })), _vm._v(\" \"), (!_vm.isHourFormat24) ? _c('b-select', {\n attrs: {\n \"disabled\": _vm.disabled\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onMeridienChange($event.target.value)\n }\n },\n model: {\n value: (_vm.meridienSelected),\n callback: function($$v) {\n _vm.meridienSelected = $$v\n },\n expression: \"meridienSelected\"\n }\n }, _vm._l((_vm.meridiens), function(meridien) {\n return _c('option', {\n key: meridien,\n domProps: {\n \"value\": meridien\n }\n }, [_vm._v(\"\\n \" + _vm._s(meridien) + \"\\n \")])\n })) : _vm._e()], 1)], 1), _vm._v(\" \"), (_vm.$slots.default !== undefined && _vm.$slots.default.length) ? _c('footer', {\n staticClass: \"timepicker-footer\"\n }, [_vm._t(\"default\")], 2) : _vm._e()])], 1) : _c('b-input', _vm._b({\n ref: \"input\",\n attrs: {\n \"type\": \"time\",\n \"autocomplete\": \"off\",\n \"value\": _vm.formatHHMMSS(_vm.value),\n \"placeholder\": _vm.placeholder,\n \"size\": _vm.size,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"loading\": _vm.loading,\n \"max\": _vm.formatHHMMSS(_vm.maxTime),\n \"min\": _vm.formatHHMMSS(_vm.minTime),\n \"disabled\": _vm.disabled,\n \"readonly\": false\n },\n on: {\n \"focus\": function($event) {\n _vm.$emit('focus', $event)\n },\n \"blur\": function($event) {\n _vm.$emit('blur', $event) && _vm.checkHtml5Validity()\n }\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onChangeNativePicker($event)\n }\n }\n }, 'b-input', _vm.$attrs, false))], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 199 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(200),\n /* template */\n __webpack_require__(201),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 200 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__ = __webpack_require__(65);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BToast',\n mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__[\"a\" /* default */]],\n data: function data() {\n return {\n newDuration: this.duration || __WEBPACK_IMPORTED_MODULE_0__utils_config__[\"a\" /* default */].defaultToastDuration\n };\n }\n});\n\n/***/ }),\n/* 201 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"enter-active-class\": _vm.transition.enter,\n \"leave-active-class\": _vm.transition.leave\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isActive),\n expression: \"isActive\"\n }],\n staticClass: \"toast\",\n class: [_vm.type, _vm.position]\n }, [_c('div', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.message)\n }\n })])])\n},staticRenderFns: []}\n\n/***/ }),\n/* 202 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(203),\n /* template */\n __webpack_require__(204),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 203 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTooltip',\n props: {\n active: {\n type: Boolean,\n default: true\n },\n type: String,\n label: String,\n position: {\n type: String,\n default: 'is-top',\n validator: function validator(value) {\n return ['is-top', 'is-bottom', 'is-left', 'is-right'].indexOf(value) > -1;\n }\n },\n always: Boolean,\n animated: Boolean,\n square: Boolean,\n dashed: Boolean,\n multilined: Boolean,\n size: {\n type: String,\n default: 'is-medium'\n }\n },\n computed: {\n newType: function newType() {\n return this.type || __WEBPACK_IMPORTED_MODULE_0__utils_config__[\"a\" /* default */].defaultTooltipType;\n },\n newAnimated: function newAnimated() {\n return this.animated || __WEBPACK_IMPORTED_MODULE_0__utils_config__[\"a\" /* default */].defaultTooltipAnimated;\n }\n }\n});\n\n/***/ }),\n/* 204 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('span', {\n class: [_vm.newType, _vm.position, _vm.size, {\n 'tooltip': _vm.active,\n 'is-square': _vm.square,\n 'is-animated': _vm.newAnimated,\n 'is-always': _vm.always,\n 'is-multiline': _vm.multilined,\n 'is-dashed': _vm.dashed\n }],\n attrs: {\n \"data-label\": _vm.label\n }\n }, [_vm._t(\"default\")], 2)\n},staticRenderFns: []}\n\n/***/ }),\n/* 205 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(206),\n /* template */\n __webpack_require__(207),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 206 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_FormElementMixin__ = __webpack_require__(12);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BUpload',\n mixins: [__WEBPACK_IMPORTED_MODULE_0__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n multiple: Boolean,\n disabled: Boolean,\n accept: String,\n dragDrop: Boolean,\n type: {\n type: String,\n default: 'is-primary'\n },\n native: {\n type: Boolean,\n default: false\n }\n },\n data: function data() {\n return {\n newValue: this.value || [],\n dragDropFocus: false,\n _elementRef: 'input'\n };\n },\n\n watch: {\n /**\n * When v-model is changed:\n * 1. Set internal value.\n * 2. Reset input value if array is empty\n * 3. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.newValue = _value;\n if (!this.newValue || this.newValue.length === 0) {\n this.$refs.input.value = null;\n }\n !this.isValid && !this.dragDrop && this.checkHtml5Validity();\n }\n },\n methods: {\n\n /**\n * Listen change event on input type 'file',\n * emit 'input' event and validate\n */\n onFileChange: function onFileChange(event) {\n if (this.disabled || this.loading) return;\n if (this.dragDrop) {\n this.updateDragDropFocus(false);\n }\n var value = event.target.files || event.dataTransfer.files;\n if (value && value.length) {\n if (!this.multiple) {\n // only one element in case drag drop mode and isn't multiple\n if (this.dragDrop) {\n if (value.length === 1) {\n this.newValue = [];\n } else {\n return false;\n }\n } else {\n this.newValue = [];\n }\n } else {\n if (this.native) {\n this.newValue = [];\n }\n }\n for (var i = 0; i < value.length; i++) {\n var file = value[i];\n if (this.checkType(file)) {\n this.newValue.push(file);\n }\n }\n }\n this.$emit('input', this.newValue);\n !this.dragDrop && this.checkHtml5Validity();\n },\n\n\n /**\n * Listen drag-drop to update internal variable\n */\n updateDragDropFocus: function updateDragDropFocus(focus) {\n if (!this.disabled && !this.loading) {\n this.dragDropFocus = focus;\n }\n },\n\n\n /**\n * Check mime type of file\n */\n checkType: function checkType(file) {\n if (!this.accept) return true;\n var types = this.accept.split(',');\n if (types.length === 0) return true;\n var valid = false;\n for (var i = 0; i < types.length && !valid; i++) {\n var type = types[i].trim();\n if (type) {\n if (type.substring(0, 1) === '.') {\n // check extension\n var extIndex = file.name.lastIndexOf('.');\n if (extIndex >= 0 && file.name.substring(extIndex) === type) {\n valid = true;\n }\n } else {\n // check mime type\n if (file.type.match(type)) {\n valid = true;\n }\n }\n }\n }\n return valid;\n }\n }\n});\n\n/***/ }),\n/* 207 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('label', {\n staticClass: \"upload control\"\n }, [(!_vm.dragDrop) ? [_vm._t(\"default\")] : _c('div', {\n staticClass: \"upload-draggable\",\n class: [_vm.type, {\n 'is-loading': _vm.loading,\n 'is-disabled': _vm.disabled,\n 'is-hovered': _vm.dragDropFocus\n }],\n on: {\n \"dragover\": function($event) {\n $event.preventDefault();\n _vm.updateDragDropFocus(true)\n },\n \"dragleave\": function($event) {\n $event.preventDefault();\n _vm.updateDragDropFocus(false)\n },\n \"dragenter\": function($event) {\n $event.preventDefault();\n _vm.updateDragDropFocus(true)\n },\n \"drop\": function($event) {\n $event.preventDefault();\n _vm.onFileChange($event)\n }\n }\n }, [_vm._t(\"default\")], 2), _vm._v(\" \"), _c('input', _vm._b({\n ref: \"input\",\n attrs: {\n \"type\": \"file\",\n \"multiple\": _vm.multiple,\n \"accept\": _vm.accept,\n \"disabled\": _vm.disabled\n },\n on: {\n \"change\": _vm.onFileChange\n }\n }, 'input', _vm.$attrs, false))], 2)\n},staticRenderFns: []}\n\n/***/ })\n/******/ ]);\n});\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(22);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"6e4843aa\", content, true, {});\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"/*! Buefy v0.6.7 | MIT License | github.com/buefy/buefy */ \\n/*! bulma.io v0.7.1 | MIT License | github.com/jgthms/bulma */@keyframes spinAround{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.b-checkbox.checkbox,.b-radio.radio,.breadcrumb,.button,.delete,.file,.icon,.is-unselectable,.modal-close,.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous,.switch,.tabs{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-link:after,.select:not(.is-multiple):not(.is-loading):after{border:3px solid transparent;border-radius:2px;border-right:0;border-top:0;content:\\\" \\\";display:block;height:.625em;margin-top:-.4375em;pointer-events:none;position:absolute;top:50%;transform:rotate(-45deg);transform-origin:center;width:.625em}.block:not(:last-child),.box:not(:last-child),.breadcrumb:not(:last-child),.content:not(:last-child),.highlight:not(:last-child),.level:not(:last-child),.message:not(:last-child),.notification:not(:last-child),.progress:not(:last-child),.subtitle:not(:last-child),.table-container:not(:last-child),.table:not(:last-child),.tabs:not(:last-child),.title:not(:last-child){margin-bottom:1.5rem}.delete,.modal-close{-moz-appearance:none;-webkit-appearance:none;background-color:hsla(0,0%,4%,.2);border:none;border-radius:290486px;cursor:pointer;display:inline-block;flex-grow:0;flex-shrink:0;font-size:0;height:20px;max-height:20px;max-width:20px;min-height:20px;min-width:20px;outline:none;position:relative;vertical-align:top;width:20px}.delete:after,.delete:before,.modal-close:after,.modal-close:before{background-color:#fff;content:\\\"\\\";display:block;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) rotate(45deg);transform-origin:center center}.delete:before,.modal-close:before{height:2px;width:50%}.delete:after,.modal-close:after{height:50%;width:2px}.delete:focus,.delete:hover,.modal-close:focus,.modal-close:hover{background-color:hsla(0,0%,4%,.3)}.delete:active,.modal-close:active{background-color:hsla(0,0%,4%,.4)}.is-small.delete,.is-small.modal-close{height:16px;max-height:16px;max-width:16px;min-height:16px;min-width:16px;width:16px}.is-medium.delete,.is-medium.modal-close{height:24px;max-height:24px;max-width:24px;min-height:24px;min-width:24px;width:24px}.is-large.delete,.is-large.modal-close{height:32px;max-height:32px;max-width:32px;min-height:32px;min-width:32px;width:32px}.b-table.is-loading:after,.button.is-loading:after,.control.is-loading:after,.loader,.loading-overlay .loading-icon:after,.select.is-loading:after,.upload .upload-draggable.is-loading:after{animation:spinAround .5s infinite linear;border:2px solid #dbdbdb;border-radius:290486px;border-right-color:transparent;border-top-color:transparent;content:\\\"\\\";display:block;height:1em;position:relative;width:1em}.dropdown .background,.hero-video,.image.is-1by1 img,.image.is-1by2 img,.image.is-1by3 img,.image.is-2by1 img,.image.is-2by3 img,.image.is-3by1 img,.image.is-3by2 img,.image.is-3by4 img,.image.is-3by5 img,.image.is-4by3 img,.image.is-4by5 img,.image.is-5by3 img,.image.is-5by4 img,.image.is-9by16 img,.image.is-16by9 img,.image.is-square img,.is-overlay,.loading-overlay,.loading-overlay .loading-background,.modal,.modal-background{bottom:0;left:0;position:absolute;right:0;top:0}.button,.file-cta,.file-name,.input,.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous,.select select,.taginput .taginput-container.is-focusable,.textarea{-moz-appearance:none;-webkit-appearance:none;align-items:center;border:1px solid transparent;border-radius:4px;box-shadow:none;display:inline-flex;font-size:1rem;height:2.25em;justify-content:flex-start;line-height:1.5;padding:calc(.375em - 1px) calc(.625em - 1px);position:relative;vertical-align:top}.button:active,.button:focus,.file-cta:active,.file-cta:focus,.file-name:active,.file-name:focus,.input:active,.input:focus,.is-active.button,.is-active.file-cta,.is-active.file-name,.is-active.input,.is-active.pagination-ellipsis,.is-active.pagination-link,.is-active.pagination-next,.is-active.pagination-previous,.is-active.textarea,.is-focused.button,.is-focused.file-cta,.is-focused.file-name,.is-focused.input,.is-focused.pagination-ellipsis,.is-focused.pagination-link,.is-focused.pagination-next,.is-focused.pagination-previous,.is-focused.textarea,.pagination-ellipsis:active,.pagination-ellipsis:focus,.pagination-link:active,.pagination-link:focus,.pagination-next:active,.pagination-next:focus,.pagination-previous:active,.pagination-previous:focus,.select select.is-active,.select select.is-focused,.select select:active,.select select:focus,.taginput .is-active.taginput-container.is-focusable,.taginput .is-focused.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:active,.taginput .taginput-container.is-focusable:focus,.textarea:active,.textarea:focus{outline:none}.select select[disabled],.taginput [disabled].taginput-container.is-focusable,[disabled].button,[disabled].file-cta,[disabled].file-name,[disabled].input,[disabled].pagination-ellipsis,[disabled].pagination-link,[disabled].pagination-next,[disabled].pagination-previous,[disabled].textarea{cursor:not-allowed}\\n\\n/*! minireset.css v0.0.3 | MIT License | github.com/jgthms/minireset.css */blockquote,body,dd,dl,dt,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,html,iframe,legend,li,ol,p,pre,textarea,ul{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}audio,img,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0;text-align:left}html{background-color:#fff;font-size:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;min-width:300px;overflow-x:hidden;overflow-y:scroll;text-rendering:optimizeLegibility;text-size-adjust:100%}article,aside,figure,footer,header,hgroup,section{display:block}body,button,input,select,textarea{font-family:BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif}code,pre{-moz-osx-font-smoothing:auto;-webkit-font-smoothing:auto;font-family:monospace}body{color:#4a4a4a;font-size:1rem;font-weight:400;line-height:1.5}a{color:#3273dc;cursor:pointer;text-decoration:none}a strong{color:currentColor}a:hover{color:#363636}code{color:#ff3860;font-size:.875em;font-weight:400;padding:.25em .5em}code,hr{background-color:#f5f5f5}hr{border:none;display:block;height:2px;margin:1.5rem 0}img{height:auto;max-width:100%}input[type=checkbox],input[type=radio]{vertical-align:baseline}small{font-size:.875em}span{font-style:inherit;font-weight:inherit}strong{color:#363636;font-weight:700}pre{-webkit-overflow-scrolling:touch;background-color:#f5f5f5;color:#4a4a4a;font-size:.875em;overflow-x:auto;padding:1.25rem 1.5rem;white-space:pre;word-wrap:normal}pre code{background-color:transparent;color:currentColor;font-size:1em;padding:0}table td,table th{text-align:left;vertical-align:top}table th{color:#363636}.is-clearfix:after{clear:both;content:\\\" \\\";display:table}.is-pulled-left{float:left!important}.is-pulled-right{float:right!important}.is-clipped{overflow:hidden!important}.is-size-1{font-size:3rem!important}.is-size-2{font-size:2.5rem!important}.is-size-3{font-size:2rem!important}.is-size-4{font-size:1.5rem!important}.is-size-5{font-size:1.25rem!important}.is-size-6{font-size:1rem!important}.is-size-7{font-size:.75rem!important}@media screen and (max-width:768px){.is-size-1-mobile{font-size:3rem!important}.is-size-2-mobile{font-size:2.5rem!important}.is-size-3-mobile{font-size:2rem!important}.is-size-4-mobile{font-size:1.5rem!important}.is-size-5-mobile{font-size:1.25rem!important}.is-size-6-mobile{font-size:1rem!important}.is-size-7-mobile{font-size:.75rem!important}}@media print,screen and (min-width:769px){.is-size-1-tablet{font-size:3rem!important}.is-size-2-tablet{font-size:2.5rem!important}.is-size-3-tablet{font-size:2rem!important}.is-size-4-tablet{font-size:1.5rem!important}.is-size-5-tablet{font-size:1.25rem!important}.is-size-6-tablet{font-size:1rem!important}.is-size-7-tablet{font-size:.75rem!important}}@media screen and (max-width:1087px){.is-size-1-touch{font-size:3rem!important}.is-size-2-touch{font-size:2.5rem!important}.is-size-3-touch{font-size:2rem!important}.is-size-4-touch{font-size:1.5rem!important}.is-size-5-touch{font-size:1.25rem!important}.is-size-6-touch{font-size:1rem!important}.is-size-7-touch{font-size:.75rem!important}}@media screen and (min-width:1088px){.is-size-1-desktop{font-size:3rem!important}.is-size-2-desktop{font-size:2.5rem!important}.is-size-3-desktop{font-size:2rem!important}.is-size-4-desktop{font-size:1.5rem!important}.is-size-5-desktop{font-size:1.25rem!important}.is-size-6-desktop{font-size:1rem!important}.is-size-7-desktop{font-size:.75rem!important}}@media screen and (min-width:1280px){.is-size-1-widescreen{font-size:3rem!important}.is-size-2-widescreen{font-size:2.5rem!important}.is-size-3-widescreen{font-size:2rem!important}.is-size-4-widescreen{font-size:1.5rem!important}.is-size-5-widescreen{font-size:1.25rem!important}.is-size-6-widescreen{font-size:1rem!important}.is-size-7-widescreen{font-size:.75rem!important}}@media screen and (min-width:1472px){.is-size-1-fullhd{font-size:3rem!important}.is-size-2-fullhd{font-size:2.5rem!important}.is-size-3-fullhd{font-size:2rem!important}.is-size-4-fullhd{font-size:1.5rem!important}.is-size-5-fullhd{font-size:1.25rem!important}.is-size-6-fullhd{font-size:1rem!important}.is-size-7-fullhd{font-size:.75rem!important}}.has-text-centered{text-align:center!important}.has-text-justified{text-align:justify!important}.has-text-left{text-align:left!important}.has-text-right{text-align:right!important}@media screen and (max-width:768px){.has-text-centered-mobile{text-align:center!important}}@media print,screen and (min-width:769px){.has-text-centered-tablet{text-align:center!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-centered-tablet-only{text-align:center!important}}@media screen and (max-width:1087px){.has-text-centered-touch{text-align:center!important}}@media screen and (min-width:1088px){.has-text-centered-desktop{text-align:center!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-centered-desktop-only{text-align:center!important}}@media screen and (min-width:1280px){.has-text-centered-widescreen{text-align:center!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-centered-widescreen-only{text-align:center!important}}@media screen and (min-width:1472px){.has-text-centered-fullhd{text-align:center!important}}@media screen and (max-width:768px){.has-text-justified-mobile{text-align:justify!important}}@media print,screen and (min-width:769px){.has-text-justified-tablet{text-align:justify!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-justified-tablet-only{text-align:justify!important}}@media screen and (max-width:1087px){.has-text-justified-touch{text-align:justify!important}}@media screen and (min-width:1088px){.has-text-justified-desktop{text-align:justify!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-justified-desktop-only{text-align:justify!important}}@media screen and (min-width:1280px){.has-text-justified-widescreen{text-align:justify!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-justified-widescreen-only{text-align:justify!important}}@media screen and (min-width:1472px){.has-text-justified-fullhd{text-align:justify!important}}@media screen and (max-width:768px){.has-text-left-mobile{text-align:left!important}}@media print,screen and (min-width:769px){.has-text-left-tablet{text-align:left!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-left-tablet-only{text-align:left!important}}@media screen and (max-width:1087px){.has-text-left-touch{text-align:left!important}}@media screen and (min-width:1088px){.has-text-left-desktop{text-align:left!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-left-desktop-only{text-align:left!important}}@media screen and (min-width:1280px){.has-text-left-widescreen{text-align:left!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-left-widescreen-only{text-align:left!important}}@media screen and (min-width:1472px){.has-text-left-fullhd{text-align:left!important}}@media screen and (max-width:768px){.has-text-right-mobile{text-align:right!important}}@media print,screen and (min-width:769px){.has-text-right-tablet{text-align:right!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-right-tablet-only{text-align:right!important}}@media screen and (max-width:1087px){.has-text-right-touch{text-align:right!important}}@media screen and (min-width:1088px){.has-text-right-desktop{text-align:right!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-right-desktop-only{text-align:right!important}}@media screen and (min-width:1280px){.has-text-right-widescreen{text-align:right!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-right-widescreen-only{text-align:right!important}}@media screen and (min-width:1472px){.has-text-right-fullhd{text-align:right!important}}.is-capitalized{text-transform:capitalize!important}.is-lowercase{text-transform:lowercase!important}.is-uppercase{text-transform:uppercase!important}.is-italic{font-style:italic!important}.has-text-white{color:#fff!important}a.has-text-white:focus,a.has-text-white:hover{color:#e6e6e6!important}.has-background-white{background-color:#fff!important}.has-text-black{color:#0a0a0a!important}a.has-text-black:focus,a.has-text-black:hover{color:#000!important}.has-background-black{background-color:#0a0a0a!important}.has-text-light{color:#f5f5f5!important}a.has-text-light:focus,a.has-text-light:hover{color:#dbdbdb!important}.has-background-light{background-color:#f5f5f5!important}.has-text-dark{color:#363636!important}a.has-text-dark:focus,a.has-text-dark:hover{color:#1c1c1c!important}.has-background-dark{background-color:#363636!important}.has-text-primary{color:#00d1b2!important}a.has-text-primary:focus,a.has-text-primary:hover{color:#009e86!important}.has-background-primary{background-color:#00d1b2!important}.has-text-link{color:#3273dc!important}a.has-text-link:focus,a.has-text-link:hover{color:#205bbc!important}.has-background-link{background-color:#3273dc!important}.has-text-info{color:#209cee!important}a.has-text-info:focus,a.has-text-info:hover{color:#0f81cc!important}.has-background-info{background-color:#209cee!important}.has-text-success{color:#23d160!important}a.has-text-success:focus,a.has-text-success:hover{color:#1ca64c!important}.has-background-success{background-color:#23d160!important}.has-text-warning{color:#ffdd57!important}a.has-text-warning:focus,a.has-text-warning:hover{color:#ffd324!important}.has-background-warning{background-color:#ffdd57!important}.has-text-danger{color:#ff3860!important}a.has-text-danger:focus,a.has-text-danger:hover{color:#ff0537!important}.has-background-danger{background-color:#ff3860!important}.has-text-black-bis{color:#121212!important}.has-background-black-bis{background-color:#121212!important}.has-text-black-ter{color:#242424!important}.has-background-black-ter{background-color:#242424!important}.has-text-grey-darker{color:#363636!important}.has-background-grey-darker{background-color:#363636!important}.has-text-grey-dark{color:#4a4a4a!important}.has-background-grey-dark{background-color:#4a4a4a!important}.has-text-grey{color:#7a7a7a!important}.has-background-grey{background-color:#7a7a7a!important}.has-text-grey-light{color:#b5b5b5!important}.has-background-grey-light{background-color:#b5b5b5!important}.has-text-grey-lighter{color:#dbdbdb!important}.has-background-grey-lighter{background-color:#dbdbdb!important}.has-text-white-ter{color:#f5f5f5!important}.has-background-white-ter{background-color:#f5f5f5!important}.has-text-white-bis{color:#fafafa!important}.has-background-white-bis{background-color:#fafafa!important}.has-text-weight-light{font-weight:300!important}.has-text-weight-normal{font-weight:400!important}.has-text-weight-semibold{font-weight:600!important}.has-text-weight-bold{font-weight:700!important}.is-block{display:block!important}@media screen and (max-width:768px){.is-block-mobile{display:block!important}}@media print,screen and (min-width:769px){.is-block-tablet{display:block!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-block-tablet-only{display:block!important}}@media screen and (max-width:1087px){.is-block-touch{display:block!important}}@media screen and (min-width:1088px){.is-block-desktop{display:block!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-block-desktop-only{display:block!important}}@media screen and (min-width:1280px){.is-block-widescreen{display:block!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-block-widescreen-only{display:block!important}}@media screen and (min-width:1472px){.is-block-fullhd{display:block!important}}.is-flex{display:flex!important}@media screen and (max-width:768px){.is-flex-mobile{display:flex!important}}@media print,screen and (min-width:769px){.is-flex-tablet{display:flex!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-flex-tablet-only{display:flex!important}}@media screen and (max-width:1087px){.is-flex-touch{display:flex!important}}@media screen and (min-width:1088px){.is-flex-desktop{display:flex!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-flex-desktop-only{display:flex!important}}@media screen and (min-width:1280px){.is-flex-widescreen{display:flex!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-flex-widescreen-only{display:flex!important}}@media screen and (min-width:1472px){.is-flex-fullhd{display:flex!important}}.is-inline{display:inline!important}@media screen and (max-width:768px){.is-inline-mobile{display:inline!important}}@media print,screen and (min-width:769px){.is-inline-tablet{display:inline!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-tablet-only{display:inline!important}}@media screen and (max-width:1087px){.is-inline-touch{display:inline!important}}@media screen and (min-width:1088px){.is-inline-desktop{display:inline!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-desktop-only{display:inline!important}}@media screen and (min-width:1280px){.is-inline-widescreen{display:inline!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-widescreen-only{display:inline!important}}@media screen and (min-width:1472px){.is-inline-fullhd{display:inline!important}}.is-inline-block{display:inline-block!important}@media screen and (max-width:768px){.is-inline-block-mobile{display:inline-block!important}}@media print,screen and (min-width:769px){.is-inline-block-tablet{display:inline-block!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-block-tablet-only{display:inline-block!important}}@media screen and (max-width:1087px){.is-inline-block-touch{display:inline-block!important}}@media screen and (min-width:1088px){.is-inline-block-desktop{display:inline-block!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-block-desktop-only{display:inline-block!important}}@media screen and (min-width:1280px){.is-inline-block-widescreen{display:inline-block!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-block-widescreen-only{display:inline-block!important}}@media screen and (min-width:1472px){.is-inline-block-fullhd{display:inline-block!important}}.is-inline-flex{display:inline-flex!important}@media screen and (max-width:768px){.is-inline-flex-mobile{display:inline-flex!important}}@media print,screen and (min-width:769px){.is-inline-flex-tablet{display:inline-flex!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-flex-tablet-only{display:inline-flex!important}}@media screen and (max-width:1087px){.is-inline-flex-touch{display:inline-flex!important}}@media screen and (min-width:1088px){.is-inline-flex-desktop{display:inline-flex!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-flex-desktop-only{display:inline-flex!important}}@media screen and (min-width:1280px){.is-inline-flex-widescreen{display:inline-flex!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-flex-widescreen-only{display:inline-flex!important}}@media screen and (min-width:1472px){.is-inline-flex-fullhd{display:inline-flex!important}}.is-hidden{display:none!important}@media screen and (max-width:768px){.is-hidden-mobile{display:none!important}}@media print,screen and (min-width:769px){.is-hidden-tablet{display:none!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-hidden-tablet-only{display:none!important}}@media screen and (max-width:1087px){.is-hidden-touch{display:none!important}}@media screen and (min-width:1088px){.is-hidden-desktop{display:none!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-hidden-desktop-only{display:none!important}}@media screen and (min-width:1280px){.is-hidden-widescreen{display:none!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-hidden-widescreen-only{display:none!important}}@media screen and (min-width:1472px){.is-hidden-fullhd{display:none!important}}.is-invisible{visibility:hidden!important}@media screen and (max-width:768px){.is-invisible-mobile{visibility:hidden!important}}@media print,screen and (min-width:769px){.is-invisible-tablet{visibility:hidden!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-invisible-tablet-only{visibility:hidden!important}}@media screen and (max-width:1087px){.is-invisible-touch{visibility:hidden!important}}@media screen and (min-width:1088px){.is-invisible-desktop{visibility:hidden!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-invisible-desktop-only{visibility:hidden!important}}@media screen and (min-width:1280px){.is-invisible-widescreen{visibility:hidden!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-invisible-widescreen-only{visibility:hidden!important}}@media screen and (min-width:1472px){.is-invisible-fullhd{visibility:hidden!important}}.is-marginless{margin:0!important}.is-paddingless{padding:0!important}.is-radiusless{border-radius:0!important}.is-shadowless{box-shadow:none!important}.box{background-color:#fff;border-radius:6px;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);color:#4a4a4a;display:block;padding:1.25rem}a.box:focus,a.box:hover{box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px #3273dc}a.box:active{box-shadow:inset 0 1px 2px hsla(0,0%,4%,.2),0 0 0 1px #3273dc}.button{background-color:#fff;border-color:#dbdbdb;border-width:1px;color:#363636;cursor:pointer;justify-content:center;padding:calc(.375em - 1px) .75em;text-align:center;white-space:nowrap}.button strong{color:inherit}.button .icon,.button .icon.is-large,.button .icon.is-medium,.button .icon.is-small{height:1.5em;width:1.5em}.button .icon:first-child:not(:last-child){margin-left:calc(-.375em - 1px);margin-right:.1875em}.button .icon:last-child:not(:first-child){margin-left:.1875em;margin-right:calc(-.375em - 1px)}.button .icon:first-child:last-child{margin-left:calc(-.375em - 1px);margin-right:calc(-.375em - 1px)}.button.is-hovered,.button:hover{border-color:#b5b5b5;color:#363636}.button.is-focused,.button:focus{border-color:#3273dc;color:#363636}.button.is-focused:not(:active),.button:focus:not(:active){box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.button.is-active,.button:active{border-color:#4a4a4a;color:#363636}.button.is-text{background-color:transparent;border-color:transparent;color:#4a4a4a;text-decoration:underline}.button.is-text.is-focused,.button.is-text.is-hovered,.button.is-text:focus,.button.is-text:hover{background-color:#f5f5f5;color:#363636}.button.is-text.is-active,.button.is-text:active{background-color:#e8e8e8;color:#363636}.button.is-text[disabled]{background-color:transparent;border-color:transparent;box-shadow:none}.button.is-white{background-color:#fff;border-color:transparent;color:#0a0a0a}.button.is-white.is-hovered,.button.is-white:hover{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.button.is-white.is-focused,.button.is-white:focus{border-color:transparent;color:#0a0a0a}.button.is-white.is-focused:not(:active),.button.is-white:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.button.is-white.is-active,.button.is-white:active{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.button.is-white[disabled]{background-color:#fff;border-color:transparent;box-shadow:none}.button.is-white.is-inverted{background-color:#0a0a0a;color:#fff}.button.is-white.is-inverted:hover{background-color:#000}.button.is-white.is-inverted[disabled]{background-color:#0a0a0a;border-color:transparent;box-shadow:none;color:#fff}.button.is-white.is-loading:after{border-color:transparent transparent #0a0a0a #0a0a0a!important}.button.is-white.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-white.is-outlined:focus,.button.is-white.is-outlined:hover{background-color:#fff;border-color:#fff;color:#0a0a0a}.button.is-white.is-outlined.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-white.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-white.is-inverted.is-outlined{background-color:transparent;border-color:#0a0a0a;color:#0a0a0a}.button.is-white.is-inverted.is-outlined:focus,.button.is-white.is-inverted.is-outlined:hover{background-color:#0a0a0a;color:#fff}.button.is-white.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#0a0a0a;box-shadow:none;color:#0a0a0a}.button.is-black{background-color:#0a0a0a;border-color:transparent;color:#fff}.button.is-black.is-hovered,.button.is-black:hover{background-color:#040404;border-color:transparent;color:#fff}.button.is-black.is-focused,.button.is-black:focus{border-color:transparent;color:#fff}.button.is-black.is-focused:not(:active),.button.is-black:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.button.is-black.is-active,.button.is-black:active{background-color:#000;border-color:transparent;color:#fff}.button.is-black[disabled]{background-color:#0a0a0a;border-color:transparent;box-shadow:none}.button.is-black.is-inverted{background-color:#fff;color:#0a0a0a}.button.is-black.is-inverted:hover{background-color:#f2f2f2}.button.is-black.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#0a0a0a}.button.is-black.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-black.is-outlined{background-color:transparent;border-color:#0a0a0a;color:#0a0a0a}.button.is-black.is-outlined:focus,.button.is-black.is-outlined:hover{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.button.is-black.is-outlined.is-loading:after{border-color:transparent transparent #0a0a0a #0a0a0a!important}.button.is-black.is-outlined[disabled]{background-color:transparent;border-color:#0a0a0a;box-shadow:none;color:#0a0a0a}.button.is-black.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-black.is-inverted.is-outlined:focus,.button.is-black.is-inverted.is-outlined:hover{background-color:#fff;color:#0a0a0a}.button.is-black.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-light{background-color:#f5f5f5;border-color:transparent;color:#363636}.button.is-light.is-hovered,.button.is-light:hover{background-color:#eee;border-color:transparent;color:#363636}.button.is-light.is-focused,.button.is-light:focus{border-color:transparent;color:#363636}.button.is-light.is-focused:not(:active),.button.is-light:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.button.is-light.is-active,.button.is-light:active{background-color:#e8e8e8;border-color:transparent;color:#363636}.button.is-light[disabled]{background-color:#f5f5f5;border-color:transparent;box-shadow:none}.button.is-light.is-inverted{background-color:#363636;color:#f5f5f5}.button.is-light.is-inverted:hover{background-color:#292929}.button.is-light.is-inverted[disabled]{background-color:#363636;border-color:transparent;box-shadow:none;color:#f5f5f5}.button.is-light.is-loading:after{border-color:transparent transparent #363636 #363636!important}.button.is-light.is-outlined{background-color:transparent;border-color:#f5f5f5;color:#f5f5f5}.button.is-light.is-outlined:focus,.button.is-light.is-outlined:hover{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.button.is-light.is-outlined.is-loading:after{border-color:transparent transparent #f5f5f5 #f5f5f5!important}.button.is-light.is-outlined[disabled]{background-color:transparent;border-color:#f5f5f5;box-shadow:none;color:#f5f5f5}.button.is-light.is-inverted.is-outlined{background-color:transparent;border-color:#363636;color:#363636}.button.is-light.is-inverted.is-outlined:focus,.button.is-light.is-inverted.is-outlined:hover{background-color:#363636;color:#f5f5f5}.button.is-light.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#363636;box-shadow:none;color:#363636}.button.is-dark{background-color:#363636;border-color:transparent;color:#f5f5f5}.button.is-dark.is-hovered,.button.is-dark:hover{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.button.is-dark.is-focused,.button.is-dark:focus{border-color:transparent;color:#f5f5f5}.button.is-dark.is-focused:not(:active),.button.is-dark:focus:not(:active){box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.button.is-dark.is-active,.button.is-dark:active{background-color:#292929;border-color:transparent;color:#f5f5f5}.button.is-dark[disabled]{background-color:#363636;border-color:transparent;box-shadow:none}.button.is-dark.is-inverted{background-color:#f5f5f5;color:#363636}.button.is-dark.is-inverted:hover{background-color:#e8e8e8}.button.is-dark.is-inverted[disabled]{background-color:#f5f5f5;border-color:transparent;box-shadow:none;color:#363636}.button.is-dark.is-loading:after{border-color:transparent transparent #f5f5f5 #f5f5f5!important}.button.is-dark.is-outlined{background-color:transparent;border-color:#363636;color:#363636}.button.is-dark.is-outlined:focus,.button.is-dark.is-outlined:hover{background-color:#363636;border-color:#363636;color:#f5f5f5}.button.is-dark.is-outlined.is-loading:after{border-color:transparent transparent #363636 #363636!important}.button.is-dark.is-outlined[disabled]{background-color:transparent;border-color:#363636;box-shadow:none;color:#363636}.button.is-dark.is-inverted.is-outlined{background-color:transparent;border-color:#f5f5f5;color:#f5f5f5}.button.is-dark.is-inverted.is-outlined:focus,.button.is-dark.is-inverted.is-outlined:hover{background-color:#f5f5f5;color:#363636}.button.is-dark.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#f5f5f5;box-shadow:none;color:#f5f5f5}.button.is-primary{background-color:#00d1b2;border-color:transparent;color:#fff}.button.is-primary.is-hovered,.button.is-primary:hover{background-color:#00c4a7;border-color:transparent;color:#fff}.button.is-primary.is-focused,.button.is-primary:focus{border-color:transparent;color:#fff}.button.is-primary.is-focused:not(:active),.button.is-primary:focus:not(:active){box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.button.is-primary.is-active,.button.is-primary:active{background-color:#00b89c;border-color:transparent;color:#fff}.button.is-primary[disabled]{background-color:#00d1b2;border-color:transparent;box-shadow:none}.button.is-primary.is-inverted{background-color:#fff;color:#00d1b2}.button.is-primary.is-inverted:hover{background-color:#f2f2f2}.button.is-primary.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#00d1b2}.button.is-primary.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-primary.is-outlined{background-color:transparent;border-color:#00d1b2;color:#00d1b2}.button.is-primary.is-outlined:focus,.button.is-primary.is-outlined:hover{background-color:#00d1b2;border-color:#00d1b2;color:#fff}.button.is-primary.is-outlined.is-loading:after{border-color:transparent transparent #00d1b2 #00d1b2!important}.button.is-primary.is-outlined[disabled]{background-color:transparent;border-color:#00d1b2;box-shadow:none;color:#00d1b2}.button.is-primary.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-primary.is-inverted.is-outlined:focus,.button.is-primary.is-inverted.is-outlined:hover{background-color:#fff;color:#00d1b2}.button.is-primary.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-link{background-color:#3273dc;border-color:transparent;color:#fff}.button.is-link.is-hovered,.button.is-link:hover{background-color:#276cda;border-color:transparent;color:#fff}.button.is-link.is-focused,.button.is-link:focus{border-color:transparent;color:#fff}.button.is-link.is-focused:not(:active),.button.is-link:focus:not(:active){box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.button.is-link.is-active,.button.is-link:active{background-color:#2366d1;border-color:transparent;color:#fff}.button.is-link[disabled]{background-color:#3273dc;border-color:transparent;box-shadow:none}.button.is-link.is-inverted{background-color:#fff;color:#3273dc}.button.is-link.is-inverted:hover{background-color:#f2f2f2}.button.is-link.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#3273dc}.button.is-link.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-link.is-outlined{background-color:transparent;border-color:#3273dc;color:#3273dc}.button.is-link.is-outlined:focus,.button.is-link.is-outlined:hover{background-color:#3273dc;border-color:#3273dc;color:#fff}.button.is-link.is-outlined.is-loading:after{border-color:transparent transparent #3273dc #3273dc!important}.button.is-link.is-outlined[disabled]{background-color:transparent;border-color:#3273dc;box-shadow:none;color:#3273dc}.button.is-link.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-link.is-inverted.is-outlined:focus,.button.is-link.is-inverted.is-outlined:hover{background-color:#fff;color:#3273dc}.button.is-link.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-info{background-color:#209cee;border-color:transparent;color:#fff}.button.is-info.is-hovered,.button.is-info:hover{background-color:#1496ed;border-color:transparent;color:#fff}.button.is-info.is-focused,.button.is-info:focus{border-color:transparent;color:#fff}.button.is-info.is-focused:not(:active),.button.is-info:focus:not(:active){box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.button.is-info.is-active,.button.is-info:active{background-color:#118fe4;border-color:transparent;color:#fff}.button.is-info[disabled]{background-color:#209cee;border-color:transparent;box-shadow:none}.button.is-info.is-inverted{background-color:#fff;color:#209cee}.button.is-info.is-inverted:hover{background-color:#f2f2f2}.button.is-info.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#209cee}.button.is-info.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-info.is-outlined{background-color:transparent;border-color:#209cee;color:#209cee}.button.is-info.is-outlined:focus,.button.is-info.is-outlined:hover{background-color:#209cee;border-color:#209cee;color:#fff}.button.is-info.is-outlined.is-loading:after{border-color:transparent transparent #209cee #209cee!important}.button.is-info.is-outlined[disabled]{background-color:transparent;border-color:#209cee;box-shadow:none;color:#209cee}.button.is-info.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-info.is-inverted.is-outlined:focus,.button.is-info.is-inverted.is-outlined:hover{background-color:#fff;color:#209cee}.button.is-info.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-success{background-color:#23d160;border-color:transparent;color:#fff}.button.is-success.is-hovered,.button.is-success:hover{background-color:#22c65b;border-color:transparent;color:#fff}.button.is-success.is-focused,.button.is-success:focus{border-color:transparent;color:#fff}.button.is-success.is-focused:not(:active),.button.is-success:focus:not(:active){box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.button.is-success.is-active,.button.is-success:active{background-color:#20bc56;border-color:transparent;color:#fff}.button.is-success[disabled]{background-color:#23d160;border-color:transparent;box-shadow:none}.button.is-success.is-inverted{background-color:#fff;color:#23d160}.button.is-success.is-inverted:hover{background-color:#f2f2f2}.button.is-success.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#23d160}.button.is-success.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-success.is-outlined{background-color:transparent;border-color:#23d160;color:#23d160}.button.is-success.is-outlined:focus,.button.is-success.is-outlined:hover{background-color:#23d160;border-color:#23d160;color:#fff}.button.is-success.is-outlined.is-loading:after{border-color:transparent transparent #23d160 #23d160!important}.button.is-success.is-outlined[disabled]{background-color:transparent;border-color:#23d160;box-shadow:none;color:#23d160}.button.is-success.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-success.is-inverted.is-outlined:focus,.button.is-success.is-inverted.is-outlined:hover{background-color:#fff;color:#23d160}.button.is-success.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-warning{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-hovered,.button.is-warning:hover{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-focused,.button.is-warning:focus{border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-focused:not(:active),.button.is-warning:focus:not(:active){box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.button.is-warning.is-active,.button.is-warning:active{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning[disabled]{background-color:#ffdd57;border-color:transparent;box-shadow:none}.button.is-warning.is-inverted{color:#ffdd57}.button.is-warning.is-inverted,.button.is-warning.is-inverted:hover{background-color:rgba(0,0,0,.7)}.button.is-warning.is-inverted[disabled]{background-color:rgba(0,0,0,.7);border-color:transparent;box-shadow:none;color:#ffdd57}.button.is-warning.is-loading:after{border-color:transparent transparent rgba(0,0,0,.7) rgba(0,0,0,.7)!important}.button.is-warning.is-outlined{background-color:transparent;border-color:#ffdd57;color:#ffdd57}.button.is-warning.is-outlined:focus,.button.is-warning.is-outlined:hover{background-color:#ffdd57;border-color:#ffdd57;color:rgba(0,0,0,.7)}.button.is-warning.is-outlined.is-loading:after{border-color:transparent transparent #ffdd57 #ffdd57!important}.button.is-warning.is-outlined[disabled]{background-color:transparent;border-color:#ffdd57;box-shadow:none;color:#ffdd57}.button.is-warning.is-inverted.is-outlined{background-color:transparent;border-color:rgba(0,0,0,.7);color:rgba(0,0,0,.7)}.button.is-warning.is-inverted.is-outlined:focus,.button.is-warning.is-inverted.is-outlined:hover{background-color:rgba(0,0,0,.7);color:#ffdd57}.button.is-warning.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:rgba(0,0,0,.7);box-shadow:none;color:rgba(0,0,0,.7)}.button.is-danger{background-color:#ff3860;border-color:transparent;color:#fff}.button.is-danger.is-hovered,.button.is-danger:hover{background-color:#ff2b56;border-color:transparent;color:#fff}.button.is-danger.is-focused,.button.is-danger:focus{border-color:transparent;color:#fff}.button.is-danger.is-focused:not(:active),.button.is-danger:focus:not(:active){box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.button.is-danger.is-active,.button.is-danger:active{background-color:#ff1f4b;border-color:transparent;color:#fff}.button.is-danger[disabled]{background-color:#ff3860;border-color:transparent;box-shadow:none}.button.is-danger.is-inverted{background-color:#fff;color:#ff3860}.button.is-danger.is-inverted:hover{background-color:#f2f2f2}.button.is-danger.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#ff3860}.button.is-danger.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-danger.is-outlined{background-color:transparent;border-color:#ff3860;color:#ff3860}.button.is-danger.is-outlined:focus,.button.is-danger.is-outlined:hover{background-color:#ff3860;border-color:#ff3860;color:#fff}.button.is-danger.is-outlined.is-loading:after{border-color:transparent transparent #ff3860 #ff3860!important}.button.is-danger.is-outlined[disabled]{background-color:transparent;border-color:#ff3860;box-shadow:none;color:#ff3860}.button.is-danger.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-danger.is-inverted.is-outlined:focus,.button.is-danger.is-inverted.is-outlined:hover{background-color:#fff;color:#ff3860}.button.is-danger.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-small{border-radius:2px;font-size:.75rem}.button.is-medium{font-size:1.25rem}.button.is-large{font-size:1.5rem}.button[disabled]{background-color:#fff;border-color:#dbdbdb;box-shadow:none;opacity:.5}.button.is-fullwidth{display:flex;width:100%}.button.is-loading{color:transparent!important;pointer-events:none}.button.is-loading:after{position:absolute;left:calc(50% - 0.5em);top:calc(50% - 0.5em);position:absolute!important}.button.is-static{background-color:#f5f5f5;border-color:#dbdbdb;color:#7a7a7a;box-shadow:none;pointer-events:none}.button.is-rounded{border-radius:290486px;padding-left:1em;padding-right:1em}.buttons{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.buttons .button{margin-bottom:.5rem}.buttons .button:not(:last-child){margin-right:.5rem}.buttons:last-child{margin-bottom:-.5rem}.buttons:not(:last-child){margin-bottom:1rem}.buttons.has-addons .button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.buttons.has-addons .button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.buttons.has-addons .button:last-child{margin-right:0}.buttons.has-addons .button.is-hovered,.buttons.has-addons .button:hover{z-index:2}.buttons.has-addons .button.is-active,.buttons.has-addons .button.is-focused,.buttons.has-addons .button.is-selected,.buttons.has-addons .button:active,.buttons.has-addons .button:focus{z-index:3}.buttons.has-addons .button.is-active:hover,.buttons.has-addons .button.is-focused:hover,.buttons.has-addons .button.is-selected:hover,.buttons.has-addons .button:active:hover,.buttons.has-addons .button:focus:hover{z-index:4}.buttons.has-addons .button.is-expanded{flex-grow:1}.buttons.is-centered{justify-content:center}.buttons.is-right{justify-content:flex-end}.container{margin:0 auto;position:relative}@media screen and (min-width:1088px){.container{max-width:960px;width:960px}.container.is-fluid{margin-left:64px;margin-right:64px;max-width:none;width:auto}}@media screen and (max-width:1279px){.container.is-widescreen{max-width:1152px;width:auto}}@media screen and (max-width:1471px){.container.is-fullhd{max-width:1344px;width:auto}}@media screen and (min-width:1280px){.container{max-width:1152px;width:1152px}}@media screen and (min-width:1472px){.container{max-width:1344px;width:1344px}}.content li+li{margin-top:.25em}.content blockquote:not(:last-child),.content dl:not(:last-child),.content ol:not(:last-child),.content p:not(:last-child),.content pre:not(:last-child),.content table:not(:last-child),.content ul:not(:last-child){margin-bottom:1em}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6{color:#363636;font-weight:600;line-height:1.125}.content h1{font-size:2em;margin-bottom:.5em}.content h1:not(:first-child){margin-top:1em}.content h2{font-size:1.75em;margin-bottom:.5714em}.content h2:not(:first-child){margin-top:1.1428em}.content h3{font-size:1.5em;margin-bottom:.6666em}.content h3:not(:first-child){margin-top:1.3333em}.content h4{font-size:1.25em;margin-bottom:.8em}.content h5{font-size:1.125em;margin-bottom:.8888em}.content h6{font-size:1em;margin-bottom:1em}.content blockquote{background-color:#f5f5f5;border-left:5px solid #dbdbdb;padding:1.25em 1.5em}.content ol{list-style:decimal outside}.content ol,.content ul{margin-left:2em;margin-top:1em}.content ul{list-style:disc outside}.content ul ul{list-style-type:circle;margin-top:.5em}.content ul ul ul{list-style-type:square}.content dd{margin-left:2em}.content figure{margin-left:2em;margin-right:2em;text-align:center}.content figure:not(:first-child){margin-top:2em}.content figure:not(:last-child){margin-bottom:2em}.content figure img{display:inline-block}.content figure figcaption{font-style:italic}.content pre{-webkit-overflow-scrolling:touch;overflow-x:auto;padding:1.25em 1.5em;white-space:pre;word-wrap:normal}.content sub,.content sup{font-size:75%}.content table{width:100%}.content table td,.content table th{border:1px solid #dbdbdb;border-width:0 0 1px;padding:.5em .75em;vertical-align:top}.content table th{color:#363636;text-align:left}.content table thead td,.content table thead th{border-width:0 0 2px;color:#363636}.content table tfoot td,.content table tfoot th{border-width:2px 0 0;color:#363636}.content table tbody tr:last-child td,.content table tbody tr:last-child th{border-bottom-width:0}.content.is-small{font-size:.75rem}.content.is-medium{font-size:1.25rem}.content.is-large{font-size:1.5rem}.input,.taginput .taginput-container.is-focusable,.textarea{background-color:#fff;border-color:#dbdbdb;color:#363636;box-shadow:inset 0 1px 2px hsla(0,0%,4%,.1);max-width:100%;width:100%}.input::-moz-placeholder,.taginput .taginput-container.is-focusable::-moz-placeholder,.textarea::-moz-placeholder{color:rgba(54,54,54,.3)}.input::-webkit-input-placeholder,.taginput .taginput-container.is-focusable::-webkit-input-placeholder,.textarea::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.input:-moz-placeholder,.taginput .taginput-container.is-focusable:-moz-placeholder,.textarea:-moz-placeholder{color:rgba(54,54,54,.3)}.input:-ms-input-placeholder,.taginput .taginput-container.is-focusable:-ms-input-placeholder,.textarea:-ms-input-placeholder{color:rgba(54,54,54,.3)}.input.is-hovered,.input:hover,.taginput .is-hovered.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:hover,.textarea.is-hovered,.textarea:hover{border-color:#b5b5b5}.input.is-active,.input.is-focused,.input:active,.input:focus,.taginput .is-active.taginput-container.is-focusable,.taginput .is-focused.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:active,.taginput .taginput-container.is-focusable:focus,.textarea.is-active,.textarea.is-focused,.textarea:active,.textarea:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.input[disabled],.taginput [disabled].taginput-container.is-focusable,.textarea[disabled]{background-color:#f5f5f5;border-color:#f5f5f5;box-shadow:none;color:#7a7a7a}.input[disabled]::-moz-placeholder,.taginput [disabled].taginput-container.is-focusable::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]::-webkit-input-placeholder,.taginput [disabled].taginput-container.is-focusable::-webkit-input-placeholder,.textarea[disabled]::-webkit-input-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]:-moz-placeholder,.taginput [disabled].taginput-container.is-focusable:-moz-placeholder,.textarea[disabled]:-moz-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]:-ms-input-placeholder,.taginput [disabled].taginput-container.is-focusable:-ms-input-placeholder,.textarea[disabled]:-ms-input-placeholder{color:hsla(0,0%,48%,.3)}.input[readonly],.taginput [readonly].taginput-container.is-focusable,.textarea[readonly]{box-shadow:none}.input.is-white,.taginput .is-white.taginput-container.is-focusable,.textarea.is-white{border-color:#fff}.input.is-white.is-active,.input.is-white.is-focused,.input.is-white:active,.input.is-white:focus,.taginput .is-white.is-active.taginput-container.is-focusable,.taginput .is-white.is-focused.taginput-container.is-focusable,.taginput .is-white.taginput-container.is-focusable:active,.taginput .is-white.taginput-container.is-focusable:focus,.textarea.is-white.is-active,.textarea.is-white.is-focused,.textarea.is-white:active,.textarea.is-white:focus{box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.input.is-black,.taginput .is-black.taginput-container.is-focusable,.textarea.is-black{border-color:#0a0a0a}.input.is-black.is-active,.input.is-black.is-focused,.input.is-black:active,.input.is-black:focus,.taginput .is-black.is-active.taginput-container.is-focusable,.taginput .is-black.is-focused.taginput-container.is-focusable,.taginput .is-black.taginput-container.is-focusable:active,.taginput .is-black.taginput-container.is-focusable:focus,.textarea.is-black.is-active,.textarea.is-black.is-focused,.textarea.is-black:active,.textarea.is-black:focus{box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.input.is-light,.taginput .is-light.taginput-container.is-focusable,.textarea.is-light{border-color:#f5f5f5}.input.is-light.is-active,.input.is-light.is-focused,.input.is-light:active,.input.is-light:focus,.taginput .is-light.is-active.taginput-container.is-focusable,.taginput .is-light.is-focused.taginput-container.is-focusable,.taginput .is-light.taginput-container.is-focusable:active,.taginput .is-light.taginput-container.is-focusable:focus,.textarea.is-light.is-active,.textarea.is-light.is-focused,.textarea.is-light:active,.textarea.is-light:focus{box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.input.is-dark,.taginput .is-dark.taginput-container.is-focusable,.textarea.is-dark{border-color:#363636}.input.is-dark.is-active,.input.is-dark.is-focused,.input.is-dark:active,.input.is-dark:focus,.taginput .is-dark.is-active.taginput-container.is-focusable,.taginput .is-dark.is-focused.taginput-container.is-focusable,.taginput .is-dark.taginput-container.is-focusable:active,.taginput .is-dark.taginput-container.is-focusable:focus,.textarea.is-dark.is-active,.textarea.is-dark.is-focused,.textarea.is-dark:active,.textarea.is-dark:focus{box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.input.is-primary,.taginput .is-primary.taginput-container.is-focusable,.textarea.is-primary{border-color:#00d1b2}.input.is-primary.is-active,.input.is-primary.is-focused,.input.is-primary:active,.input.is-primary:focus,.taginput .is-primary.is-active.taginput-container.is-focusable,.taginput .is-primary.is-focused.taginput-container.is-focusable,.taginput .is-primary.taginput-container.is-focusable:active,.taginput .is-primary.taginput-container.is-focusable:focus,.textarea.is-primary.is-active,.textarea.is-primary.is-focused,.textarea.is-primary:active,.textarea.is-primary:focus{box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.input.is-link,.taginput .is-link.taginput-container.is-focusable,.textarea.is-link{border-color:#3273dc}.input.is-link.is-active,.input.is-link.is-focused,.input.is-link:active,.input.is-link:focus,.taginput .is-link.is-active.taginput-container.is-focusable,.taginput .is-link.is-focused.taginput-container.is-focusable,.taginput .is-link.taginput-container.is-focusable:active,.taginput .is-link.taginput-container.is-focusable:focus,.textarea.is-link.is-active,.textarea.is-link.is-focused,.textarea.is-link:active,.textarea.is-link:focus{box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.input.is-info,.taginput .is-info.taginput-container.is-focusable,.textarea.is-info{border-color:#209cee}.input.is-info.is-active,.input.is-info.is-focused,.input.is-info:active,.input.is-info:focus,.taginput .is-info.is-active.taginput-container.is-focusable,.taginput .is-info.is-focused.taginput-container.is-focusable,.taginput .is-info.taginput-container.is-focusable:active,.taginput .is-info.taginput-container.is-focusable:focus,.textarea.is-info.is-active,.textarea.is-info.is-focused,.textarea.is-info:active,.textarea.is-info:focus{box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.input.is-success,.taginput .is-success.taginput-container.is-focusable,.textarea.is-success{border-color:#23d160}.input.is-success.is-active,.input.is-success.is-focused,.input.is-success:active,.input.is-success:focus,.taginput .is-success.is-active.taginput-container.is-focusable,.taginput .is-success.is-focused.taginput-container.is-focusable,.taginput .is-success.taginput-container.is-focusable:active,.taginput .is-success.taginput-container.is-focusable:focus,.textarea.is-success.is-active,.textarea.is-success.is-focused,.textarea.is-success:active,.textarea.is-success:focus{box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.input.is-warning,.taginput .is-warning.taginput-container.is-focusable,.textarea.is-warning{border-color:#ffdd57}.input.is-warning.is-active,.input.is-warning.is-focused,.input.is-warning:active,.input.is-warning:focus,.taginput .is-warning.is-active.taginput-container.is-focusable,.taginput .is-warning.is-focused.taginput-container.is-focusable,.taginput .is-warning.taginput-container.is-focusable:active,.taginput .is-warning.taginput-container.is-focusable:focus,.textarea.is-warning.is-active,.textarea.is-warning.is-focused,.textarea.is-warning:active,.textarea.is-warning:focus{box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.input.is-danger,.taginput .is-danger.taginput-container.is-focusable,.textarea.is-danger{border-color:#ff3860}.input.is-danger.is-active,.input.is-danger.is-focused,.input.is-danger:active,.input.is-danger:focus,.taginput .is-danger.is-active.taginput-container.is-focusable,.taginput .is-danger.is-focused.taginput-container.is-focusable,.taginput .is-danger.taginput-container.is-focusable:active,.taginput .is-danger.taginput-container.is-focusable:focus,.textarea.is-danger.is-active,.textarea.is-danger.is-focused,.textarea.is-danger:active,.textarea.is-danger:focus{box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.input.is-small,.taginput .is-small.taginput-container.is-focusable,.textarea.is-small{border-radius:2px;font-size:.75rem}.input.is-medium,.taginput .is-medium.taginput-container.is-focusable,.textarea.is-medium{font-size:1.25rem}.input.is-large,.taginput .is-large.taginput-container.is-focusable,.textarea.is-large{font-size:1.5rem}.input.is-fullwidth,.taginput .is-fullwidth.taginput-container.is-focusable,.textarea.is-fullwidth{display:block;width:100%}.input.is-inline,.taginput .is-inline.taginput-container.is-focusable,.textarea.is-inline{display:inline;width:auto}.input.is-rounded,.taginput .is-rounded.taginput-container.is-focusable{border-radius:290486px;padding-left:1em;padding-right:1em}.input.is-static,.taginput .is-static.taginput-container.is-focusable{background-color:transparent;border-color:transparent;box-shadow:none;padding-left:0;padding-right:0}.textarea{display:block;max-width:100%;min-width:100%;padding:.625em;resize:vertical}.textarea:not([rows]){max-height:600px;min-height:120px}.textarea[rows]{height:auto}.textarea.has-fixed-size{resize:none}.checkbox,.radio{cursor:pointer;display:inline-block;line-height:1.25;position:relative}.checkbox input,.radio input{cursor:pointer}.checkbox:hover,.radio:hover{color:#363636}.checkbox[disabled],.radio[disabled]{color:#7a7a7a;cursor:not-allowed}.radio+.radio{margin-left:.5em}.select{display:inline-block;max-width:100%;position:relative;vertical-align:top}.select:not(.is-multiple){height:2.25em}.select:not(.is-multiple):not(.is-loading):after{border-color:#3273dc;right:1.125em;z-index:4}.select.is-rounded select{border-radius:290486px;padding-left:1em}.select select{background-color:#fff;border-color:#dbdbdb;color:#363636;cursor:pointer;display:block;font-size:1em;max-width:100%;outline:none}.select select::-moz-placeholder{color:rgba(54,54,54,.3)}.select select::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.select select:-moz-placeholder{color:rgba(54,54,54,.3)}.select select:-ms-input-placeholder{color:rgba(54,54,54,.3)}.select select.is-hovered,.select select:hover{border-color:#b5b5b5}.select select.is-active,.select select.is-focused,.select select:active,.select select:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.select select[disabled]{background-color:#f5f5f5;border-color:#f5f5f5;box-shadow:none;color:#7a7a7a}.select select[disabled]::-moz-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]::-webkit-input-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]:-moz-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]:-ms-input-placeholder{color:hsla(0,0%,48%,.3)}.select select::-ms-expand{display:none}.select select[disabled]:hover{border-color:#f5f5f5}.select select:not([multiple]){padding-right:2.5em}.select select[multiple]{height:auto;padding:0}.select select[multiple] option{padding:.5em 1em}.select:not(.is-multiple):not(.is-loading):hover:after{border-color:#363636}.select.is-white:not(:hover):after,.select.is-white select{border-color:#fff}.select.is-white select.is-hovered,.select.is-white select:hover{border-color:#f2f2f2}.select.is-white select.is-active,.select.is-white select.is-focused,.select.is-white select:active,.select.is-white select:focus{box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.select.is-black:not(:hover):after,.select.is-black select{border-color:#0a0a0a}.select.is-black select.is-hovered,.select.is-black select:hover{border-color:#000}.select.is-black select.is-active,.select.is-black select.is-focused,.select.is-black select:active,.select.is-black select:focus{box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.select.is-light:not(:hover):after,.select.is-light select{border-color:#f5f5f5}.select.is-light select.is-hovered,.select.is-light select:hover{border-color:#e8e8e8}.select.is-light select.is-active,.select.is-light select.is-focused,.select.is-light select:active,.select.is-light select:focus{box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.select.is-dark:not(:hover):after,.select.is-dark select{border-color:#363636}.select.is-dark select.is-hovered,.select.is-dark select:hover{border-color:#292929}.select.is-dark select.is-active,.select.is-dark select.is-focused,.select.is-dark select:active,.select.is-dark select:focus{box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.select.is-primary:not(:hover):after,.select.is-primary select{border-color:#00d1b2}.select.is-primary select.is-hovered,.select.is-primary select:hover{border-color:#00b89c}.select.is-primary select.is-active,.select.is-primary select.is-focused,.select.is-primary select:active,.select.is-primary select:focus{box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.select.is-link:not(:hover):after,.select.is-link select{border-color:#3273dc}.select.is-link select.is-hovered,.select.is-link select:hover{border-color:#2366d1}.select.is-link select.is-active,.select.is-link select.is-focused,.select.is-link select:active,.select.is-link select:focus{box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.select.is-info:not(:hover):after,.select.is-info select{border-color:#209cee}.select.is-info select.is-hovered,.select.is-info select:hover{border-color:#118fe4}.select.is-info select.is-active,.select.is-info select.is-focused,.select.is-info select:active,.select.is-info select:focus{box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.select.is-success:not(:hover):after,.select.is-success select{border-color:#23d160}.select.is-success select.is-hovered,.select.is-success select:hover{border-color:#20bc56}.select.is-success select.is-active,.select.is-success select.is-focused,.select.is-success select:active,.select.is-success select:focus{box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.select.is-warning:not(:hover):after,.select.is-warning select{border-color:#ffdd57}.select.is-warning select.is-hovered,.select.is-warning select:hover{border-color:#ffd83d}.select.is-warning select.is-active,.select.is-warning select.is-focused,.select.is-warning select:active,.select.is-warning select:focus{box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.select.is-danger:not(:hover):after,.select.is-danger select{border-color:#ff3860}.select.is-danger select.is-hovered,.select.is-danger select:hover{border-color:#ff1f4b}.select.is-danger select.is-active,.select.is-danger select.is-focused,.select.is-danger select:active,.select.is-danger select:focus{box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.select.is-small{border-radius:2px;font-size:.75rem}.select.is-medium{font-size:1.25rem}.select.is-large{font-size:1.5rem}.select.is-disabled:after{border-color:#7a7a7a}.select.is-fullwidth,.select.is-fullwidth select{width:100%}.select.is-loading:after{margin-top:0;position:absolute;right:.625em;top:.625em;transform:none}.select.is-loading.is-small:after{font-size:.75rem}.select.is-loading.is-medium:after{font-size:1.25rem}.select.is-loading.is-large:after{font-size:1.5rem}.file{align-items:stretch;display:flex;justify-content:flex-start;position:relative}.file.is-white .file-cta{background-color:#fff;border-color:transparent;color:#0a0a0a}.file.is-white.is-hovered .file-cta,.file.is-white:hover .file-cta{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.file.is-white.is-focused .file-cta,.file.is-white:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,100%,.25);color:#0a0a0a}.file.is-white.is-active .file-cta,.file.is-white:active .file-cta{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.file.is-black .file-cta{background-color:#0a0a0a;border-color:transparent;color:#fff}.file.is-black.is-hovered .file-cta,.file.is-black:hover .file-cta{background-color:#040404;border-color:transparent;color:#fff}.file.is-black.is-focused .file-cta,.file.is-black:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,4%,.25);color:#fff}.file.is-black.is-active .file-cta,.file.is-black:active .file-cta{background-color:#000;border-color:transparent;color:#fff}.file.is-light .file-cta{background-color:#f5f5f5;border-color:transparent;color:#363636}.file.is-light.is-hovered .file-cta,.file.is-light:hover .file-cta{background-color:#eee;border-color:transparent;color:#363636}.file.is-light.is-focused .file-cta,.file.is-light:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,96%,.25);color:#363636}.file.is-light.is-active .file-cta,.file.is-light:active .file-cta{background-color:#e8e8e8;border-color:transparent;color:#363636}.file.is-dark .file-cta{background-color:#363636;border-color:transparent;color:#f5f5f5}.file.is-dark.is-hovered .file-cta,.file.is-dark:hover .file-cta{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.file.is-dark.is-focused .file-cta,.file.is-dark:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(54,54,54,.25);color:#f5f5f5}.file.is-dark.is-active .file-cta,.file.is-dark:active .file-cta{background-color:#292929;border-color:transparent;color:#f5f5f5}.file.is-primary .file-cta{background-color:#00d1b2;border-color:transparent;color:#fff}.file.is-primary.is-hovered .file-cta,.file.is-primary:hover .file-cta{background-color:#00c4a7;border-color:transparent;color:#fff}.file.is-primary.is-focused .file-cta,.file.is-primary:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(0,209,178,.25);color:#fff}.file.is-primary.is-active .file-cta,.file.is-primary:active .file-cta{background-color:#00b89c;border-color:transparent;color:#fff}.file.is-link .file-cta{background-color:#3273dc;border-color:transparent;color:#fff}.file.is-link.is-hovered .file-cta,.file.is-link:hover .file-cta{background-color:#276cda;border-color:transparent;color:#fff}.file.is-link.is-focused .file-cta,.file.is-link:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(50,115,220,.25);color:#fff}.file.is-link.is-active .file-cta,.file.is-link:active .file-cta{background-color:#2366d1;border-color:transparent;color:#fff}.file.is-info .file-cta{background-color:#209cee;border-color:transparent;color:#fff}.file.is-info.is-hovered .file-cta,.file.is-info:hover .file-cta{background-color:#1496ed;border-color:transparent;color:#fff}.file.is-info.is-focused .file-cta,.file.is-info:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(32,156,238,.25);color:#fff}.file.is-info.is-active .file-cta,.file.is-info:active .file-cta{background-color:#118fe4;border-color:transparent;color:#fff}.file.is-success .file-cta{background-color:#23d160;border-color:transparent;color:#fff}.file.is-success.is-hovered .file-cta,.file.is-success:hover .file-cta{background-color:#22c65b;border-color:transparent;color:#fff}.file.is-success.is-focused .file-cta,.file.is-success:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(35,209,96,.25);color:#fff}.file.is-success.is-active .file-cta,.file.is-success:active .file-cta{background-color:#20bc56;border-color:transparent;color:#fff}.file.is-warning .file-cta{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-hovered .file-cta,.file.is-warning:hover .file-cta{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-focused .file-cta,.file.is-warning:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(255,221,87,.25);color:rgba(0,0,0,.7)}.file.is-warning.is-active .file-cta,.file.is-warning:active .file-cta{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-danger .file-cta{background-color:#ff3860;border-color:transparent;color:#fff}.file.is-danger.is-hovered .file-cta,.file.is-danger:hover .file-cta{background-color:#ff2b56;border-color:transparent;color:#fff}.file.is-danger.is-focused .file-cta,.file.is-danger:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(255,56,96,.25);color:#fff}.file.is-danger.is-active .file-cta,.file.is-danger:active .file-cta{background-color:#ff1f4b;border-color:transparent;color:#fff}.file.is-small{font-size:.75rem}.file.is-medium{font-size:1.25rem}.file.is-medium .file-icon .fa{font-size:21px}.file.is-large{font-size:1.5rem}.file.is-large .file-icon .fa{font-size:28px}.file.has-name .file-cta{border-bottom-right-radius:0;border-top-right-radius:0}.file.has-name .file-name{border-bottom-left-radius:0;border-top-left-radius:0}.file.has-name.is-empty .file-cta{border-radius:4px}.file.has-name.is-empty .file-name{display:none}.file.is-boxed .file-label{flex-direction:column}.file.is-boxed .file-cta{flex-direction:column;height:auto;padding:1em 3em}.file.is-boxed .file-name{border-width:0 1px 1px}.file.is-boxed .file-icon{height:1.5em;width:1.5em}.file.is-boxed .file-icon .fa{font-size:21px}.file.is-boxed.is-small .file-icon .fa{font-size:14px}.file.is-boxed.is-medium .file-icon .fa{font-size:28px}.file.is-boxed.is-large .file-icon .fa{font-size:35px}.file.is-boxed.has-name .file-cta{border-radius:4px 4px 0 0}.file.is-boxed.has-name .file-name{border-radius:0 0 4px 4px;border-width:0 1px 1px}.file.is-centered{justify-content:center}.file.is-fullwidth .file-label{width:100%}.file.is-fullwidth .file-name{flex-grow:1;max-width:none}.file.is-right{justify-content:flex-end}.file.is-right .file-cta{border-radius:0 4px 4px 0}.file.is-right .file-name{border-radius:4px 0 0 4px;border-width:1px 0 1px 1px;order:-1}.file-label{align-items:stretch;display:flex;cursor:pointer;justify-content:flex-start;overflow:hidden;position:relative}.file-label:hover .file-cta{background-color:#eee;color:#363636}.file-label:hover .file-name{border-color:#d5d5d5}.file-label:active .file-cta{background-color:#e8e8e8;color:#363636}.file-label:active .file-name{border-color:#cfcfcf}.file-input{height:.01em;left:0;outline:none;position:absolute;top:0;width:.01em}.file-cta,.file-name{border-color:#dbdbdb;border-radius:4px;font-size:1em;padding-left:1em;padding-right:1em;white-space:nowrap}.file-cta{background-color:#f5f5f5;color:#4a4a4a}.file-name{border-color:#dbdbdb;border-style:solid;border-width:1px 1px 1px 0;display:block;max-width:16em;overflow:hidden;text-align:left;text-overflow:ellipsis}.file-icon{align-items:center;display:flex;height:1em;justify-content:center;margin-right:.5em;width:1em}.file-icon .fa{font-size:14px}.label{color:#363636;display:block;font-size:1rem;font-weight:700}.label:not(:last-child){margin-bottom:.5em}.label.is-small{font-size:.75rem}.label.is-medium{font-size:1.25rem}.label.is-large{font-size:1.5rem}.help{display:block;font-size:.75rem;margin-top:.25rem}.help.is-white{color:#fff}.help.is-black{color:#0a0a0a}.help.is-light{color:#f5f5f5}.help.is-dark{color:#363636}.help.is-primary{color:#00d1b2}.help.is-link{color:#3273dc}.help.is-info{color:#209cee}.help.is-success{color:#23d160}.help.is-warning{color:#ffdd57}.help.is-danger{color:#ff3860}.field:not(:last-child){margin-bottom:.75rem}.field.has-addons{display:flex;justify-content:flex-start}.field.has-addons .control:not(:last-child){margin-right:-1px}.field.has-addons .control:not(:first-child):not(:last-child) .button,.field.has-addons .control:not(:first-child):not(:last-child) .input,.field.has-addons .control:not(:first-child):not(:last-child) .select select,.field.has-addons .control:not(:first-child):not(:last-child) .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:not(:first-child):not(:last-child) .taginput-container.is-focusable{border-radius:0}.field.has-addons .control:first-child .button,.field.has-addons .control:first-child .input,.field.has-addons .control:first-child .select select,.field.has-addons .control:first-child .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:first-child .taginput-container.is-focusable{border-bottom-right-radius:0;border-top-right-radius:0}.field.has-addons .control:last-child .button,.field.has-addons .control:last-child .input,.field.has-addons .control:last-child .select select,.field.has-addons .control:last-child .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:last-child .taginput-container.is-focusable{border-bottom-left-radius:0;border-top-left-radius:0}.field.has-addons .control .button.is-hovered,.field.has-addons .control .button:hover,.field.has-addons .control .input.is-hovered,.field.has-addons .control .input:hover,.field.has-addons .control .select select.is-hovered,.field.has-addons .control .select select:hover,.field.has-addons .control .taginput .is-hovered.taginput-container.is-focusable,.field.has-addons .control .taginput .taginput-container.is-focusable:hover,.taginput .field.has-addons .control .is-hovered.taginput-container.is-focusable,.taginput .field.has-addons .control .taginput-container.is-focusable:hover{z-index:2}.field.has-addons .control .button.is-active,.field.has-addons .control .button.is-focused,.field.has-addons .control .button:active,.field.has-addons .control .button:focus,.field.has-addons .control .input.is-active,.field.has-addons .control .input.is-focused,.field.has-addons .control .input:active,.field.has-addons .control .input:focus,.field.has-addons .control .select select.is-active,.field.has-addons .control .select select.is-focused,.field.has-addons .control .select select:active,.field.has-addons .control .select select:focus,.field.has-addons .control .taginput .is-active.taginput-container.is-focusable,.field.has-addons .control .taginput .is-focused.taginput-container.is-focusable,.field.has-addons .control .taginput .taginput-container.is-focusable:active,.field.has-addons .control .taginput .taginput-container.is-focusable:focus,.taginput .field.has-addons .control .is-active.taginput-container.is-focusable,.taginput .field.has-addons .control .is-focused.taginput-container.is-focusable,.taginput .field.has-addons .control .taginput-container.is-focusable:active,.taginput .field.has-addons .control .taginput-container.is-focusable:focus{z-index:3}.field.has-addons .control .button.is-active:hover,.field.has-addons .control .button.is-focused:hover,.field.has-addons .control .button:active:hover,.field.has-addons .control .button:focus:hover,.field.has-addons .control .input.is-active:hover,.field.has-addons .control .input.is-focused:hover,.field.has-addons .control .input:active:hover,.field.has-addons .control .input:focus:hover,.field.has-addons .control .select select.is-active:hover,.field.has-addons .control .select select.is-focused:hover,.field.has-addons .control .select select:active:hover,.field.has-addons .control .select select:focus:hover,.field.has-addons .control .taginput .is-active.taginput-container.is-focusable:hover,.field.has-addons .control .taginput .is-focused.taginput-container.is-focusable:hover,.field.has-addons .control .taginput .taginput-container.is-focusable:active:hover,.field.has-addons .control .taginput .taginput-container.is-focusable:focus:hover,.taginput .field.has-addons .control .is-active.taginput-container.is-focusable:hover,.taginput .field.has-addons .control .is-focused.taginput-container.is-focusable:hover,.taginput .field.has-addons .control .taginput-container.is-focusable:active:hover,.taginput .field.has-addons .control .taginput-container.is-focusable:focus:hover{z-index:4}.field.has-addons .control.is-expanded{flex-grow:1}.field.has-addons.has-addons-centered{justify-content:center}.field.has-addons.has-addons-right{justify-content:flex-end}.field.has-addons.has-addons-fullwidth .control{flex-grow:1;flex-shrink:0}.field.is-grouped{display:flex;justify-content:flex-start}.field.is-grouped>.control{flex-shrink:0}.field.is-grouped>.control:not(:last-child){margin-bottom:0;margin-right:.75rem}.field.is-grouped>.control.is-expanded{flex-grow:1;flex-shrink:1}.field.is-grouped.is-grouped-centered{justify-content:center}.field.is-grouped.is-grouped-right{justify-content:flex-end}.field.is-grouped.is-grouped-multiline{flex-wrap:wrap}.field.is-grouped.is-grouped-multiline>.control:last-child,.field.is-grouped.is-grouped-multiline>.control:not(:last-child){margin-bottom:.75rem}.field.is-grouped.is-grouped-multiline:last-child{margin-bottom:-.75rem}.field.is-grouped.is-grouped-multiline:not(:last-child){margin-bottom:0}@media print,screen and (min-width:769px){.field.is-horizontal{display:flex}}.field-label .label{font-size:inherit}@media screen and (max-width:768px){.field-label{margin-bottom:.5rem}}@media print,screen and (min-width:769px){.field-label{flex-basis:0;flex-grow:1;flex-shrink:0;margin-right:1.5rem;text-align:right}.field-label.is-small{font-size:.75rem;padding-top:.375em}.field-label.is-normal{padding-top:.375em}.field-label.is-medium{font-size:1.25rem;padding-top:.375em}.field-label.is-large{font-size:1.5rem;padding-top:.375em}}.field-body .field .field{margin-bottom:0}@media print,screen and (min-width:769px){.field-body{display:flex;flex-basis:0;flex-grow:5;flex-shrink:1}.field-body .field{margin-bottom:0}.field-body>.field{flex-shrink:1}.field-body>.field:not(.is-narrow){flex-grow:1}.field-body>.field:not(:last-child){margin-right:.75rem}}.control{font-size:1rem;position:relative;text-align:left}.control.has-icon .icon{color:#dbdbdb;height:2.25em;pointer-events:none;position:absolute;top:0;width:2.25em;z-index:4}.control.has-icon .input:focus+.icon,.control.has-icon .taginput .taginput-container.is-focusable:focus+.icon,.taginput .control.has-icon .taginput-container.is-focusable:focus+.icon{color:#7a7a7a}.control.has-icon .input.is-small+.icon,.control.has-icon .taginput .is-small.taginput-container.is-focusable+.icon,.taginput .control.has-icon .is-small.taginput-container.is-focusable+.icon{font-size:.75rem}.control.has-icon .input.is-medium+.icon,.control.has-icon .taginput .is-medium.taginput-container.is-focusable+.icon,.taginput .control.has-icon .is-medium.taginput-container.is-focusable+.icon{font-size:1.25rem}.control.has-icon .input.is-large+.icon,.control.has-icon .taginput .is-large.taginput-container.is-focusable+.icon,.taginput .control.has-icon .is-large.taginput-container.is-focusable+.icon{font-size:1.5rem}.control.has-icon:not(.has-icon-right) .icon{left:0}.control.has-icon:not(.has-icon-right) .input,.control.has-icon:not(.has-icon-right) .taginput .taginput-container.is-focusable,.taginput .control.has-icon:not(.has-icon-right) .taginput-container.is-focusable{padding-left:2.25em}.control.has-icon.has-icon-right .icon{right:0}.control.has-icon.has-icon-right .input,.control.has-icon.has-icon-right .taginput .taginput-container.is-focusable,.taginput .control.has-icon.has-icon-right .taginput-container.is-focusable{padding-right:2.25em}.control.has-icons-left .input:focus~.icon,.control.has-icons-left .select:focus~.icon,.control.has-icons-left .taginput .taginput-container.is-focusable:focus~.icon,.control.has-icons-right .input:focus~.icon,.control.has-icons-right .select:focus~.icon,.control.has-icons-right .taginput .taginput-container.is-focusable:focus~.icon,.taginput .control.has-icons-left .taginput-container.is-focusable:focus~.icon,.taginput .control.has-icons-right .taginput-container.is-focusable:focus~.icon{color:#7a7a7a}.control.has-icons-left .input.is-small~.icon,.control.has-icons-left .select.is-small~.icon,.control.has-icons-left .taginput .is-small.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-small~.icon,.control.has-icons-right .select.is-small~.icon,.control.has-icons-right .taginput .is-small.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-small.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-small.taginput-container.is-focusable~.icon{font-size:.75rem}.control.has-icons-left .input.is-medium~.icon,.control.has-icons-left .select.is-medium~.icon,.control.has-icons-left .taginput .is-medium.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-medium~.icon,.control.has-icons-right .select.is-medium~.icon,.control.has-icons-right .taginput .is-medium.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-medium.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-medium.taginput-container.is-focusable~.icon{font-size:1.25rem}.control.has-icons-left .input.is-large~.icon,.control.has-icons-left .select.is-large~.icon,.control.has-icons-left .taginput .is-large.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-large~.icon,.control.has-icons-right .select.is-large~.icon,.control.has-icons-right .taginput .is-large.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-large.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-large.taginput-container.is-focusable~.icon{font-size:1.5rem}.control.has-icons-left .icon,.control.has-icons-right .icon{color:#dbdbdb;height:2.25em;pointer-events:none;position:absolute;top:0;width:2.25em;z-index:4}.control.has-icons-left .input,.control.has-icons-left .select select,.control.has-icons-left .taginput .taginput-container.is-focusable,.taginput .control.has-icons-left .taginput-container.is-focusable{padding-left:2.25em}.control.has-icons-left .icon.is-left{left:0}.control.has-icons-right .input,.control.has-icons-right .select select,.control.has-icons-right .taginput .taginput-container.is-focusable,.taginput .control.has-icons-right .taginput-container.is-focusable{padding-right:2.25em}.control.has-icons-right .icon.is-right{right:0}.control.is-loading:after{position:absolute!important;right:.625em;top:.625em;z-index:4}.control.is-loading.is-small:after{font-size:.75rem}.control.is-loading.is-medium:after{font-size:1.25rem}.control.is-loading.is-large:after{font-size:1.5rem}.icon{align-items:center;display:inline-flex;justify-content:center;height:1.5rem;width:1.5rem}.icon.is-small{height:1rem;width:1rem}.icon.is-medium{height:2rem;width:2rem}.icon.is-large{height:3rem;width:3rem}.image{display:block;position:relative}.image img{display:block;height:auto;width:100%}.image img.is-rounded{border-radius:290486px}.image.is-1by1 img,.image.is-1by2 img,.image.is-1by3 img,.image.is-2by1 img,.image.is-2by3 img,.image.is-3by1 img,.image.is-3by2 img,.image.is-3by4 img,.image.is-3by5 img,.image.is-4by3 img,.image.is-4by5 img,.image.is-5by3 img,.image.is-5by4 img,.image.is-9by16 img,.image.is-16by9 img,.image.is-square img{height:100%;width:100%}.image.is-1by1,.image.is-square{padding-top:100%}.image.is-5by4{padding-top:80%}.image.is-4by3{padding-top:75%}.image.is-3by2{padding-top:66.6666%}.image.is-5by3{padding-top:60%}.image.is-16by9{padding-top:56.25%}.image.is-2by1{padding-top:50%}.image.is-3by1{padding-top:33.3333%}.image.is-4by5{padding-top:125%}.image.is-3by4{padding-top:133.3333%}.image.is-2by3{padding-top:150%}.image.is-3by5{padding-top:166.6666%}.image.is-9by16{padding-top:177.7777%}.image.is-1by2{padding-top:200%}.image.is-1by3{padding-top:300%}.image.is-16x16{height:16px;width:16px}.image.is-24x24{height:24px;width:24px}.image.is-32x32{height:32px;width:32px}.image.is-48x48{height:48px;width:48px}.image.is-64x64{height:64px;width:64px}.image.is-96x96{height:96px;width:96px}.image.is-128x128{height:128px;width:128px}.notification{background-color:#f5f5f5;border-radius:4px;padding:1.25rem 2.5rem 1.25rem 1.5rem;position:relative}.notification a:not(.button){color:currentColor;text-decoration:underline}.notification strong{color:currentColor}.notification code,.notification pre{background:#fff}.notification pre code{background:transparent}.notification>.delete{position:absolute;right:.5rem;top:.5rem}.notification .content,.notification .subtitle,.notification .title{color:currentColor}.notification.is-white{background-color:#fff;color:#0a0a0a}.notification.is-black{background-color:#0a0a0a;color:#fff}.notification.is-light{background-color:#f5f5f5;color:#363636}.notification.is-dark{background-color:#363636;color:#f5f5f5}.notification.is-primary{background-color:#00d1b2;color:#fff}.notification.is-link{background-color:#3273dc;color:#fff}.notification.is-info{background-color:#209cee;color:#fff}.notification.is-success{background-color:#23d160;color:#fff}.notification.is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.notification.is-danger{background-color:#ff3860;color:#fff}.progress{-moz-appearance:none;-webkit-appearance:none;border:none;border-radius:290486px;display:block;height:1rem;overflow:hidden;padding:0;width:100%}.progress::-webkit-progress-bar{background-color:#dbdbdb}.progress::-webkit-progress-value{background-color:#4a4a4a}.progress::-moz-progress-bar{background-color:#4a4a4a}.progress::-ms-fill{background-color:#4a4a4a;border:none}.progress.is-white::-webkit-progress-value{background-color:#fff}.progress.is-white::-moz-progress-bar{background-color:#fff}.progress.is-white::-ms-fill{background-color:#fff}.progress.is-black::-webkit-progress-value{background-color:#0a0a0a}.progress.is-black::-moz-progress-bar{background-color:#0a0a0a}.progress.is-black::-ms-fill{background-color:#0a0a0a}.progress.is-light::-webkit-progress-value{background-color:#f5f5f5}.progress.is-light::-moz-progress-bar{background-color:#f5f5f5}.progress.is-light::-ms-fill{background-color:#f5f5f5}.progress.is-dark::-webkit-progress-value{background-color:#363636}.progress.is-dark::-moz-progress-bar{background-color:#363636}.progress.is-dark::-ms-fill{background-color:#363636}.progress.is-primary::-webkit-progress-value{background-color:#00d1b2}.progress.is-primary::-moz-progress-bar{background-color:#00d1b2}.progress.is-primary::-ms-fill{background-color:#00d1b2}.progress.is-link::-webkit-progress-value{background-color:#3273dc}.progress.is-link::-moz-progress-bar{background-color:#3273dc}.progress.is-link::-ms-fill{background-color:#3273dc}.progress.is-info::-webkit-progress-value{background-color:#209cee}.progress.is-info::-moz-progress-bar{background-color:#209cee}.progress.is-info::-ms-fill{background-color:#209cee}.progress.is-success::-webkit-progress-value{background-color:#23d160}.progress.is-success::-moz-progress-bar{background-color:#23d160}.progress.is-success::-ms-fill{background-color:#23d160}.progress.is-warning::-webkit-progress-value{background-color:#ffdd57}.progress.is-warning::-moz-progress-bar{background-color:#ffdd57}.progress.is-warning::-ms-fill{background-color:#ffdd57}.progress.is-danger::-webkit-progress-value{background-color:#ff3860}.progress.is-danger::-moz-progress-bar{background-color:#ff3860}.progress.is-danger::-ms-fill{background-color:#ff3860}.progress.is-small{height:.75rem}.progress.is-medium{height:1.25rem}.progress.is-large{height:1.5rem}.table{background-color:#fff;color:#363636}.table td,.table th{border:1px solid #dbdbdb;border-width:0 0 1px;padding:.5em .75em;vertical-align:top}.table td.is-white,.table th.is-white{background-color:#fff;border-color:#fff;color:#0a0a0a}.table td.is-black,.table th.is-black{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.table td.is-light,.table th.is-light{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.table td.is-dark,.table th.is-dark{background-color:#363636;border-color:#363636;color:#f5f5f5}.table td.is-primary,.table th.is-primary{background-color:#00d1b2;border-color:#00d1b2;color:#fff}.table td.is-link,.table th.is-link{background-color:#3273dc;border-color:#3273dc;color:#fff}.table td.is-info,.table th.is-info{background-color:#209cee;border-color:#209cee;color:#fff}.table td.is-success,.table th.is-success{background-color:#23d160;border-color:#23d160;color:#fff}.table td.is-warning,.table th.is-warning{background-color:#ffdd57;border-color:#ffdd57;color:rgba(0,0,0,.7)}.table td.is-danger,.table th.is-danger{background-color:#ff3860;border-color:#ff3860;color:#fff}.table td.is-narrow,.table th.is-narrow{white-space:nowrap;width:1%}.table td.is-selected,.table th.is-selected{background-color:#00d1b2;color:#fff}.table td.is-selected a,.table td.is-selected strong,.table th.is-selected a,.table th.is-selected strong{color:currentColor}.table th{color:#363636;text-align:left}.table tr.is-selected{background-color:#00d1b2;color:#fff}.table tr.is-selected a,.table tr.is-selected strong{color:currentColor}.table tr.is-selected td,.table tr.is-selected th{border-color:#fff;color:currentColor}.table thead td,.table thead th{border-width:0 0 2px;color:#363636}.table tfoot td,.table tfoot th{border-width:2px 0 0;color:#363636}.table tbody tr:last-child td,.table tbody tr:last-child th{border-bottom-width:0}.table.is-bordered td,.table.is-bordered th{border-width:1px}.table.is-bordered tr:last-child td,.table.is-bordered tr:last-child th{border-bottom-width:1px}.table.is-fullwidth{width:100%}.table.is-hoverable tbody tr:not(.is-selected):hover{background-color:#fafafa}.table.is-hoverable.is-striped tbody tr:not(.is-selected):hover{background-color:#f5f5f5}.table.is-narrow td,.table.is-narrow th{padding:.25em .5em}.table.is-striped tbody tr:not(.is-selected):nth-child(2n){background-color:#fafafa}.table-container{-webkit-overflow-scrolling:touch;overflow:auto;overflow-y:hidden;max-width:100%}.tags{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.tags .tag{margin-bottom:.5rem}.tags .tag:not(:last-child){margin-right:.5rem}.tags:last-child{margin-bottom:-.5rem}.tags:not(:last-child){margin-bottom:1rem}.tags.has-addons .tag{margin-right:0}.tags.has-addons .tag:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.tags.has-addons .tag:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.tags.is-centered{justify-content:center}.tags.is-centered .tag{margin-right:.25rem;margin-left:.25rem}.tags.is-right{justify-content:flex-end}.tags.is-right .tag:not(:first-child){margin-left:.5rem}.tags.is-right .tag:not(:last-child){margin-right:0}.tag:not(body){align-items:center;background-color:#f5f5f5;border-radius:4px;color:#4a4a4a;display:inline-flex;font-size:.75rem;height:2em;justify-content:center;line-height:1.5;padding-left:.75em;padding-right:.75em;white-space:nowrap}.tag:not(body) .delete{margin-left:.25rem;margin-right:-.375rem}.tag:not(body).is-white{background-color:#fff;color:#0a0a0a}.tag:not(body).is-black{background-color:#0a0a0a;color:#fff}.tag:not(body).is-light{background-color:#f5f5f5;color:#363636}.tag:not(body).is-dark{background-color:#363636;color:#f5f5f5}.tag:not(body).is-primary{background-color:#00d1b2;color:#fff}.tag:not(body).is-link{background-color:#3273dc;color:#fff}.tag:not(body).is-info{background-color:#209cee;color:#fff}.tag:not(body).is-success{background-color:#23d160;color:#fff}.tag:not(body).is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.tag:not(body).is-danger{background-color:#ff3860;color:#fff}.tag:not(body).is-medium{font-size:1rem}.tag:not(body).is-large{font-size:1.25rem}.tag:not(body) .icon:first-child:not(:last-child){margin-left:-.375em;margin-right:.1875em}.tag:not(body) .icon:last-child:not(:first-child){margin-left:.1875em;margin-right:-.375em}.tag:not(body) .icon:first-child:last-child{margin-left:-.375em;margin-right:-.375em}.tag:not(body).is-delete{margin-left:1px;padding:0;position:relative;width:2em}.tag:not(body).is-delete:after,.tag:not(body).is-delete:before{background-color:currentColor;content:\\\"\\\";display:block;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) rotate(45deg);transform-origin:center center}.tag:not(body).is-delete:before{height:1px;width:50%}.tag:not(body).is-delete:after{height:50%;width:1px}.tag:not(body).is-delete:focus,.tag:not(body).is-delete:hover{background-color:#e8e8e8}.tag:not(body).is-delete:active{background-color:#dbdbdb}.tag:not(body).is-rounded{border-radius:290486px}a.tag:hover{text-decoration:underline}.subtitle,.title{word-break:break-word}.subtitle em,.subtitle span,.title em,.title span{font-weight:inherit}.subtitle sub,.subtitle sup,.title sub,.title sup{font-size:.75em}.subtitle .tag,.title .tag{vertical-align:middle}.title{color:#363636;font-size:2rem;font-weight:600;line-height:1.125}.title strong{color:inherit;font-weight:inherit}.title+.highlight{margin-top:-.75rem}.title:not(.is-spaced)+.subtitle{margin-top:-1.25rem}.title.is-1{font-size:3rem}.title.is-2{font-size:2.5rem}.title.is-3{font-size:2rem}.title.is-4{font-size:1.5rem}.title.is-5{font-size:1.25rem}.title.is-6{font-size:1rem}.title.is-7{font-size:.75rem}.subtitle{color:#4a4a4a;font-size:1.25rem;font-weight:400;line-height:1.25}.subtitle strong{color:#363636;font-weight:600}.subtitle:not(.is-spaced)+.title{margin-top:-1.25rem}.subtitle.is-1{font-size:3rem}.subtitle.is-2{font-size:2.5rem}.subtitle.is-3{font-size:2rem}.subtitle.is-4{font-size:1.5rem}.subtitle.is-5{font-size:1.25rem}.subtitle.is-6{font-size:1rem}.subtitle.is-7{font-size:.75rem}.heading{display:block;font-size:11px;letter-spacing:1px;margin-bottom:5px;text-transform:uppercase}.highlight{font-weight:400;max-width:100%;overflow:hidden;padding:0}.highlight pre{overflow:auto;max-width:100%}.number{align-items:center;background-color:#f5f5f5;border-radius:290486px;display:inline-flex;font-size:1.25rem;height:2em;justify-content:center;margin-right:1.5rem;min-width:2.5em;padding:.25rem .5rem;text-align:center;vertical-align:top}.breadcrumb{font-size:1rem;white-space:nowrap}.breadcrumb a{align-items:center;color:#3273dc;display:flex;justify-content:center;padding:0 .75em}.breadcrumb a:hover{color:#363636}.breadcrumb li{align-items:center;display:flex}.breadcrumb li:first-child a{padding-left:0}.breadcrumb li.is-active a{color:#363636;cursor:default;pointer-events:none}.breadcrumb li+li:before{color:#b5b5b5;content:\\\"/\\\"}.breadcrumb ol,.breadcrumb ul{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-start}.breadcrumb .icon:first-child{margin-right:.5em}.breadcrumb .icon:last-child{margin-left:.5em}.breadcrumb.is-centered ol,.breadcrumb.is-centered ul{justify-content:center}.breadcrumb.is-right ol,.breadcrumb.is-right ul{justify-content:flex-end}.breadcrumb.is-small{font-size:.75rem}.breadcrumb.is-medium{font-size:1.25rem}.breadcrumb.is-large{font-size:1.5rem}.breadcrumb.has-arrow-separator li+li:before{content:\\\"\\\\2192\\\"}.breadcrumb.has-bullet-separator li+li:before{content:\\\"\\\\2022\\\"}.breadcrumb.has-dot-separator li+li:before{content:\\\"\\\\B7\\\"}.breadcrumb.has-succeeds-separator li+li:before{content:\\\"\\\\227B\\\"}.card{background-color:#fff;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);color:#4a4a4a;max-width:100%;position:relative}.card-header{background-color:none;align-items:stretch;box-shadow:0 1px 2px hsla(0,0%,4%,.1);display:flex}.card-header-title{align-items:center;color:#363636;display:flex;flex-grow:1;font-weight:700;padding:.75rem}.card-header-icon,.card-header-title.is-centered{justify-content:center}.card-header-icon{align-items:center;cursor:pointer;display:flex;padding:.75rem}.card-image{display:block;position:relative}.card-content{background-color:none;padding:1.5rem}.card-footer{background-color:none;border-top:1px solid #dbdbdb;align-items:stretch;display:flex}.card-footer-item{align-items:center;display:flex;flex-basis:0;flex-grow:1;flex-shrink:0;justify-content:center;padding:.75rem}.card-footer-item:not(:last-child){border-right:1px solid #dbdbdb}.card .media:not(:last-child){margin-bottom:.75rem}.dropdown{display:inline-flex;position:relative;vertical-align:top}.dropdown.is-active .dropdown-menu,.dropdown.is-hoverable:hover .dropdown-menu{display:block}.dropdown.is-right .dropdown-menu{left:auto;right:0}.dropdown.is-up .dropdown-menu{bottom:100%;padding-bottom:4px;padding-top:0;top:auto}.dropdown-menu{display:none;left:0;min-width:12rem;padding-top:4px;position:absolute;top:100%;z-index:20}.dropdown-content{background-color:#fff;border-radius:4px;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);padding-bottom:.5rem;padding-top:.5rem}.dropdown-item,.dropdown .dropdown-menu .has-link a{color:#4a4a4a;display:block;font-size:.875rem;line-height:1.5;padding:.375rem 1rem;position:relative}.dropdown .dropdown-menu .has-link a,a.dropdown-item{padding-right:3rem;white-space:nowrap}.dropdown .dropdown-menu .has-link a:hover,a.dropdown-item:hover{background-color:#f5f5f5;color:#0a0a0a}.dropdown .dropdown-menu .has-link a.is-active,a.dropdown-item.is-active{background-color:#3273dc;color:#fff}.dropdown-divider{background-color:#dbdbdb;border:none;display:block;height:1px;margin:.5rem 0}.level{align-items:center;justify-content:space-between}.level code{border-radius:4px}.level img{display:inline-block;vertical-align:top}.level.is-mobile,.level.is-mobile .level-left,.level.is-mobile .level-right{display:flex}.level.is-mobile .level-left+.level-right{margin-top:0}.level.is-mobile .level-item{margin-right:.75rem}.level.is-mobile .level-item:not(:last-child){margin-bottom:0}.level.is-mobile .level-item:not(.is-narrow){flex-grow:1}@media print,screen and (min-width:769px){.level{display:flex}.level>.level-item:not(.is-narrow){flex-grow:1}}.level-item{align-items:center;display:flex;flex-basis:auto;flex-grow:0;flex-shrink:0;justify-content:center}.level-item .subtitle,.level-item .title{margin-bottom:0}@media screen and (max-width:768px){.level-item:not(:last-child){margin-bottom:.75rem}}.level-left,.level-right{flex-basis:auto;flex-grow:0;flex-shrink:0}.level-left .level-item.is-flexible,.level-right .level-item.is-flexible{flex-grow:1}@media print,screen and (min-width:769px){.level-left .level-item:not(:last-child),.level-right .level-item:not(:last-child){margin-right:.75rem}}.level-left{align-items:center;justify-content:flex-start}@media screen and (max-width:768px){.level-left+.level-right{margin-top:1.5rem}}@media print,screen and (min-width:769px){.level-left{display:flex}}.level-right{align-items:center;justify-content:flex-end}@media print,screen and (min-width:769px){.level-right{display:flex}}.media{align-items:flex-start;display:flex;text-align:left}.media .content:not(:last-child){margin-bottom:.75rem}.media .media{border-top:1px solid hsla(0,0%,86%,.5);display:flex;padding-top:.75rem}.media .media .content:not(:last-child),.media .media .control:not(:last-child){margin-bottom:.5rem}.media .media .media{padding-top:.5rem}.media .media .media+.media{margin-top:.5rem}.media+.media{border-top:1px solid hsla(0,0%,86%,.5);margin-top:1rem;padding-top:1rem}.media.is-large+.media{margin-top:1.5rem;padding-top:1.5rem}.media-left,.media-right{flex-basis:auto;flex-grow:0;flex-shrink:0}.media-left{margin-right:1rem}.media-right{margin-left:1rem}.media-content{flex-basis:auto;flex-grow:1;flex-shrink:1;text-align:left}.menu{font-size:1rem}.menu.is-small{font-size:.75rem}.menu.is-medium{font-size:1.25rem}.menu.is-large{font-size:1.5rem}.menu-list{line-height:1.25}.menu-list a{border-radius:2px;color:#4a4a4a;display:block;padding:.5em .75em}.menu-list a:hover{background-color:#f5f5f5;color:#363636}.menu-list a.is-active{background-color:#3273dc;color:#fff}.menu-list li ul{border-left:1px solid #dbdbdb;margin:.75em;padding-left:.75em}.menu-label{color:#7a7a7a;font-size:.75em;letter-spacing:.1em;text-transform:uppercase}.menu-label:not(:first-child){margin-top:1em}.menu-label:not(:last-child){margin-bottom:1em}.message{background-color:#f5f5f5;border-radius:4px;font-size:1rem}.message strong{color:currentColor}.message a:not(.button):not(.tag){color:currentColor;text-decoration:underline}.message.is-small{font-size:.75rem}.message.is-medium{font-size:1.25rem}.message.is-large{font-size:1.5rem}.message.is-white{background-color:#fff}.message.is-white .message-header{background-color:#fff;color:#0a0a0a}.message.is-white .message-body{border-color:#fff;color:#4d4d4d}.message.is-black{background-color:#fafafa}.message.is-black .message-header{background-color:#0a0a0a;color:#fff}.message.is-black .message-body{border-color:#0a0a0a;color:#090909}.message.is-light{background-color:#fafafa}.message.is-light .message-header{background-color:#f5f5f5;color:#363636}.message.is-light .message-body{border-color:#f5f5f5;color:#505050}.message.is-dark{background-color:#fafafa}.message.is-dark .message-header{background-color:#363636;color:#f5f5f5}.message.is-dark .message-body{border-color:#363636;color:#2a2a2a}.message.is-primary{background-color:#f5fffd}.message.is-primary .message-header{background-color:#00d1b2;color:#fff}.message.is-primary .message-body{border-color:#00d1b2;color:#021310}.message.is-link{background-color:#f6f9fe}.message.is-link .message-header{background-color:#3273dc;color:#fff}.message.is-link .message-body{border-color:#3273dc;color:#22509a}.message.is-info{background-color:#f6fbfe}.message.is-info .message-header{background-color:#209cee;color:#fff}.message.is-info .message-body{border-color:#209cee;color:#12537e}.message.is-success{background-color:#f6fef9}.message.is-success .message-header{background-color:#23d160;color:#fff}.message.is-success .message-body{border-color:#23d160;color:#0e301a}.message.is-warning{background-color:#fffdf5}.message.is-warning .message-header{background-color:#ffdd57;color:rgba(0,0,0,.7)}.message.is-warning .message-body{border-color:#ffdd57;color:#3b3108}.message.is-danger{background-color:#fff5f7}.message.is-danger .message-header{background-color:#ff3860;color:#fff}.message.is-danger .message-body{border-color:#ff3860;color:#cd0930}.message-header{align-items:center;background-color:#4a4a4a;border-radius:4px 4px 0 0;color:#fff;display:flex;font-weight:700;justify-content:space-between;line-height:1.25;padding:.75em 1em;position:relative}.message-header .delete{flex-grow:0;flex-shrink:0;margin-left:.75em}.message-header+.message-body{border-width:0;border-top-left-radius:0;border-top-right-radius:0}.message-body{border-color:#dbdbdb;border-radius:4px;border-style:solid;border-width:0 0 0 4px;color:#4a4a4a;padding:1.25em 1.5em}.message-body code,.message-body pre{background-color:#fff}.message-body pre code{background-color:transparent}.modal{align-items:center;display:none;justify-content:center;overflow:hidden;position:fixed;z-index:40}.modal.is-active{display:flex}.modal-background{background-color:hsla(0,0%,4%,.86)}.modal-card,.modal-content{margin:0 20px;max-height:calc(100vh - 160px);overflow:auto;position:relative;width:100%}@media print,screen and (min-width:769px){.modal-card,.modal-content{margin:0 auto;max-height:calc(100vh - 40px);width:640px}}.modal-close{background:none;height:40px;position:fixed;right:20px;top:20px;width:40px}.modal-card{display:flex;flex-direction:column;max-height:calc(100vh - 40px);overflow:hidden}.modal-card-foot,.modal-card-head{align-items:center;background-color:#f5f5f5;display:flex;flex-shrink:0;justify-content:flex-start;padding:20px;position:relative}.modal-card-head{border-bottom:1px solid #dbdbdb;border-top-left-radius:6px;border-top-right-radius:6px}.modal-card-title{color:#363636;flex-grow:1;flex-shrink:0;font-size:1.5rem;line-height:1}.modal-card-foot{border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:1px solid #dbdbdb}.modal-card-foot .button:not(:last-child){margin-right:10px}.modal-card-body{-webkit-overflow-scrolling:touch;background-color:#fff;flex-grow:1;flex-shrink:1;overflow:auto;padding:20px}.navbar{background-color:#fff;min-height:3.25rem;position:relative;z-index:30}.navbar.is-white{background-color:#fff;color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link,.navbar.is-white .navbar-brand>.navbar-item{color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link.is-active,.navbar.is-white .navbar-brand .navbar-link:hover,.navbar.is-white .navbar-brand>a.navbar-item.is-active,.navbar.is-white .navbar-brand>a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link:after{border-color:#0a0a0a}@media screen and (min-width:1088px){.navbar.is-white .navbar-end .navbar-link,.navbar.is-white .navbar-end>.navbar-item,.navbar.is-white .navbar-start .navbar-link,.navbar.is-white .navbar-start>.navbar-item{color:#0a0a0a}.navbar.is-white .navbar-end .navbar-link.is-active,.navbar.is-white .navbar-end .navbar-link:hover,.navbar.is-white .navbar-end>a.navbar-item.is-active,.navbar.is-white .navbar-end>a.navbar-item:hover,.navbar.is-white .navbar-start .navbar-link.is-active,.navbar.is-white .navbar-start .navbar-link:hover,.navbar.is-white .navbar-start>a.navbar-item.is-active,.navbar.is-white .navbar-start>a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-end .navbar-link:after,.navbar.is-white .navbar-start .navbar-link:after{border-color:#0a0a0a}.navbar.is-white .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-white .navbar-item.has-dropdown:hover .navbar-link{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-dropdown a.navbar-item.is-active{background-color:#fff;color:#0a0a0a}}.navbar.is-black{background-color:#0a0a0a;color:#fff}.navbar.is-black .navbar-brand .navbar-link,.navbar.is-black .navbar-brand>.navbar-item{color:#fff}.navbar.is-black .navbar-brand .navbar-link.is-active,.navbar.is-black .navbar-brand .navbar-link:hover,.navbar.is-black .navbar-brand>a.navbar-item.is-active,.navbar.is-black .navbar-brand>a.navbar-item:hover{background-color:#000;color:#fff}.navbar.is-black .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-black .navbar-end .navbar-link,.navbar.is-black .navbar-end>.navbar-item,.navbar.is-black .navbar-start .navbar-link,.navbar.is-black .navbar-start>.navbar-item{color:#fff}.navbar.is-black .navbar-end .navbar-link.is-active,.navbar.is-black .navbar-end .navbar-link:hover,.navbar.is-black .navbar-end>a.navbar-item.is-active,.navbar.is-black .navbar-end>a.navbar-item:hover,.navbar.is-black .navbar-start .navbar-link.is-active,.navbar.is-black .navbar-start .navbar-link:hover,.navbar.is-black .navbar-start>a.navbar-item.is-active,.navbar.is-black .navbar-start>a.navbar-item:hover{background-color:#000;color:#fff}.navbar.is-black .navbar-end .navbar-link:after,.navbar.is-black .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-black .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-black .navbar-item.has-dropdown:hover .navbar-link{background-color:#000;color:#fff}.navbar.is-black .navbar-dropdown a.navbar-item.is-active{background-color:#0a0a0a;color:#fff}}.navbar.is-light{background-color:#f5f5f5;color:#363636}.navbar.is-light .navbar-brand .navbar-link,.navbar.is-light .navbar-brand>.navbar-item{color:#363636}.navbar.is-light .navbar-brand .navbar-link.is-active,.navbar.is-light .navbar-brand .navbar-link:hover,.navbar.is-light .navbar-brand>a.navbar-item.is-active,.navbar.is-light .navbar-brand>a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-brand .navbar-link:after{border-color:#363636}@media screen and (min-width:1088px){.navbar.is-light .navbar-end .navbar-link,.navbar.is-light .navbar-end>.navbar-item,.navbar.is-light .navbar-start .navbar-link,.navbar.is-light .navbar-start>.navbar-item{color:#363636}.navbar.is-light .navbar-end .navbar-link.is-active,.navbar.is-light .navbar-end .navbar-link:hover,.navbar.is-light .navbar-end>a.navbar-item.is-active,.navbar.is-light .navbar-end>a.navbar-item:hover,.navbar.is-light .navbar-start .navbar-link.is-active,.navbar.is-light .navbar-start .navbar-link:hover,.navbar.is-light .navbar-start>a.navbar-item.is-active,.navbar.is-light .navbar-start>a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-end .navbar-link:after,.navbar.is-light .navbar-start .navbar-link:after{border-color:#363636}.navbar.is-light .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-light .navbar-item.has-dropdown:hover .navbar-link{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#363636}}.navbar.is-dark{background-color:#363636;color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link,.navbar.is-dark .navbar-brand>.navbar-item{color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link.is-active,.navbar.is-dark .navbar-brand .navbar-link:hover,.navbar.is-dark .navbar-brand>a.navbar-item.is-active,.navbar.is-dark .navbar-brand>a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link:after{border-color:#f5f5f5}@media screen and (min-width:1088px){.navbar.is-dark .navbar-end .navbar-link,.navbar.is-dark .navbar-end>.navbar-item,.navbar.is-dark .navbar-start .navbar-link,.navbar.is-dark .navbar-start>.navbar-item{color:#f5f5f5}.navbar.is-dark .navbar-end .navbar-link.is-active,.navbar.is-dark .navbar-end .navbar-link:hover,.navbar.is-dark .navbar-end>a.navbar-item.is-active,.navbar.is-dark .navbar-end>a.navbar-item:hover,.navbar.is-dark .navbar-start .navbar-link.is-active,.navbar.is-dark .navbar-start .navbar-link:hover,.navbar.is-dark .navbar-start>a.navbar-item.is-active,.navbar.is-dark .navbar-start>a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-end .navbar-link:after,.navbar.is-dark .navbar-start .navbar-link:after{border-color:#f5f5f5}.navbar.is-dark .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-dark .navbar-item.has-dropdown:hover .navbar-link{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-dropdown a.navbar-item.is-active{background-color:#363636;color:#f5f5f5}}.navbar.is-primary{background-color:#00d1b2;color:#fff}.navbar.is-primary .navbar-brand .navbar-link,.navbar.is-primary .navbar-brand>.navbar-item{color:#fff}.navbar.is-primary .navbar-brand .navbar-link.is-active,.navbar.is-primary .navbar-brand .navbar-link:hover,.navbar.is-primary .navbar-brand>a.navbar-item.is-active,.navbar.is-primary .navbar-brand>a.navbar-item:hover{background-color:#00b89c;color:#fff}.navbar.is-primary .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-primary .navbar-end .navbar-link,.navbar.is-primary .navbar-end>.navbar-item,.navbar.is-primary .navbar-start .navbar-link,.navbar.is-primary .navbar-start>.navbar-item{color:#fff}.navbar.is-primary .navbar-end .navbar-link.is-active,.navbar.is-primary .navbar-end .navbar-link:hover,.navbar.is-primary .navbar-end>a.navbar-item.is-active,.navbar.is-primary .navbar-end>a.navbar-item:hover,.navbar.is-primary .navbar-start .navbar-link.is-active,.navbar.is-primary .navbar-start .navbar-link:hover,.navbar.is-primary .navbar-start>a.navbar-item.is-active,.navbar.is-primary .navbar-start>a.navbar-item:hover{background-color:#00b89c;color:#fff}.navbar.is-primary .navbar-end .navbar-link:after,.navbar.is-primary .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-primary .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-primary .navbar-item.has-dropdown:hover .navbar-link{background-color:#00b89c;color:#fff}.navbar.is-primary .navbar-dropdown a.navbar-item.is-active{background-color:#00d1b2;color:#fff}}.navbar.is-link{background-color:#3273dc;color:#fff}.navbar.is-link .navbar-brand .navbar-link,.navbar.is-link .navbar-brand>.navbar-item{color:#fff}.navbar.is-link .navbar-brand .navbar-link.is-active,.navbar.is-link .navbar-brand .navbar-link:hover,.navbar.is-link .navbar-brand>a.navbar-item.is-active,.navbar.is-link .navbar-brand>a.navbar-item:hover{background-color:#2366d1;color:#fff}.navbar.is-link .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-link .navbar-end .navbar-link,.navbar.is-link .navbar-end>.navbar-item,.navbar.is-link .navbar-start .navbar-link,.navbar.is-link .navbar-start>.navbar-item{color:#fff}.navbar.is-link .navbar-end .navbar-link.is-active,.navbar.is-link .navbar-end .navbar-link:hover,.navbar.is-link .navbar-end>a.navbar-item.is-active,.navbar.is-link .navbar-end>a.navbar-item:hover,.navbar.is-link .navbar-start .navbar-link.is-active,.navbar.is-link .navbar-start .navbar-link:hover,.navbar.is-link .navbar-start>a.navbar-item.is-active,.navbar.is-link .navbar-start>a.navbar-item:hover{background-color:#2366d1;color:#fff}.navbar.is-link .navbar-end .navbar-link:after,.navbar.is-link .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-link .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-link .navbar-item.has-dropdown:hover .navbar-link{background-color:#2366d1;color:#fff}.navbar.is-link .navbar-dropdown a.navbar-item.is-active{background-color:#3273dc;color:#fff}}.navbar.is-info{background-color:#209cee;color:#fff}.navbar.is-info .navbar-brand .navbar-link,.navbar.is-info .navbar-brand>.navbar-item{color:#fff}.navbar.is-info .navbar-brand .navbar-link.is-active,.navbar.is-info .navbar-brand .navbar-link:hover,.navbar.is-info .navbar-brand>a.navbar-item.is-active,.navbar.is-info .navbar-brand>a.navbar-item:hover{background-color:#118fe4;color:#fff}.navbar.is-info .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-info .navbar-end .navbar-link,.navbar.is-info .navbar-end>.navbar-item,.navbar.is-info .navbar-start .navbar-link,.navbar.is-info .navbar-start>.navbar-item{color:#fff}.navbar.is-info .navbar-end .navbar-link.is-active,.navbar.is-info .navbar-end .navbar-link:hover,.navbar.is-info .navbar-end>a.navbar-item.is-active,.navbar.is-info .navbar-end>a.navbar-item:hover,.navbar.is-info .navbar-start .navbar-link.is-active,.navbar.is-info .navbar-start .navbar-link:hover,.navbar.is-info .navbar-start>a.navbar-item.is-active,.navbar.is-info .navbar-start>a.navbar-item:hover{background-color:#118fe4;color:#fff}.navbar.is-info .navbar-end .navbar-link:after,.navbar.is-info .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-info .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-info .navbar-item.has-dropdown:hover .navbar-link{background-color:#118fe4;color:#fff}.navbar.is-info .navbar-dropdown a.navbar-item.is-active{background-color:#209cee;color:#fff}}.navbar.is-success{background-color:#23d160;color:#fff}.navbar.is-success .navbar-brand .navbar-link,.navbar.is-success .navbar-brand>.navbar-item{color:#fff}.navbar.is-success .navbar-brand .navbar-link.is-active,.navbar.is-success .navbar-brand .navbar-link:hover,.navbar.is-success .navbar-brand>a.navbar-item.is-active,.navbar.is-success .navbar-brand>a.navbar-item:hover{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-success .navbar-end .navbar-link,.navbar.is-success .navbar-end>.navbar-item,.navbar.is-success .navbar-start .navbar-link,.navbar.is-success .navbar-start>.navbar-item{color:#fff}.navbar.is-success .navbar-end .navbar-link.is-active,.navbar.is-success .navbar-end .navbar-link:hover,.navbar.is-success .navbar-end>a.navbar-item.is-active,.navbar.is-success .navbar-end>a.navbar-item:hover,.navbar.is-success .navbar-start .navbar-link.is-active,.navbar.is-success .navbar-start .navbar-link:hover,.navbar.is-success .navbar-start>a.navbar-item.is-active,.navbar.is-success .navbar-start>a.navbar-item:hover{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-end .navbar-link:after,.navbar.is-success .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-success .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-success .navbar-item.has-dropdown:hover .navbar-link{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-dropdown a.navbar-item.is-active{background-color:#23d160;color:#fff}}.navbar.is-warning{background-color:#ffdd57}.navbar.is-warning,.navbar.is-warning .navbar-brand .navbar-link,.navbar.is-warning .navbar-brand>.navbar-item{color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-brand .navbar-link.is-active,.navbar.is-warning .navbar-brand .navbar-link:hover,.navbar.is-warning .navbar-brand>a.navbar-item.is-active,.navbar.is-warning .navbar-brand>a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-brand .navbar-link:after{border-color:rgba(0,0,0,.7)}@media screen and (min-width:1088px){.navbar.is-warning .navbar-end .navbar-link,.navbar.is-warning .navbar-end>.navbar-item,.navbar.is-warning .navbar-start .navbar-link,.navbar.is-warning .navbar-start>.navbar-item{color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-end .navbar-link.is-active,.navbar.is-warning .navbar-end .navbar-link:hover,.navbar.is-warning .navbar-end>a.navbar-item.is-active,.navbar.is-warning .navbar-end>a.navbar-item:hover,.navbar.is-warning .navbar-start .navbar-link.is-active,.navbar.is-warning .navbar-start .navbar-link:hover,.navbar.is-warning .navbar-start>a.navbar-item.is-active,.navbar.is-warning .navbar-start>a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-end .navbar-link:after,.navbar.is-warning .navbar-start .navbar-link:after{border-color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-warning .navbar-item.has-dropdown:hover .navbar-link{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-dropdown a.navbar-item.is-active{background-color:#ffdd57;color:rgba(0,0,0,.7)}}.navbar.is-danger{background-color:#ff3860;color:#fff}.navbar.is-danger .navbar-brand .navbar-link,.navbar.is-danger .navbar-brand>.navbar-item{color:#fff}.navbar.is-danger .navbar-brand .navbar-link.is-active,.navbar.is-danger .navbar-brand .navbar-link:hover,.navbar.is-danger .navbar-brand>a.navbar-item.is-active,.navbar.is-danger .navbar-brand>a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-danger .navbar-end .navbar-link,.navbar.is-danger .navbar-end>.navbar-item,.navbar.is-danger .navbar-start .navbar-link,.navbar.is-danger .navbar-start>.navbar-item{color:#fff}.navbar.is-danger .navbar-end .navbar-link.is-active,.navbar.is-danger .navbar-end .navbar-link:hover,.navbar.is-danger .navbar-end>a.navbar-item.is-active,.navbar.is-danger .navbar-end>a.navbar-item:hover,.navbar.is-danger .navbar-start .navbar-link.is-active,.navbar.is-danger .navbar-start .navbar-link:hover,.navbar.is-danger .navbar-start>a.navbar-item.is-active,.navbar.is-danger .navbar-start>a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-end .navbar-link:after,.navbar.is-danger .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-danger .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-danger .navbar-item.has-dropdown:hover .navbar-link{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-dropdown a.navbar-item.is-active{background-color:#ff3860;color:#fff}}.navbar>.container{align-items:stretch;display:flex;min-height:3.25rem;width:100%}.navbar.has-shadow{box-shadow:0 2px 0 0 #f5f5f5}.navbar.is-fixed-bottom,.navbar.is-fixed-top{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom{bottom:0}.navbar.is-fixed-bottom.has-shadow{box-shadow:0 -2px 0 0 #f5f5f5}.navbar.is-fixed-top{top:0}body.has-navbar-fixed-top,html.has-navbar-fixed-top{padding-top:3.25rem}body.has-navbar-fixed-bottom,html.has-navbar-fixed-bottom{padding-bottom:3.25rem}.navbar-brand,.navbar-tabs{align-items:stretch;display:flex;flex-shrink:0;min-height:3.25rem}.navbar-brand a.navbar-item:hover{background-color:transparent}.navbar-tabs{-webkit-overflow-scrolling:touch;max-width:100vw;overflow-x:auto;overflow-y:hidden}.navbar-burger{cursor:pointer;display:block;height:3.25rem;position:relative;width:3.25rem;margin-left:auto}.navbar-burger span{background-color:currentColor;display:block;height:1px;left:calc(50% - 8px);position:absolute;transform-origin:center;transition-duration:86ms;transition-property:background-color,opacity,transform;transition-timing-function:ease-out;width:16px}.navbar-burger span:first-child{top:calc(50% - 6px)}.navbar-burger span:nth-child(2){top:calc(50% - 1px)}.navbar-burger span:nth-child(3){top:calc(50% + 4px)}.navbar-burger:hover{background-color:rgba(0,0,0,.05)}.navbar-burger.is-active span:first-child{transform:translateY(5px) rotate(45deg)}.navbar-burger.is-active span:nth-child(2){opacity:0}.navbar-burger.is-active span:nth-child(3){transform:translateY(-5px) rotate(-45deg)}.navbar-menu{display:none}.navbar-item,.navbar-link{color:#4a4a4a;display:block;line-height:1.5;padding:.5rem .75rem;position:relative}.navbar-item .icon:only-child,.navbar-link .icon:only-child{margin-left:-.25rem;margin-right:-.25rem}.navbar-link,a.navbar-item{cursor:pointer}.navbar-link.is-active,.navbar-link:hover,a.navbar-item.is-active,a.navbar-item:hover{background-color:#fafafa;color:#3273dc}.navbar-item{display:block;flex-grow:0;flex-shrink:0}.navbar-item img{max-height:1.75rem}.navbar-item.has-dropdown{padding:0}.navbar-item.is-expanded{flex-grow:1;flex-shrink:1}.navbar-item.is-tab{border-bottom:1px solid transparent;min-height:3.25rem;padding-bottom:calc(.5rem - 1px)}.navbar-item.is-tab.is-active,.navbar-item.is-tab:hover{background-color:transparent;border-bottom-color:#3273dc}.navbar-item.is-tab.is-active{border-bottom-style:solid;border-bottom-width:3px;color:#3273dc;padding-bottom:calc(.5rem - 3px)}.navbar-content{flex-grow:1;flex-shrink:1}.navbar-link{padding-right:2.5em}.navbar-link:after{border-color:#3273dc;margin-top:-.375em;right:1.125em}.navbar-dropdown{font-size:.875rem;padding-bottom:.5rem;padding-top:.5rem}.navbar-dropdown .navbar-item{padding-left:1.5rem;padding-right:1.5rem}.navbar-divider{background-color:#f5f5f5;border:none;display:none;height:2px;margin:.5rem 0}@media screen and (max-width:1087px){.navbar>.container{display:block}.navbar-brand .navbar-item,.navbar-tabs .navbar-item{align-items:center;display:flex}.navbar-link:after{display:none}.navbar-menu{background-color:#fff;box-shadow:0 8px 16px hsla(0,0%,4%,.1);padding:.5rem 0}.navbar-menu.is-active{display:block}.navbar.is-fixed-bottom-touch,.navbar.is-fixed-top-touch{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-touch{bottom:0}.navbar.is-fixed-bottom-touch.has-shadow{box-shadow:0 -2px 3px hsla(0,0%,4%,.1)}.navbar.is-fixed-top-touch{top:0}.navbar.is-fixed-top-touch .navbar-menu,.navbar.is-fixed-top .navbar-menu{-webkit-overflow-scrolling:touch;max-height:calc(100vh - 3.25rem);overflow:auto}body.has-navbar-fixed-top-touch,html.has-navbar-fixed-top-touch{padding-top:3.25rem}body.has-navbar-fixed-bottom-touch,html.has-navbar-fixed-bottom-touch{padding-bottom:3.25rem}}@media screen and (min-width:1088px){.navbar,.navbar-end,.navbar-menu,.navbar-start{align-items:stretch;display:flex}.navbar{min-height:3.25rem}.navbar.is-spaced{padding:1rem 2rem}.navbar.is-spaced .navbar-end,.navbar.is-spaced .navbar-start{align-items:center}.navbar.is-spaced .navbar-link,.navbar.is-spaced a.navbar-item{border-radius:4px}.navbar.is-transparent .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-transparent .navbar-item.has-dropdown.is-hoverable:hover .navbar-link,.navbar.is-transparent .navbar-link.is-active,.navbar.is-transparent .navbar-link:hover,.navbar.is-transparent a.navbar-item.is-active,.navbar.is-transparent a.navbar-item:hover{background-color:transparent!important}.navbar.is-transparent .navbar-dropdown a.navbar-item:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar.is-transparent .navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#3273dc}.navbar-burger{display:none}.navbar-item,.navbar-link{align-items:center;display:flex}.navbar-item{display:flex}.navbar-item.has-dropdown{align-items:stretch}.navbar-item.has-dropdown-up .navbar-link:after{transform:rotate(135deg) translate(.25em,-.25em)}.navbar-item.has-dropdown-up .navbar-dropdown{border-bottom:2px solid #dbdbdb;border-radius:6px 6px 0 0;border-top:none;bottom:100%;box-shadow:0 -8px 8px hsla(0,0%,4%,.1);top:auto}.navbar-item.is-active .navbar-dropdown,.navbar-item.is-hoverable:hover .navbar-dropdown{display:block}.navbar-item.is-active .navbar-dropdown.is-boxed,.navbar-item.is-hoverable:hover .navbar-dropdown.is-boxed,.navbar.is-spaced .navbar-item.is-active .navbar-dropdown,.navbar.is-spaced .navbar-item.is-hoverable:hover .navbar-dropdown{opacity:1;pointer-events:auto;transform:translateY(0)}.navbar-menu{flex-grow:1;flex-shrink:0}.navbar-start{justify-content:flex-start;margin-right:auto}.navbar-end{justify-content:flex-end;margin-left:auto}.navbar-dropdown{background-color:#fff;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:2px solid #dbdbdb;box-shadow:0 8px 8px hsla(0,0%,4%,.1);display:none;font-size:.875rem;left:0;min-width:100%;position:absolute;top:100%;z-index:20}.navbar-dropdown .navbar-item{padding:.375rem 1rem;white-space:nowrap}.navbar-dropdown a.navbar-item{padding-right:3rem}.navbar-dropdown a.navbar-item:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#3273dc}.navbar-dropdown.is-boxed,.navbar.is-spaced .navbar-dropdown{border-radius:6px;border-top:none;box-shadow:0 8px 8px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);display:block;opacity:0;pointer-events:none;top:calc(100% + -4px);transform:translateY(-5px);transition-duration:86ms;transition-property:opacity,transform}.navbar-dropdown.is-right{left:auto;right:0}.navbar-divider{display:block}.container>.navbar .navbar-brand,.navbar>.container .navbar-brand{margin-left:-1rem}.container>.navbar .navbar-menu,.navbar>.container .navbar-menu{margin-right:-1rem}.navbar.is-fixed-bottom-desktop,.navbar.is-fixed-top-desktop{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-desktop{bottom:0}.navbar.is-fixed-bottom-desktop.has-shadow{box-shadow:0 -2px 3px hsla(0,0%,4%,.1)}.navbar.is-fixed-top-desktop{top:0}body.has-navbar-fixed-top-desktop,html.has-navbar-fixed-top-desktop{padding-top:3.25rem}body.has-navbar-fixed-bottom-desktop,html.has-navbar-fixed-bottom-desktop{padding-bottom:3.25rem}body.has-spaced-navbar-fixed-top,html.has-spaced-navbar-fixed-top{padding-top:5.25rem}body.has-spaced-navbar-fixed-bottom,html.has-spaced-navbar-fixed-bottom{padding-bottom:5.25rem}.navbar-link.is-active,a.navbar-item.is-active{color:#0a0a0a}.navbar-link.is-active:not(:hover),a.navbar-item.is-active:not(:hover){background-color:transparent}.navbar-item.has-dropdown.is-active .navbar-link,.navbar-item.has-dropdown:hover .navbar-link{background-color:#fafafa}}.pagination{font-size:1rem;margin:-.25rem}.pagination.is-small{font-size:.75rem}.pagination.is-medium{font-size:1.25rem}.pagination.is-large{font-size:1.5rem}.pagination.is-rounded .pagination-next,.pagination.is-rounded .pagination-previous{padding-left:1em;padding-right:1em;border-radius:290486px}.pagination.is-rounded .pagination-link{border-radius:290486px}.pagination,.pagination-list{align-items:center;display:flex;justify-content:center;text-align:center}.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous{font-size:1em;padding-left:.5em;padding-right:.5em;justify-content:center;margin:.25rem;text-align:center}.pagination-link,.pagination-next,.pagination-previous{border-color:#dbdbdb;color:#363636;min-width:2.25em}.pagination-link:hover,.pagination-next:hover,.pagination-previous:hover{border-color:#b5b5b5;color:#363636}.pagination-link:focus,.pagination-next:focus,.pagination-previous:focus{border-color:#3273dc}.pagination-link:active,.pagination-next:active,.pagination-previous:active{box-shadow:inset 0 1px 2px hsla(0,0%,4%,.2)}.pagination-link[disabled],.pagination-next[disabled],.pagination-previous[disabled]{background-color:#dbdbdb;border-color:#dbdbdb;box-shadow:none;color:#7a7a7a;opacity:.5}.pagination-next,.pagination-previous{padding-left:.75em;padding-right:.75em;white-space:nowrap}.pagination-link.is-current{background-color:#3273dc;border-color:#3273dc;color:#fff}.pagination-ellipsis{color:#b5b5b5;pointer-events:none}.pagination-list{flex-wrap:wrap}@media screen and (max-width:768px){.pagination{flex-wrap:wrap}.pagination-list li,.pagination-next,.pagination-previous{flex-grow:1;flex-shrink:1}}@media print,screen and (min-width:769px){.pagination-list{flex-grow:1;flex-shrink:1;justify-content:flex-start;order:1}.pagination-previous{order:2}.pagination-next{order:3}.pagination{justify-content:space-between}.pagination.is-centered .pagination-previous{order:1}.pagination.is-centered .pagination-list{justify-content:center;order:2}.pagination.is-centered .pagination-next{order:3}.pagination.is-right .pagination-previous{order:1}.pagination.is-right .pagination-next{order:2}.pagination.is-right .pagination-list{justify-content:flex-end;order:3}}.panel{font-size:1rem}.panel:not(:last-child){margin-bottom:1.5rem}.panel-block,.panel-heading,.panel-tabs{border-bottom:1px solid #dbdbdb;border-left:1px solid #dbdbdb;border-right:1px solid #dbdbdb}.panel-block:first-child,.panel-heading:first-child,.panel-tabs:first-child{border-top:1px solid #dbdbdb}.panel-heading{background-color:#f5f5f5;border-radius:4px 4px 0 0;color:#363636;font-size:1.25em;font-weight:300;line-height:1.25;padding:.5em .75em}.panel-tabs{align-items:flex-end;display:flex;font-size:.875em;justify-content:center}.panel-tabs a{border-bottom:1px solid #dbdbdb;margin-bottom:-1px;padding:.5em}.panel-tabs a.is-active{border-bottom-color:#4a4a4a;color:#363636}.panel-list a{color:#4a4a4a}.panel-list a:hover{color:#3273dc}.panel-block{align-items:center;color:#363636;display:flex;justify-content:flex-start;padding:.5em .75em}.panel-block input[type=checkbox]{margin-right:.75em}.panel-block>.control{flex-grow:1;flex-shrink:1;width:100%}.panel-block.is-wrapped{flex-wrap:wrap}.panel-block.is-active{border-left-color:#3273dc;color:#363636}.panel-block.is-active .panel-icon{color:#3273dc}a.panel-block,label.panel-block{cursor:pointer}a.panel-block:hover,label.panel-block:hover{background-color:#f5f5f5}.panel-icon{display:inline-block;font-size:14px;height:1em;line-height:1em;text-align:center;vertical-align:top;width:1em;color:#7a7a7a;margin-right:.75em}.panel-icon .fa{font-size:inherit;line-height:inherit}.tabs{-webkit-overflow-scrolling:touch;align-items:stretch;display:flex;font-size:1rem;justify-content:space-between;overflow:hidden;overflow-x:auto;white-space:nowrap}.tabs a{align-items:center;border-bottom-color:#dbdbdb;border-bottom-style:solid;border-bottom-width:1px;color:#4a4a4a;display:flex;justify-content:center;margin-bottom:-1px;padding:.5em 1em;vertical-align:top}.tabs a:hover{border-bottom-color:#363636;color:#363636}.tabs li{display:block}.tabs li.is-active a{border-bottom-color:#3273dc;color:#3273dc}.tabs ul{align-items:center;border-bottom-color:#dbdbdb;border-bottom-style:solid;border-bottom-width:1px;display:flex;flex-grow:1;flex-shrink:0;justify-content:flex-start}.tabs ul.is-center,.tabs ul.is-left{padding-right:.75em}.tabs ul.is-center{flex:none;justify-content:center;padding-left:.75em}.tabs ul.is-right{justify-content:flex-end;padding-left:.75em}.tabs .icon:first-child{margin-right:.5em}.tabs .icon:last-child{margin-left:.5em}.tabs.is-centered ul{justify-content:center}.tabs.is-right ul{justify-content:flex-end}.tabs.is-boxed a{border:1px solid transparent;border-radius:4px 4px 0 0}.tabs.is-boxed a:hover{background-color:#f5f5f5;border-bottom-color:#dbdbdb}.tabs.is-boxed li.is-active a{background-color:#fff;border-color:#dbdbdb;border-bottom-color:transparent!important}.tabs.is-fullwidth li{flex-grow:1;flex-shrink:0}.tabs.is-toggle a{border:1px solid #dbdbdb;margin-bottom:0;position:relative}.tabs.is-toggle a:hover{background-color:#f5f5f5;border-color:#b5b5b5;z-index:2}.tabs.is-toggle li+li{margin-left:-1px}.tabs.is-toggle li:first-child a{border-radius:4px 0 0 4px}.tabs.is-toggle li:last-child a{border-radius:0 4px 4px 0}.tabs.is-toggle li.is-active a{background-color:#3273dc;border-color:#3273dc;color:#fff;z-index:1}.tabs.is-toggle ul{border-bottom:none}.tabs.is-toggle.is-toggle-rounded li:first-child a{border-bottom-left-radius:290486px;border-top-left-radius:290486px;padding-left:1.25em}.tabs.is-toggle.is-toggle-rounded li:last-child a{border-bottom-right-radius:290486px;border-top-right-radius:290486px;padding-right:1.25em}.tabs.is-small{font-size:.75rem}.tabs.is-medium{font-size:1.25rem}.tabs.is-large{font-size:1.5rem}.column{display:block;flex-basis:0;flex-grow:1;flex-shrink:1;padding:.75rem}.columns.is-mobile>.column.is-narrow{flex:none}.columns.is-mobile>.column.is-full{flex:none;width:100%}.columns.is-mobile>.column.is-three-quarters{flex:none;width:75%}.columns.is-mobile>.column.is-two-thirds{flex:none;width:66.6666%}.columns.is-mobile>.column.is-half{flex:none;width:50%}.columns.is-mobile>.column.is-one-third{flex:none;width:33.3333%}.columns.is-mobile>.column.is-one-quarter{flex:none;width:25%}.columns.is-mobile>.column.is-one-fifth{flex:none;width:20%}.columns.is-mobile>.column.is-two-fifths{flex:none;width:40%}.columns.is-mobile>.column.is-three-fifths{flex:none;width:60%}.columns.is-mobile>.column.is-four-fifths{flex:none;width:80%}.columns.is-mobile>.column.is-offset-three-quarters{margin-left:75%}.columns.is-mobile>.column.is-offset-two-thirds{margin-left:66.6666%}.columns.is-mobile>.column.is-offset-half{margin-left:50%}.columns.is-mobile>.column.is-offset-one-third{margin-left:33.3333%}.columns.is-mobile>.column.is-offset-one-quarter{margin-left:25%}.columns.is-mobile>.column.is-offset-one-fifth{margin-left:20%}.columns.is-mobile>.column.is-offset-two-fifths{margin-left:40%}.columns.is-mobile>.column.is-offset-three-fifths{margin-left:60%}.columns.is-mobile>.column.is-offset-four-fifths{margin-left:80%}.columns.is-mobile>.column.is-1{flex:none;width:8.33333%}.columns.is-mobile>.column.is-offset-1{margin-left:8.33333%}.columns.is-mobile>.column.is-2{flex:none;width:16.66667%}.columns.is-mobile>.column.is-offset-2{margin-left:16.66667%}.columns.is-mobile>.column.is-3{flex:none;width:25%}.columns.is-mobile>.column.is-offset-3{margin-left:25%}.columns.is-mobile>.column.is-4{flex:none;width:33.33333%}.columns.is-mobile>.column.is-offset-4{margin-left:33.33333%}.columns.is-mobile>.column.is-5{flex:none;width:41.66667%}.columns.is-mobile>.column.is-offset-5{margin-left:41.66667%}.columns.is-mobile>.column.is-6{flex:none;width:50%}.columns.is-mobile>.column.is-offset-6{margin-left:50%}.columns.is-mobile>.column.is-7{flex:none;width:58.33333%}.columns.is-mobile>.column.is-offset-7{margin-left:58.33333%}.columns.is-mobile>.column.is-8{flex:none;width:66.66667%}.columns.is-mobile>.column.is-offset-8{margin-left:66.66667%}.columns.is-mobile>.column.is-9{flex:none;width:75%}.columns.is-mobile>.column.is-offset-9{margin-left:75%}.columns.is-mobile>.column.is-10{flex:none;width:83.33333%}.columns.is-mobile>.column.is-offset-10{margin-left:83.33333%}.columns.is-mobile>.column.is-11{flex:none;width:91.66667%}.columns.is-mobile>.column.is-offset-11{margin-left:91.66667%}.columns.is-mobile>.column.is-12{flex:none;width:100%}.columns.is-mobile>.column.is-offset-12{margin-left:100%}@media screen and (max-width:768px){.column.is-narrow-mobile{flex:none}.column.is-full-mobile{flex:none;width:100%}.column.is-three-quarters-mobile{flex:none;width:75%}.column.is-two-thirds-mobile{flex:none;width:66.6666%}.column.is-half-mobile{flex:none;width:50%}.column.is-one-third-mobile{flex:none;width:33.3333%}.column.is-one-quarter-mobile{flex:none;width:25%}.column.is-one-fifth-mobile{flex:none;width:20%}.column.is-two-fifths-mobile{flex:none;width:40%}.column.is-three-fifths-mobile{flex:none;width:60%}.column.is-four-fifths-mobile{flex:none;width:80%}.column.is-offset-three-quarters-mobile{margin-left:75%}.column.is-offset-two-thirds-mobile{margin-left:66.6666%}.column.is-offset-half-mobile{margin-left:50%}.column.is-offset-one-third-mobile{margin-left:33.3333%}.column.is-offset-one-quarter-mobile{margin-left:25%}.column.is-offset-one-fifth-mobile{margin-left:20%}.column.is-offset-two-fifths-mobile{margin-left:40%}.column.is-offset-three-fifths-mobile{margin-left:60%}.column.is-offset-four-fifths-mobile{margin-left:80%}.column.is-1-mobile{flex:none;width:8.33333%}.column.is-offset-1-mobile{margin-left:8.33333%}.column.is-2-mobile{flex:none;width:16.66667%}.column.is-offset-2-mobile{margin-left:16.66667%}.column.is-3-mobile{flex:none;width:25%}.column.is-offset-3-mobile{margin-left:25%}.column.is-4-mobile{flex:none;width:33.33333%}.column.is-offset-4-mobile{margin-left:33.33333%}.column.is-5-mobile{flex:none;width:41.66667%}.column.is-offset-5-mobile{margin-left:41.66667%}.column.is-6-mobile{flex:none;width:50%}.column.is-offset-6-mobile{margin-left:50%}.column.is-7-mobile{flex:none;width:58.33333%}.column.is-offset-7-mobile{margin-left:58.33333%}.column.is-8-mobile{flex:none;width:66.66667%}.column.is-offset-8-mobile{margin-left:66.66667%}.column.is-9-mobile{flex:none;width:75%}.column.is-offset-9-mobile{margin-left:75%}.column.is-10-mobile{flex:none;width:83.33333%}.column.is-offset-10-mobile{margin-left:83.33333%}.column.is-11-mobile{flex:none;width:91.66667%}.column.is-offset-11-mobile{margin-left:91.66667%}.column.is-12-mobile{flex:none;width:100%}.column.is-offset-12-mobile{margin-left:100%}}@media print,screen and (min-width:769px){.column.is-narrow,.column.is-narrow-tablet{flex:none}.column.is-full,.column.is-full-tablet{flex:none;width:100%}.column.is-three-quarters,.column.is-three-quarters-tablet{flex:none;width:75%}.column.is-two-thirds,.column.is-two-thirds-tablet{flex:none;width:66.6666%}.column.is-half,.column.is-half-tablet{flex:none;width:50%}.column.is-one-third,.column.is-one-third-tablet{flex:none;width:33.3333%}.column.is-one-quarter,.column.is-one-quarter-tablet{flex:none;width:25%}.column.is-one-fifth,.column.is-one-fifth-tablet{flex:none;width:20%}.column.is-two-fifths,.column.is-two-fifths-tablet{flex:none;width:40%}.column.is-three-fifths,.column.is-three-fifths-tablet{flex:none;width:60%}.column.is-four-fifths,.column.is-four-fifths-tablet{flex:none;width:80%}.column.is-offset-three-quarters,.column.is-offset-three-quarters-tablet{margin-left:75%}.column.is-offset-two-thirds,.column.is-offset-two-thirds-tablet{margin-left:66.6666%}.column.is-offset-half,.column.is-offset-half-tablet{margin-left:50%}.column.is-offset-one-third,.column.is-offset-one-third-tablet{margin-left:33.3333%}.column.is-offset-one-quarter,.column.is-offset-one-quarter-tablet{margin-left:25%}.column.is-offset-one-fifth,.column.is-offset-one-fifth-tablet{margin-left:20%}.column.is-offset-two-fifths,.column.is-offset-two-fifths-tablet{margin-left:40%}.column.is-offset-three-fifths,.column.is-offset-three-fifths-tablet{margin-left:60%}.column.is-offset-four-fifths,.column.is-offset-four-fifths-tablet{margin-left:80%}.column.is-1,.column.is-1-tablet{flex:none;width:8.33333%}.column.is-offset-1,.column.is-offset-1-tablet{margin-left:8.33333%}.column.is-2,.column.is-2-tablet{flex:none;width:16.66667%}.column.is-offset-2,.column.is-offset-2-tablet{margin-left:16.66667%}.column.is-3,.column.is-3-tablet{flex:none;width:25%}.column.is-offset-3,.column.is-offset-3-tablet{margin-left:25%}.column.is-4,.column.is-4-tablet{flex:none;width:33.33333%}.column.is-offset-4,.column.is-offset-4-tablet{margin-left:33.33333%}.column.is-5,.column.is-5-tablet{flex:none;width:41.66667%}.column.is-offset-5,.column.is-offset-5-tablet{margin-left:41.66667%}.column.is-6,.column.is-6-tablet{flex:none;width:50%}.column.is-offset-6,.column.is-offset-6-tablet{margin-left:50%}.column.is-7,.column.is-7-tablet{flex:none;width:58.33333%}.column.is-offset-7,.column.is-offset-7-tablet{margin-left:58.33333%}.column.is-8,.column.is-8-tablet{flex:none;width:66.66667%}.column.is-offset-8,.column.is-offset-8-tablet{margin-left:66.66667%}.column.is-9,.column.is-9-tablet{flex:none;width:75%}.column.is-offset-9,.column.is-offset-9-tablet{margin-left:75%}.column.is-10,.column.is-10-tablet{flex:none;width:83.33333%}.column.is-offset-10,.column.is-offset-10-tablet{margin-left:83.33333%}.column.is-11,.column.is-11-tablet{flex:none;width:91.66667%}.column.is-offset-11,.column.is-offset-11-tablet{margin-left:91.66667%}.column.is-12,.column.is-12-tablet{flex:none;width:100%}.column.is-offset-12,.column.is-offset-12-tablet{margin-left:100%}}@media screen and (max-width:1087px){.column.is-narrow-touch{flex:none}.column.is-full-touch{flex:none;width:100%}.column.is-three-quarters-touch{flex:none;width:75%}.column.is-two-thirds-touch{flex:none;width:66.6666%}.column.is-half-touch{flex:none;width:50%}.column.is-one-third-touch{flex:none;width:33.3333%}.column.is-one-quarter-touch{flex:none;width:25%}.column.is-one-fifth-touch{flex:none;width:20%}.column.is-two-fifths-touch{flex:none;width:40%}.column.is-three-fifths-touch{flex:none;width:60%}.column.is-four-fifths-touch{flex:none;width:80%}.column.is-offset-three-quarters-touch{margin-left:75%}.column.is-offset-two-thirds-touch{margin-left:66.6666%}.column.is-offset-half-touch{margin-left:50%}.column.is-offset-one-third-touch{margin-left:33.3333%}.column.is-offset-one-quarter-touch{margin-left:25%}.column.is-offset-one-fifth-touch{margin-left:20%}.column.is-offset-two-fifths-touch{margin-left:40%}.column.is-offset-three-fifths-touch{margin-left:60%}.column.is-offset-four-fifths-touch{margin-left:80%}.column.is-1-touch{flex:none;width:8.33333%}.column.is-offset-1-touch{margin-left:8.33333%}.column.is-2-touch{flex:none;width:16.66667%}.column.is-offset-2-touch{margin-left:16.66667%}.column.is-3-touch{flex:none;width:25%}.column.is-offset-3-touch{margin-left:25%}.column.is-4-touch{flex:none;width:33.33333%}.column.is-offset-4-touch{margin-left:33.33333%}.column.is-5-touch{flex:none;width:41.66667%}.column.is-offset-5-touch{margin-left:41.66667%}.column.is-6-touch{flex:none;width:50%}.column.is-offset-6-touch{margin-left:50%}.column.is-7-touch{flex:none;width:58.33333%}.column.is-offset-7-touch{margin-left:58.33333%}.column.is-8-touch{flex:none;width:66.66667%}.column.is-offset-8-touch{margin-left:66.66667%}.column.is-9-touch{flex:none;width:75%}.column.is-offset-9-touch{margin-left:75%}.column.is-10-touch{flex:none;width:83.33333%}.column.is-offset-10-touch{margin-left:83.33333%}.column.is-11-touch{flex:none;width:91.66667%}.column.is-offset-11-touch{margin-left:91.66667%}.column.is-12-touch{flex:none;width:100%}.column.is-offset-12-touch{margin-left:100%}}@media screen and (min-width:1088px){.column.is-narrow-desktop{flex:none}.column.is-full-desktop{flex:none;width:100%}.column.is-three-quarters-desktop{flex:none;width:75%}.column.is-two-thirds-desktop{flex:none;width:66.6666%}.column.is-half-desktop{flex:none;width:50%}.column.is-one-third-desktop{flex:none;width:33.3333%}.column.is-one-quarter-desktop{flex:none;width:25%}.column.is-one-fifth-desktop{flex:none;width:20%}.column.is-two-fifths-desktop{flex:none;width:40%}.column.is-three-fifths-desktop{flex:none;width:60%}.column.is-four-fifths-desktop{flex:none;width:80%}.column.is-offset-three-quarters-desktop{margin-left:75%}.column.is-offset-two-thirds-desktop{margin-left:66.6666%}.column.is-offset-half-desktop{margin-left:50%}.column.is-offset-one-third-desktop{margin-left:33.3333%}.column.is-offset-one-quarter-desktop{margin-left:25%}.column.is-offset-one-fifth-desktop{margin-left:20%}.column.is-offset-two-fifths-desktop{margin-left:40%}.column.is-offset-three-fifths-desktop{margin-left:60%}.column.is-offset-four-fifths-desktop{margin-left:80%}.column.is-1-desktop{flex:none;width:8.33333%}.column.is-offset-1-desktop{margin-left:8.33333%}.column.is-2-desktop{flex:none;width:16.66667%}.column.is-offset-2-desktop{margin-left:16.66667%}.column.is-3-desktop{flex:none;width:25%}.column.is-offset-3-desktop{margin-left:25%}.column.is-4-desktop{flex:none;width:33.33333%}.column.is-offset-4-desktop{margin-left:33.33333%}.column.is-5-desktop{flex:none;width:41.66667%}.column.is-offset-5-desktop{margin-left:41.66667%}.column.is-6-desktop{flex:none;width:50%}.column.is-offset-6-desktop{margin-left:50%}.column.is-7-desktop{flex:none;width:58.33333%}.column.is-offset-7-desktop{margin-left:58.33333%}.column.is-8-desktop{flex:none;width:66.66667%}.column.is-offset-8-desktop{margin-left:66.66667%}.column.is-9-desktop{flex:none;width:75%}.column.is-offset-9-desktop{margin-left:75%}.column.is-10-desktop{flex:none;width:83.33333%}.column.is-offset-10-desktop{margin-left:83.33333%}.column.is-11-desktop{flex:none;width:91.66667%}.column.is-offset-11-desktop{margin-left:91.66667%}.column.is-12-desktop{flex:none;width:100%}.column.is-offset-12-desktop{margin-left:100%}}@media screen and (min-width:1280px){.column.is-narrow-widescreen{flex:none}.column.is-full-widescreen{flex:none;width:100%}.column.is-three-quarters-widescreen{flex:none;width:75%}.column.is-two-thirds-widescreen{flex:none;width:66.6666%}.column.is-half-widescreen{flex:none;width:50%}.column.is-one-third-widescreen{flex:none;width:33.3333%}.column.is-one-quarter-widescreen{flex:none;width:25%}.column.is-one-fifth-widescreen{flex:none;width:20%}.column.is-two-fifths-widescreen{flex:none;width:40%}.column.is-three-fifths-widescreen{flex:none;width:60%}.column.is-four-fifths-widescreen{flex:none;width:80%}.column.is-offset-three-quarters-widescreen{margin-left:75%}.column.is-offset-two-thirds-widescreen{margin-left:66.6666%}.column.is-offset-half-widescreen{margin-left:50%}.column.is-offset-one-third-widescreen{margin-left:33.3333%}.column.is-offset-one-quarter-widescreen{margin-left:25%}.column.is-offset-one-fifth-widescreen{margin-left:20%}.column.is-offset-two-fifths-widescreen{margin-left:40%}.column.is-offset-three-fifths-widescreen{margin-left:60%}.column.is-offset-four-fifths-widescreen{margin-left:80%}.column.is-1-widescreen{flex:none;width:8.33333%}.column.is-offset-1-widescreen{margin-left:8.33333%}.column.is-2-widescreen{flex:none;width:16.66667%}.column.is-offset-2-widescreen{margin-left:16.66667%}.column.is-3-widescreen{flex:none;width:25%}.column.is-offset-3-widescreen{margin-left:25%}.column.is-4-widescreen{flex:none;width:33.33333%}.column.is-offset-4-widescreen{margin-left:33.33333%}.column.is-5-widescreen{flex:none;width:41.66667%}.column.is-offset-5-widescreen{margin-left:41.66667%}.column.is-6-widescreen{flex:none;width:50%}.column.is-offset-6-widescreen{margin-left:50%}.column.is-7-widescreen{flex:none;width:58.33333%}.column.is-offset-7-widescreen{margin-left:58.33333%}.column.is-8-widescreen{flex:none;width:66.66667%}.column.is-offset-8-widescreen{margin-left:66.66667%}.column.is-9-widescreen{flex:none;width:75%}.column.is-offset-9-widescreen{margin-left:75%}.column.is-10-widescreen{flex:none;width:83.33333%}.column.is-offset-10-widescreen{margin-left:83.33333%}.column.is-11-widescreen{flex:none;width:91.66667%}.column.is-offset-11-widescreen{margin-left:91.66667%}.column.is-12-widescreen{flex:none;width:100%}.column.is-offset-12-widescreen{margin-left:100%}}@media screen and (min-width:1472px){.column.is-narrow-fullhd{flex:none}.column.is-full-fullhd{flex:none;width:100%}.column.is-three-quarters-fullhd{flex:none;width:75%}.column.is-two-thirds-fullhd{flex:none;width:66.6666%}.column.is-half-fullhd{flex:none;width:50%}.column.is-one-third-fullhd{flex:none;width:33.3333%}.column.is-one-quarter-fullhd{flex:none;width:25%}.column.is-one-fifth-fullhd{flex:none;width:20%}.column.is-two-fifths-fullhd{flex:none;width:40%}.column.is-three-fifths-fullhd{flex:none;width:60%}.column.is-four-fifths-fullhd{flex:none;width:80%}.column.is-offset-three-quarters-fullhd{margin-left:75%}.column.is-offset-two-thirds-fullhd{margin-left:66.6666%}.column.is-offset-half-fullhd{margin-left:50%}.column.is-offset-one-third-fullhd{margin-left:33.3333%}.column.is-offset-one-quarter-fullhd{margin-left:25%}.column.is-offset-one-fifth-fullhd{margin-left:20%}.column.is-offset-two-fifths-fullhd{margin-left:40%}.column.is-offset-three-fifths-fullhd{margin-left:60%}.column.is-offset-four-fifths-fullhd{margin-left:80%}.column.is-1-fullhd{flex:none;width:8.33333%}.column.is-offset-1-fullhd{margin-left:8.33333%}.column.is-2-fullhd{flex:none;width:16.66667%}.column.is-offset-2-fullhd{margin-left:16.66667%}.column.is-3-fullhd{flex:none;width:25%}.column.is-offset-3-fullhd{margin-left:25%}.column.is-4-fullhd{flex:none;width:33.33333%}.column.is-offset-4-fullhd{margin-left:33.33333%}.column.is-5-fullhd{flex:none;width:41.66667%}.column.is-offset-5-fullhd{margin-left:41.66667%}.column.is-6-fullhd{flex:none;width:50%}.column.is-offset-6-fullhd{margin-left:50%}.column.is-7-fullhd{flex:none;width:58.33333%}.column.is-offset-7-fullhd{margin-left:58.33333%}.column.is-8-fullhd{flex:none;width:66.66667%}.column.is-offset-8-fullhd{margin-left:66.66667%}.column.is-9-fullhd{flex:none;width:75%}.column.is-offset-9-fullhd{margin-left:75%}.column.is-10-fullhd{flex:none;width:83.33333%}.column.is-offset-10-fullhd{margin-left:83.33333%}.column.is-11-fullhd{flex:none;width:91.66667%}.column.is-offset-11-fullhd{margin-left:91.66667%}.column.is-12-fullhd{flex:none;width:100%}.column.is-offset-12-fullhd{margin-left:100%}}.columns{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.columns:last-child{margin-bottom:-.75rem}.columns:not(:last-child){margin-bottom:0.75rem}.columns.is-centered{justify-content:center}.columns.is-gapless{margin-left:0;margin-right:0;margin-top:0}.columns.is-gapless>.column{margin:0;padding:0!important}.columns.is-gapless:not(:last-child){margin-bottom:1.5rem}.columns.is-gapless:last-child{margin-bottom:0}.columns.is-mobile{display:flex}.columns.is-multiline{flex-wrap:wrap}.columns.is-vcentered{align-items:center}@media print,screen and (min-width:769px){.columns:not(.is-desktop){display:flex}}@media screen and (min-width:1088px){.columns.is-desktop{display:flex}}.columns.is-variable{--columnGap:0.75rem;margin-left:calc(-1 * var(--columnGap));margin-right:calc(-1 * var(--columnGap))}.columns.is-variable .column{padding-left:var(--columnGap);padding-right:var(--columnGap)}.columns.is-variable.is-0{--columnGap:0rem}.columns.is-variable.is-1{--columnGap:0.25rem}.columns.is-variable.is-2{--columnGap:0.5rem}.columns.is-variable.is-3{--columnGap:0.75rem}.columns.is-variable.is-4{--columnGap:1rem}.columns.is-variable.is-5{--columnGap:1.25rem}.columns.is-variable.is-6{--columnGap:1.5rem}.columns.is-variable.is-7{--columnGap:1.75rem}.columns.is-variable.is-8{--columnGap:2rem}.tile{align-items:stretch;display:block;flex-basis:0;flex-grow:1;flex-shrink:1;min-height:min-content}.tile.is-ancestor{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.tile.is-ancestor:last-child{margin-bottom:-.75rem}.tile.is-ancestor:not(:last-child){margin-bottom:.75rem}.tile.is-child{margin:0!important}.tile.is-parent{padding:.75rem}.tile.is-vertical{flex-direction:column}.tile.is-vertical>.tile.is-child:not(:last-child){margin-bottom:1.5rem!important}@media print,screen and (min-width:769px){.tile:not(.is-child){display:flex}.tile.is-1{flex:none;width:8.33333%}.tile.is-2{flex:none;width:16.66667%}.tile.is-3{flex:none;width:25%}.tile.is-4{flex:none;width:33.33333%}.tile.is-5{flex:none;width:41.66667%}.tile.is-6{flex:none;width:50%}.tile.is-7{flex:none;width:58.33333%}.tile.is-8{flex:none;width:66.66667%}.tile.is-9{flex:none;width:75%}.tile.is-10{flex:none;width:83.33333%}.tile.is-11{flex:none;width:91.66667%}.tile.is-12{flex:none;width:100%}}.hero{align-items:stretch;display:flex;flex-direction:column;justify-content:space-between}.hero .navbar{background:none}.hero .tabs ul{border-bottom:none}.hero.is-white{background-color:#fff;color:#0a0a0a}.hero.is-white a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-white strong{color:inherit}.hero.is-white .title{color:#0a0a0a}.hero.is-white .subtitle{color:hsla(0,0%,4%,.9)}.hero.is-white .subtitle a:not(.button),.hero.is-white .subtitle strong{color:#0a0a0a}@media screen and (max-width:1087px){.hero.is-white .navbar-menu{background-color:#fff}}.hero.is-white .navbar-item,.hero.is-white .navbar-link{color:hsla(0,0%,4%,.7)}.hero.is-white .navbar-link.is-active,.hero.is-white .navbar-link:hover,.hero.is-white a.navbar-item.is-active,.hero.is-white a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.hero.is-white .tabs a{color:#0a0a0a;opacity:.9}.hero.is-white .tabs a:hover,.hero.is-white .tabs li.is-active a{opacity:1}.hero.is-white .tabs.is-boxed a,.hero.is-white .tabs.is-toggle a{color:#0a0a0a}.hero.is-white .tabs.is-boxed a:hover,.hero.is-white .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-white .tabs.is-boxed li.is-active a,.hero.is-white .tabs.is-boxed li.is-active a:hover,.hero.is-white .tabs.is-toggle li.is-active a,.hero.is-white .tabs.is-toggle li.is-active a:hover{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.hero.is-white.is-bold{background-image:linear-gradient(141deg,#e6e6e6,#fff 71%,#fff)}@media screen and (max-width:768px){.hero.is-white.is-bold .navbar-menu{background-image:linear-gradient(141deg,#e6e6e6,#fff 71%,#fff)}}.hero.is-black{background-color:#0a0a0a;color:#fff}.hero.is-black a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-black strong{color:inherit}.hero.is-black .title{color:#fff}.hero.is-black .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-black .subtitle a:not(.button),.hero.is-black .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-black .navbar-menu{background-color:#0a0a0a}}.hero.is-black .navbar-item,.hero.is-black .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-black .navbar-link.is-active,.hero.is-black .navbar-link:hover,.hero.is-black a.navbar-item.is-active,.hero.is-black a.navbar-item:hover{background-color:#000;color:#fff}.hero.is-black .tabs a{color:#fff;opacity:.9}.hero.is-black .tabs a:hover,.hero.is-black .tabs li.is-active a{opacity:1}.hero.is-black .tabs.is-boxed a,.hero.is-black .tabs.is-toggle a{color:#fff}.hero.is-black .tabs.is-boxed a:hover,.hero.is-black .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-black .tabs.is-boxed li.is-active a,.hero.is-black .tabs.is-boxed li.is-active a:hover,.hero.is-black .tabs.is-toggle li.is-active a,.hero.is-black .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#0a0a0a}.hero.is-black.is-bold{background-image:linear-gradient(141deg,#000,#0a0a0a 71%,#181616)}@media screen and (max-width:768px){.hero.is-black.is-bold .navbar-menu{background-image:linear-gradient(141deg,#000,#0a0a0a 71%,#181616)}}.hero.is-light{background-color:#f5f5f5;color:#363636}.hero.is-light a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-light strong{color:inherit}.hero.is-light .title{color:#363636}.hero.is-light .subtitle{color:rgba(54,54,54,.9)}.hero.is-light .subtitle a:not(.button),.hero.is-light .subtitle strong{color:#363636}@media screen and (max-width:1087px){.hero.is-light .navbar-menu{background-color:#f5f5f5}}.hero.is-light .navbar-item,.hero.is-light .navbar-link{color:rgba(54,54,54,.7)}.hero.is-light .navbar-link.is-active,.hero.is-light .navbar-link:hover,.hero.is-light a.navbar-item.is-active,.hero.is-light a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.hero.is-light .tabs a{color:#363636;opacity:.9}.hero.is-light .tabs a:hover,.hero.is-light .tabs li.is-active a{opacity:1}.hero.is-light .tabs.is-boxed a,.hero.is-light .tabs.is-toggle a{color:#363636}.hero.is-light .tabs.is-boxed a:hover,.hero.is-light .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-light .tabs.is-boxed li.is-active a,.hero.is-light .tabs.is-boxed li.is-active a:hover,.hero.is-light .tabs.is-toggle li.is-active a,.hero.is-light .tabs.is-toggle li.is-active a:hover{background-color:#363636;border-color:#363636;color:#f5f5f5}.hero.is-light.is-bold{background-image:linear-gradient(141deg,#dfd8d9,#f5f5f5 71%,#fff)}@media screen and (max-width:768px){.hero.is-light.is-bold .navbar-menu{background-image:linear-gradient(141deg,#dfd8d9,#f5f5f5 71%,#fff)}}.hero.is-dark{background-color:#363636;color:#f5f5f5}.hero.is-dark a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-dark strong{color:inherit}.hero.is-dark .title{color:#f5f5f5}.hero.is-dark .subtitle{color:hsla(0,0%,96%,.9)}.hero.is-dark .subtitle a:not(.button),.hero.is-dark .subtitle strong{color:#f5f5f5}@media screen and (max-width:1087px){.hero.is-dark .navbar-menu{background-color:#363636}}.hero.is-dark .navbar-item,.hero.is-dark .navbar-link{color:hsla(0,0%,96%,.7)}.hero.is-dark .navbar-link.is-active,.hero.is-dark .navbar-link:hover,.hero.is-dark a.navbar-item.is-active,.hero.is-dark a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.hero.is-dark .tabs a{color:#f5f5f5;opacity:.9}.hero.is-dark .tabs a:hover,.hero.is-dark .tabs li.is-active a{opacity:1}.hero.is-dark .tabs.is-boxed a,.hero.is-dark .tabs.is-toggle a{color:#f5f5f5}.hero.is-dark .tabs.is-boxed a:hover,.hero.is-dark .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-dark .tabs.is-boxed li.is-active a,.hero.is-dark .tabs.is-boxed li.is-active a:hover,.hero.is-dark .tabs.is-toggle li.is-active a,.hero.is-dark .tabs.is-toggle li.is-active a:hover{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.hero.is-dark.is-bold{background-image:linear-gradient(141deg,#1f191a,#363636 71%,#46403f)}@media screen and (max-width:768px){.hero.is-dark.is-bold .navbar-menu{background-image:linear-gradient(141deg,#1f191a,#363636 71%,#46403f)}}.hero.is-primary{background-color:#00d1b2;color:#fff}.hero.is-primary a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-primary strong{color:inherit}.hero.is-primary .title{color:#fff}.hero.is-primary .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-primary .subtitle a:not(.button),.hero.is-primary .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-primary .navbar-menu{background-color:#00d1b2}}.hero.is-primary .navbar-item,.hero.is-primary .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-primary .navbar-link.is-active,.hero.is-primary .navbar-link:hover,.hero.is-primary a.navbar-item.is-active,.hero.is-primary a.navbar-item:hover{background-color:#00b89c;color:#fff}.hero.is-primary .tabs a{color:#fff;opacity:.9}.hero.is-primary .tabs a:hover,.hero.is-primary .tabs li.is-active a{opacity:1}.hero.is-primary .tabs.is-boxed a,.hero.is-primary .tabs.is-toggle a{color:#fff}.hero.is-primary .tabs.is-boxed a:hover,.hero.is-primary .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-primary .tabs.is-boxed li.is-active a,.hero.is-primary .tabs.is-boxed li.is-active a:hover,.hero.is-primary .tabs.is-toggle li.is-active a,.hero.is-primary .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#00d1b2}.hero.is-primary.is-bold{background-image:linear-gradient(141deg,#009e6c,#00d1b2 71%,#00e7eb)}@media screen and (max-width:768px){.hero.is-primary.is-bold .navbar-menu{background-image:linear-gradient(141deg,#009e6c,#00d1b2 71%,#00e7eb)}}.hero.is-link{background-color:#3273dc;color:#fff}.hero.is-link a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-link strong{color:inherit}.hero.is-link .title{color:#fff}.hero.is-link .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-link .subtitle a:not(.button),.hero.is-link .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-link .navbar-menu{background-color:#3273dc}}.hero.is-link .navbar-item,.hero.is-link .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-link .navbar-link.is-active,.hero.is-link .navbar-link:hover,.hero.is-link a.navbar-item.is-active,.hero.is-link a.navbar-item:hover{background-color:#2366d1;color:#fff}.hero.is-link .tabs a{color:#fff;opacity:.9}.hero.is-link .tabs a:hover,.hero.is-link .tabs li.is-active a{opacity:1}.hero.is-link .tabs.is-boxed a,.hero.is-link .tabs.is-toggle a{color:#fff}.hero.is-link .tabs.is-boxed a:hover,.hero.is-link .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-link .tabs.is-boxed li.is-active a,.hero.is-link .tabs.is-boxed li.is-active a:hover,.hero.is-link .tabs.is-toggle li.is-active a,.hero.is-link .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#3273dc}.hero.is-link.is-bold{background-image:linear-gradient(141deg,#1577c6,#3273dc 71%,#4366e5)}@media screen and (max-width:768px){.hero.is-link.is-bold .navbar-menu{background-image:linear-gradient(141deg,#1577c6,#3273dc 71%,#4366e5)}}.hero.is-info{background-color:#209cee;color:#fff}.hero.is-info a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-info strong{color:inherit}.hero.is-info .title{color:#fff}.hero.is-info .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-info .subtitle a:not(.button),.hero.is-info .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-info .navbar-menu{background-color:#209cee}}.hero.is-info .navbar-item,.hero.is-info .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-info .navbar-link.is-active,.hero.is-info .navbar-link:hover,.hero.is-info a.navbar-item.is-active,.hero.is-info a.navbar-item:hover{background-color:#118fe4;color:#fff}.hero.is-info .tabs a{color:#fff;opacity:.9}.hero.is-info .tabs a:hover,.hero.is-info .tabs li.is-active a{opacity:1}.hero.is-info .tabs.is-boxed a,.hero.is-info .tabs.is-toggle a{color:#fff}.hero.is-info .tabs.is-boxed a:hover,.hero.is-info .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-info .tabs.is-boxed li.is-active a,.hero.is-info .tabs.is-boxed li.is-active a:hover,.hero.is-info .tabs.is-toggle li.is-active a,.hero.is-info .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#209cee}.hero.is-info.is-bold{background-image:linear-gradient(141deg,#04a6d7,#209cee 71%,#3287f5)}@media screen and (max-width:768px){.hero.is-info.is-bold .navbar-menu{background-image:linear-gradient(141deg,#04a6d7,#209cee 71%,#3287f5)}}.hero.is-success{background-color:#23d160;color:#fff}.hero.is-success a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-success strong{color:inherit}.hero.is-success .title{color:#fff}.hero.is-success .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-success .subtitle a:not(.button),.hero.is-success .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-success .navbar-menu{background-color:#23d160}}.hero.is-success .navbar-item,.hero.is-success .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-success .navbar-link.is-active,.hero.is-success .navbar-link:hover,.hero.is-success a.navbar-item.is-active,.hero.is-success a.navbar-item:hover{background-color:#20bc56;color:#fff}.hero.is-success .tabs a{color:#fff;opacity:.9}.hero.is-success .tabs a:hover,.hero.is-success .tabs li.is-active a{opacity:1}.hero.is-success .tabs.is-boxed a,.hero.is-success .tabs.is-toggle a{color:#fff}.hero.is-success .tabs.is-boxed a:hover,.hero.is-success .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-success .tabs.is-boxed li.is-active a,.hero.is-success .tabs.is-boxed li.is-active a:hover,.hero.is-success .tabs.is-toggle li.is-active a,.hero.is-success .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#23d160}.hero.is-success.is-bold{background-image:linear-gradient(141deg,#12af2f,#23d160 71%,#2ce28a)}@media screen and (max-width:768px){.hero.is-success.is-bold .navbar-menu{background-image:linear-gradient(141deg,#12af2f,#23d160 71%,#2ce28a)}}.hero.is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.hero.is-warning a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-warning strong{color:inherit}.hero.is-warning .title{color:rgba(0,0,0,.7)}.hero.is-warning .subtitle{color:rgba(0,0,0,.9)}.hero.is-warning .subtitle a:not(.button),.hero.is-warning .subtitle strong{color:rgba(0,0,0,.7)}@media screen and (max-width:1087px){.hero.is-warning .navbar-menu{background-color:#ffdd57}}.hero.is-warning .navbar-item,.hero.is-warning .navbar-link{color:rgba(0,0,0,.7)}.hero.is-warning .navbar-link.is-active,.hero.is-warning .navbar-link:hover,.hero.is-warning a.navbar-item.is-active,.hero.is-warning a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.hero.is-warning .tabs a{color:rgba(0,0,0,.7);opacity:.9}.hero.is-warning .tabs a:hover,.hero.is-warning .tabs li.is-active a{opacity:1}.hero.is-warning .tabs.is-boxed a,.hero.is-warning .tabs.is-toggle a{color:rgba(0,0,0,.7)}.hero.is-warning .tabs.is-boxed a:hover,.hero.is-warning .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-warning .tabs.is-boxed li.is-active a,.hero.is-warning .tabs.is-boxed li.is-active a:hover,.hero.is-warning .tabs.is-toggle li.is-active a,.hero.is-warning .tabs.is-toggle li.is-active a:hover{background-color:rgba(0,0,0,.7);border-color:rgba(0,0,0,.7);color:#ffdd57}.hero.is-warning.is-bold{background-image:linear-gradient(141deg,#ffaf24,#ffdd57 71%,#fffa70)}@media screen and (max-width:768px){.hero.is-warning.is-bold .navbar-menu{background-image:linear-gradient(141deg,#ffaf24,#ffdd57 71%,#fffa70)}}.hero.is-danger{background-color:#ff3860;color:#fff}.hero.is-danger a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-danger strong{color:inherit}.hero.is-danger .title{color:#fff}.hero.is-danger .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-danger .subtitle a:not(.button),.hero.is-danger .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-danger .navbar-menu{background-color:#ff3860}}.hero.is-danger .navbar-item,.hero.is-danger .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-danger .navbar-link.is-active,.hero.is-danger .navbar-link:hover,.hero.is-danger a.navbar-item.is-active,.hero.is-danger a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.hero.is-danger .tabs a{color:#fff;opacity:.9}.hero.is-danger .tabs a:hover,.hero.is-danger .tabs li.is-active a{opacity:1}.hero.is-danger .tabs.is-boxed a,.hero.is-danger .tabs.is-toggle a{color:#fff}.hero.is-danger .tabs.is-boxed a:hover,.hero.is-danger .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-danger .tabs.is-boxed li.is-active a,.hero.is-danger .tabs.is-boxed li.is-active a:hover,.hero.is-danger .tabs.is-toggle li.is-active a,.hero.is-danger .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#ff3860}.hero.is-danger.is-bold{background-image:linear-gradient(141deg,#ff0561,#ff3860 71%,#ff5257)}@media screen and (max-width:768px){.hero.is-danger.is-bold .navbar-menu{background-image:linear-gradient(141deg,#ff0561,#ff3860 71%,#ff5257)}}.hero.is-small .hero-body{padding-bottom:1.5rem;padding-top:1.5rem}@media print,screen and (min-width:769px){.hero.is-medium .hero-body{padding-bottom:9rem;padding-top:9rem}}@media print,screen and (min-width:769px){.hero.is-large .hero-body{padding-bottom:18rem;padding-top:18rem}}.hero.is-fullheight .hero-body,.hero.is-halfheight .hero-body{align-items:center;display:flex}.hero.is-fullheight .hero-body>.container,.hero.is-halfheight .hero-body>.container{flex-grow:1;flex-shrink:1}.hero.is-halfheight{min-height:50vh}.hero.is-fullheight{min-height:100vh}.hero-video{overflow:hidden}.hero-video video{left:50%;min-height:100%;min-width:100%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.hero-video.is-transparent{opacity:.3}@media screen and (max-width:768px){.hero-video{display:none}}.hero-buttons{margin-top:1.5rem}@media screen and (max-width:768px){.hero-buttons .button{display:flex}.hero-buttons .button:not(:last-child){margin-bottom:.75rem}}@media print,screen and (min-width:769px){.hero-buttons{display:flex;justify-content:center}.hero-buttons .button:not(:last-child){margin-right:1.5rem}}.hero-foot,.hero-head{flex-grow:0;flex-shrink:0}.hero-body{flex-grow:1;flex-shrink:0}.hero-body,.section{padding:3rem 1.5rem}@media screen and (min-width:1088px){.section.is-medium{padding:9rem 1.5rem}.section.is-large{padding:18rem 1.5rem}}.footer{background-color:#fafafa;padding:3rem 1.5rem 6rem}.is-noscroll{position:fixed;overflow-y:hidden;width:100%;bottom:0}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{animation-name:fadeOut}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;transform:translate3d(0,100%,0)}}.fadeOutDown{animation-name:fadeOutDown}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;transform:translate3d(0,-100%,0)}}.fadeOutUp{animation-name:fadeOutUp}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{animation-name:fadeIn}@keyframes fadeInDown{0%{opacity:0;transform:translate3d(0,-100%,0)}to{opacity:1;transform:none}}.fadeInDown{animation-name:fadeInDown}@keyframes fadeInUp{0%{opacity:0;transform:translate3d(0,100%,0)}to{opacity:1;transform:none}}.fadeInUp{animation-name:fadeInUp}.fade-enter-active,.fade-leave-active{transition:opacity .15s ease-out}.fade-enter,.fade-leave-to{opacity:0}.zoom-in-enter-active,.zoom-in-leave-active{transition:opacity .15s ease-out}.zoom-in-enter-active .animation-content,.zoom-in-leave-active .animation-content{transition:transform .15s ease-out}.zoom-in-enter,.zoom-in-leave-active{opacity:0}.zoom-in-enter .animation-content,.zoom-in-leave-active .animation-content{transform:scale(.95)}.zoom-out-enter-active,.zoom-out-leave-active{transition:opacity .15s ease-out}.zoom-out-enter-active .animation-content,.zoom-out-leave-active .animation-content{transition:transform .15s ease-out}.zoom-out-enter,.zoom-out-leave-active{opacity:0}.zoom-out-enter .animation-content,.zoom-out-leave-active .animation-content{transform:scale(1.05)}.slide-next-enter-active,.slide-next-leave-active,.slide-prev-enter-active,.slide-prev-leave-active{transition:transform .25s cubic-bezier(.785,.135,.15,.86)}.slide-next-enter,.slide-prev-leave-to{transform:translate3d(-100%,0,0);position:absolute;width:100%}.slide-next-leave-to,.slide-prev-enter{transform:translate3d(100%,0,0);position:absolute;width:100%}.autocomplete{position:relative}.autocomplete .dropdown-menu{display:block;min-width:100%;max-width:100%}.autocomplete .dropdown-menu.is-opened-top{top:auto;bottom:100%}.autocomplete .dropdown-content{overflow:auto;max-height:200px}.autocomplete .dropdown-item,.autocomplete .dropdown .dropdown-menu .has-link a,.dropdown .dropdown-menu .has-link .autocomplete a{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.autocomplete .dropdown-item.is-hovered,.autocomplete .dropdown .dropdown-menu .has-link a.is-hovered,.dropdown .dropdown-menu .has-link .autocomplete a.is-hovered{background:#f5f5f5;color:#0a0a0a}.autocomplete .dropdown-item.is-disabled,.autocomplete .dropdown .dropdown-menu .has-link a.is-disabled,.dropdown .dropdown-menu .has-link .autocomplete a.is-disabled{opacity:.5;cursor:not-allowed}.autocomplete.is-small{border-radius:2px;font-size:.75rem}.autocomplete.is-medium{font-size:1.25rem}.autocomplete.is-large{font-size:1.5rem}.b-checkbox.checkbox{outline:none;display:inline-flex;align-items:center}.b-checkbox.checkbox+.checkbox{margin-left:.5em}.b-checkbox.checkbox input[type=checkbox]{position:absolute;left:0;opacity:0;outline:none;z-index:-1}.b-checkbox.checkbox input[type=checkbox]+.check{width:1.25em;height:1.25em;flex-shrink:0;border-radius:4px;border:2px solid #7a7a7a;transition:background .15s ease-out}.b-checkbox.checkbox input[type=checkbox]:checked+.check{background:#00d1b2 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#00d1b2}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-white{background:#fff url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%230a0a0a'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#fff}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-black{background:#0a0a0a url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#0a0a0a}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-light{background:#f5f5f5 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23363636'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#f5f5f5}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-dark{background:#363636 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23f5f5f5'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#363636}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-primary{background:#00d1b2 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#00d1b2}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-link{background:#3273dc url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#3273dc}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-info{background:#209cee url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#209cee}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-success{background:#23d160 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#23d160}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-warning{background:#ffdd57 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='rgba(0,0,0,.7)'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#ffdd57}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-danger{background:#ff3860 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#ff3860}.b-checkbox.checkbox .control-label{padding-left:.5em}.b-checkbox.checkbox[disabled]{opacity:.5}.b-checkbox.checkbox:hover input[type=checkbox]+.check{border-color:#00d1b2}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-white{border-color:#fff}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-black{border-color:#0a0a0a}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-light{border-color:#f5f5f5}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-dark{border-color:#363636}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-primary{border-color:#00d1b2}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-link{border-color:#3273dc}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-info{border-color:#209cee}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-success{border-color:#23d160}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-warning{border-color:#ffdd57}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-danger{border-color:#ff3860}.b-checkbox.checkbox:focus input[type=checkbox]+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-primary{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-link{box-shadow:0 0 .5em rgba(50,115,220,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-info{box-shadow:0 0 .5em rgba(32,156,238,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.b-checkbox.checkbox.is-small{border-radius:2px;font-size:.75rem}.b-checkbox.checkbox.is-medium{font-size:1.25rem}.b-checkbox.checkbox.is-large{font-size:1.5rem}.collapse .collapse-trigger{display:inline;cursor:pointer}.collapse .collapse-content{display:inherit}.datepicker{font-size:.875rem}.datepicker .dropdown,.datepicker .dropdown-trigger{width:100%}.datepicker .dropdown-item,.datepicker .dropdown .dropdown-menu .has-link a,.dropdown .dropdown-menu .has-link .datepicker a{font-size:inherit}.datepicker .datepicker-header{padding-bottom:.875rem;margin-bottom:.875rem;border-bottom:1px solid #dbdbdb}.datepicker .datepicker-footer{padding-top:.875rem;border-top:1px solid #dbdbdb}.datepicker .datepicker-table{display:table;margin:0 auto .875rem}.datepicker .datepicker-table .datepicker-cell{text-align:center;vertical-align:middle;display:table-cell;border-radius:4px;padding:.5rem .75rem}.datepicker .datepicker-table .datepicker-header{display:table-header-group}.datepicker .datepicker-table .datepicker-header .datepicker-cell{color:#7a7a7a;font-weight:600}.datepicker .datepicker-table .datepicker-body{display:table-row-group}.datepicker .datepicker-table .datepicker-body .datepicker-row{display:table-row}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-unselectable{color:#b5b5b5}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-today{border:1px solid rgba(0,209,178,.5)}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable{color:#4a4a4a}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable:focus:not(.is-selected),.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable:hover:not(.is-selected){background-color:#f5f5f5;color:#0a0a0a;cursor:pointer}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selected{background-color:#00d1b2;color:#fff}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell{padding:.3rem .75rem .75rem}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event{position:relative}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events{bottom:.425rem;display:flex;justify-content:center;left:0;padding:0 .35rem;position:absolute;width:100%}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-white{background-color:#fff}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-black{background-color:#0a0a0a}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-light{background-color:#f5f5f5}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-dark{background-color:#363636}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-primary{background-color:#00d1b2}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-link{background-color:#3273dc}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-info{background-color:#209cee}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-success{background-color:#23d160}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-warning{background-color:#ffdd57}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-danger{background-color:#ff3860}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event.dots .event{border-radius:50%;height:.35em;margin:0 .1em;width:.35em}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event.bars .event{height:.25em;width:100%}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.is-selected{overflow:hidden}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.is-selected .events .event.is-primary{background-color:#1fffdd}.datepicker.is-small{border-radius:2px;font-size:.75rem}.datepicker.is-medium{font-size:1.25rem}.datepicker.is-large{font-size:1.5rem}@media screen and (min-width:769px) and (max-width:1087px){.datepicker .datepicker-table .datepicker-cell{padding:.75rem 1rem}}@media screen and (max-width:768px){.datepicker .datepicker-table .datepicker-cell{padding:.25rem .5rem}}.dialog .modal-card{max-width:460px;width:auto}.dialog .modal-card .modal-card-head{font-size:1.25rem;font-weight:600}.dialog .modal-card .modal-card-body .field{margin-top:16px}.dialog .modal-card .modal-card-body.is-titleless{border-top-left-radius:6px;border-top-right-radius:6px}.dialog .modal-card .modal-card-foot{justify-content:flex-end}.dialog .modal-card .modal-card-foot .button{display:inline;min-width:5em;font-weight:600}@media print,screen and (min-width:769px){.dialog .modal-card{min-width:320px}}.dialog.is-small .button,.dialog.is-small .input,.dialog.is-small .modal-card,.dialog.is-small .taginput .taginput-container.is-focusable,.taginput .dialog.is-small .taginput-container.is-focusable{border-radius:2px;font-size:.75rem}.dialog.is-medium .button,.dialog.is-medium .input,.dialog.is-medium .modal-card,.dialog.is-medium .taginput .taginput-container.is-focusable,.taginput .dialog.is-medium .taginput-container.is-focusable{font-size:1.25rem}.dialog.is-large .button,.dialog.is-large .input,.dialog.is-large .modal-card,.dialog.is-large .taginput .taginput-container.is-focusable,.taginput .dialog.is-large .taginput-container.is-focusable{font-size:1.5rem}.dropdown+.dropdown{margin-left:.5em}.dropdown .background{position:fixed;background-color:hsla(0,0%,4%,.86);z-index:10;cursor:pointer}@media screen and (min-width:1088px){.dropdown .background{display:none}}.dropdown .dropdown-menu .dropdown-item.is-disabled,.dropdown .dropdown-menu .has-link a.is-disabled{cursor:not-allowed}.dropdown .dropdown-menu .dropdown-item.is-disabled:hover,.dropdown .dropdown-menu .has-link a.is-disabled:hover{background:inherit;color:inherit}.dropdown .dropdown-menu .has-link a{padding-right:3rem;white-space:nowrap}.dropdown:not(.is-disabled) .dropdown-menu .dropdown-item.is-disabled,.dropdown:not(.is-disabled) .dropdown-menu .has-link a.is-disabled{opacity:.5}.dropdown .navbar-item{height:100%}.dropdown.is-disabled{opacity:.5;cursor:not-allowed}.dropdown.is-disabled .dropdown-trigger{pointer-events:none}.dropdown.is-inline .dropdown-menu{position:static;display:inline-block;padding:0}.dropdown.is-top-right .dropdown-menu{top:auto;bottom:100%}.dropdown.is-top-left .dropdown-menu{top:auto;bottom:100%;right:0;left:auto}.dropdown.is-bottom-left .dropdown-menu{right:0;left:auto}@media screen and (max-width:1087px){.dropdown.is-mobile-modal .dropdown-menu{position:fixed;width:calc(100vw - 40px);max-width:460px;max-height:calc(100vh - 120px);top:25%!important;left:50%!important;bottom:auto!important;right:auto!important;transform:translate3d(-50%,-25%,0);white-space:normal;overflow-y:auto}.dropdown.is-mobile-modal .dropdown-menu .dropdown-item,.dropdown.is-mobile-modal .dropdown-menu .has-link a{padding:1rem 1.5rem}}.label{font-weight:600}.field.is-grouped .field{flex-shrink:0}.field.is-grouped .field+.field{margin-left:.75rem}.field.is-grouped .field.is-expanded{flex-grow:1;flex-shrink:1}.field.has-addons .control:first-child .control .button,.field.has-addons .control:first-child .control .input,.field.has-addons .control:first-child .control .select select,.field.has-addons .control:first-child .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:first-child .control .taginput-container.is-focusable{border-bottom-left-radius:4px;border-top-left-radius:4px}.field.has-addons .control:last-child .control .button,.field.has-addons .control:last-child .control .input,.field.has-addons .control:last-child .control .select select,.field.has-addons .control:last-child .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:last-child .control .taginput-container.is-focusable{border-bottom-right-radius:4px;border-top-right-radius:4px}.field.has-addons .control .control .button,.field.has-addons .control .control .input,.field.has-addons .control .control .select select,.field.has-addons .control .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control .control .taginput-container.is-focusable{border-radius:0}.control .help.counter{float:right;margin-left:.5em}.control .icon.is-clickable{pointer-events:auto;cursor:pointer}.icon{cursor:inherit}.icon svg{background-color:transparent;fill:currentColor;stroke-width:0;stroke:currentColor;pointer-events:none;width:1.5rem;height:1.5rem}.loading-overlay{align-items:center;display:none;justify-content:center;overflow:hidden}.loading-overlay.is-active{display:flex}.loading-overlay.is-full-page{z-index:999;position:fixed}.loading-overlay.is-full-page .loading-icon:after{top:calc(50% - 2.5em);left:calc(50% - 2.5em);width:5em;height:5em}.loading-overlay .loading-background{background:#7f7f7f;background:hsla(0,0%,100%,.5)}.loading-overlay .loading-icon{position:relative}.loading-overlay .loading-icon:after{position:absolute;top:calc(50% - 1.5em);left:calc(50% - 1.5em);width:3em;height:3em;border-width:.25em}.message .media,.notification .media{padding-top:0;border:0}.notification>.delete{right:.5rem!important;top:.5rem!important}.modal .animation-content{margin:0 20px}.modal .animation-content .modal-card{margin:0}@media screen and (max-width:768px){.modal .animation-content{width:100%}}.notices{position:fixed;display:flex;top:0;bottom:0;left:0;right:0;padding:2em;overflow:hidden;z-index:1000;pointer-events:none}.notices .toast{display:inline-flex;animation-duration:.15s;margin:.5em 0;text-align:center;box-shadow:0 1px 4px rgba(0,0,0,.12),0 0 6px rgba(0,0,0,.04);border-radius:2em;padding:.75em 1.5em;pointer-events:auto;opacity:.92}.notices .toast.is-white{color:#0a0a0a;background:#fff}.notices .toast.is-black{color:#fff;background:#0a0a0a}.notices .toast.is-light{color:#363636;background:#f5f5f5}.notices .toast.is-dark{color:#f5f5f5;background:#363636}.notices .toast.is-primary{color:#fff;background:#00d1b2}.notices .toast.is-link{color:#fff;background:#3273dc}.notices .toast.is-info{color:#fff;background:#209cee}.notices .toast.is-success{color:#fff;background:#23d160}.notices .toast.is-warning{color:rgba(0,0,0,.7);background:#ffdd57}.notices .toast.is-danger{color:#fff;background:#ff3860}.notices .snackbar{display:inline-flex;align-items:center;justify-content:space-around;animation-duration:.15s;margin:.5em 0;box-shadow:0 1px 4px rgba(0,0,0,.12),0 0 6px rgba(0,0,0,.04);border-radius:4px;pointer-events:auto;background:#363636;color:#f5f5f5;min-height:3em}.notices .snackbar .text{padding:.5em 1em}.notices .snackbar .action{margin-left:auto;padding:.5em;padding-left:0}.notices .snackbar .action .button{font-weight:600;text-transform:uppercase}.notices .snackbar .action.is-white .button{color:#fff}.notices .snackbar .action.is-black .button{color:#0a0a0a}.notices .snackbar .action.is-light .button{color:#f5f5f5}.notices .snackbar .action.is-dark .button{color:#363636}.notices .snackbar .action.is-primary .button{color:#00d1b2}.notices .snackbar .action.is-link .button{color:#3273dc}.notices .snackbar .action.is-info .button{color:#209cee}.notices .snackbar .action.is-success .button{color:#23d160}.notices .snackbar .action.is-warning .button{color:#ffdd57}.notices .snackbar .action.is-danger .button{color:#ff3860}@media screen and (max-width:768px){.notices .snackbar{width:100%;margin:0;border-radius:0}}@media print,screen and (min-width:769px){.notices .snackbar{min-width:350px;max-width:600px;overflow:hidden}}.notices .snackbar.is-bottom,.notices .snackbar.is-top,.notices .toast.is-bottom,.notices .toast.is-top{align-self:center}.notices .snackbar.is-bottom-right,.notices .snackbar.is-top-right,.notices .toast.is-bottom-right,.notices .toast.is-top-right{align-self:flex-end}.notices .snackbar.is-bottom-left,.notices .snackbar.is-top-left,.notices .toast.is-bottom-left,.notices .toast.is-top-left{align-self:flex-start}.notices .snackbar.is-toast,.notices .toast.is-toast{opacity:.92}.notices.is-top{flex-direction:column}.notices.is-bottom{flex-direction:column-reverse}.notices.has-custom-container{position:absolute}@media screen and (max-width:768px){.notices{padding:0;position:fixed!important}}.pagination .pagination-next,.pagination .pagination-previous{padding-left:.25em;padding-right:.25em}.pagination .pagination-next.is-disabled,.pagination .pagination-previous.is-disabled{pointer-events:none;cursor:not-allowed;opacity:.5}.pagination.is-simple{justify-content:normal}.pagination .is-current{pointer-events:none;cursor:not-allowed}.panel .panel-heading.is-collapsible{cursor:pointer}.panel .panel-content{width:100%}.b-radio.radio{outline:none;display:inline-flex;align-items:center}.b-radio.radio+.radio{margin-left:.5em}.b-radio.radio input[type=radio]{position:absolute;left:0;opacity:0;outline:none;z-index:-1}.b-radio.radio input[type=radio]+.check{display:flex;align-items:center;justify-content:center;width:1.25em;height:1.25em;border:2px solid #7a7a7a;border-radius:50%;transition:background .15s ease-out}.b-radio.radio input[type=radio]+.check:before{content:\\\"\\\";border-radius:50%;width:.625em;height:.625em;background:#00d1b2;transform:scale(0);transition:transform .15s ease-out}.b-radio.radio input[type=radio]+.check.is-white:before{background:#fff}.b-radio.radio input[type=radio]+.check.is-black:before{background:#0a0a0a}.b-radio.radio input[type=radio]+.check.is-light:before{background:#f5f5f5}.b-radio.radio input[type=radio]+.check.is-dark:before{background:#363636}.b-radio.radio input[type=radio]+.check.is-primary:before{background:#00d1b2}.b-radio.radio input[type=radio]+.check.is-link:before{background:#3273dc}.b-radio.radio input[type=radio]+.check.is-info:before{background:#209cee}.b-radio.radio input[type=radio]+.check.is-success:before{background:#23d160}.b-radio.radio input[type=radio]+.check.is-warning:before{background:#ffdd57}.b-radio.radio input[type=radio]+.check.is-danger:before{background:#ff3860}.b-radio.radio input[type=radio]:checked+.check{border-color:#00d1b2}.b-radio.radio input[type=radio]:checked+.check.is-white{border-color:#fff}.b-radio.radio input[type=radio]:checked+.check.is-black{border-color:#0a0a0a}.b-radio.radio input[type=radio]:checked+.check.is-light{border-color:#f5f5f5}.b-radio.radio input[type=radio]:checked+.check.is-dark{border-color:#363636}.b-radio.radio input[type=radio]:checked+.check.is-primary{border-color:#00d1b2}.b-radio.radio input[type=radio]:checked+.check.is-link{border-color:#3273dc}.b-radio.radio input[type=radio]:checked+.check.is-info{border-color:#209cee}.b-radio.radio input[type=radio]:checked+.check.is-success{border-color:#23d160}.b-radio.radio input[type=radio]:checked+.check.is-warning{border-color:#ffdd57}.b-radio.radio input[type=radio]:checked+.check.is-danger{border-color:#ff3860}.b-radio.radio input[type=radio]:checked+.check:before{transform:scale(1)}.b-radio.radio .control-label{padding-left:.5em}.b-radio.radio[disabled]{opacity:.5}.b-radio.radio:hover input[type=radio]+.check{border-color:#00d1b2}.b-radio.radio:hover input[type=radio]+.check.is-white{border-color:#fff}.b-radio.radio:hover input[type=radio]+.check.is-black{border-color:#0a0a0a}.b-radio.radio:hover input[type=radio]+.check.is-light{border-color:#f5f5f5}.b-radio.radio:hover input[type=radio]+.check.is-dark{border-color:#363636}.b-radio.radio:hover input[type=radio]+.check.is-primary{border-color:#00d1b2}.b-radio.radio:hover input[type=radio]+.check.is-link{border-color:#3273dc}.b-radio.radio:hover input[type=radio]+.check.is-info{border-color:#209cee}.b-radio.radio:hover input[type=radio]+.check.is-success{border-color:#23d160}.b-radio.radio:hover input[type=radio]+.check.is-warning{border-color:#ffdd57}.b-radio.radio:hover input[type=radio]+.check.is-danger{border-color:#ff3860}.b-radio.radio:focus input[type=radio]+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-primary{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-link{box-shadow:0 0 .5em rgba(50,115,220,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-info{box-shadow:0 0 .5em rgba(32,156,238,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.b-radio.radio.is-small{border-radius:2px;font-size:.75rem}.b-radio.radio.is-medium{font-size:1.25rem}.b-radio.radio.is-large{font-size:1.5rem}.select select{padding-right:2.5em}.select select option{color:#4a4a4a;padding:.25em .5em}.select select option:disabled{cursor:not-allowed;opacity:.5}.select select optgroup{color:#b5b5b5;font-weight:400;font-style:normal;padding:.25em 0}.select.is-empty select{color:hsla(0,0%,48%,.7)}.switch{cursor:pointer;display:inline-flex;align-items:center}.switch+.switch{margin-left:.5em}.switch input[type=checkbox]{display:none}.switch input[type=checkbox]+.check{display:flex;align-items:center;flex-shrink:0;width:2.75em;height:1.575em;padding:.2em;background:#b5b5b5;border-radius:1em;transition:background .15s ease-out}.switch input[type=checkbox]+.check:before{content:\\\"\\\";border-radius:1em;width:1.175em;height:1.175em;background:#f5f5f5;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);transition:transform .15s ease-out,width .15s ease-out;will-change:transform}.switch input[type=checkbox]+.check.is-elastic:before{width:1.75em}.switch input[type=checkbox]:checked+.check{background:#00d1b2}.switch input[type=checkbox]:checked+.check.is-white{background:#fff}.switch input[type=checkbox]:checked+.check.is-black{background:#0a0a0a}.switch input[type=checkbox]:checked+.check.is-light{background:#f5f5f5}.switch input[type=checkbox]:checked+.check.is-dark{background:#363636}.switch input[type=checkbox]:checked+.check.is-primary{background:#00d1b2}.switch input[type=checkbox]:checked+.check.is-link{background:#3273dc}.switch input[type=checkbox]:checked+.check.is-info{background:#209cee}.switch input[type=checkbox]:checked+.check.is-success{background:#23d160}.switch input[type=checkbox]:checked+.check.is-warning{background:#ffdd57}.switch input[type=checkbox]:checked+.check.is-danger{background:#ff3860}.switch input[type=checkbox]:checked+.check:before{transform:translate3d(100%,0,0)}.switch input[type=checkbox]:checked+.check.is-elastic:before{transform:translate3d(36.36364%,0,0)}.switch .control-label{padding-left:.5em}.switch:hover input[type=checkbox]+.check{background:hsla(0,0%,71%,.9)}.switch:hover input[type=checkbox]:checked+.check{background:rgba(0,209,178,.9)}.switch:hover input[type=checkbox]:checked+.check.is-white{background:hsla(0,0%,100%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-black{background:hsla(0,0%,4%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-light{background:hsla(0,0%,96%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-dark{background:rgba(54,54,54,.9)}.switch:hover input[type=checkbox]:checked+.check.is-primary{background:rgba(0,209,178,.9)}.switch:hover input[type=checkbox]:checked+.check.is-link{background:rgba(50,115,220,.9)}.switch:hover input[type=checkbox]:checked+.check.is-info{background:rgba(32,156,238,.9)}.switch:hover input[type=checkbox]:checked+.check.is-success{background:rgba(35,209,96,.9)}.switch:hover input[type=checkbox]:checked+.check.is-warning{background:rgba(255,221,87,.9)}.switch:hover input[type=checkbox]:checked+.check.is-danger{background:rgba(255,56,96,.9)}.switch:focus{outline:none}.switch:focus input[type=checkbox]+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.6)}.switch:focus input[type=checkbox]:checked+.check{box-shadow:0 0 .5em rgba(0,209,178,.8)}.switch:focus input[type=checkbox]:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.switch:focus input[type=checkbox]:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.switch:focus input[type=checkbox]:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.switch:focus input[type=checkbox]:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.switch:focus input[type=checkbox]:checked+.check.is-primary{box-shadow:0 0 .5em rgba(0,209,178,.8)}.switch:focus input[type=checkbox]:checked+.check.is-link{box-shadow:0 0 .5em rgba(50,115,220,.8)}.switch:focus input[type=checkbox]:checked+.check.is-info{box-shadow:0 0 .5em rgba(32,156,238,.8)}.switch:focus input[type=checkbox]:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.switch:focus input[type=checkbox]:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.switch:focus input[type=checkbox]:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.switch.is-small{border-radius:2px;font-size:.75rem}.switch.is-medium{font-size:1.25rem}.switch.is-large{font-size:1.5rem}.switch[disabled]{opacity:.5;cursor:not-allowed;color:#7a7a7a}.table-wrapper .table{margin-bottom:0}.table-wrapper:not(:last-child){margin-bottom:1.5rem}@media screen and (max-width:1087px){.table-wrapper{overflow-x:auto}}.b-table{transition:opacity 86ms ease-out}@media print,screen and (min-width:769px){.b-table .table-mobile-sort{display:none}}.b-table .icon{transition:transform .15s ease-out,opacity 86ms ease-out}.b-table .icon.is-desc{transform:rotate(180deg)}.b-table .icon.is-expanded{transform:rotate(90deg)}.b-table .table{width:100%;border:1px solid transparent;border-radius:4px;border-collapse:separate}.b-table .table th{font-weight:600}.b-table .table th .th-wrap{display:flex;align-items:center}.b-table .table th .th-wrap .icon{margin-left:.5rem;margin-right:0;font-size:1rem}.b-table .table th .th-wrap.is-numeric{flex-direction:row-reverse;text-align:right}.b-table .table th .th-wrap.is-numeric .icon{margin-left:0;margin-right:.5rem}.b-table .table th .th-wrap.is-centered{justify-content:center;text-align:center}.b-table .table th.is-current-sort{border-color:#7a7a7a;font-weight:700}.b-table .table th.is-sortable:hover{border-color:#7a7a7a}.b-table .table th.is-sortable,.b-table .table th.is-sortable .th-wrap{cursor:pointer}.b-table .table tr.is-selected .checkbox input:checked+.check{background:#fff url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%2300d1b2'/%3E%3C/svg%3E\\\") no-repeat 50%}.b-table .table tr.is-selected .checkbox input+.check{border-color:#fff}.b-table .table tr.is-empty:hover{background-color:transparent}.b-table .table .chevron-cell{vertical-align:middle}.b-table .table .checkbox-cell{width:40px}.b-table .table .checkbox-cell .checkbox{vertical-align:middle}.b-table .table .checkbox-cell .checkbox .check{transition:none}.b-table .table tr.detail{box-shadow:inset 0 1px 3px #dbdbdb;background:#fafafa}.b-table .table tr.detail .detail-container{padding:1rem}.b-table .table:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.b-table .table.is-bordered th.is-current-sort,.b-table .table.is-bordered th.is-sortable:hover{border-color:#dbdbdb;background:#f5f5f5}@media screen and (max-width:768px){.b-table .table.has-mobile-cards thead{display:none}.b-table .table.has-mobile-cards tfoot th{border:0;display:inherit}.b-table .table.has-mobile-cards tr{box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);max-width:100%;position:relative;display:block}.b-table .table.has-mobile-cards tr td{border:0;display:inherit}.b-table .table.has-mobile-cards tr td:last-child{border-bottom:0}.b-table .table.has-mobile-cards tr:not(:last-child){margin-bottom:1rem}.b-table .table.has-mobile-cards tr:not([class*=is-]){background:inherit}.b-table .table.has-mobile-cards tr:not([class*=is-]):hover{background-color:inherit}.b-table .table.has-mobile-cards tr.detail{margin-top:-1rem}.b-table .table.has-mobile-cards tr:not(.detail):not(.is-empty):not(.table-footer) td{display:flex;width:auto;justify-content:space-between;text-align:right;border-bottom:1px solid #f5f5f5}.b-table .table.has-mobile-cards tr:not(.detail):not(.is-empty):not(.table-footer) td:before{content:attr(data-label);font-weight:600;padding-right:.5em;text-align:left}}.b-table .level{padding-bottom:1.5rem}.b-table.is-loading{position:relative;pointer-events:none;opacity:.5}.b-table.is-loading:after{position:absolute;top:4em;left:calc(50% - 2.5em);width:5em;height:5em;border-width:.25em}.b-tabs .tabs{margin-bottom:0;flex-shrink:0}.b-tabs .is-disabled{pointer-events:none;cursor:not-allowed;opacity:.5}.b-tabs .tab-content{position:relative;overflow:hidden;display:flex;flex-direction:column;padding:1rem}.b-tabs .tab-content .tab-item{flex-shrink:0;flex-basis:auto}.b-tabs:not(:last-child){margin-bottom:1.5rem}.b-tabs.is-fullwidth{width:100%}.tag .has-ellipsis{max-width:10em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.taginput .taginput-container.is-focusable{padding-bottom:0;padding-top:calc(.275em - 1px);align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start;height:auto;cursor:text}.taginput .taginput-container>.tag,.taginput .taginput-container>.tags{margin-bottom:calc(.275em - 1px);font-size:.9em;height:1.7em}.taginput .taginput-container>.tag .tag,.taginput .taginput-container>.tags .tag{margin-bottom:0;font-size:.9em;height:1.7em}.taginput .taginput-container>.tag:not(:last-child),.taginput .taginput-container>.tags:not(:last-child){margin-right:.275rem}.taginput .taginput-container .autocomplete{flex:1}.taginput .taginput-container .autocomplete input{height:1.7em;margin-bottom:calc(.275em - 1px);padding-top:0;padding-bottom:0;border:none;box-shadow:none;min-width:8em}.taginput .taginput-container .autocomplete input:focus{box-shadow:none!important}.taginput .taginput-container .autocomplete .icon{height:1.7em}.taginput .taginput-container .autocomplete>.control.is-loading:after{top:.375em}.timepicker .dropdown,.timepicker .dropdown-trigger{width:100%}.dropdown .dropdown-menu .has-link .timepicker a,.timepicker .dropdown-item,.timepicker .dropdown .dropdown-menu .has-link a{font-size:inherit}.timepicker .timepicker-footer{padding-top:.875rem}.timepicker .control .select{font-size:2.5rem}.timepicker .control .select select{font-weight:600;padding-right:calc(.625em - 1px)}.timepicker .control .select select option{font-size:1.5rem}.timepicker .control .select select option:disabled{color:hsla(0,0%,48%,.7)}.timepicker .control .select:after{display:none}.timepicker .control:first-child .select select{border-right:none}.timepicker .control:first-child .select:before{content:\\\":\\\";color:#b5b5b5;display:inline-block;position:absolute;z-index:6;font-size:3rem;right:-.325rem;top:.25rem}.timepicker .control:nth-child(2) .select select{border-left:none}.timepicker.is-small{border-radius:2px;font-size:.75rem}.timepicker.is-medium{font-size:1.25rem}.timepicker.is-large{font-size:1.5rem}.tooltip{position:relative;display:inline-flex}.tooltip.is-top:after,.tooltip.is-top:before{top:auto;right:auto;bottom:calc(100% + 5px + 2px);left:50%;transform:translateX(-50%)}.tooltip.is-top.is-white:before{border-top:5px solid #fff}.tooltip.is-top.is-black:before,.tooltip.is-top.is-white:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-black:before{border-top:5px solid #0a0a0a}.tooltip.is-top.is-light:before{border-top:5px solid #f5f5f5}.tooltip.is-top.is-dark:before,.tooltip.is-top.is-light:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-dark:before{border-top:5px solid #363636}.tooltip.is-top.is-primary:before{border-top:5px solid #00d1b2}.tooltip.is-top.is-link:before,.tooltip.is-top.is-primary:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-link:before{border-top:5px solid #3273dc}.tooltip.is-top.is-info:before{border-top:5px solid #209cee}.tooltip.is-top.is-info:before,.tooltip.is-top.is-success:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-success:before{border-top:5px solid #23d160}.tooltip.is-top.is-warning:before{border-top:5px solid #ffdd57}.tooltip.is-top.is-danger:before,.tooltip.is-top.is-warning:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-danger:before{border-top:5px solid #ff3860}.tooltip.is-top.is-multiline.is-small:after{width:180px}.tooltip.is-top.is-multiline.is-medium:after{width:240px}.tooltip.is-top.is-multiline.is-large:after{width:300px}.tooltip.is-right:after,.tooltip.is-right:before{top:50%;right:auto;bottom:auto;left:calc(100% + 5px + 2px);transform:translateY(-50%)}.tooltip.is-right.is-white:before{border-right:5px solid #fff}.tooltip.is-right.is-black:before,.tooltip.is-right.is-white:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-black:before{border-right:5px solid #0a0a0a}.tooltip.is-right.is-light:before{border-right:5px solid #f5f5f5}.tooltip.is-right.is-dark:before,.tooltip.is-right.is-light:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-dark:before{border-right:5px solid #363636}.tooltip.is-right.is-primary:before{border-right:5px solid #00d1b2}.tooltip.is-right.is-link:before,.tooltip.is-right.is-primary:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-link:before{border-right:5px solid #3273dc}.tooltip.is-right.is-info:before{border-right:5px solid #209cee}.tooltip.is-right.is-info:before,.tooltip.is-right.is-success:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-success:before{border-right:5px solid #23d160}.tooltip.is-right.is-warning:before{border-right:5px solid #ffdd57}.tooltip.is-right.is-danger:before,.tooltip.is-right.is-warning:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-danger:before{border-right:5px solid #ff3860}.tooltip.is-right.is-multiline.is-small:after{width:180px}.tooltip.is-right.is-multiline.is-medium:after{width:240px}.tooltip.is-right.is-multiline.is-large:after{width:300px}.tooltip.is-bottom:after,.tooltip.is-bottom:before{top:calc(100% + 5px + 2px);right:auto;bottom:auto;left:50%;transform:translateX(-50%)}.tooltip.is-bottom.is-white:before{border-bottom:5px solid #fff}.tooltip.is-bottom.is-black:before,.tooltip.is-bottom.is-white:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-black:before{border-bottom:5px solid #0a0a0a}.tooltip.is-bottom.is-light:before{border-bottom:5px solid #f5f5f5}.tooltip.is-bottom.is-dark:before,.tooltip.is-bottom.is-light:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-dark:before{border-bottom:5px solid #363636}.tooltip.is-bottom.is-primary:before{border-bottom:5px solid #00d1b2}.tooltip.is-bottom.is-link:before,.tooltip.is-bottom.is-primary:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-link:before{border-bottom:5px solid #3273dc}.tooltip.is-bottom.is-info:before{border-bottom:5px solid #209cee}.tooltip.is-bottom.is-info:before,.tooltip.is-bottom.is-success:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-success:before{border-bottom:5px solid #23d160}.tooltip.is-bottom.is-warning:before{border-bottom:5px solid #ffdd57}.tooltip.is-bottom.is-danger:before,.tooltip.is-bottom.is-warning:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-danger:before{border-bottom:5px solid #ff3860}.tooltip.is-bottom.is-multiline.is-small:after{width:180px}.tooltip.is-bottom.is-multiline.is-medium:after{width:240px}.tooltip.is-bottom.is-multiline.is-large:after{width:300px}.tooltip.is-left:after,.tooltip.is-left:before{top:50%;right:calc(100% + 5px + 2px);bottom:auto;left:auto;transform:translateY(-50%)}.tooltip.is-left.is-white:before{border-left:5px solid #fff}.tooltip.is-left.is-black:before,.tooltip.is-left.is-white:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-black:before{border-left:5px solid #0a0a0a}.tooltip.is-left.is-light:before{border-left:5px solid #f5f5f5}.tooltip.is-left.is-dark:before,.tooltip.is-left.is-light:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-dark:before{border-left:5px solid #363636}.tooltip.is-left.is-primary:before{border-left:5px solid #00d1b2}.tooltip.is-left.is-link:before,.tooltip.is-left.is-primary:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-link:before{border-left:5px solid #3273dc}.tooltip.is-left.is-info:before{border-left:5px solid #209cee}.tooltip.is-left.is-info:before,.tooltip.is-left.is-success:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-success:before{border-left:5px solid #23d160}.tooltip.is-left.is-warning:before{border-left:5px solid #ffdd57}.tooltip.is-left.is-danger:before,.tooltip.is-left.is-warning:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-danger:before{border-left:5px solid #ff3860}.tooltip.is-left.is-multiline.is-small:after{width:180px}.tooltip.is-left.is-multiline.is-medium:after{width:240px}.tooltip.is-left.is-multiline.is-large:after{width:300px}.tooltip:after,.tooltip:before{position:absolute;content:\\\"\\\";opacity:0;visibility:hidden;pointer-events:none}.tooltip:before{z-index:889}.tooltip:after{content:attr(data-label);width:auto;padding:.35rem .75rem;border-radius:6px;font-size:.85rem;font-weight:400;box-shadow:0 1px 2px 1px rgba(0,1,0,.2);z-index:888;white-space:nowrap}.tooltip:not([data-label=\\\"\\\"]):hover:after,.tooltip:not([data-label=\\\"\\\"]):hover:before{opacity:1;visibility:visible}.tooltip.is-white:after{background:#fff;color:#0a0a0a}.tooltip.is-black:after{background:#0a0a0a;color:#fff}.tooltip.is-light:after{background:#f5f5f5;color:#363636}.tooltip.is-dark:after{background:#363636;color:#f5f5f5}.tooltip.is-primary:after{background:#00d1b2;color:#fff}.tooltip.is-link:after{background:#3273dc;color:#fff}.tooltip.is-info:after{background:#209cee;color:#fff}.tooltip.is-success:after{background:#23d160;color:#fff}.tooltip.is-warning:after{background:#ffdd57;color:rgba(0,0,0,.7)}.tooltip.is-danger:after{background:#ff3860;color:#fff}.tooltip:not([data-label=\\\"\\\"]).is-always:after,.tooltip:not([data-label=\\\"\\\"]).is-always:before{opacity:1;visibility:visible}.tooltip.is-multiline:after{display:flex-block;text-align:center;white-space:normal}.tooltip.is-dashed{border-bottom:1px dashed #b5b5b5;cursor:default}.tooltip.is-square:after{border-radius:0}.tooltip.is-animated:after,.tooltip.is-animated:before{transition:opacity 86ms ease-out,visibility 86ms ease-out}.upload{position:relative}.upload input[type=file]{position:absolute;top:0;left:0;width:100%;opacity:0;outline:none;z-index:-1}.upload .upload-draggable{display:inline-block;cursor:pointer;padding:.25em;border:1px dashed #b5b5b5;border-radius:6px}.upload .upload-draggable.is-disabled{opacity:.5;cursor:not-allowed}.upload .upload-draggable.is-loading{position:relative;pointer-events:none;opacity:.5}.upload .upload-draggable.is-loading:after{top:0;left:calc(50% - 1.5em);width:3em;height:3em;border-width:.25em}.upload .upload-draggable.is-hovered.is-white,.upload .upload-draggable:hover.is-white{border-color:#fff;background:hsla(0,0%,100%,.05)}.upload .upload-draggable.is-hovered.is-black,.upload .upload-draggable:hover.is-black{border-color:#0a0a0a;background:hsla(0,0%,4%,.05)}.upload .upload-draggable.is-hovered.is-light,.upload .upload-draggable:hover.is-light{border-color:#f5f5f5;background:hsla(0,0%,96%,.05)}.upload .upload-draggable.is-hovered.is-dark,.upload .upload-draggable:hover.is-dark{border-color:#363636;background:rgba(54,54,54,.05)}.upload .upload-draggable.is-hovered.is-primary,.upload .upload-draggable:hover.is-primary{border-color:#00d1b2;background:rgba(0,209,178,.05)}.upload .upload-draggable.is-hovered.is-link,.upload .upload-draggable:hover.is-link{border-color:#3273dc;background:rgba(50,115,220,.05)}.upload .upload-draggable.is-hovered.is-info,.upload .upload-draggable:hover.is-info{border-color:#209cee;background:rgba(32,156,238,.05)}.upload .upload-draggable.is-hovered.is-success,.upload .upload-draggable:hover.is-success{border-color:#23d160;background:rgba(35,209,96,.05)}.upload .upload-draggable.is-hovered.is-warning,.upload .upload-draggable:hover.is-warning{border-color:#ffdd57;background:rgba(255,221,87,.05)}.upload .upload-draggable.is-hovered.is-danger,.upload .upload-draggable:hover.is-danger{border-color:#ff3860;background:rgba(255,56,96,.05)}\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nmodule.exports = function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(25);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"bf15a564\", content, true, {});\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \".material-design-icon{display:inline-flex;align-self:center;position:relative;height:1em;width:1em;>.material-design-icon__svg{height:1em;width:1em;fill:currentColor;position:absolute;bottom:-.125em}}\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__ = __webpack_require__(6);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3e910c9a_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__ = __webpack_require__(64);\nfunction injectStyle (ssrContext) {\n __webpack_require__(27)\n}\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3e910c9a_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(28);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"0abd6ea6\", content, true, {});\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_NavBar_vue__ = __webpack_require__(7);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_657ba0aa_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_NavBar_vue__ = __webpack_require__(32);\nfunction injectStyle (ssrContext) {\n __webpack_require__(30)\n}\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_NavBar_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_657ba0aa_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_NavBar_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(31);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"432a0e31\", content, true, {});\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:\"navbar has-shadow\"},[_vm._m(0),_vm._v(\" \"),_c('div',{staticClass:\"navbar-menu\"},[_c('div',{staticClass:\"navbar-start\"}),_vm._v(\" \"),_c('div',{staticClass:\"navbar-end\"},[_c('div',{staticClass:\"navbar-item\"},[_c('p',{staticClass:\"control\"},[(_vm.isConnected)?_c('button',{staticClass:\"button is-danger\",on:{\"click\":_vm.disconnect}},[_vm._v(\"Disconnect\")]):_c('button',{staticClass:\"button is-success\",on:{\"click\":_vm.connect}},[_vm._v(\"Connect\")])])])])])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"navbar-brand\"},[_c('a',{staticClass:\"navbar-item\",attrs:{\"href\":\"#\"}},[_vm._v(\"WebRender Debugger\")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\n\n/***/ }),\n/* 33 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_NavMenu_vue__ = __webpack_require__(8);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_e621d982_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_NavMenu_vue__ = __webpack_require__(36);\nfunction injectStyle (ssrContext) {\n __webpack_require__(34)\n}\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_NavMenu_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_e621d982_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_NavMenu_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(35);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"e4edc9ba\", content, true, {});\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('aside',{staticClass:\"menu\"},[_c('p',{staticClass:\"menu-label\"},[_vm._v(\"\\n Pages\\n \")]),_vm._v(\" \"),_c('ul',{staticClass:\"menu-list\"},[_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'options' },on:{\"click\":function($event){return _vm.setPage('options')}}},[_vm._v(\"Debug Options\")])]),_vm._v(\" \"),_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'passes' },on:{\"click\":function($event){return _vm.setPage('passes')}}},[_vm._v(\"Passes\")])]),_vm._v(\" \"),_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'render_tasks' },on:{\"click\":function($event){return _vm.setPage('render_tasks')}}},[_vm._v(\"Render Tasks\")])]),_vm._v(\" \"),_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'documents' },on:{\"click\":function($event){return _vm.setPage('documents')}}},[_vm._v(\"Documents\")])]),_vm._v(\" \"),_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'clip_scroll_tree' },on:{\"click\":function($event){return _vm.setPage('clip_scroll_tree')}}},[_vm._v(\"Clip-Scroll Tree\")])]),_vm._v(\" \"),_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'screenshot' },on:{\"click\":function($event){return _vm.setPage('screenshot')}}},[_vm._v(\"Screenshot\")])])])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\n\n/***/ }),\n/* 37 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_OptionsPage_vue__ = __webpack_require__(9);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_61a8a336_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_OptionsPage_vue__ = __webpack_require__(40);\nfunction injectStyle (ssrContext) {\n __webpack_require__(38)\n}\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_OptionsPage_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_61a8a336_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_OptionsPage_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(39);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"0e6ffcbb\", content, true, {});\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 40 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setProfiler($event.target.checked)}}}),_vm._v(\"\\n Profiler\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setTextureCacheDebugger($event.target.checked)}}}),_vm._v(\"\\n Texture cache debugger\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setRenderTargetDebugger($event.target.checked)}}}),_vm._v(\"\\n Render target debugger\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setAlphaRectsDebugger($event.target.checked)}}}),_vm._v(\"\\n Alpha primitive rects debugger\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setGpuTimeQueries($event.target.checked)}}}),_vm._v(\"\\n Enable GPU time queries\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setGpuSampleQueries($event.target.checked)}}}),_vm._v(\"\\n Enable GPU sample queries\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setOpaquePass(!$event.target.checked)}}}),_vm._v(\"\\n Disable opaque pass\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setAlphaPass(!$event.target.checked)}}}),_vm._v(\"\\n Disable alpha pass\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setClipMasks(!$event.target.checked)}}}),_vm._v(\"\\n Disable clip masks\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setTextPrims(!$event.target.checked)}}}),_vm._v(\"\\n Disable text primitives\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setGradientPrims(!$event.target.checked)}}}),_vm._v(\"\\n Disable gradient primitives\\n \")])])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\n\n/***/ }),\n/* 41 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_PassViewPage_vue__ = __webpack_require__(10);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_329e01f6_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_PassViewPage_vue__ = __webpack_require__(44);\nfunction injectStyle (ssrContext) {\n __webpack_require__(42)\n}\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_PassViewPage_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_329e01f6_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_PassViewPage_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(43);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"05673d18\", content, true, {});\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 44 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Passes \"),_c('a',{staticClass:\"button is-info\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.fetch}},[_vm._v(\"Refresh\")])]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_vm._l((_vm.passes),function(pass,pass_index){return _c('div',[_c('p',{staticClass:\"has-text-black-bis\"},[_vm._v(\"Pass \"+_vm._s(pass_index))]),_vm._v(\" \"),_vm._l((pass.targets),function(target,target_index){return _c('div',[_c('p',{staticClass:\"has-text-grey-dark\",staticStyle:{\"text-indent\":\"2em\"}},[_vm._v(\"Target \"+_vm._s(target_index)+\" (\"+_vm._s(target.kind)+\")\")]),_vm._v(\" \"),_vm._l((target.batches),function(batch,batch_index){return _c('div',[_c('p',{staticClass:\"has-text-grey\",staticStyle:{\"text-indent\":\"4em\"}},[_vm._v(\"Batch \"+_vm._s(batch_index)+\" (\"+_vm._s(batch.description)+\", \"+_vm._s(batch.kind)+\", \"+_vm._s(batch.count)+\" instances)\")])])})],2)}),_vm._v(\" \"),_c('hr')],2)})],2)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\n\n/***/ }),\n/* 45 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_RenderTaskViewPage_vue__ = __webpack_require__(11);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_49dfebc9_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_RenderTaskViewPage_vue__ = __webpack_require__(51);\nfunction injectStyle (ssrContext) {\n __webpack_require__(46)\n}\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_RenderTaskViewPage_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_49dfebc9_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_RenderTaskViewPage_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(47);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"0d80f44e\", content, true, {});\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(49);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"77142b62\", content, true, {});\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',[_c('div',{on:{\"click\":_vm.toggle}},[(_vm.isFolder)?_c('span',[_vm._v(\"[\"+_vm._s(_vm.open ? '-' : '+')+\"]\")]):_vm._e(),_vm._v(\"\\n \"+_vm._s(_vm.model.description)+\"\\n \")]),_vm._v(\" \"),(_vm.isFolder)?_c('ul',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.open),expression:\"open\"}],staticStyle:{\"padding-left\":\"1em\",\"line-height\":\"1.5em\"}},_vm._l((_vm.model.children),function(model){return _c('treeview',{attrs:{\"model\":model}})}),1):_vm._e()])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\n\n/***/ }),\n/* 51 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Render Tasks \"),_c('a',{staticClass:\"button is-info\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.fetch}},[_vm._v(\"Refresh\")])]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('div',[_c('ul',[_c('app-treeview',{attrs:{\"model\":_vm.render_tasks}})],1)])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\n\n/***/ }),\n/* 52 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_DocumentViewPage_vue__ = __webpack_require__(13);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_1b68865d_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_DocumentViewPage_vue__ = __webpack_require__(55);\nfunction injectStyle (ssrContext) {\n __webpack_require__(53)\n}\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_DocumentViewPage_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_1b68865d_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_DocumentViewPage_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(54);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"7b986bc8\", content, true, {});\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Documents \"),_c('a',{staticClass:\"button is-info\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.fetch}},[_vm._v(\"Refresh\")])]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('div',[_c('ul',[_c('app-treeview',{attrs:{\"model\":_vm.documents}})],1)])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\n\n/***/ }),\n/* 56 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ClipScrollTreeViewPage_vue__ = __webpack_require__(14);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_31f0a1d9_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ClipScrollTreeViewPage_vue__ = __webpack_require__(59);\nfunction injectStyle (ssrContext) {\n __webpack_require__(57)\n}\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ClipScrollTreeViewPage_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_31f0a1d9_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ClipScrollTreeViewPage_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(58);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"3d63fa5b\", content, true, {});\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 59 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Clip-Scroll Tree \"),_c('a',{staticClass:\"button is-info\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.fetch}},[_vm._v(\"Refresh\")])]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('div',[_c('ul',[_c('app-treeview',{attrs:{\"model\":_vm.clip_scroll_tree}})],1)])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\n\n/***/ }),\n/* 60 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ScreenshotPage_vue__ = __webpack_require__(15);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_29affa2a_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ScreenshotPage_vue__ = __webpack_require__(63);\nfunction injectStyle (ssrContext) {\n __webpack_require__(61)\n}\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ScreenshotPage_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_29affa2a_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ScreenshotPage_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(62);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(1)(\"3900c1de\", content, true, {});\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 63 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Screenshot \"),_c('a',{staticClass:\"button is-info\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.fetch}},[_vm._v(\"Refresh\")])]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('div',[_c('ul',[(_vm.screenshot.length > 0)?_c('img',{staticStyle:{\"transform\":\"scaleY(-1)\",\"width\":\"1024px\",\"height\":\"768px\"},attrs:{\"src\":'data:image/png;base64,' + _vm.screenshot}}):_vm._e()])])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\n\n/***/ }),\n/* 64 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('app-navbar'),_vm._v(\" \"),_c('div',{staticClass:\"section\"},[_c('div',{staticClass:\"container\"},[_c('div',{staticClass:\"columns\"},[_c('div',{staticClass:\"column is-3\"},[_c('app-navmenu')],1),_vm._v(\" \"),_c('div',{staticClass:\"column\"},[(_vm.page == 'options')?_c('app-options'):_vm._e(),_vm._v(\" \"),(_vm.page == 'passes')?_c('app-passview'):_vm._e(),_vm._v(\" \"),(_vm.page == 'render_tasks')?_c('app-rendertaskview'):_vm._e(),_vm._v(\" \"),(_vm.page == 'documents')?_c('app-documentview'):_vm._e(),_vm._v(\" \"),(_vm.page == 'clip_scroll_tree')?_c('app-clipscrolltreeview'):_vm._e(),_vm._v(\" \"),(_vm.page == 'screenshot')?_c('app-screenshotview'):_vm._e()],1)])])])],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\n\n/***/ }),\n/* 65 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vuex__ = __webpack_require__(66);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_0_vue__[\"default\"].use(__WEBPACK_IMPORTED_MODULE_1_vuex__[\"a\" /* default */]);\n\nvar Connection = function () {\n function Connection() {\n _classCallCheck(this, Connection);\n\n this.ws = null;\n }\n\n _createClass(Connection, [{\n key: 'connect',\n value: function connect(context) {\n var ws = new WebSocket(\"ws://127.0.0.1:3583\");\n\n ws.onopen = function () {\n context.commit('setConnected', true);\n };\n\n ws.onmessage = function (evt) {\n var json = JSON.parse(evt.data);\n if (json['kind'] == \"passes\") {\n context.commit('setPasses', json['passes']);\n } else if (json['kind'] == \"render_tasks\") {\n context.commit('setRenderTasks', json['root']);\n } else if (json['kind'] == \"documents\") {\n context.commit('setDocuments', json['root']);\n } else if (json['kind'] == \"clip_scroll_tree\") {\n context.commit('setClipScrollTree', json['root']);\n } else if (json['kind'] == \"screenshot\") {\n context.commit('setScreenshot', json['data']);\n } else {\n console.warn(\"unknown message kind: \" + json['kind']);\n }\n };\n\n ws.onclose = function () {\n context.commit('setConnected', false);\n };\n\n this.ws = ws;\n }\n }, {\n key: 'send',\n value: function send(msg) {\n if (this.ws !== null) {\n this.ws.send(msg);\n }\n }\n }, {\n key: 'disconnect',\n value: function disconnect() {\n if (this.ws !== null) {\n this.ws.close();\n this.ws = null;\n }\n }\n }]);\n\n return Connection;\n}();\n\nvar connection = new Connection();\n\nvar store = new __WEBPACK_IMPORTED_MODULE_1_vuex__[\"a\" /* default */].Store({\n strict: true,\n state: {\n connected: false,\n page: 'options',\n passes: [],\n render_tasks: [],\n documents: [],\n clip_scroll_tree: [],\n screenshot: []\n },\n mutations: {\n setConnected: function setConnected(state, connected) {\n state.connected = connected;\n },\n setPage: function setPage(state, name) {\n state.page = name;\n },\n setPasses: function setPasses(state, passes) {\n state.passes = passes;\n },\n setRenderTasks: function setRenderTasks(state, render_tasks) {\n state.render_tasks = render_tasks;\n },\n setDocuments: function setDocuments(state, documents) {\n state.documents = documents;\n },\n setClipScrollTree: function setClipScrollTree(state, clip_scroll_tree) {\n state.clip_scroll_tree = clip_scroll_tree;\n },\n setScreenshot: function setScreenshot(state, screenshot) {\n state.screenshot = screenshot;\n }\n },\n actions: {\n connect: function connect(context) {\n connection.connect(context);\n },\n disconnect: function disconnect(context) {\n connection.disconnect();\n },\n sendMessage: function sendMessage(context, msg) {\n connection.send(msg);\n }\n }\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (store);\n\n/***/ }),\n/* 66 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export Store */\n/* unused harmony export install */\n/* unused harmony export mapState */\n/* unused harmony export mapMutations */\n/* unused harmony export mapGetters */\n/* unused harmony export mapActions */\n/* unused harmony export createNamespacedHelpers */\n/**\n * vuex v3.1.0\n * (c) 2019 Evan You\n * @license MIT\n */\nfunction applyMixin (Vue) {\n var version = Number(Vue.version.split('.')[0]);\n\n if (version >= 2) {\n Vue.mixin({ beforeCreate: vuexInit });\n } else {\n // override init and inject vuex init procedure\n // for 1.x backwards compatibility.\n var _init = Vue.prototype._init;\n Vue.prototype._init = function (options) {\n if ( options === void 0 ) options = {};\n\n options.init = options.init\n ? [vuexInit].concat(options.init)\n : vuexInit;\n _init.call(this, options);\n };\n }\n\n /**\n * Vuex init hook, injected into each instances init hooks list.\n */\n\n function vuexInit () {\n var options = this.$options;\n // store injection\n if (options.store) {\n this.$store = typeof options.store === 'function'\n ? options.store()\n : options.store;\n } else if (options.parent && options.parent.$store) {\n this.$store = options.parent.$store;\n }\n }\n}\n\nvar devtoolHook =\n typeof window !== 'undefined' &&\n window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\nfunction devtoolPlugin (store) {\n if (!devtoolHook) { return }\n\n store._devtoolHook = devtoolHook;\n\n devtoolHook.emit('vuex:init', store);\n\n devtoolHook.on('vuex:travel-to-state', function (targetState) {\n store.replaceState(targetState);\n });\n\n store.subscribe(function (mutation, state) {\n devtoolHook.emit('vuex:mutation', mutation, state);\n });\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\n\n/**\n * forEach for object\n */\nfunction forEachValue (obj, fn) {\n Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });\n}\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isPromise (val) {\n return val && typeof val.then === 'function'\n}\n\nfunction assert (condition, msg) {\n if (!condition) { throw new Error((\"[vuex] \" + msg)) }\n}\n\n// Base data struct for store's module, package with some attribute and method\nvar Module = function Module (rawModule, runtime) {\n this.runtime = runtime;\n // Store some children item\n this._children = Object.create(null);\n // Store the origin module object which passed by programmer\n this._rawModule = rawModule;\n var rawState = rawModule.state;\n\n // Store the origin module's state\n this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};\n};\n\nvar prototypeAccessors = { namespaced: { configurable: true } };\n\nprototypeAccessors.namespaced.get = function () {\n return !!this._rawModule.namespaced\n};\n\nModule.prototype.addChild = function addChild (key, module) {\n this._children[key] = module;\n};\n\nModule.prototype.removeChild = function removeChild (key) {\n delete this._children[key];\n};\n\nModule.prototype.getChild = function getChild (key) {\n return this._children[key]\n};\n\nModule.prototype.update = function update (rawModule) {\n this._rawModule.namespaced = rawModule.namespaced;\n if (rawModule.actions) {\n this._rawModule.actions = rawModule.actions;\n }\n if (rawModule.mutations) {\n this._rawModule.mutations = rawModule.mutations;\n }\n if (rawModule.getters) {\n this._rawModule.getters = rawModule.getters;\n }\n};\n\nModule.prototype.forEachChild = function forEachChild (fn) {\n forEachValue(this._children, fn);\n};\n\nModule.prototype.forEachGetter = function forEachGetter (fn) {\n if (this._rawModule.getters) {\n forEachValue(this._rawModule.getters, fn);\n }\n};\n\nModule.prototype.forEachAction = function forEachAction (fn) {\n if (this._rawModule.actions) {\n forEachValue(this._rawModule.actions, fn);\n }\n};\n\nModule.prototype.forEachMutation = function forEachMutation (fn) {\n if (this._rawModule.mutations) {\n forEachValue(this._rawModule.mutations, fn);\n }\n};\n\nObject.defineProperties( Module.prototype, prototypeAccessors );\n\nvar ModuleCollection = function ModuleCollection (rawRootModule) {\n // register root module (Vuex.Store options)\n this.register([], rawRootModule, false);\n};\n\nModuleCollection.prototype.get = function get (path) {\n return path.reduce(function (module, key) {\n return module.getChild(key)\n }, this.root)\n};\n\nModuleCollection.prototype.getNamespace = function getNamespace (path) {\n var module = this.root;\n return path.reduce(function (namespace, key) {\n module = module.getChild(key);\n return namespace + (module.namespaced ? key + '/' : '')\n }, '')\n};\n\nModuleCollection.prototype.update = function update$1 (rawRootModule) {\n update([], this.root, rawRootModule);\n};\n\nModuleCollection.prototype.register = function register (path, rawModule, runtime) {\n var this$1 = this;\n if ( runtime === void 0 ) runtime = true;\n\n if (false) {\n assertRawModule(path, rawModule);\n }\n\n var newModule = new Module(rawModule, runtime);\n if (path.length === 0) {\n this.root = newModule;\n } else {\n var parent = this.get(path.slice(0, -1));\n parent.addChild(path[path.length - 1], newModule);\n }\n\n // register nested modules\n if (rawModule.modules) {\n forEachValue(rawModule.modules, function (rawChildModule, key) {\n this$1.register(path.concat(key), rawChildModule, runtime);\n });\n }\n};\n\nModuleCollection.prototype.unregister = function unregister (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n if (!parent.getChild(key).runtime) { return }\n\n parent.removeChild(key);\n};\n\nfunction update (path, targetModule, newModule) {\n if (false) {\n assertRawModule(path, newModule);\n }\n\n // update target module\n targetModule.update(newModule);\n\n // update nested modules\n if (newModule.modules) {\n for (var key in newModule.modules) {\n if (!targetModule.getChild(key)) {\n if (false) {\n console.warn(\n \"[vuex] trying to add a new module '\" + key + \"' on hot reloading, \" +\n 'manual reload is needed'\n );\n }\n return\n }\n update(\n path.concat(key),\n targetModule.getChild(key),\n newModule.modules[key]\n );\n }\n }\n}\n\nvar functionAssert = {\n assert: function (value) { return typeof value === 'function'; },\n expected: 'function'\n};\n\nvar objectAssert = {\n assert: function (value) { return typeof value === 'function' ||\n (typeof value === 'object' && typeof value.handler === 'function'); },\n expected: 'function or object with \"handler\" function'\n};\n\nvar assertTypes = {\n getters: functionAssert,\n mutations: functionAssert,\n actions: objectAssert\n};\n\nfunction assertRawModule (path, rawModule) {\n Object.keys(assertTypes).forEach(function (key) {\n if (!rawModule[key]) { return }\n\n var assertOptions = assertTypes[key];\n\n forEachValue(rawModule[key], function (value, type) {\n assert(\n assertOptions.assert(value),\n makeAssertionMessage(path, key, type, value, assertOptions.expected)\n );\n });\n });\n}\n\nfunction makeAssertionMessage (path, key, type, value, expected) {\n var buf = key + \" should be \" + expected + \" but \\\"\" + key + \".\" + type + \"\\\"\";\n if (path.length > 0) {\n buf += \" in module \\\"\" + (path.join('.')) + \"\\\"\";\n }\n buf += \" is \" + (JSON.stringify(value)) + \".\";\n return buf\n}\n\nvar Vue; // bind on install\n\nvar Store = function Store (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #731\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n if (false) {\n assert(Vue, \"must call Vue.use(Vuex) before creating a store instance.\");\n assert(typeof Promise !== 'undefined', \"vuex requires a Promise polyfill in this browser.\");\n assert(this instanceof Store, \"store must be called with the new operator.\");\n }\n\n var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];\n var strict = options.strict; if ( strict === void 0 ) strict = false;\n\n // store internal state\n this._committing = false;\n this._actions = Object.create(null);\n this._actionSubscribers = [];\n this._mutations = Object.create(null);\n this._wrappedGetters = Object.create(null);\n this._modules = new ModuleCollection(options);\n this._modulesNamespaceMap = Object.create(null);\n this._subscribers = [];\n this._watcherVM = new Vue();\n\n // bind commit and dispatch to self\n var store = this;\n var ref = this;\n var dispatch = ref.dispatch;\n var commit = ref.commit;\n this.dispatch = function boundDispatch (type, payload) {\n return dispatch.call(store, type, payload)\n };\n this.commit = function boundCommit (type, payload, options) {\n return commit.call(store, type, payload, options)\n };\n\n // strict mode\n this.strict = strict;\n\n var state = this._modules.root.state;\n\n // init root module.\n // this also recursively registers all sub-modules\n // and collects all module getters inside this._wrappedGetters\n installModule(this, state, [], this._modules.root);\n\n // initialize the store vm, which is responsible for the reactivity\n // (also registers _wrappedGetters as computed properties)\n resetStoreVM(this, state);\n\n // apply plugins\n plugins.forEach(function (plugin) { return plugin(this$1); });\n\n var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;\n if (useDevtools) {\n devtoolPlugin(this);\n }\n};\n\nvar prototypeAccessors$1 = { state: { configurable: true } };\n\nprototypeAccessors$1.state.get = function () {\n return this._vm._data.$$state\n};\n\nprototypeAccessors$1.state.set = function (v) {\n if (false) {\n assert(false, \"use store.replaceState() to explicit replace store state.\");\n }\n};\n\nStore.prototype.commit = function commit (_type, _payload, _options) {\n var this$1 = this;\n\n // check object-style commit\n var ref = unifyObjectStyle(_type, _payload, _options);\n var type = ref.type;\n var payload = ref.payload;\n var options = ref.options;\n\n var mutation = { type: type, payload: payload };\n var entry = this._mutations[type];\n if (!entry) {\n if (false) {\n console.error((\"[vuex] unknown mutation type: \" + type));\n }\n return\n }\n this._withCommit(function () {\n entry.forEach(function commitIterator (handler) {\n handler(payload);\n });\n });\n this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); });\n\n if (\n false\n ) {\n console.warn(\n \"[vuex] mutation type: \" + type + \". Silent option has been removed. \" +\n 'Use the filter functionality in the vue-devtools'\n );\n }\n};\n\nStore.prototype.dispatch = function dispatch (_type, _payload) {\n var this$1 = this;\n\n // check object-style dispatch\n var ref = unifyObjectStyle(_type, _payload);\n var type = ref.type;\n var payload = ref.payload;\n\n var action = { type: type, payload: payload };\n var entry = this._actions[type];\n if (!entry) {\n if (false) {\n console.error((\"[vuex] unknown action type: \" + type));\n }\n return\n }\n\n try {\n this._actionSubscribers\n .filter(function (sub) { return sub.before; })\n .forEach(function (sub) { return sub.before(action, this$1.state); });\n } catch (e) {\n if (false) {\n console.warn(\"[vuex] error in before action subscribers: \");\n console.error(e);\n }\n }\n\n var result = entry.length > 1\n ? Promise.all(entry.map(function (handler) { return handler(payload); }))\n : entry[0](payload);\n\n return result.then(function (res) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.after; })\n .forEach(function (sub) { return sub.after(action, this$1.state); });\n } catch (e) {\n if (false) {\n console.warn(\"[vuex] error in after action subscribers: \");\n console.error(e);\n }\n }\n return res\n })\n};\n\nStore.prototype.subscribe = function subscribe (fn) {\n return genericSubscribe(fn, this._subscribers)\n};\n\nStore.prototype.subscribeAction = function subscribeAction (fn) {\n var subs = typeof fn === 'function' ? { before: fn } : fn;\n return genericSubscribe(subs, this._actionSubscribers)\n};\n\nStore.prototype.watch = function watch (getter, cb, options) {\n var this$1 = this;\n\n if (false) {\n assert(typeof getter === 'function', \"store.watch only accepts a function.\");\n }\n return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)\n};\n\nStore.prototype.replaceState = function replaceState (state) {\n var this$1 = this;\n\n this._withCommit(function () {\n this$1._vm._data.$$state = state;\n });\n};\n\nStore.prototype.registerModule = function registerModule (path, rawModule, options) {\n if ( options === void 0 ) options = {};\n\n if (typeof path === 'string') { path = [path]; }\n\n if (false) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n assert(path.length > 0, 'cannot register the root module by using registerModule.');\n }\n\n this._modules.register(path, rawModule);\n installModule(this, this.state, path, this._modules.get(path), options.preserveState);\n // reset store to update getters...\n resetStoreVM(this, this.state);\n};\n\nStore.prototype.unregisterModule = function unregisterModule (path) {\n var this$1 = this;\n\n if (typeof path === 'string') { path = [path]; }\n\n if (false) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n this._modules.unregister(path);\n this._withCommit(function () {\n var parentState = getNestedState(this$1.state, path.slice(0, -1));\n Vue.delete(parentState, path[path.length - 1]);\n });\n resetStore(this);\n};\n\nStore.prototype.hotUpdate = function hotUpdate (newOptions) {\n this._modules.update(newOptions);\n resetStore(this, true);\n};\n\nStore.prototype._withCommit = function _withCommit (fn) {\n var committing = this._committing;\n this._committing = true;\n fn();\n this._committing = committing;\n};\n\nObject.defineProperties( Store.prototype, prototypeAccessors$1 );\n\nfunction genericSubscribe (fn, subs) {\n if (subs.indexOf(fn) < 0) {\n subs.push(fn);\n }\n return function () {\n var i = subs.indexOf(fn);\n if (i > -1) {\n subs.splice(i, 1);\n }\n }\n}\n\nfunction resetStore (store, hot) {\n store._actions = Object.create(null);\n store._mutations = Object.create(null);\n store._wrappedGetters = Object.create(null);\n store._modulesNamespaceMap = Object.create(null);\n var state = store.state;\n // init all modules\n installModule(store, state, [], store._modules.root, true);\n // reset vm\n resetStoreVM(store, state, hot);\n}\n\nfunction resetStoreVM (store, state, hot) {\n var oldVm = store._vm;\n\n // bind store public getters\n store.getters = {};\n var wrappedGetters = store._wrappedGetters;\n var computed = {};\n forEachValue(wrappedGetters, function (fn, key) {\n // use computed to leverage its lazy-caching mechanism\n computed[key] = function () { return fn(store); };\n Object.defineProperty(store.getters, key, {\n get: function () { return store._vm[key]; },\n enumerable: true // for local getters\n });\n });\n\n // use a Vue instance to store the state tree\n // suppress warnings just in case the user has added\n // some funky global mixins\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n store._vm = new Vue({\n data: {\n $$state: state\n },\n computed: computed\n });\n Vue.config.silent = silent;\n\n // enable strict mode for new vm\n if (store.strict) {\n enableStrictMode(store);\n }\n\n if (oldVm) {\n if (hot) {\n // dispatch changes in all subscribed watchers\n // to force getter re-evaluation for hot reloading.\n store._withCommit(function () {\n oldVm._data.$$state = null;\n });\n }\n Vue.nextTick(function () { return oldVm.$destroy(); });\n }\n}\n\nfunction installModule (store, rootState, path, module, hot) {\n var isRoot = !path.length;\n var namespace = store._modules.getNamespace(path);\n\n // register in namespace map\n if (module.namespaced) {\n store._modulesNamespaceMap[namespace] = module;\n }\n\n // set state\n if (!isRoot && !hot) {\n var parentState = getNestedState(rootState, path.slice(0, -1));\n var moduleName = path[path.length - 1];\n store._withCommit(function () {\n Vue.set(parentState, moduleName, module.state);\n });\n }\n\n var local = module.context = makeLocalContext(store, namespace, path);\n\n module.forEachMutation(function (mutation, key) {\n var namespacedType = namespace + key;\n registerMutation(store, namespacedType, mutation, local);\n });\n\n module.forEachAction(function (action, key) {\n var type = action.root ? key : namespace + key;\n var handler = action.handler || action;\n registerAction(store, type, handler, local);\n });\n\n module.forEachGetter(function (getter, key) {\n var namespacedType = namespace + key;\n registerGetter(store, namespacedType, getter, local);\n });\n\n module.forEachChild(function (child, key) {\n installModule(store, rootState, path.concat(key), child, hot);\n });\n}\n\n/**\n * make localized dispatch, commit, getters and state\n * if there is no namespace, just use root ones\n */\nfunction makeLocalContext (store, namespace, path) {\n var noNamespace = namespace === '';\n\n var local = {\n dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if (false) {\n console.error((\"[vuex] unknown local action type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n return store.dispatch(type, payload)\n },\n\n commit: noNamespace ? store.commit : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if (false) {\n console.error((\"[vuex] unknown local mutation type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n store.commit(type, payload, options);\n }\n };\n\n // getters and state object must be gotten lazily\n // because they will be changed by vm update\n Object.defineProperties(local, {\n getters: {\n get: noNamespace\n ? function () { return store.getters; }\n : function () { return makeLocalGetters(store, namespace); }\n },\n state: {\n get: function () { return getNestedState(store.state, path); }\n }\n });\n\n return local\n}\n\nfunction makeLocalGetters (store, namespace) {\n var gettersProxy = {};\n\n var splitPos = namespace.length;\n Object.keys(store.getters).forEach(function (type) {\n // skip if the target getter is not match this namespace\n if (type.slice(0, splitPos) !== namespace) { return }\n\n // extract local getter type\n var localType = type.slice(splitPos);\n\n // Add a port to the getters proxy.\n // Define as getter property because\n // we do not want to evaluate the getters in this time.\n Object.defineProperty(gettersProxy, localType, {\n get: function () { return store.getters[type]; },\n enumerable: true\n });\n });\n\n return gettersProxy\n}\n\nfunction registerMutation (store, type, handler, local) {\n var entry = store._mutations[type] || (store._mutations[type] = []);\n entry.push(function wrappedMutationHandler (payload) {\n handler.call(store, local.state, payload);\n });\n}\n\nfunction registerAction (store, type, handler, local) {\n var entry = store._actions[type] || (store._actions[type] = []);\n entry.push(function wrappedActionHandler (payload, cb) {\n var res = handler.call(store, {\n dispatch: local.dispatch,\n commit: local.commit,\n getters: local.getters,\n state: local.state,\n rootGetters: store.getters,\n rootState: store.state\n }, payload, cb);\n if (!isPromise(res)) {\n res = Promise.resolve(res);\n }\n if (store._devtoolHook) {\n return res.catch(function (err) {\n store._devtoolHook.emit('vuex:error', err);\n throw err\n })\n } else {\n return res\n }\n });\n}\n\nfunction registerGetter (store, type, rawGetter, local) {\n if (store._wrappedGetters[type]) {\n if (false) {\n console.error((\"[vuex] duplicate getter key: \" + type));\n }\n return\n }\n store._wrappedGetters[type] = function wrappedGetter (store) {\n return rawGetter(\n local.state, // local state\n local.getters, // local getters\n store.state, // root state\n store.getters // root getters\n )\n };\n}\n\nfunction enableStrictMode (store) {\n store._vm.$watch(function () { return this._data.$$state }, function () {\n if (false) {\n assert(store._committing, \"do not mutate vuex store state outside mutation handlers.\");\n }\n }, { deep: true, sync: true });\n}\n\nfunction getNestedState (state, path) {\n return path.length\n ? path.reduce(function (state, key) { return state[key]; }, state)\n : state\n}\n\nfunction unifyObjectStyle (type, payload, options) {\n if (isObject(type) && type.type) {\n options = payload;\n payload = type;\n type = type.type;\n }\n\n if (false) {\n assert(typeof type === 'string', (\"expects string as the type, but found \" + (typeof type) + \".\"));\n }\n\n return { type: type, payload: payload, options: options }\n}\n\nfunction install (_Vue) {\n if (Vue && _Vue === Vue) {\n if (false) {\n console.error(\n '[vuex] already installed. Vue.use(Vuex) should be called only once.'\n );\n }\n return\n }\n Vue = _Vue;\n applyMixin(Vue);\n}\n\n/**\n * Reduce the code which written in Vue.js for getting the state.\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.\n * @param {Object}\n */\nvar mapState = normalizeNamespace(function (namespace, states) {\n var res = {};\n normalizeMap(states).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedState () {\n var state = this.$store.state;\n var getters = this.$store.getters;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapState', namespace);\n if (!module) {\n return\n }\n state = module.context.state;\n getters = module.context.getters;\n }\n return typeof val === 'function'\n ? val.call(this, state, getters)\n : state[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for committing the mutation\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapMutations = normalizeNamespace(function (namespace, mutations) {\n var res = {};\n normalizeMap(mutations).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedMutation () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // Get the commit method from store\n var commit = this.$store.commit;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);\n if (!module) {\n return\n }\n commit = module.context.commit;\n }\n return typeof val === 'function'\n ? val.apply(this, [commit].concat(args))\n : commit.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for getting the getters\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} getters\n * @return {Object}\n */\nvar mapGetters = normalizeNamespace(function (namespace, getters) {\n var res = {};\n normalizeMap(getters).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n // The namespace has been mutated by normalizeNamespace\n val = namespace + val;\n res[key] = function mappedGetter () {\n if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {\n return\n }\n if (false) {\n console.error((\"[vuex] unknown getter: \" + val));\n return\n }\n return this.$store.getters[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for dispatch the action\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapActions = normalizeNamespace(function (namespace, actions) {\n var res = {};\n normalizeMap(actions).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedAction () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // get dispatch function from store\n var dispatch = this.$store.dispatch;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapActions', namespace);\n if (!module) {\n return\n }\n dispatch = module.context.dispatch;\n }\n return typeof val === 'function'\n ? val.apply(this, [dispatch].concat(args))\n : dispatch.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object\n * @param {String} namespace\n * @return {Object}\n */\nvar createNamespacedHelpers = function (namespace) { return ({\n mapState: mapState.bind(null, namespace),\n mapGetters: mapGetters.bind(null, namespace),\n mapMutations: mapMutations.bind(null, namespace),\n mapActions: mapActions.bind(null, namespace)\n}); };\n\n/**\n * Normalize the map\n * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]\n * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]\n * @param {Array|Object} map\n * @return {Object}\n */\nfunction normalizeMap (map) {\n return Array.isArray(map)\n ? map.map(function (key) { return ({ key: key, val: key }); })\n : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })\n}\n\n/**\n * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.\n * @param {Function} fn\n * @return {Function}\n */\nfunction normalizeNamespace (fn) {\n return function (namespace, map) {\n if (typeof namespace !== 'string') {\n map = namespace;\n namespace = '';\n } else if (namespace.charAt(namespace.length - 1) !== '/') {\n namespace += '/';\n }\n return fn(namespace, map)\n }\n}\n\n/**\n * Search a special module from store by namespace. if module not exist, print error message.\n * @param {Object} store\n * @param {String} helper\n * @param {String} namespace\n * @return {Object}\n */\nfunction getModuleByNamespace (store, helper, namespace) {\n var module = store._modulesNamespaceMap[namespace];\n if (false) {\n console.error((\"[vuex] module namespace not found in \" + helper + \"(): \" + namespace));\n }\n return module\n}\n\nvar index_esm = {\n Store: Store,\n install: install,\n version: '3.1.0',\n mapState: mapState,\n mapMutations: mapMutations,\n mapGetters: mapGetters,\n mapActions: mapActions,\n createNamespacedHelpers: createNamespacedHelpers\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (index_esm);\n\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// build.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 16);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap cd2236c5c64656562cc5","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader/lib/css-base.js\n// module id = 0\n// module chunks = 0","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\nvar listToStyles = require('./listToStyles')\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nmodule.exports = function (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader/lib/addStylesClient.js\n// module id = 1\n// module chunks = 0","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file.\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = injectStyles\n }\n\n if (hook) {\n var functional = options.functional\n var existing = functional\n ? options.render\n : options.beforeCreate\n\n if (!functional) {\n // inject component registration as beforeCreate hook\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n } else {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return existing(h, context)\n }\n }\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/component-normalizer.js\n// module id = 2\n// module chunks = 0","/*!\n * Vue.js v2.6.10\n * (c) 2014-2019 Evan You\n * Released under the MIT License.\n */\n/* */\n\nvar emptyObject = Object.freeze({});\n\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef (v) {\n return v === undefined || v === null\n}\n\nfunction isDef (v) {\n return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n return v === true\n}\n\nfunction isFalse (v) {\n return v === false\n}\n\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive (value) {\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n // $flow-disable-line\n typeof value === 'symbol' ||\n typeof value === 'boolean'\n )\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nvar _toString = Object.prototype.toString;\n\nfunction toRawType (value) {\n return _toString.call(value).slice(8, -1)\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject (obj) {\n return _toString.call(obj) === '[object Object]'\n}\n\nfunction isRegExp (v) {\n return _toString.call(v) === '[object RegExp]'\n}\n\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex (val) {\n var n = parseFloat(String(val));\n return n >= 0 && Math.floor(n) === n && isFinite(val)\n}\n\nfunction isPromise (val) {\n return (\n isDef(val) &&\n typeof val.then === 'function' &&\n typeof val.catch === 'function'\n )\n}\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString (val) {\n return val == null\n ? ''\n : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n ? JSON.stringify(val, null, 2)\n : String(val)\n}\n\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n var n = parseFloat(val);\n return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n str,\n expectsLowerCase\n) {\n var map = Object.create(null);\n var list = str.split(',');\n for (var i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase\n ? function (val) { return map[val.toLowerCase()]; }\n : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Check if an attribute is a reserved attribute.\n */\nvar isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n\n/**\n * Remove an item from an array.\n */\nfunction remove (arr, item) {\n if (arr.length) {\n var index = arr.indexOf(item);\n if (index > -1) {\n return arr.splice(index, 1)\n }\n }\n}\n\n/**\n * Check whether an object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n var cache = Object.create(null);\n return (function cachedFn (str) {\n var hit = cache[str];\n return hit || (cache[str] = fn(str))\n })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cached(function (str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n});\n\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n\n/* istanbul ignore next */\nfunction polyfillBind (fn, ctx) {\n function boundFn (a) {\n var l = arguments.length;\n return l\n ? l > 1\n ? fn.apply(ctx, arguments)\n : fn.call(ctx, a)\n : fn.call(ctx)\n }\n\n boundFn._length = fn.length;\n return boundFn\n}\n\nfunction nativeBind (fn, ctx) {\n return fn.bind(ctx)\n}\n\nvar bind = Function.prototype.bind\n ? nativeBind\n : polyfillBind;\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n for (var key in _from) {\n to[key] = _from[key];\n }\n return to\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n}\n\n/* eslint-disable no-unused-vars */\n\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop (a, b, c) {}\n\n/**\n * Always return false.\n */\nvar no = function (a, b, c) { return false; };\n\n/* eslint-enable no-unused-vars */\n\n/**\n * Return the same value.\n */\nvar identity = function (_) { return _; };\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf (arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) { return i }\n }\n return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n }\n}\n\nvar SSR_ATTR = 'data-server-rendered';\n\nvar ASSET_TYPES = [\n 'component',\n 'directive',\n 'filter'\n];\n\nvar LIFECYCLE_HOOKS = [\n 'beforeCreate',\n 'created',\n 'beforeMount',\n 'mounted',\n 'beforeUpdate',\n 'updated',\n 'beforeDestroy',\n 'destroyed',\n 'activated',\n 'deactivated',\n 'errorCaptured',\n 'serverPrefetch'\n];\n\n/* */\n\n\n\nvar config = ({\n /**\n * Option merge strategies (used in core/util/options)\n */\n // $flow-disable-line\n optionMergeStrategies: Object.create(null),\n\n /**\n * Whether to suppress warnings.\n */\n silent: false,\n\n /**\n * Show production mode tip message on boot?\n */\n productionTip: process.env.NODE_ENV !== 'production',\n\n /**\n * Whether to enable devtools\n */\n devtools: process.env.NODE_ENV !== 'production',\n\n /**\n * Whether to record perf\n */\n performance: false,\n\n /**\n * Error handler for watcher errors\n */\n errorHandler: null,\n\n /**\n * Warn handler for watcher warns\n */\n warnHandler: null,\n\n /**\n * Ignore certain custom elements\n */\n ignoredElements: [],\n\n /**\n * Custom user key aliases for v-on\n */\n // $flow-disable-line\n keyCodes: Object.create(null),\n\n /**\n * Check if a tag is reserved so that it cannot be registered as a\n * component. This is platform-dependent and may be overwritten.\n */\n isReservedTag: no,\n\n /**\n * Check if an attribute is reserved so that it cannot be used as a component\n * prop. This is platform-dependent and may be overwritten.\n */\n isReservedAttr: no,\n\n /**\n * Check if a tag is an unknown element.\n * Platform-dependent.\n */\n isUnknownElement: no,\n\n /**\n * Get the namespace of an element\n */\n getTagNamespace: noop,\n\n /**\n * Parse the real tag name for the specific platform.\n */\n parsePlatformTagName: identity,\n\n /**\n * Check if an attribute must be bound using property, e.g. value\n * Platform-dependent.\n */\n mustUseProp: no,\n\n /**\n * Perform updates asynchronously. Intended to be used by Vue Test Utils\n * This will significantly reduce performance if set to false.\n */\n async: true,\n\n /**\n * Exposed for legacy reasons\n */\n _lifecycleHooks: LIFECYCLE_HOOKS\n});\n\n/* */\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nvar unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n var c = (str + '').charCodeAt(0);\n return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n Object.defineProperty(obj, key, {\n value: val,\n enumerable: !!enumerable,\n writable: true,\n configurable: true\n });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = new RegExp((\"[^\" + (unicodeRegExp.source) + \".$_\\\\d]\"));\nfunction parsePath (path) {\n if (bailRE.test(path)) {\n return\n }\n var segments = path.split('.');\n return function (obj) {\n for (var i = 0; i < segments.length; i++) {\n if (!obj) { return }\n obj = obj[segments[i]];\n }\n return obj\n }\n}\n\n/* */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;\nvar weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');\nvar isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\nvar isPhantomJS = UA && /phantomjs/.test(UA);\nvar isFF = UA && UA.match(/firefox\\/(\\d+)/);\n\n// Firefox has a \"watch\" function on Object.prototype...\nvar nativeWatch = ({}).watch;\n\nvar supportsPassive = false;\nif (inBrowser) {\n try {\n var opts = {};\n Object.defineProperty(opts, 'passive', ({\n get: function get () {\n /* istanbul ignore next */\n supportsPassive = true;\n }\n })); // https://github.com/facebook/flow/issues/285\n window.addEventListener('test-passive', null, opts);\n } catch (e) {}\n}\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n if (_isServer === undefined) {\n /* istanbul ignore if */\n if (!inBrowser && !inWeex && typeof global !== 'undefined') {\n // detect presence of vue-server-renderer and avoid\n // Webpack shimming the process\n _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';\n } else {\n _isServer = false;\n }\n }\n return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n typeof Symbol !== 'undefined' && isNative(Symbol) &&\n typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\nvar _Set;\n/* istanbul ignore if */ // $flow-disable-line\nif (typeof Set !== 'undefined' && isNative(Set)) {\n // use native Set when available.\n _Set = Set;\n} else {\n // a non-standard Set polyfill that only works with primitive keys.\n _Set = /*@__PURE__*/(function () {\n function Set () {\n this.set = Object.create(null);\n }\n Set.prototype.has = function has (key) {\n return this.set[key] === true\n };\n Set.prototype.add = function add (key) {\n this.set[key] = true;\n };\n Set.prototype.clear = function clear () {\n this.set = Object.create(null);\n };\n\n return Set;\n }());\n}\n\n/* */\n\nvar warn = noop;\nvar tip = noop;\nvar generateComponentTrace = (noop); // work around flow check\nvar formatComponentName = (noop);\n\nif (process.env.NODE_ENV !== 'production') {\n var hasConsole = typeof console !== 'undefined';\n var classifyRE = /(?:^|[-_])(\\w)/g;\n var classify = function (str) { return str\n .replace(classifyRE, function (c) { return c.toUpperCase(); })\n .replace(/[-_]/g, ''); };\n\n warn = function (msg, vm) {\n var trace = vm ? generateComponentTrace(vm) : '';\n\n if (config.warnHandler) {\n config.warnHandler.call(null, msg, vm, trace);\n } else if (hasConsole && (!config.silent)) {\n console.error((\"[Vue warn]: \" + msg + trace));\n }\n };\n\n tip = function (msg, vm) {\n if (hasConsole && (!config.silent)) {\n console.warn(\"[Vue tip]: \" + msg + (\n vm ? generateComponentTrace(vm) : ''\n ));\n }\n };\n\n formatComponentName = function (vm, includeFile) {\n if (vm.$root === vm) {\n return '<Root>'\n }\n var options = typeof vm === 'function' && vm.cid != null\n ? vm.options\n : vm._isVue\n ? vm.$options || vm.constructor.options\n : vm;\n var name = options.name || options._componentTag;\n var file = options.__file;\n if (!name && file) {\n var match = file.match(/([^/\\\\]+)\\.vue$/);\n name = match && match[1];\n }\n\n return (\n (name ? (\"<\" + (classify(name)) + \">\") : \"<Anonymous>\") +\n (file && includeFile !== false ? (\" at \" + file) : '')\n )\n };\n\n var repeat = function (str, n) {\n var res = '';\n while (n) {\n if (n % 2 === 1) { res += str; }\n if (n > 1) { str += str; }\n n >>= 1;\n }\n return res\n };\n\n generateComponentTrace = function (vm) {\n if (vm._isVue && vm.$parent) {\n var tree = [];\n var currentRecursiveSequence = 0;\n while (vm) {\n if (tree.length > 0) {\n var last = tree[tree.length - 1];\n if (last.constructor === vm.constructor) {\n currentRecursiveSequence++;\n vm = vm.$parent;\n continue\n } else if (currentRecursiveSequence > 0) {\n tree[tree.length - 1] = [last, currentRecursiveSequence];\n currentRecursiveSequence = 0;\n }\n }\n tree.push(vm);\n vm = vm.$parent;\n }\n return '\\n\\nfound in\\n\\n' + tree\n .map(function (vm, i) { return (\"\" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)\n ? ((formatComponentName(vm[0])) + \"... (\" + (vm[1]) + \" recursive calls)\")\n : formatComponentName(vm))); })\n .join('\\n')\n } else {\n return (\"\\n\\n(found in \" + (formatComponentName(vm)) + \")\")\n }\n };\n}\n\n/* */\n\nvar uid = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n this.id = uid++;\n this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n if (Dep.target) {\n Dep.target.addDep(this);\n }\n};\n\nDep.prototype.notify = function notify () {\n // stabilize the subscriber list first\n var subs = this.subs.slice();\n if (process.env.NODE_ENV !== 'production' && !config.async) {\n // subs aren't sorted in scheduler if not running async\n // we need to sort them now to make sure they fire in correct\n // order\n subs.sort(function (a, b) { return a.id - b.id; });\n }\n for (var i = 0, l = subs.length; i < l; i++) {\n subs[i].update();\n }\n};\n\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (target) {\n targetStack.push(target);\n Dep.target = target;\n}\n\nfunction popTarget () {\n targetStack.pop();\n Dep.target = targetStack[targetStack.length - 1];\n}\n\n/* */\n\nvar VNode = function VNode (\n tag,\n data,\n children,\n text,\n elm,\n context,\n componentOptions,\n asyncFactory\n) {\n this.tag = tag;\n this.data = data;\n this.children = children;\n this.text = text;\n this.elm = elm;\n this.ns = undefined;\n this.context = context;\n this.fnContext = undefined;\n this.fnOptions = undefined;\n this.fnScopeId = undefined;\n this.key = data && data.key;\n this.componentOptions = componentOptions;\n this.componentInstance = undefined;\n this.parent = undefined;\n this.raw = false;\n this.isStatic = false;\n this.isRootInsert = true;\n this.isComment = false;\n this.isCloned = false;\n this.isOnce = false;\n this.asyncFactory = asyncFactory;\n this.asyncMeta = undefined;\n this.isAsyncPlaceholder = false;\n};\n\nvar prototypeAccessors = { child: { configurable: true } };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function (text) {\n if ( text === void 0 ) text = '';\n\n var node = new VNode();\n node.text = text;\n node.isComment = true;\n return node\n};\n\nfunction createTextVNode (val) {\n return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(),\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);\n\nvar methodsToPatch = [\n 'push',\n 'pop',\n 'shift',\n 'unshift',\n 'splice',\n 'sort',\n 'reverse'\n];\n\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n // cache original method\n var original = arrayProto[method];\n def(arrayMethods, method, function mutator () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var result = original.apply(this, args);\n var ob = this.__ob__;\n var inserted;\n switch (method) {\n case 'push':\n case 'unshift':\n inserted = args;\n break\n case 'splice':\n inserted = args.slice(2);\n break\n }\n if (inserted) { ob.observeArray(inserted); }\n // notify change\n ob.dep.notify();\n return result\n });\n});\n\n/* */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nvar shouldObserve = true;\n\nfunction toggleObserving (value) {\n shouldObserve = value;\n}\n\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nvar Observer = function Observer (value) {\n this.value = value;\n this.dep = new Dep();\n this.vmCount = 0;\n def(value, '__ob__', this);\n if (Array.isArray(value)) {\n if (hasProto) {\n protoAugment(value, arrayMethods);\n } else {\n copyAugment(value, arrayMethods, arrayKeys);\n }\n this.observeArray(value);\n } else {\n this.walk(value);\n }\n};\n\n/**\n * Walk through all properties and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n defineReactive$$1(obj, keys[i]);\n }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n for (var i = 0, l = items.length; i < l; i++) {\n observe(items[i]);\n }\n};\n\n// helpers\n\n/**\n * Augment a target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}\n\n/**\n * Augment a target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n def(target, key, src[key]);\n }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n if (process.env.NODE_ENV !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot set reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val\n }\n if (key in target && !(key in Object.prototype)) {\n target[key] = val;\n return val\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return val\n }\n if (!ob) {\n target[key] = val;\n return val\n }\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n if (process.env.NODE_ENV !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n}\n\n/* */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n strats.el = strats.propsData = function (parent, child, vm, key) {\n if (!vm) {\n warn(\n \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n 'creation with the `new` keyword.'\n );\n }\n return defaultStrat(parent, child)\n };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}\n\n/**\n * Data\n */\nfunction mergeDataOrFn (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n // in a Vue.extend merge, both should be functions\n if (!childVal) {\n return parentVal\n }\n if (!parentVal) {\n return childVal\n }\n // when parentVal & childVal are both present,\n // we need to return a function that returns the\n // merged result of both functions... no need to\n // check if parentVal is a function here because\n // it has to be a function to pass previous merges.\n return function mergedDataFn () {\n return mergeData(\n typeof childVal === 'function' ? childVal.call(this, this) : childVal,\n typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal\n )\n }\n } else {\n return function mergedInstanceDataFn () {\n // instance merge\n var instanceData = typeof childVal === 'function'\n ? childVal.call(vm, vm)\n : childVal;\n var defaultData = typeof parentVal === 'function'\n ? parentVal.call(vm, vm)\n : parentVal;\n if (instanceData) {\n return mergeData(instanceData, defaultData)\n } else {\n return defaultData\n }\n }\n }\n}\n\nstrats.data = function (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n if (childVal && typeof childVal !== 'function') {\n process.env.NODE_ENV !== 'production' && warn(\n 'The \"data\" option should be a function ' +\n 'that returns a per-instance value in component ' +\n 'definitions.',\n vm\n );\n\n return parentVal\n }\n return mergeDataOrFn(parentVal, childVal)\n }\n\n return mergeDataOrFn(parentVal, childVal, vm)\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n parentVal,\n childVal\n) {\n var res = childVal\n ? parentVal\n ? parentVal.concat(childVal)\n : Array.isArray(childVal)\n ? childVal\n : [childVal]\n : parentVal;\n return res\n ? dedupeHooks(res)\n : res\n}\n\nfunction dedupeHooks (hooks) {\n var res = [];\n for (var i = 0; i < hooks.length; i++) {\n if (res.indexOf(hooks[i]) === -1) {\n res.push(hooks[i]);\n }\n }\n return res\n}\n\nLIFECYCLE_HOOKS.forEach(function (hook) {\n strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}\n\nASSET_TYPES.forEach(function (type) {\n strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n // work around Firefox's Object.prototype.watch...\n if (parentVal === nativeWatch) { parentVal = undefined; }\n if (childVal === nativeWatch) { childVal = undefined; }\n /* istanbul ignore if */\n if (!childVal) { return Object.create(parentVal || null) }\n if (process.env.NODE_ENV !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = {};\n extend(ret, parentVal);\n for (var key$1 in childVal) {\n var parent = ret[key$1];\n var child = childVal[key$1];\n if (parent && !Array.isArray(parent)) {\n parent = [parent];\n }\n ret[key$1] = parent\n ? parent.concat(child)\n : Array.isArray(child) ? child : [child];\n }\n return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.inject =\nstrats.computed = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n if (childVal && process.env.NODE_ENV !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = Object.create(null);\n extend(ret, parentVal);\n if (childVal) { extend(ret, childVal); }\n return ret\n};\nstrats.provide = mergeDataOrFn;\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n for (var key in options.components) {\n validateComponentName(key);\n }\n}\n\nfunction validateComponentName (name) {\n if (!new RegExp((\"^[a-zA-Z][\\\\-\\\\.0-9_\" + (unicodeRegExp.source) + \"]*$\")).test(name)) {\n warn(\n 'Invalid component name: \"' + name + '\". Component names ' +\n 'should conform to valid custom element name in html5 specification.'\n );\n }\n if (isBuiltInTag(name) || config.isReservedTag(name)) {\n warn(\n 'Do not use built-in or reserved HTML elements as component ' +\n 'id: ' + name\n );\n }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}\n\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n var dirs = options.directives;\n if (dirs) {\n for (var key in dirs) {\n var def$$1 = dirs[key];\n if (typeof def$$1 === 'function') {\n dirs[key] = { bind: def$$1, update: def$$1 };\n }\n }\n }\n}\n\nfunction assertObjectType (name, value, vm) {\n if (!isPlainObject(value)) {\n warn(\n \"Invalid value for option \\\"\" + name + \"\\\": expected an Object, \" +\n \"but got \" + (toRawType(value)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n parent,\n child,\n vm\n) {\n if (process.env.NODE_ENV !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n\n // Apply extends and mixins on the child options,\n // but only if it is a raw options object that isn't\n // the result of another mergeOptions call.\n // Only merged options has the _base property.\n if (!child._base) {\n if (child.extends) {\n parent = mergeOptions(parent, child.extends, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n }\n\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}\n\n/* */\n\n\n\nfunction validateProp (\n key,\n propOptions,\n propsData,\n vm\n) {\n var prop = propOptions[key];\n var absent = !hasOwn(propsData, key);\n var value = propsData[key];\n // boolean casting\n var booleanIndex = getTypeIndex(Boolean, prop.type);\n if (booleanIndex > -1) {\n if (absent && !hasOwn(prop, 'default')) {\n value = false;\n } else if (value === '' || value === hyphenate(key)) {\n // only cast empty string / same name to boolean if\n // boolean has higher priority\n var stringIndex = getTypeIndex(String, prop.type);\n if (stringIndex < 0 || booleanIndex < stringIndex) {\n value = true;\n }\n }\n }\n // check default value\n if (value === undefined) {\n value = getPropDefaultValue(vm, prop, key);\n // since the default value is a fresh copy,\n // make sure to observe it.\n var prevShouldObserve = shouldObserve;\n toggleObserving(true);\n observe(value);\n toggleObserving(prevShouldObserve);\n }\n if (\n process.env.NODE_ENV !== 'production' &&\n // skip validation for weex recycle-list child component props\n !(false)\n ) {\n assertProp(prop, key, value, vm, absent);\n }\n return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n\n if (!valid) {\n warn(\n getInvalidTypeMessage(name, value, expectedTypes),\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}\n\nvar simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;\n\nfunction assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (simpleCheckRE.test(expectedType)) {\n var t = typeof value;\n valid = t === expectedType.toLowerCase();\n // for primitive wrapper objects\n if (!valid && t === 'object') {\n valid = value instanceof type;\n }\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}\n\nfunction isSameType (a, b) {\n return getType(a) === getType(b)\n}\n\nfunction getTypeIndex (type, expectedTypes) {\n if (!Array.isArray(expectedTypes)) {\n return isSameType(expectedTypes, type) ? 0 : -1\n }\n for (var i = 0, len = expectedTypes.length; i < len; i++) {\n if (isSameType(expectedTypes[i], type)) {\n return i\n }\n }\n return -1\n}\n\nfunction getInvalidTypeMessage (name, value, expectedTypes) {\n var message = \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', '));\n var expectedType = expectedTypes[0];\n var receivedType = toRawType(value);\n var expectedValue = styleValue(value, expectedType);\n var receivedValue = styleValue(value, receivedType);\n // check if we need to specify expected value\n if (expectedTypes.length === 1 &&\n isExplicable(expectedType) &&\n !isBoolean(expectedType, receivedType)) {\n message += \" with value \" + expectedValue;\n }\n message += \", got \" + receivedType + \" \";\n // check if we need to specify received value\n if (isExplicable(receivedType)) {\n message += \"with value \" + receivedValue + \".\";\n }\n return message\n}\n\nfunction styleValue (value, type) {\n if (type === 'String') {\n return (\"\\\"\" + value + \"\\\"\")\n } else if (type === 'Number') {\n return (\"\" + (Number(value)))\n } else {\n return (\"\" + value)\n }\n}\n\nfunction isExplicable (value) {\n var explicitTypes = ['string', 'number', 'boolean'];\n return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })\n}\n\nfunction isBoolean () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })\n}\n\n/* */\n\nfunction handleError (err, vm, info) {\n // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n // See: https://github.com/vuejs/vuex/issues/1505\n pushTarget();\n try {\n if (vm) {\n var cur = vm;\n while ((cur = cur.$parent)) {\n var hooks = cur.$options.errorCaptured;\n if (hooks) {\n for (var i = 0; i < hooks.length; i++) {\n try {\n var capture = hooks[i].call(cur, err, vm, info) === false;\n if (capture) { return }\n } catch (e) {\n globalHandleError(e, cur, 'errorCaptured hook');\n }\n }\n }\n }\n }\n globalHandleError(err, vm, info);\n } finally {\n popTarget();\n }\n}\n\nfunction invokeWithErrorHandling (\n handler,\n context,\n args,\n vm,\n info\n) {\n var res;\n try {\n res = args ? handler.apply(context, args) : handler.call(context);\n if (res && !res._isVue && isPromise(res) && !res._handled) {\n res.catch(function (e) { return handleError(e, vm, info + \" (Promise/async)\"); });\n // issue #9511\n // avoid catch triggering multiple times when nested calls\n res._handled = true;\n }\n } catch (e) {\n handleError(e, vm, info);\n }\n return res\n}\n\nfunction globalHandleError (err, vm, info) {\n if (config.errorHandler) {\n try {\n return config.errorHandler.call(null, err, vm, info)\n } catch (e) {\n // if the user intentionally throws the original error in the handler,\n // do not log it twice\n if (e !== err) {\n logError(e, null, 'config.errorHandler');\n }\n }\n }\n logError(err, vm, info);\n}\n\nfunction logError (err, vm, info) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Error in \" + info + \": \\\"\" + (err.toString()) + \"\\\"\"), vm);\n }\n /* istanbul ignore else */\n if ((inBrowser || inWeex) && typeof console !== 'undefined') {\n console.error(err);\n } else {\n throw err\n }\n}\n\n/* */\n\nvar isUsingMicroTask = false;\n\nvar callbacks = [];\nvar pending = false;\n\nfunction flushCallbacks () {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks.length = 0;\n for (var i = 0; i < copies.length; i++) {\n copies[i]();\n }\n}\n\n// Here we have async deferring wrappers using microtasks.\n// In 2.5 we used (macro) tasks (in combination with microtasks).\n// However, it has subtle problems when state is changed right before repaint\n// (e.g. #6813, out-in transitions).\n// Also, using (macro) tasks in event handler would cause some weird behaviors\n// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n// So we now use microtasks everywhere, again.\n// A major drawback of this tradeoff is that there are some scenarios\n// where microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690, which have workarounds)\n// or even between bubbling of the same event (#6566).\nvar timerFunc;\n\n// The nextTick behavior leverages the microtask queue, which can be accessed\n// via either native Promise.then or MutationObserver.\n// MutationObserver has wider support, however it is seriously bugged in\n// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n// completely stops working after triggering a few times... so, if native\n// Promise is available, we will use it:\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n var p = Promise.resolve();\n timerFunc = function () {\n p.then(flushCallbacks);\n // In problematic UIWebViews, Promise.then doesn't completely break, but\n // it can get stuck in a weird state where callbacks are pushed into the\n // microtask queue but the queue isn't being flushed, until the browser\n // needs to do some other work, e.g. handle a timer. Therefore we can\n // \"force\" the microtask queue to be flushed by adding an empty timer.\n if (isIOS) { setTimeout(noop); }\n };\n isUsingMicroTask = true;\n} else if (!isIE && typeof MutationObserver !== 'undefined' && (\n isNative(MutationObserver) ||\n // PhantomJS and iOS 7.x\n MutationObserver.toString() === '[object MutationObserverConstructor]'\n)) {\n // Use MutationObserver where native Promise is not available,\n // e.g. PhantomJS, iOS7, Android 4.4\n // (#6466 MutationObserver is unreliable in IE11)\n var counter = 1;\n var observer = new MutationObserver(flushCallbacks);\n var textNode = document.createTextNode(String(counter));\n observer.observe(textNode, {\n characterData: true\n });\n timerFunc = function () {\n counter = (counter + 1) % 2;\n textNode.data = String(counter);\n };\n isUsingMicroTask = true;\n} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n // Fallback to setImmediate.\n // Techinically it leverages the (macro) task queue,\n // but it is still a better choice than setTimeout.\n timerFunc = function () {\n setImmediate(flushCallbacks);\n };\n} else {\n // Fallback to setTimeout.\n timerFunc = function () {\n setTimeout(flushCallbacks, 0);\n };\n}\n\nfunction nextTick (cb, ctx) {\n var _resolve;\n callbacks.push(function () {\n if (cb) {\n try {\n cb.call(ctx);\n } catch (e) {\n handleError(e, ctx, 'nextTick');\n }\n } else if (_resolve) {\n _resolve(ctx);\n }\n });\n if (!pending) {\n pending = true;\n timerFunc();\n }\n // $flow-disable-line\n if (!cb && typeof Promise !== 'undefined') {\n return new Promise(function (resolve) {\n _resolve = resolve;\n })\n }\n}\n\n/* */\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (process.env.NODE_ENV !== 'production') {\n var allowedGlobals = makeMap(\n 'Infinity,undefined,NaN,isFinite,isNaN,' +\n 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n 'require' // for Webpack/Browserify\n );\n\n var warnNonPresent = function (target, key) {\n warn(\n \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n 'referenced during render. Make sure that this property is reactive, ' +\n 'either in the data option, or for class-based components, by ' +\n 'initializing the property. ' +\n 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',\n target\n );\n };\n\n var warnReservedPrefix = function (target, key) {\n warn(\n \"Property \\\"\" + key + \"\\\" must be accessed with \\\"$data.\" + key + \"\\\" because \" +\n 'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n 'prevent conflicts with Vue internals' +\n 'See: https://vuejs.org/v2/api/#data',\n target\n );\n };\n\n var hasProxy =\n typeof Proxy !== 'undefined' && isNative(Proxy);\n\n if (hasProxy) {\n var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n config.keyCodes = new Proxy(config.keyCodes, {\n set: function set (target, key, value) {\n if (isBuiltInModifier(key)) {\n warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n return false\n } else {\n target[key] = value;\n return true\n }\n }\n });\n }\n\n var hasHandler = {\n has: function has (target, key) {\n var has = key in target;\n var isAllowed = allowedGlobals(key) ||\n (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));\n if (!has && !isAllowed) {\n if (key in target.$data) { warnReservedPrefix(target, key); }\n else { warnNonPresent(target, key); }\n }\n return has || !isAllowed\n }\n };\n\n var getHandler = {\n get: function get (target, key) {\n if (typeof key === 'string' && !(key in target)) {\n if (key in target.$data) { warnReservedPrefix(target, key); }\n else { warnNonPresent(target, key); }\n }\n return target[key]\n }\n };\n\n initProxy = function initProxy (vm) {\n if (hasProxy) {\n // determine which proxy handler to use\n var options = vm.$options;\n var handlers = options.render && options.render._withStripped\n ? getHandler\n : hasHandler;\n vm._renderProxy = new Proxy(vm, handlers);\n } else {\n vm._renderProxy = vm;\n }\n };\n}\n\n/* */\n\nvar seenObjects = new _Set();\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}\n\nfunction _traverse (val, seen) {\n var i, keys;\n var isA = Array.isArray(val);\n if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {\n return\n }\n if (val.__ob__) {\n var depId = val.__ob__.dep.id;\n if (seen.has(depId)) {\n return\n }\n seen.add(depId);\n }\n if (isA) {\n i = val.length;\n while (i--) { _traverse(val[i], seen); }\n } else {\n keys = Object.keys(val);\n i = keys.length;\n while (i--) { _traverse(val[keys[i]], seen); }\n }\n}\n\nvar mark;\nvar measure;\n\nif (process.env.NODE_ENV !== 'production') {\n var perf = inBrowser && window.performance;\n /* istanbul ignore if */\n if (\n perf &&\n perf.mark &&\n perf.measure &&\n perf.clearMarks &&\n perf.clearMeasures\n ) {\n mark = function (tag) { return perf.mark(tag); };\n measure = function (name, startTag, endTag) {\n perf.measure(name, startTag, endTag);\n perf.clearMarks(startTag);\n perf.clearMarks(endTag);\n // perf.clearMeasures(name)\n };\n }\n}\n\n/* */\n\nvar normalizeEvent = cached(function (name) {\n var passive = name.charAt(0) === '&';\n name = passive ? name.slice(1) : name;\n var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n name = once$$1 ? name.slice(1) : name;\n var capture = name.charAt(0) === '!';\n name = capture ? name.slice(1) : name;\n return {\n name: name,\n once: once$$1,\n capture: capture,\n passive: passive\n }\n});\n\nfunction createFnInvoker (fns, vm) {\n function invoker () {\n var arguments$1 = arguments;\n\n var fns = invoker.fns;\n if (Array.isArray(fns)) {\n var cloned = fns.slice();\n for (var i = 0; i < cloned.length; i++) {\n invokeWithErrorHandling(cloned[i], null, arguments$1, vm, \"v-on handler\");\n }\n } else {\n // return handler return value for single handlers\n return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\")\n }\n }\n invoker.fns = fns;\n return invoker\n}\n\nfunction updateListeners (\n on,\n oldOn,\n add,\n remove$$1,\n createOnceHandler,\n vm\n) {\n var name, def$$1, cur, old, event;\n for (name in on) {\n def$$1 = cur = on[name];\n old = oldOn[name];\n event = normalizeEvent(name);\n if (isUndef(cur)) {\n process.env.NODE_ENV !== 'production' && warn(\n \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n vm\n );\n } else if (isUndef(old)) {\n if (isUndef(cur.fns)) {\n cur = on[name] = createFnInvoker(cur, vm);\n }\n if (isTrue(event.once)) {\n cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n }\n add(event.name, cur, event.capture, event.passive, event.params);\n } else if (cur !== old) {\n old.fns = cur;\n on[name] = old;\n }\n }\n for (name in oldOn) {\n if (isUndef(on[name])) {\n event = normalizeEvent(name);\n remove$$1(event.name, oldOn[name], event.capture);\n }\n }\n}\n\n/* */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n if (def instanceof VNode) {\n def = def.data.hook || (def.data.hook = {});\n }\n var invoker;\n var oldHook = def[hookKey];\n\n function wrappedHook () {\n hook.apply(this, arguments);\n // important: remove merged hook to ensure it's called only once\n // and prevent memory leak\n remove(invoker.fns, wrappedHook);\n }\n\n if (isUndef(oldHook)) {\n // no existing hook\n invoker = createFnInvoker([wrappedHook]);\n } else {\n /* istanbul ignore if */\n if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n // already a merged invoker\n invoker = oldHook;\n invoker.fns.push(wrappedHook);\n } else {\n // existing plain hook\n invoker = createFnInvoker([oldHook, wrappedHook]);\n }\n }\n\n invoker.merged = true;\n def[hookKey] = invoker;\n}\n\n/* */\n\nfunction extractPropsFromVNodeData (\n data,\n Ctor,\n tag\n) {\n // we are only extracting raw values here.\n // validation and default values are handled in the child\n // component itself.\n var propOptions = Ctor.options.props;\n if (isUndef(propOptions)) {\n return\n }\n var res = {};\n var attrs = data.attrs;\n var props = data.props;\n if (isDef(attrs) || isDef(props)) {\n for (var key in propOptions) {\n var altKey = hyphenate(key);\n if (process.env.NODE_ENV !== 'production') {\n var keyInLowerCase = key.toLowerCase();\n if (\n key !== keyInLowerCase &&\n attrs && hasOwn(attrs, keyInLowerCase)\n ) {\n tip(\n \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n \" \\\"\" + key + \"\\\". \" +\n \"Note that HTML attributes are case-insensitive and camelCased \" +\n \"props need to use their kebab-case equivalents when using in-DOM \" +\n \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n );\n }\n }\n checkProp(res, props, key, altKey, true) ||\n checkProp(res, attrs, key, altKey, false);\n }\n }\n return res\n}\n\nfunction checkProp (\n res,\n hash,\n key,\n altKey,\n preserve\n) {\n if (isDef(hash)) {\n if (hasOwn(hash, key)) {\n res[key] = hash[key];\n if (!preserve) {\n delete hash[key];\n }\n return true\n } else if (hasOwn(hash, altKey)) {\n res[key] = hash[altKey];\n if (!preserve) {\n delete hash[altKey];\n }\n return true\n }\n }\n return false\n}\n\n/* */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children)\n }\n }\n return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}\n\nfunction isTextNode (node) {\n return isDef(node) && isDef(node.text) && isFalse(node.isComment)\n}\n\nfunction normalizeArrayChildren (children, nestedIndex) {\n var res = [];\n var i, c, lastIndex, last;\n for (i = 0; i < children.length; i++) {\n c = children[i];\n if (isUndef(c) || typeof c === 'boolean') { continue }\n lastIndex = res.length - 1;\n last = res[lastIndex];\n // nested\n if (Array.isArray(c)) {\n if (c.length > 0) {\n c = normalizeArrayChildren(c, ((nestedIndex || '') + \"_\" + i));\n // merge adjacent text nodes\n if (isTextNode(c[0]) && isTextNode(last)) {\n res[lastIndex] = createTextVNode(last.text + (c[0]).text);\n c.shift();\n }\n res.push.apply(res, c);\n }\n } else if (isPrimitive(c)) {\n if (isTextNode(last)) {\n // merge adjacent text nodes\n // this is necessary for SSR hydration because text nodes are\n // essentially merged when rendered to HTML strings\n res[lastIndex] = createTextVNode(last.text + c);\n } else if (c !== '') {\n // convert primitive to vnode\n res.push(createTextVNode(c));\n }\n } else {\n if (isTextNode(c) && isTextNode(last)) {\n // merge adjacent text nodes\n res[lastIndex] = createTextVNode(last.text + c.text);\n } else {\n // default key for nested array children (likely generated by v-for)\n if (isTrue(children._isVList) &&\n isDef(c.tag) &&\n isUndef(c.key) &&\n isDef(nestedIndex)) {\n c.key = \"__vlist\" + nestedIndex + \"_\" + i + \"__\";\n }\n res.push(c);\n }\n }\n }\n return res\n}\n\n/* */\n\nfunction initProvide (vm) {\n var provide = vm.$options.provide;\n if (provide) {\n vm._provided = typeof provide === 'function'\n ? provide.call(vm)\n : provide;\n }\n}\n\nfunction initInjections (vm) {\n var result = resolveInject(vm.$options.inject, vm);\n if (result) {\n toggleObserving(false);\n Object.keys(result).forEach(function (key) {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n defineReactive$$1(vm, key, result[key], function () {\n warn(\n \"Avoid mutating an injected value directly since the changes will be \" +\n \"overwritten whenever the provided component re-renders. \" +\n \"injection being mutated: \\\"\" + key + \"\\\"\",\n vm\n );\n });\n } else {\n defineReactive$$1(vm, key, result[key]);\n }\n });\n toggleObserving(true);\n }\n}\n\nfunction resolveInject (inject, vm) {\n if (inject) {\n // inject is :any because flow is not smart enough to figure out cached\n var result = Object.create(null);\n var keys = hasSymbol\n ? Reflect.ownKeys(inject)\n : Object.keys(inject);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n // #6574 in case the inject object is observed...\n if (key === '__ob__') { continue }\n var provideKey = inject[key].from;\n var source = vm;\n while (source) {\n if (source._provided && hasOwn(source._provided, provideKey)) {\n result[key] = source._provided[provideKey];\n break\n }\n source = source.$parent;\n }\n if (!source) {\n if ('default' in inject[key]) {\n var provideDefault = inject[key].default;\n result[key] = typeof provideDefault === 'function'\n ? provideDefault.call(vm)\n : provideDefault;\n } else if (process.env.NODE_ENV !== 'production') {\n warn((\"Injection \\\"\" + key + \"\\\" not found\"), vm);\n }\n }\n }\n return result\n }\n}\n\n/* */\n\n\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots (\n children,\n context\n) {\n if (!children || !children.length) {\n return {}\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}\n\nfunction isWhitespace (node) {\n return (node.isComment && !node.asyncFactory) || node.text === ' '\n}\n\n/* */\n\nfunction normalizeScopedSlots (\n slots,\n normalSlots,\n prevSlots\n) {\n var res;\n var hasNormalSlots = Object.keys(normalSlots).length > 0;\n var isStable = slots ? !!slots.$stable : !hasNormalSlots;\n var key = slots && slots.$key;\n if (!slots) {\n res = {};\n } else if (slots._normalized) {\n // fast path 1: child component re-render only, parent did not change\n return slots._normalized\n } else if (\n isStable &&\n prevSlots &&\n prevSlots !== emptyObject &&\n key === prevSlots.$key &&\n !hasNormalSlots &&\n !prevSlots.$hasNormal\n ) {\n // fast path 2: stable scoped slots w/ no normal slots to proxy,\n // only need to normalize once\n return prevSlots\n } else {\n res = {};\n for (var key$1 in slots) {\n if (slots[key$1] && key$1[0] !== '$') {\n res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);\n }\n }\n }\n // expose normal slots on scopedSlots\n for (var key$2 in normalSlots) {\n if (!(key$2 in res)) {\n res[key$2] = proxyNormalSlot(normalSlots, key$2);\n }\n }\n // avoriaz seems to mock a non-extensible $scopedSlots object\n // and when that is passed down this would cause an error\n if (slots && Object.isExtensible(slots)) {\n (slots)._normalized = res;\n }\n def(res, '$stable', isStable);\n def(res, '$key', key);\n def(res, '$hasNormal', hasNormalSlots);\n return res\n}\n\nfunction normalizeScopedSlot(normalSlots, key, fn) {\n var normalized = function () {\n var res = arguments.length ? fn.apply(null, arguments) : fn({});\n res = res && typeof res === 'object' && !Array.isArray(res)\n ? [res] // single vnode\n : normalizeChildren(res);\n return res && (\n res.length === 0 ||\n (res.length === 1 && res[0].isComment) // #9658\n ) ? undefined\n : res\n };\n // this is a slot using the new v-slot syntax without scope. although it is\n // compiled as a scoped slot, render fn users would expect it to be present\n // on this.$slots because the usage is semantically a normal slot.\n if (fn.proxy) {\n Object.defineProperty(normalSlots, key, {\n get: normalized,\n enumerable: true,\n configurable: true\n });\n }\n return normalized\n}\n\nfunction proxyNormalSlot(slots, key) {\n return function () { return slots[key]; }\n}\n\n/* */\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n if (hasSymbol && val[Symbol.iterator]) {\n ret = [];\n var iterator = val[Symbol.iterator]();\n var result = iterator.next();\n while (!result.done) {\n ret.push(render(result.value, ret.length));\n result = iterator.next();\n }\n } else {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n}\n\n/* */\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot (\n name,\n fallback,\n props,\n bindObject\n) {\n var scopedSlotFn = this.$scopedSlots[name];\n var nodes;\n if (scopedSlotFn) { // scoped slot\n props = props || {};\n if (bindObject) {\n if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) {\n warn(\n 'slot v-bind without argument expects an Object',\n this\n );\n }\n props = extend(extend({}, bindObject), props);\n }\n nodes = scopedSlotFn(props) || fallback;\n } else {\n nodes = this.$slots[name] || fallback;\n }\n\n var target = props && props.slot;\n if (target) {\n return this.$createElement('template', { slot: target }, nodes)\n } else {\n return nodes\n }\n}\n\n/* */\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter (id) {\n return resolveAsset(this.$options, 'filters', id, true) || identity\n}\n\n/* */\n\nfunction isKeyNotMatch (expect, actual) {\n if (Array.isArray(expect)) {\n return expect.indexOf(actual) === -1\n } else {\n return expect !== actual\n }\n}\n\n/**\n * Runtime helper for checking keyCodes from config.\n * exposed as Vue.prototype._k\n * passing in eventKeyName as last argument separately for backwards compat\n */\nfunction checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}\n\n/* */\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}\n\n/* */\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic (\n index,\n isInFor\n) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(\n this._renderProxy,\n null,\n this // for render fns generated for functional component templates\n );\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n}\n\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce (\n tree,\n index,\n key\n) {\n markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n return tree\n}\n\nfunction markStatic (\n tree,\n key,\n isOnce\n) {\n if (Array.isArray(tree)) {\n for (var i = 0; i < tree.length; i++) {\n if (tree[i] && typeof tree[i] !== 'string') {\n markStaticNode(tree[i], (key + \"_\" + i), isOnce);\n }\n }\n } else {\n markStaticNode(tree, key, isOnce);\n }\n}\n\nfunction markStaticNode (node, key, isOnce) {\n node.isStatic = true;\n node.key = key;\n node.isOnce = isOnce;\n}\n\n/* */\n\nfunction bindObjectListeners (data, value) {\n if (value) {\n if (!isPlainObject(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'v-on without argument expects an Object value',\n this\n );\n } else {\n var on = data.on = data.on ? extend({}, data.on) : {};\n for (var key in value) {\n var existing = on[key];\n var ours = value[key];\n on[key] = existing ? [].concat(existing, ours) : ours;\n }\n }\n }\n return data\n}\n\n/* */\n\nfunction resolveScopedSlots (\n fns, // see flow/vnode\n res,\n // the following are added in 2.6\n hasDynamicKeys,\n contentHashKey\n) {\n res = res || { $stable: !hasDynamicKeys };\n for (var i = 0; i < fns.length; i++) {\n var slot = fns[i];\n if (Array.isArray(slot)) {\n resolveScopedSlots(slot, res, hasDynamicKeys);\n } else if (slot) {\n // marker for reverse proxying v-slot without scope on this.$slots\n if (slot.proxy) {\n slot.fn.proxy = true;\n }\n res[slot.key] = slot.fn;\n }\n }\n if (contentHashKey) {\n (res).$key = contentHashKey;\n }\n return res\n}\n\n/* */\n\nfunction bindDynamicKeys (baseObj, values) {\n for (var i = 0; i < values.length; i += 2) {\n var key = values[i];\n if (typeof key === 'string' && key) {\n baseObj[values[i]] = values[i + 1];\n } else if (process.env.NODE_ENV !== 'production' && key !== '' && key !== null) {\n // null is a speical value for explicitly removing a binding\n warn(\n (\"Invalid value for dynamic directive argument (expected string or null): \" + key),\n this\n );\n }\n }\n return baseObj\n}\n\n// helper to dynamically append modifier runtime markers to event names.\n// ensure only append when value is already string, otherwise it will be cast\n// to string and cause the type check to miss.\nfunction prependModifier (value, symbol) {\n return typeof value === 'string' ? symbol + value : value\n}\n\n/* */\n\nfunction installRenderHelpers (target) {\n target._o = markOnce;\n target._n = toNumber;\n target._s = toString;\n target._l = renderList;\n target._t = renderSlot;\n target._q = looseEqual;\n target._i = looseIndexOf;\n target._m = renderStatic;\n target._f = resolveFilter;\n target._k = checkKeyCodes;\n target._b = bindObjectProps;\n target._v = createTextVNode;\n target._e = createEmptyVNode;\n target._u = resolveScopedSlots;\n target._g = bindObjectListeners;\n target._d = bindDynamicKeys;\n target._p = prependModifier;\n}\n\n/* */\n\nfunction FunctionalRenderContext (\n data,\n props,\n children,\n parent,\n Ctor\n) {\n var this$1 = this;\n\n var options = Ctor.options;\n // ensure the createElement function in functional components\n // gets a unique context - this is necessary for correct named slot check\n var contextVm;\n if (hasOwn(parent, '_uid')) {\n contextVm = Object.create(parent);\n // $flow-disable-line\n contextVm._original = parent;\n } else {\n // the context vm passed in is a functional context as well.\n // in this case we want to make sure we are able to get a hold to the\n // real context instance.\n contextVm = parent;\n // $flow-disable-line\n parent = parent._original;\n }\n var isCompiled = isTrue(options._compiled);\n var needNormalization = !isCompiled;\n\n this.data = data;\n this.props = props;\n this.children = children;\n this.parent = parent;\n this.listeners = data.on || emptyObject;\n this.injections = resolveInject(options.inject, parent);\n this.slots = function () {\n if (!this$1.$slots) {\n normalizeScopedSlots(\n data.scopedSlots,\n this$1.$slots = resolveSlots(children, parent)\n );\n }\n return this$1.$slots\n };\n\n Object.defineProperty(this, 'scopedSlots', ({\n enumerable: true,\n get: function get () {\n return normalizeScopedSlots(data.scopedSlots, this.slots())\n }\n }));\n\n // support for compiled functional template\n if (isCompiled) {\n // exposing $options for renderStatic()\n this.$options = options;\n // pre-resolve slots for renderSlot()\n this.$slots = this.slots();\n this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);\n }\n\n if (options._scopeId) {\n this._c = function (a, b, c, d) {\n var vnode = createElement(contextVm, a, b, c, d, needNormalization);\n if (vnode && !Array.isArray(vnode)) {\n vnode.fnScopeId = options._scopeId;\n vnode.fnContext = parent;\n }\n return vnode\n };\n } else {\n this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };\n }\n}\n\ninstallRenderHelpers(FunctionalRenderContext.prototype);\n\nfunction createFunctionalComponent (\n Ctor,\n propsData,\n data,\n contextVm,\n children\n) {\n var options = Ctor.options;\n var props = {};\n var propOptions = options.props;\n if (isDef(propOptions)) {\n for (var key in propOptions) {\n props[key] = validateProp(key, propOptions, propsData || emptyObject);\n }\n } else {\n if (isDef(data.attrs)) { mergeProps(props, data.attrs); }\n if (isDef(data.props)) { mergeProps(props, data.props); }\n }\n\n var renderContext = new FunctionalRenderContext(\n data,\n props,\n children,\n contextVm,\n Ctor\n );\n\n var vnode = options.render.call(null, renderContext._c, renderContext);\n\n if (vnode instanceof VNode) {\n return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)\n } else if (Array.isArray(vnode)) {\n var vnodes = normalizeChildren(vnode) || [];\n var res = new Array(vnodes.length);\n for (var i = 0; i < vnodes.length; i++) {\n res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);\n }\n return res\n }\n}\n\nfunction cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {\n // #7817 clone node before setting fnContext, otherwise if the node is reused\n // (e.g. it was from a cached normal slot) the fnContext causes named slots\n // that should not be matched to match.\n var clone = cloneVNode(vnode);\n clone.fnContext = contextVm;\n clone.fnOptions = options;\n if (process.env.NODE_ENV !== 'production') {\n (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;\n }\n if (data.slot) {\n (clone.data || (clone.data = {})).slot = data.slot;\n }\n return clone\n}\n\nfunction mergeProps (to, from) {\n for (var key in from) {\n to[camelize(key)] = from[key];\n }\n}\n\n/* */\n\n/* */\n\n/* */\n\n/* */\n\n// inline hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n init: function init (vnode, hydrating) {\n if (\n vnode.componentInstance &&\n !vnode.componentInstance._isDestroyed &&\n vnode.data.keepAlive\n ) {\n // kept-alive components, treat as a patch\n var mountedNode = vnode; // work around flow\n componentVNodeHooks.prepatch(mountedNode, mountedNode);\n } else {\n var child = vnode.componentInstance = createComponentInstanceForVnode(\n vnode,\n activeInstance\n );\n child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n }\n },\n\n prepatch: function prepatch (oldVnode, vnode) {\n var options = vnode.componentOptions;\n var child = vnode.componentInstance = oldVnode.componentInstance;\n updateChildComponent(\n child,\n options.propsData, // updated props\n options.listeners, // updated listeners\n vnode, // new parent vnode\n options.children // new children\n );\n },\n\n insert: function insert (vnode) {\n var context = vnode.context;\n var componentInstance = vnode.componentInstance;\n if (!componentInstance._isMounted) {\n componentInstance._isMounted = true;\n callHook(componentInstance, 'mounted');\n }\n if (vnode.data.keepAlive) {\n if (context._isMounted) {\n // vue-router#1212\n // During updates, a kept-alive component's child components may\n // change, so directly walking the tree here may call activated hooks\n // on incorrect children. Instead we push them into a queue which will\n // be processed after the whole patch process ended.\n queueActivatedComponent(componentInstance);\n } else {\n activateChildComponent(componentInstance, true /* direct */);\n }\n }\n },\n\n destroy: function destroy (vnode) {\n var componentInstance = vnode.componentInstance;\n if (!componentInstance._isDestroyed) {\n if (!vnode.data.keepAlive) {\n componentInstance.$destroy();\n } else {\n deactivateChildComponent(componentInstance, true /* direct */);\n }\n }\n }\n};\n\nvar hooksToMerge = Object.keys(componentVNodeHooks);\n\nfunction createComponent (\n Ctor,\n data,\n context,\n children,\n tag\n) {\n if (isUndef(Ctor)) {\n return\n }\n\n var baseCtor = context.$options._base;\n\n // plain options object: turn it into a constructor\n if (isObject(Ctor)) {\n Ctor = baseCtor.extend(Ctor);\n }\n\n // if at this stage it's not a constructor or an async component factory,\n // reject.\n if (typeof Ctor !== 'function') {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Invalid Component definition: \" + (String(Ctor))), context);\n }\n return\n }\n\n // async component\n var asyncFactory;\n if (isUndef(Ctor.cid)) {\n asyncFactory = Ctor;\n Ctor = resolveAsyncComponent(asyncFactory, baseCtor);\n if (Ctor === undefined) {\n // return a placeholder node for async component, which is rendered\n // as a comment node but preserves all the raw information for the node.\n // the information will be used for async server-rendering and hydration.\n return createAsyncPlaceholder(\n asyncFactory,\n data,\n context,\n children,\n tag\n )\n }\n }\n\n data = data || {};\n\n // resolve constructor options in case global mixins are applied after\n // component constructor creation\n resolveConstructorOptions(Ctor);\n\n // transform component v-model data into props & events\n if (isDef(data.model)) {\n transformModel(Ctor.options, data);\n }\n\n // extract props\n var propsData = extractPropsFromVNodeData(data, Ctor, tag);\n\n // functional component\n if (isTrue(Ctor.options.functional)) {\n return createFunctionalComponent(Ctor, propsData, data, context, children)\n }\n\n // extract listeners, since these needs to be treated as\n // child component listeners instead of DOM listeners\n var listeners = data.on;\n // replace with listeners with .native modifier\n // so it gets processed during parent component patch.\n data.on = data.nativeOn;\n\n if (isTrue(Ctor.options.abstract)) {\n // abstract components do not keep anything\n // other than props & listeners & slot\n\n // work around flow\n var slot = data.slot;\n data = {};\n if (slot) {\n data.slot = slot;\n }\n }\n\n // install component management hooks onto the placeholder node\n installComponentHooks(data);\n\n // return a placeholder vnode\n var name = Ctor.options.name || tag;\n var vnode = new VNode(\n (\"vue-component-\" + (Ctor.cid) + (name ? (\"-\" + name) : '')),\n data, undefined, undefined, undefined, context,\n { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },\n asyncFactory\n );\n\n return vnode\n}\n\nfunction createComponentInstanceForVnode (\n vnode, // we know it's MountedComponentVNode but flow doesn't\n parent // activeInstance in lifecycle state\n) {\n var options = {\n _isComponent: true,\n _parentVnode: vnode,\n parent: parent\n };\n // check inline-template render functions\n var inlineTemplate = vnode.data.inlineTemplate;\n if (isDef(inlineTemplate)) {\n options.render = inlineTemplate.render;\n options.staticRenderFns = inlineTemplate.staticRenderFns;\n }\n return new vnode.componentOptions.Ctor(options)\n}\n\nfunction installComponentHooks (data) {\n var hooks = data.hook || (data.hook = {});\n for (var i = 0; i < hooksToMerge.length; i++) {\n var key = hooksToMerge[i];\n var existing = hooks[key];\n var toMerge = componentVNodeHooks[key];\n if (existing !== toMerge && !(existing && existing._merged)) {\n hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;\n }\n }\n}\n\nfunction mergeHook$1 (f1, f2) {\n var merged = function (a, b) {\n // flow complains about extra args which is why we use any\n f1(a, b);\n f2(a, b);\n };\n merged._merged = true;\n return merged\n}\n\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n}\n\n/* */\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement (\n context,\n tag,\n data,\n children,\n normalizationType,\n alwaysNormalize\n) {\n if (Array.isArray(data) || isPrimitive(data)) {\n normalizationType = children;\n children = data;\n data = undefined;\n }\n if (isTrue(alwaysNormalize)) {\n normalizationType = ALWAYS_NORMALIZE;\n }\n return _createElement(context, tag, data, children, normalizationType)\n}\n\nfunction _createElement (\n context,\n tag,\n data,\n children,\n normalizationType\n) {\n if (isDef(data) && isDef((data).__ob__)) {\n process.env.NODE_ENV !== 'production' && warn(\n \"Avoid using observed data object as vnode data: \" + (JSON.stringify(data)) + \"\\n\" +\n 'Always create fresh vnode data objects in each render!',\n context\n );\n return createEmptyVNode()\n }\n // object syntax in v-bind\n if (isDef(data) && isDef(data.is)) {\n tag = data.is;\n }\n if (!tag) {\n // in case of component :is set to falsy value\n return createEmptyVNode()\n }\n // warn against non-primitive key\n if (process.env.NODE_ENV !== 'production' &&\n isDef(data) && isDef(data.key) && !isPrimitive(data.key)\n ) {\n {\n warn(\n 'Avoid using non-primitive value as key, ' +\n 'use string/number value instead.',\n context\n );\n }\n }\n // support single function children as default scoped slot\n if (Array.isArray(children) &&\n typeof children[0] === 'function'\n ) {\n data = data || {};\n data.scopedSlots = { default: children[0] };\n children.length = 0;\n }\n if (normalizationType === ALWAYS_NORMALIZE) {\n children = normalizeChildren(children);\n } else if (normalizationType === SIMPLE_NORMALIZE) {\n children = simpleNormalizeChildren(children);\n }\n var vnode, ns;\n if (typeof tag === 'string') {\n var Ctor;\n ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n if (config.isReservedTag(tag)) {\n // platform built-in elements\n vnode = new VNode(\n config.parsePlatformTagName(tag), data, children,\n undefined, undefined, context\n );\n } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {\n // component\n vnode = createComponent(Ctor, data, context, children, tag);\n } else {\n // unknown or unlisted namespaced elements\n // check at runtime because it may get assigned a namespace when its\n // parent normalizes children\n vnode = new VNode(\n tag, data, children,\n undefined, undefined, context\n );\n }\n } else {\n // direct component options / constructor\n vnode = createComponent(tag, data, context, children);\n }\n if (Array.isArray(vnode)) {\n return vnode\n } else if (isDef(vnode)) {\n if (isDef(ns)) { applyNS(vnode, ns); }\n if (isDef(data)) { registerDeepBindings(data); }\n return vnode\n } else {\n return createEmptyVNode()\n }\n}\n\nfunction applyNS (vnode, ns, force) {\n vnode.ns = ns;\n if (vnode.tag === 'foreignObject') {\n // use default namespace inside foreignObject\n ns = undefined;\n force = true;\n }\n if (isDef(vnode.children)) {\n for (var i = 0, l = vnode.children.length; i < l; i++) {\n var child = vnode.children[i];\n if (isDef(child.tag) && (\n isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n applyNS(child, ns, force);\n }\n }\n }\n}\n\n// ref #5318\n// necessary to ensure parent re-render when deep bindings like :style and\n// :class are used on slot nodes\nfunction registerDeepBindings (data) {\n if (isObject(data.style)) {\n traverse(data.style);\n }\n if (isObject(data.class)) {\n traverse(data.class);\n }\n}\n\n/* */\n\nfunction initRender (vm) {\n vm._vnode = null; // the root of the child tree\n vm._staticTrees = null; // v-once cached trees\n var options = vm.$options;\n var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree\n var renderContext = parentVnode && parentVnode.context;\n vm.$slots = resolveSlots(options._renderChildren, renderContext);\n vm.$scopedSlots = emptyObject;\n // bind the createElement fn to this instance\n // so that we get proper render context inside it.\n // args order: tag, data, children, normalizationType, alwaysNormalize\n // internal version is used by render functions compiled from templates\n vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\n // normalization is always applied for the public version, used in\n // user-written render functions.\n vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\n\n // $attrs & $listeners are exposed for easier HOC creation.\n // they need to be reactive so that HOCs using them are always updated\n var parentData = parentVnode && parentVnode.data;\n\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {\n !isUpdatingChildComponent && warn(\"$attrs is readonly.\", vm);\n }, true);\n defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {\n !isUpdatingChildComponent && warn(\"$listeners is readonly.\", vm);\n }, true);\n } else {\n defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, null, true);\n defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, null, true);\n }\n}\n\nvar currentRenderingInstance = null;\n\nfunction renderMixin (Vue) {\n // install runtime convenience helpers\n installRenderHelpers(Vue.prototype);\n\n Vue.prototype.$nextTick = function (fn) {\n return nextTick(fn, this)\n };\n\n Vue.prototype._render = function () {\n var vm = this;\n var ref = vm.$options;\n var render = ref.render;\n var _parentVnode = ref._parentVnode;\n\n if (_parentVnode) {\n vm.$scopedSlots = normalizeScopedSlots(\n _parentVnode.data.scopedSlots,\n vm.$slots,\n vm.$scopedSlots\n );\n }\n\n // set parent vnode. this allows render functions to have access\n // to the data on the placeholder node.\n vm.$vnode = _parentVnode;\n // render self\n var vnode;\n try {\n // There's no need to maintain a stack becaues all render fns are called\n // separately from one another. Nested component's render fns are called\n // when parent component is patched.\n currentRenderingInstance = vm;\n vnode = render.call(vm._renderProxy, vm.$createElement);\n } catch (e) {\n handleError(e, vm, \"render\");\n // return error render result,\n // or previous vnode to prevent render error causing blank component\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production' && vm.$options.renderError) {\n try {\n vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n } catch (e) {\n handleError(e, vm, \"renderError\");\n vnode = vm._vnode;\n }\n } else {\n vnode = vm._vnode;\n }\n } finally {\n currentRenderingInstance = null;\n }\n // if the returned array contains only a single node, allow it\n if (Array.isArray(vnode) && vnode.length === 1) {\n vnode = vnode[0];\n }\n // return empty vnode in case the render function errored out\n if (!(vnode instanceof VNode)) {\n if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {\n warn(\n 'Multiple root nodes returned from render function. Render function ' +\n 'should return a single root node.',\n vm\n );\n }\n vnode = createEmptyVNode();\n }\n // set parent\n vnode.parent = _parentVnode;\n return vnode\n };\n}\n\n/* */\n\nfunction ensureCtor (comp, base) {\n if (\n comp.__esModule ||\n (hasSymbol && comp[Symbol.toStringTag] === 'Module')\n ) {\n comp = comp.default;\n }\n return isObject(comp)\n ? base.extend(comp)\n : comp\n}\n\nfunction createAsyncPlaceholder (\n factory,\n data,\n context,\n children,\n tag\n) {\n var node = createEmptyVNode();\n node.asyncFactory = factory;\n node.asyncMeta = { data: data, context: context, children: children, tag: tag };\n return node\n}\n\nfunction resolveAsyncComponent (\n factory,\n baseCtor\n) {\n if (isTrue(factory.error) && isDef(factory.errorComp)) {\n return factory.errorComp\n }\n\n if (isDef(factory.resolved)) {\n return factory.resolved\n }\n\n var owner = currentRenderingInstance;\n if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {\n // already pending\n factory.owners.push(owner);\n }\n\n if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n return factory.loadingComp\n }\n\n if (owner && !isDef(factory.owners)) {\n var owners = factory.owners = [owner];\n var sync = true;\n var timerLoading = null;\n var timerTimeout = null\n\n ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });\n\n var forceRender = function (renderCompleted) {\n for (var i = 0, l = owners.length; i < l; i++) {\n (owners[i]).$forceUpdate();\n }\n\n if (renderCompleted) {\n owners.length = 0;\n if (timerLoading !== null) {\n clearTimeout(timerLoading);\n timerLoading = null;\n }\n if (timerTimeout !== null) {\n clearTimeout(timerTimeout);\n timerTimeout = null;\n }\n }\n };\n\n var resolve = once(function (res) {\n // cache resolved\n factory.resolved = ensureCtor(res, baseCtor);\n // invoke callbacks only if this is not a synchronous resolve\n // (async resolves are shimmed as synchronous during SSR)\n if (!sync) {\n forceRender(true);\n } else {\n owners.length = 0;\n }\n });\n\n var reject = once(function (reason) {\n process.env.NODE_ENV !== 'production' && warn(\n \"Failed to resolve async component: \" + (String(factory)) +\n (reason ? (\"\\nReason: \" + reason) : '')\n );\n if (isDef(factory.errorComp)) {\n factory.error = true;\n forceRender(true);\n }\n });\n\n var res = factory(resolve, reject);\n\n if (isObject(res)) {\n if (isPromise(res)) {\n // () => Promise\n if (isUndef(factory.resolved)) {\n res.then(resolve, reject);\n }\n } else if (isPromise(res.component)) {\n res.component.then(resolve, reject);\n\n if (isDef(res.error)) {\n factory.errorComp = ensureCtor(res.error, baseCtor);\n }\n\n if (isDef(res.loading)) {\n factory.loadingComp = ensureCtor(res.loading, baseCtor);\n if (res.delay === 0) {\n factory.loading = true;\n } else {\n timerLoading = setTimeout(function () {\n timerLoading = null;\n if (isUndef(factory.resolved) && isUndef(factory.error)) {\n factory.loading = true;\n forceRender(false);\n }\n }, res.delay || 200);\n }\n }\n\n if (isDef(res.timeout)) {\n timerTimeout = setTimeout(function () {\n timerTimeout = null;\n if (isUndef(factory.resolved)) {\n reject(\n process.env.NODE_ENV !== 'production'\n ? (\"timeout (\" + (res.timeout) + \"ms)\")\n : null\n );\n }\n }, res.timeout);\n }\n }\n }\n\n sync = false;\n // return in case resolved synchronously\n return factory.loading\n ? factory.loadingComp\n : factory.resolved\n }\n}\n\n/* */\n\nfunction isAsyncPlaceholder (node) {\n return node.isComment && node.asyncFactory\n}\n\n/* */\n\nfunction getFirstComponentChild (children) {\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n var c = children[i];\n if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n return c\n }\n }\n }\n}\n\n/* */\n\n/* */\n\nfunction initEvents (vm) {\n vm._events = Object.create(null);\n vm._hasHookEvent = false;\n // init parent attached events\n var listeners = vm.$options._parentListeners;\n if (listeners) {\n updateComponentListeners(vm, listeners);\n }\n}\n\nvar target;\n\nfunction add (event, fn) {\n target.$on(event, fn);\n}\n\nfunction remove$1 (event, fn) {\n target.$off(event, fn);\n}\n\nfunction createOnceHandler (event, fn) {\n var _target = target;\n return function onceHandler () {\n var res = fn.apply(null, arguments);\n if (res !== null) {\n _target.$off(event, onceHandler);\n }\n }\n}\n\nfunction updateComponentListeners (\n vm,\n listeners,\n oldListeners\n) {\n target = vm;\n updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);\n target = undefined;\n}\n\nfunction eventsMixin (Vue) {\n var hookRE = /^hook:/;\n Vue.prototype.$on = function (event, fn) {\n var vm = this;\n if (Array.isArray(event)) {\n for (var i = 0, l = event.length; i < l; i++) {\n vm.$on(event[i], fn);\n }\n } else {\n (vm._events[event] || (vm._events[event] = [])).push(fn);\n // optimize hook:event cost by using a boolean flag marked at registration\n // instead of a hash lookup\n if (hookRE.test(event)) {\n vm._hasHookEvent = true;\n }\n }\n return vm\n };\n\n Vue.prototype.$once = function (event, fn) {\n var vm = this;\n function on () {\n vm.$off(event, on);\n fn.apply(vm, arguments);\n }\n on.fn = fn;\n vm.$on(event, on);\n return vm\n };\n\n Vue.prototype.$off = function (event, fn) {\n var vm = this;\n // all\n if (!arguments.length) {\n vm._events = Object.create(null);\n return vm\n }\n // array of events\n if (Array.isArray(event)) {\n for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {\n vm.$off(event[i$1], fn);\n }\n return vm\n }\n // specific event\n var cbs = vm._events[event];\n if (!cbs) {\n return vm\n }\n if (!fn) {\n vm._events[event] = null;\n return vm\n }\n // specific handler\n var cb;\n var i = cbs.length;\n while (i--) {\n cb = cbs[i];\n if (cb === fn || cb.fn === fn) {\n cbs.splice(i, 1);\n break\n }\n }\n return vm\n };\n\n Vue.prototype.$emit = function (event) {\n var vm = this;\n if (process.env.NODE_ENV !== 'production') {\n var lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n tip(\n \"Event \\\"\" + lowerCaseEvent + \"\\\" is emitted in component \" +\n (formatComponentName(vm)) + \" but the handler is registered for \\\"\" + event + \"\\\". \" +\n \"Note that HTML attributes are case-insensitive and you cannot use \" +\n \"v-on to listen to camelCase events when using in-DOM templates. \" +\n \"You should probably use \\\"\" + (hyphenate(event)) + \"\\\" instead of \\\"\" + event + \"\\\".\"\n );\n }\n }\n var cbs = vm._events[event];\n if (cbs) {\n cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n var args = toArray(arguments, 1);\n var info = \"event handler for \\\"\" + event + \"\\\"\";\n for (var i = 0, l = cbs.length; i < l; i++) {\n invokeWithErrorHandling(cbs[i], vm, args, vm, info);\n }\n }\n return vm\n };\n}\n\n/* */\n\nvar activeInstance = null;\nvar isUpdatingChildComponent = false;\n\nfunction setActiveInstance(vm) {\n var prevActiveInstance = activeInstance;\n activeInstance = vm;\n return function () {\n activeInstance = prevActiveInstance;\n }\n}\n\nfunction initLifecycle (vm) {\n var options = vm.$options;\n\n // locate first non-abstract parent\n var parent = options.parent;\n if (parent && !options.abstract) {\n while (parent.$options.abstract && parent.$parent) {\n parent = parent.$parent;\n }\n parent.$children.push(vm);\n }\n\n vm.$parent = parent;\n vm.$root = parent ? parent.$root : vm;\n\n vm.$children = [];\n vm.$refs = {};\n\n vm._watcher = null;\n vm._inactive = null;\n vm._directInactive = false;\n vm._isMounted = false;\n vm._isDestroyed = false;\n vm._isBeingDestroyed = false;\n}\n\nfunction lifecycleMixin (Vue) {\n Vue.prototype._update = function (vnode, hydrating) {\n var vm = this;\n var prevEl = vm.$el;\n var prevVnode = vm._vnode;\n var restoreActiveInstance = setActiveInstance(vm);\n vm._vnode = vnode;\n // Vue.prototype.__patch__ is injected in entry points\n // based on the rendering backend used.\n if (!prevVnode) {\n // initial render\n vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);\n } else {\n // updates\n vm.$el = vm.__patch__(prevVnode, vnode);\n }\n restoreActiveInstance();\n // update __vue__ reference\n if (prevEl) {\n prevEl.__vue__ = null;\n }\n if (vm.$el) {\n vm.$el.__vue__ = vm;\n }\n // if parent is an HOC, update its $el as well\n if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\n vm.$parent.$el = vm.$el;\n }\n // updated hook is called by the scheduler to ensure that children are\n // updated in a parent's updated hook.\n };\n\n Vue.prototype.$forceUpdate = function () {\n var vm = this;\n if (vm._watcher) {\n vm._watcher.update();\n }\n };\n\n Vue.prototype.$destroy = function () {\n var vm = this;\n if (vm._isBeingDestroyed) {\n return\n }\n callHook(vm, 'beforeDestroy');\n vm._isBeingDestroyed = true;\n // remove self from parent\n var parent = vm.$parent;\n if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n remove(parent.$children, vm);\n }\n // teardown watchers\n if (vm._watcher) {\n vm._watcher.teardown();\n }\n var i = vm._watchers.length;\n while (i--) {\n vm._watchers[i].teardown();\n }\n // remove reference from data ob\n // frozen object may not have observer.\n if (vm._data.__ob__) {\n vm._data.__ob__.vmCount--;\n }\n // call the last hook...\n vm._isDestroyed = true;\n // invoke destroy hooks on current rendered tree\n vm.__patch__(vm._vnode, null);\n // fire destroyed hook\n callHook(vm, 'destroyed');\n // turn off all instance listeners.\n vm.$off();\n // remove __vue__ reference\n if (vm.$el) {\n vm.$el.__vue__ = null;\n }\n // release circular reference (#6759)\n if (vm.$vnode) {\n vm.$vnode.parent = null;\n }\n };\n}\n\nfunction mountComponent (\n vm,\n el,\n hydrating\n) {\n vm.$el = el;\n if (!vm.$options.render) {\n vm.$options.render = createEmptyVNode;\n if (process.env.NODE_ENV !== 'production') {\n /* istanbul ignore if */\n if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n vm.$options.el || el) {\n warn(\n 'You are using the runtime-only build of Vue where the template ' +\n 'compiler is not available. Either pre-compile the templates into ' +\n 'render functions, or use the compiler-included build.',\n vm\n );\n } else {\n warn(\n 'Failed to mount component: template or render function not defined.',\n vm\n );\n }\n }\n }\n callHook(vm, 'beforeMount');\n\n var updateComponent;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n updateComponent = function () {\n var name = vm._name;\n var id = vm._uid;\n var startTag = \"vue-perf-start:\" + id;\n var endTag = \"vue-perf-end:\" + id;\n\n mark(startTag);\n var vnode = vm._render();\n mark(endTag);\n measure((\"vue \" + name + \" render\"), startTag, endTag);\n\n mark(startTag);\n vm._update(vnode, hydrating);\n mark(endTag);\n measure((\"vue \" + name + \" patch\"), startTag, endTag);\n };\n } else {\n updateComponent = function () {\n vm._update(vm._render(), hydrating);\n };\n }\n\n // we set this to vm._watcher inside the watcher's constructor\n // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n // component's mounted hook), which relies on vm._watcher being already defined\n new Watcher(vm, updateComponent, noop, {\n before: function before () {\n if (vm._isMounted && !vm._isDestroyed) {\n callHook(vm, 'beforeUpdate');\n }\n }\n }, true /* isRenderWatcher */);\n hydrating = false;\n\n // manually mounted instance, call mounted on self\n // mounted is called for render-created child components in its inserted hook\n if (vm.$vnode == null) {\n vm._isMounted = true;\n callHook(vm, 'mounted');\n }\n return vm\n}\n\nfunction updateChildComponent (\n vm,\n propsData,\n listeners,\n parentVnode,\n renderChildren\n) {\n if (process.env.NODE_ENV !== 'production') {\n isUpdatingChildComponent = true;\n }\n\n // determine whether component has slot children\n // we need to do this before overwriting $options._renderChildren.\n\n // check if there are dynamic scopedSlots (hand-written or compiled but with\n // dynamic slot names). Static scoped slots compiled from template has the\n // \"$stable\" marker.\n var newScopedSlots = parentVnode.data.scopedSlots;\n var oldScopedSlots = vm.$scopedSlots;\n var hasDynamicScopedSlot = !!(\n (newScopedSlots && !newScopedSlots.$stable) ||\n (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||\n (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)\n );\n\n // Any static slot children from the parent may have changed during parent's\n // update. Dynamic scoped slots may also have changed. In such cases, a forced\n // update is necessary to ensure correctness.\n var needsForceUpdate = !!(\n renderChildren || // has new static slots\n vm.$options._renderChildren || // has old static slots\n hasDynamicScopedSlot\n );\n\n vm.$options._parentVnode = parentVnode;\n vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n\n if (vm._vnode) { // update child tree's parent\n vm._vnode.parent = parentVnode;\n }\n vm.$options._renderChildren = renderChildren;\n\n // update $attrs and $listeners hash\n // these are also reactive so they may trigger child update if the child\n // used them during render\n vm.$attrs = parentVnode.data.attrs || emptyObject;\n vm.$listeners = listeners || emptyObject;\n\n // update props\n if (propsData && vm.$options.props) {\n toggleObserving(false);\n var props = vm._props;\n var propKeys = vm.$options._propKeys || [];\n for (var i = 0; i < propKeys.length; i++) {\n var key = propKeys[i];\n var propOptions = vm.$options.props; // wtf flow?\n props[key] = validateProp(key, propOptions, propsData, vm);\n }\n toggleObserving(true);\n // keep a copy of raw propsData\n vm.$options.propsData = propsData;\n }\n\n // update listeners\n listeners = listeners || emptyObject;\n var oldListeners = vm.$options._parentListeners;\n vm.$options._parentListeners = listeners;\n updateComponentListeners(vm, listeners, oldListeners);\n\n // resolve slots + force update if has children\n if (needsForceUpdate) {\n vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n vm.$forceUpdate();\n }\n\n if (process.env.NODE_ENV !== 'production') {\n isUpdatingChildComponent = false;\n }\n}\n\nfunction isInInactiveTree (vm) {\n while (vm && (vm = vm.$parent)) {\n if (vm._inactive) { return true }\n }\n return false\n}\n\nfunction activateChildComponent (vm, direct) {\n if (direct) {\n vm._directInactive = false;\n if (isInInactiveTree(vm)) {\n return\n }\n } else if (vm._directInactive) {\n return\n }\n if (vm._inactive || vm._inactive === null) {\n vm._inactive = false;\n for (var i = 0; i < vm.$children.length; i++) {\n activateChildComponent(vm.$children[i]);\n }\n callHook(vm, 'activated');\n }\n}\n\nfunction deactivateChildComponent (vm, direct) {\n if (direct) {\n vm._directInactive = true;\n if (isInInactiveTree(vm)) {\n return\n }\n }\n if (!vm._inactive) {\n vm._inactive = true;\n for (var i = 0; i < vm.$children.length; i++) {\n deactivateChildComponent(vm.$children[i]);\n }\n callHook(vm, 'deactivated');\n }\n}\n\nfunction callHook (vm, hook) {\n // #7573 disable dep collection when invoking lifecycle hooks\n pushTarget();\n var handlers = vm.$options[hook];\n var info = hook + \" hook\";\n if (handlers) {\n for (var i = 0, j = handlers.length; i < j; i++) {\n invokeWithErrorHandling(handlers[i], vm, null, vm, info);\n }\n }\n if (vm._hasHookEvent) {\n vm.$emit('hook:' + hook);\n }\n popTarget();\n}\n\n/* */\n\nvar MAX_UPDATE_COUNT = 100;\n\nvar queue = [];\nvar activatedChildren = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}\n\n// Async edge case #6566 requires saving the timestamp when event listeners are\n// attached. However, calling performance.now() has a perf overhead especially\n// if the page has thousands of event listeners. Instead, we take a timestamp\n// every time the scheduler flushes and use that for all event listeners\n// attached during that flush.\nvar currentFlushTimestamp = 0;\n\n// Async edge case fix requires storing an event listener's attach timestamp.\nvar getNow = Date.now;\n\n// Determine what event timestamp the browser is using. Annoyingly, the\n// timestamp can either be hi-res (relative to page load) or low-res\n// (relative to UNIX epoch), so in order to compare time we have to use the\n// same timestamp type when saving the flush timestamp.\n// All IE versions use low-res event timestamps, and have problematic clock\n// implementations (#9632)\nif (inBrowser && !isIE) {\n var performance = window.performance;\n if (\n performance &&\n typeof performance.now === 'function' &&\n getNow() > document.createEvent('Event').timeStamp\n ) {\n // if the event timestamp, although evaluated AFTER the Date.now(), is\n // smaller than it, it means the event is using a hi-res timestamp,\n // and we need to use the hi-res version for event listener timestamps as\n // well.\n getNow = function () { return performance.now(); };\n }\n}\n\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}\n\nfunction callUpdatedHooks (queue) {\n var i = queue.length;\n while (i--) {\n var watcher = queue[i];\n var vm = watcher.vm;\n if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {\n callHook(vm, 'updated');\n }\n }\n}\n\n/**\n * Queue a kept-alive component that was activated during patch.\n * The queue will be processed after the entire tree has been patched.\n */\nfunction queueActivatedComponent (vm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n vm._inactive = false;\n activatedChildren.push(vm);\n}\n\nfunction callActivatedHooks (queue) {\n for (var i = 0; i < queue.length; i++) {\n queue[i]._inactive = true;\n activateChildComponent(queue[i], true /* true */);\n }\n}\n\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (process.env.NODE_ENV !== 'production' && !config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}\n\n/* */\n\n\n\nvar uid$2 = 0;\n\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n */\nvar Watcher = function Watcher (\n vm,\n expOrFn,\n cb,\n options,\n isRenderWatcher\n) {\n this.vm = vm;\n if (isRenderWatcher) {\n vm._watcher = this;\n }\n vm._watchers.push(this);\n // options\n if (options) {\n this.deep = !!options.deep;\n this.user = !!options.user;\n this.lazy = !!options.lazy;\n this.sync = !!options.sync;\n this.before = options.before;\n } else {\n this.deep = this.user = this.lazy = this.sync = false;\n }\n this.cb = cb;\n this.id = ++uid$2; // uid for batching\n this.active = true;\n this.dirty = this.lazy; // for lazy watchers\n this.deps = [];\n this.newDeps = [];\n this.depIds = new _Set();\n this.newDepIds = new _Set();\n this.expression = process.env.NODE_ENV !== 'production'\n ? expOrFn.toString()\n : '';\n // parse expression for getter\n if (typeof expOrFn === 'function') {\n this.getter = expOrFn;\n } else {\n this.getter = parsePath(expOrFn);\n if (!this.getter) {\n this.getter = noop;\n process.env.NODE_ENV !== 'production' && warn(\n \"Failed watching path: \\\"\" + expOrFn + \"\\\" \" +\n 'Watcher only accepts simple dot-delimited paths. ' +\n 'For full control, use a function instead.',\n vm\n );\n }\n }\n this.value = this.lazy\n ? undefined\n : this.get();\n};\n\n/**\n * Evaluate the getter, and re-collect dependencies.\n */\nWatcher.prototype.get = function get () {\n pushTarget(this);\n var value;\n var vm = this.vm;\n try {\n value = this.getter.call(vm, vm);\n } catch (e) {\n if (this.user) {\n handleError(e, vm, (\"getter for watcher \\\"\" + (this.expression) + \"\\\"\"));\n } else {\n throw e\n }\n } finally {\n // \"touch\" every property so they are all tracked as\n // dependencies for deep watching\n if (this.deep) {\n traverse(value);\n }\n popTarget();\n this.cleanupDeps();\n }\n return value\n};\n\n/**\n * Add a dependency to this directive.\n */\nWatcher.prototype.addDep = function addDep (dep) {\n var id = dep.id;\n if (!this.newDepIds.has(id)) {\n this.newDepIds.add(id);\n this.newDeps.push(dep);\n if (!this.depIds.has(id)) {\n dep.addSub(this);\n }\n }\n};\n\n/**\n * Clean up for dependency collection.\n */\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\n var i = this.deps.length;\n while (i--) {\n var dep = this.deps[i];\n if (!this.newDepIds.has(dep.id)) {\n dep.removeSub(this);\n }\n }\n var tmp = this.depIds;\n this.depIds = this.newDepIds;\n this.newDepIds = tmp;\n this.newDepIds.clear();\n tmp = this.deps;\n this.deps = this.newDeps;\n this.newDeps = tmp;\n this.newDeps.length = 0;\n};\n\n/**\n * Subscriber interface.\n * Will be called when a dependency changes.\n */\nWatcher.prototype.update = function update () {\n /* istanbul ignore else */\n if (this.lazy) {\n this.dirty = true;\n } else if (this.sync) {\n this.run();\n } else {\n queueWatcher(this);\n }\n};\n\n/**\n * Scheduler job interface.\n * Will be called by the scheduler.\n */\nWatcher.prototype.run = function run () {\n if (this.active) {\n var value = this.get();\n if (\n value !== this.value ||\n // Deep watchers and watchers on Object/Arrays should fire even\n // when the value is the same, because the value may\n // have mutated.\n isObject(value) ||\n this.deep\n ) {\n // set new value\n var oldValue = this.value;\n this.value = value;\n if (this.user) {\n try {\n this.cb.call(this.vm, value, oldValue);\n } catch (e) {\n handleError(e, this.vm, (\"callback for watcher \\\"\" + (this.expression) + \"\\\"\"));\n }\n } else {\n this.cb.call(this.vm, value, oldValue);\n }\n }\n }\n};\n\n/**\n * Evaluate the value of the watcher.\n * This only gets called for lazy watchers.\n */\nWatcher.prototype.evaluate = function evaluate () {\n this.value = this.get();\n this.dirty = false;\n};\n\n/**\n * Depend on all deps collected by this watcher.\n */\nWatcher.prototype.depend = function depend () {\n var i = this.deps.length;\n while (i--) {\n this.deps[i].depend();\n }\n};\n\n/**\n * Remove self from all dependencies' subscriber list.\n */\nWatcher.prototype.teardown = function teardown () {\n if (this.active) {\n // remove self from vm's watcher list\n // this is a somewhat expensive operation so we skip it\n // if the vm is being destroyed.\n if (!this.vm._isBeingDestroyed) {\n remove(this.vm._watchers, this);\n }\n var i = this.deps.length;\n while (i--) {\n this.deps[i].removeSub(this);\n }\n this.active = false;\n }\n};\n\n/* */\n\nvar sharedPropertyDefinition = {\n enumerable: true,\n configurable: true,\n get: noop,\n set: noop\n};\n\nfunction proxy (target, sourceKey, key) {\n sharedPropertyDefinition.get = function proxyGetter () {\n return this[sourceKey][key]\n };\n sharedPropertyDefinition.set = function proxySetter (val) {\n this[sourceKey][key] = val;\n };\n Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction initState (vm) {\n vm._watchers = [];\n var opts = vm.$options;\n if (opts.props) { initProps(vm, opts.props); }\n if (opts.methods) { initMethods(vm, opts.methods); }\n if (opts.data) {\n initData(vm);\n } else {\n observe(vm._data = {}, true /* asRootData */);\n }\n if (opts.computed) { initComputed(vm, opts.computed); }\n if (opts.watch && opts.watch !== nativeWatch) {\n initWatch(vm, opts.watch);\n }\n}\n\nfunction initProps (vm, propsOptions) {\n var propsData = vm.$options.propsData || {};\n var props = vm._props = {};\n // cache prop keys so that future props updates can iterate using Array\n // instead of dynamic object key enumeration.\n var keys = vm.$options._propKeys = [];\n var isRoot = !vm.$parent;\n // root instance props should be converted\n if (!isRoot) {\n toggleObserving(false);\n }\n var loop = function ( key ) {\n keys.push(key);\n var value = validateProp(key, propsOptions, propsData, vm);\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n var hyphenatedKey = hyphenate(key);\n if (isReservedAttribute(hyphenatedKey) ||\n config.isReservedAttr(hyphenatedKey)) {\n warn(\n (\"\\\"\" + hyphenatedKey + \"\\\" is a reserved attribute and cannot be used as component prop.\"),\n vm\n );\n }\n defineReactive$$1(props, key, value, function () {\n if (!isRoot && !isUpdatingChildComponent) {\n warn(\n \"Avoid mutating a prop directly since the value will be \" +\n \"overwritten whenever the parent component re-renders. \" +\n \"Instead, use a data or computed property based on the prop's \" +\n \"value. Prop being mutated: \\\"\" + key + \"\\\"\",\n vm\n );\n }\n });\n } else {\n defineReactive$$1(props, key, value);\n }\n // static props are already proxied on the component's prototype\n // during Vue.extend(). We only need to proxy props defined at\n // instantiation here.\n if (!(key in vm)) {\n proxy(vm, \"_props\", key);\n }\n };\n\n for (var key in propsOptions) loop( key );\n toggleObserving(true);\n}\n\nfunction initData (vm) {\n var data = vm.$options.data;\n data = vm._data = typeof data === 'function'\n ? getData(data, vm)\n : data || {};\n if (!isPlainObject(data)) {\n data = {};\n process.env.NODE_ENV !== 'production' && warn(\n 'data functions should return an object:\\n' +\n 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\n vm\n );\n }\n // proxy data on instance\n var keys = Object.keys(data);\n var props = vm.$options.props;\n var methods = vm.$options.methods;\n var i = keys.length;\n while (i--) {\n var key = keys[i];\n if (process.env.NODE_ENV !== 'production') {\n if (methods && hasOwn(methods, key)) {\n warn(\n (\"Method \\\"\" + key + \"\\\" has already been defined as a data property.\"),\n vm\n );\n }\n }\n if (props && hasOwn(props, key)) {\n process.env.NODE_ENV !== 'production' && warn(\n \"The data property \\\"\" + key + \"\\\" is already declared as a prop. \" +\n \"Use prop default value instead.\",\n vm\n );\n } else if (!isReserved(key)) {\n proxy(vm, \"_data\", key);\n }\n }\n // observe data\n observe(data, true /* asRootData */);\n}\n\nfunction getData (data, vm) {\n // #7573 disable dep collection when invoking data getters\n pushTarget();\n try {\n return data.call(vm, vm)\n } catch (e) {\n handleError(e, vm, \"data()\");\n return {}\n } finally {\n popTarget();\n }\n}\n\nvar computedWatcherOptions = { lazy: true };\n\nfunction initComputed (vm, computed) {\n // $flow-disable-line\n var watchers = vm._computedWatchers = Object.create(null);\n // computed properties are just getters during SSR\n var isSSR = isServerRendering();\n\n for (var key in computed) {\n var userDef = computed[key];\n var getter = typeof userDef === 'function' ? userDef : userDef.get;\n if (process.env.NODE_ENV !== 'production' && getter == null) {\n warn(\n (\"Getter is missing for computed property \\\"\" + key + \"\\\".\"),\n vm\n );\n }\n\n if (!isSSR) {\n // create internal watcher for the computed property.\n watchers[key] = new Watcher(\n vm,\n getter || noop,\n noop,\n computedWatcherOptions\n );\n }\n\n // component-defined computed properties are already defined on the\n // component prototype. We only need to define computed properties defined\n // at instantiation here.\n if (!(key in vm)) {\n defineComputed(vm, key, userDef);\n } else if (process.env.NODE_ENV !== 'production') {\n if (key in vm.$data) {\n warn((\"The computed property \\\"\" + key + \"\\\" is already defined in data.\"), vm);\n } else if (vm.$options.props && key in vm.$options.props) {\n warn((\"The computed property \\\"\" + key + \"\\\" is already defined as a prop.\"), vm);\n }\n }\n }\n}\n\nfunction defineComputed (\n target,\n key,\n userDef\n) {\n var shouldCache = !isServerRendering();\n if (typeof userDef === 'function') {\n sharedPropertyDefinition.get = shouldCache\n ? createComputedGetter(key)\n : createGetterInvoker(userDef);\n sharedPropertyDefinition.set = noop;\n } else {\n sharedPropertyDefinition.get = userDef.get\n ? shouldCache && userDef.cache !== false\n ? createComputedGetter(key)\n : createGetterInvoker(userDef.get)\n : noop;\n sharedPropertyDefinition.set = userDef.set || noop;\n }\n if (process.env.NODE_ENV !== 'production' &&\n sharedPropertyDefinition.set === noop) {\n sharedPropertyDefinition.set = function () {\n warn(\n (\"Computed property \\\"\" + key + \"\\\" was assigned to but it has no setter.\"),\n this\n );\n };\n }\n Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction createComputedGetter (key) {\n return function computedGetter () {\n var watcher = this._computedWatchers && this._computedWatchers[key];\n if (watcher) {\n if (watcher.dirty) {\n watcher.evaluate();\n }\n if (Dep.target) {\n watcher.depend();\n }\n return watcher.value\n }\n }\n}\n\nfunction createGetterInvoker(fn) {\n return function computedGetter () {\n return fn.call(this, this)\n }\n}\n\nfunction initMethods (vm, methods) {\n var props = vm.$options.props;\n for (var key in methods) {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof methods[key] !== 'function') {\n warn(\n \"Method \\\"\" + key + \"\\\" has type \\\"\" + (typeof methods[key]) + \"\\\" in the component definition. \" +\n \"Did you reference the function correctly?\",\n vm\n );\n }\n if (props && hasOwn(props, key)) {\n warn(\n (\"Method \\\"\" + key + \"\\\" has already been defined as a prop.\"),\n vm\n );\n }\n if ((key in vm) && isReserved(key)) {\n warn(\n \"Method \\\"\" + key + \"\\\" conflicts with an existing Vue instance method. \" +\n \"Avoid defining component methods that start with _ or $.\"\n );\n }\n }\n vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);\n }\n}\n\nfunction initWatch (vm, watch) {\n for (var key in watch) {\n var handler = watch[key];\n if (Array.isArray(handler)) {\n for (var i = 0; i < handler.length; i++) {\n createWatcher(vm, key, handler[i]);\n }\n } else {\n createWatcher(vm, key, handler);\n }\n }\n}\n\nfunction createWatcher (\n vm,\n expOrFn,\n handler,\n options\n) {\n if (isPlainObject(handler)) {\n options = handler;\n handler = handler.handler;\n }\n if (typeof handler === 'string') {\n handler = vm[handler];\n }\n return vm.$watch(expOrFn, handler, options)\n}\n\nfunction stateMixin (Vue) {\n // flow somehow has problems with directly declared definition object\n // when using Object.defineProperty, so we have to procedurally build up\n // the object here.\n var dataDef = {};\n dataDef.get = function () { return this._data };\n var propsDef = {};\n propsDef.get = function () { return this._props };\n if (process.env.NODE_ENV !== 'production') {\n dataDef.set = function () {\n warn(\n 'Avoid replacing instance root $data. ' +\n 'Use nested data properties instead.',\n this\n );\n };\n propsDef.set = function () {\n warn(\"$props is readonly.\", this);\n };\n }\n Object.defineProperty(Vue.prototype, '$data', dataDef);\n Object.defineProperty(Vue.prototype, '$props', propsDef);\n\n Vue.prototype.$set = set;\n Vue.prototype.$delete = del;\n\n Vue.prototype.$watch = function (\n expOrFn,\n cb,\n options\n ) {\n var vm = this;\n if (isPlainObject(cb)) {\n return createWatcher(vm, expOrFn, cb, options)\n }\n options = options || {};\n options.user = true;\n var watcher = new Watcher(vm, expOrFn, cb, options);\n if (options.immediate) {\n try {\n cb.call(vm, watcher.value);\n } catch (error) {\n handleError(error, vm, (\"callback for immediate watcher \\\"\" + (watcher.expression) + \"\\\"\"));\n }\n }\n return function unwatchFn () {\n watcher.teardown();\n }\n };\n}\n\n/* */\n\nvar uid$3 = 0;\n\nfunction initMixin (Vue) {\n Vue.prototype._init = function (options) {\n var vm = this;\n // a uid\n vm._uid = uid$3++;\n\n var startTag, endTag;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n startTag = \"vue-perf-start:\" + (vm._uid);\n endTag = \"vue-perf-end:\" + (vm._uid);\n mark(startTag);\n }\n\n // a flag to avoid this being observed\n vm._isVue = true;\n // merge options\n if (options && options._isComponent) {\n // optimize internal component instantiation\n // since dynamic options merging is pretty slow, and none of the\n // internal component options needs special treatment.\n initInternalComponent(vm, options);\n } else {\n vm.$options = mergeOptions(\n resolveConstructorOptions(vm.constructor),\n options || {},\n vm\n );\n }\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n initProxy(vm);\n } else {\n vm._renderProxy = vm;\n }\n // expose real self\n vm._self = vm;\n initLifecycle(vm);\n initEvents(vm);\n initRender(vm);\n callHook(vm, 'beforeCreate');\n initInjections(vm); // resolve injections before data/props\n initState(vm);\n initProvide(vm); // resolve provide after data/props\n callHook(vm, 'created');\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n vm._name = formatComponentName(vm, false);\n mark(endTag);\n measure((\"vue \" + (vm._name) + \" init\"), startTag, endTag);\n }\n\n if (vm.$options.el) {\n vm.$mount(vm.$options.el);\n }\n };\n}\n\nfunction initInternalComponent (vm, options) {\n var opts = vm.$options = Object.create(vm.constructor.options);\n // doing this because it's faster than dynamic enumeration.\n var parentVnode = options._parentVnode;\n opts.parent = options.parent;\n opts._parentVnode = parentVnode;\n\n var vnodeComponentOptions = parentVnode.componentOptions;\n opts.propsData = vnodeComponentOptions.propsData;\n opts._parentListeners = vnodeComponentOptions.listeners;\n opts._renderChildren = vnodeComponentOptions.children;\n opts._componentTag = vnodeComponentOptions.tag;\n\n if (options.render) {\n opts.render = options.render;\n opts.staticRenderFns = options.staticRenderFns;\n }\n}\n\nfunction resolveConstructorOptions (Ctor) {\n var options = Ctor.options;\n if (Ctor.super) {\n var superOptions = resolveConstructorOptions(Ctor.super);\n var cachedSuperOptions = Ctor.superOptions;\n if (superOptions !== cachedSuperOptions) {\n // super option changed,\n // need to resolve new options.\n Ctor.superOptions = superOptions;\n // check if there are any late-modified/attached options (#4976)\n var modifiedOptions = resolveModifiedOptions(Ctor);\n // update base extend options\n if (modifiedOptions) {\n extend(Ctor.extendOptions, modifiedOptions);\n }\n options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n if (options.name) {\n options.components[options.name] = Ctor;\n }\n }\n }\n return options\n}\n\nfunction resolveModifiedOptions (Ctor) {\n var modified;\n var latest = Ctor.options;\n var sealed = Ctor.sealedOptions;\n for (var key in latest) {\n if (latest[key] !== sealed[key]) {\n if (!modified) { modified = {}; }\n modified[key] = latest[key];\n }\n }\n return modified\n}\n\nfunction Vue (options) {\n if (process.env.NODE_ENV !== 'production' &&\n !(this instanceof Vue)\n ) {\n warn('Vue is a constructor and should be called with the `new` keyword');\n }\n this._init(options);\n}\n\ninitMixin(Vue);\nstateMixin(Vue);\neventsMixin(Vue);\nlifecycleMixin(Vue);\nrenderMixin(Vue);\n\n/* */\n\nfunction initUse (Vue) {\n Vue.use = function (plugin) {\n var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));\n if (installedPlugins.indexOf(plugin) > -1) {\n return this\n }\n\n // additional parameters\n var args = toArray(arguments, 1);\n args.unshift(this);\n if (typeof plugin.install === 'function') {\n plugin.install.apply(plugin, args);\n } else if (typeof plugin === 'function') {\n plugin.apply(null, args);\n }\n installedPlugins.push(plugin);\n return this\n };\n}\n\n/* */\n\nfunction initMixin$1 (Vue) {\n Vue.mixin = function (mixin) {\n this.options = mergeOptions(this.options, mixin);\n return this\n };\n}\n\n/* */\n\nfunction initExtend (Vue) {\n /**\n * Each instance constructor, including Vue, has a unique\n * cid. This enables us to create wrapped \"child\n * constructors\" for prototypal inheritance and cache them.\n */\n Vue.cid = 0;\n var cid = 1;\n\n /**\n * Class inheritance\n */\n Vue.extend = function (extendOptions) {\n extendOptions = extendOptions || {};\n var Super = this;\n var SuperId = Super.cid;\n var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n if (cachedCtors[SuperId]) {\n return cachedCtors[SuperId]\n }\n\n var name = extendOptions.name || Super.options.name;\n if (process.env.NODE_ENV !== 'production' && name) {\n validateComponentName(name);\n }\n\n var Sub = function VueComponent (options) {\n this._init(options);\n };\n Sub.prototype = Object.create(Super.prototype);\n Sub.prototype.constructor = Sub;\n Sub.cid = cid++;\n Sub.options = mergeOptions(\n Super.options,\n extendOptions\n );\n Sub['super'] = Super;\n\n // For props and computed properties, we define the proxy getters on\n // the Vue instances at extension time, on the extended prototype. This\n // avoids Object.defineProperty calls for each instance created.\n if (Sub.options.props) {\n initProps$1(Sub);\n }\n if (Sub.options.computed) {\n initComputed$1(Sub);\n }\n\n // allow further extension/mixin/plugin usage\n Sub.extend = Super.extend;\n Sub.mixin = Super.mixin;\n Sub.use = Super.use;\n\n // create asset registers, so extended classes\n // can have their private assets too.\n ASSET_TYPES.forEach(function (type) {\n Sub[type] = Super[type];\n });\n // enable recursive self-lookup\n if (name) {\n Sub.options.components[name] = Sub;\n }\n\n // keep a reference to the super options at extension time.\n // later at instantiation we can check if Super's options have\n // been updated.\n Sub.superOptions = Super.options;\n Sub.extendOptions = extendOptions;\n Sub.sealedOptions = extend({}, Sub.options);\n\n // cache constructor\n cachedCtors[SuperId] = Sub;\n return Sub\n };\n}\n\nfunction initProps$1 (Comp) {\n var props = Comp.options.props;\n for (var key in props) {\n proxy(Comp.prototype, \"_props\", key);\n }\n}\n\nfunction initComputed$1 (Comp) {\n var computed = Comp.options.computed;\n for (var key in computed) {\n defineComputed(Comp.prototype, key, computed[key]);\n }\n}\n\n/* */\n\nfunction initAssetRegisters (Vue) {\n /**\n * Create asset registration methods.\n */\n ASSET_TYPES.forEach(function (type) {\n Vue[type] = function (\n id,\n definition\n ) {\n if (!definition) {\n return this.options[type + 's'][id]\n } else {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && type === 'component') {\n validateComponentName(id);\n }\n if (type === 'component' && isPlainObject(definition)) {\n definition.name = definition.name || id;\n definition = this.options._base.extend(definition);\n }\n if (type === 'directive' && typeof definition === 'function') {\n definition = { bind: definition, update: definition };\n }\n this.options[type + 's'][id] = definition;\n return definition\n }\n };\n });\n}\n\n/* */\n\n\n\nfunction getComponentName (opts) {\n return opts && (opts.Ctor.options.name || opts.tag)\n}\n\nfunction matches (pattern, name) {\n if (Array.isArray(pattern)) {\n return pattern.indexOf(name) > -1\n } else if (typeof pattern === 'string') {\n return pattern.split(',').indexOf(name) > -1\n } else if (isRegExp(pattern)) {\n return pattern.test(name)\n }\n /* istanbul ignore next */\n return false\n}\n\nfunction pruneCache (keepAliveInstance, filter) {\n var cache = keepAliveInstance.cache;\n var keys = keepAliveInstance.keys;\n var _vnode = keepAliveInstance._vnode;\n for (var key in cache) {\n var cachedNode = cache[key];\n if (cachedNode) {\n var name = getComponentName(cachedNode.componentOptions);\n if (name && !filter(name)) {\n pruneCacheEntry(cache, key, keys, _vnode);\n }\n }\n }\n}\n\nfunction pruneCacheEntry (\n cache,\n key,\n keys,\n current\n) {\n var cached$$1 = cache[key];\n if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {\n cached$$1.componentInstance.$destroy();\n }\n cache[key] = null;\n remove(keys, key);\n}\n\nvar patternTypes = [String, RegExp, Array];\n\nvar KeepAlive = {\n name: 'keep-alive',\n abstract: true,\n\n props: {\n include: patternTypes,\n exclude: patternTypes,\n max: [String, Number]\n },\n\n created: function created () {\n this.cache = Object.create(null);\n this.keys = [];\n },\n\n destroyed: function destroyed () {\n for (var key in this.cache) {\n pruneCacheEntry(this.cache, key, this.keys);\n }\n },\n\n mounted: function mounted () {\n var this$1 = this;\n\n this.$watch('include', function (val) {\n pruneCache(this$1, function (name) { return matches(val, name); });\n });\n this.$watch('exclude', function (val) {\n pruneCache(this$1, function (name) { return !matches(val, name); });\n });\n },\n\n render: function render () {\n var slot = this.$slots.default;\n var vnode = getFirstComponentChild(slot);\n var componentOptions = vnode && vnode.componentOptions;\n if (componentOptions) {\n // check pattern\n var name = getComponentName(componentOptions);\n var ref = this;\n var include = ref.include;\n var exclude = ref.exclude;\n if (\n // not included\n (include && (!name || !matches(include, name))) ||\n // excluded\n (exclude && name && matches(exclude, name))\n ) {\n return vnode\n }\n\n var ref$1 = this;\n var cache = ref$1.cache;\n var keys = ref$1.keys;\n var key = vnode.key == null\n // same constructor may get registered as different local components\n // so cid alone is not enough (#3269)\n ? componentOptions.Ctor.cid + (componentOptions.tag ? (\"::\" + (componentOptions.tag)) : '')\n : vnode.key;\n if (cache[key]) {\n vnode.componentInstance = cache[key].componentInstance;\n // make current key freshest\n remove(keys, key);\n keys.push(key);\n } else {\n cache[key] = vnode;\n keys.push(key);\n // prune oldest entry\n if (this.max && keys.length > parseInt(this.max)) {\n pruneCacheEntry(cache, keys[0], keys, this._vnode);\n }\n }\n\n vnode.data.keepAlive = true;\n }\n return vnode || (slot && slot[0])\n }\n};\n\nvar builtInComponents = {\n KeepAlive: KeepAlive\n};\n\n/* */\n\nfunction initGlobalAPI (Vue) {\n // config\n var configDef = {};\n configDef.get = function () { return config; };\n if (process.env.NODE_ENV !== 'production') {\n configDef.set = function () {\n warn(\n 'Do not replace the Vue.config object, set individual fields instead.'\n );\n };\n }\n Object.defineProperty(Vue, 'config', configDef);\n\n // exposed util methods.\n // NOTE: these are not considered part of the public API - avoid relying on\n // them unless you are aware of the risk.\n Vue.util = {\n warn: warn,\n extend: extend,\n mergeOptions: mergeOptions,\n defineReactive: defineReactive$$1\n };\n\n Vue.set = set;\n Vue.delete = del;\n Vue.nextTick = nextTick;\n\n // 2.6 explicit observable API\n Vue.observable = function (obj) {\n observe(obj);\n return obj\n };\n\n Vue.options = Object.create(null);\n ASSET_TYPES.forEach(function (type) {\n Vue.options[type + 's'] = Object.create(null);\n });\n\n // this is used to identify the \"base\" constructor to extend all plain-object\n // components with in Weex's multi-instance scenarios.\n Vue.options._base = Vue;\n\n extend(Vue.options.components, builtInComponents);\n\n initUse(Vue);\n initMixin$1(Vue);\n initExtend(Vue);\n initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue);\n\nObject.defineProperty(Vue.prototype, '$isServer', {\n get: isServerRendering\n});\n\nObject.defineProperty(Vue.prototype, '$ssrContext', {\n get: function get () {\n /* istanbul ignore next */\n return this.$vnode && this.$vnode.ssrContext\n }\n});\n\n// expose FunctionalRenderContext for ssr runtime helper installation\nObject.defineProperty(Vue, 'FunctionalRenderContext', {\n value: FunctionalRenderContext\n});\n\nVue.version = '2.6.10';\n\n/* */\n\n// these are reserved for web because they are directly compiled away\n// during template compilation\nvar isReservedAttr = makeMap('style,class');\n\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select,progress');\nvar mustUseProp = function (tag, type, attr) {\n return (\n (attr === 'value' && acceptValue(tag)) && type !== 'button' ||\n (attr === 'selected' && tag === 'option') ||\n (attr === 'checked' && tag === 'input') ||\n (attr === 'muted' && tag === 'video')\n )\n};\n\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n\nvar isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');\n\nvar convertEnumeratedValue = function (key, value) {\n return isFalsyAttrValue(value) || value === 'false'\n ? 'false'\n // allow arbitrary string value for contenteditable\n : key === 'contenteditable' && isValidContentEditableValue(value)\n ? value\n : 'true'\n};\n\nvar isBooleanAttr = makeMap(\n 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n 'required,reversed,scoped,seamless,selected,sortable,translate,' +\n 'truespeed,typemustmatch,visible'\n);\n\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\n\nvar isXlink = function (name) {\n return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'\n};\n\nvar getXlinkProp = function (name) {\n return isXlink(name) ? name.slice(6, name.length) : ''\n};\n\nvar isFalsyAttrValue = function (val) {\n return val == null || val === false\n};\n\n/* */\n\nfunction genClassForVnode (vnode) {\n var data = vnode.data;\n var parentNode = vnode;\n var childNode = vnode;\n while (isDef(childNode.componentInstance)) {\n childNode = childNode.componentInstance._vnode;\n if (childNode && childNode.data) {\n data = mergeClassData(childNode.data, data);\n }\n }\n while (isDef(parentNode = parentNode.parent)) {\n if (parentNode && parentNode.data) {\n data = mergeClassData(data, parentNode.data);\n }\n }\n return renderClass(data.staticClass, data.class)\n}\n\nfunction mergeClassData (child, parent) {\n return {\n staticClass: concat(child.staticClass, parent.staticClass),\n class: isDef(child.class)\n ? [child.class, parent.class]\n : parent.class\n }\n}\n\nfunction renderClass (\n staticClass,\n dynamicClass\n) {\n if (isDef(staticClass) || isDef(dynamicClass)) {\n return concat(staticClass, stringifyClass(dynamicClass))\n }\n /* istanbul ignore next */\n return ''\n}\n\nfunction concat (a, b) {\n return a ? b ? (a + ' ' + b) : a : (b || '')\n}\n\nfunction stringifyClass (value) {\n if (Array.isArray(value)) {\n return stringifyArray(value)\n }\n if (isObject(value)) {\n return stringifyObject(value)\n }\n if (typeof value === 'string') {\n return value\n }\n /* istanbul ignore next */\n return ''\n}\n\nfunction stringifyArray (value) {\n var res = '';\n var stringified;\n for (var i = 0, l = value.length; i < l; i++) {\n if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {\n if (res) { res += ' '; }\n res += stringified;\n }\n }\n return res\n}\n\nfunction stringifyObject (value) {\n var res = '';\n for (var key in value) {\n if (value[key]) {\n if (res) { res += ' '; }\n res += key;\n }\n }\n return res\n}\n\n/* */\n\nvar namespaceMap = {\n svg: 'http://www.w3.org/2000/svg',\n math: 'http://www.w3.org/1998/Math/MathML'\n};\n\nvar isHTMLTag = makeMap(\n 'html,body,base,head,link,meta,style,title,' +\n 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +\n 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n 'embed,object,param,source,canvas,script,noscript,del,ins,' +\n 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n 'output,progress,select,textarea,' +\n 'details,dialog,menu,menuitem,summary,' +\n 'content,element,shadow,template,blockquote,iframe,tfoot'\n);\n\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap(\n 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',\n true\n);\n\nvar isReservedTag = function (tag) {\n return isHTMLTag(tag) || isSVG(tag)\n};\n\nfunction getTagNamespace (tag) {\n if (isSVG(tag)) {\n return 'svg'\n }\n // basic support for MathML\n // note it doesn't support other MathML elements being component roots\n if (tag === 'math') {\n return 'math'\n }\n}\n\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement (tag) {\n /* istanbul ignore if */\n if (!inBrowser) {\n return true\n }\n if (isReservedTag(tag)) {\n return false\n }\n tag = tag.toLowerCase();\n /* istanbul ignore if */\n if (unknownElementCache[tag] != null) {\n return unknownElementCache[tag]\n }\n var el = document.createElement(tag);\n if (tag.indexOf('-') > -1) {\n // http://stackoverflow.com/a/28210364/1070244\n return (unknownElementCache[tag] = (\n el.constructor === window.HTMLUnknownElement ||\n el.constructor === window.HTMLElement\n ))\n } else {\n return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))\n }\n}\n\nvar isTextInputType = makeMap('text,number,password,search,email,tel,url');\n\n/* */\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}\n\n/* */\n\nfunction createElement$1 (tagName, vnode) {\n var elm = document.createElement(tagName);\n if (tagName !== 'select') {\n return elm\n }\n // false or null will remove the attribute but undefined will not\n if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {\n elm.setAttribute('multiple', 'multiple');\n }\n return elm\n}\n\nfunction createElementNS (namespace, tagName) {\n return document.createElementNS(namespaceMap[namespace], tagName)\n}\n\nfunction createTextNode (text) {\n return document.createTextNode(text)\n}\n\nfunction createComment (text) {\n return document.createComment(text)\n}\n\nfunction insertBefore (parentNode, newNode, referenceNode) {\n parentNode.insertBefore(newNode, referenceNode);\n}\n\nfunction removeChild (node, child) {\n node.removeChild(child);\n}\n\nfunction appendChild (node, child) {\n node.appendChild(child);\n}\n\nfunction parentNode (node) {\n return node.parentNode\n}\n\nfunction nextSibling (node) {\n return node.nextSibling\n}\n\nfunction tagName (node) {\n return node.tagName\n}\n\nfunction setTextContent (node, text) {\n node.textContent = text;\n}\n\nfunction setStyleScope (node, scopeId) {\n node.setAttribute(scopeId, '');\n}\n\nvar nodeOps = /*#__PURE__*/Object.freeze({\n createElement: createElement$1,\n createElementNS: createElementNS,\n createTextNode: createTextNode,\n createComment: createComment,\n insertBefore: insertBefore,\n removeChild: removeChild,\n appendChild: appendChild,\n parentNode: parentNode,\n nextSibling: nextSibling,\n tagName: tagName,\n setTextContent: setTextContent,\n setStyleScope: setStyleScope\n});\n\n/* */\n\nvar ref = {\n create: function create (_, vnode) {\n registerRef(vnode);\n },\n update: function update (oldVnode, vnode) {\n if (oldVnode.data.ref !== vnode.data.ref) {\n registerRef(oldVnode, true);\n registerRef(vnode);\n }\n },\n destroy: function destroy (vnode) {\n registerRef(vnode, true);\n }\n};\n\nfunction registerRef (vnode, isRemoval) {\n var key = vnode.data.ref;\n if (!isDef(key)) { return }\n\n var vm = vnode.context;\n var ref = vnode.componentInstance || vnode.elm;\n var refs = vm.$refs;\n if (isRemoval) {\n if (Array.isArray(refs[key])) {\n remove(refs[key], ref);\n } else if (refs[key] === ref) {\n refs[key] = undefined;\n }\n } else {\n if (vnode.data.refInFor) {\n if (!Array.isArray(refs[key])) {\n refs[key] = [ref];\n } else if (refs[key].indexOf(ref) < 0) {\n // $flow-disable-line\n refs[key].push(ref);\n }\n } else {\n refs[key] = ref;\n }\n }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\n\nvar emptyNode = new VNode('', {}, []);\n\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n\nfunction sameVnode (a, b) {\n return (\n a.key === b.key && (\n (\n a.tag === b.tag &&\n a.isComment === b.isComment &&\n isDef(a.data) === isDef(b.data) &&\n sameInputType(a, b)\n ) || (\n isTrue(a.isAsyncPlaceholder) &&\n a.asyncFactory === b.asyncFactory &&\n isUndef(b.asyncFactory.error)\n )\n )\n )\n}\n\nfunction sameInputType (a, b) {\n if (a.tag !== 'input') { return true }\n var i;\n var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;\n var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;\n return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)\n}\n\nfunction createKeyToOldIdx (children, beginIdx, endIdx) {\n var i, key;\n var map = {};\n for (i = beginIdx; i <= endIdx; ++i) {\n key = children[i].key;\n if (isDef(key)) { map[key] = i; }\n }\n return map\n}\n\nfunction createPatchFunction (backend) {\n var i, j;\n var cbs = {};\n\n var modules = backend.modules;\n var nodeOps = backend.nodeOps;\n\n for (i = 0; i < hooks.length; ++i) {\n cbs[hooks[i]] = [];\n for (j = 0; j < modules.length; ++j) {\n if (isDef(modules[j][hooks[i]])) {\n cbs[hooks[i]].push(modules[j][hooks[i]]);\n }\n }\n }\n\n function emptyNodeAt (elm) {\n return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)\n }\n\n function createRmCb (childElm, listeners) {\n function remove$$1 () {\n if (--remove$$1.listeners === 0) {\n removeNode(childElm);\n }\n }\n remove$$1.listeners = listeners;\n return remove$$1\n }\n\n function removeNode (el) {\n var parent = nodeOps.parentNode(el);\n // element may have already been removed due to v-html / v-text\n if (isDef(parent)) {\n nodeOps.removeChild(parent, el);\n }\n }\n\n function isUnknownElement$$1 (vnode, inVPre) {\n return (\n !inVPre &&\n !vnode.ns &&\n !(\n config.ignoredElements.length &&\n config.ignoredElements.some(function (ignore) {\n return isRegExp(ignore)\n ? ignore.test(vnode.tag)\n : ignore === vnode.tag\n })\n ) &&\n config.isUnknownElement(vnode.tag)\n )\n }\n\n var creatingElmInVPre = 0;\n\n function createElm (\n vnode,\n insertedVnodeQueue,\n parentElm,\n refElm,\n nested,\n ownerArray,\n index\n ) {\n if (isDef(vnode.elm) && isDef(ownerArray)) {\n // This vnode was used in a previous render!\n // now it's used as a new node, overwriting its elm would cause\n // potential patch errors down the road when it's used as an insertion\n // reference node. Instead, we clone the node on-demand before creating\n // associated DOM element for it.\n vnode = ownerArray[index] = cloneVNode(vnode);\n }\n\n vnode.isRootInsert = !nested; // for transition enter check\n if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n return\n }\n\n var data = vnode.data;\n var children = vnode.children;\n var tag = vnode.tag;\n if (isDef(tag)) {\n if (process.env.NODE_ENV !== 'production') {\n if (data && data.pre) {\n creatingElmInVPre++;\n }\n if (isUnknownElement$$1(vnode, creatingElmInVPre)) {\n warn(\n 'Unknown custom element: <' + tag + '> - did you ' +\n 'register the component correctly? For recursive components, ' +\n 'make sure to provide the \"name\" option.',\n vnode.context\n );\n }\n }\n\n vnode.elm = vnode.ns\n ? nodeOps.createElementNS(vnode.ns, tag)\n : nodeOps.createElement(tag, vnode);\n setScope(vnode);\n\n /* istanbul ignore if */\n {\n createChildren(vnode, children, insertedVnodeQueue);\n if (isDef(data)) {\n invokeCreateHooks(vnode, insertedVnodeQueue);\n }\n insert(parentElm, vnode.elm, refElm);\n }\n\n if (process.env.NODE_ENV !== 'production' && data && data.pre) {\n creatingElmInVPre--;\n }\n } else if (isTrue(vnode.isComment)) {\n vnode.elm = nodeOps.createComment(vnode.text);\n insert(parentElm, vnode.elm, refElm);\n } else {\n vnode.elm = nodeOps.createTextNode(vnode.text);\n insert(parentElm, vnode.elm, refElm);\n }\n }\n\n function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n var i = vnode.data;\n if (isDef(i)) {\n var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n if (isDef(i = i.hook) && isDef(i = i.init)) {\n i(vnode, false /* hydrating */);\n }\n // after calling the init hook, if the vnode is a child component\n // it should've created a child instance and mounted it. the child\n // component also has set the placeholder vnode's elm.\n // in that case we can just return the element and be done.\n if (isDef(vnode.componentInstance)) {\n initComponent(vnode, insertedVnodeQueue);\n insert(parentElm, vnode.elm, refElm);\n if (isTrue(isReactivated)) {\n reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n }\n return true\n }\n }\n }\n\n function initComponent (vnode, insertedVnodeQueue) {\n if (isDef(vnode.data.pendingInsert)) {\n insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n vnode.data.pendingInsert = null;\n }\n vnode.elm = vnode.componentInstance.$el;\n if (isPatchable(vnode)) {\n invokeCreateHooks(vnode, insertedVnodeQueue);\n setScope(vnode);\n } else {\n // empty component root.\n // skip all element-related modules except for ref (#3455)\n registerRef(vnode);\n // make sure to invoke the insert hook\n insertedVnodeQueue.push(vnode);\n }\n }\n\n function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n var i;\n // hack for #4339: a reactivated component with inner transition\n // does not trigger because the inner node's created hooks are not called\n // again. It's not ideal to involve module-specific logic in here but\n // there doesn't seem to be a better way to do it.\n var innerNode = vnode;\n while (innerNode.componentInstance) {\n innerNode = innerNode.componentInstance._vnode;\n if (isDef(i = innerNode.data) && isDef(i = i.transition)) {\n for (i = 0; i < cbs.activate.length; ++i) {\n cbs.activate[i](emptyNode, innerNode);\n }\n insertedVnodeQueue.push(innerNode);\n break\n }\n }\n // unlike a newly created component,\n // a reactivated keep-alive component doesn't insert itself\n insert(parentElm, vnode.elm, refElm);\n }\n\n function insert (parent, elm, ref$$1) {\n if (isDef(parent)) {\n if (isDef(ref$$1)) {\n if (nodeOps.parentNode(ref$$1) === parent) {\n nodeOps.insertBefore(parent, elm, ref$$1);\n }\n } else {\n nodeOps.appendChild(parent, elm);\n }\n }\n }\n\n function createChildren (vnode, children, insertedVnodeQueue) {\n if (Array.isArray(children)) {\n if (process.env.NODE_ENV !== 'production') {\n checkDuplicateKeys(children);\n }\n for (var i = 0; i < children.length; ++i) {\n createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);\n }\n } else if (isPrimitive(vnode.text)) {\n nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));\n }\n }\n\n function isPatchable (vnode) {\n while (vnode.componentInstance) {\n vnode = vnode.componentInstance._vnode;\n }\n return isDef(vnode.tag)\n }\n\n function invokeCreateHooks (vnode, insertedVnodeQueue) {\n for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n cbs.create[i$1](emptyNode, vnode);\n }\n i = vnode.data.hook; // Reuse variable\n if (isDef(i)) {\n if (isDef(i.create)) { i.create(emptyNode, vnode); }\n if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }\n }\n }\n\n // set scope id attribute for scoped CSS.\n // this is implemented as a special case to avoid the overhead\n // of going through the normal attribute patching process.\n function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }\n\n function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n for (; startIdx <= endIdx; ++startIdx) {\n createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);\n }\n }\n\n function invokeDestroyHook (vnode) {\n var i, j;\n var data = vnode.data;\n if (isDef(data)) {\n if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }\n for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }\n }\n if (isDef(i = vnode.children)) {\n for (j = 0; j < vnode.children.length; ++j) {\n invokeDestroyHook(vnode.children[j]);\n }\n }\n }\n\n function removeVnodes (parentElm, vnodes, startIdx, endIdx) {\n for (; startIdx <= endIdx; ++startIdx) {\n var ch = vnodes[startIdx];\n if (isDef(ch)) {\n if (isDef(ch.tag)) {\n removeAndInvokeRemoveHook(ch);\n invokeDestroyHook(ch);\n } else { // Text node\n removeNode(ch.elm);\n }\n }\n }\n }\n\n function removeAndInvokeRemoveHook (vnode, rm) {\n if (isDef(rm) || isDef(vnode.data)) {\n var i;\n var listeners = cbs.remove.length + 1;\n if (isDef(rm)) {\n // we have a recursively passed down rm callback\n // increase the listeners count\n rm.listeners += listeners;\n } else {\n // directly removing\n rm = createRmCb(vnode.elm, listeners);\n }\n // recursively invoke hooks on child component root node\n if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {\n removeAndInvokeRemoveHook(i, rm);\n }\n for (i = 0; i < cbs.remove.length; ++i) {\n cbs.remove[i](vnode, rm);\n }\n if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {\n i(vnode, rm);\n } else {\n rm();\n }\n } else {\n removeNode(vnode.elm);\n }\n }\n\n function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n var oldStartIdx = 0;\n var newStartIdx = 0;\n var oldEndIdx = oldCh.length - 1;\n var oldStartVnode = oldCh[0];\n var oldEndVnode = oldCh[oldEndIdx];\n var newEndIdx = newCh.length - 1;\n var newStartVnode = newCh[0];\n var newEndVnode = newCh[newEndIdx];\n var oldKeyToIdx, idxInOld, vnodeToMove, refElm;\n\n // removeOnly is a special flag used only by <transition-group>\n // to ensure removed elements stay in correct relative positions\n // during leaving transitions\n var canMove = !removeOnly;\n\n if (process.env.NODE_ENV !== 'production') {\n checkDuplicateKeys(newCh);\n }\n\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (isUndef(oldStartVnode)) {\n oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n } else if (isUndef(oldEndVnode)) {\n oldEndVnode = oldCh[--oldEndIdx];\n } else if (sameVnode(oldStartVnode, newStartVnode)) {\n patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n } else if (sameVnode(oldEndVnode, newEndVnode)) {\n patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right\n patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n oldStartVnode = oldCh[++oldStartIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left\n patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n oldEndVnode = oldCh[--oldEndIdx];\n newStartVnode = newCh[++newStartIdx];\n } else {\n if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }\n idxInOld = isDef(newStartVnode.key)\n ? oldKeyToIdx[newStartVnode.key]\n : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);\n if (isUndef(idxInOld)) { // New element\n createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n } else {\n vnodeToMove = oldCh[idxInOld];\n if (sameVnode(vnodeToMove, newStartVnode)) {\n patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n oldCh[idxInOld] = undefined;\n canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);\n } else {\n // same key but different element. treat as new element\n createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n }\n }\n newStartVnode = newCh[++newStartIdx];\n }\n }\n if (oldStartIdx > oldEndIdx) {\n refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n } else if (newStartIdx > newEndIdx) {\n removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n }\n }\n\n function checkDuplicateKeys (children) {\n var seenKeys = {};\n for (var i = 0; i < children.length; i++) {\n var vnode = children[i];\n var key = vnode.key;\n if (isDef(key)) {\n if (seenKeys[key]) {\n warn(\n (\"Duplicate keys detected: '\" + key + \"'. This may cause an update error.\"),\n vnode.context\n );\n } else {\n seenKeys[key] = true;\n }\n }\n }\n }\n\n function findIdxInOld (node, oldCh, start, end) {\n for (var i = start; i < end; i++) {\n var c = oldCh[i];\n if (isDef(c) && sameVnode(node, c)) { return i }\n }\n }\n\n function patchVnode (\n oldVnode,\n vnode,\n insertedVnodeQueue,\n ownerArray,\n index,\n removeOnly\n ) {\n if (oldVnode === vnode) {\n return\n }\n\n if (isDef(vnode.elm) && isDef(ownerArray)) {\n // clone reused vnode\n vnode = ownerArray[index] = cloneVNode(vnode);\n }\n\n var elm = vnode.elm = oldVnode.elm;\n\n if (isTrue(oldVnode.isAsyncPlaceholder)) {\n if (isDef(vnode.asyncFactory.resolved)) {\n hydrate(oldVnode.elm, vnode, insertedVnodeQueue);\n } else {\n vnode.isAsyncPlaceholder = true;\n }\n return\n }\n\n // reuse element for static trees.\n // note we only do this if the vnode is cloned -\n // if the new node is not cloned it means the render functions have been\n // reset by the hot-reload-api and we need to do a proper re-render.\n if (isTrue(vnode.isStatic) &&\n isTrue(oldVnode.isStatic) &&\n vnode.key === oldVnode.key &&\n (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))\n ) {\n vnode.componentInstance = oldVnode.componentInstance;\n return\n }\n\n var i;\n var data = vnode.data;\n if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {\n i(oldVnode, vnode);\n }\n\n var oldCh = oldVnode.children;\n var ch = vnode.children;\n if (isDef(data) && isPatchable(vnode)) {\n for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }\n if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }\n }\n if (isUndef(vnode.text)) {\n if (isDef(oldCh) && isDef(ch)) {\n if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }\n } else if (isDef(ch)) {\n if (process.env.NODE_ENV !== 'production') {\n checkDuplicateKeys(ch);\n }\n if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }\n addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n } else if (isDef(oldCh)) {\n removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n } else if (isDef(oldVnode.text)) {\n nodeOps.setTextContent(elm, '');\n }\n } else if (oldVnode.text !== vnode.text) {\n nodeOps.setTextContent(elm, vnode.text);\n }\n if (isDef(data)) {\n if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }\n }\n }\n\n function invokeInsertHook (vnode, queue, initial) {\n // delay insert hooks for component root nodes, invoke them after the\n // element is really inserted\n if (isTrue(initial) && isDef(vnode.parent)) {\n vnode.parent.data.pendingInsert = queue;\n } else {\n for (var i = 0; i < queue.length; ++i) {\n queue[i].data.hook.insert(queue[i]);\n }\n }\n }\n\n var hydrationBailed = false;\n // list of modules that can skip create hook during hydration because they\n // are already rendered on the client or has no need for initialization\n // Note: style is excluded because it relies on initial clone for future\n // deep updates (#7063).\n var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');\n\n // Note: this is a browser-only function so we can assume elms are DOM nodes.\n function hydrate (elm, vnode, insertedVnodeQueue, inVPre) {\n var i;\n var tag = vnode.tag;\n var data = vnode.data;\n var children = vnode.children;\n inVPre = inVPre || (data && data.pre);\n vnode.elm = elm;\n\n if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {\n vnode.isAsyncPlaceholder = true;\n return true\n }\n // assert node match\n if (process.env.NODE_ENV !== 'production') {\n if (!assertNodeMatch(elm, vnode, inVPre)) {\n return false\n }\n }\n if (isDef(data)) {\n if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }\n if (isDef(i = vnode.componentInstance)) {\n // child component. it should have hydrated its own tree.\n initComponent(vnode, insertedVnodeQueue);\n return true\n }\n }\n if (isDef(tag)) {\n if (isDef(children)) {\n // empty element, allow client to pick up and populate children\n if (!elm.hasChildNodes()) {\n createChildren(vnode, children, insertedVnodeQueue);\n } else {\n // v-html and domProps: innerHTML\n if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {\n if (i !== elm.innerHTML) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' &&\n typeof console !== 'undefined' &&\n !hydrationBailed\n ) {\n hydrationBailed = true;\n console.warn('Parent: ', elm);\n console.warn('server innerHTML: ', i);\n console.warn('client innerHTML: ', elm.innerHTML);\n }\n return false\n }\n } else {\n // iterate and compare children lists\n var childrenMatch = true;\n var childNode = elm.firstChild;\n for (var i$1 = 0; i$1 < children.length; i$1++) {\n if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {\n childrenMatch = false;\n break\n }\n childNode = childNode.nextSibling;\n }\n // if childNode is not null, it means the actual childNodes list is\n // longer than the virtual children list.\n if (!childrenMatch || childNode) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' &&\n typeof console !== 'undefined' &&\n !hydrationBailed\n ) {\n hydrationBailed = true;\n console.warn('Parent: ', elm);\n console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n }\n return false\n }\n }\n }\n }\n if (isDef(data)) {\n var fullInvoke = false;\n for (var key in data) {\n if (!isRenderedModule(key)) {\n fullInvoke = true;\n invokeCreateHooks(vnode, insertedVnodeQueue);\n break\n }\n }\n if (!fullInvoke && data['class']) {\n // ensure collecting deps for deep class bindings for future updates\n traverse(data['class']);\n }\n }\n } else if (elm.data !== vnode.text) {\n elm.data = vnode.text;\n }\n return true\n }\n\n function assertNodeMatch (node, vnode, inVPre) {\n if (isDef(vnode.tag)) {\n return vnode.tag.indexOf('vue-component') === 0 || (\n !isUnknownElement$$1(vnode, inVPre) &&\n vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())\n )\n } else {\n return node.nodeType === (vnode.isComment ? 8 : 3)\n }\n }\n\n return function patch (oldVnode, vnode, hydrating, removeOnly) {\n if (isUndef(vnode)) {\n if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }\n return\n }\n\n var isInitialPatch = false;\n var insertedVnodeQueue = [];\n\n if (isUndef(oldVnode)) {\n // empty mount (likely as component), create new root element\n isInitialPatch = true;\n createElm(vnode, insertedVnodeQueue);\n } else {\n var isRealElement = isDef(oldVnode.nodeType);\n if (!isRealElement && sameVnode(oldVnode, vnode)) {\n // patch existing root node\n patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);\n } else {\n if (isRealElement) {\n // mounting to a real element\n // check if this is server-rendered content and if we can perform\n // a successful hydration.\n if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {\n oldVnode.removeAttribute(SSR_ATTR);\n hydrating = true;\n }\n if (isTrue(hydrating)) {\n if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n invokeInsertHook(vnode, insertedVnodeQueue, true);\n return oldVnode\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n 'The client-side rendered virtual DOM tree is not matching ' +\n 'server-rendered content. This is likely caused by incorrect ' +\n 'HTML markup, for example nesting block-level elements inside ' +\n '<p>, or missing <tbody>. Bailing hydration and performing ' +\n 'full client-side render.'\n );\n }\n }\n // either not server-rendered, or hydration failed.\n // create an empty node and replace it\n oldVnode = emptyNodeAt(oldVnode);\n }\n\n // replacing existing element\n var oldElm = oldVnode.elm;\n var parentElm = nodeOps.parentNode(oldElm);\n\n // create new node\n createElm(\n vnode,\n insertedVnodeQueue,\n // extremely rare edge case: do not insert if old element is in a\n // leaving transition. Only happens when combining transition +\n // keep-alive + HOCs. (#4590)\n oldElm._leaveCb ? null : parentElm,\n nodeOps.nextSibling(oldElm)\n );\n\n // update parent placeholder node element, recursively\n if (isDef(vnode.parent)) {\n var ancestor = vnode.parent;\n var patchable = isPatchable(vnode);\n while (ancestor) {\n for (var i = 0; i < cbs.destroy.length; ++i) {\n cbs.destroy[i](ancestor);\n }\n ancestor.elm = vnode.elm;\n if (patchable) {\n for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n cbs.create[i$1](emptyNode, ancestor);\n }\n // #6513\n // invoke insert hooks that may have been merged by create hooks.\n // e.g. for directives that uses the \"inserted\" hook.\n var insert = ancestor.data.hook.insert;\n if (insert.merged) {\n // start at index 1 to avoid re-invoking component mounted hook\n for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {\n insert.fns[i$2]();\n }\n }\n } else {\n registerRef(ancestor);\n }\n ancestor = ancestor.parent;\n }\n }\n\n // destroy old node\n if (isDef(parentElm)) {\n removeVnodes(parentElm, [oldVnode], 0, 0);\n } else if (isDef(oldVnode.tag)) {\n invokeDestroyHook(oldVnode);\n }\n }\n }\n\n invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n return vnode.elm\n }\n}\n\n/* */\n\nvar directives = {\n create: updateDirectives,\n update: updateDirectives,\n destroy: function unbindDirectives (vnode) {\n updateDirectives(vnode, emptyNode);\n }\n};\n\nfunction updateDirectives (oldVnode, vnode) {\n if (oldVnode.data.directives || vnode.data.directives) {\n _update(oldVnode, vnode);\n }\n}\n\nfunction _update (oldVnode, vnode) {\n var isCreate = oldVnode === emptyNode;\n var isDestroy = vnode === emptyNode;\n var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\n var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\n\n var dirsWithInsert = [];\n var dirsWithPostpatch = [];\n\n var key, oldDir, dir;\n for (key in newDirs) {\n oldDir = oldDirs[key];\n dir = newDirs[key];\n if (!oldDir) {\n // new directive, bind\n callHook$1(dir, 'bind', vnode, oldVnode);\n if (dir.def && dir.def.inserted) {\n dirsWithInsert.push(dir);\n }\n } else {\n // existing directive, update\n dir.oldValue = oldDir.value;\n dir.oldArg = oldDir.arg;\n callHook$1(dir, 'update', vnode, oldVnode);\n if (dir.def && dir.def.componentUpdated) {\n dirsWithPostpatch.push(dir);\n }\n }\n }\n\n if (dirsWithInsert.length) {\n var callInsert = function () {\n for (var i = 0; i < dirsWithInsert.length; i++) {\n callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n }\n };\n if (isCreate) {\n mergeVNodeHook(vnode, 'insert', callInsert);\n } else {\n callInsert();\n }\n }\n\n if (dirsWithPostpatch.length) {\n mergeVNodeHook(vnode, 'postpatch', function () {\n for (var i = 0; i < dirsWithPostpatch.length; i++) {\n callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n }\n });\n }\n\n if (!isCreate) {\n for (key in oldDirs) {\n if (!newDirs[key]) {\n // no longer present, unbind\n callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n }\n }\n }\n}\n\nvar emptyModifiers = Object.create(null);\n\nfunction normalizeDirectives$1 (\n dirs,\n vm\n) {\n var res = Object.create(null);\n if (!dirs) {\n // $flow-disable-line\n return res\n }\n var i, dir;\n for (i = 0; i < dirs.length; i++) {\n dir = dirs[i];\n if (!dir.modifiers) {\n // $flow-disable-line\n dir.modifiers = emptyModifiers;\n }\n res[getRawDirName(dir)] = dir;\n dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\n }\n // $flow-disable-line\n return res\n}\n\nfunction getRawDirName (dir) {\n return dir.rawName || ((dir.name) + \".\" + (Object.keys(dir.modifiers || {}).join('.')))\n}\n\nfunction callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {\n var fn = dir.def && dir.def[hook];\n if (fn) {\n try {\n fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n } catch (e) {\n handleError(e, vnode.context, (\"directive \" + (dir.name) + \" \" + hook + \" hook\"));\n }\n }\n}\n\nvar baseModules = [\n ref,\n directives\n];\n\n/* */\n\nfunction updateAttrs (oldVnode, vnode) {\n var opts = vnode.componentOptions;\n if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n return\n }\n if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n return\n }\n var key, cur, old;\n var elm = vnode.elm;\n var oldAttrs = oldVnode.data.attrs || {};\n var attrs = vnode.data.attrs || {};\n // clone observed objects, as the user probably wants to mutate it\n if (isDef(attrs.__ob__)) {\n attrs = vnode.data.attrs = extend({}, attrs);\n }\n\n for (key in attrs) {\n cur = attrs[key];\n old = oldAttrs[key];\n if (old !== cur) {\n setAttr(elm, key, cur);\n }\n }\n // #4391: in IE9, setting type can reset value for input[type=radio]\n // #6666: IE/Edge forces progress value down to 1 before setting a max\n /* istanbul ignore if */\n if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n setAttr(elm, 'value', attrs.value);\n }\n for (key in oldAttrs) {\n if (isUndef(attrs[key])) {\n if (isXlink(key)) {\n elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n } else if (!isEnumeratedAttr(key)) {\n elm.removeAttribute(key);\n }\n }\n }\n}\n\nfunction setAttr (el, key, value) {\n if (el.tagName.indexOf('-') > -1) {\n baseSetAttr(el, key, value);\n } else if (isBooleanAttr(key)) {\n // set attribute for blank value\n // e.g. <option disabled>Select one</option>\n if (isFalsyAttrValue(value)) {\n el.removeAttribute(key);\n } else {\n // technically allowfullscreen is a boolean attribute for <iframe>,\n // but Flash expects a value of \"true\" when used on <embed> tag\n value = key === 'allowfullscreen' && el.tagName === 'EMBED'\n ? 'true'\n : key;\n el.setAttribute(key, value);\n }\n } else if (isEnumeratedAttr(key)) {\n el.setAttribute(key, convertEnumeratedValue(key, value));\n } else if (isXlink(key)) {\n if (isFalsyAttrValue(value)) {\n el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n } else {\n el.setAttributeNS(xlinkNS, key, value);\n }\n } else {\n baseSetAttr(el, key, value);\n }\n}\n\nfunction baseSetAttr (el, key, value) {\n if (isFalsyAttrValue(value)) {\n el.removeAttribute(key);\n } else {\n // #7138: IE10 & 11 fires input event when setting placeholder on\n // <textarea>... block the first input event and remove the blocker\n // immediately.\n /* istanbul ignore if */\n if (\n isIE && !isIE9 &&\n el.tagName === 'TEXTAREA' &&\n key === 'placeholder' && value !== '' && !el.__ieph\n ) {\n var blocker = function (e) {\n e.stopImmediatePropagation();\n el.removeEventListener('input', blocker);\n };\n el.addEventListener('input', blocker);\n // $flow-disable-line\n el.__ieph = true; /* IE placeholder patched */\n }\n el.setAttribute(key, value);\n }\n}\n\nvar attrs = {\n create: updateAttrs,\n update: updateAttrs\n};\n\n/* */\n\nfunction updateClass (oldVnode, vnode) {\n var el = vnode.elm;\n var data = vnode.data;\n var oldData = oldVnode.data;\n if (\n isUndef(data.staticClass) &&\n isUndef(data.class) && (\n isUndef(oldData) || (\n isUndef(oldData.staticClass) &&\n isUndef(oldData.class)\n )\n )\n ) {\n return\n }\n\n var cls = genClassForVnode(vnode);\n\n // handle transition classes\n var transitionClass = el._transitionClasses;\n if (isDef(transitionClass)) {\n cls = concat(cls, stringifyClass(transitionClass));\n }\n\n // set the class\n if (cls !== el._prevClass) {\n el.setAttribute('class', cls);\n el._prevClass = cls;\n }\n}\n\nvar klass = {\n create: updateClass,\n update: updateClass\n};\n\n/* */\n\n/* */\n\n/* */\n\n/* */\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\n\n/* */\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents (on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}\n\nvar target$1;\n\nfunction createOnceHandler$1 (event, handler, capture) {\n var _target = target$1; // save current target element in closure\n return function onceHandler () {\n var res = handler.apply(null, arguments);\n if (res !== null) {\n remove$2(event, onceHandler, capture, _target);\n }\n }\n}\n\n// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp\n// implementation and does not fire microtasks in between event propagation, so\n// safe to exclude.\nvar useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);\n\nfunction add$1 (\n name,\n handler,\n capture,\n passive\n) {\n // async edge case #6566: inner click event triggers patch, event handler\n // attached to outer element during patch, and triggered again. This\n // happens because browsers fire microtask ticks between event propagation.\n // the solution is simple: we save the timestamp when a handler is attached,\n // and the handler would only fire if the event passed to it was fired\n // AFTER it was attached.\n if (useMicrotaskFix) {\n var attachedTimestamp = currentFlushTimestamp;\n var original = handler;\n handler = original._wrapper = function (e) {\n if (\n // no bubbling, should always fire.\n // this is just a safety net in case event.timeStamp is unreliable in\n // certain weird environments...\n e.target === e.currentTarget ||\n // event is fired after handler attachment\n e.timeStamp >= attachedTimestamp ||\n // bail for environments that have buggy event.timeStamp implementations\n // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState\n // #9681 QtWebEngine event.timeStamp is negative value\n e.timeStamp <= 0 ||\n // #9448 bail if event is fired in another document in a multi-page\n // electron/nw.js app, since event.timeStamp will be using a different\n // starting reference\n e.target.ownerDocument !== document\n ) {\n return original.apply(this, arguments)\n }\n };\n }\n target$1.addEventListener(\n name,\n handler,\n supportsPassive\n ? { capture: capture, passive: passive }\n : capture\n );\n}\n\nfunction remove$2 (\n name,\n handler,\n capture,\n _target\n) {\n (_target || target$1).removeEventListener(\n name,\n handler._wrapper || handler,\n capture\n );\n}\n\nfunction updateDOMListeners (oldVnode, vnode) {\n if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {\n return\n }\n var on = vnode.data.on || {};\n var oldOn = oldVnode.data.on || {};\n target$1 = vnode.elm;\n normalizeEvents(on);\n updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context);\n target$1 = undefined;\n}\n\nvar events = {\n create: updateDOMListeners,\n update: updateDOMListeners\n};\n\n/* */\n\nvar svgContainer;\n\nfunction updateDOMProps (oldVnode, vnode) {\n if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {\n return\n }\n var key, cur;\n var elm = vnode.elm;\n var oldProps = oldVnode.data.domProps || {};\n var props = vnode.data.domProps || {};\n // clone observed objects, as the user probably wants to mutate it\n if (isDef(props.__ob__)) {\n props = vnode.data.domProps = extend({}, props);\n }\n\n for (key in oldProps) {\n if (!(key in props)) {\n elm[key] = '';\n }\n }\n\n for (key in props) {\n cur = props[key];\n // ignore children if the node has textContent or innerHTML,\n // as these will throw away existing DOM nodes and cause removal errors\n // on subsequent patches (#3360)\n if (key === 'textContent' || key === 'innerHTML') {\n if (vnode.children) { vnode.children.length = 0; }\n if (cur === oldProps[key]) { continue }\n // #6601 work around Chrome version <= 55 bug where single textNode\n // replaced by innerHTML/textContent retains its parentNode property\n if (elm.childNodes.length === 1) {\n elm.removeChild(elm.childNodes[0]);\n }\n }\n\n if (key === 'value' && elm.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified\n elm._value = cur;\n // avoid resetting cursor position when value is the same\n var strCur = isUndef(cur) ? '' : String(cur);\n if (shouldUpdateValue(elm, strCur)) {\n elm.value = strCur;\n }\n } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) {\n // IE doesn't support innerHTML for SVG elements\n svgContainer = svgContainer || document.createElement('div');\n svgContainer.innerHTML = \"<svg>\" + cur + \"</svg>\";\n var svg = svgContainer.firstChild;\n while (elm.firstChild) {\n elm.removeChild(elm.firstChild);\n }\n while (svg.firstChild) {\n elm.appendChild(svg.firstChild);\n }\n } else if (\n // skip the update if old and new VDOM state is the same.\n // `value` is handled separately because the DOM value may be temporarily\n // out of sync with VDOM state due to focus, composition and modifiers.\n // This #4521 by skipping the unnecesarry `checked` update.\n cur !== oldProps[key]\n ) {\n // some property updates can throw\n // e.g. `value` on <progress> w/ non-finite value\n try {\n elm[key] = cur;\n } catch (e) {}\n }\n }\n}\n\n// check platforms/web/util/attrs.js acceptValue\n\n\nfunction shouldUpdateValue (elm, checkVal) {\n return (!elm.composing && (\n elm.tagName === 'OPTION' ||\n isNotInFocusAndDirty(elm, checkVal) ||\n isDirtyWithModifiers(elm, checkVal)\n ))\n}\n\nfunction isNotInFocusAndDirty (elm, checkVal) {\n // return true when textbox (.number and .trim) loses focus and its value is\n // not equal to the updated value\n var notInFocus = true;\n // #6157\n // work around IE bug when accessing document.activeElement in an iframe\n try { notInFocus = document.activeElement !== elm; } catch (e) {}\n return notInFocus && elm.value !== checkVal\n}\n\nfunction isDirtyWithModifiers (elm, newVal) {\n var value = elm.value;\n var modifiers = elm._vModifiers; // injected by v-model runtime\n if (isDef(modifiers)) {\n if (modifiers.number) {\n return toNumber(value) !== toNumber(newVal)\n }\n if (modifiers.trim) {\n return value.trim() !== newVal.trim()\n }\n }\n return value !== newVal\n}\n\nvar domProps = {\n create: updateDOMProps,\n update: updateDOMProps\n};\n\n/* */\n\nvar parseStyleText = cached(function (cssText) {\n var res = {};\n var listDelimiter = /;(?![^(]*\\))/g;\n var propertyDelimiter = /:(.+)/;\n cssText.split(listDelimiter).forEach(function (item) {\n if (item) {\n var tmp = item.split(propertyDelimiter);\n tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return res\n});\n\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData (data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle\n ? extend(data.staticStyle, style)\n : style\n}\n\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding (bindingStyle) {\n if (Array.isArray(bindingStyle)) {\n return toObject(bindingStyle)\n }\n if (typeof bindingStyle === 'string') {\n return parseStyleText(bindingStyle)\n }\n return bindingStyle\n}\n\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (\n childNode && childNode.data &&\n (styleData = normalizeStyleData(childNode.data))\n ) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n}\n\n/* */\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n /* istanbul ignore if */\n if (cssVarRE.test(name)) {\n el.style.setProperty(name, val);\n } else if (importantRE.test(val)) {\n el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');\n } else {\n var normalizedName = normalize(name);\n if (Array.isArray(val)) {\n // Support values array created by autoprefixer, e.g.\n // {display: [\"-webkit-box\", \"-ms-flexbox\", \"flex\"]}\n // Set them one by one, and the browser will only set those it can recognize\n for (var i = 0, len = val.length; i < len; i++) {\n el.style[normalizedName] = val[i];\n }\n } else {\n el.style[normalizedName] = val;\n }\n }\n};\n\nvar vendorNames = ['Webkit', 'Moz', 'ms'];\n\nvar emptyStyle;\nvar normalize = cached(function (prop) {\n emptyStyle = emptyStyle || document.createElement('div').style;\n prop = camelize(prop);\n if (prop !== 'filter' && (prop in emptyStyle)) {\n return prop\n }\n var capName = prop.charAt(0).toUpperCase() + prop.slice(1);\n for (var i = 0; i < vendorNames.length; i++) {\n var name = vendorNames[i] + capName;\n if (name in emptyStyle) {\n return name\n }\n }\n});\n\nfunction updateStyle (oldVnode, vnode) {\n var data = vnode.data;\n var oldData = oldVnode.data;\n\n if (isUndef(data.staticStyle) && isUndef(data.style) &&\n isUndef(oldData.staticStyle) && isUndef(oldData.style)\n ) {\n return\n }\n\n var cur, name;\n var el = vnode.elm;\n var oldStaticStyle = oldData.staticStyle;\n var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};\n\n // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n var oldStyle = oldStaticStyle || oldStyleBinding;\n\n var style = normalizeStyleBinding(vnode.data.style) || {};\n\n // store normalized style under a different key for next diff\n // make sure to clone it if it's reactive, since the user likely wants\n // to mutate it.\n vnode.data.normalizedStyle = isDef(style.__ob__)\n ? extend({}, style)\n : style;\n\n var newStyle = getStyle(vnode, true);\n\n for (name in oldStyle) {\n if (isUndef(newStyle[name])) {\n setProp(el, name, '');\n }\n }\n for (name in newStyle) {\n cur = newStyle[name];\n if (cur !== oldStyle[name]) {\n // ie9 setting to null has no effect, must use empty string\n setProp(el, name, cur == null ? '' : cur);\n }\n }\n}\n\nvar style = {\n create: updateStyle,\n update: updateStyle\n};\n\n/* */\n\nvar whitespaceRE = /\\s+/;\n\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass (el, cls) {\n /* istanbul ignore if */\n if (!cls || !(cls = cls.trim())) {\n return\n }\n\n /* istanbul ignore else */\n if (el.classList) {\n if (cls.indexOf(' ') > -1) {\n cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); });\n } else {\n el.classList.add(cls);\n }\n } else {\n var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n if (cur.indexOf(' ' + cls + ' ') < 0) {\n el.setAttribute('class', (cur + cls).trim());\n }\n }\n}\n\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass (el, cls) {\n /* istanbul ignore if */\n if (!cls || !(cls = cls.trim())) {\n return\n }\n\n /* istanbul ignore else */\n if (el.classList) {\n if (cls.indexOf(' ') > -1) {\n cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); });\n } else {\n el.classList.remove(cls);\n }\n if (!el.classList.length) {\n el.removeAttribute('class');\n }\n } else {\n var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n var tar = ' ' + cls + ' ';\n while (cur.indexOf(tar) >= 0) {\n cur = cur.replace(tar, ' ');\n }\n cur = cur.trim();\n if (cur) {\n el.setAttribute('class', cur);\n } else {\n el.removeAttribute('class');\n }\n }\n}\n\n/* */\n\nfunction resolveTransition (def$$1) {\n if (!def$$1) {\n return\n }\n /* istanbul ignore else */\n if (typeof def$$1 === 'object') {\n var res = {};\n if (def$$1.css !== false) {\n extend(res, autoCssTransition(def$$1.name || 'v'));\n }\n extend(res, def$$1);\n return res\n } else if (typeof def$$1 === 'string') {\n return autoCssTransition(def$$1)\n }\n}\n\nvar autoCssTransition = cached(function (name) {\n return {\n enterClass: (name + \"-enter\"),\n enterToClass: (name + \"-enter-to\"),\n enterActiveClass: (name + \"-enter-active\"),\n leaveClass: (name + \"-leave\"),\n leaveToClass: (name + \"-leave-to\"),\n leaveActiveClass: (name + \"-leave-active\")\n }\n});\n\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n /* istanbul ignore if */\n if (window.ontransitionend === undefined &&\n window.onwebkittransitionend !== undefined\n ) {\n transitionProp = 'WebkitTransition';\n transitionEndEvent = 'webkitTransitionEnd';\n }\n if (window.onanimationend === undefined &&\n window.onwebkitanimationend !== undefined\n ) {\n animationProp = 'WebkitAnimation';\n animationEndEvent = 'webkitAnimationEnd';\n }\n}\n\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser\n ? window.requestAnimationFrame\n ? window.requestAnimationFrame.bind(window)\n : setTimeout\n : /* istanbul ignore next */ function (fn) { return fn(); };\n\nfunction nextFrame (fn) {\n raf(function () {\n raf(fn);\n });\n}\n\nfunction addTransitionClass (el, cls) {\n var transitionClasses = el._transitionClasses || (el._transitionClasses = []);\n if (transitionClasses.indexOf(cls) < 0) {\n transitionClasses.push(cls);\n addClass(el, cls);\n }\n}\n\nfunction removeTransitionClass (el, cls) {\n if (el._transitionClasses) {\n remove(el._transitionClasses, cls);\n }\n removeClass(el, cls);\n}\n\nfunction whenTransitionEnds (\n el,\n expectedType,\n cb\n) {\n var ref = getTransitionInfo(el, expectedType);\n var type = ref.type;\n var timeout = ref.timeout;\n var propCount = ref.propCount;\n if (!type) { return cb() }\n var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n var ended = 0;\n var end = function () {\n el.removeEventListener(event, onEnd);\n cb();\n };\n var onEnd = function (e) {\n if (e.target === el) {\n if (++ended >= propCount) {\n end();\n }\n }\n };\n setTimeout(function () {\n if (ended < propCount) {\n end();\n }\n }, timeout + 1);\n el.addEventListener(event, onEnd);\n}\n\nvar transformRE = /\\b(transform|all)(,|$)/;\n\nfunction getTransitionInfo (el, expectedType) {\n var styles = window.getComputedStyle(el);\n // JSDOM may return undefined for transition properties\n var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');\n var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');\n var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');\n var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');\n var animationTimeout = getTimeout(animationDelays, animationDurations);\n\n var type;\n var timeout = 0;\n var propCount = 0;\n /* istanbul ignore if */\n if (expectedType === TRANSITION) {\n if (transitionTimeout > 0) {\n type = TRANSITION;\n timeout = transitionTimeout;\n propCount = transitionDurations.length;\n }\n } else if (expectedType === ANIMATION) {\n if (animationTimeout > 0) {\n type = ANIMATION;\n timeout = animationTimeout;\n propCount = animationDurations.length;\n }\n } else {\n timeout = Math.max(transitionTimeout, animationTimeout);\n type = timeout > 0\n ? transitionTimeout > animationTimeout\n ? TRANSITION\n : ANIMATION\n : null;\n propCount = type\n ? type === TRANSITION\n ? transitionDurations.length\n : animationDurations.length\n : 0;\n }\n var hasTransform =\n type === TRANSITION &&\n transformRE.test(styles[transitionProp + 'Property']);\n return {\n type: type,\n timeout: timeout,\n propCount: propCount,\n hasTransform: hasTransform\n }\n}\n\nfunction getTimeout (delays, durations) {\n /* istanbul ignore next */\n while (delays.length < durations.length) {\n delays = delays.concat(delays);\n }\n\n return Math.max.apply(null, durations.map(function (d, i) {\n return toMs(d) + toMs(delays[i])\n }))\n}\n\n// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers\n// in a locale-dependent way, using a comma instead of a dot.\n// If comma is not replaced with a dot, the input will be rounded down (i.e. acting\n// as a floor function) causing unexpected behaviors\nfunction toMs (s) {\n return Number(s.slice(0, -1).replace(',', '.')) * 1000\n}\n\n/* */\n\nfunction enter (vnode, toggleDisplay) {\n var el = vnode.elm;\n\n // call leave callback now\n if (isDef(el._leaveCb)) {\n el._leaveCb.cancelled = true;\n el._leaveCb();\n }\n\n var data = resolveTransition(vnode.data.transition);\n if (isUndef(data)) {\n return\n }\n\n /* istanbul ignore if */\n if (isDef(el._enterCb) || el.nodeType !== 1) {\n return\n }\n\n var css = data.css;\n var type = data.type;\n var enterClass = data.enterClass;\n var enterToClass = data.enterToClass;\n var enterActiveClass = data.enterActiveClass;\n var appearClass = data.appearClass;\n var appearToClass = data.appearToClass;\n var appearActiveClass = data.appearActiveClass;\n var beforeEnter = data.beforeEnter;\n var enter = data.enter;\n var afterEnter = data.afterEnter;\n var enterCancelled = data.enterCancelled;\n var beforeAppear = data.beforeAppear;\n var appear = data.appear;\n var afterAppear = data.afterAppear;\n var appearCancelled = data.appearCancelled;\n var duration = data.duration;\n\n // activeInstance will always be the <transition> component managing this\n // transition. One edge case to check is when the <transition> is placed\n // as the root node of a child component. In that case we need to check\n // <transition>'s parent for appear check.\n var context = activeInstance;\n var transitionNode = activeInstance.$vnode;\n while (transitionNode && transitionNode.parent) {\n context = transitionNode.context;\n transitionNode = transitionNode.parent;\n }\n\n var isAppear = !context._isMounted || !vnode.isRootInsert;\n\n if (isAppear && !appear && appear !== '') {\n return\n }\n\n var startClass = isAppear && appearClass\n ? appearClass\n : enterClass;\n var activeClass = isAppear && appearActiveClass\n ? appearActiveClass\n : enterActiveClass;\n var toClass = isAppear && appearToClass\n ? appearToClass\n : enterToClass;\n\n var beforeEnterHook = isAppear\n ? (beforeAppear || beforeEnter)\n : beforeEnter;\n var enterHook = isAppear\n ? (typeof appear === 'function' ? appear : enter)\n : enter;\n var afterEnterHook = isAppear\n ? (afterAppear || afterEnter)\n : afterEnter;\n var enterCancelledHook = isAppear\n ? (appearCancelled || enterCancelled)\n : enterCancelled;\n\n var explicitEnterDuration = toNumber(\n isObject(duration)\n ? duration.enter\n : duration\n );\n\n if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {\n checkDuration(explicitEnterDuration, 'enter', vnode);\n }\n\n var expectsCSS = css !== false && !isIE9;\n var userWantsControl = getHookArgumentsLength(enterHook);\n\n var cb = el._enterCb = once(function () {\n if (expectsCSS) {\n removeTransitionClass(el, toClass);\n removeTransitionClass(el, activeClass);\n }\n if (cb.cancelled) {\n if (expectsCSS) {\n removeTransitionClass(el, startClass);\n }\n enterCancelledHook && enterCancelledHook(el);\n } else {\n afterEnterHook && afterEnterHook(el);\n }\n el._enterCb = null;\n });\n\n if (!vnode.data.show) {\n // remove pending leave element on enter by injecting an insert hook\n mergeVNodeHook(vnode, 'insert', function () {\n var parent = el.parentNode;\n var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n if (pendingNode &&\n pendingNode.tag === vnode.tag &&\n pendingNode.elm._leaveCb\n ) {\n pendingNode.elm._leaveCb();\n }\n enterHook && enterHook(el, cb);\n });\n }\n\n // start enter transition\n beforeEnterHook && beforeEnterHook(el);\n if (expectsCSS) {\n addTransitionClass(el, startClass);\n addTransitionClass(el, activeClass);\n nextFrame(function () {\n removeTransitionClass(el, startClass);\n if (!cb.cancelled) {\n addTransitionClass(el, toClass);\n if (!userWantsControl) {\n if (isValidDuration(explicitEnterDuration)) {\n setTimeout(cb, explicitEnterDuration);\n } else {\n whenTransitionEnds(el, type, cb);\n }\n }\n }\n });\n }\n\n if (vnode.data.show) {\n toggleDisplay && toggleDisplay();\n enterHook && enterHook(el, cb);\n }\n\n if (!expectsCSS && !userWantsControl) {\n cb();\n }\n}\n\nfunction leave (vnode, rm) {\n var el = vnode.elm;\n\n // call enter callback now\n if (isDef(el._enterCb)) {\n el._enterCb.cancelled = true;\n el._enterCb();\n }\n\n var data = resolveTransition(vnode.data.transition);\n if (isUndef(data) || el.nodeType !== 1) {\n return rm()\n }\n\n /* istanbul ignore if */\n if (isDef(el._leaveCb)) {\n return\n }\n\n var css = data.css;\n var type = data.type;\n var leaveClass = data.leaveClass;\n var leaveToClass = data.leaveToClass;\n var leaveActiveClass = data.leaveActiveClass;\n var beforeLeave = data.beforeLeave;\n var leave = data.leave;\n var afterLeave = data.afterLeave;\n var leaveCancelled = data.leaveCancelled;\n var delayLeave = data.delayLeave;\n var duration = data.duration;\n\n var expectsCSS = css !== false && !isIE9;\n var userWantsControl = getHookArgumentsLength(leave);\n\n var explicitLeaveDuration = toNumber(\n isObject(duration)\n ? duration.leave\n : duration\n );\n\n if (process.env.NODE_ENV !== 'production' && isDef(explicitLeaveDuration)) {\n checkDuration(explicitLeaveDuration, 'leave', vnode);\n }\n\n var cb = el._leaveCb = once(function () {\n if (el.parentNode && el.parentNode._pending) {\n el.parentNode._pending[vnode.key] = null;\n }\n if (expectsCSS) {\n removeTransitionClass(el, leaveToClass);\n removeTransitionClass(el, leaveActiveClass);\n }\n if (cb.cancelled) {\n if (expectsCSS) {\n removeTransitionClass(el, leaveClass);\n }\n leaveCancelled && leaveCancelled(el);\n } else {\n rm();\n afterLeave && afterLeave(el);\n }\n el._leaveCb = null;\n });\n\n if (delayLeave) {\n delayLeave(performLeave);\n } else {\n performLeave();\n }\n\n function performLeave () {\n // the delayed leave may have already been cancelled\n if (cb.cancelled) {\n return\n }\n // record leaving element\n if (!vnode.data.show && el.parentNode) {\n (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;\n }\n beforeLeave && beforeLeave(el);\n if (expectsCSS) {\n addTransitionClass(el, leaveClass);\n addTransitionClass(el, leaveActiveClass);\n nextFrame(function () {\n removeTransitionClass(el, leaveClass);\n if (!cb.cancelled) {\n addTransitionClass(el, leaveToClass);\n if (!userWantsControl) {\n if (isValidDuration(explicitLeaveDuration)) {\n setTimeout(cb, explicitLeaveDuration);\n } else {\n whenTransitionEnds(el, type, cb);\n }\n }\n }\n });\n }\n leave && leave(el, cb);\n if (!expectsCSS && !userWantsControl) {\n cb();\n }\n }\n}\n\n// only used in dev mode\nfunction checkDuration (val, name, vnode) {\n if (typeof val !== 'number') {\n warn(\n \"<transition> explicit \" + name + \" duration is not a valid number - \" +\n \"got \" + (JSON.stringify(val)) + \".\",\n vnode.context\n );\n } else if (isNaN(val)) {\n warn(\n \"<transition> explicit \" + name + \" duration is NaN - \" +\n 'the duration expression might be incorrect.',\n vnode.context\n );\n }\n}\n\nfunction isValidDuration (val) {\n return typeof val === 'number' && !isNaN(val)\n}\n\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength (fn) {\n if (isUndef(fn)) {\n return false\n }\n var invokerFns = fn.fns;\n if (isDef(invokerFns)) {\n // invoker\n return getHookArgumentsLength(\n Array.isArray(invokerFns)\n ? invokerFns[0]\n : invokerFns\n )\n } else {\n return (fn._length || fn.length) > 1\n }\n}\n\nfunction _enter (_, vnode) {\n if (vnode.data.show !== true) {\n enter(vnode);\n }\n}\n\nvar transition = inBrowser ? {\n create: _enter,\n activate: _enter,\n remove: function remove$$1 (vnode, rm) {\n /* istanbul ignore else */\n if (vnode.data.show !== true) {\n leave(vnode, rm);\n } else {\n rm();\n }\n }\n} : {};\n\nvar platformModules = [\n attrs,\n klass,\n events,\n domProps,\n style,\n transition\n];\n\n/* */\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules = platformModules.concat(baseModules);\n\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n\n/* istanbul ignore if */\nif (isIE9) {\n // http://www.matts411.com/post/internet-explorer-9-oninput/\n document.addEventListener('selectionchange', function () {\n var el = document.activeElement;\n if (el && el.vmodel) {\n trigger(el, 'input');\n }\n });\n}\n\nvar directive = {\n inserted: function inserted (el, binding, vnode, oldVnode) {\n if (vnode.tag === 'select') {\n // #6903\n if (oldVnode.elm && !oldVnode.elm._vOptions) {\n mergeVNodeHook(vnode, 'postpatch', function () {\n directive.componentUpdated(el, binding, vnode);\n });\n } else {\n setSelected(el, binding, vnode.context);\n }\n el._vOptions = [].map.call(el.options, getValue);\n } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {\n el._vModifiers = binding.modifiers;\n if (!binding.modifiers.lazy) {\n el.addEventListener('compositionstart', onCompositionStart);\n el.addEventListener('compositionend', onCompositionEnd);\n // Safari < 10.2 & UIWebView doesn't fire compositionend when\n // switching focus before confirming composition choice\n // this also fixes the issue where some browsers e.g. iOS Chrome\n // fires \"change\" instead of \"input\" on autocomplete.\n el.addEventListener('change', onCompositionEnd);\n /* istanbul ignore if */\n if (isIE9) {\n el.vmodel = true;\n }\n }\n }\n },\n\n componentUpdated: function componentUpdated (el, binding, vnode) {\n if (vnode.tag === 'select') {\n setSelected(el, binding, vnode.context);\n // in case the options rendered by v-for have changed,\n // it's possible that the value is out-of-sync with the rendered options.\n // detect such cases and filter out values that no longer has a matching\n // option in the DOM.\n var prevOptions = el._vOptions;\n var curOptions = el._vOptions = [].map.call(el.options, getValue);\n if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {\n // trigger change event if\n // no matching option found for at least one value\n var needReset = el.multiple\n ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })\n : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);\n if (needReset) {\n trigger(el, 'change');\n }\n }\n }\n }\n};\n\nfunction setSelected (el, binding, vm) {\n actuallySetSelected(el, binding, vm);\n /* istanbul ignore if */\n if (isIE || isEdge) {\n setTimeout(function () {\n actuallySetSelected(el, binding, vm);\n }, 0);\n }\n}\n\nfunction actuallySetSelected (el, binding, vm) {\n var value = binding.value;\n var isMultiple = el.multiple;\n if (isMultiple && !Array.isArray(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n \"<select multiple v-model=\\\"\" + (binding.expression) + \"\\\"> \" +\n \"expects an Array value for its binding, but got \" + (Object.prototype.toString.call(value).slice(8, -1)),\n vm\n );\n return\n }\n var selected, option;\n for (var i = 0, l = el.options.length; i < l; i++) {\n option = el.options[i];\n if (isMultiple) {\n selected = looseIndexOf(value, getValue(option)) > -1;\n if (option.selected !== selected) {\n option.selected = selected;\n }\n } else {\n if (looseEqual(getValue(option), value)) {\n if (el.selectedIndex !== i) {\n el.selectedIndex = i;\n }\n return\n }\n }\n }\n if (!isMultiple) {\n el.selectedIndex = -1;\n }\n}\n\nfunction hasNoMatchingOption (value, options) {\n return options.every(function (o) { return !looseEqual(o, value); })\n}\n\nfunction getValue (option) {\n return '_value' in option\n ? option._value\n : option.value\n}\n\nfunction onCompositionStart (e) {\n e.target.composing = true;\n}\n\nfunction onCompositionEnd (e) {\n // prevent triggering an input event for no reason\n if (!e.target.composing) { return }\n e.target.composing = false;\n trigger(e.target, 'input');\n}\n\nfunction trigger (el, type) {\n var e = document.createEvent('HTMLEvents');\n e.initEvent(type, true, true);\n el.dispatchEvent(e);\n}\n\n/* */\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}\n\nvar show = {\n bind: function bind (el, ref, vnode) {\n var value = ref.value;\n\n vnode = locateNode(vnode);\n var transition$$1 = vnode.data && vnode.data.transition;\n var originalDisplay = el.__vOriginalDisplay =\n el.style.display === 'none' ? '' : el.style.display;\n if (value && transition$$1) {\n vnode.data.show = true;\n enter(vnode, function () {\n el.style.display = originalDisplay;\n });\n } else {\n el.style.display = value ? originalDisplay : 'none';\n }\n },\n\n update: function update (el, ref, vnode) {\n var value = ref.value;\n var oldValue = ref.oldValue;\n\n /* istanbul ignore if */\n if (!value === !oldValue) { return }\n vnode = locateNode(vnode);\n var transition$$1 = vnode.data && vnode.data.transition;\n if (transition$$1) {\n vnode.data.show = true;\n if (value) {\n enter(vnode, function () {\n el.style.display = el.__vOriginalDisplay;\n });\n } else {\n leave(vnode, function () {\n el.style.display = 'none';\n });\n }\n } else {\n el.style.display = value ? el.__vOriginalDisplay : 'none';\n }\n },\n\n unbind: function unbind (\n el,\n binding,\n vnode,\n oldVnode,\n isDestroy\n ) {\n if (!isDestroy) {\n el.style.display = el.__vOriginalDisplay;\n }\n }\n};\n\nvar platformDirectives = {\n model: directive,\n show: show\n};\n\n/* */\n\nvar transitionProps = {\n name: String,\n appear: Boolean,\n css: Boolean,\n mode: String,\n type: String,\n enterClass: String,\n leaveClass: String,\n enterToClass: String,\n leaveToClass: String,\n enterActiveClass: String,\n leaveActiveClass: String,\n appearClass: String,\n appearActiveClass: String,\n appearToClass: String,\n duration: [Number, String, Object]\n};\n\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild (vnode) {\n var compOptions = vnode && vnode.componentOptions;\n if (compOptions && compOptions.Ctor.options.abstract) {\n return getRealChild(getFirstComponentChild(compOptions.children))\n } else {\n return vnode\n }\n}\n\nfunction extractTransitionData (comp) {\n var data = {};\n var options = comp.$options;\n // props\n for (var key in options.propsData) {\n data[key] = comp[key];\n }\n // events.\n // extract listeners and pass them directly to the transition methods\n var listeners = options._parentListeners;\n for (var key$1 in listeners) {\n data[camelize(key$1)] = listeners[key$1];\n }\n return data\n}\n\nfunction placeholder (h, rawChild) {\n if (/\\d-keep-alive$/.test(rawChild.tag)) {\n return h('keep-alive', {\n props: rawChild.componentOptions.propsData\n })\n }\n}\n\nfunction hasParentTransition (vnode) {\n while ((vnode = vnode.parent)) {\n if (vnode.data.transition) {\n return true\n }\n }\n}\n\nfunction isSameChild (child, oldChild) {\n return oldChild.key === child.key && oldChild.tag === child.tag\n}\n\nvar isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };\n\nvar isVShowDirective = function (d) { return d.name === 'show'; };\n\nvar Transition = {\n name: 'transition',\n props: transitionProps,\n abstract: true,\n\n render: function render (h) {\n var this$1 = this;\n\n var children = this.$slots.default;\n if (!children) {\n return\n }\n\n // filter out text nodes (possible whitespaces)\n children = children.filter(isNotTextNode);\n /* istanbul ignore if */\n if (!children.length) {\n return\n }\n\n // warn multiple elements\n if (process.env.NODE_ENV !== 'production' && children.length > 1) {\n warn(\n '<transition> can only be used on a single element. Use ' +\n '<transition-group> for lists.',\n this.$parent\n );\n }\n\n var mode = this.mode;\n\n // warn invalid mode\n if (process.env.NODE_ENV !== 'production' &&\n mode && mode !== 'in-out' && mode !== 'out-in'\n ) {\n warn(\n 'invalid <transition> mode: ' + mode,\n this.$parent\n );\n }\n\n var rawChild = children[0];\n\n // if this is a component root node and the component's\n // parent container node also has transition, skip.\n if (hasParentTransition(this.$vnode)) {\n return rawChild\n }\n\n // apply transition data to child\n // use getRealChild() to ignore abstract components e.g. keep-alive\n var child = getRealChild(rawChild);\n /* istanbul ignore if */\n if (!child) {\n return rawChild\n }\n\n if (this._leaving) {\n return placeholder(h, rawChild)\n }\n\n // ensure a key that is unique to the vnode type and to this transition\n // component instance. This key will be used to remove pending leaving nodes\n // during entering.\n var id = \"__transition-\" + (this._uid) + \"-\";\n child.key = child.key == null\n ? child.isComment\n ? id + 'comment'\n : id + child.tag\n : isPrimitive(child.key)\n ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)\n : child.key;\n\n var data = (child.data || (child.data = {})).transition = extractTransitionData(this);\n var oldRawChild = this._vnode;\n var oldChild = getRealChild(oldRawChild);\n\n // mark v-show\n // so that the transition module can hand over the control to the directive\n if (child.data.directives && child.data.directives.some(isVShowDirective)) {\n child.data.show = true;\n }\n\n if (\n oldChild &&\n oldChild.data &&\n !isSameChild(child, oldChild) &&\n !isAsyncPlaceholder(oldChild) &&\n // #6687 component root is a comment node\n !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)\n ) {\n // replace old child transition data with fresh one\n // important for dynamic transitions!\n var oldData = oldChild.data.transition = extend({}, data);\n // handle transition mode\n if (mode === 'out-in') {\n // return placeholder node and queue update when leave finishes\n this._leaving = true;\n mergeVNodeHook(oldData, 'afterLeave', function () {\n this$1._leaving = false;\n this$1.$forceUpdate();\n });\n return placeholder(h, rawChild)\n } else if (mode === 'in-out') {\n if (isAsyncPlaceholder(child)) {\n return oldRawChild\n }\n var delayedLeave;\n var performLeave = function () { delayedLeave(); };\n mergeVNodeHook(data, 'afterEnter', performLeave);\n mergeVNodeHook(data, 'enterCancelled', performLeave);\n mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });\n }\n }\n\n return rawChild\n }\n};\n\n/* */\n\nvar props = extend({\n tag: String,\n moveClass: String\n}, transitionProps);\n\ndelete props.mode;\n\nvar TransitionGroup = {\n props: props,\n\n beforeMount: function beforeMount () {\n var this$1 = this;\n\n var update = this._update;\n this._update = function (vnode, hydrating) {\n var restoreActiveInstance = setActiveInstance(this$1);\n // force removing pass\n this$1.__patch__(\n this$1._vnode,\n this$1.kept,\n false, // hydrating\n true // removeOnly (!important, avoids unnecessary moves)\n );\n this$1._vnode = this$1.kept;\n restoreActiveInstance();\n update.call(this$1, vnode, hydrating);\n };\n },\n\n render: function render (h) {\n var tag = this.tag || this.$vnode.data.tag || 'span';\n var map = Object.create(null);\n var prevChildren = this.prevChildren = this.children;\n var rawChildren = this.$slots.default || [];\n var children = this.children = [];\n var transitionData = extractTransitionData(this);\n\n for (var i = 0; i < rawChildren.length; i++) {\n var c = rawChildren[i];\n if (c.tag) {\n if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n children.push(c);\n map[c.key] = c\n ;(c.data || (c.data = {})).transition = transitionData;\n } else if (process.env.NODE_ENV !== 'production') {\n var opts = c.componentOptions;\n var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;\n warn((\"<transition-group> children must be keyed: <\" + name + \">\"));\n }\n }\n }\n\n if (prevChildren) {\n var kept = [];\n var removed = [];\n for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {\n var c$1 = prevChildren[i$1];\n c$1.data.transition = transitionData;\n c$1.data.pos = c$1.elm.getBoundingClientRect();\n if (map[c$1.key]) {\n kept.push(c$1);\n } else {\n removed.push(c$1);\n }\n }\n this.kept = h(tag, null, kept);\n this.removed = removed;\n }\n\n return h(tag, null, children)\n },\n\n updated: function updated () {\n var children = this.prevChildren;\n var moveClass = this.moveClass || ((this.name || 'v') + '-move');\n if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n return\n }\n\n // we divide the work into three loops to avoid mixing DOM reads and writes\n // in each iteration - which helps prevent layout thrashing.\n children.forEach(callPendingCbs);\n children.forEach(recordPosition);\n children.forEach(applyTranslation);\n\n // force reflow to put everything in position\n // assign to this to avoid being removed in tree-shaking\n // $flow-disable-line\n this._reflow = document.body.offsetHeight;\n\n children.forEach(function (c) {\n if (c.data.moved) {\n var el = c.elm;\n var s = el.style;\n addTransitionClass(el, moveClass);\n s.transform = s.WebkitTransform = s.transitionDuration = '';\n el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {\n if (e && e.target !== el) {\n return\n }\n if (!e || /transform$/.test(e.propertyName)) {\n el.removeEventListener(transitionEndEvent, cb);\n el._moveCb = null;\n removeTransitionClass(el, moveClass);\n }\n });\n }\n });\n },\n\n methods: {\n hasMove: function hasMove (el, moveClass) {\n /* istanbul ignore if */\n if (!hasTransition) {\n return false\n }\n /* istanbul ignore if */\n if (this._hasMove) {\n return this._hasMove\n }\n // Detect whether an element with the move class applied has\n // CSS transitions. Since the element may be inside an entering\n // transition at this very moment, we make a clone of it and remove\n // all other transition classes applied to ensure only the move class\n // is applied.\n var clone = el.cloneNode();\n if (el._transitionClasses) {\n el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });\n }\n addClass(clone, moveClass);\n clone.style.display = 'none';\n this.$el.appendChild(clone);\n var info = getTransitionInfo(clone);\n this.$el.removeChild(clone);\n return (this._hasMove = info.hasTransform)\n }\n }\n};\n\nfunction callPendingCbs (c) {\n /* istanbul ignore if */\n if (c.elm._moveCb) {\n c.elm._moveCb();\n }\n /* istanbul ignore if */\n if (c.elm._enterCb) {\n c.elm._enterCb();\n }\n}\n\nfunction recordPosition (c) {\n c.data.newPos = c.elm.getBoundingClientRect();\n}\n\nfunction applyTranslation (c) {\n var oldPos = c.data.pos;\n var newPos = c.data.newPos;\n var dx = oldPos.left - newPos.left;\n var dy = oldPos.top - newPos.top;\n if (dx || dy) {\n c.data.moved = true;\n var s = c.elm.style;\n s.transform = s.WebkitTransform = \"translate(\" + dx + \"px,\" + dy + \"px)\";\n s.transitionDuration = '0s';\n }\n}\n\nvar platformComponents = {\n Transition: Transition,\n TransitionGroup: TransitionGroup\n};\n\n/* */\n\n// install platform specific utils\nVue.config.mustUseProp = mustUseProp;\nVue.config.isReservedTag = isReservedTag;\nVue.config.isReservedAttr = isReservedAttr;\nVue.config.getTagNamespace = getTagNamespace;\nVue.config.isUnknownElement = isUnknownElement;\n\n// install platform runtime directives & components\nextend(Vue.options.directives, platformDirectives);\nextend(Vue.options.components, platformComponents);\n\n// install platform patch function\nVue.prototype.__patch__ = inBrowser ? patch : noop;\n\n// public mount method\nVue.prototype.$mount = function (\n el,\n hydrating\n) {\n el = el && inBrowser ? query(el) : undefined;\n return mountComponent(this, el, hydrating)\n};\n\n// devtools global hook\n/* istanbul ignore next */\nif (inBrowser) {\n setTimeout(function () {\n if (config.devtools) {\n if (devtools) {\n devtools.emit('init', Vue);\n } else if (\n process.env.NODE_ENV !== 'production' &&\n process.env.NODE_ENV !== 'test'\n ) {\n console[console.info ? 'info' : 'log'](\n 'Download the Vue Devtools extension for a better development experience:\\n' +\n 'https://github.com/vuejs/vue-devtools'\n );\n }\n }\n if (process.env.NODE_ENV !== 'production' &&\n process.env.NODE_ENV !== 'test' &&\n config.productionTip !== false &&\n typeof console !== 'undefined'\n ) {\n console[console.info ? 'info' : 'log'](\n \"You are running Vue in development mode.\\n\" +\n \"Make sure to turn on production mode when deploying for production.\\n\" +\n \"See more tips at https://vuejs.org/guide/deployment.html\"\n );\n }\n }, 0);\n}\n\n/* */\n\nexport default Vue;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue/dist/vue.runtime.esm.js\n// module id = 3\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 4\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!vue-style-loader!css-loader?minimize!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-44998ed8\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./TreeView.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./TreeView.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./TreeView.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-44998ed8\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./TreeView.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/TreeView.vue\n// module id = 5\n// module chunks = 0","<template>\n <div>\n <app-navbar></app-navbar>\n <div class=\"section\">\n <div class=\"container\">\n <div class=\"columns\">\n <div class=\"column is-3\">\n <app-navmenu></app-navmenu>\n </div>\n <div class=\"column\">\n <app-options v-if=\"page == 'options'\"></app-options>\n <app-passview v-if=\"page == 'passes'\"></app-passview>\n <app-rendertaskview v-if=\"page == 'render_tasks'\"></app-rendertaskview>\n <app-documentview v-if=\"page == 'documents'\"></app-documentview>\n <app-clipscrolltreeview v-if=\"page == 'clip_scroll_tree'\"></app-clipscrolltreeview>\n <app-screenshotview v-if=\"page == 'screenshot'\"></app-screenshotview>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport NavBar from './components/NavBar.vue'\nimport NavMenu from './components/NavMenu.vue'\nimport OptionsPage from './components/OptionsPage.vue'\nimport PassViewPage from './components/PassViewPage.vue'\nimport RenderTaskViewPage from './components/RenderTaskViewPage.vue'\nimport DocumentViewPage from './components/DocumentViewPage.vue'\nimport ClipScrollTreeViewPage from './components/ClipScrollTreeViewPage.vue'\nimport ScreenshotPage from './components/ScreenshotPage.vue'\n\nexport default {\n name: 'app',\n components: {\n 'app-navbar': NavBar,\n 'app-navmenu': NavMenu,\n 'app-options': OptionsPage,\n 'app-passview': PassViewPage,\n 'app-rendertaskview': RenderTaskViewPage,\n 'app-documentview': DocumentViewPage,\n 'app-clipscrolltreeview': ClipScrollTreeViewPage,\n 'app-screenshotview': ScreenshotPage,\n },\n computed: {\n page() {\n return this.$store.state.page;\n }\n },\n}\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/App.vue","<template>\n <nav class=\"navbar has-shadow\">\n <div class=\"navbar-brand\">\n <a class=\"navbar-item\" href=\"#\">WebRender Debugger</a>\n </div>\n\n <div class=\"navbar-menu\">\n <div class=\"navbar-start\"></div>\n\n <div class=\"navbar-end\">\n <div class=\"navbar-item\">\n <p class=\"control\">\n <button v-if=\"isConnected\" @click=\"disconnect\" class=\"button is-danger\">Disconnect</button>\n <button v-else @click=\"connect\" class=\"button is-success\">Connect</button>\n </p>\n </div>\n </div>\n </div>\n </nav>\n</template>\n\n<script>\nexport default {\n computed: {\n isConnected() {\n return this.$store.state.connected;\n },\n },\n methods: {\n connect() {\n this.$store.dispatch('connect');\n },\n disconnect() {\n this.$store.dispatch('disconnect');\n },\n }\n}\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/components/NavBar.vue","<template>\n <aside class=\"menu\">\n <p class=\"menu-label\">\n Pages\n </p>\n <ul class=\"menu-list\">\n <li><a @click=\"setPage('options')\" :class=\"{ 'is-active': page == 'options' }\">Debug Options</a></li>\n <li><a @click=\"setPage('passes')\" :class=\"{ 'is-active': page == 'passes' }\">Passes</a></li>\n <li><a @click=\"setPage('render_tasks')\" :class=\"{ 'is-active': page == 'render_tasks' }\">Render Tasks</a></li>\n <li><a @click=\"setPage('documents')\" :class=\"{ 'is-active': page == 'documents' }\">Documents</a></li>\n <li><a @click=\"setPage('clip_scroll_tree')\" v-bind:class=\"{ 'is-active': page == 'clip_scroll_tree' }\">Clip-Scroll Tree</a></li>\n <li><a @click=\"setPage('screenshot')\" v-bind:class=\"{ 'is-active': page == 'screenshot' }\">Screenshot</a></li>\n </ul>\n </aside>\n</template>\n\n<script>\nexport default {\n methods: {\n setPage(name) {\n this.$store.commit('setPage', name);\n },\n },\n computed: {\n page() {\n return this.$store.state.page;\n }\n },\n}\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/components/NavMenu.vue","<template>\n <div class=\"box\">\n <div class=\"field\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" :disabled=\"disabled\" v-on:click=\"setProfiler($event.target.checked)\">\n Profiler\n </label>\n </div>\n <div class=\"field\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" :disabled=\"disabled\" v-on:click=\"setTextureCacheDebugger($event.target.checked)\">\n Texture cache debugger\n </label>\n </div>\n <div class=\"field\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" :disabled=\"disabled\" v-on:click=\"setRenderTargetDebugger($event.target.checked)\">\n Render target debugger\n </label>\n </div>\n <div class=\"field\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" :disabled=\"disabled\" v-on:click=\"setAlphaRectsDebugger($event.target.checked)\">\n Alpha primitive rects debugger\n </label>\n </div>\n <div class=\"field\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" :disabled=\"disabled\" v-on:click=\"setGpuTimeQueries($event.target.checked)\">\n Enable GPU time queries\n </label>\n </div>\n <div class=\"field\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" :disabled=\"disabled\" v-on:click=\"setGpuSampleQueries($event.target.checked)\">\n Enable GPU sample queries\n </label>\n </div>\n <div class=\"field\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" :disabled=\"disabled\" v-on:click=\"setOpaquePass(!$event.target.checked)\">\n Disable opaque pass\n </label>\n </div>\n <div class=\"field\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" :disabled=\"disabled\" v-on:click=\"setAlphaPass(!$event.target.checked)\">\n Disable alpha pass\n </label>\n </div>\n <div class=\"field\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" :disabled=\"disabled\" v-on:click=\"setClipMasks(!$event.target.checked)\">\n Disable clip masks\n </label>\n </div>\n <div class=\"field\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" :disabled=\"disabled\" v-on:click=\"setTextPrims(!$event.target.checked)\">\n Disable text primitives\n </label>\n </div>\n <div class=\"field\">\n <label class=\"checkbox\">\n <input type=\"checkbox\" :disabled=\"disabled\" v-on:click=\"setGradientPrims(!$event.target.checked)\">\n Disable gradient primitives\n </label>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n computed: {\n disabled() {\n return !this.$store.state.connected\n }\n },\n methods: {\n setProfiler(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_profiler\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_profiler\");\n }\n },\n setTextureCacheDebugger(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_texture_cache_debug\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_texture_cache_debug\");\n }\n },\n setRenderTargetDebugger(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_render_target_debug\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_render_target_debug\");\n }\n },\n setAlphaRectsDebugger(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_alpha_rects_debug\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_alpha_rects_debug\");\n }\n },\n setGpuTimeQueries(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_gpu_time_queries\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_gpu_time_queries\");\n }\n },\n setGpuSampleQueries(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_gpu_sample_queries\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_gpu_sample_queries\");\n }\n },\n setOpaquePass(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_opaque_pass\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_opaque_pass\");\n }\n },\n setAlphaPass(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_alpha_pass\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_alpha_pass\");\n }\n },\n setClipMasks(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_clip_masks\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_clip_masks\");\n }\n },\n setTextPrims(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_text_prims\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_text_prims\");\n }\n },\n setGradientPrims(enabled) {\n if (enabled) {\n this.$store.dispatch('sendMessage', \"enable_gradient_prims\");\n } else {\n this.$store.dispatch('sendMessage', \"disable_gradient_prims\");\n }\n }\n },\n}\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/components/OptionsPage.vue","<template>\n <div class=\"box\">\n <h1 class=\"title\">Passes <a :disabled=\"disabled\" v-on:click=\"fetch\" class=\"button is-info\">Refresh</a></h1>\n <hr/>\n <div v-for=\"(pass, pass_index) in passes\">\n <p class=\"has-text-black-bis\">Pass {{pass_index}}</p>\n <div v-for=\"(target, target_index) in pass.targets\">\n <p style=\"text-indent: 2em;\" class=\"has-text-grey-dark\">Target {{target_index}} ({{target.kind}})</p>\n <div v-for=\"(batch, batch_index) in target.batches\">\n <p style=\"text-indent: 4em;\" class=\"has-text-grey\">Batch {{batch_index}} ({{batch.description}}, {{batch.kind}}, {{batch.count}} instances)</p>\n </div>\n </div>\n <hr/>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n methods: {\n fetch: function() {\n this.$store.dispatch('sendMessage', \"fetch_passes\");\n }\n },\n computed: {\n disabled() {\n return !this.$store.state.connected\n },\n passes() {\n return this.$store.state.passes\n }\n },\n}\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/components/PassViewPage.vue","<template>\n <div class=\"box\">\n <h1 class=\"title\">Render Tasks <a :disabled=\"disabled\" v-on:click=\"fetch\" class=\"button is-info\">Refresh</a></h1>\n <hr/>\n <div>\n <ul>\n <app-treeview :model=render_tasks></app-treeview>\n </ul>\n </div>\n </div>\n</template>\n\n<script>\nimport TreeView from './TreeView.vue'\n\nexport default {\n components: {\n 'app-treeview': TreeView,\n },\n methods: {\n fetch: function() {\n this.$store.dispatch('sendMessage', \"fetch_render_tasks\");\n }\n },\n computed: {\n disabled() {\n return !this.$store.state.connected\n },\n render_tasks() {\n return this.$store.state.render_tasks\n }\n },\n}\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/components/RenderTaskViewPage.vue","<template>\n <li>\n <div v-on:click=\"toggle\">\n <span v-if=\"isFolder\">[{{open ? '-' : '+'}}]</span>\n {{model.description}}\n </div>\n <ul style=\"padding-left: 1em; line-height: 1.5em;\" v-show=\"open\" v-if=\"isFolder\">\n <treeview v-for=\"model in model.children\" :model=\"model\"></treeview>\n </ul>\n </li>\n</template>\n\n<script>\nexport default {\n name: 'treeview',\n props: [\n 'model',\n ],\n data: function () {\n return {\n open: false\n }\n },\n computed: {\n isFolder: function () {\n return this.model.children && this.model.children.length\n }\n },\n methods: {\n toggle: function () {\n if (this.isFolder) {\n this.open = !this.open\n }\n },\n },\n}\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/components/TreeView.vue","<template>\n <div class=\"box\">\n <h1 class=\"title\">Documents <a :disabled=\"disabled\" v-on:click=\"fetch\" class=\"button is-info\">Refresh</a></h1>\n <hr/>\n <div>\n <ul>\n <app-treeview :model=documents></app-treeview>\n </ul>\n </div>\n </div>\n</template>\n\n<script>\nimport TreeView from './TreeView.vue'\n\nexport default {\n components: {\n 'app-treeview': TreeView,\n },\n methods: {\n fetch: function() {\n this.$store.dispatch('sendMessage', \"fetch_documents\");\n }\n },\n computed: {\n disabled() {\n return !this.$store.state.connected\n },\n documents() {\n return this.$store.state.documents\n }\n },\n}\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/components/DocumentViewPage.vue","<template>\n <div class=\"box\">\n <h1 class=\"title\">Clip-Scroll Tree <a :disabled=\"disabled\" v-on:click=\"fetch\" class=\"button is-info\">Refresh</a></h1>\n <hr/>\n <div>\n <ul>\n <app-treeview :model=clip_scroll_tree></app-treeview>\n </ul>\n </div>\n </div>\n</template>\n\n<script>\nimport TreeView from './TreeView.vue'\n\nexport default {\n components: {\n 'app-treeview': TreeView,\n },\n methods: {\n fetch: function() {\n this.$store.dispatch('sendMessage', \"fetch_clip_scroll_tree\");\n }\n },\n computed: {\n disabled() {\n return !this.$store.state.connected\n },\n clip_scroll_tree() {\n return this.$store.state.clip_scroll_tree\n }\n },\n}\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/components/ClipScrollTreeViewPage.vue","<template>\n <div class=\"box\">\n <h1 class=\"title\">Screenshot <a :disabled=\"disabled\" v-on:click=\"fetch\" class=\"button is-info\">Refresh</a></h1>\n <hr/>\n <div>\n <ul>\n <img v-if=\"screenshot.length > 0\" style=\"transform: scaleY(-1); width: 1024px; height:768px\" :src=\"'data:image/png;base64,' + screenshot\" />\n </ul>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n computed: {\n disabled() {\n return !this.$store.state.connected\n },\n screenshot() {\n return this.$store.state.screenshot\n },\n },\n methods: {\n fetch: function() {\n this.$store.dispatch('sendMessage', \"fetch_screenshot\");\n }\n },\n}\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/components/ScreenshotPage.vue","import Vue from 'vue';\nimport Buefy from 'buefy';\nimport 'buefy/dist/buefy.css';\nimport \"vue-material-design-icons/styles.css\";\nimport App from './App.vue';\nimport store from './store';\n\nVue.use(Buefy);\n\nnew Vue({\n el: '#app',\n store,\n render: h => h(App)\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/timers-browserify/main.js\n// module id = 17\n// module chunks = 0","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/setimmediate/setImmediate.js\n// module id = 18\n// module chunks = 0","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/process/browser.js\n// module id = 19\n// module chunks = 0","/*! Buefy v0.6.7 | MIT License | github.com/buefy/buefy */ \n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"vue\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Buefy\"] = factory(require(\"vue\"));\n\telse\n\t\troot[\"Buefy\"] = factory(root[\"Vue\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_23__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 68);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\n/* globals __VUE_SSR_CONTEXT__ */\n\n// this module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = injectStyles\n }\n\n if (hook) {\n var functional = options.functional\n var existing = functional\n ? options.render\n : options.beforeCreate\n if (!functional) {\n // inject component registration as beforeCreate hook\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n } else {\n // register for functioal component in vue file\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return existing(h, context)\n }\n }\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _defineProperty = __webpack_require__(100);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (obj, key, value) {\n if (key in obj) {\n (0, _defineProperty2.default)(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return setOptions; });\nvar config = {\n defaultContainerElement: null,\n defaultIconPack: 'mdi',\n defaultDialogConfirmText: null,\n defaultDialogCancelText: null,\n defaultSnackbarDuration: 3500,\n defaultToastDuration: 2000,\n defaultTooltipType: 'is-primary',\n defaultTooltipAnimated: false,\n defaultInputAutocomplete: 'on',\n defaultDateFormatter: null,\n defaultDateParser: null,\n defaultDayNames: null,\n defaultMonthNames: null,\n defaultFirstDayOfWeek: null,\n defaultUnselectableDaysOfWeek: null,\n defaultTimeFormatter: null,\n defaultTimeParser: null,\n defaultModalScroll: null,\n defaultDatepickerMobileNative: true,\n defaultTimepickerMobileNative: true,\n defaultNoticeQueue: true,\n defaultInputHasCounter: true\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (config);\n\nvar setOptions = function setOptions(options) {\n config = options;\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(104),\n /* template */\n __webpack_require__(105),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar store = __webpack_require__(34)('wks');\nvar uid = __webpack_require__(25);\nvar Symbol = __webpack_require__(7).Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(87), __esModule: true };\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = getValueByPath;\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = indexOf;\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return isMobile; });\n/* harmony export (immutable) */ __webpack_exports__[\"e\"] = removeElement;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = escapeRegExpChars;\n/**\r\n * Get value of an object property/path even if it's nested\r\n */\nfunction getValueByPath(obj, path) {\n var value = path.split('.').reduce(function (o, i) {\n return o[i];\n }, obj);\n return value;\n}\n\n/**\r\n * Extension of indexOf method by equality function if specified\r\n */\nfunction indexOf(array, obj, fn) {\n if (!array) return -1;\n\n if (!fn || typeof fn !== 'function') return array.indexOf(obj);\n\n for (var i = 0; i < array.length; i++) {\n if (fn(array[i], obj)) {\n return i;\n }\n }\n\n return -1;\n}\n\n/**\r\n * Mobile detection\r\n * https://www.abeautifulsite.net/detecting-mobile-devices-with-javascript\r\n */\nvar isMobile = {\n Android: function Android() {\n return typeof window !== 'undefined' && window.navigator.userAgent.match(/Android/i);\n },\n BlackBerry: function BlackBerry() {\n return typeof window !== 'undefined' && window.navigator.userAgent.match(/BlackBerry/i);\n },\n iOS: function iOS() {\n return typeof window !== 'undefined' && window.navigator.userAgent.match(/iPhone|iPad|iPod/i);\n },\n Opera: function Opera() {\n return typeof window !== 'undefined' && window.navigator.userAgent.match(/Opera Mini/i);\n },\n Windows: function Windows() {\n return typeof window !== 'undefined' && window.navigator.userAgent.match(/IEMobile/i);\n },\n any: function any() {\n return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows();\n }\n};\n\nfunction removeElement(el) {\n if (typeof el.remove !== 'undefined') {\n el.remove();\n } else {\n el.parentNode.removeChild(el);\n }\n}\n\n/**\r\n * Escape regex characters\r\n * http://stackoverflow.com/a/6969486\r\n */\nfunction escapeRegExpChars(value) {\n if (!value) return value;\n\n // eslint-disable-next-line\n return value.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n}\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports) {\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\nvar core = module.exports = { version: '2.5.5' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(16);\nvar IE8_DOM_DEFINE = __webpack_require__(47);\nvar toPrimitive = __webpack_require__(29);\nvar dP = Object.defineProperty;\n\nexports.f = __webpack_require__(10) ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(20)(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\nvar hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BaseElementMixin__ = __webpack_require__(13);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n mixins: [__WEBPACK_IMPORTED_MODULE_0__BaseElementMixin__[\"a\" /* default */]],\n props: {\n size: String,\n expanded: Boolean,\n loading: Boolean,\n rounded: Boolean,\n icon: String,\n // Native options to use in HTML5 validation\n autocomplete: String,\n maxlength: [Number, String]\n },\n data: function data() {\n return {\n isValid: true,\n isFocused: false\n };\n },\n\n computed: {\n /**\r\n * Find parent Field, max 3 levels deep.\r\n */\n parentField: function parentField() {\n var parent = this.$parent;\n for (var i = 0; i < 3; i++) {\n if (parent && !parent.$data._isField) {\n parent = parent.$parent;\n }\n }\n return parent;\n },\n\n\n /**\r\n * Get the type prop from parent if it's a Field.\r\n */\n statusType: function statusType() {\n if (!this.parentField) return;\n\n return this.parentField.newType;\n },\n\n\n /**\r\n * Get the message prop from parent if it's a Field.\r\n */\n statusMessage: function statusMessage() {\n if (!this.parentField) return;\n\n return this.parentField.newMessage;\n },\n\n\n /**\r\n * Fix icon size for inputs, large was too big\r\n */\n iconSize: function iconSize() {\n switch (this.size) {\n case 'is-small':\n return this.size;\n case 'is-medium':\n return;\n case 'is-large':\n return this.newIconPack === 'mdi' ? 'is-medium' : '';\n }\n }\n },\n methods: {\n /**\r\n * Focus method that work dynamically depending on the component.\r\n */\n focus: function focus() {\n var _this = this;\n\n if (this.$data._elementRef === undefined) return;\n\n this.$nextTick(function () {\n return _this.$el.querySelector(_this.$data._elementRef).focus();\n });\n },\n onBlur: function onBlur($event) {\n this.isFocused = false;\n this.$emit('blur', $event);\n this.checkHtml5Validity();\n },\n onFocus: function onFocus($event) {\n this.isFocused = true;\n this.$emit('focus', $event);\n },\n\n\n /**\r\n * Check HTML5 validation, set isValid property.\r\n * If validation fail, send 'is-danger' type,\r\n * and error message to parent if it's a Field.\r\n */\n checkHtml5Validity: function checkHtml5Validity() {\n if (this.$refs[this.$data._elementRef] === undefined) return;\n\n var el = this.$el.querySelector(this.$data._elementRef);\n\n var type = null;\n var message = null;\n var isValid = true;\n if (!el.checkValidity()) {\n type = 'is-danger';\n message = el.validationMessage;\n isValid = false;\n }\n this.isValid = isValid;\n\n if (this.parentField) {\n // Set type only if not defined\n if (!this.parentField.type) {\n this.parentField.newType = type;\n }\n // Set message only if not defined\n if (!this.parentField.message) {\n this.parentField.newMessage = message;\n }\n }\n\n return this.isValid;\n }\n }\n});\n\n/***/ }),\n/* 13 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(2);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n props: {\n iconPack: String\n },\n data: function data() {\n return {\n newIconPack: this.iconPack || __WEBPACK_IMPORTED_MODULE_0__config__[\"a\" /* default */].defaultIconPack\n };\n }\n});\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(69), __esModule: true };\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dP = __webpack_require__(9);\nvar createDesc = __webpack_require__(21);\nmodule.exports = __webpack_require__(10) ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(19);\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = __webpack_require__(50);\nvar defined = __webpack_require__(31);\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(7);\nvar core = __webpack_require__(8);\nvar ctx = __webpack_require__(46);\nvar hide = __webpack_require__(15);\nvar has = __webpack_require__(11);\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && has(exports, key)) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports) {\n\nmodule.exports = {};\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_23__;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = __webpack_require__(49);\nvar enumBugKeys = __webpack_require__(35);\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\nvar id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\nexports.f = {}.propertyIsEnumerable;\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(103),\n /* template */\n __webpack_require__(106),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(126),\n /* template */\n __webpack_require__(127),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = __webpack_require__(19);\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports) {\n\nvar toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports) {\n\n// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports) {\n\n// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar shared = __webpack_require__(34)('keys');\nvar uid = __webpack_require__(25);\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(7);\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports) {\n\n// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports) {\n\nexports.f = Object.getOwnPropertySymbols;\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.13 ToObject(argument)\nvar defined = __webpack_require__(31);\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $at = __webpack_require__(79)(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\n__webpack_require__(54)(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports) {\n\nmodule.exports = true;\n\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar def = __webpack_require__(9).f;\nvar has = __webpack_require__(11);\nvar TAG = __webpack_require__(4)('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports.f = __webpack_require__(4);\n\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(7);\nvar core = __webpack_require__(8);\nvar LIBRARY = __webpack_require__(39);\nvar wksExt = __webpack_require__(41);\nvar defineProperty = __webpack_require__(9).f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(118),\n /* template */\n __webpack_require__(119),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(120),\n /* template */\n __webpack_require__(121),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(122),\n /* template */\n __webpack_require__(125),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// optional / simple context binding\nvar aFunction = __webpack_require__(71);\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = !__webpack_require__(10) && !__webpack_require__(20)(function () {\n return Object.defineProperty(__webpack_require__(48)('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(19);\nvar document = __webpack_require__(7).document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar has = __webpack_require__(11);\nvar toIObject = __webpack_require__(17);\nvar arrayIndexOf = __webpack_require__(73)(false);\nvar IE_PROTO = __webpack_require__(33)('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = __webpack_require__(30);\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.15 ToLength\nvar toInteger = __webpack_require__(32);\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(76),\n /* template */\n __webpack_require__(107),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _iterator = __webpack_require__(77);\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = __webpack_require__(5);\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar LIBRARY = __webpack_require__(39);\nvar $export = __webpack_require__(18);\nvar redefine = __webpack_require__(55);\nvar hide = __webpack_require__(15);\nvar Iterators = __webpack_require__(22);\nvar $iterCreate = __webpack_require__(80);\nvar setToStringTag = __webpack_require__(40);\nvar getPrototypeOf = __webpack_require__(83);\nvar ITERATOR = __webpack_require__(4)('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(15);\n\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = __webpack_require__(16);\nvar dPs = __webpack_require__(81);\nvar enumBugKeys = __webpack_require__(35);\nvar IE_PROTO = __webpack_require__(33)('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(48)('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n __webpack_require__(82).appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(84);\nvar global = __webpack_require__(7);\nvar hide = __webpack_require__(15);\nvar Iterators = __webpack_require__(22);\nvar TO_STRING_TAG = __webpack_require__(4)('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = __webpack_require__(49);\nvar hiddenKeys = __webpack_require__(35).concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(97), __esModule: true };\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar classof = __webpack_require__(99);\nvar ITERATOR = __webpack_require__(4)('iterator');\nvar Iterators = __webpack_require__(22);\nmodule.exports = __webpack_require__(8).getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(108),\n /* template */\n __webpack_require__(109),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(137),\n /* template */\n __webpack_require__(138),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 63 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__components_icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__BaseElementMixin__ = __webpack_require__(13);\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n mixins: [__WEBPACK_IMPORTED_MODULE_2__BaseElementMixin__[\"a\" /* default */]],\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon___default.a),\n props: {\n active: {\n type: Boolean,\n default: true\n },\n title: String,\n closable: {\n type: Boolean,\n default: true\n },\n type: String,\n hasIcon: Boolean,\n size: String,\n iconSize: String,\n autoClose: {\n type: Boolean,\n default: false\n },\n duration: {\n type: Number,\n default: 5000\n }\n },\n data: function data() {\n return {\n isActive: this.active\n };\n },\n\n watch: {\n active: function active(value) {\n this.isActive = value;\n },\n isActive: function isActive(value) {\n if (value) {\n this.setAutoClose();\n } else {\n if (this.timer) {\n clearTimeout(this.timer);\n }\n }\n }\n },\n computed: {\n /**\r\n * Icon name (MDI) based on type.\r\n */\n icon: function icon() {\n switch (this.type) {\n case 'is-info':\n return 'information';\n case 'is-success':\n return 'check-circle';\n case 'is-warning':\n return 'alert';\n case 'is-danger':\n return 'alert-circle';\n default:\n return null;\n }\n }\n },\n methods: {\n /**\r\n * Close the Message and emit events.\r\n */\n close: function close() {\n this.isActive = false;\n this.$emit('close');\n this.$emit('update:active', false);\n },\n\n /**\r\n * Set timer to auto close message\r\n */\n setAutoClose: function setAutoClose() {\n var _this = this;\n\n if (this.autoClose) {\n this.timer = setTimeout(function () {\n if (_this.isActive) {\n _this.close();\n }\n }, this.duration);\n }\n }\n },\n mounted: function mounted() {\n this.setAutoClose();\n }\n});\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(149),\n /* template */\n __webpack_require__(150),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 65 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helpers__ = __webpack_require__(6);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n props: {\n type: {\n type: String,\n default: 'is-dark'\n },\n message: String,\n duration: Number,\n queue: {\n type: Boolean,\n default: undefined\n },\n position: {\n type: String,\n default: 'is-top',\n validator: function validator(value) {\n return ['is-top-right', 'is-top', 'is-top-left', 'is-bottom-right', 'is-bottom', 'is-bottom-left'].indexOf(value) > -1;\n }\n },\n container: String\n },\n data: function data() {\n return {\n isActive: false,\n parentTop: null,\n parentBottom: null,\n newContainer: this.container || __WEBPACK_IMPORTED_MODULE_0__config__[\"a\" /* default */].defaultContainerElement\n };\n },\n\n computed: {\n correctParent: function correctParent() {\n switch (this.position) {\n case 'is-top-right':\n case 'is-top':\n case 'is-top-left':\n return this.parentTop;\n\n case 'is-bottom-right':\n case 'is-bottom':\n case 'is-bottom-left':\n return this.parentBottom;\n }\n },\n transition: function transition() {\n switch (this.position) {\n case 'is-top-right':\n case 'is-top':\n case 'is-top-left':\n return {\n enter: 'fadeInDown',\n leave: 'fadeOut'\n };\n case 'is-bottom-right':\n case 'is-bottom':\n case 'is-bottom-left':\n return {\n enter: 'fadeInUp',\n leave: 'fadeOut'\n };\n }\n }\n },\n methods: {\n shouldQueue: function shouldQueue() {\n var queue = this.queue !== undefined ? this.queue : __WEBPACK_IMPORTED_MODULE_0__config__[\"a\" /* default */].defaultNoticeQueue;\n\n if (!queue) return false;\n\n return this.parentTop.childElementCount > 0 || this.parentBottom.childElementCount > 0;\n },\n close: function close() {\n var _this = this;\n\n clearTimeout(this.timer);\n this.isActive = false;\n\n // Timeout for the animation complete before destroying\n setTimeout(function () {\n _this.$destroy();\n Object(__WEBPACK_IMPORTED_MODULE_1__helpers__[\"e\" /* removeElement */])(_this.$el);\n }, 150);\n },\n showNotice: function showNotice() {\n var _this2 = this;\n\n if (this.shouldQueue()) {\n // Call recursively if should queue\n setTimeout(function () {\n return _this2.showNotice();\n }, 250);\n return;\n }\n this.correctParent.insertAdjacentElement('afterbegin', this.$el);\n this.isActive = true;\n\n if (!this.indefinite) {\n this.timer = setTimeout(function () {\n return _this2.close();\n }, this.newDuration);\n }\n },\n setupContainer: function setupContainer() {\n this.parentTop = document.querySelector('.notices.is-top');\n this.parentBottom = document.querySelector('.notices.is-bottom');\n\n if (this.parentTop && this.parentBottom) return;\n\n if (!this.parentTop) {\n this.parentTop = document.createElement('div');\n this.parentTop.className = 'notices is-top';\n }\n\n if (!this.parentBottom) {\n this.parentBottom = document.createElement('div');\n this.parentBottom.className = 'notices is-bottom';\n }\n\n var container = document.querySelector(this.newContainer) || document.body;\n\n container.appendChild(this.parentTop);\n container.appendChild(this.parentBottom);\n\n if (this.newContainer) {\n this.parentTop.classList.add('has-custom-container');\n this.parentBottom.classList.add('has-custom-container');\n }\n }\n },\n beforeMount: function beforeMount() {\n this.setupContainer();\n },\n mounted: function mounted() {\n this.showNotice();\n }\n});\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(179),\n /* template */\n __webpack_require__(180),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(188),\n /* template */\n __webpack_require__(189),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 68 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\nvar components_namespaceObject = {};\n__webpack_require__.d(components_namespaceObject, \"Autocomplete\", function() { return autocomplete; });\n__webpack_require__.d(components_namespaceObject, \"Checkbox\", function() { return components_checkbox; });\n__webpack_require__.d(components_namespaceObject, \"Collapse\", function() { return collapse; });\n__webpack_require__.d(components_namespaceObject, \"Datepicker\", function() { return datepicker; });\n__webpack_require__.d(components_namespaceObject, \"Dialog\", function() { return dialog; });\n__webpack_require__.d(components_namespaceObject, \"Dropdown\", function() { return dropdown; });\n__webpack_require__.d(components_namespaceObject, \"Field\", function() { return field; });\n__webpack_require__.d(components_namespaceObject, \"Icon\", function() { return icon; });\n__webpack_require__.d(components_namespaceObject, \"Input\", function() { return input; });\n__webpack_require__.d(components_namespaceObject, \"Loading\", function() { return loading; });\n__webpack_require__.d(components_namespaceObject, \"Message\", function() { return components_message; });\n__webpack_require__.d(components_namespaceObject, \"Modal\", function() { return modal; });\n__webpack_require__.d(components_namespaceObject, \"Notification\", function() { return notification; });\n__webpack_require__.d(components_namespaceObject, \"Pagination\", function() { return pagination; });\n__webpack_require__.d(components_namespaceObject, \"Panel\", function() { return panel; });\n__webpack_require__.d(components_namespaceObject, \"Radio\", function() { return components_radio; });\n__webpack_require__.d(components_namespaceObject, \"Select\", function() { return components_select; });\n__webpack_require__.d(components_namespaceObject, \"Snackbar\", function() { return snackbar; });\n__webpack_require__.d(components_namespaceObject, \"Switch\", function() { return components_switch; });\n__webpack_require__.d(components_namespaceObject, \"Table\", function() { return table; });\n__webpack_require__.d(components_namespaceObject, \"Tabs\", function() { return tabs; });\n__webpack_require__.d(components_namespaceObject, \"Tag\", function() { return tag; });\n__webpack_require__.d(components_namespaceObject, \"Taginput\", function() { return taginput; });\n__webpack_require__.d(components_namespaceObject, \"Timepicker\", function() { return timepicker; });\n__webpack_require__.d(components_namespaceObject, \"Toast\", function() { return toast; });\n__webpack_require__.d(components_namespaceObject, \"Tooltip\", function() { return tooltip; });\n__webpack_require__.d(components_namespaceObject, \"Upload\", function() { return upload; });\n\n// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/assign.js\nvar object_assign = __webpack_require__(14);\nvar assign_default = /*#__PURE__*/__webpack_require__.n(object_assign);\n\n// EXTERNAL MODULE: ./src/scss/buefy-build.scss\nvar buefy_build = __webpack_require__(75);\nvar buefy_build_default = /*#__PURE__*/__webpack_require__.n(buefy_build);\n\n// EXTERNAL MODULE: ./src/components/autocomplete/Autocomplete.vue\nvar Autocomplete = __webpack_require__(52);\nvar Autocomplete_default = /*#__PURE__*/__webpack_require__.n(Autocomplete);\n\n// CONCATENATED MODULE: ./src/utils/plugins.js\n\nvar use = function use(plugin) {\n if (typeof window !== 'undefined' && window.Vue) {\n window.Vue.use(plugin);\n }\n};\n\nvar registerComponent = function registerComponent(Vue, component) {\n Vue.component(component.name, component);\n};\n\nvar registerComponentProgrammatic = function registerComponentProgrammatic(Vue, property, component) {\n Vue.prototype[property] = component;\n};\n// CONCATENATED MODULE: ./src/components/autocomplete/index.js\n\n\n\n\nvar Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Autocomplete_default.a);\n }\n};\n\nuse(Plugin);\n\n/* harmony default export */ var autocomplete = (Plugin);\n// EXTERNAL MODULE: ./src/components/checkbox/Checkbox.vue\nvar Checkbox = __webpack_require__(61);\nvar Checkbox_default = /*#__PURE__*/__webpack_require__.n(Checkbox);\n\n// EXTERNAL MODULE: ./src/components/checkbox/CheckboxButton.vue\nvar CheckboxButton = __webpack_require__(110);\nvar CheckboxButton_default = /*#__PURE__*/__webpack_require__.n(CheckboxButton);\n\n// CONCATENATED MODULE: ./src/components/checkbox/index.js\n\n\n\n\n\nvar checkbox_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Checkbox_default.a);\n registerComponent(Vue, CheckboxButton_default.a);\n }\n};\n\nuse(checkbox_Plugin);\n\n/* harmony default export */ var components_checkbox = (checkbox_Plugin);\n// EXTERNAL MODULE: ./src/components/collapse/Collapse.vue\nvar Collapse = __webpack_require__(113);\nvar Collapse_default = /*#__PURE__*/__webpack_require__.n(Collapse);\n\n// CONCATENATED MODULE: ./src/components/collapse/index.js\n\n\n\n\nvar collapse_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Collapse_default.a);\n }\n};\n\nuse(collapse_Plugin);\n\n/* harmony default export */ var collapse = (collapse_Plugin);\n// EXTERNAL MODULE: ./src/components/datepicker/Datepicker.vue\nvar Datepicker = __webpack_require__(116);\nvar Datepicker_default = /*#__PURE__*/__webpack_require__.n(Datepicker);\n\n// CONCATENATED MODULE: ./src/components/datepicker/index.js\n\n\n\n\nvar datepicker_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Datepicker_default.a);\n }\n};\n\nuse(datepicker_Plugin);\n\n/* harmony default export */ var datepicker = (datepicker_Plugin);\n// EXTERNAL MODULE: external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"amd\":\"vue\",\"root\":\"Vue\"}\nvar external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue__ = __webpack_require__(23);\nvar external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default = /*#__PURE__*/__webpack_require__.n(external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue__);\n\n// EXTERNAL MODULE: ./src/components/dialog/Dialog.vue\nvar Dialog = __webpack_require__(135);\nvar Dialog_default = /*#__PURE__*/__webpack_require__.n(Dialog);\n\n// CONCATENATED MODULE: ./src/components/dialog/index.js\n\n\n\n\n\n\nfunction dialog_open(propsData) {\n var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a;\n var DialogComponent = vm.extend(Dialog_default.a);\n return new DialogComponent({\n el: document.createElement('div'),\n propsData: propsData\n });\n}\n\nvar DialogProgrammatic = {\n alert: function alert(params) {\n var message = void 0;\n if (typeof params === 'string') message = params;\n var defaultParam = {\n canCancel: false,\n message: message\n };\n var propsData = assign_default()(defaultParam, params);\n return dialog_open(propsData);\n },\n confirm: function confirm(params) {\n var defaultParam = {};\n var propsData = assign_default()(defaultParam, params);\n return dialog_open(propsData);\n },\n prompt: function prompt(params) {\n var defaultParam = {\n hasInput: true,\n confirmText: 'Done'\n };\n var propsData = assign_default()(defaultParam, params);\n return dialog_open(propsData);\n }\n};\n\nvar dialog_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Dialog_default.a);\n registerComponentProgrammatic(Vue, '$dialog', DialogProgrammatic);\n }\n};\n\nuse(dialog_Plugin);\n\n/* harmony default export */ var dialog = (dialog_Plugin);\n// EXTERNAL MODULE: ./src/components/dropdown/Dropdown.vue\nvar Dropdown = __webpack_require__(43);\nvar Dropdown_default = /*#__PURE__*/__webpack_require__.n(Dropdown);\n\n// EXTERNAL MODULE: ./src/components/dropdown/DropdownItem.vue\nvar DropdownItem = __webpack_require__(44);\nvar DropdownItem_default = /*#__PURE__*/__webpack_require__.n(DropdownItem);\n\n// CONCATENATED MODULE: ./src/components/dropdown/index.js\n\n\n\n\n\nvar dropdown_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Dropdown_default.a);\n registerComponent(Vue, DropdownItem_default.a);\n }\n};\n\nuse(dropdown_Plugin);\n\n/* harmony default export */ var dropdown = (dropdown_Plugin);\n// EXTERNAL MODULE: ./src/components/field/Field.vue\nvar Field = __webpack_require__(45);\nvar Field_default = /*#__PURE__*/__webpack_require__.n(Field);\n\n// CONCATENATED MODULE: ./src/components/field/index.js\n\n\n\n\nvar field_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Field_default.a);\n }\n};\n\nuse(field_Plugin);\n\n/* harmony default export */ var field = (field_Plugin);\n// EXTERNAL MODULE: ./src/components/icon/Icon.vue\nvar Icon = __webpack_require__(3);\nvar Icon_default = /*#__PURE__*/__webpack_require__.n(Icon);\n\n// CONCATENATED MODULE: ./src/components/icon/index.js\n\n\n\n\nvar icon_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Icon_default.a);\n }\n};\n\nuse(icon_Plugin);\n\n/* harmony default export */ var icon = (icon_Plugin);\n// EXTERNAL MODULE: ./src/components/input/Input.vue\nvar Input = __webpack_require__(27);\nvar Input_default = /*#__PURE__*/__webpack_require__.n(Input);\n\n// CONCATENATED MODULE: ./src/components/input/index.js\n\n\n\n\nvar input_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Input_default.a);\n }\n};\n\nuse(input_Plugin);\n\n/* harmony default export */ var input = (input_Plugin);\n// EXTERNAL MODULE: ./src/components/loading/Loading.vue\nvar Loading = __webpack_require__(140);\nvar Loading_default = /*#__PURE__*/__webpack_require__.n(Loading);\n\n// CONCATENATED MODULE: ./src/components/loading/index.js\n\n\n\n\n\n\nvar LoadingProgrammatic = {\n open: function open(params) {\n var defaultParam = {\n programmatic: true\n };\n var propsData = assign_default()(defaultParam, params);\n\n var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a;\n var LoadingComponent = vm.extend(Loading_default.a);\n return new LoadingComponent({\n el: document.createElement('div'),\n propsData: propsData\n });\n }\n};\n\nvar loading_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Loading_default.a);\n registerComponentProgrammatic(Vue, '$loading', LoadingProgrammatic);\n }\n};\n\nuse(loading_Plugin);\n\n/* harmony default export */ var loading = (loading_Plugin);\n// EXTERNAL MODULE: ./src/components/message/Message.vue\nvar Message = __webpack_require__(143);\nvar Message_default = /*#__PURE__*/__webpack_require__.n(Message);\n\n// CONCATENATED MODULE: ./src/components/message/index.js\n\n\n\n\nvar message_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Message_default.a);\n }\n};\n\nuse(message_Plugin);\n\n/* harmony default export */ var components_message = (message_Plugin);\n// EXTERNAL MODULE: ./src/components/modal/Modal.vue\nvar Modal = __webpack_require__(62);\nvar Modal_default = /*#__PURE__*/__webpack_require__.n(Modal);\n\n// CONCATENATED MODULE: ./src/components/modal/index.js\n\n\n\n\n\n\nvar ModalProgrammatic = {\n open: function open(params) {\n var content = void 0;\n var parent = void 0;\n if (typeof params === 'string') content = params;\n\n var defaultParam = {\n programmatic: true,\n content: content\n };\n if (params.parent) {\n parent = params.parent;\n delete params.parent;\n }\n var propsData = assign_default()(defaultParam, params);\n\n var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a;\n var ModalComponent = vm.extend(Modal_default.a);\n return new ModalComponent({\n parent: parent,\n el: document.createElement('div'),\n propsData: propsData\n });\n }\n};\n\nvar modal_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Modal_default.a);\n registerComponentProgrammatic(Vue, '$modal', ModalProgrammatic);\n }\n};\n\nuse(modal_Plugin);\n\n/* harmony default export */ var modal = (modal_Plugin);\n// EXTERNAL MODULE: ./src/components/notification/Notification.vue\nvar Notification = __webpack_require__(146);\nvar Notification_default = /*#__PURE__*/__webpack_require__.n(Notification);\n\n// CONCATENATED MODULE: ./src/components/notification/index.js\n\n\n\n\nvar notification_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Notification_default.a);\n }\n};\n\nuse(notification_Plugin);\n\n/* harmony default export */ var notification = (notification_Plugin);\n// EXTERNAL MODULE: ./src/components/pagination/Pagination.vue\nvar Pagination = __webpack_require__(64);\nvar Pagination_default = /*#__PURE__*/__webpack_require__.n(Pagination);\n\n// CONCATENATED MODULE: ./src/components/pagination/index.js\n\n\n\n\nvar pagination_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Pagination_default.a);\n }\n};\n\nuse(pagination_Plugin);\n\n/* harmony default export */ var pagination = (pagination_Plugin);\n// EXTERNAL MODULE: ./src/components/panel/Panel.vue\nvar Panel = __webpack_require__(151);\nvar Panel_default = /*#__PURE__*/__webpack_require__.n(Panel);\n\n// CONCATENATED MODULE: ./src/components/panel/index.js\n\n\n\n\nvar panel_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Panel_default.a);\n }\n};\n\nuse(panel_Plugin);\n\n/* harmony default export */ var panel = (panel_Plugin);\n// EXTERNAL MODULE: ./src/components/radio/Radio.vue\nvar Radio = __webpack_require__(154);\nvar Radio_default = /*#__PURE__*/__webpack_require__.n(Radio);\n\n// EXTERNAL MODULE: ./src/components/radio/RadioButton.vue\nvar RadioButton = __webpack_require__(157);\nvar RadioButton_default = /*#__PURE__*/__webpack_require__.n(RadioButton);\n\n// CONCATENATED MODULE: ./src/components/radio/index.js\n\n\n\n\n\nvar radio_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Radio_default.a);\n registerComponent(Vue, RadioButton_default.a);\n }\n};\n\nuse(radio_Plugin);\n\n/* harmony default export */ var components_radio = (radio_Plugin);\n// EXTERNAL MODULE: ./src/components/select/Select.vue\nvar Select = __webpack_require__(28);\nvar Select_default = /*#__PURE__*/__webpack_require__.n(Select);\n\n// CONCATENATED MODULE: ./src/components/select/index.js\n\n\n\n\nvar select_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Select_default.a);\n }\n};\n\nuse(select_Plugin);\n\n/* harmony default export */ var components_select = (select_Plugin);\n// EXTERNAL MODULE: ./src/components/snackbar/Snackbar.vue\nvar Snackbar = __webpack_require__(160);\nvar Snackbar_default = /*#__PURE__*/__webpack_require__.n(Snackbar);\n\n// CONCATENATED MODULE: ./src/components/snackbar/index.js\n\n\n\n\n\n\nvar SnackbarProgrammatic = {\n open: function open(params) {\n var message = void 0;\n if (typeof params === 'string') message = params;\n\n var defaultParam = {\n type: 'is-success',\n position: 'is-bottom-right',\n message: message\n };\n var propsData = assign_default()(defaultParam, params);\n\n var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a;\n var SnackbarComponent = vm.extend(Snackbar_default.a);\n return new SnackbarComponent({\n el: document.createElement('div'),\n propsData: propsData\n });\n }\n};\n\nvar snackbar_Plugin = {\n install: function install(Vue) {\n registerComponentProgrammatic(Vue, '$snackbar', SnackbarProgrammatic);\n }\n};\n\nuse(snackbar_Plugin);\n\n/* harmony default export */ var snackbar = (snackbar_Plugin);\n// EXTERNAL MODULE: ./src/components/switch/Switch.vue\nvar Switch = __webpack_require__(163);\nvar Switch_default = /*#__PURE__*/__webpack_require__.n(Switch);\n\n// CONCATENATED MODULE: ./src/components/switch/index.js\n\n\n\n\nvar switch_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Switch_default.a);\n }\n};\n\nuse(switch_Plugin);\n\n/* harmony default export */ var components_switch = (switch_Plugin);\n// EXTERNAL MODULE: ./src/components/table/Table.vue\nvar Table = __webpack_require__(166);\nvar Table_default = /*#__PURE__*/__webpack_require__.n(Table);\n\n// EXTERNAL MODULE: ./src/components/table/TableColumn.vue\nvar TableColumn = __webpack_require__(66);\nvar TableColumn_default = /*#__PURE__*/__webpack_require__.n(TableColumn);\n\n// CONCATENATED MODULE: ./src/components/table/index.js\n\n\n\n\n\nvar table_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Table_default.a);\n registerComponent(Vue, TableColumn_default.a);\n }\n};\n\nuse(table_Plugin);\n\n/* harmony default export */ var table = (table_Plugin);\n// EXTERNAL MODULE: ./src/components/tabs/Tabs.vue\nvar Tabs = __webpack_require__(182);\nvar Tabs_default = /*#__PURE__*/__webpack_require__.n(Tabs);\n\n// EXTERNAL MODULE: ./src/components/tabs/TabItem.vue\nvar TabItem = __webpack_require__(185);\nvar TabItem_default = /*#__PURE__*/__webpack_require__.n(TabItem);\n\n// CONCATENATED MODULE: ./src/components/tabs/index.js\n\n\n\n\n\nvar tabs_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Tabs_default.a);\n registerComponent(Vue, TabItem_default.a);\n }\n};\n\nuse(tabs_Plugin);\n\n/* harmony default export */ var tabs = (tabs_Plugin);\n// EXTERNAL MODULE: ./src/components/tag/Tag.vue\nvar Tag = __webpack_require__(67);\nvar Tag_default = /*#__PURE__*/__webpack_require__.n(Tag);\n\n// EXTERNAL MODULE: ./src/components/tag/Taglist.vue\nvar Taglist = __webpack_require__(190);\nvar Taglist_default = /*#__PURE__*/__webpack_require__.n(Taglist);\n\n// CONCATENATED MODULE: ./src/components/tag/index.js\n\n\n\n\n\nvar tag_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Tag_default.a);\n registerComponent(Vue, Taglist_default.a);\n }\n};\n\nuse(tag_Plugin);\n\n/* harmony default export */ var tag = (tag_Plugin);\n// EXTERNAL MODULE: ./src/components/taginput/Taginput.vue\nvar Taginput = __webpack_require__(193);\nvar Taginput_default = /*#__PURE__*/__webpack_require__.n(Taginput);\n\n// CONCATENATED MODULE: ./src/components/taginput/index.js\n\n\n\n\nvar taginput_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Taginput_default.a);\n }\n};\n\nuse(taginput_Plugin);\n\n/* harmony default export */ var taginput = (taginput_Plugin);\n// EXTERNAL MODULE: ./src/components/timepicker/Timepicker.vue\nvar Timepicker = __webpack_require__(196);\nvar Timepicker_default = /*#__PURE__*/__webpack_require__.n(Timepicker);\n\n// CONCATENATED MODULE: ./src/components/timepicker/index.js\n\n\n\n\nvar timepicker_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Timepicker_default.a);\n }\n};\n\nuse(timepicker_Plugin);\n\n/* harmony default export */ var timepicker = (timepicker_Plugin);\n// EXTERNAL MODULE: ./src/components/toast/Toast.vue\nvar Toast = __webpack_require__(199);\nvar Toast_default = /*#__PURE__*/__webpack_require__.n(Toast);\n\n// CONCATENATED MODULE: ./src/components/toast/index.js\n\n\n\n\n\n\nvar ToastProgrammatic = {\n open: function open(params) {\n var message = void 0;\n if (typeof params === 'string') message = params;\n\n var defaultParam = { message: message };\n var propsData = assign_default()(defaultParam, params);\n\n var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a;\n var ToastComponent = vm.extend(Toast_default.a);\n return new ToastComponent({\n el: document.createElement('div'),\n propsData: propsData\n });\n }\n};\n\nvar toast_Plugin = {\n install: function install(Vue) {\n registerComponentProgrammatic(Vue, '$toast', ToastProgrammatic);\n }\n};\n\nuse(toast_Plugin);\n\n/* harmony default export */ var toast = (toast_Plugin);\n// EXTERNAL MODULE: ./src/components/tooltip/Tooltip.vue\nvar Tooltip = __webpack_require__(202);\nvar Tooltip_default = /*#__PURE__*/__webpack_require__.n(Tooltip);\n\n// CONCATENATED MODULE: ./src/components/tooltip/index.js\n\n\n\n\nvar tooltip_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Tooltip_default.a);\n }\n};\n\nuse(tooltip_Plugin);\n\n/* harmony default export */ var tooltip = (tooltip_Plugin);\n// EXTERNAL MODULE: ./src/components/upload/Upload.vue\nvar Upload = __webpack_require__(205);\nvar Upload_default = /*#__PURE__*/__webpack_require__.n(Upload);\n\n// CONCATENATED MODULE: ./src/components/upload/index.js\n\n\n\n\nvar upload_Plugin = {\n install: function install(Vue) {\n registerComponent(Vue, Upload_default.a);\n }\n};\n\nuse(upload_Plugin);\n\n/* harmony default export */ var upload = (upload_Plugin);\n// CONCATENATED MODULE: ./src/components/index.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// EXTERNAL MODULE: ./src/utils/config.js\nvar config = __webpack_require__(2);\n\n// CONCATENATED MODULE: ./src/index.js\n\n\n\n\n\n\n\n\n\nvar Buefy = {\n install: function install(Vue) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Options\n Object(config[\"b\" /* setOptions */])(assign_default()(config[\"a\" /* default */], options));\n // Components\n for (var componentKey in components_namespaceObject) {\n Vue.use(components_namespaceObject[componentKey]);\n }\n }\n};\n\nuse(Buefy);\n\n/* harmony default export */ var src = __webpack_exports__[\"default\"] = (Buefy);\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(70);\nmodule.exports = __webpack_require__(8).Object.assign;\n\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.3.1 Object.assign(target, source)\nvar $export = __webpack_require__(18);\n\n$export($export.S + $export.F, 'Object', { assign: __webpack_require__(72) });\n\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = __webpack_require__(24);\nvar gOPS = __webpack_require__(36);\nvar pIE = __webpack_require__(26);\nvar toObject = __webpack_require__(37);\nvar IObject = __webpack_require__(50);\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || __webpack_require__(20)(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(17);\nvar toLength = __webpack_require__(51);\nvar toAbsoluteIndex = __webpack_require__(74);\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(32);\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 76 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__ = __webpack_require__(53);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator__ = __webpack_require__(59);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_FormElementMixin__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__input_Input__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__input_Input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__input_Input__);\n\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BAutocomplete',\n components: __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_5__input_Input___default.a.name, __WEBPACK_IMPORTED_MODULE_5__input_Input___default.a),\n mixins: [__WEBPACK_IMPORTED_MODULE_4__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: [Number, String],\n data: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n field: {\n type: String,\n default: 'value'\n },\n keepFirst: Boolean,\n clearOnSelect: Boolean,\n openOnFocus: Boolean\n },\n data: function data() {\n return {\n selected: null,\n hovered: null,\n isActive: false,\n newValue: this.value,\n isListInViewportVertically: true,\n hasFocus: false,\n _isAutocomplete: true,\n _elementRef: 'input'\n };\n },\n\n computed: {\n /**\n * White-listed items to not close when clicked.\n * Add input, dropdown and all children.\n */\n whiteList: function whiteList() {\n var whiteList = [];\n whiteList.push(this.$refs.input.$el.querySelector('input'));\n whiteList.push(this.$refs.dropdown);\n // Add all chidren from dropdown\n if (this.$refs.dropdown !== undefined) {\n var children = this.$refs.dropdown.querySelectorAll('*');\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator___default()(children), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var child = _step.value;\n\n whiteList.push(child);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n }\n\n return whiteList;\n },\n\n\n /**\n * Check if exists default slot\n */\n hasDefaultSlot: function hasDefaultSlot() {\n return !!this.$scopedSlots.default;\n },\n\n\n /**\n * Check if exists \"empty\" slot\n */\n hasEmptySlot: function hasEmptySlot() {\n return !!this.$slots.empty;\n },\n\n\n /**\n * Check if exists \"header\" slot\n */\n hasHeaderSlot: function hasHeaderSlot() {\n return !!this.$slots.header;\n }\n },\n watch: {\n /**\n * When dropdown is toggled, check the visibility to know when\n * to open upwards.\n */\n isActive: function isActive(active) {\n var _this = this;\n\n if (active) {\n this.calcDropdownInViewportVertical();\n } else {\n this.$nextTick(function () {\n return _this.setHovered(null);\n });\n // Timeout to wait for the animation to finish before recalculating\n setTimeout(function () {\n _this.calcDropdownInViewportVertical();\n }, 100);\n }\n },\n\n\n /**\n * When updating input's value\n * 1. Emit changes\n * 2. If value isn't the same as selected, set null\n * 3. Close dropdown if value is clear or else open it\n */\n newValue: function newValue(value) {\n this.$emit('input', value);\n // Check if selected is invalid\n var currentValue = this.getValue(this.selected);\n if (currentValue && currentValue !== value) {\n this.setSelected(null, false);\n }\n // Close dropdown if input is clear or else open it\n if (this.hasFocus && (!this.openOnFocus || value)) {\n this.isActive = !!value;\n }\n },\n\n\n /**\n * When v-model is changed:\n * 1. Update internal value.\n * 2. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.newValue = _value;\n !this.isValid && this.$refs.input.checkHtml5Validity();\n },\n\n\n /**\n * Select first option if \"keep-first\n */\n data: function data(value) {\n // Keep first option always pre-selected\n if (this.keepFirst) {\n this.selectFirstOption(value);\n }\n }\n },\n methods: {\n /**\n * Set which option is currently hovered.\n */\n setHovered: function setHovered(option) {\n if (option === undefined) return;\n\n this.hovered = option;\n },\n\n\n /**\n * Set which option is currently selected, update v-model,\n * update input value and close dropdown.\n */\n setSelected: function setSelected(option) {\n var _this2 = this;\n\n var closeDropdown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (option === undefined) return;\n\n this.selected = option;\n this.$emit('select', this.selected);\n if (this.selected !== null) {\n this.newValue = this.clearOnSelect ? '' : this.getValue(this.selected);\n }\n closeDropdown && this.$nextTick(function () {\n _this2.isActive = false;\n });\n },\n\n\n /**\n * Select first option\n */\n selectFirstOption: function selectFirstOption(options) {\n var _this3 = this;\n\n this.$nextTick(function () {\n if (options.length) {\n // If has visible data or open on focus, keep updating the hovered\n if (_this3.openOnFocus || _this3.newValue !== '' && _this3.hovered !== options[0]) {\n _this3.setHovered(options[0]);\n }\n } else {\n _this3.setHovered(null);\n }\n });\n },\n\n\n /**\n * Enter key listener.\n * Select the hovered option.\n */\n enterPressed: function enterPressed() {\n if (this.hovered === null) return;\n this.setSelected(this.hovered);\n },\n\n\n /**\n * Tab key listener.\n * Select hovered option if it exists, close dropdown, then allow\n * native handling to move to next tabbable element.\n */\n tabPressed: function tabPressed() {\n if (this.hovered === null) {\n this.isActive = false;\n return;\n }\n this.setSelected(this.hovered);\n },\n\n\n /**\n * Close dropdown if clicked outside.\n */\n clickedOutside: function clickedOutside(event) {\n if (this.whiteList.indexOf(event.target) < 0) this.isActive = false;\n },\n\n\n /**\n * Return display text for the input.\n * If object, get value from path, or else just the value.\n * If hightlight, find the text with regex and make bold.\n */\n getValue: function getValue(option) {\n var isHighlight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!option) return;\n\n var value = (typeof option === 'undefined' ? 'undefined' : __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default()(option)) === 'object' ? Object(__WEBPACK_IMPORTED_MODULE_3__utils_helpers__[\"b\" /* getValueByPath */])(option, this.field) : option;\n\n var escapedValue = typeof this.newValue === 'string' ? Object(__WEBPACK_IMPORTED_MODULE_3__utils_helpers__[\"a\" /* escapeRegExpChars */])(this.newValue) : this.newValue;\n var regex = new RegExp('(' + escapedValue + ')', 'gi');\n\n return isHighlight ? value.replace(regex, '<b>$1</b>') : value;\n },\n\n\n /**\n * Calculate if the dropdown is vertically visible when activated,\n * otherwise it is openened upwards.\n */\n calcDropdownInViewportVertical: function calcDropdownInViewportVertical() {\n var _this4 = this;\n\n this.$nextTick(function () {\n /**\n * this.$refs.dropdown may be undefined\n * when Autocomplete is conditional rendered\n */\n if (_this4.$refs.dropdown === undefined) return;\n\n var rect = _this4.$refs.dropdown.getBoundingClientRect();\n\n _this4.isListInViewportVertically = rect.top >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight);\n });\n },\n\n\n /**\n * Arrows keys listener.\n * If dropdown is active, set hovered option, or else just open.\n */\n keyArrows: function keyArrows(direction) {\n var sum = direction === 'down' ? 1 : -1;\n if (this.isActive) {\n var index = this.data.indexOf(this.hovered) + sum;\n index = index > this.data.length - 1 ? this.data.length : index;\n index = index < 0 ? 0 : index;\n\n this.setHovered(this.data[index]);\n\n var list = this.$refs.dropdown.querySelector('.dropdown-content');\n var element = list.querySelectorAll('.dropdown-item:not(.is-disabled)')[index];\n\n if (!element) return;\n\n var visMin = list.scrollTop;\n var visMax = list.scrollTop + list.clientHeight - element.clientHeight;\n\n if (element.offsetTop < visMin) {\n list.scrollTop = element.offsetTop;\n } else if (element.offsetTop >= visMax) {\n list.scrollTop = element.offsetTop - list.clientHeight + element.clientHeight;\n }\n } else {\n this.isActive = true;\n }\n },\n\n\n /**\n * Focus listener.\n * If value is the same as selected, select all text.\n */\n focused: function focused(event) {\n if (this.getValue(this.selected) === this.newValue) {\n this.$el.querySelector('input').select();\n }\n if (this.openOnFocus) {\n this.isActive = true;\n if (this.keepFirst) {\n this.selectFirstOption(this.data);\n }\n }\n this.hasFocus = true;\n this.$emit('focus', event);\n },\n\n\n /**\n * Blur listener.\n */\n onBlur: function onBlur(event) {\n this.hasFocus = false;\n this.$emit('blur', event);\n }\n },\n created: function created() {\n if (typeof window !== 'undefined') {\n document.addEventListener('click', this.clickedOutside);\n window.addEventListener('resize', this.calcDropdownInViewportVertical);\n }\n },\n beforeDestroy: function beforeDestroy() {\n if (typeof window !== 'undefined') {\n document.removeEventListener('click', this.clickedOutside);\n window.removeEventListener('resize', this.calcDropdownInViewportVertical);\n }\n }\n});\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(78), __esModule: true };\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(38);\n__webpack_require__(57);\nmodule.exports = __webpack_require__(41).f('iterator');\n\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(32);\nvar defined = __webpack_require__(31);\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar create = __webpack_require__(56);\nvar descriptor = __webpack_require__(21);\nvar setToStringTag = __webpack_require__(40);\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(15)(IteratorPrototype, __webpack_require__(4)('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dP = __webpack_require__(9);\nvar anObject = __webpack_require__(16);\nvar getKeys = __webpack_require__(24);\n\nmodule.exports = __webpack_require__(10) ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar document = __webpack_require__(7).document;\nmodule.exports = document && document.documentElement;\n\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = __webpack_require__(11);\nvar toObject = __webpack_require__(37);\nvar IE_PROTO = __webpack_require__(33)('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar addToUnscopables = __webpack_require__(85);\nvar step = __webpack_require__(86);\nvar Iterators = __webpack_require__(22);\nvar toIObject = __webpack_require__(17);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(54)(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports) {\n\nmodule.exports = function () { /* empty */ };\n\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(88);\n__webpack_require__(94);\n__webpack_require__(95);\n__webpack_require__(96);\nmodule.exports = __webpack_require__(8).Symbol;\n\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// ECMAScript 6 symbols shim\nvar global = __webpack_require__(7);\nvar has = __webpack_require__(11);\nvar DESCRIPTORS = __webpack_require__(10);\nvar $export = __webpack_require__(18);\nvar redefine = __webpack_require__(55);\nvar META = __webpack_require__(89).KEY;\nvar $fails = __webpack_require__(20);\nvar shared = __webpack_require__(34);\nvar setToStringTag = __webpack_require__(40);\nvar uid = __webpack_require__(25);\nvar wks = __webpack_require__(4);\nvar wksExt = __webpack_require__(41);\nvar wksDefine = __webpack_require__(42);\nvar enumKeys = __webpack_require__(90);\nvar isArray = __webpack_require__(91);\nvar anObject = __webpack_require__(16);\nvar isObject = __webpack_require__(19);\nvar toIObject = __webpack_require__(17);\nvar toPrimitive = __webpack_require__(29);\nvar createDesc = __webpack_require__(21);\nvar _create = __webpack_require__(56);\nvar gOPNExt = __webpack_require__(92);\nvar $GOPD = __webpack_require__(93);\nvar $DP = __webpack_require__(9);\nvar $keys = __webpack_require__(24);\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(58).f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(26).f = $propertyIsEnumerable;\n __webpack_require__(36).f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !__webpack_require__(39)) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(15)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar META = __webpack_require__(25)('meta');\nvar isObject = __webpack_require__(19);\nvar has = __webpack_require__(11);\nvar setDesc = __webpack_require__(9).f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !__webpack_require__(20)(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// all enumerable object keys, includes symbols\nvar getKeys = __webpack_require__(24);\nvar gOPS = __webpack_require__(36);\nvar pIE = __webpack_require__(26);\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.2.2 IsArray(argument)\nvar cof = __webpack_require__(30);\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(17);\nvar gOPN = __webpack_require__(58).f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar pIE = __webpack_require__(26);\nvar createDesc = __webpack_require__(21);\nvar toIObject = __webpack_require__(17);\nvar toPrimitive = __webpack_require__(29);\nvar has = __webpack_require__(11);\nvar IE8_DOM_DEFINE = __webpack_require__(47);\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = __webpack_require__(10) ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports) {\n\n\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(42)('asyncIterator');\n\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(42)('observable');\n\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(57);\n__webpack_require__(38);\nmodule.exports = __webpack_require__(98);\n\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(16);\nvar get = __webpack_require__(60);\nmodule.exports = __webpack_require__(8).getIterator = function (it) {\n var iterFn = get(it);\n if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');\n return anObject(iterFn.call(it));\n};\n\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = __webpack_require__(30);\nvar TAG = __webpack_require__(4)('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(101), __esModule: true };\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(102);\nvar $Object = __webpack_require__(8).Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $export = __webpack_require__(18);\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !__webpack_require__(10), 'Object', { defineProperty: __webpack_require__(9).f });\n\n\n/***/ }),\n/* 103 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__ = __webpack_require__(12);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BInput',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a),\n mixins: [__WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: [Number, String],\n type: {\n type: String,\n default: 'text'\n },\n passwordReveal: Boolean,\n hasCounter: {\n type: Boolean,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_2__utils_config__[\"a\" /* default */].defaultInputHasCounter;\n }\n }\n },\n data: function data() {\n return {\n newValue: this.value,\n newType: this.type,\n newAutocomplete: this.autocomplete || __WEBPACK_IMPORTED_MODULE_2__utils_config__[\"a\" /* default */].defaultInputAutocomplete,\n isPasswordVisible: false,\n _elementRef: this.type === 'textarea' ? 'textarea' : 'input'\n };\n },\n\n computed: {\n rootClasses: function rootClasses() {\n return [this.iconPosition, this.size, {\n 'is-expanded': this.expanded,\n 'is-loading': this.loading,\n 'is-clearfix': !this.hasMessage\n }];\n },\n inputClasses: function inputClasses() {\n return [this.statusType, this.size, { 'is-rounded': this.rounded }];\n },\n hasIconRight: function hasIconRight() {\n return this.passwordReveal || this.loading || this.statusType;\n },\n\n\n /**\n * Position of the icon or if it's both sides.\n */\n iconPosition: function iconPosition() {\n if (this.icon && this.hasIconRight) {\n return 'has-icons-left has-icons-right';\n } else if (!this.icon && this.hasIconRight) {\n return 'has-icons-right';\n } else if (this.icon) {\n return 'has-icons-left';\n }\n },\n\n\n /**\n * Icon name (MDI) based on the type.\n */\n statusTypeIcon: function statusTypeIcon() {\n switch (this.statusType) {\n case 'is-success':\n return 'check';\n case 'is-danger':\n return 'alert-circle';\n case 'is-info':\n return 'information';\n case 'is-warning':\n return 'alert';\n }\n },\n\n\n /**\n * Check if have any message prop from parent if it's a Field.\n */\n hasMessage: function hasMessage() {\n return !!this.statusMessage;\n },\n\n\n /**\n * Current password-reveal icon name.\n */\n passwordVisibleIcon: function passwordVisibleIcon() {\n return !this.isPasswordVisible ? 'eye' : 'eye-off';\n },\n\n /**\n * Get value length\n */\n valueLength: function valueLength() {\n if (typeof this.newValue === 'string') {\n return this.newValue.length;\n } else if (typeof this.newValue === 'number') {\n return this.newValue.toString().length;\n }\n return 0;\n }\n },\n watch: {\n /**\n * When v-model is changed:\n * 1. Set internal value.\n * 2. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n\n /**\n * Update user's v-model and validate again whenever\n * internal value is changed.\n */\n newValue: function newValue(value) {\n this.$emit('input', value);\n !this.isValid && this.checkHtml5Validity();\n }\n },\n methods: {\n /**\n * Toggle the visibility of a password-reveal input\n * by changing the type and focus the input right away.\n */\n togglePasswordVisibility: function togglePasswordVisibility() {\n var _this = this;\n\n this.isPasswordVisible = !this.isPasswordVisible;\n this.newType = this.isPasswordVisible ? 'text' : 'password';\n\n this.$nextTick(function () {\n _this.$refs.input.focus();\n });\n },\n\n\n /**\n * Input's 'input' event listener, 'nextTick' is used to prevent event firing\n * before ui update, helps when using masks (Cleavejs and potentially others).\n */\n onInput: function onInput(event) {\n var _this2 = this;\n\n this.$nextTick(function () {\n _this2.newValue = event.target.value;\n });\n }\n }\n});\n\n/***/ }),\n/* 104 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2);\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BIcon',\n props: {\n type: String,\n pack: String,\n icon: String,\n size: String,\n customSize: String,\n customClass: String,\n both: Boolean // This is used internally to show both MDI and FA icon\n },\n computed: {\n /**\n * Internal icon name based on the pack.\n * If pack is 'fa', gets the equivalent FA icon name of the MDI,\n * internal icons are always MDI.\n */\n newIcon: function newIcon() {\n if (!this.both) {\n if (this.newPack === 'mdi') {\n return this.newPack + '-' + this.icon;\n } else {\n return 'fa-' + this.icon;\n }\n }\n\n return this.newPack === 'mdi' ? this.newPack + '-' + this.icon : 'fa-' + this.getEquivalentIconOf(this.icon);\n },\n newPack: function newPack() {\n return this.pack || __WEBPACK_IMPORTED_MODULE_0__utils_config__[\"a\" /* default */].defaultIconPack;\n },\n newType: function newType() {\n if (!this.type) return;\n\n var splitType = this.type.split('-');\n if (!splitType.length) return;\n\n return 'has-text-' + splitType[1];\n },\n newCustomSize: function newCustomSize() {\n return this.customSize || this.customSizeByPack;\n },\n customSizeByPack: function customSizeByPack() {\n var defaultSize = this.newPack === 'mdi' ? 'mdi-24px' : 'fa-lg';\n var mediumSize = this.newPack === 'mdi' ? 'mdi-36px' : 'fa-2x';\n var largeSize = this.newPack === 'mdi' ? 'mdi-48px' : 'fa-3x';\n switch (this.size) {\n case 'is-small':\n return;\n case 'is-medium':\n return mediumSize;\n case 'is-large':\n return largeSize;\n default:\n return defaultSize;\n }\n }\n },\n methods: {\n /**\n * Equivalent FA icon name of the MDI.\n */\n getEquivalentIconOf: function getEquivalentIconOf(value) {\n switch (value) {\n case 'check':\n return 'check';\n case 'information':\n return 'info-circle';\n case 'check-circle':\n return 'check-circle';\n case 'alert':\n return 'exclamation-triangle';\n case 'alert-circle':\n return 'exclamation-circle';\n case 'arrow-up':\n return 'arrow-up';\n case 'chevron-right':\n return 'angle-right';\n case 'chevron-left':\n return 'angle-left';\n case 'chevron-down':\n return 'angle-down';\n case 'eye':\n return 'eye';\n case 'eye-off':\n return 'eye-slash';\n case 'menu-down':\n return 'caret-down';\n case 'menu-up':\n return 'caret-up';\n default:\n return value;\n }\n }\n }\n});\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('span', {\n staticClass: \"icon\",\n class: [_vm.newType, _vm.size]\n }, [_c('i', {\n class: [_vm.newPack, _vm.newIcon, _vm.newCustomSize, _vm.customClass]\n })])\n},staticRenderFns: []}\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"control\",\n class: _vm.rootClasses\n }, [(_vm.type !== 'textarea') ? _c('input', _vm._b({\n ref: \"input\",\n staticClass: \"input\",\n class: _vm.inputClasses,\n attrs: {\n \"type\": _vm.newType,\n \"autocomplete\": _vm.newAutocomplete,\n \"maxlength\": _vm.maxlength\n },\n domProps: {\n \"value\": _vm.newValue\n },\n on: {\n \"input\": _vm.onInput,\n \"blur\": _vm.onBlur,\n \"focus\": _vm.onFocus\n }\n }, 'input', _vm.$attrs, false)) : _c('textarea', _vm._b({\n ref: \"textarea\",\n staticClass: \"textarea\",\n class: _vm.inputClasses,\n attrs: {\n \"maxlength\": _vm.maxlength\n },\n domProps: {\n \"value\": _vm.newValue\n },\n on: {\n \"input\": _vm.onInput,\n \"blur\": _vm.onBlur,\n \"focus\": _vm.onFocus\n }\n }, 'textarea', _vm.$attrs, false)), _vm._v(\" \"), (_vm.icon) ? _c('b-icon', {\n staticClass: \"is-left\",\n attrs: {\n \"icon\": _vm.icon,\n \"pack\": _vm.iconPack,\n \"size\": _vm.iconSize\n }\n }) : _vm._e(), _vm._v(\" \"), (!_vm.loading && (_vm.passwordReveal || _vm.statusType)) ? _c('b-icon', {\n staticClass: \"is-right\",\n class: {\n 'is-clickable': _vm.passwordReveal\n },\n attrs: {\n \"icon\": _vm.passwordReveal ? _vm.passwordVisibleIcon : _vm.statusTypeIcon,\n \"pack\": _vm.iconPack,\n \"size\": _vm.iconSize,\n \"type\": !_vm.passwordReveal ? _vm.statusType : 'is-primary',\n \"both\": \"\"\n },\n nativeOn: {\n \"click\": function($event) {\n _vm.togglePasswordVisibility($event)\n }\n }\n }) : _vm._e(), _vm._v(\" \"), (_vm.maxlength && _vm.hasCounter && _vm.type !== 'number') ? _c('small', {\n staticClass: \"help counter\",\n class: {\n 'is-invisible': !_vm.isFocused\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.valueLength) + \" / \" + _vm._s(_vm.maxlength) + \"\\n \")]) : _vm._e()], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"autocomplete control\",\n class: {\n 'is-expanded': _vm.expanded\n }\n }, [_c('b-input', _vm._b({\n ref: \"input\",\n attrs: {\n \"size\": _vm.size,\n \"loading\": _vm.loading,\n \"rounded\": _vm.rounded,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"maxlength\": _vm.maxlength,\n \"autocomplete\": \"off\"\n },\n on: {\n \"focus\": _vm.focused,\n \"blur\": _vm.onBlur\n },\n nativeOn: {\n \"keyup\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"esc\", 27, $event.key)) { return null; }\n $event.preventDefault();\n _vm.isActive = false\n },\n \"keydown\": [function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"tab\", 9, $event.key)) { return null; }\n _vm.tabPressed($event)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n $event.preventDefault();\n _vm.enterPressed($event)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"up\", 38, $event.key)) { return null; }\n $event.preventDefault();\n _vm.keyArrows('up')\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"down\", 40, $event.key)) { return null; }\n $event.preventDefault();\n _vm.keyArrows('down')\n }]\n },\n model: {\n value: (_vm.newValue),\n callback: function($$v) {\n _vm.newValue = $$v\n },\n expression: \"newValue\"\n }\n }, 'b-input', _vm.$attrs, false)), _vm._v(\" \"), _c('transition', {\n attrs: {\n \"name\": \"fade\"\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isActive && (_vm.data.length > 0 || _vm.hasEmptySlot || _vm.hasHeaderSlot)),\n expression: \"isActive && (data.length > 0 || hasEmptySlot || hasHeaderSlot)\"\n }],\n ref: \"dropdown\",\n staticClass: \"dropdown-menu\",\n class: {\n 'is-opened-top': !_vm.isListInViewportVertically\n }\n }, [_c('div', {\n staticClass: \"dropdown-content\"\n }, [(_vm.hasHeaderSlot) ? _c('div', {\n staticClass: \"dropdown-item\"\n }, [_vm._t(\"header\")], 2) : _vm._e(), _vm._v(\" \"), _vm._l((_vm.data), function(option, index) {\n return _c('a', {\n key: index,\n staticClass: \"dropdown-item\",\n class: {\n 'is-hovered': option === _vm.hovered\n },\n on: {\n \"click\": function($event) {\n _vm.setSelected(option)\n }\n }\n }, [(_vm.hasDefaultSlot) ? _vm._t(\"default\", null, {\n option: option,\n index: index\n }) : _c('span', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.getValue(option, true))\n }\n })], 2)\n }), _vm._v(\" \"), (_vm.data.length === 0 && _vm.hasEmptySlot) ? _c('div', {\n staticClass: \"dropdown-item is-disabled\"\n }, [_vm._t(\"empty\")], 2) : _vm._e()], 2)])])], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 108 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BCheckbox',\n props: {\n value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n type: String,\n disabled: Boolean,\n required: Boolean,\n name: String,\n size: String,\n trueValue: {\n type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n default: true\n },\n falseValue: {\n type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n default: false\n }\n },\n data: function data() {\n return {\n newValue: this.value\n };\n },\n\n watch: {\n /**\n * When v-model change, set internal value.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n /**\n * Emit input event to update the user v-model.\n */\n newValue: function newValue(value) {\n this.$emit('input', value);\n }\n }\n});\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('label', {\n ref: \"label\",\n staticClass: \"b-checkbox checkbox\",\n class: [_vm.size, {\n 'is-disabled': _vm.disabled\n }],\n attrs: {\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.disabled ? false : 0\n },\n on: {\n \"keydown\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.$refs.label.click()\n }\n }\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newValue),\n expression: \"newValue\"\n }],\n attrs: {\n \"type\": \"checkbox\",\n \"disabled\": _vm.disabled,\n \"required\": _vm.required,\n \"name\": _vm.name,\n \"true-value\": _vm.trueValue,\n \"false-value\": _vm.falseValue\n },\n domProps: {\n \"value\": _vm.nativeValue,\n \"checked\": Array.isArray(_vm.newValue) ? _vm._i(_vm.newValue, _vm.nativeValue) > -1 : _vm._q(_vm.newValue, _vm.trueValue)\n },\n on: {\n \"change\": function($event) {\n var $$a = _vm.newValue,\n $$el = $event.target,\n $$c = $$el.checked ? (_vm.trueValue) : (_vm.falseValue);\n if (Array.isArray($$a)) {\n var $$v = _vm.nativeValue,\n $$i = _vm._i($$a, $$v);\n if ($$el.checked) {\n $$i < 0 && (_vm.newValue = $$a.concat([$$v]))\n } else {\n $$i > -1 && (_vm.newValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1)))\n }\n } else {\n _vm.newValue = $$c\n }\n }\n }\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"check\",\n class: _vm.type\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"control-label\"\n }, [_vm._t(\"default\")], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(111),\n /* template */\n __webpack_require__(112),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 111 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BCheckboxButton',\n props: {\n value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n disabled: Boolean,\n name: String,\n size: String,\n type: {\n type: String,\n default: 'is-primary'\n }\n },\n data: function data() {\n return {\n newValue: this.value\n };\n },\n\n computed: {\n checked: function checked() {\n if (Array.isArray(this.newValue)) {\n return this.newValue.indexOf(this.nativeValue) >= 0;\n }\n return this.newValue === this.nativeValue;\n }\n },\n watch: {\n /**\n * When v-model change, set internal value.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n /**\n * Emit input event to update the user v-model.\n */\n newValue: function newValue(value) {\n this.$emit('input', value);\n }\n }\n});\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"control\"\n }, [_c('label', {\n ref: \"label\",\n staticClass: \"b-checkbox checkbox button\",\n class: [_vm.checked ? _vm.type : null, _vm.size, {\n 'is-disabled': _vm.disabled\n }],\n attrs: {\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.disabled ? false : 0\n },\n on: {\n \"keydown\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.$refs.label.click()\n }\n }\n }, [_vm._t(\"default\"), _vm._v(\" \"), _c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newValue),\n expression: \"newValue\"\n }],\n attrs: {\n \"type\": \"checkbox\",\n \"disabled\": _vm.disabled,\n \"name\": _vm.name\n },\n domProps: {\n \"value\": _vm.nativeValue,\n \"checked\": Array.isArray(_vm.newValue) ? _vm._i(_vm.newValue, _vm.nativeValue) > -1 : (_vm.newValue)\n },\n on: {\n \"change\": function($event) {\n var $$a = _vm.newValue,\n $$el = $event.target,\n $$c = $$el.checked ? (true) : (false);\n if (Array.isArray($$a)) {\n var $$v = _vm.nativeValue,\n $$i = _vm._i($$a, $$v);\n if ($$el.checked) {\n $$i < 0 && (_vm.newValue = $$a.concat([$$v]))\n } else {\n $$i > -1 && (_vm.newValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1)))\n }\n } else {\n _vm.newValue = $$c\n }\n }\n }\n })], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(114),\n /* template */\n __webpack_require__(115),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 114 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BCollapse',\n props: {\n open: {\n type: Boolean,\n default: true\n },\n animation: {\n type: String,\n default: 'fade'\n }\n },\n data: function data() {\n return {\n isOpen: this.open\n };\n },\n\n watch: {\n open: function open(value) {\n this.isOpen = value;\n }\n },\n methods: {\n /**\n * Toggle and emit events\n */\n toggle: function toggle() {\n this.isOpen = !this.isOpen;\n this.$emit('update:open', this.isOpen);\n this.$emit(this.isOpen ? 'open' : 'close');\n }\n }\n});\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"collapse\"\n }, [_c('div', {\n staticClass: \"collapse-trigger\",\n on: {\n \"click\": _vm.toggle\n }\n }, [_vm._t(\"trigger\", null, {\n open: _vm.isOpen\n })], 2), _vm._v(\" \"), _c('transition', {\n attrs: {\n \"name\": _vm.animation\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isOpen),\n expression: \"isOpen\"\n }],\n staticClass: \"collapse-content\"\n }, [_vm._t(\"default\")], 2)])], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(117),\n /* template */\n __webpack_require__(134),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 117 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_FormElementMixin__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown__ = __webpack_require__(43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem__ = __webpack_require__(44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__input_Input__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__input_Input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__input_Input__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__field_Field__ = __webpack_require__(45);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__field_Field___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__field_Field__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__select_Select__ = __webpack_require__(28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__select_Select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__select_Select__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__DatepickerTable__ = __webpack_require__(128);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__DatepickerTable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__DatepickerTable__);\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDatepicker',\n components: (_components = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_10__DatepickerTable___default.a.name, __WEBPACK_IMPORTED_MODULE_10__DatepickerTable___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_6__input_Input___default.a.name, __WEBPACK_IMPORTED_MODULE_6__input_Input___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_7__field_Field___default.a.name, __WEBPACK_IMPORTED_MODULE_7__field_Field___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_8__select_Select___default.a.name, __WEBPACK_IMPORTED_MODULE_8__select_Select___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default.a.name, __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default.a.name, __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default.a), _components),\n mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: Date,\n dayNames: {\n type: Array,\n default: function _default() {\n if (Array.isArray(__WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDayNames)) {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDayNames;\n } else {\n return ['Su', 'M', 'Tu', 'W', 'Th', 'F', 'S'];\n }\n }\n },\n monthNames: {\n type: Array,\n default: function _default() {\n if (Array.isArray(__WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultMonthNames)) {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultMonthNames;\n } else {\n return ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n }\n }\n },\n firstDayOfWeek: {\n type: Number,\n default: function _default() {\n if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultFirstDayOfWeek === 'number') {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultFirstDayOfWeek;\n } else {\n return 0;\n }\n }\n },\n inline: Boolean,\n minDate: Date,\n maxDate: Date,\n focusedDate: Date,\n placeholder: String,\n readonly: {\n type: Boolean,\n default: true\n },\n disabled: {\n type: Boolean,\n default: false\n },\n unselectableDates: Array,\n unselectableDaysOfWeek: {\n type: Array,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultUnselectableDaysOfWeek;\n }\n },\n selectableDates: Array,\n dateFormatter: {\n type: Function,\n default: function _default(date) {\n if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDateFormatter === 'function') {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDateFormatter(date);\n } else {\n var yyyyMMdd = date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate();\n var d = new Date(yyyyMMdd);\n return d.toLocaleDateString();\n }\n }\n },\n dateParser: {\n type: Function,\n default: function _default(date) {\n if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDateParser === 'function') {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDateParser(date);\n } else {\n return new Date(Date.parse(date));\n }\n }\n },\n mobileNative: {\n type: Boolean,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDatepickerMobileNative;\n }\n },\n position: String,\n events: Array,\n indicators: {\n type: String,\n default: 'dots'\n }\n },\n data: function data() {\n var focusedDate = this.value || this.focusedDate || new Date();\n\n return {\n dateSelected: this.value,\n focusedDateData: {\n month: focusedDate.getMonth(),\n year: focusedDate.getFullYear()\n },\n _elementRef: 'input',\n _isDatepicker: true\n };\n },\n\n computed: {\n /*\n * Returns an array of years for the year dropdown. If earliest/latest\n * dates are set by props, range of years will fall within those dates.\n */\n listOfYears: function listOfYears() {\n var latestYear = this.maxDate ? this.maxDate.getFullYear() : Math.max(new Date().getFullYear(), this.focusedDateData.year) + 3;\n\n var earliestYear = this.minDate ? this.minDate.getFullYear() : 1900;\n\n var arrayOfYears = [];\n for (var i = earliestYear; i <= latestYear; i++) {\n arrayOfYears.push(i);\n }\n\n return arrayOfYears.reverse();\n },\n isFirstMonth: function isFirstMonth() {\n if (!this.minDate) return false;\n var dateToCheck = new Date(this.focusedDateData.year, this.focusedDateData.month);\n var date = new Date(this.minDate.getFullYear(), this.minDate.getMonth());\n return dateToCheck <= date;\n },\n isLastMonth: function isLastMonth() {\n if (!this.maxDate) return false;\n var dateToCheck = new Date(this.focusedDateData.year, this.focusedDateData.month);\n var date = new Date(this.maxDate.getFullYear(), this.maxDate.getMonth());\n return dateToCheck >= date;\n },\n isMobile: function isMobile() {\n return this.mobileNative && __WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"d\" /* isMobile */].any();\n }\n },\n watch: {\n /*\n * Emit input event with selected date as payload, set isActive to false.\n * Update internal focusedDateData\n */\n dateSelected: function dateSelected(value) {\n var currentDate = !value ? new Date() : value;\n this.focusedDateData = {\n month: currentDate.getMonth(),\n year: currentDate.getFullYear()\n };\n this.$emit('input', value);\n if (this.$refs.dropdown) {\n this.$refs.dropdown.isActive = false;\n }\n },\n\n\n /**\n * When v-model is changed:\n * 1. Update internal value.\n * 2. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.dateSelected = _value;\n\n !this.isValid && this.$refs.input.checkHtml5Validity();\n },\n focusedDate: function focusedDate(value) {\n if (value) {\n this.focusedDateData = {\n month: value.getMonth(),\n year: value.getFullYear()\n };\n }\n },\n\n\n /*\n * Emit input event on month and/or year change\n */\n 'focusedDateData.month': function focusedDateDataMonth(value) {\n this.$emit('change-month', value);\n },\n 'focusedDateData.year': function focusedDateDataYear(value) {\n this.$emit('change-year', value);\n }\n },\n methods: {\n /*\n * Emit input event with selected date as payload for v-model in parent\n */\n updateSelectedDate: function updateSelectedDate(date) {\n this.dateSelected = date;\n },\n\n\n /*\n * Parse string into date\n */\n onChange: function onChange(value) {\n var date = this.dateParser(value);\n if (date && !isNaN(date)) {\n this.dateSelected = date;\n } else {\n // Force refresh input value when not valid date\n this.dateSelected = null;\n this.$refs.input.newValue = this.dateSelected;\n }\n },\n\n\n /*\n * Format date into string\n */\n formatValue: function formatValue(value) {\n if (value && !isNaN(value)) {\n return this.dateFormatter(value);\n } else {\n return null;\n }\n },\n\n\n /*\n * Either decrement month by 1 if not January or decrement year by 1\n * and set month to 11 (December)\n */\n decrementMonth: function decrementMonth() {\n if (this.disabled) return;\n\n if (this.focusedDateData.month > 0) {\n this.focusedDateData.month -= 1;\n } else {\n this.focusedDateData.month = 11;\n this.focusedDateData.year -= 1;\n }\n },\n\n\n /*\n * Either increment month by 1 if not December or increment year by 1\n * and set month to 0 (January)\n */\n incrementMonth: function incrementMonth() {\n if (this.disabled) return;\n\n if (this.focusedDateData.month < 11) {\n this.focusedDateData.month += 1;\n } else {\n this.focusedDateData.month = 0;\n this.focusedDateData.year += 1;\n }\n },\n\n\n /*\n * Format date into string 'YYYY-MM-DD'\n */\n formatYYYYMMDD: function formatYYYYMMDD(value) {\n var date = new Date(value);\n if (value && !isNaN(date)) {\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n return year + '-' + ((month < 10 ? '0' : '') + month) + '-' + ((day < 10 ? '0' : '') + day);\n }\n return '';\n },\n\n\n /*\n * Parse date from string\n */\n onChangeNativePicker: function onChangeNativePicker(event) {\n var date = event.target.value;\n this.dateSelected = date ? new Date(date.replace(/-/g, '/')) : null;\n }\n }\n});\n\n/***/ }),\n/* 118 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator__ = __webpack_require__(59);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol__);\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDropdown',\n props: {\n value: {\n type: [String, Number, Boolean, Object, Array, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol___default.a, Function],\n default: null\n },\n disabled: Boolean,\n hoverable: Boolean,\n inline: Boolean,\n position: {\n type: String,\n validator: function validator(value) {\n return ['is-top-right', 'is-top-left', 'is-bottom-left'].indexOf(value) > -1;\n }\n },\n mobileModal: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n selected: this.value,\n isActive: false,\n _isDropdown: true // Used internally by DropdownItem\n };\n },\n\n computed: {\n rootClasses: function rootClasses() {\n return [this.position, {\n 'is-disabled': this.disabled,\n 'is-hoverable': this.hoverable,\n 'is-inline': this.inline,\n 'is-active': this.isActive || this.inline,\n 'is-mobile-modal': this.isMobileModal\n }];\n },\n isMobileModal: function isMobileModal() {\n return this.mobileModal && !this.inline && !this.hoverable;\n }\n },\n watch: {\n /**\n * When v-model is changed set the new selected item.\n */\n value: function value(_value) {\n this.selected = _value;\n },\n\n\n /**\n * Emit event when isActive value is changed.\n */\n isActive: function isActive(value) {\n this.$emit('active-change', value);\n }\n },\n methods: {\n /**\n * Click listener from DropdownItem.\n * 1. Set new selected item.\n * 2. Emit input event to update the user v-model.\n * 3. Close the dropdown.\n */\n selectItem: function selectItem(value) {\n if (this.selected !== value) {\n this.$emit('change', value);\n this.selected = value;\n }\n this.$emit('input', value);\n this.isActive = false;\n },\n\n\n /**\n * White-listed items to not close when clicked.\n */\n isInWhiteList: function isInWhiteList(el) {\n if (el === this.$refs.dropdownMenu) return true;\n if (el === this.$refs.trigger) return true;\n // All chidren from dropdown\n if (this.$refs.dropdownMenu !== undefined) {\n var children = this.$refs.dropdownMenu.querySelectorAll('*');\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator___default()(children), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var child = _step.value;\n\n if (el === child) {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n }\n // All children from trigger\n if (this.$refs.trigger !== undefined) {\n var _children = this.$refs.trigger.querySelectorAll('*');\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator___default()(_children), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var _child = _step2.value;\n\n if (el === _child) {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n\n return false;\n },\n\n\n /**\n * Close dropdown if clicked outside.\n */\n clickedOutside: function clickedOutside(event) {\n if (this.inline) return;\n\n if (!this.isInWhiteList(event.target)) this.isActive = false;\n },\n\n\n /**\n * Toggle dropdown if it's not disabled.\n */\n toggle: function toggle() {\n var _this = this;\n\n if (this.disabled || this.hoverable) return;\n\n if (!this.isActive) {\n // if not active, toggle after clickOutside event\n // this fixes toggling programmatic\n this.$nextTick(function () {\n _this.isActive = !_this.isActive;\n });\n } else {\n this.isActive = !this.isActive;\n }\n }\n },\n created: function created() {\n if (typeof window !== 'undefined') {\n document.addEventListener('click', this.clickedOutside);\n }\n },\n beforeDestroy: function beforeDestroy() {\n if (typeof window !== 'undefined') {\n document.removeEventListener('click', this.clickedOutside);\n }\n }\n});\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"dropdown\",\n class: _vm.rootClasses\n }, [(!_vm.inline) ? _c('div', {\n ref: \"trigger\",\n staticClass: \"dropdown-trigger\",\n attrs: {\n \"role\": \"button\"\n },\n on: {\n \"click\": _vm.toggle\n }\n }, [_vm._t(\"trigger\")], 2) : _vm._e(), _vm._v(\" \"), _c('transition', {\n attrs: {\n \"name\": \"fade\"\n }\n }, [(_vm.isMobileModal) ? _c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isActive),\n expression: \"isActive\"\n }],\n staticClass: \"background\"\n }) : _vm._e()]), _vm._v(\" \"), _c('transition', {\n attrs: {\n \"name\": \"fade\"\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: ((!_vm.disabled && (_vm.isActive || _vm.hoverable)) || _vm.inline),\n expression: \"(!disabled && (isActive || hoverable)) || inline\"\n }],\n ref: \"dropdownMenu\",\n staticClass: \"dropdown-menu\"\n }, [_c('div', {\n staticClass: \"dropdown-content\"\n }, [_vm._t(\"default\")], 2)])])], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 120 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDropdownItem',\n props: {\n value: {\n type: [String, Number, Boolean, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a, Function],\n default: null\n },\n separator: Boolean,\n disabled: Boolean,\n custom: Boolean,\n paddingless: Boolean,\n hasLink: Boolean\n },\n computed: {\n anchorClasses: function anchorClasses() {\n return {\n 'is-disabled': this.$parent.disabled || this.disabled,\n 'is-paddingless': this.paddingless,\n 'is-active': this.value !== null && this.value === this.$parent.selected\n };\n },\n itemClasses: function itemClasses() {\n return {\n 'dropdown-item': !this.hasLink,\n 'is-disabled': this.disabled,\n 'is-paddingless': this.paddingless,\n 'is-active': this.value !== null && this.value === this.$parent.selected,\n 'has-link': this.hasLink\n };\n },\n\n /**\n * Check if item can be clickable.\n */\n isClickable: function isClickable() {\n return !this.$parent.disabled && !this.separator && !this.disabled && !this.custom;\n }\n },\n methods: {\n /**\n * Click listener, select the item.\n */\n selectItem: function selectItem() {\n if (!this.isClickable) return;\n\n this.$parent.selectItem(this.value);\n this.$emit('click');\n }\n },\n created: function created() {\n if (!this.$parent.$data._isDropdown) {\n this.$destroy();\n throw new Error('You should wrap bDropdownItem on a bDropdown');\n }\n }\n});\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return (_vm.separator) ? _c('hr', {\n staticClass: \"dropdown-divider\"\n }) : (!_vm.custom && !_vm.hasLink) ? _c('a', {\n staticClass: \"dropdown-item\",\n class: _vm.anchorClasses,\n on: {\n \"click\": _vm.selectItem\n }\n }, [_vm._t(\"default\")], 2) : _c('div', {\n class: _vm.itemClasses,\n on: {\n \"click\": _vm.selectItem\n }\n }, [_vm._t(\"default\")], 2)\n},staticRenderFns: []}\n\n/***/ }),\n/* 122 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__FieldBody__ = __webpack_require__(123);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__FieldBody___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__FieldBody__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BField',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__FieldBody___default.a.name, __WEBPACK_IMPORTED_MODULE_1__FieldBody___default.a),\n props: {\n type: String,\n label: String,\n labelFor: String,\n message: [String, Array],\n grouped: Boolean,\n groupMultiline: Boolean,\n position: String,\n expanded: Boolean,\n horizontal: Boolean,\n addons: {\n type: Boolean,\n default: true\n },\n customClass: String\n },\n data: function data() {\n return {\n newType: this.type,\n newMessage: this.message,\n fieldLabelSize: null,\n _isField: true // Used internally by Input and Select\n };\n },\n\n computed: {\n rootClasses: function rootClasses() {\n return [this.newPosition, {\n 'is-expanded': this.expanded,\n 'is-grouped-multiline': this.groupMultiline,\n 'is-horizontal': this.horizontal\n }];\n },\n\n /**\n * Correct Bulma class for the side of the addon or group.\n *\n * This is not kept like the others (is-small, etc.),\n * because since 'has-addons' is set automatically it\n * doesn't make sense to teach users what addons are exactly.\n */\n newPosition: function newPosition() {\n if (this.position === undefined) return;\n\n var position = this.position.split('-');\n if (position.length < 1) return;\n\n var prefix = this.grouped ? 'is-grouped-' : 'has-addons-';\n\n if (this.position) return prefix + position[1];\n },\n\n /**\n * Formatted message in case it's an array\n * (each element is separated by <br> tag)\n */\n formattedMessage: function formattedMessage() {\n if (this.newMessage) {\n if (Array.isArray(this.newMessage)) {\n return this.newMessage.filter(function (value) {\n if (value) {\n return value;\n }\n }).join(' <br> ');\n } else {\n return this.newMessage;\n }\n } else {\n return this.newMessage;\n }\n }\n },\n watch: {\n /**\n * Set internal type when prop change.\n */\n type: function type(value) {\n this.newType = value;\n },\n\n\n /**\n * Set internal message when prop change.\n */\n message: function message(value) {\n this.newMessage = value;\n }\n },\n methods: {\n /**\n * Field has addons if there are more than one slot\n * (element / component) in the Field.\n * Or is grouped when prop is set.\n * Is a method to be called when component re-render.\n */\n fieldType: function fieldType() {\n if (this.grouped) return 'is-grouped';\n\n var renderedNode = 0;\n if (this.$slots.default) {\n renderedNode = this.$slots.default.reduce(function (i, node) {\n return node.tag ? i + 1 : i;\n }, 0);\n }\n if (renderedNode > 1 && this.addons && !this.horizontal) {\n return 'has-addons';\n }\n }\n },\n mounted: function mounted() {\n if (this.horizontal) {\n // Bulma docs: .is-normal for any .input or .button\n var elements = this.$el.querySelectorAll('.input, .select, .button, .textarea');\n if (elements.length > 0) {\n this.fieldLabelSize = 'is-normal';\n }\n }\n }\n});\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(124),\n /* template */\n null,\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 124 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BFieldBody',\n props: {\n message: {\n type: [String]\n },\n type: {\n type: [String]\n }\n },\n render: function render(h) {\n var _this = this;\n\n return h('div', { attrs: { 'class': 'field-body' } }, this.$slots.default.map(function (v) {\n // skip returns and comments\n if (!v.tag) {\n return v;\n }\n if (_this.message) {\n return h('b-field', { attrs: { message: _this.message, 'type': _this.type } }, [v]);\n }\n return h('b-field', { attrs: { 'type': _this.type } }, [v]);\n }));\n }\n});\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"field\",\n class: [_vm.rootClasses, _vm.fieldType()]\n }, [(_vm.horizontal) ? _c('div', {\n staticClass: \"field-label\",\n class: [_vm.customClass, _vm.fieldLabelSize]\n }, [(_vm.label) ? _c('label', {\n staticClass: \"label\",\n attrs: {\n \"for\": _vm.labelFor\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.label) + \"\\n \")]) : _vm._e()]) : [(_vm.label) ? _c('label', {\n staticClass: \"label\",\n class: _vm.customClass,\n attrs: {\n \"for\": _vm.labelFor\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.label) + \"\\n \")]) : _vm._e()], _vm._v(\" \"), (_vm.horizontal) ? _c('b-field-body', {\n attrs: {\n \"message\": _vm.newMessage ? _vm.formattedMessage : '',\n \"type\": _vm.newType\n }\n }, [_vm._t(\"default\")], 2) : [_vm._t(\"default\")], _vm._v(\" \"), (_vm.newMessage && !_vm.horizontal) ? _c('p', {\n staticClass: \"help\",\n class: _vm.newType,\n domProps: {\n \"innerHTML\": _vm._s(_vm.formattedMessage)\n }\n }) : _vm._e()], 2)\n},staticRenderFns: []}\n\n/***/ }),\n/* 126 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__ = __webpack_require__(12);\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BSelect',\n components: __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a),\n mixins: [__WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: {\n type: [String, Number, Boolean, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a, Function],\n default: null\n },\n placeholder: String,\n multiple: Boolean,\n nativeSize: [String, Number]\n },\n data: function data() {\n return {\n selected: this.value,\n _isSelect: true,\n _elementRef: 'select'\n };\n },\n\n computed: {\n spanClasses: function spanClasses() {\n return [this.size, this.statusType, {\n 'is-fullwidth': this.expanded,\n 'is-loading': this.loading,\n 'is-multiple': this.multiple,\n 'is-rounded': this.rounded,\n 'is-empty': this.selected === null\n }];\n }\n },\n watch: {\n /**\n * When v-model is changed:\n * 1. Set the selected option.\n * 2. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.selected = _value;\n !this.isValid && this.checkHtml5Validity();\n },\n\n /**\n * When selected:\n * 1. Emit input event to update the user v-model.\n * 2. If it's invalid, validate again.\n */\n selected: function selected(value) {\n this.$emit('input', value);\n !this.isValid && this.checkHtml5Validity();\n }\n }\n});\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"control\",\n class: {\n 'is-expanded': _vm.expanded, 'has-icons-left': _vm.icon\n }\n }, [_c('span', {\n staticClass: \"select\",\n class: _vm.spanClasses\n }, [_c('select', _vm._b({\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.selected),\n expression: \"selected\"\n }],\n ref: \"select\",\n attrs: {\n \"multiple\": _vm.multiple,\n \"size\": _vm.nativeSize\n },\n on: {\n \"blur\": function($event) {\n _vm.$emit('blur', $event) && _vm.checkHtml5Validity()\n },\n \"focus\": function($event) {\n _vm.$emit('focus', $event)\n },\n \"change\": function($event) {\n var $$selectedVal = Array.prototype.filter.call($event.target.options, function(o) {\n return o.selected\n }).map(function(o) {\n var val = \"_value\" in o ? o._value : o.value;\n return val\n });\n _vm.selected = $event.target.multiple ? $$selectedVal : $$selectedVal[0]\n }\n }\n }, 'select', _vm.$attrs, false), [(_vm.placeholder) ? _c('option', {\n attrs: {\n \"selected\": \"\",\n \"disabled\": \"\",\n \"hidden\": \"\"\n },\n domProps: {\n \"value\": null\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.placeholder) + \"\\n \")]) : _vm._e(), _vm._v(\" \"), _vm._t(\"default\")], 2)]), _vm._v(\" \"), (_vm.icon) ? _c('b-icon', {\n staticClass: \"is-left\",\n attrs: {\n \"icon\": _vm.icon,\n \"pack\": _vm.iconPack,\n \"size\": _vm.iconSize\n }\n }) : _vm._e()], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(129),\n /* template */\n __webpack_require__(133),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 129 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow__ = __webpack_require__(130);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDatepickerTable',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow___default.a.name, __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow___default.a),\n props: {\n value: Date,\n dayNames: Array,\n monthNames: Array,\n firstDayOfWeek: Number,\n events: Array,\n indicators: String,\n minDate: Date,\n maxDate: Date,\n focused: Object,\n disabled: Boolean,\n unselectableDates: Array,\n unselectableDaysOfWeek: Array,\n selectableDates: Array\n },\n computed: {\n visibleDayNames: function visibleDayNames() {\n var visibleDayNames = [];\n var index = this.firstDayOfWeek;\n while (visibleDayNames.length < this.dayNames.length) {\n var currentDayName = this.dayNames[index % this.dayNames.length];\n visibleDayNames.push(currentDayName);\n index++;\n }\n return visibleDayNames;\n },\n hasEvents: function hasEvents() {\n return this.events && this.events.length;\n },\n\n\n /*\n * Return array of all events in the specified month\n */\n eventsInThisMonth: function eventsInThisMonth() {\n if (!this.events) return [];\n\n var monthEvents = [];\n\n for (var i = 0; i < this.events.length; i++) {\n var event = this.events[i];\n\n if (!event.hasOwnProperty('date')) {\n event = { date: event };\n }\n if (!event.hasOwnProperty('type')) {\n event.type = 'is-primary';\n }\n if (event.date.getMonth() === this.focused.month && event.date.getFullYear() === this.focused.year) {\n monthEvents.push(event);\n }\n }\n\n return monthEvents;\n }\n },\n methods: {\n /*\n * Emit input event with selected date as payload for v-model in parent\n */\n updateSelectedDate: function updateSelectedDate(date) {\n this.$emit('input', date);\n },\n\n\n /*\n * Return array of all days in the week that the startingDate is within\n */\n weekBuilder: function weekBuilder(startingDate, month, year) {\n var thisMonth = new Date(year, month);\n\n var thisWeek = [];\n\n var dayOfWeek = new Date(year, month, startingDate).getDay();\n\n var end = dayOfWeek >= this.firstDayOfWeek ? dayOfWeek - this.firstDayOfWeek : 7 - this.firstDayOfWeek + dayOfWeek;\n\n var daysAgo = 1;\n for (var i = 0; i < end; i++) {\n thisWeek.unshift(new Date(thisMonth.getFullYear(), thisMonth.getMonth(), startingDate - daysAgo));\n daysAgo++;\n }\n\n thisWeek.push(new Date(year, month, startingDate));\n\n var daysForward = 1;\n while (thisWeek.length < 7) {\n thisWeek.push(new Date(year, month, startingDate + daysForward));\n daysForward++;\n }\n\n return thisWeek;\n },\n\n\n /*\n * Return array of all weeks in the specified month\n */\n weeksInThisMonth: function weeksInThisMonth(month, year) {\n var weeksInThisMonth = [];\n var daysInThisMonth = new Date(year, month + 1, 0).getDate();\n\n var startingDay = 1;\n\n while (startingDay <= daysInThisMonth + 6) {\n var newWeek = this.weekBuilder(startingDay, month, year);\n var weekValid = false;\n\n newWeek.forEach(function (day) {\n if (day.getMonth() === month) {\n weekValid = true;\n }\n });\n\n if (weekValid) {\n weeksInThisMonth.push(newWeek);\n }\n\n startingDay += 7;\n }\n\n return weeksInThisMonth;\n },\n eventsInThisWeek: function eventsInThisWeek(week, index) {\n if (!this.eventsInThisMonth.length) return [];\n\n var weekEvents = [];\n\n var weeksInThisMonth = [];\n weeksInThisMonth = this.weeksInThisMonth(this.focused.month, this.focused.year);\n\n for (var d = 0; d < weeksInThisMonth[index].length; d++) {\n for (var e = 0; e < this.eventsInThisMonth.length; e++) {\n var eventsInThisMonth = this.eventsInThisMonth[e].date.getTime();\n if (eventsInThisMonth === weeksInThisMonth[index][d].getTime()) {\n weekEvents.push(this.eventsInThisMonth[e]);\n }\n }\n }\n\n return weekEvents;\n }\n }\n});\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(131),\n /* template */\n __webpack_require__(132),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 131 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDatepickerTableRow',\n props: {\n selectedDate: Date,\n week: {\n type: Array,\n required: true\n },\n month: {\n type: Number,\n required: true\n },\n minDate: Date,\n maxDate: Date,\n disabled: Boolean,\n unselectableDates: Array,\n unselectableDaysOfWeek: Array,\n selectableDates: Array,\n events: Array,\n indicators: String\n },\n methods: {\n /*\n * Check that selected day is within earliest/latest params and\n * is within this month\n */\n selectableDate: function selectableDate(day) {\n var validity = [];\n\n if (this.minDate) {\n validity.push(day >= this.minDate);\n }\n\n if (this.maxDate) {\n validity.push(day <= this.maxDate);\n }\n\n validity.push(day.getMonth() === this.month);\n\n if (this.selectableDates) {\n for (var i = 0; i < this.selectableDates.length; i++) {\n var enabledDate = this.selectableDates[i];\n if (day.getDate() === enabledDate.getDate() && day.getFullYear() === enabledDate.getFullYear() && day.getMonth() === enabledDate.getMonth()) {\n return true;\n } else {\n validity.push(false);\n }\n }\n }\n\n if (this.unselectableDates) {\n for (var _i = 0; _i < this.unselectableDates.length; _i++) {\n var disabledDate = this.unselectableDates[_i];\n validity.push(day.getDate() !== disabledDate.getDate() || day.getFullYear() !== disabledDate.getFullYear() || day.getMonth() !== disabledDate.getMonth());\n }\n }\n\n if (this.unselectableDaysOfWeek) {\n for (var _i2 = 0; _i2 < this.unselectableDaysOfWeek.length; _i2++) {\n var dayOfWeek = this.unselectableDaysOfWeek[_i2];\n validity.push(day.getDay() !== dayOfWeek);\n }\n }\n\n return validity.indexOf(false) < 0;\n },\n\n\n /*\n * Emit select event with chosen date as payload\n */\n emitChosenDate: function emitChosenDate(day) {\n if (this.disabled) return;\n\n if (this.selectableDate(day)) {\n this.$emit('select', day);\n }\n },\n eventsDateMatch: function eventsDateMatch(day) {\n if (!this.events.length) return false;\n\n var dayEvents = [];\n\n for (var i = 0; i < this.events.length; i++) {\n if (this.events[i].date.getDay() === day.getDay()) {\n dayEvents.push(this.events[i]);\n }\n }\n\n if (!dayEvents.length) {\n return false;\n }\n\n return dayEvents;\n },\n\n\n /*\n * Build classObject for cell using validations\n */\n classObject: function classObject(day) {\n function dateMatch(dateOne, dateTwo) {\n // if either date is null or undefined, return false\n if (!dateOne || !dateTwo) {\n return false;\n }\n\n return dateOne.getDate() === dateTwo.getDate() && dateOne.getFullYear() === dateTwo.getFullYear() && dateOne.getMonth() === dateTwo.getMonth();\n }\n\n return {\n 'is-selected': dateMatch(day, this.selectedDate),\n 'is-today': dateMatch(day, new Date()),\n 'is-selectable': this.selectableDate(day) && !this.disabled,\n 'is-unselectable': !this.selectableDate(day) || this.disabled\n };\n }\n }\n});\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"datepicker-row\"\n }, [_vm._l((_vm.week), function(day, index) {\n return [(_vm.selectableDate(day) && !_vm.disabled) ? _c('a', {\n key: index,\n staticClass: \"datepicker-cell\",\n class: [_vm.classObject(day), {\n 'has-event': _vm.eventsDateMatch(day)\n }, _vm.indicators],\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\",\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.emitChosenDate(day)\n },\n \"keydown\": [function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n $event.preventDefault();\n _vm.emitChosenDate(day)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.emitChosenDate(day)\n }]\n }\n }, [_vm._v(\"\\n \" + _vm._s(day.getDate()) + \"\\n\\n \"), (_vm.eventsDateMatch(day)) ? _c('div', {\n staticClass: \"events\"\n }, _vm._l((_vm.eventsDateMatch(day)), function(event, index) {\n return _c('div', {\n key: index,\n staticClass: \"event\",\n class: event.type\n })\n })) : _vm._e()]) : _c('div', {\n key: index,\n staticClass: \"datepicker-cell\",\n class: _vm.classObject(day)\n }, [_vm._v(\"\\n \" + _vm._s(day.getDate()) + \"\\n \")])]\n })], 2)\n},staticRenderFns: []}\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('section', {\n staticClass: \"datepicker-table\"\n }, [_c('header', {\n staticClass: \"datepicker-header\"\n }, _vm._l((_vm.visibleDayNames), function(day, index) {\n return _c('div', {\n key: index,\n staticClass: \"datepicker-cell\"\n }, [_vm._v(\"\\n \" + _vm._s(day) + \"\\n \")])\n })), _vm._v(\" \"), _c('div', {\n staticClass: \"datepicker-body\",\n class: {\n 'has-events': _vm.hasEvents\n }\n }, _vm._l((_vm.weeksInThisMonth(_vm.focused.month, _vm.focused.year)), function(week, index) {\n return _c('b-datepicker-table-row', {\n key: index,\n attrs: {\n \"selected-date\": _vm.value,\n \"week\": week,\n \"month\": _vm.focused.month,\n \"min-date\": _vm.minDate,\n \"max-date\": _vm.maxDate,\n \"disabled\": _vm.disabled,\n \"unselectable-dates\": _vm.unselectableDates,\n \"unselectable-days-of-week\": _vm.unselectableDaysOfWeek,\n \"selectable-dates\": _vm.selectableDates,\n \"events\": _vm.eventsInThisWeek(week, index),\n \"indicators\": _vm.indicators\n },\n on: {\n \"select\": _vm.updateSelectedDate\n }\n })\n }))])\n},staticRenderFns: []}\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"datepicker control\",\n class: [_vm.size, {\n 'is-expanded': _vm.expanded\n }]\n }, [(!_vm.isMobile || _vm.inline) ? _c('b-dropdown', {\n ref: \"dropdown\",\n attrs: {\n \"position\": _vm.position,\n \"disabled\": _vm.disabled,\n \"inline\": _vm.inline\n }\n }, [(!_vm.inline) ? _c('b-input', _vm._b({\n ref: \"input\",\n attrs: {\n \"slot\": \"trigger\",\n \"autocomplete\": \"off\",\n \"value\": _vm.formatValue(_vm.dateSelected),\n \"placeholder\": _vm.placeholder,\n \"size\": _vm.size,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"rounded\": _vm.rounded,\n \"loading\": _vm.loading,\n \"disabled\": _vm.disabled,\n \"readonly\": _vm.readonly\n },\n on: {\n \"focus\": function($event) {\n _vm.$emit('focus', $event)\n },\n \"blur\": function($event) {\n _vm.$emit('blur', $event) && _vm.checkHtml5Validity()\n }\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onChange($event.target.value)\n }\n },\n slot: \"trigger\"\n }, 'b-input', _vm.$attrs, false)) : _vm._e(), _vm._v(\" \"), _c('b-dropdown-item', {\n attrs: {\n \"disabled\": _vm.disabled,\n \"custom\": \"\"\n }\n }, [_c('header', {\n staticClass: \"datepicker-header\"\n }, [(_vm.$slots.header !== undefined && _vm.$slots.header.length) ? [_vm._t(\"header\")] : _c('div', {\n staticClass: \"pagination field is-centered\"\n }, [(!_vm.isFirstMonth && !_vm.disabled) ? _c('a', {\n staticClass: \"pagination-previous\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\",\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.decrementMonth($event)\n },\n \"keydown\": [function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n $event.preventDefault();\n _vm.decrementMonth($event)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.decrementMonth($event)\n }]\n }\n }, [_c('b-icon', {\n attrs: {\n \"icon\": \"chevron-left\",\n \"pack\": _vm.iconPack,\n \"both\": \"\",\n \"type\": \"is-primary is-clickable\"\n }\n })], 1) : _vm._e(), _vm._v(\" \"), _c('a', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (!_vm.isLastMonth && !_vm.disabled),\n expression: \"!isLastMonth && !disabled\"\n }],\n staticClass: \"pagination-next\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\",\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.incrementMonth($event)\n },\n \"keydown\": [function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n $event.preventDefault();\n _vm.incrementMonth($event)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.incrementMonth($event)\n }]\n }\n }, [_c('b-icon', {\n attrs: {\n \"icon\": \"chevron-right\",\n \"pack\": _vm.iconPack,\n \"both\": \"\",\n \"type\": \"is-primary is-clickable\"\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"pagination-list\"\n }, [_c('b-field', [_c('b-select', {\n attrs: {\n \"disabled\": _vm.disabled\n },\n model: {\n value: (_vm.focusedDateData.month),\n callback: function($$v) {\n _vm.$set(_vm.focusedDateData, \"month\", $$v)\n },\n expression: \"focusedDateData.month\"\n }\n }, _vm._l((_vm.monthNames), function(month, index) {\n return _c('option', {\n key: month,\n domProps: {\n \"value\": index\n }\n }, [_vm._v(\"\\n \" + _vm._s(month) + \"\\n \")])\n })), _vm._v(\" \"), _c('b-select', {\n attrs: {\n \"disabled\": _vm.disabled\n },\n model: {\n value: (_vm.focusedDateData.year),\n callback: function($$v) {\n _vm.$set(_vm.focusedDateData, \"year\", $$v)\n },\n expression: \"focusedDateData.year\"\n }\n }, _vm._l((_vm.listOfYears), function(year) {\n return _c('option', {\n key: year,\n domProps: {\n \"value\": year\n }\n }, [_vm._v(\"\\n \" + _vm._s(year) + \"\\n \")])\n }))], 1)], 1)])], 2), _vm._v(\" \"), _c('b-datepicker-table', {\n attrs: {\n \"day-names\": _vm.dayNames,\n \"month-names\": _vm.monthNames,\n \"first-day-of-week\": _vm.firstDayOfWeek,\n \"min-date\": _vm.minDate,\n \"max-date\": _vm.maxDate,\n \"focused\": _vm.focusedDateData,\n \"disabled\": _vm.disabled,\n \"unselectable-dates\": _vm.unselectableDates,\n \"unselectable-days-of-week\": _vm.unselectableDaysOfWeek,\n \"selectable-dates\": _vm.selectableDates,\n \"events\": _vm.events,\n \"indicators\": _vm.indicators\n },\n on: {\n \"close\": function($event) {\n _vm.$refs.dropdown.isActive = false\n }\n },\n model: {\n value: (_vm.dateSelected),\n callback: function($$v) {\n _vm.dateSelected = $$v\n },\n expression: \"dateSelected\"\n }\n }), _vm._v(\" \"), (_vm.$slots.default !== undefined && _vm.$slots.default.length) ? _c('footer', {\n staticClass: \"datepicker-footer\"\n }, [_vm._t(\"default\")], 2) : _vm._e()], 1)], 1) : _c('b-input', _vm._b({\n ref: \"input\",\n attrs: {\n \"type\": \"date\",\n \"autocomplete\": \"off\",\n \"value\": _vm.formatYYYYMMDD(_vm.value),\n \"placeholder\": _vm.placeholder,\n \"size\": _vm.size,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"loading\": _vm.loading,\n \"max\": _vm.formatYYYYMMDD(_vm.maxDate),\n \"min\": _vm.formatYYYYMMDD(_vm.minDate),\n \"disabled\": _vm.disabled,\n \"readonly\": false\n },\n on: {\n \"focus\": function($event) {\n _vm.$emit('focus', $event)\n },\n \"blur\": function($event) {\n _vm.$emit('blur', $event) && _vm.checkHtml5Validity()\n }\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onChangeNativePicker($event)\n }\n }\n }, 'b-input', _vm.$attrs, false))], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(136),\n /* template */\n __webpack_require__(139),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 136 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__modal_Modal__ = __webpack_require__(62);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__modal_Modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__modal_Modal__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_BaseElementMixin__ = __webpack_require__(13);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BDialog',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a),\n extends: __WEBPACK_IMPORTED_MODULE_2__modal_Modal___default.a,\n mixins: [__WEBPACK_IMPORTED_MODULE_5__utils_BaseElementMixin__[\"a\" /* default */]],\n props: {\n title: String,\n message: String,\n icon: String,\n hasIcon: Boolean,\n type: {\n type: String,\n default: 'is-primary'\n },\n size: String,\n confirmText: {\n type: String,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDialogConfirmText ? __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDialogConfirmText : 'OK';\n }\n },\n cancelText: {\n type: String,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDialogCancelText ? __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultDialogCancelText : 'Cancel';\n }\n },\n hasInput: Boolean, // Used internally to know if it's prompt\n inputAttrs: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n onConfirm: {\n type: Function,\n default: function _default() {}\n },\n focusOn: {\n type: String,\n default: 'confirm'\n }\n },\n data: function data() {\n var prompt = this.hasInput ? this.inputAttrs.value || '' : '';\n\n return {\n prompt: prompt,\n isActive: false,\n validationMessage: ''\n };\n },\n\n computed: {\n /**\n * Icon name (MDI) based on the type.\n */\n iconByType: function iconByType() {\n switch (this.type) {\n case 'is-info':\n return 'information';\n case 'is-success':\n return 'check-circle';\n case 'is-warning':\n return 'alert';\n case 'is-danger':\n return 'alert-circle';\n default:\n return null;\n }\n },\n showCancel: function showCancel() {\n return this.cancelOptions.indexOf('button') >= 0;\n }\n },\n methods: {\n /**\n * If it's a prompt Dialog, validate the input.\n * Call the onConfirm prop (function) and close the Dialog.\n */\n confirm: function confirm() {\n var _this = this;\n\n if (this.$refs.input !== undefined) {\n if (!this.$refs.input.checkValidity()) {\n this.validationMessage = this.$refs.input.validationMessage;\n this.$nextTick(function () {\n return _this.$refs.input.select();\n });\n return;\n }\n }\n\n this.onConfirm(this.prompt);\n this.close();\n },\n\n\n /**\n * Close the Dialog.\n */\n close: function close() {\n var _this2 = this;\n\n this.isActive = false;\n // Timeout for the animation complete before destroying\n setTimeout(function () {\n _this2.$destroy();\n Object(__WEBPACK_IMPORTED_MODULE_4__utils_helpers__[\"e\" /* removeElement */])(_this2.$el);\n }, 150);\n }\n },\n beforeMount: function beforeMount() {\n // Insert the Dialog component in body tag\n document.body.appendChild(this.$el);\n },\n mounted: function mounted() {\n var _this3 = this;\n\n this.isActive = true;\n\n if (typeof this.inputAttrs.required === 'undefined') {\n this.$set(this.inputAttrs, 'required', true);\n }\n\n this.$nextTick(function () {\n // Handle which element receives focus\n if (_this3.hasInput) {\n _this3.$refs.input.focus();\n } else if (_this3.focusOn === 'cancel' && _this3.showCancel) {\n _this3.$refs.cancelButton.focus();\n } else {\n _this3.$refs.confirmButton.focus();\n }\n });\n }\n});\n\n/***/ }),\n/* 137 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_config__ = __webpack_require__(2);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BModal',\n props: {\n active: Boolean,\n component: [Object, Function],\n content: String,\n programmatic: Boolean,\n props: Object,\n events: Object,\n width: {\n type: [String, Number],\n default: 960\n },\n hasModalCard: Boolean,\n animation: {\n type: String,\n default: 'zoom-out'\n },\n canCancel: {\n type: [Array, Boolean],\n default: function _default() {\n return ['escape', 'x', 'outside', 'button'];\n }\n },\n onCancel: {\n type: Function,\n default: function _default() {}\n },\n scroll: {\n type: String,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_1__utils_config__[\"a\" /* default */].defaultModalScroll ? __WEBPACK_IMPORTED_MODULE_1__utils_config__[\"a\" /* default */].defaultModalScroll : 'clip';\n },\n validator: function validator(value) {\n return ['clip', 'keep'].indexOf(value) >= 0;\n }\n }\n },\n data: function data() {\n return {\n isActive: this.active || false,\n savedScrollTop: null,\n newWidth: typeof this.width === 'number' ? this.width + 'px' : this.width\n };\n },\n\n computed: {\n cancelOptions: function cancelOptions() {\n return typeof this.canCancel === 'boolean' ? this.canCancel ? ['escape', 'x', 'outside', 'button'] : [] : this.canCancel;\n },\n showX: function showX() {\n return this.cancelOptions.indexOf('x') >= 0;\n }\n },\n watch: {\n active: function active(value) {\n this.isActive = value;\n },\n isActive: function isActive() {\n this.handleScroll();\n }\n },\n methods: {\n handleScroll: function handleScroll() {\n if (typeof window === 'undefined') return;\n\n if (this.scroll === 'clip') {\n if (this.isActive) {\n document.documentElement.classList.add('is-clipped');\n } else {\n document.documentElement.classList.remove('is-clipped');\n }\n return;\n }\n\n this.savedScrollTop = !this.savedScrollTop ? document.documentElement.scrollTop : this.savedScrollTop;\n\n if (this.isActive) {\n document.body.classList.add('is-noscroll');\n } else {\n document.body.classList.remove('is-noscroll');\n }\n\n if (this.isActive) {\n document.body.style.top = '-' + this.savedScrollTop + 'px';\n return;\n }\n\n document.documentElement.scrollTop = this.savedScrollTop;\n document.body.style.top = null;\n this.savedScrollTop = null;\n },\n\n\n /**\n * Close the Modal if canCancel and call the onCancel prop (function).\n */\n cancel: function cancel(method) {\n if (this.cancelOptions.indexOf(method) < 0) return;\n\n this.onCancel.apply(null, arguments);\n this.close();\n },\n\n\n /**\n * Call the onCancel prop (function).\n * Emit events, and destroy modal if it's programmatic.\n */\n close: function close() {\n var _this = this;\n\n this.$emit('close');\n this.$emit('update:active', false);\n\n // Timeout for the animation complete before destroying\n if (this.programmatic) {\n this.isActive = false;\n setTimeout(function () {\n _this.$destroy();\n Object(__WEBPACK_IMPORTED_MODULE_0__utils_helpers__[\"e\" /* removeElement */])(_this.$el);\n }, 150);\n }\n },\n\n\n /**\n * Keypress event that is bound to the document.\n */\n keyPress: function keyPress(event) {\n // Esc key\n if (this.isActive && event.keyCode === 27) this.cancel('escape');\n }\n },\n created: function created() {\n if (typeof window !== 'undefined') {\n document.addEventListener('keyup', this.keyPress);\n }\n },\n beforeMount: function beforeMount() {\n // Insert the Modal component in body tag\n // only if it's programmatic\n this.programmatic && document.body.appendChild(this.$el);\n },\n mounted: function mounted() {\n if (this.programmatic) this.isActive = true;else if (this.isActive) this.handleScroll();\n },\n beforeDestroy: function beforeDestroy() {\n if (typeof window !== 'undefined') {\n document.removeEventListener('keyup', this.keyPress);\n // reset scroll\n document.documentElement.classList.remove('is-clipped');\n var savedScrollTop = !this.savedScrollTop ? document.documentElement.scrollTop : this.savedScrollTop;\n document.body.classList.remove('is-noscroll');\n document.documentElement.scrollTop = savedScrollTop;\n document.body.style.top = null;\n }\n }\n});\n\n/***/ }),\n/* 138 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": _vm.animation\n }\n }, [(_vm.isActive) ? _c('div', {\n staticClass: \"modal is-active\"\n }, [_c('div', {\n staticClass: \"modal-background\",\n on: {\n \"click\": function($event) {\n _vm.cancel('outside')\n }\n }\n }), _vm._v(\" \"), _c('div', {\n staticClass: \"animation-content\",\n class: {\n 'modal-content': !_vm.hasModalCard\n },\n style: ({\n maxWidth: _vm.newWidth\n })\n }, [(_vm.component) ? _c(_vm.component, _vm._g(_vm._b({\n tag: \"component\",\n on: {\n \"close\": _vm.close\n }\n }, 'component', _vm.props, false), _vm.events)) : (_vm.content) ? _c('div', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.content)\n }\n }) : _vm._t(\"default\")], 2), _vm._v(\" \"), (_vm.showX) ? _c('button', {\n staticClass: \"modal-close is-large\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n _vm.cancel('x')\n }\n }\n }) : _vm._e()]) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 139 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": _vm.animation\n }\n }, [(_vm.isActive) ? _c('div', {\n staticClass: \"dialog modal is-active\",\n class: _vm.size\n }, [_c('div', {\n staticClass: \"modal-background\",\n on: {\n \"click\": function($event) {\n _vm.cancel('outside')\n }\n }\n }), _vm._v(\" \"), _c('div', {\n staticClass: \"modal-card animation-content\"\n }, [(_vm.title) ? _c('header', {\n staticClass: \"modal-card-head\"\n }, [_c('p', {\n staticClass: \"modal-card-title\"\n }, [_vm._v(_vm._s(_vm.title))])]) : _vm._e(), _vm._v(\" \"), _c('section', {\n staticClass: \"modal-card-body\",\n class: {\n 'is-titleless': !_vm.title, 'is-flex': _vm.hasIcon\n }\n }, [_c('div', {\n staticClass: \"media\"\n }, [(_vm.hasIcon) ? _c('div', {\n staticClass: \"media-left\"\n }, [_c('b-icon', {\n attrs: {\n \"icon\": _vm.icon ? _vm.icon : _vm.iconByType,\n \"pack\": _vm.iconPack,\n \"type\": _vm.type,\n \"both\": !_vm.icon,\n \"size\": \"is-large\"\n }\n })], 1) : _vm._e(), _vm._v(\" \"), _c('div', {\n staticClass: \"media-content\"\n }, [_c('p', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.message)\n }\n }), _vm._v(\" \"), (_vm.hasInput) ? _c('div', {\n staticClass: \"field\"\n }, [_c('div', {\n staticClass: \"control\"\n }, [_c('input', _vm._b({\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.prompt),\n expression: \"prompt\"\n }],\n ref: \"input\",\n staticClass: \"input\",\n class: {\n 'is-danger': _vm.validationMessage\n },\n domProps: {\n \"value\": (_vm.prompt)\n },\n on: {\n \"keyup\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n _vm.confirm($event)\n },\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.prompt = $event.target.value\n }\n }\n }, 'input', _vm.inputAttrs, false))]), _vm._v(\" \"), _c('p', {\n staticClass: \"help is-danger\"\n }, [_vm._v(_vm._s(_vm.validationMessage))])]) : _vm._e()])])]), _vm._v(\" \"), _c('footer', {\n staticClass: \"modal-card-foot\"\n }, [(_vm.showCancel) ? _c('button', {\n ref: \"cancelButton\",\n staticClass: \"button\",\n on: {\n \"click\": function($event) {\n _vm.cancel('button')\n }\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.cancelText) + \"\\n \")]) : _vm._e(), _vm._v(\" \"), _c('button', {\n ref: \"confirmButton\",\n staticClass: \"button\",\n class: _vm.type,\n on: {\n \"click\": _vm.confirm\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.confirmText) + \"\\n \")])])])]) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 140 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(141),\n /* template */\n __webpack_require__(142),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 141 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// EXTERNAL MODULE: ./src/utils/helpers.js\nvar helpers = __webpack_require__(6);\n\n// CONCATENATED MODULE: ./src/utils/ssr.js\n// Polyfills for SSR\n\nvar isSSR = typeof window === 'undefined';\n\nvar HTMLElement = isSSR ? Object : window.HTMLElement;\n// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/loading/Loading.vue\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ var Loading = __webpack_exports__[\"default\"] = ({\n name: 'BLoading',\n props: {\n active: Boolean,\n programmatic: Boolean,\n container: [Object, Function, HTMLElement],\n isFullPage: {\n type: Boolean,\n default: true\n },\n animation: {\n type: String,\n default: 'fade'\n },\n canCancel: {\n type: Boolean,\n default: false\n },\n onCancel: {\n type: Function,\n default: function _default() {}\n }\n },\n data: function data() {\n return {\n isActive: this.active || false\n };\n },\n\n watch: {\n active: function active(value) {\n this.isActive = value;\n }\n },\n methods: {\n /**\n * Close the Modal if canCancel.\n */\n cancel: function cancel() {\n if (!this.canCancel || !this.isActive) return;\n\n this.close();\n },\n\n /**\n * Emit events, and destroy modal if it's programmatic.\n */\n close: function close() {\n var _this = this;\n\n this.onCancel.apply(null, arguments);\n this.$emit('close');\n this.$emit('update:active', false);\n\n // Timeout for the animation complete before destroying\n if (this.programmatic) {\n this.isActive = false;\n setTimeout(function () {\n _this.$destroy();\n Object(helpers[\"e\" /* removeElement */])(_this.$el);\n }, 150);\n }\n },\n\n /**\n * Keypress event that is bound to the document.\n */\n keyPress: function keyPress(event) {\n // Esc key\n if (event.keyCode === 27) this.cancel();\n }\n },\n created: function created() {\n if (typeof window !== 'undefined') {\n document.addEventListener('keyup', this.keyPress);\n }\n },\n beforeMount: function beforeMount() {\n // Insert the Loading component in body tag\n // only if it's programmatic\n if (this.programmatic) {\n if (!this.container) {\n document.body.appendChild(this.$el);\n } else {\n this.isFullPage = false;\n this.container.appendChild(this.$el);\n }\n }\n },\n mounted: function mounted() {\n if (this.programmatic) this.isActive = true;\n },\n beforeDestroy: function beforeDestroy() {\n if (typeof window !== 'undefined') {\n document.removeEventListener('keyup', this.keyPress);\n }\n }\n});\n\n/***/ }),\n/* 142 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": _vm.animation\n }\n }, [(_vm.isActive) ? _c('div', {\n staticClass: \"loading-overlay is-active\",\n class: {\n 'is-full-page': _vm.isFullPage\n }\n }, [_c('div', {\n staticClass: \"loading-background\",\n on: {\n \"click\": _vm.cancel\n }\n }), _vm._v(\" \"), _c('div', {\n staticClass: \"loading-icon\"\n })]) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 143 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(144),\n /* template */\n __webpack_require__(145),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 144 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__ = __webpack_require__(63);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BMessage',\n mixins: [__WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__[\"a\" /* default */]],\n data: function data() {\n return {\n newIconSize: this.iconSize || this.size || 'is-large'\n };\n }\n});\n\n/***/ }),\n/* 145 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": \"fade\"\n }\n }, [(_vm.isActive) ? _c('article', {\n staticClass: \"message\",\n class: [_vm.type, _vm.size]\n }, [(_vm.title) ? _c('header', {\n staticClass: \"message-header\"\n }, [_c('p', [_vm._v(_vm._s(_vm.title))]), _vm._v(\" \"), (_vm.closable) ? _c('button', {\n staticClass: \"delete\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": _vm.close\n }\n }) : _vm._e()]) : _vm._e(), _vm._v(\" \"), _c('section', {\n staticClass: \"message-body\"\n }, [_c('div', {\n staticClass: \"media\"\n }, [(_vm.icon && _vm.hasIcon) ? _c('div', {\n staticClass: \"media-left\"\n }, [_c('b-icon', {\n class: _vm.type,\n attrs: {\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\",\n \"size\": _vm.newIconSize\n }\n })], 1) : _vm._e(), _vm._v(\" \"), _c('div', {\n staticClass: \"media-content\"\n }, [_vm._t(\"default\")], 2)])])]) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 146 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(147),\n /* template */\n __webpack_require__(148),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 147 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__ = __webpack_require__(63);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BNotification',\n mixins: [__WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__[\"a\" /* default */]]\n});\n\n/***/ }),\n/* 148 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": \"fade\"\n }\n }, [(_vm.isActive) ? _c('article', {\n staticClass: \"notification\",\n class: _vm.type\n }, [(_vm.closable) ? _c('button', {\n staticClass: \"delete\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": _vm.close\n }\n }) : _vm._e(), _vm._v(\" \"), _c('div', {\n staticClass: \"media\"\n }, [(_vm.icon && _vm.hasIcon) ? _c('div', {\n staticClass: \"media-left\"\n }, [_c('b-icon', {\n attrs: {\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\",\n \"size\": \"is-large\"\n }\n })], 1) : _vm._e(), _vm._v(\" \"), _c('div', {\n staticClass: \"media-content\"\n }, [_vm._t(\"default\")], 2)])]) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 149 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_BaseElementMixin__ = __webpack_require__(13);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BPagination',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a),\n mixins: [__WEBPACK_IMPORTED_MODULE_2__utils_BaseElementMixin__[\"a\" /* default */]],\n props: {\n total: [Number, String],\n perPage: {\n type: [Number, String],\n default: 20\n },\n current: {\n type: [Number, String],\n default: 1\n },\n size: String,\n simple: Boolean,\n rounded: Boolean,\n order: String\n },\n computed: {\n rootClasses: function rootClasses() {\n return [this.order, this.size, {\n 'is-simple': this.simple,\n 'is-rounded': this.rounded\n }];\n },\n\n\n /**\n * Total page size (count).\n */\n pageCount: function pageCount() {\n return Math.ceil(this.total / this.perPage);\n },\n\n\n /**\n * First item of the page (count).\n */\n firstItem: function firstItem() {\n var firstItem = this.current * this.perPage - this.perPage + 1;\n return firstItem >= 0 ? firstItem : 0;\n },\n\n\n /**\n * Check if previous button is available.\n */\n hasPrev: function hasPrev() {\n return this.current > 1;\n },\n\n\n /**\n * Check if first page button should be visible.\n */\n hasFirst: function hasFirst() {\n return this.current >= 3;\n },\n\n\n /**\n * Check if first ellipsis should be visible.\n */\n hasFirstEllipsis: function hasFirstEllipsis() {\n return this.current >= 4;\n },\n\n\n /**\n * Check if last page button should be visible.\n */\n hasLast: function hasLast() {\n return this.current <= this.pageCount - 2;\n },\n\n\n /**\n * Check if last ellipsis should be visible.\n */\n hasLastEllipsis: function hasLastEllipsis() {\n return this.current < this.pageCount - 2 && this.current <= this.pageCount - 3;\n },\n\n\n /**\n * Check if next button is available.\n */\n hasNext: function hasNext() {\n return this.current < this.pageCount;\n },\n\n\n /**\n * Get near pages, 1 before and 1 after the current.\n * Also add the click event to the array.\n */\n pagesInRange: function pagesInRange() {\n var _this = this;\n\n if (this.simple) return;\n\n var left = Math.max(1, this.current - 1);\n var right = Math.min(this.current + 1, this.pageCount);\n\n var pages = [];\n\n var _loop = function _loop(i) {\n pages.push({\n number: i,\n isCurrent: _this.current === i,\n click: function click(event) {\n if (_this.current === i) return;\n _this.$emit('change', i);\n _this.$emit('update:current', i);\n\n // Set focus on element to keep tab order\n _this.$nextTick(function () {\n return event.target.focus();\n });\n }\n });\n };\n\n for (var i = left; i <= right; i++) {\n _loop(i);\n }\n return pages;\n }\n },\n watch: {\n /**\n * If current page is trying to be greater than page count, set to last.\n */\n pageCount: function pageCount(value) {\n if (this.current > value) this.last();\n }\n },\n methods: {\n /**\n * Previous button click listener.\n */\n prev: function prev() {\n if (!this.hasPrev) return;\n this.$emit('change', this.current - 1);\n this.$emit('update:current', this.current - 1);\n },\n\n\n /**\n * First button click listener.\n */\n first: function first() {\n this.$emit('change', 1);\n this.$emit('update:current', 1);\n },\n\n\n /**\n * Last button click listener.\n */\n last: function last() {\n this.$emit('change', this.pageCount);\n this.$emit('update:current', this.pageCount);\n },\n\n\n /**\n * Next button click listener.\n */\n next: function next() {\n if (!this.hasNext) return;\n this.$emit('change', this.current + 1);\n this.$emit('update:current', this.current + 1);\n }\n }\n});\n\n/***/ }),\n/* 150 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"pagination\",\n class: _vm.rootClasses\n }, [_c('a', {\n staticClass: \"pagination-previous\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\",\n \"disabled\": !_vm.hasPrev\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.prev($event)\n }\n }\n }, [_c('b-icon', {\n attrs: {\n \"icon\": \"chevron-left\",\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\"\n }\n })], 1), _vm._v(\" \"), _c('a', {\n staticClass: \"pagination-next\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\",\n \"disabled\": !_vm.hasNext\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.next($event)\n }\n }\n }, [_c('b-icon', {\n attrs: {\n \"icon\": \"chevron-right\",\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\"\n }\n })], 1), _vm._v(\" \"), (!_vm.simple) ? _c('ul', {\n staticClass: \"pagination-list\"\n }, [(_vm.hasFirst) ? _c('li', [_c('a', {\n staticClass: \"pagination-link\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.first($event)\n }\n }\n }, [_vm._v(\"\\n 1\\n \")])]) : _vm._e(), _vm._v(\" \"), (_vm.hasFirstEllipsis) ? _c('li', [_c('span', {\n staticClass: \"pagination-ellipsis\"\n }, [_vm._v(\"…\")])]) : _vm._e(), _vm._v(\" \"), _vm._l((_vm.pagesInRange), function(page) {\n return _c('li', {\n key: page.number\n }, [_c('a', {\n staticClass: \"pagination-link\",\n class: {\n 'is-current': page.isCurrent\n },\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n page.click($event)\n }\n }\n }, [_vm._v(\"\\n \" + _vm._s(page.number) + \"\\n \")])])\n }), _vm._v(\" \"), (_vm.hasLastEllipsis) ? _c('li', [_c('span', {\n staticClass: \"pagination-ellipsis\"\n }, [_vm._v(\"…\")])]) : _vm._e(), _vm._v(\" \"), (_vm.hasLast) ? _c('li', [_c('a', {\n staticClass: \"pagination-link\",\n attrs: {\n \"role\": \"button\",\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.last($event)\n }\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.pageCount) + \"\\n \")])]) : _vm._e()], 2) : _vm._e(), _vm._v(\" \"), (_vm.simple) ? _c('small', {\n staticClass: \"info\"\n }, [(_vm.perPage == 1) ? [_vm._v(\"\\n \" + _vm._s(_vm.firstItem) + \" / \" + _vm._s(_vm.total) + \"\\n \")] : [_vm._v(\"\\n \" + _vm._s(_vm.firstItem) + \"-\" + _vm._s(Math.min(_vm.current * _vm.perPage, _vm.total)) + \" / \" + _vm._s(_vm.total) + \"\\n \")]], 2) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 151 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(152),\n /* template */\n __webpack_require__(153),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 152 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_BaseElementMixin__ = __webpack_require__(13);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BPanel',\n components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a),\n mixins: [__WEBPACK_IMPORTED_MODULE_2__utils_BaseElementMixin__[\"a\" /* default */]],\n props: {\n collapsible: {\n type: Boolean,\n default: false\n },\n open: {\n type: Boolean,\n default: true\n },\n hasCustomTemplate: {\n type: Boolean,\n default: false\n },\n header: String,\n content: String,\n animation: {\n type: String,\n default: 'fade'\n }\n },\n data: function data() {\n return {\n isOpen: this.open\n };\n },\n\n watch: {\n open: function open(value) {\n this.isOpen = value;\n }\n },\n methods: {\n /**\n * Toggle the Panel and emit events if collapsible.\n */\n toggle: function toggle() {\n if (!this.collapsible) return;\n\n this.isOpen = !this.isOpen;\n this.$emit('update:open', this.isOpen);\n\n if (this.isOpen) {\n this.$emit('open');\n } else {\n this.$emit('close');\n }\n }\n }\n});\n\n/***/ }),\n/* 153 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('nav', {\n staticClass: \"panel\"\n }, [_c('div', {\n staticClass: \"panel-heading\",\n class: {\n 'is-collapsible': _vm.collapsible\n },\n on: {\n \"click\": _vm.toggle\n }\n }, [(_vm.header) ? _c('span', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.header)\n }\n }) : _vm._t(\"header\"), _vm._v(\" \"), (_vm.collapsible) ? _c('b-icon', {\n staticClass: \"is-pulled-right\",\n attrs: {\n \"both\": \"\",\n \"icon\": _vm.isOpen ? 'menu-up' : 'menu-down',\n \"icon-pack\": _vm.iconPack\n }\n }) : _vm._e()], 2), _vm._v(\" \"), _c('transition', {\n attrs: {\n \"name\": _vm.animation\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isOpen),\n expression: \"isOpen\"\n }],\n staticClass: \"panel-content\",\n class: {\n 'panel-block': !_vm.hasCustomTemplate\n }\n }, [(_vm.content) ? _c('div', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.content)\n }\n }) : _vm._t(\"default\")], 2)])], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 154 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(155),\n /* template */\n __webpack_require__(156),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 155 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BRadio',\n props: {\n value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n type: String,\n disabled: Boolean,\n required: Boolean,\n name: String,\n size: String\n },\n data: function data() {\n return {\n newValue: this.value\n };\n },\n\n watch: {\n /**\n * When v-model change, set internal value.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n /**\n * Emit input event to update the user v-model.\n */\n newValue: function newValue(value) {\n // only trigger input event\n // when current bRadioButton is clicked.\n if (value === this.nativeValue) {\n this.$emit('input', value);\n }\n }\n }\n});\n\n/***/ }),\n/* 156 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('label', {\n ref: \"label\",\n staticClass: \"b-radio radio\",\n class: [_vm.size, {\n 'is-disabled': _vm.disabled\n }],\n attrs: {\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.disabled ? false : 0\n },\n on: {\n \"keydown\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.$refs.label.click()\n }\n }\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newValue),\n expression: \"newValue\"\n }],\n attrs: {\n \"type\": \"radio\",\n \"disabled\": _vm.disabled,\n \"required\": _vm.required,\n \"name\": _vm.name\n },\n domProps: {\n \"value\": _vm.nativeValue,\n \"checked\": _vm._q(_vm.newValue, _vm.nativeValue)\n },\n on: {\n \"change\": function($event) {\n _vm.newValue = _vm.nativeValue\n }\n }\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"check\",\n class: _vm.type\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"control-label\"\n }, [_vm._t(\"default\")], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 157 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(158),\n /* template */\n __webpack_require__(159),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 158 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BRadioButton',\n props: {\n value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n type: {\n type: String,\n default: 'is-primary'\n },\n disabled: Boolean,\n name: String,\n size: String\n },\n data: function data() {\n return {\n newValue: this.value\n };\n },\n\n watch: {\n /**\n * When v-model change, set internal value.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n /**\n * Emit input event to update the user v-model.\n */\n newValue: function newValue(value) {\n // only trigger input event\n // when current bRadioButton is clicked.\n if (value === this.nativeValue) {\n this.$emit('input', value);\n }\n }\n }\n});\n\n/***/ }),\n/* 159 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"control\"\n }, [_c('label', {\n ref: \"label\",\n staticClass: \"b-radio radio button\",\n class: [_vm.newValue === _vm.nativeValue ? _vm.type : null, _vm.size],\n attrs: {\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.disabled ? false : 0\n },\n on: {\n \"keydown\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.$refs.label.click()\n }\n }\n }, [_vm._t(\"default\"), _vm._v(\" \"), _c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newValue),\n expression: \"newValue\"\n }],\n attrs: {\n \"type\": \"radio\",\n \"disabled\": _vm.disabled,\n \"name\": _vm.name\n },\n domProps: {\n \"value\": _vm.nativeValue,\n \"checked\": _vm._q(_vm.newValue, _vm.nativeValue)\n },\n on: {\n \"change\": function($event) {\n _vm.newValue = _vm.nativeValue\n }\n }\n })], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 160 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(161),\n /* template */\n __webpack_require__(162),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 161 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__ = __webpack_require__(65);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BSnackbar',\n mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__[\"a\" /* default */]],\n props: {\n actionText: {\n type: String,\n default: 'OK'\n },\n onAction: {\n type: Function,\n default: function _default() {}\n },\n indefinite: {\n type: Boolean,\n default: false\n }\n },\n data: function data() {\n return {\n newDuration: this.duration || __WEBPACK_IMPORTED_MODULE_0__utils_config__[\"a\" /* default */].defaultSnackbarDuration\n };\n },\n\n methods: {\n /**\n * Click listener.\n * Call action prop before closing (from Mixin).\n */\n action: function action() {\n this.onAction();\n this.close();\n }\n }\n});\n\n/***/ }),\n/* 162 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"enter-active-class\": _vm.transition.enter,\n \"leave-active-class\": _vm.transition.leave\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isActive),\n expression: \"isActive\"\n }],\n staticClass: \"snackbar\",\n class: [_vm.type, _vm.position]\n }, [_c('p', {\n staticClass: \"text\"\n }, [_vm._v(_vm._s(_vm.message))]), _vm._v(\" \"), (_vm.actionText) ? _c('div', {\n staticClass: \"action\",\n class: _vm.type,\n on: {\n \"click\": _vm.action\n }\n }, [_c('button', {\n staticClass: \"button is-dark\"\n }, [_vm._v(_vm._s(_vm.actionText))])]) : _vm._e()])])\n},staticRenderFns: []}\n\n/***/ }),\n/* 163 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(164),\n /* template */\n __webpack_require__(165),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 164 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BSwitch',\n props: {\n value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n disabled: Boolean,\n type: String,\n name: String,\n size: String,\n trueValue: {\n type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n default: true\n },\n falseValue: {\n type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n default: false\n }\n },\n data: function data() {\n return {\n newValue: this.value,\n isMouseDown: false\n };\n },\n\n watch: {\n /**\n * When v-model change, set internal value.\n */\n value: function value(_value) {\n this.newValue = _value;\n },\n\n /**\n * Emit input event to update the user v-model.\n */\n newValue: function newValue(value) {\n this.$emit('input', value);\n }\n }\n});\n\n/***/ }),\n/* 165 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('label', {\n ref: \"label\",\n staticClass: \"switch\",\n class: [_vm.size, {\n 'is-disabled': _vm.disabled\n }],\n attrs: {\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.disabled ? false : 0\n },\n on: {\n \"keydown\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key) && _vm._k($event.keyCode, \"space\", 32, $event.key)) { return null; }\n $event.preventDefault();\n _vm.$refs.label.click()\n },\n \"mousedown\": function($event) {\n _vm.isMouseDown = true\n },\n \"mouseup\": function($event) {\n _vm.isMouseDown = false\n },\n \"mouseout\": function($event) {\n _vm.isMouseDown = false\n },\n \"blur\": function($event) {\n _vm.isMouseDown = false\n }\n }\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newValue),\n expression: \"newValue\"\n }],\n attrs: {\n \"type\": \"checkbox\",\n \"disabled\": _vm.disabled,\n \"name\": _vm.name,\n \"true-value\": _vm.trueValue,\n \"false-value\": _vm.falseValue\n },\n domProps: {\n \"value\": _vm.nativeValue,\n \"checked\": Array.isArray(_vm.newValue) ? _vm._i(_vm.newValue, _vm.nativeValue) > -1 : _vm._q(_vm.newValue, _vm.trueValue)\n },\n on: {\n \"click\": function($event) {\n $event.stopPropagation();\n },\n \"change\": function($event) {\n var $$a = _vm.newValue,\n $$el = $event.target,\n $$c = $$el.checked ? (_vm.trueValue) : (_vm.falseValue);\n if (Array.isArray($$a)) {\n var $$v = _vm.nativeValue,\n $$i = _vm._i($$a, $$v);\n if ($$el.checked) {\n $$i < 0 && (_vm.newValue = $$a.concat([$$v]))\n } else {\n $$i > -1 && (_vm.newValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1)))\n }\n } else {\n _vm.newValue = $$c\n }\n }\n }\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"check\",\n class: [{\n 'is-elastic': _vm.isMouseDown && !_vm.disabled\n }, _vm.type]\n }), _vm._v(\" \"), _c('span', {\n staticClass: \"control-label\"\n }, [_vm._t(\"default\")], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 166 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(167),\n /* template */\n __webpack_require__(181),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 167 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray__ = __webpack_require__(168);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox__ = __webpack_require__(61);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__icon_Icon__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination__ = __webpack_require__(64);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__pagination_Pagination__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__TableMobileSort__ = __webpack_require__(176);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__TableMobileSort___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__TableMobileSort__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__TableColumn__ = __webpack_require__(66);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__TableColumn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__TableColumn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_BaseElementMixin__ = __webpack_require__(13);\n\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTable',\n components: (_components = {}, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox___default.a.name, __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_4__icon_Icon___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination___default.a.name, __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_6__TableMobileSort___default.a.name, __WEBPACK_IMPORTED_MODULE_6__TableMobileSort___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_7__TableColumn___default.a.name, __WEBPACK_IMPORTED_MODULE_7__TableColumn___default.a), _components),\n mixins: [__WEBPACK_IMPORTED_MODULE_8__utils_BaseElementMixin__[\"a\" /* default */]],\n props: {\n data: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n columns: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n bordered: Boolean,\n striped: Boolean,\n narrowed: Boolean,\n hoverable: Boolean,\n loading: Boolean,\n detailed: Boolean,\n checkable: Boolean,\n selected: Object,\n focusable: Boolean,\n customIsChecked: Function,\n isRowCheckable: {\n type: Function,\n default: function _default() {\n return true;\n }\n },\n checkedRows: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n mobileCards: {\n type: Boolean,\n default: true\n },\n defaultSort: [String, Array],\n defaultSortDirection: {\n type: String,\n default: 'asc'\n },\n paginated: Boolean,\n currentPage: {\n type: Number,\n default: 1\n },\n perPage: {\n type: [Number, String],\n default: 20\n },\n paginationSimple: Boolean,\n paginationSize: String,\n backendSorting: Boolean,\n rowClass: {\n type: Function,\n default: function _default() {\n return '';\n }\n },\n openedDetailed: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n hasDetailedVisible: {\n type: Function,\n default: function _default() {\n return true;\n }\n },\n detailKey: {\n type: String,\n default: ''\n },\n backendPagination: Boolean,\n total: {\n type: [Number, String],\n default: 0\n }\n },\n data: function data() {\n return {\n getValueByPath: __WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"b\" /* getValueByPath */],\n newColumns: [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(this.columns)),\n visibleDetailRows: this.openedDetailed,\n newData: this.data,\n newDataTotal: this.backendPagination ? this.total : this.data.length,\n newCheckedRows: [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(this.checkedRows)),\n newCurrentPage: this.currentPage,\n currentSortColumn: {},\n isAsc: true,\n firstTimeSort: true, // Used by first time initSort\n _isTable: true // Used by TableColumn\n };\n },\n\n computed: {\n tableClasses: function tableClasses() {\n return {\n 'is-bordered': this.bordered,\n 'is-striped': this.striped,\n 'is-narrow': this.narrowed,\n 'has-mobile-cards': this.mobileCards,\n 'is-hoverable': (this.hoverable || this.focusable) && this.visibleData.length\n };\n },\n\n\n /**\n * Splitted data based on the pagination.\n */\n visibleData: function visibleData() {\n if (!this.paginated) return this.newData;\n\n var currentPage = this.newCurrentPage;\n var perPage = this.perPage;\n\n if (this.newData.length <= perPage) {\n return this.newData;\n } else {\n var start = (currentPage - 1) * perPage;\n var end = parseInt(start, 10) + parseInt(perPage, 10);\n return this.newData.slice(start, end);\n }\n },\n\n\n /**\n * Check if all rows in the page are checked.\n */\n isAllChecked: function isAllChecked() {\n var _this = this;\n\n var validVisibleData = this.visibleData.filter(function (row) {\n return _this.isRowCheckable(row);\n });\n if (validVisibleData.length === 0) return false;\n var isAllChecked = validVisibleData.some(function (currentVisibleRow) {\n return Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"c\" /* indexOf */])(_this.newCheckedRows, currentVisibleRow, _this.customIsChecked) < 0;\n });\n return !isAllChecked;\n },\n\n\n /**\n * Check if all rows in the page are checkable.\n */\n isAllUncheckable: function isAllUncheckable() {\n var _this2 = this;\n\n var validVisibleData = this.visibleData.filter(function (row) {\n return _this2.isRowCheckable(row);\n });\n return validVisibleData.length === 0;\n },\n\n\n /**\n * Check if has any sortable column.\n */\n hasSortablenewColumns: function hasSortablenewColumns() {\n return this.newColumns.some(function (column) {\n return column.sortable;\n });\n },\n\n\n /**\n * Return total column count based if it's checkable or expanded\n */\n columnCount: function columnCount() {\n var count = this.newColumns.length;\n count += this.checkable ? 1 : 0;\n count += this.detailed ? 1 : 0;\n\n return count;\n }\n },\n watch: {\n /**\n * When data prop change:\n * 1. Update internal value.\n * 2. Reset newColumns (thead), in case it's on a v-for loop.\n * 3. Sort again if it's not backend-sort.\n * 4. Set new total if it's not backend-paginated.\n */\n data: function data(value) {\n var _this3 = this;\n\n // Save newColumns before resetting\n var newColumns = this.newColumns;\n\n this.newColumns = [];\n this.newData = value;\n\n // Prevent table from being headless, data could change and created hook\n // on column might not trigger\n this.$nextTick(function () {\n if (!_this3.newColumns.length) _this3.newColumns = newColumns;\n });\n\n if (!this.backendSorting) {\n this.sort(this.currentSortColumn, true);\n }\n if (!this.backendPagination) {\n this.newDataTotal = value.length;\n }\n },\n\n\n /**\n * When Pagination total change, update internal total\n * only if it's backend-paginated.\n */\n total: function total(newTotal) {\n if (!this.backendPagination) return;\n\n this.newDataTotal = newTotal;\n },\n\n\n /**\n * When checkedRows prop change, update internal value without\n * mutating original data.\n */\n checkedRows: function checkedRows(rows) {\n this.newCheckedRows = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(rows));\n },\n columns: function columns(value) {\n this.newColumns = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(value));\n },\n\n\n /**\n * When newColumns change, call initSort only first time (For example async data).\n */\n newColumns: function newColumns(_newColumns) {\n if (_newColumns.length && this.firstTimeSort) {\n this.initSort();\n this.firstTimeSort = false;\n } else if (_newColumns.length) {\n if (this.currentSortColumn.field) {\n for (var i = 0; i < _newColumns.length; i++) {\n if (_newColumns[i].field === this.currentSortColumn.field) {\n this.currentSortColumn = _newColumns[i];\n break;\n }\n }\n }\n }\n },\n\n\n /**\n * When the user wants to control the detailed rows via props.\n * Or wants to open the details of certain row with the router for example.\n */\n openedDetailed: function openedDetailed(expandedRows) {\n this.visibleDetailRows = expandedRows;\n },\n currentPage: function currentPage(newVal) {\n this.newCurrentPage = newVal;\n }\n },\n methods: {\n /**\n * Sort an array by key without mutating original data.\n * Call the user sort function if it was passed.\n */\n sortBy: function sortBy(array, key, fn, isAsc) {\n var sorted = [];\n // Sorting without mutating original data\n if (fn && typeof fn === 'function') {\n sorted = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(array)).sort(function (a, b) {\n return fn(a, b, isAsc);\n });\n } else {\n sorted = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(array)).sort(function (a, b) {\n // Get nested values from objects\n var newA = Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"b\" /* getValueByPath */])(a, key);\n var newB = Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"b\" /* getValueByPath */])(b, key);\n\n if (!newA && newA !== 0) return 1;\n if (!newB && newB !== 0) return -1;\n if (newA === newB) return 0;\n\n newA = typeof newA === 'string' ? newA.toUpperCase() : newA;\n newB = typeof newB === 'string' ? newB.toUpperCase() : newB;\n\n return isAsc ? newA > newB ? 1 : -1 : newA > newB ? -1 : 1;\n });\n }\n\n return sorted;\n },\n\n\n /**\n * Sort the column.\n * Toggle current direction on column if it's sortable\n * and not just updating the prop.\n */\n sort: function sort(column) {\n var updatingData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!column || !column.sortable) return;\n\n if (!updatingData) {\n this.isAsc = column === this.currentSortColumn ? !this.isAsc : this.defaultSortDirection.toLowerCase() !== 'desc';\n }\n if (!this.firstTimeSort) {\n this.$emit('sort', column.field, this.isAsc ? 'asc' : 'desc');\n }\n if (!this.backendSorting) {\n this.newData = this.sortBy(this.newData, column.field, column.customSort, this.isAsc);\n }\n this.currentSortColumn = column;\n },\n\n\n /**\n * Check if the row is checked (is added to the array).\n */\n isRowChecked: function isRowChecked(row) {\n return Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"c\" /* indexOf */])(this.newCheckedRows, row, this.customIsChecked) >= 0;\n },\n\n\n /**\n * Remove a checked row from the array.\n */\n removeCheckedRow: function removeCheckedRow(row) {\n var index = Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"c\" /* indexOf */])(this.newCheckedRows, row, this.customIsChecked);\n if (index >= 0) {\n this.newCheckedRows.splice(index, 1);\n }\n },\n\n\n /**\n * Header checkbox click listener.\n * Add or remove all rows in current page.\n */\n checkAll: function checkAll() {\n var _this4 = this;\n\n var isAllChecked = this.isAllChecked;\n this.visibleData.forEach(function (currentRow) {\n _this4.removeCheckedRow(currentRow);\n if (!isAllChecked) {\n if (_this4.isRowCheckable(currentRow)) {\n _this4.newCheckedRows.push(currentRow);\n }\n }\n });\n\n this.$emit('check', this.newCheckedRows);\n this.$emit('check-all', this.newCheckedRows);\n\n // Emit checked rows to update user variable\n this.$emit('update:checkedRows', this.newCheckedRows);\n },\n\n\n /**\n * Row checkbox click listener.\n * Add or remove a single row.\n */\n checkRow: function checkRow(row) {\n if (!this.isRowChecked(row)) {\n this.newCheckedRows.push(row);\n } else {\n this.removeCheckedRow(row);\n }\n\n this.$emit('check', this.newCheckedRows, row);\n\n // Emit checked rows to update user variable\n this.$emit('update:checkedRows', this.newCheckedRows);\n },\n\n\n /**\n * Row click listener.\n * Emit all necessary events.\n */\n selectRow: function selectRow(row, index) {\n this.$emit('click', row);\n\n if (this.selected === row) return;\n\n // Emit new and old row\n this.$emit('select', row, this.selected);\n\n // Emit new row to update user variable\n this.$emit('update:selected', row);\n },\n\n\n /**\n * Paginator change listener.\n */\n pageChanged: function pageChanged(page) {\n this.newCurrentPage = page > 0 ? page : 1;\n this.$emit('page-change', this.newCurrentPage);\n this.$emit('update:currentPage', this.newCurrentPage);\n },\n\n\n /**\n * Toggle to show/hide details slot\n */\n toggleDetails: function toggleDetails(obj) {\n var found = this.isVisibleDetailRow(obj);\n\n if (found) {\n this.closeDetailRow(obj);\n this.$emit('details-close', obj);\n } else {\n this.openDetailRow(obj);\n this.$emit('details-open', obj);\n }\n\n // Syncs the detailed rows with the parent component\n this.$emit('update:openedDetailed', this.visibleDetailRows);\n },\n openDetailRow: function openDetailRow(obj) {\n var index = this.handleDetailKey(obj);\n this.visibleDetailRows.push(index);\n },\n closeDetailRow: function closeDetailRow(obj) {\n var index = this.handleDetailKey(obj);\n var i = this.visibleDetailRows.indexOf(index);\n this.visibleDetailRows.splice(i, 1);\n },\n isVisibleDetailRow: function isVisibleDetailRow(obj) {\n var index = this.handleDetailKey(obj);\n var result = this.visibleDetailRows.indexOf(index) >= 0;\n return result;\n },\n\n\n /**\n * When the detailKey is defined we use the object[detailKey] as index.\n * If not, use the object reference by default.\n */\n handleDetailKey: function handleDetailKey(index) {\n var key = this.detailKey;\n return !key.length ? index : index[key];\n },\n checkPredefinedDetailedRows: function checkPredefinedDetailedRows() {\n var defaultExpandedRowsDefined = this.openedDetailed.length > 0;\n if (defaultExpandedRowsDefined && !this.detailKey.length) {\n throw new Error('If you set a predefined opened-detailed, you must provide an unique key using the prop \"detail-key\"');\n }\n },\n\n\n /**\n * Check if footer slot has custom content.\n */\n hasCustomFooterSlot: function hasCustomFooterSlot() {\n if (this.$slots.footer.length > 1) return true;\n\n var tag = this.$slots.footer[0].tag;\n if (tag !== 'th' && tag !== 'td') return false;\n\n return true;\n },\n\n\n /**\n * Check if bottom-left slot exists.\n */\n hasBottomLeftSlot: function hasBottomLeftSlot() {\n return typeof this.$slots['bottom-left'] !== 'undefined';\n },\n\n\n /**\n * Table arrow keys listener, change selection.\n */\n pressedArrow: function pressedArrow(pos) {\n if (!this.visibleData.length) return;\n\n var index = this.visibleData.indexOf(this.selected) + pos;\n\n // Prevent from going up from first and down from last\n index = index < 0 ? 0 : index > this.visibleData.length - 1 ? this.visibleData.length - 1 : index;\n\n this.selectRow(this.visibleData[index]);\n },\n\n\n /**\n * Focus table element if has selected prop.\n */\n focus: function focus() {\n if (!this.focusable) return;\n\n this.$el.querySelector('table').focus();\n },\n\n\n /**\n * Initial sorted column based on the default-sort prop.\n */\n initSort: function initSort() {\n var _this5 = this;\n\n if (!this.defaultSort) return;\n\n var sortField = '';\n var sortDirection = this.defaultSortDirection;\n\n if (Array.isArray(this.defaultSort)) {\n sortField = this.defaultSort[0];\n if (this.defaultSort[1]) {\n sortDirection = this.defaultSort[1];\n }\n } else {\n sortField = this.defaultSort;\n }\n\n this.newColumns.forEach(function (column) {\n if (column.field === sortField) {\n _this5.isAsc = sortDirection.toLowerCase() !== 'desc';\n _this5.sort(column, true);\n }\n });\n }\n },\n\n mounted: function mounted() {\n this.checkPredefinedDetailedRows();\n }\n});\n\n/***/ }),\n/* 168 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _from = __webpack_require__(169);\n\nvar _from2 = _interopRequireDefault(_from);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return (0, _from2.default)(arr);\n }\n};\n\n/***/ }),\n/* 169 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(170), __esModule: true };\n\n/***/ }),\n/* 170 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(38);\n__webpack_require__(171);\nmodule.exports = __webpack_require__(8).Array.from;\n\n\n/***/ }),\n/* 171 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ctx = __webpack_require__(46);\nvar $export = __webpack_require__(18);\nvar toObject = __webpack_require__(37);\nvar call = __webpack_require__(172);\nvar isArrayIter = __webpack_require__(173);\nvar toLength = __webpack_require__(51);\nvar createProperty = __webpack_require__(174);\nvar getIterFn = __webpack_require__(60);\n\n$export($export.S + $export.F * !__webpack_require__(175)(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n\n\n/***/ }),\n/* 172 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// call something on iterator step with safe closing on error\nvar anObject = __webpack_require__(16);\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n\n\n/***/ }),\n/* 173 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// check on default Array iterator\nvar Iterators = __webpack_require__(22);\nvar ITERATOR = __webpack_require__(4)('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n\n/***/ }),\n/* 174 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $defineProperty = __webpack_require__(9);\nvar createDesc = __webpack_require__(21);\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n\n\n/***/ }),\n/* 175 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar ITERATOR = __webpack_require__(4)('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n\n\n/***/ }),\n/* 176 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(177),\n /* template */\n __webpack_require__(178),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 177 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__select_Select__ = __webpack_require__(28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__select_Select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__select_Select__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__icon_Icon__);\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTableMobileSort',\n components: (_components = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_1__select_Select___default.a.name, __WEBPACK_IMPORTED_MODULE_1__select_Select___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a), _components),\n props: {\n currentSortColumn: Object,\n isAsc: Boolean,\n columns: Array\n },\n data: function data() {\n return {\n mobileSort: this.currentSortColumn\n };\n },\n\n watch: {\n mobileSort: function mobileSort(column) {\n if (this.currentSortColumn === column) return;\n\n this.$emit('sort', column);\n },\n currentSortColumn: function currentSortColumn(column) {\n this.mobileSort = column;\n }\n },\n methods: {\n sort: function sort() {\n this.$emit('sort', this.mobileSort);\n }\n }\n});\n\n/***/ }),\n/* 178 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"field table-mobile-sort\"\n }, [_c('div', {\n staticClass: \"field has-addons\"\n }, [_c('b-select', {\n attrs: {\n \"expanded\": \"\"\n },\n model: {\n value: (_vm.mobileSort),\n callback: function($$v) {\n _vm.mobileSort = $$v\n },\n expression: \"mobileSort\"\n }\n }, _vm._l((_vm.columns), function(column, index) {\n return (column.sortable) ? _c('option', {\n key: index,\n domProps: {\n \"value\": column\n }\n }, [_vm._v(\"\\n \" + _vm._s(column.label) + \"\\n \")]) : _vm._e()\n })), _vm._v(\" \"), _c('div', {\n staticClass: \"control\"\n }, [_c('button', {\n staticClass: \"button is-primary\",\n on: {\n \"click\": _vm.sort\n }\n }, [_c('b-icon', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.currentSortColumn === _vm.mobileSort),\n expression: \"currentSortColumn === mobileSort\"\n }],\n class: {\n 'is-desc': !_vm.isAsc\n },\n attrs: {\n \"icon\": \"arrow-up\",\n \"size\": \"is-small\",\n \"both\": \"\"\n }\n })], 1)])], 1)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 179 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__);\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTableColumn',\n props: {\n label: String,\n customKey: [String, Number],\n field: String,\n meta: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a],\n width: [Number, String],\n numeric: Boolean,\n centered: Boolean,\n sortable: Boolean,\n visible: {\n type: Boolean,\n default: true\n },\n customSort: Function,\n internal: Boolean // Used internally by Table\n },\n data: function data() {\n return {\n newKey: this.customKey || this.label\n };\n },\n\n computed: {\n rootClasses: function rootClasses() {\n return {\n 'has-text-right': this.numeric && !this.centered,\n 'has-text-centered': this.centered\n };\n }\n },\n beforeMount: function beforeMount() {\n var _this = this;\n\n if (!this.$parent.$data._isTable) {\n this.$destroy();\n throw new Error('You should wrap bTableColumn on a bTable');\n }\n\n if (this.internal) return;\n\n // Since we're using scoped prop the columns gonna be multiplied,\n // this finds when to stop based on the newKey property.\n var repeated = this.$parent.columns.some(function (column) {\n return column.newKey === _this.newKey;\n });\n !repeated && this.$parent.columns.push(this);\n },\n beforeDestroy: function beforeDestroy() {\n var index = this.$parent.columns.map(function (column) {\n return column.newKey;\n }).indexOf(this.newKey);\n if (index >= 0) {\n this.$parent.columns.splice(index, 1);\n }\n }\n});\n\n/***/ }),\n/* 180 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return (_vm.visible) ? _c('td', {\n class: _vm.rootClasses,\n attrs: {\n \"data-label\": _vm.label\n }\n }, [_c('span', [_vm._t(\"default\")], 2)]) : _vm._e()\n},staticRenderFns: []}\n\n/***/ }),\n/* 181 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"b-table\",\n class: {\n 'is-loading': _vm.loading\n }\n }, [(_vm.mobileCards && _vm.hasSortablenewColumns) ? _c('b-table-mobile-sort', {\n attrs: {\n \"current-sort-column\": _vm.currentSortColumn,\n \"is-asc\": _vm.isAsc,\n \"columns\": _vm.newColumns\n },\n on: {\n \"sort\": function (column) { return _vm.sort(column); }\n }\n }) : _vm._e(), _vm._v(\" \"), _c('div', {\n staticClass: \"table-wrapper\"\n }, [_c('table', {\n staticClass: \"table\",\n class: _vm.tableClasses,\n attrs: {\n \"tabindex\": !_vm.focusable ? false : 0\n },\n on: {\n \"keydown\": [function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"up\", 38, $event.key)) { return null; }\n $event.preventDefault();\n _vm.pressedArrow(-1)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"down\", 40, $event.key)) { return null; }\n $event.preventDefault();\n _vm.pressedArrow(1)\n }]\n }\n }, [(_vm.newColumns.length) ? _c('thead', [_c('tr', [(_vm.detailed) ? _c('th', {\n attrs: {\n \"width\": \"40px\"\n }\n }) : _vm._e(), _vm._v(\" \"), (_vm.checkable) ? _c('th', {\n staticClass: \"checkbox-cell\"\n }, [_c('b-checkbox', {\n attrs: {\n \"value\": _vm.isAllChecked,\n \"disabled\": _vm.isAllUncheckable\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.checkAll($event)\n }\n }\n })], 1) : _vm._e(), _vm._v(\" \"), _vm._l((_vm.newColumns), function(column, index) {\n return (column.visible || column.visible === undefined) ? _c('th', {\n key: index,\n class: {\n 'is-current-sort': _vm.currentSortColumn === column,\n 'is-sortable': column.sortable\n },\n style: ({\n width: column.width + 'px'\n }),\n on: {\n \"click\": function($event) {\n $event.stopPropagation();\n _vm.sort(column)\n }\n }\n }, [_c('div', {\n staticClass: \"th-wrap\",\n class: {\n 'is-numeric': column.numeric,\n 'is-centered': column.centered\n }\n }, [(_vm.$scopedSlots.header) ? _vm._t(\"header\", null, {\n column: column,\n index: index\n }) : [_vm._v(_vm._s(column.label))], _vm._v(\" \"), _c('b-icon', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.currentSortColumn === column),\n expression: \"currentSortColumn === column\"\n }],\n class: {\n 'is-desc': !_vm.isAsc\n },\n attrs: {\n \"icon\": \"arrow-up\",\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\",\n \"size\": \"is-small\"\n }\n })], 2)]) : _vm._e()\n })], 2)]) : _vm._e(), _vm._v(\" \"), (_vm.visibleData.length) ? _c('tbody', [_vm._l((_vm.visibleData), function(row, index) {\n return [_c('tr', {\n key: index,\n class: [_vm.rowClass(row, index), {\n 'is-selected': row === _vm.selected,\n 'is-checked': _vm.isRowChecked(row)\n }],\n on: {\n \"click\": function($event) {\n _vm.selectRow(row)\n },\n \"dblclick\": function($event) {\n _vm.$emit('dblclick', row)\n }\n }\n }, [(_vm.detailed) ? _c('td', {\n staticClass: \"chevron-cell\"\n }, [(_vm.hasDetailedVisible(row)) ? _c('a', {\n attrs: {\n \"role\": \"button\"\n },\n on: {\n \"click\": function($event) {\n $event.stopPropagation();\n _vm.toggleDetails(row)\n }\n }\n }, [_c('b-icon', {\n class: {\n 'is-expanded': _vm.isVisibleDetailRow(row)\n },\n attrs: {\n \"icon\": \"chevron-right\",\n \"icon-pack\": _vm.iconPack,\n \"both\": \"\"\n }\n })], 1) : _vm._e()]) : _vm._e(), _vm._v(\" \"), (_vm.checkable) ? _c('td', {\n staticClass: \"checkbox-cell\"\n }, [_c('b-checkbox', {\n attrs: {\n \"disabled\": !_vm.isRowCheckable(row),\n \"value\": _vm.isRowChecked(row)\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.checkRow(row)\n }\n }\n })], 1) : _vm._e(), _vm._v(\" \"), (_vm.$scopedSlots.default) ? _vm._t(\"default\", null, {\n row: row,\n index: index\n }) : _vm._l((_vm.newColumns), function(column) {\n return _c('BTableColumn', _vm._b({\n key: column.field,\n attrs: {\n \"internal\": \"\"\n }\n }, 'BTableColumn', column, false), [(column.renderHtml) ? _c('span', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.getValueByPath(row, column.field))\n }\n }) : [_vm._v(\"\\n \" + _vm._s(_vm.getValueByPath(row, column.field)) + \"\\n \")]], 2)\n })], 2), _vm._v(\" \"), (_vm.detailed && _vm.isVisibleDetailRow(row)) ? _c('tr', {\n staticClass: \"detail\"\n }, [_c('td', {\n attrs: {\n \"colspan\": _vm.columnCount\n }\n }, [_c('div', {\n staticClass: \"detail-container\"\n }, [_vm._t(\"detail\", null, {\n row: row,\n index: index\n })], 2)])]) : _vm._e()]\n })], 2) : _c('tbody', [_c('tr', {\n staticClass: \"is-empty\"\n }, [_c('td', {\n attrs: {\n \"colspan\": _vm.columnCount\n }\n }, [_vm._t(\"empty\")], 2)])]), _vm._v(\" \"), (_vm.$slots.footer !== undefined) ? _c('tfoot', [_c('tr', {\n staticClass: \"table-footer\"\n }, [(_vm.hasCustomFooterSlot()) ? _vm._t(\"footer\") : _c('th', {\n attrs: {\n \"colspan\": _vm.columnCount\n }\n }, [_vm._t(\"footer\")], 2)], 2)]) : _vm._e()])]), _vm._v(\" \"), ((_vm.checkable && _vm.hasBottomLeftSlot()) || _vm.paginated) ? _c('div', {\n staticClass: \"level\"\n }, [_c('div', {\n staticClass: \"level-left\"\n }, [_vm._t(\"bottom-left\")], 2), _vm._v(\" \"), _c('div', {\n staticClass: \"level-right\"\n }, [(_vm.paginated) ? _c('div', {\n staticClass: \"level-item\"\n }, [_c('b-pagination', {\n attrs: {\n \"icon-pack\": _vm.iconPack,\n \"total\": _vm.newDataTotal,\n \"per-page\": _vm.perPage,\n \"simple\": _vm.paginationSimple,\n \"size\": _vm.paginationSize,\n \"current\": _vm.newCurrentPage\n },\n on: {\n \"change\": _vm.pageChanged\n }\n })], 1) : _vm._e()])]) : _vm._e()], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 182 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(183),\n /* template */\n __webpack_require__(184),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 183 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js\nvar defineProperty = __webpack_require__(1);\nvar defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);\n\n// EXTERNAL MODULE: ./src/components/icon/Icon.vue\nvar Icon = __webpack_require__(3);\nvar Icon_default = /*#__PURE__*/__webpack_require__.n(Icon);\n\n// CONCATENATED MODULE: ./src/utils/SlotComponent.js\n/* harmony default export */ var SlotComponent = ({\n name: 'BSlotComponent',\n props: {\n component: {\n type: Object,\n required: true\n },\n name: {\n type: String,\n default: 'default'\n },\n tag: {\n type: String,\n default: 'div'\n },\n event: {\n type: String,\n default: 'hook:updated'\n }\n },\n methods: {\n refresh: function refresh() {\n this.$forceUpdate();\n },\n isVueComponent: function isVueComponent() {\n return this.component && this.component._isVue;\n }\n },\n created: function created() {\n if (this.isVueComponent()) {\n this.component.$on(this.event, this.refresh);\n }\n },\n beforeDestroy: function beforeDestroy() {\n if (this.isVueComponent()) {\n this.component.$off(this.event, this.refresh);\n }\n },\n render: function render(h) {\n if (this.isVueComponent()) {\n var slots = this.component.$slots[this.name];\n return h(this.tag, {}, slots);\n }\n }\n});\n// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/tabs/Tabs.vue\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ var Tabs = __webpack_exports__[\"default\"] = ({\n name: 'BTabs',\n components: (_components = {}, defineProperty_default()(_components, Icon_default.a.name, Icon_default.a), defineProperty_default()(_components, SlotComponent.name, SlotComponent), _components),\n props: {\n value: [String, Number],\n expanded: Boolean,\n type: String,\n size: String,\n position: String,\n animated: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n activeTab: this.value || 0,\n tabItems: [],\n contentHeight: 0,\n _isTabs: true // Used internally by TabItem\n };\n },\n\n computed: {\n navClasses: function navClasses() {\n return [this.type, this.size, this.position, {\n 'is-fullwidth': this.expanded,\n 'is-toggle-rounded is-toggle': this.type === 'is-toggle-rounded'\n }];\n }\n },\n watch: {\n /**\n * When v-model is changed set the new active tab.\n */\n value: function value(_value) {\n this.changeTab(_value);\n },\n\n\n /**\n * When tab-items are updated, set active one.\n */\n tabItems: function tabItems() {\n if (this.tabItems.length) {\n this.tabItems[this.activeTab].isActive = true;\n }\n }\n },\n methods: {\n /**\n * Change the active tab and emit change event.\n */\n changeTab: function changeTab(newIndex) {\n if (this.activeTab === newIndex) return;\n\n this.tabItems[this.activeTab].deactivate(this.activeTab, newIndex);\n this.tabItems[newIndex].activate(this.activeTab, newIndex);\n this.activeTab = newIndex;\n this.$emit('change', newIndex);\n },\n\n\n /**\n * Tab click listener, emit input event and change active tab.\n */\n tabClick: function tabClick(value) {\n this.$emit('input', value);\n this.changeTab(value);\n }\n },\n mounted: function mounted() {\n if (this.tabItems.length) {\n this.tabItems[this.activeTab].isActive = true;\n }\n }\n});\n\n/***/ }),\n/* 184 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"b-tabs\",\n class: {\n 'is-fullwidth': _vm.expanded\n }\n }, [_c('nav', {\n staticClass: \"tabs\",\n class: _vm.navClasses\n }, [_c('ul', _vm._l((_vm.tabItems), function(tabItem, index) {\n return _c('li', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (tabItem.visible),\n expression: \"tabItem.visible\"\n }],\n key: index,\n class: {\n 'is-active': _vm.activeTab === index, 'is-disabled': tabItem.disabled\n }\n }, [_c('a', {\n on: {\n \"click\": function($event) {\n _vm.tabClick(index)\n }\n }\n }, [(tabItem.$slots.header) ? [_c('b-slot-component', {\n attrs: {\n \"component\": tabItem,\n \"name\": \"header\",\n \"tag\": \"span\"\n }\n })] : [(tabItem.icon) ? _c('b-icon', {\n attrs: {\n \"icon\": tabItem.icon,\n \"pack\": tabItem.iconPack,\n \"size\": _vm.size\n }\n }) : _vm._e(), _vm._v(\" \"), _c('span', [_vm._v(_vm._s(tabItem.label))])]], 2)])\n }))]), _vm._v(\" \"), _c('section', {\n staticClass: \"tab-content\"\n }, [_vm._t(\"default\")], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 185 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(186),\n /* template */\n __webpack_require__(187),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 186 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_BaseElementMixin__ = __webpack_require__(13);\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTabItem',\n mixins: [__WEBPACK_IMPORTED_MODULE_0__utils_BaseElementMixin__[\"a\" /* default */]],\n props: {\n label: String,\n icon: String,\n disabled: Boolean,\n visible: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n isActive: false,\n transitionName: null\n };\n },\n\n methods: {\n /**\n * Activate tab, alter animation name based on the index.\n */\n activate: function activate(oldIndex, index) {\n if (!this.$parent.animated) {\n this.transitionName = null;\n } else {\n this.transitionName = index < oldIndex ? 'slide-next' : 'slide-prev';\n }\n this.isActive = true;\n },\n\n\n /**\n * Deactivate tab, alter animation name based on the index.\n */\n deactivate: function deactivate(oldIndex, index) {\n if (!this.$parent.animated) {\n this.transitionName = null;\n } else {\n this.transitionName = index < oldIndex ? 'slide-next' : 'slide-prev';\n }\n this.isActive = false;\n }\n },\n created: function created() {\n if (!this.$parent.$data._isTabs) {\n this.$destroy();\n throw new Error('You should wrap bTabItem on a bTabs');\n }\n this.$parent.tabItems.push(this);\n },\n beforeDestroy: function beforeDestroy() {\n var index = this.$parent.tabItems.indexOf(this);\n if (index >= 0) {\n this.$parent.tabItems.splice(index, 1);\n }\n }\n});\n\n/***/ }),\n/* 187 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"name\": _vm.transitionName\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isActive && _vm.visible),\n expression: \"isActive && visible\"\n }],\n staticClass: \"tab-item\"\n }, [_vm._t(\"default\")], 2)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 188 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTag',\n props: {\n attached: Boolean,\n closable: Boolean,\n type: String,\n size: String,\n rounded: Boolean,\n disabled: Boolean,\n ellipsis: Boolean,\n tabstop: {\n type: Boolean,\n default: true\n }\n },\n methods: {\n /**\n * Emit close event when delete button is clicked\n * or delete key is pressed.\n */\n close: function close() {\n if (this.disabled) return;\n\n this.$emit('close');\n }\n }\n});\n\n/***/ }),\n/* 189 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return (_vm.attached && _vm.closable) ? _c('div', {\n staticClass: \"tags has-addons\"\n }, [_c('span', {\n staticClass: \"tag\",\n class: [_vm.type, _vm.size, {\n 'is-rounded': _vm.rounded\n }]\n }, [_c('span', {\n class: {\n 'has-ellipsis': _vm.ellipsis\n }\n }, [_vm._t(\"default\")], 2)]), _vm._v(\" \"), _c('a', {\n staticClass: \"tag is-delete\",\n class: [_vm.size, {\n 'is-rounded': _vm.rounded\n }],\n attrs: {\n \"role\": \"button\",\n \"tabindex\": _vm.tabstop ? 0 : false,\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": function($event) {\n _vm.close()\n },\n \"keyup\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"delete\", [8, 46], $event.key)) { return null; }\n $event.preventDefault();\n _vm.close()\n }\n }\n })]) : _c('span', {\n staticClass: \"tag\",\n class: [_vm.type, _vm.size, {\n 'is-rounded': _vm.rounded\n }]\n }, [_c('span', {\n class: {\n 'has-ellipsis': _vm.ellipsis\n }\n }, [_vm._t(\"default\")], 2), _vm._v(\" \"), (_vm.closable) ? _c('a', {\n staticClass: \"delete is-small\",\n attrs: {\n \"role\": \"button\",\n \"disabled\": _vm.disabled,\n \"tabindex\": _vm.tabstop ? 0 : false\n },\n on: {\n \"click\": function($event) {\n _vm.close()\n },\n \"keyup\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"delete\", [8, 46], $event.key)) { return null; }\n $event.preventDefault();\n _vm.close()\n }\n }\n }) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 190 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(191),\n /* template */\n __webpack_require__(192),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 191 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTaglist',\n props: {\n attached: Boolean\n }\n});\n\n/***/ }),\n/* 192 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"tags\",\n class: {\n 'has-addons': _vm.attached\n }\n }, [_vm._t(\"default\")], 2)\n},staticRenderFns: []}\n\n/***/ }),\n/* 193 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(194),\n /* template */\n __webpack_require__(195),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 194 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__ = __webpack_require__(53);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__tag_Tag__ = __webpack_require__(67);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__tag_Tag___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__tag_Tag__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete__ = __webpack_require__(52);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_FormElementMixin__ = __webpack_require__(12);\n\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTaginput',\n components: (_components = {}, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete___default.a.name, __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_3__tag_Tag___default.a.name, __WEBPACK_IMPORTED_MODULE_3__tag_Tag___default.a), _components),\n mixins: [__WEBPACK_IMPORTED_MODULE_5__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n data: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n type: String,\n rounded: {\n type: Boolean,\n default: false\n },\n attached: {\n type: Boolean,\n default: false\n },\n maxtags: {\n type: [Number, String],\n required: false\n },\n field: {\n type: String,\n default: 'value'\n },\n autocomplete: Boolean,\n disabled: Boolean,\n ellipsis: Boolean,\n confirmKeyCodes: {\n type: Array,\n default: function _default() {\n return [13, 188];\n }\n },\n removeOnKeys: {\n type: Array,\n default: function _default() {\n return [8];\n }\n },\n allowNew: Boolean,\n onPasteSeparators: {\n type: Array,\n default: function _default() {\n return [','];\n }\n },\n beforeAdding: {\n type: Function,\n default: function _default() {\n return true;\n }\n },\n allowDuplicates: {\n type: Boolean,\n default: false\n }\n },\n data: function data() {\n return {\n tags: this.value || [],\n newTag: '',\n _elementRef: 'input',\n _isTaginput: true\n };\n },\n\n computed: {\n rootClasses: function rootClasses() {\n return {\n 'is-expanded': this.expanded\n };\n },\n containerClasses: function containerClasses() {\n return {\n 'is-focused': this.isFocused,\n 'is-focusable': this.hasInput\n };\n },\n valueLength: function valueLength() {\n return this.newTag.trim().length;\n },\n defaultSlotName: function defaultSlotName() {\n return this.hasDefaultSlot ? 'default' : 'dontrender';\n },\n emptySlotName: function emptySlotName() {\n return this.hasEmptySlot ? 'empty' : 'dontrender';\n },\n hasDefaultSlot: function hasDefaultSlot() {\n return !!this.$scopedSlots.default;\n },\n hasEmptySlot: function hasEmptySlot() {\n return !!this.$slots.empty;\n },\n\n\n /**\n * Show the input field if a maxtags hasn't been set or reached.\n */\n hasInput: function hasInput() {\n return this.maxtags == null || this.tagsLength < this.maxtags;\n },\n tagsLength: function tagsLength() {\n return this.tags.length;\n },\n\n\n /**\n * If Taginput has onPasteSeparators prop,\n * returning new RegExp used to split pasted string.\n */\n separatorsAsRegExp: function separatorsAsRegExp() {\n var sep = this.onPasteSeparators;\n\n return sep.length ? new RegExp(sep.map(function (s) {\n return s ? s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&') : null;\n }).join('|'), 'g') : null;\n }\n },\n watch: {\n /**\n * When v-model is changed set internal value.\n */\n value: function value(_value) {\n this.tags = _value;\n },\n newTag: function newTag(value) {\n this.$emit('typing', value.trim());\n },\n hasInput: function hasInput() {\n if (!this.hasInput) this.onBlur();\n }\n },\n methods: {\n addTag: function addTag(tag) {\n var tagToAdd = tag || this.newTag.trim();\n\n if (tagToAdd) {\n if (!this.autocomplete) {\n var reg = this.separatorsAsRegExp;\n if (reg && tagToAdd.match(reg)) {\n tagToAdd.split(reg).map(function (t) {\n return t.trim();\n }).filter(function (t) {\n return t.length !== 0;\n }).map(this.addTag);\n return;\n }\n }\n\n // Add the tag input if it is not blank\n // or previously added (if not allowDuplicates).\n var add = !this.allowDuplicates ? this.tags.indexOf(tagToAdd) === -1 : true;\n if (add && this.beforeAdding(tagToAdd)) {\n this.tags.push(tagToAdd);\n this.$emit('input', this.tags);\n this.$emit('add', tagToAdd);\n }\n }\n\n this.newTag = '';\n },\n getNormalizedTagText: function getNormalizedTagText(tag) {\n if ((typeof tag === 'undefined' ? 'undefined' : __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default()(tag)) === 'object') {\n return Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"b\" /* getValueByPath */])(tag, this.field);\n }\n\n return tag;\n },\n customOnBlur: function customOnBlur($event) {\n // Add tag on-blur if not select only\n if (!this.autocomplete) this.addTag();\n\n this.onBlur($event);\n },\n onSelect: function onSelect(option) {\n var _this = this;\n\n if (!option) return;\n\n this.addTag(option);\n this.$nextTick(function () {\n _this.newTag = '';\n });\n },\n removeTag: function removeTag(index) {\n var tag = this.tags.splice(index, 1)[0];\n this.$emit('input', this.tags);\n this.$emit('remove', tag);\n return tag;\n },\n removeLastTag: function removeLastTag() {\n if (this.tagsLength > 0) {\n this.removeTag(this.tagsLength - 1);\n }\n },\n keydown: function keydown(event) {\n if (this.removeOnKeys.indexOf(event.keyCode) !== -1 && !this.newTag.length) {\n this.removeLastTag();\n }\n // Stop if is to accept select only\n if (this.autocomplete && !this.allowNew) return;\n\n if (this.confirmKeyCodes.indexOf(event.keyCode) >= 0) {\n event.preventDefault();\n this.addTag();\n }\n }\n }\n});\n\n/***/ }),\n/* 195 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"taginput control\",\n class: _vm.rootClasses\n }, [_c('div', {\n staticClass: \"taginput-container\",\n class: [_vm.statusType, _vm.size, _vm.containerClasses],\n attrs: {\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": function($event) {\n _vm.hasInput && _vm.focus($event)\n }\n }\n }, [_vm._l((_vm.tags), function(tag, index) {\n return _c('b-tag', {\n key: index,\n attrs: {\n \"type\": _vm.type,\n \"size\": _vm.size,\n \"rounded\": _vm.rounded,\n \"attached\": _vm.attached,\n \"tabstop\": false,\n \"disabled\": _vm.disabled,\n \"ellipsis\": _vm.ellipsis,\n \"closable\": \"\"\n },\n on: {\n \"close\": function($event) {\n _vm.removeTag(index)\n }\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.getNormalizedTagText(tag)) + \"\\n \")])\n }), _vm._v(\" \"), (_vm.hasInput) ? _c('b-autocomplete', _vm._b({\n ref: \"autocomplete\",\n attrs: {\n \"data\": _vm.data,\n \"field\": _vm.field,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"maxlength\": _vm.maxlength,\n \"has-counter\": false,\n \"size\": _vm.size,\n \"disabled\": _vm.disabled,\n \"loading\": _vm.loading,\n \"keep-first\": \"\"\n },\n on: {\n \"focus\": _vm.onFocus,\n \"blur\": _vm.customOnBlur,\n \"select\": _vm.onSelect\n },\n nativeOn: {\n \"keydown\": function($event) {\n _vm.keydown($event)\n }\n },\n scopedSlots: _vm._u([{\n key: _vm.defaultSlotName,\n fn: function(props) {\n return [_vm._t(\"default\", null, {\n option: props.option,\n index: props.index\n })]\n }\n }]),\n model: {\n value: (_vm.newTag),\n callback: function($$v) {\n _vm.newTag = $$v\n },\n expression: \"newTag\"\n }\n }, 'b-autocomplete', _vm.$attrs, false), [_c('template', {\n slot: _vm.emptySlotName\n }, [_vm._t(\"empty\")], 2)], 2) : _vm._e()], 2), _vm._v(\" \"), (_vm.maxtags || _vm.maxlength) ? _c('p', {\n staticClass: \"help counter\"\n }, [(_vm.maxlength && _vm.valueLength > 0) ? [_vm._v(\"\\n \" + _vm._s(_vm.valueLength) + \" / \" + _vm._s(_vm.maxlength) + \"\\n \")] : (_vm.maxtags) ? [_vm._v(\"\\n \" + _vm._s(_vm.tagsLength) + \" / \" + _vm._s(_vm.maxtags) + \"\\n \")] : _vm._e()], 2) : _vm._e()])\n},staticRenderFns: []}\n\n/***/ }),\n/* 196 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(197),\n /* template */\n __webpack_require__(198),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 197 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_FormElementMixin__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_helpers__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown__ = __webpack_require__(43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem__ = __webpack_require__(44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__input_Input__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__input_Input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__input_Input__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__field_Field__ = __webpack_require__(45);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__field_Field___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__field_Field__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__select_Select__ = __webpack_require__(28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__select_Select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__select_Select__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__icon_Icon__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__icon_Icon__);\n\n\nvar _components;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n\n\nvar AM = 'AM';\nvar PM = 'PM';\nvar HOUR_FORMAT_24 = '24';\nvar HOUR_FORMAT_12 = '12';\n\nvar formatNumber = function formatNumber(value) {\n return (value < 10 ? '0' : '') + value;\n};\n\nvar timeFormatter = function timeFormatter(date, vm) {\n var hours = date.getHours();\n var minutes = date.getMinutes();\n var am = false;\n if (vm.hourFormat === HOUR_FORMAT_12) {\n am = hours < 12;\n if (hours > 12) {\n hours -= 12;\n } else if (hours === 0) {\n hours = 12;\n }\n }\n return formatNumber(hours) + ':' + formatNumber(minutes) + (vm.hourFormat === HOUR_FORMAT_12 ? ' ' + (am ? AM : PM) : '');\n};\n\nvar timeParser = function timeParser(date, vm) {\n if (date) {\n var dateString = date;\n var am = false;\n if (vm.hourFormat === HOUR_FORMAT_12) {\n var dateString12 = date.split(' ');\n dateString = dateString12[0];\n am = dateString12[1] === AM;\n }\n var time = dateString.split(':');\n var hours = parseInt(time[0], 10);\n var minutes = parseInt(time[1], 10);\n if (isNaN(hours) || hours < 0 || hours > 23 || vm.hourFormat === HOUR_FORMAT_12 && (hours < 1 || hours > 12) || isNaN(minutes) || minutes < 0 || minutes > 59) {\n return null;\n }\n var d = null;\n if (vm.dateSelected && !isNaN(vm.dateSelected)) {\n d = new Date(vm.dateSelected);\n } else {\n d = new Date();\n d.setMilliseconds(0);\n d.setSeconds(0);\n }\n d.setMinutes(minutes);\n if (vm.hourFormat === HOUR_FORMAT_12) {\n if (am && hours === 12) {\n hours = 0;\n } else if (!am && hours !== 12) {\n hours += 12;\n }\n }\n d.setHours(hours);\n return d;\n }\n return null;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTimepicker',\n components: (_components = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_6__input_Input___default.a.name, __WEBPACK_IMPORTED_MODULE_6__input_Input___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_7__field_Field___default.a.name, __WEBPACK_IMPORTED_MODULE_7__field_Field___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_8__select_Select___default.a.name, __WEBPACK_IMPORTED_MODULE_8__select_Select___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default.a.name, __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default.a.name, __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default.a), _components),\n mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: Date,\n inline: Boolean,\n minTime: Date,\n maxTime: Date,\n placeholder: String,\n readonly: {\n type: Boolean,\n default: true\n },\n disabled: {\n type: Boolean,\n default: false\n },\n hourFormat: {\n type: String,\n default: HOUR_FORMAT_24,\n validator: function validator(value) {\n return value === HOUR_FORMAT_24 || value === HOUR_FORMAT_12;\n }\n },\n incrementMinutes: {\n type: Number,\n default: 1\n },\n timeFormatter: {\n type: Function,\n default: function _default(date, vm) {\n if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultTimeFormatter === 'function') {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultTimeFormatter(date);\n } else {\n return timeFormatter(date, vm);\n }\n }\n },\n timeParser: {\n type: Function,\n default: function _default(date, vm) {\n if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultTimeParser === 'function') {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultTimeParser(date);\n } else {\n return timeParser(date, vm);\n }\n }\n },\n mobileNative: {\n type: Boolean,\n default: function _default() {\n return __WEBPACK_IMPORTED_MODULE_3__utils_config__[\"a\" /* default */].defaultTimepickerMobileNative;\n }\n },\n position: String,\n unselectableTimes: Array\n },\n data: function data() {\n return {\n dateSelected: this.value,\n hoursSelected: null,\n minutesSelected: null,\n meridienSelected: null,\n _elementRef: 'input',\n _isTimepicker: true\n };\n },\n\n computed: {\n hours: function hours() {\n var hours = [];\n var numberOfHours = this.isHourFormat24 ? 24 : 12;\n for (var i = 0; i < numberOfHours; i++) {\n var value = i;\n var label = value;\n if (!this.isHourFormat24) {\n value = i + 1;\n label = value;\n if (this.meridienSelected === AM) {\n if (value === 12) {\n value = 0;\n }\n } else if (this.meridienSelected === PM) {\n if (value !== 12) {\n value += 12;\n }\n }\n }\n hours.push({\n label: formatNumber(label),\n value: value\n });\n }\n return hours;\n },\n minutes: function minutes() {\n var minutes = [];\n for (var i = 0; i < 60; i += this.incrementMinutes) {\n minutes.push({\n label: formatNumber(i),\n value: i\n });\n }\n return minutes;\n },\n meridiens: function meridiens() {\n return [AM, PM];\n },\n isMobile: function isMobile() {\n return this.mobileNative && __WEBPACK_IMPORTED_MODULE_2__utils_helpers__[\"d\" /* isMobile */].any();\n },\n isHourFormat24: function isHourFormat24() {\n return this.hourFormat === HOUR_FORMAT_24;\n }\n },\n watch: {\n hourFormat: function hourFormat(value) {\n if (this.hoursSelected !== null) {\n this.meridienSelected = this.hoursSelected >= 12 ? PM : AM;\n }\n },\n\n\n /**\n * Emit input event with selected date as payload.\n */\n dateSelected: function dateSelected(value) {\n this.$emit('input', value);\n },\n\n\n /**\n * When v-model is changed:\n * 1. Update internal value.\n * 2. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.updateInternalState(_value);\n this.dateSelected = _value;\n\n !this.isValid && this.$refs.input.checkHtml5Validity();\n }\n },\n methods: {\n onMeridienChange: function onMeridienChange(value) {\n if (this.hoursSelected !== null) {\n if (value === PM) {\n if (this.hoursSelected === 0) {\n this.hoursSelected = 12;\n } else {\n this.hoursSelected += 12;\n }\n } else if (value === AM) {\n if (this.hoursSelected === 12) {\n this.hoursSelected = 0;\n } else {\n this.hoursSelected -= 12;\n }\n }\n }\n this.updateDateSelected(this.hoursSelected, this.minutesSelected, value);\n },\n onHoursChange: function onHoursChange(value) {\n this.updateDateSelected(parseInt(value, 10), this.minutesSelected, this.meridienSelected);\n },\n onMinutesChange: function onMinutesChange(value) {\n this.updateDateSelected(this.hoursSelected, parseInt(value, 10), this.meridienSelected);\n },\n updateDateSelected: function updateDateSelected(hours, minutes, meridiens) {\n if (hours != null && minutes != null && (!this.isHourFormat24 && meridiens !== null || this.isHourFormat24)) {\n if (this.dateSelected && !isNaN(this.dateSelected)) {\n this.dateSelected = new Date(this.dateSelected);\n } else {\n this.dateSelected = new Date();\n this.dateSelected.setMilliseconds(0);\n this.dateSelected.setSeconds(0);\n }\n this.dateSelected.setHours(hours);\n this.dateSelected.setMinutes(minutes);\n }\n },\n updateInternalState: function updateInternalState(value) {\n if (value) {\n this.hoursSelected = value.getHours();\n this.minutesSelected = value.getMinutes();\n this.meridienSelected = value.getHours() >= 12 ? PM : AM;\n } else {\n this.hoursSelected = null;\n this.minutesSelected = null;\n this.meridienSelected = AM;\n }\n },\n isHourDisabled: function isHourDisabled(hour) {\n var _this = this;\n\n var disabled = false;\n if (this.minTime) {\n var minHours = this.minTime.getHours();\n disabled = hour < minHours;\n }\n if (this.maxTime) {\n if (!disabled) {\n var maxHours = this.maxTime.getHours();\n disabled = hour > maxHours;\n }\n }\n if (this.unselectableTimes) {\n if (!disabled) {\n if (this.minutesSelected !== null) {\n var unselectable = this.unselectableTimes.filter(function (time) {\n return time.getHours() === hour && time.getMinutes() === _this.minutesSelected;\n });\n disabled = unselectable.length > 0;\n } else {\n var _unselectable = this.unselectableTimes.filter(function (time) {\n return time.getHours() === hour;\n });\n disabled = _unselectable.length === this.minutes.length;\n }\n }\n }\n return disabled;\n },\n isMinuteDisabled: function isMinuteDisabled(minute) {\n var _this2 = this;\n\n var disabled = false;\n if (this.hoursSelected !== null) {\n if (this.isHourDisabled(this.hoursSelected)) {\n disabled = true;\n } else {\n if (this.minTime) {\n var minHours = this.minTime.getHours();\n var minMinutes = this.minTime.getMinutes();\n disabled = this.hoursSelected === minHours && minute < minMinutes;\n }\n if (this.maxTime) {\n if (!disabled) {\n var maxHours = this.maxTime.getHours();\n var _minMinutes = this.maxTime.getMinutes();\n disabled = this.hoursSelected === maxHours && minute > _minMinutes;\n }\n }\n }\n if (this.unselectableTimes) {\n if (!disabled) {\n var unselectable = this.unselectableTimes.filter(function (time) {\n return time.getHours() === _this2.hoursSelected && time.getMinutes() === minute;\n });\n disabled = unselectable.length > 0;\n }\n }\n }\n return disabled;\n },\n\n\n /*\n * Parse string into date\n */\n onChange: function onChange(value) {\n var date = this.timeParser(value, this);\n this.updateInternalState(date);\n if (date && !isNaN(date)) {\n this.dateSelected = date;\n } else {\n // Force refresh input value when not valid date\n this.dateSelected = null;\n this.$refs.input.newValue = this.dateSelected;\n }\n },\n\n\n /*\n * Format date into string\n */\n formatValue: function formatValue(value) {\n if (value && !isNaN(value)) {\n return this.timeFormatter(value, this);\n } else {\n return null;\n }\n },\n\n\n /*\n * Close dropdown time picker\n */\n close: function close() {\n if (this.$refs.dropdown) {\n this.$refs.dropdown.isActive = false;\n }\n },\n\n\n /*\n * Format date into string 'HH-MM-SS'\n */\n formatHHMMSS: function formatHHMMSS(value) {\n var date = new Date(value);\n if (value && !isNaN(date)) {\n var hours = date.getHours();\n var minutes = date.getMinutes();\n return formatNumber(hours) + ':' + formatNumber(minutes) + ':00';\n }\n return '';\n },\n\n\n /*\n * Parse time from string\n */\n onChangeNativePicker: function onChangeNativePicker(event) {\n var date = event.target.value;\n if (date) {\n if (this.dateSelected && !isNaN(this.dateSelected)) {\n this.dateSelected = new Date(this.dateSelected);\n } else {\n this.dateSelected = new Date();\n this.dateSelected.setMilliseconds(0);\n this.dateSelected.setSeconds(0);\n }\n var time = date.split(':');\n this.dateSelected.setHours(parseInt(time[0], 10));\n this.dateSelected.setMinutes(parseInt(time[1], 10));\n } else {\n this.dateSelected = null;\n }\n }\n },\n mounted: function mounted() {\n this.updateInternalState(this.value);\n }\n});\n\n/***/ }),\n/* 198 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"timepicker control\",\n class: [_vm.size, {\n 'is-expanded': _vm.expanded\n }]\n }, [(!_vm.isMobile || _vm.inline) ? _c('b-dropdown', {\n ref: \"dropdown\",\n attrs: {\n \"position\": _vm.position,\n \"disabled\": _vm.disabled,\n \"inline\": _vm.inline\n }\n }, [(!_vm.inline) ? _c('b-input', _vm._b({\n ref: \"input\",\n attrs: {\n \"slot\": \"trigger\",\n \"autocomplete\": \"off\",\n \"value\": _vm.formatValue(_vm.dateSelected),\n \"placeholder\": _vm.placeholder,\n \"size\": _vm.size,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"loading\": _vm.loading,\n \"disabled\": _vm.disabled,\n \"readonly\": _vm.readonly,\n \"rounded\": _vm.rounded\n },\n on: {\n \"focus\": function($event) {\n _vm.$emit('focus', $event)\n },\n \"blur\": function($event) {\n _vm.$emit('blur', $event) && _vm.checkHtml5Validity()\n }\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onChange($event.target.value)\n }\n },\n slot: \"trigger\"\n }, 'b-input', _vm.$attrs, false)) : _vm._e(), _vm._v(\" \"), _c('b-dropdown-item', {\n attrs: {\n \"disabled\": _vm.disabled,\n \"custom\": \"\"\n }\n }, [_c('div', {\n staticClass: \"pagination-list\"\n }, [_c('b-field', [_c('b-select', {\n attrs: {\n \"disabled\": _vm.disabled,\n \"placeholder\": \"00\"\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onHoursChange($event.target.value)\n }\n },\n model: {\n value: (_vm.hoursSelected),\n callback: function($$v) {\n _vm.hoursSelected = $$v\n },\n expression: \"hoursSelected\"\n }\n }, _vm._l((_vm.hours), function(hour) {\n return _c('option', {\n key: hour.value,\n attrs: {\n \"disabled\": _vm.isHourDisabled(hour.value)\n },\n domProps: {\n \"value\": hour.value\n }\n }, [_vm._v(\"\\n \" + _vm._s(hour.label) + \"\\n \")])\n })), _vm._v(\" \"), _c('b-select', {\n attrs: {\n \"disabled\": _vm.disabled,\n \"placeholder\": \"00\"\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onMinutesChange($event.target.value)\n }\n },\n model: {\n value: (_vm.minutesSelected),\n callback: function($$v) {\n _vm.minutesSelected = $$v\n },\n expression: \"minutesSelected\"\n }\n }, _vm._l((_vm.minutes), function(minute) {\n return _c('option', {\n key: minute.value,\n attrs: {\n \"disabled\": _vm.isMinuteDisabled(minute.value)\n },\n domProps: {\n \"value\": minute.value\n }\n }, [_vm._v(\"\\n \" + _vm._s(minute.label) + \"\\n \")])\n })), _vm._v(\" \"), (!_vm.isHourFormat24) ? _c('b-select', {\n attrs: {\n \"disabled\": _vm.disabled\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onMeridienChange($event.target.value)\n }\n },\n model: {\n value: (_vm.meridienSelected),\n callback: function($$v) {\n _vm.meridienSelected = $$v\n },\n expression: \"meridienSelected\"\n }\n }, _vm._l((_vm.meridiens), function(meridien) {\n return _c('option', {\n key: meridien,\n domProps: {\n \"value\": meridien\n }\n }, [_vm._v(\"\\n \" + _vm._s(meridien) + \"\\n \")])\n })) : _vm._e()], 1)], 1), _vm._v(\" \"), (_vm.$slots.default !== undefined && _vm.$slots.default.length) ? _c('footer', {\n staticClass: \"timepicker-footer\"\n }, [_vm._t(\"default\")], 2) : _vm._e()])], 1) : _c('b-input', _vm._b({\n ref: \"input\",\n attrs: {\n \"type\": \"time\",\n \"autocomplete\": \"off\",\n \"value\": _vm.formatHHMMSS(_vm.value),\n \"placeholder\": _vm.placeholder,\n \"size\": _vm.size,\n \"icon\": _vm.icon,\n \"icon-pack\": _vm.iconPack,\n \"loading\": _vm.loading,\n \"max\": _vm.formatHHMMSS(_vm.maxTime),\n \"min\": _vm.formatHHMMSS(_vm.minTime),\n \"disabled\": _vm.disabled,\n \"readonly\": false\n },\n on: {\n \"focus\": function($event) {\n _vm.$emit('focus', $event)\n },\n \"blur\": function($event) {\n _vm.$emit('blur', $event) && _vm.checkHtml5Validity()\n }\n },\n nativeOn: {\n \"change\": function($event) {\n _vm.onChangeNativePicker($event)\n }\n }\n }, 'b-input', _vm.$attrs, false))], 1)\n},staticRenderFns: []}\n\n/***/ }),\n/* 199 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(200),\n /* template */\n __webpack_require__(201),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 200 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__ = __webpack_require__(65);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BToast',\n mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__[\"a\" /* default */]],\n data: function data() {\n return {\n newDuration: this.duration || __WEBPACK_IMPORTED_MODULE_0__utils_config__[\"a\" /* default */].defaultToastDuration\n };\n }\n});\n\n/***/ }),\n/* 201 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('transition', {\n attrs: {\n \"enter-active-class\": _vm.transition.enter,\n \"leave-active-class\": _vm.transition.leave\n }\n }, [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.isActive),\n expression: \"isActive\"\n }],\n staticClass: \"toast\",\n class: [_vm.type, _vm.position]\n }, [_c('div', {\n domProps: {\n \"innerHTML\": _vm._s(_vm.message)\n }\n })])])\n},staticRenderFns: []}\n\n/***/ }),\n/* 202 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(203),\n /* template */\n __webpack_require__(204),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 203 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BTooltip',\n props: {\n active: {\n type: Boolean,\n default: true\n },\n type: String,\n label: String,\n position: {\n type: String,\n default: 'is-top',\n validator: function validator(value) {\n return ['is-top', 'is-bottom', 'is-left', 'is-right'].indexOf(value) > -1;\n }\n },\n always: Boolean,\n animated: Boolean,\n square: Boolean,\n dashed: Boolean,\n multilined: Boolean,\n size: {\n type: String,\n default: 'is-medium'\n }\n },\n computed: {\n newType: function newType() {\n return this.type || __WEBPACK_IMPORTED_MODULE_0__utils_config__[\"a\" /* default */].defaultTooltipType;\n },\n newAnimated: function newAnimated() {\n return this.animated || __WEBPACK_IMPORTED_MODULE_0__utils_config__[\"a\" /* default */].defaultTooltipAnimated;\n }\n }\n});\n\n/***/ }),\n/* 204 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('span', {\n class: [_vm.newType, _vm.position, _vm.size, {\n 'tooltip': _vm.active,\n 'is-square': _vm.square,\n 'is-animated': _vm.newAnimated,\n 'is-always': _vm.always,\n 'is-multiline': _vm.multilined,\n 'is-dashed': _vm.dashed\n }],\n attrs: {\n \"data-label\": _vm.label\n }\n }, [_vm._t(\"default\")], 2)\n},staticRenderFns: []}\n\n/***/ }),\n/* 205 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(206),\n /* template */\n __webpack_require__(207),\n /* styles */\n null,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 206 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_FormElementMixin__ = __webpack_require__(12);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'BUpload',\n mixins: [__WEBPACK_IMPORTED_MODULE_0__utils_FormElementMixin__[\"a\" /* default */]],\n inheritAttrs: false,\n props: {\n value: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n multiple: Boolean,\n disabled: Boolean,\n accept: String,\n dragDrop: Boolean,\n type: {\n type: String,\n default: 'is-primary'\n },\n native: {\n type: Boolean,\n default: false\n }\n },\n data: function data() {\n return {\n newValue: this.value || [],\n dragDropFocus: false,\n _elementRef: 'input'\n };\n },\n\n watch: {\n /**\n * When v-model is changed:\n * 1. Set internal value.\n * 2. Reset input value if array is empty\n * 3. If it's invalid, validate again.\n */\n value: function value(_value) {\n this.newValue = _value;\n if (!this.newValue || this.newValue.length === 0) {\n this.$refs.input.value = null;\n }\n !this.isValid && !this.dragDrop && this.checkHtml5Validity();\n }\n },\n methods: {\n\n /**\n * Listen change event on input type 'file',\n * emit 'input' event and validate\n */\n onFileChange: function onFileChange(event) {\n if (this.disabled || this.loading) return;\n if (this.dragDrop) {\n this.updateDragDropFocus(false);\n }\n var value = event.target.files || event.dataTransfer.files;\n if (value && value.length) {\n if (!this.multiple) {\n // only one element in case drag drop mode and isn't multiple\n if (this.dragDrop) {\n if (value.length === 1) {\n this.newValue = [];\n } else {\n return false;\n }\n } else {\n this.newValue = [];\n }\n } else {\n if (this.native) {\n this.newValue = [];\n }\n }\n for (var i = 0; i < value.length; i++) {\n var file = value[i];\n if (this.checkType(file)) {\n this.newValue.push(file);\n }\n }\n }\n this.$emit('input', this.newValue);\n !this.dragDrop && this.checkHtml5Validity();\n },\n\n\n /**\n * Listen drag-drop to update internal variable\n */\n updateDragDropFocus: function updateDragDropFocus(focus) {\n if (!this.disabled && !this.loading) {\n this.dragDropFocus = focus;\n }\n },\n\n\n /**\n * Check mime type of file\n */\n checkType: function checkType(file) {\n if (!this.accept) return true;\n var types = this.accept.split(',');\n if (types.length === 0) return true;\n var valid = false;\n for (var i = 0; i < types.length && !valid; i++) {\n var type = types[i].trim();\n if (type) {\n if (type.substring(0, 1) === '.') {\n // check extension\n var extIndex = file.name.lastIndexOf('.');\n if (extIndex >= 0 && file.name.substring(extIndex) === type) {\n valid = true;\n }\n } else {\n // check mime type\n if (file.type.match(type)) {\n valid = true;\n }\n }\n }\n }\n return valid;\n }\n }\n});\n\n/***/ }),\n/* 207 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('label', {\n staticClass: \"upload control\"\n }, [(!_vm.dragDrop) ? [_vm._t(\"default\")] : _c('div', {\n staticClass: \"upload-draggable\",\n class: [_vm.type, {\n 'is-loading': _vm.loading,\n 'is-disabled': _vm.disabled,\n 'is-hovered': _vm.dragDropFocus\n }],\n on: {\n \"dragover\": function($event) {\n $event.preventDefault();\n _vm.updateDragDropFocus(true)\n },\n \"dragleave\": function($event) {\n $event.preventDefault();\n _vm.updateDragDropFocus(false)\n },\n \"dragenter\": function($event) {\n $event.preventDefault();\n _vm.updateDragDropFocus(true)\n },\n \"drop\": function($event) {\n $event.preventDefault();\n _vm.onFileChange($event)\n }\n }\n }, [_vm._t(\"default\")], 2), _vm._v(\" \"), _c('input', _vm._b({\n ref: \"input\",\n attrs: {\n \"type\": \"file\",\n \"multiple\": _vm.multiple,\n \"accept\": _vm.accept,\n \"disabled\": _vm.disabled\n },\n on: {\n \"change\": _vm.onFileChange\n }\n }, 'input', _vm.$attrs, false))], 2)\n},staticRenderFns: []}\n\n/***/ })\n/******/ ]);\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/buefy/dist/buefy.js\n// module id = 20\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../css-loader/index.js!./buefy.css\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../../vue-style-loader/lib/addStylesClient.js\")(\"6e4843aa\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/buefy/dist/buefy.css\n// module id = 21\n// module chunks = 0","exports = module.exports = require(\"../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*! Buefy v0.6.7 | MIT License | github.com/buefy/buefy */ \\n/*! bulma.io v0.7.1 | MIT License | github.com/jgthms/bulma */@keyframes spinAround{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.b-checkbox.checkbox,.b-radio.radio,.breadcrumb,.button,.delete,.file,.icon,.is-unselectable,.modal-close,.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous,.switch,.tabs{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-link:after,.select:not(.is-multiple):not(.is-loading):after{border:3px solid transparent;border-radius:2px;border-right:0;border-top:0;content:\\\" \\\";display:block;height:.625em;margin-top:-.4375em;pointer-events:none;position:absolute;top:50%;transform:rotate(-45deg);transform-origin:center;width:.625em}.block:not(:last-child),.box:not(:last-child),.breadcrumb:not(:last-child),.content:not(:last-child),.highlight:not(:last-child),.level:not(:last-child),.message:not(:last-child),.notification:not(:last-child),.progress:not(:last-child),.subtitle:not(:last-child),.table-container:not(:last-child),.table:not(:last-child),.tabs:not(:last-child),.title:not(:last-child){margin-bottom:1.5rem}.delete,.modal-close{-moz-appearance:none;-webkit-appearance:none;background-color:hsla(0,0%,4%,.2);border:none;border-radius:290486px;cursor:pointer;display:inline-block;flex-grow:0;flex-shrink:0;font-size:0;height:20px;max-height:20px;max-width:20px;min-height:20px;min-width:20px;outline:none;position:relative;vertical-align:top;width:20px}.delete:after,.delete:before,.modal-close:after,.modal-close:before{background-color:#fff;content:\\\"\\\";display:block;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) rotate(45deg);transform-origin:center center}.delete:before,.modal-close:before{height:2px;width:50%}.delete:after,.modal-close:after{height:50%;width:2px}.delete:focus,.delete:hover,.modal-close:focus,.modal-close:hover{background-color:hsla(0,0%,4%,.3)}.delete:active,.modal-close:active{background-color:hsla(0,0%,4%,.4)}.is-small.delete,.is-small.modal-close{height:16px;max-height:16px;max-width:16px;min-height:16px;min-width:16px;width:16px}.is-medium.delete,.is-medium.modal-close{height:24px;max-height:24px;max-width:24px;min-height:24px;min-width:24px;width:24px}.is-large.delete,.is-large.modal-close{height:32px;max-height:32px;max-width:32px;min-height:32px;min-width:32px;width:32px}.b-table.is-loading:after,.button.is-loading:after,.control.is-loading:after,.loader,.loading-overlay .loading-icon:after,.select.is-loading:after,.upload .upload-draggable.is-loading:after{animation:spinAround .5s infinite linear;border:2px solid #dbdbdb;border-radius:290486px;border-right-color:transparent;border-top-color:transparent;content:\\\"\\\";display:block;height:1em;position:relative;width:1em}.dropdown .background,.hero-video,.image.is-1by1 img,.image.is-1by2 img,.image.is-1by3 img,.image.is-2by1 img,.image.is-2by3 img,.image.is-3by1 img,.image.is-3by2 img,.image.is-3by4 img,.image.is-3by5 img,.image.is-4by3 img,.image.is-4by5 img,.image.is-5by3 img,.image.is-5by4 img,.image.is-9by16 img,.image.is-16by9 img,.image.is-square img,.is-overlay,.loading-overlay,.loading-overlay .loading-background,.modal,.modal-background{bottom:0;left:0;position:absolute;right:0;top:0}.button,.file-cta,.file-name,.input,.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous,.select select,.taginput .taginput-container.is-focusable,.textarea{-moz-appearance:none;-webkit-appearance:none;align-items:center;border:1px solid transparent;border-radius:4px;box-shadow:none;display:inline-flex;font-size:1rem;height:2.25em;justify-content:flex-start;line-height:1.5;padding:calc(.375em - 1px) calc(.625em - 1px);position:relative;vertical-align:top}.button:active,.button:focus,.file-cta:active,.file-cta:focus,.file-name:active,.file-name:focus,.input:active,.input:focus,.is-active.button,.is-active.file-cta,.is-active.file-name,.is-active.input,.is-active.pagination-ellipsis,.is-active.pagination-link,.is-active.pagination-next,.is-active.pagination-previous,.is-active.textarea,.is-focused.button,.is-focused.file-cta,.is-focused.file-name,.is-focused.input,.is-focused.pagination-ellipsis,.is-focused.pagination-link,.is-focused.pagination-next,.is-focused.pagination-previous,.is-focused.textarea,.pagination-ellipsis:active,.pagination-ellipsis:focus,.pagination-link:active,.pagination-link:focus,.pagination-next:active,.pagination-next:focus,.pagination-previous:active,.pagination-previous:focus,.select select.is-active,.select select.is-focused,.select select:active,.select select:focus,.taginput .is-active.taginput-container.is-focusable,.taginput .is-focused.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:active,.taginput .taginput-container.is-focusable:focus,.textarea:active,.textarea:focus{outline:none}.select select[disabled],.taginput [disabled].taginput-container.is-focusable,[disabled].button,[disabled].file-cta,[disabled].file-name,[disabled].input,[disabled].pagination-ellipsis,[disabled].pagination-link,[disabled].pagination-next,[disabled].pagination-previous,[disabled].textarea{cursor:not-allowed}\\n\\n/*! minireset.css v0.0.3 | MIT License | github.com/jgthms/minireset.css */blockquote,body,dd,dl,dt,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,html,iframe,legend,li,ol,p,pre,textarea,ul{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}audio,img,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0;text-align:left}html{background-color:#fff;font-size:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;min-width:300px;overflow-x:hidden;overflow-y:scroll;text-rendering:optimizeLegibility;text-size-adjust:100%}article,aside,figure,footer,header,hgroup,section{display:block}body,button,input,select,textarea{font-family:BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif}code,pre{-moz-osx-font-smoothing:auto;-webkit-font-smoothing:auto;font-family:monospace}body{color:#4a4a4a;font-size:1rem;font-weight:400;line-height:1.5}a{color:#3273dc;cursor:pointer;text-decoration:none}a strong{color:currentColor}a:hover{color:#363636}code{color:#ff3860;font-size:.875em;font-weight:400;padding:.25em .5em}code,hr{background-color:#f5f5f5}hr{border:none;display:block;height:2px;margin:1.5rem 0}img{height:auto;max-width:100%}input[type=checkbox],input[type=radio]{vertical-align:baseline}small{font-size:.875em}span{font-style:inherit;font-weight:inherit}strong{color:#363636;font-weight:700}pre{-webkit-overflow-scrolling:touch;background-color:#f5f5f5;color:#4a4a4a;font-size:.875em;overflow-x:auto;padding:1.25rem 1.5rem;white-space:pre;word-wrap:normal}pre code{background-color:transparent;color:currentColor;font-size:1em;padding:0}table td,table th{text-align:left;vertical-align:top}table th{color:#363636}.is-clearfix:after{clear:both;content:\\\" \\\";display:table}.is-pulled-left{float:left!important}.is-pulled-right{float:right!important}.is-clipped{overflow:hidden!important}.is-size-1{font-size:3rem!important}.is-size-2{font-size:2.5rem!important}.is-size-3{font-size:2rem!important}.is-size-4{font-size:1.5rem!important}.is-size-5{font-size:1.25rem!important}.is-size-6{font-size:1rem!important}.is-size-7{font-size:.75rem!important}@media screen and (max-width:768px){.is-size-1-mobile{font-size:3rem!important}.is-size-2-mobile{font-size:2.5rem!important}.is-size-3-mobile{font-size:2rem!important}.is-size-4-mobile{font-size:1.5rem!important}.is-size-5-mobile{font-size:1.25rem!important}.is-size-6-mobile{font-size:1rem!important}.is-size-7-mobile{font-size:.75rem!important}}@media print,screen and (min-width:769px){.is-size-1-tablet{font-size:3rem!important}.is-size-2-tablet{font-size:2.5rem!important}.is-size-3-tablet{font-size:2rem!important}.is-size-4-tablet{font-size:1.5rem!important}.is-size-5-tablet{font-size:1.25rem!important}.is-size-6-tablet{font-size:1rem!important}.is-size-7-tablet{font-size:.75rem!important}}@media screen and (max-width:1087px){.is-size-1-touch{font-size:3rem!important}.is-size-2-touch{font-size:2.5rem!important}.is-size-3-touch{font-size:2rem!important}.is-size-4-touch{font-size:1.5rem!important}.is-size-5-touch{font-size:1.25rem!important}.is-size-6-touch{font-size:1rem!important}.is-size-7-touch{font-size:.75rem!important}}@media screen and (min-width:1088px){.is-size-1-desktop{font-size:3rem!important}.is-size-2-desktop{font-size:2.5rem!important}.is-size-3-desktop{font-size:2rem!important}.is-size-4-desktop{font-size:1.5rem!important}.is-size-5-desktop{font-size:1.25rem!important}.is-size-6-desktop{font-size:1rem!important}.is-size-7-desktop{font-size:.75rem!important}}@media screen and (min-width:1280px){.is-size-1-widescreen{font-size:3rem!important}.is-size-2-widescreen{font-size:2.5rem!important}.is-size-3-widescreen{font-size:2rem!important}.is-size-4-widescreen{font-size:1.5rem!important}.is-size-5-widescreen{font-size:1.25rem!important}.is-size-6-widescreen{font-size:1rem!important}.is-size-7-widescreen{font-size:.75rem!important}}@media screen and (min-width:1472px){.is-size-1-fullhd{font-size:3rem!important}.is-size-2-fullhd{font-size:2.5rem!important}.is-size-3-fullhd{font-size:2rem!important}.is-size-4-fullhd{font-size:1.5rem!important}.is-size-5-fullhd{font-size:1.25rem!important}.is-size-6-fullhd{font-size:1rem!important}.is-size-7-fullhd{font-size:.75rem!important}}.has-text-centered{text-align:center!important}.has-text-justified{text-align:justify!important}.has-text-left{text-align:left!important}.has-text-right{text-align:right!important}@media screen and (max-width:768px){.has-text-centered-mobile{text-align:center!important}}@media print,screen and (min-width:769px){.has-text-centered-tablet{text-align:center!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-centered-tablet-only{text-align:center!important}}@media screen and (max-width:1087px){.has-text-centered-touch{text-align:center!important}}@media screen and (min-width:1088px){.has-text-centered-desktop{text-align:center!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-centered-desktop-only{text-align:center!important}}@media screen and (min-width:1280px){.has-text-centered-widescreen{text-align:center!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-centered-widescreen-only{text-align:center!important}}@media screen and (min-width:1472px){.has-text-centered-fullhd{text-align:center!important}}@media screen and (max-width:768px){.has-text-justified-mobile{text-align:justify!important}}@media print,screen and (min-width:769px){.has-text-justified-tablet{text-align:justify!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-justified-tablet-only{text-align:justify!important}}@media screen and (max-width:1087px){.has-text-justified-touch{text-align:justify!important}}@media screen and (min-width:1088px){.has-text-justified-desktop{text-align:justify!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-justified-desktop-only{text-align:justify!important}}@media screen and (min-width:1280px){.has-text-justified-widescreen{text-align:justify!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-justified-widescreen-only{text-align:justify!important}}@media screen and (min-width:1472px){.has-text-justified-fullhd{text-align:justify!important}}@media screen and (max-width:768px){.has-text-left-mobile{text-align:left!important}}@media print,screen and (min-width:769px){.has-text-left-tablet{text-align:left!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-left-tablet-only{text-align:left!important}}@media screen and (max-width:1087px){.has-text-left-touch{text-align:left!important}}@media screen and (min-width:1088px){.has-text-left-desktop{text-align:left!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-left-desktop-only{text-align:left!important}}@media screen and (min-width:1280px){.has-text-left-widescreen{text-align:left!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-left-widescreen-only{text-align:left!important}}@media screen and (min-width:1472px){.has-text-left-fullhd{text-align:left!important}}@media screen and (max-width:768px){.has-text-right-mobile{text-align:right!important}}@media print,screen and (min-width:769px){.has-text-right-tablet{text-align:right!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-right-tablet-only{text-align:right!important}}@media screen and (max-width:1087px){.has-text-right-touch{text-align:right!important}}@media screen and (min-width:1088px){.has-text-right-desktop{text-align:right!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-right-desktop-only{text-align:right!important}}@media screen and (min-width:1280px){.has-text-right-widescreen{text-align:right!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-right-widescreen-only{text-align:right!important}}@media screen and (min-width:1472px){.has-text-right-fullhd{text-align:right!important}}.is-capitalized{text-transform:capitalize!important}.is-lowercase{text-transform:lowercase!important}.is-uppercase{text-transform:uppercase!important}.is-italic{font-style:italic!important}.has-text-white{color:#fff!important}a.has-text-white:focus,a.has-text-white:hover{color:#e6e6e6!important}.has-background-white{background-color:#fff!important}.has-text-black{color:#0a0a0a!important}a.has-text-black:focus,a.has-text-black:hover{color:#000!important}.has-background-black{background-color:#0a0a0a!important}.has-text-light{color:#f5f5f5!important}a.has-text-light:focus,a.has-text-light:hover{color:#dbdbdb!important}.has-background-light{background-color:#f5f5f5!important}.has-text-dark{color:#363636!important}a.has-text-dark:focus,a.has-text-dark:hover{color:#1c1c1c!important}.has-background-dark{background-color:#363636!important}.has-text-primary{color:#00d1b2!important}a.has-text-primary:focus,a.has-text-primary:hover{color:#009e86!important}.has-background-primary{background-color:#00d1b2!important}.has-text-link{color:#3273dc!important}a.has-text-link:focus,a.has-text-link:hover{color:#205bbc!important}.has-background-link{background-color:#3273dc!important}.has-text-info{color:#209cee!important}a.has-text-info:focus,a.has-text-info:hover{color:#0f81cc!important}.has-background-info{background-color:#209cee!important}.has-text-success{color:#23d160!important}a.has-text-success:focus,a.has-text-success:hover{color:#1ca64c!important}.has-background-success{background-color:#23d160!important}.has-text-warning{color:#ffdd57!important}a.has-text-warning:focus,a.has-text-warning:hover{color:#ffd324!important}.has-background-warning{background-color:#ffdd57!important}.has-text-danger{color:#ff3860!important}a.has-text-danger:focus,a.has-text-danger:hover{color:#ff0537!important}.has-background-danger{background-color:#ff3860!important}.has-text-black-bis{color:#121212!important}.has-background-black-bis{background-color:#121212!important}.has-text-black-ter{color:#242424!important}.has-background-black-ter{background-color:#242424!important}.has-text-grey-darker{color:#363636!important}.has-background-grey-darker{background-color:#363636!important}.has-text-grey-dark{color:#4a4a4a!important}.has-background-grey-dark{background-color:#4a4a4a!important}.has-text-grey{color:#7a7a7a!important}.has-background-grey{background-color:#7a7a7a!important}.has-text-grey-light{color:#b5b5b5!important}.has-background-grey-light{background-color:#b5b5b5!important}.has-text-grey-lighter{color:#dbdbdb!important}.has-background-grey-lighter{background-color:#dbdbdb!important}.has-text-white-ter{color:#f5f5f5!important}.has-background-white-ter{background-color:#f5f5f5!important}.has-text-white-bis{color:#fafafa!important}.has-background-white-bis{background-color:#fafafa!important}.has-text-weight-light{font-weight:300!important}.has-text-weight-normal{font-weight:400!important}.has-text-weight-semibold{font-weight:600!important}.has-text-weight-bold{font-weight:700!important}.is-block{display:block!important}@media screen and (max-width:768px){.is-block-mobile{display:block!important}}@media print,screen and (min-width:769px){.is-block-tablet{display:block!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-block-tablet-only{display:block!important}}@media screen and (max-width:1087px){.is-block-touch{display:block!important}}@media screen and (min-width:1088px){.is-block-desktop{display:block!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-block-desktop-only{display:block!important}}@media screen and (min-width:1280px){.is-block-widescreen{display:block!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-block-widescreen-only{display:block!important}}@media screen and (min-width:1472px){.is-block-fullhd{display:block!important}}.is-flex{display:flex!important}@media screen and (max-width:768px){.is-flex-mobile{display:flex!important}}@media print,screen and (min-width:769px){.is-flex-tablet{display:flex!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-flex-tablet-only{display:flex!important}}@media screen and (max-width:1087px){.is-flex-touch{display:flex!important}}@media screen and (min-width:1088px){.is-flex-desktop{display:flex!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-flex-desktop-only{display:flex!important}}@media screen and (min-width:1280px){.is-flex-widescreen{display:flex!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-flex-widescreen-only{display:flex!important}}@media screen and (min-width:1472px){.is-flex-fullhd{display:flex!important}}.is-inline{display:inline!important}@media screen and (max-width:768px){.is-inline-mobile{display:inline!important}}@media print,screen and (min-width:769px){.is-inline-tablet{display:inline!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-tablet-only{display:inline!important}}@media screen and (max-width:1087px){.is-inline-touch{display:inline!important}}@media screen and (min-width:1088px){.is-inline-desktop{display:inline!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-desktop-only{display:inline!important}}@media screen and (min-width:1280px){.is-inline-widescreen{display:inline!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-widescreen-only{display:inline!important}}@media screen and (min-width:1472px){.is-inline-fullhd{display:inline!important}}.is-inline-block{display:inline-block!important}@media screen and (max-width:768px){.is-inline-block-mobile{display:inline-block!important}}@media print,screen and (min-width:769px){.is-inline-block-tablet{display:inline-block!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-block-tablet-only{display:inline-block!important}}@media screen and (max-width:1087px){.is-inline-block-touch{display:inline-block!important}}@media screen and (min-width:1088px){.is-inline-block-desktop{display:inline-block!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-block-desktop-only{display:inline-block!important}}@media screen and (min-width:1280px){.is-inline-block-widescreen{display:inline-block!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-block-widescreen-only{display:inline-block!important}}@media screen and (min-width:1472px){.is-inline-block-fullhd{display:inline-block!important}}.is-inline-flex{display:inline-flex!important}@media screen and (max-width:768px){.is-inline-flex-mobile{display:inline-flex!important}}@media print,screen and (min-width:769px){.is-inline-flex-tablet{display:inline-flex!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-flex-tablet-only{display:inline-flex!important}}@media screen and (max-width:1087px){.is-inline-flex-touch{display:inline-flex!important}}@media screen and (min-width:1088px){.is-inline-flex-desktop{display:inline-flex!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-flex-desktop-only{display:inline-flex!important}}@media screen and (min-width:1280px){.is-inline-flex-widescreen{display:inline-flex!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-flex-widescreen-only{display:inline-flex!important}}@media screen and (min-width:1472px){.is-inline-flex-fullhd{display:inline-flex!important}}.is-hidden{display:none!important}@media screen and (max-width:768px){.is-hidden-mobile{display:none!important}}@media print,screen and (min-width:769px){.is-hidden-tablet{display:none!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-hidden-tablet-only{display:none!important}}@media screen and (max-width:1087px){.is-hidden-touch{display:none!important}}@media screen and (min-width:1088px){.is-hidden-desktop{display:none!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-hidden-desktop-only{display:none!important}}@media screen and (min-width:1280px){.is-hidden-widescreen{display:none!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-hidden-widescreen-only{display:none!important}}@media screen and (min-width:1472px){.is-hidden-fullhd{display:none!important}}.is-invisible{visibility:hidden!important}@media screen and (max-width:768px){.is-invisible-mobile{visibility:hidden!important}}@media print,screen and (min-width:769px){.is-invisible-tablet{visibility:hidden!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-invisible-tablet-only{visibility:hidden!important}}@media screen and (max-width:1087px){.is-invisible-touch{visibility:hidden!important}}@media screen and (min-width:1088px){.is-invisible-desktop{visibility:hidden!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-invisible-desktop-only{visibility:hidden!important}}@media screen and (min-width:1280px){.is-invisible-widescreen{visibility:hidden!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-invisible-widescreen-only{visibility:hidden!important}}@media screen and (min-width:1472px){.is-invisible-fullhd{visibility:hidden!important}}.is-marginless{margin:0!important}.is-paddingless{padding:0!important}.is-radiusless{border-radius:0!important}.is-shadowless{box-shadow:none!important}.box{background-color:#fff;border-radius:6px;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);color:#4a4a4a;display:block;padding:1.25rem}a.box:focus,a.box:hover{box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px #3273dc}a.box:active{box-shadow:inset 0 1px 2px hsla(0,0%,4%,.2),0 0 0 1px #3273dc}.button{background-color:#fff;border-color:#dbdbdb;border-width:1px;color:#363636;cursor:pointer;justify-content:center;padding:calc(.375em - 1px) .75em;text-align:center;white-space:nowrap}.button strong{color:inherit}.button .icon,.button .icon.is-large,.button .icon.is-medium,.button .icon.is-small{height:1.5em;width:1.5em}.button .icon:first-child:not(:last-child){margin-left:calc(-.375em - 1px);margin-right:.1875em}.button .icon:last-child:not(:first-child){margin-left:.1875em;margin-right:calc(-.375em - 1px)}.button .icon:first-child:last-child{margin-left:calc(-.375em - 1px);margin-right:calc(-.375em - 1px)}.button.is-hovered,.button:hover{border-color:#b5b5b5;color:#363636}.button.is-focused,.button:focus{border-color:#3273dc;color:#363636}.button.is-focused:not(:active),.button:focus:not(:active){box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.button.is-active,.button:active{border-color:#4a4a4a;color:#363636}.button.is-text{background-color:transparent;border-color:transparent;color:#4a4a4a;text-decoration:underline}.button.is-text.is-focused,.button.is-text.is-hovered,.button.is-text:focus,.button.is-text:hover{background-color:#f5f5f5;color:#363636}.button.is-text.is-active,.button.is-text:active{background-color:#e8e8e8;color:#363636}.button.is-text[disabled]{background-color:transparent;border-color:transparent;box-shadow:none}.button.is-white{background-color:#fff;border-color:transparent;color:#0a0a0a}.button.is-white.is-hovered,.button.is-white:hover{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.button.is-white.is-focused,.button.is-white:focus{border-color:transparent;color:#0a0a0a}.button.is-white.is-focused:not(:active),.button.is-white:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.button.is-white.is-active,.button.is-white:active{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.button.is-white[disabled]{background-color:#fff;border-color:transparent;box-shadow:none}.button.is-white.is-inverted{background-color:#0a0a0a;color:#fff}.button.is-white.is-inverted:hover{background-color:#000}.button.is-white.is-inverted[disabled]{background-color:#0a0a0a;border-color:transparent;box-shadow:none;color:#fff}.button.is-white.is-loading:after{border-color:transparent transparent #0a0a0a #0a0a0a!important}.button.is-white.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-white.is-outlined:focus,.button.is-white.is-outlined:hover{background-color:#fff;border-color:#fff;color:#0a0a0a}.button.is-white.is-outlined.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-white.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-white.is-inverted.is-outlined{background-color:transparent;border-color:#0a0a0a;color:#0a0a0a}.button.is-white.is-inverted.is-outlined:focus,.button.is-white.is-inverted.is-outlined:hover{background-color:#0a0a0a;color:#fff}.button.is-white.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#0a0a0a;box-shadow:none;color:#0a0a0a}.button.is-black{background-color:#0a0a0a;border-color:transparent;color:#fff}.button.is-black.is-hovered,.button.is-black:hover{background-color:#040404;border-color:transparent;color:#fff}.button.is-black.is-focused,.button.is-black:focus{border-color:transparent;color:#fff}.button.is-black.is-focused:not(:active),.button.is-black:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.button.is-black.is-active,.button.is-black:active{background-color:#000;border-color:transparent;color:#fff}.button.is-black[disabled]{background-color:#0a0a0a;border-color:transparent;box-shadow:none}.button.is-black.is-inverted{background-color:#fff;color:#0a0a0a}.button.is-black.is-inverted:hover{background-color:#f2f2f2}.button.is-black.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#0a0a0a}.button.is-black.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-black.is-outlined{background-color:transparent;border-color:#0a0a0a;color:#0a0a0a}.button.is-black.is-outlined:focus,.button.is-black.is-outlined:hover{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.button.is-black.is-outlined.is-loading:after{border-color:transparent transparent #0a0a0a #0a0a0a!important}.button.is-black.is-outlined[disabled]{background-color:transparent;border-color:#0a0a0a;box-shadow:none;color:#0a0a0a}.button.is-black.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-black.is-inverted.is-outlined:focus,.button.is-black.is-inverted.is-outlined:hover{background-color:#fff;color:#0a0a0a}.button.is-black.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-light{background-color:#f5f5f5;border-color:transparent;color:#363636}.button.is-light.is-hovered,.button.is-light:hover{background-color:#eee;border-color:transparent;color:#363636}.button.is-light.is-focused,.button.is-light:focus{border-color:transparent;color:#363636}.button.is-light.is-focused:not(:active),.button.is-light:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.button.is-light.is-active,.button.is-light:active{background-color:#e8e8e8;border-color:transparent;color:#363636}.button.is-light[disabled]{background-color:#f5f5f5;border-color:transparent;box-shadow:none}.button.is-light.is-inverted{background-color:#363636;color:#f5f5f5}.button.is-light.is-inverted:hover{background-color:#292929}.button.is-light.is-inverted[disabled]{background-color:#363636;border-color:transparent;box-shadow:none;color:#f5f5f5}.button.is-light.is-loading:after{border-color:transparent transparent #363636 #363636!important}.button.is-light.is-outlined{background-color:transparent;border-color:#f5f5f5;color:#f5f5f5}.button.is-light.is-outlined:focus,.button.is-light.is-outlined:hover{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.button.is-light.is-outlined.is-loading:after{border-color:transparent transparent #f5f5f5 #f5f5f5!important}.button.is-light.is-outlined[disabled]{background-color:transparent;border-color:#f5f5f5;box-shadow:none;color:#f5f5f5}.button.is-light.is-inverted.is-outlined{background-color:transparent;border-color:#363636;color:#363636}.button.is-light.is-inverted.is-outlined:focus,.button.is-light.is-inverted.is-outlined:hover{background-color:#363636;color:#f5f5f5}.button.is-light.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#363636;box-shadow:none;color:#363636}.button.is-dark{background-color:#363636;border-color:transparent;color:#f5f5f5}.button.is-dark.is-hovered,.button.is-dark:hover{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.button.is-dark.is-focused,.button.is-dark:focus{border-color:transparent;color:#f5f5f5}.button.is-dark.is-focused:not(:active),.button.is-dark:focus:not(:active){box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.button.is-dark.is-active,.button.is-dark:active{background-color:#292929;border-color:transparent;color:#f5f5f5}.button.is-dark[disabled]{background-color:#363636;border-color:transparent;box-shadow:none}.button.is-dark.is-inverted{background-color:#f5f5f5;color:#363636}.button.is-dark.is-inverted:hover{background-color:#e8e8e8}.button.is-dark.is-inverted[disabled]{background-color:#f5f5f5;border-color:transparent;box-shadow:none;color:#363636}.button.is-dark.is-loading:after{border-color:transparent transparent #f5f5f5 #f5f5f5!important}.button.is-dark.is-outlined{background-color:transparent;border-color:#363636;color:#363636}.button.is-dark.is-outlined:focus,.button.is-dark.is-outlined:hover{background-color:#363636;border-color:#363636;color:#f5f5f5}.button.is-dark.is-outlined.is-loading:after{border-color:transparent transparent #363636 #363636!important}.button.is-dark.is-outlined[disabled]{background-color:transparent;border-color:#363636;box-shadow:none;color:#363636}.button.is-dark.is-inverted.is-outlined{background-color:transparent;border-color:#f5f5f5;color:#f5f5f5}.button.is-dark.is-inverted.is-outlined:focus,.button.is-dark.is-inverted.is-outlined:hover{background-color:#f5f5f5;color:#363636}.button.is-dark.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#f5f5f5;box-shadow:none;color:#f5f5f5}.button.is-primary{background-color:#00d1b2;border-color:transparent;color:#fff}.button.is-primary.is-hovered,.button.is-primary:hover{background-color:#00c4a7;border-color:transparent;color:#fff}.button.is-primary.is-focused,.button.is-primary:focus{border-color:transparent;color:#fff}.button.is-primary.is-focused:not(:active),.button.is-primary:focus:not(:active){box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.button.is-primary.is-active,.button.is-primary:active{background-color:#00b89c;border-color:transparent;color:#fff}.button.is-primary[disabled]{background-color:#00d1b2;border-color:transparent;box-shadow:none}.button.is-primary.is-inverted{background-color:#fff;color:#00d1b2}.button.is-primary.is-inverted:hover{background-color:#f2f2f2}.button.is-primary.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#00d1b2}.button.is-primary.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-primary.is-outlined{background-color:transparent;border-color:#00d1b2;color:#00d1b2}.button.is-primary.is-outlined:focus,.button.is-primary.is-outlined:hover{background-color:#00d1b2;border-color:#00d1b2;color:#fff}.button.is-primary.is-outlined.is-loading:after{border-color:transparent transparent #00d1b2 #00d1b2!important}.button.is-primary.is-outlined[disabled]{background-color:transparent;border-color:#00d1b2;box-shadow:none;color:#00d1b2}.button.is-primary.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-primary.is-inverted.is-outlined:focus,.button.is-primary.is-inverted.is-outlined:hover{background-color:#fff;color:#00d1b2}.button.is-primary.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-link{background-color:#3273dc;border-color:transparent;color:#fff}.button.is-link.is-hovered,.button.is-link:hover{background-color:#276cda;border-color:transparent;color:#fff}.button.is-link.is-focused,.button.is-link:focus{border-color:transparent;color:#fff}.button.is-link.is-focused:not(:active),.button.is-link:focus:not(:active){box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.button.is-link.is-active,.button.is-link:active{background-color:#2366d1;border-color:transparent;color:#fff}.button.is-link[disabled]{background-color:#3273dc;border-color:transparent;box-shadow:none}.button.is-link.is-inverted{background-color:#fff;color:#3273dc}.button.is-link.is-inverted:hover{background-color:#f2f2f2}.button.is-link.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#3273dc}.button.is-link.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-link.is-outlined{background-color:transparent;border-color:#3273dc;color:#3273dc}.button.is-link.is-outlined:focus,.button.is-link.is-outlined:hover{background-color:#3273dc;border-color:#3273dc;color:#fff}.button.is-link.is-outlined.is-loading:after{border-color:transparent transparent #3273dc #3273dc!important}.button.is-link.is-outlined[disabled]{background-color:transparent;border-color:#3273dc;box-shadow:none;color:#3273dc}.button.is-link.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-link.is-inverted.is-outlined:focus,.button.is-link.is-inverted.is-outlined:hover{background-color:#fff;color:#3273dc}.button.is-link.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-info{background-color:#209cee;border-color:transparent;color:#fff}.button.is-info.is-hovered,.button.is-info:hover{background-color:#1496ed;border-color:transparent;color:#fff}.button.is-info.is-focused,.button.is-info:focus{border-color:transparent;color:#fff}.button.is-info.is-focused:not(:active),.button.is-info:focus:not(:active){box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.button.is-info.is-active,.button.is-info:active{background-color:#118fe4;border-color:transparent;color:#fff}.button.is-info[disabled]{background-color:#209cee;border-color:transparent;box-shadow:none}.button.is-info.is-inverted{background-color:#fff;color:#209cee}.button.is-info.is-inverted:hover{background-color:#f2f2f2}.button.is-info.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#209cee}.button.is-info.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-info.is-outlined{background-color:transparent;border-color:#209cee;color:#209cee}.button.is-info.is-outlined:focus,.button.is-info.is-outlined:hover{background-color:#209cee;border-color:#209cee;color:#fff}.button.is-info.is-outlined.is-loading:after{border-color:transparent transparent #209cee #209cee!important}.button.is-info.is-outlined[disabled]{background-color:transparent;border-color:#209cee;box-shadow:none;color:#209cee}.button.is-info.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-info.is-inverted.is-outlined:focus,.button.is-info.is-inverted.is-outlined:hover{background-color:#fff;color:#209cee}.button.is-info.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-success{background-color:#23d160;border-color:transparent;color:#fff}.button.is-success.is-hovered,.button.is-success:hover{background-color:#22c65b;border-color:transparent;color:#fff}.button.is-success.is-focused,.button.is-success:focus{border-color:transparent;color:#fff}.button.is-success.is-focused:not(:active),.button.is-success:focus:not(:active){box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.button.is-success.is-active,.button.is-success:active{background-color:#20bc56;border-color:transparent;color:#fff}.button.is-success[disabled]{background-color:#23d160;border-color:transparent;box-shadow:none}.button.is-success.is-inverted{background-color:#fff;color:#23d160}.button.is-success.is-inverted:hover{background-color:#f2f2f2}.button.is-success.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#23d160}.button.is-success.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-success.is-outlined{background-color:transparent;border-color:#23d160;color:#23d160}.button.is-success.is-outlined:focus,.button.is-success.is-outlined:hover{background-color:#23d160;border-color:#23d160;color:#fff}.button.is-success.is-outlined.is-loading:after{border-color:transparent transparent #23d160 #23d160!important}.button.is-success.is-outlined[disabled]{background-color:transparent;border-color:#23d160;box-shadow:none;color:#23d160}.button.is-success.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-success.is-inverted.is-outlined:focus,.button.is-success.is-inverted.is-outlined:hover{background-color:#fff;color:#23d160}.button.is-success.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-warning{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-hovered,.button.is-warning:hover{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-focused,.button.is-warning:focus{border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-focused:not(:active),.button.is-warning:focus:not(:active){box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.button.is-warning.is-active,.button.is-warning:active{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning[disabled]{background-color:#ffdd57;border-color:transparent;box-shadow:none}.button.is-warning.is-inverted{color:#ffdd57}.button.is-warning.is-inverted,.button.is-warning.is-inverted:hover{background-color:rgba(0,0,0,.7)}.button.is-warning.is-inverted[disabled]{background-color:rgba(0,0,0,.7);border-color:transparent;box-shadow:none;color:#ffdd57}.button.is-warning.is-loading:after{border-color:transparent transparent rgba(0,0,0,.7) rgba(0,0,0,.7)!important}.button.is-warning.is-outlined{background-color:transparent;border-color:#ffdd57;color:#ffdd57}.button.is-warning.is-outlined:focus,.button.is-warning.is-outlined:hover{background-color:#ffdd57;border-color:#ffdd57;color:rgba(0,0,0,.7)}.button.is-warning.is-outlined.is-loading:after{border-color:transparent transparent #ffdd57 #ffdd57!important}.button.is-warning.is-outlined[disabled]{background-color:transparent;border-color:#ffdd57;box-shadow:none;color:#ffdd57}.button.is-warning.is-inverted.is-outlined{background-color:transparent;border-color:rgba(0,0,0,.7);color:rgba(0,0,0,.7)}.button.is-warning.is-inverted.is-outlined:focus,.button.is-warning.is-inverted.is-outlined:hover{background-color:rgba(0,0,0,.7);color:#ffdd57}.button.is-warning.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:rgba(0,0,0,.7);box-shadow:none;color:rgba(0,0,0,.7)}.button.is-danger{background-color:#ff3860;border-color:transparent;color:#fff}.button.is-danger.is-hovered,.button.is-danger:hover{background-color:#ff2b56;border-color:transparent;color:#fff}.button.is-danger.is-focused,.button.is-danger:focus{border-color:transparent;color:#fff}.button.is-danger.is-focused:not(:active),.button.is-danger:focus:not(:active){box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.button.is-danger.is-active,.button.is-danger:active{background-color:#ff1f4b;border-color:transparent;color:#fff}.button.is-danger[disabled]{background-color:#ff3860;border-color:transparent;box-shadow:none}.button.is-danger.is-inverted{background-color:#fff;color:#ff3860}.button.is-danger.is-inverted:hover{background-color:#f2f2f2}.button.is-danger.is-inverted[disabled]{background-color:#fff;border-color:transparent;box-shadow:none;color:#ff3860}.button.is-danger.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-danger.is-outlined{background-color:transparent;border-color:#ff3860;color:#ff3860}.button.is-danger.is-outlined:focus,.button.is-danger.is-outlined:hover{background-color:#ff3860;border-color:#ff3860;color:#fff}.button.is-danger.is-outlined.is-loading:after{border-color:transparent transparent #ff3860 #ff3860!important}.button.is-danger.is-outlined[disabled]{background-color:transparent;border-color:#ff3860;box-shadow:none;color:#ff3860}.button.is-danger.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-danger.is-inverted.is-outlined:focus,.button.is-danger.is-inverted.is-outlined:hover{background-color:#fff;color:#ff3860}.button.is-danger.is-inverted.is-outlined[disabled]{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-small{border-radius:2px;font-size:.75rem}.button.is-medium{font-size:1.25rem}.button.is-large{font-size:1.5rem}.button[disabled]{background-color:#fff;border-color:#dbdbdb;box-shadow:none;opacity:.5}.button.is-fullwidth{display:flex;width:100%}.button.is-loading{color:transparent!important;pointer-events:none}.button.is-loading:after{position:absolute;left:calc(50% - 0.5em);top:calc(50% - 0.5em);position:absolute!important}.button.is-static{background-color:#f5f5f5;border-color:#dbdbdb;color:#7a7a7a;box-shadow:none;pointer-events:none}.button.is-rounded{border-radius:290486px;padding-left:1em;padding-right:1em}.buttons{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.buttons .button{margin-bottom:.5rem}.buttons .button:not(:last-child){margin-right:.5rem}.buttons:last-child{margin-bottom:-.5rem}.buttons:not(:last-child){margin-bottom:1rem}.buttons.has-addons .button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.buttons.has-addons .button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.buttons.has-addons .button:last-child{margin-right:0}.buttons.has-addons .button.is-hovered,.buttons.has-addons .button:hover{z-index:2}.buttons.has-addons .button.is-active,.buttons.has-addons .button.is-focused,.buttons.has-addons .button.is-selected,.buttons.has-addons .button:active,.buttons.has-addons .button:focus{z-index:3}.buttons.has-addons .button.is-active:hover,.buttons.has-addons .button.is-focused:hover,.buttons.has-addons .button.is-selected:hover,.buttons.has-addons .button:active:hover,.buttons.has-addons .button:focus:hover{z-index:4}.buttons.has-addons .button.is-expanded{flex-grow:1}.buttons.is-centered{justify-content:center}.buttons.is-right{justify-content:flex-end}.container{margin:0 auto;position:relative}@media screen and (min-width:1088px){.container{max-width:960px;width:960px}.container.is-fluid{margin-left:64px;margin-right:64px;max-width:none;width:auto}}@media screen and (max-width:1279px){.container.is-widescreen{max-width:1152px;width:auto}}@media screen and (max-width:1471px){.container.is-fullhd{max-width:1344px;width:auto}}@media screen and (min-width:1280px){.container{max-width:1152px;width:1152px}}@media screen and (min-width:1472px){.container{max-width:1344px;width:1344px}}.content li+li{margin-top:.25em}.content blockquote:not(:last-child),.content dl:not(:last-child),.content ol:not(:last-child),.content p:not(:last-child),.content pre:not(:last-child),.content table:not(:last-child),.content ul:not(:last-child){margin-bottom:1em}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6{color:#363636;font-weight:600;line-height:1.125}.content h1{font-size:2em;margin-bottom:.5em}.content h1:not(:first-child){margin-top:1em}.content h2{font-size:1.75em;margin-bottom:.5714em}.content h2:not(:first-child){margin-top:1.1428em}.content h3{font-size:1.5em;margin-bottom:.6666em}.content h3:not(:first-child){margin-top:1.3333em}.content h4{font-size:1.25em;margin-bottom:.8em}.content h5{font-size:1.125em;margin-bottom:.8888em}.content h6{font-size:1em;margin-bottom:1em}.content blockquote{background-color:#f5f5f5;border-left:5px solid #dbdbdb;padding:1.25em 1.5em}.content ol{list-style:decimal outside}.content ol,.content ul{margin-left:2em;margin-top:1em}.content ul{list-style:disc outside}.content ul ul{list-style-type:circle;margin-top:.5em}.content ul ul ul{list-style-type:square}.content dd{margin-left:2em}.content figure{margin-left:2em;margin-right:2em;text-align:center}.content figure:not(:first-child){margin-top:2em}.content figure:not(:last-child){margin-bottom:2em}.content figure img{display:inline-block}.content figure figcaption{font-style:italic}.content pre{-webkit-overflow-scrolling:touch;overflow-x:auto;padding:1.25em 1.5em;white-space:pre;word-wrap:normal}.content sub,.content sup{font-size:75%}.content table{width:100%}.content table td,.content table th{border:1px solid #dbdbdb;border-width:0 0 1px;padding:.5em .75em;vertical-align:top}.content table th{color:#363636;text-align:left}.content table thead td,.content table thead th{border-width:0 0 2px;color:#363636}.content table tfoot td,.content table tfoot th{border-width:2px 0 0;color:#363636}.content table tbody tr:last-child td,.content table tbody tr:last-child th{border-bottom-width:0}.content.is-small{font-size:.75rem}.content.is-medium{font-size:1.25rem}.content.is-large{font-size:1.5rem}.input,.taginput .taginput-container.is-focusable,.textarea{background-color:#fff;border-color:#dbdbdb;color:#363636;box-shadow:inset 0 1px 2px hsla(0,0%,4%,.1);max-width:100%;width:100%}.input::-moz-placeholder,.taginput .taginput-container.is-focusable::-moz-placeholder,.textarea::-moz-placeholder{color:rgba(54,54,54,.3)}.input::-webkit-input-placeholder,.taginput .taginput-container.is-focusable::-webkit-input-placeholder,.textarea::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.input:-moz-placeholder,.taginput .taginput-container.is-focusable:-moz-placeholder,.textarea:-moz-placeholder{color:rgba(54,54,54,.3)}.input:-ms-input-placeholder,.taginput .taginput-container.is-focusable:-ms-input-placeholder,.textarea:-ms-input-placeholder{color:rgba(54,54,54,.3)}.input.is-hovered,.input:hover,.taginput .is-hovered.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:hover,.textarea.is-hovered,.textarea:hover{border-color:#b5b5b5}.input.is-active,.input.is-focused,.input:active,.input:focus,.taginput .is-active.taginput-container.is-focusable,.taginput .is-focused.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:active,.taginput .taginput-container.is-focusable:focus,.textarea.is-active,.textarea.is-focused,.textarea:active,.textarea:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.input[disabled],.taginput [disabled].taginput-container.is-focusable,.textarea[disabled]{background-color:#f5f5f5;border-color:#f5f5f5;box-shadow:none;color:#7a7a7a}.input[disabled]::-moz-placeholder,.taginput [disabled].taginput-container.is-focusable::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]::-webkit-input-placeholder,.taginput [disabled].taginput-container.is-focusable::-webkit-input-placeholder,.textarea[disabled]::-webkit-input-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]:-moz-placeholder,.taginput [disabled].taginput-container.is-focusable:-moz-placeholder,.textarea[disabled]:-moz-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]:-ms-input-placeholder,.taginput [disabled].taginput-container.is-focusable:-ms-input-placeholder,.textarea[disabled]:-ms-input-placeholder{color:hsla(0,0%,48%,.3)}.input[readonly],.taginput [readonly].taginput-container.is-focusable,.textarea[readonly]{box-shadow:none}.input.is-white,.taginput .is-white.taginput-container.is-focusable,.textarea.is-white{border-color:#fff}.input.is-white.is-active,.input.is-white.is-focused,.input.is-white:active,.input.is-white:focus,.taginput .is-white.is-active.taginput-container.is-focusable,.taginput .is-white.is-focused.taginput-container.is-focusable,.taginput .is-white.taginput-container.is-focusable:active,.taginput .is-white.taginput-container.is-focusable:focus,.textarea.is-white.is-active,.textarea.is-white.is-focused,.textarea.is-white:active,.textarea.is-white:focus{box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.input.is-black,.taginput .is-black.taginput-container.is-focusable,.textarea.is-black{border-color:#0a0a0a}.input.is-black.is-active,.input.is-black.is-focused,.input.is-black:active,.input.is-black:focus,.taginput .is-black.is-active.taginput-container.is-focusable,.taginput .is-black.is-focused.taginput-container.is-focusable,.taginput .is-black.taginput-container.is-focusable:active,.taginput .is-black.taginput-container.is-focusable:focus,.textarea.is-black.is-active,.textarea.is-black.is-focused,.textarea.is-black:active,.textarea.is-black:focus{box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.input.is-light,.taginput .is-light.taginput-container.is-focusable,.textarea.is-light{border-color:#f5f5f5}.input.is-light.is-active,.input.is-light.is-focused,.input.is-light:active,.input.is-light:focus,.taginput .is-light.is-active.taginput-container.is-focusable,.taginput .is-light.is-focused.taginput-container.is-focusable,.taginput .is-light.taginput-container.is-focusable:active,.taginput .is-light.taginput-container.is-focusable:focus,.textarea.is-light.is-active,.textarea.is-light.is-focused,.textarea.is-light:active,.textarea.is-light:focus{box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.input.is-dark,.taginput .is-dark.taginput-container.is-focusable,.textarea.is-dark{border-color:#363636}.input.is-dark.is-active,.input.is-dark.is-focused,.input.is-dark:active,.input.is-dark:focus,.taginput .is-dark.is-active.taginput-container.is-focusable,.taginput .is-dark.is-focused.taginput-container.is-focusable,.taginput .is-dark.taginput-container.is-focusable:active,.taginput .is-dark.taginput-container.is-focusable:focus,.textarea.is-dark.is-active,.textarea.is-dark.is-focused,.textarea.is-dark:active,.textarea.is-dark:focus{box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.input.is-primary,.taginput .is-primary.taginput-container.is-focusable,.textarea.is-primary{border-color:#00d1b2}.input.is-primary.is-active,.input.is-primary.is-focused,.input.is-primary:active,.input.is-primary:focus,.taginput .is-primary.is-active.taginput-container.is-focusable,.taginput .is-primary.is-focused.taginput-container.is-focusable,.taginput .is-primary.taginput-container.is-focusable:active,.taginput .is-primary.taginput-container.is-focusable:focus,.textarea.is-primary.is-active,.textarea.is-primary.is-focused,.textarea.is-primary:active,.textarea.is-primary:focus{box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.input.is-link,.taginput .is-link.taginput-container.is-focusable,.textarea.is-link{border-color:#3273dc}.input.is-link.is-active,.input.is-link.is-focused,.input.is-link:active,.input.is-link:focus,.taginput .is-link.is-active.taginput-container.is-focusable,.taginput .is-link.is-focused.taginput-container.is-focusable,.taginput .is-link.taginput-container.is-focusable:active,.taginput .is-link.taginput-container.is-focusable:focus,.textarea.is-link.is-active,.textarea.is-link.is-focused,.textarea.is-link:active,.textarea.is-link:focus{box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.input.is-info,.taginput .is-info.taginput-container.is-focusable,.textarea.is-info{border-color:#209cee}.input.is-info.is-active,.input.is-info.is-focused,.input.is-info:active,.input.is-info:focus,.taginput .is-info.is-active.taginput-container.is-focusable,.taginput .is-info.is-focused.taginput-container.is-focusable,.taginput .is-info.taginput-container.is-focusable:active,.taginput .is-info.taginput-container.is-focusable:focus,.textarea.is-info.is-active,.textarea.is-info.is-focused,.textarea.is-info:active,.textarea.is-info:focus{box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.input.is-success,.taginput .is-success.taginput-container.is-focusable,.textarea.is-success{border-color:#23d160}.input.is-success.is-active,.input.is-success.is-focused,.input.is-success:active,.input.is-success:focus,.taginput .is-success.is-active.taginput-container.is-focusable,.taginput .is-success.is-focused.taginput-container.is-focusable,.taginput .is-success.taginput-container.is-focusable:active,.taginput .is-success.taginput-container.is-focusable:focus,.textarea.is-success.is-active,.textarea.is-success.is-focused,.textarea.is-success:active,.textarea.is-success:focus{box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.input.is-warning,.taginput .is-warning.taginput-container.is-focusable,.textarea.is-warning{border-color:#ffdd57}.input.is-warning.is-active,.input.is-warning.is-focused,.input.is-warning:active,.input.is-warning:focus,.taginput .is-warning.is-active.taginput-container.is-focusable,.taginput .is-warning.is-focused.taginput-container.is-focusable,.taginput .is-warning.taginput-container.is-focusable:active,.taginput .is-warning.taginput-container.is-focusable:focus,.textarea.is-warning.is-active,.textarea.is-warning.is-focused,.textarea.is-warning:active,.textarea.is-warning:focus{box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.input.is-danger,.taginput .is-danger.taginput-container.is-focusable,.textarea.is-danger{border-color:#ff3860}.input.is-danger.is-active,.input.is-danger.is-focused,.input.is-danger:active,.input.is-danger:focus,.taginput .is-danger.is-active.taginput-container.is-focusable,.taginput .is-danger.is-focused.taginput-container.is-focusable,.taginput .is-danger.taginput-container.is-focusable:active,.taginput .is-danger.taginput-container.is-focusable:focus,.textarea.is-danger.is-active,.textarea.is-danger.is-focused,.textarea.is-danger:active,.textarea.is-danger:focus{box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.input.is-small,.taginput .is-small.taginput-container.is-focusable,.textarea.is-small{border-radius:2px;font-size:.75rem}.input.is-medium,.taginput .is-medium.taginput-container.is-focusable,.textarea.is-medium{font-size:1.25rem}.input.is-large,.taginput .is-large.taginput-container.is-focusable,.textarea.is-large{font-size:1.5rem}.input.is-fullwidth,.taginput .is-fullwidth.taginput-container.is-focusable,.textarea.is-fullwidth{display:block;width:100%}.input.is-inline,.taginput .is-inline.taginput-container.is-focusable,.textarea.is-inline{display:inline;width:auto}.input.is-rounded,.taginput .is-rounded.taginput-container.is-focusable{border-radius:290486px;padding-left:1em;padding-right:1em}.input.is-static,.taginput .is-static.taginput-container.is-focusable{background-color:transparent;border-color:transparent;box-shadow:none;padding-left:0;padding-right:0}.textarea{display:block;max-width:100%;min-width:100%;padding:.625em;resize:vertical}.textarea:not([rows]){max-height:600px;min-height:120px}.textarea[rows]{height:auto}.textarea.has-fixed-size{resize:none}.checkbox,.radio{cursor:pointer;display:inline-block;line-height:1.25;position:relative}.checkbox input,.radio input{cursor:pointer}.checkbox:hover,.radio:hover{color:#363636}.checkbox[disabled],.radio[disabled]{color:#7a7a7a;cursor:not-allowed}.radio+.radio{margin-left:.5em}.select{display:inline-block;max-width:100%;position:relative;vertical-align:top}.select:not(.is-multiple){height:2.25em}.select:not(.is-multiple):not(.is-loading):after{border-color:#3273dc;right:1.125em;z-index:4}.select.is-rounded select{border-radius:290486px;padding-left:1em}.select select{background-color:#fff;border-color:#dbdbdb;color:#363636;cursor:pointer;display:block;font-size:1em;max-width:100%;outline:none}.select select::-moz-placeholder{color:rgba(54,54,54,.3)}.select select::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.select select:-moz-placeholder{color:rgba(54,54,54,.3)}.select select:-ms-input-placeholder{color:rgba(54,54,54,.3)}.select select.is-hovered,.select select:hover{border-color:#b5b5b5}.select select.is-active,.select select.is-focused,.select select:active,.select select:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.select select[disabled]{background-color:#f5f5f5;border-color:#f5f5f5;box-shadow:none;color:#7a7a7a}.select select[disabled]::-moz-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]::-webkit-input-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]:-moz-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]:-ms-input-placeholder{color:hsla(0,0%,48%,.3)}.select select::-ms-expand{display:none}.select select[disabled]:hover{border-color:#f5f5f5}.select select:not([multiple]){padding-right:2.5em}.select select[multiple]{height:auto;padding:0}.select select[multiple] option{padding:.5em 1em}.select:not(.is-multiple):not(.is-loading):hover:after{border-color:#363636}.select.is-white:not(:hover):after,.select.is-white select{border-color:#fff}.select.is-white select.is-hovered,.select.is-white select:hover{border-color:#f2f2f2}.select.is-white select.is-active,.select.is-white select.is-focused,.select.is-white select:active,.select.is-white select:focus{box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.select.is-black:not(:hover):after,.select.is-black select{border-color:#0a0a0a}.select.is-black select.is-hovered,.select.is-black select:hover{border-color:#000}.select.is-black select.is-active,.select.is-black select.is-focused,.select.is-black select:active,.select.is-black select:focus{box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.select.is-light:not(:hover):after,.select.is-light select{border-color:#f5f5f5}.select.is-light select.is-hovered,.select.is-light select:hover{border-color:#e8e8e8}.select.is-light select.is-active,.select.is-light select.is-focused,.select.is-light select:active,.select.is-light select:focus{box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.select.is-dark:not(:hover):after,.select.is-dark select{border-color:#363636}.select.is-dark select.is-hovered,.select.is-dark select:hover{border-color:#292929}.select.is-dark select.is-active,.select.is-dark select.is-focused,.select.is-dark select:active,.select.is-dark select:focus{box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.select.is-primary:not(:hover):after,.select.is-primary select{border-color:#00d1b2}.select.is-primary select.is-hovered,.select.is-primary select:hover{border-color:#00b89c}.select.is-primary select.is-active,.select.is-primary select.is-focused,.select.is-primary select:active,.select.is-primary select:focus{box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.select.is-link:not(:hover):after,.select.is-link select{border-color:#3273dc}.select.is-link select.is-hovered,.select.is-link select:hover{border-color:#2366d1}.select.is-link select.is-active,.select.is-link select.is-focused,.select.is-link select:active,.select.is-link select:focus{box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.select.is-info:not(:hover):after,.select.is-info select{border-color:#209cee}.select.is-info select.is-hovered,.select.is-info select:hover{border-color:#118fe4}.select.is-info select.is-active,.select.is-info select.is-focused,.select.is-info select:active,.select.is-info select:focus{box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.select.is-success:not(:hover):after,.select.is-success select{border-color:#23d160}.select.is-success select.is-hovered,.select.is-success select:hover{border-color:#20bc56}.select.is-success select.is-active,.select.is-success select.is-focused,.select.is-success select:active,.select.is-success select:focus{box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.select.is-warning:not(:hover):after,.select.is-warning select{border-color:#ffdd57}.select.is-warning select.is-hovered,.select.is-warning select:hover{border-color:#ffd83d}.select.is-warning select.is-active,.select.is-warning select.is-focused,.select.is-warning select:active,.select.is-warning select:focus{box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.select.is-danger:not(:hover):after,.select.is-danger select{border-color:#ff3860}.select.is-danger select.is-hovered,.select.is-danger select:hover{border-color:#ff1f4b}.select.is-danger select.is-active,.select.is-danger select.is-focused,.select.is-danger select:active,.select.is-danger select:focus{box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.select.is-small{border-radius:2px;font-size:.75rem}.select.is-medium{font-size:1.25rem}.select.is-large{font-size:1.5rem}.select.is-disabled:after{border-color:#7a7a7a}.select.is-fullwidth,.select.is-fullwidth select{width:100%}.select.is-loading:after{margin-top:0;position:absolute;right:.625em;top:.625em;transform:none}.select.is-loading.is-small:after{font-size:.75rem}.select.is-loading.is-medium:after{font-size:1.25rem}.select.is-loading.is-large:after{font-size:1.5rem}.file{align-items:stretch;display:flex;justify-content:flex-start;position:relative}.file.is-white .file-cta{background-color:#fff;border-color:transparent;color:#0a0a0a}.file.is-white.is-hovered .file-cta,.file.is-white:hover .file-cta{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.file.is-white.is-focused .file-cta,.file.is-white:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,100%,.25);color:#0a0a0a}.file.is-white.is-active .file-cta,.file.is-white:active .file-cta{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.file.is-black .file-cta{background-color:#0a0a0a;border-color:transparent;color:#fff}.file.is-black.is-hovered .file-cta,.file.is-black:hover .file-cta{background-color:#040404;border-color:transparent;color:#fff}.file.is-black.is-focused .file-cta,.file.is-black:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,4%,.25);color:#fff}.file.is-black.is-active .file-cta,.file.is-black:active .file-cta{background-color:#000;border-color:transparent;color:#fff}.file.is-light .file-cta{background-color:#f5f5f5;border-color:transparent;color:#363636}.file.is-light.is-hovered .file-cta,.file.is-light:hover .file-cta{background-color:#eee;border-color:transparent;color:#363636}.file.is-light.is-focused .file-cta,.file.is-light:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,96%,.25);color:#363636}.file.is-light.is-active .file-cta,.file.is-light:active .file-cta{background-color:#e8e8e8;border-color:transparent;color:#363636}.file.is-dark .file-cta{background-color:#363636;border-color:transparent;color:#f5f5f5}.file.is-dark.is-hovered .file-cta,.file.is-dark:hover .file-cta{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.file.is-dark.is-focused .file-cta,.file.is-dark:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(54,54,54,.25);color:#f5f5f5}.file.is-dark.is-active .file-cta,.file.is-dark:active .file-cta{background-color:#292929;border-color:transparent;color:#f5f5f5}.file.is-primary .file-cta{background-color:#00d1b2;border-color:transparent;color:#fff}.file.is-primary.is-hovered .file-cta,.file.is-primary:hover .file-cta{background-color:#00c4a7;border-color:transparent;color:#fff}.file.is-primary.is-focused .file-cta,.file.is-primary:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(0,209,178,.25);color:#fff}.file.is-primary.is-active .file-cta,.file.is-primary:active .file-cta{background-color:#00b89c;border-color:transparent;color:#fff}.file.is-link .file-cta{background-color:#3273dc;border-color:transparent;color:#fff}.file.is-link.is-hovered .file-cta,.file.is-link:hover .file-cta{background-color:#276cda;border-color:transparent;color:#fff}.file.is-link.is-focused .file-cta,.file.is-link:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(50,115,220,.25);color:#fff}.file.is-link.is-active .file-cta,.file.is-link:active .file-cta{background-color:#2366d1;border-color:transparent;color:#fff}.file.is-info .file-cta{background-color:#209cee;border-color:transparent;color:#fff}.file.is-info.is-hovered .file-cta,.file.is-info:hover .file-cta{background-color:#1496ed;border-color:transparent;color:#fff}.file.is-info.is-focused .file-cta,.file.is-info:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(32,156,238,.25);color:#fff}.file.is-info.is-active .file-cta,.file.is-info:active .file-cta{background-color:#118fe4;border-color:transparent;color:#fff}.file.is-success .file-cta{background-color:#23d160;border-color:transparent;color:#fff}.file.is-success.is-hovered .file-cta,.file.is-success:hover .file-cta{background-color:#22c65b;border-color:transparent;color:#fff}.file.is-success.is-focused .file-cta,.file.is-success:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(35,209,96,.25);color:#fff}.file.is-success.is-active .file-cta,.file.is-success:active .file-cta{background-color:#20bc56;border-color:transparent;color:#fff}.file.is-warning .file-cta{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-hovered .file-cta,.file.is-warning:hover .file-cta{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-focused .file-cta,.file.is-warning:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(255,221,87,.25);color:rgba(0,0,0,.7)}.file.is-warning.is-active .file-cta,.file.is-warning:active .file-cta{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-danger .file-cta{background-color:#ff3860;border-color:transparent;color:#fff}.file.is-danger.is-hovered .file-cta,.file.is-danger:hover .file-cta{background-color:#ff2b56;border-color:transparent;color:#fff}.file.is-danger.is-focused .file-cta,.file.is-danger:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(255,56,96,.25);color:#fff}.file.is-danger.is-active .file-cta,.file.is-danger:active .file-cta{background-color:#ff1f4b;border-color:transparent;color:#fff}.file.is-small{font-size:.75rem}.file.is-medium{font-size:1.25rem}.file.is-medium .file-icon .fa{font-size:21px}.file.is-large{font-size:1.5rem}.file.is-large .file-icon .fa{font-size:28px}.file.has-name .file-cta{border-bottom-right-radius:0;border-top-right-radius:0}.file.has-name .file-name{border-bottom-left-radius:0;border-top-left-radius:0}.file.has-name.is-empty .file-cta{border-radius:4px}.file.has-name.is-empty .file-name{display:none}.file.is-boxed .file-label{flex-direction:column}.file.is-boxed .file-cta{flex-direction:column;height:auto;padding:1em 3em}.file.is-boxed .file-name{border-width:0 1px 1px}.file.is-boxed .file-icon{height:1.5em;width:1.5em}.file.is-boxed .file-icon .fa{font-size:21px}.file.is-boxed.is-small .file-icon .fa{font-size:14px}.file.is-boxed.is-medium .file-icon .fa{font-size:28px}.file.is-boxed.is-large .file-icon .fa{font-size:35px}.file.is-boxed.has-name .file-cta{border-radius:4px 4px 0 0}.file.is-boxed.has-name .file-name{border-radius:0 0 4px 4px;border-width:0 1px 1px}.file.is-centered{justify-content:center}.file.is-fullwidth .file-label{width:100%}.file.is-fullwidth .file-name{flex-grow:1;max-width:none}.file.is-right{justify-content:flex-end}.file.is-right .file-cta{border-radius:0 4px 4px 0}.file.is-right .file-name{border-radius:4px 0 0 4px;border-width:1px 0 1px 1px;order:-1}.file-label{align-items:stretch;display:flex;cursor:pointer;justify-content:flex-start;overflow:hidden;position:relative}.file-label:hover .file-cta{background-color:#eee;color:#363636}.file-label:hover .file-name{border-color:#d5d5d5}.file-label:active .file-cta{background-color:#e8e8e8;color:#363636}.file-label:active .file-name{border-color:#cfcfcf}.file-input{height:.01em;left:0;outline:none;position:absolute;top:0;width:.01em}.file-cta,.file-name{border-color:#dbdbdb;border-radius:4px;font-size:1em;padding-left:1em;padding-right:1em;white-space:nowrap}.file-cta{background-color:#f5f5f5;color:#4a4a4a}.file-name{border-color:#dbdbdb;border-style:solid;border-width:1px 1px 1px 0;display:block;max-width:16em;overflow:hidden;text-align:left;text-overflow:ellipsis}.file-icon{align-items:center;display:flex;height:1em;justify-content:center;margin-right:.5em;width:1em}.file-icon .fa{font-size:14px}.label{color:#363636;display:block;font-size:1rem;font-weight:700}.label:not(:last-child){margin-bottom:.5em}.label.is-small{font-size:.75rem}.label.is-medium{font-size:1.25rem}.label.is-large{font-size:1.5rem}.help{display:block;font-size:.75rem;margin-top:.25rem}.help.is-white{color:#fff}.help.is-black{color:#0a0a0a}.help.is-light{color:#f5f5f5}.help.is-dark{color:#363636}.help.is-primary{color:#00d1b2}.help.is-link{color:#3273dc}.help.is-info{color:#209cee}.help.is-success{color:#23d160}.help.is-warning{color:#ffdd57}.help.is-danger{color:#ff3860}.field:not(:last-child){margin-bottom:.75rem}.field.has-addons{display:flex;justify-content:flex-start}.field.has-addons .control:not(:last-child){margin-right:-1px}.field.has-addons .control:not(:first-child):not(:last-child) .button,.field.has-addons .control:not(:first-child):not(:last-child) .input,.field.has-addons .control:not(:first-child):not(:last-child) .select select,.field.has-addons .control:not(:first-child):not(:last-child) .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:not(:first-child):not(:last-child) .taginput-container.is-focusable{border-radius:0}.field.has-addons .control:first-child .button,.field.has-addons .control:first-child .input,.field.has-addons .control:first-child .select select,.field.has-addons .control:first-child .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:first-child .taginput-container.is-focusable{border-bottom-right-radius:0;border-top-right-radius:0}.field.has-addons .control:last-child .button,.field.has-addons .control:last-child .input,.field.has-addons .control:last-child .select select,.field.has-addons .control:last-child .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:last-child .taginput-container.is-focusable{border-bottom-left-radius:0;border-top-left-radius:0}.field.has-addons .control .button.is-hovered,.field.has-addons .control .button:hover,.field.has-addons .control .input.is-hovered,.field.has-addons .control .input:hover,.field.has-addons .control .select select.is-hovered,.field.has-addons .control .select select:hover,.field.has-addons .control .taginput .is-hovered.taginput-container.is-focusable,.field.has-addons .control .taginput .taginput-container.is-focusable:hover,.taginput .field.has-addons .control .is-hovered.taginput-container.is-focusable,.taginput .field.has-addons .control .taginput-container.is-focusable:hover{z-index:2}.field.has-addons .control .button.is-active,.field.has-addons .control .button.is-focused,.field.has-addons .control .button:active,.field.has-addons .control .button:focus,.field.has-addons .control .input.is-active,.field.has-addons .control .input.is-focused,.field.has-addons .control .input:active,.field.has-addons .control .input:focus,.field.has-addons .control .select select.is-active,.field.has-addons .control .select select.is-focused,.field.has-addons .control .select select:active,.field.has-addons .control .select select:focus,.field.has-addons .control .taginput .is-active.taginput-container.is-focusable,.field.has-addons .control .taginput .is-focused.taginput-container.is-focusable,.field.has-addons .control .taginput .taginput-container.is-focusable:active,.field.has-addons .control .taginput .taginput-container.is-focusable:focus,.taginput .field.has-addons .control .is-active.taginput-container.is-focusable,.taginput .field.has-addons .control .is-focused.taginput-container.is-focusable,.taginput .field.has-addons .control .taginput-container.is-focusable:active,.taginput .field.has-addons .control .taginput-container.is-focusable:focus{z-index:3}.field.has-addons .control .button.is-active:hover,.field.has-addons .control .button.is-focused:hover,.field.has-addons .control .button:active:hover,.field.has-addons .control .button:focus:hover,.field.has-addons .control .input.is-active:hover,.field.has-addons .control .input.is-focused:hover,.field.has-addons .control .input:active:hover,.field.has-addons .control .input:focus:hover,.field.has-addons .control .select select.is-active:hover,.field.has-addons .control .select select.is-focused:hover,.field.has-addons .control .select select:active:hover,.field.has-addons .control .select select:focus:hover,.field.has-addons .control .taginput .is-active.taginput-container.is-focusable:hover,.field.has-addons .control .taginput .is-focused.taginput-container.is-focusable:hover,.field.has-addons .control .taginput .taginput-container.is-focusable:active:hover,.field.has-addons .control .taginput .taginput-container.is-focusable:focus:hover,.taginput .field.has-addons .control .is-active.taginput-container.is-focusable:hover,.taginput .field.has-addons .control .is-focused.taginput-container.is-focusable:hover,.taginput .field.has-addons .control .taginput-container.is-focusable:active:hover,.taginput .field.has-addons .control .taginput-container.is-focusable:focus:hover{z-index:4}.field.has-addons .control.is-expanded{flex-grow:1}.field.has-addons.has-addons-centered{justify-content:center}.field.has-addons.has-addons-right{justify-content:flex-end}.field.has-addons.has-addons-fullwidth .control{flex-grow:1;flex-shrink:0}.field.is-grouped{display:flex;justify-content:flex-start}.field.is-grouped>.control{flex-shrink:0}.field.is-grouped>.control:not(:last-child){margin-bottom:0;margin-right:.75rem}.field.is-grouped>.control.is-expanded{flex-grow:1;flex-shrink:1}.field.is-grouped.is-grouped-centered{justify-content:center}.field.is-grouped.is-grouped-right{justify-content:flex-end}.field.is-grouped.is-grouped-multiline{flex-wrap:wrap}.field.is-grouped.is-grouped-multiline>.control:last-child,.field.is-grouped.is-grouped-multiline>.control:not(:last-child){margin-bottom:.75rem}.field.is-grouped.is-grouped-multiline:last-child{margin-bottom:-.75rem}.field.is-grouped.is-grouped-multiline:not(:last-child){margin-bottom:0}@media print,screen and (min-width:769px){.field.is-horizontal{display:flex}}.field-label .label{font-size:inherit}@media screen and (max-width:768px){.field-label{margin-bottom:.5rem}}@media print,screen and (min-width:769px){.field-label{flex-basis:0;flex-grow:1;flex-shrink:0;margin-right:1.5rem;text-align:right}.field-label.is-small{font-size:.75rem;padding-top:.375em}.field-label.is-normal{padding-top:.375em}.field-label.is-medium{font-size:1.25rem;padding-top:.375em}.field-label.is-large{font-size:1.5rem;padding-top:.375em}}.field-body .field .field{margin-bottom:0}@media print,screen and (min-width:769px){.field-body{display:flex;flex-basis:0;flex-grow:5;flex-shrink:1}.field-body .field{margin-bottom:0}.field-body>.field{flex-shrink:1}.field-body>.field:not(.is-narrow){flex-grow:1}.field-body>.field:not(:last-child){margin-right:.75rem}}.control{font-size:1rem;position:relative;text-align:left}.control.has-icon .icon{color:#dbdbdb;height:2.25em;pointer-events:none;position:absolute;top:0;width:2.25em;z-index:4}.control.has-icon .input:focus+.icon,.control.has-icon .taginput .taginput-container.is-focusable:focus+.icon,.taginput .control.has-icon .taginput-container.is-focusable:focus+.icon{color:#7a7a7a}.control.has-icon .input.is-small+.icon,.control.has-icon .taginput .is-small.taginput-container.is-focusable+.icon,.taginput .control.has-icon .is-small.taginput-container.is-focusable+.icon{font-size:.75rem}.control.has-icon .input.is-medium+.icon,.control.has-icon .taginput .is-medium.taginput-container.is-focusable+.icon,.taginput .control.has-icon .is-medium.taginput-container.is-focusable+.icon{font-size:1.25rem}.control.has-icon .input.is-large+.icon,.control.has-icon .taginput .is-large.taginput-container.is-focusable+.icon,.taginput .control.has-icon .is-large.taginput-container.is-focusable+.icon{font-size:1.5rem}.control.has-icon:not(.has-icon-right) .icon{left:0}.control.has-icon:not(.has-icon-right) .input,.control.has-icon:not(.has-icon-right) .taginput .taginput-container.is-focusable,.taginput .control.has-icon:not(.has-icon-right) .taginput-container.is-focusable{padding-left:2.25em}.control.has-icon.has-icon-right .icon{right:0}.control.has-icon.has-icon-right .input,.control.has-icon.has-icon-right .taginput .taginput-container.is-focusable,.taginput .control.has-icon.has-icon-right .taginput-container.is-focusable{padding-right:2.25em}.control.has-icons-left .input:focus~.icon,.control.has-icons-left .select:focus~.icon,.control.has-icons-left .taginput .taginput-container.is-focusable:focus~.icon,.control.has-icons-right .input:focus~.icon,.control.has-icons-right .select:focus~.icon,.control.has-icons-right .taginput .taginput-container.is-focusable:focus~.icon,.taginput .control.has-icons-left .taginput-container.is-focusable:focus~.icon,.taginput .control.has-icons-right .taginput-container.is-focusable:focus~.icon{color:#7a7a7a}.control.has-icons-left .input.is-small~.icon,.control.has-icons-left .select.is-small~.icon,.control.has-icons-left .taginput .is-small.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-small~.icon,.control.has-icons-right .select.is-small~.icon,.control.has-icons-right .taginput .is-small.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-small.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-small.taginput-container.is-focusable~.icon{font-size:.75rem}.control.has-icons-left .input.is-medium~.icon,.control.has-icons-left .select.is-medium~.icon,.control.has-icons-left .taginput .is-medium.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-medium~.icon,.control.has-icons-right .select.is-medium~.icon,.control.has-icons-right .taginput .is-medium.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-medium.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-medium.taginput-container.is-focusable~.icon{font-size:1.25rem}.control.has-icons-left .input.is-large~.icon,.control.has-icons-left .select.is-large~.icon,.control.has-icons-left .taginput .is-large.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-large~.icon,.control.has-icons-right .select.is-large~.icon,.control.has-icons-right .taginput .is-large.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-large.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-large.taginput-container.is-focusable~.icon{font-size:1.5rem}.control.has-icons-left .icon,.control.has-icons-right .icon{color:#dbdbdb;height:2.25em;pointer-events:none;position:absolute;top:0;width:2.25em;z-index:4}.control.has-icons-left .input,.control.has-icons-left .select select,.control.has-icons-left .taginput .taginput-container.is-focusable,.taginput .control.has-icons-left .taginput-container.is-focusable{padding-left:2.25em}.control.has-icons-left .icon.is-left{left:0}.control.has-icons-right .input,.control.has-icons-right .select select,.control.has-icons-right .taginput .taginput-container.is-focusable,.taginput .control.has-icons-right .taginput-container.is-focusable{padding-right:2.25em}.control.has-icons-right .icon.is-right{right:0}.control.is-loading:after{position:absolute!important;right:.625em;top:.625em;z-index:4}.control.is-loading.is-small:after{font-size:.75rem}.control.is-loading.is-medium:after{font-size:1.25rem}.control.is-loading.is-large:after{font-size:1.5rem}.icon{align-items:center;display:inline-flex;justify-content:center;height:1.5rem;width:1.5rem}.icon.is-small{height:1rem;width:1rem}.icon.is-medium{height:2rem;width:2rem}.icon.is-large{height:3rem;width:3rem}.image{display:block;position:relative}.image img{display:block;height:auto;width:100%}.image img.is-rounded{border-radius:290486px}.image.is-1by1 img,.image.is-1by2 img,.image.is-1by3 img,.image.is-2by1 img,.image.is-2by3 img,.image.is-3by1 img,.image.is-3by2 img,.image.is-3by4 img,.image.is-3by5 img,.image.is-4by3 img,.image.is-4by5 img,.image.is-5by3 img,.image.is-5by4 img,.image.is-9by16 img,.image.is-16by9 img,.image.is-square img{height:100%;width:100%}.image.is-1by1,.image.is-square{padding-top:100%}.image.is-5by4{padding-top:80%}.image.is-4by3{padding-top:75%}.image.is-3by2{padding-top:66.6666%}.image.is-5by3{padding-top:60%}.image.is-16by9{padding-top:56.25%}.image.is-2by1{padding-top:50%}.image.is-3by1{padding-top:33.3333%}.image.is-4by5{padding-top:125%}.image.is-3by4{padding-top:133.3333%}.image.is-2by3{padding-top:150%}.image.is-3by5{padding-top:166.6666%}.image.is-9by16{padding-top:177.7777%}.image.is-1by2{padding-top:200%}.image.is-1by3{padding-top:300%}.image.is-16x16{height:16px;width:16px}.image.is-24x24{height:24px;width:24px}.image.is-32x32{height:32px;width:32px}.image.is-48x48{height:48px;width:48px}.image.is-64x64{height:64px;width:64px}.image.is-96x96{height:96px;width:96px}.image.is-128x128{height:128px;width:128px}.notification{background-color:#f5f5f5;border-radius:4px;padding:1.25rem 2.5rem 1.25rem 1.5rem;position:relative}.notification a:not(.button){color:currentColor;text-decoration:underline}.notification strong{color:currentColor}.notification code,.notification pre{background:#fff}.notification pre code{background:transparent}.notification>.delete{position:absolute;right:.5rem;top:.5rem}.notification .content,.notification .subtitle,.notification .title{color:currentColor}.notification.is-white{background-color:#fff;color:#0a0a0a}.notification.is-black{background-color:#0a0a0a;color:#fff}.notification.is-light{background-color:#f5f5f5;color:#363636}.notification.is-dark{background-color:#363636;color:#f5f5f5}.notification.is-primary{background-color:#00d1b2;color:#fff}.notification.is-link{background-color:#3273dc;color:#fff}.notification.is-info{background-color:#209cee;color:#fff}.notification.is-success{background-color:#23d160;color:#fff}.notification.is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.notification.is-danger{background-color:#ff3860;color:#fff}.progress{-moz-appearance:none;-webkit-appearance:none;border:none;border-radius:290486px;display:block;height:1rem;overflow:hidden;padding:0;width:100%}.progress::-webkit-progress-bar{background-color:#dbdbdb}.progress::-webkit-progress-value{background-color:#4a4a4a}.progress::-moz-progress-bar{background-color:#4a4a4a}.progress::-ms-fill{background-color:#4a4a4a;border:none}.progress.is-white::-webkit-progress-value{background-color:#fff}.progress.is-white::-moz-progress-bar{background-color:#fff}.progress.is-white::-ms-fill{background-color:#fff}.progress.is-black::-webkit-progress-value{background-color:#0a0a0a}.progress.is-black::-moz-progress-bar{background-color:#0a0a0a}.progress.is-black::-ms-fill{background-color:#0a0a0a}.progress.is-light::-webkit-progress-value{background-color:#f5f5f5}.progress.is-light::-moz-progress-bar{background-color:#f5f5f5}.progress.is-light::-ms-fill{background-color:#f5f5f5}.progress.is-dark::-webkit-progress-value{background-color:#363636}.progress.is-dark::-moz-progress-bar{background-color:#363636}.progress.is-dark::-ms-fill{background-color:#363636}.progress.is-primary::-webkit-progress-value{background-color:#00d1b2}.progress.is-primary::-moz-progress-bar{background-color:#00d1b2}.progress.is-primary::-ms-fill{background-color:#00d1b2}.progress.is-link::-webkit-progress-value{background-color:#3273dc}.progress.is-link::-moz-progress-bar{background-color:#3273dc}.progress.is-link::-ms-fill{background-color:#3273dc}.progress.is-info::-webkit-progress-value{background-color:#209cee}.progress.is-info::-moz-progress-bar{background-color:#209cee}.progress.is-info::-ms-fill{background-color:#209cee}.progress.is-success::-webkit-progress-value{background-color:#23d160}.progress.is-success::-moz-progress-bar{background-color:#23d160}.progress.is-success::-ms-fill{background-color:#23d160}.progress.is-warning::-webkit-progress-value{background-color:#ffdd57}.progress.is-warning::-moz-progress-bar{background-color:#ffdd57}.progress.is-warning::-ms-fill{background-color:#ffdd57}.progress.is-danger::-webkit-progress-value{background-color:#ff3860}.progress.is-danger::-moz-progress-bar{background-color:#ff3860}.progress.is-danger::-ms-fill{background-color:#ff3860}.progress.is-small{height:.75rem}.progress.is-medium{height:1.25rem}.progress.is-large{height:1.5rem}.table{background-color:#fff;color:#363636}.table td,.table th{border:1px solid #dbdbdb;border-width:0 0 1px;padding:.5em .75em;vertical-align:top}.table td.is-white,.table th.is-white{background-color:#fff;border-color:#fff;color:#0a0a0a}.table td.is-black,.table th.is-black{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.table td.is-light,.table th.is-light{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.table td.is-dark,.table th.is-dark{background-color:#363636;border-color:#363636;color:#f5f5f5}.table td.is-primary,.table th.is-primary{background-color:#00d1b2;border-color:#00d1b2;color:#fff}.table td.is-link,.table th.is-link{background-color:#3273dc;border-color:#3273dc;color:#fff}.table td.is-info,.table th.is-info{background-color:#209cee;border-color:#209cee;color:#fff}.table td.is-success,.table th.is-success{background-color:#23d160;border-color:#23d160;color:#fff}.table td.is-warning,.table th.is-warning{background-color:#ffdd57;border-color:#ffdd57;color:rgba(0,0,0,.7)}.table td.is-danger,.table th.is-danger{background-color:#ff3860;border-color:#ff3860;color:#fff}.table td.is-narrow,.table th.is-narrow{white-space:nowrap;width:1%}.table td.is-selected,.table th.is-selected{background-color:#00d1b2;color:#fff}.table td.is-selected a,.table td.is-selected strong,.table th.is-selected a,.table th.is-selected strong{color:currentColor}.table th{color:#363636;text-align:left}.table tr.is-selected{background-color:#00d1b2;color:#fff}.table tr.is-selected a,.table tr.is-selected strong{color:currentColor}.table tr.is-selected td,.table tr.is-selected th{border-color:#fff;color:currentColor}.table thead td,.table thead th{border-width:0 0 2px;color:#363636}.table tfoot td,.table tfoot th{border-width:2px 0 0;color:#363636}.table tbody tr:last-child td,.table tbody tr:last-child th{border-bottom-width:0}.table.is-bordered td,.table.is-bordered th{border-width:1px}.table.is-bordered tr:last-child td,.table.is-bordered tr:last-child th{border-bottom-width:1px}.table.is-fullwidth{width:100%}.table.is-hoverable tbody tr:not(.is-selected):hover{background-color:#fafafa}.table.is-hoverable.is-striped tbody tr:not(.is-selected):hover{background-color:#f5f5f5}.table.is-narrow td,.table.is-narrow th{padding:.25em .5em}.table.is-striped tbody tr:not(.is-selected):nth-child(2n){background-color:#fafafa}.table-container{-webkit-overflow-scrolling:touch;overflow:auto;overflow-y:hidden;max-width:100%}.tags{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.tags .tag{margin-bottom:.5rem}.tags .tag:not(:last-child){margin-right:.5rem}.tags:last-child{margin-bottom:-.5rem}.tags:not(:last-child){margin-bottom:1rem}.tags.has-addons .tag{margin-right:0}.tags.has-addons .tag:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.tags.has-addons .tag:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.tags.is-centered{justify-content:center}.tags.is-centered .tag{margin-right:.25rem;margin-left:.25rem}.tags.is-right{justify-content:flex-end}.tags.is-right .tag:not(:first-child){margin-left:.5rem}.tags.is-right .tag:not(:last-child){margin-right:0}.tag:not(body){align-items:center;background-color:#f5f5f5;border-radius:4px;color:#4a4a4a;display:inline-flex;font-size:.75rem;height:2em;justify-content:center;line-height:1.5;padding-left:.75em;padding-right:.75em;white-space:nowrap}.tag:not(body) .delete{margin-left:.25rem;margin-right:-.375rem}.tag:not(body).is-white{background-color:#fff;color:#0a0a0a}.tag:not(body).is-black{background-color:#0a0a0a;color:#fff}.tag:not(body).is-light{background-color:#f5f5f5;color:#363636}.tag:not(body).is-dark{background-color:#363636;color:#f5f5f5}.tag:not(body).is-primary{background-color:#00d1b2;color:#fff}.tag:not(body).is-link{background-color:#3273dc;color:#fff}.tag:not(body).is-info{background-color:#209cee;color:#fff}.tag:not(body).is-success{background-color:#23d160;color:#fff}.tag:not(body).is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.tag:not(body).is-danger{background-color:#ff3860;color:#fff}.tag:not(body).is-medium{font-size:1rem}.tag:not(body).is-large{font-size:1.25rem}.tag:not(body) .icon:first-child:not(:last-child){margin-left:-.375em;margin-right:.1875em}.tag:not(body) .icon:last-child:not(:first-child){margin-left:.1875em;margin-right:-.375em}.tag:not(body) .icon:first-child:last-child{margin-left:-.375em;margin-right:-.375em}.tag:not(body).is-delete{margin-left:1px;padding:0;position:relative;width:2em}.tag:not(body).is-delete:after,.tag:not(body).is-delete:before{background-color:currentColor;content:\\\"\\\";display:block;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) rotate(45deg);transform-origin:center center}.tag:not(body).is-delete:before{height:1px;width:50%}.tag:not(body).is-delete:after{height:50%;width:1px}.tag:not(body).is-delete:focus,.tag:not(body).is-delete:hover{background-color:#e8e8e8}.tag:not(body).is-delete:active{background-color:#dbdbdb}.tag:not(body).is-rounded{border-radius:290486px}a.tag:hover{text-decoration:underline}.subtitle,.title{word-break:break-word}.subtitle em,.subtitle span,.title em,.title span{font-weight:inherit}.subtitle sub,.subtitle sup,.title sub,.title sup{font-size:.75em}.subtitle .tag,.title .tag{vertical-align:middle}.title{color:#363636;font-size:2rem;font-weight:600;line-height:1.125}.title strong{color:inherit;font-weight:inherit}.title+.highlight{margin-top:-.75rem}.title:not(.is-spaced)+.subtitle{margin-top:-1.25rem}.title.is-1{font-size:3rem}.title.is-2{font-size:2.5rem}.title.is-3{font-size:2rem}.title.is-4{font-size:1.5rem}.title.is-5{font-size:1.25rem}.title.is-6{font-size:1rem}.title.is-7{font-size:.75rem}.subtitle{color:#4a4a4a;font-size:1.25rem;font-weight:400;line-height:1.25}.subtitle strong{color:#363636;font-weight:600}.subtitle:not(.is-spaced)+.title{margin-top:-1.25rem}.subtitle.is-1{font-size:3rem}.subtitle.is-2{font-size:2.5rem}.subtitle.is-3{font-size:2rem}.subtitle.is-4{font-size:1.5rem}.subtitle.is-5{font-size:1.25rem}.subtitle.is-6{font-size:1rem}.subtitle.is-7{font-size:.75rem}.heading{display:block;font-size:11px;letter-spacing:1px;margin-bottom:5px;text-transform:uppercase}.highlight{font-weight:400;max-width:100%;overflow:hidden;padding:0}.highlight pre{overflow:auto;max-width:100%}.number{align-items:center;background-color:#f5f5f5;border-radius:290486px;display:inline-flex;font-size:1.25rem;height:2em;justify-content:center;margin-right:1.5rem;min-width:2.5em;padding:.25rem .5rem;text-align:center;vertical-align:top}.breadcrumb{font-size:1rem;white-space:nowrap}.breadcrumb a{align-items:center;color:#3273dc;display:flex;justify-content:center;padding:0 .75em}.breadcrumb a:hover{color:#363636}.breadcrumb li{align-items:center;display:flex}.breadcrumb li:first-child a{padding-left:0}.breadcrumb li.is-active a{color:#363636;cursor:default;pointer-events:none}.breadcrumb li+li:before{color:#b5b5b5;content:\\\"/\\\"}.breadcrumb ol,.breadcrumb ul{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-start}.breadcrumb .icon:first-child{margin-right:.5em}.breadcrumb .icon:last-child{margin-left:.5em}.breadcrumb.is-centered ol,.breadcrumb.is-centered ul{justify-content:center}.breadcrumb.is-right ol,.breadcrumb.is-right ul{justify-content:flex-end}.breadcrumb.is-small{font-size:.75rem}.breadcrumb.is-medium{font-size:1.25rem}.breadcrumb.is-large{font-size:1.5rem}.breadcrumb.has-arrow-separator li+li:before{content:\\\"\\\\2192\\\"}.breadcrumb.has-bullet-separator li+li:before{content:\\\"\\\\2022\\\"}.breadcrumb.has-dot-separator li+li:before{content:\\\"\\\\B7\\\"}.breadcrumb.has-succeeds-separator li+li:before{content:\\\"\\\\227B\\\"}.card{background-color:#fff;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);color:#4a4a4a;max-width:100%;position:relative}.card-header{background-color:none;align-items:stretch;box-shadow:0 1px 2px hsla(0,0%,4%,.1);display:flex}.card-header-title{align-items:center;color:#363636;display:flex;flex-grow:1;font-weight:700;padding:.75rem}.card-header-icon,.card-header-title.is-centered{justify-content:center}.card-header-icon{align-items:center;cursor:pointer;display:flex;padding:.75rem}.card-image{display:block;position:relative}.card-content{background-color:none;padding:1.5rem}.card-footer{background-color:none;border-top:1px solid #dbdbdb;align-items:stretch;display:flex}.card-footer-item{align-items:center;display:flex;flex-basis:0;flex-grow:1;flex-shrink:0;justify-content:center;padding:.75rem}.card-footer-item:not(:last-child){border-right:1px solid #dbdbdb}.card .media:not(:last-child){margin-bottom:.75rem}.dropdown{display:inline-flex;position:relative;vertical-align:top}.dropdown.is-active .dropdown-menu,.dropdown.is-hoverable:hover .dropdown-menu{display:block}.dropdown.is-right .dropdown-menu{left:auto;right:0}.dropdown.is-up .dropdown-menu{bottom:100%;padding-bottom:4px;padding-top:0;top:auto}.dropdown-menu{display:none;left:0;min-width:12rem;padding-top:4px;position:absolute;top:100%;z-index:20}.dropdown-content{background-color:#fff;border-radius:4px;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);padding-bottom:.5rem;padding-top:.5rem}.dropdown-item,.dropdown .dropdown-menu .has-link a{color:#4a4a4a;display:block;font-size:.875rem;line-height:1.5;padding:.375rem 1rem;position:relative}.dropdown .dropdown-menu .has-link a,a.dropdown-item{padding-right:3rem;white-space:nowrap}.dropdown .dropdown-menu .has-link a:hover,a.dropdown-item:hover{background-color:#f5f5f5;color:#0a0a0a}.dropdown .dropdown-menu .has-link a.is-active,a.dropdown-item.is-active{background-color:#3273dc;color:#fff}.dropdown-divider{background-color:#dbdbdb;border:none;display:block;height:1px;margin:.5rem 0}.level{align-items:center;justify-content:space-between}.level code{border-radius:4px}.level img{display:inline-block;vertical-align:top}.level.is-mobile,.level.is-mobile .level-left,.level.is-mobile .level-right{display:flex}.level.is-mobile .level-left+.level-right{margin-top:0}.level.is-mobile .level-item{margin-right:.75rem}.level.is-mobile .level-item:not(:last-child){margin-bottom:0}.level.is-mobile .level-item:not(.is-narrow){flex-grow:1}@media print,screen and (min-width:769px){.level{display:flex}.level>.level-item:not(.is-narrow){flex-grow:1}}.level-item{align-items:center;display:flex;flex-basis:auto;flex-grow:0;flex-shrink:0;justify-content:center}.level-item .subtitle,.level-item .title{margin-bottom:0}@media screen and (max-width:768px){.level-item:not(:last-child){margin-bottom:.75rem}}.level-left,.level-right{flex-basis:auto;flex-grow:0;flex-shrink:0}.level-left .level-item.is-flexible,.level-right .level-item.is-flexible{flex-grow:1}@media print,screen and (min-width:769px){.level-left .level-item:not(:last-child),.level-right .level-item:not(:last-child){margin-right:.75rem}}.level-left{align-items:center;justify-content:flex-start}@media screen and (max-width:768px){.level-left+.level-right{margin-top:1.5rem}}@media print,screen and (min-width:769px){.level-left{display:flex}}.level-right{align-items:center;justify-content:flex-end}@media print,screen and (min-width:769px){.level-right{display:flex}}.media{align-items:flex-start;display:flex;text-align:left}.media .content:not(:last-child){margin-bottom:.75rem}.media .media{border-top:1px solid hsla(0,0%,86%,.5);display:flex;padding-top:.75rem}.media .media .content:not(:last-child),.media .media .control:not(:last-child){margin-bottom:.5rem}.media .media .media{padding-top:.5rem}.media .media .media+.media{margin-top:.5rem}.media+.media{border-top:1px solid hsla(0,0%,86%,.5);margin-top:1rem;padding-top:1rem}.media.is-large+.media{margin-top:1.5rem;padding-top:1.5rem}.media-left,.media-right{flex-basis:auto;flex-grow:0;flex-shrink:0}.media-left{margin-right:1rem}.media-right{margin-left:1rem}.media-content{flex-basis:auto;flex-grow:1;flex-shrink:1;text-align:left}.menu{font-size:1rem}.menu.is-small{font-size:.75rem}.menu.is-medium{font-size:1.25rem}.menu.is-large{font-size:1.5rem}.menu-list{line-height:1.25}.menu-list a{border-radius:2px;color:#4a4a4a;display:block;padding:.5em .75em}.menu-list a:hover{background-color:#f5f5f5;color:#363636}.menu-list a.is-active{background-color:#3273dc;color:#fff}.menu-list li ul{border-left:1px solid #dbdbdb;margin:.75em;padding-left:.75em}.menu-label{color:#7a7a7a;font-size:.75em;letter-spacing:.1em;text-transform:uppercase}.menu-label:not(:first-child){margin-top:1em}.menu-label:not(:last-child){margin-bottom:1em}.message{background-color:#f5f5f5;border-radius:4px;font-size:1rem}.message strong{color:currentColor}.message a:not(.button):not(.tag){color:currentColor;text-decoration:underline}.message.is-small{font-size:.75rem}.message.is-medium{font-size:1.25rem}.message.is-large{font-size:1.5rem}.message.is-white{background-color:#fff}.message.is-white .message-header{background-color:#fff;color:#0a0a0a}.message.is-white .message-body{border-color:#fff;color:#4d4d4d}.message.is-black{background-color:#fafafa}.message.is-black .message-header{background-color:#0a0a0a;color:#fff}.message.is-black .message-body{border-color:#0a0a0a;color:#090909}.message.is-light{background-color:#fafafa}.message.is-light .message-header{background-color:#f5f5f5;color:#363636}.message.is-light .message-body{border-color:#f5f5f5;color:#505050}.message.is-dark{background-color:#fafafa}.message.is-dark .message-header{background-color:#363636;color:#f5f5f5}.message.is-dark .message-body{border-color:#363636;color:#2a2a2a}.message.is-primary{background-color:#f5fffd}.message.is-primary .message-header{background-color:#00d1b2;color:#fff}.message.is-primary .message-body{border-color:#00d1b2;color:#021310}.message.is-link{background-color:#f6f9fe}.message.is-link .message-header{background-color:#3273dc;color:#fff}.message.is-link .message-body{border-color:#3273dc;color:#22509a}.message.is-info{background-color:#f6fbfe}.message.is-info .message-header{background-color:#209cee;color:#fff}.message.is-info .message-body{border-color:#209cee;color:#12537e}.message.is-success{background-color:#f6fef9}.message.is-success .message-header{background-color:#23d160;color:#fff}.message.is-success .message-body{border-color:#23d160;color:#0e301a}.message.is-warning{background-color:#fffdf5}.message.is-warning .message-header{background-color:#ffdd57;color:rgba(0,0,0,.7)}.message.is-warning .message-body{border-color:#ffdd57;color:#3b3108}.message.is-danger{background-color:#fff5f7}.message.is-danger .message-header{background-color:#ff3860;color:#fff}.message.is-danger .message-body{border-color:#ff3860;color:#cd0930}.message-header{align-items:center;background-color:#4a4a4a;border-radius:4px 4px 0 0;color:#fff;display:flex;font-weight:700;justify-content:space-between;line-height:1.25;padding:.75em 1em;position:relative}.message-header .delete{flex-grow:0;flex-shrink:0;margin-left:.75em}.message-header+.message-body{border-width:0;border-top-left-radius:0;border-top-right-radius:0}.message-body{border-color:#dbdbdb;border-radius:4px;border-style:solid;border-width:0 0 0 4px;color:#4a4a4a;padding:1.25em 1.5em}.message-body code,.message-body pre{background-color:#fff}.message-body pre code{background-color:transparent}.modal{align-items:center;display:none;justify-content:center;overflow:hidden;position:fixed;z-index:40}.modal.is-active{display:flex}.modal-background{background-color:hsla(0,0%,4%,.86)}.modal-card,.modal-content{margin:0 20px;max-height:calc(100vh - 160px);overflow:auto;position:relative;width:100%}@media print,screen and (min-width:769px){.modal-card,.modal-content{margin:0 auto;max-height:calc(100vh - 40px);width:640px}}.modal-close{background:none;height:40px;position:fixed;right:20px;top:20px;width:40px}.modal-card{display:flex;flex-direction:column;max-height:calc(100vh - 40px);overflow:hidden}.modal-card-foot,.modal-card-head{align-items:center;background-color:#f5f5f5;display:flex;flex-shrink:0;justify-content:flex-start;padding:20px;position:relative}.modal-card-head{border-bottom:1px solid #dbdbdb;border-top-left-radius:6px;border-top-right-radius:6px}.modal-card-title{color:#363636;flex-grow:1;flex-shrink:0;font-size:1.5rem;line-height:1}.modal-card-foot{border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:1px solid #dbdbdb}.modal-card-foot .button:not(:last-child){margin-right:10px}.modal-card-body{-webkit-overflow-scrolling:touch;background-color:#fff;flex-grow:1;flex-shrink:1;overflow:auto;padding:20px}.navbar{background-color:#fff;min-height:3.25rem;position:relative;z-index:30}.navbar.is-white{background-color:#fff;color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link,.navbar.is-white .navbar-brand>.navbar-item{color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link.is-active,.navbar.is-white .navbar-brand .navbar-link:hover,.navbar.is-white .navbar-brand>a.navbar-item.is-active,.navbar.is-white .navbar-brand>a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link:after{border-color:#0a0a0a}@media screen and (min-width:1088px){.navbar.is-white .navbar-end .navbar-link,.navbar.is-white .navbar-end>.navbar-item,.navbar.is-white .navbar-start .navbar-link,.navbar.is-white .navbar-start>.navbar-item{color:#0a0a0a}.navbar.is-white .navbar-end .navbar-link.is-active,.navbar.is-white .navbar-end .navbar-link:hover,.navbar.is-white .navbar-end>a.navbar-item.is-active,.navbar.is-white .navbar-end>a.navbar-item:hover,.navbar.is-white .navbar-start .navbar-link.is-active,.navbar.is-white .navbar-start .navbar-link:hover,.navbar.is-white .navbar-start>a.navbar-item.is-active,.navbar.is-white .navbar-start>a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-end .navbar-link:after,.navbar.is-white .navbar-start .navbar-link:after{border-color:#0a0a0a}.navbar.is-white .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-white .navbar-item.has-dropdown:hover .navbar-link{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-dropdown a.navbar-item.is-active{background-color:#fff;color:#0a0a0a}}.navbar.is-black{background-color:#0a0a0a;color:#fff}.navbar.is-black .navbar-brand .navbar-link,.navbar.is-black .navbar-brand>.navbar-item{color:#fff}.navbar.is-black .navbar-brand .navbar-link.is-active,.navbar.is-black .navbar-brand .navbar-link:hover,.navbar.is-black .navbar-brand>a.navbar-item.is-active,.navbar.is-black .navbar-brand>a.navbar-item:hover{background-color:#000;color:#fff}.navbar.is-black .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-black .navbar-end .navbar-link,.navbar.is-black .navbar-end>.navbar-item,.navbar.is-black .navbar-start .navbar-link,.navbar.is-black .navbar-start>.navbar-item{color:#fff}.navbar.is-black .navbar-end .navbar-link.is-active,.navbar.is-black .navbar-end .navbar-link:hover,.navbar.is-black .navbar-end>a.navbar-item.is-active,.navbar.is-black .navbar-end>a.navbar-item:hover,.navbar.is-black .navbar-start .navbar-link.is-active,.navbar.is-black .navbar-start .navbar-link:hover,.navbar.is-black .navbar-start>a.navbar-item.is-active,.navbar.is-black .navbar-start>a.navbar-item:hover{background-color:#000;color:#fff}.navbar.is-black .navbar-end .navbar-link:after,.navbar.is-black .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-black .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-black .navbar-item.has-dropdown:hover .navbar-link{background-color:#000;color:#fff}.navbar.is-black .navbar-dropdown a.navbar-item.is-active{background-color:#0a0a0a;color:#fff}}.navbar.is-light{background-color:#f5f5f5;color:#363636}.navbar.is-light .navbar-brand .navbar-link,.navbar.is-light .navbar-brand>.navbar-item{color:#363636}.navbar.is-light .navbar-brand .navbar-link.is-active,.navbar.is-light .navbar-brand .navbar-link:hover,.navbar.is-light .navbar-brand>a.navbar-item.is-active,.navbar.is-light .navbar-brand>a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-brand .navbar-link:after{border-color:#363636}@media screen and (min-width:1088px){.navbar.is-light .navbar-end .navbar-link,.navbar.is-light .navbar-end>.navbar-item,.navbar.is-light .navbar-start .navbar-link,.navbar.is-light .navbar-start>.navbar-item{color:#363636}.navbar.is-light .navbar-end .navbar-link.is-active,.navbar.is-light .navbar-end .navbar-link:hover,.navbar.is-light .navbar-end>a.navbar-item.is-active,.navbar.is-light .navbar-end>a.navbar-item:hover,.navbar.is-light .navbar-start .navbar-link.is-active,.navbar.is-light .navbar-start .navbar-link:hover,.navbar.is-light .navbar-start>a.navbar-item.is-active,.navbar.is-light .navbar-start>a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-end .navbar-link:after,.navbar.is-light .navbar-start .navbar-link:after{border-color:#363636}.navbar.is-light .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-light .navbar-item.has-dropdown:hover .navbar-link{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#363636}}.navbar.is-dark{background-color:#363636;color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link,.navbar.is-dark .navbar-brand>.navbar-item{color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link.is-active,.navbar.is-dark .navbar-brand .navbar-link:hover,.navbar.is-dark .navbar-brand>a.navbar-item.is-active,.navbar.is-dark .navbar-brand>a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link:after{border-color:#f5f5f5}@media screen and (min-width:1088px){.navbar.is-dark .navbar-end .navbar-link,.navbar.is-dark .navbar-end>.navbar-item,.navbar.is-dark .navbar-start .navbar-link,.navbar.is-dark .navbar-start>.navbar-item{color:#f5f5f5}.navbar.is-dark .navbar-end .navbar-link.is-active,.navbar.is-dark .navbar-end .navbar-link:hover,.navbar.is-dark .navbar-end>a.navbar-item.is-active,.navbar.is-dark .navbar-end>a.navbar-item:hover,.navbar.is-dark .navbar-start .navbar-link.is-active,.navbar.is-dark .navbar-start .navbar-link:hover,.navbar.is-dark .navbar-start>a.navbar-item.is-active,.navbar.is-dark .navbar-start>a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-end .navbar-link:after,.navbar.is-dark .navbar-start .navbar-link:after{border-color:#f5f5f5}.navbar.is-dark .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-dark .navbar-item.has-dropdown:hover .navbar-link{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-dropdown a.navbar-item.is-active{background-color:#363636;color:#f5f5f5}}.navbar.is-primary{background-color:#00d1b2;color:#fff}.navbar.is-primary .navbar-brand .navbar-link,.navbar.is-primary .navbar-brand>.navbar-item{color:#fff}.navbar.is-primary .navbar-brand .navbar-link.is-active,.navbar.is-primary .navbar-brand .navbar-link:hover,.navbar.is-primary .navbar-brand>a.navbar-item.is-active,.navbar.is-primary .navbar-brand>a.navbar-item:hover{background-color:#00b89c;color:#fff}.navbar.is-primary .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-primary .navbar-end .navbar-link,.navbar.is-primary .navbar-end>.navbar-item,.navbar.is-primary .navbar-start .navbar-link,.navbar.is-primary .navbar-start>.navbar-item{color:#fff}.navbar.is-primary .navbar-end .navbar-link.is-active,.navbar.is-primary .navbar-end .navbar-link:hover,.navbar.is-primary .navbar-end>a.navbar-item.is-active,.navbar.is-primary .navbar-end>a.navbar-item:hover,.navbar.is-primary .navbar-start .navbar-link.is-active,.navbar.is-primary .navbar-start .navbar-link:hover,.navbar.is-primary .navbar-start>a.navbar-item.is-active,.navbar.is-primary .navbar-start>a.navbar-item:hover{background-color:#00b89c;color:#fff}.navbar.is-primary .navbar-end .navbar-link:after,.navbar.is-primary .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-primary .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-primary .navbar-item.has-dropdown:hover .navbar-link{background-color:#00b89c;color:#fff}.navbar.is-primary .navbar-dropdown a.navbar-item.is-active{background-color:#00d1b2;color:#fff}}.navbar.is-link{background-color:#3273dc;color:#fff}.navbar.is-link .navbar-brand .navbar-link,.navbar.is-link .navbar-brand>.navbar-item{color:#fff}.navbar.is-link .navbar-brand .navbar-link.is-active,.navbar.is-link .navbar-brand .navbar-link:hover,.navbar.is-link .navbar-brand>a.navbar-item.is-active,.navbar.is-link .navbar-brand>a.navbar-item:hover{background-color:#2366d1;color:#fff}.navbar.is-link .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-link .navbar-end .navbar-link,.navbar.is-link .navbar-end>.navbar-item,.navbar.is-link .navbar-start .navbar-link,.navbar.is-link .navbar-start>.navbar-item{color:#fff}.navbar.is-link .navbar-end .navbar-link.is-active,.navbar.is-link .navbar-end .navbar-link:hover,.navbar.is-link .navbar-end>a.navbar-item.is-active,.navbar.is-link .navbar-end>a.navbar-item:hover,.navbar.is-link .navbar-start .navbar-link.is-active,.navbar.is-link .navbar-start .navbar-link:hover,.navbar.is-link .navbar-start>a.navbar-item.is-active,.navbar.is-link .navbar-start>a.navbar-item:hover{background-color:#2366d1;color:#fff}.navbar.is-link .navbar-end .navbar-link:after,.navbar.is-link .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-link .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-link .navbar-item.has-dropdown:hover .navbar-link{background-color:#2366d1;color:#fff}.navbar.is-link .navbar-dropdown a.navbar-item.is-active{background-color:#3273dc;color:#fff}}.navbar.is-info{background-color:#209cee;color:#fff}.navbar.is-info .navbar-brand .navbar-link,.navbar.is-info .navbar-brand>.navbar-item{color:#fff}.navbar.is-info .navbar-brand .navbar-link.is-active,.navbar.is-info .navbar-brand .navbar-link:hover,.navbar.is-info .navbar-brand>a.navbar-item.is-active,.navbar.is-info .navbar-brand>a.navbar-item:hover{background-color:#118fe4;color:#fff}.navbar.is-info .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-info .navbar-end .navbar-link,.navbar.is-info .navbar-end>.navbar-item,.navbar.is-info .navbar-start .navbar-link,.navbar.is-info .navbar-start>.navbar-item{color:#fff}.navbar.is-info .navbar-end .navbar-link.is-active,.navbar.is-info .navbar-end .navbar-link:hover,.navbar.is-info .navbar-end>a.navbar-item.is-active,.navbar.is-info .navbar-end>a.navbar-item:hover,.navbar.is-info .navbar-start .navbar-link.is-active,.navbar.is-info .navbar-start .navbar-link:hover,.navbar.is-info .navbar-start>a.navbar-item.is-active,.navbar.is-info .navbar-start>a.navbar-item:hover{background-color:#118fe4;color:#fff}.navbar.is-info .navbar-end .navbar-link:after,.navbar.is-info .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-info .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-info .navbar-item.has-dropdown:hover .navbar-link{background-color:#118fe4;color:#fff}.navbar.is-info .navbar-dropdown a.navbar-item.is-active{background-color:#209cee;color:#fff}}.navbar.is-success{background-color:#23d160;color:#fff}.navbar.is-success .navbar-brand .navbar-link,.navbar.is-success .navbar-brand>.navbar-item{color:#fff}.navbar.is-success .navbar-brand .navbar-link.is-active,.navbar.is-success .navbar-brand .navbar-link:hover,.navbar.is-success .navbar-brand>a.navbar-item.is-active,.navbar.is-success .navbar-brand>a.navbar-item:hover{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-success .navbar-end .navbar-link,.navbar.is-success .navbar-end>.navbar-item,.navbar.is-success .navbar-start .navbar-link,.navbar.is-success .navbar-start>.navbar-item{color:#fff}.navbar.is-success .navbar-end .navbar-link.is-active,.navbar.is-success .navbar-end .navbar-link:hover,.navbar.is-success .navbar-end>a.navbar-item.is-active,.navbar.is-success .navbar-end>a.navbar-item:hover,.navbar.is-success .navbar-start .navbar-link.is-active,.navbar.is-success .navbar-start .navbar-link:hover,.navbar.is-success .navbar-start>a.navbar-item.is-active,.navbar.is-success .navbar-start>a.navbar-item:hover{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-end .navbar-link:after,.navbar.is-success .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-success .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-success .navbar-item.has-dropdown:hover .navbar-link{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-dropdown a.navbar-item.is-active{background-color:#23d160;color:#fff}}.navbar.is-warning{background-color:#ffdd57}.navbar.is-warning,.navbar.is-warning .navbar-brand .navbar-link,.navbar.is-warning .navbar-brand>.navbar-item{color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-brand .navbar-link.is-active,.navbar.is-warning .navbar-brand .navbar-link:hover,.navbar.is-warning .navbar-brand>a.navbar-item.is-active,.navbar.is-warning .navbar-brand>a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-brand .navbar-link:after{border-color:rgba(0,0,0,.7)}@media screen and (min-width:1088px){.navbar.is-warning .navbar-end .navbar-link,.navbar.is-warning .navbar-end>.navbar-item,.navbar.is-warning .navbar-start .navbar-link,.navbar.is-warning .navbar-start>.navbar-item{color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-end .navbar-link.is-active,.navbar.is-warning .navbar-end .navbar-link:hover,.navbar.is-warning .navbar-end>a.navbar-item.is-active,.navbar.is-warning .navbar-end>a.navbar-item:hover,.navbar.is-warning .navbar-start .navbar-link.is-active,.navbar.is-warning .navbar-start .navbar-link:hover,.navbar.is-warning .navbar-start>a.navbar-item.is-active,.navbar.is-warning .navbar-start>a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-end .navbar-link:after,.navbar.is-warning .navbar-start .navbar-link:after{border-color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-warning .navbar-item.has-dropdown:hover .navbar-link{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-dropdown a.navbar-item.is-active{background-color:#ffdd57;color:rgba(0,0,0,.7)}}.navbar.is-danger{background-color:#ff3860;color:#fff}.navbar.is-danger .navbar-brand .navbar-link,.navbar.is-danger .navbar-brand>.navbar-item{color:#fff}.navbar.is-danger .navbar-brand .navbar-link.is-active,.navbar.is-danger .navbar-brand .navbar-link:hover,.navbar.is-danger .navbar-brand>a.navbar-item.is-active,.navbar.is-danger .navbar-brand>a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-brand .navbar-link:after{border-color:#fff}@media screen and (min-width:1088px){.navbar.is-danger .navbar-end .navbar-link,.navbar.is-danger .navbar-end>.navbar-item,.navbar.is-danger .navbar-start .navbar-link,.navbar.is-danger .navbar-start>.navbar-item{color:#fff}.navbar.is-danger .navbar-end .navbar-link.is-active,.navbar.is-danger .navbar-end .navbar-link:hover,.navbar.is-danger .navbar-end>a.navbar-item.is-active,.navbar.is-danger .navbar-end>a.navbar-item:hover,.navbar.is-danger .navbar-start .navbar-link.is-active,.navbar.is-danger .navbar-start .navbar-link:hover,.navbar.is-danger .navbar-start>a.navbar-item.is-active,.navbar.is-danger .navbar-start>a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-end .navbar-link:after,.navbar.is-danger .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-danger .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-danger .navbar-item.has-dropdown:hover .navbar-link{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-dropdown a.navbar-item.is-active{background-color:#ff3860;color:#fff}}.navbar>.container{align-items:stretch;display:flex;min-height:3.25rem;width:100%}.navbar.has-shadow{box-shadow:0 2px 0 0 #f5f5f5}.navbar.is-fixed-bottom,.navbar.is-fixed-top{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom{bottom:0}.navbar.is-fixed-bottom.has-shadow{box-shadow:0 -2px 0 0 #f5f5f5}.navbar.is-fixed-top{top:0}body.has-navbar-fixed-top,html.has-navbar-fixed-top{padding-top:3.25rem}body.has-navbar-fixed-bottom,html.has-navbar-fixed-bottom{padding-bottom:3.25rem}.navbar-brand,.navbar-tabs{align-items:stretch;display:flex;flex-shrink:0;min-height:3.25rem}.navbar-brand a.navbar-item:hover{background-color:transparent}.navbar-tabs{-webkit-overflow-scrolling:touch;max-width:100vw;overflow-x:auto;overflow-y:hidden}.navbar-burger{cursor:pointer;display:block;height:3.25rem;position:relative;width:3.25rem;margin-left:auto}.navbar-burger span{background-color:currentColor;display:block;height:1px;left:calc(50% - 8px);position:absolute;transform-origin:center;transition-duration:86ms;transition-property:background-color,opacity,transform;transition-timing-function:ease-out;width:16px}.navbar-burger span:first-child{top:calc(50% - 6px)}.navbar-burger span:nth-child(2){top:calc(50% - 1px)}.navbar-burger span:nth-child(3){top:calc(50% + 4px)}.navbar-burger:hover{background-color:rgba(0,0,0,.05)}.navbar-burger.is-active span:first-child{transform:translateY(5px) rotate(45deg)}.navbar-burger.is-active span:nth-child(2){opacity:0}.navbar-burger.is-active span:nth-child(3){transform:translateY(-5px) rotate(-45deg)}.navbar-menu{display:none}.navbar-item,.navbar-link{color:#4a4a4a;display:block;line-height:1.5;padding:.5rem .75rem;position:relative}.navbar-item .icon:only-child,.navbar-link .icon:only-child{margin-left:-.25rem;margin-right:-.25rem}.navbar-link,a.navbar-item{cursor:pointer}.navbar-link.is-active,.navbar-link:hover,a.navbar-item.is-active,a.navbar-item:hover{background-color:#fafafa;color:#3273dc}.navbar-item{display:block;flex-grow:0;flex-shrink:0}.navbar-item img{max-height:1.75rem}.navbar-item.has-dropdown{padding:0}.navbar-item.is-expanded{flex-grow:1;flex-shrink:1}.navbar-item.is-tab{border-bottom:1px solid transparent;min-height:3.25rem;padding-bottom:calc(.5rem - 1px)}.navbar-item.is-tab.is-active,.navbar-item.is-tab:hover{background-color:transparent;border-bottom-color:#3273dc}.navbar-item.is-tab.is-active{border-bottom-style:solid;border-bottom-width:3px;color:#3273dc;padding-bottom:calc(.5rem - 3px)}.navbar-content{flex-grow:1;flex-shrink:1}.navbar-link{padding-right:2.5em}.navbar-link:after{border-color:#3273dc;margin-top:-.375em;right:1.125em}.navbar-dropdown{font-size:.875rem;padding-bottom:.5rem;padding-top:.5rem}.navbar-dropdown .navbar-item{padding-left:1.5rem;padding-right:1.5rem}.navbar-divider{background-color:#f5f5f5;border:none;display:none;height:2px;margin:.5rem 0}@media screen and (max-width:1087px){.navbar>.container{display:block}.navbar-brand .navbar-item,.navbar-tabs .navbar-item{align-items:center;display:flex}.navbar-link:after{display:none}.navbar-menu{background-color:#fff;box-shadow:0 8px 16px hsla(0,0%,4%,.1);padding:.5rem 0}.navbar-menu.is-active{display:block}.navbar.is-fixed-bottom-touch,.navbar.is-fixed-top-touch{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-touch{bottom:0}.navbar.is-fixed-bottom-touch.has-shadow{box-shadow:0 -2px 3px hsla(0,0%,4%,.1)}.navbar.is-fixed-top-touch{top:0}.navbar.is-fixed-top-touch .navbar-menu,.navbar.is-fixed-top .navbar-menu{-webkit-overflow-scrolling:touch;max-height:calc(100vh - 3.25rem);overflow:auto}body.has-navbar-fixed-top-touch,html.has-navbar-fixed-top-touch{padding-top:3.25rem}body.has-navbar-fixed-bottom-touch,html.has-navbar-fixed-bottom-touch{padding-bottom:3.25rem}}@media screen and (min-width:1088px){.navbar,.navbar-end,.navbar-menu,.navbar-start{align-items:stretch;display:flex}.navbar{min-height:3.25rem}.navbar.is-spaced{padding:1rem 2rem}.navbar.is-spaced .navbar-end,.navbar.is-spaced .navbar-start{align-items:center}.navbar.is-spaced .navbar-link,.navbar.is-spaced a.navbar-item{border-radius:4px}.navbar.is-transparent .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-transparent .navbar-item.has-dropdown.is-hoverable:hover .navbar-link,.navbar.is-transparent .navbar-link.is-active,.navbar.is-transparent .navbar-link:hover,.navbar.is-transparent a.navbar-item.is-active,.navbar.is-transparent a.navbar-item:hover{background-color:transparent!important}.navbar.is-transparent .navbar-dropdown a.navbar-item:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar.is-transparent .navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#3273dc}.navbar-burger{display:none}.navbar-item,.navbar-link{align-items:center;display:flex}.navbar-item{display:flex}.navbar-item.has-dropdown{align-items:stretch}.navbar-item.has-dropdown-up .navbar-link:after{transform:rotate(135deg) translate(.25em,-.25em)}.navbar-item.has-dropdown-up .navbar-dropdown{border-bottom:2px solid #dbdbdb;border-radius:6px 6px 0 0;border-top:none;bottom:100%;box-shadow:0 -8px 8px hsla(0,0%,4%,.1);top:auto}.navbar-item.is-active .navbar-dropdown,.navbar-item.is-hoverable:hover .navbar-dropdown{display:block}.navbar-item.is-active .navbar-dropdown.is-boxed,.navbar-item.is-hoverable:hover .navbar-dropdown.is-boxed,.navbar.is-spaced .navbar-item.is-active .navbar-dropdown,.navbar.is-spaced .navbar-item.is-hoverable:hover .navbar-dropdown{opacity:1;pointer-events:auto;transform:translateY(0)}.navbar-menu{flex-grow:1;flex-shrink:0}.navbar-start{justify-content:flex-start;margin-right:auto}.navbar-end{justify-content:flex-end;margin-left:auto}.navbar-dropdown{background-color:#fff;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:2px solid #dbdbdb;box-shadow:0 8px 8px hsla(0,0%,4%,.1);display:none;font-size:.875rem;left:0;min-width:100%;position:absolute;top:100%;z-index:20}.navbar-dropdown .navbar-item{padding:.375rem 1rem;white-space:nowrap}.navbar-dropdown a.navbar-item{padding-right:3rem}.navbar-dropdown a.navbar-item:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#3273dc}.navbar-dropdown.is-boxed,.navbar.is-spaced .navbar-dropdown{border-radius:6px;border-top:none;box-shadow:0 8px 8px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);display:block;opacity:0;pointer-events:none;top:calc(100% + -4px);transform:translateY(-5px);transition-duration:86ms;transition-property:opacity,transform}.navbar-dropdown.is-right{left:auto;right:0}.navbar-divider{display:block}.container>.navbar .navbar-brand,.navbar>.container .navbar-brand{margin-left:-1rem}.container>.navbar .navbar-menu,.navbar>.container .navbar-menu{margin-right:-1rem}.navbar.is-fixed-bottom-desktop,.navbar.is-fixed-top-desktop{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-desktop{bottom:0}.navbar.is-fixed-bottom-desktop.has-shadow{box-shadow:0 -2px 3px hsla(0,0%,4%,.1)}.navbar.is-fixed-top-desktop{top:0}body.has-navbar-fixed-top-desktop,html.has-navbar-fixed-top-desktop{padding-top:3.25rem}body.has-navbar-fixed-bottom-desktop,html.has-navbar-fixed-bottom-desktop{padding-bottom:3.25rem}body.has-spaced-navbar-fixed-top,html.has-spaced-navbar-fixed-top{padding-top:5.25rem}body.has-spaced-navbar-fixed-bottom,html.has-spaced-navbar-fixed-bottom{padding-bottom:5.25rem}.navbar-link.is-active,a.navbar-item.is-active{color:#0a0a0a}.navbar-link.is-active:not(:hover),a.navbar-item.is-active:not(:hover){background-color:transparent}.navbar-item.has-dropdown.is-active .navbar-link,.navbar-item.has-dropdown:hover .navbar-link{background-color:#fafafa}}.pagination{font-size:1rem;margin:-.25rem}.pagination.is-small{font-size:.75rem}.pagination.is-medium{font-size:1.25rem}.pagination.is-large{font-size:1.5rem}.pagination.is-rounded .pagination-next,.pagination.is-rounded .pagination-previous{padding-left:1em;padding-right:1em;border-radius:290486px}.pagination.is-rounded .pagination-link{border-radius:290486px}.pagination,.pagination-list{align-items:center;display:flex;justify-content:center;text-align:center}.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous{font-size:1em;padding-left:.5em;padding-right:.5em;justify-content:center;margin:.25rem;text-align:center}.pagination-link,.pagination-next,.pagination-previous{border-color:#dbdbdb;color:#363636;min-width:2.25em}.pagination-link:hover,.pagination-next:hover,.pagination-previous:hover{border-color:#b5b5b5;color:#363636}.pagination-link:focus,.pagination-next:focus,.pagination-previous:focus{border-color:#3273dc}.pagination-link:active,.pagination-next:active,.pagination-previous:active{box-shadow:inset 0 1px 2px hsla(0,0%,4%,.2)}.pagination-link[disabled],.pagination-next[disabled],.pagination-previous[disabled]{background-color:#dbdbdb;border-color:#dbdbdb;box-shadow:none;color:#7a7a7a;opacity:.5}.pagination-next,.pagination-previous{padding-left:.75em;padding-right:.75em;white-space:nowrap}.pagination-link.is-current{background-color:#3273dc;border-color:#3273dc;color:#fff}.pagination-ellipsis{color:#b5b5b5;pointer-events:none}.pagination-list{flex-wrap:wrap}@media screen and (max-width:768px){.pagination{flex-wrap:wrap}.pagination-list li,.pagination-next,.pagination-previous{flex-grow:1;flex-shrink:1}}@media print,screen and (min-width:769px){.pagination-list{flex-grow:1;flex-shrink:1;justify-content:flex-start;order:1}.pagination-previous{order:2}.pagination-next{order:3}.pagination{justify-content:space-between}.pagination.is-centered .pagination-previous{order:1}.pagination.is-centered .pagination-list{justify-content:center;order:2}.pagination.is-centered .pagination-next{order:3}.pagination.is-right .pagination-previous{order:1}.pagination.is-right .pagination-next{order:2}.pagination.is-right .pagination-list{justify-content:flex-end;order:3}}.panel{font-size:1rem}.panel:not(:last-child){margin-bottom:1.5rem}.panel-block,.panel-heading,.panel-tabs{border-bottom:1px solid #dbdbdb;border-left:1px solid #dbdbdb;border-right:1px solid #dbdbdb}.panel-block:first-child,.panel-heading:first-child,.panel-tabs:first-child{border-top:1px solid #dbdbdb}.panel-heading{background-color:#f5f5f5;border-radius:4px 4px 0 0;color:#363636;font-size:1.25em;font-weight:300;line-height:1.25;padding:.5em .75em}.panel-tabs{align-items:flex-end;display:flex;font-size:.875em;justify-content:center}.panel-tabs a{border-bottom:1px solid #dbdbdb;margin-bottom:-1px;padding:.5em}.panel-tabs a.is-active{border-bottom-color:#4a4a4a;color:#363636}.panel-list a{color:#4a4a4a}.panel-list a:hover{color:#3273dc}.panel-block{align-items:center;color:#363636;display:flex;justify-content:flex-start;padding:.5em .75em}.panel-block input[type=checkbox]{margin-right:.75em}.panel-block>.control{flex-grow:1;flex-shrink:1;width:100%}.panel-block.is-wrapped{flex-wrap:wrap}.panel-block.is-active{border-left-color:#3273dc;color:#363636}.panel-block.is-active .panel-icon{color:#3273dc}a.panel-block,label.panel-block{cursor:pointer}a.panel-block:hover,label.panel-block:hover{background-color:#f5f5f5}.panel-icon{display:inline-block;font-size:14px;height:1em;line-height:1em;text-align:center;vertical-align:top;width:1em;color:#7a7a7a;margin-right:.75em}.panel-icon .fa{font-size:inherit;line-height:inherit}.tabs{-webkit-overflow-scrolling:touch;align-items:stretch;display:flex;font-size:1rem;justify-content:space-between;overflow:hidden;overflow-x:auto;white-space:nowrap}.tabs a{align-items:center;border-bottom-color:#dbdbdb;border-bottom-style:solid;border-bottom-width:1px;color:#4a4a4a;display:flex;justify-content:center;margin-bottom:-1px;padding:.5em 1em;vertical-align:top}.tabs a:hover{border-bottom-color:#363636;color:#363636}.tabs li{display:block}.tabs li.is-active a{border-bottom-color:#3273dc;color:#3273dc}.tabs ul{align-items:center;border-bottom-color:#dbdbdb;border-bottom-style:solid;border-bottom-width:1px;display:flex;flex-grow:1;flex-shrink:0;justify-content:flex-start}.tabs ul.is-center,.tabs ul.is-left{padding-right:.75em}.tabs ul.is-center{flex:none;justify-content:center;padding-left:.75em}.tabs ul.is-right{justify-content:flex-end;padding-left:.75em}.tabs .icon:first-child{margin-right:.5em}.tabs .icon:last-child{margin-left:.5em}.tabs.is-centered ul{justify-content:center}.tabs.is-right ul{justify-content:flex-end}.tabs.is-boxed a{border:1px solid transparent;border-radius:4px 4px 0 0}.tabs.is-boxed a:hover{background-color:#f5f5f5;border-bottom-color:#dbdbdb}.tabs.is-boxed li.is-active a{background-color:#fff;border-color:#dbdbdb;border-bottom-color:transparent!important}.tabs.is-fullwidth li{flex-grow:1;flex-shrink:0}.tabs.is-toggle a{border:1px solid #dbdbdb;margin-bottom:0;position:relative}.tabs.is-toggle a:hover{background-color:#f5f5f5;border-color:#b5b5b5;z-index:2}.tabs.is-toggle li+li{margin-left:-1px}.tabs.is-toggle li:first-child a{border-radius:4px 0 0 4px}.tabs.is-toggle li:last-child a{border-radius:0 4px 4px 0}.tabs.is-toggle li.is-active a{background-color:#3273dc;border-color:#3273dc;color:#fff;z-index:1}.tabs.is-toggle ul{border-bottom:none}.tabs.is-toggle.is-toggle-rounded li:first-child a{border-bottom-left-radius:290486px;border-top-left-radius:290486px;padding-left:1.25em}.tabs.is-toggle.is-toggle-rounded li:last-child a{border-bottom-right-radius:290486px;border-top-right-radius:290486px;padding-right:1.25em}.tabs.is-small{font-size:.75rem}.tabs.is-medium{font-size:1.25rem}.tabs.is-large{font-size:1.5rem}.column{display:block;flex-basis:0;flex-grow:1;flex-shrink:1;padding:.75rem}.columns.is-mobile>.column.is-narrow{flex:none}.columns.is-mobile>.column.is-full{flex:none;width:100%}.columns.is-mobile>.column.is-three-quarters{flex:none;width:75%}.columns.is-mobile>.column.is-two-thirds{flex:none;width:66.6666%}.columns.is-mobile>.column.is-half{flex:none;width:50%}.columns.is-mobile>.column.is-one-third{flex:none;width:33.3333%}.columns.is-mobile>.column.is-one-quarter{flex:none;width:25%}.columns.is-mobile>.column.is-one-fifth{flex:none;width:20%}.columns.is-mobile>.column.is-two-fifths{flex:none;width:40%}.columns.is-mobile>.column.is-three-fifths{flex:none;width:60%}.columns.is-mobile>.column.is-four-fifths{flex:none;width:80%}.columns.is-mobile>.column.is-offset-three-quarters{margin-left:75%}.columns.is-mobile>.column.is-offset-two-thirds{margin-left:66.6666%}.columns.is-mobile>.column.is-offset-half{margin-left:50%}.columns.is-mobile>.column.is-offset-one-third{margin-left:33.3333%}.columns.is-mobile>.column.is-offset-one-quarter{margin-left:25%}.columns.is-mobile>.column.is-offset-one-fifth{margin-left:20%}.columns.is-mobile>.column.is-offset-two-fifths{margin-left:40%}.columns.is-mobile>.column.is-offset-three-fifths{margin-left:60%}.columns.is-mobile>.column.is-offset-four-fifths{margin-left:80%}.columns.is-mobile>.column.is-1{flex:none;width:8.33333%}.columns.is-mobile>.column.is-offset-1{margin-left:8.33333%}.columns.is-mobile>.column.is-2{flex:none;width:16.66667%}.columns.is-mobile>.column.is-offset-2{margin-left:16.66667%}.columns.is-mobile>.column.is-3{flex:none;width:25%}.columns.is-mobile>.column.is-offset-3{margin-left:25%}.columns.is-mobile>.column.is-4{flex:none;width:33.33333%}.columns.is-mobile>.column.is-offset-4{margin-left:33.33333%}.columns.is-mobile>.column.is-5{flex:none;width:41.66667%}.columns.is-mobile>.column.is-offset-5{margin-left:41.66667%}.columns.is-mobile>.column.is-6{flex:none;width:50%}.columns.is-mobile>.column.is-offset-6{margin-left:50%}.columns.is-mobile>.column.is-7{flex:none;width:58.33333%}.columns.is-mobile>.column.is-offset-7{margin-left:58.33333%}.columns.is-mobile>.column.is-8{flex:none;width:66.66667%}.columns.is-mobile>.column.is-offset-8{margin-left:66.66667%}.columns.is-mobile>.column.is-9{flex:none;width:75%}.columns.is-mobile>.column.is-offset-9{margin-left:75%}.columns.is-mobile>.column.is-10{flex:none;width:83.33333%}.columns.is-mobile>.column.is-offset-10{margin-left:83.33333%}.columns.is-mobile>.column.is-11{flex:none;width:91.66667%}.columns.is-mobile>.column.is-offset-11{margin-left:91.66667%}.columns.is-mobile>.column.is-12{flex:none;width:100%}.columns.is-mobile>.column.is-offset-12{margin-left:100%}@media screen and (max-width:768px){.column.is-narrow-mobile{flex:none}.column.is-full-mobile{flex:none;width:100%}.column.is-three-quarters-mobile{flex:none;width:75%}.column.is-two-thirds-mobile{flex:none;width:66.6666%}.column.is-half-mobile{flex:none;width:50%}.column.is-one-third-mobile{flex:none;width:33.3333%}.column.is-one-quarter-mobile{flex:none;width:25%}.column.is-one-fifth-mobile{flex:none;width:20%}.column.is-two-fifths-mobile{flex:none;width:40%}.column.is-three-fifths-mobile{flex:none;width:60%}.column.is-four-fifths-mobile{flex:none;width:80%}.column.is-offset-three-quarters-mobile{margin-left:75%}.column.is-offset-two-thirds-mobile{margin-left:66.6666%}.column.is-offset-half-mobile{margin-left:50%}.column.is-offset-one-third-mobile{margin-left:33.3333%}.column.is-offset-one-quarter-mobile{margin-left:25%}.column.is-offset-one-fifth-mobile{margin-left:20%}.column.is-offset-two-fifths-mobile{margin-left:40%}.column.is-offset-three-fifths-mobile{margin-left:60%}.column.is-offset-four-fifths-mobile{margin-left:80%}.column.is-1-mobile{flex:none;width:8.33333%}.column.is-offset-1-mobile{margin-left:8.33333%}.column.is-2-mobile{flex:none;width:16.66667%}.column.is-offset-2-mobile{margin-left:16.66667%}.column.is-3-mobile{flex:none;width:25%}.column.is-offset-3-mobile{margin-left:25%}.column.is-4-mobile{flex:none;width:33.33333%}.column.is-offset-4-mobile{margin-left:33.33333%}.column.is-5-mobile{flex:none;width:41.66667%}.column.is-offset-5-mobile{margin-left:41.66667%}.column.is-6-mobile{flex:none;width:50%}.column.is-offset-6-mobile{margin-left:50%}.column.is-7-mobile{flex:none;width:58.33333%}.column.is-offset-7-mobile{margin-left:58.33333%}.column.is-8-mobile{flex:none;width:66.66667%}.column.is-offset-8-mobile{margin-left:66.66667%}.column.is-9-mobile{flex:none;width:75%}.column.is-offset-9-mobile{margin-left:75%}.column.is-10-mobile{flex:none;width:83.33333%}.column.is-offset-10-mobile{margin-left:83.33333%}.column.is-11-mobile{flex:none;width:91.66667%}.column.is-offset-11-mobile{margin-left:91.66667%}.column.is-12-mobile{flex:none;width:100%}.column.is-offset-12-mobile{margin-left:100%}}@media print,screen and (min-width:769px){.column.is-narrow,.column.is-narrow-tablet{flex:none}.column.is-full,.column.is-full-tablet{flex:none;width:100%}.column.is-three-quarters,.column.is-three-quarters-tablet{flex:none;width:75%}.column.is-two-thirds,.column.is-two-thirds-tablet{flex:none;width:66.6666%}.column.is-half,.column.is-half-tablet{flex:none;width:50%}.column.is-one-third,.column.is-one-third-tablet{flex:none;width:33.3333%}.column.is-one-quarter,.column.is-one-quarter-tablet{flex:none;width:25%}.column.is-one-fifth,.column.is-one-fifth-tablet{flex:none;width:20%}.column.is-two-fifths,.column.is-two-fifths-tablet{flex:none;width:40%}.column.is-three-fifths,.column.is-three-fifths-tablet{flex:none;width:60%}.column.is-four-fifths,.column.is-four-fifths-tablet{flex:none;width:80%}.column.is-offset-three-quarters,.column.is-offset-three-quarters-tablet{margin-left:75%}.column.is-offset-two-thirds,.column.is-offset-two-thirds-tablet{margin-left:66.6666%}.column.is-offset-half,.column.is-offset-half-tablet{margin-left:50%}.column.is-offset-one-third,.column.is-offset-one-third-tablet{margin-left:33.3333%}.column.is-offset-one-quarter,.column.is-offset-one-quarter-tablet{margin-left:25%}.column.is-offset-one-fifth,.column.is-offset-one-fifth-tablet{margin-left:20%}.column.is-offset-two-fifths,.column.is-offset-two-fifths-tablet{margin-left:40%}.column.is-offset-three-fifths,.column.is-offset-three-fifths-tablet{margin-left:60%}.column.is-offset-four-fifths,.column.is-offset-four-fifths-tablet{margin-left:80%}.column.is-1,.column.is-1-tablet{flex:none;width:8.33333%}.column.is-offset-1,.column.is-offset-1-tablet{margin-left:8.33333%}.column.is-2,.column.is-2-tablet{flex:none;width:16.66667%}.column.is-offset-2,.column.is-offset-2-tablet{margin-left:16.66667%}.column.is-3,.column.is-3-tablet{flex:none;width:25%}.column.is-offset-3,.column.is-offset-3-tablet{margin-left:25%}.column.is-4,.column.is-4-tablet{flex:none;width:33.33333%}.column.is-offset-4,.column.is-offset-4-tablet{margin-left:33.33333%}.column.is-5,.column.is-5-tablet{flex:none;width:41.66667%}.column.is-offset-5,.column.is-offset-5-tablet{margin-left:41.66667%}.column.is-6,.column.is-6-tablet{flex:none;width:50%}.column.is-offset-6,.column.is-offset-6-tablet{margin-left:50%}.column.is-7,.column.is-7-tablet{flex:none;width:58.33333%}.column.is-offset-7,.column.is-offset-7-tablet{margin-left:58.33333%}.column.is-8,.column.is-8-tablet{flex:none;width:66.66667%}.column.is-offset-8,.column.is-offset-8-tablet{margin-left:66.66667%}.column.is-9,.column.is-9-tablet{flex:none;width:75%}.column.is-offset-9,.column.is-offset-9-tablet{margin-left:75%}.column.is-10,.column.is-10-tablet{flex:none;width:83.33333%}.column.is-offset-10,.column.is-offset-10-tablet{margin-left:83.33333%}.column.is-11,.column.is-11-tablet{flex:none;width:91.66667%}.column.is-offset-11,.column.is-offset-11-tablet{margin-left:91.66667%}.column.is-12,.column.is-12-tablet{flex:none;width:100%}.column.is-offset-12,.column.is-offset-12-tablet{margin-left:100%}}@media screen and (max-width:1087px){.column.is-narrow-touch{flex:none}.column.is-full-touch{flex:none;width:100%}.column.is-three-quarters-touch{flex:none;width:75%}.column.is-two-thirds-touch{flex:none;width:66.6666%}.column.is-half-touch{flex:none;width:50%}.column.is-one-third-touch{flex:none;width:33.3333%}.column.is-one-quarter-touch{flex:none;width:25%}.column.is-one-fifth-touch{flex:none;width:20%}.column.is-two-fifths-touch{flex:none;width:40%}.column.is-three-fifths-touch{flex:none;width:60%}.column.is-four-fifths-touch{flex:none;width:80%}.column.is-offset-three-quarters-touch{margin-left:75%}.column.is-offset-two-thirds-touch{margin-left:66.6666%}.column.is-offset-half-touch{margin-left:50%}.column.is-offset-one-third-touch{margin-left:33.3333%}.column.is-offset-one-quarter-touch{margin-left:25%}.column.is-offset-one-fifth-touch{margin-left:20%}.column.is-offset-two-fifths-touch{margin-left:40%}.column.is-offset-three-fifths-touch{margin-left:60%}.column.is-offset-four-fifths-touch{margin-left:80%}.column.is-1-touch{flex:none;width:8.33333%}.column.is-offset-1-touch{margin-left:8.33333%}.column.is-2-touch{flex:none;width:16.66667%}.column.is-offset-2-touch{margin-left:16.66667%}.column.is-3-touch{flex:none;width:25%}.column.is-offset-3-touch{margin-left:25%}.column.is-4-touch{flex:none;width:33.33333%}.column.is-offset-4-touch{margin-left:33.33333%}.column.is-5-touch{flex:none;width:41.66667%}.column.is-offset-5-touch{margin-left:41.66667%}.column.is-6-touch{flex:none;width:50%}.column.is-offset-6-touch{margin-left:50%}.column.is-7-touch{flex:none;width:58.33333%}.column.is-offset-7-touch{margin-left:58.33333%}.column.is-8-touch{flex:none;width:66.66667%}.column.is-offset-8-touch{margin-left:66.66667%}.column.is-9-touch{flex:none;width:75%}.column.is-offset-9-touch{margin-left:75%}.column.is-10-touch{flex:none;width:83.33333%}.column.is-offset-10-touch{margin-left:83.33333%}.column.is-11-touch{flex:none;width:91.66667%}.column.is-offset-11-touch{margin-left:91.66667%}.column.is-12-touch{flex:none;width:100%}.column.is-offset-12-touch{margin-left:100%}}@media screen and (min-width:1088px){.column.is-narrow-desktop{flex:none}.column.is-full-desktop{flex:none;width:100%}.column.is-three-quarters-desktop{flex:none;width:75%}.column.is-two-thirds-desktop{flex:none;width:66.6666%}.column.is-half-desktop{flex:none;width:50%}.column.is-one-third-desktop{flex:none;width:33.3333%}.column.is-one-quarter-desktop{flex:none;width:25%}.column.is-one-fifth-desktop{flex:none;width:20%}.column.is-two-fifths-desktop{flex:none;width:40%}.column.is-three-fifths-desktop{flex:none;width:60%}.column.is-four-fifths-desktop{flex:none;width:80%}.column.is-offset-three-quarters-desktop{margin-left:75%}.column.is-offset-two-thirds-desktop{margin-left:66.6666%}.column.is-offset-half-desktop{margin-left:50%}.column.is-offset-one-third-desktop{margin-left:33.3333%}.column.is-offset-one-quarter-desktop{margin-left:25%}.column.is-offset-one-fifth-desktop{margin-left:20%}.column.is-offset-two-fifths-desktop{margin-left:40%}.column.is-offset-three-fifths-desktop{margin-left:60%}.column.is-offset-four-fifths-desktop{margin-left:80%}.column.is-1-desktop{flex:none;width:8.33333%}.column.is-offset-1-desktop{margin-left:8.33333%}.column.is-2-desktop{flex:none;width:16.66667%}.column.is-offset-2-desktop{margin-left:16.66667%}.column.is-3-desktop{flex:none;width:25%}.column.is-offset-3-desktop{margin-left:25%}.column.is-4-desktop{flex:none;width:33.33333%}.column.is-offset-4-desktop{margin-left:33.33333%}.column.is-5-desktop{flex:none;width:41.66667%}.column.is-offset-5-desktop{margin-left:41.66667%}.column.is-6-desktop{flex:none;width:50%}.column.is-offset-6-desktop{margin-left:50%}.column.is-7-desktop{flex:none;width:58.33333%}.column.is-offset-7-desktop{margin-left:58.33333%}.column.is-8-desktop{flex:none;width:66.66667%}.column.is-offset-8-desktop{margin-left:66.66667%}.column.is-9-desktop{flex:none;width:75%}.column.is-offset-9-desktop{margin-left:75%}.column.is-10-desktop{flex:none;width:83.33333%}.column.is-offset-10-desktop{margin-left:83.33333%}.column.is-11-desktop{flex:none;width:91.66667%}.column.is-offset-11-desktop{margin-left:91.66667%}.column.is-12-desktop{flex:none;width:100%}.column.is-offset-12-desktop{margin-left:100%}}@media screen and (min-width:1280px){.column.is-narrow-widescreen{flex:none}.column.is-full-widescreen{flex:none;width:100%}.column.is-three-quarters-widescreen{flex:none;width:75%}.column.is-two-thirds-widescreen{flex:none;width:66.6666%}.column.is-half-widescreen{flex:none;width:50%}.column.is-one-third-widescreen{flex:none;width:33.3333%}.column.is-one-quarter-widescreen{flex:none;width:25%}.column.is-one-fifth-widescreen{flex:none;width:20%}.column.is-two-fifths-widescreen{flex:none;width:40%}.column.is-three-fifths-widescreen{flex:none;width:60%}.column.is-four-fifths-widescreen{flex:none;width:80%}.column.is-offset-three-quarters-widescreen{margin-left:75%}.column.is-offset-two-thirds-widescreen{margin-left:66.6666%}.column.is-offset-half-widescreen{margin-left:50%}.column.is-offset-one-third-widescreen{margin-left:33.3333%}.column.is-offset-one-quarter-widescreen{margin-left:25%}.column.is-offset-one-fifth-widescreen{margin-left:20%}.column.is-offset-two-fifths-widescreen{margin-left:40%}.column.is-offset-three-fifths-widescreen{margin-left:60%}.column.is-offset-four-fifths-widescreen{margin-left:80%}.column.is-1-widescreen{flex:none;width:8.33333%}.column.is-offset-1-widescreen{margin-left:8.33333%}.column.is-2-widescreen{flex:none;width:16.66667%}.column.is-offset-2-widescreen{margin-left:16.66667%}.column.is-3-widescreen{flex:none;width:25%}.column.is-offset-3-widescreen{margin-left:25%}.column.is-4-widescreen{flex:none;width:33.33333%}.column.is-offset-4-widescreen{margin-left:33.33333%}.column.is-5-widescreen{flex:none;width:41.66667%}.column.is-offset-5-widescreen{margin-left:41.66667%}.column.is-6-widescreen{flex:none;width:50%}.column.is-offset-6-widescreen{margin-left:50%}.column.is-7-widescreen{flex:none;width:58.33333%}.column.is-offset-7-widescreen{margin-left:58.33333%}.column.is-8-widescreen{flex:none;width:66.66667%}.column.is-offset-8-widescreen{margin-left:66.66667%}.column.is-9-widescreen{flex:none;width:75%}.column.is-offset-9-widescreen{margin-left:75%}.column.is-10-widescreen{flex:none;width:83.33333%}.column.is-offset-10-widescreen{margin-left:83.33333%}.column.is-11-widescreen{flex:none;width:91.66667%}.column.is-offset-11-widescreen{margin-left:91.66667%}.column.is-12-widescreen{flex:none;width:100%}.column.is-offset-12-widescreen{margin-left:100%}}@media screen and (min-width:1472px){.column.is-narrow-fullhd{flex:none}.column.is-full-fullhd{flex:none;width:100%}.column.is-three-quarters-fullhd{flex:none;width:75%}.column.is-two-thirds-fullhd{flex:none;width:66.6666%}.column.is-half-fullhd{flex:none;width:50%}.column.is-one-third-fullhd{flex:none;width:33.3333%}.column.is-one-quarter-fullhd{flex:none;width:25%}.column.is-one-fifth-fullhd{flex:none;width:20%}.column.is-two-fifths-fullhd{flex:none;width:40%}.column.is-three-fifths-fullhd{flex:none;width:60%}.column.is-four-fifths-fullhd{flex:none;width:80%}.column.is-offset-three-quarters-fullhd{margin-left:75%}.column.is-offset-two-thirds-fullhd{margin-left:66.6666%}.column.is-offset-half-fullhd{margin-left:50%}.column.is-offset-one-third-fullhd{margin-left:33.3333%}.column.is-offset-one-quarter-fullhd{margin-left:25%}.column.is-offset-one-fifth-fullhd{margin-left:20%}.column.is-offset-two-fifths-fullhd{margin-left:40%}.column.is-offset-three-fifths-fullhd{margin-left:60%}.column.is-offset-four-fifths-fullhd{margin-left:80%}.column.is-1-fullhd{flex:none;width:8.33333%}.column.is-offset-1-fullhd{margin-left:8.33333%}.column.is-2-fullhd{flex:none;width:16.66667%}.column.is-offset-2-fullhd{margin-left:16.66667%}.column.is-3-fullhd{flex:none;width:25%}.column.is-offset-3-fullhd{margin-left:25%}.column.is-4-fullhd{flex:none;width:33.33333%}.column.is-offset-4-fullhd{margin-left:33.33333%}.column.is-5-fullhd{flex:none;width:41.66667%}.column.is-offset-5-fullhd{margin-left:41.66667%}.column.is-6-fullhd{flex:none;width:50%}.column.is-offset-6-fullhd{margin-left:50%}.column.is-7-fullhd{flex:none;width:58.33333%}.column.is-offset-7-fullhd{margin-left:58.33333%}.column.is-8-fullhd{flex:none;width:66.66667%}.column.is-offset-8-fullhd{margin-left:66.66667%}.column.is-9-fullhd{flex:none;width:75%}.column.is-offset-9-fullhd{margin-left:75%}.column.is-10-fullhd{flex:none;width:83.33333%}.column.is-offset-10-fullhd{margin-left:83.33333%}.column.is-11-fullhd{flex:none;width:91.66667%}.column.is-offset-11-fullhd{margin-left:91.66667%}.column.is-12-fullhd{flex:none;width:100%}.column.is-offset-12-fullhd{margin-left:100%}}.columns{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.columns:last-child{margin-bottom:-.75rem}.columns:not(:last-child){margin-bottom:0.75rem}.columns.is-centered{justify-content:center}.columns.is-gapless{margin-left:0;margin-right:0;margin-top:0}.columns.is-gapless>.column{margin:0;padding:0!important}.columns.is-gapless:not(:last-child){margin-bottom:1.5rem}.columns.is-gapless:last-child{margin-bottom:0}.columns.is-mobile{display:flex}.columns.is-multiline{flex-wrap:wrap}.columns.is-vcentered{align-items:center}@media print,screen and (min-width:769px){.columns:not(.is-desktop){display:flex}}@media screen and (min-width:1088px){.columns.is-desktop{display:flex}}.columns.is-variable{--columnGap:0.75rem;margin-left:calc(-1 * var(--columnGap));margin-right:calc(-1 * var(--columnGap))}.columns.is-variable .column{padding-left:var(--columnGap);padding-right:var(--columnGap)}.columns.is-variable.is-0{--columnGap:0rem}.columns.is-variable.is-1{--columnGap:0.25rem}.columns.is-variable.is-2{--columnGap:0.5rem}.columns.is-variable.is-3{--columnGap:0.75rem}.columns.is-variable.is-4{--columnGap:1rem}.columns.is-variable.is-5{--columnGap:1.25rem}.columns.is-variable.is-6{--columnGap:1.5rem}.columns.is-variable.is-7{--columnGap:1.75rem}.columns.is-variable.is-8{--columnGap:2rem}.tile{align-items:stretch;display:block;flex-basis:0;flex-grow:1;flex-shrink:1;min-height:min-content}.tile.is-ancestor{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.tile.is-ancestor:last-child{margin-bottom:-.75rem}.tile.is-ancestor:not(:last-child){margin-bottom:.75rem}.tile.is-child{margin:0!important}.tile.is-parent{padding:.75rem}.tile.is-vertical{flex-direction:column}.tile.is-vertical>.tile.is-child:not(:last-child){margin-bottom:1.5rem!important}@media print,screen and (min-width:769px){.tile:not(.is-child){display:flex}.tile.is-1{flex:none;width:8.33333%}.tile.is-2{flex:none;width:16.66667%}.tile.is-3{flex:none;width:25%}.tile.is-4{flex:none;width:33.33333%}.tile.is-5{flex:none;width:41.66667%}.tile.is-6{flex:none;width:50%}.tile.is-7{flex:none;width:58.33333%}.tile.is-8{flex:none;width:66.66667%}.tile.is-9{flex:none;width:75%}.tile.is-10{flex:none;width:83.33333%}.tile.is-11{flex:none;width:91.66667%}.tile.is-12{flex:none;width:100%}}.hero{align-items:stretch;display:flex;flex-direction:column;justify-content:space-between}.hero .navbar{background:none}.hero .tabs ul{border-bottom:none}.hero.is-white{background-color:#fff;color:#0a0a0a}.hero.is-white a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-white strong{color:inherit}.hero.is-white .title{color:#0a0a0a}.hero.is-white .subtitle{color:hsla(0,0%,4%,.9)}.hero.is-white .subtitle a:not(.button),.hero.is-white .subtitle strong{color:#0a0a0a}@media screen and (max-width:1087px){.hero.is-white .navbar-menu{background-color:#fff}}.hero.is-white .navbar-item,.hero.is-white .navbar-link{color:hsla(0,0%,4%,.7)}.hero.is-white .navbar-link.is-active,.hero.is-white .navbar-link:hover,.hero.is-white a.navbar-item.is-active,.hero.is-white a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.hero.is-white .tabs a{color:#0a0a0a;opacity:.9}.hero.is-white .tabs a:hover,.hero.is-white .tabs li.is-active a{opacity:1}.hero.is-white .tabs.is-boxed a,.hero.is-white .tabs.is-toggle a{color:#0a0a0a}.hero.is-white .tabs.is-boxed a:hover,.hero.is-white .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-white .tabs.is-boxed li.is-active a,.hero.is-white .tabs.is-boxed li.is-active a:hover,.hero.is-white .tabs.is-toggle li.is-active a,.hero.is-white .tabs.is-toggle li.is-active a:hover{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.hero.is-white.is-bold{background-image:linear-gradient(141deg,#e6e6e6,#fff 71%,#fff)}@media screen and (max-width:768px){.hero.is-white.is-bold .navbar-menu{background-image:linear-gradient(141deg,#e6e6e6,#fff 71%,#fff)}}.hero.is-black{background-color:#0a0a0a;color:#fff}.hero.is-black a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-black strong{color:inherit}.hero.is-black .title{color:#fff}.hero.is-black .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-black .subtitle a:not(.button),.hero.is-black .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-black .navbar-menu{background-color:#0a0a0a}}.hero.is-black .navbar-item,.hero.is-black .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-black .navbar-link.is-active,.hero.is-black .navbar-link:hover,.hero.is-black a.navbar-item.is-active,.hero.is-black a.navbar-item:hover{background-color:#000;color:#fff}.hero.is-black .tabs a{color:#fff;opacity:.9}.hero.is-black .tabs a:hover,.hero.is-black .tabs li.is-active a{opacity:1}.hero.is-black .tabs.is-boxed a,.hero.is-black .tabs.is-toggle a{color:#fff}.hero.is-black .tabs.is-boxed a:hover,.hero.is-black .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-black .tabs.is-boxed li.is-active a,.hero.is-black .tabs.is-boxed li.is-active a:hover,.hero.is-black .tabs.is-toggle li.is-active a,.hero.is-black .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#0a0a0a}.hero.is-black.is-bold{background-image:linear-gradient(141deg,#000,#0a0a0a 71%,#181616)}@media screen and (max-width:768px){.hero.is-black.is-bold .navbar-menu{background-image:linear-gradient(141deg,#000,#0a0a0a 71%,#181616)}}.hero.is-light{background-color:#f5f5f5;color:#363636}.hero.is-light a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-light strong{color:inherit}.hero.is-light .title{color:#363636}.hero.is-light .subtitle{color:rgba(54,54,54,.9)}.hero.is-light .subtitle a:not(.button),.hero.is-light .subtitle strong{color:#363636}@media screen and (max-width:1087px){.hero.is-light .navbar-menu{background-color:#f5f5f5}}.hero.is-light .navbar-item,.hero.is-light .navbar-link{color:rgba(54,54,54,.7)}.hero.is-light .navbar-link.is-active,.hero.is-light .navbar-link:hover,.hero.is-light a.navbar-item.is-active,.hero.is-light a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.hero.is-light .tabs a{color:#363636;opacity:.9}.hero.is-light .tabs a:hover,.hero.is-light .tabs li.is-active a{opacity:1}.hero.is-light .tabs.is-boxed a,.hero.is-light .tabs.is-toggle a{color:#363636}.hero.is-light .tabs.is-boxed a:hover,.hero.is-light .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-light .tabs.is-boxed li.is-active a,.hero.is-light .tabs.is-boxed li.is-active a:hover,.hero.is-light .tabs.is-toggle li.is-active a,.hero.is-light .tabs.is-toggle li.is-active a:hover{background-color:#363636;border-color:#363636;color:#f5f5f5}.hero.is-light.is-bold{background-image:linear-gradient(141deg,#dfd8d9,#f5f5f5 71%,#fff)}@media screen and (max-width:768px){.hero.is-light.is-bold .navbar-menu{background-image:linear-gradient(141deg,#dfd8d9,#f5f5f5 71%,#fff)}}.hero.is-dark{background-color:#363636;color:#f5f5f5}.hero.is-dark a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-dark strong{color:inherit}.hero.is-dark .title{color:#f5f5f5}.hero.is-dark .subtitle{color:hsla(0,0%,96%,.9)}.hero.is-dark .subtitle a:not(.button),.hero.is-dark .subtitle strong{color:#f5f5f5}@media screen and (max-width:1087px){.hero.is-dark .navbar-menu{background-color:#363636}}.hero.is-dark .navbar-item,.hero.is-dark .navbar-link{color:hsla(0,0%,96%,.7)}.hero.is-dark .navbar-link.is-active,.hero.is-dark .navbar-link:hover,.hero.is-dark a.navbar-item.is-active,.hero.is-dark a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.hero.is-dark .tabs a{color:#f5f5f5;opacity:.9}.hero.is-dark .tabs a:hover,.hero.is-dark .tabs li.is-active a{opacity:1}.hero.is-dark .tabs.is-boxed a,.hero.is-dark .tabs.is-toggle a{color:#f5f5f5}.hero.is-dark .tabs.is-boxed a:hover,.hero.is-dark .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-dark .tabs.is-boxed li.is-active a,.hero.is-dark .tabs.is-boxed li.is-active a:hover,.hero.is-dark .tabs.is-toggle li.is-active a,.hero.is-dark .tabs.is-toggle li.is-active a:hover{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.hero.is-dark.is-bold{background-image:linear-gradient(141deg,#1f191a,#363636 71%,#46403f)}@media screen and (max-width:768px){.hero.is-dark.is-bold .navbar-menu{background-image:linear-gradient(141deg,#1f191a,#363636 71%,#46403f)}}.hero.is-primary{background-color:#00d1b2;color:#fff}.hero.is-primary a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-primary strong{color:inherit}.hero.is-primary .title{color:#fff}.hero.is-primary .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-primary .subtitle a:not(.button),.hero.is-primary .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-primary .navbar-menu{background-color:#00d1b2}}.hero.is-primary .navbar-item,.hero.is-primary .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-primary .navbar-link.is-active,.hero.is-primary .navbar-link:hover,.hero.is-primary a.navbar-item.is-active,.hero.is-primary a.navbar-item:hover{background-color:#00b89c;color:#fff}.hero.is-primary .tabs a{color:#fff;opacity:.9}.hero.is-primary .tabs a:hover,.hero.is-primary .tabs li.is-active a{opacity:1}.hero.is-primary .tabs.is-boxed a,.hero.is-primary .tabs.is-toggle a{color:#fff}.hero.is-primary .tabs.is-boxed a:hover,.hero.is-primary .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-primary .tabs.is-boxed li.is-active a,.hero.is-primary .tabs.is-boxed li.is-active a:hover,.hero.is-primary .tabs.is-toggle li.is-active a,.hero.is-primary .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#00d1b2}.hero.is-primary.is-bold{background-image:linear-gradient(141deg,#009e6c,#00d1b2 71%,#00e7eb)}@media screen and (max-width:768px){.hero.is-primary.is-bold .navbar-menu{background-image:linear-gradient(141deg,#009e6c,#00d1b2 71%,#00e7eb)}}.hero.is-link{background-color:#3273dc;color:#fff}.hero.is-link a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-link strong{color:inherit}.hero.is-link .title{color:#fff}.hero.is-link .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-link .subtitle a:not(.button),.hero.is-link .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-link .navbar-menu{background-color:#3273dc}}.hero.is-link .navbar-item,.hero.is-link .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-link .navbar-link.is-active,.hero.is-link .navbar-link:hover,.hero.is-link a.navbar-item.is-active,.hero.is-link a.navbar-item:hover{background-color:#2366d1;color:#fff}.hero.is-link .tabs a{color:#fff;opacity:.9}.hero.is-link .tabs a:hover,.hero.is-link .tabs li.is-active a{opacity:1}.hero.is-link .tabs.is-boxed a,.hero.is-link .tabs.is-toggle a{color:#fff}.hero.is-link .tabs.is-boxed a:hover,.hero.is-link .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-link .tabs.is-boxed li.is-active a,.hero.is-link .tabs.is-boxed li.is-active a:hover,.hero.is-link .tabs.is-toggle li.is-active a,.hero.is-link .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#3273dc}.hero.is-link.is-bold{background-image:linear-gradient(141deg,#1577c6,#3273dc 71%,#4366e5)}@media screen and (max-width:768px){.hero.is-link.is-bold .navbar-menu{background-image:linear-gradient(141deg,#1577c6,#3273dc 71%,#4366e5)}}.hero.is-info{background-color:#209cee;color:#fff}.hero.is-info a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-info strong{color:inherit}.hero.is-info .title{color:#fff}.hero.is-info .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-info .subtitle a:not(.button),.hero.is-info .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-info .navbar-menu{background-color:#209cee}}.hero.is-info .navbar-item,.hero.is-info .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-info .navbar-link.is-active,.hero.is-info .navbar-link:hover,.hero.is-info a.navbar-item.is-active,.hero.is-info a.navbar-item:hover{background-color:#118fe4;color:#fff}.hero.is-info .tabs a{color:#fff;opacity:.9}.hero.is-info .tabs a:hover,.hero.is-info .tabs li.is-active a{opacity:1}.hero.is-info .tabs.is-boxed a,.hero.is-info .tabs.is-toggle a{color:#fff}.hero.is-info .tabs.is-boxed a:hover,.hero.is-info .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-info .tabs.is-boxed li.is-active a,.hero.is-info .tabs.is-boxed li.is-active a:hover,.hero.is-info .tabs.is-toggle li.is-active a,.hero.is-info .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#209cee}.hero.is-info.is-bold{background-image:linear-gradient(141deg,#04a6d7,#209cee 71%,#3287f5)}@media screen and (max-width:768px){.hero.is-info.is-bold .navbar-menu{background-image:linear-gradient(141deg,#04a6d7,#209cee 71%,#3287f5)}}.hero.is-success{background-color:#23d160;color:#fff}.hero.is-success a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-success strong{color:inherit}.hero.is-success .title{color:#fff}.hero.is-success .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-success .subtitle a:not(.button),.hero.is-success .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-success .navbar-menu{background-color:#23d160}}.hero.is-success .navbar-item,.hero.is-success .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-success .navbar-link.is-active,.hero.is-success .navbar-link:hover,.hero.is-success a.navbar-item.is-active,.hero.is-success a.navbar-item:hover{background-color:#20bc56;color:#fff}.hero.is-success .tabs a{color:#fff;opacity:.9}.hero.is-success .tabs a:hover,.hero.is-success .tabs li.is-active a{opacity:1}.hero.is-success .tabs.is-boxed a,.hero.is-success .tabs.is-toggle a{color:#fff}.hero.is-success .tabs.is-boxed a:hover,.hero.is-success .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-success .tabs.is-boxed li.is-active a,.hero.is-success .tabs.is-boxed li.is-active a:hover,.hero.is-success .tabs.is-toggle li.is-active a,.hero.is-success .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#23d160}.hero.is-success.is-bold{background-image:linear-gradient(141deg,#12af2f,#23d160 71%,#2ce28a)}@media screen and (max-width:768px){.hero.is-success.is-bold .navbar-menu{background-image:linear-gradient(141deg,#12af2f,#23d160 71%,#2ce28a)}}.hero.is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.hero.is-warning a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-warning strong{color:inherit}.hero.is-warning .title{color:rgba(0,0,0,.7)}.hero.is-warning .subtitle{color:rgba(0,0,0,.9)}.hero.is-warning .subtitle a:not(.button),.hero.is-warning .subtitle strong{color:rgba(0,0,0,.7)}@media screen and (max-width:1087px){.hero.is-warning .navbar-menu{background-color:#ffdd57}}.hero.is-warning .navbar-item,.hero.is-warning .navbar-link{color:rgba(0,0,0,.7)}.hero.is-warning .navbar-link.is-active,.hero.is-warning .navbar-link:hover,.hero.is-warning a.navbar-item.is-active,.hero.is-warning a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.hero.is-warning .tabs a{color:rgba(0,0,0,.7);opacity:.9}.hero.is-warning .tabs a:hover,.hero.is-warning .tabs li.is-active a{opacity:1}.hero.is-warning .tabs.is-boxed a,.hero.is-warning .tabs.is-toggle a{color:rgba(0,0,0,.7)}.hero.is-warning .tabs.is-boxed a:hover,.hero.is-warning .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-warning .tabs.is-boxed li.is-active a,.hero.is-warning .tabs.is-boxed li.is-active a:hover,.hero.is-warning .tabs.is-toggle li.is-active a,.hero.is-warning .tabs.is-toggle li.is-active a:hover{background-color:rgba(0,0,0,.7);border-color:rgba(0,0,0,.7);color:#ffdd57}.hero.is-warning.is-bold{background-image:linear-gradient(141deg,#ffaf24,#ffdd57 71%,#fffa70)}@media screen and (max-width:768px){.hero.is-warning.is-bold .navbar-menu{background-image:linear-gradient(141deg,#ffaf24,#ffdd57 71%,#fffa70)}}.hero.is-danger{background-color:#ff3860;color:#fff}.hero.is-danger a:not(.button):not(.dropdown-item):not(.dropdown .dropdown-menu .has-link a):not(.tag),.hero.is-danger strong{color:inherit}.hero.is-danger .title{color:#fff}.hero.is-danger .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-danger .subtitle a:not(.button),.hero.is-danger .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-danger .navbar-menu{background-color:#ff3860}}.hero.is-danger .navbar-item,.hero.is-danger .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-danger .navbar-link.is-active,.hero.is-danger .navbar-link:hover,.hero.is-danger a.navbar-item.is-active,.hero.is-danger a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.hero.is-danger .tabs a{color:#fff;opacity:.9}.hero.is-danger .tabs a:hover,.hero.is-danger .tabs li.is-active a{opacity:1}.hero.is-danger .tabs.is-boxed a,.hero.is-danger .tabs.is-toggle a{color:#fff}.hero.is-danger .tabs.is-boxed a:hover,.hero.is-danger .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-danger .tabs.is-boxed li.is-active a,.hero.is-danger .tabs.is-boxed li.is-active a:hover,.hero.is-danger .tabs.is-toggle li.is-active a,.hero.is-danger .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#ff3860}.hero.is-danger.is-bold{background-image:linear-gradient(141deg,#ff0561,#ff3860 71%,#ff5257)}@media screen and (max-width:768px){.hero.is-danger.is-bold .navbar-menu{background-image:linear-gradient(141deg,#ff0561,#ff3860 71%,#ff5257)}}.hero.is-small .hero-body{padding-bottom:1.5rem;padding-top:1.5rem}@media print,screen and (min-width:769px){.hero.is-medium .hero-body{padding-bottom:9rem;padding-top:9rem}}@media print,screen and (min-width:769px){.hero.is-large .hero-body{padding-bottom:18rem;padding-top:18rem}}.hero.is-fullheight .hero-body,.hero.is-halfheight .hero-body{align-items:center;display:flex}.hero.is-fullheight .hero-body>.container,.hero.is-halfheight .hero-body>.container{flex-grow:1;flex-shrink:1}.hero.is-halfheight{min-height:50vh}.hero.is-fullheight{min-height:100vh}.hero-video{overflow:hidden}.hero-video video{left:50%;min-height:100%;min-width:100%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.hero-video.is-transparent{opacity:.3}@media screen and (max-width:768px){.hero-video{display:none}}.hero-buttons{margin-top:1.5rem}@media screen and (max-width:768px){.hero-buttons .button{display:flex}.hero-buttons .button:not(:last-child){margin-bottom:.75rem}}@media print,screen and (min-width:769px){.hero-buttons{display:flex;justify-content:center}.hero-buttons .button:not(:last-child){margin-right:1.5rem}}.hero-foot,.hero-head{flex-grow:0;flex-shrink:0}.hero-body{flex-grow:1;flex-shrink:0}.hero-body,.section{padding:3rem 1.5rem}@media screen and (min-width:1088px){.section.is-medium{padding:9rem 1.5rem}.section.is-large{padding:18rem 1.5rem}}.footer{background-color:#fafafa;padding:3rem 1.5rem 6rem}.is-noscroll{position:fixed;overflow-y:hidden;width:100%;bottom:0}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{animation-name:fadeOut}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;transform:translate3d(0,100%,0)}}.fadeOutDown{animation-name:fadeOutDown}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;transform:translate3d(0,-100%,0)}}.fadeOutUp{animation-name:fadeOutUp}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{animation-name:fadeIn}@keyframes fadeInDown{0%{opacity:0;transform:translate3d(0,-100%,0)}to{opacity:1;transform:none}}.fadeInDown{animation-name:fadeInDown}@keyframes fadeInUp{0%{opacity:0;transform:translate3d(0,100%,0)}to{opacity:1;transform:none}}.fadeInUp{animation-name:fadeInUp}.fade-enter-active,.fade-leave-active{transition:opacity .15s ease-out}.fade-enter,.fade-leave-to{opacity:0}.zoom-in-enter-active,.zoom-in-leave-active{transition:opacity .15s ease-out}.zoom-in-enter-active .animation-content,.zoom-in-leave-active .animation-content{transition:transform .15s ease-out}.zoom-in-enter,.zoom-in-leave-active{opacity:0}.zoom-in-enter .animation-content,.zoom-in-leave-active .animation-content{transform:scale(.95)}.zoom-out-enter-active,.zoom-out-leave-active{transition:opacity .15s ease-out}.zoom-out-enter-active .animation-content,.zoom-out-leave-active .animation-content{transition:transform .15s ease-out}.zoom-out-enter,.zoom-out-leave-active{opacity:0}.zoom-out-enter .animation-content,.zoom-out-leave-active .animation-content{transform:scale(1.05)}.slide-next-enter-active,.slide-next-leave-active,.slide-prev-enter-active,.slide-prev-leave-active{transition:transform .25s cubic-bezier(.785,.135,.15,.86)}.slide-next-enter,.slide-prev-leave-to{transform:translate3d(-100%,0,0);position:absolute;width:100%}.slide-next-leave-to,.slide-prev-enter{transform:translate3d(100%,0,0);position:absolute;width:100%}.autocomplete{position:relative}.autocomplete .dropdown-menu{display:block;min-width:100%;max-width:100%}.autocomplete .dropdown-menu.is-opened-top{top:auto;bottom:100%}.autocomplete .dropdown-content{overflow:auto;max-height:200px}.autocomplete .dropdown-item,.autocomplete .dropdown .dropdown-menu .has-link a,.dropdown .dropdown-menu .has-link .autocomplete a{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.autocomplete .dropdown-item.is-hovered,.autocomplete .dropdown .dropdown-menu .has-link a.is-hovered,.dropdown .dropdown-menu .has-link .autocomplete a.is-hovered{background:#f5f5f5;color:#0a0a0a}.autocomplete .dropdown-item.is-disabled,.autocomplete .dropdown .dropdown-menu .has-link a.is-disabled,.dropdown .dropdown-menu .has-link .autocomplete a.is-disabled{opacity:.5;cursor:not-allowed}.autocomplete.is-small{border-radius:2px;font-size:.75rem}.autocomplete.is-medium{font-size:1.25rem}.autocomplete.is-large{font-size:1.5rem}.b-checkbox.checkbox{outline:none;display:inline-flex;align-items:center}.b-checkbox.checkbox+.checkbox{margin-left:.5em}.b-checkbox.checkbox input[type=checkbox]{position:absolute;left:0;opacity:0;outline:none;z-index:-1}.b-checkbox.checkbox input[type=checkbox]+.check{width:1.25em;height:1.25em;flex-shrink:0;border-radius:4px;border:2px solid #7a7a7a;transition:background .15s ease-out}.b-checkbox.checkbox input[type=checkbox]:checked+.check{background:#00d1b2 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#00d1b2}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-white{background:#fff url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%230a0a0a'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#fff}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-black{background:#0a0a0a url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#0a0a0a}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-light{background:#f5f5f5 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23363636'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#f5f5f5}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-dark{background:#363636 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23f5f5f5'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#363636}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-primary{background:#00d1b2 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#00d1b2}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-link{background:#3273dc url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#3273dc}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-info{background:#209cee url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#209cee}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-success{background:#23d160 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#23d160}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-warning{background:#ffdd57 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='rgba(0,0,0,.7)'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#ffdd57}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-danger{background:#ff3860 url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E\\\") no-repeat 50%;border-color:#ff3860}.b-checkbox.checkbox .control-label{padding-left:.5em}.b-checkbox.checkbox[disabled]{opacity:.5}.b-checkbox.checkbox:hover input[type=checkbox]+.check{border-color:#00d1b2}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-white{border-color:#fff}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-black{border-color:#0a0a0a}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-light{border-color:#f5f5f5}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-dark{border-color:#363636}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-primary{border-color:#00d1b2}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-link{border-color:#3273dc}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-info{border-color:#209cee}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-success{border-color:#23d160}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-warning{border-color:#ffdd57}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-danger{border-color:#ff3860}.b-checkbox.checkbox:focus input[type=checkbox]+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-primary{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-link{box-shadow:0 0 .5em rgba(50,115,220,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-info{box-shadow:0 0 .5em rgba(32,156,238,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.b-checkbox.checkbox:focus input[type=checkbox]:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.b-checkbox.checkbox.is-small{border-radius:2px;font-size:.75rem}.b-checkbox.checkbox.is-medium{font-size:1.25rem}.b-checkbox.checkbox.is-large{font-size:1.5rem}.collapse .collapse-trigger{display:inline;cursor:pointer}.collapse .collapse-content{display:inherit}.datepicker{font-size:.875rem}.datepicker .dropdown,.datepicker .dropdown-trigger{width:100%}.datepicker .dropdown-item,.datepicker .dropdown .dropdown-menu .has-link a,.dropdown .dropdown-menu .has-link .datepicker a{font-size:inherit}.datepicker .datepicker-header{padding-bottom:.875rem;margin-bottom:.875rem;border-bottom:1px solid #dbdbdb}.datepicker .datepicker-footer{padding-top:.875rem;border-top:1px solid #dbdbdb}.datepicker .datepicker-table{display:table;margin:0 auto .875rem}.datepicker .datepicker-table .datepicker-cell{text-align:center;vertical-align:middle;display:table-cell;border-radius:4px;padding:.5rem .75rem}.datepicker .datepicker-table .datepicker-header{display:table-header-group}.datepicker .datepicker-table .datepicker-header .datepicker-cell{color:#7a7a7a;font-weight:600}.datepicker .datepicker-table .datepicker-body{display:table-row-group}.datepicker .datepicker-table .datepicker-body .datepicker-row{display:table-row}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-unselectable{color:#b5b5b5}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-today{border:1px solid rgba(0,209,178,.5)}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable{color:#4a4a4a}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable:focus:not(.is-selected),.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable:hover:not(.is-selected){background-color:#f5f5f5;color:#0a0a0a;cursor:pointer}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selected{background-color:#00d1b2;color:#fff}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell{padding:.3rem .75rem .75rem}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event{position:relative}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events{bottom:.425rem;display:flex;justify-content:center;left:0;padding:0 .35rem;position:absolute;width:100%}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-white{background-color:#fff}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-black{background-color:#0a0a0a}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-light{background-color:#f5f5f5}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-dark{background-color:#363636}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-primary{background-color:#00d1b2}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-link{background-color:#3273dc}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-info{background-color:#209cee}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-success{background-color:#23d160}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-warning{background-color:#ffdd57}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-danger{background-color:#ff3860}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event.dots .event{border-radius:50%;height:.35em;margin:0 .1em;width:.35em}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event.bars .event{height:.25em;width:100%}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.is-selected{overflow:hidden}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.is-selected .events .event.is-primary{background-color:#1fffdd}.datepicker.is-small{border-radius:2px;font-size:.75rem}.datepicker.is-medium{font-size:1.25rem}.datepicker.is-large{font-size:1.5rem}@media screen and (min-width:769px) and (max-width:1087px){.datepicker .datepicker-table .datepicker-cell{padding:.75rem 1rem}}@media screen and (max-width:768px){.datepicker .datepicker-table .datepicker-cell{padding:.25rem .5rem}}.dialog .modal-card{max-width:460px;width:auto}.dialog .modal-card .modal-card-head{font-size:1.25rem;font-weight:600}.dialog .modal-card .modal-card-body .field{margin-top:16px}.dialog .modal-card .modal-card-body.is-titleless{border-top-left-radius:6px;border-top-right-radius:6px}.dialog .modal-card .modal-card-foot{justify-content:flex-end}.dialog .modal-card .modal-card-foot .button{display:inline;min-width:5em;font-weight:600}@media print,screen and (min-width:769px){.dialog .modal-card{min-width:320px}}.dialog.is-small .button,.dialog.is-small .input,.dialog.is-small .modal-card,.dialog.is-small .taginput .taginput-container.is-focusable,.taginput .dialog.is-small .taginput-container.is-focusable{border-radius:2px;font-size:.75rem}.dialog.is-medium .button,.dialog.is-medium .input,.dialog.is-medium .modal-card,.dialog.is-medium .taginput .taginput-container.is-focusable,.taginput .dialog.is-medium .taginput-container.is-focusable{font-size:1.25rem}.dialog.is-large .button,.dialog.is-large .input,.dialog.is-large .modal-card,.dialog.is-large .taginput .taginput-container.is-focusable,.taginput .dialog.is-large .taginput-container.is-focusable{font-size:1.5rem}.dropdown+.dropdown{margin-left:.5em}.dropdown .background{position:fixed;background-color:hsla(0,0%,4%,.86);z-index:10;cursor:pointer}@media screen and (min-width:1088px){.dropdown .background{display:none}}.dropdown .dropdown-menu .dropdown-item.is-disabled,.dropdown .dropdown-menu .has-link a.is-disabled{cursor:not-allowed}.dropdown .dropdown-menu .dropdown-item.is-disabled:hover,.dropdown .dropdown-menu .has-link a.is-disabled:hover{background:inherit;color:inherit}.dropdown .dropdown-menu .has-link a{padding-right:3rem;white-space:nowrap}.dropdown:not(.is-disabled) .dropdown-menu .dropdown-item.is-disabled,.dropdown:not(.is-disabled) .dropdown-menu .has-link a.is-disabled{opacity:.5}.dropdown .navbar-item{height:100%}.dropdown.is-disabled{opacity:.5;cursor:not-allowed}.dropdown.is-disabled .dropdown-trigger{pointer-events:none}.dropdown.is-inline .dropdown-menu{position:static;display:inline-block;padding:0}.dropdown.is-top-right .dropdown-menu{top:auto;bottom:100%}.dropdown.is-top-left .dropdown-menu{top:auto;bottom:100%;right:0;left:auto}.dropdown.is-bottom-left .dropdown-menu{right:0;left:auto}@media screen and (max-width:1087px){.dropdown.is-mobile-modal .dropdown-menu{position:fixed;width:calc(100vw - 40px);max-width:460px;max-height:calc(100vh - 120px);top:25%!important;left:50%!important;bottom:auto!important;right:auto!important;transform:translate3d(-50%,-25%,0);white-space:normal;overflow-y:auto}.dropdown.is-mobile-modal .dropdown-menu .dropdown-item,.dropdown.is-mobile-modal .dropdown-menu .has-link a{padding:1rem 1.5rem}}.label{font-weight:600}.field.is-grouped .field{flex-shrink:0}.field.is-grouped .field+.field{margin-left:.75rem}.field.is-grouped .field.is-expanded{flex-grow:1;flex-shrink:1}.field.has-addons .control:first-child .control .button,.field.has-addons .control:first-child .control .input,.field.has-addons .control:first-child .control .select select,.field.has-addons .control:first-child .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:first-child .control .taginput-container.is-focusable{border-bottom-left-radius:4px;border-top-left-radius:4px}.field.has-addons .control:last-child .control .button,.field.has-addons .control:last-child .control .input,.field.has-addons .control:last-child .control .select select,.field.has-addons .control:last-child .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:last-child .control .taginput-container.is-focusable{border-bottom-right-radius:4px;border-top-right-radius:4px}.field.has-addons .control .control .button,.field.has-addons .control .control .input,.field.has-addons .control .control .select select,.field.has-addons .control .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control .control .taginput-container.is-focusable{border-radius:0}.control .help.counter{float:right;margin-left:.5em}.control .icon.is-clickable{pointer-events:auto;cursor:pointer}.icon{cursor:inherit}.icon svg{background-color:transparent;fill:currentColor;stroke-width:0;stroke:currentColor;pointer-events:none;width:1.5rem;height:1.5rem}.loading-overlay{align-items:center;display:none;justify-content:center;overflow:hidden}.loading-overlay.is-active{display:flex}.loading-overlay.is-full-page{z-index:999;position:fixed}.loading-overlay.is-full-page .loading-icon:after{top:calc(50% - 2.5em);left:calc(50% - 2.5em);width:5em;height:5em}.loading-overlay .loading-background{background:#7f7f7f;background:hsla(0,0%,100%,.5)}.loading-overlay .loading-icon{position:relative}.loading-overlay .loading-icon:after{position:absolute;top:calc(50% - 1.5em);left:calc(50% - 1.5em);width:3em;height:3em;border-width:.25em}.message .media,.notification .media{padding-top:0;border:0}.notification>.delete{right:.5rem!important;top:.5rem!important}.modal .animation-content{margin:0 20px}.modal .animation-content .modal-card{margin:0}@media screen and (max-width:768px){.modal .animation-content{width:100%}}.notices{position:fixed;display:flex;top:0;bottom:0;left:0;right:0;padding:2em;overflow:hidden;z-index:1000;pointer-events:none}.notices .toast{display:inline-flex;animation-duration:.15s;margin:.5em 0;text-align:center;box-shadow:0 1px 4px rgba(0,0,0,.12),0 0 6px rgba(0,0,0,.04);border-radius:2em;padding:.75em 1.5em;pointer-events:auto;opacity:.92}.notices .toast.is-white{color:#0a0a0a;background:#fff}.notices .toast.is-black{color:#fff;background:#0a0a0a}.notices .toast.is-light{color:#363636;background:#f5f5f5}.notices .toast.is-dark{color:#f5f5f5;background:#363636}.notices .toast.is-primary{color:#fff;background:#00d1b2}.notices .toast.is-link{color:#fff;background:#3273dc}.notices .toast.is-info{color:#fff;background:#209cee}.notices .toast.is-success{color:#fff;background:#23d160}.notices .toast.is-warning{color:rgba(0,0,0,.7);background:#ffdd57}.notices .toast.is-danger{color:#fff;background:#ff3860}.notices .snackbar{display:inline-flex;align-items:center;justify-content:space-around;animation-duration:.15s;margin:.5em 0;box-shadow:0 1px 4px rgba(0,0,0,.12),0 0 6px rgba(0,0,0,.04);border-radius:4px;pointer-events:auto;background:#363636;color:#f5f5f5;min-height:3em}.notices .snackbar .text{padding:.5em 1em}.notices .snackbar .action{margin-left:auto;padding:.5em;padding-left:0}.notices .snackbar .action .button{font-weight:600;text-transform:uppercase}.notices .snackbar .action.is-white .button{color:#fff}.notices .snackbar .action.is-black .button{color:#0a0a0a}.notices .snackbar .action.is-light .button{color:#f5f5f5}.notices .snackbar .action.is-dark .button{color:#363636}.notices .snackbar .action.is-primary .button{color:#00d1b2}.notices .snackbar .action.is-link .button{color:#3273dc}.notices .snackbar .action.is-info .button{color:#209cee}.notices .snackbar .action.is-success .button{color:#23d160}.notices .snackbar .action.is-warning .button{color:#ffdd57}.notices .snackbar .action.is-danger .button{color:#ff3860}@media screen and (max-width:768px){.notices .snackbar{width:100%;margin:0;border-radius:0}}@media print,screen and (min-width:769px){.notices .snackbar{min-width:350px;max-width:600px;overflow:hidden}}.notices .snackbar.is-bottom,.notices .snackbar.is-top,.notices .toast.is-bottom,.notices .toast.is-top{align-self:center}.notices .snackbar.is-bottom-right,.notices .snackbar.is-top-right,.notices .toast.is-bottom-right,.notices .toast.is-top-right{align-self:flex-end}.notices .snackbar.is-bottom-left,.notices .snackbar.is-top-left,.notices .toast.is-bottom-left,.notices .toast.is-top-left{align-self:flex-start}.notices .snackbar.is-toast,.notices .toast.is-toast{opacity:.92}.notices.is-top{flex-direction:column}.notices.is-bottom{flex-direction:column-reverse}.notices.has-custom-container{position:absolute}@media screen and (max-width:768px){.notices{padding:0;position:fixed!important}}.pagination .pagination-next,.pagination .pagination-previous{padding-left:.25em;padding-right:.25em}.pagination .pagination-next.is-disabled,.pagination .pagination-previous.is-disabled{pointer-events:none;cursor:not-allowed;opacity:.5}.pagination.is-simple{justify-content:normal}.pagination .is-current{pointer-events:none;cursor:not-allowed}.panel .panel-heading.is-collapsible{cursor:pointer}.panel .panel-content{width:100%}.b-radio.radio{outline:none;display:inline-flex;align-items:center}.b-radio.radio+.radio{margin-left:.5em}.b-radio.radio input[type=radio]{position:absolute;left:0;opacity:0;outline:none;z-index:-1}.b-radio.radio input[type=radio]+.check{display:flex;align-items:center;justify-content:center;width:1.25em;height:1.25em;border:2px solid #7a7a7a;border-radius:50%;transition:background .15s ease-out}.b-radio.radio input[type=radio]+.check:before{content:\\\"\\\";border-radius:50%;width:.625em;height:.625em;background:#00d1b2;transform:scale(0);transition:transform .15s ease-out}.b-radio.radio input[type=radio]+.check.is-white:before{background:#fff}.b-radio.radio input[type=radio]+.check.is-black:before{background:#0a0a0a}.b-radio.radio input[type=radio]+.check.is-light:before{background:#f5f5f5}.b-radio.radio input[type=radio]+.check.is-dark:before{background:#363636}.b-radio.radio input[type=radio]+.check.is-primary:before{background:#00d1b2}.b-radio.radio input[type=radio]+.check.is-link:before{background:#3273dc}.b-radio.radio input[type=radio]+.check.is-info:before{background:#209cee}.b-radio.radio input[type=radio]+.check.is-success:before{background:#23d160}.b-radio.radio input[type=radio]+.check.is-warning:before{background:#ffdd57}.b-radio.radio input[type=radio]+.check.is-danger:before{background:#ff3860}.b-radio.radio input[type=radio]:checked+.check{border-color:#00d1b2}.b-radio.radio input[type=radio]:checked+.check.is-white{border-color:#fff}.b-radio.radio input[type=radio]:checked+.check.is-black{border-color:#0a0a0a}.b-radio.radio input[type=radio]:checked+.check.is-light{border-color:#f5f5f5}.b-radio.radio input[type=radio]:checked+.check.is-dark{border-color:#363636}.b-radio.radio input[type=radio]:checked+.check.is-primary{border-color:#00d1b2}.b-radio.radio input[type=radio]:checked+.check.is-link{border-color:#3273dc}.b-radio.radio input[type=radio]:checked+.check.is-info{border-color:#209cee}.b-radio.radio input[type=radio]:checked+.check.is-success{border-color:#23d160}.b-radio.radio input[type=radio]:checked+.check.is-warning{border-color:#ffdd57}.b-radio.radio input[type=radio]:checked+.check.is-danger{border-color:#ff3860}.b-radio.radio input[type=radio]:checked+.check:before{transform:scale(1)}.b-radio.radio .control-label{padding-left:.5em}.b-radio.radio[disabled]{opacity:.5}.b-radio.radio:hover input[type=radio]+.check{border-color:#00d1b2}.b-radio.radio:hover input[type=radio]+.check.is-white{border-color:#fff}.b-radio.radio:hover input[type=radio]+.check.is-black{border-color:#0a0a0a}.b-radio.radio:hover input[type=radio]+.check.is-light{border-color:#f5f5f5}.b-radio.radio:hover input[type=radio]+.check.is-dark{border-color:#363636}.b-radio.radio:hover input[type=radio]+.check.is-primary{border-color:#00d1b2}.b-radio.radio:hover input[type=radio]+.check.is-link{border-color:#3273dc}.b-radio.radio:hover input[type=radio]+.check.is-info{border-color:#209cee}.b-radio.radio:hover input[type=radio]+.check.is-success{border-color:#23d160}.b-radio.radio:hover input[type=radio]+.check.is-warning{border-color:#ffdd57}.b-radio.radio:hover input[type=radio]+.check.is-danger{border-color:#ff3860}.b-radio.radio:focus input[type=radio]+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-primary{box-shadow:0 0 .5em rgba(0,209,178,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-link{box-shadow:0 0 .5em rgba(50,115,220,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-info{box-shadow:0 0 .5em rgba(32,156,238,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.b-radio.radio.is-small{border-radius:2px;font-size:.75rem}.b-radio.radio.is-medium{font-size:1.25rem}.b-radio.radio.is-large{font-size:1.5rem}.select select{padding-right:2.5em}.select select option{color:#4a4a4a;padding:.25em .5em}.select select option:disabled{cursor:not-allowed;opacity:.5}.select select optgroup{color:#b5b5b5;font-weight:400;font-style:normal;padding:.25em 0}.select.is-empty select{color:hsla(0,0%,48%,.7)}.switch{cursor:pointer;display:inline-flex;align-items:center}.switch+.switch{margin-left:.5em}.switch input[type=checkbox]{display:none}.switch input[type=checkbox]+.check{display:flex;align-items:center;flex-shrink:0;width:2.75em;height:1.575em;padding:.2em;background:#b5b5b5;border-radius:1em;transition:background .15s ease-out}.switch input[type=checkbox]+.check:before{content:\\\"\\\";border-radius:1em;width:1.175em;height:1.175em;background:#f5f5f5;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);transition:transform .15s ease-out,width .15s ease-out;will-change:transform}.switch input[type=checkbox]+.check.is-elastic:before{width:1.75em}.switch input[type=checkbox]:checked+.check{background:#00d1b2}.switch input[type=checkbox]:checked+.check.is-white{background:#fff}.switch input[type=checkbox]:checked+.check.is-black{background:#0a0a0a}.switch input[type=checkbox]:checked+.check.is-light{background:#f5f5f5}.switch input[type=checkbox]:checked+.check.is-dark{background:#363636}.switch input[type=checkbox]:checked+.check.is-primary{background:#00d1b2}.switch input[type=checkbox]:checked+.check.is-link{background:#3273dc}.switch input[type=checkbox]:checked+.check.is-info{background:#209cee}.switch input[type=checkbox]:checked+.check.is-success{background:#23d160}.switch input[type=checkbox]:checked+.check.is-warning{background:#ffdd57}.switch input[type=checkbox]:checked+.check.is-danger{background:#ff3860}.switch input[type=checkbox]:checked+.check:before{transform:translate3d(100%,0,0)}.switch input[type=checkbox]:checked+.check.is-elastic:before{transform:translate3d(36.36364%,0,0)}.switch .control-label{padding-left:.5em}.switch:hover input[type=checkbox]+.check{background:hsla(0,0%,71%,.9)}.switch:hover input[type=checkbox]:checked+.check{background:rgba(0,209,178,.9)}.switch:hover input[type=checkbox]:checked+.check.is-white{background:hsla(0,0%,100%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-black{background:hsla(0,0%,4%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-light{background:hsla(0,0%,96%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-dark{background:rgba(54,54,54,.9)}.switch:hover input[type=checkbox]:checked+.check.is-primary{background:rgba(0,209,178,.9)}.switch:hover input[type=checkbox]:checked+.check.is-link{background:rgba(50,115,220,.9)}.switch:hover input[type=checkbox]:checked+.check.is-info{background:rgba(32,156,238,.9)}.switch:hover input[type=checkbox]:checked+.check.is-success{background:rgba(35,209,96,.9)}.switch:hover input[type=checkbox]:checked+.check.is-warning{background:rgba(255,221,87,.9)}.switch:hover input[type=checkbox]:checked+.check.is-danger{background:rgba(255,56,96,.9)}.switch:focus{outline:none}.switch:focus input[type=checkbox]+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.6)}.switch:focus input[type=checkbox]:checked+.check{box-shadow:0 0 .5em rgba(0,209,178,.8)}.switch:focus input[type=checkbox]:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.switch:focus input[type=checkbox]:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.switch:focus input[type=checkbox]:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.switch:focus input[type=checkbox]:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.switch:focus input[type=checkbox]:checked+.check.is-primary{box-shadow:0 0 .5em rgba(0,209,178,.8)}.switch:focus input[type=checkbox]:checked+.check.is-link{box-shadow:0 0 .5em rgba(50,115,220,.8)}.switch:focus input[type=checkbox]:checked+.check.is-info{box-shadow:0 0 .5em rgba(32,156,238,.8)}.switch:focus input[type=checkbox]:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.switch:focus input[type=checkbox]:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.switch:focus input[type=checkbox]:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.switch.is-small{border-radius:2px;font-size:.75rem}.switch.is-medium{font-size:1.25rem}.switch.is-large{font-size:1.5rem}.switch[disabled]{opacity:.5;cursor:not-allowed;color:#7a7a7a}.table-wrapper .table{margin-bottom:0}.table-wrapper:not(:last-child){margin-bottom:1.5rem}@media screen and (max-width:1087px){.table-wrapper{overflow-x:auto}}.b-table{transition:opacity 86ms ease-out}@media print,screen and (min-width:769px){.b-table .table-mobile-sort{display:none}}.b-table .icon{transition:transform .15s ease-out,opacity 86ms ease-out}.b-table .icon.is-desc{transform:rotate(180deg)}.b-table .icon.is-expanded{transform:rotate(90deg)}.b-table .table{width:100%;border:1px solid transparent;border-radius:4px;border-collapse:separate}.b-table .table th{font-weight:600}.b-table .table th .th-wrap{display:flex;align-items:center}.b-table .table th .th-wrap .icon{margin-left:.5rem;margin-right:0;font-size:1rem}.b-table .table th .th-wrap.is-numeric{flex-direction:row-reverse;text-align:right}.b-table .table th .th-wrap.is-numeric .icon{margin-left:0;margin-right:.5rem}.b-table .table th .th-wrap.is-centered{justify-content:center;text-align:center}.b-table .table th.is-current-sort{border-color:#7a7a7a;font-weight:700}.b-table .table th.is-sortable:hover{border-color:#7a7a7a}.b-table .table th.is-sortable,.b-table .table th.is-sortable .th-wrap{cursor:pointer}.b-table .table tr.is-selected .checkbox input:checked+.check{background:#fff url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%2300d1b2'/%3E%3C/svg%3E\\\") no-repeat 50%}.b-table .table tr.is-selected .checkbox input+.check{border-color:#fff}.b-table .table tr.is-empty:hover{background-color:transparent}.b-table .table .chevron-cell{vertical-align:middle}.b-table .table .checkbox-cell{width:40px}.b-table .table .checkbox-cell .checkbox{vertical-align:middle}.b-table .table .checkbox-cell .checkbox .check{transition:none}.b-table .table tr.detail{box-shadow:inset 0 1px 3px #dbdbdb;background:#fafafa}.b-table .table tr.detail .detail-container{padding:1rem}.b-table .table:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.b-table .table.is-bordered th.is-current-sort,.b-table .table.is-bordered th.is-sortable:hover{border-color:#dbdbdb;background:#f5f5f5}@media screen and (max-width:768px){.b-table .table.has-mobile-cards thead{display:none}.b-table .table.has-mobile-cards tfoot th{border:0;display:inherit}.b-table .table.has-mobile-cards tr{box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);max-width:100%;position:relative;display:block}.b-table .table.has-mobile-cards tr td{border:0;display:inherit}.b-table .table.has-mobile-cards tr td:last-child{border-bottom:0}.b-table .table.has-mobile-cards tr:not(:last-child){margin-bottom:1rem}.b-table .table.has-mobile-cards tr:not([class*=is-]){background:inherit}.b-table .table.has-mobile-cards tr:not([class*=is-]):hover{background-color:inherit}.b-table .table.has-mobile-cards tr.detail{margin-top:-1rem}.b-table .table.has-mobile-cards tr:not(.detail):not(.is-empty):not(.table-footer) td{display:flex;width:auto;justify-content:space-between;text-align:right;border-bottom:1px solid #f5f5f5}.b-table .table.has-mobile-cards tr:not(.detail):not(.is-empty):not(.table-footer) td:before{content:attr(data-label);font-weight:600;padding-right:.5em;text-align:left}}.b-table .level{padding-bottom:1.5rem}.b-table.is-loading{position:relative;pointer-events:none;opacity:.5}.b-table.is-loading:after{position:absolute;top:4em;left:calc(50% - 2.5em);width:5em;height:5em;border-width:.25em}.b-tabs .tabs{margin-bottom:0;flex-shrink:0}.b-tabs .is-disabled{pointer-events:none;cursor:not-allowed;opacity:.5}.b-tabs .tab-content{position:relative;overflow:hidden;display:flex;flex-direction:column;padding:1rem}.b-tabs .tab-content .tab-item{flex-shrink:0;flex-basis:auto}.b-tabs:not(:last-child){margin-bottom:1.5rem}.b-tabs.is-fullwidth{width:100%}.tag .has-ellipsis{max-width:10em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.taginput .taginput-container.is-focusable{padding-bottom:0;padding-top:calc(.275em - 1px);align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start;height:auto;cursor:text}.taginput .taginput-container>.tag,.taginput .taginput-container>.tags{margin-bottom:calc(.275em - 1px);font-size:.9em;height:1.7em}.taginput .taginput-container>.tag .tag,.taginput .taginput-container>.tags .tag{margin-bottom:0;font-size:.9em;height:1.7em}.taginput .taginput-container>.tag:not(:last-child),.taginput .taginput-container>.tags:not(:last-child){margin-right:.275rem}.taginput .taginput-container .autocomplete{flex:1}.taginput .taginput-container .autocomplete input{height:1.7em;margin-bottom:calc(.275em - 1px);padding-top:0;padding-bottom:0;border:none;box-shadow:none;min-width:8em}.taginput .taginput-container .autocomplete input:focus{box-shadow:none!important}.taginput .taginput-container .autocomplete .icon{height:1.7em}.taginput .taginput-container .autocomplete>.control.is-loading:after{top:.375em}.timepicker .dropdown,.timepicker .dropdown-trigger{width:100%}.dropdown .dropdown-menu .has-link .timepicker a,.timepicker .dropdown-item,.timepicker .dropdown .dropdown-menu .has-link a{font-size:inherit}.timepicker .timepicker-footer{padding-top:.875rem}.timepicker .control .select{font-size:2.5rem}.timepicker .control .select select{font-weight:600;padding-right:calc(.625em - 1px)}.timepicker .control .select select option{font-size:1.5rem}.timepicker .control .select select option:disabled{color:hsla(0,0%,48%,.7)}.timepicker .control .select:after{display:none}.timepicker .control:first-child .select select{border-right:none}.timepicker .control:first-child .select:before{content:\\\":\\\";color:#b5b5b5;display:inline-block;position:absolute;z-index:6;font-size:3rem;right:-.325rem;top:.25rem}.timepicker .control:nth-child(2) .select select{border-left:none}.timepicker.is-small{border-radius:2px;font-size:.75rem}.timepicker.is-medium{font-size:1.25rem}.timepicker.is-large{font-size:1.5rem}.tooltip{position:relative;display:inline-flex}.tooltip.is-top:after,.tooltip.is-top:before{top:auto;right:auto;bottom:calc(100% + 5px + 2px);left:50%;transform:translateX(-50%)}.tooltip.is-top.is-white:before{border-top:5px solid #fff}.tooltip.is-top.is-black:before,.tooltip.is-top.is-white:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-black:before{border-top:5px solid #0a0a0a}.tooltip.is-top.is-light:before{border-top:5px solid #f5f5f5}.tooltip.is-top.is-dark:before,.tooltip.is-top.is-light:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-dark:before{border-top:5px solid #363636}.tooltip.is-top.is-primary:before{border-top:5px solid #00d1b2}.tooltip.is-top.is-link:before,.tooltip.is-top.is-primary:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-link:before{border-top:5px solid #3273dc}.tooltip.is-top.is-info:before{border-top:5px solid #209cee}.tooltip.is-top.is-info:before,.tooltip.is-top.is-success:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-success:before{border-top:5px solid #23d160}.tooltip.is-top.is-warning:before{border-top:5px solid #ffdd57}.tooltip.is-top.is-danger:before,.tooltip.is-top.is-warning:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.tooltip.is-top.is-danger:before{border-top:5px solid #ff3860}.tooltip.is-top.is-multiline.is-small:after{width:180px}.tooltip.is-top.is-multiline.is-medium:after{width:240px}.tooltip.is-top.is-multiline.is-large:after{width:300px}.tooltip.is-right:after,.tooltip.is-right:before{top:50%;right:auto;bottom:auto;left:calc(100% + 5px + 2px);transform:translateY(-50%)}.tooltip.is-right.is-white:before{border-right:5px solid #fff}.tooltip.is-right.is-black:before,.tooltip.is-right.is-white:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-black:before{border-right:5px solid #0a0a0a}.tooltip.is-right.is-light:before{border-right:5px solid #f5f5f5}.tooltip.is-right.is-dark:before,.tooltip.is-right.is-light:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-dark:before{border-right:5px solid #363636}.tooltip.is-right.is-primary:before{border-right:5px solid #00d1b2}.tooltip.is-right.is-link:before,.tooltip.is-right.is-primary:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-link:before{border-right:5px solid #3273dc}.tooltip.is-right.is-info:before{border-right:5px solid #209cee}.tooltip.is-right.is-info:before,.tooltip.is-right.is-success:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-success:before{border-right:5px solid #23d160}.tooltip.is-right.is-warning:before{border-right:5px solid #ffdd57}.tooltip.is-right.is-danger:before,.tooltip.is-right.is-warning:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.tooltip.is-right.is-danger:before{border-right:5px solid #ff3860}.tooltip.is-right.is-multiline.is-small:after{width:180px}.tooltip.is-right.is-multiline.is-medium:after{width:240px}.tooltip.is-right.is-multiline.is-large:after{width:300px}.tooltip.is-bottom:after,.tooltip.is-bottom:before{top:calc(100% + 5px + 2px);right:auto;bottom:auto;left:50%;transform:translateX(-50%)}.tooltip.is-bottom.is-white:before{border-bottom:5px solid #fff}.tooltip.is-bottom.is-black:before,.tooltip.is-bottom.is-white:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-black:before{border-bottom:5px solid #0a0a0a}.tooltip.is-bottom.is-light:before{border-bottom:5px solid #f5f5f5}.tooltip.is-bottom.is-dark:before,.tooltip.is-bottom.is-light:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-dark:before{border-bottom:5px solid #363636}.tooltip.is-bottom.is-primary:before{border-bottom:5px solid #00d1b2}.tooltip.is-bottom.is-link:before,.tooltip.is-bottom.is-primary:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-link:before{border-bottom:5px solid #3273dc}.tooltip.is-bottom.is-info:before{border-bottom:5px solid #209cee}.tooltip.is-bottom.is-info:before,.tooltip.is-bottom.is-success:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-success:before{border-bottom:5px solid #23d160}.tooltip.is-bottom.is-warning:before{border-bottom:5px solid #ffdd57}.tooltip.is-bottom.is-danger:before,.tooltip.is-bottom.is-warning:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.tooltip.is-bottom.is-danger:before{border-bottom:5px solid #ff3860}.tooltip.is-bottom.is-multiline.is-small:after{width:180px}.tooltip.is-bottom.is-multiline.is-medium:after{width:240px}.tooltip.is-bottom.is-multiline.is-large:after{width:300px}.tooltip.is-left:after,.tooltip.is-left:before{top:50%;right:calc(100% + 5px + 2px);bottom:auto;left:auto;transform:translateY(-50%)}.tooltip.is-left.is-white:before{border-left:5px solid #fff}.tooltip.is-left.is-black:before,.tooltip.is-left.is-white:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-black:before{border-left:5px solid #0a0a0a}.tooltip.is-left.is-light:before{border-left:5px solid #f5f5f5}.tooltip.is-left.is-dark:before,.tooltip.is-left.is-light:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-dark:before{border-left:5px solid #363636}.tooltip.is-left.is-primary:before{border-left:5px solid #00d1b2}.tooltip.is-left.is-link:before,.tooltip.is-left.is-primary:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-link:before{border-left:5px solid #3273dc}.tooltip.is-left.is-info:before{border-left:5px solid #209cee}.tooltip.is-left.is-info:before,.tooltip.is-left.is-success:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-success:before{border-left:5px solid #23d160}.tooltip.is-left.is-warning:before{border-left:5px solid #ffdd57}.tooltip.is-left.is-danger:before,.tooltip.is-left.is-warning:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.tooltip.is-left.is-danger:before{border-left:5px solid #ff3860}.tooltip.is-left.is-multiline.is-small:after{width:180px}.tooltip.is-left.is-multiline.is-medium:after{width:240px}.tooltip.is-left.is-multiline.is-large:after{width:300px}.tooltip:after,.tooltip:before{position:absolute;content:\\\"\\\";opacity:0;visibility:hidden;pointer-events:none}.tooltip:before{z-index:889}.tooltip:after{content:attr(data-label);width:auto;padding:.35rem .75rem;border-radius:6px;font-size:.85rem;font-weight:400;box-shadow:0 1px 2px 1px rgba(0,1,0,.2);z-index:888;white-space:nowrap}.tooltip:not([data-label=\\\"\\\"]):hover:after,.tooltip:not([data-label=\\\"\\\"]):hover:before{opacity:1;visibility:visible}.tooltip.is-white:after{background:#fff;color:#0a0a0a}.tooltip.is-black:after{background:#0a0a0a;color:#fff}.tooltip.is-light:after{background:#f5f5f5;color:#363636}.tooltip.is-dark:after{background:#363636;color:#f5f5f5}.tooltip.is-primary:after{background:#00d1b2;color:#fff}.tooltip.is-link:after{background:#3273dc;color:#fff}.tooltip.is-info:after{background:#209cee;color:#fff}.tooltip.is-success:after{background:#23d160;color:#fff}.tooltip.is-warning:after{background:#ffdd57;color:rgba(0,0,0,.7)}.tooltip.is-danger:after{background:#ff3860;color:#fff}.tooltip:not([data-label=\\\"\\\"]).is-always:after,.tooltip:not([data-label=\\\"\\\"]).is-always:before{opacity:1;visibility:visible}.tooltip.is-multiline:after{display:flex-block;text-align:center;white-space:normal}.tooltip.is-dashed{border-bottom:1px dashed #b5b5b5;cursor:default}.tooltip.is-square:after{border-radius:0}.tooltip.is-animated:after,.tooltip.is-animated:before{transition:opacity 86ms ease-out,visibility 86ms ease-out}.upload{position:relative}.upload input[type=file]{position:absolute;top:0;left:0;width:100%;opacity:0;outline:none;z-index:-1}.upload .upload-draggable{display:inline-block;cursor:pointer;padding:.25em;border:1px dashed #b5b5b5;border-radius:6px}.upload .upload-draggable.is-disabled{opacity:.5;cursor:not-allowed}.upload .upload-draggable.is-loading{position:relative;pointer-events:none;opacity:.5}.upload .upload-draggable.is-loading:after{top:0;left:calc(50% - 1.5em);width:3em;height:3em;border-width:.25em}.upload .upload-draggable.is-hovered.is-white,.upload .upload-draggable:hover.is-white{border-color:#fff;background:hsla(0,0%,100%,.05)}.upload .upload-draggable.is-hovered.is-black,.upload .upload-draggable:hover.is-black{border-color:#0a0a0a;background:hsla(0,0%,4%,.05)}.upload .upload-draggable.is-hovered.is-light,.upload .upload-draggable:hover.is-light{border-color:#f5f5f5;background:hsla(0,0%,96%,.05)}.upload .upload-draggable.is-hovered.is-dark,.upload .upload-draggable:hover.is-dark{border-color:#363636;background:rgba(54,54,54,.05)}.upload .upload-draggable.is-hovered.is-primary,.upload .upload-draggable:hover.is-primary{border-color:#00d1b2;background:rgba(0,209,178,.05)}.upload .upload-draggable.is-hovered.is-link,.upload .upload-draggable:hover.is-link{border-color:#3273dc;background:rgba(50,115,220,.05)}.upload .upload-draggable.is-hovered.is-info,.upload .upload-draggable:hover.is-info{border-color:#209cee;background:rgba(32,156,238,.05)}.upload .upload-draggable.is-hovered.is-success,.upload .upload-draggable:hover.is-success{border-color:#23d160;background:rgba(35,209,96,.05)}.upload .upload-draggable.is-hovered.is-warning,.upload .upload-draggable:hover.is-warning{border-color:#ffdd57;background:rgba(255,221,87,.05)}.upload .upload-draggable.is-hovered.is-danger,.upload .upload-draggable:hover.is-danger{border-color:#ff3860;background:rgba(255,56,96,.05)}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./node_modules/buefy/dist/buefy.css\n// module id = 22\n// module chunks = 0","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nmodule.exports = function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader/lib/listToStyles.js\n// module id = 23\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../css-loader/index.js!./styles.css\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../vue-style-loader/lib/addStylesClient.js\")(\"bf15a564\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-material-design-icons/styles.css\n// module id = 24\n// module chunks = 0","exports = module.exports = require(\"../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".material-design-icon{display:inline-flex;align-self:center;position:relative;height:1em;width:1em;>.material-design-icon__svg{height:1em;width:1em;fill:currentColor;position:absolute;bottom:-.125em}}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./node_modules/vue-material-design-icons/styles.css\n// module id = 25\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!vue-style-loader!css-loader?minimize!../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-3e910c9a\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../node_modules/vue-loader/lib/selector?type=styles&index=0!./App.vue\")\n}\nvar normalizeComponent = require(\"!../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\nimport __vue_script__ from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\n/* template */\nimport __vue_template__ from \"!!../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-3e910c9a\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../node_modules/vue-loader/lib/selector?type=template&index=0!./App.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/App.vue\n// module id = 26\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../node_modules/css-loader/index.js?minimize!../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-3e910c9a\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./App.vue\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../node_modules/vue-style-loader/lib/addStylesClient.js\")(\"0abd6ea6\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-3e910c9a\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue\n// module id = 27\n// module chunks = 0","exports = module.exports = require(\"../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-3e910c9a\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue\n// module id = 28\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!vue-style-loader!css-loader?minimize!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-657ba0aa\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./NavBar.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./NavBar.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./NavBar.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-657ba0aa\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./NavBar.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/NavBar.vue\n// module id = 29\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/index.js?minimize!../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-657ba0aa\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./NavBar.vue\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\")(\"432a0e31\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-657ba0aa\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/NavBar.vue\n// module id = 30\n// module chunks = 0","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-657ba0aa\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/NavBar.vue\n// module id = 31\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:\"navbar has-shadow\"},[_vm._m(0),_vm._v(\" \"),_c('div',{staticClass:\"navbar-menu\"},[_c('div',{staticClass:\"navbar-start\"}),_vm._v(\" \"),_c('div',{staticClass:\"navbar-end\"},[_c('div',{staticClass:\"navbar-item\"},[_c('p',{staticClass:\"control\"},[(_vm.isConnected)?_c('button',{staticClass:\"button is-danger\",on:{\"click\":_vm.disconnect}},[_vm._v(\"Disconnect\")]):_c('button',{staticClass:\"button is-success\",on:{\"click\":_vm.connect}},[_vm._v(\"Connect\")])])])])])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"navbar-brand\"},[_c('a',{staticClass:\"navbar-item\",attrs:{\"href\":\"#\"}},[_vm._v(\"WebRender Debugger\")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-657ba0aa\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/NavBar.vue\n// module id = 32\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!vue-style-loader!css-loader?minimize!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-e621d982\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./NavMenu.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./NavMenu.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./NavMenu.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-e621d982\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./NavMenu.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/NavMenu.vue\n// module id = 33\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/index.js?minimize!../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-e621d982\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./NavMenu.vue\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\")(\"e4edc9ba\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-e621d982\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/NavMenu.vue\n// module id = 34\n// module chunks = 0","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-e621d982\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/NavMenu.vue\n// module id = 35\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('aside',{staticClass:\"menu\"},[_c('p',{staticClass:\"menu-label\"},[_vm._v(\"\\n Pages\\n \")]),_vm._v(\" \"),_c('ul',{staticClass:\"menu-list\"},[_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'options' },on:{\"click\":function($event){return _vm.setPage('options')}}},[_vm._v(\"Debug Options\")])]),_vm._v(\" \"),_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'passes' },on:{\"click\":function($event){return _vm.setPage('passes')}}},[_vm._v(\"Passes\")])]),_vm._v(\" \"),_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'render_tasks' },on:{\"click\":function($event){return _vm.setPage('render_tasks')}}},[_vm._v(\"Render Tasks\")])]),_vm._v(\" \"),_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'documents' },on:{\"click\":function($event){return _vm.setPage('documents')}}},[_vm._v(\"Documents\")])]),_vm._v(\" \"),_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'clip_scroll_tree' },on:{\"click\":function($event){return _vm.setPage('clip_scroll_tree')}}},[_vm._v(\"Clip-Scroll Tree\")])]),_vm._v(\" \"),_c('li',[_c('a',{class:{ 'is-active': _vm.page == 'screenshot' },on:{\"click\":function($event){return _vm.setPage('screenshot')}}},[_vm._v(\"Screenshot\")])])])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-e621d982\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/NavMenu.vue\n// module id = 36\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!vue-style-loader!css-loader?minimize!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-61a8a336\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./OptionsPage.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./OptionsPage.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./OptionsPage.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-61a8a336\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./OptionsPage.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/OptionsPage.vue\n// module id = 37\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/index.js?minimize!../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-61a8a336\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./OptionsPage.vue\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\")(\"0e6ffcbb\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-61a8a336\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/OptionsPage.vue\n// module id = 38\n// module chunks = 0","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-61a8a336\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/OptionsPage.vue\n// module id = 39\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setProfiler($event.target.checked)}}}),_vm._v(\"\\n Profiler\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setTextureCacheDebugger($event.target.checked)}}}),_vm._v(\"\\n Texture cache debugger\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setRenderTargetDebugger($event.target.checked)}}}),_vm._v(\"\\n Render target debugger\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setAlphaRectsDebugger($event.target.checked)}}}),_vm._v(\"\\n Alpha primitive rects debugger\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setGpuTimeQueries($event.target.checked)}}}),_vm._v(\"\\n Enable GPU time queries\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setGpuSampleQueries($event.target.checked)}}}),_vm._v(\"\\n Enable GPU sample queries\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setOpaquePass(!$event.target.checked)}}}),_vm._v(\"\\n Disable opaque pass\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setAlphaPass(!$event.target.checked)}}}),_vm._v(\"\\n Disable alpha pass\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setClipMasks(!$event.target.checked)}}}),_vm._v(\"\\n Disable clip masks\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setTextPrims(!$event.target.checked)}}}),_vm._v(\"\\n Disable text primitives\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"field\"},[_c('label',{staticClass:\"checkbox\"},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},on:{\"click\":function($event){return _vm.setGradientPrims(!$event.target.checked)}}}),_vm._v(\"\\n Disable gradient primitives\\n \")])])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-61a8a336\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/OptionsPage.vue\n// module id = 40\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!vue-style-loader!css-loader?minimize!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-329e01f6\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./PassViewPage.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./PassViewPage.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./PassViewPage.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-329e01f6\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./PassViewPage.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/PassViewPage.vue\n// module id = 41\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/index.js?minimize!../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-329e01f6\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./PassViewPage.vue\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\")(\"05673d18\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-329e01f6\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/PassViewPage.vue\n// module id = 42\n// module chunks = 0","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-329e01f6\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/PassViewPage.vue\n// module id = 43\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Passes \"),_c('a',{staticClass:\"button is-info\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.fetch}},[_vm._v(\"Refresh\")])]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_vm._l((_vm.passes),function(pass,pass_index){return _c('div',[_c('p',{staticClass:\"has-text-black-bis\"},[_vm._v(\"Pass \"+_vm._s(pass_index))]),_vm._v(\" \"),_vm._l((pass.targets),function(target,target_index){return _c('div',[_c('p',{staticClass:\"has-text-grey-dark\",staticStyle:{\"text-indent\":\"2em\"}},[_vm._v(\"Target \"+_vm._s(target_index)+\" (\"+_vm._s(target.kind)+\")\")]),_vm._v(\" \"),_vm._l((target.batches),function(batch,batch_index){return _c('div',[_c('p',{staticClass:\"has-text-grey\",staticStyle:{\"text-indent\":\"4em\"}},[_vm._v(\"Batch \"+_vm._s(batch_index)+\" (\"+_vm._s(batch.description)+\", \"+_vm._s(batch.kind)+\", \"+_vm._s(batch.count)+\" instances)\")])])})],2)}),_vm._v(\" \"),_c('hr')],2)})],2)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-329e01f6\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/PassViewPage.vue\n// module id = 44\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!vue-style-loader!css-loader?minimize!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-49dfebc9\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./RenderTaskViewPage.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./RenderTaskViewPage.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./RenderTaskViewPage.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-49dfebc9\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./RenderTaskViewPage.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/RenderTaskViewPage.vue\n// module id = 45\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/index.js?minimize!../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-49dfebc9\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./RenderTaskViewPage.vue\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\")(\"0d80f44e\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-49dfebc9\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/RenderTaskViewPage.vue\n// module id = 46\n// module chunks = 0","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-49dfebc9\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/RenderTaskViewPage.vue\n// module id = 47\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/index.js?minimize!../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-44998ed8\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./TreeView.vue\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\")(\"77142b62\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-44998ed8\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/TreeView.vue\n// module id = 48\n// module chunks = 0","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-44998ed8\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/TreeView.vue\n// module id = 49\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',[_c('div',{on:{\"click\":_vm.toggle}},[(_vm.isFolder)?_c('span',[_vm._v(\"[\"+_vm._s(_vm.open ? '-' : '+')+\"]\")]):_vm._e(),_vm._v(\"\\n \"+_vm._s(_vm.model.description)+\"\\n \")]),_vm._v(\" \"),(_vm.isFolder)?_c('ul',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.open),expression:\"open\"}],staticStyle:{\"padding-left\":\"1em\",\"line-height\":\"1.5em\"}},_vm._l((_vm.model.children),function(model){return _c('treeview',{attrs:{\"model\":model}})}),1):_vm._e()])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-44998ed8\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/TreeView.vue\n// module id = 50\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Render Tasks \"),_c('a',{staticClass:\"button is-info\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.fetch}},[_vm._v(\"Refresh\")])]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('div',[_c('ul',[_c('app-treeview',{attrs:{\"model\":_vm.render_tasks}})],1)])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-49dfebc9\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/RenderTaskViewPage.vue\n// module id = 51\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!vue-style-loader!css-loader?minimize!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-1b68865d\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./DocumentViewPage.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./DocumentViewPage.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./DocumentViewPage.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-1b68865d\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./DocumentViewPage.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/DocumentViewPage.vue\n// module id = 52\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/index.js?minimize!../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-1b68865d\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./DocumentViewPage.vue\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\")(\"7b986bc8\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-1b68865d\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/DocumentViewPage.vue\n// module id = 53\n// module chunks = 0","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-1b68865d\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/DocumentViewPage.vue\n// module id = 54\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Documents \"),_c('a',{staticClass:\"button is-info\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.fetch}},[_vm._v(\"Refresh\")])]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('div',[_c('ul',[_c('app-treeview',{attrs:{\"model\":_vm.documents}})],1)])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-1b68865d\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/DocumentViewPage.vue\n// module id = 55\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!vue-style-loader!css-loader?minimize!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-31f0a1d9\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./ClipScrollTreeViewPage.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./ClipScrollTreeViewPage.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./ClipScrollTreeViewPage.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-31f0a1d9\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./ClipScrollTreeViewPage.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/ClipScrollTreeViewPage.vue\n// module id = 56\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/index.js?minimize!../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-31f0a1d9\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./ClipScrollTreeViewPage.vue\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\")(\"3d63fa5b\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-31f0a1d9\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/ClipScrollTreeViewPage.vue\n// module id = 57\n// module chunks = 0","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-31f0a1d9\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/ClipScrollTreeViewPage.vue\n// module id = 58\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Clip-Scroll Tree \"),_c('a',{staticClass:\"button is-info\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.fetch}},[_vm._v(\"Refresh\")])]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('div',[_c('ul',[_c('app-treeview',{attrs:{\"model\":_vm.clip_scroll_tree}})],1)])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-31f0a1d9\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/ClipScrollTreeViewPage.vue\n// module id = 59\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!vue-style-loader!css-loader?minimize!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-29affa2a\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./ScreenshotPage.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./ScreenshotPage.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./ScreenshotPage.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-29affa2a\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./ScreenshotPage.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/ScreenshotPage.vue\n// module id = 60\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/index.js?minimize!../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-29affa2a\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./ScreenshotPage.vue\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\")(\"3900c1de\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-29affa2a\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/ScreenshotPage.vue\n// module id = 61\n// module chunks = 0","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-29affa2a\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/ScreenshotPage.vue\n// module id = 62\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"box\"},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Screenshot \"),_c('a',{staticClass:\"button is-info\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.fetch}},[_vm._v(\"Refresh\")])]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('div',[_c('ul',[(_vm.screenshot.length > 0)?_c('img',{staticStyle:{\"transform\":\"scaleY(-1)\",\"width\":\"1024px\",\"height\":\"768px\"},attrs:{\"src\":'data:image/png;base64,' + _vm.screenshot}}):_vm._e()])])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-29affa2a\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/ScreenshotPage.vue\n// module id = 63\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('app-navbar'),_vm._v(\" \"),_c('div',{staticClass:\"section\"},[_c('div',{staticClass:\"container\"},[_c('div',{staticClass:\"columns\"},[_c('div',{staticClass:\"column is-3\"},[_c('app-navmenu')],1),_vm._v(\" \"),_c('div',{staticClass:\"column\"},[(_vm.page == 'options')?_c('app-options'):_vm._e(),_vm._v(\" \"),(_vm.page == 'passes')?_c('app-passview'):_vm._e(),_vm._v(\" \"),(_vm.page == 'render_tasks')?_c('app-rendertaskview'):_vm._e(),_vm._v(\" \"),(_vm.page == 'documents')?_c('app-documentview'):_vm._e(),_vm._v(\" \"),(_vm.page == 'clip_scroll_tree')?_c('app-clipscrolltreeview'):_vm._e(),_vm._v(\" \"),(_vm.page == 'screenshot')?_c('app-screenshotview'):_vm._e()],1)])])])],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-3e910c9a\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/App.vue\n// module id = 64\n// module chunks = 0","import Vue from 'vue'\nimport Vuex from 'vuex'\n\nVue.use(Vuex)\n\nclass Connection {\n constructor() {\n this.ws = null;\n }\n\n connect(context) {\n var ws = new WebSocket(\"ws://127.0.0.1:3583\");\n\n ws.onopen = function() {\n context.commit('setConnected', true);\n }\n\n ws.onmessage = function(evt) {\n var json = JSON.parse(evt.data);\n if (json['kind'] == \"passes\") {\n context.commit('setPasses', json['passes']);\n } else if (json['kind'] == \"render_tasks\") {\n context.commit('setRenderTasks', json['root']);\n } else if (json['kind'] == \"documents\") {\n context.commit('setDocuments', json['root']);\n } else if (json['kind'] == \"clip_scroll_tree\") {\n context.commit('setClipScrollTree', json['root']);\n } else if (json['kind'] == \"screenshot\") {\n context.commit('setScreenshot', json['data']);\n } else {\n console.warn(\"unknown message kind: \" + json['kind']);\n }\n }\n\n ws.onclose = function() {\n context.commit('setConnected', false);\n }\n\n this.ws = ws;\n }\n\n send(msg) {\n if (this.ws !== null) {\n this.ws.send(msg);\n }\n }\n\n disconnect() {\n if (this.ws !== null) {\n this.ws.close();\n this.ws = null;\n }\n }\n}\n\nvar connection = new Connection();\n\nconst store = new Vuex.Store({\n strict: true,\n state: {\n connected: false,\n page: 'options',\n passes: [],\n render_tasks: [],\n documents: [],\n clip_scroll_tree: [],\n screenshot: [],\n },\n mutations: {\n setConnected(state, connected) {\n state.connected = connected;\n },\n setPage(state, name) {\n state.page = name;\n },\n setPasses(state, passes) {\n state.passes = passes;\n },\n setRenderTasks(state, render_tasks) {\n state.render_tasks = render_tasks;\n },\n setDocuments(state, documents) {\n state.documents = documents;\n },\n setClipScrollTree(state, clip_scroll_tree) {\n state.clip_scroll_tree = clip_scroll_tree;\n },\n setScreenshot(state, screenshot) {\n state.screenshot = screenshot;\n },\n },\n actions: {\n connect(context) {\n connection.connect(context);\n },\n disconnect(context) {\n connection.disconnect();\n },\n sendMessage(context, msg) {\n connection.send(msg);\n }\n }\n});\n\nexport default store;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/index.js","/**\n * vuex v3.1.0\n * (c) 2019 Evan You\n * @license MIT\n */\nfunction applyMixin (Vue) {\n var version = Number(Vue.version.split('.')[0]);\n\n if (version >= 2) {\n Vue.mixin({ beforeCreate: vuexInit });\n } else {\n // override init and inject vuex init procedure\n // for 1.x backwards compatibility.\n var _init = Vue.prototype._init;\n Vue.prototype._init = function (options) {\n if ( options === void 0 ) options = {};\n\n options.init = options.init\n ? [vuexInit].concat(options.init)\n : vuexInit;\n _init.call(this, options);\n };\n }\n\n /**\n * Vuex init hook, injected into each instances init hooks list.\n */\n\n function vuexInit () {\n var options = this.$options;\n // store injection\n if (options.store) {\n this.$store = typeof options.store === 'function'\n ? options.store()\n : options.store;\n } else if (options.parent && options.parent.$store) {\n this.$store = options.parent.$store;\n }\n }\n}\n\nvar devtoolHook =\n typeof window !== 'undefined' &&\n window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\nfunction devtoolPlugin (store) {\n if (!devtoolHook) { return }\n\n store._devtoolHook = devtoolHook;\n\n devtoolHook.emit('vuex:init', store);\n\n devtoolHook.on('vuex:travel-to-state', function (targetState) {\n store.replaceState(targetState);\n });\n\n store.subscribe(function (mutation, state) {\n devtoolHook.emit('vuex:mutation', mutation, state);\n });\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\n\n/**\n * forEach for object\n */\nfunction forEachValue (obj, fn) {\n Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });\n}\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isPromise (val) {\n return val && typeof val.then === 'function'\n}\n\nfunction assert (condition, msg) {\n if (!condition) { throw new Error((\"[vuex] \" + msg)) }\n}\n\n// Base data struct for store's module, package with some attribute and method\nvar Module = function Module (rawModule, runtime) {\n this.runtime = runtime;\n // Store some children item\n this._children = Object.create(null);\n // Store the origin module object which passed by programmer\n this._rawModule = rawModule;\n var rawState = rawModule.state;\n\n // Store the origin module's state\n this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};\n};\n\nvar prototypeAccessors = { namespaced: { configurable: true } };\n\nprototypeAccessors.namespaced.get = function () {\n return !!this._rawModule.namespaced\n};\n\nModule.prototype.addChild = function addChild (key, module) {\n this._children[key] = module;\n};\n\nModule.prototype.removeChild = function removeChild (key) {\n delete this._children[key];\n};\n\nModule.prototype.getChild = function getChild (key) {\n return this._children[key]\n};\n\nModule.prototype.update = function update (rawModule) {\n this._rawModule.namespaced = rawModule.namespaced;\n if (rawModule.actions) {\n this._rawModule.actions = rawModule.actions;\n }\n if (rawModule.mutations) {\n this._rawModule.mutations = rawModule.mutations;\n }\n if (rawModule.getters) {\n this._rawModule.getters = rawModule.getters;\n }\n};\n\nModule.prototype.forEachChild = function forEachChild (fn) {\n forEachValue(this._children, fn);\n};\n\nModule.prototype.forEachGetter = function forEachGetter (fn) {\n if (this._rawModule.getters) {\n forEachValue(this._rawModule.getters, fn);\n }\n};\n\nModule.prototype.forEachAction = function forEachAction (fn) {\n if (this._rawModule.actions) {\n forEachValue(this._rawModule.actions, fn);\n }\n};\n\nModule.prototype.forEachMutation = function forEachMutation (fn) {\n if (this._rawModule.mutations) {\n forEachValue(this._rawModule.mutations, fn);\n }\n};\n\nObject.defineProperties( Module.prototype, prototypeAccessors );\n\nvar ModuleCollection = function ModuleCollection (rawRootModule) {\n // register root module (Vuex.Store options)\n this.register([], rawRootModule, false);\n};\n\nModuleCollection.prototype.get = function get (path) {\n return path.reduce(function (module, key) {\n return module.getChild(key)\n }, this.root)\n};\n\nModuleCollection.prototype.getNamespace = function getNamespace (path) {\n var module = this.root;\n return path.reduce(function (namespace, key) {\n module = module.getChild(key);\n return namespace + (module.namespaced ? key + '/' : '')\n }, '')\n};\n\nModuleCollection.prototype.update = function update$1 (rawRootModule) {\n update([], this.root, rawRootModule);\n};\n\nModuleCollection.prototype.register = function register (path, rawModule, runtime) {\n var this$1 = this;\n if ( runtime === void 0 ) runtime = true;\n\n if (process.env.NODE_ENV !== 'production') {\n assertRawModule(path, rawModule);\n }\n\n var newModule = new Module(rawModule, runtime);\n if (path.length === 0) {\n this.root = newModule;\n } else {\n var parent = this.get(path.slice(0, -1));\n parent.addChild(path[path.length - 1], newModule);\n }\n\n // register nested modules\n if (rawModule.modules) {\n forEachValue(rawModule.modules, function (rawChildModule, key) {\n this$1.register(path.concat(key), rawChildModule, runtime);\n });\n }\n};\n\nModuleCollection.prototype.unregister = function unregister (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n if (!parent.getChild(key).runtime) { return }\n\n parent.removeChild(key);\n};\n\nfunction update (path, targetModule, newModule) {\n if (process.env.NODE_ENV !== 'production') {\n assertRawModule(path, newModule);\n }\n\n // update target module\n targetModule.update(newModule);\n\n // update nested modules\n if (newModule.modules) {\n for (var key in newModule.modules) {\n if (!targetModule.getChild(key)) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n \"[vuex] trying to add a new module '\" + key + \"' on hot reloading, \" +\n 'manual reload is needed'\n );\n }\n return\n }\n update(\n path.concat(key),\n targetModule.getChild(key),\n newModule.modules[key]\n );\n }\n }\n}\n\nvar functionAssert = {\n assert: function (value) { return typeof value === 'function'; },\n expected: 'function'\n};\n\nvar objectAssert = {\n assert: function (value) { return typeof value === 'function' ||\n (typeof value === 'object' && typeof value.handler === 'function'); },\n expected: 'function or object with \"handler\" function'\n};\n\nvar assertTypes = {\n getters: functionAssert,\n mutations: functionAssert,\n actions: objectAssert\n};\n\nfunction assertRawModule (path, rawModule) {\n Object.keys(assertTypes).forEach(function (key) {\n if (!rawModule[key]) { return }\n\n var assertOptions = assertTypes[key];\n\n forEachValue(rawModule[key], function (value, type) {\n assert(\n assertOptions.assert(value),\n makeAssertionMessage(path, key, type, value, assertOptions.expected)\n );\n });\n });\n}\n\nfunction makeAssertionMessage (path, key, type, value, expected) {\n var buf = key + \" should be \" + expected + \" but \\\"\" + key + \".\" + type + \"\\\"\";\n if (path.length > 0) {\n buf += \" in module \\\"\" + (path.join('.')) + \"\\\"\";\n }\n buf += \" is \" + (JSON.stringify(value)) + \".\";\n return buf\n}\n\nvar Vue; // bind on install\n\nvar Store = function Store (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #731\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(Vue, \"must call Vue.use(Vuex) before creating a store instance.\");\n assert(typeof Promise !== 'undefined', \"vuex requires a Promise polyfill in this browser.\");\n assert(this instanceof Store, \"store must be called with the new operator.\");\n }\n\n var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];\n var strict = options.strict; if ( strict === void 0 ) strict = false;\n\n // store internal state\n this._committing = false;\n this._actions = Object.create(null);\n this._actionSubscribers = [];\n this._mutations = Object.create(null);\n this._wrappedGetters = Object.create(null);\n this._modules = new ModuleCollection(options);\n this._modulesNamespaceMap = Object.create(null);\n this._subscribers = [];\n this._watcherVM = new Vue();\n\n // bind commit and dispatch to self\n var store = this;\n var ref = this;\n var dispatch = ref.dispatch;\n var commit = ref.commit;\n this.dispatch = function boundDispatch (type, payload) {\n return dispatch.call(store, type, payload)\n };\n this.commit = function boundCommit (type, payload, options) {\n return commit.call(store, type, payload, options)\n };\n\n // strict mode\n this.strict = strict;\n\n var state = this._modules.root.state;\n\n // init root module.\n // this also recursively registers all sub-modules\n // and collects all module getters inside this._wrappedGetters\n installModule(this, state, [], this._modules.root);\n\n // initialize the store vm, which is responsible for the reactivity\n // (also registers _wrappedGetters as computed properties)\n resetStoreVM(this, state);\n\n // apply plugins\n plugins.forEach(function (plugin) { return plugin(this$1); });\n\n var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;\n if (useDevtools) {\n devtoolPlugin(this);\n }\n};\n\nvar prototypeAccessors$1 = { state: { configurable: true } };\n\nprototypeAccessors$1.state.get = function () {\n return this._vm._data.$$state\n};\n\nprototypeAccessors$1.state.set = function (v) {\n if (process.env.NODE_ENV !== 'production') {\n assert(false, \"use store.replaceState() to explicit replace store state.\");\n }\n};\n\nStore.prototype.commit = function commit (_type, _payload, _options) {\n var this$1 = this;\n\n // check object-style commit\n var ref = unifyObjectStyle(_type, _payload, _options);\n var type = ref.type;\n var payload = ref.payload;\n var options = ref.options;\n\n var mutation = { type: type, payload: payload };\n var entry = this._mutations[type];\n if (!entry) {\n if (process.env.NODE_ENV !== 'production') {\n console.error((\"[vuex] unknown mutation type: \" + type));\n }\n return\n }\n this._withCommit(function () {\n entry.forEach(function commitIterator (handler) {\n handler(payload);\n });\n });\n this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); });\n\n if (\n process.env.NODE_ENV !== 'production' &&\n options && options.silent\n ) {\n console.warn(\n \"[vuex] mutation type: \" + type + \". Silent option has been removed. \" +\n 'Use the filter functionality in the vue-devtools'\n );\n }\n};\n\nStore.prototype.dispatch = function dispatch (_type, _payload) {\n var this$1 = this;\n\n // check object-style dispatch\n var ref = unifyObjectStyle(_type, _payload);\n var type = ref.type;\n var payload = ref.payload;\n\n var action = { type: type, payload: payload };\n var entry = this._actions[type];\n if (!entry) {\n if (process.env.NODE_ENV !== 'production') {\n console.error((\"[vuex] unknown action type: \" + type));\n }\n return\n }\n\n try {\n this._actionSubscribers\n .filter(function (sub) { return sub.before; })\n .forEach(function (sub) { return sub.before(action, this$1.state); });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"[vuex] error in before action subscribers: \");\n console.error(e);\n }\n }\n\n var result = entry.length > 1\n ? Promise.all(entry.map(function (handler) { return handler(payload); }))\n : entry[0](payload);\n\n return result.then(function (res) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.after; })\n .forEach(function (sub) { return sub.after(action, this$1.state); });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"[vuex] error in after action subscribers: \");\n console.error(e);\n }\n }\n return res\n })\n};\n\nStore.prototype.subscribe = function subscribe (fn) {\n return genericSubscribe(fn, this._subscribers)\n};\n\nStore.prototype.subscribeAction = function subscribeAction (fn) {\n var subs = typeof fn === 'function' ? { before: fn } : fn;\n return genericSubscribe(subs, this._actionSubscribers)\n};\n\nStore.prototype.watch = function watch (getter, cb, options) {\n var this$1 = this;\n\n if (process.env.NODE_ENV !== 'production') {\n assert(typeof getter === 'function', \"store.watch only accepts a function.\");\n }\n return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)\n};\n\nStore.prototype.replaceState = function replaceState (state) {\n var this$1 = this;\n\n this._withCommit(function () {\n this$1._vm._data.$$state = state;\n });\n};\n\nStore.prototype.registerModule = function registerModule (path, rawModule, options) {\n if ( options === void 0 ) options = {};\n\n if (typeof path === 'string') { path = [path]; }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n assert(path.length > 0, 'cannot register the root module by using registerModule.');\n }\n\n this._modules.register(path, rawModule);\n installModule(this, this.state, path, this._modules.get(path), options.preserveState);\n // reset store to update getters...\n resetStoreVM(this, this.state);\n};\n\nStore.prototype.unregisterModule = function unregisterModule (path) {\n var this$1 = this;\n\n if (typeof path === 'string') { path = [path]; }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n this._modules.unregister(path);\n this._withCommit(function () {\n var parentState = getNestedState(this$1.state, path.slice(0, -1));\n Vue.delete(parentState, path[path.length - 1]);\n });\n resetStore(this);\n};\n\nStore.prototype.hotUpdate = function hotUpdate (newOptions) {\n this._modules.update(newOptions);\n resetStore(this, true);\n};\n\nStore.prototype._withCommit = function _withCommit (fn) {\n var committing = this._committing;\n this._committing = true;\n fn();\n this._committing = committing;\n};\n\nObject.defineProperties( Store.prototype, prototypeAccessors$1 );\n\nfunction genericSubscribe (fn, subs) {\n if (subs.indexOf(fn) < 0) {\n subs.push(fn);\n }\n return function () {\n var i = subs.indexOf(fn);\n if (i > -1) {\n subs.splice(i, 1);\n }\n }\n}\n\nfunction resetStore (store, hot) {\n store._actions = Object.create(null);\n store._mutations = Object.create(null);\n store._wrappedGetters = Object.create(null);\n store._modulesNamespaceMap = Object.create(null);\n var state = store.state;\n // init all modules\n installModule(store, state, [], store._modules.root, true);\n // reset vm\n resetStoreVM(store, state, hot);\n}\n\nfunction resetStoreVM (store, state, hot) {\n var oldVm = store._vm;\n\n // bind store public getters\n store.getters = {};\n var wrappedGetters = store._wrappedGetters;\n var computed = {};\n forEachValue(wrappedGetters, function (fn, key) {\n // use computed to leverage its lazy-caching mechanism\n computed[key] = function () { return fn(store); };\n Object.defineProperty(store.getters, key, {\n get: function () { return store._vm[key]; },\n enumerable: true // for local getters\n });\n });\n\n // use a Vue instance to store the state tree\n // suppress warnings just in case the user has added\n // some funky global mixins\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n store._vm = new Vue({\n data: {\n $$state: state\n },\n computed: computed\n });\n Vue.config.silent = silent;\n\n // enable strict mode for new vm\n if (store.strict) {\n enableStrictMode(store);\n }\n\n if (oldVm) {\n if (hot) {\n // dispatch changes in all subscribed watchers\n // to force getter re-evaluation for hot reloading.\n store._withCommit(function () {\n oldVm._data.$$state = null;\n });\n }\n Vue.nextTick(function () { return oldVm.$destroy(); });\n }\n}\n\nfunction installModule (store, rootState, path, module, hot) {\n var isRoot = !path.length;\n var namespace = store._modules.getNamespace(path);\n\n // register in namespace map\n if (module.namespaced) {\n store._modulesNamespaceMap[namespace] = module;\n }\n\n // set state\n if (!isRoot && !hot) {\n var parentState = getNestedState(rootState, path.slice(0, -1));\n var moduleName = path[path.length - 1];\n store._withCommit(function () {\n Vue.set(parentState, moduleName, module.state);\n });\n }\n\n var local = module.context = makeLocalContext(store, namespace, path);\n\n module.forEachMutation(function (mutation, key) {\n var namespacedType = namespace + key;\n registerMutation(store, namespacedType, mutation, local);\n });\n\n module.forEachAction(function (action, key) {\n var type = action.root ? key : namespace + key;\n var handler = action.handler || action;\n registerAction(store, type, handler, local);\n });\n\n module.forEachGetter(function (getter, key) {\n var namespacedType = namespace + key;\n registerGetter(store, namespacedType, getter, local);\n });\n\n module.forEachChild(function (child, key) {\n installModule(store, rootState, path.concat(key), child, hot);\n });\n}\n\n/**\n * make localized dispatch, commit, getters and state\n * if there is no namespace, just use root ones\n */\nfunction makeLocalContext (store, namespace, path) {\n var noNamespace = namespace === '';\n\n var local = {\n dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if (process.env.NODE_ENV !== 'production' && !store._actions[type]) {\n console.error((\"[vuex] unknown local action type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n return store.dispatch(type, payload)\n },\n\n commit: noNamespace ? store.commit : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if (process.env.NODE_ENV !== 'production' && !store._mutations[type]) {\n console.error((\"[vuex] unknown local mutation type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n store.commit(type, payload, options);\n }\n };\n\n // getters and state object must be gotten lazily\n // because they will be changed by vm update\n Object.defineProperties(local, {\n getters: {\n get: noNamespace\n ? function () { return store.getters; }\n : function () { return makeLocalGetters(store, namespace); }\n },\n state: {\n get: function () { return getNestedState(store.state, path); }\n }\n });\n\n return local\n}\n\nfunction makeLocalGetters (store, namespace) {\n var gettersProxy = {};\n\n var splitPos = namespace.length;\n Object.keys(store.getters).forEach(function (type) {\n // skip if the target getter is not match this namespace\n if (type.slice(0, splitPos) !== namespace) { return }\n\n // extract local getter type\n var localType = type.slice(splitPos);\n\n // Add a port to the getters proxy.\n // Define as getter property because\n // we do not want to evaluate the getters in this time.\n Object.defineProperty(gettersProxy, localType, {\n get: function () { return store.getters[type]; },\n enumerable: true\n });\n });\n\n return gettersProxy\n}\n\nfunction registerMutation (store, type, handler, local) {\n var entry = store._mutations[type] || (store._mutations[type] = []);\n entry.push(function wrappedMutationHandler (payload) {\n handler.call(store, local.state, payload);\n });\n}\n\nfunction registerAction (store, type, handler, local) {\n var entry = store._actions[type] || (store._actions[type] = []);\n entry.push(function wrappedActionHandler (payload, cb) {\n var res = handler.call(store, {\n dispatch: local.dispatch,\n commit: local.commit,\n getters: local.getters,\n state: local.state,\n rootGetters: store.getters,\n rootState: store.state\n }, payload, cb);\n if (!isPromise(res)) {\n res = Promise.resolve(res);\n }\n if (store._devtoolHook) {\n return res.catch(function (err) {\n store._devtoolHook.emit('vuex:error', err);\n throw err\n })\n } else {\n return res\n }\n });\n}\n\nfunction registerGetter (store, type, rawGetter, local) {\n if (store._wrappedGetters[type]) {\n if (process.env.NODE_ENV !== 'production') {\n console.error((\"[vuex] duplicate getter key: \" + type));\n }\n return\n }\n store._wrappedGetters[type] = function wrappedGetter (store) {\n return rawGetter(\n local.state, // local state\n local.getters, // local getters\n store.state, // root state\n store.getters // root getters\n )\n };\n}\n\nfunction enableStrictMode (store) {\n store._vm.$watch(function () { return this._data.$$state }, function () {\n if (process.env.NODE_ENV !== 'production') {\n assert(store._committing, \"do not mutate vuex store state outside mutation handlers.\");\n }\n }, { deep: true, sync: true });\n}\n\nfunction getNestedState (state, path) {\n return path.length\n ? path.reduce(function (state, key) { return state[key]; }, state)\n : state\n}\n\nfunction unifyObjectStyle (type, payload, options) {\n if (isObject(type) && type.type) {\n options = payload;\n payload = type;\n type = type.type;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(typeof type === 'string', (\"expects string as the type, but found \" + (typeof type) + \".\"));\n }\n\n return { type: type, payload: payload, options: options }\n}\n\nfunction install (_Vue) {\n if (Vue && _Vue === Vue) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(\n '[vuex] already installed. Vue.use(Vuex) should be called only once.'\n );\n }\n return\n }\n Vue = _Vue;\n applyMixin(Vue);\n}\n\n/**\n * Reduce the code which written in Vue.js for getting the state.\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.\n * @param {Object}\n */\nvar mapState = normalizeNamespace(function (namespace, states) {\n var res = {};\n normalizeMap(states).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedState () {\n var state = this.$store.state;\n var getters = this.$store.getters;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapState', namespace);\n if (!module) {\n return\n }\n state = module.context.state;\n getters = module.context.getters;\n }\n return typeof val === 'function'\n ? val.call(this, state, getters)\n : state[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for committing the mutation\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapMutations = normalizeNamespace(function (namespace, mutations) {\n var res = {};\n normalizeMap(mutations).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedMutation () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // Get the commit method from store\n var commit = this.$store.commit;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);\n if (!module) {\n return\n }\n commit = module.context.commit;\n }\n return typeof val === 'function'\n ? val.apply(this, [commit].concat(args))\n : commit.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for getting the getters\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} getters\n * @return {Object}\n */\nvar mapGetters = normalizeNamespace(function (namespace, getters) {\n var res = {};\n normalizeMap(getters).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n // The namespace has been mutated by normalizeNamespace\n val = namespace + val;\n res[key] = function mappedGetter () {\n if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {\n return\n }\n if (process.env.NODE_ENV !== 'production' && !(val in this.$store.getters)) {\n console.error((\"[vuex] unknown getter: \" + val));\n return\n }\n return this.$store.getters[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for dispatch the action\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapActions = normalizeNamespace(function (namespace, actions) {\n var res = {};\n normalizeMap(actions).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedAction () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // get dispatch function from store\n var dispatch = this.$store.dispatch;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapActions', namespace);\n if (!module) {\n return\n }\n dispatch = module.context.dispatch;\n }\n return typeof val === 'function'\n ? val.apply(this, [dispatch].concat(args))\n : dispatch.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object\n * @param {String} namespace\n * @return {Object}\n */\nvar createNamespacedHelpers = function (namespace) { return ({\n mapState: mapState.bind(null, namespace),\n mapGetters: mapGetters.bind(null, namespace),\n mapMutations: mapMutations.bind(null, namespace),\n mapActions: mapActions.bind(null, namespace)\n}); };\n\n/**\n * Normalize the map\n * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]\n * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]\n * @param {Array|Object} map\n * @return {Object}\n */\nfunction normalizeMap (map) {\n return Array.isArray(map)\n ? map.map(function (key) { return ({ key: key, val: key }); })\n : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })\n}\n\n/**\n * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.\n * @param {Function} fn\n * @return {Function}\n */\nfunction normalizeNamespace (fn) {\n return function (namespace, map) {\n if (typeof namespace !== 'string') {\n map = namespace;\n namespace = '';\n } else if (namespace.charAt(namespace.length - 1) !== '/') {\n namespace += '/';\n }\n return fn(namespace, map)\n }\n}\n\n/**\n * Search a special module from store by namespace. if module not exist, print error message.\n * @param {Object} store\n * @param {String} helper\n * @param {String} namespace\n * @return {Object}\n */\nfunction getModuleByNamespace (store, helper, namespace) {\n var module = store._modulesNamespaceMap[namespace];\n if (process.env.NODE_ENV !== 'production' && !module) {\n console.error((\"[vuex] module namespace not found in \" + helper + \"(): \" + namespace));\n }\n return module\n}\n\nvar index_esm = {\n Store: Store,\n install: install,\n version: '3.1.0',\n mapState: mapState,\n mapMutations: mapMutations,\n mapGetters: mapGetters,\n mapActions: mapActions,\n createNamespacedHelpers: createNamespacedHelpers\n};\n\nexport default index_esm;\nexport { Store, install, mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vuex/dist/vuex.esm.js\n// module id = 66\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file
diff --git a/third_party/webrender/debugger/index.html b/third_party/webrender/debugger/index.html
new file mode 100644
index 00000000000..5ac80cebb23
--- /dev/null
+++ b/third_party/webrender/debugger/index.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>WebRender Debugger</title>
+ </head>
+ <body>
+ <div id="app"></div>
+ <script src="dist/build.js"></script>
+ </body>
+</html>
diff --git a/third_party/webrender/debugger/package-lock.json b/third_party/webrender/debugger/package-lock.json
new file mode 100644
index 00000000000..d5fdd52fd93
--- /dev/null
+++ b/third_party/webrender/debugger/package-lock.json
@@ -0,0 +1,7606 @@
+{
+ "name": "debugger",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "accepts": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
+ "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
+ "dev": true,
+ "requires": {
+ "mime-types": "~2.1.18",
+ "negotiator": "0.6.1"
+ }
+ },
+ "acorn": {
+ "version": "5.7.3",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz",
+ "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==",
+ "dev": true
+ },
+ "acorn-dynamic-import": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz",
+ "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=",
+ "dev": true,
+ "requires": {
+ "acorn": "^4.0.3"
+ },
+ "dependencies": {
+ "acorn": {
+ "version": "4.0.13",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
+ "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=",
+ "dev": true
+ }
+ }
+ },
+ "ajv": {
+ "version": "6.10.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
+ "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^2.0.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-keywords": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz",
+ "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==",
+ "dev": true
+ },
+ "align-text": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
+ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
+ "dev": true,
+ "requires": {
+ "kind-of": "^3.0.2",
+ "longest": "^1.0.1",
+ "repeat-string": "^1.5.2"
+ }
+ },
+ "alphanum-sort": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz",
+ "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=",
+ "dev": true
+ },
+ "ansi-html": {
+ "version": "0.0.7",
+ "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
+ "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=",
+ "dev": true
+ },
+ "ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+ "dev": true
+ },
+ "anymatch": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
+ "dev": true,
+ "requires": {
+ "micromatch": "^3.1.4",
+ "normalize-path": "^2.1.1"
+ },
+ "dependencies": {
+ "normalize-path": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+ "dev": true,
+ "requires": {
+ "remove-trailing-separator": "^1.0.1"
+ }
+ }
+ }
+ },
+ "argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "requires": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "arr-diff": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
+ "dev": true
+ },
+ "arr-flatten": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
+ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
+ "dev": true
+ },
+ "arr-union": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
+ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
+ "dev": true
+ },
+ "array-find-index": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
+ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
+ "dev": true
+ },
+ "array-flatten": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz",
+ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==",
+ "dev": true
+ },
+ "array-includes": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz",
+ "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.2",
+ "es-abstract": "^1.7.0"
+ }
+ },
+ "array-union": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
+ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
+ "dev": true,
+ "requires": {
+ "array-uniq": "^1.0.1"
+ }
+ },
+ "array-uniq": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
+ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
+ "dev": true
+ },
+ "array-unique": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
+ "dev": true
+ },
+ "asn1.js": {
+ "version": "4.10.1",
+ "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
+ "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.0.0",
+ "inherits": "^2.0.1",
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "assert": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
+ "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=",
+ "dev": true,
+ "requires": {
+ "util": "0.10.3"
+ },
+ "dependencies": {
+ "inherits": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
+ "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
+ "dev": true
+ },
+ "util": {
+ "version": "0.10.3",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
+ "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
+ "dev": true,
+ "requires": {
+ "inherits": "2.0.1"
+ }
+ }
+ }
+ },
+ "assign-symbols": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
+ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
+ "dev": true
+ },
+ "async": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
+ "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==",
+ "dev": true,
+ "requires": {
+ "lodash": "^4.17.11"
+ }
+ },
+ "async-each": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
+ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
+ "dev": true
+ },
+ "atob": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
+ "dev": true
+ },
+ "autoprefixer": {
+ "version": "6.7.7",
+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz",
+ "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=",
+ "dev": true,
+ "requires": {
+ "browserslist": "^1.7.6",
+ "caniuse-db": "^1.0.30000634",
+ "normalize-range": "^0.1.2",
+ "num2fraction": "^1.2.2",
+ "postcss": "^5.2.16",
+ "postcss-value-parser": "^3.2.3"
+ },
+ "dependencies": {
+ "browserslist": {
+ "version": "1.7.7",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz",
+ "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=",
+ "dev": true,
+ "requires": {
+ "caniuse-db": "^1.0.30000639",
+ "electron-to-chromium": "^1.2.7"
+ }
+ }
+ }
+ },
+ "babel-code-frame": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
+ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
+ "dev": true,
+ "requires": {
+ "chalk": "^1.1.3",
+ "esutils": "^2.0.2",
+ "js-tokens": "^3.0.2"
+ }
+ },
+ "babel-core": {
+ "version": "6.26.3",
+ "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz",
+ "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==",
+ "dev": true,
+ "requires": {
+ "babel-code-frame": "^6.26.0",
+ "babel-generator": "^6.26.0",
+ "babel-helpers": "^6.24.1",
+ "babel-messages": "^6.23.0",
+ "babel-register": "^6.26.0",
+ "babel-runtime": "^6.26.0",
+ "babel-template": "^6.26.0",
+ "babel-traverse": "^6.26.0",
+ "babel-types": "^6.26.0",
+ "babylon": "^6.18.0",
+ "convert-source-map": "^1.5.1",
+ "debug": "^2.6.9",
+ "json5": "^0.5.1",
+ "lodash": "^4.17.4",
+ "minimatch": "^3.0.4",
+ "path-is-absolute": "^1.0.1",
+ "private": "^0.1.8",
+ "slash": "^1.0.0",
+ "source-map": "^0.5.7"
+ }
+ },
+ "babel-generator": {
+ "version": "6.26.1",
+ "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
+ "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
+ "dev": true,
+ "requires": {
+ "babel-messages": "^6.23.0",
+ "babel-runtime": "^6.26.0",
+ "babel-types": "^6.26.0",
+ "detect-indent": "^4.0.0",
+ "jsesc": "^1.3.0",
+ "lodash": "^4.17.4",
+ "source-map": "^0.5.7",
+ "trim-right": "^1.0.1"
+ }
+ },
+ "babel-helper-builder-binary-assignment-operator-visitor": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz",
+ "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=",
+ "dev": true,
+ "requires": {
+ "babel-helper-explode-assignable-expression": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-helper-call-delegate": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz",
+ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=",
+ "dev": true,
+ "requires": {
+ "babel-helper-hoist-variables": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "babel-traverse": "^6.24.1",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-helper-define-map": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz",
+ "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=",
+ "dev": true,
+ "requires": {
+ "babel-helper-function-name": "^6.24.1",
+ "babel-runtime": "^6.26.0",
+ "babel-types": "^6.26.0",
+ "lodash": "^4.17.4"
+ }
+ },
+ "babel-helper-explode-assignable-expression": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz",
+ "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0",
+ "babel-traverse": "^6.24.1",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-helper-function-name": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz",
+ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=",
+ "dev": true,
+ "requires": {
+ "babel-helper-get-function-arity": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "babel-template": "^6.24.1",
+ "babel-traverse": "^6.24.1",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-helper-get-function-arity": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz",
+ "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-helper-hoist-variables": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz",
+ "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-helper-optimise-call-expression": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz",
+ "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-helper-regex": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz",
+ "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.26.0",
+ "babel-types": "^6.26.0",
+ "lodash": "^4.17.4"
+ }
+ },
+ "babel-helper-remap-async-to-generator": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz",
+ "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=",
+ "dev": true,
+ "requires": {
+ "babel-helper-function-name": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "babel-template": "^6.24.1",
+ "babel-traverse": "^6.24.1",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-helper-replace-supers": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz",
+ "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=",
+ "dev": true,
+ "requires": {
+ "babel-helper-optimise-call-expression": "^6.24.1",
+ "babel-messages": "^6.23.0",
+ "babel-runtime": "^6.22.0",
+ "babel-template": "^6.24.1",
+ "babel-traverse": "^6.24.1",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-helpers": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
+ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0",
+ "babel-template": "^6.24.1"
+ }
+ },
+ "babel-loader": {
+ "version": "7.1.5",
+ "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.5.tgz",
+ "integrity": "sha512-iCHfbieL5d1LfOQeeVJEUyD9rTwBcP/fcEbRCfempxTDuqrKpu0AZjLAQHEQa3Yqyj9ORKe2iHfoj4rHLf7xpw==",
+ "dev": true,
+ "requires": {
+ "find-cache-dir": "^1.0.0",
+ "loader-utils": "^1.0.2",
+ "mkdirp": "^0.5.1"
+ }
+ },
+ "babel-messages": {
+ "version": "6.23.0",
+ "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
+ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-check-es2015-constants": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz",
+ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-syntax-async-functions": {
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz",
+ "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=",
+ "dev": true
+ },
+ "babel-plugin-syntax-async-generators": {
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz",
+ "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=",
+ "dev": true
+ },
+ "babel-plugin-syntax-exponentiation-operator": {
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz",
+ "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=",
+ "dev": true
+ },
+ "babel-plugin-syntax-object-rest-spread": {
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
+ "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=",
+ "dev": true
+ },
+ "babel-plugin-syntax-trailing-function-commas": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz",
+ "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=",
+ "dev": true
+ },
+ "babel-plugin-transform-async-generator-functions": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz",
+ "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=",
+ "dev": true,
+ "requires": {
+ "babel-helper-remap-async-to-generator": "^6.24.1",
+ "babel-plugin-syntax-async-generators": "^6.5.0",
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-async-to-generator": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz",
+ "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=",
+ "dev": true,
+ "requires": {
+ "babel-helper-remap-async-to-generator": "^6.24.1",
+ "babel-plugin-syntax-async-functions": "^6.8.0",
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-es2015-arrow-functions": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz",
+ "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-es2015-block-scoped-functions": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz",
+ "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-es2015-block-scoping": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz",
+ "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.26.0",
+ "babel-template": "^6.26.0",
+ "babel-traverse": "^6.26.0",
+ "babel-types": "^6.26.0",
+ "lodash": "^4.17.4"
+ }
+ },
+ "babel-plugin-transform-es2015-classes": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz",
+ "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=",
+ "dev": true,
+ "requires": {
+ "babel-helper-define-map": "^6.24.1",
+ "babel-helper-function-name": "^6.24.1",
+ "babel-helper-optimise-call-expression": "^6.24.1",
+ "babel-helper-replace-supers": "^6.24.1",
+ "babel-messages": "^6.23.0",
+ "babel-runtime": "^6.22.0",
+ "babel-template": "^6.24.1",
+ "babel-traverse": "^6.24.1",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-plugin-transform-es2015-computed-properties": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz",
+ "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0",
+ "babel-template": "^6.24.1"
+ }
+ },
+ "babel-plugin-transform-es2015-destructuring": {
+ "version": "6.23.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz",
+ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-es2015-duplicate-keys": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz",
+ "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-plugin-transform-es2015-for-of": {
+ "version": "6.23.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz",
+ "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-es2015-function-name": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz",
+ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=",
+ "dev": true,
+ "requires": {
+ "babel-helper-function-name": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-plugin-transform-es2015-literals": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz",
+ "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-es2015-modules-amd": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz",
+ "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=",
+ "dev": true,
+ "requires": {
+ "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "babel-template": "^6.24.1"
+ }
+ },
+ "babel-plugin-transform-es2015-modules-commonjs": {
+ "version": "6.26.2",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz",
+ "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==",
+ "dev": true,
+ "requires": {
+ "babel-plugin-transform-strict-mode": "^6.24.1",
+ "babel-runtime": "^6.26.0",
+ "babel-template": "^6.26.0",
+ "babel-types": "^6.26.0"
+ }
+ },
+ "babel-plugin-transform-es2015-modules-systemjs": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz",
+ "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=",
+ "dev": true,
+ "requires": {
+ "babel-helper-hoist-variables": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "babel-template": "^6.24.1"
+ }
+ },
+ "babel-plugin-transform-es2015-modules-umd": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz",
+ "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=",
+ "dev": true,
+ "requires": {
+ "babel-plugin-transform-es2015-modules-amd": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "babel-template": "^6.24.1"
+ }
+ },
+ "babel-plugin-transform-es2015-object-super": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz",
+ "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=",
+ "dev": true,
+ "requires": {
+ "babel-helper-replace-supers": "^6.24.1",
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-es2015-parameters": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz",
+ "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=",
+ "dev": true,
+ "requires": {
+ "babel-helper-call-delegate": "^6.24.1",
+ "babel-helper-get-function-arity": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "babel-template": "^6.24.1",
+ "babel-traverse": "^6.24.1",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-plugin-transform-es2015-shorthand-properties": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz",
+ "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-plugin-transform-es2015-spread": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz",
+ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-es2015-sticky-regex": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz",
+ "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=",
+ "dev": true,
+ "requires": {
+ "babel-helper-regex": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-plugin-transform-es2015-template-literals": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz",
+ "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-es2015-typeof-symbol": {
+ "version": "6.23.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz",
+ "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-es2015-unicode-regex": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz",
+ "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=",
+ "dev": true,
+ "requires": {
+ "babel-helper-regex": "^6.24.1",
+ "babel-runtime": "^6.22.0",
+ "regexpu-core": "^2.0.0"
+ }
+ },
+ "babel-plugin-transform-exponentiation-operator": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz",
+ "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=",
+ "dev": true,
+ "requires": {
+ "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1",
+ "babel-plugin-syntax-exponentiation-operator": "^6.8.0",
+ "babel-runtime": "^6.22.0"
+ }
+ },
+ "babel-plugin-transform-object-rest-spread": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz",
+ "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=",
+ "dev": true,
+ "requires": {
+ "babel-plugin-syntax-object-rest-spread": "^6.8.0",
+ "babel-runtime": "^6.26.0"
+ }
+ },
+ "babel-plugin-transform-regenerator": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz",
+ "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=",
+ "dev": true,
+ "requires": {
+ "regenerator-transform": "^0.10.0"
+ }
+ },
+ "babel-plugin-transform-strict-mode": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz",
+ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.22.0",
+ "babel-types": "^6.24.1"
+ }
+ },
+ "babel-preset-env": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz",
+ "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==",
+ "dev": true,
+ "requires": {
+ "babel-plugin-check-es2015-constants": "^6.22.0",
+ "babel-plugin-syntax-trailing-function-commas": "^6.22.0",
+ "babel-plugin-transform-async-to-generator": "^6.22.0",
+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
+ "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0",
+ "babel-plugin-transform-es2015-block-scoping": "^6.23.0",
+ "babel-plugin-transform-es2015-classes": "^6.23.0",
+ "babel-plugin-transform-es2015-computed-properties": "^6.22.0",
+ "babel-plugin-transform-es2015-destructuring": "^6.23.0",
+ "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0",
+ "babel-plugin-transform-es2015-for-of": "^6.23.0",
+ "babel-plugin-transform-es2015-function-name": "^6.22.0",
+ "babel-plugin-transform-es2015-literals": "^6.22.0",
+ "babel-plugin-transform-es2015-modules-amd": "^6.22.0",
+ "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0",
+ "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0",
+ "babel-plugin-transform-es2015-modules-umd": "^6.23.0",
+ "babel-plugin-transform-es2015-object-super": "^6.22.0",
+ "babel-plugin-transform-es2015-parameters": "^6.23.0",
+ "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0",
+ "babel-plugin-transform-es2015-spread": "^6.22.0",
+ "babel-plugin-transform-es2015-sticky-regex": "^6.22.0",
+ "babel-plugin-transform-es2015-template-literals": "^6.22.0",
+ "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0",
+ "babel-plugin-transform-es2015-unicode-regex": "^6.22.0",
+ "babel-plugin-transform-exponentiation-operator": "^6.22.0",
+ "babel-plugin-transform-regenerator": "^6.22.0",
+ "browserslist": "^3.2.6",
+ "invariant": "^2.2.2",
+ "semver": "^5.3.0"
+ }
+ },
+ "babel-preset-stage-3": {
+ "version": "6.24.1",
+ "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz",
+ "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=",
+ "dev": true,
+ "requires": {
+ "babel-plugin-syntax-trailing-function-commas": "^6.22.0",
+ "babel-plugin-transform-async-generator-functions": "^6.24.1",
+ "babel-plugin-transform-async-to-generator": "^6.24.1",
+ "babel-plugin-transform-exponentiation-operator": "^6.24.1",
+ "babel-plugin-transform-object-rest-spread": "^6.22.0"
+ }
+ },
+ "babel-register": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
+ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
+ "dev": true,
+ "requires": {
+ "babel-core": "^6.26.0",
+ "babel-runtime": "^6.26.0",
+ "core-js": "^2.5.0",
+ "home-or-tmp": "^2.0.0",
+ "lodash": "^4.17.4",
+ "mkdirp": "^0.5.1",
+ "source-map-support": "^0.4.15"
+ }
+ },
+ "babel-runtime": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
+ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
+ "dev": true,
+ "requires": {
+ "core-js": "^2.4.0",
+ "regenerator-runtime": "^0.11.0"
+ }
+ },
+ "babel-template": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
+ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.26.0",
+ "babel-traverse": "^6.26.0",
+ "babel-types": "^6.26.0",
+ "babylon": "^6.18.0",
+ "lodash": "^4.17.4"
+ }
+ },
+ "babel-traverse": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
+ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
+ "dev": true,
+ "requires": {
+ "babel-code-frame": "^6.26.0",
+ "babel-messages": "^6.23.0",
+ "babel-runtime": "^6.26.0",
+ "babel-types": "^6.26.0",
+ "babylon": "^6.18.0",
+ "debug": "^2.6.8",
+ "globals": "^9.18.0",
+ "invariant": "^2.2.2",
+ "lodash": "^4.17.4"
+ }
+ },
+ "babel-types": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
+ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.26.0",
+ "esutils": "^2.0.2",
+ "lodash": "^4.17.4",
+ "to-fast-properties": "^1.0.3"
+ }
+ },
+ "babylon": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
+ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
+ "dev": true
+ },
+ "balanced-match": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+ "dev": true
+ },
+ "base": {
+ "version": "0.11.2",
+ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
+ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
+ "dev": true,
+ "requires": {
+ "cache-base": "^1.0.1",
+ "class-utils": "^0.3.5",
+ "component-emitter": "^1.2.1",
+ "define-property": "^1.0.0",
+ "isobject": "^3.0.1",
+ "mixin-deep": "^1.2.0",
+ "pascalcase": "^0.1.1"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+ "dev": true,
+ "requires": {
+ "is-descriptor": "^1.0.0"
+ }
+ },
+ "is-accessor-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-data-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-descriptor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "dev": true,
+ "requires": {
+ "is-accessor-descriptor": "^1.0.0",
+ "is-data-descriptor": "^1.0.0",
+ "kind-of": "^6.0.2"
+ }
+ },
+ "kind-of": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
+ }
+ }
+ },
+ "base64-js": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
+ "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==",
+ "dev": true
+ },
+ "batch": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
+ "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=",
+ "dev": true
+ },
+ "big.js": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
+ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
+ "dev": true
+ },
+ "binary-extensions": {
+ "version": "1.13.1",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
+ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
+ "dev": true
+ },
+ "bluebird": {
+ "version": "3.5.4",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz",
+ "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==",
+ "dev": true
+ },
+ "bn.js": {
+ "version": "4.11.8",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
+ "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
+ "dev": true
+ },
+ "body-parser": {
+ "version": "1.18.3",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz",
+ "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
+ "dev": true,
+ "requires": {
+ "bytes": "3.0.0",
+ "content-type": "~1.0.4",
+ "debug": "2.6.9",
+ "depd": "~1.1.2",
+ "http-errors": "~1.6.3",
+ "iconv-lite": "0.4.23",
+ "on-finished": "~2.3.0",
+ "qs": "6.5.2",
+ "raw-body": "2.3.3",
+ "type-is": "~1.6.16"
+ }
+ },
+ "bonjour": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz",
+ "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=",
+ "dev": true,
+ "requires": {
+ "array-flatten": "^2.1.0",
+ "deep-equal": "^1.0.1",
+ "dns-equal": "^1.0.0",
+ "dns-txt": "^2.0.2",
+ "multicast-dns": "^6.0.1",
+ "multicast-dns-service-types": "^1.1.0"
+ }
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "braces": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+ "dev": true,
+ "requires": {
+ "arr-flatten": "^1.1.0",
+ "array-unique": "^0.3.2",
+ "extend-shallow": "^2.0.1",
+ "fill-range": "^4.0.0",
+ "isobject": "^3.0.1",
+ "repeat-element": "^1.1.2",
+ "snapdragon": "^0.8.1",
+ "snapdragon-node": "^2.0.1",
+ "split-string": "^3.0.2",
+ "to-regex": "^3.0.1"
+ },
+ "dependencies": {
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
+ }
+ },
+ "brorand": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
+ "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
+ "dev": true
+ },
+ "browserify-aes": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
+ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
+ "dev": true,
+ "requires": {
+ "buffer-xor": "^1.0.3",
+ "cipher-base": "^1.0.0",
+ "create-hash": "^1.1.0",
+ "evp_bytestokey": "^1.0.3",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "browserify-cipher": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
+ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
+ "dev": true,
+ "requires": {
+ "browserify-aes": "^1.0.4",
+ "browserify-des": "^1.0.0",
+ "evp_bytestokey": "^1.0.0"
+ }
+ },
+ "browserify-des": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
+ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
+ "dev": true,
+ "requires": {
+ "cipher-base": "^1.0.1",
+ "des.js": "^1.0.0",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "browserify-rsa": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
+ "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.1.0",
+ "randombytes": "^2.0.1"
+ }
+ },
+ "browserify-sign": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz",
+ "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.1.1",
+ "browserify-rsa": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "create-hmac": "^1.1.2",
+ "elliptic": "^6.0.0",
+ "inherits": "^2.0.1",
+ "parse-asn1": "^5.0.0"
+ }
+ },
+ "browserify-zlib": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
+ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
+ "dev": true,
+ "requires": {
+ "pako": "~1.0.5"
+ }
+ },
+ "browserslist": {
+ "version": "3.2.8",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz",
+ "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==",
+ "dev": true,
+ "requires": {
+ "caniuse-lite": "^1.0.30000844",
+ "electron-to-chromium": "^1.3.47"
+ }
+ },
+ "buefy": {
+ "version": "0.6.7",
+ "resolved": "https://registry.npmjs.org/buefy/-/buefy-0.6.7.tgz",
+ "integrity": "sha512-/d8srEpXAXWQjquHNP3ic9AVzwj8ar+jHfc7YjbspHT1AVeY3CDmzY2R1Am8ICnhioKAjRUfIie2/I9DiytXMQ==",
+ "requires": {
+ "bulma": "0.7.1"
+ }
+ },
+ "buffer": {
+ "version": "4.9.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
+ "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
+ "dev": true,
+ "requires": {
+ "base64-js": "^1.0.2",
+ "ieee754": "^1.1.4",
+ "isarray": "^1.0.0"
+ }
+ },
+ "buffer-indexof": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz",
+ "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==",
+ "dev": true
+ },
+ "buffer-xor": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
+ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
+ "dev": true
+ },
+ "builtin-status-codes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
+ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
+ "dev": true
+ },
+ "bulma": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.7.1.tgz",
+ "integrity": "sha512-wRSO2LXB+qI9Pyz2id+uZr4quz5aftSN7Ay1ysr1+krzVp3utD+Ci4CeKuZdrYGc800t65b7heXBL6qw2Wo/lQ=="
+ },
+ "bytes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=",
+ "dev": true
+ },
+ "cache-base": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
+ "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
+ "dev": true,
+ "requires": {
+ "collection-visit": "^1.0.0",
+ "component-emitter": "^1.2.1",
+ "get-value": "^2.0.6",
+ "has-value": "^1.0.0",
+ "isobject": "^3.0.1",
+ "set-value": "^2.0.0",
+ "to-object-path": "^0.3.0",
+ "union-value": "^1.0.0",
+ "unset-value": "^1.0.0"
+ }
+ },
+ "camelcase": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
+ "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
+ "dev": true
+ },
+ "camelcase-keys": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
+ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^2.0.0",
+ "map-obj": "^1.0.0"
+ },
+ "dependencies": {
+ "camelcase": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
+ "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=",
+ "dev": true
+ }
+ }
+ },
+ "caniuse-api": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz",
+ "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=",
+ "dev": true,
+ "requires": {
+ "browserslist": "^1.3.6",
+ "caniuse-db": "^1.0.30000529",
+ "lodash.memoize": "^4.1.2",
+ "lodash.uniq": "^4.5.0"
+ },
+ "dependencies": {
+ "browserslist": {
+ "version": "1.7.7",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz",
+ "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=",
+ "dev": true,
+ "requires": {
+ "caniuse-db": "^1.0.30000639",
+ "electron-to-chromium": "^1.2.7"
+ }
+ }
+ }
+ },
+ "caniuse-db": {
+ "version": "1.0.30000960",
+ "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000960.tgz",
+ "integrity": "sha512-lgvTGHSJcROw38PaUzjAA1M3VA9hBkGsrTfo+Uiq6jSqfQXRSflpcQsM3MbytlFwBhPH6VD0GwLPihJgjqWrew==",
+ "dev": true
+ },
+ "caniuse-lite": {
+ "version": "1.0.30000960",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000960.tgz",
+ "integrity": "sha512-7nK5qs17icQaX6V3/RYrJkOsZyRNnroA4+ZwxaKJzIKy+crIy0Mz5CBlLySd2SNV+4nbUZeqeNfiaEieUBu3aA==",
+ "dev": true
+ },
+ "center-align": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
+ "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
+ "dev": true,
+ "requires": {
+ "align-text": "^0.1.3",
+ "lazy-cache": "^1.0.3"
+ }
+ },
+ "chalk": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^2.2.1",
+ "escape-string-regexp": "^1.0.2",
+ "has-ansi": "^2.0.0",
+ "strip-ansi": "^3.0.0",
+ "supports-color": "^2.0.0"
+ }
+ },
+ "chokidar": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz",
+ "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==",
+ "dev": true,
+ "requires": {
+ "anymatch": "^2.0.0",
+ "async-each": "^1.0.1",
+ "braces": "^2.3.2",
+ "fsevents": "^1.2.7",
+ "glob-parent": "^3.1.0",
+ "inherits": "^2.0.3",
+ "is-binary-path": "^1.0.0",
+ "is-glob": "^4.0.0",
+ "normalize-path": "^3.0.0",
+ "path-is-absolute": "^1.0.0",
+ "readdirp": "^2.2.1",
+ "upath": "^1.1.1"
+ }
+ },
+ "cipher-base": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
+ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "clap": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz",
+ "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==",
+ "dev": true,
+ "requires": {
+ "chalk": "^1.1.3"
+ }
+ },
+ "class-utils": {
+ "version": "0.3.6",
+ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
+ "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
+ "dev": true,
+ "requires": {
+ "arr-union": "^3.1.0",
+ "define-property": "^0.2.5",
+ "isobject": "^3.0.0",
+ "static-extend": "^0.1.1"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "dev": true,
+ "requires": {
+ "is-descriptor": "^0.1.0"
+ }
+ }
+ }
+ },
+ "cliui": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
+ "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
+ "dev": true,
+ "requires": {
+ "center-align": "^0.1.1",
+ "right-align": "^0.1.1",
+ "wordwrap": "0.0.2"
+ }
+ },
+ "clone": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+ "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
+ "dev": true
+ },
+ "coa": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.4.tgz",
+ "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=",
+ "dev": true,
+ "requires": {
+ "q": "^1.1.2"
+ }
+ },
+ "code-point-at": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
+ "dev": true
+ },
+ "collection-visit": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
+ "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
+ "dev": true,
+ "requires": {
+ "map-visit": "^1.0.0",
+ "object-visit": "^1.0.0"
+ }
+ },
+ "color": {
+ "version": "0.11.4",
+ "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz",
+ "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=",
+ "dev": true,
+ "requires": {
+ "clone": "^1.0.2",
+ "color-convert": "^1.3.0",
+ "color-string": "^0.3.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "color-string": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz",
+ "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=",
+ "dev": true,
+ "requires": {
+ "color-name": "^1.0.0"
+ }
+ },
+ "colormin": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz",
+ "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=",
+ "dev": true,
+ "requires": {
+ "color": "^0.11.0",
+ "css-color-names": "0.0.4",
+ "has": "^1.0.1"
+ }
+ },
+ "colors": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
+ "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
+ "dev": true
+ },
+ "commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
+ "dev": true
+ },
+ "component-emitter": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
+ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
+ "dev": true
+ },
+ "compressible": {
+ "version": "2.0.16",
+ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.16.tgz",
+ "integrity": "sha512-JQfEOdnI7dASwCuSPWIeVYwc/zMsu/+tRhoUvEfXz2gxOA2DNjmG5vhtFdBlhWPPGo+RdT9S3tgc/uH5qgDiiA==",
+ "dev": true,
+ "requires": {
+ "mime-db": ">= 1.38.0 < 2"
+ }
+ },
+ "compression": {
+ "version": "1.7.4",
+ "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz",
+ "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==",
+ "dev": true,
+ "requires": {
+ "accepts": "~1.3.5",
+ "bytes": "3.0.0",
+ "compressible": "~2.0.16",
+ "debug": "2.6.9",
+ "on-headers": "~1.0.2",
+ "safe-buffer": "5.1.2",
+ "vary": "~1.1.2"
+ }
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "dev": true
+ },
+ "connect-history-api-fallback": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz",
+ "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==",
+ "dev": true
+ },
+ "console-browserify": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
+ "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
+ "dev": true,
+ "requires": {
+ "date-now": "^0.1.4"
+ }
+ },
+ "consolidate": {
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.14.5.tgz",
+ "integrity": "sha1-WiUEe8dvcwcmZ8jLUsmJiI9JTGM=",
+ "dev": true,
+ "requires": {
+ "bluebird": "^3.1.1"
+ }
+ },
+ "constants-browserify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
+ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
+ "dev": true
+ },
+ "content-disposition": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
+ "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=",
+ "dev": true
+ },
+ "content-type": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+ "dev": true
+ },
+ "convert-source-map": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz",
+ "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.1"
+ }
+ },
+ "cookie": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
+ "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=",
+ "dev": true
+ },
+ "cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=",
+ "dev": true
+ },
+ "copy-descriptor": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
+ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
+ "dev": true
+ },
+ "core-js": {
+ "version": "2.6.5",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz",
+ "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==",
+ "dev": true
+ },
+ "core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+ "dev": true
+ },
+ "cosmiconfig": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz",
+ "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==",
+ "dev": true,
+ "requires": {
+ "is-directory": "^0.3.1",
+ "js-yaml": "^3.4.3",
+ "minimist": "^1.2.0",
+ "object-assign": "^4.1.0",
+ "os-homedir": "^1.0.1",
+ "parse-json": "^2.2.0",
+ "require-from-string": "^1.1.0"
+ },
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+ "dev": true
+ }
+ }
+ },
+ "create-ecdh": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz",
+ "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.1.0",
+ "elliptic": "^6.0.0"
+ }
+ },
+ "create-hash": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
+ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
+ "dev": true,
+ "requires": {
+ "cipher-base": "^1.0.1",
+ "inherits": "^2.0.1",
+ "md5.js": "^1.3.4",
+ "ripemd160": "^2.0.1",
+ "sha.js": "^2.4.0"
+ }
+ },
+ "create-hmac": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
+ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
+ "dev": true,
+ "requires": {
+ "cipher-base": "^1.0.3",
+ "create-hash": "^1.1.0",
+ "inherits": "^2.0.1",
+ "ripemd160": "^2.0.0",
+ "safe-buffer": "^5.0.1",
+ "sha.js": "^2.4.8"
+ }
+ },
+ "cross-env": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.0.tgz",
+ "integrity": "sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^6.0.5",
+ "is-windows": "^1.0.0"
+ }
+ },
+ "cross-spawn": {
+ "version": "6.0.5",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "dev": true,
+ "requires": {
+ "nice-try": "^1.0.4",
+ "path-key": "^2.0.1",
+ "semver": "^5.5.0",
+ "shebang-command": "^1.2.0",
+ "which": "^1.2.9"
+ }
+ },
+ "crypto-browserify": {
+ "version": "3.12.0",
+ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
+ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
+ "dev": true,
+ "requires": {
+ "browserify-cipher": "^1.0.0",
+ "browserify-sign": "^4.0.0",
+ "create-ecdh": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "create-hmac": "^1.1.0",
+ "diffie-hellman": "^5.0.0",
+ "inherits": "^2.0.1",
+ "pbkdf2": "^3.0.3",
+ "public-encrypt": "^4.0.0",
+ "randombytes": "^2.0.0",
+ "randomfill": "^1.0.3"
+ }
+ },
+ "css-color-names": {
+ "version": "0.0.4",
+ "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
+ "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=",
+ "dev": true
+ },
+ "css-loader": {
+ "version": "0.28.11",
+ "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.28.11.tgz",
+ "integrity": "sha512-wovHgjAx8ZIMGSL8pTys7edA1ClmzxHeY6n/d97gg5odgsxEgKjULPR0viqyC+FWMCL9sfqoC/QCUBo62tLvPg==",
+ "dev": true,
+ "requires": {
+ "babel-code-frame": "^6.26.0",
+ "css-selector-tokenizer": "^0.7.0",
+ "cssnano": "^3.10.0",
+ "icss-utils": "^2.1.0",
+ "loader-utils": "^1.0.2",
+ "lodash.camelcase": "^4.3.0",
+ "object-assign": "^4.1.1",
+ "postcss": "^5.0.6",
+ "postcss-modules-extract-imports": "^1.2.0",
+ "postcss-modules-local-by-default": "^1.2.0",
+ "postcss-modules-scope": "^1.1.0",
+ "postcss-modules-values": "^1.3.0",
+ "postcss-value-parser": "^3.3.0",
+ "source-list-map": "^2.0.0"
+ }
+ },
+ "css-selector-tokenizer": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz",
+ "integrity": "sha512-xYL0AMZJ4gFzJQsHUKa5jiWWi2vH77WVNg7JYRyewwj6oPh4yb/y6Y9ZCw9dsj/9UauMhtuxR+ogQd//EdEVNA==",
+ "dev": true,
+ "requires": {
+ "cssesc": "^0.1.0",
+ "fastparse": "^1.1.1",
+ "regexpu-core": "^1.0.0"
+ },
+ "dependencies": {
+ "regexpu-core": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz",
+ "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=",
+ "dev": true,
+ "requires": {
+ "regenerate": "^1.2.1",
+ "regjsgen": "^0.2.0",
+ "regjsparser": "^0.1.4"
+ }
+ }
+ }
+ },
+ "cssesc": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz",
+ "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=",
+ "dev": true
+ },
+ "cssnano": {
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz",
+ "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=",
+ "dev": true,
+ "requires": {
+ "autoprefixer": "^6.3.1",
+ "decamelize": "^1.1.2",
+ "defined": "^1.0.0",
+ "has": "^1.0.1",
+ "object-assign": "^4.0.1",
+ "postcss": "^5.0.14",
+ "postcss-calc": "^5.2.0",
+ "postcss-colormin": "^2.1.8",
+ "postcss-convert-values": "^2.3.4",
+ "postcss-discard-comments": "^2.0.4",
+ "postcss-discard-duplicates": "^2.0.1",
+ "postcss-discard-empty": "^2.0.1",
+ "postcss-discard-overridden": "^0.1.1",
+ "postcss-discard-unused": "^2.2.1",
+ "postcss-filter-plugins": "^2.0.0",
+ "postcss-merge-idents": "^2.1.5",
+ "postcss-merge-longhand": "^2.0.1",
+ "postcss-merge-rules": "^2.0.3",
+ "postcss-minify-font-values": "^1.0.2",
+ "postcss-minify-gradients": "^1.0.1",
+ "postcss-minify-params": "^1.0.4",
+ "postcss-minify-selectors": "^2.0.4",
+ "postcss-normalize-charset": "^1.1.0",
+ "postcss-normalize-url": "^3.0.7",
+ "postcss-ordered-values": "^2.1.0",
+ "postcss-reduce-idents": "^2.2.2",
+ "postcss-reduce-initial": "^1.0.0",
+ "postcss-reduce-transforms": "^1.0.3",
+ "postcss-svgo": "^2.1.1",
+ "postcss-unique-selectors": "^2.0.2",
+ "postcss-value-parser": "^3.2.3",
+ "postcss-zindex": "^2.0.1"
+ }
+ },
+ "csso": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/csso/-/csso-2.3.2.tgz",
+ "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=",
+ "dev": true,
+ "requires": {
+ "clap": "^1.0.9",
+ "source-map": "^0.5.3"
+ }
+ },
+ "currently-unhandled": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
+ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
+ "dev": true,
+ "requires": {
+ "array-find-index": "^1.0.1"
+ }
+ },
+ "d": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
+ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
+ "dev": true,
+ "requires": {
+ "es5-ext": "^0.10.9"
+ }
+ },
+ "date-now": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
+ "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
+ "dev": true
+ },
+ "de-indent": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
+ "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=",
+ "dev": true
+ },
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+ "dev": true
+ },
+ "decode-uri-component": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
+ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
+ "dev": true
+ },
+ "deep-equal": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
+ "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=",
+ "dev": true
+ },
+ "define-properties": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+ "dev": true,
+ "requires": {
+ "object-keys": "^1.0.12"
+ }
+ },
+ "define-property": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
+ "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
+ "dev": true,
+ "requires": {
+ "is-descriptor": "^1.0.2",
+ "isobject": "^3.0.1"
+ },
+ "dependencies": {
+ "is-accessor-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-data-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-descriptor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "dev": true,
+ "requires": {
+ "is-accessor-descriptor": "^1.0.0",
+ "is-data-descriptor": "^1.0.0",
+ "kind-of": "^6.0.2"
+ }
+ },
+ "kind-of": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
+ }
+ }
+ },
+ "defined": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
+ "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
+ "dev": true
+ },
+ "del": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz",
+ "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=",
+ "dev": true,
+ "requires": {
+ "globby": "^6.1.0",
+ "is-path-cwd": "^1.0.0",
+ "is-path-in-cwd": "^1.0.0",
+ "p-map": "^1.1.1",
+ "pify": "^3.0.0",
+ "rimraf": "^2.2.8"
+ }
+ },
+ "depd": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
+ "dev": true
+ },
+ "des.js": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
+ "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "destroy": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
+ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=",
+ "dev": true
+ },
+ "detect-indent": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
+ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
+ "dev": true,
+ "requires": {
+ "repeating": "^2.0.0"
+ }
+ },
+ "detect-node": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz",
+ "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==",
+ "dev": true
+ },
+ "diffie-hellman": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
+ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.1.0",
+ "miller-rabin": "^4.0.0",
+ "randombytes": "^2.0.0"
+ }
+ },
+ "dns-equal": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
+ "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=",
+ "dev": true
+ },
+ "dns-packet": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz",
+ "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==",
+ "dev": true,
+ "requires": {
+ "ip": "^1.1.0",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "dns-txt": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz",
+ "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=",
+ "dev": true,
+ "requires": {
+ "buffer-indexof": "^1.0.0"
+ }
+ },
+ "domain-browser": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
+ "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
+ "dev": true
+ },
+ "ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=",
+ "dev": true
+ },
+ "electron-to-chromium": {
+ "version": "1.3.124",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz",
+ "integrity": "sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w==",
+ "dev": true
+ },
+ "elliptic": {
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz",
+ "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.4.0",
+ "brorand": "^1.0.1",
+ "hash.js": "^1.0.0",
+ "hmac-drbg": "^1.0.0",
+ "inherits": "^2.0.1",
+ "minimalistic-assert": "^1.0.0",
+ "minimalistic-crypto-utils": "^1.0.0"
+ }
+ },
+ "emojis-list": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
+ "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=",
+ "dev": true
+ },
+ "encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
+ "dev": true
+ },
+ "enhanced-resolve": {
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz",
+ "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "memory-fs": "^0.4.0",
+ "object-assign": "^4.0.1",
+ "tapable": "^0.2.7"
+ }
+ },
+ "errno": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
+ "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
+ "dev": true,
+ "requires": {
+ "prr": "~1.0.1"
+ }
+ },
+ "error-ex": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+ "dev": true,
+ "requires": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
+ "es-abstract": {
+ "version": "1.13.0",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz",
+ "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==",
+ "dev": true,
+ "requires": {
+ "es-to-primitive": "^1.2.0",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "is-callable": "^1.1.4",
+ "is-regex": "^1.0.4",
+ "object-keys": "^1.0.12"
+ }
+ },
+ "es-to-primitive": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
+ "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
+ "dev": true,
+ "requires": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ }
+ },
+ "es5-ext": {
+ "version": "0.10.49",
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.49.tgz",
+ "integrity": "sha512-3NMEhi57E31qdzmYp2jwRArIUsj1HI/RxbQ4bgnSB+AIKIxsAmTiK83bYMifIcpWvEc3P1X30DhUKOqEtF/kvg==",
+ "dev": true,
+ "requires": {
+ "es6-iterator": "~2.0.3",
+ "es6-symbol": "~3.1.1",
+ "next-tick": "^1.0.0"
+ }
+ },
+ "es6-iterator": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
+ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
+ "dev": true,
+ "requires": {
+ "d": "1",
+ "es5-ext": "^0.10.35",
+ "es6-symbol": "^3.1.1"
+ }
+ },
+ "es6-map": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz",
+ "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=",
+ "dev": true,
+ "requires": {
+ "d": "1",
+ "es5-ext": "~0.10.14",
+ "es6-iterator": "~2.0.1",
+ "es6-set": "~0.1.5",
+ "es6-symbol": "~3.1.1",
+ "event-emitter": "~0.3.5"
+ }
+ },
+ "es6-set": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
+ "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=",
+ "dev": true,
+ "requires": {
+ "d": "1",
+ "es5-ext": "~0.10.14",
+ "es6-iterator": "~2.0.1",
+ "es6-symbol": "3.1.1",
+ "event-emitter": "~0.3.5"
+ }
+ },
+ "es6-symbol": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
+ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
+ "dev": true,
+ "requires": {
+ "d": "1",
+ "es5-ext": "~0.10.14"
+ }
+ },
+ "es6-weak-map": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
+ "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
+ "dev": true,
+ "requires": {
+ "d": "1",
+ "es5-ext": "^0.10.14",
+ "es6-iterator": "^2.0.1",
+ "es6-symbol": "^3.1.1"
+ }
+ },
+ "escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
+ "dev": true
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ },
+ "escope": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
+ "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=",
+ "dev": true,
+ "requires": {
+ "es6-map": "^0.1.3",
+ "es6-weak-map": "^2.0.1",
+ "esrecurse": "^4.1.0",
+ "estraverse": "^4.1.1"
+ }
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true
+ },
+ "esrecurse": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
+ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
+ "dev": true,
+ "requires": {
+ "estraverse": "^4.1.0"
+ }
+ },
+ "estraverse": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
+ "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
+ "dev": true
+ },
+ "esutils": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
+ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
+ "dev": true
+ },
+ "etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
+ "dev": true
+ },
+ "event-emitter": {
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
+ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
+ "dev": true,
+ "requires": {
+ "d": "1",
+ "es5-ext": "~0.10.14"
+ }
+ },
+ "eventemitter3": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz",
+ "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==",
+ "dev": true
+ },
+ "events": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz",
+ "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==",
+ "dev": true
+ },
+ "eventsource": {
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz",
+ "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=",
+ "dev": true,
+ "requires": {
+ "original": ">=0.0.5"
+ }
+ },
+ "evp_bytestokey": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
+ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
+ "dev": true,
+ "requires": {
+ "md5.js": "^1.3.4",
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "execa": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
+ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^5.0.1",
+ "get-stream": "^3.0.0",
+ "is-stream": "^1.1.0",
+ "npm-run-path": "^2.0.0",
+ "p-finally": "^1.0.0",
+ "signal-exit": "^3.0.0",
+ "strip-eof": "^1.0.0"
+ },
+ "dependencies": {
+ "cross-spawn": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
+ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^4.0.1",
+ "shebang-command": "^1.2.0",
+ "which": "^1.2.9"
+ }
+ }
+ }
+ },
+ "expand-brackets": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+ "dev": true,
+ "requires": {
+ "debug": "^2.3.3",
+ "define-property": "^0.2.5",
+ "extend-shallow": "^2.0.1",
+ "posix-character-classes": "^0.1.0",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.1"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "dev": true,
+ "requires": {
+ "is-descriptor": "^0.1.0"
+ }
+ },
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
+ }
+ },
+ "express": {
+ "version": "4.16.4",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
+ "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==",
+ "dev": true,
+ "requires": {
+ "accepts": "~1.3.5",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.18.3",
+ "content-disposition": "0.5.2",
+ "content-type": "~1.0.4",
+ "cookie": "0.3.1",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "~1.1.2",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.1.1",
+ "fresh": "0.5.2",
+ "merge-descriptors": "1.0.1",
+ "methods": "~1.1.2",
+ "on-finished": "~2.3.0",
+ "parseurl": "~1.3.2",
+ "path-to-regexp": "0.1.7",
+ "proxy-addr": "~2.0.4",
+ "qs": "6.5.2",
+ "range-parser": "~1.2.0",
+ "safe-buffer": "5.1.2",
+ "send": "0.16.2",
+ "serve-static": "1.13.2",
+ "setprototypeof": "1.1.0",
+ "statuses": "~1.4.0",
+ "type-is": "~1.6.16",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "dependencies": {
+ "array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=",
+ "dev": true
+ }
+ }
+ },
+ "extend-shallow": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
+ "dev": true,
+ "requires": {
+ "assign-symbols": "^1.0.0",
+ "is-extendable": "^1.0.1"
+ },
+ "dependencies": {
+ "is-extendable": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+ "dev": true,
+ "requires": {
+ "is-plain-object": "^2.0.4"
+ }
+ }
+ }
+ },
+ "extglob": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+ "dev": true,
+ "requires": {
+ "array-unique": "^0.3.2",
+ "define-property": "^1.0.0",
+ "expand-brackets": "^2.1.4",
+ "extend-shallow": "^2.0.1",
+ "fragment-cache": "^0.2.1",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.1"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+ "dev": true,
+ "requires": {
+ "is-descriptor": "^1.0.0"
+ }
+ },
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ },
+ "is-accessor-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-data-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-descriptor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "dev": true,
+ "requires": {
+ "is-accessor-descriptor": "^1.0.0",
+ "is-data-descriptor": "^1.0.0",
+ "kind-of": "^6.0.2"
+ }
+ },
+ "kind-of": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
+ }
+ }
+ },
+ "fast-deep-equal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
+ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
+ "dev": true
+ },
+ "fast-json-stable-stringify": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
+ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
+ "dev": true
+ },
+ "fastparse": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz",
+ "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==",
+ "dev": true
+ },
+ "faye-websocket": {
+ "version": "0.10.0",
+ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz",
+ "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=",
+ "dev": true,
+ "requires": {
+ "websocket-driver": ">=0.5.1"
+ }
+ },
+ "file-loader": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz",
+ "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==",
+ "dev": true,
+ "requires": {
+ "loader-utils": "^1.0.2",
+ "schema-utils": "^0.4.5"
+ }
+ },
+ "fill-range": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+ "dev": true,
+ "requires": {
+ "extend-shallow": "^2.0.1",
+ "is-number": "^3.0.0",
+ "repeat-string": "^1.6.1",
+ "to-regex-range": "^2.1.0"
+ },
+ "dependencies": {
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
+ }
+ },
+ "finalhandler": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
+ "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==",
+ "dev": true,
+ "requires": {
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "~2.3.0",
+ "parseurl": "~1.3.2",
+ "statuses": "~1.4.0",
+ "unpipe": "~1.0.0"
+ }
+ },
+ "find-cache-dir": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz",
+ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=",
+ "dev": true,
+ "requires": {
+ "commondir": "^1.0.1",
+ "make-dir": "^1.0.0",
+ "pkg-dir": "^2.0.0"
+ }
+ },
+ "find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "dev": true,
+ "requires": {
+ "locate-path": "^2.0.0"
+ }
+ },
+ "flatten": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz",
+ "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=",
+ "dev": true
+ },
+ "follow-redirects": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
+ "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
+ "dev": true,
+ "requires": {
+ "debug": "^3.2.6"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
+ "dev": true
+ }
+ }
+ },
+ "for-in": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
+ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
+ "dev": true
+ },
+ "forwarded": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
+ "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=",
+ "dev": true
+ },
+ "fragment-cache": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
+ "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
+ "dev": true,
+ "requires": {
+ "map-cache": "^0.2.2"
+ }
+ },
+ "fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
+ "dev": true
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "dev": true
+ },
+ "fsevents": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.8.tgz",
+ "integrity": "sha512-tPvHgPGB7m40CZ68xqFGkKuzN+RnpGmSV+hgeKxhRpbxdqKXUFJGC3yonBOLzQBcJyGpdZFDfCsdOC2KFsXzeA==",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "nan": "^2.12.1",
+ "node-pre-gyp": "^0.12.0"
+ },
+ "dependencies": {
+ "abbrev": {
+ "version": "1.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "ansi-regex": {
+ "version": "2.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "aproba": {
+ "version": "1.2.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "are-we-there-yet": {
+ "version": "1.1.5",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "delegates": "^1.0.0",
+ "readable-stream": "^2.0.6"
+ }
+ },
+ "balanced-match": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "chownr": {
+ "version": "1.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "code-point-at": {
+ "version": "1.1.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "console-control-strings": {
+ "version": "1.1.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "core-util-is": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "debug": {
+ "version": "4.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "deep-extend": {
+ "version": "0.6.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "delegates": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "detect-libc": {
+ "version": "1.0.3",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "fs-minipass": {
+ "version": "1.2.5",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "minipass": "^2.2.1"
+ }
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "gauge": {
+ "version": "2.7.4",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "aproba": "^1.0.3",
+ "console-control-strings": "^1.0.0",
+ "has-unicode": "^2.0.0",
+ "object-assign": "^4.1.0",
+ "signal-exit": "^3.0.0",
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1",
+ "wide-align": "^1.1.0"
+ }
+ },
+ "glob": {
+ "version": "7.1.3",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "has-unicode": {
+ "version": "2.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "iconv-lite": {
+ "version": "0.4.24",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ }
+ },
+ "ignore-walk": {
+ "version": "3.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "minimatch": "^3.0.4"
+ }
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "ini": {
+ "version": "1.3.5",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "number-is-nan": "^1.0.0"
+ }
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "minimist": {
+ "version": "0.0.8",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "minipass": {
+ "version": "2.3.5",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "safe-buffer": "^5.1.2",
+ "yallist": "^3.0.0"
+ }
+ },
+ "minizlib": {
+ "version": "1.2.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "minipass": "^2.2.1"
+ }
+ },
+ "mkdirp": {
+ "version": "0.5.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "minimist": "0.0.8"
+ }
+ },
+ "ms": {
+ "version": "2.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "needle": {
+ "version": "2.3.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "debug": "^4.1.0",
+ "iconv-lite": "^0.4.4",
+ "sax": "^1.2.4"
+ }
+ },
+ "node-pre-gyp": {
+ "version": "0.12.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "detect-libc": "^1.0.2",
+ "mkdirp": "^0.5.1",
+ "needle": "^2.2.1",
+ "nopt": "^4.0.1",
+ "npm-packlist": "^1.1.6",
+ "npmlog": "^4.0.2",
+ "rc": "^1.2.7",
+ "rimraf": "^2.6.1",
+ "semver": "^5.3.0",
+ "tar": "^4"
+ }
+ },
+ "nopt": {
+ "version": "4.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "abbrev": "1",
+ "osenv": "^0.1.4"
+ }
+ },
+ "npm-bundled": {
+ "version": "1.0.6",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "npm-packlist": {
+ "version": "1.4.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "ignore-walk": "^3.0.1",
+ "npm-bundled": "^1.0.1"
+ }
+ },
+ "npmlog": {
+ "version": "4.1.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "are-we-there-yet": "~1.1.2",
+ "console-control-strings": "~1.1.0",
+ "gauge": "~2.7.3",
+ "set-blocking": "~2.0.0"
+ }
+ },
+ "number-is-nan": {
+ "version": "1.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "os-homedir": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "os-tmpdir": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "osenv": {
+ "version": "0.1.5",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "os-homedir": "^1.0.0",
+ "os-tmpdir": "^1.0.0"
+ }
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "process-nextick-args": {
+ "version": "2.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "rc": {
+ "version": "1.2.8",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "deep-extend": "^0.6.0",
+ "ini": "~1.3.0",
+ "minimist": "^1.2.0",
+ "strip-json-comments": "~2.0.1"
+ },
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ }
+ }
+ },
+ "readable-stream": {
+ "version": "2.3.6",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "rimraf": {
+ "version": "2.6.3",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "safer-buffer": {
+ "version": "2.1.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "sax": {
+ "version": "1.2.4",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "semver": {
+ "version": "5.7.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "set-blocking": {
+ "version": "2.0.0",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "signal-exit": {
+ "version": "3.0.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "string-width": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ }
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "3.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "ansi-regex": "^2.0.0"
+ }
+ },
+ "strip-json-comments": {
+ "version": "2.0.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "tar": {
+ "version": "4.4.8",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "chownr": "^1.1.1",
+ "fs-minipass": "^1.2.5",
+ "minipass": "^2.3.4",
+ "minizlib": "^1.1.1",
+ "mkdirp": "^0.5.0",
+ "safe-buffer": "^5.1.2",
+ "yallist": "^3.0.2"
+ }
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "wide-align": {
+ "version": "1.1.3",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "string-width": "^1.0.2 || 2"
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ },
+ "yallist": {
+ "version": "3.0.3",
+ "bundled": true,
+ "dev": true,
+ "optional": true
+ }
+ }
+ },
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+ "dev": true
+ },
+ "get-caller-file": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
+ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
+ "dev": true
+ },
+ "get-stdin": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
+ "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
+ "dev": true
+ },
+ "get-stream": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
+ "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
+ "dev": true
+ },
+ "get-value": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
+ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
+ "dev": true
+ },
+ "glob": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "glob-parent": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+ "dev": true,
+ "requires": {
+ "is-glob": "^3.1.0",
+ "path-dirname": "^1.0.0"
+ },
+ "dependencies": {
+ "is-glob": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.0"
+ }
+ }
+ }
+ },
+ "globals": {
+ "version": "9.18.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
+ "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
+ "dev": true
+ },
+ "globby": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
+ "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
+ "dev": true,
+ "requires": {
+ "array-union": "^1.0.1",
+ "glob": "^7.0.3",
+ "object-assign": "^4.0.1",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "dev": true
+ }
+ }
+ },
+ "graceful-fs": {
+ "version": "4.1.15",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
+ "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==",
+ "dev": true
+ },
+ "handle-thing": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz",
+ "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==",
+ "dev": true
+ },
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
+ "has-ansi": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^2.0.0"
+ }
+ },
+ "has-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
+ "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
+ "dev": true
+ },
+ "has-symbols": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
+ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
+ "dev": true
+ },
+ "has-value": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
+ "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
+ "dev": true,
+ "requires": {
+ "get-value": "^2.0.6",
+ "has-values": "^1.0.0",
+ "isobject": "^3.0.0"
+ }
+ },
+ "has-values": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
+ "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
+ "dev": true,
+ "requires": {
+ "is-number": "^3.0.0",
+ "kind-of": "^4.0.0"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
+ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
+ "dev": true,
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
+ }
+ },
+ "hash-base": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
+ "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "hash-sum": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
+ "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=",
+ "dev": true
+ },
+ "hash.js": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
+ "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "minimalistic-assert": "^1.0.1"
+ }
+ },
+ "he": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+ "dev": true
+ },
+ "hmac-drbg": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
+ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
+ "dev": true,
+ "requires": {
+ "hash.js": "^1.0.3",
+ "minimalistic-assert": "^1.0.0",
+ "minimalistic-crypto-utils": "^1.0.1"
+ }
+ },
+ "home-or-tmp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
+ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
+ "dev": true,
+ "requires": {
+ "os-homedir": "^1.0.0",
+ "os-tmpdir": "^1.0.1"
+ }
+ },
+ "hosted-git-info": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
+ "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
+ "dev": true
+ },
+ "hpack.js": {
+ "version": "2.1.6",
+ "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz",
+ "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "obuf": "^1.0.0",
+ "readable-stream": "^2.0.1",
+ "wbuf": "^1.1.0"
+ }
+ },
+ "html-comment-regex": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz",
+ "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==",
+ "dev": true
+ },
+ "html-entities": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz",
+ "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=",
+ "dev": true
+ },
+ "http-deceiver": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
+ "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=",
+ "dev": true
+ },
+ "http-errors": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+ "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
+ "dev": true,
+ "requires": {
+ "depd": "~1.1.2",
+ "inherits": "2.0.3",
+ "setprototypeof": "1.1.0",
+ "statuses": ">= 1.4.0 < 2"
+ }
+ },
+ "http-parser-js": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.0.tgz",
+ "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==",
+ "dev": true
+ },
+ "http-proxy": {
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz",
+ "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==",
+ "dev": true,
+ "requires": {
+ "eventemitter3": "^3.0.0",
+ "follow-redirects": "^1.0.0",
+ "requires-port": "^1.0.0"
+ }
+ },
+ "http-proxy-middleware": {
+ "version": "0.19.1",
+ "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz",
+ "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==",
+ "dev": true,
+ "requires": {
+ "http-proxy": "^1.17.0",
+ "is-glob": "^4.0.0",
+ "lodash": "^4.17.11",
+ "micromatch": "^3.1.10"
+ }
+ },
+ "https-browserify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
+ "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
+ "dev": true
+ },
+ "iconv-lite": {
+ "version": "0.4.23",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
+ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
+ "dev": true,
+ "requires": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ }
+ },
+ "icss-replace-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz",
+ "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=",
+ "dev": true
+ },
+ "icss-utils": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-2.1.0.tgz",
+ "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=",
+ "dev": true,
+ "requires": {
+ "postcss": "^6.0.1"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "postcss": {
+ "version": "6.0.23",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz",
+ "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.4.1",
+ "source-map": "^0.6.1",
+ "supports-color": "^5.4.0"
+ }
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "ieee754": {
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
+ "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
+ "dev": true
+ },
+ "import-local": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz",
+ "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==",
+ "dev": true,
+ "requires": {
+ "pkg-dir": "^2.0.0",
+ "resolve-cwd": "^2.0.0"
+ }
+ },
+ "indent-string": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
+ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
+ "dev": true,
+ "requires": {
+ "repeating": "^2.0.0"
+ }
+ },
+ "indexes-of": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz",
+ "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=",
+ "dev": true
+ },
+ "indexof": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
+ "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
+ "dev": true
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "dev": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
+ "dev": true
+ },
+ "internal-ip": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz",
+ "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=",
+ "dev": true,
+ "requires": {
+ "meow": "^3.3.0"
+ }
+ },
+ "interpret": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz",
+ "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==",
+ "dev": true
+ },
+ "invariant": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
+ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
+ "dev": true,
+ "requires": {
+ "loose-envify": "^1.0.0"
+ }
+ },
+ "invert-kv": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
+ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
+ "dev": true
+ },
+ "ip": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
+ "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=",
+ "dev": true
+ },
+ "ipaddr.js": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
+ "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==",
+ "dev": true
+ },
+ "is-absolute-url": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz",
+ "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=",
+ "dev": true
+ },
+ "is-accessor-descriptor": {
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+ "dev": true,
+ "requires": {
+ "kind-of": "^3.0.2"
+ }
+ },
+ "is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
+ "dev": true
+ },
+ "is-binary-path": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
+ "dev": true,
+ "requires": {
+ "binary-extensions": "^1.0.0"
+ }
+ },
+ "is-buffer": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+ "dev": true
+ },
+ "is-callable": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
+ "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
+ "dev": true
+ },
+ "is-data-descriptor": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+ "dev": true,
+ "requires": {
+ "kind-of": "^3.0.2"
+ }
+ },
+ "is-date-object": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
+ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
+ "dev": true
+ },
+ "is-descriptor": {
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+ "dev": true,
+ "requires": {
+ "is-accessor-descriptor": "^0.1.6",
+ "is-data-descriptor": "^0.1.4",
+ "kind-of": "^5.0.0"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+ "dev": true
+ }
+ }
+ },
+ "is-directory": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
+ "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
+ "dev": true
+ },
+ "is-extendable": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+ "dev": true
+ },
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+ "dev": true
+ },
+ "is-finite": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
+ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
+ "dev": true,
+ "requires": {
+ "number-is-nan": "^1.0.0"
+ }
+ },
+ "is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "dev": true,
+ "requires": {
+ "number-is-nan": "^1.0.0"
+ }
+ },
+ "is-glob": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-number": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+ "dev": true,
+ "requires": {
+ "kind-of": "^3.0.2"
+ }
+ },
+ "is-path-cwd": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",
+ "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=",
+ "dev": true
+ },
+ "is-path-in-cwd": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz",
+ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==",
+ "dev": true,
+ "requires": {
+ "is-path-inside": "^1.0.0"
+ }
+ },
+ "is-path-inside": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz",
+ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=",
+ "dev": true,
+ "requires": {
+ "path-is-inside": "^1.0.1"
+ }
+ },
+ "is-plain-obj": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
+ "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",
+ "dev": true
+ },
+ "is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "dev": true,
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ },
+ "is-regex": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
+ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.1"
+ }
+ },
+ "is-stream": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
+ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
+ "dev": true
+ },
+ "is-svg": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz",
+ "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=",
+ "dev": true,
+ "requires": {
+ "html-comment-regex": "^1.1.0"
+ }
+ },
+ "is-symbol": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
+ "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
+ "dev": true,
+ "requires": {
+ "has-symbols": "^1.0.0"
+ }
+ },
+ "is-utf8": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
+ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
+ "dev": true
+ },
+ "is-windows": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
+ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
+ "dev": true
+ },
+ "is-wsl": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
+ "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
+ "dev": true
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "dev": true
+ },
+ "isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
+ "dev": true
+ },
+ "isobject": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+ "dev": true
+ },
+ "js-base64": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz",
+ "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==",
+ "dev": true
+ },
+ "js-tokens": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
+ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.13.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+ "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "jsesc": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
+ "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
+ "dev": true
+ },
+ "json-loader": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz",
+ "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "json3": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz",
+ "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=",
+ "dev": true
+ },
+ "json5": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
+ "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
+ "dev": true
+ },
+ "killable": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz",
+ "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==",
+ "dev": true
+ },
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "dev": true,
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ },
+ "lazy-cache": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
+ "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
+ "dev": true
+ },
+ "lcid": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
+ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
+ "dev": true,
+ "requires": {
+ "invert-kv": "^1.0.0"
+ }
+ },
+ "load-json-file": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
+ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "strip-bom": "^3.0.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "dev": true
+ }
+ }
+ },
+ "loader-runner": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz",
+ "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==",
+ "dev": true
+ },
+ "loader-utils": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
+ "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
+ "dev": true,
+ "requires": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^2.0.0",
+ "json5": "^1.0.1"
+ },
+ "dependencies": {
+ "json5": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
+ "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.0"
+ }
+ },
+ "minimist": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+ "dev": true
+ }
+ }
+ },
+ "locate-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+ "dev": true,
+ "requires": {
+ "p-locate": "^2.0.0",
+ "path-exists": "^3.0.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
+ "lodash.camelcase": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
+ "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=",
+ "dev": true
+ },
+ "lodash.memoize": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
+ "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
+ "dev": true
+ },
+ "lodash.uniq": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
+ "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=",
+ "dev": true
+ },
+ "loglevel": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz",
+ "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=",
+ "dev": true
+ },
+ "longest": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
+ "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
+ "dev": true
+ },
+ "loose-envify": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+ "dev": true,
+ "requires": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ }
+ },
+ "loud-rejection": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
+ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
+ "dev": true,
+ "requires": {
+ "currently-unhandled": "^0.4.1",
+ "signal-exit": "^3.0.0"
+ }
+ },
+ "lru-cache": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
+ "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
+ "dev": true,
+ "requires": {
+ "pseudomap": "^1.0.2",
+ "yallist": "^2.1.2"
+ }
+ },
+ "make-dir": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
+ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
+ "dev": true,
+ "requires": {
+ "pify": "^3.0.0"
+ }
+ },
+ "map-cache": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
+ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
+ "dev": true
+ },
+ "map-obj": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
+ "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
+ "dev": true
+ },
+ "map-visit": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
+ "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
+ "dev": true,
+ "requires": {
+ "object-visit": "^1.0.0"
+ }
+ },
+ "math-expression-evaluator": {
+ "version": "1.2.17",
+ "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz",
+ "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=",
+ "dev": true
+ },
+ "md5.js": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
+ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
+ "dev": true,
+ "requires": {
+ "hash-base": "^3.0.0",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
+ "dev": true
+ },
+ "mem": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
+ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
+ "dev": true,
+ "requires": {
+ "mimic-fn": "^1.0.0"
+ }
+ },
+ "memory-fs": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
+ "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
+ "dev": true,
+ "requires": {
+ "errno": "^0.1.3",
+ "readable-stream": "^2.0.1"
+ }
+ },
+ "meow": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
+ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
+ "dev": true,
+ "requires": {
+ "camelcase-keys": "^2.0.0",
+ "decamelize": "^1.1.2",
+ "loud-rejection": "^1.0.0",
+ "map-obj": "^1.0.1",
+ "minimist": "^1.1.3",
+ "normalize-package-data": "^2.3.4",
+ "object-assign": "^4.0.1",
+ "read-pkg-up": "^1.0.1",
+ "redent": "^1.0.0",
+ "trim-newlines": "^1.0.0"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
+ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
+ "dev": true,
+ "requires": {
+ "path-exists": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "load-json-file": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0",
+ "strip-bom": "^2.0.0"
+ }
+ },
+ "minimist": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
+ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
+ "dev": true,
+ "requires": {
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "path-type": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
+ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "dev": true
+ },
+ "read-pkg": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
+ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
+ "dev": true,
+ "requires": {
+ "load-json-file": "^1.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^1.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
+ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
+ "dev": true,
+ "requires": {
+ "find-up": "^1.0.0",
+ "read-pkg": "^1.0.0"
+ }
+ },
+ "strip-bom": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
+ "dev": true,
+ "requires": {
+ "is-utf8": "^0.2.0"
+ }
+ }
+ }
+ },
+ "merge-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+ "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=",
+ "dev": true
+ },
+ "methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=",
+ "dev": true
+ },
+ "micromatch": {
+ "version": "3.1.10",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+ "dev": true,
+ "requires": {
+ "arr-diff": "^4.0.0",
+ "array-unique": "^0.3.2",
+ "braces": "^2.3.1",
+ "define-property": "^2.0.2",
+ "extend-shallow": "^3.0.2",
+ "extglob": "^2.0.4",
+ "fragment-cache": "^0.2.1",
+ "kind-of": "^6.0.2",
+ "nanomatch": "^1.2.9",
+ "object.pick": "^1.3.0",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.2"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
+ }
+ }
+ },
+ "miller-rabin": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
+ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.0.0",
+ "brorand": "^1.0.1"
+ }
+ },
+ "mime": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
+ "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==",
+ "dev": true
+ },
+ "mime-db": {
+ "version": "1.39.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.39.0.tgz",
+ "integrity": "sha512-DTsrw/iWVvwHH+9Otxccdyy0Tgiil6TWK/xhfARJZF/QFhwOgZgOIvA2/VIGpM8U7Q8z5nDmdDWC6tuVMJNibw==",
+ "dev": true
+ },
+ "mime-types": {
+ "version": "2.1.23",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.23.tgz",
+ "integrity": "sha512-ROk/m+gMVSrRxTkMlaQOvFmFmYDc7sZgrjjM76abqmd2Cc5fCV7jAMA5XUccEtJ3cYiYdgixUVI+fApc2LkXlw==",
+ "dev": true,
+ "requires": {
+ "mime-db": "~1.39.0"
+ }
+ },
+ "mimic-fn": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
+ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
+ "dev": true
+ },
+ "minimalistic-assert": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
+ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
+ "dev": true
+ },
+ "minimalistic-crypto-utils": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
+ "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "minimist": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "dev": true
+ },
+ "mixin-deep": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
+ "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
+ "dev": true,
+ "requires": {
+ "for-in": "^1.0.2",
+ "is-extendable": "^1.0.1"
+ },
+ "dependencies": {
+ "is-extendable": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+ "dev": true,
+ "requires": {
+ "is-plain-object": "^2.0.4"
+ }
+ }
+ }
+ },
+ "mkdirp": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "dev": true,
+ "requires": {
+ "minimist": "0.0.8"
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "dev": true
+ },
+ "multicast-dns": {
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz",
+ "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==",
+ "dev": true,
+ "requires": {
+ "dns-packet": "^1.3.1",
+ "thunky": "^1.0.2"
+ }
+ },
+ "multicast-dns-service-types": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz",
+ "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=",
+ "dev": true
+ },
+ "nan": {
+ "version": "2.13.2",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz",
+ "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==",
+ "dev": true,
+ "optional": true
+ },
+ "nanomatch": {
+ "version": "1.2.13",
+ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
+ "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
+ "dev": true,
+ "requires": {
+ "arr-diff": "^4.0.0",
+ "array-unique": "^0.3.2",
+ "define-property": "^2.0.2",
+ "extend-shallow": "^3.0.2",
+ "fragment-cache": "^0.2.1",
+ "is-windows": "^1.0.2",
+ "kind-of": "^6.0.2",
+ "object.pick": "^1.3.0",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.1"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
+ }
+ }
+ },
+ "negotiator": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
+ "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=",
+ "dev": true
+ },
+ "neo-async": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz",
+ "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==",
+ "dev": true
+ },
+ "next-tick": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
+ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
+ "dev": true
+ },
+ "nice-try": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
+ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
+ "dev": true
+ },
+ "node-forge": {
+ "version": "0.7.5",
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz",
+ "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==",
+ "dev": true
+ },
+ "node-libs-browser": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz",
+ "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==",
+ "dev": true,
+ "requires": {
+ "assert": "^1.1.1",
+ "browserify-zlib": "^0.2.0",
+ "buffer": "^4.3.0",
+ "console-browserify": "^1.1.0",
+ "constants-browserify": "^1.0.0",
+ "crypto-browserify": "^3.11.0",
+ "domain-browser": "^1.1.1",
+ "events": "^3.0.0",
+ "https-browserify": "^1.0.0",
+ "os-browserify": "^0.3.0",
+ "path-browserify": "0.0.0",
+ "process": "^0.11.10",
+ "punycode": "^1.2.4",
+ "querystring-es3": "^0.2.0",
+ "readable-stream": "^2.3.3",
+ "stream-browserify": "^2.0.1",
+ "stream-http": "^2.7.2",
+ "string_decoder": "^1.0.0",
+ "timers-browserify": "^2.0.4",
+ "tty-browserify": "0.0.0",
+ "url": "^0.11.0",
+ "util": "^0.11.0",
+ "vm-browserify": "0.0.4"
+ },
+ "dependencies": {
+ "punycode": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+ "dev": true
+ }
+ }
+ },
+ "normalize-package-data": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
+ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+ "dev": true,
+ "requires": {
+ "hosted-git-info": "^2.1.4",
+ "resolve": "^1.10.0",
+ "semver": "2 || 3 || 4 || 5",
+ "validate-npm-package-license": "^3.0.1"
+ }
+ },
+ "normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true
+ },
+ "normalize-range": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
+ "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=",
+ "dev": true
+ },
+ "normalize-url": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz",
+ "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=",
+ "dev": true,
+ "requires": {
+ "object-assign": "^4.0.1",
+ "prepend-http": "^1.0.0",
+ "query-string": "^4.1.0",
+ "sort-keys": "^1.0.0"
+ }
+ },
+ "npm-run-path": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
+ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
+ "dev": true,
+ "requires": {
+ "path-key": "^2.0.0"
+ }
+ },
+ "num2fraction": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz",
+ "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=",
+ "dev": true
+ },
+ "number-is-nan": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
+ "dev": true
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "dev": true
+ },
+ "object-copy": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
+ "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
+ "dev": true,
+ "requires": {
+ "copy-descriptor": "^0.1.0",
+ "define-property": "^0.2.5",
+ "kind-of": "^3.0.3"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "dev": true,
+ "requires": {
+ "is-descriptor": "^0.1.0"
+ }
+ }
+ }
+ },
+ "object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "dev": true
+ },
+ "object-visit": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
+ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
+ "dev": true,
+ "requires": {
+ "isobject": "^3.0.0"
+ }
+ },
+ "object.pick": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
+ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
+ "dev": true,
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ },
+ "obuf": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
+ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==",
+ "dev": true
+ },
+ "on-finished": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
+ "dev": true,
+ "requires": {
+ "ee-first": "1.1.1"
+ }
+ },
+ "on-headers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
+ "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
+ "dev": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "dev": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "opn": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz",
+ "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==",
+ "dev": true,
+ "requires": {
+ "is-wsl": "^1.1.0"
+ }
+ },
+ "original": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz",
+ "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==",
+ "dev": true,
+ "requires": {
+ "url-parse": "^1.4.3"
+ }
+ },
+ "os-browserify": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
+ "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=",
+ "dev": true
+ },
+ "os-homedir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
+ "dev": true
+ },
+ "os-locale": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
+ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
+ "dev": true,
+ "requires": {
+ "execa": "^0.7.0",
+ "lcid": "^1.0.0",
+ "mem": "^1.1.0"
+ }
+ },
+ "os-tmpdir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
+ "dev": true
+ },
+ "p-finally": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
+ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
+ "dev": true
+ },
+ "p-limit": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
+ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "dev": true,
+ "requires": {
+ "p-try": "^1.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+ "dev": true,
+ "requires": {
+ "p-limit": "^1.1.0"
+ }
+ },
+ "p-map": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz",
+ "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==",
+ "dev": true
+ },
+ "p-try": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+ "dev": true
+ },
+ "pako": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz",
+ "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==",
+ "dev": true
+ },
+ "parse-asn1": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz",
+ "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==",
+ "dev": true,
+ "requires": {
+ "asn1.js": "^4.0.0",
+ "browserify-aes": "^1.0.0",
+ "create-hash": "^1.1.0",
+ "evp_bytestokey": "^1.0.0",
+ "pbkdf2": "^3.0.3",
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "parse-json": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
+ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+ "dev": true,
+ "requires": {
+ "error-ex": "^1.2.0"
+ }
+ },
+ "parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "dev": true
+ },
+ "pascalcase": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
+ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
+ "dev": true
+ },
+ "path-browserify": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
+ "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=",
+ "dev": true
+ },
+ "path-dirname": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
+ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "dev": true
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "dev": true
+ },
+ "path-is-inside": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
+ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
+ "dev": true
+ },
+ "path-key": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+ "dev": true
+ },
+ "path-parse": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
+ "dev": true
+ },
+ "path-to-regexp": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=",
+ "dev": true
+ },
+ "path-type": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
+ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
+ "dev": true,
+ "requires": {
+ "pify": "^2.0.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "dev": true
+ }
+ }
+ },
+ "pbkdf2": {
+ "version": "3.0.17",
+ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz",
+ "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==",
+ "dev": true,
+ "requires": {
+ "create-hash": "^1.1.2",
+ "create-hmac": "^1.1.4",
+ "ripemd160": "^2.0.1",
+ "safe-buffer": "^5.0.1",
+ "sha.js": "^2.4.8"
+ }
+ },
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ },
+ "pinkie": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
+ "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
+ "dev": true
+ },
+ "pinkie-promise": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
+ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
+ "dev": true,
+ "requires": {
+ "pinkie": "^2.0.0"
+ }
+ },
+ "pkg-dir": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
+ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
+ "dev": true,
+ "requires": {
+ "find-up": "^2.1.0"
+ }
+ },
+ "portfinder": {
+ "version": "1.0.20",
+ "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz",
+ "integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==",
+ "dev": true,
+ "requires": {
+ "async": "^1.5.2",
+ "debug": "^2.2.0",
+ "mkdirp": "0.5.x"
+ },
+ "dependencies": {
+ "async": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
+ "dev": true
+ }
+ }
+ },
+ "posix-character-classes": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
+ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
+ "dev": true
+ },
+ "postcss": {
+ "version": "5.2.18",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz",
+ "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==",
+ "dev": true,
+ "requires": {
+ "chalk": "^1.1.3",
+ "js-base64": "^2.1.9",
+ "source-map": "^0.5.6",
+ "supports-color": "^3.2.3"
+ },
+ "dependencies": {
+ "supports-color": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
+ "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
+ "dev": true,
+ "requires": {
+ "has-flag": "^1.0.0"
+ }
+ }
+ }
+ },
+ "postcss-calc": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz",
+ "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.2",
+ "postcss-message-helpers": "^2.0.0",
+ "reduce-css-calc": "^1.2.6"
+ }
+ },
+ "postcss-colormin": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz",
+ "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=",
+ "dev": true,
+ "requires": {
+ "colormin": "^1.0.5",
+ "postcss": "^5.0.13",
+ "postcss-value-parser": "^3.2.3"
+ }
+ },
+ "postcss-convert-values": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz",
+ "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.11",
+ "postcss-value-parser": "^3.1.2"
+ }
+ },
+ "postcss-discard-comments": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz",
+ "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.14"
+ }
+ },
+ "postcss-discard-duplicates": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz",
+ "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.4"
+ }
+ },
+ "postcss-discard-empty": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz",
+ "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.14"
+ }
+ },
+ "postcss-discard-overridden": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz",
+ "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.16"
+ }
+ },
+ "postcss-discard-unused": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz",
+ "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.14",
+ "uniqs": "^2.0.0"
+ }
+ },
+ "postcss-filter-plugins": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz",
+ "integrity": "sha512-T53GVFsdinJhgwm7rg1BzbeBRomOg9y5MBVhGcsV0CxurUdVj1UlPdKtn7aqYA/c/QVkzKMjq2bSV5dKG5+AwQ==",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.4"
+ }
+ },
+ "postcss-load-config": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz",
+ "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=",
+ "dev": true,
+ "requires": {
+ "cosmiconfig": "^2.1.0",
+ "object-assign": "^4.1.0",
+ "postcss-load-options": "^1.2.0",
+ "postcss-load-plugins": "^2.3.0"
+ }
+ },
+ "postcss-load-options": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz",
+ "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=",
+ "dev": true,
+ "requires": {
+ "cosmiconfig": "^2.1.0",
+ "object-assign": "^4.1.0"
+ }
+ },
+ "postcss-load-plugins": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz",
+ "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=",
+ "dev": true,
+ "requires": {
+ "cosmiconfig": "^2.1.1",
+ "object-assign": "^4.1.0"
+ }
+ },
+ "postcss-merge-idents": {
+ "version": "2.1.7",
+ "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz",
+ "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.1",
+ "postcss": "^5.0.10",
+ "postcss-value-parser": "^3.1.1"
+ }
+ },
+ "postcss-merge-longhand": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz",
+ "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.4"
+ }
+ },
+ "postcss-merge-rules": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz",
+ "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=",
+ "dev": true,
+ "requires": {
+ "browserslist": "^1.5.2",
+ "caniuse-api": "^1.5.2",
+ "postcss": "^5.0.4",
+ "postcss-selector-parser": "^2.2.2",
+ "vendors": "^1.0.0"
+ },
+ "dependencies": {
+ "browserslist": {
+ "version": "1.7.7",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz",
+ "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=",
+ "dev": true,
+ "requires": {
+ "caniuse-db": "^1.0.30000639",
+ "electron-to-chromium": "^1.2.7"
+ }
+ }
+ }
+ },
+ "postcss-message-helpers": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz",
+ "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=",
+ "dev": true
+ },
+ "postcss-minify-font-values": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz",
+ "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=",
+ "dev": true,
+ "requires": {
+ "object-assign": "^4.0.1",
+ "postcss": "^5.0.4",
+ "postcss-value-parser": "^3.0.2"
+ }
+ },
+ "postcss-minify-gradients": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz",
+ "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.12",
+ "postcss-value-parser": "^3.3.0"
+ }
+ },
+ "postcss-minify-params": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz",
+ "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=",
+ "dev": true,
+ "requires": {
+ "alphanum-sort": "^1.0.1",
+ "postcss": "^5.0.2",
+ "postcss-value-parser": "^3.0.2",
+ "uniqs": "^2.0.0"
+ }
+ },
+ "postcss-minify-selectors": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz",
+ "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=",
+ "dev": true,
+ "requires": {
+ "alphanum-sort": "^1.0.2",
+ "has": "^1.0.1",
+ "postcss": "^5.0.14",
+ "postcss-selector-parser": "^2.0.0"
+ }
+ },
+ "postcss-modules-extract-imports": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.1.tgz",
+ "integrity": "sha512-6jt9XZwUhwmRUhb/CkyJY020PYaPJsCyt3UjbaWo6XEbH/94Hmv6MP7fG2C5NDU/BcHzyGYxNtHvM+LTf9HrYw==",
+ "dev": true,
+ "requires": {
+ "postcss": "^6.0.1"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "postcss": {
+ "version": "6.0.23",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz",
+ "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.4.1",
+ "source-map": "^0.6.1",
+ "supports-color": "^5.4.0"
+ }
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "postcss-modules-local-by-default": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz",
+ "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=",
+ "dev": true,
+ "requires": {
+ "css-selector-tokenizer": "^0.7.0",
+ "postcss": "^6.0.1"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "postcss": {
+ "version": "6.0.23",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz",
+ "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.4.1",
+ "source-map": "^0.6.1",
+ "supports-color": "^5.4.0"
+ }
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "postcss-modules-scope": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz",
+ "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=",
+ "dev": true,
+ "requires": {
+ "css-selector-tokenizer": "^0.7.0",
+ "postcss": "^6.0.1"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "postcss": {
+ "version": "6.0.23",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz",
+ "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.4.1",
+ "source-map": "^0.6.1",
+ "supports-color": "^5.4.0"
+ }
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "postcss-modules-values": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz",
+ "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=",
+ "dev": true,
+ "requires": {
+ "icss-replace-symbols": "^1.1.0",
+ "postcss": "^6.0.1"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "postcss": {
+ "version": "6.0.23",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz",
+ "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.4.1",
+ "source-map": "^0.6.1",
+ "supports-color": "^5.4.0"
+ }
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "postcss-normalize-charset": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz",
+ "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.5"
+ }
+ },
+ "postcss-normalize-url": {
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz",
+ "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=",
+ "dev": true,
+ "requires": {
+ "is-absolute-url": "^2.0.0",
+ "normalize-url": "^1.4.0",
+ "postcss": "^5.0.14",
+ "postcss-value-parser": "^3.2.3"
+ }
+ },
+ "postcss-ordered-values": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz",
+ "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.4",
+ "postcss-value-parser": "^3.0.1"
+ }
+ },
+ "postcss-reduce-idents": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz",
+ "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.4",
+ "postcss-value-parser": "^3.0.2"
+ }
+ },
+ "postcss-reduce-initial": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz",
+ "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=",
+ "dev": true,
+ "requires": {
+ "postcss": "^5.0.4"
+ }
+ },
+ "postcss-reduce-transforms": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz",
+ "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.1",
+ "postcss": "^5.0.8",
+ "postcss-value-parser": "^3.0.1"
+ }
+ },
+ "postcss-selector-parser": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz",
+ "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=",
+ "dev": true,
+ "requires": {
+ "flatten": "^1.0.2",
+ "indexes-of": "^1.0.1",
+ "uniq": "^1.0.1"
+ }
+ },
+ "postcss-svgo": {
+ "version": "2.1.6",
+ "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz",
+ "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=",
+ "dev": true,
+ "requires": {
+ "is-svg": "^2.0.0",
+ "postcss": "^5.0.14",
+ "postcss-value-parser": "^3.2.3",
+ "svgo": "^0.7.0"
+ }
+ },
+ "postcss-unique-selectors": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz",
+ "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=",
+ "dev": true,
+ "requires": {
+ "alphanum-sort": "^1.0.1",
+ "postcss": "^5.0.4",
+ "uniqs": "^2.0.0"
+ }
+ },
+ "postcss-value-parser": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
+ "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
+ "dev": true
+ },
+ "postcss-zindex": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz",
+ "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.1",
+ "postcss": "^5.0.4",
+ "uniqs": "^2.0.0"
+ }
+ },
+ "prepend-http": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
+ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=",
+ "dev": true
+ },
+ "prettier": {
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz",
+ "integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==",
+ "dev": true
+ },
+ "private": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
+ "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
+ "dev": true
+ },
+ "process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
+ "dev": true
+ },
+ "process-nextick-args": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
+ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
+ "dev": true
+ },
+ "proxy-addr": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
+ "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==",
+ "dev": true,
+ "requires": {
+ "forwarded": "~0.1.2",
+ "ipaddr.js": "1.9.0"
+ }
+ },
+ "prr": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
+ "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
+ "dev": true
+ },
+ "pseudomap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
+ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
+ "dev": true
+ },
+ "public-encrypt": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
+ "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.1.0",
+ "browserify-rsa": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "parse-asn1": "^5.0.0",
+ "randombytes": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "dev": true
+ },
+ "q": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
+ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
+ "dev": true
+ },
+ "qs": {
+ "version": "6.5.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
+ "dev": true
+ },
+ "query-string": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz",
+ "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=",
+ "dev": true,
+ "requires": {
+ "object-assign": "^4.1.0",
+ "strict-uri-encode": "^1.0.0"
+ }
+ },
+ "querystring": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
+ "dev": true
+ },
+ "querystring-es3": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
+ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
+ "dev": true
+ },
+ "querystringify": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz",
+ "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==",
+ "dev": true
+ },
+ "randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "randomfill": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
+ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
+ "dev": true,
+ "requires": {
+ "randombytes": "^2.0.5",
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "range-parser": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
+ "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=",
+ "dev": true
+ },
+ "raw-body": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz",
+ "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==",
+ "dev": true,
+ "requires": {
+ "bytes": "3.0.0",
+ "http-errors": "1.6.3",
+ "iconv-lite": "0.4.23",
+ "unpipe": "1.0.0"
+ }
+ },
+ "read-pkg": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
+ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
+ "dev": true,
+ "requires": {
+ "load-json-file": "^2.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^2.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
+ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
+ "dev": true,
+ "requires": {
+ "find-up": "^2.0.0",
+ "read-pkg": "^2.0.0"
+ }
+ },
+ "readable-stream": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "readdirp": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
+ "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.11",
+ "micromatch": "^3.1.10",
+ "readable-stream": "^2.0.2"
+ }
+ },
+ "redent": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
+ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
+ "dev": true,
+ "requires": {
+ "indent-string": "^2.1.0",
+ "strip-indent": "^1.0.1"
+ }
+ },
+ "reduce-css-calc": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz",
+ "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^0.4.2",
+ "math-expression-evaluator": "^1.2.14",
+ "reduce-function-call": "^1.0.1"
+ },
+ "dependencies": {
+ "balanced-match": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
+ "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=",
+ "dev": true
+ }
+ }
+ },
+ "reduce-function-call": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz",
+ "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^0.4.2"
+ },
+ "dependencies": {
+ "balanced-match": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
+ "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=",
+ "dev": true
+ }
+ }
+ },
+ "regenerate": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz",
+ "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==",
+ "dev": true
+ },
+ "regenerator-runtime": {
+ "version": "0.11.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+ "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
+ "dev": true
+ },
+ "regenerator-transform": {
+ "version": "0.10.1",
+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz",
+ "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.18.0",
+ "babel-types": "^6.19.0",
+ "private": "^0.1.6"
+ }
+ },
+ "regex-not": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
+ "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
+ "dev": true,
+ "requires": {
+ "extend-shallow": "^3.0.2",
+ "safe-regex": "^1.1.0"
+ }
+ },
+ "regexpu-core": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
+ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=",
+ "dev": true,
+ "requires": {
+ "regenerate": "^1.2.1",
+ "regjsgen": "^0.2.0",
+ "regjsparser": "^0.1.4"
+ }
+ },
+ "regjsgen": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
+ "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
+ "dev": true
+ },
+ "regjsparser": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
+ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
+ "dev": true,
+ "requires": {
+ "jsesc": "~0.5.0"
+ },
+ "dependencies": {
+ "jsesc": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+ "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
+ "dev": true
+ }
+ }
+ },
+ "remove-trailing-separator": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
+ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
+ "dev": true
+ },
+ "repeat-element": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
+ "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==",
+ "dev": true
+ },
+ "repeat-string": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
+ "dev": true
+ },
+ "repeating": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
+ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
+ "dev": true,
+ "requires": {
+ "is-finite": "^1.0.0"
+ }
+ },
+ "require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
+ "dev": true
+ },
+ "require-from-string": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz",
+ "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=",
+ "dev": true
+ },
+ "require-main-filename": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
+ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
+ "dev": true
+ },
+ "requires-port": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
+ "dev": true
+ },
+ "resolve": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz",
+ "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
+ "dev": true,
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
+ },
+ "resolve-cwd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz",
+ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=",
+ "dev": true,
+ "requires": {
+ "resolve-from": "^3.0.0"
+ }
+ },
+ "resolve-from": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
+ "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
+ "dev": true
+ },
+ "resolve-url": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
+ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
+ "dev": true
+ },
+ "ret": {
+ "version": "0.1.15",
+ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
+ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
+ "dev": true
+ },
+ "right-align": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
+ "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
+ "dev": true,
+ "requires": {
+ "align-text": "^0.1.1"
+ }
+ },
+ "rimraf": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
+ "ripemd160": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
+ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
+ "dev": true,
+ "requires": {
+ "hash-base": "^3.0.0",
+ "inherits": "^2.0.1"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "safe-regex": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
+ "dev": true,
+ "requires": {
+ "ret": "~0.1.10"
+ }
+ },
+ "safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "dev": true
+ },
+ "sax": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
+ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
+ "dev": true
+ },
+ "schema-utils": {
+ "version": "0.4.7",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
+ "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==",
+ "dev": true,
+ "requires": {
+ "ajv": "^6.1.0",
+ "ajv-keywords": "^3.1.0"
+ }
+ },
+ "select-hose": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
+ "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=",
+ "dev": true
+ },
+ "selfsigned": {
+ "version": "1.10.4",
+ "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.4.tgz",
+ "integrity": "sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw==",
+ "dev": true,
+ "requires": {
+ "node-forge": "0.7.5"
+ }
+ },
+ "semver": {
+ "version": "5.7.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
+ "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
+ "dev": true
+ },
+ "send": {
+ "version": "0.16.2",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz",
+ "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==",
+ "dev": true,
+ "requires": {
+ "debug": "2.6.9",
+ "depd": "~1.1.2",
+ "destroy": "~1.0.4",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "~1.6.2",
+ "mime": "1.4.1",
+ "ms": "2.0.0",
+ "on-finished": "~2.3.0",
+ "range-parser": "~1.2.0",
+ "statuses": "~1.4.0"
+ }
+ },
+ "serve-index": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz",
+ "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=",
+ "dev": true,
+ "requires": {
+ "accepts": "~1.3.4",
+ "batch": "0.6.1",
+ "debug": "2.6.9",
+ "escape-html": "~1.0.3",
+ "http-errors": "~1.6.2",
+ "mime-types": "~2.1.17",
+ "parseurl": "~1.3.2"
+ }
+ },
+ "serve-static": {
+ "version": "1.13.2",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz",
+ "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==",
+ "dev": true,
+ "requires": {
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.2",
+ "send": "0.16.2"
+ }
+ },
+ "set-blocking": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+ "dev": true
+ },
+ "set-value": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
+ "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
+ "dev": true,
+ "requires": {
+ "extend-shallow": "^2.0.1",
+ "is-extendable": "^0.1.1",
+ "is-plain-object": "^2.0.3",
+ "split-string": "^3.0.1"
+ },
+ "dependencies": {
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
+ }
+ },
+ "setimmediate": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=",
+ "dev": true
+ },
+ "setprototypeof": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
+ "dev": true
+ },
+ "sha.js": {
+ "version": "2.4.11",
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
+ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "shebang-command": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "dev": true,
+ "requires": {
+ "shebang-regex": "^1.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "dev": true
+ },
+ "signal-exit": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "dev": true
+ },
+ "slash": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
+ "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
+ "dev": true
+ },
+ "snapdragon": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
+ "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
+ "dev": true,
+ "requires": {
+ "base": "^0.11.1",
+ "debug": "^2.2.0",
+ "define-property": "^0.2.5",
+ "extend-shallow": "^2.0.1",
+ "map-cache": "^0.2.2",
+ "source-map": "^0.5.6",
+ "source-map-resolve": "^0.5.0",
+ "use": "^3.1.0"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "dev": true,
+ "requires": {
+ "is-descriptor": "^0.1.0"
+ }
+ },
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
+ }
+ },
+ "snapdragon-node": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
+ "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
+ "dev": true,
+ "requires": {
+ "define-property": "^1.0.0",
+ "isobject": "^3.0.0",
+ "snapdragon-util": "^3.0.1"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+ "dev": true,
+ "requires": {
+ "is-descriptor": "^1.0.0"
+ }
+ },
+ "is-accessor-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-data-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-descriptor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "dev": true,
+ "requires": {
+ "is-accessor-descriptor": "^1.0.0",
+ "is-data-descriptor": "^1.0.0",
+ "kind-of": "^6.0.2"
+ }
+ },
+ "kind-of": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
+ }
+ }
+ },
+ "snapdragon-util": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
+ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^3.2.0"
+ }
+ },
+ "sockjs": {
+ "version": "0.3.19",
+ "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz",
+ "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==",
+ "dev": true,
+ "requires": {
+ "faye-websocket": "^0.10.0",
+ "uuid": "^3.0.1"
+ }
+ },
+ "sockjs-client": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.5.tgz",
+ "integrity": "sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM=",
+ "dev": true,
+ "requires": {
+ "debug": "^2.6.6",
+ "eventsource": "0.1.6",
+ "faye-websocket": "~0.11.0",
+ "inherits": "^2.0.1",
+ "json3": "^3.3.2",
+ "url-parse": "^1.1.8"
+ },
+ "dependencies": {
+ "faye-websocket": {
+ "version": "0.11.1",
+ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz",
+ "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=",
+ "dev": true,
+ "requires": {
+ "websocket-driver": ">=0.5.1"
+ }
+ }
+ }
+ },
+ "sort-keys": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz",
+ "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=",
+ "dev": true,
+ "requires": {
+ "is-plain-obj": "^1.0.0"
+ }
+ },
+ "source-list-map": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
+ "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+ "dev": true
+ },
+ "source-map-resolve": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
+ "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==",
+ "dev": true,
+ "requires": {
+ "atob": "^2.1.1",
+ "decode-uri-component": "^0.2.0",
+ "resolve-url": "^0.2.1",
+ "source-map-url": "^0.4.0",
+ "urix": "^0.1.0"
+ }
+ },
+ "source-map-support": {
+ "version": "0.4.18",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
+ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
+ "dev": true,
+ "requires": {
+ "source-map": "^0.5.6"
+ }
+ },
+ "source-map-url": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
+ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
+ "dev": true
+ },
+ "spdx-correct": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
+ "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==",
+ "dev": true,
+ "requires": {
+ "spdx-expression-parse": "^3.0.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "spdx-exceptions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
+ "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
+ "dev": true
+ },
+ "spdx-expression-parse": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
+ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
+ "dev": true,
+ "requires": {
+ "spdx-exceptions": "^2.1.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "spdx-license-ids": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz",
+ "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==",
+ "dev": true
+ },
+ "spdy": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.0.tgz",
+ "integrity": "sha512-ot0oEGT/PGUpzf/6uk4AWLqkq+irlqHXkrdbk51oWONh3bxQmBuljxPNl66zlRRcIJStWq0QkLUCPOPjgjvU0Q==",
+ "dev": true,
+ "requires": {
+ "debug": "^4.1.0",
+ "handle-thing": "^2.0.0",
+ "http-deceiver": "^1.2.7",
+ "select-hose": "^2.0.0",
+ "spdy-transport": "^3.0.0"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
+ "dev": true
+ }
+ }
+ },
+ "spdy-transport": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz",
+ "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==",
+ "dev": true,
+ "requires": {
+ "debug": "^4.1.0",
+ "detect-node": "^2.0.4",
+ "hpack.js": "^2.1.6",
+ "obuf": "^1.1.2",
+ "readable-stream": "^3.0.6",
+ "wbuf": "^1.7.3"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
+ "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ }
+ }
+ },
+ "split-string": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
+ "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
+ "dev": true,
+ "requires": {
+ "extend-shallow": "^3.0.0"
+ }
+ },
+ "sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+ "dev": true
+ },
+ "static-extend": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
+ "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
+ "dev": true,
+ "requires": {
+ "define-property": "^0.2.5",
+ "object-copy": "^0.1.0"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "dev": true,
+ "requires": {
+ "is-descriptor": "^0.1.0"
+ }
+ }
+ }
+ },
+ "statuses": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
+ "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==",
+ "dev": true
+ },
+ "stream-browserify": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz",
+ "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==",
+ "dev": true,
+ "requires": {
+ "inherits": "~2.0.1",
+ "readable-stream": "^2.0.2"
+ }
+ },
+ "stream-http": {
+ "version": "2.8.3",
+ "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
+ "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
+ "dev": true,
+ "requires": {
+ "builtin-status-codes": "^3.0.0",
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.3.6",
+ "to-arraybuffer": "^1.0.0",
+ "xtend": "^4.0.0"
+ }
+ },
+ "strict-uri-encode": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
+ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
+ "dev": true
+ },
+ "string-width": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "dev": true,
+ "requires": {
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^4.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^3.0.0"
+ }
+ }
+ }
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^2.0.0"
+ }
+ },
+ "strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+ "dev": true
+ },
+ "strip-eof": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
+ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
+ "dev": true
+ },
+ "strip-indent": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
+ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
+ "dev": true,
+ "requires": {
+ "get-stdin": "^4.0.1"
+ }
+ },
+ "supports-color": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "dev": true
+ },
+ "svgo": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz",
+ "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=",
+ "dev": true,
+ "requires": {
+ "coa": "~1.0.1",
+ "colors": "~1.1.2",
+ "csso": "~2.3.1",
+ "js-yaml": "~3.7.0",
+ "mkdirp": "~0.5.1",
+ "sax": "~1.2.1",
+ "whet.extend": "~0.9.9"
+ },
+ "dependencies": {
+ "esprima": {
+ "version": "2.7.3",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
+ "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz",
+ "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^2.6.0"
+ }
+ }
+ }
+ },
+ "tapable": {
+ "version": "0.2.9",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.9.tgz",
+ "integrity": "sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A==",
+ "dev": true
+ },
+ "thunky": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz",
+ "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==",
+ "dev": true
+ },
+ "time-stamp": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-2.2.0.tgz",
+ "integrity": "sha512-zxke8goJQpBeEgD82CXABeMh0LSJcj7CXEd0OHOg45HgcofF7pxNwZm9+RknpxpDhwN4gFpySkApKfFYfRQnUA==",
+ "dev": true
+ },
+ "timers-browserify": {
+ "version": "2.0.10",
+ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz",
+ "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==",
+ "dev": true,
+ "requires": {
+ "setimmediate": "^1.0.4"
+ }
+ },
+ "to-arraybuffer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
+ "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
+ "dev": true
+ },
+ "to-fast-properties": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
+ "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
+ "dev": true
+ },
+ "to-object-path": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
+ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
+ "dev": true,
+ "requires": {
+ "kind-of": "^3.0.2"
+ }
+ },
+ "to-regex": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
+ "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
+ "dev": true,
+ "requires": {
+ "define-property": "^2.0.2",
+ "extend-shallow": "^3.0.2",
+ "regex-not": "^1.0.2",
+ "safe-regex": "^1.1.0"
+ }
+ },
+ "to-regex-range": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+ "dev": true,
+ "requires": {
+ "is-number": "^3.0.0",
+ "repeat-string": "^1.6.1"
+ }
+ },
+ "trim-newlines": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
+ "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
+ "dev": true
+ },
+ "trim-right": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
+ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
+ "dev": true
+ },
+ "tty-browserify": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
+ "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
+ "dev": true
+ },
+ "type-is": {
+ "version": "1.6.16",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
+ "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==",
+ "dev": true,
+ "requires": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.18"
+ }
+ },
+ "uglify-js": {
+ "version": "2.8.29",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
+ "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
+ "dev": true,
+ "requires": {
+ "source-map": "~0.5.1",
+ "uglify-to-browserify": "~1.0.0",
+ "yargs": "~3.10.0"
+ },
+ "dependencies": {
+ "yargs": {
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
+ "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^1.0.2",
+ "cliui": "^2.1.0",
+ "decamelize": "^1.0.0",
+ "window-size": "0.1.0"
+ }
+ }
+ }
+ },
+ "uglify-to-browserify": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
+ "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
+ "dev": true,
+ "optional": true
+ },
+ "uglifyjs-webpack-plugin": {
+ "version": "0.4.6",
+ "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz",
+ "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=",
+ "dev": true,
+ "requires": {
+ "source-map": "^0.5.6",
+ "uglify-js": "^2.8.29",
+ "webpack-sources": "^1.0.1"
+ }
+ },
+ "union-value": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
+ "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
+ "dev": true,
+ "requires": {
+ "arr-union": "^3.1.0",
+ "get-value": "^2.0.6",
+ "is-extendable": "^0.1.1",
+ "set-value": "^2.0.1"
+ }
+ },
+ "uniq": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz",
+ "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=",
+ "dev": true
+ },
+ "uniqs": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz",
+ "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=",
+ "dev": true
+ },
+ "unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
+ "dev": true
+ },
+ "unset-value": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
+ "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
+ "dev": true,
+ "requires": {
+ "has-value": "^0.3.1",
+ "isobject": "^3.0.0"
+ },
+ "dependencies": {
+ "has-value": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
+ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
+ "dev": true,
+ "requires": {
+ "get-value": "^2.0.3",
+ "has-values": "^0.1.4",
+ "isobject": "^2.0.0"
+ },
+ "dependencies": {
+ "isobject": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+ "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
+ "dev": true,
+ "requires": {
+ "isarray": "1.0.0"
+ }
+ }
+ }
+ },
+ "has-values": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
+ "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
+ "dev": true
+ }
+ }
+ },
+ "upath": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz",
+ "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==",
+ "dev": true
+ },
+ "uri-js": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
+ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
+ "dev": true,
+ "requires": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "urix": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
+ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
+ "dev": true
+ },
+ "url": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
+ "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
+ "dev": true,
+ "requires": {
+ "punycode": "1.3.2",
+ "querystring": "0.2.0"
+ },
+ "dependencies": {
+ "punycode": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
+ "dev": true
+ }
+ }
+ },
+ "url-parse": {
+ "version": "1.4.6",
+ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.6.tgz",
+ "integrity": "sha512-/B8AD9iQ01seoXmXf9z/MjLZQIdOoYl/+gvsQF6+mpnxaTfG9P7srYaiqaDMyKkR36XMXfhqSHss5MyFAO8lew==",
+ "dev": true,
+ "requires": {
+ "querystringify": "^2.0.0",
+ "requires-port": "^1.0.0"
+ }
+ },
+ "use": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
+ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
+ "dev": true
+ },
+ "util": {
+ "version": "0.11.1",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
+ "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
+ "dev": true,
+ "requires": {
+ "inherits": "2.0.3"
+ }
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+ "dev": true
+ },
+ "utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
+ "dev": true
+ },
+ "uuid": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
+ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
+ "dev": true
+ },
+ "validate-npm-package-license": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+ "dev": true,
+ "requires": {
+ "spdx-correct": "^3.0.0",
+ "spdx-expression-parse": "^3.0.0"
+ }
+ },
+ "vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
+ "dev": true
+ },
+ "vendors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz",
+ "integrity": "sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==",
+ "dev": true
+ },
+ "vm-browserify": {
+ "version": "0.0.4",
+ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
+ "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
+ "dev": true,
+ "requires": {
+ "indexof": "0.0.1"
+ }
+ },
+ "vue": {
+ "version": "2.6.10",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz",
+ "integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ=="
+ },
+ "vue-hot-reload-api": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.3.tgz",
+ "integrity": "sha512-KmvZVtmM26BQOMK1rwUZsrqxEGeKiYSZGA7SNWE6uExx8UX/cj9hq2MRV/wWC3Cq6AoeDGk57rL9YMFRel/q+g==",
+ "dev": true
+ },
+ "vue-loader": {
+ "version": "13.7.3",
+ "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-13.7.3.tgz",
+ "integrity": "sha512-ACCwbfeC6HjY2pnDii+Zer+MZ6sdOtwvLmDXRK/BoD3WNR551V22R6KEagwHoTRJ0ZlIhpCBkptpCU6+Ri/05w==",
+ "dev": true,
+ "requires": {
+ "consolidate": "^0.14.0",
+ "hash-sum": "^1.0.2",
+ "loader-utils": "^1.1.0",
+ "lru-cache": "^4.1.1",
+ "postcss": "^6.0.8",
+ "postcss-load-config": "^1.1.0",
+ "postcss-selector-parser": "^2.0.0",
+ "prettier": "^1.7.0",
+ "resolve": "^1.4.0",
+ "source-map": "^0.6.1",
+ "vue-hot-reload-api": "^2.2.0",
+ "vue-style-loader": "^3.0.0",
+ "vue-template-es2015-compiler": "^1.6.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "postcss": {
+ "version": "6.0.23",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz",
+ "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.4.1",
+ "source-map": "^0.6.1",
+ "supports-color": "^5.4.0"
+ }
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "vue-material-design-icons": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/vue-material-design-icons/-/vue-material-design-icons-0.8.2.tgz",
+ "integrity": "sha512-/NSZtfgcracfNRGf564Du3vH2EQIvQWmlQ3t9Zbg+GAe5kvGMp+tqlY+Yxu9/ow/obxOauR6BRrkLQ07rtqxUA=="
+ },
+ "vue-style-loader": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-3.1.2.tgz",
+ "integrity": "sha512-ICtVdK/p+qXWpdSs2alWtsXt9YnDoYjQe0w5616j9+/EhjoxZkbun34uWgsMFnC1MhrMMwaWiImz3K2jK1Yp2Q==",
+ "dev": true,
+ "requires": {
+ "hash-sum": "^1.0.2",
+ "loader-utils": "^1.0.2"
+ }
+ },
+ "vue-template-compiler": {
+ "version": "2.6.10",
+ "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.10.tgz",
+ "integrity": "sha512-jVZkw4/I/HT5ZMvRnhv78okGusqe0+qH2A0Em0Cp8aq78+NK9TII263CDVz2QXZsIT+yyV/gZc/j/vlwa+Epyg==",
+ "dev": true,
+ "requires": {
+ "de-indent": "^1.0.2",
+ "he": "^1.1.0"
+ }
+ },
+ "vue-template-es2015-compiler": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz",
+ "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
+ "dev": true
+ },
+ "vuex": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.1.0.tgz",
+ "integrity": "sha512-mdHeHT/7u4BncpUZMlxNaIdcN/HIt1GsGG5LKByArvYG/v6DvHcOxvDCts+7SRdCoIRGllK8IMZvQtQXLppDYg=="
+ },
+ "watchpack": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz",
+ "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==",
+ "dev": true,
+ "requires": {
+ "chokidar": "^2.0.2",
+ "graceful-fs": "^4.1.2",
+ "neo-async": "^2.5.0"
+ }
+ },
+ "wbuf": {
+ "version": "1.7.3",
+ "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz",
+ "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==",
+ "dev": true,
+ "requires": {
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "webpack": {
+ "version": "3.12.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.12.0.tgz",
+ "integrity": "sha512-Sw7MdIIOv/nkzPzee4o0EdvCuPmxT98+vVpIvwtcwcF1Q4SDSNp92vwcKc4REe7NItH9f1S4ra9FuQ7yuYZ8bQ==",
+ "dev": true,
+ "requires": {
+ "acorn": "^5.0.0",
+ "acorn-dynamic-import": "^2.0.0",
+ "ajv": "^6.1.0",
+ "ajv-keywords": "^3.1.0",
+ "async": "^2.1.2",
+ "enhanced-resolve": "^3.4.0",
+ "escope": "^3.6.0",
+ "interpret": "^1.0.0",
+ "json-loader": "^0.5.4",
+ "json5": "^0.5.1",
+ "loader-runner": "^2.3.0",
+ "loader-utils": "^1.1.0",
+ "memory-fs": "~0.4.1",
+ "mkdirp": "~0.5.0",
+ "node-libs-browser": "^2.0.0",
+ "source-map": "^0.5.3",
+ "supports-color": "^4.2.1",
+ "tapable": "^0.2.7",
+ "uglifyjs-webpack-plugin": "^0.4.6",
+ "watchpack": "^1.4.0",
+ "webpack-sources": "^1.0.1",
+ "yargs": "^8.0.2"
+ },
+ "dependencies": {
+ "has-flag": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
+ "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
+ "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
+ "dev": true,
+ "requires": {
+ "has-flag": "^2.0.0"
+ }
+ }
+ }
+ },
+ "webpack-dev-middleware": {
+ "version": "1.12.2",
+ "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz",
+ "integrity": "sha512-FCrqPy1yy/sN6U/SaEZcHKRXGlqU0DUaEBL45jkUYoB8foVb6wCnbIJ1HKIx+qUFTW+3JpVcCJCxZ8VATL4e+A==",
+ "dev": true,
+ "requires": {
+ "memory-fs": "~0.4.1",
+ "mime": "^1.5.0",
+ "path-is-absolute": "^1.0.0",
+ "range-parser": "^1.0.3",
+ "time-stamp": "^2.0.0"
+ },
+ "dependencies": {
+ "mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "dev": true
+ }
+ }
+ },
+ "webpack-dev-server": {
+ "version": "2.11.5",
+ "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.5.tgz",
+ "integrity": "sha512-7TdOKKt7G3sWEhPKV0zP+nD0c4V9YKUJ3wDdBwQsZNo58oZIRoVIu66pg7PYkBW8A74msP9C2kLwmxGHndz/pw==",
+ "dev": true,
+ "requires": {
+ "ansi-html": "0.0.7",
+ "array-includes": "^3.0.3",
+ "bonjour": "^3.5.0",
+ "chokidar": "^2.1.2",
+ "compression": "^1.7.3",
+ "connect-history-api-fallback": "^1.3.0",
+ "debug": "^3.1.0",
+ "del": "^3.0.0",
+ "express": "^4.16.2",
+ "html-entities": "^1.2.0",
+ "http-proxy-middleware": "^0.19.1",
+ "import-local": "^1.0.0",
+ "internal-ip": "1.2.0",
+ "ip": "^1.1.5",
+ "killable": "^1.0.0",
+ "loglevel": "^1.4.1",
+ "opn": "^5.1.0",
+ "portfinder": "^1.0.9",
+ "selfsigned": "^1.9.1",
+ "serve-index": "^1.9.1",
+ "sockjs": "0.3.19",
+ "sockjs-client": "1.1.5",
+ "spdy": "^4.0.0",
+ "strip-ansi": "^3.0.0",
+ "supports-color": "^5.1.0",
+ "webpack-dev-middleware": "1.12.2",
+ "yargs": "6.6.0"
+ },
+ "dependencies": {
+ "camelcase": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
+ "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
+ "dev": true
+ },
+ "cliui": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
+ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
+ "dev": true,
+ "requires": {
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1",
+ "wrap-ansi": "^2.0.0"
+ }
+ },
+ "debug": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "find-up": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
+ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
+ "dev": true,
+ "requires": {
+ "path-exists": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "load-json-file": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0",
+ "strip-bom": "^2.0.0"
+ }
+ },
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
+ "dev": true
+ },
+ "os-locale": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
+ "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
+ "dev": true,
+ "requires": {
+ "lcid": "^1.0.0"
+ }
+ },
+ "path-exists": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
+ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
+ "dev": true,
+ "requires": {
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "path-type": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
+ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "dev": true
+ },
+ "read-pkg": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
+ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
+ "dev": true,
+ "requires": {
+ "load-json-file": "^1.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^1.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
+ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
+ "dev": true,
+ "requires": {
+ "find-up": "^1.0.0",
+ "read-pkg": "^1.0.0"
+ }
+ },
+ "string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "dev": true,
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ }
+ },
+ "strip-bom": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
+ "dev": true,
+ "requires": {
+ "is-utf8": "^0.2.0"
+ }
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ },
+ "which-module": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
+ "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=",
+ "dev": true
+ },
+ "yargs": {
+ "version": "6.6.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz",
+ "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^3.0.0",
+ "cliui": "^3.2.0",
+ "decamelize": "^1.1.1",
+ "get-caller-file": "^1.0.1",
+ "os-locale": "^1.4.0",
+ "read-pkg-up": "^1.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^1.0.1",
+ "set-blocking": "^2.0.0",
+ "string-width": "^1.0.2",
+ "which-module": "^1.0.0",
+ "y18n": "^3.2.1",
+ "yargs-parser": "^4.2.0"
+ }
+ },
+ "yargs-parser": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz",
+ "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^3.0.0"
+ }
+ }
+ }
+ },
+ "webpack-sources": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz",
+ "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==",
+ "dev": true,
+ "requires": {
+ "source-list-map": "^2.0.0",
+ "source-map": "~0.6.1"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
+ }
+ },
+ "websocket-driver": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz",
+ "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=",
+ "dev": true,
+ "requires": {
+ "http-parser-js": ">=0.4.0",
+ "websocket-extensions": ">=0.1.1"
+ }
+ },
+ "websocket-extensions": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz",
+ "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==",
+ "dev": true
+ },
+ "whet.extend": {
+ "version": "0.9.9",
+ "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz",
+ "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=",
+ "dev": true
+ },
+ "which": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "which-module": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
+ "dev": true
+ },
+ "window-size": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
+ "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
+ "dev": true
+ },
+ "wordwrap": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
+ "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
+ "dev": true
+ },
+ "wrap-ansi": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
+ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
+ "dev": true,
+ "requires": {
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1"
+ },
+ "dependencies": {
+ "string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "dev": true,
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ }
+ }
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "dev": true
+ },
+ "xtend": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
+ "dev": true
+ },
+ "y18n": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
+ "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
+ "dev": true
+ },
+ "yallist": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
+ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
+ "dev": true
+ },
+ "yargs": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
+ "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^4.1.0",
+ "cliui": "^3.2.0",
+ "decamelize": "^1.1.1",
+ "get-caller-file": "^1.0.1",
+ "os-locale": "^2.0.0",
+ "read-pkg-up": "^2.0.0",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^1.0.1",
+ "set-blocking": "^2.0.0",
+ "string-width": "^2.0.0",
+ "which-module": "^2.0.0",
+ "y18n": "^3.2.1",
+ "yargs-parser": "^7.0.0"
+ },
+ "dependencies": {
+ "camelcase": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
+ "dev": true
+ },
+ "cliui": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
+ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
+ "dev": true,
+ "requires": {
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1",
+ "wrap-ansi": "^2.0.0"
+ },
+ "dependencies": {
+ "string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "dev": true,
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ }
+ }
+ }
+ }
+ }
+ },
+ "yargs-parser": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz",
+ "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^4.1.0"
+ },
+ "dependencies": {
+ "camelcase": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
+ "dev": true
+ }
+ }
+ }
+ }
+}
diff --git a/third_party/webrender/debugger/package.json b/third_party/webrender/debugger/package.json
new file mode 100644
index 00000000000..b7f9aadfc07
--- /dev/null
+++ b/third_party/webrender/debugger/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "debugger",
+ "description": "WebRender Debugger",
+ "version": "1.0.0",
+ "author": "Glenn Watson <github@intuitionlibrary.com>",
+ "license": "MIT",
+ "private": true,
+ "scripts": {
+ "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
+ "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
+ },
+ "dependencies": {
+ "buefy": "^0.6.7",
+ "vue": "^2.5.11",
+ "vue-material-design-icons": "^0.8.2",
+ "vuex": "^3.0.1"
+ },
+ "browserslist": [
+ "> 1%",
+ "last 2 versions",
+ "not ie <= 8"
+ ],
+ "devDependencies": {
+ "babel-core": "^6.26.0",
+ "babel-loader": "^7.1.2",
+ "babel-preset-env": "^1.6.0",
+ "babel-preset-stage-3": "^6.24.1",
+ "cross-env": "^5.0.5",
+ "css-loader": "^0.28.7",
+ "file-loader": "^1.1.4",
+ "vue-loader": "^13.0.5",
+ "vue-template-compiler": "^2.4.4",
+ "webpack": "^3.6.0",
+ "webpack-dev-server": "^2.9.1"
+ }
+}
diff --git a/third_party/webrender/debugger/src/App.vue b/third_party/webrender/debugger/src/App.vue
new file mode 100644
index 00000000000..01d303e79e5
--- /dev/null
+++ b/third_party/webrender/debugger/src/App.vue
@@ -0,0 +1,55 @@
+<template>
+ <div>
+ <app-navbar></app-navbar>
+ <div class="section">
+ <div class="container">
+ <div class="columns">
+ <div class="column is-3">
+ <app-navmenu></app-navmenu>
+ </div>
+ <div class="column">
+ <app-options v-if="page == 'options'"></app-options>
+ <app-passview v-if="page == 'passes'"></app-passview>
+ <app-rendertaskview v-if="page == 'render_tasks'"></app-rendertaskview>
+ <app-documentview v-if="page == 'documents'"></app-documentview>
+ <app-clipscrolltreeview v-if="page == 'clip_scroll_tree'"></app-clipscrolltreeview>
+ <app-screenshotview v-if="page == 'screenshot'"></app-screenshotview>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+import NavBar from './components/NavBar.vue'
+import NavMenu from './components/NavMenu.vue'
+import OptionsPage from './components/OptionsPage.vue'
+import PassViewPage from './components/PassViewPage.vue'
+import RenderTaskViewPage from './components/RenderTaskViewPage.vue'
+import DocumentViewPage from './components/DocumentViewPage.vue'
+import ClipScrollTreeViewPage from './components/ClipScrollTreeViewPage.vue'
+import ScreenshotPage from './components/ScreenshotPage.vue'
+
+export default {
+ name: 'app',
+ components: {
+ 'app-navbar': NavBar,
+ 'app-navmenu': NavMenu,
+ 'app-options': OptionsPage,
+ 'app-passview': PassViewPage,
+ 'app-rendertaskview': RenderTaskViewPage,
+ 'app-documentview': DocumentViewPage,
+ 'app-clipscrolltreeview': ClipScrollTreeViewPage,
+ 'app-screenshotview': ScreenshotPage,
+ },
+ computed: {
+ page() {
+ return this.$store.state.page;
+ }
+ },
+}
+</script>
+
+<style>
+</style>
diff --git a/third_party/webrender/debugger/src/components/ClipScrollTreeViewPage.vue b/third_party/webrender/debugger/src/components/ClipScrollTreeViewPage.vue
new file mode 100644
index 00000000000..66a1edaf304
--- /dev/null
+++ b/third_party/webrender/debugger/src/components/ClipScrollTreeViewPage.vue
@@ -0,0 +1,37 @@
+<template>
+ <div class="box">
+ <h1 class="title">Clip-Scroll Tree <a :disabled="disabled" v-on:click="fetch" class="button is-info">Refresh</a></h1>
+ <hr/>
+ <div>
+ <ul>
+ <app-treeview :model=clip_scroll_tree></app-treeview>
+ </ul>
+ </div>
+ </div>
+</template>
+
+<script>
+import TreeView from './TreeView.vue'
+
+export default {
+ components: {
+ 'app-treeview': TreeView,
+ },
+ methods: {
+ fetch: function() {
+ this.$store.dispatch('sendMessage', "fetch_clip_scroll_tree");
+ }
+ },
+ computed: {
+ disabled() {
+ return !this.$store.state.connected
+ },
+ clip_scroll_tree() {
+ return this.$store.state.clip_scroll_tree
+ }
+ },
+}
+</script>
+
+<style>
+</style>
diff --git a/third_party/webrender/debugger/src/components/DocumentViewPage.vue b/third_party/webrender/debugger/src/components/DocumentViewPage.vue
new file mode 100644
index 00000000000..6d5f02da735
--- /dev/null
+++ b/third_party/webrender/debugger/src/components/DocumentViewPage.vue
@@ -0,0 +1,37 @@
+<template>
+ <div class="box">
+ <h1 class="title">Documents <a :disabled="disabled" v-on:click="fetch" class="button is-info">Refresh</a></h1>
+ <hr/>
+ <div>
+ <ul>
+ <app-treeview :model=documents></app-treeview>
+ </ul>
+ </div>
+ </div>
+</template>
+
+<script>
+import TreeView from './TreeView.vue'
+
+export default {
+ components: {
+ 'app-treeview': TreeView,
+ },
+ methods: {
+ fetch: function() {
+ this.$store.dispatch('sendMessage', "fetch_documents");
+ }
+ },
+ computed: {
+ disabled() {
+ return !this.$store.state.connected
+ },
+ documents() {
+ return this.$store.state.documents
+ }
+ },
+}
+</script>
+
+<style>
+</style>
diff --git a/third_party/webrender/debugger/src/components/NavBar.vue b/third_party/webrender/debugger/src/components/NavBar.vue
new file mode 100644
index 00000000000..2f8008d67d4
--- /dev/null
+++ b/third_party/webrender/debugger/src/components/NavBar.vue
@@ -0,0 +1,41 @@
+<template>
+ <nav class="navbar has-shadow">
+ <div class="navbar-brand">
+ <a class="navbar-item" href="#">WebRender Debugger</a>
+ </div>
+
+ <div class="navbar-menu">
+ <div class="navbar-start"></div>
+
+ <div class="navbar-end">
+ <div class="navbar-item">
+ <p class="control">
+ <button v-if="isConnected" @click="disconnect" class="button is-danger">Disconnect</button>
+ <button v-else @click="connect" class="button is-success">Connect</button>
+ </p>
+ </div>
+ </div>
+ </div>
+ </nav>
+</template>
+
+<script>
+export default {
+ computed: {
+ isConnected() {
+ return this.$store.state.connected;
+ },
+ },
+ methods: {
+ connect() {
+ this.$store.dispatch('connect');
+ },
+ disconnect() {
+ this.$store.dispatch('disconnect');
+ },
+ }
+}
+</script>
+
+<style>
+</style>
diff --git a/third_party/webrender/debugger/src/components/NavMenu.vue b/third_party/webrender/debugger/src/components/NavMenu.vue
new file mode 100644
index 00000000000..5a7cc3512a4
--- /dev/null
+++ b/third_party/webrender/debugger/src/components/NavMenu.vue
@@ -0,0 +1,33 @@
+<template>
+ <aside class="menu">
+ <p class="menu-label">
+ Pages
+ </p>
+ <ul class="menu-list">
+ <li><a @click="setPage('options')" :class="{ 'is-active': page == 'options' }">Debug Options</a></li>
+ <li><a @click="setPage('passes')" :class="{ 'is-active': page == 'passes' }">Passes</a></li>
+ <li><a @click="setPage('render_tasks')" :class="{ 'is-active': page == 'render_tasks' }">Render Tasks</a></li>
+ <li><a @click="setPage('documents')" :class="{ 'is-active': page == 'documents' }">Documents</a></li>
+ <li><a @click="setPage('clip_scroll_tree')" v-bind:class="{ 'is-active': page == 'clip_scroll_tree' }">Clip-Scroll Tree</a></li>
+ <li><a @click="setPage('screenshot')" v-bind:class="{ 'is-active': page == 'screenshot' }">Screenshot</a></li>
+ </ul>
+ </aside>
+</template>
+
+<script>
+export default {
+ methods: {
+ setPage(name) {
+ this.$store.commit('setPage', name);
+ },
+ },
+ computed: {
+ page() {
+ return this.$store.state.page;
+ }
+ },
+}
+</script>
+
+<style>
+</style>
diff --git a/third_party/webrender/debugger/src/components/OptionsPage.vue b/third_party/webrender/debugger/src/components/OptionsPage.vue
new file mode 100644
index 00000000000..fd8288c42cc
--- /dev/null
+++ b/third_party/webrender/debugger/src/components/OptionsPage.vue
@@ -0,0 +1,162 @@
+<template>
+ <div class="box">
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" :disabled="disabled" v-on:click="setProfiler($event.target.checked)">
+ Profiler
+ </label>
+ </div>
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" :disabled="disabled" v-on:click="setTextureCacheDebugger($event.target.checked)">
+ Texture cache debugger
+ </label>
+ </div>
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" :disabled="disabled" v-on:click="setRenderTargetDebugger($event.target.checked)">
+ Render target debugger
+ </label>
+ </div>
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" :disabled="disabled" v-on:click="setAlphaRectsDebugger($event.target.checked)">
+ Alpha primitive rects debugger
+ </label>
+ </div>
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" :disabled="disabled" v-on:click="setGpuTimeQueries($event.target.checked)">
+ Enable GPU time queries
+ </label>
+ </div>
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" :disabled="disabled" v-on:click="setGpuSampleQueries($event.target.checked)">
+ Enable GPU sample queries
+ </label>
+ </div>
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" :disabled="disabled" v-on:click="setOpaquePass(!$event.target.checked)">
+ Disable opaque pass
+ </label>
+ </div>
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" :disabled="disabled" v-on:click="setAlphaPass(!$event.target.checked)">
+ Disable alpha pass
+ </label>
+ </div>
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" :disabled="disabled" v-on:click="setClipMasks(!$event.target.checked)">
+ Disable clip masks
+ </label>
+ </div>
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" :disabled="disabled" v-on:click="setTextPrims(!$event.target.checked)">
+ Disable text primitives
+ </label>
+ </div>
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" :disabled="disabled" v-on:click="setGradientPrims(!$event.target.checked)">
+ Disable gradient primitives
+ </label>
+ </div>
+ </div>
+</template>
+
+<script>
+export default {
+ computed: {
+ disabled() {
+ return !this.$store.state.connected
+ }
+ },
+ methods: {
+ setProfiler(enabled) {
+ if (enabled) {
+ this.$store.dispatch('sendMessage', "enable_profiler");
+ } else {
+ this.$store.dispatch('sendMessage', "disable_profiler");
+ }
+ },
+ setTextureCacheDebugger(enabled) {
+ if (enabled) {
+ this.$store.dispatch('sendMessage', "enable_texture_cache_debug");
+ } else {
+ this.$store.dispatch('sendMessage', "disable_texture_cache_debug");
+ }
+ },
+ setRenderTargetDebugger(enabled) {
+ if (enabled) {
+ this.$store.dispatch('sendMessage', "enable_render_target_debug");
+ } else {
+ this.$store.dispatch('sendMessage', "disable_render_target_debug");
+ }
+ },
+ setAlphaRectsDebugger(enabled) {
+ if (enabled) {
+ this.$store.dispatch('sendMessage', "enable_alpha_rects_debug");
+ } else {
+ this.$store.dispatch('sendMessage', "disable_alpha_rects_debug");
+ }
+ },
+ setGpuTimeQueries(enabled) {
+ if (enabled) {
+ this.$store.dispatch('sendMessage', "enable_gpu_time_queries");
+ } else {
+ this.$store.dispatch('sendMessage', "disable_gpu_time_queries");
+ }
+ },
+ setGpuSampleQueries(enabled) {
+ if (enabled) {
+ this.$store.dispatch('sendMessage', "enable_gpu_sample_queries");
+ } else {
+ this.$store.dispatch('sendMessage', "disable_gpu_sample_queries");
+ }
+ },
+ setOpaquePass(enabled) {
+ if (enabled) {
+ this.$store.dispatch('sendMessage', "enable_opaque_pass");
+ } else {
+ this.$store.dispatch('sendMessage', "disable_opaque_pass");
+ }
+ },
+ setAlphaPass(enabled) {
+ if (enabled) {
+ this.$store.dispatch('sendMessage', "enable_alpha_pass");
+ } else {
+ this.$store.dispatch('sendMessage', "disable_alpha_pass");
+ }
+ },
+ setClipMasks(enabled) {
+ if (enabled) {
+ this.$store.dispatch('sendMessage', "enable_clip_masks");
+ } else {
+ this.$store.dispatch('sendMessage', "disable_clip_masks");
+ }
+ },
+ setTextPrims(enabled) {
+ if (enabled) {
+ this.$store.dispatch('sendMessage', "enable_text_prims");
+ } else {
+ this.$store.dispatch('sendMessage', "disable_text_prims");
+ }
+ },
+ setGradientPrims(enabled) {
+ if (enabled) {
+ this.$store.dispatch('sendMessage', "enable_gradient_prims");
+ } else {
+ this.$store.dispatch('sendMessage', "disable_gradient_prims");
+ }
+ }
+ },
+}
+</script>
+
+<style>
+</style>
diff --git a/third_party/webrender/debugger/src/components/PassViewPage.vue b/third_party/webrender/debugger/src/components/PassViewPage.vue
new file mode 100644
index 00000000000..0ab6d7c4464
--- /dev/null
+++ b/third_party/webrender/debugger/src/components/PassViewPage.vue
@@ -0,0 +1,37 @@
+<template>
+ <div class="box">
+ <h1 class="title">Passes <a :disabled="disabled" v-on:click="fetch" class="button is-info">Refresh</a></h1>
+ <hr/>
+ <div v-for="(pass, pass_index) in passes">
+ <p class="has-text-black-bis">Pass {{pass_index}}</p>
+ <div v-for="(target, target_index) in pass.targets">
+ <p style="text-indent: 2em;" class="has-text-grey-dark">Target {{target_index}} ({{target.kind}})</p>
+ <div v-for="(batch, batch_index) in target.batches">
+ <p style="text-indent: 4em;" class="has-text-grey">Batch {{batch_index}} ({{batch.description}}, {{batch.kind}}, {{batch.count}} instances)</p>
+ </div>
+ </div>
+ <hr/>
+ </div>
+ </div>
+</template>
+
+<script>
+export default {
+ methods: {
+ fetch: function() {
+ this.$store.dispatch('sendMessage', "fetch_passes");
+ }
+ },
+ computed: {
+ disabled() {
+ return !this.$store.state.connected
+ },
+ passes() {
+ return this.$store.state.passes
+ }
+ },
+}
+</script>
+
+<style>
+</style>
diff --git a/third_party/webrender/debugger/src/components/RenderTaskViewPage.vue b/third_party/webrender/debugger/src/components/RenderTaskViewPage.vue
new file mode 100644
index 00000000000..c3937fe0ce2
--- /dev/null
+++ b/third_party/webrender/debugger/src/components/RenderTaskViewPage.vue
@@ -0,0 +1,37 @@
+<template>
+ <div class="box">
+ <h1 class="title">Render Tasks <a :disabled="disabled" v-on:click="fetch" class="button is-info">Refresh</a></h1>
+ <hr/>
+ <div>
+ <ul>
+ <app-treeview :model=render_tasks></app-treeview>
+ </ul>
+ </div>
+ </div>
+</template>
+
+<script>
+import TreeView from './TreeView.vue'
+
+export default {
+ components: {
+ 'app-treeview': TreeView,
+ },
+ methods: {
+ fetch: function() {
+ this.$store.dispatch('sendMessage', "fetch_render_tasks");
+ }
+ },
+ computed: {
+ disabled() {
+ return !this.$store.state.connected
+ },
+ render_tasks() {
+ return this.$store.state.render_tasks
+ }
+ },
+}
+</script>
+
+<style>
+</style>
diff --git a/third_party/webrender/debugger/src/components/ScreenshotPage.vue b/third_party/webrender/debugger/src/components/ScreenshotPage.vue
new file mode 100644
index 00000000000..8d4017856e4
--- /dev/null
+++ b/third_party/webrender/debugger/src/components/ScreenshotPage.vue
@@ -0,0 +1,32 @@
+<template>
+ <div class="box">
+ <h1 class="title">Screenshot <a :disabled="disabled" v-on:click="fetch" class="button is-info">Refresh</a></h1>
+ <hr/>
+ <div>
+ <ul>
+ <img v-if="screenshot.length > 0" style="transform: scaleY(-1); width: 1024px; height:768px" :src="'data:image/png;base64,' + screenshot" />
+ </ul>
+ </div>
+ </div>
+</template>
+
+<script>
+export default {
+ computed: {
+ disabled() {
+ return !this.$store.state.connected
+ },
+ screenshot() {
+ return this.$store.state.screenshot
+ },
+ },
+ methods: {
+ fetch: function() {
+ this.$store.dispatch('sendMessage', "fetch_screenshot");
+ }
+ },
+}
+</script>
+
+<style>
+</style>
diff --git a/third_party/webrender/debugger/src/components/TreeView.vue b/third_party/webrender/debugger/src/components/TreeView.vue
new file mode 100644
index 00000000000..bde473bda2f
--- /dev/null
+++ b/third_party/webrender/debugger/src/components/TreeView.vue
@@ -0,0 +1,40 @@
+<template>
+ <li>
+ <div v-on:click="toggle">
+ <span v-if="isFolder">[{{open ? '-' : '+'}}]</span>
+ {{model.description}}
+ </div>
+ <ul style="padding-left: 1em; line-height: 1.5em;" v-show="open" v-if="isFolder">
+ <treeview v-for="model in model.children" :model="model"></treeview>
+ </ul>
+ </li>
+</template>
+
+<script>
+export default {
+ name: 'treeview',
+ props: [
+ 'model',
+ ],
+ data: function () {
+ return {
+ open: false
+ }
+ },
+ computed: {
+ isFolder: function () {
+ return this.model.children && this.model.children.length
+ }
+ },
+ methods: {
+ toggle: function () {
+ if (this.isFolder) {
+ this.open = !this.open
+ }
+ },
+ },
+}
+</script>
+
+<style>
+</style>
diff --git a/third_party/webrender/debugger/src/main.js b/third_party/webrender/debugger/src/main.js
new file mode 100644
index 00000000000..1259c32a0f3
--- /dev/null
+++ b/third_party/webrender/debugger/src/main.js
@@ -0,0 +1,14 @@
+import Vue from 'vue';
+import Buefy from 'buefy';
+import 'buefy/dist/buefy.css';
+import "vue-material-design-icons/styles.css";
+import App from './App.vue';
+import store from './store';
+
+Vue.use(Buefy);
+
+new Vue({
+ el: '#app',
+ store,
+ render: h => h(App)
+})
diff --git a/third_party/webrender/debugger/src/store/index.js b/third_party/webrender/debugger/src/store/index.js
new file mode 100644
index 00000000000..7749d7a8416
--- /dev/null
+++ b/third_party/webrender/debugger/src/store/index.js
@@ -0,0 +1,105 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+
+Vue.use(Vuex)
+
+class Connection {
+ constructor() {
+ this.ws = null;
+ }
+
+ connect(context) {
+ var ws = new WebSocket("ws://127.0.0.1:3583");
+
+ ws.onopen = function() {
+ context.commit('setConnected', true);
+ }
+
+ ws.onmessage = function(evt) {
+ var json = JSON.parse(evt.data);
+ if (json['kind'] == "passes") {
+ context.commit('setPasses', json['passes']);
+ } else if (json['kind'] == "render_tasks") {
+ context.commit('setRenderTasks', json['root']);
+ } else if (json['kind'] == "documents") {
+ context.commit('setDocuments', json['root']);
+ } else if (json['kind'] == "clip_scroll_tree") {
+ context.commit('setClipScrollTree', json['root']);
+ } else if (json['kind'] == "screenshot") {
+ context.commit('setScreenshot', json['data']);
+ } else {
+ console.warn("unknown message kind: " + json['kind']);
+ }
+ }
+
+ ws.onclose = function() {
+ context.commit('setConnected', false);
+ }
+
+ this.ws = ws;
+ }
+
+ send(msg) {
+ if (this.ws !== null) {
+ this.ws.send(msg);
+ }
+ }
+
+ disconnect() {
+ if (this.ws !== null) {
+ this.ws.close();
+ this.ws = null;
+ }
+ }
+}
+
+var connection = new Connection();
+
+const store = new Vuex.Store({
+ strict: true,
+ state: {
+ connected: false,
+ page: 'options',
+ passes: [],
+ render_tasks: [],
+ documents: [],
+ clip_scroll_tree: [],
+ screenshot: [],
+ },
+ mutations: {
+ setConnected(state, connected) {
+ state.connected = connected;
+ },
+ setPage(state, name) {
+ state.page = name;
+ },
+ setPasses(state, passes) {
+ state.passes = passes;
+ },
+ setRenderTasks(state, render_tasks) {
+ state.render_tasks = render_tasks;
+ },
+ setDocuments(state, documents) {
+ state.documents = documents;
+ },
+ setClipScrollTree(state, clip_scroll_tree) {
+ state.clip_scroll_tree = clip_scroll_tree;
+ },
+ setScreenshot(state, screenshot) {
+ state.screenshot = screenshot;
+ },
+ },
+ actions: {
+ connect(context) {
+ connection.connect(context);
+ },
+ disconnect(context) {
+ connection.disconnect();
+ },
+ sendMessage(context, msg) {
+ connection.send(msg);
+ }
+ }
+});
+
+export default store;
diff --git a/third_party/webrender/debugger/webpack.config.js b/third_party/webrender/debugger/webpack.config.js
new file mode 100644
index 00000000000..6edcbfcc3c3
--- /dev/null
+++ b/third_party/webrender/debugger/webpack.config.js
@@ -0,0 +1,81 @@
+var path = require('path')
+var webpack = require('webpack')
+
+module.exports = {
+ entry: './src/main.js',
+ output: {
+ path: path.resolve(__dirname, './dist'),
+ publicPath: '/dist/',
+ filename: 'build.js'
+ },
+ module: {
+ rules: [
+ {
+ test: /\.css$/,
+ use: [
+ 'vue-style-loader',
+ 'css-loader'
+ ],
+ }, {
+ test: /\.vue$/,
+ loader: 'vue-loader',
+ options: {
+ loaders: {
+ }
+ // other vue-loader options go here
+ }
+ },
+ {
+ test: /\.js$/,
+ loader: 'babel-loader',
+ exclude: /node_modules/
+ },
+ {
+ test: /\.(png|jpg|gif|svg)$/,
+ loader: 'file-loader',
+ options: {
+ name: '[name].[ext]?[hash]'
+ }
+ }
+ ]
+ },
+ resolve: {
+ alias: {
+ 'vue$': 'vue/dist/vue.esm.js'
+ },
+ alias : {
+ "icons": path.resolve(__dirname, "node_modules/vue-material-design-icons")
+ },
+ extensions: ['*', '.js', '.vue', '.json']
+ },
+ devServer: {
+ historyApiFallback: true,
+ noInfo: true,
+ overlay: true
+ },
+ performance: {
+ hints: false
+ },
+ devtool: '#eval-source-map'
+}
+
+if (process.env.NODE_ENV === 'production') {
+ module.exports.devtool = '#source-map'
+ // http://vue-loader.vuejs.org/en/workflow/production.html
+ module.exports.plugins = (module.exports.plugins || []).concat([
+ new webpack.DefinePlugin({
+ 'process.env': {
+ NODE_ENV: '"production"'
+ }
+ }),
+ new webpack.optimize.UglifyJsPlugin({
+ sourceMap: true,
+ compress: {
+ warnings: false
+ }
+ }),
+ new webpack.LoaderOptionsPlugin({
+ minimize: true
+ })
+ ])
+}
diff --git a/third_party/webrender/direct-composition/Cargo.toml b/third_party/webrender/direct-composition/Cargo.toml
new file mode 100644
index 00000000000..59528f98ce2
--- /dev/null
+++ b/third_party/webrender/direct-composition/Cargo.toml
@@ -0,0 +1,14 @@
+[package]
+name = "direct-composition"
+version = "0.1.0"
+authors = ["Simon Sapin <simon.sapin@exyr.org>"]
+license = "MPL-2.0"
+edition = "2018"
+
+[target.'cfg(windows)'.dependencies]
+euclid = "0.22"
+gleam = "0.12"
+mozangle = {version = "0.3.1", features = ["egl"]}
+webrender = {path = "../webrender"}
+winapi = {version = "0.3", features = ["winerror", "d3d11", "dcomp"]}
+winit = "0.19"
diff --git a/third_party/webrender/direct-composition/src/com.rs b/third_party/webrender/direct-composition/src/com.rs
new file mode 100644
index 00000000000..8fb384695cc
--- /dev/null
+++ b/third_party/webrender/direct-composition/src/com.rs
@@ -0,0 +1,112 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use std::ops;
+use std::ptr;
+use winapi::Interface;
+use winapi::ctypes::c_void;
+use winapi::shared::guiddef::GUID;
+use winapi::shared::winerror::HRESULT;
+use winapi::shared::winerror::SUCCEEDED;
+use winapi::um::unknwnbase::IUnknown;
+
+pub fn as_ptr<T>(x: &T) -> *mut T {
+ x as *const T as _
+}
+
+pub trait CheckHResult {
+ fn check_hresult(self);
+}
+
+impl CheckHResult for HRESULT {
+ fn check_hresult(self) {
+ if !SUCCEEDED(self) {
+ panic_com(self)
+ }
+ }
+}
+
+fn panic_com(hresult: HRESULT) -> ! {
+ panic!("COM error 0x{:08X}", hresult as u32)
+}
+
+/// Forked from <https://github.com/retep998/wio-rs/blob/44093f7db8/src/com.rs>
+#[derive(PartialEq, Debug)]
+pub struct ComPtr<T>(*mut T) where T: Interface;
+
+impl<T> ComPtr<T> where T: Interface {
+ /// Creates a `ComPtr` to wrap a raw pointer.
+ /// It takes ownership over the pointer which means it does __not__ call `AddRef`.
+ /// `T` __must__ be a COM interface that inherits from `IUnknown`.
+ pub unsafe fn from_raw(ptr: *mut T) -> ComPtr<T> {
+ assert!(!ptr.is_null());
+ ComPtr(ptr)
+ }
+
+ /// For use with APIs that take an interface UUID and
+ /// "return" a new COM object through a `*mut *mut c_void` out-parameter.
+ pub unsafe fn new_with_uuid<F>(f: F) -> Self
+ where F: FnOnce(&GUID, *mut *mut c_void) -> HRESULT
+ {
+ Self::new_with(|ptr| f(&T::uuidof(), ptr as _))
+ }
+
+ /// For use with APIs that "return" a new COM object through a `*mut *mut T` out-parameter.
+ pub unsafe fn new_with<F>(f: F) -> Self
+ where F: FnOnce(*mut *mut T) -> HRESULT
+ {
+ let mut ptr = ptr::null_mut();
+ let hresult = f(&mut ptr);
+ if SUCCEEDED(hresult) {
+ ComPtr::from_raw(ptr)
+ } else {
+ if !ptr.is_null() {
+ let ptr = ptr as *mut IUnknown;
+ (*ptr).Release();
+ }
+ panic_com(hresult)
+ }
+ }
+
+ pub fn as_raw(&self) -> *mut T {
+ self.0
+ }
+
+ fn as_unknown(&self) -> &IUnknown {
+ unsafe {
+ &*(self.0 as *mut IUnknown)
+ }
+ }
+
+ /// Performs QueryInterface fun.
+ pub fn cast<U>(&self) -> ComPtr<U> where U: Interface {
+ unsafe {
+ ComPtr::<U>::new_with_uuid(|uuid, ptr| self.as_unknown().QueryInterface(uuid, ptr))
+ }
+ }
+}
+
+impl<T> ops::Deref for ComPtr<T> where T: Interface {
+ type Target = T;
+ fn deref(&self) -> &T {
+ unsafe { &*self.0 }
+ }
+}
+
+impl<T> Clone for ComPtr<T> where T: Interface {
+ fn clone(&self) -> Self {
+ unsafe {
+ self.as_unknown().AddRef();
+ ComPtr(self.0)
+ }
+ }
+}
+
+impl<T> Drop for ComPtr<T> where T: Interface {
+ fn drop(&mut self) {
+ unsafe {
+ self.as_unknown().Release();
+ }
+ }
+}
diff --git a/third_party/webrender/direct-composition/src/egl.rs b/third_party/webrender/direct-composition/src/egl.rs
new file mode 100644
index 00000000000..8bd5afb72a6
--- /dev/null
+++ b/third_party/webrender/direct-composition/src/egl.rs
@@ -0,0 +1,174 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use mozangle::egl::ffi::*;
+use std::os::raw::c_void;
+use std::ptr;
+use std::rc::Rc;
+use winapi::um::d3d11::ID3D11Device;
+use winapi::um::d3d11::ID3D11Texture2D;
+
+pub use mozangle::egl::get_proc_address;
+
+pub struct SharedEglThings {
+ device: EGLDeviceEXT,
+ display: types::EGLDisplay,
+ config: types::EGLConfig,
+ context: types::EGLContext,
+}
+
+fn cast_attributes(slice: &[types::EGLenum]) -> &EGLint {
+ unsafe {
+ &*(slice.as_ptr() as *const EGLint)
+ }
+}
+
+macro_rules! attributes {
+ ($( $key: expr => $value: expr, )*) => {
+ cast_attributes(&[
+ $( $key, $value, )*
+ NONE,
+ ])
+ }
+}
+
+impl SharedEglThings {
+ pub unsafe fn new(d3d_device: *mut ID3D11Device) -> Rc<Self> {
+ let device = eglCreateDeviceANGLE(
+ D3D11_DEVICE_ANGLE,
+ d3d_device as *mut c_void,
+ ptr::null(),
+ ).check();
+ let display = GetPlatformDisplayEXT(
+ PLATFORM_DEVICE_EXT,
+ device,
+ attributes! [
+ EXPERIMENTAL_PRESENT_PATH_ANGLE => EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE,
+ ],
+ ).check();
+ Initialize(display, ptr::null_mut(), ptr::null_mut()).check();
+
+ // Adapted from
+ // https://searchfox.org/mozilla-central/rev/056a4057/gfx/gl/GLContextProviderEGL.cpp#635
+ let mut configs = [ptr::null(); 64];
+ let mut num_configs = 0;
+ ChooseConfig(
+ display,
+ attributes! [
+ SURFACE_TYPE => WINDOW_BIT,
+ RENDERABLE_TYPE => OPENGL_ES2_BIT,
+ RED_SIZE => 8,
+ GREEN_SIZE => 8,
+ BLUE_SIZE => 8,
+ ALPHA_SIZE => 8,
+ ],
+ configs.as_mut_ptr(),
+ configs.len() as i32,
+ &mut num_configs,
+ ).check();
+ let config = pick_config(&configs[..num_configs as usize]);
+
+ let context = CreateContext(
+ display, config, NO_CONTEXT,
+ attributes![
+ CONTEXT_CLIENT_VERSION => 3,
+ ]
+ ).check();
+ MakeCurrent(display, NO_SURFACE, NO_SURFACE, context).check();
+
+ Rc::new(SharedEglThings { device, display, config, context })
+ }
+}
+
+fn pick_config(configs: &[types::EGLConfig]) -> types::EGLConfig {
+ // FIXME: better criteria to make this choice?
+ // Firefox uses GetConfigAttrib to find a config that has the requested r/g/b/a sizes
+ // https://searchfox.org/mozilla-central/rev/056a4057/gfx/gl/GLContextProviderEGL.cpp#662-685
+
+ configs[0]
+}
+
+impl Drop for SharedEglThings {
+ fn drop(&mut self) {
+ unsafe {
+ // FIXME does EGLDisplay or EGLConfig need clean up? How?
+ DestroyContext(self.display, self.context).check();
+ eglReleaseDeviceANGLE(self.device).check();
+ }
+ }
+}
+
+pub struct PerVisualEglThings {
+ shared: Rc<SharedEglThings>,
+ surface: types::EGLSurface,
+}
+
+impl PerVisualEglThings {
+ pub unsafe fn new(shared: Rc<SharedEglThings>, buffer: *const ID3D11Texture2D,
+ width: u32, height: u32)
+ -> Self {
+ let surface = CreatePbufferFromClientBuffer(
+ shared.display,
+ D3D_TEXTURE_ANGLE,
+ buffer as types::EGLClientBuffer,
+ shared.config,
+ attributes! [
+ WIDTH => width,
+ HEIGHT => height,
+ FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE => TRUE,
+ ],
+ ).check();
+
+ PerVisualEglThings { shared, surface }
+ }
+
+ pub fn make_current(&self) {
+ unsafe {
+ MakeCurrent(self.shared.display, self.surface, self.surface, self.shared.context).check();
+ }
+ }
+}
+
+impl Drop for PerVisualEglThings {
+ fn drop(&mut self) {
+ unsafe {
+ DestroySurface(self.shared.display, self.surface).check();
+ }
+ }
+}
+
+fn check_error() {
+ unsafe {
+ let error = GetError() as types::EGLenum;
+ assert_eq!(error, SUCCESS, "0x{:x} != 0x{:x}", error, SUCCESS);
+ }
+}
+
+trait Check {
+ fn check(self) -> Self;
+}
+
+impl Check for *const c_void {
+ fn check(self) -> Self {
+ check_error();
+ assert!(!self.is_null());
+ self
+ }
+}
+
+impl Check for *mut c_void {
+ fn check(self) -> Self {
+ check_error();
+ assert!(!self.is_null());
+ self
+ }
+}
+
+impl Check for types::EGLBoolean {
+ fn check(self) -> Self {
+ check_error();
+ assert_eq!(self, TRUE);
+ self
+ }
+}
diff --git a/third_party/webrender/direct-composition/src/lib.rs b/third_party/webrender/direct-composition/src/lib.rs
new file mode 100644
index 00000000000..fadb8f2b723
--- /dev/null
+++ b/third_party/webrender/direct-composition/src/lib.rs
@@ -0,0 +1,179 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#![cfg(windows)]
+
+extern crate gleam;
+extern crate mozangle;
+extern crate winapi;
+
+use com::{ComPtr, CheckHResult, as_ptr};
+use std::ptr;
+use std::rc::Rc;
+use winapi::shared::dxgi1_2::DXGI_SWAP_CHAIN_DESC1;
+use winapi::shared::dxgi1_2::IDXGIFactory2;
+use winapi::shared::minwindef::{TRUE, FALSE};
+use winapi::shared::windef::HWND;
+use winapi::um::d3d11::ID3D11Device;
+use winapi::um::dcomp::IDCompositionDevice;
+use winapi::um::dcomp::IDCompositionTarget;
+use winapi::um::dcomp::IDCompositionVisual;
+
+mod com;
+mod egl;
+
+pub struct DirectComposition {
+ d3d_device: ComPtr<ID3D11Device>,
+ dxgi_factory: ComPtr<IDXGIFactory2>,
+
+ egl: Rc<egl::SharedEglThings>,
+ pub gleam: Rc<dyn gleam::gl::Gl>,
+
+ composition_device: ComPtr<IDCompositionDevice>,
+ root_visual: ComPtr<IDCompositionVisual>,
+
+ #[allow(unused)] // Needs to be kept alive
+ composition_target: ComPtr<IDCompositionTarget>,
+}
+
+impl DirectComposition {
+ /// Initialize DirectComposition in the given window
+ ///
+ /// # Safety
+ ///
+ /// `hwnd` must be a valid handle to a window.
+ pub unsafe fn new(hwnd: HWND) -> Self {
+ let d3d_device = ComPtr::new_with(|ptr_ptr| winapi::um::d3d11::D3D11CreateDevice(
+ ptr::null_mut(),
+ winapi::um::d3dcommon::D3D_DRIVER_TYPE_HARDWARE,
+ ptr::null_mut(),
+ winapi::um::d3d11::D3D11_CREATE_DEVICE_BGRA_SUPPORT |
+ if cfg!(debug_assertions) {
+ winapi::um::d3d11::D3D11_CREATE_DEVICE_DEBUG
+ } else {
+ 0
+ },
+ ptr::null_mut(),
+ 0,
+ winapi::um::d3d11::D3D11_SDK_VERSION,
+ ptr_ptr,
+ &mut 0,
+ ptr::null_mut(),
+ ));
+
+ let egl = egl::SharedEglThings::new(d3d_device.as_raw());
+ let gleam = gleam::gl::GlesFns::load_with(egl::get_proc_address);
+
+ let dxgi_device = d3d_device.cast::<winapi::shared::dxgi::IDXGIDevice>();
+
+ // https://msdn.microsoft.com/en-us/library/windows/desktop/hh404556(v=vs.85).aspx#code-snippet-1
+ // “Because you can create a Direct3D device without creating a swap chain,
+ // you might need to retrieve the factory that is used to create the device
+ // in order to create a swap chain.”
+ let adapter = ComPtr::new_with(|ptr_ptr| dxgi_device.GetAdapter(ptr_ptr));
+ let dxgi_factory = ComPtr::<IDXGIFactory2>::new_with_uuid(|uuid, ptr_ptr| {
+ adapter.GetParent(uuid, ptr_ptr)
+ });
+
+ // Create the DirectComposition device object.
+ let composition_device = ComPtr::<IDCompositionDevice>::new_with_uuid(|uuid, ptr_ptr| {
+ winapi::um::dcomp::DCompositionCreateDevice(&*dxgi_device, uuid, ptr_ptr)
+ });
+
+ // Create the composition target object based on the
+ // specified application window.
+ let composition_target = ComPtr::new_with(|ptr_ptr| {
+ composition_device.CreateTargetForHwnd(hwnd, TRUE, ptr_ptr)
+ });
+
+ let root_visual = ComPtr::new_with(|ptr_ptr| composition_device.CreateVisual(ptr_ptr));
+ composition_target.SetRoot(&*root_visual).check_hresult();
+
+ DirectComposition {
+ d3d_device, dxgi_factory,
+ egl, gleam,
+ composition_device, composition_target, root_visual,
+ }
+ }
+
+ /// Execute changes to the DirectComposition scene.
+ pub fn commit(&self) {
+ unsafe {
+ self.composition_device.Commit().check_hresult()
+ }
+ }
+
+ pub fn create_angle_visual(&self, width: u32, height: u32) -> AngleVisual {
+ unsafe {
+ let desc = DXGI_SWAP_CHAIN_DESC1 {
+ Width: width,
+ Height: height,
+ Format: winapi::shared::dxgiformat::DXGI_FORMAT_B8G8R8A8_UNORM,
+ Stereo: FALSE,
+ SampleDesc: winapi::shared::dxgitype::DXGI_SAMPLE_DESC {
+ Count: 1,
+ Quality: 0,
+ },
+ BufferUsage: winapi::shared::dxgitype::DXGI_USAGE_RENDER_TARGET_OUTPUT,
+ BufferCount: 2,
+ Scaling: winapi::shared::dxgi1_2::DXGI_SCALING_STRETCH,
+ SwapEffect: winapi::shared::dxgi::DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL,
+ AlphaMode: winapi::shared::dxgi1_2::DXGI_ALPHA_MODE_PREMULTIPLIED,
+ Flags: 0,
+ };
+ let swap_chain = ComPtr::<winapi::shared::dxgi1_2::IDXGISwapChain1>::new_with(|ptr_ptr| {
+ self.dxgi_factory.CreateSwapChainForComposition(
+ as_ptr(&self.d3d_device),
+ &desc,
+ ptr::null_mut(),
+ ptr_ptr,
+ )
+ });
+ let back_buffer = ComPtr::<winapi::um::d3d11::ID3D11Texture2D>::new_with_uuid(|uuid, ptr_ptr| {
+ swap_chain.GetBuffer(0, uuid, ptr_ptr)
+ });
+ let egl = egl::PerVisualEglThings::new(self.egl.clone(), &*back_buffer, width, height);
+ let gleam = self.gleam.clone();
+
+ let visual = ComPtr::new_with(|ptr_ptr| self.composition_device.CreateVisual(ptr_ptr));
+ visual.SetContent(&*****swap_chain).check_hresult();
+ self.root_visual.AddVisual(&*visual, FALSE, ptr::null_mut()).check_hresult();
+
+ AngleVisual { visual, swap_chain, egl, gleam }
+ }
+ }
+}
+
+/// A DirectComposition "visual" configured for rendering with Direct3D.
+pub struct AngleVisual {
+ visual: ComPtr<IDCompositionVisual>,
+ swap_chain: ComPtr<winapi::shared::dxgi1_2::IDXGISwapChain1>,
+ egl: egl::PerVisualEglThings,
+ pub gleam: Rc<dyn gleam::gl::Gl>,
+}
+
+impl AngleVisual {
+ pub fn set_offset_x(&self, offset_x: f32) {
+ unsafe {
+ self.visual.SetOffsetX_1(offset_x).check_hresult()
+ }
+ }
+
+ pub fn set_offset_y(&self, offset_y: f32) {
+ unsafe {
+ self.visual.SetOffsetY_1(offset_y).check_hresult()
+ }
+ }
+
+ pub fn make_current(&self) {
+ self.egl.make_current()
+ }
+
+ pub fn present(&self) {
+ self.gleam.finish();
+ unsafe {
+ self.swap_chain.Present(0, 0).check_hresult()
+ }
+ }
+}
diff --git a/third_party/webrender/direct-composition/src/main.rs b/third_party/webrender/direct-composition/src/main.rs
new file mode 100644
index 00000000000..e1999f5f8f1
--- /dev/null
+++ b/third_party/webrender/direct-composition/src/main.rs
@@ -0,0 +1,11 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#[cfg(not(windows))]
+fn main() {
+ println!("This demo only runs on Windows.");
+}
+
+#[cfg(windows)]
+include!("main_windows.rs");
diff --git a/third_party/webrender/direct-composition/src/main_windows.rs b/third_party/webrender/direct-composition/src/main_windows.rs
new file mode 100644
index 00000000000..18f1300a51a
--- /dev/null
+++ b/third_party/webrender/direct-composition/src/main_windows.rs
@@ -0,0 +1,212 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate direct_composition;
+extern crate euclid;
+extern crate gleam;
+extern crate webrender;
+extern crate winit;
+
+use euclid::size2;
+use direct_composition::DirectComposition;
+use std::sync::mpsc;
+use webrender::api;
+use winit::os::windows::{WindowExt, WindowBuilderExt};
+use winit::dpi::LogicalSize;
+
+fn main() {
+ let mut events_loop = winit::EventsLoop::new();
+
+ let (tx, rx) = mpsc::channel();
+ let notifier = Box::new(Notifier { events_proxy: events_loop.create_proxy(), tx });
+
+ let window = winit::WindowBuilder::new()
+ .with_title("WebRender + ANGLE + DirectComposition")
+ .with_dimensions(LogicalSize::new(1024., 768.))
+ .with_decorations(true)
+ .with_transparency(true)
+ .with_no_redirection_bitmap(true)
+ .build(&events_loop)
+ .unwrap();
+
+ let composition = direct_composition_from_window(&window);
+ let factor = window.get_hidpi_factor() as f32;
+
+ let mut clicks: usize = 0;
+ let mut offset_y = 100.;
+ let mut rects = [
+ Rectangle::new(&composition, &notifier, factor, size2(300, 200), 0., 0.2, 0.4, 1.),
+ Rectangle::new(&composition, &notifier, factor, size2(400, 300), 0., 0.5, 0., 0.5),
+ ];
+ rects[0].render(factor, &rx);
+ rects[1].render(factor, &rx);
+
+ rects[0].visual.set_offset_x(100.);
+ rects[0].visual.set_offset_y(50.);
+
+ rects[1].visual.set_offset_x(200.);
+ rects[1].visual.set_offset_y(offset_y);
+
+ composition.commit();
+
+ events_loop.run_forever(|event| {
+ if let winit::Event::WindowEvent { event, .. } = event {
+ match event {
+ winit::WindowEvent::CloseRequested => {
+ return winit::ControlFlow::Break
+ }
+ winit::WindowEvent::MouseWheel { delta, .. } => {
+ let dy = match delta {
+ winit::MouseScrollDelta::LineDelta(_, dy) => dy,
+ winit::MouseScrollDelta::PixelDelta(pos) => pos.y as f32,
+ };
+ offset_y = (offset_y - 10. * dy).max(0.).min(468.);
+
+ rects[1].visual.set_offset_y(offset_y);
+ composition.commit();
+ }
+ winit::WindowEvent::MouseInput {
+ button: winit::MouseButton::Left,
+ state: winit::ElementState::Pressed,
+ ..
+ } => {
+ clicks += 1;
+ let rect = &mut rects[clicks % 2];
+ rect.color.g += 0.1;
+ rect.color.g %= 1.;
+ rect.render(factor, &rx)
+ }
+ _ => {}
+ }
+ }
+ winit::ControlFlow::Continue
+ });
+}
+
+fn direct_composition_from_window(window: &winit::Window) -> DirectComposition {
+ unsafe {
+ DirectComposition::new(window.get_hwnd() as _)
+ }
+}
+
+struct Rectangle {
+ visual: direct_composition::AngleVisual,
+ renderer: Option<webrender::Renderer>,
+ api: api::RenderApi,
+ document_id: api::DocumentId,
+ size: api::units::DeviceIntSize,
+ color: api::ColorF,
+}
+
+impl Rectangle {
+ fn new(composition: &DirectComposition, notifier: &Box<Notifier>,
+ device_pixel_ratio: f32, size: api::units::DeviceIntSize, r: f32, g: f32, b: f32, a: f32)
+ -> Self {
+ let visual = composition.create_angle_visual(size.width as u32, size.height as u32);
+ visual.make_current();
+
+ let (renderer, sender) = webrender::Renderer::new(
+ composition.gleam.clone(),
+ notifier.clone(),
+ webrender::RendererOptions {
+ clear_color: Some(api::ColorF::new(0., 0., 0., 0.)),
+ device_pixel_ratio,
+ ..webrender::RendererOptions::default()
+ },
+ None,
+ size,
+ ).unwrap();
+ let api = sender.create_api();
+
+ Rectangle {
+ visual,
+ renderer: Some(renderer),
+ document_id: api.add_document(size, 0),
+ api,
+ size,
+ color: api::ColorF { r, g, b, a },
+ }
+ }
+
+ fn render(&mut self, device_pixel_ratio: f32, rx: &mpsc::Receiver<()>) {
+ self.visual.make_current();
+
+ let pipeline_id = api::PipelineId(0, 0);
+ let layout_size = self.size.to_f32() / euclid::Scale::new(device_pixel_ratio);
+ let mut builder = api::DisplayListBuilder::new(pipeline_id, layout_size);
+
+ let rect = euclid::Rect::new(euclid::Point2D::zero(), layout_size);
+
+ let region = api::ComplexClipRegion::new(
+ rect,
+ api::BorderRadius::uniform(20.),
+ api::ClipMode::Clip
+ );
+ let clip_id = builder.define_clip_rounded_rect(
+ &api::SpaceAndClipInfo::root_scroll(pipeline_id),
+ region,
+ );
+
+ builder.push_rect(
+ &api::CommonItemProperties::new(
+ rect,
+ api::SpaceAndClipInfo {
+ spatial_id: api::SpatialId::root_scroll_node(pipeline_id),
+ clip_id,
+ },
+ ),
+ rect,
+ self.color,
+ );
+
+ let mut transaction = api::Transaction::new();
+ transaction.set_display_list(
+ api::Epoch(0),
+ None,
+ layout_size,
+ builder.finalize(),
+ true,
+ );
+ transaction.set_root_pipeline(pipeline_id);
+ transaction.generate_frame();
+ self.api.send_transaction(self.document_id, transaction);
+ rx.recv().unwrap();
+ let renderer = self.renderer.as_mut().unwrap();
+ renderer.update();
+ renderer.render(self.size).unwrap();
+ let _ = renderer.flush_pipeline_info();
+ self.visual.present();
+ }
+}
+
+impl Drop for Rectangle {
+ fn drop(&mut self) {
+ self.renderer.take().unwrap().deinit()
+ }
+}
+
+#[derive(Clone)]
+struct Notifier {
+ events_proxy: winit::EventsLoopProxy,
+ tx: mpsc::Sender<()>,
+}
+
+impl api::RenderNotifier for Notifier {
+ fn clone(&self) -> Box<dyn api::RenderNotifier> {
+ Box::new(Clone::clone(self))
+ }
+
+ fn wake_up(&self) {
+ self.tx.send(()).unwrap();
+ let _ = self.events_proxy.wakeup();
+ }
+
+ fn new_frame_ready(&self,
+ _: api::DocumentId,
+ _: bool,
+ _: bool,
+ _: Option<u64>) {
+ self.wake_up();
+ }
+}
diff --git a/third_party/webrender/example-compositor/compositor-windows/Cargo.toml b/third_party/webrender/example-compositor/compositor-windows/Cargo.toml
new file mode 100644
index 00000000000..b191626a698
--- /dev/null
+++ b/third_party/webrender/example-compositor/compositor-windows/Cargo.toml
@@ -0,0 +1,9 @@
+[package]
+name = "compositor-windows"
+version = "0.1.0"
+authors = ["Glenn Watson <gw@intuitionlibrary.com>"]
+edition = "2018"
+license = "MPL-2.0"
+
+[build-dependencies]
+cc = "1.0"
diff --git a/third_party/webrender/example-compositor/compositor-windows/build.rs b/third_party/webrender/example-compositor/compositor-windows/build.rs
new file mode 100644
index 00000000000..dc7358aa6a6
--- /dev/null
+++ b/third_party/webrender/example-compositor/compositor-windows/build.rs
@@ -0,0 +1,25 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+fn main() {
+ // HACK - This build script relies on Gecko having been built, so that the ANGLE libraries
+ // have already been compiled. It also assumes they are being built with an in-tree
+ // x86_64 object directory.
+
+ cc::Build::new()
+ .file("src/lib.cpp")
+ .include("../../../angle/checkout/include")
+ .compile("windows");
+
+ // Set up linker paths for ANGLE that is built by Gecko
+ println!("cargo:rustc-link-search=../../obj-x86_64-pc-mingw32/gfx/angle/targets/libEGL");
+ println!("cargo:rustc-link-search=../../obj-x86_64-pc-mingw32/gfx/angle/targets/libGLESv2");
+
+ // Link to libEGL and libGLESv2 (ANGLE) and D3D11 + DirectComposition
+ println!("cargo:rustc-link-lib=libEGL");
+ println!("cargo:rustc-link-lib=libGLESv2");
+ println!("cargo:rustc-link-lib=dcomp");
+ println!("cargo:rustc-link-lib=d3d11");
+ println!("cargo:rustc-link-lib=dwmapi");
+}
diff --git a/third_party/webrender/example-compositor/compositor-windows/src/lib.cpp b/third_party/webrender/example-compositor/compositor-windows/src/lib.cpp
new file mode 100644
index 00000000000..e17f602a2ec
--- /dev/null
+++ b/third_party/webrender/example-compositor/compositor-windows/src/lib.cpp
@@ -0,0 +1,802 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define UNICODE
+
+#include <windows.h>
+#include <math.h>
+#include <dcomp.h>
+#include <d3d11.h>
+#include <assert.h>
+#include <map>
+#include <vector>
+#include <dwmapi.h>
+#include <unordered_map>
+
+#define EGL_EGL_PROTOTYPES 1
+#define EGL_EGLEXT_PROTOTYPES 1
+#define GL_GLEXT_PROTOTYPES 1
+#include "EGL/egl.h"
+#include "EGL/eglext.h"
+#include "EGL/eglext_angle.h"
+#include "GL/gl.h"
+#include "GLES/gl.h"
+#include "GLES/glext.h"
+#include "GLES3/gl3.h"
+
+#define NUM_QUERIES 2
+
+#define USE_VIRTUAL_SURFACES
+#define VIRTUAL_OFFSET 512 * 1024
+
+enum SyncMode {
+ None = 0,
+ Swap = 1,
+ Commit = 2,
+ Flush = 3,
+ Query = 4,
+};
+
+// The OS compositor representation of a picture cache tile.
+struct Tile {
+#ifndef USE_VIRTUAL_SURFACES
+ // Represents the underlying DirectComposition surface texture that gets drawn into.
+ IDCompositionSurface *pSurface;
+ // Represents the node in the visual tree that defines the properties of this tile (clip, position etc).
+ IDCompositionVisual2 *pVisual;
+#endif
+};
+
+struct TileKey {
+ int x;
+ int y;
+
+ TileKey(int ax, int ay) : x(ax), y(ay) {}
+};
+
+bool operator==(const TileKey &k0, const TileKey &k1) {
+ return k0.x == k1.x && k0.y == k1.y;
+}
+
+struct TileKeyHasher {
+ size_t operator()(const TileKey &key) const {
+ return key.x ^ key.y;
+ }
+};
+
+struct Surface {
+ int tile_width;
+ int tile_height;
+ bool is_opaque;
+ std::unordered_map<TileKey, Tile, TileKeyHasher> tiles;
+ IDCompositionVisual2 *pVisual;
+#ifdef USE_VIRTUAL_SURFACES
+ IDCompositionVirtualSurface *pVirtualSurface;
+#endif
+};
+
+struct CachedFrameBuffer {
+ int width;
+ int height;
+ GLuint fboId;
+ GLuint depthRboId;
+};
+
+struct Window {
+ // Win32 window details
+ HWND hWnd;
+ HINSTANCE hInstance;
+ bool enable_compositor;
+ RECT client_rect;
+ SyncMode sync_mode;
+
+ // Main interfaces to D3D11 and DirectComposition
+ ID3D11Device *pD3D11Device;
+ IDCompositionDesktopDevice *pDCompDevice;
+ IDCompositionTarget *pDCompTarget;
+ IDXGIDevice *pDXGIDevice;
+ ID3D11Query *pQueries[NUM_QUERIES];
+ int current_query;
+
+ // ANGLE interfaces that wrap the D3D device
+ EGLDeviceEXT EGLDevice;
+ EGLDisplay EGLDisplay;
+ EGLContext EGLContext;
+ EGLConfig config;
+ // Framebuffer surface for debug mode when we are not using DC
+ EGLSurface fb_surface;
+
+ // The currently bound surface, valid during bind() and unbind()
+ IDCompositionSurface *pCurrentSurface;
+ EGLImage mEGLImage;
+ GLuint mColorRBO;
+
+ // The root of the DC visual tree. Nothing is drawn on this, but
+ // all child tiles are parented to here.
+ IDCompositionVisual2 *pRoot;
+ IDCompositionVisualDebug *pVisualDebug;
+ std::vector<CachedFrameBuffer> mFrameBuffers;
+
+ // Maintain list of layer state between frames to avoid visual tree rebuild.
+ std::vector<uint64_t> mCurrentLayers;
+ std::vector<uint64_t> mPrevLayers;
+
+ // Maps WR surface IDs to each OS surface
+ std::unordered_map<uint64_t, Surface> surfaces;
+};
+
+static const wchar_t *CLASS_NAME = L"WR DirectComposite";
+
+static GLuint GetOrCreateFbo(Window *window, int aWidth, int aHeight) {
+ GLuint fboId = 0;
+
+ // Check if we have a cached FBO with matching dimensions
+ for (auto it = window->mFrameBuffers.begin(); it != window->mFrameBuffers.end(); ++it) {
+ if (it->width == aWidth && it->height == aHeight) {
+ fboId = it->fboId;
+ break;
+ }
+ }
+
+ // If not, create a new FBO with attached depth buffer
+ if (fboId == 0) {
+ // Create the depth buffer
+ GLuint depthRboId;
+ glGenRenderbuffers(1, &depthRboId);
+ glBindRenderbuffer(GL_RENDERBUFFER, depthRboId);
+ glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24,
+ aWidth, aHeight);
+
+ // Create the framebuffer and attach the depth buffer to it
+ glGenFramebuffers(1, &fboId);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fboId);
+ glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER,
+ GL_DEPTH_ATTACHMENT,
+ GL_RENDERBUFFER, depthRboId);
+
+ // Store this in the cache for future calls.
+ CachedFrameBuffer frame_buffer_info;
+ frame_buffer_info.width = aWidth;
+ frame_buffer_info.height = aHeight;
+ frame_buffer_info.fboId = fboId;
+ frame_buffer_info.depthRboId = depthRboId;
+ window->mFrameBuffers.push_back(frame_buffer_info);
+ }
+
+ return fboId;
+}
+
+static LRESULT CALLBACK WndProc(
+ HWND hwnd,
+ UINT message,
+ WPARAM wParam,
+ LPARAM lParam
+) {
+ switch (message) {
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ return 1;
+ }
+
+ return DefWindowProc(hwnd, message, wParam, lParam);
+}
+
+extern "C" {
+ Window *com_dc_create_window(int width, int height, bool enable_compositor, SyncMode sync_mode) {
+ // Create a simple Win32 window
+ Window *window = new Window;
+ window->hInstance = GetModuleHandle(NULL);
+ window->enable_compositor = enable_compositor;
+ window->mEGLImage = EGL_NO_IMAGE;
+ window->sync_mode = sync_mode;
+
+ WNDCLASSEX wcex = { sizeof(WNDCLASSEX) };
+ wcex.style = CS_HREDRAW | CS_VREDRAW;
+ wcex.lpfnWndProc = WndProc;
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = 0;
+ wcex.hInstance = window->hInstance;
+ wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);;
+ wcex.lpszMenuName = nullptr;
+ wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wcex.lpszClassName = CLASS_NAME;
+ RegisterClassEx(&wcex);
+
+ int dpiX = 0;
+ int dpiY = 0;
+ HDC hdc = GetDC(NULL);
+ if (hdc) {
+ dpiX = GetDeviceCaps(hdc, LOGPIXELSX);
+ dpiY = GetDeviceCaps(hdc, LOGPIXELSY);
+ ReleaseDC(NULL, hdc);
+ }
+
+ RECT window_rect = { 0, 0, width, height };
+ AdjustWindowRect(&window_rect, WS_OVERLAPPEDWINDOW, FALSE);
+ UINT window_width = static_cast<UINT>(ceil(float(window_rect.right - window_rect.left) * dpiX / 96.f));
+ UINT window_height = static_cast<UINT>(ceil(float(window_rect.bottom - window_rect.top) * dpiY / 96.f));
+
+ LPCWSTR name;
+ DWORD style;
+ if (enable_compositor) {
+ name = L"example-compositor (DirectComposition)";
+ style = WS_EX_NOREDIRECTIONBITMAP;
+ } else {
+ name = L"example-compositor (Simple)";
+ style = 0;
+ }
+
+ window->hWnd = CreateWindowEx(
+ style,
+ CLASS_NAME,
+ name,
+ WS_OVERLAPPEDWINDOW,
+ CW_USEDEFAULT,
+ CW_USEDEFAULT,
+ window_width,
+ window_height,
+ NULL,
+ NULL,
+ window->hInstance,
+ NULL
+ );
+
+ ShowWindow(window->hWnd, SW_SHOWNORMAL);
+ UpdateWindow(window->hWnd);
+ GetClientRect(window->hWnd, &window->client_rect);
+
+ // Create a D3D11 device
+ D3D_FEATURE_LEVEL featureLevelSupported;
+ HRESULT hr = D3D11CreateDevice(
+ nullptr,
+ D3D_DRIVER_TYPE_HARDWARE,
+ NULL,
+ D3D11_CREATE_DEVICE_BGRA_SUPPORT,
+ NULL,
+ 0,
+ D3D11_SDK_VERSION,
+ &window->pD3D11Device,
+ &featureLevelSupported,
+ nullptr
+ );
+ assert(SUCCEEDED(hr));
+
+ D3D11_QUERY_DESC query_desc;
+ memset(&query_desc, 0, sizeof(query_desc));
+ query_desc.Query = D3D11_QUERY_EVENT;
+ for (int i=0 ; i < NUM_QUERIES ; ++i) {
+ hr = window->pD3D11Device->CreateQuery(&query_desc, &window->pQueries[i]);
+ assert(SUCCEEDED(hr));
+ }
+ window->current_query = 0;
+
+ hr = window->pD3D11Device->QueryInterface(&window->pDXGIDevice);
+ assert(SUCCEEDED(hr));
+
+ // Create a DirectComposition device
+ hr = DCompositionCreateDevice2(
+ window->pDXGIDevice,
+ __uuidof(IDCompositionDesktopDevice),
+ (void **) &window->pDCompDevice
+ );
+ assert(SUCCEEDED(hr));
+
+ // Create a DirectComposition target for a Win32 window handle
+ hr = window->pDCompDevice->CreateTargetForHwnd(
+ window->hWnd,
+ TRUE,
+ &window->pDCompTarget
+ );
+ assert(SUCCEEDED(hr));
+
+ // Create an ANGLE EGL device that wraps D3D11
+ window->EGLDevice = eglCreateDeviceANGLE(
+ EGL_D3D11_DEVICE_ANGLE,
+ window->pD3D11Device,
+ nullptr
+ );
+
+ EGLint display_attribs[] = {
+ EGL_NONE
+ };
+
+ window->EGLDisplay = eglGetPlatformDisplayEXT(
+ EGL_PLATFORM_DEVICE_EXT,
+ window->EGLDevice,
+ display_attribs
+ );
+
+ eglInitialize(
+ window->EGLDisplay,
+ nullptr,
+ nullptr
+ );
+
+ EGLint num_configs = 0;
+ EGLint cfg_attribs[] = {
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_ALPHA_SIZE, 8,
+ EGL_DEPTH_SIZE, 24,
+ EGL_NONE
+ };
+ EGLConfig configs[32];
+
+ eglChooseConfig(
+ window->EGLDisplay,
+ cfg_attribs,
+ configs,
+ sizeof(configs) / sizeof(EGLConfig),
+ &num_configs
+ );
+ assert(num_configs > 0);
+ window->config = configs[0];
+
+ if (window->enable_compositor) {
+ window->fb_surface = EGL_NO_SURFACE;
+ } else {
+ window->fb_surface = eglCreateWindowSurface(
+ window->EGLDisplay,
+ window->config,
+ window->hWnd,
+ NULL
+ );
+ assert(window->fb_surface != EGL_NO_SURFACE);
+ }
+
+ EGLint ctx_attribs[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 3,
+ EGL_NONE
+ };
+
+ // Create an EGL context that can be used for drawing
+ window->EGLContext = eglCreateContext(
+ window->EGLDisplay,
+ window->config,
+ EGL_NO_CONTEXT,
+ ctx_attribs
+ );
+
+ // Create the root of the DirectComposition visual tree
+ hr = window->pDCompDevice->CreateVisual(&window->pRoot);
+ assert(SUCCEEDED(hr));
+ hr = window->pDCompTarget->SetRoot(window->pRoot);
+ assert(SUCCEEDED(hr));
+
+ hr = window->pRoot->QueryInterface(
+ __uuidof(IDCompositionVisualDebug),
+ (void **) &window->pVisualDebug
+ );
+ assert(SUCCEEDED(hr));
+
+ // Uncomment this to see redraw regions during composite
+ // window->pVisualDebug->EnableRedrawRegions();
+
+ EGLBoolean ok = eglMakeCurrent(
+ window->EGLDisplay,
+ window->fb_surface,
+ window->fb_surface,
+ window->EGLContext
+ );
+ assert(ok);
+
+ return window;
+ }
+
+ void com_dc_destroy_window(Window *window) {
+ for (auto surface_it=window->surfaces.begin() ; surface_it != window->surfaces.end() ; ++surface_it) {
+ Surface &surface = surface_it->second;
+
+#ifndef USE_VIRTUAL_SURFACES
+ for (auto tile_it=surface.tiles.begin() ; tile_it != surface.tiles.end() ; ++tile_it) {
+ tile_it->second.pSurface->Release();
+ tile_it->second.pVisual->Release();
+ }
+#endif
+
+ surface.pVisual->Release();
+ }
+
+ if (window->fb_surface != EGL_NO_SURFACE) {
+ eglDestroySurface(window->EGLDisplay, window->fb_surface);
+ }
+ eglDestroyContext(window->EGLDisplay, window->EGLContext);
+ eglTerminate(window->EGLDisplay);
+ eglReleaseDeviceANGLE(window->EGLDevice);
+
+ for (int i=0 ; i < NUM_QUERIES ; ++i) {
+ window->pQueries[i]->Release();
+ }
+ window->pRoot->Release();
+ window->pVisualDebug->Release();
+ window->pD3D11Device->Release();
+ window->pDXGIDevice->Release();
+ window->pDCompDevice->Release();
+ window->pDCompTarget->Release();
+
+ CloseWindow(window->hWnd);
+ UnregisterClass(CLASS_NAME, window->hInstance);
+
+ delete window;
+ }
+
+ bool com_dc_tick(Window *) {
+ // Check and dispatch the windows event loop
+ MSG msg;
+ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+ if (msg.message == WM_QUIT) {
+ return false;
+ }
+
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+
+ return true;
+ }
+
+ void com_dc_swap_buffers(Window *window) {
+ // If not using DC mode, then do a normal EGL swap buffers.
+ if (window->fb_surface != EGL_NO_SURFACE) {
+ switch (window->sync_mode) {
+ case SyncMode::None:
+ eglSwapInterval(window->EGLDisplay, 0);
+ break;
+ case SyncMode::Swap:
+ eglSwapInterval(window->EGLDisplay, 1);
+ break;
+ default:
+ assert(false); // unexpected vsync mode for simple compositor.
+ break;
+ }
+
+ eglSwapBuffers(window->EGLDisplay, window->fb_surface);
+ } else {
+ switch (window->sync_mode) {
+ case SyncMode::None:
+ break;
+ case SyncMode::Commit:
+ window->pDCompDevice->WaitForCommitCompletion();
+ break;
+ case SyncMode::Flush:
+ DwmFlush();
+ break;
+ case SyncMode::Query:
+ // todo!!!!
+ break;
+ default:
+ assert(false); // unexpected vsync mode for native compositor
+ break;
+ }
+ }
+ }
+
+ // Create a new DC surface
+ void com_dc_create_surface(
+ Window *window,
+ uint64_t id,
+ int tile_width,
+ int tile_height,
+ bool is_opaque
+ ) {
+ assert(window->surfaces.count(id) == 0);
+
+ Surface surface;
+ surface.tile_width = tile_width;
+ surface.tile_height = tile_height;
+ surface.is_opaque = is_opaque;
+
+ // Create the visual node in the DC tree that stores properties
+ HRESULT hr = window->pDCompDevice->CreateVisual(&surface.pVisual);
+ assert(SUCCEEDED(hr));
+
+#ifdef USE_VIRTUAL_SURFACES
+ DXGI_ALPHA_MODE alpha_mode = surface.is_opaque ? DXGI_ALPHA_MODE_IGNORE : DXGI_ALPHA_MODE_PREMULTIPLIED;
+
+ hr = window->pDCompDevice->CreateVirtualSurface(
+ VIRTUAL_OFFSET * 2,
+ VIRTUAL_OFFSET * 2,
+ DXGI_FORMAT_B8G8R8A8_UNORM,
+ alpha_mode,
+ &surface.pVirtualSurface
+ );
+ assert(SUCCEEDED(hr));
+
+ // Bind the surface memory to this visual
+ hr = surface.pVisual->SetContent(surface.pVirtualSurface);
+ assert(SUCCEEDED(hr));
+#endif
+
+ window->surfaces[id] = surface;
+ }
+
+ void com_dc_create_tile(
+ Window *window,
+ uint64_t id,
+ int x,
+ int y
+ ) {
+ assert(window->surfaces.count(id) == 1);
+ Surface &surface = window->surfaces[id];
+
+ TileKey key(x, y);
+ assert(surface.tiles.count(key) == 0);
+
+ Tile tile;
+
+#ifndef USE_VIRTUAL_SURFACES
+ // Create the video memory surface.
+ DXGI_ALPHA_MODE alpha_mode = surface.is_opaque ? DXGI_ALPHA_MODE_IGNORE : DXGI_ALPHA_MODE_PREMULTIPLIED;
+ HRESULT hr = window->pDCompDevice->CreateSurface(
+ surface.tile_width,
+ surface.tile_height,
+ DXGI_FORMAT_B8G8R8A8_UNORM,
+ alpha_mode,
+ &tile.pSurface
+ );
+ assert(SUCCEEDED(hr));
+
+ // Create the visual node in the DC tree that stores properties
+ hr = window->pDCompDevice->CreateVisual(&tile.pVisual);
+ assert(SUCCEEDED(hr));
+
+ // Bind the surface memory to this visual
+ hr = tile.pVisual->SetContent(tile.pSurface);
+ assert(SUCCEEDED(hr));
+
+ // Place the visual in local-space of this surface
+ float offset_x = (float) (x * surface.tile_width);
+ float offset_y = (float) (y * surface.tile_height);
+ tile.pVisual->SetOffsetX(offset_x);
+ tile.pVisual->SetOffsetY(offset_y);
+
+ surface.pVisual->AddVisual(
+ tile.pVisual,
+ FALSE,
+ NULL
+ );
+#endif
+
+ surface.tiles[key] = tile;
+ }
+
+ void com_dc_destroy_tile(
+ Window *window,
+ uint64_t id,
+ int x,
+ int y
+ ) {
+ assert(window->surfaces.count(id) == 1);
+ Surface &surface = window->surfaces[id];
+
+ TileKey key(x, y);
+ assert(surface.tiles.count(key) == 1);
+ Tile &tile = surface.tiles[key];
+
+#ifndef USE_VIRTUAL_SURFACES
+ surface.pVisual->RemoveVisual(tile.pVisual);
+
+ tile.pVisual->Release();
+ tile.pSurface->Release();
+#endif
+
+ surface.tiles.erase(key);
+ }
+
+ void com_dc_destroy_surface(
+ Window *window,
+ uint64_t id
+ ) {
+ assert(window->surfaces.count(id) == 1);
+ Surface &surface = window->surfaces[id];
+
+ window->pRoot->RemoveVisual(surface.pVisual);
+
+#ifdef USE_VIRTUAL_SURFACES
+ surface.pVirtualSurface->Release();
+#else
+ // Release the video memory and visual in the tree
+ for (auto tile_it=surface.tiles.begin() ; tile_it != surface.tiles.end() ; ++tile_it) {
+ tile_it->second.pSurface->Release();
+ tile_it->second.pVisual->Release();
+ }
+#endif
+
+ surface.pVisual->Release();
+ window->surfaces.erase(id);
+ }
+
+ // Bind a DC surface to allow issuing GL commands to it
+ GLuint com_dc_bind_surface(
+ Window *window,
+ uint64_t surface_id,
+ int tile_x,
+ int tile_y,
+ int *x_offset,
+ int *y_offset,
+ int dirty_x0,
+ int dirty_y0,
+ int dirty_width,
+ int dirty_height
+ ) {
+ assert(window->surfaces.count(surface_id) == 1);
+ Surface &surface = window->surfaces[surface_id];
+
+ TileKey key(tile_x, tile_y);
+ assert(surface.tiles.count(key) == 1);
+ Tile &tile = surface.tiles[key];
+
+ // Inform DC that we want to draw on this surface. DC uses texture
+ // atlases when the tiles are small. It returns an offset where the
+ // client code must draw into this surface when this happens.
+ RECT update_rect;
+ update_rect.left = dirty_x0;
+ update_rect.top = dirty_y0;
+ update_rect.right = dirty_x0 + dirty_width;
+ update_rect.bottom = dirty_y0 + dirty_height;
+ POINT offset;
+ D3D11_TEXTURE2D_DESC desc;
+ ID3D11Texture2D *pTexture;
+ HRESULT hr;
+
+ // Store the current surface for unbinding later
+#ifdef USE_VIRTUAL_SURFACES
+ LONG tile_offset_x = VIRTUAL_OFFSET + tile_x * surface.tile_width;
+ LONG tile_offset_y = VIRTUAL_OFFSET + tile_y * surface.tile_height;
+
+ update_rect.left += tile_offset_x;
+ update_rect.top += tile_offset_y;
+ update_rect.right += tile_offset_x;
+ update_rect.bottom += tile_offset_y;
+
+ hr = surface.pVirtualSurface->BeginDraw(
+ &update_rect,
+ __uuidof(ID3D11Texture2D),
+ (void **) &pTexture,
+ &offset
+ );
+ window->pCurrentSurface = surface.pVirtualSurface;
+#else
+ hr = tile.pSurface->BeginDraw(
+ &update_rect,
+ __uuidof(ID3D11Texture2D),
+ (void **) &pTexture,
+ &offset
+ );
+ window->pCurrentSurface = tile.pSurface;
+#endif
+
+ // DC includes the origin of the dirty / update rect in the draw offset,
+ // undo that here since WR expects it to be an absolute offset.
+ assert(SUCCEEDED(hr));
+ offset.x -= dirty_x0;
+ offset.y -= dirty_y0;
+ pTexture->GetDesc(&desc);
+ *x_offset = offset.x;
+ *y_offset = offset.y;
+
+ // Construct an EGLImage wrapper around the D3D texture for ANGLE.
+ const EGLAttrib attribs[] = { EGL_NONE };
+ window->mEGLImage = eglCreateImage(
+ window->EGLDisplay,
+ EGL_NO_CONTEXT,
+ EGL_D3D11_TEXTURE_ANGLE,
+ static_cast<EGLClientBuffer>(pTexture),
+ attribs
+ );
+
+ // Get the current FBO and RBO id, so we can restore them later
+ GLint currentFboId, currentRboId;
+ glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &currentFboId);
+ glGetIntegerv(GL_RENDERBUFFER_BINDING, &currentRboId);
+
+ // Create a render buffer object that is backed by the EGL image.
+ glGenRenderbuffers(1, &window->mColorRBO);
+ glBindRenderbuffer(GL_RENDERBUFFER, window->mColorRBO);
+ glEGLImageTargetRenderbufferStorageOES(GL_RENDERBUFFER, window->mEGLImage);
+
+ // Get or create an FBO for the specified dimensions
+ GLuint fboId = GetOrCreateFbo(window, desc.Width, desc.Height);
+
+ // Attach the new renderbuffer to the FBO
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fboId);
+ glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER,
+ GL_COLOR_ATTACHMENT0,
+ GL_RENDERBUFFER,
+ window->mColorRBO);
+
+ // Restore previous FBO and RBO bindings
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, currentFboId);
+ glBindRenderbuffer(GL_RENDERBUFFER, currentRboId);
+
+ return fboId;
+ }
+
+ // Unbind a currently bound DC surface
+ void com_dc_unbind_surface(Window *window) {
+ HRESULT hr = window->pCurrentSurface->EndDraw();
+ assert(SUCCEEDED(hr));
+
+ glDeleteRenderbuffers(1, &window->mColorRBO);
+ window->mColorRBO = 0;
+
+ eglDestroyImage(window->EGLDisplay, window->mEGLImage);
+ window->mEGLImage = EGL_NO_IMAGE;
+ }
+
+ void com_dc_begin_transaction(Window *) {
+ }
+
+ // Add a DC surface to the visual tree. Called per-frame to build the composition.
+ void com_dc_add_surface(
+ Window *window,
+ uint64_t id,
+ int x,
+ int y,
+ int clip_x,
+ int clip_y,
+ int clip_w,
+ int clip_h
+ ) {
+ Surface surface = window->surfaces[id];
+ window->mCurrentLayers.push_back(id);
+
+ // Place the visual - this changes frame to frame based on scroll position
+ // of the slice.
+ float offset_x = (float) (x + window->client_rect.left);
+ float offset_y = (float) (y + window->client_rect.top);
+#ifdef USE_VIRTUAL_SURFACES
+ offset_x -= VIRTUAL_OFFSET;
+ offset_y -= VIRTUAL_OFFSET;
+#endif
+ surface.pVisual->SetOffsetX(offset_x);
+ surface.pVisual->SetOffsetY(offset_y);
+
+ // Set the clip rect - converting from world space to the pre-offset space
+ // that DC requires for rectangle clips.
+ D2D_RECT_F clip_rect;
+ clip_rect.left = clip_x - offset_x;
+ clip_rect.top = clip_y - offset_y;
+ clip_rect.right = clip_rect.left + clip_w;
+ clip_rect.bottom = clip_rect.top + clip_h;
+ surface.pVisual->SetClip(clip_rect);
+ }
+
+ // Finish the composition transaction, telling DC to composite
+ void com_dc_end_transaction(Window *window) {
+ bool same = window->mPrevLayers == window->mCurrentLayers;
+
+ if (!same) {
+ HRESULT hr = window->pRoot->RemoveAllVisuals();
+ assert(SUCCEEDED(hr));
+
+ for (auto it = window->mCurrentLayers.begin(); it != window->mCurrentLayers.end(); ++it) {
+ Surface &surface = window->surfaces[*it];
+
+ // Add this visual as the last element in the visual tree (z-order is implicit,
+ // based on the order tiles are added).
+ hr = window->pRoot->AddVisual(
+ surface.pVisual,
+ FALSE,
+ NULL
+ );
+ assert(SUCCEEDED(hr));
+ }
+ }
+
+ window->mPrevLayers.swap(window->mCurrentLayers);
+ window->mCurrentLayers.clear();
+
+ HRESULT hr = window->pDCompDevice->Commit();
+ assert(SUCCEEDED(hr));
+ }
+
+ // Get a pointer to an EGL symbol
+ void *com_dc_get_proc_address(const char *name) {
+ return eglGetProcAddress(name);
+ }
+}
diff --git a/third_party/webrender/example-compositor/compositor-windows/src/lib.rs b/third_party/webrender/example-compositor/compositor-windows/src/lib.rs
new file mode 100644
index 00000000000..18b80b5d1e9
--- /dev/null
+++ b/third_party/webrender/example-compositor/compositor-windows/src/lib.rs
@@ -0,0 +1,261 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use std::os::raw::{c_void, c_char};
+
+/*
+
+ This is a very simple (and unsafe!) rust wrapper for the DirectComposite / D3D11 / ANGLE
+ implementation in lib.cpp.
+
+ It just proxies the calls from the Compositor impl to the C99 code. This is very
+ hacky and not suitable for production!
+
+ */
+
+// Opaque wrapper for the Window type in lib.cpp
+#[repr(C)]
+pub struct Window {
+ _unused: [u8; 0]
+}
+
+// C99 functions that do the compositor work
+extern {
+ fn com_dc_create_window(
+ width: i32,
+ height: i32,
+ enable_compositor: bool,
+ sync_mode: i32,
+ ) -> *mut Window;
+ fn com_dc_destroy_window(window: *mut Window);
+ fn com_dc_tick(window: *mut Window) -> bool;
+ fn com_dc_get_proc_address(name: *const c_char) -> *const c_void;
+ fn com_dc_swap_buffers(window: *mut Window);
+
+ fn com_dc_create_surface(
+ window: *mut Window,
+ id: u64,
+ tile_width: i32,
+ tile_height: i32,
+ is_opaque: bool,
+ );
+
+ fn com_dc_create_tile(
+ window: *mut Window,
+ id: u64,
+ x: i32,
+ y: i32,
+ );
+
+ fn com_dc_destroy_tile(
+ window: *mut Window,
+ id: u64,
+ x: i32,
+ y: i32,
+ );
+
+ fn com_dc_destroy_surface(
+ window: *mut Window,
+ id: u64,
+ );
+
+ fn com_dc_bind_surface(
+ window: *mut Window,
+ surface_id: u64,
+ tile_x: i32,
+ tile_y: i32,
+ x_offset: &mut i32,
+ y_offset: &mut i32,
+ dirty_x0: i32,
+ dirty_y0: i32,
+ dirty_width: i32,
+ dirty_height: i32,
+ ) -> u32;
+ fn com_dc_unbind_surface(window: *mut Window);
+
+ fn com_dc_begin_transaction(window: *mut Window);
+
+ fn com_dc_add_surface(
+ window: *mut Window,
+ id: u64,
+ x: i32,
+ y: i32,
+ clip_x: i32,
+ clip_y: i32,
+ clip_w: i32,
+ clip_h: i32,
+ );
+
+ fn com_dc_end_transaction(window: *mut Window);
+}
+
+pub fn create_window(
+ width: i32,
+ height: i32,
+ enable_compositor: bool,
+ sync_mode: i32,
+) -> *mut Window {
+ unsafe {
+ com_dc_create_window(width, height, enable_compositor, sync_mode)
+ }
+}
+
+pub fn destroy_window(window: *mut Window) {
+ unsafe {
+ com_dc_destroy_window(window);
+ }
+}
+
+pub fn tick(window: *mut Window) -> bool {
+ unsafe {
+ com_dc_tick(window)
+ }
+}
+
+pub fn get_proc_address(name: *const c_char) -> *const c_void {
+ unsafe {
+ com_dc_get_proc_address(name)
+ }
+}
+
+pub fn create_surface(
+ window: *mut Window,
+ id: u64,
+ tile_width: i32,
+ tile_height: i32,
+ is_opaque: bool,
+) {
+ unsafe {
+ com_dc_create_surface(
+ window,
+ id,
+ tile_width,
+ tile_height,
+ is_opaque,
+ )
+ }
+}
+
+pub fn create_tile(
+ window: *mut Window,
+ id: u64,
+ x: i32,
+ y: i32,
+) {
+ unsafe {
+ com_dc_create_tile(
+ window,
+ id,
+ x,
+ y,
+ )
+ }
+}
+
+pub fn destroy_tile(
+ window: *mut Window,
+ id: u64,
+ x: i32,
+ y: i32,
+) {
+ unsafe {
+ com_dc_destroy_tile(
+ window,
+ id,
+ x,
+ y,
+ )
+ }
+}
+
+pub fn destroy_surface(
+ window: *mut Window,
+ id: u64,
+) {
+ unsafe {
+ com_dc_destroy_surface(
+ window,
+ id,
+ )
+ }
+}
+
+pub fn bind_surface(
+ window: *mut Window,
+ surface_id: u64,
+ tile_x: i32,
+ tile_y: i32,
+ dirty_x0: i32,
+ dirty_y0: i32,
+ dirty_width: i32,
+ dirty_height: i32,
+) -> (u32, i32, i32) {
+ unsafe {
+ let mut x_offset = 0;
+ let mut y_offset = 0;
+
+ let fbo_id = com_dc_bind_surface(
+ window,
+ surface_id,
+ tile_x,
+ tile_y,
+ &mut x_offset,
+ &mut y_offset,
+ dirty_x0,
+ dirty_y0,
+ dirty_width,
+ dirty_height,
+ );
+
+ (fbo_id, x_offset, y_offset)
+ }
+}
+
+pub fn add_surface(
+ window: *mut Window,
+ id: u64,
+ x: i32,
+ y: i32,
+ clip_x: i32,
+ clip_y: i32,
+ clip_w: i32,
+ clip_h: i32,
+) {
+ unsafe {
+ com_dc_add_surface(
+ window,
+ id,
+ x,
+ y,
+ clip_x,
+ clip_y,
+ clip_w,
+ clip_h,
+ )
+ }
+}
+
+pub fn begin_transaction(window: *mut Window) {
+ unsafe {
+ com_dc_begin_transaction(window)
+ }
+}
+
+pub fn unbind_surface(window: *mut Window) {
+ unsafe {
+ com_dc_unbind_surface(window)
+ }
+}
+
+pub fn end_transaction(window: *mut Window) {
+ unsafe {
+ com_dc_end_transaction(window)
+ }
+}
+
+pub fn swap_buffers(window: *mut Window) {
+ unsafe {
+ com_dc_swap_buffers(window);
+ }
+}
diff --git a/third_party/webrender/example-compositor/compositor/Cargo.toml b/third_party/webrender/example-compositor/compositor/Cargo.toml
new file mode 100644
index 00000000000..d505e9ad295
--- /dev/null
+++ b/third_party/webrender/example-compositor/compositor/Cargo.toml
@@ -0,0 +1,13 @@
+[package]
+name = "compositor"
+version = "0.1.0"
+authors = ["Glenn Watson <gw@intuitionlibrary.com>"]
+edition = "2018"
+license = "MPL-2.0"
+
+[dependencies]
+webrender = { path = "../../webrender" }
+gleam = "0.12.0"
+
+[target.'cfg(windows)'.dependencies]
+compositor-windows = { path = "../compositor-windows" }
diff --git a/third_party/webrender/example-compositor/compositor/src/main.rs b/third_party/webrender/example-compositor/compositor/src/main.rs
new file mode 100644
index 00000000000..b2a7aac3a94
--- /dev/null
+++ b/third_party/webrender/example-compositor/compositor/src/main.rs
@@ -0,0 +1,484 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/*
+
+ An example of how to implement the Compositor trait that
+ allows picture caching surfaces to be composited by the operating
+ system.
+
+ The current example supports DirectComposite on Windows only.
+
+ */
+
+use euclid::Angle;
+use gleam::gl;
+use std::ffi::CString;
+use std::sync::mpsc;
+use webrender::api::*;
+use webrender::api::units::*;
+#[cfg(target_os = "windows")]
+use compositor_windows as compositor;
+use std::{env, f32, process};
+
+// A very hacky integration with DirectComposite. It proxies calls from the compositor
+// interface to a simple C99 library which does the DirectComposition / D3D11 / ANGLE
+// interfacing. This is a very unsafe impl due to the way the window pointer is passed
+// around!
+struct DirectCompositeInterface {
+ window: *mut compositor::Window,
+}
+
+impl DirectCompositeInterface {
+ fn new(window: *mut compositor::Window) -> Self {
+ DirectCompositeInterface {
+ window,
+ }
+ }
+}
+
+impl webrender::Compositor for DirectCompositeInterface {
+ fn create_surface(
+ &mut self,
+ id: webrender::NativeSurfaceId,
+ tile_size: DeviceIntSize,
+ is_opaque: bool,
+ ) {
+ compositor::create_surface(
+ self.window,
+ id.0,
+ tile_size.width,
+ tile_size.height,
+ is_opaque,
+ );
+ }
+
+ fn destroy_surface(
+ &mut self,
+ id: webrender::NativeSurfaceId,
+ ) {
+ compositor::destroy_surface(self.window, id.0);
+ }
+
+ fn create_tile(
+ &mut self,
+ id: webrender::NativeTileId,
+ ) {
+ compositor::create_tile(
+ self.window,
+ id.surface_id.0,
+ id.x,
+ id.y,
+ );
+ }
+
+ fn destroy_tile(
+ &mut self,
+ id: webrender::NativeTileId,
+ ) {
+ compositor::destroy_tile(
+ self.window,
+ id.surface_id.0,
+ id.x,
+ id.y,
+ );
+ }
+
+ fn bind(
+ &mut self,
+ id: webrender::NativeTileId,
+ dirty_rect: DeviceIntRect,
+ ) -> webrender::NativeSurfaceInfo {
+ let (fbo_id, x, y) = compositor::bind_surface(
+ self.window,
+ id.surface_id.0,
+ id.x,
+ id.y,
+ dirty_rect.origin.x,
+ dirty_rect.origin.y,
+ dirty_rect.size.width,
+ dirty_rect.size.height,
+ );
+
+ webrender::NativeSurfaceInfo {
+ origin: DeviceIntPoint::new(x, y),
+ fbo_id,
+ }
+ }
+
+ fn unbind(&mut self) {
+ compositor::unbind_surface(self.window);
+ }
+
+ fn begin_frame(&mut self) {
+ compositor::begin_transaction(self.window);
+ }
+
+ fn add_surface(
+ &mut self,
+ id: webrender::NativeSurfaceId,
+ position: DeviceIntPoint,
+ clip_rect: DeviceIntRect,
+ ) {
+ compositor::add_surface(
+ self.window,
+ id.0,
+ position.x,
+ position.y,
+ clip_rect.origin.x,
+ clip_rect.origin.y,
+ clip_rect.size.width,
+ clip_rect.size.height,
+ );
+ }
+
+ fn end_frame(&mut self) {
+ compositor::end_transaction(self.window);
+ }
+}
+
+// Simplisitic implementation of the WR notifier interface to know when a frame
+// has been prepared and can be rendered.
+struct Notifier {
+ tx: mpsc::Sender<()>,
+}
+
+impl Notifier {
+ fn new(tx: mpsc::Sender<()>) -> Self {
+ Notifier {
+ tx,
+ }
+ }
+}
+
+impl RenderNotifier for Notifier {
+ fn clone(&self) -> Box<dyn RenderNotifier> {
+ Box::new(Notifier {
+ tx: self.tx.clone()
+ })
+ }
+
+ fn wake_up(&self) {
+ }
+
+ fn new_frame_ready(&self,
+ _: DocumentId,
+ _scrolled: bool,
+ _composite_needed: bool,
+ _render_time: Option<u64>) {
+ self.tx.send(()).ok();
+ }
+}
+
+fn push_rotated_rect(
+ builder: &mut DisplayListBuilder,
+ rect: LayoutRect,
+ color: ColorF,
+ spatial_id: SpatialId,
+ root_pipeline_id: PipelineId,
+ angle: f32,
+ time: f32,
+) {
+ let color = color.scale_rgb(time);
+ let rotation = LayoutTransform::create_rotation(
+ 0.0,
+ 0.0,
+ 1.0,
+ Angle::radians(2.0 * std::f32::consts::PI * angle),
+ );
+ let transform_origin = LayoutVector3D::new(
+ rect.origin.x + rect.size.width * 0.5,
+ rect.origin.y + rect.size.height * 0.5,
+ 0.0,
+ );
+ let transform = rotation
+ .pre_translate(-transform_origin)
+ .post_translate(transform_origin);
+ let spatial_id = builder.push_reference_frame(
+ LayoutPoint::zero(),
+ spatial_id,
+ TransformStyle::Flat,
+ PropertyBinding::Value(transform),
+ ReferenceFrameKind::Transform,
+ );
+ builder.push_rect(
+ &CommonItemProperties::new(
+ rect,
+ SpaceAndClipInfo {
+ spatial_id,
+ clip_id: ClipId::root(root_pipeline_id),
+ },
+ ),
+ rect,
+ color,
+ );
+}
+
+fn build_display_list(
+ builder: &mut DisplayListBuilder,
+ scroll_id: ExternalScrollId,
+ root_pipeline_id: PipelineId,
+ layout_size: LayoutSize,
+ time: f32,
+ invalidations: Invalidations,
+) {
+ let size_factor = match invalidations {
+ Invalidations::Small => 0.1,
+ Invalidations::Large | Invalidations::Scrolling => 1.0,
+ };
+
+ let fixed_space_info = SpaceAndClipInfo {
+ spatial_id: SpatialId::root_scroll_node(root_pipeline_id),
+ clip_id: ClipId::root(root_pipeline_id),
+ };
+
+ let scroll_space_info = builder.define_scroll_frame(
+ &fixed_space_info,
+ Some(scroll_id),
+ LayoutRect::new(LayoutPoint::zero(), layout_size),
+ LayoutRect::new(LayoutPoint::zero(), layout_size),
+ ScrollSensitivity::Script,
+ LayoutVector2D::zero(),
+ );
+
+ builder.push_rect(
+ &CommonItemProperties::new(
+ LayoutRect::new(LayoutPoint::zero(), layout_size).inflate(-10.0, -10.0),
+ fixed_space_info,
+ ),
+ LayoutRect::new(LayoutPoint::zero(), layout_size).inflate(-10.0, -10.0),
+ ColorF::new(0.8, 0.8, 0.8, 1.0),
+ );
+
+ push_rotated_rect(
+ builder,
+ LayoutRect::new(
+ LayoutPoint::new(100.0, 100.0),
+ LayoutSize::new(size_factor * 400.0, size_factor * 400.0),
+ ),
+ ColorF::new(1.0, 0.0, 0.0, 1.0),
+ scroll_space_info.spatial_id,
+ root_pipeline_id,
+ time,
+ time,
+ );
+
+ push_rotated_rect(
+ builder,
+ LayoutRect::new(
+ LayoutPoint::new(800.0, 100.0),
+ LayoutSize::new(size_factor * 100.0, size_factor * 600.0),
+ ),
+ ColorF::new(0.0, 1.0, 0.0, 1.0),
+ fixed_space_info.spatial_id,
+ root_pipeline_id,
+ 0.2,
+ time,
+ );
+
+ push_rotated_rect(
+ builder,
+ LayoutRect::new(
+ LayoutPoint::new(700.0, 200.0),
+ LayoutSize::new(size_factor * 300.0, size_factor * 300.0),
+ ),
+ ColorF::new(0.0, 0.0, 1.0, 1.0),
+ scroll_space_info.spatial_id,
+ root_pipeline_id,
+ 0.1,
+ time,
+ );
+}
+
+#[derive(Debug, Copy, Clone)]
+enum Invalidations {
+ Large,
+ Small,
+ Scrolling,
+}
+
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+enum Sync {
+ None = 0,
+ Swap = 1,
+ Commit = 2,
+ Flush = 3,
+ Query = 4,
+}
+
+fn main() {
+ let args: Vec<String> = env::args().collect();
+
+ if args.len() != 6 {
+ println!("USAGE: compositor [native|none] [small|large|scroll] [none|swap|commit|flush|query] width height");
+ process::exit(0);
+ }
+
+ let enable_compositor = match args[1].parse::<String>().unwrap().as_str() {
+ "native" => true,
+ "none" => false,
+ _ => panic!("invalid compositor [native, none]"),
+ };
+
+ let inv_mode = match args[2].parse::<String>().unwrap().as_str() {
+ "small" => Invalidations::Small,
+ "large" => Invalidations::Large,
+ "scroll" => Invalidations::Scrolling,
+ _ => panic!("invalid invalidations [small, large, scroll]"),
+ };
+
+ let sync_mode = match args[3].parse::<String>().unwrap().as_str() {
+ "none" => Sync::None,
+ "swap" => Sync::Swap,
+ "commit" => Sync::Commit,
+ "flush" => Sync::Flush,
+ "query" => Sync::Query,
+ _ => panic!("invalid sync mode [none, swap, commit, flush, query]"),
+ };
+
+ let width = args[4].parse().unwrap();
+ let height = args[5].parse().unwrap();
+ let device_size = DeviceIntSize::new(width, height);
+
+ // Load GL, construct WR and the native compositor interface.
+ let window = compositor::create_window(
+ device_size.width,
+ device_size.height,
+ enable_compositor,
+ sync_mode as i32,
+ );
+ let debug_flags = DebugFlags::empty();
+ let compositor_config = if enable_compositor {
+ webrender::CompositorConfig::Native {
+ max_update_rects: 1,
+ compositor: Box::new(DirectCompositeInterface::new(window)),
+ }
+ } else {
+ webrender::CompositorConfig::Draw {
+ max_partial_present_rects: 0,
+ }
+ };
+ let opts = webrender::RendererOptions {
+ clear_color: Some(ColorF::new(1.0, 1.0, 1.0, 1.0)),
+ debug_flags,
+ enable_picture_caching: true,
+ compositor_config,
+ ..webrender::RendererOptions::default()
+ };
+ let (tx, rx) = mpsc::channel();
+ let notifier = Box::new(Notifier::new(tx));
+ let gl = unsafe {
+ gl::GlesFns::load_with(
+ |symbol| {
+ let symbol = CString::new(symbol).unwrap();
+ let ptr = compositor::get_proc_address(symbol.as_ptr());
+ ptr
+ }
+ )
+ };
+ let (mut renderer, sender) = webrender::Renderer::new(
+ gl.clone(),
+ notifier,
+ opts,
+ None,
+ device_size,
+ ).unwrap();
+ let api = sender.create_api();
+ let document_id = api.add_document(device_size, 0);
+ let device_pixel_ratio = 1.0;
+ let mut current_epoch = Epoch(0);
+ let root_pipeline_id = PipelineId(0, 0);
+ let layout_size = device_size.to_f32() / euclid::Scale::new(device_pixel_ratio);
+ let mut time = 0.0;
+ let scroll_id = ExternalScrollId(3, root_pipeline_id);
+
+ // Kick off first transaction which will mean we get a notify below to build the DL and render.
+ let mut txn = Transaction::new();
+ txn.set_root_pipeline(root_pipeline_id);
+
+ if let Invalidations::Scrolling = inv_mode {
+ let mut root_builder = DisplayListBuilder::new(root_pipeline_id, layout_size);
+
+ build_display_list(
+ &mut root_builder,
+ scroll_id,
+ root_pipeline_id,
+ layout_size,
+ 1.0,
+ inv_mode,
+ );
+
+ txn.set_display_list(
+ current_epoch,
+ None,
+ layout_size,
+ root_builder.finalize(),
+ true,
+ );
+ }
+
+ txn.generate_frame();
+ api.send_transaction(document_id, txn);
+
+ // Tick the compositor (in this sample, we don't block on UI events)
+ while compositor::tick(window) {
+ // If there is a new frame ready to draw
+ if let Ok(..) = rx.try_recv() {
+ // Update and render. This will invoke the native compositor interface implemented above
+ // as required.
+ renderer.update();
+ renderer.render(device_size).unwrap();
+ let _ = renderer.flush_pipeline_info();
+
+ // Construct a simple display list that can be drawn and composited by DC.
+ let mut txn = Transaction::new();
+
+ match inv_mode {
+ Invalidations::Small | Invalidations::Large => {
+ let mut root_builder = DisplayListBuilder::new(root_pipeline_id, layout_size);
+
+ build_display_list(
+ &mut root_builder,
+ scroll_id,
+ root_pipeline_id,
+ layout_size,
+ time,
+ inv_mode,
+ );
+
+ txn.set_display_list(
+ current_epoch,
+ None,
+ layout_size,
+ root_builder.finalize(),
+ true,
+ );
+ }
+ Invalidations::Scrolling => {
+ let d = 0.5 - 0.5 * (2.0 * f32::consts::PI * 5.0 * time).cos();
+ txn.scroll_node_with_id(
+ LayoutPoint::new(0.0, (d * 100.0).round()),
+ scroll_id,
+ ScrollClamping::NoClamping,
+ );
+ }
+ }
+
+ txn.generate_frame();
+ api.send_transaction(document_id, txn);
+ current_epoch.0 += 1;
+ time += 0.001;
+ if time > 1.0 {
+ time = 0.0;
+ }
+
+ // This does nothing when native compositor is enabled
+ compositor::swap_buffers(window);
+ }
+ }
+
+ renderer.deinit();
+ compositor::destroy_window(window);
+}
diff --git a/third_party/webrender/examples/Cargo.toml b/third_party/webrender/examples/Cargo.toml
new file mode 100644
index 00000000000..4cf5d2232d6
--- /dev/null
+++ b/third_party/webrender/examples/Cargo.toml
@@ -0,0 +1,71 @@
+[package]
+name = "webrender-examples"
+version = "0.1.0"
+authors = ["Glenn Watson <gw@intuitionlibrary.com>"]
+license = "MPL-2.0"
+repository = "https://github.com/servo/webrender"
+edition = "2018"
+
+[[bin]]
+name = "alpha_perf"
+path = "alpha_perf.rs"
+
+[[bin]]
+name = "animation"
+path = "animation.rs"
+
+[[bin]]
+name = "basic"
+path = "basic.rs"
+
+[[bin]]
+name = "blob"
+path = "blob.rs"
+
+[[bin]]
+name = "document"
+path = "document.rs"
+
+[[bin]]
+name = "frame_output"
+path = "frame_output.rs"
+
+[[bin]]
+name = "iframe"
+path = "iframe.rs"
+
+[[bin]]
+name = "image_resize"
+path = "image_resize.rs"
+
+[[bin]]
+name = "multiwindow"
+path = "multiwindow.rs"
+
+[[bin]]
+name = "scrolling"
+path = "scrolling.rs"
+
+[[bin]]
+name = "texture_cache_stress"
+path = "texture_cache_stress.rs"
+
+[[bin]]
+name = "yuv"
+path = "yuv.rs"
+
+[features]
+debug = ["webrender/capture", "webrender/debugger", "webrender/profiler"]
+
+[dependencies]
+app_units = "0.7"
+env_logger = "0.5"
+euclid = "0.22"
+gleam = "0.12"
+glutin = "0.21"
+rayon = "1"
+webrender = { path = "../webrender" }
+winit = "0.19"
+
+[target.'cfg(target_os = "macos")'.dependencies]
+core-foundation = "0.7"
diff --git a/third_party/webrender/examples/README.md b/third_party/webrender/examples/README.md
new file mode 100644
index 00000000000..68efd33a892
--- /dev/null
+++ b/third_party/webrender/examples/README.md
@@ -0,0 +1,8 @@
+# Examples
+
+This directory contains a collection of examples which uses the WebRender API.
+
+To run an example e.g. `basic`, try:
+```
+cargo run --bin basic
+```
diff --git a/third_party/webrender/examples/alpha_perf.rs b/third_party/webrender/examples/alpha_perf.rs
new file mode 100644
index 00000000000..56dc5b1abeb
--- /dev/null
+++ b/third_party/webrender/examples/alpha_perf.rs
@@ -0,0 +1,93 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate euclid;
+extern crate gleam;
+extern crate glutin;
+extern crate webrender;
+extern crate winit;
+
+#[path = "common/boilerplate.rs"]
+mod boilerplate;
+
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
+use std::cmp;
+use webrender::api::*;
+use webrender::api::units::DeviceIntSize;
+
+
+struct App {
+ rect_count: usize,
+}
+
+impl Example for App {
+ fn render(
+ &mut self,
+ _api: &mut RenderApi,
+ builder: &mut DisplayListBuilder,
+ _txn: &mut Transaction,
+ _device_size: DeviceIntSize,
+ pipeline_id: PipelineId,
+ _document_id: DocumentId,
+ ) {
+ let bounds = (0, 0).to(1920, 1080);
+ let space_and_clip = SpaceAndClipInfo::root_scroll(pipeline_id);
+
+ builder.push_simple_stacking_context(
+ bounds.origin,
+ space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ for _ in 0 .. self.rect_count {
+ builder.push_rect(
+ &CommonItemProperties::new(bounds, space_and_clip),
+ bounds,
+ ColorF::new(1.0, 1.0, 1.0, 0.05)
+ );
+ }
+
+ builder.pop_stacking_context();
+ }
+
+ fn on_event(
+ &mut self,
+ event: winit::WindowEvent,
+ _api: &mut RenderApi,
+ _document_id: DocumentId
+ ) -> bool {
+ match event {
+ winit::WindowEvent::KeyboardInput {
+ input: winit::KeyboardInput {
+ state: winit::ElementState::Pressed,
+ virtual_keycode: Some(key),
+ ..
+ },
+ ..
+ } => {
+ match key {
+ winit::VirtualKeyCode::Right => {
+ self.rect_count += 1;
+ println!("rects = {}", self.rect_count);
+ }
+ winit::VirtualKeyCode::Left => {
+ self.rect_count = cmp::max(self.rect_count, 1) - 1;
+ println!("rects = {}", self.rect_count);
+ }
+ _ => {}
+ };
+ }
+ _ => (),
+ }
+
+ true
+ }
+}
+
+fn main() {
+ let mut app = App {
+ rect_count: 1,
+ };
+ boilerplate::main_wrapper(&mut app, None);
+}
diff --git a/third_party/webrender/examples/animation.rs b/third_party/webrender/examples/animation.rs
new file mode 100644
index 00000000000..612d891178d
--- /dev/null
+++ b/third_party/webrender/examples/animation.rs
@@ -0,0 +1,219 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! This example creates a 200x200 white rect and allows the user to move it
+//! around by using the arrow keys and rotate with '<'/'>'.
+//! It does this by using the animation API.
+
+//! The example also features seamless opaque/transparent split of a
+//! rounded cornered rectangle, which is done automatically during the
+//! scene building for render optimization.
+
+extern crate euclid;
+extern crate gleam;
+extern crate glutin;
+extern crate webrender;
+extern crate winit;
+
+#[path = "common/boilerplate.rs"]
+mod boilerplate;
+
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
+use euclid::Angle;
+use webrender::api::*;
+use webrender::api::units::*;
+
+
+struct App {
+ property_key0: PropertyBindingKey<LayoutTransform>,
+ property_key1: PropertyBindingKey<LayoutTransform>,
+ property_key2: PropertyBindingKey<LayoutTransform>,
+ opacity_key: PropertyBindingKey<f32>,
+ opacity: f32,
+ angle0: f32,
+ angle1: f32,
+ angle2: f32,
+}
+
+impl App {
+ fn add_rounded_rect(
+ &mut self,
+ bounds: LayoutRect,
+ color: ColorF,
+ builder: &mut DisplayListBuilder,
+ pipeline_id: PipelineId,
+ property_key: PropertyBindingKey<LayoutTransform>,
+ opacity_key: Option<PropertyBindingKey<f32>>,
+ ) {
+ let filters = match opacity_key {
+ Some(opacity_key) => {
+ vec![
+ FilterOp::Opacity(PropertyBinding::Binding(opacity_key, self.opacity), self.opacity),
+ ]
+ }
+ None => {
+ vec![]
+ }
+ };
+
+ let spatial_id = builder.push_reference_frame(
+ bounds.origin,
+ SpatialId::root_scroll_node(pipeline_id),
+ TransformStyle::Flat,
+ PropertyBinding::Binding(property_key, LayoutTransform::identity()),
+ ReferenceFrameKind::Transform,
+ );
+
+ builder.push_simple_stacking_context_with_filters(
+ LayoutPoint::zero(),
+ spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ &filters,
+ &[],
+ &[]
+ );
+
+ let space_and_clip = SpaceAndClipInfo {
+ spatial_id,
+ clip_id: ClipId::root(pipeline_id),
+ };
+ let clip_bounds = LayoutRect::new(LayoutPoint::zero(), bounds.size);
+ let complex_clip = ComplexClipRegion {
+ rect: clip_bounds,
+ radii: BorderRadius::uniform(30.0),
+ mode: ClipMode::Clip,
+ };
+ let clip_id = builder.define_clip_rounded_rect(
+ &space_and_clip,
+ complex_clip,
+ );
+
+ // Fill it with a white rect
+ builder.push_rect(
+ &CommonItemProperties::new(
+ LayoutRect::new(LayoutPoint::zero(), bounds.size),
+ SpaceAndClipInfo {
+ spatial_id,
+ clip_id,
+ }
+ ),
+ LayoutRect::new(LayoutPoint::zero(), bounds.size),
+ color,
+ );
+
+ builder.pop_stacking_context();
+ builder.pop_reference_frame();
+ }
+}
+
+impl Example for App {
+ const WIDTH: u32 = 2048;
+ const HEIGHT: u32 = 1536;
+
+ fn render(
+ &mut self,
+ _api: &mut RenderApi,
+ builder: &mut DisplayListBuilder,
+ _txn: &mut Transaction,
+ _device_size: DeviceIntSize,
+ pipeline_id: PipelineId,
+ _document_id: DocumentId,
+ ) {
+ let opacity_key = self.opacity_key;
+
+ let bounds = (150, 150).to(250, 250);
+ let key0 = self.property_key0;
+ self.add_rounded_rect(bounds, ColorF::new(1.0, 0.0, 0.0, 0.5), builder, pipeline_id, key0, Some(opacity_key));
+
+ let bounds = (400, 400).to(600, 600);
+ let key1 = self.property_key1;
+ self.add_rounded_rect(bounds, ColorF::new(0.0, 1.0, 0.0, 0.5), builder, pipeline_id, key1, None);
+
+ let bounds = (200, 500).to(350, 580);
+ let key2 = self.property_key2;
+ self.add_rounded_rect(bounds, ColorF::new(0.0, 0.0, 1.0, 0.5), builder, pipeline_id, key2, None);
+ }
+
+ fn on_event(&mut self, win_event: winit::WindowEvent, api: &mut RenderApi, document_id: DocumentId) -> bool {
+ let mut rebuild_display_list = false;
+
+ match win_event {
+ winit::WindowEvent::KeyboardInput {
+ input: winit::KeyboardInput {
+ state: winit::ElementState::Pressed,
+ virtual_keycode: Some(key),
+ ..
+ },
+ ..
+ } => {
+ let (delta_angle, delta_opacity) = match key {
+ winit::VirtualKeyCode::Down => (0.0, -0.1),
+ winit::VirtualKeyCode::Up => (0.0, 0.1),
+ winit::VirtualKeyCode::Right => (1.0, 0.0),
+ winit::VirtualKeyCode::Left => (-1.0, 0.0),
+ winit::VirtualKeyCode::R => {
+ rebuild_display_list = true;
+ (0.0, 0.0)
+ }
+ _ => return false,
+ };
+ // Update the transform based on the keyboard input and push it to
+ // webrender using the generate_frame API. This will recomposite with
+ // the updated transform.
+ self.opacity += delta_opacity;
+ self.angle0 += delta_angle * 0.1;
+ self.angle1 += delta_angle * 0.2;
+ self.angle2 -= delta_angle * 0.15;
+ let xf0 = LayoutTransform::rotation(0.0, 0.0, 1.0, Angle::radians(self.angle0));
+ let xf1 = LayoutTransform::rotation(0.0, 0.0, 1.0, Angle::radians(self.angle1));
+ let xf2 = LayoutTransform::rotation(0.0, 0.0, 1.0, Angle::radians(self.angle2));
+ let mut txn = Transaction::new();
+ txn.update_dynamic_properties(
+ DynamicProperties {
+ transforms: vec![
+ PropertyValue {
+ key: self.property_key0,
+ value: xf0,
+ },
+ PropertyValue {
+ key: self.property_key1,
+ value: xf1,
+ },
+ PropertyValue {
+ key: self.property_key2,
+ value: xf2,
+ },
+ ],
+ floats: vec![
+ PropertyValue {
+ key: self.opacity_key,
+ value: self.opacity,
+ }
+ ],
+ colors: vec![],
+ },
+ );
+ txn.generate_frame();
+ api.send_transaction(document_id, txn);
+ }
+ _ => (),
+ }
+
+ rebuild_display_list
+ }
+}
+
+fn main() {
+ let mut app = App {
+ property_key0: PropertyBindingKey::new(42), // arbitrary magic number
+ property_key1: PropertyBindingKey::new(44), // arbitrary magic number
+ property_key2: PropertyBindingKey::new(45), // arbitrary magic number
+ opacity_key: PropertyBindingKey::new(43),
+ opacity: 0.5,
+ angle0: 0.0,
+ angle1: 0.0,
+ angle2: 0.0,
+ };
+ boilerplate::main_wrapper(&mut app, None);
+}
diff --git a/third_party/webrender/examples/basic.rs b/third_party/webrender/examples/basic.rs
new file mode 100644
index 00000000000..79e0a87c464
--- /dev/null
+++ b/third_party/webrender/examples/basic.rs
@@ -0,0 +1,321 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate euclid;
+extern crate gleam;
+extern crate glutin;
+extern crate webrender;
+extern crate winit;
+
+#[path = "common/boilerplate.rs"]
+mod boilerplate;
+
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
+use euclid::vec2;
+use winit::TouchPhase;
+use std::collections::HashMap;
+use webrender::ShaderPrecacheFlags;
+use webrender::api::*;
+use webrender::api::units::*;
+
+
+#[derive(Debug)]
+enum Gesture {
+ None,
+ Pan,
+ Zoom,
+}
+
+#[derive(Debug)]
+struct Touch {
+ id: u64,
+ start_x: f32,
+ start_y: f32,
+ current_x: f32,
+ current_y: f32,
+}
+
+fn dist(x0: f32, y0: f32, x1: f32, y1: f32) -> f32 {
+ let dx = x0 - x1;
+ let dy = y0 - y1;
+ ((dx * dx) + (dy * dy)).sqrt()
+}
+
+impl Touch {
+ fn distance_from_start(&self) -> f32 {
+ dist(self.start_x, self.start_y, self.current_x, self.current_y)
+ }
+
+ fn initial_distance_from_other(&self, other: &Touch) -> f32 {
+ dist(self.start_x, self.start_y, other.start_x, other.start_y)
+ }
+
+ fn current_distance_from_other(&self, other: &Touch) -> f32 {
+ dist(
+ self.current_x,
+ self.current_y,
+ other.current_x,
+ other.current_y,
+ )
+ }
+}
+
+struct TouchState {
+ active_touches: HashMap<u64, Touch>,
+ current_gesture: Gesture,
+ start_zoom: f32,
+ current_zoom: f32,
+ start_pan: DeviceIntPoint,
+ current_pan: DeviceIntPoint,
+}
+
+enum TouchResult {
+ None,
+ Pan(DeviceIntPoint),
+ Zoom(f32),
+}
+
+impl TouchState {
+ fn new() -> TouchState {
+ TouchState {
+ active_touches: HashMap::new(),
+ current_gesture: Gesture::None,
+ start_zoom: 1.0,
+ current_zoom: 1.0,
+ start_pan: DeviceIntPoint::zero(),
+ current_pan: DeviceIntPoint::zero(),
+ }
+ }
+
+ fn handle_event(&mut self, touch: winit::Touch) -> TouchResult {
+ match touch.phase {
+ TouchPhase::Started => {
+ debug_assert!(!self.active_touches.contains_key(&touch.id));
+ self.active_touches.insert(
+ touch.id,
+ Touch {
+ id: touch.id,
+ start_x: touch.location.x as f32,
+ start_y: touch.location.y as f32,
+ current_x: touch.location.x as f32,
+ current_y: touch.location.y as f32,
+ },
+ );
+ self.current_gesture = Gesture::None;
+ }
+ TouchPhase::Moved => {
+ match self.active_touches.get_mut(&touch.id) {
+ Some(active_touch) => {
+ active_touch.current_x = touch.location.x as f32;
+ active_touch.current_y = touch.location.y as f32;
+ }
+ None => panic!("move touch event with unknown touch id!"),
+ }
+
+ match self.current_gesture {
+ Gesture::None => {
+ let mut over_threshold_count = 0;
+ let active_touch_count = self.active_touches.len();
+
+ for (_, touch) in &self.active_touches {
+ if touch.distance_from_start() > 8.0 {
+ over_threshold_count += 1;
+ }
+ }
+
+ if active_touch_count == over_threshold_count {
+ if active_touch_count == 1 {
+ self.start_pan = self.current_pan;
+ self.current_gesture = Gesture::Pan;
+ } else if active_touch_count == 2 {
+ self.start_zoom = self.current_zoom;
+ self.current_gesture = Gesture::Zoom;
+ }
+ }
+ }
+ Gesture::Pan => {
+ let keys: Vec<u64> = self.active_touches.keys().cloned().collect();
+ debug_assert!(keys.len() == 1);
+ let active_touch = &self.active_touches[&keys[0]];
+ let x = active_touch.current_x - active_touch.start_x;
+ let y = active_touch.current_y - active_touch.start_y;
+ self.current_pan.x = self.start_pan.x + x.round() as i32;
+ self.current_pan.y = self.start_pan.y + y.round() as i32;
+ return TouchResult::Pan(self.current_pan);
+ }
+ Gesture::Zoom => {
+ let keys: Vec<u64> = self.active_touches.keys().cloned().collect();
+ debug_assert!(keys.len() == 2);
+ let touch0 = &self.active_touches[&keys[0]];
+ let touch1 = &self.active_touches[&keys[1]];
+ let initial_distance = touch0.initial_distance_from_other(touch1);
+ let current_distance = touch0.current_distance_from_other(touch1);
+ self.current_zoom = self.start_zoom * current_distance / initial_distance;
+ return TouchResult::Zoom(self.current_zoom);
+ }
+ }
+ }
+ TouchPhase::Ended | TouchPhase::Cancelled => {
+ self.active_touches.remove(&touch.id).unwrap();
+ self.current_gesture = Gesture::None;
+ }
+ }
+
+ TouchResult::None
+ }
+}
+
+fn main() {
+ let mut app = App {
+ touch_state: TouchState::new(),
+ };
+ boilerplate::main_wrapper(&mut app, None);
+}
+
+struct App {
+ touch_state: TouchState,
+}
+
+impl Example for App {
+ // Make this the only example to test all shaders for compile errors.
+ const PRECACHE_SHADER_FLAGS: ShaderPrecacheFlags = ShaderPrecacheFlags::FULL_COMPILE;
+
+ fn render(
+ &mut self,
+ api: &mut RenderApi,
+ builder: &mut DisplayListBuilder,
+ txn: &mut Transaction,
+ _: DeviceIntSize,
+ pipeline_id: PipelineId,
+ _document_id: DocumentId,
+ ) {
+ let content_bounds = LayoutRect::new(LayoutPoint::zero(), builder.content_size());
+ let root_space_and_clip = SpaceAndClipInfo::root_scroll(pipeline_id);
+ let spatial_id = root_space_and_clip.spatial_id;
+
+ builder.push_simple_stacking_context(
+ content_bounds.origin,
+ spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ let image_mask_key = api.generate_image_key();
+ txn.add_image(
+ image_mask_key,
+ ImageDescriptor::new(2, 2, ImageFormat::R8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(vec![0, 80, 180, 255]),
+ None,
+ );
+ let mask = ImageMask {
+ image: image_mask_key,
+ rect: (75, 75).by(100, 100),
+ repeat: false,
+ };
+ let complex = ComplexClipRegion::new(
+ (50, 50).to(150, 150),
+ BorderRadius::uniform(20.0),
+ ClipMode::Clip
+ );
+ let mask_clip_id = builder.define_clip_image_mask(
+ &root_space_and_clip,
+ mask,
+ );
+ let clip_id = builder.define_clip_rounded_rect(
+ &SpaceAndClipInfo {
+ spatial_id: root_space_and_clip.spatial_id,
+ clip_id: mask_clip_id,
+ },
+ complex,
+ );
+
+ builder.push_rect(
+ &CommonItemProperties::new(
+ (100, 100).to(200, 200),
+ SpaceAndClipInfo { spatial_id, clip_id },
+ ),
+ (100, 100).to(200, 200),
+ ColorF::new(0.0, 1.0, 0.0, 1.0),
+ );
+
+ builder.push_rect(
+ &CommonItemProperties::new(
+ (250, 100).to(350, 200),
+ SpaceAndClipInfo { spatial_id, clip_id },
+ ),
+ (250, 100).to(350, 200),
+ ColorF::new(0.0, 1.0, 0.0, 1.0),
+ );
+ let border_side = BorderSide {
+ color: ColorF::new(0.0, 0.0, 1.0, 1.0),
+ style: BorderStyle::Groove,
+ };
+ let border_widths = LayoutSideOffsets::new_all_same(10.0);
+ let border_details = BorderDetails::Normal(NormalBorder {
+ top: border_side,
+ right: border_side,
+ bottom: border_side,
+ left: border_side,
+ radius: BorderRadius::uniform(20.0),
+ do_aa: true,
+ });
+
+ let bounds = (100, 100).to(200, 200);
+ builder.push_border(
+ &CommonItemProperties::new(
+ bounds,
+ SpaceAndClipInfo { spatial_id, clip_id },
+ ),
+ bounds,
+ border_widths,
+ border_details,
+ );
+
+ if false {
+ // draw box shadow?
+ let simple_box_bounds = (20, 200).by(50, 50);
+ let offset = vec2(10.0, 10.0);
+ let color = ColorF::new(1.0, 1.0, 1.0, 1.0);
+ let blur_radius = 0.0;
+ let spread_radius = 0.0;
+ let simple_border_radius = 8.0;
+ let box_shadow_type = BoxShadowClipMode::Inset;
+
+ builder.push_box_shadow(
+ &CommonItemProperties::new(content_bounds, root_space_and_clip),
+ simple_box_bounds,
+ offset,
+ color,
+ blur_radius,
+ spread_radius,
+ BorderRadius::uniform(simple_border_radius),
+ box_shadow_type,
+ );
+ }
+
+ builder.pop_stacking_context();
+ }
+
+ fn on_event(&mut self, event: winit::WindowEvent, api: &mut RenderApi, document_id: DocumentId) -> bool {
+ let mut txn = Transaction::new();
+ match event {
+ winit::WindowEvent::Touch(touch) => match self.touch_state.handle_event(touch) {
+ TouchResult::Pan(pan) => {
+ txn.set_pan(pan);
+ }
+ TouchResult::Zoom(zoom) => {
+ txn.set_pinch_zoom(ZoomFactor::new(zoom));
+ }
+ TouchResult::None => {}
+ },
+ _ => (),
+ }
+
+ if !txn.is_empty() {
+ txn.generate_frame();
+ api.send_transaction(document_id, txn);
+ }
+
+ false
+ }
+}
diff --git a/third_party/webrender/examples/blob.rs b/third_party/webrender/examples/blob.rs
new file mode 100644
index 00000000000..dd58b17f386
--- /dev/null
+++ b/third_party/webrender/examples/blob.rs
@@ -0,0 +1,289 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate gleam;
+extern crate glutin;
+extern crate rayon;
+extern crate webrender;
+extern crate winit;
+
+#[path = "common/boilerplate.rs"]
+mod boilerplate;
+
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
+use rayon::{ThreadPool, ThreadPoolBuilder};
+use rayon::prelude::*;
+use std::collections::HashMap;
+use std::sync::Arc;
+use webrender::api::{self, DisplayListBuilder, DocumentId, PipelineId, PrimitiveFlags, RenderApi, Transaction};
+use webrender::api::{ColorF, CommonItemProperties, SpaceAndClipInfo, ImageDescriptorFlags};
+use webrender::api::units::*;
+use webrender::euclid::size2;
+
+// This example shows how to implement a very basic BlobImageHandler that can only render
+// a checkerboard pattern.
+
+// The deserialized command list internally used by this example is just a color.
+type ImageRenderingCommands = api::ColorU;
+
+// Serialize/deserialize the blob.
+// For real usecases you should probably use serde rather than doing it by hand.
+
+fn serialize_blob(color: api::ColorU) -> Arc<Vec<u8>> {
+ Arc::new(vec![color.r, color.g, color.b, color.a])
+}
+
+fn deserialize_blob(blob: &[u8]) -> Result<ImageRenderingCommands, ()> {
+ let mut iter = blob.iter();
+ return match (iter.next(), iter.next(), iter.next(), iter.next()) {
+ (Some(&r), Some(&g), Some(&b), Some(&a)) => Ok(api::ColorU::new(r, g, b, a)),
+ (Some(&a), None, None, None) => Ok(api::ColorU::new(a, a, a, a)),
+ _ => Err(()),
+ };
+}
+
+// This is the function that applies the deserialized drawing commands and generates
+// actual image data.
+fn render_blob(
+ commands: Arc<ImageRenderingCommands>,
+ descriptor: &api::BlobImageDescriptor,
+ tile: TileOffset,
+) -> api::BlobImageResult {
+ let color = *commands;
+
+ // Note: This implementation ignores the dirty rect which isn't incorrect
+ // but is a missed optimization.
+
+ // Allocate storage for the result. Right now the resource cache expects the
+ // tiles to have have no stride or offset.
+ let bpp = 4;
+ let mut texels = Vec::with_capacity((descriptor.rect.size.area() * bpp) as usize);
+
+ // Generate a per-tile pattern to see it in the demo. For a real use case it would not
+ // make sense for the rendered content to depend on its tile.
+ let tile_checker = (tile.x % 2 == 0) != (tile.y % 2 == 0);
+
+ let [w, h] = descriptor.rect.size.to_array();
+ let offset = descriptor.rect.origin;
+
+ for y in 0..h {
+ for x in 0..w {
+ // Apply the tile's offset. This is important: all drawing commands should be
+ // translated by this offset to give correct results with tiled blob images.
+ let x2 = x + offset.x;
+ let y2 = y + offset.y;
+
+ // Render a simple checkerboard pattern
+ let checker = if (x2 % 20 >= 10) != (y2 % 20 >= 10) {
+ 1
+ } else {
+ 0
+ };
+ // ..nested in the per-tile checkerboard pattern
+ let tc = if tile_checker { 0 } else { (1 - checker) * 40 };
+
+ match descriptor.format {
+ api::ImageFormat::BGRA8 => {
+ texels.push(color.b * checker + tc);
+ texels.push(color.g * checker + tc);
+ texels.push(color.r * checker + tc);
+ texels.push(color.a * checker + tc);
+ }
+ api::ImageFormat::R8 => {
+ texels.push(color.a * checker + tc);
+ }
+ _ => {
+ return Err(api::BlobImageError::Other(
+ format!("Unsupported image format"),
+ ));
+ }
+ }
+ }
+ }
+
+ Ok(api::RasterizedBlobImage {
+ data: Arc::new(texels),
+ rasterized_rect: size2(w, h).into(),
+ })
+}
+
+struct CheckerboardRenderer {
+ // We are going to defer the rendering work to worker threads.
+ // Using a pre-built Arc<ThreadPool> rather than creating our own threads
+ // makes it possible to share the same thread pool as the glyph renderer (if we
+ // want to).
+ workers: Arc<ThreadPool>,
+
+ // The deserialized drawing commands.
+ // In this example we store them in Arcs. This isn't necessary since in this simplified
+ // case the command list is a simple 32 bits value and would be cheap to clone before sending
+ // to the workers. But in a more realistic scenario the commands would typically be bigger
+ // and more expensive to clone, so let's pretend it is also the case here.
+ image_cmds: HashMap<api::BlobImageKey, Arc<ImageRenderingCommands>>,
+}
+
+impl CheckerboardRenderer {
+ fn new(workers: Arc<ThreadPool>) -> Self {
+ CheckerboardRenderer {
+ image_cmds: HashMap::new(),
+ workers,
+ }
+ }
+}
+
+impl api::BlobImageHandler for CheckerboardRenderer {
+ fn create_similar(&self) -> Box<dyn api::BlobImageHandler> {
+ Box::new(CheckerboardRenderer::new(Arc::clone(&self.workers)))
+ }
+
+ fn add(&mut self, key: api::BlobImageKey, cmds: Arc<api::BlobImageData>,
+ _visible_rect: &DeviceIntRect, _: api::TileSize) {
+ self.image_cmds
+ .insert(key, Arc::new(deserialize_blob(&cmds[..]).unwrap()));
+ }
+
+ fn update(&mut self, key: api::BlobImageKey, cmds: Arc<api::BlobImageData>,
+ _visible_rect: &DeviceIntRect, _dirty_rect: &BlobDirtyRect) {
+ // Here, updating is just replacing the current version of the commands with
+ // the new one (no incremental updates).
+ self.image_cmds
+ .insert(key, Arc::new(deserialize_blob(&cmds[..]).unwrap()));
+ }
+
+ fn delete(&mut self, key: api::BlobImageKey) {
+ self.image_cmds.remove(&key);
+ }
+
+ fn prepare_resources(
+ &mut self,
+ _services: &dyn api::BlobImageResources,
+ _requests: &[api::BlobImageParams],
+ ) {}
+
+ fn enable_multithreading(&mut self, _: bool) {}
+ fn delete_font(&mut self, _font: api::FontKey) {}
+ fn delete_font_instance(&mut self, _instance: api::FontInstanceKey) {}
+ fn clear_namespace(&mut self, _namespace: api::IdNamespace) {}
+ fn create_blob_rasterizer(&mut self) -> Box<dyn api::AsyncBlobImageRasterizer> {
+ Box::new(Rasterizer {
+ workers: Arc::clone(&self.workers),
+ image_cmds: self.image_cmds.clone(),
+ })
+ }
+}
+
+struct Rasterizer {
+ workers: Arc<ThreadPool>,
+ image_cmds: HashMap<api::BlobImageKey, Arc<ImageRenderingCommands>>,
+}
+
+impl api::AsyncBlobImageRasterizer for Rasterizer {
+ fn rasterize(
+ &mut self,
+ requests: &[api::BlobImageParams],
+ _low_priority: bool
+ ) -> Vec<(api::BlobImageRequest, api::BlobImageResult)> {
+ let requests: Vec<(&api::BlobImageParams, Arc<ImageRenderingCommands>)> = requests.into_iter().map(|params| {
+ (params, Arc::clone(&self.image_cmds[&params.request.key]))
+ }).collect();
+
+ self.workers.install(|| {
+ requests.into_par_iter().map(|(params, commands)| {
+ (params.request, render_blob(commands, &params.descriptor, params.request.tile))
+ }).collect()
+ })
+ }
+}
+
+struct App {}
+
+impl Example for App {
+ fn render(
+ &mut self,
+ api: &mut RenderApi,
+ builder: &mut DisplayListBuilder,
+ txn: &mut Transaction,
+ _device_size: DeviceIntSize,
+ pipeline_id: PipelineId,
+ _document_id: DocumentId,
+ ) {
+ let space_and_clip = SpaceAndClipInfo::root_scroll(pipeline_id);
+
+ builder.push_simple_stacking_context(
+ LayoutPoint::zero(),
+ space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ let size1 = DeviceIntSize::new(500, 500);
+ let blob_img1 = api.generate_blob_image_key();
+ txn.add_blob_image(
+ blob_img1,
+ api::ImageDescriptor::new(
+ size1.width,
+ size1.height,
+ api::ImageFormat::BGRA8,
+ ImageDescriptorFlags::IS_OPAQUE,
+ ),
+ serialize_blob(api::ColorU::new(50, 50, 150, 255)),
+ size1.into(),
+ Some(128),
+ );
+ let bounds = (30, 30).by(size1.width, size1.height);
+ builder.push_image(
+ &CommonItemProperties::new(bounds, space_and_clip),
+ bounds,
+ api::ImageRendering::Auto,
+ api::AlphaType::PremultipliedAlpha,
+ blob_img1.as_image(),
+ ColorF::WHITE,
+ );
+
+ let size2 = DeviceIntSize::new(256, 256);
+ let blob_img2 = api.generate_blob_image_key();
+ txn.add_blob_image(
+ blob_img2,
+ api::ImageDescriptor::new(
+ size2.width,
+ size2.height,
+ api::ImageFormat::BGRA8,
+ ImageDescriptorFlags::IS_OPAQUE,
+ ),
+ serialize_blob(api::ColorU::new(50, 150, 50, 255)),
+ size2.into(),
+ None,
+ );
+ let bounds = (600, 600).by(size2.width, size2.height);
+ builder.push_image(
+ &CommonItemProperties::new(bounds, space_and_clip),
+ bounds,
+ api::ImageRendering::Auto,
+ api::AlphaType::PremultipliedAlpha,
+ blob_img2.as_image(),
+ ColorF::WHITE,
+ );
+
+ builder.pop_stacking_context();
+ }
+}
+
+fn main() {
+ let workers =
+ ThreadPoolBuilder::new().thread_name(|idx| format!("WebRender:Worker#{}", idx))
+ .build();
+
+ let workers = Arc::new(workers.unwrap());
+
+ let opts = webrender::RendererOptions {
+ workers: Some(Arc::clone(&workers)),
+ // Register our blob renderer, so that WebRender integrates it in the resource cache..
+ // Share the same pool of worker threads between WebRender and our blob renderer.
+ blob_image_handler: Some(Box::new(CheckerboardRenderer::new(Arc::clone(&workers)))),
+ ..Default::default()
+ };
+
+ let mut app = App {};
+
+ boilerplate::main_wrapper(&mut app, Some(opts));
+}
diff --git a/third_party/webrender/examples/common/boilerplate.rs b/third_party/webrender/examples/common/boilerplate.rs
new file mode 100644
index 00000000000..a48a00b9194
--- /dev/null
+++ b/third_party/webrender/examples/common/boilerplate.rs
@@ -0,0 +1,338 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use gleam::gl;
+use glutin;
+use std::env;
+use std::path::PathBuf;
+use webrender;
+use winit;
+use webrender::{DebugFlags, ShaderPrecacheFlags};
+use webrender::api::*;
+use webrender::api::units::*;
+
+struct Notifier {
+ events_proxy: winit::EventsLoopProxy,
+}
+
+impl Notifier {
+ fn new(events_proxy: winit::EventsLoopProxy) -> Notifier {
+ Notifier { events_proxy }
+ }
+}
+
+impl RenderNotifier for Notifier {
+ fn clone(&self) -> Box<dyn RenderNotifier> {
+ Box::new(Notifier {
+ events_proxy: self.events_proxy.clone(),
+ })
+ }
+
+ fn wake_up(&self) {
+ #[cfg(not(target_os = "android"))]
+ let _ = self.events_proxy.wakeup();
+ }
+
+ fn new_frame_ready(&self,
+ _: DocumentId,
+ _scrolled: bool,
+ _composite_needed: bool,
+ _render_time: Option<u64>) {
+ self.wake_up();
+ }
+}
+
+pub trait HandyDandyRectBuilder {
+ fn to(&self, x2: i32, y2: i32) -> LayoutRect;
+ fn by(&self, w: i32, h: i32) -> LayoutRect;
+}
+// Allows doing `(x, y).to(x2, y2)` or `(x, y).by(width, height)` with i32
+// values to build a f32 LayoutRect
+impl HandyDandyRectBuilder for (i32, i32) {
+ fn to(&self, x2: i32, y2: i32) -> LayoutRect {
+ LayoutRect::new(
+ LayoutPoint::new(self.0 as f32, self.1 as f32),
+ LayoutSize::new((x2 - self.0) as f32, (y2 - self.1) as f32),
+ )
+ }
+
+ fn by(&self, w: i32, h: i32) -> LayoutRect {
+ LayoutRect::new(
+ LayoutPoint::new(self.0 as f32, self.1 as f32),
+ LayoutSize::new(w as f32, h as f32),
+ )
+ }
+}
+
+pub trait Example {
+ const TITLE: &'static str = "WebRender Sample App";
+ const PRECACHE_SHADER_FLAGS: ShaderPrecacheFlags = ShaderPrecacheFlags::EMPTY;
+ const WIDTH: u32 = 1920;
+ const HEIGHT: u32 = 1080;
+
+ fn render(
+ &mut self,
+ api: &mut RenderApi,
+ builder: &mut DisplayListBuilder,
+ txn: &mut Transaction,
+ device_size: DeviceIntSize,
+ pipeline_id: PipelineId,
+ document_id: DocumentId,
+ );
+ fn on_event(
+ &mut self,
+ _: winit::WindowEvent,
+ _: &mut RenderApi,
+ _: DocumentId,
+ ) -> bool {
+ false
+ }
+ fn get_image_handlers(
+ &mut self,
+ _gl: &dyn gl::Gl,
+ ) -> (Option<Box<dyn ExternalImageHandler>>,
+ Option<Box<dyn OutputImageHandler>>) {
+ (None, None)
+ }
+ fn draw_custom(&mut self, _gl: &dyn gl::Gl) {
+ }
+}
+
+pub fn main_wrapper<E: Example>(
+ example: &mut E,
+ options: Option<webrender::RendererOptions>,
+) {
+ env_logger::init();
+
+ #[cfg(target_os = "macos")]
+ {
+ use core_foundation::{self as cf, base::TCFType};
+ let i = cf::bundle::CFBundle::main_bundle().info_dictionary();
+ let mut i = unsafe { i.to_mutable() };
+ i.set(
+ cf::string::CFString::new("NSSupportsAutomaticGraphicsSwitching"),
+ cf::boolean::CFBoolean::true_value().into_CFType(),
+ );
+ }
+
+ let args: Vec<String> = env::args().collect();
+ let res_path = if args.len() > 1 {
+ Some(PathBuf::from(&args[1]))
+ } else {
+ None
+ };
+
+ let mut events_loop = winit::EventsLoop::new();
+ let window_builder = winit::WindowBuilder::new()
+ .with_title(E::TITLE)
+ .with_multitouch()
+ .with_dimensions(winit::dpi::LogicalSize::new(E::WIDTH as f64, E::HEIGHT as f64));
+ let windowed_context = glutin::ContextBuilder::new()
+ .with_gl(glutin::GlRequest::GlThenGles {
+ opengl_version: (3, 2),
+ opengles_version: (3, 0),
+ })
+ .build_windowed(window_builder, &events_loop)
+ .unwrap();
+
+ let windowed_context = unsafe { windowed_context.make_current().unwrap() };
+
+ let gl = match windowed_context.get_api() {
+ glutin::Api::OpenGl => unsafe {
+ gl::GlFns::load_with(
+ |symbol| windowed_context.get_proc_address(symbol) as *const _
+ )
+ },
+ glutin::Api::OpenGlEs => unsafe {
+ gl::GlesFns::load_with(
+ |symbol| windowed_context.get_proc_address(symbol) as *const _
+ )
+ },
+ glutin::Api::WebGl => unimplemented!(),
+ };
+
+ println!("OpenGL version {}", gl.get_string(gl::VERSION));
+ println!("Shader resource path: {:?}", res_path);
+ let device_pixel_ratio = windowed_context.window().get_hidpi_factor() as f32;
+ println!("Device pixel ratio: {}", device_pixel_ratio);
+
+ println!("Loading shaders...");
+ let mut debug_flags = DebugFlags::ECHO_DRIVER_MESSAGES | DebugFlags::TEXTURE_CACHE_DBG;
+ let opts = webrender::RendererOptions {
+ resource_override_path: res_path,
+ precache_flags: E::PRECACHE_SHADER_FLAGS,
+ device_pixel_ratio,
+ clear_color: Some(ColorF::new(0.3, 0.0, 0.0, 1.0)),
+ debug_flags,
+ //allow_texture_swizzling: false,
+ ..options.unwrap_or(webrender::RendererOptions::default())
+ };
+
+ let device_size = {
+ let size = windowed_context
+ .window()
+ .get_inner_size()
+ .unwrap()
+ .to_physical(device_pixel_ratio as f64);
+ DeviceIntSize::new(size.width as i32, size.height as i32)
+ };
+ let notifier = Box::new(Notifier::new(events_loop.create_proxy()));
+ let (mut renderer, sender) = webrender::Renderer::new(
+ gl.clone(),
+ notifier,
+ opts,
+ None,
+ device_size,
+ ).unwrap();
+ let mut api = sender.create_api();
+ let document_id = api.add_document(device_size, 0);
+
+ let (external, output) = example.get_image_handlers(&*gl);
+
+ if let Some(output_image_handler) = output {
+ renderer.set_output_image_handler(output_image_handler);
+ }
+
+ if let Some(external_image_handler) = external {
+ renderer.set_external_image_handler(external_image_handler);
+ }
+
+ let epoch = Epoch(0);
+ let pipeline_id = PipelineId(0, 0);
+ let layout_size = device_size.to_f32() / euclid::Scale::new(device_pixel_ratio);
+ let mut builder = DisplayListBuilder::new(pipeline_id, layout_size);
+ let mut txn = Transaction::new();
+
+ example.render(
+ &mut api,
+ &mut builder,
+ &mut txn,
+ device_size,
+ pipeline_id,
+ document_id,
+ );
+ txn.set_display_list(
+ epoch,
+ Some(ColorF::new(0.3, 0.0, 0.0, 1.0)),
+ layout_size,
+ builder.finalize(),
+ true,
+ );
+ txn.set_root_pipeline(pipeline_id);
+ txn.generate_frame();
+ api.send_transaction(document_id, txn);
+
+ println!("Entering event loop");
+ events_loop.run_forever(|global_event| {
+ let mut txn = Transaction::new();
+ let mut custom_event = true;
+
+ let old_flags = debug_flags;
+ let win_event = match global_event {
+ winit::Event::WindowEvent { event, .. } => event,
+ _ => return winit::ControlFlow::Continue,
+ };
+ match win_event {
+ winit::WindowEvent::CloseRequested => return winit::ControlFlow::Break,
+ winit::WindowEvent::AxisMotion { .. } |
+ winit::WindowEvent::CursorMoved { .. } => {
+ custom_event = example.on_event(
+ win_event,
+ &mut api,
+ document_id,
+ );
+ // skip high-frequency events from triggering a frame draw.
+ if !custom_event {
+ return winit::ControlFlow::Continue;
+ }
+ },
+ winit::WindowEvent::KeyboardInput {
+ input: winit::KeyboardInput {
+ state: winit::ElementState::Pressed,
+ virtual_keycode: Some(key),
+ ..
+ },
+ ..
+ } => match key {
+ winit::VirtualKeyCode::Escape => return winit::ControlFlow::Break,
+ winit::VirtualKeyCode::P => debug_flags.toggle(DebugFlags::PROFILER_DBG),
+ winit::VirtualKeyCode::O => debug_flags.toggle(DebugFlags::RENDER_TARGET_DBG),
+ winit::VirtualKeyCode::I => debug_flags.toggle(DebugFlags::TEXTURE_CACHE_DBG),
+ winit::VirtualKeyCode::S => debug_flags.toggle(DebugFlags::COMPACT_PROFILER),
+ winit::VirtualKeyCode::T => debug_flags.toggle(DebugFlags::PICTURE_CACHING_DBG),
+ winit::VirtualKeyCode::Q => debug_flags.toggle(
+ DebugFlags::GPU_TIME_QUERIES | DebugFlags::GPU_SAMPLE_QUERIES
+ ),
+ winit::VirtualKeyCode::F => debug_flags.toggle(
+ DebugFlags::NEW_FRAME_INDICATOR | DebugFlags::NEW_SCENE_INDICATOR
+ ),
+ winit::VirtualKeyCode::G => debug_flags.toggle(DebugFlags::GPU_CACHE_DBG),
+ winit::VirtualKeyCode::Key1 => txn.set_document_view(
+ device_size.into(),
+ 1.0
+ ),
+ winit::VirtualKeyCode::Key2 => txn.set_document_view(
+ device_size.into(),
+ 2.0
+ ),
+ winit::VirtualKeyCode::M => api.notify_memory_pressure(),
+ winit::VirtualKeyCode::C => {
+ let path: PathBuf = "../captures/example".into();
+ //TODO: switch between SCENE/FRAME capture types
+ // based on "shift" modifier, when `glutin` is updated.
+ let bits = CaptureBits::all();
+ api.save_capture(path, bits);
+ },
+ _ => {
+ custom_event = example.on_event(
+ win_event,
+ &mut api,
+ document_id,
+ )
+ },
+ },
+ other => custom_event = example.on_event(
+ other,
+ &mut api,
+ document_id,
+ ),
+ };
+
+ if debug_flags != old_flags {
+ api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ }
+
+ if custom_event {
+ let mut builder = DisplayListBuilder::new(pipeline_id, layout_size);
+
+ example.render(
+ &mut api,
+ &mut builder,
+ &mut txn,
+ device_size,
+ pipeline_id,
+ document_id,
+ );
+ txn.set_display_list(
+ epoch,
+ Some(ColorF::new(0.3, 0.0, 0.0, 1.0)),
+ layout_size,
+ builder.finalize(),
+ true,
+ );
+ txn.generate_frame();
+ }
+ api.send_transaction(document_id, txn);
+
+ renderer.update();
+ renderer.render(device_size).unwrap();
+ let _ = renderer.flush_pipeline_info();
+ example.draw_custom(&*gl);
+ windowed_context.swap_buffers().ok();
+
+ winit::ControlFlow::Continue
+ });
+
+ renderer.deinit();
+}
diff --git a/third_party/webrender/examples/common/image_helper.rs b/third_party/webrender/examples/common/image_helper.rs
new file mode 100644
index 00000000000..368674c0e12
--- /dev/null
+++ b/third_party/webrender/examples/common/image_helper.rs
@@ -0,0 +1,19 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use webrender::api::{ImageData, ImageDescriptor, ImageFormat, ImageDescriptorFlags};
+
+pub fn make_checkerboard(width: u32, height: u32) -> (ImageDescriptor, ImageData) {
+ let mut image_data = Vec::new();
+ for y in 0 .. height {
+ for x in 0 .. width {
+ let lum = 255 * (((x & 8) == 0) ^ ((y & 8) == 0)) as u8;
+ image_data.extend_from_slice(&[lum, lum, lum, 0xff]);
+ }
+ }
+ (
+ ImageDescriptor::new(width as i32, height as i32, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(image_data)
+ )
+}
diff --git a/third_party/webrender/examples/document.rs b/third_party/webrender/examples/document.rs
new file mode 100644
index 00000000000..56f5eedc8f5
--- /dev/null
+++ b/third_party/webrender/examples/document.rs
@@ -0,0 +1,149 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate euclid;
+extern crate gleam;
+extern crate glutin;
+extern crate webrender;
+extern crate winit;
+
+#[path = "common/boilerplate.rs"]
+mod boilerplate;
+
+use crate::boilerplate::Example;
+use euclid::Scale;
+use webrender::api::*;
+use webrender::api::units::*;
+
+// This example creates multiple documents overlapping each other with
+// specified layer indices.
+
+struct Document {
+ id: DocumentId,
+ pipeline_id: PipelineId,
+ content_rect: LayoutRect,
+ color: ColorF,
+}
+
+struct App {
+ documents: Vec<Document>,
+}
+
+impl App {
+ fn init(
+ &mut self,
+ api: &mut RenderApi,
+ device_pixel_ratio: f32,
+ ) {
+ let init_data = vec![
+ (
+ PipelineId(1, 0),
+ -2,
+ ColorF::new(0.0, 1.0, 0.0, 1.0),
+ DeviceIntPoint::new(0, 0),
+ ),
+ (
+ PipelineId(2, 0),
+ -1,
+ ColorF::new(1.0, 1.0, 0.0, 1.0),
+ DeviceIntPoint::new(200, 0),
+ ),
+ (
+ PipelineId(3, 0),
+ 0,
+ ColorF::new(1.0, 0.0, 0.0, 1.0),
+ DeviceIntPoint::new(200, 200),
+ ),
+ (
+ PipelineId(4, 0),
+ 1,
+ ColorF::new(1.0, 0.0, 1.0, 1.0),
+ DeviceIntPoint::new(0, 200),
+ ),
+ ];
+
+ for (pipeline_id, layer, color, offset) in init_data {
+ let size = DeviceIntSize::new(250, 250);
+ let bounds = DeviceIntRect::new(offset, size);
+
+ let document_id = api.add_document(size, layer);
+ let mut txn = Transaction::new();
+ txn.set_document_view(bounds, device_pixel_ratio);
+ txn.set_root_pipeline(pipeline_id);
+ api.send_transaction(document_id, txn);
+
+ self.documents.push(Document {
+ id: document_id,
+ pipeline_id,
+ content_rect: LayoutRect::new(
+ LayoutPoint::origin(),
+ bounds.size.to_f32() / Scale::new(device_pixel_ratio),
+ ),
+ color,
+ });
+ }
+ }
+}
+
+impl Example for App {
+ fn render(
+ &mut self,
+ api: &mut RenderApi,
+ base_builder: &mut DisplayListBuilder,
+ _txn: &mut Transaction,
+ device_size: DeviceIntSize,
+ _pipeline_id: PipelineId,
+ _: DocumentId,
+ ) {
+ if self.documents.is_empty() {
+ let device_pixel_ratio = device_size.width as f32 /
+ base_builder.content_size().width;
+ // this is the first run, hack around the boilerplate,
+ // which assumes an example only needs one document
+ self.init(api, device_pixel_ratio);
+ }
+
+ for doc in &self.documents {
+ let space_and_clip = SpaceAndClipInfo::root_scroll(doc.pipeline_id);
+ let mut builder = DisplayListBuilder::new(
+ doc.pipeline_id,
+ doc.content_rect.size,
+ );
+ let local_rect = LayoutRect::new(
+ LayoutPoint::zero(),
+ doc.content_rect.size,
+ );
+
+ builder.push_simple_stacking_context(
+ doc.content_rect.origin,
+ space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+ builder.push_rect(
+ &CommonItemProperties::new(local_rect, space_and_clip),
+ local_rect,
+ doc.color,
+ );
+ builder.pop_stacking_context();
+
+ let mut txn = Transaction::new();
+ txn.set_display_list(
+ Epoch(0),
+ None,
+ doc.content_rect.size,
+ builder.finalize(),
+ true,
+ );
+ txn.generate_frame();
+ api.send_transaction(doc.id, txn);
+ }
+ }
+}
+
+fn main() {
+ let mut app = App {
+ documents: Vec::new(),
+ };
+ boilerplate::main_wrapper(&mut app, None);
+}
diff --git a/third_party/webrender/examples/frame_output.rs b/third_party/webrender/examples/frame_output.rs
new file mode 100644
index 00000000000..dc1c1d83f06
--- /dev/null
+++ b/third_party/webrender/examples/frame_output.rs
@@ -0,0 +1,238 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate euclid;
+extern crate gleam;
+extern crate glutin;
+extern crate webrender;
+extern crate winit;
+
+#[path = "common/boilerplate.rs"]
+mod boilerplate;
+
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
+use euclid::Scale;
+use gleam::gl;
+use webrender::api::*;
+use webrender::api::units::*;
+
+
+// This example demonstrates using the frame output feature to copy
+// the output of a WR framebuffer to a custom texture.
+
+#[derive(Debug)]
+struct Document {
+ id: DocumentId,
+ pipeline_id: PipelineId,
+ content_rect: LayoutRect,
+ color: ColorF,
+}
+
+
+struct App {
+ external_image_key: Option<ImageKey>,
+ output_document: Option<Document>
+}
+
+struct OutputHandler {
+ texture_id: gl::GLuint
+}
+
+struct ExternalHandler {
+ texture_id: gl::GLuint
+}
+
+impl OutputImageHandler for OutputHandler {
+ fn lock(&mut self, _id: PipelineId) -> Option<(u32, FramebufferIntSize)> {
+ Some((self.texture_id, FramebufferIntSize::new(500, 500)))
+ }
+
+ fn unlock(&mut self, _id: PipelineId) {}
+}
+
+impl ExternalImageHandler for ExternalHandler {
+ fn lock(
+ &mut self,
+ _key: ExternalImageId,
+ _channel_index: u8,
+ _rendering: ImageRendering
+ ) -> ExternalImage {
+ ExternalImage {
+ uv: TexelRect::new(0.0, 0.0, 1.0, 1.0),
+ source: ExternalImageSource::NativeTexture(self.texture_id),
+ }
+ }
+ fn unlock(&mut self, _key: ExternalImageId, _channel_index: u8) {}
+}
+
+impl App {
+ fn init_output_document(
+ &mut self,
+ api: &mut RenderApi,
+ device_size: DeviceIntSize,
+ device_pixel_ratio: f32,
+ ) {
+ // Generate the external image key that will be used to render the output document to the root document.
+ self.external_image_key = Some(api.generate_image_key());
+
+ let pipeline_id = PipelineId(1, 0);
+ let layer = 1;
+ let color = ColorF::new(1., 1., 0., 1.);
+ let document_id = api.add_document(device_size, layer);
+ api.enable_frame_output(document_id, pipeline_id, true);
+ api.set_document_view(
+ document_id,
+ device_size.into(),
+ device_pixel_ratio,
+ );
+
+ let document = Document {
+ id: document_id,
+ pipeline_id,
+ content_rect: LayoutRect::new(
+ LayoutPoint::zero(),
+ device_size.to_f32() / Scale::new(device_pixel_ratio),
+ ),
+ color,
+ };
+
+ let mut txn = Transaction::new();
+
+ txn.add_image(
+ self.external_image_key.unwrap(),
+ ImageDescriptor::new(100, 100, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::External(ExternalImageData {
+ id: ExternalImageId(0),
+ channel_index: 0,
+ image_type: ExternalImageType::TextureHandle(TextureTarget::Default),
+ }),
+ None,
+ );
+
+ let space_and_clip = SpaceAndClipInfo::root_scroll(pipeline_id);
+ let mut builder = DisplayListBuilder::new(
+ document.pipeline_id,
+ document.content_rect.size,
+ );
+
+ builder.push_simple_stacking_context(
+ document.content_rect.origin,
+ space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ builder.push_rect(
+ &CommonItemProperties::new(document.content_rect, space_and_clip),
+ document.content_rect,
+ ColorF::new(1.0, 1.0, 0.0, 1.0)
+ );
+ builder.pop_stacking_context();
+
+ txn.set_root_pipeline(pipeline_id);
+ txn.set_display_list(
+ Epoch(0),
+ Some(document.color),
+ document.content_rect.size,
+ builder.finalize(),
+ true,
+ );
+ txn.generate_frame();
+ api.send_transaction(document.id, txn);
+ self.output_document = Some(document);
+ }
+}
+
+impl Example for App {
+ fn render(
+ &mut self,
+ api: &mut RenderApi,
+ builder: &mut DisplayListBuilder,
+ _txn: &mut Transaction,
+ device_size: DeviceIntSize,
+ pipeline_id: PipelineId,
+ _document_id: DocumentId,
+ ) {
+ if self.output_document.is_none() {
+ let device_pixel_ratio = device_size.width as f32 /
+ builder.content_size().width;
+ self.init_output_document(api, DeviceIntSize::new(200, 200), device_pixel_ratio);
+ }
+
+ let bounds = (100, 100).to(200, 200);
+ let space_and_clip = SpaceAndClipInfo::root_scroll(pipeline_id);
+
+ builder.push_simple_stacking_context(
+ bounds.origin,
+ space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ builder.push_image(
+ &CommonItemProperties::new(bounds, space_and_clip),
+ bounds,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ self.external_image_key.unwrap(),
+ ColorF::WHITE,
+ );
+
+ builder.pop_stacking_context();
+ }
+
+ fn get_image_handlers(
+ &mut self,
+ gl: &dyn gl::Gl,
+ ) -> (Option<Box<dyn ExternalImageHandler>>,
+ Option<Box<dyn OutputImageHandler>>) {
+ let texture_id = gl.gen_textures(1)[0];
+
+ gl.bind_texture(gl::TEXTURE_2D, texture_id);
+ gl.tex_parameter_i(
+ gl::TEXTURE_2D,
+ gl::TEXTURE_MAG_FILTER,
+ gl::LINEAR as gl::GLint,
+ );
+ gl.tex_parameter_i(
+ gl::TEXTURE_2D,
+ gl::TEXTURE_MIN_FILTER,
+ gl::LINEAR as gl::GLint,
+ );
+ gl.tex_parameter_i(
+ gl::TEXTURE_2D,
+ gl::TEXTURE_WRAP_S,
+ gl::CLAMP_TO_EDGE as gl::GLint,
+ );
+ gl.tex_parameter_i(
+ gl::TEXTURE_2D,
+ gl::TEXTURE_WRAP_T,
+ gl::CLAMP_TO_EDGE as gl::GLint,
+ );
+ gl.tex_image_2d(
+ gl::TEXTURE_2D,
+ 0,
+ gl::RGBA as gl::GLint,
+ 100,
+ 100,
+ 0,
+ gl::BGRA,
+ gl::UNSIGNED_BYTE,
+ None,
+ );
+ gl.bind_texture(gl::TEXTURE_2D, 0);
+
+ (
+ Some(Box::new(ExternalHandler { texture_id })),
+ Some(Box::new(OutputHandler { texture_id }))
+ )
+ }
+}
+
+fn main() {
+ let mut app = App {
+ external_image_key: None,
+ output_document: None
+ };
+
+ boilerplate::main_wrapper(&mut app, None);
+}
diff --git a/third_party/webrender/examples/iframe.rs b/third_party/webrender/examples/iframe.rs
new file mode 100644
index 00000000000..50e8b46f30c
--- /dev/null
+++ b/third_party/webrender/examples/iframe.rs
@@ -0,0 +1,95 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate gleam;
+extern crate glutin;
+extern crate webrender;
+extern crate winit;
+
+#[path = "common/boilerplate.rs"]
+mod boilerplate;
+
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
+use webrender::api::*;
+use webrender::api::units::*;
+
+// This example uses the push_iframe API to nest a second pipeline's displaylist
+// inside the root pipeline's display list. When it works, a green square is
+// shown. If it fails, a red square is shown.
+
+struct App {}
+
+impl Example for App {
+ fn render(
+ &mut self,
+ api: &mut RenderApi,
+ builder: &mut DisplayListBuilder,
+ _txn: &mut Transaction,
+ _device_size: DeviceIntSize,
+ pipeline_id: PipelineId,
+ document_id: DocumentId,
+ ) {
+ // All the sub_* things are for the nested pipeline
+ let sub_size = DeviceIntSize::new(100, 100);
+ let sub_bounds = (0, 0).to(sub_size.width as i32, sub_size.height as i32);
+
+ let sub_pipeline_id = PipelineId(pipeline_id.0, 42);
+ let mut sub_builder = DisplayListBuilder::new(sub_pipeline_id, sub_bounds.size);
+ let mut space_and_clip = SpaceAndClipInfo::root_scroll(pipeline_id);
+
+ sub_builder.push_simple_stacking_context(
+ sub_bounds.origin,
+ space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ // green rect visible == success
+ sub_builder.push_rect(
+ &CommonItemProperties::new(sub_bounds, space_and_clip),
+ sub_bounds,
+ ColorF::new(0.0, 1.0, 0.0, 1.0)
+ );
+ sub_builder.pop_stacking_context();
+
+ let mut txn = Transaction::new();
+ txn.set_display_list(
+ Epoch(0),
+ None,
+ sub_bounds.size,
+ sub_builder.finalize(),
+ true,
+ );
+ api.send_transaction(document_id, txn);
+
+ space_and_clip.spatial_id = builder.push_reference_frame(
+ sub_bounds.origin,
+ space_and_clip.spatial_id,
+ TransformStyle::Flat,
+ PropertyBinding::Binding(PropertyBindingKey::new(42), LayoutTransform::identity()),
+ ReferenceFrameKind::Transform,
+ );
+
+ // And this is for the root pipeline
+ builder.push_simple_stacking_context(
+ sub_bounds.origin,
+ space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ // red rect under the iframe: if this is visible, things have gone wrong
+ builder.push_rect(
+ &CommonItemProperties::new(sub_bounds, space_and_clip),
+ sub_bounds,
+ ColorF::new(1.0, 0.0, 0.0, 1.0)
+ );
+ builder.push_iframe(sub_bounds, sub_bounds, &space_and_clip, sub_pipeline_id, false);
+ builder.pop_stacking_context();
+ builder.pop_reference_frame();
+ }
+}
+
+fn main() {
+ let mut app = App {};
+ boilerplate::main_wrapper(&mut app, None);
+}
diff --git a/third_party/webrender/examples/image_resize.rs b/third_party/webrender/examples/image_resize.rs
new file mode 100644
index 00000000000..f45add1e7ad
--- /dev/null
+++ b/third_party/webrender/examples/image_resize.rs
@@ -0,0 +1,121 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate gleam;
+extern crate glutin;
+extern crate webrender;
+extern crate winit;
+
+#[path = "common/boilerplate.rs"]
+mod boilerplate;
+#[path = "common/image_helper.rs"]
+mod image_helper;
+
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
+use webrender::api::*;
+use webrender::api::units::*;
+
+struct App {
+ image_key: ImageKey,
+}
+
+impl Example for App {
+ fn render(
+ &mut self,
+ _api: &mut RenderApi,
+ builder: &mut DisplayListBuilder,
+ txn: &mut Transaction,
+ _device_size: DeviceIntSize,
+ pipeline_id: PipelineId,
+ _document_id: DocumentId,
+ ) {
+ let (image_descriptor, image_data) = image_helper::make_checkerboard(32, 32);
+ txn.add_image(
+ self.image_key,
+ image_descriptor,
+ image_data,
+ None,
+ );
+
+ let bounds = (0, 0).to(512, 512);
+ let space_and_clip = SpaceAndClipInfo::root_scroll(pipeline_id);
+
+ builder.push_simple_stacking_context(
+ bounds.origin,
+ space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ let image_size = LayoutSize::new(100.0, 100.0);
+
+ builder.push_image(
+ &CommonItemProperties::new(
+ LayoutRect::new(LayoutPoint::new(100.0, 100.0), image_size),
+ space_and_clip,
+ ),
+ bounds,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ self.image_key,
+ ColorF::WHITE,
+ );
+
+ builder.push_image(
+ &CommonItemProperties::new(
+ LayoutRect::new(LayoutPoint::new(250.0, 100.0), image_size),
+ space_and_clip,
+ ),
+ bounds,
+ ImageRendering::Pixelated,
+ AlphaType::PremultipliedAlpha,
+ self.image_key,
+ ColorF::WHITE,
+ );
+
+ builder.pop_stacking_context();
+ }
+
+ fn on_event(&mut self, event: winit::WindowEvent, api: &mut RenderApi, document_id: DocumentId) -> bool {
+ match event {
+ winit::WindowEvent::KeyboardInput {
+ input: winit::KeyboardInput {
+ state: winit::ElementState::Pressed,
+ virtual_keycode: Some(winit::VirtualKeyCode::Space),
+ ..
+ },
+ ..
+ } => {
+ let mut image_data = Vec::new();
+ for y in 0 .. 64 {
+ for x in 0 .. 64 {
+ let r = 255 * ((y & 32) == 0) as u8;
+ let g = 255 * ((x & 32) == 0) as u8;
+ image_data.extend_from_slice(&[0, g, r, 0xff]);
+ }
+ }
+
+ let mut txn = Transaction::new();
+ txn.update_image(
+ self.image_key,
+ ImageDescriptor::new(64, 64, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(image_data),
+ &DirtyRect::All,
+ );
+ let mut txn = Transaction::new();
+ txn.generate_frame();
+ api.send_transaction(document_id, txn);
+ }
+ _ => {}
+ }
+
+ false
+ }
+}
+
+fn main() {
+ let mut app = App {
+ image_key: ImageKey(IdNamespace(0), 0),
+ };
+ boilerplate::main_wrapper(&mut app, None);
+}
diff --git a/third_party/webrender/examples/multiwindow.rs b/third_party/webrender/examples/multiwindow.rs
new file mode 100644
index 00000000000..9b20960a94f
--- /dev/null
+++ b/third_party/webrender/examples/multiwindow.rs
@@ -0,0 +1,326 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate euclid;
+extern crate gleam;
+extern crate glutin;
+extern crate webrender;
+extern crate winit;
+
+use gleam::gl;
+use glutin::NotCurrent;
+use std::fs::File;
+use std::io::Read;
+use webrender::api::*;
+use webrender::api::units::*;
+use webrender::DebugFlags;
+use winit::dpi::LogicalSize;
+
+struct Notifier {
+ events_proxy: winit::EventsLoopProxy,
+}
+
+impl Notifier {
+ fn new(events_proxy: winit::EventsLoopProxy) -> Notifier {
+ Notifier { events_proxy }
+ }
+}
+
+impl RenderNotifier for Notifier {
+ fn clone(&self) -> Box<dyn RenderNotifier> {
+ Box::new(Notifier {
+ events_proxy: self.events_proxy.clone(),
+ })
+ }
+
+ fn wake_up(&self) {
+ #[cfg(not(target_os = "android"))]
+ let _ = self.events_proxy.wakeup();
+ }
+
+ fn new_frame_ready(&self,
+ _: DocumentId,
+ _scrolled: bool,
+ _composite_needed: bool,
+ _render_time: Option<u64>) {
+ self.wake_up();
+ }
+}
+
+struct Window {
+ events_loop: winit::EventsLoop, //TODO: share events loop?
+ context: Option<glutin::WindowedContext<NotCurrent>>,
+ renderer: webrender::Renderer,
+ name: &'static str,
+ pipeline_id: PipelineId,
+ document_id: DocumentId,
+ epoch: Epoch,
+ api: RenderApi,
+ font_instance_key: FontInstanceKey,
+}
+
+impl Window {
+ fn new(name: &'static str, clear_color: ColorF) -> Self {
+ let events_loop = winit::EventsLoop::new();
+ let window_builder = winit::WindowBuilder::new()
+ .with_title(name)
+ .with_multitouch()
+ .with_dimensions(LogicalSize::new(800., 600.));
+ let context = glutin::ContextBuilder::new()
+ .with_gl(glutin::GlRequest::GlThenGles {
+ opengl_version: (3, 2),
+ opengles_version: (3, 0),
+ })
+ .build_windowed(window_builder, &events_loop)
+ .unwrap();
+
+ let context = unsafe { context.make_current().unwrap() };
+
+ let gl = match context.get_api() {
+ glutin::Api::OpenGl => unsafe {
+ gl::GlFns::load_with(|symbol| context.get_proc_address(symbol) as *const _)
+ },
+ glutin::Api::OpenGlEs => unsafe {
+ gl::GlesFns::load_with(|symbol| context.get_proc_address(symbol) as *const _)
+ },
+ glutin::Api::WebGl => unimplemented!(),
+ };
+
+ let device_pixel_ratio = context.window().get_hidpi_factor() as f32;
+
+ let opts = webrender::RendererOptions {
+ device_pixel_ratio,
+ clear_color: Some(clear_color),
+ ..webrender::RendererOptions::default()
+ };
+
+ let device_size = {
+ let size = context
+ .window()
+ .get_inner_size()
+ .unwrap()
+ .to_physical(device_pixel_ratio as f64);
+ DeviceIntSize::new(size.width as i32, size.height as i32)
+ };
+ let notifier = Box::new(Notifier::new(events_loop.create_proxy()));
+ let (renderer, sender) = webrender::Renderer::new(gl.clone(), notifier, opts, None, device_size).unwrap();
+ let mut api = sender.create_api();
+ let document_id = api.add_document(device_size, 0);
+
+ let epoch = Epoch(0);
+ let pipeline_id = PipelineId(0, 0);
+ let mut txn = Transaction::new();
+
+ let font_key = api.generate_font_key();
+ let font_bytes = load_file("../wrench/reftests/text/FreeSans.ttf");
+ txn.add_raw_font(font_key, font_bytes, 0);
+
+ let font_instance_key = api.generate_font_instance_key();
+ txn.add_font_instance(font_instance_key, font_key, 32.0, None, None, Vec::new());
+
+ api.send_transaction(document_id, txn);
+
+ Window {
+ events_loop,
+ context: Some(unsafe { context.make_not_current().unwrap() }),
+ renderer,
+ name,
+ epoch,
+ pipeline_id,
+ document_id,
+ api,
+ font_instance_key,
+ }
+ }
+
+ fn tick(&mut self) -> bool {
+ let mut do_exit = false;
+ let my_name = &self.name;
+ let renderer = &mut self.renderer;
+ let api = &mut self.api;
+
+ self.events_loop.poll_events(|global_event| match global_event {
+ winit::Event::WindowEvent { event, .. } => match event {
+ winit::WindowEvent::CloseRequested |
+ winit::WindowEvent::KeyboardInput {
+ input: winit::KeyboardInput {
+ virtual_keycode: Some(winit::VirtualKeyCode::Escape),
+ ..
+ },
+ ..
+ } => {
+ do_exit = true
+ }
+ winit::WindowEvent::KeyboardInput {
+ input: winit::KeyboardInput {
+ state: winit::ElementState::Pressed,
+ virtual_keycode: Some(winit::VirtualKeyCode::P),
+ ..
+ },
+ ..
+ } => {
+ println!("set flags {}", my_name);
+ api.send_debug_cmd(DebugCommand::SetFlags(DebugFlags::PROFILER_DBG))
+ }
+ _ => {}
+ }
+ _ => {}
+ });
+ if do_exit {
+ return true
+ }
+
+ let context = unsafe { self.context.take().unwrap().make_current().unwrap() };
+ let device_pixel_ratio = context.window().get_hidpi_factor() as f32;
+ let device_size = {
+ let size = context
+ .window()
+ .get_inner_size()
+ .unwrap()
+ .to_physical(device_pixel_ratio as f64);
+ DeviceIntSize::new(size.width as i32, size.height as i32)
+ };
+ let layout_size = device_size.to_f32() / euclid::Scale::new(device_pixel_ratio);
+ let mut txn = Transaction::new();
+ let mut builder = DisplayListBuilder::new(self.pipeline_id, layout_size);
+ let space_and_clip = SpaceAndClipInfo::root_scroll(self.pipeline_id);
+
+ let bounds = LayoutRect::new(LayoutPoint::zero(), builder.content_size());
+ builder.push_simple_stacking_context(
+ bounds.origin,
+ space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ builder.push_rect(
+ &CommonItemProperties::new(
+ LayoutRect::new(
+ LayoutPoint::new(100.0, 200.0),
+ LayoutSize::new(100.0, 200.0),
+ ),
+ space_and_clip,
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(100.0, 200.0),
+ LayoutSize::new(100.0, 200.0),
+ ),
+ ColorF::new(0.0, 1.0, 0.0, 1.0));
+
+ let text_bounds = LayoutRect::new(
+ LayoutPoint::new(100.0, 50.0),
+ LayoutSize::new(700.0, 200.0)
+ );
+ let glyphs = vec![
+ GlyphInstance {
+ index: 48,
+ point: LayoutPoint::new(100.0, 100.0),
+ },
+ GlyphInstance {
+ index: 68,
+ point: LayoutPoint::new(150.0, 100.0),
+ },
+ GlyphInstance {
+ index: 80,
+ point: LayoutPoint::new(200.0, 100.0),
+ },
+ GlyphInstance {
+ index: 82,
+ point: LayoutPoint::new(250.0, 100.0),
+ },
+ GlyphInstance {
+ index: 81,
+ point: LayoutPoint::new(300.0, 100.0),
+ },
+ GlyphInstance {
+ index: 3,
+ point: LayoutPoint::new(350.0, 100.0),
+ },
+ GlyphInstance {
+ index: 86,
+ point: LayoutPoint::new(400.0, 100.0),
+ },
+ GlyphInstance {
+ index: 79,
+ point: LayoutPoint::new(450.0, 100.0),
+ },
+ GlyphInstance {
+ index: 72,
+ point: LayoutPoint::new(500.0, 100.0),
+ },
+ GlyphInstance {
+ index: 83,
+ point: LayoutPoint::new(550.0, 100.0),
+ },
+ GlyphInstance {
+ index: 87,
+ point: LayoutPoint::new(600.0, 100.0),
+ },
+ GlyphInstance {
+ index: 17,
+ point: LayoutPoint::new(650.0, 100.0),
+ },
+ ];
+
+ builder.push_text(
+ &CommonItemProperties::new(
+ text_bounds,
+ space_and_clip,
+ ),
+ text_bounds,
+ &glyphs,
+ self.font_instance_key,
+ ColorF::new(1.0, 1.0, 0.0, 1.0),
+ None,
+ );
+
+ builder.pop_stacking_context();
+
+ txn.set_display_list(
+ self.epoch,
+ None,
+ layout_size,
+ builder.finalize(),
+ true,
+ );
+ txn.set_root_pipeline(self.pipeline_id);
+ txn.generate_frame();
+ api.send_transaction(self.document_id, txn);
+
+ renderer.update();
+ renderer.render(device_size).unwrap();
+ context.swap_buffers().ok();
+
+ self.context = Some(unsafe { context.make_not_current().unwrap() });
+
+ false
+ }
+
+ fn deinit(self) {
+ self.renderer.deinit();
+ }
+}
+
+fn main() {
+ let mut win1 = Window::new("window1", ColorF::new(0.3, 0.0, 0.0, 1.0));
+ let mut win2 = Window::new("window2", ColorF::new(0.0, 0.3, 0.0, 1.0));
+
+ loop {
+ if win1.tick() {
+ break;
+ }
+ if win2.tick() {
+ break;
+ }
+ }
+
+ win1.deinit();
+ win2.deinit();
+}
+
+fn load_file(name: &str) -> Vec<u8> {
+ let mut file = File::open(name).unwrap();
+ let mut buffer = vec![];
+ file.read_to_end(&mut buffer).unwrap();
+ buffer
+}
diff --git a/third_party/webrender/examples/scrolling.rs b/third_party/webrender/examples/scrolling.rs
new file mode 100644
index 00000000000..34cd14304f8
--- /dev/null
+++ b/third_party/webrender/examples/scrolling.rs
@@ -0,0 +1,231 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate euclid;
+extern crate gleam;
+extern crate glutin;
+extern crate webrender;
+extern crate winit;
+
+#[path = "common/boilerplate.rs"]
+mod boilerplate;
+
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
+use euclid::SideOffsets2D;
+use webrender::api::*;
+use webrender::api::units::*;
+use winit::dpi::LogicalPosition;
+
+
+struct App {
+ cursor_position: WorldPoint,
+}
+
+impl Example for App {
+ fn render(
+ &mut self,
+ _api: &mut RenderApi,
+ builder: &mut DisplayListBuilder,
+ _txn: &mut Transaction,
+ _device_size: DeviceIntSize,
+ pipeline_id: PipelineId,
+ _document_id: DocumentId,
+ ) {
+ let root_space_and_clip = SpaceAndClipInfo::root_scroll(pipeline_id);
+ builder.push_simple_stacking_context(
+ LayoutPoint::zero(),
+ root_space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ if true {
+ // scrolling and clips stuff
+ // let's make a scrollbox
+ let scrollbox = (0, 0).to(300, 400);
+ builder.push_simple_stacking_context(
+ LayoutPoint::new(10., 10.),
+ root_space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+ // set the scrolling clip
+ let space_and_clip1 = builder.define_scroll_frame(
+ &root_space_and_clip,
+ None,
+ (0, 0).by(1000, 1000),
+ scrollbox,
+ ScrollSensitivity::ScriptAndInputEvents,
+ LayoutVector2D::zero(),
+ );
+
+ // now put some content into it.
+ // start with a white background
+ let mut info = CommonItemProperties::new((0, 0).to(1000, 1000), space_and_clip1);
+ info.hit_info = Some((0, 1));
+ builder.push_rect(&info, info.clip_rect, ColorF::new(1.0, 1.0, 1.0, 1.0));
+
+ // let's make a 50x50 blue square as a visual reference
+ let mut info = CommonItemProperties::new((0, 0).to(50, 50), space_and_clip1);
+ info.hit_info = Some((0, 2));
+ builder.push_rect(&info, info.clip_rect, ColorF::new(0.0, 0.0, 1.0, 1.0));
+
+ // and a 50x50 green square next to it with an offset clip
+ // to see what that looks like
+ let mut info = CommonItemProperties::new(
+ (50, 0).to(100, 50).intersection(&(60, 10).to(110, 60)).unwrap(),
+ space_and_clip1,
+ );
+ info.hit_info = Some((0, 3));
+ builder.push_rect(&info, info.clip_rect, ColorF::new(0.0, 1.0, 0.0, 1.0));
+
+ // Below the above rectangles, set up a nested scrollbox. It's still in
+ // the same stacking context, so note that the rects passed in need to
+ // be relative to the stacking context.
+ let space_and_clip2 = builder.define_scroll_frame(
+ &space_and_clip1,
+ None,
+ (0, 100).to(300, 1000),
+ (0, 100).to(200, 300),
+ ScrollSensitivity::ScriptAndInputEvents,
+ LayoutVector2D::zero(),
+ );
+
+ // give it a giant gray background just to distinguish it and to easily
+ // visually identify the nested scrollbox
+ let mut info = CommonItemProperties::new(
+ (-1000, -1000).to(5000, 5000),
+ space_and_clip2,
+ );
+ info.hit_info = Some((0, 4));
+ builder.push_rect(&info, info.clip_rect, ColorF::new(0.5, 0.5, 0.5, 1.0));
+
+ // add a teal square to visualize the scrolling/clipping behaviour
+ // as you scroll the nested scrollbox
+ let mut info = CommonItemProperties::new((0, 200).to(50, 250), space_and_clip2);
+ info.hit_info = Some((0, 5));
+ builder.push_rect(&info, info.clip_rect, ColorF::new(0.0, 1.0, 1.0, 1.0));
+
+ // Add a sticky frame. It will "stick" twice while scrolling, once
+ // at a margin of 10px from the bottom, for 40 pixels of scrolling,
+ // and once at a margin of 10px from the top, for 60 pixels of
+ // scrolling.
+ let sticky_id = builder.define_sticky_frame(
+ space_and_clip2.spatial_id,
+ (50, 350).by(50, 50),
+ SideOffsets2D::new(Some(10.0), None, Some(10.0), None),
+ StickyOffsetBounds::new(-40.0, 60.0),
+ StickyOffsetBounds::new(0.0, 0.0),
+ LayoutVector2D::new(0.0, 0.0)
+ );
+
+ let mut info = CommonItemProperties::new(
+ (50, 350).by(50, 50),
+ SpaceAndClipInfo {
+ spatial_id: sticky_id,
+ clip_id: space_and_clip2.clip_id,
+ },
+ );
+ info.hit_info = Some((0, 6));
+ builder.push_rect(
+ &info,
+ info.clip_rect,
+ ColorF::new(0.5, 0.5, 1.0, 1.0),
+ );
+
+ // just for good measure add another teal square further down and to
+ // the right, which can be scrolled into view by the user
+ let mut info = CommonItemProperties::new(
+ (250, 350).to(300, 400),
+ space_and_clip2,
+ );
+ info.hit_info = Some((0, 7));
+ builder.push_rect(&info, info.clip_rect, ColorF::new(0.0, 1.0, 1.0, 1.0));
+
+ builder.pop_stacking_context();
+ }
+
+ builder.pop_stacking_context();
+ }
+
+ fn on_event(&mut self, event: winit::WindowEvent, api: &mut RenderApi, document_id: DocumentId) -> bool {
+ let mut txn = Transaction::new();
+ match event {
+ winit::WindowEvent::KeyboardInput {
+ input: winit::KeyboardInput {
+ state: winit::ElementState::Pressed,
+ virtual_keycode: Some(key),
+ ..
+ },
+ ..
+ } => {
+ let offset = match key {
+ winit::VirtualKeyCode::Down => Some((0.0, -10.0)),
+ winit::VirtualKeyCode::Up => Some((0.0, 10.0)),
+ winit::VirtualKeyCode::Right => Some((-10.0, 0.0)),
+ winit::VirtualKeyCode::Left => Some((10.0, 0.0)),
+ _ => None,
+ };
+ let zoom = match key {
+ winit::VirtualKeyCode::Key0 => Some(1.0),
+ winit::VirtualKeyCode::Minus => Some(0.8),
+ winit::VirtualKeyCode::Equals => Some(1.25),
+ _ => None,
+ };
+
+ if let Some(offset) = offset {
+ txn.scroll(
+ ScrollLocation::Delta(LayoutVector2D::new(offset.0, offset.1)),
+ self.cursor_position,
+ );
+ txn.generate_frame();
+ }
+ if let Some(zoom) = zoom {
+ txn.set_pinch_zoom(ZoomFactor::new(zoom));
+ txn.generate_frame();
+ }
+ }
+ winit::WindowEvent::CursorMoved { position: LogicalPosition { x, y }, .. } => {
+ self.cursor_position = WorldPoint::new(x as f32, y as f32);
+ }
+ winit::WindowEvent::MouseWheel { delta, .. } => {
+ const LINE_HEIGHT: f32 = 38.0;
+ let (dx, dy) = match delta {
+ winit::MouseScrollDelta::LineDelta(dx, dy) => (dx, dy * LINE_HEIGHT),
+ winit::MouseScrollDelta::PixelDelta(pos) => (pos.x as f32, pos.y as f32),
+ };
+
+ txn.scroll(
+ ScrollLocation::Delta(LayoutVector2D::new(dx, dy)),
+ self.cursor_position,
+ );
+ txn.generate_frame();
+ }
+ winit::WindowEvent::MouseInput { .. } => {
+ let results = api.hit_test(
+ document_id,
+ None,
+ self.cursor_position,
+ HitTestFlags::FIND_ALL
+ );
+
+ println!("Hit test results:");
+ for item in &results.items {
+ println!(" • {:?}", item);
+ }
+ println!("");
+ }
+ _ => (),
+ }
+
+ api.send_transaction(document_id, txn);
+
+ false
+ }
+}
+
+fn main() {
+ let mut app = App {
+ cursor_position: WorldPoint::zero(),
+ };
+ boilerplate::main_wrapper(&mut app, None);
+}
diff --git a/third_party/webrender/examples/texture_cache_stress.rs b/third_party/webrender/examples/texture_cache_stress.rs
new file mode 100644
index 00000000000..d2e68183021
--- /dev/null
+++ b/third_party/webrender/examples/texture_cache_stress.rs
@@ -0,0 +1,322 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate gleam;
+extern crate glutin;
+extern crate webrender;
+extern crate winit;
+
+#[path = "common/boilerplate.rs"]
+mod boilerplate;
+
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
+use gleam::gl;
+use std::mem;
+use webrender::api::*;
+use webrender::api::units::*;
+
+
+struct ImageGenerator {
+ patterns: [[u8; 3]; 6],
+ next_pattern: usize,
+ current_image: Vec<u8>,
+}
+
+impl ImageGenerator {
+ fn new() -> Self {
+ ImageGenerator {
+ next_pattern: 0,
+ patterns: [
+ [1, 0, 0],
+ [0, 1, 0],
+ [0, 0, 1],
+ [1, 1, 0],
+ [0, 1, 1],
+ [1, 0, 1],
+ ],
+ current_image: Vec::new(),
+ }
+ }
+
+ fn generate_image(&mut self, size: i32) {
+ let pattern = &self.patterns[self.next_pattern];
+ self.current_image.clear();
+ for y in 0 .. size {
+ for x in 0 .. size {
+ let lum = 255 * (1 - (((x & 8) == 0) ^ ((y & 8) == 0)) as u8);
+ self.current_image.extend_from_slice(&[
+ lum * pattern[0],
+ lum * pattern[1],
+ lum * pattern[2],
+ 0xff,
+ ]);
+ }
+ }
+
+ self.next_pattern = (self.next_pattern + 1) % self.patterns.len();
+ }
+
+ fn take(&mut self) -> Vec<u8> {
+ mem::replace(&mut self.current_image, Vec::new())
+ }
+}
+
+impl ExternalImageHandler for ImageGenerator {
+ fn lock(
+ &mut self,
+ _key: ExternalImageId,
+ channel_index: u8,
+ _rendering: ImageRendering
+ ) -> ExternalImage {
+ self.generate_image(channel_index as i32);
+ ExternalImage {
+ uv: TexelRect::new(0.0, 0.0, 1.0, 1.0),
+ source: ExternalImageSource::RawData(&self.current_image),
+ }
+ }
+ fn unlock(&mut self, _key: ExternalImageId, _channel_index: u8) {}
+}
+
+struct App {
+ stress_keys: Vec<ImageKey>,
+ image_key: Option<ImageKey>,
+ image_generator: ImageGenerator,
+ swap_keys: Vec<ImageKey>,
+ swap_index: usize,
+}
+
+impl Example for App {
+ fn render(
+ &mut self,
+ api: &mut RenderApi,
+ builder: &mut DisplayListBuilder,
+ txn: &mut Transaction,
+ _device_size: DeviceIntSize,
+ pipeline_id: PipelineId,
+ _document_id: DocumentId,
+ ) {
+ let bounds = (0, 0).to(512, 512);
+ let space_and_clip = SpaceAndClipInfo::root_scroll(pipeline_id);
+
+ builder.push_simple_stacking_context(
+ bounds.origin,
+ space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ let x0 = 50.0;
+ let y0 = 50.0;
+ let image_size = LayoutSize::new(4.0, 4.0);
+
+ if self.swap_keys.is_empty() {
+ let key0 = api.generate_image_key();
+ let key1 = api.generate_image_key();
+
+ self.image_generator.generate_image(128);
+ txn.add_image(
+ key0,
+ ImageDescriptor::new(128, 128, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(self.image_generator.take()),
+ None,
+ );
+
+ self.image_generator.generate_image(128);
+ txn.add_image(
+ key1,
+ ImageDescriptor::new(128, 128, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(self.image_generator.take()),
+ None,
+ );
+
+ self.swap_keys.push(key0);
+ self.swap_keys.push(key1);
+ }
+
+ for (i, key) in self.stress_keys.iter().enumerate() {
+ let x = (i % 128) as f32;
+ let y = (i / 128) as f32;
+ let info = CommonItemProperties::new(
+ LayoutRect::new(
+ LayoutPoint::new(x0 + image_size.width * x, y0 + image_size.height * y),
+ image_size,
+ ),
+ space_and_clip,
+ );
+
+ builder.push_image(
+ &info,
+ bounds,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ *key,
+ ColorF::WHITE,
+ );
+ }
+
+ if let Some(image_key) = self.image_key {
+ let image_size = LayoutSize::new(100.0, 100.0);
+ let info = CommonItemProperties::new(
+ LayoutRect::new(LayoutPoint::new(100.0, 100.0), image_size),
+ space_and_clip,
+ );
+ builder.push_image(
+ &info,
+ bounds,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ image_key,
+ ColorF::WHITE,
+ );
+ }
+
+ let swap_key = self.swap_keys[self.swap_index];
+ let image_size = LayoutSize::new(64.0, 64.0);
+ let info = CommonItemProperties::new(
+ LayoutRect::new(LayoutPoint::new(100.0, 400.0), image_size),
+ space_and_clip,
+ );
+ builder.push_image(
+ &info,
+ bounds,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ swap_key,
+ ColorF::WHITE,
+ );
+ self.swap_index = 1 - self.swap_index;
+
+ builder.pop_stacking_context();
+ }
+
+ fn on_event(
+ &mut self,
+ event: winit::WindowEvent,
+ api: &mut RenderApi,
+ document_id: DocumentId,
+ ) -> bool {
+ match event {
+ winit::WindowEvent::KeyboardInput {
+ input: winit::KeyboardInput {
+ state: winit::ElementState::Pressed,
+ virtual_keycode: Some(key),
+ ..
+ },
+ ..
+ } => {
+ let mut txn = Transaction::new();
+
+ match key {
+ winit::VirtualKeyCode::S => {
+ self.stress_keys.clear();
+
+ for _ in 0 .. 16 {
+ for _ in 0 .. 16 {
+ let size = 4;
+
+ let image_key = api.generate_image_key();
+
+ self.image_generator.generate_image(size);
+
+ txn.add_image(
+ image_key,
+ ImageDescriptor::new(
+ size,
+ size,
+ ImageFormat::BGRA8,
+ ImageDescriptorFlags::IS_OPAQUE,
+ ),
+ ImageData::new(self.image_generator.take()),
+ None,
+ );
+
+ self.stress_keys.push(image_key);
+ }
+ }
+ }
+ winit::VirtualKeyCode::D => if let Some(image_key) = self.image_key.take() {
+ txn.delete_image(image_key);
+ },
+ winit::VirtualKeyCode::U => if let Some(image_key) = self.image_key {
+ let size = 128;
+ self.image_generator.generate_image(size);
+
+ txn.update_image(
+ image_key,
+ ImageDescriptor::new(size, size, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(self.image_generator.take()),
+ &DirtyRect::All,
+ );
+ },
+ winit::VirtualKeyCode::E => {
+ if let Some(image_key) = self.image_key.take() {
+ txn.delete_image(image_key);
+ }
+
+ let size = 32;
+ let image_key = api.generate_image_key();
+
+ let image_data = ExternalImageData {
+ id: ExternalImageId(0),
+ channel_index: size as u8,
+ image_type: ExternalImageType::Buffer,
+ };
+
+ txn.add_image(
+ image_key,
+ ImageDescriptor::new(size, size, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::External(image_data),
+ None,
+ );
+
+ self.image_key = Some(image_key);
+ }
+ winit::VirtualKeyCode::R => {
+ if let Some(image_key) = self.image_key.take() {
+ txn.delete_image(image_key);
+ }
+
+ let image_key = api.generate_image_key();
+ let size = 32;
+ self.image_generator.generate_image(size);
+
+ txn.add_image(
+ image_key,
+ ImageDescriptor::new(size, size, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(self.image_generator.take()),
+ None,
+ );
+
+ self.image_key = Some(image_key);
+ }
+ _ => {}
+ }
+
+ api.send_transaction(document_id, txn);
+ return true;
+ }
+ _ => {}
+ }
+
+ false
+ }
+
+ fn get_image_handlers(
+ &mut self,
+ _gl: &dyn gl::Gl,
+ ) -> (Option<Box<dyn ExternalImageHandler>>,
+ Option<Box<dyn OutputImageHandler>>) {
+ (Some(Box::new(ImageGenerator::new())), None)
+ }
+}
+
+fn main() {
+ let mut app = App {
+ image_key: None,
+ stress_keys: Vec::new(),
+ image_generator: ImageGenerator::new(),
+ swap_keys: Vec::new(),
+ swap_index: 0,
+ };
+ boilerplate::main_wrapper(&mut app, None);
+}
diff --git a/third_party/webrender/examples/yuv.rs b/third_party/webrender/examples/yuv.rs
new file mode 100644
index 00000000000..a8f36b33d7e
--- /dev/null
+++ b/third_party/webrender/examples/yuv.rs
@@ -0,0 +1,226 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate gleam;
+extern crate glutin;
+extern crate webrender;
+extern crate winit;
+
+#[path = "common/boilerplate.rs"]
+mod boilerplate;
+
+use crate::boilerplate::Example;
+use gleam::gl;
+use webrender::api::*;
+use webrender::api::units::*;
+
+
+fn init_gl_texture(
+ id: gl::GLuint,
+ internal: gl::GLenum,
+ external: gl::GLenum,
+ bytes: &[u8],
+ gl: &dyn gl::Gl,
+) {
+ gl.bind_texture(gl::TEXTURE_2D, id);
+ gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_MAG_FILTER, gl::LINEAR as gl::GLint);
+ gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_MIN_FILTER, gl::LINEAR as gl::GLint);
+ gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_WRAP_S, gl::CLAMP_TO_EDGE as gl::GLint);
+ gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_WRAP_T, gl::CLAMP_TO_EDGE as gl::GLint);
+ gl.tex_image_2d(
+ gl::TEXTURE_2D,
+ 0,
+ internal as gl::GLint,
+ 100,
+ 100,
+ 0,
+ external,
+ gl::UNSIGNED_BYTE,
+ Some(bytes),
+ );
+ gl.bind_texture(gl::TEXTURE_2D, 0);
+}
+
+struct YuvImageProvider {
+ texture_ids: Vec<gl::GLuint>,
+}
+
+impl YuvImageProvider {
+ fn new(gl: &dyn gl::Gl) -> Self {
+ let texture_ids = gl.gen_textures(4);
+
+ init_gl_texture(texture_ids[0], gl::RED, gl::RED, &[127; 100 * 100], gl);
+ init_gl_texture(texture_ids[1], gl::RG8, gl::RG, &[0; 100 * 100 * 2], gl);
+ init_gl_texture(texture_ids[2], gl::RED, gl::RED, &[127; 100 * 100], gl);
+ init_gl_texture(texture_ids[3], gl::RED, gl::RED, &[127; 100 * 100], gl);
+
+ YuvImageProvider {
+ texture_ids
+ }
+ }
+}
+
+impl ExternalImageHandler for YuvImageProvider {
+ fn lock(
+ &mut self,
+ key: ExternalImageId,
+ _channel_index: u8,
+ _rendering: ImageRendering
+ ) -> ExternalImage {
+ let id = self.texture_ids[key.0 as usize];
+ ExternalImage {
+ uv: TexelRect::new(0.0, 0.0, 1.0, 1.0),
+ source: ExternalImageSource::NativeTexture(id),
+ }
+ }
+ fn unlock(&mut self, _key: ExternalImageId, _channel_index: u8) {
+ }
+}
+
+struct App {
+ texture_id: gl::GLuint,
+ current_value: u8,
+}
+
+impl Example for App {
+ fn render(
+ &mut self,
+ api: &mut RenderApi,
+ builder: &mut DisplayListBuilder,
+ txn: &mut Transaction,
+ _device_size: DeviceIntSize,
+ pipeline_id: PipelineId,
+ _document_id: DocumentId,
+ ) {
+ let bounds = LayoutRect::new(LayoutPoint::zero(), builder.content_size());
+ let space_and_clip = SpaceAndClipInfo::root_scroll(pipeline_id);
+
+ builder.push_simple_stacking_context(
+ bounds.origin,
+ space_and_clip.spatial_id,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+
+ let yuv_chanel1 = api.generate_image_key();
+ let yuv_chanel2 = api.generate_image_key();
+ let yuv_chanel2_1 = api.generate_image_key();
+ let yuv_chanel3 = api.generate_image_key();
+ txn.add_image(
+ yuv_chanel1,
+ ImageDescriptor::new(100, 100, ImageFormat::R8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::External(ExternalImageData {
+ id: ExternalImageId(0),
+ channel_index: 0,
+ image_type: ExternalImageType::TextureHandle(
+ TextureTarget::Default,
+ ),
+ }),
+ None,
+ );
+ txn.add_image(
+ yuv_chanel2,
+ ImageDescriptor::new(100, 100, ImageFormat::RG8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::External(ExternalImageData {
+ id: ExternalImageId(1),
+ channel_index: 0,
+ image_type: ExternalImageType::TextureHandle(
+ TextureTarget::Default,
+ ),
+ }),
+ None,
+ );
+ txn.add_image(
+ yuv_chanel2_1,
+ ImageDescriptor::new(100, 100, ImageFormat::R8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::External(ExternalImageData {
+ id: ExternalImageId(2),
+ channel_index: 0,
+ image_type: ExternalImageType::TextureHandle(
+ TextureTarget::Default,
+ ),
+ }),
+ None,
+ );
+ txn.add_image(
+ yuv_chanel3,
+ ImageDescriptor::new(100, 100, ImageFormat::R8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::External(ExternalImageData {
+ id: ExternalImageId(3),
+ channel_index: 0,
+ image_type: ExternalImageType::TextureHandle(
+ TextureTarget::Default,
+ ),
+ }),
+ None,
+ );
+
+ let info = CommonItemProperties::new(
+ LayoutRect::new(LayoutPoint::new(100.0, 0.0), LayoutSize::new(100.0, 100.0)),
+ space_and_clip,
+ );
+ builder.push_yuv_image(
+ &info,
+ bounds,
+ YuvData::NV12(yuv_chanel1, yuv_chanel2),
+ ColorDepth::Color8,
+ YuvColorSpace::Rec601,
+ ColorRange::Limited,
+ ImageRendering::Auto,
+ );
+
+ let info = CommonItemProperties::new(
+ LayoutRect::new(LayoutPoint::new(300.0, 0.0), LayoutSize::new(100.0, 100.0)),
+ space_and_clip,
+ );
+ builder.push_yuv_image(
+ &info,
+ bounds,
+ YuvData::PlanarYCbCr(yuv_chanel1, yuv_chanel2_1, yuv_chanel3),
+ ColorDepth::Color8,
+ YuvColorSpace::Rec601,
+ ColorRange::Limited,
+ ImageRendering::Auto,
+ );
+
+ builder.pop_stacking_context();
+ }
+
+ fn on_event(
+ &mut self,
+ _event: winit::WindowEvent,
+ _api: &mut RenderApi,
+ _document_id: DocumentId,
+ ) -> bool {
+ false
+ }
+
+ fn get_image_handlers(
+ &mut self,
+ gl: &dyn gl::Gl,
+ ) -> (Option<Box<dyn ExternalImageHandler>>,
+ Option<Box<dyn OutputImageHandler>>) {
+ let provider = YuvImageProvider::new(gl);
+ self.texture_id = provider.texture_ids[0];
+ (Some(Box::new(provider)), None)
+ }
+
+ fn draw_custom(&mut self, gl: &dyn gl::Gl) {
+ init_gl_texture(self.texture_id, gl::RED, gl::RED, &[self.current_value; 100 * 100], gl);
+ self.current_value = self.current_value.wrapping_add(1);
+ }
+}
+
+fn main() {
+ let mut app = App {
+ texture_id: 0,
+ current_value: 0,
+ };
+
+ let opts = webrender::RendererOptions {
+ debug_flags: webrender::DebugFlags::NEW_FRAME_INDICATOR | webrender::DebugFlags::NEW_SCENE_INDICATOR,
+ ..Default::default()
+ };
+
+ boilerplate::main_wrapper(&mut app, Some(opts));
+}
diff --git a/third_party/webrender/glsl-to-cxx/Cargo.toml b/third_party/webrender/glsl-to-cxx/Cargo.toml
new file mode 100644
index 00000000000..1ff4298b541
--- /dev/null
+++ b/third_party/webrender/glsl-to-cxx/Cargo.toml
@@ -0,0 +1,11 @@
+[package]
+name = "glsl-to-cxx"
+version = "0.1.0"
+license = "MPL-2.0"
+authors = ["The Mozilla Project Developers"]
+edition = "2018"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+glsl = "4.0"
diff --git a/third_party/webrender/glsl-to-cxx/README.md b/third_party/webrender/glsl-to-cxx/README.md
new file mode 100644
index 00000000000..1b5b4845d27
--- /dev/null
+++ b/third_party/webrender/glsl-to-cxx/README.md
@@ -0,0 +1,3 @@
+A GLSL to C++ translator.
+
+Translates GLSL to vectorized C++. Intended for use with WebRender software backend.
diff --git a/third_party/webrender/glsl-to-cxx/src/hir.rs b/third_party/webrender/glsl-to-cxx/src/hir.rs
new file mode 100644
index 00000000000..710b50b7af2
--- /dev/null
+++ b/third_party/webrender/glsl-to-cxx/src/hir.rs
@@ -0,0 +1,3856 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use glsl::syntax;
+use glsl::syntax::{ArrayedIdentifier, ArraySpecifier, AssignmentOp, BinaryOp, Identifier};
+use glsl::syntax::{NonEmpty, PrecisionQualifier, StructFieldSpecifier, StructSpecifier};
+use glsl::syntax::{TypeSpecifier, TypeSpecifierNonArray, UnaryOp};
+use std::cell::{Cell, Ref, RefCell};
+use std::collections::HashMap;
+use std::iter::FromIterator;
+use std::mem;
+use std::ops::{Deref, DerefMut};
+use std::rc::Rc;
+
+trait LiftFrom<S> {
+ fn lift(state: &mut State, s: S) -> Self;
+}
+
+fn lift<S, T: LiftFrom<S>>(state: &mut State, s: S) -> T {
+ LiftFrom::lift(state, s)
+}
+
+#[derive(Debug)]
+pub struct Symbol {
+ pub name: String,
+ pub decl: SymDecl,
+}
+
+#[derive(Debug, Clone, PartialEq)]
+pub struct FunctionSignature {
+ ret: Type,
+ params: Vec<Type>,
+}
+
+#[derive(Debug, Clone, PartialEq)]
+pub struct FunctionType {
+ signatures: NonEmpty<FunctionSignature>,
+}
+
+#[derive(Clone, Copy, Debug, PartialEq)]
+pub enum SamplerFormat {
+ Unknown,
+ RGBA8,
+ RGBA32F,
+ RGBA32I,
+ R8,
+}
+
+impl SamplerFormat {
+ pub fn type_suffix(self) -> Option<&'static str> {
+ match self {
+ SamplerFormat::Unknown => None,
+ SamplerFormat::RGBA8 => Some("RGBA8"),
+ SamplerFormat::RGBA32F => Some("RGBA32F"),
+ SamplerFormat::RGBA32I => Some("RGBA32I"),
+ SamplerFormat::R8 => Some("R8"),
+ }
+ }
+}
+
+#[derive(Clone, Copy, Debug, PartialEq)]
+pub enum StorageClass {
+ None,
+ Const,
+ In,
+ Out,
+ Uniform,
+ Sampler(SamplerFormat),
+ FragColor(i32),
+}
+
+#[derive(Clone, Debug, PartialEq)]
+pub struct ArraySizes {
+ pub sizes: Vec<Expr>,
+}
+
+impl LiftFrom<&ArraySpecifier> for ArraySizes {
+ fn lift(state: &mut State, a: &ArraySpecifier) -> Self {
+ ArraySizes {
+ sizes: vec![match a {
+ ArraySpecifier::Unsized => panic!(),
+ ArraySpecifier::ExplicitlySized(expr) => translate_expression(state, expr),
+ }],
+ }
+ }
+}
+
+#[derive(Copy, Clone, Debug, PartialEq)]
+pub enum TypeKind {
+ Void,
+ Bool,
+ Int,
+ UInt,
+ Float,
+ Double,
+ Vec2,
+ Vec3,
+ Vec4,
+ DVec2,
+ DVec3,
+ DVec4,
+ BVec2,
+ BVec3,
+ BVec4,
+ IVec2,
+ IVec3,
+ IVec4,
+ UVec2,
+ UVec3,
+ UVec4,
+ Mat2,
+ Mat3,
+ Mat4,
+ Mat23,
+ Mat24,
+ Mat32,
+ Mat34,
+ Mat42,
+ Mat43,
+ DMat2,
+ DMat3,
+ DMat4,
+ DMat23,
+ DMat24,
+ DMat32,
+ DMat34,
+ DMat42,
+ DMat43,
+ // floating point opaque types
+ Sampler1D,
+ Image1D,
+ Sampler2D,
+ Image2D,
+ Sampler3D,
+ Image3D,
+ SamplerCube,
+ ImageCube,
+ Sampler2DRect,
+ Image2DRect,
+ Sampler1DArray,
+ Image1DArray,
+ Sampler2DArray,
+ Image2DArray,
+ SamplerBuffer,
+ ImageBuffer,
+ Sampler2DMS,
+ Image2DMS,
+ Sampler2DMSArray,
+ Image2DMSArray,
+ SamplerCubeArray,
+ ImageCubeArray,
+ Sampler1DShadow,
+ Sampler2DShadow,
+ Sampler2DRectShadow,
+ Sampler1DArrayShadow,
+ Sampler2DArrayShadow,
+ SamplerCubeShadow,
+ SamplerCubeArrayShadow,
+ // signed integer opaque types
+ ISampler1D,
+ IImage1D,
+ ISampler2D,
+ IImage2D,
+ ISampler3D,
+ IImage3D,
+ ISamplerCube,
+ IImageCube,
+ ISampler2DRect,
+ IImage2DRect,
+ ISampler1DArray,
+ IImage1DArray,
+ ISampler2DArray,
+ IImage2DArray,
+ ISamplerBuffer,
+ IImageBuffer,
+ ISampler2DMS,
+ IImage2DMS,
+ ISampler2DMSArray,
+ IImage2DMSArray,
+ ISamplerCubeArray,
+ IImageCubeArray,
+ // unsigned integer opaque types
+ AtomicUInt,
+ USampler1D,
+ UImage1D,
+ USampler2D,
+ UImage2D,
+ USampler3D,
+ UImage3D,
+ USamplerCube,
+ UImageCube,
+ USampler2DRect,
+ UImage2DRect,
+ USampler1DArray,
+ UImage1DArray,
+ USampler2DArray,
+ UImage2DArray,
+ USamplerBuffer,
+ UImageBuffer,
+ USampler2DMS,
+ UImage2DMS,
+ USampler2DMSArray,
+ UImage2DMSArray,
+ USamplerCubeArray,
+ UImageCubeArray,
+ Struct(SymRef),
+}
+
+impl TypeKind {
+ pub fn is_sampler(&self) -> bool {
+ use TypeKind::*;
+ match self {
+ Sampler1D
+ | Image1D
+ | Sampler2D
+ | Image2D
+ | Sampler3D
+ | Image3D
+ | SamplerCube
+ | ImageCube
+ | Sampler2DRect
+ | Image2DRect
+ | Sampler1DArray
+ | Image1DArray
+ | Sampler2DArray
+ | Image2DArray
+ | SamplerBuffer
+ | ImageBuffer
+ | Sampler2DMS
+ | Image2DMS
+ | Sampler2DMSArray
+ | Image2DMSArray
+ | SamplerCubeArray
+ | ImageCubeArray
+ | Sampler1DShadow
+ | Sampler2DShadow
+ | Sampler2DRectShadow
+ | Sampler1DArrayShadow
+ | Sampler2DArrayShadow
+ | SamplerCubeShadow
+ | SamplerCubeArrayShadow
+ | ISampler1D
+ | IImage1D
+ | ISampler2D
+ | IImage2D
+ | ISampler3D
+ | IImage3D
+ | ISamplerCube
+ | IImageCube
+ | ISampler2DRect
+ | IImage2DRect
+ | ISampler1DArray
+ | IImage1DArray
+ | ISampler2DArray
+ | IImage2DArray
+ | ISamplerBuffer
+ | IImageBuffer
+ | ISampler2DMS
+ | IImage2DMS
+ | ISampler2DMSArray
+ | IImage2DMSArray
+ | ISamplerCubeArray
+ | IImageCubeArray
+ | USampler1D
+ | UImage1D
+ | USampler2D
+ | UImage2D
+ | USampler3D
+ | UImage3D
+ | USamplerCube
+ | UImageCube
+ | USampler2DRect
+ | UImage2DRect
+ | USampler1DArray
+ | UImage1DArray
+ | USampler2DArray
+ | UImage2DArray
+ | USamplerBuffer
+ | UImageBuffer
+ | USampler2DMS
+ | UImage2DMS
+ | USampler2DMSArray
+ | UImage2DMSArray
+ | USamplerCubeArray
+ | UImageCubeArray => true,
+ _ => false,
+ }
+ }
+
+ pub fn is_bool(&self) -> bool {
+ use TypeKind::*;
+ match self {
+ Bool | BVec2 | BVec3 | BVec4 => true,
+ _ => false,
+ }
+ }
+
+ pub fn to_bool(&self) -> Self {
+ use TypeKind::*;
+ match self {
+ Int | UInt | Float | Double => Bool,
+ IVec2 | UVec2 | Vec2 | DVec2 => BVec2,
+ IVec3 | UVec3 | Vec3 | DVec3 => BVec3,
+ IVec4 | UVec4 | Vec4 | DVec4 => BVec4,
+ _ => *self,
+ }
+ }
+
+ pub fn to_int(&self) -> Self {
+ use TypeKind::*;
+ match self {
+ Bool | UInt | Float | Double => Int,
+ BVec2 | UVec2 | Vec2 | DVec2 => IVec2,
+ BVec3 | UVec3 | Vec3 | DVec3 => IVec3,
+ BVec4 | UVec4 | Vec4 | DVec4 => IVec4,
+ _ => *self,
+ }
+ }
+
+ pub fn to_scalar(&self) -> Self {
+ use TypeKind::*;
+ match self {
+ IVec2 | IVec3 | IVec4 => Int,
+ UVec2 | UVec3 | UVec4 => UInt,
+ Vec2 | Vec3 | Vec4 => Float,
+ DVec2 | DVec3 | DVec4 => Double,
+ BVec2 | BVec3 | BVec4 => Bool,
+ _ => *self,
+ }
+ }
+
+ pub fn glsl_primitive_type_name(&self) -> Option<&'static str> {
+ use TypeKind::*;
+ Some(match self {
+ Void => "void",
+ Bool => "bool",
+ Int => "int",
+ UInt => "uint",
+ Float => "float",
+ Double => "double",
+ Vec2 => "vec2",
+ Vec3 => "vec3",
+ Vec4 => "vec4",
+ DVec2 => "dvec2",
+ DVec3 => "dvec3",
+ DVec4 => "dvec4",
+ BVec2 => "bvec2",
+ BVec3 => "bvec3",
+ BVec4 => "bvec4",
+ IVec2 => "ivec2",
+ IVec3 => "ivec3",
+ IVec4 => "ivec4",
+ UVec2 => "uvec2",
+ UVec3 => "uvec3",
+ UVec4 => "uvec4",
+ Mat2 => "mat2",
+ Mat3 => "mat3",
+ Mat4 => "mat4",
+ Mat23 => "mat23",
+ Mat24 => "mat24",
+ Mat32 => "mat32",
+ Mat34 => "mat34",
+ Mat42 => "mat42",
+ Mat43 => "mat43",
+ DMat2 => "dmat2",
+ DMat3 => "dmat3",
+ DMat4 => "dmat4",
+ DMat23 => "dmat23",
+ DMat24 => "dmat24",
+ DMat32 => "dmat32",
+ DMat34 => "dmat34",
+ DMat42 => "dmat42",
+ DMat43 => "dmat43",
+ Sampler1D => "sampler1D",
+ Image1D => "image1D",
+ Sampler2D => "sampler2D",
+ Image2D => "image2D",
+ Sampler3D => "sampler3D",
+ Image3D => "image3D",
+ SamplerCube => "samplerCube",
+ ImageCube => "imageCube",
+ Sampler2DRect => "sampler2DRect",
+ Image2DRect => "image2DRect",
+ Sampler1DArray => "sampler1DArray",
+ Image1DArray => "image1DArray",
+ Sampler2DArray => "sampler2DArray",
+ Image2DArray => "image2DArray",
+ SamplerBuffer => "samplerBuffer",
+ ImageBuffer => "imageBuffer",
+ Sampler2DMS => "sampler2DMS",
+ Image2DMS => "image2DMS",
+ Sampler2DMSArray => "sampler2DMSArray",
+ Image2DMSArray => "image2DMSArray",
+ SamplerCubeArray => "samplerCubeArray",
+ ImageCubeArray => "imageCubeArray",
+ Sampler1DShadow => "sampler1DShadow",
+ Sampler2DShadow => "sampler2DShadow",
+ Sampler2DRectShadow => "sampler2DRectShadow",
+ Sampler1DArrayShadow => "sampler1DArrayShadow",
+ Sampler2DArrayShadow => "sampler2DArrayShadow",
+ SamplerCubeShadow => "samplerCubeShadow",
+ SamplerCubeArrayShadow => "samplerCubeArrayShadow",
+ ISampler1D => "isampler1D",
+ IImage1D => "iimage1D",
+ ISampler2D => "isampler2D",
+ IImage2D => "iimage2D",
+ ISampler3D => "isampler3D",
+ IImage3D => "iimage3D",
+ ISamplerCube => "isamplerCube",
+ IImageCube => "iimageCube",
+ ISampler2DRect => "isampler2DRect",
+ IImage2DRect => "iimage2DRect",
+ ISampler1DArray => "isampler1DArray",
+ IImage1DArray => "iimage1DArray",
+ ISampler2DArray => "isampler2DArray",
+ IImage2DArray => "iimage2DArray",
+ ISamplerBuffer => "isamplerBuffer",
+ IImageBuffer => "iimageBuffer",
+ ISampler2DMS => "isampler2MS",
+ IImage2DMS => "iimage2DMS",
+ ISampler2DMSArray => "isampler2DMSArray",
+ IImage2DMSArray => "iimage2DMSArray",
+ ISamplerCubeArray => "isamplerCubeArray",
+ IImageCubeArray => "iimageCubeArray",
+ AtomicUInt => "atomic_uint",
+ USampler1D => "usampler1D",
+ UImage1D => "uimage1D",
+ USampler2D => "usampler2D",
+ UImage2D => "uimage2D",
+ USampler3D => "usampler3D",
+ UImage3D => "uimage3D",
+ USamplerCube => "usamplerCube",
+ UImageCube => "uimageCube",
+ USampler2DRect => "usampler2DRect",
+ UImage2DRect => "uimage2DRect",
+ USampler1DArray => "usampler1DArray",
+ UImage1DArray => "uimage1DArray",
+ USampler2DArray => "usampler2DArray",
+ UImage2DArray => "uimage2DArray",
+ USamplerBuffer => "usamplerBuffer",
+ UImageBuffer => "uimageBuffer",
+ USampler2DMS => "usampler2DMS",
+ UImage2DMS => "uimage2DMS",
+ USampler2DMSArray => "usamplerDMSArray",
+ UImage2DMSArray => "uimage2DMSArray",
+ USamplerCubeArray => "usamplerCubeArray",
+ UImageCubeArray => "uimageCubeArray",
+ Struct(..) => return None,
+ })
+ }
+
+ pub fn cxx_primitive_type_name(&self) -> Option<&'static str> {
+ use TypeKind::*;
+ match self {
+ Bool => Some("Bool"),
+ Int => Some("I32"),
+ UInt => Some("U32"),
+ Float => Some("Float"),
+ Double => Some("Double"),
+ _ => self.glsl_primitive_type_name(),
+ }
+ }
+
+ pub fn cxx_primitive_scalar_type_name(&self) -> Option<&'static str> {
+ use TypeKind::*;
+ match self {
+ Void => Some("void"),
+ Bool => Some("bool"),
+ Int => Some("int32_t"),
+ UInt => Some("uint32_t"),
+ Float => Some("float"),
+ Double => Some("double"),
+ _ => {
+ if self.is_sampler() {
+ self.cxx_primitive_type_name()
+ } else {
+ None
+ }
+ }
+ }
+ }
+
+ pub fn from_glsl_primitive_type_name(name: &str) -> Option<TypeKind> {
+ use TypeKind::*;
+ Some(match name {
+ "void" => Void,
+ "bool" => Bool,
+ "int" => Int,
+ "uint" => UInt,
+ "float" => Float,
+ "double" => Double,
+ "vec2" => Vec2,
+ "vec3" => Vec3,
+ "vec4" => Vec4,
+ "dvec2" => DVec2,
+ "dvec3" => DVec3,
+ "dvec4" => DVec4,
+ "bvec2" => BVec2,
+ "bvec3" => BVec3,
+ "bvec4" => BVec4,
+ "ivec2" => IVec2,
+ "ivec3" => IVec3,
+ "ivec4" => IVec4,
+ "uvec2" => UVec2,
+ "uvec3" => UVec3,
+ "uvec4" => UVec4,
+ "mat2" => Mat2,
+ "mat3" => Mat3,
+ "mat4" => Mat4,
+ "mat23" => Mat23,
+ "mat24" => Mat24,
+ "mat32" => Mat32,
+ "mat34" => Mat34,
+ "mat42" => Mat42,
+ "mat43" => Mat43,
+ "dmat2" => DMat2,
+ "dmat3" => DMat3,
+ "dmat4" => DMat4,
+ "dmat23" => DMat23,
+ "dmat24" => DMat24,
+ "dmat32" => DMat32,
+ "dmat34" => DMat34,
+ "dmat42" => DMat42,
+ "dmat43" => DMat43,
+ "sampler1D" => Sampler1D,
+ "image1D" => Image1D,
+ "sampler2D" => Sampler2D,
+ "image2D" => Image2D,
+ "sampler3D" => Sampler3D,
+ "image3D" => Image3D,
+ "samplerCube" => SamplerCube,
+ "imageCube" => ImageCube,
+ "sampler2DRect" => Sampler2DRect,
+ "image2DRect" => Image2DRect,
+ "sampler1DArray" => Sampler1DArray,
+ "image1DArray" => Image1DArray,
+ "sampler2DArray" => Sampler2DArray,
+ "image2DArray" => Image2DArray,
+ "samplerBuffer" => SamplerBuffer,
+ "imageBuffer" => ImageBuffer,
+ "sampler2DMS" => Sampler2DMS,
+ "image2DMS" => Image2DMS,
+ "sampler2DMSArray" => Sampler2DMSArray,
+ "image2DMSArray" => Image2DMSArray,
+ "samplerCubeArray" => SamplerCubeArray,
+ "imageCubeArray" => ImageCubeArray,
+ "sampler1DShadow" => Sampler1DShadow,
+ "sampler2DShadow" => Sampler2DShadow,
+ "sampler2DRectShadow" => Sampler2DRectShadow,
+ "sampler1DArrayShadow" => Sampler1DArrayShadow,
+ "sampler2DArrayShadow" => Sampler2DArrayShadow,
+ "samplerCubeShadow" => SamplerCubeShadow,
+ "samplerCubeArrayShadow" => SamplerCubeArrayShadow,
+ "isampler1D" => ISampler1D,
+ "iimage1D" => IImage1D,
+ "isampler2D" => ISampler2D,
+ "iimage2D" => IImage2D,
+ "isampler3D" => ISampler3D,
+ "iimage3D" => IImage3D,
+ "isamplerCube" => ISamplerCube,
+ "iimageCube" => IImageCube,
+ "isampler2DRect" => ISampler2DRect,
+ "iimage2DRect" => IImage2DRect,
+ "isampler1DArray" => ISampler1DArray,
+ "iimage1DArray" => IImage1DArray,
+ "isampler2DArray" => ISampler2DArray,
+ "iimage2DArray" => IImage2DArray,
+ "isamplerBuffer" => ISamplerBuffer,
+ "iimageBuffer" => IImageBuffer,
+ "isampler2MS" => ISampler2DMS,
+ "iimage2DMS" => IImage2DMS,
+ "isampler2DMSArray" => ISampler2DMSArray,
+ "iimage2DMSArray" => IImage2DMSArray,
+ "isamplerCubeArray" => ISamplerCubeArray,
+ "iimageCubeArray" => IImageCubeArray,
+ "atomic_uint" => AtomicUInt,
+ "usampler1D" => USampler1D,
+ "uimage1D" => UImage1D,
+ "usampler2D" => USampler2D,
+ "uimage2D" => UImage2D,
+ "usampler3D" => USampler3D,
+ "uimage3D" => UImage3D,
+ "usamplerCube" => USamplerCube,
+ "uimageCube" => UImageCube,
+ "usampler2DRect" => USampler2DRect,
+ "uimage2DRect" => UImage2DRect,
+ "usampler1DArray" => USampler1DArray,
+ "uimage1DArray" => UImage1DArray,
+ "usampler2DArray" => USampler2DArray,
+ "uimage2DArray" => UImage2DArray,
+ "usamplerBuffer" => USamplerBuffer,
+ "uimageBuffer" => UImageBuffer,
+ "usampler2DMS" => USampler2DMS,
+ "uimage2DMS" => UImage2DMS,
+ "usamplerDMSArray" => USampler2DMSArray,
+ "uimage2DMSArray" => UImage2DMSArray,
+ "usamplerCubeArray" => USamplerCubeArray,
+ "uimageCubeArray" => UImageCubeArray,
+ _ => return None,
+ })
+ }
+
+ pub fn from_primitive_type_specifier(spec: &syntax::TypeSpecifierNonArray) -> Option<TypeKind> {
+ use TypeKind::*;
+ Some(match spec {
+ TypeSpecifierNonArray::Void => Void,
+ TypeSpecifierNonArray::Bool => Bool,
+ TypeSpecifierNonArray::Int => Int,
+ TypeSpecifierNonArray::UInt => UInt,
+ TypeSpecifierNonArray::Float => Float,
+ TypeSpecifierNonArray::Double => Double,
+ TypeSpecifierNonArray::Vec2 => Vec2,
+ TypeSpecifierNonArray::Vec3 => Vec3,
+ TypeSpecifierNonArray::Vec4 => Vec4,
+ TypeSpecifierNonArray::DVec2 => DVec2,
+ TypeSpecifierNonArray::DVec3 => DVec3,
+ TypeSpecifierNonArray::DVec4 => DVec4,
+ TypeSpecifierNonArray::BVec2 => BVec2,
+ TypeSpecifierNonArray::BVec3 => BVec3,
+ TypeSpecifierNonArray::BVec4 => BVec4,
+ TypeSpecifierNonArray::IVec2 => IVec2,
+ TypeSpecifierNonArray::IVec3 => IVec3,
+ TypeSpecifierNonArray::IVec4 => IVec4,
+ TypeSpecifierNonArray::UVec2 => UVec2,
+ TypeSpecifierNonArray::UVec3 => UVec3,
+ TypeSpecifierNonArray::UVec4 => UVec4,
+ TypeSpecifierNonArray::Mat2 => Mat2,
+ TypeSpecifierNonArray::Mat3 => Mat3,
+ TypeSpecifierNonArray::Mat4 => Mat4,
+ TypeSpecifierNonArray::Mat23 => Mat23,
+ TypeSpecifierNonArray::Mat24 => Mat24,
+ TypeSpecifierNonArray::Mat32 => Mat32,
+ TypeSpecifierNonArray::Mat34 => Mat34,
+ TypeSpecifierNonArray::Mat42 => Mat42,
+ TypeSpecifierNonArray::Mat43 => Mat43,
+ TypeSpecifierNonArray::DMat2 => DMat2,
+ TypeSpecifierNonArray::DMat3 => DMat3,
+ TypeSpecifierNonArray::DMat4 => DMat4,
+ TypeSpecifierNonArray::DMat23 => DMat23,
+ TypeSpecifierNonArray::DMat24 => DMat24,
+ TypeSpecifierNonArray::DMat32 => DMat32,
+ TypeSpecifierNonArray::DMat34 => DMat34,
+ TypeSpecifierNonArray::DMat42 => DMat42,
+ TypeSpecifierNonArray::DMat43 => DMat43,
+ TypeSpecifierNonArray::Sampler1D => Sampler1D,
+ TypeSpecifierNonArray::Image1D => Image1D,
+ TypeSpecifierNonArray::Sampler2D => Sampler2D,
+ TypeSpecifierNonArray::Image2D => Image2D,
+ TypeSpecifierNonArray::Sampler3D => Sampler3D,
+ TypeSpecifierNonArray::Image3D => Image3D,
+ TypeSpecifierNonArray::SamplerCube => SamplerCube,
+ TypeSpecifierNonArray::ImageCube => ImageCube,
+ TypeSpecifierNonArray::Sampler2DRect => Sampler2DRect,
+ TypeSpecifierNonArray::Image2DRect => Image2DRect,
+ TypeSpecifierNonArray::Sampler1DArray => Sampler1DArray,
+ TypeSpecifierNonArray::Image1DArray => Image1DArray,
+ TypeSpecifierNonArray::Sampler2DArray => Sampler2DArray,
+ TypeSpecifierNonArray::Image2DArray => Image2DArray,
+ TypeSpecifierNonArray::SamplerBuffer => SamplerBuffer,
+ TypeSpecifierNonArray::ImageBuffer => ImageBuffer,
+ TypeSpecifierNonArray::Sampler2DMS => Sampler2DMS,
+ TypeSpecifierNonArray::Image2DMS => Image2DMS,
+ TypeSpecifierNonArray::Sampler2DMSArray => Sampler2DMSArray,
+ TypeSpecifierNonArray::Image2DMSArray => Image2DMSArray,
+ TypeSpecifierNonArray::SamplerCubeArray => SamplerCubeArray,
+ TypeSpecifierNonArray::ImageCubeArray => ImageCubeArray,
+ TypeSpecifierNonArray::Sampler1DShadow => Sampler1DShadow,
+ TypeSpecifierNonArray::Sampler2DShadow => Sampler2DShadow,
+ TypeSpecifierNonArray::Sampler2DRectShadow => Sampler2DRectShadow,
+ TypeSpecifierNonArray::Sampler1DArrayShadow => Sampler1DArrayShadow,
+ TypeSpecifierNonArray::Sampler2DArrayShadow => Sampler2DArrayShadow,
+ TypeSpecifierNonArray::SamplerCubeShadow => SamplerCubeShadow,
+ TypeSpecifierNonArray::SamplerCubeArrayShadow => SamplerCubeArrayShadow,
+ TypeSpecifierNonArray::ISampler1D => ISampler1D,
+ TypeSpecifierNonArray::IImage1D => IImage1D,
+ TypeSpecifierNonArray::ISampler2D => ISampler2D,
+ TypeSpecifierNonArray::IImage2D => IImage2D,
+ TypeSpecifierNonArray::ISampler3D => ISampler3D,
+ TypeSpecifierNonArray::IImage3D => IImage3D,
+ TypeSpecifierNonArray::ISamplerCube => ISamplerCube,
+ TypeSpecifierNonArray::IImageCube => IImageCube,
+ TypeSpecifierNonArray::ISampler2DRect => ISampler2DRect,
+ TypeSpecifierNonArray::IImage2DRect => IImage2DRect,
+ TypeSpecifierNonArray::ISampler1DArray => ISampler1DArray,
+ TypeSpecifierNonArray::IImage1DArray => IImage1DArray,
+ TypeSpecifierNonArray::ISampler2DArray => ISampler2DArray,
+ TypeSpecifierNonArray::IImage2DArray => IImage2DArray,
+ TypeSpecifierNonArray::ISamplerBuffer => ISamplerBuffer,
+ TypeSpecifierNonArray::IImageBuffer => IImageBuffer,
+ TypeSpecifierNonArray::ISampler2DMS => ISampler2DMS,
+ TypeSpecifierNonArray::IImage2DMS => IImage2DMS,
+ TypeSpecifierNonArray::ISampler2DMSArray => ISampler2DMSArray,
+ TypeSpecifierNonArray::IImage2DMSArray => IImage2DMSArray,
+ TypeSpecifierNonArray::ISamplerCubeArray => ISamplerCubeArray,
+ TypeSpecifierNonArray::IImageCubeArray => IImageCubeArray,
+ TypeSpecifierNonArray::AtomicUInt => AtomicUInt,
+ TypeSpecifierNonArray::USampler1D => USampler1D,
+ TypeSpecifierNonArray::UImage1D => UImage1D,
+ TypeSpecifierNonArray::USampler2D => USampler2D,
+ TypeSpecifierNonArray::UImage2D => UImage2D,
+ TypeSpecifierNonArray::USampler3D => USampler3D,
+ TypeSpecifierNonArray::UImage3D => UImage3D,
+ TypeSpecifierNonArray::USamplerCube => USamplerCube,
+ TypeSpecifierNonArray::UImageCube => UImageCube,
+ TypeSpecifierNonArray::USampler2DRect => USampler2DRect,
+ TypeSpecifierNonArray::UImage2DRect => UImage2DRect,
+ TypeSpecifierNonArray::USampler1DArray => USampler1DArray,
+ TypeSpecifierNonArray::UImage1DArray => UImage1DArray,
+ TypeSpecifierNonArray::USampler2DArray => USampler2DArray,
+ TypeSpecifierNonArray::UImage2DArray => UImage2DArray,
+ TypeSpecifierNonArray::USamplerBuffer => USamplerBuffer,
+ TypeSpecifierNonArray::UImageBuffer => UImageBuffer,
+ TypeSpecifierNonArray::USampler2DMS => USampler2DMS,
+ TypeSpecifierNonArray::UImage2DMS => UImage2DMS,
+ TypeSpecifierNonArray::USampler2DMSArray => USampler2DMSArray,
+ TypeSpecifierNonArray::UImage2DMSArray => UImage2DMSArray,
+ TypeSpecifierNonArray::USamplerCubeArray => USamplerCubeArray,
+ TypeSpecifierNonArray::UImageCubeArray => UImageCubeArray,
+ TypeSpecifierNonArray::Struct(..) | TypeSpecifierNonArray::TypeName(..) => return None,
+ })
+ }
+}
+
+impl LiftFrom<&syntax::TypeSpecifierNonArray> for TypeKind {
+ fn lift(state: &mut State, spec: &syntax::TypeSpecifierNonArray) -> Self {
+ use TypeKind::*;
+ if let Some(kind) = TypeKind::from_primitive_type_specifier(spec) {
+ kind
+ } else {
+ match spec {
+ TypeSpecifierNonArray::Struct(s) => {
+ Struct(state.lookup(s.name.as_ref().unwrap().as_str()).unwrap())
+ }
+ TypeSpecifierNonArray::TypeName(s) => Struct(state.lookup(&s.0).unwrap()),
+ _ => unreachable!(),
+ }
+ }
+ }
+}
+
+#[derive(Clone, Debug, PartialEq)]
+pub struct Type {
+ pub kind: TypeKind,
+ pub precision: Option<PrecisionQualifier>,
+ pub array_sizes: Option<Box<ArraySizes>>,
+}
+
+impl Type {
+ pub fn new(kind: TypeKind) -> Self {
+ Type {
+ kind,
+ precision: None,
+ array_sizes: None,
+ }
+ }
+}
+
+impl LiftFrom<&syntax::FullySpecifiedType> for Type {
+ fn lift(state: &mut State, ty: &syntax::FullySpecifiedType) -> Self {
+ let kind = lift(state, &ty.ty.ty);
+ let array_sizes = match ty.ty.array_specifier.as_ref() {
+ Some(x) => Some(Box::new(lift(state, x))),
+ None => None,
+ };
+ let precision = get_precision(&ty.qualifier);
+ Type {
+ kind,
+ precision,
+ array_sizes,
+ }
+ }
+}
+
+impl LiftFrom<&syntax::TypeSpecifier> for Type {
+ fn lift(state: &mut State, ty: &syntax::TypeSpecifier) -> Self {
+ let kind = lift(state, &ty.ty);
+ let array_sizes = ty
+ .array_specifier
+ .as_ref()
+ .map(|x| Box::new(lift(state, x)));
+ Type {
+ kind,
+ precision: None,
+ array_sizes,
+ }
+ }
+}
+
+#[derive(Debug, Clone, PartialEq)]
+pub struct StructField {
+ pub ty: Type,
+ pub name: syntax::Identifier,
+}
+
+fn get_precision(qualifiers: &Option<syntax::TypeQualifier>) -> Option<PrecisionQualifier> {
+ let mut precision = None;
+ for qual in qualifiers.iter().flat_map(|x| x.qualifiers.0.iter()) {
+ match qual {
+ syntax::TypeQualifierSpec::Precision(p) => {
+ if precision.is_some() {
+ panic!("Multiple precisions");
+ }
+ precision = Some(p.clone());
+ }
+ _ => {}
+ }
+ }
+ precision
+}
+
+impl LiftFrom<&StructFieldSpecifier> for StructField {
+ fn lift(state: &mut State, f: &StructFieldSpecifier) -> Self {
+ let mut ty: Type = lift(state, &f.ty);
+ match &f.identifiers.0[..] {
+ [ident] => {
+ if let Some(a) = &ident.array_spec {
+ ty.array_sizes = Some(Box::new(lift(state, a)));
+ }
+ StructField {
+ ty,
+ name: ident.ident.clone(),
+ }
+ }
+ _ => panic!("bad number of identifiers"),
+ }
+ }
+}
+
+#[derive(Debug, Clone, PartialEq)]
+pub struct StructFields {
+ pub fields: Vec<StructField>,
+}
+
+impl LiftFrom<&StructSpecifier> for StructFields {
+ fn lift(state: &mut State, s: &StructSpecifier) -> Self {
+ let fields = s.fields.0.iter().map(|field| lift(state, field)).collect();
+ Self { fields }
+ }
+}
+
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
+pub enum RunClass {
+ Unknown,
+ Scalar,
+ Vector,
+ Dependent(u32),
+}
+
+impl RunClass {
+ pub fn merge(self, run_class: RunClass) -> RunClass {
+ match (self, run_class) {
+ (RunClass::Vector, _) | (_, RunClass::Vector) => RunClass::Vector,
+ (RunClass::Dependent(x), RunClass::Dependent(y)) => RunClass::Dependent(x | y),
+ (RunClass::Unknown, _) | (_, RunClass::Dependent(..)) => run_class,
+ _ => self,
+ }
+ }
+}
+
+#[derive(Debug, Clone, PartialEq)]
+pub enum SymDecl {
+ NativeFunction(FunctionType, Option<&'static str>),
+ UserFunction(Rc<FunctionDefinition>, RunClass),
+ Local(StorageClass, Type, RunClass),
+ Global(
+ StorageClass,
+ Option<syntax::InterpolationQualifier>,
+ Type,
+ RunClass,
+ ),
+ Struct(StructFields),
+}
+
+#[derive(Clone, Debug, PartialEq, Copy, Eq, Hash)]
+pub struct SymRef(u32);
+
+#[derive(Debug)]
+struct Scope {
+ name: String,
+ names: HashMap<String, SymRef>,
+}
+impl Scope {
+ fn new(name: String) -> Self {
+ Scope {
+ name,
+ names: HashMap::new(),
+ }
+ }
+}
+
+#[derive(Clone, Debug, PartialEq)]
+pub struct TexelFetchOffsets {
+ pub min_x: i32,
+ pub max_x: i32,
+ pub min_y: i32,
+ pub max_y: i32,
+}
+
+impl TexelFetchOffsets {
+ fn new(x: i32, y: i32) -> Self {
+ TexelFetchOffsets {
+ min_x: x,
+ max_x: x,
+ min_y: y,
+ max_y: y,
+ }
+ }
+
+ fn add_offset(&mut self, x: i32, y: i32) {
+ self.min_x = self.min_x.min(x);
+ self.max_x = self.max_x.max(x);
+ self.min_y = self.min_y.min(y);
+ self.max_y = self.max_y.max(y);
+ }
+}
+
+#[derive(Debug)]
+pub struct State {
+ scopes: Vec<Scope>,
+ syms: Vec<RefCell<Symbol>>,
+ in_function: Option<SymRef>,
+ run_class_changed: Cell<bool>,
+ last_declaration: SymRef,
+ branch_run_class: RunClass,
+ branch_declaration: SymRef,
+ modified_globals: RefCell<Vec<SymRef>>,
+ pub used_globals: RefCell<Vec<SymRef>>,
+ pub texel_fetches: HashMap<(SymRef, SymRef), TexelFetchOffsets>,
+}
+
+impl State {
+ pub fn new() -> Self {
+ State {
+ scopes: Vec::new(),
+ syms: Vec::new(),
+ in_function: None,
+ run_class_changed: Cell::new(false),
+ last_declaration: SymRef(0),
+ branch_run_class: RunClass::Unknown,
+ branch_declaration: SymRef(0),
+ modified_globals: RefCell::new(Vec::new()),
+ used_globals: RefCell::new(Vec::new()),
+ texel_fetches: HashMap::new(),
+ }
+ }
+
+ pub fn lookup(&self, name: &str) -> Option<SymRef> {
+ for s in self.scopes.iter().rev() {
+ if let Some(sym) = s.names.get(name) {
+ return Some(*sym);
+ }
+ }
+ return None;
+ }
+
+ fn declare(&mut self, name: &str, decl: SymDecl) -> SymRef {
+ let s = SymRef(self.syms.len() as u32);
+ self.syms.push(RefCell::new(Symbol {
+ name: name.into(),
+ decl,
+ }));
+ self.scopes.last_mut().unwrap().names.insert(name.into(), s);
+ s
+ }
+
+ pub fn sym(&self, sym: SymRef) -> Ref<Symbol> {
+ self.syms[sym.0 as usize].borrow()
+ }
+
+ pub fn sym_mut(&mut self, sym: SymRef) -> &mut Symbol {
+ self.syms[sym.0 as usize].get_mut()
+ }
+
+ pub fn lookup_sym_mut(&mut self, name: &str) -> Option<&mut Symbol> {
+ self.lookup(name)
+ .map(move |x| self.syms[x.0 as usize].get_mut())
+ }
+
+ fn push_scope(&mut self, name: String) {
+ self.scopes.push(Scope::new(name));
+ }
+ fn pop_scope(&mut self) {
+ self.scopes.pop();
+ }
+
+ fn return_run_class(&self, mut new_run_class: RunClass) {
+ new_run_class = self.branch_run_class.merge(new_run_class);
+ if let Some(sym) = self.in_function {
+ let mut b = self.syms[sym.0 as usize].borrow_mut();
+ if let SymDecl::UserFunction(_, ref mut run_class) = b.decl {
+ *run_class = run_class.merge(new_run_class);
+ }
+ }
+ }
+
+ pub fn function_definition(&self, name: SymRef) -> Option<(Rc<FunctionDefinition>, RunClass)> {
+ if let SymDecl::UserFunction(ref fd, ref run_class) = &self.sym(name).decl {
+ Some((fd.clone(), *run_class))
+ } else {
+ None
+ }
+ }
+
+ fn merge_run_class(&self, sym: SymRef, mut new_run_class: RunClass) -> RunClass {
+ if sym.0 <= self.branch_declaration.0 {
+ new_run_class = self.branch_run_class.merge(new_run_class);
+ }
+ let mut b = self.syms[sym.0 as usize].borrow_mut();
+ let mut old_run_class = new_run_class;
+ if let SymDecl::Local(_, _, ref mut run_class) = b.decl {
+ old_run_class = *run_class;
+ new_run_class = old_run_class.merge(new_run_class);
+ *run_class = new_run_class;
+ }
+ if old_run_class != RunClass::Unknown && old_run_class != new_run_class {
+ self.run_class_changed.set(true);
+ }
+ new_run_class
+ }
+}
+
+/// A declaration.
+#[derive(Clone, Debug, PartialEq)]
+pub enum Declaration {
+ FunctionPrototype(FunctionPrototype),
+ StructDefinition(SymRef),
+ InitDeclaratorList(InitDeclaratorList),
+ Precision(PrecisionQualifier, TypeSpecifier),
+ Block(Block),
+ Global(TypeQualifier, Vec<Identifier>),
+}
+
+/// A general purpose block, containing fields and possibly a list of declared identifiers. Semantic
+/// is given with the storage qualifier.
+#[derive(Clone, Debug, PartialEq)]
+pub struct Block {
+ pub qualifier: TypeQualifier,
+ pub name: Identifier,
+ pub fields: Vec<StructFieldSpecifier>,
+ pub identifier: Option<ArrayedIdentifier>,
+}
+
+/// Function identifier.
+#[derive(Clone, Debug, PartialEq)]
+pub enum FunIdentifier {
+ Identifier(SymRef),
+ Constructor(Type),
+}
+
+/// Function prototype.
+#[derive(Clone, Debug, PartialEq)]
+pub struct FunctionPrototype {
+ pub ty: Type,
+ pub name: Identifier,
+ pub parameters: Vec<FunctionParameterDeclaration>,
+}
+
+impl FunctionPrototype {
+ pub fn has_parameter(&self, sym: SymRef) -> bool {
+ for param in &self.parameters {
+ match param {
+ FunctionParameterDeclaration::Named(_, ref d) => {
+ if d.sym == sym {
+ return true;
+ }
+ }
+ _ => {}
+ }
+ }
+ false
+ }
+}
+
+/// Function parameter declaration.
+#[derive(Clone, Debug, PartialEq)]
+pub enum FunctionParameterDeclaration {
+ Named(Option<ParameterQualifier>, FunctionParameterDeclarator),
+ Unnamed(Option<ParameterQualifier>, TypeSpecifier),
+}
+
+/// Function parameter declarator.
+#[derive(Clone, Debug, PartialEq)]
+pub struct FunctionParameterDeclarator {
+ pub ty: Type,
+ pub name: Identifier,
+ pub sym: SymRef,
+}
+
+/// Init declarator list.
+#[derive(Clone, Debug, PartialEq)]
+pub struct InitDeclaratorList {
+ // XXX it feels like separating out the type and the names is better than
+ // head and tail
+ // Also, it might be nice to separate out type definitions from name definitions
+ pub head: SingleDeclaration,
+ pub tail: Vec<SingleDeclarationNoType>,
+}
+
+/// Type qualifier.
+#[derive(Clone, Debug, PartialEq)]
+pub struct TypeQualifier {
+ pub qualifiers: NonEmpty<TypeQualifierSpec>,
+}
+
+fn lift_type_qualifier_for_declaration(
+ _state: &mut State,
+ q: &Option<syntax::TypeQualifier>,
+) -> Option<TypeQualifier> {
+ q.as_ref().and_then(|x| {
+ NonEmpty::from_non_empty_iter(x.qualifiers.0.iter().flat_map(|x| match x {
+ syntax::TypeQualifierSpec::Precision(_) => None,
+ syntax::TypeQualifierSpec::Interpolation(_) => None,
+ syntax::TypeQualifierSpec::Invariant => Some(TypeQualifierSpec::Invariant),
+ syntax::TypeQualifierSpec::Layout(l) => Some(TypeQualifierSpec::Layout(l.clone())),
+ syntax::TypeQualifierSpec::Precise => Some(TypeQualifierSpec::Precise),
+ syntax::TypeQualifierSpec::Storage(_) => None,
+ }))
+ .map(|x| TypeQualifier { qualifiers: x })
+ })
+}
+
+fn lift_type_qualifier_for_parameter(
+ _state: &mut State,
+ q: &Option<syntax::TypeQualifier>,
+) -> Option<ParameterQualifier> {
+ let mut qp: Option<ParameterQualifier> = None;
+ if let Some(q) = q {
+ for x in &q.qualifiers.0 {
+ match (&qp, x) {
+ (None, syntax::TypeQualifierSpec::Storage(s)) => match s {
+ syntax::StorageQualifier::Const => qp = Some(ParameterQualifier::Const),
+ syntax::StorageQualifier::In => qp = Some(ParameterQualifier::In),
+ syntax::StorageQualifier::Out => qp = Some(ParameterQualifier::Out),
+ syntax::StorageQualifier::InOut => qp = Some(ParameterQualifier::InOut),
+ _ => panic!("Bad storage qualifier for parameter"),
+ },
+ (_, syntax::TypeQualifierSpec::Precision(_)) => {}
+ _ => panic!("Bad parameter qualifier {:?}", x),
+ }
+ }
+ }
+ qp
+}
+
+#[derive(Clone, Debug, PartialEq)]
+pub enum ParameterQualifier {
+ Const,
+ In,
+ InOut,
+ Out,
+}
+
+#[derive(Clone, Debug, PartialEq)]
+pub enum MemoryQualifier {
+ Coherent,
+ Volatile,
+ Restrict,
+ ReadOnly,
+ WriteOnly,
+}
+
+/// Type qualifier spec.
+#[derive(Clone, Debug, PartialEq)]
+pub enum TypeQualifierSpec {
+ Layout(syntax::LayoutQualifier),
+ Invariant,
+ Parameter(ParameterQualifier),
+ Memory(MemoryQualifier),
+ Precise,
+}
+
+/// Single declaration.
+#[derive(Clone, Debug, PartialEq)]
+pub struct SingleDeclaration {
+ pub ty: Type,
+ pub ty_def: Option<SymRef>,
+ pub qualifier: Option<TypeQualifier>,
+ pub name: SymRef,
+ pub initializer: Option<Initializer>,
+}
+
+/// A single declaration with implicit, already-defined type.
+#[derive(Clone, Debug, PartialEq)]
+pub struct SingleDeclarationNoType {
+ pub ident: ArrayedIdentifier,
+ pub initializer: Option<Initializer>,
+}
+
+/// Initializer.
+#[derive(Clone, Debug, PartialEq)]
+pub enum Initializer {
+ Simple(Box<Expr>),
+ List(NonEmpty<Initializer>),
+}
+
+impl From<Expr> for Initializer {
+ fn from(e: Expr) -> Self {
+ Initializer::Simple(Box::new(e))
+ }
+}
+
+#[derive(Clone, Debug, PartialEq)]
+pub struct Expr {
+ pub kind: ExprKind,
+ pub ty: Type,
+}
+
+#[derive(Clone, Debug, PartialEq)]
+pub enum FieldSet {
+ Rgba,
+ Xyzw,
+ Stpq,
+}
+
+#[derive(Clone, Debug, PartialEq)]
+pub struct SwizzleSelector {
+ pub field_set: FieldSet,
+ pub components: Vec<i8>,
+}
+
+impl SwizzleSelector {
+ fn parse(s: &str) -> Self {
+ let mut components = Vec::new();
+ let mut field_set = Vec::new();
+
+ for c in s.chars() {
+ match c {
+ 'r' => {
+ components.push(0);
+ field_set.push(FieldSet::Rgba);
+ }
+ 'x' => {
+ components.push(0);
+ field_set.push(FieldSet::Xyzw);
+ }
+ 's' => {
+ components.push(0);
+ field_set.push(FieldSet::Stpq);
+ }
+
+ 'g' => {
+ components.push(1);
+ field_set.push(FieldSet::Rgba);
+ }
+ 'y' => {
+ components.push(1);
+ field_set.push(FieldSet::Xyzw);
+ }
+ 't' => {
+ components.push(1);
+ field_set.push(FieldSet::Stpq);
+ }
+
+ 'b' => {
+ components.push(2);
+ field_set.push(FieldSet::Rgba);
+ }
+ 'z' => {
+ components.push(2);
+ field_set.push(FieldSet::Xyzw);
+ }
+ 'p' => {
+ components.push(2);
+ field_set.push(FieldSet::Stpq);
+ }
+
+ 'a' => {
+ components.push(3);
+ field_set.push(FieldSet::Rgba);
+ }
+ 'w' => {
+ components.push(3);
+ field_set.push(FieldSet::Xyzw);
+ }
+ 'q' => {
+ components.push(3);
+ field_set.push(FieldSet::Stpq);
+ }
+ _ => panic!("bad selector"),
+ }
+ }
+
+ let first = &field_set[0];
+ assert!(field_set.iter().all(|item| item == first));
+ assert!(components.len() <= 4);
+ SwizzleSelector {
+ field_set: first.clone(),
+ components,
+ }
+ }
+
+ pub fn to_string(&self) -> String {
+ let mut s = String::new();
+ let fs = match self.field_set {
+ FieldSet::Rgba => ['r', 'g', 'b', 'a'],
+ FieldSet::Xyzw => ['x', 'y', 'z', 'w'],
+ FieldSet::Stpq => ['s', 't', 'p', 'q'],
+ };
+ for i in &self.components {
+ s.push(fs[*i as usize])
+ }
+ s
+ }
+}
+
+/// The most general form of an expression. As you can see if you read the variant list, in GLSL, an
+/// assignment is an expression. This is a bit silly but think of an assignment as a statement first
+/// then an expression which evaluates to what the statement “returns”.
+///
+/// An expression is either an assignment or a list (comma) of assignments.
+#[derive(Clone, Debug, PartialEq)]
+pub enum ExprKind {
+ /// A variable expression, using an identifier.
+ Variable(SymRef),
+ /// Integral constant expression.
+ IntConst(i32),
+ /// Unsigned integral constant expression.
+ UIntConst(u32),
+ /// Boolean constant expression.
+ BoolConst(bool),
+ /// Single precision floating expression.
+ FloatConst(f32),
+ /// Double precision floating expression.
+ DoubleConst(f64),
+ /// A unary expression, gathering a single expression and a unary operator.
+ Unary(UnaryOp, Box<Expr>),
+ /// A binary expression, gathering two expressions and a binary operator.
+ Binary(BinaryOp, Box<Expr>, Box<Expr>),
+ /// A ternary conditional expression, gathering three expressions.
+ Ternary(Box<Expr>, Box<Expr>, Box<Expr>),
+ /// An assignment is also an expression. Gathers an expression that defines what to assign to, an
+ /// assignment operator and the value to associate with.
+ Assignment(Box<Expr>, AssignmentOp, Box<Expr>),
+ /// Add an array specifier to an expression.
+ Bracket(Box<Expr>, Box<Expr>),
+ /// A functional call. It has a function identifier and a list of expressions (arguments).
+ FunCall(FunIdentifier, Vec<Expr>),
+ /// An expression associated with a field selection (struct).
+ Dot(Box<Expr>, Identifier),
+ /// An expression associated with a component selection
+ SwizzleSelector(Box<Expr>, SwizzleSelector),
+ /// Post-incrementation of an expression.
+ PostInc(Box<Expr>),
+ /// Post-decrementation of an expression.
+ PostDec(Box<Expr>),
+ /// An expression that contains several, separated with comma.
+ Comma(Box<Expr>, Box<Expr>),
+ /// A temporary condition variable
+ Cond(usize, Box<Expr>),
+ CondMask,
+}
+
+/*
+impl From<i32> for Expr {
+ fn from(x: i32) -> Expr {
+ ExprKind::IntConst(x)
+ }
+}
+
+impl From<u32> for Expr {
+ fn from(x: u32) -> Expr {
+ Expr::UIntConst(x)
+ }
+}
+
+impl From<bool> for Expr {
+ fn from(x: bool) -> Expr {
+ Expr::BoolConst(x)
+ }
+}
+
+impl From<f32> for Expr {
+ fn from(x: f32) -> Expr {
+ Expr::FloatConst(x)
+ }
+}
+
+impl From<f64> for Expr {
+ fn from(x: f64) -> Expr {
+ Expr::DoubleConst(x)
+ }
+}
+*/
+/// Starting rule.
+#[derive(Clone, Debug, PartialEq)]
+pub struct TranslationUnit(pub NonEmpty<ExternalDeclaration>);
+
+impl TranslationUnit {
+ /// Construct a translation unit from an iterator.
+ ///
+ /// # Errors
+ ///
+ /// `None` if the iterator yields no value.
+ pub fn from_iter<I>(iter: I) -> Option<Self>
+ where
+ I: IntoIterator<Item = ExternalDeclaration>,
+ {
+ NonEmpty::from_non_empty_iter(iter).map(TranslationUnit)
+ }
+}
+
+impl Deref for TranslationUnit {
+ type Target = NonEmpty<ExternalDeclaration>;
+
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+
+impl DerefMut for TranslationUnit {
+ fn deref_mut(&mut self) -> &mut Self::Target {
+ &mut self.0
+ }
+}
+
+impl IntoIterator for TranslationUnit {
+ type IntoIter = <NonEmpty<ExternalDeclaration> as IntoIterator>::IntoIter;
+ type Item = ExternalDeclaration;
+
+ fn into_iter(self) -> Self::IntoIter {
+ self.0.into_iter()
+ }
+}
+
+impl<'a> IntoIterator for &'a TranslationUnit {
+ type IntoIter = <&'a NonEmpty<ExternalDeclaration> as IntoIterator>::IntoIter;
+ type Item = &'a ExternalDeclaration;
+
+ fn into_iter(self) -> Self::IntoIter {
+ (&self.0).into_iter()
+ }
+}
+
+impl<'a> IntoIterator for &'a mut TranslationUnit {
+ type IntoIter = <&'a mut NonEmpty<ExternalDeclaration> as IntoIterator>::IntoIter;
+ type Item = &'a mut ExternalDeclaration;
+
+ fn into_iter(self) -> Self::IntoIter {
+ (&mut self.0).into_iter()
+ }
+}
+
+/// External declaration.
+#[derive(Clone, Debug, PartialEq)]
+pub enum ExternalDeclaration {
+ Preprocessor(syntax::Preprocessor),
+ FunctionDefinition(Rc<FunctionDefinition>),
+ Declaration(Declaration),
+}
+
+/// Function definition.
+#[derive(Clone, Debug, PartialEq)]
+pub struct FunctionDefinition {
+ pub prototype: FunctionPrototype,
+ pub body: CompoundStatement,
+ pub globals: Vec<SymRef>,
+ pub texel_fetches: HashMap<(SymRef, SymRef), TexelFetchOffsets>,
+}
+
+/// Compound statement (with no new scope).
+#[derive(Clone, Debug, PartialEq)]
+pub struct CompoundStatement {
+ pub statement_list: Vec<Statement>,
+}
+
+impl CompoundStatement {
+ pub fn new() -> Self {
+ CompoundStatement {
+ statement_list: Vec::new(),
+ }
+ }
+}
+
+impl FromIterator<Statement> for CompoundStatement {
+ fn from_iter<T>(iter: T) -> Self
+ where
+ T: IntoIterator<Item = Statement>,
+ {
+ CompoundStatement {
+ statement_list: iter.into_iter().collect(),
+ }
+ }
+}
+
+/// Statement.
+#[derive(Clone, Debug, PartialEq)]
+pub enum Statement {
+ Compound(Box<CompoundStatement>),
+ Simple(Box<SimpleStatement>),
+}
+
+/// Simple statement.
+#[derive(Clone, Debug, PartialEq)]
+pub enum SimpleStatement {
+ Declaration(Declaration),
+ Expression(ExprStatement),
+ Selection(SelectionStatement),
+ Switch(SwitchStatement),
+ Iteration(IterationStatement),
+ Jump(JumpStatement),
+}
+
+impl SimpleStatement {
+ /// Create a new expression statement.
+ pub fn new_expr<E>(expr: E) -> Self
+ where
+ E: Into<Expr>,
+ {
+ SimpleStatement::Expression(Some(expr.into()))
+ }
+
+ /// Create a new selection statement (if / else).
+ pub fn new_if_else<If, True, False>(ife: If, truee: True, falsee: False) -> Self
+ where
+ If: Into<Expr>,
+ True: Into<Statement>,
+ False: Into<Statement>,
+ {
+ SimpleStatement::Selection(SelectionStatement {
+ cond: Box::new(ife.into()),
+ body: Box::new(truee.into()),
+ else_stmt: Some(Box::new(falsee.into())),
+ })
+ }
+
+ /// Create a new while statement.
+ pub fn new_while<C, S>(cond: C, body: S) -> Self
+ where
+ C: Into<Condition>,
+ S: Into<Statement>,
+ {
+ SimpleStatement::Iteration(IterationStatement::While(
+ cond.into(),
+ Box::new(body.into()),
+ ))
+ }
+
+ /// Create a new do-while statement.
+ pub fn new_do_while<C, S>(body: S, cond: C) -> Self
+ where
+ S: Into<Statement>,
+ C: Into<Expr>,
+ {
+ SimpleStatement::Iteration(IterationStatement::DoWhile(
+ Box::new(body.into()),
+ Box::new(cond.into()),
+ ))
+ }
+}
+
+/// Expression statement.
+pub type ExprStatement = Option<Expr>;
+
+/// Selection statement.
+#[derive(Clone, Debug, PartialEq)]
+pub struct SelectionStatement {
+ pub cond: Box<Expr>,
+ pub body: Box<Statement>,
+ // the else branch
+ pub else_stmt: Option<Box<Statement>>,
+}
+
+/// Condition.
+#[derive(Clone, Debug, PartialEq)]
+pub enum Condition {
+ Expr(Box<Expr>),
+}
+
+impl From<Expr> for Condition {
+ fn from(expr: Expr) -> Self {
+ Condition::Expr(Box::new(expr))
+ }
+}
+
+/// Switch statement.
+#[derive(Clone, Debug, PartialEq)]
+pub struct SwitchStatement {
+ pub head: Box<Expr>,
+ pub cases: Vec<Case>,
+}
+
+/// Case label statement.
+#[derive(Clone, Debug, PartialEq)]
+pub enum CaseLabel {
+ Case(Box<Expr>),
+ Def,
+}
+
+/// An individual case
+#[derive(Clone, Debug, PartialEq)]
+pub struct Case {
+ pub label: CaseLabel,
+ pub stmts: Vec<Statement>,
+}
+
+/// Iteration statement.
+#[derive(Clone, Debug, PartialEq)]
+pub enum IterationStatement {
+ While(Condition, Box<Statement>),
+ DoWhile(Box<Statement>, Box<Expr>),
+ For(ForInitStatement, ForRestStatement, Box<Statement>),
+}
+
+/// For init statement.
+#[derive(Clone, Debug, PartialEq)]
+pub enum ForInitStatement {
+ Expression(Option<Expr>),
+ Declaration(Box<Declaration>),
+}
+
+/// For init statement.
+#[derive(Clone, Debug, PartialEq)]
+pub struct ForRestStatement {
+ pub condition: Option<Condition>,
+ pub post_expr: Option<Box<Expr>>,
+}
+
+/// Jump statement.
+#[derive(Clone, Debug, PartialEq)]
+pub enum JumpStatement {
+ Continue,
+ Break,
+ Return(Option<Box<Expr>>),
+ Discard,
+}
+
+trait NonEmptyExt<T> {
+ fn map<U, F: FnMut(&mut State, &T) -> U>(&self, s: &mut State, f: F) -> NonEmpty<U>;
+ fn new(x: T) -> NonEmpty<T>;
+}
+
+impl<T> NonEmptyExt<T> for NonEmpty<T> {
+ fn map<U, F: FnMut(&mut State, &T) -> U>(&self, s: &mut State, mut f: F) -> NonEmpty<U> {
+ NonEmpty::from_non_empty_iter(self.into_iter().map(|x| f(s, &x))).unwrap()
+ }
+ fn new(x: T) -> NonEmpty<T> {
+ NonEmpty::from_non_empty_iter(vec![x].into_iter()).unwrap()
+ }
+}
+
+fn translate_initializater(state: &mut State, i: &syntax::Initializer) -> Initializer {
+ match i {
+ syntax::Initializer::Simple(i) => {
+ Initializer::Simple(Box::new(translate_expression(state, i)))
+ }
+ _ => panic!(),
+ }
+}
+
+fn translate_struct_declaration(state: &mut State, d: &syntax::SingleDeclaration) -> Declaration {
+ let ty = d.ty.clone();
+ let ty_def = match &ty.ty.ty {
+ TypeSpecifierNonArray::Struct(s) => {
+ let decl = SymDecl::Struct(lift(state, s));
+ Some(state.declare(s.name.as_ref().unwrap().as_str(), decl))
+ }
+ _ => None,
+ };
+
+ let ty_def = ty_def.expect("Must be type definition");
+
+ Declaration::StructDefinition(ty_def)
+}
+
+fn get_expr_index(e: &syntax::Expr) -> i32 {
+ match e {
+ syntax::Expr::IntConst(i) => *i,
+ syntax::Expr::UIntConst(u) => *u as i32,
+ syntax::Expr::FloatConst(f) => *f as i32,
+ syntax::Expr::DoubleConst(f) => *f as i32,
+ _ => panic!(),
+ }
+}
+
+fn translate_variable_declaration(
+ state: &mut State,
+ d: &syntax::InitDeclaratorList,
+ default_run_class: RunClass,
+) -> Declaration {
+ let mut ty = d.head.ty.clone();
+ ty.ty.array_specifier = d.head.array_specifier.clone();
+ let ty_def = match &ty.ty.ty {
+ TypeSpecifierNonArray::Struct(s) => {
+ let decl = SymDecl::Struct(lift(state, s));
+ Some(state.declare(s.name.as_ref().unwrap().as_str(), decl))
+ }
+ _ => None,
+ };
+
+ let mut ty: Type = lift(state, &d.head.ty);
+ if let Some(array) = &d.head.array_specifier {
+ ty.array_sizes = Some(Box::new(lift(state, array)))
+ }
+
+ let (sym, decl) = match d.head.name.as_ref() {
+ Some(name) => {
+ let mut storage = StorageClass::None;
+ let mut interpolation = None;
+ for qual in d
+ .head
+ .ty
+ .qualifier
+ .iter()
+ .flat_map(|x| x.qualifiers.0.iter())
+ {
+ match qual {
+ syntax::TypeQualifierSpec::Storage(s) => match (&storage, s) {
+ (StorageClass::FragColor(..), syntax::StorageQualifier::Out) => {}
+ (StorageClass::Sampler(..), syntax::StorageQualifier::Uniform) => {}
+ (StorageClass::None, syntax::StorageQualifier::Out) => {
+ storage = StorageClass::Out;
+ }
+ (StorageClass::None, syntax::StorageQualifier::In) => {
+ storage = StorageClass::In;
+ }
+ (StorageClass::None, syntax::StorageQualifier::Uniform) => {
+ if ty.kind.is_sampler() {
+ storage = StorageClass::Sampler(SamplerFormat::Unknown);
+ } else {
+ storage = StorageClass::Uniform;
+ }
+ }
+ (StorageClass::None, syntax::StorageQualifier::Const) => {
+ storage = StorageClass::Const;
+ }
+ _ => panic!("bad storage {:?}", (storage, s)),
+ },
+ syntax::TypeQualifierSpec::Interpolation(i) => match (&interpolation, i) {
+ (None, i) => interpolation = Some(i.clone()),
+ _ => panic!("multiple interpolation"),
+ },
+ syntax::TypeQualifierSpec::Layout(l) => {
+ let mut loc = -1;
+ let mut index = -1;
+ for id in &l.ids {
+ match id {
+ syntax::LayoutQualifierSpec::Identifier(ref key, None) => {
+ match key.as_str() {
+ "rgba8" => {
+ storage = StorageClass::Sampler(SamplerFormat::RGBA8);
+ }
+ "rgba32f" => {
+ storage = StorageClass::Sampler(SamplerFormat::RGBA32F);
+ }
+ "rgba32i" => {
+ storage = StorageClass::Sampler(SamplerFormat::RGBA32I);
+ }
+ "r8" => {
+ storage = StorageClass::Sampler(SamplerFormat::R8);
+ }
+ _ => {}
+ }
+ }
+ syntax::LayoutQualifierSpec::Identifier(ref key, Some(ref e)) => {
+ match key.as_str() {
+ "location" => {
+ loc = get_expr_index(e);
+ }
+ "index" => {
+ index = get_expr_index(e);
+ }
+ _ => {}
+ }
+ }
+ _ => {}
+ }
+ }
+ if index >= 0 {
+ assert!(loc == 0);
+ assert!(index <= 1);
+ assert!(storage == StorageClass::None);
+ storage = StorageClass::FragColor(index);
+ }
+ }
+ _ => {}
+ }
+ }
+ let decl = if state.in_function.is_some() {
+ let run_class = match storage {
+ StorageClass::Const => RunClass::Scalar,
+ StorageClass::None => default_run_class,
+ _ => panic!("bad local storage {:?}", storage),
+ };
+ SymDecl::Local(storage, ty.clone(), run_class)
+ } else {
+ let run_class = match storage {
+ StorageClass::Const | StorageClass::Uniform | StorageClass::Sampler(..) => {
+ RunClass::Scalar
+ }
+ StorageClass::In | StorageClass::Out | StorageClass::FragColor(..)
+ if interpolation == Some(syntax::InterpolationQualifier::Flat) =>
+ {
+ RunClass::Scalar
+ }
+ _ => RunClass::Vector,
+ };
+ SymDecl::Global(storage, interpolation, ty.clone(), run_class)
+ };
+ (state.declare(name.as_str(), decl.clone()), decl)
+ }
+ None => panic!(),
+ };
+
+ let head = SingleDeclaration {
+ qualifier: lift_type_qualifier_for_declaration(state, &d.head.ty.qualifier),
+ name: sym,
+ ty,
+ ty_def,
+ initializer: d
+ .head
+ .initializer
+ .as_ref()
+ .map(|x| translate_initializater(state, x)),
+ };
+
+ let tail = d
+ .tail
+ .iter()
+ .map(|d| {
+ if let Some(_array) = &d.ident.array_spec {
+ panic!("unhandled array")
+ }
+ state.declare(d.ident.ident.as_str(), decl.clone());
+ SingleDeclarationNoType {
+ ident: d.ident.clone(),
+ initializer: d
+ .initializer
+ .as_ref()
+ .map(|x| translate_initializater(state, x)),
+ }
+ })
+ .collect();
+ Declaration::InitDeclaratorList(InitDeclaratorList { head, tail })
+}
+
+fn translate_init_declarator_list(
+ state: &mut State,
+ l: &syntax::InitDeclaratorList,
+ default_run_class: RunClass,
+) -> Declaration {
+ match &l.head.name {
+ Some(_name) => translate_variable_declaration(state, l, default_run_class),
+ None => translate_struct_declaration(state, &l.head),
+ }
+}
+
+fn translate_declaration(
+ state: &mut State,
+ d: &syntax::Declaration,
+ default_run_class: RunClass,
+) -> Declaration {
+ match d {
+ syntax::Declaration::Block(_) => panic!(), //Declaration::Block(..),
+ syntax::Declaration::FunctionPrototype(p) => {
+ Declaration::FunctionPrototype(translate_function_prototype(state, p))
+ }
+ syntax::Declaration::Global(_ty, _ids) => {
+ panic!();
+ // glsl non-es supports requalifying variables
+ // we don't right now
+ //Declaration::Global(..)
+ }
+ syntax::Declaration::InitDeclaratorList(dl) => {
+ translate_init_declarator_list(state, dl, default_run_class)
+ }
+ syntax::Declaration::Precision(p, ts) => Declaration::Precision(p.clone(), ts.clone()),
+ }
+}
+
+fn is_vector(ty: &Type) -> bool {
+ match ty.kind {
+ TypeKind::Vec2
+ | TypeKind::Vec3
+ | TypeKind::Vec4
+ | TypeKind::IVec2
+ | TypeKind::IVec3
+ | TypeKind::IVec4 => ty.array_sizes == None,
+ _ => false,
+ }
+}
+
+fn index_matrix(ty: &Type) -> Option<TypeKind> {
+ use TypeKind::*;
+ if ty.array_sizes != None {
+ return None;
+ }
+ Some(match ty.kind {
+ Mat2 => Vec2,
+ Mat3 => Vec3,
+ Mat4 => Vec4,
+ Mat23 => Vec3,
+ Mat24 => Vec4,
+ Mat32 => Vec2,
+ Mat34 => Vec4,
+ Mat42 => Vec2,
+ Mat43 => Vec3,
+ DMat2 => DVec2,
+ DMat3 => DVec3,
+ DMat4 => DVec4,
+ DMat23 => DVec3,
+ DMat24 => DVec4,
+ DMat32 => DVec2,
+ DMat34 => DVec4,
+ DMat42 => DVec2,
+ DMat43 => DVec3,
+ _ => return None,
+ })
+}
+
+fn is_ivec(ty: &Type) -> bool {
+ match ty.kind {
+ TypeKind::IVec2 | TypeKind::IVec3 | TypeKind::IVec4 => ty.array_sizes == None,
+ _ => false,
+ }
+}
+
+fn compatible_type(lhs: &Type, rhs: &Type) -> bool {
+ // XXX: use an underlying type helper
+ if lhs == &Type::new(TypeKind::Double) && rhs == &Type::new(TypeKind::Float) {
+ true
+ } else if rhs == &Type::new(TypeKind::Double) && lhs == &Type::new(TypeKind::Float) {
+ true
+ } else if rhs == &Type::new(TypeKind::Int) &&
+ (lhs == &Type::new(TypeKind::Float) || lhs == &Type::new(TypeKind::Double))
+ {
+ true
+ } else if (rhs == &Type::new(TypeKind::Float) || rhs == &Type::new(TypeKind::Double)) &&
+ lhs == &Type::new(TypeKind::Int)
+ {
+ true
+ } else if (rhs == &Type::new(TypeKind::Vec2) || rhs == &Type::new(TypeKind::DVec2)) &&
+ lhs == &Type::new(TypeKind::IVec2)
+ {
+ true
+ } else if rhs == &Type::new(TypeKind::IVec2) &&
+ (lhs == &Type::new(TypeKind::Vec2) || lhs == &Type::new(TypeKind::DVec2))
+ {
+ true
+ } else {
+ lhs.kind == rhs.kind && lhs.array_sizes == rhs.array_sizes
+ }
+}
+
+fn promoted_type(lhs: &Type, rhs: &Type) -> Type {
+ if lhs == &Type::new(TypeKind::Double) && rhs == &Type::new(TypeKind::Float) {
+ Type::new(TypeKind::Double)
+ } else if lhs == &Type::new(TypeKind::Float) && rhs == &Type::new(TypeKind::Double) {
+ Type::new(TypeKind::Double)
+ } else if lhs == &Type::new(TypeKind::Int) && rhs == &Type::new(TypeKind::Double) {
+ Type::new(TypeKind::Double)
+ } else if is_vector(&lhs) &&
+ (rhs == &Type::new(TypeKind::Float) ||
+ rhs == &Type::new(TypeKind::Double) ||
+ rhs == &Type::new(TypeKind::Int))
+ {
+ // scalars promote to vectors
+ lhs.clone()
+ } else if is_vector(&rhs) &&
+ (lhs == &Type::new(TypeKind::Float) ||
+ lhs == &Type::new(TypeKind::Double) ||
+ lhs == &Type::new(TypeKind::Int))
+ {
+ // scalars promote to vectors
+ rhs.clone()
+ } else if lhs == rhs {
+ lhs.clone()
+ } else if lhs.kind == rhs.kind {
+ if lhs.array_sizes == rhs.array_sizes {
+ // XXX: we need to be able to query the default precision here
+ match (&lhs.precision, &rhs.precision) {
+ (Some(PrecisionQualifier::High), _) => lhs.clone(),
+ (_, Some(PrecisionQualifier::High)) => rhs.clone(),
+ (None, _) => lhs.clone(),
+ (_, None) => rhs.clone(),
+ _ => panic!("precision mismatch {:?} {:?}", lhs.precision, rhs.precision),
+ }
+ } else {
+ panic!("array size mismatch")
+ }
+ } else {
+ assert_eq!(lhs, rhs);
+ lhs.clone()
+ }
+}
+
+pub fn is_output(expr: &Expr, state: &State) -> Option<SymRef> {
+ match &expr.kind {
+ ExprKind::Variable(i) => match state.sym(*i).decl {
+ SymDecl::Global(storage, ..) => match storage {
+ StorageClass::Out => return Some(*i),
+ _ => {}
+ },
+ SymDecl::Local(..) => {}
+ _ => panic!("should be variable"),
+ },
+ ExprKind::SwizzleSelector(e, ..) => {
+ return is_output(e, state);
+ }
+ ExprKind::Bracket(e, ..) => {
+ return is_output(e, state);
+ }
+ ExprKind::Dot(e, ..) => {
+ return is_output(e, state);
+ }
+ _ => {}
+ };
+ None
+}
+
+pub fn get_texel_fetch_offset(
+ state: &State,
+ sampler_expr: &Expr,
+ uv_expr: &Expr,
+ offset_expr: &Expr,
+) -> Option<(SymRef, SymRef, i32, i32)> {
+ if let ExprKind::Variable(ref sampler) = &sampler_expr.kind {
+ //if let ExprKind::Binary(BinaryOp::Add, ref lhs, ref rhs) = &uv_expr.kind {
+ if let ExprKind::Variable(ref base) = &uv_expr.kind {
+ if let ExprKind::FunCall(ref fun, ref args) = &offset_expr.kind {
+ if let FunIdentifier::Identifier(ref offset) = fun {
+ if state.sym(*offset).name == "ivec2" {
+ if let ExprKind::IntConst(ref x) = &args[0].kind {
+ if let ExprKind::IntConst(ref y) = &args[1].kind {
+ return Some((*sampler, *base, *x, *y));
+ }
+ }
+ }
+ }
+ }
+ }
+ //}
+ }
+ None
+}
+
+fn make_const(t: TypeKind, v: i32) -> Expr {
+ Expr {
+ kind: match t {
+ TypeKind::Int => ExprKind::IntConst(v as _),
+ TypeKind::UInt => ExprKind::UIntConst(v as _),
+ TypeKind::Bool => ExprKind::BoolConst(v != 0),
+ TypeKind::Float => ExprKind::FloatConst(v as _),
+ TypeKind::Double => ExprKind::DoubleConst(v as _),
+ _ => panic!("bad constant type"),
+ },
+ ty: Type::new(t),
+ }
+}
+
+// Any parameters needing to convert to bool should just compare via != 0.
+// This ensures they get the proper all-1s pattern for C++ OpenCL vectors.
+fn force_params_to_bool(_state: &mut State, params: &mut Vec<Expr>) {
+ for e in params {
+ if !e.ty.kind.is_bool() {
+ let k = e.ty.kind;
+ *e = Expr {
+ kind: ExprKind::Binary(
+ BinaryOp::NonEqual,
+ Box::new(e.clone()),
+ Box::new(make_const(k.to_scalar(), 0)),
+ ),
+ ty: Type::new(k.to_bool()),
+ };
+ }
+ }
+}
+
+// Transform bool params to int, then mask off the low bit so they become 0 or 1.
+// C++ OpenCL vectors represent bool as all-1s patterns, which will erroneously
+// convert to -1 otherwise.
+fn force_params_from_bool(state: &mut State, params: &mut Vec<Expr>) {
+ for e in params {
+ if e.ty.kind.is_bool() {
+ let k = e.ty.kind.to_int();
+ let sym = state.lookup(k.glsl_primitive_type_name().unwrap()).unwrap();
+ *e = Expr {
+ kind: ExprKind::Binary(
+ BinaryOp::BitAnd,
+ Box::new(Expr {
+ kind: ExprKind::FunCall(
+ FunIdentifier::Identifier(sym),
+ vec![e.clone()],
+ ),
+ ty: Type::new(k),
+ }),
+ Box::new(make_const(TypeKind::Int, 1)),
+ ),
+ ty: Type::new(k),
+ };
+ }
+ }
+}
+
+fn translate_expression(state: &mut State, e: &syntax::Expr) -> Expr {
+ match e {
+ syntax::Expr::Variable(i) => {
+ let sym = match state.lookup(i.as_str()) {
+ Some(sym) => sym,
+ None => panic!("missing declaration {}", i.as_str()),
+ };
+ let ty = match &state.sym(sym).decl {
+ SymDecl::Global(_, _, ty, _) => {
+ let mut globals = state.used_globals.borrow_mut();
+ if !globals.contains(&sym) {
+ globals.push(sym);
+ }
+ ty.clone()
+ }
+ SymDecl::Local(_, ty, _) => ty.clone(),
+ _ => panic!("bad variable type"),
+ };
+ Expr {
+ kind: ExprKind::Variable(sym),
+ ty,
+ }
+ }
+ syntax::Expr::Assignment(lhs, op, rhs) => {
+ let lhs = Box::new(translate_expression(state, lhs));
+ let rhs = Box::new(translate_expression(state, rhs));
+ let ty = if op == &AssignmentOp::Mult {
+ if lhs.ty.kind == TypeKind::Vec4 && rhs.ty.kind == TypeKind::Float {
+ lhs.ty.clone()
+ } else {
+ promoted_type(&lhs.ty, &rhs.ty)
+ }
+ } else {
+ promoted_type(&lhs.ty, &rhs.ty)
+ };
+ if let Some(global) = is_output(&lhs, state) {
+ let mut globals = state.modified_globals.borrow_mut();
+ if !globals.contains(&global) {
+ globals.push(global);
+ }
+ }
+ Expr {
+ kind: ExprKind::Assignment(lhs, op.clone(), rhs),
+ ty,
+ }
+ }
+ syntax::Expr::Binary(op, lhs, rhs) => {
+ let lhs = Box::new(translate_expression(state, lhs));
+ let rhs = Box::new(translate_expression(state, rhs));
+ let ty = if op == &BinaryOp::Mult {
+ if lhs.ty.kind == TypeKind::Mat3 && rhs.ty.kind == TypeKind::Vec3 {
+ rhs.ty.clone()
+ } else if lhs.ty.kind == TypeKind::Mat4 && rhs.ty.kind == TypeKind::Vec4 {
+ rhs.ty.clone()
+ } else if lhs.ty.kind == TypeKind::Mat2 && rhs.ty.kind == TypeKind::Vec2 {
+ rhs.ty.clone()
+ } else if lhs.ty.kind == TypeKind::Mat2 && rhs.ty.kind == TypeKind::Float {
+ lhs.ty.clone()
+ } else {
+ promoted_type(&lhs.ty, &rhs.ty)
+ }
+ } else {
+ promoted_type(&lhs.ty, &rhs.ty)
+ };
+
+ // comparison operators have a bool result
+ let ty = match op {
+ BinaryOp::Equal | BinaryOp::GT | BinaryOp::GTE | BinaryOp::LT | BinaryOp::LTE => {
+ Type::new(TypeKind::Bool)
+ }
+ _ => ty,
+ };
+
+ Expr {
+ kind: ExprKind::Binary(op.clone(), lhs, rhs),
+ ty,
+ }
+ }
+ syntax::Expr::Unary(op, e) => {
+ let e = Box::new(translate_expression(state, e));
+ let ty = e.ty.clone();
+ Expr {
+ kind: ExprKind::Unary(op.clone(), e),
+ ty,
+ }
+ }
+ syntax::Expr::BoolConst(b) => Expr {
+ kind: ExprKind::BoolConst(*b),
+ ty: Type::new(TypeKind::Bool),
+ },
+ syntax::Expr::Comma(lhs, rhs) => {
+ let lhs = Box::new(translate_expression(state, lhs));
+ let rhs = Box::new(translate_expression(state, rhs));
+ assert_eq!(lhs.ty, rhs.ty);
+ let ty = lhs.ty.clone();
+ Expr {
+ kind: ExprKind::Comma(lhs, rhs),
+ ty,
+ }
+ }
+ syntax::Expr::DoubleConst(d) => Expr {
+ kind: ExprKind::DoubleConst(*d),
+ ty: Type::new(TypeKind::Double),
+ },
+ syntax::Expr::FloatConst(f) => Expr {
+ kind: ExprKind::FloatConst(*f),
+ ty: Type::new(TypeKind::Float),
+ },
+ syntax::Expr::FunCall(fun, params) => {
+ let ret_ty: Type;
+ let mut params: Vec<Expr> = params
+ .iter()
+ .map(|x| translate_expression(state, x))
+ .collect();
+ Expr {
+ kind: ExprKind::FunCall(
+ match fun {
+ syntax::FunIdentifier::Identifier(i) => {
+ let name = i.as_str();
+ if name == "texelFetchOffset" && params.len() >= 4 {
+ if let Some((sampler, base, x, y)) = get_texel_fetch_offset(
+ state, &params[0], &params[1], &params[3],
+ ) {
+ if let Some(offsets) =
+ state.texel_fetches.get_mut(&(sampler, base))
+ {
+ offsets.add_offset(x, y);
+ } else {
+ state
+ .texel_fetches
+ .insert((sampler, base), TexelFetchOffsets::new(x, y));
+ }
+ }
+ }
+ let sym = match state.lookup(name) {
+ Some(s) => s,
+ None => panic!("missing symbol {}", name),
+ };
+ // Force any boolean basic type constructors to generate correct
+ // bit patterns.
+ if let Some(t) = TypeKind::from_glsl_primitive_type_name(name) {
+ if t.is_bool() {
+ force_params_to_bool(state, &mut params);
+ } else {
+ force_params_from_bool(state, &mut params);
+ }
+ }
+ match &state.sym(sym).decl {
+ SymDecl::NativeFunction(fn_ty, _) => {
+ let mut ret = None;
+ for sig in &fn_ty.signatures {
+ let mut matching = true;
+ for (e, p) in params.iter().zip(sig.params.iter()) {
+ if !compatible_type(&e.ty, p) {
+ matching = false;
+ break;
+ }
+ }
+ if matching {
+ ret = Some(sig.ret.clone());
+ break;
+ }
+ }
+ ret_ty = match ret {
+ Some(t) => t,
+ None => {
+ dbg!(&fn_ty.signatures);
+ dbg!(params.iter().map(|p| p).collect::<Vec<_>>());
+ panic!("no matching func {}", i.as_str())
+ }
+ };
+ }
+ SymDecl::UserFunction(fd, _) => {
+ let mut globals = state.modified_globals.borrow_mut();
+ for global in &fd.globals {
+ if !globals.contains(global) {
+ globals.push(*global);
+ }
+ }
+ let mut matching = true;
+ for (e, p) in params.iter().zip(fd.prototype.parameters.iter())
+ {
+ matching &= match p {
+ FunctionParameterDeclaration::Named(q, d) => {
+ match q {
+ Some(ParameterQualifier::InOut)
+ | Some(ParameterQualifier::Out) => {
+ if let Some(global) = is_output(e, state) {
+ if !globals.contains(&global) {
+ globals.push(global);
+ }
+ }
+ }
+ _ => {}
+ }
+ compatible_type(&e.ty, &d.ty)
+ }
+ FunctionParameterDeclaration::Unnamed(..) => panic!(),
+ };
+ }
+ assert!(matching);
+ ret_ty = fd.prototype.ty.clone();
+ }
+ SymDecl::Struct(_) => ret_ty = Type::new(TypeKind::Struct(sym)),
+ _ => panic!("can only call functions"),
+ };
+ FunIdentifier::Identifier(sym)
+ }
+ // array constructor
+ syntax::FunIdentifier::Expr(e) => {
+ let ty = match &**e {
+ syntax::Expr::Bracket(i, array) => {
+ let kind = match &**i {
+ syntax::Expr::Variable(i) => match i.as_str() {
+ "vec4" => TypeKind::Vec4,
+ "vec2" => TypeKind::Vec2,
+ _ => panic!("unexpected type constructor {:?}", i),
+ },
+ _ => panic!(),
+ };
+
+ Type {
+ kind,
+ precision: None,
+ array_sizes: Some(Box::new(lift(state, array))),
+ }
+ }
+ _ => panic!(),
+ };
+ ret_ty = ty.clone();
+
+ FunIdentifier::Constructor(ty)
+ }
+ },
+ params,
+ ),
+ ty: ret_ty,
+ }
+ }
+ syntax::Expr::IntConst(i) => Expr {
+ kind: ExprKind::IntConst(*i),
+ ty: Type::new(TypeKind::Int),
+ },
+ syntax::Expr::UIntConst(u) => Expr {
+ kind: ExprKind::UIntConst(*u),
+ ty: Type::new(TypeKind::UInt),
+ },
+ syntax::Expr::PostDec(e) => {
+ let e = Box::new(translate_expression(state, e));
+ let ty = e.ty.clone();
+ Expr {
+ kind: ExprKind::PostDec(e),
+ ty,
+ }
+ }
+ syntax::Expr::PostInc(e) => {
+ let e = Box::new(translate_expression(state, e));
+ let ty = e.ty.clone();
+ Expr {
+ kind: ExprKind::PostInc(e),
+ ty,
+ }
+ }
+ syntax::Expr::Ternary(cond, lhs, rhs) => {
+ let cond = Box::new(translate_expression(state, cond));
+ let lhs = Box::new(translate_expression(state, lhs));
+ let rhs = Box::new(translate_expression(state, rhs));
+ let ty = promoted_type(&lhs.ty, &rhs.ty);
+ Expr {
+ kind: ExprKind::Ternary(cond, lhs, rhs),
+ ty,
+ }
+ }
+ syntax::Expr::Dot(e, i) => {
+ let e = Box::new(translate_expression(state, e));
+ let ty = e.ty.clone();
+ let ivec = is_ivec(&ty);
+ if is_vector(&ty) {
+ let ty = Type::new(match i.as_str().len() {
+ 1 => {
+ if ivec {
+ TypeKind::Int
+ } else {
+ TypeKind::Float
+ }
+ }
+ 2 => {
+ if ivec {
+ TypeKind::IVec2
+ } else {
+ TypeKind::Vec2
+ }
+ }
+ 3 => {
+ if ivec {
+ TypeKind::IVec3
+ } else {
+ TypeKind::Vec3
+ }
+ }
+ 4 => {
+ if ivec {
+ TypeKind::IVec4
+ } else {
+ TypeKind::Vec4
+ }
+ }
+ _ => panic!(),
+ });
+
+ let sel = SwizzleSelector::parse(i.as_str());
+
+ Expr {
+ kind: ExprKind::SwizzleSelector(e, sel),
+ ty,
+ }
+ } else {
+ match ty.kind {
+ TypeKind::Struct(s) => {
+ let sym = state.sym(s);
+ let fields = match &sym.decl {
+ SymDecl::Struct(fields) => fields,
+ _ => panic!("expected struct"),
+ };
+ let field = fields
+ .fields
+ .iter()
+ .find(|x| &x.name == i)
+ .expect("missing field");
+ Expr {
+ kind: ExprKind::Dot(e, i.clone()),
+ ty: field.ty.clone(),
+ }
+ }
+ _ => panic!("expected struct found {:#?} {:#?}", e, ty),
+ }
+ }
+ }
+ syntax::Expr::Bracket(e, specifier) => {
+ let e = Box::new(translate_expression(state, e));
+ let ty = if is_vector(&e.ty) {
+ Type::new(TypeKind::Float)
+ } else if let Some(ty) = index_matrix(&e.ty) {
+ Type::new(ty)
+ } else {
+ let a = match &e.ty.array_sizes {
+ Some(a) => {
+ let mut a = *a.clone();
+ a.sizes.pop();
+ if a.sizes.len() == 0 {
+ None
+ } else {
+ Some(Box::new(a))
+ }
+ }
+ _ => panic!("{:#?}", e),
+ };
+ Type {
+ kind: e.ty.kind.clone(),
+ precision: e.ty.precision.clone(),
+ array_sizes: a,
+ }
+ };
+ let indx = match specifier {
+ ArraySpecifier::Unsized => panic!("need expression"),
+ ArraySpecifier::ExplicitlySized(e) => translate_expression(state, e),
+ };
+ Expr {
+ kind: ExprKind::Bracket(e, Box::new(indx)),
+ ty,
+ }
+ }
+ }
+}
+
+fn translate_switch(state: &mut State, s: &syntax::SwitchStatement) -> SwitchStatement {
+ let mut cases = Vec::new();
+
+ let mut case = None;
+ for stmt in &s.body {
+ match stmt {
+ syntax::Statement::Simple(s) => match &**s {
+ syntax::SimpleStatement::CaseLabel(label) => {
+ match case.take() {
+ Some(case) => cases.push(case),
+ _ => {}
+ }
+ case = Some(Case {
+ label: translate_case(state, &label),
+ stmts: Vec::new(),
+ })
+ }
+ _ => match case {
+ Some(ref mut case) => case.stmts.push(translate_statement(state, stmt)),
+ _ => panic!("switch must start with case"),
+ },
+ },
+ _ => match case {
+ Some(ref mut case) => case.stmts.push(translate_statement(state, stmt)),
+ _ => panic!("switch must start with case"),
+ },
+ }
+ }
+ match case.take() {
+ Some(case) => cases.push(case),
+ _ => {}
+ }
+ SwitchStatement {
+ head: Box::new(translate_expression(state, &s.head)),
+ cases,
+ }
+}
+
+fn translate_jump(state: &mut State, s: &syntax::JumpStatement) -> JumpStatement {
+ match s {
+ syntax::JumpStatement::Break => JumpStatement::Break,
+ syntax::JumpStatement::Continue => JumpStatement::Continue,
+ syntax::JumpStatement::Discard => JumpStatement::Discard,
+ syntax::JumpStatement::Return(e) => {
+ JumpStatement::Return(e.as_ref().map(|e| Box::new(translate_expression(state, e))))
+ }
+ }
+}
+
+fn translate_condition(state: &mut State, c: &syntax::Condition) -> Condition {
+ match c {
+ syntax::Condition::Expr(e) => Condition::Expr(Box::new(translate_expression(state, e))),
+ _ => panic!(),
+ }
+}
+
+fn translate_for_init(state: &mut State, s: &syntax::ForInitStatement) -> ForInitStatement {
+ match s {
+ syntax::ForInitStatement::Expression(e) => {
+ ForInitStatement::Expression(e.as_ref().map(|e| translate_expression(state, e)))
+ }
+ syntax::ForInitStatement::Declaration(d) => ForInitStatement::Declaration(Box::new(
+ translate_declaration(state, d, RunClass::Scalar),
+ )),
+ }
+}
+
+fn translate_for_rest(state: &mut State, s: &syntax::ForRestStatement) -> ForRestStatement {
+ ForRestStatement {
+ condition: s.condition.as_ref().map(|c| translate_condition(state, c)),
+ post_expr: s
+ .post_expr
+ .as_ref()
+ .map(|e| Box::new(translate_expression(state, e))),
+ }
+}
+
+fn translate_iteration(state: &mut State, s: &syntax::IterationStatement) -> IterationStatement {
+ match s {
+ syntax::IterationStatement::While(cond, s) => IterationStatement::While(
+ translate_condition(state, cond),
+ Box::new(translate_statement(state, s)),
+ ),
+ syntax::IterationStatement::For(init, rest, s) => IterationStatement::For(
+ translate_for_init(state, init),
+ translate_for_rest(state, rest),
+ Box::new(translate_statement(state, s)),
+ ),
+ syntax::IterationStatement::DoWhile(s, e) => IterationStatement::DoWhile(
+ Box::new(translate_statement(state, s)),
+ Box::new(translate_expression(state, e)),
+ ),
+ }
+}
+
+fn translate_case(state: &mut State, c: &syntax::CaseLabel) -> CaseLabel {
+ match c {
+ syntax::CaseLabel::Def => CaseLabel::Def,
+ syntax::CaseLabel::Case(e) => CaseLabel::Case(Box::new(translate_expression(state, e))),
+ }
+}
+
+fn translate_selection_rest(
+ state: &mut State,
+ s: &syntax::SelectionRestStatement,
+) -> (Box<Statement>, Option<Box<Statement>>) {
+ match s {
+ syntax::SelectionRestStatement::Statement(s) => {
+ (Box::new(translate_statement(state, s)), None)
+ }
+ syntax::SelectionRestStatement::Else(if_body, rest) => (
+ Box::new(translate_statement(state, if_body)),
+ Some(Box::new(translate_statement(state, rest))),
+ ),
+ }
+}
+
+fn translate_selection(state: &mut State, s: &syntax::SelectionStatement) -> SelectionStatement {
+ let cond = Box::new(translate_expression(state, &s.cond));
+ let (body, else_stmt) = translate_selection_rest(state, &s.rest);
+ SelectionStatement {
+ cond,
+ body,
+ else_stmt,
+ }
+}
+
+fn translate_simple_statement(state: &mut State, s: &syntax::SimpleStatement) -> SimpleStatement {
+ match s {
+ syntax::SimpleStatement::Declaration(d) => {
+ SimpleStatement::Declaration(translate_declaration(state, d, RunClass::Unknown))
+ }
+ syntax::SimpleStatement::Expression(e) => {
+ SimpleStatement::Expression(e.as_ref().map(|e| translate_expression(state, e)))
+ }
+ syntax::SimpleStatement::Iteration(i) => {
+ SimpleStatement::Iteration(translate_iteration(state, i))
+ }
+ syntax::SimpleStatement::Selection(s) => {
+ SimpleStatement::Selection(translate_selection(state, s))
+ }
+ syntax::SimpleStatement::Jump(j) => SimpleStatement::Jump(translate_jump(state, j)),
+ syntax::SimpleStatement::Switch(s) => SimpleStatement::Switch(translate_switch(state, s)),
+ syntax::SimpleStatement::CaseLabel(_) => panic!("should be handled by translate_switch"),
+ }
+}
+
+fn translate_statement(state: &mut State, s: &syntax::Statement) -> Statement {
+ match s {
+ syntax::Statement::Compound(s) => {
+ Statement::Compound(Box::new(translate_compound_statement(state, s)))
+ }
+ syntax::Statement::Simple(s) => {
+ Statement::Simple(Box::new(translate_simple_statement(state, s)))
+ }
+ }
+}
+
+fn translate_compound_statement(
+ state: &mut State,
+ cs: &syntax::CompoundStatement,
+) -> CompoundStatement {
+ CompoundStatement {
+ statement_list: cs
+ .statement_list
+ .iter()
+ .map(|x| translate_statement(state, x))
+ .collect(),
+ }
+}
+
+fn translate_function_parameter_declaration(
+ state: &mut State,
+ p: &syntax::FunctionParameterDeclaration,
+ index: usize,
+) -> FunctionParameterDeclaration {
+ match p {
+ syntax::FunctionParameterDeclaration::Named(qual, p) => {
+ let mut ty: Type = lift(state, &p.ty);
+ if let Some(a) = &p.ident.array_spec {
+ ty.array_sizes = Some(Box::new(lift(state, a)));
+ }
+
+ ty.precision = get_precision(qual);
+
+ let decl = SymDecl::Local(
+ StorageClass::None,
+ ty.clone(),
+ RunClass::Dependent(1 << index),
+ );
+ let d = FunctionParameterDeclarator {
+ ty,
+ name: p.ident.ident.clone(),
+ sym: state.declare(p.ident.ident.as_str(), decl),
+ };
+ FunctionParameterDeclaration::Named(lift_type_qualifier_for_parameter(state, qual), d)
+ }
+ syntax::FunctionParameterDeclaration::Unnamed(qual, p) => {
+ FunctionParameterDeclaration::Unnamed(
+ lift_type_qualifier_for_parameter(state, qual),
+ p.clone(),
+ )
+ }
+ }
+}
+
+fn translate_prototype(
+ state: &mut State,
+ cs: &syntax::FunctionPrototype,
+) -> (FunctionPrototype, SymRef) {
+ let prototype = FunctionPrototype {
+ ty: lift(state, &cs.ty),
+ name: cs.name.clone(),
+ parameters: cs
+ .parameters
+ .iter()
+ .enumerate()
+ .map(|(i, x)| translate_function_parameter_declaration(state, x, i))
+ .collect(),
+ };
+ let sym = if let Some(sym) = state.lookup(prototype.name.as_str()) {
+ match &state.sym(sym).decl {
+ SymDecl::UserFunction(..) => {}
+ _ => panic!(
+ "prototype conflicts with existing symbol: {}",
+ prototype.name.as_str()
+ ),
+ }
+ sym
+ } else {
+ let pfd = Rc::new(FunctionDefinition {
+ prototype: prototype.clone(),
+ body: CompoundStatement::new(),
+ globals: Vec::new(),
+ texel_fetches: HashMap::new(),
+ });
+ state.declare(
+ prototype.name.as_str(),
+ SymDecl::UserFunction(pfd, RunClass::Unknown),
+ )
+ };
+ (prototype, sym)
+}
+
+fn translate_function_prototype(
+ state: &mut State,
+ prototype: &syntax::FunctionPrototype,
+) -> FunctionPrototype {
+ let (prototype, _) = translate_prototype(state, prototype);
+ prototype
+}
+
+fn translate_function_definition(
+ state: &mut State,
+ sfd: &syntax::FunctionDefinition,
+) -> Rc<FunctionDefinition> {
+ let (prototype, sym) = translate_prototype(state, &sfd.prototype);
+
+ state.push_scope(prototype.name.as_str().into());
+ state.in_function = Some(sym);
+ state.modified_globals.get_mut().clear();
+ state.texel_fetches.clear();
+ let body = translate_compound_statement(state, &sfd.statement);
+ let mut globals = Vec::new();
+ mem::swap(&mut globals, state.modified_globals.get_mut());
+ let mut texel_fetches = HashMap::new();
+ mem::swap(&mut texel_fetches, &mut state.texel_fetches);
+ state.in_function = None;
+ state.pop_scope();
+
+ let fd = Rc::new(FunctionDefinition {
+ prototype,
+ body,
+ globals,
+ texel_fetches,
+ });
+ state.sym_mut(sym).decl = SymDecl::UserFunction(fd.clone(), RunClass::Unknown);
+ fd
+}
+
+fn translate_external_declaration(
+ state: &mut State,
+ ed: &syntax::ExternalDeclaration,
+) -> ExternalDeclaration {
+ match ed {
+ syntax::ExternalDeclaration::Declaration(d) => {
+ ExternalDeclaration::Declaration(translate_declaration(state, d, RunClass::Unknown))
+ }
+ syntax::ExternalDeclaration::FunctionDefinition(fd) => {
+ ExternalDeclaration::FunctionDefinition(translate_function_definition(state, fd))
+ }
+ syntax::ExternalDeclaration::Preprocessor(p) => {
+ ExternalDeclaration::Preprocessor(p.clone())
+ }
+ }
+}
+
+fn declare_function(
+ state: &mut State,
+ name: &str,
+ cxx_name: Option<&'static str>,
+ ret: Type,
+ params: Vec<Type>,
+) {
+ let sig = FunctionSignature { ret, params };
+ match state.lookup_sym_mut(name) {
+ Some(Symbol {
+ decl: SymDecl::NativeFunction(f, ..),
+ ..
+ }) => f.signatures.push(sig),
+ None => {
+ state.declare(
+ name,
+ SymDecl::NativeFunction(
+ FunctionType {
+ signatures: NonEmpty::new(sig),
+ },
+ cxx_name,
+ ),
+ );
+ }
+ _ => panic!("overloaded function name {}", name),
+ }
+ //state.declare(name, Type::Function(FunctionType{ v}))
+}
+
+pub fn ast_to_hir(state: &mut State, tu: &syntax::TranslationUnit) -> TranslationUnit {
+ // global scope
+ state.push_scope("global".into());
+ use TypeKind::*;
+ declare_function(
+ state,
+ "vec2",
+ Some("make_vec2"),
+ Type::new(Vec2),
+ vec![Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "vec2",
+ Some("make_vec2"),
+ Type::new(Vec2),
+ vec![Type::new(IVec2)],
+ );
+ declare_function(
+ state,
+ "vec2",
+ Some("make_vec2"),
+ Type::new(Vec2),
+ vec![Type::new(IVec3)],
+ );
+ declare_function(
+ state,
+ "vec3",
+ Some("make_vec3"),
+ Type::new(Vec3),
+ vec![Type::new(Float), Type::new(Float), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "vec3",
+ Some("make_vec3"),
+ Type::new(Vec3),
+ vec![Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "vec3",
+ Some("make_vec3"),
+ Type::new(Vec3),
+ vec![Type::new(Vec2), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "vec4",
+ Some("make_vec4"),
+ Type::new(Vec4),
+ vec![Type::new(Vec3), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "vec4",
+ Some("make_vec4"),
+ Type::new(Vec4),
+ vec![
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ ],
+ );
+ declare_function(
+ state,
+ "vec4",
+ Some("make_vec4"),
+ Type::new(Vec4),
+ vec![Type::new(Vec2), Type::new(Float), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "vec4",
+ Some("make_vec4"),
+ Type::new(Vec4),
+ vec![Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "vec4",
+ Some("make_vec4"),
+ Type::new(Vec4),
+ vec![Type::new(Float), Type::new(Float), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "vec4",
+ Some("make_vec4"),
+ Type::new(Vec4),
+ vec![Type::new(Vec4)],
+ );
+
+ declare_function(
+ state,
+ "bvec2",
+ Some("make_bvec2"),
+ Type::new(BVec2),
+ vec![Type::new(Bool)],
+ );
+ declare_function(
+ state,
+ "bvec4",
+ Some("make_bvec4"),
+ Type::new(BVec4),
+ vec![Type::new(BVec2), Type::new(BVec2)],
+ );
+
+ declare_function(
+ state,
+ "int",
+ Some("make_int"),
+ Type::new(Int),
+ vec![Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "float",
+ Some("make_float"),
+ Type::new(Float),
+ vec![Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "float",
+ Some("make_float"),
+ Type::new(Float),
+ vec![Type::new(Int)],
+ );
+ declare_function(
+ state,
+ "int",
+ Some("make_int"),
+ Type::new(Int),
+ vec![Type::new(UInt)],
+ );
+ declare_function(
+ state,
+ "uint",
+ Some("make_uint"),
+ Type::new(UInt),
+ vec![Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "uint",
+ Some("make_uint"),
+ Type::new(UInt),
+ vec![Type::new(Int)],
+ );
+ declare_function(
+ state,
+ "ivec2",
+ Some("make_ivec2"),
+ Type::new(IVec2),
+ vec![Type::new(UInt), Type::new(UInt)],
+ );
+ declare_function(
+ state,
+ "ivec2",
+ Some("make_ivec2"),
+ Type::new(IVec2),
+ vec![Type::new(Int), Type::new(Int)],
+ );
+ declare_function(
+ state,
+ "ivec2",
+ Some("make_ivec2"),
+ Type::new(IVec2),
+ vec![Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "ivec3",
+ Some("make_ivec3"),
+ Type::new(IVec3),
+ vec![Type::new(IVec2), Type::new(Int)],
+ );
+ declare_function(
+ state,
+ "ivec4",
+ Some("make_ivec4"),
+ Type::new(IVec4),
+ vec![
+ Type::new(Int),
+ Type::new(Int),
+ Type::new(Int),
+ Type::new(Int),
+ ],
+ );
+ declare_function(
+ state,
+ "ivec4",
+ Some("make_ivec4"),
+ Type::new(IVec4),
+ vec![Type::new(IVec2), Type::new(Int), Type::new(Int)],
+ );
+
+ declare_function(
+ state,
+ "mat2",
+ Some("make_mat2"),
+ Type::new(Mat2),
+ vec![Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "mat2",
+ Some("make_mat2"),
+ Type::new(Mat2),
+ vec![Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "mat2",
+ Some("make_mat2"),
+ Type::new(Mat2),
+ vec![Type::new(Mat4)],
+ );
+ declare_function(
+ state,
+ "mat3",
+ Some("make_mat3"),
+ Type::new(Mat3),
+ vec![Type::new(Vec3), Type::new(Vec3), Type::new(Vec3)],
+ );
+ declare_function(
+ state,
+ "mat3",
+ Some("make_mat3"),
+ Type::new(Mat3),
+ vec![Type::new(Mat4)],
+ );
+ declare_function(
+ state,
+ "mat3",
+ Some("make_mat3"),
+ Type::new(Mat3),
+ vec![
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ ],
+ );
+ declare_function(
+ state,
+ "mat4",
+ Some("make_mat4"),
+ Type::new(Mat4),
+ vec![
+ Type::new(Vec4),
+ Type::new(Vec4),
+ Type::new(Vec4),
+ Type::new(Vec4),
+ ],
+ );
+ declare_function(
+ state,
+ "mat4",
+ Some("make_mat4"),
+ Type::new(Mat4),
+ vec![
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ Type::new(Float),
+ ],
+ );
+ declare_function(state, "abs", None, Type::new(Vec2), vec![Type::new(Vec2)]);
+ declare_function(state, "abs", None, Type::new(Vec3), vec![Type::new(Vec3)]);
+ declare_function(state, "abs", None, Type::new(Float), vec![Type::new(Float)]);
+ declare_function(
+ state,
+ "dot",
+ None,
+ Type::new(Float),
+ vec![Type::new(Vec3), Type::new(Vec3)],
+ );
+ declare_function(
+ state,
+ "dot",
+ None,
+ Type::new(Float),
+ vec![Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "min",
+ None,
+ Type::new(Float),
+ vec![Type::new(Float), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "min",
+ None,
+ Type::new(Vec2),
+ vec![Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "min",
+ None,
+ Type::new(Vec3),
+ vec![Type::new(Vec3), Type::new(Vec3)],
+ );
+
+ declare_function(
+ state,
+ "max",
+ None,
+ Type::new(Float),
+ vec![Type::new(Float), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "max",
+ None,
+ Type::new(Vec2),
+ vec![Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "max",
+ None,
+ Type::new(Vec2),
+ vec![Type::new(Vec2), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "max",
+ None,
+ Type::new(Vec3),
+ vec![Type::new(Vec3), Type::new(Vec3)],
+ );
+
+ declare_function(
+ state,
+ "mix",
+ None,
+ Type::new(Vec2),
+ vec![Type::new(Vec2), Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "mix",
+ None,
+ Type::new(Vec2),
+ vec![Type::new(Vec2), Type::new(Vec2), Type::new(BVec2)],
+ );
+ declare_function(
+ state,
+ "mix",
+ None,
+ Type::new(Vec2),
+ vec![Type::new(Vec2), Type::new(Vec2), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "mix",
+ None,
+ Type::new(Vec3),
+ vec![Type::new(Vec3), Type::new(Vec3), Type::new(Vec3)],
+ );
+ declare_function(
+ state,
+ "mix",
+ None,
+ Type::new(Vec4),
+ vec![Type::new(Vec4), Type::new(Vec4), Type::new(Vec4)],
+ );
+ declare_function(
+ state,
+ "mix",
+ None,
+ Type::new(Vec4),
+ vec![Type::new(Vec4), Type::new(Vec4), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "mix",
+ None,
+ Type::new(Vec3),
+ vec![Type::new(Vec3), Type::new(Vec3), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "mix",
+ None,
+ Type::new(Vec3),
+ vec![Type::new(Vec3), Type::new(Vec3), Type::new(BVec3)],
+ );
+ declare_function(
+ state,
+ "mix",
+ None,
+ Type::new(Float),
+ vec![Type::new(Float), Type::new(Float), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "mix",
+ None,
+ Type::new(Vec4),
+ vec![Type::new(Vec4), Type::new(Vec4), Type::new(BVec4)],
+ );
+ declare_function(
+ state,
+ "step",
+ None,
+ Type::new(Float),
+ vec![Type::new(Float), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "step",
+ None,
+ Type::new(Vec2),
+ vec![Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "step",
+ None,
+ Type::new(Vec3),
+ vec![Type::new(Vec3), Type::new(Vec3)],
+ );
+ declare_function(
+ state,
+ "notEqual",
+ None,
+ Type::new(BVec4),
+ vec![Type::new(IVec4), Type::new(IVec4)],
+ );
+
+ declare_function(
+ state,
+ "fwidth",
+ None,
+ Type::new(Vec2),
+ vec![Type::new(Vec2)],
+ );
+ declare_function(state, "cos", None, Type::new(Float), vec![Type::new(Float)]);
+ declare_function(state, "sin", None, Type::new(Float), vec![Type::new(Float)]);
+ declare_function(state, "tan", None, Type::new(Float), vec![Type::new(Float)]);
+ declare_function(state, "atan", None, Type::new(Float), vec![Type::new(Float)]);
+ declare_function(state, "atan", None, Type::new(Float), vec![Type::new(Float), Type::new(Float)]);
+ declare_function(
+ state,
+ "clamp",
+ None,
+ Type::new(Vec3),
+ vec![Type::new(Vec3), Type::new(Float), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "clamp",
+ None,
+ Type::new(Double),
+ vec![Type::new(Double), Type::new(Double), Type::new(Double)],
+ );
+ declare_function(
+ state,
+ "clamp",
+ None,
+ Type::new(Vec2),
+ vec![Type::new(Vec2), Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "clamp",
+ None,
+ Type::new(Vec3),
+ vec![Type::new(Vec3), Type::new(Vec3), Type::new(Vec3)],
+ );
+ declare_function(
+ state,
+ "clamp",
+ None,
+ Type::new(Vec4),
+ vec![Type::new(Vec4), Type::new(Vec4), Type::new(Vec4)],
+ );
+ declare_function(
+ state,
+ "length",
+ None,
+ Type::new(Float),
+ vec![Type::new(Vec2)],
+ );
+ declare_function(state, "pow", None, Type::new(Vec3), vec![Type::new(Vec3)]);
+ declare_function(state, "pow", None, Type::new(Float), vec![Type::new(Float)]);
+ declare_function(state, "exp", None, Type::new(Float), vec![Type::new(Float)]);
+ declare_function(
+ state,
+ "inversesqrt",
+ None,
+ Type::new(Float),
+ vec![Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "sqrt",
+ None,
+ Type::new(Float),
+ vec![Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "distance",
+ None,
+ Type::new(Float),
+ vec![Type::new(Vec2), Type::new(Vec2)],
+ );
+
+ declare_function(
+ state,
+ "lessThanEqual",
+ None,
+ Type::new(BVec2),
+ vec![Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "lessThanEqual",
+ None,
+ Type::new(BVec3),
+ vec![Type::new(Vec3), Type::new(Vec3)],
+ );
+ declare_function(
+ state,
+ "lessThanEqual",
+ None,
+ Type::new(BVec4),
+ vec![Type::new(Vec4), Type::new(Vec4)],
+ );
+ declare_function(
+ state,
+ "lessThan",
+ None,
+ Type::new(BVec2),
+ vec![Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "greaterThan",
+ None,
+ Type::new(BVec2),
+ vec![Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "greaterThanEqual",
+ None,
+ Type::new(BVec2),
+ vec![Type::new(Vec2), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "greaterThanEqual",
+ None,
+ Type::new(BVec2),
+ vec![Type::new(Vec4), Type::new(Vec4)],
+ );
+ declare_function(state, "any", None, Type::new(Bool), vec![Type::new(BVec2)]);
+ declare_function(state, "all", None, Type::new(Bool), vec![Type::new(BVec2)]);
+ declare_function(state, "all", None, Type::new(Bool), vec![Type::new(BVec4)]);
+
+ declare_function(
+ state,
+ "if_then_else",
+ None,
+ Type::new(Vec3),
+ vec![Type::new(BVec3), Type::new(Vec3), Type::new(Vec3)],
+ );
+ declare_function(state, "floor", None, Type::new(Vec4), vec![Type::new(Vec4)]);
+ declare_function(state, "floor", None, Type::new(Vec2), vec![Type::new(Vec2)]);
+ declare_function(
+ state,
+ "floor",
+ None,
+ Type::new(Double),
+ vec![Type::new(Double)],
+ );
+ declare_function(
+ state,
+ "ceil",
+ None,
+ Type::new(Double),
+ vec![Type::new(Double)],
+ );
+ declare_function(
+ state,
+ "round",
+ None,
+ Type::new(Double),
+ vec![Type::new(Double)],
+ );
+ declare_function(
+ state,
+ "fract",
+ None,
+ Type::new(Float),
+ vec![Type::new(Float)],
+ );
+ declare_function(state, "mod", None, Type::new(Vec2), vec![Type::new(Vec2)]);
+ declare_function(state, "mod", None, Type::new(Float), vec![Type::new(Float)]);
+
+ declare_function(
+ state,
+ "texelFetch",
+ None,
+ Type::new(Vec4),
+ vec![Type::new(Sampler2D), Type::new(IVec2), Type::new(Int)],
+ );
+ declare_function(
+ state,
+ "texelFetch",
+ None,
+ Type::new(Vec4),
+ vec![Type::new(Sampler2DArray), Type::new(IVec3), Type::new(Int)],
+ );
+ declare_function(
+ state,
+ "texelFetch",
+ None,
+ Type::new(IVec4),
+ vec![Type::new(ISampler2D), Type::new(IVec2), Type::new(Int)],
+ );
+ declare_function(
+ state,
+ "texelFetchOffset",
+ None,
+ Type::new(Vec4),
+ vec![
+ Type::new(Sampler2D),
+ Type::new(IVec2),
+ Type::new(Int),
+ Type::new(IVec2),
+ ],
+ );
+ declare_function(
+ state,
+ "texelFetchOffset",
+ None,
+ Type::new(IVec4),
+ vec![
+ Type::new(ISampler2D),
+ Type::new(IVec2),
+ Type::new(Int),
+ Type::new(IVec2),
+ ],
+ );
+ declare_function(
+ state,
+ "texture",
+ None,
+ Type::new(Vec4),
+ vec![Type::new(Sampler2D), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "texture",
+ None,
+ Type::new(Vec4),
+ vec![Type::new(Sampler2DRect), Type::new(Vec2)],
+ );
+ declare_function(
+ state,
+ "texture",
+ None,
+ Type::new(Vec4),
+ vec![Type::new(Sampler2DArray), Type::new(Vec3)],
+ );
+ declare_function(
+ state,
+ "textureLod",
+ None,
+ Type::new(Vec4),
+ vec![Type::new(Sampler2DArray), Type::new(Vec3), Type::new(Float)],
+ );
+ declare_function(
+ state,
+ "textureSize",
+ None,
+ Type::new(IVec3),
+ vec![Type::new(Sampler2DArray), Type::new(Int)],
+ );
+ declare_function(
+ state,
+ "textureSize",
+ None,
+ Type::new(IVec2),
+ vec![Type::new(Sampler2D), Type::new(Int)],
+ );
+ declare_function(
+ state,
+ "textureSize",
+ None,
+ Type::new(IVec2),
+ vec![Type::new(Sampler2DRect), Type::new(Int)],
+ );
+
+ declare_function(
+ state,
+ "inverse",
+ None,
+ Type::new(Mat2),
+ vec![Type::new(Mat2)],
+ );
+ declare_function(
+ state,
+ "transpose",
+ None,
+ Type::new(Mat3),
+ vec![Type::new(Mat3)],
+ );
+ declare_function(
+ state,
+ "normalize",
+ None,
+ Type::new(Vec2),
+ vec![Type::new(Vec2)],
+ );
+ state.declare(
+ "gl_FragCoord",
+ SymDecl::Global(StorageClass::In, None, Type::new(Vec4), RunClass::Vector),
+ );
+ state.declare(
+ "gl_FragColor",
+ SymDecl::Global(StorageClass::Out, None, Type::new(Vec4), RunClass::Vector),
+ );
+ state.declare(
+ "gl_Position",
+ SymDecl::Global(StorageClass::Out, None, Type::new(Vec4), RunClass::Vector),
+ );
+
+ TranslationUnit(tu.0.map(state, translate_external_declaration))
+}
+
+fn infer_expr_inner(state: &mut State, expr: &Expr, assign: &mut SymRef) -> RunClass {
+ match expr.kind {
+ ExprKind::Variable(ref i) => {
+ *assign = *i;
+ match &state.sym(*i).decl {
+ SymDecl::Local(_, _, ref run_class) => *run_class,
+ SymDecl::Global(_, _, _, ref run_class) => *run_class,
+ _ => panic!(),
+ }
+ }
+ ExprKind::IntConst(_)
+ | ExprKind::UIntConst(_)
+ | ExprKind::BoolConst(_)
+ | ExprKind::FloatConst(_)
+ | ExprKind::DoubleConst(_) => RunClass::Scalar,
+ ExprKind::Unary(_, ref e) => infer_expr(state, e),
+ ExprKind::Binary(_, ref l, ref r) => infer_expr(state, l).merge(infer_expr(state, r)),
+ ExprKind::Ternary(ref c, ref s, ref e) => infer_expr(state, c)
+ .merge(infer_expr(state, s))
+ .merge(infer_expr(state, e)),
+ ExprKind::Assignment(ref v, _, ref e) => {
+ let mut sym = SymRef(!0);
+ let run_class = infer_expr_inner(state, v, &mut sym).merge(infer_expr(state, e));
+ assert!(sym != SymRef(!0));
+ state.merge_run_class(sym, run_class)
+ }
+ ExprKind::Bracket(ref e, ref indx) => {
+ infer_expr_inner(state, e, assign).merge(infer_expr(state, indx))
+ }
+ ExprKind::FunCall(ref fun, ref args) => {
+ let arg_classes: Vec<(RunClass, SymRef)> = args
+ .iter()
+ .map(|e| {
+ let mut assign = SymRef(!0);
+ let run_class = infer_expr_inner(state, e, &mut assign);
+ (run_class, assign)
+ })
+ .collect();
+ let run_class = if args.is_empty() {
+ RunClass::Scalar
+ } else {
+ arg_classes
+ .iter()
+ .fold(RunClass::Unknown, |x, &(y, _)| x.merge(y))
+ };
+ match fun {
+ FunIdentifier::Identifier(ref sym) => match &state.sym(*sym).decl {
+ SymDecl::NativeFunction(..) => run_class,
+ SymDecl::UserFunction(ref fd, ref run_class) => {
+ for (&(mut arg_class, assign), param) in
+ arg_classes.iter().zip(fd.prototype.parameters.iter())
+ {
+ if let FunctionParameterDeclaration::Named(Some(qual), p) = param {
+ match qual {
+ ParameterQualifier::InOut | ParameterQualifier::Out => {
+ if let SymDecl::Local(_, _, param_class) =
+ &state.sym(p.sym).decl
+ {
+ match param_class {
+ RunClass::Unknown | RunClass::Vector => {
+ arg_class = RunClass::Vector;
+ }
+ RunClass::Dependent(mask) => {
+ for i in 0 .. 31 {
+ if (mask & (1 << i)) != 0 {
+ arg_class =
+ arg_class.merge(arg_classes[i].0);
+ }
+ }
+ }
+ RunClass::Scalar => {}
+ }
+ }
+ assert!(assign != SymRef(!0));
+ state.merge_run_class(assign, arg_class);
+ }
+ _ => {}
+ }
+ }
+ }
+ if fd.prototype.ty.kind == TypeKind::Void {
+ RunClass::Scalar
+ } else {
+ match *run_class {
+ RunClass::Unknown | RunClass::Vector => RunClass::Vector,
+ RunClass::Dependent(mask) => {
+ let mut ret_class = RunClass::Unknown;
+ for i in 0 .. 31 {
+ if (mask & (1 << i)) != 0 {
+ ret_class = ret_class.merge(arg_classes[i].0);
+ }
+ }
+ ret_class
+ }
+ RunClass::Scalar => RunClass::Scalar,
+ }
+ }
+ }
+ SymDecl::Struct(..) => run_class,
+ _ => panic!(),
+ },
+ FunIdentifier::Constructor(..) => run_class,
+ }
+ }
+ ExprKind::Dot(ref e, _) => infer_expr_inner(state, e, assign),
+ ExprKind::SwizzleSelector(ref e, _) => infer_expr_inner(state, e, assign),
+ ExprKind::PostInc(ref e) => infer_expr_inner(state, e, assign),
+ ExprKind::PostDec(ref e) => infer_expr_inner(state, e, assign),
+ ExprKind::Comma(ref a, ref b) => {
+ infer_expr(state, a);
+ infer_expr(state, b)
+ }
+ ExprKind::Cond(_, ref e) => infer_expr(state, e),
+ ExprKind::CondMask => RunClass::Vector,
+ }
+}
+
+fn infer_expr(state: &mut State, expr: &Expr) -> RunClass {
+ infer_expr_inner(state, expr, &mut SymRef(!0))
+}
+
+fn infer_condition(state: &mut State, c: &Condition) {
+ match *c {
+ Condition::Expr(ref e) => {
+ infer_expr(state, e);
+ }
+ }
+}
+
+fn infer_iteration_statement(state: &mut State, ist: &IterationStatement) {
+ let changed = state.run_class_changed.replace(true);
+ match *ist {
+ IterationStatement::While(ref cond, ref body) => {
+ while state.run_class_changed.replace(false) {
+ infer_condition(state, cond);
+ infer_statement(state, body);
+ }
+ }
+ IterationStatement::DoWhile(ref body, ref cond) => {
+ while state.run_class_changed.replace(false) {
+ infer_statement(state, body);
+ infer_expr(state, cond);
+ }
+ }
+ IterationStatement::For(ref init, ref rest, ref body) => {
+ match *init {
+ ForInitStatement::Expression(ref expr) => {
+ if let Some(ref e) = *expr {
+ infer_expr(state, e);
+ }
+ }
+ ForInitStatement::Declaration(ref d) => {
+ infer_declaration(state, d);
+ }
+ }
+ while state.run_class_changed.replace(false) {
+ if let Some(ref cond) = rest.condition {
+ infer_condition(state, cond);
+ }
+ if let Some(ref e) = rest.post_expr {
+ infer_expr(state, e);
+ }
+ infer_statement(state, body);
+ }
+ }
+ }
+ state.run_class_changed.set(changed);
+}
+
+fn infer_selection_statement(state: &mut State, sst: &SelectionStatement) {
+ let mut branch_run_class = state.branch_run_class.merge(infer_expr(state, &sst.cond));
+ mem::swap(&mut state.branch_run_class, &mut branch_run_class);
+ let branch_declaration = state.branch_declaration;
+ state.branch_declaration = state.last_declaration;
+ infer_statement(state, &sst.body);
+ if let Some(ref else_st) = sst.else_stmt {
+ infer_statement(state, else_st);
+ }
+ state.branch_run_class = branch_run_class;
+ state.branch_declaration = branch_declaration;
+}
+
+fn infer_expression_statement(state: &mut State, est: &ExprStatement) {
+ if let Some(ref e) = *est {
+ infer_expr(state, e);
+ }
+}
+
+fn infer_switch_statement(state: &mut State, sst: &SwitchStatement) {
+ let mut branch_run_class = state.branch_run_class.merge(infer_expr(state, &sst.head));
+ mem::swap(&mut state.branch_run_class, &mut branch_run_class);
+ let branch_declaration = state.branch_declaration;
+ state.branch_declaration = state.last_declaration;
+ for case in &sst.cases {
+ for st in &case.stmts {
+ infer_statement(state, st);
+ }
+ }
+ state.branch_run_class = branch_run_class;
+ state.branch_declaration = branch_declaration;
+}
+
+fn infer_jump_statement(state: &mut State, j: &JumpStatement) {
+ match *j {
+ JumpStatement::Continue => {}
+ JumpStatement::Break => {}
+ JumpStatement::Discard => {}
+ JumpStatement::Return(ref e) => {
+ if let Some(e) = e {
+ let run_class = infer_expr(state, e);
+ state.return_run_class(run_class);
+ }
+ }
+ }
+}
+
+fn infer_initializer(state: &mut State, i: &Initializer) -> RunClass {
+ match *i {
+ Initializer::Simple(ref e) => infer_expr(state, e),
+ Initializer::List(ref list) => {
+ let mut run_class = RunClass::Unknown;
+ for ini in list.0.iter() {
+ run_class = run_class.merge(infer_initializer(state, ini));
+ }
+ run_class
+ }
+ }
+}
+
+fn infer_declaration(state: &mut State, d: &Declaration) {
+ match *d {
+ Declaration::FunctionPrototype(..) => {}
+ Declaration::InitDeclaratorList(ref list) => {
+ state.last_declaration = list.head.name;
+
+ let mut run_class = RunClass::Unknown;
+ for decl in &list.tail {
+ if let Some(ref initializer) = decl.initializer {
+ run_class = run_class.merge(infer_initializer(state, initializer));
+ }
+ }
+ if let Some(ref initializer) = list.head.initializer {
+ run_class = run_class.merge(infer_initializer(state, initializer));
+ state.merge_run_class(list.head.name, run_class);
+ }
+ }
+ Declaration::Precision(..) => {}
+ Declaration::Block(..) => {}
+ Declaration::Global(..) => {}
+ Declaration::StructDefinition(..) => {}
+ }
+}
+
+fn infer_simple_statement(state: &mut State, sst: &SimpleStatement) {
+ match *sst {
+ SimpleStatement::Declaration(ref d) => infer_declaration(state, d),
+ SimpleStatement::Expression(ref e) => infer_expression_statement(state, e),
+ SimpleStatement::Selection(ref s) => infer_selection_statement(state, s),
+ SimpleStatement::Switch(ref s) => infer_switch_statement(state, s),
+ SimpleStatement::Iteration(ref i) => infer_iteration_statement(state, i),
+ SimpleStatement::Jump(ref j) => infer_jump_statement(state, j),
+ }
+}
+
+fn infer_compound_statement(state: &mut State, cst: &CompoundStatement) {
+ for st in &cst.statement_list {
+ infer_statement(state, st);
+ }
+}
+
+fn infer_statement(state: &mut State, st: &Statement) {
+ match *st {
+ Statement::Compound(ref cst) => infer_compound_statement(state, cst),
+ Statement::Simple(ref sst) => infer_simple_statement(state, sst),
+ }
+}
+
+fn infer_function_definition(state: &mut State, fd: &FunctionDefinition) {
+ state.in_function = Some(state.lookup(fd.prototype.name.as_str()).unwrap());
+
+ state.run_class_changed.set(true);
+ while state.run_class_changed.replace(false) {
+ for st in &fd.body.statement_list {
+ infer_statement(state, st);
+ }
+ }
+
+ state.in_function = None;
+}
+
+fn infer_external_declaration(state: &mut State, ed: &ExternalDeclaration) {
+ match *ed {
+ ExternalDeclaration::Preprocessor(_) => {}
+ ExternalDeclaration::FunctionDefinition(ref fd) => infer_function_definition(state, fd),
+ ExternalDeclaration::Declaration(_) => {}
+ }
+}
+
+pub fn infer_run_class(state: &mut State, tu: &TranslationUnit) {
+ for ed in &(tu.0).0 {
+ infer_external_declaration(state, ed);
+ }
+}
diff --git a/third_party/webrender/glsl-to-cxx/src/lib.rs b/third_party/webrender/glsl-to-cxx/src/lib.rs
new file mode 100644
index 00000000000..e40418aaab2
--- /dev/null
+++ b/third_party/webrender/glsl-to-cxx/src/lib.rs
@@ -0,0 +1,3706 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate glsl;
+
+mod hir;
+
+use glsl::parser::Parse;
+use glsl::syntax;
+use glsl::syntax::{TranslationUnit, UnaryOp};
+use hir::{Statement, SwizzleSelector, Type};
+use std::cell::{Cell, RefCell};
+use std::collections::{BTreeMap, HashMap};
+use std::io::Read;
+use std::mem;
+
+#[derive(PartialEq, Eq)]
+enum ShaderKind {
+ Fragment,
+ Vertex,
+}
+
+type UniformIndices = BTreeMap<String, (i32, hir::TypeKind, hir::StorageClass)>;
+
+fn build_uniform_indices(indices: &mut UniformIndices, state: &hir::State) {
+ for u in state.used_globals.borrow().iter() {
+ let sym = state.sym(*u);
+ match &sym.decl {
+ hir::SymDecl::Global(storage, _, ty, _) => match storage {
+ hir::StorageClass::Uniform | hir::StorageClass::Sampler(..) => {
+ let next_index = indices.len() as i32 + 1;
+ indices.entry(sym.name.clone()).or_insert((
+ next_index,
+ ty.kind.clone(),
+ *storage,
+ ));
+ }
+ _ => {}
+ },
+ _ => {}
+ }
+ }
+}
+
+pub fn translate(args: &mut dyn Iterator<Item = String>) -> String {
+ let _cmd_name = args.next();
+ let vertex_file = args.next().unwrap();
+
+ let vs_name = std::path::Path::new(&vertex_file)
+ .file_stem()
+ .unwrap()
+ .to_string_lossy()
+ .to_string();
+
+ let frag_file = args.next().unwrap();
+
+ let fs_name = std::path::Path::new(&frag_file)
+ .file_stem()
+ .unwrap()
+ .to_string_lossy()
+ .to_string();
+
+ let frag_include = args.next();
+
+ let (vs_state, vs_hir, vs_is_frag) = parse_shader(vertex_file);
+ let (fs_state, fs_hir, fs_is_frag) = parse_shader(frag_file);
+
+ // we use a BTree so that iteration is stable
+ let mut uniform_indices = BTreeMap::new();
+ build_uniform_indices(&mut uniform_indices, &vs_state);
+ build_uniform_indices(&mut uniform_indices, &fs_state);
+
+ assert_eq!(fs_name, vs_name);
+
+ let mut result = translate_shader(
+ vs_name,
+ vs_state,
+ vs_hir,
+ vs_is_frag,
+ &uniform_indices,
+ None,
+ );
+ result += "\n";
+ result += &translate_shader(
+ fs_name,
+ fs_state,
+ fs_hir,
+ fs_is_frag,
+ &uniform_indices,
+ frag_include,
+ );
+ result
+}
+
+fn parse_shader(file: String) -> (hir::State, hir::TranslationUnit, bool) {
+ let mut contents = String::new();
+ let is_frag = file.contains("frag");
+ std::fs::File::open(&file)
+ .unwrap()
+ .read_to_string(&mut contents)
+ .unwrap();
+ let r = TranslationUnit::parse(contents);
+
+ //println!("{:#?}", r);
+ let mut ast_glsl = String::new();
+ let r = r.unwrap();
+ glsl::transpiler::glsl::show_translation_unit(&mut ast_glsl, &r);
+ //let mut fast = std::fs::File::create("ast").unwrap();
+ //fast.write(ast_glsl.as_bytes());
+
+ let mut state = hir::State::new();
+ let hir = hir::ast_to_hir(&mut state, &r);
+ (state, hir, is_frag)
+}
+
+fn translate_shader(
+ name: String,
+ mut state: hir::State,
+ hir: hir::TranslationUnit,
+ is_frag: bool,
+ uniform_indices: &UniformIndices,
+ include_file: Option<String>,
+) -> String {
+ //println!("{:#?}", state);
+
+ hir::infer_run_class(&mut state, &hir);
+
+ let mut uniforms = Vec::new();
+ let mut inputs = Vec::new();
+ let mut outputs = Vec::new();
+
+ for i in &hir {
+ match i {
+ hir::ExternalDeclaration::Declaration(hir::Declaration::InitDeclaratorList(ref d)) => {
+ match &state.sym(d.head.name).decl {
+ hir::SymDecl::Global(storage, ..)
+ if state.used_globals.borrow().contains(&d.head.name) =>
+ {
+ match storage {
+ hir::StorageClass::Uniform | hir::StorageClass::Sampler(..) => {
+ uniforms.push(d.head.name);
+ }
+ hir::StorageClass::In => {
+ inputs.push(d.head.name);
+ }
+ hir::StorageClass::Out | hir::StorageClass::FragColor(_) => {
+ outputs.push(d.head.name);
+ }
+ _ => {}
+ }
+ }
+ _ => {}
+ }
+ }
+ _ => {}
+ }
+ }
+
+ //println!("{:#?}", hir);
+
+ let mut state = OutputState {
+ hir: state,
+ output: String::new(),
+ buffer: RefCell::new(String::new()),
+ indent: 0,
+ should_indent: false,
+ output_cxx: false,
+ mask: None,
+ cond_index: 0,
+ return_type: None,
+ return_declared: false,
+ return_vector: false,
+ is_scalar: Cell::new(false),
+ is_lval: Cell::new(false),
+ name: name.clone(),
+ kind: if is_frag {
+ ShaderKind::Fragment
+ } else {
+ ShaderKind::Vertex
+ },
+ functions: HashMap::new(),
+ deps: RefCell::new(Vec::new()),
+ vector_mask: 0,
+ uses_discard: false,
+ used_fragcoord: Cell::new(0),
+ use_perspective: false,
+ has_draw_span_rgba8: false,
+ has_draw_span_r8: false,
+ used_globals: RefCell::new(Vec::new()),
+ texel_fetches: RefCell::new(Vec::new()),
+ };
+
+ show_translation_unit(&mut state, &hir);
+ let _output_glsl = state.finish_output();
+
+ state.should_indent = true;
+ state.output_cxx = true;
+
+ if state.output_cxx {
+ let part_name = name.to_owned()
+ + match state.kind {
+ ShaderKind::Vertex => "_vert",
+ ShaderKind::Fragment => "_frag",
+ };
+
+ if state.kind == ShaderKind::Vertex {
+ write_common_globals(&mut state, &inputs, &outputs, uniform_indices);
+ write!(state, "struct {0}_vert : VertexShaderImpl, {0}_common {{\nprivate:\n", name);
+ } else {
+ write!(state, "struct {0}_frag : FragmentShaderImpl, {0}_vert {{\nprivate:\n", name);
+ }
+
+ write!(state, "typedef {} Self;\n", part_name);
+
+ show_translation_unit(&mut state, &hir);
+
+ if let Some(include_file) = include_file {
+ write_include_file(&mut state, include_file);
+ }
+
+ let pruned_inputs: Vec<_> = inputs
+ .iter()
+ .filter(|i| state.used_globals.borrow().contains(i))
+ .cloned()
+ .collect();
+
+ if state.kind == ShaderKind::Vertex {
+ write_set_uniform_1i(&mut state, uniform_indices);
+ write_set_uniform_4fv(&mut state, uniform_indices);
+ write_set_uniform_matrix4fv(&mut state, uniform_indices);
+ write_load_attribs(&mut state, &pruned_inputs);
+ write_store_outputs(&mut state, &outputs);
+ } else {
+ write_read_inputs(&mut state, &pruned_inputs);
+ }
+
+ write_abi(&mut state);
+ write!(state, "}};\n\n");
+
+ if state.kind == ShaderKind::Fragment {
+ write!(state, "struct {0}_program : ProgramImpl, {0}_frag {{\n", name);
+ write_get_uniform_index(&mut state, uniform_indices);
+ write!(state, "void bind_attrib(const char* name, int index) override {{\n");
+ write!(state, " attrib_locations.bind_loc(name, index);\n}}\n");
+ write!(state, "int get_attrib(const char* name) const override {{\n");
+ write!(state, " return attrib_locations.get_loc(name);\n}}\n");
+ write!(state, "size_t interpolants_size() const override {{ return sizeof(InterpOutputs); }}\n");
+ write!(state, "VertexShaderImpl* get_vertex_shader() override {{\n");
+ write!(state, " return this;\n}}\n");
+ write!(state, "FragmentShaderImpl* get_fragment_shader() override {{\n");
+ write!(state, " return this;\n}}\n");
+ write!(state, "static ProgramImpl* loader() {{ return new {}_program; }}\n", name);
+ write!(state, "}};\n\n");
+ }
+
+ define_global_consts(&mut state, &hir, &part_name);
+ } else {
+ show_translation_unit(&mut state, &hir);
+ }
+ let output_cxx = state.finish_output();
+
+ //let mut hir = std::fs::File::create("hir").unwrap();
+ //hir.write(output_glsl.as_bytes());
+
+ output_cxx
+}
+
+fn write_get_uniform_index(state: &mut OutputState, uniform_indices: &UniformIndices) {
+ write!(
+ state,
+ "int get_uniform(const char *name) const override {{\n"
+ );
+ for (uniform_name, (index, _, _)) in uniform_indices.iter() {
+ write!(
+ state,
+ " if (strcmp(\"{}\", name) == 0) {{ return {}; }}\n",
+ uniform_name, index
+ );
+ }
+ write!(state, " return -1;\n");
+ write!(state, "}}\n");
+}
+
+fn float4_compatible(ty: hir::TypeKind) -> bool {
+ match ty {
+ hir::TypeKind::Vec4 => true,
+ _ => false,
+ }
+}
+
+fn matrix4_compatible(ty: hir::TypeKind) -> bool {
+ match ty {
+ hir::TypeKind::Mat4 => true,
+ _ => false,
+ }
+}
+
+fn write_program_samplers(state: &mut OutputState, uniform_indices: &UniformIndices) {
+ write!(state, "struct Samplers {{\n");
+ for (name, (_, tk, storage)) in uniform_indices.iter() {
+ match tk {
+ hir::TypeKind::Sampler2D
+ | hir::TypeKind::Sampler2DRect
+ | hir::TypeKind::ISampler2D
+ | hir::TypeKind::Sampler2DArray => {
+ write!(state, " ");
+ show_type_kind(state, &tk);
+ let suffix = if let hir::StorageClass::Sampler(format) = storage {
+ format.type_suffix()
+ } else {
+ None
+ };
+ write!(state, "{}_impl {}_impl;\n", suffix.unwrap_or(""), name);
+ write!(state, " int {}_slot;\n", name);
+ }
+ _ => {}
+ }
+ }
+ write!(
+ state,
+ " bool set_slot(int index, int value) {{\n"
+ );
+ write!(state, " switch (index) {{\n");
+ for (name, (index, tk, _)) in uniform_indices.iter() {
+ match tk {
+ hir::TypeKind::Sampler2D
+ | hir::TypeKind::Sampler2DRect
+ | hir::TypeKind::ISampler2D
+ | hir::TypeKind::Sampler2DArray => {
+ write!(state, " case {}:\n", index);
+ write!(state, " {}_slot = value;\n", name);
+ write!(state, " return true;\n");
+ }
+ _ => {}
+ }
+ }
+ write!(state, " }}\n");
+ write!(state, " return false;\n");
+ write!(state, " }}\n");
+ write!(state, "}} samplers;\n");
+
+}
+
+fn write_bind_textures(state: &mut OutputState, uniforms: &UniformIndices) {
+ write!(state, "void bind_textures() {{\n");
+ for (name, (_, tk, storage)) in uniforms {
+ match storage {
+ hir::StorageClass::Sampler(_format) => {
+ match tk {
+ hir::TypeKind::Sampler2D
+ | hir::TypeKind::Sampler2DRect => write!(state,
+ " {0} = lookup_sampler(&samplers.{0}_impl, samplers.{0}_slot);\n",
+ name),
+ hir::TypeKind::ISampler2D => write!(state,
+ " {0} = lookup_isampler(&samplers.{0}_impl, samplers.{0}_slot);\n",
+ name),
+ hir::TypeKind::Sampler2DArray => write!(state,
+ " {0} = lookup_sampler_array(&samplers.{0}_impl, samplers.{0}_slot);\n",
+ name),
+ _ => {}
+ };
+ }
+ _ => {}
+ }
+ }
+ write!(state, "}}\n");
+}
+
+fn write_set_uniform_1i(
+ state: &mut OutputState,
+ uniforms: &UniformIndices,
+) {
+ write!(
+ state,
+ "static void set_uniform_1i(Self *self, int index, int value) {{\n"
+ );
+ write!(state, " if (self->samplers.set_slot(index, value)) return;\n");
+ write!(state, " switch (index) {{\n");
+ for (name, (index, tk, _)) in uniforms {
+ write!(state, " case {}:\n", index);
+ match tk {
+ hir::TypeKind::Int => write!(
+ state,
+ " self->{} = {}(value);\n",
+ name,
+ tk.cxx_primitive_scalar_type_name().unwrap(),
+ ),
+ _ => write!(state, " assert(0); // {}\n", name),
+ };
+ write!(state, " break;\n");
+ }
+ write!(state, " }}\n");
+ write!(state, "}}\n");
+}
+
+fn write_set_uniform_4fv(
+ state: &mut OutputState,
+ uniforms: &UniformIndices,
+) {
+ write!(
+ state,
+ "static void set_uniform_4fv(Self *self, int index, const float *value) {{\n"
+ );
+ write!(state, " switch (index) {{\n");
+ for (name, (index, tk, _)) in uniforms {
+ write!(state, " case {}:\n", index);
+ if float4_compatible(tk.clone()) {
+ write!(
+ state,
+ " self->{} = {}_scalar(value);\n",
+ name,
+ tk.glsl_primitive_type_name().unwrap(),
+ );
+ } else {
+ write!(state, " assert(0); // {}\n", name);
+ }
+ write!(state, " break;\n");
+ }
+ write!(state, " }}\n");
+ write!(state, "}}\n");
+}
+
+fn write_set_uniform_matrix4fv(
+ state: &mut OutputState,
+ uniforms: &UniformIndices,
+) {
+ write!(
+ state,
+ "static void set_uniform_matrix4fv(Self *self, int index, const float *value) {{\n"
+ );
+ write!(state, " switch (index) {{\n");
+ for (name, (index, tk, _)) in uniforms {
+ write!(state, " case {}:\n", index);
+ if matrix4_compatible(tk.clone()) {
+ write!(
+ state,
+ " self->{} = mat4_scalar::load_from_ptr(value);\n",
+ name
+ );
+ } else {
+ write!(state, " assert(0); // {}\n", name);
+ }
+ write!(state, " break;\n");
+ }
+ write!(state, " }}\n");
+ write!(state, "}}\n");
+}
+
+fn write_bind_attrib_location(state: &mut OutputState, attribs: &[hir::SymRef]) {
+ write!(state, "struct AttribLocations {{\n");
+ for i in attribs {
+ let sym = state.hir.sym(*i);
+ write!(state, " int {} = NULL_ATTRIB;\n", sym.name.as_str());
+ }
+ write!(state, " void bind_loc(const char* name, int index) {{\n");
+ for i in attribs {
+ let sym = state.hir.sym(*i);
+ write!(
+ state,
+ " if (strcmp(\"{0}\", name) == 0) {{ {0} = index; return; }}\n",
+ sym.name.as_str()
+ );
+ }
+ write!(state, " }}\n");
+ write!(state, " int get_loc(const char* name) const {{\n");
+ for i in attribs {
+ let sym = state.hir.sym(*i);
+ write!(state,
+ " if (strcmp(\"{0}\", name) == 0) {{ \
+ return {0} != NULL_ATTRIB ? {0} : -1; \
+ }}\n",
+ sym.name.as_str());
+ }
+ write!(state, " return -1;\n");
+ write!(state, " }}\n");
+ write!(state, "}} attrib_locations;\n");
+}
+
+fn write_common_globals(state: &mut OutputState, attribs: &[hir::SymRef],
+ outputs: &[hir::SymRef], uniforms: &UniformIndices) {
+ write!(state, "struct {}_common {{\n", state.name);
+
+ write_program_samplers(state, uniforms);
+ write_bind_attrib_location(state, attribs);
+
+ let is_scalar = state.is_scalar.replace(true);
+ for i in outputs {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(hir::StorageClass::Out, _, ty, hir::RunClass::Scalar) => {
+ show_type(state, ty);
+ write!(state, " {};\n", sym.name.as_str());
+ }
+ _ => {}
+ }
+ }
+ for (name, (_, tk, storage)) in uniforms {
+ match storage {
+ hir::StorageClass::Sampler(format) => {
+ write!(state,
+ "{}{} {};\n",
+ tk.cxx_primitive_type_name().unwrap(),
+ format.type_suffix().unwrap_or(""),
+ name,
+ );
+ }
+ _ => {
+ show_type_kind(state, tk);
+ write!(state, " {};\n", name);
+ }
+ }
+ }
+ state.is_scalar.set(is_scalar);
+
+ write_bind_textures(state, uniforms);
+
+ write!(state, "}};\n");
+}
+
+//fn type_name(state: &OutputState, ty: &Type) -> String {
+// let buffer = state.push_buffer();
+// show_type(state, ty);
+// state.pop_buffer(buffer)
+//}
+
+fn write_load_attribs(state: &mut OutputState, attribs: &[hir::SymRef]) {
+ write!(state, "static void load_attribs(\
+ Self *self, VertexAttrib *attribs, \
+ uint32_t start, int instance, int count) {{\n");
+ for i in attribs {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(_, _interpolation, _ty, run_class) => {
+ let name = sym.name.as_str();
+ let func = if *run_class == hir::RunClass::Scalar {
+ "load_flat_attrib"
+ } else {
+ "load_attrib"
+ };
+ write!(state,
+ " {0}(self->{1}, attribs[self->attrib_locations.{1}], start, instance, count);\n",
+ func, name);
+ }
+ _ => panic!(),
+ }
+ }
+ write!(state, "}}\n");
+}
+
+fn write_store_outputs(state: &mut OutputState, outputs: &[hir::SymRef]) {
+ let is_scalar = state.is_scalar.replace(true);
+ write!(state, "public:\nstruct InterpOutputs {{\n");
+ for i in outputs {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(_, _, ty, run_class) => {
+ if *run_class != hir::RunClass::Scalar {
+ show_type(state, ty);
+ write!(state, " {};\n", sym.name.as_str());
+ }
+ }
+ _ => panic!(),
+ }
+ }
+
+ write!(state, "}};\nprivate:\n");
+ state.is_scalar.set(is_scalar);
+
+ write!(
+ state,
+ "ALWAYS_INLINE void store_interp_outputs(char* dest_ptr, size_t stride) {{\n"
+ );
+ write!(state, " for(int n = 0; n < 4; n++) {{\n");
+ write!(
+ state,
+ " auto* dest = reinterpret_cast<InterpOutputs*>(dest_ptr);\n"
+ );
+ for i in outputs {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(_, _, _, run_class) => {
+ if *run_class != hir::RunClass::Scalar {
+ let name = sym.name.as_str();
+ write!(state, " dest->{} = get_nth({}, n);\n", name, name);
+ }
+ }
+ _ => panic!(),
+ }
+ }
+ write!(state, " dest_ptr += stride;\n");
+ write!(state, " }}\n");
+ write!(state, "}}\n");
+}
+
+fn write_read_inputs(state: &mut OutputState, inputs: &[hir::SymRef]) {
+ write!(
+ state,
+ "typedef {}_vert::InterpOutputs InterpInputs;\n",
+ state.name
+ );
+
+ write!(state, "InterpInputs interp_step;\n");
+
+ let mut has_varying = false;
+ for i in inputs {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(_, _, ty, run_class) => {
+ if *run_class != hir::RunClass::Scalar {
+ if !has_varying {
+ has_varying = true;
+ write!(state, "struct InterpPerspective {{\n");
+ }
+ show_type(state, ty);
+ write!(state, " {};\n", sym.name.as_str());
+ }
+ }
+ _ => panic!(),
+ }
+ }
+ if has_varying {
+ write!(state, "}};\n");
+ write!(state, "InterpPerspective interp_perspective;\n");
+ }
+
+ write!(state,
+ "static void read_interp_inputs(\
+ Self *self, const InterpInputs *init, const InterpInputs *step, float step_width) {{\n");
+ for i in inputs {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(_, _, _, run_class) => {
+ if *run_class != hir::RunClass::Scalar {
+ let name = sym.name.as_str();
+ write!(
+ state,
+ " self->{0} = init_interp(init->{0}, step->{0});\n",
+ name
+ );
+ write!(
+ state,
+ " self->interp_step.{0} = step->{0} * step_width;\n",
+ name
+ );
+ }
+ }
+ _ => panic!(),
+ }
+ }
+ write!(state, "}}\n");
+
+ let used_fragcoord = state.used_fragcoord.get();
+ if has_varying || (used_fragcoord & (4 | 8)) != 0 {
+ state.use_perspective = true;
+ }
+ if state.use_perspective {
+ write!(state,
+ "static void read_perspective_inputs(\
+ Self *self, const InterpInputs *init, const InterpInputs *step, float step_width) {{\n");
+ if has_varying {
+ write!(state, " Float w = 1.0f / self->gl_FragCoord.w;\n");
+ }
+ for i in inputs {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(_, _, _, run_class) => {
+ if *run_class != hir::RunClass::Scalar {
+ let name = sym.name.as_str();
+ write!(
+ state,
+ " self->interp_perspective.{0} = init_interp(init->{0}, step->{0});\n",
+ name
+ );
+ write!(state, " self->{0} = self->interp_perspective.{0} * w;\n", name);
+ write!(
+ state,
+ " self->interp_step.{0} = step->{0} * step_width;\n",
+ name
+ );
+ }
+ }
+ _ => panic!(),
+ }
+ }
+ write!(state, "}}\n");
+ }
+
+ write!(state, "ALWAYS_INLINE void step_interp_inputs() {{\n");
+ if (used_fragcoord & 1) != 0 {
+ write!(state, " step_fragcoord();\n");
+ }
+ for i in inputs {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(_, _, _, run_class) => {
+ if *run_class != hir::RunClass::Scalar {
+ let name = sym.name.as_str();
+ write!(state, " {0} += interp_step.{0};\n", name);
+ }
+ }
+ _ => panic!(),
+ }
+ }
+ write!(state, "}}\n");
+
+ if state.use_perspective {
+ write!(state, "ALWAYS_INLINE void step_perspective_inputs() {{\n");
+ if (used_fragcoord & 1) != 0 {
+ write!(state, " step_fragcoord();\n");
+ }
+ write!(state, " step_perspective();\n");
+ if has_varying {
+ write!(state, " Float w = 1.0f / gl_FragCoord.w;\n");
+ }
+ for i in inputs {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(_, _, _, run_class) => {
+ if *run_class != hir::RunClass::Scalar {
+ let name = sym.name.as_str();
+ write!(state, " interp_perspective.{0} += interp_step.{0};\n", name);
+ write!(state, " {0} = w * interp_perspective.{0};\n", name);
+ }
+ }
+ _ => panic!(),
+ }
+ }
+ write!(state, "}}\n");
+ }
+
+ if state.has_draw_span_rgba8 || state.has_draw_span_r8 {
+ write!(
+ state,
+ "ALWAYS_INLINE void step_interp_inputs(int chunks) {{\n"
+ );
+ if (used_fragcoord & 1) != 0 {
+ write!(state, " step_fragcoord(chunks);\n");
+ }
+ for i in inputs {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(_, _, _, run_class) => {
+ if *run_class != hir::RunClass::Scalar {
+ let name = sym.name.as_str();
+ write!(state, " {0} += interp_step.{0} * chunks;\n", name);
+ }
+ }
+ _ => panic!(),
+ }
+ }
+ write!(state, "}}\n");
+ }
+}
+
+fn write_include_file(state: &mut OutputState, include_file: String) {
+ let include_contents = std::fs::read_to_string(&include_file).unwrap();
+
+ let mut offset = 0;
+ while offset < include_contents.len() {
+ let s = &include_contents[offset ..];
+ if let Some(start_proto) = s.find("draw_span") {
+ let s = &s[start_proto ..];
+ if let Some(end_proto) = s.find(')') {
+ let proto = &s[.. end_proto];
+ if proto.contains("uint32_t") {
+ state.has_draw_span_rgba8 = true;
+ } else if proto.contains("uint8_t") {
+ state.has_draw_span_r8 = true;
+ }
+ offset += start_proto + end_proto;
+ continue;
+ }
+ }
+ break;
+ }
+
+ let include_name = std::path::Path::new(&include_file)
+ .file_name()
+ .unwrap()
+ .to_string_lossy();
+ write!(state, "\n#include \"{}\"\n\n", include_name);
+}
+
+pub struct OutputState {
+ hir: hir::State,
+ output: String,
+ buffer: RefCell<String>,
+ should_indent: bool,
+ output_cxx: bool,
+ indent: i32,
+ mask: Option<Box<hir::Expr>>,
+ cond_index: usize,
+ return_type: Option<Box<hir::Type>>,
+ return_declared: bool,
+ return_vector: bool,
+ is_scalar: Cell<bool>,
+ is_lval: Cell<bool>,
+ name: String,
+ kind: ShaderKind,
+ functions: HashMap<(hir::SymRef, u32), bool>,
+ deps: RefCell<Vec<(hir::SymRef, u32)>>,
+ vector_mask: u32,
+ uses_discard: bool,
+ used_fragcoord: Cell<i32>,
+ use_perspective: bool,
+ has_draw_span_rgba8: bool,
+ has_draw_span_r8: bool,
+ used_globals: RefCell<Vec<hir::SymRef>>,
+ texel_fetches: RefCell<Vec<(hir::SymRef, hir::SymRef, hir::TexelFetchOffsets)>>,
+}
+
+use std::fmt::{Arguments, Write};
+
+impl OutputState {
+ fn indent(&mut self) {
+ if self.should_indent {
+ self.indent += 1
+ }
+ }
+ fn outdent(&mut self) {
+ if self.should_indent {
+ self.indent -= 1
+ }
+ }
+
+ fn write(&self, s: &str) {
+ self.buffer.borrow_mut().push_str(s);
+ }
+
+ fn flush_buffer(&mut self) {
+ self.output.push_str(&self.buffer.borrow());
+ self.buffer.borrow_mut().clear();
+ }
+
+ fn finish_output(&mut self) -> String {
+ self.flush_buffer();
+
+ let mut s = String::new();
+ mem::swap(&mut self.output, &mut s);
+ s
+ }
+
+ fn push_buffer(&self) -> String {
+ self.buffer.replace(String::new())
+ }
+
+ fn pop_buffer(&self, s: String) -> String {
+ self.buffer.replace(s)
+ }
+
+ fn write_fmt(&self, args: Arguments) {
+ let _ = self.buffer.borrow_mut().write_fmt(args);
+ }
+}
+
+pub fn show_identifier(state: &OutputState, i: &syntax::Identifier) {
+ state.write(&i.0);
+}
+
+fn glsl_primitive_type_name_to_cxx(glsl_name: &str) -> &str {
+ hir::TypeKind::from_glsl_primitive_type_name(glsl_name)
+ .and_then(|kind| kind.cxx_primitive_type_name())
+ .unwrap_or(glsl_name)
+}
+
+fn add_used_global(state: &OutputState, i: &hir::SymRef) {
+ let mut globals = state.used_globals.borrow_mut();
+ if !globals.contains(i) {
+ globals.push(*i);
+ }
+}
+
+pub fn show_sym(state: &OutputState, i: &hir::SymRef) {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::NativeFunction(_, ref cxx_name) => {
+ let mut name = sym.name.as_str();
+ if state.output_cxx {
+ name = cxx_name.unwrap_or(name);
+ }
+ state.write(name);
+ }
+ hir::SymDecl::Global(..) => {
+ if state.output_cxx {
+ add_used_global(state, i);
+ }
+ let mut name = sym.name.as_str();
+ if state.output_cxx {
+ name = glsl_primitive_type_name_to_cxx(name);
+ }
+ state.write(name);
+ }
+ hir::SymDecl::UserFunction(..) | hir::SymDecl::Local(..) | hir::SymDecl::Struct(..) => {
+ let mut name = sym.name.as_str();
+ // we want to replace constructor names
+ if state.output_cxx {
+ name = glsl_primitive_type_name_to_cxx(name);
+ }
+ state.write(name);
+ }
+ }
+}
+
+pub fn show_variable(state: &OutputState, i: &hir::SymRef) {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(_, _, ty, _) => {
+ show_type(state, ty);
+ state.write(" ");
+ let mut name = sym.name.as_str();
+ if state.output_cxx {
+ name = glsl_primitive_type_name_to_cxx(name);
+ }
+ state.write(name);
+ }
+ _ => panic!(),
+ }
+}
+
+pub fn write_default_constructor(state: &OutputState, name: &str) {
+ // write default constructor
+ let _ = write!(state, "{}() = default;\n", name);
+}
+
+pub fn write_constructor(state: &OutputState, name: &str, s: &hir::StructFields) {
+ if s.fields.len() == 1 {
+ state.write("explicit ");
+ }
+ let _ = write!(state, "{}(", name);
+ let mut first_field = true;
+ for field in &s.fields {
+ if !first_field {
+ state.write(", ");
+ }
+ show_type(state, &field.ty);
+ state.write(" ");
+ show_identifier_and_type(state, &field.name, &field.ty);
+ first_field = false;
+ }
+ state.write(") : ");
+
+ let mut first_field = true;
+ for field in &s.fields {
+ if !first_field {
+ state.write(", ");
+ }
+ let _ = write!(state, "{}({})", field.name, field.name);
+ first_field = false;
+ }
+ state.write("{}\n");
+}
+
+pub fn write_convert_constructor(state: &OutputState, name: &str, s: &hir::StructFields) {
+ if s.fields.len() == 1 {
+ state.write("explicit ");
+ }
+ let _ = write!(state, "{}(", name);
+ let mut first_field = true;
+ for field in &s.fields {
+ if !first_field {
+ state.write(", ");
+ }
+
+ let is_scalar = state.is_scalar.replace(true);
+ show_type(state, &field.ty);
+ state.is_scalar.set(is_scalar);
+
+ state.write(" ");
+
+ show_identifier_and_type(state, &field.name, &field.ty);
+ first_field = false;
+ }
+ state.write(")");
+
+ let mut first_field = true;
+ for hir::StructField { ty, name } in &s.fields {
+ if ty.array_sizes.is_none() {
+ if first_field {
+ state.write(":");
+ } else {
+ state.write(",");
+ }
+ let _ = write!(state, "{}({})", name, name);
+ first_field = false;
+ }
+ }
+ state.write("{\n");
+ for hir::StructField { ty, name } in &s.fields {
+ if ty.array_sizes.is_some() {
+ let _ = write!(state, "this->{}.convert({});\n", name, name);
+ }
+ }
+ state.write("}\n");
+
+ let _ = write!(state, "IMPLICIT {}({}_scalar s)", name, name);
+ let mut first_field = true;
+ for hir::StructField { ty, name } in &s.fields {
+ if ty.array_sizes.is_none() {
+ if first_field {
+ state.write(":");
+ } else {
+ state.write(",");
+ }
+ let _ = write!(state, "{}(s.{})", name, name);
+ first_field = false;
+ }
+ }
+ state.write("{\n");
+ for hir::StructField { ty, name } in &s.fields {
+ if ty.array_sizes.is_some() {
+ let _ = write!(state, "{}.convert(s.{});\n", name, name);
+ }
+ }
+ state.write("}\n");
+}
+
+pub fn write_if_then_else(state: &OutputState, name: &str, s: &hir::StructFields) {
+ let _ = write!(
+ state,
+ "friend {} if_then_else(I32 c, {} t, {} e) {{ return {}(\n",
+ name, name, name, name
+ );
+ let mut first_field = true;
+ for field in &s.fields {
+ if !first_field {
+ state.write(", ");
+ }
+ let _ = write!(state, "if_then_else(c, t.{}, e.{})", field.name, field.name);
+ first_field = false;
+ }
+ state.write(");\n}");
+}
+
+pub fn show_storage_class(state: &OutputState, q: &hir::StorageClass) {
+ match *q {
+ hir::StorageClass::None => {}
+ hir::StorageClass::Const => {
+ state.write("const ");
+ }
+ hir::StorageClass::In => {
+ state.write("in ");
+ }
+ hir::StorageClass::Out => {
+ state.write("out ");
+ }
+ hir::StorageClass::FragColor(index) => {
+ write!(state, "layout(location = 0, index = {}) out ", index);
+ }
+ hir::StorageClass::Uniform | hir::StorageClass::Sampler(..) => {
+ state.write("uniform ");
+ }
+ }
+}
+
+pub fn show_sym_decl(state: &OutputState, i: &hir::SymRef) {
+ let sym = state.hir.sym(*i);
+ match &sym.decl {
+ hir::SymDecl::Global(storage, ..) => {
+ if !state.output_cxx {
+ show_storage_class(state, storage)
+ }
+ if storage == &hir::StorageClass::Const {
+ state.write("static constexpr ");
+ }
+ let mut name = sym.name.as_str();
+ if state.output_cxx {
+ name = glsl_primitive_type_name_to_cxx(name);
+ }
+ state.write(name);
+ }
+ hir::SymDecl::Local(storage, ..) => {
+ if !state.output_cxx {
+ show_storage_class(state, storage)
+ }
+ if storage == &hir::StorageClass::Const {
+ state.write("const ");
+ }
+ let mut name = sym.name.as_str();
+ if state.output_cxx {
+ name = glsl_primitive_type_name_to_cxx(name);
+ }
+ state.write(name);
+ }
+ hir::SymDecl::Struct(s) => {
+ let name = sym.name.as_str();
+
+ if state.output_cxx {
+ let name_scalar = format!("{}_scalar", name);
+ write!(state, "struct {} {{\n", name_scalar);
+ let is_scalar = state.is_scalar.replace(true);
+ for field in &s.fields {
+ show_struct_field(state, field);
+ }
+ write_default_constructor(state, &name_scalar);
+ write_constructor(state, &name_scalar, s);
+ state.is_scalar.set(is_scalar);
+ state.write("};\n");
+ }
+
+ write!(state, "struct {} {{\n", name);
+ for field in &s.fields {
+ show_struct_field(state, field);
+ }
+
+ // write if_then_else
+ if state.output_cxx {
+ write_default_constructor(state, name);
+ write_constructor(state, name, s);
+ write_convert_constructor(state, name, s);
+ write_if_then_else(state, name, s);
+ }
+ state.write("}");
+ }
+ _ => panic!(),
+ }
+}
+
+pub fn show_type_name(state: &OutputState, t: &syntax::TypeName) {
+ state.write(&t.0);
+}
+
+pub fn show_type_specifier_non_array(state: &mut OutputState, t: &syntax::TypeSpecifierNonArray) {
+ if let Some(kind) = hir::TypeKind::from_primitive_type_specifier(t) {
+ show_type_kind(state, &kind);
+ } else {
+ match t {
+ syntax::TypeSpecifierNonArray::Struct(ref _s) => panic!(), //show_struct_non_declaration(state, s),
+ syntax::TypeSpecifierNonArray::TypeName(ref tn) => show_type_name(state, tn),
+ _ => unreachable!(),
+ }
+ }
+}
+
+pub fn show_type_kind(state: &OutputState, t: &hir::TypeKind) {
+ if state.output_cxx {
+ if state.is_scalar.get() {
+ if let Some(name) = t.cxx_primitive_scalar_type_name() {
+ state.write(name);
+ } else if let Some(name) = t.cxx_primitive_type_name() {
+ let mut scalar_name = String::from(name);
+ scalar_name.push_str("_scalar");
+ state.write(scalar_name.as_str());
+ } else {
+ match t {
+ hir::TypeKind::Struct(ref s) => {
+ let mut scalar_name = String::from(state.hir.sym(*s).name.as_str());
+ scalar_name.push_str("_scalar");
+ state.write(scalar_name.as_str());
+ }
+ _ => unreachable!(),
+ }
+ }
+ } else if let Some(name) = t.cxx_primitive_type_name() {
+ state.write(name);
+ } else {
+ match t {
+ hir::TypeKind::Struct(ref s) => {
+ state.write(state.hir.sym(*s).name.as_str());
+ }
+ _ => unreachable!(),
+ }
+ }
+ } else if let Some(name) = t.glsl_primitive_type_name() {
+ state.write(name);
+ } else {
+ match t {
+ hir::TypeKind::Struct(ref s) => {
+ state.write(state.hir.sym(*s).name.as_str());
+ }
+ _ => unreachable!(),
+ }
+ }
+}
+
+pub fn show_type_specifier(state: &mut OutputState, t: &syntax::TypeSpecifier) {
+ show_type_specifier_non_array(state, &t.ty);
+
+ if let Some(ref arr_spec) = t.array_specifier {
+ show_array_spec(state, arr_spec);
+ }
+}
+
+pub fn show_type(state: &OutputState, t: &Type) {
+ if !state.output_cxx {
+ if let Some(ref precision) = t.precision {
+ show_precision_qualifier(state, precision);
+ state.write(" ");
+ }
+ }
+
+ if state.output_cxx {
+ if let Some(ref array) = t.array_sizes {
+ state.write("Array<");
+ show_type_kind(state, &t.kind);
+ let size = match &array.sizes[..] {
+ [size] => size,
+ _ => panic!(),
+ };
+ state.write(",");
+ show_hir_expr(state, size);
+ state.write(">");
+ } else {
+ show_type_kind(state, &t.kind);
+ }
+ } else {
+ show_type_kind(state, &t.kind);
+ }
+
+ /*if let Some(ref arr_spec) = t.array_sizes {
+ panic!();
+ }*/
+}
+
+/*pub fn show_fully_specified_type(state: &mut OutputState, t: &FullySpecifiedType) {
+ state.flat = false;
+ if let Some(ref qual) = t.qualifier {
+ if !state.output_cxx {
+ show_type_qualifier(state, &qual);
+ } else {
+ state.flat =
+ qual.qualifiers.0.iter()
+ .flat_map(|q| match q { syntax::TypeQualifierSpec::Interpolation(Flat) => Some(()), _ => None})
+ .next().is_some();
+ }
+ state.write(" ");
+ }
+
+ show_type_specifier(state, &t.ty);
+}*/
+
+/*pub fn show_struct_non_declaration(state: &mut OutputState, s: &syntax::StructSpecifier) {
+ state.write("struct ");
+
+ if let Some(ref name) = s.name {
+ let _ = write!(state, "{} ", name);
+ }
+
+ state.write("{\n");
+
+ for field in &s.fields.0 {
+ show_struct_field(state, field);
+ }
+
+ state.write("}");
+}*/
+
+pub fn show_struct(_state: &OutputState, _s: &syntax::StructSpecifier) {
+ panic!();
+ //show_struct_non_declaration(state, s);
+ //state.write(";\n");
+}
+
+pub fn show_struct_field(state: &OutputState, field: &hir::StructField) {
+ show_type(state, &field.ty);
+ state.write(" ");
+
+ show_identifier_and_type(state, &field.name, &field.ty);
+
+ state.write(";\n");
+}
+
+pub fn show_array_spec(state: &OutputState, a: &syntax::ArraySpecifier) {
+ match *a {
+ syntax::ArraySpecifier::Unsized => {
+ state.write("[]");
+ }
+ syntax::ArraySpecifier::ExplicitlySized(ref e) => {
+ state.write("[");
+ show_expr(state, &e);
+ state.write("]");
+ }
+ }
+}
+
+pub fn show_identifier_and_type(state: &OutputState, ident: &syntax::Identifier, ty: &hir::Type) {
+ let _ = write!(state, "{}", ident);
+
+ if !state.output_cxx {
+ if let Some(ref arr_spec) = ty.array_sizes {
+ show_array_sizes(state, &arr_spec);
+ }
+ }
+}
+
+pub fn show_arrayed_identifier(state: &OutputState, ident: &syntax::ArrayedIdentifier) {
+ let _ = write!(state, "{}", ident.ident);
+
+ if let Some(ref arr_spec) = ident.array_spec {
+ show_array_spec(state, &arr_spec);
+ }
+}
+
+pub fn show_array_sizes(state: &OutputState, a: &hir::ArraySizes) {
+ state.write("[");
+ match &a.sizes[..] {
+ [a] => show_hir_expr(state, a),
+ _ => panic!(),
+ }
+
+ state.write("]");
+ /*
+ match *a {
+ syntax::ArraySpecifier::Unsized => { state.write("[]"); }
+ syntax::ArraySpecifier::ExplicitlySized(ref e) => {
+ state.write("[");
+ show_expr(state, &e);
+ state.write("]");
+ }
+ }*/
+}
+
+pub fn show_type_qualifier(state: &OutputState, q: &hir::TypeQualifier) {
+ let mut qualifiers = q.qualifiers.0.iter();
+ let first = qualifiers.next().unwrap();
+
+ show_type_qualifier_spec(state, first);
+
+ for qual_spec in qualifiers {
+ state.write(" ");
+ show_type_qualifier_spec(state, qual_spec)
+ }
+}
+
+pub fn show_type_qualifier_spec(state: &OutputState, q: &hir::TypeQualifierSpec) {
+ match *q {
+ hir::TypeQualifierSpec::Layout(ref l) => show_layout_qualifier(state, &l),
+ hir::TypeQualifierSpec::Parameter(ref _p) => panic!(),
+ hir::TypeQualifierSpec::Memory(ref _m) => panic!(),
+ hir::TypeQualifierSpec::Invariant => {
+ state.write("invariant");
+ }
+ hir::TypeQualifierSpec::Precise => {
+ state.write("precise");
+ }
+ }
+}
+
+pub fn show_syntax_storage_qualifier(state: &OutputState, q: &syntax::StorageQualifier) {
+ match *q {
+ syntax::StorageQualifier::Const => {
+ state.write("const");
+ }
+ syntax::StorageQualifier::InOut => {
+ state.write("inout");
+ }
+ syntax::StorageQualifier::In => {
+ state.write("in");
+ }
+ syntax::StorageQualifier::Out => {
+ state.write("out");
+ }
+ syntax::StorageQualifier::Centroid => {
+ state.write("centroid");
+ }
+ syntax::StorageQualifier::Patch => {
+ state.write("patch");
+ }
+ syntax::StorageQualifier::Sample => {
+ state.write("sample");
+ }
+ syntax::StorageQualifier::Uniform => {
+ state.write("uniform");
+ }
+ syntax::StorageQualifier::Attribute => {
+ state.write("attribute");
+ }
+ syntax::StorageQualifier::Varying => {
+ state.write("varying");
+ }
+ syntax::StorageQualifier::Buffer => {
+ state.write("buffer");
+ }
+ syntax::StorageQualifier::Shared => {
+ state.write("shared");
+ }
+ syntax::StorageQualifier::Coherent => {
+ state.write("coherent");
+ }
+ syntax::StorageQualifier::Volatile => {
+ state.write("volatile");
+ }
+ syntax::StorageQualifier::Restrict => {
+ state.write("restrict");
+ }
+ syntax::StorageQualifier::ReadOnly => {
+ state.write("readonly");
+ }
+ syntax::StorageQualifier::WriteOnly => {
+ state.write("writeonly");
+ }
+ syntax::StorageQualifier::Subroutine(ref n) => show_subroutine(state, &n),
+ }
+}
+
+pub fn show_subroutine(state: &OutputState, types: &[syntax::TypeName]) {
+ state.write("subroutine");
+
+ if !types.is_empty() {
+ state.write("(");
+
+ let mut types_iter = types.iter();
+ let first = types_iter.next().unwrap();
+
+ show_type_name(state, first);
+
+ for type_name in types_iter {
+ state.write(", ");
+ show_type_name(state, type_name);
+ }
+
+ state.write(")");
+ }
+}
+
+pub fn show_layout_qualifier(state: &OutputState, l: &syntax::LayoutQualifier) {
+ let mut qualifiers = l.ids.0.iter();
+ let first = qualifiers.next().unwrap();
+
+ state.write("layout (");
+ show_layout_qualifier_spec(state, first);
+
+ for qual_spec in qualifiers {
+ state.write(", ");
+ show_layout_qualifier_spec(state, qual_spec);
+ }
+
+ state.write(")");
+}
+
+pub fn show_layout_qualifier_spec(state: &OutputState, l: &syntax::LayoutQualifierSpec) {
+ match *l {
+ syntax::LayoutQualifierSpec::Identifier(ref i, Some(ref e)) => {
+ let _ = write!(state, "{} = ", i);
+ show_expr(state, &e);
+ }
+ syntax::LayoutQualifierSpec::Identifier(ref i, None) => show_identifier(state, &i),
+ syntax::LayoutQualifierSpec::Shared => {
+ state.write("shared");
+ }
+ }
+}
+
+pub fn show_precision_qualifier(state: &OutputState, p: &syntax::PrecisionQualifier) {
+ match *p {
+ syntax::PrecisionQualifier::High => {
+ state.write("highp");
+ }
+ syntax::PrecisionQualifier::Medium => {
+ state.write("mediump");
+ }
+ syntax::PrecisionQualifier::Low => {
+ state.write("low");
+ }
+ }
+}
+
+pub fn show_interpolation_qualifier(state: &OutputState, i: &syntax::InterpolationQualifier) {
+ match *i {
+ syntax::InterpolationQualifier::Smooth => {
+ state.write("smooth");
+ }
+ syntax::InterpolationQualifier::Flat => {
+ state.write("flat");
+ }
+ syntax::InterpolationQualifier::NoPerspective => {
+ state.write("noperspective");
+ }
+ }
+}
+
+pub fn show_parameter_qualifier(state: &mut OutputState, i: &Option<hir::ParameterQualifier>) {
+ if let Some(i) = i {
+ if state.output_cxx {
+ match *i {
+ hir::ParameterQualifier::Out => {
+ state.write("&");
+ }
+ hir::ParameterQualifier::InOut => {
+ state.write("&");
+ }
+ _ => {}
+ }
+ } else {
+ match *i {
+ hir::ParameterQualifier::Const => {
+ state.write("const");
+ }
+ hir::ParameterQualifier::In => {
+ state.write("in");
+ }
+ hir::ParameterQualifier::Out => {
+ state.write("out");
+ }
+ hir::ParameterQualifier::InOut => {
+ state.write("inout");
+ }
+ }
+ }
+ }
+}
+
+pub fn show_float(state: &OutputState, x: f32) {
+ if x.fract() == 0. {
+ write!(state, "{}.f", x);
+ } else {
+ write!(state, "{}f", x);
+ }
+}
+
+pub fn show_double(state: &OutputState, x: f64) {
+ // force doubles to print as floats
+ if x.fract() == 0. {
+ write!(state, "{}.f", x);
+ } else {
+ write!(state, "{}f", x);
+ }
+}
+
+trait SwizzelSelectorExt {
+ fn to_args(&self) -> String;
+}
+
+impl SwizzelSelectorExt for SwizzleSelector {
+ fn to_args(&self) -> String {
+ let mut s = Vec::new();
+ let fs = match self.field_set {
+ hir::FieldSet::Rgba => ["R", "G", "B", "A"],
+ hir::FieldSet::Xyzw => ["X", "Y", "Z", "W"],
+ hir::FieldSet::Stpq => ["S", "T", "P", "Q"],
+ };
+ for i in &self.components {
+ s.push(fs[*i as usize])
+ }
+ s.join(", ")
+ }
+}
+
+fn expr_run_class(state: &OutputState, expr: &hir::Expr) -> hir::RunClass {
+ match &expr.kind {
+ hir::ExprKind::Variable(i) => symbol_run_class(&state.hir.sym(*i).decl, state.vector_mask),
+ hir::ExprKind::IntConst(_)
+ | hir::ExprKind::UIntConst(_)
+ | hir::ExprKind::BoolConst(_)
+ | hir::ExprKind::FloatConst(_)
+ | hir::ExprKind::DoubleConst(_) => hir::RunClass::Scalar,
+ hir::ExprKind::Unary(_, ref e) => expr_run_class(state, e),
+ hir::ExprKind::Binary(_, ref l, ref r) => {
+ expr_run_class(state, l).merge(expr_run_class(state, r))
+ }
+ hir::ExprKind::Ternary(ref c, ref s, ref e) => expr_run_class(state, c)
+ .merge(expr_run_class(state, s))
+ .merge(expr_run_class(state, e)),
+ hir::ExprKind::Assignment(ref v, _, ref e) => {
+ expr_run_class(state, v).merge(expr_run_class(state, e))
+ }
+ hir::ExprKind::Bracket(ref e, ref indx) => {
+ expr_run_class(state, e).merge(expr_run_class(state, indx))
+ }
+ hir::ExprKind::FunCall(ref fun, ref args) => {
+ let arg_mask: u32 = args.iter().enumerate().fold(0, |mask, (idx, e)| {
+ if expr_run_class(state, e) == hir::RunClass::Vector {
+ mask | (1 << idx)
+ } else {
+ mask
+ }
+ });
+ match fun {
+ hir::FunIdentifier::Identifier(ref sym) => match &state.hir.sym(*sym).decl {
+ hir::SymDecl::NativeFunction(..) => {
+ if arg_mask != 0 {
+ hir::RunClass::Vector
+ } else {
+ hir::RunClass::Scalar
+ }
+ }
+ hir::SymDecl::UserFunction(ref fd, ref run_class) => {
+ let param_mask: u32 = fd.prototype.parameters.iter().enumerate().fold(
+ arg_mask,
+ |mask, (idx, param)| {
+ if let hir::FunctionParameterDeclaration::Named(Some(qual), p) =
+ param
+ {
+ match qual {
+ hir::ParameterQualifier::InOut
+ | hir::ParameterQualifier::Out => {
+ if symbol_run_class(
+ &state.hir.sym(p.sym).decl,
+ arg_mask,
+ ) == hir::RunClass::Vector
+ {
+ mask | (1 << idx)
+ } else {
+ mask
+ }
+ }
+ _ => mask,
+ }
+ } else {
+ mask
+ }
+ },
+ );
+ match *run_class {
+ hir::RunClass::Scalar => hir::RunClass::Scalar,
+ hir::RunClass::Dependent(mask) => {
+ if (mask & param_mask) != 0 {
+ hir::RunClass::Vector
+ } else {
+ hir::RunClass::Scalar
+ }
+ }
+ _ => hir::RunClass::Vector,
+ }
+ }
+ hir::SymDecl::Struct(..) => {
+ if arg_mask != 0 {
+ hir::RunClass::Vector
+ } else {
+ hir::RunClass::Scalar
+ }
+ }
+ _ => panic!(),
+ },
+ hir::FunIdentifier::Constructor(..) => {
+ if arg_mask != 0 {
+ hir::RunClass::Vector
+ } else {
+ hir::RunClass::Scalar
+ }
+ }
+ }
+ }
+ hir::ExprKind::Dot(ref e, _) => expr_run_class(state, e),
+ hir::ExprKind::SwizzleSelector(ref e, _) => expr_run_class(state, e),
+ hir::ExprKind::PostInc(ref e) => expr_run_class(state, e),
+ hir::ExprKind::PostDec(ref e) => expr_run_class(state, e),
+ hir::ExprKind::Comma(_, ref e) => expr_run_class(state, e),
+ hir::ExprKind::Cond(_, ref e) => expr_run_class(state, e),
+ hir::ExprKind::CondMask => hir::RunClass::Vector,
+ }
+}
+
+pub fn show_hir_expr(state: &OutputState, expr: &hir::Expr) {
+ show_hir_expr_inner(state, expr, false);
+}
+
+pub fn show_hir_expr_inner(state: &OutputState, expr: &hir::Expr, top_level: bool) {
+ match expr.kind {
+ hir::ExprKind::Variable(ref i) => show_sym(state, i),
+ hir::ExprKind::IntConst(ref x) => {
+ let _ = write!(state, "{}", x);
+ }
+ hir::ExprKind::UIntConst(ref x) => {
+ let _ = write!(state, "{}u", x);
+ }
+ hir::ExprKind::BoolConst(ref x) => {
+ let _ = write!(state, "{}", x);
+ }
+ hir::ExprKind::FloatConst(ref x) => show_float(state, *x),
+ hir::ExprKind::DoubleConst(ref x) => show_double(state, *x),
+ hir::ExprKind::Unary(ref op, ref e) => {
+ show_unary_op(state, &op);
+ state.write("(");
+ show_hir_expr(state, &e);
+ state.write(")");
+ }
+ hir::ExprKind::Binary(ref op, ref l, ref r) => {
+ state.write("(");
+ show_hir_expr(state, &l);
+ state.write(")");
+ show_binary_op(state, &op);
+ state.write("(");
+ show_hir_expr(state, &r);
+ state.write(")");
+ }
+ hir::ExprKind::Ternary(ref c, ref s, ref e) => {
+ if state.output_cxx && expr_run_class(state, c) != hir::RunClass::Scalar {
+ state.write("if_then_else(");
+ show_hir_expr(state, &c);
+ state.write(", ");
+ show_hir_expr(state, &s);
+ state.write(", ");
+ show_hir_expr(state, &e);
+ state.write(")");
+ } else {
+ show_hir_expr(state, &c);
+ state.write(" ? ");
+ show_hir_expr(state, &s);
+ state.write(" : ");
+ show_hir_expr(state, &e);
+ }
+ }
+ hir::ExprKind::Assignment(ref v, ref op, ref e) => {
+ let is_output = hir::is_output(v, &state.hir).is_some();
+ let is_scalar_var = expr_run_class(state, v) == hir::RunClass::Scalar;
+ let is_scalar_expr = expr_run_class(state, e) == hir::RunClass::Scalar;
+ let force_scalar = is_scalar_var && !is_scalar_expr;
+
+ if let Some(mask) = &state.mask {
+ let is_scalar_mask = expr_run_class(state, mask) == hir::RunClass::Scalar;
+ let force_scalar_mask = is_scalar_var && is_scalar_expr && !is_scalar_mask;
+
+ if force_scalar || force_scalar_mask {
+ if top_level {
+ state.write("if (");
+ } else {
+ state.write("(");
+ }
+ } else {
+ state.is_lval.set(true);
+ show_hir_expr(state, &v);
+ state.is_lval.set(false);
+ state.write(" = if_then_else(");
+ }
+
+ if is_output && state.return_declared {
+ state.write("((");
+ show_hir_expr(state, mask);
+ state.write(")&ret_mask)");
+ } else {
+ show_hir_expr(state, mask);
+ }
+ if force_scalar || force_scalar_mask {
+ if top_level {
+ state.write("[0]) { ");
+ } else {
+ state.write("[0] ? ");
+ }
+ state.is_lval.set(true);
+ show_hir_expr(state, &v);
+ state.is_lval.set(false);
+ state.write(" = ");
+ } else {
+ state.write(",");
+ }
+
+ if op != &syntax::AssignmentOp::Equal {
+ show_hir_expr(state, &v);
+ }
+
+ match *op {
+ syntax::AssignmentOp::Equal => {}
+ syntax::AssignmentOp::Mult => {
+ state.write("*");
+ }
+ syntax::AssignmentOp::Div => {
+ state.write("/");
+ }
+ syntax::AssignmentOp::Mod => {
+ state.write("%");
+ }
+ syntax::AssignmentOp::Add => {
+ state.write("+");
+ }
+ syntax::AssignmentOp::Sub => {
+ state.write("-");
+ }
+ syntax::AssignmentOp::LShift => {
+ state.write("<<");
+ }
+ syntax::AssignmentOp::RShift => {
+ state.write(">>");
+ }
+ syntax::AssignmentOp::And => {
+ state.write("&");
+ }
+ syntax::AssignmentOp::Xor => {
+ state.write("^");
+ }
+ syntax::AssignmentOp::Or => {
+ state.write("|");
+ }
+ }
+ if force_scalar {
+ state.write("force_scalar(");
+ }
+ show_hir_expr(state, &e);
+ if force_scalar {
+ state.write(")");
+ }
+ if force_scalar || force_scalar_mask {
+ if top_level {
+ state.write("; }");
+ } else {
+ state.write(" : ");
+ show_hir_expr(state, &v);
+ state.write(")");
+ }
+ } else {
+ state.write(",");
+ show_hir_expr(state, &v);
+ state.write(")");
+ }
+ } else {
+ state.is_lval.set(true);
+ show_hir_expr(state, &v);
+ state.is_lval.set(false);
+ state.write(" ");
+
+ if is_output && state.return_declared {
+ state.write("= ");
+ if force_scalar {
+ state.write("force_scalar(");
+ }
+ state.write("if_then_else(ret_mask,");
+
+ if op != &syntax::AssignmentOp::Equal {
+ show_hir_expr(state, &v);
+ }
+
+ match *op {
+ syntax::AssignmentOp::Equal => {}
+ syntax::AssignmentOp::Mult => {
+ state.write("*");
+ }
+ syntax::AssignmentOp::Div => {
+ state.write("/");
+ }
+ syntax::AssignmentOp::Mod => {
+ state.write("%");
+ }
+ syntax::AssignmentOp::Add => {
+ state.write("+");
+ }
+ syntax::AssignmentOp::Sub => {
+ state.write("-");
+ }
+ syntax::AssignmentOp::LShift => {
+ state.write("<<");
+ }
+ syntax::AssignmentOp::RShift => {
+ state.write(">>");
+ }
+ syntax::AssignmentOp::And => {
+ state.write("&");
+ }
+ syntax::AssignmentOp::Xor => {
+ state.write("^");
+ }
+ syntax::AssignmentOp::Or => {
+ state.write("|");
+ }
+ }
+ show_hir_expr(state, &e);
+ state.write(",");
+ show_hir_expr(state, &v);
+ state.write(")");
+ } else {
+ show_assignment_op(state, &op);
+ state.write(" ");
+ if force_scalar {
+ state.write("force_scalar(");
+ }
+ show_hir_expr(state, &e);
+ }
+
+ if force_scalar {
+ state.write(")");
+ }
+ }
+ }
+ hir::ExprKind::Bracket(ref e, ref indx) => {
+ show_hir_expr(state, &e);
+ state.write("[");
+ show_hir_expr(state, indx);
+ state.write("]");
+ }
+ hir::ExprKind::FunCall(ref fun, ref args) => {
+ let mut cond_mask: u32 = 0;
+ let mut adapt_mask: u32 = 0;
+ let mut has_ret = false;
+ let mut array_constructor = false;
+
+ let mut arg_mask: u32 = 0;
+ for (idx, e) in args.iter().enumerate() {
+ if expr_run_class(state, e) == hir::RunClass::Vector {
+ arg_mask |= 1 << idx;
+ }
+ }
+
+ match fun {
+ hir::FunIdentifier::Constructor(t) => {
+ let is_scalar = state.is_scalar.replace(arg_mask == 0);
+ show_type(state, t);
+ state.is_scalar.set(is_scalar);
+ array_constructor = t.array_sizes.is_some();
+ }
+ hir::FunIdentifier::Identifier(name) => {
+ if state.output_cxx {
+ let sym = state.hir.sym(*name);
+ match &sym.decl {
+ hir::SymDecl::NativeFunction(..) => {
+ if sym.name == "texelFetchOffset" && args.len() >= 4 {
+ if let Some((sampler, base, x, y)) = hir::get_texel_fetch_offset(
+ &state.hir, &args[0], &args[1], &args[3],
+ ) {
+ let base_sym = state.hir.sym(base);
+ if symbol_run_class(&base_sym.decl, state.vector_mask)
+ == hir::RunClass::Scalar
+ {
+ let sampler_sym = state.hir.sym(sampler);
+ add_used_global(state, &sampler);
+ if let hir::SymDecl::Global(..) = &base_sym.decl {
+ add_used_global(state, &base);
+ }
+ if y != 0 {
+ write!(
+ state,
+ "{}_{}_fetch[{}+{}*{}->stride]",
+ sampler_sym.name,
+ base_sym.name,
+ x,
+ y,
+ sampler_sym.name
+ );
+ } else {
+ write!(
+ state,
+ "{}_{}_fetch[{}]",
+ sampler_sym.name, base_sym.name, x
+ );
+ }
+ return;
+ }
+ }
+ }
+ show_sym(state, name)
+ }
+ hir::SymDecl::UserFunction(ref fd, ref _run_class) => {
+ if (state.mask.is_some() || state.return_declared) &&
+ !fd.globals.is_empty()
+ {
+ cond_mask |= 1 << 31;
+ }
+ let mut param_mask: u32 = 0;
+ for (idx, (param, e)) in
+ fd.prototype.parameters.iter().zip(args.iter()).enumerate()
+ {
+ if let hir::FunctionParameterDeclaration::Named(qual, p) = param
+ {
+ if symbol_run_class(&state.hir.sym(p.sym).decl, arg_mask)
+ == hir::RunClass::Vector
+ {
+ param_mask |= 1 << idx;
+ }
+ match qual {
+ Some(hir::ParameterQualifier::InOut)
+ | Some(hir::ParameterQualifier::Out) => {
+ if state.mask.is_some() || state.return_declared {
+ cond_mask |= 1 << idx;
+ }
+ if (!arg_mask & param_mask & (1 << idx)) != 0 {
+ if adapt_mask == 0 {
+ state.write(if top_level {
+ "{ "
+ } else {
+ "({ "
+ });
+ }
+ show_type(state, &p.ty);
+ write!(state, " _arg{}_ = ", idx);
+ show_hir_expr(state, e);
+ state.write("; ");
+ adapt_mask |= 1 << idx;
+ }
+ }
+ _ => {}
+ }
+ }
+ }
+ if adapt_mask != 0 &&
+ fd.prototype.ty.kind != hir::TypeKind::Void &&
+ !top_level
+ {
+ state.write("auto _ret_ = ");
+ has_ret = true;
+ }
+ show_sym(state, name);
+ let mut deps = state.deps.borrow_mut();
+ let dep_key = (
+ *name,
+ if cond_mask != 0 {
+ param_mask | (1 << 31)
+ } else {
+ param_mask
+ },
+ );
+ if !deps.contains(&dep_key) {
+ deps.push(dep_key);
+ }
+ }
+ hir::SymDecl::Struct(..) => {
+ show_sym(state, name);
+ if arg_mask == 0 {
+ state.write("_scalar");
+ }
+ }
+ _ => panic!("bad identifier to function call"),
+ }
+ }
+ }
+ }
+
+ if array_constructor {
+ state.write("{{");
+ } else {
+ state.write("(");
+ }
+
+ for (idx, e) in args.iter().enumerate() {
+ if idx != 0 {
+ state.write(", ");
+ }
+ if (adapt_mask & (1 << idx)) != 0 {
+ write!(state, "_arg{}_", idx);
+ } else {
+ show_hir_expr(state, e);
+ }
+ }
+
+ if cond_mask != 0 {
+ if !args.is_empty() {
+ state.write(", ");
+ }
+ if let Some(mask) = &state.mask {
+ if state.return_declared {
+ state.write("(");
+ show_hir_expr(state, mask);
+ state.write(")&ret_mask");
+ } else {
+ show_hir_expr(state, mask);
+ }
+ } else if state.return_declared {
+ state.write("ret_mask");
+ } else {
+ state.write("~0");
+ }
+ }
+
+ if array_constructor {
+ state.write("}}");
+ } else {
+ state.write(")");
+ }
+
+ if adapt_mask != 0 {
+ state.write("; ");
+ for (idx, e) in args.iter().enumerate() {
+ if (adapt_mask & (1 << idx)) != 0 {
+ state.is_lval.set(true);
+ show_hir_expr(state, e);
+ state.is_lval.set(false);
+ write!(state, " = force_scalar(_arg{}_); ", idx);
+ }
+ }
+ if has_ret {
+ state.write("_ret_; })");
+ } else {
+ state.write(if top_level { "}" } else { "})" });
+ }
+ }
+ }
+ hir::ExprKind::Dot(ref e, ref i) => {
+ state.write("(");
+ show_hir_expr(state, &e);
+ state.write(")");
+ state.write(".");
+ show_identifier(state, i);
+ }
+ hir::ExprKind::SwizzleSelector(ref e, ref s) => {
+ if state.output_cxx {
+ if let hir::ExprKind::Variable(ref sym) = &e.kind {
+ if state.hir.sym(*sym).name == "gl_FragCoord" {
+ state.used_fragcoord.set(
+ s.components.iter().fold(
+ state.used_fragcoord.get(),
+ |used, c| used | (1 << c)));
+ }
+ }
+ state.write("(");
+ show_hir_expr(state, &e);
+ if state.is_lval.get() && s.components.len() > 1 {
+ state.write(").lsel(");
+ } else {
+ state.write(").sel(");
+ }
+ state.write(&s.to_args());
+ state.write(")");
+ } else {
+ state.write("(");
+ show_hir_expr(state, &e);
+ state.write(")");
+ state.write(".");
+ state.write(&s.to_string());
+ }
+ }
+ hir::ExprKind::PostInc(ref e) => {
+ show_hir_expr(state, &e);
+ state.write("++");
+ }
+ hir::ExprKind::PostDec(ref e) => {
+ show_hir_expr(state, &e);
+ state.write("--");
+ }
+ hir::ExprKind::Comma(ref a, ref b) => {
+ show_hir_expr(state, &a);
+ state.write(", ");
+ show_hir_expr(state, &b);
+ }
+ hir::ExprKind::Cond(index, _) => {
+ write!(state, "_c{}_", index);
+ }
+ hir::ExprKind::CondMask => {
+ state.write("_cond_mask_");
+ }
+ }
+}
+
+pub fn show_expr(state: &OutputState, expr: &syntax::Expr) {
+ match *expr {
+ syntax::Expr::Variable(ref i) => show_identifier(state, &i),
+ syntax::Expr::IntConst(ref x) => {
+ let _ = write!(state, "{}", x);
+ }
+ syntax::Expr::UIntConst(ref x) => {
+ let _ = write!(state, "{}u", x);
+ }
+ syntax::Expr::BoolConst(ref x) => {
+ let _ = write!(state, "{}", x);
+ }
+ syntax::Expr::FloatConst(ref x) => show_float(state, *x),
+ syntax::Expr::DoubleConst(ref x) => show_double(state, *x),
+ syntax::Expr::Unary(ref op, ref e) => {
+ show_unary_op(state, &op);
+ state.write("(");
+ show_expr(state, &e);
+ state.write(")");
+ }
+ syntax::Expr::Binary(ref op, ref l, ref r) => {
+ state.write("(");
+ show_expr(state, &l);
+ state.write(")");
+ show_binary_op(state, &op);
+ state.write("(");
+ show_expr(state, &r);
+ state.write(")");
+ }
+ syntax::Expr::Ternary(ref c, ref s, ref e) => {
+ show_expr(state, &c);
+ state.write(" ? ");
+ show_expr(state, &s);
+ state.write(" : ");
+ show_expr(state, &e);
+ }
+ syntax::Expr::Assignment(ref v, ref op, ref e) => {
+ show_expr(state, &v);
+ state.write(" ");
+ show_assignment_op(state, &op);
+ state.write(" ");
+ show_expr(state, &e);
+ }
+ syntax::Expr::Bracket(ref e, ref a) => {
+ show_expr(state, &e);
+ show_array_spec(state, &a);
+ }
+ syntax::Expr::FunCall(ref fun, ref args) => {
+ show_function_identifier(state, &fun);
+ state.write("(");
+
+ if !args.is_empty() {
+ let mut args_iter = args.iter();
+ let first = args_iter.next().unwrap();
+ show_expr(state, first);
+
+ for e in args_iter {
+ state.write(", ");
+ show_expr(state, e);
+ }
+ }
+
+ state.write(")");
+ }
+ syntax::Expr::Dot(ref e, ref i) => {
+ state.write("(");
+ show_expr(state, &e);
+ state.write(")");
+ state.write(".");
+ show_identifier(state, &i);
+ }
+ syntax::Expr::PostInc(ref e) => {
+ show_expr(state, &e);
+ state.write("++");
+ }
+ syntax::Expr::PostDec(ref e) => {
+ show_expr(state, &e);
+ state.write("--");
+ }
+ syntax::Expr::Comma(ref a, ref b) => {
+ show_expr(state, &a);
+ state.write(", ");
+ show_expr(state, &b);
+ }
+ }
+}
+
+pub fn show_unary_op(state: &OutputState, op: &syntax::UnaryOp) {
+ match *op {
+ syntax::UnaryOp::Inc => {
+ state.write("++");
+ }
+ syntax::UnaryOp::Dec => {
+ state.write("--");
+ }
+ syntax::UnaryOp::Add => {
+ state.write("+");
+ }
+ syntax::UnaryOp::Minus => {
+ state.write("-");
+ }
+ syntax::UnaryOp::Not => {
+ state.write("!");
+ }
+ syntax::UnaryOp::Complement => {
+ state.write("~");
+ }
+ }
+}
+
+pub fn show_binary_op(state: &OutputState, op: &syntax::BinaryOp) {
+ match *op {
+ syntax::BinaryOp::Or => {
+ state.write("||");
+ }
+ syntax::BinaryOp::Xor => {
+ state.write("^^");
+ }
+ syntax::BinaryOp::And => {
+ state.write("&&");
+ }
+ syntax::BinaryOp::BitOr => {
+ state.write("|");
+ }
+ syntax::BinaryOp::BitXor => {
+ state.write("^");
+ }
+ syntax::BinaryOp::BitAnd => {
+ state.write("&");
+ }
+ syntax::BinaryOp::Equal => {
+ state.write("==");
+ }
+ syntax::BinaryOp::NonEqual => {
+ state.write("!=");
+ }
+ syntax::BinaryOp::LT => {
+ state.write("<");
+ }
+ syntax::BinaryOp::GT => {
+ state.write(">");
+ }
+ syntax::BinaryOp::LTE => {
+ state.write("<=");
+ }
+ syntax::BinaryOp::GTE => {
+ state.write(">=");
+ }
+ syntax::BinaryOp::LShift => {
+ state.write("<<");
+ }
+ syntax::BinaryOp::RShift => {
+ state.write(">>");
+ }
+ syntax::BinaryOp::Add => {
+ state.write("+");
+ }
+ syntax::BinaryOp::Sub => {
+ state.write("-");
+ }
+ syntax::BinaryOp::Mult => {
+ state.write("*");
+ }
+ syntax::BinaryOp::Div => {
+ state.write("/");
+ }
+ syntax::BinaryOp::Mod => {
+ state.write("%");
+ }
+ }
+}
+
+pub fn show_assignment_op(state: &OutputState, op: &syntax::AssignmentOp) {
+ match *op {
+ syntax::AssignmentOp::Equal => {
+ state.write("=");
+ }
+ syntax::AssignmentOp::Mult => {
+ state.write("*=");
+ }
+ syntax::AssignmentOp::Div => {
+ state.write("/=");
+ }
+ syntax::AssignmentOp::Mod => {
+ state.write("%=");
+ }
+ syntax::AssignmentOp::Add => {
+ state.write("+=");
+ }
+ syntax::AssignmentOp::Sub => {
+ state.write("-=");
+ }
+ syntax::AssignmentOp::LShift => {
+ state.write("<<=");
+ }
+ syntax::AssignmentOp::RShift => {
+ state.write(">>=");
+ }
+ syntax::AssignmentOp::And => {
+ state.write("&=");
+ }
+ syntax::AssignmentOp::Xor => {
+ state.write("^=");
+ }
+ syntax::AssignmentOp::Or => {
+ state.write("|=");
+ }
+ }
+}
+
+pub fn show_function_identifier(state: &OutputState, i: &syntax::FunIdentifier) {
+ match *i {
+ syntax::FunIdentifier::Identifier(ref n) => show_identifier(state, &n),
+ syntax::FunIdentifier::Expr(ref e) => show_expr(state, &*e),
+ }
+}
+
+pub fn show_hir_function_identifier(state: &OutputState, i: &hir::FunIdentifier) {
+ match *i {
+ hir::FunIdentifier::Identifier(ref n) => show_sym(state, n),
+ hir::FunIdentifier::Constructor(ref t) => show_type(state, &*t),
+ }
+}
+
+pub fn show_declaration(state: &mut OutputState, d: &hir::Declaration) {
+ show_indent(state);
+ match *d {
+ hir::Declaration::FunctionPrototype(ref proto) => {
+ if !state.output_cxx {
+ show_function_prototype(state, &proto);
+ state.write(";\n");
+ }
+ }
+ hir::Declaration::InitDeclaratorList(ref list) => {
+ show_init_declarator_list(state, &list);
+ state.write(";\n");
+
+ if state.output_cxx {
+ let base = list.head.name;
+ let base_sym = state.hir.sym(base);
+ if let hir::SymDecl::Local(..) = &base_sym.decl {
+ if symbol_run_class(&base_sym.decl, state.vector_mask) == hir::RunClass::Scalar
+ {
+ let mut texel_fetches = state.texel_fetches.borrow_mut();
+ while let Some(idx) = texel_fetches.iter().position(|&(_, b, _)| b == base)
+ {
+ let (sampler, _, offsets) = texel_fetches.remove(idx);
+ let sampler_sym = state.hir.sym(sampler);
+ define_texel_fetch_ptr(state, &base_sym, &sampler_sym, &offsets);
+ }
+ }
+ }
+ }
+ }
+ hir::Declaration::Precision(ref qual, ref ty) => {
+ if !state.output_cxx {
+ show_precision_qualifier(state, &qual);
+ show_type_specifier(state, &ty);
+ state.write(";\n");
+ }
+ }
+ hir::Declaration::Block(ref _block) => {
+ panic!();
+ //show_block(state, &block);
+ //state.write(";\n");
+ }
+ hir::Declaration::Global(ref qual, ref identifiers) => {
+ show_type_qualifier(state, &qual);
+
+ if !identifiers.is_empty() {
+ let mut iter = identifiers.iter();
+ let first = iter.next().unwrap();
+ show_identifier(state, first);
+
+ for identifier in iter {
+ let _ = write!(state, ", {}", identifier);
+ }
+ }
+
+ state.write(";\n");
+ }
+ hir::Declaration::StructDefinition(ref sym) => {
+ show_sym_decl(state, sym);
+
+ state.write(";\n");
+ }
+ }
+}
+
+pub fn show_function_prototype(state: &mut OutputState, fp: &hir::FunctionPrototype) {
+ let is_scalar = state.is_scalar.replace(!state.return_vector);
+ show_type(state, &fp.ty);
+ state.is_scalar.set(is_scalar);
+
+ state.write(" ");
+ show_identifier(state, &fp.name);
+
+ state.write("(");
+
+ if !fp.parameters.is_empty() {
+ let mut iter = fp.parameters.iter();
+ let first = iter.next().unwrap();
+ show_function_parameter_declaration(state, first);
+
+ for param in iter {
+ state.write(", ");
+ show_function_parameter_declaration(state, param);
+ }
+ }
+
+ if state.output_cxx && (state.vector_mask & (1 << 31)) != 0 {
+ if !fp.parameters.is_empty() {
+ state.write(", ");
+ }
+ state.write("I32 _cond_mask_");
+ }
+
+ state.write(")");
+}
+
+pub fn show_function_parameter_declaration(
+ state: &mut OutputState,
+ p: &hir::FunctionParameterDeclaration,
+) {
+ match *p {
+ hir::FunctionParameterDeclaration::Named(ref qual, ref fpd) => {
+ if state.output_cxx {
+ let is_scalar = state.is_scalar.replace(
+ symbol_run_class(&state.hir.sym(fpd.sym).decl, state.vector_mask)
+ == hir::RunClass::Scalar,
+ );
+ show_type(state, &fpd.ty);
+ state.is_scalar.set(is_scalar);
+ show_parameter_qualifier(state, qual);
+ } else {
+ show_parameter_qualifier(state, qual);
+ state.write(" ");
+ show_type(state, &fpd.ty);
+ }
+ state.write(" ");
+ show_identifier_and_type(state, &fpd.name, &fpd.ty);
+ }
+ hir::FunctionParameterDeclaration::Unnamed(ref qual, ref ty) => {
+ if state.output_cxx {
+ show_type_specifier(state, ty);
+ show_parameter_qualifier(state, qual);
+ } else {
+ show_parameter_qualifier(state, qual);
+ state.write(" ");
+ show_type_specifier(state, ty);
+ }
+ }
+ }
+}
+
+pub fn show_init_declarator_list(state: &mut OutputState, i: &hir::InitDeclaratorList) {
+ show_single_declaration(state, &i.head);
+
+ for decl in &i.tail {
+ state.write(", ");
+ show_single_declaration_no_type(state, decl);
+ }
+}
+
+pub fn show_single_declaration(state: &mut OutputState, d: &hir::SingleDeclaration) {
+ if state.output_cxx {
+ show_single_declaration_cxx(state, d)
+ } else {
+ show_single_declaration_glsl(state, d)
+ }
+}
+
+pub fn show_single_declaration_glsl(state: &mut OutputState, d: &hir::SingleDeclaration) {
+ if let Some(ref qual) = d.qualifier {
+ show_type_qualifier(state, &qual);
+ state.write(" ");
+ }
+
+ let sym = state.hir.sym(d.name);
+ match &sym.decl {
+ hir::SymDecl::Global(storage, interpolation, ..) => {
+ show_storage_class(state, storage);
+ if let Some(i) = interpolation {
+ show_interpolation_qualifier(state, i);
+ }
+ }
+ hir::SymDecl::Local(storage, ..) => show_storage_class(state, storage),
+ _ => panic!("should be variable"),
+ }
+
+ if let Some(ty_def) = d.ty_def {
+ show_sym_decl(state, &ty_def);
+ } else {
+ show_type(state, &d.ty);
+ }
+
+ state.write(" ");
+ state.write(sym.name.as_str());
+
+ if let Some(ref arr_spec) = d.ty.array_sizes {
+ show_array_sizes(state, &arr_spec);
+ }
+
+ if let Some(ref initializer) = d.initializer {
+ state.write(" = ");
+ show_initializer(state, initializer);
+ }
+}
+
+fn symbol_run_class(decl: &hir::SymDecl, vector_mask: u32) -> hir::RunClass {
+ let run_class = match decl {
+ hir::SymDecl::Global(_, _, _, run_class) => *run_class,
+ hir::SymDecl::Local(_, _, run_class) => *run_class,
+ _ => hir::RunClass::Vector,
+ };
+ match run_class {
+ hir::RunClass::Scalar => hir::RunClass::Scalar,
+ hir::RunClass::Dependent(mask) => {
+ if (mask & vector_mask) != 0 {
+ hir::RunClass::Vector
+ } else {
+ hir::RunClass::Scalar
+ }
+ }
+ _ => hir::RunClass::Vector,
+ }
+}
+
+pub fn show_single_declaration_cxx(state: &mut OutputState, d: &hir::SingleDeclaration) {
+ let sym = state.hir.sym(d.name);
+ if state.kind == ShaderKind::Vertex {
+ match &sym.decl {
+ hir::SymDecl::Global(hir::StorageClass::Uniform, ..) |
+ hir::SymDecl::Global(hir::StorageClass::Sampler(_), ..) |
+ hir::SymDecl::Global(hir::StorageClass::Out, _, _, hir::RunClass::Scalar) => {
+ state.write("// ");
+ }
+ _ => {}
+ }
+ } else {
+ match &sym.decl {
+ hir::SymDecl::Global(hir::StorageClass::FragColor(index), ..) => {
+ let fragcolor = match index {
+ 0 => "gl_FragColor",
+ 1 => "gl_SecondaryFragColor",
+ _ => panic!(),
+ };
+ write!(state, "#define {} {}\n", sym.name, fragcolor);
+ show_indent(state);
+ state.write("// ");
+ }
+ hir::SymDecl::Global(hir::StorageClass::Out, ..) => {
+ write!(state, "#define {} gl_FragColor\n", sym.name);
+ show_indent(state);
+ state.write("// ");
+ }
+ hir::SymDecl::Global(hir::StorageClass::Uniform, ..) |
+ hir::SymDecl::Global(hir::StorageClass::Sampler(_), ..) |
+ hir::SymDecl::Global(hir::StorageClass::In, _, _, hir::RunClass::Scalar) => {
+ state.write("// ");
+ }
+ _ => {}
+ }
+ }
+ let is_scalar = state
+ .is_scalar
+ .replace(symbol_run_class(&sym.decl, state.vector_mask) == hir::RunClass::Scalar);
+
+ if let Some(ref _array) = d.ty.array_sizes {
+ show_type(state, &d.ty);
+ } else {
+ if let Some(ty_def) = d.ty_def {
+ show_sym_decl(state, &ty_def);
+ } else {
+ show_type(state, &d.ty);
+ }
+ }
+
+ // XXX: this is pretty grotty
+ state.write(" ");
+ show_sym_decl(state, &d.name);
+
+ state.is_scalar.set(is_scalar);
+
+ if let Some(ref initializer) = d.initializer {
+ state.write(" = ");
+ show_initializer(state, initializer);
+ }
+}
+
+pub fn show_single_declaration_no_type(state: &OutputState, d: &hir::SingleDeclarationNoType) {
+ show_arrayed_identifier(state, &d.ident);
+
+ if let Some(ref initializer) = d.initializer {
+ state.write(" = ");
+ show_initializer(state, initializer);
+ }
+}
+
+pub fn show_initializer(state: &OutputState, i: &hir::Initializer) {
+ match *i {
+ hir::Initializer::Simple(ref e) => show_hir_expr(state, e),
+ hir::Initializer::List(ref list) => {
+ let mut iter = list.0.iter();
+ let first = iter.next().unwrap();
+
+ state.write("{ ");
+ show_initializer(state, first);
+
+ for ini in iter {
+ state.write(", ");
+ show_initializer(state, ini);
+ }
+
+ state.write(" }");
+ }
+ }
+}
+
+/*
+pub fn show_block(state: &mut OutputState, b: &hir::Block) {
+ show_type_qualifier(state, &b.qualifier);
+ state.write(" ");
+ show_identifier(state, &b.name);
+ state.write(" {");
+
+ for field in &b.fields {
+ show_struct_field(state, field);
+ state.write("\n");
+ }
+ state.write("}");
+
+ if let Some(ref ident) = b.identifier {
+ show_arrayed_identifier(state, ident);
+ }
+}
+*/
+
+// This is a hack to run through the first time with an empty writter to find if 'return' is declared.
+pub fn has_conditional_return(state: &mut OutputState, cst: &hir::CompoundStatement) -> bool {
+ let buffer = state.push_buffer();
+ show_compound_statement(state, cst);
+ state.pop_buffer(buffer);
+ let result = state.return_declared;
+ state.return_declared = false;
+ result
+}
+
+fn define_texel_fetch_ptr(
+ state: &OutputState,
+ base_sym: &hir::Symbol,
+ sampler_sym: &hir::Symbol,
+ offsets: &hir::TexelFetchOffsets,
+) {
+ show_indent(state);
+ if let hir::SymDecl::Global(_, _, ty, _) = &sampler_sym.decl {
+ match ty.kind {
+ hir::TypeKind::Sampler2D
+ | hir::TypeKind::Sampler2DRect => {
+ write!(
+ state,
+ "vec4_scalar* {}_{}_fetch = ",
+ sampler_sym.name, base_sym.name
+ );
+ }
+ hir::TypeKind::ISampler2D => {
+ write!(
+ state,
+ "ivec4_scalar* {}_{}_fetch = ",
+ sampler_sym.name, base_sym.name
+ );
+ }
+ _ => panic!(),
+ }
+ } else {
+ panic!();
+ }
+ write!(
+ state,
+ "texelFetchPtr({}, {}, {}, {}, {}, {});\n",
+ sampler_sym.name, base_sym.name, offsets.min_x, offsets.max_x, offsets.min_y, offsets.max_y
+ );
+}
+
+pub fn show_function_definition(
+ state: &mut OutputState,
+ fd: &hir::FunctionDefinition,
+ vector_mask: u32,
+) {
+ // println!("start {:?} {:?}", fd.prototype.name, vector_mask);
+ if state.output_cxx && fd.prototype.name.as_str() == "main" {
+ state.write("ALWAYS_INLINE ");
+ }
+ show_function_prototype(state, &fd.prototype);
+ state.write(" ");
+ state.return_type = Some(Box::new(fd.prototype.ty.clone()));
+
+ if state.output_cxx && (vector_mask & (1 << 31)) != 0 {
+ state.mask = Some(Box::new(hir::Expr {
+ kind: hir::ExprKind::CondMask,
+ ty: hir::Type::new(hir::TypeKind::Bool),
+ }));
+ }
+
+ show_indent(state);
+ state.write("{\n");
+
+ state.indent();
+ if has_conditional_return(state, &fd.body) {
+ show_indent(state);
+ state.write(if state.return_vector {
+ "I32"
+ } else {
+ "int32_t"
+ });
+ state.write(" ret_mask = ");
+ if let Some(mask) = &state.mask {
+ show_hir_expr(state, mask);
+ } else {
+ state.write("~0");
+ }
+ state.write(";\n");
+ // XXX: the cloning here is bad
+ show_indent(state);
+ if fd.prototype.ty != Type::new(hir::TypeKind::Void) {
+ let is_scalar = state.is_scalar.replace(!state.return_vector);
+ show_type(state, &state.return_type.clone().unwrap());
+ state.write(" ret;\n");
+ state.is_scalar.set(is_scalar);
+ }
+ }
+
+ if state.output_cxx {
+ let mut texel_fetches = state.texel_fetches.borrow_mut();
+ texel_fetches.clear();
+ for ((sampler, base), offsets) in fd.texel_fetches.iter() {
+ let base_sym = state.hir.sym(*base);
+ if symbol_run_class(&base_sym.decl, vector_mask) == hir::RunClass::Scalar {
+ add_used_global(state, sampler);
+ let sampler_sym = state.hir.sym(*sampler);
+ match &base_sym.decl {
+ hir::SymDecl::Global(..) => {
+ add_used_global(state, base);
+ define_texel_fetch_ptr(state, &base_sym, &sampler_sym, &offsets);
+ }
+ hir::SymDecl::Local(..) => {
+ if fd.prototype.has_parameter(*base) {
+ define_texel_fetch_ptr(state, &base_sym, &sampler_sym, &offsets);
+ } else {
+ texel_fetches.push((*sampler, *base, offsets.clone()));
+ }
+ }
+ _ => panic!(),
+ }
+ }
+ }
+ }
+
+ for st in &fd.body.statement_list {
+ show_statement(state, st);
+ }
+
+ if state.return_declared {
+ show_indent(state);
+ if fd.prototype.ty == Type::new(hir::TypeKind::Void) {
+ state.write("return;\n");
+ } else {
+ state.write("return ret;\n");
+ }
+ }
+ state.outdent();
+
+ show_indent(state);
+ state.write("}\n");
+ // println!("end {:?}", fd.prototype.name);
+
+ state.return_type = None;
+ state.return_declared = false;
+ state.mask = None;
+}
+
+pub fn show_compound_statement(state: &mut OutputState, cst: &hir::CompoundStatement) {
+ show_indent(state);
+ state.write("{\n");
+
+ state.indent();
+ for st in &cst.statement_list {
+ show_statement(state, st);
+ }
+ state.outdent();
+
+ show_indent(state);
+ state.write("}\n");
+}
+
+pub fn show_statement(state: &mut OutputState, st: &hir::Statement) {
+ match *st {
+ hir::Statement::Compound(ref cst) => show_compound_statement(state, cst),
+ hir::Statement::Simple(ref sst) => show_simple_statement(state, sst),
+ }
+}
+
+pub fn show_simple_statement(state: &mut OutputState, sst: &hir::SimpleStatement) {
+ match *sst {
+ hir::SimpleStatement::Declaration(ref d) => show_declaration(state, d),
+ hir::SimpleStatement::Expression(ref e) => show_expression_statement(state, e),
+ hir::SimpleStatement::Selection(ref s) => show_selection_statement(state, s),
+ hir::SimpleStatement::Switch(ref s) => show_switch_statement(state, s),
+ hir::SimpleStatement::Iteration(ref i) => show_iteration_statement(state, i),
+ hir::SimpleStatement::Jump(ref j) => show_jump_statement(state, j),
+ }
+}
+
+pub fn show_indent(state: &OutputState) {
+ for _ in 0 .. state.indent {
+ state.write(" ");
+ }
+}
+
+pub fn show_expression_statement(state: &mut OutputState, est: &hir::ExprStatement) {
+ show_indent(state);
+
+ if let Some(ref e) = *est {
+ show_hir_expr_inner(state, e, true);
+ }
+
+ state.write(";\n");
+}
+
+pub fn show_selection_statement(state: &mut OutputState, sst: &hir::SelectionStatement) {
+ show_indent(state);
+
+ if state.output_cxx &&
+ (state.return_declared || expr_run_class(state, &sst.cond) != hir::RunClass::Scalar)
+ {
+ let (cond_index, mask) = if state.mask.is_none() || sst.else_stmt.is_some() {
+ let cond = sst.cond.clone();
+ state.cond_index += 1;
+ let cond_index = state.cond_index;
+ write!(state, "auto _c{}_ = ", cond_index);
+ show_hir_expr(state, &cond);
+ state.write(";\n");
+ (
+ cond_index,
+ Box::new(hir::Expr {
+ kind: hir::ExprKind::Cond(cond_index, cond),
+ ty: hir::Type::new(hir::TypeKind::Bool),
+ }),
+ )
+ } else {
+ (0, sst.cond.clone())
+ };
+
+ let previous = mem::replace(&mut state.mask, None);
+ state.mask = Some(match previous.clone() {
+ Some(e) => {
+ let cond = Box::new(hir::Expr {
+ kind: hir::ExprKind::Binary(syntax::BinaryOp::BitAnd, e, mask.clone()),
+ ty: hir::Type::new(hir::TypeKind::Bool),
+ });
+ state.cond_index += 1;
+ let nested_cond_index = state.cond_index;
+ show_indent(state);
+ write!(state, "auto _c{}_ = ", nested_cond_index);
+ show_hir_expr(state, &cond);
+ state.write(";\n");
+ Box::new(hir::Expr {
+ kind: hir::ExprKind::Cond(nested_cond_index, cond),
+ ty: hir::Type::new(hir::TypeKind::Bool),
+ })
+ }
+ None => mask.clone(),
+ });
+
+ show_statement(state, &sst.body);
+ state.mask = previous;
+
+ if let Some(rest) = &sst.else_stmt {
+ // invert the condition
+ let inverted_cond = Box::new(hir::Expr {
+ kind: hir::ExprKind::Unary(UnaryOp::Complement, mask),
+ ty: hir::Type::new(hir::TypeKind::Bool),
+ });
+ let previous = mem::replace(&mut state.mask, None);
+ state.mask = Some(match previous.clone() {
+ Some(e) => {
+ let cond = Box::new(hir::Expr {
+ kind: hir::ExprKind::Binary(syntax::BinaryOp::BitAnd, e, inverted_cond),
+ ty: hir::Type::new(hir::TypeKind::Bool),
+ });
+ show_indent(state);
+ write!(state, "_c{}_ = ", cond_index);
+ show_hir_expr(state, &cond);
+ state.write(";\n");
+ Box::new(hir::Expr {
+ kind: hir::ExprKind::Cond(cond_index, cond),
+ ty: hir::Type::new(hir::TypeKind::Bool),
+ })
+ }
+ None => inverted_cond,
+ });
+
+ show_statement(state, rest);
+ state.mask = previous;
+ }
+ } else {
+ state.write("if (");
+ show_hir_expr(state, &sst.cond);
+ state.write(") {\n");
+
+ state.indent();
+ show_statement(state, &sst.body);
+ state.outdent();
+
+ show_indent(state);
+ if let Some(rest) = &sst.else_stmt {
+ state.write("} else ");
+ show_statement(state, rest);
+ } else {
+ state.write("}\n");
+ }
+ }
+}
+
+fn case_stmts_to_if_stmts(stmts: &[Statement], last: bool) -> (Option<Box<Statement>>, bool) {
+ // Look for jump statements and remove them
+ // We currently are pretty strict on the form that the statement
+ // list needs to be in. This can be loosened as needed.
+ let mut fallthrough = false;
+ let cstmt = match &stmts[..] {
+ [hir::Statement::Compound(c)] => match c.statement_list.split_last() {
+ Some((hir::Statement::Simple(s), rest)) => match **s {
+ hir::SimpleStatement::Jump(hir::JumpStatement::Break) => hir::CompoundStatement {
+ statement_list: rest.to_owned(),
+ },
+ _ => panic!("fall through not supported"),
+ },
+ _ => panic!("empty compound"),
+ },
+ [hir::Statement::Simple(s)] => {
+ match **s {
+ hir::SimpleStatement::Jump(hir::JumpStatement::Break) => hir::CompoundStatement {
+ statement_list: Vec::new(),
+ },
+ _ => {
+ if last {
+ // we don't need a break at the end
+ hir::CompoundStatement {
+ statement_list: vec![hir::Statement::Simple(s.clone())],
+ }
+ } else {
+ panic!("fall through not supported {:?}", s)
+ }
+ }
+ }
+ }
+ [] => return (None, true),
+ stmts => match stmts.split_last() {
+ Some((hir::Statement::Simple(s), rest)) => match **s {
+ hir::SimpleStatement::Jump(hir::JumpStatement::Break) => hir::CompoundStatement {
+ statement_list: rest.to_owned(),
+ },
+ _ => {
+ if !last {
+ fallthrough = true;
+ }
+ hir::CompoundStatement {
+ statement_list: stmts.to_owned(),
+ }
+ }
+ },
+ _ => panic!("unexpected empty"),
+ },
+ };
+ let stmts = Box::new(hir::Statement::Compound(Box::new(cstmt)));
+ (Some(stmts), fallthrough)
+}
+
+fn build_selection<'a, I: Iterator<Item = &'a hir::Case>>(
+ head: &Box<hir::Expr>,
+ case: &hir::Case,
+ mut cases: I,
+ default: Option<&hir::Case>,
+ previous_condition: Option<Box<hir::Expr>>,
+ previous_stmts: Option<Box<hir::Statement>>,
+) -> hir::SelectionStatement {
+ let cond = match &case.label {
+ hir::CaseLabel::Case(e) => Some(Box::new(hir::Expr {
+ kind: hir::ExprKind::Binary(syntax::BinaryOp::Equal, head.clone(), e.clone()),
+ ty: hir::Type::new(hir::TypeKind::Bool),
+ })),
+ hir::CaseLabel::Def => None,
+ };
+
+ // if we have two conditions join them
+ let cond = match (&previous_condition, &cond) {
+ (Some(prev), Some(cond)) => Some(Box::new(hir::Expr {
+ kind: hir::ExprKind::Binary(syntax::BinaryOp::Or, prev.clone(), cond.clone()),
+ ty: hir::Type::new(hir::TypeKind::Bool),
+ })),
+ (_, cond) => cond.clone(),
+ };
+
+ /*
+
+ // find the next case that's not a default
+ let next_case = loop {
+ match cases.next() {
+ Some(hir::Case { label: hir::CaseLabel::Def, ..}) => { },
+ case => break case,
+ }
+ };*/
+
+ let (cond, body, else_stmt) = match (cond, cases.next()) {
+ (None, Some(next_case)) => {
+ assert!(previous_stmts.is_none());
+ // default so just move on to the next
+ return build_selection(head, next_case, cases, default, None, None);
+ }
+ (Some(cond), Some(next_case)) => {
+ assert!(previous_stmts.is_none());
+ let (stmts, fallthrough) = case_stmts_to_if_stmts(&case.stmts, false);
+ if !fallthrough && stmts.is_some() {
+ (
+ cond,
+ stmts.unwrap(),
+ Some(Box::new(hir::Statement::Simple(Box::new(
+ hir::SimpleStatement::Selection(build_selection(
+ head, next_case, cases, default, None, None,
+ )),
+ )))),
+ )
+ } else {
+ // empty so fall through to the next
+ return build_selection(head, next_case, cases, default, Some(cond), stmts);
+ }
+ }
+ (Some(cond), None) => {
+ // non-default last
+ assert!(previous_stmts.is_none());
+ let (stmts, _) = case_stmts_to_if_stmts(&case.stmts, default.is_none());
+ let stmts = stmts.expect("empty case labels unsupported at the end");
+ // add the default case at the end if we have one
+ (
+ cond,
+ stmts,
+ match default {
+ Some(default) => {
+ let (default_stmts, fallthrough) =
+ case_stmts_to_if_stmts(&default.stmts, true);
+ assert!(!fallthrough);
+ Some(default_stmts.expect("empty default unsupported"))
+ }
+ None => None,
+ },
+ )
+ }
+ (None, None) => {
+ // default, last
+
+ assert!(default.is_some());
+
+ let (stmts, fallthrough) = case_stmts_to_if_stmts(&case.stmts, true);
+ let stmts = stmts.expect("empty default unsupported");
+ assert!(!fallthrough);
+
+ match previous_stmts {
+ Some(previous_stmts) => {
+ let cond = previous_condition.expect("must have previous condition");
+ (cond, previous_stmts, Some(stmts))
+ }
+ None => {
+ let cond = Box::new(hir::Expr {
+ kind: hir::ExprKind::BoolConst(true),
+ ty: hir::Type::new(hir::TypeKind::Bool),
+ });
+ (cond, stmts, None)
+ }
+ }
+ }
+ };
+
+ hir::SelectionStatement {
+ cond,
+ body,
+ else_stmt,
+ }
+}
+
+pub fn lower_switch_to_ifs(sst: &hir::SwitchStatement) -> hir::SelectionStatement {
+ let default = sst.cases.iter().find(|x| x.label == hir::CaseLabel::Def);
+ let mut cases = sst.cases.iter();
+ let r = build_selection(&sst.head, cases.next().unwrap(), cases, default, None, None);
+ r
+}
+
+fn is_declaration(stmt: &hir::Statement) -> bool {
+ if let hir::Statement::Simple(s) = stmt {
+ if let hir::SimpleStatement::Declaration(..) = **s {
+ return true;
+ }
+ }
+ return false;
+}
+
+pub fn show_switch_statement(state: &mut OutputState, sst: &hir::SwitchStatement) {
+ if state.output_cxx && expr_run_class(state, &sst.head) != hir::RunClass::Scalar {
+ // XXX: when lowering switches we end up with a mask that has
+ // a bunch of mutually exclusive conditions.
+ // It would be nice if we could fold them together.
+ let ifs = lower_switch_to_ifs(sst);
+ return show_selection_statement(state, &ifs);
+ }
+
+ show_indent(state);
+ state.write("switch (");
+ show_hir_expr(state, &sst.head);
+ state.write(") {\n");
+ state.indent();
+
+ for case in &sst.cases {
+ show_case_label(state, &case.label);
+ state.indent();
+
+ let has_declaration = case.stmts.iter().any(|x| is_declaration(x));
+ // glsl allows declarations in switch statements while C requires them to be
+ // in a compound statement. If we have a declaration wrap the statements in an block.
+ // This will break some glsl shaders but keeps the saner ones working
+ if has_declaration {
+ show_indent(state);
+ state.write("{\n");
+ state.indent();
+ }
+ for st in &case.stmts {
+ show_statement(state, st);
+ }
+
+ if has_declaration {
+ show_indent(state);
+ state.write("}\n");
+ state.outdent();
+ }
+
+ state.outdent();
+ }
+ state.outdent();
+ show_indent(state);
+ state.write("}\n");
+}
+
+pub fn show_case_label(state: &mut OutputState, cl: &hir::CaseLabel) {
+ show_indent(state);
+ match *cl {
+ hir::CaseLabel::Case(ref e) => {
+ state.write("case ");
+ show_hir_expr(state, e);
+ state.write(":\n");
+ }
+ hir::CaseLabel::Def => {
+ state.write("default:\n");
+ }
+ }
+}
+
+pub fn show_iteration_statement(state: &mut OutputState, ist: &hir::IterationStatement) {
+ show_indent(state);
+ match *ist {
+ hir::IterationStatement::While(ref cond, ref body) => {
+ state.write("while (");
+ show_condition(state, cond);
+ state.write(") ");
+ show_statement(state, body);
+ }
+ hir::IterationStatement::DoWhile(ref body, ref cond) => {
+ state.write("do ");
+ show_statement(state, body);
+ state.write(" while (");
+ show_hir_expr(state, cond);
+ state.write(")\n");
+ }
+ hir::IterationStatement::For(ref init, ref rest, ref body) => {
+ state.write("for (");
+ show_for_init_statement(state, init);
+ show_for_rest_statement(state, rest);
+ state.write(") ");
+ show_statement(state, body);
+ }
+ }
+}
+
+pub fn show_condition(state: &mut OutputState, c: &hir::Condition) {
+ match *c {
+ hir::Condition::Expr(ref e) => show_hir_expr(state, e),
+ /*hir::Condition::Assignment(ref ty, ref name, ref initializer) => {
+ show_type(state, ty);
+ state.write(" ");
+ show_identifier(f, name);
+ state.write(" = ");
+ show_initializer(state, initializer);
+ }*/
+ }
+}
+
+pub fn show_for_init_statement(state: &mut OutputState, i: &hir::ForInitStatement) {
+ match *i {
+ hir::ForInitStatement::Expression(ref expr) => {
+ if let Some(ref e) = *expr {
+ show_hir_expr(state, e);
+ }
+ }
+ hir::ForInitStatement::Declaration(ref d) => {
+ show_declaration(state, d);
+ }
+ }
+}
+
+pub fn show_for_rest_statement(state: &mut OutputState, r: &hir::ForRestStatement) {
+ if let Some(ref cond) = r.condition {
+ show_condition(state, cond);
+ }
+
+ state.write("; ");
+
+ if let Some(ref e) = r.post_expr {
+ show_hir_expr(state, e);
+ }
+}
+
+fn use_return_mask(state: &OutputState) -> bool {
+ if let Some(mask) = &state.mask {
+ mask.kind != hir::ExprKind::CondMask
+ } else {
+ false
+ }
+}
+
+pub fn show_jump_statement(state: &mut OutputState, j: &hir::JumpStatement) {
+ show_indent(state);
+ match *j {
+ hir::JumpStatement::Continue => {
+ state.write("continue;\n");
+ }
+ hir::JumpStatement::Break => {
+ state.write("break;\n");
+ }
+ hir::JumpStatement::Discard => {
+ if state.output_cxx {
+ state.uses_discard = true;
+ if let Some(mask) = &state.mask {
+ state.write("isPixelDiscarded |= (");
+ show_hir_expr(state, mask);
+ state.write(")");
+ if state.return_declared {
+ state.write("&ret_mask");
+ }
+ state.write(";\n");
+ } else {
+ state.write("isPixelDiscarded = true;\n");
+ }
+ } else {
+ state.write("discard;\n");
+ }
+ }
+ hir::JumpStatement::Return(ref e) => {
+ if let Some(e) = e {
+ if state.output_cxx {
+ if use_return_mask(state) {
+ // We cast any conditions by `ret_mask_type` so that scalars nicely
+ // convert to -1. i.e. I32 &= bool will give the wrong result. while I32 &= I32(bool) works
+ let ret_mask_type = if state.return_vector {
+ "I32"
+ } else {
+ "int32_t"
+ };
+ if state.return_declared {
+ // XXX: the cloning here is bad
+ write!(state, "ret = if_then_else(ret_mask & {}(", ret_mask_type);
+ show_hir_expr(state, &state.mask.clone().unwrap());
+ state.write("), ");
+ show_hir_expr(state, e);
+ state.write(", ret);\n");
+ } else {
+ state.write("ret = ");
+ show_hir_expr(state, e);
+ state.write(";\n");
+ }
+
+ show_indent(state);
+
+ if state.return_declared {
+ write!(state, "ret_mask &= ~{}(", ret_mask_type);
+ } else {
+ write!(state, "ret_mask = ~{}(", ret_mask_type);
+ }
+ show_hir_expr(state, &state.mask.clone().unwrap());
+ state.write(");\n");
+ state.return_declared = true;
+ } else {
+ if state.return_declared {
+ state.write("ret = if_then_else(ret_mask, ");
+ show_hir_expr(state, e);
+ state.write(", ret);\n");
+ } else {
+ state.write("return ");
+ show_hir_expr(state, e);
+ state.write(";\n");
+ }
+ }
+ } else {
+ state.write("return ");
+ show_hir_expr(state, e);
+ state.write(";\n");
+ }
+ } else {
+ if state.output_cxx {
+ if use_return_mask(state) {
+ show_indent(state);
+ let ret_mask_type = if state.return_vector {
+ "I32"
+ } else {
+ "int32_t"
+ };
+ if state.return_declared {
+ write!(state, "ret_mask &= ~{}(", ret_mask_type);
+ } else {
+ write!(state, "ret_mask = ~{}(", ret_mask_type);
+ }
+ show_hir_expr(state, &state.mask.clone().unwrap());
+ state.write(");\n");
+ state.return_declared = true;
+ } else {
+ state.write("return;\n");
+ }
+ } else {
+ state.write("return;\n");
+ }
+ }
+ }
+ }
+}
+
+pub fn show_path(state: &OutputState, path: &syntax::Path) {
+ match path {
+ syntax::Path::Absolute(s) => {
+ let _ = write!(state, "<{}>", s);
+ }
+ syntax::Path::Relative(s) => {
+ let _ = write!(state, "\"{}\"", s);
+ }
+ }
+}
+
+pub fn show_preprocessor(state: &OutputState, pp: &syntax::Preprocessor) {
+ match *pp {
+ syntax::Preprocessor::Define(ref pd) => show_preprocessor_define(state, pd),
+ syntax::Preprocessor::Else => show_preprocessor_else(state),
+ syntax::Preprocessor::ElseIf(ref pei) => show_preprocessor_elseif(state, pei),
+ syntax::Preprocessor::EndIf => show_preprocessor_endif(state),
+ syntax::Preprocessor::Error(ref pe) => show_preprocessor_error(state, pe),
+ syntax::Preprocessor::If(ref pi) => show_preprocessor_if(state, pi),
+ syntax::Preprocessor::IfDef(ref pid) => show_preprocessor_ifdef(state, pid),
+ syntax::Preprocessor::IfNDef(ref pind) => show_preprocessor_ifndef(state, pind),
+ syntax::Preprocessor::Include(ref pi) => show_preprocessor_include(state, pi),
+ syntax::Preprocessor::Line(ref pl) => show_preprocessor_line(state, pl),
+ syntax::Preprocessor::Pragma(ref pp) => show_preprocessor_pragma(state, pp),
+ syntax::Preprocessor::Undef(ref pu) => show_preprocessor_undef(state, pu),
+ syntax::Preprocessor::Version(ref pv) => show_preprocessor_version(state, pv),
+ syntax::Preprocessor::Extension(ref pe) => show_preprocessor_extension(state, pe),
+ }
+}
+
+pub fn show_preprocessor_define(state: &OutputState, pd: &syntax::PreprocessorDefine) {
+ match *pd {
+ syntax::PreprocessorDefine::ObjectLike {
+ ref ident,
+ ref value,
+ } => {
+ let _ = write!(state, "#define {} {}\n", ident, value);
+ }
+
+ syntax::PreprocessorDefine::FunctionLike {
+ ref ident,
+ ref args,
+ ref value,
+ } => {
+ let _ = write!(state, "#define {}(", ident);
+
+ if !args.is_empty() {
+ let _ = write!(state, "{}", &args[0]);
+
+ for arg in &args[1 .. args.len()] {
+ let _ = write!(state, ", {}", arg);
+ }
+ }
+
+ let _ = write!(state, ") {}\n", value);
+ }
+ }
+}
+
+pub fn show_preprocessor_else(state: &OutputState) {
+ state.write("#else\n");
+}
+
+pub fn show_preprocessor_elseif(state: &OutputState, pei: &syntax::PreprocessorElseIf) {
+ let _ = write!(state, "#elseif {}\n", pei.condition);
+}
+
+pub fn show_preprocessor_error(state: &OutputState, pe: &syntax::PreprocessorError) {
+ let _ = writeln!(state, "#error {}", pe.message);
+}
+
+pub fn show_preprocessor_endif(state: &OutputState) {
+ state.write("#endif\n");
+}
+
+pub fn show_preprocessor_if(state: &OutputState, pi: &syntax::PreprocessorIf) {
+ let _ = write!(state, "#if {}\n", pi.condition);
+}
+
+pub fn show_preprocessor_ifdef(state: &OutputState, pid: &syntax::PreprocessorIfDef) {
+ state.write("#ifdef ");
+ show_identifier(state, &pid.ident);
+ state.write("\n");
+}
+
+pub fn show_preprocessor_ifndef(state: &OutputState, pind: &syntax::PreprocessorIfNDef) {
+ state.write("#ifndef ");
+ show_identifier(state, &pind.ident);
+ state.write("\n");
+}
+
+pub fn show_preprocessor_include(state: &OutputState, pi: &syntax::PreprocessorInclude) {
+ state.write("#include ");
+ show_path(state, &pi.path);
+ state.write("\n");
+}
+
+pub fn show_preprocessor_line(state: &OutputState, pl: &syntax::PreprocessorLine) {
+ let _ = write!(state, "#line {}", pl.line);
+ if let Some(source_string_number) = pl.source_string_number {
+ let _ = write!(state, " {}", source_string_number);
+ }
+ state.write("\n");
+}
+
+pub fn show_preprocessor_pragma(state: &OutputState, pp: &syntax::PreprocessorPragma) {
+ let _ = writeln!(state, "#pragma {}", pp.command);
+}
+
+pub fn show_preprocessor_undef(state: &OutputState, pud: &syntax::PreprocessorUndef) {
+ state.write("#undef ");
+ show_identifier(state, &pud.name);
+ state.write("\n");
+}
+
+pub fn show_preprocessor_version(state: &OutputState, pv: &syntax::PreprocessorVersion) {
+ let _ = write!(state, "#version {}", pv.version);
+
+ if let Some(ref profile) = pv.profile {
+ match *profile {
+ syntax::PreprocessorVersionProfile::Core => {
+ state.write(" core");
+ }
+ syntax::PreprocessorVersionProfile::Compatibility => {
+ state.write(" compatibility");
+ }
+ syntax::PreprocessorVersionProfile::ES => {
+ state.write(" es");
+ }
+ }
+ }
+
+ state.write("\n");
+}
+
+pub fn show_preprocessor_extension(state: &OutputState, pe: &syntax::PreprocessorExtension) {
+ state.write("#extension ");
+
+ match pe.name {
+ syntax::PreprocessorExtensionName::All => {
+ state.write("all");
+ }
+ syntax::PreprocessorExtensionName::Specific(ref n) => {
+ state.write(n);
+ }
+ }
+
+ if let Some(ref behavior) = pe.behavior {
+ match *behavior {
+ syntax::PreprocessorExtensionBehavior::Require => {
+ state.write(" : require");
+ }
+ syntax::PreprocessorExtensionBehavior::Enable => {
+ state.write(" : enable");
+ }
+ syntax::PreprocessorExtensionBehavior::Warn => {
+ state.write(" : warn");
+ }
+ syntax::PreprocessorExtensionBehavior::Disable => {
+ state.write(" : disable");
+ }
+ }
+ }
+
+ state.write("\n");
+}
+
+pub fn show_external_declaration(state: &mut OutputState, ed: &hir::ExternalDeclaration) {
+ match *ed {
+ hir::ExternalDeclaration::Preprocessor(ref pp) => {
+ if !state.output_cxx {
+ show_preprocessor(state, pp)
+ }
+ }
+ hir::ExternalDeclaration::FunctionDefinition(ref fd) => {
+ if !state.output_cxx {
+ show_function_definition(state, fd, !0)
+ }
+ }
+ hir::ExternalDeclaration::Declaration(ref d) => show_declaration(state, d),
+ }
+}
+
+pub fn show_cxx_function_definition(state: &mut OutputState, name: hir::SymRef, vector_mask: u32) {
+ if let Some((ref fd, run_class)) = state.hir.function_definition(name) {
+ state.vector_mask = vector_mask;
+ state.return_vector = (vector_mask & (1 << 31)) != 0
+ || match run_class {
+ hir::RunClass::Scalar => false,
+ hir::RunClass::Dependent(mask) => (mask & vector_mask) != 0,
+ _ => true,
+ };
+ match state.functions.get(&(name, vector_mask)) {
+ Some(true) => {}
+ Some(false) => {
+ show_function_prototype(state, &fd.prototype);
+ state.functions.insert((name, vector_mask), true);
+ }
+ None => {
+ state.functions.insert((name, vector_mask), false);
+ let buffer = state.push_buffer();
+ show_function_definition(state, fd, vector_mask);
+ for (name, vector_mask) in state.deps.replace(Vec::new()) {
+ show_cxx_function_definition(state, name, vector_mask);
+ }
+ state.flush_buffer();
+ state.pop_buffer(buffer);
+ state.functions.insert((name, vector_mask), true);
+ }
+ }
+ }
+}
+
+pub fn show_translation_unit(state: &mut OutputState, tu: &hir::TranslationUnit) {
+ state.flush_buffer();
+
+ for ed in &(tu.0).0 {
+ show_external_declaration(state, ed);
+ state.flush_buffer();
+ }
+ if state.output_cxx {
+ if let Some(name) = state.hir.lookup("main") {
+ show_cxx_function_definition(state, name, 0);
+ state.flush_buffer();
+ }
+ }
+}
+
+fn write_abi(state: &mut OutputState) {
+ match state.kind {
+ ShaderKind::Fragment => {
+ state.write("static void run(Self *self) {\n");
+ if state.uses_discard {
+ state.write(" self->isPixelDiscarded = false;\n");
+ }
+ state.write(" self->main();\n");
+ state.write(" self->step_interp_inputs();\n");
+ state.write("}\n");
+ state.write("static void skip(Self* self, int chunks) {\n");
+ state.write(" self->step_interp_inputs();\n");
+ state.write(" while (--chunks > 0) self->step_interp_inputs();\n");
+ state.write("}\n");
+ if state.use_perspective {
+ state.write("static void run_perspective(Self *self) {\n");
+ if state.uses_discard {
+ state.write(" self->isPixelDiscarded = false;\n");
+ }
+ state.write(" self->main();\n");
+ state.write(" self->step_perspective_inputs();\n");
+ state.write("}\n");
+ state.write("static void skip_perspective(Self* self, int chunks) {\n");
+ state.write(" self->step_perspective_inputs();\n");
+ state.write(" while (--chunks > 0) self->step_perspective_inputs();\n");
+ state.write("}\n");
+ }
+ if state.has_draw_span_rgba8 {
+ state.write(
+ "static void draw_span_RGBA8(Self* self, uint32_t* buf, int len) { \
+ DISPATCH_DRAW_SPAN(self, buf, len); }\n");
+ }
+ if state.has_draw_span_r8 {
+ state.write(
+ "static void draw_span_R8(Self* self, uint8_t* buf, int len) { \
+ DISPATCH_DRAW_SPAN(self, buf, len); }\n");
+ }
+
+ write!(state, "public:\n{}_frag() {{\n", state.name);
+ }
+ ShaderKind::Vertex => {
+ state.write(
+ "static void run(Self* self, char* interps, size_t interp_stride) {\n",
+ );
+ state.write(" self->main();\n");
+ state.write(" self->store_interp_outputs(interps, interp_stride);\n");
+ state.write("}\n");
+ state.write("static void init_batch(Self *self) { self->bind_textures(); }\n");
+
+ write!(state, "public:\n{}_vert() {{\n", state.name);
+ }
+ }
+ match state.kind {
+ ShaderKind::Fragment => {
+ state.write(" init_span_func = (InitSpanFunc)&read_interp_inputs;\n");
+ state.write(" run_func = (RunFunc)&run;\n");
+ state.write(" skip_func = (SkipFunc)&skip;\n");
+ if state.has_draw_span_rgba8 {
+ state.write(" draw_span_RGBA8_func = (DrawSpanRGBA8Func)&draw_span_RGBA8;\n");
+ }
+ if state.has_draw_span_r8 {
+ state.write(" draw_span_R8_func = (DrawSpanR8Func)&draw_span_R8;\n");
+ }
+ if state.uses_discard {
+ state.write(" enable_discard();\n");
+ }
+ if state.use_perspective {
+ state.write(" enable_perspective();\n");
+ state.write(" init_span_w_func = (InitSpanWFunc)&read_perspective_inputs;\n");
+ state.write(" run_w_func = (RunWFunc)&run_perspective;\n");
+ state.write(" skip_w_func = (SkipWFunc)&skip_perspective;\n");
+ } else {
+ state.write(" init_span_w_func = (InitSpanWFunc)&read_interp_inputs;\n");
+ state.write(" run_w_func = (RunWFunc)&run;\n");
+ state.write(" skip_w_func = (SkipWFunc)&skip;\n");
+ }
+ }
+ ShaderKind::Vertex => {
+ state.write(" set_uniform_1i_func = (SetUniform1iFunc)&set_uniform_1i;\n");
+ state.write(" set_uniform_4fv_func = (SetUniform4fvFunc)&set_uniform_4fv;\n");
+ state.write(" set_uniform_matrix4fv_func = (SetUniformMatrix4fvFunc)&set_uniform_matrix4fv;\n");
+ state.write(" init_batch_func = (InitBatchFunc)&init_batch;\n");
+ state.write(" load_attribs_func = (LoadAttribsFunc)&load_attribs;\n");
+ state.write(" run_primitive_func = (RunPrimitiveFunc)&run;\n");
+ }
+ }
+ state.write("}\n");
+}
+
+pub fn define_global_consts(state: &mut OutputState, tu: &hir::TranslationUnit, part_name: &str) {
+ for i in tu {
+ match i {
+ hir::ExternalDeclaration::Declaration(hir::Declaration::InitDeclaratorList(ref d)) => {
+ let sym = state.hir.sym(d.head.name);
+ match &sym.decl {
+ hir::SymDecl::Global(hir::StorageClass::Const, ..) => {
+ let is_scalar = state.is_scalar.replace(
+ symbol_run_class(&sym.decl, state.vector_mask) == hir::RunClass::Scalar,
+ );
+ if let Some(ref _array) = d.head.ty.array_sizes {
+ show_type(state, &d.head.ty);
+ } else {
+ if let Some(ty_def) = d.head.ty_def {
+ show_sym_decl(state, &ty_def);
+ } else {
+ show_type(state, &d.head.ty);
+ }
+ }
+ write!(state, " constexpr {}::{};\n", part_name, sym.name);
+ state.is_scalar.set(is_scalar);
+ }
+ _ => {}
+ }
+ }
+ _ => {}
+ }
+ }
+}
diff --git a/third_party/webrender/glsl-to-cxx/src/main.rs b/third_party/webrender/glsl-to-cxx/src/main.rs
new file mode 100644
index 00000000000..e40262c84e1
--- /dev/null
+++ b/third_party/webrender/glsl-to-cxx/src/main.rs
@@ -0,0 +1,8 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use glsl_to_cxx::translate;
+fn main() {
+ println!("{}", translate(&mut std::env::args()));
+}
diff --git a/third_party/webrender/patches/0001-Add-signal-handler-to-catch-segfault-in-build-script.patch b/third_party/webrender/patches/0001-Add-signal-handler-to-catch-segfault-in-build-script.patch
new file mode 100644
index 00000000000..674e9801466
--- /dev/null
+++ b/third_party/webrender/patches/0001-Add-signal-handler-to-catch-segfault-in-build-script.patch
@@ -0,0 +1,226 @@
+From 34d968adeda2e06b057a13d14a88df5766b38eda Mon Sep 17 00:00:00 2001
+From: Josh Matthews <josh@joshmatthews.net>
+Date: Mon, 6 Jul 2020 14:37:42 -0400
+Subject: [PATCH] Add signal handler to catch segfault in build script.
+
+---
+ Cargo.lock | 11 +++++
+ webrender/Cargo.toml | 5 ++
+ webrender/backtrace.rs | 103 +++++++++++++++++++++++++++++++++++++++++
+ webrender/build.rs | 30 ++++++++++++
+ 4 files changed, 149 insertions(+)
+ create mode 100644 webrender/backtrace.rs
+
+diff --git a/Cargo.lock b/Cargo.lock
+index afdd336ae..cf91162d5 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -1477,6 +1477,14 @@ dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
++[[package]]
++name = "sig"
++version = "1.0.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
+ [[package]]
+ name = "slab"
+ version = "0.4.2"
+@@ -1750,6 +1758,7 @@ dependencies = [
+ name = "webrender"
+ version = "0.61.0"
+ dependencies = [
++ "backtrace 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)",
+ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1780,6 +1789,7 @@ dependencies = [
+ "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)",
++ "sig 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "smallvec 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "svg_fmt 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -2178,6 +2188,7 @@ dependencies = [
+ "checksum servo-freetype-sys 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4ccb6d0d32d277d3ef7dea86203d8210945eb7a45fba89dd445b3595dd0dfc"
+ "checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df"
+ "checksum shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11"
++"checksum sig 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6567e29578f9bfade6a5d94a32b9a4256348358d2a3f448cab0021f9a02614a2"
+ "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
+ "checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6"
+ "checksum smallvec 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05720e22615919e4734f6a99ceae50d00226c3c5aca406e102ebc33298214e0a"
+diff --git a/webrender/Cargo.toml b/webrender/Cargo.toml
+index dcf26d913..f7679da57 100644
+--- a/webrender/Cargo.toml
++++ b/webrender/Cargo.toml
+@@ -59,6 +59,11 @@ tracy-rs = { version = "0.1" }
+ mozangle = "0.3.1"
+ rand = "0.4"
+
++[target.'cfg(any(target_os = "macos", target_os = "linux"))'.build-dependencies]
++backtrace = "0.3"
++sig = "1.0"
++libc = "0.2"
++
+ [target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies]
+ freetype = { version = "0.4", default-features = false }
+ libc = "0.2"
+diff --git a/webrender/backtrace.rs b/webrender/backtrace.rs
+new file mode 100644
+index 000000000..aa6bb6b32
+--- /dev/null
++++ b/webrender/backtrace.rs
+@@ -0,0 +1,103 @@
++/* This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
++
++//! Similar to `println!("{:?}", Backtrace::new())`, but doesn’t allocate.
++//!
++//! Seems to fix some deadlocks: https://github.com/servo/servo/issues/24881
++//!
++//! FIXME: if/when a future version of the `backtrace` crate has
++//! https://github.com/rust-lang/backtrace-rs/pull/265, use that instead.
++
++use std::fmt::{self, Write};
++use backtrace::{BytesOrWideString, PrintFmt};
++
++#[inline(never)]
++pub(crate) fn print(w: &mut dyn std::io::Write) -> Result<(), std::io::Error> {
++ write!(w, "{:?}", Print {
++ print_fn_address: print as usize,
++ })
++}
++
++struct Print {
++ print_fn_address: usize,
++}
++
++impl fmt::Debug for Print {
++ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++ // Safety: we’re in a signal handler that is about to call `libc::_exit`.
++ // Potential data races from using `*_unsynchronized` functions are perhaps
++ // less bad than potential deadlocks?
++ unsafe {
++ let mut print_fn_frame = 0;
++ let mut frame_count = 0;
++ backtrace::trace_unsynchronized(|frame| {
++ let found = frame.symbol_address() as usize == self.print_fn_address;
++ if found {
++ print_fn_frame = frame_count;
++ }
++ frame_count += 1;
++ !found
++ });
++
++ let mode = PrintFmt::Short;
++ let mut p = print_path;
++ let mut f = backtrace::BacktraceFmt::new(fmt, mode, &mut p);
++ f.add_context()?;
++ let mut result = Ok(());
++ let mut frame_count = 0;
++ backtrace::trace_unsynchronized(|frame| {
++ let skip = frame_count < print_fn_frame;
++ frame_count += 1;
++ if skip {
++ return true
++ }
++
++ let mut frame_fmt = f.frame();
++ let mut any_symbol = false;
++ backtrace::resolve_frame_unsynchronized(frame, |symbol| {
++ any_symbol = true;
++ if let Err(e) = frame_fmt.symbol(frame, symbol) {
++ result = Err(e)
++ }
++ });
++ if !any_symbol {
++ if let Err(e) = frame_fmt.print_raw(frame.ip(), None, None, None) {
++ result = Err(e)
++ }
++ }
++ result.is_ok()
++ });
++ result?;
++ f.finish()
++ }
++ }
++}
++
++fn print_path(fmt: &mut fmt::Formatter, path: BytesOrWideString) -> fmt::Result {
++ match path {
++ BytesOrWideString::Bytes(mut bytes) => {
++ loop {
++ match std::str::from_utf8(bytes) {
++ Ok(s) => {
++ fmt.write_str(s)?;
++ break;
++ }
++ Err(err) => {
++ fmt.write_char(std::char::REPLACEMENT_CHARACTER)?;
++ match err.error_len() {
++ Some(len) => bytes = &bytes[err.valid_up_to() + len..],
++ None => break,
++ }
++ }
++ }
++ }
++ }
++ BytesOrWideString::Wide(wide) => {
++ for c in std::char::decode_utf16(wide.iter().cloned()) {
++ fmt.write_char(c.unwrap_or(std::char::REPLACEMENT_CHARACTER))?
++ }
++ }
++ }
++ Ok(())
++}
+diff --git a/webrender/build.rs b/webrender/build.rs
+index 3521d1342..36a7f17a8 100644
+--- a/webrender/build.rs
++++ b/webrender/build.rs
+@@ -244,7 +244,37 @@ fn write_optimized_shaders(shader_dir: &Path, shader_file: &mut File, out_dir: &
+ Ok(())
+ }
+
++#[cfg(any(target_os = "macos", target_os = "linux"))]
++mod backtrace;
++
++#[cfg(any(target_os = "macos", target_os = "linux"))]
++extern "C" fn handler(sig: i32) {
++ use std::sync::atomic;
++ static BEEN_HERE_BEFORE: atomic::AtomicBool = atomic::AtomicBool::new(false);
++ if !BEEN_HERE_BEFORE.swap(true, atomic::Ordering::SeqCst) {
++ let stdout = std::io::stdout();
++ let mut stdout = stdout.lock();
++ let _ = write!(&mut stdout, "Stack trace");
++ if let Some(name) = std::thread::current().name() {
++ let _ = write!(&mut stdout, " for thread \"{}\"", name);
++ }
++ let _ = write!(&mut stdout, "\n");
++ let _ = backtrace::print(&mut stdout);
++ }
++ unsafe {
++ libc::_exit(sig);
++ }
++}
++
+ fn main() -> Result<(), std::io::Error> {
++ #[cfg(any(target_os = "macos", target_os = "linux"))]
++ {
++ sig::signal!(sig::ffi::Sig::SEGV, handler); // handle segfaults
++ sig::signal!(sig::ffi::Sig::ILL, handler); // handle stack overflow and unsupported CPUs
++ sig::signal!(sig::ffi::Sig::IOT, handler); // handle double panics
++ sig::signal!(sig::ffi::Sig::BUS, handler); // handle invalid memory access
++ }
++
+ let out_dir = env::var("OUT_DIR").unwrap_or("out".to_owned());
+
+ let shaders_file_path = Path::new(&out_dir).join("shaders.rs");
+--
+2.39.2
+
diff --git a/third_party/webrender/patches/0002-Bug-1646741-Update-gleam-to-0.12.-r-kvark.patch b/third_party/webrender/patches/0002-Bug-1646741-Update-gleam-to-0.12.-r-kvark.patch
new file mode 100644
index 00000000000..7bb98352203
--- /dev/null
+++ b/third_party/webrender/patches/0002-Bug-1646741-Update-gleam-to-0.12.-r-kvark.patch
@@ -0,0 +1,174 @@
+From 299c4db222eb9f0acd9623b66b8f3d0a8a8f77f2 Mon Sep 17 00:00:00 2001
+From: Jeff Muizelaar <jmuizelaar@mozilla.com>
+Date: Fri, 19 Jun 2020 04:10:02 +0000
+Subject: [PATCH 2/6] Bug 1646741 - Update gleam to 0.12. r=kvark
+
+For stride calculation and SSBOs
+
+Differential Revision: https://phabricator.services.mozilla.com/D80191
+
+[ghsync] From https://hg.mozilla.org/mozilla-central/rev/ef8485a16d099e24f4832178664c5a93a28396ec
+---
+ Cargo.lock | 16 ++++++++--------
+ direct-composition/Cargo.toml | 2 +-
+ example-compositor/compositor/Cargo.toml | 2 +-
+ examples/Cargo.toml | 2 +-
+ swgl/Cargo.toml | 2 +-
+ webrender/Cargo.toml | 2 +-
+ wrench/Cargo.toml | 2 +-
+ 7 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index cf91162d5..3eb484f26 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -257,7 +257,7 @@ name = "compositor"
+ version = "0.1.0"
+ dependencies = [
+ "compositor-windows 0.1.0",
+- "gleam 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+ ]
+
+@@ -435,7 +435,7 @@ name = "direct-composition"
+ version = "0.1.0"
+ dependencies = [
+ "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+- "gleam 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -617,7 +617,7 @@ dependencies = [
+
+ [[package]]
+ name = "gleam"
+-version = "0.11.0"
++version = "0.12.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+ "gl_generator 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1545,7 +1545,7 @@ name = "swgl"
+ version = "0.1.0"
+ dependencies = [
+ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
+- "gleam 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glsl-to-cxx 0.1.0",
+ "webrender_build 0.0.1",
+ ]
+@@ -1773,7 +1773,7 @@ dependencies = [
+ "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "freetype 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+- "gleam 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glslopt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "image 0.23.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1808,7 +1808,7 @@ dependencies = [
+ "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+- "gleam 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+@@ -1938,7 +1938,7 @@ dependencies = [
+ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "font-loader 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+- "gleam 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "image 0.23.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -2087,7 +2087,7 @@ dependencies = [
+ "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
+ "checksum gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ca98bbde17256e02d17336a6bdb5a50f7d0ccacee502e191d3e3d0ec2f96f84a"
+ "checksum gl_generator 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d"
+-"checksum gleam 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9a13b5bb12ab457c15400b43cbba5971df5c1898b6a9c30cc8c52cb01baa112"
++"checksum gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8d023b0b00c16960f0f82816f2f546dabe937e75b25c7d6ce09a63e6a52d71e"
+ "checksum gleam 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "cae10d7c99d0e77b4766e850a60898a17c1abaf01075531f1066f03dc7dc5fc5"
+ "checksum glsl 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "766443890761b3c4edcce86cafaac97971b200662fbdd0446eb7c6b99b4401ea"
+ "checksum glslopt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f22b383fcf6f85c4a268af39a0758ec40970e5f9f8fe9809e4415d48409b8379"
+diff --git a/direct-composition/Cargo.toml b/direct-composition/Cargo.toml
+index d099402d8..3506aec02 100644
+--- a/direct-composition/Cargo.toml
++++ b/direct-composition/Cargo.toml
+@@ -7,7 +7,7 @@ edition = "2018"
+
+ [target.'cfg(windows)'.dependencies]
+ euclid = "0.20"
+-gleam = "0.11"
++gleam = "0.12"
+ mozangle = {version = "0.3.1", features = ["egl"]}
+ webrender = {path = "../webrender"}
+ winapi = {version = "0.3", features = ["winerror", "d3d11", "dcomp"]}
+diff --git a/example-compositor/compositor/Cargo.toml b/example-compositor/compositor/Cargo.toml
+index ce4d61928..d505e9ad2 100644
+--- a/example-compositor/compositor/Cargo.toml
++++ b/example-compositor/compositor/Cargo.toml
+@@ -7,7 +7,7 @@ license = "MPL-2.0"
+
+ [dependencies]
+ webrender = { path = "../../webrender" }
+-gleam = "0.11.0"
++gleam = "0.12.0"
+
+ [target.'cfg(windows)'.dependencies]
+ compositor-windows = { path = "../compositor-windows" }
+diff --git a/examples/Cargo.toml b/examples/Cargo.toml
+index 31c695f98..09e658ca2 100644
+--- a/examples/Cargo.toml
++++ b/examples/Cargo.toml
+@@ -61,7 +61,7 @@ debug = ["webrender/capture", "webrender/debugger", "webrender/profiler"]
+ app_units = "0.7"
+ env_logger = "0.5"
+ euclid = "0.20"
+-gleam = "0.11"
++gleam = "0.12"
+ glutin = "0.21"
+ rayon = "1"
+ webrender = { path = "../webrender" }
+diff --git a/swgl/Cargo.toml b/swgl/Cargo.toml
+index 3d57edbab..bc5a04b0a 100644
+--- a/swgl/Cargo.toml
++++ b/swgl/Cargo.toml
+@@ -12,4 +12,4 @@ glsl-to-cxx = { path = "../glsl-to-cxx" }
+ webrender_build = { path = "../webrender_build" }
+
+ [dependencies]
+-gleam = "0.11.0"
++gleam = "0.12.0"
+diff --git a/webrender/Cargo.toml b/webrender/Cargo.toml
+index f7679da57..2b0ab14fb 100644
+--- a/webrender/Cargo.toml
++++ b/webrender/Cargo.toml
+@@ -34,7 +34,7 @@ cfg-if = "0.1.2"
+ cstr = "0.1.2"
+ euclid = { version = "0.20.0", features = ["serde"] }
+ fxhash = "0.2.1"
+-gleam = "0.11.0"
++gleam = "0.12.0"
+ image_loader = { optional = true, version = "0.23", package = "image", default-features = false, features = ["png"] }
+ lazy_static = "1"
+ log = "0.4"
+diff --git a/wrench/Cargo.toml b/wrench/Cargo.toml
+index 988e2537a..4ba95e4c4 100644
+--- a/wrench/Cargo.toml
++++ b/wrench/Cargo.toml
+@@ -12,7 +12,7 @@ bincode = "1.0"
+ byteorder = "1.0"
+ env_logger = { version = "0.5", optional = true }
+ euclid = "0.20"
+-gleam = "0.11"
++gleam = "0.12"
+ glutin = "0.21"
+ app_units = "0.7"
+ clap = { version = "2", features = ["yaml"] }
+--
+2.39.2
+
diff --git a/third_party/webrender/patches/0003-Bug-1651889.-Update-to-gleam-0.12.1.-r-kvark.patch b/third_party/webrender/patches/0003-Bug-1651889.-Update-to-gleam-0.12.1.-r-kvark.patch
new file mode 100644
index 00000000000..6ca3264d183
--- /dev/null
+++ b/third_party/webrender/patches/0003-Bug-1651889.-Update-to-gleam-0.12.1.-r-kvark.patch
@@ -0,0 +1,107 @@
+From 3767bd8938b5b849bc23bb7ac490cb0c27655560 Mon Sep 17 00:00:00 2001
+From: Jeff Muizelaar <jmuizelaar@mozilla.com>
+Date: Sat, 11 Jul 2020 09:42:33 +0000
+Subject: [PATCH 3/6] Bug 1651889. Update to gleam 0.12.1. r=kvark
+
+This should fix a crash caused by an unexpected pixel type.
+
+Differential Revision: https://phabricator.services.mozilla.com/D83167
+
+[ghsync] From https://hg.mozilla.org/mozilla-central/rev/b850773b54e129888b8fb2f1e3bc68f528aeccbf
+---
+ Cargo.lock | 16 ++++++++--------
+ webrender/Cargo.toml | 2 +-
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 3eb484f26..24f92084c 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -257,7 +257,7 @@ name = "compositor"
+ version = "0.1.0"
+ dependencies = [
+ "compositor-windows 0.1.0",
+- "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+ ]
+
+@@ -435,7 +435,7 @@ name = "direct-composition"
+ version = "0.1.0"
+ dependencies = [
+ "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+- "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -617,7 +617,7 @@ dependencies = [
+
+ [[package]]
+ name = "gleam"
+-version = "0.12.0"
++version = "0.12.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+ "gl_generator 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1545,7 +1545,7 @@ name = "swgl"
+ version = "0.1.0"
+ dependencies = [
+ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
+- "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glsl-to-cxx 0.1.0",
+ "webrender_build 0.0.1",
+ ]
+@@ -1773,7 +1773,7 @@ dependencies = [
+ "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "freetype 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+- "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glslopt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "image 0.23.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1808,7 +1808,7 @@ dependencies = [
+ "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+- "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+@@ -1938,7 +1938,7 @@ dependencies = [
+ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "font-loader 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+- "gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "image 0.23.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -2087,7 +2087,7 @@ dependencies = [
+ "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
+ "checksum gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ca98bbde17256e02d17336a6bdb5a50f7d0ccacee502e191d3e3d0ec2f96f84a"
+ "checksum gl_generator 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d"
+-"checksum gleam 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8d023b0b00c16960f0f82816f2f546dabe937e75b25c7d6ce09a63e6a52d71e"
++"checksum gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdef5b9df6d3a261b80a5ac55e13bf93945725df2463c1b0a2e5a527dce0d37"
+ "checksum gleam 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "cae10d7c99d0e77b4766e850a60898a17c1abaf01075531f1066f03dc7dc5fc5"
+ "checksum glsl 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "766443890761b3c4edcce86cafaac97971b200662fbdd0446eb7c6b99b4401ea"
+ "checksum glslopt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f22b383fcf6f85c4a268af39a0758ec40970e5f9f8fe9809e4415d48409b8379"
+diff --git a/webrender/Cargo.toml b/webrender/Cargo.toml
+index 2b0ab14fb..3fa6630bd 100644
+--- a/webrender/Cargo.toml
++++ b/webrender/Cargo.toml
+@@ -34,7 +34,7 @@ cfg-if = "0.1.2"
+ cstr = "0.1.2"
+ euclid = { version = "0.20.0", features = ["serde"] }
+ fxhash = "0.2.1"
+-gleam = "0.12.0"
++gleam = "0.12.1"
+ image_loader = { optional = true, version = "0.23", package = "image", default-features = false, features = ["png"] }
+ lazy_static = "1"
+ log = "0.4"
+--
+2.39.2
+
diff --git a/third_party/webrender/patches/0004-Bug-1654699.-Update-core-foundation-core-graphics.-r.patch b/third_party/webrender/patches/0004-Bug-1654699.-Update-core-foundation-core-graphics.-r.patch
new file mode 100644
index 00000000000..4791f15a989
--- /dev/null
+++ b/third_party/webrender/patches/0004-Bug-1654699.-Update-core-foundation-core-graphics.-r.patch
@@ -0,0 +1,328 @@
+From 920168aff79a7cf52980b0c90965a591f2f4204a Mon Sep 17 00:00:00 2001
+From: Jeff Muizelaar <jmuizelaar@mozilla.com>
+Date: Fri, 24 Jul 2020 09:54:10 +0000
+Subject: [PATCH 4/6] Bug 1654699. Update core-foundation/core-graphics.
+ r=kvark,keeler,chunmin
+
+This includes updates to authenticator, cubeb-coreaudio,
+metal, gfx-backend-vulkan, gfx-backend-metal, freetype
+
+libloading is duplicated because of ash
+
+Differential Revision: https://phabricator.services.mozilla.com/D84688
+
+[ghsync] From https://hg.mozilla.org/mozilla-central/rev/45fc4a780b2b4a9e047eceba73b39b988f719c58
+---
+ Cargo.lock | 110 +++++++++++++++++++++++++--------------
+ webrender/Cargo.toml | 10 ++--
+ webrender_api/Cargo.toml | 4 +-
+ wrench/Cargo.toml | 6 +--
+ 4 files changed, 80 insertions(+), 50 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 24f92084c..617092292 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -286,6 +286,15 @@ dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
++[[package]]
++name = "core-foundation"
++version = "0.9.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "core-foundation-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
+ [[package]]
+ name = "core-foundation-sys"
+ version = "0.6.2"
+@@ -296,6 +305,11 @@ name = "core-foundation-sys"
+ version = "0.7.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+
++[[package]]
++name = "core-foundation-sys"
++version = "0.8.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++
+ [[package]]
+ name = "core-graphics"
+ version = "0.17.3"
+@@ -309,22 +323,34 @@ dependencies = [
+
+ [[package]]
+ name = "core-graphics"
+-version = "0.19.0"
++version = "0.22.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+- "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-graphics-types 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
++ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "core-graphics-types"
++version = "0.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+ [[package]]
+ name = "core-text"
+-version = "15.0.0"
++version = "19.0.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+- "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+- "core-graphics 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-graphics 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+@@ -510,13 +536,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+
+ [[package]]
+ name = "font-loader"
+-version = "0.9.0"
++version = "0.11.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+- "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+- "core-text 15.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-text 19.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+- "servo-fontconfig 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "servo-fontconfig 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+@@ -535,11 +561,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+
+ [[package]]
+ name = "freetype"
+-version = "0.4.1"
++version = "0.7.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
++ "freetype-sys 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+- "servo-freetype-sys 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "freetype-sys"
++version = "0.13.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
++ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
++ "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+ [[package]]
+@@ -1431,29 +1467,20 @@ dependencies = [
+
+ [[package]]
+ name = "servo-fontconfig"
+-version = "0.4.0"
++version = "0.5.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
+- "servo-fontconfig-sys 4.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
++ "servo-fontconfig-sys 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+ [[package]]
+ name = "servo-fontconfig-sys"
+-version = "4.0.9"
++version = "5.1.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+ "expat-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+- "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
+- "servo-freetype-sys 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+-]
+-
+-[[package]]
+-name = "servo-freetype-sys"
+-version = "4.0.5"
+-source = "registry+https://github.com/rust-lang/crates.io-index"
+-dependencies = [
+- "cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
++ "freetype-sys 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+@@ -1765,13 +1792,13 @@ dependencies = [
+ "build-parallel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+- "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+- "core-graphics 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
+- "core-text 15.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-graphics 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-text 19.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cstr 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "dwrote 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+- "freetype 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
++ "freetype 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glslopt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1822,8 +1849,8 @@ dependencies = [
+ "app_units 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+- "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+- "core-graphics 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-graphics 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "derive_more 0.99.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1931,13 +1958,13 @@ dependencies = [
+ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
+- "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+- "core-graphics 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "core-graphics 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "dwrote 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+- "font-loader 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "font-loader 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "image 0.23.3 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -2051,11 +2078,14 @@ dependencies = [
+ "checksum cocoa 0.18.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1706996401131526e36b3b49f0c4d912639ce110996f3ca144d78946727bce54"
+ "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d"
+ "checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171"
++"checksum core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3b5ed8e7e76c45974e15e41bfa8d5b0483cd90191639e01d8f5f1e606299d3fb"
+ "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b"
+ "checksum core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
++"checksum core-foundation-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9a21fa21941700a3cd8fcb4091f361a6a712fac632f85d9f487cc892045d55c6"
+ "checksum core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56790968ab1c8a1202a102e6de05fc6e1ec87da99e4e93e9a7d13efbfc1e95a9"
+-"checksum core-graphics 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "59e78b2e0aaf43f08e7ae0d6bc96895ef72ff0921c7d4ff4762201b2dba376dd"
+-"checksum core-text 15.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "131b3fd1f8bd5db9f2b398fa4fdb6008c64afc04d447c306ac2c7e98fba2a61d"
++"checksum core-graphics 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f6082396a349fa49674ba1bda4077332a18bf150e8fa75745ece07085e29a113"
++"checksum core-graphics-types 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e92f5d519093a4178296707dbaa3880eae85a5ef5386675f361a1cf25376e93c"
++"checksum core-text 19.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "04dfae50af11e72657fe7174cddb1ecddc5398037f7f6f39533ad69207c9a4e2"
+ "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
+ "checksum crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "bd66663db5a988098a89599d4857919b3acf7f61402e61365acfd3919857b9be"
+ "checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285"
+@@ -2075,10 +2105,11 @@ dependencies = [
+ "checksum euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c6a5b0c779cd0b744c73a1d2083faf181080d696903cdad99a3b03d015d7030"
+ "checksum expat-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa"
+ "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
+-"checksum font-loader 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "933a61458662fbc8e3cd22cdb8331edbd78545fc044e1e2cd3d742f6ce06aa41"
++"checksum font-loader 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c49d6b4c11dca1a1dd931a34a9f397e2da91abe3de4110505f3530a80e560b52"
+ "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+ "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+-"checksum freetype 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "11926b2b410b469d0e9399eca4cbbe237a9ef02176c485803b29216307e8e028"
++"checksum freetype 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bee38378a9e3db1cc693b4f88d166ae375338a0ff75cb8263e1c601d51f35dc6"
++"checksum freetype-sys 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a"
+ "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
+ "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
+ "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
+@@ -2183,9 +2214,8 @@ dependencies = [
+ "checksum serde_bytes 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "325a073952621257820e7a3469f55ba4726d8b28657e7e36653d1c36dc2c84ae"
+ "checksum serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)" = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c"
+ "checksum serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)" = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9"
+-"checksum servo-fontconfig 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a088f8d775a5c5314aae09bd77340bc9c67d72b9a45258be34c83548b4814cd9"
+-"checksum servo-fontconfig-sys 4.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "62b3e166450f523f4db06c14f02a2d39e76d49b5d8cbd224338d93e3595c156c"
+-"checksum servo-freetype-sys 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4ccb6d0d32d277d3ef7dea86203d8210945eb7a45fba89dd445b3595dd0dfc"
++"checksum servo-fontconfig 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c"
++"checksum servo-fontconfig-sys 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388"
+ "checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df"
+ "checksum shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11"
+ "checksum sig 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6567e29578f9bfade6a5d94a32b9a4256348358d2a3f448cab0021f9a02614a2"
+diff --git a/webrender/Cargo.toml b/webrender/Cargo.toml
+index 3fa6630bd..d05cf5979 100644
+--- a/webrender/Cargo.toml
++++ b/webrender/Cargo.toml
+@@ -10,7 +10,7 @@ edition = "2018"
+
+ [features]
+ default = ["freetype-lib"]
+-freetype-lib = ["freetype/servo-freetype-sys"]
++freetype-lib = ["freetype/freetype-sys"]
+ profiler = ["tracy-rs/enable_profiler"]
+ debugger = ["ws", "serde_json", "serde", "image_loader", "base64"]
+ capture = ["api/serialize", "ron", "serde", "smallvec/serde"]
+@@ -65,13 +65,13 @@ sig = "1.0"
+ libc = "0.2"
+
+ [target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies]
+-freetype = { version = "0.4", default-features = false }
++freetype = { version = "0.7", default-features = false }
+ libc = "0.2"
+
+ [target.'cfg(target_os = "windows")'.dependencies]
+ dwrote = "0.11"
+
+ [target.'cfg(target_os = "macos")'.dependencies]
+-core-foundation = "0.7"
+-core-graphics = "0.19"
+-core-text = { version = "15", default-features = false }
++core-foundation = "0.9"
++core-graphics = "0.22"
++core-text = { version = "19", default-features = false }
+diff --git a/webrender_api/Cargo.toml b/webrender_api/Cargo.toml
+index 6b8b1e5f2..4ed7ce8e2 100644
+--- a/webrender_api/Cargo.toml
++++ b/webrender_api/Cargo.toml
+@@ -28,5 +28,5 @@ malloc_size_of = { version = "0.0.1", path = "../wr_malloc_size_of", package = "
+ peek-poke = { version = "0.2", path = "../peek-poke", features = ["extras"] }
+
+ [target.'cfg(target_os = "macos")'.dependencies]
+-core-foundation = "0.7"
+-core-graphics = "0.19"
++core-foundation = "0.9"
++core-graphics = "0.22"
+diff --git a/wrench/Cargo.toml b/wrench/Cargo.toml
+index 4ba95e4c4..33679485a 100644
+--- a/wrench/Cargo.toml
++++ b/wrench/Cargo.toml
+@@ -38,8 +38,8 @@ default-features = false
+ features = ["png"]
+
+ [target.'cfg(target_os = "macos")'.dependencies]
+-core-graphics = "0.19"
+-core-foundation = "0.7"
++core-graphics = "0.22"
++core-foundation = "0.9"
+
+ [features]
+ default = [ "env_logger" ]
+@@ -51,7 +51,7 @@ dwrote = "0.11"
+ mozangle = {version = "0.3.1", features = ["egl"]}
+
+ [target.'cfg(all(unix, not(target_os = "android")))'.dependencies]
+-font-loader = "0.9"
++font-loader = "0.11"
+
+ # Configuration information used when building wrench as an APK.
+ [package.metadata.android]
+--
+2.39.2
+
diff --git a/third_party/webrender/patches/0005-Bug-1656236-Update-to-euclid-0.22.-r-kvark.patch b/third_party/webrender/patches/0005-Bug-1656236-Update-to-euclid-0.22.-r-kvark.patch
new file mode 100644
index 00000000000..91af85c23ff
--- /dev/null
+++ b/third_party/webrender/patches/0005-Bug-1656236-Update-to-euclid-0.22.-r-kvark.patch
@@ -0,0 +1,9059 @@
+From 97fb9976d408016b4f64dac6516ac2032dcc27b3 Mon Sep 17 00:00:00 2001
+From: Nicolas Silva <nsilva@mozilla.com>
+Date: Wed, 19 Aug 2020 10:22:02 +0000
+Subject: [PATCH 1/2] Bug 1656236 - Update to euclid 0.22. r=kvark
+
+Differential Revision: https://phabricator.services.mozilla.com/D85549
+
+[ghsync] From https://hg.mozilla.org/mozilla-central/rev/dcfa644ba0788e1ce1e5d8523652cea6f83c8ce9
+---
+ Cargo.lock | 28 ++++----
+ direct-composition/Cargo.toml | 2 +-
+ examples/Cargo.toml | 2 +-
+ examples/animation.rs | 6 +-
+ peek-poke/Cargo.toml | 2 +-
+ tileview/Cargo.toml | 2 +-
+ tileview/src/main.rs | 6 +-
+ webrender/Cargo.toml | 4 +-
+ webrender/src/batch.rs | 10 +--
+ webrender/src/border.rs | 12 ++--
+ webrender/src/device/gl.rs | 2 +-
+ webrender/src/picture.rs | 6 +-
+ webrender/src/prim_store/mod.rs | 4 +-
+ webrender/src/render_backend.rs | 2 +-
+ webrender/src/render_target.rs | 2 +-
+ webrender/src/render_task_graph.rs | 2 +-
+ webrender/src/spatial_node.rs | 14 ++--
+ webrender/src/spatial_tree.rs | 34 +++++-----
+ webrender/src/texture_cache.rs | 2 +-
+ webrender/src/util.rs | 63 +++++++++---------
+ webrender_api/Cargo.toml | 2 +-
+ webrender_api/src/image.rs | 12 ++--
+ webrender_api/src/image_tiling.rs | 13 ++--
+ webrender_api/src/resources.rs | 13 ++--
+ wr_malloc_size_of/Cargo.toml | 2 +-
+ wrench/Cargo.toml | 2 +-
+ wrench/reftests/aa/aa-dist-bug.yaml | 2 +-
+ .../clip/clip-45-degree-rotation-ref.png | Bin 13247 -> 13358 bytes
+ .../clip/clip-45-degree-rotation.yaml | 4 +-
+ wrench/reftests/clip/clip-out-rotation.yaml | 2 +-
+ wrench/reftests/clip/custom-clip-chains.yaml | 2 +-
+ wrench/reftests/clip/reftest.list | 2 +-
+ .../filters/backdrop-filter-perspective.png | Bin 60137 -> 60142 bytes
+ .../filters/backdrop-filter-perspective.yaml | 2 +-
+ .../filters/filter-drop-shadow-clip-2.yaml | 2 +-
+ .../filters/filter-drop-shadow-clip-3.yaml | 4 +-
+ .../filters/svg-filter-blur-transforms.yaml | 2 +-
+ .../svg-filter-drop-shadow-perspective.png | Bin 13041 -> 13036 bytes
+ .../svg-filter-drop-shadow-perspective.yaml | 2 +-
+ wrench/reftests/split/near-plane.yaml | 2 +-
+ wrench/reftests/split/same-plane.png | Bin 4280 -> 4279 bytes
+ wrench/reftests/split/same-plane.yaml | 4 +-
+ wrench/reftests/split/simple.yaml | 4 +-
+ wrench/reftests/split/split-intersect1.yaml | 2 +-
+ wrench/reftests/text/alpha-transform.yaml | 2 +-
+ wrench/reftests/text/raster-space.yaml | 6 +-
+ wrench/reftests/text/shadow-transforms.yaml | 4 +-
+ wrench/reftests/text/subpixel-rotate.yaml | 2 +-
+ wrench/reftests/text/writing-modes-ref.yaml | 4 +-
+ wrench/reftests/transforms/border-zoom.png | Bin 27613 -> 27613 bytes
+ wrench/reftests/transforms/border-zoom.yaml | 2 +-
+ .../reftests/transforms/content-offset.yaml | 2 +-
+ .../transforms/large-raster-root.yaml | 2 +-
+ wrench/reftests/transforms/local-clip.png | Bin 2187 -> 2138 bytes
+ wrench/reftests/transforms/local-clip.yaml | 2 +-
+ .../reftests/transforms/near-plane-clip.yaml | 2 +-
+ .../transforms/perspective-border-radius.yaml | 2 +-
+ .../reftests/transforms/perspective-clip.png | Bin 16937 -> 16932 bytes
+ .../reftests/transforms/perspective-clip.yaml | 2 +-
+ .../reftests/transforms/perspective-mask.png | Bin 2281 -> 2285 bytes
+ .../reftests/transforms/perspective-mask.yaml | 2 +-
+ .../transforms/perspective-origin.yaml | 2 +-
+ wrench/reftests/transforms/prim-suite.yaml | 2 +-
+ .../transforms/rotated-clip-large.png | Bin 7421 -> 7420 bytes
+ .../transforms/rotated-clip-large.yaml | 2 +-
+ wrench/reftests/transforms/rotated-clip.yaml | 2 +-
+ wrench/reftests/transforms/rotated-image.png | Bin 7449 -> 7441 bytes
+ wrench/reftests/transforms/rotated-image.yaml | 2 +-
+ .../transforms/screen-space-blit-trivial.yaml | 4 +-
+ .../reftests/transforms/screen-space-blit.png | Bin 73335 -> 73453 bytes
+ .../transforms/screen-space-blit.yaml | 4 +-
+ .../transforms/screen-space-blur.yaml | 4 +-
+ wrench/src/yaml_helper.rs | 54 ++++++---------
+ 73 files changed, 192 insertions(+), 203 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 617092292153887184c585e34723e97bcc78acac..b6085604cae8e18de3273bcddac43fa0a7e1abd1 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -460,7 +460,7 @@ dependencies = [
+ name = "direct-composition"
+ version = "0.1.0"
+ dependencies = [
+- "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+@@ -513,7 +513,7 @@ dependencies = [
+
+ [[package]]
+ name = "euclid"
+-version = "0.20.10"
++version = "0.22.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1142,7 +1142,7 @@ dependencies = [
+ name = "peek-poke"
+ version = "0.2.0"
+ dependencies = [
+- "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "peek-poke-derive 0.2.1",
+ ]
+
+@@ -1169,11 +1169,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+
+ [[package]]
+ name = "plane-split"
+-version = "0.15.0"
++version = "0.17.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+ "binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+- "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+@@ -1626,7 +1626,7 @@ dependencies = [
+ name = "tileview"
+ version = "0.1.0"
+ dependencies = [
+- "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webrender 0.61.0",
+@@ -1797,7 +1797,7 @@ dependencies = [
+ "core-text 19.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cstr 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "dwrote 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+- "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "freetype 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1809,7 +1809,7 @@ dependencies = [
+ "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+- "plane-split 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "plane-split 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "png 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1834,7 +1834,7 @@ dependencies = [
+ "app_units 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
+- "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1852,7 +1852,7 @@ dependencies = [
+ "core-foundation 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "derive_more 0.99.5 (registry+https://github.com/rust-lang/crates.io-index)",
+- "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "peek-poke 0.2.0",
+ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -1945,7 +1945,7 @@ name = "wr_malloc_size_of"
+ version = "0.0.1"
+ dependencies = [
+ "app_units 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+- "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+ [[package]]
+@@ -1963,7 +1963,7 @@ dependencies = [
+ "crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "dwrote 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
+- "euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "font-loader 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gleam 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -2102,7 +2102,7 @@ dependencies = [
+ "checksum dwrote 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b"
+ "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
+ "checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38"
+-"checksum euclid 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c6a5b0c779cd0b744c73a1d2083faf181080d696903cdad99a3b03d015d7030"
++"checksum euclid 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7ab0e07e345fb061928646949fdf5fb888e5d75a57385e7f5856e45be289e745"
+ "checksum expat-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa"
+ "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
+ "checksum font-loader 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c49d6b4c11dca1a1dd931a34a9f397e2da91abe3de4110505f3530a80e560b52"
+@@ -2177,7 +2177,7 @@ dependencies = [
+ "checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"
+ "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
+ "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"
+-"checksum plane-split 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ffe16a646a08f4b4dd74035b9ff8e378eb1a4012a74f14f5889e7001cdbece33"
++"checksum plane-split 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2211e7ccc9b6260779dd9bad59f7b10889d6361974623b9e405afd7e7e764654"
+ "checksum png 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)" = "910f09135b1ed14bb16be445a8c23ddf0777eca485fbfc7cee00d81fecab158a"
+ "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b"
+ "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
+diff --git a/direct-composition/Cargo.toml b/direct-composition/Cargo.toml
+index 3506aec0284102b887d5d77a0dc94811944a9cee..59528f98ce2c0aa2c13315cb89d711031ffa953d 100644
+--- a/direct-composition/Cargo.toml
++++ b/direct-composition/Cargo.toml
+@@ -6,7 +6,7 @@ license = "MPL-2.0"
+ edition = "2018"
+
+ [target.'cfg(windows)'.dependencies]
+-euclid = "0.20"
++euclid = "0.22"
+ gleam = "0.12"
+ mozangle = {version = "0.3.1", features = ["egl"]}
+ webrender = {path = "../webrender"}
+diff --git a/examples/Cargo.toml b/examples/Cargo.toml
+index 09e658ca2ebaf2d145e19f7fec189d0ae13b405c..4cf5d2232d63b5388b239c4325c0e023df36bab5 100644
+--- a/examples/Cargo.toml
++++ b/examples/Cargo.toml
+@@ -60,7 +60,7 @@ debug = ["webrender/capture", "webrender/debugger", "webrender/profiler"]
+ [dependencies]
+ app_units = "0.7"
+ env_logger = "0.5"
+-euclid = "0.20"
++euclid = "0.22"
+ gleam = "0.12"
+ glutin = "0.21"
+ rayon = "1"
+diff --git a/examples/animation.rs b/examples/animation.rs
+index 6aa95d0838088c80530e0550cd60ffd264d3bac5..612d891178d53a1eb6d3e752724a61c48a4966e7 100644
+--- a/examples/animation.rs
++++ b/examples/animation.rs
+@@ -165,9 +165,9 @@ impl Example for App {
+ self.angle0 += delta_angle * 0.1;
+ self.angle1 += delta_angle * 0.2;
+ self.angle2 -= delta_angle * 0.15;
+- let xf0 = LayoutTransform::create_rotation(0.0, 0.0, 1.0, Angle::radians(self.angle0));
+- let xf1 = LayoutTransform::create_rotation(0.0, 0.0, 1.0, Angle::radians(self.angle1));
+- let xf2 = LayoutTransform::create_rotation(0.0, 0.0, 1.0, Angle::radians(self.angle2));
++ let xf0 = LayoutTransform::rotation(0.0, 0.0, 1.0, Angle::radians(self.angle0));
++ let xf1 = LayoutTransform::rotation(0.0, 0.0, 1.0, Angle::radians(self.angle1));
++ let xf2 = LayoutTransform::rotation(0.0, 0.0, 1.0, Angle::radians(self.angle2));
+ let mut txn = Transaction::new();
+ txn.update_dynamic_properties(
+ DynamicProperties {
+diff --git a/peek-poke/Cargo.toml b/peek-poke/Cargo.toml
+index 709c2f30b68df8f9fe40fc306fc9025fc2313a3b..45179aeda603fce3aa4cd7fcc4eb0cff9e38cf27 100644
+--- a/peek-poke/Cargo.toml
++++ b/peek-poke/Cargo.toml
+@@ -8,7 +8,7 @@ license = "MIT/Apache-2.0"
+ edition = "2018"
+
+ [dependencies]
+-euclid = { version = "0.20.0", optional = true }
++euclid = { version = "0.22.0", optional = true }
+ peek-poke-derive = { version = "0.2", path = "./peek-poke-derive", optional = true }
+
+ [features]
+diff --git a/tileview/Cargo.toml b/tileview/Cargo.toml
+index cb32309424d9829a8a966643fbf828c5ec39c0ae..66e955d5a34ca233796397def7a3302162242a68 100644
+--- a/tileview/Cargo.toml
++++ b/tileview/Cargo.toml
+@@ -12,4 +12,4 @@ ron = "0.5"
+ serde = {version = "1.0.88", features = ["derive"] }
+ webrender = {path = "../webrender", features=["capture","replay","debugger","png","profiler","no_static_freetype", "leak_checks"]}
+ webrender_api = {path = "../webrender_api", features=["serialize","deserialize"]}
+-euclid = { version = "0.20.0", features = ["serde"] }
++euclid = { version = "0.22.0", features = ["serde"] }
+diff --git a/tileview/src/main.rs b/tileview/src/main.rs
+index 1706197b0bc4e7c4cf5358f606ed2e058b5d4208..0e33d15e4264cd7b99da4187e165ac026ac3aab4 100644
+--- a/tileview/src/main.rs
++++ b/tileview/src/main.rs
+@@ -73,7 +73,7 @@ fn tile_node_to_svg(node: &TileNode,
+ {
+ match &node.kind {
+ TileNodeKind::Leaf { .. } => {
+- let rect_world = transform.transform_rect(&node.rect.to_rect()).unwrap();
++ let rect_world = transform.outer_transformed_rect(&node.rect.to_rect()).unwrap();
+ format!("<rect x=\"{:.2}\" y=\"{:.2}\" width=\"{:.2}\" height=\"{:.2}\" />\n",
+ rect_world.origin.x * svg_settings.scale + svg_settings.x,
+ rect_world.origin.y * svg_settings.scale + svg_settings.y,
+@@ -296,7 +296,7 @@ fn tile_to_svg(key: TileOffset,
+ origin: tile.rect.origin,
+ size: PictureSize::new(1.0, 1.0)
+ };
+- let rect_visual_id_world = slice.transform.transform_rect(&rect_visual_id).unwrap();
++ let rect_visual_id_world = slice.transform.outer_transformed_rect(&rect_visual_id).unwrap();
+ svg += &format!("\n<text class=\"svg_tile_visual_id\" x=\"{}\" y=\"{}\">{},{} ({})</text>",
+ rect_visual_id_world.origin.x * svg_settings.scale + svg_settings.x,
+ (rect_visual_id_world.origin.y + 110.0) * svg_settings.scale + svg_settings.y,
+@@ -312,7 +312,7 @@ fn tile_to_svg(key: TileOffset,
+ origin: PicturePoint::new(rect.min.x, rect.min.y),
+ size: PictureSize::new(rect.max.x - rect.min.x, rect.max.y - rect.min.y),
+ };
+- let rect_world = slice.transform.transform_rect(&rect_pixel).unwrap();
++ let rect_world = slice.transform.outer_transformed_rect(&rect_pixel).unwrap();
+
+ let style =
+ if let Some(prev_tile) = prev_tile {
+diff --git a/webrender/Cargo.toml b/webrender/Cargo.toml
+index d05cf5979d31b563d3b51d46c61f9e6ea8537fbe..6e3389a309b62f6578d3d481557ebbc43a6bcb37 100644
+--- a/webrender/Cargo.toml
++++ b/webrender/Cargo.toml
+@@ -32,7 +32,7 @@ bitflags = "1.2"
+ byteorder = "1.0"
+ cfg-if = "0.1.2"
+ cstr = "0.1.2"
+-euclid = { version = "0.20.0", features = ["serde"] }
++euclid = { version = "0.22.0", features = ["serde"] }
+ fxhash = "0.2.1"
+ gleam = "0.12.1"
+ image_loader = { optional = true, version = "0.23", package = "image", default-features = false, features = ["png"] }
+@@ -40,7 +40,7 @@ lazy_static = "1"
+ log = "0.4"
+ malloc_size_of_derive = "0.1"
+ num-traits = "0.2"
+-plane-split = "0.15"
++plane-split = "0.17"
+ png = { optional = true, version = "0.16" }
+ rayon = "1"
+ ron = { optional = true, version = "0.5" }
+diff --git a/webrender/src/batch.rs b/webrender/src/batch.rs
+index 15b1e6e968e7ed28bf490314f0b49c648f59afc0..1ee371c6531533d10e5d9a30115eb8c54fa98477 100644
+--- a/webrender/src/batch.rs
++++ b/webrender/src/batch.rs
+@@ -2329,14 +2329,14 @@ impl BatchBuilder {
+ let specific_resource_address = cache_item.uv_rect_handle.as_int(gpu_cache);
+ prim_header.specific_prim_address = gpu_cache.get_address(&ctx.globals.default_image_handle);
+
+- let segment_local_clip_rect = prim_header.local_clip_rect.intersection(&segment.local_rect);
+- if segment_local_clip_rect.is_none() {
+- continue;
+- }
++ let segment_local_clip_rect = match prim_header.local_clip_rect.intersection(&segment.local_rect) {
++ Some(rect) => rect,
++ None => { continue; }
++ };
+
+ let segment_prim_header = PrimitiveHeader {
+ local_rect: segment.local_rect,
+- local_clip_rect: segment_local_clip_rect.unwrap(),
++ local_clip_rect: segment_local_clip_rect,
+ specific_prim_address: prim_header.specific_prim_address,
+ transform_id: prim_header.transform_id,
+ };
+diff --git a/webrender/src/border.rs b/webrender/src/border.rs
+index 094c78866a2285663a97a74a0d70f9be4ae71a1a..3185acd42c55bbc0c2b553e82d5b0e23b7f8a37e 100644
+--- a/webrender/src/border.rs
++++ b/webrender/src/border.rs
+@@ -1067,12 +1067,12 @@ fn add_corner_segment(
+ return;
+ }
+
+- let segment_rect = image_rect.intersection(&non_overlapping_rect)
+- .unwrap_or_else(LayoutRect::zero);
+-
+- if segment_rect.size.width <= 0. || segment_rect.size.height <= 0. {
+- return;
+- }
++ let segment_rect = match image_rect.intersection(&non_overlapping_rect) {
++ Some(rect) => rect,
++ None => {
++ return;
++ }
++ };
+
+ let texture_rect = segment_rect
+ .translate(-image_rect.origin.to_vector())
+diff --git a/webrender/src/device/gl.rs b/webrender/src/device/gl.rs
+index 4bd4d0491c4f20b301a3af3e4d1631d9a0818f86..6ad0e98eef3179f363cdaf6f2c9e44df0c840eb5 100644
+--- a/webrender/src/device/gl.rs
++++ b/webrender/src/device/gl.rs
+@@ -2747,7 +2747,7 @@ impl Device {
+ debug_assert!(self.shader_is_ready);
+
+ self.gl
+- .uniform_matrix_4fv(program.u_transform, false, &transform.to_row_major_array());
++ .uniform_matrix_4fv(program.u_transform, false, &transform.to_array());
+ }
+
+ pub fn switch_mode(&self, mode: i32) {
+diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs
+index f5e103f0042de94a92d0cebfa7363e2916a71b74..5b71479b0a55fac98b7853a0e23d3c8186814432 100644
+--- a/webrender/src/picture.rs
++++ b/webrender/src/picture.rs
+@@ -246,7 +246,7 @@ impl<Src, Dst> From<CoordinateSpaceMapping<Src, Dst>> for TransformKey {
+ CoordinateSpaceMapping::Transform(ref m) => {
+ TransformKey::Transform {
+ m: MatrixKey {
+- m: m.to_row_major_array(),
++ m: m.to_array(),
+ },
+ }
+ }
+@@ -1032,7 +1032,7 @@ impl Tile {
+ /// Print debug information about this tile to a tree printer.
+ fn print(&self, pt: &mut dyn PrintTreePrinter) {
+ pt.new_level(format!("Tile {:?}", self.id));
+- pt.add_item(format!("local_tile_rect: {}", self.local_tile_rect));
++ pt.add_item(format!("local_tile_rect: {:?}", self.local_tile_rect));
+ pt.add_item(format!("fract_offset: {:?}", self.fract_offset));
+ pt.add_item(format!("background_color: {:?}", self.background_color));
+ pt.add_item(format!("invalidation_reason: {:?}", self.invalidation_reason));
+@@ -3212,7 +3212,7 @@ impl TileCacheInstance {
+ };
+
+ // If the rect is invalid, no need to create dependencies.
+- if prim_rect.size.is_empty_or_negative() {
++ if prim_rect.size.is_empty() {
+ return None;
+ }
+
+diff --git a/webrender/src/prim_store/mod.rs b/webrender/src/prim_store/mod.rs
+index 96938add4527ab29791a51b25de230fc2f6e9f44..0a1514a9b35b994e226a424bc86a75a4ac8133d1 100644
+--- a/webrender/src/prim_store/mod.rs
++++ b/webrender/src/prim_store/mod.rs
+@@ -2194,7 +2194,7 @@ impl PrimitiveStore {
+ prim_instance.local_clip_rect
+ };
+
+- if combined_local_clip_rect.size.is_empty_or_negative() {
++ if combined_local_clip_rect.size.is_empty() {
+ debug_assert!(combined_local_clip_rect.size.width >= 0.0 &&
+ combined_local_clip_rect.size.height >= 0.0);
+ if prim_instance.is_chased() {
+@@ -4352,7 +4352,7 @@ fn get_clipped_device_rect(
+ ) -> Option<DeviceRect> {
+ let unclipped_raster_rect = {
+ let world_rect = *unclipped * Scale::new(1.0);
+- let raster_rect = world_rect * device_pixel_scale.inv();
++ let raster_rect = world_rect * device_pixel_scale.inverse();
+
+ raster_rect.cast_unit()
+ };
+diff --git a/webrender/src/render_backend.rs b/webrender/src/render_backend.rs
+index 66ad336bef76216fb9488221f32558b9b30575f4..e22596a1babc1d719491774f21ae800186a908c5 100644
+--- a/webrender/src/render_backend.rs
++++ b/webrender/src/render_backend.rs
+@@ -487,7 +487,7 @@ impl Document {
+ }
+
+ fn has_pixels(&self) -> bool {
+- !self.view.scene.device_rect.size.is_empty_or_negative()
++ !self.view.scene.device_rect.size.is_empty()
+ }
+
+ fn process_frame_msg(
+diff --git a/webrender/src/render_target.rs b/webrender/src/render_target.rs
+index 2bd6277e6eb46651158891bf2a688f1d75657b2e..9a3c953f42a9b38fe188597e232093203de3d9d6 100644
+--- a/webrender/src/render_target.rs
++++ b/webrender/src/render_target.rs
+@@ -256,7 +256,7 @@ impl<T: RenderTarget> RenderTargetList<T> {
+ }
+ };
+
+- if alloc_size.is_empty_or_negative() && self.targets.is_empty() {
++ if alloc_size.is_empty() && self.targets.is_empty() {
+ // push an unused target here, only if we don't have any
+ self.targets.push(T::new(self.screen_size, self.gpu_supports_fast_clears));
+ }
+diff --git a/webrender/src/render_task_graph.rs b/webrender/src/render_task_graph.rs
+index 7a2bd8b7f81ab2d31a9b9673d0cb63fa84207a98..3058a98838692c40891b31ff0ac4453be3d7eb61 100644
+--- a/webrender/src/render_task_graph.rs
++++ b/webrender/src/render_task_graph.rs
+@@ -573,7 +573,7 @@ pub fn dump_render_tasks_as_svg(
+
+ let saved = if task.saved_index.is_some() { " (Saved)" } else { "" };
+ let label = text(tx, ty, format!("{}{}", task.kind.as_str(), saved));
+- let size = text(tx, ty + 12.0, format!("{}", task.location.size()));
++ let size = text(tx, ty + 12.0, format!("{:?}", task.location.size()));
+
+ nodes[task_index] = Some(Node { rect, label, size });
+
+diff --git a/webrender/src/spatial_node.rs b/webrender/src/spatial_node.rs
+index 68f99e4411dd4a966fd548886a20fafcd5e0eb6d..2283b0fe1a956f910d6fd504aed2a98c2c87ae5c 100644
+--- a/webrender/src/spatial_node.rs
++++ b/webrender/src/spatial_node.rs
+@@ -337,7 +337,7 @@ impl SpatialNode {
+ // perspective matrix using the scroll offset.
+ source_transform
+ .pre_translate(scroll_offset)
+- .post_translate(-scroll_offset)
++ .then_translate(-scroll_offset)
+ }
+ ReferenceFrameKind::Perspective { scrolling_relative_to: None } |
+ ReferenceFrameKind::Transform | ReferenceFrameKind::Zoom => source_transform,
+@@ -352,7 +352,7 @@ impl SpatialNode {
+ // between our reference frame and this node. Finally, we also include
+ // whatever local transformation this reference frame provides.
+ let relative_transform = resolved_transform
+- .post_translate(snap_offset(state.parent_accumulated_scroll_offset, state.coordinate_system_relative_scale_offset.scale, global_device_pixel_scale))
++ .then_translate(snap_offset(state.parent_accumulated_scroll_offset, state.coordinate_system_relative_scale_offset.scale, global_device_pixel_scale))
+ .to_transform()
+ .with_destination::<LayoutPixel>();
+
+@@ -389,9 +389,9 @@ impl SpatialNode {
+ if reset_cs_id {
+ // If we break 2D axis alignment or have a perspective component, we need to start a
+ // new incompatible coordinate system with which we cannot share clips without masking.
+- let transform = state.coordinate_system_relative_scale_offset
+- .to_transform()
+- .pre_transform(&relative_transform);
++ let transform = relative_transform.then(
++ &state.coordinate_system_relative_scale_offset.to_transform()
++ );
+
+ // Push that new coordinate system and record the new id.
+ let coord_system = {
+@@ -400,7 +400,7 @@ impl SpatialNode {
+ if parent_system.should_flatten {
+ cur_transform.flatten_z_output();
+ }
+- let world_transform = cur_transform.post_transform(&parent_system.world_transform);
++ let world_transform = cur_transform.then(&parent_system.world_transform);
+ let determinant = world_transform.determinant();
+ info.invertible = determinant != 0.0 && !determinant.is_nan();
+
+@@ -902,7 +902,7 @@ fn test_cst_perspective_relative_scroll() {
+ let mut cst = SpatialTree::new();
+ let pipeline_id = PipelineId::dummy();
+ let ext_scroll_id = ExternalScrollId(1, pipeline_id);
+- let transform = LayoutTransform::create_perspective(100.0);
++ let transform = LayoutTransform::perspective(100.0);
+
+ let root = cst.add_reference_frame(
+ None,
+diff --git a/webrender/src/spatial_tree.rs b/webrender/src/spatial_tree.rs
+index e11c982dfdeafb61465cfd7f296e7f644d764921..d1eaca9d8fc4fa7b1802cdb154f58266661484ba 100644
+--- a/webrender/src/spatial_tree.rs
++++ b/webrender/src/spatial_tree.rs
+@@ -284,16 +284,16 @@ impl SpatialTree {
+ let child_cs = &self.coord_systems[child.coordinate_system_id.0 as usize];
+ let child_transform = child.content_transform
+ .to_transform::<LayoutPixel, LayoutPixel>()
+- .post_transform(&child_cs.world_transform);
++ .then(&child_cs.world_transform);
+ let parent_cs = &self.coord_systems[parent.coordinate_system_id.0 as usize];
+ let parent_transform = parent.content_transform
+ .to_transform()
+- .post_transform(&parent_cs.world_transform);
++ .then(&parent_cs.world_transform);
+
+ let result = parent_transform
+ .inverse()
+ .unwrap_or_default()
+- .post_transform(&child_transform)
++ .then(&child_transform)
+ .with_source::<LayoutPixel>()
+ .with_destination::<LayoutPixel>();
+ return CoordinateSpaceMapping::Transform(result);
+@@ -314,10 +314,10 @@ impl SpatialTree {
+ }
+
+ coordinate_system_id = coord_system.parent.expect("invalid parent!");
+- transform = transform.post_transform(&coord_system.transform);
++ transform = transform.then(&coord_system.transform);
+ }
+
+- transform = transform.post_transform(
++ transform = transform.then(
+ &parent.content_transform
+ .inverse()
+ .to_transform(),
+@@ -347,7 +347,7 @@ impl SpatialTree {
+ };
+ let transform = scale_offset
+ .to_transform()
+- .post_transform(&system.world_transform);
++ .then(&system.world_transform);
+
+ CoordinateSpaceMapping::Transform(transform)
+ }
+@@ -815,21 +815,21 @@ fn test_cst_simple_translation() {
+ let child1 = add_reference_frame(
+ &mut cst,
+ Some(root),
+- LayoutTransform::create_translation(100.0, 0.0, 0.0),
++ LayoutTransform::translation(100.0, 0.0, 0.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child2 = add_reference_frame(
+ &mut cst,
+ Some(child1),
+- LayoutTransform::create_translation(0.0, 50.0, 0.0),
++ LayoutTransform::translation(0.0, 50.0, 0.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child3 = add_reference_frame(
+ &mut cst,
+ Some(child2),
+- LayoutTransform::create_translation(200.0, 200.0, 0.0),
++ LayoutTransform::translation(200.0, 200.0, 0.0),
+ LayoutVector2D::zero(),
+ );
+
+@@ -857,21 +857,21 @@ fn test_cst_simple_scale() {
+ let child1 = add_reference_frame(
+ &mut cst,
+ Some(root),
+- LayoutTransform::create_scale(4.0, 1.0, 1.0),
++ LayoutTransform::scale(4.0, 1.0, 1.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child2 = add_reference_frame(
+ &mut cst,
+ Some(child1),
+- LayoutTransform::create_scale(1.0, 2.0, 1.0),
++ LayoutTransform::scale(1.0, 2.0, 1.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child3 = add_reference_frame(
+ &mut cst,
+ Some(child2),
+- LayoutTransform::create_scale(2.0, 2.0, 1.0),
++ LayoutTransform::scale(2.0, 2.0, 1.0),
+ LayoutVector2D::zero(),
+ );
+
+@@ -900,28 +900,28 @@ fn test_cst_scale_translation() {
+ let child1 = add_reference_frame(
+ &mut cst,
+ Some(root),
+- LayoutTransform::create_translation(100.0, 50.0, 0.0),
++ LayoutTransform::translation(100.0, 50.0, 0.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child2 = add_reference_frame(
+ &mut cst,
+ Some(child1),
+- LayoutTransform::create_scale(2.0, 4.0, 1.0),
++ LayoutTransform::scale(2.0, 4.0, 1.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child3 = add_reference_frame(
+ &mut cst,
+ Some(child2),
+- LayoutTransform::create_translation(200.0, -100.0, 0.0),
++ LayoutTransform::translation(200.0, -100.0, 0.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child4 = add_reference_frame(
+ &mut cst,
+ Some(child3),
+- LayoutTransform::create_scale(3.0, 2.0, 1.0),
++ LayoutTransform::scale(3.0, 2.0, 1.0),
+ LayoutVector2D::zero(),
+ );
+
+@@ -955,7 +955,7 @@ fn test_cst_translation_rotate() {
+ let child1 = add_reference_frame(
+ &mut cst,
+ Some(root),
+- LayoutTransform::create_rotation(0.0, 0.0, 1.0, Angle::degrees(90.0)),
++ LayoutTransform::rotation(0.0, 0.0, 1.0, Angle::degrees(-90.0)),
+ LayoutVector2D::zero(),
+ );
+
+diff --git a/webrender/src/texture_cache.rs b/webrender/src/texture_cache.rs
+index 7c254c7a849d053da9c13e1dcace9898e3c16d1d..9b24465680575dfcce2e16dae1cfc780456c46be 100644
+--- a/webrender/src/texture_cache.rs
++++ b/webrender/src/texture_cache.rs
+@@ -1202,7 +1202,7 @@ impl TextureCache {
+ &mut self,
+ params: &CacheAllocParams,
+ ) -> CacheEntry {
+- assert!(!params.descriptor.size.is_empty_or_negative());
++ assert!(!params.descriptor.size.is_empty());
+
+ // If this image doesn't qualify to go in the shared (batching) cache,
+ // allocate a standalone entry.
+diff --git a/webrender/src/util.rs b/webrender/src/util.rs
+index f18b80a45df523de3adb9b3364f8422b43822fa1..c6a1038643265cc7579d48ef35a06f268f497028 100644
+--- a/webrender/src/util.rs
++++ b/webrender/src/util.rs
+@@ -275,7 +275,7 @@ impl ScaleOffset {
+ }
+
+ pub fn to_transform<F, T>(&self) -> Transform3D<f32, F, T> {
+- Transform3D::row_major(
++ Transform3D::new(
+ self.scale.x,
+ 0.0,
+ 0.0,
+@@ -376,13 +376,10 @@ impl<Src, Dst> MatrixHelpers<Src, Dst> for Transform3D<f32, Src, Dst> {
+
+ fn inverse_project(&self, target: &Point2D<f32, Dst>) -> Option<Point2D<f32, Src>> {
+ let m: Transform2D<f32, Src, Dst>;
+- m = Transform2D::column_major(
+- self.m11 - target.x * self.m14,
+- self.m21 - target.x * self.m24,
+- self.m41 - target.x * self.m44,
+- self.m12 - target.y * self.m14,
+- self.m22 - target.y * self.m24,
+- self.m42 - target.y * self.m44,
++ m = Transform2D::new(
++ self.m11 - target.x * self.m14, self.m12 - target.y * self.m14,
++ self.m21 - target.x * self.m24, self.m22 - target.y * self.m24,
++ self.m41 - target.x * self.m44, self.m42 - target.y * self.m44,
+ );
+ m.inverse().map(|inv| Point2D::new(inv.m31, inv.m32))
+ }
+@@ -588,6 +585,9 @@ pub fn extract_inner_rect_safe<U>(
+ extract_inner_rect_impl(rect, radii, 1.0)
+ }
+
++#[cfg(test)]
++use euclid::vec3;
++
+ #[cfg(test)]
+ pub mod test {
+ use super::*;
+@@ -601,7 +601,7 @@ pub mod test {
+ let p0 = Point2D::new(1.0, 2.0);
+ // an identical transform doesn't need any inverse projection
+ assert_eq!(m0.inverse_project(&p0), Some(p0));
+- let m1 = Transform3D::create_rotation(0.0, 1.0, 0.0, Angle::radians(PI / 3.0));
++ let m1 = Transform3D::rotation(0.0, 1.0, 0.0, Angle::radians(-PI / 3.0));
+ // rotation by 60 degrees would imply scaling of X component by a factor of 2
+ assert_eq!(m1.inverse_project(&p0), Some(Point2D::new(2.0, 2.0)));
+ }
+@@ -614,18 +614,18 @@ pub mod test {
+
+ #[test]
+ fn scale_offset_convert() {
+- let xref = LayoutTransform::create_translation(130.0, 200.0, 0.0);
++ let xref = LayoutTransform::translation(130.0, 200.0, 0.0);
+ validate_convert(&xref);
+
+- let xref = LayoutTransform::create_scale(13.0, 8.0, 1.0);
++ let xref = LayoutTransform::scale(13.0, 8.0, 1.0);
+ validate_convert(&xref);
+
+- let xref = LayoutTransform::create_scale(0.5, 0.5, 1.0)
++ let xref = LayoutTransform::scale(0.5, 0.5, 1.0)
+ .pre_translate(LayoutVector3D::new(124.0, 38.0, 0.0));
+ validate_convert(&xref);
+
+- let xref = LayoutTransform::create_translation(50.0, 240.0, 0.0)
+- .pre_transform(&LayoutTransform::create_scale(30.0, 11.0, 1.0));
++ let xref = LayoutTransform::scale(30.0, 11.0, 1.0)
++ .then_translate(vec3(50.0, 240.0, 0.0));
+ validate_convert(&xref);
+ }
+
+@@ -642,23 +642,24 @@ pub mod test {
+
+ #[test]
+ fn scale_offset_inverse() {
+- let xref = LayoutTransform::create_translation(130.0, 200.0, 0.0);
++ let xref = LayoutTransform::translation(130.0, 200.0, 0.0);
+ validate_inverse(&xref);
+
+- let xref = LayoutTransform::create_scale(13.0, 8.0, 1.0);
++ let xref = LayoutTransform::scale(13.0, 8.0, 1.0);
+ validate_inverse(&xref);
+
+- let xref = LayoutTransform::create_scale(0.5, 0.5, 1.0)
+- .pre_translate(LayoutVector3D::new(124.0, 38.0, 0.0));
++ let xref = LayoutTransform::translation(124.0, 38.0, 0.0).
++ then_scale(0.5, 0.5, 1.0);
++
+ validate_inverse(&xref);
+
+- let xref = LayoutTransform::create_translation(50.0, 240.0, 0.0)
+- .pre_transform(&LayoutTransform::create_scale(30.0, 11.0, 1.0));
++ let xref = LayoutTransform::scale(30.0, 11.0, 1.0)
++ .then_translate(vec3(50.0, 240.0, 0.0));
+ validate_inverse(&xref);
+ }
+
+ fn validate_accumulate(x0: &LayoutTransform, x1: &LayoutTransform) {
+- let x = x0.pre_transform(x1);
++ let x = x1.then(&x0);
+
+ let s0 = ScaleOffset::from_transform(x0).unwrap();
+ let s1 = ScaleOffset::from_transform(x1).unwrap();
+@@ -670,8 +671,8 @@ pub mod test {
+
+ #[test]
+ fn scale_offset_accumulate() {
+- let x0 = LayoutTransform::create_translation(130.0, 200.0, 0.0);
+- let x1 = LayoutTransform::create_scale(7.0, 3.0, 1.0);
++ let x0 = LayoutTransform::translation(130.0, 200.0, 0.0);
++ let x1 = LayoutTransform::scale(7.0, 3.0, 1.0);
+
+ validate_accumulate(&x0, &x1);
+ }
+@@ -780,7 +781,7 @@ impl<Src, Dst> FastTransform<Src, Dst> {
+ pub fn to_transform(&self) -> Cow<Transform3D<f32, Src, Dst>> {
+ match *self {
+ FastTransform::Offset(offset) => Cow::Owned(
+- Transform3D::create_translation(offset.x, offset.y, 0.0)
++ Transform3D::translation(offset.x, offset.y, 0.0)
+ ),
+ FastTransform::Transform { ref transform, .. } => Cow::Borrowed(transform),
+ }
+@@ -799,7 +800,7 @@ impl<Src, Dst> FastTransform<Src, Dst> {
+ }
+ }
+
+- pub fn post_transform<NewDst>(&self, other: &FastTransform<Dst, NewDst>) -> FastTransform<Src, NewDst> {
++ pub fn then<NewDst>(&self, other: &FastTransform<Dst, NewDst>) -> FastTransform<Src, NewDst> {
+ match *self {
+ FastTransform::Offset(offset) => match *other {
+ FastTransform::Offset(other_offset) => {
+@@ -817,15 +818,15 @@ impl<Src, Dst> FastTransform<Src, Dst> {
+ FastTransform::Offset(other_offset) => {
+ FastTransform::with_transform(
+ transform
+- .post_translate(other_offset.to_3d())
++ .then_translate(other_offset.to_3d())
+ .with_destination::<NewDst>()
+ )
+ }
+ FastTransform::Transform { transform: ref other_transform, inverse: ref other_inverse, is_2d: other_is_2d } => {
+ FastTransform::Transform {
+- transform: transform.post_transform(other_transform),
++ transform: transform.then(other_transform),
+ inverse: inverse.as_ref().and_then(|self_inv|
+- other_inverse.as_ref().map(|other_inv| self_inv.pre_transform(other_inv))
++ other_inverse.as_ref().map(|other_inv| other_inv.then(self_inv))
+ ),
+ is_2d: is_2d & other_is_2d,
+ }
+@@ -838,7 +839,7 @@ impl<Src, Dst> FastTransform<Src, Dst> {
+ &self,
+ other: &FastTransform<NewSrc, Src>
+ ) -> FastTransform<NewSrc, Dst> {
+- other.post_transform(self)
++ other.then(self)
+ }
+
+ pub fn pre_translate(&self, other_offset: Vector2D<f32, Src>) -> Self {
+@@ -850,13 +851,13 @@ impl<Src, Dst> FastTransform<Src, Dst> {
+ }
+ }
+
+- pub fn post_translate(&self, other_offset: Vector2D<f32, Dst>) -> Self {
++ pub fn then_translate(&self, other_offset: Vector2D<f32, Dst>) -> Self {
+ match *self {
+ FastTransform::Offset(offset) => {
+ FastTransform::Offset(offset + other_offset * Scale::<_, _, Src>::new(1.0))
+ }
+ FastTransform::Transform { ref transform, .. } => {
+- let transform = transform.post_translate(other_offset.to_3d());
++ let transform = transform.then_translate(other_offset.to_3d());
+ FastTransform::with_transform(transform)
+ }
+ }
+diff --git a/webrender_api/Cargo.toml b/webrender_api/Cargo.toml
+index 4ed7ce8e2344ab3db9e6ab50331a2e813ae00fbb..1a48083a10b49e29a811d3cafad9753b8e363614 100644
+--- a/webrender_api/Cargo.toml
++++ b/webrender_api/Cargo.toml
+@@ -18,7 +18,7 @@ app_units = "0.7"
+ bitflags = "1.2"
+ byteorder = "1.2.1"
+ derive_more = "0.99"
+-euclid = { version = "0.20.0", features = ["serde"] }
++euclid = { version = "0.22.0", features = ["serde"] }
+ malloc_size_of_derive = "0.1"
+ serde = { version = "1.0", features = ["rc"] }
+ serde_derive = "1.0"
+diff --git a/webrender_api/src/image.rs b/webrender_api/src/image.rs
+index 869cb05aaaad1c007014429e97590d30e9ff681b..deaeb92aeb1c1a7ef9403bcc171e2ee10877d120 100644
+--- a/webrender_api/src/image.rs
++++ b/webrender_api/src/image.rs
+@@ -516,8 +516,9 @@ where
+
+ match (*self, *other) {
+ (All, rect) | (rect, All) => rect,
+- (Partial(rect1), Partial(rect2)) => Partial(rect1.intersection(&rect2)
+- .unwrap_or_else(Rect::zero))
++ (Partial(rect1), Partial(rect2)) => {
++ Partial(rect1.intersection(&rect2).unwrap_or_else(Rect::zero))
++ }
+ }
+ }
+
+@@ -526,9 +527,10 @@ where
+ use crate::DirtyRect::*;
+
+ match *self {
+- All => *rect,
+- Partial(dirty_rect) => dirty_rect.intersection(rect)
+- .unwrap_or_else(Rect::zero),
++ All => *rect,
++ Partial(dirty_rect) => {
++ dirty_rect.intersection(rect).unwrap_or_else(Rect::zero)
++ }
+ }
+ }
+ }
+diff --git a/webrender_api/src/image_tiling.rs b/webrender_api/src/image_tiling.rs
+index 3534ded3640b8d73388d0c9b06f485dac0b6cb3d..8fdc82ef24d49d82169993fab2a880be858615fa 100644
+--- a/webrender_api/src/image_tiling.rs
++++ b/webrender_api/src/image_tiling.rs
+@@ -592,13 +592,12 @@ pub fn compute_valid_tiles_if_bounds_change(
+ new_rect: &DeviceIntRect,
+ tile_size: u16,
+ ) -> Option<TileRange> {
+- let intersection = prev_rect.intersection(new_rect);
+-
+- if intersection.is_none() {
+- return Some(TileRange::zero());
+- }
+-
+- let intersection = intersection.unwrap_or_else(DeviceIntRect::zero);
++ let intersection = match prev_rect.intersection(new_rect) {
++ Some(rect) => rect,
++ None => {
++ return Some(TileRange::zero());
++ }
++ };
+
+ let left = prev_rect.min_x() != new_rect.min_x();
+ let right = prev_rect.max_x() != new_rect.max_x();
+diff --git a/webrender_api/src/resources.rs b/webrender_api/src/resources.rs
+index 19b97df1cb40fbcc883d2411cb2f0cc631f86422..c41fdc3009e30806af89e809f3a999f30396b274 100644
+--- a/webrender_api/src/resources.rs
++++ b/webrender_api/src/resources.rs
+@@ -291,13 +291,12 @@ fn compute_valid_tiles_if_bounds_change(
+ new_rect: &DeviceIntRect,
+ tile_size: u16,
+ ) -> Option<TileRange> {
+- let intersection = prev_rect.intersection(new_rect);
+-
+- if intersection.is_none() {
+- return Some(TileRange::zero());
+- }
+-
+- let intersection = intersection.unwrap_or_else(DeviceIntRect::zero);
++ let intersection = match prev_rect.intersection(new_rect) {
++ Some(rect) => rect,
++ None => {
++ return Some(TileRange::zero());
++ }
++ };
+
+ let left = prev_rect.min_x() != new_rect.min_x();
+ let right = prev_rect.max_x() != new_rect.max_x();
+diff --git a/wr_malloc_size_of/Cargo.toml b/wr_malloc_size_of/Cargo.toml
+index 589e309ba1396eb84a6a371ec55d4313765ccd67..a1f92126fc4b7bb9e3e1b6852f0550ab563715c2 100644
+--- a/wr_malloc_size_of/Cargo.toml
++++ b/wr_malloc_size_of/Cargo.toml
+@@ -11,4 +11,4 @@ path = "lib.rs"
+
+ [dependencies]
+ app_units = "0.7"
+-euclid = "0.20"
++euclid = "0.22"
+diff --git a/wrench/Cargo.toml b/wrench/Cargo.toml
+index 33679485acf1f6fb885a3c7f0a5f6e813176360d..5595ced68e277f9a18a7a678edfe83bbdfb218ff 100644
+--- a/wrench/Cargo.toml
++++ b/wrench/Cargo.toml
+@@ -11,7 +11,7 @@ base64 = "0.10"
+ bincode = "1.0"
+ byteorder = "1.0"
+ env_logger = { version = "0.5", optional = true }
+-euclid = "0.20"
++euclid = "0.22"
+ gleam = "0.12"
+ glutin = "0.21"
+ app_units = "0.7"
+diff --git a/wrench/reftests/aa/aa-dist-bug.yaml b/wrench/reftests/aa/aa-dist-bug.yaml
+index 7d91d87ad6ae30e2017f066c8271b85e29736737..19b747aabce4adf42a94b97995100ecbbab2556f 100644
+--- a/wrench/reftests/aa/aa-dist-bug.yaml
++++ b/wrench/reftests/aa/aa-dist-bug.yaml
+@@ -6,7 +6,7 @@
+ root:
+ items:
+ - type: stacking-context
+- transform: rotate-z(45) rotate-x(60)
++ transform: rotate-z(-45) rotate-x(-60)
+ transform-origin: 300 300
+ items:
+ - type: box-shadow
+diff --git a/wrench/reftests/clip/clip-45-degree-rotation-ref.png b/wrench/reftests/clip/clip-45-degree-rotation-ref.png
+index cbe0e4d38ecdf6f1c165374050da84d1018bb76b..620eb49e43504e30b19f9c27a680603e2762e1c8 100644
+GIT binary patch
+literal 13358
+zcmeHM`(IPXwx1n08Wc4T6;Kffuhs|Ir_?uMgoyG`JZgPk*;YlZD75&Xh-T+lH92Zg
+zuSm3t^tQG1p{3VT!F#mXtsWmWT5q+Yf)KGP))y&0qQ-D$cGe{JFSwuk`6NGOvSzLI
+zUEf(VYi7kfVf>iR9eZ{}2z5>ytDlHa2LT~=h`c@irTM}SDF`JzPScN?T)6vQ{SWU(
+zO<%EY&i1ew{|G-AIse2d_5NuyPODD`^$1Q_Q5h9IJpI&x)ZmTmShVxu&DFP8hX)^-
+z7O4<B8hRH$TeA!`JS)j-D{{JTzPNt(Samz>0Dm^=(E5ZO&KHjzb#ok#{)muye&<*w
+zq@gg(kX1grPl?j`tdNmr>;6N=9eFR_U2YPkF`68Qj_pnQyERV3d44Dj6!VvjbB$0M
+zJsOqiD5t3Uc%xbwB25tf&hq<KWW6#W73IuW-1N{a50WP6Vr1N;tD09_M52T}18(>x
+z1mFpal!h!l?{WDg7A0)n;duJnow}6P+n(Qq4D9B7l+Vh&(I|HI&(2jE2(YRHV_CTB
+z6<iH0|MvY*pVcCjV4fW5Gw?`*)SplE;cgy<V$=WSGkAU%%G~r5L2)z082){j2S-H!
+zW06O_;${lVuOE!fykGQwVygZ2jR4QQI;9YL)#P}pXUW1N#4na{$9fL+xz9~QIb#D~
+zna~eUNPC6&nF=8^{cRt<X&ERd<n${Fof%7{P2mghK@6JIkSWo2Y}q%Vl3U?1%cp<z
+z7oXeubhPj5oj&r#0eFJSU{JyG*6cu;Lz^D1qRU^a5MCecI+_V#*b`*je3Nyr8m2o<
+zC^N9>;bXdV@k-&!9_Omz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Q_=je^QxE=ZaTmt#Q5c)sYOfmBZbMH#$a|_APWX;Xd9i7d8
+F@V{Kl3Mc>o
+
+diff --git a/wrench/reftests/clip/clip-45-degree-rotation.yaml b/wrench/reftests/clip/clip-45-degree-rotation.yaml
+index 21b43586cdf794471483e93465628d818924d93f..316f249a3e052b40e40b8b9ae60e4f625b7c88b3 100644
+--- a/wrench/reftests/clip/clip-45-degree-rotation.yaml
++++ b/wrench/reftests/clip/clip-45-degree-rotation.yaml
+@@ -6,7 +6,7 @@ root:
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ type: "stacking-context"
+- transform: rotate(45) translate(200, 0)
++ transform: rotate(-45) translate(200, 0)
+ items:
+ -
+ bounds: [0, 0, 300, 300]
+@@ -23,7 +23,7 @@ root:
+ "clip-rect": [0, 0, 0, 0]
+ clip-and-scroll: 5
+ type: "stacking-context"
+- transform: rotate(-45) translate(-300, 0)
++ transform: rotate(45) translate(-300, 0)
+ items:
+ -
+ bounds: [0, 0, 1598, 1200]
+diff --git a/wrench/reftests/clip/clip-out-rotation.yaml b/wrench/reftests/clip/clip-out-rotation.yaml
+index 41d511ddc810190ef62b98606279c9b1ef19d1f2..43d4aa36978073fa29ff3ac3cac08801c1d57c26 100644
+--- a/wrench/reftests/clip/clip-out-rotation.yaml
++++ b/wrench/reftests/clip/clip-out-rotation.yaml
+@@ -14,7 +14,7 @@ root:
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+- transform: rotate(15) translate(200, 0)
++ transform: rotate(-15) translate(200, 0)
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+diff --git a/wrench/reftests/clip/custom-clip-chains.yaml b/wrench/reftests/clip/custom-clip-chains.yaml
+index 0dfa9f41250ab51c82e89cc9b513de5cc3d2cb64..62e2fde8c513a35d12206bff3f7211aff5f03bb5 100644
+--- a/wrench/reftests/clip/custom-clip-chains.yaml
++++ b/wrench/reftests/clip/custom-clip-chains.yaml
+@@ -30,7 +30,7 @@ root:
+ -
+ bounds: [0, 0, 200, 200]
+ type: stacking-context
+- transform: rotate(90)
++ transform: rotate(-90)
+ items:
+ - type: clip
+ id: 3
+diff --git a/wrench/reftests/clip/reftest.list b/wrench/reftests/clip/reftest.list
+index 625d62a7b43468e4ae8ce2d767d4a8d5a2a19390..8518911a9f4af9a750fc32481f1bdef00cfe4e68 100644
+--- a/wrench/reftests/clip/reftest.list
++++ b/wrench/reftests/clip/reftest.list
+@@ -1,4 +1,4 @@
+-platform(linux,mac) == border-with-rounded-clip.yaml border-with-rounded-clip.png
++ platform(linux,mac) == border-with-rounded-clip.yaml border-with-rounded-clip.png
+ == clip-mode.yaml clip-mode.png
+ == clip-ellipse.yaml clip-ellipse.png
+ platform(linux,mac) == clip-45-degree-rotation.yaml clip-45-degree-rotation-ref.png
+diff --git a/wrench/reftests/filters/backdrop-filter-perspective.png b/wrench/reftests/filters/backdrop-filter-perspective.png
+index 5b0b9aa68cd8599f424118e74d3da1928bc2f14e..83e181e970b2a43a263f3f9e0523400e005483ec 100644
+GIT binary patch
+delta 57754
+zcmb??Rb13x^sUmJA}y&XNOyM&DBVcc(48Y8A>Gm-AR-JsGc+PdcMULf*U$_x#MR&Z
+z--r8lAMSbHpYxqr-+k6zYwz>jn?XOCK~H7{f>jk{b^Y@W^Re?@DuN%!G}45zf4}lo
+z#eeHDAj%SB^r0&z{0lBGqg9X0`@*#foUa8EU38@HNii^3yUDT|)fdc!v<h+`S5_*H
+z#QmcFbTa<_UAZz{;k7?qvA=(Ws<1G)%+G#DZ>aF!>cOW;8E0Ysx6CnOB43aKN&l`>
+zW*OFtnEw{#Q|4mj|3cevNN^?pi(FUyq_X=jj+B%eO+hZ{zd(OdMzX;Fy=UB$|9j7W
+zf&Z^t{(b)c*FCxUE-o+O8|qmLlNpsRipQTooU>KJQ&xZET4(Ap8vx61v!H>moag1b
+z_A}~doCSdmPV;;-c-oN6{bcYAhY*uR17V-<+%RGJLSuqZV`3svBFVr1Qzyktc8gCU
+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`qL+i$qWK^0>DR|n`m;DtTW)AS1T}JL}
+zY7cV%cCDd`R2fM;Z^3x#^uF@l3)z{;5o~JpJQ}}d`_od|<@z(1FI3n+P5{Jgfh6zu
+zKY#(j)v*fZ2vHG%K;(Q+({9Nnq%qryT942J-=NaweF-eU);(=)>?~&GGcV+Jn0D)Q
+z?jT=IO0oLu2s58JFl_+AJ{eXIexWA872bx|2L`x+6bifE=#p3Y2=sP@nNfu!-^Gr!
+zQe%-h=Ma3D)eBQ_&7@u%cMHGi`#*-UZ591-jw;stq*3uGEDD#j@3l=|U|@br=)IHu
+zLMf~ei^YX~CxOm#RB3dvlY)bIxTa4FeDyd1^bl&s@vlfsa}@_A_EucBQXHc#kVd3+
+zrFs1$n!v}%9<)<Ev(9G`vY3r_7u~CTRst~piFN)MSRp^Qz5MZyIX=Nk>$A7h6H=op
+zS$Z~oB@g2{3BbOt(#~iINnm6LbG{&Ce;>m)aVecH7KWFB12G_ys`P<e&`|OL2BIUa
+zla3ZlXjumjh|G1c+G`&z%LdI5oUcPYVn9Ft@v9f1UvK(bT0+0mm|tK7{p%k51<=1?
+zLjMmw{U?l|-xWyz1oUs1(7%e_Uj+RdCiI*0>7O!!en%4jQ_#O*LcgpW{{r-Hn9y(3
+zvR`2Y{aXS370|z70{#2llKzhvLBDAn`A49C!vy;Gt4)7POZVS9oc^CJdl#h+Ai;ai
+R@qg@pG}LreOTZgY{sV^9x)A^X
+
+diff --git a/wrench/reftests/filters/backdrop-filter-perspective.yaml b/wrench/reftests/filters/backdrop-filter-perspective.yaml
+index 07d64ebb9fbc08e557e8c725290e16735d221071..43d29ddf1d6223d02232805bc586b76506f76b41 100644
+--- a/wrench/reftests/filters/backdrop-filter-perspective.yaml
++++ b/wrench/reftests/filters/backdrop-filter-perspective.yaml
+@@ -13,7 +13,7 @@ root:
+ bounds: 0 0 256 256
+ - type: stacking-context
+ bounds: 50 50 0 0
+- transform: ["rotate-y(50)", "rotate-z(45)"]
++ transform: ["rotate-y(-50)", "rotate-z(-45)"]
+ items:
+ - type: clip
+ id: 2
+diff --git a/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml b/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml
+index 232700c555ba5a4814fbbbc8b025cd294ff5a92c..6aafa7313725f5a61385af269203251cb5f986ee 100644
+--- a/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml
++++ b/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml
+@@ -8,7 +8,7 @@ root:
+ clip-rect: 10 0 300 300
+ - type: stacking-context
+ bounds: 30 30 0 0
+- transform: rotate-z(45)
++ transform: rotate-z(-45)
+ filters: drop-shadow([15, 0], 0, red)
+ clip-node: 2
+ items:
+diff --git a/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml b/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml
+index 8f6552977f29d3ce80ad3358c730dbb82e781bd6..4b9ad3d36ebd1bc84986af42770ef90b0f6f3eed 100644
+--- a/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml
++++ b/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml
+@@ -13,7 +13,7 @@ root:
+ items:
+ - type: stacking-context
+ bounds: [50, -10, 200, 100]
+- transform: rotate-z(90)
++ transform: rotate-z(-90)
+ items:
+ -
+ bounds: [0, 0, 500, 150]
+@@ -26,7 +26,7 @@ root:
+ - type: stacking-context
+ bounds: [150, 35, 200, 100]
+ filters: drop-shadow([200, 10], 5, red)
+- transform: rotate-z(90)
++ transform: rotate-z(-90)
+ items:
+ -
+ bounds: [0, 0, 500, 150]
+diff --git a/wrench/reftests/filters/svg-filter-blur-transforms.yaml b/wrench/reftests/filters/svg-filter-blur-transforms.yaml
+index 23dbbcb9d456f2c6c46dafbfefd24bf9730acedd..4962ecbe130b1c787b26a4b1a7dd6667f7105adf 100644
+--- a/wrench/reftests/filters/svg-filter-blur-transforms.yaml
++++ b/wrench/reftests/filters/svg-filter-blur-transforms.yaml
+@@ -3,7 +3,7 @@ root:
+ items:
+ - type: stacking-context
+ bounds: [0, 100, 300, 300]
+- transform: scale-x(0.1) rotate-z(45)
++ transform: scale-x(0.1) rotate-z(-45)
+ filter-primitives:
+ - type: blur
+ radius: 10
+diff --git a/wrench/reftests/filters/svg-filter-drop-shadow-perspective.png b/wrench/reftests/filters/svg-filter-drop-shadow-perspective.png
+index 1566a152ead9be48f0312db7d0e2699985b77914..7ae7393f87a6f97635febedef322dbdfe7ee589f 100644
+GIT binary patch
+literal 13036
+zcmb`u`9IX_|3CifP&j27jvV_igLA4wkr>M`8OubR_LRMeG-VlEW(=V+QW#q7&XJO`
+zWZy}Yk!2ccWTz&BF{3OqF%6$<^m@H--#_5{L*=ID<9c3??S6ke9@q6u{M*@H`d5`-
+z|MQ>!NMjt($HBkrqCb*5z~AJBbC&=4k6{%CjXHTPhchl!zlw7o+9amX5W9YniBUu!
+z6yHa;!XERAbuIWaRZQ1e{L+-7>Gj*XPcjOByP-R)bIjUw`a0zg!;25P|9%j<{f4W|
+z^?`pR#4V|zdC}#599m>6jl>}Es(AH04?b&&!xCh3iJY3q#TwcJc71U05mjYn#E^19
+z%AFF_tyvfhm#Vc+rK(`bNW;n<|G)owdG9(xSjjk~syeu-g1FRQG|T$xsFG=jwF>Ib
+zpJgrdD9?eP|L$*{JwseO({u<QjyG;755LNs$+=2rJC=tSF6Qhrv%)tvWK|1m2yQG&
+z1LAxEjaa<uHdFl`kr@%dTrqO_NYD>CH=omMUN__FPw(R6Eb-so@SQe^20|0dE|tos
+zIw1t+aiDEcUeY3ge}8fz`qr!l{b_eFq0b1diCA^}5wBYI!#A6fQPF^4Po1s4fN`8z
+zQSrNI8}nhWK`kw6>idpT8;>;wlj^qcP5#lr-;N&+CHL-slpnwHSC~gt$&=YZ$Msu*
+zW0z>x-W*KH5m-z=pZKuxEj=J(W6(5FQmfqb5WBRrhvSxlvmD^7_+GT#EF=b0o3!|6
+z+4qw+dfg{SC%#v0hGacSg+NTy8;s|7bp-{QIZWan+*c%B2(fI_VrM0l3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N01VNmtk-d}Y_g0~j=)ogk#!c9<qAb6KY%2)E_^Z!)veNBk}#kCAQ
+zS5_VyhGL#H@vMnw>9R%$ZQ=j-)C-b<=;Njr=ID{4k@_n&-cd;?W@7`gHKD5<f4I0{
+z(+AX;hYb_l$>&0<`hk8uDSiTVwjSBFnP^qh@MhLr(8g%ei#$nt=+}K8e34KS+|353
+zBlkqNN@B^xj{EU`{EjXJIOeIa8Px)-H5K}TvzMwRgUL>|sBP10uI%yn%7)^&f7JNO
+z{l~s5wQKz_80)}Us(4~k@Lz!YXsn0H)i%owGi$|{mo-%2nTKK1Ndo?;aP|_V$ML}?
+zZL@VaX%y5@4t%8+zgn)*+!e>}3-{Y%QOv_3D)A561Q2jP>hib{JQ8#tA6tZ#$AeQ(
+z$}hp*Hy)6;Zh~`_`lZ=d)4<2~>#JK|O(#E7_v1OjA6*6mP#(y6NAMv;b}0f}2!*jM
+zD-XAcKLyFP02fg3rUM6FS%c3*;F+cM^IKY^<c7Zjw><s^pR#=C;^={>u@6Z7f8qIY
+AWdHyG
+
+diff --git a/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml b/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml
+index 10c4502c28de1b42af7352f761179ba573580932..744e2f655e55f4aa344e82e11d20f9dc6defd5a4 100644
+--- a/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml
++++ b/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml
+@@ -8,7 +8,7 @@ root:
+ items:
+ - type: "stacking-context"
+ transform-origin: 0 250
+- transform: rotate-x(15)
++ transform: rotate-x(-15)
+ filter-primitives:
+ - type: drop-shadow
+ color: red
+diff --git a/wrench/reftests/split/near-plane.yaml b/wrench/reftests/split/near-plane.yaml
+index 15a02fdca6736b86cb254b4b1b1ef182f318116e..f1911674cafdc2db4bd93837af76a87f164acf20 100644
+--- a/wrench/reftests/split/near-plane.yaml
++++ b/wrench/reftests/split/near-plane.yaml
+@@ -9,7 +9,7 @@ root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+- transform: rotate-x(60.0)
++ transform: rotate-x(-60.0)
+ items:
+ - type: rect
+ bounds: [000, 0, 600, 600]
+diff --git a/wrench/reftests/split/same-plane.png b/wrench/reftests/split/same-plane.png
+index 76fb240d36953ad0941a28d4583f8813a9c2ce3e..414dc5cd84fc940b24d3b844c1a3b796212c6f59 100644
+GIT binary patch
+delta 1925
+zcmXX`eN<Cr9EO<g&X3F8Mlo7fHU{DcAV_{NKE{;^Du|I~8Ias8C|g2@h2Yw*T&I{G
+z!0e<Ef;UPJoctJY4uT$VT~1ndlAWTsoYlarcF(w-&7-bjfxWwT`|CNs_j#Y^`Tc(P
+z-Jtra`eb~#r8l8rAz@h!1)gs%+sD*SDpC_Mw=TNC+>@WOj$3DdKRH3wdb@0ECcgP&
+zVa~a~!XF^UmX2rq34y`i9q#_kR44VI|08<Ds64Z5K5IZSE;TNz-88QGRB<1<H@T`N
+z8*^twj4u0$?rw@1t!#W-qP-G>_`g}0pEGVUC<c#G4>~sx^fKoNBQ~{ek8sP3H|y2h
+z{a;TI_6cTV4UAQtP5gXhyLX_$;byW@PgCix!}!$YT4%Oz%n++6aAb@{;!^|F&YXYJ
+zN+DMwd)BMsN)Nm<)1<3Zel;WNn0a4v{esyiyJkqJ@1$xk>AEhzLHO2QGbGlZrFP!a
+za8LhC+&%wG?`P9#WN}aHMdH6dTWnLkJ<}%gPLy>xZ~VF;iIp2K#BnI?dZYHMD)Np|
+zKX=G>V6wv3PNgT~Iu&=okT!VfXk;vbzd~Db881`G6*+bvwH-Ki@XV!~EuxM;AX5{#
+zv7ggBcAx5wMf@qHEhwZdl=~xS%Pr!9rh}4WOe7RQm8~z3#ZkByd6d%L`Yc%-51>Cq
+zc`}MDPAUOb<?Gd7%8kEC0^#_Ly~@6|Se24?sXgTbajRv<0SzBAvrmRq6?TCn*9}{D
+zsaV5yUb_9%q(u8Z!du>aeHRH6h#xNT_GJ)l%~T%92bs<+y`3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Hy%wu>q!X%yy(56_pP^gTlfVfZ$s>tT};jkyd
+zq&Y+cbY)SaN>?$Y>JhX(Rk4PCK{95HQ`qZ|VkbBS@Q=0fp_STaC%I6#l+keX_*l9X
+z##s4{Ybo$}!N>&l5DjO6&R?CmgEKr#M^tk3*dI1if$TUfl-Nh|>-Pca8L(5fY{hP0
+zMEjx-y!RcrB|E9)yF)yPT$;gy)TIqOFfONCTF-~(3@+l`5?2=UZq#6zPkVERk7R$H
+zmlQnx9y|_q8I%3L@^*FVZM?WZyhF+>&D=ij%i&gEX#aq#J(wN5Cp$l*fpZo(|9O`;
+z)HQAc&kQV9kiKRiFA?$ZxR1YkF?eh2wN5<j1h0#gD5>_z-}KJs=`Y-F0|H;33ia#Q
+dE57VEZ${y_J#;`>RU;FCFKb=y+Ougo)BkFPc*Fnz
+
+diff --git a/wrench/reftests/split/same-plane.yaml b/wrench/reftests/split/same-plane.yaml
+index d560f22351ddea1207cc0f969c1f9086c762f875..277709bad1f2346f8011e55bfee03aa55acde31e 100644
+--- a/wrench/reftests/split/same-plane.yaml
++++ b/wrench/reftests/split/same-plane.yaml
+@@ -7,7 +7,7 @@ root:
+ items:
+ - type: "stacking-context"
+ transform-style: preserve-3d
+- transform: rotate-y(30) rotate-x(75) translate(-100, 100, 0)
++ transform: rotate-y(-30) rotate-x(-75) translate(-100, 100, 0)
+ items:
+ - type: "stacking-context"
+ perspective: 400
+@@ -25,7 +25,7 @@ root:
+ color: 255 0 0 1.0000
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+- transform: rotate-z(90)
++ transform: rotate-z(-90)
+ items:
+ -
+ bounds: [0, 200, 150, 200]
+diff --git a/wrench/reftests/split/simple.yaml b/wrench/reftests/split/simple.yaml
+index 7714690e0f0ae65e57b283b8c04f6fa503a4f340..b6445780f5f9cb61b866669548a8b9f9e42943e3 100644
+--- a/wrench/reftests/split/simple.yaml
++++ b/wrench/reftests/split/simple.yaml
+@@ -10,14 +10,14 @@ root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+- transform: rotate-y(60.0)
++ transform: rotate-y(-60.0)
+ items:
+ - type: rect
+ bounds: [0, 0, 600, 600]
+ color: [255, 0, 0, 0.5]
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+- transform: rotate-y(-60.0)
++ transform: rotate-y(60.0)
+ items:
+ - type: rect
+ bounds: [0, 0, 600, 600]
+diff --git a/wrench/reftests/split/split-intersect1.yaml b/wrench/reftests/split/split-intersect1.yaml
+index 65f9da4d5a9449008d72d6a9467849887dd39d5c..dff763870728c98c6bded01d9e25a2bac4c6ff8a 100644
+--- a/wrench/reftests/split/split-intersect1.yaml
++++ b/wrench/reftests/split/split-intersect1.yaml
+@@ -10,7 +10,7 @@ root:
+ bounds: 0 0 100 100
+ color: red
+ - type: stacking-context
+- transform: rotate-y(0.1)
++ transform: rotate-y(-0.1)
+ bounds: 0 0 100 100
+ items:
+ - type: rect
+diff --git a/wrench/reftests/text/alpha-transform.yaml b/wrench/reftests/text/alpha-transform.yaml
+index b2aa366c18986c425fc4c591f6613be0c8cf2836..8a623b80671321dda5b186bf5e356a36cd20a2cd 100644
+--- a/wrench/reftests/text/alpha-transform.yaml
++++ b/wrench/reftests/text/alpha-transform.yaml
+@@ -2,7 +2,7 @@ root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 660, 210]
+- transform: scale(1.5, 2.5) rotate(10)
++ transform: scale(1.5, 2.5) rotate(-10)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 20 50
+diff --git a/wrench/reftests/text/raster-space.yaml b/wrench/reftests/text/raster-space.yaml
+index 6bae473a7fb9a6b3f21a20e1b68f05b2a78e139a..e6534784123f7ce80f2b1063c03c5a5aa9204282 100644
+--- a/wrench/reftests/text/raster-space.yaml
++++ b/wrench/reftests/text/raster-space.yaml
+@@ -1,7 +1,7 @@
+ root:
+ items:
+ - type: stacking-context
+- transform: scale(5.0) rotate(45)
++ transform: scale(5.0) rotate(-45)
+ transform-origin: 300 300
+ raster-space: local(1.0)
+ items:
+@@ -10,7 +10,7 @@ root:
+ size: 20
+ font: "FreeSans.ttf"
+ - type: stacking-context
+- transform: scale(5.0) rotate(45)
++ transform: scale(5.0) rotate(-45)
+ transform-origin: 0 400
+ items:
+ - text: "Screen"
+@@ -18,7 +18,7 @@ root:
+ size: 20
+ font: "FreeSans.ttf"
+ - type: stacking-context
+- transform: scale(5.0) rotate(45)
++ transform: scale(5.0) rotate(-45)
+ transform-origin: -80 240
+ raster-space: local(5.0)
+ items:
+diff --git a/wrench/reftests/text/shadow-transforms.yaml b/wrench/reftests/text/shadow-transforms.yaml
+index 8e5d942458c78ce8affe16fb98dba367b5afdeb7..7a75133dab4c82c22f41399f9e7ea53240c5a469 100644
+--- a/wrench/reftests/text/shadow-transforms.yaml
++++ b/wrench/reftests/text/shadow-transforms.yaml
+@@ -3,7 +3,7 @@
+ root:
+ items:
+ - type: stacking-context
+- transform: rotate(30)
++ transform: rotate(-30)
+ transform-origin: 80 80
+ items:
+ -
+@@ -38,7 +38,7 @@ root:
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+- transform: rotate-x(15)
++ transform: rotate-x(-15)
+ items:
+ -
+ type: "shadow"
+diff --git a/wrench/reftests/text/subpixel-rotate.yaml b/wrench/reftests/text/subpixel-rotate.yaml
+index 1edcdbd8d263ab0cb45b85bd75641230443945ff..296afb0d28dcf0c106613f11b560ddfbca97e83d 100644
+--- a/wrench/reftests/text/subpixel-rotate.yaml
++++ b/wrench/reftests/text/subpixel-rotate.yaml
+@@ -2,7 +2,7 @@ root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 430, 330]
+- transform: rotate(30)
++ transform: rotate(-30)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 50 200
+diff --git a/wrench/reftests/text/writing-modes-ref.yaml b/wrench/reftests/text/writing-modes-ref.yaml
+index a1d374b66d717b3b5a384dd0b2bb095699a53427..c392822e607d9cdb71488df6848eb60928eebabf 100644
+--- a/wrench/reftests/text/writing-modes-ref.yaml
++++ b/wrench/reftests/text/writing-modes-ref.yaml
+@@ -2,7 +2,7 @@ root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 60]
+- transform: rotate(90) translate(-120, 160)
++ transform: rotate(-90) translate(-120, 160)
+ items:
+ - text: "This is sideways-left"
+ origin: 0 40
+@@ -10,7 +10,7 @@ root:
+ font: "FreeSans.ttf"
+ - type: stacking-context
+ bounds: [0, 0, 300, 60]
+- transform: rotate(-90) translate(-90, 120)
++ transform: rotate(90) translate(-90, 120)
+ items:
+ - text: "This is sideways-right"
+ origin: 0 40
+diff --git a/wrench/reftests/transforms/border-zoom.png b/wrench/reftests/transforms/border-zoom.png
+index 627f69184418de1babbfd7f44a67a7a38db4ccf8..cb634ef97c4d92a3c388b716b3ee32e099e9070b 100644
+GIT binary patch
+literal 27613
+zcmeFZ^;?u}*ET%LEeHq(AS$USLkOrST?QdBAR#Ixh$7t`gBKu*ASfj=11jB$bPNhe
+zDInb`A>Cc?I=JrV`Mw{%zu?>6AFj<yw{zw^Vy%6xwXc26OEsK44b>Sc3<g7UTj7>E
+z215q_9jrP`4*#N>_+bo#F^|7}>$;{3VWy9wgrTi(Wg$V1gXNaY_2cx%#ZOKjdPJS~
+z+r3cp$H_-?EK1W16OsLQzC4^O75>k4`eV2L6Mr*(u6Q*{;^pm&M|$m6Ma$+ke^qqp
+zJaP#v*K>Zd>mIjfauD8xNf!*DM}NlOdV~J%9mWOAz+gg7$fBiT)ITX4fInmu>ABHg
+z6<(e@g#P5d6OaC2zwm!Q{C^MZ{~F2vKOCdx?oj^UAfZKn{ARUue7$gFduI6Vy8MJc
+zTYSAxXnXpbx`>@Mw!H;;(@>RdHVlTI5qW>Y%+}lv{^Is2s;2FY=1;P>FFz;|;g+=@
+zQyBfJ6pQEAO6TI!<<iP{zrFAvH~xZByxU5=HR(;>fYgS0TYA*?N;%%Dcqabw&v+iK
+zw+C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iEwSX-l1J53`O!>A7#-Xq
+zLd1>^>OT8XW?Argm5U^?yR;+O?zFGnR(H{pZt-9y#hB{{e;lRM7-?Iw(K(o`p}hT{
+z&k=;_5~`&qrSbIkU*W!!L(u+&vJ>dT0ak+xjVj<^RgYY-_@ZB>^V}=kFYZAoeUgUZ
+z=pDEfjtMG|S7r)xKaN^@e@+HFQ6t%+%|#qrp0-}tQ7@Om#izdUT_X7mP6ie~7tS&f
+z^LFs$Ugdk94oG9=612n6vIU=g!%5VZ+A`dDOv`dIn_r(aWqXj538TiBKWQtf=BG1`
+z3$OOo(>3z~qdfb!%+Sul-(PyWkoCgjc7mh-<J3e4v2|7$k+Bg4!T<l4Oz;T)@BW9O
+amcNNn4M|gB)cMtDoaQFX?N_(C{{C-F`aE|4
+
+diff --git a/wrench/reftests/transforms/border-zoom.yaml b/wrench/reftests/transforms/border-zoom.yaml
+index cbd9eb96d486c2b7307b8a1d65f44ab29889ce11..f3f472bf2114a21640a7b5ace941aa2a905312b7 100644
+--- a/wrench/reftests/transforms/border-zoom.yaml
++++ b/wrench/reftests/transforms/border-zoom.yaml
+@@ -3,7 +3,7 @@ root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+- transform: rotate(30)
++ transform: rotate(-30)
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 100 ]
+diff --git a/wrench/reftests/transforms/content-offset.yaml b/wrench/reftests/transforms/content-offset.yaml
+index d779d93053a7560b80911e52d9279f403838cebd..379b269fe6112104f1984d97755e4cdecc11f3b3 100644
+--- a/wrench/reftests/transforms/content-offset.yaml
++++ b/wrench/reftests/transforms/content-offset.yaml
+@@ -9,7 +9,7 @@ root:
+ items:
+ -
+ type: "stacking-context"
+- transform: rotate-x(45) translate(100, 100, 0)
++ transform: rotate-x(-45) translate(100, 100, 0)
+ "transform-style": "preserve-3d"
+ items:
+ -
+diff --git a/wrench/reftests/transforms/large-raster-root.yaml b/wrench/reftests/transforms/large-raster-root.yaml
+index 2383dcb6cafa7978bb07224b16006645933f3aa0..0c5176d06d98812979b6b3ed64f4c5da87182fe6 100644
+--- a/wrench/reftests/transforms/large-raster-root.yaml
++++ b/wrench/reftests/transforms/large-raster-root.yaml
+@@ -6,7 +6,7 @@ root:
+ perspective: 20
+ items:
+ - type: stacking-context
+- transform: rotate-z(45) rotate-x(45)
++ transform: rotate-z(-45) rotate-x(-45)
+ filters: drop-shadow([0, 0], 10000, blue)
+ items:
+ - type: rect
+diff --git a/wrench/reftests/transforms/local-clip.png b/wrench/reftests/transforms/local-clip.png
+index 21fcf7de8fd7c64d050469eccd0fdc1f3159d237..92e25ec5e59cbdb0e6d8b6538f320927cfc3a333 100644
+GIT binary patch
+delta 864
+zcmW-dYe*DP9L3G1x=Tg(?rKg@$;@@NBFa&#EjGj3b$qN=(rcmDrVvI!Zk8Eg3)50#
+z4&|CqscrPdie9@!A%xV>L=<T+bhjtshr(EE%P<Sk?sz|*^E>B%ISuGNY)o?qMKo_y
+zZQEeagIm3o3HfE~3zG8YH0RAwlLF#vQJDGSQK6jDadv$7G2i{j>F(>E@u45HYzZ_R
+zK9LxRZ}J6)20!G~{mm*(%`JJf$`69SvdNFnrEep5-u@oz<n>}dm_L+BvL$6RK%)a;
+z&}D$x88rT?8nx7;#l@<prpUjioNGYh$Uw`4E6^&JDIKwi-Gf0>`YzJ8h}8^yEKwa-
+z?KsDVJL;h~cb|_|rpr~!g#PWl+N%<+ZxJz$?nhTH^7<3MS{=<Y4>thxbgRk5MWH|X
+z+$;>*>D&k~3!O!(qdg$9!rEr&bz<4%QiOiDe8%isK@4w9Fk5!{)r#mw^IzjOarnSl
+zGYk+vEj~P$Q#UqR5o_kX2Z=FOH=bLXy5{t`8cy;#h5iu(oJ^-}CwM*NSBD_xo1k||
+zIrkWe-36Lw0WntAqZw;e$5KfV0Q#CPH`+vq3oU3gO>RWug?g067PR7M8`LiwV7Z;f
+zc}eL4$eFKsY=nD>u=^6!T?W`<r&Sh7=>ceavF1r8T*L>lo5k+2#h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$)9$Y{nn|Pgt1YXd<JW16#qeM^VaVlyzZm@8wL{D~5>jk;ijhJ7d
+zm|%Ieg}}Yk`t>Hrcj1&H#GHY`fu;Z7jM9qq<P!~)y5!o;h<VJ32?wv%hhfDxoZ&LT
+z#~HXbQ&J-URvfY$cQg?5>B(%w+;+;f%XoE<P4t90W1$JC>A|cJb4kG6E=eu43PY#u
+zMnnVEUOo9aVy*~s%E_w%>$Gu3R~S+&&vrkyE4^R#WVaXQ3=AuUixRDzcl%Mv%IBx!
+z4R<%`m^1=-Yl0JDXf<No(E?d8`!ujas-)0IoDl8zQ*t#X!F;#5MoaL#ns#zJ<0ru~
+zALTS~#xK=rA`}Fido@5QfQ6&RDM|?;=BqfRY$Ggyqy2f6PUNQ#vL*&;Gl7EpifMg6
+z#Rdx~J;RB+cXm>N=n2kv(3?RAF*VSXyl4+|%{IYvq%-71qqN=el}*P%+=iH<p1wcF
+m0x<Mp&o;~N7W!uvFT8avx8tu}H@=8j=Fn5@E5$JsRR05N)@X$Q
+
+diff --git a/wrench/reftests/transforms/local-clip.yaml b/wrench/reftests/transforms/local-clip.yaml
+index 50f7b39788ef85b18d0dd665df58621c8244eca4..661b40bed733c439bcb2ac61fb9ca67bc2b98d5d 100644
+--- a/wrench/reftests/transforms/local-clip.yaml
++++ b/wrench/reftests/transforms/local-clip.yaml
+@@ -11,7 +11,7 @@ root:
+ bounds: [0, 0, 0, 0]
+ "clip-and-scroll": 3
+ type: "stacking-context"
+- transform: rotate(45) translate(200, 200)
++ transform: rotate(-45) translate(200, 200)
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+diff --git a/wrench/reftests/transforms/near-plane-clip.yaml b/wrench/reftests/transforms/near-plane-clip.yaml
+index 99cc121de71380dd9b6183e98876acf8f65def21..3bbafca974b064c6f320bc8708cd2faae45a946a 100644
+--- a/wrench/reftests/transforms/near-plane-clip.yaml
++++ b/wrench/reftests/transforms/near-plane-clip.yaml
+@@ -10,7 +10,7 @@ root:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+- transform: rotate-x(-30)
++ transform: rotate-x(30)
+ items:
+ -
+ bounds: [350, 200, 260, 300]
+diff --git a/wrench/reftests/transforms/perspective-border-radius.yaml b/wrench/reftests/transforms/perspective-border-radius.yaml
+index fd9c5102877f264771149c89a3e7e547b319b79b..41b43cd48afb7e520aa43f1675121610cb45cd7e 100644
+--- a/wrench/reftests/transforms/perspective-border-radius.yaml
++++ b/wrench/reftests/transforms/perspective-border-radius.yaml
+@@ -9,7 +9,7 @@ root:
+ -
+ bounds: [128, 128, 256, 256]
+ type: "stacking-context"
+- transform: rotate-x(60) rotate-y(120)
++ transform: rotate-x(-60) rotate-y(-120)
+ items:
+ -
+ bounds: [128, 128, 256, 256]
+diff --git a/wrench/reftests/transforms/perspective-clip.png b/wrench/reftests/transforms/perspective-clip.png
+index f92856f1c5df54fb1deb7c0ee8e6903a8f45e8fd..97be10064a1ea6f97dd8c18877d15d69de0b36e1 100644
+GIT binary patch
+delta 13569
+zcmZ{Lc_5U1_x@Yyk@S$IC_;8wLzXO)H1;Jad$vTf4wZfGCn`HJ_HD}2BuSR+OKK33
+zJ^MDYjFRjO!|!vWw|d^+x4-)9%(>6G&ULPHK1cS0eVGsTJ?7r`HJ_)C8p>}QeMc>-
+zg>j)lk52_XADsAZDS8a!EJCj#nW)D$F`4dHgjt#7NMkZ{RXQ(oo{6jmb>zu1ONX)7
+zw>Jsq4Q_T@kgsi&kl)+zhSLxJHNM9EiQ;2^)0rH}joA{5#i&T%%&Mlv>5Rx{russ6
+zKGYU6r}6xK<cMS$n$(GX)(K6!N8!^O!xs3Zd)~giaGP(oMM*wbaJ~hJ=)f*H(A57u
+z9*B}W`qHCC%eI5RHqlpES=qkMoF?x6;%jJgZGQF|Tf}W^qAc)#*!kmnKw01_XZc_%
+z_i=687}c_}TkNx$RkA^RH|a;r#s|=u2x1RwSn|_*n_>~YF7?$CD-d>>8j~ogp@mgc
+zIF%Z+!PThACu?)B<y?<r-ol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J=QZyZv9E8}aN}e|`uC2KtUnm@LDOIL&HIfmO)SlfH+!(p7D2?;V6>
+zBC;P>DN1|I_e%*TSpUH{we*UaR#^7jbD|fgsfbTAUt-P=P;x^IW$<v(Ci0NwB8H-E
+z8zVHKavzZBX9MIX)G~zsJl?3<M0J?IfiYlZ{MvOH<HOKO&?UOgsoOM91zF4=f81)h
+zOEcFK>35Ifk4+U0{AGwozk91lV$=vengxX2=suT;QnL6x(W=)mQ`^E9t+T`$Znijb
+zk0dGhs{L6Yq0OrCmu9+*#Of<%0C8_IGZKH?LMG$8Q_Wu;&yD&_z`a*fjN$rHPYN{J
+ze3Ktby)-<H4;Rxz-*`sD#Glh6p_Nz^tp8Xz>U3ZRm22H{81vhNEJ_9A)~gS%iqG16
+zxKX%_n_{JPec;7&ueJ|Rd*e4(MY_X>rE7QBihCABSt5lun?<Ob1d#{D&<=ugcflhp
+z7KHxq|FDsQIb<BB1Qzv8-69%{*JK6<;lCmA|1De@wbg3%H1u(xzJj^UHHeCO$^D3!
+z&{wVH(3l~+)jxrEq1d0Srr7y%_=DkD8eJYx&qnueO7QzGH%A}}y?CpaokNTsf1qXF
+z+!H=5U<<O{UYReSsX54G&~svdSrhu192$z+pq;4=_nzmMBq%=Qa?HS%a7FSYY-$DB
+zjvvH~ZO#n0|Be%j_=9>FZ-#6*3f6ABL(ZGiCoMDf#pA2H!1LOH_y<QoMT?n#WXqtI
+z7Q%`&Tm(x2rMhT&ri~@87h5mI6CQX3`OCO^#9ZBys>*kFH{cRrJYl8%oz(_hKfeAM
+zy$GQxqq#aY;i~Zq*Do&RU$iCA%llrkY}b0pCkyp0Uw!@?_|a6;Q+;vKI_Uoa8e3&|
+
+diff --git a/wrench/reftests/transforms/perspective-clip.yaml b/wrench/reftests/transforms/perspective-clip.yaml
+index 7c314dd22b6ae5b8a0bb27226463139992ab8dd4..ae905b8a441a4ee03ba927a606aa05468be44b45 100644
+--- a/wrench/reftests/transforms/perspective-clip.yaml
++++ b/wrench/reftests/transforms/perspective-clip.yaml
+@@ -17,7 +17,7 @@ root:
+ items:
+ -
+ type: "stacking-context"
+- transform: rotate-x(10)
++ transform: rotate-x(-10)
+ transform-origin: 300 300
+ filters: identity
+ items:
+diff --git a/wrench/reftests/transforms/perspective-mask.png b/wrench/reftests/transforms/perspective-mask.png
+index 80c2dae951a8e884e5942fc5f22fa9209cdc35c2..41ef1283dbb146a533e378f536eec02ef97d9b52 100644
+GIT binary patch
+literal 2285
+zcmeHJ`!`$Z8V(Mpov3RCRhN;fF`^;HZCXMbGM%<!+M*eP(r^r-$fPc#sHrBDa9VPv
+z6eF#6N)4e6n;hC^=%Q|`>K40h)5=UGjuQ<<^n5%2!~AyE+AC{+-+I62d!Ofh-gk!+
+z6iD9l$-YleDAb<gUy)9uP#QGw-n&Z&{H8>l$w#4fwH+t<olUQj!4r>7f-$-CQ@nrf
+z^COWAz@w#e!A9ro*}Yn^x@OMjdvbTDiGS26|7_Q$Z-L|c@ofy;0QFkI4{hhGL_^hC
+zIkSU5wOY+t$Bjh<zvt$d`1w%0O;%+>L*ll<>LT~eQ@{4b61G#AZ2<QWI_QQp*6pU$
+zJ<#*hg(AEy#_4l(P!ZS~ld`%Lf#R1Gp2mGYX6wEtse1*UJ1IIG-G5Vnf)7B{J#kD6
+zvXyyDLa4Yrv_e~o86EttoiAAx8yl{4N9xpCkUSa!ncW|K7Vg#bUp>zpr^>jAX-gH_
+zW`T8;!5(~x=W;Wf;=?)DT950wXb3k#mT*Z}a`EJ2r|9KL0qU3?M157rh#7BWi?Xm4
+zxZP3z0Eo9nW$B7R_ENQ@*2Vi^UB+g_ObOWDS+@0oPUwrx$QC%XAZ8Ey6rJl3;Ch}I
+zz>NU}$nxE|f8y(KojG3)Bjgmb`$K)UXY`#q$+>2mg#kSF?JyqQOazJjN)qzDLX<sP
+zbkt6XH1<`(XwnSxj94i%T<qg%Z#aSwe1Om;CLjx%zk=4>a2*|d5DIAbI~wA<_xF4>
+zh8r`zq2jwIB=%GF6#Z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ff --git a/wrench/reftests/transforms/perspective-mask.yaml b/wrench/reftests/transforms/perspective-mask.yaml
+index 7df62461d27e6316e5d2bc513febfa079f32d9d4..eadc48e0bab09eda5a1fbbf8128ee0e00808344f 100644
+--- a/wrench/reftests/transforms/perspective-mask.yaml
++++ b/wrench/reftests/transforms/perspective-mask.yaml
+@@ -14,7 +14,7 @@ root:
+ -
+ type: "stacking-context"
+ bounds: [0, 0, 250, 100]
+- transform: rotate-y(-54)
++ transform: rotate-y(54)
+ items:
+ -
+ bounds: [0, 0, 128, 128]
+diff --git a/wrench/reftests/transforms/perspective-origin.yaml b/wrench/reftests/transforms/perspective-origin.yaml
+index d6ae149d44b7c7ec80346b063e1bc7c045710ecc..ca5eb5f95cf6db9625f220c8b24baea0007d7dc3 100644
+--- a/wrench/reftests/transforms/perspective-origin.yaml
++++ b/wrench/reftests/transforms/perspective-origin.yaml
+@@ -9,7 +9,7 @@ root:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+- transform: rotate-x(45)
++ transform: rotate-x(-45)
+ items:
+ -
+ bounds: [350, 400, 260, 260]
+diff --git a/wrench/reftests/transforms/prim-suite.yaml b/wrench/reftests/transforms/prim-suite.yaml
+index 2a170f8fc90dcdaf604e706078502818cc3fee13..241a2e1c0a5b13c4316abf9f1549643715710ca5 100644
+--- a/wrench/reftests/transforms/prim-suite.yaml
++++ b/wrench/reftests/transforms/prim-suite.yaml
+@@ -3,7 +3,7 @@ root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+- transform: rotate(30)
++ transform: rotate(-30)
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+diff --git a/wrench/reftests/transforms/rotated-clip-large.png b/wrench/reftests/transforms/rotated-clip-large.png
+index 88d2eda08523205e54163e5b89ea5e3f941c3b4d..c4e484037098077d8a101925d0724fa40f87e7f2 100644
+GIT binary patch
+literal 7420
+zcmeHs`9G9z)c-xBv5l>ap%O!?DWpYIiYYr4sjQV2kr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NYud%5t;Mkk>SJ=$cC+V2IHC)v5OsbnuC=_!Js~ndjpZ=*
+zK`+zrt~|0AFrbriEElV9>^b1kCEu?fHyz<PZm#tiX@Zskl{HS8Oq3OrdeXtWpj_hN
+zDnNX}Im=@}ZR|2nHCoLsqsUoraJT^TXzy@mOw3-mXw$<(AER9$>q0*y#n<SlFUJQb
+zxkqFPJD#^x-9Z=6dL%pGccbLnJp%0?$bkBHZ)?t^*=R=_zDevqcJp!Y6R5`t+;WiD
+z(OrjEE9|9}-R?x*hpDyN!f7VVp^oC9Y;Zs*)ns?H2}J}88{O+Uw(fxUB+nLM_2Z~4
+zOvxF8685Y_2`f9dH2t#PW4m_7L6j-e%>mb>>4A&w>QnmA@x*SXNa4&fqB^qgCPszL
+zi_n8O@|o6y;gdsM<V-8OILo|}R*k1tCTb&irm>V;9UF=*lq1^lCHUhc_F(AvsF9Mv
+zeiwavDutRM4ULL>hrauVqiSCeW_TEe32#CV9x872xn^DwHp5=X6xK>0D9$n;d33F;
+zm@%i<H_5CLEts;D(!1taw@Th9wog_W32xL^pE$d=o!AUm7i_*k2=;}^Q&-;H4)MCx
+z(pmV^M)3ASZ$(OB<l6cc@NWc(x%n0T<dTI{iO^bL6G8+h{r~0vWlUCu^S(XtQt*wM
+QfrAkP-4i-_M;)&G2R|Rc#{d8T
+
+diff --git a/wrench/reftests/transforms/rotated-clip-large.yaml b/wrench/reftests/transforms/rotated-clip-large.yaml
+index 18aa7e3dd440f13910370e44f054b36974aac657..ec57e6c69731283b8acf9656c20096fe3e300371 100644
+--- a/wrench/reftests/transforms/rotated-clip-large.yaml
++++ b/wrench/reftests/transforms/rotated-clip-large.yaml
+@@ -14,4 +14,4 @@ root:
+ bounds: 20 20 200 200
+ color: blue
+ type: stacking-context
+- transform: rotate(33)
++ transform: rotate(-33)
+diff --git a/wrench/reftests/transforms/rotated-clip.yaml b/wrench/reftests/transforms/rotated-clip.yaml
+index 9b17a43dbff18459b3193d5cc52b6d1d004d6a83..a4305e644995ee8cbf1be8bec647fc7f267b9b24 100644
+--- a/wrench/reftests/transforms/rotated-clip.yaml
++++ b/wrench/reftests/transforms/rotated-clip.yaml
+@@ -14,4 +14,4 @@ root:
+ bounds: 20 20 100 100
+ color: blue
+ type: stacking-context
+- transform: rotate(30)
++ transform: rotate(-30)
+diff --git a/wrench/reftests/transforms/rotated-image.png b/wrench/reftests/transforms/rotated-image.png
+index f74fdbdc6e6a82c066132924164959c46c8cba27..2bb0d45e48de86ae676ffbc0d13ceda9fe8818be 100644
+GIT binary patch
+literal 7441
+zcmdUU_gfQN7w#k>#2^F_1(XsFU62EUN-rKkEC^T*f*=HtqO?Gyw;(DV!~${*1hF0o
+zy#%EVSWrO%9;&nikf5~C!2r1v!uLG){t5S&N%qXzYp?fRWv`i?Xk%p|B(Prq005y=
+zC(X_S01WyI19tF3KaPQ~JODtd_mtVOi=m|HL3HgUw@nm_me~40Y`WlAW|B>ed$z>D
+zftF_v6di(h+iUIl%U<BNO|YtfyZRZ$GudV*@7=xl+Tr_3SNHsS1DPPTF`he|z3=da
+zg>~cEo=LVoEv$NDrZA$O8Iij{V)E6@&Nybsfq&L0xb<9l`pKvHT!mL)%O@Ysca`<Z
+zY_^ZKR)0$CZ0fX6Be~e_P{PSSV04mioo(%El^N*k@jfxG-$z85)avVTb&?$-zu-N3
+zl$z2SJigK#Tt%mSBwrZo*&zzbL;%)COEOhHu%rILjLgz7ZECD}#m3K<g{zGCuXg1g
+z^0pMaxJqvw*Nxv;ivP}|zJa}OD-$-ZnNMd0=&+x!yGfWQi*e$6gL+(d+#H<Z3@WCm
+zJ0#ihE!z)ht%eO~^<rlUlCz#C7VFGKDye=yjwTg4Jl&XWppv`YDEN{8%hboM>hk3q
+z4sr{Vqru}x)mQ7ZMuNv_&lIRpx6yfydc82;hy&5Te<~Xg>zm&OO_p5mQf+;#BkUZt
+zw6}h3T(ULCK>SSR!O~*qSRu)y^k!^K1;P--Zn97h{=Bk(uj)lGH)19cn&`^eSh2XT
+zbk?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(^G3uHwXzQBBQ}^a<zDS?vTmYKo{b(tlA0Vi*Pu9^)Rx<OX7nBPzevUd+J4
+zwSBF9rw2=p3~NqlSI2d2^jl08e;Y+*fd57*?Cxq-$9>DF_KsxqM4V6DuUd6Xtku~f
+zQ%$q_k%HDx$+r$~KOc|nVer3{j005K7awUVvGqh`Kl8=>M_4G0XQ^IdZgfb`U}jws
+z`2S#&&1bc>G?Oo~pfzthOQpNXRo8lYRB1I<*L-7Z$nFiUTRL<Mq8QaIrX=iJZk~zJ
+ztoGkGo*0FS3<bAWzYB^cRf@$;PSXF&Kk)?H6m;u#%*g101o)80$Zn4^W1Si?t1YsG
+zitzK#7=hDQTb*|cnRgNmpe_-$XILr2+}~fE_#8+!os3E5sUCXp<Sj*8t8BfkbbHAp
+zT4Y0*oiov3{C{bHp_G0LrhE&Sp?A~3oD{hV)}uREgu2#XV*Q^KT8M-g{PLQ*yyZRw
+R{^bc+nO`#d_!siQ{{Rvp=p6t6
+
+diff --git a/wrench/reftests/transforms/rotated-image.yaml b/wrench/reftests/transforms/rotated-image.yaml
+index 23630c5f36320172a78eef141ae3e62da5306f67..5ab5d3b75705a46a3ee323541b5d846673ec8ffc 100644
+--- a/wrench/reftests/transforms/rotated-image.yaml
++++ b/wrench/reftests/transforms/rotated-image.yaml
+@@ -44,7 +44,7 @@ root:
+ "backface-visible": true
+ type: "stacking-context"
+ "scroll-policy": scrollable
+- transform: rotate-z(1)
++ transform: rotate-z(-1)
+ "transform-style": flat
+ items:
+ -
+diff --git a/wrench/reftests/transforms/screen-space-blit-trivial.yaml b/wrench/reftests/transforms/screen-space-blit-trivial.yaml
+index 47202568585519ca36eba12e6f63b9312b36b59b..76b2578faa564a5547288cc52769482e77b43d53 100644
+--- a/wrench/reftests/transforms/screen-space-blit-trivial.yaml
++++ b/wrench/reftests/transforms/screen-space-blit-trivial.yaml
+@@ -10,13 +10,13 @@ root:
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+- transform: rotate-x(15)
++ transform: rotate-x(-15)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [100, 100, 260, 260]
+ - type: "stacking-context"
+ transform-origin: 635 235
+- transform: rotate-z(45)
++ transform: rotate-z(-45)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [500, 100, 260, 260]
+diff --git a/wrench/reftests/transforms/screen-space-blit.png b/wrench/reftests/transforms/screen-space-blit.png
+index b3cc0b05ab7fb7866bc97c1f73bb51f5d7940c7a..6479438fe1592a09b4429d755e64ceeee5c5b8e7 100644
+GIT binary patch
+literal 73453
+zcmeFZi8og77e34r^&k<Fq0Dopq(m|gndcG-$&{3kDD#|oc+7LA6j7v<$Sg8Tl9DMT
+znKSe5a~}GBe(U}H1MgbzTCK`C$2sS|?|tum?Q38AJk-`yCMRVeB_JRmSGk~|OF*zs
+znt*_C7P}vg++Q+RBp_reQ&EuBcTN4BcHp(8V%%f0{gjl-kD3V_zv{dQxgJEwKo=Mm
+zav@RK=BDEzDuv#Ck2pSvoBBrb$RDaBAeVHEl3iGxRCAzw7;(Y#qw!A7_&v#V?Uxtt
+zu1r-;?^Kc9jnKU}Wb*Q9U-b!%6=^wAUluI-C$W)ajb!%+GkwYhY9d)m<WJ3GmN9Pp
+zC0Jh_*=8;DD4fXljmp^lU91u@t2F*{S;{a{InTYD(jD>N+`W&iFdz2+e*k_m{y#EB
+zHDxUwo?JVWRU0O2%9KQVOWea2+!5);PcnQ!8cRruVcj(kGb8ziiRv9=DXiDVD^?j<
+zmc6A{S1Swd2)8R1FwH6Z8!i?|K<u+;UcyD4Tv98~N_^dux<gjJ9mUWP$?aNLO_|Km
+zc^x@#-#zm)`;{NL%EKyCW5d1o#2Z|C?l{U!Gg0bYa}|E6%Oj<V)fP6|Gv-8wlOd5*
+z7@9DpJ*&(+lRA>^Pe7a<zGuG$4^{C;9{xKL(1Je_@b8F^3I}>;hCM5$b2h4<5LjDD
+z%GkWVzBTJ5v?G6BYHLa>e`b5NNtAJf8bhO=y*CF3MFd7-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y*VnoJuR0P`5N~`Ah$E!O|6jj?xyIto_>;hv
+S`+>9xe$0%l44>$`hWrnV>B(~d
+
+diff --git a/wrench/reftests/transforms/screen-space-blit.yaml b/wrench/reftests/transforms/screen-space-blit.yaml
+index 5b5a914f376251512b821abf5912b2d4c829b7f7..0bae3a37361bc9adb52ac2f379874f13a1eb1fa7 100644
+--- a/wrench/reftests/transforms/screen-space-blit.yaml
++++ b/wrench/reftests/transforms/screen-space-blit.yaml
+@@ -9,14 +9,14 @@ root:
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+- transform: rotate-x(15)
++ transform: rotate-x(-15)
+ filters: identity
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [100, 100, 260, 260]
+ - type: "stacking-context"
+ transform-origin: 635 235
+- transform: rotate-z(45)
++ transform: rotate-z(-45)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [500, 100, 260, 260]
+diff --git a/wrench/reftests/transforms/screen-space-blur.yaml b/wrench/reftests/transforms/screen-space-blur.yaml
+index 14c791eb8dd47c497ebbe2dc5db7a9f55d8c50f2..e9c5f5d32dc4e8d1f8196173c1c19a011d4ec264 100644
+--- a/wrench/reftests/transforms/screen-space-blur.yaml
++++ b/wrench/reftests/transforms/screen-space-blur.yaml
+@@ -6,14 +6,14 @@ root:
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+- transform: rotate-x(15)
++ transform: rotate-x(-15)
+ filters: blur(3)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [100, 100, 260, 260]
+ - type: "stacking-context"
+ transform-origin: 635 235
+- transform: rotate-z(45)
++ transform: rotate-z(-45)
+ filters: blur(3)
+ items:
+ - image: checkerboard(2, 16, 16)
+diff --git a/wrench/src/yaml_helper.rs b/wrench/src/yaml_helper.rs
+index 1915b9f531184246a200e6ab1cc6870f6547af37..d82f863e9cce87be6273e353e92685743cd18ab6 100644
+--- a/wrench/src/yaml_helper.rs
++++ b/wrench/src/yaml_helper.rs
+@@ -172,24 +172,24 @@ fn make_rotation(
+ axis_y: f32,
+ axis_z: f32,
+ ) -> LayoutTransform {
+- let pre_transform = LayoutTransform::create_translation(origin.x, origin.y, 0.0);
+- let post_transform = LayoutTransform::create_translation(-origin.x, -origin.y, -0.0);
++ let pre_transform = LayoutTransform::translation(-origin.x, -origin.y, -0.0);
++ let post_transform = LayoutTransform::translation(origin.x, origin.y, 0.0);
+
+ let theta = 2.0f32 * f32::consts::PI - degrees.to_radians();
+ let transform =
+ LayoutTransform::identity().pre_rotate(axis_x, axis_y, axis_z, Angle::radians(theta));
+
+- pre_transform.pre_transform(&transform).pre_transform(&post_transform)
++ pre_transform.then(&transform).then(&post_transform)
+ }
+
+ pub fn make_perspective(
+ origin: LayoutPoint,
+ perspective: f32,
+ ) -> LayoutTransform {
+- let pre_transform = LayoutTransform::create_translation(origin.x, origin.y, 0.0);
+- let post_transform = LayoutTransform::create_translation(-origin.x, -origin.y, -0.0);
+- let transform = LayoutTransform::create_perspective(perspective);
+- pre_transform.pre_transform(&transform).pre_transform(&post_transform)
++ let pre_transform = LayoutTransform::translation(-origin.x, -origin.y, -0.0);
++ let post_transform = LayoutTransform::translation(origin.x, origin.y, 0.0);
++ let transform = LayoutTransform::perspective(perspective);
++ pre_transform.then(&transform).then(&post_transform)
+ }
+
+ // Create a skew matrix, specified in degrees.
+@@ -199,7 +199,7 @@ fn make_skew(
+ ) -> LayoutTransform {
+ let alpha = Angle::radians(skew_x.to_radians());
+ let beta = Angle::radians(skew_y.to_radians());
+- LayoutTransform::create_skew(alpha, beta)
++ LayoutTransform::skew(alpha, beta)
+ }
+
+ impl YamlHelper for Yaml {
+@@ -327,23 +327,11 @@ impl YamlHelper for Yaml {
+ fn as_matrix4d(&self) -> Option<LayoutTransform> {
+ if let Some(nums) = self.as_vec_f32() {
+ assert_eq!(nums.len(), 16, "expected 16 floats, got '{:?}'", self);
+- Some(LayoutTransform::row_major(
+- nums[0],
+- nums[1],
+- nums[2],
+- nums[3],
+- nums[4],
+- nums[5],
+- nums[6],
+- nums[7],
+- nums[8],
+- nums[9],
+- nums[10],
+- nums[11],
+- nums[12],
+- nums[13],
+- nums[14],
+- nums[15],
++ Some(LayoutTransform::new(
++ nums[0], nums[1], nums[2], nums[3],
++ nums[4], nums[5], nums[6], nums[7],
++ nums[8], nums[9], nums[10], nums[11],
++ nums[12], nums[13], nums[14], nums[15],
+ ))
+ } else {
+ None
+@@ -365,7 +353,7 @@ impl YamlHelper for Yaml {
+ let mx = match function {
+ "translate" if args.len() >= 2 => {
+ let z = args.get(2).and_then(|a| a.parse().ok()).unwrap_or(0.);
+- LayoutTransform::create_translation(
++ LayoutTransform::translation(
+ args[0].parse().unwrap(),
+ args[1].parse().unwrap(),
+ z,
+@@ -386,16 +374,16 @@ impl YamlHelper for Yaml {
+ let y = args.get(1).and_then(|a| a.parse().ok()).unwrap_or(x);
+ // Default to no Z scale if unspecified.
+ let z = args.get(2).and_then(|a| a.parse().ok()).unwrap_or(1.0);
+- LayoutTransform::create_scale(x, y, z)
++ LayoutTransform::scale(x, y, z)
+ }
+ "scale-x" if args.len() == 1 => {
+- LayoutTransform::create_scale(args[0].parse().unwrap(), 1.0, 1.0)
++ LayoutTransform::scale(args[0].parse().unwrap(), 1.0, 1.0)
+ }
+ "scale-y" if args.len() == 1 => {
+- LayoutTransform::create_scale(1.0, args[0].parse().unwrap(), 1.0)
++ LayoutTransform::scale(1.0, args[0].parse().unwrap(), 1.0)
+ }
+ "scale-z" if args.len() == 1 => {
+- LayoutTransform::create_scale(1.0, 1.0, args[0].parse().unwrap())
++ LayoutTransform::scale(1.0, 1.0, args[0].parse().unwrap())
+ }
+ "skew" if args.len() >= 1 => {
+ // Default to no Y skew if unspecified.
+@@ -409,14 +397,14 @@ impl YamlHelper for Yaml {
+ make_skew(0.0, args[0].parse().unwrap())
+ }
+ "perspective" if args.len() == 1 => {
+- LayoutTransform::create_perspective(args[0].parse().unwrap())
++ LayoutTransform::perspective(args[0].parse().unwrap())
+ }
+ _ => {
+ println!("unknown function {}", function);
+ break;
+ }
+ };
+- transform = transform.post_transform(&mx);
++ transform = transform.then(&mx);
+ }
+ Some(transform)
+ }
+@@ -424,7 +412,7 @@ impl YamlHelper for Yaml {
+ let transform = array.iter().fold(
+ LayoutTransform::identity(),
+ |u, yaml| match yaml.as_transform(transform_origin) {
+- Some(ref transform) => u.pre_transform(transform),
++ Some(ref transform) => transform.then(&u),
+ None => u,
+ },
+ );
+--
+2.39.2
+
diff --git a/third_party/webrender/patches/0006-Bump-procedural-masquerade-to-0.1.7.patch b/third_party/webrender/patches/0006-Bump-procedural-masquerade-to-0.1.7.patch
new file mode 100644
index 00000000000..f8e985bbc03
--- /dev/null
+++ b/third_party/webrender/patches/0006-Bump-procedural-masquerade-to-0.1.7.patch
@@ -0,0 +1,53 @@
+From 415b9ba32648667313f6f4ce7965752285bf0b26 Mon Sep 17 00:00:00 2001
+From: Martin Robinson <mrobinson@igalia.com>
+Date: Thu, 12 Jan 2023 12:35:31 +0100
+Subject: [PATCH 2/2] Bump procedural-masquerade to 0.1.7
+
+This fixes a build issue in this branch.
+---
+ Cargo.lock | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index b6085604cae8e18de3273bcddac43fa0a7e1abd1..b7055733e57fcd0acff07881ef72369b560c2abe 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -417,7 +417,7 @@ version = "0.1.7"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+ "cstr-macros 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+- "procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
++ "procedural-masquerade 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+ [[package]]
+@@ -425,7 +425,7 @@ name = "cstr-macros"
+ version = "0.1.6"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+- "procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
++ "procedural-masquerade 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+@@ -1212,7 +1212,7 @@ dependencies = [
+
+ [[package]]
+ name = "procedural-masquerade"
+-version = "0.1.6"
++version = "0.1.7"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+
+ [[package]]
+@@ -2182,7 +2182,7 @@ dependencies = [
+ "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b"
+ "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
+ "checksum proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3"
+-"checksum procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9a1574a51c3fd37b26d2c0032b649d08a7d51d4cca9c41bbc5bf7118fa4509d0"
++"checksum procedural-masquerade 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1383dff4092fe903ac180e391a8d4121cc48f08ccf850614b0290c6673b69d"
+ "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
+ "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
+ "checksum quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f"
+--
+2.39.2
+
diff --git a/third_party/webrender/patches/head b/third_party/webrender/patches/head
new file mode 100644
index 00000000000..1e8d57b32a9
--- /dev/null
+++ b/third_party/webrender/patches/head
@@ -0,0 +1 @@
+1175acad2d4f49fa712e105c84149ac7f394261d
diff --git a/third_party/webrender/patches/series b/third_party/webrender/patches/series
new file mode 100644
index 00000000000..5670e534e71
--- /dev/null
+++ b/third_party/webrender/patches/series
@@ -0,0 +1,6 @@
+0001-Add-signal-handler-to-catch-segfault-in-build-script.patch
+0002-Bug-1646741-Update-gleam-to-0.12.-r-kvark.patch
+0003-Bug-1651889.-Update-to-gleam-0.12.1.-r-kvark.patch
+0004-Bug-1654699.-Update-core-foundation-core-graphics.-r.patch
+0005-Bug-1656236-Update-to-euclid-0.22.-r-kvark.patch
+0006-Bump-procedural-masquerade-to-0.1.7.patch
diff --git a/third_party/webrender/peek-poke/Cargo.toml b/third_party/webrender/peek-poke/Cargo.toml
new file mode 100644
index 00000000000..45179aeda60
--- /dev/null
+++ b/third_party/webrender/peek-poke/Cargo.toml
@@ -0,0 +1,17 @@
+[package]
+name = "peek-poke"
+version = "0.2.0"
+authors = ["Dan Glastonbury <dan.glastonbury@gmail.com>"]
+repository = "https://github.com/servo/webrender"
+description = "A mechanism for serializing and deserializing data into/from byte buffers, for use in WebRender."
+license = "MIT/Apache-2.0"
+edition = "2018"
+
+[dependencies]
+euclid = { version = "0.22.0", optional = true }
+peek-poke-derive = { version = "0.2", path = "./peek-poke-derive", optional = true }
+
+[features]
+default = ["derive"]
+derive = ["peek-poke-derive"]
+extras = ["derive", "euclid"]
diff --git a/third_party/webrender/peek-poke/LICENSE-APACHE b/third_party/webrender/peek-poke/LICENSE-APACHE
new file mode 100644
index 00000000000..16fe87b06e8
--- /dev/null
+++ b/third_party/webrender/peek-poke/LICENSE-APACHE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/third_party/webrender/peek-poke/LICENSE-MIT b/third_party/webrender/peek-poke/LICENSE-MIT
new file mode 100644
index 00000000000..110bb347123
--- /dev/null
+++ b/third_party/webrender/peek-poke/LICENSE-MIT
@@ -0,0 +1,44 @@
+MIT License
+
+Copyright (c) 2019 Daniel Glastonbury
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+This work incorporates work covered by the following copyright and permission
+notice:
+
+Copyright (c) 2019 Devashish Dixit
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/third_party/webrender/peek-poke/README.md b/third_party/webrender/peek-poke/README.md
new file mode 100644
index 00000000000..1c379aa1211
--- /dev/null
+++ b/third_party/webrender/peek-poke/README.md
@@ -0,0 +1,54 @@
+# Peeks, Pokes, and Pointers
+
+Peek from and poke structures into byte slices.
+
+## Benchmark
+
+Below are the benchmark results of comparison between `peek-poke` and `bincode` serializing and deserializing same `struct`:
+```
+struct MyPeekPokeStruct {
+ a: u8,
+ b: u16,
+ c: MyPeekPokeEnum,
+ d: Option<usize>,
+}
+
+enum MyPeekPokeEnum {
+ Variant1,
+ Variant2(u16),
+}
+```
+
+```
+Benchmarking struct::serialize/peek_poke::poke_into: Collecting 100 samples in struct::serialize/peek_poke::poke_into
+ time: [2.7267 ns 2.7321 ns 2.7380 ns]
+
+Benchmarking struct::serialize/bincode::serialize: Collecting 100 samples in est struct::serialize/bincode::serialize
+ time: [31.264 ns 31.326 ns 31.389 ns]
+
+Benchmarking struct::deserialize/peek_poke::peek_from: Collecting 100 samples struct::deserialize/peek_poke::peek_from
+ time: [5.3544 ns 5.3672 ns 5.3817 ns]
+
+Benchmarking struct::deserialize/bincode::deserialize: Collecting 100 samples in struct::deserialize/bincode::deserialize
+ time: [25.155 ns 26.439 ns 27.661 ns]
+```
+
+You can run benchmarks by running following command:
+```
+cargo bench
+```
+
+## License
+[license]: #license
+
+Licensed under either of
+- Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
+- MIT license (http://opensource.org/licenses/MIT)
+
+at your option.
+
+see [LICENSE-APACHE](LICENSE-APACHE), [LICENSE-MIT](LICENSE-MIT) for details.
+
+## Contribution
+Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as
+defined in the Apache-2.0 license, shall be dual licensed as about, without any additional terms or conditions.
diff --git a/third_party/webrender/peek-poke/peek-poke-derive/Cargo.toml b/third_party/webrender/peek-poke/peek-poke-derive/Cargo.toml
new file mode 100644
index 00000000000..e537c7304ab
--- /dev/null
+++ b/third_party/webrender/peek-poke/peek-poke-derive/Cargo.toml
@@ -0,0 +1,19 @@
+[package]
+name = "peek-poke-derive"
+version = "0.2.1"
+authors = ["Dan Glastonbury <dan.glastonbury@gmail.com>"]
+repository = "https://github.com/servo/webrender"
+description = "Derive macro for peek-poke."
+license = "MIT/Apache-2.0"
+edition = "2018"
+
+[lib]
+doctest = false
+proc-macro = true
+
+[dependencies]
+proc-macro2 = "1"
+quote = "1"
+syn = "1"
+synstructure = "0.12"
+unicode-xid = "0.2"
diff --git a/third_party/webrender/peek-poke/peek-poke-derive/LICENSE-APACHE b/third_party/webrender/peek-poke/peek-poke-derive/LICENSE-APACHE
new file mode 100644
index 00000000000..16fe87b06e8
--- /dev/null
+++ b/third_party/webrender/peek-poke/peek-poke-derive/LICENSE-APACHE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/third_party/webrender/peek-poke/peek-poke-derive/LICENSE-MIT b/third_party/webrender/peek-poke/peek-poke-derive/LICENSE-MIT
new file mode 100644
index 00000000000..110bb347123
--- /dev/null
+++ b/third_party/webrender/peek-poke/peek-poke-derive/LICENSE-MIT
@@ -0,0 +1,44 @@
+MIT License
+
+Copyright (c) 2019 Daniel Glastonbury
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+This work incorporates work covered by the following copyright and permission
+notice:
+
+Copyright (c) 2019 Devashish Dixit
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/third_party/webrender/peek-poke/peek-poke-derive/README.md b/third_party/webrender/peek-poke/peek-poke-derive/README.md
new file mode 100644
index 00000000000..1c379aa1211
--- /dev/null
+++ b/third_party/webrender/peek-poke/peek-poke-derive/README.md
@@ -0,0 +1,54 @@
+# Peeks, Pokes, and Pointers
+
+Peek from and poke structures into byte slices.
+
+## Benchmark
+
+Below are the benchmark results of comparison between `peek-poke` and `bincode` serializing and deserializing same `struct`:
+```
+struct MyPeekPokeStruct {
+ a: u8,
+ b: u16,
+ c: MyPeekPokeEnum,
+ d: Option<usize>,
+}
+
+enum MyPeekPokeEnum {
+ Variant1,
+ Variant2(u16),
+}
+```
+
+```
+Benchmarking struct::serialize/peek_poke::poke_into: Collecting 100 samples in struct::serialize/peek_poke::poke_into
+ time: [2.7267 ns 2.7321 ns 2.7380 ns]
+
+Benchmarking struct::serialize/bincode::serialize: Collecting 100 samples in est struct::serialize/bincode::serialize
+ time: [31.264 ns 31.326 ns 31.389 ns]
+
+Benchmarking struct::deserialize/peek_poke::peek_from: Collecting 100 samples struct::deserialize/peek_poke::peek_from
+ time: [5.3544 ns 5.3672 ns 5.3817 ns]
+
+Benchmarking struct::deserialize/bincode::deserialize: Collecting 100 samples in struct::deserialize/bincode::deserialize
+ time: [25.155 ns 26.439 ns 27.661 ns]
+```
+
+You can run benchmarks by running following command:
+```
+cargo bench
+```
+
+## License
+[license]: #license
+
+Licensed under either of
+- Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
+- MIT license (http://opensource.org/licenses/MIT)
+
+at your option.
+
+see [LICENSE-APACHE](LICENSE-APACHE), [LICENSE-MIT](LICENSE-MIT) for details.
+
+## Contribution
+Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as
+defined in the Apache-2.0 license, shall be dual licensed as about, without any additional terms or conditions.
diff --git a/third_party/webrender/peek-poke/peek-poke-derive/src/lib.rs b/third_party/webrender/peek-poke/peek-poke-derive/src/lib.rs
new file mode 100644
index 00000000000..7000f28bf15
--- /dev/null
+++ b/third_party/webrender/peek-poke/peek-poke-derive/src/lib.rs
@@ -0,0 +1,266 @@
+// Copyright 2019 The Servo Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use proc_macro2::{Span, TokenStream};
+use quote::quote;
+use syn::{Ident, Index, TraitBound};
+use synstructure::{decl_derive, Structure, BindStyle, AddBounds};
+use unicode_xid::UnicodeXID;
+
+// Internal method for sanitizing an identifier for hygiene purposes.
+fn sanitize_ident(s: &str) -> Ident {
+ let mut res = String::with_capacity(s.len());
+ for mut c in s.chars() {
+ if !UnicodeXID::is_xid_continue(c) {
+ c = '_'
+ }
+ // Deduplicate consecutive _ characters.
+ if res.ends_with('_') && c == '_' {
+ continue;
+ }
+ res.push(c);
+ }
+ Ident::new(&res, Span::call_site())
+}
+
+/// Calculates size type for number of variants (used for enums)
+fn get_discriminant_size_type(len: usize) -> TokenStream {
+ if len <= <u8>::max_value() as usize {
+ quote! { u8 }
+ } else if len <= <u16>::max_value() as usize {
+ quote! { u16 }
+ } else {
+ quote! { u32 }
+ }
+}
+
+fn is_struct(s: &Structure) -> bool {
+ // a single variant with no prefix is 'struct'
+ match &s.variants()[..] {
+ [v] if v.prefix.is_none() => true,
+ _ => false,
+ }
+}
+
+fn derive_max_size(s: &Structure) -> TokenStream {
+ let max_size = s.variants().iter().fold(quote!(0), |acc, vi| {
+ let variant_size = vi.bindings().iter().fold(quote!(0), |acc, bi| {
+ // compute size of each variant by summing the sizes of its bindings
+ let ty = &bi.ast().ty;
+ quote!(#acc + <#ty>::max_size())
+ });
+
+ // find the maximum of each variant
+ quote! {
+ max(#acc, #variant_size)
+ }
+ });
+
+ let body = if is_struct(s) {
+ max_size
+ } else {
+ let discriminant_size_type = get_discriminant_size_type(s.variants().len());
+ quote! {
+ #discriminant_size_type ::max_size() + #max_size
+ }
+ };
+
+ quote! {
+ #[inline(always)]
+ fn max_size() -> usize {
+ use std::cmp::max;
+ #body
+ }
+ }
+}
+
+fn derive_peek_from_for_enum(s: &mut Structure) -> TokenStream {
+ assert!(!is_struct(s));
+ s.bind_with(|_| BindStyle::Move);
+
+ let num_variants = s.variants().len();
+ let discriminant_size_type = get_discriminant_size_type(num_variants);
+ let body = s
+ .variants()
+ .iter()
+ .enumerate()
+ .fold(quote!(), |acc, (i, vi)| {
+ let bindings = vi
+ .bindings()
+ .iter()
+ .map(|bi| quote!(#bi))
+ .collect::<Vec<_>>();
+
+ let variant_pat = Index::from(i);
+ let poke_exprs = bindings.iter().fold(quote!(), |acc, bi| {
+ quote! {
+ #acc
+ let (#bi, bytes) = peek_poke::peek_from_default(bytes);
+ }
+ });
+ let construct = vi.construct(|_, i| {
+ let bi = &bindings[i];
+ quote!(#bi)
+ });
+
+ quote! {
+ #acc
+ #variant_pat => {
+ #poke_exprs
+ *output = #construct;
+ bytes
+ }
+ }
+ });
+
+ let type_name = s.ast().ident.to_string();
+ let max_tag_value = num_variants - 1;
+
+ quote! {
+ #[inline(always)]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ let (variant, bytes) = peek_poke::peek_from_default::<#discriminant_size_type>(bytes);
+ match variant {
+ #body
+ out_of_range_tag => {
+ panic!("WRDL: memory corruption detected while parsing {} - enum tag should be <= {}, but was {}",
+ #type_name, #max_tag_value, out_of_range_tag);
+ }
+ }
+ }
+ }
+}
+
+fn derive_peek_from_for_struct(s: &mut Structure) -> TokenStream {
+ assert!(is_struct(&s));
+
+ s.variants_mut()[0].bind_with(|_| BindStyle::RefMut);
+ let pat = s.variants()[0].pat();
+ let peek_exprs = s.variants()[0].bindings().iter().fold(quote!(), |acc, bi| {
+ let ty = &bi.ast().ty;
+ quote! {
+ #acc
+ let bytes = <#ty>::peek_from(bytes, #bi);
+ }
+ });
+
+ let body = quote! {
+ #pat => {
+ #peek_exprs
+ bytes
+ }
+ };
+
+ quote! {
+ #[inline(always)]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ match &mut (*output) {
+ #body
+ }
+ }
+ }
+}
+
+fn derive_poke_into(s: &Structure) -> TokenStream {
+ let is_struct = is_struct(&s);
+ let discriminant_size_type = get_discriminant_size_type(s.variants().len());
+ let body = s
+ .variants()
+ .iter()
+ .enumerate()
+ .fold(quote!(), |acc, (i, vi)| {
+ let init = if !is_struct {
+ let index = Index::from(i);
+ quote! {
+ let bytes = #discriminant_size_type::poke_into(&#index, bytes);
+ }
+ } else {
+ quote!()
+ };
+ let variant_pat = vi.pat();
+ let poke_exprs = vi.bindings().iter().fold(init, |acc, bi| {
+ quote! {
+ #acc
+ let bytes = #bi.poke_into(bytes);
+ }
+ });
+
+ quote! {
+ #acc
+ #variant_pat => {
+ #poke_exprs
+ bytes
+ }
+ }
+ });
+
+ quote! {
+ #[inline(always)]
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ match &*self {
+ #body
+ }
+ }
+ }
+}
+
+fn peek_poke_derive(mut s: Structure) -> TokenStream {
+ s.binding_name(|_, i| Ident::new(&format!("__self_{}", i), Span::call_site()));
+
+ let max_size_fn = derive_max_size(&s);
+ let poke_into_fn = derive_poke_into(&s);
+ let peek_from_fn = if is_struct(&s) {
+ derive_peek_from_for_struct(&mut s)
+ } else {
+ derive_peek_from_for_enum(&mut s)
+ };
+
+ let poke_impl = s.gen_impl(quote! {
+ extern crate peek_poke;
+
+ gen unsafe impl peek_poke::Poke for @Self {
+ #max_size_fn
+ #poke_into_fn
+ }
+ });
+
+ // To implement `fn peek_from` we require that types implement `Default`
+ // trait to create temporary values. This code does the addition all
+ // manually until https://github.com/mystor/synstructure/issues/24 is fixed.
+ let default_trait = syn::parse_str::<TraitBound>("::std::default::Default").unwrap();
+ let peek_trait = syn::parse_str::<TraitBound>("peek_poke::Peek").unwrap();
+
+ let ast = s.ast();
+ let name = &ast.ident;
+ let (impl_generics, ty_generics, where_clause) = ast.generics.split_for_impl();
+ let mut where_clause = where_clause.cloned();
+ s.add_trait_bounds(&default_trait, &mut where_clause, AddBounds::Generics);
+ s.add_trait_bounds(&peek_trait, &mut where_clause, AddBounds::Generics);
+
+ let dummy_const: Ident = sanitize_ident(&format!("_DERIVE_peek_poke_Peek_FOR_{}", name));
+
+ let peek_impl = quote! {
+ #[allow(non_upper_case_globals)]
+ const #dummy_const: () = {
+ extern crate peek_poke;
+
+ impl #impl_generics peek_poke::Peek for #name #ty_generics #where_clause {
+ #peek_from_fn
+ }
+ };
+ };
+
+ quote! {
+ #poke_impl
+ #peek_impl
+ }
+}
+
+decl_derive!([PeekPoke] => peek_poke_derive);
diff --git a/third_party/webrender/peek-poke/src/euclid.rs b/third_party/webrender/peek-poke/src/euclid.rs
new file mode 100644
index 00000000000..44b0ed27e73
--- /dev/null
+++ b/third_party/webrender/peek-poke/src/euclid.rs
@@ -0,0 +1,170 @@
+// Copyright 2019 The Servo Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use crate::{Peek, Poke};
+use euclid::{Point2D, Rect, SideOffsets2D, Size2D, Transform3D, Vector2D};
+
+unsafe impl<T: Poke, U> Poke for Point2D<T, U> {
+ #[inline(always)]
+ fn max_size() -> usize {
+ 2 * T::max_size()
+ }
+ #[inline(always)]
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ let bytes = self.x.poke_into(bytes);
+ let bytes = self.y.poke_into(bytes);
+ bytes
+ }
+}
+impl<T: Peek, U> Peek for Point2D<T, U> {
+ #[inline(always)]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ let bytes = T::peek_from(bytes, &mut (*output).x);
+ let bytes = T::peek_from(bytes, &mut (*output).y);
+ bytes
+ }
+}
+
+unsafe impl<T: Poke, U> Poke for Rect<T, U> {
+ #[inline(always)]
+ fn max_size() -> usize {
+ Point2D::<T, U>::max_size() + Size2D::<T, U>::max_size()
+ }
+ #[inline(always)]
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ let bytes = self.origin.poke_into(bytes);
+ let bytes = self.size.poke_into(bytes);
+ bytes
+ }
+}
+impl<T: Peek, U> Peek for Rect<T, U> {
+ #[inline(always)]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ let bytes = Point2D::<T, U>::peek_from(bytes, &mut (*output).origin);
+ let bytes = Size2D::<T, U>::peek_from(bytes, &mut (*output).size);
+ bytes
+ }
+}
+
+unsafe impl<T: Poke, U> Poke for SideOffsets2D<T, U> {
+ #[inline(always)]
+ fn max_size() -> usize {
+ 4 * T::max_size()
+ }
+ #[inline(always)]
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ let bytes = self.top.poke_into(bytes);
+ let bytes = self.right.poke_into(bytes);
+ let bytes = self.bottom.poke_into(bytes);
+ let bytes = self.left.poke_into(bytes);
+ bytes
+ }
+}
+impl<T: Peek, U> Peek for SideOffsets2D<T, U> {
+ #[inline(always)]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ let bytes = T::peek_from(bytes, &mut (*output).top);
+ let bytes = T::peek_from(bytes, &mut (*output).right);
+ let bytes = T::peek_from(bytes, &mut (*output).bottom);
+ let bytes = T::peek_from(bytes, &mut (*output).left);
+ bytes
+ }
+}
+
+unsafe impl<T: Poke, U> Poke for Size2D<T, U> {
+ #[inline(always)]
+ fn max_size() -> usize {
+ 2 * T::max_size()
+ }
+ #[inline(always)]
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ let bytes = self.width.poke_into(bytes);
+ let bytes = self.height.poke_into(bytes);
+ bytes
+ }
+}
+impl<T: Peek, U> Peek for Size2D<T, U> {
+ #[inline(always)]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ let bytes = T::peek_from(bytes, &mut (*output).width);
+ let bytes = T::peek_from(bytes, &mut (*output).height);
+ bytes
+ }
+}
+
+unsafe impl<T: Poke, S, D> Poke for Transform3D<T, S, D> {
+ #[inline(always)]
+ fn max_size() -> usize {
+ 16 * T::max_size()
+ }
+ #[inline(always)]
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ let bytes = self.m11.poke_into(bytes);
+ let bytes = self.m12.poke_into(bytes);
+ let bytes = self.m13.poke_into(bytes);
+ let bytes = self.m14.poke_into(bytes);
+ let bytes = self.m21.poke_into(bytes);
+ let bytes = self.m22.poke_into(bytes);
+ let bytes = self.m23.poke_into(bytes);
+ let bytes = self.m24.poke_into(bytes);
+ let bytes = self.m31.poke_into(bytes);
+ let bytes = self.m32.poke_into(bytes);
+ let bytes = self.m33.poke_into(bytes);
+ let bytes = self.m34.poke_into(bytes);
+ let bytes = self.m41.poke_into(bytes);
+ let bytes = self.m42.poke_into(bytes);
+ let bytes = self.m43.poke_into(bytes);
+ let bytes = self.m44.poke_into(bytes);
+ bytes
+ }
+}
+impl<T: Peek, S, D> Peek for Transform3D<T, S, D> {
+ #[inline(always)]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ let bytes = T::peek_from(bytes, &mut (*output).m11);
+ let bytes = T::peek_from(bytes, &mut (*output).m12);
+ let bytes = T::peek_from(bytes, &mut (*output).m13);
+ let bytes = T::peek_from(bytes, &mut (*output).m14);
+ let bytes = T::peek_from(bytes, &mut (*output).m21);
+ let bytes = T::peek_from(bytes, &mut (*output).m22);
+ let bytes = T::peek_from(bytes, &mut (*output).m23);
+ let bytes = T::peek_from(bytes, &mut (*output).m24);
+ let bytes = T::peek_from(bytes, &mut (*output).m31);
+ let bytes = T::peek_from(bytes, &mut (*output).m32);
+ let bytes = T::peek_from(bytes, &mut (*output).m33);
+ let bytes = T::peek_from(bytes, &mut (*output).m34);
+ let bytes = T::peek_from(bytes, &mut (*output).m41);
+ let bytes = T::peek_from(bytes, &mut (*output).m42);
+ let bytes = T::peek_from(bytes, &mut (*output).m43);
+ let bytes = T::peek_from(bytes, &mut (*output).m44);
+ bytes
+ }
+}
+
+unsafe impl<T: Poke, U> Poke for Vector2D<T, U> {
+ #[inline(always)]
+ fn max_size() -> usize {
+ 2 * T::max_size()
+ }
+ #[inline(always)]
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ let bytes = self.x.poke_into(bytes);
+ let bytes = self.y.poke_into(bytes);
+ bytes
+ }
+}
+impl<T: Peek, U> Peek for Vector2D<T, U> {
+ #[inline(always)]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ let bytes = T::peek_from(bytes, &mut (*output).x);
+ let bytes = T::peek_from(bytes, &mut (*output).y);
+ bytes
+ }
+}
diff --git a/third_party/webrender/peek-poke/src/lib.rs b/third_party/webrender/peek-poke/src/lib.rs
new file mode 100644
index 00000000000..55864599bbd
--- /dev/null
+++ b/third_party/webrender/peek-poke/src/lib.rs
@@ -0,0 +1,427 @@
+// Copyright 2019 The Servo Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Fast binary serialization and deserialization for types with a known maximum size.
+//!
+//! ## Binary Encoding Scheme
+//!
+//! ## Usage
+//!
+//! ## Comparison to bincode
+
+#[cfg(feature = "derive")]
+pub use peek_poke_derive::*;
+
+use core::{marker::PhantomData, mem::size_of, slice};
+use crate::{slice_ext::*, vec_ext::*};
+
+mod slice_ext;
+mod vec_ext;
+
+union MaybeUninitShim<T: Copy> {
+ uninit: (),
+ init: T,
+}
+
+/// Peek helper for constructing a `T` by `Copy`ing into an uninitialized stack
+/// allocation.
+pub unsafe fn peek_from_uninit<T: Copy + Peek>(bytes: *const u8) -> (T, *const u8) {
+ let mut val = MaybeUninitShim { uninit: () };
+ let bytes = <T>::peek_from(bytes, &mut val.init);
+ (val.init, bytes)
+}
+
+/// Peek helper for constructing a `T` by `Default` initialized stack
+/// allocation.
+pub unsafe fn peek_from_default<T: Default + Peek>(bytes: *const u8) -> (T, *const u8) {
+ let mut val = T::default();
+ let bytes = <T>::peek_from(bytes, &mut val);
+ (val, bytes)
+}
+
+/// Peek inplace a `T` from a slice of bytes, returning a slice of the remaining
+/// bytes. `src` must contain at least `T::max_size()` bytes.
+///
+/// [`ensure_red_zone`] can be used to add required padding.
+pub fn peek_from_slice<'a, T: Peek>(src: &'a [u8], dst: &mut T) -> &'a [u8] {
+ unsafe {
+ // If src.len() == T::max_size() then src is at the start of the red-zone.
+ assert!(T::max_size() < src.len(), "WRDL: unexpected end of display list");
+ let end_ptr = T::peek_from(src.as_ptr(), dst);
+ let len = end_ptr as usize - src.as_ptr() as usize;
+ // Did someone break the T::peek_from() can't read more than T::max_size()
+ // bytes contract?
+ assert!(len <= src.len(), "WRDL: Peek::max_size was wrong");
+ slice::from_raw_parts(end_ptr, src.len() - len)
+ }
+}
+
+/// Poke helper to insert a serialized version of `src` at the beginning for `dst`.
+pub fn poke_inplace_slice<T: Poke>(src: &T, dst: &mut [u8]) {
+ assert!(T::max_size() <= dst.len(), "WRDL: buffer too small to write into");
+ unsafe {
+ src.poke_into(dst.as_mut_ptr());
+ }
+}
+
+/// Poke helper to append a serialized version of `src` to the end of `dst`.
+pub fn poke_into_vec<T: Poke>(src: &T, dst: &mut Vec<u8>) {
+ dst.reserve(T::max_size());
+ unsafe {
+ let ptr = dst.as_end_mut_ptr();
+ let end_ptr = src.poke_into(ptr);
+ dst.set_end_ptr(end_ptr);
+ }
+}
+
+// TODO: Is returning the len of the iterator of any practical use?
+pub fn poke_extend_vec<I>(src: I, dst: &mut Vec<u8>) -> usize
+where
+ I: ExactSizeIterator,
+ I::Item: Poke,
+{
+ let len = src.len();
+ let max_size = len * I::Item::max_size();
+ dst.reserve(max_size);
+ unsafe {
+ let ptr = dst.as_end_mut_ptr();
+ // Guard against the possibility of a misbehaved implementation of
+ // ExactSizeIterator by writing at most `len` items.
+ let end_ptr = src.take(len).fold(ptr, |ptr, item| item.poke_into(ptr));
+ dst.set_end_ptr(end_ptr);
+ }
+
+ len
+}
+
+/// Add `T::max_size()` "red zone" (padding of zeroes) to the end of the vec of
+/// `bytes`. This allows deserialization to assert that at least `T::max_size()`
+/// bytes exist at all times.
+pub fn ensure_red_zone<T: Poke>(bytes: &mut Vec<u8>) {
+ bytes.reserve(T::max_size());
+ unsafe {
+ let end_ptr = bytes.as_end_mut_ptr();
+ end_ptr.write_bytes(0, T::max_size());
+ bytes.set_end_ptr(end_ptr.add(T::max_size()));
+ }
+}
+
+#[inline]
+unsafe fn read_verbatim<T>(src: *const u8, dst: *mut T) -> *const u8 {
+ *dst = (src as *const T).read_unaligned();
+ src.add(size_of::<T>())
+}
+
+#[inline]
+unsafe fn write_verbatim<T>(src: T, dst: *mut u8) -> *mut u8 {
+ (dst as *mut T).write_unaligned(src);
+ dst.add(size_of::<T>())
+}
+
+#[cfg(feature = "extras")]
+mod euclid;
+
+/// A trait for values that provide serialization into buffers of bytes.
+///
+/// # Example
+///
+/// ```no_run
+/// use peek_poke::Poke;
+///
+/// struct Bar {
+/// a: u32,
+/// b: u8,
+/// c: i16,
+/// }
+///
+/// unsafe impl Poke for Bar {
+/// fn max_size() -> usize {
+/// <u32>::max_size() + <u8>::max_size() + <i16>::max_size()
+/// }
+/// unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+/// let bytes = self.a.poke_into(bytes);
+/// let bytes = self.b.poke_into(bytes);
+/// self.c.poke_into(bytes)
+/// }
+/// }
+/// ```
+///
+/// # Safety
+///
+/// The `Poke` trait is an `unsafe` trait for the reasons, and implementors must
+/// ensure that they adhere to these contracts:
+///
+/// * `max_size()` query and calculations in general must be correct. Callers
+/// of this trait are expected to rely on the contract defined on each
+/// method, and implementors must ensure such contracts remain true.
+pub unsafe trait Poke {
+ /// Return the maximum number of bytes that the serialized version of `Self`
+ /// will occupy.
+ ///
+ /// # Safety
+ ///
+ /// Implementors of `Poke` guarantee to not write more than the result of
+ /// calling `max_size()` into the buffer pointed to by `bytes` when
+ /// `poke_into()` is called.
+ fn max_size() -> usize;
+ /// Serialize into the buffer pointed to by `bytes`.
+ ///
+ /// Returns a pointer to the next byte after the serialized representation of `Self`.
+ ///
+ /// # Safety
+ ///
+ /// This function is unsafe because undefined behavior can result if the
+ /// caller does not ensure all of the following:
+ ///
+ /// * `bytes` must denote a valid pointer to a block of memory.
+ ///
+ /// * `bytes` must pointer to at least the number of bytes returned by
+ /// `max_size()`.
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8;
+}
+
+/// A trait for values that provide deserialization from buffers of bytes.
+///
+/// # Example
+///
+/// ```ignore
+/// use peek_poke::Peek;
+///
+/// struct Bar {
+/// a: u32,
+/// b: u8,
+/// c: i16,
+/// }
+///
+/// ...
+///
+/// impl Peek for Bar {
+/// unsafe fn peek_from(&mut self, bytes: *const u8) -> *const u8 {
+/// let bytes = self.a.peek_from(bytes);
+/// let bytes = self.b.peek_from(bytes);
+/// self.c.peek_from(bytes)
+/// }
+/// }
+/// ```
+///
+/// # Safety
+///
+/// The `Peek` trait contains unsafe methods for the following reasons, and
+/// implementors must ensure that they adhere to these contracts:
+///
+/// * Callers of this trait are expected to rely on the contract defined on each
+/// method, and implementors must ensure that `peek_from()` doesn't read more
+/// bytes from `bytes` than is returned by `Peek::max_size()`.
+pub trait Peek: Poke {
+ /// Deserialize from the buffer pointed to by `bytes`.
+ ///
+ /// Returns a pointer to the next byte after the unconsumed bytes not used
+ /// to deserialize the representation of `Self`.
+ ///
+ /// # Safety
+ ///
+ /// This function is unsafe because undefined behavior can result if the
+ /// caller does not ensure all of the following:
+ ///
+ /// * `bytes` must denote a valid pointer to a block of memory.
+ ///
+ /// * `bytes` must pointer to at least the number of bytes returned by
+ /// `Poke::max_size()`.
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8;
+}
+
+macro_rules! impl_poke_for_deref {
+ (<$($desc:tt)+) => {
+ unsafe impl <$($desc)+ {
+ #[inline(always)]
+ fn max_size() -> usize {
+ <T>::max_size()
+ }
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ (**self).poke_into(bytes)
+ }
+ }
+ }
+}
+
+impl_poke_for_deref!(<'a, T: Poke> Poke for &'a T);
+impl_poke_for_deref!(<'a, T: Poke> Poke for &'a mut T);
+
+macro_rules! impl_for_primitive {
+ ($($ty:ty)+) => {
+ $(unsafe impl Poke for $ty {
+ #[inline(always)]
+ fn max_size() -> usize {
+ size_of::<Self>()
+ }
+ #[inline(always)]
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ write_verbatim(*self, bytes)
+ }
+ }
+ impl Peek for $ty {
+ #[inline(always)]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ read_verbatim(bytes, output)
+ }
+ })+
+ };
+}
+
+impl_for_primitive! {
+ i8 i16 i32 i64 isize
+ u8 u16 u32 u64 usize
+ f32 f64
+}
+
+unsafe impl Poke for bool {
+ #[inline(always)]
+ fn max_size() -> usize {
+ u8::max_size()
+ }
+ #[inline]
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ (*self as u8).poke_into(bytes)
+ }
+}
+
+impl Peek for bool {
+ #[inline]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ let mut int_bool = 0u8;
+ let ptr = <u8>::peek_from(bytes, &mut int_bool);
+ *output = int_bool != 0;
+ ptr
+ }
+}
+
+unsafe impl<T> Poke for PhantomData<T> {
+ #[inline(always)]
+ fn max_size() -> usize {
+ 0
+ }
+ #[inline(always)]
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ bytes
+ }
+}
+
+impl<T> Peek for PhantomData<T> {
+ #[inline(always)]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ *output = PhantomData;
+ bytes
+ }
+}
+
+unsafe impl<T: Poke> Poke for Option<T> {
+ #[inline(always)]
+ fn max_size() -> usize {
+ u8::max_size() + T::max_size()
+ }
+
+ #[inline]
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ match self {
+ None => 0u8.poke_into(bytes),
+ Some(ref v) => {
+ let bytes = 1u8.poke_into(bytes);
+ let bytes = v.poke_into(bytes);
+ bytes
+ }
+ }
+ }
+}
+
+impl<T: Default + Peek> Peek for Option<T> {
+ #[inline]
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ let (variant, bytes) = peek_from_default::<u8>(bytes);
+ match variant {
+ 0 => {
+ *output = None;
+ bytes
+ }
+ 1 => {
+ let (val, bytes) = peek_from_default(bytes);
+ *output = Some(val);
+ bytes
+ }
+ _ => unreachable!(),
+ }
+ }
+}
+
+macro_rules! impl_for_arrays {
+ ($($len:tt)+) => {
+ $(unsafe impl<T: Poke> Poke for [T; $len] {
+ fn max_size() -> usize {
+ $len * T::max_size()
+ }
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ self.iter().fold(bytes, |bytes, e| e.poke_into(bytes))
+ }
+ }
+ impl<T: Peek> Peek for [T; $len] {
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ (&mut *output).iter_mut().fold(bytes, |bytes, e| <T>::peek_from(bytes, e))
+ }
+ })+
+ }
+}
+
+impl_for_arrays! {
+ 01 02 03 04 05 06 07 08 09 10
+ 11 12 13 14 15 16 17 18 19 20
+ 21 22 23 24 25 26 27 28 29 30
+ 31 32
+}
+
+unsafe impl Poke for () {
+ fn max_size() -> usize {
+ 0
+ }
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ bytes
+ }
+}
+impl Peek for () {
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ *output = ();
+ bytes
+ }
+}
+
+macro_rules! impl_for_tuple {
+ ($($n:tt: $ty:ident),+) => {
+ unsafe impl<$($ty: Poke),+> Poke for ($($ty,)+) {
+ #[inline(always)]
+ fn max_size() -> usize {
+ 0 $(+ <$ty>::max_size())+
+ }
+ unsafe fn poke_into(&self, bytes: *mut u8) -> *mut u8 {
+ $(let bytes = self.$n.poke_into(bytes);)+
+ bytes
+ }
+ }
+ impl<$($ty: Peek),+> Peek for ($($ty,)+) {
+ unsafe fn peek_from(bytes: *const u8, output: *mut Self) -> *const u8 {
+ $(let bytes = $ty::peek_from(bytes, &mut (*output).$n);)+
+ bytes
+ }
+ }
+ }
+}
+
+impl_for_tuple!(0: A);
+impl_for_tuple!(0: A, 1: B);
+impl_for_tuple!(0: A, 1: B, 2: C);
+impl_for_tuple!(0: A, 1: B, 2: C, 3: D);
+impl_for_tuple!(0: A, 1: B, 2: C, 3: D, 4: E);
diff --git a/third_party/webrender/peek-poke/src/slice_ext.rs b/third_party/webrender/peek-poke/src/slice_ext.rs
new file mode 100644
index 00000000000..f309d2f7410
--- /dev/null
+++ b/third_party/webrender/peek-poke/src/slice_ext.rs
@@ -0,0 +1,19 @@
+// Copyright 2019 The Servo Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait AsEndMutPtr<T> {
+ fn as_end_mut_ptr(self) -> *mut T;
+}
+
+impl<'a> AsEndMutPtr<u8> for &'a mut [u8] {
+ fn as_end_mut_ptr(self) -> *mut u8 {
+ unsafe { self.as_mut_ptr().add(self.len()) }
+ }
+}
diff --git a/third_party/webrender/peek-poke/src/vec_ext.rs b/third_party/webrender/peek-poke/src/vec_ext.rs
new file mode 100644
index 00000000000..42e26032e52
--- /dev/null
+++ b/third_party/webrender/peek-poke/src/vec_ext.rs
@@ -0,0 +1,26 @@
+// Copyright 2019 The Servo Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::vec::Vec;
+
+pub trait VecExt {
+ type Item;
+ unsafe fn set_end_ptr(&mut self, end: *const Self::Item);
+}
+
+impl<T> VecExt for Vec<T> {
+ type Item = T;
+ unsafe fn set_end_ptr(&mut self, end: *const T) {
+ assert!(end as usize >= self.as_ptr() as usize);
+ let new_len = end as usize - self.as_ptr() as usize;
+ assert!(new_len <= self.capacity());
+ self.set_len(new_len);
+ }
+}
diff --git a/third_party/webrender/peek-poke/tests/max_size.rs b/third_party/webrender/peek-poke/tests/max_size.rs
new file mode 100644
index 00000000000..67cd1ca4a68
--- /dev/null
+++ b/third_party/webrender/peek-poke/tests/max_size.rs
@@ -0,0 +1,117 @@
+// Copyright 2019 The Servo Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![allow(dead_code)]
+
+use peek_poke::{PeekPoke, Poke};
+use std::{marker::PhantomData, mem::size_of};
+
+#[test]
+fn test_numbers() {
+ assert_eq!(u8::max_size(), size_of::<u8>());
+ assert_eq!(u16::max_size(), size_of::<u16>());
+ assert_eq!(u32::max_size(), size_of::<u32>());
+ assert_eq!(u64::max_size(), size_of::<u64>());
+ assert_eq!(usize::max_size(), size_of::<usize>());
+ assert_eq!(i8::max_size(), size_of::<i8>());
+ assert_eq!(i16::max_size(), size_of::<i16>());
+ assert_eq!(i32::max_size(), size_of::<i32>());
+ assert_eq!(i64::max_size(), size_of::<i64>());
+ assert_eq!(isize::max_size(), size_of::<isize>());
+ // floating
+ assert_eq!(f32::max_size(), size_of::<f32>());
+ assert_eq!(f64::max_size(), size_of::<f64>());
+}
+
+#[test]
+fn test_bool() {
+ assert_eq!(bool::max_size(), size_of::<u8>());
+}
+
+#[test]
+fn test_option() {
+ assert_eq!(
+ Option::<usize>::max_size(),
+ <u8>::max_size() + <usize>::max_size()
+ );
+}
+
+#[test]
+fn test_fixed_size_array() {
+ assert_eq!(<[u32; 32]>::max_size(), 32 * size_of::<u32>());
+ assert_eq!(<[u64; 8]>::max_size(), 8 * size_of::<u64>());
+ assert_eq!(<[u8; 19]>::max_size(), 19 * size_of::<u8>());
+}
+
+#[test]
+fn test_tuple() {
+ assert_eq!(<(isize, )>::max_size(), size_of::<isize>());
+ assert_eq!(<(isize, isize, isize)>::max_size(), 3 * size_of::<isize>());
+ assert_eq!(<(isize, ())>::max_size(), size_of::<isize>());
+}
+
+#[test]
+fn test_basic_struct() {
+ #[derive(Debug, PeekPoke)]
+ struct Bar {
+ a: u32,
+ b: u32,
+ c: u32,
+ }
+
+ assert_eq!(<Bar>::max_size(), 3 * <u32>::max_size());
+}
+
+#[test]
+fn test_enum() {
+ #[derive(Clone, Copy, PeekPoke)]
+ enum TestEnum {
+ NoArg,
+ OneArg(usize),
+ Args(usize, usize),
+ AnotherNoArg,
+ StructLike { x: usize, y: f32 },
+ }
+ assert_eq!(
+ TestEnum::max_size(),
+ <u8>::max_size() + 2 * <usize>::max_size()
+ );
+}
+
+#[test]
+fn test_enum_cstyle() {
+ #[repr(u32)]
+ #[derive(Clone, Copy, PeekPoke)]
+ enum BorderStyle {
+ None = 0,
+ Solid = 1,
+ Double = 2,
+ Dotted = 3,
+ Dashed = 4,
+ Hidden = 5,
+ Groove = 6,
+ Ridge = 7,
+ Inset = 8,
+ Outset = 9,
+ }
+ assert_eq!(BorderStyle::max_size(), <u8>::max_size());
+}
+
+#[test]
+fn test_phantom_data() {
+ struct Bar;
+ #[derive(PeekPoke)]
+ struct Foo {
+ x: u32,
+ y: u32,
+ _marker: PhantomData<Bar>,
+ }
+ assert_eq!(Foo::max_size(), 2 * size_of::<u32>())
+}
diff --git a/third_party/webrender/peek-poke/tests/round_trip.rs b/third_party/webrender/peek-poke/tests/round_trip.rs
new file mode 100644
index 00000000000..3134c207ec4
--- /dev/null
+++ b/third_party/webrender/peek-poke/tests/round_trip.rs
@@ -0,0 +1,275 @@
+// Copyright 2019 The Servo Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use peek_poke::{Peek, PeekPoke, Poke};
+use std::{fmt::Debug, marker::PhantomData};
+
+fn poke_into<V: Peek + Poke>(a: &V) -> Vec<u8> {
+ let mut v = <Vec<u8>>::with_capacity(<V>::max_size());
+ let end_ptr = unsafe { a.poke_into(v.as_mut_ptr()) };
+ let new_size = end_ptr as usize - v.as_ptr() as usize;
+ assert!(new_size <= v.capacity());
+ unsafe {
+ v.set_len(new_size);
+ }
+ v
+}
+
+#[cfg(not(feature = "option_copy"))]
+fn the_same<V>(a: V)
+where
+ V: Debug + Default + PartialEq + Peek + Poke,
+{
+ let v = poke_into(&a);
+ let (b, end_ptr) = unsafe { peek_poke::peek_from_default(v.as_ptr()) };
+ let size = end_ptr as usize - v.as_ptr() as usize;
+ assert_eq!(size, v.len());
+ assert_eq!(a, b);
+}
+
+#[cfg(feature = "option_copy")]
+fn the_same<V>(a: V)
+where
+ V: Copy + Debug + PartialEq + Peek + Poke,
+{
+ let v = poke_into(&a);
+ let mut b = a;
+ let end_ptr = unsafe { b.peek_from(v.as_ptr()) };
+ let size = end_ptr as usize - v.as_ptr() as usize;
+ assert_eq!(size, v.len());
+ assert_eq!(a, b);
+}
+
+#[test]
+fn test_numbers() {
+ // unsigned positive
+ the_same(5u8);
+ the_same(5u16);
+ the_same(5u32);
+ the_same(5u64);
+ the_same(5usize);
+ // signed positive
+ the_same(5i8);
+ the_same(5i16);
+ the_same(5i32);
+ the_same(5i64);
+ the_same(5isize);
+ // signed negative
+ the_same(-5i8);
+ the_same(-5i16);
+ the_same(-5i32);
+ the_same(-5i64);
+ the_same(-5isize);
+ // floating
+ the_same(-100f32);
+ the_same(0f32);
+ the_same(5f32);
+ the_same(-100f64);
+ the_same(5f64);
+}
+
+#[test]
+fn test_bool() {
+ the_same(true);
+ the_same(false);
+}
+
+#[cfg(any(feature = "option_copy", feature = "option_default"))]
+#[test]
+fn test_option() {
+ the_same(Some(5usize));
+ //the_same(Some("foo bar".to_string()));
+ the_same(None::<usize>);
+}
+
+#[test]
+fn test_fixed_size_array() {
+ the_same([24u32; 32]);
+ the_same([1u64, 2, 3, 4, 5, 6, 7, 8]);
+ the_same([0u8; 19]);
+}
+
+#[test]
+fn test_tuple() {
+ the_same((1isize, ));
+ the_same((1isize, 2isize, 3isize));
+ the_same((1isize, ()));
+}
+
+#[test]
+fn test_basic_struct() {
+ #[derive(Copy, Clone, Debug, Default, PartialEq, PeekPoke)]
+ struct Bar {
+ a: u32,
+ b: u32,
+ c: u32,
+ #[cfg(any(feature = "option_copy", feature = "option_default"))]
+ d: Option<u32>,
+ }
+
+ the_same(Bar {
+ a: 2,
+ b: 4,
+ c: 42,
+ #[cfg(any(feature = "option_copy", feature = "option_default"))]
+ d: None,
+ });
+}
+
+#[test]
+fn test_enum() {
+ #[derive(Clone, Copy, Debug, PartialEq, PeekPoke)]
+ enum TestEnum {
+ NoArg,
+ OneArg(usize),
+ Args(usize, usize),
+ AnotherNoArg,
+ StructLike { x: usize, y: f32 },
+ }
+
+ impl Default for TestEnum {
+ fn default() -> Self {
+ TestEnum::NoArg
+ }
+ }
+
+ the_same(TestEnum::NoArg);
+ the_same(TestEnum::OneArg(4));
+ the_same(TestEnum::Args(4, 5));
+ the_same(TestEnum::AnotherNoArg);
+ the_same(TestEnum::StructLike { x: 4, y: 3.14159 });
+}
+
+#[test]
+fn test_enum_cstyle() {
+ #[repr(u32)]
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, PeekPoke)]
+ enum BorderStyle {
+ None = 0,
+ Solid = 1,
+ Double = 2,
+ Dotted = 3,
+ Dashed = 4,
+ Hidden = 5,
+ Groove = 6,
+ Ridge = 7,
+ Inset = 8,
+ Outset = 9,
+ }
+
+ impl Default for BorderStyle {
+ fn default() -> Self {
+ BorderStyle::None
+ }
+ }
+
+ the_same(BorderStyle::None);
+ the_same(BorderStyle::Solid);
+ the_same(BorderStyle::Double);
+ the_same(BorderStyle::Dotted);
+ the_same(BorderStyle::Dashed);
+ the_same(BorderStyle::Hidden);
+ the_same(BorderStyle::Groove);
+ the_same(BorderStyle::Ridge);
+ the_same(BorderStyle::Inset);
+ the_same(BorderStyle::Outset);
+}
+
+#[test]
+fn test_phantom_data() {
+ struct Bar;
+ #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PeekPoke)]
+ struct Foo {
+ x: u32,
+ y: u32,
+ _marker: PhantomData<Bar>,
+ }
+ the_same(Foo {
+ x: 19,
+ y: 42,
+ _marker: PhantomData,
+ });
+}
+
+#[test]
+fn test_generic() {
+ #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PeekPoke)]
+ struct Foo<T> {
+ x: T,
+ y: T,
+ }
+ the_same(Foo { x: 19.0, y: 42.0 });
+}
+
+#[test]
+fn test_generic_enum() {
+ #[derive(Clone, Copy, Debug, Default, PartialEq, PeekPoke)]
+ pub struct PropertyBindingKey<T> {
+ pub id: usize,
+ _phantom: PhantomData<T>,
+ }
+
+ #[derive(Clone, Copy, Debug, PartialEq, PeekPoke)]
+ pub enum PropertyBinding<T> {
+ Value(T),
+ Binding(PropertyBindingKey<T>, T),
+ }
+
+ impl<T: Default> Default for PropertyBinding<T> {
+ fn default() -> Self {
+ PropertyBinding::Value(Default::default())
+ }
+ }
+}
+
+#[cfg(all(feature = "extras", feature = "option_copy"))]
+mod extra_tests {
+ use super::*;
+ use euclid::{Point2D, Rect, SideOffsets2D, Size2D, Transform3D, Vector2D};
+ use std::mem::size_of;
+
+ #[test]
+ fn euclid_types() {
+ the_same(Point2D::<f32>::new(1.0, 2.0));
+ assert_eq!(Point2D::<f32>::max_size(), 2 * size_of::<f32>());
+
+ the_same(Rect::<f32>::new(
+ Point2D::<f32>::new(0.0, 0.0),
+ Size2D::<f32>::new(100.0, 80.0),
+ ));
+ assert_eq!(Rect::<f32>::max_size(), 4 * size_of::<f32>());
+
+ the_same(SideOffsets2D::<f32>::new(0.0, 10.0, -1.0, -10.0));
+ assert_eq!(SideOffsets2D::<f32>::max_size(), 4 * size_of::<f32>());
+
+ the_same(Transform3D::<f32>::identity());
+ assert_eq!(Transform3D::<f32>::max_size(), 16 * size_of::<f32>());
+
+ the_same(Vector2D::<f32>::new(1.0, 2.0));
+ assert_eq!(Vector2D::<f32>::max_size(), 2 * size_of::<f32>());
+ }
+
+ #[test]
+ fn webrender_api_types() {
+ type PipelineSourceId = i32;
+ #[derive(Clone, Copy, Debug, PartialEq, PeekPoke)]
+ struct PipelineId(pub PipelineSourceId, pub u32);
+
+ #[derive(Clone, Copy, Debug, PartialEq, PeekPoke)]
+ struct ClipChainId(pub u64, pub PipelineId);
+
+ #[derive(Clone, Copy, Debug, PartialEq, PeekPoke)]
+ struct SpatialId(pub usize, pub PipelineId);
+
+ the_same(PipelineId(42, 2));
+ the_same(ClipChainId(19u64, PipelineId(42, 2)));
+ the_same(SpatialId(19usize, PipelineId(42, 2)));
+ }
+}
diff --git a/third_party/webrender/rustfmt.toml b/third_party/webrender/rustfmt.toml
new file mode 100644
index 00000000000..d43a44fcbd2
--- /dev/null
+++ b/third_party/webrender/rustfmt.toml
@@ -0,0 +1,6 @@
+reorder_imports = false
+reorder_imports_in_group = true
+reorder_imported_names = true
+error_on_line_overflow_comments = false
+max_width = 100
+spaces_around_ranges = true
diff --git a/third_party/webrender/servo-tidy.toml b/third_party/webrender/servo-tidy.toml
new file mode 100644
index 00000000000..15c2b7bae39
--- /dev/null
+++ b/third_party/webrender/servo-tidy.toml
@@ -0,0 +1,39 @@
+[configs]
+skip-check-length = false
+skip-check-licenses = false
+check-alphabetical-order = false
+
+[ignore]
+# Ignored packages with duplicated versions
+packages = [
+ "core-foundation",
+ "core-foundation-sys",
+ "core-graphics",
+ "gl_generator",
+ "gleam",
+ "rand",
+ "rand_core",
+ # https://github.com/trimental/andrew/issues/5
+ "rusttype",
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1615148
+ "smallvec",
+ "winapi",
+ "yaml-rust",
+ # These are tracked in bug 1587468, see there for pending work.
+ "proc-macro2",
+ "quote",
+ "unicode-xid",
+]
+
+# Files that are ignored for all tidy and lint checks.
+files = [
+ "./wrench/src/egl.rs", # Copied from glutin
+]
+
+# Many directories are currently ignored while we tidy things up
+# gradually.
+directories = [
+ # Generated and upstream code combined with our own. Could use cleanup
+ "./target",
+ "./webrender/src",
+]
diff --git a/third_party/webrender/swgl/Cargo.toml b/third_party/webrender/swgl/Cargo.toml
new file mode 100644
index 00000000000..bc5a04b0a34
--- /dev/null
+++ b/third_party/webrender/swgl/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "swgl"
+version = "0.1.0"
+license = "MPL-2.0"
+authors = ["The Mozilla Project Developers"]
+build = "build.rs"
+description = "Software OpenGL implementation for WebRender."
+
+[build-dependencies]
+cc = "1.0.46"
+glsl-to-cxx = { path = "../glsl-to-cxx" }
+webrender_build = { path = "../webrender_build" }
+
+[dependencies]
+gleam = "0.12.0"
diff --git a/third_party/webrender/swgl/README.md b/third_party/webrender/swgl/README.md
new file mode 100644
index 00000000000..158a4157930
--- /dev/null
+++ b/third_party/webrender/swgl/README.md
@@ -0,0 +1,4 @@
+swgl
+========
+
+Software OpenGL implementation for WebRender
diff --git a/third_party/webrender/swgl/build.rs b/third_party/webrender/swgl/build.rs
new file mode 100644
index 00000000000..1de3568aa07
--- /dev/null
+++ b/third_party/webrender/swgl/build.rs
@@ -0,0 +1,150 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate cc;
+extern crate glsl_to_cxx;
+extern crate webrender_build;
+
+use std::collections::HashSet;
+use std::fmt::Write;
+use webrender_build::shader::{ShaderFeatureFlags, get_shader_features};
+
+// Shader key is in "name feature,feature" format.
+// File name needs to be formatted as "name_feature_feature".
+fn shader_file(shader_key: &str) -> String {
+ shader_key.replace(' ', "_").replace(',', "_")
+}
+
+fn write_load_shader(shader_keys: &[String]) {
+ let mut load_shader = String::new();
+ for s in shader_keys {
+ let _ = write!(load_shader, "#include \"{}.h\"\n", shader_file(s));
+ }
+ load_shader.push_str("ProgramLoader load_shader(const char* name) {\n");
+ for s in shader_keys {
+ let _ = write!(load_shader, " if (!strcmp(name, \"{}\")) {{ return {}_program::loader; }}\n",
+ s, shader_file(s));
+ }
+ load_shader.push_str(" return nullptr;\n}\n");
+ std::fs::write(std::env::var("OUT_DIR").unwrap() + "/load_shader.h", load_shader).unwrap();
+}
+
+fn process_imports(shader_dir: &str, shader: &str, included: &mut HashSet<String>, output: &mut String) {
+ if !included.insert(shader.into()) {
+ return;
+ }
+ println!("cargo:rerun-if-changed={}/{}.glsl", shader_dir, shader);
+ let source = std::fs::read_to_string(format!("{}/{}.glsl", shader_dir, shader)).unwrap();
+ for line in source.lines() {
+ if line.starts_with("#include ") {
+ let imports = line["#include ".len() ..].split(',');
+ for import in imports {
+ process_imports(shader_dir, import, included, output);
+ }
+ } else if line.starts_with("#version ") || line.starts_with("#extension ") {
+ // ignore
+ } else {
+ output.push_str(line);
+ output.push('\n');
+ }
+ }
+}
+
+fn translate_shader(shader_key: &str, shader_dir: &str) {
+ let mut imported = String::from("#define SWGL 1\n");
+ let _ = write!(imported, "#define WR_MAX_VERTEX_TEXTURE_WIDTH {}U\n",
+ webrender_build::MAX_VERTEX_TEXTURE_WIDTH);
+
+ let (basename, features) =
+ shader_key.split_at(shader_key.find(' ').unwrap_or(shader_key.len()));
+ if !features.is_empty() {
+ for feature in features.trim().split(',') {
+ let _ = write!(imported, "#define WR_FEATURE_{}\n", feature);
+ }
+ }
+
+ process_imports(shader_dir, basename, &mut HashSet::new(), &mut imported);
+
+ let shader = shader_file(shader_key);
+
+ let out_dir = std::env::var("OUT_DIR").unwrap();
+ let imp_name = format!("{}/{}.c", out_dir, shader);
+ std::fs::write(&imp_name, imported).unwrap();
+
+ let mut build = cc::Build::new();
+ if build.get_compiler().is_like_msvc() {
+ build.flag("/EP");
+ } else {
+ build.flag("-xc").flag("-P");
+ }
+ build.file(&imp_name);
+ let vs = build.clone()
+ .define("WR_VERTEX_SHADER", Some("1"))
+ .expand();
+ let fs = build.clone()
+ .define("WR_FRAGMENT_SHADER", Some("1"))
+ .expand();
+ let vs_name = format!("{}/{}.vert", out_dir, shader);
+ let fs_name = format!("{}/{}.frag", out_dir, shader);
+ std::fs::write(&vs_name, vs).unwrap();
+ std::fs::write(&fs_name, fs).unwrap();
+
+ let mut args = vec![
+ "glsl_to_cxx".to_string(),
+ vs_name,
+ fs_name,
+ ];
+ let frag_include = format!("{}/{}.frag.h", shader_dir, shader);
+ if std::path::Path::new(&frag_include).exists() {
+ println!("cargo:rerun-if-changed={}/{}.frag.h", shader_dir, shader);
+ args.push(frag_include);
+ }
+ let result = glsl_to_cxx::translate(&mut args.into_iter());
+ std::fs::write(format!("{}/{}.h", out_dir, shader), result).unwrap();
+}
+
+fn main() {
+ let shader_dir = match std::env::var("MOZ_SRC") {
+ Ok(dir) => dir + "/gfx/wr/webrender/res",
+ Err(_) => std::env::var("CARGO_MANIFEST_DIR").unwrap() + "/../webrender/res",
+ };
+
+ let shader_flags =
+ ShaderFeatureFlags::GL |
+ ShaderFeatureFlags::DUAL_SOURCE_BLENDING;
+ let mut shaders: Vec<String> = Vec::new();
+ for (name, features) in get_shader_features(shader_flags) {
+ shaders.extend(features.iter().map(|f| {
+ if f.is_empty() { name.to_owned() } else { format!("{} {}", name, f) }
+ }));
+ }
+
+ shaders.sort();
+
+ for shader in &shaders {
+ translate_shader(shader, &shader_dir);
+ }
+
+ write_load_shader(&shaders);
+
+ println!("cargo:rerun-if-changed=src/gl_defs.h");
+ println!("cargo:rerun-if-changed=src/glsl.h");
+ println!("cargo:rerun-if-changed=src/program.h");
+ println!("cargo:rerun-if-changed=src/texture.h");
+ println!("cargo:rerun-if-changed=src/vector_type.h");
+ println!("cargo:rerun-if-changed=src/gl.cc");
+ cc::Build::new()
+ .cpp(true)
+ .file("src/gl.cc")
+ .flag("-std=c++14")
+ .flag("-UMOZILLA_CONFIG_H")
+ .flag("-fno-exceptions")
+ .flag("-fno-rtti")
+ .flag("-fno-math-errno")
+ .define("_GLIBCXX_USE_CXX11_ABI", Some("0"))
+ .include(shader_dir)
+ .include("src")
+ .include(std::env::var("OUT_DIR").unwrap())
+ .compile("gl_cc");
+}
diff --git a/third_party/webrender/swgl/src/gl.cc b/third_party/webrender/swgl/src/gl.cc
new file mode 100644
index 00000000000..f4a69752dde
--- /dev/null
+++ b/third_party/webrender/swgl/src/gl.cc
@@ -0,0 +1,4015 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <assert.h>
+#include <stdio.h>
+#include <math.h>
+
+#ifdef __MACH__
+# include <mach/mach.h>
+# include <mach/mach_time.h>
+#else
+# include <time.h>
+#endif
+
+#ifdef NDEBUG
+# define debugf(...)
+#else
+# define debugf(...) printf(__VA_ARGS__)
+#endif
+
+#ifdef _WIN32
+# define ALWAYS_INLINE __forceinline
+#else
+# define ALWAYS_INLINE __attribute__((always_inline)) inline
+#endif
+
+#define UNREACHABLE __builtin_unreachable()
+
+#define UNUSED __attribute__((unused))
+
+#ifdef MOZILLA_CLIENT
+# define IMPLICIT __attribute__((annotate("moz_implicit")))
+#else
+# define IMPLICIT
+#endif
+
+#include "gl_defs.h"
+#include "glsl.h"
+#include "program.h"
+
+using namespace glsl;
+
+struct IntRect {
+ int x0;
+ int y0;
+ int x1;
+ int y1;
+
+ int width() const { return x1 - x0; }
+ int height() const { return y1 - y0; }
+ bool is_empty() const { return width() <= 0 || height() <= 0; }
+
+ bool same_size(const IntRect& o) const {
+ return width() == o.width() && height() == o.height();
+ }
+
+ bool contains(const IntRect& o) const {
+ return o.x0 >= x0 && o.y0 >= y0 && o.x1 <= x1 && o.y1 <= y1;
+ }
+
+ IntRect& intersect(const IntRect& o) {
+ x0 = max(x0, o.x0);
+ y0 = max(y0, o.y0);
+ x1 = min(x1, o.x1);
+ y1 = min(y1, o.y1);
+ return *this;
+ }
+
+ // Scale from source-space to dest-space, optionally rounding inward
+ IntRect& scale(int srcWidth, int srcHeight, int dstWidth, int dstHeight,
+ bool roundIn = false) {
+ x0 = (x0 * dstWidth + (roundIn ? srcWidth - 1 : 0)) / srcWidth;
+ y0 = (y0 * dstHeight + (roundIn ? srcHeight - 1 : 0)) / srcHeight;
+ x1 = (x1 * dstWidth) / srcWidth;
+ y1 = (y1 * dstHeight) / srcHeight;
+ return *this;
+ }
+
+ // Flip the rect's Y coords around inflection point at Y=offset
+ void invert_y(int offset) {
+ y0 = offset - y0;
+ y1 = offset - y1;
+ swap(y0, y1);
+ }
+
+ IntRect& offset(int dx, int dy) {
+ x0 += dx;
+ y0 += dy;
+ x1 += dx;
+ y1 += dy;
+ return *this;
+ }
+};
+
+struct VertexAttrib {
+ size_t size = 0; // in bytes
+ GLenum type = 0;
+ bool normalized = false;
+ GLsizei stride = 0;
+ GLuint offset = 0;
+ bool enabled = false;
+ GLuint divisor = 0;
+ int vertex_array = 0;
+ int vertex_buffer = 0;
+ char* buf = nullptr; // XXX: this can easily dangle
+ size_t buf_size = 0; // this will let us bounds check
+};
+
+static int bytes_for_internal_format(GLenum internal_format) {
+ switch (internal_format) {
+ case GL_RGBA32F:
+ return 4 * 4;
+ case GL_RGBA32I:
+ return 4 * 4;
+ case GL_RGBA8:
+ case GL_BGRA8:
+ case GL_RGBA:
+ return 4;
+ case GL_R8:
+ case GL_RED:
+ return 1;
+ case GL_DEPTH_COMPONENT:
+ case GL_DEPTH_COMPONENT16:
+ return 2;
+ case GL_DEPTH_COMPONENT24:
+ case GL_DEPTH_COMPONENT32:
+ return 4;
+ default:
+ debugf("internal format: %x\n", internal_format);
+ assert(0);
+ return 0;
+ }
+}
+
+static inline int aligned_stride(int row_bytes) { return (row_bytes + 3) & ~3; }
+
+static TextureFormat gl_format_to_texture_format(int type) {
+ switch (type) {
+ case GL_RGBA32F:
+ return TextureFormat::RGBA32F;
+ case GL_RGBA32I:
+ return TextureFormat::RGBA32I;
+ case GL_RGBA8:
+ return TextureFormat::RGBA8;
+ case GL_R8:
+ return TextureFormat::R8;
+ default:
+ assert(0);
+ return TextureFormat::RGBA8;
+ }
+}
+
+struct Query {
+ uint64_t value = 0;
+};
+
+struct Buffer {
+ char* buf = nullptr;
+ size_t size = 0;
+
+ bool allocate(size_t new_size) {
+ if (new_size != size) {
+ char* new_buf = (char*)realloc(buf, new_size);
+ assert(new_buf);
+ if (new_buf) {
+ buf = new_buf;
+ size = new_size;
+ return true;
+ }
+ cleanup();
+ }
+ return false;
+ }
+
+ void cleanup() {
+ if (buf) {
+ free(buf);
+ buf = nullptr;
+ size = 0;
+ }
+ }
+
+ ~Buffer() { cleanup(); }
+};
+
+struct Framebuffer {
+ GLuint color_attachment = 0;
+ GLint layer = 0;
+ GLuint depth_attachment = 0;
+};
+
+struct Renderbuffer {
+ GLuint texture = 0;
+
+ void on_erase();
+};
+
+TextureFilter gl_filter_to_texture_filter(int type) {
+ switch (type) {
+ case GL_NEAREST:
+ return TextureFilter::NEAREST;
+ case GL_NEAREST_MIPMAP_LINEAR:
+ return TextureFilter::NEAREST;
+ case GL_NEAREST_MIPMAP_NEAREST:
+ return TextureFilter::NEAREST;
+ case GL_LINEAR:
+ return TextureFilter::LINEAR;
+ case GL_LINEAR_MIPMAP_LINEAR:
+ return TextureFilter::LINEAR;
+ case GL_LINEAR_MIPMAP_NEAREST:
+ return TextureFilter::LINEAR;
+ default:
+ assert(0);
+ return TextureFilter::NEAREST;
+ }
+}
+
+struct Texture {
+ GLenum internal_format = 0;
+ int width = 0;
+ int height = 0;
+ int depth = 0;
+ char* buf = nullptr;
+ size_t buf_size = 0;
+ GLenum min_filter = GL_NEAREST;
+ GLenum mag_filter = GL_LINEAR;
+
+ enum FLAGS {
+ SHOULD_FREE = 1 << 1,
+ };
+ int flags = SHOULD_FREE;
+ bool should_free() const { return bool(flags & SHOULD_FREE); }
+
+ void set_flag(int flag, bool val) {
+ if (val) {
+ flags |= flag;
+ } else {
+ flags &= ~flag;
+ }
+ }
+ void set_should_free(bool val) { set_flag(SHOULD_FREE, val); }
+
+ // Delayed-clearing state. When a clear of an FB is requested, we don't
+ // immediately clear each row, as the rows may be subsequently overwritten
+ // by draw calls, allowing us to skip the work of clearing the affected rows
+ // either fully or partially. Instead, we keep a bit vector of rows that need
+ // to be cleared later and save the value they need to be cleared with so
+ // that we can clear these rows individually when they are touched by draws.
+ // This currently only works for 2D textures, but not on texture arrays.
+ int delay_clear = 0;
+ uint32_t clear_val = 0;
+ uint32_t* cleared_rows = nullptr;
+
+ void enable_delayed_clear(uint32_t val) {
+ delay_clear = height;
+ clear_val = val;
+ if (!cleared_rows) {
+ cleared_rows = new uint32_t[(height + 31) / 32];
+ }
+ memset(cleared_rows, 0, ((height + 31) / 32) * sizeof(uint32_t));
+ if (height & 31) {
+ cleared_rows[height / 32] = ~0U << (height & 31);
+ }
+ }
+
+ void disable_delayed_clear() {
+ if (cleared_rows) {
+ delete[] cleared_rows;
+ cleared_rows = nullptr;
+ delay_clear = 0;
+ }
+ }
+
+ int bpp() const { return bytes_for_internal_format(internal_format); }
+
+ size_t stride(int b = 0, int min_width = 0) const {
+ return aligned_stride((b ? b : bpp()) * max(width, min_width));
+ }
+
+ size_t layer_stride(int b = 0, int min_width = 0, int min_height = 0) const {
+ return stride(b ? b : bpp(), min_width) * max(height, min_height);
+ }
+
+ bool allocate(bool force = false, int min_width = 0, int min_height = 0) {
+ if ((!buf || force) && should_free()) {
+ size_t size = layer_stride(bpp(), min_width, min_height) * max(depth, 1);
+ if (!buf || size > buf_size) {
+ // Allocate with a SIMD register-sized tail of padding at the end so we
+ // can safely read or write past the end of the texture with SIMD ops.
+ char* new_buf = (char*)realloc(buf, size + sizeof(Float));
+ assert(new_buf);
+ if (new_buf) {
+ buf = new_buf;
+ buf_size = size;
+ return true;
+ }
+ cleanup();
+ }
+ }
+ return false;
+ }
+
+ void cleanup() {
+ if (buf && should_free()) {
+ free(buf);
+ buf = nullptr;
+ buf_size = 0;
+ }
+ disable_delayed_clear();
+ }
+
+ ~Texture() { cleanup(); }
+
+ IntRect bounds() const { return IntRect{0, 0, width, height}; }
+
+ // Find the valid sampling bounds relative to the requested region
+ IntRect sample_bounds(const IntRect& req, bool invertY = false) const {
+ IntRect bb = bounds().intersect(req).offset(-req.x0, -req.y0);
+ if (invertY) bb.invert_y(req.height());
+ return bb;
+ }
+
+ // Get a pointer for sampling at the given offset
+ char* sample_ptr(int x, int y, int z, int bpp, size_t stride) const {
+ return buf + (height * z + y) * stride + x * bpp;
+ }
+
+ char* sample_ptr(int x, int y, int z, int bpp) const {
+ return sample_ptr(x, y, z, bpp, stride(bpp));
+ }
+
+ char* sample_ptr(int x, int y, int z) const {
+ return sample_ptr(x, y, z, bpp());
+ }
+
+ // Get a pointer for sampling the requested region and limit to the provided
+ // sampling bounds
+ char* sample_ptr(const IntRect& req, const IntRect& bounds, int z,
+ bool invertY = false) const {
+ // Offset the sample pointer by the clamped bounds
+ int x = req.x0 + bounds.x0;
+ // Invert the Y offset if necessary
+ int y = invertY ? req.y1 - 1 - bounds.y0 : req.y0 + bounds.y0;
+ return sample_ptr(x, y, z);
+ }
+};
+
+#define MAX_ATTRIBS 16
+#define NULL_ATTRIB 15
+struct VertexArray {
+ VertexAttrib attribs[MAX_ATTRIBS];
+ int max_attrib = -1;
+
+ void validate();
+};
+
+struct Shader {
+ GLenum type = 0;
+ ProgramLoader loader = nullptr;
+};
+
+struct Program {
+ ProgramImpl* impl = nullptr;
+ VertexShaderImpl* vert_impl = nullptr;
+ FragmentShaderImpl* frag_impl = nullptr;
+ bool deleted = false;
+
+ ~Program() {
+ delete impl;
+ }
+};
+
+// for GL defines to fully expand
+#define CONCAT_KEY(prefix, x, y, z, w, ...) prefix##x##y##z##w
+#define BLEND_KEY(...) CONCAT_KEY(BLEND_, __VA_ARGS__, 0, 0)
+#define FOR_EACH_BLEND_KEY(macro) \
+ macro(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE) \
+ macro(GL_ONE, GL_ONE_MINUS_SRC_ALPHA, 0, 0) \
+ macro(GL_ZERO, GL_ONE_MINUS_SRC_COLOR, 0, 0) \
+ macro(GL_ZERO, GL_ONE_MINUS_SRC_COLOR, GL_ZERO, GL_ONE) \
+ macro(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA, 0, 0) macro( \
+ GL_ZERO, GL_SRC_COLOR, 0, 0) macro(GL_ONE, GL_ONE, 0, 0) \
+ macro(GL_ONE, GL_ONE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA) \
+ macro(GL_ONE, GL_ZERO, 0, 0) macro( \
+ GL_ONE_MINUS_DST_ALPHA, GL_ONE, GL_ZERO, GL_ONE) \
+ macro(GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_COLOR, \
+ 0, 0) \
+ macro(GL_ONE, GL_ONE_MINUS_SRC1_COLOR, 0, 0)
+
+#define DEFINE_BLEND_KEY(...) BLEND_KEY(__VA_ARGS__),
+enum BlendKey : uint8_t {
+ BLEND_KEY_NONE = 0,
+ FOR_EACH_BLEND_KEY(DEFINE_BLEND_KEY)
+};
+
+const size_t MAX_TEXTURE_UNITS = 16;
+
+template <typename T>
+static inline bool unlink(T& binding, T n) {
+ if (binding == n) {
+ binding = 0;
+ return true;
+ }
+ return false;
+}
+
+template <typename O>
+struct ObjectStore {
+ O** objects = nullptr;
+ size_t size = 0;
+ // reserve object 0 as null
+ size_t first_free = 1;
+ O invalid;
+
+ ~ObjectStore() {
+ if (objects) {
+ for (size_t i = 0; i < size; i++) delete objects[i];
+ free(objects);
+ }
+ }
+
+ bool grow(size_t i) {
+ size_t new_size = size ? size : 8;
+ while (new_size <= i) new_size += new_size / 2;
+ O** new_objects = (O**)realloc(objects, new_size * sizeof(O*));
+ assert(new_objects);
+ if (!new_objects) return false;
+ while (size < new_size) new_objects[size++] = nullptr;
+ objects = new_objects;
+ return true;
+ }
+
+ void insert(size_t i, const O& o) {
+ if (i >= size && !grow(i)) return;
+ if (!objects[i]) objects[i] = new O(o);
+ }
+
+ size_t next_free() {
+ size_t i = first_free;
+ while (i < size && objects[i]) i++;
+ first_free = i;
+ return i;
+ }
+
+ size_t insert(const O& o = O()) {
+ size_t i = next_free();
+ insert(i, o);
+ return i;
+ }
+
+ O& operator[](size_t i) {
+ insert(i, O());
+ return i < size ? *objects[i] : invalid;
+ }
+
+ O* find(size_t i) const { return i < size ? objects[i] : nullptr; }
+
+ template <typename T> void on_erase(T*, ...) {}
+ template <typename T> void on_erase(T* o, decltype(&T::on_erase)) {
+ o->on_erase();
+ }
+
+ bool erase(size_t i) {
+ if (i < size && objects[i]) {
+ on_erase(objects[i], nullptr);
+ delete objects[i];
+ objects[i] = nullptr;
+ if (i < first_free) first_free = i;
+ return true;
+ }
+ return false;
+ }
+
+ O** begin() const { return objects; }
+ O** end() const { return &objects[size]; }
+};
+
+struct Context {
+ ObjectStore<Query> queries;
+ ObjectStore<Buffer> buffers;
+ ObjectStore<Texture> textures;
+ ObjectStore<VertexArray> vertex_arrays;
+ ObjectStore<Framebuffer> framebuffers;
+ ObjectStore<Renderbuffer> renderbuffers;
+ ObjectStore<Shader> shaders;
+ ObjectStore<Program> programs;
+
+ IntRect viewport = {0, 0, 0, 0};
+
+ bool blend = false;
+ GLenum blendfunc_srgb = GL_ONE;
+ GLenum blendfunc_drgb = GL_ZERO;
+ GLenum blendfunc_sa = GL_ONE;
+ GLenum blendfunc_da = GL_ZERO;
+ GLenum blend_equation = GL_FUNC_ADD;
+ V8<uint16_t> blendcolor = 0;
+ BlendKey blend_key = BLEND_KEY_NONE;
+
+ bool depthtest = false;
+ bool depthmask = true;
+ GLenum depthfunc = GL_LESS;
+
+ bool scissortest = false;
+ IntRect scissor = {0, 0, 0, 0};
+
+ uint32_t clearcolor = 0;
+ GLdouble cleardepth = 1;
+
+ int unpack_row_length = 0;
+
+ int shaded_rows = 0;
+ int shaded_pixels = 0;
+
+ struct TextureUnit {
+ GLuint texture_2d_binding = 0;
+ GLuint texture_3d_binding = 0;
+ GLuint texture_2d_array_binding = 0;
+ GLuint texture_rectangle_binding = 0;
+
+ void unlink(GLuint n) {
+ ::unlink(texture_2d_binding, n);
+ ::unlink(texture_3d_binding, n);
+ ::unlink(texture_2d_array_binding, n);
+ ::unlink(texture_rectangle_binding, n);
+ }
+ };
+ TextureUnit texture_units[MAX_TEXTURE_UNITS];
+ int active_texture_unit = 0;
+
+ GLuint current_program = 0;
+
+ GLuint current_vertex_array = 0;
+ bool validate_vertex_array = true;
+
+ GLuint pixel_pack_buffer_binding = 0;
+ GLuint pixel_unpack_buffer_binding = 0;
+ GLuint array_buffer_binding = 0;
+ GLuint element_array_buffer_binding = 0;
+ GLuint time_elapsed_query = 0;
+ GLuint samples_passed_query = 0;
+ GLuint renderbuffer_binding = 0;
+ GLuint draw_framebuffer_binding = 0;
+ GLuint read_framebuffer_binding = 0;
+ GLuint unknown_binding = 0;
+
+ GLuint& get_binding(GLenum name) {
+ switch (name) {
+ case GL_PIXEL_PACK_BUFFER:
+ return pixel_pack_buffer_binding;
+ case GL_PIXEL_UNPACK_BUFFER:
+ return pixel_unpack_buffer_binding;
+ case GL_ARRAY_BUFFER:
+ return array_buffer_binding;
+ case GL_ELEMENT_ARRAY_BUFFER:
+ return element_array_buffer_binding;
+ case GL_TEXTURE_2D:
+ return texture_units[active_texture_unit].texture_2d_binding;
+ case GL_TEXTURE_2D_ARRAY:
+ return texture_units[active_texture_unit].texture_2d_array_binding;
+ case GL_TEXTURE_3D:
+ return texture_units[active_texture_unit].texture_3d_binding;
+ case GL_TEXTURE_RECTANGLE:
+ return texture_units[active_texture_unit].texture_rectangle_binding;
+ case GL_TIME_ELAPSED:
+ return time_elapsed_query;
+ case GL_SAMPLES_PASSED:
+ return samples_passed_query;
+ case GL_RENDERBUFFER:
+ return renderbuffer_binding;
+ case GL_DRAW_FRAMEBUFFER:
+ return draw_framebuffer_binding;
+ case GL_READ_FRAMEBUFFER:
+ return read_framebuffer_binding;
+ default:
+ debugf("unknown binding %x\n", name);
+ assert(false);
+ return unknown_binding;
+ }
+ }
+
+ Texture& get_texture(sampler2D, int unit) {
+ return textures[texture_units[unit].texture_2d_binding];
+ }
+
+ Texture& get_texture(isampler2D, int unit) {
+ return textures[texture_units[unit].texture_2d_binding];
+ }
+
+ Texture& get_texture(sampler2DArray, int unit) {
+ return textures[texture_units[unit].texture_2d_array_binding];
+ }
+
+ Texture& get_texture(sampler2DRect, int unit) {
+ return textures[texture_units[unit].texture_rectangle_binding];
+ }
+
+ IntRect apply_scissor(IntRect bb) const {
+ return scissortest ? bb.intersect(scissor) : bb;
+ }
+};
+static Context* ctx = nullptr;
+static VertexShaderImpl* vertex_shader = nullptr;
+static FragmentShaderImpl* fragment_shader = nullptr;
+static BlendKey blend_key = BLEND_KEY_NONE;
+
+static void prepare_texture(Texture& t, const IntRect* skip = nullptr);
+
+template <typename S>
+static inline void init_depth(S* s, Texture& t) {
+ s->depth = max(t.depth, 1);
+ s->height_stride = s->stride * t.height;
+}
+
+template <typename S>
+static inline void init_filter(S* s, Texture& t) {
+ s->filter = gl_filter_to_texture_filter(t.mag_filter);
+}
+
+template <typename S>
+static inline void init_sampler(S* s, Texture& t) {
+ prepare_texture(t);
+ s->width = t.width;
+ s->height = t.height;
+ int bpp = t.bpp();
+ s->stride = t.stride(bpp);
+ if (bpp >= 4) s->stride /= 4;
+ // Use uint32_t* for easier sampling, but need to cast to uint8_t* for formats
+ // with bpp < 4.
+ s->buf = (uint32_t*)t.buf;
+ s->format = gl_format_to_texture_format(t.internal_format);
+}
+
+template <typename S>
+S* lookup_sampler(S* s, int texture) {
+ Texture& t = ctx->get_texture(s, texture);
+ if (!t.buf) {
+ *s = S();
+ } else {
+ init_sampler(s, t);
+ init_filter(s, t);
+ }
+ return s;
+}
+
+template <typename S>
+S* lookup_isampler(S* s, int texture) {
+ Texture& t = ctx->get_texture(s, texture);
+ if (!t.buf) {
+ *s = S();
+ } else {
+ init_sampler(s, t);
+ }
+ return s;
+}
+
+template <typename S>
+S* lookup_sampler_array(S* s, int texture) {
+ Texture& t = ctx->get_texture(s, texture);
+ if (!t.buf) {
+ *s = S();
+ } else {
+ init_sampler(s, t);
+ init_depth(s, t);
+ init_filter(s, t);
+ }
+ return s;
+}
+
+int bytes_per_type(GLenum type) {
+ switch (type) {
+ case GL_INT:
+ return 4;
+ case GL_FLOAT:
+ return 4;
+ case GL_UNSIGNED_SHORT:
+ return 2;
+ case GL_UNSIGNED_BYTE:
+ return 1;
+ default:
+ assert(0);
+ return 0;
+ }
+}
+
+template <typename S, typename C>
+static inline S expand_attrib(const char* buf, size_t size, bool normalized) {
+ typedef typename ElementType<S>::ty elem_type;
+ S scalar = {0};
+ const C* src = reinterpret_cast<const C*>(buf);
+ if (normalized) {
+ const float scale = 1.0f / ((1 << (8 * sizeof(C))) - 1);
+ for (size_t i = 0; i < size / sizeof(C); i++) {
+ put_nth_component(scalar, i, elem_type(src[i]) * scale);
+ }
+ } else {
+ for (size_t i = 0; i < size / sizeof(C); i++) {
+ put_nth_component(scalar, i, elem_type(src[i]));
+ }
+ }
+ return scalar;
+}
+
+template <typename S>
+static inline S load_attrib_scalar(VertexAttrib& va, const char* src) {
+ if (sizeof(S) <= va.size) {
+ return *reinterpret_cast<const S*>(src);
+ }
+ if (va.type == GL_UNSIGNED_SHORT) {
+ return expand_attrib<S, uint16_t>(src, va.size, va.normalized);
+ }
+ if (va.type == GL_UNSIGNED_BYTE) {
+ return expand_attrib<S, uint8_t>(src, va.size, va.normalized);
+ }
+ assert(sizeof(typename ElementType<S>::ty) == bytes_per_type(va.type));
+ S scalar = {0};
+ memcpy(&scalar, src, va.size);
+ return scalar;
+}
+
+template <typename T>
+void load_attrib(T& attrib, VertexAttrib& va, uint32_t start, int instance,
+ int count) {
+ typedef decltype(force_scalar(attrib)) scalar_type;
+ if (!va.enabled) {
+ attrib = T(scalar_type{0});
+ } else if (va.divisor != 0) {
+ char* src = (char*)va.buf + va.stride * instance + va.offset;
+ assert(src + va.size <= va.buf + va.buf_size);
+ attrib = T(load_attrib_scalar<scalar_type>(va, src));
+ } else {
+ // Specialized for WR's primitive vertex order/winding.
+ // Triangles must be indexed at offsets 0, 1, 2.
+ // Quads must be successive triangles indexed at offsets 0, 1, 2, 2, 1, 3.
+ // Triangle vertexes fill vertex shader SIMD lanes as 0, 1, 2, 2.
+ // Quad vertexes fill vertex shader SIMD lanes as 0, 1, 3, 2, so that the
+ // points form a convex path that can be traversed by the rasterizer.
+ if (!count) return;
+ assert(count == 3 || count == 4);
+ char* src = (char*)va.buf + va.stride * start + va.offset;
+ attrib = (T){
+ load_attrib_scalar<scalar_type>(va, src),
+ load_attrib_scalar<scalar_type>(va, src + va.stride),
+ load_attrib_scalar<scalar_type>(va, src + va.stride * 2 +
+ (count > 3 ? va.stride : 0)),
+ load_attrib_scalar<scalar_type>(va, src + va.stride * 2)
+ };
+ }
+}
+
+template <typename T>
+void load_flat_attrib(T& attrib, VertexAttrib& va, uint32_t start, int instance,
+ int count) {
+ typedef decltype(force_scalar(attrib)) scalar_type;
+ if (!va.enabled) {
+ attrib = T{0};
+ return;
+ }
+ char* src = nullptr;
+ if (va.divisor != 0) {
+ src = (char*)va.buf + va.stride * instance + va.offset;
+ } else {
+ if (!count) return;
+ src = (char*)va.buf + va.stride * start + va.offset;
+ }
+ assert(src + va.size <= va.buf + va.buf_size);
+ attrib = T(load_attrib_scalar<scalar_type>(va, src));
+}
+
+void setup_program(GLuint program) {
+ if (!program) {
+ vertex_shader = nullptr;
+ fragment_shader = nullptr;
+ return;
+ }
+ Program& p = ctx->programs[program];
+ assert(p.impl);
+ assert(p.vert_impl);
+ assert(p.frag_impl);
+ vertex_shader = p.vert_impl;
+ fragment_shader = p.frag_impl;
+}
+
+extern ProgramLoader load_shader(const char* name);
+
+extern "C" {
+
+void UseProgram(GLuint program) {
+ if (ctx->current_program && program != ctx->current_program) {
+ auto* p = ctx->programs.find(ctx->current_program);
+ if (p && p->deleted) {
+ ctx->programs.erase(ctx->current_program);
+ }
+ }
+ ctx->current_program = program;
+ setup_program(program);
+}
+
+void SetViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
+ ctx->viewport = IntRect{x, y, x + width, y + height};
+}
+
+void Enable(GLenum cap) {
+ switch (cap) {
+ case GL_BLEND:
+ ctx->blend = true;
+ blend_key = ctx->blend_key;
+ break;
+ case GL_DEPTH_TEST:
+ ctx->depthtest = true;
+ break;
+ case GL_SCISSOR_TEST:
+ ctx->scissortest = true;
+ break;
+ }
+}
+
+void Disable(GLenum cap) {
+ switch (cap) {
+ case GL_BLEND:
+ ctx->blend = false;
+ blend_key = BLEND_KEY_NONE;
+ break;
+ case GL_DEPTH_TEST:
+ ctx->depthtest = false;
+ break;
+ case GL_SCISSOR_TEST:
+ ctx->scissortest = false;
+ break;
+ }
+}
+
+GLenum GetError() { return GL_NO_ERROR; }
+
+static const char* const extensions[] = {
+ "GL_ARB_blend_func_extended", "GL_ARB_copy_image",
+ "GL_ARB_draw_instanced", "GL_ARB_explicit_attrib_location",
+ "GL_ARB_instanced_arrays", "GL_ARB_invalidate_subdata",
+ "GL_ARB_texture_storage", "GL_EXT_timer_query",
+};
+
+void GetIntegerv(GLenum pname, GLint* params) {
+ assert(params);
+ switch (pname) {
+ case GL_MAX_TEXTURE_UNITS:
+ case GL_MAX_TEXTURE_IMAGE_UNITS:
+ params[0] = MAX_TEXTURE_UNITS;
+ break;
+ case GL_MAX_TEXTURE_SIZE:
+ params[0] = 1 << 15;
+ break;
+ case GL_MAX_ARRAY_TEXTURE_LAYERS:
+ params[0] = 1 << 15;
+ break;
+ case GL_READ_FRAMEBUFFER_BINDING:
+ params[0] = ctx->read_framebuffer_binding;
+ break;
+ case GL_DRAW_FRAMEBUFFER_BINDING:
+ params[0] = ctx->draw_framebuffer_binding;
+ break;
+ case GL_PIXEL_PACK_BUFFER_BINDING:
+ params[0] = ctx->pixel_pack_buffer_binding;
+ break;
+ case GL_PIXEL_UNPACK_BUFFER_BINDING:
+ params[0] = ctx->pixel_unpack_buffer_binding;
+ break;
+ case GL_NUM_EXTENSIONS:
+ params[0] = sizeof(extensions) / sizeof(extensions[0]);
+ break;
+ default:
+ debugf("unhandled glGetIntegerv parameter %x\n", pname);
+ assert(false);
+ }
+}
+
+void GetBooleanv(GLenum pname, GLboolean* params) {
+ assert(params);
+ switch (pname) {
+ case GL_DEPTH_WRITEMASK:
+ params[0] = ctx->depthmask;
+ break;
+ default:
+ debugf("unhandled glGetBooleanv parameter %x\n", pname);
+ assert(false);
+ }
+}
+
+const char* GetString(GLenum name) {
+ switch (name) {
+ case GL_VENDOR:
+ return "Mozilla Gfx";
+ case GL_RENDERER:
+ return "Software WebRender";
+ case GL_VERSION:
+ return "3.2";
+ default:
+ debugf("unhandled glGetString parameter %x\n", name);
+ assert(false);
+ return nullptr;
+ }
+}
+
+const char* GetStringi(GLenum name, GLuint index) {
+ switch (name) {
+ case GL_EXTENSIONS:
+ if (index >= sizeof(extensions) / sizeof(extensions[0])) {
+ return nullptr;
+ }
+ return extensions[index];
+ default:
+ debugf("unhandled glGetStringi parameter %x\n", name);
+ assert(false);
+ return nullptr;
+ }
+}
+
+GLenum remap_blendfunc(GLenum rgb, GLenum a) {
+ switch (a) {
+ case GL_SRC_ALPHA:
+ if (rgb == GL_SRC_COLOR) a = GL_SRC_COLOR;
+ break;
+ case GL_ONE_MINUS_SRC_ALPHA:
+ if (rgb == GL_ONE_MINUS_SRC_COLOR) a = GL_ONE_MINUS_SRC_COLOR;
+ break;
+ case GL_DST_ALPHA:
+ if (rgb == GL_DST_COLOR) a = GL_DST_COLOR;
+ break;
+ case GL_ONE_MINUS_DST_ALPHA:
+ if (rgb == GL_ONE_MINUS_DST_COLOR) a = GL_ONE_MINUS_DST_COLOR;
+ break;
+ case GL_CONSTANT_ALPHA:
+ if (rgb == GL_CONSTANT_COLOR) a = GL_CONSTANT_COLOR;
+ break;
+ case GL_ONE_MINUS_CONSTANT_ALPHA:
+ if (rgb == GL_ONE_MINUS_CONSTANT_COLOR) a = GL_ONE_MINUS_CONSTANT_COLOR;
+ break;
+ case GL_SRC_COLOR:
+ if (rgb == GL_SRC_ALPHA) a = GL_SRC_ALPHA;
+ break;
+ case GL_ONE_MINUS_SRC_COLOR:
+ if (rgb == GL_ONE_MINUS_SRC_ALPHA) a = GL_ONE_MINUS_SRC_ALPHA;
+ break;
+ case GL_DST_COLOR:
+ if (rgb == GL_DST_ALPHA) a = GL_DST_ALPHA;
+ break;
+ case GL_ONE_MINUS_DST_COLOR:
+ if (rgb == GL_ONE_MINUS_DST_ALPHA) a = GL_ONE_MINUS_DST_ALPHA;
+ break;
+ case GL_CONSTANT_COLOR:
+ if (rgb == GL_CONSTANT_ALPHA) a = GL_CONSTANT_ALPHA;
+ break;
+ case GL_ONE_MINUS_CONSTANT_COLOR:
+ if (rgb == GL_ONE_MINUS_CONSTANT_ALPHA) a = GL_ONE_MINUS_CONSTANT_ALPHA;
+ break;
+ case GL_SRC1_ALPHA:
+ if (rgb == GL_SRC1_COLOR) a = GL_SRC1_COLOR;
+ break;
+ case GL_ONE_MINUS_SRC1_ALPHA:
+ if (rgb == GL_ONE_MINUS_SRC1_COLOR) a = GL_ONE_MINUS_SRC1_COLOR;
+ break;
+ case GL_SRC1_COLOR:
+ if (rgb == GL_SRC1_ALPHA) a = GL_SRC1_ALPHA;
+ break;
+ case GL_ONE_MINUS_SRC1_COLOR:
+ if (rgb == GL_ONE_MINUS_SRC1_ALPHA) a = GL_ONE_MINUS_SRC1_ALPHA;
+ break;
+ }
+ return a;
+}
+
+void BlendFunc(GLenum srgb, GLenum drgb, GLenum sa, GLenum da) {
+ ctx->blendfunc_srgb = srgb;
+ ctx->blendfunc_drgb = drgb;
+ sa = remap_blendfunc(srgb, sa);
+ da = remap_blendfunc(drgb, da);
+ ctx->blendfunc_sa = sa;
+ ctx->blendfunc_da = da;
+
+#define HASH_BLEND_KEY(x, y, z, w) ((x << 4) | (y) | (z << 24) | (w << 20))
+ int hash = HASH_BLEND_KEY(srgb, drgb, 0, 0);
+ if (srgb != sa || drgb != da) hash |= HASH_BLEND_KEY(0, 0, sa, da);
+ switch (hash) {
+#define MAP_BLEND_KEY(...) \
+ case HASH_BLEND_KEY(__VA_ARGS__): \
+ ctx->blend_key = BLEND_KEY(__VA_ARGS__); \
+ break;
+ FOR_EACH_BLEND_KEY(MAP_BLEND_KEY)
+ default:
+ debugf("blendfunc: %x, %x, separate: %x, %x\n", srgb, drgb, sa, da);
+ assert(false);
+ break;
+ }
+
+ if (ctx->blend) {
+ blend_key = ctx->blend_key;
+ }
+}
+
+void BlendColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
+ I32 c = round_pixel((Float){b, g, r, a});
+ ctx->blendcolor = CONVERT(c, U16).xyzwxyzw;
+}
+
+void BlendEquation(GLenum mode) {
+ assert(mode == GL_FUNC_ADD);
+ ctx->blend_equation = mode;
+}
+
+void DepthMask(GLboolean flag) { ctx->depthmask = flag; }
+
+void DepthFunc(GLenum func) {
+ switch (func) {
+ case GL_LESS:
+ case GL_LEQUAL:
+ break;
+ default:
+ assert(false);
+ }
+ ctx->depthfunc = func;
+}
+
+void SetScissor(GLint x, GLint y, GLsizei width, GLsizei height) {
+ ctx->scissor = IntRect{x, y, x + width, y + height};
+}
+
+void ClearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
+ I32 c = round_pixel((Float){b, g, r, a});
+ ctx->clearcolor = bit_cast<uint32_t>(CONVERT(c, U8));
+}
+
+void ClearDepth(GLdouble depth) { ctx->cleardepth = depth; }
+
+void ActiveTexture(GLenum texture) {
+ assert(texture >= GL_TEXTURE0);
+ assert(texture < GL_TEXTURE0 + MAX_TEXTURE_UNITS);
+ ctx->active_texture_unit =
+ clamp(int(texture - GL_TEXTURE0), 0, int(MAX_TEXTURE_UNITS - 1));
+}
+
+void GenQueries(GLsizei n, GLuint* result) {
+ for (int i = 0; i < n; i++) {
+ Query q;
+ result[i] = ctx->queries.insert(q);
+ }
+}
+
+void DeleteQuery(GLuint n) {
+ if (n && ctx->queries.erase(n)) {
+ unlink(ctx->time_elapsed_query, n);
+ unlink(ctx->samples_passed_query, n);
+ }
+}
+
+void GenBuffers(int n, GLuint* result) {
+ for (int i = 0; i < n; i++) {
+ Buffer b;
+ result[i] = ctx->buffers.insert(b);
+ }
+}
+
+void DeleteBuffer(GLuint n) {
+ if (n && ctx->buffers.erase(n)) {
+ unlink(ctx->pixel_pack_buffer_binding, n);
+ unlink(ctx->pixel_unpack_buffer_binding, n);
+ unlink(ctx->array_buffer_binding, n);
+ unlink(ctx->element_array_buffer_binding, n);
+ }
+}
+
+void GenVertexArrays(int n, GLuint* result) {
+ for (int i = 0; i < n; i++) {
+ VertexArray v;
+ result[i] = ctx->vertex_arrays.insert(v);
+ }
+}
+
+void DeleteVertexArray(GLuint n) {
+ if (n && ctx->vertex_arrays.erase(n)) {
+ unlink(ctx->current_vertex_array, n);
+ }
+}
+
+GLuint CreateShader(GLenum type) {
+ Shader s;
+ s.type = type;
+ return ctx->shaders.insert(s);
+}
+
+void ShaderSourceByName(GLuint shader, char* name) {
+ Shader& s = ctx->shaders[shader];
+ s.loader = load_shader(name);
+ if (!s.loader) {
+ debugf("unknown shader %s\n", name);
+ }
+}
+
+void AttachShader(GLuint program, GLuint shader) {
+ Program& p = ctx->programs[program];
+ Shader& s = ctx->shaders[shader];
+ if (s.type == GL_VERTEX_SHADER) {
+ if (!p.impl && s.loader) p.impl = s.loader();
+ } else if (s.type == GL_FRAGMENT_SHADER) {
+ if (!p.impl && s.loader) p.impl = s.loader();
+ } else {
+ assert(0);
+ }
+}
+
+void DeleteShader(GLuint n) {
+ if (n) ctx->shaders.erase(n);
+}
+
+GLuint CreateProgram() {
+ Program p;
+ return ctx->programs.insert(p);
+}
+
+void DeleteProgram(GLuint n) {
+ if (!n) return;
+ if (ctx->current_program == n) {
+ if (auto* p = ctx->programs.find(n)) {
+ p->deleted = true;
+ }
+ } else {
+ ctx->programs.erase(n);
+ }
+}
+
+void LinkProgram(GLuint program) {
+ Program& p = ctx->programs[program];
+ assert(p.impl);
+ assert(p.impl->interpolants_size() <= sizeof(Interpolants));
+ if (!p.vert_impl) p.vert_impl = p.impl->get_vertex_shader();
+ if (!p.frag_impl) p.frag_impl = p.impl->get_fragment_shader();
+}
+
+void BindAttribLocation(GLuint program, GLuint index, char* name) {
+ Program& p = ctx->programs[program];
+ assert(p.impl);
+ p.impl->bind_attrib(name, index);
+}
+
+GLint GetAttribLocation(GLuint program, char* name) {
+ Program& p = ctx->programs[program];
+ assert(p.impl);
+ return p.impl->get_attrib(name);
+}
+
+GLint GetUniformLocation(GLuint program, char* name) {
+ Program& p = ctx->programs[program];
+ assert(p.impl);
+ GLint loc = p.impl->get_uniform(name);
+ // debugf("location: %d\n", loc);
+ return loc;
+}
+
+static uint64_t get_time_value() {
+#ifdef __MACH__
+ return mach_absolute_time();
+#elif defined(_WIN32)
+ return uint64_t(clock()) * (1000000000ULL / CLOCKS_PER_SEC);
+#else
+ return ({
+ struct timespec tp;
+ clock_gettime(CLOCK_MONOTONIC, &tp);
+ tp.tv_sec * 1000000000ULL + tp.tv_nsec;
+ });
+#endif
+}
+
+void BeginQuery(GLenum target, GLuint id) {
+ ctx->get_binding(target) = id;
+ Query& q = ctx->queries[id];
+ switch (target) {
+ case GL_SAMPLES_PASSED:
+ q.value = 0;
+ break;
+ case GL_TIME_ELAPSED:
+ q.value = get_time_value();
+ break;
+ default:
+ debugf("unknown query target %x for query %d\n", target, id);
+ assert(false);
+ }
+}
+
+void EndQuery(GLenum target) {
+ Query& q = ctx->queries[ctx->get_binding(target)];
+ switch (target) {
+ case GL_SAMPLES_PASSED:
+ break;
+ case GL_TIME_ELAPSED:
+ q.value = get_time_value() - q.value;
+ break;
+ default:
+ debugf("unknown query target %x\n", target);
+ assert(false);
+ }
+ ctx->get_binding(target) = 0;
+}
+
+void GetQueryObjectui64v(GLuint id, GLenum pname, GLuint64* params) {
+ Query& q = ctx->queries[id];
+ switch (pname) {
+ case GL_QUERY_RESULT:
+ assert(params);
+ params[0] = q.value;
+ break;
+ default:
+ assert(false);
+ }
+}
+
+void BindVertexArray(GLuint vertex_array) {
+ if (vertex_array != ctx->current_vertex_array) {
+ ctx->validate_vertex_array = true;
+ }
+ ctx->current_vertex_array = vertex_array;
+}
+
+void BindTexture(GLenum target, GLuint texture) {
+ ctx->get_binding(target) = texture;
+}
+
+void BindBuffer(GLenum target, GLuint buffer) {
+ ctx->get_binding(target) = buffer;
+}
+
+void BindFramebuffer(GLenum target, GLuint fb) {
+ if (target == GL_FRAMEBUFFER) {
+ ctx->read_framebuffer_binding = fb;
+ ctx->draw_framebuffer_binding = fb;
+ } else {
+ assert(target == GL_READ_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER);
+ ctx->get_binding(target) = fb;
+ }
+}
+
+void BindRenderbuffer(GLenum target, GLuint rb) {
+ ctx->get_binding(target) = rb;
+}
+
+void PixelStorei(GLenum name, GLint param) {
+ if (name == GL_UNPACK_ALIGNMENT) {
+ assert(param == 1);
+ } else if (name == GL_UNPACK_ROW_LENGTH) {
+ ctx->unpack_row_length = param;
+ }
+}
+
+static GLenum remap_internal_format(GLenum format) {
+ switch (format) {
+ case GL_DEPTH_COMPONENT:
+ return GL_DEPTH_COMPONENT16;
+ case GL_RGBA:
+ return GL_RGBA8;
+ case GL_RED:
+ return GL_R8;
+ default:
+ return format;
+ }
+}
+
+void TexStorage3D(GLenum target, GLint levels, GLenum internal_format,
+ GLsizei width, GLsizei height, GLsizei depth) {
+ assert(levels == 1);
+ Texture& t = ctx->textures[ctx->get_binding(target)];
+ internal_format = remap_internal_format(internal_format);
+ bool changed = false;
+ if (t.width != width || t.height != height || t.depth != depth ||
+ t.internal_format != internal_format) {
+ changed = true;
+ t.internal_format = internal_format;
+ t.width = width;
+ t.height = height;
+ t.depth = depth;
+ }
+ t.disable_delayed_clear();
+ t.allocate(changed);
+}
+
+static void set_tex_storage(Texture& t, GLenum internal_format,
+ GLsizei width, GLsizei height,
+ bool should_free = true, void* buf = nullptr,
+ GLsizei min_width = 0, GLsizei min_height = 0) {
+ internal_format = remap_internal_format(internal_format);
+ bool changed = false;
+ if (t.width != width || t.height != height || t.depth != 0 ||
+ t.internal_format != internal_format) {
+ changed = true;
+ t.internal_format = internal_format;
+ t.width = width;
+ t.height = height;
+ t.depth = 0;
+ }
+ if (t.should_free() != should_free || buf != nullptr) {
+ if (t.should_free()) {
+ t.cleanup();
+ }
+ t.set_should_free(should_free);
+ t.buf = (char*)buf;
+ t.buf_size = 0;
+ }
+ t.disable_delayed_clear();
+ t.allocate(changed, min_width, min_height);
+}
+
+void TexStorage2D(GLenum target, GLint levels, GLenum internal_format,
+ GLsizei width, GLsizei height) {
+ assert(levels == 1);
+ Texture& t = ctx->textures[ctx->get_binding(target)];
+ set_tex_storage(t, internal_format, width, height);
+}
+
+GLenum internal_format_for_data(GLenum format, GLenum ty) {
+ if (format == GL_RED && ty == GL_UNSIGNED_BYTE) {
+ return GL_R8;
+ } else if ((format == GL_RGBA || format == GL_BGRA) &&
+ ty == GL_UNSIGNED_BYTE) {
+ return GL_RGBA8;
+ } else if (format == GL_RGBA && ty == GL_FLOAT) {
+ return GL_RGBA32F;
+ } else if (format == GL_RGBA_INTEGER && ty == GL_INT) {
+ return GL_RGBA32I;
+ } else {
+ debugf("unknown internal format for format %x, type %x\n", format, ty);
+ assert(false);
+ return 0;
+ }
+}
+
+static inline void copy_bgra8_to_rgba8(uint32_t* dest, uint32_t* src,
+ int width) {
+ for (; width >= 4; width -= 4, dest += 4, src += 4) {
+ U32 p = unaligned_load<U32>(src);
+ U32 rb = p & 0x00FF00FF;
+ unaligned_store(dest, (p & 0xFF00FF00) | (rb << 16) | (rb >> 16));
+ }
+ for (; width > 0; width--, dest++, src++) {
+ uint32_t p = *src;
+ uint32_t rb = p & 0x00FF00FF;
+ *dest = (p & 0xFF00FF00) | (rb << 16) | (rb >> 16);
+ }
+}
+
+static Buffer* get_pixel_pack_buffer() {
+ return ctx->pixel_pack_buffer_binding
+ ? &ctx->buffers[ctx->pixel_pack_buffer_binding]
+ : nullptr;
+}
+
+static void* get_pixel_pack_buffer_data(void* data) {
+ if (Buffer* b = get_pixel_pack_buffer()) {
+ return b->buf ? b->buf + (size_t)data : nullptr;
+ }
+ return data;
+}
+
+static Buffer* get_pixel_unpack_buffer() {
+ return ctx->pixel_unpack_buffer_binding
+ ? &ctx->buffers[ctx->pixel_unpack_buffer_binding]
+ : nullptr;
+}
+
+static void* get_pixel_unpack_buffer_data(void* data) {
+ if (Buffer* b = get_pixel_unpack_buffer()) {
+ return b->buf ? b->buf + (size_t)data : nullptr;
+ }
+ return data;
+}
+
+void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height, GLenum format, GLenum ty,
+ void* data) {
+ if (level != 0) { assert(false); return; }
+ data = get_pixel_unpack_buffer_data(data);
+ if (!data) return;
+ Texture& t = ctx->textures[ctx->get_binding(target)];
+ IntRect skip = {xoffset, yoffset, xoffset + width, yoffset + height};
+ prepare_texture(t, &skip);
+ assert(xoffset + width <= t.width);
+ assert(yoffset + height <= t.height);
+ assert(ctx->unpack_row_length == 0 || ctx->unpack_row_length >= width);
+ GLsizei row_length =
+ ctx->unpack_row_length != 0 ? ctx->unpack_row_length : width;
+ assert(t.internal_format == internal_format_for_data(format, ty));
+ int bpp = t.bpp();
+ if (!bpp || !t.buf) return;
+ size_t dest_stride = t.stride(bpp);
+ char* dest = t.sample_ptr(xoffset, yoffset, 0, bpp, dest_stride);
+ char* src = (char*)data;
+ for (int y = 0; y < height; y++) {
+ if (t.internal_format == GL_RGBA8 && format != GL_BGRA) {
+ copy_bgra8_to_rgba8((uint32_t*)dest, (uint32_t*)src, width);
+ } else {
+ memcpy(dest, src, width * bpp);
+ }
+ dest += dest_stride;
+ src += row_length * bpp;
+ }
+}
+
+void TexImage2D(GLenum target, GLint level, GLint internal_format,
+ GLsizei width, GLsizei height, GLint border, GLenum format,
+ GLenum ty, void* data) {
+ if (level != 0) { assert(false); return; }
+ assert(border == 0);
+ TexStorage2D(target, 1, internal_format, width, height);
+ TexSubImage2D(target, 0, 0, 0, width, height, format, ty, data);
+}
+
+void TexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum ty, void* data) {
+ if (level != 0) { assert(false); return; }
+ data = get_pixel_unpack_buffer_data(data);
+ if (!data) return;
+ Texture& t = ctx->textures[ctx->get_binding(target)];
+ prepare_texture(t);
+ assert(ctx->unpack_row_length == 0 || ctx->unpack_row_length >= width);
+ GLsizei row_length =
+ ctx->unpack_row_length != 0 ? ctx->unpack_row_length : width;
+ if (format == GL_BGRA) {
+ assert(ty == GL_UNSIGNED_BYTE);
+ assert(t.internal_format == GL_RGBA8);
+ } else {
+ assert(t.internal_format == internal_format_for_data(format, ty));
+ }
+ int bpp = t.bpp();
+ if (!bpp || !t.buf) return;
+ char* src = (char*)data;
+ assert(xoffset + width <= t.width);
+ assert(yoffset + height <= t.height);
+ assert(zoffset + depth <= t.depth);
+ size_t dest_stride = t.stride(bpp);
+ for (int z = 0; z < depth; z++) {
+ char* dest = t.sample_ptr(xoffset, yoffset, zoffset + z, bpp, dest_stride);
+ for (int y = 0; y < height; y++) {
+ if (t.internal_format == GL_RGBA8 && format != GL_BGRA) {
+ copy_bgra8_to_rgba8((uint32_t*)dest, (uint32_t*)src, width);
+ } else {
+ memcpy(dest, src, width * bpp);
+ }
+ dest += dest_stride;
+ src += row_length * bpp;
+ }
+ }
+}
+
+void TexImage3D(GLenum target, GLint level, GLint internal_format,
+ GLsizei width, GLsizei height, GLsizei depth, GLint border,
+ GLenum format, GLenum ty, void* data) {
+ if (level != 0) { assert(false); return; }
+ assert(border == 0);
+ TexStorage3D(target, 1, internal_format, width, height, depth);
+ TexSubImage3D(target, 0, 0, 0, 0, width, height, depth, format, ty, data);
+}
+
+void GenerateMipmap(UNUSED GLenum target) {
+ // TODO: support mipmaps
+}
+
+void TexParameteri(GLenum target, GLenum pname, GLint param) {
+ Texture& t = ctx->textures[ctx->get_binding(target)];
+ switch (pname) {
+ case GL_TEXTURE_WRAP_S:
+ assert(param == GL_CLAMP_TO_EDGE);
+ break;
+ case GL_TEXTURE_WRAP_T:
+ assert(param == GL_CLAMP_TO_EDGE);
+ break;
+ case GL_TEXTURE_MIN_FILTER:
+ t.min_filter = param;
+ break;
+ case GL_TEXTURE_MAG_FILTER:
+ t.mag_filter = param;
+ break;
+ default:
+ break;
+ }
+}
+
+void GenTextures(int n, GLuint* result) {
+ for (int i = 0; i < n; i++) {
+ Texture t;
+ result[i] = ctx->textures.insert(t);
+ }
+}
+
+void DeleteTexture(GLuint n) {
+ if (n && ctx->textures.erase(n)) {
+ for (size_t i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ ctx->texture_units[i].unlink(n);
+ }
+ }
+}
+
+void GenRenderbuffers(int n, GLuint* result) {
+ for (int i = 0; i < n; i++) {
+ Renderbuffer r;
+ result[i] = ctx->renderbuffers.insert(r);
+ }
+}
+
+void Renderbuffer::on_erase() {
+ for (auto* fb : ctx->framebuffers) {
+ if (fb) {
+ if (unlink(fb->color_attachment, texture)) {
+ fb->layer = 0;
+ }
+ unlink(fb->depth_attachment, texture);
+ }
+ }
+ DeleteTexture(texture);
+}
+
+void DeleteRenderbuffer(GLuint n) {
+ if (n && ctx->renderbuffers.erase(n)) {
+ unlink(ctx->renderbuffer_binding, n);
+ }
+}
+
+void GenFramebuffers(int n, GLuint* result) {
+ for (int i = 0; i < n; i++) {
+ Framebuffer f;
+ result[i] = ctx->framebuffers.insert(f);
+ }
+}
+
+void DeleteFramebuffer(GLuint n) {
+ if (n && ctx->framebuffers.erase(n)) {
+ unlink(ctx->read_framebuffer_binding, n);
+ unlink(ctx->draw_framebuffer_binding, n);
+ }
+}
+
+void RenderbufferStorage(GLenum target, GLenum internal_format, GLsizei width,
+ GLsizei height) {
+ // Just refer a renderbuffer to a texture to simplify things for now...
+ Renderbuffer& r = ctx->renderbuffers[ctx->get_binding(target)];
+ if (!r.texture) {
+ GenTextures(1, &r.texture);
+ }
+ switch (internal_format) {
+ case GL_DEPTH_COMPONENT:
+ case GL_DEPTH_COMPONENT24:
+ case GL_DEPTH_COMPONENT32:
+ // Force depth format to 16 bits...
+ internal_format = GL_DEPTH_COMPONENT16;
+ break;
+ }
+ set_tex_storage(ctx->textures[r.texture], internal_format, width, height);
+}
+
+void VertexAttribPointer(GLuint index, GLint size, GLenum type, bool normalized,
+ GLsizei stride, GLuint offset) {
+ // debugf("cva: %d\n", ctx->current_vertex_array);
+ VertexArray& v = ctx->vertex_arrays[ctx->current_vertex_array];
+ if (index >= NULL_ATTRIB) {
+ assert(0);
+ return;
+ }
+ VertexAttrib& va = v.attribs[index];
+ va.size = size * bytes_per_type(type);
+ va.type = type;
+ va.normalized = normalized;
+ va.stride = stride;
+ va.offset = offset;
+ // Buffer &vertex_buf = ctx->buffers[ctx->array_buffer_binding];
+ va.vertex_buffer = ctx->array_buffer_binding;
+ va.vertex_array = ctx->current_vertex_array;
+ ctx->validate_vertex_array = true;
+}
+
+void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride,
+ GLuint offset) {
+ // debugf("cva: %d\n", ctx->current_vertex_array);
+ VertexArray& v = ctx->vertex_arrays[ctx->current_vertex_array];
+ if (index >= NULL_ATTRIB) {
+ assert(0);
+ return;
+ }
+ VertexAttrib& va = v.attribs[index];
+ va.size = size * bytes_per_type(type);
+ va.type = type;
+ va.normalized = false;
+ va.stride = stride;
+ va.offset = offset;
+ // Buffer &vertex_buf = ctx->buffers[ctx->array_buffer_binding];
+ va.vertex_buffer = ctx->array_buffer_binding;
+ va.vertex_array = ctx->current_vertex_array;
+ ctx->validate_vertex_array = true;
+}
+
+void EnableVertexAttribArray(GLuint index) {
+ VertexArray& v = ctx->vertex_arrays[ctx->current_vertex_array];
+ if (index >= NULL_ATTRIB) {
+ assert(0);
+ return;
+ }
+ VertexAttrib& va = v.attribs[index];
+ if (!va.enabled) {
+ ctx->validate_vertex_array = true;
+ }
+ va.enabled = true;
+ v.max_attrib = max(v.max_attrib, (int)index);
+}
+
+void DisableVertexAttribArray(GLuint index) {
+ VertexArray& v = ctx->vertex_arrays[ctx->current_vertex_array];
+ if (index >= NULL_ATTRIB) {
+ assert(0);
+ return;
+ }
+ VertexAttrib& va = v.attribs[index];
+ if (va.enabled) {
+ ctx->validate_vertex_array = true;
+ }
+ va.enabled = false;
+}
+
+void VertexAttribDivisor(GLuint index, GLuint divisor) {
+ VertexArray& v = ctx->vertex_arrays[ctx->current_vertex_array];
+ // Only support divisor being 0 (per-vertex) or 1 (per-instance).
+ if (index >= NULL_ATTRIB || divisor > 1) {
+ assert(0);
+ return;
+ }
+ VertexAttrib& va = v.attribs[index];
+ va.divisor = divisor;
+}
+
+void BufferData(GLenum target, GLsizeiptr size, void* data, UNUSED GLenum usage) {
+ Buffer& b = ctx->buffers[ctx->get_binding(target)];
+ if (b.allocate(size)) {
+ ctx->validate_vertex_array = true;
+ }
+ if (data && b.buf && size <= b.size) {
+ memcpy(b.buf, data, size);
+ }
+}
+
+void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size,
+ void* data) {
+ Buffer& b = ctx->buffers[ctx->get_binding(target)];
+ assert(offset + size <= b.size);
+ if (data && b.buf && offset + size <= b.size) {
+ memcpy(&b.buf[offset], data, size);
+ }
+}
+
+void* MapBuffer(GLenum target, UNUSED GLbitfield access) {
+ Buffer& b = ctx->buffers[ctx->get_binding(target)];
+ return b.buf;
+}
+
+void* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length,
+ UNUSED GLbitfield access) {
+ Buffer& b = ctx->buffers[ctx->get_binding(target)];
+ if (b.buf && offset >= 0 && length > 0 && offset + length <= b.size) {
+ return b.buf + offset;
+ }
+ return nullptr;
+}
+
+GLboolean UnmapBuffer(GLenum target) {
+ Buffer& b = ctx->buffers[ctx->get_binding(target)];
+ return b.buf != nullptr;
+}
+
+void Uniform1i(GLint location, GLint V0) {
+ // debugf("tex: %d\n", (int)ctx->textures.size);
+ vertex_shader->set_uniform_1i(location, V0);
+}
+void Uniform4fv(GLint location, GLsizei count, const GLfloat* v) {
+ assert(count == 1);
+ vertex_shader->set_uniform_4fv(location, v);
+}
+void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat* value) {
+ assert(count == 1);
+ assert(!transpose);
+ vertex_shader->set_uniform_matrix4fv(location, value);
+}
+
+void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget,
+ GLuint texture, GLint level) {
+ assert(target == GL_READ_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER);
+ assert(textarget == GL_TEXTURE_2D || textarget == GL_TEXTURE_RECTANGLE);
+ assert(level == 0);
+ Framebuffer& fb = ctx->framebuffers[ctx->get_binding(target)];
+ if (attachment == GL_COLOR_ATTACHMENT0) {
+ fb.color_attachment = texture;
+ fb.layer = 0;
+ } else if (attachment == GL_DEPTH_ATTACHMENT) {
+ fb.depth_attachment = texture;
+ } else {
+ assert(0);
+ }
+}
+
+void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture,
+ GLint level, GLint layer) {
+ assert(target == GL_READ_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER);
+ assert(level == 0);
+ Framebuffer& fb = ctx->framebuffers[ctx->get_binding(target)];
+ if (attachment == GL_COLOR_ATTACHMENT0) {
+ fb.color_attachment = texture;
+ fb.layer = layer;
+ } else if (attachment == GL_DEPTH_ATTACHMENT) {
+ assert(layer == 0);
+ fb.depth_attachment = texture;
+ } else {
+ assert(0);
+ }
+}
+
+void FramebufferRenderbuffer(GLenum target, GLenum attachment,
+ GLenum renderbuffertarget, GLuint renderbuffer) {
+ assert(target == GL_READ_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER);
+ assert(renderbuffertarget == GL_RENDERBUFFER);
+ Framebuffer& fb = ctx->framebuffers[ctx->get_binding(target)];
+ Renderbuffer& rb = ctx->renderbuffers[renderbuffer];
+ if (attachment == GL_COLOR_ATTACHMENT0) {
+ fb.color_attachment = rb.texture;
+ fb.layer = 0;
+ } else if (attachment == GL_DEPTH_ATTACHMENT) {
+ fb.depth_attachment = rb.texture;
+ } else {
+ assert(0);
+ }
+}
+
+} // extern "C"
+
+static inline Framebuffer* get_framebuffer(GLenum target) {
+ if (target == GL_FRAMEBUFFER) {
+ target = GL_DRAW_FRAMEBUFFER;
+ }
+ return ctx->framebuffers.find(ctx->get_binding(target));
+}
+
+template <typename T>
+static inline void fill_n(T* dst, size_t n, T val) {
+ for (T* end = &dst[n]; dst < end; dst++) *dst = val;
+}
+
+#if USE_SSE2
+template <>
+inline void fill_n<uint32_t>(uint32_t* dst, size_t n, uint32_t val) {
+ __asm__ __volatile__("rep stosl\n"
+ : "+D"(dst), "+c"(n)
+ : "a"(val)
+ : "memory", "cc");
+}
+#endif
+
+static inline uint32_t clear_chunk(uint8_t value) {
+ return uint32_t(value) * 0x01010101U;
+}
+
+static inline uint32_t clear_chunk(uint16_t value) {
+ return uint32_t(value) | (uint32_t(value) << 16);
+}
+
+static inline uint32_t clear_chunk(uint32_t value) {
+ return value;
+}
+
+template <typename T>
+static inline void clear_row(T* buf, size_t len, T value, uint32_t chunk) {
+ const size_t N = sizeof(uint32_t) / sizeof(T);
+ // fill any leading unaligned values
+ if (N > 1) {
+ size_t align = (-(intptr_t)buf & (sizeof(uint32_t) - 1)) / sizeof(T);
+ if (align <= len) {
+ fill_n(buf, align, value);
+ len -= align;
+ buf += align;
+ }
+ }
+ // fill as many aligned chunks as possible
+ fill_n((uint32_t*)buf, len / N, chunk);
+ // fill any remaining values
+ if (N > 1) {
+ fill_n(buf + (len & ~(N - 1)), len & (N - 1), value);
+ }
+}
+
+template <typename T>
+static void clear_buffer(Texture& t, T value, int layer, IntRect bb,
+ int skip_start = 0, int skip_end = 0) {
+ if (!t.buf) return;
+ skip_start = max(skip_start, bb.x0);
+ skip_end = max(skip_end, skip_start);
+ assert(sizeof(T) == t.bpp());
+ size_t stride = t.stride(sizeof(T));
+ // When clearing multiple full-width rows, collapse them into a single
+ // large "row" to avoid redundant setup from clearing each row individually.
+ if (bb.width() == t.width && bb.height() > 1 && skip_start >= skip_end) {
+ bb.x1 += (stride / sizeof(T)) * (bb.height() - 1);
+ bb.y1 = bb.y0 + 1;
+ }
+ T* buf = (T*)t.sample_ptr(bb.x0, bb.y0, layer, sizeof(T), stride);
+ uint32_t chunk = clear_chunk(value);
+ for (int rows = bb.height(); rows > 0; rows--) {
+ if (bb.x0 < skip_start) {
+ clear_row(buf, skip_start - bb.x0, value, chunk);
+ }
+ if (skip_end < bb.x1) {
+ clear_row(buf + (skip_end - bb.x0), bb.x1 - skip_end, value, chunk);
+ }
+ buf += stride / sizeof(T);
+ }
+}
+
+template <typename T>
+static inline void clear_buffer(Texture& t, T value, int layer = 0) {
+ IntRect bb = ctx->apply_scissor(t.bounds());
+ if (bb.width() > 0) {
+ clear_buffer<T>(t, value, layer, bb);
+ }
+}
+
+template <typename T>
+static inline void force_clear_row(Texture& t, int y, int skip_start = 0,
+ int skip_end = 0) {
+ assert(t.buf != nullptr);
+ assert(sizeof(T) == t.bpp());
+ assert(skip_start <= skip_end);
+ T* buf = (T*)t.sample_ptr(0, y, 0, sizeof(T));
+ uint32_t chunk = clear_chunk((T)t.clear_val);
+ if (skip_start > 0) {
+ clear_row<T>(buf, skip_start, t.clear_val, chunk);
+ }
+ if (skip_end < t.width) {
+ clear_row<T>(buf + skip_end, t.width - skip_end, t.clear_val, chunk);
+ }
+}
+
+template <typename T>
+static void force_clear(Texture& t, const IntRect* skip = nullptr) {
+ if (!t.delay_clear || !t.cleared_rows) {
+ return;
+ }
+ int y0 = 0;
+ int y1 = t.height;
+ int skip_start = 0;
+ int skip_end = 0;
+ if (skip) {
+ y0 = clamp(skip->y0, 0, t.height);
+ y1 = clamp(skip->y1, y0, t.height);
+ skip_start = clamp(skip->x0, 0, t.width);
+ skip_end = clamp(skip->x1, skip_start, t.width);
+ if (skip_start <= 0 && skip_end >= t.width && y0 <= 0 && y1 >= t.height) {
+ t.disable_delayed_clear();
+ return;
+ }
+ }
+ int num_masks = (y1 + 31) / 32;
+ uint32_t* rows = t.cleared_rows;
+ for (int i = y0 / 32; i < num_masks; i++) {
+ uint32_t mask = rows[i];
+ if (mask != ~0U) {
+ rows[i] = ~0U;
+ int start = i * 32;
+ while (mask) {
+ int count = __builtin_ctz(mask);
+ if (count > 0) {
+ clear_buffer<T>(t, t.clear_val, 0,
+ IntRect{0, start, t.width, start + count},
+ skip_start, skip_end);
+ t.delay_clear -= count;
+ start += count;
+ mask >>= count;
+ }
+ count = __builtin_ctz(mask + 1);
+ start += count;
+ mask >>= count;
+ }
+ int count = (i + 1) * 32 - start;
+ if (count > 0) {
+ clear_buffer<T>(t, t.clear_val, 0,
+ IntRect{0, start, t.width, start + count},
+ skip_start, skip_end);
+ t.delay_clear -= count;
+ }
+ }
+ }
+ if (t.delay_clear <= 0) t.disable_delayed_clear();
+}
+
+static void prepare_texture(Texture& t, const IntRect* skip) {
+ if (t.delay_clear) {
+ switch (t.internal_format) {
+ case GL_RGBA8:
+ force_clear<uint32_t>(t, skip);
+ break;
+ case GL_R8:
+ force_clear<uint8_t>(t, skip);
+ break;
+ case GL_DEPTH_COMPONENT16:
+ force_clear<uint16_t>(t, skip);
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ }
+}
+
+extern "C" {
+
+void InitDefaultFramebuffer(int width, int height) {
+ Framebuffer& fb = ctx->framebuffers[0];
+ if (!fb.color_attachment) {
+ GenTextures(1, &fb.color_attachment);
+ fb.layer = 0;
+ }
+ Texture& colortex = ctx->textures[fb.color_attachment];
+ if (colortex.width != width || colortex.height != height) {
+ colortex.cleanup();
+ set_tex_storage(colortex, GL_RGBA8, width, height);
+ }
+ if (!fb.depth_attachment) {
+ GenTextures(1, &fb.depth_attachment);
+ }
+ Texture& depthtex = ctx->textures[fb.depth_attachment];
+ if (depthtex.width != width || depthtex.height != height) {
+ depthtex.cleanup();
+ set_tex_storage(depthtex, GL_DEPTH_COMPONENT16, width, height);
+ }
+}
+
+void* GetColorBuffer(GLuint fbo, GLboolean flush, int32_t* width,
+ int32_t* height) {
+ Framebuffer* fb = ctx->framebuffers.find(fbo);
+ if (!fb || !fb->color_attachment) {
+ return nullptr;
+ }
+ Texture& colortex = ctx->textures[fb->color_attachment];
+ if (flush) {
+ prepare_texture(colortex);
+ }
+ *width = colortex.width;
+ *height = colortex.height;
+ return colortex.buf ? colortex.sample_ptr(0, 0, fb->layer) : nullptr;
+}
+
+void SetTextureBuffer(GLuint texid, GLenum internal_format, GLsizei width,
+ GLsizei height, void* buf, GLsizei min_width,
+ GLsizei min_height) {
+ Texture& t = ctx->textures[texid];
+ set_tex_storage(t, internal_format, width, height, !buf, buf, min_width,
+ min_height);
+}
+
+GLenum CheckFramebufferStatus(GLenum target) {
+ Framebuffer* fb = get_framebuffer(target);
+ if (!fb || !fb->color_attachment) {
+ return GL_FRAMEBUFFER_UNSUPPORTED;
+ }
+ return GL_FRAMEBUFFER_COMPLETE;
+}
+
+static inline bool clear_requires_scissor(Texture& t) {
+ return ctx->scissortest && !ctx->scissor.contains(t.bounds());
+}
+
+void Clear(GLbitfield mask) {
+ Framebuffer& fb = *get_framebuffer(GL_DRAW_FRAMEBUFFER);
+ if ((mask & GL_COLOR_BUFFER_BIT) && fb.color_attachment) {
+ Texture& t = ctx->textures[fb.color_attachment];
+ if (t.internal_format == GL_RGBA8) {
+ uint32_t color = ctx->clearcolor;
+ // If the clear would require a scissor, force clear anything outside
+ // the scissor, and then immediately clear anything inside the scissor.
+ if (clear_requires_scissor(t)) {
+ force_clear<uint32_t>(t, &ctx->scissor);
+ clear_buffer<uint32_t>(t, color, fb.layer);
+ } else if (t.depth > 1) {
+ // Delayed clear is not supported on texture arrays.
+ t.disable_delayed_clear();
+ clear_buffer<uint32_t>(t, color, fb.layer);
+ } else {
+ // Do delayed clear for 2D texture without scissor.
+ t.enable_delayed_clear(color);
+ }
+ } else if (t.internal_format == GL_R8) {
+ uint8_t color = uint8_t((ctx->clearcolor >> 16) & 0xFF);
+ if (clear_requires_scissor(t)) {
+ force_clear<uint8_t>(t, &ctx->scissor);
+ clear_buffer<uint8_t>(t, color, fb.layer);
+ } else if (t.depth > 1) {
+ t.disable_delayed_clear();
+ clear_buffer<uint8_t>(t, color, fb.layer);
+ } else {
+ t.enable_delayed_clear(color);
+ }
+ } else {
+ assert(false);
+ }
+ }
+ if ((mask & GL_DEPTH_BUFFER_BIT) && fb.depth_attachment) {
+ Texture& t = ctx->textures[fb.depth_attachment];
+ assert(t.internal_format == GL_DEPTH_COMPONENT16);
+ uint16_t depth = uint16_t(0xFFFF * ctx->cleardepth) - 0x8000;
+ if (clear_requires_scissor(t)) {
+ force_clear<uint16_t>(t, &ctx->scissor);
+ clear_buffer<uint16_t>(t, depth);
+ } else {
+ t.enable_delayed_clear(depth);
+ }
+ }
+}
+
+void InvalidateFramebuffer(GLenum target, GLsizei num_attachments,
+ const GLenum* attachments) {
+ Framebuffer* fb = get_framebuffer(target);
+ if (!fb || num_attachments <= 0 || !attachments) {
+ return;
+ }
+ for (GLsizei i = 0; i < num_attachments; i++) {
+ switch (attachments[i]) {
+ case GL_DEPTH_ATTACHMENT: {
+ Texture& t = ctx->textures[fb->depth_attachment];
+ t.disable_delayed_clear();
+ break;
+ }
+ case GL_COLOR_ATTACHMENT0: {
+ Texture& t = ctx->textures[fb->color_attachment];
+ t.disable_delayed_clear();
+ break;
+ }
+ }
+ }
+}
+
+void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format,
+ GLenum type, void* data) {
+ data = get_pixel_pack_buffer_data(data);
+ if (!data) return;
+ Framebuffer* fb = get_framebuffer(GL_READ_FRAMEBUFFER);
+ if (!fb) return;
+ assert(format == GL_RED || format == GL_RGBA || format == GL_RGBA_INTEGER ||
+ format == GL_BGRA);
+ Texture& t = ctx->textures[fb->color_attachment];
+ if (!t.buf) return;
+ prepare_texture(t);
+ // debugf("read pixels %d, %d, %d, %d from fb %d with format %x\n", x, y,
+ // width, height, ctx->read_framebuffer_binding, t.internal_format);
+ assert(x + width <= t.width);
+ assert(y + height <= t.height);
+ if (internal_format_for_data(format, type) != t.internal_format) {
+ debugf("mismatched format for read pixels: %x vs %x\n", t.internal_format,
+ internal_format_for_data(format, type));
+ assert(false);
+ }
+ int bpp = t.bpp();
+ char* dest = (char*)data;
+ size_t src_stride = t.stride(bpp);
+ char* src = t.sample_ptr(x, y, fb->layer, bpp, src_stride);
+ for (; height > 0; height--) {
+ if (t.internal_format == GL_RGBA8 && format != GL_BGRA) {
+ copy_bgra8_to_rgba8((uint32_t*)dest, (uint32_t*)src, width);
+ } else {
+ memcpy(dest, src, width * bpp);
+ }
+ dest += width * bpp;
+ src += src_stride;
+ }
+}
+
+void CopyImageSubData(GLuint srcName, GLenum srcTarget, UNUSED GLint srcLevel,
+ GLint srcX, GLint srcY, GLint srcZ, GLuint dstName,
+ GLenum dstTarget, UNUSED GLint dstLevel, GLint dstX, GLint dstY,
+ GLint dstZ, GLsizei srcWidth, GLsizei srcHeight,
+ GLsizei srcDepth) {
+ assert(srcLevel == 0 && dstLevel == 0);
+ if (srcTarget == GL_RENDERBUFFER) {
+ Renderbuffer& rb = ctx->renderbuffers[srcName];
+ srcName = rb.texture;
+ }
+ if (dstTarget == GL_RENDERBUFFER) {
+ Renderbuffer& rb = ctx->renderbuffers[dstName];
+ dstName = rb.texture;
+ }
+ Texture& srctex = ctx->textures[srcName];
+ if (!srctex.buf) return;
+ prepare_texture(srctex);
+ Texture& dsttex = ctx->textures[dstName];
+ if (!dsttex.buf) return;
+ IntRect skip = {dstX, dstY, dstX + srcWidth, dstY + srcHeight};
+ prepare_texture(dsttex, &skip);
+ assert(srctex.internal_format == dsttex.internal_format);
+ assert(srcWidth >= 0);
+ assert(srcHeight >= 0);
+ assert(srcDepth >= 0);
+ assert(srcX + srcWidth <= srctex.width);
+ assert(srcY + srcHeight <= srctex.height);
+ assert(srcZ + srcDepth <= max(srctex.depth, 1));
+ assert(dstX + srcWidth <= dsttex.width);
+ assert(dstY + srcHeight <= dsttex.height);
+ assert(dstZ + srcDepth <= max(dsttex.depth, 1));
+ int bpp = srctex.bpp();
+ int src_stride = srctex.stride(bpp);
+ int dest_stride = dsttex.stride(bpp);
+ for (int z = 0; z < srcDepth; z++) {
+ char* dest = dsttex.sample_ptr(dstX, dstY, dstZ + z, bpp, dest_stride);
+ char* src = srctex.sample_ptr(srcX, srcY, srcZ + z, bpp, src_stride);
+ for (int y = 0; y < srcHeight; y++) {
+ memcpy(dest, src, srcWidth * bpp);
+ dest += dest_stride;
+ src += src_stride;
+ }
+ }
+}
+
+void CopyTexSubImage3D(GLenum target, UNUSED GLint level, GLint xoffset, GLint yoffset,
+ GLint zoffset, GLint x, GLint y, GLsizei width,
+ GLsizei height) {
+ assert(level == 0);
+ Framebuffer* fb = get_framebuffer(GL_READ_FRAMEBUFFER);
+ if (!fb) return;
+ CopyImageSubData(fb->color_attachment, GL_TEXTURE_3D, 0, x, y, fb->layer,
+ ctx->get_binding(target), GL_TEXTURE_3D, 0, xoffset, yoffset,
+ zoffset, width, height, 1);
+}
+
+void CopyTexSubImage2D(GLenum target, UNUSED GLint level, GLint xoffset, GLint yoffset,
+ GLint x, GLint y, GLsizei width, GLsizei height) {
+ assert(level == 0);
+ Framebuffer* fb = get_framebuffer(GL_READ_FRAMEBUFFER);
+ if (!fb) return;
+ CopyImageSubData(fb->color_attachment, GL_TEXTURE_2D_ARRAY, 0, x, y,
+ fb->layer, ctx->get_binding(target), GL_TEXTURE_2D_ARRAY, 0,
+ xoffset, yoffset, 0, width, height, 1);
+}
+
+} // extern "C"
+
+using PackedRGBA8 = V16<uint8_t>;
+using WideRGBA8 = V16<uint16_t>;
+using HalfRGBA8 = V8<uint16_t>;
+
+static inline WideRGBA8 unpack(PackedRGBA8 p) { return CONVERT(p, WideRGBA8); }
+
+static inline PackedRGBA8 pack(WideRGBA8 p) {
+#if USE_SSE2
+ return _mm_packus_epi16(lowHalf(p), highHalf(p));
+#elif USE_NEON
+ return vcombine_u8(vqmovn_u16(lowHalf(p)), vqmovn_u16(highHalf(p)));
+#else
+ return CONVERT(p, PackedRGBA8);
+#endif
+}
+
+static inline HalfRGBA8 packRGBA8(I32 a, I32 b) {
+#if USE_SSE2
+ return _mm_packs_epi32(a, b);
+#elif USE_NEON
+ return vcombine_u16(vqmovun_s32(a), vqmovun_s32(b));
+#else
+ return CONVERT(combine(a, b), HalfRGBA8);
+#endif
+}
+
+using PackedR8 = V4<uint8_t>;
+using WideR8 = V4<uint16_t>;
+
+static inline WideR8 unpack(PackedR8 p) { return CONVERT(p, WideR8); }
+
+static inline WideR8 packR8(I32 a) {
+#if USE_SSE2
+ return lowHalf(bit_cast<V8<uint16_t>>(_mm_packs_epi32(a, a)));
+#elif USE_NEON
+ return vqmovun_s32(a);
+#else
+ return CONVERT(a, WideR8);
+#endif
+}
+
+static inline PackedR8 pack(WideR8 p) {
+#if USE_SSE2
+ auto m = expand(p);
+ auto r = bit_cast<V16<uint8_t>>(_mm_packus_epi16(m, m));
+ return SHUFFLE(r, r, 0, 1, 2, 3);
+#elif USE_NEON
+ return lowHalf(bit_cast<V8<uint8_t>>(vqmovn_u16(expand(p))));
+#else
+ return CONVERT(p, PackedR8);
+#endif
+}
+
+using ZMask4 = V4<int16_t>;
+using ZMask8 = V8<int16_t>;
+
+static inline PackedRGBA8 unpack(ZMask4 mask, uint32_t*) {
+ return bit_cast<PackedRGBA8>(mask.xxyyzzww);
+}
+
+static inline WideR8 unpack(ZMask4 mask, uint8_t*) {
+ return bit_cast<WideR8>(mask);
+}
+
+#if USE_SSE2
+# define ZMASK_NONE_PASSED 0xFFFF
+# define ZMASK_ALL_PASSED 0
+static inline uint32_t zmask_code(ZMask8 mask) {
+ return _mm_movemask_epi8(mask);
+}
+static inline uint32_t zmask_code(ZMask4 mask) {
+ return zmask_code(mask.xyzwxyzw);
+}
+#else
+using ZMask4Code = V4<uint8_t>;
+using ZMask8Code = V8<uint8_t>;
+# define ZMASK_NONE_PASSED 0xFFFFFFFFU
+# define ZMASK_ALL_PASSED 0
+static inline uint32_t zmask_code(ZMask4 mask) {
+ return bit_cast<uint32_t>(CONVERT(mask, ZMask4Code));
+}
+static inline uint32_t zmask_code(ZMask8 mask) {
+ return zmask_code(
+ ZMask4((U16(lowHalf(mask)) >> 12) | (U16(highHalf(mask)) << 4)));
+}
+#endif
+
+template <int FUNC, bool MASK>
+static ALWAYS_INLINE int check_depth8(uint16_t z, uint16_t* zbuf,
+ ZMask8& outmask) {
+ ZMask8 dest = unaligned_load<ZMask8>(zbuf);
+ ZMask8 src = int16_t(z);
+ // Invert the depth test to check which pixels failed and should be discarded.
+ ZMask8 mask = FUNC == GL_LEQUAL ?
+ // GL_LEQUAL: Not(LessEqual) = Greater
+ ZMask8(src > dest)
+ :
+ // GL_LESS: Not(Less) = GreaterEqual
+ ZMask8(src >= dest);
+ switch (zmask_code(mask)) {
+ case ZMASK_NONE_PASSED:
+ return 0;
+ case ZMASK_ALL_PASSED:
+ if (MASK) {
+ unaligned_store(zbuf, src);
+ }
+ return -1;
+ default:
+ if (MASK) {
+ unaligned_store(zbuf, (mask & dest) | (~mask & src));
+ }
+ outmask = mask;
+ return 1;
+ }
+}
+
+template <bool FULL_SPANS, bool DISCARD>
+static ALWAYS_INLINE bool check_depth4(ZMask4 src, uint16_t* zbuf,
+ ZMask4& outmask, int span = 0) {
+ ZMask4 dest = unaligned_load<ZMask4>(zbuf);
+ // Invert the depth test to check which pixels failed and should be discarded.
+ ZMask4 mask = ctx->depthfunc == GL_LEQUAL
+ ?
+ // GL_LEQUAL: Not(LessEqual) = Greater
+ ZMask4(src > dest)
+ :
+ // GL_LESS: Not(Less) = GreaterEqual
+ ZMask4(src >= dest);
+ if (!FULL_SPANS) {
+ mask |= ZMask4(span) < ZMask4{1, 2, 3, 4};
+ }
+ if (zmask_code(mask) == ZMASK_NONE_PASSED) {
+ return false;
+ }
+ if (!DISCARD && ctx->depthmask) {
+ unaligned_store(zbuf, (mask & dest) | (~mask & src));
+ }
+ outmask = mask;
+ return true;
+}
+
+template <bool FULL_SPANS, bool DISCARD>
+static ALWAYS_INLINE bool check_depth4(uint16_t z, uint16_t* zbuf,
+ ZMask4& outmask, int span = 0) {
+ return check_depth4<FULL_SPANS, DISCARD>(ZMask4(int16_t(z)), zbuf, outmask,
+ span);
+}
+
+template <typename T>
+static inline ZMask4 packZMask4(T a) {
+#if USE_SSE2
+ return lowHalf(bit_cast<ZMask8>(_mm_packs_epi32(a, a)));
+#elif USE_NEON
+ return vqmovn_s32(a);
+#else
+ return CONVERT(a, ZMask4);
+#endif
+}
+
+static ALWAYS_INLINE ZMask4 packDepth() {
+ return packZMask4(cast(fragment_shader->gl_FragCoord.z * 0xFFFF) - 0x8000);
+}
+
+static ALWAYS_INLINE void discard_depth(ZMask4 src, uint16_t* zbuf,
+ ZMask4 mask) {
+ if (ctx->depthmask) {
+ ZMask4 dest = unaligned_load<ZMask4>(zbuf);
+ mask |= packZMask4(fragment_shader->isPixelDiscarded);
+ unaligned_store(zbuf, (mask & dest) | (~mask & src));
+ }
+}
+
+static ALWAYS_INLINE void discard_depth(uint16_t z, uint16_t* zbuf,
+ ZMask4 mask) {
+ discard_depth(ZMask4(int16_t(z)), zbuf, mask);
+}
+
+static inline WideRGBA8 pack_pixels_RGBA8(const vec4& v) {
+ ivec4 i = round_pixel(v);
+ HalfRGBA8 xz = packRGBA8(i.z, i.x);
+ HalfRGBA8 yw = packRGBA8(i.y, i.w);
+ HalfRGBA8 xy = zipLow(xz, yw);
+ HalfRGBA8 zw = zipHigh(xz, yw);
+ HalfRGBA8 lo = zip2Low(xy, zw);
+ HalfRGBA8 hi = zip2High(xy, zw);
+ return combine(lo, hi);
+}
+
+static inline WideRGBA8 pack_pixels_RGBA8(const vec4_scalar& v) {
+ I32 i = round_pixel((Float){v.z, v.y, v.x, v.w});
+ HalfRGBA8 c = packRGBA8(i, i);
+ return combine(c, c);
+}
+
+static inline WideRGBA8 pack_pixels_RGBA8() {
+ return pack_pixels_RGBA8(fragment_shader->gl_FragColor);
+}
+
+template <typename V>
+static inline PackedRGBA8 pack_span(uint32_t*, const V& v) {
+ return pack(pack_pixels_RGBA8(v));
+}
+
+static inline PackedRGBA8 pack_span(uint32_t*) {
+ return pack(pack_pixels_RGBA8());
+}
+
+// (x*y + x) >> 8, cheap approximation of (x*y) / 255
+template <typename T>
+static inline T muldiv255(T x, T y) {
+ return (x * y + x) >> 8;
+}
+
+// Byte-wise addition for when x or y is a signed 8-bit value stored in the
+// low byte of a larger type T only with zeroed-out high bits, where T is
+// greater than 8 bits, i.e. uint16_t. This can result when muldiv255 is used
+// upon signed operands, using up all the precision in a 16 bit integer, and
+// potentially losing the sign bit in the last >> 8 shift. Due to the
+// properties of two's complement arithmetic, even though we've discarded the
+// sign bit, we can still represent a negative number under addition (without
+// requiring any extra sign bits), just that any negative number will behave
+// like a large unsigned number under addition, generating a single carry bit
+// on overflow that we need to discard. Thus, just doing a byte-wise add will
+// overflow without the troublesome carry, giving us only the remaining 8 low
+// bits we actually need while keeping the high bits at zero.
+template <typename T>
+static inline T addlow(T x, T y) {
+ typedef VectorType<uint8_t, sizeof(T)> bytes;
+ return bit_cast<T>(bit_cast<bytes>(x) + bit_cast<bytes>(y));
+}
+
+static inline WideRGBA8 alphas(WideRGBA8 c) {
+ return SHUFFLE(c, c, 3, 3, 3, 3, 7, 7, 7, 7, 11, 11, 11, 11, 15, 15, 15, 15);
+}
+
+static inline WideRGBA8 blend_pixels_RGBA8(PackedRGBA8 pdst, WideRGBA8 src) {
+ WideRGBA8 dst = unpack(pdst);
+ const WideRGBA8 RGB_MASK = {0xFFFF, 0xFFFF, 0xFFFF, 0, 0xFFFF, 0xFFFF,
+ 0xFFFF, 0, 0xFFFF, 0xFFFF, 0xFFFF, 0,
+ 0xFFFF, 0xFFFF, 0xFFFF, 0};
+ const WideRGBA8 ALPHA_MASK = {0, 0, 0, 0xFFFF, 0, 0, 0, 0xFFFF,
+ 0, 0, 0, 0xFFFF, 0, 0, 0, 0xFFFF};
+ const WideRGBA8 ALPHA_OPAQUE = {0, 0, 0, 255, 0, 0, 0, 255,
+ 0, 0, 0, 255, 0, 0, 0, 255};
+ switch (blend_key) {
+ case BLEND_KEY_NONE:
+ return src;
+ case BLEND_KEY(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE):
+ // dst + src.a*(src.rgb1 - dst.rgb0)
+ // use addlow for signed overflow
+ return addlow(dst,
+ muldiv255(alphas(src), (src | ALPHA_OPAQUE) - (dst & RGB_MASK)));
+ case BLEND_KEY(GL_ONE, GL_ONE_MINUS_SRC_ALPHA):
+ return src + dst - muldiv255(dst, alphas(src));
+ case BLEND_KEY(GL_ZERO, GL_ONE_MINUS_SRC_COLOR):
+ return dst - muldiv255(dst, src);
+ case BLEND_KEY(GL_ZERO, GL_ONE_MINUS_SRC_COLOR, GL_ZERO, GL_ONE):
+ return dst - (muldiv255(dst, src) & RGB_MASK);
+ case BLEND_KEY(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA):
+ return dst - muldiv255(dst, alphas(src));
+ case BLEND_KEY(GL_ZERO, GL_SRC_COLOR):
+ return muldiv255(src, dst);
+ case BLEND_KEY(GL_ONE, GL_ONE):
+ return src + dst;
+ case BLEND_KEY(GL_ONE, GL_ONE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA):
+ return src + dst - (muldiv255(dst, src) & ALPHA_MASK);
+ case BLEND_KEY(GL_ONE, GL_ZERO):
+ return src;
+ case BLEND_KEY(GL_ONE_MINUS_DST_ALPHA, GL_ONE, GL_ZERO, GL_ONE):
+ // src*(1-dst.a) + dst*1 = src - src*dst.a + dst
+ return dst + ((src - muldiv255(src, alphas(dst))) & RGB_MASK);
+ case BLEND_KEY(GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_COLOR):
+ // src*k + (1-src)*dst = src*k + dst - src*dst = dst + src*(k - dst)
+ // use addlow for signed overflow
+ return addlow(dst,
+ muldiv255(src, combine(ctx->blendcolor, ctx->blendcolor) - dst));
+ case BLEND_KEY(GL_ONE, GL_ONE_MINUS_SRC1_COLOR): {
+ WideRGBA8 secondary =
+ pack_pixels_RGBA8(fragment_shader->gl_SecondaryFragColor);
+ return src + dst - muldiv255(dst, secondary);
+ }
+ default:
+ UNREACHABLE;
+ // return src;
+ }
+}
+
+template <bool DISCARD>
+static inline void discard_output(uint32_t* buf, PackedRGBA8 mask) {
+ PackedRGBA8 dst = unaligned_load<PackedRGBA8>(buf);
+ WideRGBA8 r = pack_pixels_RGBA8();
+ if (blend_key) r = blend_pixels_RGBA8(dst, r);
+ if (DISCARD) mask |= bit_cast<PackedRGBA8>(fragment_shader->isPixelDiscarded);
+ unaligned_store(buf, (mask & dst) | (~mask & pack(r)));
+}
+
+template <bool DISCARD>
+static inline void discard_output(uint32_t* buf) {
+ discard_output<DISCARD>(buf, 0);
+}
+
+template <>
+inline void discard_output<false>(uint32_t* buf) {
+ WideRGBA8 r = pack_pixels_RGBA8();
+ if (blend_key) r = blend_pixels_RGBA8(unaligned_load<PackedRGBA8>(buf), r);
+ unaligned_store(buf, pack(r));
+}
+
+static inline PackedRGBA8 span_mask_RGBA8(int span) {
+ return bit_cast<PackedRGBA8>(I32(span) < I32{1, 2, 3, 4});
+}
+
+static inline PackedRGBA8 span_mask(uint32_t*, int span) {
+ return span_mask_RGBA8(span);
+}
+
+static inline WideR8 pack_pixels_R8(Float c) {
+ return packR8(round_pixel(c));
+}
+
+static inline WideR8 pack_pixels_R8() {
+ return pack_pixels_R8(fragment_shader->gl_FragColor.x);
+}
+
+template <typename C>
+static inline PackedR8 pack_span(uint8_t*, C c) {
+ return pack(pack_pixels_R8(c));
+}
+
+static inline PackedR8 pack_span(uint8_t*) { return pack(pack_pixels_R8()); }
+
+static inline WideR8 blend_pixels_R8(WideR8 dst, WideR8 src) {
+ switch (blend_key) {
+ case BLEND_KEY_NONE:
+ return src;
+ case BLEND_KEY(GL_ZERO, GL_SRC_COLOR):
+ return muldiv255(src, dst);
+ case BLEND_KEY(GL_ONE, GL_ONE):
+ return src + dst;
+ case BLEND_KEY(GL_ONE, GL_ZERO):
+ return src;
+ default:
+ UNREACHABLE;
+ // return src;
+ }
+}
+
+template <bool DISCARD>
+static inline void discard_output(uint8_t* buf, WideR8 mask) {
+ WideR8 dst = unpack(unaligned_load<PackedR8>(buf));
+ WideR8 r = pack_pixels_R8();
+ if (blend_key) r = blend_pixels_R8(dst, r);
+ if (DISCARD) mask |= packR8(fragment_shader->isPixelDiscarded);
+ unaligned_store(buf, pack((mask & dst) | (~mask & r)));
+}
+
+template <bool DISCARD>
+static inline void discard_output(uint8_t* buf) {
+ discard_output<DISCARD>(buf, 0);
+}
+
+template <>
+inline void discard_output<false>(uint8_t* buf) {
+ WideR8 r = pack_pixels_R8();
+ if (blend_key) r = blend_pixels_R8(unpack(unaligned_load<PackedR8>(buf)), r);
+ unaligned_store(buf, pack(r));
+}
+
+static inline WideR8 span_mask_R8(int span) {
+ return bit_cast<WideR8>(WideR8(span) < WideR8{1, 2, 3, 4});
+}
+
+static inline WideR8 span_mask(uint8_t*, int span) {
+ return span_mask_R8(span);
+}
+
+template <bool DISCARD, bool W, typename P, typename M>
+static inline void commit_output(P* buf, M mask) {
+ fragment_shader->run<W>();
+ discard_output<DISCARD>(buf, mask);
+}
+
+template <bool DISCARD, bool W, typename P>
+static inline void commit_output(P* buf) {
+ fragment_shader->run<W>();
+ discard_output<DISCARD>(buf);
+}
+
+template <bool DISCARD, bool W, typename P>
+static inline void commit_output(P* buf, int span) {
+ commit_output<DISCARD, W>(buf, span_mask(buf, span));
+}
+
+template <bool DISCARD, bool W, typename P, typename Z>
+static inline void commit_output(P* buf, Z z, uint16_t* zbuf) {
+ ZMask4 zmask;
+ if (check_depth4<true, DISCARD>(z, zbuf, zmask)) {
+ commit_output<DISCARD, W>(buf, unpack(zmask, buf));
+ if (DISCARD) {
+ discard_depth(z, zbuf, zmask);
+ }
+ } else {
+ fragment_shader->skip<W>();
+ }
+}
+
+template <bool DISCARD, bool W, typename P, typename Z>
+static inline void commit_output(P* buf, Z z, uint16_t* zbuf, int span) {
+ ZMask4 zmask;
+ if (check_depth4<false, DISCARD>(z, zbuf, zmask, span)) {
+ commit_output<DISCARD, W>(buf, unpack(zmask, buf));
+ if (DISCARD) {
+ discard_depth(z, zbuf, zmask);
+ }
+ }
+}
+
+static inline void commit_span(uint32_t* buf, PackedRGBA8 r) {
+ if (blend_key)
+ r = pack(blend_pixels_RGBA8(unaligned_load<PackedRGBA8>(buf), unpack(r)));
+ unaligned_store(buf, r);
+}
+
+UNUSED static inline void commit_solid_span(uint32_t* buf, PackedRGBA8 r,
+ int len) {
+ if (blend_key) {
+ auto src = unpack(r);
+ for (uint32_t* end = &buf[len]; buf < end; buf += 4) {
+ unaligned_store(
+ buf, pack(blend_pixels_RGBA8(unaligned_load<PackedRGBA8>(buf), src)));
+ }
+ } else {
+ fill_n(buf, len, bit_cast<U32>(r).x);
+ }
+}
+
+UNUSED static inline void commit_texture_span(uint32_t* buf, uint32_t* src,
+ int len) {
+ if (blend_key) {
+ for (uint32_t* end = &buf[len]; buf < end; buf += 4, src += 4) {
+ PackedRGBA8 r = unaligned_load<PackedRGBA8>(src);
+ unaligned_store(buf, pack(blend_pixels_RGBA8(
+ unaligned_load<PackedRGBA8>(buf), unpack(r))));
+ }
+ } else {
+ memcpy(buf, src, len * sizeof(uint32_t));
+ }
+}
+
+static inline void commit_span(uint8_t* buf, PackedR8 r) {
+ if (blend_key)
+ r = pack(blend_pixels_R8(unpack(unaligned_load<PackedR8>(buf)), unpack(r)));
+ unaligned_store(buf, r);
+}
+
+UNUSED static inline void commit_solid_span(uint8_t* buf, PackedR8 r, int len) {
+ if (blend_key) {
+ auto src = unpack(r);
+ for (uint8_t* end = &buf[len]; buf < end; buf += 4) {
+ unaligned_store(buf, pack(blend_pixels_R8(
+ unpack(unaligned_load<PackedR8>(buf)), src)));
+ }
+ } else {
+ fill_n((uint32_t*)buf, len / 4, bit_cast<uint32_t>(r));
+ }
+}
+
+#define DISPATCH_DRAW_SPAN(self, buf, len) do { \
+ int drawn = self->draw_span(buf, len); \
+ if (drawn) self->step_interp_inputs(drawn >> 2); \
+ for (buf += drawn; drawn < len; drawn += 4, buf += 4) { \
+ run(self); \
+ commit_span(buf, pack_span(buf)); \
+ } \
+} while (0)
+
+#include "texture.h"
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#ifdef __clang__
+#pragma GCC diagnostic ignored "-Wunused-private-field"
+#else
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#endif
+#include "load_shader.h"
+#pragma GCC diagnostic pop
+
+typedef vec2_scalar Point2D;
+typedef vec4_scalar Point3D;
+
+struct ClipRect {
+ float x0;
+ float y0;
+ float x1;
+ float y1;
+
+ ClipRect(const IntRect& i) : x0(i.x0), y0(i.y0), x1(i.x1), y1(i.y1) {}
+ ClipRect(Texture& t) : ClipRect(ctx->apply_scissor(t.bounds())) {}
+
+ template <typename P>
+ bool overlaps(int nump, const P* p) const {
+ // Generate a mask of which side of the clip rect all of a polygon's points
+ // fall inside of. This is a cheap conservative estimate of whether the
+ // bounding box of the polygon might overlap the clip rect, rather than an
+ // exact test that would require multiple slower line intersections.
+ int sides = 0;
+ for (int i = 0; i < nump; i++) {
+ sides |= p[i].x < x1 ? (p[i].x > x0 ? 1 | 2 : 1) : 2;
+ sides |= p[i].y < y1 ? (p[i].y > y0 ? 4 | 8 : 4) : 8;
+ }
+ return sides == 0xF;
+ }
+};
+
+// Helper function for drawing 8-pixel wide chunks of a span with depth buffer.
+// Using 8-pixel chunks maximizes use of 16-bit depth values in 128-bit wide
+// SIMD register. However, since fragment shaders process only 4 pixels per
+// invocation, we need to run fragment shader twice for every 8 pixel batch
+// of results we get from the depth test. Perspective is not supported.
+template <int FUNC, bool MASK, typename P>
+static inline void draw_depth_span(uint16_t z, P* buf, uint16_t* depth,
+ int span) {
+ int skip = 0;
+ // Check if the fragment shader has an optimized draw specialization.
+ if (fragment_shader->has_draw_span(buf)) {
+ // The loop tries to accumulate runs of pixels that passed (len) and
+ // runs of pixels that failed (skip). This allows it to pass the largest
+ // possible span in between changes in depth pass or fail status to the
+ // fragment shader's draw specialer.
+ int len = 0;
+ do {
+ ZMask8 zmask;
+ // Process depth in 8-pixel chunks.
+ switch (check_depth8<FUNC, MASK>(z, depth, zmask)) {
+ case 0: // All pixels failed the depth test.
+ if (len) {
+ // Flush out passed pixels.
+ fragment_shader->draw_span(buf - len, len);
+ len = 0;
+ }
+ // Accumulate 2 skipped chunks.
+ skip += 2;
+ break;
+ case -1: // All pixels passed the depth test.
+ if (skip) {
+ // Flushed out any skipped chunks.
+ fragment_shader->skip(skip);
+ skip = 0;
+ }
+ // Accumulate 8 passed pixels.
+ len += 8;
+ break;
+ default: // Mixture of pass and fail results.
+ if (len) {
+ // Flush out any passed pixels.
+ fragment_shader->draw_span(buf - len, len);
+ len = 0;
+ } else if (skip) {
+ // Flush out any skipped chunks.
+ fragment_shader->skip(skip);
+ skip = 0;
+ }
+ // Run fragment shader on first 4 depth results.
+ commit_output<false, false>(buf, unpack(lowHalf(zmask), buf));
+ // Run fragment shader on next 4 depth results.
+ commit_output<false, false>(buf + 4, unpack(highHalf(zmask), buf));
+ break;
+ }
+ // Advance to next 8 pixels...
+ buf += 8;
+ depth += 8;
+ span -= 8;
+ } while (span >= 8);
+ // Flush out any remaining passed pixels.
+ if (len) {
+ fragment_shader->draw_span(buf - len, len);
+ }
+ } else {
+ // No draw specialization, so we can use a simpler loop here that just
+ // accumulates depth failures, but otherwise invokes fragment shader
+ // immediately on depth pass.
+ do {
+ ZMask8 zmask;
+ // Process depth in 8-pixel chunks.
+ switch (check_depth8<FUNC, MASK>(z, depth, zmask)) {
+ case 0: // All pixels failed the depth test.
+ // Accumulate 2 skipped chunks.
+ skip += 2;
+ break;
+ case -1: // All pixels passed the depth test.
+ if (skip) {
+ // Flush out any skipped chunks.
+ fragment_shader->skip(skip);
+ skip = 0;
+ }
+ // Run the fragment shader for two 4-pixel chunks.
+ commit_output<false, false>(buf);
+ commit_output<false, false>(buf + 4);
+ break;
+ default: // Mixture of pass and fail results.
+ if (skip) {
+ // Flush out any skipped chunks.
+ fragment_shader->skip(skip);
+ skip = 0;
+ }
+ // Run fragment shader on first 4 depth results.
+ commit_output<false, false>(buf, unpack(lowHalf(zmask), buf));
+ // Run fragment shader on next 4 depth results.
+ commit_output<false, false>(buf + 4, unpack(highHalf(zmask), buf));
+ break;
+ }
+ // Advance to next 8 pixels...
+ buf += 8;
+ depth += 8;
+ span -= 8;
+ } while (span >= 8);
+ }
+ // Flush out any remaining skipped chunks.
+ if (skip) {
+ fragment_shader->skip(skip);
+ }
+}
+
+// Draw a simple span in 4-pixel wide chunks, optionally using depth.
+template <bool DISCARD, bool W, typename P, typename Z>
+static ALWAYS_INLINE void draw_span(P* buf, uint16_t* depth, int span, Z z) {
+ if (depth) {
+ // Depth testing is enabled. If perspective is used, Z values will vary
+ // across the span, we use packDepth to generate 16-bit Z values suitable
+ // for depth testing based on current values from gl_FragCoord.z.
+ // Otherwise, for the no-perspective case, we just use the provided Z.
+ // Process 4-pixel chunks first.
+ for (; span >= 4; span -= 4, buf += 4, depth += 4) {
+ commit_output<DISCARD, W>(buf, z(), depth);
+ }
+ // If there are any remaining pixels, do a partial chunk.
+ if (span > 0) {
+ commit_output<DISCARD, W>(buf, z(), depth, span);
+ }
+ } else {
+ // Process 4-pixel chunks first.
+ for (; span >= 4; span -= 4, buf += 4) {
+ commit_output<DISCARD, W>(buf);
+ }
+ // If there are any remaining pixels, do a partial chunk.
+ if (span > 0) {
+ commit_output<DISCARD, W>(buf, span);
+ }
+ }
+}
+
+// Draw spans for each row of a given quad (or triangle) with a constant Z
+// value. The quad is assumed convex. It is clipped to fall within the given
+// clip rect. In short, this function rasterizes a quad by first finding a
+// top most starting point and then from there tracing down the left and right
+// sides of this quad until it hits the bottom, outputting a span between the
+// current left and right positions at each row along the way. Points are
+// assumed to be ordered in either CW or CCW to support this, but currently
+// both orders (CW and CCW) are supported and equivalent.
+template <typename P>
+static inline void draw_quad_spans(int nump, Point2D p[4], uint16_t z,
+ Interpolants interp_outs[4],
+ Texture& colortex, int layer,
+ Texture& depthtex,
+ const ClipRect& clipRect) {
+ // Only triangles and convex quads supported.
+ assert(nump == 3 || nump == 4);
+ Point2D l0, r0, l1, r1;
+ int l0i, r0i, l1i, r1i;
+ {
+ // Find the index of the top-most (smallest Y) point from which
+ // rasterization can start.
+ int top = nump > 3 && p[3].y < p[2].y
+ ? (p[0].y < p[1].y ? (p[0].y < p[3].y ? 0 : 3)
+ : (p[1].y < p[3].y ? 1 : 3))
+ : (p[0].y < p[1].y ? (p[0].y < p[2].y ? 0 : 2)
+ : (p[1].y < p[2].y ? 1 : 2));
+ // Helper to find next index in the points array, walking forward.
+#define NEXT_POINT(idx) \
+ ({ \
+ int cur = (idx) + 1; \
+ cur < nump ? cur : 0; \
+ })
+ // Helper to find the previous index in the points array, walking backward.
+#define PREV_POINT(idx) \
+ ({ \
+ int cur = (idx)-1; \
+ cur >= 0 ? cur : nump - 1; \
+ })
+ // Start looking for "left"-side and "right"-side descending edges starting
+ // from the determined top point.
+ int next = NEXT_POINT(top);
+ int prev = PREV_POINT(top);
+ if (p[top].y == p[next].y) {
+ // If the next point is on the same row as the top, then advance one more
+ // time to the next point and use that as the "left" descending edge.
+ l0i = next;
+ l1i = NEXT_POINT(next);
+ // Assume top and prev form a descending "right" edge, as otherwise this
+ // will be a collapsed polygon and harmlessly bail out down below.
+ r0i = top;
+ r1i = prev;
+ } else if (p[top].y == p[prev].y) {
+ // If the prev point is on the same row as the top, then advance to the
+ // prev again and use that as the "right" descending edge.
+ // Assume top and next form a non-empty descending "left" edge.
+ l0i = top;
+ l1i = next;
+ r0i = prev;
+ r1i = PREV_POINT(prev);
+ } else {
+ // Both next and prev are on distinct rows from top, so both "left" and
+ // "right" edges are non-empty/descending.
+ l0i = r0i = top;
+ l1i = next;
+ r1i = prev;
+ }
+ // Load the points from the indices.
+ l0 = p[l0i]; // Start of left edge
+ r0 = p[r0i]; // End of left edge
+ l1 = p[l1i]; // Start of right edge
+ r1 = p[r1i]; // End of right edge
+ // debugf("l0: %d(%f,%f), r0: %d(%f,%f) -> l1: %d(%f,%f), r1:
+ // %d(%f,%f)\n", l0i, l0.x, l0.y, r0i, r0.x, r0.y, l1i, l1.x, l1.y, r1i,
+ // r1.x, r1.y);
+ }
+
+ struct Edge
+ {
+ float yScale;
+ float xSlope;
+ float x;
+ Interpolants interpSlope;
+ Interpolants interp;
+
+ Edge(float y, const Point2D& p0, const Point2D& p1,
+ const Interpolants& i0, const Interpolants& i1) :
+ // Inverse Y scale for slope calculations. Avoid divide on 0-length edge.
+ // Later checks below ensure that Y <= p1.y, or otherwise we don't use
+ // this edge. We just need to guard against Y == p1.y == p0.y. In that
+ // case, Y - p0.y == 0 and will cancel out the slopes below, except if
+ // yScale is Inf for some reason (or worse, NaN), which 1/(p1.y-p0.y)
+ // might produce if we don't bound it.
+ yScale(1.0f / max(p1.y - p0.y, 1.0f / 256)),
+ // Calculate dX/dY slope
+ xSlope((p1.x - p0.x) * yScale),
+ // Initialize current X based on Y and slope
+ x(p0.x + (y - p0.y) * xSlope),
+ // Calculate change in interpolants per change in Y
+ interpSlope((i1 - i0) * yScale),
+ // Initialize current interpolants based on Y and slope
+ interp(i0 + (y - p0.y) * interpSlope)
+ {}
+
+ void nextRow() {
+ // step current X and interpolants to next row from slope
+ x += xSlope;
+ interp += interpSlope;
+ }
+ };
+
+ // Vertex selection above should result in equal left and right start rows
+ assert(l0.y == r0.y);
+ // Find the start y, clip to within the clip rect, and round to row center.
+ float y = floor(max(l0.y, clipRect.y0) + 0.5f) + 0.5f;
+ // Initialize left and right edges from end points and start Y
+ Edge left(y, l0, l1, interp_outs[l0i], interp_outs[l1i]);
+ Edge right(y, r0, r1, interp_outs[r0i], interp_outs[r1i]);
+ // Get pointer to color buffer and depth buffer at current Y
+ P* fbuf = (P*)colortex.sample_ptr(0, int(y), layer, sizeof(P));
+ uint16_t* fdepth =
+ (uint16_t*)depthtex.sample_ptr(0, int(y), 0, sizeof(uint16_t));
+ // Loop along advancing Ys, rasterizing spans at each row
+ float checkY = min(min(l1.y, r1.y), clipRect.y1);
+ for (;;) {
+ // Check if we maybe passed edge ends or outside clip rect...
+ if (y > checkY) {
+ // If we're outside the clip rect, we're done.
+ if (y > clipRect.y1) break;
+ // Helper to find the next non-duplicate vertex that doesn't loop back.
+#define STEP_EDGE(e0i, e0, e1i, e1, STEP_POINT, end) \
+ for (;;) { \
+ /* Set new start of edge to be end of old edge */ \
+ e0i = e1i; \
+ e0 = e1; \
+ /* Set new end of edge to next point */ \
+ e1i = STEP_POINT(e1i); \
+ e1 = p[e1i]; \
+ /* If the edge is descending, use it. */ \
+ if (e1.y > e0.y) break; \
+ /* If the edge is ascending or crossed the end, we're done. */ \
+ if (e1.y < e0.y || e0i == end) return; \
+ /* Otherwise, it's a duplicate, so keep searching. */ \
+ }
+ // Check if Y advanced past the end of the left edge
+ if (y > l1.y) {
+ // Step to next left edge past Y and reset edge interpolants.
+ do { STEP_EDGE(l0i, l0, l1i, l1, NEXT_POINT, r1i); } while (y > l1.y);
+ left = Edge(y, l0, l1, interp_outs[l0i], interp_outs[l1i]);
+ }
+ // Check if Y advanced past the end of the right edge
+ if (y > r1.y) {
+ // Step to next right edge past Y and reset edge interpolants.
+ do { STEP_EDGE(r0i, r0, r1i, r1, PREV_POINT, l1i); } while (y > r1.y);
+ right = Edge(y, r0, r1, interp_outs[r0i], interp_outs[r1i]);
+ }
+ // Reset check condition for next time around.
+ checkY = min(min(l1.y, r1.y), clipRect.y1);
+ }
+ // lx..rx form the bounds of the span. WR does not use backface culling,
+ // so we need to use min/max to support the span in either orientation.
+ // Clip the span to fall within the clip rect and then round to nearest
+ // column.
+ int startx = int(max(min(left.x, right.x), clipRect.x0) + 0.5f);
+ int endx = int(min(max(left.x, right.x), clipRect.x1) + 0.5f);
+ // Check if span is non-empty.
+ int span = endx - startx;
+ if (span > 0) {
+ ctx->shaded_rows++;
+ ctx->shaded_pixels += span;
+ // Advance color/depth buffer pointers to the start of the span.
+ P* buf = fbuf + startx;
+ // Check if the we will need to use depth-buffer or discard on this span.
+ uint16_t* depth = depthtex.buf != nullptr ? fdepth + startx : nullptr;
+ bool use_discard = fragment_shader->use_discard();
+ if (depthtex.delay_clear) {
+ // Delayed clear is enabled for the depth buffer. Check if this row
+ // needs to be cleared.
+ int yi = int(y);
+ uint32_t& mask = depthtex.cleared_rows[yi / 32];
+ if ((mask & (1 << (yi & 31))) == 0) {
+ // The depth buffer is unitialized on this row, but we know it will
+ // thus be cleared entirely to the clear value. This lets us quickly
+ // check the constant Z value of the quad against the clear Z to know
+ // if the entire span passes or fails the depth test all at once.
+ switch (ctx->depthfunc) {
+ case GL_LESS:
+ if (int16_t(z) < int16_t(depthtex.clear_val))
+ break;
+ else
+ goto next_span;
+ case GL_LEQUAL:
+ if (int16_t(z) <= int16_t(depthtex.clear_val))
+ break;
+ else
+ goto next_span;
+ }
+ // If we got here, we passed the depth test.
+ if (ctx->depthmask) {
+ // Depth writes are enabled, so we need to initialize depth.
+ mask |= 1 << (yi & 31);
+ depthtex.delay_clear--;
+ if (use_discard) {
+ // if discard is enabled, we don't know what pixels may be
+ // written to, so we have to clear the entire row.
+ force_clear_row<uint16_t>(depthtex, yi);
+ } else {
+ // Otherwise, we only need to clear the pixels that fall outside
+ // the current span on this row.
+ if (startx > 0 || endx < depthtex.width) {
+ force_clear_row<uint16_t>(depthtex, yi, startx, endx);
+ }
+ // Fill in the span's Z values with constant Z.
+ clear_buffer<uint16_t>(depthtex, z, 0,
+ IntRect{startx, yi, endx, yi + 1});
+ // We already passed the depth test, so no need to test depth
+ // any more.
+ depth = nullptr;
+ }
+ } else {
+ // No depth writes, so don't clear anything, and no need to test.
+ depth = nullptr;
+ }
+ }
+ }
+ if (colortex.delay_clear) {
+ // Delayed clear is enabled for the color buffer. Check if needs clear.
+ int yi = int(y);
+ uint32_t& mask = colortex.cleared_rows[yi / 32];
+ if ((mask & (1 << (yi & 31))) == 0) {
+ mask |= 1 << (yi & 31);
+ colortex.delay_clear--;
+ if (depth || blend_key || use_discard) {
+ // If depth test, blending, or discard is used, old color values
+ // might be sampled, so we need to clear the entire row to fill it.
+ force_clear_row<P>(colortex, yi);
+ } else if (startx > 0 || endx < colortex.width) {
+ // Otherwise, we only need to clear the row outside of the span.
+ // The fragment shader will fill the row within the span itself.
+ force_clear_row<P>(colortex, yi, startx, endx);
+ }
+ }
+ }
+ // Initialize fragment shader interpolants to current span position.
+ fragment_shader->gl_FragCoord.x = init_interp(startx + 0.5f, 1);
+ fragment_shader->gl_FragCoord.y = y;
+ {
+ // Change in interpolants is difference between current right and left
+ // edges per the change in right and left X.
+ Interpolants step =
+ (right.interp - left.interp) * (1.0f / (right.x - left.x));
+ // Advance current interpolants to X at start of span.
+ Interpolants o = left.interp + step * (startx + 0.5f - left.x);
+ fragment_shader->init_span(&o, &step, 4.0f);
+ }
+ if (!use_discard) {
+ // Fast paths for the case where fragment discard is not used.
+ if (depth) {
+ // If depth is used, we want to process spans in 8-pixel chunks to
+ // maximize sampling and testing 16-bit depth values within the 128-
+ // bit width of a SIMD register.
+ if (span >= 8) {
+ // Specializations for supported depth functions depending on
+ // whether depth writes are enabled.
+ if (ctx->depthfunc == GL_LEQUAL) {
+ if (ctx->depthmask)
+ draw_depth_span<GL_LEQUAL, true>(z, buf, depth, span);
+ else
+ draw_depth_span<GL_LEQUAL, false>(z, buf, depth, span);
+ } else {
+ if (ctx->depthmask)
+ draw_depth_span<GL_LESS, true>(z, buf, depth, span);
+ else
+ draw_depth_span<GL_LESS, false>(z, buf, depth, span);
+ }
+ // Advance buffers past processed chunks.
+ buf += span & ~7;
+ depth += span & ~7;
+ span &= 7;
+ }
+ } else {
+ // Check if the fragment shader has an optimized draw specialization.
+ if (span >= 4 && fragment_shader->has_draw_span(buf)) {
+ // Draw specialization expects 4-pixel chunks.
+ int len = span & ~3;
+ fragment_shader->draw_span(buf, len);
+ buf += len;
+ span &= 3;
+ }
+ }
+ draw_span<false, false>(buf, depth, span, [=]{ return z; });
+ } else {
+ // If discard is used, then use slower fallbacks. This should be rare.
+ // Just needs to work, doesn't need to be too fast yet...
+ draw_span<true, false>(buf, depth, span, [=]{ return z; });
+ }
+ }
+ next_span:
+ // Advance Y and edge interpolants to next row.
+ y++;
+ left.nextRow();
+ right.nextRow();
+ // Advance buffers to next row.
+ fbuf += colortex.stride(sizeof(P)) / sizeof(P);
+ fdepth += depthtex.stride(sizeof(uint16_t)) / sizeof(uint16_t);
+ }
+}
+
+// Draw perspective-correct spans for a convex quad that has been clipped to
+// the near and far Z planes, possibly producing a clipped convex polygon with
+// more than 4 sides. This assumes the Z value will vary across the spans and
+// requires interpolants to factor in W values. This tends to be slower than
+// the simpler 2D draw_quad_spans above, especially since we can't optimize the
+// depth test easily when Z values, and should be used only rarely if possible.
+template <typename P>
+static inline void draw_perspective_spans(int nump, Point3D* p,
+ Interpolants* interp_outs,
+ Texture& colortex, int layer,
+ Texture& depthtex,
+ const ClipRect& clipRect) {
+ Point3D l0, r0, l1, r1;
+ int l0i, r0i, l1i, r1i;
+ {
+ // Find the index of the top-most point (smallest Y) from which
+ // rasterization can start.
+ int top = 0;
+ for (int i = 1; i < nump; i++) {
+ if (p[i].y < p[top].y) {
+ top = i;
+ }
+ }
+ // Find left-most top point, the start of the left descending edge.
+ // Advance forward in the points array, searching at most nump points
+ // in case the polygon is flat.
+ l0i = top;
+ for (int i = top + 1; i < nump && p[i].y == p[top].y; i++) {
+ l0i = i;
+ }
+ if (l0i == nump - 1) {
+ for (int i = 0; i <= top && p[i].y == p[top].y; i++) {
+ l0i = i;
+ }
+ }
+ // Find right-most top point, the start of the right descending edge.
+ // Advance backward in the points array, searching at most nump points.
+ r0i = top;
+ for (int i = top - 1; i >= 0 && p[i].y == p[top].y; i--) {
+ r0i = i;
+ }
+ if (r0i == 0) {
+ for (int i = nump - 1; i >= top && p[i].y == p[top].y; i--) {
+ r0i = i;
+ }
+ }
+ // End of left edge is next point after left edge start.
+ l1i = NEXT_POINT(l0i);
+ // End of right edge is prev point after right edge start.
+ r1i = PREV_POINT(r0i);
+ l0 = p[l0i]; // Start of left edge
+ r0 = p[r0i]; // End of left edge
+ l1 = p[l1i]; // Start of right edge
+ r1 = p[r1i]; // End of right edge
+ }
+
+ struct Edge
+ {
+ float yScale;
+ // Current coordinates for edge. Where in the 2D case of draw_quad_spans,
+ // it is enough to just track the X coordinate as we advance along the rows,
+ // for the perspective case we also need to keep track of Z and W. For
+ // simplicity, we just use the full 3D point to track all these coordinates.
+ Point3D pSlope;
+ Point3D p;
+ Interpolants interpSlope;
+ Interpolants interp;
+
+ Edge(float y, const Point3D& p0, const Point3D& p1,
+ const Interpolants& i0, const Interpolants& i1) :
+ // Inverse Y scale for slope calculations. Avoid divide on 0-length edge.
+ yScale(1.0f / max(p1.y - p0.y, 1.0f / 256)),
+ // Calculate dX/dY slope
+ pSlope((p1 - p0) * yScale),
+ // Initialize current coords based on Y and slope
+ p(p0 + (y - p0.y) * pSlope),
+ // Crucially, these interpolants must be scaled by the point's 1/w value,
+ // which allows linear interpolation in a perspective-correct manner.
+ // This will be canceled out inside the fragment shader later.
+ // Calculate change in interpolants per change in Y
+ interpSlope((i1 * p1.w - i0 * p0.w) * yScale),
+ // Initialize current interpolants based on Y and slope
+ interp(i0 * p0.w + (y - p0.y) * interpSlope)
+ {}
+
+ float x() const { return p.x; }
+ vec2_scalar zw() const { return {p.z, p.w}; }
+
+ void nextRow() {
+ // step current coords and interpolants to next row from slope
+ p += pSlope;
+ interp += interpSlope;
+ }
+ };
+
+ // Vertex selection above should result in equal left and right start rows
+ assert(l0.y == r0.y);
+ // Find the start y, clip to within the clip rect, and round to row center.
+ float y = floor(max(l0.y, clipRect.y0) + 0.5f) + 0.5f;
+ // Initialize left and right edges from end points and start Y
+ Edge left(y, l0, l1, interp_outs[l0i], interp_outs[l1i]);
+ Edge right(y, r0, r1, interp_outs[r0i], interp_outs[r1i]);
+ // Get pointer to color buffer and depth buffer at current Y
+ P* fbuf = (P*)colortex.sample_ptr(0, int(y), layer, sizeof(P));
+ uint16_t* fdepth =
+ (uint16_t*)depthtex.sample_ptr(0, int(y), 0, sizeof(uint16_t));
+ // Loop along advancing Ys, rasterizing spans at each row
+ float checkY = min(min(l1.y, r1.y), clipRect.y1);
+ for (;;) {
+ // Check if we maybe passed edge ends or outside clip rect...
+ if (y > checkY) {
+ // If we're outside the clip rect, we're done.
+ if (y > clipRect.y1) break;
+ // Check if Y advanced past the end of the left edge
+ if (y > l1.y) {
+ // Step to next left edge past Y and reset edge interpolants.
+ do { STEP_EDGE(l0i, l0, l1i, l1, NEXT_POINT, r1i); } while (y > l1.y);
+ left = Edge(y, l0, l1, interp_outs[l0i], interp_outs[l1i]);
+ }
+ // Check if Y advanced past the end of the right edge
+ if (y > r1.y) {
+ // Step to next right edge past Y and reset edge interpolants.
+ do { STEP_EDGE(r0i, r0, r1i, r1, PREV_POINT, l1i); } while (y > r1.y);
+ right = Edge(y, r0, r1, interp_outs[r0i], interp_outs[r1i]);
+ }
+ // Reset check condition for next time around.
+ checkY = min(min(l1.y, r1.y), clipRect.y1);
+ }
+ // lx..rx form the bounds of the span. WR does not use backface culling,
+ // so we need to use min/max to support the span in either orientation.
+ // Clip the span to fall within the clip rect and then round to nearest
+ // column.
+ int startx = int(max(min(left.x(), right.x()), clipRect.x0) + 0.5f);
+ int endx = int(min(max(left.x(), right.x()), clipRect.x1) + 0.5f);
+ // Check if span is non-empty.
+ int span = endx - startx;
+ if (span > 0) {
+ ctx->shaded_rows++;
+ ctx->shaded_pixels += span;
+ // Advance color/depth buffer pointers to the start of the span.
+ P* buf = fbuf + startx;
+ // Check if the we will need to use depth-buffer or discard on this span.
+ uint16_t* depth = depthtex.buf != nullptr ? fdepth + startx : nullptr;
+ bool use_discard = fragment_shader->use_discard();
+ if (depthtex.delay_clear) {
+ // Delayed clear is enabled for the depth buffer. Check if this row
+ // needs to be cleared.
+ int yi = int(y);
+ uint32_t& mask = depthtex.cleared_rows[yi / 32];
+ if ((mask & (1 << (yi & 31))) == 0) {
+ mask |= 1 << (yi & 31);
+ depthtex.delay_clear--;
+ // Since Z varies across the span, it's easier to just clear the
+ // row and rely on later depth testing. If necessary, this could be
+ // optimized to test against the start and end Z values of the span
+ // here.
+ force_clear_row<uint16_t>(depthtex, yi);
+ }
+ }
+ if (colortex.delay_clear) {
+ // Delayed clear is enabled for the color buffer. Check if needs clear.
+ int yi = int(y);
+ uint32_t& mask = colortex.cleared_rows[yi / 32];
+ if ((mask & (1 << (yi & 31))) == 0) {
+ mask |= 1 << (yi & 31);
+ colortex.delay_clear--;
+ if (depth || blend_key || use_discard) {
+ // If depth test, blending, or discard is used, old color values
+ // might be sampled, so we need to clear the entire row to fill it.
+ force_clear_row<P>(colortex, yi);
+ } else if (startx > 0 || endx < colortex.width) {
+ // Otherwise, we only need to clear the row outside of the span.
+ // The fragment shader will fill the row within the span itself.
+ force_clear_row<P>(colortex, yi, startx, endx);
+ }
+ }
+ }
+ // Initialize fragment shader interpolants to current span position.
+ fragment_shader->gl_FragCoord.x = init_interp(startx + 0.5f, 1);
+ fragment_shader->gl_FragCoord.y = y;
+ {
+ // Calculate the fragment Z and W change per change in fragment X step.
+ vec2_scalar stepZW =
+ (right.zw() - left.zw()) * (1.0f / (right.x() - left.x()));
+ // Calculate initial Z and W values for span start.
+ vec2_scalar zw = left.zw() + stepZW * (startx + 0.5f - left.x());
+ // Set fragment shader's Z and W values so that it can use them to
+ // cancel out the 1/w baked into the interpolants.
+ fragment_shader->gl_FragCoord.z = init_interp(zw.x, stepZW.x);
+ fragment_shader->gl_FragCoord.w = init_interp(zw.y, stepZW.y);
+ fragment_shader->stepZW = stepZW * 4.0f;
+ // Change in interpolants is difference between current right and left
+ // edges per the change in right and left X. The left and right
+ // interpolant values were previously multipled by 1/w, so the step and
+ // initial span values take this into account.
+ Interpolants step =
+ (right.interp - left.interp) * (1.0f / (right.x() - left.x()));
+ // Advance current interpolants to X at start of span.
+ Interpolants o = left.interp + step * (startx + 0.5f - left.x());
+ fragment_shader->init_span<true>(&o, &step, 4.0f);
+ }
+ if (!use_discard) {
+ // No discard is used. Common case.
+ draw_span<false, true>(buf, depth, span, packDepth);
+ } else {
+ // Discard is used. Rare.
+ draw_span<true, true>(buf, depth, span, packDepth);
+ }
+ }
+ // Advance Y and edge interpolants to next row.
+ y++;
+ left.nextRow();
+ right.nextRow();
+ // Advance buffers to next row.
+ fbuf += colortex.stride(sizeof(P)) / sizeof(P);
+ fdepth += depthtex.stride(sizeof(uint16_t)) / sizeof(uint16_t);
+ }
+}
+
+// Clip a primitive against both sides of a view-frustum axis, producing
+// intermediate vertexes with interpolated attributes that will no longer
+// intersect the selected axis planes. This assumes the primitive is convex
+// and should produce at most N+2 vertexes for each invocation (only in the
+// worst case where one point falls outside on each of the opposite sides
+// with the rest of the points inside).
+template <XYZW AXIS>
+static int clip_side(int nump, Point3D* p, Interpolants* interp, Point3D* outP,
+ Interpolants* outInterp) {
+ int numClip = 0;
+ Point3D prev = p[nump - 1];
+ Interpolants prevInterp = interp[nump - 1];
+ float prevCoord = prev.select(AXIS);
+ // Coordinate must satisfy -W <= C <= W. Determine if it is outside, and
+ // if so, remember which side it is outside of.
+ int prevSide = prevCoord < -prev.w ? -1 : (prevCoord > prev.w ? 1 : 0);
+ // Loop through points, finding edges that cross the planes by evaluating
+ // the side at each point.
+ for (int i = 0; i < nump; i++) {
+ Point3D cur = p[i];
+ Interpolants curInterp = interp[i];
+ float curCoord = cur.select(AXIS);
+ int curSide = curCoord < -cur.w ? -1 : (curCoord > cur.w ? 1 : 0);
+ // Check if the previous and current end points are on different sides.
+ if (curSide != prevSide) {
+ // One of the edge's end points is outside the plane with the other
+ // inside the plane. Find the offset where it crosses the plane and
+ // adjust the point and interpolants to there.
+ if (prevSide) {
+ // Edge that was previously outside crosses inside.
+ // Evaluate plane equation for previous and current end-point
+ // based on previous side and calculate relative offset.
+ assert(numClip < nump + 2);
+ float prevDist = prevCoord - prevSide * prev.w;
+ float curDist = curCoord - prevSide * cur.w;
+ float k = prevDist / (prevDist - curDist);
+ outP[numClip] = prev + (cur - prev) * k;
+ outInterp[numClip] = prevInterp + (curInterp - prevInterp) * k;
+ numClip++;
+ }
+ if (curSide) {
+ // Edge that was previously inside crosses outside.
+ // Evaluate plane equation for previous and current end-point
+ // based on current side and calculate relative offset.
+ assert(numClip < nump + 2);
+ float prevDist = prevCoord - curSide * prev.w;
+ float curDist = curCoord - curSide * cur.w;
+ float k = prevDist / (prevDist - curDist);
+ outP[numClip] = prev + (cur - prev) * k;
+ outInterp[numClip] = prevInterp + (curInterp - prevInterp) * k;
+ numClip++;
+ }
+ }
+ if (!curSide) {
+ // The current end point is inside the plane, so output point unmodified.
+ assert(numClip < nump + 2);
+ outP[numClip] = cur;
+ outInterp[numClip] = curInterp;
+ numClip++;
+ }
+ prev = cur;
+ prevInterp = curInterp;
+ prevCoord = curCoord;
+ prevSide = curSide;
+ }
+ return numClip;
+}
+
+// Helper function to dispatch to perspective span drawing with points that
+// have already been transformed and clipped.
+static inline void draw_perspective_clipped(int nump, Point3D* p_clip,
+ Interpolants* interp_clip,
+ Texture& colortex, int layer,
+ Texture& depthtex) {
+ // If polygon is ouside clip rect, nothing to draw.
+ ClipRect clipRect(colortex);
+ if (!clipRect.overlaps(nump, p_clip)) {
+ return;
+ }
+
+ // Finally draw perspective-correct spans for the polygon.
+ if (colortex.internal_format == GL_RGBA8) {
+ draw_perspective_spans<uint32_t>(nump, p_clip, interp_clip, colortex,
+ layer, depthtex, clipRect);
+ } else if (colortex.internal_format == GL_R8) {
+ draw_perspective_spans<uint8_t>(nump, p_clip, interp_clip, colortex,
+ layer, depthtex, clipRect);
+ } else {
+ assert(false);
+ }
+}
+
+// Draws a perspective-correct 3D primitive with varying Z value, as opposed
+// to a simple 2D planar primitive with a constant Z value that could be
+// trivially Z rejected. This requires clipping the primitive against the near
+// and far planes to ensure it stays within the valid Z-buffer range. The Z
+// and W of each fragment of the primitives are interpolated across the
+// generated spans and then depth-tested as appropriate.
+// Additionally, vertex attributes must be interpolated with perspective-
+// correction by dividing by W before interpolation, and then later multiplied
+// by W again to produce the final correct attribute value for each fragment.
+// This process is expensive and should be avoided if possible for primitive
+// batches that are known ahead of time to not need perspective-correction.
+static void draw_perspective(int nump,
+ Interpolants interp_outs[4],
+ Texture& colortex, int layer,
+ Texture& depthtex) {
+ // Convert output of vertex shader to screen space.
+ vec4 pos = vertex_shader->gl_Position;
+ vec3_scalar scale =
+ vec3_scalar(ctx->viewport.width(), ctx->viewport.height(), 1) * 0.5f;
+ vec3_scalar offset =
+ vec3_scalar(ctx->viewport.x0, ctx->viewport.y0, 0.0f) + scale;
+ if (test_none(pos.z <= -pos.w || pos.z >= pos.w)) {
+ // No points cross the near or far planes, so no clipping required.
+ // Just divide coords by W and convert to viewport.
+ Float w = 1.0f / pos.w;
+ vec3 screen = pos.sel(X, Y, Z) * w * scale + offset;
+ Point3D p[4] = {
+ {screen.x.x, screen.y.x, screen.z.x, w.x},
+ {screen.x.y, screen.y.y, screen.z.y, w.y},
+ {screen.x.z, screen.y.z, screen.z.z, w.z},
+ {screen.x.w, screen.y.w, screen.z.w, w.w}
+ };
+ draw_perspective_clipped(nump, p, interp_outs, colortex, layer, depthtex);
+ } else {
+ // Points cross the near or far planes, so we need to clip.
+ // Start with the original 3 or 4 points...
+ Point3D p[4] = {
+ {pos.x.x, pos.y.x, pos.z.x, pos.w.x},
+ {pos.x.y, pos.y.y, pos.z.y, pos.w.y},
+ {pos.x.z, pos.y.z, pos.z.z, pos.w.z},
+ {pos.x.w, pos.y.w, pos.z.w, pos.w.w}
+ };
+ // Clipping can expand the points by 1 for each of 6 view frustum planes.
+ Point3D p_clip[4 + 6];
+ Interpolants interp_clip[4 + 6];
+ // Clip against near and far Z planes.
+ nump = clip_side<Z>(nump, p, interp_outs, p_clip, interp_clip);
+ // If no points are left inside the view frustum, there's nothing to draw.
+ if (nump < 3) {
+ return;
+ }
+ // After clipping against only the near and far planes, we might still
+ // produce points where W = 0, exactly at the camera plane. OpenGL specifies
+ // that for clip coordinates, points must satisfy:
+ // -W <= X <= W
+ // -W <= Y <= W
+ // -W <= Z <= W
+ // When Z = W = 0, this is trivially satisfied, but when we transform and
+ // divide by W below it will produce a divide by 0. Usually we want to only
+ // clip Z to avoid the extra work of clipping X and Y. We can still project
+ // points that fall outside the view frustum X and Y so long as Z is valid.
+ // The span drawing code will then ensure X and Y are clamped to viewport
+ // boundaries. However, in the Z = W = 0 case, sometimes clipping X and Y,
+ // will push W further inside the view frustum so that it is no longer 0,
+ // allowing us to finally proceed to projecting the points to the screen.
+ for (int i = 0; i < nump; i++) {
+ // Found an invalid W, so need to clip against X and Y...
+ if (p_clip[i].w <= 0.0f) {
+ // Ping-pong p_clip -> p_tmp -> p_clip.
+ Point3D p_tmp[4 + 6];
+ Interpolants interp_tmp[4 + 6];
+ nump = clip_side<X>(nump, p_clip, interp_clip, p_tmp, interp_tmp);
+ if (nump < 3) return;
+ nump = clip_side<Y>(nump, p_tmp, interp_tmp, p_clip, interp_clip);
+ if (nump < 3) return;
+ // After clipping against X and Y planes, there's still points left
+ // to draw, so proceed to trying projection now...
+ break;
+ }
+ }
+ // Divide coords by W and convert to viewport.
+ for (int i = 0; i < nump; i++) {
+ float w = 1.0f / p_clip[i].w;
+ p_clip[i] = Point3D(p_clip[i].sel(X, Y, Z) * w * scale + offset, w);
+ }
+ draw_perspective_clipped(nump, p_clip, interp_clip, colortex, layer,
+ depthtex);
+ }
+}
+
+static void draw_quad(int nump, Texture& colortex, int layer,
+ Texture& depthtex) {
+ // Run vertex shader once for the primitive's vertices.
+ // Reserve space for 6 sets of interpolants, in case we need to clip against
+ // near and far planes in the perspective case.
+ Interpolants interp_outs[4];
+ vertex_shader->run_primitive((char*)interp_outs, sizeof(Interpolants));
+ vec4 pos = vertex_shader->gl_Position;
+ // Check if any vertex W is different from another. If so, use perspective.
+ if (test_any(pos.w != pos.w.x)) {
+ draw_perspective(nump, interp_outs, colortex, layer, depthtex);
+ return;
+ }
+
+ // Convert output of vertex shader to screen space.
+ // Divide coords by W and convert to viewport.
+ float w = 1.0f / pos.w.x;
+ vec2 screen =
+ (pos.sel(X, Y) * w + 1) * 0.5f *
+ vec2_scalar(ctx->viewport.width(), ctx->viewport.height()) +
+ vec2_scalar(ctx->viewport.x0, ctx->viewport.y0);
+ Point2D p[4] = {{screen.x.x, screen.y.x},
+ {screen.x.y, screen.y.y},
+ {screen.x.z, screen.y.z},
+ {screen.x.w, screen.y.w}};
+
+ // If quad is ouside clip rect, nothing to draw.
+ ClipRect clipRect(colortex);
+ if (!clipRect.overlaps(nump, p)) {
+ return;
+ }
+
+ // Since the quad is assumed 2D, Z is constant across the quad.
+ float screenZ = (pos.z.x * w + 1) * 0.5f;
+ if (screenZ < 0 || screenZ > 1) {
+ // Z values would cross the near or far plane, so just bail.
+ return;
+ }
+ // Since Z doesn't need to be interpolated, just set the fragment shader's
+ // Z and W values here, once and for all fragment shader invocations.
+ // SSE2 does not support unsigned comparison, so bias Z to be negative.
+ uint16_t z = uint16_t(0xFFFF * screenZ) - 0x8000;
+ fragment_shader->gl_FragCoord.z = screenZ;
+ fragment_shader->gl_FragCoord.w = w;
+
+ // Finally draw 2D spans for the quad. Currently only supports drawing to
+ // RGBA8 and R8 color buffers.
+ if (colortex.internal_format == GL_RGBA8) {
+ draw_quad_spans<uint32_t>(nump, p, z, interp_outs, colortex, layer,
+ depthtex, clipRect);
+ } else if (colortex.internal_format == GL_R8) {
+ draw_quad_spans<uint8_t>(nump, p, z, interp_outs, colortex, layer, depthtex,
+ clipRect);
+ } else {
+ assert(false);
+ }
+}
+
+void VertexArray::validate() {
+ int last_enabled = -1;
+ for (int i = 0; i <= max_attrib; i++) {
+ VertexAttrib& attr = attribs[i];
+ if (attr.enabled) {
+ // VertexArray &v = ctx->vertex_arrays[attr.vertex_array];
+ Buffer& vertex_buf = ctx->buffers[attr.vertex_buffer];
+ attr.buf = vertex_buf.buf;
+ attr.buf_size = vertex_buf.size;
+ // debugf("%d %x %d %d %d %d\n", i, attr.type, attr.size, attr.stride,
+ // attr.offset, attr.divisor);
+ last_enabled = i;
+ }
+ }
+ max_attrib = last_enabled;
+}
+
+template <typename INDEX>
+static inline void draw_elements(GLsizei count, GLsizei instancecount,
+ Buffer& indices_buf, size_t offset,
+ VertexArray& v, Texture& colortex, int layer,
+ Texture& depthtex) {
+ assert((offset & (sizeof(INDEX) - 1)) == 0);
+ INDEX* indices = (INDEX*)(indices_buf.buf + offset);
+ count = min(count,
+ (GLsizei)((indices_buf.size - offset) / sizeof(INDEX)));
+ // Triangles must be indexed at offsets 0, 1, 2.
+ // Quads must be successive triangles indexed at offsets 0, 1, 2, 2, 1, 3.
+ if (count == 6 && indices[1] == indices[0] + 1 &&
+ indices[2] == indices[0] + 2 && indices[5] == indices[0] + 3) {
+ assert(indices[3] == indices[0] + 2 && indices[4] == indices[0] + 1);
+ // Fast path - since there is only a single quad, we only load per-vertex
+ // attribs once for all instances, as they won't change across instances
+ // or within an instance.
+ vertex_shader->load_attribs(v.attribs, indices[0], 0, 4);
+ draw_quad(4, colortex, layer, depthtex);
+ for (GLsizei instance = 1; instance < instancecount; instance++) {
+ vertex_shader->load_attribs(v.attribs, indices[0], instance, 0);
+ draw_quad(4, colortex, layer, depthtex);
+ }
+ } else {
+ for (GLsizei instance = 0; instance < instancecount; instance++) {
+ for (GLsizei i = 0; i + 3 <= count; i += 3) {
+ if (indices[i + 1] != indices[i] + 1 ||
+ indices[i + 2] != indices[i] + 2) {
+ continue;
+ }
+ int nump = 3;
+ if (i + 6 <= count && indices[i + 5] == indices[i] + 3) {
+ assert(indices[i + 3] == indices[i] + 2 &&
+ indices[i + 4] == indices[i] + 1);
+ nump = 4;
+ i += 3;
+ }
+ vertex_shader->load_attribs(v.attribs, indices[i], instance, nump);
+ draw_quad(nump, colortex, layer, depthtex);
+ }
+ }
+ }
+}
+
+extern "C" {
+
+void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type,
+ void* indicesptr, GLsizei instancecount) {
+ assert(mode == GL_TRIANGLES);
+ assert(type == GL_UNSIGNED_SHORT || type == GL_UNSIGNED_INT);
+ if (count <= 0 || instancecount <= 0) {
+ return;
+ }
+
+ Framebuffer& fb = *get_framebuffer(GL_DRAW_FRAMEBUFFER);
+ Texture& colortex = ctx->textures[fb.color_attachment];
+ if (!colortex.buf) {
+ return;
+ }
+ assert(colortex.internal_format == GL_RGBA8 ||
+ colortex.internal_format == GL_R8);
+ Texture& depthtex = ctx->textures[ctx->depthtest ? fb.depth_attachment : 0];
+ if (depthtex.buf) {
+ assert(depthtex.internal_format == GL_DEPTH_COMPONENT16);
+ assert(colortex.width == depthtex.width &&
+ colortex.height == depthtex.height);
+ }
+
+ Buffer& indices_buf = ctx->buffers[ctx->element_array_buffer_binding];
+ size_t offset = (size_t)indicesptr;
+ if (!indices_buf.buf || offset >= indices_buf.size) {
+ return;
+ }
+
+ // debugf("current_vertex_array %d\n", ctx->current_vertex_array);
+ // debugf("indices size: %d\n", indices_buf.size);
+ VertexArray& v = ctx->vertex_arrays[ctx->current_vertex_array];
+ if (ctx->validate_vertex_array) {
+ ctx->validate_vertex_array = false;
+ v.validate();
+ }
+
+#ifndef NDEBUG
+ // uint64_t start = get_time_value();
+#endif
+
+ ctx->shaded_rows = 0;
+ ctx->shaded_pixels = 0;
+
+ vertex_shader->init_batch();
+
+ if (type == GL_UNSIGNED_SHORT) {
+ draw_elements<uint16_t>(count, instancecount, indices_buf, offset, v,
+ colortex, fb.layer, depthtex);
+ } else if (type == GL_UNSIGNED_INT) {
+ draw_elements<uint32_t>(count, instancecount, indices_buf, offset, v,
+ colortex, fb.layer, depthtex);
+ } else {
+ assert(false);
+ }
+
+ if (ctx->samples_passed_query) {
+ Query& q = ctx->queries[ctx->samples_passed_query];
+ q.value += ctx->shaded_pixels;
+ }
+
+#ifndef NDEBUG
+ // uint64_t end = get_time_value();
+ // debugf("draw(%d): %fms for %d pixels in %d rows (avg %f pixels/row, %f
+ // ns/pixel)\n", instancecount, double(end - start)/(1000.*1000.),
+ // ctx->shaded_pixels, ctx->shaded_rows,
+ // double(ctx->shaded_pixels)/ctx->shaded_rows, double(end -
+ // start)/max(ctx->shaded_pixels, 1));
+#endif
+}
+
+} // extern "C"
+
+template <typename P>
+static inline void scale_row(P* dst, int dstWidth, const P* src, int srcWidth,
+ int span) {
+ int frac = 0;
+ for (P* end = dst + span; dst < end; dst++) {
+ *dst = *src;
+ // Step source according to width ratio.
+ for (frac += srcWidth; frac >= dstWidth; frac -= dstWidth) {
+ src++;
+ }
+ }
+}
+
+static void scale_blit(Texture& srctex, const IntRect& srcReq, int srcZ,
+ Texture& dsttex, const IntRect& dstReq, int dstZ,
+ bool invertY) {
+ // Cache scaling ratios
+ int srcWidth = srcReq.width();
+ int srcHeight = srcReq.height();
+ int dstWidth = dstReq.width();
+ int dstHeight = dstReq.height();
+ // Compute valid dest bounds
+ IntRect dstBounds = dsttex.sample_bounds(dstReq, invertY);
+ // Compute valid source bounds
+ // Scale source to dest, rounding inward to avoid sampling outside source
+ IntRect srcBounds = srctex.sample_bounds(srcReq)
+ .scale(srcWidth, srcHeight, dstWidth, dstHeight, true);
+ // Limit dest sampling bounds to overlap source bounds
+ dstBounds.intersect(srcBounds);
+ // Check if sampling bounds are empty
+ if (dstBounds.is_empty()) {
+ return;
+ }
+ // Compute final source bounds from clamped dest sampling bounds
+ srcBounds = IntRect(dstBounds)
+ .scale(dstWidth, dstHeight, srcWidth, srcHeight);
+ // Calculate source and dest pointers from clamped offsets
+ int bpp = srctex.bpp();
+ int srcStride = srctex.stride(bpp);
+ int destStride = dsttex.stride(bpp);
+ char* dest = dsttex.sample_ptr(dstReq, dstBounds, dstZ, invertY);
+ char* src = srctex.sample_ptr(srcReq, srcBounds, srcZ);
+ // Inverted Y must step downward along dest rows
+ if (invertY) {
+ destStride = -destStride;
+ }
+ int span = dstBounds.width();
+ int frac = 0;
+ for (int rows = dstBounds.height(); rows > 0; rows--) {
+ if (srcWidth == dstWidth) {
+ // No scaling, so just do a fast copy.
+ memcpy(dest, src, span * bpp);
+ } else {
+ // Do scaling with different source and dest widths.
+ switch (bpp) {
+ case 1:
+ scale_row((uint8_t*)dest, dstWidth, (uint8_t*)src, srcWidth, span);
+ break;
+ case 2:
+ scale_row((uint16_t*)dest, dstWidth, (uint16_t*)src, srcWidth, span);
+ break;
+ case 4:
+ scale_row((uint32_t*)dest, dstWidth, (uint32_t*)src, srcWidth, span);
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ }
+ dest += destStride;
+ // Step source according to height ratio.
+ for (frac += srcHeight; frac >= dstHeight; frac -= dstHeight) {
+ src += srcStride;
+ }
+ }
+}
+
+static void linear_row(uint32_t* dest, int span, const vec2_scalar& srcUV,
+ float srcDU, int srcZOffset, sampler2DArray sampler) {
+ vec2 uv = init_interp(srcUV, vec2_scalar(srcDU, 0.0f));
+ for (; span >= 4; span -= 4) {
+ auto srcpx = textureLinearPackedRGBA8(sampler, ivec2(uv), srcZOffset);
+ unaligned_store(dest, srcpx);
+ dest += 4;
+ uv.x += 4 * srcDU;
+ }
+ if (span > 0) {
+ auto srcpx = textureLinearPackedRGBA8(sampler, ivec2(uv), srcZOffset);
+ auto mask = span_mask_RGBA8(span);
+ auto dstpx = unaligned_load<PackedRGBA8>(dest);
+ unaligned_store(dest, (mask & dstpx) | (~mask & srcpx));
+ }
+}
+
+static void linear_row(uint8_t* dest, int span, const vec2_scalar& srcUV,
+ float srcDU, int srcZOffset, sampler2DArray sampler) {
+ vec2 uv = init_interp(srcUV, vec2_scalar(srcDU, 0.0f));
+ for (; span >= 4; span -= 4) {
+ auto srcpx = textureLinearPackedR8(sampler, ivec2(uv), srcZOffset);
+ unaligned_store(dest, pack(srcpx));
+ dest += 4;
+ uv.x += 4 * srcDU;
+ }
+ if (span > 0) {
+ auto srcpx = textureLinearPackedR8(sampler, ivec2(uv), srcZOffset);
+ auto mask = span_mask_R8(span);
+ auto dstpx = unpack(unaligned_load<PackedR8>(dest));
+ unaligned_store(dest, pack((mask & dstpx) | (~mask & srcpx)));
+ }
+}
+
+static void linear_blit(Texture& srctex, const IntRect& srcReq, int srcZ,
+ Texture& dsttex, const IntRect& dstReq, int dstZ,
+ bool invertY) {
+ assert(srctex.internal_format == GL_RGBA8 ||
+ srctex.internal_format == GL_R8);
+ // Compute valid dest bounds
+ IntRect dstBounds = dsttex.sample_bounds(dstReq, invertY);
+ // Check if sampling bounds are empty
+ if (dstBounds.is_empty()) {
+ return;
+ }
+ // Initialize sampler for source texture
+ sampler2DArray_impl sampler;
+ init_sampler(&sampler, srctex);
+ init_depth(&sampler, srctex);
+ sampler.filter = TextureFilter::LINEAR;
+ // Compute source UVs
+ int srcZOffset = srcZ * sampler.height_stride;
+ vec2_scalar srcUV(srcReq.x0, srcReq.y0);
+ vec2_scalar srcDUV(float(srcReq.width()) / dstReq.width(),
+ float(srcReq.height()) / dstReq.height());
+ // Skip to clamped source start
+ srcUV += srcDUV * vec2_scalar(dstBounds.x0, dstBounds.y0);
+ // Offset source UVs to texel centers and scale by lerp precision
+ srcUV = linearQuantize(srcUV + 0.5f, 128);
+ srcDUV *= 128.0f;
+ // Calculate dest pointer from clamped offsets
+ int bpp = dsttex.bpp();
+ int destStride = dsttex.stride(bpp);
+ char* dest = dsttex.sample_ptr(dstReq, dstBounds, dstZ, invertY);
+ // Inverted Y must step downward along dest rows
+ if (invertY) {
+ destStride = -destStride;
+ }
+ int span = dstBounds.width();
+ for (int rows = dstBounds.height(); rows > 0; rows--) {
+ switch (bpp) {
+ case 1:
+ linear_row((uint8_t*)dest, span, srcUV, srcDUV.x, srcZOffset,
+ &sampler);
+ break;
+ case 4:
+ linear_row((uint32_t*)dest, span, srcUV, srcDUV.x, srcZOffset,
+ &sampler);
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ dest += destStride;
+ srcUV.y += srcDUV.y;
+ }
+}
+
+extern "C" {
+
+void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter) {
+ assert(mask == GL_COLOR_BUFFER_BIT);
+ Framebuffer* srcfb = get_framebuffer(GL_READ_FRAMEBUFFER);
+ if (!srcfb || srcfb->layer < 0) return;
+ Framebuffer* dstfb = get_framebuffer(GL_DRAW_FRAMEBUFFER);
+ if (!dstfb || dstfb->layer < 0) return;
+ Texture& srctex = ctx->textures[srcfb->color_attachment];
+ if (!srctex.buf || srcfb->layer >= max(srctex.depth, 1)) return;
+ Texture& dsttex = ctx->textures[dstfb->color_attachment];
+ if (!dsttex.buf || dstfb->layer >= max(dsttex.depth, 1)) return;
+ if (srctex.internal_format != dsttex.internal_format) {
+ assert(false);
+ return;
+ }
+ // Force flipped Y onto dest coordinates
+ if (srcY1 < srcY0) {
+ swap(srcY0, srcY1);
+ swap(dstY0, dstY1);
+ }
+ bool invertY = dstY1 < dstY0;
+ if (invertY) {
+ swap(dstY0, dstY1);
+ }
+ IntRect srcReq = {srcX0, srcY0, srcX1, srcY1};
+ IntRect dstReq = {dstX0, dstY0, dstX1, dstY1};
+ if (srcReq.is_empty() || dstReq.is_empty()) {
+ return;
+ }
+ prepare_texture(srctex);
+ prepare_texture(dsttex, &dstReq);
+ if (!srcReq.same_size(dstReq) && filter == GL_LINEAR &&
+ (srctex.internal_format == GL_RGBA8 ||
+ srctex.internal_format == GL_R8)) {
+ linear_blit(srctex, srcReq, srcfb->layer, dsttex, dstReq, dstfb->layer,
+ invertY);
+ } else {
+ scale_blit(srctex, srcReq, srcfb->layer, dsttex, dstReq, dstfb->layer,
+ invertY);
+ }
+}
+
+void Finish() {}
+
+void MakeCurrent(void* ctx_ptr) {
+ ctx = (Context*)ctx_ptr;
+ if (ctx) {
+ setup_program(ctx->current_program);
+ blend_key = ctx->blend ? ctx->blend_key : BLEND_KEY_NONE;
+ } else {
+ setup_program(0);
+ blend_key = BLEND_KEY_NONE;
+ }
+}
+
+void* CreateContext() { return new Context; }
+
+void DestroyContext(void* ctx_ptr) {
+ if (!ctx_ptr) {
+ return;
+ }
+ if (ctx == ctx_ptr) {
+ MakeCurrent(nullptr);
+ }
+ delete (Context*)ctx_ptr;
+}
+
+void Composite(GLuint srcId, GLint srcX, GLint srcY, GLsizei srcWidth,
+ GLsizei srcHeight, GLint dstX, GLint dstY, GLboolean opaque,
+ GLboolean flip) {
+ Framebuffer& fb = ctx->framebuffers[0];
+ if (!fb.color_attachment) {
+ return;
+ }
+ Texture& srctex = ctx->textures[srcId];
+ if (!srctex.buf) return;
+ prepare_texture(srctex);
+ Texture& dsttex = ctx->textures[fb.color_attachment];
+ if (!dsttex.buf) return;
+ assert(srctex.bpp() == 4);
+ const int bpp = 4;
+ size_t src_stride = srctex.stride(bpp);
+ size_t dest_stride = dsttex.stride(bpp);
+ if (srcY < 0) {
+ dstY -= srcY;
+ srcHeight += srcY;
+ srcY = 0;
+ }
+ if (dstY < 0) {
+ srcY -= dstY;
+ srcHeight += dstY;
+ dstY = 0;
+ }
+ if (srcY + srcHeight > srctex.height) {
+ srcHeight = srctex.height - srcY;
+ }
+ if (dstY + srcHeight > dsttex.height) {
+ srcHeight = dsttex.height - dstY;
+ }
+ IntRect skip = {dstX, dstY, dstX + srcWidth, dstY + srcHeight};
+ prepare_texture(dsttex, &skip);
+ char* dest = dsttex.sample_ptr(dstX, flip ? dsttex.height - 1 - dstY : dstY,
+ fb.layer, bpp, dest_stride);
+ char* src = srctex.sample_ptr(srcX, srcY, 0, bpp, src_stride);
+ if (flip) {
+ dest_stride = -dest_stride;
+ }
+ if (opaque) {
+ for (int y = 0; y < srcHeight; y++) {
+ memcpy(dest, src, srcWidth * bpp);
+ dest += dest_stride;
+ src += src_stride;
+ }
+ } else {
+ for (int y = 0; y < srcHeight; y++) {
+ char* end = src + srcWidth * bpp;
+ while (src + 4 * bpp <= end) {
+ WideRGBA8 srcpx = unpack(unaligned_load<PackedRGBA8>(src));
+ WideRGBA8 dstpx = unpack(unaligned_load<PackedRGBA8>(dest));
+ PackedRGBA8 r = pack(srcpx + dstpx - muldiv255(dstpx, alphas(srcpx)));
+ unaligned_store(dest, r);
+ src += 4 * bpp;
+ dest += 4 * bpp;
+ }
+ if (src < end) {
+ WideRGBA8 srcpx = unpack(unaligned_load<PackedRGBA8>(src));
+ WideRGBA8 dstpx = unpack(unaligned_load<PackedRGBA8>(dest));
+ U32 r = bit_cast<U32>(
+ pack(srcpx + dstpx - muldiv255(dstpx, alphas(srcpx))));
+ unaligned_store(dest, r.x);
+ if (src + bpp < end) {
+ unaligned_store(dest + bpp, r.y);
+ if (src + 2 * bpp < end) {
+ unaligned_store(dest + 2 * bpp, r.z);
+ }
+ }
+ dest += end - src;
+ src = end;
+ }
+ dest += dest_stride - srcWidth * bpp;
+ src += src_stride - srcWidth * bpp;
+ }
+ }
+}
+
+} // extern "C"
diff --git a/third_party/webrender/swgl/src/gl_defs.h b/third_party/webrender/swgl/src/gl_defs.h
new file mode 100644
index 00000000000..c7e87230a3d
--- /dev/null
+++ b/third_party/webrender/swgl/src/gl_defs.h
@@ -0,0 +1,176 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+typedef int8_t GLbyte;
+typedef uint8_t GLubyte;
+typedef int16_t GLshort;
+typedef uint16_t GLushort;
+typedef int32_t GLint;
+typedef uint32_t GLuint;
+typedef int64_t GLint64;
+typedef uint64_t GLuint64;
+
+typedef float GLfloat;
+typedef double GLdouble;
+
+typedef uint32_t GLenum;
+typedef int32_t GLboolean;
+typedef uint32_t GLbitfield;
+
+typedef int32_t GLsizei;
+typedef size_t GLsizeiptr;
+typedef intptr_t GLintptr;
+
+#define GL_NO_ERROR 0
+
+#define GL_RGBA32F 0x8814
+#define GL_RGBA8 0x8058
+#define GL_R8 0x8229
+#define GL_RGBA32I 0x8D82
+#define GL_BGRA8 0x93A1
+
+#define GL_BYTE 0x1400
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_SHORT 0x1402
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_INT 0x1404
+#define GL_UNSIGNED_INT 0x1405
+#define GL_FLOAT 0x1406
+
+#define GL_RED 0x1903
+#define GL_GREEN 0x1904
+#define GL_BLUE 0x1905
+#define GL_ALPHA 0x1906
+#define GL_RGB 0x1907
+#define GL_RGBA 0x1908
+#define GL_RGBA_INTEGER 0x8D99
+#define GL_BGRA 0x80E1
+
+#define GL_DEPTH_COMPONENT 0x1902
+#define GL_DEPTH_COMPONENT16 0x81A5
+#define GL_DEPTH_COMPONENT24 0x81A6
+#define GL_DEPTH_COMPONENT32 0x81A7
+
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+
+#define GL_READ_FRAMEBUFFER 0x8CA8
+#define GL_DRAW_FRAMEBUFFER 0x8CA9
+#define GL_FRAMEBUFFER 0x8D40
+#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
+#define GL_RENDERBUFFER 0x8D41
+#define GL_COLOR_ATTACHMENT0 0x8CE0
+#define GL_DEPTH_ATTACHMENT 0x8D00
+#define GL_STENCIL_ATTACHMENT 0x8D20
+#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
+#define GL_COLOR_BUFFER_BIT 0x00004000
+#define GL_DEPTH_BUFFER_BIT 0x00000100
+#define GL_STENCIL_BUFFER_BIT 0x00000400
+
+#define GL_PIXEL_PACK_BUFFER 0x88EB
+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
+#define GL_UNPACK_ROW_LENGTH 0x0CF2
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+
+#define GL_QUERY_RESULT 0x8866
+#define GL_QUERY_RESULT_AVAILABLE 0x8867
+#define GL_TIME_ELAPSED 0x88BF
+#define GL_SAMPLES_PASSED 0x8914
+
+#define GL_NEAREST 0x2600
+#define GL_LINEAR 0x2601
+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
+#define GL_TEXTURE_WRAP_S 0x2802
+#define GL_TEXTURE_WRAP_T 0x2803
+#define GL_TEXTURE_MAG_FILTER 0x2800
+#define GL_TEXTURE_MIN_FILTER 0x2801
+#define GL_CLAMP_TO_EDGE 0x812F
+#define GL_TEXTURE_2D 0x0DE1
+#define GL_TEXTURE_3D 0x806F
+#define GL_TEXTURE_2D_ARRAY 0x8C1A
+#define GL_TEXTURE_RECTANGLE 0x84F5
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE3 0x84C3
+#define GL_TEXTURE4 0x84C4
+#define GL_TEXTURE5 0x84C5
+#define GL_TEXTURE6 0x84C6
+#define GL_TEXTURE7 0x84C7
+#define GL_TEXTURE8 0x84C8
+#define GL_TEXTURE9 0x84C9
+#define GL_TEXTURE10 0x84CA
+#define GL_TEXTURE11 0x84CB
+#define GL_TEXTURE12 0x84CC
+#define GL_TEXTURE13 0x84CD
+#define GL_TEXTURE14 0x84CE
+#define GL_TEXTURE15 0x84CF
+#define GL_MAX_TEXTURE_UNITS 0x84E2
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define GL_MAX_TEXTURE_SIZE 0x0D33
+#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
+
+#define GL_VERTEX_SHADER 0x8B31
+#define GL_FRAGMENT_SHADER 0x8B30
+
+#define GL_BLEND 0x0BE2
+#define GL_ZERO 0
+#define GL_ONE 1
+#define GL_SRC_COLOR 0x0300
+#define GL_ONE_MINUS_SRC_COLOR 0x0301
+#define GL_SRC_ALPHA 0x0302
+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define GL_DST_ALPHA 0x0304
+#define GL_ONE_MINUS_DST_ALPHA 0x0305
+#define GL_DST_COLOR 0x0306
+#define GL_ONE_MINUS_DST_COLOR 0x0307
+#define GL_CONSTANT_COLOR 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
+#define GL_CONSTANT_ALPHA 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
+#define GL_SRC1_ALPHA 0x8589
+#define GL_SRC1_COLOR 0x88F9
+#define GL_ONE_MINUS_SRC1_COLOR 0x88FA
+#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
+
+#define GL_FUNC_ADD 0x8006
+
+#define GL_NEVER 0x0200
+#define GL_LESS 0x0201
+#define GL_EQUAL 0x0202
+#define GL_LEQUAL 0x0203
+#define GL_GREATER 0x0204
+#define GL_NOTEQUAL 0x0205
+#define GL_GEQUAL 0x0206
+#define GL_ALWAYS 0x0207
+#define GL_DEPTH_TEST 0x0B71
+#define GL_DEPTH_WRITEMASK 0x0B72
+
+#define GL_SCISSOR_TEST 0x0C11
+
+#define GL_VENDOR 0x1F00
+#define GL_RENDERER 0x1F01
+#define GL_VERSION 0x1F02
+#define GL_EXTENSIONS 0x1F03
+#define GL_NUM_EXTENSIONS 0x821D
+
+#define GL_POINTS 0x0000
+#define GL_LINES 0x0001
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_STRIP 0x0003
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_FAN 0x0006
+#define GL_QUADS 0x0007
diff --git a/third_party/webrender/swgl/src/glsl.h b/third_party/webrender/swgl/src/glsl.h
new file mode 100644
index 00000000000..cdedb43d567
--- /dev/null
+++ b/third_party/webrender/swgl/src/glsl.h
@@ -0,0 +1,3240 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// Some of this is copied from Skia and is governed by a BSD-style license
+// Every function in this file should be marked static and inline using SI.
+#define SI ALWAYS_INLINE static
+
+#include "vector_type.h"
+
+namespace glsl {
+
+#if USE_SSE2
+SI bool test_all(Bool cond) { return _mm_movemask_ps(cond) == 0xF; }
+SI bool test_any(Bool cond) { return _mm_movemask_ps(cond) != 0; }
+SI bool test_none(Bool cond) { return _mm_movemask_ps(cond) == 0; }
+#else
+SI bool test_all(Bool cond) {
+ return bit_cast<uint32_t>(CONVERT(cond, U8)) == 0xFFFFFFFFU;
+}
+SI bool test_any(Bool cond) { return bit_cast<uint32_t>(CONVERT(cond, U8)) != 0; }
+SI bool test_none(Bool cond) { return bit_cast<uint32_t>(CONVERT(cond, U8)) == 0; }
+#endif
+
+float make_float(float n) { return n; }
+
+float make_float(int32_t n) { return float(n); }
+
+float make_float(uint32_t n) { return float(n); }
+
+float make_float(bool n) { return float(n); }
+
+template <typename T>
+Float make_float(T v) {
+ return CONVERT(v, Float);
+}
+
+int32_t make_int(uint32_t n) { return n; }
+
+int32_t make_int(int32_t n) { return n; }
+
+int32_t make_int(float n) { return int32_t(n); }
+
+int32_t make_int(bool n) { return int32_t(n); }
+
+template <typename T>
+I32 make_int(T v) {
+ return CONVERT(v, I32);
+}
+
+uint32_t make_uint(uint32_t n) { return n; }
+
+uint32_t make_uint(int32_t n) { return n; }
+
+uint32_t make_uint(float n) { return uint32_t(n); }
+
+uint32_t make_uint(bool n) { return uint32_t(n); }
+
+template <typename T>
+U32 make_uint(T v) {
+ return CONVERT(v, U32);
+}
+
+template <typename T>
+T force_scalar(T n) {
+ return n;
+}
+
+float force_scalar(Float f) { return f[0]; }
+
+int32_t force_scalar(I32 i) { return i[0]; }
+
+struct vec4;
+struct ivec2;
+
+SI int32_t if_then_else(int32_t c, int32_t t, int32_t e) { return c ? t : e; }
+
+SI float if_then_else(int32_t c, float t, float e) { return c ? t : e; }
+
+SI Float if_then_else(I32 c, float t, float e) {
+ return bit_cast<Float>((c & bit_cast<I32>(Float(t))) | (~c & bit_cast<I32>(Float(e))));
+}
+
+SI I32 if_then_else(I32 c, int32_t t, int32_t e) {
+ return (c & I32(t)) | (~c & I32(e));
+}
+
+SI Float if_then_else(I32 c, Float t, Float e) {
+ return bit_cast<Float>((c & bit_cast<I32>(t)) | (~c & bit_cast<I32>(e)));
+}
+
+SI Float if_then_else(int32_t c, Float t, Float e) { return c ? t : e; }
+
+SI Bool if_then_else(I32 c, Bool t, Bool e) { return (c & t) | (~c & e); }
+
+SI Bool if_then_else(int32_t c, Bool t, Bool e) { return c ? t : e; }
+
+template <typename T> SI void swap(T& a, T& b) {
+ T t(a);
+ a = b;
+ b = t;
+}
+
+SI int32_t min(int32_t a, int32_t b) { return a < b ? a : b; }
+SI int32_t max(int32_t a, int32_t b) { return a > b ? a : b; }
+
+SI int32_t clamp(int32_t a, int32_t minVal, int32_t maxVal) {
+ return min(max(a, minVal), maxVal);
+}
+
+SI float min(float a, float b) { return a < b ? a : b; }
+SI float max(float a, float b) { return a > b ? a : b; }
+
+SI float clamp(float a, float minVal, float maxVal) {
+ return min(max(a, minVal), maxVal);
+}
+
+SI Float min(Float a, Float b) {
+#if USE_SSE2
+ return _mm_min_ps(a, b);
+#elif USE_NEON
+ return vminq_f32(a, b);
+#else
+ return if_then_else(a < b, a, b);
+#endif
+}
+
+SI Float max(Float a, Float b) {
+#if USE_SSE2
+ return _mm_max_ps(a, b);
+#elif USE_NEON
+ return vmaxq_f32(a, b);
+#else
+ return if_then_else(a > b, a, b);
+#endif
+}
+
+SI Float clamp(Float a, Float minVal, Float maxVal) {
+ return min(max(a, minVal), maxVal);
+}
+
+#define sqrt __glsl_sqrt
+
+SI float sqrt(float x) { return sqrtf(x); }
+
+SI Float sqrt(Float v) {
+#if USE_SSE2
+ return _mm_sqrt_ps(v);
+#elif USE_NEON
+ Float e = vrsqrteq_f32(v);
+ e *= vrsqrtsq_f32(v, e * e);
+ e *= vrsqrtsq_f32(v, e * e);
+ return v * e;
+#else
+ return (Float){sqrtf(v.x), sqrtf(v.y), sqrtf(v.z), sqrtf(v.w)};
+#endif
+}
+
+SI float inversesqrt(float x) { return 1.0f / sqrtf(x); }
+
+SI Float inversesqrt(Float v) {
+#if USE_SSE2
+ return _mm_rsqrt_ps(v);
+#elif USE_NEON
+ Float e = vrsqrteq_f32(v);
+ return vrsqrtsq_f32(v, e * e) * e;
+#else
+ return 1.0f / sqrt(v);
+#endif
+}
+
+SI float step(float edge, float x) { return float(x >= edge); }
+
+SI Float step(Float edge, Float x) {
+ return if_then_else(x < edge, Float(0), Float(1));
+}
+
+/*
+enum RGBA {
+ R,
+ G,
+ B,
+ A
+};*/
+
+enum XYZW {
+ X = 0,
+ Y = 1,
+ Z = 2,
+ W = 3,
+ R = 0,
+ G = 1,
+ B = 2,
+ A = 3,
+};
+
+struct bvec2_scalar {
+ bool x;
+ bool y;
+
+ bvec2_scalar() : bvec2_scalar(false) {}
+ constexpr bvec2_scalar(bool a) : x(a), y(a) {}
+ constexpr bvec2_scalar(bool x, bool y) : x(x), y(y) {}
+};
+
+struct bvec2 {
+ bvec2() : bvec2(0) {}
+ bvec2(Bool a) : x(a), y(a) {}
+ bvec2(Bool x, Bool y) : x(x), y(y) {}
+ Bool& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ default:
+ UNREACHABLE;
+ }
+ }
+ Bool sel(XYZW c1) { return select(c1); }
+
+ bvec2 operator~() { return bvec2(~x, ~y); }
+
+ Bool x;
+ Bool y;
+};
+
+bvec2_scalar make_bvec2(bool n) { return bvec2_scalar{n, n}; }
+
+bvec2_scalar make_bvec2(bool x, bool y) { return bvec2_scalar{x, y}; }
+
+template <typename N>
+bvec2 make_bvec2(const N& n) {
+ return bvec2(n);
+}
+
+template <typename X, typename Y>
+bvec2 make_bvec2(const X& x, const Y& y) {
+ return bvec2(x, y);
+}
+
+struct vec4_scalar;
+
+struct vec2_scalar {
+ typedef struct vec2 vector_type;
+ typedef float element_type;
+
+ float x;
+ float y;
+
+ constexpr vec2_scalar() : vec2_scalar(0.0f) {}
+ constexpr vec2_scalar(float a) : x(a), y(a) {}
+ constexpr vec2_scalar(int a) : x(a), y(a) {}
+ constexpr vec2_scalar(float x, float y) : x(x), y(y) {}
+
+ float& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ default:
+ UNREACHABLE;
+ }
+ }
+ float& sel(XYZW c1) { return select(c1); }
+ vec2_scalar sel(XYZW c1, XYZW c2) {
+ return vec2_scalar(select(c1), select(c2));
+ }
+ vec4_scalar sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4);
+
+ friend bool operator==(const vec2_scalar& l, const vec2_scalar& r) {
+ return l.x == r.x && l.y == r.y;
+ }
+
+ friend bool operator!=(const vec2_scalar& l, const vec2_scalar& r) {
+ return l.x != r.x || l.y != r.y;
+ }
+
+ friend vec2_scalar operator*(float a, vec2_scalar b) {
+ return vec2_scalar(a * b.x, a * b.y);
+ }
+ friend vec2_scalar operator*(vec2_scalar a, float b) {
+ return vec2_scalar(a.x * b, a.y * b);
+ }
+ friend vec2_scalar operator*(vec2_scalar a, vec2_scalar b) {
+ return vec2_scalar(a.x * b.x, a.y * b.y);
+ }
+ friend vec2_scalar operator/(vec2_scalar a, vec2_scalar b) {
+ return vec2_scalar(a.x / b.x, a.y / b.y);
+ }
+
+ friend vec2_scalar operator-(vec2_scalar a, vec2_scalar b) {
+ return vec2_scalar(a.x - b.x, a.y - b.y);
+ }
+ friend vec2_scalar operator+(vec2_scalar a, vec2_scalar b) {
+ return vec2_scalar(a.x + b.x, a.y + b.y);
+ }
+ friend vec2_scalar operator+(vec2_scalar a, float b) {
+ return vec2_scalar(a.x + b, a.y + b);
+ }
+
+ vec2_scalar operator-() { return vec2_scalar(-x, -y); }
+
+ vec2_scalar operator*=(vec2_scalar a) {
+ x *= a.x;
+ y *= a.y;
+ return *this;
+ }
+
+ vec2_scalar operator+=(vec2_scalar a) {
+ x += a.x;
+ y += a.y;
+ return *this;
+ }
+
+ vec2_scalar operator-=(vec2_scalar a) {
+ x -= a.x;
+ y -= a.y;
+ return *this;
+ }
+};
+
+struct vec2_scalar_ref {
+ vec2_scalar_ref(float& x, float& y) : x(x), y(y) {}
+ float& x;
+ float& y;
+
+ float& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ default:
+ UNREACHABLE;
+ }
+ }
+ float& sel(XYZW c1) { return select(c1); }
+
+ vec2_scalar_ref& operator=(const vec2_scalar& a) {
+ x = a.x;
+ y = a.y;
+ return *this;
+ }
+ vec2_scalar_ref& operator*=(vec2_scalar a) {
+ x *= a.x;
+ y *= a.y;
+ return *this;
+ }
+ operator vec2_scalar() const { return vec2_scalar{x, y}; }
+};
+
+struct vec2 {
+ typedef struct vec2 vector_type;
+ typedef float element_type;
+
+ constexpr vec2() : vec2(Float(0.0f)) {}
+ constexpr vec2(Float a) : x(a), y(a) {}
+ vec2(Float x, Float y) : x(x), y(y) {}
+ constexpr vec2(vec2_scalar s) : x(s.x), y(s.y) {}
+ constexpr vec2(vec2_scalar s0, vec2_scalar s1, vec2_scalar s2, vec2_scalar s3)
+ : x(Float{s0.x, s1.x, s2.x, s3.x}), y(Float{s0.y, s1.y, s2.y, s3.y}) {}
+ vec2(ivec2 a);
+ Float x;
+ Float y;
+
+ Float& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ default:
+ UNREACHABLE;
+ }
+ }
+ Float& sel(XYZW c1) { return select(c1); }
+ vec2 sel(XYZW c1, XYZW c2) { return vec2(select(c1), select(c2)); }
+
+ vec4 sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4);
+
+ vec2 operator*=(Float a) {
+ x *= a;
+ y *= a;
+ return *this;
+ }
+ vec2 operator*=(vec2 a) {
+ x *= a.x;
+ y *= a.y;
+ return *this;
+ }
+
+ vec2 operator/=(Float a) {
+ x /= a;
+ y /= a;
+ return *this;
+ }
+ vec2 operator/=(vec2 a) {
+ x /= a.x;
+ y /= a.y;
+ return *this;
+ }
+
+ vec2 operator+=(vec2 a) {
+ x += a.x;
+ y += a.y;
+ return *this;
+ }
+ vec2 operator-=(vec2 a) {
+ x -= a.x;
+ y -= a.y;
+ return *this;
+ }
+ vec2 operator-=(Float a) {
+ x -= a;
+ y -= a;
+ return *this;
+ }
+
+ vec2 operator-() { return vec2(-x, -y); }
+
+ friend I32 operator==(const vec2& l, const vec2& r) {
+ return l.x == r.x && l.y == r.y;
+ }
+
+ friend I32 operator!=(const vec2& l, const vec2& r) {
+ return l.x != r.x || l.y != r.y;
+ }
+
+ friend vec2 operator*(vec2 a, Float b) { return vec2(a.x * b, a.y * b); }
+ friend vec2 operator*(vec2 a, vec2 b) { return vec2(a.x * b.x, a.y * b.y); }
+ friend vec2 operator*(Float a, vec2 b) { return vec2(a * b.x, a * b.y); }
+
+ friend vec2 operator/(vec2 a, vec2 b) { return vec2(a.x / b.x, a.y / b.y); }
+ friend vec2 operator/(vec2 a, Float b) { return vec2(a.x / b, a.y / b); }
+
+ friend vec2 operator-(vec2 a, vec2 b) { return vec2(a.x - b.x, a.y - b.y); }
+ friend vec2 operator-(vec2 a, Float b) { return vec2(a.x - b, a.y - b); }
+ friend vec2 operator-(Float a, vec2 b) { return vec2(a - b.x, a - b.y); }
+ friend vec2 operator+(vec2 a, vec2 b) { return vec2(a.x + b.x, a.y + b.y); }
+ friend vec2 operator+(vec2 a, Float b) { return vec2(a.x + b, a.y + b); }
+ friend vec2 operator+(Float a, vec2 b) { return vec2(a + b.x, a + b.y); }
+};
+
+vec2_scalar force_scalar(const vec2& v) {
+ return vec2_scalar{force_scalar(v.x), force_scalar(v.y)};
+}
+
+vec2_scalar make_vec2(float n) { return vec2_scalar{n, n}; }
+
+vec2_scalar make_vec2(float x, float y) { return vec2_scalar{x, y}; }
+
+vec2_scalar make_vec2(int32_t x, int32_t y) {
+ return vec2_scalar{float(x), float(y)};
+}
+
+template <typename N>
+vec2 make_vec2(const N& n) {
+ return vec2(n);
+}
+
+template <typename X, typename Y>
+vec2 make_vec2(const X& x, const Y& y) {
+ return vec2(x, y);
+}
+
+vec2 operator*(vec2_scalar a, Float b) { return vec2(a.x * b, a.y * b); }
+
+vec2 operator*(Float a, vec2_scalar b) { return vec2(a * b.x, a * b.y); }
+
+SI vec2 min(vec2 a, vec2 b) { return vec2(min(a.x, b.x), min(a.y, b.y)); }
+
+SI vec2_scalar min(vec2_scalar a, vec2_scalar b) {
+ return vec2_scalar{min(a.x, b.x), min(a.y, b.y)};
+}
+
+SI vec2 if_then_else(I32 c, vec2 t, vec2 e) {
+ return vec2(if_then_else(c, t.x, e.x), if_then_else(c, t.y, e.y));
+}
+
+SI vec2 if_then_else(int32_t c, vec2 t, vec2 e) { return c ? t : e; }
+
+vec2 step(vec2 edge, vec2 x) {
+ return vec2(step(edge.x, x.x), step(edge.y, x.y));
+}
+
+vec2 max(vec2 a, vec2 b) { return vec2(max(a.x, b.x), max(a.y, b.y)); }
+vec2 max(vec2 a, Float b) { return vec2(max(a.x, b), max(a.y, b)); }
+
+SI vec2_scalar max(vec2_scalar a, vec2_scalar b) {
+ return vec2_scalar{max(a.x, b.x), max(a.y, b.y)};
+}
+SI vec2_scalar max(vec2_scalar a, float b) {
+ return vec2_scalar{max(a.x, b), max(a.y, b)};
+}
+
+Float length(vec2 a) { return sqrt(a.x * a.x + a.y * a.y); }
+
+float length(vec2_scalar a) { return hypotf(a.x, a.y); }
+
+SI Float distance(vec2 a, vec2 b) { return length(a - b); }
+
+SI vec2 normalize(vec2 a) { return a / length(a); }
+
+#define abs __glsl_abs
+
+int32_t abs(int32_t a) { return a < 0 ? -a : a; }
+
+float abs(float a) { return fabsf(a); }
+
+Float abs(Float v) {
+#if USE_NEON
+ return vabsq_f32(v);
+#else
+ return bit_cast<Float>(bit_cast<I32>(v) & bit_cast<I32>(0.0f - v));
+#endif
+}
+
+Float cast(U32 v) { return CONVERT((I32)v, Float); }
+Float cast(I32 v) { return CONVERT((I32)v, Float); }
+I32 cast(Float v) { return CONVERT(v, I32); }
+
+#define floor __glsl_floor
+
+float floor(float a) { return floorf(a); }
+
+Float floor(Float v) {
+ Float roundtrip = cast(cast(v));
+ return roundtrip - if_then_else(roundtrip > v, Float(1), Float(0));
+}
+
+vec2 floor(vec2 v) { return vec2(floor(v.x), floor(v.y)); }
+
+vec2_scalar floor(vec2_scalar v) {
+ return vec2_scalar{floorf(v.x), floorf(v.y)};
+}
+
+#define ceil __glsl_ceil
+
+float ceil(float a) { return ceilf(a); }
+
+Float ceil(Float v) {
+ Float roundtrip = cast(cast(v));
+ return roundtrip + if_then_else(roundtrip < v, Float(1), Float(0));
+}
+
+// Round to nearest even
+SI int32_t roundeven(float v, float scale) {
+#if USE_SSE2
+ return _mm_cvtss_si32(_mm_set_ss(v * scale));
+#else
+ return bit_cast<int32_t>(v * scale + float(0xC00000)) - 0x4B400000;
+#endif
+}
+
+SI I32 roundeven(Float v, Float scale) {
+#if USE_SSE2
+ return _mm_cvtps_epi32(v * scale);
+#else
+ // Magic number implementation of round-to-nearest-even
+ // see http://stereopsis.com/sree/fpu2006.html
+ return bit_cast<I32>(v * scale + Float(0xC00000)) - 0x4B400000;
+#endif
+}
+
+// Round towards zero
+SI int32_t roundzero(float v, float scale) { return int32_t(v * scale); }
+
+SI I32 roundzero(Float v, Float scale) { return cast(v * scale); }
+
+// Round whichever direction is fastest for positive numbers
+SI I32 roundfast(Float v, Float scale) {
+#if USE_SSE2
+ return _mm_cvtps_epi32(v * scale);
+#else
+ return cast(v * scale + 0.5f);
+#endif
+}
+
+template <typename T> SI auto round_pixel(T v) { return roundfast(v, 255.0f); }
+
+#define round __glsl_round
+
+float round(float a) { return roundf(a); }
+
+float fract(float a) { return a - floor(a); }
+
+Float round(Float v) { return floor(v + 0.5f); }
+
+Float fract(Float v) { return v - floor(v); }
+
+// X derivatives can be approximated by dFdx(x) = x[1] - x[0].
+// Y derivatives are not easily available since we operate in terms of X spans
+// only. To work around, assume dFdy(p.x) = dFdx(p.y), which only holds for
+// uniform scaling, and thus abs(dFdx(p.x)) + abs(dFdy(p.x)) = abs(dFdx(p.x)) +
+// abs(dFdx(p.y)) which mirrors abs(dFdx(p.y)) + abs(dFdy(p.y)) = abs(dFdx(p.y))
+// + abs(dFdx(p.x)).
+vec2 fwidth(vec2 p) {
+ Float d = abs(SHUFFLE(p.x, p.y, 1, 1, 5, 5) - SHUFFLE(p.x, p.y, 0, 0, 4, 4));
+ return vec2(d.xyxy + d.zwzw);
+}
+
+// See
+// http://www.machinedlearnings.com/2011/06/fast-approximate-logarithm-exponential.html.
+Float approx_log2(Float x) {
+ // e - 127 is a fair approximation of log2(x) in its own right...
+ Float e = cast(bit_cast<U32>(x)) * (1.0f / (1 << 23));
+
+ // ... but using the mantissa to refine its error is _much_ better.
+ Float m = bit_cast<Float>((bit_cast<U32>(x) & 0x007fffff) | 0x3f000000);
+ return e - 124.225514990f - 1.498030302f * m -
+ 1.725879990f / (0.3520887068f + m);
+}
+Float approx_pow2(Float x) {
+ Float f = fract(x);
+ return bit_cast<Float>(
+ roundfast(1.0f * (1 << 23), x + 121.274057500f - 1.490129070f * f +
+ 27.728023300f / (4.84252568f - f)));
+}
+
+// From skia
+Float pow(Float x, Float y) {
+ return if_then_else((x == 0) | (x == 1), x, approx_pow2(approx_log2(x) * y));
+}
+
+Float exp(Float y) {
+ float x = 2.718281828459045235360287471352;
+ return approx_pow2(log2f(x) * y);
+}
+
+struct ivec4;
+
+struct ivec2_scalar {
+ typedef int32_t element_type;
+
+ int32_t x;
+ int32_t y;
+
+ ivec2_scalar() : ivec2_scalar(0) {}
+ constexpr ivec2_scalar(int32_t a) : x(a), y(a) {}
+ constexpr ivec2_scalar(int32_t x, int32_t y) : x(x), y(y) {}
+
+ int32_t& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ default:
+ UNREACHABLE;
+ }
+ }
+ int32_t& sel(XYZW c1) { return select(c1); }
+ ivec2_scalar sel(XYZW c1, XYZW c2) {
+ return ivec2_scalar{select(c1), select(c2)};
+ }
+
+ ivec2_scalar& operator+=(ivec2_scalar a) {
+ x += a.x;
+ y += a.y;
+ return *this;
+ }
+ ivec2_scalar& operator+=(int n) {
+ x += n;
+ y += n;
+ return *this;
+ }
+
+ ivec2_scalar& operator>>=(int shift) {
+ x >>= shift;
+ y >>= shift;
+ return *this;
+ }
+
+ friend ivec2_scalar operator&(ivec2_scalar a, int b) {
+ return ivec2_scalar{a.x & b, a.y & b};
+ }
+
+ friend ivec2_scalar operator+(ivec2_scalar a, ivec2_scalar b) {
+ return ivec2_scalar{a.x + b.x, a.y + b.y};
+ }
+};
+
+struct ivec2 {
+ typedef int32_t element_type;
+
+ ivec2() : ivec2(I32(0)) {}
+ ivec2(I32 a) : x(a), y(a) {}
+ ivec2(I32 x, I32 y) : x(x), y(y) {}
+ ivec2(vec2 a) : x(cast(a.x)), y(cast(a.y)) {}
+ ivec2(U32 x, U32 y) : x(CONVERT(x, I32)), y(CONVERT(y, I32)) {}
+ constexpr ivec2(ivec2_scalar s) : x(s.x), y(s.y) {}
+ constexpr ivec2(ivec2_scalar s0, ivec2_scalar s1, ivec2_scalar s2,
+ ivec2_scalar s3)
+ : x(I32{s0.x, s1.x, s2.x, s3.x}), y(I32{s0.y, s1.y, s2.y, s3.y}) {}
+ I32 x;
+ I32 y;
+
+ I32& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ default:
+ UNREACHABLE;
+ }
+ }
+ I32& sel(XYZW c1) { return select(c1); }
+
+ ivec2 sel(XYZW c1, XYZW c2) { return ivec2(select(c1), select(c2)); }
+
+ ivec4 sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4);
+
+ ivec2& operator*=(I32 a) {
+ x *= a;
+ y *= a;
+ return *this;
+ }
+ ivec2& operator+=(ivec2 a) {
+ x += a.x;
+ y += a.y;
+ return *this;
+ }
+ ivec2& operator>>=(int shift) {
+ x >>= shift;
+ y >>= shift;
+ return *this;
+ }
+
+ friend ivec2 operator*(ivec2 a, I32 b) { return ivec2(a.x * b, a.y * b); }
+ friend ivec2 operator&(ivec2 a, ivec2 b) {
+ return ivec2(a.x & b.x, a.y & b.y);
+ }
+ friend ivec2 operator&(ivec2 a, I32 b) { return ivec2(a.x & b, a.y & b); }
+ friend ivec2 operator+(ivec2 a, ivec2 b) {
+ return ivec2(a.x + b.x, a.y + b.y);
+ }
+};
+
+vec2::vec2(ivec2 a) : x(cast(a.x)), y(cast(a.y)) {}
+
+ivec2_scalar make_ivec2(int32_t n) { return ivec2_scalar{n, n}; }
+
+ivec2_scalar make_ivec2(uint32_t n) {
+ return ivec2_scalar{int32_t(n), int32_t(n)};
+}
+
+ivec2_scalar make_ivec2(int32_t x, int32_t y) { return ivec2_scalar{x, y}; }
+
+ivec2_scalar make_ivec2(uint32_t x, uint32_t y) {
+ return ivec2_scalar{int32_t(x), int32_t(y)};
+}
+
+vec2_scalar make_vec2(const ivec2_scalar& v) {
+ return vec2_scalar{float(v.x), float(v.y)};
+}
+
+ivec2_scalar make_ivec2(const vec2_scalar& v) {
+ return ivec2_scalar{int32_t(v.x), int32_t(v.y)};
+}
+
+template <typename N>
+ivec2 make_ivec2(const N& n) {
+ return ivec2(n);
+}
+
+template <typename X, typename Y>
+ivec2 make_ivec2(const X& x, const Y& y) {
+ return ivec2(x, y);
+}
+
+ivec2_scalar force_scalar(const ivec2& v) {
+ return ivec2_scalar{force_scalar(v.x), force_scalar(v.y)};
+}
+
+struct ivec3_scalar {
+ int32_t x;
+ int32_t y;
+ int32_t z;
+
+ ivec3_scalar() : ivec3_scalar(0) {}
+ constexpr ivec3_scalar(int32_t a) : x(a), y(a), z(a) {}
+ constexpr ivec3_scalar(int32_t x, int32_t y, int32_t z) : x(x), y(y), z(z) {}
+
+ int32_t& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ case Z:
+ return z;
+ default:
+ UNREACHABLE;
+ }
+ }
+ int32_t& sel(XYZW c1) { return select(c1); }
+ ivec2_scalar sel(XYZW c1, XYZW c2) {
+ return ivec2_scalar{select(c1), select(c2)};
+ }
+};
+
+struct ivec3 {
+ ivec3() : ivec3(0) {}
+ ivec3(I32 a) : x(a), y(a), z(a) {}
+ ivec3(I32 x, I32 y, I32 z) : x(x), y(y), z(z) {}
+ ivec3(ivec2 a, I32 b) : x(a.x), y(a.y), z(b) {}
+ ivec3(vec2 a, Float b) : x(cast(a.x)), y(cast(a.y)), z(cast(b)) {}
+ I32 x;
+ I32 y;
+ I32 z;
+
+ friend ivec3 operator+(ivec3 a, ivec3 b) {
+ return ivec3(a.x + b.x, a.y + b.y, a.z + b.z);
+ }
+};
+
+vec2_scalar make_vec2(ivec3_scalar s) {
+ return vec2_scalar{float(s.x), float(s.y)};
+}
+
+ivec3_scalar make_ivec3(int32_t n) { return ivec3_scalar{n, n, n}; }
+
+ivec3_scalar make_ivec3(const ivec2_scalar& v, int32_t z) {
+ return ivec3_scalar{v.x, v.y, z};
+}
+
+ivec3_scalar make_ivec3(int32_t x, int32_t y, int32_t z) {
+ return ivec3_scalar{x, y, z};
+}
+
+template <typename N>
+ivec3 make_ivec3(const N& n) {
+ return ivec3(n);
+}
+
+template <typename X, typename Y>
+ivec3 make_ivec3(const X& x, const Y& y) {
+ return ivec3(x, y);
+}
+
+template <typename X, typename Y, typename Z>
+ivec3 make_ivec3(const X& x, const Y& y, const Z& z) {
+ return ivec3(x, y, z);
+}
+
+struct ivec4_scalar {
+ typedef int32_t element_type;
+
+ int32_t x;
+ int32_t y;
+ int32_t z;
+ int32_t w;
+
+ ivec4_scalar() : ivec4_scalar(0) {}
+ constexpr ivec4_scalar(int32_t a) : x(a), y(a), z(a), w(a) {}
+ constexpr ivec4_scalar(int32_t x, int32_t y, int32_t z, int32_t w)
+ : x(x), y(y), z(z), w(w) {}
+
+ int32_t& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ case Z:
+ return z;
+ case W:
+ return w;
+ default:
+ UNREACHABLE;
+ }
+ }
+ int32_t& sel(XYZW c1) { return select(c1); }
+ ivec2_scalar sel(XYZW c1, XYZW c2) {
+ return ivec2_scalar{select(c1), select(c2)};
+ }
+
+ friend ivec4_scalar operator&(int32_t a, ivec4_scalar b) {
+ return ivec4_scalar{a & b.x, a & b.y, a & b.z, a & b.w};
+ }
+};
+
+struct ivec4 {
+ typedef int32_t element_type;
+
+ ivec4() : ivec4(I32(0)) {}
+ ivec4(I32 a) : x(a), y(a), z(a), w(a) {}
+ ivec4(I32 x, I32 y, I32 z, I32 w) : x(x), y(y), z(z), w(w) {}
+ ivec4(ivec2 a, I32 b, I32 c) : x(a.x), y(a.y), z(b), w(c) {}
+ constexpr ivec4(ivec4_scalar s) : x(s.x), y(s.y), z(s.z), w(s.w) {}
+ constexpr ivec4(ivec4_scalar s0, ivec4_scalar s1, ivec4_scalar s2,
+ ivec4_scalar s3)
+ : x(I32{s0.x, s1.x, s2.x, s3.x}),
+ y(I32{s0.y, s1.y, s2.y, s3.y}),
+ z(I32{s0.z, s1.z, s2.z, s3.z}),
+ w(I32{s0.w, s1.w, s2.w, s3.w}) {}
+
+ I32& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ case Z:
+ return z;
+ case W:
+ return w;
+ default:
+ UNREACHABLE;
+ }
+ }
+ I32 sel(XYZW c1) { return select(c1); }
+
+ ivec2 sel(XYZW c1, XYZW c2) { return ivec2(select(c1), select(c2)); }
+
+ ivec3 sel(XYZW c1, XYZW c2, XYZW c3) {
+ return ivec3(select(c1), select(c2), select(c3));
+ }
+
+ friend ivec4 operator&(I32 a, ivec4 b) {
+ return ivec4(a & b.x, a & b.y, a & b.z, a & b.w);
+ }
+
+ I32 x;
+ I32 y;
+ I32 z;
+ I32 w;
+};
+
+ivec4_scalar force_scalar(const ivec4& v) {
+ return ivec4_scalar{force_scalar(v.x), force_scalar(v.y), force_scalar(v.z),
+ force_scalar(v.w)};
+}
+
+ivec4_scalar make_ivec4(int32_t n) { return ivec4_scalar{n, n, n, n}; }
+
+ivec4_scalar make_ivec4(const ivec2_scalar& xy, int32_t z, int32_t w) {
+ return ivec4_scalar{xy.x, xy.y, z, w};
+}
+
+ivec4_scalar make_ivec4(int32_t x, int32_t y, int32_t z, int32_t w) {
+ return ivec4_scalar{x, y, z, w};
+}
+
+template <typename N>
+ivec4 make_ivec4(const N& n) {
+ return ivec4(n);
+}
+
+template <typename X, typename Y, typename Z>
+ivec4 make_ivec4(const X& x, const Y& y, const Z& z) {
+ return ivec4(x, y, z);
+}
+
+template <typename X, typename Y, typename Z, typename W>
+ivec4 make_ivec4(const X& x, const Y& y, const Z& z, const W& w) {
+ return ivec4(x, y, z, w);
+}
+
+SI ivec2 if_then_else(I32 c, ivec2 t, ivec2 e) {
+ return ivec2(if_then_else(c, t.x, e.x), if_then_else(c, t.y, e.y));
+}
+
+SI ivec2 if_then_else(int32_t c, ivec2 t, ivec2 e) { return c ? t : e; }
+
+SI ivec4 if_then_else(I32 c, ivec4 t, ivec4 e) {
+ return ivec4(if_then_else(c, t.x, e.x), if_then_else(c, t.y, e.y),
+ if_then_else(c, t.z, e.z), if_then_else(c, t.w, e.w));
+}
+
+SI ivec4 if_then_else(int32_t c, ivec4 t, ivec4 e) { return c ? t : e; }
+
+ivec4 operator&(I32 a, ivec4_scalar b) {
+ return ivec4(a & b.x, a & b.y, a & b.z, a & b.w);
+}
+
+struct bvec3_scalar {
+ bool x;
+ bool y;
+ bool z;
+
+ bvec3_scalar() : bvec3_scalar(false) {}
+ constexpr bvec3_scalar(bool a) : x(a), y(a), z(a) {}
+ constexpr bvec3_scalar(bool x, bool y, bool z) : x(x), y(y), z(z) {}
+};
+
+struct bvec3 {
+ bvec3() : bvec3(0) {}
+ bvec3(Bool a) : x(a), y(a), z(a) {}
+ bvec3(Bool x, Bool y, Bool z) : x(x), y(y), z(z) {}
+ Bool& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ case Z:
+ return z;
+ default:
+ UNREACHABLE;
+ }
+ }
+ Bool sel(XYZW c1) { return select(c1); }
+
+ Bool x;
+ Bool y;
+ Bool z;
+};
+
+struct bvec4_scalar {
+ bool x;
+ bool y;
+ bool z;
+ bool w;
+
+ bvec4_scalar() : bvec4_scalar(false) {}
+ constexpr bvec4_scalar(bool a) : x(a), y(a), z(a), w(a) {}
+ constexpr bvec4_scalar(bool x, bool y, bool z, bool w)
+ : x(x), y(y), z(z), w(w) {}
+};
+
+struct bvec4 {
+ bvec4() : bvec4(0) {}
+ bvec4(Bool a) : x(a), y(a), z(a), w(a) {}
+ bvec4(Bool x, Bool y, Bool z, Bool w) : x(x), y(y), z(z), w(w) {}
+ bvec4(bvec2 x, bvec2 y) : x(x.x), y(x.y), z(y.x), w(y.y) {}
+ Bool& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ case Z:
+ return z;
+ case W:
+ return w;
+ }
+ }
+ Bool sel(XYZW c1) { return select(c1); }
+
+ Bool x;
+ Bool y;
+ Bool z;
+ Bool w;
+};
+
+bvec4_scalar make_bvec4(bool n) { return bvec4_scalar{n, n, n, n}; }
+
+bvec4_scalar make_bvec4(bool x, bool y, bool z, bool w) {
+ return bvec4_scalar{x, y, z, w};
+}
+
+template <typename N>
+bvec4 make_bvec4(const N& n) {
+ return bvec4(n);
+}
+
+template <typename X, typename Y>
+bvec4 make_bvec4(const X& x, const Y& y) {
+ return bvec4(x, y);
+}
+
+template <typename X, typename Y, typename Z, typename W>
+bvec4 make_bvec4(const X& x, const Y& y, const Z& z, const W& w) {
+ return bvec4(x, y, z, w);
+}
+
+struct vec2_ref {
+ vec2_ref(Float& x, Float& y) : x(x), y(y) {}
+ Float& x;
+ Float& y;
+
+ Float& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ default:
+ UNREACHABLE;
+ }
+ }
+ Float& sel(XYZW c1) { return select(c1); }
+
+ vec2_ref& operator=(const vec2& a) {
+ x = a.x;
+ y = a.y;
+ return *this;
+ }
+
+ vec2_ref& operator/=(Float a) {
+ x /= a;
+ y /= a;
+ return *this;
+ }
+
+ vec2_ref& operator/=(vec2 a) {
+ x /= a.x;
+ y /= a.y;
+ return *this;
+ }
+
+ vec2_ref& operator+=(vec2 a) {
+ x += a.x;
+ y += a.y;
+ return *this;
+ }
+ vec2_ref& operator-=(vec2 a) {
+ x -= a.x;
+ y -= a.y;
+ return *this;
+ }
+ vec2_ref& operator*=(vec2 a) {
+ x *= a.x;
+ y *= a.y;
+ return *this;
+ }
+};
+
+struct vec3_scalar {
+ typedef struct vec3 vector_type;
+ typedef float element_type;
+
+ float x;
+ float y;
+ float z;
+
+ constexpr vec3_scalar() : vec3_scalar(0.0f) {}
+ constexpr vec3_scalar(float a) : x(a), y(a), z(a) {}
+ constexpr vec3_scalar(float x, float y, float z) : x(x), y(y), z(z) {}
+
+ float& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ case Z:
+ return z;
+ default:
+ UNREACHABLE;
+ }
+ }
+ float& sel(XYZW c1) { return select(c1); }
+ vec2_scalar sel(XYZW c1, XYZW c2) {
+ return vec2_scalar(select(c1), select(c2));
+ }
+ vec3_scalar sel(XYZW c1, XYZW c2, XYZW c3) {
+ return vec3_scalar(select(c1), select(c2), select(c3));
+ }
+ vec2_scalar_ref lsel(XYZW c1, XYZW c2) {
+ return vec2_scalar_ref(select(c1), select(c2));
+ }
+
+ friend vec3_scalar operator*(vec3_scalar a, vec3_scalar b) {
+ return vec3_scalar{a.x * b.x, a.y * b.y, a.z * b.z};
+ }
+ friend vec3_scalar operator*(vec3_scalar a, float b) {
+ return vec3_scalar{a.x * b, a.y * b, a.z * b};
+ }
+
+ friend vec3_scalar operator-(vec3_scalar a, vec3_scalar b) {
+ return vec3_scalar{a.x - b.x, a.y - b.y, a.z - b.z};
+ }
+ friend vec3_scalar operator+(vec3_scalar a, vec3_scalar b) {
+ return vec3_scalar{a.x + b.x, a.y + b.y, a.z + b.z};
+ }
+
+ friend vec3_scalar operator/(vec3_scalar a, float b) {
+ return vec3_scalar{a.x / b, a.y / b, a.z / b};
+ }
+
+ vec3_scalar operator+=(vec3_scalar a) {
+ x += a.x;
+ y += a.y;
+ z += a.z;
+ return *this;
+ }
+
+ friend bool operator==(const vec3_scalar& l, const vec3_scalar& r) {
+ return l.x == r.x && l.y == r.y && l.z == r.z;
+ }
+};
+
+struct vec3_scalar_ref {
+ vec3_scalar_ref(float& x, float& y, float& z) : x(x), y(y), z(z) {}
+ float& x;
+ float& y;
+ float& z;
+
+ float& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ case Z:
+ return z;
+ default:
+ UNREACHABLE;
+ }
+ }
+ float& sel(XYZW c1) { return select(c1); }
+
+ vec3_scalar_ref& operator=(const vec3_scalar& a) {
+ x = a.x;
+ y = a.y;
+ z = a.z;
+ return *this;
+ }
+
+ operator vec3_scalar() const { return vec3_scalar{x, y, z}; }
+};
+
+struct vec3 {
+ typedef struct vec3 vector_type;
+ typedef float element_type;
+
+ constexpr vec3() : vec3(Float(0.0f)) {}
+ constexpr vec3(Float a) : x(a), y(a), z(a) {}
+ constexpr vec3(Float x, Float y, Float z) : x(x), y(y), z(z) {}
+ vec3(vec2 a, Float z) : x(a.x), y(a.y), z(z) {}
+ constexpr vec3(vec3_scalar s) : x(s.x), y(s.y), z(s.z) {}
+ constexpr vec3(vec3_scalar s0, vec3_scalar s1, vec3_scalar s2, vec3_scalar s3)
+ : x(Float{s0.x, s1.x, s2.x, s3.x}),
+ y(Float{s0.y, s1.y, s2.y, s3.y}),
+ z(Float{s0.z, s1.z, s2.z, s3.z}) {}
+ Float x;
+ Float y;
+ Float z;
+
+ Float& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ case Z:
+ return z;
+ default:
+ UNREACHABLE;
+ }
+ }
+ Float& sel(XYZW c1) { return select(c1); }
+
+ vec2 sel(XYZW c1, XYZW c2) { return vec2(select(c1), select(c2)); }
+
+ vec3 sel(XYZW c1, XYZW c2, XYZW c3) {
+ return vec3(select(c1), select(c2), select(c3));
+ }
+
+ vec2_ref lsel(XYZW c1, XYZW c2) { return vec2_ref(select(c1), select(c2)); }
+
+ friend vec3 operator*(vec3 a, Float b) {
+ return vec3(a.x * b, a.y * b, a.z * b);
+ }
+ friend vec3 operator*(vec3 a, vec3 b) {
+ return vec3(a.x * b.x, a.y * b.y, a.z * b.z);
+ }
+ friend vec3 operator*(Float a, vec3 b) {
+ return vec3(a * b.x, a * b.y, a * b.z);
+ }
+
+ friend vec3 operator/(vec3 a, Float b) {
+ return vec3(a.x / b, a.y / b, a.z / b);
+ }
+
+ friend I32 operator==(const vec3& l, const vec3& r) {
+ return l.x == r.x && l.y == r.y && l.z == r.z;
+ }
+
+ friend vec3 operator-(vec3 a, Float b) {
+ return vec3(a.x - b, a.y - b, a.z - b);
+ }
+ friend vec3 operator-(vec3 a, vec3 b) {
+ return vec3(a.x - b.x, a.y - b.y, a.z - b.z);
+ }
+ friend vec3 operator+(vec3 a, Float b) {
+ return vec3(a.x + b, a.y + b, a.z + b);
+ }
+ friend vec3 operator+(vec3 a, vec3 b) {
+ return vec3(a.x + b.x, a.y + b.y, a.z + b.z);
+ }
+
+ vec3 operator+=(vec3_scalar a) {
+ x += a.x;
+ y += a.y;
+ z += a.z;
+ return *this;
+ }
+ vec3& operator+=(vec3 a) {
+ x += a.x;
+ y += a.y;
+ z += a.z;
+ return *this;
+ }
+};
+
+vec3_scalar force_scalar(const vec3& v) {
+ return vec3_scalar{force_scalar(v.x), force_scalar(v.y), force_scalar(v.z)};
+}
+
+vec3_scalar make_vec3(float n) { return vec3_scalar{n, n, n}; }
+
+vec3_scalar make_vec3(const vec2_scalar& v, float z) {
+ return vec3_scalar{v.x, v.y, z};
+}
+
+vec3_scalar make_vec3(float x, float y, float z) {
+ return vec3_scalar{x, y, z};
+}
+
+vec3_scalar make_vec3(int32_t x, int32_t y, float z) {
+ return vec3_scalar{float(x), float(y), z};
+}
+
+template <typename N>
+vec3 make_vec3(const N& n) {
+ return vec3(n);
+}
+
+template <typename X, typename Y>
+vec3 make_vec3(const X& x, const Y& y) {
+ return vec3(x, y);
+}
+
+template <typename X, typename Y, typename Z>
+vec3 make_vec3(const X& x, const Y& y, const Z& z) {
+ return vec3(x, y, z);
+}
+
+SI vec3 if_then_else(I32 c, vec3 t, vec3 e) {
+ return vec3(if_then_else(c, t.x, e.x), if_then_else(c, t.y, e.y),
+ if_then_else(c, t.z, e.z));
+}
+
+SI vec3 if_then_else(int32_t c, vec3 t, vec3 e) { return c ? t : e; }
+
+SI vec3 if_then_else(ivec3 c, vec3 t, vec3 e) {
+ return vec3(if_then_else(c.x, t.x, e.x), if_then_else(c.y, t.y, e.y),
+ if_then_else(c.z, t.z, e.z));
+}
+
+vec3 step(vec3 edge, vec3 x) {
+ return vec3(step(edge.x, x.x), step(edge.y, x.y), step(edge.z, x.z));
+}
+
+SI vec3 min(vec3 a, vec3 b) {
+ return vec3(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z));
+}
+SI vec3 max(vec3 a, vec3 b) {
+ return vec3(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z));
+}
+
+SI vec3_scalar max(vec3_scalar a, vec3_scalar b) {
+ return vec3_scalar{max(a.x, b.x), max(a.y, b.y), max(a.z, b.z)};
+}
+
+vec3 pow(vec3 x, vec3 y) {
+ return vec3(pow(x.x, y.x), pow(x.y, y.y), pow(x.z, y.z));
+}
+
+struct vec3_ref {
+ vec3_ref(Float& x, Float& y, Float& z) : x(x), y(y), z(z) {}
+ Float& x;
+ Float& y;
+ Float& z;
+ vec3_ref& operator=(const vec3& a) {
+ x = a.x;
+ y = a.y;
+ z = a.z;
+ return *this;
+ }
+
+ vec3_ref& operator/=(Float a) {
+ x /= a;
+ y /= a;
+ z /= a;
+ return *this;
+ }
+
+ vec3_ref& operator*=(Float a) {
+ x *= a;
+ y *= a;
+ z *= a;
+ return *this;
+ }
+};
+
+struct vec4_scalar {
+ typedef struct vec4 vector_type;
+ typedef float element_type;
+
+ float x;
+ float y;
+ float z;
+ float w;
+
+ constexpr vec4_scalar() : vec4_scalar(0.0f) {}
+ constexpr vec4_scalar(float a) : x(a), y(a), z(a), w(a) {}
+ constexpr vec4_scalar(float x, float y, float z, float w)
+ : x(x), y(y), z(z), w(w) {}
+ vec4_scalar(vec3_scalar xyz, float w) : x(xyz.x), y(xyz.y), z(xyz.z), w(w) {}
+
+ ALWAYS_INLINE float& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ case Z:
+ return z;
+ case W:
+ return w;
+ default:
+ UNREACHABLE;
+ }
+ }
+ float& sel(XYZW c1) { return select(c1); }
+ vec2_scalar sel(XYZW c1, XYZW c2) {
+ return vec2_scalar{select(c1), select(c2)};
+ }
+ vec3_scalar sel(XYZW c1, XYZW c2, XYZW c3) {
+ return vec3_scalar{select(c1), select(c2), select(c3)};
+ }
+ vec2_scalar_ref lsel(XYZW c1, XYZW c2) {
+ return vec2_scalar_ref(select(c1), select(c2));
+ }
+ vec3_scalar_ref lsel(XYZW c1, XYZW c2, XYZW c3) {
+ return vec3_scalar_ref(select(c1), select(c2), select(c3));
+ }
+
+ friend vec4_scalar operator*(vec4_scalar a, vec4_scalar b) {
+ return vec4_scalar{a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w};
+ }
+ friend vec4_scalar operator*(vec4_scalar a, float b) {
+ return vec4_scalar{a.x * b, a.y * b, a.z * b, a.w * b};
+ }
+ vec4_scalar& operator*=(float a) {
+ x *= a;
+ y *= a;
+ z *= a;
+ w *= a;
+ return *this;
+ }
+
+ friend vec4_scalar operator-(vec4_scalar a, vec4_scalar b) {
+ return vec4_scalar{a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w};
+ }
+ friend vec4_scalar operator+(vec4_scalar a, vec4_scalar b) {
+ return vec4_scalar{a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w};
+ }
+
+ friend vec4_scalar operator/(vec4_scalar a, vec4_scalar b) {
+ return vec4_scalar{a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w};
+ }
+
+ vec4_scalar& operator+=(vec4_scalar a) {
+ x += a.x;
+ y += a.y;
+ z += a.z;
+ w += a.w;
+ return *this;
+ }
+
+ vec4_scalar& operator/=(vec4_scalar a) {
+ x /= a.x;
+ y /= a.y;
+ z /= a.z;
+ w /= a.w;
+ return *this;
+ }
+};
+
+vec4_scalar vec2_scalar::sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4) {
+ return vec4_scalar{select(c1), select(c2), select(c3), select(c4)};
+}
+
+struct vec4 {
+ typedef struct vec4 vector_type;
+ typedef float element_type;
+
+ constexpr vec4() : vec4(Float(0.0f)) {}
+ constexpr vec4(Float a) : x(a), y(a), z(a), w(a) {}
+ vec4(Float x, Float y, Float z, Float w) : x(x), y(y), z(z), w(w) {}
+ vec4(vec3 xyz, Float w) : x(xyz.x), y(xyz.y), z(xyz.z), w(w) {}
+ vec4(vec2 xy, vec2 zw) : x(xy.x), y(xy.y), z(zw.x), w(zw.y) {}
+ vec4(vec2 xy, Float z, Float w) : x(xy.x), y(xy.y), z(z), w(w) {}
+ vec4(Float x, Float y, vec2 zw) : x(x), y(y), z(zw.x), w(zw.y) {}
+ constexpr vec4(vec4_scalar s) : x(s.x), y(s.y), z(s.z), w(s.w) {}
+ constexpr vec4(vec4_scalar s0, vec4_scalar s1, vec4_scalar s2, vec4_scalar s3)
+ : x(Float{s0.x, s1.x, s2.x, s3.x}),
+ y(Float{s0.y, s1.y, s2.y, s3.y}),
+ z(Float{s0.z, s1.z, s2.z, s3.z}),
+ w(Float{s0.w, s1.w, s2.w, s3.w}) {}
+ Float& select(XYZW c) {
+ switch (c) {
+ case X:
+ return x;
+ case Y:
+ return y;
+ case Z:
+ return z;
+ case W:
+ return w;
+ default:
+ UNREACHABLE;
+ }
+ }
+ Float& sel(XYZW c1) { return select(c1); }
+
+ vec2 sel(XYZW c1, XYZW c2) { return vec2(select(c1), select(c2)); }
+
+ vec3 sel(XYZW c1, XYZW c2, XYZW c3) {
+ return vec3(select(c1), select(c2), select(c3));
+ }
+ vec3_ref lsel(XYZW c1, XYZW c2, XYZW c3) {
+ return vec3_ref(select(c1), select(c2), select(c3));
+ }
+
+ vec2_ref lsel(XYZW c1, XYZW c2) { return vec2_ref(select(c1), select(c2)); }
+
+ Float& operator[](int index) {
+ switch (index) {
+ case 0:
+ return x;
+ case 1:
+ return y;
+ case 2:
+ return z;
+ case 3:
+ return w;
+ default:
+ UNREACHABLE;
+ }
+ }
+
+ // glsl supports non-const indexing of vecs.
+ // hlsl doesn't. The code it generates is probably not wonderful.
+ Float operator[](I32 index) {
+ float sel_x = 0;
+ switch (index.x) {
+ case 0:
+ sel_x = x.x;
+ break;
+ case 1:
+ sel_x = y.x;
+ break;
+ case 2:
+ sel_x = z.x;
+ break;
+ case 3:
+ sel_x = w.x;
+ break;
+ }
+ float sel_y = 0;
+ switch (index.y) {
+ case 0:
+ sel_y = x.y;
+ break;
+ case 1:
+ sel_y = y.y;
+ break;
+ case 2:
+ sel_y = z.y;
+ break;
+ case 3:
+ sel_y = w.y;
+ break;
+ }
+ float sel_z = 0;
+ switch (index.z) {
+ case 0:
+ sel_z = x.z;
+ break;
+ case 1:
+ sel_z = y.z;
+ break;
+ case 2:
+ sel_z = z.z;
+ break;
+ case 3:
+ sel_z = w.z;
+ break;
+ }
+ float sel_w = 0;
+ switch (index.w) {
+ case 0:
+ sel_w = x.w;
+ break;
+ case 1:
+ sel_w = y.w;
+ break;
+ case 2:
+ sel_w = z.w;
+ break;
+ case 3:
+ sel_w = w.w;
+ break;
+ }
+ Float ret = {sel_x, sel_y, sel_z, sel_w};
+ return ret;
+ }
+
+ friend vec4 operator/(vec4 a, Float b) {
+ return vec4(a.x / b, a.y / b, a.z / b, a.w / b);
+ }
+ friend vec4 operator/(vec4 a, vec4 b) {
+ return vec4(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w);
+ }
+
+ friend vec4 operator*(vec4 a, Float b) {
+ return vec4(a.x * b, a.y * b, a.z * b, a.w * b);
+ }
+
+ friend vec4 operator*(Float b, vec4 a) {
+ return vec4(a.x * b, a.y * b, a.z * b, a.w * b);
+ }
+ friend vec4 operator*(vec4 a, vec4 b) {
+ return vec4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
+ }
+
+ friend vec4 operator-(vec4 a, vec4 b) {
+ return vec4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w);
+ }
+ friend vec4 operator+(vec4 a, vec4 b) {
+ return vec4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w);
+ }
+ vec4& operator+=(vec4 a) {
+ x += a.x;
+ y += a.y;
+ z += a.z;
+ w += a.w;
+ return *this;
+ }
+ vec4& operator/=(vec4 a) {
+ x /= a.x;
+ y /= a.y;
+ z /= a.z;
+ w /= a.w;
+ return *this;
+ }
+ vec4& operator*=(Float a) {
+ x *= a;
+ y *= a;
+ z *= a;
+ w *= a;
+ return *this;
+ }
+
+ Float x;
+ Float y;
+ Float z;
+ Float w;
+};
+
+vec4_scalar force_scalar(const vec4& v) {
+ return vec4_scalar{force_scalar(v.x), force_scalar(v.y), force_scalar(v.z),
+ force_scalar(v.w)};
+}
+
+vec4_scalar make_vec4(float n) { return vec4_scalar{n, n, n, n}; }
+
+vec4_scalar make_vec4(const vec2_scalar& v, float z, float w) {
+ return vec4_scalar{v.x, v.y, z, w};
+}
+
+vec4_scalar make_vec4(const vec2_scalar& a, const vec2_scalar& b) {
+ return vec4_scalar{a.x, a.y, b.x, b.y};
+}
+
+vec4_scalar make_vec4(const vec3_scalar& v, float w) {
+ return vec4_scalar{v.x, v.y, v.z, w};
+}
+
+vec4_scalar make_vec4(float x, float y, float z, float w) {
+ return vec4_scalar{x, y, z, w};
+}
+
+vec4_scalar make_vec4(float x, float y, const vec2_scalar& v) {
+ return vec4_scalar{x, y, v.x, v.y};
+}
+
+template <typename N>
+vec4 make_vec4(const N& n) {
+ return vec4(n);
+}
+
+template <typename X, typename Y>
+vec4 make_vec4(const X& x, const Y& y) {
+ return vec4(x, y);
+}
+
+template <typename X, typename Y, typename Z>
+vec4 make_vec4(const X& x, const Y& y, const Z& z) {
+ return vec4(x, y, z);
+}
+
+template <typename X, typename Y, typename Z, typename W>
+vec4 make_vec4(const X& x, const Y& y, const Z& z, const W& w) {
+ return vec4(x, y, z, w);
+}
+
+SI ivec4 roundfast(vec4 v, Float scale) {
+ return ivec4(roundfast(v.x, scale), roundfast(v.y, scale),
+ roundfast(v.z, scale), roundfast(v.w, scale));
+}
+
+vec4 operator*(vec4_scalar a, Float b) {
+ return vec4(a.x * b, a.y * b, a.z * b, a.w * b);
+}
+
+SI vec4 if_then_else(I32 c, vec4 t, vec4 e) {
+ return vec4(if_then_else(c, t.x, e.x), if_then_else(c, t.y, e.y),
+ if_then_else(c, t.z, e.z), if_then_else(c, t.w, e.w));
+}
+
+SI vec4 if_then_else(int32_t c, vec4 t, vec4 e) { return c ? t : e; }
+
+SI vec2 clamp(vec2 a, vec2 minVal, vec2 maxVal) {
+ return vec2(clamp(a.x, minVal.x, maxVal.x), clamp(a.y, minVal.y, maxVal.y));
+}
+
+SI vec2_scalar clamp(vec2_scalar a, vec2_scalar minVal, vec2_scalar maxVal) {
+ return vec2_scalar{clamp(a.x, minVal.x, maxVal.x),
+ clamp(a.y, minVal.y, maxVal.y)};
+}
+
+SI I32 clamp(I32 a, I32 minVal, I32 maxVal) {
+ a = if_then_else(a < minVal, minVal, a);
+ return if_then_else(a > maxVal, maxVal, a);
+}
+
+SI vec3 clamp(vec3 a, vec3 minVal, vec3 maxVal) {
+ return vec3(clamp(a.x, minVal.x, maxVal.x), clamp(a.y, minVal.y, maxVal.y),
+ clamp(a.z, minVal.z, maxVal.z));
+}
+
+SI vec4 clamp(vec4 a, vec4 minVal, vec4 maxVal) {
+ return vec4(clamp(a.x, minVal.x, maxVal.x), clamp(a.y, minVal.y, maxVal.y),
+ clamp(a.z, minVal.z, maxVal.z), clamp(a.w, minVal.w, maxVal.w));
+}
+template <typename T>
+auto lessThanEqual(T x, T y) -> decltype(x <= y) {
+ return x <= y;
+}
+
+template <typename T>
+auto lessThan(T x, T y) -> decltype(x < y) {
+ return x < y;
+}
+
+SI bvec3 lessThanEqual(vec3 x, vec3 y) {
+ return bvec3(lessThanEqual(x.x, y.x), lessThanEqual(x.y, y.y),
+ lessThanEqual(x.z, y.z));
+}
+
+SI bvec2 lessThanEqual(vec2 x, vec2 y) {
+ return bvec2(lessThanEqual(x.x, y.x), lessThanEqual(x.y, y.y));
+}
+
+SI bvec2_scalar lessThanEqual(vec2_scalar x, vec2_scalar y) {
+ return bvec2_scalar{lessThanEqual(x.x, y.x), lessThanEqual(x.y, y.y)};
+}
+
+SI bvec4 lessThanEqual(vec4 x, vec4 y) {
+ return bvec4(lessThanEqual(x.x, y.x), lessThanEqual(x.y, y.y),
+ lessThanEqual(x.z, y.z), lessThanEqual(x.w, y.w));
+}
+
+SI bvec4_scalar lessThanEqual(vec4_scalar x, vec4_scalar y) {
+ return bvec4_scalar{lessThanEqual(x.x, y.x), lessThanEqual(x.y, y.y),
+ lessThanEqual(x.z, y.z), lessThanEqual(x.w, y.w)};
+}
+
+SI bvec2 lessThan(vec2 x, vec2 y) {
+ return bvec2(lessThan(x.x, y.x), lessThan(x.y, y.y));
+}
+
+template <typename T>
+auto greaterThan(T x, T y) -> decltype(x > y) {
+ return x > y;
+}
+
+bvec2 greaterThan(vec2 x, vec2 y) {
+ return bvec2(greaterThan(x.x, y.x), greaterThan(x.y, y.y));
+}
+
+template <typename T>
+auto greaterThanEqual(T x, T y) -> decltype(x >= y) {
+ return x >= y;
+}
+
+bvec4 greaterThanEqual(vec4 x, vec4 y) {
+ return bvec4(greaterThanEqual(x.x, y.x), greaterThanEqual(x.y, y.y),
+ greaterThanEqual(x.z, y.z), greaterThanEqual(x.w, y.w));
+}
+
+enum TextureFormat { RGBA32F, RGBA32I, RGBA8, R8 };
+
+enum TextureFilter { NEAREST, LINEAR };
+
+struct samplerCommon {
+ uint32_t* buf = nullptr;
+ uint32_t stride = 0; // in dwords
+ uint32_t height = 0;
+ uint32_t width = 0;
+ TextureFormat format = TextureFormat::RGBA8;
+};
+
+struct samplerDepth {
+ int depth = 0;
+ uint32_t height_stride = 0; // in dwords
+};
+
+struct samplerFilter {
+ TextureFilter filter = TextureFilter::NEAREST;
+};
+
+struct sampler2DArray_impl : samplerCommon, samplerDepth, samplerFilter {};
+typedef sampler2DArray_impl* sampler2DArray;
+
+typedef struct sampler2DArrayR8_impl : sampler2DArray_impl{} * sampler2DArrayR8;
+typedef struct sampler2DArrayRGBA8_impl : sampler2DArray_impl{} *
+ sampler2DArrayRGBA8;
+typedef struct sampler2DArrayRGBA32F_impl : sampler2DArray_impl{} *
+ sampler2DArrayRGBA32F;
+
+struct sampler2D_impl : samplerCommon, samplerFilter {};
+typedef sampler2D_impl* sampler2D;
+
+typedef struct sampler2DR8_impl : sampler2D_impl{} * sampler2DR8;
+typedef struct sampler2DRGBA8_impl : sampler2D_impl{} * sampler2DRGBA8;
+typedef struct sampler2DRGBA32F_impl : sampler2D_impl{} * sampler2DRGBA32F;
+
+struct isampler2D_impl : samplerCommon {};
+typedef isampler2D_impl* isampler2D;
+
+struct isampler2DRGBA32I_impl : isampler2D_impl {};
+typedef isampler2DRGBA32I_impl* isampler2DRGBA32I;
+
+struct sampler2DRect_impl : samplerCommon, samplerFilter {};
+typedef sampler2DRect_impl* sampler2DRect;
+
+struct mat4_scalar;
+
+struct mat2_scalar {
+ vec2_scalar data[2];
+
+ mat2_scalar() = default;
+ constexpr mat2_scalar(float a) {
+ data[0] = vec2_scalar(a);
+ data[1] = vec2_scalar(a);
+ }
+ constexpr mat2_scalar(vec2_scalar a, vec2_scalar b) {
+ data[0] = a;
+ data[1] = b;
+ }
+ mat2_scalar(const mat4_scalar& mat);
+
+ vec2_scalar& operator[](int index) { return data[index]; }
+ const vec2_scalar& operator[](int index) const { return data[index]; }
+
+ friend vec2_scalar operator*(mat2_scalar m, vec2_scalar v) {
+ vec2_scalar u;
+ u.x = m[0].x * v.x + m[1].x * v.y;
+ u.y = m[0].y * v.x + m[1].y * v.y;
+ return u;
+ }
+
+ friend vec2 operator*(mat2_scalar m, vec2 v) {
+ vec2 u;
+ u.x = m[0].x * v.x + m[1].x * v.y;
+ u.y = m[0].y * v.x + m[1].y * v.y;
+ return u;
+ }
+
+ friend mat2_scalar operator*(mat2_scalar m, float f) {
+ mat2_scalar u = m;
+ u[0].x *= f;
+ u[0].y *= f;
+ u[1].x *= f;
+ u[1].y *= f;
+ return u;
+ }
+};
+
+struct mat4;
+
+struct mat2 {
+ vec2 data[2];
+
+ vec2& operator[](int index) { return data[index]; }
+ const vec2& operator[](int index) const { return data[index]; }
+ mat2() = default;
+
+ mat2(Float a) {
+ data[0] = vec2(a);
+ data[1] = vec2(a);
+ }
+
+ mat2(vec2 a, vec2 b) {
+ data[0] = a;
+ data[1] = b;
+ }
+ mat2(const mat4& mat);
+ constexpr mat2(mat2_scalar s) {
+ data[0] = vec2(s.data[0]);
+ data[1] = vec2(s.data[1]);
+ }
+
+ friend vec2 operator*(mat2 m, vec2 v) {
+ vec2 u;
+ u.x = m[0].x * v.x + m[1].x * v.y;
+ u.y = m[0].y * v.x + m[1].y * v.y;
+ return u;
+ }
+ friend mat2 operator*(mat2 m, Float f) {
+ mat2 u = m;
+ u[0].x *= f;
+ u[0].y *= f;
+ u[1].x *= f;
+ u[1].y *= f;
+ return u;
+ }
+};
+
+mat2_scalar make_mat2(float n) { return mat2_scalar{{n, n}, {n, n}}; }
+
+mat2_scalar make_mat2(const mat2_scalar& m) { return m; }
+
+mat2_scalar make_mat2(const vec2_scalar& x, const vec2_scalar& y) {
+ return mat2_scalar{x, y};
+}
+
+template <typename N>
+mat2 make_mat2(const N& n) {
+ return mat2(n);
+}
+
+template <typename X, typename Y>
+mat2 make_mat2(const X& x, const Y& y) {
+ return mat2(x, y);
+}
+
+SI mat2 if_then_else(I32 c, mat2 t, mat2 e) {
+ return mat2(if_then_else(c, t[0], e[0]), if_then_else(c, t[0], e[1]));
+}
+
+SI mat2 if_then_else(int32_t c, mat2 t, mat2 e) { return c ? t : e; }
+
+struct mat3_scalar {
+ vec3_scalar data[3];
+
+ mat3_scalar() = default;
+ constexpr mat3_scalar(vec3_scalar a, vec3_scalar b, vec3_scalar c) {
+ data[0] = a;
+ data[1] = b;
+ data[2] = c;
+ }
+ mat3_scalar(const mat4_scalar& mat);
+
+ vec3_scalar& operator[](int index) { return data[index]; }
+ const vec3_scalar& operator[](int index) const { return data[index]; }
+
+ friend vec3_scalar operator*(mat3_scalar m, vec3_scalar v) {
+ vec3_scalar u;
+ u.x = m[0].x * v.x + m[1].x * v.y + m[2].x * v.z;
+ u.y = m[0].y * v.x + m[1].y * v.y + m[2].y * v.z;
+ u.z = m[0].z * v.x + m[1].z * v.y + m[2].z * v.z;
+ return u;
+ }
+
+ friend vec3 operator*(mat3_scalar m, vec3 v) {
+ vec3 u;
+ u.x = m[0].x * v.x + m[1].x * v.y + m[2].x * v.z;
+ u.y = m[0].y * v.x + m[1].y * v.y + m[2].y * v.z;
+ u.z = m[0].z * v.x + m[1].z * v.y + m[2].z * v.z;
+ return u;
+ }
+};
+
+struct mat3 {
+ vec3 data[3];
+
+ vec3& operator[](int index) { return data[index]; }
+ const vec3& operator[](int index) const { return data[index]; }
+ mat3() = default;
+ mat3(vec3 a, vec3 b, vec3 c) {
+ data[0] = a;
+ data[1] = b;
+ data[2] = c;
+ }
+
+ constexpr mat3(mat3_scalar s) {
+ data[0] = vec3(s.data[0]);
+ data[1] = vec3(s.data[1]);
+ data[2] = vec3(s.data[2]);
+ }
+ constexpr mat3(mat3_scalar s0, mat3_scalar s1, mat3_scalar s2,
+ mat3_scalar s3) {
+ data[0] = vec3(s0.data[0], s1.data[0], s2.data[0], s3.data[0]);
+ data[1] = vec3(s0.data[1], s1.data[1], s2.data[1], s3.data[1]);
+ data[2] = vec3(s0.data[2], s1.data[2], s2.data[2], s3.data[2]);
+ }
+
+ constexpr mat3(Float d1, Float d2, Float d3, Float d4, Float d5, Float d6,
+ Float d7, Float d8, Float d9) {
+ data[0] = vec3(d1, d2, d3);
+ data[1] = vec3(d4, d5, d6);
+ data[2] = vec3(d7, d8, d9);
+ }
+
+ mat3(const mat4& mat);
+
+ friend vec3 operator*(mat3 m, vec3 v) {
+ vec3 u;
+ u.x = m[0].x * v.x + m[1].x * v.y + m[2].x * v.z;
+ u.y = m[0].y * v.x + m[1].y * v.y + m[2].y * v.z;
+ u.z = m[0].z * v.x + m[1].z * v.y + m[2].z * v.z;
+ return u;
+ }
+};
+
+mat3_scalar force_scalar(const mat3& v) {
+ return mat3_scalar{force_scalar(v[0]), force_scalar(v[1]),
+ force_scalar(v[2])};
+}
+
+mat3_scalar make_mat3(const mat3_scalar& m) { return m; }
+
+mat3_scalar make_mat3(const vec3_scalar& x, const vec3_scalar& y,
+ const vec3_scalar& z) {
+ return mat3_scalar{x, y, z};
+}
+
+constexpr mat3_scalar make_mat3(float m0, float m1, float m2, float m3,
+ float m4, float m5, float m6, float m7,
+ float m8) {
+ return mat3_scalar{{m0, m1, m2}, {m3, m4, m5}, {m6, m7, m8}};
+}
+
+template <typename N>
+mat3 make_mat3(const N& n) {
+ return mat3(n);
+}
+
+template <typename X, typename Y, typename Z>
+mat3 make_mat3(const X& x, const Y& y, const Z& z) {
+ return mat3(x, y, z);
+}
+
+struct mat4_scalar {
+ vec4_scalar data[4];
+
+ mat4_scalar() = default;
+ constexpr mat4_scalar(vec4_scalar a, vec4_scalar b, vec4_scalar c,
+ vec4_scalar d) {
+ data[0] = a;
+ data[1] = b;
+ data[2] = c;
+ data[3] = d;
+ }
+
+ vec4_scalar& operator[](int index) { return data[index]; }
+ const vec4_scalar& operator[](int index) const { return data[index]; }
+
+ static mat4_scalar load_from_ptr(const float* f) {
+ mat4_scalar m;
+ // XXX: hopefully this is in the right order
+ m.data[0] = vec4_scalar{f[0], f[1], f[2], f[3]};
+ m.data[1] = vec4_scalar{f[4], f[5], f[6], f[7]};
+ m.data[2] = vec4_scalar{f[8], f[9], f[10], f[11]};
+ m.data[3] = vec4_scalar{f[12], f[13], f[14], f[15]};
+ return m;
+ }
+
+ friend vec4_scalar operator*(mat4_scalar m, vec4_scalar v) {
+ vec4_scalar u;
+ u.x = m[0].x * v.x + m[1].x * v.y + m[2].x * v.z + m[3].x * v.w;
+ u.y = m[0].y * v.x + m[1].y * v.y + m[2].y * v.z + m[3].y * v.w;
+ u.z = m[0].z * v.x + m[1].z * v.y + m[2].z * v.z + m[3].z * v.w;
+ u.w = m[0].w * v.x + m[1].w * v.y + m[2].w * v.z + m[3].w * v.w;
+ return u;
+ }
+
+ friend vec4 operator*(mat4_scalar m, vec4 v) {
+ vec4 u;
+ u.x = m[0].x * v.x + m[1].x * v.y + m[2].x * v.z + m[3].x * v.w;
+ u.y = m[0].y * v.x + m[1].y * v.y + m[2].y * v.z + m[3].y * v.w;
+ u.z = m[0].z * v.x + m[1].z * v.y + m[2].z * v.z + m[3].z * v.w;
+ u.w = m[0].w * v.x + m[1].w * v.y + m[2].w * v.z + m[3].w * v.w;
+ return u;
+ }
+};
+
+struct mat4 {
+ vec4 data[4];
+
+ mat4() = default;
+ constexpr mat4(mat4_scalar s) {
+ data[0] = vec4(s.data[0]);
+ data[1] = vec4(s.data[1]);
+ data[2] = vec4(s.data[2]);
+ data[3] = vec4(s.data[3]);
+ }
+
+ mat4(vec4 a, vec4 b, vec4 c, vec4 d) {
+ data[0] = a;
+ data[1] = b;
+ data[2] = c;
+ data[3] = d;
+ }
+
+ vec4& operator[](int index) { return data[index]; }
+ const vec4& operator[](int index) const { return data[index]; }
+
+ friend vec4 operator*(mat4 m, vec4 v) {
+ vec4 u;
+ u.x = m[0].x * v.x + m[1].x * v.y + m[2].x * v.z + m[3].x * v.w;
+ u.y = m[0].y * v.x + m[1].y * v.y + m[2].y * v.z + m[3].y * v.w;
+ u.z = m[0].z * v.x + m[1].z * v.y + m[2].z * v.z + m[3].z * v.w;
+ u.w = m[0].w * v.x + m[1].w * v.y + m[2].w * v.z + m[3].w * v.w;
+ return u;
+ }
+};
+
+mat3::mat3(const mat4& mat)
+ : mat3(vec3(mat[0].x, mat[0].y, mat[0].z),
+ vec3(mat[1].x, mat[1].y, mat[1].z),
+ vec3(mat[2].x, mat[2].y, mat[2].z)) {}
+
+mat3_scalar::mat3_scalar(const mat4_scalar& mat)
+ : mat3_scalar(vec3_scalar(mat[0].x, mat[0].y, mat[0].z),
+ vec3_scalar(mat[1].x, mat[1].y, mat[1].z),
+ vec3_scalar(mat[2].x, mat[2].y, mat[2].z)) {}
+
+mat2::mat2(const mat4& mat)
+ : mat2(vec2(mat[0].x, mat[0].y), vec2(mat[1].x, mat[1].y)) {}
+
+mat2_scalar::mat2_scalar(const mat4_scalar& mat)
+ : mat2_scalar(vec2_scalar(mat[0].x, mat[0].y),
+ vec2_scalar(mat[1].x, mat[1].y)) {}
+
+mat2_scalar make_mat2(const mat4_scalar& m) { return mat2_scalar(m); }
+
+mat3_scalar make_mat3(const mat4_scalar& m) { return mat3_scalar(m); }
+
+mat4_scalar force_scalar(const mat4& v) {
+ return mat4_scalar(force_scalar(v[0]), force_scalar(v[1]), force_scalar(v[2]),
+ force_scalar(v[3]));
+}
+
+mat4_scalar make_mat4(const mat4_scalar& m) { return m; }
+
+mat4_scalar make_mat4(const vec4_scalar& x, const vec4_scalar& y,
+ const vec4_scalar& z, const vec4_scalar& w) {
+ return mat4_scalar{x, y, z, w};
+}
+
+constexpr mat4_scalar make_mat4(float m0, float m1, float m2, float m3,
+ float m4, float m5, float m6, float m7,
+ float m8, float m9, float m10, float m11,
+ float m12, float m13, float m14, float m15) {
+ return mat4_scalar{{m0, m1, m2, m3},
+ {m4, m5, m6, m7},
+ {m8, m9, m10, m11},
+ {m12, m13, m14, m15}};
+}
+
+template <typename N>
+mat4 make_mat4(const N& n) {
+ return mat4(n);
+}
+
+template <typename X, typename Y, typename Z, typename W>
+mat4 make_mat4(const X& x, const Y& y, const Z& z, const W& w) {
+ return mat4(x, y, z, w);
+}
+
+SI mat3 if_then_else(I32 c, mat3 t, mat3 e) {
+ return mat3{if_then_else(c, t[0], e[0]), if_then_else(c, t[1], e[1]),
+ if_then_else(c, t[2], e[2])};
+}
+
+SI mat3 if_then_else(int32_t c, mat3 t, mat3 e) { return c ? t : e; }
+
+SI mat4 if_then_else(I32 c, mat4 t, mat4 e) {
+ return mat4{if_then_else(c, t[0], e[0]), if_then_else(c, t[1], e[1]),
+ if_then_else(c, t[2], e[2]), if_then_else(c, t[3], e[3])};
+}
+
+SI mat4 if_then_else(int32_t c, mat4 t, mat4 e) { return c ? t : e; }
+
+SI I32 clampCoord(I32 coord, int limit) {
+#if USE_SSE2
+ return _mm_min_epi16(_mm_max_epi16(coord, _mm_setzero_si128()),
+ _mm_set1_epi32(limit - 1));
+#else
+ return clamp(coord, 0, limit - 1);
+#endif
+}
+SI int clampCoord(int coord, int limit) {
+ return min(max(coord, 0), limit - 1);
+}
+template <typename T, typename S>
+SI T clamp2D(T P, S sampler) {
+ return T{clampCoord(P.x, sampler->width), clampCoord(P.y, sampler->height)};
+}
+template <typename T>
+SI T clamp2DArray(T P, sampler2DArray sampler) {
+ return T{clampCoord(P.x, sampler->width), clampCoord(P.y, sampler->height),
+ clampCoord(P.z, sampler->depth)};
+}
+
+float to_float(uint32_t x) { return x * (1.f / 255.f); }
+
+vec4 pixel_to_vec4(uint32_t a, uint32_t b, uint32_t c, uint32_t d) {
+ U32 pixels = {a, b, c, d};
+ return vec4(cast((pixels >> 16) & 0xFF), cast((pixels >> 8) & 0xFF),
+ cast(pixels & 0xFF), cast(pixels >> 24)) *
+ (1.0f / 255.0f);
+}
+
+vec4 pixel_float_to_vec4(Float a, Float b, Float c, Float d) {
+ return vec4(Float{a.x, b.x, c.x, d.x}, Float{a.y, b.y, c.y, d.y},
+ Float{a.z, b.z, c.z, d.z}, Float{a.w, b.w, c.w, d.w});
+}
+
+ivec4 pixel_int_to_ivec4(I32 a, I32 b, I32 c, I32 d) {
+ return ivec4(I32{a.x, b.x, c.x, d.x}, I32{a.y, b.y, c.y, d.y},
+ I32{a.z, b.z, c.z, d.z}, I32{a.w, b.w, c.w, d.w});
+}
+
+vec4_scalar pixel_to_vec4(uint32_t p) {
+ U32 i = {(p >> 16) & 0xFF, (p >> 8) & 0xFF, p & 0xFF, p >> 24};
+ Float f = cast(i) * (1.0f / 255.0f);
+ return vec4_scalar(f.x, f.y, f.z, f.w);
+}
+
+template <typename S>
+SI vec4 fetchOffsetsRGBA8(S sampler, I32 offset) {
+ return pixel_to_vec4(sampler->buf[offset.x], sampler->buf[offset.y],
+ sampler->buf[offset.z], sampler->buf[offset.w]);
+}
+
+vec4 texelFetchRGBA8(sampler2D sampler, ivec2 P) {
+ I32 offset = P.x + P.y * sampler->stride;
+ return fetchOffsetsRGBA8(sampler, offset);
+}
+
+vec4 texelFetchRGBA8(sampler2DArray sampler, ivec3 P) {
+ assert(test_all(P.z == P.z.x));
+ I32 offset = P.x + P.y * sampler->stride + P.z.x * sampler->height_stride;
+ return fetchOffsetsRGBA8(sampler, offset);
+}
+
+template <typename S>
+SI Float fetchOffsetsR8(S sampler, I32 offset) {
+ U32 i = {
+ ((uint8_t*)sampler->buf)[offset.x], ((uint8_t*)sampler->buf)[offset.y],
+ ((uint8_t*)sampler->buf)[offset.z], ((uint8_t*)sampler->buf)[offset.w]};
+ return cast(i) * (1.0f / 255.0f);
+}
+
+vec4 texelFetchR8(sampler2D sampler, ivec2 P) {
+ I32 offset = P.x + P.y * sampler->stride;
+ return vec4(fetchOffsetsR8(sampler, offset), 0.0f, 0.0f, 1.0f);
+}
+
+vec4 texelFetchR8(sampler2DArray sampler, ivec3 P) {
+ assert(test_all(P.z == P.z.x));
+ I32 offset = P.x + P.y * sampler->stride + P.z.x * sampler->height_stride;
+ return vec4(fetchOffsetsR8(sampler, offset), 0.0f, 0.0f, 1.0f);
+}
+
+template <typename S>
+SI vec4 fetchOffsetsFloat(S sampler, I32 offset) {
+ return pixel_float_to_vec4(
+ *(Float*)&sampler->buf[offset.x], *(Float*)&sampler->buf[offset.y],
+ *(Float*)&sampler->buf[offset.z], *(Float*)&sampler->buf[offset.w]);
+}
+
+vec4 texelFetchFloat(sampler2D sampler, ivec2 P) {
+ I32 offset = P.x * 4 + P.y * sampler->stride;
+ return fetchOffsetsFloat(sampler, offset);
+}
+
+SI vec4 texelFetchFloat(sampler2DArray sampler, ivec3 P) {
+ assert(test_all(P.z == P.z.x));
+ I32 offset = P.x * 4 + P.y * sampler->stride + P.z.x * sampler->height_stride;
+ return fetchOffsetsFloat(sampler, offset);
+}
+
+vec4 texelFetch(sampler2D sampler, ivec2 P, int lod) {
+ assert(lod == 0);
+ P = clamp2D(P, sampler);
+ if (sampler->format == TextureFormat::RGBA32F) {
+ return texelFetchFloat(sampler, P);
+ } else if (sampler->format == TextureFormat::RGBA8) {
+ return texelFetchRGBA8(sampler, P);
+ } else {
+ assert(sampler->format == TextureFormat::R8);
+ return texelFetchR8(sampler, P);
+ }
+}
+
+vec4 texelFetch(sampler2DRGBA32F sampler, ivec2 P, int lod) {
+ assert(lod == 0);
+ P = clamp2D(P, sampler);
+ assert(sampler->format == TextureFormat::RGBA32F);
+ return texelFetchFloat(sampler, P);
+}
+
+vec4 texelFetch(sampler2DRGBA8 sampler, ivec2 P, int lod) {
+ assert(lod == 0);
+ P = clamp2D(P, sampler);
+ assert(sampler->format == TextureFormat::RGBA8);
+ return texelFetchRGBA8(sampler, P);
+}
+
+vec4 texelFetch(sampler2DR8 sampler, ivec2 P, int lod) {
+ assert(lod == 0);
+ P = clamp2D(P, sampler);
+ assert(sampler->format == TextureFormat::R8);
+ return texelFetchR8(sampler, P);
+}
+
+vec4_scalar texelFetch(sampler2D sampler, ivec2_scalar P, int lod) {
+ assert(lod == 0);
+ P = clamp2D(P, sampler);
+ if (sampler->format == TextureFormat::RGBA32F) {
+ return *(vec4_scalar*)&sampler->buf[P.x * 4 + P.y * sampler->stride];
+ } else {
+ assert(sampler->format == TextureFormat::RGBA8);
+ return pixel_to_vec4(sampler->buf[P.x + P.y * sampler->stride]);
+ }
+}
+
+vec4_scalar texelFetch(sampler2DRGBA32F sampler, ivec2_scalar P, int lod) {
+ assert(lod == 0);
+ P = clamp2D(P, sampler);
+ assert(sampler->format == TextureFormat::RGBA32F);
+ return *(vec4_scalar*)&sampler->buf[P.x * 4 + P.y * sampler->stride];
+}
+
+vec4_scalar texelFetch(sampler2DRGBA8 sampler, ivec2_scalar P, int lod) {
+ assert(lod == 0);
+ P = clamp2D(P, sampler);
+ assert(sampler->format == TextureFormat::RGBA8);
+ return pixel_to_vec4(sampler->buf[P.x + P.y * sampler->stride]);
+}
+
+vec4_scalar texelFetch(sampler2DR8 sampler, ivec2_scalar P, int lod) {
+ assert(lod == 0);
+ P = clamp2D(P, sampler);
+ assert(sampler->format == TextureFormat::R8);
+ return vec4_scalar{
+ to_float(((uint8_t*)sampler->buf)[P.x + P.y * sampler->stride]), 0.0f,
+ 0.0f, 0.0f};
+}
+
+vec4 texelFetch(sampler2DRect sampler, ivec2 P) {
+ P = clamp2D(P, sampler);
+ assert(sampler->format == TextureFormat::RGBA8);
+ I32 offset = P.x + P.y * sampler->stride;
+ return fetchOffsetsRGBA8(sampler, offset);
+}
+
+SI vec4 texelFetch(sampler2DArray sampler, ivec3 P, int lod) {
+ assert(lod == 0);
+ P = clamp2DArray(P, sampler);
+ if (sampler->format == TextureFormat::RGBA32F) {
+ return texelFetchFloat(sampler, P);
+ } else if (sampler->format == TextureFormat::R8) {
+ return texelFetchR8(sampler, P);
+ } else {
+ assert(sampler->format == TextureFormat::RGBA8);
+ return texelFetchRGBA8(sampler, P);
+ }
+}
+
+vec4 texelFetch(sampler2DArrayRGBA32F sampler, ivec3 P, int lod) {
+ assert(lod == 0);
+ P = clamp2DArray(P, sampler);
+ assert(sampler->format == TextureFormat::RGBA32F);
+ return texelFetchFloat(sampler, P);
+}
+
+vec4 texelFetch(sampler2DArrayRGBA8 sampler, ivec3 P, int lod) {
+ assert(lod == 0);
+ P = clamp2DArray(P, sampler);
+ assert(sampler->format == TextureFormat::RGBA8);
+ return texelFetchRGBA8(sampler, P);
+}
+
+vec4 texelFetch(sampler2DArrayR8 sampler, ivec3 P, int lod) {
+ assert(lod == 0);
+ P = clamp2DArray(P, sampler);
+ assert(sampler->format == TextureFormat::R8);
+ return texelFetchR8(sampler, P);
+}
+
+template <typename S>
+SI ivec4 fetchOffsetsInt(S sampler, I32 offset) {
+ return pixel_int_to_ivec4(
+ *(I32*)&sampler->buf[offset.x], *(I32*)&sampler->buf[offset.y],
+ *(I32*)&sampler->buf[offset.z], *(I32*)&sampler->buf[offset.w]);
+}
+
+ivec4 texelFetch(isampler2D sampler, ivec2 P, int lod) {
+ assert(lod == 0);
+ P = clamp2D(P, sampler);
+ assert(sampler->format == TextureFormat::RGBA32I);
+ I32 offset = P.x * 4 + P.y * sampler->stride;
+ return fetchOffsetsInt(sampler, offset);
+}
+
+ivec4_scalar texelFetch(isampler2D sampler, ivec2_scalar P, int lod) {
+ assert(lod == 0);
+ P = clamp2D(P, sampler);
+ assert(sampler->format == TextureFormat::RGBA32I);
+ return *(ivec4_scalar*)&sampler->buf[P.x * 4 + P.y * sampler->stride];
+}
+
+SI vec4_scalar* texelFetchPtr(sampler2D sampler, ivec2_scalar P, int min_x,
+ int max_x, int min_y, int max_y) {
+ P.x = min(max(P.x, -min_x), int(sampler->width) - 1 - max_x);
+ P.y = min(max(P.y, -min_y), int(sampler->height) - 1 - max_y);
+ assert(sampler->format == TextureFormat::RGBA32F);
+ return (vec4_scalar*)&sampler->buf[P.x * 4 + P.y * sampler->stride];
+}
+
+SI ivec4_scalar* texelFetchPtr(isampler2D sampler, ivec2_scalar P, int min_x,
+ int max_x, int min_y, int max_y) {
+ P.x = min(max(P.x, -min_x), int(sampler->width) - 1 - max_x);
+ P.y = min(max(P.y, -min_y), int(sampler->height) - 1 - max_y);
+ assert(sampler->format == TextureFormat::RGBA32I);
+ return (ivec4_scalar*)&sampler->buf[P.x * 4 + P.y * sampler->stride];
+}
+
+#define texelFetchOffset(sampler, P, lod, offset) \
+ texelFetch(sampler, (P) + (offset), lod)
+
+template <typename T, typename U, typename A,
+ typename R = typename T::vector_type>
+SI R mix(T x, U y, A a) {
+ return (y - x) * a + x;
+}
+
+SI Float mix(Float x, Float y, Float a) { return (y - x) * a + x; }
+
+template <typename T>
+SI T mix(T x, T y, float a) {
+ return (y - x) * a + x;
+}
+
+template <typename T>
+SI T mix(T x, T y, vec4_scalar a) {
+ return T{mix(x.x, y.x, a.x), mix(x.y, y.y, a.y), mix(x.z, y.z, a.z),
+ mix(x.w, y.w, a.w)};
+}
+
+// Scale texture coords for quantization, subtract offset for filtering
+// (assuming coords already offset to texel centers), and round to nearest
+// 1/scale increment
+template <typename T>
+SI T linearQuantize(T P, float scale) {
+ return P * scale + (0.5f - 0.5f * scale);
+}
+
+// Helper version that also scales normalized texture coords for sampler
+template <typename T, typename S>
+SI T linearQuantize(T P, float scale, S sampler) {
+ P.x *= sampler->width;
+ P.y *= sampler->height;
+ return linearQuantize(P, scale);
+}
+
+template <typename S>
+vec4 textureLinearRGBA8(S sampler, vec2 P, int32_t zoffset = 0) {
+ assert(sampler->format == TextureFormat::RGBA8);
+
+#if USE_SSE2
+ ivec2 i(linearQuantize(P, 256, sampler));
+ ivec2 frac = i & (I32)0xFF;
+ i >>= 8;
+
+ // Pack coords so they get clamped into range, and also for later bounding
+ // of fractional coords. Store Y as low-bits for easier access, X as high.
+ __m128i yx = _mm_packs_epi32(i.y, i.x);
+ __m128i hw = _mm_packs_epi32(_mm_set1_epi32(sampler->height - 1),
+ _mm_set1_epi32(sampler->width - 1));
+ // Clamp coords to valid range to prevent sampling outside texture.
+ __m128i clampyx = _mm_min_epi16(_mm_max_epi16(yx, _mm_setzero_si128()), hw);
+ // Multiply clamped Y by stride and add X offset.
+ __m128i row0 = _mm_madd_epi16(
+ _mm_unpacklo_epi16(clampyx, _mm_setzero_si128()),
+ _mm_set1_epi16(sampler->stride));
+ row0 = _mm_add_epi32(row0, _mm_unpackhi_epi16(clampyx, _mm_setzero_si128()));
+ // Add in layer offset if available
+ row0 = _mm_add_epi32(row0, _mm_set1_epi32(zoffset));
+
+ // Check if fractional coords are all zero, in which case skip filtering.
+ __m128i fracyx = _mm_packs_epi32(frac.y, frac.x);
+ if (!_mm_movemask_epi8(_mm_cmpgt_epi16(fracyx, _mm_setzero_si128()))) {
+ return fetchOffsetsRGBA8(sampler, row0);
+ }
+
+ // Check if coords were clamped at all above. If so, need to adjust fractions
+ // to avoid sampling outside the texture on the edges.
+ __m128i yxinside = _mm_andnot_si128(
+ _mm_cmplt_epi16(yx, _mm_setzero_si128()),
+ _mm_cmplt_epi16(yx, hw));
+ // Set fraction to zero when outside.
+ fracyx = _mm_and_si128(fracyx, yxinside);
+ // Store two side-by-side copies of X fraction, as below each pixel value
+ // will be interleaved to be next to the pixel value for the next row.
+ __m128i fracx = _mm_unpackhi_epi16(fracyx, fracyx);
+ // For Y fraction, we need to store 1-fraction before each fraction, as a
+ // madd will be used to weight and collapse all results as last step.
+ __m128i fracy = _mm_unpacklo_epi16(
+ _mm_sub_epi16(_mm_set1_epi16(256), fracyx), fracyx);
+
+ // Ensure we don't sample row off end of texture from added stride.
+ __m128i row1 = _mm_and_si128(yxinside, _mm_set1_epi16(sampler->stride));
+
+ // Load two adjacent pixels on each row and interleave them.
+ // r0,g0,b0,a0,r1,g1,b1,a1 \/ R0,G0,B0,A0,R1,G1,B1,A1
+ // r0,R0,g0,G0,b0,B0,a0,A0,r1,R1,g1,G1,b1,B1,a1,A1
+# define LOAD_LANE(out, idx) \
+ { \
+ uint32_t* buf = &sampler->buf[_mm_cvtsi128_si32( \
+ _mm_shuffle_epi32(row0, _MM_SHUFFLE(idx, idx, idx, idx)))]; \
+ out = _mm_unpacklo_epi8( \
+ _mm_loadl_epi64((__m128i*)buf), \
+ _mm_loadl_epi64((__m128i*)(buf + _mm_extract_epi16(row1, idx)))); \
+ }
+ __m128i x, y, z, w;
+ LOAD_LANE(x, 0)
+ LOAD_LANE(y, 1)
+ LOAD_LANE(z, 2)
+ LOAD_LANE(w, 3)
+# undef LOAD_LANE
+
+ // Need to transpose the data from AoS to SoA format. Best to do this here
+ // while the data is still packed into 8-bit components, requiring fewer
+ // insns.
+ // r0,R0,g0,G0,b0,B0,a0,A0,r1,R1,g1,G1,b1,B1,a1,A1 \/
+ // r2,R2,g2,G2,b2,B2,a2,A2,r3,R3,g3,G3,b3,B3,a3,A3
+ // ... r0,R0,r2,R2,g0,G0,g2,G2,b0,B0,b2,B2,a0,A0,a2,A2
+ // ... r1,R1,r3,R3,g1,G1,g3,G3,b1,B1,b3,B3,a1,A1,a3,A3
+ __m128i xy0 = _mm_unpacklo_epi16(x, y);
+ __m128i xy1 = _mm_unpackhi_epi16(x, y);
+ __m128i zw0 = _mm_unpacklo_epi16(z, w);
+ __m128i zw1 = _mm_unpackhi_epi16(z, w);
+ // r0,R0,r2,R2,g0,G0,g2,G2,b0,B0,b2,B2,a0,A0,a2,A2 \/
+ // r4,R4,r6,R6,g4,G4,g6,G6,b4,B4,b6,B6,a4,A4,a6,A6
+ // ... r0,R0,r2,R2,r4,R4,r6,R6,g0,G0,g2,G2,g4,G4,g6,G6
+ // ... b0,B0,b2,B2,b4,B4,b6,B6,a0,A0,a2,A2,a4,A4,a6,A6
+ __m128i rg0 = _mm_unpacklo_epi32(xy0, zw0);
+ __m128i ba0 = _mm_unpackhi_epi32(xy0, zw0);
+ __m128i rg1 = _mm_unpacklo_epi32(xy1, zw1);
+ __m128i ba1 = _mm_unpackhi_epi32(xy1, zw1);
+
+ // Expand packed SoA pixels for each column. Multiply then add columns with
+ // 8-bit precision so we don't carry to high byte of word accidentally. Use
+ // final madd insn to blend interleaved rows and expand result to 32 bits.
+# define FILTER_COMPONENT(out, unpack, src0, src1) \
+ { \
+ __m128i cc0 = unpack(src0, _mm_setzero_si128()); \
+ __m128i cc1 = unpack(src1, _mm_setzero_si128()); \
+ cc0 = _mm_add_epi8( \
+ cc0, _mm_srli_epi16(_mm_mullo_epi16(_mm_sub_epi16(cc1, cc0), fracx), \
+ 8)); \
+ out = _mm_cvtepi32_ps(_mm_madd_epi16(cc0, fracy)); \
+ }
+ __m128 fr, fg, fb, fa;
+ FILTER_COMPONENT(fr, _mm_unpacklo_epi8, rg0, rg1);
+ FILTER_COMPONENT(fg, _mm_unpackhi_epi8, rg0, rg1);
+ FILTER_COMPONENT(fb, _mm_unpacklo_epi8, ba0, ba1);
+ FILTER_COMPONENT(fa, _mm_unpackhi_epi8, ba0, ba1);
+# undef FILTER_COMPONENT
+
+ return vec4(fb, fg, fr, fa) * (1.0f / 0xFF00);
+#else
+ ivec2 i(linearQuantize(P, 128, sampler));
+ ivec2 frac = i & (I32)0x7F;
+ i >>= 7;
+
+ I32 row0 = clampCoord(i.x, sampler->width) +
+ clampCoord(i.y, sampler->height) * sampler->stride + zoffset;
+ I32 row1 = row0 + ((i.y >= 0 && i.y < int32_t(sampler->height) - 1) &
+ I32(sampler->stride));
+ I16 fracx =
+ CONVERT(frac.x & (i.x >= 0 && i.x < int32_t(sampler->width) - 1), I16);
+ I16 fracy = CONVERT(frac.y, I16);
+
+ auto a0 =
+ CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row0.x]), V8<int16_t>);
+ auto a1 =
+ CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row1.x]), V8<int16_t>);
+ a0 += ((a1 - a0) * fracy.x) >> 7;
+
+ auto b0 =
+ CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row0.y]), V8<int16_t>);
+ auto b1 =
+ CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row1.y]), V8<int16_t>);
+ b0 += ((b1 - b0) * fracy.y) >> 7;
+
+ auto abl = zipLow(a0, b0);
+ auto abh = zipHigh(a0, b0);
+ abl += ((abh - abl) * fracx.xyxyxyxy) >> 7;
+
+ auto c0 =
+ CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row0.z]), V8<int16_t>);
+ auto c1 =
+ CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row1.z]), V8<int16_t>);
+ c0 += ((c1 - c0) * fracy.z) >> 7;
+
+ auto d0 =
+ CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row0.w]), V8<int16_t>);
+ auto d1 =
+ CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row1.w]), V8<int16_t>);
+ d0 += ((d1 - d0) * fracy.w) >> 7;
+
+ auto cdl = zipLow(c0, d0);
+ auto cdh = zipHigh(c0, d0);
+ cdl += ((cdh - cdl) * fracx.zwzwzwzw) >> 7;
+
+ auto rg = CONVERT(V8<uint16_t>(zip2Low(abl, cdl)), V8<float>);
+ auto ba = CONVERT(V8<uint16_t>(zip2High(abl, cdl)), V8<float>);
+
+ auto r = lowHalf(rg);
+ auto g = highHalf(rg);
+ auto b = lowHalf(ba);
+ auto a = highHalf(ba);
+ return vec4(b, g, r, a) * (1.0f / 255.0f);
+#endif
+}
+
+template <typename S>
+static U16 textureLinearPackedR8(S sampler, ivec2 i, int32_t zoffset) {
+ assert(sampler->format == TextureFormat::R8);
+ ivec2 frac = i & (I32)0x7F;
+ i >>= 7;
+
+ I32 row0 = clampCoord(i.x, sampler->width) +
+ clampCoord(i.y, sampler->height) * sampler->stride + zoffset;
+ I32 row1 = row0 + ((i.y >= 0 && i.y < int32_t(sampler->height) - 1) &
+ I32(sampler->stride));
+ I16 fracx =
+ CONVERT(frac.x & (i.x >= 0 && i.x < int32_t(sampler->width) - 1), I16);
+ I16 fracy = CONVERT(frac.y, I16);
+
+ uint8_t* buf = (uint8_t*)sampler->buf;
+ auto a0 = unaligned_load<V2<uint8_t> >(&buf[row0.x]);
+ auto b0 = unaligned_load<V2<uint8_t> >(&buf[row0.y]);
+ auto c0 = unaligned_load<V2<uint8_t> >(&buf[row0.z]);
+ auto d0 = unaligned_load<V2<uint8_t> >(&buf[row0.w]);
+ auto abcd0 = CONVERT(combine(combine(a0, b0), combine(c0, d0)), V8<int16_t>);
+
+ auto a1 = unaligned_load<V2<uint8_t> >(&buf[row1.x]);
+ auto b1 = unaligned_load<V2<uint8_t> >(&buf[row1.y]);
+ auto c1 = unaligned_load<V2<uint8_t> >(&buf[row1.z]);
+ auto d1 = unaligned_load<V2<uint8_t> >(&buf[row1.w]);
+ auto abcd1 = CONVERT(combine(combine(a1, b1), combine(c1, d1)), V8<int16_t>);
+
+ abcd0 += ((abcd1 - abcd0) * fracy.xxyyzzww) >> 7;
+
+ abcd0 = SHUFFLE(abcd0, abcd0, 0, 2, 4, 6, 1, 3, 5, 7);
+ auto abcdl = lowHalf(abcd0);
+ auto abcdh = highHalf(abcd0);
+ abcdl += ((abcdh - abcdl) * fracx) >> 7;
+
+ return U16(abcdl);
+}
+
+template <typename S>
+vec4 textureLinearR8(S sampler, vec2 P, int32_t zoffset = 0) {
+ assert(sampler->format == TextureFormat::R8);
+
+#if USE_SSE2
+ ivec2 i(linearQuantize(P, 256, sampler));
+ ivec2 frac = i & (I32)0xFF;
+ i >>= 8;
+
+ // Pack coords so they get clamped into range, and also for later bounding
+ // of fractional coords. Store Y as low-bits for easier access, X as high.
+ __m128i yx = _mm_packs_epi32(i.y, i.x);
+ __m128i hw = _mm_packs_epi32(_mm_set1_epi32(sampler->height - 1),
+ _mm_set1_epi32(sampler->width - 1));
+ // Clamp coords to valid range to prevent sampling outside texture.
+ __m128i clampyx = _mm_min_epi16(_mm_max_epi16(yx, _mm_setzero_si128()), hw);
+ // Multiply clamped Y by stride and add X offset.
+ __m128i row0 = _mm_madd_epi16(
+ _mm_unpacklo_epi16(clampyx, _mm_setzero_si128()),
+ _mm_set1_epi16(sampler->stride));
+ row0 = _mm_add_epi32(row0, _mm_unpackhi_epi16(clampyx, _mm_setzero_si128()));
+ // Add in layer offset if available
+ row0 = _mm_add_epi32(row0, _mm_set1_epi32(zoffset));
+
+ __m128i fracyx = _mm_packs_epi32(frac.y, frac.x);
+
+ // Check if coords were clamped at all above. If so, need to adjust fractions
+ // to avoid sampling outside the texture on the edges.
+ __m128i yxinside = _mm_andnot_si128(
+ _mm_cmplt_epi16(yx, _mm_setzero_si128()),
+ _mm_cmplt_epi16(yx, hw));
+ // Set fraction to zero when outside.
+ fracyx = _mm_and_si128(fracyx, yxinside);
+ // For X fraction, we need to store 1-fraction before each fraction, as a
+ // madd will be used to weight and collapse all results as last step.
+ __m128i fracx = _mm_unpackhi_epi16(
+ _mm_sub_epi16(_mm_set1_epi16(256), fracyx), fracyx);
+ // Store two side-by-side copies of Y fraction, as below each pixel value
+ // will be interleaved to be next to the pixel value for the next column.
+ __m128i fracy = _mm_unpacklo_epi16(fracyx, fracyx);
+
+ // Ensure we don't sample row off end of texture from added stride.
+ __m128i row1 = _mm_and_si128(yxinside, _mm_set1_epi16(sampler->stride));
+
+ // Calculate pointers for first row in each lane
+ uint8_t* buf = (uint8_t*)sampler->buf;
+ uint8_t* buf0 =
+ buf + _mm_cvtsi128_si32(_mm_shuffle_epi32(row0, _MM_SHUFFLE(0, 0, 0, 0)));
+ uint8_t* buf1 =
+ buf + _mm_cvtsi128_si32(_mm_shuffle_epi32(row0, _MM_SHUFFLE(1, 1, 1, 1)));
+ uint8_t* buf2 =
+ buf + _mm_cvtsi128_si32(_mm_shuffle_epi32(row0, _MM_SHUFFLE(2, 2, 2, 2)));
+ uint8_t* buf3 =
+ buf + _mm_cvtsi128_si32(_mm_shuffle_epi32(row0, _MM_SHUFFLE(3, 3, 3, 3)));
+ // Load adjacent columns from first row, pack into register, then expand.
+ __m128i cc0 = _mm_unpacklo_epi8(
+ _mm_setr_epi16(*(uint16_t*)buf0, *(uint16_t*)buf1, *(uint16_t*)buf2,
+ *(uint16_t*)buf3, 0, 0, 0, 0),
+ _mm_setzero_si128());
+ // Load adjacent columns from next row, pack into register, then expand.
+ __m128i cc1 = _mm_unpacklo_epi8(
+ _mm_setr_epi16(*(uint16_t*)(buf0 + _mm_extract_epi16(row1, 0)),
+ *(uint16_t*)(buf1 + _mm_extract_epi16(row1, 1)),
+ *(uint16_t*)(buf2 + _mm_extract_epi16(row1, 2)),
+ *(uint16_t*)(buf3 + _mm_extract_epi16(row1, 3)),
+ 0, 0, 0, 0),
+ _mm_setzero_si128());
+ // Multiply then add rows with 8-bit precision so we don't carry to high byte
+ // of word accidentally. Use final madd insn to blend interleaved columns and
+ // expand result to 32 bits.
+ __m128i cc = _mm_add_epi8(
+ cc0, _mm_srli_epi16(_mm_mullo_epi16(_mm_sub_epi16(cc1, cc0), fracy), 8));
+ __m128 r = _mm_cvtepi32_ps(_mm_madd_epi16(cc, fracx));
+ return vec4((Float)r * (1.0f / 0xFF00), 0.0f, 0.0f, 1.0f);
+#else
+ ivec2 i(linearQuantize(P, 128, sampler));
+ Float r = CONVERT(textureLinearPackedR8(sampler, i, zoffset), Float);
+ return vec4(r * (1.0f / 255.0f), 0.0f, 0.0f, 1.0f);
+#endif
+}
+
+template <typename S>
+vec4 textureLinearRGBA32F(S sampler, vec2 P, int32_t zoffset = 0) {
+ assert(sampler->format == TextureFormat::RGBA32F);
+ P.x *= sampler->width;
+ P.y *= sampler->height;
+ P -= 0.5f;
+ vec2 f = floor(P);
+ vec2 r = P - f;
+ ivec2 i(f);
+ ivec2 c = clamp2D(i, sampler);
+ r.x = if_then_else(i.x >= 0 && i.x < sampler->width - 1, r.x, 0.0f);
+ I32 offset0 = c.x * 4 + c.y * sampler->stride + zoffset;
+ I32 offset1 = offset0 + ((i.y >= 0 && i.y < int32_t(sampler->height) - 1) &
+ I32(sampler->stride));
+
+ Float c0 = mix(mix(*(Float*)&sampler->buf[offset0.x],
+ *(Float*)&sampler->buf[offset0.x + 4], r.x),
+ mix(*(Float*)&sampler->buf[offset1.x],
+ *(Float*)&sampler->buf[offset1.x + 4], r.x),
+ r.y);
+ Float c1 = mix(mix(*(Float*)&sampler->buf[offset0.y],
+ *(Float*)&sampler->buf[offset0.y + 4], r.x),
+ mix(*(Float*)&sampler->buf[offset1.y],
+ *(Float*)&sampler->buf[offset1.y + 4], r.x),
+ r.y);
+ Float c2 = mix(mix(*(Float*)&sampler->buf[offset0.z],
+ *(Float*)&sampler->buf[offset0.z + 4], r.x),
+ mix(*(Float*)&sampler->buf[offset1.z],
+ *(Float*)&sampler->buf[offset1.z + 4], r.x),
+ r.y);
+ Float c3 = mix(mix(*(Float*)&sampler->buf[offset0.w],
+ *(Float*)&sampler->buf[offset0.w + 4], r.x),
+ mix(*(Float*)&sampler->buf[offset1.w],
+ *(Float*)&sampler->buf[offset1.w + 4], r.x),
+ r.y);
+ return pixel_float_to_vec4(c0, c1, c2, c3);
+}
+
+SI vec4 texture(sampler2D sampler, vec2 P) {
+ if (sampler->filter == TextureFilter::LINEAR) {
+ if (sampler->format == TextureFormat::RGBA8) {
+ return textureLinearRGBA8(sampler, P);
+ } else if (sampler->format == TextureFormat::R8) {
+ return textureLinearR8(sampler, P);
+ } else {
+ assert(sampler->format == TextureFormat::RGBA32F);
+ return textureLinearRGBA32F(sampler, P);
+ }
+ } else {
+ ivec2 coord(roundzero(P.x, sampler->width), roundzero(P.y, sampler->height));
+ return texelFetch(sampler, coord, 0);
+ }
+}
+
+vec4 texture(sampler2DRect sampler, vec2 P) {
+ assert(sampler->format == TextureFormat::RGBA8);
+ if (sampler->filter == TextureFilter::LINEAR) {
+ return textureLinearRGBA8(sampler,
+ P * vec2_scalar{1.0f / sampler->width, 1.0f / sampler->height});
+ } else {
+ ivec2 coord(roundzero(P.x, 1.0f), roundzero(P.y, 1.0f));
+ return texelFetch(sampler, coord);
+ }
+}
+
+SI vec4 texture(sampler2DArray sampler, vec3 P) {
+ if (sampler->filter == TextureFilter::LINEAR) {
+ // SSE2 can generate slow code for 32-bit multiply, and we never actually sample
+ // from different layers in one chunk, so do cheaper scalar multiplication instead.
+ assert(test_all(P.z == P.z.x));
+ int32_t zoffset =
+ clampCoord(roundeven(P.z.x, 1.0f), sampler->depth) * sampler->height_stride;
+ if (sampler->format == TextureFormat::RGBA8) {
+ return textureLinearRGBA8(sampler, vec2(P.x, P.y), zoffset);
+ } else if (sampler->format == TextureFormat::R8) {
+ return textureLinearR8(sampler, vec2(P.x, P.y), zoffset);
+ } else {
+ assert(sampler->format == TextureFormat::RGBA32F);
+ return textureLinearRGBA32F(sampler, vec2(P.x, P.y), zoffset);
+ }
+ } else {
+ // just do nearest for now
+ ivec3 coord(roundzero(P.x, sampler->width), roundzero(P.y, sampler->height),
+ roundeven(P.z, 1.0f));
+ return texelFetch(sampler, coord, 0);
+ }
+}
+
+vec4 texture(sampler2DArray sampler, vec3 P, float bias) {
+ assert(bias == 0.0f);
+ return texture(sampler, P);
+}
+
+vec4 textureLod(sampler2DArray sampler, vec3 P, float lod) {
+ assert(lod == 0.0f);
+ return texture(sampler, P);
+}
+
+ivec3_scalar textureSize(sampler2DArray sampler, int) {
+ return ivec3_scalar{int32_t(sampler->width), int32_t(sampler->height),
+ int32_t(sampler->depth)};
+}
+
+ivec2_scalar textureSize(sampler2D sampler, int) {
+ return ivec2_scalar{int32_t(sampler->width), int32_t(sampler->height)};
+}
+
+ivec2_scalar textureSize(sampler2DRect sampler) {
+ return ivec2_scalar{int32_t(sampler->width), int32_t(sampler->height)};
+}
+
+ivec4 ivec2::sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4) {
+ return ivec4(select(c1), select(c2), select(c3), select(c4));
+}
+
+vec4 vec2::sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4) {
+ return vec4(select(c1), select(c2), select(c3), select(c4));
+}
+
+bool any(bool x) { return x; }
+
+Bool any(bvec4 x) { return x.x | x.y | x.z | x.w; }
+
+bool any(bvec4_scalar x) { return x.x | x.y | x.z | x.w; }
+
+Bool any(bvec2 x) { return x.x | x.y; }
+
+bool any(bvec2_scalar x) { return x.x | x.y; }
+
+bool all(bool x) { return x; }
+
+Bool all(bvec2 x) { return x.x & x.y; }
+
+bool all(bvec2_scalar x) { return x.x & x.y; }
+
+Bool all(bvec4 x) { return x.x & x.y & x.z & x.w; }
+
+bool all(bvec4_scalar x) { return x.x & x.y & x.z & x.w; }
+
+SI vec4 if_then_else(bvec4 c, vec4 t, vec4 e) {
+ return vec4(if_then_else(c.x, t.x, e.x), if_then_else(c.y, t.y, e.y),
+ if_then_else(c.z, t.z, e.z), if_then_else(c.w, t.w, e.w));
+}
+SI vec3 if_then_else(bvec3 c, vec3 t, vec3 e) {
+ return vec3(if_then_else(c.x, t.x, e.x), if_then_else(c.y, t.y, e.y),
+ if_then_else(c.z, t.z, e.z));
+}
+
+SI vec2 if_then_else(bvec2 c, vec2 t, vec2 e) {
+ return vec2(if_then_else(c.x, t.x, e.x), if_then_else(c.y, t.y, e.y));
+}
+
+template <typename T, typename R = typename T::vector_type>
+SI R mix(T x, T y, bvec4 a) {
+ return if_then_else(a, y, x);
+}
+
+template <typename T, typename R = typename T::vector_type>
+SI R mix(T x, T y, bvec3 a) {
+ return if_then_else(a, y, x);
+}
+
+template <typename T, typename R = typename T::vector_type>
+SI R mix(T x, T y, bvec2 a) {
+ return if_then_else(a, y, x);
+}
+
+template <typename T>
+SI T mix(T x, T y, bvec4_scalar a) {
+ return T{a.x ? y.x : x.x, a.y ? y.y : x.y, a.z ? y.z : x.z, a.w ? y.w : x.w};
+}
+
+template <typename T>
+SI T mix(T x, T y, bvec3_scalar a) {
+ return T{a.x ? y.x : x.x, a.y ? y.y : x.y, a.z ? y.z : x.z};
+}
+
+template <typename T>
+SI T mix(T x, T y, bvec2_scalar a) {
+ return T{a.x ? y.x : x.x, a.y ? y.y : x.y};
+}
+
+float dot(vec3_scalar a, vec3_scalar b) {
+ return a.x * b.x + a.y * b.y + a.z * b.z;
+}
+
+Float dot(vec3 a, vec3 b) { return a.x * b.x + a.y * b.y + a.z * b.z; }
+
+float dot(vec2_scalar a, vec2_scalar b) { return a.x * b.x + a.y * b.y; }
+
+Float dot(vec2 a, vec2 b) { return a.x * b.x + a.y * b.y; }
+
+#define sin __glsl_sin
+
+float sin(float x) { return sinf(x); }
+
+Float sin(Float v) { return {sinf(v.x), sinf(v.y), sinf(v.z), sinf(v.w)}; }
+
+#define cos __glsl_cos
+
+float cos(float x) { return cosf(x); }
+
+Float cos(Float v) { return {cosf(v.x), cosf(v.y), cosf(v.z), cosf(v.w)}; }
+
+#define tan __glsl_tan
+
+float tan(float x) { return tanf(x); }
+
+Float tan(Float v) { return {tanf(v.x), tanf(v.y), tanf(v.z), tanf(v.w)}; }
+
+#define atan __glsl_atan
+
+float atan(float x) { return atanf(x); }
+
+Float atan(Float v) { return {atanf(v.x), atanf(v.y), atanf(v.z), atanf(v.w)}; }
+
+float atan(float a, float b) { return atan2f(a, b); }
+
+Float atan(Float a, Float b) {
+ return {atan2f(a.x, b.x), atan2f(a.y, b.y), atan2f(a.z, b.z), atan2f(a.w, b.w)};
+}
+
+bvec4 notEqual(ivec4 a, ivec4 b) {
+ return bvec4(a.x != b.x, a.y != b.y, a.z != b.z, a.w != b.w);
+}
+
+bvec4_scalar notEqual(ivec4_scalar a, ivec4_scalar b) {
+ return bvec4_scalar{a.x != b.x, a.y != b.y, a.z != b.z, a.w != b.w};
+}
+
+mat3 transpose(mat3 m) {
+ return mat3(vec3(m[0].x, m[1].x, m[2].x), vec3(m[0].y, m[1].y, m[2].y),
+ vec3(m[0].z, m[1].z, m[2].z));
+}
+
+mat3_scalar transpose(mat3_scalar m) {
+ return mat3_scalar{vec3_scalar(m[0].x, m[1].x, m[2].x),
+ vec3_scalar(m[0].y, m[1].y, m[2].y),
+ vec3_scalar(m[0].z, m[1].z, m[2].z)};
+}
+
+vec2 abs(vec2 v) { return vec2(abs(v.x), abs(v.y)); }
+
+vec2_scalar abs(vec2_scalar v) { return vec2_scalar{fabsf(v.x), fabsf(v.y)}; }
+
+Float mod(Float a, Float b) { return a - b * floor(a / b); }
+
+vec2 mod(vec2 a, vec2 b) { return vec2(mod(a.x, b.x), mod(a.y, b.y)); }
+
+vec3 abs(vec3 v) { return vec3(abs(v.x), abs(v.y), abs(v.z)); }
+
+mat2 inverse(mat2 v) {
+ Float det = v[0].x * v[1].y - v[0].y * v[1].x;
+ return mat2(vec2(v[1].y, -v[0].y), vec2(-v[1].x, v[0].x)) * (1. / det);
+}
+
+mat2_scalar inverse(mat2_scalar v) {
+ float det = v[0].x * v[1].y - v[0].y * v[1].x;
+ return mat2_scalar{{v[1].y, -v[0].y}, {-v[1].x, v[0].x}} * (1. / det);
+}
+
+int32_t get_nth(I32 a, int n) { return a[n]; }
+
+float get_nth(Float a, int n) { return a[n]; }
+
+float get_nth(float a, int) { return a; }
+
+ivec2_scalar get_nth(ivec2 a, int n) { return ivec2_scalar{a.x[n], a.y[n]}; }
+
+vec2_scalar get_nth(vec2 a, int n) { return vec2_scalar{a.x[n], a.y[n]}; }
+
+vec3_scalar get_nth(vec3 a, int n) {
+ return vec3_scalar{a.x[n], a.y[n], a.z[n]};
+}
+
+vec4_scalar get_nth(vec4 a, int n) {
+ return vec4_scalar{a.x[n], a.y[n], a.z[n], a.w[n]};
+}
+
+ivec4_scalar get_nth(ivec4 a, int n) {
+ return ivec4_scalar{a.x[n], a.y[n], a.z[n], a.w[n]};
+}
+
+mat3_scalar get_nth(mat3 a, int n) {
+ return make_mat3(get_nth(a[0], n), get_nth(a[1], n), get_nth(a[2], n));
+}
+
+void put_nth(Float& dst, int n, float src) { dst[n] = src; }
+
+void put_nth(I32& dst, int n, int32_t src) { dst[n] = src; }
+
+void put_nth(ivec2& dst, int n, ivec2_scalar src) {
+ dst.x[n] = src.x;
+ dst.y[n] = src.y;
+}
+
+void put_nth(vec2& dst, int n, vec2_scalar src) {
+ dst.x[n] = src.x;
+ dst.y[n] = src.y;
+}
+
+void put_nth(vec3& dst, int n, vec3_scalar src) {
+ dst.x[n] = src.x;
+ dst.y[n] = src.y;
+ dst.z[n] = src.z;
+}
+
+void put_nth(ivec4& dst, int n, ivec4_scalar src) {
+ dst.x[n] = src.x;
+ dst.y[n] = src.y;
+ dst.z[n] = src.z;
+ dst.w[n] = src.w;
+}
+
+void put_nth(vec4& dst, int n, vec4_scalar src) {
+ dst.x[n] = src.x;
+ dst.y[n] = src.y;
+ dst.z[n] = src.z;
+ dst.w[n] = src.w;
+}
+
+// Use an ElementType type constructor
+// so that we can implement element_type for
+// Int and Float
+template <typename V>
+struct ElementType {
+ typedef typename V::element_type ty;
+};
+
+template <>
+struct ElementType<float> {
+ typedef float ty;
+};
+
+template <>
+struct ElementType<int> {
+ typedef float ty;
+};
+
+template <>
+struct ElementType<Float> {
+ typedef float ty;
+};
+
+template <>
+struct ElementType<I32> {
+ typedef int32_t ty;
+};
+
+void put_nth_component(ivec2_scalar& dst, int n, int32_t src) {
+ switch (n) {
+ case 0:
+ dst.x = src;
+ break;
+ case 1:
+ dst.y = src;
+ break;
+ }
+}
+
+void put_nth_component(ivec4_scalar& dst, int n, int32_t src) {
+ switch (n) {
+ case 0:
+ dst.x = src;
+ break;
+ case 1:
+ dst.y = src;
+ break;
+ case 2:
+ dst.z = src;
+ break;
+ case 3:
+ dst.w = src;
+ break;
+ }
+}
+
+void put_nth_component(int& dst, int n, int src) {
+ switch (n) {
+ case 0:
+ dst = src;
+ break;
+ }
+}
+
+void put_nth_component(float& dst, int n, float src) {
+ switch (n) {
+ case 0:
+ dst = src;
+ break;
+ }
+}
+
+void put_nth_component(vec2_scalar& dst, int n, float src) {
+ switch (n) {
+ case 0:
+ dst.x = src;
+ break;
+ case 1:
+ dst.y = src;
+ break;
+ }
+}
+
+void put_nth_component(vec3_scalar& dst, int n, float src) {
+ switch (n) {
+ case 0:
+ dst.x = src;
+ break;
+ case 1:
+ dst.y = src;
+ break;
+ case 2:
+ dst.z = src;
+ break;
+ }
+}
+
+void put_nth_component(vec4_scalar& dst, int n, float src) {
+ switch (n) {
+ case 0:
+ dst.x = src;
+ break;
+ case 1:
+ dst.y = src;
+ break;
+ case 2:
+ dst.z = src;
+ break;
+ case 3:
+ dst.w = src;
+ break;
+ }
+}
+
+Float init_interp(float init0, float step) {
+ float init1 = init0 + step;
+ float init2 = init1 + step;
+ float init3 = init2 + step;
+ return {init0, init1, init2, init3};
+}
+
+vec2 init_interp(vec2_scalar init, vec2_scalar step) {
+ return vec2(init_interp(init.x, step.x), init_interp(init.y, step.y));
+}
+
+vec3 init_interp(vec3_scalar init, vec3_scalar step) {
+ return vec3(init_interp(init.x, step.x), init_interp(init.y, step.y),
+ init_interp(init.z, step.z));
+}
+
+vec4 init_interp(vec4_scalar init, vec4_scalar step) {
+ return vec4(init_interp(init.x, step.x), init_interp(init.y, step.y),
+ init_interp(init.z, step.z), init_interp(init.w, step.w));
+}
+
+template <typename T, size_t N>
+struct Array {
+ T elements[N];
+ T& operator[](size_t i) { return elements[i]; }
+ const T& operator[](size_t i) const { return elements[i]; }
+ template <typename S>
+ void convert(const Array<S, N>& s) {
+ for (size_t i = 0; i < N; ++i) elements[i] = T(s[i]);
+ }
+};
+
+template <size_t SIZE>
+Array<vec2, SIZE> if_then_else(I32 c, Array<vec2, SIZE> t,
+ Array<vec2, SIZE> e) {
+ Array<vec2, SIZE> r;
+ for (size_t i = 0; i < SIZE; i++) {
+ r[i] = if_then_else(c, t[i], e[i]);
+ }
+ return r;
+}
+
+} // namespace glsl
diff --git a/third_party/webrender/swgl/src/lib.rs b/third_party/webrender/swgl/src/lib.rs
new file mode 100644
index 00000000000..e8fc030e0c9
--- /dev/null
+++ b/third_party/webrender/swgl/src/lib.rs
@@ -0,0 +1,12 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#![crate_name = "swgl"]
+#![crate_type = "lib"]
+
+extern crate gleam;
+
+mod swgl_fns;
+
+pub use crate::swgl_fns::*;
diff --git a/third_party/webrender/swgl/src/program.h b/third_party/webrender/swgl/src/program.h
new file mode 100644
index 00000000000..80e5a5b68f7
--- /dev/null
+++ b/third_party/webrender/swgl/src/program.h
@@ -0,0 +1,164 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+struct VertexAttrib;
+
+namespace glsl {
+
+// Type holding group of scalars interpolated across rasterized rows and spans,
+// shuttling values between vertex shaders and fragment shaders.
+// GCC requires power-of-two vector sizes, so must use glsl type as workaround
+// to operate in Float-sized chunks.
+typedef vec3 Interpolants;
+
+struct VertexShaderImpl;
+struct FragmentShaderImpl;
+
+struct ProgramImpl {
+ virtual ~ProgramImpl() {}
+ virtual int get_uniform(const char* name) const = 0;
+ virtual void bind_attrib(const char* name, int index) = 0;
+ virtual int get_attrib(const char* name) const = 0;
+ virtual size_t interpolants_size() const = 0;
+ virtual VertexShaderImpl* get_vertex_shader() = 0;
+ virtual FragmentShaderImpl* get_fragment_shader() = 0;
+};
+
+typedef ProgramImpl* (*ProgramLoader)();
+
+struct VertexShaderImpl {
+ typedef void (*SetUniform1iFunc)(VertexShaderImpl*, int index, int value);
+ typedef void (*SetUniform4fvFunc)(VertexShaderImpl*, int index,
+ const float* value);
+ typedef void (*SetUniformMatrix4fvFunc)(VertexShaderImpl*, int index,
+ const float* value);
+ typedef void (*InitBatchFunc)(VertexShaderImpl*);
+ typedef void (*LoadAttribsFunc)(VertexShaderImpl*, VertexAttrib* attribs,
+ uint32_t start, int instance, int count);
+ typedef void (*RunPrimitiveFunc)(VertexShaderImpl*, char* interps,
+ size_t interp_stride);
+
+ SetUniform1iFunc set_uniform_1i_func = nullptr;
+ SetUniform4fvFunc set_uniform_4fv_func = nullptr;
+ SetUniformMatrix4fvFunc set_uniform_matrix4fv_func = nullptr;
+ InitBatchFunc init_batch_func = nullptr;
+ LoadAttribsFunc load_attribs_func = nullptr;
+ RunPrimitiveFunc run_primitive_func = nullptr;
+
+ vec4 gl_Position;
+
+ void set_uniform_1i(int index, int value) {
+ (*set_uniform_1i_func)(this, index, value);
+ }
+
+ void set_uniform_4fv(int index, const float* value) {
+ (*set_uniform_4fv_func)(this, index, value);
+ }
+
+ void set_uniform_matrix4fv(int index, const float* value) {
+ (*set_uniform_matrix4fv_func)(this, index, value);
+ }
+
+ void init_batch() { (*init_batch_func)(this); }
+
+ ALWAYS_INLINE void load_attribs(VertexAttrib* attribs, uint32_t start,
+ int instance, int count) {
+ (*load_attribs_func)(this, attribs, start, instance, count);
+ }
+
+ ALWAYS_INLINE void run_primitive(char* interps, size_t interp_stride) {
+ (*run_primitive_func)(this, interps, interp_stride);
+ }
+};
+
+struct FragmentShaderImpl {
+ typedef void (*InitSpanFunc)(FragmentShaderImpl*, const void* interps,
+ const void* step, float step_width);
+ typedef void (*RunFunc)(FragmentShaderImpl*);
+ typedef void (*SkipFunc)(FragmentShaderImpl*, int chunks);
+ typedef void (*InitSpanWFunc)(FragmentShaderImpl*, const void* interps,
+ const void* step, float step_width);
+ typedef void (*RunWFunc)(FragmentShaderImpl*);
+ typedef void (*SkipWFunc)(FragmentShaderImpl*, int chunks);
+ typedef void (*DrawSpanRGBA8Func)(FragmentShaderImpl*, uint32_t* buf,
+ int len);
+ typedef void (*DrawSpanR8Func)(FragmentShaderImpl*, uint8_t* buf, int len);
+
+ InitSpanFunc init_span_func = nullptr;
+ RunFunc run_func = nullptr;
+ SkipFunc skip_func = nullptr;
+ InitSpanWFunc init_span_w_func = nullptr;
+ RunWFunc run_w_func = nullptr;
+ SkipWFunc skip_w_func = nullptr;
+ DrawSpanRGBA8Func draw_span_RGBA8_func = nullptr;
+ DrawSpanR8Func draw_span_R8_func = nullptr;
+
+ enum FLAGS {
+ DISCARD = 1 << 0,
+ PERSPECTIVE = 1 << 1,
+ };
+ int flags = 0;
+ void enable_discard() { flags |= DISCARD; }
+ void enable_perspective() { flags |= PERSPECTIVE; }
+ ALWAYS_INLINE bool use_discard() const { return (flags & DISCARD) != 0; }
+ ALWAYS_INLINE bool use_perspective() const {
+ return (flags & PERSPECTIVE) != 0;
+ }
+
+ vec4 gl_FragCoord;
+ vec2_scalar stepZW;
+ Bool isPixelDiscarded = false;
+ vec4 gl_FragColor;
+ vec4 gl_SecondaryFragColor;
+
+ ALWAYS_INLINE void step_fragcoord() { gl_FragCoord.x += 4; }
+
+ ALWAYS_INLINE void step_fragcoord(int chunks) {
+ gl_FragCoord.x += 4 * chunks;
+ }
+
+ ALWAYS_INLINE void step_perspective() {
+ gl_FragCoord.z += stepZW.x;
+ gl_FragCoord.w += stepZW.y;
+ }
+
+ ALWAYS_INLINE void step_perspective(int chunks) {
+ gl_FragCoord.z += stepZW.x * chunks;
+ gl_FragCoord.w += stepZW.y * chunks;
+ }
+
+ template <bool W = false>
+ ALWAYS_INLINE void init_span(const void* interps, const void* step,
+ float step_width) {
+ (*(W ? init_span_w_func : init_span_func))(this, interps, step, step_width);
+ }
+
+ template <bool W = false>
+ ALWAYS_INLINE void run() {
+ (*(W ? run_w_func : run_func))(this);
+ }
+
+ template <bool W = false>
+ ALWAYS_INLINE void skip(int chunks = 1) {
+ (*(W ? skip_w_func : skip_func))(this, chunks);
+ }
+
+ ALWAYS_INLINE void draw_span(uint32_t* buf, int len) {
+ (*draw_span_RGBA8_func)(this, buf, len);
+ }
+
+ ALWAYS_INLINE bool has_draw_span(uint32_t*) {
+ return draw_span_RGBA8_func != nullptr;
+ }
+
+ ALWAYS_INLINE void draw_span(uint8_t* buf, int len) {
+ (*draw_span_R8_func)(this, buf, len);
+ }
+
+ ALWAYS_INLINE bool has_draw_span(uint8_t*) {
+ return draw_span_R8_func != nullptr;
+ }
+};
+
+} // namespace glsl
diff --git a/third_party/webrender/swgl/src/swgl_fns.rs b/third_party/webrender/swgl/src/swgl_fns.rs
new file mode 100644
index 00000000000..0cb60c6d4c8
--- /dev/null
+++ b/third_party/webrender/swgl/src/swgl_fns.rs
@@ -0,0 +1,2253 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#![allow(unused_variables)]
+
+use gleam::gl::*;
+use std::ffi::{CStr, CString};
+use std::os::raw::{c_char, c_int, c_void};
+use std::ptr;
+use std::str;
+
+#[allow(unused)]
+macro_rules! debug {
+ ($($x:tt)*) => {};
+}
+
+extern "C" {}
+
+extern "C" {
+ fn ActiveTexture(texture: GLenum);
+ fn BindTexture(target: GLenum, texture: GLuint);
+ fn BindBuffer(target: GLenum, buffer: GLuint);
+ fn BindVertexArray(vao: GLuint);
+ fn BindFramebuffer(target: GLenum, fb: GLuint);
+ fn BindRenderbuffer(target: GLenum, rb: GLuint);
+ fn BlendFunc(srgb: GLenum, drgb: GLenum, sa: GLenum, da: GLenum);
+ fn BlendColor(r: GLfloat, g: GLfloat, b: GLfloat, a: GLfloat);
+ fn BlendEquation(mode: GLenum);
+ fn Enable(cap: GLenum);
+ fn Disable(cap: GLenum);
+ fn GenQueries(n: GLsizei, result: *mut GLuint);
+ fn BeginQuery(target: GLenum, id: GLuint);
+ fn EndQuery(target: GLenum);
+ fn GetQueryObjectui64v(id: GLuint, pname: GLenum, params: *mut GLuint64);
+ fn GenBuffers(n: i32, result: *mut GLuint);
+ fn GenTextures(n: i32, result: *mut GLuint);
+ fn GenFramebuffers(n: i32, result: *mut GLuint);
+ fn GenRenderbuffers(n: i32, result: *mut GLuint);
+ fn BufferData(target: GLenum, size: GLsizeiptr, data: *const GLvoid, usage: GLenum);
+ fn BufferSubData(target: GLenum, offset: GLintptr, size: GLsizeiptr, data: *const GLvoid);
+ fn MapBuffer(target: GLenum, access: GLbitfield) -> *mut c_void;
+ fn MapBufferRange(
+ target: GLenum,
+ offset: GLintptr,
+ length: GLsizeiptr,
+ access: GLbitfield,
+ ) -> *mut c_void;
+ fn UnmapBuffer(target: GLenum) -> GLboolean;
+ fn TexStorage2D(
+ target: GLenum,
+ levels: GLint,
+ internal_format: GLenum,
+ width: GLsizei,
+ height: GLsizei,
+ );
+ fn FramebufferTexture2D(
+ target: GLenum,
+ attachment: GLenum,
+ textarget: GLenum,
+ texture: GLuint,
+ level: GLint,
+ );
+ fn CheckFramebufferStatus(target: GLenum) -> GLenum;
+ fn InvalidateFramebuffer(
+ target: GLenum,
+ num_attachments: GLsizei,
+ attachments: *const GLenum,
+ );
+ fn TexStorage3D(
+ target: GLenum,
+ levels: GLint,
+ internal_format: GLenum,
+ width: GLsizei,
+ height: GLsizei,
+ depth: GLsizei,
+ );
+ fn TexImage2D(
+ target: GLenum,
+ level: GLint,
+ internal_format: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ border: GLint,
+ format: GLenum,
+ ty: GLenum,
+ data: *const c_void,
+ );
+ fn TexImage3D(
+ target: GLenum,
+ level: GLint,
+ internal_format: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ depth: GLsizei,
+ border: GLint,
+ format: GLenum,
+ ty: GLenum,
+ data: *const c_void,
+ );
+ fn TexSubImage2D(
+ target: GLenum,
+ level: GLint,
+ xoffset: GLint,
+ yoffset: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ format: GLenum,
+ ty: GLenum,
+ data: *const c_void,
+ );
+ fn TexSubImage3D(
+ target: GLenum,
+ level: GLint,
+ xoffset: GLint,
+ yoffset: GLint,
+ zoffset: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ depth: GLsizei,
+ format: GLenum,
+ ty: GLenum,
+ data: *const c_void,
+ );
+ fn GenerateMipmap(target: GLenum);
+ fn GetUniformLocation(program: GLuint, name: *const GLchar) -> GLint;
+ fn BindAttribLocation(program: GLuint, index: GLuint, name: *const GLchar);
+ fn GetAttribLocation(program: GLuint, name: *const GLchar) -> GLint;
+ fn GenVertexArrays(n: i32, result: *mut GLuint);
+ fn VertexAttribPointer(
+ index: GLuint,
+ size: GLint,
+ type_: GLenum,
+ normalized: GLboolean,
+ stride: GLsizei,
+ offset: *const GLvoid,
+ );
+ fn VertexAttribIPointer(
+ index: GLuint,
+ size: GLint,
+ type_: GLenum,
+ stride: GLsizei,
+ offset: *const GLvoid,
+ );
+ fn CreateShader(shader_type: GLenum) -> GLuint;
+ fn AttachShader(program: GLuint, shader: GLuint);
+ fn CreateProgram() -> GLuint;
+ fn Uniform1i(location: GLint, v0: GLint);
+ fn Uniform4fv(location: GLint, count: GLsizei, value: *const GLfloat);
+ fn UniformMatrix4fv(
+ location: GLint,
+ count: GLsizei,
+ transpose: GLboolean,
+ value: *const GLfloat,
+ );
+
+ fn DrawElementsInstanced(
+ mode: GLenum,
+ count: GLsizei,
+ type_: GLenum,
+ indices: *const c_void,
+ instancecount: GLsizei,
+ );
+ fn EnableVertexAttribArray(index: GLuint);
+ fn VertexAttribDivisor(index: GLuint, divisor: GLuint);
+ fn LinkProgram(program: GLuint);
+ fn UseProgram(program: GLuint);
+ fn SetViewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei);
+ fn FramebufferTextureLayer(
+ target: GLenum,
+ attachment: GLenum,
+ texture: GLuint,
+ level: GLint,
+ layer: GLint,
+ );
+ fn FramebufferRenderbuffer(
+ target: GLenum,
+ attachment: GLenum,
+ renderbuffertarget: GLenum,
+ renderbuffer: GLuint,
+ );
+ fn RenderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei);
+ fn DepthMask(flag: GLboolean);
+ fn DepthFunc(func: GLenum);
+ fn SetScissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei);
+ fn ClearColor(r: GLfloat, g: GLfloat, b: GLfloat, a: GLfloat);
+ fn ClearDepth(depth: GLdouble);
+ fn Clear(mask: GLbitfield);
+ fn PixelStorei(name: GLenum, param: GLint);
+ fn ReadPixels(
+ x: GLint,
+ y: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ format: GLenum,
+ ty: GLenum,
+ data: *mut c_void,
+ );
+ fn Finish();
+ fn ShaderSourceByName(shader: GLuint, name: *const GLchar);
+ fn TexParameteri(target: GLenum, pname: GLenum, param: GLint);
+ fn CopyImageSubData(
+ src_name: GLuint,
+ src_target: GLenum,
+ src_level: GLint,
+ src_x: GLint,
+ src_y: GLint,
+ src_z: GLint,
+ dst_name: GLuint,
+ dst_target: GLenum,
+ dst_level: GLint,
+ dst_x: GLint,
+ dst_y: GLint,
+ dst_z: GLint,
+ src_width: GLsizei,
+ src_height: GLsizei,
+ src_depth: GLsizei,
+ );
+ fn CopyTexSubImage2D(
+ target: GLenum,
+ level: GLint,
+ xoffset: GLint,
+ yoffset: GLint,
+ x: GLint,
+ y: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ );
+ fn CopyTexSubImage3D(
+ target: GLenum,
+ level: GLint,
+ xoffset: GLint,
+ yoffset: GLint,
+ zoffset: GLint,
+ x: GLint,
+ y: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ );
+ fn BlitFramebuffer(
+ src_x0: GLint,
+ src_y0: GLint,
+ src_x1: GLint,
+ src_y1: GLint,
+ dst_x0: GLint,
+ dst_y0: GLint,
+ dst_x1: GLint,
+ dst_y1: GLint,
+ mask: GLbitfield,
+ filter: GLenum,
+ );
+ fn GetIntegerv(pname: GLenum, params: *mut GLint);
+ fn GetBooleanv(pname: GLenum, params: *mut GLboolean);
+ fn GetString(name: GLenum) -> *const c_char;
+ fn GetStringi(name: GLenum, index: GLuint) -> *const c_char;
+ fn GetError() -> GLenum;
+ fn InitDefaultFramebuffer(width: i32, height: i32);
+ fn GetColorBuffer(
+ fbo: GLuint,
+ flush: GLboolean,
+ width: *mut i32,
+ height: *mut i32,
+ ) -> *mut c_void;
+ fn SetTextureBuffer(
+ tex: GLuint,
+ internal_format: GLenum,
+ width: GLsizei,
+ height: GLsizei,
+ buf: *mut c_void,
+ min_width: GLsizei,
+ min_height: GLsizei,
+ );
+ fn DeleteTexture(n: GLuint);
+ fn DeleteRenderbuffer(n: GLuint);
+ fn DeleteFramebuffer(n: GLuint);
+ fn DeleteBuffer(n: GLuint);
+ fn DeleteVertexArray(n: GLuint);
+ fn DeleteQuery(n: GLuint);
+ fn DeleteShader(shader: GLuint);
+ fn DeleteProgram(program: GLuint);
+ fn Composite(
+ src_id: GLuint,
+ src_x: GLint,
+ src_y: GLint,
+ src_width: GLsizei,
+ src_height: GLsizei,
+ dst_x: GLint,
+ dst_y: GLint,
+ opaque: GLboolean,
+ flip: GLboolean,
+ );
+ fn CreateContext() -> *mut c_void;
+ fn DestroyContext(ctx: *mut c_void);
+ fn MakeCurrent(ctx: *mut c_void);
+}
+
+#[derive(Clone)]
+pub struct Context(*mut c_void);
+
+impl Context {
+ pub fn create() -> Self {
+ Context(unsafe { CreateContext() })
+ }
+
+ pub fn destroy(&self) {
+ unsafe {
+ DestroyContext(self.0);
+ }
+ }
+
+ pub fn make_current(&self) {
+ unsafe {
+ MakeCurrent(self.0);
+ }
+ }
+
+ pub fn init_default_framebuffer(&self, width: i32, height: i32) {
+ unsafe {
+ InitDefaultFramebuffer(width, height);
+ }
+ }
+
+ pub fn get_color_buffer(&self, fbo: GLuint, flush: bool) -> (*mut c_void, i32, i32) {
+ unsafe {
+ let mut width: i32 = 0;
+ let mut height: i32 = 0;
+ let data_ptr = GetColorBuffer(fbo, flush as GLboolean, &mut width, &mut height);
+ (data_ptr, width, height)
+ }
+ }
+
+ pub fn set_texture_buffer(
+ &self,
+ tex: GLuint,
+ internal_format: GLenum,
+ width: GLsizei,
+ height: GLsizei,
+ buf: *mut c_void,
+ min_width: GLsizei,
+ min_height: GLsizei,
+ ) {
+ unsafe {
+ SetTextureBuffer(
+ tex,
+ internal_format,
+ width,
+ height,
+ buf,
+ min_width,
+ min_height,
+ );
+ }
+ }
+
+ pub fn composite(
+ &self,
+ src_id: GLuint,
+ src_x: GLint,
+ src_y: GLint,
+ src_width: GLsizei,
+ src_height: GLint,
+ dst_x: GLint,
+ dst_y: GLint,
+ opaque: bool,
+ flip: bool,
+ ) {
+ unsafe {
+ Composite(
+ src_id,
+ src_x,
+ src_y,
+ src_width,
+ src_height,
+ dst_x,
+ dst_y,
+ opaque as GLboolean,
+ flip as GLboolean,
+ );
+ }
+ }
+}
+
+impl From<*mut c_void> for Context {
+ fn from(ptr: *mut c_void) -> Self {
+ Context(ptr)
+ }
+}
+
+impl From<Context> for *mut c_void {
+ fn from(ctx: Context) -> Self {
+ ctx.0
+ }
+}
+
+fn calculate_length(width: GLsizei, height: GLsizei, format: GLenum, pixel_type: GLenum) -> usize {
+ let colors = match format {
+ RED => 1,
+ RGB => 3,
+ BGR => 3,
+
+ RGBA => 4,
+ BGRA => 4,
+
+ ALPHA => 1,
+ R16 => 1,
+ LUMINANCE => 1,
+ DEPTH_COMPONENT => 1,
+ _ => panic!("unsupported format for read_pixels: {:?}", format),
+ };
+ let depth = match pixel_type {
+ UNSIGNED_BYTE => 1,
+ UNSIGNED_SHORT => 2,
+ SHORT => 2,
+ FLOAT => 4,
+ _ => panic!("unsupported pixel_type for read_pixels: {:?}", pixel_type),
+ };
+
+ return (width * height * colors * depth) as usize;
+}
+
+impl Gl for Context {
+ fn get_type(&self) -> GlType {
+ GlType::Gl
+ }
+
+ fn buffer_data_untyped(
+ &self,
+ target: GLenum,
+ size: GLsizeiptr,
+ data: *const GLvoid,
+ usage: GLenum,
+ ) {
+ debug!(
+ "buffer_data_untyped {} {} {:?} {}",
+ target, size, data, usage
+ );
+ //panic!();
+ unsafe {
+ BufferData(target, size, data, usage);
+ }
+ }
+
+ fn buffer_sub_data_untyped(
+ &self,
+ target: GLenum,
+ offset: isize,
+ size: GLsizeiptr,
+ data: *const GLvoid,
+ ) {
+ debug!(
+ "buffer_sub_data_untyped {} {} {} {:?}",
+ target, offset, size, data
+ );
+ //panic!();
+ unsafe {
+ BufferSubData(target, offset, size, data);
+ }
+ }
+
+ fn map_buffer(&self, target: GLenum, access: GLbitfield) -> *mut c_void {
+ unsafe { MapBuffer(target, access) }
+ }
+
+ fn map_buffer_range(
+ &self,
+ target: GLenum,
+ offset: GLintptr,
+ length: GLsizeiptr,
+ access: GLbitfield,
+ ) -> *mut c_void {
+ unsafe { MapBufferRange(target, offset, length, access) }
+ }
+
+ fn unmap_buffer(&self, target: GLenum) -> GLboolean {
+ unsafe { UnmapBuffer(target) }
+ }
+
+ fn shader_source(&self, shader: GLuint, strings: &[&[u8]]) {
+ //panic!();
+ debug!("shader_source {}", shader);
+ //for s in strings {
+ // debug!("{}", str::from_utf8(s).unwrap());
+ //}
+ //panic!();
+ for s in strings {
+ let u = str::from_utf8(s).unwrap();
+ const PREFIX: &'static str = "// shader: ";
+ if let Some(start) = u.find(PREFIX) {
+ if let Some(end) = u[start ..].find('\n') {
+ let name = u[start + PREFIX.len() .. start + end].trim();
+ debug!("shader name: {}", name);
+ unsafe {
+ let c_string = CString::new(name).unwrap();
+ ShaderSourceByName(shader, c_string.as_ptr());
+ return;
+ }
+ }
+ }
+ }
+ panic!("unknown shader");
+ }
+
+ fn tex_buffer(&self, target: GLenum, internal_format: GLenum, buffer: GLuint) {
+ panic!();
+ }
+
+ fn read_buffer(&self, mode: GLenum) {
+ panic!();
+ }
+
+ fn read_pixels_into_buffer(
+ &self,
+ x: GLint,
+ y: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ format: GLenum,
+ pixel_type: GLenum,
+ dst_buffer: &mut [u8],
+ ) {
+ // Assumes that the user properly allocated the size for dst_buffer.
+ assert!(calculate_length(width, height, format, pixel_type) == dst_buffer.len());
+
+ unsafe {
+ ReadPixels(
+ x,
+ y,
+ width,
+ height,
+ format,
+ pixel_type,
+ dst_buffer.as_mut_ptr() as *mut c_void,
+ );
+ }
+ }
+
+ fn read_pixels(
+ &self,
+ x: GLint,
+ y: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ format: GLenum,
+ pixel_type: GLenum,
+ ) -> Vec<u8> {
+ let len = calculate_length(width, height, format, pixel_type);
+ let mut pixels: Vec<u8> = Vec::new();
+ pixels.reserve(len);
+ unsafe {
+ pixels.set_len(len);
+ }
+
+ self.read_pixels_into_buffer(
+ x,
+ y,
+ width,
+ height,
+ format,
+ pixel_type,
+ pixels.as_mut_slice(),
+ );
+
+ pixels
+ }
+
+ unsafe fn read_pixels_into_pbo(
+ &self,
+ x: GLint,
+ y: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ format: GLenum,
+ pixel_type: GLenum,
+ ) {
+ ReadPixels(x, y, width, height, format, pixel_type, ptr::null_mut());
+ }
+
+ fn sample_coverage(&self, value: GLclampf, invert: bool) {
+ panic!();
+ }
+
+ fn polygon_offset(&self, factor: GLfloat, units: GLfloat) {
+ panic!();
+ }
+
+ fn pixel_store_i(&self, name: GLenum, param: GLint) {
+ //panic!();
+ debug!("pixel_store_i {:x} {}", name, param);
+ unsafe {
+ PixelStorei(name, param);
+ }
+ }
+
+ fn gen_buffers(&self, n: GLsizei) -> Vec<GLuint> {
+ //panic!();
+ let mut result = vec![0 as GLuint; n as usize];
+ unsafe {
+ GenBuffers(n, result.as_mut_ptr());
+ }
+ result
+ }
+
+ fn gen_renderbuffers(&self, n: GLsizei) -> Vec<GLuint> {
+ debug!("gen_renderbuffers {}", n);
+ //panic!();
+ let mut result = vec![0 as GLuint; n as usize];
+ unsafe {
+ GenRenderbuffers(n, result.as_mut_ptr());
+ }
+ result
+ }
+
+ fn gen_framebuffers(&self, n: GLsizei) -> Vec<GLuint> {
+ //panic!();
+ debug!("gen_framebuffers {}", n);
+ let mut result = vec![0 as GLuint; n as usize];
+ unsafe {
+ GenFramebuffers(n, result.as_mut_ptr());
+ }
+ result
+ }
+
+ fn gen_textures(&self, n: GLsizei) -> Vec<GLuint> {
+ //panic!();
+ let mut result = vec![0 as GLuint; n as usize];
+ unsafe {
+ GenTextures(n, result.as_mut_ptr());
+ }
+ result
+ }
+
+ fn gen_vertex_arrays(&self, n: GLsizei) -> Vec<GLuint> {
+ //panic!();
+ let mut result = vec![0 as GLuint; n as usize];
+ unsafe {
+ GenVertexArrays(n, result.as_mut_ptr());
+ }
+ result
+ }
+
+ fn gen_vertex_arrays_apple(&self, n: GLsizei) -> Vec<GLuint> {
+ self.gen_vertex_arrays(n)
+ }
+
+ fn gen_queries(&self, n: GLsizei) -> Vec<GLuint> {
+ let mut result = vec![0 as GLuint; n as usize];
+ unsafe {
+ GenQueries(n, result.as_mut_ptr());
+ }
+ result
+ }
+
+ fn begin_query(&self, target: GLenum, id: GLuint) {
+ unsafe {
+ BeginQuery(target, id);
+ }
+ }
+
+ fn end_query(&self, target: GLenum) {
+ unsafe {
+ EndQuery(target);
+ }
+ }
+
+ fn query_counter(&self, id: GLuint, target: GLenum) {
+ panic!();
+ }
+
+ fn get_query_object_iv(&self, id: GLuint, pname: GLenum) -> i32 {
+ panic!();
+ //0
+ }
+
+ fn get_query_object_uiv(&self, id: GLuint, pname: GLenum) -> u32 {
+ panic!();
+ //0
+ }
+
+ fn get_query_object_i64v(&self, id: GLuint, pname: GLenum) -> i64 {
+ panic!();
+ //0
+ }
+
+ fn get_query_object_ui64v(&self, id: GLuint, pname: GLenum) -> u64 {
+ let mut result = 0;
+ unsafe {
+ GetQueryObjectui64v(id, pname, &mut result);
+ }
+ result
+ }
+
+ fn delete_queries(&self, queries: &[GLuint]) {
+ unsafe {
+ for q in queries {
+ DeleteQuery(*q);
+ }
+ }
+ }
+
+ fn delete_vertex_arrays(&self, vertex_arrays: &[GLuint]) {
+ unsafe {
+ for v in vertex_arrays {
+ DeleteVertexArray(*v);
+ }
+ }
+ }
+
+ fn delete_vertex_arrays_apple(&self, vertex_arrays: &[GLuint]) {
+ self.delete_vertex_arrays(vertex_arrays)
+ }
+
+ fn delete_buffers(&self, buffers: &[GLuint]) {
+ unsafe {
+ for b in buffers {
+ DeleteBuffer(*b);
+ }
+ }
+ }
+
+ fn delete_renderbuffers(&self, renderbuffers: &[GLuint]) {
+ unsafe {
+ for r in renderbuffers {
+ DeleteRenderbuffer(*r);
+ }
+ }
+ }
+
+ fn delete_framebuffers(&self, framebuffers: &[GLuint]) {
+ unsafe {
+ for f in framebuffers {
+ DeleteFramebuffer(*f);
+ }
+ }
+ }
+
+ fn delete_textures(&self, textures: &[GLuint]) {
+ unsafe {
+ for t in textures {
+ DeleteTexture(*t);
+ }
+ }
+ }
+
+ fn framebuffer_renderbuffer(
+ &self,
+ target: GLenum,
+ attachment: GLenum,
+ renderbuffertarget: GLenum,
+ renderbuffer: GLuint,
+ ) {
+ debug!(
+ "framebufer_renderbuffer {} {} {} {}",
+ target, attachment, renderbuffertarget, renderbuffer
+ );
+ //panic!();
+ unsafe {
+ FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+ }
+ }
+
+ fn renderbuffer_storage(
+ &self,
+ target: GLenum,
+ internalformat: GLenum,
+ width: GLsizei,
+ height: GLsizei,
+ ) {
+ debug!(
+ "renderbuffer_storage {} {} {} {}",
+ target, internalformat, width, height
+ );
+ //panic!();
+ unsafe {
+ RenderbufferStorage(target, internalformat, width, height);
+ }
+ }
+
+ fn depth_func(&self, func: GLenum) {
+ debug!("depth_func {}", func);
+ //panic!();
+ unsafe {
+ DepthFunc(func);
+ }
+ }
+
+ fn active_texture(&self, texture: GLenum) {
+ //panic!();
+ unsafe {
+ ActiveTexture(texture);
+ }
+ }
+
+ fn attach_shader(&self, program: GLuint, shader: GLuint) {
+ debug!("attach shader {} {}", program, shader);
+ //panic!();
+ unsafe {
+ AttachShader(program, shader);
+ }
+ }
+
+ fn bind_attrib_location(&self, program: GLuint, index: GLuint, name: &str) {
+ debug!("bind_attrib_location {} {} {}", program, index, name);
+ //panic!();
+ let c_string = CString::new(name).unwrap();
+ unsafe { BindAttribLocation(program, index, c_string.as_ptr()) }
+ }
+
+ // https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glGetUniform.xml
+ unsafe fn get_uniform_iv(&self, program: GLuint, location: GLint, result: &mut [GLint]) {
+ panic!();
+ //assert!(!result.is_empty());
+ }
+
+ // https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glGetUniform.xml
+ unsafe fn get_uniform_fv(&self, program: GLuint, location: GLint, result: &mut [GLfloat]) {
+ panic!();
+ //assert!(!result.is_empty());
+ }
+
+ fn get_uniform_block_index(&self, program: GLuint, name: &str) -> GLuint {
+ panic!();
+ //0
+ }
+
+ fn get_uniform_indices(&self, program: GLuint, names: &[&str]) -> Vec<GLuint> {
+ panic!();
+ //Vec::new()
+ }
+
+ fn bind_buffer_base(&self, target: GLenum, index: GLuint, buffer: GLuint) {
+ panic!();
+ }
+
+ fn bind_buffer_range(
+ &self,
+ target: GLenum,
+ index: GLuint,
+ buffer: GLuint,
+ offset: GLintptr,
+ size: GLsizeiptr,
+ ) {
+ panic!();
+ }
+
+ fn uniform_block_binding(
+ &self,
+ program: GLuint,
+ uniform_block_index: GLuint,
+ uniform_block_binding: GLuint,
+ ) {
+ panic!();
+ }
+
+ fn bind_buffer(&self, target: GLenum, buffer: GLuint) {
+ //panic!();
+ unsafe {
+ BindBuffer(target, buffer);
+ }
+ }
+
+ fn bind_vertex_array(&self, vao: GLuint) {
+ //panic!();
+ unsafe {
+ BindVertexArray(vao);
+ }
+ }
+
+ fn bind_vertex_array_apple(&self, vao: GLuint) {
+ self.bind_vertex_array(vao)
+ }
+
+ fn bind_renderbuffer(&self, target: GLenum, renderbuffer: GLuint) {
+ debug!("bind_renderbuffer {} {}", target, renderbuffer);
+ //panic!();
+ unsafe {
+ BindRenderbuffer(target, renderbuffer);
+ }
+ }
+
+ fn bind_framebuffer(&self, target: GLenum, framebuffer: GLuint) {
+ debug!("bind_framebuffer {} {}", target, framebuffer);
+ //panic!();
+ unsafe {
+ BindFramebuffer(target, framebuffer);
+ }
+ }
+
+ fn bind_texture(&self, target: GLenum, texture: GLuint) {
+ //panic!();
+ unsafe {
+ BindTexture(target, texture);
+ }
+ }
+
+ fn draw_buffers(&self, bufs: &[GLenum]) {
+ panic!();
+ //unsafe {}
+ }
+
+ // FIXME: Does not verify buffer size -- unsafe!
+ fn tex_image_2d(
+ &self,
+ target: GLenum,
+ level: GLint,
+ internal_format: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ border: GLint,
+ format: GLenum,
+ ty: GLenum,
+ opt_data: Option<&[u8]>,
+ ) {
+ unsafe {
+ let pdata = match opt_data {
+ Some(data) => data.as_ptr() as *const GLvoid,
+ None => ptr::null(),
+ };
+ TexImage2D(
+ target,
+ level,
+ internal_format,
+ width,
+ height,
+ border,
+ format,
+ ty,
+ pdata,
+ );
+ }
+ }
+
+ fn compressed_tex_image_2d(
+ &self,
+ target: GLenum,
+ level: GLint,
+ internal_format: GLenum,
+ width: GLsizei,
+ height: GLsizei,
+ border: GLint,
+ data: &[u8],
+ ) {
+ panic!();
+ }
+
+ fn compressed_tex_sub_image_2d(
+ &self,
+ target: GLenum,
+ level: GLint,
+ xoffset: GLint,
+ yoffset: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ format: GLenum,
+ data: &[u8],
+ ) {
+ panic!();
+ }
+
+ // FIXME: Does not verify buffer size -- unsafe!
+ fn tex_image_3d(
+ &self,
+ target: GLenum,
+ level: GLint,
+ internal_format: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ depth: GLsizei,
+ border: GLint,
+ format: GLenum,
+ ty: GLenum,
+ opt_data: Option<&[u8]>,
+ ) {
+ unsafe {
+ let pdata = match opt_data {
+ Some(data) => data.as_ptr() as *const GLvoid,
+ None => ptr::null(),
+ };
+ TexImage3D(
+ target,
+ level,
+ internal_format,
+ width,
+ height,
+ depth,
+ border,
+ format,
+ ty,
+ pdata,
+ );
+ }
+ }
+
+ fn copy_tex_image_2d(
+ &self,
+ target: GLenum,
+ level: GLint,
+ internal_format: GLenum,
+ x: GLint,
+ y: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ border: GLint,
+ ) {
+ panic!();
+ }
+
+ fn copy_tex_sub_image_2d(
+ &self,
+ target: GLenum,
+ level: GLint,
+ xoffset: GLint,
+ yoffset: GLint,
+ x: GLint,
+ y: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ ) {
+ unsafe {
+ CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+ }
+ }
+
+ fn copy_tex_sub_image_3d(
+ &self,
+ target: GLenum,
+ level: GLint,
+ xoffset: GLint,
+ yoffset: GLint,
+ zoffset: GLint,
+ x: GLint,
+ y: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ ) {
+ unsafe {
+ CopyTexSubImage3D(
+ target, level, xoffset, yoffset, zoffset, x, y, width, height,
+ );
+ }
+ }
+
+ fn tex_sub_image_2d(
+ &self,
+ target: GLenum,
+ level: GLint,
+ xoffset: GLint,
+ yoffset: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ format: GLenum,
+ ty: GLenum,
+ data: &[u8],
+ ) {
+ debug!(
+ "tex_sub_image_2d {} {} {} {} {} {} {} {}",
+ target, level, xoffset, yoffset, width, height, format, ty
+ );
+ //panic!();
+ unsafe {
+ TexSubImage2D(
+ target,
+ level,
+ xoffset,
+ yoffset,
+ width,
+ height,
+ format,
+ ty,
+ data.as_ptr() as *const c_void,
+ );
+ }
+ }
+
+ fn tex_sub_image_2d_pbo(
+ &self,
+ target: GLenum,
+ level: GLint,
+ xoffset: GLint,
+ yoffset: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ format: GLenum,
+ ty: GLenum,
+ offset: usize,
+ ) {
+ debug!(
+ "tex_sub_image_2d_pbo {} {} {} {} {} {} {} {} {}",
+ target, level, xoffset, yoffset, width, height, format, ty, offset
+ );
+ //panic!();
+ unsafe {
+ TexSubImage2D(
+ target,
+ level,
+ xoffset,
+ yoffset,
+ width,
+ height,
+ format,
+ ty,
+ offset as *const c_void,
+ );
+ }
+ }
+
+ fn tex_sub_image_3d(
+ &self,
+ target: GLenum,
+ level: GLint,
+ xoffset: GLint,
+ yoffset: GLint,
+ zoffset: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ depth: GLsizei,
+ format: GLenum,
+ ty: GLenum,
+ data: &[u8],
+ ) {
+ debug!("tex_sub_image_3d");
+ //panic!();
+ unsafe {
+ TexSubImage3D(
+ target,
+ level,
+ xoffset,
+ yoffset,
+ zoffset,
+ width,
+ height,
+ depth,
+ format,
+ ty,
+ data.as_ptr() as *const c_void,
+ );
+ }
+ }
+
+ fn tex_sub_image_3d_pbo(
+ &self,
+ target: GLenum,
+ level: GLint,
+ xoffset: GLint,
+ yoffset: GLint,
+ zoffset: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ depth: GLsizei,
+ format: GLenum,
+ ty: GLenum,
+ offset: usize,
+ ) {
+ unsafe {
+ TexSubImage3D(
+ target,
+ level,
+ xoffset,
+ yoffset,
+ zoffset,
+ width,
+ height,
+ depth,
+ format,
+ ty,
+ offset as *const c_void,
+ );
+ }
+ }
+
+ fn tex_storage_2d(
+ &self,
+ target: GLenum,
+ levels: GLint,
+ internal_format: GLenum,
+ width: GLsizei,
+ height: GLsizei,
+ ) {
+ //panic!();
+ unsafe {
+ TexStorage2D(target, levels, internal_format, width, height);
+ }
+ }
+
+ fn tex_storage_3d(
+ &self,
+ target: GLenum,
+ levels: GLint,
+ internal_format: GLenum,
+ width: GLsizei,
+ height: GLsizei,
+ depth: GLsizei,
+ ) {
+ //panic!();
+ unsafe {
+ TexStorage3D(target, levels, internal_format, width, height, depth);
+ }
+ }
+
+ fn get_tex_image_into_buffer(
+ &self,
+ target: GLenum,
+ level: GLint,
+ format: GLenum,
+ ty: GLenum,
+ output: &mut [u8],
+ ) {
+ panic!();
+ }
+
+ unsafe fn copy_image_sub_data(
+ &self,
+ src_name: GLuint,
+ src_target: GLenum,
+ src_level: GLint,
+ src_x: GLint,
+ src_y: GLint,
+ src_z: GLint,
+ dst_name: GLuint,
+ dst_target: GLenum,
+ dst_level: GLint,
+ dst_x: GLint,
+ dst_y: GLint,
+ dst_z: GLint,
+ src_width: GLsizei,
+ src_height: GLsizei,
+ src_depth: GLsizei,
+ ) {
+ CopyImageSubData(
+ src_name, src_target, src_level, src_x, src_y, src_z, dst_name, dst_target, dst_level,
+ dst_x, dst_y, dst_z, src_width, src_height, src_depth,
+ );
+ }
+
+ fn invalidate_framebuffer(&self, target: GLenum, attachments: &[GLenum]) {
+ unsafe {
+ InvalidateFramebuffer(target, attachments.len() as GLsizei, attachments.as_ptr());
+ }
+ }
+
+ fn invalidate_sub_framebuffer(
+ &self,
+ target: GLenum,
+ attachments: &[GLenum],
+ xoffset: GLint,
+ yoffset: GLint,
+ width: GLsizei,
+ height: GLsizei,
+ ) {
+ }
+
+ #[inline]
+ unsafe fn get_integer_v(&self, name: GLenum, result: &mut [GLint]) {
+ //panic!();
+ assert!(!result.is_empty());
+ GetIntegerv(name, result.as_mut_ptr());
+ }
+
+ #[inline]
+ unsafe fn get_integer_64v(&self, name: GLenum, result: &mut [GLint64]) {
+ panic!();
+ //assert!(!result.is_empty());
+ }
+
+ #[inline]
+ unsafe fn get_integer_iv(&self, name: GLenum, index: GLuint, result: &mut [GLint]) {
+ panic!();
+ //assert!(!result.is_empty());
+ }
+
+ #[inline]
+ unsafe fn get_integer_64iv(&self, name: GLenum, index: GLuint, result: &mut [GLint64]) {
+ panic!();
+ //assert!(!result.is_empty());
+ }
+
+ #[inline]
+ unsafe fn get_boolean_v(&self, name: GLenum, result: &mut [GLboolean]) {
+ debug!("get_boolean_v {}", name);
+ //panic!();
+ assert!(!result.is_empty());
+ GetBooleanv(name, result.as_mut_ptr());
+ }
+
+ #[inline]
+ unsafe fn get_float_v(&self, name: GLenum, result: &mut [GLfloat]) {
+ panic!();
+ //assert!(!result.is_empty());
+ }
+
+ fn get_framebuffer_attachment_parameter_iv(
+ &self,
+ target: GLenum,
+ attachment: GLenum,
+ pname: GLenum,
+ ) -> GLint {
+ panic!();
+ //0
+ }
+
+ fn get_renderbuffer_parameter_iv(&self, target: GLenum, pname: GLenum) -> GLint {
+ panic!();
+ //0
+ }
+
+ fn get_tex_parameter_iv(&self, target: GLenum, pname: GLenum) -> GLint {
+ panic!();
+ //0
+ }
+
+ fn get_tex_parameter_fv(&self, target: GLenum, pname: GLenum) -> GLfloat {
+ panic!();
+ //0.0
+ }
+
+ fn tex_parameter_i(&self, target: GLenum, pname: GLenum, param: GLint) {
+ //panic!();
+ unsafe {
+ TexParameteri(target, pname, param);
+ }
+ }
+
+ fn tex_parameter_f(&self, target: GLenum, pname: GLenum, param: GLfloat) {
+ panic!();
+ }
+
+ fn framebuffer_texture_2d(
+ &self,
+ target: GLenum,
+ attachment: GLenum,
+ textarget: GLenum,
+ texture: GLuint,
+ level: GLint,
+ ) {
+ debug!(
+ "framebuffer_texture_2d {} {} {} {} {}",
+ target, attachment, textarget, texture, level
+ );
+ //panic!();
+ unsafe {
+ FramebufferTexture2D(target, attachment, textarget, texture, level);
+ }
+ }
+
+ fn framebuffer_texture_layer(
+ &self,
+ target: GLenum,
+ attachment: GLenum,
+ texture: GLuint,
+ level: GLint,
+ layer: GLint,
+ ) {
+ debug!(
+ "framebuffer_texture_layer {} {} {} {} {}",
+ target, attachment, texture, level, layer
+ );
+ //panic!();
+ unsafe {
+ FramebufferTextureLayer(target, attachment, texture, level, layer);
+ }
+ }
+
+ fn blit_framebuffer(
+ &self,
+ src_x0: GLint,
+ src_y0: GLint,
+ src_x1: GLint,
+ src_y1: GLint,
+ dst_x0: GLint,
+ dst_y0: GLint,
+ dst_x1: GLint,
+ dst_y1: GLint,
+ mask: GLbitfield,
+ filter: GLenum,
+ ) {
+ unsafe {
+ BlitFramebuffer(
+ src_x0, src_y0, src_x1, src_y1, dst_x0, dst_y0, dst_x1, dst_y1, mask, filter,
+ );
+ }
+ }
+
+ fn vertex_attrib_4f(&self, index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) {
+ panic!();
+ }
+
+ fn vertex_attrib_pointer_f32(
+ &self,
+ index: GLuint,
+ size: GLint,
+ normalized: bool,
+ stride: GLsizei,
+ offset: GLuint,
+ ) {
+ panic!();
+ }
+
+ fn vertex_attrib_pointer(
+ &self,
+ index: GLuint,
+ size: GLint,
+ type_: GLenum,
+ normalized: bool,
+ stride: GLsizei,
+ offset: GLuint,
+ ) {
+ debug!(
+ "vertex_attrib_pointer {} {} {} {} {} {}",
+ index, size, type_, normalized, stride, offset
+ );
+ //panic!();
+ unsafe {
+ VertexAttribPointer(
+ index,
+ size,
+ type_,
+ normalized as GLboolean,
+ stride,
+ offset as *const GLvoid,
+ );
+ }
+ }
+
+ fn vertex_attrib_i_pointer(
+ &self,
+ index: GLuint,
+ size: GLint,
+ type_: GLenum,
+ stride: GLsizei,
+ offset: GLuint,
+ ) {
+ debug!(
+ "vertex_attrib_i_pointer {} {} {} {} {}",
+ index, size, type_, stride, offset
+ );
+ //panic!();
+ unsafe {
+ VertexAttribIPointer(index, size, type_, stride, offset as *const GLvoid);
+ }
+ }
+
+ fn vertex_attrib_divisor(&self, index: GLuint, divisor: GLuint) {
+ debug!("vertex_attrib_divisor {} {}", index, divisor);
+ //assert!(index == 0 && divisor == 0);
+ //panic!();
+ unsafe {
+ VertexAttribDivisor(index, divisor);
+ }
+ }
+
+ fn viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei) {
+ debug!("viewport {} {} {} {}", x, y, width, height);
+ //panic!();
+ unsafe {
+ SetViewport(x, y, width, height);
+ }
+ }
+
+ fn scissor(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei) {
+ //panic!();
+ unsafe {
+ SetScissor(x, y, width, height);
+ }
+ }
+
+ fn line_width(&self, width: GLfloat) {
+ panic!();
+ }
+
+ fn use_program(&self, program: GLuint) {
+ //panic!();
+ unsafe {
+ UseProgram(program);
+ }
+ }
+
+ fn validate_program(&self, program: GLuint) {
+ panic!();
+ }
+
+ fn draw_arrays(&self, mode: GLenum, first: GLint, count: GLsizei) {
+ panic!();
+ }
+
+ fn draw_arrays_instanced(
+ &self,
+ mode: GLenum,
+ first: GLint,
+ count: GLsizei,
+ primcount: GLsizei,
+ ) {
+ panic!();
+ }
+
+ fn draw_elements(
+ &self,
+ mode: GLenum,
+ count: GLsizei,
+ element_type: GLenum,
+ indices_offset: GLuint,
+ ) {
+ debug!(
+ "draw_elements {} {} {} {} {}",
+ mode, count, element_type, indices_offset
+ );
+ //panic!();
+ unsafe {
+ DrawElementsInstanced(
+ mode,
+ count,
+ element_type,
+ indices_offset as *const c_void,
+ 1,
+ );
+ }
+ }
+
+ fn draw_elements_instanced(
+ &self,
+ mode: GLenum,
+ count: GLsizei,
+ element_type: GLenum,
+ indices_offset: GLuint,
+ primcount: GLsizei,
+ ) {
+ debug!(
+ "draw_elements_instanced {} {} {} {} {}",
+ mode, count, element_type, indices_offset, primcount
+ );
+ //panic!();
+ unsafe {
+ DrawElementsInstanced(
+ mode,
+ count,
+ element_type,
+ indices_offset as *const c_void,
+ primcount,
+ );
+ }
+ }
+
+ fn blend_color(&self, r: f32, g: f32, b: f32, a: f32) {
+ unsafe {
+ BlendColor(r, g, b, a);
+ }
+ }
+
+ fn blend_func(&self, sfactor: GLenum, dfactor: GLenum) {
+ unsafe {
+ BlendFunc(sfactor, dfactor, sfactor, dfactor);
+ }
+ }
+
+ fn blend_func_separate(
+ &self,
+ src_rgb: GLenum,
+ dest_rgb: GLenum,
+ src_alpha: GLenum,
+ dest_alpha: GLenum,
+ ) {
+ unsafe {
+ BlendFunc(src_rgb, dest_rgb, src_alpha, dest_alpha);
+ }
+ }
+
+ fn blend_equation(&self, mode: GLenum) {
+ unsafe {
+ BlendEquation(mode);
+ }
+ }
+
+ fn blend_equation_separate(&self, mode_rgb: GLenum, mode_alpha: GLenum) {
+ panic!();
+ }
+
+ fn color_mask(&self, r: bool, g: bool, b: bool, a: bool) {
+ panic!();
+ }
+
+ fn cull_face(&self, mode: GLenum) {
+ panic!();
+ }
+
+ fn front_face(&self, mode: GLenum) {
+ panic!();
+ }
+
+ fn enable(&self, cap: GLenum) {
+ debug!("enable {}", cap);
+ //panic!();
+ unsafe {
+ Enable(cap);
+ }
+ }
+
+ fn disable(&self, cap: GLenum) {
+ debug!("disable {}", cap);
+ //panic!();
+ unsafe {
+ Disable(cap);
+ }
+ }
+
+ fn hint(&self, param_name: GLenum, param_val: GLenum) {
+ panic!();
+ }
+
+ fn is_enabled(&self, cap: GLenum) -> GLboolean {
+ panic!();
+ //0
+ }
+
+ fn is_shader(&self, shader: GLuint) -> GLboolean {
+ panic!();
+ //0
+ }
+
+ fn is_texture(&self, texture: GLenum) -> GLboolean {
+ panic!();
+ //0
+ }
+
+ fn is_framebuffer(&self, framebuffer: GLenum) -> GLboolean {
+ panic!();
+ //0
+ }
+
+ fn is_renderbuffer(&self, renderbuffer: GLenum) -> GLboolean {
+ panic!();
+ //0
+ }
+
+ fn check_frame_buffer_status(&self, target: GLenum) -> GLenum {
+ debug!("check_frame_buffer_status {}", target);
+ //panic!();
+ unsafe { CheckFramebufferStatus(target) }
+ }
+
+ fn enable_vertex_attrib_array(&self, index: GLuint) {
+ //panic!();
+ debug!("enable_vertex_attrib_array {}", index);
+ unsafe {
+ EnableVertexAttribArray(index);
+ //assert_eq!(index, 0);
+ }
+ }
+
+ fn disable_vertex_attrib_array(&self, index: GLuint) {
+ panic!();
+ }
+
+ fn uniform_1f(&self, location: GLint, v0: GLfloat) {
+ panic!();
+ }
+
+ fn uniform_1fv(&self, location: GLint, values: &[f32]) {
+ panic!();
+ }
+
+ fn uniform_1i(&self, location: GLint, v0: GLint) {
+ debug!("uniform_1i {} {}", location, v0);
+ //panic!();
+ unsafe {
+ Uniform1i(location, v0);
+ }
+ }
+
+ fn uniform_1iv(&self, location: GLint, values: &[i32]) {
+ panic!();
+ }
+
+ fn uniform_1ui(&self, location: GLint, v0: GLuint) {
+ panic!();
+ }
+
+ fn uniform_2f(&self, location: GLint, v0: GLfloat, v1: GLfloat) {
+ panic!();
+ }
+
+ fn uniform_2fv(&self, location: GLint, values: &[f32]) {
+ panic!();
+ }
+
+ fn uniform_2i(&self, location: GLint, v0: GLint, v1: GLint) {
+ panic!();
+ }
+
+ fn uniform_2iv(&self, location: GLint, values: &[i32]) {
+ panic!();
+ }
+
+ fn uniform_2ui(&self, location: GLint, v0: GLuint, v1: GLuint) {
+ panic!();
+ }
+
+ fn uniform_3f(&self, location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat) {
+ panic!();
+ }
+
+ fn uniform_3fv(&self, location: GLint, values: &[f32]) {
+ panic!();
+ }
+
+ fn uniform_3i(&self, location: GLint, v0: GLint, v1: GLint, v2: GLint) {
+ panic!();
+ }
+
+ fn uniform_3iv(&self, location: GLint, values: &[i32]) {
+ panic!();
+ }
+
+ fn uniform_3ui(&self, location: GLint, v0: GLuint, v1: GLuint, v2: GLuint) {
+ panic!();
+ }
+
+ fn uniform_4f(&self, location: GLint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) {
+ panic!();
+ }
+
+ fn uniform_4i(&self, location: GLint, x: GLint, y: GLint, z: GLint, w: GLint) {
+ panic!();
+ }
+
+ fn uniform_4iv(&self, location: GLint, values: &[i32]) {
+ panic!();
+ }
+
+ fn uniform_4ui(&self, location: GLint, x: GLuint, y: GLuint, z: GLuint, w: GLuint) {
+ panic!();
+ }
+
+ fn uniform_4fv(&self, location: GLint, values: &[f32]) {
+ unsafe {
+ Uniform4fv(location, (values.len() / 4) as GLsizei, values.as_ptr());
+ }
+ }
+
+ fn uniform_matrix_2fv(&self, location: GLint, transpose: bool, value: &[f32]) {
+ panic!();
+ }
+
+ fn uniform_matrix_3fv(&self, location: GLint, transpose: bool, value: &[f32]) {
+ panic!();
+ }
+
+ fn uniform_matrix_4fv(&self, location: GLint, transpose: bool, value: &[f32]) {
+ debug!("uniform_matrix_4fv {} {} {:?}", location, transpose, value);
+ //panic!();
+ unsafe {
+ UniformMatrix4fv(
+ location,
+ (value.len() / 16) as GLsizei,
+ transpose as GLboolean,
+ value.as_ptr(),
+ );
+ }
+ }
+
+ fn depth_mask(&self, flag: bool) {
+ debug!("depth_mask {}", flag);
+ //panic!();
+ unsafe {
+ DepthMask(flag as GLboolean);
+ }
+ }
+
+ fn depth_range(&self, near: f64, far: f64) {
+ panic!();
+ }
+
+ fn get_active_attrib(&self, program: GLuint, index: GLuint) -> (i32, u32, String) {
+ panic!();
+ //(0, 0, String::new())
+ }
+
+ fn get_active_uniform(&self, program: GLuint, index: GLuint) -> (i32, u32, String) {
+ panic!();
+ //(0, 0, String::new())
+ }
+
+ fn get_active_uniforms_iv(
+ &self,
+ program: GLuint,
+ indices: Vec<GLuint>,
+ pname: GLenum,
+ ) -> Vec<GLint> {
+ panic!();
+ //Vec::new()
+ }
+
+ fn get_active_uniform_block_i(&self, program: GLuint, index: GLuint, pname: GLenum) -> GLint {
+ panic!();
+ //0
+ }
+
+ fn get_active_uniform_block_iv(
+ &self,
+ program: GLuint,
+ index: GLuint,
+ pname: GLenum,
+ ) -> Vec<GLint> {
+ panic!();
+ //Vec::new()
+ }
+
+ fn get_active_uniform_block_name(&self, program: GLuint, index: GLuint) -> String {
+ panic!();
+ //String::new()
+ }
+
+ fn get_attrib_location(&self, program: GLuint, name: &str) -> c_int {
+ let name = CString::new(name).unwrap();
+ unsafe { GetAttribLocation(program, name.as_ptr()) }
+ }
+
+ fn get_frag_data_location(&self, program: GLuint, name: &str) -> c_int {
+ panic!();
+ //0
+ }
+
+ fn get_uniform_location(&self, program: GLuint, name: &str) -> c_int {
+ debug!("get_uniform_location {} {}", program, name);
+ //panic!();
+ let name = CString::new(name).unwrap();
+ unsafe { GetUniformLocation(program, name.as_ptr()) }
+ }
+
+ fn get_program_info_log(&self, program: GLuint) -> String {
+ panic!();
+ //String::new()
+ }
+
+ #[inline]
+ unsafe fn get_program_iv(&self, program: GLuint, pname: GLenum, result: &mut [GLint]) {
+ debug!("get_program_iv {}", pname);
+ //panic!();
+ assert!(!result.is_empty());
+ //#define GL_LINK_STATUS 0x8B82
+ if pname == 0x8b82 {
+ result[0] = 1;
+ }
+ }
+
+ fn get_program_binary(&self, program: GLuint) -> (Vec<u8>, GLenum) {
+ panic!();
+ //(Vec::new(), NONE)
+ }
+
+ fn program_binary(&self, program: GLuint, format: GLenum, binary: &[u8]) {
+ panic!();
+ }
+
+ fn program_parameter_i(&self, program: GLuint, pname: GLenum, value: GLint) {
+ panic!();
+ }
+
+ #[inline]
+ unsafe fn get_vertex_attrib_iv(&self, index: GLuint, pname: GLenum, result: &mut [GLint]) {
+ panic!();
+ //assert!(!result.is_empty());
+ }
+
+ #[inline]
+ unsafe fn get_vertex_attrib_fv(&self, index: GLuint, pname: GLenum, result: &mut [GLfloat]) {
+ panic!();
+ //assert!(!result.is_empty());
+ }
+
+ fn get_vertex_attrib_pointer_v(&self, index: GLuint, pname: GLenum) -> GLsizeiptr {
+ panic!();
+ //0
+ }
+
+ fn get_buffer_parameter_iv(&self, target: GLuint, pname: GLenum) -> GLint {
+ panic!();
+ //0
+ }
+
+ fn get_shader_info_log(&self, shader: GLuint) -> String {
+ debug!("get_shader_info_log {}", shader);
+ //panic!();
+ String::new()
+ }
+
+ fn get_string(&self, which: GLenum) -> String {
+ // panic!();
+ unsafe {
+ let llstr = GetString(which);
+ if !llstr.is_null() {
+ return str::from_utf8_unchecked(CStr::from_ptr(llstr).to_bytes()).to_string();
+ } else {
+ return "".to_string();
+ }
+ }
+ }
+
+ fn get_string_i(&self, which: GLenum, index: GLuint) -> String {
+ //panic!();
+ unsafe {
+ let llstr = GetStringi(which, index);
+ if !llstr.is_null() {
+ str::from_utf8_unchecked(CStr::from_ptr(llstr).to_bytes()).to_string()
+ } else {
+ "".to_string()
+ }
+ }
+ }
+
+ unsafe fn get_shader_iv(&self, shader: GLuint, pname: GLenum, result: &mut [GLint]) {
+ debug!("get_shader_iv");
+ //panic!();
+ assert!(!result.is_empty());
+ if pname == 0x8B81
+ /*gl::COMPILE_STATUS*/
+ {
+ result[0] = 1;
+ }
+ }
+
+ fn get_shader_precision_format(
+ &self,
+ _shader_type: GLuint,
+ precision_type: GLuint,
+ ) -> (GLint, GLint, GLint) {
+ // gl.GetShaderPrecisionFormat is not available until OpenGL 4.1.
+ // Fallback to OpenGL standard precissions that most desktop hardware support.
+ match precision_type {
+ LOW_FLOAT | MEDIUM_FLOAT | HIGH_FLOAT => {
+ // Fallback to IEEE 754 single precision
+ // Range: from -2^127 to 2^127
+ // Significand precision: 23 bits
+ (127, 127, 23)
+ }
+ LOW_INT | MEDIUM_INT | HIGH_INT => {
+ // Fallback to single precision integer
+ // Range: from -2^24 to 2^24
+ // Precision: For integer formats this value is always 0
+ (24, 24, 0)
+ }
+ _ => (0, 0, 0),
+ }
+ }
+
+ fn compile_shader(&self, shader: GLuint) {
+ debug!("compile_shader {}", shader);
+ //panic!();
+ }
+
+ fn create_program(&self) -> GLuint {
+ debug!("create_program");
+ //panic!();
+ unsafe { CreateProgram() }
+ }
+
+ fn delete_program(&self, program: GLuint) {
+ unsafe {
+ DeleteProgram(program);
+ }
+ }
+
+ fn create_shader(&self, shader_type: GLenum) -> GLuint {
+ debug!("create_shader {}", shader_type);
+ //panic!();
+ unsafe { CreateShader(shader_type) }
+ }
+
+ fn delete_shader(&self, shader: GLuint) {
+ debug!("delete_shader {}", shader);
+ //panic!();
+ unsafe {
+ DeleteShader(shader);
+ }
+ }
+
+ fn detach_shader(&self, program: GLuint, shader: GLuint) {
+ debug!("detach_shader {} {}", program, shader);
+ //panic!();
+ }
+
+ fn link_program(&self, program: GLuint) {
+ debug!("link_program {}", program);
+ //panic!();
+ unsafe {
+ LinkProgram(program);
+ }
+ }
+
+ fn clear_color(&self, r: f32, g: f32, b: f32, a: f32) {
+ //panic!();
+ unsafe {
+ ClearColor(r, g, b, a);
+ }
+ }
+
+ fn clear(&self, buffer_mask: GLbitfield) {
+ debug!("clear {}", buffer_mask);
+ //panic!();
+ unsafe {
+ Clear(buffer_mask);
+ }
+ }
+
+ fn clear_depth(&self, depth: f64) {
+ debug!("clear_depth {}", depth);
+ //panic!();
+ unsafe {
+ ClearDepth(depth as GLclampd);
+ }
+ }
+
+ fn clear_stencil(&self, s: GLint) {
+ panic!();
+ }
+
+ fn flush(&self) {}
+
+ fn finish(&self) {
+ unsafe {
+ Finish();
+ }
+ }
+
+ fn get_error(&self) -> GLenum {
+ //panic!();
+ unsafe { GetError() }
+ }
+
+ fn stencil_mask(&self, mask: GLuint) {
+ panic!();
+ }
+
+ fn stencil_mask_separate(&self, face: GLenum, mask: GLuint) {
+ panic!();
+ }
+
+ fn stencil_func(&self, func: GLenum, ref_: GLint, mask: GLuint) {
+ panic!();
+ }
+
+ fn stencil_func_separate(&self, face: GLenum, func: GLenum, ref_: GLint, mask: GLuint) {
+ panic!();
+ }
+
+ fn stencil_op(&self, sfail: GLenum, dpfail: GLenum, dppass: GLenum) {
+ panic!();
+ }
+
+ fn stencil_op_separate(&self, face: GLenum, sfail: GLenum, dpfail: GLenum, dppass: GLenum) {
+ panic!();
+ }
+
+ fn egl_image_target_texture2d_oes(&self, target: GLenum, image: GLeglImageOES) {
+ panic!("not supported")
+ }
+
+ fn egl_image_target_renderbuffer_storage_oes(&self, target: GLenum, image: GLeglImageOES) {
+ panic!("not supported")
+ }
+
+ fn generate_mipmap(&self, target: GLenum) {
+ unsafe {
+ GenerateMipmap(target);
+ }
+ }
+
+ fn insert_event_marker_ext(&self, message: &str) {
+ panic!();
+ }
+
+ fn push_group_marker_ext(&self, message: &str) {
+ debug!("push group {}", message);
+ panic!();
+ }
+
+ fn pop_group_marker_ext(&self) {
+ debug!("pop group");
+ panic!();
+ }
+
+ fn debug_message_insert_khr(
+ &self,
+ source: GLenum,
+ type_: GLenum,
+ id: GLuint,
+ severity: GLenum,
+ message: &str,
+ ) {
+ panic!();
+ }
+
+ fn push_debug_group_khr(&self, source: GLenum, id: GLuint, message: &str) {
+ panic!();
+ }
+
+ fn pop_debug_group_khr(&self) {
+ panic!();
+ }
+
+ fn fence_sync(&self, condition: GLenum, flags: GLbitfield) -> GLsync {
+ panic!();
+ //ptr::null()
+ }
+
+ fn client_wait_sync(&self, sync: GLsync, flags: GLbitfield, timeout: GLuint64) {
+ panic!();
+ }
+
+ fn wait_sync(&self, sync: GLsync, flags: GLbitfield, timeout: GLuint64) {
+ panic!();
+ }
+
+ fn texture_range_apple(&self, target: GLenum, data: &[u8]) {
+ panic!();
+ }
+
+ fn delete_sync(&self, sync: GLsync) {
+ panic!();
+ }
+
+ fn gen_fences_apple(&self, n: GLsizei) -> Vec<GLuint> {
+ panic!();
+ //Vec::new()
+ }
+
+ fn delete_fences_apple(&self, fences: &[GLuint]) {
+ panic!();
+ }
+
+ fn set_fence_apple(&self, fence: GLuint) {
+ panic!();
+ }
+
+ fn finish_fence_apple(&self, fence: GLuint) {
+ panic!();
+ }
+
+ fn test_fence_apple(&self, fence: GLuint) {
+ panic!();
+ }
+
+ fn test_object_apple(&self, object: GLenum, name: GLuint) -> GLboolean {
+ panic!();
+ //0
+ }
+
+ fn finish_object_apple(&self, object: GLenum, name: GLuint) {
+ panic!();
+ }
+
+ // GL_ARB_blend_func_extended
+ fn bind_frag_data_location_indexed(
+ &self,
+ program: GLuint,
+ color_number: GLuint,
+ index: GLuint,
+ name: &str,
+ ) {
+ panic!();
+ }
+
+ fn get_frag_data_index(&self, program: GLuint, name: &str) -> GLint {
+ panic!();
+ //-1
+ }
+
+ // GL_KHR_debug
+ fn get_debug_messages(&self) -> Vec<DebugMessage> {
+ Vec::new()
+ }
+
+ fn provoking_vertex_angle(&self, _mode: GLenum) {
+ unimplemented!("This extension is GLES only");
+ }
+
+ // GL_KHR_blend_equation_advanced
+ fn blend_barrier_khr(&self) {
+ panic!();
+ }
+
+ // GL_CHROMIUM_copy_texture
+ fn copy_texture_chromium(
+ &self,
+ _source_id: GLuint,
+ _source_level: GLint,
+ _dest_target: GLenum,
+ _dest_id: GLuint,
+ _dest_level: GLint,
+ _internal_format: GLint,
+ _dest_type: GLenum,
+ _unpack_flip_y: GLboolean,
+ _unpack_premultiply_alpha: GLboolean,
+ _unpack_unmultiply_alpha: GLboolean,
+ ) {
+ unimplemented!("This extension is GLES only");
+ }
+ fn copy_sub_texture_chromium(
+ &self,
+ _source_id: GLuint,
+ _source_level: GLint,
+ _dest_target: GLenum,
+ _dest_id: GLuint,
+ _dest_level: GLint,
+ _x_offset: GLint,
+ _y_offset: GLint,
+ _x: GLint,
+ _y: GLint,
+ _width: GLsizei,
+ _height: GLsizei,
+ _unpack_flip_y: GLboolean,
+ _unpack_premultiply_alpha: GLboolean,
+ _unpack_unmultiply_alpha: GLboolean,
+ ) {
+ unimplemented!("This extension is GLES only");
+ }
+
+ // GL_ANGLE_copy_texture_3d
+ fn copy_texture_3d_angle(
+ &self,
+ _source_id: GLuint,
+ _source_level: GLint,
+ _dest_target: GLenum,
+ _dest_id: GLuint,
+ _dest_level: GLint,
+ _internal_format: GLint,
+ _dest_type: GLenum,
+ _unpack_flip_y: GLboolean,
+ _unpack_premultiply_alpha: GLboolean,
+ _unpack_unmultiply_alpha: GLboolean,
+ ) {
+ unimplemented!("Not supported by SWGL");
+ }
+
+ fn copy_sub_texture_3d_angle(
+ &self,
+ _source_id: GLuint,
+ _source_level: GLint,
+ _dest_target: GLenum,
+ _dest_id: GLuint,
+ _dest_level: GLint,
+ _x_offset: GLint,
+ _y_offset: GLint,
+ _z_offset: GLint,
+ _x: GLint,
+ _y: GLint,
+ _z: GLint,
+ _width: GLsizei,
+ _height: GLsizei,
+ _depth: GLsizei,
+ _unpack_flip_y: GLboolean,
+ _unpack_premultiply_alpha: GLboolean,
+ _unpack_unmultiply_alpha: GLboolean,
+ ) {
+ unimplemented!("Not supported by SWGL");
+ }
+}
diff --git a/third_party/webrender/swgl/src/texture.h b/third_party/webrender/swgl/src/texture.h
new file mode 100644
index 00000000000..0219d078bcf
--- /dev/null
+++ b/third_party/webrender/swgl/src/texture.h
@@ -0,0 +1,127 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+template <typename S>
+static PackedRGBA8 textureLinearPackedRGBA8(S sampler, ivec2 i, int zoffset) {
+ assert(sampler->format == TextureFormat::RGBA8);
+ ivec2 frac = i & 0x7F;
+ i >>= 7;
+
+ I32 row0 = clampCoord(i.x, sampler->width) +
+ clampCoord(i.y, sampler->height) * sampler->stride + zoffset;
+ I32 row1 = row0 + ((i.y >= 0 && i.y < int32_t(sampler->height) - 1) &
+ I32(sampler->stride));
+ I16 fracx =
+ CONVERT(frac.x & (i.x >= 0 && i.x < int32_t(sampler->width) - 1), I16);
+ I16 fracy = CONVERT(frac.y, I16);
+
+ auto a0 =
+ CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row0.x]), V8<int16_t>);
+ auto a1 =
+ CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row1.x]), V8<int16_t>);
+ a0 += ((a1 - a0) * fracy.x) >> 7;
+
+ auto b0 =
+ CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row0.y]), V8<int16_t>);
+ auto b1 =
+ CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row1.y]), V8<int16_t>);
+ b0 += ((b1 - b0) * fracy.y) >> 7;
+
+ auto abl = combine(lowHalf(a0), lowHalf(b0));
+ auto abh = combine(highHalf(a0), highHalf(b0));
+ abl += ((abh - abl) * fracx.xxxxyyyy) >> 7;
+
+ auto c0 =
+ CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row0.z]), V8<int16_t>);
+ auto c1 =
+ CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row1.z]), V8<int16_t>);
+ c0 += ((c1 - c0) * fracy.z) >> 7;
+
+ auto d0 =
+ CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row0.w]), V8<int16_t>);
+ auto d1 =
+ CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row1.w]), V8<int16_t>);
+ d0 += ((d1 - d0) * fracy.w) >> 7;
+
+ auto cdl = combine(lowHalf(c0), lowHalf(d0));
+ auto cdh = combine(highHalf(c0), highHalf(d0));
+ cdl += ((cdh - cdl) * fracx.zzzzwwww) >> 7;
+
+ return pack(combine(HalfRGBA8(abl), HalfRGBA8(cdl)));
+}
+
+template <typename S>
+static inline void textureLinearCommit4(S sampler, ivec2 i, int zoffset,
+ uint32_t* buf) {
+ commit_span(buf, textureLinearPackedRGBA8(sampler, i, zoffset));
+}
+
+template <typename S>
+static void textureLinearCommit8(S sampler, ivec2_scalar i, int zoffset,
+ uint32_t* buf) {
+ assert(sampler->format == TextureFormat::RGBA8);
+ ivec2_scalar frac = i & 0x7F;
+ i >>= 7;
+
+ uint32_t* row0 =
+ &sampler
+ ->buf[clampCoord(i.x, sampler->width) +
+ clampCoord(i.y, sampler->height) * sampler->stride + zoffset];
+ uint32_t* row1 =
+ row0 +
+ ((i.y >= 0 && i.y < int32_t(sampler->height) - 1) ? sampler->stride : 0);
+ int16_t fracx = i.x >= 0 && i.x < int32_t(sampler->width) - 1 ? frac.x : 0;
+ int16_t fracy = frac.y;
+
+ U32 pix0 = unaligned_load<U32>(row0);
+ U32 pix0n = unaligned_load<U32>(row0 + 4);
+ uint32_t pix0x = row0[8];
+ U32 pix1 = unaligned_load<U32>(row1);
+ U32 pix1n = unaligned_load<U32>(row1 + 4);
+ uint32_t pix1x = row1[8];
+
+ {
+ auto ab0 = CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix0, pix0, 0, 1, 1, 2)),
+ V16<int16_t>);
+ auto ab1 = CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix1, pix1, 0, 1, 1, 2)),
+ V16<int16_t>);
+ ab0 += ((ab1 - ab0) * fracy) >> 7;
+
+ auto cd0 = CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix0, pix0n, 2, 3, 3, 4)),
+ V16<int16_t>);
+ auto cd1 = CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix1, pix1n, 2, 3, 3, 4)),
+ V16<int16_t>);
+ cd0 += ((cd1 - cd0) * fracy) >> 7;
+
+ auto abcdl = combine(lowHalf(ab0), lowHalf(cd0));
+ auto abcdh = combine(highHalf(ab0), highHalf(cd0));
+ abcdl += ((abcdh - abcdl) * fracx) >> 7;
+
+ commit_span(buf, pack(WideRGBA8(abcdl)));
+ }
+
+ {
+ auto ab0 =
+ CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix0n, pix0n, 0, 1, 1, 2)),
+ V16<int16_t>);
+ auto ab1 =
+ CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix1n, pix1n, 0, 1, 1, 2)),
+ V16<int16_t>);
+ ab0 += ((ab1 - ab0) * fracy) >> 7;
+
+ auto cd0 =
+ CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix0n, U32(pix0x), 2, 3, 3, 4)),
+ V16<int16_t>);
+ auto cd1 =
+ CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix1n, U32(pix1x), 2, 3, 3, 4)),
+ V16<int16_t>);
+ cd0 += ((cd1 - cd0) * fracy) >> 7;
+
+ auto abcdl = combine(lowHalf(ab0), lowHalf(cd0));
+ auto abcdh = combine(highHalf(ab0), highHalf(cd0));
+ abcdl += ((abcdh - abcdl) * fracx) >> 7;
+
+ commit_span(buf + 4, pack(WideRGBA8(abcdl)));
+ }
+}
diff --git a/third_party/webrender/swgl/src/vector_type.h b/third_party/webrender/swgl/src/vector_type.h
new file mode 100644
index 00000000000..8ec5876c340
--- /dev/null
+++ b/third_party/webrender/swgl/src/vector_type.h
@@ -0,0 +1,478 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifdef __clang__
+# ifdef __SSE2__
+# include <xmmintrin.h>
+# define USE_SSE2 1
+# endif
+# ifdef __ARM_NEON
+# include <arm_neon.h>
+# define USE_NEON 1
+# endif
+#endif
+
+namespace glsl {
+
+#ifdef __clang__
+template <typename T, int N>
+using VectorType = T __attribute__((ext_vector_type(N)));
+
+# define CONVERT(vector, type) __builtin_convertvector(vector, type)
+# define SHUFFLE(a, b, ...) __builtin_shufflevector(a, b, __VA_ARGS__)
+
+template <typename T>
+SI VectorType<T, 4> combine(VectorType<T, 2> a, VectorType<T, 2> b) {
+ return __builtin_shufflevector(a, b, 0, 1, 2, 3);
+}
+
+template <typename T>
+SI VectorType<T, 8> combine(VectorType<T, 4> a, VectorType<T, 4> b) {
+ return __builtin_shufflevector(a, b, 0, 1, 2, 3, 4, 5, 6, 7);
+}
+
+template <typename T>
+SI VectorType<T, 16> combine(VectorType<T, 8> a, VectorType<T, 8> b) {
+ return __builtin_shufflevector(a, b, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15);
+}
+
+template <typename T>
+SI VectorType<T, 4> lowHalf(VectorType<T, 8> a) {
+ return __builtin_shufflevector(a, a, 0, 1, 2, 3);
+}
+
+template <typename T>
+SI VectorType<T, 4> highHalf(VectorType<T, 8> a) {
+ return __builtin_shufflevector(a, a, 4, 5, 6, 7);
+}
+
+template <typename T>
+SI VectorType<T, 8> lowHalf(VectorType<T, 16> a) {
+ return __builtin_shufflevector(a, a, 0, 1, 2, 3, 4, 5, 6, 7);
+}
+
+template <typename T>
+SI VectorType<T, 8> highHalf(VectorType<T, 16> a) {
+ return __builtin_shufflevector(a, a, 8, 9, 10, 11, 12, 13, 14, 15);
+}
+
+template <typename T>
+SI VectorType<T, 8> expand(VectorType<T, 4> a) {
+ return __builtin_shufflevector(a, a, 0, 1, 2, 3, -1, -1, -1, -1);
+}
+#else
+template <typename T>
+struct VectorMask {
+ typedef T type;
+};
+template <>
+struct VectorMask<uint32_t> {
+ typedef int32_t type;
+};
+template <>
+struct VectorMask<uint16_t> {
+ typedef int16_t type;
+};
+template <>
+struct VectorMask<uint8_t> {
+ typedef int8_t type;
+};
+template <>
+struct VectorMask<float> {
+ typedef int type;
+};
+
+template <typename T, int N>
+struct VectorType {
+ enum { SIZE = N };
+
+ typedef T data_type __attribute__((vector_size(sizeof(T) * N)));
+ typedef typename VectorMask<T>::type mask_index;
+ typedef mask_index mask_type
+ __attribute__((vector_size(sizeof(mask_index) * N)));
+ typedef T half_type __attribute__((vector_size(sizeof(T) * (N / 2))));
+ union {
+ data_type data;
+ struct {
+ T x, y, z, w;
+ };
+ T elements[N];
+ struct {
+ half_type low_half, high_half;
+ };
+ };
+
+ VectorType() : data{0} { }
+
+ constexpr VectorType(const VectorType& rhs) : data(rhs.data) {}
+ // GCC vector extensions only support broadcasting scalars on arithmetic ops,
+ // but not on initializers, hence the following...
+ constexpr VectorType(T n) : data((data_type){0} + n) {}
+ constexpr VectorType(T a, T b, T c, T d) : data{a, b, c, d} {}
+ constexpr VectorType(T a, T b, T c, T d, T e, T f, T g, T h)
+ : data{a, b, c, d, e, f, g, h} {}
+ constexpr VectorType(T a, T b, T c, T d, T e, T f, T g, T h, T i, T j, T k,
+ T l, T m, T n, T o, T p)
+ : data{a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p} {}
+
+ SI VectorType wrap(const data_type& data) {
+ VectorType v;
+ v.data = data;
+ return v;
+ }
+
+ T& operator[](size_t i) { return elements[i]; }
+ T operator[](size_t i) const { return elements[i]; }
+
+ template <typename U>
+ operator VectorType<U, 2>() const {
+ return VectorType<U, 2>::wrap(
+ (typename VectorType<U, N>::data_type){U(x), U(y)});
+ }
+ template <typename U>
+ operator VectorType<U, 4>() const {
+ return VectorType<U, 4>::wrap(
+ (typename VectorType<U, N>::data_type){U(x), U(y), U(z), U(w)});
+ }
+ template <typename U>
+ operator VectorType<U, 8>() const {
+ return VectorType<U, 8>::wrap((typename VectorType<U, N>::data_type){
+ U(elements[0]), U(elements[1]), U(elements[2]), U(elements[3]),
+ U(elements[4]), U(elements[5]), U(elements[6]), U(elements[7])});
+ }
+ template <typename U>
+ operator VectorType<U, 16>() const {
+ return VectorType<U, 16>::wrap((typename VectorType<U, N>::data_type){
+ U(elements[0]),
+ U(elements[1]),
+ U(elements[2]),
+ U(elements[3]),
+ U(elements[4]),
+ U(elements[5]),
+ U(elements[6]),
+ U(elements[7]),
+ U(elements[8]),
+ U(elements[9]),
+ U(elements[10]),
+ U(elements[11]),
+ U(elements[12]),
+ U(elements[13]),
+ U(elements[14]),
+ U(elements[15]),
+ });
+ }
+
+ VectorType operator-() const { return wrap(-data); }
+ VectorType operator~() const { return wrap(~data); }
+
+ VectorType operator&(VectorType x) const { return wrap(data & x.data); }
+ VectorType operator&(T x) const { return wrap(data & x); }
+ VectorType operator|(VectorType x) const { return wrap(data | x.data); }
+ VectorType operator|(T x) const { return wrap(data | x); }
+ VectorType operator^(VectorType x) const { return wrap(data ^ x.data); }
+ VectorType operator^(T x) const { return wrap(data ^ x); }
+ VectorType operator<<(int x) const { return wrap(data << x); }
+ VectorType operator>>(int x) const { return wrap(data >> x); }
+ VectorType operator+(VectorType x) const { return wrap(data + x.data); }
+ VectorType operator+(T x) const { return wrap(data + x); }
+ friend VectorType operator+(T x, VectorType y) { return wrap(x + y.data); }
+ VectorType operator-(VectorType x) const { return wrap(data - x.data); }
+ VectorType operator-(T x) const { return wrap(data - x); }
+ friend VectorType operator-(T x, VectorType y) { return wrap(x - y.data); }
+ VectorType operator*(VectorType x) const { return wrap(data * x.data); }
+ VectorType operator*(T x) const { return wrap(data * x); }
+ friend VectorType operator*(T x, VectorType y) { return wrap(x * y.data); }
+ VectorType operator/(VectorType x) const { return wrap(data / x.data); }
+ VectorType operator/(T x) const { return wrap(data / x); }
+ friend VectorType operator/(T x, VectorType y) { return wrap(x / y.data); }
+ VectorType operator%(int x) const { return wrap(data % x); }
+
+ VectorType& operator&=(VectorType x) {
+ data &= x.data;
+ return *this;
+ }
+ VectorType& operator|=(VectorType x) {
+ data |= x.data;
+ return *this;
+ }
+ VectorType& operator^=(VectorType x) {
+ data ^= x.data;
+ return *this;
+ }
+ VectorType& operator<<=(int x) {
+ data <<= x;
+ return *this;
+ }
+ VectorType& operator>>=(int x) {
+ data >>= x;
+ return *this;
+ }
+ VectorType& operator+=(VectorType x) {
+ data += x.data;
+ return *this;
+ }
+ VectorType& operator-=(VectorType x) {
+ data -= x.data;
+ return *this;
+ }
+ VectorType& operator*=(VectorType x) {
+ data *= x.data;
+ return *this;
+ }
+ VectorType& operator/=(VectorType x) {
+ data /= x.data;
+ return *this;
+ }
+ VectorType& operator%=(int x) {
+ data %= x;
+ return *this;
+ }
+
+ VectorType<mask_type, N> operator==(VectorType x) const {
+ return VectorType<mask_type, N>::wrap(data == x.data);
+ }
+ VectorType<mask_type, N> operator!=(VectorType x) const {
+ return VectorType<mask_type, N>::wrap(data != x.data);
+ }
+ VectorType<mask_type, N> operator<(VectorType x) const {
+ return VectorType<mask_type, N>::wrap(data < x.data);
+ }
+ VectorType<mask_type, N> operator>(VectorType x) const {
+ return VectorType<mask_type, N>::wrap(data > x.data);
+ }
+ VectorType<mask_type, N> operator<=(VectorType x) const {
+ return VectorType<mask_type, N>::wrap(data <= x.data);
+ }
+ VectorType<mask_type, N> operator>=(VectorType x) const {
+ return VectorType<mask_type, N>::wrap(data >= x.data);
+ }
+
+ VectorType operator!() const { return wrap(!data); }
+ VectorType operator&&(VectorType x) const { return wrap(data & x.data); }
+ VectorType operator||(VectorType x) const { return wrap(data | x.data); }
+
+ VectorType& operator=(VectorType x) {
+ data = x.data;
+ return *this;
+ }
+
+ VectorType<T, 4> shuffle(VectorType b, mask_index x, mask_index y,
+ mask_index z, mask_index w) const {
+ return VectorType<T, 4>::wrap(__builtin_shuffle(
+ data, b.data, (typename VectorType<T, 4>::mask_type){x, y, z, w}));
+ }
+ VectorType<T, 8> shuffle(VectorType b, mask_index x, mask_index y,
+ mask_index z, mask_index w, mask_index s,
+ mask_index t, mask_index u, mask_index v) const {
+ return VectorType<T, 8>::wrap(__builtin_shuffle(
+ data, b.data,
+ (typename VectorType<T, 8>::mask_type){x, y, z, w, s, t, u, v}));
+ }
+ VectorType<T, 16> shuffle(VectorType b, mask_index x, mask_index y,
+ mask_index z, mask_index w, mask_index s,
+ mask_index t, mask_index u, mask_index v,
+ mask_index i, mask_index j, mask_index k,
+ mask_index l, mask_index m, mask_index n,
+ mask_index o, mask_index p) const {
+ return VectorType<T, 16>::wrap(
+ __builtin_shuffle(data, b.data,
+ (typename VectorType<T, 16>::mask_type){
+ x, y, z, w, s, t, u, v, i, j, k, l, m, n, o, p}));
+ }
+
+ VectorType<T, 4> swizzle(mask_index x, mask_index y, mask_index z,
+ mask_index w) const {
+ return VectorType<T, 4>::wrap(__builtin_shuffle(
+ data, (typename VectorType<T, 4>::mask_type){x, y, z, w}));
+ }
+ VectorType<T, 8> swizzle(mask_index x, mask_index y, mask_index z,
+ mask_index w, mask_index s, mask_index t,
+ mask_index u, mask_index v) const {
+ return VectorType<T, 8>::wrap(__builtin_shuffle(
+ data, (typename VectorType<T, 8>::mask_type){x, y, z, w, s, t, u, v}));
+ }
+
+ SI VectorType wrap(half_type low, half_type high) {
+ VectorType v;
+ v.low_half = low;
+ v.high_half = high;
+ return v;
+ }
+
+ VectorType<T, N * 2> combine(VectorType high) const {
+ return VectorType<T, N * 2>::wrap(data, high.data);
+ }
+
+# define xyxy swizzle(0, 1, 0, 1)
+# define zwzw swizzle(2, 3, 2, 3)
+# define zyxw swizzle(2, 1, 0, 3)
+# define xyzz swizzle(0, 1, 2, 2)
+# define xxxxyyyy XXXXYYYY()
+ VectorType<T, 8> XXXXYYYY() const {
+ return swizzle(0, 0, 0, 0).combine(swizzle(1, 1, 1, 1));
+ }
+# define zzzzwwww ZZZZWWWW()
+ VectorType<T, 8> ZZZZWWWW() const {
+ return swizzle(2, 2, 2, 2).combine(swizzle(3, 3, 3, 3));
+ }
+# define xyzwxyzw XYZWXYZW()
+ VectorType<T, 8> XYZWXYZW() const { return combine(*this); }
+# define xyxyxyxy XYXYXYXY()
+ VectorType<T, 8> XYXYXYXY() const {
+ return swizzle(0, 1, 0, 1).combine(swizzle(0, 1, 0, 1));
+ }
+# define zwzwzwzw ZWZWZWZW()
+ VectorType<T, 8> ZWZWZWZW() const {
+ return swizzle(2, 3, 2, 3).combine(swizzle(2, 3, 2, 3));
+ }
+# define xxyyzzww XXYYZZWW()
+ VectorType<T, 8> XXYYZZWW() const {
+ return swizzle(0, 0, 1, 1).combine(swizzle(2, 2, 3, 3));
+ }
+};
+
+template <typename T>
+struct VectorType<T, 2> {
+ typedef T data_type __attribute__((vector_size(sizeof(T) * 2)));
+ union {
+ data_type data;
+ struct {
+ T x, y;
+ };
+ T elements[2];
+ };
+};
+
+# define CONVERT(vector, type) ((type)(vector))
+# define SHUFFLE(a, b, ...) a.shuffle(b, __VA_ARGS__)
+
+template <typename T, int N>
+SI VectorType<T, N * 2> combine(VectorType<T, N> a, VectorType<T, N> b) {
+ return VectorType<T, N * 2>::wrap(a.data, b.data);
+}
+
+template <typename T, int N>
+SI VectorType<T, N / 2> lowHalf(VectorType<T, N> a) {
+ return VectorType<T, N / 2>::wrap(a.low_half);
+}
+
+template <typename T, int N>
+SI VectorType<T, N / 2> highHalf(VectorType<T, N> a) {
+ return VectorType<T, N / 2>::wrap(a.high_half);
+}
+
+template <typename T, int N>
+SI VectorType<T, N * 2> expand(VectorType<T, N> a) {
+ return combine(a, a);
+}
+#endif
+
+template <typename T>
+SI VectorType<T, 4> zipLow(VectorType<T, 4> a, VectorType<T, 4> b) {
+ return SHUFFLE(a, b, 0, 4, 1, 5);
+}
+
+template <typename T>
+SI VectorType<T, 4> zipHigh(VectorType<T, 4> a, VectorType<T, 4> b) {
+ return SHUFFLE(a, b, 2, 6, 3, 7);
+}
+
+template <typename T>
+SI VectorType<T, 8> zipLow(VectorType<T, 8> a, VectorType<T, 8> b) {
+ return SHUFFLE(a, b, 0, 8, 1, 9, 2, 10, 3, 11);
+}
+
+template <typename T>
+SI VectorType<T, 8> zipHigh(VectorType<T, 8> a, VectorType<T, 8> b) {
+ return SHUFFLE(a, b, 4, 12, 5, 13, 6, 14, 7, 15);
+}
+
+template <typename T>
+SI VectorType<T, 16> zipLow(VectorType<T, 16> a, VectorType<T, 16> b) {
+ return SHUFFLE(a, b, 0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23);
+}
+
+template <typename T>
+SI VectorType<T, 16> zipHigh(VectorType<T, 16> a, VectorType<T, 16> b) {
+ return SHUFFLE(a, b, 8, 9, 10, 11, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30,
+ 31);
+}
+
+template <typename T>
+SI VectorType<T, 8> zip2Low(VectorType<T, 8> a, VectorType<T, 8> b) {
+ return SHUFFLE(a, b, 0, 1, 8, 9, 2, 3, 10, 11);
+}
+
+template <typename T>
+SI VectorType<T, 8> zip2High(VectorType<T, 8> a, VectorType<T, 8> b) {
+ return SHUFFLE(a, b, 4, 5, 12, 13, 6, 7, 14, 15);
+}
+
+template <typename T>
+struct Unaligned {
+ template <typename P>
+ SI T load(const P* p) {
+ T v;
+ memcpy(&v, p, sizeof(v));
+ return v;
+ }
+
+ template <typename P>
+ SI void store(P* p, T v) {
+ memcpy(p, &v, sizeof(v));
+ }
+};
+
+#ifndef __clang__
+template <typename T, int N>
+struct Unaligned<VectorType<T, N>> {
+ template <typename P>
+ SI VectorType<T, N> load(const P* p) {
+ VectorType<T, N> v;
+ memcpy(v.elements, p, sizeof(v));
+ return v;
+ }
+
+ template <typename P>
+ SI void store(P* p, VectorType<T, N> v) {
+ memcpy(p, v.elements, sizeof(v));
+ }
+};
+#endif
+
+template <typename T, typename P>
+SI T unaligned_load(const P* p) {
+ return Unaligned<T>::load(p);
+}
+
+template <typename T, typename P>
+SI void unaligned_store(P* p, T v) {
+ Unaligned<T>::store(p, v);
+}
+
+template <typename D, typename S>
+SI D bit_cast(const S& src) {
+ static_assert(sizeof(D) == sizeof(S), "");
+ return unaligned_load<D>(&src);
+}
+
+template <typename T>
+using V2 = VectorType<T, 2>;
+template <typename T>
+using V4 = VectorType<T, 4>;
+using Float = V4<float>;
+using I32 = V4<int32_t>;
+using I16 = V4<int16_t>;
+using U64 = V4<uint64_t>;
+using U32 = V4<uint32_t>;
+using U16 = V4<uint16_t>;
+using U8 = V4<uint8_t>;
+using Bool = V4<int>;
+template <typename T>
+using V8 = VectorType<T, 8>;
+template <typename T>
+using V16 = VectorType<T, 16>;
+
+} // namespace glsl
diff --git a/third_party/webrender/tileview/Cargo.toml b/third_party/webrender/tileview/Cargo.toml
new file mode 100644
index 00000000000..66e955d5a34
--- /dev/null
+++ b/third_party/webrender/tileview/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "tileview"
+version = "0.1.0"
+authors = ["Bert Peers <bpeers@mozilla.com>"]
+license = "MPL-2.0"
+edition = "2018"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+ron = "0.5"
+serde = {version = "1.0.88", features = ["derive"] }
+webrender = {path = "../webrender", features=["capture","replay","debugger","png","profiler","no_static_freetype", "leak_checks"]}
+webrender_api = {path = "../webrender_api", features=["serialize","deserialize"]}
+euclid = { version = "0.22.0", features = ["serde"] }
diff --git a/third_party/webrender/tileview/src/main.rs b/third_party/webrender/tileview/src/main.rs
new file mode 100644
index 00000000000..0e33d15e426
--- /dev/null
+++ b/third_party/webrender/tileview/src/main.rs
@@ -0,0 +1,721 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/// Command line tool to convert logged tile cache files into a visualization.
+///
+/// Steps to use this:
+/// 1. enable webrender; enable gfx.webrender.debug.tile-cache-logging
+/// 2. take a capture using ctrl-shift-3
+/// if all is well, there will be a .../wr-capture/tilecache folder with *.ron files
+/// 3. run tileview with that folder as the first parameter and some empty output folder as the
+/// 2nd:
+/// cargo run --release -- /foo/bar/wr-capture/tilecache /tmp/tilecache
+/// 4. open /tmp/tilecache/index.html
+///
+/// Note: accurate interning info requires that the circular buffer doesn't wrap around.
+/// So for best results, use this workflow:
+/// a. start up blank browser; in about:config enable logging; close browser
+/// b. start new browser, quickly load the repro
+/// c. capture.
+///
+/// If that's tricky, you can also just throw more memory at it: in render_backend.rs,
+/// increase the buffer size here: 'TileCacheLogger::new(500usize)'
+///
+/// Note: some features don't work when opening index.html directly due to cross-scripting
+/// protections. Instead use a HTTP server:
+/// python -m SimpleHTTPServer 8000
+
+
+use webrender::{TileNode, TileNodeKind, InvalidationReason, TileOffset};
+use webrender::{TileSerializer, TileCacheInstanceSerializer, TileCacheLoggerUpdateLists};
+use webrender::{PrimitiveCompareResultDetail, CompareHelperResult, ItemUid};
+use serde::Deserialize;
+use std::fs::File;
+use std::io::prelude::*;
+use std::path::Path;
+use std::ffi::OsString;
+use std::collections::HashMap;
+use webrender::api::{enumerate_interners, ColorF};
+use euclid::{Rect, Transform3D};
+use webrender_api::units::{PicturePoint, PictureSize, PicturePixel, WorldPixel};
+
+static RES_JAVASCRIPT: &'static str = include_str!("tilecache.js");
+static RES_BASE_CSS: &'static str = include_str!("tilecache_base.css");
+
+#[derive(Deserialize)]
+pub struct Slice {
+ pub transform: Transform3D<f32, PicturePixel, WorldPixel>,
+ pub tile_cache: TileCacheInstanceSerializer
+}
+
+// invalidation reason CSS colors
+static CSS_FRACTIONAL_OFFSET: &str = "fill:#4040c0;fill-opacity:0.1;";
+static CSS_BACKGROUND_COLOR: &str = "fill:#10c070;fill-opacity:0.1;";
+static CSS_SURFACE_OPACITY_CHANNEL: &str = "fill:#c040c0;fill-opacity:0.1;";
+static CSS_NO_TEXTURE: &str = "fill:#c04040;fill-opacity:0.1;";
+static CSS_NO_SURFACE: &str = "fill:#40c040;fill-opacity:0.1;";
+static CSS_PRIM_COUNT: &str = "fill:#40f0f0;fill-opacity:0.1;";
+static CSS_CONTENT: &str = "fill:#f04040;fill-opacity:0.1;";
+static CSS_COMPOSITOR_KIND_CHANGED: &str = "fill:#f0c070;fill-opacity:0.1;";
+static CSS_VALID_RECT_CHANGED: &str = "fill:#ff00ff;fill-opacity:0.1;";
+
+// parameters to tweak the SVG generation
+struct SvgSettings {
+ pub scale: f32,
+ pub x: f32,
+ pub y: f32,
+}
+
+fn tile_node_to_svg(node: &TileNode,
+ transform: &Transform3D<f32, PicturePixel, WorldPixel>,
+ svg_settings: &SvgSettings) -> String
+{
+ match &node.kind {
+ TileNodeKind::Leaf { .. } => {
+ let rect_world = transform.outer_transformed_rect(&node.rect.to_rect()).unwrap();
+ format!("<rect x=\"{:.2}\" y=\"{:.2}\" width=\"{:.2}\" height=\"{:.2}\" />\n",
+ rect_world.origin.x * svg_settings.scale + svg_settings.x,
+ rect_world.origin.y * svg_settings.scale + svg_settings.y,
+ rect_world.size.width * svg_settings.scale,
+ rect_world.size.height * svg_settings.scale)
+ },
+ TileNodeKind::Node { children } => {
+ children.iter().fold(String::new(), |acc, child| acc + &tile_node_to_svg(child, transform, svg_settings) )
+ }
+ }
+}
+
+fn tile_to_svg(key: TileOffset,
+ tile: &TileSerializer,
+ slice: &Slice,
+ prev_tile: Option<&TileSerializer>,
+ itemuid_to_string: &HashMap<ItemUid, String>,
+ tile_stroke: &str,
+ prim_class: &str,
+ invalidation_report: &mut String,
+ svg_width: &mut i32, svg_height: &mut i32,
+ svg_settings: &SvgSettings) -> String
+{
+ let mut svg = format!("\n<!-- tile key {},{} ; -->\n", key.x, key.y);
+
+
+ let tile_fill =
+ match tile.invalidation_reason {
+ Some(InvalidationReason::FractionalOffset { .. }) => CSS_FRACTIONAL_OFFSET.to_string(),
+ Some(InvalidationReason::BackgroundColor { .. }) => CSS_BACKGROUND_COLOR.to_string(),
+ Some(InvalidationReason::SurfaceOpacityChanged { .. }) => CSS_SURFACE_OPACITY_CHANNEL.to_string(),
+ Some(InvalidationReason::NoTexture) => CSS_NO_TEXTURE.to_string(),
+ Some(InvalidationReason::NoSurface) => CSS_NO_SURFACE.to_string(),
+ Some(InvalidationReason::PrimCount { .. }) => CSS_PRIM_COUNT.to_string(),
+ Some(InvalidationReason::CompositorKindChanged) => CSS_COMPOSITOR_KIND_CHANGED.to_string(),
+ Some(InvalidationReason::Content { .. } ) => CSS_CONTENT.to_string(),
+ Some(InvalidationReason::ValidRectChanged) => CSS_VALID_RECT_CHANGED.to_string(),
+ None => {
+ let mut background = tile.background_color;
+ if background.is_none() {
+ background = slice.tile_cache.background_color
+ }
+ match background {
+ Some(color) => {
+ let rgb = ( (color.r * 255.0) as u8,
+ (color.g * 255.0) as u8,
+ (color.b * 255.0) as u8 );
+ format!("fill:rgb({},{},{});fill-opacity:0.3;", rgb.0, rgb.1, rgb.2)
+ }
+ None => "fill:none;".to_string()
+ }
+ }
+ };
+
+ //let tile_style = format!("{}{}", tile_fill, tile_stroke);
+ let tile_style = format!("{}stroke:none;", tile_fill);
+
+ let title = match tile.invalidation_reason {
+ Some(_) => format!("<title>slice {} tile ({},{}) - {:?}</title>",
+ slice.tile_cache.slice, key.x, key.y,
+ tile.invalidation_reason),
+ None => String::new()
+ };
+
+ if let Some(reason) = &tile.invalidation_reason {
+ invalidation_report.push_str(
+ &format!("<div class=\"subheader\">slice {} key ({},{})</div><div class=\"data\">",
+ slice.tile_cache.slice,
+ key.x, key.y));
+
+ // go through most reasons individually so we can print something nicer than
+ // the default debug formatting of old and new:
+ match reason {
+ InvalidationReason::FractionalOffset { old, new } => {
+ invalidation_report.push_str(
+ &format!("<b>FractionalOffset</b> changed from ({},{}) to ({},{})",
+ old.x, old.y, new.x, new.y));
+ },
+ InvalidationReason::BackgroundColor { old, new } => {
+ fn to_str(c: &Option<ColorF>) -> String {
+ if let Some(c) = c {
+ format!("({},{},{},{})", c.r, c.g, c.b, c.a)
+ } else {
+ "none".to_string()
+ }
+ }
+
+ invalidation_report.push_str(
+ &format!("<b>BackGroundColor</b> changed from {} to {}",
+ to_str(old), to_str(new)));
+ },
+ InvalidationReason::SurfaceOpacityChanged { became_opaque } => {
+ invalidation_report.push_str(
+ &format!("<b>SurfaceOpacityChanged</b> changed from {} to {}",
+ !became_opaque, became_opaque));
+ },
+ InvalidationReason::PrimCount { old, new } => {
+ // diff the lists to find removed and added ItemUids,
+ // and convert them to strings to pretty-print what changed:
+ let old = old.as_ref().unwrap();
+ let new = new.as_ref().unwrap();
+ let removed = old.iter()
+ .filter(|i| !new.contains(i))
+ .fold(String::new(),
+ |acc, i| acc + "<li>" + &(i.get_uid()).to_string() + "..."
+ + &itemuid_to_string.get(i).unwrap_or(&String::new())
+ + "</li>\n");
+ let added = new.iter()
+ .filter(|i| !old.contains(i))
+ .fold(String::new(),
+ |acc, i| acc + "<li>" + &(i.get_uid()).to_string() + "..."
+ + &itemuid_to_string.get(i).unwrap_or(&String::new())
+ + "</li>\n");
+ invalidation_report.push_str(
+ &format!("<b>PrimCount</b> changed from {} to {}:<br/>\
+ removed:<ul>{}</ul>
+ added:<ul>{}</ul>",
+ old.len(), new.len(),
+ removed, added));
+ },
+ InvalidationReason::Content { prim_compare_result, prim_compare_result_detail } => {
+ let _ = prim_compare_result;
+ match prim_compare_result_detail {
+ Some(PrimitiveCompareResultDetail::Descriptor { old, new }) => {
+ if old.prim_uid == new.prim_uid {
+ // if the prim uid hasn't changed then try to print something useful
+ invalidation_report.push_str(
+ &format!("<b>Content: Descriptor</b> changed for uid {}<br/>",
+ old.prim_uid.get_uid()));
+ let mut changes = String::new();
+ if old.prim_clip_box != new.prim_clip_box {
+ changes += &format!("<li><b>prim_clip_rect</b> changed from {},{} -> {},{}",
+ old.prim_clip_box.min.x,
+ old.prim_clip_box.min.y,
+ old.prim_clip_box.max.x,
+ old.prim_clip_box.max.y);
+ changes += &format!(" to {},{} -> {},{}</li>",
+ new.prim_clip_box.min.x,
+ new.prim_clip_box.min.y,
+ new.prim_clip_box.max.x,
+ new.prim_clip_box.max.y);
+ }
+ invalidation_report.push_str(
+ &format!("<ul>{}<li>Item: {}</li></ul>",
+ changes,
+ &itemuid_to_string.get(&old.prim_uid).unwrap_or(&String::new())));
+ } else {
+ // .. if prim UIDs have changed, just dump both items and descriptors.
+ invalidation_report.push_str(
+ &format!("<b>Content: Descriptor</b> changed; old uid {}, new uid {}:<br/>",
+ old.prim_uid.get_uid(),
+ new.prim_uid.get_uid()));
+ invalidation_report.push_str(
+ &format!("old:<ul><li>Desc: {:?}</li><li>Item: {}</li></ul>",
+ old,
+ &itemuid_to_string.get(&old.prim_uid).unwrap_or(&String::new())));
+ invalidation_report.push_str(
+ &format!("new:<ul><li>Desc: {:?}</li><li>Item: {}</li></ul>",
+ new,
+ &itemuid_to_string.get(&new.prim_uid).unwrap_or(&String::new())));
+ }
+ },
+ Some(PrimitiveCompareResultDetail::Clip { detail }) => {
+ match detail {
+ CompareHelperResult::Count { prev_count, curr_count } => {
+ invalidation_report.push_str(
+ &format!("<b>Content: Clip</b> count changed from {} to {}<br/>",
+ prev_count, curr_count ));
+ },
+ CompareHelperResult::NotEqual { prev, curr } => {
+ invalidation_report.push_str(
+ &format!("<b>Content: Clip</b> ItemUids changed from {} to {}:<br/>",
+ prev.get_uid(), curr.get_uid() ));
+ invalidation_report.push_str(
+ &format!("old:<ul><li>{}</li></ul>",
+ &itemuid_to_string.get(&prev).unwrap_or(&String::new())));
+ invalidation_report.push_str(
+ &format!("new:<ul><li>{}</li></ul>",
+ &itemuid_to_string.get(&curr).unwrap_or(&String::new())));
+ },
+ reason => {
+ invalidation_report.push_str(&format!("{:?}", reason));
+ },
+ }
+ },
+ reason => {
+ invalidation_report.push_str(&format!("{:?}", reason));
+ },
+ }
+ },
+ reason => {
+ invalidation_report.push_str(&format!("{:?}", reason));
+ },
+ }
+ invalidation_report.push_str("</div>\n");
+ }
+
+ svg += &format!(r#"<rect x="{}" y="{}" width="{}" height="{}" style="{}" ></rect>"#,
+ tile.rect.origin.x * svg_settings.scale + svg_settings.x,
+ tile.rect.origin.y * svg_settings.scale + svg_settings.y,
+ tile.rect.size.width * svg_settings.scale,
+ tile.rect.size.height * svg_settings.scale,
+ tile_style);
+
+ svg += &format!("\n\n<g class=\"svg_quadtree\">\n{}</g>\n",
+ tile_node_to_svg(&tile.root, &slice.transform, svg_settings));
+
+ let right = (tile.rect.origin.x + tile.rect.size.width) as i32;
+ let bottom = (tile.rect.origin.y + tile.rect.size.height) as i32;
+
+ *svg_width = if right > *svg_width { right } else { *svg_width };
+ *svg_height = if bottom > *svg_height { bottom } else { *svg_height };
+
+ svg += "\n<!-- primitives -->\n";
+
+ svg += &format!("<g id=\"{}\">\n\t", prim_class);
+
+
+ let rect_visual_id = Rect {
+ origin: tile.rect.origin,
+ size: PictureSize::new(1.0, 1.0)
+ };
+ let rect_visual_id_world = slice.transform.outer_transformed_rect(&rect_visual_id).unwrap();
+ svg += &format!("\n<text class=\"svg_tile_visual_id\" x=\"{}\" y=\"{}\">{},{} ({})</text>",
+ rect_visual_id_world.origin.x * svg_settings.scale + svg_settings.x,
+ (rect_visual_id_world.origin.y + 110.0) * svg_settings.scale + svg_settings.y,
+ key.x, key.y, slice.tile_cache.slice);
+
+
+ for prim in &tile.current_descriptor.prims {
+ let rect = prim.prim_clip_box;
+
+ // the transform could also be part of the CSS, let the browser do it;
+ // might be a bit faster and also enable actual 3D transforms.
+ let rect_pixel = Rect {
+ origin: PicturePoint::new(rect.min.x, rect.min.y),
+ size: PictureSize::new(rect.max.x - rect.min.x, rect.max.y - rect.min.y),
+ };
+ let rect_world = slice.transform.outer_transformed_rect(&rect_pixel).unwrap();
+
+ let style =
+ if let Some(prev_tile) = prev_tile {
+ // when this O(n^2) gets too slow, stop brute-forcing and use a set or something
+ if prev_tile.current_descriptor.prims.iter().find(|&prim| prim.prim_clip_box == rect).is_some() {
+ ""
+ } else {
+ "class=\"svg_changed_prim\" "
+ }
+ } else {
+ "class=\"svg_changed_prim\" "
+ };
+
+ svg += &format!("<rect x=\"{:.2}\" y=\"{:.2}\" width=\"{:.2}\" height=\"{:.2}\" {}/>",
+ rect_world.origin.x * svg_settings.scale + svg_settings.x,
+ rect_world.origin.y * svg_settings.scale + svg_settings.y,
+ rect_world.size.width * svg_settings.scale,
+ rect_world.size.height * svg_settings.scale,
+ style);
+
+ svg += "\n\t";
+ }
+
+ svg += "\n</g>\n";
+
+ // nearly invisible, all we want is the toolip really
+ let style = "style=\"fill-opacity:0.001;";
+ svg += &format!("<rect x=\"{}\" y=\"{}\" width=\"{}\" height=\"{}\" {}{}\" >{}<\u{2f}rect>",
+ tile.rect.origin.x * svg_settings.scale + svg_settings.x,
+ tile.rect.origin.y * svg_settings.scale + svg_settings.y,
+ tile.rect.size.width * svg_settings.scale,
+ tile.rect.size.height * svg_settings.scale,
+ style,
+ tile_stroke,
+ title);
+
+ svg
+}
+
+fn slices_to_svg(slices: &[Slice], prev_slices: Option<Vec<Slice>>,
+ itemuid_to_string: &HashMap<ItemUid, String>,
+ svg_width: &mut i32, svg_height: &mut i32,
+ max_slice_index: &mut usize,
+ svg_settings: &SvgSettings) -> (String, String)
+{
+ let svg_begin = "<?xml\u{2d}stylesheet type\u{3d}\"text/css\" href\u{3d}\"tilecache_base.css\" ?>\n\
+ <?xml\u{2d}stylesheet type\u{3d}\"text/css\" href\u{3d}\"tilecache.css\" ?>\n";
+
+ let mut svg = String::new();
+ let mut invalidation_report = "<div class=\"header\">Invalidation</div>\n".to_string();
+
+ for slice in slices {
+ let tile_cache = &slice.tile_cache;
+ *max_slice_index = if tile_cache.slice > *max_slice_index { tile_cache.slice } else { *max_slice_index };
+
+ invalidation_report.push_str(&format!("<div id=\"invalidation_slice{}\">\n", tile_cache.slice));
+
+ let prim_class = format!("tile_slice{}", tile_cache.slice);
+
+ svg += &format!("\n<g id=\"tile_slice{}_everything\">", tile_cache.slice);
+
+ //println!("slice {}", tile_cache.slice);
+ svg += &format!("\n<!-- tile_cache slice {} -->\n",
+ tile_cache.slice);
+
+ //let tile_stroke = "stroke:grey;stroke-width:1;".to_string();
+ let tile_stroke = "stroke:none;".to_string();
+
+ let mut prev_slice = None;
+ if let Some(prev) = &prev_slices {
+ for prev_search in prev {
+ if prev_search.tile_cache.slice == tile_cache.slice {
+ prev_slice = Some(prev_search);
+ break;
+ }
+ }
+ }
+
+ for (key, tile) in &tile_cache.tiles {
+ let mut prev_tile = None;
+ if let Some(prev) = prev_slice {
+ prev_tile = prev.tile_cache.tiles.get(key);
+ }
+
+ svg += &tile_to_svg(*key, &tile, &slice, prev_tile,
+ itemuid_to_string,
+ &tile_stroke, &prim_class,
+ &mut invalidation_report,
+ svg_width, svg_height, svg_settings);
+ }
+
+ svg += "\n</g>";
+
+ invalidation_report.push_str("</div>\n");
+ }
+
+ (
+ format!("{}<svg version=\"1.1\" baseProfile=\"full\" xmlns=\"http://www.w3.org/2000/svg\" \
+ width=\"{}\" height=\"{}\" >",
+ svg_begin,
+ svg_width,
+ svg_height)
+ + "\n"
+ + "<rect fill=\"black\" width=\"100%\" height=\"100%\"/>\n"
+ + &svg
+ + "\n</svg>\n",
+ invalidation_report
+ )
+}
+
+fn write_html(output_dir: &Path, max_slice_index: usize, svg_files: &[String], intern_files: &[String]) {
+ let html_head = "<!DOCTYPE html>\n\
+ <html>\n\
+ <head>\n\
+ <meta charset=\"UTF-8\">\n\
+ <link rel=\"stylesheet\" type=\"text/css\" href=\"tilecache_base.css\"></link>\n\
+ <link rel=\"stylesheet\" type=\"text/css\" href=\"tilecache.css\"></link>\n\
+ </head>\n"
+ .to_string();
+
+ let html_body = "<body bgcolor=\"#000000\" onload=\"load()\">\n"
+ .to_string();
+
+
+ let mut script = "\n<script>\n".to_string();
+
+ script = format!("{}var svg_files = [\n", script);
+ for svg_file in svg_files {
+ script = format!("{} \"{}\",\n", script, svg_file);
+ }
+ script = format!("{}];\n\n", script);
+
+ script = format!("{}var intern_files = [\n", script);
+ for intern_file in intern_files {
+ script = format!("{} \"{}\",\n", script, intern_file);
+ }
+ script = format!("{}];\n</script>\n\n", script);
+
+ script = format!("{}<script src=\"tilecache.js\" type=\"text/javascript\"></script>\n\n", script);
+
+
+ let html_end = "</body>\n\
+ </html>\n"
+ .to_string();
+
+ let mut html_slices_form =
+ "\n<form id=\"slicecontrols\">\n\
+ Slice\n".to_string();
+
+ for ix in 0..max_slice_index + 1 {
+ html_slices_form +=
+ &format!(
+ "<input id=\"slice_toggle{}\" \
+ type=\"checkbox\" \
+ onchange=\"update_slice_visibility({})\" \
+ checked=\"checked\" />\n\
+ <label for=\"slice_toggle{}\">{}</label>\n",
+ ix,
+ max_slice_index + 1,
+ ix,
+ ix );
+ }
+
+ html_slices_form += "<form>\n";
+
+ let html_body = format!(
+ "{}\n\
+ <div class=\"split left\">\n\
+ <div>\n\
+ <object id=\"svg_container0\" type=\"image/svg+xml\" data=\"{}\" class=\"tile_svg\" ></object>\n\
+ <object id=\"svg_container1\" type=\"image/svg+xml\" data=\"{}\" class=\"tile_svg\" ></object>\n\
+ </div>\n\
+ </div>\n\
+ \n\
+ <div class=\"split right\">\n\
+ <iframe width=\"100%\" id=\"intern\" src=\"{}\"></iframe>\n\
+ </div>\n\
+ \n\
+ <div id=\"svg_ui_overlay\">\n\
+ <div id=\"text_frame_counter\">{}</div>\n\
+ <div id=\"text_spacebar\">Spacebar to Play</div>\n\
+ <div>Use Left/Right to Step</div>\n\
+ <input id=\"frame_slider\" type=\"range\" min=\"0\" max=\"{}\" value=\"0\" class=\"svg_ui_slider\" />
+ {}
+ </div>",
+ html_body,
+ svg_files[0],
+ svg_files[0],
+ intern_files[0],
+ svg_files[0],
+ svg_files.len(),
+ html_slices_form );
+
+ let html = format!("{}{}{}{}", html_head, html_body, script, html_end);
+
+ let output_file = output_dir.join("index.html");
+ let mut html_output = File::create(output_file).unwrap();
+ html_output.write_all(html.as_bytes()).unwrap();
+}
+
+fn write_css(output_dir: &Path, max_slice_index: usize, svg_settings: &SvgSettings) {
+ let mut css = String::new();
+
+ for ix in 0..max_slice_index + 1 {
+ let color = ( ix % 7 ) + 1;
+ let rgb = format!("rgb({},{},{})",
+ if color & 2 != 0 { 205 } else { 90 },
+ if color & 4 != 0 { 205 } else { 90 },
+ if color & 1 != 0 { 225 } else { 90 });
+
+ let prim_class = format!("tile_slice{}", ix);
+
+ css += &format!("#{} {{\n\
+ fill: {};\n\
+ fill-opacity: 0.03;\n\
+ stroke-width: {};\n\
+ stroke: {};\n\
+ }}\n\n",
+ prim_class,
+ //rgb,
+ "none",
+ 0.8 * svg_settings.scale,
+ rgb);
+ }
+
+ css += &format!(".svg_tile_visual_id {{\n\
+ font: {}px sans-serif;\n\
+ fill: rgb(50,50,50);\n\
+ }}\n\n",
+ 150.0 * svg_settings.scale);
+
+ let output_file = output_dir.join("tilecache.css");
+ let mut css_output = File::create(output_file).unwrap();
+ css_output.write_all(css.as_bytes()).unwrap();
+}
+
+macro_rules! updatelist_to_html_macro {
+ ( $( $name:ident: $ty:ty, )+ ) => {
+ fn updatelist_to_html(update_lists: &TileCacheLoggerUpdateLists,
+ invalidation_report: String) -> String
+ {
+ let mut html = "\
+ <!DOCTYPE html>\n\
+ <html> <head> <meta charset=\"UTF-8\">\n\
+ <link rel=\"stylesheet\" type=\"text/css\" href=\"tilecache_base.css\"></link>\n\
+ <link rel=\"stylesheet\" type=\"text/css\" href=\"tilecache.css\"></link>\n\
+ </head> <body>\n\
+ <div class=\"datasheet\">\n".to_string();
+
+ html += &invalidation_report;
+
+ html += "<div class=\"header\">Interning</div>\n";
+ $(
+ html += &format!("<div class=\"subheader\">{}</div>\n<div class=\"intern data\">\n",
+ stringify!($name));
+ for list in &update_lists.$name.1 {
+ for insertion in &list.insertions {
+ html += &format!("<div class=\"insert\"><b>{}</b> {}</div>\n",
+ insertion.uid.get_uid(),
+ format!("({:?})", insertion.value));
+ }
+
+ for removal in &list.removals {
+ html += &format!("<div class=\"remove\"><b>{}</b></div>\n",
+ removal.uid.get_uid());
+ }
+ }
+ html += "</div><br/>\n";
+ )+
+ html += "</div> </body> </html>\n";
+ html
+ }
+ }
+}
+enumerate_interners!(updatelist_to_html_macro);
+
+fn write_tile_cache_visualizer_svg(entry: &std::fs::DirEntry, output_dir: &Path,
+ slices: &[Slice], prev_slices: Option<Vec<Slice>>,
+ itemuid_to_string: &HashMap<ItemUid, String>,
+ svg_width: &mut i32, svg_height: &mut i32,
+ max_slice_index: &mut usize,
+ svg_files: &mut Vec::<String>,
+ svg_settings: &SvgSettings) -> String
+{
+ let (svg, invalidation_report) = slices_to_svg(&slices, prev_slices,
+ itemuid_to_string,
+ svg_width, svg_height,
+ max_slice_index,
+ svg_settings);
+
+ let mut output_filename = OsString::from(entry.path().file_name().unwrap());
+ output_filename.push(".svg");
+ svg_files.push(output_filename.to_string_lossy().to_string());
+
+ output_filename = output_dir.join(output_filename).into_os_string();
+ let mut svg_output = File::create(output_filename).unwrap();
+ svg_output.write_all(svg.as_bytes()).unwrap();
+
+ invalidation_report
+}
+
+fn write_update_list_html(entry: &std::fs::DirEntry, output_dir: &Path,
+ update_lists: &TileCacheLoggerUpdateLists,
+ html_files: &mut Vec::<String>,
+ invalidation_report: String)
+{
+ let html = updatelist_to_html(update_lists, invalidation_report);
+
+ let mut output_filename = OsString::from(entry.path().file_name().unwrap());
+ output_filename.push(".html");
+ html_files.push(output_filename.to_string_lossy().to_string());
+
+ output_filename = output_dir.join(output_filename).into_os_string();
+ let mut html_output = File::create(output_filename).unwrap();
+ html_output.write_all(html.as_bytes()).unwrap();
+}
+
+fn main() {
+ let args: Vec<String> = std::env::args().collect();
+
+ if args.len() < 3 {
+ println!("Usage: tileview input_dir output_dir [scale [x y]]");
+ println!(" where input_dir is a tile_cache folder inside a wr-capture.");
+ println!(" Scale is an optional scaling factor to compensate for high-DPI.");
+ println!(" X, Y is an optional offset to shift the entire SVG by.");
+ println!("\nexample: cargo run c:/Users/me/AppData/Local/wr-capture.6/tile_cache/ c:/temp/tilecache/");
+ std::process::exit(1);
+ }
+
+ let input_dir = Path::new(&args[1]);
+ let output_dir = Path::new(&args[2]);
+ std::fs::create_dir_all(output_dir).unwrap();
+
+ let scale = if args.len() >= 4 { args[3].parse::<f32>().unwrap() } else { 1.0 };
+ let x = if args.len() >= 6 { args[4].parse::<f32>().unwrap() } else { 0.0 }; // >= 6, requires X and Y
+ let y = if args.len() >= 6 { args[5].parse::<f32>().unwrap() } else { 0.0 };
+ let svg_settings = SvgSettings { scale, x, y };
+
+ let mut svg_width = 100i32;
+ let mut svg_height = 100i32;
+ let mut max_slice_index = 0;
+
+ let mut entries: Vec<_> = std::fs::read_dir(input_dir).unwrap()
+ .filter_map(|r| r.ok())
+ .collect();
+ // auto-fix a missing 'tile_cache' postfix on the input path -- easy to do when copy-pasting a
+ // path to a wr-capture; there should at least be a frame00000.ron...
+ let frame00000 = entries.iter().find(|&entry| entry.path().ends_with("frame00000.ron"));
+ // ... and if not, try again with 'tile_cache' appended to the input folder
+ if frame00000.is_none() {
+ let new_path = input_dir.join("tile_cache");
+ entries = std::fs::read_dir(new_path).unwrap()
+ .filter_map(|r| r.ok())
+ .collect();
+ }
+ entries.sort_by_key(|dir| dir.path());
+
+ let mut svg_files: Vec::<String> = Vec::new();
+ let mut intern_files: Vec::<String> = Vec::new();
+ let mut prev_slices = None;
+
+ let mut itemuid_to_string = HashMap::default();
+
+ for entry in &entries {
+ if entry.path().is_dir() {
+ continue;
+ }
+ print!("processing {:?}\t", entry.path());
+ let file_data = std::fs::read_to_string(entry.path()).unwrap();
+ let chunks: Vec<_> = file_data.split("// @@@ chunk @@@").collect();
+ let slices: Vec<Slice> = match ron::de::from_str(&chunks[0]) {
+ Ok(data) => { data }
+ Err(e) => {
+ println!("ERROR: failed to deserialize slicesg {:?}\n{:?}", entry.path(), e);
+ prev_slices = None;
+ continue;
+ }
+ };
+ let mut update_lists = TileCacheLoggerUpdateLists::new();
+ update_lists.from_ron(&chunks[1]);
+ update_lists.insert_in_lookup(&mut itemuid_to_string);
+
+ let invalidation_report = write_tile_cache_visualizer_svg(
+ &entry, &output_dir,
+ &slices, prev_slices,
+ &itemuid_to_string,
+ &mut svg_width, &mut svg_height,
+ &mut max_slice_index,
+ &mut svg_files,
+ &svg_settings);
+
+ write_update_list_html(&entry, &output_dir, &update_lists,
+ &mut intern_files, invalidation_report);
+
+ print!("\r");
+ prev_slices = Some(slices);
+ }
+
+ write_html(output_dir, max_slice_index, &svg_files, &intern_files);
+ write_css(output_dir, max_slice_index, &svg_settings);
+
+ std::fs::write(output_dir.join("tilecache.js"), RES_JAVASCRIPT).unwrap();
+ std::fs::write(output_dir.join("tilecache_base.css"), RES_BASE_CSS).unwrap();
+
+ println!("\n");
+}
diff --git a/third_party/webrender/tileview/src/tilecache.js b/third_party/webrender/tileview/src/tilecache.js
new file mode 100644
index 00000000000..cf716e84ef6
--- /dev/null
+++ b/third_party/webrender/tileview/src/tilecache.js
@@ -0,0 +1,187 @@
+// current SVG file for scrubbing and playback
+var svg_index = 0;
+
+// double buffered <object>s each holding an SVG file
+var backbuffer;
+var frontbuffer;
+
+
+// timer for animation
+var svg_timer;
+var is_playing = false;
+
+function toggle_play() {
+ if( is_playing ) {
+ is_playing = false;
+ clearInterval(svg_timer);
+ document.getElementById("text_spacebar").innerHTML =
+ 'Spacebar to play';
+ } else {
+ is_playing = true;
+ svg_timer = setInterval(on_tick, 100);
+ document.getElementById("text_spacebar").innerHTML =
+ 'Playing (Spacebar to stop)';
+ function on_tick() {
+ if( svg_index + 1 == svg_files.length ) {
+ toggle_play();
+ } else {
+ go_to_svg(svg_index+1);
+ }
+ }
+ }
+}
+
+function toggle_quadtree() {
+ var quad_groups = document.getElementsByClassName("svg_quadtree")
+ var i;
+ for (i = 0; i < quad_groups.length; i++) {
+ if( quad_groups[i].style.display == "none" )
+ quad_groups[i].style.display = "block";
+ else
+ quad_groups[i].style.display = "none";
+ }
+}
+
+function update_slice_visibility(max_slice) {
+ let content = frontbuffer.contentDocument;
+ update_slice_visibility_for_content(content, max_slice);
+}
+
+function update_slice_visibility_for_content(content, max_slice) {
+
+ intern = document.getElementById('intern').contentDocument;
+
+ for (let slice = 0; slice != max_slice; ++slice) {
+ var cbox_name = "slice_toggle" + slice;
+ let cbox = document.getElementById(cbox_name);
+ if( !cbox )
+ continue;
+ let checked = cbox.checked;
+ if (content) { // might fail due to cross scripting -- use SimpleHTTPServer
+ var id = "tile_slice" + slice + "_everything";
+ var group = content.getElementById(id);
+ if (group) {
+ if (checked)
+ group.style.display = "block";
+ else
+ group.style.display = "none";
+ }
+ }
+ if (intern) {
+ var id = "invalidation_slice" + slice;
+ var div = intern.getElementById(id);
+ if (div) {
+ if (checked)
+ div.style.display = "block";
+ else
+ div.style.display = "none";
+ }
+ }
+ }
+}
+
+// try to block repeated keypressed from causing flickering
+// when they land between go_to_svg returning and onload
+// firing.
+var is_loading = false;
+
+function go_to_svg(index) {
+ if( index >= svg_files.length ||
+ index < 0 ||
+ is_loading ) {
+ return;
+ }
+
+ is_loading = true;
+ svg_index = index;
+
+ var slider = document.getElementById('frame_slider');
+ // won't recurse thanks to is_loading
+ slider.value = svg_index;
+
+ backbuffer.onload = function(){
+
+ document.getElementById("text_frame_counter").innerHTML =
+ svg_files[svg_index];
+
+ let content = backbuffer.contentDocument;
+ update_slice_visibility_for_content(content, 20);
+
+ backbuffer.style.display = '';
+ frontbuffer.style.display = 'none';
+
+ var t = frontbuffer;
+ frontbuffer = backbuffer;
+ backbuffer = t;
+ is_loading = false;
+ }
+ document.getElementById('intern').src = intern_files[svg_index];
+ backbuffer.setAttribute('data', svg_files[svg_index]);
+
+ // also see https://stackoverflow.com/a/29915275
+}
+
+function load() {
+ window.addEventListener('keypress', handle_keyboard_shortcut);
+ window.addEventListener('keydown', handle_keydown);
+
+ frontbuffer = document.getElementById("svg_container0");
+ backbuffer = document.getElementById("svg_container1");
+ backbuffer.style.display='none';
+
+ var slider = document.getElementById('frame_slider');
+ slider.oninput = function() {
+ if( is_playing ) {
+ toggle_play();
+ }
+ go_to_svg(this.value);
+ }
+}
+
+function handle_keyboard_shortcut(event) {
+ switch (event.charCode) {
+ case 32: // ' '
+ toggle_play();
+ break;
+ case 113: // 'q'
+ toggle_quadtree();
+ break;
+ /*
+ case 49: // "1" key
+ document.getElementById("radio1").checked = true;
+ show_image(1);
+ break;
+ case 50: // "2" key
+ document.getElementById("radio2").checked = true;
+ show_image(2);
+ break;
+ case 100: // "d" key
+ document.getElementById("differences").click();
+ break;
+ case 112: // "p" key
+ shift_images(-1);
+ break;
+ case 110: // "n" key
+ shift_images(1);
+ break;
+ */
+ }
+}
+
+function handle_keydown(event) {
+ switch (event.keyCode) {
+ case 37: // left arrow
+ go_to_svg(svg_index-1);
+ event.preventDefault();
+ break;
+ case 38: // up arrow
+ break;
+ case 39: // right arrow
+ go_to_svg(svg_index+1);
+ event.preventDefault();
+ break;
+ case 40: // down arrow
+ break;
+ }
+}
+
diff --git a/third_party/webrender/tileview/src/tilecache_base.css b/third_party/webrender/tileview/src/tilecache_base.css
new file mode 100644
index 00000000000..cfd51af6d16
--- /dev/null
+++ b/third_party/webrender/tileview/src/tilecache_base.css
@@ -0,0 +1,109 @@
+.tile_svg {
+ float: left;
+}
+
+#intern {
+ position:relative;
+ top:60px;
+ width: 100%;
+ height: 100%;
+ color: orange;
+ border: 0px;
+ overflow: auto;
+ background: white;
+}
+
+.datasheet .header {
+ color: white;
+ font-family: Arial;
+ font-weight: bold;
+ font-size: 150%;
+ line-height: 200%;
+ background-color: grey;
+ margin-top: 15px;
+ margin-bottom: 5px;
+ padding-left: 10px;
+}
+
+.datasheet .subheader {
+ color: blue;
+ font-family: Arial;
+ font-weight: bold;
+ line-height: 200%;
+ background-color: lightgrey;
+ margin-top: 5px;
+ margin-bottom: 5px;
+}
+
+.datasheet .data {
+ font-family: monospace;
+ margin-bottom: 5px;
+}
+
+.datasheet .data *:nth-child(even) {
+ background: #FFFFFF;
+}
+.datasheet .data *:nth-child(odd) {
+ background: #EFEFEF;
+}
+
+.datasheet .data .insert {
+ color: #006000;
+}
+
+.datasheet .data .remove {
+ color: #600000;
+}
+
+.datasheet .data .change {
+ color: #000060;
+}
+
+
+.split {
+ position: fixed;
+ z-index: 1;
+ top: 0;
+ padding-top: 14px;
+}
+
+.left {
+ left: 0;
+}
+
+.right {
+ right: 0;
+ width: 30%;
+ height: 90%;
+}
+
+#svg_ui_overlay {
+ position:absolute;
+ right:0;
+ top:0;
+ z-index:70;
+ color: rgb(255,255,100);
+ font-family:monospace;
+ background-color: #404040a0;
+}
+
+#svg_ui_slider {
+ width:90%;
+}
+
+.svg_invalidated {
+ fill: white;
+ font-family:monospace;
+}
+
+.svg_quadtree {
+ fill: none;
+ stroke-width: 1;
+ stroke: orange;
+}
+
+.svg_changed_prim {
+ stroke: red;
+ stroke-width: 2.0;
+}
+
diff --git a/third_party/webrender/webrender/Cargo.toml b/third_party/webrender/webrender/Cargo.toml
new file mode 100644
index 00000000000..6e3389a309b
--- /dev/null
+++ b/third_party/webrender/webrender/Cargo.toml
@@ -0,0 +1,77 @@
+[package]
+name = "webrender"
+version = "0.61.0"
+authors = ["Glenn Watson <gw@intuitionlibrary.com>"]
+license = "MPL-2.0"
+repository = "https://github.com/servo/webrender"
+description = "A GPU accelerated 2D renderer for web content"
+build = "build.rs"
+edition = "2018"
+
+[features]
+default = ["freetype-lib"]
+freetype-lib = ["freetype/freetype-sys"]
+profiler = ["tracy-rs/enable_profiler"]
+debugger = ["ws", "serde_json", "serde", "image_loader", "base64"]
+capture = ["api/serialize", "ron", "serde", "smallvec/serde"]
+replay = ["api/deserialize", "ron", "serde", "smallvec/serde"]
+display_list_stats = ["api/display_list_stats"]
+serialize_program = ["serde", "webrender_build/serialize_program"]
+no_static_freetype = []
+leak_checks = []
+
+[build-dependencies]
+build-parallel = "0.1.1"
+glslopt = "0.1.2"
+webrender_build = { version = "0.0.1", path = "../webrender_build" }
+
+[dependencies]
+base64 = { optional = true, version = "0.10" }
+bincode = "1.0"
+bitflags = "1.2"
+byteorder = "1.0"
+cfg-if = "0.1.2"
+cstr = "0.1.2"
+euclid = { version = "0.22.0", features = ["serde"] }
+fxhash = "0.2.1"
+gleam = "0.12.1"
+image_loader = { optional = true, version = "0.23", package = "image", default-features = false, features = ["png"] }
+lazy_static = "1"
+log = "0.4"
+malloc_size_of_derive = "0.1"
+num-traits = "0.2"
+plane-split = "0.17"
+png = { optional = true, version = "0.16" }
+rayon = "1"
+ron = { optional = true, version = "0.5" }
+serde = { optional = true, version = "1.0", features = ["serde_derive"] }
+serde_json = { optional = true, version = "1.0" }
+smallvec = "1"
+time = "0.1"
+api = { version = "0.61.0", path = "../webrender_api", package = "webrender_api" }
+webrender_build = { version = "0.0.1", path = "../webrender_build" }
+malloc_size_of = { version = "0.0.1", path = "../wr_malloc_size_of", package = "wr_malloc_size_of" }
+ws = { optional = true, version = "0.9" }
+svg_fmt = "0.4"
+tracy-rs = { version = "0.1" }
+
+[dev-dependencies]
+mozangle = "0.3.1"
+rand = "0.4"
+
+[target.'cfg(any(target_os = "macos", target_os = "linux"))'.build-dependencies]
+backtrace = "0.3"
+sig = "1.0"
+libc = "0.2"
+
+[target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies]
+freetype = { version = "0.7", default-features = false }
+libc = "0.2"
+
+[target.'cfg(target_os = "windows")'.dependencies]
+dwrote = "0.11"
+
+[target.'cfg(target_os = "macos")'.dependencies]
+core-foundation = "0.9"
+core-graphics = "0.22"
+core-text = { version = "19", default-features = false }
diff --git a/third_party/webrender/webrender/backtrace.rs b/third_party/webrender/webrender/backtrace.rs
new file mode 100644
index 00000000000..aa6bb6b3297
--- /dev/null
+++ b/third_party/webrender/webrender/backtrace.rs
@@ -0,0 +1,103 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
+
+//! Similar to `println!("{:?}", Backtrace::new())`, but doesn’t allocate.
+//!
+//! Seems to fix some deadlocks: https://github.com/servo/servo/issues/24881
+//!
+//! FIXME: if/when a future version of the `backtrace` crate has
+//! https://github.com/rust-lang/backtrace-rs/pull/265, use that instead.
+
+use std::fmt::{self, Write};
+use backtrace::{BytesOrWideString, PrintFmt};
+
+#[inline(never)]
+pub(crate) fn print(w: &mut dyn std::io::Write) -> Result<(), std::io::Error> {
+ write!(w, "{:?}", Print {
+ print_fn_address: print as usize,
+ })
+}
+
+struct Print {
+ print_fn_address: usize,
+}
+
+impl fmt::Debug for Print {
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ // Safety: we’re in a signal handler that is about to call `libc::_exit`.
+ // Potential data races from using `*_unsynchronized` functions are perhaps
+ // less bad than potential deadlocks?
+ unsafe {
+ let mut print_fn_frame = 0;
+ let mut frame_count = 0;
+ backtrace::trace_unsynchronized(|frame| {
+ let found = frame.symbol_address() as usize == self.print_fn_address;
+ if found {
+ print_fn_frame = frame_count;
+ }
+ frame_count += 1;
+ !found
+ });
+
+ let mode = PrintFmt::Short;
+ let mut p = print_path;
+ let mut f = backtrace::BacktraceFmt::new(fmt, mode, &mut p);
+ f.add_context()?;
+ let mut result = Ok(());
+ let mut frame_count = 0;
+ backtrace::trace_unsynchronized(|frame| {
+ let skip = frame_count < print_fn_frame;
+ frame_count += 1;
+ if skip {
+ return true
+ }
+
+ let mut frame_fmt = f.frame();
+ let mut any_symbol = false;
+ backtrace::resolve_frame_unsynchronized(frame, |symbol| {
+ any_symbol = true;
+ if let Err(e) = frame_fmt.symbol(frame, symbol) {
+ result = Err(e)
+ }
+ });
+ if !any_symbol {
+ if let Err(e) = frame_fmt.print_raw(frame.ip(), None, None, None) {
+ result = Err(e)
+ }
+ }
+ result.is_ok()
+ });
+ result?;
+ f.finish()
+ }
+ }
+}
+
+fn print_path(fmt: &mut fmt::Formatter, path: BytesOrWideString) -> fmt::Result {
+ match path {
+ BytesOrWideString::Bytes(mut bytes) => {
+ loop {
+ match std::str::from_utf8(bytes) {
+ Ok(s) => {
+ fmt.write_str(s)?;
+ break;
+ }
+ Err(err) => {
+ fmt.write_char(std::char::REPLACEMENT_CHARACTER)?;
+ match err.error_len() {
+ Some(len) => bytes = &bytes[err.valid_up_to() + len..],
+ None => break,
+ }
+ }
+ }
+ }
+ }
+ BytesOrWideString::Wide(wide) => {
+ for c in std::char::decode_utf16(wide.iter().cloned()) {
+ fmt.write_char(c.unwrap_or(std::char::REPLACEMENT_CHARACTER))?
+ }
+ }
+ }
+ Ok(())
+}
diff --git a/third_party/webrender/webrender/build.rs b/third_party/webrender/webrender/build.rs
new file mode 100644
index 00000000000..36a7f17a8e0
--- /dev/null
+++ b/third_party/webrender/webrender/build.rs
@@ -0,0 +1,317 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate webrender_build;
+
+use std::borrow::Cow;
+use std::env;
+use std::fs::{canonicalize, read_dir, File};
+use std::io::prelude::*;
+use std::path::{Path, PathBuf};
+use std::collections::hash_map::DefaultHasher;
+use std::hash::Hasher;
+use webrender_build::shader::*;
+use webrender_build::shader_features::{ShaderFeatureFlags, get_shader_features};
+
+/// Compute the shader path for insertion into the include_str!() macro.
+/// This makes for more compact generated code than inserting the literal
+/// shader source into the generated file.
+///
+/// If someone is building on a network share, I'm sorry.
+fn escape_include_path(path: &Path) -> String {
+ let full_path = canonicalize(path).unwrap();
+ let full_name = full_path.as_os_str().to_str().unwrap();
+ let full_name = full_name.replace("\\\\?\\", "");
+ let full_name = full_name.replace("\\", "/");
+
+ full_name
+}
+
+fn write_unoptimized_shaders(mut glsl_files: Vec<PathBuf>, shader_file: &mut File) -> Result<(), std::io::Error> {
+ writeln!(
+ shader_file,
+ " pub static ref UNOPTIMIZED_SHADERS: HashMap<&'static str, SourceWithDigest> = {{"
+ )?;
+ writeln!(shader_file, " let mut shaders = HashMap::new();")?;
+
+ // Sort the file list so that the shaders.rs file is filled
+ // deterministically.
+ glsl_files.sort_by(|a, b| a.file_name().cmp(&b.file_name()));
+
+ for glsl in glsl_files {
+ // Compute the shader name.
+ assert!(glsl.is_file());
+ let shader_name = glsl.file_name().unwrap().to_str().unwrap();
+ let shader_name = shader_name.replace(".glsl", "");
+
+ // Compute a digest of the #include-expanded shader source. We store
+ // this as a literal alongside the source string so that we don't need
+ // to hash large strings at runtime.
+ let mut hasher = DefaultHasher::new();
+ let base = glsl.parent().unwrap();
+ assert!(base.is_dir());
+ ShaderSourceParser::new().parse(
+ Cow::Owned(shader_source_from_file(&glsl)),
+ &|f| Cow::Owned(shader_source_from_file(&base.join(&format!("{}.glsl", f)))),
+ &mut |s| hasher.write(s.as_bytes()),
+ );
+ let digest: ProgramSourceDigest = hasher.into();
+
+ writeln!(
+ shader_file,
+ " shaders.insert(\"{}\", SourceWithDigest {{ source: include_str!(\"{}\"), digest: \"{}\"}});",
+ shader_name,
+ escape_include_path(&glsl),
+ digest,
+ )?;
+ }
+ writeln!(shader_file, " shaders")?;
+ writeln!(shader_file, " }};")?;
+
+ Ok(())
+}
+
+#[derive(Clone, Debug)]
+struct ShaderOptimizationInput {
+ shader_name: &'static str,
+ config: String,
+ gl_version: ShaderVersion,
+}
+
+#[derive(Debug)]
+struct ShaderOptimizationOutput {
+ full_shader_name: String,
+ gl_version: ShaderVersion,
+ vert_file_path: PathBuf,
+ frag_file_path: PathBuf,
+ digest: ProgramSourceDigest,
+}
+
+#[derive(Debug)]
+struct ShaderOptimizationError {
+ shader: ShaderOptimizationInput,
+ message: String,
+}
+
+fn write_optimized_shaders(shader_dir: &Path, shader_file: &mut File, out_dir: &str) -> Result<(), std::io::Error> {
+ writeln!(
+ shader_file,
+ " pub static ref OPTIMIZED_SHADERS: HashMap<(ShaderVersion, &'static str), OptimizedSourceWithDigest> = {{"
+ )?;
+ writeln!(shader_file, " let mut shaders = HashMap::new();")?;
+
+ // The full set of optimized shaders can be quite large, so only optimize
+ // for the GL version we expect to be used on the target platform. If a different GL
+ // version is used we will simply fall back to the unoptimized shaders.
+ let shader_versions = match env::var("CARGO_CFG_TARGET_OS").as_ref().map(|s| &**s) {
+ Ok("android") | Ok("windows") => [ShaderVersion::Gles],
+ _ => [ShaderVersion::Gl],
+ };
+
+ let mut shaders = Vec::default();
+ for &gl_version in &shader_versions {
+ let mut flags = ShaderFeatureFlags::all();
+ if gl_version != ShaderVersion::Gl {
+ flags.remove(ShaderFeatureFlags::GL);
+ }
+ if gl_version != ShaderVersion::Gles {
+ flags.remove(ShaderFeatureFlags::GLES);
+ flags.remove(ShaderFeatureFlags::TEXTURE_EXTERNAL);
+ }
+ flags.remove(ShaderFeatureFlags::DITHERING);
+ flags.remove(ShaderFeatureFlags::PIXEL_LOCAL_STORAGE);
+
+ for (shader_name, configs) in get_shader_features(flags) {
+ for config in configs {
+ shaders.push(ShaderOptimizationInput {
+ shader_name,
+ config,
+ gl_version,
+ });
+ }
+ }
+ }
+
+ let outputs = build_parallel::compile_objects(&|shader: &ShaderOptimizationInput| {
+ println!("Optimizing shader {:?}", shader);
+ let target = match shader.gl_version {
+ ShaderVersion::Gl => glslopt::Target::OpenGl,
+ ShaderVersion::Gles => glslopt::Target::OpenGles30,
+ };
+ let glslopt_ctx = glslopt::Context::new(target);
+
+ let features = shader.config.split(",").filter(|f| !f.is_empty()).collect::<Vec<_>>();
+
+ let (vert_src, frag_src) = build_shader_strings(
+ shader.gl_version,
+ &features,
+ shader.shader_name,
+ &|f| Cow::Owned(shader_source_from_file(&shader_dir.join(&format!("{}.glsl", f)))),
+ );
+
+ let full_shader_name = if shader.config.is_empty() {
+ shader.shader_name.to_string()
+ } else {
+ format!("{}_{}", shader.shader_name, shader.config.replace(",", "_"))
+ };
+
+ let vert = glslopt_ctx.optimize(glslopt::ShaderType::Vertex, vert_src);
+ if !vert.get_status() {
+ return Err(ShaderOptimizationError {
+ shader: shader.clone(),
+ message: vert.get_log().to_string(),
+ });
+ }
+ let frag = glslopt_ctx.optimize(glslopt::ShaderType::Fragment, frag_src);
+ if !frag.get_status() {
+ return Err(ShaderOptimizationError {
+ shader: shader.clone(),
+ message: frag.get_log().to_string(),
+ });
+ }
+
+ let vert_source = vert.get_output().unwrap();
+ let frag_source = frag.get_output().unwrap();
+
+ // Compute a digest of the optimized shader sources. We store this
+ // as a literal alongside the source string so that we don't need
+ // to hash large strings at runtime.
+ let mut hasher = DefaultHasher::new();
+ hasher.write(vert_source.as_bytes());
+ hasher.write(frag_source.as_bytes());
+ let digest: ProgramSourceDigest = hasher.into();
+
+ let vert_file_path = Path::new(out_dir)
+ .join(format!("{}_{:?}.vert", full_shader_name, shader.gl_version));
+ let mut vert_file = File::create(&vert_file_path).unwrap();
+ vert_file.write_all(vert_source.as_bytes()).unwrap();
+ let frag_file_path = vert_file_path.with_extension("frag");
+ let mut frag_file = File::create(&frag_file_path).unwrap();
+ frag_file.write_all(frag_source.as_bytes()).unwrap();
+
+ println!("Finished optimizing shader {:?}", shader);
+
+ Ok(ShaderOptimizationOutput {
+ full_shader_name,
+ gl_version: shader.gl_version,
+ vert_file_path,
+ frag_file_path,
+ digest,
+ })
+ }, &shaders);
+
+ match outputs {
+ Ok(mut outputs) => {
+ // Sort the shader list so that the shaders.rs file is filled
+ // deterministically.
+ outputs.sort_by(|a, b| {
+ (a.gl_version, a.full_shader_name.clone()).cmp(&(b.gl_version, b.full_shader_name.clone()))
+ });
+
+ for shader in outputs {
+ writeln!(
+ shader_file,
+ " shaders.insert(({}, \"{}\"), OptimizedSourceWithDigest {{",
+ shader.gl_version.variant_name(),
+ shader.full_shader_name,
+ )?;
+ writeln!(
+ shader_file,
+ " vert_source: include_str!(\"{}\"),",
+ escape_include_path(&shader.vert_file_path),
+ )?;
+ writeln!(
+ shader_file,
+ " frag_source: include_str!(\"{}\"),",
+ escape_include_path(&shader.frag_file_path),
+ )?;
+ writeln!(shader_file, " digest: \"{}\",", shader.digest)?;
+ writeln!(shader_file, " }});")?;
+ }
+ }
+ Err(err) => match err {
+ build_parallel::Error::BuildError(err) => {
+ panic!("Error optimizing shader {:?}: {}", err.shader, err.message)
+ }
+ _ => panic!("Error optimizing shaders."),
+ }
+ }
+
+ writeln!(shader_file, " shaders")?;
+ writeln!(shader_file, " }};")?;
+
+ Ok(())
+}
+
+#[cfg(any(target_os = "macos", target_os = "linux"))]
+mod backtrace;
+
+#[cfg(any(target_os = "macos", target_os = "linux"))]
+extern "C" fn handler(sig: i32) {
+ use std::sync::atomic;
+ static BEEN_HERE_BEFORE: atomic::AtomicBool = atomic::AtomicBool::new(false);
+ if !BEEN_HERE_BEFORE.swap(true, atomic::Ordering::SeqCst) {
+ let stdout = std::io::stdout();
+ let mut stdout = stdout.lock();
+ let _ = write!(&mut stdout, "Stack trace");
+ if let Some(name) = std::thread::current().name() {
+ let _ = write!(&mut stdout, " for thread \"{}\"", name);
+ }
+ let _ = write!(&mut stdout, "\n");
+ let _ = backtrace::print(&mut stdout);
+ }
+ unsafe {
+ libc::_exit(sig);
+ }
+}
+
+fn main() -> Result<(), std::io::Error> {
+ #[cfg(any(target_os = "macos", target_os = "linux"))]
+ {
+ sig::signal!(sig::ffi::Sig::SEGV, handler); // handle segfaults
+ sig::signal!(sig::ffi::Sig::ILL, handler); // handle stack overflow and unsupported CPUs
+ sig::signal!(sig::ffi::Sig::IOT, handler); // handle double panics
+ sig::signal!(sig::ffi::Sig::BUS, handler); // handle invalid memory access
+ }
+
+ let out_dir = env::var("OUT_DIR").unwrap_or("out".to_owned());
+
+ let shaders_file_path = Path::new(&out_dir).join("shaders.rs");
+ let mut glsl_files = vec![];
+
+ println!("cargo:rerun-if-changed=res");
+ let res_dir = Path::new("res");
+ for entry in read_dir(res_dir)? {
+ let entry = entry?;
+ let path = entry.path();
+
+ if entry.file_name().to_str().unwrap().ends_with(".glsl") {
+ println!("cargo:rerun-if-changed={}", path.display());
+ glsl_files.push(path.to_owned());
+ }
+ }
+
+ let mut shader_file = File::create(shaders_file_path)?;
+
+ writeln!(shader_file, "/// AUTO GENERATED BY build.rs\n")?;
+ writeln!(shader_file, "use std::collections::HashMap;\n")?;
+ writeln!(shader_file, "use webrender_build::shader::ShaderVersion;\n")?;
+ writeln!(shader_file, "pub struct SourceWithDigest {{")?;
+ writeln!(shader_file, " pub source: &'static str,")?;
+ writeln!(shader_file, " pub digest: &'static str,")?;
+ writeln!(shader_file, "}}\n")?;
+ writeln!(shader_file, "pub struct OptimizedSourceWithDigest {{")?;
+ writeln!(shader_file, " pub vert_source: &'static str,")?;
+ writeln!(shader_file, " pub frag_source: &'static str,")?;
+ writeln!(shader_file, " pub digest: &'static str,")?;
+ writeln!(shader_file, "}}\n")?;
+ writeln!(shader_file, "lazy_static! {{")?;
+
+ write_unoptimized_shaders(glsl_files, &mut shader_file)?;
+ writeln!(shader_file, "")?;
+ write_optimized_shaders(&res_dir, &mut shader_file, &out_dir)?;
+ writeln!(shader_file, "}}")?;
+
+ Ok(())
+}
diff --git a/third_party/webrender/webrender/doc/CLIPPING_AND_POSITIONING.md b/third_party/webrender/webrender/doc/CLIPPING_AND_POSITIONING.md
new file mode 100644
index 00000000000..4aa8d0c6848
--- /dev/null
+++ b/third_party/webrender/webrender/doc/CLIPPING_AND_POSITIONING.md
@@ -0,0 +1,150 @@
+# Original Design
+
+To understand the current design for clipping and positioning (transformations
+and scrolling) in WebRender it can be useful to have a little background about
+the original design for these features. The most important thing to remember is
+that originally clipping, scrolling regions, and transformations were
+properties of stacking contexts and they were completely _hierarchical_. This
+goes a long way toward representing the majority of CSS content on the web, but
+fails when dealing with important edges cases and features including:
+ 1. Support for sticky positioned content
+ 2. Scrolling areas that include content that is ordered both above and below
+ intersecting content from outside the scroll area.
+ 3. Items in the same scrolling root, clipped by different clips one or more of
+ which are defined outside the scrolling root itself.
+ 4. Completely non-hierarchical clipping situations, such as when items are
+ clipped by some clips in the hierarchy, but not others.
+
+Design changes have been a step by step path from the original design to one
+that can handle all CSS content.
+
+# Current Design
+
+All positioning and clipping is handled by the `SpatialTree`. The name is a
+holdover from when this tree was a tree of `Layers` which handled both
+positioning and clipping. Currently the `SpatialTree` holds:
+ 1. A hierarchical collection of `SpatialNodes`, with the final screen
+ transformation of each node depending on the relative transformation of the
+ node combined with the transformations of all of its ancestors. These nodes
+ are responsible for positioning display list items and clips.
+ 2. A collection of `ClipNodes` which specify a rectangular clip and, optionally,
+ a set of rounded rectangle clips and a masking image.
+ 3. A collection of `ClipChains`. Each `ClipChain` is a list of `ClipNode`
+ elements. Every display list item has an assigned `ClipChain` which
+ specifies what `ClipNodes` are applied to that item.
+
+The `SpatialNode` of each clip applied to an item is completely independent of
+the `SpatialNode` applied to the item itself.
+
+One holdover from the previous design is that both `ClipNode` and `SpatialNodes`
+have a parent node, which is either a `SpatialNode` or a `ClipNode`. From this
+node WebRender can determine both a parent `ClipNode` and a parent `SpatialNode`
+by finding the first ancestor of that type. This is handled by the
+`DisplayListFlattener`.
+
+## `SpatialNode`
+There are three types of `SpatialNodes`:
+ 1. Reference frames which are created when content needs to apply
+ transformation or perspective properties to display list items. Reference
+ frames establish a new coordinate system, so internally all coordinates on
+ display list items are relative to the reference frame origin. Later
+ any non-reference frame positioning nodes that display list items belong
+ to can adjust this position relative to the reference frame origin.
+ 2. Scrolling nodes are used to define scrolling areas. These nodes have scroll
+ offsets which are a 2D translation relative to ancestor nodes and, ultimately,
+ the reference frame origin.
+ 3. Sticky frames are responsible for implementing position:sticky behavior.
+ This is also an 2D translation.
+
+`SpatialNodes` are defined as items in the display list. After scene building
+each node is traversed hierarchically during the `SpatialTree::update()` step.
+Once reference frame transforms and relative offsets are calculated, a to screen
+space transformation can be calculated for each `SpatialNode`. This transformation
+is added the `TransformPalette` and becomes directly available to WebRender shaders.
+
+In addition to screen space transformation calculation, the `SpatialNode` tree
+is divided up into _compatible coordinate systems_. These are coordinate systems
+which differ only by 2D translations from their parent system. These compatible
+coordinate systems may even cross reference frame boundaries. The goal here is
+to allow the application clipping rectangles from different compatible
+coordinate systems without generating mask images.
+
+## `ClipNode`
+
+Each clip node holds a clip rectangle along with an optional collection of
+rounded clip rectangles and a mask image. The fact that `ClipNodes` all have a
+clip rectangle is important because it means that all content clipped by a
+clip node has a bounding rectangle, which can be converted into a bounding
+screen space rectangle. This rectangle is called the _outer rectangle_ of the
+clip. `ClipNodes` may also have an _inner rectangle_, which is an area within
+the boundaries of the _outer rectangle_ that is completely unclipped.
+
+These rectangles are calculated during the `SpatialTree::update()` phase. In
+addition, each `ClipNode` produces a template `ClipChainNode` used to build
+the `ClipChains` which use that node.
+
+## `ClipChains`
+
+There are two ways that `ClipChains` are defined in WebRender. The first is
+through using the API for manually specifying `ClipChains` via a parent
+`ClipChain` and a list of `ClipNodes`. The second is through the hierarchy of a
+`ClipNode` established by its parent node. Every `ClipNode` has a chain of
+ancestor `SpatialNodes` and `ClipNodes`. The creation of a `ClipNode`
+automatically defines a `ClipChain` for this hierarchy. This behavior is a
+compatibility feature with the old completely hierarchical clipping architecture
+and is still how Gecko and Servo create most of their `ClipChains`. These
+hierarchical `ClipChains` are constructed during the `ClipNode::update()` step.
+
+During `ClipChain` construction, WebRender tries to eliminate clips that will
+not affect rendering, by looking at the combined _outer rectangle_ and _inner
+rectangle_ of a `ClipChain` and the _outer rectangle_ and _inner rectangle_ of
+any `ClipNode` appended to the chain. An example of the goal of this process is
+to avoid having to render a mask for a large rounded rectangle when the rest of
+the clip chain constrains the content to an area completely inside that
+rectangle. Avoiding mask rasterization in this case and others has large
+performance impacts on WebRender.
+
+# Clipping and Positioning in the Display List
+
+Each non-structural WebRender display list item has
+ * A `SpatialId` of a `SpatialNode` for positioning
+ * A `ClipId` of a `ClipNode` or a `ClipChain` for clipping
+ * An item-specific rectangular clip rectangle
+
+The positioning node determines how that item is positioned. It's assumed that
+the positioning node and the item are children of the same reference frame. The
+clipping node determines how that item is clipped. This should be fully
+independent of how the node is positioned and items can be clipped by any
+`ClipChain` regardless of the reference frame of their member clips. Finally,
+the item-specific clipping rectangle is applied directly to the item and should
+never result in the creation of a clip mask itself.
+
+## Converting user-exposed `ClipId`/`SpatialId` to internal indices
+
+WebRender must access `ClipNodes` and `SpatialNodes` quite a bit when building
+scenes and frames, so it tries to convert `ClipId`/`SpatialId`, which are already
+per-pipeline indices, to global scene-wide indices. Internally this is a
+conversion from `ClipId` into `ClipNodeIndex` or `ClipChainIndex`, and from
+`SpatialId` into `SpatialNodeIndex`. In order to make this conversion cheaper, the
+`DisplayListFlattner` assigns offsets for each pipeline and node type in the
+scene-wide `SpatialTree`.
+
+Nodes are added to their respective arrays sequentially as the display list is
+processed during scene building. When encountering an iframe, the
+`DisplayListFlattener` must start processing the nodes for that iframe's
+pipeline, meaning that nodes are now being added out of order to the node arrays
+of the `SpatialTree`. In this case, the `SpatialTree` fills in the gaps in
+the node arrays with placeholder nodes.
+
+# Hit Testing
+
+Hit testing is the responsibility of the `HitTester` data structure. This
+structure copies information necessary for hit testing from the
+`SpatialTree`. This is done so that hit testing can still take place while a
+new `SpatialTree` is under construction.
+
+# Ideas for the Future
+1. Expose the difference between `ClipId` and `ClipChainId` in the API.
+2. Prevent having to duplicate the `SpatialTree` for hit testing.
+3. Avoid having to create placeholder nodes in the `SpatialTree` while
+ processing iframes.
diff --git a/third_party/webrender/webrender/doc/blob.md b/third_party/webrender/webrender/doc/blob.md
new file mode 100644
index 00000000000..b910f6f76a3
--- /dev/null
+++ b/third_party/webrender/webrender/doc/blob.md
@@ -0,0 +1,43 @@
+# Blob images
+
+Blob image is fallback mechanism for webrender that Gecko uses to render primitives that aren't currently supported by webrender. The main idea is to provide webrender with a custom handler that can take arbitray drawing commands serialized as buffers of bytes (the blobs) and turn them into images that webrender internally will treat as regular images.
+
+At the API level, blob images are treated as other images. They are resources created and associated with image keys, and are used in the display list with regular image display items.
+
+
+## Active area
+
+In order to support scrolling very large content, blob images don't necessarily have a finite size. They can grow in any direction. At any time they do have an "active area", also called "visible area" which defines the portion that has to be rasterized. Typically this active area moves along large blob images depending on the scroll position.
+The coordinate system of active area the *should* be the one of the blob's drawing commands (this is really up to the blob handler implementation to enforce that, Gecko does), and its scale should correspond to device pixels. The active area's coordinates can be negative.
+
+As far as positioning goes, the active area maps to the image display item's bounds. In other words the content at the top-left corner of the active area will be rendered on screen at the position of the top-left corner of the display item's local rect.
+
+In Gecko, the active area corresponds to the intersection of the fallback content's rect and the displayport.
+
+The terms "visible area" and "visible rect" are used a lot in the blobs code, unfortunately they collide with frame building's visibility/culling terminology. They don't correspond to what is visible to the user, but rather what is in the displayport.
+
+
+## Tiling
+
+Blob images can be either tiled or non-tiled. Non-tiled blob images support invalid rects while tiled blob images track only validty at the tile level. In gecko all blobs are tiled with a tile size of 256x256.
+
+Just like regular tiled images, blob image tiles along the border of the image are shrinked to fit the remaining size. The only difference is that the tiling pattern always starts at the top-left corner for regular images (smaller boundary tiles only along the right and bottom edges), while it can be aribtrarily positioned for blob images (smaller boundary tiles potentially on all sides).
+
+The tiling logic is in webrender/src/image.rs.
+
+
+## Async rasterization
+
+Blobs are typically too slow to rasterize on the critical path. We try to avoid blocking frame building on blob image rasterization. In order to do that we rasterize blobs as part of scene building. Rather than rasterize tiles on demand from visibility informating, we rasterize the entire active area during scene building. This means we potentially process a lot more content than will be displayed if the user doesn't scroll through all of the visible area.
+
+When the render backend receives a transaction, it looks for all new and update blob images, and generate blob rasterization requests for all tiles of the blob images that overlap their active area. The requests are bundled with an `AsyncBlobImageRasterizer` object in the transaction that is sent to the scene builder thread. The async rasterizer is created by the `BlobImageHandler` at each transaction. It is a snapshot of the state of the blobs as well as external information such as fonts, and does the actual rasterization.
+
+While tiles are rasterized eagerly during scene building, their content is uploaded lazily to the texture cache depending on the result of the visibility pass during frame building.
+
+
+## Late rasterization
+
+In some case we run into a missing blob image during frame building and have to rasterize it synchronously. This happens when a rasterized tile is uploaded to the texture cache (at which point the CPU side is discarded), the texture cache entry expires and after scrolling back into view the tile is needed again.
+We should really keep the rasterized blobs around just like we keep regular images in the cache. Hopefully this section will become obsolete eventually and we'll be able to remove late blob rasterization.
+
+The information needed for async rasterization corresponds to the state of blobs before scene building while late rasterization needs the state of blobs after the last complete scene build. This means we have to be careful about which version we manipulate in the resource cache.
diff --git a/third_party/webrender/webrender/doc/swizzling.md b/third_party/webrender/webrender/doc/swizzling.md
new file mode 100644
index 00000000000..4b38791940e
--- /dev/null
+++ b/third_party/webrender/webrender/doc/swizzling.md
@@ -0,0 +1,31 @@
+> It'd be great to have some (in-tree) docs describing the process you've worked through here, the overall motivation, how it works on different GPUs / platforms etc. Perhaps as a follow up?
+
+# Swizzling in WR
+
+## Problem statement
+
+The goal is to avoid the CPU conversion of data done by the driver on texture data uploads. It's slow and always done synchronously, hurting our "Renderer" thread CPU utilization.
+
+Gecko produces all of the image data in BGRA. Switching "imagelib" to RGBA is possible, but modifying Skia to follow is less trivial.
+OpenGL support for BGRA8 as an internal texture format is a complex story: it's officially supported in Angle and a fair share of Android devices, but it's not available on the desktop GL (and until recently wasn't available in the Android emulator). Unofficially, when textures are initialized with `glTexImage` (as opposed to `glTexStorage`) with RGBA internal format, the desktop GL drivers often prefer to store the data in BGRA8 format, actually.
+
+The only way to avoid the CPU conversion is to provide the data in exactly the same format that the driver is using internally for a texture. In this case, the driver does a straght `memcpy` into its CPU-visible memory, which is the best we can hope for with OpenGL API.
+
+## Solution: swizzling
+
+https://phabricator.services.mozilla.com/D21965 is providing the solution to this problem. The main principles are:
+
+ 1. Use `glTexStorage` whenever it's available. Doing so gives us full control of the internal format, also allows to avoid allocating memory for mipmaps that we don't use.
+ 2. Make the shared texture cache format to be determined at the init time, based on the GL device capabilities. For Angle and OpenGL ES this is BGRA8, for desktop this is RGBA8 (since desktop GL doesn't support BGRA internal formats). WebRender is now able to tell Gecko, which color format it prefers the texture data to use.
+ 3. If the data comes in a format that is different from our best case, we pretend that the data is actually in our best case format, and associate the allocated cache entry with the `Swizzle`. That swizzle configuration changes the way shaders sample from a texture, adjusting for the fact the data was provided in a different format.
+ 4. The lifetime of a "swizzled" texture cache data is starting at the point the data is uploaded and ending at a point where any shader samples from this data. Any other operation on that data (copying or blitting) is not configurable by `Swizzle` and thus would produce incorrect results. To address this, the change enhances `cs_copy` shader to be used in place of blitting from the texture cache, where needed.
+ 5. Swizzling becomes a part of the batch key per texture. Mixing up draw calls with texture data that is differently swizzled then introduces the batch breaks. This is a downside for the swizzling approach in general, but it's not clear to what extent this would affect Gecko.
+
+## Code paths
+
+Windows/Angle and Android:
+ - we use `glTexStorage` with BGRA8 internal format, no swizzling is needed in general case.
+
+Windows (non-Angle), Mac, Linux:
+ - if `glTexStorage` is available, we use it with RGBA8 internal format, swizzling everything on texture sampling.
+ - otherwise, we use RGBA unsized format with `gTexImage` and expect the data to come in BGRA format, no swizzling is involved.
diff --git a/third_party/webrender/webrender/doc/text-rendering.md b/third_party/webrender/webrender/doc/text-rendering.md
new file mode 100644
index 00000000000..b965562b99a
--- /dev/null
+++ b/third_party/webrender/webrender/doc/text-rendering.md
@@ -0,0 +1,720 @@
+# Text Rendering
+
+This document describes the details of how WebRender renders text, particularly the blending stage of text rendering.
+We will go into grayscale text blending, subpixel text blending, and "subpixel text with background color" blending.
+
+### Prerequisites
+
+The description below assumes you're familiar with regular rgba compositing, operator over,
+and the concept of premultiplied alpha.
+
+### Not covered in this document
+
+We are going to treat the origin of the text mask as a black box.
+We're also going to assume we can blend text in the device color space and will not go into the gamma correction and linear pre-blending that happens in some of the backends that produce the text masks.
+
+## Grayscale Text Blending
+
+Grayscale text blending is the simplest form of text blending. Our blending function has three inputs:
+
+ - The text color, as a premultiplied rgba color.
+ - The text mask, as a single-channel alpha texture.
+ - The existing contents of the framebuffer that we're rendering to, the "destination". This is also a premultiplied rgba buffer.
+
+Note: The word "grayscale" here does *not* mean that we can only draw gray text.
+It means that the mask only has a single alpha value per pixel, so we can visualize
+the mask in our minds as a grayscale image.
+
+### Deriving the math
+
+We want to mask our text color using the single-channel mask, and composite that to the destination.
+This compositing step uses operator "over", just like regular compositing of rgba images.
+
+I'll be using GLSL syntax to describe the blend equations, but please consider most of the code below pseudocode.
+
+We can express the blending described above as the following blend equation:
+
+```glsl
+vec4 textblend(vec4 text_color, vec4 mask, vec4 dest) {
+ return over(in(text_color, mask), dest);
+}
+```
+
+with `over` being the blend function for (premultiplied) operator "over":
+
+```glsl
+vec4 over(vec4 src, vec4 dest) {
+ return src + (1.0 - src.a) * dest;
+}
+```
+
+and `in` being the blend function for (premultiplied) operator "in", i.e. the masking operator:
+
+```glsl
+vec4 in(vec4 src, vec4 mask) {
+ return src * mask.a;
+}
+```
+
+So the complete blending function is:
+
+```glsl
+result.r = text_color.r * mask.a + (1.0 - text_color.a * mask.a) * dest.r;
+result.g = text_color.g * mask.a + (1.0 - text_color.a * mask.a) * dest.g;
+result.b = text_color.b * mask.a + (1.0 - text_color.a * mask.a) * dest.b;
+result.a = text_color.a * mask.a + (1.0 - text_color.a * mask.a) * dest.a;
+```
+
+### Rendering this with OpenGL
+
+In general, a fragment shader does not have access to the destination.
+So the full blend equation needs to be expressed in a way that the shader only computes values that are independent of the destination,
+and the parts of the equation that use the destination values need to be applied by the OpenGL blend pipeline itself.
+The OpenGL blend pipeline can be tweaked using the functions `glBlendEquation` and `glBlendFunc`.
+
+In our example, the fragment shader can output just `text_color * mask.a`:
+
+```glsl
+ oFragColor = text_color * mask.a;
+```
+
+and the OpenGL blend pipeline can be configured like so:
+
+```rust
+ pub fn set_blend_mode_premultiplied_alpha(&self) {
+ self.gl.blend_func(gl::ONE, gl::ONE_MINUS_SRC_ALPHA);
+ self.gl.blend_equation(gl::FUNC_ADD);
+ }
+```
+
+This results in an overall blend equation of
+
+```
+result.r = 1 * oFragColor.r + (1 - oFragColor.a) * dest.r;
+ ^ ^ ^^^^^^^^^^^^^^^^^
+ | | |
+ +--gl::ONE | +-- gl::ONE_MINUS_SRC_ALPHA
+ |
+ +-- gl::FUNC_ADD
+
+ = 1 * (text_color.r * mask.a) + (1 - (text_color.a * mask.a)) * dest.r
+ = text_color.r * mask.a + (1 - text_color.a * mask.a) * dest.r
+```
+
+which is exactly what we wanted.
+
+### Differences to the actual WebRender code
+
+There are two minor differences between the shader code above and the actual code in the text run shader in WebRender:
+
+```glsl
+oFragColor = text_color * mask.a; // (shown above)
+// vs.
+oFragColor = vColor * mask * alpha; // (actual webrender code)
+```
+
+`vColor` is set to the text color. The differences are:
+
+ - WebRender multiplies with all components of `mask` instead of just with `mask.a`.
+ However, our font rasterization code fills the rgb values of `mask` with the value of `mask.a`,
+ so this is completely equivalent.
+ - WebRender applies another alpha to the text. This is coming from the clip.
+ You can think of this alpha to be a pre-adjustment of the text color for that pixel, or as an
+ additional mask that gets applied to the mask.
+
+## Subpixel Text Blending
+
+Now that we have the blend equation for single-channel text blending, we can look at subpixel text blending.
+
+The main difference between subpixel text blending and grayscale text blending is the fact that,
+for subpixel text, the text mask contains a separate alpha value for each color component.
+
+### Component alpha
+
+Regular painting uses four values per pixel: three color values, and one alpha value. The alpha value applies to all components of the pixel equally.
+
+Imagine for a second a world in which you have *three alpha values per pixel*, one for each color component.
+
+ - Old world: Each pixel has four values: `color.r`, `color.g`, `color.b`, and `color.a`.
+ - New world: Each pixel has *six* values: `color.r`, `color.a_r`, `color.g`, `color.a_g`, `color.b`, and `color.a_b`.
+
+In such a world we can define a component-alpha-aware operator "over":
+
+```glsl
+vec6 over_comp(vec6 src, vec6 dest) {
+ vec6 result;
+ result.r = src.r + (1.0 - src.a_r) * dest.r;
+ result.g = src.g + (1.0 - src.a_g) * dest.g;
+ result.b = src.b + (1.0 - src.a_b) * dest.b;
+ result.a_r = src.a_r + (1.0 - src.a_r) * dest.a_r;
+ result.a_g = src.a_g + (1.0 - src.a_g) * dest.a_g;
+ result.a_b = src.a_b + (1.0 - src.a_b) * dest.a_b;
+ return result;
+}
+```
+
+and a component-alpha-aware operator "in":
+
+```glsl
+vec6 in_comp(vec6 src, vec6 mask) {
+ vec6 result;
+ result.r = src.r * mask.a_r;
+ result.g = src.g * mask.a_g;
+ result.b = src.b * mask.a_b;
+ result.a_r = src.a_r * mask.a_r;
+ result.a_g = src.a_g * mask.a_g;
+ result.a_b = src.a_b * mask.a_b;
+ return result;
+}
+```
+
+and even a component-alpha-aware version of `textblend`:
+
+```glsl
+vec6 textblend_comp(vec6 text_color, vec6 mask, vec6 dest) {
+ return over_comp(in_comp(text_color, mask), dest);
+}
+```
+
+This results in the following set of equations:
+
+```glsl
+result.r = text_color.r * mask.a_r + (1.0 - text_color.a_r * mask.a_r) * dest.r;
+result.g = text_color.g * mask.a_g + (1.0 - text_color.a_g * mask.a_g) * dest.g;
+result.b = text_color.b * mask.a_b + (1.0 - text_color.a_b * mask.a_b) * dest.b;
+result.a_r = text_color.a_r * mask.a_r + (1.0 - text_color.a_r * mask.a_r) * dest.a_r;
+result.a_g = text_color.a_g * mask.a_g + (1.0 - text_color.a_g * mask.a_g) * dest.a_g;
+result.a_b = text_color.a_b * mask.a_b + (1.0 - text_color.a_b * mask.a_b) * dest.a_b;
+```
+
+### Back to the real world
+
+If we want to transfer the component alpha blend equation into the real world, we need to make a few small changes:
+
+ - Our text color only needs one alpha value.
+ So we'll replace all instances of `text_color.a_r/g/b` with `text_color.a`.
+ - We're currently not making use of the mask's `r`, `g` and `b` values, only of the `a_r`, `a_g` and `a_b` values.
+ So in the real world, we can use the rgb channels of `mask` to store those component alphas and
+ replace `mask.a_r/g/b` with `mask.r/g/b`.
+
+These two changes give us:
+
+```glsl
+result.r = text_color.r * mask.r + (1.0 - text_color.a * mask.r) * dest.r;
+result.g = text_color.g * mask.g + (1.0 - text_color.a * mask.g) * dest.g;
+result.b = text_color.b * mask.b + (1.0 - text_color.a * mask.b) * dest.b;
+result.a_r = text_color.a * mask.r + (1.0 - text_color.a * mask.r) * dest.a_r;
+result.a_g = text_color.a * mask.g + (1.0 - text_color.a * mask.g) * dest.a_g;
+result.a_b = text_color.a * mask.b + (1.0 - text_color.a * mask.b) * dest.a_b;
+```
+
+There's a third change we need to make:
+
+ - We're rendering to a destination surface that only has one alpha channel instead of three.
+ So `dest.a_r/g/b` and `result.a_r/g/b` will need to become `dest.a` and `result.a`.
+
+This creates a problem: We're currently assigning different values to `result.a_r`, `result.a_g` and `result.a_b`.
+Which of them should we use to compute `result.a`?
+
+This question does not have an answer. One alpha value per pixel is simply not sufficient
+to express the same information as three alpha values.
+
+However, see what happens if the destination is already opaque:
+
+We have `dest.a_r == 1`, `dest.a_g == 1`, and `dest.a_b == 1`.
+
+```
+result.a_r = text_color.a * mask.r + (1 - text_color.a * mask.r) * dest.a_r
+ = text_color.a * mask.r + (1 - text_color.a * mask.r) * 1
+ = text_color.a * mask.r + 1 - text_color.a * mask.r
+ = 1
+same for result.a_g and result.a_b
+```
+
+In other words, for opaque destinations, it doesn't matter what which channel of the mask we use when computing `result.a`, the result will always be completely opaque anyways. In WebRender we just pick `mask.g` (or rather,
+have font rasterization set `mask.a` to the value of `mask.g`) because it's as good as any.
+
+The takeaway here is: **Subpixel text blending is only supported for opaque destinations.** Attempting to render subpixel
+text into partially transparent destinations will result in bad alpha values. Or rather, it will result in alpha values which
+are not anticipated by the r, g, and b values in the same pixel, so that subsequent blend operations, which will mix r and a values
+from the same pixel, will produce incorrect colors.
+
+Here's the final subpixel blend function:
+
+```glsl
+vec4 subpixeltextblend(vec4 text_color, vec4 mask, vec4 dest) {
+ vec4 result;
+ result.r = text_color.r * mask.r + (1.0 - text_color.a * mask.r) * dest.r;
+ result.g = text_color.g * mask.g + (1.0 - text_color.a * mask.g) * dest.g;
+ result.b = text_color.b * mask.b + (1.0 - text_color.a * mask.b) * dest.b;
+ result.a = text_color.a * mask.a + (1.0 - text_color.a * mask.a) * dest.a;
+ return result;
+}
+```
+
+or for short:
+
+```glsl
+vec4 subpixeltextblend(vec4 text_color, vec4 mask, vec4 dest) {
+ return text_color * mask + (1.0 - text_color.a * mask) * dest;
+}
+```
+
+To recap, here's what we gained and lost by making the transition from the full-component-alpha world to the
+regular rgba world: All colors and textures now only need four values to be represented, we still use a
+component alpha mask, and the results are equivalent to the full-component-alpha result assuming that the
+destination is opaque. We lost the ability to draw to partially transparent destinations.
+
+### Making this work in OpenGL
+
+We have the complete subpixel blend function.
+Now we need to cut it into pieces and mix it with the OpenGL blend pipeline in such a way that
+the fragment shader does not need to know about the destination.
+
+Compare the equation for the red channel and the alpha channel between the two ways of text blending:
+
+```
+ single-channel alpha:
+ result.r = text_color.r * mask.a + (1.0 - text_color.a * mask.a) * dest.r
+ result.a = text_color.a * mask.a + (1.0 - text_color.a * mask.a) * dest.r
+
+ component alpha:
+ result.r = text_color.r * mask.r + (1.0 - text_color.a * mask.r) * dest.r
+ result.a = text_color.a * mask.a + (1.0 - text_color.a * mask.a) * dest.r
+```
+
+Notably, in the single-channel alpha case, all three destination color channels are multiplied with the same thing:
+`(1.0 - text_color.a * mask.a)`. This factor also happens to be "one minus `oFragColor.a`".
+So we were able to take advantage of OpenGL's `ONE_MINUS_SRC_ALPHA` blend func.
+
+In the component alpha case, we're not so lucky: Each destination color channel
+is multiplied with a different factor. We can use `ONE_MINUS_SRC_COLOR` instead,
+and output `text_color.a * mask` from our fragment shader.
+But then there's still the problem that the first summand of the computation for `result.r` uses
+`text_color.r * mask.r` and the second summand uses `text_color.a * mask.r`.
+
+There are multiple ways to deal with this. They are:
+
+ 1. Making use of `glBlendColor` and the `GL_CONSTANT_COLOR` blend func.
+ 2. Using a two-pass method.
+ 3. Using "dual source blending".
+
+Let's look at them in order.
+
+#### 1. Subpixel text blending in OpenGL using `glBlendColor`
+
+In this approach we return `text_color.a * mask` from the shader.
+Then we set the blend color to `text_color / text_color.a` and use `GL_CONSTANT_COLOR` as the source blendfunc.
+This results in the following blend equation:
+
+```
+result.r = (text_color.r / text_color.a) * oFragColor.r + (1 - oFragColor.r) * dest.r;
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^
+ | | |
+ +--gl::CONSTANT_COLOR | +-- gl::ONE_MINUS_SRC_COLOR
+ |
+ +-- gl::FUNC_ADD
+
+ = (text_color.r / text_color.a) * (text_color.a * mask.r) + (1 - (text_color.a * mask.r)) * dest.r
+ = text_color.r * mask.r + (1 - text_color.a * mask.r) * dest.r
+```
+
+At the very beginning of this document, we defined `text_color` as the *premultiplied* text color.
+So instead of actually doing the calculation `text_color.r / text_color.a` when specifying the blend color,
+we really just want to use the *unpremultiplied* text color in that place.
+That's usually the representation we start with anyway.
+
+#### 2. Two-pass subpixel blending in OpenGL
+
+The `glBlendColor` method has the disadvantage that the text color is part of the OpenGL state.
+So if we want to draw text with different colors, we have two use separate batches / draw calls
+to draw the differently-colored parts of text.
+
+Alternatively, we can use a two-pass method which avoids the need to use the `GL_CONSTANT_COLOR` blend func:
+
+ - The first pass outputs `text_color.a * mask` from the fragment shader and
+ uses `gl::ZERO, gl::ONE_MINUS_SRC_COLOR` as the glBlendFuncs. This achieves:
+
+```
+oFragColor = text_color.a * mask;
+
+result_after_pass0.r = 0 * oFragColor.r + (1 - oFragColor.r) * dest.r
+ = (1 - text_color.a * mask.r) * dest.r
+
+result_after_pass0.g = 0 * oFragColor.g + (1 - oFragColor.g) * dest.r
+ = (1 - text_color.a * mask.r) * dest.r
+
+...
+```
+
+ - The second pass outputs `text_color * mask` from the fragment shader and uses
+ `gl::ONE, gl::ONE` as the glBlendFuncs. This results in the correct overall blend equation.
+
+```
+oFragColor = text_color * mask;
+
+result_after_pass1.r
+ = 1 * oFragColor.r + 1 * result_after_pass0.r
+ = text_color.r * mask.r + result_after_pass0.r
+ = text_color.r * mask.r + (1 - text_color.a * mask.r) * dest.r
+```
+
+#### 3. Dual source subpixel blending in OpenGL
+
+The third approach is similar to the second approach, but makes use of the [`ARB_blend_func_extended`](https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_blend_func_extended.txt) extension
+in order to fold the two passes into one:
+Instead of outputting the two different colors in two separate passes, we output them from the same pass,
+as two separate fragment shader outputs.
+Those outputs can then be treated as two different sources in the blend equation.
+
+## Subpixel Text Rendering to Transparent Destinations with a Background Color Hint
+
+### Motivation
+
+As we've seen in the previous section, subpixel text drawing has the limitation that it only works on opaque destinations.
+
+In other words, if you use the `subpixeltextblend` function to draw something to a transparent surface,
+and then composite that surface onto on opaque background,
+the result will generally be different from drawing the text directly onto the opaque background.
+
+Let's express that inequality in code.
+
+```
+ - vec4 text_color
+ - vec4 mask
+ - vec4 transparency = vec4(0.0, 0.0, 0.0, 0.0)
+ - vec4 background with background.a == 1.0
+
+over(subpixeltextblend(text_color, mask, transparency), background).rgb
+ is, in general, not equal to
+subpixeltextblend(text_color, mask, background).rgb
+```
+
+However, one interesting observation is that if the background is black, the two *are* equal:
+
+```
+vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+
+over(subpixeltextblend(text_color, mask, transparency), black).r
+ = subpixeltextblend(text_color, mask, transparency).r +
+ (1 - subpixeltextblend(text_color, mask, transparency).a) * black.r
+ = subpixeltextblend(text_color, mask, transparency).r +
+ (1 - subpixeltextblend(text_color, mask, transparency).a) * 0
+ = subpixeltextblend(text_color, mask, transparency).r
+ = text_color.r * mask.r + (1 - text_color.a * mask.r) * transparency.r
+ = text_color.r * mask.r + (1 - text_color.a * mask.r) * 0
+ = text_color.r * mask.r + (1 - text_color.a * mask.r) * black.r
+ = subpixeltextblend(text_color, mask, black).r
+```
+
+So it works out for black backgrounds. The further your *actual* background color gets away from black,
+the more incorrect your result will be.
+
+If it works for black, is there a way to make it work for other colors?
+This is the motivating question for this third way of text blending:
+
+We want to be able to specify an *estimated background color*, and have a blending function
+`vec4 subpixeltextblend_withbgcolor(vec4 text_color, vec4 mask, vec4 bg_color, vec4 dest)`,
+in such a way that the error we get by using an intermediate surface is somehow in relation
+to the error we made when estimating the background color. In particular, if we estimated
+the background color perfectly, we want the intermediate surface to go unnoticed.
+
+Expressed as code:
+
+```
+over(subpixeltextblend_withbgcolor(text_color, mask, bg_color, transparency), bg_color)
+ should always be equal to
+subpixeltextblend(text_color, mask, bg_color)
+```
+
+This is one of three constraints we'd like `subpixeltextblend_withbgcolor` to satisfy.
+
+The next constraint is the following: If `dest` is already opaque, `subpixeltextblend_withbgcolor`
+should have the same results as `subpixeltextblend`, and the background color hint should be ignored.
+
+```
+ If dest.a == 1.0,
+subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest)
+ should always be equal to
+subpixeltextblend(text_color, mask, dest)
+```
+
+And there's a third condition we'd like it to fulfill:
+In places where the mask is zero, the destination should be unaffected.
+
+```
+subpixeltextblend_withbgcolor(text_color, transparency, bg_color, dest)
+ should always be equal to
+dest
+```
+
+### Use cases
+
+The primary use case for such a blend method is text on top of vibrant areas of a window on macOS.
+
+Vibrant backgrounds with behind-window blending are computed by the window server, and they are tinted
+in a color that's based on the chosen vibrancy type.
+
+The window's rgba buffer is transparent in the vibrant areas. Window contents, even text, are drawn onto
+that transparent rgba buffer. Then the window server composites the window onto an opaque backdrop.
+So the results on the screen are computed as follows:
+
+```glsl
+window_buffer_pixel = subpixeltextblend_withbgcolor(text_color, mask, bg_color, transparency);
+screen_pixel = over(window_buffer_pixel, window_backdrop);
+```
+
+### Prior art
+
+Apple has implemented such a method of text blending in CoreGraphics, specifically for rendering text onto vibrant backgrounds.
+It's hidden behind the private API `CGContextSetFontSmoothingBackgroundColor` and is called by AppKit internally before
+calling the `-[NSView drawRect:]` method of your `NSVisualEffectView`, with the appropriate font smoothing background color
+for the vibrancy type of that view.
+
+I'm not aware of any public documentation of this way of text blending.
+It seems to be considered an implementation detail by Apple, and is probably hidden by default because it can be a footgun:
+If the font smoothing background color you specify is very different from the actual background that our surface is placed
+on top of, the text will look glitchy.
+
+### Deriving the blending function from first principles
+
+Before we dive into the math, let's repeat our goal once more.
+
+We want to create a blending function of the form
+`vec4 subpixeltextblend_withbgcolor(vec4 text_color, vec4 mask, vec4 bg_color, vec4 dest)`
+(with `bg_color` being an opaque color)
+which satisfies the following three constraints:
+
+```
+Constraint I:
+ over(subpixeltextblend_withbgcolor(text_color, mask, bg_color, transparency), bg_color)
+ should always be equal to
+ subpixeltextblend(text_color, mask, bg_color)
+
+Constraint II:
+ If dest.a == 1.0,
+ subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest)
+ should always be equal to
+ subpixeltextblend(text_color, mask, dest)
+
+Constraint II:
+ subpixeltextblend_withbgcolor(text_color, transparency, bg_color, dest)
+ should always be equal to
+ dest
+```
+
+Constraint I and constraint II are about what happens depending on the destination's alpha.
+In particular: If the destination is completely transparent, we should blend into the
+estimated background color, and if it's completely opaque, we should blend into the destination color.
+In fact, we really want to blend into `over(dest, bg_color)`: we want `bg_color` to be used
+as a backdrop *behind* the current destination. So let's combine constraints I and II into a new
+constraint IV:
+
+```
+Constraint IV:
+ over(subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest), bg_color)
+ should always be equal to
+ subpixeltextblend(text_color, mask, over(dest, bg_color))
+```
+
+Let's look at just the left side of that equation and rejiggle it a bit:
+
+```
+over(subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest), bg_color).r
+ = subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest).r +
+ (1 - subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest).a) * bg_color.r
+
+<=>
+
+over(subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest), bg_color).r -
+(1 - subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest).a) * bg_color.r
+ = subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest).r
+```
+
+Now insert the right side of constraint IV:
+
+```
+subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest).r
+ = over(subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest), bg_color).r -
+ (1 - subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest).a) * bg_color.r
+ = subpixeltextblend(text_color, mask, over(dest, bg_color)).r -
+ (1 - subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest).a) * bg_color.r
+```
+
+Our blend function is almost finished. We just need select an alpha for our result.
+Constraints I, II and IV don't really care about the alpha value. But constraint III requires that:
+
+```
+ subpixeltextblend_withbgcolor(text_color, transparency, bg_color, dest).a
+ should always be equal to
+ dest.a
+```
+
+so the computation of the alpha value somehow needs to take into account the mask.
+
+Let's say we have an unknown function `make_alpha(text_color.a, mask)` which returns
+a number between 0 and 1 and which is 0 if the mask is entirely zero, and let's defer
+the actual implementation of that function until later.
+
+Now we can define the alpha of our overall function using the `over` function:
+
+```
+subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest).a
+ := make_alpha(text_color.a, mask) + (1 - make_alpha(text_color.a, mask)) * dest.a
+```
+
+We can plug this in to our previous result:
+
+```
+subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest).r
+ = subpixeltextblend(text_color, mask, over(dest, bg_color)).r
+ - (1 - subpixeltextblend_withbgcolor(text_color, mask, bg_color, dest).a) * bg_color.r
+ = subpixeltextblend(text_color, mask, over(dest, bg_color)).r
+ - (1 - (make_alpha(text_color.a, mask) +
+ (1 - make_alpha(text_color.a, mask)) * dest.a)) * bg_color.r
+ = text_color.r * mask.r + (1 - text_color.a * mask.r) * over(dest, bg_color).r
+ - (1 - (make_alpha(text_color.a, mask)
+ + (1 - make_alpha(text_color.a, mask)) * dest.a)) * bg_color.r
+ = text_color.r * mask.r
+ + (1 - text_color.a * mask.r) * (dest.r + (1 - dest.a) * bg_color.r)
+ - (1 - (make_alpha(text_color.a, mask)
+ + (1 - make_alpha(text_color.a, mask)) * dest.a)) * bg_color.r
+ = text_color.r * mask.r
+ + (1 - text_color.a * mask.r) * (dest.r + (1 - dest.a) * bg_color.r)
+ - (1 - (make_alpha(text_color.a, mask)
+ + (1 - make_alpha(text_color.a, mask)) * dest.a)) * bg_color.r
+ = text_color.r * mask.r
+ + (dest.r + (1 - dest.a) * bg_color.r)
+ - (text_color.a * mask.r) * (dest.r + (1 - dest.a) * bg_color.r)
+ - (1 - make_alpha(text_color.a, mask)
+ - (1 - make_alpha(text_color.a, mask)) * dest.a) * bg_color.r
+ = text_color.r * mask.r
+ + dest.r + (1 - dest.a) * bg_color.r
+ - text_color.a * mask.r * dest.r
+ - text_color.a * mask.r * (1 - dest.a) * bg_color.r
+ - (1 - make_alpha(text_color.a, mask)
+ - (1 - make_alpha(text_color.a, mask)) * dest.a) * bg_color.r
+ = text_color.r * mask.r
+ + dest.r + (1 - dest.a) * bg_color.r
+ - text_color.a * mask.r * dest.r
+ - text_color.a * mask.r * (1 - dest.a) * bg_color.r
+ - ((1 - make_alpha(text_color.a, mask)) * 1
+ - (1 - make_alpha(text_color.a, mask)) * dest.a) * bg_color.r
+ = text_color.r * mask.r
+ + dest.r + (1 - dest.a) * bg_color.r
+ - text_color.a * mask.r * dest.r
+ - text_color.a * mask.r * (1 - dest.a) * bg_color.r
+ - ((1 - make_alpha(text_color.a, mask)) * (1 - dest.a)) * bg_color.r
+ = text_color.r * mask.r
+ + dest.r - text_color.a * mask.r * dest.r
+ + (1 - dest.a) * bg_color.r
+ - text_color.a * mask.r * (1 - dest.a) * bg_color.r
+ - (1 - make_alpha(text_color.a, mask)) * (1 - dest.a) * bg_color.r
+ = text_color.r * mask.r
+ + (1 - text_color.a * mask.r) * dest.r
+ + (1 - dest.a) * bg_color.r
+ - text_color.a * mask.r * (1 - dest.a) * bg_color.r
+ - (1 - make_alpha(text_color.a, mask)) * (1 - dest.a) * bg_color.r
+ = text_color.r * mask.r
+ + (1 - text_color.a * mask.r) * dest.r
+ + (1 - text_color.a * mask.r) * (1 - dest.a) * bg_color.r
+ - (1 - make_alpha(text_color.a, mask)) * (1 - dest.a) * bg_color.r
+ = text_color.r * mask.r
+ + (1 - text_color.a * mask.r) * dest.r
+ + ((1 - text_color.a * mask.r)
+ - (1 - make_alpha(text_color.a, mask))) * (1 - dest.a) * bg_color.r
+ = text_color.r * mask.r
+ + (1 - text_color.a * mask.r) * dest.r
+ + (1 - text_color.a * mask.r
+ - 1 + make_alpha(text_color.a, mask)) * (1 - dest.a) * bg_color.r
+ = text_color.r * mask.r
+ + (1 - text_color.a * mask.r) * dest.r
+ + (make_alpha(text_color.a, mask) - text_color.a * mask.r) * (1 - dest.a) * bg_color.r
+```
+
+We now have a term of the form `A + B + C`, with `A` and `B` being guaranteed to
+be between zero and one.
+
+We also want `C` to be between zero and one.
+We can use this restriction to help us decide on an implementation of `make_alpha`.
+
+If we define `make_alpha` as
+
+```glsl
+float make_alpha(text_color_a, mask) {
+ float max_rgb = max(max(mask.r, mask.g), mask.b);
+ return text_color_a * max_rgb;
+}
+```
+
+, then `(make_alpha(text_color.a, mask) - text_color.a * mask.r)` becomes
+`(text_color.a * max(max(mask.r, mask.g), mask.b) - text_color.a * mask.r)`, which is
+`text_color.a * (max(max(mask.r, mask.g), mask.b) - mask.r)`, and the subtraction will
+always yield something that's greater or equal to zero for r, g, and b,
+because we will subtract each channel from the maximum of the channels.
+
+Putting this all together, we have:
+
+```glsl
+vec4 subpixeltextblend_withbgcolor(vec4 text_color, vec4 mask, vec4 bg_color, vec4 dest) {
+ float max_rgb = max(max(mask.r, mask.g), mask.b);
+ vec4 result;
+ result.r = text_color.r * mask.r + (1 - text_color.a * mask.r) * dest.r +
+ text_color.a * bg_color.r * (max_rgb - mask.r) * (1 - dest.a);
+ result.g = text_color.g * mask.g + (1 - text_color.a * mask.g) * dest.g +
+ text_color.a * bg_color.g * (max_rgb - mask.g) * (1 - dest.a);
+ result.b = text_color.b * mask.b + (1 - text_color.a * mask.b) * dest.b +
+ text_color.a * bg_color.b * (max_rgb - mask.b) * (1 - dest.a);
+ result.a = text_color.a * max_rgb + (1 - text_color.a * max_rgb) * dest.a;
+ return result;
+}
+```
+
+This is the final form of this blend function. It satisfies all of the four constraints.
+
+### Implementing it with OpenGL
+
+Our color channel equations consist of three pieces:
+
+ - `text_color.r * mask.r`, which simply gets added to the rest.
+ - `(1 - text_color.a * mask.r) * dest.r`, a factor which gets multiplied with the destination color.
+ - `text_color.a * bg_color.r * (max_rgb - mask.r) * (1 - dest.a)`, a factor which gets multiplied
+ with "one minus destination alpha".
+
+We will need three passes. Each pass modifies the color channels in the destination.
+This means that the part that uses `dest.r` needs to be applied first.
+Then we can apply the part that uses `1 - dest.a`.
+(This means that the first pass needs to leave `dest.a` untouched.)
+And the final pass can apply the `result.a` equation and modify `dest.a`.
+
+```
+pub fn set_blend_mode_subpixel_with_bg_color_pass0(&self) {
+ self.gl.blend_func_separate(gl::ZERO, gl::ONE_MINUS_SRC_COLOR, gl::ZERO, gl::ONE);
+}
+pub fn set_blend_mode_subpixel_with_bg_color_pass1(&self) {
+ self.gl.blend_func_separate(gl::ONE_MINUS_DST_ALPHA, gl::ONE, gl::ZERO, gl::ONE);
+}
+pub fn set_blend_mode_subpixel_with_bg_color_pass2(&self) {
+ self.gl.blend_func_separate(gl::ONE, gl::ONE, gl::ONE, gl::ONE_MINUS_SRC_ALPHA);
+}
+
+Pass0:
+ oFragColor = vec4(text.color.a) * mask;
+Pass1:
+ oFragColor = vec4(text.color.a) * text.bg_color * (vec4(mask.a) - mask);
+Pass2:
+ oFragColor = text.color * mask;
+
+result_after_pass0.r = 0 * (text_color.a * mask.r) + (1 - text_color.a * mask.r) * dest.r
+result_after_pass0.a = 0 * (text_color.a * mask.a) + 1 * dest.a
+
+result_after_pass1.r = (1 - result_after_pass0.a) * (text_color.a * (mask.max_rgb - mask.r) * bg_color.r) + 1 * result_after_pass0.r
+result_after_pass1.a = 0 * (text_color.a * (mask.max_rgb - mask.a) * bg_color.a) + 1 * result_after_pass0.a
+
+result_after_pass2.r = 1 * (text_color.r * mask.r) + 1 * result_after_pass1.r
+result_after_pass2.a = 1 * (text_color.a * mask.max_rgb) + (1 - text_color.a * mask.max_rgb) * result_after_pass1.a
+```
+
+Instead of computing `max_rgb` in the shader, we can just require the font rasterization code to fill
+`mask.a` with the `max_rgb` value.
+
diff --git a/third_party/webrender/webrender/res/Proggy.ttf b/third_party/webrender/webrender/res/Proggy.ttf
new file mode 100644
index 00000000000..308d3e1ac9b
--- /dev/null
+++ b/third_party/webrender/webrender/res/Proggy.ttf
Binary files differ
diff --git a/third_party/webrender/webrender/res/area-lut.tga b/third_party/webrender/webrender/res/area-lut.tga
new file mode 100644
index 00000000000..5edcddc3d16
--- /dev/null
+++ b/third_party/webrender/webrender/res/area-lut.tga
Binary files differ
diff --git a/third_party/webrender/webrender/res/base.glsl b/third_party/webrender/webrender/res/base.glsl
new file mode 100644
index 00000000000..eb343c019b5
--- /dev/null
+++ b/third_party/webrender/webrender/res/base.glsl
@@ -0,0 +1,53 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#if defined(GL_ES)
+ #if GL_ES == 1
+ #ifdef GL_FRAGMENT_PRECISION_HIGH
+ precision highp sampler2DArray;
+ #else
+ precision mediump sampler2DArray;
+ #endif
+
+ // Sampler default precision is lowp on mobile GPUs.
+ // This causes RGBA32F texture data to be clamped to 16 bit floats on some GPUs (e.g. Mali-T880).
+ // Define highp precision macro to allow lossless FLOAT texture sampling.
+ #define HIGHP_SAMPLER_FLOAT highp
+
+ // Default int precision in GLES 3 is highp (32 bits) in vertex shaders
+ // and mediump (16 bits) in fragment shaders. If an int is being used as
+ // a texel address in a fragment shader it, and therefore requires > 16
+ // bits, it must be qualified with this.
+ #define HIGHP_FS_ADDRESS highp
+
+ // texelFetchOffset is buggy on some Android GPUs (see issue #1694).
+ // Fallback to texelFetch on mobile GPUs.
+ #define TEXEL_FETCH(sampler, position, lod, offset) texelFetch(sampler, position + offset, lod)
+ #else
+ #define HIGHP_SAMPLER_FLOAT
+ #define HIGHP_FS_ADDRESS
+ #define TEXEL_FETCH(sampler, position, lod, offset) texelFetchOffset(sampler, position, lod, offset)
+ #endif
+#else
+ #define HIGHP_SAMPLER_FLOAT
+ #define HIGHP_FS_ADDRESS
+ #define TEXEL_FETCH(sampler, position, lod, offset) texelFetchOffset(sampler, position, lod, offset)
+#endif
+
+#ifdef WR_VERTEX_SHADER
+ #ifdef SWGL
+ // Annotate a vertex attribute as being flat per each drawn primitive instance.
+ // SWGL can use this information to avoid redundantly loading the attribute in all SIMD lanes.
+ #define PER_INSTANCE flat
+ #else
+ #define PER_INSTANCE
+ #endif
+
+ #define varying out
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+ precision highp float;
+ #define varying in
+#endif
diff --git a/third_party/webrender/webrender/res/brush.glsl b/third_party/webrender/webrender/res/brush.glsl
new file mode 100644
index 00000000000..4589e34b29e
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush.glsl
@@ -0,0 +1,317 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/// # Brush vertex shaders memory layout
+///
+/// The overall memory layout is the same for all brush shaders.
+///
+/// The vertex shader receives a minimal amount of data from vertex attributes (packed into a single
+/// ivec4 per instance) and the rest is fetched from various uniform samplers using offsets decoded
+/// from the vertex attributes.
+///
+/// The diagram below shows the the various pieces of data fectched in the vertex shader:
+///
+///```ascii
+/// (sPrimitiveHeadersI)
+/// (VBO) +-----------------------+
+/// +----------------------------+ +----------------------------> | Int header |
+/// | Instance vertex attributes | | (sPrimitiveHeadersF) | |
+/// | | | +---------------------+ | z |
+/// | x: prim_header_address +-------+---> | Float header | | specific_address +-----+
+/// | y: picture_task_address +---------+ | | | transform_address +---+ |
+/// | clip_address +-----+ | | local_rect | | user_data | | |
+/// | z: flags | | | | local_clip_rect | +-----------------------+ | |
+/// | segment_index | | | +---------------------+ | |
+/// | w: resource_address +--+ | | | |
+/// +----------------------------+ | | | (sGpuCache) | |
+/// | | | (sGpuCache) +------------+ | |
+/// | | | +---------------+ | Transform | <--------+ |
+/// (sGpuCache) | | +-> | Picture task | +------------+ |
+/// +-------------+ | | | | |
+/// | Resource | <---+ | | ... | |
+/// | | | +---------------+ +--------------------------------+
+/// | | | |
+/// +-------------+ | (sGpuCache) v (sGpuCache)
+/// | +---------------+ +--------------+---------------+-+-+
+/// +-----> | Clip area | | Brush data | Segment data | | |
+/// | | | | | | |
+/// | ... | | ... | ... | | | ...
+/// +---------------+ +--------------+---------------+-+-+
+///```
+///
+/// - Segment data address is obtained by combining the address stored in the int header and the
+/// segment index decoded from the vertex attributes.
+/// - Resource data is optional, some brush types (such as images) store some extra data there while
+/// other brush types don't use it.
+///
+
+#ifdef WR_FEATURE_MULTI_BRUSH
+flat varying int v_brush_kind;
+#endif
+
+// A few varying slots for the brushes to use.
+// Using these instead of adding dedicated varyings avoids using a high
+// number of varyings in the multi-brush shader.
+flat varying vec4 flat_varying_vec4_0;
+flat varying vec4 flat_varying_vec4_1;
+flat varying vec4 flat_varying_vec4_2;
+flat varying vec4 flat_varying_vec4_3;
+flat varying vec4 flat_varying_vec4_4;
+
+flat varying ivec4 flat_varying_ivec4_0;
+
+varying vec4 varying_vec4_0;
+varying vec4 varying_vec4_1;
+
+flat varying HIGHP_FS_ADDRESS int flat_varying_highp_int_address_0;
+
+#ifdef WR_VERTEX_SHADER
+
+#define FWD_DECLARE_VS_FUNCTION(name) \
+void name( \
+ VertexInfo vi, \
+ int prim_address, \
+ RectWithSize local_rect, \
+ RectWithSize segment_rect, \
+ ivec4 prim_user_data, \
+ int specific_resource_address, \
+ mat4 transform, \
+ PictureTask pic_task, \
+ int brush_flags, \
+ vec4 segment_data \
+);
+
+// Forward-declare all brush vertex entry points.
+FWD_DECLARE_VS_FUNCTION(image_brush_vs)
+FWD_DECLARE_VS_FUNCTION(solid_brush_vs)
+FWD_DECLARE_VS_FUNCTION(blend_brush_vs)
+FWD_DECLARE_VS_FUNCTION(mix_blend_brush_vs)
+FWD_DECLARE_VS_FUNCTION(linear_gradient_brush_vs)
+FWD_DECLARE_VS_FUNCTION(radial_gradient_brush_vs)
+FWD_DECLARE_VS_FUNCTION(conic_gradient_brush_vs)
+FWD_DECLARE_VS_FUNCTION(yuv_brush_vs)
+FWD_DECLARE_VS_FUNCTION(opacity_brush_vs)
+FWD_DECLARE_VS_FUNCTION(text_brush_vs)
+
+// Forward-declare the text vertex shader entry point which is currently
+// different from other brushes.
+void text_shader_main(
+ Instance instance,
+ PrimitiveHeader ph,
+ Transform transform,
+ PictureTask task,
+ ClipArea clip_area
+);
+
+void multi_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize local_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 texel_rect,
+ int brush_kind
+);
+
+#define VECS_PER_SEGMENT 2
+
+#define BRUSH_FLAG_PERSPECTIVE_INTERPOLATION 1
+#define BRUSH_FLAG_SEGMENT_RELATIVE 2
+#define BRUSH_FLAG_SEGMENT_REPEAT_X 4
+#define BRUSH_FLAG_SEGMENT_REPEAT_Y 8
+#define BRUSH_FLAG_SEGMENT_REPEAT_X_ROUND 16
+#define BRUSH_FLAG_SEGMENT_REPEAT_Y_ROUND 32
+#define BRUSH_FLAG_SEGMENT_NINEPATCH_MIDDLE 64
+#define BRUSH_FLAG_TEXEL_RECT 128
+
+#define INVALID_SEGMENT_INDEX 0xffff
+
+void brush_shader_main_vs(
+ Instance instance,
+ PrimitiveHeader ph,
+ Transform transform,
+ PictureTask pic_task,
+ ClipArea clip_area
+) {
+ int edge_flags = instance.flags & 0xff;
+ int brush_flags = (instance.flags >> 8) & 0xff;
+
+ // Fetch the segment of this brush primitive we are drawing.
+ vec4 segment_data;
+ RectWithSize segment_rect;
+ if (instance.segment_index == INVALID_SEGMENT_INDEX) {
+ segment_rect = ph.local_rect;
+ segment_data = vec4(0.0);
+ } else {
+ // This contraption is needed by the Mac GLSL compiler which falls
+ // over (generating garbage values) if:
+ // - we use a variable insead of the ACTUAL_VECS_PER_BRUSH define,
+ // - this compile time condition is done inside of vecs_per_brush.
+ #ifdef WR_FEATURE_MULTI_BRUSH
+ #define ACTUAL_VECS_PER_BRUSH vecs_per_brush(instance.brush_kind)
+ #else
+ #define ACTUAL_VECS_PER_BRUSH VECS_PER_SPECIFIC_BRUSH
+ #endif
+
+ int segment_address = ph.specific_prim_address +
+ ACTUAL_VECS_PER_BRUSH +
+ instance.segment_index * VECS_PER_SEGMENT;
+
+ vec4[2] segment_info = fetch_from_gpu_cache_2(segment_address);
+ segment_rect = RectWithSize(segment_info[0].xy, segment_info[0].zw);
+ segment_rect.p0 += ph.local_rect.p0;
+ segment_data = segment_info[1];
+ }
+
+ VertexInfo vi;
+
+ // Write the normal vertex information out.
+ if (transform.is_axis_aligned) {
+
+ // Select the corner of the local rect that we are processing.
+ vec2 local_pos = segment_rect.p0 + segment_rect.size * aPosition.xy;
+
+ vi = write_vertex(
+ local_pos,
+ ph.local_clip_rect,
+ ph.z,
+ transform,
+ pic_task
+ );
+
+ // TODO(gw): transform bounds may be referenced by
+ // the fragment shader when running in
+ // the alpha pass, even on non-transformed
+ // items. For now, just ensure it has no
+ // effect. We can tidy this up as we move
+ // more items to be brush shaders.
+#ifdef WR_FEATURE_ALPHA_PASS
+ init_transform_vs(vec4(vec2(-1.0e16), vec2(1.0e16)));
+#endif
+ } else {
+ bvec4 edge_mask = notEqual(edge_flags & ivec4(1, 2, 4, 8), ivec4(0));
+
+ vi = write_transform_vertex(
+ segment_rect,
+ ph.local_rect,
+ ph.local_clip_rect,
+ mix(vec4(0.0), vec4(1.0), edge_mask),
+ ph.z,
+ transform,
+ pic_task
+ );
+ }
+
+ // For brush instances in the alpha pass, always write
+ // out clip information.
+ // TODO(gw): It's possible that we might want alpha
+ // shaders that don't clip in the future,
+ // but it's reasonable to assume that one
+ // implies the other, for now.
+#ifdef WR_FEATURE_ALPHA_PASS
+ write_clip(
+ vi.world_pos,
+ clip_area
+ );
+#endif
+
+ // Run the specific brush VS code to write interpolators.
+#ifdef WR_FEATURE_MULTI_BRUSH
+ v_brush_kind = instance.brush_kind;
+ multi_brush_vs(
+ vi,
+ ph.specific_prim_address,
+ ph.local_rect,
+ segment_rect,
+ ph.user_data,
+ instance.resource_address,
+ transform.m,
+ pic_task,
+ brush_flags,
+ segment_data,
+ instance.brush_kind
+ );
+#else
+ WR_BRUSH_VS_FUNCTION(
+ vi,
+ ph.specific_prim_address,
+ ph.local_rect,
+ segment_rect,
+ ph.user_data,
+ instance.resource_address,
+ transform.m,
+ pic_task,
+ brush_flags,
+ segment_data
+ );
+#endif
+
+}
+
+#ifndef WR_VERTEX_SHADER_MAIN_FUNCTION
+// If the entry-point was not overridden before including the brush shader,
+// use the default one.
+#define WR_VERTEX_SHADER_MAIN_FUNCTION brush_shader_main_vs
+#endif
+
+void main(void) {
+
+ Instance instance = decode_instance_attributes();
+ PrimitiveHeader ph = fetch_prim_header(instance.prim_header_address);
+ Transform transform = fetch_transform(ph.transform_id);
+ PictureTask task = fetch_picture_task(instance.picture_task_address);
+ ClipArea clip_area = fetch_clip_area(instance.clip_address);
+
+ WR_VERTEX_SHADER_MAIN_FUNCTION(instance, ph, transform, task, clip_area);
+}
+
+#endif // WR_VERTEX_SHADER
+
+#ifdef WR_FRAGMENT_SHADER
+
+// Foward-declare all brush entry-points.
+Fragment image_brush_fs();
+Fragment solid_brush_fs();
+Fragment blend_brush_fs();
+Fragment mix_blend_brush_fs();
+Fragment linear_gradient_brush_fs();
+Fragment radial_gradient_brush_fs();
+Fragment conic_gradient_brush_fs();
+Fragment yuv_brush_fs();
+Fragment opacity_brush_fs();
+Fragment text_brush_fs();
+Fragment multi_brush_fs(int brush_kind);
+
+void main(void) {
+#ifdef WR_FEATURE_DEBUG_OVERDRAW
+ oFragColor = WR_DEBUG_OVERDRAW_COLOR;
+#else
+
+ // Run the specific brush FS code to output the color.
+#ifdef WR_FEATURE_MULTI_BRUSH
+ Fragment frag = multi_brush_fs(v_brush_kind);
+#else
+ Fragment frag = WR_BRUSH_FS_FUNCTION();
+#endif
+
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ // Apply the clip mask
+ float clip_alpha = do_clip();
+
+ frag.color *= clip_alpha;
+
+ #ifdef WR_FEATURE_DUAL_SOURCE_BLENDING
+ oFragBlend = frag.blend * clip_alpha;
+ #endif
+#endif
+
+ write_output(frag.color);
+#endif
+}
+#endif
diff --git a/third_party/webrender/webrender/res/brush_blend.glsl b/third_party/webrender/webrender/res/brush_blend.glsl
new file mode 100644
index 00000000000..c871c390d28
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush_blend.glsl
@@ -0,0 +1,335 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define VECS_PER_BLEND_BRUSH 3
+#define VECS_PER_SPECIFIC_BRUSH VECS_PER_BLEND_BRUSH
+
+#define WR_BRUSH_VS_FUNCTION blend_brush_vs
+#define WR_BRUSH_FS_FUNCTION blend_brush_fs
+
+#define COMPONENT_TRANSFER_IDENTITY 0
+#define COMPONENT_TRANSFER_TABLE 1
+#define COMPONENT_TRANSFER_DISCRETE 2
+#define COMPONENT_TRANSFER_LINEAR 3
+#define COMPONENT_TRANSFER_GAMMA 4
+
+// Must be kept in sync with `Filter::as_int` in internal_types.rs
+// Not all filters are defined here because some filter use different shaders.
+#define FILTER_CONTRAST 0
+#define FILTER_GRAYSCALE 1
+#define FILTER_HUE_ROTATE 2
+#define FILTER_INVERT 3
+#define FILTER_SATURATE 4
+#define FILTER_SEPIA 5
+#define FILTER_BRIGHTNESS 6
+#define FILTER_COLOR_MATRIX 7
+#define FILTER_SRGB_TO_LINEAR 8
+#define FILTER_LINEAR_TO_SRGB 9
+#define FILTER_FLOOD 10
+#define FILTER_COMPONENT_TRANSFER 11
+
+#include shared,prim_shared,brush
+
+// Interpolated UV coordinates to sample.
+#define V_UV varying_vec4_0.zw
+#define V_LOCAL_POS varying_vec4_0.xy
+
+#define V_FLOOD_COLOR flat_varying_vec4_1
+
+// Normalized bounds of the source image in the texture.
+#define V_UV_BOUNDS flat_varying_vec4_2
+
+#define V_COLOR_OFFSET flat_varying_vec4_3
+
+// Layer index to sample.
+#define V_LAYER flat_varying_vec4_4.x
+// Flag to allow perspective interpolation of UV.
+#define V_PERSPECTIVE flat_varying_vec4_4.y
+
+#define V_AMOUNT flat_varying_vec4_4.z
+
+#define V_OP flat_varying_ivec4_0.x
+#define V_TABLE_ADDRESS flat_varying_ivec4_0.y
+
+flat varying mat4 vColorMat;
+
+flat varying int vFuncs[4];
+
+#ifdef WR_VERTEX_SHADER
+
+void blend_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize local_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 unused
+) {
+ ImageResource res = fetch_image_resource(prim_user_data.x);
+ vec2 uv0 = res.uv_rect.p0;
+ vec2 uv1 = res.uv_rect.p1;
+
+ vec2 texture_size = vec2(textureSize(sColor0, 0).xy);
+ vec2 f = (vi.local_pos - local_rect.p0) / local_rect.size;
+ f = get_image_quad_uv(prim_user_data.x, f);
+ vec2 uv = mix(uv0, uv1, f);
+ float perspective_interpolate = (brush_flags & BRUSH_FLAG_PERSPECTIVE_INTERPOLATION) != 0 ? 1.0 : 0.0;
+
+ V_UV = uv / texture_size * mix(vi.world_pos.w, 1.0, perspective_interpolate);
+ V_LAYER = res.layer;
+ V_PERSPECTIVE = perspective_interpolate;
+
+ // TODO: The image shader treats this differently: deflate the rect by half a pixel on each side and
+ // clamp the uv in the frame shader. Does it make sense to do the same here?
+ V_UV_BOUNDS = vec4(uv0, uv1) / texture_size.xyxy;
+ V_LOCAL_POS = vi.local_pos;
+
+ float lumR = 0.2126;
+ float lumG = 0.7152;
+ float lumB = 0.0722;
+ float oneMinusLumR = 1.0 - lumR;
+ float oneMinusLumG = 1.0 - lumG;
+ float oneMinusLumB = 1.0 - lumB;
+
+ float amount = float(prim_user_data.z) / 65536.0;
+ float invAmount = 1.0 - amount;
+
+ V_OP = prim_user_data.y & 0xffff;
+ V_AMOUNT = amount;
+
+ // This assignment is only used for component transfer filters but this
+ // assignment has to be done here and not in the component transfer case
+ // below because it doesn't get executed on Windows because of a suspected
+ // miscompile of this shader on Windows. See
+ // https://github.com/servo/webrender/wiki/Driver-issues#bug-1505871---assignment-to-varying-flat-arrays-inside-switch-statement-of-vertex-shader-suspected-miscompile-on-windows
+ // default: just to satisfy angle_shader_validation.rs which needs one
+ // default: for every switch, even in comments.
+ vFuncs[0] = (prim_user_data.y >> 28) & 0xf; // R
+ vFuncs[1] = (prim_user_data.y >> 24) & 0xf; // G
+ vFuncs[2] = (prim_user_data.y >> 20) & 0xf; // B
+ vFuncs[3] = (prim_user_data.y >> 16) & 0xf; // A
+
+ switch (V_OP) {
+ case FILTER_GRAYSCALE: {
+ vColorMat = mat4(
+ vec4(lumR + oneMinusLumR * invAmount, lumR - lumR * invAmount, lumR - lumR * invAmount, 0.0),
+ vec4(lumG - lumG * invAmount, lumG + oneMinusLumG * invAmount, lumG - lumG * invAmount, 0.0),
+ vec4(lumB - lumB * invAmount, lumB - lumB * invAmount, lumB + oneMinusLumB * invAmount, 0.0),
+ vec4(0.0, 0.0, 0.0, 1.0)
+ );
+ V_COLOR_OFFSET = vec4(0.0);
+ break;
+ }
+ case FILTER_HUE_ROTATE: {
+ float c = cos(amount);
+ float s = sin(amount);
+ vColorMat = mat4(
+ vec4(lumR + oneMinusLumR * c - lumR * s, lumR - lumR * c + 0.143 * s, lumR - lumR * c - oneMinusLumR * s, 0.0),
+ vec4(lumG - lumG * c - lumG * s, lumG + oneMinusLumG * c + 0.140 * s, lumG - lumG * c + lumG * s, 0.0),
+ vec4(lumB - lumB * c + oneMinusLumB * s, lumB - lumB * c - 0.283 * s, lumB + oneMinusLumB * c + lumB * s, 0.0),
+ vec4(0.0, 0.0, 0.0, 1.0)
+ );
+ V_COLOR_OFFSET = vec4(0.0);
+ break;
+ }
+ case FILTER_SATURATE: {
+ vColorMat = mat4(
+ vec4(invAmount * lumR + amount, invAmount * lumR, invAmount * lumR, 0.0),
+ vec4(invAmount * lumG, invAmount * lumG + amount, invAmount * lumG, 0.0),
+ vec4(invAmount * lumB, invAmount * lumB, invAmount * lumB + amount, 0.0),
+ vec4(0.0, 0.0, 0.0, 1.0)
+ );
+ V_COLOR_OFFSET = vec4(0.0);
+ break;
+ }
+ case FILTER_SEPIA: {
+ vColorMat = mat4(
+ vec4(0.393 + 0.607 * invAmount, 0.349 - 0.349 * invAmount, 0.272 - 0.272 * invAmount, 0.0),
+ vec4(0.769 - 0.769 * invAmount, 0.686 + 0.314 * invAmount, 0.534 - 0.534 * invAmount, 0.0),
+ vec4(0.189 - 0.189 * invAmount, 0.168 - 0.168 * invAmount, 0.131 + 0.869 * invAmount, 0.0),
+ vec4(0.0, 0.0, 0.0, 1.0)
+ );
+ V_COLOR_OFFSET = vec4(0.0);
+ break;
+ }
+ case FILTER_COLOR_MATRIX: {
+ vec4 mat_data[4] = fetch_from_gpu_cache_4(prim_user_data.z);
+ vec4 offset_data = fetch_from_gpu_cache_1(prim_user_data.z + 4);
+ vColorMat = mat4(mat_data[0], mat_data[1], mat_data[2], mat_data[3]);
+ V_COLOR_OFFSET = offset_data;
+ break;
+ }
+ case FILTER_COMPONENT_TRANSFER: {
+ V_TABLE_ADDRESS = prim_user_data.z;
+ break;
+ }
+ case FILTER_FLOOD: {
+ V_FLOOD_COLOR = fetch_from_gpu_cache_1(prim_user_data.z);
+ break;
+ }
+ default: break;
+ }
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+vec3 Contrast(vec3 Cs, float amount) {
+ return Cs.rgb * amount - 0.5 * amount + 0.5;
+}
+
+vec3 Invert(vec3 Cs, float amount) {
+ return mix(Cs.rgb, vec3(1.0) - Cs.rgb, amount);
+}
+
+vec3 Brightness(vec3 Cs, float amount) {
+ // Apply the brightness factor.
+ // Resulting color needs to be clamped to output range
+ // since we are pre-multiplying alpha in the shader.
+ return clamp(Cs.rgb * amount, vec3(0.0), vec3(1.0));
+}
+
+// Based on the Gecko's implementation in
+// https://hg.mozilla.org/mozilla-central/file/91b4c3687d75/gfx/src/FilterSupport.cpp#l24
+// These could be made faster by sampling a lookup table stored in a float texture
+// with linear interpolation.
+
+vec3 SrgbToLinear(vec3 color) {
+ vec3 c1 = color / 12.92;
+ vec3 c2 = pow(color / 1.055 + vec3(0.055 / 1.055), vec3(2.4));
+ return if_then_else(lessThanEqual(color, vec3(0.04045)), c1, c2);
+}
+
+vec3 LinearToSrgb(vec3 color) {
+ vec3 c1 = color * 12.92;
+ vec3 c2 = vec3(1.055) * pow(color, vec3(1.0 / 2.4)) - vec3(0.055);
+ return if_then_else(lessThanEqual(color, vec3(0.0031308)), c1, c2);
+}
+
+// This function has to be factored out due to the following issue:
+// https://github.com/servo/webrender/wiki/Driver-issues#bug-1532245---switch-statement-inside-control-flow-inside-switch-statement-fails-to-compile-on-some-android-phones
+// (and now the words "default: default:" so angle_shader_validation.rs passes)
+vec4 ComponentTransfer(vec4 colora) {
+ // We push a different amount of data to the gpu cache depending on the
+ // function type.
+ // Identity => 0 blocks
+ // Table/Discrete => 64 blocks (256 values)
+ // Linear => 1 block (2 values)
+ // Gamma => 1 block (3 values)
+ // We loop through the color components and increment the offset (for the
+ // next color component) into the gpu cache based on how many blocks that
+ // function type put into the gpu cache.
+ // Table/Discrete use a 256 entry look up table.
+ // Linear/Gamma are a simple calculation.
+ int offset = 0;
+ vec4 texel;
+ int k;
+
+ for (int i = 0; i < 4; i++) {
+ switch (vFuncs[i]) {
+ case COMPONENT_TRANSFER_IDENTITY:
+ break;
+ case COMPONENT_TRANSFER_TABLE:
+ case COMPONENT_TRANSFER_DISCRETE: {
+ // fetch value from lookup table
+ k = int(floor(colora[i]*255.0));
+ texel = fetch_from_gpu_cache_1(V_TABLE_ADDRESS + offset + k/4);
+ colora[i] = clamp(texel[k % 4], 0.0, 1.0);
+ // offset plus 256/4 blocks
+ offset = offset + 64;
+ break;
+ }
+ case COMPONENT_TRANSFER_LINEAR: {
+ // fetch the two values for use in the linear equation
+ texel = fetch_from_gpu_cache_1(V_TABLE_ADDRESS + offset);
+ colora[i] = clamp(texel[0] * colora[i] + texel[1], 0.0, 1.0);
+ // offset plus 1 block
+ offset = offset + 1;
+ break;
+ }
+ case COMPONENT_TRANSFER_GAMMA: {
+ // fetch the three values for use in the gamma equation
+ texel = fetch_from_gpu_cache_1(V_TABLE_ADDRESS + offset);
+ colora[i] = clamp(texel[0] * pow(colora[i], texel[1]) + texel[2], 0.0, 1.0);
+ // offset plus 1 block
+ offset = offset + 1;
+ break;
+ }
+ default:
+ // shouldn't happen
+ break;
+ }
+ }
+ return colora;
+}
+
+Fragment blend_brush_fs() {
+ float perspective_divisor = mix(gl_FragCoord.w, 1.0, V_PERSPECTIVE);
+ vec2 uv = V_UV * perspective_divisor;
+ vec4 Cs = texture(sColor0, vec3(uv, V_LAYER));
+
+ // Un-premultiply the input.
+ float alpha = Cs.a;
+ vec3 color = alpha != 0.0 ? Cs.rgb / alpha : Cs.rgb;
+
+ switch (V_OP) {
+ case FILTER_CONTRAST:
+ color = Contrast(color, V_AMOUNT);
+ break;
+ case FILTER_INVERT:
+ color = Invert(color, V_AMOUNT);
+ break;
+ case FILTER_BRIGHTNESS:
+ color = Brightness(color, V_AMOUNT);
+ break;
+ case FILTER_SRGB_TO_LINEAR:
+ color = SrgbToLinear(color);
+ break;
+ case FILTER_LINEAR_TO_SRGB:
+ color = LinearToSrgb(color);
+ break;
+ case FILTER_COMPONENT_TRANSFER: {
+ // Get the unpremultiplied color with alpha.
+ vec4 colora = vec4(color, alpha);
+ colora = ComponentTransfer(colora);
+ color = colora.rgb;
+ alpha = colora.a;
+ break;
+ }
+ case FILTER_FLOOD:
+ color = V_FLOOD_COLOR.rgb;
+ alpha = V_FLOOD_COLOR.a;
+ break;
+ default:
+ // Color matrix type filters (sepia, hue-rotate, etc...)
+ vec4 result = vColorMat * vec4(color, alpha) + V_COLOR_OFFSET;
+ result = clamp(result, vec4(0.0), vec4(1.0));
+ color = result.rgb;
+ alpha = result.a;
+ }
+
+ // Fail-safe to ensure that we don't sample outside the rendered
+ // portion of a blend source.
+ alpha *= min(point_inside_rect(uv, V_UV_BOUNDS.xy, V_UV_BOUNDS.zw),
+ init_transform_fs(V_LOCAL_POS));
+
+ // Pre-multiply the alpha into the output value.
+ return Fragment(alpha * vec4(color, 1.0));
+}
+#endif
+
+// Undef macro names that could be re-defined by other shaders.
+#undef V_UV
+#undef V_LOCAL_POS
+#undef V_FLOOD_COLOR
+#undef V_UV_BOUNDS
+#undef V_COLOR_OFFSET
+#undef V_AMOUNT
+#undef V_LAYER
+#undef V_PERSPECTIVE
+#undef V_OP
+#undef V_TABLE_ADDRESS
diff --git a/third_party/webrender/webrender/res/brush_conic_gradient.glsl b/third_party/webrender/webrender/res/brush_conic_gradient.glsl
new file mode 100644
index 00000000000..56bd3c25a97
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush_conic_gradient.glsl
@@ -0,0 +1,147 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define VECS_PER_CONIC_GRADIENT_BRUSH 2
+#define VECS_PER_SPECIFIC_BRUSH VECS_PER_CONIC_GRADIENT_BRUSH
+
+#define WR_BRUSH_VS_FUNCTION conic_gradient_brush_vs
+#define WR_BRUSH_FS_FUNCTION conic_gradient_brush_fs
+
+#include shared,prim_shared,brush
+
+#define V_GRADIENT_ADDRESS flat_varying_highp_int_address_0
+
+#define V_CENTER flat_varying_vec4_0.xy
+#define V_START_OFFSET flat_varying_vec4_0.z
+#define V_END_OFFSET flat_varying_vec4_0.w
+#define V_ANGLE flat_varying_vec4_1.w
+
+// Size of the gradient pattern's rectangle, used to compute horizontal and vertical
+// repetitions. Not to be confused with another kind of repetition of the pattern
+// which happens along the gradient stops.
+#define V_REPEATED_SIZE flat_varying_vec4_1.xy
+// Repetition along the gradient stops.
+#define V_GRADIENT_REPEAT flat_varying_vec4_1.z
+
+#define V_POS varying_vec4_0.zw
+
+#ifdef WR_FEATURE_ALPHA_PASS
+#define V_LOCAL_POS varying_vec4_0.xy
+#define V_TILE_REPEAT flat_varying_vec4_2.xy
+#endif
+
+#define PI 3.141592653589793
+
+#ifdef WR_VERTEX_SHADER
+
+struct ConicGradient {
+ vec2 center_point;
+ vec2 start_end_offset;
+ float angle;
+ int extend_mode;
+ vec2 stretch_size;
+};
+
+ConicGradient fetch_gradient(int address) {
+ vec4 data[2] = fetch_from_gpu_cache_2(address);
+ return ConicGradient(
+ data[0].xy,
+ data[0].zw,
+ float(data[1].x),
+ int(data[1].y),
+ data[1].zw
+ );
+}
+
+void conic_gradient_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize local_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 texel_rect
+) {
+ ConicGradient gradient = fetch_gradient(prim_address);
+
+ if ((brush_flags & BRUSH_FLAG_SEGMENT_RELATIVE) != 0) {
+ V_POS = (vi.local_pos - segment_rect.p0) / segment_rect.size;
+ V_POS = V_POS * (texel_rect.zw - texel_rect.xy) + texel_rect.xy;
+ V_POS = V_POS * local_rect.size;
+ } else {
+ V_POS = vi.local_pos - local_rect.p0;
+ }
+
+ V_CENTER = gradient.center_point;
+ V_ANGLE = gradient.angle;
+ V_START_OFFSET = gradient.start_end_offset.x;
+ V_END_OFFSET = gradient.start_end_offset.y;
+
+ vec2 tile_repeat = local_rect.size / gradient.stretch_size;
+ V_REPEATED_SIZE = gradient.stretch_size;
+
+ V_GRADIENT_ADDRESS = prim_user_data.x;
+
+ // Whether to repeat the gradient along the line instead of clamping.
+ V_GRADIENT_REPEAT = float(gradient.extend_mode != EXTEND_MODE_CLAMP);
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ V_TILE_REPEAT = tile_repeat;
+ V_LOCAL_POS = vi.local_pos;
+#endif
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+Fragment conic_gradient_brush_fs() {
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ // Handle top and left inflated edges (see brush_image).
+ vec2 local_pos = max(V_POS, vec2(0.0));
+
+ // Apply potential horizontal and vertical repetitions.
+ vec2 pos = mod(local_pos, V_REPEATED_SIZE);
+
+ vec2 prim_size = V_REPEATED_SIZE * V_TILE_REPEAT;
+ // Handle bottom and right inflated edges (see brush_image).
+ if (local_pos.x >= prim_size.x) {
+ pos.x = V_REPEATED_SIZE.x;
+ }
+ if (local_pos.y >= prim_size.y) {
+ pos.y = V_REPEATED_SIZE.y;
+ }
+#else
+ // Apply potential horizontal and vertical repetitions.
+ vec2 pos = mod(V_POS, V_REPEATED_SIZE);
+#endif
+
+ vec2 current_dir = pos - V_CENTER;
+ float current_angle = atan(current_dir.y, current_dir.x) + (PI / 2.0 - V_ANGLE);
+ float offset = mod(current_angle / (2.0 * PI), 1.0) - V_START_OFFSET;
+ offset = offset / (V_END_OFFSET - V_START_OFFSET);
+
+ vec4 color = sample_gradient(V_GRADIENT_ADDRESS,
+ offset,
+ V_GRADIENT_REPEAT);
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ color *= init_transform_fs(V_LOCAL_POS);
+#endif
+
+ return Fragment(color);
+}
+#endif
+
+// Undef macro names that could be re-defined by other shaders.
+#undef V_GRADIENT_ADDRESS
+#undef V_START_POINT
+#undef V_SCALE_DIR
+#undef V_REPEATED_SIZE
+#undef V_GRADIENT_REPEAT
+#undef V_POS
+#undef V_LOCAL_POS
+#undef V_TILE_REPEAT
diff --git a/third_party/webrender/webrender/res/brush_image.glsl b/third_party/webrender/webrender/res/brush_image.glsl
new file mode 100644
index 00000000000..05ee9043e00
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush_image.glsl
@@ -0,0 +1,346 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define VECS_PER_IMAGE_BRUSH 3
+#define VECS_PER_SPECIFIC_BRUSH VECS_PER_IMAGE_BRUSH
+
+#define WR_BRUSH_VS_FUNCTION image_brush_vs
+#define WR_BRUSH_FS_FUNCTION image_brush_fs
+
+#include shared,prim_shared,brush
+
+#ifdef WR_FEATURE_ALPHA_PASS
+#define V_LOCAL_POS varying_vec4_0.xy
+#endif
+
+// Interpolated UV coordinates to sample.
+#define V_UV varying_vec4_0.zw
+
+#ifdef WR_FEATURE_ALPHA_PASS
+#define V_COLOR flat_varying_vec4_0
+#define V_MASK_SWIZZLE flat_varying_vec4_1.xy
+#define V_TILE_REPEAT flat_varying_vec4_1.zw
+#endif
+
+// Normalized bounds of the source image in the texture.
+#define V_UV_BOUNDS flat_varying_vec4_2
+// Normalized bounds of the source image in the texture, adjusted to avoid
+// sampling artifacts.
+#define V_UV_SAMPLE_BOUNDS flat_varying_vec4_3
+// Layer index to sample.
+#define V_LAYER flat_varying_vec4_4.x
+// Flag to allow perspective interpolation of UV.
+#define V_PERSPECTIVE flat_varying_vec4_4.y
+
+#ifdef WR_VERTEX_SHADER
+
+// Must match the AlphaType enum.
+#define BLEND_MODE_ALPHA 0
+#define BLEND_MODE_PREMUL_ALPHA 1
+
+struct ImageBrushData {
+ vec4 color;
+ vec4 background_color;
+ vec2 stretch_size;
+};
+
+ImageBrushData fetch_image_data(int address) {
+ vec4[3] raw_data = fetch_from_gpu_cache_3(address);
+ ImageBrushData data = ImageBrushData(
+ raw_data[0],
+ raw_data[1],
+ raw_data[2].xy
+ );
+ return data;
+}
+
+void image_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize prim_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 segment_data
+) {
+ ImageBrushData image_data = fetch_image_data(prim_address);
+
+ // If this is in WR_FEATURE_TEXTURE_RECT mode, the rect and size use
+ // non-normalized texture coordinates.
+#ifdef WR_FEATURE_TEXTURE_RECT
+ vec2 texture_size = vec2(1, 1);
+#else
+ vec2 texture_size = vec2(textureSize(sColor0, 0));
+#endif
+
+ ImageResource res = fetch_image_resource(specific_resource_address);
+ vec2 uv0 = res.uv_rect.p0;
+ vec2 uv1 = res.uv_rect.p1;
+
+ RectWithSize local_rect = prim_rect;
+ vec2 stretch_size = image_data.stretch_size;
+ if (stretch_size.x < 0.0) {
+ stretch_size = local_rect.size;
+ }
+
+ // If this segment should interpolate relative to the
+ // segment, modify the parameters for that.
+ if ((brush_flags & BRUSH_FLAG_SEGMENT_RELATIVE) != 0) {
+ local_rect = segment_rect;
+ stretch_size = local_rect.size;
+
+ // If the extra data is a texel rect, modify the UVs.
+ if ((brush_flags & BRUSH_FLAG_TEXEL_RECT) != 0) {
+ vec2 uv_size = res.uv_rect.p1 - res.uv_rect.p0;
+ uv0 = res.uv_rect.p0 + segment_data.xy * uv_size;
+ uv1 = res.uv_rect.p0 + segment_data.zw * uv_size;
+
+ // Size of the uv rect of the segment we are considering when computing
+ // the repetitions. In most case it is the current segment, but for the
+ // middle area we look at the border size instead.
+ vec2 segment_uv_size = uv1 - uv0;
+ #ifdef WR_FEATURE_REPETITION
+ // Value of the stretch size with repetition. We have to compute it for
+ // both axis even if we only repeat on one axis because the value for
+ // each axis depends on what the repeated value would have been for the
+ // other axis.
+ vec2 repeated_stretch_size = stretch_size;
+ // The repetition parameters for the middle area of a nine-patch are based
+ // on the size of the border segments rather than the middle segment itself,
+ // taking top and left by default, falling back to bottom and right when a
+ // size is empty.
+ // TODO(bug 1609893): Move this logic to the CPU as well as other sources of
+ // branchiness in this shader.
+ if ((brush_flags & BRUSH_FLAG_SEGMENT_NINEPATCH_MIDDLE) != 0) {
+ segment_uv_size = uv0 - res.uv_rect.p0;
+ repeated_stretch_size = segment_rect.p0 - prim_rect.p0;
+ float epsilon = 0.001;
+
+ if (segment_uv_size.x < epsilon || repeated_stretch_size.x < epsilon) {
+ segment_uv_size.x = res.uv_rect.p1.x - uv1.x;
+ repeated_stretch_size.x = prim_rect.p0.x + prim_rect.size.x
+ - segment_rect.p0.x - segment_rect.size.x;
+ }
+
+ if (segment_uv_size.y < epsilon || repeated_stretch_size.y < epsilon) {
+ segment_uv_size.y = res.uv_rect.p1.y - uv1.y;
+ repeated_stretch_size.y = prim_rect.p0.y + prim_rect.size.y
+ - segment_rect.p0.y - segment_rect.size.y;
+ }
+ }
+
+ if ((brush_flags & BRUSH_FLAG_SEGMENT_REPEAT_X) != 0) {
+ stretch_size.x = repeated_stretch_size.y / segment_uv_size.y * segment_uv_size.x;
+ }
+ if ((brush_flags & BRUSH_FLAG_SEGMENT_REPEAT_Y) != 0) {
+ stretch_size.y = repeated_stretch_size.x / segment_uv_size.x * segment_uv_size.y;
+ }
+ #endif
+
+ } else {
+ #ifdef WR_FEATURE_REPETITION
+ if ((brush_flags & BRUSH_FLAG_SEGMENT_REPEAT_X) != 0) {
+ stretch_size.x = segment_data.z - segment_data.x;
+ }
+ if ((brush_flags & BRUSH_FLAG_SEGMENT_REPEAT_Y) != 0) {
+ stretch_size.y = segment_data.w - segment_data.y;
+ }
+ #endif
+ }
+
+ #ifdef WR_FEATURE_REPETITION
+ if ((brush_flags & BRUSH_FLAG_SEGMENT_REPEAT_X_ROUND) != 0) {
+ float nx = max(1.0, round(segment_rect.size.x / stretch_size.x));
+ stretch_size.x = segment_rect.size.x / nx;
+ }
+ if ((brush_flags & BRUSH_FLAG_SEGMENT_REPEAT_Y_ROUND) != 0) {
+ float ny = max(1.0, round(segment_rect.size.y / stretch_size.y));
+ stretch_size.y = segment_rect.size.y / ny;
+ }
+ #endif
+ }
+
+ float perspective_interpolate = (brush_flags & BRUSH_FLAG_PERSPECTIVE_INTERPOLATION) != 0 ? 1.0 : 0.0;
+ V_LAYER = res.layer;
+ V_PERSPECTIVE = perspective_interpolate;
+
+ // Handle case where the UV coords are inverted (e.g. from an
+ // external image).
+ vec2 min_uv = min(uv0, uv1);
+ vec2 max_uv = max(uv0, uv1);
+
+ V_UV_SAMPLE_BOUNDS = vec4(
+ min_uv + vec2(0.5),
+ max_uv - vec2(0.5)
+ ) / texture_size.xyxy;
+
+ vec2 f = (vi.local_pos - local_rect.p0) / local_rect.size;
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ int color_mode = prim_user_data.x & 0xffff;
+ int blend_mode = prim_user_data.x >> 16;
+ int raster_space = prim_user_data.y;
+
+ if (color_mode == COLOR_MODE_FROM_PASS) {
+ color_mode = uMode;
+ }
+
+ // Derive the texture coordinates for this image, based on
+ // whether the source image is a local-space or screen-space
+ // image.
+ switch (raster_space) {
+ case RASTER_SCREEN: {
+ // Since the screen space UVs specify an arbitrary quad, do
+ // a bilinear interpolation to get the correct UV for this
+ // local position.
+ f = get_image_quad_uv(specific_resource_address, f);
+ break;
+ }
+ default:
+ break;
+ }
+#endif
+
+ // Offset and scale V_UV here to avoid doing it in the fragment shader.
+ vec2 repeat = local_rect.size / stretch_size;
+ V_UV = mix(uv0, uv1, f) - min_uv;
+ V_UV /= texture_size;
+ V_UV *= repeat.xy;
+ if (perspective_interpolate == 0.0) {
+ V_UV *= vi.world_pos.w;
+ }
+
+#ifdef WR_FEATURE_TEXTURE_RECT
+ V_UV_BOUNDS = vec4(0.0, 0.0, vec2(textureSize(sColor0)));
+#else
+ V_UV_BOUNDS = vec4(min_uv, max_uv) / texture_size.xyxy;
+#endif
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ V_TILE_REPEAT = repeat.xy;
+
+ float opacity = float(prim_user_data.z) / 65535.0;
+ switch (blend_mode) {
+ case BLEND_MODE_ALPHA:
+ image_data.color.a *= opacity;
+ break;
+ case BLEND_MODE_PREMUL_ALPHA:
+ default:
+ image_data.color *= opacity;
+ break;
+ }
+
+ switch (color_mode) {
+ case COLOR_MODE_ALPHA:
+ case COLOR_MODE_BITMAP:
+ V_MASK_SWIZZLE = vec2(0.0, 1.0);
+ V_COLOR = image_data.color;
+ break;
+ case COLOR_MODE_SUBPX_BG_PASS2:
+ case COLOR_MODE_SUBPX_DUAL_SOURCE:
+ case COLOR_MODE_IMAGE:
+ V_MASK_SWIZZLE = vec2(1.0, 0.0);
+ V_COLOR = image_data.color;
+ break;
+ case COLOR_MODE_SUBPX_CONST_COLOR:
+ case COLOR_MODE_SUBPX_BG_PASS0:
+ case COLOR_MODE_COLOR_BITMAP:
+ V_MASK_SWIZZLE = vec2(1.0, 0.0);
+ V_COLOR = vec4(image_data.color.a);
+ break;
+ case COLOR_MODE_SUBPX_BG_PASS1:
+ V_MASK_SWIZZLE = vec2(-1.0, 1.0);
+ V_COLOR = vec4(image_data.color.a) * image_data.background_color;
+ break;
+ default:
+ V_MASK_SWIZZLE = vec2(0.0);
+ V_COLOR = vec4(1.0);
+ }
+
+ V_LOCAL_POS = vi.local_pos;
+#endif
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+
+vec2 compute_repeated_uvs(float perspective_divisor) {
+ vec2 uv_size = V_UV_BOUNDS.zw - V_UV_BOUNDS.xy;
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ // This prevents the uv on the top and left parts of the primitive that was inflated
+ // for anti-aliasing purposes from going beyound the range covered by the regular
+ // (non-inflated) primitive.
+ vec2 local_uv = max(V_UV * perspective_divisor, vec2(0.0));
+
+ // Handle horizontal and vertical repetitions.
+ vec2 repeated_uv = mod(local_uv, uv_size) + V_UV_BOUNDS.xy;
+
+ // This takes care of the bottom and right inflated parts.
+ // We do it after the modulo because the latter wraps around the values exactly on
+ // the right and bottom edges, which we do not want.
+ if (local_uv.x >= V_TILE_REPEAT.x * uv_size.x) {
+ repeated_uv.x = V_UV_BOUNDS.z;
+ }
+ if (local_uv.y >= V_TILE_REPEAT.y * uv_size.y) {
+ repeated_uv.y = V_UV_BOUNDS.w;
+ }
+#else
+ vec2 repeated_uv = mod(V_UV * perspective_divisor, uv_size) + V_UV_BOUNDS.xy;
+#endif
+
+ return repeated_uv;
+}
+
+Fragment image_brush_fs() {
+ float perspective_divisor = mix(gl_FragCoord.w, 1.0, V_PERSPECTIVE);
+
+#ifdef WR_FEATURE_REPETITION
+ vec2 repeated_uv = compute_repeated_uvs(perspective_divisor);
+#else
+ vec2 repeated_uv = V_UV * perspective_divisor + V_UV_BOUNDS.xy;
+#endif
+
+ // Clamp the uvs to avoid sampling artifacts.
+ vec2 uv = clamp(repeated_uv, V_UV_SAMPLE_BOUNDS.xy, V_UV_SAMPLE_BOUNDS.zw);
+
+ vec4 texel = TEX_SAMPLE(sColor0, vec3(uv, V_LAYER));
+
+ Fragment frag;
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ #ifdef WR_FEATURE_ANTIALIASING
+ float alpha = init_transform_fs(V_LOCAL_POS);
+ #else
+ float alpha = 1.0;
+ #endif
+ texel.rgb = texel.rgb * V_MASK_SWIZZLE.x + texel.aaa * V_MASK_SWIZZLE.y;
+
+ vec4 alpha_mask = texel * alpha;
+ frag.color = V_COLOR * alpha_mask;
+
+ #ifdef WR_FEATURE_DUAL_SOURCE_BLENDING
+ frag.blend = alpha_mask * V_COLOR.a;
+ #endif
+#else
+ frag.color = texel;
+#endif
+
+ return frag;
+}
+#endif
+
+// Undef macro names that could be re-defined by other shaders.
+#undef V_LOCAL_POS
+#undef V_UV
+#undef V_COLOR
+#undef V_MASK_SWIZZLE
+#undef V_TILE_REPEAT
+#undef V_UV_BOUNDS
+#undef V_UV_SAMPLE_BOUNDS
+#undef V_LAYER
+#undef V_PERSPECTIVE
diff --git a/third_party/webrender/webrender/res/brush_linear_gradient.glsl b/third_party/webrender/webrender/res/brush_linear_gradient.glsl
new file mode 100644
index 00000000000..6e6933252cd
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush_linear_gradient.glsl
@@ -0,0 +1,137 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define VECS_PER_LINEAR_GRADIENT_BRUSH 2
+#define VECS_PER_SPECIFIC_BRUSH VECS_PER_LINEAR_GRADIENT_BRUSH
+
+#define WR_BRUSH_VS_FUNCTION linear_gradient_brush_vs
+#define WR_BRUSH_FS_FUNCTION linear_gradient_brush_fs
+
+#include shared,prim_shared,brush
+
+#define V_GRADIENT_ADDRESS flat_varying_highp_int_address_0
+
+#define V_START_POINT flat_varying_vec4_0.xy
+#define V_SCALE_DIR flat_varying_vec4_0.zw
+// Size of the gradient pattern's rectangle, used to compute horizontal and vertical
+// repetitions. Not to be confused with another kind of repetition of the pattern
+// which happens along the gradient stops.
+#define V_REPEATED_SIZE flat_varying_vec4_1.xy
+// Repetition along the gradient stops.
+#define V_GRADIENT_REPEAT flat_varying_vec4_1.z
+
+#define V_POS varying_vec4_0.zw
+
+#ifdef WR_FEATURE_ALPHA_PASS
+#define V_LOCAL_POS varying_vec4_0.xy
+#define V_TILE_REPEAT flat_varying_vec4_2.xy
+#endif
+
+#ifdef WR_VERTEX_SHADER
+
+struct Gradient {
+ vec4 start_end_point;
+ int extend_mode;
+ vec2 stretch_size;
+};
+
+Gradient fetch_gradient(int address) {
+ vec4 data[2] = fetch_from_gpu_cache_2(address);
+ return Gradient(
+ data[0],
+ int(data[1].x),
+ data[1].yz
+ );
+}
+
+void linear_gradient_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize local_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 texel_rect
+) {
+ Gradient gradient = fetch_gradient(prim_address);
+
+ if ((brush_flags & BRUSH_FLAG_SEGMENT_RELATIVE) != 0) {
+ V_POS = (vi.local_pos - segment_rect.p0) / segment_rect.size;
+ V_POS = V_POS * (texel_rect.zw - texel_rect.xy) + texel_rect.xy;
+ V_POS = V_POS * local_rect.size;
+ } else {
+ V_POS = vi.local_pos - local_rect.p0;
+ }
+
+ vec2 start_point = gradient.start_end_point.xy;
+ vec2 end_point = gradient.start_end_point.zw;
+ vec2 dir = end_point - start_point;
+
+ V_START_POINT = start_point;
+ V_SCALE_DIR = dir / dot(dir, dir);
+
+ vec2 tile_repeat = local_rect.size / gradient.stretch_size;
+ V_REPEATED_SIZE = gradient.stretch_size;
+
+ V_GRADIENT_ADDRESS = prim_user_data.x;
+
+ // Whether to repeat the gradient along the line instead of clamping.
+ V_GRADIENT_REPEAT = float(gradient.extend_mode != EXTEND_MODE_CLAMP);
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ V_TILE_REPEAT = tile_repeat;
+ V_LOCAL_POS = vi.local_pos;
+#endif
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+Fragment linear_gradient_brush_fs() {
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ // Handle top and left inflated edges (see brush_image).
+ vec2 local_pos = max(V_POS, vec2(0.0));
+
+ // Apply potential horizontal and vertical repetitions.
+ vec2 pos = mod(local_pos, V_REPEATED_SIZE);
+
+ vec2 prim_size = V_REPEATED_SIZE * V_TILE_REPEAT;
+ // Handle bottom and right inflated edges (see brush_image).
+ if (local_pos.x >= prim_size.x) {
+ pos.x = V_REPEATED_SIZE.x;
+ }
+ if (local_pos.y >= prim_size.y) {
+ pos.y = V_REPEATED_SIZE.y;
+ }
+#else
+ // Apply potential horizontal and vertical repetitions.
+ vec2 pos = mod(V_POS, V_REPEATED_SIZE);
+#endif
+
+ float offset = dot(pos - V_START_POINT, V_SCALE_DIR);
+
+ vec4 color = sample_gradient(V_GRADIENT_ADDRESS,
+ offset,
+ V_GRADIENT_REPEAT);
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ color *= init_transform_fs(V_LOCAL_POS);
+#endif
+
+ return Fragment(color);
+}
+#endif
+
+// Undef macro names that could be re-defined by other shaders.
+#undef V_GRADIENT_ADDRESS
+#undef V_START_POINT
+#undef V_SCALE_DIR
+#undef V_REPEATED_SIZE
+#undef V_GRADIENT_REPEAT
+#undef V_POS
+#undef V_LOCAL_POS
+#undef V_TILE_REPEAT
diff --git a/third_party/webrender/webrender/res/brush_mix_blend.glsl b/third_party/webrender/webrender/res/brush_mix_blend.glsl
new file mode 100644
index 00000000000..774f2fcb677
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush_mix_blend.glsl
@@ -0,0 +1,302 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define VECS_PER_MIX_BLEND_BRUSH 3
+#define VECS_PER_SPECIFIC_BRUSH VECS_PER_MIX_BLEND_BRUSH
+
+#define WR_BRUSH_VS_FUNCTION mix_blend_brush_vs
+#define WR_BRUSH_FS_FUNCTION mix_blend_brush_fs
+
+#include shared,prim_shared,brush
+
+#define V_SRC_UV varying_vec4_0.xy
+#define V_SRC_LAYER varying_vec4_0.w
+
+#define V_BACKDROP_UV varying_vec4_1.xy
+#define V_BACKDROP_LAYER varying_vec4_1.w
+
+#define V_OP flat_varying_ivec4_0.x
+
+#ifdef WR_VERTEX_SHADER
+
+void mix_blend_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize local_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 unused
+) {
+ //Note: this is unsafe for `vi.world_pos.w <= 0.0`
+ vec2 device_pos = vi.world_pos.xy * pic_task.device_pixel_scale / max(0.0, vi.world_pos.w);
+ vec2 texture_size = vec2(textureSize(sPrevPassColor, 0));
+ V_OP = prim_user_data.x;
+
+ PictureTask src_task = fetch_picture_task(prim_user_data.z);
+ vec2 src_device_pos = vi.world_pos.xy * (src_task.device_pixel_scale / max(0.0, vi.world_pos.w));
+ vec2 src_uv = src_device_pos +
+ src_task.common_data.task_rect.p0 -
+ src_task.content_origin;
+ V_SRC_UV = src_uv / texture_size;
+ V_SRC_LAYER = src_task.common_data.texture_layer_index;
+
+ RenderTaskCommonData backdrop_task = fetch_render_task_common_data(prim_user_data.y);
+ float src_to_backdrop_scale = pic_task.device_pixel_scale / src_task.device_pixel_scale;
+ vec2 backdrop_uv = device_pos +
+ backdrop_task.task_rect.p0 -
+ src_task.content_origin * src_to_backdrop_scale;
+ V_BACKDROP_UV = backdrop_uv / texture_size;
+ V_BACKDROP_LAYER = backdrop_task.texture_layer_index;
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+vec3 Multiply(vec3 Cb, vec3 Cs) {
+ return Cb * Cs;
+}
+
+vec3 Screen(vec3 Cb, vec3 Cs) {
+ return Cb + Cs - (Cb * Cs);
+}
+
+vec3 HardLight(vec3 Cb, vec3 Cs) {
+ vec3 m = Multiply(Cb, 2.0 * Cs);
+ vec3 s = Screen(Cb, 2.0 * Cs - 1.0);
+ vec3 edge = vec3(0.5, 0.5, 0.5);
+ return mix(m, s, step(edge, Cs));
+}
+
+// TODO: Worth doing with mix/step? Check GLSL output.
+float ColorDodge(float Cb, float Cs) {
+ if (Cb == 0.0)
+ return 0.0;
+ else if (Cs == 1.0)
+ return 1.0;
+ else
+ return min(1.0, Cb / (1.0 - Cs));
+}
+
+// TODO: Worth doing with mix/step? Check GLSL output.
+float ColorBurn(float Cb, float Cs) {
+ if (Cb == 1.0)
+ return 1.0;
+ else if (Cs == 0.0)
+ return 0.0;
+ else
+ return 1.0 - min(1.0, (1.0 - Cb) / Cs);
+}
+
+float SoftLight(float Cb, float Cs) {
+ if (Cs <= 0.5) {
+ return Cb - (1.0 - 2.0 * Cs) * Cb * (1.0 - Cb);
+ } else {
+ float D;
+
+ if (Cb <= 0.25)
+ D = ((16.0 * Cb - 12.0) * Cb + 4.0) * Cb;
+ else
+ D = sqrt(Cb);
+
+ return Cb + (2.0 * Cs - 1.0) * (D - Cb);
+ }
+}
+
+vec3 Difference(vec3 Cb, vec3 Cs) {
+ return abs(Cb - Cs);
+}
+
+vec3 Exclusion(vec3 Cb, vec3 Cs) {
+ return Cb + Cs - 2.0 * Cb * Cs;
+}
+
+// These functions below are taken from the spec.
+// There's probably a much quicker way to implement
+// them in GLSL...
+float Sat(vec3 c) {
+ return max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b));
+}
+
+float Lum(vec3 c) {
+ vec3 f = vec3(0.3, 0.59, 0.11);
+ return dot(c, f);
+}
+
+vec3 ClipColor(vec3 C) {
+ float L = Lum(C);
+ float n = min(C.r, min(C.g, C.b));
+ float x = max(C.r, max(C.g, C.b));
+
+ if (n < 0.0)
+ C = L + (((C - L) * L) / (L - n));
+
+ if (x > 1.0)
+ C = L + (((C - L) * (1.0 - L)) / (x - L));
+
+ return C;
+}
+
+vec3 SetLum(vec3 C, float l) {
+ float d = l - Lum(C);
+ return ClipColor(C + d);
+}
+
+void SetSatInner(inout float Cmin, inout float Cmid, inout float Cmax, float s) {
+ if (Cmax > Cmin) {
+ Cmid = (((Cmid - Cmin) * s) / (Cmax - Cmin));
+ Cmax = s;
+ } else {
+ Cmid = 0.0;
+ Cmax = 0.0;
+ }
+ Cmin = 0.0;
+}
+
+vec3 SetSat(vec3 C, float s) {
+ if (C.r <= C.g) {
+ if (C.g <= C.b) {
+ SetSatInner(C.r, C.g, C.b, s);
+ } else {
+ if (C.r <= C.b) {
+ SetSatInner(C.r, C.b, C.g, s);
+ } else {
+ SetSatInner(C.b, C.r, C.g, s);
+ }
+ }
+ } else {
+ if (C.r <= C.b) {
+ SetSatInner(C.g, C.r, C.b, s);
+ } else {
+ if (C.g <= C.b) {
+ SetSatInner(C.g, C.b, C.r, s);
+ } else {
+ SetSatInner(C.b, C.g, C.r, s);
+ }
+ }
+ }
+ return C;
+}
+
+vec3 Hue(vec3 Cb, vec3 Cs) {
+ return SetLum(SetSat(Cs, Sat(Cb)), Lum(Cb));
+}
+
+vec3 Saturation(vec3 Cb, vec3 Cs) {
+ return SetLum(SetSat(Cb, Sat(Cs)), Lum(Cb));
+}
+
+vec3 Color(vec3 Cb, vec3 Cs) {
+ return SetLum(Cs, Lum(Cb));
+}
+
+vec3 Luminosity(vec3 Cb, vec3 Cs) {
+ return SetLum(Cb, Lum(Cs));
+}
+
+const int MixBlendMode_Multiply = 1;
+const int MixBlendMode_Screen = 2;
+const int MixBlendMode_Overlay = 3;
+const int MixBlendMode_Darken = 4;
+const int MixBlendMode_Lighten = 5;
+const int MixBlendMode_ColorDodge = 6;
+const int MixBlendMode_ColorBurn = 7;
+const int MixBlendMode_HardLight = 8;
+const int MixBlendMode_SoftLight = 9;
+const int MixBlendMode_Difference = 10;
+const int MixBlendMode_Exclusion = 11;
+const int MixBlendMode_Hue = 12;
+const int MixBlendMode_Saturation = 13;
+const int MixBlendMode_Color = 14;
+const int MixBlendMode_Luminosity = 15;
+
+Fragment mix_blend_brush_fs() {
+ vec4 Cb = textureLod(sPrevPassColor, vec3(V_BACKDROP_UV, V_BACKDROP_LAYER), 0.0);
+ vec4 Cs = textureLod(sPrevPassColor, vec3(V_SRC_UV, V_SRC_LAYER), 0.0);
+
+ // The mix-blend-mode functions assume no premultiplied alpha
+ if (Cb.a != 0.0) {
+ Cb.rgb /= Cb.a;
+ }
+
+ if (Cs.a != 0.0) {
+ Cs.rgb /= Cs.a;
+ }
+
+ // Return yellow if none of the branches match (shouldn't happen).
+ vec4 result = vec4(1.0, 1.0, 0.0, 1.0);
+
+ switch (V_OP) {
+ case MixBlendMode_Multiply:
+ result.rgb = Multiply(Cb.rgb, Cs.rgb);
+ break;
+ case MixBlendMode_Screen:
+ result.rgb = Screen(Cb.rgb, Cs.rgb);
+ break;
+ case MixBlendMode_Overlay:
+ // Overlay is inverse of Hardlight
+ result.rgb = HardLight(Cs.rgb, Cb.rgb);
+ break;
+ case MixBlendMode_Darken:
+ result.rgb = min(Cs.rgb, Cb.rgb);
+ break;
+ case MixBlendMode_Lighten:
+ result.rgb = max(Cs.rgb, Cb.rgb);
+ break;
+ case MixBlendMode_ColorDodge:
+ result.r = ColorDodge(Cb.r, Cs.r);
+ result.g = ColorDodge(Cb.g, Cs.g);
+ result.b = ColorDodge(Cb.b, Cs.b);
+ break;
+ case MixBlendMode_ColorBurn:
+ result.r = ColorBurn(Cb.r, Cs.r);
+ result.g = ColorBurn(Cb.g, Cs.g);
+ result.b = ColorBurn(Cb.b, Cs.b);
+ break;
+ case MixBlendMode_HardLight:
+ result.rgb = HardLight(Cb.rgb, Cs.rgb);
+ break;
+ case MixBlendMode_SoftLight:
+ result.r = SoftLight(Cb.r, Cs.r);
+ result.g = SoftLight(Cb.g, Cs.g);
+ result.b = SoftLight(Cb.b, Cs.b);
+ break;
+ case MixBlendMode_Difference:
+ result.rgb = Difference(Cb.rgb, Cs.rgb);
+ break;
+ case MixBlendMode_Exclusion:
+ result.rgb = Exclusion(Cb.rgb, Cs.rgb);
+ break;
+ case MixBlendMode_Hue:
+ result.rgb = Hue(Cb.rgb, Cs.rgb);
+ break;
+ case MixBlendMode_Saturation:
+ result.rgb = Saturation(Cb.rgb, Cs.rgb);
+ break;
+ case MixBlendMode_Color:
+ result.rgb = Color(Cb.rgb, Cs.rgb);
+ break;
+ case MixBlendMode_Luminosity:
+ result.rgb = Luminosity(Cb.rgb, Cs.rgb);
+ break;
+ default: break;
+ }
+
+ result.rgb = (1.0 - Cb.a) * Cs.rgb + Cb.a * result.rgb;
+ result.a = Cs.a;
+
+ result.rgb *= result.a;
+
+ return Fragment(result);
+}
+#endif
+
+// Undef macro names that could be re-defined by other shaders.
+#undef V_SRC_UV
+#undef V_SRC_LAYER
+#undef V_BACKDROP_UV
+#undef V_BACKDROP_LAYER
+#undef V_OP
diff --git a/third_party/webrender/webrender/res/brush_multi.glsl b/third_party/webrender/webrender/res/brush_multi.glsl
new file mode 100644
index 00000000000..447186b1fcb
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush_multi.glsl
@@ -0,0 +1,296 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// The multi-brush shader is capable of rendering most types of brushes
+// if they are enabled via WR_FEATURE_*_BRUSH defines.
+// This type of uber-shader comes at a cost so the goal for this is to
+// provide opportunities for aggressive batching when the number of draw
+// calls so high that reducing the number of draw calls is worth the
+// cost of this "uber-shader".
+
+
+#define WR_FEATURE_MULTI_BRUSH
+
+// These constants must match the BrushShaderKind enum in gpu_types.rs.
+#define BRUSH_KIND_SOLID 1
+#define BRUSH_KIND_IMAGE 2
+#define BRUSH_KIND_TEXT 3
+#define BRUSH_KIND_LINEAR_GRADIENT 4
+#define BRUSH_KIND_RADIAL_GRADIENT 5
+#define BRUSH_KIND_CONIC_GRADIENT 6
+#define BRUSH_KIND_BLEND 7
+#define BRUSH_KIND_MIX_BLEND 8
+#define BRUSH_KIND_YV 9
+#define BRUSH_KIND_OPACITY 10
+
+int vecs_per_brush(int brush_kind);
+
+
+#ifdef WR_FEATURE_TEXT_BRUSH
+// Before including the brush source, if we need support for text we override
+// the vertex shader's main entry point with one that can call into the text
+// shader or the regular brush shaders.
+
+// Foward-declare the new entry point.
+void multi_brush_main_vs(
+ Instance instance,
+ PrimitiveHeader ph,
+ Transform transform,
+ PictureTask pic_task,
+ ClipArea clip_area
+);
+
+// Override the default entry point.
+#define WR_VERTEX_SHADER_MAIN_FUNCTION multi_brush_main_vs
+
+#endif
+
+
+#include shared,prim_shared,brush
+
+
+#ifdef WR_FEATURE_IMAGE_BRUSH
+#include brush_image
+#endif
+
+#undef VECS_PER_SPECIFIC_BRUSH
+#undef WR_BRUSH_VS_FUNCTION
+#undef WR_BRUSH_FS_FUNCTION
+
+#ifdef WR_FEATURE_SOLID_BRUSH
+#include brush_solid
+#endif
+
+#undef VECS_PER_SPECIFIC_BRUSH
+#undef WR_BRUSH_VS_FUNCTION
+#undef WR_BRUSH_FS_FUNCTION
+
+#ifdef WR_FEATURE_BLEND_BRUSH
+#include brush_blend
+#endif
+
+#undef VECS_PER_SPECIFIC_BRUSH
+#undef WR_BRUSH_VS_FUNCTION
+#undef WR_BRUSH_FS_FUNCTION
+
+#ifdef WR_FEATURE_MIX_BLEND_BRUSH
+#include brush_mix_blend
+#endif
+
+#undef VECS_PER_SPECIFIC_BRUSH
+#undef WR_BRUSH_VS_FUNCTION
+#undef WR_BRUSH_FS_FUNCTION
+
+#ifdef WR_FEATURE_LINEAR_GRADIENT_BRUSH
+#include brush_linear_gradient
+#endif
+
+#undef VECS_PER_SPECIFIC_BRUSH
+#undef WR_BRUSH_VS_FUNCTION
+#undef WR_BRUSH_FS_FUNCTION
+
+#ifdef WR_FEATURE_RADIAL_GRADIENT_BRUSH
+#include brush_radial_gradient
+#endif
+
+#undef VECS_PER_SPECIFIC_BRUSH
+#undef WR_BRUSH_VS_FUNCTION
+#undef WR_BRUSH_FS_FUNCTION
+
+#ifdef WR_FEATURE_CONIC_GRADIENT_BRUSH
+#include brush_conic_gradient
+#endif
+
+#undef VECS_PER_SPECIFIC_BRUSH
+#undef WR_BRUSH_VS_FUNCTION
+#undef WR_BRUSH_FS_FUNCTION
+
+#ifdef WR_FEATURE_OPACITY_BRUSH
+#include brush_opacity
+#endif
+
+#undef VECS_PER_SPECIFIC_BRUSH
+#undef WR_BRUSH_VS_FUNCTION
+#undef WR_BRUSH_FS_FUNCTION
+
+#ifdef WR_FEATURE_TEXT_BRUSH
+#include ps_text_run
+
+// Special entry point when text support is needed.
+void multi_brush_main_vs(
+ Instance instance,
+ PrimitiveHeader ph,
+ Transform transform,
+ PictureTask pic_task,
+ ClipArea clip_area
+) {
+ if (instance.brush_kind == BRUSH_SHADER_KIND_TEXT) {
+ text_shader_main(instance, ph, transform, task, clip_area);
+ } else {
+ brush_shader_main(instance, ph, transform, task, clip_area);
+ }
+}
+
+#endif
+
+int vecs_per_brush(int brush_kind) {
+ switch (brush_kind) {
+ // The default arm should never be taken, we let it point to whichever shader
+ // is enabled first to satisfy ANGLE validation.
+ default:
+
+ #ifdef WR_FEATURE_IMAGE_BRUSH
+ case BRUSH_KIND_IMAGE: return VECS_PER_IMAGE_BRUSH;
+ #endif
+
+ #ifdef WR_FEATURE_IMAGE_BRUSH
+ case BRUSH_KIND_SOLID: return VECS_PER_SOLID_BRUSH;
+ #endif
+
+ #ifdef WR_FEATURE_BLEND_BRUSH
+ case BRUSH_KIND_BLEND: return VECS_PER_BLEND_BRUSH;
+ #endif
+
+ #ifdef WR_FEATURE_MIX_BLEND_BRUSH
+ case BRUSH_KIND_MIX_BLEND: return VECS_PER_MIX_BLEND_BRUSH;
+ #endif
+
+ #ifdef WR_FEATURE_LINEAR_GRADIENT_BRUSH
+ case BRUSH_KIND_LINEAR_GRADIENT: return VECS_PER_LINEAR_GRADIENT_BRUSH;
+ #endif
+
+ #ifdef WR_FEATURE_RADIAL_GRADIENT_BRUSH
+ case BRUSH_KIND_RADIAL_GRADIENT: return VECS_PER_RADIAL_GRADIENT_BRUSH;
+ #endif
+
+
+ #ifdef WR_FEATURE_CONIC_GRADIENT_BRUSH
+ case BRUSH_KIND_CONIC_GRADIENT: return VECS_PER_CONIC_GRADIENT_BRUSH;
+ #endif
+
+ #ifdef WR_FEATURE_OPACITY_BRUSH
+ case BRUSH_KIND_OPACITY: return VECS_PER_OPACITY_BRUSH;
+ #endif
+ }
+}
+
+#define BRUSH_VS_PARAMS vi, prim_address, local_rect, segment_rect, \
+ prim_user_data, specific_resource_address, transform, pic_task, \
+ brush_flags, texel_rect
+
+
+#ifdef WR_VERTEX_SHADER
+void multi_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize local_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 texel_rect,
+ int brush_kind
+) {
+ switch (brush_kind) {
+ default:
+
+ #ifdef WR_FEATURE_IMAGE_BRUSH
+ case BRUSH_KIND_IMAGE:
+ image_brush_vs(BRUSH_VS_PARAMS);
+ break;
+ #endif
+
+ #ifdef WR_FEATURE_SOLID_BRUSH
+ case BRUSH_KIND_SOLID:
+ solid_brush_vs(BRUSH_VS_PARAMS);
+ break;
+ #endif
+
+ #ifdef WR_FEATURE_BLEND_BRUSH
+ case BRUSH_KIND_BLEND:
+ blend_brush_vs(BRUSH_VS_PARAMS);
+ break;
+ #endif
+
+ #ifdef WR_FEATURE_MIX_BLEND_BRUSH
+ case BRUSH_KIND_MIX_BLEND:
+ mix_blend_brush_vs(BRUSH_VS_PARAMS);
+ break;
+ #endif
+
+ #ifdef WR_FEATURE_LINEAR_GRADIENT_BRUSH
+ case BRUSH_KIND_LINEAR_GRADIENT:
+ linear_gradient_brush_vs(BRUSH_VS_PARAMS);
+ break;
+ #endif
+
+ #ifdef WR_FEATURE_RADIAL_GRADIENT_BRUSH
+ case BRUSH_KIND_RADIAL_GRADIENT:
+ radial_gradient_brush_vs(BRUSH_VS_PARAMS);
+ break;
+ #endif
+
+ #ifdef WR_FEATURE_CONIC_GRADIENT_BRUSH
+ case BRUSH_KIND_CONIC_GRADIENT:
+ conic_gradient_brush_vs(BRUSH_VS_PARAMS);
+ break;
+ #endif
+
+ #ifdef WR_FEATURE_OPACITY_BRUSH
+ case BRUSH_KIND_OPACITY:
+ opacity_brush_vs(BRUSH_VS_PARAMS);
+ break;
+ #endif
+ }
+}
+
+#endif // WR_VERTEX_SHADER
+
+#ifdef WR_FRAGMENT_SHADER
+
+Fragment multi_brush_fs(int brush_kind) {
+ switch (brush_kind) {
+ default:
+
+ #ifdef WR_FEATURE_IMAGE_BRUSH
+ case BRUSH_KIND_IMAGE: return image_brush_fs();
+ #endif
+
+ #ifdef WR_FEATURE_SOLID_BRUSH
+ case BRUSH_KIND_SOLID: return solid_brush_fs();
+ #endif
+
+ #ifdef WR_FEATURE_BLEND_BRUSH
+ case BRUSH_KIND_BLEND: return blend_brush_fs();
+ #endif
+
+ #ifdef WR_FEATURE_MIX_BLEND_BRUSH
+ case BRUSH_KIND_MIX_BLEND: return mix_blend_brush_fs();
+ #endif
+
+ #ifdef WR_FEATURE_LINEAR_GRADIENT_BRUSH
+ case BRUSH_KIND_LINEAR_GRADIENT: return linear_gradient_brush_fs();
+ #endif
+
+ #ifdef WR_FEATURE_RADIAL_GRADIENT_BRUSH
+ case BRUSH_KIND_RADIAL_GRADIENT: return radial_gradient_brush_fs();
+ #endif
+
+ #ifdef WR_FEATURE_CONIC_GRADIENT_BRUSH
+ case BRUSH_KIND_CONIC_GRADIENT: return conic_gradient_brush_fs();
+ #endif
+
+ #ifdef WR_FEATURE_OPACITY_BRUSH
+ case BRUSH_KIND_OPACITY: return opacity_brush_fs();
+ #endif
+
+ #ifdef WR_FEATURE_TEXT_BRUSH
+ case BRUSH_KIND_TEXT: return text_brush_fs();
+ #endif
+ }
+}
+
+#endif
diff --git a/third_party/webrender/webrender/res/brush_opacity.glsl b/third_party/webrender/webrender/res/brush_opacity.glsl
new file mode 100644
index 00000000000..e2a0b8e1c3a
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush_opacity.glsl
@@ -0,0 +1,91 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define VECS_PER_OPACITY_BRUSH 3
+#define VECS_PER_SPECIFIC_BRUSH VECS_PER_OPACITY_BRUSH
+
+#define WR_BRUSH_VS_FUNCTION opacity_brush_vs
+#define WR_BRUSH_FS_FUNCTION opacity_brush_fs
+
+#include shared,prim_shared,brush
+
+// Interpolated UV coordinates to sample.
+#define V_UV varying_vec4_0.zw
+#define V_LOCAL_POS varying_vec4_0.xy
+
+// Normalized bounds of the source image in the texture.
+#define V_UV_BOUNDS flat_varying_vec4_1
+
+// Layer index to sample.
+#define V_LAYER flat_varying_vec4_2.x
+// Flag to allow perspective interpolation of UV.
+#define V_PERSPECTIVE flat_varying_vec4_2.y
+
+#define V_OPACITY flat_varying_vec4_2.z
+
+#ifdef WR_VERTEX_SHADER
+void opacity_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize local_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 unused
+) {
+ ImageResource res = fetch_image_resource(prim_user_data.x);
+ vec2 uv0 = res.uv_rect.p0;
+ vec2 uv1 = res.uv_rect.p1;
+
+ vec2 texture_size = vec2(textureSize(sColor0, 0).xy);
+ vec2 f = (vi.local_pos - local_rect.p0) / local_rect.size;
+ f = get_image_quad_uv(prim_user_data.x, f);
+ vec2 uv = mix(uv0, uv1, f);
+ float perspective_interpolate = (brush_flags & BRUSH_FLAG_PERSPECTIVE_INTERPOLATION) != 0 ? 1.0 : 0.0;
+
+ V_UV = uv / texture_size * mix(vi.world_pos.w, 1.0, perspective_interpolate);
+ V_LAYER = res.layer;
+ V_PERSPECTIVE = perspective_interpolate;
+
+ // TODO: The image shader treats this differently: deflate the rect by half a pixel on each side and
+ // clamp the uv in the frame shader. Does it make sense to do the same here?
+ V_UV_BOUNDS = vec4(uv0, uv1) / texture_size.xyxy;
+ V_LOCAL_POS = vi.local_pos;
+
+ V_OPACITY = float(prim_user_data.y) / 65536.0;
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+Fragment opacity_brush_fs() {
+ float perspective_divisor = mix(gl_FragCoord.w, 1.0, V_PERSPECTIVE);
+ vec2 uv = V_UV * perspective_divisor;
+ vec4 Cs = texture(sColor0, vec3(uv, V_LAYER));
+
+ // Un-premultiply the input.
+ float alpha = Cs.a;
+ vec3 color = alpha != 0.0 ? Cs.rgb / alpha : Cs.rgb;
+
+ alpha *= V_OPACITY;
+
+ // Fail-safe to ensure that we don't sample outside the rendered
+ // portion of a blend source.
+ alpha *= min(point_inside_rect(uv, V_UV_BOUNDS.xy, V_UV_BOUNDS.zw),
+ init_transform_fs(V_LOCAL_POS));
+
+ // Pre-multiply the alpha into the output value.
+ return Fragment(alpha * vec4(color, 1.0));
+}
+#endif
+
+// Undef macro names that could be re-defined by other shaders.
+#undef V_UV
+#undef V_LOCAL_POS
+#undef V_UV_BOUNDS
+#undef V_LAYER
+#undef V_PERSPECTIVE
+#undef V_OPACITY
diff --git a/third_party/webrender/webrender/res/brush_radial_gradient.glsl b/third_party/webrender/webrender/res/brush_radial_gradient.glsl
new file mode 100644
index 00000000000..b178d606e1f
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush_radial_gradient.glsl
@@ -0,0 +1,176 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define VECS_PER_RADIAL_GRADIENT_BRUSH 2
+#define VECS_PER_SPECIFIC_BRUSH VECS_PER_RADIAL_GRADIENT_BRUSH
+
+#define WR_BRUSH_VS_FUNCTION radial_gradient_brush_vs
+#define WR_BRUSH_FS_FUNCTION radial_gradient_brush_fs
+
+#include shared,prim_shared,brush
+
+#define V_GRADIENT_ADDRESS flat_varying_highp_int_address_0
+
+#define V_CENTER flat_varying_vec4_0.xy
+#define V_START_RADIUS flat_varying_vec4_0.z
+#define V_END_RADIUS flat_varying_vec4_0.w
+
+#define V_REPEATED_SIZE flat_varying_vec4_1.xy
+#define V_GRADIENT_REPEAT flat_varying_vec4_1.z
+
+#define V_POS varying_vec4_0.zw
+
+#ifdef WR_FEATURE_ALPHA_PASS
+#define V_LOCAL_POS varying_vec4_0.xy
+#define V_TILE_REPEAT flat_varying_vec4_2.xy
+#endif
+
+#ifdef WR_VERTEX_SHADER
+
+struct RadialGradient {
+ vec4 center_start_end_radius;
+ float ratio_xy;
+ int extend_mode;
+ vec2 stretch_size;
+};
+
+RadialGradient fetch_radial_gradient(int address) {
+ vec4 data[2] = fetch_from_gpu_cache_2(address);
+ return RadialGradient(
+ data[0],
+ data[1].x,
+ int(data[1].y),
+ data[1].zw
+ );
+}
+
+void radial_gradient_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize local_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 texel_rect
+) {
+ RadialGradient gradient = fetch_radial_gradient(prim_address);
+
+ if ((brush_flags & BRUSH_FLAG_SEGMENT_RELATIVE) != 0) {
+ V_POS = (vi.local_pos - segment_rect.p0) / segment_rect.size;
+ V_POS = V_POS * (texel_rect.zw - texel_rect.xy) + texel_rect.xy;
+ V_POS = V_POS * local_rect.size;
+ } else {
+ V_POS = vi.local_pos - local_rect.p0;
+ }
+
+ V_CENTER = gradient.center_start_end_radius.xy;
+ V_START_RADIUS = gradient.center_start_end_radius.z;
+ V_END_RADIUS = gradient.center_start_end_radius.w;
+
+ // Transform all coordinates by the y scale so the
+ // fragment shader can work with circles
+ vec2 tile_repeat = local_rect.size / gradient.stretch_size;
+ V_POS.y *= gradient.ratio_xy;
+ V_CENTER.y *= gradient.ratio_xy;
+ V_REPEATED_SIZE = gradient.stretch_size;
+ V_REPEATED_SIZE.y *= gradient.ratio_xy;
+
+ V_GRADIENT_ADDRESS = prim_user_data.x;
+
+ // Whether to repeat the gradient instead of clamping.
+ V_GRADIENT_REPEAT = float(gradient.extend_mode != EXTEND_MODE_CLAMP);
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ V_TILE_REPEAT = tile_repeat.xy;
+ V_LOCAL_POS = vi.local_pos;
+#endif
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+Fragment radial_gradient_brush_fs() {
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ // Handle top and left inflated edges (see brush_image).
+ vec2 local_pos = max(V_POS, vec2(0.0));
+
+ // Apply potential horizontal and vertical repetitions.
+ vec2 pos = mod(local_pos, V_REPEATED_SIZE);
+
+ vec2 prim_size = V_REPEATED_SIZE * V_TILE_REPEAT;
+ // Handle bottom and right inflated edges (see brush_image).
+ if (local_pos.x >= prim_size.x) {
+ pos.x = V_REPEATED_SIZE.x;
+ }
+ if (local_pos.y >= prim_size.y) {
+ pos.y = V_REPEATED_SIZE.y;
+ }
+#else
+ // Apply potential horizontal and vertical repetitions.
+ vec2 pos = mod(V_POS, V_REPEATED_SIZE);
+#endif
+
+ vec2 pd = pos - V_CENTER;
+ float rd = V_END_RADIUS - V_START_RADIUS;
+
+ // Solve for t in length(t - pd) = V_START_RADIUS + t * rd
+ // using a quadratic equation in form of At^2 - 2Bt + C = 0
+ float A = -(rd * rd);
+ float B = V_START_RADIUS * rd;
+ float C = dot(pd, pd) - V_START_RADIUS * V_START_RADIUS;
+
+ float offset;
+ if (A == 0.0) {
+ // Since A is 0, just solve for -2Bt + C = 0
+ if (B == 0.0) {
+ discard;
+ }
+ float t = 0.5 * C / B;
+ if (V_START_RADIUS + rd * t >= 0.0) {
+ offset = t;
+ } else {
+ discard;
+ }
+ } else {
+ float discr = B * B - A * C;
+ if (discr < 0.0) {
+ discard;
+ }
+ discr = sqrt(discr);
+ float t0 = (B + discr) / A;
+ float t1 = (B - discr) / A;
+ if (V_START_RADIUS + rd * t0 >= 0.0) {
+ offset = t0;
+ } else if (V_START_RADIUS + rd * t1 >= 0.0) {
+ offset = t1;
+ } else {
+ discard;
+ }
+ }
+
+ vec4 color = sample_gradient(V_GRADIENT_ADDRESS,
+ offset,
+ V_GRADIENT_REPEAT);
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ color *= init_transform_fs(V_LOCAL_POS);
+#endif
+
+ return Fragment(color);
+}
+#endif
+
+// Undef macro names that could be re-defined by other shaders.
+#undef V_GRADIENT_ADDRESS
+#undef V_CENTER
+#undef V_START_RADIUS
+#undef V_END_RADIUS
+#undef V_REPEATED_SIZE
+#undef V_GRADIENT_REPEAT
+#undef V_POS
+#undef V_LOCAL_POS
+#undef V_TILE_REPEAT
diff --git a/third_party/webrender/webrender/res/brush_solid.frag.h b/third_party/webrender/webrender/res/brush_solid.frag.h
new file mode 100644
index 00000000000..9f650638166
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush_solid.frag.h
@@ -0,0 +1,15 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+ALWAYS_INLINE int draw_span(uint32_t* buf, int len) {
+ auto color = pack_span(buf, flat_varying_vec4_0);
+ commit_solid_span(buf, color, len);
+ return len;
+}
+
+ALWAYS_INLINE int draw_span(uint8_t* buf, int len) {
+ auto color = pack_span(buf, flat_varying_vec4_0.x);
+ commit_solid_span(buf, color, len);
+ return len;
+}
diff --git a/third_party/webrender/webrender/res/brush_solid.glsl b/third_party/webrender/webrender/res/brush_solid.glsl
new file mode 100644
index 00000000000..86713b04d12
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush_solid.glsl
@@ -0,0 +1,65 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define VECS_PER_SOLID_BRUSH 1
+#define VECS_PER_SPECIFIC_BRUSH VECS_PER_SOLID_BRUSH
+
+#define WR_BRUSH_VS_FUNCTION solid_brush_vs
+#define WR_BRUSH_FS_FUNCTION solid_brush_fs
+
+#include shared,prim_shared,brush
+
+#define V_COLOR flat_varying_vec4_0
+
+#ifdef WR_FEATURE_ALPHA_PASS
+#define V_LOCAL_POS varying_vec4_0.xy
+#endif
+
+#ifdef WR_VERTEX_SHADER
+
+struct SolidBrush {
+ vec4 color;
+};
+
+SolidBrush fetch_solid_primitive(int address) {
+ vec4 data = fetch_from_gpu_cache_1(address);
+ return SolidBrush(data);
+}
+
+void solid_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize local_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 unused
+) {
+ SolidBrush prim = fetch_solid_primitive(prim_address);
+
+ float opacity = float(prim_user_data.x) / 65535.0;
+ V_COLOR = prim.color * opacity;
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ V_LOCAL_POS = vi.local_pos;
+#endif
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+Fragment solid_brush_fs() {
+ vec4 color = V_COLOR;
+#ifdef WR_FEATURE_ALPHA_PASS
+ color *= init_transform_fs(V_LOCAL_POS);
+#endif
+ return Fragment(color);
+}
+#endif
+
+// Undef macro names that could be re-defined by other shaders.
+#undef V_COLOR
+#undef V_LOCAL_POS
diff --git a/third_party/webrender/webrender/res/brush_yuv_image.glsl b/third_party/webrender/webrender/res/brush_yuv_image.glsl
new file mode 100644
index 00000000000..a8ba62731a7
--- /dev/null
+++ b/third_party/webrender/webrender/res/brush_yuv_image.glsl
@@ -0,0 +1,113 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define VECS_PER_YUV_BRUSH 1
+#define VECS_PER_SPECIFIC_BRUSH VECS_PER_YUV_BRUSH
+
+#define WR_BRUSH_VS_FUNCTION yuv_brush_vs
+#define WR_BRUSH_FS_FUNCTION yuv_brush_fs
+
+#include shared,prim_shared,brush,yuv
+
+#ifdef WR_FEATURE_ALPHA_PASS
+varying vec2 vLocalPos;
+#endif
+
+flat varying vec3 vYuvLayers;
+
+varying vec2 vUv_Y;
+flat varying vec4 vUvBounds_Y;
+
+varying vec2 vUv_U;
+flat varying vec4 vUvBounds_U;
+
+varying vec2 vUv_V;
+flat varying vec4 vUvBounds_V;
+
+flat varying float vCoefficient;
+flat varying mat3 vYuvColorMatrix;
+flat varying int vFormat;
+
+#ifdef WR_VERTEX_SHADER
+
+struct YuvPrimitive {
+ float coefficient;
+ int color_space;
+ int yuv_format;
+};
+
+YuvPrimitive fetch_yuv_primitive(int address) {
+ vec4 data = fetch_from_gpu_cache_1(address);
+ return YuvPrimitive(data.x, int(data.y), int(data.z));
+}
+
+void yuv_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize local_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 unused
+) {
+ vec2 f = (vi.local_pos - local_rect.p0) / local_rect.size;
+
+ YuvPrimitive prim = fetch_yuv_primitive(prim_address);
+ vCoefficient = prim.coefficient;
+
+ vYuvColorMatrix = get_yuv_color_matrix(prim.color_space);
+ vFormat = prim.yuv_format;
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ vLocalPos = vi.local_pos;
+#endif
+
+ if (vFormat == YUV_FORMAT_PLANAR) {
+ ImageResource res_y = fetch_image_resource(prim_user_data.x);
+ ImageResource res_u = fetch_image_resource(prim_user_data.y);
+ ImageResource res_v = fetch_image_resource(prim_user_data.z);
+ write_uv_rect(res_y.uv_rect.p0, res_y.uv_rect.p1, f, TEX_SIZE(sColor0), vUv_Y, vUvBounds_Y);
+ write_uv_rect(res_u.uv_rect.p0, res_u.uv_rect.p1, f, TEX_SIZE(sColor1), vUv_U, vUvBounds_U);
+ write_uv_rect(res_v.uv_rect.p0, res_v.uv_rect.p1, f, TEX_SIZE(sColor2), vUv_V, vUvBounds_V);
+ vYuvLayers = vec3(res_y.layer, res_u.layer, res_v.layer);
+ } else if (vFormat == YUV_FORMAT_NV12) {
+ ImageResource res_y = fetch_image_resource(prim_user_data.x);
+ ImageResource res_u = fetch_image_resource(prim_user_data.y);
+ write_uv_rect(res_y.uv_rect.p0, res_y.uv_rect.p1, f, TEX_SIZE(sColor0), vUv_Y, vUvBounds_Y);
+ write_uv_rect(res_u.uv_rect.p0, res_u.uv_rect.p1, f, TEX_SIZE(sColor1), vUv_U, vUvBounds_U);
+ vYuvLayers = vec3(res_y.layer, res_u.layer, 0.0);
+ } else if (vFormat == YUV_FORMAT_INTERLEAVED) {
+ ImageResource res_y = fetch_image_resource(prim_user_data.x);
+ write_uv_rect(res_y.uv_rect.p0, res_y.uv_rect.p1, f, TEX_SIZE(sColor0), vUv_Y, vUvBounds_Y);
+ vYuvLayers = vec3(res_y.layer, 0.0, 0.0);
+ }
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+
+Fragment yuv_brush_fs() {
+ vec4 color = sample_yuv(
+ vFormat,
+ vYuvColorMatrix,
+ vCoefficient,
+ vYuvLayers,
+ vUv_Y,
+ vUv_U,
+ vUv_V,
+ vUvBounds_Y,
+ vUvBounds_U,
+ vUvBounds_V
+ );
+
+#ifdef WR_FEATURE_ALPHA_PASS
+ color *= init_transform_fs(vLocalPos);
+#endif
+
+ return Fragment(color);
+}
+#endif
diff --git a/third_party/webrender/webrender/res/clip_shared.glsl b/third_party/webrender/webrender/res/clip_shared.glsl
new file mode 100644
index 00000000000..e5b80389687
--- /dev/null
+++ b/third_party/webrender/webrender/res/clip_shared.glsl
@@ -0,0 +1,97 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include rect,render_task,gpu_cache,transform
+
+#ifdef WR_VERTEX_SHADER
+
+PER_INSTANCE in ivec2 aTransformIds;
+PER_INSTANCE in ivec4 aClipDataResourceAddress;
+PER_INSTANCE in vec2 aClipLocalPos;
+PER_INSTANCE in vec4 aClipTileRect;
+PER_INSTANCE in vec4 aClipDeviceArea;
+PER_INSTANCE in vec4 aClipOrigins;
+PER_INSTANCE in float aDevicePixelScale;
+
+struct ClipMaskInstance {
+ int clip_transform_id;
+ int prim_transform_id;
+ ivec2 clip_data_address;
+ ivec2 resource_address;
+ vec2 local_pos;
+ RectWithSize tile_rect;
+ RectWithSize sub_rect;
+ vec2 task_origin;
+ vec2 screen_origin;
+ float device_pixel_scale;
+};
+
+ClipMaskInstance fetch_clip_item() {
+ ClipMaskInstance cmi;
+
+ cmi.clip_transform_id = aTransformIds.x;
+ cmi.prim_transform_id = aTransformIds.y;
+ cmi.clip_data_address = aClipDataResourceAddress.xy;
+ cmi.resource_address = aClipDataResourceAddress.zw;
+ cmi.local_pos = aClipLocalPos;
+ cmi.tile_rect = RectWithSize(aClipTileRect.xy, aClipTileRect.zw);
+ cmi.sub_rect = RectWithSize(aClipDeviceArea.xy, aClipDeviceArea.zw);
+ cmi.task_origin = aClipOrigins.xy;
+ cmi.screen_origin = aClipOrigins.zw;
+ cmi.device_pixel_scale = aDevicePixelScale;
+
+ return cmi;
+}
+
+struct ClipVertexInfo {
+ vec4 local_pos;
+ RectWithSize clipped_local_rect;
+};
+
+RectWithSize intersect_rect(RectWithSize a, RectWithSize b) {
+ vec4 p = clamp(vec4(a.p0, a.p0 + a.size), b.p0.xyxy, b.p0.xyxy + b.size.xyxy);
+ return RectWithSize(p.xy, max(vec2(0.0), p.zw - p.xy));
+}
+
+
+// The transformed vertex function that always covers the whole clip area,
+// which is the intersection of all clip instances of a given primitive
+ClipVertexInfo write_clip_tile_vertex(RectWithSize local_clip_rect,
+ Transform prim_transform,
+ Transform clip_transform,
+ RectWithSize sub_rect,
+ vec2 task_origin,
+ vec2 screen_origin,
+ float device_pixel_scale) {
+ vec2 device_pos = screen_origin + sub_rect.p0 + aPosition.xy * sub_rect.size;
+ vec2 world_pos = device_pos / device_pixel_scale;
+
+ vec4 pos = prim_transform.m * vec4(world_pos, 0.0, 1.0);
+ pos.xyz /= pos.w;
+
+ vec4 p = get_node_pos(pos.xy, clip_transform);
+ vec4 local_pos = p * pos.w;
+
+ //TODO: Interpolate in clip space, where "local_pos.w" contains
+ // the W of the homogeneous transform *from* clip space into the world.
+ // float interpolate_w = 1.0 / local_pos.w;
+ // This is problematic today, because the W<=0 hemisphere is going to be
+ // clipped, while we currently want this shader to fill out the whole rect.
+ // We can therefore simplify this when the clip construction is rewritten
+ // to only affect the areas touched by a clip.
+ vec4 vertex_pos = vec4(
+ task_origin + sub_rect.p0 + aPosition.xy * sub_rect.size,
+ 0.0,
+ 1.0
+ );
+
+ gl_Position = uTransform * vertex_pos;
+
+ init_transform_vs(vec4(local_clip_rect.p0, local_clip_rect.p0 + local_clip_rect.size));
+
+ ClipVertexInfo vi = ClipVertexInfo(local_pos, local_clip_rect);
+ return vi;
+}
+
+#endif //WR_VERTEX_SHADER
diff --git a/third_party/webrender/webrender/res/composite.glsl b/third_party/webrender/webrender/res/composite.glsl
new file mode 100644
index 00000000000..2a2f36969c7
--- /dev/null
+++ b/third_party/webrender/webrender/res/composite.glsl
@@ -0,0 +1,144 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// Composite a picture cache tile into the framebuffer.
+
+#include shared,yuv
+
+#ifdef WR_FEATURE_YUV
+flat varying mat3 vYuvColorMatrix;
+flat varying float vYuvCoefficient;
+flat varying int vYuvFormat;
+flat varying vec3 vYuvLayers;
+varying vec2 vUV_y;
+varying vec2 vUV_u;
+varying vec2 vUV_v;
+flat varying vec4 vUVBounds_y;
+flat varying vec4 vUVBounds_u;
+flat varying vec4 vUVBounds_v;
+#else
+flat varying vec4 vColor;
+flat varying float vLayer;
+varying vec2 vUv;
+flat varying vec4 vUVBounds;
+#endif
+
+#ifdef WR_VERTEX_SHADER
+// CPU side data is in CompositeInstance (gpu_types.rs) and is
+// converted to GPU data using desc::COMPOSITE (renderer.rs) by
+// filling vaos.composite_vao with VertexArrayKind::Composite.
+PER_INSTANCE in vec4 aDeviceRect;
+PER_INSTANCE in vec4 aDeviceClipRect;
+PER_INSTANCE in vec4 aColor;
+PER_INSTANCE in vec4 aParams;
+PER_INSTANCE in vec3 aTextureLayers;
+
+#ifdef WR_FEATURE_YUV
+// YUV treats these as a UV clip rect (clamp)
+PER_INSTANCE in vec4 aUvRect0;
+PER_INSTANCE in vec4 aUvRect1;
+PER_INSTANCE in vec4 aUvRect2;
+#else
+PER_INSTANCE in vec4 aUvRect0;
+#endif
+
+void main(void) {
+ // Get world position
+ vec2 world_pos = aDeviceRect.xy + aPosition.xy * aDeviceRect.zw;
+
+ // Clip the position to the world space clip rect
+ vec2 clipped_world_pos = clamp(world_pos, aDeviceClipRect.xy, aDeviceClipRect.xy + aDeviceClipRect.zw);
+
+ // Derive the normalized UV from the clipped vertex position
+ vec2 uv = (clipped_world_pos - aDeviceRect.xy) / aDeviceRect.zw;
+
+#ifdef WR_FEATURE_YUV
+ int yuv_color_space = int(aParams.y);
+ int yuv_format = int(aParams.z);
+ float yuv_coefficient = aParams.w;
+
+ vYuvColorMatrix = get_yuv_color_matrix(yuv_color_space);
+ vYuvCoefficient = yuv_coefficient;
+ vYuvFormat = yuv_format;
+
+ vYuvLayers = aTextureLayers.xyz;
+ write_uv_rect(
+ aUvRect0.xy,
+ aUvRect0.zw,
+ uv,
+ TEX_SIZE(sColor0),
+ vUV_y,
+ vUVBounds_y
+ );
+ write_uv_rect(
+ aUvRect1.xy,
+ aUvRect1.zw,
+ uv,
+ TEX_SIZE(sColor1),
+ vUV_u,
+ vUVBounds_u
+ );
+ write_uv_rect(
+ aUvRect2.xy,
+ aUvRect2.zw,
+ uv,
+ TEX_SIZE(sColor2),
+ vUV_v,
+ vUVBounds_v
+ );
+#else
+ vUv = mix(aUvRect0.xy, aUvRect0.zw, uv);
+ // flip_y might have the UV rect "upside down", make sure
+ // clamp works correctly:
+ vUVBounds = vec4(aUvRect0.x, min(aUvRect0.y, aUvRect0.w),
+ aUvRect0.z, max(aUvRect0.y, aUvRect0.w));
+ int rescale_uv = int(aParams.y);
+ if (rescale_uv == 1)
+ {
+ // using an atlas, so UVs are in pixels, and need to be
+ // normalized and clamped.
+ vec2 texture_size = TEX_SIZE(sColor0);
+ vUVBounds += vec4(0.5, 0.5, -0.5, -0.5);
+ #ifndef WR_FEATURE_TEXTURE_RECT
+ vUv /= texture_size;
+ vUVBounds /= texture_size.xyxy;
+ #endif
+ }
+ // Pass through color and texture array layer
+ vColor = aColor;
+ vLayer = aTextureLayers.x;
+#endif
+
+ gl_Position = uTransform * vec4(clipped_world_pos, aParams.x /* z_id */, 1.0);
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+void main(void) {
+#ifdef WR_FEATURE_YUV
+ vec4 color = sample_yuv(
+ vYuvFormat,
+ vYuvColorMatrix,
+ vYuvCoefficient,
+ vYuvLayers,
+ vUV_y,
+ vUV_u,
+ vUV_v,
+ vUVBounds_y,
+ vUVBounds_u,
+ vUVBounds_v
+ );
+#else
+ // The color is just the texture sample modulated by a supplied color
+ vec2 uv = clamp(vUv.xy, vUVBounds.xy, vUVBounds.zw);
+# if defined(WR_FEATURE_TEXTURE_EXTERNAL) || defined(WR_FEATURE_TEXTURE_2D) || defined(WR_FEATURE_TEXTURE_RECT)
+ vec4 texel = TEX_SAMPLE(sColor0, vec3(uv, vLayer));
+# else
+ vec4 texel = textureLod(sColor0, vec3(uv, vLayer), 0.0);
+# endif
+ vec4 color = vColor * texel;
+#endif
+ write_output(color);
+}
+#endif
diff --git a/third_party/webrender/webrender/res/cs_blur.glsl b/third_party/webrender/webrender/res/cs_blur.glsl
new file mode 100644
index 00000000000..a10fe00d790
--- /dev/null
+++ b/third_party/webrender/webrender/res/cs_blur.glsl
@@ -0,0 +1,164 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared,prim_shared
+
+varying vec3 vUv;
+flat varying vec4 vUvRect;
+flat varying vec2 vOffsetScale;
+flat varying float vSigma;
+// The number of pixels on each end that we apply the blur filter over.
+flat varying int vSupport;
+
+#ifdef WR_VERTEX_SHADER
+// Applies a separable gaussian blur in one direction, as specified
+// by the dir field in the blur command.
+
+#define DIR_HORIZONTAL 0
+#define DIR_VERTICAL 1
+
+PER_INSTANCE in int aBlurRenderTaskAddress;
+PER_INSTANCE in int aBlurSourceTaskAddress;
+PER_INSTANCE in int aBlurDirection;
+
+struct BlurTask {
+ RenderTaskCommonData common_data;
+ float blur_radius;
+ vec2 blur_region;
+};
+
+BlurTask fetch_blur_task(int address) {
+ RenderTaskData task_data = fetch_render_task_data(address);
+
+ BlurTask task = BlurTask(
+ task_data.common_data,
+ task_data.user_data.x,
+ task_data.user_data.yz
+ );
+
+ return task;
+}
+
+void main(void) {
+ BlurTask blur_task = fetch_blur_task(aBlurRenderTaskAddress);
+ RenderTaskCommonData src_task = fetch_render_task_common_data(aBlurSourceTaskAddress);
+
+ RectWithSize src_rect = src_task.task_rect;
+ RectWithSize target_rect = blur_task.common_data.task_rect;
+
+#if defined WR_FEATURE_COLOR_TARGET
+ vec2 texture_size = vec2(textureSize(sPrevPassColor, 0).xy);
+#else
+ vec2 texture_size = vec2(textureSize(sPrevPassAlpha, 0).xy);
+#endif
+ vUv.z = src_task.texture_layer_index;
+ vSigma = blur_task.blur_radius;
+
+ // Ensure that the support is an even number of pixels to simplify the
+ // fragment shader logic.
+ //
+ // TODO(pcwalton): Actually make use of this fact and use the texture
+ // hardware for linear filtering.
+ vSupport = int(ceil(1.5 * blur_task.blur_radius)) * 2;
+
+ switch (aBlurDirection) {
+ case DIR_HORIZONTAL:
+ vOffsetScale = vec2(1.0 / texture_size.x, 0.0);
+ break;
+ case DIR_VERTICAL:
+ vOffsetScale = vec2(0.0, 1.0 / texture_size.y);
+ break;
+ default:
+ vOffsetScale = vec2(0.0);
+ }
+
+ vUvRect = vec4(src_rect.p0 + vec2(0.5),
+ src_rect.p0 + blur_task.blur_region - vec2(0.5));
+ vUvRect /= texture_size.xyxy;
+
+ vec2 pos = target_rect.p0 + target_rect.size * aPosition.xy;
+
+ vec2 uv0 = src_rect.p0 / texture_size;
+ vec2 uv1 = (src_rect.p0 + src_rect.size) / texture_size;
+ vUv.xy = mix(uv0, uv1, aPosition.xy);
+
+ gl_Position = uTransform * vec4(pos, 0.0, 1.0);
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+
+#if defined WR_FEATURE_COLOR_TARGET
+#define SAMPLE_TYPE vec4
+#define SAMPLE_TEXTURE(uv) texture(sPrevPassColor, uv)
+#else
+#define SAMPLE_TYPE float
+#define SAMPLE_TEXTURE(uv) texture(sPrevPassAlpha, uv).r
+#endif
+
+// TODO(gw): Write a fast path blur that handles smaller blur radii
+// with a offset / weight uniform table and a constant
+// loop iteration count!
+
+void main(void) {
+ SAMPLE_TYPE original_color = SAMPLE_TEXTURE(vUv);
+
+ // TODO(gw): The gauss function gets NaNs when blur radius
+ // is zero. In the future, detect this earlier
+ // and skip the blur passes completely.
+ if (vSupport == 0) {
+ oFragColor = vec4(original_color);
+ return;
+ }
+
+ // Incremental Gaussian Coefficent Calculation (See GPU Gems 3 pp. 877 - 889)
+ vec3 gauss_coefficient;
+ gauss_coefficient.x = 1.0 / (sqrt(2.0 * 3.14159265) * vSigma);
+ gauss_coefficient.y = exp(-0.5 / (vSigma * vSigma));
+ gauss_coefficient.z = gauss_coefficient.y * gauss_coefficient.y;
+
+ float gauss_coefficient_total = gauss_coefficient.x;
+ SAMPLE_TYPE avg_color = original_color * gauss_coefficient.x;
+ gauss_coefficient.xy *= gauss_coefficient.yz;
+
+ // Evaluate two adjacent texels at a time. We can do this because, if c0
+ // and c1 are colors of adjacent texels and k0 and k1 are arbitrary
+ // factors, this formula:
+ //
+ // k0 * c0 + k1 * c1 (Equation 1)
+ //
+ // is equivalent to:
+ //
+ // k1
+ // (k0 + k1) * lerp(c0, c1, -------)
+ // k0 + k1
+ //
+ // A texture lookup of adjacent texels evaluates this formula:
+ //
+ // lerp(c0, c1, t)
+ //
+ // for some t. So we can let `t = k1/(k0 + k1)` and effectively evaluate
+ // Equation 1 with a single texture lookup.
+
+ for (int i = 1; i <= vSupport; i += 2) {
+ float gauss_coefficient_subtotal = gauss_coefficient.x;
+ gauss_coefficient.xy *= gauss_coefficient.yz;
+ gauss_coefficient_subtotal += gauss_coefficient.x;
+ float gauss_ratio = gauss_coefficient.x / gauss_coefficient_subtotal;
+
+ vec2 offset = vOffsetScale * (float(i) + gauss_ratio);
+
+ vec2 st0 = clamp(vUv.xy - offset, vUvRect.xy, vUvRect.zw);
+ avg_color += SAMPLE_TEXTURE(vec3(st0, vUv.z)) * gauss_coefficient_subtotal;
+
+ vec2 st1 = clamp(vUv.xy + offset, vUvRect.xy, vUvRect.zw);
+ avg_color += SAMPLE_TEXTURE(vec3(st1, vUv.z)) * gauss_coefficient_subtotal;
+
+ gauss_coefficient_total += 2.0 * gauss_coefficient_subtotal;
+ gauss_coefficient.xy *= gauss_coefficient.yz;
+ }
+
+ oFragColor = vec4(avg_color) / gauss_coefficient_total;
+}
+#endif
diff --git a/third_party/webrender/webrender/res/cs_border_segment.glsl b/third_party/webrender/webrender/res/cs_border_segment.glsl
new file mode 100644
index 00000000000..9eb5155f1f6
--- /dev/null
+++ b/third_party/webrender/webrender/res/cs_border_segment.glsl
@@ -0,0 +1,453 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared,ellipse
+
+// For edges, the colors are the same. For corners, these
+// are the colors of each edge making up the corner.
+flat varying vec4 vColor00;
+flat varying vec4 vColor01;
+flat varying vec4 vColor10;
+flat varying vec4 vColor11;
+
+// A point + tangent defining the line where the edge
+// transition occurs. Used for corners only.
+flat varying vec4 vColorLine;
+
+// x = segment, y = styles, z = edge axes, w = clip mode
+// Since by default in GLES the vertex shader uses highp
+// and the fragment shader uses mediump, we explicitely
+// use mediump precision so we align with the default
+// mediump precision in the fragment shader.
+flat varying mediump ivec4 vConfig;
+
+// xy = Local space position of the clip center.
+// zw = Scale the rect origin by this to get the outer
+// corner from the segment rectangle.
+flat varying vec4 vClipCenter_Sign;
+
+// An outer and inner elliptical radii for border
+// corner clipping.
+flat varying vec4 vClipRadii;
+
+// Reference point for determine edge clip lines.
+flat varying vec4 vEdgeReference;
+
+// Stores widths/2 and widths/3 to save doing this in FS.
+flat varying vec4 vPartialWidths;
+
+// Clipping parameters for dot or dash.
+flat varying vec4 vClipParams1;
+flat varying vec4 vClipParams2;
+
+// Local space position
+varying vec2 vPos;
+
+#define SEGMENT_TOP_LEFT 0
+#define SEGMENT_TOP_RIGHT 1
+#define SEGMENT_BOTTOM_RIGHT 2
+#define SEGMENT_BOTTOM_LEFT 3
+#define SEGMENT_LEFT 4
+#define SEGMENT_TOP 5
+#define SEGMENT_RIGHT 6
+#define SEGMENT_BOTTOM 7
+
+// Border styles as defined in webrender_api/types.rs
+#define BORDER_STYLE_NONE 0
+#define BORDER_STYLE_SOLID 1
+#define BORDER_STYLE_DOUBLE 2
+#define BORDER_STYLE_DOTTED 3
+#define BORDER_STYLE_DASHED 4
+#define BORDER_STYLE_HIDDEN 5
+#define BORDER_STYLE_GROOVE 6
+#define BORDER_STYLE_RIDGE 7
+#define BORDER_STYLE_INSET 8
+#define BORDER_STYLE_OUTSET 9
+
+#define CLIP_NONE 0
+#define CLIP_DASH_CORNER 1
+#define CLIP_DASH_EDGE 2
+#define CLIP_DOT 3
+
+#ifdef WR_VERTEX_SHADER
+
+PER_INSTANCE in vec2 aTaskOrigin;
+PER_INSTANCE in vec4 aRect;
+PER_INSTANCE in vec4 aColor0;
+PER_INSTANCE in vec4 aColor1;
+PER_INSTANCE in int aFlags;
+PER_INSTANCE in vec2 aWidths;
+PER_INSTANCE in vec2 aRadii;
+PER_INSTANCE in vec4 aClipParams1;
+PER_INSTANCE in vec4 aClipParams2;
+
+vec2 get_outer_corner_scale(int segment) {
+ vec2 p;
+
+ switch (segment) {
+ case SEGMENT_TOP_LEFT:
+ p = vec2(0.0, 0.0);
+ break;
+ case SEGMENT_TOP_RIGHT:
+ p = vec2(1.0, 0.0);
+ break;
+ case SEGMENT_BOTTOM_RIGHT:
+ p = vec2(1.0, 1.0);
+ break;
+ case SEGMENT_BOTTOM_LEFT:
+ p = vec2(0.0, 1.0);
+ break;
+ default:
+ // The result is only used for non-default segment cases
+ p = vec2(0.0);
+ break;
+ }
+
+ return p;
+}
+
+// NOTE(emilio): If you change this algorithm, do the same change
+// in border.rs
+vec4 mod_color(vec4 color, bool is_black, bool lighter) {
+ const float light_black = 0.7;
+ const float dark_black = 0.3;
+
+ const float dark_scale = 0.66666666;
+ const float light_scale = 1.0;
+
+ if (is_black) {
+ if (lighter) {
+ return vec4(vec3(light_black), color.a);
+ }
+ return vec4(vec3(dark_black), color.a);
+ }
+
+ if (lighter) {
+ return vec4(color.rgb * light_scale, color.a);
+ }
+ return vec4(color.rgb * dark_scale, color.a);
+}
+
+vec4[2] get_colors_for_side(vec4 color, int style) {
+ vec4 result[2];
+
+ bool is_black = color.rgb == vec3(0.0, 0.0, 0.0);
+
+ switch (style) {
+ case BORDER_STYLE_GROOVE:
+ result[0] = mod_color(color, is_black, true);
+ result[1] = mod_color(color, is_black, false);
+ break;
+ case BORDER_STYLE_RIDGE:
+ result[0] = mod_color(color, is_black, false);
+ result[1] = mod_color(color, is_black, true);
+ break;
+ default:
+ result[0] = color;
+ result[1] = color;
+ break;
+ }
+
+ return result;
+}
+
+void main(void) {
+ int segment = aFlags & 0xff;
+ int style0 = (aFlags >> 8) & 0xff;
+ int style1 = (aFlags >> 16) & 0xff;
+ int clip_mode = (aFlags >> 24) & 0x0f;
+
+ vec2 outer_scale = get_outer_corner_scale(segment);
+ vec2 outer = outer_scale * aRect.zw;
+ vec2 clip_sign = 1.0 - 2.0 * outer_scale;
+
+ // Set some flags used by the FS to determine the
+ // orientation of the two edges in this corner.
+ ivec2 edge_axis = ivec2(0, 0);
+ // Derive the positions for the edge clips, which must be handled
+ // differently between corners and edges.
+ vec2 edge_reference = vec2(0.0);
+ switch (segment) {
+ case SEGMENT_TOP_LEFT:
+ edge_axis = ivec2(0, 1);
+ edge_reference = outer;
+ break;
+ case SEGMENT_TOP_RIGHT:
+ edge_axis = ivec2(1, 0);
+ edge_reference = vec2(outer.x - aWidths.x, outer.y);
+ break;
+ case SEGMENT_BOTTOM_RIGHT:
+ edge_axis = ivec2(0, 1);
+ edge_reference = outer - aWidths;
+ break;
+ case SEGMENT_BOTTOM_LEFT:
+ edge_axis = ivec2(1, 0);
+ edge_reference = vec2(outer.x, outer.y - aWidths.y);
+ break;
+ case SEGMENT_TOP:
+ case SEGMENT_BOTTOM:
+ edge_axis = ivec2(1, 1);
+ break;
+ case SEGMENT_LEFT:
+ case SEGMENT_RIGHT:
+ default:
+ break;
+ }
+
+ vConfig = ivec4(
+ segment,
+ style0 | (style1 << 8),
+ edge_axis.x | (edge_axis.y << 8),
+ clip_mode
+ );
+ vPartialWidths = vec4(aWidths / 3.0, aWidths / 2.0);
+ vPos = aRect.zw * aPosition.xy;
+
+ vec4[2] color0 = get_colors_for_side(aColor0, style0);
+ vColor00 = color0[0];
+ vColor01 = color0[1];
+ vec4[2] color1 = get_colors_for_side(aColor1, style1);
+ vColor10 = color1[0];
+ vColor11 = color1[1];
+ vClipCenter_Sign = vec4(outer + clip_sign * aRadii, clip_sign);
+ vClipRadii = vec4(aRadii, max(aRadii - aWidths, 0.0));
+ vColorLine = vec4(outer, aWidths.y * -clip_sign.y, aWidths.x * clip_sign.x);
+ vEdgeReference = vec4(edge_reference, edge_reference + aWidths);
+ vClipParams1 = aClipParams1;
+ vClipParams2 = aClipParams2;
+
+ // For the case of dot and dash clips, optimize the number of pixels that
+ // are hit to just include the dot itself.
+ if (clip_mode == CLIP_DOT) {
+ float radius = aClipParams1.z;
+
+ // Expand by a small amount to allow room for AA around
+ // the dot if it's big enough.
+ if (radius > 0.5)
+ radius += 2.0;
+
+ vPos = vClipParams1.xy + radius * (2.0 * aPosition.xy - 1.0);
+ vPos = clamp(vPos, vec2(0.0), aRect.zw);
+ } else if (clip_mode == CLIP_DASH_CORNER) {
+ vec2 center = (aClipParams1.xy + aClipParams2.xy) * 0.5;
+ // This is a gross approximation which works out because dashes don't have
+ // a strong curvature and we will overshoot by inflating the geometry by
+ // this amount on each side (sqrt(2) * length(dash) would be enough and we
+ // compute 2 * approx_length(dash)).
+ float dash_length = length(aClipParams1.xy - aClipParams2.xy);
+ float width = max(aWidths.x, aWidths.y);
+ // expand by a small amout for AA just like we do for dots.
+ vec2 r = vec2(max(dash_length, width)) + 2.0;
+ vPos = clamp(vPos, center - r, center + r);
+ }
+
+ gl_Position = uTransform * vec4(aTaskOrigin + aRect.xy + vPos, 0.0, 1.0);
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+vec4 evaluate_color_for_style_in_corner(
+ vec2 clip_relative_pos,
+ int style,
+ vec4 color0,
+ vec4 color1,
+ vec4 clip_radii,
+ float mix_factor,
+ int segment,
+ float aa_range
+) {
+ switch (style) {
+ case BORDER_STYLE_DOUBLE: {
+ // Get the distances from 0.33 of the radii, and
+ // also 0.67 of the radii. Use these to form a
+ // SDF subtraction which will clip out the inside
+ // third of the rounded edge.
+ float d_radii_a = distance_to_ellipse(
+ clip_relative_pos,
+ clip_radii.xy - vPartialWidths.xy,
+ aa_range
+ );
+ float d_radii_b = distance_to_ellipse(
+ clip_relative_pos,
+ clip_radii.xy - 2.0 * vPartialWidths.xy,
+ aa_range
+ );
+ float d = min(-d_radii_a, d_radii_b);
+ color0 *= distance_aa(aa_range, d);
+ break;
+ }
+ case BORDER_STYLE_GROOVE:
+ case BORDER_STYLE_RIDGE: {
+ float d = distance_to_ellipse(
+ clip_relative_pos,
+ clip_radii.xy - vPartialWidths.zw,
+ aa_range
+ );
+ float alpha = distance_aa(aa_range, d);
+ float swizzled_factor;
+ switch (segment) {
+ case SEGMENT_TOP_LEFT: swizzled_factor = 0.0; break;
+ case SEGMENT_TOP_RIGHT: swizzled_factor = mix_factor; break;
+ case SEGMENT_BOTTOM_RIGHT: swizzled_factor = 1.0; break;
+ case SEGMENT_BOTTOM_LEFT: swizzled_factor = 1.0 - mix_factor; break;
+ default: swizzled_factor = 0.0; break;
+ };
+ vec4 c0 = mix(color1, color0, swizzled_factor);
+ vec4 c1 = mix(color0, color1, swizzled_factor);
+ color0 = mix(c0, c1, alpha);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return color0;
+}
+
+vec4 evaluate_color_for_style_in_edge(
+ vec2 pos_vec,
+ int style,
+ vec4 color0,
+ vec4 color1,
+ float aa_range,
+ int edge_axis_id
+) {
+ vec2 edge_axis = edge_axis_id != 0 ? vec2(0.0, 1.0) : vec2(1.0, 0.0);
+ float pos = dot(pos_vec, edge_axis);
+ switch (style) {
+ case BORDER_STYLE_DOUBLE: {
+ float d = -1.0;
+ float partial_width = dot(vPartialWidths.xy, edge_axis);
+ if (partial_width >= 1.0) {
+ vec2 ref = vec2(
+ dot(vEdgeReference.xy, edge_axis) + partial_width,
+ dot(vEdgeReference.zw, edge_axis) - partial_width
+ );
+ d = min(pos - ref.x, ref.y - pos);
+ }
+ color0 *= distance_aa(aa_range, d);
+ break;
+ }
+ case BORDER_STYLE_GROOVE:
+ case BORDER_STYLE_RIDGE: {
+ float ref = dot(vEdgeReference.xy + vPartialWidths.zw, edge_axis);
+ float d = pos - ref;
+ float alpha = distance_aa(aa_range, d);
+ color0 = mix(color0, color1, alpha);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return color0;
+}
+
+void main(void) {
+ float aa_range = compute_aa_range(vPos);
+ vec4 color0, color1;
+
+ int segment = vConfig.x;
+ ivec2 style = ivec2(vConfig.y & 0xff, vConfig.y >> 8);
+ ivec2 edge_axis = ivec2(vConfig.z & 0xff, vConfig.z >> 8);
+ int clip_mode = vConfig.w;
+
+ float mix_factor = 0.0;
+ if (edge_axis.x != edge_axis.y) {
+ float d_line = distance_to_line(vColorLine.xy, vColorLine.zw, vPos);
+ mix_factor = distance_aa(aa_range, -d_line);
+ }
+
+ // Check if inside corner clip-region
+ vec2 clip_relative_pos = vPos - vClipCenter_Sign.xy;
+ bool in_clip_region = all(lessThan(vClipCenter_Sign.zw * clip_relative_pos, vec2(0.0)));
+ float d = -1.0;
+
+ switch (clip_mode) {
+ case CLIP_DOT: {
+ // Set clip distance based or dot position and radius.
+ d = distance(vClipParams1.xy, vPos) - vClipParams1.z;
+ break;
+ }
+ case CLIP_DASH_EDGE: {
+ bool is_vertical = vClipParams1.x == 0.;
+ float half_dash = is_vertical ? vClipParams1.y : vClipParams1.x;
+ // We want to draw something like:
+ // +---+---+---+---+
+ // |xxx| | |xxx|
+ // +---+---+---+---+
+ float pos = is_vertical ? vPos.y : vPos.x;
+ bool in_dash = pos < half_dash || pos > 3.0 * half_dash;
+ if (!in_dash) {
+ d = 1.;
+ }
+ break;
+ }
+ case CLIP_DASH_CORNER: {
+ // Get SDF for the two line/tangent clip lines,
+ // do SDF subtract to get clip distance.
+ float d0 = distance_to_line(vClipParams1.xy,
+ vClipParams1.zw,
+ vPos);
+ float d1 = distance_to_line(vClipParams2.xy,
+ vClipParams2.zw,
+ vPos);
+ d = max(d0, -d1);
+ break;
+ }
+ case CLIP_NONE:
+ default:
+ break;
+ }
+
+ if (in_clip_region) {
+ float d_radii_a = distance_to_ellipse(clip_relative_pos, vClipRadii.xy, aa_range);
+ float d_radii_b = distance_to_ellipse(clip_relative_pos, vClipRadii.zw, aa_range);
+ float d_radii = max(d_radii_a, -d_radii_b);
+ d = max(d, d_radii);
+
+ color0 = evaluate_color_for_style_in_corner(
+ clip_relative_pos,
+ style.x,
+ vColor00,
+ vColor01,
+ vClipRadii,
+ mix_factor,
+ segment,
+ aa_range
+ );
+ color1 = evaluate_color_for_style_in_corner(
+ clip_relative_pos,
+ style.y,
+ vColor10,
+ vColor11,
+ vClipRadii,
+ mix_factor,
+ segment,
+ aa_range
+ );
+ } else {
+ color0 = evaluate_color_for_style_in_edge(
+ vPos,
+ style.x,
+ vColor00,
+ vColor01,
+ aa_range,
+ edge_axis.x
+ );
+ color1 = evaluate_color_for_style_in_edge(
+ vPos,
+ style.y,
+ vColor10,
+ vColor11,
+ aa_range,
+ edge_axis.y
+ );
+ }
+
+ float alpha = distance_aa(aa_range, d);
+ vec4 color = mix(color0, color1, mix_factor);
+ oFragColor = color * alpha;
+}
+#endif
diff --git a/third_party/webrender/webrender/res/cs_border_solid.glsl b/third_party/webrender/webrender/res/cs_border_solid.glsl
new file mode 100644
index 00000000000..d5748143533
--- /dev/null
+++ b/third_party/webrender/webrender/res/cs_border_solid.glsl
@@ -0,0 +1,176 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared,ellipse
+
+#define DONT_MIX 0
+#define MIX_AA 1
+#define MIX_NO_AA 2
+
+// For edges, the colors are the same. For corners, these
+// are the colors of each edge making up the corner.
+flat varying vec4 vColor0;
+flat varying vec4 vColor1;
+
+// A point + tangent defining the line where the edge
+// transition occurs. Used for corners only.
+flat varying vec4 vColorLine;
+
+// A boolean indicating that we should be mixing between edge colors.
+flat varying int vMixColors;
+
+// xy = Local space position of the clip center.
+// zw = Scale the rect origin by this to get the outer
+// corner from the segment rectangle.
+flat varying vec4 vClipCenter_Sign;
+
+// An outer and inner elliptical radii for border
+// corner clipping.
+flat varying vec4 vClipRadii;
+
+// Position, scale, and radii of horizontally and vertically adjacent corner clips.
+flat varying vec4 vHorizontalClipCenter_Sign;
+flat varying vec2 vHorizontalClipRadii;
+flat varying vec4 vVerticalClipCenter_Sign;
+flat varying vec2 vVerticalClipRadii;
+
+// Local space position
+varying vec2 vPos;
+
+#define SEGMENT_TOP_LEFT 0
+#define SEGMENT_TOP_RIGHT 1
+#define SEGMENT_BOTTOM_RIGHT 2
+#define SEGMENT_BOTTOM_LEFT 3
+
+#ifdef WR_VERTEX_SHADER
+
+PER_INSTANCE in vec2 aTaskOrigin;
+PER_INSTANCE in vec4 aRect;
+PER_INSTANCE in vec4 aColor0;
+PER_INSTANCE in vec4 aColor1;
+PER_INSTANCE in int aFlags;
+PER_INSTANCE in vec2 aWidths;
+PER_INSTANCE in vec2 aRadii;
+PER_INSTANCE in vec4 aClipParams1;
+PER_INSTANCE in vec4 aClipParams2;
+
+vec2 get_outer_corner_scale(int segment) {
+ vec2 p;
+
+ switch (segment) {
+ case SEGMENT_TOP_LEFT:
+ p = vec2(0.0, 0.0);
+ break;
+ case SEGMENT_TOP_RIGHT:
+ p = vec2(1.0, 0.0);
+ break;
+ case SEGMENT_BOTTOM_RIGHT:
+ p = vec2(1.0, 1.0);
+ break;
+ case SEGMENT_BOTTOM_LEFT:
+ p = vec2(0.0, 1.0);
+ break;
+ default:
+ // The result is only used for non-default segment cases
+ p = vec2(0.0);
+ break;
+ }
+
+ return p;
+}
+
+void main(void) {
+ int segment = aFlags & 0xff;
+ bool do_aa = ((aFlags >> 24) & 0xf0) != 0;
+
+ vec2 outer_scale = get_outer_corner_scale(segment);
+ vec2 outer = outer_scale * aRect.zw;
+ vec2 clip_sign = 1.0 - 2.0 * outer_scale;
+
+ int mix_colors;
+ switch (segment) {
+ case SEGMENT_TOP_LEFT:
+ case SEGMENT_TOP_RIGHT:
+ case SEGMENT_BOTTOM_RIGHT:
+ case SEGMENT_BOTTOM_LEFT: {
+ mix_colors = do_aa ? MIX_AA : MIX_NO_AA;
+ break;
+ }
+ default:
+ mix_colors = DONT_MIX;
+ break;
+ }
+
+ vMixColors = mix_colors;
+ vPos = aRect.zw * aPosition.xy;
+
+ vColor0 = aColor0;
+ vColor1 = aColor1;
+ vClipCenter_Sign = vec4(outer + clip_sign * aRadii, clip_sign);
+ vClipRadii = vec4(aRadii, max(aRadii - aWidths, 0.0));
+ vColorLine = vec4(outer, aWidths.y * -clip_sign.y, aWidths.x * clip_sign.x);
+
+ vec2 horizontal_clip_sign = vec2(-clip_sign.x, clip_sign.y);
+ vHorizontalClipCenter_Sign = vec4(aClipParams1.xy +
+ horizontal_clip_sign * aClipParams1.zw,
+ horizontal_clip_sign);
+ vHorizontalClipRadii = aClipParams1.zw;
+
+ vec2 vertical_clip_sign = vec2(clip_sign.x, -clip_sign.y);
+ vVerticalClipCenter_Sign = vec4(aClipParams2.xy +
+ vertical_clip_sign * aClipParams2.zw,
+ vertical_clip_sign);
+ vVerticalClipRadii = aClipParams2.zw;
+
+ gl_Position = uTransform * vec4(aTaskOrigin + aRect.xy + vPos, 0.0, 1.0);
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+void main(void) {
+ float aa_range = compute_aa_range(vPos);
+ bool do_aa = vMixColors != MIX_NO_AA;
+
+ float mix_factor = 0.0;
+ if (vMixColors != DONT_MIX) {
+ float d_line = distance_to_line(vColorLine.xy, vColorLine.zw, vPos);
+ if (do_aa) {
+ mix_factor = distance_aa(aa_range, -d_line);
+ } else {
+ mix_factor = d_line + EPSILON >= 0. ? 1.0 : 0.0;
+ }
+ }
+
+ // Check if inside main corner clip-region
+ vec2 clip_relative_pos = vPos - vClipCenter_Sign.xy;
+ bool in_clip_region = all(lessThan(vClipCenter_Sign.zw * clip_relative_pos, vec2(0.0)));
+
+ float d = -1.0;
+ if (in_clip_region) {
+ float d_radii_a = distance_to_ellipse(clip_relative_pos, vClipRadii.xy, aa_range);
+ float d_radii_b = distance_to_ellipse(clip_relative_pos, vClipRadii.zw, aa_range);
+ d = max(d_radii_a, -d_radii_b);
+ }
+
+ // And again for horizontally-adjacent corner
+ clip_relative_pos = vPos - vHorizontalClipCenter_Sign.xy;
+ in_clip_region = all(lessThan(vHorizontalClipCenter_Sign.zw * clip_relative_pos, vec2(0.0)));
+ if (in_clip_region) {
+ float d_radii = distance_to_ellipse(clip_relative_pos, vHorizontalClipRadii.xy, aa_range);
+ d = max(d_radii, d);
+ }
+
+ // And finally for vertically-adjacent corner
+ clip_relative_pos = vPos - vVerticalClipCenter_Sign.xy;
+ in_clip_region = all(lessThan(vVerticalClipCenter_Sign.zw * clip_relative_pos, vec2(0.0)));
+ if (in_clip_region) {
+ float d_radii = distance_to_ellipse(clip_relative_pos, vVerticalClipRadii.xy, aa_range);
+ d = max(d_radii, d);
+ }
+
+ float alpha = do_aa ? distance_aa(aa_range, d) : 1.0;
+ vec4 color = mix(vColor0, vColor1, mix_factor);
+ oFragColor = color * alpha;
+}
+#endif
diff --git a/third_party/webrender/webrender/res/cs_clip_box_shadow.glsl b/third_party/webrender/webrender/res/cs_clip_box_shadow.glsl
new file mode 100644
index 00000000000..5b4937139ef
--- /dev/null
+++ b/third_party/webrender/webrender/res/cs_clip_box_shadow.glsl
@@ -0,0 +1,121 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared,clip_shared
+
+varying vec4 vLocalPos;
+varying vec2 vUv;
+flat varying vec4 vUvBounds;
+flat varying float vLayer;
+flat varying vec4 vEdge;
+flat varying vec4 vUvBounds_NoClamp;
+flat varying float vClipMode;
+
+#define MODE_STRETCH 0
+#define MODE_SIMPLE 1
+
+#ifdef WR_VERTEX_SHADER
+
+struct BoxShadowData {
+ vec2 src_rect_size;
+ float clip_mode;
+ int stretch_mode_x;
+ int stretch_mode_y;
+ RectWithSize dest_rect;
+};
+
+BoxShadowData fetch_data(ivec2 address) {
+ vec4 data[3] = fetch_from_gpu_cache_3_direct(address);
+ RectWithSize dest_rect = RectWithSize(data[2].xy, data[2].zw);
+ BoxShadowData bs_data = BoxShadowData(
+ data[0].xy,
+ data[0].z,
+ int(data[1].x),
+ int(data[1].y),
+ dest_rect
+ );
+ return bs_data;
+}
+
+void main(void) {
+ ClipMaskInstance cmi = fetch_clip_item();
+ Transform clip_transform = fetch_transform(cmi.clip_transform_id);
+ Transform prim_transform = fetch_transform(cmi.prim_transform_id);
+ BoxShadowData bs_data = fetch_data(cmi.clip_data_address);
+ ImageResource res = fetch_image_resource_direct(cmi.resource_address);
+
+ RectWithSize dest_rect = bs_data.dest_rect;
+
+ ClipVertexInfo vi = write_clip_tile_vertex(
+ dest_rect,
+ prim_transform,
+ clip_transform,
+ cmi.sub_rect,
+ cmi.task_origin,
+ cmi.screen_origin,
+ cmi.device_pixel_scale
+ );
+ vLayer = res.layer;
+ vClipMode = bs_data.clip_mode;
+
+ vec2 texture_size = vec2(textureSize(sColor0, 0));
+ vec2 local_pos = vi.local_pos.xy / vi.local_pos.w;
+ vLocalPos = vi.local_pos;
+
+ switch (bs_data.stretch_mode_x) {
+ case MODE_STRETCH: {
+ vEdge.x = 0.5;
+ vEdge.z = (dest_rect.size.x / bs_data.src_rect_size.x) - 0.5;
+ vUv.x = (local_pos.x - dest_rect.p0.x) / bs_data.src_rect_size.x;
+ break;
+ }
+ case MODE_SIMPLE:
+ default: {
+ vEdge.xz = vec2(1.0);
+ vUv.x = (local_pos.x - dest_rect.p0.x) / dest_rect.size.x;
+ break;
+ }
+ }
+
+ switch (bs_data.stretch_mode_y) {
+ case MODE_STRETCH: {
+ vEdge.y = 0.5;
+ vEdge.w = (dest_rect.size.y / bs_data.src_rect_size.y) - 0.5;
+ vUv.y = (local_pos.y - dest_rect.p0.y) / bs_data.src_rect_size.y;
+ break;
+ }
+ case MODE_SIMPLE:
+ default: {
+ vEdge.yw = vec2(1.0);
+ vUv.y = (local_pos.y - dest_rect.p0.y) / dest_rect.size.y;
+ break;
+ }
+ }
+
+ vUv *= vi.local_pos.w;
+ vec2 uv0 = res.uv_rect.p0;
+ vec2 uv1 = res.uv_rect.p1;
+ vUvBounds = vec4(uv0 + vec2(0.5), uv1 - vec2(0.5)) / texture_size.xyxy;
+ vUvBounds_NoClamp = vec4(uv0, uv1) / texture_size.xyxy;
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+void main(void) {
+ vec2 uv_linear = vUv / vLocalPos.w;
+ vec2 uv = clamp(uv_linear, vec2(0.0), vEdge.xy);
+ uv += max(vec2(0.0), uv_linear - vEdge.zw);
+ uv = mix(vUvBounds_NoClamp.xy, vUvBounds_NoClamp.zw, uv);
+ uv = clamp(uv, vUvBounds.xy, vUvBounds.zw);
+
+ float in_shadow_rect = init_transform_rough_fs(vLocalPos.xy / vLocalPos.w);
+
+ float texel = TEX_SAMPLE(sColor0, vec3(uv, vLayer)).r;
+
+ float alpha = mix(texel, 1.0 - texel, vClipMode);
+ float result = vLocalPos.w > 0.0 ? mix(vClipMode, alpha, in_shadow_rect) : 0.0;
+
+ oFragColor = vec4(result);
+}
+#endif
diff --git a/third_party/webrender/webrender/res/cs_clip_image.glsl b/third_party/webrender/webrender/res/cs_clip_image.glsl
new file mode 100644
index 00000000000..918223343d2
--- /dev/null
+++ b/third_party/webrender/webrender/res/cs_clip_image.glsl
@@ -0,0 +1,73 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared,clip_shared
+
+varying vec4 vLocalPos;
+varying vec2 vClipMaskImageUv;
+
+flat varying vec4 vClipMaskUvRect;
+flat varying vec4 vClipMaskUvInnerRect;
+flat varying float vLayer;
+
+#ifdef WR_VERTEX_SHADER
+struct ImageMaskData {
+ vec2 local_mask_size;
+};
+
+ImageMaskData fetch_mask_data(ivec2 address) {
+ vec4 data = fetch_from_gpu_cache_1_direct(address);
+ ImageMaskData mask_data = ImageMaskData(data.xy);
+ return mask_data;
+}
+
+void main(void) {
+ ClipMaskInstance cmi = fetch_clip_item();
+ Transform clip_transform = fetch_transform(cmi.clip_transform_id);
+ Transform prim_transform = fetch_transform(cmi.prim_transform_id);
+ ImageMaskData mask = fetch_mask_data(cmi.clip_data_address);
+ RectWithSize local_rect = RectWithSize(cmi.local_pos, mask.local_mask_size);
+ ImageResource res = fetch_image_resource_direct(cmi.resource_address);
+
+ ClipVertexInfo vi = write_clip_tile_vertex(
+ local_rect,
+ prim_transform,
+ clip_transform,
+ cmi.sub_rect,
+ cmi.task_origin,
+ cmi.screen_origin,
+ cmi.device_pixel_scale
+ );
+ vLocalPos = vi.local_pos;
+ vLayer = res.layer;
+ vClipMaskImageUv = (vi.local_pos.xy - cmi.tile_rect.p0 * vi.local_pos.w) / cmi.tile_rect.size;
+
+ vec2 texture_size = vec2(textureSize(sColor0, 0));
+ vClipMaskUvRect = vec4(res.uv_rect.p0, res.uv_rect.p1 - res.uv_rect.p0) / texture_size.xyxy;
+ // applying a half-texel offset to the UV boundaries to prevent linear samples from the outside
+ vec4 inner_rect = vec4(res.uv_rect.p0, res.uv_rect.p1);
+ vClipMaskUvInnerRect = (inner_rect + vec4(0.5, 0.5, -0.5, -0.5)) / texture_size.xyxy;
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+void main(void) {
+ vec2 local_pos = vLocalPos.xy / vLocalPos.w;
+ float alpha = vLocalPos.w > 0.0 ? init_transform_fs(local_pos) : 0.0;
+
+ // TODO: Handle repeating masks?
+ vec2 clamped_mask_uv = clamp(vClipMaskImageUv, vec2(0.0, 0.0), vLocalPos.ww);
+
+ // Ensure we don't draw outside of our tile.
+ // FIXME(emilio): Can we do this earlier?
+ if (clamped_mask_uv != vClipMaskImageUv)
+ discard;
+
+ vec2 source_uv = clamp(
+ clamped_mask_uv / vLocalPos.w * vClipMaskUvRect.zw + vClipMaskUvRect.xy,
+ vClipMaskUvInnerRect.xy, vClipMaskUvInnerRect.zw);
+ float clip_alpha = texture(sColor0, vec3(source_uv, vLayer)).r; //careful: texture has type A8
+ oFragColor = vec4(alpha * clip_alpha, 1.0, 1.0, 1.0);
+}
+#endif
diff --git a/third_party/webrender/webrender/res/cs_clip_rectangle.glsl b/third_party/webrender/webrender/res/cs_clip_rectangle.glsl
new file mode 100644
index 00000000000..dfbf60ed41f
--- /dev/null
+++ b/third_party/webrender/webrender/res/cs_clip_rectangle.glsl
@@ -0,0 +1,158 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared,clip_shared,ellipse
+
+varying vec4 vLocalPos;
+#ifdef WR_FEATURE_FAST_PATH
+flat varying vec3 vClipParams; // xy = box size, z = radius
+#else
+flat varying vec4 vClipCenter_Radius_TL;
+flat varying vec4 vClipCenter_Radius_TR;
+flat varying vec4 vClipCenter_Radius_BL;
+flat varying vec4 vClipCenter_Radius_BR;
+#endif
+
+flat varying float vClipMode;
+
+#ifdef WR_VERTEX_SHADER
+struct ClipRect {
+ RectWithSize rect;
+ vec4 mode;
+};
+
+ClipRect fetch_clip_rect(ivec2 address) {
+ vec4 data[2] = fetch_from_gpu_cache_2_direct(address);
+ ClipRect rect = ClipRect(RectWithSize(data[0].xy, data[0].zw), data[1]);
+ return rect;
+}
+
+struct ClipCorner {
+ RectWithSize rect;
+ vec4 outer_inner_radius;
+};
+
+// index is of type float instead of int because using an int led to shader
+// miscompilations with a macOS 10.12 Intel driver.
+ClipCorner fetch_clip_corner(ivec2 address, float index) {
+ address += ivec2(2 + 2 * int(index), 0);
+ vec4 data[2] = fetch_from_gpu_cache_2_direct(address);
+ ClipCorner corner = ClipCorner(RectWithSize(data[0].xy, data[0].zw), data[1]);
+ return corner;
+}
+
+struct ClipData {
+ ClipRect rect;
+ ClipCorner top_left;
+ ClipCorner top_right;
+ ClipCorner bottom_left;
+ ClipCorner bottom_right;
+};
+
+ClipData fetch_clip(ivec2 address) {
+ ClipData clip;
+
+ clip.rect = fetch_clip_rect(address);
+ clip.top_left = fetch_clip_corner(address, 0.0);
+ clip.top_right = fetch_clip_corner(address, 1.0);
+ clip.bottom_left = fetch_clip_corner(address, 2.0);
+ clip.bottom_right = fetch_clip_corner(address, 3.0);
+
+ return clip;
+}
+
+void main(void) {
+ ClipMaskInstance cmi = fetch_clip_item();
+ Transform clip_transform = fetch_transform(cmi.clip_transform_id);
+ Transform prim_transform = fetch_transform(cmi.prim_transform_id);
+ ClipData clip = fetch_clip(cmi.clip_data_address);
+
+ RectWithSize local_rect = clip.rect.rect;
+ local_rect.p0 = cmi.local_pos;
+
+ ClipVertexInfo vi = write_clip_tile_vertex(
+ local_rect,
+ prim_transform,
+ clip_transform,
+ cmi.sub_rect,
+ cmi.task_origin,
+ cmi.screen_origin,
+ cmi.device_pixel_scale
+ );
+
+ vClipMode = clip.rect.mode.x;
+ vLocalPos = vi.local_pos;
+
+#ifdef WR_FEATURE_FAST_PATH
+ // If the radii are all uniform, we can use a much simpler 2d
+ // signed distance function to get a rounded rect clip.
+ vec2 half_size = 0.5 * local_rect.size;
+ float radius = clip.top_left.outer_inner_radius.x;
+ vLocalPos.xy -= (half_size + cmi.local_pos) * vi.local_pos.w;
+ vClipParams = vec3(half_size - vec2(radius), radius);
+#else
+ RectWithEndpoint clip_rect = to_rect_with_endpoint(local_rect);
+
+ vec2 r_tl = clip.top_left.outer_inner_radius.xy;
+ vec2 r_tr = clip.top_right.outer_inner_radius.xy;
+ vec2 r_br = clip.bottom_right.outer_inner_radius.xy;
+ vec2 r_bl = clip.bottom_left.outer_inner_radius.xy;
+
+ vClipCenter_Radius_TL = vec4(clip_rect.p0 + r_tl, r_tl);
+
+ vClipCenter_Radius_TR = vec4(clip_rect.p1.x - r_tr.x,
+ clip_rect.p0.y + r_tr.y,
+ r_tr);
+
+ vClipCenter_Radius_BR = vec4(clip_rect.p1 - r_br, r_br);
+
+ vClipCenter_Radius_BL = vec4(clip_rect.p0.x + r_bl.x,
+ clip_rect.p1.y - r_bl.y,
+ r_bl);
+#endif
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+
+#ifdef WR_FEATURE_FAST_PATH
+// See http://www.iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm
+float sd_box(in vec2 pos, in vec2 box_size) {
+ vec2 d = abs(pos) - box_size;
+ return length(max(d, vec2(0.0))) + min(max(d.x,d.y), 0.0);
+}
+
+float sd_rounded_box(in vec2 pos, in vec2 box_size, in float radius) {
+ return sd_box(pos, box_size) - radius;
+}
+#endif
+
+void main(void) {
+ vec2 local_pos = vLocalPos.xy / vLocalPos.w;
+ float aa_range = compute_aa_range(local_pos);
+
+#ifdef WR_FEATURE_FAST_PATH
+ float d = sd_rounded_box(local_pos, vClipParams.xy, vClipParams.z);
+ float f = distance_aa(aa_range, d);
+ float final_alpha = mix(f, 1.0 - f, vClipMode);
+#else
+ float alpha = init_transform_fs(local_pos);
+
+ float clip_alpha = rounded_rect(local_pos,
+ vClipCenter_Radius_TL,
+ vClipCenter_Radius_TR,
+ vClipCenter_Radius_BR,
+ vClipCenter_Radius_BL,
+ aa_range);
+
+ float combined_alpha = alpha * clip_alpha;
+
+ // Select alpha or inverse alpha depending on clip in/out.
+ float final_alpha = mix(combined_alpha, 1.0 - combined_alpha, vClipMode);
+#endif
+
+ float final_final_alpha = vLocalPos.w > 0.0 ? final_alpha : 0.0;
+ oFragColor = vec4(final_final_alpha, 0.0, 0.0, 1.0);
+}
+#endif
diff --git a/third_party/webrender/webrender/res/cs_gradient.glsl b/third_party/webrender/webrender/res/cs_gradient.glsl
new file mode 100644
index 00000000000..6e6b5c4ad06
--- /dev/null
+++ b/third_party/webrender/webrender/res/cs_gradient.glsl
@@ -0,0 +1,56 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared
+
+varying float vPos;
+flat varying vec4 vStops;
+flat varying vec4 vColor0;
+flat varying vec4 vColor1;
+flat varying vec4 vColor2;
+flat varying vec4 vColor3;
+
+#ifdef WR_VERTEX_SHADER
+
+PER_INSTANCE in vec4 aTaskRect;
+PER_INSTANCE in float aAxisSelect;
+PER_INSTANCE in vec4 aStops;
+PER_INSTANCE in vec4 aColor0;
+PER_INSTANCE in vec4 aColor1;
+PER_INSTANCE in vec4 aColor2;
+PER_INSTANCE in vec4 aColor3;
+PER_INSTANCE in vec2 aStartStop;
+
+void main(void) {
+ vPos = mix(aStartStop.x, aStartStop.y, mix(aPosition.x, aPosition.y, aAxisSelect));
+
+ vStops = aStops;
+ vColor0 = aColor0;
+ vColor1 = aColor1;
+ vColor2 = aColor2;
+ vColor3 = aColor3;
+
+ gl_Position = uTransform * vec4(aTaskRect.xy + aTaskRect.zw * aPosition.xy, 0.0, 1.0);
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+float linear_step(float edge0, float edge1, float x) {
+ if (edge0 >= edge1) {
+ return 0.0;
+ }
+
+ return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
+}
+
+void main(void) {
+ vec4 color = vColor0;
+
+ color = mix(color, vColor1, linear_step(vStops.x, vStops.y, vPos));
+ color = mix(color, vColor2, linear_step(vStops.y, vStops.z, vPos));
+ color = mix(color, vColor3, linear_step(vStops.z, vStops.w, vPos));
+
+ oFragColor = color;
+}
+#endif
diff --git a/third_party/webrender/webrender/res/cs_line_decoration.glsl b/third_party/webrender/webrender/res/cs_line_decoration.glsl
new file mode 100644
index 00000000000..7063bcffb12
--- /dev/null
+++ b/third_party/webrender/webrender/res/cs_line_decoration.glsl
@@ -0,0 +1,163 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared
+
+#define LINE_STYLE_SOLID 0
+#define LINE_STYLE_DOTTED 1
+#define LINE_STYLE_DASHED 2
+#define LINE_STYLE_WAVY 3
+
+// Fragment position in the coordinate system used for positioning decorations.
+// To keep the code independent of whether the line is horizontal or vertical,
+// vLocalPos.x is always parallel, and .y always perpendicular, to the line
+// being decorated.
+varying vec2 vLocalPos;
+
+flat varying int vStyle;
+flat varying vec4 vParams;
+
+#ifdef WR_VERTEX_SHADER
+
+// The size of the mask tile we're rendering, in pixels.
+PER_INSTANCE in vec4 aTaskRect;
+
+// The size of the mask tile. aLocalSize.x is always horizontal and .y vertical,
+// regardless of the line's orientation. The size is chosen by
+// prim_store::get_line_decoration_sizes.
+PER_INSTANCE in vec2 aLocalSize;
+
+// A LINE_STYLE_* value, indicating what sort of line to draw.
+PER_INSTANCE in int aStyle;
+
+// 0.0 for a horizontal line, 1.0 for a vertical line.
+PER_INSTANCE in float aAxisSelect;
+
+// The thickness of the wavy line itself, not the amplitude of the waves (i.e.,
+// the thickness of the final decorated line).
+PER_INSTANCE in float aWavyLineThickness;
+
+void main(void) {
+ vec2 size = mix(aLocalSize, aLocalSize.yx, aAxisSelect);
+ vStyle = aStyle;
+
+ switch (vStyle) {
+ case LINE_STYLE_SOLID: {
+ break;
+ }
+ case LINE_STYLE_DASHED: {
+ vParams = vec4(size.x, // period
+ 0.5 * size.x, // dash length
+ 0.0,
+ 0.0);
+ break;
+ }
+ case LINE_STYLE_DOTTED: {
+ float diameter = size.y;
+ float period = diameter * 2.0;
+ float center_line = 0.5 * size.y;
+ vParams = vec4(period,
+ diameter / 2.0, // radius
+ center_line,
+ 0.0);
+ break;
+ }
+ case LINE_STYLE_WAVY: {
+ // This logic copied from gecko to get the same results
+ float line_thickness = max(aWavyLineThickness, 1.0);
+ // Difference in height between peaks and troughs
+ // (and since slopes are 45 degrees, the length of each slope)
+ float slope_length = size.y - line_thickness;
+ // Length of flat runs
+ float flat_length = max((line_thickness - 1.0) * 2.0, 1.0);
+
+ vParams = vec4(line_thickness / 2.0,
+ slope_length,
+ flat_length,
+ size.y);
+ break;
+ }
+ default:
+ vParams = vec4(0.0);
+ }
+
+ vLocalPos = mix(aPosition.xy, aPosition.yx, aAxisSelect) * size;
+
+ gl_Position = uTransform * vec4(aTaskRect.xy + aTaskRect.zw * aPosition.xy, 0.0, 1.0);
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+
+#define MAGIC_WAVY_LINE_AA_SNAP 0.5
+
+void main(void) {
+ // Find the appropriate distance to apply the step over.
+ vec2 pos = vLocalPos;
+ float aa_range = compute_aa_range(pos);
+ float alpha = 1.0;
+
+ switch (vStyle) {
+ case LINE_STYLE_SOLID: {
+ break;
+ }
+ case LINE_STYLE_DASHED: {
+ // Calculate dash alpha (on/off) based on dash length
+ alpha = step(floor(pos.x + 0.5), vParams.y);
+ break;
+ }
+ case LINE_STYLE_DOTTED: {
+ // Get the dot alpha
+ vec2 dot_relative_pos = pos - vParams.yz;
+ float dot_distance = length(dot_relative_pos) - vParams.y;
+ alpha = distance_aa(aa_range, dot_distance);
+ break;
+ }
+ case LINE_STYLE_WAVY: {
+ float half_line_thickness = vParams.x;
+ float slope_length = vParams.y;
+ float flat_length = vParams.z;
+ float vertical_bounds = vParams.w;
+ // Our pattern is just two slopes and two flats
+ float half_period = slope_length + flat_length;
+
+ float mid_height = vertical_bounds / 2.0;
+ float peak_offset = mid_height - half_line_thickness;
+ // Flip the wave every half period
+ float flip = -2.0 * (step(mod(pos.x, 2.0 * half_period), half_period) - 0.5);
+ // float flip = -1.0;
+ peak_offset *= flip;
+ float peak_height = mid_height + peak_offset;
+
+ // Convert pos to a local position within one half period
+ pos.x = mod(pos.x, half_period);
+
+ // Compute signed distance to the 3 lines that make up an arc
+ float dist1 = distance_to_line(vec2(0.0, peak_height),
+ vec2(1.0, -flip),
+ pos);
+ float dist2 = distance_to_line(vec2(0.0, peak_height),
+ vec2(0, -flip),
+ pos);
+ float dist3 = distance_to_line(vec2(flat_length, peak_height),
+ vec2(-1.0, -flip),
+ pos);
+ float dist = abs(max(max(dist1, dist2), dist3));
+
+ // Apply AA based on the thickness of the wave
+ alpha = distance_aa(aa_range, dist - half_line_thickness);
+
+ // Disable AA for thin lines
+ if (half_line_thickness <= 1.0) {
+ alpha = 1.0 - step(alpha, MAGIC_WAVY_LINE_AA_SNAP);
+ }
+
+ break;
+ }
+ default: break;
+ }
+
+ oFragColor = vec4(alpha);
+}
+#endif
diff --git a/third_party/webrender/webrender/res/cs_scale.glsl b/third_party/webrender/webrender/res/cs_scale.glsl
new file mode 100644
index 00000000000..6d0c0e59982
--- /dev/null
+++ b/third_party/webrender/webrender/res/cs_scale.glsl
@@ -0,0 +1,40 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared,prim_shared
+
+varying vec3 vUv;
+flat varying vec4 vUvRect;
+
+#ifdef WR_VERTEX_SHADER
+
+PER_INSTANCE in vec4 aScaleTargetRect;
+PER_INSTANCE in ivec4 aScaleSourceRect;
+PER_INSTANCE in int aScaleSourceLayer;
+
+void main(void) {
+ RectWithSize src_rect = RectWithSize(vec2(aScaleSourceRect.xy), vec2(aScaleSourceRect.zw));
+
+ vec2 texture_size = vec2(textureSize(sColor0, 0).xy);
+ vUv.z = float(aScaleSourceLayer);
+
+ vUvRect = vec4(src_rect.p0 + vec2(0.5),
+ src_rect.p0 + src_rect.size - vec2(0.5)) / texture_size.xyxy;
+
+ vec2 pos = aScaleTargetRect.xy + aScaleTargetRect.zw * aPosition.xy;
+ vUv.xy = (src_rect.p0 + src_rect.size * aPosition.xy) / texture_size;
+
+ gl_Position = uTransform * vec4(pos, 0.0, 1.0);
+}
+
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+
+void main(void) {
+ vec2 st = clamp(vUv.xy, vUvRect.xy, vUvRect.zw);
+ oFragColor = texture(sColor0, vec3(st, vUv.z));
+}
+
+#endif
diff --git a/third_party/webrender/webrender/res/cs_svg_filter.glsl b/third_party/webrender/webrender/res/cs_svg_filter.glsl
new file mode 100644
index 00000000000..cfb6dd13cfa
--- /dev/null
+++ b/third_party/webrender/webrender/res/cs_svg_filter.glsl
@@ -0,0 +1,591 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared,prim_shared
+
+varying vec3 vInput1Uv;
+varying vec3 vInput2Uv;
+flat varying vec4 vInput1UvRect;
+flat varying vec4 vInput2UvRect;
+flat varying int vFilterInputCount;
+flat varying int vFilterKind;
+flat varying ivec4 vData;
+flat varying vec4 vFilterData0;
+flat varying vec4 vFilterData1;
+flat varying float vFloat0;
+flat varying mat4 vColorMat;
+flat varying int vFuncs[4];
+
+#define FILTER_BLEND 0
+#define FILTER_FLOOD 1
+#define FILTER_LINEAR_TO_SRGB 2
+#define FILTER_SRGB_TO_LINEAR 3
+#define FILTER_OPACITY 4
+#define FILTER_COLOR_MATRIX 5
+#define FILTER_DROP_SHADOW 6
+#define FILTER_OFFSET 7
+#define FILTER_COMPONENT_TRANSFER 8
+#define FILTER_IDENTITY 9
+#define FILTER_COMPOSITE 10
+
+#define COMPOSITE_OVER 0
+#define COMPOSITE_IN 1
+#define COMPOSITE_OUT 2
+#define COMPOSITE_ATOP 3
+#define COMPOSITE_XOR 4
+#define COMPOSITE_LIGHTER 5
+#define COMPOSITE_ARITHMETIC 6
+
+#ifdef WR_VERTEX_SHADER
+
+PER_INSTANCE in int aFilterRenderTaskAddress;
+PER_INSTANCE in int aFilterInput1TaskAddress;
+PER_INSTANCE in int aFilterInput2TaskAddress;
+PER_INSTANCE in int aFilterKind;
+PER_INSTANCE in int aFilterInputCount;
+PER_INSTANCE in int aFilterGenericInt;
+PER_INSTANCE in ivec2 aFilterExtraDataAddress;
+
+struct FilterTask {
+ RenderTaskCommonData common_data;
+ vec3 user_data;
+};
+
+FilterTask fetch_filter_task(int address) {
+ RenderTaskData task_data = fetch_render_task_data(address);
+
+ FilterTask task = FilterTask(
+ task_data.common_data,
+ task_data.user_data.xyz
+ );
+
+ return task;
+}
+
+vec4 compute_uv_rect(RenderTaskCommonData task, vec2 texture_size) {
+ RectWithSize task_rect = task.task_rect;
+
+ vec4 uvRect = vec4(task_rect.p0 + vec2(0.5),
+ task_rect.p0 + task_rect.size - vec2(0.5));
+ uvRect /= texture_size.xyxy;
+ return uvRect;
+}
+
+vec3 compute_uv(RenderTaskCommonData task, vec2 texture_size) {
+ RectWithSize task_rect = task.task_rect;
+ vec3 uv = vec3(0.0, 0.0, task.texture_layer_index);
+
+ vec2 uv0 = task_rect.p0 / texture_size;
+ vec2 uv1 = floor(task_rect.p0 + task_rect.size) / texture_size;
+ uv.xy = mix(uv0, uv1, aPosition.xy);
+
+ return uv;
+}
+
+void main(void) {
+ FilterTask filter_task = fetch_filter_task(aFilterRenderTaskAddress);
+ RectWithSize target_rect = filter_task.common_data.task_rect;
+
+ vec2 pos = target_rect.p0 + target_rect.size * aPosition.xy;
+
+ RenderTaskCommonData input_1_task;
+ if (aFilterInputCount > 0) {
+ vec2 texture_size = vec2(textureSize(sColor0, 0).xy);
+ input_1_task = fetch_render_task_common_data(aFilterInput1TaskAddress);
+ vInput1UvRect = compute_uv_rect(input_1_task, texture_size);
+ vInput1Uv = compute_uv(input_1_task, texture_size);
+ }
+
+ RenderTaskCommonData input_2_task;
+ if (aFilterInputCount > 1) {
+ vec2 texture_size = vec2(textureSize(sColor1, 0).xy);
+ input_2_task = fetch_render_task_common_data(aFilterInput2TaskAddress);
+ vInput2UvRect = compute_uv_rect(input_2_task, texture_size);
+ vInput2Uv = compute_uv(input_2_task, texture_size);
+ }
+
+ vFilterInputCount = aFilterInputCount;
+ vFilterKind = aFilterKind;
+
+ // This assignment is only used for component transfer filters but this
+ // assignment has to be done here and not in the component transfer case
+ // below because it doesn't get executed on Windows because of a suspected
+ // miscompile of this shader on Windows. See
+ // https://github.com/servo/webrender/wiki/Driver-issues#bug-1505871---assignment-to-varying-flat-arrays-inside-switch-statement-of-vertex-shader-suspected-miscompile-on-windows
+ // default: just to satisfy angle_shader_validation.rs which needs one
+ // default: for every switch, even in comments.
+ vFuncs[0] = (aFilterGenericInt >> 12) & 0xf; // R
+ vFuncs[1] = (aFilterGenericInt >> 8) & 0xf; // G
+ vFuncs[2] = (aFilterGenericInt >> 4) & 0xf; // B
+ vFuncs[3] = (aFilterGenericInt) & 0xf; // A
+
+ switch (aFilterKind) {
+ case FILTER_BLEND:
+ vData = ivec4(aFilterGenericInt, 0, 0, 0);
+ break;
+ case FILTER_FLOOD:
+ vFilterData0 = fetch_from_gpu_cache_1_direct(aFilterExtraDataAddress);
+ break;
+ case FILTER_OPACITY:
+ vFloat0 = filter_task.user_data.x;
+ break;
+ case FILTER_COLOR_MATRIX:
+ vec4 mat_data[4] = fetch_from_gpu_cache_4_direct(aFilterExtraDataAddress);
+ vColorMat = mat4(mat_data[0], mat_data[1], mat_data[2], mat_data[3]);
+ vFilterData0 = fetch_from_gpu_cache_1_direct(aFilterExtraDataAddress + ivec2(4, 0));
+ break;
+ case FILTER_DROP_SHADOW:
+ vFilterData0 = fetch_from_gpu_cache_1_direct(aFilterExtraDataAddress);
+ break;
+ case FILTER_OFFSET:
+ vec2 texture_size = vec2(textureSize(sColor0, 0).xy);
+ vFilterData0 = vec4(-filter_task.user_data.xy / texture_size, vec2(0.0));
+
+ RectWithSize task_rect = input_1_task.task_rect;
+ vec4 clipRect = vec4(task_rect.p0, task_rect.p0 + task_rect.size);
+ clipRect /= texture_size.xyxy;
+ vFilterData1 = clipRect;
+ break;
+ case FILTER_COMPONENT_TRANSFER:
+ vData = ivec4(aFilterExtraDataAddress, 0, 0);
+ break;
+ case FILTER_COMPOSITE:
+ vData = ivec4(aFilterGenericInt, 0, 0, 0);
+ if (aFilterGenericInt == COMPOSITE_ARITHMETIC) {
+ vFilterData0 = fetch_from_gpu_cache_1_direct(aFilterExtraDataAddress);
+ }
+ break;
+ default:
+ break;
+ }
+
+ gl_Position = uTransform * vec4(pos, 0.0, 1.0);
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+
+#define COMPONENT_TRANSFER_IDENTITY 0
+#define COMPONENT_TRANSFER_TABLE 1
+#define COMPONENT_TRANSFER_DISCRETE 2
+#define COMPONENT_TRANSFER_LINEAR 3
+#define COMPONENT_TRANSFER_GAMMA 4
+
+vec3 Multiply(vec3 Cb, vec3 Cs) {
+ return Cb * Cs;
+}
+
+vec3 Screen(vec3 Cb, vec3 Cs) {
+ return Cb + Cs - (Cb * Cs);
+}
+
+vec3 HardLight(vec3 Cb, vec3 Cs) {
+ vec3 m = Multiply(Cb, 2.0 * Cs);
+ vec3 s = Screen(Cb, 2.0 * Cs - 1.0);
+ vec3 edge = vec3(0.5, 0.5, 0.5);
+ return mix(m, s, step(edge, Cs));
+}
+
+// TODO: Worth doing with mix/step? Check GLSL output.
+float ColorDodge(float Cb, float Cs) {
+ if (Cb == 0.0)
+ return 0.0;
+ else if (Cs == 1.0)
+ return 1.0;
+ else
+ return min(1.0, Cb / (1.0 - Cs));
+}
+
+// TODO: Worth doing with mix/step? Check GLSL output.
+float ColorBurn(float Cb, float Cs) {
+ if (Cb == 1.0)
+ return 1.0;
+ else if (Cs == 0.0)
+ return 0.0;
+ else
+ return 1.0 - min(1.0, (1.0 - Cb) / Cs);
+}
+
+float SoftLight(float Cb, float Cs) {
+ if (Cs <= 0.5) {
+ return Cb - (1.0 - 2.0 * Cs) * Cb * (1.0 - Cb);
+ } else {
+ float D;
+
+ if (Cb <= 0.25)
+ D = ((16.0 * Cb - 12.0) * Cb + 4.0) * Cb;
+ else
+ D = sqrt(Cb);
+
+ return Cb + (2.0 * Cs - 1.0) * (D - Cb);
+ }
+}
+
+vec3 Difference(vec3 Cb, vec3 Cs) {
+ return abs(Cb - Cs);
+}
+
+vec3 Exclusion(vec3 Cb, vec3 Cs) {
+ return Cb + Cs - 2.0 * Cb * Cs;
+}
+
+// These functions below are taken from the spec.
+// There's probably a much quicker way to implement
+// them in GLSL...
+float Sat(vec3 c) {
+ return max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b));
+}
+
+float Lum(vec3 c) {
+ vec3 f = vec3(0.3, 0.59, 0.11);
+ return dot(c, f);
+}
+
+vec3 ClipColor(vec3 C) {
+ float L = Lum(C);
+ float n = min(C.r, min(C.g, C.b));
+ float x = max(C.r, max(C.g, C.b));
+
+ if (n < 0.0)
+ C = L + (((C - L) * L) / (L - n));
+
+ if (x > 1.0)
+ C = L + (((C - L) * (1.0 - L)) / (x - L));
+
+ return C;
+}
+
+vec3 SetLum(vec3 C, float l) {
+ float d = l - Lum(C);
+ return ClipColor(C + d);
+}
+
+void SetSatInner(inout float Cmin, inout float Cmid, inout float Cmax, float s) {
+ if (Cmax > Cmin) {
+ Cmid = (((Cmid - Cmin) * s) / (Cmax - Cmin));
+ Cmax = s;
+ } else {
+ Cmid = 0.0;
+ Cmax = 0.0;
+ }
+ Cmin = 0.0;
+}
+
+vec3 SetSat(vec3 C, float s) {
+ if (C.r <= C.g) {
+ if (C.g <= C.b) {
+ SetSatInner(C.r, C.g, C.b, s);
+ } else {
+ if (C.r <= C.b) {
+ SetSatInner(C.r, C.b, C.g, s);
+ } else {
+ SetSatInner(C.b, C.r, C.g, s);
+ }
+ }
+ } else {
+ if (C.r <= C.b) {
+ SetSatInner(C.g, C.r, C.b, s);
+ } else {
+ if (C.g <= C.b) {
+ SetSatInner(C.g, C.b, C.r, s);
+ } else {
+ SetSatInner(C.b, C.g, C.r, s);
+ }
+ }
+ }
+ return C;
+}
+
+vec3 Hue(vec3 Cb, vec3 Cs) {
+ return SetLum(SetSat(Cs, Sat(Cb)), Lum(Cb));
+}
+
+vec3 Saturation(vec3 Cb, vec3 Cs) {
+ return SetLum(SetSat(Cb, Sat(Cs)), Lum(Cb));
+}
+
+vec3 Color(vec3 Cb, vec3 Cs) {
+ return SetLum(Cs, Lum(Cb));
+}
+
+vec3 Luminosity(vec3 Cb, vec3 Cs) {
+ return SetLum(Cb, Lum(Cs));
+}
+
+const int BlendMode_Normal = 0;
+const int BlendMode_Multiply = 1;
+const int BlendMode_Screen = 2;
+const int BlendMode_Overlay = 3;
+const int BlendMode_Darken = 4;
+const int BlendMode_Lighten = 5;
+const int BlendMode_ColorDodge = 6;
+const int BlendMode_ColorBurn = 7;
+const int BlendMode_HardLight = 8;
+const int BlendMode_SoftLight = 9;
+const int BlendMode_Difference = 10;
+const int BlendMode_Exclusion = 11;
+const int BlendMode_Hue = 12;
+const int BlendMode_Saturation = 13;
+const int BlendMode_Color = 14;
+const int BlendMode_Luminosity = 15;
+
+vec4 blend(vec4 Cs, vec4 Cb, int mode) {
+ vec4 result = vec4(1.0, 0.0, 0.0, 1.0);
+
+ switch (mode) {
+ case BlendMode_Normal:
+ result.rgb = Cs.rgb;
+ break;
+ case BlendMode_Multiply:
+ result.rgb = Multiply(Cb.rgb, Cs.rgb);
+ break;
+ case BlendMode_Screen:
+ result.rgb = Screen(Cb.rgb, Cs.rgb);
+ break;
+ case BlendMode_Overlay:
+ // Overlay is inverse of Hardlight
+ result.rgb = HardLight(Cs.rgb, Cb.rgb);
+ break;
+ case BlendMode_Darken:
+ result.rgb = min(Cs.rgb, Cb.rgb);
+ break;
+ case BlendMode_Lighten:
+ result.rgb = max(Cs.rgb, Cb.rgb);
+ break;
+ case BlendMode_ColorDodge:
+ result.r = ColorDodge(Cb.r, Cs.r);
+ result.g = ColorDodge(Cb.g, Cs.g);
+ result.b = ColorDodge(Cb.b, Cs.b);
+ break;
+ case BlendMode_ColorBurn:
+ result.r = ColorBurn(Cb.r, Cs.r);
+ result.g = ColorBurn(Cb.g, Cs.g);
+ result.b = ColorBurn(Cb.b, Cs.b);
+ break;
+ case BlendMode_HardLight:
+ result.rgb = HardLight(Cb.rgb, Cs.rgb);
+ break;
+ case BlendMode_SoftLight:
+ result.r = SoftLight(Cb.r, Cs.r);
+ result.g = SoftLight(Cb.g, Cs.g);
+ result.b = SoftLight(Cb.b, Cs.b);
+ break;
+ case BlendMode_Difference:
+ result.rgb = Difference(Cb.rgb, Cs.rgb);
+ break;
+ case BlendMode_Exclusion:
+ result.rgb = Exclusion(Cb.rgb, Cs.rgb);
+ break;
+ case BlendMode_Hue:
+ result.rgb = Hue(Cb.rgb, Cs.rgb);
+ break;
+ case BlendMode_Saturation:
+ result.rgb = Saturation(Cb.rgb, Cs.rgb);
+ break;
+ case BlendMode_Color:
+ result.rgb = Color(Cb.rgb, Cs.rgb);
+ break;
+ case BlendMode_Luminosity:
+ result.rgb = Luminosity(Cb.rgb, Cs.rgb);
+ break;
+ default: break;
+ }
+ vec3 rgb = (1.0 - Cb.a) * Cs.rgb + Cb.a * result.rgb;
+ result = mix(vec4(Cb.rgb * Cb.a, Cb.a), vec4(rgb, 1.0), Cs.a);
+ return result;
+}
+
+// Based on the Gecko's implementation in
+// https://hg.mozilla.org/mozilla-central/file/91b4c3687d75/gfx/src/FilterSupport.cpp#l24
+// These could be made faster by sampling a lookup table stored in a float texture
+// with linear interpolation.
+
+vec3 SrgbToLinear(vec3 color) {
+ vec3 c1 = color / 12.92;
+ vec3 c2 = pow(color / 1.055 + vec3(0.055 / 1.055), vec3(2.4));
+ return if_then_else(lessThanEqual(color, vec3(0.04045)), c1, c2);
+}
+
+vec3 LinearToSrgb(vec3 color) {
+ vec3 c1 = color * 12.92;
+ vec3 c2 = vec3(1.055) * pow(color, vec3(1.0 / 2.4)) - vec3(0.055);
+ return if_then_else(lessThanEqual(color, vec3(0.0031308)), c1, c2);
+}
+
+// This function has to be factored out due to the following issue:
+// https://github.com/servo/webrender/wiki/Driver-issues#bug-1532245---switch-statement-inside-control-flow-inside-switch-statement-fails-to-compile-on-some-android-phones
+// (and now the words "default: default:" so angle_shader_validation.rs passes)
+vec4 ComponentTransfer(vec4 colora) {
+ // We push a different amount of data to the gpu cache depending on the
+ // function type.
+ // Identity => 0 blocks
+ // Table/Discrete => 64 blocks (256 values)
+ // Linear => 1 block (2 values)
+ // Gamma => 1 block (3 values)
+ // We loop through the color components and increment the offset (for the
+ // next color component) into the gpu cache based on how many blocks that
+ // function type put into the gpu cache.
+ // Table/Discrete use a 256 entry look up table.
+ // Linear/Gamma are a simple calculation.
+ int offset = 0;
+ vec4 texel;
+ int k;
+
+ for (int i = 0; i < 4; i++) {
+ switch (vFuncs[i]) {
+ case COMPONENT_TRANSFER_IDENTITY:
+ break;
+ case COMPONENT_TRANSFER_TABLE:
+ case COMPONENT_TRANSFER_DISCRETE:
+ // fetch value from lookup table
+ k = int(floor(colora[i]*255.0));
+ texel = fetch_from_gpu_cache_1_direct(vData.xy + ivec2(offset + k/4, 0));
+ colora[i] = clamp(texel[k % 4], 0.0, 1.0);
+ // offset plus 256/4 blocks
+ offset = offset + 64;
+ break;
+ case COMPONENT_TRANSFER_LINEAR:
+ // fetch the two values for use in the linear equation
+ texel = fetch_from_gpu_cache_1_direct(vData.xy + ivec2(offset, 0));
+ colora[i] = clamp(texel[0] * colora[i] + texel[1], 0.0, 1.0);
+ // offset plus 1 block
+ offset = offset + 1;
+ break;
+ case COMPONENT_TRANSFER_GAMMA:
+ // fetch the three values for use in the gamma equation
+ texel = fetch_from_gpu_cache_1_direct(vData.xy + ivec2(offset, 0));
+ colora[i] = clamp(texel[0] * pow(colora[i], texel[1]) + texel[2], 0.0, 1.0);
+ // offset plus 1 block
+ offset = offset + 1;
+ break;
+ default:
+ // shouldn't happen
+ break;
+ }
+ }
+ return colora;
+}
+
+// Composite Filter
+
+vec4 composite(vec4 Cs, vec4 Cb, int mode) {
+ vec4 Cr = vec4(0.0, 1.0, 0.0, 1.0);
+ switch (mode) {
+ case COMPOSITE_OVER:
+ Cr.rgb = Cs.a * Cs.rgb + Cb.a * Cb.rgb * (1.0 - Cs.a);
+ Cr.a = Cs.a + Cb.a * (1.0 - Cs.a);
+ break;
+ case COMPOSITE_IN:
+ Cr.rgb = Cs.a * Cs.rgb * Cb.a;
+ Cr.a = Cs.a * Cb.a;
+ break;
+ case COMPOSITE_OUT:
+ Cr.rgb = Cs.a * Cs.rgb * (1.0 - Cb.a);
+ Cr.a = Cs.a * (1.0 - Cb.a);
+ break;
+ case COMPOSITE_ATOP:
+ Cr.rgb = Cs.a * Cs.rgb * Cb.a + Cb.a * Cb.rgb * (1.0 - Cs.a);
+ Cr.a = Cs.a * Cb.a + Cb.a * (1.0 - Cs.a);
+ break;
+ case COMPOSITE_XOR:
+ Cr.rgb = Cs.a * Cs.rgb * (1.0 - Cb.a) + Cb.a * Cb.rgb * (1.0 - Cs.a);
+ Cr.a = Cs.a * (1.0 - Cb.a) + Cb.a * (1.0 - Cs.a);
+ break;
+ case COMPOSITE_LIGHTER:
+ Cr.rgb = Cs.a * Cs.rgb + Cb.a * Cb.rgb;
+ Cr.a = Cs.a + Cb.a;
+ Cr = clamp(Cr, vec4(0.0), vec4(1.0));
+ break;
+ case COMPOSITE_ARITHMETIC:
+ Cr = vec4(vFilterData0.x) * Cs * Cb + vec4(vFilterData0.y) * Cs + vec4(vFilterData0.z) * Cb + vec4(vFilterData0.w);
+ Cr = clamp(Cr, vec4(0.0), vec4(1.0));
+ break;
+ default:
+ break;
+ }
+ return Cr;
+}
+
+vec4 sampleInUvRect(sampler2DArray sampler, vec3 uv, vec4 uvRect) {
+ vec2 clamped = clamp(uv.xy, uvRect.xy, uvRect.zw);
+ return texture(sampler, vec3(clamped, uv.z));
+}
+
+void main(void) {
+ vec4 Ca = vec4(0.0, 0.0, 0.0, 0.0);
+ vec4 Cb = vec4(0.0, 0.0, 0.0, 0.0);
+ if (vFilterInputCount > 0) {
+ Ca = sampleInUvRect(sColor0, vInput1Uv, vInput1UvRect);
+ if (Ca.a != 0.0) {
+ Ca.rgb /= Ca.a;
+ }
+ }
+ if (vFilterInputCount > 1) {
+ Cb = sampleInUvRect(sColor1, vInput2Uv, vInput2UvRect);
+ if (Cb.a != 0.0) {
+ Cb.rgb /= Cb.a;
+ }
+ }
+
+ vec4 result = vec4(1.0, 0.0, 0.0, 1.0);
+
+ bool needsPremul = true;
+
+ switch (vFilterKind) {
+ case FILTER_BLEND:
+ result = blend(Ca, Cb, vData.x);
+ needsPremul = false;
+ break;
+ case FILTER_FLOOD:
+ result = vFilterData0;
+ needsPremul = false;
+ break;
+ case FILTER_LINEAR_TO_SRGB:
+ result.rgb = LinearToSrgb(Ca.rgb);
+ result.a = Ca.a;
+ break;
+ case FILTER_SRGB_TO_LINEAR:
+ result.rgb = SrgbToLinear(Ca.rgb);
+ result.a = Ca.a;
+ break;
+ case FILTER_OPACITY:
+ result.rgb = Ca.rgb;
+ result.a = Ca.a * vFloat0;
+ break;
+ case FILTER_COLOR_MATRIX:
+ result = vColorMat * Ca + vFilterData0;
+ result = clamp(result, vec4(0.0), vec4(1.0));
+ break;
+ case FILTER_DROP_SHADOW:
+ vec4 shadow = vec4(vFilterData0.rgb, Cb.a * vFilterData0.a);
+ // Normal blend + source-over coposite
+ result = blend(Ca, shadow, BlendMode_Normal);
+ needsPremul = false;
+ break;
+ case FILTER_OFFSET:
+ vec2 offsetUv = vInput1Uv.xy + vFilterData0.xy;
+ result = sampleInUvRect(sColor0, vec3(offsetUv, vInput1Uv.z), vInput1UvRect);
+ result *= point_inside_rect(offsetUv, vFilterData1.xy, vFilterData1.zw);
+ needsPremul = false;
+ break;
+ case FILTER_COMPONENT_TRANSFER:
+ result = ComponentTransfer(Ca);
+ break;
+ case FILTER_IDENTITY:
+ result = Ca;
+ break;
+ case FILTER_COMPOSITE:
+ result = composite(Ca, Cb, vData.x);
+ needsPremul = false;
+ default:
+ break;
+ }
+
+ if (needsPremul) {
+ result.rgb *= result.a;
+ }
+
+ oFragColor = result;
+}
+#endif
diff --git a/third_party/webrender/webrender/res/debug_color.glsl b/third_party/webrender/webrender/res/debug_color.glsl
new file mode 100644
index 00000000000..b5a636e535e
--- /dev/null
+++ b/third_party/webrender/webrender/res/debug_color.glsl
@@ -0,0 +1,24 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared,shared_other
+
+varying vec4 vColor;
+
+#ifdef WR_VERTEX_SHADER
+in vec4 aColor;
+
+void main(void) {
+ vColor = vec4(aColor.rgb * aColor.a, aColor.a);
+ vec4 pos = vec4(aPosition, 0.0, 1.0);
+ pos.xy = floor(pos.xy + 0.5);
+ gl_Position = uTransform * pos;
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+void main(void) {
+ oFragColor = vColor;
+}
+#endif
diff --git a/third_party/webrender/webrender/res/debug_font.glsl b/third_party/webrender/webrender/res/debug_font.glsl
new file mode 100644
index 00000000000..5b9fb2109fb
--- /dev/null
+++ b/third_party/webrender/webrender/res/debug_font.glsl
@@ -0,0 +1,28 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared,shared_other
+
+varying vec2 vColorTexCoord;
+varying vec4 vColor;
+
+#ifdef WR_VERTEX_SHADER
+in vec4 aColor;
+in vec2 aColorTexCoord;
+
+void main(void) {
+ vColor = aColor;
+ vColorTexCoord = aColorTexCoord;
+ vec4 pos = vec4(aPosition, 0.0, 1.0);
+ pos.xy = floor(pos.xy + 0.5);
+ gl_Position = uTransform * pos;
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+void main(void) {
+ float alpha = texture(sColor0, vec3(vColorTexCoord.xy, 0.0)).r;
+ oFragColor = vColor * alpha;
+}
+#endif
diff --git a/third_party/webrender/webrender/res/ellipse.glsl b/third_party/webrender/webrender/res/ellipse.glsl
new file mode 100644
index 00000000000..1bcacaafda5
--- /dev/null
+++ b/third_party/webrender/webrender/res/ellipse.glsl
@@ -0,0 +1,93 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifdef WR_FRAGMENT_SHADER
+
+// One iteration of Newton's method on the 2D equation of an ellipse:
+//
+// E(x, y) = x^2/a^2 + y^2/b^2 - 1
+//
+// The Jacobian of this equation is:
+//
+// J(E(x, y)) = [ 2*x/a^2 2*y/b^2 ]
+//
+// We approximate the distance with:
+//
+// E(x, y) / ||J(E(x, y))||
+//
+// See G. Taubin, "Distance Approximations for Rasterizing Implicit
+// Curves", section 3.
+float distance_to_ellipse(vec2 p, vec2 radii, float aa_range) {
+ float dist;
+ if (any(lessThanEqual(radii, vec2(0.0)))) {
+ dist = length(p);
+ } else {
+ vec2 invRadiiSq = 1.0 / (radii * radii);
+ float g = dot(p * p * invRadiiSq, vec2(1.0)) - 1.0;
+ vec2 dG = 2.0 * p * invRadiiSq;
+ dist = g * inversesqrt(dot(dG, dG));
+ }
+ return clamp(dist, -aa_range, aa_range);
+}
+
+float clip_against_ellipse_if_needed(
+ vec2 pos,
+ float current_distance,
+ vec4 ellipse_center_radius,
+ vec2 sign_modifier,
+ float aa_range
+) {
+ if (!all(lessThan(sign_modifier * pos, sign_modifier * ellipse_center_radius.xy))) {
+ return current_distance;
+ }
+
+ float distance = distance_to_ellipse(pos - ellipse_center_radius.xy,
+ ellipse_center_radius.zw,
+ aa_range);
+
+ return max(distance, current_distance);
+}
+
+float rounded_rect(vec2 pos,
+ vec4 clip_center_radius_tl,
+ vec4 clip_center_radius_tr,
+ vec4 clip_center_radius_br,
+ vec4 clip_center_radius_bl,
+ float aa_range) {
+ // Start with a negative value (means "inside") for all fragments that are not
+ // in a corner. If the fragment is in a corner, one of the clip_against_ellipse_if_needed
+ // calls below will update it.
+ float current_distance = -aa_range;
+
+ // Clip against each ellipse.
+ current_distance = clip_against_ellipse_if_needed(pos,
+ current_distance,
+ clip_center_radius_tl,
+ vec2(1.0),
+ aa_range);
+
+ current_distance = clip_against_ellipse_if_needed(pos,
+ current_distance,
+ clip_center_radius_tr,
+ vec2(-1.0, 1.0),
+ aa_range);
+
+ current_distance = clip_against_ellipse_if_needed(pos,
+ current_distance,
+ clip_center_radius_br,
+ vec2(-1.0),
+ aa_range);
+
+ current_distance = clip_against_ellipse_if_needed(pos,
+ current_distance,
+ clip_center_radius_bl,
+ vec2(1.0, -1.0),
+ aa_range);
+
+ // Apply AA
+ // See comment in ps_border_corner about the choice of constants.
+
+ return distance_aa(aa_range, current_distance);
+}
+#endif
diff --git a/third_party/webrender/webrender/res/gpu_cache.glsl b/third_party/webrender/webrender/res/gpu_cache.glsl
new file mode 100644
index 00000000000..e3ff0f43976
--- /dev/null
+++ b/third_party/webrender/webrender/res/gpu_cache.glsl
@@ -0,0 +1,138 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+uniform HIGHP_SAMPLER_FLOAT sampler2D sGpuCache;
+
+#define VECS_PER_IMAGE_RESOURCE 2
+
+// TODO(gw): This is here temporarily while we have
+// both GPU store and cache. When the GPU
+// store code is removed, we can change the
+// PrimitiveInstance instance structure to
+// use 2x unsigned shorts as vertex attributes
+// instead of an int, and encode the UV directly
+// in the vertices.
+ivec2 get_gpu_cache_uv(HIGHP_FS_ADDRESS int address) {
+ return ivec2(uint(address) % WR_MAX_VERTEX_TEXTURE_WIDTH,
+ uint(address) / WR_MAX_VERTEX_TEXTURE_WIDTH);
+}
+
+vec4[2] fetch_from_gpu_cache_2_direct(ivec2 address) {
+ return vec4[2](
+ TEXEL_FETCH(sGpuCache, address, 0, ivec2(0, 0)),
+ TEXEL_FETCH(sGpuCache, address, 0, ivec2(1, 0))
+ );
+}
+
+vec4[2] fetch_from_gpu_cache_2(HIGHP_FS_ADDRESS int address) {
+ ivec2 uv = get_gpu_cache_uv(address);
+ return vec4[2](
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(0, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(1, 0))
+ );
+}
+
+vec4 fetch_from_gpu_cache_1_direct(ivec2 address) {
+ return texelFetch(sGpuCache, address, 0);
+}
+
+vec4 fetch_from_gpu_cache_1(HIGHP_FS_ADDRESS int address) {
+ ivec2 uv = get_gpu_cache_uv(address);
+ return texelFetch(sGpuCache, uv, 0);
+}
+
+#ifdef WR_VERTEX_SHADER
+
+vec4[8] fetch_from_gpu_cache_8(int address) {
+ ivec2 uv = get_gpu_cache_uv(address);
+ return vec4[8](
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(0, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(1, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(2, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(3, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(4, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(5, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(6, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(7, 0))
+ );
+}
+
+vec4[3] fetch_from_gpu_cache_3(int address) {
+ ivec2 uv = get_gpu_cache_uv(address);
+ return vec4[3](
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(0, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(1, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(2, 0))
+ );
+}
+
+vec4[3] fetch_from_gpu_cache_3_direct(ivec2 address) {
+ return vec4[3](
+ TEXEL_FETCH(sGpuCache, address, 0, ivec2(0, 0)),
+ TEXEL_FETCH(sGpuCache, address, 0, ivec2(1, 0)),
+ TEXEL_FETCH(sGpuCache, address, 0, ivec2(2, 0))
+ );
+}
+
+vec4[4] fetch_from_gpu_cache_4_direct(ivec2 address) {
+ return vec4[4](
+ TEXEL_FETCH(sGpuCache, address, 0, ivec2(0, 0)),
+ TEXEL_FETCH(sGpuCache, address, 0, ivec2(1, 0)),
+ TEXEL_FETCH(sGpuCache, address, 0, ivec2(2, 0)),
+ TEXEL_FETCH(sGpuCache, address, 0, ivec2(3, 0))
+ );
+}
+
+vec4[4] fetch_from_gpu_cache_4(int address) {
+ ivec2 uv = get_gpu_cache_uv(address);
+ return vec4[4](
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(0, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(1, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(2, 0)),
+ TEXEL_FETCH(sGpuCache, uv, 0, ivec2(3, 0))
+ );
+}
+
+//TODO: image resource is too specific for this module
+
+struct ImageResource {
+ RectWithEndpoint uv_rect;
+ float layer;
+ vec3 user_data;
+};
+
+ImageResource fetch_image_resource(int address) {
+ //Note: number of blocks has to match `renderer::BLOCKS_PER_UV_RECT`
+ vec4 data[2] = fetch_from_gpu_cache_2(address);
+ RectWithEndpoint uv_rect = RectWithEndpoint(data[0].xy, data[0].zw);
+ return ImageResource(uv_rect, data[1].x, data[1].yzw);
+}
+
+ImageResource fetch_image_resource_direct(ivec2 address) {
+ vec4 data[2] = fetch_from_gpu_cache_2_direct(address);
+ RectWithEndpoint uv_rect = RectWithEndpoint(data[0].xy, data[0].zw);
+ return ImageResource(uv_rect, data[1].x, data[1].yzw);
+}
+
+// Fetch optional extra data for a texture cache resource. This can contain
+// a polygon defining a UV rect within the texture cache resource.
+// Note: the polygon coordinates are in homogeneous space.
+struct ImageResourceExtra {
+ vec4 st_tl;
+ vec4 st_tr;
+ vec4 st_bl;
+ vec4 st_br;
+};
+
+ImageResourceExtra fetch_image_resource_extra(int address) {
+ vec4 data[4] = fetch_from_gpu_cache_4(address + VECS_PER_IMAGE_RESOURCE);
+ return ImageResourceExtra(
+ data[0],
+ data[1],
+ data[2],
+ data[3]
+ );
+}
+
+#endif //WR_VERTEX_SHADER
diff --git a/third_party/webrender/webrender/res/gpu_cache_update.glsl b/third_party/webrender/webrender/res/gpu_cache_update.glsl
new file mode 100644
index 00000000000..90a85342461
--- /dev/null
+++ b/third_party/webrender/webrender/res/gpu_cache_update.glsl
@@ -0,0 +1,27 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include base
+
+varying vec4 vData;
+
+#ifdef WR_VERTEX_SHADER
+in vec4 aValue;
+in vec2 aPosition;
+
+void main() {
+ vData = aValue;
+ gl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);
+ gl_PointSize = 1.0;
+}
+
+#endif //WR_VERTEX_SHADER
+
+#ifdef WR_FRAGMENT_SHADER
+out vec4 oValue;
+
+void main() {
+ oValue = vData;
+}
+#endif //WR_FRAGMENT_SHADER
diff --git a/third_party/webrender/webrender/res/pf_vector_cover.glsl b/third_party/webrender/webrender/res/pf_vector_cover.glsl
new file mode 100644
index 00000000000..1b2eeabb7dc
--- /dev/null
+++ b/third_party/webrender/webrender/res/pf_vector_cover.glsl
@@ -0,0 +1,77 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared
+
+#ifdef WR_VERTEX_SHADER
+
+PER_INSTANCE in ivec4 aTargetRect;
+PER_INSTANCE in ivec2 aStencilOrigin;
+PER_INSTANCE in int aSubpixel;
+PER_INSTANCE in int aPad;
+
+out vec2 vStencilUV;
+flat out int vSubpixel;
+
+void main(void) {
+ vec4 targetRect = vec4(aTargetRect);
+ vec2 stencilOrigin = vec2(aStencilOrigin);
+
+ vec2 targetOffset = mix(vec2(0.0), targetRect.zw, aPosition.xy);
+ vec2 targetPosition = targetRect.xy + targetOffset;
+ vec2 stencilOffset = targetOffset * vec2(aSubpixel == 0 ? 1.0 : 3.0, 1.0);
+ vec2 stencilPosition = stencilOrigin + stencilOffset;
+
+ gl_Position = uTransform * vec4(targetPosition, aPosition.z, 1.0);
+ vStencilUV = stencilPosition;
+ vSubpixel = aSubpixel;
+}
+
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+
+#define LCD_FILTER_FACTOR_0 (86.0 / 255.0)
+#define LCD_FILTER_FACTOR_1 (77.0 / 255.0)
+#define LCD_FILTER_FACTOR_2 (8.0 / 255.0)
+
+in vec2 vStencilUV;
+flat in int vSubpixel;
+
+/// Applies a slight horizontal blur to reduce color fringing on LCD screens
+/// when performing subpixel AA.
+///
+/// The algorithm should be identical to that of FreeType:
+/// https://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html
+float lcdFilter(float shadeL2, float shadeL1, float shade0, float shadeR1, float shadeR2) {
+ return LCD_FILTER_FACTOR_2 * shadeL2 +
+ LCD_FILTER_FACTOR_1 * shadeL1 +
+ LCD_FILTER_FACTOR_0 * shade0 +
+ LCD_FILTER_FACTOR_1 * shadeR1 +
+ LCD_FILTER_FACTOR_2 * shadeR2;
+}
+
+void main(void) {
+ ivec2 stencilUV = ivec2(vStencilUV);
+ float shade0 = abs(TEXEL_FETCH(sColor0, stencilUV, 0, ivec2(0, 0)).r);
+
+ if (vSubpixel == 0) {
+ oFragColor = vec4(shade0);
+ return;
+ }
+
+ vec3 shadeL = abs(vec3(TEXEL_FETCH(sColor0, stencilUV, 0, ivec2(-1, 0)).r,
+ TEXEL_FETCH(sColor0, stencilUV, 0, ivec2(-2, 0)).r,
+ TEXEL_FETCH(sColor0, stencilUV, 0, ivec2(-3, 0)).r));
+ vec3 shadeR = abs(vec3(TEXEL_FETCH(sColor0, stencilUV, 0, ivec2(1, 0)).r,
+ TEXEL_FETCH(sColor0, stencilUV, 0, ivec2(2, 0)).r,
+ TEXEL_FETCH(sColor0, stencilUV, 0, ivec2(3, 0)).r));
+
+ oFragColor = vec4(lcdFilter(shadeL.z, shadeL.y, shadeL.x, shade0, shadeR.x),
+ lcdFilter(shadeL.y, shadeL.x, shade0, shadeR.x, shadeR.y),
+ lcdFilter(shadeL.x, shade0, shadeR.x, shadeR.y, shadeR.z),
+ 1.0);
+}
+
+#endif
diff --git a/third_party/webrender/webrender/res/pf_vector_stencil.glsl b/third_party/webrender/webrender/res/pf_vector_stencil.glsl
new file mode 100644
index 00000000000..2029768fcb9
--- /dev/null
+++ b/third_party/webrender/webrender/res/pf_vector_stencil.glsl
@@ -0,0 +1,111 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared
+
+#ifdef WR_VERTEX_SHADER
+
+PER_INSTANCE in vec2 aFromPosition;
+PER_INSTANCE in vec2 aCtrlPosition;
+PER_INSTANCE in vec2 aToPosition;
+PER_INSTANCE in vec2 aFromNormal;
+PER_INSTANCE in vec2 aCtrlNormal;
+PER_INSTANCE in vec2 aToNormal;
+PER_INSTANCE in int aPathID;
+PER_INSTANCE in int aPad;
+
+out vec2 vFrom;
+out vec2 vCtrl;
+out vec2 vTo;
+
+void main(void) {
+ // Unpack.
+ int pathID = int(aPathID);
+
+ ivec2 pathAddress = ivec2(0.0, aPathID);
+ mat2 transformLinear = mat2(TEXEL_FETCH(sColor1, pathAddress, 0, ivec2(0, 0)));
+ vec2 transformTranslation = TEXEL_FETCH(sColor1, pathAddress, 0, ivec2(1, 0)).xy;
+
+ vec4 miscInfo = TEXEL_FETCH(sColor1, pathAddress, 0, ivec2(2, 0));
+ float rectHeight = miscInfo.y;
+ vec2 emboldenAmount = miscInfo.zw * 0.5;
+
+ // TODO(pcwalton): Hint positions.
+ vec2 from = aFromPosition;
+ vec2 ctrl = aCtrlPosition;
+ vec2 to = aToPosition;
+
+ // Embolden as necessary.
+ from -= aFromNormal * emboldenAmount;
+ ctrl -= aCtrlNormal * emboldenAmount;
+ to -= aToNormal * emboldenAmount;
+
+ // Perform the transform.
+ from = transformLinear * from + transformTranslation;
+ ctrl = transformLinear * ctrl + transformTranslation;
+ to = transformLinear * to + transformTranslation;
+
+ // Choose correct quadrant for rotation.
+ vec2 corner = vec2(0.0, rectHeight) + transformTranslation;
+
+ // Compute edge vectors. De Casteljau subdivide if necessary.
+ // TODO(pcwalton): Actually do the two-pass rendering.
+
+ // Compute position and dilate. If too thin, discard to avoid artefacts.
+ vec2 position;
+ if (abs(from.x - to.x) < 0.0001)
+ position.x = 0.0;
+ else if (aPosition.x < 0.5)
+ position.x = floor(min(min(from.x, to.x), ctrl.x));
+ else
+ position.x = ceil(max(max(from.x, to.x), ctrl.x));
+ if (aPosition.y < 0.5)
+ position.y = floor(min(min(from.y, to.y), ctrl.y));
+ else
+ position.y = corner.y;
+
+ // Compute final position and depth.
+ vec4 clipPosition = uTransform * vec4(position, aPosition.z, 1.0);
+
+ // Finish up.
+ gl_Position = clipPosition;
+ vFrom = from - position;
+ vCtrl = ctrl - position;
+ vTo = to - position;
+}
+
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+
+uniform sampler2D uAreaLUT;
+
+in vec2 vFrom;
+in vec2 vCtrl;
+in vec2 vTo;
+
+void main(void) {
+ // Unpack.
+ vec2 from = vFrom, ctrl = vCtrl, to = vTo;
+
+ // Determine winding, and sort into a consistent order so we only need to find one root below.
+ bool winding = from.x < to.x;
+ vec2 left = winding ? from : to, right = winding ? to : from;
+ vec2 v0 = ctrl - left, v1 = right - ctrl;
+
+ // Shoot a vertical ray toward the curve.
+ vec2 window = clamp(vec2(from.x, to.x), -0.5, 0.5);
+ float offset = mix(window.x, window.y, 0.5) - left.x;
+ float t = offset / (v0.x + sqrt(v1.x * offset - v0.x * (offset - v0.x)));
+
+ // Compute position and derivative to form a line approximation.
+ float y = mix(mix(left.y, ctrl.y, t), mix(ctrl.y, right.y, t), t);
+ float d = mix(v0.y, v1.y, t) / mix(v0.x, v1.x, t);
+
+ // Look up area under that line, and scale horizontally to the window size.
+ float dX = window.x - window.y;
+ oFragColor = vec4(texture(sColor0, vec2(y + 8.0, abs(d * dX)) / 16.0).r * dX);
+}
+
+#endif
diff --git a/third_party/webrender/webrender/res/pls_init.glsl b/third_party/webrender/webrender/res/pls_init.glsl
new file mode 100644
index 00000000000..a9fe0a6c4a6
--- /dev/null
+++ b/third_party/webrender/webrender/res/pls_init.glsl
@@ -0,0 +1,27 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// Initialize the pixel local storage area by reading the current
+// framebuffer color. We might be able to skip this in future by
+// making the opaque pass also write to pixel local storage.
+
+#define PLS_WRITEONLY
+
+#include shared
+
+#ifdef WR_VERTEX_SHADER
+PER_INSTANCE in vec4 aRect;
+
+void main(void) {
+ vec2 pos = aRect.xy + aPosition.xy * aRect.zw;
+ gl_Position = uTransform * vec4(pos, 0.0, 1.0);
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+void main(void) {
+ // Store current framebuffer color in our custom PLS struct.
+ PLS.color = gl_LastFragColorARM;
+}
+#endif
diff --git a/third_party/webrender/webrender/res/pls_resolve.glsl b/third_party/webrender/webrender/res/pls_resolve.glsl
new file mode 100644
index 00000000000..363ce2ccfef
--- /dev/null
+++ b/third_party/webrender/webrender/res/pls_resolve.glsl
@@ -0,0 +1,29 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// Write the final value stored in pixel local store out to normal
+// fragment outputs. This will be the color that gets resolved out
+// to main memory.
+
+#define PLS_READONLY
+
+#include shared
+
+#ifdef WR_VERTEX_SHADER
+PER_INSTANCE in vec4 aRect;
+
+void main(void) {
+ vec2 pos = aRect.xy + aPosition.xy * aRect.zw;
+ gl_Position = uTransform * vec4(pos, 0.0, 1.0);
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+out vec4 oFragColor;
+
+void main(void) {
+ // Write the final color value in pixel local storage out as a fragment color.
+ oFragColor = PLS.color;
+}
+#endif
diff --git a/third_party/webrender/webrender/res/prim_shared.glsl b/third_party/webrender/webrender/res/prim_shared.glsl
new file mode 100644
index 00000000000..f89340ff49c
--- /dev/null
+++ b/third_party/webrender/webrender/res/prim_shared.glsl
@@ -0,0 +1,320 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include rect,render_task,gpu_cache,transform
+
+#define EXTEND_MODE_CLAMP 0
+#define EXTEND_MODE_REPEAT 1
+
+#define SUBPX_DIR_NONE 0
+#define SUBPX_DIR_HORIZONTAL 1
+#define SUBPX_DIR_VERTICAL 2
+#define SUBPX_DIR_MIXED 3
+
+#define RASTER_LOCAL 0
+#define RASTER_SCREEN 1
+
+uniform sampler2DArray sPrevPassAlpha;
+uniform sampler2DArray sPrevPassColor;
+
+vec2 clamp_rect(vec2 pt, RectWithSize rect) {
+ return clamp(pt, rect.p0, rect.p0 + rect.size);
+}
+
+// TODO: convert back to RectWithEndPoint if driver issues are resolved, if ever.
+flat varying vec4 vClipMaskUvBounds;
+// XY and W are homogeneous coordinates, Z is the layer index
+varying vec4 vClipMaskUv;
+
+
+#ifdef WR_VERTEX_SHADER
+
+#define COLOR_MODE_FROM_PASS 0
+#define COLOR_MODE_ALPHA 1
+#define COLOR_MODE_SUBPX_CONST_COLOR 2
+#define COLOR_MODE_SUBPX_BG_PASS0 3
+#define COLOR_MODE_SUBPX_BG_PASS1 4
+#define COLOR_MODE_SUBPX_BG_PASS2 5
+#define COLOR_MODE_SUBPX_DUAL_SOURCE 6
+#define COLOR_MODE_BITMAP 7
+#define COLOR_MODE_COLOR_BITMAP 8
+#define COLOR_MODE_IMAGE 9
+
+uniform HIGHP_SAMPLER_FLOAT sampler2D sPrimitiveHeadersF;
+uniform HIGHP_SAMPLER_FLOAT isampler2D sPrimitiveHeadersI;
+
+// Instanced attributes
+PER_INSTANCE in ivec4 aData;
+
+#define VECS_PER_PRIM_HEADER_F 2U
+#define VECS_PER_PRIM_HEADER_I 2U
+
+struct Instance
+{
+ int prim_header_address;
+ int picture_task_address;
+ int clip_address;
+ int segment_index;
+ int flags;
+ int resource_address;
+ int brush_kind;
+};
+
+Instance decode_instance_attributes() {
+ Instance instance;
+
+ instance.prim_header_address = aData.x;
+ instance.picture_task_address = aData.y >> 16;
+ instance.clip_address = aData.y & 0xffff;
+ instance.segment_index = aData.z & 0xffff;
+ instance.flags = aData.z >> 16;
+ instance.resource_address = aData.w & 0xffffff;
+ instance.brush_kind = aData.w >> 24;
+
+ return instance;
+}
+
+struct PrimitiveHeader {
+ RectWithSize local_rect;
+ RectWithSize local_clip_rect;
+ float z;
+ int specific_prim_address;
+ int transform_id;
+ ivec4 user_data;
+};
+
+PrimitiveHeader fetch_prim_header(int index) {
+ PrimitiveHeader ph;
+
+ ivec2 uv_f = get_fetch_uv(index, VECS_PER_PRIM_HEADER_F);
+ vec4 local_rect = TEXEL_FETCH(sPrimitiveHeadersF, uv_f, 0, ivec2(0, 0));
+ vec4 local_clip_rect = TEXEL_FETCH(sPrimitiveHeadersF, uv_f, 0, ivec2(1, 0));
+ ph.local_rect = RectWithSize(local_rect.xy, local_rect.zw);
+ ph.local_clip_rect = RectWithSize(local_clip_rect.xy, local_clip_rect.zw);
+
+ ivec2 uv_i = get_fetch_uv(index, VECS_PER_PRIM_HEADER_I);
+ ivec4 data0 = TEXEL_FETCH(sPrimitiveHeadersI, uv_i, 0, ivec2(0, 0));
+ ivec4 data1 = TEXEL_FETCH(sPrimitiveHeadersI, uv_i, 0, ivec2(1, 0));
+ ph.z = float(data0.x);
+ ph.specific_prim_address = data0.y;
+ ph.transform_id = data0.z;
+ ph.user_data = data1;
+
+ return ph;
+}
+
+struct VertexInfo {
+ vec2 local_pos;
+ vec4 world_pos;
+};
+
+VertexInfo write_vertex(vec2 local_pos,
+ RectWithSize local_clip_rect,
+ float z,
+ Transform transform,
+ PictureTask task) {
+ // Clamp to the two local clip rects.
+ vec2 clamped_local_pos = clamp_rect(local_pos, local_clip_rect);
+
+ // Transform the current vertex to world space.
+ vec4 world_pos = transform.m * vec4(clamped_local_pos, 0.0, 1.0);
+
+ // Convert the world positions to device pixel space.
+ vec2 device_pos = world_pos.xy * task.device_pixel_scale;
+
+ // Apply offsets for the render task to get correct screen location.
+ vec2 final_offset = -task.content_origin + task.common_data.task_rect.p0;
+
+ gl_Position = uTransform * vec4(device_pos + final_offset * world_pos.w, z * world_pos.w, world_pos.w);
+
+ VertexInfo vi = VertexInfo(
+ clamped_local_pos,
+ world_pos
+ );
+
+ return vi;
+}
+
+float cross2(vec2 v0, vec2 v1) {
+ return v0.x * v1.y - v0.y * v1.x;
+}
+
+// Return intersection of line (p0,p1) and line (p2,p3)
+vec2 intersect_lines(vec2 p0, vec2 p1, vec2 p2, vec2 p3) {
+ vec2 d0 = p0 - p1;
+ vec2 d1 = p2 - p3;
+
+ float s0 = cross2(p0, p1);
+ float s1 = cross2(p2, p3);
+
+ float d = cross2(d0, d1);
+ float nx = s0 * d1.x - d0.x * s1;
+ float ny = s0 * d1.y - d0.y * s1;
+
+ return vec2(nx / d, ny / d);
+}
+
+VertexInfo write_transform_vertex(RectWithSize local_segment_rect,
+ RectWithSize local_prim_rect,
+ RectWithSize local_clip_rect,
+ vec4 clip_edge_mask,
+ float z,
+ Transform transform,
+ PictureTask task) {
+ // Calculate a clip rect from local_rect + local clip
+ RectWithEndpoint clip_rect = to_rect_with_endpoint(local_clip_rect);
+ RectWithEndpoint segment_rect = to_rect_with_endpoint(local_segment_rect);
+ segment_rect.p0 = clamp(segment_rect.p0, clip_rect.p0, clip_rect.p1);
+ segment_rect.p1 = clamp(segment_rect.p1, clip_rect.p0, clip_rect.p1);
+
+ // Calculate a clip rect from local_rect + local clip
+ RectWithEndpoint prim_rect = to_rect_with_endpoint(local_prim_rect);
+ prim_rect.p0 = clamp(prim_rect.p0, clip_rect.p0, clip_rect.p1);
+ prim_rect.p1 = clamp(prim_rect.p1, clip_rect.p0, clip_rect.p1);
+
+ // As this is a transform shader, extrude by 2 (local space) pixels
+ // in each direction. This gives enough space around the edge to
+ // apply distance anti-aliasing. Technically, it:
+ // (a) slightly over-estimates the number of required pixels in the simple case.
+ // (b) might not provide enough edge in edge case perspective projections.
+ // However, it's fast and simple. If / when we ever run into issues, we
+ // can do some math on the projection matrix to work out a variable
+ // amount to extrude.
+
+ // Only extrude along edges where we are going to apply AA.
+ float extrude_amount = 2.0;
+ vec4 extrude_distance = vec4(extrude_amount) * clip_edge_mask;
+ local_segment_rect.p0 -= extrude_distance.xy;
+ local_segment_rect.size += extrude_distance.xy + extrude_distance.zw;
+
+ // Select the corner of the local rect that we are processing.
+ vec2 local_pos = local_segment_rect.p0 + local_segment_rect.size * aPosition.xy;
+
+ // Convert the world positions to device pixel space.
+ vec2 task_offset = task.common_data.task_rect.p0 - task.content_origin;
+
+ // Transform the current vertex to the world cpace.
+ vec4 world_pos = transform.m * vec4(local_pos, 0.0, 1.0);
+ vec4 final_pos = vec4(
+ world_pos.xy * task.device_pixel_scale + task_offset * world_pos.w,
+ z * world_pos.w,
+ world_pos.w
+ );
+
+ gl_Position = uTransform * final_pos;
+
+ init_transform_vs(mix(
+ vec4(prim_rect.p0, prim_rect.p1),
+ vec4(segment_rect.p0, segment_rect.p1),
+ clip_edge_mask
+ ));
+
+ VertexInfo vi = VertexInfo(
+ local_pos,
+ world_pos
+ );
+
+ return vi;
+}
+
+void write_clip(vec4 world_pos, ClipArea area) {
+ vec2 uv = world_pos.xy * area.device_pixel_scale +
+ world_pos.w * (area.common_data.task_rect.p0 - area.screen_origin);
+ vClipMaskUvBounds = vec4(
+ area.common_data.task_rect.p0,
+ area.common_data.task_rect.p0 + area.common_data.task_rect.size
+ );
+ vClipMaskUv = vec4(uv, area.common_data.texture_layer_index, world_pos.w);
+}
+
+// Read the exta image data containing the homogeneous screen space coordinates
+// of the corners, interpolate between them, and return real screen space UV.
+vec2 get_image_quad_uv(int address, vec2 f) {
+ ImageResourceExtra extra_data = fetch_image_resource_extra(address);
+ vec4 x = mix(extra_data.st_tl, extra_data.st_tr, f.x);
+ vec4 y = mix(extra_data.st_bl, extra_data.st_br, f.x);
+ vec4 z = mix(x, y, f.y);
+ return z.xy / z.w;
+}
+#endif //WR_VERTEX_SHADER
+
+#ifdef WR_FRAGMENT_SHADER
+
+struct Fragment {
+ vec4 color;
+#ifdef WR_FEATURE_DUAL_SOURCE_BLENDING
+ vec4 blend;
+#endif
+};
+
+
+float do_clip() {
+ // check for the dummy bounds, which are given to the opaque objects
+ if (vClipMaskUvBounds.xy == vClipMaskUvBounds.zw) {
+ return 1.0;
+ }
+ // anything outside of the mask is considered transparent
+ //Note: we assume gl_FragCoord.w == interpolated(1 / vClipMaskUv.w)
+ vec2 mask_uv = vClipMaskUv.xy * gl_FragCoord.w;
+ bvec2 left = lessThanEqual(vClipMaskUvBounds.xy, mask_uv); // inclusive
+ bvec2 right = greaterThan(vClipMaskUvBounds.zw, mask_uv); // non-inclusive
+ // bail out if the pixel is outside the valid bounds
+ if (!all(bvec4(left, right))) {
+ return 0.0;
+ }
+ // finally, the slow path - fetch the mask value from an image
+ // Note the Z getting rounded to the nearest integer because the variable
+ // is still interpolated and becomes a subject of precision-caused
+ // fluctuations, see https://bugzilla.mozilla.org/show_bug.cgi?id=1491911
+ ivec3 tc = ivec3(mask_uv, vClipMaskUv.z + 0.5);
+ return texelFetch(sPrevPassAlpha, tc, 0).r;
+}
+
+#ifdef WR_FEATURE_DITHERING
+vec4 dither(vec4 color) {
+ const int matrix_mask = 7;
+
+ ivec2 pos = ivec2(gl_FragCoord.xy) & ivec2(matrix_mask);
+ float noise_normalized = (texelFetch(sDither, pos, 0).r * 255.0 + 0.5) / 64.0;
+ float noise = (noise_normalized - 0.5) / 256.0; // scale down to the unit length
+
+ return color + vec4(noise, noise, noise, 0);
+}
+#else
+vec4 dither(vec4 color) {
+ return color;
+}
+#endif //WR_FEATURE_DITHERING
+
+vec4 sample_gradient(HIGHP_FS_ADDRESS int address, float offset, float gradient_repeat) {
+ // Modulo the offset if the gradient repeats.
+ float x = mix(offset, fract(offset), gradient_repeat);
+
+ // Calculate the color entry index to use for this offset:
+ // offsets < 0 use the first color entry, 0
+ // offsets from [0, 1) use the color entries in the range of [1, N-1)
+ // offsets >= 1 use the last color entry, N-1
+ // so transform the range [0, 1) -> [1, N-1)
+
+ // TODO(gw): In the future we might consider making the size of the
+ // LUT vary based on number / distribution of stops in the gradient.
+ const int GRADIENT_ENTRIES = 128;
+ x = 1.0 + x * float(GRADIENT_ENTRIES);
+
+ // Calculate the texel to index into the gradient color entries:
+ // floor(x) is the gradient color entry index
+ // fract(x) is the linear filtering factor between start and end
+ int lut_offset = 2 * int(floor(x)); // There is a [start, end] color per entry.
+
+ // Ensure we don't fetch outside the valid range of the LUT.
+ lut_offset = clamp(lut_offset, 0, 2 * (GRADIENT_ENTRIES + 1));
+
+ // Fetch the start and end color.
+ vec4 texels[2] = fetch_from_gpu_cache_2(address + lut_offset);
+
+ // Finally interpolate and apply dithering
+ return dither(mix(texels[0], texels[1], fract(x)));
+}
+
+#endif //WR_FRAGMENT_SHADER
diff --git a/third_party/webrender/webrender/res/ps_clear.glsl b/third_party/webrender/webrender/res/ps_clear.glsl
new file mode 100644
index 00000000000..5ff1c206f76
--- /dev/null
+++ b/third_party/webrender/webrender/res/ps_clear.glsl
@@ -0,0 +1,25 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared
+
+varying vec4 vColor;
+
+#ifdef WR_VERTEX_SHADER
+PER_INSTANCE in vec4 aRect;
+PER_INSTANCE in vec4 aColor;
+
+void main(void) {
+ vec2 pos = aRect.xy + aPosition.xy * aRect.zw;
+ gl_Position = uTransform * vec4(pos, 0.0, 1.0);
+ gl_Position.z = gl_Position.w; // force depth clear to 1.0
+ vColor = aColor;
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+void main(void) {
+ oFragColor = vColor;
+}
+#endif
diff --git a/third_party/webrender/webrender/res/ps_split_composite.glsl b/third_party/webrender/webrender/res/ps_split_composite.glsl
new file mode 100644
index 00000000000..2de94126848
--- /dev/null
+++ b/third_party/webrender/webrender/res/ps_split_composite.glsl
@@ -0,0 +1,118 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared,prim_shared
+
+// interpolated UV coordinates to sample.
+varying vec2 vUv;
+// X = layer index to sample, Y = flag to allow perspective interpolation of UV.
+flat varying vec2 vLayerAndPerspective;
+flat varying vec4 vUvSampleBounds;
+
+#ifdef WR_VERTEX_SHADER
+struct SplitGeometry {
+ vec2 local[4];
+};
+
+SplitGeometry fetch_split_geometry(int address) {
+ ivec2 uv = get_gpu_cache_uv(address);
+
+ vec4 data0 = TEXEL_FETCH(sGpuCache, uv, 0, ivec2(0, 0));
+ vec4 data1 = TEXEL_FETCH(sGpuCache, uv, 0, ivec2(1, 0));
+
+ SplitGeometry geo;
+ geo.local = vec2[4](
+ data0.xy,
+ data0.zw,
+ data1.xy,
+ data1.zw
+ );
+
+ return geo;
+}
+
+vec2 bilerp(vec2 a, vec2 b, vec2 c, vec2 d, float s, float t) {
+ vec2 x = mix(a, b, t);
+ vec2 y = mix(c, d, t);
+ return mix(x, y, s);
+}
+
+struct SplitCompositeInstance {
+ int prim_header_index;
+ int polygons_address;
+ float z;
+ int render_task_index;
+};
+
+SplitCompositeInstance fetch_composite_instance() {
+ SplitCompositeInstance ci;
+
+ ci.prim_header_index = aData.x;
+ ci.polygons_address = aData.y;
+ ci.z = float(aData.z);
+ ci.render_task_index = aData.w;
+
+ return ci;
+}
+
+void main(void) {
+ SplitCompositeInstance ci = fetch_composite_instance();
+ SplitGeometry geometry = fetch_split_geometry(ci.polygons_address);
+ PrimitiveHeader ph = fetch_prim_header(ci.prim_header_index);
+ PictureTask dest_task = fetch_picture_task(ci.render_task_index);
+ Transform transform = fetch_transform(ph.transform_id);
+ ImageResource res = fetch_image_resource(ph.user_data.x);
+ ClipArea clip_area = fetch_clip_area(ph.user_data.w);
+
+ vec2 dest_origin = dest_task.common_data.task_rect.p0 -
+ dest_task.content_origin;
+
+ vec2 local_pos = bilerp(geometry.local[0], geometry.local[1],
+ geometry.local[3], geometry.local[2],
+ aPosition.y, aPosition.x);
+ vec4 world_pos = transform.m * vec4(local_pos, 0.0, 1.0);
+
+ vec4 final_pos = vec4(
+ dest_origin * world_pos.w + world_pos.xy * dest_task.device_pixel_scale,
+ world_pos.w * ci.z,
+ world_pos.w
+ );
+
+ write_clip(
+ world_pos,
+ clip_area
+ );
+
+ gl_Position = uTransform * final_pos;
+
+ vec2 texture_size = vec2(textureSize(sPrevPassColor, 0));
+ vec2 uv0 = res.uv_rect.p0;
+ vec2 uv1 = res.uv_rect.p1;
+
+ vec2 min_uv = min(uv0, uv1);
+ vec2 max_uv = max(uv0, uv1);
+
+ vUvSampleBounds = vec4(
+ min_uv + vec2(0.5),
+ max_uv - vec2(0.5)
+ ) / texture_size.xyxy;
+
+ vec2 f = (local_pos - ph.local_rect.p0) / ph.local_rect.size;
+ f = get_image_quad_uv(ph.user_data.x, f);
+ vec2 uv = mix(uv0, uv1, f);
+ float perspective_interpolate = float(ph.user_data.y);
+
+ vUv = uv / texture_size * mix(gl_Position.w, 1.0, perspective_interpolate);
+ vLayerAndPerspective = vec2(res.layer, perspective_interpolate);
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+void main(void) {
+ float alpha = do_clip();
+ float perspective_divisor = mix(gl_FragCoord.w, 1.0, vLayerAndPerspective.y);
+ vec2 uv = clamp(vUv * perspective_divisor, vUvSampleBounds.xy, vUvSampleBounds.zw);
+ write_output(alpha * textureLod(sPrevPassColor, vec3(uv, vLayerAndPerspective.x), 0.0));
+}
+#endif
diff --git a/third_party/webrender/webrender/res/ps_text_run.glsl b/third_party/webrender/webrender/res/ps_text_run.glsl
new file mode 100644
index 00000000000..c2f626dded6
--- /dev/null
+++ b/third_party/webrender/webrender/res/ps_text_run.glsl
@@ -0,0 +1,335 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#define WR_VERTEX_SHADER_MAIN_FUNCTION text_shader_main_vs
+#define WR_BRUSH_FS_FUNCTION text_brush_fs
+#define WR_BRUSH_VS_FUNCTION text_brush_vs
+// The text brush shader doesn't use this but the macro must be defined
+// to compile the brush infrastructure.
+#define VECS_PER_SPECIFIC_BRUSH 0
+
+#include shared,prim_shared
+
+#ifdef WR_VERTEX_SHADER
+// Forward-declare the text vertex shader's main entry-point before including
+// the brush shader.
+void text_shader_main_vs(
+ Instance instance,
+ PrimitiveHeader ph,
+ Transform transform,
+ PictureTask task,
+ ClipArea clip_area
+);
+#endif
+
+#include brush
+
+#define V_COLOR flat_varying_vec4_0
+#define V_MASK_SWIZZLE flat_varying_vec4_1.xy
+// Normalized bounds of the source image in the texture.
+#define V_UV_BOUNDS flat_varying_vec4_2
+
+// Interpolated UV coordinates to sample.
+#define V_UV varying_vec4_0.xy
+#define V_LAYER varying_vec4_0.z
+
+
+#ifdef WR_FEATURE_GLYPH_TRANSFORM
+#define V_UV_CLIP varying_vec4_1
+#endif
+
+#ifdef WR_VERTEX_SHADER
+
+#define VECS_PER_TEXT_RUN 2
+#define GLYPHS_PER_GPU_BLOCK 2U
+
+#ifdef WR_FEATURE_GLYPH_TRANSFORM
+RectWithSize transform_rect(RectWithSize rect, mat2 transform) {
+ vec2 center = transform * (rect.p0 + rect.size * 0.5);
+ vec2 radius = mat2(abs(transform[0]), abs(transform[1])) * (rect.size * 0.5);
+ return RectWithSize(center - radius, radius * 2.0);
+}
+
+bool rect_inside_rect(RectWithSize little, RectWithSize big) {
+ return all(lessThanEqual(vec4(big.p0, little.p0 + little.size),
+ vec4(little.p0, big.p0 + big.size)));
+}
+#endif //WR_FEATURE_GLYPH_TRANSFORM
+
+struct Glyph {
+ vec2 offset;
+};
+
+Glyph fetch_glyph(int specific_prim_address,
+ int glyph_index) {
+ // Two glyphs are packed in each texel in the GPU cache.
+ int glyph_address = specific_prim_address +
+ VECS_PER_TEXT_RUN +
+ int(uint(glyph_index) / GLYPHS_PER_GPU_BLOCK);
+ vec4 data = fetch_from_gpu_cache_1(glyph_address);
+ // Select XY or ZW based on glyph index.
+ // We use "!= 0" instead of "== 1" here in order to work around a driver
+ // bug with equality comparisons on integers.
+ vec2 glyph = mix(data.xy, data.zw,
+ bvec2(uint(glyph_index) % GLYPHS_PER_GPU_BLOCK != 0U));
+
+ return Glyph(glyph);
+}
+
+struct GlyphResource {
+ vec4 uv_rect;
+ float layer;
+ vec2 offset;
+ float scale;
+};
+
+GlyphResource fetch_glyph_resource(int address) {
+ vec4 data[2] = fetch_from_gpu_cache_2(address);
+ return GlyphResource(data[0], data[1].x, data[1].yz, data[1].w);
+}
+
+struct TextRun {
+ vec4 color;
+ vec4 bg_color;
+};
+
+TextRun fetch_text_run(int address) {
+ vec4 data[2] = fetch_from_gpu_cache_2(address);
+ return TextRun(data[0], data[1]);
+}
+
+vec2 get_snap_bias(int subpx_dir) {
+ // In subpixel mode, the subpixel offset has already been
+ // accounted for while rasterizing the glyph. However, we
+ // must still round with a subpixel bias rather than rounding
+ // to the nearest whole pixel, depending on subpixel direciton.
+ switch (subpx_dir) {
+ case SUBPX_DIR_NONE:
+ default:
+ return vec2(0.5);
+ case SUBPX_DIR_HORIZONTAL:
+ // Glyphs positioned [-0.125, 0.125] get a
+ // subpx position of zero. So include that
+ // offset in the glyph position to ensure
+ // we round to the correct whole position.
+ return vec2(0.125, 0.5);
+ case SUBPX_DIR_VERTICAL:
+ return vec2(0.5, 0.125);
+ case SUBPX_DIR_MIXED:
+ return vec2(0.125);
+ }
+}
+
+void text_shader_main_vs(
+ Instance instance,
+ PrimitiveHeader ph,
+ Transform transform,
+ PictureTask task,
+ ClipArea clip_area
+) {
+ int glyph_index = instance.segment_index;
+ int subpx_dir = (instance.flags >> 8) & 0xff;
+ int color_mode = instance.flags & 0xff;
+
+ // Note that the reference frame relative offset is stored in the prim local
+ // rect size during batching, instead of the actual size of the primitive.
+ TextRun text = fetch_text_run(ph.specific_prim_address);
+ vec2 text_offset = ph.local_rect.size;
+
+ if (color_mode == COLOR_MODE_FROM_PASS) {
+ color_mode = uMode;
+ }
+
+ // Note that the unsnapped reference frame relative offset has already
+ // been subtracted from the prim local rect origin during batching.
+ // It was done this way to avoid pushing both the snapped and the
+ // unsnapped offsets to the shader.
+ Glyph glyph = fetch_glyph(ph.specific_prim_address, glyph_index);
+ glyph.offset += ph.local_rect.p0;
+
+ GlyphResource res = fetch_glyph_resource(instance.resource_address);
+
+ vec2 snap_bias = get_snap_bias(subpx_dir);
+
+ // Glyph space refers to the pixel space used by glyph rasterization during frame
+ // building. If a non-identity transform was used, WR_FEATURE_GLYPH_TRANSFORM will
+ // be set. Otherwise, regardless of whether the raster space is LOCAL or SCREEN,
+ // we ignored the transform during glyph rasterization, and need to snap just using
+ // the device pixel scale and the raster scale.
+#ifdef WR_FEATURE_GLYPH_TRANSFORM
+ // Transform from local space to glyph space.
+ mat2 glyph_transform = mat2(transform.m) * task.device_pixel_scale;
+ vec2 glyph_translation = transform.m[3].xy * task.device_pixel_scale;
+
+ // Transform from glyph space back to local space.
+ mat2 glyph_transform_inv = inverse(glyph_transform);
+
+ // Glyph raster pixels include the impact of the transform. This path can only be
+ // entered for 3d transforms that can be coerced into a 2d transform; they have no
+ // perspective, and have a 2d inverse. This is a looser condition than axis aligned
+ // transforms because it also allows 2d rotations.
+ vec2 raster_glyph_offset = floor(glyph_transform * glyph.offset + snap_bias);
+
+ // We want to eliminate any subpixel translation in device space to ensure glyph
+ // snapping is stable for equivalent glyph subpixel positions. Note that we must take
+ // into account the translation from the transform for snapping purposes.
+ vec2 raster_text_offset = floor(glyph_transform * text_offset + glyph_translation + 0.5) - glyph_translation;
+
+ // Compute the glyph rect in glyph space.
+ RectWithSize glyph_rect = RectWithSize(res.offset + raster_glyph_offset + raster_text_offset,
+ res.uv_rect.zw - res.uv_rect.xy);
+
+ // The glyph rect is in glyph space, so transform it back to local space.
+ RectWithSize local_rect = transform_rect(glyph_rect, glyph_transform_inv);
+
+ // Select the corner of the glyph's local space rect that we are processing.
+ vec2 local_pos = local_rect.p0 + local_rect.size * aPosition.xy;
+
+ // If the glyph's local rect would fit inside the local clip rect, then select a corner from
+ // the device space glyph rect to reduce overdraw of clipped pixels in the fragment shader.
+ // Otherwise, fall back to clamping the glyph's local rect to the local clip rect.
+ if (rect_inside_rect(local_rect, ph.local_clip_rect)) {
+ local_pos = glyph_transform_inv * (glyph_rect.p0 + glyph_rect.size * aPosition.xy);
+ }
+#else
+ float raster_scale = float(ph.user_data.x) / 65535.0;
+
+ // Scale in which the glyph is snapped when rasterized.
+ float glyph_raster_scale = raster_scale * task.device_pixel_scale;
+
+ // Scale from glyph space to local space.
+ float glyph_scale_inv = res.scale / glyph_raster_scale;
+
+ // Glyph raster pixels do not include the impact of the transform. Instead it was
+ // replaced with an identity transform during glyph rasterization. As such only the
+ // impact of the raster scale (if in local space) and the device pixel scale (for both
+ // local and screen space) are included.
+ //
+ // This implies one or more of the following conditions:
+ // - The transform is an identity. In that case, setting WR_FEATURE_GLYPH_TRANSFORM
+ // should have the same output result as not. We just distingush which path to use
+ // based on the transform used during glyph rasterization. (Screen space).
+ // - The transform contains an animation. We will imply local raster space in such
+ // cases to avoid constantly rerasterizing the glyphs.
+ // - The transform has perspective or does not have a 2d inverse (Screen or local space).
+ // - The transform's scale will result in result in very large rasterized glyphs and
+ // we clamped the size. This will imply local raster space.
+ vec2 raster_glyph_offset = floor(glyph.offset * glyph_raster_scale + snap_bias) / res.scale;
+
+ // Compute the glyph rect in local space.
+ //
+ // The transform may be animated, so we don't want to do any snapping here for the
+ // text offset to avoid glyphs wiggling. The text offset should have been snapped
+ // already for axis aligned transforms excluding any animations during frame building.
+ RectWithSize glyph_rect = RectWithSize(glyph_scale_inv * (res.offset + raster_glyph_offset) + text_offset,
+ glyph_scale_inv * (res.uv_rect.zw - res.uv_rect.xy));
+
+ // Select the corner of the glyph rect that we are processing.
+ vec2 local_pos = glyph_rect.p0 + glyph_rect.size * aPosition.xy;
+#endif
+
+ VertexInfo vi = write_vertex(
+ local_pos,
+ ph.local_clip_rect,
+ ph.z,
+ transform,
+ task
+ );
+
+#ifdef WR_FEATURE_GLYPH_TRANSFORM
+ vec2 f = (glyph_transform * vi.local_pos - glyph_rect.p0) / glyph_rect.size;
+ V_UV_CLIP = vec4(f, 1.0 - f);
+#else
+ vec2 f = (vi.local_pos - glyph_rect.p0) / glyph_rect.size;
+#endif
+
+ write_clip(vi.world_pos, clip_area);
+
+ switch (color_mode) {
+ case COLOR_MODE_ALPHA:
+ case COLOR_MODE_BITMAP:
+ V_MASK_SWIZZLE = vec2(0.0, 1.0);
+ V_COLOR = text.color;
+ break;
+ case COLOR_MODE_SUBPX_BG_PASS2:
+ case COLOR_MODE_SUBPX_DUAL_SOURCE:
+ V_MASK_SWIZZLE = vec2(1.0, 0.0);
+ V_COLOR = text.color;
+ break;
+ case COLOR_MODE_SUBPX_CONST_COLOR:
+ case COLOR_MODE_SUBPX_BG_PASS0:
+ case COLOR_MODE_COLOR_BITMAP:
+ V_MASK_SWIZZLE = vec2(1.0, 0.0);
+ V_COLOR = vec4(text.color.a);
+ break;
+ case COLOR_MODE_SUBPX_BG_PASS1:
+ V_MASK_SWIZZLE = vec2(-1.0, 1.0);
+ V_COLOR = vec4(text.color.a) * text.bg_color;
+ break;
+ default:
+ V_MASK_SWIZZLE = vec2(0.0);
+ V_COLOR = vec4(1.0);
+ }
+
+ vec2 texture_size = vec2(textureSize(sColor0, 0));
+ vec2 st0 = res.uv_rect.xy / texture_size;
+ vec2 st1 = res.uv_rect.zw / texture_size;
+
+ V_UV = mix(st0, st1, f);
+ V_LAYER = res.layer;
+ V_UV_BOUNDS = (res.uv_rect + vec4(0.5, 0.5, -0.5, -0.5)) / texture_size.xyxy;
+}
+
+void text_brush_vs(
+ VertexInfo vi,
+ int prim_address,
+ RectWithSize prim_rect,
+ RectWithSize segment_rect,
+ ivec4 prim_user_data,
+ int specific_resource_address,
+ mat4 transform,
+ PictureTask pic_task,
+ int brush_flags,
+ vec4 segment_data
+) {
+ // This function is empty and unused for now. It has to be defined to build the shader
+ // as a brush, but the brush shader currently branches into text_shader_main_vs earlier
+ // instead of using the regular brush vertex interface for text.
+ // In the future we should strive to further unify text and brushes, and actually make
+ // use of this function.
+}
+
+#endif // WR_VERTEX_SHADER
+
+#ifdef WR_FRAGMENT_SHADER
+
+Fragment text_brush_fs(void) {
+ Fragment frag;
+
+ vec3 tc = vec3(clamp(V_UV, V_UV_BOUNDS.xy, V_UV_BOUNDS.zw), V_LAYER);
+ vec4 mask = texture(sColor0, tc);
+ mask.rgb = mask.rgb * V_MASK_SWIZZLE.x + mask.aaa * V_MASK_SWIZZLE.y;
+
+ #ifdef WR_FEATURE_GLYPH_TRANSFORM
+ mask *= float(all(greaterThanEqual(V_UV_CLIP, vec4(0.0))));
+ #endif
+
+ frag.color = V_COLOR * mask;
+
+ #ifdef WR_FEATURE_DUAL_SOURCE_BLENDING
+ frag.blend = V_COLOR.a * mask;
+ #endif
+
+ return frag;
+}
+
+#endif // WR_FRAGMENT_SHADER
+
+// Undef macro names that could be re-defined by other shaders.
+#undef V_COLOR
+#undef V_MASK_SWIZZLE
+#undef V_UV_BOUNDS
+#undef V_UV
+#undef V_LAYER
+#undef V_UV_CLIP
diff --git a/third_party/webrender/webrender/res/rect.glsl b/third_party/webrender/webrender/res/rect.glsl
new file mode 100644
index 00000000000..093aea02804
--- /dev/null
+++ b/third_party/webrender/webrender/res/rect.glsl
@@ -0,0 +1,42 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+struct RectWithSize {
+ vec2 p0;
+ vec2 size;
+};
+
+struct RectWithEndpoint {
+ vec2 p0;
+ vec2 p1;
+};
+
+RectWithEndpoint to_rect_with_endpoint(RectWithSize rect) {
+ RectWithEndpoint result;
+ result.p0 = rect.p0;
+ result.p1 = rect.p0 + rect.size;
+
+ return result;
+}
+
+RectWithSize to_rect_with_size(RectWithEndpoint rect) {
+ RectWithSize result;
+ result.p0 = rect.p0;
+ result.size = rect.p1 - rect.p0;
+
+ return result;
+}
+
+RectWithSize intersect_rects(RectWithSize a, RectWithSize b) {
+ RectWithSize result;
+ result.p0 = max(a.p0, b.p0);
+ result.size = min(a.p0 + a.size, b.p0 + b.size) - result.p0;
+
+ return result;
+}
+
+float point_inside_rect(vec2 p, vec2 p0, vec2 p1) {
+ vec2 s = step(p0, p) - step(p1, p);
+ return s.x * s.y;
+}
diff --git a/third_party/webrender/webrender/res/render_task.glsl b/third_party/webrender/webrender/res/render_task.glsl
new file mode 100644
index 00000000000..54582cd9adf
--- /dev/null
+++ b/third_party/webrender/webrender/res/render_task.glsl
@@ -0,0 +1,118 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+
+#ifdef WR_VERTEX_SHADER
+#define VECS_PER_RENDER_TASK 2U
+
+uniform HIGHP_SAMPLER_FLOAT sampler2D sRenderTasks;
+
+struct RenderTaskCommonData {
+ RectWithSize task_rect;
+ float texture_layer_index;
+};
+
+struct RenderTaskData {
+ RenderTaskCommonData common_data;
+ vec3 user_data;
+};
+
+RenderTaskData fetch_render_task_data(int index) {
+ ivec2 uv = get_fetch_uv(index, VECS_PER_RENDER_TASK);
+
+ vec4 texel0 = TEXEL_FETCH(sRenderTasks, uv, 0, ivec2(0, 0));
+ vec4 texel1 = TEXEL_FETCH(sRenderTasks, uv, 0, ivec2(1, 0));
+
+ RectWithSize task_rect = RectWithSize(
+ texel0.xy,
+ texel0.zw
+ );
+
+ RenderTaskCommonData common_data = RenderTaskCommonData(
+ task_rect,
+ texel1.x
+ );
+
+ RenderTaskData data = RenderTaskData(
+ common_data,
+ texel1.yzw
+ );
+
+ return data;
+}
+
+RenderTaskCommonData fetch_render_task_common_data(int index) {
+ ivec2 uv = get_fetch_uv(index, VECS_PER_RENDER_TASK);
+
+ vec4 texel0 = TEXEL_FETCH(sRenderTasks, uv, 0, ivec2(0, 0));
+ vec4 texel1 = TEXEL_FETCH(sRenderTasks, uv, 0, ivec2(1, 0));
+
+ RectWithSize task_rect = RectWithSize(
+ texel0.xy,
+ texel0.zw
+ );
+
+ RenderTaskCommonData data = RenderTaskCommonData(
+ task_rect,
+ texel1.x
+ );
+
+ return data;
+}
+
+#define PIC_TYPE_IMAGE 1
+#define PIC_TYPE_TEXT_SHADOW 2
+
+/*
+ The dynamic picture that this brush exists on. Right now, it
+ contains minimal information. In the future, it will describe
+ the transform mode of primitives on this picture, among other things.
+ */
+struct PictureTask {
+ RenderTaskCommonData common_data;
+ float device_pixel_scale;
+ vec2 content_origin;
+};
+
+PictureTask fetch_picture_task(int address) {
+ RenderTaskData task_data = fetch_render_task_data(address);
+
+ PictureTask task = PictureTask(
+ task_data.common_data,
+ task_data.user_data.x,
+ task_data.user_data.yz
+ );
+
+ return task;
+}
+
+#define CLIP_TASK_EMPTY 0x7FFF
+
+struct ClipArea {
+ RenderTaskCommonData common_data;
+ float device_pixel_scale;
+ vec2 screen_origin;
+};
+
+ClipArea fetch_clip_area(int index) {
+ ClipArea area;
+
+ if (index >= CLIP_TASK_EMPTY) {
+ RectWithSize rect = RectWithSize(vec2(0.0), vec2(0.0));
+
+ area.common_data = RenderTaskCommonData(rect, 0.0);
+ area.device_pixel_scale = 0.0;
+ area.screen_origin = vec2(0.0);
+ } else {
+ RenderTaskData task_data = fetch_render_task_data(index);
+
+ area.common_data = task_data.common_data;
+ area.device_pixel_scale = task_data.user_data.x;
+ area.screen_origin = task_data.user_data.yz;
+ }
+
+ return area;
+}
+
+#endif //WR_VERTEX_SHADER
diff --git a/third_party/webrender/webrender/res/shared.glsl b/third_party/webrender/webrender/res/shared.glsl
new file mode 100644
index 00000000000..7723b70f19c
--- /dev/null
+++ b/third_party/webrender/webrender/res/shared.glsl
@@ -0,0 +1,241 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifdef WR_FEATURE_PIXEL_LOCAL_STORAGE
+// For now, we need both extensions here, in order to initialize
+// the PLS to the current framebuffer color. In future, we can
+// possibly remove that requirement, or at least support the
+// other framebuffer fetch extensions that provide the same
+// functionality.
+#extension GL_EXT_shader_pixel_local_storage : require
+#extension GL_ARM_shader_framebuffer_fetch : require
+#endif
+
+#ifdef WR_FEATURE_TEXTURE_EXTERNAL
+// Please check https://www.khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external_essl3.txt
+// for this extension.
+#extension GL_OES_EGL_image_external_essl3 : require
+#endif
+
+#ifdef WR_FEATURE_ADVANCED_BLEND
+#extension GL_KHR_blend_equation_advanced : require
+#endif
+
+#ifdef WR_FEATURE_DUAL_SOURCE_BLENDING
+#ifdef GL_ES
+#extension GL_EXT_blend_func_extended : require
+#else
+#extension GL_ARB_explicit_attrib_location : require
+#endif
+#endif
+
+#include base
+
+#if defined(WR_FEATURE_TEXTURE_EXTERNAL) || defined(WR_FEATURE_TEXTURE_RECT) || defined(WR_FEATURE_TEXTURE_2D)
+#define TEX_SAMPLE(sampler, tex_coord) texture(sampler, tex_coord.xy)
+#else
+#define TEX_SAMPLE(sampler, tex_coord) texture(sampler, tex_coord)
+#endif
+
+//======================================================================================
+// Vertex shader attributes and uniforms
+//======================================================================================
+#ifdef WR_VERTEX_SHADER
+ // A generic uniform that shaders can optionally use to configure
+ // an operation mode for this batch.
+ uniform int uMode;
+
+ // Uniform inputs
+ uniform mat4 uTransform; // Orthographic projection
+
+ // Attribute inputs
+ in vec2 aPosition;
+
+ // get_fetch_uv is a macro to work around a macOS Intel driver parsing bug.
+ // TODO: convert back to a function once the driver issues are resolved, if ever.
+ // https://github.com/servo/webrender/pull/623
+ // https://github.com/servo/servo/issues/13953
+ // Do the division with unsigned ints because that's more efficient with D3D
+ #define get_fetch_uv(i, vpi) ivec2(int(vpi * (uint(i) % (WR_MAX_VERTEX_TEXTURE_WIDTH/vpi))), int(uint(i) / (WR_MAX_VERTEX_TEXTURE_WIDTH/vpi)))
+#endif
+
+//======================================================================================
+// Fragment shader attributes and uniforms
+//======================================================================================
+#ifdef WR_FRAGMENT_SHADER
+ // Uniform inputs
+
+ #ifdef WR_FEATURE_PIXEL_LOCAL_STORAGE
+ // Define the storage class of the pixel local storage.
+ // If defined as writable, it's a compile time error to
+ // have a normal fragment output variable declared.
+ #if defined(PLS_READONLY)
+ #define PLS_BLOCK __pixel_local_inEXT
+ #elif defined(PLS_WRITEONLY)
+ #define PLS_BLOCK __pixel_local_outEXT
+ #else
+ #define PLS_BLOCK __pixel_localEXT
+ #endif
+
+ // The structure of pixel local storage. Right now, it's
+ // just the current framebuffer color. In future, we have
+ // (at least) 12 bytes of space we can store extra info
+ // here (such as clip mask values).
+ PLS_BLOCK FrameBuffer {
+ layout(rgba8) highp vec4 color;
+ } PLS;
+
+ #ifndef PLS_READONLY
+ // Write the output of a fragment shader to PLS. Applies
+ // premultipled alpha blending by default, since the blender
+ // is disabled when PLS is active.
+ // TODO(gw): Properly support alpha blend mode for webgl / canvas.
+ void write_output(vec4 color) {
+ PLS.color = color + PLS.color * (1.0 - color.a);
+ }
+
+ // Write a raw value straight to PLS, if the fragment shader has
+ // already applied blending.
+ void write_output_raw(vec4 color) {
+ PLS.color = color;
+ }
+ #endif
+
+ #ifndef PLS_WRITEONLY
+ // Retrieve the current framebuffer color. Useful in conjunction with
+ // the write_output_raw function.
+ vec4 get_current_framebuffer_color() {
+ return PLS.color;
+ }
+ #endif
+ #else
+ // Fragment shader outputs
+ #ifdef WR_FEATURE_ADVANCED_BLEND
+ layout(blend_support_all_equations) out;
+ #endif
+
+ #ifdef WR_FEATURE_DUAL_SOURCE_BLENDING
+ layout(location = 0, index = 0) out vec4 oFragColor;
+ layout(location = 0, index = 1) out vec4 oFragBlend;
+ #else
+ out vec4 oFragColor;
+ #endif
+
+ // Write an output color in normal (non-PLS) shaders.
+ void write_output(vec4 color) {
+ oFragColor = color;
+ }
+ #endif
+
+ #define EPSILON 0.0001
+
+ // "Show Overdraw" color. Premultiplied.
+ #define WR_DEBUG_OVERDRAW_COLOR vec4(0.110, 0.077, 0.027, 0.125)
+
+ float distance_to_line(vec2 p0, vec2 perp_dir, vec2 p) {
+ vec2 dir_to_p0 = p0 - p;
+ return dot(normalize(perp_dir), dir_to_p0);
+ }
+
+ /// Find the appropriate half range to apply the AA approximation over.
+ /// This range represents a coefficient to go from one CSS pixel to half a device pixel.
+ float compute_aa_range(vec2 position) {
+ // The constant factor is chosen to compensate for the fact that length(fw) is equal
+ // to sqrt(2) times the device pixel ratio in the typical case. 0.5/sqrt(2) = 0.35355.
+ //
+ // This coefficient is chosen to ensure that any sample 0.5 pixels or more inside of
+ // the shape has no anti-aliasing applied to it (since pixels are sampled at their center,
+ // such a pixel (axis aligned) is fully inside the border). We need this so that antialiased
+ // curves properly connect with non-antialiased vertical or horizontal lines, among other things.
+ //
+ // Lines over a half-pixel away from the pixel center *can* intersect with the pixel square;
+ // indeed, unless they are horizontal or vertical, they are guaranteed to. However, choosing
+ // a nonzero area for such pixels causes noticeable artifacts at the junction between an anti-
+ // aliased corner and a straight edge.
+ //
+ // We may want to adjust this constant in specific scenarios (for example keep the principled
+ // value for straight edges where we want pixel-perfect equivalence with non antialiased lines
+ // when axis aligned, while selecting a larger and smoother aa range on curves).
+ return 0.35355 * length(fwidth(position));
+ }
+
+ /// Return the blending coefficient for distance antialiasing.
+ ///
+ /// 0.0 means inside the shape, 1.0 means outside.
+ ///
+ /// This cubic polynomial approximates the area of a 1x1 pixel square under a
+ /// line, given the signed Euclidean distance from the center of the square to
+ /// that line. Calculating the *exact* area would require taking into account
+ /// not only this distance but also the angle of the line. However, in
+ /// practice, this complexity is not required, as the area is roughly the same
+ /// regardless of the angle.
+ ///
+ /// The coefficients of this polynomial were determined through least-squares
+ /// regression and are accurate to within 2.16% of the total area of the pixel
+ /// square 95% of the time, with a maximum error of 3.53%.
+ ///
+ /// See the comments in `compute_aa_range()` for more information on the
+ /// cutoff values of -0.5 and 0.5.
+ float distance_aa(float aa_range, float signed_distance) {
+ float dist = 0.5 * signed_distance / aa_range;
+ if (dist <= -0.5 + EPSILON)
+ return 1.0;
+ if (dist >= 0.5 - EPSILON)
+ return 0.0;
+ return 0.5 + dist * (0.8431027 * dist * dist - 1.14453603);
+ }
+
+ /// Component-wise selection.
+ ///
+ /// The idea of using this is to ensure both potential branches are executed before
+ /// selecting the result, to avoid observable timing differences based on the condition.
+ ///
+ /// Example usage: color = if_then_else(LessThanEqual(color, vec3(0.5)), vec3(0.0), vec3(1.0));
+ ///
+ /// The above example sets each component to 0.0 or 1.0 independently depending on whether
+ /// their values are below or above 0.5.
+ ///
+ /// This is written as a macro in order to work with vectors of any dimension.
+ ///
+ /// Note: Some older android devices don't support mix with bvec. If we ever run into them
+ /// the only option we have is to polyfill it with a branch per component.
+ #define if_then_else(cond, then_branch, else_branch) mix(else_branch, then_branch, cond)
+#endif
+
+//======================================================================================
+// Shared shader uniforms
+//======================================================================================
+#ifdef WR_FEATURE_TEXTURE_2D
+uniform sampler2D sColor0;
+uniform sampler2D sColor1;
+uniform sampler2D sColor2;
+#elif defined WR_FEATURE_TEXTURE_RECT
+uniform sampler2DRect sColor0;
+uniform sampler2DRect sColor1;
+uniform sampler2DRect sColor2;
+#elif defined WR_FEATURE_TEXTURE_EXTERNAL
+uniform samplerExternalOES sColor0;
+uniform samplerExternalOES sColor1;
+uniform samplerExternalOES sColor2;
+#else
+uniform sampler2DArray sColor0;
+uniform sampler2DArray sColor1;
+uniform sampler2DArray sColor2;
+#endif
+
+#ifdef WR_FEATURE_DITHERING
+uniform sampler2D sDither;
+#endif
+
+//======================================================================================
+// Interpolator definitions
+//======================================================================================
+
+//======================================================================================
+// VS only types and UBOs
+//======================================================================================
+
+//======================================================================================
+// VS only functions
+//======================================================================================
diff --git a/third_party/webrender/webrender/res/shared_other.glsl b/third_party/webrender/webrender/res/shared_other.glsl
new file mode 100644
index 00000000000..03cad173cdb
--- /dev/null
+++ b/third_party/webrender/webrender/res/shared_other.glsl
@@ -0,0 +1,33 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//======================================================================================
+// Vertex shader attributes and uniforms
+//======================================================================================
+#ifdef WR_VERTEX_SHADER
+#endif
+
+//======================================================================================
+// Fragment shader attributes and uniforms
+//======================================================================================
+#ifdef WR_FRAGMENT_SHADER
+#endif
+
+//======================================================================================
+// Interpolator definitions
+//======================================================================================
+
+//======================================================================================
+// VS only types and UBOs
+//======================================================================================
+
+//======================================================================================
+// VS only functions
+//======================================================================================
+
+//======================================================================================
+// FS only functions
+//======================================================================================
+#ifdef WR_FRAGMENT_SHADER
+#endif
diff --git a/third_party/webrender/webrender/res/transform.glsl b/third_party/webrender/webrender/res/transform.glsl
new file mode 100644
index 00000000000..99eabec2a46
--- /dev/null
+++ b/third_party/webrender/webrender/res/transform.glsl
@@ -0,0 +1,124 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+flat varying vec4 vTransformBounds;
+
+#ifdef WR_VERTEX_SHADER
+
+#define VECS_PER_TRANSFORM 8U
+uniform HIGHP_SAMPLER_FLOAT sampler2D sTransformPalette;
+
+void init_transform_vs(vec4 local_bounds) {
+ vTransformBounds = local_bounds;
+}
+
+struct Transform {
+ mat4 m;
+ mat4 inv_m;
+ bool is_axis_aligned;
+};
+
+Transform fetch_transform(int id) {
+ Transform transform;
+
+ transform.is_axis_aligned = (id >> 24) == 0;
+ int index = id & 0x00ffffff;
+
+ // Create a UV base coord for each 8 texels.
+ // This is required because trying to use an offset
+ // of more than 8 texels doesn't work on some versions
+ // of macOS.
+ ivec2 uv = get_fetch_uv(index, VECS_PER_TRANSFORM);
+ ivec2 uv0 = ivec2(uv.x + 0, uv.y);
+
+ transform.m[0] = TEXEL_FETCH(sTransformPalette, uv0, 0, ivec2(0, 0));
+ transform.m[1] = TEXEL_FETCH(sTransformPalette, uv0, 0, ivec2(1, 0));
+ transform.m[2] = TEXEL_FETCH(sTransformPalette, uv0, 0, ivec2(2, 0));
+ transform.m[3] = TEXEL_FETCH(sTransformPalette, uv0, 0, ivec2(3, 0));
+
+ transform.inv_m[0] = TEXEL_FETCH(sTransformPalette, uv0, 0, ivec2(4, 0));
+ transform.inv_m[1] = TEXEL_FETCH(sTransformPalette, uv0, 0, ivec2(5, 0));
+ transform.inv_m[2] = TEXEL_FETCH(sTransformPalette, uv0, 0, ivec2(6, 0));
+ transform.inv_m[3] = TEXEL_FETCH(sTransformPalette, uv0, 0, ivec2(7, 0));
+
+ return transform;
+}
+
+// Return the intersection of the plane (set up by "normal" and "point")
+// with the ray (set up by "ray_origin" and "ray_dir"),
+// writing the resulting scaler into "t".
+bool ray_plane(vec3 normal, vec3 pt, vec3 ray_origin, vec3 ray_dir, out float t)
+{
+ float denom = dot(normal, ray_dir);
+ if (abs(denom) > 1e-6) {
+ vec3 d = pt - ray_origin;
+ t = dot(d, normal) / denom;
+ return t >= 0.0;
+ }
+
+ return false;
+}
+
+// Apply the inverse transform "inv_transform"
+// to the reference point "ref" in CSS space,
+// producing a local point on a Transform plane,
+// set by a base point "a" and a normal "n".
+vec4 untransform(vec2 ref, vec3 n, vec3 a, mat4 inv_transform) {
+ vec3 p = vec3(ref, -10000.0);
+ vec3 d = vec3(0, 0, 1.0);
+
+ float t = 0.0;
+ // get an intersection of the Transform plane with Z axis vector,
+ // originated from the "ref" point
+ ray_plane(n, a, p, d, t);
+ float z = p.z + d.z * t; // Z of the visible point on the Transform
+
+ vec4 r = inv_transform * vec4(ref, z, 1.0);
+ return r;
+}
+
+// Given a CSS space position, transform it back into the Transform space.
+vec4 get_node_pos(vec2 pos, Transform transform) {
+ // get a point on the scroll node plane
+ vec4 ah = transform.m * vec4(0.0, 0.0, 0.0, 1.0);
+ vec3 a = ah.xyz / ah.w;
+
+ // get the normal to the scroll node plane
+ vec3 n = transpose(mat3(transform.inv_m)) * vec3(0.0, 0.0, 1.0);
+ return untransform(pos, n, a, transform.inv_m);
+}
+
+#endif //WR_VERTEX_SHADER
+
+#ifdef WR_FRAGMENT_SHADER
+
+float signed_distance_rect(vec2 pos, vec2 p0, vec2 p1) {
+ vec2 d = max(p0 - pos, pos - p1);
+ return length(max(vec2(0.0), d)) + min(0.0, max(d.x, d.y));
+}
+
+float init_transform_fs(vec2 local_pos) {
+ // Get signed distance from local rect bounds.
+ float d = signed_distance_rect(
+ local_pos,
+ vTransformBounds.xy,
+ vTransformBounds.zw
+ );
+
+ // Find the appropriate distance to apply the AA smoothstep over.
+ float aa_range = compute_aa_range(local_pos);
+
+ // Only apply AA to fragments outside the signed distance field.
+ return distance_aa(aa_range, d);
+}
+
+float init_transform_rough_fs(vec2 local_pos) {
+ return point_inside_rect(
+ local_pos,
+ vTransformBounds.xy,
+ vTransformBounds.zw
+ );
+}
+
+#endif //WR_FRAGMENT_SHADER
diff --git a/third_party/webrender/webrender/res/yuv.glsl b/third_party/webrender/webrender/res/yuv.glsl
new file mode 100644
index 00000000000..ce582467be5
--- /dev/null
+++ b/third_party/webrender/webrender/res/yuv.glsl
@@ -0,0 +1,156 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include shared
+
+#define YUV_FORMAT_NV12 0
+#define YUV_FORMAT_PLANAR 1
+#define YUV_FORMAT_INTERLEAVED 2
+
+#ifdef WR_VERTEX_SHADER
+
+#ifdef WR_FEATURE_TEXTURE_RECT
+ #define TEX_SIZE(sampler) vec2(1.0)
+#else
+ #define TEX_SIZE(sampler) vec2(textureSize(sampler, 0).xy)
+#endif
+
+#define YUV_COLOR_SPACE_REC601 0
+#define YUV_COLOR_SPACE_REC709 1
+#define YUV_COLOR_SPACE_REC2020 2
+
+// The constants added to the Y, U and V components are applied in the fragment shader.
+
+// From Rec601:
+// [R] [1.1643835616438356, 0.0, 1.5960267857142858 ] [Y - 16]
+// [G] = [1.1643835616438358, -0.3917622900949137, -0.8129676472377708 ] x [U - 128]
+// [B] [1.1643835616438356, 2.017232142857143, 8.862867620416422e-17] [V - 128]
+//
+// For the range [0,1] instead of [0,255].
+//
+// The matrix is stored in column-major.
+const mat3 YuvColorMatrixRec601 = mat3(
+ 1.16438, 1.16438, 1.16438,
+ 0.0, -0.39176, 2.01723,
+ 1.59603, -0.81297, 0.0
+);
+
+// From Rec709:
+// [R] [1.1643835616438356, 0.0, 1.7927410714285714] [Y - 16]
+// [G] = [1.1643835616438358, -0.21324861427372963, -0.532909328559444 ] x [U - 128]
+// [B] [1.1643835616438356, 2.1124017857142854, 0.0 ] [V - 128]
+//
+// For the range [0,1] instead of [0,255]:
+//
+// The matrix is stored in column-major.
+const mat3 YuvColorMatrixRec709 = mat3(
+ 1.16438, 1.16438, 1.16438,
+ 0.0 , -0.21325, 2.11240,
+ 1.79274, -0.53291, 0.0
+);
+
+// From Re2020:
+// [R] [1.16438356164384, 0.0, 1.678674107142860 ] [Y - 16]
+// [G] = [1.16438356164384, -0.187326104219343, -0.650424318505057 ] x [U - 128]
+// [B] [1.16438356164384, 2.14177232142857, 0.0 ] [V - 128]
+//
+// For the range [0,1] instead of [0,255]:
+//
+// The matrix is stored in column-major.
+const mat3 YuvColorMatrixRec2020 = mat3(
+ 1.16438356164384 , 1.164383561643840, 1.16438356164384,
+ 0.0 , -0.187326104219343, 2.14177232142857,
+ 1.67867410714286 , -0.650424318505057, 0.0
+);
+
+mat3 get_yuv_color_matrix(int color_space) {
+ switch (color_space) {
+ case YUV_COLOR_SPACE_REC601:
+ return YuvColorMatrixRec601;
+ case YUV_COLOR_SPACE_REC709:
+ return YuvColorMatrixRec709;
+ default:
+ return YuvColorMatrixRec2020;
+ }
+}
+
+void write_uv_rect(
+ vec2 uv0,
+ vec2 uv1,
+ vec2 f,
+ vec2 texture_size,
+ out vec2 uv,
+ out vec4 uv_bounds
+) {
+ uv = mix(uv0, uv1, f);
+
+ uv_bounds = vec4(uv0 + vec2(0.5), uv1 - vec2(0.5));
+
+ #ifndef WR_FEATURE_TEXTURE_RECT
+ uv /= texture_size;
+ uv_bounds /= texture_size.xyxy;
+ #endif
+}
+#endif
+
+#ifdef WR_FRAGMENT_SHADER
+
+vec4 sample_yuv(
+ int format,
+ mat3 yuv_color_matrix,
+ float coefficient,
+ vec3 yuv_layers,
+ vec2 in_uv_y,
+ vec2 in_uv_u,
+ vec2 in_uv_v,
+ vec4 uv_bounds_y,
+ vec4 uv_bounds_u,
+ vec4 uv_bounds_v
+) {
+ vec3 yuv_value;
+
+ switch (format) {
+ case YUV_FORMAT_PLANAR:
+ {
+ // The yuv_planar format should have this third texture coordinate.
+ vec2 uv_y = clamp(in_uv_y, uv_bounds_y.xy, uv_bounds_y.zw);
+ vec2 uv_u = clamp(in_uv_u, uv_bounds_u.xy, uv_bounds_u.zw);
+ vec2 uv_v = clamp(in_uv_v, uv_bounds_v.xy, uv_bounds_v.zw);
+ yuv_value.x = TEX_SAMPLE(sColor0, vec3(uv_y, yuv_layers.x)).r;
+ yuv_value.y = TEX_SAMPLE(sColor1, vec3(uv_u, yuv_layers.y)).r;
+ yuv_value.z = TEX_SAMPLE(sColor2, vec3(uv_v, yuv_layers.z)).r;
+ }
+ break;
+
+ case YUV_FORMAT_NV12:
+ {
+ vec2 uv_y = clamp(in_uv_y, uv_bounds_y.xy, uv_bounds_y.zw);
+ vec2 uv_uv = clamp(in_uv_u, uv_bounds_u.xy, uv_bounds_u.zw);
+ yuv_value.x = TEX_SAMPLE(sColor0, vec3(uv_y, yuv_layers.x)).r;
+ yuv_value.yz = TEX_SAMPLE(sColor1, vec3(uv_uv, yuv_layers.y)).rg;
+ }
+ break;
+
+ case YUV_FORMAT_INTERLEAVED:
+ {
+ // "The Y, Cb and Cr color channels within the 422 data are mapped into
+ // the existing green, blue and red color channels."
+ // https://www.khronos.org/registry/OpenGL/extensions/APPLE/APPLE_rgb_422.txt
+ vec2 uv_y = clamp(in_uv_y, uv_bounds_y.xy, uv_bounds_y.zw);
+ yuv_value = TEX_SAMPLE(sColor0, vec3(uv_y, yuv_layers.x)).gbr;
+ }
+ break;
+
+ default:
+ yuv_value = vec3(0.0);
+ break;
+ }
+
+ // See the YuvColorMatrix definition for an explanation of where the constants come from.
+ vec3 rgb = yuv_color_matrix * (yuv_value * coefficient - vec3(0.06275, 0.50196, 0.50196));
+ vec4 color = vec4(rgb, 1.0);
+
+ return color;
+}
+#endif
diff --git a/third_party/webrender/webrender/src/batch.rs b/third_party/webrender/webrender/src/batch.rs
new file mode 100644
index 00000000000..1ee371c6531
--- /dev/null
+++ b/third_party/webrender/webrender/src/batch.rs
@@ -0,0 +1,3439 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{AlphaType, ClipMode, ExternalImageType, ImageRendering, EdgeAaSegmentMask};
+use api::{YuvColorSpace, YuvFormat, ColorDepth, ColorRange, PremultipliedColorF};
+use api::units::*;
+use crate::clip::{ClipDataStore, ClipNodeFlags, ClipNodeRange, ClipItemKind, ClipStore};
+use crate::spatial_tree::{SpatialTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex, CoordinateSystemId};
+use crate::composite::{CompositeState};
+use crate::glyph_rasterizer::GlyphFormat;
+use crate::gpu_cache::{GpuBlockData, GpuCache, GpuCacheHandle, GpuCacheAddress};
+use crate::gpu_types::{BrushFlags, BrushInstance, PrimitiveHeaders, ZBufferId, ZBufferIdGenerator};
+use crate::gpu_types::{ClipMaskInstance, SplitCompositeInstance, BrushShaderKind};
+use crate::gpu_types::{PrimitiveInstanceData, RasterizationSpace, GlyphInstance};
+use crate::gpu_types::{PrimitiveHeader, PrimitiveHeaderIndex, TransformPaletteId, TransformPalette};
+use crate::gpu_types::{ImageBrushData, get_shader_opacity};
+use crate::internal_types::{FastHashMap, SavedTargetIndex, Swizzle, TextureSource, Filter};
+use crate::picture::{Picture3DContext, PictureCompositeMode, PicturePrimitive};
+use crate::prim_store::{DeferredResolve, PrimitiveInstanceKind, PrimitiveVisibilityIndex, PrimitiveVisibilityMask};
+use crate::prim_store::{VisibleGradientTile, PrimitiveInstance, PrimitiveOpacity, SegmentInstanceIndex};
+use crate::prim_store::{BrushSegment, ClipMaskKind, ClipTaskIndex, PrimitiveVisibility, PrimitiveVisibilityFlags};
+use crate::prim_store::{VECS_PER_SEGMENT, SpaceMapper};
+use crate::prim_store::image::ImageSource;
+use crate::render_target::RenderTargetContext;
+use crate::render_task_graph::{RenderTaskId, RenderTaskGraph};
+use crate::render_task::RenderTaskAddress;
+use crate::renderer::{BlendMode, ImageBufferKind, ShaderColorMode};
+use crate::renderer::{BLOCKS_PER_UV_RECT, MAX_VERTEX_TEXTURE_WIDTH};
+use crate::resource_cache::{CacheItem, GlyphFetchResult, ImageRequest, ResourceCache};
+use smallvec::SmallVec;
+use std::{f32, i32, usize};
+use crate::util::{project_rect, TransformedRectKind};
+
+// Special sentinel value recognized by the shader. It is considered to be
+// a dummy task that doesn't mask out anything.
+const OPAQUE_TASK_ADDRESS: RenderTaskAddress = RenderTaskAddress(0x7fff);
+
+/// Used to signal there are no segments provided with this primitive.
+const INVALID_SEGMENT_INDEX: i32 = 0xffff;
+
+/// Size in device pixels for tiles that clip masks are drawn in.
+const CLIP_RECTANGLE_TILE_SIZE: i32 = 128;
+
+/// The minimum size of a clip mask before trying to draw in tiles.
+const CLIP_RECTANGLE_AREA_THRESHOLD: i32 = CLIP_RECTANGLE_TILE_SIZE * CLIP_RECTANGLE_TILE_SIZE * 4;
+
+#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum BrushBatchKind {
+ Solid,
+ Image(ImageBufferKind),
+ Blend,
+ MixBlend {
+ task_id: RenderTaskId,
+ source_id: RenderTaskId,
+ backdrop_id: RenderTaskId,
+ },
+ YuvImage(ImageBufferKind, YuvFormat, ColorDepth, YuvColorSpace, ColorRange),
+ ConicGradient,
+ RadialGradient,
+ LinearGradient,
+ Opacity,
+}
+
+#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum BatchKind {
+ SplitComposite,
+ TextRun(GlyphFormat),
+ Brush(BrushBatchKind),
+}
+
+impl BatchKind {
+ fn shader_kind(&self) -> BrushShaderKind {
+ match self {
+ BatchKind::Brush(BrushBatchKind::Solid) => BrushShaderKind::Solid,
+ BatchKind::Brush(BrushBatchKind::Image(..)) => BrushShaderKind::Image,
+ BatchKind::Brush(BrushBatchKind::LinearGradient) => BrushShaderKind::LinearGradient,
+ BatchKind::Brush(BrushBatchKind::RadialGradient) => BrushShaderKind::RadialGradient,
+ BatchKind::Brush(BrushBatchKind::ConicGradient) => BrushShaderKind::ConicGradient,
+ BatchKind::Brush(BrushBatchKind::Blend) => BrushShaderKind::Blend,
+ BatchKind::Brush(BrushBatchKind::MixBlend { .. }) => BrushShaderKind::MixBlend,
+ BatchKind::Brush(BrushBatchKind::YuvImage(..)) => BrushShaderKind::Yuv,
+ BatchKind::Brush(BrushBatchKind::Opacity) => BrushShaderKind::Opacity,
+ BatchKind::TextRun(..) => BrushShaderKind::Text,
+ _ => BrushShaderKind::None,
+ }
+ }
+}
+
+/// Optional textures that can be used as a source in the shaders.
+/// Textures that are not used by the batch are equal to TextureId::invalid().
+#[derive(Copy, Clone, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BatchTextures {
+ pub colors: [TextureSource; 3],
+}
+
+impl BatchTextures {
+ pub fn no_texture() -> Self {
+ BatchTextures {
+ colors: [TextureSource::Invalid; 3],
+ }
+ }
+
+ pub fn render_target_cache() -> Self {
+ BatchTextures {
+ colors: [
+ TextureSource::PrevPassColor,
+ TextureSource::PrevPassAlpha,
+ TextureSource::Invalid,
+ ],
+ }
+ }
+
+ pub fn color(texture: TextureSource) -> Self {
+ BatchTextures {
+ colors: [texture, texture, TextureSource::Invalid],
+ }
+ }
+
+ pub fn is_compatible_with(&self, other: &BatchTextures) -> bool {
+ self.colors.iter().zip(other.colors.iter()).all(|(t1, t2)| textures_compatible(*t1, *t2))
+ }
+
+ pub fn combine_textures(&self, other: BatchTextures) -> Option<BatchTextures> {
+ if !self.is_compatible_with(&other) {
+ return None;
+ }
+
+ let mut new_textures = BatchTextures::no_texture();
+ for (i, (color, other_color)) in self.colors.iter().zip(other.colors.iter()).enumerate() {
+ // If these textures are compatible, for each source either both sources are invalid or only one is not invalid.
+ new_textures.colors[i] = if *color == TextureSource::Invalid {
+ *other_color
+ } else {
+ *color
+ };
+ }
+ Some(new_textures)
+ }
+}
+
+#[derive(Copy, Clone, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BatchKey {
+ pub kind: BatchKind,
+ pub blend_mode: BlendMode,
+ pub textures: BatchTextures,
+}
+
+impl BatchKey {
+ pub fn new(kind: BatchKind, blend_mode: BlendMode, textures: BatchTextures) -> Self {
+ BatchKey {
+ kind,
+ blend_mode,
+ textures,
+ }
+ }
+
+ pub fn is_compatible_with(&self, other: &BatchKey) -> bool {
+ self.kind == other.kind && self.blend_mode == other.blend_mode && self.textures.is_compatible_with(&other.textures)
+ }
+}
+
+#[inline]
+fn textures_compatible(t1: TextureSource, t2: TextureSource) -> bool {
+ t1 == TextureSource::Invalid || t2 == TextureSource::Invalid || t1 == t2
+}
+
+pub struct AlphaBatchList {
+ pub batches: Vec<PrimitiveBatch>,
+ pub item_rects: Vec<Vec<PictureRect>>,
+ current_batch_index: usize,
+ current_z_id: ZBufferId,
+ break_advanced_blend_batches: bool,
+ lookback_count: usize,
+}
+
+impl AlphaBatchList {
+ fn new(break_advanced_blend_batches: bool, lookback_count: usize) -> Self {
+ AlphaBatchList {
+ batches: Vec::new(),
+ item_rects: Vec::new(),
+ current_z_id: ZBufferId::invalid(),
+ current_batch_index: usize::MAX,
+ break_advanced_blend_batches,
+ lookback_count,
+ }
+ }
+
+ /// Clear all current batches in this list. This is typically used
+ /// when a primitive is encountered that occludes all previous
+ /// content in this batch list.
+ fn clear(&mut self) {
+ self.current_batch_index = usize::MAX;
+ self.current_z_id = ZBufferId::invalid();
+ self.batches.clear();
+ self.item_rects.clear();
+ }
+
+ pub fn set_params_and_get_batch(
+ &mut self,
+ key: BatchKey,
+ features: BatchFeatures,
+ // The bounding box of everything at this Z plane. We expect potentially
+ // multiple primitive segments coming with the same `z_id`.
+ z_bounding_rect: &PictureRect,
+ z_id: ZBufferId,
+ ) -> &mut Vec<PrimitiveInstanceData> {
+ if z_id != self.current_z_id ||
+ self.current_batch_index == usize::MAX ||
+ !self.batches[self.current_batch_index].key.is_compatible_with(&key)
+ {
+ let mut selected_batch_index = None;
+
+ match key.blend_mode {
+ BlendMode::SubpixelWithBgColor => {
+ 'outer_multipass: for (batch_index, batch) in self.batches.iter().enumerate().rev().take(self.lookback_count) {
+ // Some subpixel batches are drawn in two passes. Because of this, we need
+ // to check for overlaps with every batch (which is a bit different
+ // than the normal batching below).
+ for item_rect in &self.item_rects[batch_index] {
+ if item_rect.intersects(z_bounding_rect) {
+ break 'outer_multipass;
+ }
+ }
+
+ if batch.key.is_compatible_with(&key) {
+ selected_batch_index = Some(batch_index);
+ break;
+ }
+ }
+ }
+ BlendMode::Advanced(_) if self.break_advanced_blend_batches => {
+ // don't try to find a batch
+ }
+ _ => {
+ 'outer_default: for (batch_index, batch) in self.batches.iter().enumerate().rev().take(self.lookback_count) {
+ // For normal batches, we only need to check for overlaps for batches
+ // other than the first batch we consider. If the first batch
+ // is compatible, then we know there isn't any potential overlap
+ // issues to worry about.
+ if batch.key.is_compatible_with(&key) {
+ selected_batch_index = Some(batch_index);
+ break;
+ }
+
+ // check for intersections
+ for item_rect in &self.item_rects[batch_index] {
+ if item_rect.intersects(z_bounding_rect) {
+ break 'outer_default;
+ }
+ }
+ }
+ }
+ }
+
+ if selected_batch_index.is_none() {
+ let new_batch = PrimitiveBatch::new(key);
+ selected_batch_index = Some(self.batches.len());
+ self.batches.push(new_batch);
+ self.item_rects.push(Vec::new());
+ }
+
+ self.current_batch_index = selected_batch_index.unwrap();
+ self.item_rects[self.current_batch_index].push(*z_bounding_rect);
+ self.current_z_id = z_id;
+ } else if cfg!(debug_assertions) {
+ // If it's a different segment of the same (larger) primitive, we expect the bounding box
+ // to be the same - coming from the primitive itself, not the segment.
+ assert_eq!(self.item_rects[self.current_batch_index].last(), Some(z_bounding_rect));
+ }
+
+ let batch = &mut self.batches[self.current_batch_index];
+ batch.features |= features;
+
+ &mut batch.instances
+ }
+}
+
+pub struct OpaqueBatchList {
+ pub pixel_area_threshold_for_new_batch: f32,
+ pub batches: Vec<PrimitiveBatch>,
+ pub current_batch_index: usize,
+ lookback_count: usize,
+}
+
+impl OpaqueBatchList {
+ fn new(pixel_area_threshold_for_new_batch: f32, lookback_count: usize) -> Self {
+ OpaqueBatchList {
+ batches: Vec::new(),
+ pixel_area_threshold_for_new_batch,
+ current_batch_index: usize::MAX,
+ lookback_count,
+ }
+ }
+
+ /// Clear all current batches in this list. This is typically used
+ /// when a primitive is encountered that occludes all previous
+ /// content in this batch list.
+ fn clear(&mut self) {
+ self.current_batch_index = usize::MAX;
+ self.batches.clear();
+ }
+
+ pub fn set_params_and_get_batch(
+ &mut self,
+ key: BatchKey,
+ features: BatchFeatures,
+ // The bounding box of everything at the current Z, whatever it is. We expect potentially
+ // multiple primitive segments produced by a primitive, which we allow to check
+ // `current_batch_index` instead of iterating the batches.
+ z_bounding_rect: &PictureRect,
+ ) -> &mut Vec<PrimitiveInstanceData> {
+ if self.current_batch_index == usize::MAX ||
+ !self.batches[self.current_batch_index].key.is_compatible_with(&key) {
+ let mut selected_batch_index = None;
+ let item_area = z_bounding_rect.size.area();
+
+ // If the area of this primitive is larger than the given threshold,
+ // then it is large enough to warrant breaking a batch for. In this
+ // case we just see if it can be added to the existing batch or
+ // create a new one.
+ if item_area > self.pixel_area_threshold_for_new_batch {
+ if let Some(batch) = self.batches.last() {
+ if batch.key.is_compatible_with(&key) {
+ selected_batch_index = Some(self.batches.len() - 1);
+ }
+ }
+ } else {
+ // Otherwise, look back through a reasonable number of batches.
+ for (batch_index, batch) in self.batches.iter().enumerate().rev().take(self.lookback_count) {
+ if batch.key.is_compatible_with(&key) {
+ selected_batch_index = Some(batch_index);
+ break;
+ }
+ }
+ }
+
+ if selected_batch_index.is_none() {
+ let new_batch = PrimitiveBatch::new(key);
+ selected_batch_index = Some(self.batches.len());
+ self.batches.push(new_batch);
+ }
+
+ self.current_batch_index = selected_batch_index.unwrap();
+ }
+
+ let batch = &mut self.batches[self.current_batch_index];
+ batch.features |= features;
+
+ &mut batch.instances
+ }
+
+ fn finalize(&mut self) {
+ // Reverse the instance arrays in the opaque batches
+ // to get maximum z-buffer efficiency by drawing
+ // front-to-back.
+ // TODO(gw): Maybe we can change the batch code to
+ // build these in reverse and avoid having
+ // to reverse the instance array here.
+ for batch in &mut self.batches {
+ batch.instances.reverse();
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PrimitiveBatch {
+ pub key: BatchKey,
+ pub instances: Vec<PrimitiveInstanceData>,
+ pub features: BatchFeatures,
+}
+
+bitflags! {
+ /// Features of the batch that, if not requested, may allow a fast-path.
+ ///
+ /// Rather than breaking batches when primitives request different features,
+ /// we always request the minimum amount of features to satisfy all items in
+ /// the batch.
+ /// The goal is to let the renderer be optionally select more specialized
+ /// versions of a shader if the batch doesn't require code certain code paths.
+ /// Not all shaders necessarily implement all of these features.
+ #[cfg_attr(feature = "capture", derive(Serialize))]
+ #[cfg_attr(feature = "replay", derive(Deserialize))]
+ pub struct BatchFeatures: u8 {
+ const ALPHA_PASS = 1 << 0;
+ const ANTIALIASING = 1 << 1;
+ const REPETITION = 1 << 2;
+ }
+}
+
+impl PrimitiveBatch {
+ fn new(key: BatchKey) -> PrimitiveBatch {
+ PrimitiveBatch {
+ key,
+ instances: Vec::new(),
+ features: BatchFeatures::empty(),
+ }
+ }
+
+ fn merge(&mut self, other: PrimitiveBatch) {
+ self.instances.extend(other.instances);
+ self.features |= other.features;
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct AlphaBatchContainer {
+ pub opaque_batches: Vec<PrimitiveBatch>,
+ pub alpha_batches: Vec<PrimitiveBatch>,
+ /// The overall scissor rect for this render task, if one
+ /// is required.
+ pub task_scissor_rect: Option<DeviceIntRect>,
+ /// The rectangle of the owning render target that this
+ /// set of batches affects.
+ pub task_rect: DeviceIntRect,
+}
+
+impl AlphaBatchContainer {
+ pub fn new(
+ task_scissor_rect: Option<DeviceIntRect>,
+ ) -> AlphaBatchContainer {
+ AlphaBatchContainer {
+ opaque_batches: Vec::new(),
+ alpha_batches: Vec::new(),
+ task_scissor_rect,
+ task_rect: DeviceIntRect::zero(),
+ }
+ }
+
+ pub fn is_empty(&self) -> bool {
+ self.opaque_batches.is_empty() &&
+ self.alpha_batches.is_empty()
+ }
+
+ fn merge(&mut self, builder: AlphaBatchBuilder, task_rect: &DeviceIntRect) {
+ self.task_rect = self.task_rect.union(task_rect);
+
+ for other_batch in builder.opaque_batch_list.batches {
+ let batch_index = self.opaque_batches.iter().position(|batch| {
+ batch.key.is_compatible_with(&other_batch.key)
+ });
+
+ match batch_index {
+ Some(batch_index) => {
+ self.opaque_batches[batch_index].merge(other_batch);
+ }
+ None => {
+ self.opaque_batches.push(other_batch);
+ }
+ }
+ }
+
+ let mut min_batch_index = 0;
+
+ for other_batch in builder.alpha_batch_list.batches {
+ let batch_index = self.alpha_batches.iter().skip(min_batch_index).position(|batch| {
+ batch.key.is_compatible_with(&other_batch.key)
+ });
+
+ match batch_index {
+ Some(batch_index) => {
+ let index = batch_index + min_batch_index;
+ self.alpha_batches[index].merge(other_batch);
+ min_batch_index = index;
+ }
+ None => {
+ self.alpha_batches.push(other_batch);
+ min_batch_index = self.alpha_batches.len();
+ }
+ }
+ }
+ }
+}
+
+/// Each segment can optionally specify a per-segment
+/// texture set and one user data field.
+#[derive(Debug, Copy, Clone)]
+struct SegmentInstanceData {
+ textures: BatchTextures,
+ specific_resource_address: i32,
+}
+
+/// Encapsulates the logic of building batches for items that are blended.
+pub struct AlphaBatchBuilder {
+ pub alpha_batch_list: AlphaBatchList,
+ pub opaque_batch_list: OpaqueBatchList,
+ pub render_task_id: RenderTaskId,
+ render_task_address: RenderTaskAddress,
+ pub vis_mask: PrimitiveVisibilityMask,
+}
+
+impl AlphaBatchBuilder {
+ pub fn new(
+ screen_size: DeviceIntSize,
+ break_advanced_blend_batches: bool,
+ lookback_count: usize,
+ render_task_id: RenderTaskId,
+ render_task_address: RenderTaskAddress,
+ vis_mask: PrimitiveVisibilityMask,
+ ) -> Self {
+ // The threshold for creating a new batch is
+ // one quarter the screen size.
+ let batch_area_threshold = (screen_size.width * screen_size.height) as f32 / 4.0;
+
+ AlphaBatchBuilder {
+ alpha_batch_list: AlphaBatchList::new(break_advanced_blend_batches, lookback_count),
+ opaque_batch_list: OpaqueBatchList::new(batch_area_threshold, lookback_count),
+ render_task_id,
+ render_task_address,
+ vis_mask,
+ }
+ }
+
+ /// Clear all current batches in this builder. This is typically used
+ /// when a primitive is encountered that occludes all previous
+ /// content in this batch list.
+ fn clear(&mut self) {
+ self.alpha_batch_list.clear();
+ self.opaque_batch_list.clear();
+ }
+
+ pub fn build(
+ mut self,
+ batch_containers: &mut Vec<AlphaBatchContainer>,
+ merged_batches: &mut AlphaBatchContainer,
+ task_rect: DeviceIntRect,
+ task_scissor_rect: Option<DeviceIntRect>,
+ ) {
+ self.opaque_batch_list.finalize();
+
+ if task_scissor_rect.is_none() {
+ merged_batches.merge(self, &task_rect);
+ } else {
+ batch_containers.push(AlphaBatchContainer {
+ alpha_batches: self.alpha_batch_list.batches,
+ opaque_batches: self.opaque_batch_list.batches,
+ task_scissor_rect,
+ task_rect,
+ });
+ }
+ }
+
+ pub fn push_single_instance(
+ &mut self,
+ key: BatchKey,
+ features: BatchFeatures,
+ bounding_rect: &PictureRect,
+ z_id: ZBufferId,
+ instance: PrimitiveInstanceData,
+ ) {
+ self.set_params_and_get_batch(key, features, bounding_rect, z_id)
+ .push(instance);
+ }
+
+ pub fn set_params_and_get_batch(
+ &mut self,
+ key: BatchKey,
+ features: BatchFeatures,
+ bounding_rect: &PictureRect,
+ z_id: ZBufferId,
+ ) -> &mut Vec<PrimitiveInstanceData> {
+ match key.blend_mode {
+ BlendMode::None => {
+ self.opaque_batch_list
+ .set_params_and_get_batch(key, features, bounding_rect)
+ }
+ BlendMode::Alpha |
+ BlendMode::PremultipliedAlpha |
+ BlendMode::PremultipliedDestOut |
+ BlendMode::SubpixelConstantTextColor(..) |
+ BlendMode::SubpixelWithBgColor |
+ BlendMode::SubpixelDualSource |
+ BlendMode::Advanced(_) => {
+ self.alpha_batch_list
+ .set_params_and_get_batch(key, features, bounding_rect, z_id)
+ }
+ }
+ }
+}
+
+/// Supports (recursively) adding a list of primitives and pictures to an alpha batch
+/// builder. In future, it will support multiple dirty regions / slices, allowing the
+/// contents of a picture to be spliced into multiple batch builders.
+pub struct BatchBuilder {
+ /// A temporary buffer that is used during glyph fetching, stored here
+ /// to reduce memory allocations.
+ glyph_fetch_buffer: Vec<GlyphFetchResult>,
+
+ pub batchers: Vec<AlphaBatchBuilder>,
+}
+
+impl BatchBuilder {
+ pub fn new(batchers: Vec<AlphaBatchBuilder>) -> Self {
+ BatchBuilder {
+ glyph_fetch_buffer: Vec::new(),
+ batchers,
+ }
+ }
+
+ pub fn finalize(self) -> Vec<AlphaBatchBuilder> {
+ self.batchers
+ }
+
+ fn add_brush_instance_to_batches(
+ &mut self,
+ batch_key: BatchKey,
+ features: BatchFeatures,
+ bounding_rect: &PictureRect,
+ z_id: ZBufferId,
+ segment_index: i32,
+ edge_flags: EdgeAaSegmentMask,
+ clip_task_address: RenderTaskAddress,
+ brush_flags: BrushFlags,
+ prim_header_index: PrimitiveHeaderIndex,
+ resource_address: i32,
+ prim_vis_mask: PrimitiveVisibilityMask,
+ ) {
+ for batcher in &mut self.batchers {
+ if batcher.vis_mask.intersects(prim_vis_mask) {
+ let render_task_address = batcher.render_task_address;
+
+ let instance = BrushInstance {
+ segment_index,
+ edge_flags,
+ clip_task_address,
+ render_task_address,
+ brush_flags,
+ prim_header_index,
+ resource_address,
+ brush_kind: batch_key.kind.shader_kind(),
+ };
+
+ batcher.push_single_instance(
+ batch_key,
+ features,
+ bounding_rect,
+ z_id,
+ PrimitiveInstanceData::from(instance),
+ );
+ }
+ }
+ }
+
+ fn add_split_composite_instance_to_batches(
+ &mut self,
+ batch_key: BatchKey,
+ bounding_rect: &PictureRect,
+ z_id: ZBufferId,
+ prim_header_index: PrimitiveHeaderIndex,
+ polygons_address: GpuCacheAddress,
+ prim_vis_mask: PrimitiveVisibilityMask,
+ ) {
+ for batcher in &mut self.batchers {
+ if batcher.vis_mask.intersects(prim_vis_mask) {
+ let render_task_address = batcher.render_task_address;
+
+ batcher.push_single_instance(
+ batch_key,
+ BatchFeatures::empty(),
+ bounding_rect,
+ z_id,
+ PrimitiveInstanceData::from(SplitCompositeInstance {
+ prim_header_index,
+ render_task_address,
+ polygons_address,
+ z: z_id,
+ }),
+ );
+ }
+ }
+ }
+
+ /// Clear all current batchers. This is typically used when a primitive
+ /// is encountered that occludes all previous content in this batch list.
+ fn clear_batches(&mut self) {
+ for batcher in &mut self.batchers {
+ batcher.clear();
+ }
+ }
+
+ /// Add a picture to a given batch builder.
+ pub fn add_pic_to_batch(
+ &mut self,
+ pic: &PicturePrimitive,
+ ctx: &RenderTargetContext,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &RenderTaskGraph,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+ prim_headers: &mut PrimitiveHeaders,
+ transforms: &mut TransformPalette,
+ root_spatial_node_index: SpatialNodeIndex,
+ surface_spatial_node_index: SpatialNodeIndex,
+ z_generator: &mut ZBufferIdGenerator,
+ composite_state: &mut CompositeState,
+ ) {
+ for cluster in &pic.prim_list.clusters {
+ profile_scope!("cluster");
+ // Add each run in this picture to the batch.
+ for prim_instance in &cluster.prim_instances {
+ self.add_prim_to_batch(
+ prim_instance,
+ cluster.spatial_node_index,
+ ctx,
+ gpu_cache,
+ render_tasks,
+ deferred_resolves,
+ prim_headers,
+ transforms,
+ root_spatial_node_index,
+ surface_spatial_node_index,
+ z_generator,
+ composite_state,
+ );
+ }
+ }
+ }
+
+ // If an image is being drawn as a compositor surface, we don't want
+ // to draw the surface itself into the tile. Instead, we draw a transparent
+ // rectangle that writes to the z-buffer where this compositor surface is.
+ // That ensures we 'cut out' the part of the tile that has the compositor
+ // surface on it, allowing us to draw this tile as an overlay on top of
+ // the compositor surface.
+ // TODO(gw): There's a slight performance cost to doing this cutout rectangle
+ // if we end up not needing to use overlay mode. Consider skipping
+ // the cutout completely in this path.
+ fn emit_placeholder(
+ &mut self,
+ prim_rect: LayoutRect,
+ prim_info: &PrimitiveVisibility,
+ z_id: ZBufferId,
+ transform_id: TransformPaletteId,
+ batch_features: BatchFeatures,
+ ctx: &RenderTargetContext,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &RenderTaskGraph,
+ prim_headers: &mut PrimitiveHeaders,
+ ) {
+ let batch_params = BrushBatchParameters::shared(
+ BrushBatchKind::Solid,
+ BatchTextures::no_texture(),
+ [get_shader_opacity(0.0), 0, 0, 0],
+ 0,
+ );
+
+ let prim_cache_address = gpu_cache.get_address(
+ &ctx.globals.default_transparent_rect_handle,
+ );
+
+ let prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: prim_cache_address,
+ transform_id,
+ };
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ batch_params.prim_user_data,
+ );
+
+ let bounding_rect = &prim_info.clip_chain.pic_clip_rect;
+ let transform_kind = transform_id.transform_kind();
+ let prim_vis_mask = prim_info.visibility_mask;
+
+ self.add_segmented_prim_to_batch(
+ None,
+ PrimitiveOpacity::translucent(),
+ &batch_params,
+ BlendMode::None,
+ BlendMode::None,
+ batch_features,
+ prim_header_index,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_info.clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ }
+
+ // Adds a primitive to a batch.
+ // It can recursively call itself in some situations, for
+ // example if it encounters a picture where the items
+ // in that picture are being drawn into the same target.
+ fn add_prim_to_batch(
+ &mut self,
+ prim_instance: &PrimitiveInstance,
+ prim_spatial_node_index: SpatialNodeIndex,
+ ctx: &RenderTargetContext,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &RenderTaskGraph,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+ prim_headers: &mut PrimitiveHeaders,
+ transforms: &mut TransformPalette,
+ root_spatial_node_index: SpatialNodeIndex,
+ surface_spatial_node_index: SpatialNodeIndex,
+ z_generator: &mut ZBufferIdGenerator,
+ composite_state: &mut CompositeState,
+ ) {
+ if prim_instance.visibility_info == PrimitiveVisibilityIndex::INVALID {
+ return;
+ }
+
+ #[cfg(debug_assertions)] //TODO: why is this needed?
+ debug_assert_eq!(prim_instance.prepared_frame_id, render_tasks.frame_id());
+
+ let is_chased = prim_instance.is_chased();
+
+ let transform_id = transforms
+ .get_id(
+ prim_spatial_node_index,
+ root_spatial_node_index,
+ ctx.spatial_tree,
+ );
+
+ // TODO(gw): Calculating this for every primitive is a bit
+ // wasteful. We should probably cache this in
+ // the scroll node...
+ let transform_kind = transform_id.transform_kind();
+ let prim_info = &ctx.scratch.prim_info[prim_instance.visibility_info.0 as usize];
+ let bounding_rect = &prim_info.clip_chain.pic_clip_rect;
+
+ // If this primitive is a backdrop, that means that it is known to cover
+ // the entire picture cache background. In that case, the renderer will
+ // use the backdrop color as a clear color, and so we can drop this
+ // primitive and any prior primitives from the batch lists for this
+ // picture cache slice.
+ if prim_info.flags.contains(PrimitiveVisibilityFlags::IS_BACKDROP) {
+ self.clear_batches();
+ return;
+ }
+
+ let z_id = z_generator.next();
+
+ let prim_rect = ctx.data_stores.get_local_prim_rect(
+ prim_instance,
+ ctx.prim_store,
+ );
+
+ let mut batch_features = BatchFeatures::empty();
+ if ctx.data_stores.prim_may_need_repetition(prim_instance) {
+ batch_features |= BatchFeatures::REPETITION;
+ }
+
+ if transform_kind != TransformedRectKind::AxisAligned {
+ batch_features |= BatchFeatures::ANTIALIASING;
+ }
+
+ let prim_vis_mask = prim_info.visibility_mask;
+ let clip_task_address = ctx.get_prim_clip_task_address(
+ prim_info.clip_task_index,
+ render_tasks,
+ );
+
+ if is_chased {
+ println!("\tbatch {:?} with bound {:?} and clip task {:?}", prim_rect, bounding_rect, clip_task_address);
+ }
+
+ if !bounding_rect.is_empty() {
+ debug_assert_eq!(prim_info.clip_chain.pic_spatial_node_index, surface_spatial_node_index,
+ "The primitive's bounding box is specified in a different coordinate system from the current batch!");
+ }
+
+ match prim_instance.kind {
+ PrimitiveInstanceKind::Clear { data_handle } => {
+ let prim_data = &ctx.data_stores.prim[data_handle];
+ let prim_cache_address = gpu_cache.get_address(&prim_data.gpu_cache_handle);
+
+ // TODO(gw): We can abstract some of the common code below into
+ // helper methods, as we port more primitives to make
+ // use of interning.
+
+ let prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: prim_cache_address,
+ transform_id,
+ };
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ [get_shader_opacity(1.0), 0, 0, 0],
+ );
+
+ let batch_key = BatchKey {
+ blend_mode: BlendMode::PremultipliedDestOut,
+ kind: BatchKind::Brush(BrushBatchKind::Solid),
+ textures: BatchTextures::no_texture(),
+ };
+
+ self.add_brush_instance_to_batches(
+ batch_key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::all(),
+ clip_task_address.unwrap(),
+ BrushFlags::PERSPECTIVE_INTERPOLATION,
+ prim_header_index,
+ 0,
+ prim_vis_mask,
+ );
+ }
+ PrimitiveInstanceKind::NormalBorder { data_handle, ref cache_handles, .. } => {
+ let prim_data = &ctx.data_stores.normal_border[data_handle];
+ let common_data = &prim_data.common;
+ let prim_cache_address = gpu_cache.get_address(&common_data.gpu_cache_handle);
+ let cache_handles = &ctx.scratch.border_cache_handles[*cache_handles];
+ let specified_blend_mode = BlendMode::PremultipliedAlpha;
+ let mut segment_data: SmallVec<[SegmentInstanceData; 8]> = SmallVec::new();
+
+ // Collect the segment instance data from each render
+ // task for each valid edge / corner of the border.
+
+ for handle in cache_handles {
+ let rt_cache_entry = ctx.resource_cache
+ .get_cached_render_task(handle);
+ let cache_item = ctx.resource_cache
+ .get_texture_cache_item(&rt_cache_entry.handle);
+ segment_data.push(
+ SegmentInstanceData {
+ textures: BatchTextures::color(cache_item.texture_id),
+ specific_resource_address: cache_item.uv_rect_handle.as_int(gpu_cache),
+ }
+ );
+ }
+
+ let non_segmented_blend_mode = if !common_data.opacity.is_opaque ||
+ prim_info.clip_task_index != ClipTaskIndex::INVALID ||
+ transform_kind == TransformedRectKind::Complex
+ {
+ specified_blend_mode
+ } else {
+ BlendMode::None
+ };
+
+ let prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: prim_cache_address,
+ transform_id,
+ };
+
+ let batch_params = BrushBatchParameters::instanced(
+ BrushBatchKind::Image(ImageBufferKind::Texture2DArray),
+ ImageBrushData {
+ color_mode: ShaderColorMode::Image,
+ alpha_type: AlphaType::PremultipliedAlpha,
+ raster_space: RasterizationSpace::Local,
+ opacity: 1.0,
+ }.encode(),
+ segment_data,
+ );
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ batch_params.prim_user_data,
+ );
+
+ let border_data = &prim_data.kind;
+ self.add_segmented_prim_to_batch(
+ Some(border_data.brush_segments.as_slice()),
+ common_data.opacity,
+ &batch_params,
+ specified_blend_mode,
+ non_segmented_blend_mode,
+ batch_features,
+ prim_header_index,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_info.clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ }
+ PrimitiveInstanceKind::TextRun { data_handle, run_index, .. } => {
+ let run = &ctx.prim_store.text_runs[run_index];
+ let subpx_dir = run.used_font.get_subpx_dir();
+
+ // The GPU cache data is stored in the template and reused across
+ // frames and display lists.
+ let prim_data = &ctx.data_stores.text_run[data_handle];
+ let prim_cache_address = gpu_cache.get_address(&prim_data.gpu_cache_handle);
+
+ // The local prim rect is only informative for text primitives, as
+ // thus is not directly necessary for any drawing of the text run.
+ // However the glyph offsets are relative to the prim rect origin
+ // less the unsnapped reference frame offset. We also want the
+ // the snapped reference frame offset, because cannot recalculate
+ // it as it ignores the animated components for the transform. As
+ // such, we adjust the prim rect origin here, and replace the size
+ // with the unsnapped and snapped offsets respectively. This has
+ // the added bonus of avoiding quantization effects when storing
+ // floats in the extra header integers.
+ let prim_header = PrimitiveHeader {
+ local_rect: LayoutRect::new(
+ prim_rect.origin - run.reference_frame_relative_offset,
+ run.snapped_reference_frame_relative_offset.to_size(),
+ ),
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: prim_cache_address,
+ transform_id,
+ };
+
+ let glyph_keys = &ctx.scratch.glyph_keys[run.glyph_keys_range];
+ let raster_scale = run.raster_space.local_scale().unwrap_or(1.0).max(0.001);
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ [
+ (raster_scale * 65535.0).round() as i32,
+ 0,
+ 0,
+ 0,
+ ],
+ );
+ let base_instance = GlyphInstance::new(
+ prim_header_index,
+ );
+ let batchers = &mut self.batchers;
+
+ ctx.resource_cache.fetch_glyphs(
+ run.used_font.clone(),
+ &glyph_keys,
+ &mut self.glyph_fetch_buffer,
+ gpu_cache,
+ |texture_id, mut glyph_format, glyphs| {
+ debug_assert_ne!(texture_id, TextureSource::Invalid);
+
+ // Ignore color and only sample alpha when shadowing.
+ if run.shadow {
+ glyph_format = glyph_format.ignore_color();
+ }
+
+ let subpx_dir = subpx_dir.limit_by(glyph_format);
+
+ let textures = BatchTextures {
+ colors: [
+ texture_id,
+ TextureSource::Invalid,
+ TextureSource::Invalid,
+ ],
+ };
+
+ let kind = BatchKind::TextRun(glyph_format);
+
+ let (blend_mode, color_mode) = match glyph_format {
+ GlyphFormat::Subpixel |
+ GlyphFormat::TransformedSubpixel => {
+ if run.used_font.bg_color.a != 0 {
+ (
+ BlendMode::SubpixelWithBgColor,
+ ShaderColorMode::FromRenderPassMode,
+ )
+ } else if ctx.use_dual_source_blending {
+ (
+ BlendMode::SubpixelDualSource,
+ ShaderColorMode::SubpixelDualSource,
+ )
+ } else {
+ (
+ BlendMode::SubpixelConstantTextColor(run.used_font.color.into()),
+ ShaderColorMode::SubpixelConstantTextColor,
+ )
+ }
+ }
+ GlyphFormat::Alpha |
+ GlyphFormat::TransformedAlpha => {
+ (
+ BlendMode::PremultipliedAlpha,
+ ShaderColorMode::Alpha,
+ )
+ }
+ GlyphFormat::Bitmap => {
+ (
+ BlendMode::PremultipliedAlpha,
+ ShaderColorMode::Bitmap,
+ )
+ }
+ GlyphFormat::ColorBitmap => {
+ (
+ BlendMode::PremultipliedAlpha,
+ ShaderColorMode::ColorBitmap,
+ )
+ }
+ };
+
+ let key = BatchKey::new(kind, blend_mode, textures);
+
+ for batcher in batchers.iter_mut() {
+ if batcher.vis_mask.intersects(prim_vis_mask) {
+ let render_task_address = batcher.render_task_address;
+ let batch = batcher.alpha_batch_list.set_params_and_get_batch(
+ key,
+ BatchFeatures::empty(),
+ bounding_rect,
+ z_id,
+ );
+
+ for glyph in glyphs {
+ batch.push(base_instance.build(
+ render_task_address,
+ clip_task_address.unwrap(),
+ subpx_dir,
+ glyph.index_in_text_run,
+ glyph.uv_rect_address,
+ color_mode,
+ ));
+ }
+ }
+ }
+ },
+ );
+ }
+ PrimitiveInstanceKind::LineDecoration { data_handle, ref cache_handle, .. } => {
+ // The GPU cache data is stored in the template and reused across
+ // frames and display lists.
+ let common_data = &ctx.data_stores.line_decoration[data_handle].common;
+ let prim_cache_address = gpu_cache.get_address(&common_data.gpu_cache_handle);
+
+ let (batch_kind, textures, prim_user_data, specific_resource_address) = match cache_handle {
+ Some(cache_handle) => {
+ let rt_cache_entry = ctx
+ .resource_cache
+ .get_cached_render_task(cache_handle);
+ let cache_item = ctx
+ .resource_cache
+ .get_texture_cache_item(&rt_cache_entry.handle);
+ let textures = BatchTextures::color(cache_item.texture_id);
+ (
+ BrushBatchKind::Image(get_buffer_kind(cache_item.texture_id)),
+ textures,
+ ImageBrushData {
+ color_mode: ShaderColorMode::Image,
+ alpha_type: AlphaType::PremultipliedAlpha,
+ raster_space: RasterizationSpace::Local,
+ opacity: 1.0,
+ }.encode(),
+ cache_item.uv_rect_handle.as_int(gpu_cache),
+ )
+ }
+ None => {
+ (
+ BrushBatchKind::Solid,
+ BatchTextures::no_texture(),
+ [get_shader_opacity(1.0), 0, 0, 0],
+ 0,
+ )
+ }
+ };
+
+ // TODO(gw): We can abstract some of the common code below into
+ // helper methods, as we port more primitives to make
+ // use of interning.
+ let blend_mode = if !common_data.opacity.is_opaque ||
+ prim_info.clip_task_index != ClipTaskIndex::INVALID ||
+ transform_kind == TransformedRectKind::Complex
+ {
+ BlendMode::PremultipliedAlpha
+ } else {
+ BlendMode::None
+ };
+
+ let prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: prim_cache_address,
+ transform_id,
+ };
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ prim_user_data,
+ );
+
+ let batch_key = BatchKey {
+ blend_mode,
+ kind: BatchKind::Brush(batch_kind),
+ textures,
+ };
+
+ self.add_brush_instance_to_batches(
+ batch_key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::all(),
+ clip_task_address.unwrap(),
+ BrushFlags::PERSPECTIVE_INTERPOLATION,
+ prim_header_index,
+ specific_resource_address,
+ prim_vis_mask,
+ );
+ }
+ PrimitiveInstanceKind::Picture { pic_index, segment_instance_index, .. } => {
+ let picture = &ctx.prim_store.pictures[pic_index.0];
+ let non_segmented_blend_mode = BlendMode::PremultipliedAlpha;
+ let prim_cache_address = gpu_cache.get_address(&ctx.globals.default_image_handle);
+
+ let prim_header = PrimitiveHeader {
+ local_rect: picture.precise_local_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: prim_cache_address,
+ transform_id,
+ };
+
+ match picture.context_3d {
+ // Convert all children of the 3D hierarchy root into batches.
+ Picture3DContext::In { root_data: Some(ref list), .. } => {
+ for child in list {
+ let cluster = &picture.prim_list.clusters[child.anchor.cluster_index];
+ let child_prim_instance = &cluster.prim_instances[child.anchor.instance_index];
+ let child_prim_info = &ctx.scratch.prim_info[child_prim_instance.visibility_info.0 as usize];
+
+ let child_pic_index = match child_prim_instance.kind {
+ PrimitiveInstanceKind::Picture { pic_index, .. } => pic_index,
+ _ => unreachable!(),
+ };
+ let pic = &ctx.prim_store.pictures[child_pic_index.0];
+
+ // Get clip task, if set, for the picture primitive.
+ let child_clip_task_address = ctx.get_prim_clip_task_address(
+ child_prim_info.clip_task_index,
+ render_tasks,
+ );
+
+ let prim_header = PrimitiveHeader {
+ local_rect: pic.precise_local_rect,
+ local_clip_rect: child_prim_info.combined_local_clip_rect,
+ specific_prim_address: GpuCacheAddress::INVALID,
+ transform_id: transforms
+ .get_id(
+ child.spatial_node_index,
+ root_spatial_node_index,
+ ctx.spatial_tree,
+ ),
+ };
+
+ let raster_config = pic
+ .raster_config
+ .as_ref()
+ .expect("BUG: 3d primitive was not assigned a surface");
+ let (uv_rect_address, _) = render_tasks.resolve_surface(
+ ctx.surfaces[raster_config.surface_index.0]
+ .render_tasks
+ .expect("BUG: no surface")
+ .root,
+ gpu_cache,
+ );
+
+ // Need a new z-id for each child preserve-3d context added
+ // by this inner loop.
+ let z_id = z_generator.next();
+
+ let prim_header_index = prim_headers.push(&prim_header, z_id, [
+ uv_rect_address.as_int(),
+ if raster_config.establishes_raster_root { 1 } else { 0 },
+ 0,
+ child_clip_task_address.unwrap().0 as i32,
+ ]);
+
+ let key = BatchKey::new(
+ BatchKind::SplitComposite,
+ BlendMode::PremultipliedAlpha,
+ BatchTextures::no_texture(),
+ );
+
+ self.add_split_composite_instance_to_batches(
+ key,
+ &child_prim_info.clip_chain.pic_clip_rect,
+ z_id,
+ prim_header_index,
+ child.gpu_address,
+ child_prim_info.visibility_mask,
+ );
+ }
+ }
+ // Ignore the 3D pictures that are not in the root of preserve-3D
+ // hierarchy, since we process them with the root.
+ Picture3DContext::In { root_data: None, .. } => return,
+ // Proceed for non-3D pictures.
+ Picture3DContext::Out => ()
+ }
+
+ match picture.raster_config {
+ Some(ref raster_config) => {
+ // If the child picture was rendered in local space, we can safely
+ // interpolate the UV coordinates with perspective correction.
+ let brush_flags = if raster_config.establishes_raster_root {
+ BrushFlags::PERSPECTIVE_INTERPOLATION
+ } else {
+ BrushFlags::empty()
+ };
+
+ let surface = &ctx.surfaces[raster_config.surface_index.0];
+ let surface_task = surface.render_tasks.map(|s| s.root);
+
+ match raster_config.composite_mode {
+ PictureCompositeMode::TileCache { .. } => {
+ // Tile cache instances are added to the composite config, rather than
+ // directly added to batches. This allows them to be drawn with various
+ // present modes during render, such as partial present etc.
+ let tile_cache = picture.tile_cache.as_ref().unwrap();
+ let map_local_to_world = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ tile_cache.spatial_node_index,
+ ctx.screen_world_rect,
+ ctx.spatial_tree,
+ );
+ // TODO(gw): As a follow up to the valid_rect work, see why we use
+ // prim_info.combined_local_clip_rect here instead of the
+ // local_clip_rect built in the TileCacheInstance. Perhaps
+ // these can be unified or are different for a good reason?
+ let world_clip_rect = map_local_to_world
+ .map(&prim_info.combined_local_clip_rect)
+ .expect("bug: unable to map clip rect");
+ let device_clip_rect = (world_clip_rect * ctx.global_device_pixel_scale).round();
+
+ composite_state.push_surface(
+ tile_cache,
+ device_clip_rect,
+ ctx.global_device_pixel_scale,
+ ctx.resource_cache,
+ gpu_cache,
+ deferred_resolves,
+ );
+ }
+ PictureCompositeMode::Filter(ref filter) => {
+ assert!(filter.is_visible());
+ match filter {
+ Filter::Blur(..) => {
+ let kind = BatchKind::Brush(
+ BrushBatchKind::Image(ImageBufferKind::Texture2DArray)
+ );
+ let (uv_rect_address, textures) = render_tasks.resolve_surface(
+ surface_task.expect("bug: surface must be allocated by now"),
+ gpu_cache,
+ );
+ let key = BatchKey::new(
+ kind,
+ non_segmented_blend_mode,
+ textures,
+ );
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ ImageBrushData {
+ color_mode: ShaderColorMode::Image,
+ alpha_type: AlphaType::PremultipliedAlpha,
+ raster_space: RasterizationSpace::Screen,
+ opacity: 1.0,
+ }.encode(),
+ );
+
+ self.add_brush_instance_to_batches(
+ key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::empty(),
+ clip_task_address.unwrap(),
+ brush_flags,
+ prim_header_index,
+ uv_rect_address.as_int(),
+ prim_vis_mask,
+ );
+ }
+ Filter::DropShadows(shadows) => {
+ // Draw an instance per shadow first, following by the content.
+
+ // The shadows and the content get drawn as a brush image.
+ let kind = BatchKind::Brush(
+ BrushBatchKind::Image(ImageBufferKind::Texture2DArray),
+ );
+
+ // Gets the saved render task ID of the content, which is
+ // deeper in the render task graph than the direct child.
+ let secondary_id = picture.secondary_render_task_id.expect("no secondary!?");
+ let content_source = {
+ let secondary_task = &render_tasks[secondary_id];
+ let saved_index = secondary_task.saved_index.expect("no saved index!?");
+ debug_assert_ne!(saved_index, SavedTargetIndex::PENDING);
+ TextureSource::RenderTaskCache(saved_index, Swizzle::default())
+ };
+
+ // Build BatchTextures for shadow/content
+ let shadow_textures = BatchTextures::render_target_cache();
+ let content_textures = BatchTextures {
+ colors: [
+ content_source,
+ TextureSource::Invalid,
+ TextureSource::Invalid,
+ ],
+ };
+
+ // Build batch keys for shadow/content
+ let shadow_key = BatchKey::new(kind, non_segmented_blend_mode, shadow_textures);
+ let content_key = BatchKey::new(kind, non_segmented_blend_mode, content_textures);
+
+ // Retrieve the UV rect addresses for shadow/content.
+ let cache_task_id = surface_task
+ .expect("bug: surface must be allocated by now");
+ let shadow_uv_rect_address = render_tasks[cache_task_id]
+ .get_texture_address(gpu_cache)
+ .as_int();
+ let content_uv_rect_address = render_tasks[secondary_id]
+ .get_texture_address(gpu_cache)
+ .as_int();
+
+ for (shadow, shadow_gpu_data) in shadows.iter().zip(picture.extra_gpu_data_handles.iter()) {
+ // Get the GPU cache address of the extra data handle.
+ let shadow_prim_address = gpu_cache.get_address(shadow_gpu_data);
+
+ let shadow_rect = prim_header.local_rect.translate(shadow.offset);
+
+ let shadow_prim_header = PrimitiveHeader {
+ local_rect: shadow_rect,
+ specific_prim_address: shadow_prim_address,
+ ..prim_header
+ };
+
+ let shadow_prim_header_index = prim_headers.push(
+ &shadow_prim_header,
+ z_id,
+ ImageBrushData {
+ color_mode: ShaderColorMode::Alpha,
+ alpha_type: AlphaType::PremultipliedAlpha,
+ raster_space: RasterizationSpace::Screen,
+ opacity: 1.0,
+ }.encode(),
+ );
+
+ self.add_brush_instance_to_batches(
+ shadow_key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::empty(),
+ clip_task_address.unwrap(),
+ brush_flags,
+ shadow_prim_header_index,
+ shadow_uv_rect_address,
+ prim_vis_mask,
+ );
+ }
+ let z_id_content = z_generator.next();
+
+ let content_prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id_content,
+ ImageBrushData {
+ color_mode: ShaderColorMode::Image,
+ alpha_type: AlphaType::PremultipliedAlpha,
+ raster_space: RasterizationSpace::Screen,
+ opacity: 1.0,
+ }.encode(),
+ );
+
+ self.add_brush_instance_to_batches(
+ content_key,
+ batch_features,
+ bounding_rect,
+ z_id_content,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::empty(),
+ clip_task_address.unwrap(),
+ brush_flags,
+ content_prim_header_index,
+ content_uv_rect_address,
+ prim_vis_mask,
+ );
+ }
+ Filter::Opacity(_, amount) => {
+ let amount = (amount * 65536.0) as i32;
+
+ let (uv_rect_address, textures) = render_tasks.resolve_surface(
+ surface_task.expect("bug: surface must be allocated by now"),
+ gpu_cache,
+ );
+
+ let key = BatchKey::new(
+ BatchKind::Brush(BrushBatchKind::Opacity),
+ BlendMode::PremultipliedAlpha,
+ textures,
+ );
+
+ let prim_header_index = prim_headers.push(&prim_header, z_id, [
+ uv_rect_address.as_int(),
+ amount,
+ 0,
+ 0,
+ ]);
+
+ self.add_brush_instance_to_batches(
+ key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::empty(),
+ clip_task_address.unwrap(),
+ brush_flags,
+ prim_header_index,
+ 0,
+ prim_vis_mask,
+ );
+ }
+ _ => {
+ // Must be kept in sync with brush_blend.glsl
+ let filter_mode = filter.as_int();
+
+ let user_data = match filter {
+ Filter::Identity => 0x10000i32, // matches `Contrast(1)`
+ Filter::Contrast(amount) |
+ Filter::Grayscale(amount) |
+ Filter::Invert(amount) |
+ Filter::Saturate(amount) |
+ Filter::Sepia(amount) |
+ Filter::Brightness(amount) => {
+ (amount * 65536.0) as i32
+ }
+ Filter::SrgbToLinear | Filter::LinearToSrgb => 0,
+ Filter::HueRotate(angle) => {
+ (0.01745329251 * angle * 65536.0) as i32
+ }
+ Filter::ColorMatrix(_) => {
+ picture.extra_gpu_data_handles[0].as_int(gpu_cache)
+ }
+ Filter::Flood(_) => {
+ picture.extra_gpu_data_handles[0].as_int(gpu_cache)
+ }
+
+ // These filters are handled via different paths.
+ Filter::ComponentTransfer |
+ Filter::Blur(..) |
+ Filter::DropShadows(..) |
+ Filter::Opacity(..) => unreachable!(),
+ };
+
+ let (uv_rect_address, textures) = render_tasks.resolve_surface(
+ surface_task.expect("bug: surface must be allocated by now"),
+ gpu_cache,
+ );
+
+ let key = BatchKey::new(
+ BatchKind::Brush(BrushBatchKind::Blend),
+ BlendMode::PremultipliedAlpha,
+ textures,
+ );
+
+ let prim_header_index = prim_headers.push(&prim_header, z_id, [
+ uv_rect_address.as_int(),
+ filter_mode,
+ user_data,
+ 0,
+ ]);
+
+ self.add_brush_instance_to_batches(
+ key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::empty(),
+ clip_task_address.unwrap(),
+ brush_flags,
+ prim_header_index,
+ 0,
+ prim_vis_mask,
+ );
+ }
+ }
+ }
+ PictureCompositeMode::ComponentTransferFilter(handle) => {
+ // This is basically the same as the general filter case above
+ // except we store a little more data in the filter mode and
+ // a gpu cache handle in the user data.
+ let filter_data = &ctx.data_stores.filter_data[handle];
+ let filter_mode : i32 = Filter::ComponentTransfer.as_int() |
+ ((filter_data.data.r_func.to_int() << 28 |
+ filter_data.data.g_func.to_int() << 24 |
+ filter_data.data.b_func.to_int() << 20 |
+ filter_data.data.a_func.to_int() << 16) as i32);
+
+ let user_data = filter_data.gpu_cache_handle.as_int(gpu_cache);
+
+ let (uv_rect_address, textures) = render_tasks.resolve_surface(
+ surface_task.expect("bug: surface must be allocated by now"),
+ gpu_cache,
+ );
+
+ let key = BatchKey::new(
+ BatchKind::Brush(BrushBatchKind::Blend),
+ BlendMode::PremultipliedAlpha,
+ textures,
+ );
+
+ let prim_header_index = prim_headers.push(&prim_header, z_id, [
+ uv_rect_address.as_int(),
+ filter_mode,
+ user_data,
+ 0,
+ ]);
+
+ self.add_brush_instance_to_batches(
+ key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::empty(),
+ clip_task_address.unwrap(),
+ brush_flags,
+ prim_header_index,
+ 0,
+ prim_vis_mask,
+ );
+ }
+ PictureCompositeMode::MixBlend(mode) if ctx.use_advanced_blending => {
+ let (uv_rect_address, textures) = render_tasks.resolve_surface(
+ surface_task.expect("bug: surface must be allocated by now"),
+ gpu_cache,
+ );
+ let key = BatchKey::new(
+ BatchKind::Brush(
+ BrushBatchKind::Image(ImageBufferKind::Texture2DArray),
+ ),
+ BlendMode::Advanced(mode),
+ textures,
+ );
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ ImageBrushData {
+ color_mode: ShaderColorMode::Image,
+ alpha_type: AlphaType::PremultipliedAlpha,
+ raster_space: RasterizationSpace::Local,
+ opacity: 1.0,
+ }.encode(),
+ );
+
+ self.add_brush_instance_to_batches(
+ key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::empty(),
+ clip_task_address.unwrap(),
+ brush_flags,
+ prim_header_index,
+ uv_rect_address.as_int(),
+ prim_vis_mask,
+ );
+ }
+ PictureCompositeMode::MixBlend(mode) => {
+ let cache_task_id = surface_task.expect("bug: surface must be allocated by now");
+ let backdrop_id = picture.secondary_render_task_id.expect("no backdrop!?");
+
+ // TODO(gw): For now, mix-blend is not supported as a picture
+ // caching root, so we can safely assume there is
+ // only a single batcher present.
+ assert_eq!(self.batchers.len(), 1);
+
+ let key = BatchKey::new(
+ BatchKind::Brush(
+ BrushBatchKind::MixBlend {
+ task_id: self.batchers[0].render_task_id,
+ source_id: cache_task_id,
+ backdrop_id,
+ },
+ ),
+ BlendMode::PremultipliedAlpha,
+ BatchTextures::no_texture(),
+ );
+ let backdrop_task_address = render_tasks.get_task_address(backdrop_id);
+ let source_task_address = render_tasks.get_task_address(cache_task_id);
+ let prim_header_index = prim_headers.push(&prim_header, z_id, [
+ mode as u32 as i32,
+ backdrop_task_address.0 as i32,
+ source_task_address.0 as i32,
+ 0,
+ ]);
+
+ self.add_brush_instance_to_batches(
+ key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::empty(),
+ clip_task_address.unwrap(),
+ brush_flags,
+ prim_header_index,
+ 0,
+ prim_vis_mask,
+ );
+ }
+ PictureCompositeMode::Blit(_) => {
+ let cache_task_id = surface_task.expect("bug: surface must be allocated by now");
+ let uv_rect_address = render_tasks[cache_task_id]
+ .get_texture_address(gpu_cache)
+ .as_int();
+ let textures = match render_tasks[cache_task_id].saved_index {
+ Some(saved_index) => BatchTextures {
+ colors: [
+ TextureSource::RenderTaskCache(saved_index, Swizzle::default()),
+ TextureSource::PrevPassAlpha,
+ TextureSource::Invalid,
+ ]
+ },
+ None => BatchTextures::render_target_cache(),
+ };
+ let batch_params = BrushBatchParameters::shared(
+ BrushBatchKind::Image(ImageBufferKind::Texture2DArray),
+ textures,
+ ImageBrushData {
+ color_mode: ShaderColorMode::Image,
+ alpha_type: AlphaType::PremultipliedAlpha,
+ raster_space: RasterizationSpace::Screen,
+ opacity: 1.0,
+ }.encode(),
+ uv_rect_address,
+ );
+
+ let is_segmented =
+ segment_instance_index != SegmentInstanceIndex::INVALID &&
+ segment_instance_index != SegmentInstanceIndex::UNUSED;
+
+ let (prim_cache_address, segments) = if is_segmented {
+ let segment_instance = &ctx.scratch.segment_instances[segment_instance_index];
+ let segments = Some(&ctx.scratch.segments[segment_instance.segments_range]);
+ (gpu_cache.get_address(&segment_instance.gpu_cache_handle), segments)
+ } else {
+ (prim_cache_address, None)
+ };
+
+ let prim_header = PrimitiveHeader {
+ local_rect: picture.precise_local_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: prim_cache_address,
+ transform_id,
+ };
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ batch_params.prim_user_data,
+ );
+
+ // TODO(gw): As before, all pictures that get blitted are assumed
+ // to have alpha. However, we could determine (at least for
+ // simple, common cases) if the picture content is opaque.
+ // That would allow inner segments of pictures to be drawn
+ // with blend disabled, which is a big performance win on
+ // integrated GPUs.
+ let opacity = PrimitiveOpacity::translucent();
+ let specified_blend_mode = BlendMode::PremultipliedAlpha;
+
+ self.add_segmented_prim_to_batch(
+ segments,
+ opacity,
+ &batch_params,
+ specified_blend_mode,
+ non_segmented_blend_mode,
+ batch_features,
+ prim_header_index,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_info.clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ }
+ PictureCompositeMode::SvgFilter(..) => {
+ let kind = BatchKind::Brush(
+ BrushBatchKind::Image(ImageBufferKind::Texture2DArray)
+ );
+ let (uv_rect_address, textures) = render_tasks.resolve_surface(
+ surface_task.expect("bug: surface must be allocated by now"),
+ gpu_cache,
+ );
+ let key = BatchKey::new(
+ kind,
+ non_segmented_blend_mode,
+ textures,
+ );
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ ImageBrushData {
+ color_mode: ShaderColorMode::Image,
+ alpha_type: AlphaType::PremultipliedAlpha,
+ raster_space: RasterizationSpace::Screen,
+ opacity: 1.0,
+ }.encode(),
+ );
+
+ self.add_brush_instance_to_batches(
+ key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::empty(),
+ clip_task_address.unwrap(),
+ brush_flags,
+ prim_header_index,
+ uv_rect_address.as_int(),
+ prim_vis_mask,
+ );
+ }
+ }
+ }
+ None => {
+ // If this picture is being drawn into an existing target (i.e. with
+ // no composition operation), recurse and add to the current batch list.
+ self.add_pic_to_batch(
+ picture,
+ ctx,
+ gpu_cache,
+ render_tasks,
+ deferred_resolves,
+ prim_headers,
+ transforms,
+ root_spatial_node_index,
+ surface_spatial_node_index,
+ z_generator,
+ composite_state,
+ );
+ }
+ }
+ }
+ PrimitiveInstanceKind::ImageBorder { data_handle, .. } => {
+ let prim_data = &ctx.data_stores.image_border[data_handle];
+ let common_data = &prim_data.common;
+ let border_data = &prim_data.kind;
+
+ let cache_item = resolve_image(
+ border_data.request,
+ ctx.resource_cache,
+ gpu_cache,
+ deferred_resolves,
+ );
+ if cache_item.texture_id == TextureSource::Invalid {
+ return;
+ }
+
+ let textures = BatchTextures::color(cache_item.texture_id);
+ let prim_cache_address = gpu_cache.get_address(&common_data.gpu_cache_handle);
+ let specified_blend_mode = BlendMode::PremultipliedAlpha;
+ let non_segmented_blend_mode = if !common_data.opacity.is_opaque ||
+ prim_info.clip_task_index != ClipTaskIndex::INVALID ||
+ transform_kind == TransformedRectKind::Complex
+ {
+ specified_blend_mode
+ } else {
+ BlendMode::None
+ };
+
+ let prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: prim_cache_address,
+ transform_id,
+ };
+
+ let batch_params = BrushBatchParameters::shared(
+ BrushBatchKind::Image(get_buffer_kind(cache_item.texture_id)),
+ textures,
+ ImageBrushData {
+ color_mode: ShaderColorMode::Image,
+ alpha_type: AlphaType::PremultipliedAlpha,
+ raster_space: RasterizationSpace::Local,
+ opacity: 1.0,
+ }.encode(),
+ cache_item.uv_rect_handle.as_int(gpu_cache),
+ );
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ batch_params.prim_user_data,
+ );
+
+ self.add_segmented_prim_to_batch(
+ Some(border_data.brush_segments.as_slice()),
+ common_data.opacity,
+ &batch_params,
+ specified_blend_mode,
+ non_segmented_blend_mode,
+ batch_features,
+ prim_header_index,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_info.clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ }
+ PrimitiveInstanceKind::Rectangle { data_handle, segment_instance_index, opacity_binding_index, .. } => {
+ let prim_data = &ctx.data_stores.prim[data_handle];
+ let specified_blend_mode = BlendMode::PremultipliedAlpha;
+ let opacity_binding = ctx.prim_store.get_opacity_binding(opacity_binding_index);
+
+ let opacity = PrimitiveOpacity::from_alpha(opacity_binding);
+ let opacity = opacity.combine(prim_data.opacity);
+
+ let non_segmented_blend_mode = if !opacity.is_opaque ||
+ prim_info.clip_task_index != ClipTaskIndex::INVALID ||
+ transform_kind == TransformedRectKind::Complex
+ {
+ specified_blend_mode
+ } else {
+ BlendMode::None
+ };
+
+ let batch_params = BrushBatchParameters::shared(
+ BrushBatchKind::Solid,
+ BatchTextures::no_texture(),
+ [get_shader_opacity(opacity_binding), 0, 0, 0],
+ 0,
+ );
+
+ let (prim_cache_address, segments) = if segment_instance_index == SegmentInstanceIndex::UNUSED {
+ (gpu_cache.get_address(&prim_data.gpu_cache_handle), None)
+ } else {
+ let segment_instance = &ctx.scratch.segment_instances[segment_instance_index];
+ let segments = Some(&ctx.scratch.segments[segment_instance.segments_range]);
+ (gpu_cache.get_address(&segment_instance.gpu_cache_handle), segments)
+ };
+
+ let prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: prim_cache_address,
+ transform_id,
+ };
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ batch_params.prim_user_data,
+ );
+
+ self.add_segmented_prim_to_batch(
+ segments,
+ opacity,
+ &batch_params,
+ specified_blend_mode,
+ non_segmented_blend_mode,
+ batch_features,
+ prim_header_index,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_info.clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ }
+ PrimitiveInstanceKind::YuvImage { data_handle, segment_instance_index, is_compositor_surface, .. } => {
+ if is_compositor_surface {
+ self.emit_placeholder(prim_rect,
+ prim_info,
+ z_id,
+ transform_id,
+ batch_features,
+ ctx,
+ gpu_cache,
+ render_tasks,
+ prim_headers);
+ return;
+ }
+
+ let yuv_image_data = &ctx.data_stores.yuv_image[data_handle].kind;
+ let mut textures = BatchTextures::no_texture();
+ let mut uv_rect_addresses = [0; 3];
+
+ //yuv channel
+ let channel_count = yuv_image_data.format.get_plane_num();
+ debug_assert!(channel_count <= 3);
+ for channel in 0 .. channel_count {
+ let image_key = yuv_image_data.yuv_key[channel];
+
+ let cache_item = resolve_image(
+ ImageRequest {
+ key: image_key,
+ rendering: yuv_image_data.image_rendering,
+ tile: None,
+ },
+ ctx.resource_cache,
+ gpu_cache,
+ deferred_resolves,
+ );
+
+ if cache_item.texture_id == TextureSource::Invalid {
+ warn!("Warnings: skip a PrimitiveKind::YuvImage");
+ return;
+ }
+
+ textures.colors[channel] = cache_item.texture_id;
+ uv_rect_addresses[channel] = cache_item.uv_rect_handle.as_int(gpu_cache);
+ }
+
+ // All yuv textures should be the same type.
+ let buffer_kind = get_buffer_kind(textures.colors[0]);
+ assert!(
+ textures.colors[1 .. yuv_image_data.format.get_plane_num()]
+ .iter()
+ .all(|&tid| buffer_kind == get_buffer_kind(tid))
+ );
+
+ let kind = BrushBatchKind::YuvImage(
+ buffer_kind,
+ yuv_image_data.format,
+ yuv_image_data.color_depth,
+ yuv_image_data.color_space,
+ yuv_image_data.color_range,
+ );
+
+ let batch_params = BrushBatchParameters::shared(
+ kind,
+ textures,
+ [
+ uv_rect_addresses[0],
+ uv_rect_addresses[1],
+ uv_rect_addresses[2],
+ 0,
+ ],
+ 0,
+ );
+
+ let specified_blend_mode = BlendMode::PremultipliedAlpha;
+ let prim_common_data = &ctx.data_stores.as_common_data(&prim_instance);
+
+ let non_segmented_blend_mode = if !prim_common_data.opacity.is_opaque ||
+ prim_info.clip_task_index != ClipTaskIndex::INVALID ||
+ transform_kind == TransformedRectKind::Complex
+ {
+ specified_blend_mode
+ } else {
+ BlendMode::None
+ };
+
+ debug_assert_ne!(segment_instance_index, SegmentInstanceIndex::INVALID);
+ let (prim_cache_address, segments) = if segment_instance_index == SegmentInstanceIndex::UNUSED {
+ (gpu_cache.get_address(&prim_common_data.gpu_cache_handle), None)
+ } else {
+ let segment_instance = &ctx.scratch.segment_instances[segment_instance_index];
+ let segments = Some(&ctx.scratch.segments[segment_instance.segments_range]);
+ (gpu_cache.get_address(&segment_instance.gpu_cache_handle), segments)
+ };
+
+ let prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: prim_cache_address,
+ transform_id,
+ };
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ batch_params.prim_user_data,
+ );
+
+ self.add_segmented_prim_to_batch(
+ segments,
+ prim_common_data.opacity,
+ &batch_params,
+ specified_blend_mode,
+ non_segmented_blend_mode,
+ batch_features,
+ prim_header_index,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_info.clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ }
+ PrimitiveInstanceKind::Image { data_handle, image_instance_index, is_compositor_surface, .. } => {
+ if is_compositor_surface {
+ self.emit_placeholder(prim_rect,
+ prim_info,
+ z_id,
+ transform_id,
+ batch_features,
+ ctx,
+ gpu_cache,
+ render_tasks,
+ prim_headers);
+ return;
+ }
+ let image_data = &ctx.data_stores.image[data_handle].kind;
+ let common_data = &ctx.data_stores.image[data_handle].common;
+ let image_instance = &ctx.prim_store.images[image_instance_index];
+ let opacity_binding = ctx.prim_store.get_opacity_binding(image_instance.opacity_binding_index);
+ let specified_blend_mode = match image_data.alpha_type {
+ AlphaType::PremultipliedAlpha => BlendMode::PremultipliedAlpha,
+ AlphaType::Alpha => BlendMode::Alpha,
+ };
+ let request = ImageRequest {
+ key: image_data.key,
+ rendering: image_data.image_rendering,
+ tile: None,
+ };
+ let prim_user_data = ImageBrushData {
+ color_mode: ShaderColorMode::Image,
+ alpha_type: image_data.alpha_type,
+ raster_space: RasterizationSpace::Local,
+ opacity: opacity_binding,
+ }.encode();
+
+ if image_instance.visible_tiles.is_empty() {
+ let cache_item = match image_data.source {
+ ImageSource::Default => {
+ resolve_image(
+ request,
+ ctx.resource_cache,
+ gpu_cache,
+ deferred_resolves,
+ )
+ }
+ ImageSource::Cache { ref handle, .. } => {
+ let rt_handle = handle
+ .as_ref()
+ .expect("bug: render task handle not allocated");
+ let rt_cache_entry = ctx.resource_cache
+ .get_cached_render_task(rt_handle);
+ ctx.resource_cache.get_texture_cache_item(&rt_cache_entry.handle)
+ }
+ };
+
+ if cache_item.texture_id == TextureSource::Invalid {
+ return;
+ }
+
+ let textures = BatchTextures::color(cache_item.texture_id);
+
+ let opacity = PrimitiveOpacity::from_alpha(opacity_binding);
+ let opacity = opacity.combine(common_data.opacity);
+
+ let non_segmented_blend_mode = if !opacity.is_opaque ||
+ prim_info.clip_task_index != ClipTaskIndex::INVALID ||
+ transform_kind == TransformedRectKind::Complex
+ {
+ specified_blend_mode
+ } else {
+ BlendMode::None
+ };
+
+ let batch_params = BrushBatchParameters::shared(
+ BrushBatchKind::Image(get_buffer_kind(cache_item.texture_id)),
+ textures,
+ prim_user_data,
+ cache_item.uv_rect_handle.as_int(gpu_cache),
+ );
+
+ debug_assert_ne!(image_instance.segment_instance_index, SegmentInstanceIndex::INVALID);
+ let (prim_cache_address, segments) = if image_instance.segment_instance_index == SegmentInstanceIndex::UNUSED {
+ (gpu_cache.get_address(&common_data.gpu_cache_handle), None)
+ } else {
+ let segment_instance = &ctx.scratch.segment_instances[image_instance.segment_instance_index];
+ let segments = Some(&ctx.scratch.segments[segment_instance.segments_range]);
+ (gpu_cache.get_address(&segment_instance.gpu_cache_handle), segments)
+ };
+
+ let prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: prim_cache_address,
+ transform_id,
+ };
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ batch_params.prim_user_data,
+ );
+
+ self.add_segmented_prim_to_batch(
+ segments,
+ opacity,
+ &batch_params,
+ specified_blend_mode,
+ non_segmented_blend_mode,
+ batch_features,
+ prim_header_index,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_info.clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ } else {
+ const VECS_PER_SPECIFIC_BRUSH: usize = 3;
+ let max_tiles_per_header = (MAX_VERTEX_TEXTURE_WIDTH - VECS_PER_SPECIFIC_BRUSH) / VECS_PER_SEGMENT;
+
+ // use temporary block storage since we don't know the number of visible tiles beforehand
+ let mut gpu_blocks = Vec::<GpuBlockData>::new();
+ for chunk in image_instance.visible_tiles.chunks(max_tiles_per_header) {
+ gpu_blocks.clear();
+ gpu_blocks.push(PremultipliedColorF::WHITE.into()); //color
+ gpu_blocks.push(PremultipliedColorF::WHITE.into()); //bg color
+ gpu_blocks.push([-1.0, 0.0, 0.0, 0.0].into()); //stretch size
+ // negative first value makes the shader code ignore it and use the local size instead
+ for tile in chunk {
+ let tile_rect = tile.local_rect.translate(-prim_rect.origin.to_vector());
+ gpu_blocks.push(tile_rect.into());
+ gpu_blocks.push(GpuBlockData::EMPTY);
+ }
+
+ let gpu_handle = gpu_cache.push_per_frame_blocks(&gpu_blocks);
+ let prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: image_instance.tight_local_clip_rect,
+ specific_prim_address: gpu_cache.get_address(&gpu_handle),
+ transform_id,
+ };
+ let prim_header_index = prim_headers.push(&prim_header, z_id, prim_user_data);
+
+ for (i, tile) in chunk.iter().enumerate() {
+ if let Some((batch_kind, textures, uv_rect_address)) = get_image_tile_params(
+ ctx.resource_cache,
+ gpu_cache,
+ deferred_resolves,
+ request.with_tile(tile.tile_offset),
+ ) {
+ let batch_key = BatchKey {
+ blend_mode: specified_blend_mode,
+ kind: BatchKind::Brush(batch_kind),
+ textures,
+ };
+ self.add_brush_instance_to_batches(
+ batch_key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ i as i32,
+ tile.edge_flags,
+ clip_task_address.unwrap(),
+ BrushFlags::SEGMENT_RELATIVE | BrushFlags::PERSPECTIVE_INTERPOLATION,
+ prim_header_index,
+ uv_rect_address.as_int(),
+ prim_vis_mask,
+ );
+ }
+ }
+ }
+ }
+ }
+ PrimitiveInstanceKind::LinearGradient { data_handle, gradient_index, .. } => {
+ let gradient = &ctx.prim_store.linear_gradients[gradient_index];
+ let prim_data = &ctx.data_stores.linear_grad[data_handle];
+ let specified_blend_mode = BlendMode::PremultipliedAlpha;
+
+ let mut prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: GpuCacheAddress::INVALID,
+ transform_id,
+ };
+
+ let non_segmented_blend_mode = if !prim_data.opacity.is_opaque ||
+ prim_info.clip_task_index != ClipTaskIndex::INVALID ||
+ transform_kind == TransformedRectKind::Complex
+ {
+ specified_blend_mode
+ } else {
+ BlendMode::None
+ };
+
+ if !gradient.cache_segments.is_empty() {
+
+ for segment in &gradient.cache_segments {
+ let ref cache_handle = segment.handle;
+ let rt_cache_entry = ctx.resource_cache
+ .get_cached_render_task(cache_handle);
+ let cache_item = ctx.resource_cache
+ .get_texture_cache_item(&rt_cache_entry.handle);
+
+ if cache_item.texture_id == TextureSource::Invalid {
+ return;
+ }
+
+ let textures = BatchTextures::color(cache_item.texture_id);
+ let batch_kind = BrushBatchKind::Image(get_buffer_kind(cache_item.texture_id));
+ let prim_user_data = ImageBrushData {
+ color_mode: ShaderColorMode::Image,
+ alpha_type: AlphaType::PremultipliedAlpha,
+ raster_space: RasterizationSpace::Local,
+ opacity: 1.0,
+ }.encode();
+
+ let specific_resource_address = cache_item.uv_rect_handle.as_int(gpu_cache);
+ prim_header.specific_prim_address = gpu_cache.get_address(&ctx.globals.default_image_handle);
+
+ let segment_local_clip_rect = match prim_header.local_clip_rect.intersection(&segment.local_rect) {
+ Some(rect) => rect,
+ None => { continue; }
+ };
+
+ let segment_prim_header = PrimitiveHeader {
+ local_rect: segment.local_rect,
+ local_clip_rect: segment_local_clip_rect,
+ specific_prim_address: prim_header.specific_prim_address,
+ transform_id: prim_header.transform_id,
+ };
+
+ let prim_header_index = prim_headers.push(
+ &segment_prim_header,
+ z_id,
+ prim_user_data,
+ );
+
+ let batch_key = BatchKey {
+ blend_mode: non_segmented_blend_mode,
+ kind: BatchKind::Brush(batch_kind),
+ textures,
+ };
+
+ self.add_brush_instance_to_batches(
+ batch_key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::all(),
+ clip_task_address.unwrap(),
+ BrushFlags::PERSPECTIVE_INTERPOLATION,
+ prim_header_index,
+ specific_resource_address,
+ prim_vis_mask,
+ );
+ }
+ } else if gradient.visible_tiles_range.is_empty() {
+ let batch_params = BrushBatchParameters::shared(
+ BrushBatchKind::LinearGradient,
+ BatchTextures::no_texture(),
+ [
+ prim_data.stops_handle.as_int(gpu_cache),
+ 0,
+ 0,
+ 0,
+ ],
+ 0,
+ );
+
+ prim_header.specific_prim_address = gpu_cache.get_address(&prim_data.gpu_cache_handle);
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ batch_params.prim_user_data,
+ );
+
+ let segments = if prim_data.brush_segments.is_empty() {
+ None
+ } else {
+ Some(prim_data.brush_segments.as_slice())
+ };
+
+ self.add_segmented_prim_to_batch(
+ segments,
+ prim_data.opacity,
+ &batch_params,
+ specified_blend_mode,
+ non_segmented_blend_mode,
+ batch_features,
+ prim_header_index,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_info.clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ } else {
+ let visible_tiles = &ctx.scratch.gradient_tiles[gradient.visible_tiles_range];
+
+ self.add_gradient_tiles(
+ visible_tiles,
+ &prim_data.stops_handle,
+ BrushBatchKind::LinearGradient,
+ specified_blend_mode,
+ bounding_rect,
+ clip_task_address.unwrap(),
+ gpu_cache,
+ &prim_header,
+ prim_headers,
+ z_id,
+ prim_vis_mask,
+ );
+ }
+ }
+ PrimitiveInstanceKind::RadialGradient { data_handle, ref visible_tiles_range, .. } => {
+ let prim_data = &ctx.data_stores.radial_grad[data_handle];
+ let specified_blend_mode = BlendMode::PremultipliedAlpha;
+
+ let mut prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: GpuCacheAddress::INVALID,
+ transform_id,
+ };
+
+ if visible_tiles_range.is_empty() {
+ let non_segmented_blend_mode = if !prim_data.opacity.is_opaque ||
+ prim_info.clip_task_index != ClipTaskIndex::INVALID ||
+ transform_kind == TransformedRectKind::Complex
+ {
+ specified_blend_mode
+ } else {
+ BlendMode::None
+ };
+
+ let batch_params = BrushBatchParameters::shared(
+ BrushBatchKind::RadialGradient,
+ BatchTextures::no_texture(),
+ [
+ prim_data.stops_handle.as_int(gpu_cache),
+ 0,
+ 0,
+ 0,
+ ],
+ 0,
+ );
+
+ prim_header.specific_prim_address = gpu_cache.get_address(&prim_data.gpu_cache_handle);
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ batch_params.prim_user_data,
+ );
+
+ let segments = if prim_data.brush_segments.is_empty() {
+ None
+ } else {
+ Some(prim_data.brush_segments.as_slice())
+ };
+
+ self.add_segmented_prim_to_batch(
+ segments,
+ prim_data.opacity,
+ &batch_params,
+ specified_blend_mode,
+ non_segmented_blend_mode,
+ batch_features,
+ prim_header_index,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_info.clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ } else {
+ let visible_tiles = &ctx.scratch.gradient_tiles[*visible_tiles_range];
+
+ self.add_gradient_tiles(
+ visible_tiles,
+ &prim_data.stops_handle,
+ BrushBatchKind::RadialGradient,
+ specified_blend_mode,
+ bounding_rect,
+ clip_task_address.unwrap(),
+ gpu_cache,
+ &prim_header,
+ prim_headers,
+ z_id,
+ prim_vis_mask,
+ );
+ }
+ }
+ PrimitiveInstanceKind::ConicGradient { data_handle, ref visible_tiles_range, .. } => {
+ let prim_data = &ctx.data_stores.conic_grad[data_handle];
+ let specified_blend_mode = BlendMode::PremultipliedAlpha;
+
+ let mut prim_header = PrimitiveHeader {
+ local_rect: prim_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ specific_prim_address: GpuCacheAddress::INVALID,
+ transform_id,
+ };
+
+ if visible_tiles_range.is_empty() {
+ let non_segmented_blend_mode = if !prim_data.opacity.is_opaque ||
+ prim_info.clip_task_index != ClipTaskIndex::INVALID ||
+ transform_kind == TransformedRectKind::Complex
+ {
+ specified_blend_mode
+ } else {
+ BlendMode::None
+ };
+
+ let batch_params = BrushBatchParameters::shared(
+ BrushBatchKind::ConicGradient,
+ BatchTextures::no_texture(),
+ [
+ prim_data.stops_handle.as_int(gpu_cache),
+ 0,
+ 0,
+ 0,
+ ],
+ 0,
+ );
+
+ prim_header.specific_prim_address = gpu_cache.get_address(&prim_data.gpu_cache_handle);
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ batch_params.prim_user_data,
+ );
+
+ let segments = if prim_data.brush_segments.is_empty() {
+ None
+ } else {
+ Some(prim_data.brush_segments.as_slice())
+ };
+
+ self.add_segmented_prim_to_batch(
+ segments,
+ prim_data.opacity,
+ &batch_params,
+ specified_blend_mode,
+ non_segmented_blend_mode,
+ batch_features,
+ prim_header_index,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_info.clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ } else {
+ let visible_tiles = &ctx.scratch.gradient_tiles[*visible_tiles_range];
+
+ self.add_gradient_tiles(
+ visible_tiles,
+ &prim_data.stops_handle,
+ BrushBatchKind::ConicGradient,
+ specified_blend_mode,
+ bounding_rect,
+ clip_task_address.unwrap(),
+ gpu_cache,
+ &prim_header,
+ prim_headers,
+ z_id,
+ prim_vis_mask,
+ );
+ }
+ }
+ PrimitiveInstanceKind::Backdrop { data_handle } => {
+ let prim_data = &ctx.data_stores.backdrop[data_handle];
+ let backdrop_pic_index = prim_data.kind.pic_index;
+ let backdrop_surface_index = ctx.prim_store.pictures[backdrop_pic_index.0]
+ .raster_config
+ .as_ref()
+ .expect("backdrop surface should be alloc by now")
+ .surface_index;
+
+ let backdrop_task_id = ctx.surfaces[backdrop_surface_index.0]
+ .render_tasks
+ .as_ref()
+ .expect("backdrop task not available")
+ .root;
+
+ let backdrop_uv_rect_address = render_tasks[backdrop_task_id]
+ .get_texture_address(gpu_cache)
+ .as_int();
+
+ let textures = BatchTextures::render_target_cache();
+ let batch_key = BatchKey::new(
+ BatchKind::Brush(BrushBatchKind::Image(ImageBufferKind::Texture2DArray)),
+ BlendMode::PremultipliedAlpha,
+ textures,
+ );
+
+ let prim_cache_address = gpu_cache.get_address(&ctx.globals.default_image_handle);
+ let backdrop_picture = &ctx.prim_store.pictures[backdrop_pic_index.0];
+ let prim_header = PrimitiveHeader {
+ local_rect: backdrop_picture.precise_local_rect,
+ local_clip_rect: prim_info.combined_local_clip_rect,
+ transform_id,
+ specific_prim_address: prim_cache_address,
+ };
+
+ let prim_header_index = prim_headers.push(
+ &prim_header,
+ z_id,
+ ImageBrushData {
+ color_mode: ShaderColorMode::Image,
+ alpha_type: AlphaType::PremultipliedAlpha,
+ raster_space: RasterizationSpace::Screen,
+ opacity: 1.0,
+ }.encode(),
+ );
+
+ self.add_brush_instance_to_batches(
+ batch_key,
+ batch_features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::empty(),
+ OPAQUE_TASK_ADDRESS,
+ BrushFlags::empty(),
+ prim_header_index,
+ backdrop_uv_rect_address,
+ prim_vis_mask,
+ );
+ }
+ }
+ }
+
+ /// Add a single segment instance to a batch.
+ fn add_segment_to_batch(
+ &mut self,
+ segment: &BrushSegment,
+ segment_data: &SegmentInstanceData,
+ segment_index: i32,
+ batch_kind: BrushBatchKind,
+ prim_header_index: PrimitiveHeaderIndex,
+ alpha_blend_mode: BlendMode,
+ features: BatchFeatures,
+ bounding_rect: &PictureRect,
+ transform_kind: TransformedRectKind,
+ render_tasks: &RenderTaskGraph,
+ z_id: ZBufferId,
+ prim_opacity: PrimitiveOpacity,
+ clip_task_index: ClipTaskIndex,
+ prim_vis_mask: PrimitiveVisibilityMask,
+ ctx: &RenderTargetContext,
+ ) {
+ debug_assert!(clip_task_index != ClipTaskIndex::INVALID);
+
+ // Get GPU address of clip task for this segment, or None if
+ // the entire segment is clipped out.
+ let clip_task_address = match ctx.get_clip_task_address(
+ clip_task_index,
+ segment_index,
+ render_tasks,
+ ) {
+ Some(clip_task_address) => clip_task_address,
+ None => return,
+ };
+
+ // If a got a valid (or OPAQUE) clip task address, add the segment.
+ let is_inner = segment.edge_flags.is_empty();
+ let needs_blending = !prim_opacity.is_opaque ||
+ clip_task_address != OPAQUE_TASK_ADDRESS ||
+ (!is_inner && transform_kind == TransformedRectKind::Complex);
+
+ let batch_key = BatchKey {
+ blend_mode: if needs_blending { alpha_blend_mode } else { BlendMode::None },
+ kind: BatchKind::Brush(batch_kind),
+ textures: segment_data.textures,
+ };
+
+ self.add_brush_instance_to_batches(
+ batch_key,
+ features,
+ bounding_rect,
+ z_id,
+ segment_index,
+ segment.edge_flags,
+ clip_task_address,
+ BrushFlags::PERSPECTIVE_INTERPOLATION | segment.brush_flags,
+ prim_header_index,
+ segment_data.specific_resource_address,
+ prim_vis_mask,
+ );
+ }
+
+ /// Add any segment(s) from a brush to batches.
+ fn add_segmented_prim_to_batch(
+ &mut self,
+ brush_segments: Option<&[BrushSegment]>,
+ prim_opacity: PrimitiveOpacity,
+ params: &BrushBatchParameters,
+ alpha_blend_mode: BlendMode,
+ non_segmented_blend_mode: BlendMode,
+ features: BatchFeatures,
+ prim_header_index: PrimitiveHeaderIndex,
+ bounding_rect: &PictureRect,
+ transform_kind: TransformedRectKind,
+ render_tasks: &RenderTaskGraph,
+ z_id: ZBufferId,
+ clip_task_index: ClipTaskIndex,
+ prim_vis_mask: PrimitiveVisibilityMask,
+ ctx: &RenderTargetContext,
+ ) {
+ match (brush_segments, &params.segment_data) {
+ (Some(ref brush_segments), SegmentDataKind::Instanced(ref segment_data)) => {
+ // In this case, we have both a list of segments, and a list of
+ // per-segment instance data. Zip them together to build batches.
+ debug_assert_eq!(brush_segments.len(), segment_data.len());
+ for (segment_index, (segment, segment_data)) in brush_segments
+ .iter()
+ .zip(segment_data.iter())
+ .enumerate()
+ {
+ self.add_segment_to_batch(
+ segment,
+ segment_data,
+ segment_index as i32,
+ params.batch_kind,
+ prim_header_index,
+ alpha_blend_mode,
+ features,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_opacity,
+ clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ }
+ }
+ (Some(ref brush_segments), SegmentDataKind::Shared(ref segment_data)) => {
+ // A list of segments, but the per-segment data is common
+ // between all segments.
+ for (segment_index, segment) in brush_segments
+ .iter()
+ .enumerate()
+ {
+ self.add_segment_to_batch(
+ segment,
+ segment_data,
+ segment_index as i32,
+ params.batch_kind,
+ prim_header_index,
+ alpha_blend_mode,
+ features,
+ bounding_rect,
+ transform_kind,
+ render_tasks,
+ z_id,
+ prim_opacity,
+ clip_task_index,
+ prim_vis_mask,
+ ctx,
+ );
+ }
+ }
+ (None, SegmentDataKind::Shared(ref segment_data)) => {
+ // No segments, and thus no per-segment instance data.
+ // Note: the blend mode already takes opacity into account
+ let batch_key = BatchKey {
+ blend_mode: non_segmented_blend_mode,
+ kind: BatchKind::Brush(params.batch_kind),
+ textures: segment_data.textures,
+ };
+ let clip_task_address = ctx.get_prim_clip_task_address(
+ clip_task_index,
+ render_tasks,
+ ).unwrap();
+ self.add_brush_instance_to_batches(
+ batch_key,
+ features,
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::all(),
+ clip_task_address,
+ BrushFlags::PERSPECTIVE_INTERPOLATION,
+ prim_header_index,
+ segment_data.specific_resource_address,
+ prim_vis_mask,
+ );
+ }
+ (None, SegmentDataKind::Instanced(..)) => {
+ // We should never hit the case where there are no segments,
+ // but a list of segment instance data.
+ unreachable!();
+ }
+ }
+ }
+
+ fn add_gradient_tiles(
+ &mut self,
+ visible_tiles: &[VisibleGradientTile],
+ stops_handle: &GpuCacheHandle,
+ kind: BrushBatchKind,
+ blend_mode: BlendMode,
+ bounding_rect: &PictureRect,
+ clip_task_address: RenderTaskAddress,
+ gpu_cache: &GpuCache,
+ base_prim_header: &PrimitiveHeader,
+ prim_headers: &mut PrimitiveHeaders,
+ z_id: ZBufferId,
+ prim_vis_mask: PrimitiveVisibilityMask,
+ ) {
+ let key = BatchKey {
+ blend_mode,
+ kind: BatchKind::Brush(kind),
+ textures: BatchTextures::no_texture(),
+ };
+
+ let user_data = [stops_handle.as_int(gpu_cache), 0, 0, 0];
+
+ for tile in visible_tiles {
+ let prim_header = PrimitiveHeader {
+ specific_prim_address: gpu_cache.get_address(&tile.handle),
+ local_rect: tile.local_rect,
+ local_clip_rect: tile.local_clip_rect,
+ ..*base_prim_header
+ };
+ let prim_header_index = prim_headers.push(&prim_header, z_id, user_data);
+
+ self.add_brush_instance_to_batches(
+ key,
+ BatchFeatures::empty(),
+ bounding_rect,
+ z_id,
+ INVALID_SEGMENT_INDEX,
+ EdgeAaSegmentMask::all(),
+ clip_task_address,
+ BrushFlags::PERSPECTIVE_INTERPOLATION,
+ prim_header_index,
+ 0,
+ prim_vis_mask,
+ );
+ }
+ }
+}
+
+fn get_image_tile_params(
+ resource_cache: &ResourceCache,
+ gpu_cache: &mut GpuCache,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+ request: ImageRequest,
+) -> Option<(BrushBatchKind, BatchTextures, GpuCacheAddress)> {
+
+ let cache_item = resolve_image(
+ request,
+ resource_cache,
+ gpu_cache,
+ deferred_resolves,
+ );
+
+ if cache_item.texture_id == TextureSource::Invalid {
+ None
+ } else {
+ let textures = BatchTextures::color(cache_item.texture_id);
+ Some((
+ BrushBatchKind::Image(get_buffer_kind(cache_item.texture_id)),
+ textures,
+ gpu_cache.get_address(&cache_item.uv_rect_handle),
+ ))
+ }
+}
+
+/// Either a single texture / user data for all segments,
+/// or a list of one per segment.
+enum SegmentDataKind {
+ Shared(SegmentInstanceData),
+ Instanced(SmallVec<[SegmentInstanceData; 8]>),
+}
+
+/// The parameters that are specific to a kind of brush,
+/// used by the common method to add a brush to batches.
+struct BrushBatchParameters {
+ batch_kind: BrushBatchKind,
+ prim_user_data: [i32; 4],
+ segment_data: SegmentDataKind,
+}
+
+impl BrushBatchParameters {
+ /// This brush instance has a list of per-segment
+ /// instance data.
+ fn instanced(
+ batch_kind: BrushBatchKind,
+ prim_user_data: [i32; 4],
+ segment_data: SmallVec<[SegmentInstanceData; 8]>,
+ ) -> Self {
+ BrushBatchParameters {
+ batch_kind,
+ prim_user_data,
+ segment_data: SegmentDataKind::Instanced(segment_data),
+ }
+ }
+
+ /// This brush instance shares the per-segment data
+ /// across all segments.
+ fn shared(
+ batch_kind: BrushBatchKind,
+ textures: BatchTextures,
+ prim_user_data: [i32; 4],
+ specific_resource_address: i32,
+ ) -> Self {
+ BrushBatchParameters {
+ batch_kind,
+ prim_user_data,
+ segment_data: SegmentDataKind::Shared(
+ SegmentInstanceData {
+ textures,
+ specific_resource_address,
+ }
+ ),
+ }
+ }
+}
+
+impl RenderTaskGraph {
+ fn resolve_surface(
+ &self,
+ task_id: RenderTaskId,
+ gpu_cache: &GpuCache,
+ ) -> (GpuCacheAddress, BatchTextures) {
+ (
+ self[task_id].get_texture_address(gpu_cache),
+ BatchTextures::render_target_cache(),
+ )
+ }
+}
+
+pub fn resolve_image(
+ request: ImageRequest,
+ resource_cache: &ResourceCache,
+ gpu_cache: &mut GpuCache,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+) -> CacheItem {
+ match resource_cache.get_image_properties(request.key) {
+ Some(image_properties) => {
+ // Check if an external image that needs to be resolved
+ // by the render thread.
+ match image_properties.external_image {
+ Some(external_image) => {
+ // This is an external texture - we will add it to
+ // the deferred resolves list to be patched by
+ // the render thread...
+ let cache_handle = gpu_cache.push_deferred_per_frame_blocks(BLOCKS_PER_UV_RECT);
+ let cache_item = CacheItem {
+ texture_id: TextureSource::External(external_image),
+ uv_rect_handle: cache_handle,
+ uv_rect: DeviceIntRect::new(
+ DeviceIntPoint::zero(),
+ image_properties.descriptor.size,
+ ),
+ texture_layer: 0,
+ };
+
+ deferred_resolves.push(DeferredResolve {
+ image_properties,
+ address: gpu_cache.get_address(&cache_handle),
+ rendering: request.rendering,
+ });
+
+ cache_item
+ }
+ None => {
+ if let Ok(cache_item) = resource_cache.get_cached_image(request) {
+ cache_item
+ } else {
+ // There is no usable texture entry for the image key. Just return an invalid texture here.
+ CacheItem::invalid()
+ }
+ }
+ }
+ }
+ None => {
+ CacheItem::invalid()
+ }
+ }
+}
+
+/// A list of clip instances to be drawn into a target.
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ClipBatchList {
+ /// Rectangle draws fill up the rectangles with rounded corners.
+ pub slow_rectangles: Vec<ClipMaskInstance>,
+ pub fast_rectangles: Vec<ClipMaskInstance>,
+ /// Image draws apply the image masking.
+ pub images: FastHashMap<TextureSource, Vec<ClipMaskInstance>>,
+ pub box_shadows: FastHashMap<TextureSource, Vec<ClipMaskInstance>>,
+}
+
+impl ClipBatchList {
+ fn new() -> Self {
+ ClipBatchList {
+ slow_rectangles: Vec::new(),
+ fast_rectangles: Vec::new(),
+ images: FastHashMap::default(),
+ box_shadows: FastHashMap::default(),
+ }
+ }
+}
+
+/// Batcher managing draw calls into the clip mask (in the RT cache).
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ClipBatcher {
+ /// The first clip in each clip task. This will overwrite all pixels
+ /// in the clip region, so we can skip doing a clear and write with
+ /// blending disabled, which is a big performance win on Intel GPUs.
+ pub primary_clips: ClipBatchList,
+ /// Any subsequent clip masks (rare) for a clip task get drawn in
+ /// a second pass with multiplicative blending enabled.
+ pub secondary_clips: ClipBatchList,
+
+ gpu_supports_fast_clears: bool,
+}
+
+impl ClipBatcher {
+ pub fn new(
+ gpu_supports_fast_clears: bool,
+ ) -> Self {
+ ClipBatcher {
+ primary_clips: ClipBatchList::new(),
+ secondary_clips: ClipBatchList::new(),
+ gpu_supports_fast_clears,
+ }
+ }
+
+ pub fn add_clip_region(
+ &mut self,
+ clip_data_address: GpuCacheAddress,
+ local_pos: LayoutPoint,
+ sub_rect: DeviceRect,
+ task_origin: DevicePoint,
+ screen_origin: DevicePoint,
+ device_pixel_scale: f32,
+ ) {
+ let instance = ClipMaskInstance {
+ clip_transform_id: TransformPaletteId::IDENTITY,
+ prim_transform_id: TransformPaletteId::IDENTITY,
+ clip_data_address,
+ resource_address: GpuCacheAddress::INVALID,
+ local_pos,
+ tile_rect: LayoutRect::zero(),
+ sub_rect,
+ task_origin,
+ screen_origin,
+ device_pixel_scale,
+ };
+
+ self.primary_clips.slow_rectangles.push(instance);
+ }
+
+ /// Where appropriate, draw a clip rectangle as a small series of tiles,
+ /// instead of one large rectangle.
+ fn add_tiled_clip_mask(
+ &mut self,
+ mask_screen_rect: DeviceIntRect,
+ local_clip_rect: LayoutRect,
+ clip_spatial_node_index: SpatialNodeIndex,
+ spatial_tree: &SpatialTree,
+ world_rect: &WorldRect,
+ device_pixel_scale: DevicePixelScale,
+ gpu_address: GpuCacheAddress,
+ instance: &ClipMaskInstance,
+ is_first_clip: bool,
+ ) -> bool {
+ // Only try to draw in tiles if the clip mark is big enough.
+ if mask_screen_rect.area() < CLIP_RECTANGLE_AREA_THRESHOLD {
+ return false;
+ }
+
+ let clip_spatial_node = &spatial_tree
+ .spatial_nodes[clip_spatial_node_index.0 as usize];
+
+ // Only support clips that are axis-aligned to the root coordinate space,
+ // for now, to simplify the logic below. This handles the vast majority
+ // of real world cases, but could be expanded in future if needed.
+ if clip_spatial_node.coordinate_system_id != CoordinateSystemId::root() {
+ return false;
+ }
+
+ // Get the world rect of the clip rectangle. If we can't transform it due
+ // to the matrix, just fall back to drawing the entire clip mask.
+ let transform = spatial_tree.get_world_transform(
+ clip_spatial_node_index,
+ );
+ let world_clip_rect = match project_rect(
+ &transform.into_transform(),
+ &local_clip_rect,
+ world_rect,
+ ) {
+ Some(rect) => rect,
+ None => return false,
+ };
+
+ // Work out how many tiles to draw this clip mask in, stretched across the
+ // device rect of the primitive clip mask.
+ let world_device_rect = world_clip_rect * device_pixel_scale;
+ let x_tiles = (mask_screen_rect.size.width + CLIP_RECTANGLE_TILE_SIZE-1) / CLIP_RECTANGLE_TILE_SIZE;
+ let y_tiles = (mask_screen_rect.size.height + CLIP_RECTANGLE_TILE_SIZE-1) / CLIP_RECTANGLE_TILE_SIZE;
+
+ // Because we only run this code path for axis-aligned rects (the root coord system check above),
+ // and only for rectangles (not rounded etc), the world_device_rect is not conservative - we know
+ // that there is no inner_rect, and the world_device_rect should be the real, axis-aligned clip rect.
+ let mask_origin = mask_screen_rect.origin.to_f32().to_vector();
+ let clip_list = self.get_batch_list(is_first_clip);
+
+ for y in 0 .. y_tiles {
+ for x in 0 .. x_tiles {
+ let p0 = DeviceIntPoint::new(
+ x * CLIP_RECTANGLE_TILE_SIZE,
+ y * CLIP_RECTANGLE_TILE_SIZE,
+ );
+ let p1 = DeviceIntPoint::new(
+ (p0.x + CLIP_RECTANGLE_TILE_SIZE).min(mask_screen_rect.size.width),
+ (p0.y + CLIP_RECTANGLE_TILE_SIZE).min(mask_screen_rect.size.height),
+ );
+ let normalized_sub_rect = DeviceIntRect::new(
+ p0,
+ DeviceIntSize::new(
+ p1.x - p0.x,
+ p1.y - p0.y,
+ ),
+ ).to_f32();
+ let world_sub_rect = normalized_sub_rect.translate(mask_origin);
+
+ // If the clip rect completely contains this tile rect, then drawing
+ // these pixels would be redundant - since this clip can't possibly
+ // affect the pixels in this tile, skip them!
+ if !world_device_rect.contains_rect(&world_sub_rect) {
+ clip_list.slow_rectangles.push(ClipMaskInstance {
+ clip_data_address: gpu_address,
+ sub_rect: normalized_sub_rect,
+ local_pos: local_clip_rect.origin,
+ ..*instance
+ });
+ }
+ }
+ }
+
+ true
+ }
+
+ /// Retrieve the correct clip batch list to append to, depending
+ /// on whether this is the first clip mask for a clip task.
+ fn get_batch_list(
+ &mut self,
+ is_first_clip: bool,
+ ) -> &mut ClipBatchList {
+ if is_first_clip && !self.gpu_supports_fast_clears {
+ &mut self.primary_clips
+ } else {
+ &mut self.secondary_clips
+ }
+ }
+
+ pub fn add(
+ &mut self,
+ clip_node_range: ClipNodeRange,
+ root_spatial_node_index: SpatialNodeIndex,
+ resource_cache: &ResourceCache,
+ gpu_cache: &GpuCache,
+ clip_store: &ClipStore,
+ spatial_tree: &SpatialTree,
+ transforms: &mut TransformPalette,
+ clip_data_store: &ClipDataStore,
+ actual_rect: DeviceIntRect,
+ world_rect: &WorldRect,
+ device_pixel_scale: DevicePixelScale,
+ task_origin: DevicePoint,
+ screen_origin: DevicePoint,
+ ) {
+ let mut is_first_clip = true;
+
+ for i in 0 .. clip_node_range.count {
+ let clip_instance = clip_store.get_instance_from_range(&clip_node_range, i);
+ let clip_node = &clip_data_store[clip_instance.handle];
+
+ let clip_transform_id = transforms.get_id(
+ clip_instance.spatial_node_index,
+ ROOT_SPATIAL_NODE_INDEX,
+ spatial_tree,
+ );
+
+ let prim_transform_id = transforms.get_id(
+ root_spatial_node_index,
+ ROOT_SPATIAL_NODE_INDEX,
+ spatial_tree,
+ );
+
+ let instance = ClipMaskInstance {
+ clip_transform_id,
+ prim_transform_id,
+ clip_data_address: GpuCacheAddress::INVALID,
+ resource_address: GpuCacheAddress::INVALID,
+ local_pos: LayoutPoint::zero(),
+ tile_rect: LayoutRect::zero(),
+ sub_rect: DeviceRect::new(
+ DevicePoint::zero(),
+ actual_rect.size.to_f32(),
+ ),
+ task_origin,
+ screen_origin,
+ device_pixel_scale: device_pixel_scale.0,
+ };
+
+ let added_clip = match clip_node.item.kind {
+ ClipItemKind::Image { image, rect, .. } => {
+ let request = ImageRequest {
+ key: image,
+ rendering: ImageRendering::Auto,
+ tile: None,
+ };
+
+ let clip_data_address =
+ gpu_cache.get_address(&clip_node.gpu_cache_handle);
+
+ let mut add_image = |request: ImageRequest, local_tile_rect: LayoutRect| {
+ let cache_item = match resource_cache.get_cached_image(request) {
+ Ok(item) => item,
+ Err(..) => {
+ warn!("Warnings: skip a image mask");
+ debug!("request: {:?}", request);
+ return;
+ }
+ };
+
+ self.get_batch_list(is_first_clip)
+ .images
+ .entry(cache_item.texture_id)
+ .or_insert_with(Vec::new)
+ .push(ClipMaskInstance {
+ clip_data_address,
+ resource_address: gpu_cache.get_address(&cache_item.uv_rect_handle),
+ tile_rect: local_tile_rect,
+ local_pos: rect.origin,
+ ..instance
+ });
+ };
+
+ match clip_instance.visible_tiles {
+ Some(ref tiles) => {
+ for tile in tiles {
+ add_image(
+ request.with_tile(tile.tile_offset),
+ tile.tile_rect,
+ )
+ }
+ }
+ None => {
+ add_image(request, rect)
+ }
+ }
+
+ true
+ }
+ ClipItemKind::BoxShadow { ref source } => {
+ let gpu_address =
+ gpu_cache.get_address(&clip_node.gpu_cache_handle);
+ let rt_handle = source
+ .cache_handle
+ .as_ref()
+ .expect("bug: render task handle not allocated");
+ let rt_cache_entry = resource_cache
+ .get_cached_render_task(rt_handle);
+ let cache_item = resource_cache
+ .get_texture_cache_item(&rt_cache_entry.handle);
+ debug_assert_ne!(cache_item.texture_id, TextureSource::Invalid);
+
+ self.get_batch_list(is_first_clip)
+ .box_shadows
+ .entry(cache_item.texture_id)
+ .or_insert_with(Vec::new)
+ .push(ClipMaskInstance {
+ clip_data_address: gpu_address,
+ resource_address: gpu_cache.get_address(&cache_item.uv_rect_handle),
+ ..instance
+ });
+
+ true
+ }
+ ClipItemKind::Rectangle { rect, mode: ClipMode::ClipOut } => {
+ let gpu_address =
+ gpu_cache.get_address(&clip_node.gpu_cache_handle);
+ self.get_batch_list(is_first_clip)
+ .slow_rectangles
+ .push(ClipMaskInstance {
+ local_pos: rect.origin,
+ clip_data_address: gpu_address,
+ ..instance
+ });
+
+ true
+ }
+ ClipItemKind::Rectangle { rect, mode: ClipMode::Clip } => {
+ if clip_instance.flags.contains(ClipNodeFlags::SAME_COORD_SYSTEM) {
+ false
+ } else {
+ let gpu_address = gpu_cache.get_address(&clip_node.gpu_cache_handle);
+
+ if !self.add_tiled_clip_mask(
+ actual_rect,
+ rect,
+ clip_instance.spatial_node_index,
+ spatial_tree,
+ world_rect,
+ device_pixel_scale,
+ gpu_address,
+ &instance,
+ is_first_clip,
+ ) {
+ self.get_batch_list(is_first_clip)
+ .slow_rectangles
+ .push(ClipMaskInstance {
+ clip_data_address: gpu_address,
+ local_pos: rect.origin,
+ ..instance
+ });
+ }
+
+ true
+ }
+ }
+ ClipItemKind::RoundedRectangle { rect, .. } => {
+ let gpu_address =
+ gpu_cache.get_address(&clip_node.gpu_cache_handle);
+ let batch_list = self.get_batch_list(is_first_clip);
+ let instance = ClipMaskInstance {
+ clip_data_address: gpu_address,
+ local_pos: rect.origin,
+ ..instance
+ };
+ if clip_instance.flags.contains(ClipNodeFlags::USE_FAST_PATH) {
+ batch_list.fast_rectangles.push(instance);
+ } else {
+ batch_list.slow_rectangles.push(instance);
+ }
+
+ true
+ }
+ };
+
+ is_first_clip &= !added_clip;
+ }
+ }
+}
+
+// TODO(gw): This should probably be a method on TextureSource
+pub fn get_buffer_kind(texture: TextureSource) -> ImageBufferKind {
+ match texture {
+ TextureSource::External(ext_image) => {
+ match ext_image.image_type {
+ ExternalImageType::TextureHandle(target) => {
+ target.into()
+ }
+ ExternalImageType::Buffer => {
+ // The ExternalImageType::Buffer should be handled by resource_cache.
+ // It should go through the non-external case.
+ panic!("Unexpected non-texture handle type");
+ }
+ }
+ }
+ _ => ImageBufferKind::Texture2DArray,
+ }
+}
+
+impl<'a, 'rc> RenderTargetContext<'a, 'rc> {
+ /// Retrieve the GPU task address for a given clip task instance.
+ /// Returns None if the segment was completely clipped out.
+ /// Returns Some(OPAQUE_TASK_ADDRESS) if no clip mask is needed.
+ /// Returns Some(task_address) if there was a valid clip mask.
+ fn get_clip_task_address(
+ &self,
+ clip_task_index: ClipTaskIndex,
+ offset: i32,
+ render_tasks: &RenderTaskGraph,
+ ) -> Option<RenderTaskAddress> {
+ let address = match self.scratch.clip_mask_instances[clip_task_index.0 as usize + offset as usize] {
+ ClipMaskKind::Mask(task_id) => {
+ render_tasks.get_task_address(task_id)
+ }
+ ClipMaskKind::None => {
+ OPAQUE_TASK_ADDRESS
+ }
+ ClipMaskKind::Clipped => {
+ return None;
+ }
+ };
+
+ Some(address)
+ }
+
+ /// Helper function to get the clip task address for a
+ /// non-segmented primitive.
+ fn get_prim_clip_task_address(
+ &self,
+ clip_task_index: ClipTaskIndex,
+ render_tasks: &RenderTaskGraph,
+ ) -> Option<RenderTaskAddress> {
+ self.get_clip_task_address(
+ clip_task_index,
+ 0,
+ render_tasks,
+ )
+ }
+}
diff --git a/third_party/webrender/webrender/src/border.rs b/third_party/webrender/webrender/src/border.rs
new file mode 100644
index 00000000000..3185acd42c5
--- /dev/null
+++ b/third_party/webrender/webrender/src/border.rs
@@ -0,0 +1,1491 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{BorderRadius, BorderSide, BorderStyle, ColorF, ColorU};
+use api::{NormalBorder as ApiNormalBorder, RepeatMode, EdgeAaSegmentMask};
+use api::units::*;
+use crate::clip::ClipChainId;
+use crate::ellipse::Ellipse;
+use euclid::vec2;
+use crate::scene_building::SceneBuilder;
+use crate::spatial_tree::SpatialNodeIndex;
+use crate::gpu_types::{BorderInstance, BorderSegment, BrushFlags};
+use crate::prim_store::{BorderSegmentInfo, BrushSegment, NinePatchDescriptor};
+use crate::prim_store::borders::{NormalBorderPrim, NormalBorderData};
+use crate::util::{lerp, RectHelpers};
+use crate::internal_types::LayoutPrimitiveInfo;
+
+// Using 2048 as the maximum radius in device space before which we
+// start stretching is up for debate.
+// the value must be chosen so that the corners will not use an
+// unreasonable amount of memory but should allow crisp corners in the
+// common cases.
+
+/// Maximum resolution in device pixels at which borders are rasterized.
+pub const MAX_BORDER_RESOLUTION: u32 = 2048;
+/// Maximum number of dots or dashes per segment to avoid freezing and filling up
+/// memory with unreasonable inputs. It would be better to address this by not building
+/// a list of per-dot information in the first place.
+pub const MAX_DASH_COUNT: u32 = 2048;
+
+// TODO(gw): Perhaps there is a better way to store
+// the border cache key than duplicating
+// all the border structs with hashable
+// variants...
+
+#[derive(Clone, Debug, Hash, MallocSizeOf, PartialEq, Eq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BorderRadiusAu {
+ pub top_left: LayoutSizeAu,
+ pub top_right: LayoutSizeAu,
+ pub bottom_left: LayoutSizeAu,
+ pub bottom_right: LayoutSizeAu,
+}
+
+impl From<BorderRadius> for BorderRadiusAu {
+ fn from(radius: BorderRadius) -> BorderRadiusAu {
+ BorderRadiusAu {
+ top_left: radius.top_left.to_au(),
+ top_right: radius.top_right.to_au(),
+ bottom_right: radius.bottom_right.to_au(),
+ bottom_left: radius.bottom_left.to_au(),
+ }
+ }
+}
+
+impl From<BorderRadiusAu> for BorderRadius {
+ fn from(radius: BorderRadiusAu) -> Self {
+ BorderRadius {
+ top_left: LayoutSize::from_au(radius.top_left),
+ top_right: LayoutSize::from_au(radius.top_right),
+ bottom_right: LayoutSize::from_au(radius.bottom_right),
+ bottom_left: LayoutSize::from_au(radius.bottom_left),
+ }
+ }
+}
+
+#[derive(Clone, Debug, Hash, MallocSizeOf, PartialEq, Eq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BorderSideAu {
+ pub color: ColorU,
+ pub style: BorderStyle,
+}
+
+impl From<BorderSide> for BorderSideAu {
+ fn from(side: BorderSide) -> Self {
+ BorderSideAu {
+ color: side.color.into(),
+ style: side.style,
+ }
+ }
+}
+
+impl From<BorderSideAu> for BorderSide {
+ fn from(side: BorderSideAu) -> Self {
+ BorderSide {
+ color: side.color.into(),
+ style: side.style,
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Hash, Eq, MallocSizeOf, PartialEq)]
+pub struct NormalBorderAu {
+ pub left: BorderSideAu,
+ pub right: BorderSideAu,
+ pub top: BorderSideAu,
+ pub bottom: BorderSideAu,
+ pub radius: BorderRadiusAu,
+ /// Whether to apply anti-aliasing on the border corners.
+ ///
+ /// Note that for this to be `false` and work, this requires the borders to
+ /// be solid, and no border-radius.
+ pub do_aa: bool,
+}
+
+impl NormalBorderAu {
+ // Construct a border based upon self with color
+ pub fn with_color(&self, color: ColorU) -> Self {
+ let mut b = self.clone();
+ b.left.color = color;
+ b.right.color = color;
+ b.top.color = color;
+ b.bottom.color = color;
+ b
+ }
+}
+
+impl From<ApiNormalBorder> for NormalBorderAu {
+ fn from(border: ApiNormalBorder) -> Self {
+ NormalBorderAu {
+ left: border.left.into(),
+ right: border.right.into(),
+ top: border.top.into(),
+ bottom: border.bottom.into(),
+ radius: border.radius.into(),
+ do_aa: border.do_aa,
+ }
+ }
+}
+
+impl From<NormalBorderAu> for ApiNormalBorder {
+ fn from(border: NormalBorderAu) -> Self {
+ ApiNormalBorder {
+ left: border.left.into(),
+ right: border.right.into(),
+ top: border.top.into(),
+ bottom: border.bottom.into(),
+ radius: border.radius.into(),
+ do_aa: border.do_aa,
+ }
+ }
+}
+
+/// Cache key that uniquely identifies a border
+/// segment in the render task cache.
+#[derive(Clone, Debug, Hash, MallocSizeOf, PartialEq, Eq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BorderSegmentCacheKey {
+ pub size: LayoutSizeAu,
+ pub radius: LayoutSizeAu,
+ pub side0: BorderSideAu,
+ pub side1: BorderSideAu,
+ pub segment: BorderSegment,
+ pub do_aa: bool,
+ pub h_adjacent_corner_outer: LayoutPointAu,
+ pub h_adjacent_corner_radius: LayoutSizeAu,
+ pub v_adjacent_corner_outer: LayoutPointAu,
+ pub v_adjacent_corner_radius: LayoutSizeAu,
+}
+
+pub fn ensure_no_corner_overlap(
+ radius: &mut BorderRadius,
+ size: LayoutSize,
+) {
+ let mut ratio = 1.0;
+ let top_left_radius = &mut radius.top_left;
+ let top_right_radius = &mut radius.top_right;
+ let bottom_right_radius = &mut radius.bottom_right;
+ let bottom_left_radius = &mut radius.bottom_left;
+
+ let sum = top_left_radius.width + top_right_radius.width;
+ if size.width < sum {
+ ratio = f32::min(ratio, size.width / sum);
+ }
+
+ let sum = bottom_left_radius.width + bottom_right_radius.width;
+ if size.width < sum {
+ ratio = f32::min(ratio, size.width / sum);
+ }
+
+ let sum = top_left_radius.height + bottom_left_radius.height;
+ if size.height < sum {
+ ratio = f32::min(ratio, size.height / sum);
+ }
+
+ let sum = top_right_radius.height + bottom_right_radius.height;
+ if size.height < sum {
+ ratio = f32::min(ratio, size.height / sum);
+ }
+
+ if ratio < 1. {
+ top_left_radius.width *= ratio;
+ top_left_radius.height *= ratio;
+
+ top_right_radius.width *= ratio;
+ top_right_radius.height *= ratio;
+
+ bottom_left_radius.width *= ratio;
+ bottom_left_radius.height *= ratio;
+
+ bottom_right_radius.width *= ratio;
+ bottom_right_radius.height *= ratio;
+ }
+}
+
+impl<'a> SceneBuilder<'a> {
+ pub fn add_normal_border(
+ &mut self,
+ info: &LayoutPrimitiveInfo,
+ border: &ApiNormalBorder,
+ widths: LayoutSideOffsets,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ ) {
+ let mut border = *border;
+ ensure_no_corner_overlap(&mut border.radius, info.rect.size);
+
+ self.add_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ info,
+ Vec::new(),
+ NormalBorderPrim {
+ border: border.into(),
+ widths: widths.to_au(),
+ },
+ );
+ }
+}
+
+pub trait BorderSideHelpers {
+ fn border_color(&self, is_inner_border: bool) -> ColorF;
+}
+
+impl BorderSideHelpers for BorderSide {
+ fn border_color(&self, is_inner_border: bool) -> ColorF {
+ let lighter = match self.style {
+ BorderStyle::Inset => is_inner_border,
+ BorderStyle::Outset => !is_inner_border,
+ _ => return self.color,
+ };
+
+ // The modulate colors below are not part of the specification. They are
+ // derived from the Gecko source code and experimentation, and used to
+ // modulate the colors in order to generate colors for the inset/outset
+ // and groove/ridge border styles.
+ //
+ // NOTE(emilio): Gecko at least takes the background color into
+ // account, should we do the same? Looks a bit annoying for this.
+ //
+ // NOTE(emilio): If you change this algorithm, do the same change on
+ // get_colors_for_side in cs_border_segment.glsl.
+ if self.color.r != 0.0 || self.color.g != 0.0 || self.color.b != 0.0 {
+ let scale = if lighter { 1.0 } else { 2.0 / 3.0 };
+ return self.color.scale_rgb(scale)
+ }
+
+ let black = if lighter { 0.7 } else { 0.3 };
+ ColorF::new(black, black, black, self.color.a)
+ }
+}
+
+/// The kind of border corner clip.
+#[repr(C)]
+#[derive(Copy, Debug, Clone, PartialEq)]
+pub enum BorderClipKind {
+ DashCorner = 1,
+ DashEdge = 2,
+ Dot = 3,
+}
+
+fn compute_outer_and_clip_sign(
+ corner_segment: BorderSegment,
+ radius: DeviceSize,
+) -> (DevicePoint, DeviceVector2D) {
+ let outer_scale = match corner_segment {
+ BorderSegment::TopLeft => DeviceVector2D::new(0.0, 0.0),
+ BorderSegment::TopRight => DeviceVector2D::new(1.0, 0.0),
+ BorderSegment::BottomRight => DeviceVector2D::new(1.0, 1.0),
+ BorderSegment::BottomLeft => DeviceVector2D::new(0.0, 1.0),
+ _ => panic!("bug: expected a corner segment"),
+ };
+ let outer = DevicePoint::new(
+ outer_scale.x * radius.width,
+ outer_scale.y * radius.height,
+ );
+
+ let clip_sign = DeviceVector2D::new(
+ 1.0 - 2.0 * outer_scale.x,
+ 1.0 - 2.0 * outer_scale.y,
+ );
+
+ (outer, clip_sign)
+}
+
+fn write_dashed_corner_instances(
+ corner_radius: DeviceSize,
+ widths: DeviceSize,
+ segment: BorderSegment,
+ base_instance: &BorderInstance,
+ instances: &mut Vec<BorderInstance>,
+) -> Result<(), ()> {
+ let ellipse = Ellipse::new(corner_radius);
+
+ let average_border_width = 0.5 * (widths.width + widths.height);
+
+ let (_half_dash, num_half_dashes) =
+ compute_half_dash(average_border_width, ellipse.total_arc_length);
+
+ if num_half_dashes == 0 {
+ return Err(());
+ }
+
+ let num_half_dashes = num_half_dashes.min(MAX_DASH_COUNT);
+
+ let (outer, clip_sign) = compute_outer_and_clip_sign(segment, corner_radius);
+
+ let instance_count = num_half_dashes / 4 + 1;
+ instances.reserve(instance_count as usize);
+
+ let half_dash_arc_length =
+ ellipse.total_arc_length / num_half_dashes as f32;
+ let dash_length = 2. * half_dash_arc_length;
+
+ let mut current_length = 0.;
+ for i in 0..instance_count {
+ let arc_length0 = current_length;
+ current_length += if i == 0 {
+ half_dash_arc_length
+ } else {
+ dash_length
+ };
+
+ let arc_length1 = current_length;
+ current_length += dash_length;
+
+ let alpha = ellipse.find_angle_for_arc_length(arc_length0);
+ let beta = ellipse.find_angle_for_arc_length(arc_length1);
+
+ let (point0, tangent0) = ellipse.get_point_and_tangent(alpha);
+ let (point1, tangent1) = ellipse.get_point_and_tangent(beta);
+
+ let point0 = DevicePoint::new(
+ outer.x + clip_sign.x * (corner_radius.width - point0.x),
+ outer.y + clip_sign.y * (corner_radius.height - point0.y),
+ );
+
+ let tangent0 = DeviceVector2D::new(
+ -tangent0.x * clip_sign.x,
+ -tangent0.y * clip_sign.y,
+ );
+
+ let point1 = DevicePoint::new(
+ outer.x + clip_sign.x * (corner_radius.width - point1.x),
+ outer.y + clip_sign.y * (corner_radius.height - point1.y),
+ );
+
+ let tangent1 = DeviceVector2D::new(
+ -tangent1.x * clip_sign.x,
+ -tangent1.y * clip_sign.y,
+ );
+
+ instances.push(BorderInstance {
+ flags: base_instance.flags | ((BorderClipKind::DashCorner as i32) << 24),
+ clip_params: [
+ point0.x,
+ point0.y,
+ tangent0.x,
+ tangent0.y,
+ point1.x,
+ point1.y,
+ tangent1.x,
+ tangent1.y,
+ ],
+ .. *base_instance
+ });
+ }
+
+ Ok(())
+}
+
+fn write_dotted_corner_instances(
+ corner_radius: DeviceSize,
+ widths: DeviceSize,
+ segment: BorderSegment,
+ base_instance: &BorderInstance,
+ instances: &mut Vec<BorderInstance>,
+) -> Result<(), ()> {
+ let mut corner_radius = corner_radius;
+ if corner_radius.width < (widths.width / 2.0) {
+ corner_radius.width = 0.0;
+ }
+ if corner_radius.height < (widths.height / 2.0) {
+ corner_radius.height = 0.0;
+ }
+
+ let (ellipse, max_dot_count) =
+ if corner_radius.width == 0. && corner_radius.height == 0. {
+ (Ellipse::new(corner_radius), 1)
+ } else {
+ // The centers of dots follow an ellipse along the middle of the
+ // border radius.
+ let inner_radius = (corner_radius - widths * 0.5).abs();
+ let ellipse = Ellipse::new(inner_radius);
+
+ // Allocate a "worst case" number of dot clips. This can be
+ // calculated by taking the minimum edge radius, since that
+ // will result in the maximum number of dots along the path.
+ let min_diameter = widths.width.min(widths.height);
+
+ // Get the number of circles (assuming spacing of one diameter
+ // between dots).
+ let max_dot_count = 0.5 * ellipse.total_arc_length / min_diameter;
+
+ // Add space for one extra dot since they are centered at the
+ // start of the arc.
+ (ellipse, max_dot_count.ceil() as usize)
+ };
+
+ if max_dot_count == 0 {
+ return Err(());
+ }
+
+ if max_dot_count == 1 {
+ let dot_diameter = lerp(widths.width, widths.height, 0.5);
+ instances.push(BorderInstance {
+ flags: base_instance.flags | ((BorderClipKind::Dot as i32) << 24),
+ clip_params: [
+ widths.width / 2.0, widths.height / 2.0, 0.5 * dot_diameter, 0.,
+ 0., 0., 0., 0.,
+ ],
+ .. *base_instance
+ });
+ return Ok(());
+ }
+
+ let max_dot_count = max_dot_count.min(MAX_DASH_COUNT as usize);
+
+ // FIXME(emilio): Should probably use SmallVec.
+ let mut forward_dots = Vec::with_capacity(max_dot_count / 2 + 1);
+ let mut back_dots = Vec::with_capacity(max_dot_count / 2 + 1);
+ let mut leftover_arc_length = 0.0;
+
+ // Alternate between adding dots at the start and end of the
+ // ellipse arc. This ensures that we always end up with an exact
+ // half dot at each end of the arc, to match up with the edges.
+ forward_dots.push(DotInfo::new(widths.width, widths.width));
+ back_dots.push(DotInfo::new(
+ ellipse.total_arc_length - widths.height,
+ widths.height,
+ ));
+
+ let (outer, clip_sign) = compute_outer_and_clip_sign(segment, corner_radius);
+ for dot_index in 0 .. max_dot_count {
+ let prev_forward_pos = *forward_dots.last().unwrap();
+ let prev_back_pos = *back_dots.last().unwrap();
+
+ // Select which end of the arc to place a dot from.
+ // This just alternates between the start and end of
+ // the arc, which ensures that there is always an
+ // exact half-dot at each end of the ellipse.
+ let going_forward = dot_index & 1 == 0;
+
+ let (next_dot_pos, leftover) = if going_forward {
+ let next_dot_pos =
+ prev_forward_pos.arc_pos + 2.0 * prev_forward_pos.diameter;
+ (next_dot_pos, prev_back_pos.arc_pos - next_dot_pos)
+ } else {
+ let next_dot_pos = prev_back_pos.arc_pos - 2.0 * prev_back_pos.diameter;
+ (next_dot_pos, next_dot_pos - prev_forward_pos.arc_pos)
+ };
+
+ // Use a lerp between each edge's dot
+ // diameter, based on the linear distance
+ // along the arc to get the diameter of the
+ // dot at this arc position.
+ let t = next_dot_pos / ellipse.total_arc_length;
+ let dot_diameter = lerp(widths.width, widths.height, t);
+
+ // If we can't fit a dot, bail out.
+ if leftover < dot_diameter {
+ leftover_arc_length = leftover;
+ break;
+ }
+
+ // We can place a dot!
+ let dot = DotInfo::new(next_dot_pos, dot_diameter);
+ if going_forward {
+ forward_dots.push(dot);
+ } else {
+ back_dots.push(dot);
+ }
+ }
+
+ // Now step through the dots, and distribute any extra
+ // leftover space on the arc between them evenly. Once
+ // the final arc position is determined, generate the correct
+ // arc positions and angles that get passed to the clip shader.
+ let number_of_dots = forward_dots.len() + back_dots.len();
+ let extra_space_per_dot = leftover_arc_length / (number_of_dots - 1) as f32;
+
+ let create_dot_data = |arc_length: f32, dot_radius: f32| -> [f32; 8] {
+ // Represents the GPU data for drawing a single dot to a clip mask. The order
+ // these are specified must stay in sync with the way this data is read in the
+ // dot clip shader.
+ let theta = ellipse.find_angle_for_arc_length(arc_length);
+ let (center, _) = ellipse.get_point_and_tangent(theta);
+
+ let center = DevicePoint::new(
+ outer.x + clip_sign.x * (corner_radius.width - center.x),
+ outer.y + clip_sign.y * (corner_radius.height - center.y),
+ );
+
+ [center.x, center.y, dot_radius, 0.0, 0.0, 0.0, 0.0, 0.0]
+ };
+
+ instances.reserve(number_of_dots);
+ for (i, dot) in forward_dots.iter().enumerate() {
+ let extra_dist = i as f32 * extra_space_per_dot;
+ instances.push(BorderInstance {
+ flags: base_instance.flags | ((BorderClipKind::Dot as i32) << 24),
+ clip_params: create_dot_data(dot.arc_pos + extra_dist, 0.5 * dot.diameter),
+ .. *base_instance
+ });
+ }
+
+ for (i, dot) in back_dots.iter().enumerate() {
+ let extra_dist = i as f32 * extra_space_per_dot;
+ instances.push(BorderInstance {
+ flags: base_instance.flags | ((BorderClipKind::Dot as i32) << 24),
+ clip_params: create_dot_data(dot.arc_pos - extra_dist, 0.5 * dot.diameter),
+ .. *base_instance
+ });
+ }
+
+ Ok(())
+}
+
+#[derive(Copy, Clone, Debug)]
+struct DotInfo {
+ arc_pos: f32,
+ diameter: f32,
+}
+
+impl DotInfo {
+ fn new(arc_pos: f32, diameter: f32) -> DotInfo {
+ DotInfo { arc_pos, diameter }
+ }
+}
+
+/// Information needed to place and draw a border edge.
+#[derive(Debug)]
+struct EdgeInfo {
+ /// Offset in local space to place the edge from origin.
+ local_offset: f32,
+ /// Size of the edge in local space.
+ local_size: f32,
+ /// Local stretch size for this edge (repeat past this).
+ stretch_size: f32,
+}
+
+impl EdgeInfo {
+ fn new(
+ local_offset: f32,
+ local_size: f32,
+ stretch_size: f32,
+ ) -> Self {
+ Self {
+ local_offset,
+ local_size,
+ stretch_size,
+ }
+ }
+}
+
+// Given a side width and the available space, compute the half-dash (half of
+// the 'on' segment) and the count of them for a given segment.
+fn compute_half_dash(side_width: f32, total_size: f32) -> (f32, u32) {
+ let half_dash = side_width * 1.5;
+ let num_half_dashes = (total_size / half_dash).ceil() as u32;
+
+ if num_half_dashes == 0 {
+ return (0., 0);
+ }
+
+ // TODO(emilio): Gecko has some other heuristics here to start with a full
+ // dash when the border side is zero, for example. We might consider those
+ // in the future.
+ let num_half_dashes = if num_half_dashes % 4 != 0 {
+ num_half_dashes + 4 - num_half_dashes % 4
+ } else {
+ num_half_dashes
+ };
+
+ let half_dash = total_size / num_half_dashes as f32;
+ (half_dash, num_half_dashes)
+}
+
+
+// Get the needed size in device pixels for an edge,
+// based on the border style of that edge. This is used
+// to determine how big the render task should be.
+fn get_edge_info(
+ style: BorderStyle,
+ side_width: f32,
+ avail_size: f32,
+) -> EdgeInfo {
+ // To avoid division by zero below.
+ if side_width <= 0.0 || avail_size <= 0.0 {
+ return EdgeInfo::new(0.0, 0.0, 0.0);
+ }
+
+ match style {
+ BorderStyle::Dashed => {
+ // Basically, two times the dash size.
+ let (half_dash, _num_half_dashes) =
+ compute_half_dash(side_width, avail_size);
+ let stretch_size = 2.0 * 2.0 * half_dash;
+ EdgeInfo::new(0., avail_size, stretch_size)
+ }
+ BorderStyle::Dotted => {
+ let dot_and_space_size = 2.0 * side_width;
+ if avail_size < dot_and_space_size * 0.75 {
+ return EdgeInfo::new(0.0, 0.0, 0.0);
+ }
+ let approx_dot_count = avail_size / dot_and_space_size;
+ let dot_count = approx_dot_count.floor().max(1.0);
+ let used_size = dot_count * dot_and_space_size;
+ let extra_space = avail_size - used_size;
+ let stretch_size = dot_and_space_size;
+ let offset = (extra_space * 0.5).round();
+ EdgeInfo::new(offset, used_size, stretch_size)
+ }
+ _ => {
+ EdgeInfo::new(0.0, avail_size, 8.0)
+ }
+ }
+}
+
+/// Create the set of border segments and render task
+/// cache keys for a given CSS border.
+pub fn create_border_segments(
+ size: LayoutSize,
+ border: &ApiNormalBorder,
+ widths: &LayoutSideOffsets,
+ border_segments: &mut Vec<BorderSegmentInfo>,
+ brush_segments: &mut Vec<BrushSegment>,
+) {
+ let rect = LayoutRect::new(
+ LayoutPoint::zero(),
+ size,
+ );
+
+ let overlap = LayoutSize::new(
+ (widths.left + widths.right - size.width).max(0.0),
+ (widths.top + widths.bottom - size.height).max(0.0),
+ );
+ let non_overlapping_widths = LayoutSideOffsets::new(
+ widths.top - overlap.height / 2.0,
+ widths.right - overlap.width / 2.0,
+ widths.bottom - overlap.height / 2.0,
+ widths.left - overlap.width / 2.0,
+ );
+
+ let local_size_tl = LayoutSize::new(
+ border.radius.top_left.width.max(widths.left),
+ border.radius.top_left.height.max(widths.top),
+ );
+ let local_size_tr = LayoutSize::new(
+ border.radius.top_right.width.max(widths.right),
+ border.radius.top_right.height.max(widths.top),
+ );
+ let local_size_br = LayoutSize::new(
+ border.radius.bottom_right.width.max(widths.right),
+ border.radius.bottom_right.height.max(widths.bottom),
+ );
+ let local_size_bl = LayoutSize::new(
+ border.radius.bottom_left.width.max(widths.left),
+ border.radius.bottom_left.height.max(widths.bottom),
+ );
+
+ let top_edge_info = get_edge_info(
+ border.top.style,
+ widths.top,
+ rect.size.width - local_size_tl.width - local_size_tr.width,
+ );
+ let bottom_edge_info = get_edge_info(
+ border.bottom.style,
+ widths.bottom,
+ rect.size.width - local_size_bl.width - local_size_br.width,
+ );
+
+ let left_edge_info = get_edge_info(
+ border.left.style,
+ widths.left,
+ rect.size.height - local_size_tl.height - local_size_bl.height,
+ );
+ let right_edge_info = get_edge_info(
+ border.right.style,
+ widths.right,
+ rect.size.height - local_size_tr.height - local_size_br.height,
+ );
+
+ add_edge_segment(
+ LayoutRect::from_floats(
+ rect.origin.x,
+ rect.origin.y + local_size_tl.height + left_edge_info.local_offset,
+ rect.origin.x + non_overlapping_widths.left,
+ rect.origin.y + local_size_tl.height + left_edge_info.local_offset + left_edge_info.local_size,
+ ),
+ &left_edge_info,
+ border.left,
+ non_overlapping_widths.left,
+ BorderSegment::Left,
+ EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::RIGHT,
+ brush_segments,
+ border_segments,
+ border.do_aa,
+ );
+ add_edge_segment(
+ LayoutRect::from_floats(
+ rect.origin.x + local_size_tl.width + top_edge_info.local_offset,
+ rect.origin.y,
+ rect.origin.x + local_size_tl.width + top_edge_info.local_offset + top_edge_info.local_size,
+ rect.origin.y + non_overlapping_widths.top,
+ ),
+ &top_edge_info,
+ border.top,
+ non_overlapping_widths.top,
+ BorderSegment::Top,
+ EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::BOTTOM,
+ brush_segments,
+ border_segments,
+ border.do_aa,
+ );
+ add_edge_segment(
+ LayoutRect::from_floats(
+ rect.origin.x + rect.size.width - non_overlapping_widths.right,
+ rect.origin.y + local_size_tr.height + right_edge_info.local_offset,
+ rect.origin.x + rect.size.width,
+ rect.origin.y + local_size_tr.height + right_edge_info.local_offset + right_edge_info.local_size,
+ ),
+ &right_edge_info,
+ border.right,
+ non_overlapping_widths.right,
+ BorderSegment::Right,
+ EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::LEFT,
+ brush_segments,
+ border_segments,
+ border.do_aa,
+ );
+ add_edge_segment(
+ LayoutRect::from_floats(
+ rect.origin.x + local_size_bl.width + bottom_edge_info.local_offset,
+ rect.origin.y + rect.size.height - non_overlapping_widths.bottom,
+ rect.origin.x + local_size_bl.width + bottom_edge_info.local_offset + bottom_edge_info.local_size,
+ rect.origin.y + rect.size.height,
+ ),
+ &bottom_edge_info,
+ border.bottom,
+ non_overlapping_widths.bottom,
+ BorderSegment::Bottom,
+ EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::TOP,
+ brush_segments,
+ border_segments,
+ border.do_aa,
+ );
+
+ add_corner_segment(
+ LayoutRect::from_floats(
+ rect.origin.x,
+ rect.origin.y,
+ rect.origin.x + local_size_tl.width,
+ rect.origin.y + local_size_tl.height,
+ ),
+ LayoutRect::from_floats(
+ rect.origin.x,
+ rect.origin.y,
+ rect.max_x() - non_overlapping_widths.right,
+ rect.max_y() - non_overlapping_widths.bottom
+ ),
+ border.left,
+ border.top,
+ LayoutSize::new(widths.left, widths.top),
+ border.radius.top_left,
+ BorderSegment::TopLeft,
+ EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::LEFT,
+ rect.top_right(),
+ border.radius.top_right,
+ rect.bottom_left(),
+ border.radius.bottom_left,
+ brush_segments,
+ border_segments,
+ border.do_aa,
+ );
+ add_corner_segment(
+ LayoutRect::from_floats(
+ rect.origin.x + rect.size.width - local_size_tr.width,
+ rect.origin.y,
+ rect.origin.x + rect.size.width,
+ rect.origin.y + local_size_tr.height,
+ ),
+ LayoutRect::from_floats(
+ rect.origin.x + non_overlapping_widths.left,
+ rect.origin.y,
+ rect.max_x(),
+ rect.max_y() - non_overlapping_widths.bottom,
+ ),
+ border.top,
+ border.right,
+ LayoutSize::new(widths.right, widths.top),
+ border.radius.top_right,
+ BorderSegment::TopRight,
+ EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::RIGHT,
+ rect.origin,
+ border.radius.top_left,
+ rect.bottom_right(),
+ border.radius.bottom_right,
+ brush_segments,
+ border_segments,
+ border.do_aa,
+ );
+ add_corner_segment(
+ LayoutRect::from_floats(
+ rect.origin.x + rect.size.width - local_size_br.width,
+ rect.origin.y + rect.size.height - local_size_br.height,
+ rect.origin.x + rect.size.width,
+ rect.origin.y + rect.size.height,
+ ),
+ LayoutRect::from_floats(
+ rect.origin.x + non_overlapping_widths.left,
+ rect.origin.y + non_overlapping_widths.top,
+ rect.max_x(),
+ rect.max_y(),
+ ),
+ border.right,
+ border.bottom,
+ LayoutSize::new(widths.right, widths.bottom),
+ border.radius.bottom_right,
+ BorderSegment::BottomRight,
+ EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::RIGHT,
+ rect.bottom_left(),
+ border.radius.bottom_left,
+ rect.top_right(),
+ border.radius.top_right,
+ brush_segments,
+ border_segments,
+ border.do_aa,
+ );
+ add_corner_segment(
+ LayoutRect::from_floats(
+ rect.origin.x,
+ rect.origin.y + rect.size.height - local_size_bl.height,
+ rect.origin.x + local_size_bl.width,
+ rect.origin.y + rect.size.height,
+ ),
+ LayoutRect::from_floats(
+ rect.origin.x,
+ rect.origin.y + non_overlapping_widths.top,
+ rect.max_x() - non_overlapping_widths.right,
+ rect.max_y(),
+ ),
+ border.bottom,
+ border.left,
+ LayoutSize::new(widths.left, widths.bottom),
+ border.radius.bottom_left,
+ BorderSegment::BottomLeft,
+ EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::LEFT,
+ rect.bottom_right(),
+ border.radius.bottom_right,
+ rect.origin,
+ border.radius.top_left,
+ brush_segments,
+ border_segments,
+ border.do_aa,
+ );
+}
+
+/// Computes the maximum scale that we allow for this set of border parameters.
+/// capping the scale will result in rendering very large corners at a lower
+/// resolution and stretching them, so they will have the right shape, but
+/// blurrier.
+pub fn get_max_scale_for_border(
+ border_data: &NormalBorderData,
+) -> LayoutToDeviceScale {
+ let mut r = 1.0;
+ for segment in &border_data.border_segments {
+ let size = segment.local_task_size;
+ r = size.width.max(size.height.max(r));
+ }
+
+ LayoutToDeviceScale::new(MAX_BORDER_RESOLUTION as f32 / r)
+}
+
+fn add_segment(
+ task_rect: DeviceRect,
+ style0: BorderStyle,
+ style1: BorderStyle,
+ color0: ColorF,
+ color1: ColorF,
+ segment: BorderSegment,
+ instances: &mut Vec<BorderInstance>,
+ widths: DeviceSize,
+ radius: DeviceSize,
+ do_aa: bool,
+ h_adjacent_corner_outer: DevicePoint,
+ h_adjacent_corner_radius: DeviceSize,
+ v_adjacent_corner_outer: DevicePoint,
+ v_adjacent_corner_radius: DeviceSize,
+) {
+ let base_flags = (segment as i32) |
+ ((style0 as i32) << 8) |
+ ((style1 as i32) << 16) |
+ ((do_aa as i32) << 28);
+
+ let base_instance = BorderInstance {
+ task_origin: DevicePoint::zero(),
+ local_rect: task_rect,
+ flags: base_flags,
+ color0: color0.premultiplied(),
+ color1: color1.premultiplied(),
+ widths,
+ radius,
+ clip_params: [0.0; 8],
+ };
+
+ match segment {
+ BorderSegment::TopLeft |
+ BorderSegment::TopRight |
+ BorderSegment::BottomLeft |
+ BorderSegment::BottomRight => {
+ // TODO(gw): Similarly to the old border code, we don't correctly handle a a corner
+ // that is dashed on one edge, and dotted on another. We can handle this
+ // in the future by submitting two instances, each one with one side
+ // color set to have an alpha of 0.
+ if (style0 == BorderStyle::Dotted && style1 == BorderStyle::Dashed) ||
+ (style0 == BorderStyle::Dashed && style0 == BorderStyle::Dotted) {
+ warn!("TODO: Handle a corner with dotted / dashed transition.");
+ }
+
+ let dashed_or_dotted_corner = match style0 {
+ BorderStyle::Dashed => {
+ write_dashed_corner_instances(
+ radius,
+ widths,
+ segment,
+ &base_instance,
+ instances,
+ )
+ }
+ BorderStyle::Dotted => {
+ write_dotted_corner_instances(
+ radius,
+ widths,
+ segment,
+ &base_instance,
+ instances,
+ )
+ }
+ _ => Err(()),
+ };
+
+ if dashed_or_dotted_corner.is_err() {
+ let clip_params = [
+ h_adjacent_corner_outer.x,
+ h_adjacent_corner_outer.y,
+ h_adjacent_corner_radius.width,
+ h_adjacent_corner_radius.height,
+ v_adjacent_corner_outer.x,
+ v_adjacent_corner_outer.y,
+ v_adjacent_corner_radius.width,
+ v_adjacent_corner_radius.height,
+ ];
+
+ instances.push(BorderInstance {
+ clip_params,
+ ..base_instance
+ });
+ }
+ }
+ BorderSegment::Top |
+ BorderSegment::Bottom |
+ BorderSegment::Right |
+ BorderSegment::Left => {
+ let is_vertical = segment == BorderSegment::Left ||
+ segment == BorderSegment::Right;
+
+ match style0 {
+ BorderStyle::Dashed => {
+ let (x, y) = if is_vertical {
+ let half_dash_size = task_rect.size.height * 0.25;
+ (0., half_dash_size)
+ } else {
+ let half_dash_size = task_rect.size.width * 0.25;
+ (half_dash_size, 0.)
+ };
+
+ instances.push(BorderInstance {
+ flags: base_flags | ((BorderClipKind::DashEdge as i32) << 24),
+ clip_params: [
+ x, y, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
+ ],
+ ..base_instance
+ });
+ }
+ BorderStyle::Dotted => {
+ let (x, y, r) = if is_vertical {
+ (widths.width * 0.5,
+ widths.width,
+ widths.width * 0.5)
+ } else {
+ (widths.height,
+ widths.height * 0.5,
+ widths.height * 0.5)
+ };
+
+ instances.push(BorderInstance {
+ flags: base_flags | ((BorderClipKind::Dot as i32) << 24),
+ clip_params: [
+ x, y, r, 0.0, 0.0, 0.0, 0.0, 0.0,
+ ],
+ ..base_instance
+ });
+ }
+ _ => {
+ instances.push(base_instance);
+ }
+ }
+ }
+ }
+}
+
+/// Add a corner segment (if valid) to the list of
+/// border segments for this primitive.
+fn add_corner_segment(
+ image_rect: LayoutRect,
+ non_overlapping_rect: LayoutRect,
+ side0: BorderSide,
+ side1: BorderSide,
+ widths: LayoutSize,
+ radius: LayoutSize,
+ segment: BorderSegment,
+ edge_flags: EdgeAaSegmentMask,
+ h_adjacent_corner_outer: LayoutPoint,
+ h_adjacent_corner_radius: LayoutSize,
+ v_adjacent_corner_outer: LayoutPoint,
+ v_adjacent_corner_radius: LayoutSize,
+ brush_segments: &mut Vec<BrushSegment>,
+ border_segments: &mut Vec<BorderSegmentInfo>,
+ do_aa: bool,
+) {
+ if side0.color.a <= 0.0 && side1.color.a <= 0.0 {
+ return;
+ }
+
+ if widths.width <= 0.0 && widths.height <= 0.0 {
+ return;
+ }
+
+ if side0.style.is_hidden() && side1.style.is_hidden() {
+ return;
+ }
+
+ let segment_rect = match image_rect.intersection(&non_overlapping_rect) {
+ Some(rect) => rect,
+ None => {
+ return;
+ }
+ };
+
+ let texture_rect = segment_rect
+ .translate(-image_rect.origin.to_vector())
+ .scale(1.0 / image_rect.size.width, 1.0 / image_rect.size.height);
+
+ brush_segments.push(
+ BrushSegment::new(
+ segment_rect,
+ /* may_need_clip_mask = */ true,
+ edge_flags,
+ [texture_rect.min_x(), texture_rect.min_y(), texture_rect.max_x(), texture_rect.max_y()],
+ BrushFlags::SEGMENT_RELATIVE | BrushFlags::SEGMENT_TEXEL_RECT,
+ )
+ );
+
+ // If the radii of the adjacent corners do not overlap with this segment,
+ // then set the outer position to this segment's corner and the radii to zero.
+ // That way the cache key is unaffected by non-overlapping corners, resulting
+ // in fewer misses.
+ let (h_corner_outer, h_corner_radius) = match segment {
+ BorderSegment::TopLeft => {
+ if h_adjacent_corner_outer.x - h_adjacent_corner_radius.width < image_rect.max_x() {
+ (h_adjacent_corner_outer, h_adjacent_corner_radius)
+ } else {
+ (LayoutPoint::new(image_rect.max_x(), image_rect.min_y()), LayoutSize::zero())
+ }
+ }
+ BorderSegment::TopRight => {
+ if h_adjacent_corner_outer.x + h_adjacent_corner_radius.width > image_rect.min_x() {
+ (h_adjacent_corner_outer, h_adjacent_corner_radius)
+ } else {
+ (LayoutPoint::new(image_rect.min_x(), image_rect.min_y()), LayoutSize::zero())
+ }
+ }
+ BorderSegment::BottomRight => {
+ if h_adjacent_corner_outer.x + h_adjacent_corner_radius.width > image_rect.min_x() {
+ (h_adjacent_corner_outer, h_adjacent_corner_radius)
+ } else {
+ (LayoutPoint::new(image_rect.min_x(), image_rect.max_y()), LayoutSize::zero())
+ }
+ }
+ BorderSegment::BottomLeft => {
+ if h_adjacent_corner_outer.x - h_adjacent_corner_radius.width < image_rect.max_x() {
+ (h_adjacent_corner_outer, h_adjacent_corner_radius)
+ } else {
+ (image_rect.bottom_right(), LayoutSize::zero())
+ }
+ }
+ _ => unreachable!()
+ };
+
+ let (v_corner_outer, v_corner_radius) = match segment {
+ BorderSegment::TopLeft => {
+ if v_adjacent_corner_outer.y - v_adjacent_corner_radius.height < image_rect.max_y() {
+ (v_adjacent_corner_outer, v_adjacent_corner_radius)
+ } else {
+ (LayoutPoint::new(image_rect.min_x(), image_rect.max_y()), LayoutSize::zero())
+ }
+ }
+ BorderSegment::TopRight => {
+ if v_adjacent_corner_outer.y - v_adjacent_corner_radius.height < image_rect.max_y() {
+ (v_adjacent_corner_outer, v_adjacent_corner_radius)
+ } else {
+ (image_rect.bottom_right(), LayoutSize::zero())
+ }
+ }
+ BorderSegment::BottomRight => {
+ if v_adjacent_corner_outer.y + v_adjacent_corner_radius.height > image_rect.min_y() {
+ (v_adjacent_corner_outer, v_adjacent_corner_radius)
+ } else {
+ (LayoutPoint::new(image_rect.max_x(), image_rect.min_y()), LayoutSize::zero())
+ }
+ }
+ BorderSegment::BottomLeft => {
+ if v_adjacent_corner_outer.y + v_adjacent_corner_radius.height > image_rect.min_y() {
+ (v_adjacent_corner_outer, v_adjacent_corner_radius)
+ } else {
+ (LayoutPoint::new(image_rect.min_x(), image_rect.min_y()), LayoutSize::zero())
+ }
+ }
+ _ => unreachable!()
+ };
+
+ border_segments.push(BorderSegmentInfo {
+ local_task_size: image_rect.size,
+ cache_key: BorderSegmentCacheKey {
+ do_aa,
+ side0: side0.into(),
+ side1: side1.into(),
+ segment,
+ radius: radius.to_au(),
+ size: widths.to_au(),
+ h_adjacent_corner_outer: (h_corner_outer - image_rect.origin).to_point().to_au(),
+ h_adjacent_corner_radius: h_corner_radius.to_au(),
+ v_adjacent_corner_outer: (v_corner_outer - image_rect.origin).to_point().to_au(),
+ v_adjacent_corner_radius: v_corner_radius.to_au(),
+ },
+ });
+}
+
+/// Add an edge segment (if valid) to the list of
+/// border segments for this primitive.
+fn add_edge_segment(
+ image_rect: LayoutRect,
+ edge_info: &EdgeInfo,
+ side: BorderSide,
+ width: f32,
+ segment: BorderSegment,
+ edge_flags: EdgeAaSegmentMask,
+ brush_segments: &mut Vec<BrushSegment>,
+ border_segments: &mut Vec<BorderSegmentInfo>,
+ do_aa: bool,
+) {
+ if side.color.a <= 0.0 {
+ return;
+ }
+
+ if side.style.is_hidden() {
+ return;
+ }
+
+ let (size, brush_flags) = match segment {
+ BorderSegment::Left | BorderSegment::Right => {
+ (LayoutSize::new(width, edge_info.stretch_size), BrushFlags::SEGMENT_REPEAT_Y)
+ }
+ BorderSegment::Top | BorderSegment::Bottom => {
+ (LayoutSize::new(edge_info.stretch_size, width), BrushFlags::SEGMENT_REPEAT_X)
+ }
+ _ => {
+ unreachable!();
+ }
+ };
+
+ if image_rect.size.width <= 0. || image_rect.size.height <= 0. {
+ return;
+ }
+
+ brush_segments.push(
+ BrushSegment::new(
+ image_rect,
+ /* may_need_clip_mask = */ true,
+ edge_flags,
+ [0.0, 0.0, size.width, size.height],
+ BrushFlags::SEGMENT_RELATIVE | brush_flags,
+ )
+ );
+
+ border_segments.push(BorderSegmentInfo {
+ local_task_size: size,
+ cache_key: BorderSegmentCacheKey {
+ do_aa,
+ side0: side.into(),
+ side1: side.into(),
+ radius: LayoutSizeAu::zero(),
+ size: size.to_au(),
+ segment,
+ h_adjacent_corner_outer: LayoutPointAu::zero(),
+ h_adjacent_corner_radius: LayoutSizeAu::zero(),
+ v_adjacent_corner_outer: LayoutPointAu::zero(),
+ v_adjacent_corner_radius: LayoutSizeAu::zero(),
+ },
+ });
+}
+
+/// Build the set of border instances needed to draw a border
+/// segment into the render task cache.
+pub fn build_border_instances(
+ cache_key: &BorderSegmentCacheKey,
+ cache_size: DeviceIntSize,
+ border: &ApiNormalBorder,
+ scale: LayoutToDeviceScale,
+) -> Vec<BorderInstance> {
+ let mut instances = Vec::new();
+
+ let (side0, side1, flip0, flip1) = match cache_key.segment {
+ BorderSegment::Left => (&border.left, &border.left, false, false),
+ BorderSegment::Top => (&border.top, &border.top, false, false),
+ BorderSegment::Right => (&border.right, &border.right, true, true),
+ BorderSegment::Bottom => (&border.bottom, &border.bottom, true, true),
+ BorderSegment::TopLeft => (&border.left, &border.top, false, false),
+ BorderSegment::TopRight => (&border.top, &border.right, false, true),
+ BorderSegment::BottomRight => (&border.right, &border.bottom, true, true),
+ BorderSegment::BottomLeft => (&border.bottom, &border.left, true, false),
+ };
+
+ let style0 = if side0.style.is_hidden() {
+ side1.style
+ } else {
+ side0.style
+ };
+ let style1 = if side1.style.is_hidden() {
+ side0.style
+ } else {
+ side1.style
+ };
+
+ let color0 = side0.border_color(flip0);
+ let color1 = side1.border_color(flip1);
+
+ let widths = (LayoutSize::from_au(cache_key.size) * scale).ceil();
+ let radius = (LayoutSize::from_au(cache_key.radius) * scale).ceil();
+
+ let h_corner_outer = (LayoutPoint::from_au(cache_key.h_adjacent_corner_outer) * scale).round();
+ let h_corner_radius = (LayoutSize::from_au(cache_key.h_adjacent_corner_radius) * scale).ceil();
+ let v_corner_outer = (LayoutPoint::from_au(cache_key.v_adjacent_corner_outer) * scale).round();
+ let v_corner_radius = (LayoutSize::from_au(cache_key.v_adjacent_corner_radius) * scale).ceil();
+
+ add_segment(
+ DeviceRect::new(DevicePoint::zero(), cache_size.to_f32()),
+ style0,
+ style1,
+ color0,
+ color1,
+ cache_key.segment,
+ &mut instances,
+ widths,
+ radius,
+ border.do_aa,
+ h_corner_outer,
+ h_corner_radius,
+ v_corner_outer,
+ v_corner_radius,
+ );
+
+ instances
+}
+
+impl NinePatchDescriptor {
+ pub fn create_segments(
+ &self,
+ size: LayoutSize,
+ ) -> Vec<BrushSegment> {
+ let rect = LayoutRect::new(
+ LayoutPoint::zero(),
+ size,
+ );
+
+ // Calculate the modified rect as specific by border-image-outset
+ let origin = LayoutPoint::new(
+ rect.origin.x - self.outset.left,
+ rect.origin.y - self.outset.top,
+ );
+ let size = LayoutSize::new(
+ rect.size.width + self.outset.left + self.outset.right,
+ rect.size.height + self.outset.top + self.outset.bottom,
+ );
+ let rect = LayoutRect::new(origin, size);
+
+ // Calculate the local texel coords of the slices.
+ let px0 = 0.0;
+ let px1 = self.slice.left as f32 / self.width as f32;
+ let px2 = (self.width as f32 - self.slice.right as f32) / self.width as f32;
+ let px3 = 1.0;
+
+ let py0 = 0.0;
+ let py1 = self.slice.top as f32 / self.height as f32;
+ let py2 = (self.height as f32 - self.slice.bottom as f32) / self.height as f32;
+ let py3 = 1.0;
+
+ let tl_outer = LayoutPoint::new(rect.origin.x, rect.origin.y);
+ let tl_inner = tl_outer + vec2(self.widths.left, self.widths.top);
+
+ let tr_outer = LayoutPoint::new(rect.origin.x + rect.size.width, rect.origin.y);
+ let tr_inner = tr_outer + vec2(-self.widths.right, self.widths.top);
+
+ let bl_outer = LayoutPoint::new(rect.origin.x, rect.origin.y + rect.size.height);
+ let bl_inner = bl_outer + vec2(self.widths.left, -self.widths.bottom);
+
+ let br_outer = LayoutPoint::new(
+ rect.origin.x + rect.size.width,
+ rect.origin.y + rect.size.height,
+ );
+ let br_inner = br_outer - vec2(self.widths.right, self.widths.bottom);
+
+ fn add_segment(
+ segments: &mut Vec<BrushSegment>,
+ rect: LayoutRect,
+ uv_rect: TexelRect,
+ repeat_horizontal: RepeatMode,
+ repeat_vertical: RepeatMode,
+ extra_flags: BrushFlags,
+ ) {
+ if uv_rect.uv1.x <= uv_rect.uv0.x || uv_rect.uv1.y <= uv_rect.uv0.y {
+ return;
+ }
+
+ // Use segment relative interpolation for all
+ // instances in this primitive.
+ let mut brush_flags =
+ BrushFlags::SEGMENT_RELATIVE |
+ BrushFlags::SEGMENT_TEXEL_RECT |
+ extra_flags;
+
+ // Enable repeat modes on the segment.
+ if repeat_horizontal == RepeatMode::Repeat {
+ brush_flags |= BrushFlags::SEGMENT_REPEAT_X;
+ } else if repeat_horizontal == RepeatMode::Round {
+ brush_flags |= BrushFlags::SEGMENT_REPEAT_X | BrushFlags::SEGMENT_REPEAT_X_ROUND;
+ }
+
+ if repeat_vertical == RepeatMode::Repeat {
+ brush_flags |= BrushFlags::SEGMENT_REPEAT_Y;
+ } else if repeat_vertical == RepeatMode::Round {
+ brush_flags |= BrushFlags::SEGMENT_REPEAT_Y | BrushFlags::SEGMENT_REPEAT_Y_ROUND;
+ }
+
+ let segment = BrushSegment::new(
+ rect,
+ true,
+ EdgeAaSegmentMask::empty(),
+ [
+ uv_rect.uv0.x,
+ uv_rect.uv0.y,
+ uv_rect.uv1.x,
+ uv_rect.uv1.y,
+ ],
+ brush_flags,
+ );
+
+ segments.push(segment);
+ }
+
+ // Build the list of image segments
+ let mut segments = Vec::new();
+
+ // Top left
+ add_segment(
+ &mut segments,
+ LayoutRect::from_floats(tl_outer.x, tl_outer.y, tl_inner.x, tl_inner.y),
+ TexelRect::new(px0, py0, px1, py1),
+ RepeatMode::Stretch,
+ RepeatMode::Stretch,
+ BrushFlags::empty(),
+ );
+ // Top right
+ add_segment(
+ &mut segments,
+ LayoutRect::from_floats(tr_inner.x, tr_outer.y, tr_outer.x, tr_inner.y),
+ TexelRect::new(px2, py0, px3, py1),
+ RepeatMode::Stretch,
+ RepeatMode::Stretch,
+ BrushFlags::empty(),
+ );
+ // Bottom right
+ add_segment(
+ &mut segments,
+ LayoutRect::from_floats(br_inner.x, br_inner.y, br_outer.x, br_outer.y),
+ TexelRect::new(px2, py2, px3, py3),
+ RepeatMode::Stretch,
+ RepeatMode::Stretch,
+ BrushFlags::empty(),
+ );
+ // Bottom left
+ add_segment(
+ &mut segments,
+ LayoutRect::from_floats(bl_outer.x, bl_inner.y, bl_inner.x, bl_outer.y),
+ TexelRect::new(px0, py2, px1, py3),
+ RepeatMode::Stretch,
+ RepeatMode::Stretch,
+ BrushFlags::empty(),
+ );
+
+ // Center
+ if self.fill {
+ add_segment(
+ &mut segments,
+ LayoutRect::from_floats(tl_inner.x, tl_inner.y, tr_inner.x, bl_inner.y),
+ TexelRect::new(px1, py1, px2, py2),
+ self.repeat_horizontal,
+ self.repeat_vertical,
+ BrushFlags::SEGMENT_NINEPATCH_MIDDLE,
+ );
+ }
+
+ // Add edge segments.
+
+ // Top
+ add_segment(
+ &mut segments,
+ LayoutRect::from_floats(tl_inner.x, tl_outer.y, tr_inner.x, tl_inner.y),
+ TexelRect::new(px1, py0, px2, py1),
+ self.repeat_horizontal,
+ RepeatMode::Stretch,
+ BrushFlags::empty(),
+ );
+ // Bottom
+ add_segment(
+ &mut segments,
+ LayoutRect::from_floats(bl_inner.x, bl_inner.y, br_inner.x, bl_outer.y),
+ TexelRect::new(px1, py2, px2, py3),
+ self.repeat_horizontal,
+ RepeatMode::Stretch,
+ BrushFlags::empty(),
+ );
+ // Left
+ add_segment(
+ &mut segments,
+ LayoutRect::from_floats(tl_outer.x, tl_inner.y, tl_inner.x, bl_inner.y),
+ TexelRect::new(px0, py1, px1, py2),
+ RepeatMode::Stretch,
+ self.repeat_vertical,
+ BrushFlags::empty(),
+ );
+ // Right
+ add_segment(
+ &mut segments,
+ LayoutRect::from_floats(tr_inner.x, tr_inner.y, br_outer.x, br_inner.y),
+ TexelRect::new(px2, py1, px3, py2),
+ RepeatMode::Stretch,
+ self.repeat_vertical,
+ BrushFlags::empty(),
+ );
+
+ segments
+ }
+}
diff --git a/third_party/webrender/webrender/src/box_shadow.rs b/third_party/webrender/webrender/src/box_shadow.rs
new file mode 100644
index 00000000000..49d6f884ffb
--- /dev/null
+++ b/third_party/webrender/webrender/src/box_shadow.rs
@@ -0,0 +1,277 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{BorderRadius, BoxShadowClipMode, ClipMode, ColorF, PrimitiveKeyKind};
+use api::PropertyBinding;
+use api::units::*;
+use crate::clip::{ClipItemKey, ClipItemKeyKind, ClipChainId};
+use crate::scene_building::SceneBuilder;
+use crate::spatial_tree::SpatialNodeIndex;
+use crate::gpu_cache::GpuCacheHandle;
+use crate::gpu_types::BoxShadowStretchMode;
+use crate::render_task_cache::RenderTaskCacheEntryHandle;
+use crate::util::RectHelpers;
+use crate::internal_types::LayoutPrimitiveInfo;
+
+#[derive(Debug, Clone, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BoxShadowClipSource {
+ // Parameters that define the shadow and are constant.
+ pub shadow_radius: BorderRadius,
+ pub blur_radius: f32,
+ pub clip_mode: BoxShadowClipMode,
+ pub stretch_mode_x: BoxShadowStretchMode,
+ pub stretch_mode_y: BoxShadowStretchMode,
+
+ // The current cache key (in device-pixels), and handles
+ // to the cached clip region and blurred texture.
+ pub cache_key: Option<(DeviceIntSize, BoxShadowCacheKey)>,
+ pub cache_handle: Option<RenderTaskCacheEntryHandle>,
+ pub clip_data_handle: GpuCacheHandle,
+
+ // Local-space size of the required render task size.
+ pub shadow_rect_alloc_size: LayoutSize,
+
+ // Local-space size of the required render task size without any downscaling
+ // applied. This is needed to stretch the shadow properly.
+ pub original_alloc_size: LayoutSize,
+
+ // The minimal shadow rect for the parameters above,
+ // used when drawing the shadow rect to be blurred.
+ pub minimal_shadow_rect: LayoutRect,
+
+ // Local space rect for the shadow to be drawn or
+ // stretched in the shadow primitive.
+ pub prim_shadow_rect: LayoutRect,
+}
+
+// The blur shader samples BLUR_SAMPLE_SCALE * blur_radius surrounding texels.
+pub const BLUR_SAMPLE_SCALE: f32 = 3.0;
+
+// Maximum blur radius for box-shadows (different than blur filters).
+// Taken from nsCSSRendering.cpp in Gecko.
+pub const MAX_BLUR_RADIUS: f32 = 300.;
+
+// A cache key that uniquely identifies a minimally sized
+// and blurred box-shadow rect that can be stored in the
+// texture cache and applied to clip-masks.
+#[derive(Debug, Clone, Eq, Hash, MallocSizeOf, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BoxShadowCacheKey {
+ pub blur_radius_dp: i32,
+ pub clip_mode: BoxShadowClipMode,
+ // NOTE(emilio): Only the original allocation size needs to be in the cache
+ // key, since the actual size is derived from that.
+ pub original_alloc_size: DeviceIntSize,
+ pub br_top_left: DeviceIntSize,
+ pub br_top_right: DeviceIntSize,
+ pub br_bottom_right: DeviceIntSize,
+ pub br_bottom_left: DeviceIntSize,
+}
+
+impl<'a> SceneBuilder<'a> {
+ pub fn add_box_shadow(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ prim_info: &LayoutPrimitiveInfo,
+ box_offset: &LayoutVector2D,
+ color: ColorF,
+ mut blur_radius: f32,
+ spread_radius: f32,
+ border_radius: BorderRadius,
+ clip_mode: BoxShadowClipMode,
+ ) {
+ if color.a == 0.0 {
+ return;
+ }
+
+ // Inset shadows get smaller as spread radius increases.
+ let (spread_amount, prim_clip_mode) = match clip_mode {
+ BoxShadowClipMode::Outset => (spread_radius, ClipMode::ClipOut),
+ BoxShadowClipMode::Inset => (-spread_radius, ClipMode::Clip),
+ };
+
+ // Ensure the blur radius is somewhat sensible.
+ blur_radius = f32::min(blur_radius, MAX_BLUR_RADIUS);
+
+ // Adjust the border radius of the box shadow per CSS-spec.
+ let shadow_radius = adjust_border_radius_for_box_shadow(border_radius, spread_amount);
+
+ // Apply parameters that affect where the shadow rect
+ // exists in the local space of the primitive.
+ let shadow_rect = self.snap_rect(
+ &prim_info
+ .rect
+ .translate(*box_offset)
+ .inflate(spread_amount, spread_amount),
+ spatial_node_index,
+ );
+
+ // If blur radius is zero, we can use a fast path with
+ // no blur applied.
+ if blur_radius == 0.0 {
+ // Trivial reject of box-shadows that are not visible.
+ if box_offset.x == 0.0 && box_offset.y == 0.0 && spread_amount == 0.0 {
+ return;
+ }
+
+ let mut clips = Vec::with_capacity(2);
+ let (final_prim_rect, clip_radius) = match clip_mode {
+ BoxShadowClipMode::Outset => {
+ if !shadow_rect.is_well_formed_and_nonempty() {
+ return;
+ }
+
+ // TODO(gw): Add a fast path for ClipOut + zero border radius!
+ clips.push(ClipItemKey {
+ kind: ClipItemKeyKind::rounded_rect(
+ prim_info.rect,
+ border_radius,
+ ClipMode::ClipOut,
+ ),
+ });
+
+ (shadow_rect, shadow_radius)
+ }
+ BoxShadowClipMode::Inset => {
+ if shadow_rect.is_well_formed_and_nonempty() {
+ clips.push(ClipItemKey {
+ kind: ClipItemKeyKind::rounded_rect(
+ shadow_rect,
+ shadow_radius,
+ ClipMode::ClipOut,
+ ),
+ });
+ }
+
+ (prim_info.rect, border_radius)
+ }
+ };
+
+ clips.push(ClipItemKey {
+ kind: ClipItemKeyKind::rounded_rect(
+ final_prim_rect,
+ clip_radius,
+ ClipMode::Clip,
+ ),
+ });
+
+ self.add_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ &LayoutPrimitiveInfo::with_clip_rect(final_prim_rect, prim_info.clip_rect),
+ clips,
+ PrimitiveKeyKind::Rectangle {
+ color: PropertyBinding::Value(color.into()),
+ },
+ );
+ } else {
+ // Normal path for box-shadows with a valid blur radius.
+ let blur_offset = (BLUR_SAMPLE_SCALE * blur_radius).ceil();
+ let mut extra_clips = vec![];
+
+ // Add a normal clip mask to clip out the contents
+ // of the surrounding primitive.
+ extra_clips.push(ClipItemKey {
+ kind: ClipItemKeyKind::rounded_rect(
+ prim_info.rect,
+ border_radius,
+ prim_clip_mode,
+ ),
+ });
+
+ // Get the local rect of where the shadow will be drawn,
+ // expanded to include room for the blurred region.
+ let dest_rect = shadow_rect.inflate(blur_offset, blur_offset);
+
+ // Draw the box-shadow as a solid rect, using a box-shadow
+ // clip mask item.
+ let prim = PrimitiveKeyKind::Rectangle {
+ color: PropertyBinding::Value(color.into()),
+ };
+
+ // Create the box-shadow clip item.
+ let shadow_clip_source = ClipItemKey {
+ kind: ClipItemKeyKind::box_shadow(
+ shadow_rect,
+ shadow_radius,
+ dest_rect,
+ blur_radius,
+ clip_mode,
+ ),
+ };
+
+ let prim_info = match clip_mode {
+ BoxShadowClipMode::Outset => {
+ // Certain spread-radii make the shadow invalid.
+ if !shadow_rect.is_well_formed_and_nonempty() {
+ return;
+ }
+
+ // Add the box-shadow clip source.
+ extra_clips.push(shadow_clip_source);
+
+ // Outset shadows are expanded by the shadow
+ // region from the original primitive.
+ LayoutPrimitiveInfo::with_clip_rect(dest_rect, prim_info.clip_rect)
+ }
+ BoxShadowClipMode::Inset => {
+ // If the inner shadow rect contains the prim
+ // rect, no pixels will be shadowed.
+ if border_radius.is_zero() && shadow_rect
+ .inflate(-blur_radius, -blur_radius)
+ .contains_rect(&prim_info.rect)
+ {
+ return;
+ }
+
+ // Inset shadows are still visible, even if the
+ // inset shadow rect becomes invalid (they will
+ // just look like a solid rectangle).
+ if shadow_rect.is_well_formed_and_nonempty() {
+ extra_clips.push(shadow_clip_source);
+ }
+
+ // Inset shadows draw inside the original primitive.
+ prim_info.clone()
+ }
+ };
+
+ self.add_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ &prim_info,
+ extra_clips,
+ prim,
+ );
+ }
+ }
+}
+
+fn adjust_border_radius_for_box_shadow(radius: BorderRadius, spread_amount: f32) -> BorderRadius {
+ BorderRadius {
+ top_left: adjust_corner_for_box_shadow(radius.top_left, spread_amount),
+ top_right: adjust_corner_for_box_shadow(radius.top_right, spread_amount),
+ bottom_right: adjust_corner_for_box_shadow(radius.bottom_right, spread_amount),
+ bottom_left: adjust_corner_for_box_shadow(radius.bottom_left, spread_amount),
+ }
+}
+
+fn adjust_corner_for_box_shadow(corner: LayoutSize, spread_amount: f32) -> LayoutSize {
+ LayoutSize::new(
+ adjust_radius_for_box_shadow(corner.width, spread_amount),
+ adjust_radius_for_box_shadow(corner.height, spread_amount),
+ )
+}
+
+fn adjust_radius_for_box_shadow(border_radius: f32, spread_amount: f32) -> f32 {
+ if border_radius > 0.0 {
+ (border_radius + spread_amount).max(0.0)
+ } else {
+ 0.0
+ }
+}
diff --git a/third_party/webrender/webrender/src/capture.rs b/third_party/webrender/webrender/src/capture.rs
new file mode 100644
index 00000000000..d6952b7f82d
--- /dev/null
+++ b/third_party/webrender/webrender/src/capture.rs
@@ -0,0 +1,290 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use std::fs::File;
+use std::path::{Path, PathBuf};
+
+use api::{CaptureBits, ExternalImageData, ImageDescriptor};
+#[cfg(feature = "png")]
+use api::ImageFormat;
+use api::units::TexelRect;
+#[cfg(feature = "png")]
+use api::units::DeviceIntSize;
+#[cfg(feature = "capture")]
+use crate::print_tree::{PrintableTree, PrintTree};
+use ron;
+use serde;
+
+
+#[derive(Clone)]
+pub struct CaptureConfig {
+ pub root: PathBuf,
+ pub bits: CaptureBits,
+ /// Scene sequence ID when capturing multiple frames. Zero for a single frame capture.
+ pub scene_id: u32,
+ /// Frame sequence ID when capturing multiple frames. Zero for a single frame capture.
+ pub frame_id: u32,
+ /// Resource sequence ID when capturing multiple frames. Zero for a single frame capture.
+ pub resource_id: u32,
+ #[cfg(feature = "capture")]
+ pretty: ron::ser::PrettyConfig,
+}
+
+impl CaptureConfig {
+ #[cfg(any(feature = "capture", feature = "replay"))]
+ pub fn new(root: PathBuf, bits: CaptureBits) -> Self {
+ CaptureConfig {
+ root,
+ bits,
+ scene_id: 0,
+ frame_id: 0,
+ resource_id: 0,
+ #[cfg(feature = "capture")]
+ pretty: ron::ser::PrettyConfig {
+ enumerate_arrays: true,
+ .. ron::ser::PrettyConfig::default()
+ },
+ }
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn prepare_scene(&mut self) {
+ use std::fs::create_dir_all;
+ self.scene_id += 1;
+ let _ = create_dir_all(&self.scene_root());
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn prepare_frame(&mut self) {
+ use std::fs::create_dir_all;
+ self.frame_id += 1;
+ let _ = create_dir_all(&self.frame_root());
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn prepare_resource(&mut self) {
+ use std::fs::create_dir_all;
+ self.resource_id += 1;
+ let _ = create_dir_all(&self.resource_root());
+ }
+
+ #[cfg(any(feature = "capture", feature = "replay"))]
+ pub fn scene_root(&self) -> PathBuf {
+ if self.scene_id > 0 {
+ let path = format!("scenes/{:05}", self.scene_id);
+ self.root.join(path)
+ } else {
+ self.root.clone()
+ }
+ }
+
+ #[cfg(any(feature = "capture", feature = "replay"))]
+ pub fn frame_root(&self) -> PathBuf {
+ if self.frame_id > 0 {
+ let path = format!("frames/{:05}", self.frame_id);
+ self.scene_root().join(path)
+ } else {
+ self.root.clone()
+ }
+ }
+
+ #[cfg(any(feature = "capture", feature = "replay"))]
+ pub fn resource_root(&self) -> PathBuf {
+ if self.resource_id > 0 {
+ let path = format!("resources/{:05}", self.resource_id);
+ self.root.join(path)
+ } else {
+ self.root.clone()
+ }
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn serialize_for_scene<T, P>(&self, data: &T, name: P)
+ where
+ T: serde::Serialize,
+ P: AsRef<Path>,
+ {
+ self.serialize(data, self.scene_root(), name)
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn serialize_for_frame<T, P>(&self, data: &T, name: P)
+ where
+ T: serde::Serialize,
+ P: AsRef<Path>,
+ {
+ self.serialize(data, self.frame_root(), name)
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn serialize_for_resource<T, P>(&self, data: &T, name: P)
+ where
+ T: serde::Serialize,
+ P: AsRef<Path>,
+ {
+ self.serialize(data, self.resource_root(), name)
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn file_path_for_frame<P>(&self, name: P, ext: &str) -> PathBuf
+ where P: AsRef<Path> {
+ self.frame_root().join(name).with_extension(ext)
+ }
+
+ #[cfg(feature = "capture")]
+ fn serialize<T, P>(&self, data: &T, path: PathBuf, name: P)
+ where
+ T: serde::Serialize,
+ P: AsRef<Path>,
+ {
+ use std::io::Write;
+ let ron = ron::ser::to_string_pretty(data, self.pretty.clone())
+ .unwrap();
+ let mut file = File::create(path.join(name).with_extension("ron"))
+ .unwrap();
+ write!(file, "{}\n", ron)
+ .unwrap();
+ }
+
+ #[cfg(feature = "capture")]
+ fn serialize_tree<T, P>(data: &T, root: PathBuf, name: P)
+ where
+ T: PrintableTree,
+ P: AsRef<Path>
+ {
+ let path = root
+ .join(name)
+ .with_extension("tree");
+ let file = File::create(path)
+ .unwrap();
+ let mut pt = PrintTree::new_with_sink("", file);
+ data.print_with(&mut pt);
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn serialize_tree_for_frame<T, P>(&self, data: &T, name: P)
+ where
+ T: PrintableTree,
+ P: AsRef<Path>
+ {
+ Self::serialize_tree(data, self.frame_root(), name)
+ }
+
+ #[cfg(feature = "replay")]
+ fn deserialize<T, P>(root: &PathBuf, name: P) -> Option<T>
+ where
+ T: for<'a> serde::Deserialize<'a>,
+ P: AsRef<Path>,
+ {
+ use std::io::Read;
+
+ let mut string = String::new();
+ let path = root
+ .join(name.as_ref())
+ .with_extension("ron");
+ File::open(path)
+ .ok()?
+ .read_to_string(&mut string)
+ .unwrap();
+ match ron::de::from_str(&string) {
+ Ok(out) => Some(out),
+ Err(e) => panic!("File {:?} deserialization failed: {:?}", name.as_ref(), e),
+ }
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn deserialize_for_scene<T, P>(&self, name: P) -> Option<T>
+ where
+ T: for<'a> serde::Deserialize<'a>,
+ P: AsRef<Path>,
+ {
+ Self::deserialize(&self.scene_root(), name)
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn deserialize_for_frame<T, P>(&self, name: P) -> Option<T>
+ where
+ T: for<'a> serde::Deserialize<'a>,
+ P: AsRef<Path>,
+ {
+ Self::deserialize(&self.frame_root(), name)
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn deserialize_for_resource<T, P>(&self, name: P) -> Option<T>
+ where
+ T: for<'a> serde::Deserialize<'a>,
+ P: AsRef<Path>,
+ {
+ Self::deserialize(&self.resource_root(), name)
+ }
+
+ #[cfg(feature = "png")]
+ pub fn save_png(
+ path: PathBuf, size: DeviceIntSize, format: ImageFormat, stride: Option<i32>, data: &[u8],
+ ) {
+ use png::{BitDepth, ColorType, Encoder};
+ use std::io::BufWriter;
+ use std::borrow::Cow;
+
+ // `png` expects
+ let data = match stride {
+ Some(stride) if stride != format.bytes_per_pixel() * size.width => {
+ let mut unstrided = Vec::new();
+ for y in 0..size.height {
+ let start = (y * stride) as usize;
+ unstrided.extend_from_slice(&data[start..start+(size.width * format.bytes_per_pixel()) as usize]);
+ }
+ Cow::from(unstrided)
+ }
+ _ => Cow::from(data),
+ };
+
+ let color_type = match format {
+ ImageFormat::RGBA8 => ColorType::RGBA,
+ ImageFormat::BGRA8 => {
+ warn!("Unable to swizzle PNG of BGRA8 type");
+ ColorType::RGBA
+ },
+ ImageFormat::R8 => ColorType::Grayscale,
+ ImageFormat::RG8 => ColorType::GrayscaleAlpha,
+ _ => {
+ error!("Unable to save PNG of {:?}", format);
+ return;
+ }
+ };
+ let w = BufWriter::new(File::create(path).unwrap());
+ let mut enc = Encoder::new(w, size.width as u32, size.height as u32);
+ enc.set_color(color_type);
+ enc.set_depth(BitDepth::Eight);
+ enc
+ .write_header()
+ .unwrap()
+ .write_image_data(&*data)
+ .unwrap();
+ }
+}
+
+/// An image that `ResourceCache` is unable to resolve during a capture.
+/// The image has to be transferred to `Renderer` and locked with the
+/// external image handler to get the actual contents and serialize them.
+#[derive(Deserialize, Serialize)]
+pub struct ExternalCaptureImage {
+ pub short_path: String,
+ pub descriptor: ImageDescriptor,
+ pub external: ExternalImageData,
+}
+
+/// A short description of an external image to be saved separately as
+/// "externals/XX.ron", redirecting into a specific texture/blob with
+/// the corresponding UV rectangle.
+#[derive(Deserialize, Serialize)]
+pub struct PlainExternalImage {
+ /// Path to the RON file describing the texel data.
+ pub data: String,
+ /// External image data source.
+ pub external: ExternalImageData,
+ /// UV sub-rectangle of the image.
+ pub uv: TexelRect,
+}
diff --git a/third_party/webrender/webrender/src/clip.rs b/third_party/webrender/webrender/src/clip.rs
new file mode 100644
index 00000000000..391170f0b08
--- /dev/null
+++ b/third_party/webrender/webrender/src/clip.rs
@@ -0,0 +1,1953 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! Internal representation of clips in WebRender.
+//!
+//! # Data structures
+//!
+//! There are a number of data structures involved in the clip module:
+//!
+//! - ClipStore - Main interface used by other modules.
+//!
+//! - ClipItem - A single clip item (e.g. a rounded rect, or a box shadow).
+//! These are an exposed API type, stored inline in a ClipNode.
+//!
+//! - ClipNode - A ClipItem with an attached GPU handle. The GPU handle is populated
+//! when a ClipNodeInstance is built from this node (which happens while
+//! preparing primitives for render).
+//!
+//! ClipNodeInstance - A ClipNode with attached positioning information (a spatial
+//! node index). This is stored as a contiguous array of nodes
+//! within the ClipStore.
+//!
+//! ```ascii
+//! +-----------------------+-----------------------+-----------------------+
+//! | ClipNodeInstance | ClipNodeInstance | ClipNodeInstance |
+//! +-----------------------+-----------------------+-----------------------+
+//! | ClipItem | ClipItem | ClipItem |
+//! | Spatial Node Index | Spatial Node Index | Spatial Node Index |
+//! | GPU cache handle | GPU cache handle | GPU cache handle |
+//! | ... | ... | ... |
+//! +-----------------------+-----------------------+-----------------------+
+//! 0 1 2
+//! +----------------+ | |
+//! | ClipNodeRange |____| |
+//! | index: 1 | |
+//! | count: 2 |___________________________________________________|
+//! +----------------+
+//! ```
+//!
+//! - ClipNodeRange - A clip item range identifies a range of clip nodes instances.
+//! It is stored as an (index, count).
+//!
+//! - ClipChainNode - A clip chain node contains a handle to an interned clip item,
+//! positioning information (from where the clip was defined), and
+//! an optional parent link to another ClipChainNode. ClipChainId
+//! is an index into an array, or ClipChainId::NONE for no parent.
+//!
+//! ```ascii
+//! +----------------+ ____+----------------+ ____+----------------+ /---> ClipChainId::NONE
+//! | ClipChainNode | | | ClipChainNode | | | ClipChainNode | |
+//! +----------------+ | +----------------+ | +----------------+ |
+//! | ClipDataHandle | | | ClipDataHandle | | | ClipDataHandle | |
+//! | Spatial index | | | Spatial index | | | Spatial index | |
+//! | Parent Id |___| | Parent Id |___| | Parent Id |___|
+//! | ... | | ... | | ... |
+//! +----------------+ +----------------+ +----------------+
+//! ```
+//!
+//! - ClipChainInstance - A ClipChain that has been built for a specific primitive + positioning node.
+//!
+//! When given a clip chain ID, and a local primitive rect and its spatial node, the clip module
+//! creates a clip chain instance. This is a struct with various pieces of useful information
+//! (such as a local clip rect). It also contains a (index, count)
+//! range specifier into an index buffer of the ClipNodeInstance structures that are actually relevant
+//! for this clip chain instance. The index buffer structure allows a single array to be used for
+//! all of the clip-chain instances built in a single frame. Each entry in the index buffer
+//! also stores some flags relevant to the clip node in this positioning context.
+//!
+//! ```ascii
+//! +----------------------+
+//! | ClipChainInstance |
+//! +----------------------+
+//! | ... |
+//! | local_clip_rect |________________________________________________________________________
+//! | clips_range |_______________ |
+//! +----------------------+ | |
+//! | |
+//! +------------------+------------------+------------------+------------------+------------------+
+//! | ClipNodeInstance | ClipNodeInstance | ClipNodeInstance | ClipNodeInstance | ClipNodeInstance |
+//! +------------------+------------------+------------------+------------------+------------------+
+//! | flags | flags | flags | flags | flags |
+//! | ... | ... | ... | ... | ... |
+//! +------------------+------------------+------------------+------------------+------------------+
+//! ```
+//!
+//! # Rendering clipped primitives
+//!
+//! See the [`segment` module documentation][segment.rs].
+//!
+//!
+//! [segment.rs]: ../segment/index.html
+//!
+
+use api::{BorderRadius, ClipIntern, ClipMode, ComplexClipRegion, ImageMask};
+use api::{BoxShadowClipMode, ClipId, ImageKey, ImageRendering, PipelineId};
+use api::units::*;
+use api::image_tiling::{self, Repetition};
+use crate::border::{ensure_no_corner_overlap, BorderRadiusAu};
+use crate::box_shadow::{BLUR_SAMPLE_SCALE, BoxShadowClipSource, BoxShadowCacheKey};
+use crate::spatial_tree::{ROOT_SPATIAL_NODE_INDEX, SpatialTree, SpatialNodeIndex, CoordinateSystemId};
+use crate::ellipse::Ellipse;
+use crate::gpu_cache::{GpuCache, GpuCacheHandle, ToGpuBlocks};
+use crate::gpu_types::{BoxShadowStretchMode};
+use crate::intern::{self, ItemUid};
+use crate::internal_types::{FastHashMap, FastHashSet};
+use crate::prim_store::{ClipData, ImageMaskData, SpaceMapper, VisibleMaskImageTile};
+use crate::prim_store::{PointKey, SizeKey, RectangleKey};
+use crate::render_task_cache::to_cache_size;
+use crate::resource_cache::{ImageRequest, ResourceCache};
+use crate::util::{extract_inner_rect_safe, project_rect, ScaleOffset};
+use euclid::approxeq::ApproxEq;
+use std::{iter, ops, u32};
+use smallvec::SmallVec;
+
+// Type definitions for interning clip nodes.
+
+pub type ClipDataStore = intern::DataStore<ClipIntern>;
+pub type ClipDataHandle = intern::Handle<ClipIntern>;
+
+/// Defines a clip that is positioned by a specific spatial node
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[derive(Copy, Clone)]
+pub struct ClipInstance {
+ /// Handle to the interned clip
+ pub handle: ClipDataHandle,
+ /// Positioning node for this clip
+ pub spatial_node_index: SpatialNodeIndex,
+}
+
+impl ClipInstance {
+ /// Construct a new positioned clip
+ pub fn new(
+ handle: ClipDataHandle,
+ spatial_node_index: SpatialNodeIndex,
+ ) -> Self {
+ ClipInstance {
+ handle,
+ spatial_node_index,
+ }
+ }
+}
+
+/// A clip template defines clips in terms of the public API. Specifically,
+/// this is a parent `ClipId` and some number of clip instances. See the
+/// CLIPPING_AND_POSITIONING.md document in doc/ for more information.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct ClipTemplate {
+ /// Parent of this clip, in terms of the public clip API
+ pub parent: ClipId,
+ /// List of instances that define this clip template
+ pub instances: SmallVec<[ClipInstance; 2]>,
+}
+
+/// A helper used during scene building to construct (internal) clip chains from
+/// the public API definitions (a hierarchy of ClipIds)
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct ClipChainBuilder {
+ /// The built clip chain id for this level of the stack
+ clip_chain_id: ClipChainId,
+ /// A list of parent clips in the current clip chain, to de-duplicate clips as
+ /// we build child chains from this level.
+ parent_clips: FastHashSet<(ItemUid, SpatialNodeIndex)>,
+ /// A cache used during building child clip chains. Retained here to avoid
+ /// extra memory allocations each time we build a clip.
+ existing_clips_cache: FastHashSet<(ItemUid, SpatialNodeIndex)>,
+ /// Cache the previous ClipId we built, since it's quite common to share clip
+ /// id between primitives.
+ prev_clip_id: ClipId,
+ prev_clip_chain_id: ClipChainId,
+}
+
+impl ClipChainBuilder {
+ /// Construct a new clip chain builder with specified parent clip chain. If
+ /// the clip_id is Some(..), the clips in that template will be added to the
+ /// clip chain at this level (this functionality isn't currently used, but will
+ /// be in the follow up patches).
+ fn new(
+ parent_clip_chain_id: ClipChainId,
+ clip_id: Option<ClipId>,
+ clip_chain_nodes: &mut Vec<ClipChainNode>,
+ templates: &FastHashMap<ClipId, ClipTemplate>,
+ ) -> Self {
+ let mut parent_clips = FastHashSet::default();
+
+ // Walk the current clip chain ID, building a set of existing clips
+ let mut current_clip_chain_id = parent_clip_chain_id;
+ while current_clip_chain_id != ClipChainId::NONE {
+ let clip_chain_node = &clip_chain_nodes[current_clip_chain_id.0 as usize];
+ parent_clips.insert((clip_chain_node.handle.uid(), clip_chain_node.spatial_node_index));
+ current_clip_chain_id = clip_chain_node.parent_clip_chain_id;
+ }
+
+ // If specified, add the clips from the supplied template to this builder
+ let clip_chain_id = match clip_id {
+ Some(clip_id) => {
+ ClipChainBuilder::add_new_clips_to_chain(
+ clip_id,
+ parent_clip_chain_id,
+ &mut parent_clips,
+ clip_chain_nodes,
+ templates,
+ )
+ }
+ None => {
+ ClipChainId::NONE
+ }
+ };
+
+ ClipChainBuilder {
+ clip_chain_id,
+ existing_clips_cache: parent_clips.clone(),
+ parent_clips,
+ prev_clip_id: ClipId::root(PipelineId::dummy()),
+ prev_clip_chain_id: ClipChainId::NONE,
+ }
+ }
+
+ /// Internal helper function that appends all clip instances from a template
+ /// to a clip-chain (if they don't already exist in this chain).
+ fn add_new_clips_to_chain(
+ clip_id: ClipId,
+ parent_clip_chain_id: ClipChainId,
+ existing_clips: &mut FastHashSet<(ItemUid, SpatialNodeIndex)>,
+ clip_chain_nodes: &mut Vec<ClipChainNode>,
+ templates: &FastHashMap<ClipId, ClipTemplate>,
+ ) -> ClipChainId {
+ let template = &templates[&clip_id];
+ let mut clip_chain_id = parent_clip_chain_id;
+
+ for clip in &template.instances {
+ let key = (clip.handle.uid(), clip.spatial_node_index);
+
+ // If this clip chain already has this clip instance, skip it
+ if existing_clips.contains(&key) {
+ continue;
+ }
+
+ // Create a new clip-chain entry for this instance
+ let new_clip_chain_id = ClipChainId(clip_chain_nodes.len() as u32);
+ existing_clips.insert(key);
+ clip_chain_nodes.push(ClipChainNode {
+ handle: clip.handle,
+ spatial_node_index: clip.spatial_node_index,
+ parent_clip_chain_id: clip_chain_id,
+ });
+ clip_chain_id = new_clip_chain_id;
+ }
+
+ // The ClipId parenting is terminated when we reach the root ClipId
+ if clip_id == template.parent {
+ return clip_chain_id;
+ }
+
+ ClipChainBuilder::add_new_clips_to_chain(
+ template.parent,
+ clip_chain_id,
+ existing_clips,
+ clip_chain_nodes,
+ templates,
+ )
+ }
+
+ /// This is the main method used to get a clip chain for a primitive. Given a
+ /// clip id, it builds a clip-chain for that primitive, parented to the current
+ /// root clip chain hosted in this builder.
+ fn get_or_build_clip_chain_id(
+ &mut self,
+ clip_id: ClipId,
+ clip_chain_nodes: &mut Vec<ClipChainNode>,
+ templates: &FastHashMap<ClipId, ClipTemplate>,
+ ) -> ClipChainId {
+ if self.prev_clip_id == clip_id {
+ return self.prev_clip_chain_id;
+ }
+
+ // Instead of cloning here, do a clear and manual insertions, to
+ // avoid any extra heap allocations each time we build a clip-chain here.
+ // Maybe there is a better way to do this?
+ self.existing_clips_cache.clear();
+ self.existing_clips_cache.reserve(self.parent_clips.len());
+ for clip in &self.parent_clips {
+ self.existing_clips_cache.insert(*clip);
+ }
+
+ let clip_chain_id = ClipChainBuilder::add_new_clips_to_chain(
+ clip_id,
+ self.clip_chain_id,
+ &mut self.existing_clips_cache,
+ clip_chain_nodes,
+ templates,
+ );
+
+ self.prev_clip_id = clip_id;
+ self.prev_clip_chain_id = clip_chain_id;
+
+ clip_chain_id
+ }
+}
+
+/// Helper to identify simple clips (normal rects) from other kinds of clips,
+/// which can often be handled via fast code paths.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Copy, Clone, MallocSizeOf)]
+pub enum ClipNodeKind {
+ /// A normal clip rectangle, with Clip mode.
+ Rectangle,
+ /// A rectangle with ClipOut, or any other kind of clip.
+ Complex,
+}
+
+// Result of comparing a clip node instance against a local rect.
+#[derive(Debug)]
+enum ClipResult {
+ // The clip does not affect the region at all.
+ Accept,
+ // The clip prevents the region from being drawn.
+ Reject,
+ // The clip affects part of the region. This may
+ // require a clip mask, depending on other factors.
+ Partial,
+}
+
+// A clip node is a single clip source, along with some
+// positioning information and implementation details
+// that control where the GPU data for this clip source
+// can be found.
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct ClipNode {
+ pub item: ClipItem,
+ pub gpu_cache_handle: GpuCacheHandle,
+}
+
+// Convert from an interning key for a clip item
+// to a clip node, which is cached in the document.
+impl From<ClipItemKey> for ClipNode {
+ fn from(item: ClipItemKey) -> Self {
+ let kind = match item.kind {
+ ClipItemKeyKind::Rectangle(rect, mode) => {
+ ClipItemKind::Rectangle { rect: rect.into(), mode }
+ }
+ ClipItemKeyKind::RoundedRectangle(rect, radius, mode) => {
+ ClipItemKind::RoundedRectangle {
+ rect: rect.into(),
+ radius: radius.into(),
+ mode,
+ }
+ }
+ ClipItemKeyKind::ImageMask(rect, image, repeat) => {
+ ClipItemKind::Image {
+ image,
+ rect: rect.into(),
+ repeat,
+ }
+ }
+ ClipItemKeyKind::BoxShadow(shadow_rect_fract_offset, shadow_rect_size, shadow_radius, prim_shadow_rect, blur_radius, clip_mode) => {
+ ClipItemKind::new_box_shadow(
+ shadow_rect_fract_offset.into(),
+ shadow_rect_size.into(),
+ shadow_radius.into(),
+ prim_shadow_rect.into(),
+ blur_radius.to_f32_px(),
+ clip_mode,
+ )
+ }
+ };
+
+ ClipNode {
+ item: ClipItem {
+ kind,
+ },
+ gpu_cache_handle: GpuCacheHandle::new(),
+ }
+ }
+}
+
+// Flags that are attached to instances of clip nodes.
+bitflags! {
+ #[cfg_attr(feature = "capture", derive(Serialize))]
+ #[cfg_attr(feature = "replay", derive(Deserialize))]
+ #[derive(MallocSizeOf)]
+ pub struct ClipNodeFlags: u8 {
+ const SAME_SPATIAL_NODE = 0x1;
+ const SAME_COORD_SYSTEM = 0x2;
+ const USE_FAST_PATH = 0x4;
+ }
+}
+
+// Identifier for a clip chain. Clip chains are stored
+// in a contiguous array in the clip store. They are
+// identified by a simple index into that array.
+#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct ClipChainId(pub u32);
+
+// The root of each clip chain is the NONE id. The
+// value is specifically set to u32::MAX so that if
+// any code accidentally tries to access the root
+// node, a bounds error will occur.
+impl ClipChainId {
+ pub const NONE: Self = ClipChainId(u32::MAX);
+ pub const INVALID: Self = ClipChainId(0xDEADBEEF);
+}
+
+// A clip chain node is an id for a range of clip sources,
+// and a link to a parent clip chain node, or ClipChainId::NONE.
+#[derive(Clone, Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct ClipChainNode {
+ pub handle: ClipDataHandle,
+ pub spatial_node_index: SpatialNodeIndex,
+ pub parent_clip_chain_id: ClipChainId,
+}
+
+// When a clip node is found to be valid for a
+// clip chain instance, it's stored in an index
+// buffer style structure. This struct contains
+// an index to the node data itself, as well as
+// some flags describing how this clip node instance
+// is positioned.
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ClipNodeInstance {
+ pub handle: ClipDataHandle,
+ pub spatial_node_index: SpatialNodeIndex,
+ pub flags: ClipNodeFlags,
+ pub visible_tiles: Option<Vec<VisibleMaskImageTile>>,
+}
+
+// A range of clip node instances that were found by
+// building a clip chain instance.
+#[derive(Debug, Copy, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ClipNodeRange {
+ pub first: u32,
+ pub count: u32,
+}
+
+impl ClipNodeRange {
+ pub fn to_range(&self) -> ops::Range<usize> {
+ let start = self.first as usize;
+ let end = start + self.count as usize;
+
+ ops::Range {
+ start,
+ end,
+ }
+ }
+}
+
+/// A helper struct for converting between coordinate systems
+/// of clip sources and primitives.
+// todo(gw): optimize:
+// separate arrays for matrices
+// cache and only build as needed.
+//TODO: merge with `CoordinateSpaceMapping`?
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+enum ClipSpaceConversion {
+ Local,
+ ScaleOffset(ScaleOffset),
+ Transform(LayoutToWorldTransform),
+}
+
+impl ClipSpaceConversion {
+ /// Construct a new clip space converter between two spatial nodes.
+ fn new(
+ prim_spatial_node_index: SpatialNodeIndex,
+ clip_spatial_node_index: SpatialNodeIndex,
+ spatial_tree: &SpatialTree,
+ ) -> Self {
+ //Note: this code is different from `get_relative_transform` in a way that we only try
+ // getting the relative transform if it's Local or ScaleOffset,
+ // falling back to the world transform otherwise.
+ let clip_spatial_node = &spatial_tree
+ .spatial_nodes[clip_spatial_node_index.0 as usize];
+ let prim_spatial_node = &spatial_tree
+ .spatial_nodes[prim_spatial_node_index.0 as usize];
+
+ if prim_spatial_node_index == clip_spatial_node_index {
+ ClipSpaceConversion::Local
+ } else if prim_spatial_node.coordinate_system_id == clip_spatial_node.coordinate_system_id {
+ let scale_offset = prim_spatial_node.content_transform
+ .inverse()
+ .accumulate(&clip_spatial_node.content_transform);
+ ClipSpaceConversion::ScaleOffset(scale_offset)
+ } else {
+ ClipSpaceConversion::Transform(
+ spatial_tree
+ .get_world_transform(clip_spatial_node_index)
+ .into_transform()
+ )
+ }
+ }
+
+ fn to_flags(&self) -> ClipNodeFlags {
+ match *self {
+ ClipSpaceConversion::Local => {
+ ClipNodeFlags::SAME_SPATIAL_NODE | ClipNodeFlags::SAME_COORD_SYSTEM
+ }
+ ClipSpaceConversion::ScaleOffset(..) => {
+ ClipNodeFlags::SAME_COORD_SYSTEM
+ }
+ ClipSpaceConversion::Transform(..) => {
+ ClipNodeFlags::empty()
+ }
+ }
+ }
+}
+
+// Temporary information that is cached and reused
+// during building of a clip chain instance.
+#[derive(MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+struct ClipNodeInfo {
+ conversion: ClipSpaceConversion,
+ handle: ClipDataHandle,
+ spatial_node_index: SpatialNodeIndex,
+}
+
+impl ClipNodeInfo {
+ fn create_instance(
+ &self,
+ node: &ClipNode,
+ clipped_rect: &LayoutRect,
+ gpu_cache: &mut GpuCache,
+ resource_cache: &mut ResourceCache,
+ spatial_tree: &SpatialTree,
+ request_resources: bool,
+ ) -> Option<ClipNodeInstance> {
+ // Calculate some flags that are required for the segment
+ // building logic.
+ let mut flags = self.conversion.to_flags();
+
+ // Some clip shaders support a fast path mode for simple clips.
+ // TODO(gw): We could also apply fast path when segments are created, since we only write
+ // the mask for a single corner at a time then, so can always consider radii uniform.
+ let is_raster_2d =
+ flags.contains(ClipNodeFlags::SAME_COORD_SYSTEM) ||
+ spatial_tree
+ .get_world_viewport_transform(self.spatial_node_index)
+ .is_2d_axis_aligned();
+ if is_raster_2d && node.item.kind.supports_fast_path_rendering() {
+ flags |= ClipNodeFlags::USE_FAST_PATH;
+ }
+
+ let mut visible_tiles = None;
+
+ if let ClipItemKind::Image { rect, image, repeat } = node.item.kind {
+ let request = ImageRequest {
+ key: image,
+ rendering: ImageRendering::Auto,
+ tile: None,
+ };
+
+ if let Some(props) = resource_cache.get_image_properties(image) {
+ if let Some(tile_size) = props.tiling {
+ let mut mask_tiles = Vec::new();
+
+ let visible_rect = if repeat {
+ *clipped_rect
+ } else {
+ clipped_rect.intersection(&rect).unwrap()
+ };
+
+ let repetitions = image_tiling::repetitions(
+ &rect,
+ &visible_rect,
+ rect.size,
+ );
+
+ for Repetition { origin, .. } in repetitions {
+ let layout_image_rect = LayoutRect {
+ origin,
+ size: rect.size,
+ };
+ let tiles = image_tiling::tiles(
+ &layout_image_rect,
+ &visible_rect,
+ &props.visible_rect,
+ tile_size as i32,
+ );
+ for tile in tiles {
+ if request_resources {
+ resource_cache.request_image(
+ request.with_tile(tile.offset),
+ gpu_cache,
+ );
+ }
+ mask_tiles.push(VisibleMaskImageTile {
+ tile_offset: tile.offset,
+ tile_rect: tile.rect,
+ });
+ }
+ }
+ visible_tiles = Some(mask_tiles);
+ } else if request_resources {
+ resource_cache.request_image(request, gpu_cache);
+ }
+ } else {
+ // If the supplied image key doesn't exist in the resource cache,
+ // skip the clip node since there is nothing to mask with.
+ warn!("Clip mask with missing image key {:?}", request.key);
+ return None;
+ }
+ }
+
+ Some(ClipNodeInstance {
+ handle: self.handle,
+ flags,
+ visible_tiles,
+ spatial_node_index: self.spatial_node_index,
+ })
+ }
+}
+
+impl ClipNode {
+ pub fn update(
+ &mut self,
+ gpu_cache: &mut GpuCache,
+ device_pixel_scale: DevicePixelScale,
+ ) {
+ match self.item.kind {
+ ClipItemKind::Image { rect, .. } => {
+ if let Some(request) = gpu_cache.request(&mut self.gpu_cache_handle) {
+ let data = ImageMaskData {
+ local_mask_size: rect.size,
+ };
+ data.write_gpu_blocks(request);
+ }
+ }
+ ClipItemKind::BoxShadow { ref mut source } => {
+ if let Some(mut request) = gpu_cache.request(&mut self.gpu_cache_handle) {
+ request.push([
+ source.original_alloc_size.width,
+ source.original_alloc_size.height,
+ source.clip_mode as i32 as f32,
+ 0.0,
+ ]);
+ request.push([
+ source.stretch_mode_x as i32 as f32,
+ source.stretch_mode_y as i32 as f32,
+ 0.0,
+ 0.0,
+ ]);
+ request.push(source.prim_shadow_rect);
+ }
+
+ // Quote from https://drafts.csswg.org/css-backgrounds-3/#shadow-blur
+ // "the image that would be generated by applying to the shadow a
+ // Gaussian blur with a standard deviation equal to half the blur radius."
+ let blur_radius_dp = source.blur_radius * 0.5;
+
+ // Create scaling from requested size to cache size.
+ let content_scale = LayoutToWorldScale::new(1.0) * device_pixel_scale;
+
+ // Create the cache key for this box-shadow render task.
+ let cache_size = to_cache_size(source.shadow_rect_alloc_size * content_scale);
+ let bs_cache_key = BoxShadowCacheKey {
+ blur_radius_dp: (blur_radius_dp * content_scale.0).round() as i32,
+ clip_mode: source.clip_mode,
+ original_alloc_size: (source.original_alloc_size * content_scale).round().to_i32(),
+ br_top_left: (source.shadow_radius.top_left * content_scale).round().to_i32(),
+ br_top_right: (source.shadow_radius.top_right * content_scale).round().to_i32(),
+ br_bottom_right: (source.shadow_radius.bottom_right * content_scale).round().to_i32(),
+ br_bottom_left: (source.shadow_radius.bottom_left * content_scale).round().to_i32(),
+ };
+
+ source.cache_key = Some((cache_size, bs_cache_key));
+
+ if let Some(mut request) = gpu_cache.request(&mut source.clip_data_handle) {
+ let data = ClipData::rounded_rect(
+ source.minimal_shadow_rect.size,
+ &source.shadow_radius,
+ ClipMode::Clip,
+ );
+
+ data.write(&mut request);
+ }
+ }
+ ClipItemKind::Rectangle { rect, mode } => {
+ if let Some(mut request) = gpu_cache.request(&mut self.gpu_cache_handle) {
+ let data = ClipData::uniform(rect.size, 0.0, mode);
+ data.write(&mut request);
+ }
+ }
+ ClipItemKind::RoundedRectangle { rect, ref radius, mode } => {
+ if let Some(mut request) = gpu_cache.request(&mut self.gpu_cache_handle) {
+ let data = ClipData::rounded_rect(rect.size, radius, mode);
+ data.write(&mut request);
+ }
+ }
+ }
+ }
+}
+
+/// The main clipping public interface that other modules access.
+#[derive(MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct ClipStore {
+ pub clip_chain_nodes: Vec<ClipChainNode>,
+ pub clip_node_instances: Vec<ClipNodeInstance>,
+
+ active_clip_node_info: Vec<ClipNodeInfo>,
+ active_local_clip_rect: Option<LayoutRect>,
+
+ // No malloc sizeof since it's not implemented for ops::Range, but these
+ // allocations are tiny anyway.
+
+ /// Map of all clip templates defined by the public API to templates
+ #[ignore_malloc_size_of = "range missing"]
+ templates: FastHashMap<ClipId, ClipTemplate>,
+
+ /// A stack of current clip-chain builders. A new clip-chain builder is
+ /// typically created each time a clip root (such as an iframe or stacking
+ /// context) is defined.
+ #[ignore_malloc_size_of = "range missing"]
+ chain_builder_stack: Vec<ClipChainBuilder>,
+}
+
+// A clip chain instance is what gets built for a given clip
+// chain id + local primitive region + positioning node.
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct ClipChainInstance {
+ pub clips_range: ClipNodeRange,
+ // Combined clip rect for clips that are in the
+ // same coordinate system as the primitive.
+ pub local_clip_rect: LayoutRect,
+ pub has_non_local_clips: bool,
+ // If true, this clip chain requires allocation
+ // of a clip mask.
+ pub needs_mask: bool,
+ // Combined clip rect in picture space (may
+ // be more conservative that local_clip_rect).
+ pub pic_clip_rect: PictureRect,
+ // Space, in which the `pic_clip_rect` is defined.
+ pub pic_spatial_node_index: SpatialNodeIndex,
+}
+
+impl ClipChainInstance {
+ pub fn empty() -> Self {
+ ClipChainInstance {
+ clips_range: ClipNodeRange {
+ first: 0,
+ count: 0,
+ },
+ local_clip_rect: LayoutRect::zero(),
+ has_non_local_clips: false,
+ needs_mask: false,
+ pic_clip_rect: PictureRect::zero(),
+ pic_spatial_node_index: ROOT_SPATIAL_NODE_INDEX,
+ }
+ }
+}
+
+/// Maintains a (flattened) list of clips for a given level in the surface level stack.
+pub struct ClipChainLevel {
+ /// These clips will be handled when compositing this surface into the parent,
+ /// and can thus be ignored on the primitives that are drawn as part of this surface.
+ shared_clips: Vec<ClipInstance>,
+
+ /// Index of the first element in ClipChainStack::clip that belongs to this level.
+ first_clip_index: usize,
+ /// Used to sanity check push/pop balance.
+ initial_clip_counts_len: usize,
+}
+
+/// Maintains a stack of clip chain ids that are currently active,
+/// when a clip exists on a picture that has no surface, and is passed
+/// on down to the child primitive(s).
+///
+///
+/// In order to avoid many small vector allocations, all clip chain ids are
+/// stored in a single vector instead of per-level.
+/// Since we only work with the top-most level of the stack, we only need to
+/// know the first index in the clips vector that belongs to each level. The
+/// last index for the top-most level is always the end of the clips array.
+///
+/// Likewise, we push several clip chain ids to the clips array at each
+/// push_clip, and the number of clip chain ids removed during pop_clip
+/// must match. This is done by having a separate stack of clip counts
+/// in the clip-stack rather than per-level to avoid vector allocations.
+///
+/// ```ascii
+/// +----+----+---
+/// levels: | | | ...
+/// +----+----+---
+/// |first \
+/// | \
+/// | \
+/// +--+--+--+--+--+--+--
+/// clips: | | | | | | | ...
+/// +--+--+--+--+--+--+--
+/// | / /
+/// | / /
+/// | / /
+/// +--+--+--+--
+/// clip_counts: | 1| 2| 2| ...
+/// +--+--+--+--
+/// ```
+pub struct ClipChainStack {
+ /// A stack of clip chain lists. Each time a new surface is pushed,
+ /// a new level is added. Each time a new picture without surface is
+ /// pushed, it adds the picture clip chain to the clips vector in the
+ /// range belonging to the level (always the top-most level, so always
+ /// at the end of the clips array).
+ levels: Vec<ClipChainLevel>,
+ /// The actual stack of clip ids.
+ clips: Vec<ClipChainId>,
+ /// How many clip ids to pop from the vector each time we call pop_clip.
+ clip_counts: Vec<usize>,
+}
+
+impl ClipChainStack {
+ pub fn new() -> Self {
+ ClipChainStack {
+ levels: vec![
+ ClipChainLevel {
+ shared_clips: Vec::new(),
+ first_clip_index: 0,
+ initial_clip_counts_len: 0,
+ }
+ ],
+ clips: Vec::new(),
+ clip_counts: Vec::new(),
+ }
+ }
+
+ /// Push a clip chain root onto the currently active list.
+ pub fn push_clip(
+ &mut self,
+ clip_chain_id: ClipChainId,
+ clip_store: &ClipStore,
+ ) {
+ let mut clip_count = 0;
+
+ let mut current_clip_chain_id = clip_chain_id;
+ while current_clip_chain_id != ClipChainId::NONE {
+ let clip_chain_node = &clip_store.clip_chain_nodes[current_clip_chain_id.0 as usize];
+ let clip_uid = clip_chain_node.handle.uid();
+
+ // The clip is required, so long as it doesn't exist in any of the shared_clips
+ // array from this or any parent surfaces.
+ // TODO(gw): We could consider making this a HashSet if it ever shows up in
+ // profiles, but the typical array length is 2-3 elements.
+ let mut valid_clip = true;
+ for level in &self.levels {
+ if level.shared_clips.iter().any(|instance| {
+ instance.handle.uid() == clip_uid &&
+ instance.spatial_node_index == clip_chain_node.spatial_node_index
+ }) {
+ valid_clip = false;
+ break;
+ }
+ }
+
+ if valid_clip {
+ self.clips.push(current_clip_chain_id);
+ clip_count += 1;
+ }
+
+ current_clip_chain_id = clip_chain_node.parent_clip_chain_id;
+ }
+
+ self.clip_counts.push(clip_count);
+ }
+
+ /// Pop a clip chain root from the currently active list.
+ pub fn pop_clip(&mut self) {
+ let count = self.clip_counts.pop().unwrap();
+ for _ in 0 .. count {
+ self.clips.pop().unwrap();
+ }
+ }
+
+ /// When a surface is created, it takes all clips and establishes a new
+ /// stack of clips to be propagated.
+ pub fn push_surface(
+ &mut self,
+ maybe_shared_clips: &[ClipInstance],
+ spatial_tree: &SpatialTree,
+ ) {
+ let mut shared_clips = Vec::new();
+
+ // If there are clips in the shared list for a picture cache, only include
+ // them if they are simple, axis-aligned clips (i.e. in the root coordinate
+ // system). This is necessary since when compositing picture cache tiles
+ // into the parent, we don't support applying a clip mask. This only ever
+ // occurs in wrench tests, not in display lists supplied by Gecko.
+ // TODO(gw): We can remove this when we update the WR API to have better
+ // knowledge of what coordinate system a clip must be in (by
+ // knowing if a reference frame exists in the chain between the
+ // clip's spatial node and the picture cache reference spatial node).
+ for clip in maybe_shared_clips {
+ let spatial_node = &spatial_tree.spatial_nodes[clip.spatial_node_index.0 as usize];
+ if spatial_node.coordinate_system_id == CoordinateSystemId::root() {
+ shared_clips.push(*clip);
+ }
+ }
+
+ let level = ClipChainLevel {
+ shared_clips: shared_clips.to_vec(),
+ first_clip_index: self.clips.len(),
+ initial_clip_counts_len: self.clip_counts.len(),
+ };
+
+ self.levels.push(level);
+ }
+
+ /// Pop a surface from the clip chain stack
+ pub fn pop_surface(&mut self) {
+ let level = self.levels.pop().unwrap();
+ assert!(self.clip_counts.len() == level.initial_clip_counts_len);
+ assert!(self.clips.len() == level.first_clip_index);
+ }
+
+ /// Get the list of currently active clip chains
+ pub fn current_clips_array(&self) -> &[ClipChainId] {
+ let first = self.levels.last().unwrap().first_clip_index;
+ &self.clips[first..]
+ }
+}
+
+impl ClipStore {
+ pub fn new() -> Self {
+ ClipStore {
+ clip_chain_nodes: Vec::new(),
+ clip_node_instances: Vec::new(),
+ active_clip_node_info: Vec::new(),
+ active_local_clip_rect: None,
+ templates: FastHashMap::default(),
+ chain_builder_stack: Vec::new(),
+ }
+ }
+
+ /// Register a new clip template for the clip_id defined in the display list.
+ pub fn register_clip_template(
+ &mut self,
+ clip_id: ClipId,
+ parent: ClipId,
+ instances: &[ClipInstance],
+ ) {
+ self.templates.insert(clip_id, ClipTemplate {
+ parent,
+ instances: instances.into(),
+ });
+ }
+
+ pub fn get_template(
+ &self,
+ clip_id: ClipId,
+ ) -> &ClipTemplate {
+ &self.templates[&clip_id]
+ }
+
+ /// The main method used to build a clip-chain for a given ClipId on a primitive
+ pub fn get_or_build_clip_chain_id(
+ &mut self,
+ clip_id: ClipId,
+ ) -> ClipChainId {
+ // TODO(gw): If many primitives reference the same ClipId, it might be worth
+ // maintaining a hash map cache of ClipId -> ClipChainId in each
+ // ClipChainBuilder
+
+ self.chain_builder_stack
+ .last_mut()
+ .unwrap()
+ .get_or_build_clip_chain_id(
+ clip_id,
+ &mut self.clip_chain_nodes,
+ &self.templates,
+ )
+ }
+
+ /// Push a new clip root. This is used at boundaries of clips (such as iframes
+ /// and stacking contexts). This means that any clips on the existing clip
+ /// chain builder will not be added to clip-chains defined within this level,
+ /// since the clips will be applied by the parent.
+ pub fn push_clip_root(
+ &mut self,
+ clip_id: Option<ClipId>,
+ link_to_parent: bool,
+ ) {
+ let parent_clip_chain_id = if link_to_parent {
+ self.chain_builder_stack.last().unwrap().clip_chain_id
+ } else {
+ ClipChainId::NONE
+ };
+
+ let builder = ClipChainBuilder::new(
+ parent_clip_chain_id,
+ clip_id,
+ &mut self.clip_chain_nodes,
+ &self.templates,
+ );
+
+ self.chain_builder_stack.push(builder);
+ }
+
+ /// On completion of a stacking context or iframe, pop the current clip root.
+ pub fn pop_clip_root(
+ &mut self,
+ ) {
+ self.chain_builder_stack.pop().unwrap();
+ }
+
+ pub fn get_clip_chain(&self, clip_chain_id: ClipChainId) -> &ClipChainNode {
+ &self.clip_chain_nodes[clip_chain_id.0 as usize]
+ }
+
+ pub fn add_clip_chain_node(
+ &mut self,
+ handle: ClipDataHandle,
+ spatial_node_index: SpatialNodeIndex,
+ parent_clip_chain_id: ClipChainId,
+ ) -> ClipChainId {
+ let id = ClipChainId(self.clip_chain_nodes.len() as u32);
+ self.clip_chain_nodes.push(ClipChainNode {
+ handle,
+ spatial_node_index,
+ parent_clip_chain_id,
+ });
+ id
+ }
+
+ pub fn get_instance_from_range(
+ &self,
+ node_range: &ClipNodeRange,
+ index: u32,
+ ) -> &ClipNodeInstance {
+ &self.clip_node_instances[(node_range.first + index) as usize]
+ }
+
+ /// Setup the active clip chains for building a clip chain instance.
+ pub fn set_active_clips(
+ &mut self,
+ local_prim_clip_rect: LayoutRect,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chains: &[ClipChainId],
+ spatial_tree: &SpatialTree,
+ clip_data_store: &ClipDataStore,
+ ) {
+ self.active_clip_node_info.clear();
+ self.active_local_clip_rect = None;
+
+ let mut local_clip_rect = local_prim_clip_rect;
+
+ for clip_chain_id in clip_chains {
+ let clip_chain_node = &self.clip_chain_nodes[clip_chain_id.0 as usize];
+
+ if !add_clip_node_to_current_chain(
+ clip_chain_node,
+ spatial_node_index,
+ &mut local_clip_rect,
+ &mut self.active_clip_node_info,
+ clip_data_store,
+ spatial_tree,
+ ) {
+ return;
+ }
+ }
+
+ self.active_local_clip_rect = Some(local_clip_rect);
+ }
+
+ /// Setup the active clip chains, based on an existing primitive clip chain instance.
+ pub fn set_active_clips_from_clip_chain(
+ &mut self,
+ prim_clip_chain: &ClipChainInstance,
+ prim_spatial_node_index: SpatialNodeIndex,
+ spatial_tree: &SpatialTree,
+ ) {
+ // TODO(gw): Although this does less work than set_active_clips(), it does
+ // still do some unnecessary work (such as the clip space conversion).
+ // We could consider optimizing this if it ever shows up in a profile.
+
+ self.active_clip_node_info.clear();
+ self.active_local_clip_rect = Some(prim_clip_chain.local_clip_rect);
+
+ let clip_instances = &self
+ .clip_node_instances[prim_clip_chain.clips_range.to_range()];
+ for clip_instance in clip_instances {
+ let conversion = ClipSpaceConversion::new(
+ prim_spatial_node_index,
+ clip_instance.spatial_node_index,
+ spatial_tree,
+ );
+ self.active_clip_node_info.push(ClipNodeInfo {
+ handle: clip_instance.handle,
+ spatial_node_index: clip_instance.spatial_node_index,
+ conversion,
+ });
+ }
+ }
+
+ /// The main interface external code uses. Given a local primitive, positioning
+ /// information, and a clip chain id, build an optimized clip chain instance.
+ pub fn build_clip_chain_instance(
+ &mut self,
+ local_prim_rect: LayoutRect,
+ prim_to_pic_mapper: &SpaceMapper<LayoutPixel, PicturePixel>,
+ pic_to_world_mapper: &SpaceMapper<PicturePixel, WorldPixel>,
+ spatial_tree: &SpatialTree,
+ gpu_cache: &mut GpuCache,
+ resource_cache: &mut ResourceCache,
+ device_pixel_scale: DevicePixelScale,
+ world_rect: &WorldRect,
+ clip_data_store: &mut ClipDataStore,
+ request_resources: bool,
+ is_chased: bool,
+ ) -> Option<ClipChainInstance> {
+ let local_clip_rect = match self.active_local_clip_rect {
+ Some(rect) => rect,
+ None => return None,
+ };
+ profile_scope!("build_clip_chain_instance");
+ if is_chased {
+ println!("\tbuilding clip chain instance with local rect {:?}", local_prim_rect);
+ }
+
+ let local_bounding_rect = local_prim_rect.intersection(&local_clip_rect)?;
+ let pic_clip_rect = prim_to_pic_mapper.map(&local_bounding_rect)?;
+ let world_clip_rect = pic_to_world_mapper.map(&pic_clip_rect)?;
+
+ // Now, we've collected all the clip nodes that *potentially* affect this
+ // primitive region, and reduced the size of the prim region as much as possible.
+
+ // Run through the clip nodes, and see which ones affect this prim region.
+
+ let first_clip_node_index = self.clip_node_instances.len() as u32;
+ let mut has_non_local_clips = false;
+ let mut needs_mask = false;
+
+ // For each potential clip node
+ for node_info in self.active_clip_node_info.drain(..) {
+ let node = &mut clip_data_store[node_info.handle];
+
+ // See how this clip affects the prim region.
+ let clip_result = match node_info.conversion {
+ ClipSpaceConversion::Local => {
+ node.item.kind.get_clip_result(&local_bounding_rect)
+ }
+ ClipSpaceConversion::ScaleOffset(ref scale_offset) => {
+ has_non_local_clips = true;
+ node.item.kind.get_clip_result(&scale_offset.unmap_rect(&local_bounding_rect))
+ }
+ ClipSpaceConversion::Transform(ref transform) => {
+ has_non_local_clips = true;
+ node.item.kind.get_clip_result_complex(
+ transform,
+ &world_clip_rect,
+ world_rect,
+ )
+ }
+ };
+
+ if is_chased {
+ println!("\t\tclip {:?}", node.item);
+ println!("\t\tflags {:?}, resulted in {:?}", node_info.conversion.to_flags(), clip_result);
+ }
+
+ match clip_result {
+ ClipResult::Accept => {
+ // Doesn't affect the primitive at all, so skip adding to list
+ }
+ ClipResult::Reject => {
+ // Completely clips the supplied prim rect
+ return None;
+ }
+ ClipResult::Partial => {
+ // Needs a mask -> add to clip node indices
+
+ // TODO(gw): Ensure this only runs once on each node per frame?
+ node.update(
+ gpu_cache,
+ device_pixel_scale,
+ );
+
+ // Create the clip node instance for this clip node
+ if let Some(instance) = node_info.create_instance(
+ node,
+ &local_bounding_rect,
+ gpu_cache,
+ resource_cache,
+ spatial_tree,
+ request_resources,
+ ) {
+ // As a special case, a partial accept of a clip rect that is
+ // in the same coordinate system as the primitive doesn't need
+ // a clip mask. Instead, it can be handled by the primitive
+ // vertex shader as part of the local clip rect. This is an
+ // important optimization for reducing the number of clip
+ // masks that are allocated on common pages.
+ needs_mask |= match node.item.kind {
+ ClipItemKind::Rectangle { mode: ClipMode::ClipOut, .. } |
+ ClipItemKind::RoundedRectangle { .. } |
+ ClipItemKind::Image { .. } |
+ ClipItemKind::BoxShadow { .. } => {
+ true
+ }
+
+ ClipItemKind::Rectangle { mode: ClipMode::Clip, .. } => {
+ !instance.flags.contains(ClipNodeFlags::SAME_COORD_SYSTEM)
+ }
+ };
+
+ // Store this in the index buffer for this clip chain instance.
+ self.clip_node_instances.push(instance);
+ }
+ }
+ }
+ }
+
+ // Get the range identifying the clip nodes in the index buffer.
+ let clips_range = ClipNodeRange {
+ first: first_clip_node_index,
+ count: self.clip_node_instances.len() as u32 - first_clip_node_index,
+ };
+
+ // Return a valid clip chain instance
+ Some(ClipChainInstance {
+ clips_range,
+ has_non_local_clips,
+ local_clip_rect,
+ pic_clip_rect,
+ pic_spatial_node_index: prim_to_pic_mapper.ref_spatial_node_index,
+ needs_mask,
+ })
+ }
+
+ pub fn clear_old_instances(&mut self) {
+ self.clip_node_instances.clear();
+ }
+}
+
+pub struct ComplexTranslateIter<I> {
+ source: I,
+ offset: LayoutVector2D,
+}
+
+impl<I: Iterator<Item = ComplexClipRegion>> Iterator for ComplexTranslateIter<I> {
+ type Item = ComplexClipRegion;
+ fn next(&mut self) -> Option<Self::Item> {
+ self.source
+ .next()
+ .map(|mut complex| {
+ complex.rect = complex.rect.translate(self.offset);
+ complex
+ })
+ }
+}
+
+#[derive(Clone, Debug)]
+pub struct ClipRegion<I> {
+ pub main: LayoutRect,
+ pub complex_clips: I,
+}
+
+impl<J> ClipRegion<ComplexTranslateIter<J>> {
+ pub fn create_for_clip_node(
+ rect: LayoutRect,
+ complex_clips: J,
+ reference_frame_relative_offset: &LayoutVector2D,
+ ) -> Self
+ where
+ J: Iterator<Item = ComplexClipRegion>
+ {
+ ClipRegion {
+ main: rect.translate(*reference_frame_relative_offset),
+ complex_clips: ComplexTranslateIter {
+ source: complex_clips,
+ offset: *reference_frame_relative_offset,
+ },
+ }
+ }
+}
+
+impl ClipRegion<Option<ComplexClipRegion>> {
+ pub fn create_for_clip_node_with_local_clip(
+ local_clip: &LayoutRect,
+ reference_frame_relative_offset: &LayoutVector2D
+ ) -> Self {
+ ClipRegion {
+ main: local_clip.translate(*reference_frame_relative_offset),
+ complex_clips: None,
+ }
+ }
+}
+
+// The ClipItemKey is a hashable representation of the contents
+// of a clip item. It is used during interning to de-duplicate
+// clip nodes between frames and display lists. This allows quick
+// comparison of clip node equality by handle, and also allows
+// the uploaded GPU cache handle to be retained between display lists.
+// TODO(gw): Maybe we should consider constructing these directly
+// in the DL builder?
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum ClipItemKeyKind {
+ Rectangle(RectangleKey, ClipMode),
+ RoundedRectangle(RectangleKey, BorderRadiusAu, ClipMode),
+ ImageMask(RectangleKey, ImageKey, bool),
+ BoxShadow(PointKey, SizeKey, BorderRadiusAu, RectangleKey, Au, BoxShadowClipMode),
+}
+
+impl ClipItemKeyKind {
+ pub fn rectangle(rect: LayoutRect, mode: ClipMode) -> Self {
+ ClipItemKeyKind::Rectangle(rect.into(), mode)
+ }
+
+ pub fn rounded_rect(rect: LayoutRect, mut radii: BorderRadius, mode: ClipMode) -> Self {
+ if radii.is_zero() {
+ ClipItemKeyKind::rectangle(rect, mode)
+ } else {
+ ensure_no_corner_overlap(&mut radii, rect.size);
+ ClipItemKeyKind::RoundedRectangle(
+ rect.into(),
+ radii.into(),
+ mode,
+ )
+ }
+ }
+
+ pub fn image_mask(image_mask: &ImageMask, mask_rect: LayoutRect) -> Self {
+ ClipItemKeyKind::ImageMask(
+ mask_rect.into(),
+ image_mask.image,
+ image_mask.repeat,
+ )
+ }
+
+ pub fn box_shadow(
+ shadow_rect: LayoutRect,
+ shadow_radius: BorderRadius,
+ prim_shadow_rect: LayoutRect,
+ blur_radius: f32,
+ clip_mode: BoxShadowClipMode,
+ ) -> Self {
+ // Get the fractional offsets required to match the
+ // source rect with a minimal rect.
+ let fract_offset = LayoutPoint::new(
+ shadow_rect.origin.x.fract().abs(),
+ shadow_rect.origin.y.fract().abs(),
+ );
+
+ ClipItemKeyKind::BoxShadow(
+ fract_offset.into(),
+ shadow_rect.size.into(),
+ shadow_radius.into(),
+ prim_shadow_rect.into(),
+ Au::from_f32_px(blur_radius),
+ clip_mode,
+ )
+ }
+
+ pub fn node_kind(&self) -> ClipNodeKind {
+ match *self {
+ ClipItemKeyKind::Rectangle(_, ClipMode::Clip) => ClipNodeKind::Rectangle,
+
+ ClipItemKeyKind::Rectangle(_, ClipMode::ClipOut) |
+ ClipItemKeyKind::RoundedRectangle(..) |
+ ClipItemKeyKind::ImageMask(..) |
+ ClipItemKeyKind::BoxShadow(..) => ClipNodeKind::Complex,
+ }
+ }
+}
+
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ClipItemKey {
+ pub kind: ClipItemKeyKind,
+}
+
+/// The data available about an interned clip node during scene building
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ClipInternData {
+ /// Whether this is a simple rectangle clip
+ pub clip_node_kind: ClipNodeKind,
+}
+
+impl intern::InternDebug for ClipItemKey {}
+
+impl intern::Internable for ClipIntern {
+ type Key = ClipItemKey;
+ type StoreData = ClipNode;
+ type InternData = ClipInternData;
+}
+
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum ClipItemKind {
+ Rectangle {
+ rect: LayoutRect,
+ mode: ClipMode,
+ },
+ RoundedRectangle {
+ rect: LayoutRect,
+ radius: BorderRadius,
+ mode: ClipMode,
+ },
+ Image {
+ image: ImageKey,
+ rect: LayoutRect,
+ repeat: bool,
+ },
+ BoxShadow {
+ source: BoxShadowClipSource,
+ },
+}
+
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ClipItem {
+ pub kind: ClipItemKind,
+}
+
+fn compute_box_shadow_parameters(
+ shadow_rect_fract_offset: LayoutPoint,
+ shadow_rect_size: LayoutSize,
+ mut shadow_radius: BorderRadius,
+ prim_shadow_rect: LayoutRect,
+ blur_radius: f32,
+ clip_mode: BoxShadowClipMode,
+) -> BoxShadowClipSource {
+ // Make sure corners don't overlap.
+ ensure_no_corner_overlap(&mut shadow_radius, shadow_rect_size);
+
+ let fract_size = LayoutSize::new(
+ shadow_rect_size.width.fract().abs(),
+ shadow_rect_size.height.fract().abs(),
+ );
+
+ // Create a minimal size primitive mask to blur. In this
+ // case, we ensure the size of each corner is the same,
+ // to simplify the shader logic that stretches the blurred
+ // result across the primitive.
+ let max_corner_width = shadow_radius.top_left.width
+ .max(shadow_radius.bottom_left.width)
+ .max(shadow_radius.top_right.width)
+ .max(shadow_radius.bottom_right.width);
+ let max_corner_height = shadow_radius.top_left.height
+ .max(shadow_radius.bottom_left.height)
+ .max(shadow_radius.top_right.height)
+ .max(shadow_radius.bottom_right.height);
+
+ // Get maximum distance that can be affected by given blur radius.
+ let blur_region = (BLUR_SAMPLE_SCALE * blur_radius).ceil();
+
+ // If the largest corner is smaller than the blur radius, we need to ensure
+ // that it's big enough that the corners don't affect the middle segments.
+ let used_corner_width = max_corner_width.max(blur_region);
+ let used_corner_height = max_corner_height.max(blur_region);
+
+ // Minimal nine-patch size, corner + internal + corner.
+ let min_shadow_rect_size = LayoutSize::new(
+ 2.0 * used_corner_width + blur_region,
+ 2.0 * used_corner_height + blur_region,
+ );
+
+ // The minimal rect to blur.
+ let mut minimal_shadow_rect = LayoutRect::new(
+ LayoutPoint::new(
+ blur_region + shadow_rect_fract_offset.x,
+ blur_region + shadow_rect_fract_offset.y,
+ ),
+ LayoutSize::new(
+ min_shadow_rect_size.width + fract_size.width,
+ min_shadow_rect_size.height + fract_size.height,
+ ),
+ );
+
+ // If the width or height ends up being bigger than the original
+ // primitive shadow rect, just blur the entire rect along that
+ // axis and draw that as a simple blit. This is necessary for
+ // correctness, since the blur of one corner may affect the blur
+ // in another corner.
+ let mut stretch_mode_x = BoxShadowStretchMode::Stretch;
+ if shadow_rect_size.width < minimal_shadow_rect.size.width {
+ minimal_shadow_rect.size.width = shadow_rect_size.width;
+ stretch_mode_x = BoxShadowStretchMode::Simple;
+ }
+
+ let mut stretch_mode_y = BoxShadowStretchMode::Stretch;
+ if shadow_rect_size.height < minimal_shadow_rect.size.height {
+ minimal_shadow_rect.size.height = shadow_rect_size.height;
+ stretch_mode_y = BoxShadowStretchMode::Simple;
+ }
+
+ // Expand the shadow rect by enough room for the blur to take effect.
+ let shadow_rect_alloc_size = LayoutSize::new(
+ 2.0 * blur_region + minimal_shadow_rect.size.width.ceil(),
+ 2.0 * blur_region + minimal_shadow_rect.size.height.ceil(),
+ );
+
+ BoxShadowClipSource {
+ original_alloc_size: shadow_rect_alloc_size,
+ shadow_rect_alloc_size,
+ shadow_radius,
+ prim_shadow_rect,
+ blur_radius,
+ clip_mode,
+ stretch_mode_x,
+ stretch_mode_y,
+ cache_handle: None,
+ cache_key: None,
+ clip_data_handle: GpuCacheHandle::new(),
+ minimal_shadow_rect,
+ }
+}
+
+impl ClipItemKind {
+ pub fn new_box_shadow(
+ shadow_rect_fract_offset: LayoutPoint,
+ shadow_rect_size: LayoutSize,
+ mut shadow_radius: BorderRadius,
+ prim_shadow_rect: LayoutRect,
+ blur_radius: f32,
+ clip_mode: BoxShadowClipMode,
+ ) -> Self {
+ let mut source = compute_box_shadow_parameters(
+ shadow_rect_fract_offset,
+ shadow_rect_size,
+ shadow_radius,
+ prim_shadow_rect,
+ blur_radius,
+ clip_mode,
+ );
+
+ fn needed_downscaling(source: &BoxShadowClipSource) -> Option<f32> {
+ // This size is fairly arbitrary, but it's the same as the size that
+ // we use to avoid caching big blurred stacking contexts.
+ //
+ // If you change it, ensure that the reftests
+ // box-shadow-large-blur-radius-* still hit the downscaling path,
+ // and that they render correctly.
+ const MAX_SIZE: f32 = 2048.;
+
+ let max_dimension =
+ source.shadow_rect_alloc_size.width.max(source.shadow_rect_alloc_size.height);
+
+ if max_dimension > MAX_SIZE {
+ Some(MAX_SIZE / max_dimension)
+ } else {
+ None
+ }
+ }
+
+ if let Some(downscale) = needed_downscaling(&source) {
+ shadow_radius.bottom_left.height *= downscale;
+ shadow_radius.bottom_left.width *= downscale;
+ shadow_radius.bottom_right.height *= downscale;
+ shadow_radius.bottom_right.width *= downscale;
+ shadow_radius.top_left.height *= downscale;
+ shadow_radius.top_left.width *= downscale;
+ shadow_radius.top_right.height *= downscale;
+ shadow_radius.top_right.width *= downscale;
+
+ let original_alloc_size = source.shadow_rect_alloc_size;
+
+ source = compute_box_shadow_parameters(
+ shadow_rect_fract_offset * downscale,
+ shadow_rect_size * downscale,
+ shadow_radius,
+ prim_shadow_rect,
+ blur_radius * downscale,
+ clip_mode,
+ );
+ source.original_alloc_size = original_alloc_size;
+ }
+ ClipItemKind::BoxShadow { source }
+ }
+
+ /// Returns true if this clip mask can run through the fast path
+ /// for the given clip item type.
+ ///
+ /// Note: this logic has to match `ClipBatcher::add` behavior.
+ fn supports_fast_path_rendering(&self) -> bool {
+ match *self {
+ ClipItemKind::Rectangle { .. } |
+ ClipItemKind::Image { .. } |
+ ClipItemKind::BoxShadow { .. } => {
+ false
+ }
+ ClipItemKind::RoundedRectangle { ref radius, .. } => {
+ // The rounded clip rect fast path shader can only work
+ // if the radii are uniform.
+ radius.is_uniform().is_some()
+ }
+ }
+ }
+
+ // Get an optional clip rect that a clip source can provide to
+ // reduce the size of a primitive region. This is typically
+ // used to eliminate redundant clips, and reduce the size of
+ // any clip mask that eventually gets drawn.
+ pub fn get_local_clip_rect(&self) -> Option<LayoutRect> {
+ match *self {
+ ClipItemKind::Rectangle { rect, mode: ClipMode::Clip } => Some(rect),
+ ClipItemKind::Rectangle { mode: ClipMode::ClipOut, .. } => None,
+ ClipItemKind::RoundedRectangle { rect, mode: ClipMode::Clip, .. } => Some(rect),
+ ClipItemKind::RoundedRectangle { mode: ClipMode::ClipOut, .. } => None,
+ ClipItemKind::Image { repeat, rect, .. } => {
+ if repeat {
+ None
+ } else {
+ Some(rect)
+ }
+ }
+ ClipItemKind::BoxShadow { .. } => None,
+ }
+ }
+
+ fn get_clip_result_complex(
+ &self,
+ transform: &LayoutToWorldTransform,
+ prim_world_rect: &WorldRect,
+ world_rect: &WorldRect,
+ ) -> ClipResult {
+ let visible_rect = match prim_world_rect.intersection(world_rect) {
+ Some(rect) => rect,
+ None => return ClipResult::Reject,
+ };
+
+ let (clip_rect, inner_rect, mode) = match *self {
+ ClipItemKind::Rectangle { rect, mode } => {
+ (rect, Some(rect), mode)
+ }
+ ClipItemKind::RoundedRectangle { rect, ref radius, mode } => {
+ let inner_clip_rect = extract_inner_rect_safe(&rect, radius);
+ (rect, inner_clip_rect, mode)
+ }
+ ClipItemKind::Image { rect, repeat: false, .. } => {
+ (rect, None, ClipMode::Clip)
+ }
+ ClipItemKind::Image { repeat: true, .. } |
+ ClipItemKind::BoxShadow { .. } => {
+ return ClipResult::Partial;
+ }
+ };
+
+ if let Some(ref inner_clip_rect) = inner_rect {
+ if let Some(()) = projected_rect_contains(inner_clip_rect, transform, &visible_rect) {
+ return match mode {
+ ClipMode::Clip => ClipResult::Accept,
+ ClipMode::ClipOut => ClipResult::Reject,
+ };
+ }
+ }
+
+ match mode {
+ ClipMode::Clip => {
+ let outer_clip_rect = match project_rect(
+ transform,
+ &clip_rect,
+ world_rect,
+ ) {
+ Some(outer_clip_rect) => outer_clip_rect,
+ None => return ClipResult::Partial,
+ };
+
+ match outer_clip_rect.intersection(prim_world_rect) {
+ Some(..) => {
+ ClipResult::Partial
+ }
+ None => {
+ ClipResult::Reject
+ }
+ }
+ }
+ ClipMode::ClipOut => ClipResult::Partial,
+ }
+ }
+
+ // Check how a given clip source affects a local primitive region.
+ fn get_clip_result(
+ &self,
+ prim_rect: &LayoutRect,
+ ) -> ClipResult {
+ match *self {
+ ClipItemKind::Rectangle { rect, mode: ClipMode::Clip } => {
+ if rect.contains_rect(prim_rect) {
+ return ClipResult::Accept;
+ }
+
+ match rect.intersection(prim_rect) {
+ Some(..) => {
+ ClipResult::Partial
+ }
+ None => {
+ ClipResult::Reject
+ }
+ }
+ }
+ ClipItemKind::Rectangle { rect, mode: ClipMode::ClipOut } => {
+ if rect.contains_rect(prim_rect) {
+ return ClipResult::Reject;
+ }
+
+ match rect.intersection(prim_rect) {
+ Some(_) => {
+ ClipResult::Partial
+ }
+ None => {
+ ClipResult::Accept
+ }
+ }
+ }
+ ClipItemKind::RoundedRectangle { rect, ref radius, mode: ClipMode::Clip } => {
+ // TODO(gw): Consider caching this in the ClipNode
+ // if it ever shows in profiles.
+ // TODO(gw): extract_inner_rect_safe is overly
+ // conservative for this code!
+ let inner_clip_rect = extract_inner_rect_safe(&rect, radius);
+ if let Some(inner_clip_rect) = inner_clip_rect {
+ if inner_clip_rect.contains_rect(prim_rect) {
+ return ClipResult::Accept;
+ }
+ }
+
+ match rect.intersection(prim_rect) {
+ Some(..) => {
+ ClipResult::Partial
+ }
+ None => {
+ ClipResult::Reject
+ }
+ }
+ }
+ ClipItemKind::RoundedRectangle { rect, ref radius, mode: ClipMode::ClipOut } => {
+ // TODO(gw): Consider caching this in the ClipNode
+ // if it ever shows in profiles.
+ // TODO(gw): extract_inner_rect_safe is overly
+ // conservative for this code!
+ let inner_clip_rect = extract_inner_rect_safe(&rect, radius);
+ if let Some(inner_clip_rect) = inner_clip_rect {
+ if inner_clip_rect.contains_rect(prim_rect) {
+ return ClipResult::Reject;
+ }
+ }
+
+ match rect.intersection(prim_rect) {
+ Some(_) => {
+ ClipResult::Partial
+ }
+ None => {
+ ClipResult::Accept
+ }
+ }
+ }
+ ClipItemKind::Image { rect, repeat, .. } => {
+ if repeat {
+ ClipResult::Partial
+ } else {
+ match rect.intersection(prim_rect) {
+ Some(..) => {
+ ClipResult::Partial
+ }
+ None => {
+ ClipResult::Reject
+ }
+ }
+ }
+ }
+ ClipItemKind::BoxShadow { .. } => {
+ ClipResult::Partial
+ }
+ }
+ }
+}
+
+/// Represents a local rect and a device space
+/// rectangles that are either outside or inside bounds.
+#[derive(Clone, Debug, PartialEq)]
+pub struct Geometry {
+ pub local_rect: LayoutRect,
+ pub device_rect: DeviceIntRect,
+}
+
+impl From<LayoutRect> for Geometry {
+ fn from(local_rect: LayoutRect) -> Self {
+ Geometry {
+ local_rect,
+ device_rect: DeviceIntRect::zero(),
+ }
+ }
+}
+
+pub fn rounded_rectangle_contains_point(
+ point: &LayoutPoint,
+ rect: &LayoutRect,
+ radii: &BorderRadius
+) -> bool {
+ if !rect.contains(*point) {
+ return false;
+ }
+
+ let top_left_center = rect.origin + radii.top_left.to_vector();
+ if top_left_center.x > point.x && top_left_center.y > point.y &&
+ !Ellipse::new(radii.top_left).contains(*point - top_left_center.to_vector()) {
+ return false;
+ }
+
+ let bottom_right_center = rect.bottom_right() - radii.bottom_right.to_vector();
+ if bottom_right_center.x < point.x && bottom_right_center.y < point.y &&
+ !Ellipse::new(radii.bottom_right).contains(*point - bottom_right_center.to_vector()) {
+ return false;
+ }
+
+ let top_right_center = rect.top_right() +
+ LayoutVector2D::new(-radii.top_right.width, radii.top_right.height);
+ if top_right_center.x < point.x && top_right_center.y > point.y &&
+ !Ellipse::new(radii.top_right).contains(*point - top_right_center.to_vector()) {
+ return false;
+ }
+
+ let bottom_left_center = rect.bottom_left() +
+ LayoutVector2D::new(radii.bottom_left.width, -radii.bottom_left.height);
+ if bottom_left_center.x > point.x && bottom_left_center.y < point.y &&
+ !Ellipse::new(radii.bottom_left).contains(*point - bottom_left_center.to_vector()) {
+ return false;
+ }
+
+ true
+}
+
+pub fn projected_rect_contains(
+ source_rect: &LayoutRect,
+ transform: &LayoutToWorldTransform,
+ target_rect: &WorldRect,
+) -> Option<()> {
+ let points = [
+ transform.transform_point2d(source_rect.origin)?,
+ transform.transform_point2d(source_rect.top_right())?,
+ transform.transform_point2d(source_rect.bottom_right())?,
+ transform.transform_point2d(source_rect.bottom_left())?,
+ ];
+ let target_points = [
+ target_rect.origin,
+ target_rect.top_right(),
+ target_rect.bottom_right(),
+ target_rect.bottom_left(),
+ ];
+ // iterate the edges of the transformed polygon
+ for (a, b) in points
+ .iter()
+ .cloned()
+ .zip(points[1..].iter().cloned().chain(iter::once(points[0])))
+ {
+ // If this edge is redundant, it's a weird, case, and we shouldn't go
+ // length in trying to take the fast path (e.g. when the whole rectangle is a point).
+ // If any of edges of the target rectangle crosses the edge, it's not completely
+ // inside our transformed polygon either.
+ if a.approx_eq(&b) || target_points.iter().any(|&c| (b - a).cross(c - a) < 0.0) {
+ return None
+ }
+ }
+
+ Some(())
+}
+
+
+// Add a clip node into the list of clips to be processed
+// for the current clip chain. Returns false if the clip
+// results in the entire primitive being culled out.
+fn add_clip_node_to_current_chain(
+ node: &ClipChainNode,
+ spatial_node_index: SpatialNodeIndex,
+ local_clip_rect: &mut LayoutRect,
+ clip_node_info: &mut Vec<ClipNodeInfo>,
+ clip_data_store: &ClipDataStore,
+ spatial_tree: &SpatialTree,
+) -> bool {
+ let clip_node = &clip_data_store[node.handle];
+
+ // Determine the most efficient way to convert between coordinate
+ // systems of the primitive and clip node.
+ let conversion = ClipSpaceConversion::new(
+ spatial_node_index,
+ node.spatial_node_index,
+ spatial_tree,
+ );
+
+ // If we can convert spaces, try to reduce the size of the region
+ // requested, and cache the conversion information for the next step.
+ if let Some(clip_rect) = clip_node.item.kind.get_local_clip_rect() {
+ match conversion {
+ ClipSpaceConversion::Local => {
+ *local_clip_rect = match local_clip_rect.intersection(&clip_rect) {
+ Some(rect) => rect,
+ None => return false,
+ };
+ }
+ ClipSpaceConversion::ScaleOffset(ref scale_offset) => {
+ let clip_rect = scale_offset.map_rect(&clip_rect);
+ *local_clip_rect = match local_clip_rect.intersection(&clip_rect) {
+ Some(rect) => rect,
+ None => return false,
+ };
+ }
+ ClipSpaceConversion::Transform(..) => {
+ // TODO(gw): In the future, we can reduce the size
+ // of the pic_clip_rect here. To do this,
+ // we can use project_rect or the
+ // inverse_rect_footprint method, depending
+ // on the relationship of the clip, pic
+ // and primitive spatial nodes.
+ // I have left this for now until we
+ // find some good test cases where this
+ // would be a worthwhile perf win.
+ }
+ }
+ }
+
+ clip_node_info.push(ClipNodeInfo {
+ conversion,
+ spatial_node_index: node.spatial_node_index,
+ handle: node.handle,
+ });
+
+ true
+}
+
+#[cfg(test)]
+mod tests {
+ use super::projected_rect_contains;
+ use euclid::{Transform3D, rect};
+
+ #[test]
+ fn test_empty_projected_rect() {
+ assert_eq!(
+ None,
+ projected_rect_contains(
+ &rect(10.0, 10.0, 0.0, 0.0),
+ &Transform3D::identity(),
+ &rect(20.0, 20.0, 10.0, 10.0),
+ ),
+ "Empty rectangle is considered to include a non-empty!"
+ );
+ }
+}
diff --git a/third_party/webrender/webrender/src/composite.rs b/third_party/webrender/webrender/src/composite.rs
new file mode 100644
index 00000000000..bdc11097689
--- /dev/null
+++ b/third_party/webrender/webrender/src/composite.rs
@@ -0,0 +1,1007 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{ColorF, YuvColorSpace, YuvFormat, ImageRendering};
+use api::units::{DeviceRect, DeviceIntSize, DeviceIntRect, DeviceIntPoint, WorldRect};
+use api::units::{DevicePixelScale, DevicePoint, PictureRect, TexelRect};
+use crate::batch::{resolve_image, get_buffer_kind};
+use crate::gpu_cache::GpuCache;
+use crate::gpu_types::{ZBufferId, ZBufferIdGenerator};
+use crate::internal_types::TextureSource;
+use crate::picture::{ImageDependency, ResolvedSurfaceTexture, TileCacheInstance, TileId, TileSurface};
+use crate::prim_store::DeferredResolve;
+use crate::renderer::ImageBufferKind;
+use crate::resource_cache::{ImageRequest, ResourceCache};
+use std::{ops, u64};
+
+/*
+ Types and definitions related to compositing picture cache tiles
+ and/or OS compositor integration.
+ */
+
+/// Describes details of an operation to apply to a native surface
+#[derive(Debug, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum NativeSurfaceOperationDetails {
+ CreateSurface {
+ id: NativeSurfaceId,
+ virtual_offset: DeviceIntPoint,
+ tile_size: DeviceIntSize,
+ is_opaque: bool,
+ },
+ DestroySurface {
+ id: NativeSurfaceId,
+ },
+ CreateTile {
+ id: NativeTileId,
+ },
+ DestroyTile {
+ id: NativeTileId,
+ }
+}
+
+/// Describes an operation to apply to a native surface
+#[derive(Debug, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct NativeSurfaceOperation {
+ pub details: NativeSurfaceOperationDetails,
+}
+
+/// Describes the source surface information for a tile to be composited. This
+/// is the analog of the TileSurface type, with target surface information
+/// resolved such that it can be used by the renderer.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum CompositeTileSurface {
+ Texture {
+ surface: ResolvedSurfaceTexture,
+ },
+ Color {
+ color: ColorF,
+ },
+ Clear,
+ ExternalSurface {
+ external_surface_index: ResolvedExternalSurfaceIndex,
+ },
+}
+
+/// The surface format for a tile being composited.
+#[derive(Debug, Copy, Clone, PartialEq)]
+pub enum CompositeSurfaceFormat {
+ Rgba,
+ Yuv,
+}
+
+/// Describes the geometry and surface of a tile to be composited
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct CompositeTile {
+ pub surface: CompositeTileSurface,
+ pub rect: DeviceRect,
+ pub clip_rect: DeviceRect,
+ pub dirty_rect: DeviceRect,
+ pub valid_rect: DeviceRect,
+ pub z_id: ZBufferId,
+}
+
+pub enum ExternalSurfaceDependency {
+ Yuv {
+ image_dependencies: [ImageDependency; 3],
+ color_space: YuvColorSpace,
+ format: YuvFormat,
+ rescale: f32,
+ },
+ Rgb {
+ image_dependency: ImageDependency,
+ flip_y: bool,
+ },
+}
+
+/// Describes information about drawing a primitive as a compositor surface.
+/// For now, we support only YUV images as compositor surfaces, but in future
+/// this will also support RGBA images.
+pub struct ExternalSurfaceDescriptor {
+ pub local_rect: PictureRect,
+ pub world_rect: WorldRect,
+ pub device_rect: DeviceRect,
+ pub local_clip_rect: PictureRect,
+ pub clip_rect: DeviceRect,
+ pub image_rendering: ImageRendering,
+ pub z_id: ZBufferId,
+ pub dependency: ExternalSurfaceDependency,
+ /// If native compositing is enabled, the native compositor surface handle.
+ /// Otherwise, this will be None
+ pub native_surface_id: Option<NativeSurfaceId>,
+ /// If the native surface needs to be updated, this will contain the size
+ /// of the native surface as Some(size). If not dirty, this is None.
+ pub update_params: Option<DeviceIntSize>,
+}
+
+/// Information about a plane in a YUV or RGB surface.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Copy, Clone)]
+pub struct ExternalPlaneDescriptor {
+ pub texture: TextureSource,
+ pub texture_layer: i32,
+ pub uv_rect: TexelRect,
+}
+
+impl ExternalPlaneDescriptor {
+ fn invalid() -> Self {
+ ExternalPlaneDescriptor {
+ texture: TextureSource::Invalid,
+ texture_layer: 0,
+ uv_rect: TexelRect::invalid(),
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Copy, Clone)]
+pub struct ResolvedExternalSurfaceIndex(pub usize);
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum ResolvedExternalSurfaceColorData {
+ Yuv {
+ // YUV specific information
+ image_dependencies: [ImageDependency; 3],
+ planes: [ExternalPlaneDescriptor; 3],
+ color_space: YuvColorSpace,
+ format: YuvFormat,
+ rescale: f32,
+ },
+ Rgb {
+ image_dependency: ImageDependency,
+ plane: ExternalPlaneDescriptor,
+ flip_y: bool,
+ },
+}
+
+/// An ExternalSurfaceDescriptor that has had image keys
+/// resolved to texture handles. This contains all the
+/// information that the compositor step in renderer
+/// needs to know.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ResolvedExternalSurface {
+ pub color_data: ResolvedExternalSurfaceColorData,
+ pub image_buffer_kind: ImageBufferKind,
+ // Update information for a native surface if it's dirty
+ pub update_params: Option<(NativeSurfaceId, DeviceIntSize)>,
+}
+
+/// Public interface specified in `RendererOptions` that configures
+/// how WR compositing will operate.
+pub enum CompositorConfig {
+ /// Let WR draw tiles via normal batching. This requires no special OS support.
+ Draw {
+ /// If this is zero, a full screen present occurs at the end of the
+ /// frame. This is the simplest and default mode. If this is non-zero,
+ /// then the operating system supports a form of 'partial present' where
+ /// only dirty regions of the framebuffer need to be updated.
+ max_partial_present_rects: usize,
+ /// If this is true, WR would draw the previous frame's dirty region when
+ /// doing a partial present. This is used for EGL which requires the front
+ /// buffer to always be fully consistent.
+ draw_previous_partial_present_regions: bool,
+ },
+ /// Use a native OS compositor to draw tiles. This requires clients to implement
+ /// the Compositor trait, but can be significantly more power efficient on operating
+ /// systems that support it.
+ Native {
+ /// The maximum number of dirty rects that can be provided per compositor
+ /// surface update. If this is zero, the entire compositor surface for
+ /// a given tile will be drawn if it's dirty.
+ max_update_rects: usize,
+ /// A client provided interface to a native / OS compositor.
+ compositor: Box<dyn Compositor>,
+ }
+}
+
+impl CompositorConfig {
+ pub fn compositor(&mut self) -> Option<&mut Box<dyn Compositor>> {
+ match self {
+ CompositorConfig::Native { ref mut compositor, .. } => {
+ Some(compositor)
+ }
+ CompositorConfig::Draw { .. } => {
+ None
+ }
+ }
+ }
+}
+
+impl Default for CompositorConfig {
+ /// Default compositor config is full present without partial present.
+ fn default() -> Self {
+ CompositorConfig::Draw {
+ max_partial_present_rects: 0,
+ draw_previous_partial_present_regions: false,
+ }
+ }
+}
+
+/// This is a representation of `CompositorConfig` without the `Compositor` trait
+/// present. This allows it to be freely copied to other threads, such as the render
+/// backend where the frame builder can access it.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Copy, Clone, PartialEq)]
+pub enum CompositorKind {
+ /// WR handles compositing via drawing.
+ Draw {
+ /// Partial present support.
+ max_partial_present_rects: usize,
+ /// Draw previous regions when doing partial present.
+ draw_previous_partial_present_regions: bool,
+ },
+ /// Native OS compositor.
+ Native {
+ /// Maximum dirty rects per compositor surface.
+ max_update_rects: usize,
+ /// The virtual surface size used by underlying platform.
+ virtual_surface_size: i32,
+ },
+}
+
+impl Default for CompositorKind {
+ /// Default compositor config is full present without partial present.
+ fn default() -> Self {
+ CompositorKind::Draw {
+ max_partial_present_rects: 0,
+ draw_previous_partial_present_regions: false,
+ }
+ }
+}
+
+impl CompositorKind {
+ pub fn get_virtual_surface_size(&self) -> i32 {
+ match self {
+ CompositorKind::Draw { .. } => 0,
+ CompositorKind::Native { virtual_surface_size, .. } => *virtual_surface_size,
+ }
+ }
+}
+
+/// Information about an opaque surface used to occlude tiles.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct Occluder {
+ z_id: ZBufferId,
+ device_rect: DeviceIntRect,
+}
+
+/// The backing surface kind for a tile. Same as `TileSurface`, minus
+/// the texture cache handles, visibility masks etc.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(PartialEq, Clone)]
+pub enum TileSurfaceKind {
+ Texture,
+ Color {
+ color: ColorF,
+ },
+ Clear,
+}
+
+impl From<&TileSurface> for TileSurfaceKind {
+ fn from(surface: &TileSurface) -> Self {
+ match surface {
+ TileSurface::Texture { .. } => TileSurfaceKind::Texture,
+ TileSurface::Color { color } => TileSurfaceKind::Color { color: *color },
+ TileSurface::Clear => TileSurfaceKind::Clear,
+ }
+ }
+}
+
+/// Describes properties that identify a tile composition uniquely.
+/// The backing surface for this tile.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(PartialEq, Clone)]
+pub struct CompositeTileDescriptor {
+ pub tile_id: TileId,
+ pub surface_kind: TileSurfaceKind,
+}
+
+/// Describes the properties that identify a surface composition uniquely.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(PartialEq, Clone)]
+pub struct CompositeSurfaceDescriptor {
+ pub surface_id: Option<NativeSurfaceId>,
+ pub offset: DevicePoint,
+ pub clip_rect: DeviceRect,
+ // A list of image keys and generations that this compositor surface
+ // depends on. This avoids composites being skipped when the only
+ // thing that has changed is the generation of an compositor surface
+ // image dependency.
+ pub image_dependencies: [ImageDependency; 3],
+ // List of the surface information for each tile added to this virtual surface
+ pub tile_descriptors: Vec<CompositeTileDescriptor>,
+}
+
+/// Describes surface properties used to composite a frame. This
+/// is used to compare compositions between frames.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(PartialEq, Clone)]
+pub struct CompositeDescriptor {
+ pub surfaces: Vec<CompositeSurfaceDescriptor>,
+}
+
+impl CompositeDescriptor {
+ /// Construct an empty descriptor.
+ pub fn empty() -> Self {
+ CompositeDescriptor {
+ surfaces: Vec::new(),
+ }
+ }
+}
+
+/// The list of tiles to be drawn this frame
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct CompositeState {
+ // TODO(gw): Consider splitting up CompositeState into separate struct types depending
+ // on the selected compositing mode. Many of the fields in this state struct
+ // are only applicable to either Native or Draw compositing mode.
+ /// List of opaque tiles to be drawn by the Draw compositor.
+ pub opaque_tiles: Vec<CompositeTile>,
+ /// List of alpha tiles to be drawn by the Draw compositor.
+ pub alpha_tiles: Vec<CompositeTile>,
+ /// List of clear tiles to be drawn by the Draw compositor.
+ pub clear_tiles: Vec<CompositeTile>,
+ /// List of primitives that were promoted to be compositor surfaces.
+ pub external_surfaces: Vec<ResolvedExternalSurface>,
+ /// Used to generate z-id values for tiles in the Draw compositor mode.
+ pub z_generator: ZBufferIdGenerator,
+ // If false, we can't rely on the dirty rects in the CompositeTile
+ // instances. This currently occurs during a scroll event, as a
+ // signal to refresh the whole screen. This is only a temporary
+ // measure until we integrate with OS compositors. In the meantime
+ // it gives us the ability to partial present for any non-scroll
+ // case as a simple win (e.g. video, animation etc).
+ pub dirty_rects_are_valid: bool,
+ /// The kind of compositor for picture cache tiles (e.g. drawn by WR, or OS compositor)
+ pub compositor_kind: CompositorKind,
+ /// Picture caching may be disabled dynamically, based on debug flags, pinch zoom etc.
+ pub picture_caching_is_enabled: bool,
+ /// The overall device pixel scale, used for tile occlusion conversions.
+ global_device_pixel_scale: DevicePixelScale,
+ /// List of registered occluders
+ occluders: Vec<Occluder>,
+ /// Description of the surfaces and properties that are being composited.
+ pub descriptor: CompositeDescriptor,
+}
+
+impl CompositeState {
+ /// Construct a new state for compositing picture tiles. This is created
+ /// during each frame construction and passed to the renderer.
+ pub fn new(
+ compositor_kind: CompositorKind,
+ mut picture_caching_is_enabled: bool,
+ global_device_pixel_scale: DevicePixelScale,
+ max_depth_ids: i32,
+ ) -> Self {
+ // The native compositor interface requires picture caching to work, so
+ // force it here and warn if it was disabled.
+ if let CompositorKind::Native { .. } = compositor_kind {
+ if !picture_caching_is_enabled {
+ warn!("Picture caching cannot be disabled in native compositor config");
+ }
+ picture_caching_is_enabled = true;
+ }
+
+ CompositeState {
+ opaque_tiles: Vec::new(),
+ alpha_tiles: Vec::new(),
+ clear_tiles: Vec::new(),
+ z_generator: ZBufferIdGenerator::new(0, max_depth_ids),
+ dirty_rects_are_valid: true,
+ compositor_kind,
+ picture_caching_is_enabled,
+ global_device_pixel_scale,
+ occluders: Vec::new(),
+ descriptor: CompositeDescriptor::empty(),
+ external_surfaces: Vec::new(),
+ }
+ }
+
+ /// Register an occluder during picture cache updates that can be
+ /// used during frame building to occlude tiles.
+ pub fn register_occluder(
+ &mut self,
+ z_id: ZBufferId,
+ rect: WorldRect,
+ ) {
+ let device_rect = (rect * self.global_device_pixel_scale).round().to_i32();
+
+ self.occluders.push(Occluder {
+ device_rect,
+ z_id,
+ });
+ }
+
+ /// Returns true if a tile with the specified rectangle and z_id
+ /// is occluded by an opaque surface in front of it.
+ pub fn is_tile_occluded(
+ &self,
+ z_id: ZBufferId,
+ device_rect: DeviceRect,
+ ) -> bool {
+ // It's often the case that a tile is only occluded by considering multiple
+ // picture caches in front of it (for example, the background tiles are
+ // often occluded by a combination of the content slice + the scrollbar slices).
+
+ // The basic algorithm is:
+ // For every occluder:
+ // If this occluder is in front of the tile we are querying:
+ // Clip the occluder rectangle to the query rectangle.
+ // Calculate the total non-overlapping area of those clipped occluders.
+ // If the cumulative area of those occluders is the same as the area of the query tile,
+ // Then the entire tile must be occluded and can be skipped during rasterization and compositing.
+
+ // Get the reference area we will compare against.
+ let device_rect = device_rect.round().to_i32();
+ let ref_area = device_rect.size.width * device_rect.size.height;
+
+ // Calculate the non-overlapping area of the valid occluders.
+ let cover_area = area_of_occluders(&self.occluders, z_id, &device_rect);
+ debug_assert!(cover_area <= ref_area);
+
+ // Check if the tile area is completely covered
+ ref_area == cover_area
+ }
+
+ /// Add a picture cache to be composited
+ pub fn push_surface(
+ &mut self,
+ tile_cache: &TileCacheInstance,
+ device_clip_rect: DeviceRect,
+ global_device_pixel_scale: DevicePixelScale,
+ resource_cache: &ResourceCache,
+ gpu_cache: &mut GpuCache,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+ ) {
+ let mut visible_opaque_tile_count = 0;
+ let mut visible_alpha_tile_count = 0;
+ let mut opaque_tile_descriptors = Vec::new();
+ let mut alpha_tile_descriptors = Vec::new();
+
+ for tile in tile_cache.tiles.values() {
+ if !tile.is_visible {
+ // This can occur when a tile is found to be occluded during frame building.
+ continue;
+ }
+
+ let device_rect = (tile.world_tile_rect * global_device_pixel_scale).round();
+ let surface = tile.surface.as_ref().expect("no tile surface set!");
+
+ let descriptor = CompositeTileDescriptor {
+ surface_kind: surface.into(),
+ tile_id: tile.id,
+ };
+
+ let (surface, is_opaque) = match surface {
+ TileSurface::Color { color } => {
+ (CompositeTileSurface::Color { color: *color }, true)
+ }
+ TileSurface::Clear => {
+ (CompositeTileSurface::Clear, false)
+ }
+ TileSurface::Texture { descriptor, .. } => {
+ let surface = descriptor.resolve(resource_cache, tile_cache.current_tile_size);
+ (
+ CompositeTileSurface::Texture { surface },
+ // If a tile has compositor surface intersecting with it, we need to
+ // respect the tile.is_opaque property even if the overall tile cache
+ // is opaque. In this case, the tile.is_opaque property is required
+ // in order to ensure correct draw order with compositor surfaces.
+ tile.is_opaque || (!tile.has_compositor_surface && tile_cache.is_opaque()),
+ )
+ }
+ };
+
+ if is_opaque {
+ opaque_tile_descriptors.push(descriptor);
+ visible_opaque_tile_count += 1;
+ } else {
+ alpha_tile_descriptors.push(descriptor);
+ visible_alpha_tile_count += 1;
+ }
+
+ let tile = CompositeTile {
+ surface,
+ rect: device_rect,
+ valid_rect: tile.device_valid_rect.translate(-device_rect.origin.to_vector()),
+ dirty_rect: tile.device_dirty_rect.translate(-device_rect.origin.to_vector()),
+ clip_rect: device_clip_rect,
+ z_id: tile.z_id,
+ };
+
+ self.push_tile(tile, is_opaque);
+ }
+
+ // Sort the tile descriptor lists, since iterating values in the tile_cache.tiles
+ // hashmap doesn't provide any ordering guarantees, but we want to detect the
+ // composite descriptor as equal if the tiles list is the same, regardless of
+ // ordering.
+ opaque_tile_descriptors.sort_by_key(|desc| desc.tile_id);
+ alpha_tile_descriptors.sort_by_key(|desc| desc.tile_id);
+
+ // Add opaque surface before any compositor surfaces
+ if visible_opaque_tile_count > 0 {
+ self.descriptor.surfaces.push(
+ CompositeSurfaceDescriptor {
+ surface_id: tile_cache.native_surface.as_ref().map(|s| s.opaque),
+ offset: tile_cache.device_position,
+ clip_rect: device_clip_rect,
+ image_dependencies: [ImageDependency::INVALID; 3],
+ tile_descriptors: opaque_tile_descriptors,
+ }
+ );
+ }
+
+ // For each compositor surface that was promoted, build the
+ // information required for the compositor to draw it
+ for external_surface in &tile_cache.external_surfaces {
+
+ let mut planes = [
+ ExternalPlaneDescriptor::invalid(),
+ ExternalPlaneDescriptor::invalid(),
+ ExternalPlaneDescriptor::invalid(),
+ ];
+
+ // Step through the image keys, and build a plane descriptor for each
+ let required_plane_count =
+ match external_surface.dependency {
+ ExternalSurfaceDependency::Yuv { format, .. } => {
+ format.get_plane_num()
+ },
+ ExternalSurfaceDependency::Rgb { .. } => {
+ 1
+ }
+ };
+ let mut valid_plane_count = 0;
+
+ let mut image_dependencies = [ImageDependency::INVALID; 3];
+
+ for i in 0 .. required_plane_count {
+ let dependency = match external_surface.dependency {
+ ExternalSurfaceDependency::Yuv { image_dependencies, .. } => {
+ image_dependencies[i]
+ },
+ ExternalSurfaceDependency::Rgb { image_dependency, .. } => {
+ image_dependency
+ }
+ };
+ image_dependencies[i] = dependency;
+
+ let request = ImageRequest {
+ key: dependency.key,
+ rendering: external_surface.image_rendering,
+ tile: None,
+ };
+
+ let cache_item = resolve_image(
+ request,
+ resource_cache,
+ gpu_cache,
+ deferred_resolves,
+ );
+
+ if cache_item.texture_id != TextureSource::Invalid {
+ valid_plane_count += 1;
+ let plane = &mut planes[i];
+ *plane = ExternalPlaneDescriptor {
+ texture: cache_item.texture_id,
+ texture_layer: cache_item.texture_layer,
+ uv_rect: cache_item.uv_rect.into(),
+ };
+ }
+ }
+
+ // Check if there are valid images added for each YUV plane
+ if valid_plane_count < required_plane_count {
+ warn!("Warnings: skip a YUV/RGB compositor surface, found {}/{} valid images",
+ valid_plane_count,
+ required_plane_count,
+ );
+ continue;
+ }
+
+ let clip_rect = external_surface
+ .clip_rect
+ .intersection(&device_clip_rect)
+ .unwrap_or_else(DeviceRect::zero);
+
+ // Get a new z_id for each compositor surface, to ensure correct ordering
+ // when drawing with the simple (Draw) compositor.
+
+ let surface = CompositeTileSurface::ExternalSurface {
+ external_surface_index: ResolvedExternalSurfaceIndex(self.external_surfaces.len()),
+ };
+
+ // If the external surface descriptor reports that the native surface
+ // needs to be updated, create an update params tuple for the renderer
+ // to use.
+ let update_params = external_surface.update_params.map(|surface_size| {
+ (
+ external_surface.native_surface_id.expect("bug: no native surface!"),
+ surface_size
+ )
+ });
+
+ match external_surface.dependency {
+ ExternalSurfaceDependency::Yuv{ color_space, format, rescale, .. } => {
+
+ let image_buffer_kind = get_buffer_kind(planes[0].texture);
+
+ self.external_surfaces.push(ResolvedExternalSurface {
+ color_data: ResolvedExternalSurfaceColorData::Yuv {
+ image_dependencies,
+ planes,
+ color_space,
+ format,
+ rescale,
+ },
+ image_buffer_kind,
+ update_params,
+ });
+ },
+ ExternalSurfaceDependency::Rgb{ flip_y, .. } => {
+
+ let image_buffer_kind = get_buffer_kind(planes[0].texture);
+
+ self.external_surfaces.push(ResolvedExternalSurface {
+ color_data: ResolvedExternalSurfaceColorData::Rgb {
+ image_dependency: image_dependencies[0],
+ plane: planes[0],
+ flip_y,
+ },
+ image_buffer_kind,
+ update_params,
+ });
+ },
+ }
+
+ let tile = CompositeTile {
+ surface,
+ rect: external_surface.device_rect,
+ valid_rect: external_surface.device_rect.translate(-external_surface.device_rect.origin.to_vector()),
+ dirty_rect: external_surface.device_rect.translate(-external_surface.device_rect.origin.to_vector()),
+ clip_rect,
+ z_id: external_surface.z_id,
+ };
+
+ // Add a surface descriptor for each compositor surface. For the Draw
+ // compositor, this is used to avoid composites being skipped by adding
+ // a dependency on the compositor surface external image keys / generations.
+ self.descriptor.surfaces.push(
+ CompositeSurfaceDescriptor {
+ surface_id: external_surface.native_surface_id,
+ offset: tile.rect.origin,
+ clip_rect: tile.clip_rect,
+ image_dependencies: image_dependencies,
+ tile_descriptors: Vec::new(),
+ }
+ );
+
+ self.push_tile(tile, true);
+ }
+
+ // Add alpha / overlay tiles after compositor surfaces
+ if visible_alpha_tile_count > 0 {
+ self.descriptor.surfaces.push(
+ CompositeSurfaceDescriptor {
+ surface_id: tile_cache.native_surface.as_ref().map(|s| s.alpha),
+ offset: tile_cache.device_position,
+ clip_rect: device_clip_rect,
+ image_dependencies: [ImageDependency::INVALID; 3],
+ tile_descriptors: alpha_tile_descriptors,
+ }
+ );
+ }
+ }
+
+ /// Add a tile to the appropriate array, depending on tile properties and compositor mode.
+ fn push_tile(
+ &mut self,
+ tile: CompositeTile,
+ is_opaque: bool,
+ ) {
+ match tile.surface {
+ CompositeTileSurface::Color { .. } => {
+ // Color tiles are, by definition, opaque. We might support non-opaque color
+ // tiles if we ever find pages that have a lot of these.
+ self.opaque_tiles.push(tile);
+ }
+ CompositeTileSurface::Clear => {
+ // Clear tiles have a special bucket
+ self.clear_tiles.push(tile);
+ }
+ CompositeTileSurface::Texture { .. } => {
+ // Texture surfaces get bucketed by opaque/alpha, for z-rejection
+ // on the Draw compositor mode.
+ if is_opaque {
+ self.opaque_tiles.push(tile);
+ } else {
+ self.alpha_tiles.push(tile);
+ }
+ }
+ CompositeTileSurface::ExternalSurface { .. } => {
+ self.opaque_tiles.push(tile);
+ }
+ }
+ }
+}
+
+/// An arbitrary identifier for a native (OS compositor) surface
+#[repr(C)]
+#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct NativeSurfaceId(pub u64);
+
+impl NativeSurfaceId {
+ /// A special id for the native surface that is used for debug / profiler overlays.
+ pub const DEBUG_OVERLAY: NativeSurfaceId = NativeSurfaceId(u64::MAX);
+}
+
+#[repr(C)]
+#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct NativeTileId {
+ pub surface_id: NativeSurfaceId,
+ pub x: i32,
+ pub y: i32,
+}
+
+impl NativeTileId {
+ /// A special id for the native surface that is used for debug / profiler overlays.
+ pub const DEBUG_OVERLAY: NativeTileId = NativeTileId {
+ surface_id: NativeSurfaceId::DEBUG_OVERLAY,
+ x: 0,
+ y: 0,
+ };
+}
+
+/// Information about a bound surface that the native compositor
+/// returns to WR.
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct NativeSurfaceInfo {
+ /// An offset into the surface that WR should draw. Some compositing
+ /// implementations (notably, DirectComposition) use texture atlases
+ /// when the surface sizes are small. In this case, an offset can
+ /// be returned into the larger texture where WR should draw. This
+ /// can be (0, 0) if texture atlases are not used.
+ pub origin: DeviceIntPoint,
+ /// The ID of the FBO that WR should bind to, in order to draw to
+ /// the bound surface. On Windows (ANGLE) this will always be 0,
+ /// since creating a p-buffer sets the default framebuffer to
+ /// be the DirectComposition surface. On Mac, this will be non-zero,
+ /// since it identifies the IOSurface that has been bound to draw to.
+ // TODO(gw): This may need to be a larger / different type for WR
+ // backends that are not GL.
+ pub fbo_id: u32,
+}
+
+#[repr(C)]
+pub struct CompositorCapabilities {
+ pub virtual_surface_size: i32,
+}
+
+/// Defines an interface to a native (OS level) compositor. If supplied
+/// by the client application, then picture cache slices will be
+/// composited by the OS compositor, rather than drawn via WR batches.
+pub trait Compositor {
+ /// Create a new OS compositor surface with the given properties.
+ fn create_surface(
+ &mut self,
+ id: NativeSurfaceId,
+ virtual_offset: DeviceIntPoint,
+ tile_size: DeviceIntSize,
+ is_opaque: bool,
+ );
+
+ /// Destroy the surface with the specified id. WR may call this
+ /// at any time the surface is no longer required (including during
+ /// renderer deinit). It's the responsibility of the embedder
+ /// to ensure that the surface is only freed once the GPU is
+ /// no longer using the surface (if this isn't already handled
+ /// by the operating system).
+ fn destroy_surface(
+ &mut self,
+ id: NativeSurfaceId,
+ );
+
+ /// Create a new OS compositor tile with the given properties.
+ fn create_tile(
+ &mut self,
+ id: NativeTileId,
+ );
+
+ /// Destroy an existing compositor tile.
+ fn destroy_tile(
+ &mut self,
+ id: NativeTileId,
+ );
+
+ /// Bind this surface such that WR can issue OpenGL commands
+ /// that will target the surface. Returns an (x, y) offset
+ /// where WR should draw into the surface. This can be set
+ /// to (0, 0) if the OS doesn't use texture atlases. The dirty
+ /// rect is a local surface rect that specifies which part
+ /// of the surface needs to be updated. If max_update_rects
+ /// in CompositeConfig is 0, this will always be the size
+ /// of the entire surface. The returned offset is only
+ /// relevant to compositors that store surfaces in a texture
+ /// atlas (that is, WR expects that the dirty rect doesn't
+ /// affect the coordinates of the returned origin).
+ fn bind(
+ &mut self,
+ id: NativeTileId,
+ dirty_rect: DeviceIntRect,
+ valid_rect: DeviceIntRect,
+ ) -> NativeSurfaceInfo;
+
+ /// Unbind the surface. This is called by WR when it has
+ /// finished issuing OpenGL commands on the current surface.
+ fn unbind(
+ &mut self,
+ );
+
+ /// Begin the frame
+ fn begin_frame(&mut self);
+
+ /// Add a surface to the visual tree to be composited. Visuals must
+ /// be added every frame, between the begin/end transaction call. The
+ /// z-order of the surfaces is determined by the order they are added
+ /// to the visual tree.
+ // TODO(gw): Adding visuals every frame makes the interface simple,
+ // but may have performance implications on some compositors?
+ // We might need to change the interface to maintain a visual
+ // tree that can be mutated?
+ // TODO(gw): We might need to add a concept of a hierachy in future.
+ // TODO(gw): In future, expand to support a more complete transform matrix.
+ fn add_surface(
+ &mut self,
+ id: NativeSurfaceId,
+ position: DeviceIntPoint,
+ clip_rect: DeviceIntRect,
+ );
+
+ /// Commit any changes in the compositor tree for this frame. WR calls
+ /// this once when all surface and visual updates are complete, to signal
+ /// that the OS composite transaction should be applied.
+ fn end_frame(&mut self);
+
+ /// Enable/disable native compositor usage
+ fn enable_native_compositor(&mut self, enable: bool);
+
+ /// Safely deinitialize any remaining resources owned by the compositor.
+ fn deinit(&mut self);
+
+ /// Get the capabilities struct for this compositor. This is used to
+ /// specify what features a compositor supports, depending on the
+ /// underlying platform
+ fn get_capabilities(&self) -> CompositorCapabilities;
+}
+
+/// Return the total area covered by a set of occluders, accounting for
+/// overlapping areas between those rectangles.
+fn area_of_occluders(
+ occluders: &[Occluder],
+ z_id: ZBufferId,
+ clip_rect: &DeviceIntRect,
+) -> i32 {
+ // This implementation is based on the article https://leetcode.com/articles/rectangle-area-ii/.
+ // This is not a particularly efficient implementation (it skips building segment trees), however
+ // we typically use this where the length of the rectangles array is < 10, so simplicity is more important.
+
+ let mut area = 0;
+
+ // Whether this event is the start or end of a rectangle
+ #[derive(Debug)]
+ enum EventKind {
+ Begin,
+ End,
+ }
+
+ // A list of events on the y-axis, with the rectangle range that it affects on the x-axis
+ #[derive(Debug)]
+ struct Event {
+ y: i32,
+ x_range: ops::Range<i32>,
+ kind: EventKind,
+ }
+
+ impl Event {
+ fn new(y: i32, kind: EventKind, x0: i32, x1: i32) -> Self {
+ Event {
+ y,
+ x_range: ops::Range {
+ start: x0,
+ end: x1,
+ },
+ kind,
+ }
+ }
+ }
+
+ // Step through each rectangle and build the y-axis event list
+ let mut events = Vec::with_capacity(occluders.len() * 2);
+ for occluder in occluders {
+ // Only consider occluders in front of this rect
+ if occluder.z_id.0 > z_id.0 {
+ // Clip the source rect to the rectangle we care about, since we only
+ // want to record area for the tile we are comparing to.
+ if let Some(rect) = occluder.device_rect.intersection(clip_rect) {
+ let x0 = rect.origin.x;
+ let x1 = x0 + rect.size.width;
+ events.push(Event::new(rect.origin.y, EventKind::Begin, x0, x1));
+ events.push(Event::new(rect.origin.y + rect.size.height, EventKind::End, x0, x1));
+ }
+ }
+ }
+
+ // If we didn't end up with any valid events, the area must be 0
+ if events.is_empty() {
+ return 0;
+ }
+
+ // Sort the events by y-value
+ events.sort_by_key(|e| e.y);
+ let mut active: Vec<ops::Range<i32>> = Vec::new();
+ let mut cur_y = events[0].y;
+
+ // Step through each y interval
+ for event in &events {
+ // This is the dimension of the y-axis we are accumulating areas for
+ let dy = event.y - cur_y;
+
+ // If we have active events covering x-ranges in this y-interval, process them
+ if dy != 0 && !active.is_empty() {
+ assert!(dy > 0);
+
+ // Step through the x-ranges, ordered by x0 of each event
+ active.sort_by_key(|i| i.start);
+ let mut query = 0;
+ let mut cur = active[0].start;
+
+ // Accumulate the non-overlapping x-interval that contributes to area for this y-interval.
+ for interval in &active {
+ cur = interval.start.max(cur);
+ query += (interval.end - cur).max(0);
+ cur = cur.max(interval.end);
+ }
+
+ // Accumulate total area for this y-interval
+ area += query * dy;
+ }
+
+ // Update the active events list
+ match event.kind {
+ EventKind::Begin => {
+ active.push(event.x_range.clone());
+ }
+ EventKind::End => {
+ let index = active.iter().position(|i| *i == event.x_range).unwrap();
+ active.remove(index);
+ }
+ }
+
+ cur_y = event.y;
+ }
+
+ area
+}
diff --git a/third_party/webrender/webrender/src/debug_colors.rs b/third_party/webrender/webrender/src/debug_colors.rs
new file mode 100644
index 00000000000..4ce8887126a
--- /dev/null
+++ b/third_party/webrender/webrender/src/debug_colors.rs
@@ -0,0 +1,159 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#![allow(dead_code)]
+#![cfg_attr(feature = "cargo-clippy", allow(clippy::excessive_precision))]
+
+use api::ColorF;
+
+// A subset of the standard CSS colors, useful for defining GPU tag colors etc.
+
+pub const INDIGO: ColorF = ColorF { r: 0.294117647059, g: 0.0, b: 0.509803921569, a: 1.0 };
+pub const GOLD: ColorF = ColorF { r: 1.0, g: 0.843137254902, b: 0.0, a: 1.0 };
+pub const FIREBRICK: ColorF = ColorF { r: 0.698039215686, g: 0.133333333333, b: 0.133333333333, a: 1.0 };
+pub const INDIANRED: ColorF = ColorF { r: 0.803921568627, g: 0.360784313725, b: 0.360784313725, a: 1.0 };
+pub const YELLOW: ColorF = ColorF { r: 1.0, g: 1.0, b: 0.0, a: 1.0 };
+pub const DARKOLIVEGREEN: ColorF = ColorF { r: 0.333333333333, g: 0.419607843137, b: 0.18431372549, a: 1.0 };
+pub const DARKSEAGREEN: ColorF = ColorF { r: 0.560784313725, g: 0.737254901961, b: 0.560784313725, a: 1.0 };
+pub const SLATEGREY: ColorF = ColorF { r: 0.439215686275, g: 0.501960784314, b: 0.564705882353, a: 1.0 };
+pub const DARKSLATEGREY: ColorF = ColorF { r: 0.18431372549, g: 0.309803921569, b: 0.309803921569, a: 1.0 };
+pub const MEDIUMVIOLETRED: ColorF = ColorF { r: 0.780392156863, g: 0.0823529411765, b: 0.521568627451, a: 1.0 };
+pub const MEDIUMORCHID: ColorF = ColorF { r: 0.729411764706, g: 0.333333333333, b: 0.827450980392, a: 1.0 };
+pub const CHARTREUSE: ColorF = ColorF { r: 0.498039215686, g: 1.0, b: 0.0, a: 1.0 };
+pub const MEDIUMSLATEBLUE: ColorF = ColorF { r: 0.482352941176, g: 0.407843137255, b: 0.933333333333, a: 1.0 };
+pub const BLACK: ColorF = ColorF { r: 0.0, g: 0.0, b: 0.0, a: 1.0 };
+pub const SPRINGGREEN: ColorF = ColorF { r: 0.0, g: 1.0, b: 0.498039215686, a: 1.0 };
+pub const CRIMSON: ColorF = ColorF { r: 0.862745098039, g: 0.078431372549, b: 0.235294117647, a: 1.0 };
+pub const LIGHTSALMON: ColorF = ColorF { r: 1.0, g: 0.627450980392, b: 0.478431372549, a: 1.0 };
+pub const BROWN: ColorF = ColorF { r: 0.647058823529, g: 0.164705882353, b: 0.164705882353, a: 1.0 };
+pub const TURQUOISE: ColorF = ColorF { r: 0.250980392157, g: 0.878431372549, b: 0.81568627451, a: 1.0 };
+pub const OLIVEDRAB: ColorF = ColorF { r: 0.419607843137, g: 0.556862745098, b: 0.137254901961, a: 1.0 };
+pub const CYAN: ColorF = ColorF { r: 0.0, g: 1.0, b: 1.0, a: 1.0 };
+pub const SILVER: ColorF = ColorF { r: 0.752941176471, g: 0.752941176471, b: 0.752941176471, a: 1.0 };
+pub const SKYBLUE: ColorF = ColorF { r: 0.529411764706, g: 0.807843137255, b: 0.921568627451, a: 1.0 };
+pub const GRAY: ColorF = ColorF { r: 0.501960784314, g: 0.501960784314, b: 0.501960784314, a: 1.0 };
+pub const DARKTURQUOISE: ColorF = ColorF { r: 0.0, g: 0.807843137255, b: 0.819607843137, a: 1.0 };
+pub const GOLDENROD: ColorF = ColorF { r: 0.854901960784, g: 0.647058823529, b: 0.125490196078, a: 1.0 };
+pub const DARKGREEN: ColorF = ColorF { r: 0.0, g: 0.392156862745, b: 0.0, a: 1.0 };
+pub const DARKVIOLET: ColorF = ColorF { r: 0.580392156863, g: 0.0, b: 0.827450980392, a: 1.0 };
+pub const DARKGRAY: ColorF = ColorF { r: 0.662745098039, g: 0.662745098039, b: 0.662745098039, a: 1.0 };
+pub const LIGHTPINK: ColorF = ColorF { r: 1.0, g: 0.713725490196, b: 0.756862745098, a: 1.0 };
+pub const TEAL: ColorF = ColorF { r: 0.0, g: 0.501960784314, b: 0.501960784314, a: 1.0 };
+pub const DARKMAGENTA: ColorF = ColorF { r: 0.545098039216, g: 0.0, b: 0.545098039216, a: 1.0 };
+pub const LIGHTGOLDENRODYELLOW: ColorF = ColorF { r: 0.980392156863, g: 0.980392156863, b: 0.823529411765, a: 1.0 };
+pub const LAVENDER: ColorF = ColorF { r: 0.901960784314, g: 0.901960784314, b: 0.980392156863, a: 1.0 };
+pub const YELLOWGREEN: ColorF = ColorF { r: 0.603921568627, g: 0.803921568627, b: 0.196078431373, a: 1.0 };
+pub const THISTLE: ColorF = ColorF { r: 0.847058823529, g: 0.749019607843, b: 0.847058823529, a: 1.0 };
+pub const VIOLET: ColorF = ColorF { r: 0.933333333333, g: 0.509803921569, b: 0.933333333333, a: 1.0 };
+pub const NAVY: ColorF = ColorF { r: 0.0, g: 0.0, b: 0.501960784314, a: 1.0 };
+pub const DIMGREY: ColorF = ColorF { r: 0.411764705882, g: 0.411764705882, b: 0.411764705882, a: 1.0 };
+pub const ORCHID: ColorF = ColorF { r: 0.854901960784, g: 0.439215686275, b: 0.839215686275, a: 1.0 };
+pub const BLUE: ColorF = ColorF { r: 0.0, g: 0.0, b: 1.0, a: 1.0 };
+pub const GHOSTWHITE: ColorF = ColorF { r: 0.972549019608, g: 0.972549019608, b: 1.0, a: 1.0 };
+pub const HONEYDEW: ColorF = ColorF { r: 0.941176470588, g: 1.0, b: 0.941176470588, a: 1.0 };
+pub const CORNFLOWERBLUE: ColorF = ColorF { r: 0.392156862745, g: 0.58431372549, b: 0.929411764706, a: 1.0 };
+pub const DARKBLUE: ColorF = ColorF { r: 0.0, g: 0.0, b: 0.545098039216, a: 1.0 };
+pub const DARKKHAKI: ColorF = ColorF { r: 0.741176470588, g: 0.717647058824, b: 0.419607843137, a: 1.0 };
+pub const MEDIUMPURPLE: ColorF = ColorF { r: 0.576470588235, g: 0.439215686275, b: 0.858823529412, a: 1.0 };
+pub const CORNSILK: ColorF = ColorF { r: 1.0, g: 0.972549019608, b: 0.862745098039, a: 1.0 };
+pub const RED: ColorF = ColorF { r: 1.0, g: 0.0, b: 0.0, a: 1.0 };
+pub const BISQUE: ColorF = ColorF { r: 1.0, g: 0.894117647059, b: 0.76862745098, a: 1.0 };
+pub const SLATEGRAY: ColorF = ColorF { r: 0.439215686275, g: 0.501960784314, b: 0.564705882353, a: 1.0 };
+pub const DARKCYAN: ColorF = ColorF { r: 0.0, g: 0.545098039216, b: 0.545098039216, a: 1.0 };
+pub const KHAKI: ColorF = ColorF { r: 0.941176470588, g: 0.901960784314, b: 0.549019607843, a: 1.0 };
+pub const WHEAT: ColorF = ColorF { r: 0.960784313725, g: 0.870588235294, b: 0.701960784314, a: 1.0 };
+pub const DEEPSKYBLUE: ColorF = ColorF { r: 0.0, g: 0.749019607843, b: 1.0, a: 1.0 };
+pub const REBECCAPURPLE: ColorF = ColorF { r: 0.4, g: 0.2, b: 0.6, a: 1.0 };
+pub const DARKRED: ColorF = ColorF { r: 0.545098039216, g: 0.0, b: 0.0, a: 1.0 };
+pub const STEELBLUE: ColorF = ColorF { r: 0.274509803922, g: 0.509803921569, b: 0.705882352941, a: 1.0 };
+pub const ALICEBLUE: ColorF = ColorF { r: 0.941176470588, g: 0.972549019608, b: 1.0, a: 1.0 };
+pub const LIGHTSLATEGREY: ColorF = ColorF { r: 0.466666666667, g: 0.533333333333, b: 0.6, a: 1.0 };
+pub const GAINSBORO: ColorF = ColorF { r: 0.862745098039, g: 0.862745098039, b: 0.862745098039, a: 1.0 };
+pub const MEDIUMTURQUOISE: ColorF = ColorF { r: 0.282352941176, g: 0.819607843137, b: 0.8, a: 1.0 };
+pub const FLORALWHITE: ColorF = ColorF { r: 1.0, g: 0.980392156863, b: 0.941176470588, a: 1.0 };
+pub const CORAL: ColorF = ColorF { r: 1.0, g: 0.498039215686, b: 0.313725490196, a: 1.0 };
+pub const PURPLE: ColorF = ColorF { r: 0.501960784314, g: 0.0, b: 0.501960784314, a: 1.0 };
+pub const LIGHTGREY: ColorF = ColorF { r: 0.827450980392, g: 0.827450980392, b: 0.827450980392, a: 1.0 };
+pub const LIGHTCYAN: ColorF = ColorF { r: 0.878431372549, g: 1.0, b: 1.0, a: 1.0 };
+pub const DARKSALMON: ColorF = ColorF { r: 0.913725490196, g: 0.588235294118, b: 0.478431372549, a: 1.0 };
+pub const BEIGE: ColorF = ColorF { r: 0.960784313725, g: 0.960784313725, b: 0.862745098039, a: 1.0 };
+pub const AZURE: ColorF = ColorF { r: 0.941176470588, g: 1.0, b: 1.0, a: 1.0 };
+pub const LIGHTSTEELBLUE: ColorF = ColorF { r: 0.690196078431, g: 0.76862745098, b: 0.870588235294, a: 1.0 };
+pub const OLDLACE: ColorF = ColorF { r: 0.992156862745, g: 0.960784313725, b: 0.901960784314, a: 1.0 };
+pub const GREENYELLOW: ColorF = ColorF { r: 0.678431372549, g: 1.0, b: 0.18431372549, a: 1.0 };
+pub const ROYALBLUE: ColorF = ColorF { r: 0.254901960784, g: 0.411764705882, b: 0.882352941176, a: 1.0 };
+pub const LIGHTSEAGREEN: ColorF = ColorF { r: 0.125490196078, g: 0.698039215686, b: 0.666666666667, a: 1.0 };
+pub const MISTYROSE: ColorF = ColorF { r: 1.0, g: 0.894117647059, b: 0.882352941176, a: 1.0 };
+pub const SIENNA: ColorF = ColorF { r: 0.627450980392, g: 0.321568627451, b: 0.176470588235, a: 1.0 };
+pub const LIGHTCORAL: ColorF = ColorF { r: 0.941176470588, g: 0.501960784314, b: 0.501960784314, a: 1.0 };
+pub const ORANGERED: ColorF = ColorF { r: 1.0, g: 0.270588235294, b: 0.0, a: 1.0 };
+pub const NAVAJOWHITE: ColorF = ColorF { r: 1.0, g: 0.870588235294, b: 0.678431372549, a: 1.0 };
+pub const LIME: ColorF = ColorF { r: 0.0, g: 1.0, b: 0.0, a: 1.0 };
+pub const PALEGREEN: ColorF = ColorF { r: 0.596078431373, g: 0.98431372549, b: 0.596078431373, a: 1.0 };
+pub const BURLYWOOD: ColorF = ColorF { r: 0.870588235294, g: 0.721568627451, b: 0.529411764706, a: 1.0 };
+pub const SEASHELL: ColorF = ColorF { r: 1.0, g: 0.960784313725, b: 0.933333333333, a: 1.0 };
+pub const MEDIUMSPRINGGREEN: ColorF = ColorF { r: 0.0, g: 0.980392156863, b: 0.603921568627, a: 1.0 };
+pub const FUCHSIA: ColorF = ColorF { r: 1.0, g: 0.0, b: 1.0, a: 1.0 };
+pub const PAPAYAWHIP: ColorF = ColorF { r: 1.0, g: 0.937254901961, b: 0.835294117647, a: 1.0 };
+pub const BLANCHEDALMOND: ColorF = ColorF { r: 1.0, g: 0.921568627451, b: 0.803921568627, a: 1.0 };
+pub const PERU: ColorF = ColorF { r: 0.803921568627, g: 0.521568627451, b: 0.247058823529, a: 1.0 };
+pub const AQUAMARINE: ColorF = ColorF { r: 0.498039215686, g: 1.0, b: 0.83137254902, a: 1.0 };
+pub const WHITE: ColorF = ColorF { r: 1.0, g: 1.0, b: 1.0, a: 1.0 };
+pub const DARKSLATEGRAY: ColorF = ColorF { r: 0.18431372549, g: 0.309803921569, b: 0.309803921569, a: 1.0 };
+pub const TOMATO: ColorF = ColorF { r: 1.0, g: 0.388235294118, b: 0.278431372549, a: 1.0 };
+pub const IVORY: ColorF = ColorF { r: 1.0, g: 1.0, b: 0.941176470588, a: 1.0 };
+pub const DODGERBLUE: ColorF = ColorF { r: 0.117647058824, g: 0.564705882353, b: 1.0, a: 1.0 };
+pub const LEMONCHIFFON: ColorF = ColorF { r: 1.0, g: 0.980392156863, b: 0.803921568627, a: 1.0 };
+pub const CHOCOLATE: ColorF = ColorF { r: 0.823529411765, g: 0.411764705882, b: 0.117647058824, a: 1.0 };
+pub const ORANGE: ColorF = ColorF { r: 1.0, g: 0.647058823529, b: 0.0, a: 1.0 };
+pub const FORESTGREEN: ColorF = ColorF { r: 0.133333333333, g: 0.545098039216, b: 0.133333333333, a: 1.0 };
+pub const DARKGREY: ColorF = ColorF { r: 0.662745098039, g: 0.662745098039, b: 0.662745098039, a: 1.0 };
+pub const OLIVE: ColorF = ColorF { r: 0.501960784314, g: 0.501960784314, b: 0.0, a: 1.0 };
+pub const MINTCREAM: ColorF = ColorF { r: 0.960784313725, g: 1.0, b: 0.980392156863, a: 1.0 };
+pub const ANTIQUEWHITE: ColorF = ColorF { r: 0.980392156863, g: 0.921568627451, b: 0.843137254902, a: 1.0 };
+pub const DARKORANGE: ColorF = ColorF { r: 1.0, g: 0.549019607843, b: 0.0, a: 1.0 };
+pub const CADETBLUE: ColorF = ColorF { r: 0.372549019608, g: 0.619607843137, b: 0.627450980392, a: 1.0 };
+pub const MOCCASIN: ColorF = ColorF { r: 1.0, g: 0.894117647059, b: 0.709803921569, a: 1.0 };
+pub const LIMEGREEN: ColorF = ColorF { r: 0.196078431373, g: 0.803921568627, b: 0.196078431373, a: 1.0 };
+pub const SADDLEBROWN: ColorF = ColorF { r: 0.545098039216, g: 0.270588235294, b: 0.0745098039216, a: 1.0 };
+pub const GREY: ColorF = ColorF { r: 0.501960784314, g: 0.501960784314, b: 0.501960784314, a: 1.0 };
+pub const DARKSLATEBLUE: ColorF = ColorF { r: 0.282352941176, g: 0.239215686275, b: 0.545098039216, a: 1.0 };
+pub const LIGHTSKYBLUE: ColorF = ColorF { r: 0.529411764706, g: 0.807843137255, b: 0.980392156863, a: 1.0 };
+pub const DEEPPINK: ColorF = ColorF { r: 1.0, g: 0.078431372549, b: 0.576470588235, a: 1.0 };
+pub const PLUM: ColorF = ColorF { r: 0.866666666667, g: 0.627450980392, b: 0.866666666667, a: 1.0 };
+pub const AQUA: ColorF = ColorF { r: 0.0, g: 1.0, b: 1.0, a: 1.0 };
+pub const DARKGOLDENROD: ColorF = ColorF { r: 0.721568627451, g: 0.525490196078, b: 0.043137254902, a: 1.0 };
+pub const MAROON: ColorF = ColorF { r: 0.501960784314, g: 0.0, b: 0.0, a: 1.0 };
+pub const SANDYBROWN: ColorF = ColorF { r: 0.956862745098, g: 0.643137254902, b: 0.376470588235, a: 1.0 };
+pub const MAGENTA: ColorF = ColorF { r: 1.0, g: 0.0, b: 1.0, a: 1.0 };
+pub const TAN: ColorF = ColorF { r: 0.823529411765, g: 0.705882352941, b: 0.549019607843, a: 1.0 };
+pub const ROSYBROWN: ColorF = ColorF { r: 0.737254901961, g: 0.560784313725, b: 0.560784313725, a: 1.0 };
+pub const PINK: ColorF = ColorF { r: 1.0, g: 0.752941176471, b: 0.796078431373, a: 1.0 };
+pub const LIGHTBLUE: ColorF = ColorF { r: 0.678431372549, g: 0.847058823529, b: 0.901960784314, a: 1.0 };
+pub const PALEVIOLETRED: ColorF = ColorF { r: 0.858823529412, g: 0.439215686275, b: 0.576470588235, a: 1.0 };
+pub const MEDIUMSEAGREEN: ColorF = ColorF { r: 0.235294117647, g: 0.701960784314, b: 0.443137254902, a: 1.0 };
+pub const SLATEBLUE: ColorF = ColorF { r: 0.41568627451, g: 0.352941176471, b: 0.803921568627, a: 1.0 };
+pub const DIMGRAY: ColorF = ColorF { r: 0.411764705882, g: 0.411764705882, b: 0.411764705882, a: 1.0 };
+pub const POWDERBLUE: ColorF = ColorF { r: 0.690196078431, g: 0.878431372549, b: 0.901960784314, a: 1.0 };
+pub const SEAGREEN: ColorF = ColorF { r: 0.180392156863, g: 0.545098039216, b: 0.341176470588, a: 1.0 };
+pub const SNOW: ColorF = ColorF { r: 1.0, g: 0.980392156863, b: 0.980392156863, a: 1.0 };
+pub const MEDIUMBLUE: ColorF = ColorF { r: 0.0, g: 0.0, b: 0.803921568627, a: 1.0 };
+pub const MIDNIGHTBLUE: ColorF = ColorF { r: 0.0980392156863, g: 0.0980392156863, b: 0.439215686275, a: 1.0 };
+pub const PALETURQUOISE: ColorF = ColorF { r: 0.686274509804, g: 0.933333333333, b: 0.933333333333, a: 1.0 };
+pub const PALEGOLDENROD: ColorF = ColorF { r: 0.933333333333, g: 0.909803921569, b: 0.666666666667, a: 1.0 };
+pub const WHITESMOKE: ColorF = ColorF { r: 0.960784313725, g: 0.960784313725, b: 0.960784313725, a: 1.0 };
+pub const DARKORCHID: ColorF = ColorF { r: 0.6, g: 0.196078431373, b: 0.8, a: 1.0 };
+pub const SALMON: ColorF = ColorF { r: 0.980392156863, g: 0.501960784314, b: 0.447058823529, a: 1.0 };
+pub const LIGHTSLATEGRAY: ColorF = ColorF { r: 0.466666666667, g: 0.533333333333, b: 0.6, a: 1.0 };
+pub const LAWNGREEN: ColorF = ColorF { r: 0.486274509804, g: 0.988235294118, b: 0.0, a: 1.0 };
+pub const LIGHTGREEN: ColorF = ColorF { r: 0.564705882353, g: 0.933333333333, b: 0.564705882353, a: 1.0 };
+pub const LIGHTGRAY: ColorF = ColorF { r: 0.827450980392, g: 0.827450980392, b: 0.827450980392, a: 1.0 };
+pub const HOTPINK: ColorF = ColorF { r: 1.0, g: 0.411764705882, b: 0.705882352941, a: 1.0 };
+pub const LIGHTYELLOW: ColorF = ColorF { r: 1.0, g: 1.0, b: 0.878431372549, a: 1.0 };
+pub const LAVENDERBLUSH: ColorF = ColorF { r: 1.0, g: 0.941176470588, b: 0.960784313725, a: 1.0 };
+pub const LINEN: ColorF = ColorF { r: 0.980392156863, g: 0.941176470588, b: 0.901960784314, a: 1.0 };
+pub const MEDIUMAQUAMARINE: ColorF = ColorF { r: 0.4, g: 0.803921568627, b: 0.666666666667, a: 1.0 };
+pub const GREEN: ColorF = ColorF { r: 0.0, g: 0.501960784314, b: 0.0, a: 1.0 };
+pub const BLUEVIOLET: ColorF = ColorF { r: 0.541176470588, g: 0.16862745098, b: 0.886274509804, a: 1.0 };
+pub const PEACHPUFF: ColorF = ColorF { r: 1.0, g: 0.854901960784, b: 0.725490196078, a: 1.0 };
diff --git a/third_party/webrender/webrender/src/debug_font_data.rs b/third_party/webrender/webrender/src/debug_font_data.rs
new file mode 100644
index 00000000000..a891bf0d387
--- /dev/null
+++ b/third_party/webrender/webrender/src/debug_font_data.rs
@@ -0,0 +1,1914 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#[derive(Debug)]
+pub struct BakedGlyph {
+ pub x0: u32,
+ pub y0: u32,
+ pub x1: u32,
+ pub y1: u32,
+ pub xo: f32,
+ pub yo: f32,
+ pub xa: f32,
+}
+
+pub const FIRST_GLYPH_INDEX: i32 = 32;
+pub const BMP_WIDTH: i32 = 128;
+pub const BMP_HEIGHT: i32 = 128;
+pub const FONT_SIZE: i32 = 19;
+
+pub const GLYPHS: [BakedGlyph; 96] = [
+ BakedGlyph {
+ x0: 1,
+ y0: 1,
+ x1: 1,
+ y1: 1,
+ xo: 0.000000,
+ yo: 0.000000,
+ xa: 3.864407,
+ },
+ BakedGlyph {
+ x0: 2,
+ y0: 1,
+ x1: 5,
+ y1: 14,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 4.644068,
+ },
+ BakedGlyph {
+ x0: 6,
+ y0: 1,
+ x1: 11,
+ y1: 6,
+ xo: 1.000000,
+ yo: -13.000000,
+ xa: 6.644068,
+ },
+ BakedGlyph {
+ x0: 12,
+ y0: 1,
+ x1: 23,
+ y1: 13,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 11.067797,
+ },
+ BakedGlyph {
+ x0: 24,
+ y0: 1,
+ x1: 32,
+ y1: 17,
+ xo: 1.000000,
+ yo: -14.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 33,
+ y0: 1,
+ x1: 46,
+ y1: 14,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 14.084745,
+ },
+ BakedGlyph {
+ x0: 47,
+ y0: 1,
+ x1: 58,
+ y1: 14,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 10.983051,
+ },
+ BakedGlyph {
+ x0: 59,
+ y0: 1,
+ x1: 61,
+ y1: 6,
+ xo: 1.000000,
+ yo: -13.000000,
+ xa: 4.067797,
+ },
+ BakedGlyph {
+ x0: 62,
+ y0: 1,
+ x1: 67,
+ y1: 19,
+ xo: 1.000000,
+ yo: -14.000000,
+ xa: 5.254237,
+ },
+ BakedGlyph {
+ x0: 68,
+ y0: 1,
+ x1: 72,
+ y1: 19,
+ xo: 0.000000,
+ yo: -14.000000,
+ xa: 5.254237,
+ },
+ BakedGlyph {
+ x0: 73,
+ y0: 1,
+ x1: 81,
+ y1: 8,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 8.000000,
+ },
+ BakedGlyph {
+ x0: 82,
+ y0: 1,
+ x1: 91,
+ y1: 11,
+ xo: 0.000000,
+ yo: -10.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 92,
+ y0: 1,
+ x1: 95,
+ y1: 6,
+ xo: 0.000000,
+ yo: -2.000000,
+ xa: 4.169492,
+ },
+ BakedGlyph {
+ x0: 96,
+ y0: 1,
+ x1: 101,
+ y1: 3,
+ xo: 0.000000,
+ yo: -6.000000,
+ xa: 4.779661,
+ },
+ BakedGlyph {
+ x0: 102,
+ y0: 1,
+ x1: 105,
+ y1: 4,
+ xo: 1.000000,
+ yo: -2.000000,
+ xa: 4.169492,
+ },
+ BakedGlyph {
+ x0: 106,
+ y0: 1,
+ x1: 114,
+ y1: 19,
+ xo: -1.000000,
+ yo: -14.000000,
+ xa: 6.084746,
+ },
+ BakedGlyph {
+ x0: 115,
+ y0: 1,
+ x1: 123,
+ y1: 14,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 1,
+ y0: 20,
+ x1: 6,
+ y1: 32,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 7,
+ y0: 20,
+ x1: 15,
+ y1: 32,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 16,
+ y0: 20,
+ x1: 24,
+ y1: 33,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 25,
+ y0: 20,
+ x1: 34,
+ y1: 32,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 35,
+ y0: 20,
+ x1: 43,
+ y1: 33,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 44,
+ y0: 20,
+ x1: 52,
+ y1: 33,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 53,
+ y0: 20,
+ x1: 61,
+ y1: 32,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 62,
+ y0: 20,
+ x1: 70,
+ y1: 33,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 71,
+ y0: 20,
+ x1: 79,
+ y1: 33,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 80,
+ y0: 20,
+ x1: 83,
+ y1: 30,
+ xo: 1.000000,
+ yo: -9.000000,
+ xa: 4.169492,
+ },
+ BakedGlyph {
+ x0: 84,
+ y0: 20,
+ x1: 88,
+ y1: 32,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 4.169492,
+ },
+ BakedGlyph {
+ x0: 89,
+ y0: 20,
+ x1: 98,
+ y1: 28,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 99,
+ y0: 20,
+ x1: 108,
+ y1: 26,
+ xo: 0.000000,
+ yo: -8.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 109,
+ y0: 20,
+ x1: 118,
+ y1: 28,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 119,
+ y0: 20,
+ x1: 125,
+ y1: 33,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 6.440678,
+ },
+ BakedGlyph {
+ x0: 1,
+ y0: 34,
+ x1: 15,
+ y1: 49,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 15.932203,
+ },
+ BakedGlyph {
+ x0: 16,
+ y0: 34,
+ x1: 27,
+ y1: 46,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 10.864407,
+ },
+ BakedGlyph {
+ x0: 28,
+ y0: 34,
+ x1: 37,
+ y1: 47,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 10.677966,
+ },
+ BakedGlyph {
+ x0: 38,
+ y0: 34,
+ x1: 47,
+ y1: 47,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 10.322034,
+ },
+ BakedGlyph {
+ x0: 48,
+ y0: 34,
+ x1: 58,
+ y1: 47,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 11.898305,
+ },
+ BakedGlyph {
+ x0: 59,
+ y0: 34,
+ x1: 67,
+ y1: 46,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 9.406779,
+ },
+ BakedGlyph {
+ x0: 68,
+ y0: 34,
+ x1: 76,
+ y1: 46,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 8.813560,
+ },
+ BakedGlyph {
+ x0: 77,
+ y0: 34,
+ x1: 86,
+ y1: 47,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 11.152542,
+ },
+ BakedGlyph {
+ x0: 87,
+ y0: 34,
+ x1: 97,
+ y1: 46,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 11.728813,
+ },
+ BakedGlyph {
+ x0: 98,
+ y0: 34,
+ x1: 100,
+ y1: 46,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 4.203390,
+ },
+ BakedGlyph {
+ x0: 101,
+ y0: 34,
+ x1: 108,
+ y1: 47,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 8.254237,
+ },
+ BakedGlyph {
+ x0: 109,
+ y0: 34,
+ x1: 118,
+ y1: 46,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 10.152542,
+ },
+ BakedGlyph {
+ x0: 1,
+ y0: 50,
+ x1: 9,
+ y1: 62,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 8.508474,
+ },
+ BakedGlyph {
+ x0: 10,
+ y0: 50,
+ x1: 23,
+ y1: 62,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 14.661017,
+ },
+ BakedGlyph {
+ x0: 24,
+ y0: 50,
+ x1: 34,
+ y1: 62,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 12.016949,
+ },
+ BakedGlyph {
+ x0: 35,
+ y0: 50,
+ x1: 47,
+ y1: 63,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 13.118644,
+ },
+ BakedGlyph {
+ x0: 48,
+ y0: 50,
+ x1: 57,
+ y1: 62,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 10.033898,
+ },
+ BakedGlyph {
+ x0: 58,
+ y0: 50,
+ x1: 70,
+ y1: 66,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 13.118644,
+ },
+ BakedGlyph {
+ x0: 71,
+ y0: 50,
+ x1: 81,
+ y1: 62,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 10.474576,
+ },
+ BakedGlyph {
+ x0: 82,
+ y0: 50,
+ x1: 91,
+ y1: 63,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 8.762712,
+ },
+ BakedGlyph {
+ x0: 92,
+ y0: 50,
+ x1: 101,
+ y1: 62,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 9.288136,
+ },
+ BakedGlyph {
+ x0: 102,
+ y0: 50,
+ x1: 112,
+ y1: 63,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 11.525424,
+ },
+ BakedGlyph {
+ x0: 113,
+ y0: 50,
+ x1: 124,
+ y1: 62,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 10.576271,
+ },
+ BakedGlyph {
+ x0: 1,
+ y0: 67,
+ x1: 16,
+ y1: 79,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 15.610169,
+ },
+ BakedGlyph {
+ x0: 17,
+ y0: 67,
+ x1: 27,
+ y1: 79,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 10.305085,
+ },
+ BakedGlyph {
+ x0: 28,
+ y0: 67,
+ x1: 38,
+ y1: 79,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 9.644068,
+ },
+ BakedGlyph {
+ x0: 39,
+ y0: 67,
+ x1: 48,
+ y1: 79,
+ xo: 0.000000,
+ yo: -12.000000,
+ xa: 9.491526,
+ },
+ BakedGlyph {
+ x0: 49,
+ y0: 67,
+ x1: 54,
+ y1: 85,
+ xo: 1.000000,
+ yo: -14.000000,
+ xa: 5.254237,
+ },
+ BakedGlyph {
+ x0: 55,
+ y0: 67,
+ x1: 63,
+ y1: 85,
+ xo: -1.000000,
+ yo: -14.000000,
+ xa: 6.084746,
+ },
+ BakedGlyph {
+ x0: 64,
+ y0: 67,
+ x1: 68,
+ y1: 85,
+ xo: 0.000000,
+ yo: -14.000000,
+ xa: 5.254237,
+ },
+ BakedGlyph {
+ x0: 69,
+ y0: 67,
+ x1: 77,
+ y1: 74,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 78,
+ y0: 67,
+ x1: 88,
+ y1: 69,
+ xo: -1.000000,
+ yo: 2.000000,
+ xa: 8.305085,
+ },
+ BakedGlyph {
+ x0: 89,
+ y0: 67,
+ x1: 93,
+ y1: 72,
+ xo: 1.000000,
+ yo: -14.000000,
+ xa: 6.372881,
+ },
+ BakedGlyph {
+ x0: 94,
+ y0: 67,
+ x1: 102,
+ y1: 77,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 8.627119,
+ },
+ BakedGlyph {
+ x0: 103,
+ y0: 67,
+ x1: 111,
+ y1: 82,
+ xo: 1.000000,
+ yo: -14.000000,
+ xa: 9.881356,
+ },
+ BakedGlyph {
+ x0: 112,
+ y0: 67,
+ x1: 120,
+ y1: 77,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 7.796610,
+ },
+ BakedGlyph {
+ x0: 1,
+ y0: 86,
+ x1: 10,
+ y1: 101,
+ xo: 0.000000,
+ yo: -14.000000,
+ xa: 9.881356,
+ },
+ BakedGlyph {
+ x0: 11,
+ y0: 86,
+ x1: 20,
+ y1: 96,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 9.288136,
+ },
+ BakedGlyph {
+ x0: 21,
+ y0: 86,
+ x1: 27,
+ y1: 100,
+ xo: 1.000000,
+ yo: -14.000000,
+ xa: 6.372881,
+ },
+ BakedGlyph {
+ x0: 28,
+ y0: 86,
+ x1: 37,
+ y1: 99,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 9.711864,
+ },
+ BakedGlyph {
+ x0: 38,
+ y0: 86,
+ x1: 46,
+ y1: 100,
+ xo: 1.000000,
+ yo: -14.000000,
+ xa: 9.644068,
+ },
+ BakedGlyph {
+ x0: 47,
+ y0: 86,
+ x1: 49,
+ y1: 99,
+ xo: 1.000000,
+ yo: -13.000000,
+ xa: 4.016949,
+ },
+ BakedGlyph {
+ x0: 50,
+ y0: 86,
+ x1: 55,
+ y1: 103,
+ xo: -2.000000,
+ yo: -13.000000,
+ xa: 4.016949,
+ },
+ BakedGlyph {
+ x0: 56,
+ y0: 86,
+ x1: 64,
+ y1: 100,
+ xo: 1.000000,
+ yo: -14.000000,
+ xa: 8.389831,
+ },
+ BakedGlyph {
+ x0: 65,
+ y0: 86,
+ x1: 68,
+ y1: 101,
+ xo: 1.000000,
+ yo: -14.000000,
+ xa: 4.322034,
+ },
+ BakedGlyph {
+ x0: 69,
+ y0: 86,
+ x1: 82,
+ y1: 95,
+ xo: 1.000000,
+ yo: -9.000000,
+ xa: 14.627119,
+ },
+ BakedGlyph {
+ x0: 83,
+ y0: 86,
+ x1: 91,
+ y1: 95,
+ xo: 1.000000,
+ yo: -9.000000,
+ xa: 9.644068,
+ },
+ BakedGlyph {
+ x0: 92,
+ y0: 86,
+ x1: 101,
+ y1: 96,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 9.864407,
+ },
+ BakedGlyph {
+ x0: 102,
+ y0: 86,
+ x1: 110,
+ y1: 99,
+ xo: 1.000000,
+ yo: -9.000000,
+ xa: 9.881356,
+ },
+ BakedGlyph {
+ x0: 111,
+ y0: 86,
+ x1: 120,
+ y1: 99,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 9.881356,
+ },
+ BakedGlyph {
+ x0: 1,
+ y0: 104,
+ x1: 7,
+ y1: 113,
+ xo: 1.000000,
+ yo: -9.000000,
+ xa: 6.338983,
+ },
+ BakedGlyph {
+ x0: 8,
+ y0: 104,
+ x1: 15,
+ y1: 114,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 7.254237,
+ },
+ BakedGlyph {
+ x0: 16,
+ y0: 104,
+ x1: 22,
+ y1: 117,
+ xo: 1.000000,
+ yo: -12.000000,
+ xa: 6.559322,
+ },
+ BakedGlyph {
+ x0: 23,
+ y0: 104,
+ x1: 31,
+ y1: 114,
+ xo: 1.000000,
+ yo: -9.000000,
+ xa: 9.644068,
+ },
+ BakedGlyph {
+ x0: 32,
+ y0: 104,
+ x1: 40,
+ y1: 113,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 8.135593,
+ },
+ BakedGlyph {
+ x0: 41,
+ y0: 104,
+ x1: 54,
+ y1: 113,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 13.135593,
+ },
+ BakedGlyph {
+ x0: 55,
+ y0: 104,
+ x1: 63,
+ y1: 113,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 8.457627,
+ },
+ BakedGlyph {
+ x0: 64,
+ y0: 104,
+ x1: 72,
+ y1: 117,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 8.033898,
+ },
+ BakedGlyph {
+ x0: 73,
+ y0: 104,
+ x1: 81,
+ y1: 113,
+ xo: 0.000000,
+ yo: -9.000000,
+ xa: 7.711864,
+ },
+ BakedGlyph {
+ x0: 82,
+ y0: 104,
+ x1: 88,
+ y1: 122,
+ xo: 0.000000,
+ yo: -14.000000,
+ xa: 5.406780,
+ },
+ BakedGlyph {
+ x0: 89,
+ y0: 104,
+ x1: 91,
+ y1: 122,
+ xo: 1.000000,
+ yo: -14.000000,
+ xa: 4.440678,
+ },
+ BakedGlyph {
+ x0: 92,
+ y0: 104,
+ x1: 97,
+ y1: 122,
+ xo: 0.000000,
+ yo: -14.000000,
+ xa: 5.406780,
+ },
+ BakedGlyph {
+ x0: 98,
+ y0: 104,
+ x1: 107,
+ y1: 108,
+ xo: 0.000000,
+ yo: -7.000000,
+ xa: 9.559322,
+ },
+ BakedGlyph {
+ x0: 108,
+ y0: 104,
+ x1: 116,
+ y1: 117,
+ xo: 0.000000,
+ yo: -13.000000,
+ xa: 8.474576,
+ },
+];
+
+pub const FONT_BITMAP: [u8; 16384] = [
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x34, 0xae, 0x00, 0x00, 0x81, 0x90, 0x00, 0xe0, 0x31, 0x00, 0x00, 0x00, 0x00, 0x06,
+ 0xba, 0x05, 0x00, 0x00, 0xa2, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x0d, 0x00, 0x00, 0x00,
+ 0x00, 0x16, 0xb2, 0xec, 0xbc, 0x1f, 0x00, 0x00, 0x00, 0x49, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0d, 0x9d, 0xeb, 0xe5, 0x89, 0x03, 0x00, 0x00, 0x00, 0x00, 0x81, 0x90, 0x00, 0x00, 0x00,
+ 0x00, 0x13, 0x00, 0x00, 0x11, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x6b, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x76, 0x00,
+ 0x3b, 0x70, 0x70, 0x70, 0x22, 0x00, 0x56, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x2d, 0x1e, 0x00, 0x00, 0x18, 0xac, 0xea, 0xd2, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x45, 0xe9, 0x00, 0x00, 0x8a, 0x99, 0x00, 0xf6, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x2f,
+ 0xd8, 0x00, 0x00, 0x08, 0xf7, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x52, 0x00, 0x00, 0x00,
+ 0x00, 0xa5, 0x8f, 0x0c, 0x7d, 0xba, 0x00, 0x00, 0x06, 0xda, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x92, 0xb9, 0x20, 0x28, 0xd7, 0x64, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x99, 0x00, 0x00, 0x00,
+ 0x28, 0xdd, 0x03, 0x00, 0xa5, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x7f, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x00,
+ 0x54, 0xa0, 0xa0, 0xa0, 0x31, 0x00, 0xbb, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0xe0, 0x34, 0x00, 0x0b, 0xd7, 0x95, 0x1d, 0x40, 0xe1, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x45, 0xe9, 0x00, 0x00, 0x7a, 0x88, 0x00, 0xe6, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x60,
+ 0xa8, 0x00, 0x00, 0x34, 0xd3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x6b, 0x0b, 0x00, 0x00,
+ 0x00, 0xea, 0x22, 0x00, 0x10, 0xf7, 0x05, 0x00, 0x73, 0xab, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xd6, 0x50, 0x00, 0x00, 0x81, 0x98, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x88, 0x00, 0x00, 0x00,
+ 0xb4, 0x6a, 0x00, 0x00, 0x2e, 0xe4, 0x0d, 0x00, 0x00, 0x24, 0xcd, 0x61, 0x65, 0x62, 0x61, 0xcd,
+ 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x83, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c,
+ 0xda, 0x00, 0x00, 0x5e, 0xd0, 0x03, 0x00, 0x00, 0x49, 0xe6, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x44, 0xe9, 0x00, 0x00, 0x5a, 0x67, 0x00, 0xbf, 0x02, 0x00, 0x1b, 0x86, 0x86, 0xc4,
+ 0xc5, 0x86, 0x86, 0xb0, 0xd9, 0x86, 0x24, 0x00, 0x00, 0x57, 0xc9, 0xea, 0xd3, 0xef, 0x85, 0x00,
+ 0x00, 0xed, 0x1e, 0x00, 0x0d, 0xf7, 0x07, 0x15, 0xe8, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xbf, 0x65, 0x00, 0x00, 0xc6, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x67, 0x00, 0x00, 0x47,
+ 0xd7, 0x04, 0x00, 0x00, 0x00, 0x9d, 0x85, 0x00, 0x00, 0x0d, 0x55, 0x8d, 0xcc, 0xcc, 0x8c, 0x54,
+ 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x45, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x2e, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96,
+ 0x81, 0x00, 0x00, 0xb7, 0x80, 0x00, 0x00, 0x00, 0x04, 0xf1, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3d, 0xe3, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x21, 0x00, 0x00, 0x13, 0x5f, 0x5f, 0xe0,
+ 0x86, 0x5f, 0x5f, 0xc2, 0x9f, 0x5f, 0x1a, 0x00, 0x16, 0xf9, 0x3d, 0x01, 0x00, 0x03, 0x13, 0x00,
+ 0x00, 0xae, 0x80, 0x04, 0x6c, 0xc4, 0x00, 0x96, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x56, 0xe2, 0x1f, 0x8e, 0xc2, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xc7,
+ 0x4f, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xee, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0xb4, 0xb5, 0x37, 0x00,
+ 0x00, 0x00, 0x05, 0x5f, 0x5f, 0x5f, 0xd1, 0x8a, 0x5f, 0x5f, 0x3a, 0x00, 0x0b, 0x76, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xea,
+ 0x27, 0x00, 0x00, 0xd8, 0x4f, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x35, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xf2,
+ 0x16, 0x00, 0x00, 0xc6, 0x3f, 0x00, 0x00, 0x00, 0x65, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x1f, 0xc7, 0xef, 0xd1, 0x29, 0x2c, 0xe4, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0d, 0xd1, 0xfa, 0x8f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xf6,
+ 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0x3b, 0x00, 0x00, 0x23, 0xec, 0x3c, 0x3d, 0xea, 0x21,
+ 0x00, 0x00, 0x07, 0x93, 0x93, 0x93, 0xe0, 0xb0, 0x93, 0x93, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0xcd,
+ 0x00, 0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x25, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0xe4,
+ 0x00, 0x00, 0x03, 0xf4, 0x0f, 0x00, 0x00, 0x00, 0x4d, 0xec, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xba, 0x63, 0x07, 0x82, 0xc2, 0x8d, 0x0c, 0x00, 0x00, 0x00,
+ 0x24, 0xda, 0x7b, 0x97, 0xc2, 0x0b, 0x00, 0x01, 0xa2, 0x03, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xe1,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa3, 0x69, 0x00, 0x00, 0x0a, 0x5b, 0x00, 0x00, 0x5d, 0x0a,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x74,
+ 0x00, 0x00, 0x00, 0xf6, 0x3a, 0x00, 0x00, 0x00, 0x00, 0xab, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x09, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1e, 0x67, 0xbe,
+ 0x1e, 0x1e, 0x40, 0xe4, 0x1e, 0x1e, 0x08, 0x00, 0x01, 0x96, 0xf2, 0x91, 0x2b, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0xce, 0x02, 0x8c, 0xb1, 0x37, 0xa3, 0xa2, 0x00, 0x00, 0x00,
+ 0xc6, 0x75, 0x00, 0x01, 0x9c, 0xbe, 0x0a, 0x28, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0xbc,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0xf1, 0x1c,
+ 0x00, 0x00, 0x00, 0xde, 0x49, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xcb, 0xea, 0xe2,
+ 0xcb, 0xcb, 0xe1, 0xeb, 0xcb, 0xcb, 0x37, 0x00, 0x00, 0x00, 0x2d, 0x93, 0xee, 0xb4, 0x1f, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x05, 0xd8, 0x40, 0x00, 0xe2, 0x2e, 0x00, 0x19, 0xf5, 0x02, 0x00, 0x13,
+ 0xff, 0x1d, 0x00, 0x00, 0x02, 0xa1, 0xbb, 0x94, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x96,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xc0, 0x00,
+ 0x00, 0x00, 0x00, 0xc4, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x52,
+ 0x00, 0x00, 0x8b, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xa7, 0xd7, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x70, 0xad, 0x00, 0x00, 0xf2, 0x15, 0x00, 0x06, 0xf7, 0x0a, 0x00, 0x10,
+ 0xff, 0x23, 0x00, 0x00, 0x00, 0x03, 0xb2, 0xfb, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x9b,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb3, 0x67, 0x00,
+ 0x00, 0x00, 0x00, 0x77, 0xb5, 0x00, 0x00, 0x00, 0x2b, 0xf5, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x33, 0x8c, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x20,
+ 0x00, 0x00, 0xbd, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xfc, 0x2c,
+ 0x00, 0x00, 0x00, 0x13, 0xe7, 0x23, 0x00, 0x00, 0xc1, 0x5c, 0x00, 0x47, 0xd7, 0x00, 0x00, 0x00,
+ 0xb5, 0xaf, 0x0d, 0x00, 0x0a, 0x60, 0xe1, 0xbd, 0xa5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x51, 0xc1,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xf4, 0x13, 0x00,
+ 0x00, 0x00, 0x00, 0x19, 0xf3, 0x57, 0x00, 0x0b, 0xc0, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7f, 0xfe, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0xec, 0x00,
+ 0x00, 0x01, 0xee, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0xef, 0x0c,
+ 0x00, 0x00, 0x00, 0x94, 0x8a, 0x00, 0x00, 0x00, 0x35, 0xe8, 0xc4, 0xed, 0x44, 0x00, 0x00, 0x00,
+ 0x15, 0xa9, 0xf1, 0xdc, 0xea, 0xaf, 0x1e, 0x07, 0xc7, 0x73, 0x00, 0x00, 0x00, 0x00, 0x24, 0xe6,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0xb3, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x3c, 0xea, 0xdb, 0xf2, 0xae, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x9b, 0x61, 0x52, 0x6c, 0xd1, 0x89, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x34, 0x10, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x03, 0x1b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xf4,
+ 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x5a, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2c, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x69, 0x8f, 0xe2, 0xa5, 0x28, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xba,
+ 0x5e, 0x00, 0x00, 0x00, 0x00, 0x26, 0xe9, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xf2, 0x0b, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x52, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35,
+ 0xe1, 0x0a, 0x00, 0x00, 0x00, 0xaf, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xa6, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x46, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xa1, 0x7d, 0x00, 0x00, 0x3e, 0xd9, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x4d, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1a, 0xd2, 0x03, 0x00, 0xa0, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xed, 0x06, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x1a, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x28, 0xb6, 0x00, 0x14, 0x93, 0xe1, 0xe8, 0x99, 0x42, 0x00, 0x00, 0x00,
+ 0x2b, 0xaa, 0xea, 0xf3, 0xca, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0xbd,
+ 0x30, 0x00, 0x00, 0x00, 0x63, 0xbe, 0xbe, 0xbe, 0xbe, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
+ 0x5a, 0x8c, 0x92, 0x00, 0x00, 0x9e, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0x3a, 0x00, 0x00, 0x39,
+ 0xbe, 0xed, 0xde, 0x94, 0x0f, 0x00, 0x00, 0x00, 0x47, 0xc5, 0xf0, 0xce, 0x62, 0x00, 0x00, 0x00,
+ 0x6a, 0x88, 0x00, 0x00, 0x00, 0x6a, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x2a, 0x29, 0x00, 0x02, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x18, 0x00, 0x00, 0x4a, 0x0a,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xd0, 0xf3, 0xe5, 0xa3, 0x17, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x36, 0xe8, 0xfb, 0x00, 0x98, 0x8a, 0x21, 0x16, 0x68, 0xfb, 0x1d, 0x00, 0x00,
+ 0x3a, 0x6a, 0x22, 0x11, 0x62, 0xf8, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xd7, 0xed,
+ 0x41, 0x00, 0x00, 0x00, 0x8e, 0x8e, 0x38, 0x38, 0x38, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x42, 0xdd,
+ 0xa9, 0x5c, 0x2b, 0x00, 0x00, 0x39, 0x45, 0x45, 0x45, 0x45, 0x5a, 0xf1, 0x24, 0x00, 0x25, 0xef,
+ 0x54, 0x05, 0x17, 0xad, 0xb3, 0x00, 0x00, 0x3e, 0xe9, 0x46, 0x08, 0x39, 0xe1, 0x65, 0x00, 0x00,
+ 0xaf, 0xd8, 0x00, 0x00, 0x00, 0xaf, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x50, 0xbc,
+ 0xe2, 0x4f, 0x00, 0x0a, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0x7c, 0x00, 0x02, 0xaa, 0xe9,
+ 0x8b, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x49, 0x0e, 0x16, 0xae, 0xb1, 0x00, 0x00, 0x00,
+ 0x00, 0x0d, 0xad, 0xdf, 0x61, 0xfb, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xba, 0x7a, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xc6, 0x50, 0xd4,
+ 0x41, 0x00, 0x00, 0x00, 0x9b, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0xf1, 0x36,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x71, 0x00, 0x00, 0x7d, 0xa3,
+ 0x00, 0x00, 0x00, 0x18, 0xff, 0x13, 0x00, 0xb6, 0x78, 0x00, 0x00, 0x00, 0x4b, 0xe0, 0x04, 0x00,
+ 0x02, 0x05, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x00, 0x13, 0x76, 0xdf, 0xbe, 0x53,
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d,
+ 0x84, 0xe6, 0xb1, 0x45, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xeb, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x58, 0x08, 0x1e, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xa8, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x8a, 0x00, 0xd4,
+ 0x41, 0x00, 0x00, 0x00, 0xad, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xd0, 0x54, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xd4, 0x02, 0x00, 0x00, 0x8b, 0x93,
+ 0x00, 0x00, 0x00, 0x1e, 0xff, 0x18, 0x00, 0xe2, 0x4c, 0x00, 0x00, 0x00, 0x06, 0xfb, 0x24, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x9d, 0xe9, 0x94, 0x2a, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x06, 0x5b, 0xc5, 0xd6, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0xbd, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1e, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x69, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x3e, 0xe4, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x39, 0xd0, 0x07, 0x00, 0xd4,
+ 0x41, 0x00, 0x00, 0x00, 0xc5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0xeb, 0x04, 0x01,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xcc, 0x58, 0x00, 0x00, 0x00, 0x45, 0xe5,
+ 0x1a, 0x00, 0x00, 0x74, 0xc5, 0x00, 0x00, 0xd2, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x41, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0xd8, 0xcb, 0x58, 0x06, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x5c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x21, 0x89, 0xef, 0x73, 0x00, 0x00, 0x00, 0x00, 0x2b, 0xe6, 0x32, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1e, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd1, 0x06, 0x00, 0x00,
+ 0x00, 0x00, 0x82, 0xd2, 0xed, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x03, 0xcd, 0x3d, 0x00, 0x00, 0xd4,
+ 0x41, 0x00, 0x00, 0x00, 0xc5, 0xf6, 0xe8, 0xb5, 0x3e, 0x00, 0x00, 0x00, 0x71, 0xdc, 0xc6, 0xef,
+ 0xf3, 0xc1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xd8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x5c,
+ 0xe9, 0x8e, 0x7d, 0xd8, 0x20, 0x00, 0x00, 0x82, 0xd4, 0x1c, 0x00, 0x00, 0x16, 0xed, 0x39, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x46, 0xb3, 0xe4, 0x81, 0x1b,
+ 0x00, 0x00, 0x00, 0x05, 0x5b, 0x5b, 0x5b, 0x5b, 0x5b, 0x5b, 0x5b, 0x37, 0x00, 0x00, 0x00, 0x01,
+ 0x47, 0xb2, 0xe5, 0x81, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xdf, 0x49, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1e, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x67, 0xe2, 0x1f, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x25, 0x4b, 0x95, 0xea, 0x3f, 0x00, 0x00, 0x00, 0x63, 0xac, 0x00, 0x00, 0x00, 0xd4,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x6c, 0xee, 0x5c, 0x00, 0x00, 0x94, 0xb6, 0x29, 0x02,
+ 0x1d, 0x8a, 0xef, 0x11, 0x00, 0x00, 0x00, 0x00, 0xaf, 0x78, 0x00, 0x00, 0x00, 0x00, 0x03, 0x9e,
+ 0xc5, 0x6f, 0xc8, 0xc2, 0x19, 0x00, 0x00, 0x0c, 0xab, 0xfd, 0xc6, 0xcd, 0xdb, 0xff, 0x17, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x8d, 0xea,
+ 0xab, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x71, 0xda,
+ 0xc7, 0x5b, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1e, 0xfb, 0x00, 0x00, 0x00, 0x6f, 0xe1, 0x24, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0xe0, 0x01, 0x00, 0x02, 0xd9, 0x45, 0x16, 0x16, 0x16, 0xd7,
+ 0x51, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0xed, 0x01, 0x00, 0xa1, 0x81, 0x00, 0x00,
+ 0x00, 0x06, 0xf1, 0x65, 0x00, 0x00, 0x00, 0x0d, 0xf6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0xc8,
+ 0x07, 0x00, 0x00, 0x63, 0xe6, 0x0a, 0x00, 0x00, 0x00, 0x16, 0x3b, 0x26, 0x3e, 0xf2, 0x00, 0x00,
+ 0x56, 0x70, 0x00, 0x00, 0x00, 0x4a, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b,
+ 0x66, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x35,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xea, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1e, 0xfb, 0x00, 0x00, 0x59, 0xe6, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xff, 0x1c, 0x00, 0x1f, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xf7,
+ 0xdc, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xff, 0x20, 0x00, 0x64, 0x92, 0x00, 0x00,
+ 0x00, 0x00, 0xb4, 0x81, 0x00, 0x00, 0x00, 0x5a, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0x72,
+ 0x00, 0x00, 0x00, 0x00, 0xdc, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x9b, 0x00, 0x00,
+ 0xbb, 0xe4, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1e, 0xfb, 0x00, 0x13, 0xec, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0xfc, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xfe, 0x0d, 0x00, 0x21, 0xcc, 0x00, 0x00,
+ 0x00, 0x00, 0xca, 0x63, 0x00, 0x00, 0x00, 0x9b, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0x5e,
+ 0x00, 0x00, 0x00, 0x00, 0xce, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xed, 0x18, 0x00, 0x00,
+ 0x09, 0x11, 0x00, 0x00, 0x00, 0x9b, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1e, 0xfb, 0x00, 0x6d, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x25, 0x04, 0x00, 0x01, 0x32, 0xc1, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4,
+ 0x41, 0x00, 0x00, 0x22, 0x06, 0x00, 0x00, 0x10, 0xb0, 0xac, 0x00, 0x00, 0x00, 0xdd, 0x5b, 0x00,
+ 0x00, 0x4b, 0xec, 0x10, 0x00, 0x00, 0x00, 0xc6, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0xcb,
+ 0x11, 0x00, 0x00, 0x52, 0xeb, 0x14, 0x00, 0x00, 0x03, 0x22, 0x88, 0xda, 0x4b, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x8e, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1e, 0xfb, 0x00, 0x9b, 0xfb, 0xf6, 0xf6, 0xf6, 0xf6, 0xf6, 0x21, 0x00,
+ 0xa4, 0xf0, 0xcc, 0xe7, 0xfd, 0x9d, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4,
+ 0x41, 0x00, 0x00, 0x8f, 0xf2, 0xce, 0xd2, 0xf4, 0xa2, 0x13, 0x00, 0x00, 0x00, 0x33, 0xe0, 0xd8,
+ 0xcd, 0xe0, 0x3a, 0x00, 0x00, 0x00, 0x01, 0xf1, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x91,
+ 0xea, 0xbe, 0xcf, 0xdc, 0x3f, 0x00, 0x00, 0x52, 0xe1, 0xbf, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0b, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0xfe, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x17, 0x39, 0x2e, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x12, 0x37, 0x30, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x24,
+ 0x28, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x34, 0x24, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x7d, 0xb2, 0xdc, 0xe5, 0xb8, 0x84, 0x14, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x30, 0xbd, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xb2, 0xce, 0xd4,
+ 0xc2, 0x9a, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x90, 0xce, 0xf7, 0xea, 0xb6, 0x4c, 0x00,
+ 0x45, 0xb1, 0xcb, 0xd0, 0xb0, 0x8b, 0x34, 0x00, 0x00, 0x00, 0x00, 0x5a, 0xbe, 0xbe, 0xbe, 0xbe,
+ 0xbe, 0xbe, 0x3a, 0x00, 0x5a, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0x2a, 0x00, 0x00, 0x00, 0x11,
+ 0x8e, 0xcb, 0xf4, 0xdf, 0xbb, 0x5f, 0x00, 0x5a, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4,
+ 0x27, 0x00, 0x5a, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x94, 0x00, 0x5a, 0x81, 0x00,
+ 0x00, 0x00, 0x00, 0x21, 0xb7, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x54, 0xe4, 0x9c, 0x4a, 0x1d, 0x13, 0x45, 0x8c, 0xe7, 0x5c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xa6, 0xec, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xc0, 0x2c, 0x27,
+ 0x39, 0x74, 0xeb, 0x79, 0x00, 0x00, 0x00, 0x37, 0xe5, 0x9f, 0x43, 0x16, 0x29, 0x63, 0x62, 0x00,
+ 0x79, 0xc1, 0x31, 0x2d, 0x4f, 0x7b, 0xe7, 0xa6, 0x0f, 0x00, 0x00, 0x79, 0xc2, 0x41, 0x41, 0x41,
+ 0x41, 0x41, 0x14, 0x00, 0x79, 0xc2, 0x41, 0x41, 0x41, 0x41, 0x41, 0x0e, 0x00, 0x00, 0x37, 0xe4,
+ 0x9e, 0x3b, 0x13, 0x28, 0x5b, 0x83, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2,
+ 0x34, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xc7, 0x00, 0x79, 0xad, 0x00,
+ 0x00, 0x00, 0x1b, 0xda, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x39, 0xeb, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xe5, 0x44, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1f, 0xed, 0x45, 0xea, 0x09, 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00,
+ 0x00, 0x00, 0x42, 0xf4, 0x06, 0x00, 0x08, 0xd9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb6, 0xa5, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xda, 0x73,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2,
+ 0x34, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xc7, 0x00, 0x79, 0xad, 0x00,
+ 0x00, 0x1b, 0xd9, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x07, 0xd6, 0x67, 0x00, 0x00, 0x19, 0x63, 0x86, 0x70, 0x36, 0x00, 0x53, 0xe2, 0x0e, 0x00,
+ 0x00, 0x00, 0x00, 0x89, 0x93, 0x00, 0xcb, 0x61, 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00,
+ 0x00, 0x00, 0x1b, 0xfd, 0x13, 0x00, 0x72, 0xd4, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xf0, 0x4d, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0xd1, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2,
+ 0x34, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xc7, 0x00, 0x79, 0xad, 0x00,
+ 0x1d, 0xd9, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4f, 0xd4, 0x02, 0x00, 0x3f, 0xe7, 0x94, 0x64, 0x8d, 0xe1, 0x00, 0x00, 0xc8, 0x50, 0x00,
+ 0x00, 0x00, 0x08, 0xea, 0x29, 0x00, 0x60, 0xc9, 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0xc2, 0x00, 0x00, 0xac, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x8d, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x81, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2,
+ 0x34, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xc7, 0x00, 0x79, 0xad, 0x22,
+ 0xda, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x7b, 0x99, 0x00, 0x05, 0xdc, 0x5a, 0x00, 0x00, 0x34, 0xe1, 0x00, 0x00, 0x91, 0x82, 0x00,
+ 0x00, 0x00, 0x5d, 0xc5, 0x00, 0x00, 0x0b, 0xf1, 0x32, 0x00, 0x00, 0x00, 0x79, 0xdf, 0x9c, 0x9c,
+ 0xa6, 0xd5, 0xcc, 0x12, 0x00, 0x00, 0xd7, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xbb, 0x00, 0x79, 0xe3, 0xa9, 0xa9, 0xa9,
+ 0xa9, 0x75, 0x00, 0x00, 0x79, 0xdf, 0x9c, 0x9c, 0x9c, 0x9c, 0x5c, 0x00, 0x00, 0xd7, 0x5c, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xe2, 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, 0xfa,
+ 0x34, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xc7, 0x00, 0x79, 0xcf, 0xe6,
+ 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xa7, 0x70, 0x00, 0x2b, 0xf3, 0x01, 0x00, 0x00, 0x34, 0xe1, 0x00, 0x00, 0x6c, 0xab, 0x00,
+ 0x00, 0x00, 0xc1, 0x64, 0x00, 0x00, 0x00, 0x99, 0x97, 0x00, 0x00, 0x00, 0x79, 0xcc, 0x5f, 0x5f,
+ 0x66, 0x80, 0xd4, 0xc1, 0x0f, 0x00, 0xe2, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0xc6, 0x00, 0x79, 0xc7, 0x52, 0x52, 0x52,
+ 0x52, 0x39, 0x00, 0x00, 0x79, 0xcd, 0x63, 0x63, 0x63, 0x63, 0x3b, 0x00, 0x00, 0xe2, 0x52, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x16, 0x8f, 0x00, 0x79, 0xca, 0x5b, 0x5b, 0x5b, 0x5b, 0x5b, 0x5b, 0xf7,
+ 0x34, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xc7, 0x00, 0x79, 0xc5, 0xba,
+ 0xd2, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xb9, 0x60, 0x00, 0x3d, 0xe4, 0x00, 0x00, 0x00, 0x34, 0xe1, 0x00, 0x00, 0x79, 0x98, 0x00,
+ 0x00, 0x24, 0xfb, 0x41, 0x34, 0x34, 0x34, 0x68, 0xf0, 0x0a, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00,
+ 0x00, 0x00, 0x08, 0xce, 0x80, 0x00, 0xbb, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x98, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x72, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x27, 0xff, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2,
+ 0x34, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xc7, 0x00, 0x79, 0xad, 0x01,
+ 0x74, 0xea, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8f, 0x87, 0x00, 0x16, 0xfd, 0x15, 0x00, 0x00, 0x34, 0xe1, 0x00, 0x00, 0xb4, 0x6d, 0x00,
+ 0x00, 0x85, 0xe3, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xee, 0x5e, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x89, 0xb2, 0x00, 0x90, 0xae, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xdb, 0x66, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0xaf, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x27, 0xff, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2,
+ 0x34, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xc0, 0x00, 0x79, 0xad, 0x00,
+ 0x00, 0x50, 0xec, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x64, 0xb2, 0x00, 0x00, 0xa8, 0xae, 0x0e, 0x00, 0x3d, 0xfb, 0x16, 0x4b, 0xec, 0x0f, 0x00,
+ 0x02, 0xe2, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xbf, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xb4, 0x90, 0x00, 0x21, 0xf5, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0xce, 0x06, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xf6, 0x32,
+ 0x00, 0x00, 0x00, 0x00, 0x27, 0xff, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2,
+ 0x34, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xa5, 0x00, 0x79, 0xad, 0x00,
+ 0x00, 0x00, 0x52, 0xee, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x2a, 0xf3, 0x24, 0x00, 0x0f, 0x96, 0xe4, 0xe3, 0xc4, 0xa4, 0xf0, 0xcd, 0x33, 0x00, 0x00,
+ 0x45, 0xe5, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xfd, 0x22, 0x00, 0x79, 0xad, 0x00, 0x00,
+ 0x00, 0x21, 0x8d, 0xed, 0x2a, 0x00, 0x00, 0x74, 0xec, 0x50, 0x04, 0x00, 0x00, 0x11, 0x33, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x0d, 0x37, 0xb5, 0xdf, 0x27, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xec,
+ 0x53, 0x05, 0x00, 0x00, 0x28, 0xff, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2,
+ 0x34, 0x00, 0x79, 0xad, 0x00, 0x4f, 0x28, 0x00, 0x04, 0x48, 0xf5, 0x51, 0x00, 0x79, 0xad, 0x00,
+ 0x00, 0x00, 0x00, 0x6e, 0xe1, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x8a, 0xbf, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xa4, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x81, 0x00, 0x65, 0xf3, 0xeb, 0xe4,
+ 0xef, 0xe5, 0x97, 0x29, 0x00, 0x00, 0x00, 0x00, 0x4c, 0xdd, 0xf5, 0xd1, 0xe2, 0xf7, 0x95, 0x00,
+ 0x65, 0xf3, 0xef, 0xeb, 0xf0, 0xcc, 0x74, 0x07, 0x00, 0x00, 0x00, 0x79, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xbe, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4b,
+ 0xd9, 0xf7, 0xd1, 0xd4, 0xf2, 0xd1, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2,
+ 0x34, 0x00, 0x79, 0xad, 0x00, 0x75, 0xf0, 0xd8, 0xe9, 0xfd, 0x86, 0x02, 0x00, 0x79, 0xad, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xad, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x08, 0xcf, 0xbd, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x15,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x3a, 0x30, 0x0a, 0x00, 0x00,
+ 0x00, 0x02, 0x10, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x34, 0x24, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x33, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x07, 0x78, 0xeb, 0xba, 0x91, 0x72, 0x7c, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x41, 0x68, 0x84, 0x76, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x5a, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x37, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x6e, 0x77, 0x00, 0x00, 0x5a, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x7a, 0x5d, 0x00, 0x00, 0x00, 0x13, 0x93, 0xcd, 0xf3, 0xd3, 0x9e, 0x1e, 0x00, 0x00, 0x00, 0x00,
+ 0x44, 0xaf, 0xca, 0xd3, 0xbc, 0x9b, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x93, 0xcd, 0xf3,
+ 0xd3, 0x9e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x44, 0xaf, 0xca, 0xd3, 0xbc, 0x99, 0x36, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x09, 0x63, 0xab, 0xee, 0xed, 0xb8, 0x4b, 0x00, 0x00, 0x84, 0xbe, 0xbe, 0xbe,
+ 0xbe, 0xbe, 0xbe, 0xbe, 0xbb, 0x00, 0x64, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xbe, 0x0a,
+ 0x00, 0x85, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xb1, 0x34, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0xff, 0xc4, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1a, 0xf4, 0xb2, 0x00, 0x00, 0x79, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xa4, 0x7d, 0x00, 0x00, 0x3c, 0xe8, 0x9c, 0x3f, 0x16, 0x39, 0x8c, 0xee, 0x4f, 0x00, 0x00, 0x00,
+ 0x79, 0xc2, 0x34, 0x2b, 0x3d, 0x7d, 0xed, 0x83, 0x00, 0x00, 0x00, 0x3c, 0xe8, 0x9c, 0x3f, 0x16,
+ 0x39, 0x8c, 0xee, 0x4f, 0x00, 0x00, 0x00, 0x79, 0xc2, 0x35, 0x2b, 0x3c, 0x7b, 0xed, 0x78, 0x00,
+ 0x00, 0x00, 0x00, 0x6a, 0xc2, 0x30, 0x08, 0x1e, 0x5e, 0x58, 0x00, 0x00, 0x2d, 0x41, 0x41, 0x41,
+ 0xf2, 0x6b, 0x41, 0x41, 0x40, 0x00, 0x86, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xff, 0x0d,
+ 0x00, 0x63, 0xe1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xed, 0x07, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xef, 0xdd, 0x4e, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x98, 0xcd, 0xc8, 0x00, 0x00, 0x79, 0xc4, 0xe6, 0x4b, 0x00, 0x00, 0x00, 0x00,
+ 0xa4, 0x7d, 0x00, 0x09, 0xdd, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0xed, 0x16, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x32, 0xfe, 0x27, 0x00, 0x09, 0xdd, 0x71, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x53, 0xed, 0x16, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x3b, 0xfd, 0x1a,
+ 0x00, 0x00, 0x02, 0xd8, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xee, 0x38, 0x00, 0x00, 0x00, 0x00, 0x86, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xff, 0x0d,
+ 0x00, 0x0f, 0xf7, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0xd8, 0x61, 0xcb, 0x01, 0x00,
+ 0x00, 0x00, 0x1f, 0xea, 0x4a, 0xdd, 0x00, 0x00, 0x79, 0xa9, 0x3d, 0xe9, 0x1f, 0x00, 0x00, 0x00,
+ 0xa4, 0x7d, 0x00, 0x76, 0xd4, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb9, 0x94, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x5b, 0x00, 0x76, 0xd4, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xb9, 0x94, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x49,
+ 0x00, 0x00, 0x09, 0xfc, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xee, 0x38, 0x00, 0x00, 0x00, 0x00, 0x86, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xff, 0x0d,
+ 0x00, 0x00, 0xac, 0x93, 0x00, 0x00, 0x00, 0x00, 0x04, 0xe9, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4e, 0xc4, 0x05, 0xdf, 0x4a, 0x00,
+ 0x00, 0x00, 0x97, 0x84, 0x27, 0xf3, 0x00, 0x00, 0x79, 0xa9, 0x00, 0x79, 0xc8, 0x06, 0x00, 0x00,
+ 0xa4, 0x7d, 0x00, 0xad, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0xcb, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x01, 0xed, 0x47, 0x00, 0xad, 0x81, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x62, 0xcb, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x09, 0xf9, 0x1f,
+ 0x00, 0x00, 0x00, 0xaf, 0xc5, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xee, 0x38, 0x00, 0x00, 0x00, 0x00, 0x86, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xff, 0x0d,
+ 0x00, 0x00, 0x4f, 0xea, 0x05, 0x00, 0x00, 0x00, 0x49, 0xdc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0xb1, 0x00, 0x6a, 0xc2, 0x00,
+ 0x00, 0x18, 0xed, 0x15, 0x14, 0xff, 0x09, 0x00, 0x79, 0xa9, 0x00, 0x02, 0xbc, 0x88, 0x00, 0x00,
+ 0xa4, 0x7d, 0x00, 0xd8, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xf4, 0x02, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x75, 0xeb, 0x10, 0x00, 0xd8, 0x5c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3e, 0xf4, 0x02, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x08, 0x95, 0xc4, 0x00,
+ 0x00, 0x00, 0x00, 0x0e, 0x9f, 0xf5, 0x9e, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xee, 0x38, 0x00, 0x00, 0x00, 0x00, 0x86, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xff, 0x0d,
+ 0x00, 0x00, 0x05, 0xe8, 0x4a, 0x00, 0x00, 0x00, 0xa4, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x9d, 0x00, 0x09, 0xe8, 0x3a,
+ 0x00, 0x88, 0x92, 0x00, 0x03, 0xfd, 0x1b, 0x00, 0x79, 0xa9, 0x00, 0x00, 0x1b, 0xea, 0x3c, 0x00,
+ 0xa4, 0x7d, 0x00, 0xe1, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0xfa, 0x05, 0x00,
+ 0x79, 0xd9, 0x8a, 0x90, 0xa1, 0xdb, 0xda, 0x38, 0x00, 0x00, 0xe2, 0x54, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x35, 0xfc, 0x06, 0x00, 0x79, 0xe9, 0xba, 0xbd, 0xc9, 0xf2, 0x90, 0x0f, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x92, 0xf2, 0xa9, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xee, 0x38, 0x00, 0x00, 0x00, 0x00, 0x86, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xff, 0x0d,
+ 0x00, 0x00, 0x00, 0x8c, 0xa9, 0x00, 0x00, 0x0f, 0xf3, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x90, 0x00, 0x00, 0x79, 0xb0,
+ 0x0d, 0xea, 0x1f, 0x00, 0x00, 0xf2, 0x29, 0x00, 0x79, 0xa9, 0x00, 0x00, 0x00, 0x57, 0xdc, 0x0b,
+ 0xa4, 0x7d, 0x00, 0xb8, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xd6, 0x00, 0x00,
+ 0x79, 0xd2, 0x75, 0x6f, 0x5a, 0x37, 0x01, 0x00, 0x00, 0x00, 0xb9, 0x77, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x59, 0xdc, 0x00, 0x00, 0x79, 0xc2, 0x41, 0x40, 0x4a, 0xf0, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xc5, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xee, 0x38, 0x00, 0x00, 0x00, 0x00, 0x84, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x0b,
+ 0x00, 0x00, 0x00, 0x29, 0xf7, 0x12, 0x00, 0x66, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x85, 0x00, 0x00, 0x10, 0xf0,
+ 0x96, 0xa0, 0x00, 0x00, 0x00, 0xe7, 0x38, 0x00, 0x79, 0xa9, 0x00, 0x00, 0x00, 0x00, 0xab, 0x8a,
+ 0xa4, 0x7d, 0x00, 0x8b, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0xa9, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8b, 0xb8, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x9a, 0xab, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x62, 0xe3, 0x12, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0xfd, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xee, 0x38, 0x00, 0x00, 0x00, 0x00, 0x6b, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xef, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xbe, 0x6e, 0x00, 0xca, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9f, 0x7a, 0x00, 0x00, 0x00, 0x8e,
+ 0xff, 0x2d, 0x00, 0x00, 0x00, 0xdb, 0x47, 0x00, 0x79, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x16, 0xe8,
+ 0xcf, 0x7d, 0x00, 0x1d, 0xf3, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xf7, 0x31, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xf4, 0x43, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x29, 0xf9, 0x32, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0xb1, 0xa4, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0xe9, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xee, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xf3, 0x16, 0x00, 0x00, 0x00, 0x00, 0x86, 0xc0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x55, 0xd7, 0x35, 0xe4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6f, 0x00, 0x00, 0x00, 0x15,
+ 0x46, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x56, 0x00, 0x79, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61,
+ 0xff, 0x7d, 0x00, 0x00, 0x6b, 0xf1, 0x5c, 0x05, 0x00, 0x03, 0x4c, 0xe9, 0x84, 0x00, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0xf1, 0x5c, 0x05, 0x00,
+ 0x03, 0x4c, 0xe9, 0x84, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x1b, 0xf0, 0x44,
+ 0x00, 0x00, 0x15, 0x47, 0x02, 0x00, 0x00, 0x15, 0xb7, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xee, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0xb7, 0x14, 0x00, 0x00, 0x4f, 0xf5, 0x4a, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0xe1, 0xd3, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x34, 0x00, 0xbb, 0x64, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x65, 0x00, 0x79, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0xc4, 0x7d, 0x00, 0x00, 0x00, 0x41, 0xd4, 0xf7, 0xd4, 0xf4, 0xde, 0x52, 0x00, 0x00, 0x00, 0x00,
+ 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0xd4, 0xf7, 0xd4,
+ 0xf4, 0xd5, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x79, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0xcc,
+ 0x01, 0x00, 0x33, 0xda, 0xee, 0xc9, 0xd9, 0xdc, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xee, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xaf, 0xf6, 0xd5, 0xe7, 0xeb, 0x58, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0xf7, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x35, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x94,
+ 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1b, 0x38, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x32, 0x1f, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
+ 0xd6, 0xa9, 0x37, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0a, 0x75, 0xce, 0xf0, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x3e, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xb1,
+ 0x00, 0x18, 0xba, 0x29, 0x00, 0x00, 0x00, 0x00, 0x07, 0xac, 0x40, 0x00, 0x77, 0x85, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x07, 0xb2, 0x32, 0x00, 0x06, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0x7a,
+ 0x00, 0x15, 0x45, 0x45, 0x45, 0x08, 0x00, 0x18, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3c, 0x45, 0x45, 0x27, 0x00, 0x00, 0x00, 0x07, 0xb1, 0x65, 0x00, 0x00, 0x00, 0x00, 0x12, 0xcf,
+ 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0x51, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c,
+ 0xc9, 0xea, 0xe5, 0xad, 0x20, 0x00, 0x00, 0x02, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x1e, 0xa5, 0xde, 0xea, 0xc5, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x2c, 0xfc, 0x09, 0x00, 0x00, 0x00, 0x00, 0x39, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x62, 0xc5,
+ 0x00, 0x00, 0x81, 0xc9, 0x04, 0x00, 0x00, 0x00, 0x87, 0xbb, 0x01, 0x00, 0x28, 0xf8, 0x29, 0x00,
+ 0x00, 0x00, 0x00, 0x6f, 0xc4, 0x01, 0x00, 0x02, 0x41, 0x41, 0x41, 0x41, 0x41, 0x49, 0xe8, 0x72,
+ 0x00, 0x4e, 0xe4, 0x93, 0x93, 0x11, 0x00, 0x20, 0xee, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x7f, 0x93, 0xc8, 0x8f, 0x00, 0x00, 0x00, 0x75, 0xae, 0xe3, 0x14, 0x00, 0x00, 0x00, 0x03, 0x23,
+ 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x0d, 0x00, 0xae, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x09,
+ 0x35, 0x12, 0x1b, 0x8f, 0xd4, 0x03, 0x00, 0x89, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x1f, 0xeb, 0xb4, 0x47, 0x13, 0x3e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x05, 0xf9, 0x33, 0x00, 0x00, 0x00, 0x05, 0xec, 0x96, 0x00, 0x00, 0x00, 0x00, 0x94, 0x96,
+ 0x00, 0x00, 0x05, 0xcd, 0x78, 0x00, 0x00, 0x37, 0xec, 0x1d, 0x00, 0x00, 0x00, 0x95, 0xa9, 0x00,
+ 0x00, 0x00, 0x0c, 0xe7, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0xaa, 0x01,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x00, 0x14, 0xe3, 0x19, 0x7d, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0xe0, 0x76, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x05, 0xef, 0x2b, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xa3, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xd2, 0x62, 0x00, 0x00, 0x00, 0x47, 0xee, 0xe7, 0x02, 0x00, 0x00, 0x00, 0xc7, 0x66,
+ 0x00, 0x00, 0x00, 0x2c, 0xf1, 0x2b, 0x08, 0xd6, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x15, 0xee, 0x35,
+ 0x00, 0x00, 0x81, 0xa2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0xd9, 0x0d, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6b, 0xab, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x00, 0x92, 0x7e, 0x00, 0x0a, 0xdf, 0x27, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0xc2, 0x3d, 0x00, 0x00, 0x00,
+ 0x03, 0x27, 0x3b, 0x24, 0xd7, 0x44, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xe6, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x9f, 0x96, 0x00, 0x00, 0x00, 0x9c, 0x7a, 0xe1, 0x3e, 0x00, 0x00, 0x04, 0xf5, 0x31,
+ 0x00, 0x00, 0x00, 0x00, 0x75, 0xcb, 0x8e, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0xcd,
+ 0x03, 0x23, 0xe7, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0xee, 0x2f, 0x00, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0xf2, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x26, 0xe0, 0x0b, 0x00, 0x00, 0x61, 0xb0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x45,
+ 0xde, 0xd0, 0xb7, 0xce, 0xfc, 0x45, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0xfe, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x6a, 0xca, 0x00, 0x00, 0x05, 0xec, 0x22, 0x8d, 0x92, 0x00, 0x00, 0x2d, 0xf5, 0x05,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0xcb, 0xf2, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xc7,
+ 0x6e, 0xb5, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xd0, 0x6d, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0xaf, 0x62, 0x00, 0x00, 0x00, 0x02, 0xd0, 0x3f, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xf0,
+ 0x54, 0x00, 0x00, 0x00, 0xd4, 0x45, 0x00, 0x8a, 0xb6, 0xa9, 0xdd, 0xd7, 0x9c, 0x15, 0x00, 0x00,
+ 0x00, 0xf0, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x34, 0xf9, 0x09, 0x00, 0x48, 0xc6, 0x00, 0x33, 0xe4, 0x03, 0x00, 0x66, 0xc3, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1e, 0xeb, 0xe9, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e,
+ 0xf4, 0xc9, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0xb9, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0xba, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x31, 0x03, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0d, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0xfc,
+ 0x04, 0x00, 0x00, 0x00, 0xd4, 0x45, 0x00, 0x8a, 0xdb, 0x56, 0x19, 0x2e, 0x95, 0xe3, 0x11, 0x00,
+ 0x00, 0xbf, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x04, 0xf0, 0x41, 0x00, 0xa7, 0x6a, 0x00, 0x00, 0xd6, 0x4a, 0x00, 0xa5, 0x84, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0xbd, 0x79, 0x49, 0xe9, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xc0, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0xec, 0x1c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xf3, 0x18, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xf1,
+ 0x58, 0x00, 0x00, 0x00, 0xd4, 0x45, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x83, 0x00,
+ 0x00, 0x42, 0xef, 0x4c, 0x01, 0x00, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xb2, 0x7f, 0x12, 0xef, 0x12, 0x00, 0x00, 0x76, 0xaf, 0x00, 0xe4, 0x41, 0x00,
+ 0x00, 0x00, 0x00, 0x6f, 0xc7, 0x03, 0x00, 0x9b, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xbe, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xcf, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6e, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4b,
+ 0xe4, 0xdf, 0xce, 0xdb, 0xf0, 0x39, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x5b, 0xc7, 0x00,
+ 0x00, 0x00, 0x50, 0xe1, 0xf1, 0xda, 0xee, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x6d, 0xc7, 0x6c, 0xa2, 0x00, 0x00, 0x00, 0x17, 0xf6, 0x3e, 0xf4, 0x08, 0x00,
+ 0x00, 0x00, 0x1c, 0xed, 0x29, 0x00, 0x00, 0x0f, 0xe4, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xbe, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xc3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0xc8, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x1f, 0x2c, 0x1a, 0x01, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x44, 0xe8, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1c, 0xfb, 0xd9, 0x3a, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xd7, 0xad, 0x00, 0x00,
+ 0x00, 0x00, 0xa8, 0x82, 0x00, 0x00, 0x00, 0x00, 0x53, 0xdf, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xbe, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xec, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xef, 0x23, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xcd, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xff, 0x5c, 0x00, 0x00,
+ 0x00, 0x40, 0xe4, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xbe, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x7d, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x96, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xd6, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x26, 0x8e, 0xf0, 0x19, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe7, 0x31, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0xf4, 0xdc, 0xd5, 0xfd, 0xc8, 0x2d, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x8b, 0x00, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1d, 0x2d, 0x0f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0xe3, 0x02, 0x00,
+ 0x00, 0x00, 0x7d, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4e, 0xec, 0xb6, 0xb6, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xdc, 0x40, 0x00,
+ 0x9d, 0xb6, 0xda, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0b, 0x23, 0x23, 0x23, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x10, 0x00,
+ 0x1e, 0x23, 0x23, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x24, 0xae, 0xe4,
+ 0xa9, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x11, 0x00, 0x00, 0x00, 0x00, 0x17, 0x98,
+ 0xd1, 0xe4, 0xce, 0xa5, 0x20, 0x00, 0x02, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14,
+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x14, 0x14, 0x00, 0x02, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x0e, 0x00, 0x00, 0x48, 0xb3, 0xd3, 0xe5, 0xa4, 0x3e, 0x2f, 0xa4, 0xdd, 0xdb, 0xa5,
+ 0x17, 0x00, 0x00, 0x48, 0xb1, 0xd2, 0xe6, 0xcf, 0x8e, 0x09, 0x00, 0x00, 0x00, 0x00, 0x1b, 0xa3,
+ 0xdf, 0xd8, 0x94, 0x0e, 0x00, 0x00, 0x49, 0xb7, 0xd7, 0xe7, 0xc5, 0x80, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x11, 0x8f, 0xcb, 0xe7, 0xd4, 0xb1, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xab, 0x6c, 0x00, 0x00, 0x1f, 0xed, 0x72, 0x18,
+ 0x55, 0xd2, 0x8a, 0x00, 0x00, 0x00, 0x56, 0xbc, 0xe7, 0xec, 0x4e, 0x00, 0x00, 0x1d, 0xe9, 0x93,
+ 0x30, 0x18, 0x2f, 0xe3, 0x41, 0x00, 0x89, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6,
+ 0xb6, 0x00, 0x00, 0x00, 0x00, 0xb6, 0xb6, 0x00, 0x89, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8d, 0x8a, 0x00, 0x00, 0x8a, 0xab, 0x24, 0x18, 0x43, 0xe0, 0xe3, 0x5f, 0x20, 0x29, 0xa4,
+ 0xc8, 0x00, 0x00, 0x8a, 0xac, 0x25, 0x17, 0x35, 0xbd, 0xab, 0x00, 0x00, 0x00, 0x1b, 0xea, 0xb6,
+ 0x3e, 0x4d, 0xc7, 0xd6, 0x09, 0x00, 0x8a, 0xac, 0x25, 0x1c, 0x6c, 0xd3, 0xcf, 0x07, 0x00, 0x00,
+ 0x15, 0xe3, 0xc8, 0x60, 0x19, 0x29, 0xc3, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0xa5, 0x8c, 0x00, 0x00,
+ 0x00, 0x46, 0xf7, 0x0d, 0x00, 0x0a, 0xf1, 0x45, 0x03, 0x01, 0x04, 0x00, 0x00, 0xa4, 0xa1, 0x00,
+ 0x00, 0x00, 0x00, 0xd8, 0x41, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33,
+ 0x33, 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8f, 0x8a, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x68, 0xbf, 0x00, 0x00, 0x00, 0x11,
+ 0xfb, 0x1f, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x1d, 0xfa, 0x18, 0x00, 0x00, 0x9f, 0xb8, 0x00,
+ 0x00, 0x00, 0x00, 0xdb, 0x78, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x03, 0xe8, 0x78, 0x00, 0x00,
+ 0x9b, 0xcd, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0xe3, 0x4b, 0x16, 0x16,
+ 0x16, 0x1c, 0xf5, 0x2f, 0x00, 0x4d, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x3e, 0x00,
+ 0x00, 0x00, 0x00, 0xd8, 0x41, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8f, 0x8a, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x3d, 0xe0, 0x00, 0x00, 0x00, 0x00,
+ 0xe2, 0x3a, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x3a, 0x00, 0x00, 0xe4, 0x6e, 0x00,
+ 0x00, 0x00, 0x00, 0x90, 0xbf, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x98, 0xc1, 0x00, 0x00,
+ 0xe2, 0x79, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x08, 0xfe, 0xdd, 0xd8, 0xd8,
+ 0xd8, 0xd8, 0xd8, 0x3a, 0x00, 0x87, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfe, 0x24, 0x00,
+ 0x00, 0x00, 0x00, 0xd8, 0x41, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69,
+ 0x6d, 0x00, 0x00, 0x00, 0x00, 0x69, 0x6d, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8f, 0x8a, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x31, 0xe9, 0x00, 0x00, 0x00, 0x00,
+ 0xd5, 0x45, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xd2, 0x49, 0x00, 0x08, 0xfe, 0x2e, 0x00,
+ 0x00, 0x00, 0x00, 0x50, 0xe3, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x4b, 0xe7, 0x00, 0x08,
+ 0xfe, 0x2d, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x22, 0xa8, 0xdd, 0xd8, 0x9d, 0xc7, 0x6c, 0x00, 0x00, 0xf3, 0x4f, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0xe4, 0xc2, 0xc2, 0xc2, 0x10, 0x00, 0x00, 0xe3, 0x45, 0x00,
+ 0x00, 0x00, 0x00, 0xd8, 0x41, 0x00, 0x8a, 0xcf, 0xc2, 0xe4, 0xce, 0x8e, 0x0a, 0x00, 0x00, 0x8a,
+ 0x8f, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x0d, 0xad, 0x43, 0x00,
+ 0x00, 0x8f, 0x8a, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x30, 0xe9, 0x00, 0x00, 0x00, 0x00,
+ 0xd4, 0x45, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x49, 0x00, 0x00, 0xee, 0x5b, 0x00,
+ 0x00, 0x00, 0x00, 0x7e, 0xca, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x50, 0xd2, 0x00, 0x00,
+ 0xf2, 0x32, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x24, 0xed, 0x7f, 0x28, 0x1d, 0x62, 0xe8, 0x6c, 0x00, 0x00, 0xc3, 0xa2, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0xa2, 0x2b, 0x2b, 0x2b, 0x04, 0x00, 0x00, 0xa3, 0xaf, 0x00,
+ 0x00, 0x00, 0x00, 0xd9, 0x41, 0x00, 0x8a, 0xba, 0x37, 0x18, 0x35, 0xbd, 0xae, 0x00, 0x00, 0x8a,
+ 0x8f, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x8a, 0x8f, 0x00, 0x09, 0xbd, 0x7e, 0x00, 0x00,
+ 0x00, 0x8f, 0x8a, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x30, 0xe9, 0x00, 0x00, 0x00, 0x00,
+ 0xd4, 0x45, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x49, 0x00, 0x00, 0xba, 0xa5, 0x00,
+ 0x00, 0x00, 0x00, 0xc8, 0x94, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x93, 0xa0, 0x00, 0x00,
+ 0xc2, 0x74, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xa5, 0x95, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x46, 0xf1, 0x75, 0x1b,
+ 0x00, 0x03, 0x18, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xe1, 0xb6,
+ 0x62, 0x6e, 0xb6, 0xff, 0x41, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x1d, 0xfb, 0x18, 0x00, 0x8a,
+ 0x8f, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x8a, 0x8f, 0x08, 0xb8, 0x85, 0x00, 0x00, 0x00,
+ 0x00, 0x8f, 0x8a, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x30, 0xe9, 0x00, 0x00, 0x00, 0x00,
+ 0xd4, 0x45, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x49, 0x00, 0x00, 0x36, 0xf2, 0x77,
+ 0x0f, 0x18, 0x87, 0xf1, 0x1a, 0x00, 0x8a, 0xbf, 0x18, 0x00, 0x00, 0x4f, 0xf2, 0x28, 0x00, 0x00,
+ 0x44, 0xeb, 0x39, 0x00, 0x00, 0x22, 0xd4, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xe8, 0x3d, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x4d, 0xdd, 0xfc,
+ 0xdb, 0xf2, 0x7a, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x6f,
+ 0x9e, 0x9c, 0x55, 0xde, 0x3d, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x3a, 0x00, 0x8a,
+ 0x8f, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x8a, 0x97, 0xb6, 0x88, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8f, 0x8a, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x30, 0xe9, 0x00, 0x00, 0x00, 0x00,
+ 0xd4, 0x45, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x49, 0x00, 0x00, 0x00, 0x48, 0xe3,
+ 0xf0, 0xf7, 0xd4, 0x32, 0x00, 0x00, 0x8a, 0xd3, 0xe7, 0xd5, 0xea, 0xdd, 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x56, 0xe8, 0xe4, 0xd9, 0xdf, 0xdc, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
+ 0x25, 0x09, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x27, 0xff, 0x1c, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xd2, 0x49, 0x00, 0x8a,
+ 0x8f, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x8a, 0xdf, 0xf4, 0x38, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8f, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1e, 0x17, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x02, 0x20, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1f, 0x1b, 0x01, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xed, 0x62, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x09, 0x00,
+ 0x00, 0x1f, 0x9e, 0xcc, 0x01, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x49, 0x00, 0x8a,
+ 0x8f, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x8a, 0x8f, 0x4f, 0xed, 0x48, 0x00, 0x00, 0x00,
+ 0x00, 0x8f, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xb8, 0xb5, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0xf2, 0xd8,
+ 0xdc, 0xd3, 0x8e, 0x22, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x49, 0x00, 0x8a,
+ 0x8f, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x8a, 0x8f, 0x00, 0x3e, 0xed, 0x3b, 0x00, 0x00,
+ 0x00, 0x8e, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x31, 0xf6, 0x7f, 0x1c, 0x00, 0x00, 0xae, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x22,
+ 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x49, 0x00, 0x8a,
+ 0x8f, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8e, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x52, 0xe7, 0x1d, 0x00,
+ 0x00, 0x7b, 0xab, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0xd8, 0xfc, 0xd2, 0xe0, 0xf1, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x49, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x69, 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x92, 0xbc, 0x01,
+ 0x00, 0x1f, 0xdf, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x1a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1c, 0xe0, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x03, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x03, 0xd1, 0xe1, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x3d, 0xac, 0xd3, 0xe8, 0xd1, 0x0b, 0x00, 0x00, 0x2a, 0x91, 0xdc, 0xe5, 0xbd, 0x0a, 0x00,
+ 0x3e, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x59, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x24, 0x00,
+ 0x6b, 0x76, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x86, 0x00, 0x62, 0x7e, 0x00, 0x00, 0x00, 0x01, 0xb6,
+ 0x24, 0x00, 0x00, 0x00, 0x54, 0x7c, 0x00, 0x17, 0xbc, 0x26, 0x00, 0x00, 0x00, 0x92, 0x57, 0x00,
+ 0x6b, 0x77, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x00, 0x14, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xaf,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x07, 0x00, 0x15, 0x34, 0x00, 0x0d, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x15, 0x1a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x1c, 0xb6, 0xb6, 0xb6,
+ 0xb6, 0xb6, 0xb6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8a, 0xab, 0x1f, 0x13, 0x2a, 0x00, 0x00, 0x00, 0xc2, 0x66, 0x0a, 0x16, 0x44, 0x00, 0x00,
+ 0x9c, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x75, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x30, 0x00,
+ 0x4d, 0xd4, 0x00, 0x00, 0x00, 0x00, 0xa3, 0x6f, 0x00, 0x41, 0xda, 0x00, 0x00, 0x00, 0x27, 0xff,
+ 0x5f, 0x00, 0x00, 0x00, 0xa5, 0x63, 0x00, 0x00, 0x7b, 0xc6, 0x03, 0x00, 0x5c, 0xd0, 0x06, 0x00,
+ 0x4d, 0xd8, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x51, 0x00, 0x04, 0x2b, 0x2b, 0x2b, 0x2d, 0xcd, 0x96,
+ 0x00, 0x00, 0x00, 0x00, 0x11, 0xba, 0xd8, 0x35, 0x00, 0x4e, 0xbe, 0x00, 0xb0, 0xdc, 0x48, 0x00,
+ 0x00, 0x00, 0x00, 0x71, 0xdc, 0xde, 0xb6, 0x21, 0x00, 0x60, 0x8a, 0x00, 0x27, 0xbc, 0x23, 0x23,
+ 0x23, 0x23, 0x53, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xfa, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x9c, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x75, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x30, 0x00,
+ 0x0b, 0xf6, 0x1c, 0x00, 0x00, 0x02, 0xe8, 0x25, 0x00, 0x06, 0xf2, 0x1d, 0x00, 0x00, 0x6a, 0xe9,
+ 0x9d, 0x00, 0x00, 0x01, 0xe5, 0x1b, 0x00, 0x00, 0x03, 0xc6, 0x76, 0x1c, 0xe7, 0x2d, 0x00, 0x00,
+ 0x0b, 0xf5, 0x26, 0x00, 0x00, 0x07, 0xf4, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xc1, 0x05,
+ 0x00, 0x00, 0x00, 0x00, 0x78, 0xaa, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x46, 0xdb, 0x00,
+ 0x00, 0x00, 0x0a, 0xdb, 0x0c, 0x02, 0x69, 0xe5, 0xc0, 0xdb, 0x21, 0x00, 0x27, 0xb1, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xd4, 0xa4, 0x1b, 0x00, 0x00, 0x00, 0x00,
+ 0x9c, 0xe0, 0xc2, 0xc2, 0xbf, 0x00, 0x00, 0xa4, 0x75, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x30, 0x00,
+ 0x00, 0xad, 0x6b, 0x00, 0x00, 0x3c, 0xce, 0x00, 0x00, 0x00, 0xb1, 0x67, 0x00, 0x00, 0xb1, 0x67,
+ 0xe4, 0x01, 0x00, 0x31, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x25, 0xec, 0xc9, 0x75, 0x00, 0x00, 0x00,
+ 0x00, 0xa8, 0x7b, 0x00, 0x00, 0x3e, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xe4, 0x19, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x9e, 0x70, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x08, 0xfe, 0x06,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x2e, 0x0a, 0x00, 0x00, 0x27, 0xb1, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x99, 0xf2, 0xa7, 0x26, 0x00, 0x00,
+ 0x9c, 0x93, 0x2b, 0x2b, 0x2a, 0x00, 0x00, 0xa4, 0x75, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x30, 0x00,
+ 0x00, 0x56, 0xc1, 0x00, 0x00, 0x91, 0x75, 0x00, 0x00, 0x00, 0x6a, 0xb5, 0x00, 0x0a, 0xe7, 0x08,
+ 0xd7, 0x32, 0x00, 0x7d, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0xfc, 0x24, 0x00, 0x00, 0x00,
+ 0x00, 0x4d, 0xd9, 0x01, 0x00, 0x81, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x13, 0xe4, 0x44, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xa4, 0x69, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x01, 0xff, 0x0d,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xb1, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x84, 0xf1, 0x2b, 0x00,
+ 0x9c, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x84, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x30, 0x00,
+ 0x00, 0x08, 0xec, 0x22, 0x05, 0xe4, 0x19, 0x00, 0x00, 0x00, 0x17, 0xf4, 0x11, 0x51, 0xa7, 0x00,
+ 0x84, 0x84, 0x00, 0xd1, 0x31, 0x00, 0x00, 0x00, 0x00, 0x50, 0xd4, 0x80, 0xc8, 0x04, 0x00, 0x00,
+ 0x00, 0x04, 0xe1, 0x40, 0x00, 0xc9, 0x3c, 0x00, 0x00, 0x00, 0x00, 0xab, 0x8e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xa4, 0x68, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0xff, 0x0d,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xb1, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x7f, 0x00,
+ 0x9c, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xab, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x30, 0x00,
+ 0x00, 0x00, 0x8f, 0x86, 0x52, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x66, 0xa8, 0x50, 0x00,
+ 0x2d, 0xdc, 0x2c, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x16, 0xe4, 0x2f, 0x02, 0xc3, 0x7d, 0x00, 0x00,
+ 0x00, 0x00, 0x77, 0xad, 0x1a, 0xdd, 0x01, 0x00, 0x00, 0x00, 0x57, 0xda, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xa4, 0x64, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0xfc, 0x0d,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xb1, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x14, 0x00, 0x00, 0x10, 0xe4, 0x39, 0x00,
+ 0x9c, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xf7, 0x3f, 0x00, 0x00, 0x02, 0xeb, 0x30, 0x00,
+ 0x00, 0x00, 0x25, 0xea, 0xc8, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xd3, 0xe2, 0x06, 0x00,
+ 0x00, 0xce, 0xc6, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x9f, 0x81, 0x00, 0x00, 0x24, 0xef, 0x27, 0x00,
+ 0x00, 0x00, 0x10, 0xed, 0x92, 0x86, 0x00, 0x00, 0x00, 0x0c, 0xe3, 0x45, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xc0, 0x49, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0xe3, 0x26,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xb1, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x8a, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0xf2, 0xd7, 0xd5, 0xdf, 0x8c, 0x00, 0x00,
+ 0x9b, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0xeb, 0xe6, 0xdc, 0xf1, 0xda, 0x22, 0x00,
+ 0x00, 0x00, 0x00, 0xae, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe1, 0x8d, 0x00, 0x00,
+ 0x00, 0x68, 0xf6, 0x10, 0x00, 0x00, 0x00, 0x3b, 0xdc, 0x08, 0x00, 0x00, 0x00, 0x7e, 0xb3, 0x00,
+ 0x00, 0x00, 0x00, 0x7f, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x58, 0xfe, 0xee, 0xee, 0xee, 0xee, 0xee,
+ 0x0c, 0x00, 0x17, 0x8c, 0xd4, 0x09, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x76, 0xc9,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xb1, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x20, 0x21, 0x00, 0x00, 0x00, 0x00,
+ 0x8a, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1d, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x53, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x26, 0xc3, 0xaf, 0x02, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0x4e, 0xe4,
+ 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xb1, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x5c, 0xd5, 0x0b, 0x00, 0x0f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x17, 0xd9, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0xd3, 0x3d, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0xd7, 0x3b,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xb1, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0xb5, 0xef, 0xd9, 0xec, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xc2, 0xc7, 0xe5, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xa5, 0x60, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0xf9, 0x0e,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xb1, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x14, 0x24, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x14, 0x25, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xa4, 0x68, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0xff, 0x0d,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xf3, 0xd8, 0xd8,
+ 0xd8, 0xd8, 0xe1, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xa4, 0x68, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x00, 0xff, 0x0d,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xa1, 0x6d, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x05, 0xff, 0x09,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x87, 0x8f, 0x00, 0x00, 0x00, 0x4e, 0xbe, 0x00, 0x00, 0x2a, 0xeb, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x24, 0xe1, 0xa3, 0x26, 0x00, 0x4e, 0xbe, 0x00, 0x80, 0xd9, 0x71, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x3c, 0x16, 0x00, 0x0b, 0x1a, 0x00, 0x3e, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+];
+
diff --git a/third_party/webrender/webrender/src/debug_render.rs b/third_party/webrender/webrender/src/debug_render.rs
new file mode 100644
index 00000000000..c43bcd1d832
--- /dev/null
+++ b/third_party/webrender/webrender/src/debug_render.rs
@@ -0,0 +1,389 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{ColorU, ColorF, ImageFormat, TextureTarget};
+use api::units::*;
+use crate::debug_font_data;
+use crate::device::{Device, Program, Texture, TextureSlot, VertexDescriptor, ShaderError, VAO};
+use crate::device::{TextureFilter, VertexAttribute, VertexAttributeKind, VertexUsageHint};
+use euclid::{Point2D, Rect, Size2D, Transform3D, default};
+use crate::internal_types::Swizzle;
+use std::f32;
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum DebugItem {
+ Text {
+ msg: String,
+ color: ColorF,
+ position: DevicePoint,
+ },
+ Rect {
+ outer_color: ColorF,
+ inner_color: ColorF,
+ rect: DeviceRect,
+ },
+}
+
+#[derive(Debug, Copy, Clone)]
+enum DebugSampler {
+ Font,
+}
+
+impl Into<TextureSlot> for DebugSampler {
+ fn into(self) -> TextureSlot {
+ match self {
+ DebugSampler::Font => TextureSlot(0),
+ }
+ }
+}
+
+const DESC_FONT: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aColor",
+ count: 4,
+ kind: VertexAttributeKind::U8Norm,
+ },
+ VertexAttribute {
+ name: "aColorTexCoord",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[],
+};
+
+const DESC_COLOR: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aColor",
+ count: 4,
+ kind: VertexAttributeKind::U8Norm,
+ },
+ ],
+ instance_attributes: &[],
+};
+
+#[repr(C)]
+pub struct DebugFontVertex {
+ pub x: f32,
+ pub y: f32,
+ pub color: ColorU,
+ pub u: f32,
+ pub v: f32,
+}
+
+impl DebugFontVertex {
+ pub fn new(x: f32, y: f32, u: f32, v: f32, color: ColorU) -> DebugFontVertex {
+ DebugFontVertex { x, y, color, u, v }
+ }
+}
+
+#[repr(C)]
+pub struct DebugColorVertex {
+ pub x: f32,
+ pub y: f32,
+ pub color: ColorU,
+}
+
+impl DebugColorVertex {
+ pub fn new(x: f32, y: f32, color: ColorU) -> DebugColorVertex {
+ DebugColorVertex { x, y, color }
+ }
+}
+
+pub struct DebugRenderer {
+ font_vertices: Vec<DebugFontVertex>,
+ font_indices: Vec<u32>,
+ font_program: Program,
+ font_vao: VAO,
+ font_texture: Texture,
+
+ tri_vertices: Vec<DebugColorVertex>,
+ tri_indices: Vec<u32>,
+ tri_vao: VAO,
+ line_vertices: Vec<DebugColorVertex>,
+ line_vao: VAO,
+ color_program: Program,
+}
+
+impl DebugRenderer {
+ pub fn new(device: &mut Device) -> Result<Self, ShaderError> {
+ let font_program = device.create_program_linked(
+ "debug_font",
+ &[],
+ &DESC_FONT,
+ )?;
+ device.bind_program(&font_program);
+ device.bind_shader_samplers(&font_program, &[("sColor0", DebugSampler::Font)]);
+
+ let color_program = device.create_program_linked(
+ "debug_color",
+ &[],
+ &DESC_COLOR,
+ )?;
+
+ let font_vao = device.create_vao(&DESC_FONT);
+ let line_vao = device.create_vao(&DESC_COLOR);
+ let tri_vao = device.create_vao(&DESC_COLOR);
+
+ let font_texture = device.create_texture(
+ TextureTarget::Array,
+ ImageFormat::R8,
+ debug_font_data::BMP_WIDTH,
+ debug_font_data::BMP_HEIGHT,
+ TextureFilter::Linear,
+ None,
+ 1,
+ );
+ device.upload_texture_immediate(
+ &font_texture,
+ &debug_font_data::FONT_BITMAP
+ );
+
+ Ok(DebugRenderer {
+ font_vertices: Vec::new(),
+ font_indices: Vec::new(),
+ line_vertices: Vec::new(),
+ tri_vao,
+ tri_vertices: Vec::new(),
+ tri_indices: Vec::new(),
+ font_program,
+ color_program,
+ font_vao,
+ line_vao,
+ font_texture,
+ })
+ }
+
+ pub fn deinit(self, device: &mut Device) {
+ device.delete_texture(self.font_texture);
+ device.delete_program(self.font_program);
+ device.delete_program(self.color_program);
+ device.delete_vao(self.tri_vao);
+ device.delete_vao(self.line_vao);
+ device.delete_vao(self.font_vao);
+ }
+
+ pub fn line_height(&self) -> f32 {
+ debug_font_data::FONT_SIZE as f32 * 1.1
+ }
+
+ /// Draws a line of text at the provided starting coordinates.
+ ///
+ /// If |bounds| is specified, glyphs outside the bounds are discarded.
+ ///
+ /// Y-coordinates is relative to screen top, along with everything else in
+ /// this file.
+ pub fn add_text(
+ &mut self,
+ x: f32,
+ y: f32,
+ text: &str,
+ color: ColorU,
+ bounds: Option<DeviceRect>,
+ ) -> default::Rect<f32> {
+ let mut x_start = x;
+ let ipw = 1.0 / debug_font_data::BMP_WIDTH as f32;
+ let iph = 1.0 / debug_font_data::BMP_HEIGHT as f32;
+
+ let mut min_x = f32::MAX;
+ let mut max_x = -f32::MAX;
+ let mut min_y = f32::MAX;
+ let mut max_y = -f32::MAX;
+
+ for c in text.chars() {
+ let c = c as usize - debug_font_data::FIRST_GLYPH_INDEX as usize;
+ if c < debug_font_data::GLYPHS.len() {
+ let glyph = &debug_font_data::GLYPHS[c];
+
+ let x0 = (x_start + glyph.xo + 0.5).floor();
+ let y0 = (y + glyph.yo + 0.5).floor();
+
+ let x1 = x0 + glyph.x1 as f32 - glyph.x0 as f32;
+ let y1 = y0 + glyph.y1 as f32 - glyph.y0 as f32;
+
+ // If either corner of the glyph will end up out of bounds, drop it.
+ if let Some(b) = bounds {
+ let rect = DeviceRect::new(
+ DevicePoint::new(x0, y0),
+ DeviceSize::new(x1 - x0, y1 - y0),
+ );
+ if !b.contains_rect(&rect) {
+ continue;
+ }
+ }
+
+ let s0 = glyph.x0 as f32 * ipw;
+ let t0 = glyph.y0 as f32 * iph;
+ let s1 = glyph.x1 as f32 * ipw;
+ let t1 = glyph.y1 as f32 * iph;
+
+ x_start += glyph.xa;
+
+ let vertex_count = self.font_vertices.len() as u32;
+
+ self.font_vertices
+ .push(DebugFontVertex::new(x0, y0, s0, t0, color));
+ self.font_vertices
+ .push(DebugFontVertex::new(x1, y0, s1, t0, color));
+ self.font_vertices
+ .push(DebugFontVertex::new(x0, y1, s0, t1, color));
+ self.font_vertices
+ .push(DebugFontVertex::new(x1, y1, s1, t1, color));
+
+ self.font_indices.push(vertex_count + 0);
+ self.font_indices.push(vertex_count + 1);
+ self.font_indices.push(vertex_count + 2);
+ self.font_indices.push(vertex_count + 2);
+ self.font_indices.push(vertex_count + 1);
+ self.font_indices.push(vertex_count + 3);
+
+ min_x = min_x.min(x0);
+ max_x = max_x.max(x1);
+ min_y = min_y.min(y0);
+ max_y = max_y.max(y1);
+ }
+ }
+
+ Rect::new(
+ Point2D::new(min_x, min_y),
+ Size2D::new(max_x - min_x, max_y - min_y),
+ )
+ }
+
+ pub fn add_quad(
+ &mut self,
+ x0: f32,
+ y0: f32,
+ x1: f32,
+ y1: f32,
+ color_top: ColorU,
+ color_bottom: ColorU,
+ ) {
+ let vertex_count = self.tri_vertices.len() as u32;
+
+ self.tri_vertices
+ .push(DebugColorVertex::new(x0, y0, color_top));
+ self.tri_vertices
+ .push(DebugColorVertex::new(x1, y0, color_top));
+ self.tri_vertices
+ .push(DebugColorVertex::new(x0, y1, color_bottom));
+ self.tri_vertices
+ .push(DebugColorVertex::new(x1, y1, color_bottom));
+
+ self.tri_indices.push(vertex_count + 0);
+ self.tri_indices.push(vertex_count + 1);
+ self.tri_indices.push(vertex_count + 2);
+ self.tri_indices.push(vertex_count + 2);
+ self.tri_indices.push(vertex_count + 1);
+ self.tri_indices.push(vertex_count + 3);
+ }
+
+ #[allow(dead_code)]
+ pub fn add_line(&mut self, x0: i32, y0: i32, color0: ColorU, x1: i32, y1: i32, color1: ColorU) {
+ self.line_vertices
+ .push(DebugColorVertex::new(x0 as f32, y0 as f32, color0));
+ self.line_vertices
+ .push(DebugColorVertex::new(x1 as f32, y1 as f32, color1));
+ }
+
+
+ pub fn add_rect(&mut self, rect: &DeviceIntRect, color: ColorU) {
+ let p0 = rect.origin;
+ let p1 = p0 + rect.size;
+ self.add_line(p0.x, p0.y, color, p1.x, p0.y, color);
+ self.add_line(p1.x, p0.y, color, p1.x, p1.y, color);
+ self.add_line(p1.x, p1.y, color, p0.x, p1.y, color);
+ self.add_line(p0.x, p1.y, color, p0.x, p0.y, color);
+ }
+
+ pub fn render(
+ &mut self,
+ device: &mut Device,
+ viewport_size: Option<DeviceIntSize>,
+ scale: f32,
+ surface_origin_is_top_left: bool,
+ ) {
+ if let Some(viewport_size) = viewport_size {
+ device.disable_depth();
+ device.set_blend(true);
+ device.set_blend_mode_premultiplied_alpha();
+
+ let (bottom, top) = if surface_origin_is_top_left {
+ (0.0, viewport_size.height as f32 * scale)
+ } else {
+ (viewport_size.height as f32 * scale, 0.0)
+ };
+
+ let projection = Transform3D::ortho(
+ 0.0,
+ viewport_size.width as f32 * scale,
+ bottom,
+ top,
+ device.ortho_near_plane(),
+ device.ortho_far_plane(),
+ );
+
+ // Triangles
+ if !self.tri_vertices.is_empty() {
+ device.bind_program(&self.color_program);
+ device.set_uniforms(&self.color_program, &projection);
+ device.bind_vao(&self.tri_vao);
+ device.update_vao_indices(&self.tri_vao, &self.tri_indices, VertexUsageHint::Dynamic);
+ device.update_vao_main_vertices(
+ &self.tri_vao,
+ &self.tri_vertices,
+ VertexUsageHint::Dynamic,
+ );
+ device.draw_triangles_u32(0, self.tri_indices.len() as i32);
+ }
+
+ // Lines
+ if !self.line_vertices.is_empty() {
+ device.bind_program(&self.color_program);
+ device.set_uniforms(&self.color_program, &projection);
+ device.bind_vao(&self.line_vao);
+ device.update_vao_main_vertices(
+ &self.line_vao,
+ &self.line_vertices,
+ VertexUsageHint::Dynamic,
+ );
+ device.draw_nonindexed_lines(0, self.line_vertices.len() as i32);
+ }
+
+ // Glyph
+ if !self.font_indices.is_empty() {
+ device.bind_program(&self.font_program);
+ device.set_uniforms(&self.font_program, &projection);
+ device.bind_texture(DebugSampler::Font, &self.font_texture, Swizzle::default());
+ device.bind_vao(&self.font_vao);
+ device.update_vao_indices(&self.font_vao, &self.font_indices, VertexUsageHint::Dynamic);
+ device.update_vao_main_vertices(
+ &self.font_vao,
+ &self.font_vertices,
+ VertexUsageHint::Dynamic,
+ );
+ device.draw_triangles_u32(0, self.font_indices.len() as i32);
+ }
+ }
+
+ self.font_indices.clear();
+ self.font_vertices.clear();
+ self.line_vertices.clear();
+ self.tri_vertices.clear();
+ self.tri_indices.clear();
+ }
+}
diff --git a/third_party/webrender/webrender/src/debug_server.rs b/third_party/webrender/webrender/src/debug_server.rs
new file mode 100644
index 00000000000..c3cd29549ad
--- /dev/null
+++ b/third_party/webrender/webrender/src/debug_server.rs
@@ -0,0 +1,402 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{ApiMsg, DebugCommand, DebugFlags};
+use api::units::DeviceIntSize;
+use crate::print_tree::PrintTreePrinter;
+use crate::renderer;
+use std::sync::mpsc::{channel, Receiver};
+use std::sync::mpsc::Sender;
+use std::thread;
+use ws;
+use base64::encode;
+use image_loader;
+
+// Messages that are sent from the render backend to the renderer
+// debug command queue. These are sent in a separate queue so
+// that none of these types are exposed to the RenderApi interfaces.
+// We can't use select!() as it's not stable...
+enum DebugMsg {
+ AddSender(ws::Sender),
+ RemoveSender(ws::util::Token),
+}
+
+// Represents a connection to a client.
+struct Server {
+ ws: ws::Sender,
+ debug_tx: Sender<DebugMsg>,
+ api_tx: Sender<ApiMsg>,
+ debug_flags: DebugFlags,
+}
+
+impl ws::Handler for Server {
+ fn on_open(&mut self, _: ws::Handshake) -> ws::Result<()> {
+ self.debug_tx
+ .send(DebugMsg::AddSender(self.ws.clone()))
+ .ok();
+
+ Ok(())
+ }
+
+ fn on_close(&mut self, _: ws::CloseCode, _: &str) {
+ self.debug_tx
+ .send(DebugMsg::RemoveSender(self.ws.token()))
+ .ok();
+ }
+
+ fn on_message(&mut self, msg: ws::Message) -> ws::Result<()> {
+ match msg {
+ ws::Message::Text(string) => {
+ // First, check for flag change commands.
+ let mut set_flags = true;
+ match string.as_str() {
+ "enable_profiler" => self.debug_flags.insert(DebugFlags::PROFILER_DBG),
+ "disable_profiler" => self.debug_flags.remove(DebugFlags::PROFILER_DBG),
+ "enable_texture_cache_debug" => self.debug_flags.insert(DebugFlags::TEXTURE_CACHE_DBG),
+ "disable_texture_cache_debug" => self.debug_flags.remove(DebugFlags::TEXTURE_CACHE_DBG),
+ "enable_render_target_debug" => self.debug_flags.insert(DebugFlags::RENDER_TARGET_DBG),
+ "disable_render_target_debug" => self.debug_flags.remove(DebugFlags::RENDER_TARGET_DBG),
+ "enable_gpu_time_queries" => self.debug_flags.insert(DebugFlags::GPU_TIME_QUERIES),
+ "disable_gpu_time_queries" => self.debug_flags.remove(DebugFlags::GPU_TIME_QUERIES),
+ "enable_gpu_sample_queries" => self.debug_flags.insert(DebugFlags::GPU_SAMPLE_QUERIES),
+ "disable_gpu_sample_queries" => self.debug_flags.remove(DebugFlags::GPU_SAMPLE_QUERIES),
+ "disable_opaque_pass" => self.debug_flags.insert(DebugFlags::DISABLE_OPAQUE_PASS),
+ "enable_opaque_pass" => self.debug_flags.remove(DebugFlags::DISABLE_OPAQUE_PASS),
+ "disable_alpha_pass" => self.debug_flags.insert(DebugFlags::DISABLE_ALPHA_PASS),
+ "enable_alpha_pass" => self.debug_flags.remove(DebugFlags::DISABLE_ALPHA_PASS),
+ "disable_clip_masks" => self.debug_flags.insert(DebugFlags::DISABLE_CLIP_MASKS),
+ "enable_clip_masks" => self.debug_flags.remove(DebugFlags::DISABLE_CLIP_MASKS),
+ "disable_text_prims" => self.debug_flags.insert(DebugFlags::DISABLE_TEXT_PRIMS),
+ "enable_text_prims" => self.debug_flags.remove(DebugFlags::DISABLE_TEXT_PRIMS),
+ "disable_gradient_prims" => self.debug_flags.insert(DebugFlags::DISABLE_GRADIENT_PRIMS),
+ "enable_gradient_prims" => self.debug_flags.remove(DebugFlags::DISABLE_GRADIENT_PRIMS),
+ _ => set_flags = false,
+ };
+
+ let cmd = if set_flags {
+ DebugCommand::SetFlags(self.debug_flags)
+ } else {
+ match string.as_str() {
+ "fetch_passes" => DebugCommand::FetchPasses,
+ "fetch_screenshot" => DebugCommand::FetchScreenshot,
+ "fetch_documents" => DebugCommand::FetchDocuments,
+ "fetch_spatial_tree" => DebugCommand::FetchClipScrollTree,
+ "fetch_render_tasks" => DebugCommand::FetchRenderTasks,
+ msg => {
+ error!("unknown msg {}", msg);
+ return Ok(());
+ }
+ }
+ };
+
+ let msg = ApiMsg::DebugCommand(cmd);
+ self.api_tx.send(msg).unwrap();
+ }
+ ws::Message::Binary(..) => {}
+ }
+
+ Ok(())
+ }
+}
+
+// Spawn a thread for a given renderer, and wait for
+// client connections.
+pub struct DebugServerImpl {
+ join_handle: Option<thread::JoinHandle<()>>,
+ broadcaster: ws::Sender,
+ debug_rx: Receiver<DebugMsg>,
+ senders: Vec<ws::Sender>,
+}
+
+impl DebugServerImpl {
+ pub fn new(api_tx: Sender<ApiMsg>) -> DebugServerImpl {
+ let (debug_tx, debug_rx) = channel();
+
+ let socket = ws::Builder::new()
+ .build(move |out| {
+ Server {
+ ws: out,
+ debug_tx: debug_tx.clone(),
+ api_tx: api_tx.clone(),
+ debug_flags: DebugFlags::empty(),
+ }
+ })
+ .unwrap();
+
+ let broadcaster = socket.broadcaster();
+
+ let join_handle = Some(thread::spawn(move || {
+ let address = "127.0.0.1:3583";
+ debug!("WebRender debug server started: {}", address);
+ if let Err(..) = socket.listen(address) {
+ error!("ERROR: Unable to bind debugger websocket (port may be in use).");
+ }
+ }));
+
+ DebugServerImpl {
+ join_handle,
+ broadcaster,
+ debug_rx,
+ senders: Vec::new(),
+ }
+ }
+}
+
+impl renderer::DebugServer for DebugServerImpl {
+ fn send(&mut self, message: String) {
+ // Add any new connections that have been queued.
+ while let Ok(msg) = self.debug_rx.try_recv() {
+ match msg {
+ DebugMsg::AddSender(sender) => {
+ self.senders.push(sender);
+ }
+ DebugMsg::RemoveSender(token) => {
+ self.senders.retain(|sender| sender.token() != token);
+ }
+ }
+ }
+
+ // Broadcast the message to all senders. Keep
+ // track of the ones that failed, so they can
+ // be removed from the active sender list.
+ let mut disconnected_senders = Vec::new();
+
+ for (i, sender) in self.senders.iter().enumerate() {
+ if let Err(..) = sender.send(message.clone()) {
+ disconnected_senders.push(i);
+ }
+ }
+
+ // Remove the broken senders from the list
+ // for next broadcast. Remove in reverse
+ // order so the indices are valid for the
+ // entire loop.
+ for i in disconnected_senders.iter().rev() {
+ self.senders.remove(*i);
+ }
+ }
+}
+
+impl Drop for DebugServerImpl {
+ fn drop(&mut self) {
+ self.broadcaster.shutdown().ok();
+ self.join_handle.take().unwrap().join().ok();
+ }
+}
+
+// A serializable list of debug information about passes
+// that can be sent to the client.
+
+#[derive(Serialize)]
+pub enum BatchKind {
+ Clip,
+ Cache,
+ Opaque,
+ Alpha,
+}
+
+#[derive(Serialize)]
+pub struct PassList {
+ kind: &'static str,
+ passes: Vec<Pass>,
+}
+
+impl PassList {
+ pub fn new() -> PassList {
+ PassList {
+ kind: "passes",
+ passes: Vec::new(),
+ }
+ }
+
+ pub fn add(&mut self, pass: Pass) {
+ self.passes.push(pass);
+ }
+}
+
+#[derive(Serialize)]
+pub struct Pass {
+ pub targets: Vec<Target>,
+}
+
+#[derive(Serialize)]
+pub struct Target {
+ kind: &'static str,
+ batches: Vec<Batch>,
+}
+
+impl Target {
+ pub fn new(kind: &'static str) -> Target {
+ Target {
+ kind,
+ batches: Vec::new(),
+ }
+ }
+
+ pub fn add(&mut self, kind: BatchKind, description: &str, count: usize) {
+ if count > 0 {
+ self.batches.push(Batch {
+ kind,
+ description: description.to_owned(),
+ count,
+ });
+ }
+ }
+}
+
+#[derive(Serialize)]
+struct Batch {
+ kind: BatchKind,
+ description: String,
+ count: usize,
+}
+
+#[derive(Serialize)]
+pub struct TreeNode {
+ description: String,
+ children: Vec<TreeNode>,
+}
+
+impl TreeNode {
+ pub fn new(description: &str) -> TreeNode {
+ TreeNode {
+ description: description.to_owned(),
+ children: Vec::new(),
+ }
+ }
+
+ pub fn add_child(&mut self, child: TreeNode) {
+ self.children.push(child);
+ }
+
+ pub fn add_item(&mut self, description: &str) {
+ self.children.push(TreeNode::new(description));
+ }
+}
+
+#[derive(Serialize)]
+pub struct DocumentList {
+ kind: &'static str,
+ root: TreeNode,
+}
+
+impl DocumentList {
+ pub fn new() -> Self {
+ DocumentList {
+ kind: "documents",
+ root: TreeNode::new("root"),
+ }
+ }
+
+ pub fn add(&mut self, item: TreeNode) {
+ self.root.add_child(item);
+ }
+}
+
+#[derive(Serialize)]
+pub struct Screenshot {
+ kind: &'static str,
+ data: String
+}
+
+impl Screenshot {
+ pub fn new(size: DeviceIntSize, data: Vec<u8>) -> Self {
+ let mut output = Vec::with_capacity((size.width * size.height) as usize);
+ {
+ let encoder = image_loader::png::PNGEncoder::new(&mut output);
+ encoder.encode(
+ &data,
+ size.width as u32,
+ size.height as u32,
+ image_loader::ColorType::Rgba8,
+ ).unwrap();
+ }
+
+ let data = encode(&output);
+ Screenshot {
+ kind: "screenshot",
+ data
+ }
+ }
+}
+
+// A serializable list of debug information about spatial trees
+// that can be sent to the client
+
+#[derive(Serialize)]
+pub struct SpatialTreeList {
+ kind: &'static str,
+ root: TreeNode,
+}
+
+impl SpatialTreeList {
+ pub fn new() -> Self {
+ SpatialTreeList {
+ kind: "spatial_tree",
+ root: TreeNode::new("root"),
+ }
+ }
+
+ pub fn add(&mut self, item: TreeNode) {
+ self.root.add_child(item);
+ }
+}
+
+#[derive(Serialize)]
+pub struct RenderTaskList {
+ kind: &'static str,
+ root: TreeNode,
+}
+
+impl RenderTaskList {
+ pub fn new() -> Self {
+ RenderTaskList {
+ kind: "render_tasks",
+ root: TreeNode::new("root"),
+ }
+ }
+
+ pub fn add(&mut self, item: TreeNode) {
+ self.root.add_child(item);
+ }
+}
+
+// A TreeNode-based PrintTreePrinter to serialize pretty-printed
+// trees as json
+pub struct TreeNodeBuilder {
+ levels: Vec<TreeNode>,
+}
+
+impl TreeNodeBuilder {
+ pub fn new(root: TreeNode) -> TreeNodeBuilder {
+ TreeNodeBuilder { levels: vec![root] }
+ }
+
+ fn current_level_mut(&mut self) -> &mut TreeNode {
+ assert!(!self.levels.is_empty());
+ self.levels.last_mut().unwrap()
+ }
+
+ pub fn build(mut self) -> TreeNode {
+ assert!(self.levels.len() == 1);
+ self.levels.pop().unwrap()
+ }
+}
+
+impl PrintTreePrinter for TreeNodeBuilder {
+ fn new_level(&mut self, title: String) {
+ let level = TreeNode::new(&title);
+ self.levels.push(level);
+ }
+
+ fn end_level(&mut self) {
+ assert!(!self.levels.is_empty());
+ let last_level = self.levels.pop().unwrap();
+ self.current_level_mut().add_child(last_level);
+ }
+
+ fn add_item(&mut self, text: String) {
+ self.current_level_mut().add_item(&text);
+ }
+}
diff --git a/third_party/webrender/webrender/src/device/gl.rs b/third_party/webrender/webrender/src/device/gl.rs
new file mode 100644
index 00000000000..6ad0e98eef3
--- /dev/null
+++ b/third_party/webrender/webrender/src/device/gl.rs
@@ -0,0 +1,4046 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use super::super::shader_source::{OPTIMIZED_SHADERS, UNOPTIMIZED_SHADERS};
+use api::{ColorF, ImageDescriptor, ImageFormat, MemoryReport};
+use api::{MixBlendMode, TextureTarget, VoidPtrToSizeFn};
+use api::units::*;
+use euclid::default::Transform3D;
+use gleam::gl;
+use crate::internal_types::{FastHashMap, LayerIndex, RenderTargetInfo, Swizzle, SwizzleSettings};
+use crate::util::round_up_to_multiple;
+use crate::profiler;
+use log::Level;
+use smallvec::SmallVec;
+use std::{
+ borrow::Cow,
+ cell::{Cell, RefCell},
+ cmp,
+ collections::hash_map::Entry,
+ marker::PhantomData,
+ mem,
+ num::NonZeroUsize,
+ os::raw::c_void,
+ ops::Add,
+ path::PathBuf,
+ ptr,
+ rc::Rc,
+ slice,
+ sync::Arc,
+ thread,
+ time::Duration,
+};
+use webrender_build::shader::{
+ ProgramSourceDigest, ShaderKind, ShaderVersion, build_shader_main_string,
+ build_shader_prefix_string, do_build_shader_string, shader_source_from_file,
+};
+
+/// Sequence number for frames, as tracked by the device layer.
+#[derive(Debug, Copy, Clone, PartialEq, Ord, Eq, PartialOrd)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct GpuFrameId(usize);
+
+impl GpuFrameId {
+ pub fn new(value: usize) -> Self {
+ GpuFrameId(value)
+ }
+}
+
+impl Add<usize> for GpuFrameId {
+ type Output = GpuFrameId;
+
+ fn add(self, other: usize) -> GpuFrameId {
+ GpuFrameId(self.0 + other)
+ }
+}
+
+pub struct TextureSlot(pub usize);
+
+// In some places we need to temporarily bind a texture to any slot.
+const DEFAULT_TEXTURE: TextureSlot = TextureSlot(0);
+
+#[repr(u32)]
+pub enum DepthFunction {
+ Always = gl::ALWAYS,
+ Less = gl::LESS,
+ LessEqual = gl::LEQUAL,
+}
+
+#[repr(u32)]
+#[derive(Copy, Clone, Debug, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum TextureFilter {
+ Nearest,
+ Linear,
+ Trilinear,
+}
+
+/// A structure defining a particular workflow of texture transfers.
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct TextureFormatPair<T> {
+ /// Format the GPU natively stores texels in.
+ pub internal: T,
+ /// Format we expect the users to provide the texels in.
+ pub external: T,
+}
+
+impl<T: Copy> From<T> for TextureFormatPair<T> {
+ fn from(value: T) -> Self {
+ TextureFormatPair {
+ internal: value,
+ external: value,
+ }
+ }
+}
+
+#[derive(Debug)]
+pub enum VertexAttributeKind {
+ F32,
+ U8Norm,
+ U16Norm,
+ I32,
+ U16,
+}
+
+#[derive(Debug)]
+pub struct VertexAttribute {
+ pub name: &'static str,
+ pub count: u32,
+ pub kind: VertexAttributeKind,
+}
+
+#[derive(Debug)]
+pub struct VertexDescriptor {
+ pub vertex_attributes: &'static [VertexAttribute],
+ pub instance_attributes: &'static [VertexAttribute],
+}
+
+enum FBOTarget {
+ Read,
+ Draw,
+}
+
+/// Method of uploading texel data from CPU to GPU.
+#[derive(Debug, Clone)]
+pub enum UploadMethod {
+ /// Just call `glTexSubImage` directly with the CPU data pointer
+ Immediate,
+ /// Accumulate the changes in PBO first before transferring to a texture.
+ PixelBuffer(VertexUsageHint),
+}
+
+/// Plain old data that can be used to initialize a texture.
+pub unsafe trait Texel: Copy {}
+unsafe impl Texel for u8 {}
+unsafe impl Texel for f32 {}
+
+/// Returns the size in bytes of a depth target with the given dimensions.
+fn depth_target_size_in_bytes(dimensions: &DeviceIntSize) -> usize {
+ // DEPTH24 textures generally reserve 3 bytes for depth and 1 byte
+ // for stencil, so we measure them as 32 bits.
+ let pixels = dimensions.width * dimensions.height;
+ (pixels as usize) * 4
+}
+
+pub fn get_gl_target(target: TextureTarget) -> gl::GLuint {
+ match target {
+ TextureTarget::Default => gl::TEXTURE_2D,
+ TextureTarget::Array => gl::TEXTURE_2D_ARRAY,
+ TextureTarget::Rect => gl::TEXTURE_RECTANGLE,
+ TextureTarget::External => gl::TEXTURE_EXTERNAL_OES,
+ }
+}
+
+fn supports_extension(extensions: &[String], extension: &str) -> bool {
+ extensions.iter().any(|s| s == extension)
+}
+
+fn get_shader_version(gl: &dyn gl::Gl) -> ShaderVersion {
+ match gl.get_type() {
+ gl::GlType::Gl => ShaderVersion::Gl,
+ gl::GlType::Gles => ShaderVersion::Gles,
+ }
+}
+
+// Get an unoptimized shader string by name, from the built in resources or
+// an override path, if supplied.
+pub fn get_unoptimized_shader_source(shader_name: &str, base_path: Option<&PathBuf>) -> Cow<'static, str> {
+ if let Some(ref base) = base_path {
+ let shader_path = base.join(&format!("{}.glsl", shader_name));
+ Cow::Owned(shader_source_from_file(&shader_path))
+ } else {
+ Cow::Borrowed(
+ UNOPTIMIZED_SHADERS
+ .get(shader_name)
+ .expect("Shader not found")
+ .source
+ )
+ }
+}
+
+pub trait FileWatcherHandler: Send {
+ fn file_changed(&self, path: PathBuf);
+}
+
+impl VertexAttributeKind {
+ fn size_in_bytes(&self) -> u32 {
+ match *self {
+ VertexAttributeKind::F32 => 4,
+ VertexAttributeKind::U8Norm => 1,
+ VertexAttributeKind::U16Norm => 2,
+ VertexAttributeKind::I32 => 4,
+ VertexAttributeKind::U16 => 2,
+ }
+ }
+}
+
+impl VertexAttribute {
+ fn size_in_bytes(&self) -> u32 {
+ self.count * self.kind.size_in_bytes()
+ }
+
+ fn bind_to_vao(
+ &self,
+ attr_index: gl::GLuint,
+ divisor: gl::GLuint,
+ stride: gl::GLint,
+ offset: gl::GLuint,
+ gl: &dyn gl::Gl,
+ ) {
+ gl.enable_vertex_attrib_array(attr_index);
+ gl.vertex_attrib_divisor(attr_index, divisor);
+
+ match self.kind {
+ VertexAttributeKind::F32 => {
+ gl.vertex_attrib_pointer(
+ attr_index,
+ self.count as gl::GLint,
+ gl::FLOAT,
+ false,
+ stride,
+ offset,
+ );
+ }
+ VertexAttributeKind::U8Norm => {
+ gl.vertex_attrib_pointer(
+ attr_index,
+ self.count as gl::GLint,
+ gl::UNSIGNED_BYTE,
+ true,
+ stride,
+ offset,
+ );
+ }
+ VertexAttributeKind::U16Norm => {
+ gl.vertex_attrib_pointer(
+ attr_index,
+ self.count as gl::GLint,
+ gl::UNSIGNED_SHORT,
+ true,
+ stride,
+ offset,
+ );
+ }
+ VertexAttributeKind::I32 => {
+ gl.vertex_attrib_i_pointer(
+ attr_index,
+ self.count as gl::GLint,
+ gl::INT,
+ stride,
+ offset,
+ );
+ }
+ VertexAttributeKind::U16 => {
+ gl.vertex_attrib_i_pointer(
+ attr_index,
+ self.count as gl::GLint,
+ gl::UNSIGNED_SHORT,
+ stride,
+ offset,
+ );
+ }
+ }
+ }
+}
+
+impl VertexDescriptor {
+ fn instance_stride(&self) -> u32 {
+ self.instance_attributes
+ .iter()
+ .map(|attr| attr.size_in_bytes())
+ .sum()
+ }
+
+ fn bind_attributes(
+ attributes: &[VertexAttribute],
+ start_index: usize,
+ divisor: u32,
+ gl: &dyn gl::Gl,
+ vbo: VBOId,
+ ) {
+ vbo.bind(gl);
+
+ let stride: u32 = attributes
+ .iter()
+ .map(|attr| attr.size_in_bytes())
+ .sum();
+
+ let mut offset = 0;
+ for (i, attr) in attributes.iter().enumerate() {
+ let attr_index = (start_index + i) as gl::GLuint;
+ attr.bind_to_vao(attr_index, divisor, stride as _, offset, gl);
+ offset += attr.size_in_bytes();
+ }
+ }
+
+ fn bind(&self, gl: &dyn gl::Gl, main: VBOId, instance: VBOId) {
+ Self::bind_attributes(self.vertex_attributes, 0, 0, gl, main);
+
+ if !self.instance_attributes.is_empty() {
+ Self::bind_attributes(
+ self.instance_attributes,
+ self.vertex_attributes.len(),
+ 1, gl, instance,
+ );
+ }
+ }
+}
+
+impl VBOId {
+ fn bind(&self, gl: &dyn gl::Gl) {
+ gl.bind_buffer(gl::ARRAY_BUFFER, self.0);
+ }
+}
+
+impl IBOId {
+ fn bind(&self, gl: &dyn gl::Gl) {
+ gl.bind_buffer(gl::ELEMENT_ARRAY_BUFFER, self.0);
+ }
+}
+
+impl FBOId {
+ fn bind(&self, gl: &dyn gl::Gl, target: FBOTarget) {
+ let target = match target {
+ FBOTarget::Read => gl::READ_FRAMEBUFFER,
+ FBOTarget::Draw => gl::DRAW_FRAMEBUFFER,
+ };
+ gl.bind_framebuffer(target, self.0);
+ }
+}
+
+pub struct Stream<'a> {
+ attributes: &'a [VertexAttribute],
+ vbo: VBOId,
+}
+
+pub struct VBO<V> {
+ id: gl::GLuint,
+ target: gl::GLenum,
+ allocated_count: usize,
+ marker: PhantomData<V>,
+}
+
+impl<V> VBO<V> {
+ pub fn allocated_count(&self) -> usize {
+ self.allocated_count
+ }
+
+ pub fn stream_with<'a>(&self, attributes: &'a [VertexAttribute]) -> Stream<'a> {
+ debug_assert_eq!(
+ mem::size_of::<V>(),
+ attributes.iter().map(|a| a.size_in_bytes() as usize).sum::<usize>()
+ );
+ Stream {
+ attributes,
+ vbo: VBOId(self.id),
+ }
+ }
+}
+
+impl<T> Drop for VBO<T> {
+ fn drop(&mut self) {
+ debug_assert!(thread::panicking() || self.id == 0);
+ }
+}
+
+#[cfg_attr(feature = "replay", derive(Clone))]
+#[derive(Debug)]
+pub struct ExternalTexture {
+ id: gl::GLuint,
+ target: gl::GLuint,
+ swizzle: Swizzle,
+ uv_rect: TexelRect,
+}
+
+impl ExternalTexture {
+ pub fn new(
+ id: u32,
+ target: TextureTarget,
+ swizzle: Swizzle,
+ uv_rect: TexelRect,
+ ) -> Self {
+ ExternalTexture {
+ id,
+ target: get_gl_target(target),
+ swizzle,
+ uv_rect,
+ }
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn internal_id(&self) -> gl::GLuint {
+ self.id
+ }
+
+ pub fn get_uv_rect(&self) -> TexelRect {
+ self.uv_rect
+ }
+}
+
+bitflags! {
+ #[derive(Default)]
+ pub struct TextureFlags: u32 {
+ /// This texture corresponds to one of the shared texture caches.
+ const IS_SHARED_TEXTURE_CACHE = 1 << 0;
+ }
+}
+
+/// WebRender interface to an OpenGL texture.
+///
+/// Because freeing a texture requires various device handles that are not
+/// reachable from this struct, manual destruction via `Device` is required.
+/// Our `Drop` implementation asserts that this has happened.
+#[derive(Debug)]
+pub struct Texture {
+ id: gl::GLuint,
+ target: gl::GLuint,
+ layer_count: i32,
+ format: ImageFormat,
+ size: DeviceIntSize,
+ filter: TextureFilter,
+ flags: TextureFlags,
+ /// An internally mutable swizzling state that may change between batches.
+ active_swizzle: Cell<Swizzle>,
+ /// Framebuffer Objects, one for each layer of the texture, allowing this
+ /// texture to be rendered to. Empty if this texture is not used as a render
+ /// target.
+ fbos: Vec<FBOId>,
+ /// Same as the above, but with a depth buffer attached.
+ ///
+ /// FBOs are cheap to create but expensive to reconfigure (since doing so
+ /// invalidates framebuffer completeness caching). Moreover, rendering with
+ /// a depth buffer attached but the depth write+test disabled relies on the
+ /// driver to optimize it out of the rendering pass, which most drivers
+ /// probably do but, according to jgilbert, is best not to rely on.
+ ///
+ /// So we lazily generate a second list of FBOs with depth. This list is
+ /// empty if this texture is not used as a render target _or_ if it is, but
+ /// the depth buffer has never been requested.
+ ///
+ /// Note that we always fill fbos, and then lazily create fbos_with_depth
+ /// when needed. We could make both lazy (i.e. render targets would have one
+ /// or the other, but not both, unless they were actually used in both
+ /// configurations). But that would complicate a lot of logic in this module,
+ /// and FBOs are cheap enough to create.
+ fbos_with_depth: Vec<FBOId>,
+ /// If we are unable to blit directly to a texture array then we need
+ /// an intermediate renderbuffer.
+ blit_workaround_buffer: Option<(RBOId, FBOId)>,
+ last_frame_used: GpuFrameId,
+}
+
+impl Texture {
+ pub fn get_dimensions(&self) -> DeviceIntSize {
+ self.size
+ }
+
+ pub fn get_layer_count(&self) -> i32 {
+ self.layer_count
+ }
+
+ pub fn get_format(&self) -> ImageFormat {
+ self.format
+ }
+
+ pub fn get_filter(&self) -> TextureFilter {
+ self.filter
+ }
+
+ pub fn supports_depth(&self) -> bool {
+ !self.fbos_with_depth.is_empty()
+ }
+
+ pub fn last_frame_used(&self) -> GpuFrameId {
+ self.last_frame_used
+ }
+
+ pub fn used_in_frame(&self, frame_id: GpuFrameId) -> bool {
+ self.last_frame_used == frame_id
+ }
+
+ /// Returns true if this texture was used within `threshold` frames of
+ /// the current frame.
+ pub fn used_recently(&self, current_frame_id: GpuFrameId, threshold: usize) -> bool {
+ self.last_frame_used + threshold >= current_frame_id
+ }
+
+ /// Returns the flags for this texture.
+ pub fn flags(&self) -> &TextureFlags {
+ &self.flags
+ }
+
+ /// Returns a mutable borrow of the flags for this texture.
+ pub fn flags_mut(&mut self) -> &mut TextureFlags {
+ &mut self.flags
+ }
+
+ /// Returns the number of bytes (generally in GPU memory) that each layer of
+ /// this texture consumes.
+ pub fn layer_size_in_bytes(&self) -> usize {
+ assert!(self.layer_count > 0 || self.size.width + self.size.height == 0);
+ let bpp = self.format.bytes_per_pixel() as usize;
+ let w = self.size.width as usize;
+ let h = self.size.height as usize;
+ bpp * w * h
+ }
+
+ /// Returns the number of bytes (generally in GPU memory) that this texture
+ /// consumes.
+ pub fn size_in_bytes(&self) -> usize {
+ self.layer_size_in_bytes() * (self.layer_count as usize)
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn into_external(mut self) -> ExternalTexture {
+ let ext = ExternalTexture {
+ id: self.id,
+ target: self.target,
+ swizzle: Swizzle::default(),
+ // TODO(gw): Support custom UV rect for external textures during captures
+ uv_rect: TexelRect::new(
+ 0.0,
+ 0.0,
+ self.size.width as f32,
+ self.size.height as f32,
+ ),
+ };
+ self.id = 0; // don't complain, moved out
+ ext
+ }
+}
+
+impl Drop for Texture {
+ fn drop(&mut self) {
+ debug_assert!(thread::panicking() || self.id == 0);
+ }
+}
+
+pub struct Program {
+ id: gl::GLuint,
+ u_transform: gl::GLint,
+ u_mode: gl::GLint,
+ source_info: ProgramSourceInfo,
+ is_initialized: bool,
+}
+
+impl Program {
+ pub fn is_initialized(&self) -> bool {
+ self.is_initialized
+ }
+}
+
+impl Drop for Program {
+ fn drop(&mut self) {
+ debug_assert!(
+ thread::panicking() || self.id == 0,
+ "renderer::deinit not called"
+ );
+ }
+}
+
+pub struct CustomVAO {
+ id: gl::GLuint,
+}
+
+impl Drop for CustomVAO {
+ fn drop(&mut self) {
+ debug_assert!(
+ thread::panicking() || self.id == 0,
+ "renderer::deinit not called"
+ );
+ }
+}
+
+pub struct VAO {
+ id: gl::GLuint,
+ ibo_id: IBOId,
+ main_vbo_id: VBOId,
+ instance_vbo_id: VBOId,
+ instance_stride: usize,
+ owns_vertices_and_indices: bool,
+}
+
+impl Drop for VAO {
+ fn drop(&mut self) {
+ debug_assert!(
+ thread::panicking() || self.id == 0,
+ "renderer::deinit not called"
+ );
+ }
+}
+
+pub struct PBO {
+ id: gl::GLuint,
+ reserved_size: usize,
+}
+
+impl PBO {
+ pub fn get_reserved_size(&self) -> usize {
+ self.reserved_size
+ }
+}
+
+impl Drop for PBO {
+ fn drop(&mut self) {
+ debug_assert!(
+ thread::panicking() || self.id == 0,
+ "renderer::deinit not called"
+ );
+ }
+}
+
+pub struct BoundPBO<'a> {
+ device: &'a mut Device,
+ pub data: &'a [u8]
+}
+
+impl<'a> Drop for BoundPBO<'a> {
+ fn drop(&mut self) {
+ self.device.gl.unmap_buffer(gl::PIXEL_PACK_BUFFER);
+ self.device.gl.bind_buffer(gl::PIXEL_PACK_BUFFER, 0);
+ }
+}
+
+#[derive(PartialEq, Eq, Hash, Debug, Copy, Clone)]
+pub struct FBOId(gl::GLuint);
+
+#[derive(PartialEq, Eq, Hash, Debug, Copy, Clone)]
+pub struct RBOId(gl::GLuint);
+
+#[derive(PartialEq, Eq, Hash, Debug, Copy, Clone)]
+pub struct VBOId(gl::GLuint);
+
+#[derive(PartialEq, Eq, Hash, Debug, Copy, Clone)]
+struct IBOId(gl::GLuint);
+
+#[derive(Clone, Debug)]
+enum ProgramSourceType {
+ Unoptimized,
+ Optimized(ShaderVersion),
+}
+
+#[derive(Clone, Debug)]
+pub struct ProgramSourceInfo {
+ base_filename: &'static str,
+ features: Vec<&'static str>,
+ source_type: ProgramSourceType,
+ digest: ProgramSourceDigest,
+}
+
+impl ProgramSourceInfo {
+ fn new(
+ device: &Device,
+ name: &'static str,
+ features: &[&'static str],
+ ) -> Self {
+
+ // Compute the digest. Assuming the device has a `ProgramCache`, this
+ // will always be needed, whereas the source is rarely needed.
+
+ use std::collections::hash_map::DefaultHasher;
+ use std::hash::Hasher;
+
+ // Setup.
+ let mut hasher = DefaultHasher::new();
+ let gl_version = get_shader_version(&*device.gl());
+
+ // Hash the renderer name.
+ hasher.write(device.capabilities.renderer_name.as_bytes());
+
+ let full_name = &Self::full_name(name, features);
+
+ let optimized_source = if device.use_optimized_shaders {
+ OPTIMIZED_SHADERS.get(&(gl_version, full_name)).or_else(|| {
+ warn!("Missing optimized shader source for {}", full_name);
+ None
+ })
+ } else {
+ None
+ };
+
+ let source_type = match optimized_source {
+ Some(source_and_digest) => {
+ // Optimized shader sources are used as-is, without any run-time processing.
+ // The vertex and fragment shaders are different, so must both be hashed.
+ // We use the hashes that were computed at build time, and verify it in debug builds.
+ if cfg!(debug_assertions) {
+ let mut h = DefaultHasher::new();
+ h.write(source_and_digest.vert_source.as_bytes());
+ h.write(source_and_digest.frag_source.as_bytes());
+ let d: ProgramSourceDigest = h.into();
+ let digest = d.to_string();
+ debug_assert_eq!(digest, source_and_digest.digest);
+ hasher.write(digest.as_bytes());
+ } else {
+ hasher.write(source_and_digest.digest.as_bytes());
+ }
+
+ ProgramSourceType::Optimized(gl_version)
+ }
+ None => {
+ // For non-optimized sources we compute the hash by walking the static strings
+ // in the same order as we would when concatenating the source, to avoid
+ // heap-allocating in the common case.
+ //
+ // Note that we cheat a bit to make the hashing more efficient. First, the only
+ // difference between the vertex and fragment shader is a single deterministic
+ // define, so we don't need to hash both. Second, we precompute the digest of the
+ // expanded source file at build time, and then just hash that digest here.
+ let override_path = device.resource_override_path.as_ref();
+ let source_and_digest = UNOPTIMIZED_SHADERS.get(&name).expect("Shader not found");
+
+ // Hash the prefix string.
+ build_shader_prefix_string(
+ gl_version,
+ &features,
+ ShaderKind::Vertex,
+ &name,
+ &mut |s| hasher.write(s.as_bytes()),
+ );
+
+ // Hash the shader file contents. We use a precomputed digest, and
+ // verify it in debug builds.
+ if override_path.is_some() || cfg!(debug_assertions) {
+ let mut h = DefaultHasher::new();
+ build_shader_main_string(
+ &name,
+ &|f| get_unoptimized_shader_source(f, override_path),
+ &mut |s| h.write(s.as_bytes())
+ );
+ let d: ProgramSourceDigest = h.into();
+ let digest = format!("{}", d);
+ debug_assert!(override_path.is_some() || digest == source_and_digest.digest);
+ hasher.write(digest.as_bytes());
+ } else {
+ hasher.write(source_and_digest.digest.as_bytes());
+ }
+
+ ProgramSourceType::Unoptimized
+ }
+ };
+
+ // Finish.
+ ProgramSourceInfo {
+ base_filename: name,
+ features: features.to_vec(),
+ source_type,
+ digest: hasher.into(),
+ }
+ }
+
+ fn compute_source(&self, device: &Device, kind: ShaderKind) -> String {
+ let full_name = Self::full_name(self.base_filename, &self.features);
+ match self.source_type {
+ ProgramSourceType::Optimized(gl_version) => {
+ let shader = OPTIMIZED_SHADERS
+ .get(&(gl_version, &full_name))
+ .unwrap_or_else(|| panic!("Missing optimized shader source for {}", full_name));
+
+ match kind {
+ ShaderKind::Vertex => shader.vert_source.to_string(),
+ ShaderKind::Fragment => shader.frag_source.to_string(),
+ }
+ },
+ ProgramSourceType::Unoptimized => {
+ let mut src = String::new();
+ device.build_shader_string(
+ &self.features,
+ kind,
+ self.base_filename,
+ |s| src.push_str(s),
+ );
+ src
+ }
+ }
+ }
+
+ fn full_name(base_filename: &'static str, features: &[&'static str]) -> String {
+ if features.is_empty() {
+ base_filename.to_string()
+ } else {
+ format!("{}_{}", base_filename, features.join("_"))
+ }
+ }
+}
+
+#[cfg_attr(feature = "serialize_program", derive(Deserialize, Serialize))]
+pub struct ProgramBinary {
+ bytes: Vec<u8>,
+ format: gl::GLenum,
+ source_digest: ProgramSourceDigest,
+}
+
+impl ProgramBinary {
+ fn new(bytes: Vec<u8>,
+ format: gl::GLenum,
+ source_digest: ProgramSourceDigest) -> Self {
+ ProgramBinary {
+ bytes,
+ format,
+ source_digest,
+ }
+ }
+
+ /// Returns a reference to the source digest hash.
+ pub fn source_digest(&self) -> &ProgramSourceDigest {
+ &self.source_digest
+ }
+}
+
+/// The interfaces that an application can implement to handle ProgramCache update
+pub trait ProgramCacheObserver {
+ fn save_shaders_to_disk(&self, entries: Vec<Arc<ProgramBinary>>);
+ fn set_startup_shaders(&self, entries: Vec<Arc<ProgramBinary>>);
+ fn try_load_shader_from_disk(&self, digest: &ProgramSourceDigest, program_cache: &Rc<ProgramCache>);
+ fn notify_program_binary_failed(&self, program_binary: &Arc<ProgramBinary>);
+}
+
+struct ProgramCacheEntry {
+ /// The binary.
+ binary: Arc<ProgramBinary>,
+ /// True if the binary has been linked, i.e. used for rendering.
+ linked: bool,
+}
+
+pub struct ProgramCache {
+ entries: RefCell<FastHashMap<ProgramSourceDigest, ProgramCacheEntry>>,
+
+ /// Optional trait object that allows the client
+ /// application to handle ProgramCache updating
+ program_cache_handler: Option<Box<dyn ProgramCacheObserver>>,
+
+ /// Programs that have not yet been cached to disk (by program_cache_handler)
+ pending_entries: RefCell<Vec<Arc<ProgramBinary>>>,
+}
+
+impl ProgramCache {
+ pub fn new(program_cache_observer: Option<Box<dyn ProgramCacheObserver>>) -> Rc<Self> {
+ Rc::new(
+ ProgramCache {
+ entries: RefCell::new(FastHashMap::default()),
+ program_cache_handler: program_cache_observer,
+ pending_entries: RefCell::new(Vec::default()),
+ }
+ )
+ }
+
+ /// Save any new program binaries to the disk cache, and if startup has
+ /// just completed then write the list of shaders to load on next startup.
+ fn update_disk_cache(&self, startup_complete: bool) {
+ if let Some(ref handler) = self.program_cache_handler {
+ if !self.pending_entries.borrow().is_empty() {
+ let pending_entries = self.pending_entries.replace(Vec::default());
+ handler.save_shaders_to_disk(pending_entries);
+ }
+
+ if startup_complete {
+ let startup_shaders = self.entries.borrow().values()
+ .filter(|e| e.linked).map(|e| e.binary.clone())
+ .collect::<Vec<_>>();
+ handler.set_startup_shaders(startup_shaders);
+ }
+ }
+ }
+
+ /// Add a new ProgramBinary to the cache.
+ /// This function is typically used after compiling and linking a new program.
+ /// The binary will be saved to disk the next time update_disk_cache() is called.
+ fn add_new_program_binary(&self, program_binary: Arc<ProgramBinary>) {
+ self.pending_entries.borrow_mut().push(program_binary.clone());
+
+ let digest = program_binary.source_digest.clone();
+ let entry = ProgramCacheEntry {
+ binary: program_binary,
+ linked: true,
+ };
+ self.entries.borrow_mut().insert(digest, entry);
+ }
+
+ /// Load ProgramBinary to ProgramCache.
+ /// The function is typically used to load ProgramBinary from disk.
+ #[cfg(feature = "serialize_program")]
+ pub fn load_program_binary(&self, program_binary: Arc<ProgramBinary>) {
+ let digest = program_binary.source_digest.clone();
+ let entry = ProgramCacheEntry {
+ binary: program_binary,
+ linked: false,
+ };
+ self.entries.borrow_mut().insert(digest, entry);
+ }
+
+ /// Returns the number of bytes allocated for shaders in the cache.
+ pub fn report_memory(&self, op: VoidPtrToSizeFn) -> usize {
+ self.entries.borrow().values()
+ .map(|e| unsafe { op(e.binary.bytes.as_ptr() as *const c_void ) })
+ .sum()
+ }
+}
+
+#[derive(Debug, Copy, Clone)]
+pub enum VertexUsageHint {
+ Static,
+ Dynamic,
+ Stream,
+}
+
+impl VertexUsageHint {
+ fn to_gl(&self) -> gl::GLuint {
+ match *self {
+ VertexUsageHint::Static => gl::STATIC_DRAW,
+ VertexUsageHint::Dynamic => gl::DYNAMIC_DRAW,
+ VertexUsageHint::Stream => gl::STREAM_DRAW,
+ }
+ }
+}
+
+#[derive(Copy, Clone, Debug)]
+pub struct UniformLocation(gl::GLint);
+
+impl UniformLocation {
+ pub const INVALID: Self = UniformLocation(-1);
+}
+
+#[derive(Debug)]
+pub struct Capabilities {
+ /// Whether multisampled render targets are supported.
+ pub supports_multisampling: bool,
+ /// Whether the function `glCopyImageSubData` is available.
+ pub supports_copy_image_sub_data: bool,
+ /// Whether we are able to use `glBlitFramebuffers` with the draw fbo
+ /// bound to a non-0th layer of a texture array. This is buggy on
+ /// Adreno devices.
+ pub supports_blit_to_texture_array: bool,
+ /// Whether we can use the pixel local storage functionality that
+ /// is available on some mobile GPUs. This allows fast access to
+ /// the per-pixel tile memory.
+ pub supports_pixel_local_storage: bool,
+ /// Whether advanced blend equations are supported.
+ pub supports_advanced_blend_equation: bool,
+ /// Whether dual-source blending is supported.
+ pub supports_dual_source_blending: bool,
+ /// Whether KHR_debug is supported for getting debug messages from
+ /// the driver.
+ pub supports_khr_debug: bool,
+ /// Whether we can configure texture units to do swizzling on sampling.
+ pub supports_texture_swizzle: bool,
+ /// Whether the driver supports uploading to textures from a non-zero
+ /// offset within a PBO.
+ pub supports_nonzero_pbo_offsets: bool,
+ /// Whether the driver supports specifying the texture usage up front.
+ pub supports_texture_usage: bool,
+ /// The name of the renderer, as reported by GL
+ pub renderer_name: String,
+}
+
+#[derive(Clone, Debug)]
+pub enum ShaderError {
+ Compilation(String, String), // name, error message
+ Link(String, String), // name, error message
+}
+
+/// A refcounted depth target, which may be shared by multiple textures across
+/// the device.
+struct SharedDepthTarget {
+ /// The Render Buffer Object representing the depth target.
+ rbo_id: RBOId,
+ /// Reference count. When this drops to zero, the RBO is deleted.
+ refcount: usize,
+}
+
+#[cfg(debug_assertions)]
+impl Drop for SharedDepthTarget {
+ fn drop(&mut self) {
+ debug_assert!(thread::panicking() || self.refcount == 0);
+ }
+}
+
+/// Describes for which texture formats to use the glTexStorage*
+/// family of functions.
+#[derive(PartialEq, Debug)]
+enum TexStorageUsage {
+ Never,
+ NonBGRA8,
+ Always,
+}
+
+/// Describes a required alignment for a stride,
+/// which can either be represented in bytes or pixels.
+#[derive(Copy, Clone, Debug)]
+pub enum StrideAlignment {
+ Bytes(NonZeroUsize),
+ Pixels(NonZeroUsize),
+}
+
+impl StrideAlignment {
+ pub fn num_bytes(&self, format: ImageFormat) -> NonZeroUsize {
+ match *self {
+ Self::Bytes(bytes) => bytes,
+ Self::Pixels(pixels) => {
+ assert!(format.bytes_per_pixel() > 0);
+ NonZeroUsize::new(pixels.get() * format.bytes_per_pixel() as usize).unwrap()
+ }
+ }
+ }
+}
+
+// We get 24 bits of Z value - use up 22 bits of it to give us
+// 4 bits to account for GPU issues. This seems to manifest on
+// some GPUs under certain perspectives due to z interpolation
+// precision problems.
+const RESERVE_DEPTH_BITS: i32 = 2;
+
+pub struct Device {
+ gl: Rc<dyn gl::Gl>,
+
+ /// If non-None, |gl| points to a profiling wrapper, and this points to the
+ /// underling Gl instance.
+ base_gl: Option<Rc<dyn gl::Gl>>,
+
+ // device state
+ bound_textures: [gl::GLuint; 16],
+ bound_program: gl::GLuint,
+ bound_vao: gl::GLuint,
+ bound_read_fbo: FBOId,
+ bound_draw_fbo: FBOId,
+ program_mode_id: UniformLocation,
+ default_read_fbo: FBOId,
+ default_draw_fbo: FBOId,
+
+ /// Track depth state for assertions. Note that the default FBO has depth,
+ /// so this defaults to true.
+ depth_available: bool,
+
+ upload_method: UploadMethod,
+
+ // HW or API capabilities
+ capabilities: Capabilities,
+
+ color_formats: TextureFormatPair<ImageFormat>,
+ bgra_formats: TextureFormatPair<gl::GLuint>,
+ swizzle_settings: SwizzleSettings,
+ depth_format: gl::GLuint,
+
+ /// Map from texture dimensions to shared depth buffers for render targets.
+ ///
+ /// Render targets often have the same width/height, so we can save memory
+ /// by sharing these across targets.
+ depth_targets: FastHashMap<DeviceIntSize, SharedDepthTarget>,
+
+ // debug
+ inside_frame: bool,
+
+ // resources
+ resource_override_path: Option<PathBuf>,
+
+ /// Whether to use shaders that have been optimized at build time.
+ use_optimized_shaders: bool,
+
+ max_texture_size: i32,
+ max_texture_layers: u32,
+ cached_programs: Option<Rc<ProgramCache>>,
+
+ // Frame counter. This is used to map between CPU
+ // frames and GPU frames.
+ frame_id: GpuFrameId,
+
+ /// When to use glTexStorage*. We prefer this over glTexImage* because it
+ /// guarantees that mipmaps won't be generated (which they otherwise are on
+ /// some drivers, particularly ANGLE). However, it is not always supported
+ /// at all, or for BGRA8 format. If it's not supported for the required
+ /// format, we fall back to glTexImage*.
+ texture_storage_usage: TexStorageUsage,
+
+ optimal_pbo_stride: StrideAlignment,
+
+ /// Whether we must ensure the source strings passed to glShaderSource()
+ /// are null-terminated, to work around driver bugs.
+ requires_null_terminated_shader_source: bool,
+
+ /// Whether we must unbind any texture from GL_TEXTURE_EXTERNAL_OES before
+ /// binding to GL_TEXTURE_2D, to work around an android emulator bug.
+ requires_texture_external_unbind: bool,
+
+ // GL extensions
+ extensions: Vec<String>,
+
+ /// Dumps the source of the shader with the given name
+ dump_shader_source: Option<String>,
+
+ surface_origin_is_top_left: bool,
+
+ /// A debug boolean for tracking if the shader program has been set after
+ /// a blend mode change.
+ ///
+ /// This is needed for compatibility with next-gen
+ /// GPU APIs that switch states using "pipeline object" that bundles
+ /// together the blending state with the shader.
+ ///
+ /// Having the constraint of always binding the shader last would allow
+ /// us to have the "pipeline object" bound at that time. Without this
+ /// constraint, we'd either have to eagerly bind the "pipeline object"
+ /// on changing either the shader or the blend more, or lazily bind it
+ /// at draw call time, neither of which is desirable.
+ #[cfg(debug_assertions)]
+ shader_is_ready: bool,
+}
+
+/// Contains the parameters necessary to bind a draw target.
+#[derive(Clone, Copy, Debug)]
+pub enum DrawTarget {
+ /// Use the device's default draw target, with the provided dimensions,
+ /// which are used to set the viewport.
+ Default {
+ /// Target rectangle to draw.
+ rect: FramebufferIntRect,
+ /// Total size of the target.
+ total_size: FramebufferIntSize,
+ surface_origin_is_top_left: bool,
+ },
+ /// Use the provided texture.
+ Texture {
+ /// Size of the texture in pixels
+ dimensions: DeviceIntSize,
+ /// The slice within the texture array to draw to
+ layer: LayerIndex,
+ /// Whether to draw with the texture's associated depth target
+ with_depth: bool,
+ /// Workaround buffers for devices with broken texture array copy implementation
+ blit_workaround_buffer: Option<(RBOId, FBOId)>,
+ /// FBO that corresponds to the selected layer / depth mode
+ fbo_id: FBOId,
+ /// Native GL texture ID
+ id: gl::GLuint,
+ /// Native GL texture target
+ target: gl::GLuint,
+ },
+ /// Use an FBO attached to an external texture.
+ External {
+ fbo: FBOId,
+ size: FramebufferIntSize,
+ },
+ /// An OS compositor surface
+ NativeSurface {
+ offset: DeviceIntPoint,
+ external_fbo_id: u32,
+ dimensions: DeviceIntSize,
+ },
+}
+
+impl DrawTarget {
+ pub fn new_default(size: DeviceIntSize, surface_origin_is_top_left: bool) -> Self {
+ let total_size = device_size_as_framebuffer_size(size);
+ DrawTarget::Default {
+ rect: total_size.into(),
+ total_size,
+ surface_origin_is_top_left,
+ }
+ }
+
+ /// Returns true if this draw target corresponds to the default framebuffer.
+ pub fn is_default(&self) -> bool {
+ match *self {
+ DrawTarget::Default {..} => true,
+ _ => false,
+ }
+ }
+
+ pub fn from_texture(
+ texture: &Texture,
+ layer: usize,
+ with_depth: bool,
+ ) -> Self {
+ let fbo_id = if with_depth {
+ texture.fbos_with_depth[layer]
+ } else {
+ texture.fbos[layer]
+ };
+
+ DrawTarget::Texture {
+ dimensions: texture.get_dimensions(),
+ fbo_id,
+ with_depth,
+ layer,
+ blit_workaround_buffer: texture.blit_workaround_buffer,
+ id: texture.id,
+ target: texture.target,
+ }
+ }
+
+ /// Returns the dimensions of this draw-target.
+ pub fn dimensions(&self) -> DeviceIntSize {
+ match *self {
+ DrawTarget::Default { total_size, .. } => total_size.cast_unit(),
+ DrawTarget::Texture { dimensions, .. } => dimensions,
+ DrawTarget::External { size, .. } => size.cast_unit(),
+ DrawTarget::NativeSurface { dimensions, .. } => dimensions,
+ }
+ }
+
+ pub fn to_framebuffer_rect(&self, device_rect: DeviceIntRect) -> FramebufferIntRect {
+ let mut fb_rect = device_rect_as_framebuffer_rect(&device_rect);
+ match *self {
+ DrawTarget::Default { ref rect, surface_origin_is_top_left, .. } => {
+ // perform a Y-flip here
+ if !surface_origin_is_top_left {
+ fb_rect.origin.y = rect.origin.y + rect.size.height - fb_rect.origin.y - fb_rect.size.height;
+ fb_rect.origin.x += rect.origin.x;
+ }
+ }
+ DrawTarget::Texture { .. } | DrawTarget::External { .. } => (),
+ DrawTarget::NativeSurface { .. } => {
+ panic!("bug: is this ever used for native surfaces?");
+ }
+ }
+ fb_rect
+ }
+
+ /// Given a scissor rect, convert it to the right coordinate space
+ /// depending on the draw target kind. If no scissor rect was supplied,
+ /// returns a scissor rect that encloses the entire render target.
+ pub fn build_scissor_rect(
+ &self,
+ scissor_rect: Option<DeviceIntRect>,
+ content_origin: DeviceIntPoint,
+ ) -> FramebufferIntRect {
+ let dimensions = self.dimensions();
+
+ match scissor_rect {
+ Some(scissor_rect) => match *self {
+ DrawTarget::Default { ref rect, .. } => {
+ self.to_framebuffer_rect(scissor_rect.translate(-content_origin.to_vector()))
+ .intersection(rect)
+ .unwrap_or_else(FramebufferIntRect::zero)
+ }
+ DrawTarget::NativeSurface { offset, .. } => {
+ device_rect_as_framebuffer_rect(&scissor_rect.translate(offset.to_vector()))
+ }
+ DrawTarget::Texture { .. } | DrawTarget::External { .. } => {
+ device_rect_as_framebuffer_rect(&scissor_rect)
+ }
+ }
+ None => {
+ FramebufferIntRect::new(
+ FramebufferIntPoint::zero(),
+ device_size_as_framebuffer_size(dimensions),
+ )
+ }
+ }
+ }
+}
+
+/// Contains the parameters necessary to bind a texture-backed read target.
+#[derive(Clone, Copy, Debug)]
+pub enum ReadTarget {
+ /// Use the device's default draw target.
+ Default,
+ /// Use the provided texture,
+ Texture {
+ /// ID of the FBO to read from.
+ fbo_id: FBOId,
+ },
+ /// Use an FBO attached to an external texture.
+ External {
+ fbo: FBOId,
+ },
+}
+
+impl ReadTarget {
+ pub fn from_texture(
+ texture: &Texture,
+ layer: usize,
+ ) -> Self {
+ ReadTarget::Texture {
+ fbo_id: texture.fbos[layer],
+ }
+ }
+}
+
+impl From<DrawTarget> for ReadTarget {
+ fn from(t: DrawTarget) -> Self {
+ match t {
+ DrawTarget::Default { .. } => ReadTarget::Default,
+ DrawTarget::NativeSurface { .. } => {
+ unreachable!("bug: native surfaces cannot be read targets");
+ }
+ DrawTarget::Texture { fbo_id, .. } =>
+ ReadTarget::Texture { fbo_id },
+ DrawTarget::External { fbo, .. } =>
+ ReadTarget::External { fbo },
+ }
+ }
+}
+
+impl Device {
+ pub fn new(
+ mut gl: Rc<dyn gl::Gl>,
+ resource_override_path: Option<PathBuf>,
+ use_optimized_shaders: bool,
+ upload_method: UploadMethod,
+ cached_programs: Option<Rc<ProgramCache>>,
+ allow_pixel_local_storage_support: bool,
+ allow_texture_storage_support: bool,
+ allow_texture_swizzling: bool,
+ dump_shader_source: Option<String>,
+ surface_origin_is_top_left: bool,
+ panic_on_gl_error: bool,
+ ) -> Device {
+ let mut max_texture_size = [0];
+ let mut max_texture_layers = [0];
+ unsafe {
+ gl.get_integer_v(gl::MAX_TEXTURE_SIZE, &mut max_texture_size);
+ gl.get_integer_v(gl::MAX_ARRAY_TEXTURE_LAYERS, &mut max_texture_layers);
+ }
+
+ let max_texture_size = max_texture_size[0];
+ let max_texture_layers = max_texture_layers[0] as u32;
+ let renderer_name = gl.get_string(gl::RENDERER);
+
+ let mut extension_count = [0];
+ unsafe {
+ gl.get_integer_v(gl::NUM_EXTENSIONS, &mut extension_count);
+ }
+ let extension_count = extension_count[0] as gl::GLuint;
+ let mut extensions = Vec::new();
+ for i in 0 .. extension_count {
+ extensions.push(gl.get_string_i(gl::EXTENSIONS, i));
+ }
+
+ // On debug builds, assert that each GL call is error-free. We don't do
+ // this on release builds because the synchronous call can stall the
+ // pipeline.
+ let supports_khr_debug = supports_extension(&extensions, "GL_KHR_debug");
+ if panic_on_gl_error || cfg!(debug_assertions) {
+ gl = gl::ErrorReactingGl::wrap(gl, move |gl, name, code| {
+ if supports_khr_debug {
+ Self::log_driver_messages(gl);
+ }
+ println!("Caught GL error {:x} at {}", code, name);
+ panic!("Caught GL error {:x} at {}", code, name);
+ });
+ }
+
+ if supports_extension(&extensions, "GL_ANGLE_provoking_vertex") {
+ gl.provoking_vertex_angle(gl::FIRST_VERTEX_CONVENTION);
+ }
+
+ let supports_texture_usage = supports_extension(&extensions, "GL_ANGLE_texture_usage");
+
+ // Our common-case image data in Firefox is BGRA, so we make an effort
+ // to use BGRA as the internal texture storage format to avoid the need
+ // to swizzle during upload. Currently we only do this on GLES (and thus
+ // for Windows, via ANGLE).
+ //
+ // On Mac, Apple docs [1] claim that BGRA is a more efficient internal
+ // format, but they don't support it with glTextureStorage. As a workaround,
+ // we pretend that it's RGBA8 for the purposes of texture transfers,
+ // but swizzle R with B for the texture sampling.
+ //
+ // We also need our internal format types to be sized, since glTexStorage*
+ // will reject non-sized internal format types.
+ //
+ // Unfortunately, with GL_EXT_texture_format_BGRA8888, BGRA8 is not a
+ // valid internal format (for glTexImage* or glTexStorage*) unless
+ // GL_EXT_texture_storage is also available [2][3], which is usually
+ // not the case on GLES 3 as the latter's functionality has been
+ // included by default but the former has not been updated.
+ // The extension is available on ANGLE, but on Android this usually
+ // means we must fall back to using unsized BGRA and glTexImage*.
+ //
+ // Overall, we have the following factors in play when choosing the formats:
+ // - with glTexStorage, the internal format needs to match the external format,
+ // or the driver would have to do the conversion, which is slow
+ // - on desktop GL, there is no BGRA internal format. However, initializing
+ // the textures with glTexImage as RGBA appears to use BGRA internally,
+ // preferring BGRA external data [4].
+ // - when glTexStorage + BGRA internal format is not supported,
+ // and the external data is BGRA, we have the following options:
+ // 1. use glTexImage with RGBA internal format, this costs us VRAM for mipmaps
+ // 2. use glTexStorage with RGBA internal format, this costs us the conversion by the driver
+ // 3. pretend we are uploading RGBA and set up the swizzling of the texture unit - this costs us batch breaks
+ //
+ // [1] https://developer.apple.com/library/archive/documentation/
+ // GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_texturedata/
+ // opengl_texturedata.html#//apple_ref/doc/uid/TP40001987-CH407-SW22
+ // [2] https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_format_BGRA8888.txt
+ // [3] https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_storage.txt
+ // [4] http://http.download.nvidia.com/developer/Papers/2005/Fast_Texture_Transfers/Fast_Texture_Transfers.pdf
+
+ // To support BGRA8 with glTexStorage* we specifically need
+ // GL_EXT_texture_storage and GL_EXT_texture_format_BGRA8888.
+ let supports_gles_bgra = supports_extension(&extensions, "GL_EXT_texture_format_BGRA8888");
+
+ // On the android emulator glTexImage fails to create textures larger than 3379.
+ // So we must use glTexStorage instead. See bug 1591436.
+ let is_emulator = renderer_name.starts_with("Android Emulator");
+ let avoid_tex_image = is_emulator;
+ let gl_version = gl.get_string(gl::VERSION);
+
+ let supports_texture_storage = allow_texture_storage_support &&
+ match gl.get_type() {
+ gl::GlType::Gl => supports_extension(&extensions, "GL_ARB_texture_storage"),
+ // ES 3 technically always supports glTexStorage, but only check here for the extension
+ // necessary to interact with BGRA.
+ gl::GlType::Gles => supports_extension(&extensions, "GL_EXT_texture_storage"),
+ };
+ let supports_texture_swizzle = allow_texture_swizzling &&
+ match gl.get_type() {
+ // see https://www.g-truc.net/post-0734.html
+ gl::GlType::Gl => gl_version.as_str() >= "3.3" ||
+ supports_extension(&extensions, "GL_ARB_texture_swizzle"),
+ gl::GlType::Gles => true,
+ };
+
+ let (color_formats, bgra_formats, bgra8_sampling_swizzle, texture_storage_usage) = match gl.get_type() {
+ // There is `glTexStorage`, use it and expect RGBA on the input.
+ gl::GlType::Gl if supports_texture_storage && supports_texture_swizzle => (
+ TextureFormatPair::from(ImageFormat::RGBA8),
+ TextureFormatPair { internal: gl::RGBA8, external: gl::RGBA },
+ Swizzle::Bgra, // pretend it's RGBA, rely on swizzling
+ TexStorageUsage::Always
+ ),
+ // There is no `glTexStorage`, upload as `glTexImage` with BGRA input.
+ gl::GlType::Gl => (
+ TextureFormatPair { internal: ImageFormat::RGBA8, external: ImageFormat::BGRA8 },
+ TextureFormatPair { internal: gl::RGBA, external: gl::BGRA },
+ Swizzle::Rgba, // converted on uploads by the driver, no swizzling needed
+ TexStorageUsage::Never
+ ),
+ // We can use glTexStorage with BGRA8 as the internal format.
+ gl::GlType::Gles if supports_gles_bgra && supports_texture_storage => (
+ TextureFormatPair::from(ImageFormat::BGRA8),
+ TextureFormatPair { internal: gl::BGRA8_EXT, external: gl::BGRA_EXT },
+ Swizzle::Rgba, // no conversion needed
+ TexStorageUsage::Always,
+ ),
+ // For BGRA8 textures we must use the unsized BGRA internal
+ // format and glTexImage. If texture storage is supported we can
+ // use it for other formats, which is always the case for ES 3.
+ // We can't use glTexStorage with BGRA8 as the internal format.
+ gl::GlType::Gles if supports_gles_bgra && !avoid_tex_image => (
+ TextureFormatPair::from(ImageFormat::RGBA8),
+ TextureFormatPair::from(gl::BGRA_EXT),
+ Swizzle::Rgba, // no conversion needed
+ TexStorageUsage::NonBGRA8,
+ ),
+ // BGRA is not supported as an internal format, therefore we will
+ // use RGBA. The swizzling will happen at the texture unit.
+ gl::GlType::Gles if supports_texture_swizzle => (
+ TextureFormatPair::from(ImageFormat::RGBA8),
+ TextureFormatPair { internal: gl::RGBA8, external: gl::RGBA },
+ Swizzle::Bgra, // pretend it's RGBA, rely on swizzling
+ TexStorageUsage::Always,
+ ),
+ // BGRA and swizzling are not supported. We force the conversion done by the driver.
+ gl::GlType::Gles => (
+ TextureFormatPair::from(ImageFormat::RGBA8),
+ TextureFormatPair { internal: gl::RGBA8, external: gl::BGRA },
+ Swizzle::Rgba,
+ TexStorageUsage::Always,
+ ),
+ };
+
+ let is_software_webrender = renderer_name.starts_with("Software WebRender");
+ let (depth_format, upload_method) = if is_software_webrender {
+ (gl::DEPTH_COMPONENT16, UploadMethod::Immediate)
+ } else {
+ (gl::DEPTH_COMPONENT24, upload_method)
+ };
+
+ info!("GL texture cache {:?}, bgra {:?} swizzle {:?}, texture storage {:?}, depth {:?}",
+ color_formats, bgra_formats, bgra8_sampling_swizzle, texture_storage_usage, depth_format);
+ let supports_copy_image_sub_data = supports_extension(&extensions, "GL_EXT_copy_image") ||
+ supports_extension(&extensions, "GL_ARB_copy_image");
+
+ // Due to a bug on Adreno devices, blitting to an fbo bound to
+ // a non-0th layer of a texture array is not supported.
+ let supports_blit_to_texture_array = !renderer_name.starts_with("Adreno");
+
+ // Check if the device supports the two extensions needed in order to use
+ // pixel local storage.
+ // TODO(gw): Consider if we can remove fb fetch / init, by using PLS for opaque pass too.
+ // TODO(gw): Support EXT_shader_framebuffer_fetch as well.
+ let ext_pixel_local_storage = supports_extension(&extensions, "GL_EXT_shader_pixel_local_storage");
+ let ext_framebuffer_fetch = supports_extension(&extensions, "GL_ARM_shader_framebuffer_fetch");
+ let supports_pixel_local_storage =
+ allow_pixel_local_storage_support &&
+ ext_framebuffer_fetch &&
+ ext_pixel_local_storage;
+
+ let is_adreno = renderer_name.starts_with("Adreno");
+
+ // KHR_blend_equation_advanced renders incorrectly on Adreno
+ // devices. This has only been confirmed up to Adreno 5xx, and has been
+ // fixed for Android 9, so this condition could be made more specific.
+ let supports_advanced_blend_equation =
+ supports_extension(&extensions, "GL_KHR_blend_equation_advanced") &&
+ !is_adreno;
+
+ let supports_dual_source_blending = match gl.get_type() {
+ gl::GlType::Gl => supports_extension(&extensions,"GL_ARB_blend_func_extended") &&
+ supports_extension(&extensions,"GL_ARB_explicit_attrib_location"),
+ gl::GlType::Gles => supports_extension(&extensions,"GL_EXT_blend_func_extended"),
+ };
+
+ // Software webrender relies on the unoptimized shader source.
+ let use_optimized_shaders = use_optimized_shaders && !is_software_webrender;
+
+ // On the android emulator, glShaderSource can crash if the source
+ // strings are not null-terminated. See bug 1591945.
+ let requires_null_terminated_shader_source = is_emulator;
+
+ // The android emulator gets confused if you don't explicitly unbind any texture
+ // from GL_TEXTURE_EXTERNAL_OES before binding another to GL_TEXTURE_2D. See bug 1636085.
+ let requires_texture_external_unbind = is_emulator;
+
+ let is_amd_macos = cfg!(target_os = "macos") && renderer_name.starts_with("AMD");
+
+ // On certain GPUs PBO texture upload is only performed asynchronously
+ // if the stride of the data is a multiple of a certain value.
+ // On Adreno it must be a multiple of 64 pixels, meaning value in bytes
+ // varies with the texture format.
+ // On AMD Mac, it must always be a multiple of 256 bytes.
+ // Other platforms may have similar requirements and should be added
+ // here.
+ // The default value should be 4 bytes.
+ let optimal_pbo_stride = if is_adreno {
+ StrideAlignment::Pixels(NonZeroUsize::new(64).unwrap())
+ } else if is_amd_macos {
+ StrideAlignment::Bytes(NonZeroUsize::new(256).unwrap())
+ } else {
+ StrideAlignment::Bytes(NonZeroUsize::new(4).unwrap())
+ };
+
+ // On AMD Macs there is a driver bug which causes some texture uploads
+ // from a non-zero offset within a PBO to fail. See bug 1603783.
+ let supports_nonzero_pbo_offsets = !is_amd_macos;
+
+ Device {
+ gl,
+ base_gl: None,
+ resource_override_path,
+ use_optimized_shaders,
+ upload_method,
+ inside_frame: false,
+
+ capabilities: Capabilities {
+ supports_multisampling: false, //TODO
+ supports_copy_image_sub_data,
+ supports_blit_to_texture_array,
+ supports_pixel_local_storage,
+ supports_advanced_blend_equation,
+ supports_dual_source_blending,
+ supports_khr_debug,
+ supports_texture_swizzle,
+ supports_nonzero_pbo_offsets,
+ supports_texture_usage,
+ renderer_name,
+ },
+
+ color_formats,
+ bgra_formats,
+ swizzle_settings: SwizzleSettings {
+ bgra8_sampling_swizzle,
+ },
+ depth_format,
+
+ depth_targets: FastHashMap::default(),
+
+ bound_textures: [0; 16],
+ bound_program: 0,
+ bound_vao: 0,
+ bound_read_fbo: FBOId(0),
+ bound_draw_fbo: FBOId(0),
+ program_mode_id: UniformLocation::INVALID,
+ default_read_fbo: FBOId(0),
+ default_draw_fbo: FBOId(0),
+
+ depth_available: true,
+
+ max_texture_size,
+ max_texture_layers,
+ cached_programs,
+ frame_id: GpuFrameId(0),
+ extensions,
+ texture_storage_usage,
+ requires_null_terminated_shader_source,
+ requires_texture_external_unbind,
+ optimal_pbo_stride,
+ dump_shader_source,
+ surface_origin_is_top_left,
+
+ #[cfg(debug_assertions)]
+ shader_is_ready: false,
+ }
+ }
+
+ pub fn gl(&self) -> &dyn gl::Gl {
+ &*self.gl
+ }
+
+ pub fn rc_gl(&self) -> &Rc<dyn gl::Gl> {
+ &self.gl
+ }
+
+ /// Ensures that the maximum texture size is less than or equal to the
+ /// provided value. If the provided value is less than the value supported
+ /// by the driver, the latter is used.
+ pub fn clamp_max_texture_size(&mut self, size: i32) {
+ self.max_texture_size = self.max_texture_size.min(size);
+ }
+
+ /// Returns the limit on texture dimensions (width or height).
+ pub fn max_texture_size(&self) -> i32 {
+ self.max_texture_size
+ }
+
+ pub fn surface_origin_is_top_left(&self) -> bool {
+ self.surface_origin_is_top_left
+ }
+
+ /// Returns the limit on texture array layers.
+ pub fn max_texture_layers(&self) -> usize {
+ self.max_texture_layers as usize
+ }
+
+ pub fn get_capabilities(&self) -> &Capabilities {
+ &self.capabilities
+ }
+
+ pub fn preferred_color_formats(&self) -> TextureFormatPair<ImageFormat> {
+ self.color_formats.clone()
+ }
+
+ pub fn swizzle_settings(&self) -> Option<SwizzleSettings> {
+ if self.capabilities.supports_texture_swizzle {
+ Some(self.swizzle_settings)
+ } else {
+ None
+ }
+ }
+
+ pub fn depth_bits(&self) -> i32 {
+ match self.depth_format {
+ gl::DEPTH_COMPONENT16 => 16,
+ gl::DEPTH_COMPONENT24 => 24,
+ _ => panic!("Unknown depth format {:?}", self.depth_format),
+ }
+ }
+
+ // See gpu_types.rs where we declare the number of possible documents and
+ // number of items per document. This should match up with that.
+ pub fn max_depth_ids(&self) -> i32 {
+ return 1 << (self.depth_bits() - RESERVE_DEPTH_BITS);
+ }
+
+ pub fn ortho_near_plane(&self) -> f32 {
+ return -self.max_depth_ids() as f32;
+ }
+
+ pub fn ortho_far_plane(&self) -> f32 {
+ return (self.max_depth_ids() - 1) as f32;
+ }
+
+ pub fn optimal_pbo_stride(&self) -> StrideAlignment {
+ self.optimal_pbo_stride
+ }
+
+ pub fn reset_state(&mut self) {
+ for i in 0 .. self.bound_textures.len() {
+ self.bound_textures[i] = 0;
+ self.gl.active_texture(gl::TEXTURE0 + i as gl::GLuint);
+ self.gl.bind_texture(gl::TEXTURE_2D, 0);
+ }
+
+ self.bound_vao = 0;
+ self.gl.bind_vertex_array(0);
+
+ self.bound_read_fbo = self.default_read_fbo;
+ self.gl.bind_framebuffer(gl::READ_FRAMEBUFFER, self.bound_read_fbo.0);
+
+ self.bound_draw_fbo = self.default_draw_fbo;
+ self.gl.bind_framebuffer(gl::DRAW_FRAMEBUFFER, self.bound_draw_fbo.0);
+ }
+
+ #[cfg(debug_assertions)]
+ fn print_shader_errors(source: &str, log: &str) {
+ // hacky way to extract the offending lines
+ if !log.starts_with("0:") && !log.starts_with("0(") {
+ return;
+ }
+ let end_pos = match log[2..].chars().position(|c| !c.is_digit(10)) {
+ Some(pos) => 2 + pos,
+ None => return,
+ };
+ let base_line_number = match log[2 .. end_pos].parse::<usize>() {
+ Ok(number) if number >= 2 => number - 2,
+ _ => return,
+ };
+ for (line, prefix) in source.lines().skip(base_line_number).zip(&["|",">","|"]) {
+ error!("{}\t{}", prefix, line);
+ }
+ }
+
+ pub fn compile_shader(
+ gl: &dyn gl::Gl,
+ name: &str,
+ shader_type: gl::GLenum,
+ source: &String,
+ requires_null_terminated_shader_source: bool,
+ ) -> Result<gl::GLuint, ShaderError> {
+ debug!("compile {}", name);
+ let id = gl.create_shader(shader_type);
+ if requires_null_terminated_shader_source {
+ // Ensure the source strings we pass to glShaderSource are
+ // null-terminated on buggy platforms.
+ use std::ffi::CString;
+ let terminated_source = CString::new(source.as_bytes()).unwrap();
+ gl.shader_source(id, &[terminated_source.as_bytes_with_nul()]);
+ } else {
+ gl.shader_source(id, &[source.as_bytes()]);
+ }
+ gl.compile_shader(id);
+ let log = gl.get_shader_info_log(id);
+ let mut status = [0];
+ unsafe {
+ gl.get_shader_iv(id, gl::COMPILE_STATUS, &mut status);
+ }
+ if status[0] == 0 {
+ error!("Failed to compile shader: {}\n{}", name, log);
+ #[cfg(debug_assertions)]
+ Self::print_shader_errors(source, &log);
+ Err(ShaderError::Compilation(name.to_string(), log))
+ } else {
+ if !log.is_empty() {
+ warn!("Warnings detected on shader: {}\n{}", name, log);
+ }
+ Ok(id)
+ }
+ }
+
+ pub fn begin_frame(&mut self) -> GpuFrameId {
+ debug_assert!(!self.inside_frame);
+ self.inside_frame = true;
+ #[cfg(debug_assertions)]
+ {
+ self.shader_is_ready = false;
+ }
+
+ // If our profiler state has changed, apply or remove the profiling
+ // wrapper from our GL context.
+ let being_profiled = profiler::thread_is_being_profiled();
+ let using_wrapper = self.base_gl.is_some();
+ if being_profiled && !using_wrapper {
+ fn note(name: &str, duration: Duration) {
+ profiler::add_text_marker(cstr!("OpenGL Calls"), name, duration);
+ }
+ let threshold = Duration::from_millis(1);
+ let wrapped = gl::ProfilingGl::wrap(self.gl.clone(), threshold, note);
+ let base = mem::replace(&mut self.gl, wrapped);
+ self.base_gl = Some(base);
+ } else if !being_profiled && using_wrapper {
+ self.gl = self.base_gl.take().unwrap();
+ }
+
+ // Retrieve the currently set FBO.
+ let mut default_read_fbo = [0];
+ unsafe {
+ self.gl.get_integer_v(gl::READ_FRAMEBUFFER_BINDING, &mut default_read_fbo);
+ }
+ self.default_read_fbo = FBOId(default_read_fbo[0] as gl::GLuint);
+ let mut default_draw_fbo = [0];
+ unsafe {
+ self.gl.get_integer_v(gl::DRAW_FRAMEBUFFER_BINDING, &mut default_draw_fbo);
+ }
+ self.default_draw_fbo = FBOId(default_draw_fbo[0] as gl::GLuint);
+
+ // Shader state
+ self.bound_program = 0;
+ self.program_mode_id = UniformLocation::INVALID;
+ self.gl.use_program(0);
+
+ // Reset common state
+ self.reset_state();
+
+ // Pixel op state
+ self.gl.pixel_store_i(gl::UNPACK_ALIGNMENT, 1);
+ self.gl.bind_buffer(gl::PIXEL_UNPACK_BUFFER, 0);
+
+ // Default is sampler 0, always
+ self.gl.active_texture(gl::TEXTURE0);
+
+ self.frame_id
+ }
+
+ fn bind_texture_impl(
+ &mut self, slot: TextureSlot, id: gl::GLuint, target: gl::GLenum, set_swizzle: Option<Swizzle>
+ ) {
+ debug_assert!(self.inside_frame);
+
+ if self.bound_textures[slot.0] != id || set_swizzle.is_some() {
+ self.gl.active_texture(gl::TEXTURE0 + slot.0 as gl::GLuint);
+ // The android emulator gets confused if you don't explicitly unbind any texture
+ // from GL_TEXTURE_EXTERNAL_OES before binding to GL_TEXTURE_2D. See bug 1636085.
+ if target == gl::TEXTURE_2D && self.requires_texture_external_unbind {
+ self.gl.bind_texture(gl::TEXTURE_EXTERNAL_OES, 0);
+ }
+ self.gl.bind_texture(target, id);
+ if let Some(swizzle) = set_swizzle {
+ if self.capabilities.supports_texture_swizzle {
+ let components = match swizzle {
+ Swizzle::Rgba => [gl::RED, gl::GREEN, gl::BLUE, gl::ALPHA],
+ Swizzle::Bgra => [gl::BLUE, gl::GREEN, gl::RED, gl::ALPHA],
+ };
+ self.gl.tex_parameter_i(target, gl::TEXTURE_SWIZZLE_R, components[0] as i32);
+ self.gl.tex_parameter_i(target, gl::TEXTURE_SWIZZLE_G, components[1] as i32);
+ self.gl.tex_parameter_i(target, gl::TEXTURE_SWIZZLE_B, components[2] as i32);
+ self.gl.tex_parameter_i(target, gl::TEXTURE_SWIZZLE_A, components[3] as i32);
+ } else {
+ debug_assert_eq!(swizzle, Swizzle::default());
+ }
+ }
+ self.gl.active_texture(gl::TEXTURE0);
+ self.bound_textures[slot.0] = id;
+ }
+ }
+
+ pub fn bind_texture<S>(&mut self, slot: S, texture: &Texture, swizzle: Swizzle)
+ where
+ S: Into<TextureSlot>,
+ {
+ let old_swizzle = texture.active_swizzle.replace(swizzle);
+ let set_swizzle = if old_swizzle != swizzle {
+ Some(swizzle)
+ } else {
+ None
+ };
+ self.bind_texture_impl(slot.into(), texture.id, texture.target, set_swizzle);
+ }
+
+ pub fn bind_external_texture<S>(&mut self, slot: S, external_texture: &ExternalTexture)
+ where
+ S: Into<TextureSlot>,
+ {
+ self.bind_texture_impl(slot.into(), external_texture.id, external_texture.target, None);
+ }
+
+ pub fn bind_read_target_impl(&mut self, fbo_id: FBOId) {
+ debug_assert!(self.inside_frame);
+
+ if self.bound_read_fbo != fbo_id {
+ self.bound_read_fbo = fbo_id;
+ fbo_id.bind(self.gl(), FBOTarget::Read);
+ }
+ }
+
+ pub fn bind_read_target(&mut self, target: ReadTarget) {
+ let fbo_id = match target {
+ ReadTarget::Default => self.default_read_fbo,
+ ReadTarget::Texture { fbo_id } => fbo_id,
+ ReadTarget::External { fbo } => fbo,
+ };
+
+ self.bind_read_target_impl(fbo_id)
+ }
+
+ fn bind_draw_target_impl(&mut self, fbo_id: FBOId) {
+ debug_assert!(self.inside_frame);
+
+ if self.bound_draw_fbo != fbo_id {
+ self.bound_draw_fbo = fbo_id;
+ fbo_id.bind(self.gl(), FBOTarget::Draw);
+ }
+ }
+
+ pub fn reset_read_target(&mut self) {
+ let fbo = self.default_read_fbo;
+ self.bind_read_target_impl(fbo);
+ }
+
+
+ pub fn reset_draw_target(&mut self) {
+ let fbo = self.default_draw_fbo;
+ self.bind_draw_target_impl(fbo);
+ self.depth_available = true;
+ }
+
+ pub fn bind_draw_target(
+ &mut self,
+ target: DrawTarget,
+ ) {
+ let (fbo_id, rect, depth_available) = match target {
+ DrawTarget::Default { rect, .. } => {
+ (self.default_draw_fbo, rect, true)
+ }
+ DrawTarget::Texture { dimensions, fbo_id, with_depth, .. } => {
+ let rect = FramebufferIntRect::new(
+ FramebufferIntPoint::zero(),
+ device_size_as_framebuffer_size(dimensions),
+ );
+ (fbo_id, rect, with_depth)
+ },
+ DrawTarget::External { fbo, size } => {
+ (fbo, size.into(), false)
+ }
+ DrawTarget::NativeSurface { external_fbo_id, offset, dimensions, .. } => {
+ (
+ FBOId(external_fbo_id),
+ device_rect_as_framebuffer_rect(&DeviceIntRect::new(offset, dimensions)),
+ true
+ )
+ }
+ };
+
+ self.depth_available = depth_available;
+ self.bind_draw_target_impl(fbo_id);
+ self.gl.viewport(
+ rect.origin.x,
+ rect.origin.y,
+ rect.size.width,
+ rect.size.height,
+ );
+ }
+
+ /// Creates an unbound FBO object. Additional attachment API calls are
+ /// required to make it complete.
+ pub fn create_fbo(&mut self) -> FBOId {
+ FBOId(self.gl.gen_framebuffers(1)[0])
+ }
+
+ /// Creates an FBO with the given texture bound as the color attachment.
+ pub fn create_fbo_for_external_texture(&mut self, texture_id: u32) -> FBOId {
+ let fbo = self.create_fbo();
+ fbo.bind(self.gl(), FBOTarget::Draw);
+ self.gl.framebuffer_texture_2d(
+ gl::DRAW_FRAMEBUFFER,
+ gl::COLOR_ATTACHMENT0,
+ gl::TEXTURE_2D,
+ texture_id,
+ 0,
+ );
+ debug_assert_eq!(
+ self.gl.check_frame_buffer_status(gl::DRAW_FRAMEBUFFER),
+ gl::FRAMEBUFFER_COMPLETE,
+ "Incomplete framebuffer",
+ );
+ self.bound_draw_fbo.bind(self.gl(), FBOTarget::Draw);
+ fbo
+ }
+
+ pub fn delete_fbo(&mut self, fbo: FBOId) {
+ self.gl.delete_framebuffers(&[fbo.0]);
+ }
+
+ pub fn bind_external_draw_target(&mut self, fbo_id: FBOId) {
+ debug_assert!(self.inside_frame);
+
+ if self.bound_draw_fbo != fbo_id {
+ self.bound_draw_fbo = fbo_id;
+ fbo_id.bind(self.gl(), FBOTarget::Draw);
+ }
+ }
+
+ /// Link a program, attaching the supplied vertex format.
+ ///
+ /// If `create_program()` finds a binary shader on disk, it will kick
+ /// off linking immediately, which some drivers (notably ANGLE) run
+ /// in parallel on background threads. As such, this function should
+ /// ideally be run sometime later, to give the driver time to do that
+ /// before blocking due to an API call accessing the shader.
+ ///
+ /// This generally means that the first run of the application will have
+ /// to do a bunch of blocking work to compile the shader from source, but
+ /// subsequent runs should load quickly.
+ pub fn link_program(
+ &mut self,
+ program: &mut Program,
+ descriptor: &VertexDescriptor,
+ ) -> Result<(), ShaderError> {
+ assert!(!program.is_initialized());
+ let mut build_program = true;
+ let info = &program.source_info;
+
+ // See if we hit the binary shader cache
+ if let Some(ref cached_programs) = self.cached_programs {
+ // If the shader is not in the cache, attempt to load it from disk
+ if cached_programs.entries.borrow().get(&program.source_info.digest).is_none() {
+ if let Some(ref handler) = cached_programs.program_cache_handler {
+ handler.try_load_shader_from_disk(&program.source_info.digest, cached_programs);
+ if let Some(entry) = cached_programs.entries.borrow().get(&program.source_info.digest) {
+ self.gl.program_binary(program.id, entry.binary.format, &entry.binary.bytes);
+ }
+ }
+ }
+
+ if let Some(entry) = cached_programs.entries.borrow_mut().get_mut(&info.digest) {
+ let mut link_status = [0];
+ unsafe {
+ self.gl.get_program_iv(program.id, gl::LINK_STATUS, &mut link_status);
+ }
+ if link_status[0] == 0 {
+ let error_log = self.gl.get_program_info_log(program.id);
+ error!(
+ "Failed to load a program object with a program binary: {} renderer {}\n{}",
+ &info.base_filename,
+ self.capabilities.renderer_name,
+ error_log
+ );
+ if let Some(ref program_cache_handler) = cached_programs.program_cache_handler {
+ program_cache_handler.notify_program_binary_failed(&entry.binary);
+ }
+ } else {
+ entry.linked = true;
+ build_program = false;
+ }
+ }
+ }
+
+ // If not, we need to do a normal compile + link pass.
+ if build_program {
+ // Compile the vertex shader
+ let vs_source = info.compute_source(self, ShaderKind::Vertex);
+ let vs_id = match Device::compile_shader(&*self.gl, &info.base_filename, gl::VERTEX_SHADER, &vs_source, self.requires_null_terminated_shader_source) {
+ Ok(vs_id) => vs_id,
+ Err(err) => return Err(err),
+ };
+
+ // Compile the fragment shader
+ let fs_source = info.compute_source(self, ShaderKind::Fragment);
+ let fs_id =
+ match Device::compile_shader(&*self.gl, &info.base_filename, gl::FRAGMENT_SHADER, &fs_source, self.requires_null_terminated_shader_source) {
+ Ok(fs_id) => fs_id,
+ Err(err) => {
+ self.gl.delete_shader(vs_id);
+ return Err(err);
+ }
+ };
+
+ // Check if shader source should be dumped
+ if Some(info.base_filename) == self.dump_shader_source.as_ref().map(String::as_ref) {
+ let path = std::path::Path::new(info.base_filename);
+ std::fs::write(path.with_extension("vert"), vs_source).unwrap();
+ std::fs::write(path.with_extension("frag"), fs_source).unwrap();
+ }
+
+ // Attach shaders
+ self.gl.attach_shader(program.id, vs_id);
+ self.gl.attach_shader(program.id, fs_id);
+
+ // Bind vertex attributes
+ for (i, attr) in descriptor
+ .vertex_attributes
+ .iter()
+ .chain(descriptor.instance_attributes.iter())
+ .enumerate()
+ {
+ self.gl
+ .bind_attrib_location(program.id, i as gl::GLuint, attr.name);
+ }
+
+ if self.cached_programs.is_some() {
+ self.gl.program_parameter_i(program.id, gl::PROGRAM_BINARY_RETRIEVABLE_HINT, gl::TRUE as gl::GLint);
+ }
+
+ // Link!
+ self.gl.link_program(program.id);
+
+ if cfg!(debug_assertions) {
+ // Check that all our overrides worked
+ for (i, attr) in descriptor
+ .vertex_attributes
+ .iter()
+ .chain(descriptor.instance_attributes.iter())
+ .enumerate()
+ {
+ //Note: we can't assert here because the driver may optimize out some of the
+ // vertex attributes legitimately, returning their location to be -1.
+ let location = self.gl.get_attrib_location(program.id, attr.name);
+ if location != i as gl::GLint {
+ warn!("Attribute {:?} is not found in the shader {}. Expected at {}, found at {}",
+ attr, program.source_info.base_filename, i, location);
+ }
+ }
+ }
+
+ // GL recommends detaching and deleting shaders once the link
+ // is complete (whether successful or not). This allows the driver
+ // to free any memory associated with the parsing and compilation.
+ self.gl.detach_shader(program.id, vs_id);
+ self.gl.detach_shader(program.id, fs_id);
+ self.gl.delete_shader(vs_id);
+ self.gl.delete_shader(fs_id);
+
+ let mut link_status = [0];
+ unsafe {
+ self.gl.get_program_iv(program.id, gl::LINK_STATUS, &mut link_status);
+ }
+ if link_status[0] == 0 {
+ let error_log = self.gl.get_program_info_log(program.id);
+ error!(
+ "Failed to link shader program: {}\n{}",
+ &info.base_filename,
+ error_log
+ );
+ self.gl.delete_program(program.id);
+ return Err(ShaderError::Link(info.base_filename.to_owned(), error_log));
+ }
+
+ if let Some(ref cached_programs) = self.cached_programs {
+ if !cached_programs.entries.borrow().contains_key(&info.digest) {
+ let (buffer, format) = self.gl.get_program_binary(program.id);
+ if buffer.len() > 0 {
+ let binary = Arc::new(ProgramBinary::new(buffer, format, info.digest.clone()));
+ cached_programs.add_new_program_binary(binary);
+ }
+ }
+ }
+ }
+
+ // If we get here, the link succeeded, so get the uniforms.
+ program.is_initialized = true;
+ program.u_transform = self.gl.get_uniform_location(program.id, "uTransform");
+ program.u_mode = self.gl.get_uniform_location(program.id, "uMode");
+
+ Ok(())
+ }
+
+ pub fn bind_program(&mut self, program: &Program) {
+ debug_assert!(self.inside_frame);
+ debug_assert!(program.is_initialized());
+ #[cfg(debug_assertions)]
+ {
+ self.shader_is_ready = true;
+ }
+
+ if self.bound_program != program.id {
+ self.gl.use_program(program.id);
+ self.bound_program = program.id;
+ self.program_mode_id = UniformLocation(program.u_mode);
+ }
+ }
+
+ pub fn create_texture(
+ &mut self,
+ target: TextureTarget,
+ format: ImageFormat,
+ mut width: i32,
+ mut height: i32,
+ filter: TextureFilter,
+ render_target: Option<RenderTargetInfo>,
+ layer_count: i32,
+ ) -> Texture {
+ debug_assert!(self.inside_frame);
+
+ if width > self.max_texture_size || height > self.max_texture_size {
+ error!("Attempting to allocate a texture of size {}x{} above the limit, trimming", width, height);
+ width = width.min(self.max_texture_size);
+ height = height.min(self.max_texture_size);
+ }
+
+ // Set up the texture book-keeping.
+ let mut texture = Texture {
+ id: self.gl.gen_textures(1)[0],
+ target: get_gl_target(target),
+ size: DeviceIntSize::new(width, height),
+ layer_count,
+ format,
+ filter,
+ active_swizzle: Cell::default(),
+ fbos: vec![],
+ fbos_with_depth: vec![],
+ blit_workaround_buffer: None,
+ last_frame_used: self.frame_id,
+ flags: TextureFlags::default(),
+ };
+ self.bind_texture(DEFAULT_TEXTURE, &texture, Swizzle::default());
+ self.set_texture_parameters(texture.target, filter);
+
+ if self.capabilities.supports_texture_usage && render_target.is_some() {
+ self.gl.tex_parameter_i(texture.target, gl::TEXTURE_USAGE_ANGLE, gl::FRAMEBUFFER_ATTACHMENT_ANGLE as gl::GLint);
+ }
+
+ // Allocate storage.
+ let desc = self.gl_describe_format(texture.format);
+ let is_array = match texture.target {
+ gl::TEXTURE_2D_ARRAY => true,
+ gl::TEXTURE_2D | gl::TEXTURE_RECTANGLE | gl::TEXTURE_EXTERNAL_OES => false,
+ _ => panic!("BUG: Unexpected texture target!"),
+ };
+ assert!(is_array || texture.layer_count == 1);
+
+ // Firefox doesn't use mipmaps, but Servo uses them for standalone image
+ // textures images larger than 512 pixels. This is the only case where
+ // we set the filter to trilinear.
+ let mipmap_levels = if texture.filter == TextureFilter::Trilinear {
+ let max_dimension = cmp::max(width, height);
+ ((max_dimension) as f64).log2() as gl::GLint + 1
+ } else {
+ 1
+ };
+
+ // Use glTexStorage where available, since it avoids allocating
+ // unnecessary mipmap storage and generally improves performance with
+ // stronger invariants.
+ let use_texture_storage = match self.texture_storage_usage {
+ TexStorageUsage::Always => true,
+ TexStorageUsage::NonBGRA8 => texture.format != ImageFormat::BGRA8,
+ TexStorageUsage::Never => false,
+ };
+ match (use_texture_storage, is_array) {
+ (true, true) =>
+ self.gl.tex_storage_3d(
+ gl::TEXTURE_2D_ARRAY,
+ mipmap_levels,
+ desc.internal,
+ texture.size.width as gl::GLint,
+ texture.size.height as gl::GLint,
+ texture.layer_count,
+ ),
+ (true, false) =>
+ self.gl.tex_storage_2d(
+ texture.target,
+ mipmap_levels,
+ desc.internal,
+ texture.size.width as gl::GLint,
+ texture.size.height as gl::GLint,
+ ),
+ (false, true) =>
+ self.gl.tex_image_3d(
+ gl::TEXTURE_2D_ARRAY,
+ 0,
+ desc.internal as gl::GLint,
+ texture.size.width as gl::GLint,
+ texture.size.height as gl::GLint,
+ texture.layer_count,
+ 0,
+ desc.external,
+ desc.pixel_type,
+ None,
+ ),
+ (false, false) =>
+ self.gl.tex_image_2d(
+ texture.target,
+ 0,
+ desc.internal as gl::GLint,
+ texture.size.width as gl::GLint,
+ texture.size.height as gl::GLint,
+ 0,
+ desc.external,
+ desc.pixel_type,
+ None,
+ ),
+ }
+
+ // Set up FBOs, if required.
+ if let Some(rt_info) = render_target {
+ self.init_fbos(&mut texture, false);
+ if rt_info.has_depth {
+ self.init_fbos(&mut texture, true);
+ }
+ }
+
+ // Set up intermediate buffer for blitting to texture, if required.
+ if texture.layer_count > 1 && !self.capabilities.supports_blit_to_texture_array {
+ let rbo = RBOId(self.gl.gen_renderbuffers(1)[0]);
+ let fbo = FBOId(self.gl.gen_framebuffers(1)[0]);
+ self.gl.bind_renderbuffer(gl::RENDERBUFFER, rbo.0);
+ self.gl.renderbuffer_storage(
+ gl::RENDERBUFFER,
+ self.matching_renderbuffer_format(texture.format),
+ texture.size.width as _,
+ texture.size.height as _
+ );
+
+ self.bind_draw_target_impl(fbo);
+ self.gl.framebuffer_renderbuffer(
+ gl::DRAW_FRAMEBUFFER,
+ gl::COLOR_ATTACHMENT0,
+ gl::RENDERBUFFER,
+ rbo.0
+ );
+ texture.blit_workaround_buffer = Some((rbo, fbo));
+ }
+
+ texture
+ }
+
+ fn set_texture_parameters(&mut self, target: gl::GLuint, filter: TextureFilter) {
+ let mag_filter = match filter {
+ TextureFilter::Nearest => gl::NEAREST,
+ TextureFilter::Linear | TextureFilter::Trilinear => gl::LINEAR,
+ };
+
+ let min_filter = match filter {
+ TextureFilter::Nearest => gl::NEAREST,
+ TextureFilter::Linear => gl::LINEAR,
+ TextureFilter::Trilinear => gl::LINEAR_MIPMAP_LINEAR,
+ };
+
+ self.gl
+ .tex_parameter_i(target, gl::TEXTURE_MAG_FILTER, mag_filter as gl::GLint);
+ self.gl
+ .tex_parameter_i(target, gl::TEXTURE_MIN_FILTER, min_filter as gl::GLint);
+
+ self.gl
+ .tex_parameter_i(target, gl::TEXTURE_WRAP_S, gl::CLAMP_TO_EDGE as gl::GLint);
+ self.gl
+ .tex_parameter_i(target, gl::TEXTURE_WRAP_T, gl::CLAMP_TO_EDGE as gl::GLint);
+ }
+
+ /// Copies the contents from one renderable texture to another.
+ pub fn blit_renderable_texture(
+ &mut self,
+ dst: &mut Texture,
+ src: &Texture,
+ ) {
+ debug_assert!(self.inside_frame);
+ debug_assert!(dst.size.width >= src.size.width);
+ debug_assert!(dst.size.height >= src.size.height);
+ debug_assert!(dst.layer_count >= src.layer_count);
+
+ if self.capabilities.supports_copy_image_sub_data {
+ assert_ne!(src.id, dst.id,
+ "glCopyImageSubData's behaviour is undefined if src and dst images are identical and the rectangles overlap.");
+ unsafe {
+ self.gl.copy_image_sub_data(src.id, src.target, 0,
+ 0, 0, 0,
+ dst.id, dst.target, 0,
+ 0, 0, 0,
+ src.size.width as _, src.size.height as _, src.layer_count);
+ }
+ } else {
+ let rect = FramebufferIntRect::new(
+ FramebufferIntPoint::zero(),
+ device_size_as_framebuffer_size(src.get_dimensions()),
+ );
+ for layer in 0..src.layer_count.min(dst.layer_count) as LayerIndex {
+ self.blit_render_target(
+ ReadTarget::from_texture(src, layer),
+ rect,
+ DrawTarget::from_texture(dst, layer, false),
+ rect,
+ TextureFilter::Linear
+ );
+ }
+ self.reset_draw_target();
+ self.reset_read_target();
+ }
+ }
+
+ /// Notifies the device that the contents of a render target are no longer
+ /// needed.
+ ///
+ /// FIXME(bholley): We could/should invalidate the depth targets earlier
+ /// than the color targets, i.e. immediately after each pass.
+ pub fn invalidate_render_target(&mut self, texture: &Texture) {
+ let (fbos, attachments) = if texture.supports_depth() {
+ (&texture.fbos_with_depth,
+ &[gl::COLOR_ATTACHMENT0, gl::DEPTH_ATTACHMENT] as &[gl::GLenum])
+ } else {
+ (&texture.fbos, &[gl::COLOR_ATTACHMENT0] as &[gl::GLenum])
+ };
+
+ let original_bound_fbo = self.bound_draw_fbo;
+ for fbo_id in fbos.iter() {
+ // Note: The invalidate extension may not be supported, in which
+ // case this is a no-op. That's ok though, because it's just a
+ // hint.
+ self.bind_external_draw_target(*fbo_id);
+ self.gl.invalidate_framebuffer(gl::FRAMEBUFFER, attachments);
+ }
+ self.bind_external_draw_target(original_bound_fbo);
+ }
+
+ /// Notifies the device that a render target is about to be reused.
+ ///
+ /// This method adds or removes a depth target as necessary.
+ pub fn reuse_render_target<T: Texel>(
+ &mut self,
+ texture: &mut Texture,
+ rt_info: RenderTargetInfo,
+ ) {
+ texture.last_frame_used = self.frame_id;
+
+ // Add depth support if needed.
+ if rt_info.has_depth && !texture.supports_depth() {
+ self.init_fbos(texture, true);
+ }
+ }
+
+ fn init_fbos(&mut self, texture: &mut Texture, with_depth: bool) {
+ let (fbos, depth_rb) = if with_depth {
+ let depth_target = self.acquire_depth_target(texture.get_dimensions());
+ (&mut texture.fbos_with_depth, Some(depth_target))
+ } else {
+ (&mut texture.fbos, None)
+ };
+
+ // Generate the FBOs.
+ assert!(fbos.is_empty());
+ fbos.extend(self.gl.gen_framebuffers(texture.layer_count).into_iter().map(FBOId));
+
+ // Bind the FBOs.
+ let original_bound_fbo = self.bound_draw_fbo;
+ for (fbo_index, &fbo_id) in fbos.iter().enumerate() {
+ self.bind_external_draw_target(fbo_id);
+ match texture.target {
+ gl::TEXTURE_2D_ARRAY => {
+ self.gl.framebuffer_texture_layer(
+ gl::DRAW_FRAMEBUFFER,
+ gl::COLOR_ATTACHMENT0,
+ texture.id,
+ 0,
+ fbo_index as _,
+ )
+ }
+ _ => {
+ assert_eq!(fbo_index, 0);
+ self.gl.framebuffer_texture_2d(
+ gl::DRAW_FRAMEBUFFER,
+ gl::COLOR_ATTACHMENT0,
+ texture.target,
+ texture.id,
+ 0,
+ )
+ }
+ }
+
+ if let Some(depth_rb) = depth_rb {
+ self.gl.framebuffer_renderbuffer(
+ gl::DRAW_FRAMEBUFFER,
+ gl::DEPTH_ATTACHMENT,
+ gl::RENDERBUFFER,
+ depth_rb.0,
+ );
+ }
+
+ debug_assert_eq!(
+ self.gl.check_frame_buffer_status(gl::DRAW_FRAMEBUFFER),
+ gl::FRAMEBUFFER_COMPLETE,
+ "Incomplete framebuffer",
+ );
+ }
+ self.bind_external_draw_target(original_bound_fbo);
+ }
+
+ fn deinit_fbos(&mut self, fbos: &mut Vec<FBOId>) {
+ if !fbos.is_empty() {
+ let fbo_ids: SmallVec<[gl::GLuint; 8]> = fbos
+ .drain(..)
+ .map(|FBOId(fbo_id)| fbo_id)
+ .collect();
+ self.gl.delete_framebuffers(&fbo_ids[..]);
+ }
+ }
+
+ fn acquire_depth_target(&mut self, dimensions: DeviceIntSize) -> RBOId {
+ let gl = &self.gl;
+ let depth_format = self.depth_format;
+ let target = self.depth_targets.entry(dimensions).or_insert_with(|| {
+ let renderbuffer_ids = gl.gen_renderbuffers(1);
+ let depth_rb = renderbuffer_ids[0];
+ gl.bind_renderbuffer(gl::RENDERBUFFER, depth_rb);
+ gl.renderbuffer_storage(
+ gl::RENDERBUFFER,
+ depth_format,
+ dimensions.width as _,
+ dimensions.height as _,
+ );
+ SharedDepthTarget {
+ rbo_id: RBOId(depth_rb),
+ refcount: 0,
+ }
+ });
+ target.refcount += 1;
+ target.rbo_id
+ }
+
+ fn release_depth_target(&mut self, dimensions: DeviceIntSize) {
+ let mut entry = match self.depth_targets.entry(dimensions) {
+ Entry::Occupied(x) => x,
+ Entry::Vacant(..) => panic!("Releasing unknown depth target"),
+ };
+ debug_assert!(entry.get().refcount != 0);
+ entry.get_mut().refcount -= 1;
+ if entry.get().refcount == 0 {
+ let (_, target) = entry.remove_entry();
+ self.gl.delete_renderbuffers(&[target.rbo_id.0]);
+ }
+ }
+
+ /// Perform a blit between self.bound_read_fbo and self.bound_draw_fbo.
+ fn blit_render_target_impl(
+ &mut self,
+ src_rect: FramebufferIntRect,
+ dest_rect: FramebufferIntRect,
+ filter: TextureFilter,
+ ) {
+ debug_assert!(self.inside_frame);
+
+ let filter = match filter {
+ TextureFilter::Nearest => gl::NEAREST,
+ TextureFilter::Linear | TextureFilter::Trilinear => gl::LINEAR,
+ };
+
+ self.gl.blit_framebuffer(
+ src_rect.origin.x,
+ src_rect.origin.y,
+ src_rect.origin.x + src_rect.size.width,
+ src_rect.origin.y + src_rect.size.height,
+ dest_rect.origin.x,
+ dest_rect.origin.y,
+ dest_rect.origin.x + dest_rect.size.width,
+ dest_rect.origin.y + dest_rect.size.height,
+ gl::COLOR_BUFFER_BIT,
+ filter,
+ );
+ }
+
+ /// Perform a blit between src_target and dest_target.
+ /// This will overwrite self.bound_read_fbo and self.bound_draw_fbo.
+ pub fn blit_render_target(
+ &mut self,
+ src_target: ReadTarget,
+ src_rect: FramebufferIntRect,
+ dest_target: DrawTarget,
+ dest_rect: FramebufferIntRect,
+ filter: TextureFilter,
+ ) {
+ debug_assert!(self.inside_frame);
+
+ self.bind_read_target(src_target);
+
+ match dest_target {
+ DrawTarget::Texture { layer, blit_workaround_buffer, dimensions, id, target, .. } if layer != 0 &&
+ !self.capabilities.supports_blit_to_texture_array =>
+ {
+ // This should have been initialized in create_texture().
+ let (_rbo, fbo) = blit_workaround_buffer.expect("Blit workaround buffer has not been initialized.");
+
+ // Blit from read target to intermediate buffer.
+ self.bind_draw_target_impl(fbo);
+ self.blit_render_target_impl(
+ src_rect,
+ dest_rect,
+ filter
+ );
+
+ // dest_rect may be inverted, so min_x/y() might actually be the
+ // bottom-right, max_x/y() might actually be the top-left,
+ // and width/height might be negative. See servo/euclid#321.
+ // Calculate the non-inverted rect here.
+ let dest_bounds = DeviceIntRect::new(
+ DeviceIntPoint::new(
+ dest_rect.min_x().min(dest_rect.max_x()),
+ dest_rect.min_y().min(dest_rect.max_y()),
+ ),
+ DeviceIntSize::new(
+ dest_rect.size.width.abs(),
+ dest_rect.size.height.abs(),
+ ),
+ ).intersection(&dimensions.into()).unwrap_or_else(DeviceIntRect::zero);
+
+ self.bind_read_target_impl(fbo);
+ self.bind_texture_impl(
+ DEFAULT_TEXTURE,
+ id,
+ target,
+ None, // not depending on swizzle
+ );
+
+ // Copy from intermediate buffer to the texture layer.
+ self.gl.copy_tex_sub_image_3d(
+ target, 0,
+ dest_bounds.origin.x, dest_bounds.origin.y,
+ layer as _,
+ dest_bounds.origin.x, dest_bounds.origin.y,
+ dest_bounds.size.width, dest_bounds.size.height,
+ );
+
+ }
+ _ => {
+ self.bind_draw_target(dest_target);
+
+ self.blit_render_target_impl(src_rect, dest_rect, filter);
+ }
+ }
+ }
+
+ /// Performs a blit while flipping vertically. Useful for blitting textures
+ /// (which use origin-bottom-left) to the main framebuffer (which uses
+ /// origin-top-left).
+ pub fn blit_render_target_invert_y(
+ &mut self,
+ src_target: ReadTarget,
+ src_rect: FramebufferIntRect,
+ dest_target: DrawTarget,
+ dest_rect: FramebufferIntRect,
+ ) {
+ debug_assert!(self.inside_frame);
+
+ let mut inverted_dest_rect = dest_rect;
+ inverted_dest_rect.origin.y = dest_rect.max_y();
+ inverted_dest_rect.size.height *= -1;
+
+ self.blit_render_target(
+ src_target,
+ src_rect,
+ dest_target,
+ inverted_dest_rect,
+ TextureFilter::Linear,
+ );
+ }
+
+ pub fn delete_texture(&mut self, mut texture: Texture) {
+ debug_assert!(self.inside_frame);
+ let had_depth = texture.supports_depth();
+ self.deinit_fbos(&mut texture.fbos);
+ self.deinit_fbos(&mut texture.fbos_with_depth);
+ if had_depth {
+ self.release_depth_target(texture.get_dimensions());
+ }
+ if let Some((rbo, fbo)) = texture.blit_workaround_buffer {
+ self.gl.delete_framebuffers(&[fbo.0]);
+ self.gl.delete_renderbuffers(&[rbo.0]);
+ }
+
+ self.gl.delete_textures(&[texture.id]);
+
+ for bound_texture in &mut self.bound_textures {
+ if *bound_texture == texture.id {
+ *bound_texture = 0;
+ }
+ }
+
+ // Disarm the assert in Texture::drop().
+ texture.id = 0;
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn delete_external_texture(&mut self, mut external: ExternalTexture) {
+ self.gl.delete_textures(&[external.id]);
+ external.id = 0;
+ }
+
+ pub fn delete_program(&mut self, mut program: Program) {
+ self.gl.delete_program(program.id);
+ program.id = 0;
+ }
+
+ /// Create a shader program and link it immediately.
+ pub fn create_program_linked(
+ &mut self,
+ base_filename: &'static str,
+ features: &[&'static str],
+ descriptor: &VertexDescriptor,
+ ) -> Result<Program, ShaderError> {
+ let mut program = self.create_program(base_filename, features)?;
+ self.link_program(&mut program, descriptor)?;
+ Ok(program)
+ }
+
+ /// Create a shader program. This does minimal amount of work to start
+ /// loading a binary shader. If a binary shader is found, we invoke
+ /// glProgramBinary, which, at least on ANGLE, will load and link the
+ /// binary on a background thread. This can speed things up later when
+ /// we invoke `link_program()`.
+ pub fn create_program(
+ &mut self,
+ base_filename: &'static str,
+ features: &[&'static str],
+ ) -> Result<Program, ShaderError> {
+ debug_assert!(self.inside_frame);
+
+ let source_info = ProgramSourceInfo::new(self, base_filename, features);
+
+ // Create program
+ let pid = self.gl.create_program();
+
+ // Attempt to load a cached binary if possible.
+ if let Some(ref cached_programs) = self.cached_programs {
+ if let Some(entry) = cached_programs.entries.borrow().get(&source_info.digest) {
+ self.gl.program_binary(pid, entry.binary.format, &entry.binary.bytes);
+ }
+ }
+
+ // Use 0 for the uniforms as they are initialized by link_program.
+ let program = Program {
+ id: pid,
+ u_transform: 0,
+ u_mode: 0,
+ source_info,
+ is_initialized: false,
+ };
+
+ Ok(program)
+ }
+
+ fn build_shader_string<F: FnMut(&str)>(
+ &self,
+ features: &[&'static str],
+ kind: ShaderKind,
+ base_filename: &str,
+ output: F,
+ ) {
+ do_build_shader_string(
+ get_shader_version(&*self.gl),
+ features,
+ kind,
+ base_filename,
+ &|f| get_unoptimized_shader_source(f, self.resource_override_path.as_ref()),
+ output,
+ )
+ }
+
+ pub fn bind_shader_samplers<S>(&mut self, program: &Program, bindings: &[(&'static str, S)])
+ where
+ S: Into<TextureSlot> + Copy,
+ {
+ // bind_program() must be called before calling bind_shader_samplers
+ assert_eq!(self.bound_program, program.id);
+
+ for binding in bindings {
+ let u_location = self.gl.get_uniform_location(program.id, binding.0);
+ if u_location != -1 {
+ self.bind_program(program);
+ self.gl
+ .uniform_1i(u_location, binding.1.into().0 as gl::GLint);
+ }
+ }
+ }
+
+ pub fn get_uniform_location(&self, program: &Program, name: &str) -> UniformLocation {
+ UniformLocation(self.gl.get_uniform_location(program.id, name))
+ }
+
+ pub fn set_uniforms(
+ &self,
+ program: &Program,
+ transform: &Transform3D<f32>,
+ ) {
+ debug_assert!(self.inside_frame);
+ #[cfg(debug_assertions)]
+ debug_assert!(self.shader_is_ready);
+
+ self.gl
+ .uniform_matrix_4fv(program.u_transform, false, &transform.to_array());
+ }
+
+ pub fn switch_mode(&self, mode: i32) {
+ debug_assert!(self.inside_frame);
+ #[cfg(debug_assertions)]
+ debug_assert!(self.shader_is_ready);
+
+ self.gl.uniform_1i(self.program_mode_id.0, mode);
+ }
+
+ pub fn create_pbo(&mut self) -> PBO {
+ let id = self.gl.gen_buffers(1)[0];
+ PBO {
+ id,
+ reserved_size: 0,
+ }
+ }
+
+ pub fn create_pbo_with_size(&mut self, size: usize) -> PBO {
+ let mut pbo = self.create_pbo();
+
+ self.gl.bind_buffer(gl::PIXEL_PACK_BUFFER, pbo.id);
+ self.gl.pixel_store_i(gl::PACK_ALIGNMENT, 1);
+ self.gl.buffer_data_untyped(
+ gl::PIXEL_PACK_BUFFER,
+ size as _,
+ ptr::null(),
+ gl::STREAM_READ,
+ );
+ self.gl.bind_buffer(gl::PIXEL_UNPACK_BUFFER, 0);
+
+ pbo.reserved_size = size;
+ pbo
+ }
+
+ pub fn read_pixels_into_pbo(
+ &mut self,
+ read_target: ReadTarget,
+ rect: DeviceIntRect,
+ format: ImageFormat,
+ pbo: &PBO,
+ ) {
+ let byte_size = rect.size.area() as usize * format.bytes_per_pixel() as usize;
+
+ assert!(byte_size <= pbo.reserved_size);
+
+ self.bind_read_target(read_target);
+
+ self.gl.bind_buffer(gl::PIXEL_PACK_BUFFER, pbo.id);
+ self.gl.pixel_store_i(gl::PACK_ALIGNMENT, 1);
+
+ let gl_format = self.gl_describe_format(format);
+
+ unsafe {
+ self.gl.read_pixels_into_pbo(
+ rect.origin.x as _,
+ rect.origin.y as _,
+ rect.size.width as _,
+ rect.size.height as _,
+ gl_format.read,
+ gl_format.pixel_type,
+ );
+ }
+
+ self.gl.bind_buffer(gl::PIXEL_PACK_BUFFER, 0);
+ }
+
+ pub fn map_pbo_for_readback<'a>(&'a mut self, pbo: &'a PBO) -> Option<BoundPBO<'a>> {
+ self.gl.bind_buffer(gl::PIXEL_PACK_BUFFER, pbo.id);
+
+ let buf_ptr = match self.gl.get_type() {
+ gl::GlType::Gl => {
+ self.gl.map_buffer(gl::PIXEL_PACK_BUFFER, gl::READ_ONLY)
+ }
+
+ gl::GlType::Gles => {
+ self.gl.map_buffer_range(
+ gl::PIXEL_PACK_BUFFER,
+ 0,
+ pbo.reserved_size as _,
+ gl::MAP_READ_BIT)
+ }
+ };
+
+ if buf_ptr.is_null() {
+ return None;
+ }
+
+ let buffer = unsafe { slice::from_raw_parts(buf_ptr as *const u8, pbo.reserved_size) };
+
+ Some(BoundPBO {
+ device: self,
+ data: buffer,
+ })
+ }
+
+ pub fn delete_pbo(&mut self, mut pbo: PBO) {
+ self.gl.delete_buffers(&[pbo.id]);
+ pbo.id = 0;
+ pbo.reserved_size = 0
+ }
+
+ /// Returns the size and stride in bytes required to upload an area of pixels
+ /// of the specified size, to a texture of the specified format.
+ pub fn required_upload_size_and_stride(&self, size: DeviceIntSize, format: ImageFormat) -> (usize, usize) {
+ assert!(size.width >= 0);
+ assert!(size.height >= 0);
+
+ let bytes_pp = format.bytes_per_pixel() as usize;
+ let width_bytes = size.width as usize * bytes_pp;
+
+ let dst_stride = round_up_to_multiple(width_bytes, self.optimal_pbo_stride.num_bytes(format));
+
+ // The size of the chunk should only need to be (height - 1) * dst_stride + width_bytes,
+ // however, the android emulator will error unless it is height * dst_stride.
+ // See bug 1587047 for details.
+ // Using the full final row also ensures that the offset of the next chunk is
+ // optimally aligned.
+ let dst_size = dst_stride * size.height as usize;
+
+ (dst_size, dst_stride)
+ }
+
+ /// (Re)allocates and maps a PBO, returning a `PixelBuffer` if successful.
+ /// The contents can be written to using the `mapping` field.
+ /// The buffer must be bound to `GL_PIXEL_UNPACK_BUFFER` before calling this function,
+ /// and must be unmapped using `glUnmapBuffer` prior to uploading the contents to a texture.
+ fn create_upload_buffer<'a>(&mut self, hint: VertexUsageHint, size: usize) -> Result<PixelBuffer<'a>, ()> {
+ self.gl.buffer_data_untyped(
+ gl::PIXEL_UNPACK_BUFFER,
+ size as _,
+ ptr::null(),
+ hint.to_gl(),
+ );
+ let ptr = self.gl.map_buffer_range(
+ gl::PIXEL_UNPACK_BUFFER,
+ 0,
+ size as _,
+ gl::MAP_WRITE_BIT | gl::MAP_INVALIDATE_BUFFER_BIT,
+ );
+
+ if ptr != ptr::null_mut() {
+ let mapping = unsafe {
+ slice::from_raw_parts_mut(ptr as *mut _, size)
+ };
+ Ok(PixelBuffer::new(size, mapping))
+ } else {
+ error!("Failed to map PBO of size {} bytes", size);
+ Err(())
+ }
+ }
+
+ /// Returns a `TextureUploader` which can be used to upload texture data to `texture`.
+ /// The total size in bytes is specified by `upload_size`, and must be greater than zero
+ /// and at least as large as the sum of the sizes returned from
+ /// `required_upload_size_and_stride()` for each subsequent call to `TextureUploader.upload()`.
+ pub fn upload_texture<'a, T>(
+ &'a mut self,
+ texture: &'a Texture,
+ pbo: &PBO,
+ upload_size: usize,
+ ) -> TextureUploader<'a, T> {
+ debug_assert!(self.inside_frame);
+ assert_ne!(upload_size, 0, "Must specify valid upload size");
+
+ self.bind_texture(DEFAULT_TEXTURE, texture, Swizzle::default());
+
+ let uploader_type = match self.upload_method {
+ UploadMethod::Immediate => TextureUploaderType::Immediate,
+ UploadMethod::PixelBuffer(hint) => {
+ self.gl.bind_buffer(gl::PIXEL_UNPACK_BUFFER, pbo.id);
+ if self.capabilities.supports_nonzero_pbo_offsets {
+ match self.create_upload_buffer(hint, upload_size) {
+ Ok(buffer) => TextureUploaderType::MutliUseBuffer(buffer),
+ Err(_) => {
+ // If allocating the buffer failed, fall back to immediate uploads
+ self.gl.bind_buffer(gl::PIXEL_UNPACK_BUFFER, 0);
+ TextureUploaderType::Immediate
+ }
+ }
+ } else {
+ // If we cannot upload from non-zero offsets, then we must
+ // reallocate a new buffer for each upload.
+ TextureUploaderType::SingleUseBuffers(hint)
+ }
+ },
+ };
+
+ TextureUploader {
+ target: UploadTarget {
+ device: self,
+ texture,
+ },
+ uploader_type,
+ marker: PhantomData,
+ }
+ }
+
+ /// Performs an immediate (non-PBO) texture upload.
+ pub fn upload_texture_immediate<T: Texel>(
+ &mut self,
+ texture: &Texture,
+ pixels: &[T]
+ ) {
+ self.bind_texture(DEFAULT_TEXTURE, texture, Swizzle::default());
+ let desc = self.gl_describe_format(texture.format);
+ match texture.target {
+ gl::TEXTURE_2D | gl::TEXTURE_RECTANGLE | gl::TEXTURE_EXTERNAL_OES =>
+ self.gl.tex_sub_image_2d(
+ texture.target,
+ 0,
+ 0,
+ 0,
+ texture.size.width as gl::GLint,
+ texture.size.height as gl::GLint,
+ desc.external,
+ desc.pixel_type,
+ texels_to_u8_slice(pixels),
+ ),
+ gl::TEXTURE_2D_ARRAY =>
+ self.gl.tex_sub_image_3d(
+ texture.target,
+ 0,
+ 0,
+ 0,
+ 0,
+ texture.size.width as gl::GLint,
+ texture.size.height as gl::GLint,
+ texture.layer_count as gl::GLint,
+ desc.external,
+ desc.pixel_type,
+ texels_to_u8_slice(pixels),
+ ),
+ _ => panic!("BUG: Unexpected texture target!"),
+ }
+ }
+
+ pub fn read_pixels(&mut self, img_desc: &ImageDescriptor) -> Vec<u8> {
+ let desc = self.gl_describe_format(img_desc.format);
+ self.gl.read_pixels(
+ 0, 0,
+ img_desc.size.width as i32,
+ img_desc.size.height as i32,
+ desc.read,
+ desc.pixel_type,
+ )
+ }
+
+ /// Read rectangle of pixels into the specified output slice.
+ pub fn read_pixels_into(
+ &mut self,
+ rect: FramebufferIntRect,
+ format: ImageFormat,
+ output: &mut [u8],
+ ) {
+ let bytes_per_pixel = format.bytes_per_pixel();
+ let desc = self.gl_describe_format(format);
+ let size_in_bytes = (bytes_per_pixel * rect.size.width * rect.size.height) as usize;
+ assert_eq!(output.len(), size_in_bytes);
+
+ self.gl.flush();
+ self.gl.read_pixels_into_buffer(
+ rect.origin.x as _,
+ rect.origin.y as _,
+ rect.size.width as _,
+ rect.size.height as _,
+ desc.read,
+ desc.pixel_type,
+ output,
+ );
+ }
+
+ /// Get texels of a texture into the specified output slice.
+ pub fn get_tex_image_into(
+ &mut self,
+ texture: &Texture,
+ format: ImageFormat,
+ output: &mut [u8],
+ ) {
+ self.bind_texture(DEFAULT_TEXTURE, texture, Swizzle::default());
+ let desc = self.gl_describe_format(format);
+ self.gl.get_tex_image_into_buffer(
+ texture.target,
+ 0,
+ desc.external,
+ desc.pixel_type,
+ output,
+ );
+ }
+
+ /// Attaches the provided texture to the current Read FBO binding.
+ fn attach_read_texture_raw(
+ &mut self, texture_id: gl::GLuint, target: gl::GLuint, layer_id: i32
+ ) {
+ match target {
+ gl::TEXTURE_2D_ARRAY => {
+ self.gl.framebuffer_texture_layer(
+ gl::READ_FRAMEBUFFER,
+ gl::COLOR_ATTACHMENT0,
+ texture_id,
+ 0,
+ layer_id,
+ )
+ }
+ _ => {
+ assert_eq!(layer_id, 0);
+ self.gl.framebuffer_texture_2d(
+ gl::READ_FRAMEBUFFER,
+ gl::COLOR_ATTACHMENT0,
+ target,
+ texture_id,
+ 0,
+ )
+ }
+ }
+ }
+
+ pub fn attach_read_texture_external(
+ &mut self, texture_id: gl::GLuint, target: TextureTarget, layer_id: i32
+ ) {
+ self.attach_read_texture_raw(texture_id, get_gl_target(target), layer_id)
+ }
+
+ pub fn attach_read_texture(&mut self, texture: &Texture, layer_id: i32) {
+ self.attach_read_texture_raw(texture.id, texture.target, layer_id)
+ }
+
+ fn bind_vao_impl(&mut self, id: gl::GLuint) {
+ debug_assert!(self.inside_frame);
+
+ if self.bound_vao != id {
+ self.bound_vao = id;
+ self.gl.bind_vertex_array(id);
+ }
+ }
+
+ pub fn bind_vao(&mut self, vao: &VAO) {
+ self.bind_vao_impl(vao.id)
+ }
+
+ pub fn bind_custom_vao(&mut self, vao: &CustomVAO) {
+ self.bind_vao_impl(vao.id)
+ }
+
+ fn create_vao_with_vbos(
+ &mut self,
+ descriptor: &VertexDescriptor,
+ main_vbo_id: VBOId,
+ instance_vbo_id: VBOId,
+ ibo_id: IBOId,
+ owns_vertices_and_indices: bool,
+ ) -> VAO {
+ let instance_stride = descriptor.instance_stride() as usize;
+ let vao_id = self.gl.gen_vertex_arrays(1)[0];
+
+ self.bind_vao_impl(vao_id);
+
+ descriptor.bind(self.gl(), main_vbo_id, instance_vbo_id);
+ ibo_id.bind(self.gl()); // force it to be a part of VAO
+
+ VAO {
+ id: vao_id,
+ ibo_id,
+ main_vbo_id,
+ instance_vbo_id,
+ instance_stride,
+ owns_vertices_and_indices,
+ }
+ }
+
+ pub fn create_custom_vao(
+ &mut self,
+ streams: &[Stream],
+ ) -> CustomVAO {
+ debug_assert!(self.inside_frame);
+
+ let vao_id = self.gl.gen_vertex_arrays(1)[0];
+ self.bind_vao_impl(vao_id);
+
+ let mut attrib_index = 0;
+ for stream in streams {
+ VertexDescriptor::bind_attributes(
+ stream.attributes,
+ attrib_index,
+ 0,
+ self.gl(),
+ stream.vbo,
+ );
+ attrib_index += stream.attributes.len();
+ }
+
+ CustomVAO {
+ id: vao_id,
+ }
+ }
+
+ pub fn delete_custom_vao(&mut self, mut vao: CustomVAO) {
+ self.gl.delete_vertex_arrays(&[vao.id]);
+ vao.id = 0;
+ }
+
+ pub fn create_vbo<T>(&mut self) -> VBO<T> {
+ let ids = self.gl.gen_buffers(1);
+ VBO {
+ id: ids[0],
+ target: gl::ARRAY_BUFFER,
+ allocated_count: 0,
+ marker: PhantomData,
+ }
+ }
+
+ pub fn delete_vbo<T>(&mut self, mut vbo: VBO<T>) {
+ self.gl.delete_buffers(&[vbo.id]);
+ vbo.id = 0;
+ }
+
+ pub fn create_vao(&mut self, descriptor: &VertexDescriptor) -> VAO {
+ debug_assert!(self.inside_frame);
+
+ let buffer_ids = self.gl.gen_buffers(3);
+ let ibo_id = IBOId(buffer_ids[0]);
+ let main_vbo_id = VBOId(buffer_ids[1]);
+ let intance_vbo_id = VBOId(buffer_ids[2]);
+
+ self.create_vao_with_vbos(descriptor, main_vbo_id, intance_vbo_id, ibo_id, true)
+ }
+
+ pub fn delete_vao(&mut self, mut vao: VAO) {
+ self.gl.delete_vertex_arrays(&[vao.id]);
+ vao.id = 0;
+
+ if vao.owns_vertices_and_indices {
+ self.gl.delete_buffers(&[vao.ibo_id.0]);
+ self.gl.delete_buffers(&[vao.main_vbo_id.0]);
+ }
+
+ self.gl.delete_buffers(&[vao.instance_vbo_id.0])
+ }
+
+ pub fn allocate_vbo<V>(
+ &mut self,
+ vbo: &mut VBO<V>,
+ count: usize,
+ usage_hint: VertexUsageHint,
+ ) {
+ debug_assert!(self.inside_frame);
+ vbo.allocated_count = count;
+
+ self.gl.bind_buffer(vbo.target, vbo.id);
+ self.gl.buffer_data_untyped(
+ vbo.target,
+ (count * mem::size_of::<V>()) as _,
+ ptr::null(),
+ usage_hint.to_gl(),
+ );
+ }
+
+ pub fn fill_vbo<V>(
+ &mut self,
+ vbo: &VBO<V>,
+ data: &[V],
+ offset: usize,
+ ) {
+ debug_assert!(self.inside_frame);
+ assert!(offset + data.len() <= vbo.allocated_count);
+ let stride = mem::size_of::<V>();
+
+ self.gl.bind_buffer(vbo.target, vbo.id);
+ self.gl.buffer_sub_data_untyped(
+ vbo.target,
+ (offset * stride) as _,
+ (data.len() * stride) as _,
+ data.as_ptr() as _,
+ );
+ }
+
+ fn update_vbo_data<V>(
+ &mut self,
+ vbo: VBOId,
+ vertices: &[V],
+ usage_hint: VertexUsageHint,
+ ) {
+ debug_assert!(self.inside_frame);
+
+ vbo.bind(self.gl());
+ gl::buffer_data(self.gl(), gl::ARRAY_BUFFER, vertices, usage_hint.to_gl());
+ }
+
+ pub fn create_vao_with_new_instances(
+ &mut self,
+ descriptor: &VertexDescriptor,
+ base_vao: &VAO,
+ ) -> VAO {
+ debug_assert!(self.inside_frame);
+
+ let buffer_ids = self.gl.gen_buffers(1);
+ let intance_vbo_id = VBOId(buffer_ids[0]);
+
+ self.create_vao_with_vbos(
+ descriptor,
+ base_vao.main_vbo_id,
+ intance_vbo_id,
+ base_vao.ibo_id,
+ false,
+ )
+ }
+
+ pub fn update_vao_main_vertices<V>(
+ &mut self,
+ vao: &VAO,
+ vertices: &[V],
+ usage_hint: VertexUsageHint,
+ ) {
+ debug_assert_eq!(self.bound_vao, vao.id);
+ self.update_vbo_data(vao.main_vbo_id, vertices, usage_hint)
+ }
+
+ pub fn update_vao_instances<V>(
+ &mut self,
+ vao: &VAO,
+ instances: &[V],
+ usage_hint: VertexUsageHint,
+ ) {
+ debug_assert_eq!(self.bound_vao, vao.id);
+ debug_assert_eq!(vao.instance_stride as usize, mem::size_of::<V>());
+
+ self.update_vbo_data(vao.instance_vbo_id, instances, usage_hint)
+ }
+
+ pub fn update_vao_indices<I>(&mut self, vao: &VAO, indices: &[I], usage_hint: VertexUsageHint) {
+ debug_assert!(self.inside_frame);
+ debug_assert_eq!(self.bound_vao, vao.id);
+
+ vao.ibo_id.bind(self.gl());
+ gl::buffer_data(
+ self.gl(),
+ gl::ELEMENT_ARRAY_BUFFER,
+ indices,
+ usage_hint.to_gl(),
+ );
+ }
+
+ pub fn draw_triangles_u16(&mut self, first_vertex: i32, index_count: i32) {
+ debug_assert!(self.inside_frame);
+ #[cfg(debug_assertions)]
+ debug_assert!(self.shader_is_ready);
+
+ self.gl.draw_elements(
+ gl::TRIANGLES,
+ index_count,
+ gl::UNSIGNED_SHORT,
+ first_vertex as u32 * 2,
+ );
+ }
+
+ pub fn draw_triangles_u32(&mut self, first_vertex: i32, index_count: i32) {
+ debug_assert!(self.inside_frame);
+ #[cfg(debug_assertions)]
+ debug_assert!(self.shader_is_ready);
+
+ self.gl.draw_elements(
+ gl::TRIANGLES,
+ index_count,
+ gl::UNSIGNED_INT,
+ first_vertex as u32 * 4,
+ );
+ }
+
+ pub fn draw_nonindexed_points(&mut self, first_vertex: i32, vertex_count: i32) {
+ debug_assert!(self.inside_frame);
+ #[cfg(debug_assertions)]
+ debug_assert!(self.shader_is_ready);
+
+ self.gl.draw_arrays(gl::POINTS, first_vertex, vertex_count);
+ }
+
+ pub fn draw_nonindexed_lines(&mut self, first_vertex: i32, vertex_count: i32) {
+ debug_assert!(self.inside_frame);
+ #[cfg(debug_assertions)]
+ debug_assert!(self.shader_is_ready);
+
+ self.gl.draw_arrays(gl::LINES, first_vertex, vertex_count);
+ }
+
+ pub fn draw_indexed_triangles_instanced_u16(&mut self, index_count: i32, instance_count: i32) {
+ debug_assert!(self.inside_frame);
+ #[cfg(debug_assertions)]
+ debug_assert!(self.shader_is_ready);
+
+ self.gl.draw_elements_instanced(
+ gl::TRIANGLES,
+ index_count,
+ gl::UNSIGNED_SHORT,
+ 0,
+ instance_count,
+ );
+ }
+
+ pub fn end_frame(&mut self) {
+ self.reset_draw_target();
+ self.reset_read_target();
+
+ debug_assert!(self.inside_frame);
+ self.inside_frame = false;
+
+ self.gl.bind_texture(gl::TEXTURE_2D, 0);
+ self.gl.use_program(0);
+
+ for i in 0 .. self.bound_textures.len() {
+ self.gl.active_texture(gl::TEXTURE0 + i as gl::GLuint);
+ self.gl.bind_texture(gl::TEXTURE_2D, 0);
+ }
+
+ self.gl.active_texture(gl::TEXTURE0);
+
+ self.frame_id.0 += 1;
+
+ // Save any shaders compiled this frame to disk.
+ // If this is the tenth frame then treat startup as complete, meaning the
+ // current set of in-use shaders are the ones to load on the next startup.
+ if let Some(ref cache) = self.cached_programs {
+ cache.update_disk_cache(self.frame_id.0 == 10);
+ }
+ }
+
+ pub fn clear_target(
+ &self,
+ color: Option<[f32; 4]>,
+ depth: Option<f32>,
+ rect: Option<FramebufferIntRect>,
+ ) {
+ let mut clear_bits = 0;
+
+ if let Some(color) = color {
+ self.gl.clear_color(color[0], color[1], color[2], color[3]);
+ clear_bits |= gl::COLOR_BUFFER_BIT;
+ }
+
+ if let Some(depth) = depth {
+ if cfg!(debug_assertions) {
+ let mut mask = [0];
+ unsafe {
+ self.gl.get_boolean_v(gl::DEPTH_WRITEMASK, &mut mask);
+ }
+ assert_ne!(mask[0], 0);
+ }
+ self.gl.clear_depth(depth as f64);
+ clear_bits |= gl::DEPTH_BUFFER_BIT;
+ }
+
+ if clear_bits != 0 {
+ match rect {
+ Some(rect) => {
+ self.gl.enable(gl::SCISSOR_TEST);
+ self.gl.scissor(
+ rect.origin.x,
+ rect.origin.y,
+ rect.size.width,
+ rect.size.height,
+ );
+ self.gl.clear(clear_bits);
+ self.gl.disable(gl::SCISSOR_TEST);
+ }
+ None => {
+ self.gl.clear(clear_bits);
+ }
+ }
+ }
+ }
+
+ pub fn enable_depth(&self, depth_func: DepthFunction) {
+ assert!(self.depth_available, "Enabling depth test without depth target");
+ self.gl.enable(gl::DEPTH_TEST);
+ self.gl.depth_func(depth_func as gl::GLuint);
+ }
+
+ pub fn disable_depth(&self) {
+ self.gl.disable(gl::DEPTH_TEST);
+ }
+
+ pub fn enable_depth_write(&self) {
+ assert!(self.depth_available, "Enabling depth write without depth target");
+ self.gl.depth_mask(true);
+ }
+
+ pub fn disable_depth_write(&self) {
+ self.gl.depth_mask(false);
+ }
+
+ pub fn disable_stencil(&self) {
+ self.gl.disable(gl::STENCIL_TEST);
+ }
+
+ pub fn set_scissor_rect(&self, rect: FramebufferIntRect) {
+ self.gl.scissor(
+ rect.origin.x,
+ rect.origin.y,
+ rect.size.width,
+ rect.size.height,
+ );
+ }
+
+ pub fn enable_scissor(&self) {
+ self.gl.enable(gl::SCISSOR_TEST);
+ }
+
+ pub fn disable_scissor(&self) {
+ self.gl.disable(gl::SCISSOR_TEST);
+ }
+
+ pub fn enable_color_write(&self) {
+ self.gl.color_mask(true, true, true, true);
+ }
+
+ pub fn disable_color_write(&self) {
+ self.gl.color_mask(false, false, false, false);
+ }
+
+ pub fn set_blend(&mut self, enable: bool) {
+ if enable {
+ self.gl.enable(gl::BLEND);
+ } else {
+ self.gl.disable(gl::BLEND);
+ }
+ #[cfg(debug_assertions)]
+ {
+ self.shader_is_ready = false;
+ }
+ }
+
+ fn set_blend_factors(
+ &mut self,
+ color: (gl::GLenum, gl::GLenum),
+ alpha: (gl::GLenum, gl::GLenum),
+ ) {
+ self.gl.blend_equation(gl::FUNC_ADD);
+ if color == alpha {
+ self.gl.blend_func(color.0, color.1);
+ } else {
+ self.gl.blend_func_separate(color.0, color.1, alpha.0, alpha.1);
+ }
+ #[cfg(debug_assertions)]
+ {
+ self.shader_is_ready = false;
+ }
+ }
+
+ pub fn set_blend_mode_alpha(&mut self) {
+ self.set_blend_factors(
+ (gl::SRC_ALPHA, gl::ONE_MINUS_SRC_ALPHA),
+ (gl::ONE, gl::ONE),
+ );
+ }
+
+ pub fn set_blend_mode_premultiplied_alpha(&mut self) {
+ self.set_blend_factors(
+ (gl::ONE, gl::ONE_MINUS_SRC_ALPHA),
+ (gl::ONE, gl::ONE_MINUS_SRC_ALPHA),
+ );
+ }
+
+ pub fn set_blend_mode_premultiplied_dest_out(&mut self) {
+ self.set_blend_factors(
+ (gl::ZERO, gl::ONE_MINUS_SRC_ALPHA),
+ (gl::ZERO, gl::ONE_MINUS_SRC_ALPHA),
+ );
+ }
+
+ pub fn set_blend_mode_multiply(&mut self) {
+ self.set_blend_factors(
+ (gl::ZERO, gl::SRC_COLOR),
+ (gl::ZERO, gl::SRC_ALPHA),
+ );
+ }
+ pub fn set_blend_mode_subpixel_pass0(&mut self) {
+ self.set_blend_factors(
+ (gl::ZERO, gl::ONE_MINUS_SRC_COLOR),
+ (gl::ZERO, gl::ONE_MINUS_SRC_ALPHA),
+ );
+ }
+ pub fn set_blend_mode_subpixel_pass1(&mut self) {
+ self.set_blend_factors(
+ (gl::ONE, gl::ONE),
+ (gl::ONE, gl::ONE),
+ );
+ }
+ pub fn set_blend_mode_subpixel_with_bg_color_pass0(&mut self) {
+ self.set_blend_factors(
+ (gl::ZERO, gl::ONE_MINUS_SRC_COLOR),
+ (gl::ZERO, gl::ONE),
+ );
+ }
+ pub fn set_blend_mode_subpixel_with_bg_color_pass1(&mut self) {
+ self.set_blend_factors(
+ (gl::ONE_MINUS_DST_ALPHA, gl::ONE),
+ (gl::ZERO, gl::ONE),
+ );
+ }
+ pub fn set_blend_mode_subpixel_with_bg_color_pass2(&mut self) {
+ self.set_blend_factors(
+ (gl::ONE, gl::ONE),
+ (gl::ONE, gl::ONE_MINUS_SRC_ALPHA),
+ );
+ }
+ pub fn set_blend_mode_subpixel_constant_text_color(&mut self, color: ColorF) {
+ // color is an unpremultiplied color.
+ self.gl.blend_color(color.r, color.g, color.b, 1.0);
+ self.set_blend_factors(
+ (gl::CONSTANT_COLOR, gl::ONE_MINUS_SRC_COLOR),
+ (gl::CONSTANT_ALPHA, gl::ONE_MINUS_SRC_ALPHA),
+ );
+ }
+ pub fn set_blend_mode_subpixel_dual_source(&mut self) {
+ self.set_blend_factors(
+ (gl::ONE, gl::ONE_MINUS_SRC1_COLOR),
+ (gl::ONE, gl::ONE_MINUS_SRC1_ALPHA),
+ );
+ }
+ pub fn set_blend_mode_show_overdraw(&mut self) {
+ self.set_blend_factors(
+ (gl::ONE, gl::ONE_MINUS_SRC_ALPHA),
+ (gl::ONE, gl::ONE_MINUS_SRC_ALPHA),
+ );
+ }
+
+ pub fn set_blend_mode_max(&mut self) {
+ self.gl
+ .blend_func_separate(gl::ONE, gl::ONE, gl::ONE, gl::ONE);
+ self.gl.blend_equation_separate(gl::MAX, gl::FUNC_ADD);
+ #[cfg(debug_assertions)]
+ {
+ self.shader_is_ready = false;
+ }
+ }
+ pub fn set_blend_mode_min(&mut self) {
+ self.gl
+ .blend_func_separate(gl::ONE, gl::ONE, gl::ONE, gl::ONE);
+ self.gl.blend_equation_separate(gl::MIN, gl::FUNC_ADD);
+ #[cfg(debug_assertions)]
+ {
+ self.shader_is_ready = false;
+ }
+ }
+ pub fn set_blend_mode_advanced(&mut self, mode: MixBlendMode) {
+ self.gl.blend_equation(match mode {
+ MixBlendMode::Normal => {
+ // blend factor only make sense for the normal mode
+ self.gl.blend_func_separate(gl::ZERO, gl::SRC_COLOR, gl::ZERO, gl::SRC_ALPHA);
+ gl::FUNC_ADD
+ },
+ MixBlendMode::Multiply => gl::MULTIPLY_KHR,
+ MixBlendMode::Screen => gl::SCREEN_KHR,
+ MixBlendMode::Overlay => gl::OVERLAY_KHR,
+ MixBlendMode::Darken => gl::DARKEN_KHR,
+ MixBlendMode::Lighten => gl::LIGHTEN_KHR,
+ MixBlendMode::ColorDodge => gl::COLORDODGE_KHR,
+ MixBlendMode::ColorBurn => gl::COLORBURN_KHR,
+ MixBlendMode::HardLight => gl::HARDLIGHT_KHR,
+ MixBlendMode::SoftLight => gl::SOFTLIGHT_KHR,
+ MixBlendMode::Difference => gl::DIFFERENCE_KHR,
+ MixBlendMode::Exclusion => gl::EXCLUSION_KHR,
+ MixBlendMode::Hue => gl::HSL_HUE_KHR,
+ MixBlendMode::Saturation => gl::HSL_SATURATION_KHR,
+ MixBlendMode::Color => gl::HSL_COLOR_KHR,
+ MixBlendMode::Luminosity => gl::HSL_LUMINOSITY_KHR,
+ });
+ #[cfg(debug_assertions)]
+ {
+ self.shader_is_ready = false;
+ }
+ }
+
+ pub fn supports_extension(&self, extension: &str) -> bool {
+ supports_extension(&self.extensions, extension)
+ }
+
+ /// Enable the pixel local storage functionality. Caller must
+ /// have already confirmed the device supports this.
+ pub fn enable_pixel_local_storage(&mut self, enable: bool) {
+ debug_assert!(self.capabilities.supports_pixel_local_storage);
+
+ if enable {
+ self.gl.enable(gl::SHADER_PIXEL_LOCAL_STORAGE_EXT);
+ } else {
+ self.gl.disable(gl::SHADER_PIXEL_LOCAL_STORAGE_EXT);
+ }
+ }
+
+ pub fn echo_driver_messages(&self) {
+ if self.capabilities.supports_khr_debug {
+ Device::log_driver_messages(self.gl());
+ }
+ }
+
+ fn log_driver_messages(gl: &dyn gl::Gl) {
+ for msg in gl.get_debug_messages() {
+ let level = match msg.severity {
+ gl::DEBUG_SEVERITY_HIGH => Level::Error,
+ gl::DEBUG_SEVERITY_MEDIUM => Level::Warn,
+ gl::DEBUG_SEVERITY_LOW => Level::Info,
+ gl::DEBUG_SEVERITY_NOTIFICATION => Level::Debug,
+ _ => Level::Trace,
+ };
+ let ty = match msg.ty {
+ gl::DEBUG_TYPE_ERROR => "error",
+ gl::DEBUG_TYPE_DEPRECATED_BEHAVIOR => "deprecated",
+ gl::DEBUG_TYPE_UNDEFINED_BEHAVIOR => "undefined",
+ gl::DEBUG_TYPE_PORTABILITY => "portability",
+ gl::DEBUG_TYPE_PERFORMANCE => "perf",
+ gl::DEBUG_TYPE_MARKER => "marker",
+ gl::DEBUG_TYPE_PUSH_GROUP => "group push",
+ gl::DEBUG_TYPE_POP_GROUP => "group pop",
+ gl::DEBUG_TYPE_OTHER => "other",
+ _ => "?",
+ };
+ log!(level, "({}) {}", ty, msg.message);
+ }
+ }
+
+ pub fn gl_describe_format(&self, format: ImageFormat) -> FormatDesc {
+ match format {
+ ImageFormat::R8 => FormatDesc {
+ internal: gl::R8,
+ external: gl::RED,
+ read: gl::RED,
+ pixel_type: gl::UNSIGNED_BYTE,
+ },
+ ImageFormat::R16 => FormatDesc {
+ internal: gl::R16,
+ external: gl::RED,
+ read: gl::RED,
+ pixel_type: gl::UNSIGNED_SHORT,
+ },
+ ImageFormat::BGRA8 => {
+ FormatDesc {
+ internal: self.bgra_formats.internal,
+ external: self.bgra_formats.external,
+ read: gl::BGRA,
+ pixel_type: gl::UNSIGNED_BYTE,
+ }
+ },
+ ImageFormat::RGBA8 => {
+ FormatDesc {
+ internal: gl::RGBA8,
+ external: gl::RGBA,
+ read: gl::RGBA,
+ pixel_type: gl::UNSIGNED_BYTE,
+ }
+ },
+ ImageFormat::RGBAF32 => FormatDesc {
+ internal: gl::RGBA32F,
+ external: gl::RGBA,
+ read: gl::RGBA,
+ pixel_type: gl::FLOAT,
+ },
+ ImageFormat::RGBAI32 => FormatDesc {
+ internal: gl::RGBA32I,
+ external: gl::RGBA_INTEGER,
+ read: gl::RGBA_INTEGER,
+ pixel_type: gl::INT,
+ },
+ ImageFormat::RG8 => FormatDesc {
+ internal: gl::RG8,
+ external: gl::RG,
+ read: gl::RG,
+ pixel_type: gl::UNSIGNED_BYTE,
+ },
+ ImageFormat::RG16 => FormatDesc {
+ internal: gl::RG16,
+ external: gl::RG,
+ read: gl::RG,
+ pixel_type: gl::UNSIGNED_SHORT,
+ },
+ }
+ }
+
+ /// Returns a GL format matching an ImageFormat suitable for a renderbuffer.
+ fn matching_renderbuffer_format(&self, format: ImageFormat) -> gl::GLenum {
+ match format {
+ ImageFormat::R8 => gl::R8,
+ ImageFormat::R16 => gl::R16UI,
+ ImageFormat::BGRA8 => panic!("Unable to render to BGRA format!"),
+ ImageFormat::RGBAF32 => gl::RGBA32F,
+ ImageFormat::RG8 => gl::RG8,
+ ImageFormat::RG16 => gl::RG16,
+ ImageFormat::RGBAI32 => gl::RGBA32I,
+ ImageFormat::RGBA8 => gl::RGBA8,
+ }
+ }
+
+ /// Generates a memory report for the resources managed by the device layer.
+ pub fn report_memory(&self) -> MemoryReport {
+ let mut report = MemoryReport::default();
+ for dim in self.depth_targets.keys() {
+ report.depth_target_textures += depth_target_size_in_bytes(dim);
+ }
+ report
+ }
+}
+
+pub struct FormatDesc {
+ /// Format the texel data is internally stored in within a texture.
+ pub internal: gl::GLenum,
+ /// Format that we expect the data to be provided when filling the texture.
+ pub external: gl::GLuint,
+ /// Format to read the texels as, so that they can be uploaded as `external`
+ /// later on.
+ pub read: gl::GLuint,
+ /// Associated pixel type.
+ pub pixel_type: gl::GLuint,
+}
+
+struct UploadChunk {
+ rect: DeviceIntRect,
+ layer_index: i32,
+ stride: Option<i32>,
+ offset: usize,
+ format_override: Option<ImageFormat>,
+}
+
+struct PixelBuffer<'a> {
+ size_allocated: usize,
+ size_used: usize,
+ // small vector avoids heap allocation for a single chunk
+ chunks: SmallVec<[UploadChunk; 1]>,
+ mapping: &'a mut [mem::MaybeUninit<u8>],
+}
+
+impl<'a> PixelBuffer<'a> {
+ fn new(
+ size_allocated: usize,
+ mapping: &'a mut [mem::MaybeUninit<u8>],
+ ) -> Self {
+ PixelBuffer {
+ size_allocated,
+ size_used: 0,
+ chunks: SmallVec::new(),
+ mapping,
+ }
+ }
+
+ fn flush_chunks(&mut self, target: &mut UploadTarget) {
+ for chunk in self.chunks.drain(..) {
+ target.update_impl(chunk);
+ }
+ self.size_used = 0;
+ }
+}
+
+impl<'a> Drop for PixelBuffer<'a> {
+ fn drop(&mut self) {
+ assert_eq!(self.chunks.len(), 0, "PixelBuffer must be flushed before dropping.");
+ }
+}
+
+struct UploadTarget<'a> {
+ device: &'a mut Device,
+ texture: &'a Texture,
+}
+
+enum TextureUploaderType<'a> {
+ Immediate,
+ SingleUseBuffers(VertexUsageHint),
+ MutliUseBuffer(PixelBuffer<'a>)
+}
+
+pub struct TextureUploader<'a, T> {
+ target: UploadTarget<'a>,
+ uploader_type: TextureUploaderType<'a>,
+ marker: PhantomData<T>,
+}
+
+impl<'a, T> Drop for TextureUploader<'a, T> {
+ fn drop(&mut self) {
+ match self.uploader_type {
+ TextureUploaderType::MutliUseBuffer(ref mut buffer) => {
+ self.target.device.gl.unmap_buffer(gl::PIXEL_UNPACK_BUFFER);
+ buffer.flush_chunks(&mut self.target);
+ self.target.device.gl.bind_buffer(gl::PIXEL_UNPACK_BUFFER, 0);
+ }
+ TextureUploaderType::SingleUseBuffers(_) => {
+ self.target.device.gl.bind_buffer(gl::PIXEL_UNPACK_BUFFER, 0);
+ }
+ TextureUploaderType::Immediate => {}
+ }
+ }
+}
+
+impl<'a, T> TextureUploader<'a, T> {
+ pub fn upload(
+ &mut self,
+ mut rect: DeviceIntRect,
+ layer_index: i32,
+ stride: Option<i32>,
+ format_override: Option<ImageFormat>,
+ data: *const T,
+ len: usize,
+ ) -> usize {
+ // Textures dimensions may have been clamped by the hardware. Crop the
+ // upload region to match.
+ let cropped = rect.intersection(
+ &DeviceIntRect::new(DeviceIntPoint::zero(), self.target.texture.get_dimensions())
+ );
+ if cfg!(debug_assertions) && cropped.map_or(true, |r| r != rect) {
+ warn!("Cropping texture upload {:?} to {:?}", rect, cropped);
+ }
+ rect = match cropped {
+ None => return 0,
+ Some(r) => r,
+ };
+
+ let bytes_pp = self.target.texture.format.bytes_per_pixel() as usize;
+ let width_bytes = rect.size.width as usize * bytes_pp;
+
+ let src_stride = stride.map_or(width_bytes, |stride| {
+ assert!(stride >= 0);
+ stride as usize
+ });
+ let src_size = (rect.size.height as usize - 1) * src_stride + width_bytes;
+ assert!(src_size <= len * mem::size_of::<T>());
+
+ // for optimal PBO texture uploads the offset and stride of the data in
+ // the buffer may have to be a multiple of a certain value.
+ let (dst_size, dst_stride) = self.target.device.required_upload_size_and_stride(
+ rect.size,
+ self.target.texture.format,
+ );
+
+ // Choose the buffer to use, if any, allocating a new single-use buffer if required.
+ let mut single_use_buffer = None;
+ let mut buffer = match self.uploader_type {
+ TextureUploaderType::MutliUseBuffer(ref mut buffer) => Some(buffer),
+ TextureUploaderType::SingleUseBuffers(hint) => {
+ match self.target.device.create_upload_buffer(hint, dst_size) {
+ Ok(buffer) => {
+ single_use_buffer = Some(buffer);
+ single_use_buffer.as_mut()
+ }
+ Err(_) => {
+ // If allocating the buffer failed, fall back to immediate uploads
+ self.target.device.gl.bind_buffer(gl::PIXEL_UNPACK_BUFFER, 0);
+ self.uploader_type = TextureUploaderType::Immediate;
+ None
+ }
+ }
+ }
+ TextureUploaderType::Immediate => None,
+ };
+
+ match buffer {
+ Some(ref mut buffer) => {
+ if !self.target.device.capabilities.supports_nonzero_pbo_offsets {
+ assert_eq!(buffer.size_used, 0, "PBO uploads from non-zero offset are not supported.");
+ }
+ assert!(buffer.size_used + dst_size <= buffer.size_allocated, "PixelBuffer is too small");
+
+ unsafe {
+ let src: &[mem::MaybeUninit<u8>] = slice::from_raw_parts(data as *const _, src_size);
+
+ if src_stride == dst_stride {
+ // the stride is already optimal, so simply copy
+ // the data as-is in to the buffer
+ let dst_start = buffer.size_used;
+ let dst_end = dst_start + src_size;
+
+ buffer.mapping[dst_start..dst_end].copy_from_slice(src);
+ } else {
+ // copy the data line-by-line in to the buffer so
+ // that it has an optimal stride
+ for y in 0..rect.size.height as usize {
+ let src_start = y * src_stride;
+ let src_end = src_start + width_bytes;
+ let dst_start = buffer.size_used + y * dst_stride;
+ let dst_end = dst_start + width_bytes;
+
+ buffer.mapping[dst_start..dst_end].copy_from_slice(&src[src_start..src_end])
+ }
+ }
+ }
+
+ buffer.chunks.push(UploadChunk {
+ rect,
+ layer_index,
+ stride: Some(dst_stride as i32),
+ offset: buffer.size_used,
+ format_override,
+ });
+ buffer.size_used += dst_size;
+ }
+ None => {
+ if cfg!(debug_assertions) {
+ let mut bound_buffer = [0];
+ unsafe {
+ self.target.device.gl.get_integer_v(gl::PIXEL_UNPACK_BUFFER_BINDING, &mut bound_buffer);
+ }
+ assert_eq!(bound_buffer[0], 0, "GL_PIXEL_UNPACK_BUFFER must not be bound for immediate uploads.");
+ }
+
+ self.target.update_impl(UploadChunk {
+ rect,
+ layer_index,
+ stride,
+ offset: data as _,
+ format_override,
+ });
+ }
+ }
+
+ // Flush the buffer if it is for single-use.
+ if let Some(ref mut buffer) = single_use_buffer {
+ self.target.device.gl.unmap_buffer(gl::PIXEL_UNPACK_BUFFER);
+ buffer.flush_chunks(&mut self.target);
+ }
+
+ dst_size
+ }
+}
+
+impl<'a> UploadTarget<'a> {
+ fn update_impl(&mut self, chunk: UploadChunk) {
+ let format = chunk.format_override.unwrap_or(self.texture.format);
+ let (gl_format, bpp, data_type) = match format {
+ ImageFormat::R8 => (gl::RED, 1, gl::UNSIGNED_BYTE),
+ ImageFormat::R16 => (gl::RED, 2, gl::UNSIGNED_SHORT),
+ ImageFormat::BGRA8 => (self.device.bgra_formats.external, 4, gl::UNSIGNED_BYTE),
+ ImageFormat::RGBA8 => (gl::RGBA, 4, gl::UNSIGNED_BYTE),
+ ImageFormat::RG8 => (gl::RG, 2, gl::UNSIGNED_BYTE),
+ ImageFormat::RG16 => (gl::RG, 4, gl::UNSIGNED_SHORT),
+ ImageFormat::RGBAF32 => (gl::RGBA, 16, gl::FLOAT),
+ ImageFormat::RGBAI32 => (gl::RGBA_INTEGER, 16, gl::INT),
+ };
+
+ let row_length = match chunk.stride {
+ Some(value) => value / bpp,
+ None => self.texture.size.width,
+ };
+
+ if chunk.stride.is_some() {
+ self.device.gl.pixel_store_i(
+ gl::UNPACK_ROW_LENGTH,
+ row_length as _,
+ );
+ }
+
+ let pos = chunk.rect.origin;
+ let size = chunk.rect.size;
+
+ match self.texture.target {
+ gl::TEXTURE_2D_ARRAY => {
+ self.device.gl.tex_sub_image_3d_pbo(
+ self.texture.target,
+ 0,
+ pos.x as _,
+ pos.y as _,
+ chunk.layer_index,
+ size.width as _,
+ size.height as _,
+ 1,
+ gl_format,
+ data_type,
+ chunk.offset,
+ );
+ }
+ gl::TEXTURE_2D | gl::TEXTURE_RECTANGLE | gl::TEXTURE_EXTERNAL_OES => {
+ self.device.gl.tex_sub_image_2d_pbo(
+ self.texture.target,
+ 0,
+ pos.x as _,
+ pos.y as _,
+ size.width as _,
+ size.height as _,
+ gl_format,
+ data_type,
+ chunk.offset,
+ );
+ }
+ _ => panic!("BUG: Unexpected texture target!"),
+ }
+
+ // If using tri-linear filtering, build the mip-map chain for this texture.
+ if self.texture.filter == TextureFilter::Trilinear {
+ self.device.gl.generate_mipmap(self.texture.target);
+ }
+
+ // Reset row length to 0, otherwise the stride would apply to all texture uploads.
+ if chunk.stride.is_some() {
+ self.device.gl.pixel_store_i(gl::UNPACK_ROW_LENGTH, 0 as _);
+ }
+ }
+}
+
+fn texels_to_u8_slice<T: Texel>(texels: &[T]) -> &[u8] {
+ unsafe {
+ slice::from_raw_parts(texels.as_ptr() as *const u8, texels.len() * mem::size_of::<T>())
+ }
+}
diff --git a/third_party/webrender/webrender/src/device/mod.rs b/third_party/webrender/webrender/src/device/mod.rs
new file mode 100644
index 00000000000..21684dea3e9
--- /dev/null
+++ b/third_party/webrender/webrender/src/device/mod.rs
@@ -0,0 +1,9 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+mod gl;
+pub mod query_gl;
+
+pub use self::gl::*;
+pub use self::query_gl as query;
diff --git a/third_party/webrender/webrender/src/device/query_gl.rs b/third_party/webrender/webrender/src/device/query_gl.rs
new file mode 100644
index 00000000000..95d515dc5ec
--- /dev/null
+++ b/third_party/webrender/webrender/src/device/query_gl.rs
@@ -0,0 +1,325 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use gleam::gl;
+use std::mem;
+use std::rc::Rc;
+
+use crate::device::GpuFrameId;
+
+#[derive(Copy, Clone, Debug)]
+pub enum GpuDebugMethod {
+ None,
+ MarkerEXT,
+ KHR,
+}
+
+pub trait NamedTag {
+ fn get_label(&self) -> &str;
+}
+
+#[derive(Debug, Clone)]
+pub struct GpuTimer<T> {
+ pub tag: T,
+ pub time_ns: u64,
+}
+
+#[derive(Debug, Clone)]
+pub struct GpuSampler<T> {
+ pub tag: T,
+ pub count: u64,
+}
+
+pub struct QuerySet<T> {
+ set: Vec<gl::GLuint>,
+ data: Vec<T>,
+ pending: gl::GLuint,
+}
+
+impl<T> QuerySet<T> {
+ fn new() -> Self {
+ QuerySet {
+ set: Vec::new(),
+ data: Vec::new(),
+ pending: 0,
+ }
+ }
+
+ fn reset(&mut self) {
+ self.data.clear();
+ self.pending = 0;
+ }
+
+ fn add(&mut self, value: T) -> Option<gl::GLuint> {
+ assert_eq!(self.pending, 0);
+ self.set.get(self.data.len()).cloned().map(|query_id| {
+ self.data.push(value);
+ self.pending = query_id;
+ query_id
+ })
+ }
+
+ fn take<F: Fn(&mut T, gl::GLuint)>(&mut self, fun: F) -> Vec<T> {
+ let mut data = mem::replace(&mut self.data, Vec::new());
+ for (value, &query) in data.iter_mut().zip(self.set.iter()) {
+ fun(value, query)
+ }
+ data
+ }
+}
+
+pub struct GpuFrameProfile<T> {
+ gl: Rc<dyn gl::Gl>,
+ timers: QuerySet<GpuTimer<T>>,
+ samplers: QuerySet<GpuSampler<T>>,
+ frame_id: GpuFrameId,
+ inside_frame: bool,
+ debug_method: GpuDebugMethod,
+}
+
+impl<T> GpuFrameProfile<T> {
+ fn new(gl: Rc<dyn gl::Gl>, debug_method: GpuDebugMethod) -> Self {
+ GpuFrameProfile {
+ gl,
+ timers: QuerySet::new(),
+ samplers: QuerySet::new(),
+ frame_id: GpuFrameId::new(0),
+ inside_frame: false,
+ debug_method
+ }
+ }
+
+ fn enable_timers(&mut self, count: i32) {
+ self.timers.set = self.gl.gen_queries(count);
+ }
+
+ fn disable_timers(&mut self) {
+ if !self.timers.set.is_empty() {
+ self.gl.delete_queries(&self.timers.set);
+ }
+ self.timers.set = Vec::new();
+ }
+
+ fn enable_samplers(&mut self, count: i32) {
+ self.samplers.set = self.gl.gen_queries(count);
+ }
+
+ fn disable_samplers(&mut self) {
+ if !self.samplers.set.is_empty() {
+ self.gl.delete_queries(&self.samplers.set);
+ }
+ self.samplers.set = Vec::new();
+ }
+
+ fn begin_frame(&mut self, frame_id: GpuFrameId) {
+ self.frame_id = frame_id;
+ self.timers.reset();
+ self.samplers.reset();
+ self.inside_frame = true;
+ }
+
+ fn end_frame(&mut self) {
+ self.finish_timer();
+ self.finish_sampler();
+ self.inside_frame = false;
+ }
+
+ fn finish_timer(&mut self) {
+ debug_assert!(self.inside_frame);
+ if self.timers.pending != 0 {
+ self.gl.end_query(gl::TIME_ELAPSED);
+ self.timers.pending = 0;
+ }
+ }
+
+ fn finish_sampler(&mut self) {
+ debug_assert!(self.inside_frame);
+ if self.samplers.pending != 0 {
+ self.gl.end_query(gl::SAMPLES_PASSED);
+ self.samplers.pending = 0;
+ }
+ }
+}
+
+impl<T: NamedTag> GpuFrameProfile<T> {
+ fn start_timer(&mut self, tag: T) -> GpuTimeQuery {
+ self.finish_timer();
+
+ let marker = GpuMarker::new(&self.gl, tag.get_label(), self.debug_method);
+
+ if let Some(query) = self.timers.add(GpuTimer { tag, time_ns: 0 }) {
+ self.gl.begin_query(gl::TIME_ELAPSED, query);
+ }
+
+ GpuTimeQuery(marker)
+ }
+
+ fn start_sampler(&mut self, tag: T) -> GpuSampleQuery {
+ self.finish_sampler();
+
+ if let Some(query) = self.samplers.add(GpuSampler { tag, count: 0 }) {
+ self.gl.begin_query(gl::SAMPLES_PASSED, query);
+ }
+
+ GpuSampleQuery
+ }
+
+ fn build_samples(&mut self) -> (GpuFrameId, Vec<GpuTimer<T>>, Vec<GpuSampler<T>>) {
+ debug_assert!(!self.inside_frame);
+ let gl = &self.gl;
+
+ (
+ self.frame_id,
+ self.timers.take(|timer, query| {
+ timer.time_ns = gl.get_query_object_ui64v(query, gl::QUERY_RESULT)
+ }),
+ self.samplers.take(|sampler, query| {
+ sampler.count = gl.get_query_object_ui64v(query, gl::QUERY_RESULT)
+ }),
+ )
+ }
+}
+
+impl<T> Drop for GpuFrameProfile<T> {
+ fn drop(&mut self) {
+ self.disable_timers();
+ self.disable_samplers();
+ }
+}
+
+pub struct GpuProfiler<T> {
+ gl: Rc<dyn gl::Gl>,
+ frames: Vec<GpuFrameProfile<T>>,
+ next_frame: usize,
+ debug_method: GpuDebugMethod
+}
+
+impl<T> GpuProfiler<T> {
+ pub fn new(gl: Rc<dyn gl::Gl>, debug_method: GpuDebugMethod) -> Self {
+ const MAX_PROFILE_FRAMES: usize = 4;
+ let frames = (0 .. MAX_PROFILE_FRAMES)
+ .map(|_| GpuFrameProfile::new(Rc::clone(&gl), debug_method))
+ .collect();
+
+ GpuProfiler {
+ gl,
+ next_frame: 0,
+ frames,
+ debug_method
+ }
+ }
+
+ pub fn enable_timers(&mut self) {
+ const MAX_TIMERS_PER_FRAME: i32 = 256;
+
+ for frame in &mut self.frames {
+ frame.enable_timers(MAX_TIMERS_PER_FRAME);
+ }
+ }
+
+ pub fn disable_timers(&mut self) {
+ for frame in &mut self.frames {
+ frame.disable_timers();
+ }
+ }
+
+ pub fn enable_samplers(&mut self) {
+ const MAX_SAMPLERS_PER_FRAME: i32 = 16;
+ if cfg!(target_os = "macos") {
+ warn!("Expect macOS driver bugs related to sample queries")
+ }
+
+ for frame in &mut self.frames {
+ frame.enable_samplers(MAX_SAMPLERS_PER_FRAME);
+ }
+ }
+
+ pub fn disable_samplers(&mut self) {
+ for frame in &mut self.frames {
+ frame.disable_samplers();
+ }
+ }
+}
+
+impl<T: NamedTag> GpuProfiler<T> {
+ pub fn build_samples(&mut self) -> (GpuFrameId, Vec<GpuTimer<T>>, Vec<GpuSampler<T>>) {
+ self.frames[self.next_frame].build_samples()
+ }
+
+ pub fn begin_frame(&mut self, frame_id: GpuFrameId) {
+ self.frames[self.next_frame].begin_frame(frame_id);
+ }
+
+ pub fn end_frame(&mut self) {
+ self.frames[self.next_frame].end_frame();
+ self.next_frame = (self.next_frame + 1) % self.frames.len();
+ }
+
+ pub fn start_timer(&mut self, tag: T) -> GpuTimeQuery {
+ self.frames[self.next_frame].start_timer(tag)
+ }
+
+ pub fn start_sampler(&mut self, tag: T) -> GpuSampleQuery {
+ self.frames[self.next_frame].start_sampler(tag)
+ }
+
+ pub fn finish_sampler(&mut self, _sampler: GpuSampleQuery) {
+ self.frames[self.next_frame].finish_sampler()
+ }
+
+ pub fn start_marker(&mut self, label: &str) -> GpuMarker {
+ GpuMarker::new(&self.gl, label, self.debug_method)
+ }
+
+ pub fn place_marker(&mut self, label: &str) {
+ GpuMarker::fire(&self.gl, label, self.debug_method)
+ }
+}
+
+#[must_use]
+pub struct GpuMarker {
+ gl: Option<(Rc<dyn gl::Gl>, GpuDebugMethod)>,
+}
+
+impl GpuMarker {
+ fn new(gl: &Rc<dyn gl::Gl>, message: &str, debug_method: GpuDebugMethod) -> Self {
+ let gl = match debug_method {
+ GpuDebugMethod::KHR => {
+ gl.push_debug_group_khr(gl::DEBUG_SOURCE_APPLICATION, 0, message);
+ Some((Rc::clone(gl), debug_method))
+ },
+ GpuDebugMethod::MarkerEXT => {
+ gl.push_group_marker_ext(message);
+ Some((Rc::clone(gl), debug_method))
+ },
+ GpuDebugMethod::None => None,
+ };
+ GpuMarker { gl }
+ }
+
+ fn fire(gl: &Rc<dyn gl::Gl>, message: &str, debug_method: GpuDebugMethod) {
+ match debug_method {
+ GpuDebugMethod::KHR => gl.debug_message_insert_khr(gl::DEBUG_SOURCE_APPLICATION, gl::DEBUG_TYPE_MARKER, 0, gl::DEBUG_SEVERITY_NOTIFICATION, message),
+ GpuDebugMethod::MarkerEXT => gl.insert_event_marker_ext(message),
+ GpuDebugMethod::None => {}
+ };
+ }
+}
+
+impl Drop for GpuMarker {
+ fn drop(&mut self) {
+ if let Some((ref gl, debug_method)) = self.gl {
+ match debug_method {
+ GpuDebugMethod::KHR => gl.pop_debug_group_khr(),
+ GpuDebugMethod::MarkerEXT => gl.pop_group_marker_ext(),
+ GpuDebugMethod::None => {}
+ };
+ }
+ }
+}
+
+#[must_use]
+pub struct GpuTimeQuery(GpuMarker);
+#[must_use]
+pub struct GpuSampleQuery;
diff --git a/third_party/webrender/webrender/src/ellipse.rs b/third_party/webrender/webrender/src/ellipse.rs
new file mode 100644
index 00000000000..fac67659849
--- /dev/null
+++ b/third_party/webrender/webrender/src/ellipse.rs
@@ -0,0 +1,187 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::units::*;
+use euclid::Size2D;
+use std::f32::consts::FRAC_PI_2;
+
+
+/// Number of steps to integrate arc length over.
+const STEP_COUNT: usize = 20;
+
+/// Represents an ellipse centred at a local space origin.
+#[derive(Debug, Clone)]
+pub struct Ellipse<U> {
+ pub radius: Size2D<f32, U>,
+ pub total_arc_length: f32,
+}
+
+impl<U> Ellipse<U> {
+ pub fn new(radius: Size2D<f32, U>) -> Ellipse<U> {
+ // Approximate the total length of the first quadrant of this ellipse.
+ let total_arc_length = get_simpson_length(FRAC_PI_2, radius.width, radius.height);
+
+ Ellipse {
+ radius,
+ total_arc_length,
+ }
+ }
+
+ /// Binary search to estimate the angle of an ellipse
+ /// for a given arc length. This only searches over the
+ /// first quadrant of an ellipse.
+ pub fn find_angle_for_arc_length(&self, arc_length: f32) -> f32 {
+ // Clamp arc length to [0, pi].
+ let arc_length = arc_length.max(0.0).min(self.total_arc_length);
+
+ let epsilon = 0.01;
+ let mut low = 0.0;
+ let mut high = FRAC_PI_2;
+ let mut theta = 0.0;
+ let mut new_low = 0.0;
+ let mut new_high = FRAC_PI_2;
+
+ while low <= high {
+ theta = 0.5 * (low + high);
+ let length = get_simpson_length(theta, self.radius.width, self.radius.height);
+
+ if (length - arc_length).abs() < epsilon {
+ break;
+ } else if length < arc_length {
+ new_low = theta;
+ } else {
+ new_high = theta;
+ }
+
+ // If we have stopped moving down the arc, the answer that we have is as good as
+ // it is going to get. We break to avoid going into an infinite loop.
+ if new_low == low && new_high == high {
+ break;
+ }
+
+ high = new_high;
+ low = new_low;
+ }
+
+ theta
+ }
+
+ /// Get a point and tangent on this ellipse from a given angle.
+ /// This only works for the first quadrant of the ellipse.
+ pub fn get_point_and_tangent(&self, theta: f32) -> (LayoutPoint, LayoutPoint) {
+ let (sin_theta, cos_theta) = theta.sin_cos();
+ let point = LayoutPoint::new(
+ self.radius.width * cos_theta,
+ self.radius.height * sin_theta,
+ );
+ let tangent = LayoutPoint::new(
+ -self.radius.width * sin_theta,
+ self.radius.height * cos_theta,
+ );
+ (point, tangent)
+ }
+
+ pub fn contains(&self, point: LayoutPoint) -> bool {
+ self.signed_distance(point.to_vector()) <= 0.0
+ }
+
+ /// Find the signed distance from this ellipse given a point.
+ /// Taken from http://www.iquilezles.org/www/articles/ellipsedist/ellipsedist.htm
+ fn signed_distance(&self, point: LayoutVector2D) -> f32 {
+ // This algorithm fails for circles, so we handle them here.
+ if self.radius.width == self.radius.height {
+ return point.length() - self.radius.width;
+ }
+
+ let mut p = LayoutVector2D::new(point.x.abs(), point.y.abs());
+ let mut ab = self.radius.to_vector();
+ if p.x > p.y {
+ p = p.yx();
+ ab = ab.yx();
+ }
+
+ let l = ab.y * ab.y - ab.x * ab.x;
+
+ let m = ab.x * p.x / l;
+ let n = ab.y * p.y / l;
+ let m2 = m * m;
+ let n2 = n * n;
+
+ let c = (m2 + n2 - 1.0) / 3.0;
+ let c3 = c * c * c;
+
+ let q = c3 + m2 * n2 * 2.0;
+ let d = c3 + m2 * n2;
+ let g = m + m * n2;
+
+ let co = if d < 0.0 {
+ let p = (q / c3).acos() / 3.0;
+ let s = p.cos();
+ let t = p.sin() * (3.0_f32).sqrt();
+ let rx = (-c * (s + t + 2.0) + m2).sqrt();
+ let ry = (-c * (s - t + 2.0) + m2).sqrt();
+ (ry + l.signum() * rx + g.abs() / (rx * ry) - m) / 2.0
+ } else {
+ let h = 2.0 * m * n * d.sqrt();
+ let s = (q + h).signum() * (q + h).abs().powf(1.0 / 3.0);
+ let u = (q - h).signum() * (q - h).abs().powf(1.0 / 3.0);
+ let rx = -s - u - c * 4.0 + 2.0 * m2;
+ let ry = (s - u) * (3.0_f32).sqrt();
+ let rm = (rx * rx + ry * ry).sqrt();
+ let p = ry / (rm - rx).sqrt();
+ (p + 2.0 * g / rm - m) / 2.0
+ };
+
+ let si = (1.0 - co * co).sqrt();
+ let r = LayoutVector2D::new(ab.x * co, ab.y * si);
+ (r - p).length() * (p.y - r.y).signum()
+ }
+}
+
+/// Use Simpsons rule to approximate the arc length of
+/// part of an ellipse. Note that this only works over
+/// the range of [0, pi/2].
+// TODO(gw): This is a simplistic way to estimate the
+// arc length of an ellipse segment. We can probably use
+// a faster / more accurate method!
+fn get_simpson_length(theta: f32, rx: f32, ry: f32) -> f32 {
+ let df = theta / STEP_COUNT as f32;
+ let mut sum = 0.0;
+
+ for i in 0 .. (STEP_COUNT + 1) {
+ let (sin_theta, cos_theta) = (i as f32 * df).sin_cos();
+ let a = rx * sin_theta;
+ let b = ry * cos_theta;
+ let y = (a * a + b * b).sqrt();
+ let q = if i == 0 || i == STEP_COUNT {
+ 1.0
+ } else if i % 2 == 0 {
+ 2.0
+ } else {
+ 4.0
+ };
+
+ sum += q * y;
+ }
+
+ (df / 3.0) * sum
+}
+
+#[cfg(test)]
+pub mod test {
+ use super::*;
+
+ #[test]
+ fn find_angle_for_arc_length_for_long_eclipse() {
+ // Ensure that finding the angle on giant ellipses produces and answer and
+ // doesn't send us into an infinite loop.
+ let ellipse = Ellipse::new(LayoutSize::new(57500.0, 25.0));
+ let _ = ellipse.find_angle_for_arc_length(55674.53);
+ assert!(true);
+
+ let ellipse = Ellipse::new(LayoutSize::new(25.0, 57500.0));
+ let _ = ellipse.find_angle_for_arc_length(55674.53);
+ assert!(true);
+ }
+}
diff --git a/third_party/webrender/webrender/src/filterdata.rs b/third_party/webrender/webrender/src/filterdata.rs
new file mode 100644
index 00000000000..3bbfcebea5e
--- /dev/null
+++ b/third_party/webrender/webrender/src/filterdata.rs
@@ -0,0 +1,214 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use std::{hash};
+use crate::gpu_cache::{GpuCacheHandle};
+use crate::frame_builder::FrameBuildingState;
+use crate::gpu_cache::GpuDataRequest;
+use crate::intern;
+use api::{FilterDataIntern, ComponentTransferFuncType};
+
+
+pub type FilterDataHandle = intern::Handle<FilterDataIntern>;
+
+#[derive(Debug, Clone, MallocSizeOf, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum SFilterDataComponent {
+ Identity,
+ Table(Vec<f32>),
+ Discrete(Vec<f32>),
+ Linear(f32, f32),
+ Gamma(f32, f32, f32),
+}
+
+impl Eq for SFilterDataComponent {}
+
+impl hash::Hash for SFilterDataComponent {
+ fn hash<H: hash::Hasher>(&self, state: &mut H) {
+ match self {
+ SFilterDataComponent::Identity => {
+ 0.hash(state);
+ }
+ SFilterDataComponent::Table(values) => {
+ 1.hash(state);
+ values.len().hash(state);
+ for val in values {
+ val.to_bits().hash(state);
+ }
+ }
+ SFilterDataComponent::Discrete(values) => {
+ 2.hash(state);
+ values.len().hash(state);
+ for val in values {
+ val.to_bits().hash(state);
+ }
+ }
+ SFilterDataComponent::Linear(a, b) => {
+ 3.hash(state);
+ a.to_bits().hash(state);
+ b.to_bits().hash(state);
+ }
+ SFilterDataComponent::Gamma(a, b, c) => {
+ 4.hash(state);
+ a.to_bits().hash(state);
+ b.to_bits().hash(state);
+ c.to_bits().hash(state);
+ }
+ }
+ }
+}
+
+impl SFilterDataComponent {
+ pub fn to_int(&self) -> u32 {
+ match self {
+ SFilterDataComponent::Identity => 0,
+ SFilterDataComponent::Table(_) => 1,
+ SFilterDataComponent::Discrete(_) => 2,
+ SFilterDataComponent::Linear(_, _) => 3,
+ SFilterDataComponent::Gamma(_, _, _) => 4,
+ }
+ }
+
+ pub fn from_functype_values(
+ func_type: ComponentTransferFuncType,
+ values: &[f32],
+ ) -> SFilterDataComponent {
+ match func_type {
+ ComponentTransferFuncType::Identity => SFilterDataComponent::Identity,
+ ComponentTransferFuncType::Table => SFilterDataComponent::Table(values.to_vec()),
+ ComponentTransferFuncType::Discrete => SFilterDataComponent::Discrete(values.to_vec()),
+ ComponentTransferFuncType::Linear => SFilterDataComponent::Linear(values[0], values[1]),
+ ComponentTransferFuncType::Gamma => SFilterDataComponent::Gamma(values[0], values[1], values[2]),
+ }
+ }
+}
+
+#[derive(Debug, Clone, MallocSizeOf, PartialEq, Eq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct SFilterData {
+ pub r_func: SFilterDataComponent,
+ pub g_func: SFilterDataComponent,
+ pub b_func: SFilterDataComponent,
+ pub a_func: SFilterDataComponent,
+}
+
+#[derive(Debug, Clone, MallocSizeOf, PartialEq, Eq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct SFilterDataKey {
+ pub data: SFilterData,
+}
+
+impl intern::InternDebug for SFilterDataKey {}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct SFilterDataTemplate {
+ pub data: SFilterData,
+ pub gpu_cache_handle: GpuCacheHandle,
+}
+
+impl From<SFilterDataKey> for SFilterDataTemplate {
+ fn from(item: SFilterDataKey) -> Self {
+ SFilterDataTemplate {
+ data: item.data,
+ gpu_cache_handle: GpuCacheHandle::new(),
+ }
+ }
+}
+
+impl SFilterData {
+ pub fn is_identity(&self) -> bool {
+ self.r_func == SFilterDataComponent::Identity
+ && self.g_func == SFilterDataComponent::Identity
+ && self.b_func == SFilterDataComponent::Identity
+ && self.a_func == SFilterDataComponent::Identity
+ }
+
+ pub fn update(&self, mut request: GpuDataRequest) {
+ push_component_transfer_data(&self.r_func, &mut request);
+ push_component_transfer_data(&self.g_func, &mut request);
+ push_component_transfer_data(&self.b_func, &mut request);
+ push_component_transfer_data(&self.a_func, &mut request);
+ assert!(!self.is_identity());
+ }
+}
+
+impl SFilterDataTemplate {
+ /// Update the GPU cache for a given filter data template. This may be called multiple
+ /// times per frame, by each primitive reference that refers to this interned
+ /// template. The initial request call to the GPU cache ensures that work is only
+ /// done if the cache entry is invalid (due to first use or eviction).
+ pub fn update(
+ &mut self,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ if let Some(request) = frame_state.gpu_cache.request(&mut self.gpu_cache_handle) {
+ self.data.update(request);
+ }
+ }
+}
+
+impl intern::Internable for FilterDataIntern {
+ type Key = SFilterDataKey;
+ type StoreData = SFilterDataTemplate;
+ type InternData = ();
+}
+
+fn push_component_transfer_data(
+ func_comp: &SFilterDataComponent,
+ request: &mut GpuDataRequest,
+) {
+ match func_comp {
+ SFilterDataComponent::Identity => {}
+ SFilterDataComponent::Table(values) |
+ SFilterDataComponent::Discrete(values) => {
+ // Push a 256 entry lookup table.
+ assert!(values.len() > 0);
+ for i in 0 .. 64 {
+ let mut arr = [0.0 ; 4];
+ for j in 0 .. 4 {
+ if (values.len() == 1) || (i == 63 && j == 3) {
+ arr[j] = values[values.len()-1];
+ } else {
+ let c = ((4*i + j) as f32)/255.0;
+ match func_comp {
+ SFilterDataComponent::Table(_) => {
+ let n = (values.len()-1) as f32;
+ let k = (n * c).floor() as u32;
+ let ku = k as usize;
+ assert!(ku < values.len()-1);
+ arr[j] = values[ku] + (c*n - (k as f32)) * (values[ku+1] - values[ku]);
+ }
+ SFilterDataComponent::Discrete(_) => {
+ let n = values.len() as f32;
+ let k = (n * c).floor() as usize;
+ assert!(k < values.len());
+ arr[j] = values[k];
+ }
+ SFilterDataComponent::Identity |
+ SFilterDataComponent::Linear(_,_) |
+ SFilterDataComponent::Gamma(_,_,_) => {
+ unreachable!();
+ }
+ }
+
+ }
+ }
+
+ request.push(arr);
+ }
+ }
+ SFilterDataComponent::Linear(a, b) => {
+ request.push([*a, *b, 0.0, 0.0]);
+ }
+ SFilterDataComponent::Gamma(a, b, c) => {
+ request.push([*a, *b, *c, 0.0]);
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/src/frame_builder.rs b/third_party/webrender/webrender/src/frame_builder.rs
new file mode 100644
index 00000000000..afb56778c95
--- /dev/null
+++ b/third_party/webrender/webrender/src/frame_builder.rs
@@ -0,0 +1,1097 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{ColorF, DebugFlags, DocumentLayer, FontRenderMode, PremultipliedColorF};
+use api::units::*;
+use crate::batch::{BatchBuilder, AlphaBatchBuilder, AlphaBatchContainer};
+use crate::clip::{ClipStore, ClipChainStack, ClipInstance};
+use crate::spatial_tree::{SpatialTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex};
+use crate::composite::{CompositorKind, CompositeState};
+use crate::debug_render::DebugItem;
+use crate::gpu_cache::{GpuCache, GpuCacheHandle};
+use crate::gpu_types::{PrimitiveHeaders, TransformPalette, UvRectKind, ZBufferIdGenerator};
+use crate::gpu_types::TransformData;
+use crate::internal_types::{FastHashMap, PlaneSplitter, SavedTargetIndex};
+use crate::picture::{PictureUpdateState, SurfaceInfo, ROOT_SURFACE_INDEX, SurfaceIndex, RecordedDirtyRegion};
+use crate::picture::{RetainedTiles, TileCacheInstance, DirtyRegion, SurfaceRenderTasks, SubpixelMode};
+use crate::picture::{BackdropKind, TileCacheLogger};
+use crate::prim_store::{SpaceMapper, PictureIndex, PrimitiveDebugId, PrimitiveScratchBuffer};
+use crate::prim_store::{DeferredResolve, PrimitiveVisibilityMask};
+use crate::profiler::{FrameProfileCounters, TextureCacheProfileCounters, ResourceProfileCounters};
+use crate::render_backend::{DataStores, FrameStamp, FrameId};
+use crate::render_target::{RenderTarget, PictureCacheTarget, TextureCacheRenderTarget};
+use crate::render_target::{RenderTargetContext, RenderTargetKind};
+use crate::render_task_graph::{RenderTaskId, RenderTaskGraph, RenderTaskGraphCounters};
+use crate::render_task_graph::{RenderPassKind, RenderPass};
+use crate::render_task::{RenderTask, RenderTaskLocation, RenderTaskKind};
+use crate::resource_cache::{ResourceCache};
+use crate::scene::{BuiltScene, SceneProperties};
+use crate::segment::SegmentBuilder;
+use std::{f32, mem};
+use crate::util::MaxRect;
+
+
+#[derive(Clone, Copy, Debug, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum ChasePrimitive {
+ Nothing,
+ Id(PrimitiveDebugId),
+ LocalRect(LayoutRect),
+}
+
+impl Default for ChasePrimitive {
+ fn default() -> Self {
+ ChasePrimitive::Nothing
+ }
+}
+
+#[derive(Clone, Copy, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct FrameBuilderConfig {
+ pub default_font_render_mode: FontRenderMode,
+ pub dual_source_blending_is_supported: bool,
+ pub dual_source_blending_is_enabled: bool,
+ pub chase_primitive: ChasePrimitive,
+ /// The immutable global picture caching enable from `RendererOptions`
+ pub global_enable_picture_caching: bool,
+ /// True if we're running tests (i.e. via wrench).
+ pub testing: bool,
+ pub gpu_supports_fast_clears: bool,
+ pub gpu_supports_advanced_blend: bool,
+ pub advanced_blend_is_coherent: bool,
+ pub batch_lookback_count: usize,
+ pub background_color: Option<ColorF>,
+ pub compositor_kind: CompositorKind,
+ pub tile_size_override: Option<DeviceIntSize>,
+ pub max_depth_ids: i32,
+ pub max_target_size: i32,
+}
+
+/// A set of common / global resources that are retained between
+/// new display lists, such that any GPU cache handles can be
+/// persisted even when a new display list arrives.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct FrameGlobalResources {
+ /// The image shader block for the most common / default
+ /// set of image parameters (color white, stretch == rect.size).
+ pub default_image_handle: GpuCacheHandle,
+
+ /// A GPU cache config for drawing transparent rectangle primitives.
+ /// This is used to 'cut out' overlay tiles where a compositor
+ /// surface exists.
+ pub default_transparent_rect_handle: GpuCacheHandle,
+}
+
+impl FrameGlobalResources {
+ pub fn empty() -> Self {
+ FrameGlobalResources {
+ default_image_handle: GpuCacheHandle::new(),
+ default_transparent_rect_handle: GpuCacheHandle::new(),
+ }
+ }
+
+ pub fn update(
+ &mut self,
+ gpu_cache: &mut GpuCache,
+ ) {
+ if let Some(mut request) = gpu_cache.request(&mut self.default_image_handle) {
+ request.push(PremultipliedColorF::WHITE);
+ request.push(PremultipliedColorF::WHITE);
+ request.push([
+ -1.0, // -ve means use prim rect for stretch size
+ 0.0,
+ 0.0,
+ 0.0,
+ ]);
+ }
+
+ if let Some(mut request) = gpu_cache.request(&mut self.default_transparent_rect_handle) {
+ request.push(PremultipliedColorF::TRANSPARENT);
+ }
+ }
+}
+
+/// Produces the frames that are sent to the renderer.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct FrameBuilder {
+ /// Cache of surface tiles from the previous frame builder
+ /// that can optionally be consumed by this frame builder.
+ pending_retained_tiles: RetainedTiles,
+ pub globals: FrameGlobalResources,
+}
+
+pub struct FrameVisibilityContext<'a> {
+ pub spatial_tree: &'a SpatialTree,
+ pub global_screen_world_rect: WorldRect,
+ pub global_device_pixel_scale: DevicePixelScale,
+ pub surfaces: &'a [SurfaceInfo],
+ pub debug_flags: DebugFlags,
+ pub scene_properties: &'a SceneProperties,
+ pub config: FrameBuilderConfig,
+}
+
+pub struct FrameVisibilityState<'a> {
+ pub clip_store: &'a mut ClipStore,
+ pub resource_cache: &'a mut ResourceCache,
+ pub gpu_cache: &'a mut GpuCache,
+ pub scratch: &'a mut PrimitiveScratchBuffer,
+ pub tile_cache: Option<Box<TileCacheInstance>>,
+ pub retained_tiles: &'a mut RetainedTiles,
+ pub data_stores: &'a mut DataStores,
+ pub clip_chain_stack: ClipChainStack,
+ pub render_tasks: &'a mut RenderTaskGraph,
+ pub composite_state: &'a mut CompositeState,
+ /// A stack of currently active off-screen surfaces during the
+ /// visibility frame traversal.
+ pub surface_stack: Vec<SurfaceIndex>,
+}
+
+impl<'a> FrameVisibilityState<'a> {
+ pub fn push_surface(
+ &mut self,
+ surface_index: SurfaceIndex,
+ shared_clips: &[ClipInstance],
+ spatial_tree: &SpatialTree,
+ ) {
+ self.surface_stack.push(surface_index);
+ self.clip_chain_stack.push_surface(shared_clips, spatial_tree);
+ }
+
+ pub fn pop_surface(&mut self) {
+ self.surface_stack.pop().unwrap();
+ self.clip_chain_stack.pop_surface();
+ }
+}
+
+pub struct FrameBuildingContext<'a> {
+ pub global_device_pixel_scale: DevicePixelScale,
+ pub scene_properties: &'a SceneProperties,
+ pub global_screen_world_rect: WorldRect,
+ pub spatial_tree: &'a SpatialTree,
+ pub max_local_clip: LayoutRect,
+ pub debug_flags: DebugFlags,
+ pub fb_config: &'a FrameBuilderConfig,
+}
+
+pub struct FrameBuildingState<'a> {
+ pub render_tasks: &'a mut RenderTaskGraph,
+ pub profile_counters: &'a mut FrameProfileCounters,
+ pub clip_store: &'a mut ClipStore,
+ pub resource_cache: &'a mut ResourceCache,
+ pub gpu_cache: &'a mut GpuCache,
+ pub transforms: &'a mut TransformPalette,
+ pub segment_builder: SegmentBuilder,
+ pub surfaces: &'a mut Vec<SurfaceInfo>,
+ pub dirty_region_stack: Vec<DirtyRegion>,
+ pub composite_state: &'a mut CompositeState,
+}
+
+impl<'a> FrameBuildingState<'a> {
+ /// Retrieve the current dirty region during primitive traversal.
+ pub fn current_dirty_region(&self) -> &DirtyRegion {
+ self.dirty_region_stack.last().unwrap()
+ }
+
+ /// Push a new dirty region for child primitives to cull / clip against.
+ pub fn push_dirty_region(&mut self, region: DirtyRegion) {
+ self.dirty_region_stack.push(region);
+ }
+
+ /// Pop the top dirty region from the stack.
+ pub fn pop_dirty_region(&mut self) {
+ self.dirty_region_stack.pop().unwrap();
+ }
+}
+
+/// Immutable context of a picture when processing children.
+#[derive(Debug)]
+pub struct PictureContext {
+ pub pic_index: PictureIndex,
+ pub apply_local_clip_rect: bool,
+ pub is_passthrough: bool,
+ pub surface_spatial_node_index: SpatialNodeIndex,
+ pub raster_spatial_node_index: SpatialNodeIndex,
+ /// The surface that this picture will render on.
+ pub surface_index: SurfaceIndex,
+ pub dirty_region_count: usize,
+ pub subpixel_mode: SubpixelMode,
+}
+
+/// Mutable state of a picture that gets modified when
+/// the children are processed.
+pub struct PictureState {
+ pub map_local_to_pic: SpaceMapper<LayoutPixel, PicturePixel>,
+ pub map_pic_to_world: SpaceMapper<PicturePixel, WorldPixel>,
+ pub map_pic_to_raster: SpaceMapper<PicturePixel, RasterPixel>,
+ pub map_raster_to_world: SpaceMapper<RasterPixel, WorldPixel>,
+ /// If the plane splitter, the primitives get added to it instead of
+ /// batching into their parent pictures.
+ pub plane_splitter: Option<PlaneSplitter>,
+}
+
+impl FrameBuilder {
+ pub fn new() -> Self {
+ FrameBuilder {
+ pending_retained_tiles: RetainedTiles::new(),
+ globals: FrameGlobalResources::empty(),
+ }
+ }
+
+ /// Provide any cached surface tiles from the previous frame builder
+ /// to a new frame builder. These will be consumed or dropped the
+ /// first time a new frame builder creates a frame.
+ pub fn set_retained_resources(&mut self, retained_tiles: RetainedTiles) {
+ // In general, the pending retained tiles are consumed by the frame
+ // builder the first time a frame is built after a new scene has
+ // arrived. However, if two scenes arrive in quick succession, the
+ // frame builder may not have had a chance to build a frame and
+ // consume the pending tiles. In this case, the pending tiles will
+ // be lost, causing a full invalidation of the entire screen. To
+ // avoid this, if there are still pending tiles, include them in
+ // the retained tiles passed to the next frame builder.
+ self.pending_retained_tiles.merge(retained_tiles);
+ }
+
+ /// Compute the contribution (bounding rectangles, and resources) of layers and their
+ /// primitives in screen space.
+ fn build_layer_screen_rects_and_cull_layers(
+ &mut self,
+ scene: &mut BuiltScene,
+ global_screen_world_rect: WorldRect,
+ resource_cache: &mut ResourceCache,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &mut RenderTaskGraph,
+ profile_counters: &mut FrameProfileCounters,
+ global_device_pixel_scale: DevicePixelScale,
+ scene_properties: &SceneProperties,
+ transform_palette: &mut TransformPalette,
+ data_stores: &mut DataStores,
+ surfaces: &mut Vec<SurfaceInfo>,
+ scratch: &mut PrimitiveScratchBuffer,
+ debug_flags: DebugFlags,
+ texture_cache_profile: &mut TextureCacheProfileCounters,
+ composite_state: &mut CompositeState,
+ tile_cache_logger: &mut TileCacheLogger,
+ ) -> Option<RenderTaskId> {
+ profile_scope!("build_layer_screen_rects_and_cull_layers");
+
+ if scene.prim_store.pictures.is_empty() {
+ return None
+ }
+
+ scratch.begin_frame();
+
+ let root_spatial_node_index = scene.spatial_tree.root_reference_frame_index();
+
+ const MAX_CLIP_COORD: f32 = 1.0e9;
+
+ let frame_context = FrameBuildingContext {
+ global_device_pixel_scale,
+ scene_properties,
+ global_screen_world_rect,
+ spatial_tree: &scene.spatial_tree,
+ max_local_clip: LayoutRect::new(
+ LayoutPoint::new(-MAX_CLIP_COORD, -MAX_CLIP_COORD),
+ LayoutSize::new(2.0 * MAX_CLIP_COORD, 2.0 * MAX_CLIP_COORD),
+ ),
+ debug_flags,
+ fb_config: &scene.config,
+ };
+
+ let root_render_task_id = render_tasks.add().init(
+ RenderTask::new_picture(
+ RenderTaskLocation::Fixed(scene.output_rect),
+ scene.output_rect.size.to_f32(),
+ scene.root_pic_index,
+ DeviceIntPoint::zero(),
+ UvRectKind::Rect,
+ ROOT_SPATIAL_NODE_INDEX,
+ global_device_pixel_scale,
+ PrimitiveVisibilityMask::all(),
+ None,
+ None,
+ )
+ );
+
+ // Construct a dummy root surface, that represents the
+ // main framebuffer surface.
+ let root_surface = SurfaceInfo::new(
+ ROOT_SPATIAL_NODE_INDEX,
+ ROOT_SPATIAL_NODE_INDEX,
+ 0.0,
+ global_screen_world_rect,
+ &scene.spatial_tree,
+ global_device_pixel_scale,
+ (1.0, 1.0),
+ );
+ surfaces.push(root_surface);
+
+ let mut retained_tiles = mem::replace(
+ &mut self.pending_retained_tiles,
+ RetainedTiles::new(),
+ );
+
+ // The first major pass of building a frame is to walk the picture
+ // tree. This pass must be quick (it should never touch individual
+ // primitives). For now, all we do here is determine which pictures
+ // will create surfaces. In the future, this will be expanded to
+ // set up render tasks, determine scaling of surfaces, and detect
+ // which surfaces have valid cached surfaces that don't need to
+ // be rendered this frame.
+ PictureUpdateState::update_all(
+ surfaces,
+ scene.root_pic_index,
+ &mut scene.prim_store.pictures,
+ &frame_context,
+ gpu_cache,
+ &scene.clip_store,
+ data_stores,
+ composite_state,
+ );
+
+ {
+ profile_scope!("UpdateVisibility");
+ profile_marker!("UpdateVisibility");
+
+ let visibility_context = FrameVisibilityContext {
+ global_device_pixel_scale,
+ spatial_tree: &scene.spatial_tree,
+ global_screen_world_rect,
+ surfaces,
+ debug_flags,
+ scene_properties,
+ config: scene.config,
+ };
+
+ let mut visibility_state = FrameVisibilityState {
+ resource_cache,
+ gpu_cache,
+ clip_store: &mut scene.clip_store,
+ scratch,
+ tile_cache: None,
+ retained_tiles: &mut retained_tiles,
+ data_stores,
+ clip_chain_stack: ClipChainStack::new(),
+ render_tasks,
+ composite_state,
+ /// Try to avoid allocating during frame traversal - it's unlikely to have a
+ /// surface stack depth of > 16 in most cases.
+ surface_stack: Vec::with_capacity(16),
+ };
+
+ scene.prim_store.update_visibility(
+ scene.root_pic_index,
+ ROOT_SURFACE_INDEX,
+ &global_screen_world_rect,
+ &visibility_context,
+ &mut visibility_state,
+ );
+
+ // When there are tiles that are left remaining in the `retained_tiles`,
+ // dirty rects are not valid.
+ if !visibility_state.retained_tiles.caches.is_empty() {
+ visibility_state.composite_state.dirty_rects_are_valid = false;
+ }
+
+ // When a new display list is processed by WR, the existing tiles from
+ // any picture cache are stored in the `retained_tiles` field above. This
+ // allows the first frame of a new display list to reuse any existing tiles
+ // and surfaces that match. Once the `update_visibility` call above is
+ // complete, any tiles that are left remaining in the `retained_tiles`
+ // map are not needed and will be dropped. For simple compositing mode,
+ // this is fine, since texture cache handles are garbage collected at
+ // the end of each frame. However, if we're in native compositor mode,
+ // we need to manually clean up any native compositor surfaces that were
+ // allocated by these tiles.
+ for (_, mut cache_state) in visibility_state.retained_tiles.caches.drain() {
+ if let Some(native_surface) = cache_state.native_surface.take() {
+ visibility_state.resource_cache.destroy_compositor_surface(native_surface.opaque);
+ visibility_state.resource_cache.destroy_compositor_surface(native_surface.alpha);
+ }
+
+ for (_, external_surface) in cache_state.external_native_surface_cache.drain() {
+ visibility_state.resource_cache.destroy_compositor_surface(external_surface.native_surface_id)
+ }
+ }
+ }
+
+ let mut frame_state = FrameBuildingState {
+ render_tasks,
+ profile_counters,
+ clip_store: &mut scene.clip_store,
+ resource_cache,
+ gpu_cache,
+ transforms: transform_palette,
+ segment_builder: SegmentBuilder::new(),
+ surfaces,
+ dirty_region_stack: Vec::new(),
+ composite_state,
+ };
+
+ frame_state
+ .surfaces
+ .first_mut()
+ .unwrap()
+ .render_tasks = Some(SurfaceRenderTasks {
+ root: root_render_task_id,
+ port: root_render_task_id,
+ });
+
+ // Push a default dirty region which culls primitives
+ // against the screen world rect, in absence of any
+ // other dirty regions.
+ let mut default_dirty_region = DirtyRegion::new();
+ default_dirty_region.push(
+ frame_context.global_screen_world_rect,
+ PrimitiveVisibilityMask::all(),
+ );
+ frame_state.push_dirty_region(default_dirty_region);
+
+ let (pic_context, mut pic_state, mut prim_list) = scene
+ .prim_store
+ .pictures[scene.root_pic_index.0]
+ .take_context(
+ scene.root_pic_index,
+ WorldRect::max_rect(),
+ root_spatial_node_index,
+ root_spatial_node_index,
+ ROOT_SURFACE_INDEX,
+ &SubpixelMode::Allow,
+ &mut frame_state,
+ &frame_context,
+ scratch,
+ tile_cache_logger
+ )
+ .unwrap();
+
+ tile_cache_logger.advance();
+
+ {
+ profile_marker!("PreparePrims");
+
+ scene.prim_store.prepare_primitives(
+ &mut prim_list,
+ &pic_context,
+ &mut pic_state,
+ &frame_context,
+ &mut frame_state,
+ data_stores,
+ scratch,
+ tile_cache_logger,
+ );
+ }
+
+ let pic = &mut scene.prim_store.pictures[scene.root_pic_index.0];
+ pic.restore_context(
+ ROOT_SURFACE_INDEX,
+ prim_list,
+ pic_context,
+ pic_state,
+ &mut frame_state,
+ );
+
+ frame_state.pop_dirty_region();
+
+ {
+ profile_marker!("BlockOnResources");
+
+ resource_cache.block_until_all_resources_added(gpu_cache,
+ render_tasks,
+ texture_cache_profile);
+ }
+
+ Some(root_render_task_id)
+ }
+
+ pub fn build(
+ &mut self,
+ scene: &mut BuiltScene,
+ resource_cache: &mut ResourceCache,
+ gpu_cache: &mut GpuCache,
+ stamp: FrameStamp,
+ global_device_pixel_scale: DevicePixelScale,
+ layer: DocumentLayer,
+ device_origin: DeviceIntPoint,
+ pan: WorldPoint,
+ resource_profile: &mut ResourceProfileCounters,
+ scene_properties: &SceneProperties,
+ data_stores: &mut DataStores,
+ scratch: &mut PrimitiveScratchBuffer,
+ render_task_counters: &mut RenderTaskGraphCounters,
+ debug_flags: DebugFlags,
+ tile_cache_logger: &mut TileCacheLogger,
+ ) -> Frame {
+ profile_scope!("build");
+ profile_marker!("BuildFrame");
+
+ let mut profile_counters = FrameProfileCounters::new();
+ profile_counters
+ .total_primitives
+ .set(scene.prim_store.prim_count());
+ resource_profile.content_slices.set(scene.content_slice_count);
+ resource_cache.begin_frame(stamp);
+ gpu_cache.begin_frame(stamp);
+
+ self.globals.update(gpu_cache);
+
+ scene.spatial_tree.update_tree(
+ pan,
+ global_device_pixel_scale,
+ scene_properties,
+ );
+ let mut transform_palette = scene.spatial_tree.build_transform_palette();
+ scene.clip_store.clear_old_instances();
+
+ let mut render_tasks = RenderTaskGraph::new(
+ stamp.frame_id(),
+ render_task_counters,
+ );
+ let mut surfaces = Vec::new();
+
+ let output_size = scene.output_rect.size.to_i32();
+ let screen_world_rect = (scene.output_rect.to_f32() / global_device_pixel_scale).round_out();
+
+ // Determine if we will draw this frame with picture caching enabled. This depends on:
+ // (1) If globally enabled when WR was initialized
+ // (2) If current debug flags allow picture caching
+ // (3) Whether we are currently pinch zooming
+ // (4) If any picture cache spatial nodes are not in the root coordinate system
+ let picture_caching_is_enabled =
+ scene.config.global_enable_picture_caching &&
+ !debug_flags.contains(DebugFlags::DISABLE_PICTURE_CACHING) &&
+ !scene.picture_cache_spatial_nodes.iter().any(|spatial_node_index| {
+ let spatial_node = &scene
+ .spatial_tree
+ .spatial_nodes[spatial_node_index.0 as usize];
+ spatial_node.is_ancestor_or_self_zooming
+ });
+
+ let mut composite_state = CompositeState::new(
+ scene.config.compositor_kind,
+ picture_caching_is_enabled,
+ global_device_pixel_scale,
+ scene.config.max_depth_ids,
+ );
+
+ let main_render_task_id = self.build_layer_screen_rects_and_cull_layers(
+ scene,
+ screen_world_rect,
+ resource_cache,
+ gpu_cache,
+ &mut render_tasks,
+ &mut profile_counters,
+ global_device_pixel_scale,
+ scene_properties,
+ &mut transform_palette,
+ data_stores,
+ &mut surfaces,
+ scratch,
+ debug_flags,
+ &mut resource_profile.texture_cache,
+ &mut composite_state,
+ tile_cache_logger,
+ );
+
+ let mut passes;
+ let mut deferred_resolves = vec![];
+ let mut has_texture_cache_tasks = false;
+ let mut prim_headers = PrimitiveHeaders::new();
+
+ {
+ profile_marker!("Batching");
+
+ passes = render_tasks.generate_passes(
+ main_render_task_id,
+ output_size,
+ scene.config.gpu_supports_fast_clears,
+ );
+
+ // Used to generated a unique z-buffer value per primitive.
+ let mut z_generator = ZBufferIdGenerator::new(layer, scene.config.max_depth_ids);
+ let use_dual_source_blending = scene.config.dual_source_blending_is_enabled &&
+ scene.config.dual_source_blending_is_supported;
+
+ for pass in &mut passes {
+ let mut ctx = RenderTargetContext {
+ global_device_pixel_scale,
+ prim_store: &scene.prim_store,
+ resource_cache,
+ use_dual_source_blending,
+ use_advanced_blending: scene.config.gpu_supports_advanced_blend,
+ break_advanced_blend_batches: !scene.config.advanced_blend_is_coherent,
+ batch_lookback_count: scene.config.batch_lookback_count,
+ spatial_tree: &scene.spatial_tree,
+ data_stores,
+ surfaces: &surfaces,
+ scratch,
+ screen_world_rect,
+ globals: &self.globals,
+ };
+
+ build_render_pass(
+ pass,
+ &mut ctx,
+ gpu_cache,
+ &mut render_tasks,
+ &mut deferred_resolves,
+ &scene.clip_store,
+ &mut transform_palette,
+ &mut prim_headers,
+ &mut z_generator,
+ &mut composite_state,
+ );
+
+ match pass.kind {
+ RenderPassKind::MainFramebuffer { .. } => {}
+ RenderPassKind::OffScreen {
+ ref texture_cache,
+ ref picture_cache,
+ ..
+ } => {
+ has_texture_cache_tasks |= !texture_cache.is_empty();
+ has_texture_cache_tasks |= !picture_cache.is_empty();
+ }
+ }
+ }
+ }
+
+ let gpu_cache_frame_id = gpu_cache.end_frame(&mut resource_profile.gpu_cache).frame_id();
+
+ render_tasks.write_task_data();
+ *render_task_counters = render_tasks.counters();
+ resource_cache.end_frame(&mut resource_profile.texture_cache);
+
+ Frame {
+ content_origin: scene.output_rect.origin,
+ device_rect: DeviceIntRect::new(
+ device_origin,
+ scene.output_rect.size,
+ ),
+ layer,
+ profile_counters,
+ passes,
+ transform_palette: transform_palette.finish(),
+ render_tasks,
+ deferred_resolves,
+ gpu_cache_frame_id,
+ has_been_rendered: false,
+ has_texture_cache_tasks,
+ prim_headers,
+ recorded_dirty_regions: mem::replace(&mut scratch.recorded_dirty_regions, Vec::new()),
+ debug_items: mem::replace(&mut scratch.debug_items, Vec::new()),
+ composite_state,
+ }
+ }
+}
+
+/// Processes this pass to prepare it for rendering.
+///
+/// Among other things, this allocates output regions for each of our tasks
+/// (added via `add_render_task`) in a RenderTarget and assigns it into that
+/// target.
+pub fn build_render_pass(
+ pass: &mut RenderPass,
+ ctx: &mut RenderTargetContext,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &mut RenderTaskGraph,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+ clip_store: &ClipStore,
+ transforms: &mut TransformPalette,
+ prim_headers: &mut PrimitiveHeaders,
+ z_generator: &mut ZBufferIdGenerator,
+ composite_state: &mut CompositeState,
+) {
+ profile_scope!("build_render_pass");
+
+ match pass.kind {
+ RenderPassKind::MainFramebuffer { ref mut main_target, .. } => {
+ profile_scope!("MainFrameBuffer");
+ for &task_id in &pass.tasks {
+ profile_scope!("task");
+ assert_eq!(render_tasks[task_id].target_kind(), RenderTargetKind::Color);
+ main_target.add_task(
+ task_id,
+ ctx,
+ gpu_cache,
+ render_tasks,
+ clip_store,
+ transforms,
+ deferred_resolves,
+ );
+ }
+ main_target.build(
+ ctx,
+ gpu_cache,
+ render_tasks,
+ deferred_resolves,
+ prim_headers,
+ transforms,
+ z_generator,
+ composite_state,
+ );
+ }
+ RenderPassKind::OffScreen {
+ ref mut color,
+ ref mut alpha,
+ ref mut texture_cache,
+ ref mut picture_cache,
+ } => {
+ profile_scope!("OffScreen");
+ let saved_color = if pass.tasks.iter().any(|&task_id| {
+ let t = &render_tasks[task_id];
+ t.target_kind() == RenderTargetKind::Color && t.saved_index.is_some()
+ }) {
+ Some(render_tasks.save_target())
+ } else {
+ None
+ };
+ let saved_alpha = if pass.tasks.iter().any(|&task_id| {
+ let t = &render_tasks[task_id];
+ t.target_kind() == RenderTargetKind::Alpha && t.saved_index.is_some()
+ }) {
+ Some(render_tasks.save_target())
+ } else {
+ None
+ };
+
+ // Collect a list of picture cache tasks, keyed by picture index.
+ // This allows us to only walk that picture root once, adding the
+ // primitives to all relevant batches at the same time.
+ let mut picture_cache_tasks = FastHashMap::default();
+
+ // Step through each task, adding to batches as appropriate.
+ for &task_id in &pass.tasks {
+ let (target_kind, texture_target, layer) = {
+ let task = &mut render_tasks[task_id];
+ let target_kind = task.target_kind();
+
+ // Find a target to assign this task to, or create a new
+ // one if required.
+ let (texture_target, layer) = match task.location {
+ RenderTaskLocation::TextureCache { texture, layer, .. } => {
+ (Some(texture), layer)
+ }
+ RenderTaskLocation::Fixed(..) => {
+ (None, 0)
+ }
+ RenderTaskLocation::Dynamic(ref mut origin, size) => {
+ let (target_index, alloc_origin) = match target_kind {
+ RenderTargetKind::Color => color.allocate(size),
+ RenderTargetKind::Alpha => alpha.allocate(size),
+ };
+ *origin = Some((alloc_origin, target_index));
+ (None, target_index.0)
+ }
+ RenderTaskLocation::PictureCache { .. } => {
+ // For picture cache tiles, just store them in the map
+ // of picture cache tasks, to be handled below.
+ let pic_index = match task.kind {
+ RenderTaskKind::Picture(ref info) => {
+ info.pic_index
+ }
+ _ => {
+ unreachable!();
+ }
+ };
+
+ picture_cache_tasks
+ .entry(pic_index)
+ .or_insert_with(Vec::new)
+ .push(task_id);
+
+ continue;
+ }
+ };
+
+ // Replace the pending saved index with a real one
+ if let Some(index) = task.saved_index {
+ assert_eq!(index, SavedTargetIndex::PENDING);
+ task.saved_index = match target_kind {
+ RenderTargetKind::Color => saved_color,
+ RenderTargetKind::Alpha => saved_alpha,
+ };
+ }
+
+ // Give the render task an opportunity to add any
+ // information to the GPU cache, if appropriate.
+ task.write_gpu_blocks(gpu_cache);
+
+ (target_kind, texture_target, layer)
+ };
+
+ match texture_target {
+ Some(texture_target) => {
+ let texture = texture_cache
+ .entry((texture_target, layer))
+ .or_insert_with(||
+ TextureCacheRenderTarget::new(target_kind)
+ );
+ texture.add_task(task_id, render_tasks);
+ }
+ None => {
+ match target_kind {
+ RenderTargetKind::Color => {
+ color.targets[layer].add_task(
+ task_id,
+ ctx,
+ gpu_cache,
+ render_tasks,
+ clip_store,
+ transforms,
+ deferred_resolves,
+ )
+ }
+ RenderTargetKind::Alpha => {
+ alpha.targets[layer].add_task(
+ task_id,
+ ctx,
+ gpu_cache,
+ render_tasks,
+ clip_store,
+ transforms,
+ deferred_resolves,
+ )
+ }
+ }
+ }
+ }
+ }
+
+ // For each picture in this pass that has picture cache tiles, create
+ // a batcher per task, and then build batches for each of the tasks
+ // at the same time.
+ for (pic_index, task_ids) in picture_cache_tasks {
+ profile_scope!("picture_cache_task");
+ let pic = &ctx.prim_store.pictures[pic_index.0];
+ let tile_cache = pic.tile_cache.as_ref().expect("bug");
+
+ // Extract raster/surface spatial nodes for this surface.
+ let (root_spatial_node_index, surface_spatial_node_index) = match pic.raster_config {
+ Some(ref rc) => {
+ let surface = &ctx.surfaces[rc.surface_index.0];
+ (surface.raster_spatial_node_index, surface.surface_spatial_node_index)
+ }
+ None => {
+ unreachable!();
+ }
+ };
+
+ // Determine the clear color for this picture cache.
+ // If the entire tile cache is opaque, we can skip clear completely.
+ // If it's the first layer, clear it to white to allow subpixel AA on that
+ // first layer even if it's technically transparent.
+ // Otherwise, clear to transparent and composite with alpha.
+ // TODO(gw): We can detect per-tile opacity for the clear color here
+ // which might be a significant win on some pages?
+ let forced_opaque = match tile_cache.background_color {
+ Some(color) => color.a >= 1.0,
+ None => false,
+ };
+ let mut clear_color = if forced_opaque {
+ Some(ColorF::WHITE)
+ } else {
+ Some(ColorF::TRANSPARENT)
+ };
+
+ // If this picture cache has a valid color backdrop, we will use
+ // that as the clear color, skipping the draw of the backdrop
+ // primitive (and anything prior to it) during batching.
+ if let Some(BackdropKind::Color { color }) = tile_cache.backdrop.kind {
+ clear_color = Some(color);
+ }
+
+ // Create an alpha batcher for each of the tasks of this picture.
+ let mut batchers = Vec::new();
+ for task_id in &task_ids {
+ let task_id = *task_id;
+ let vis_mask = match render_tasks[task_id].kind {
+ RenderTaskKind::Picture(ref info) => info.vis_mask,
+ _ => unreachable!(),
+ };
+ batchers.push(AlphaBatchBuilder::new(
+ pass.screen_size,
+ ctx.break_advanced_blend_batches,
+ ctx.batch_lookback_count,
+ task_id,
+ render_tasks.get_task_address(task_id),
+ vis_mask,
+ ));
+ }
+
+ // Run the batch creation code for this picture, adding items to
+ // all relevant per-task batchers.
+ let mut batch_builder = BatchBuilder::new(batchers);
+ {
+ profile_scope!("add_pic_to_batch");
+ batch_builder.add_pic_to_batch(
+ pic,
+ ctx,
+ gpu_cache,
+ render_tasks,
+ deferred_resolves,
+ prim_headers,
+ transforms,
+ root_spatial_node_index,
+ surface_spatial_node_index,
+ z_generator,
+ composite_state,
+ );
+ }
+
+ // Create picture cache targets, one per render task, and assign
+ // the correct batcher to them.
+ let batchers = batch_builder.finalize();
+ for (task_id, batcher) in task_ids.into_iter().zip(batchers.into_iter()) {
+ profile_scope!("task");
+ let task = &render_tasks[task_id];
+ let (target_rect, _) = task.get_target_rect();
+
+ match task.location {
+ RenderTaskLocation::PictureCache { ref surface, .. } => {
+ // TODO(gw): The interface here is a bit untidy since it's
+ // designed to support batch merging, which isn't
+ // relevant for picture cache targets. We
+ // can restructure / tidy this up a bit.
+ let (scissor_rect, valid_rect) = match render_tasks[task_id].kind {
+ RenderTaskKind::Picture(ref info) => {
+ (
+ info.scissor_rect.expect("bug: must be set for cache tasks"),
+ info.valid_rect.expect("bug: must be set for cache tasks"),
+ )
+ }
+ _ => unreachable!(),
+ };
+ let mut batch_containers = Vec::new();
+ let mut alpha_batch_container = AlphaBatchContainer::new(Some(scissor_rect));
+ batcher.build(
+ &mut batch_containers,
+ &mut alpha_batch_container,
+ target_rect,
+ None,
+ );
+ debug_assert!(batch_containers.is_empty());
+
+ let target = PictureCacheTarget {
+ surface: surface.clone(),
+ clear_color,
+ alpha_batch_container,
+ dirty_rect: scissor_rect,
+ valid_rect,
+ };
+
+ picture_cache.push(target);
+ }
+ _ => {
+ unreachable!()
+ }
+ }
+ }
+ }
+
+ color.build(
+ ctx,
+ gpu_cache,
+ render_tasks,
+ deferred_resolves,
+ saved_color,
+ prim_headers,
+ transforms,
+ z_generator,
+ composite_state,
+ );
+ alpha.build(
+ ctx,
+ gpu_cache,
+ render_tasks,
+ deferred_resolves,
+ saved_alpha,
+ prim_headers,
+ transforms,
+ z_generator,
+ composite_state,
+ );
+ }
+ }
+}
+
+/// A rendering-oriented representation of the frame built by the render backend
+/// and presented to the renderer.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct Frame {
+ /// The origin on content produced by the render tasks.
+ pub content_origin: DeviceIntPoint,
+ /// The rectangle to show the frame in, on screen.
+ pub device_rect: DeviceIntRect,
+ pub layer: DocumentLayer,
+ pub passes: Vec<RenderPass>,
+ #[cfg_attr(any(feature = "capture", feature = "replay"), serde(default = "FrameProfileCounters::new", skip))]
+ pub profile_counters: FrameProfileCounters,
+
+ pub transform_palette: Vec<TransformData>,
+ pub render_tasks: RenderTaskGraph,
+ pub prim_headers: PrimitiveHeaders,
+
+ /// The GPU cache frame that the contents of Self depend on
+ pub gpu_cache_frame_id: FrameId,
+
+ /// List of textures that we don't know about yet
+ /// from the backend thread. The render thread
+ /// will use a callback to resolve these and
+ /// patch the data structures.
+ pub deferred_resolves: Vec<DeferredResolve>,
+
+ /// True if this frame contains any render tasks
+ /// that write to the texture cache.
+ pub has_texture_cache_tasks: bool,
+
+ /// True if this frame has been drawn by the
+ /// renderer.
+ pub has_been_rendered: bool,
+
+ /// Dirty regions recorded when generating this frame. Empty when not in
+ /// testing.
+ #[cfg_attr(feature = "serde", serde(skip))]
+ pub recorded_dirty_regions: Vec<RecordedDirtyRegion>,
+
+ /// Debugging information to overlay for this frame.
+ pub debug_items: Vec<DebugItem>,
+
+ /// Contains picture cache tiles, and associated information.
+ /// Used by the renderer to composite tiles into the framebuffer,
+ /// or hand them off to an OS compositor.
+ pub composite_state: CompositeState,
+}
+
+impl Frame {
+ // This frame must be flushed if it writes to the
+ // texture cache, and hasn't been drawn yet.
+ pub fn must_be_drawn(&self) -> bool {
+ self.has_texture_cache_tasks && !self.has_been_rendered
+ }
+
+ // Returns true if this frame doesn't alter what is on screen currently.
+ pub fn is_nop(&self) -> bool {
+ // If picture caching is disabled, we don't have enough information
+ // to know if this frame is a nop, so it gets drawn unconditionally.
+ if !self.composite_state.picture_caching_is_enabled {
+ return false;
+ }
+
+ // When picture caching is enabled, the first (main framebuffer) pass
+ // consists of compositing tiles only (whether via the simple compositor
+ // or the native OS compositor). If there are no other passes, that
+ // implies that none of the picture cache tiles were updated, and thus
+ // the frame content must be exactly the same as last frame. If this is
+ // true, drawing this frame is a no-op and can be skipped.
+
+ if self.passes.len() > 1 {
+ return false;
+ }
+
+ true
+ }
+}
diff --git a/third_party/webrender/webrender/src/freelist.rs b/third_party/webrender/webrender/src/freelist.rs
new file mode 100644
index 00000000000..5ca196191cc
--- /dev/null
+++ b/third_party/webrender/webrender/src/freelist.rs
@@ -0,0 +1,263 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! A generic backing store for caches.
+//!
+//! `FreeList` is a simple vector-backed data structure where each entry in the
+//! vector contains an Option<T>. It maintains an index-based (rather than
+//! pointer-based) free list to efficiently locate the next unused entry. If all
+//! entries are occupied, insertion appends a new element to the vector.
+//!
+//! It also supports both strong and weak handle semantics. There is exactly one
+//! (non-Clonable) strong handle per occupied entry, which must be passed by
+//! value into `free()` to release an entry. Strong handles can produce an
+//! unlimited number of (Clonable) weak handles, which are used to perform
+//! lookups which may fail of the entry has been freed. A per-entry epoch ensures
+//! that weak handle lookups properly fail even if the entry has been freed and
+//! reused.
+//!
+//! TODO(gw): Add an occupied list head, for fast iteration of the occupied list
+//! to implement retain() style functionality.
+
+use std::{fmt, u32};
+use std::marker::PhantomData;
+
+#[derive(Debug, Copy, Clone, MallocSizeOf, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct Epoch(u32);
+
+impl Epoch {
+ /// Mints a new epoch.
+ ///
+ /// We start at 1 so that 0 is always an invalid epoch.
+ fn new() -> Self {
+ Epoch(1)
+ }
+
+ /// Returns an always-invalid epoch.
+ fn invalid() -> Self {
+ Epoch(0)
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct FreeListHandle<M> {
+ index: u32,
+ epoch: Epoch,
+ _marker: PhantomData<M>,
+}
+
+/// More-compact textual representation for debug logging.
+impl<M> fmt::Debug for FreeListHandle<M> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ f.debug_struct("StrongHandle")
+ .field("index", &self.index)
+ .field("epoch", &self.epoch.0)
+ .finish()
+ }
+}
+
+impl<M> FreeListHandle<M> {
+ pub fn weak(&self) -> WeakFreeListHandle<M> {
+ WeakFreeListHandle {
+ index: self.index,
+ epoch: self.epoch,
+ _marker: PhantomData,
+ }
+ }
+
+ pub fn invalid() -> Self {
+ Self {
+ index: 0,
+ epoch: Epoch::invalid(),
+ _marker: PhantomData,
+ }
+ }
+
+ /// Returns true if this handle and the supplied weak handle reference
+ /// the same underlying location in the freelist.
+ pub fn matches(&self, weak_handle: &WeakFreeListHandle<M>) -> bool {
+ self.index == weak_handle.index &&
+ self.epoch == weak_handle.epoch
+ }
+}
+
+impl<M> Clone for WeakFreeListHandle<M> {
+ fn clone(&self) -> Self {
+ WeakFreeListHandle {
+ index: self.index,
+ epoch: self.epoch,
+ _marker: PhantomData,
+ }
+ }
+}
+
+impl<M> PartialEq for WeakFreeListHandle<M> {
+ fn eq(&self, other: &Self) -> bool {
+ self.index == other.index && self.epoch == other.epoch
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct WeakFreeListHandle<M> {
+ index: u32,
+ epoch: Epoch,
+ _marker: PhantomData<M>,
+}
+
+/// More-compact textual representation for debug logging.
+impl<M> fmt::Debug for WeakFreeListHandle<M> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ f.debug_struct("WeakHandle")
+ .field("index", &self.index)
+ .field("epoch", &self.epoch.0)
+ .finish()
+ }
+}
+
+impl<M> WeakFreeListHandle<M> {
+ /// Returns an always-invalid handle.
+ pub fn invalid() -> Self {
+ Self {
+ index: 0,
+ epoch: Epoch::invalid(),
+ _marker: PhantomData,
+ }
+ }
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct Slot<T> {
+ next: Option<u32>,
+ epoch: Epoch,
+ value: Option<T>,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct FreeList<T, M> {
+ slots: Vec<Slot<T>>,
+ free_list_head: Option<u32>,
+ active_count: usize,
+ _marker: PhantomData<M>,
+}
+
+impl<T, M> FreeList<T, M> {
+ /// Mints a new `FreeList` with no entries.
+ ///
+ /// Triggers a 1-entry allocation.
+ pub fn new() -> Self {
+ // We guarantee that we never have zero entries by starting with one
+ // free entry. This allows WeakFreeListHandle::invalid() to work
+ // without adding any additional branches.
+ let first_slot = Slot {
+ next: None,
+ epoch: Epoch::new(),
+ value: None,
+ };
+ FreeList {
+ slots: vec![first_slot],
+ free_list_head: Some(0),
+ active_count: 0,
+ _marker: PhantomData,
+ }
+ }
+
+ pub fn clear(&mut self) {
+ self.slots.truncate(1);
+ self.slots[0] = Slot {
+ next: None,
+ epoch: Epoch::new(),
+ value: None,
+ };
+ self.free_list_head = Some(0);
+ self.active_count = 0;
+ }
+
+ #[allow(dead_code)]
+ pub fn get(&self, id: &FreeListHandle<M>) -> &T {
+ self.slots[id.index as usize].value.as_ref().unwrap()
+ }
+
+ #[allow(dead_code)]
+ pub fn get_mut(&mut self, id: &FreeListHandle<M>) -> &mut T {
+ self.slots[id.index as usize].value.as_mut().unwrap()
+ }
+
+ pub fn get_opt(&self, id: &WeakFreeListHandle<M>) -> Option<&T> {
+ let slot = &self.slots[id.index as usize];
+ if slot.epoch == id.epoch {
+ slot.value.as_ref()
+ } else {
+ None
+ }
+ }
+
+ pub fn get_opt_mut(&mut self, id: &WeakFreeListHandle<M>) -> Option<&mut T> {
+ let slot = &mut self.slots[id.index as usize];
+ if slot.epoch == id.epoch {
+ slot.value.as_mut()
+ } else {
+ None
+ }
+ }
+
+ pub fn insert(&mut self, item: T) -> FreeListHandle<M> {
+ self.active_count += 1;
+
+ match self.free_list_head {
+ Some(free_index) => {
+ let slot = &mut self.slots[free_index as usize];
+
+ // Remove from free list.
+ self.free_list_head = slot.next;
+ slot.next = None;
+ slot.value = Some(item);
+
+ FreeListHandle {
+ index: free_index,
+ epoch: slot.epoch,
+ _marker: PhantomData,
+ }
+ }
+ None => {
+ let index = self.slots.len() as u32;
+ let epoch = Epoch::new();
+
+ self.slots.push(Slot {
+ next: None,
+ epoch,
+ value: Some(item),
+ });
+
+ FreeListHandle {
+ index,
+ epoch,
+ _marker: PhantomData,
+ }
+ }
+ }
+ }
+
+ pub fn free(&mut self, id: FreeListHandle<M>) -> T {
+ self.active_count -= 1;
+ let slot = &mut self.slots[id.index as usize];
+ slot.next = self.free_list_head;
+ slot.epoch = Epoch(slot.epoch.0 + 1);
+ self.free_list_head = Some(id.index);
+ slot.value.take().unwrap()
+ }
+
+ #[allow(dead_code)]
+ pub fn len(&self) -> usize {
+ self.active_count
+ }
+}
diff --git a/third_party/webrender/webrender/src/gamma_lut.rs b/third_party/webrender/webrender/src/gamma_lut.rs
new file mode 100644
index 00000000000..b5df7029e60
--- /dev/null
+++ b/third_party/webrender/webrender/src/gamma_lut.rs
@@ -0,0 +1,414 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/*!
+Gamma correction lookup tables.
+
+This is a port of Skia gamma LUT logic into Rust, used by WebRender.
+*/
+//#![warn(missing_docs)] //TODO
+#![allow(dead_code)]
+
+use api::ColorU;
+use std::cmp::max;
+
+/// Color space responsible for converting between lumas and luminances.
+#[derive(Clone, Copy, Debug, PartialEq)]
+pub enum LuminanceColorSpace {
+ /// Linear space - no conversion involved.
+ Linear,
+ /// Simple gamma space - uses the `luminance ^ gamma` function.
+ Gamma(f32),
+ /// Srgb space.
+ Srgb,
+}
+
+impl LuminanceColorSpace {
+ pub fn new(gamma: f32) -> LuminanceColorSpace {
+ if gamma == 1.0 {
+ LuminanceColorSpace::Linear
+ } else if gamma == 0.0 {
+ LuminanceColorSpace::Srgb
+ } else {
+ LuminanceColorSpace::Gamma(gamma)
+ }
+ }
+
+ pub fn to_luma(&self, luminance: f32) -> f32 {
+ match *self {
+ LuminanceColorSpace::Linear => luminance,
+ LuminanceColorSpace::Gamma(gamma) => luminance.powf(gamma),
+ LuminanceColorSpace::Srgb => {
+ //The magic numbers are derived from the sRGB specification.
+ //See http://www.color.org/chardata/rgb/srgb.xalter .
+ if luminance <= 0.04045 {
+ luminance / 12.92
+ } else {
+ ((luminance + 0.055) / 1.055).powf(2.4)
+ }
+ }
+ }
+ }
+
+ pub fn from_luma(&self, luma: f32) -> f32 {
+ match *self {
+ LuminanceColorSpace::Linear => luma,
+ LuminanceColorSpace::Gamma(gamma) => luma.powf(1. / gamma),
+ LuminanceColorSpace::Srgb => {
+ //The magic numbers are derived from the sRGB specification.
+ //See http://www.color.org/chardata/rgb/srgb.xalter .
+ if luma <= 0.0031308 {
+ luma * 12.92
+ } else {
+ 1.055 * luma.powf(1./2.4) - 0.055
+ }
+ }
+ }
+ }
+}
+
+//TODO: tests
+fn round_to_u8(x : f32) -> u8 {
+ let v = (x + 0.5).floor() as i32;
+ assert!(0 <= v && v < 0x100);
+ v as u8
+}
+
+//TODO: tests
+/*
+ * Scales base <= 2^N-1 to 2^8-1
+ * @param N [1, 8] the number of bits used by base.
+ * @param base the number to be scaled to [0, 255].
+ */
+fn scale255(n: u8, mut base: u8) -> u8 {
+ base <<= 8 - n;
+ let mut lum = base;
+ let mut i = n;
+
+ while i < 8 {
+ lum |= base >> i;
+ i += n;
+ }
+
+ lum
+}
+
+// Computes the luminance from the given r, g, and b in accordance with
+// SK_LUM_COEFF_X. For correct results, r, g, and b should be in linear space.
+fn compute_luminance(r: u8, g: u8, b: u8) -> u8 {
+ // The following is
+ // r * SK_LUM_COEFF_R + g * SK_LUM_COEFF_G + b * SK_LUM_COEFF_B
+ // with SK_LUM_COEFF_X in 1.8 fixed point (rounding adjusted to sum to 256).
+ let val: u32 = r as u32 * 54 + g as u32 * 183 + b as u32 * 19;
+ assert!(val < 0x10000);
+ (val >> 8) as u8
+}
+
+// Skia uses 3 bits per channel for luminance.
+const LUM_BITS: u8 = 3;
+// Mask of the highest used bits.
+const LUM_MASK: u8 = ((1 << LUM_BITS) - 1) << (8 - LUM_BITS);
+
+pub trait ColorLut {
+ fn quantize(&self) -> ColorU;
+ fn quantized_floor(&self) -> ColorU;
+ fn quantized_ceil(&self) -> ColorU;
+ fn luminance(&self) -> u8;
+ fn luminance_color(&self) -> ColorU;
+}
+
+impl ColorLut for ColorU {
+ // Compute a canonical color that is equivalent to the input color
+ // for preblend table lookups. The alpha channel is never used for
+ // preblending, so overwrite it with opaque.
+ fn quantize(&self) -> ColorU {
+ ColorU::new(
+ scale255(LUM_BITS, self.r >> (8 - LUM_BITS)),
+ scale255(LUM_BITS, self.g >> (8 - LUM_BITS)),
+ scale255(LUM_BITS, self.b >> (8 - LUM_BITS)),
+ 255,
+ )
+ }
+
+ // Quantize to the smallest value that yields the same table index.
+ fn quantized_floor(&self) -> ColorU {
+ ColorU::new(
+ self.r & LUM_MASK,
+ self.g & LUM_MASK,
+ self.b & LUM_MASK,
+ 255,
+ )
+ }
+
+ // Quantize to the largest value that yields the same table index.
+ fn quantized_ceil(&self) -> ColorU {
+ ColorU::new(
+ self.r | !LUM_MASK,
+ self.g | !LUM_MASK,
+ self.b | !LUM_MASK,
+ 255,
+ )
+ }
+
+ // Compute a luminance value suitable for grayscale preblend table
+ // lookups.
+ fn luminance(&self) -> u8 {
+ compute_luminance(self.r, self.g, self.b)
+ }
+
+ // Make a grayscale color from the computed luminance.
+ fn luminance_color(&self) -> ColorU {
+ let lum = self.luminance();
+ ColorU::new(lum, lum, lum, self.a)
+ }
+}
+
+// This will invert the gamma applied by CoreGraphics,
+// so we can get linear values.
+// CoreGraphics obscurely defaults to 2.0 as the smoothing gamma value.
+// The color space used does not appear to affect this choice.
+#[cfg(target_os="macos")]
+fn get_inverse_gamma_table_coregraphics_smoothing() -> [u8; 256] {
+ let mut table = [0u8; 256];
+
+ for (i, v) in table.iter_mut().enumerate() {
+ let x = i as f32 / 255.0;
+ *v = round_to_u8(x * x * 255.0);
+ }
+
+ table
+}
+
+// A value of 0.5 for SK_GAMMA_CONTRAST appears to be a good compromise.
+// With lower values small text appears washed out (though correctly so).
+// With higher values lcd fringing is worse and the smoothing effect of
+// partial coverage is diminished.
+fn apply_contrast(srca: f32, contrast: f32) -> f32 {
+ srca + ((1.0 - srca) * contrast * srca)
+}
+
+// The approach here is not necessarily the one with the lowest error
+// See https://bel.fi/alankila/lcd/alpcor.html for a similar kind of thing
+// that just search for the adjusted alpha value
+pub fn build_gamma_correcting_lut(table: &mut [u8; 256], src: u8, contrast: f32,
+ src_space: LuminanceColorSpace,
+ dst_convert: LuminanceColorSpace) {
+
+ let src = src as f32 / 255.0;
+ let lin_src = src_space.to_luma(src);
+ // Guess at the dst. The perceptual inverse provides smaller visual
+ // discontinuities when slight changes to desaturated colors cause a channel
+ // to map to a different correcting lut with neighboring srcI.
+ // See https://code.google.com/p/chromium/issues/detail?id=141425#c59 .
+ let dst = 1.0 - src;
+ let lin_dst = dst_convert.to_luma(dst);
+
+ // Contrast value tapers off to 0 as the src luminance becomes white
+ let adjusted_contrast = contrast * lin_dst;
+
+ // Remove discontinuity and instability when src is close to dst.
+ // The value 1/256 is arbitrary and appears to contain the instability.
+ if (src - dst).abs() < (1.0 / 256.0) {
+ let mut ii : f32 = 0.0;
+ for v in table.iter_mut() {
+ let raw_srca = ii / 255.0;
+ let srca = apply_contrast(raw_srca, adjusted_contrast);
+
+ *v = round_to_u8(255.0 * srca);
+ ii += 1.0;
+ }
+ } else {
+ // Avoid slow int to float conversion.
+ let mut ii : f32 = 0.0;
+ for v in table.iter_mut() {
+ // 'raw_srca += 1.0f / 255.0f' and even
+ // 'raw_srca = i * (1.0f / 255.0f)' can add up to more than 1.0f.
+ // When this happens the table[255] == 0x0 instead of 0xff.
+ // See http://code.google.com/p/chromium/issues/detail?id=146466
+ let raw_srca = ii / 255.0;
+ let srca = apply_contrast(raw_srca, adjusted_contrast);
+ assert!(srca <= 1.0);
+ let dsta = 1.0 - srca;
+
+ // Calculate the output we want.
+ let lin_out = lin_src * srca + dsta * lin_dst;
+ assert!(lin_out <= 1.0);
+ let out = dst_convert.from_luma(lin_out);
+
+ // Undo what the blit blend will do.
+ // i.e. given the formula for OVER: out = src * result + (1 - result) * dst
+ // solving for result gives:
+ let result = (out - dst) / (src - dst);
+
+ *v = round_to_u8(255.0 * result);
+ debug!("Setting {:?} to {:?}", ii as u8, *v);
+
+ ii += 1.0;
+ }
+ }
+}
+
+pub struct GammaLut {
+ tables: [[u8; 256]; 1 << LUM_BITS],
+ #[cfg(target_os="macos")]
+ cg_inverse_gamma: [u8; 256],
+}
+
+impl GammaLut {
+ // Skia actually makes 9 gamma tables, then based on the luminance color,
+ // fetches the RGB gamma table for that color.
+ fn generate_tables(&mut self, contrast: f32, paint_gamma: f32, device_gamma: f32) {
+ let paint_color_space = LuminanceColorSpace::new(paint_gamma);
+ let device_color_space = LuminanceColorSpace::new(device_gamma);
+
+ for (i, entry) in self.tables.iter_mut().enumerate() {
+ let luminance = scale255(LUM_BITS, i as u8);
+ build_gamma_correcting_lut(entry,
+ luminance,
+ contrast,
+ paint_color_space,
+ device_color_space);
+ }
+ }
+
+ pub fn table_count(&self) -> usize {
+ self.tables.len()
+ }
+
+ pub fn get_table(&self, color: u8) -> &[u8; 256] {
+ &self.tables[(color >> (8 - LUM_BITS)) as usize]
+ }
+
+ pub fn new(contrast: f32, paint_gamma: f32, device_gamma: f32) -> GammaLut {
+ #[cfg(target_os="macos")]
+ let mut table = GammaLut {
+ tables: [[0; 256]; 1 << LUM_BITS],
+ cg_inverse_gamma: get_inverse_gamma_table_coregraphics_smoothing(),
+ };
+ #[cfg(not(target_os="macos"))]
+ let mut table = GammaLut {
+ tables: [[0; 256]; 1 << LUM_BITS],
+ };
+
+ table.generate_tables(contrast, paint_gamma, device_gamma);
+
+ table
+ }
+
+ // Assumes pixels are in BGRA format. Assumes pixel values are in linear space already.
+ pub fn preblend(&self, pixels: &mut [u8], color: ColorU) {
+ let table_r = self.get_table(color.r);
+ let table_g = self.get_table(color.g);
+ let table_b = self.get_table(color.b);
+
+ for pixel in pixels.chunks_mut(4) {
+ let (b, g, r) = (table_b[pixel[0] as usize], table_g[pixel[1] as usize], table_r[pixel[2] as usize]);
+ pixel[0] = b;
+ pixel[1] = g;
+ pixel[2] = r;
+ pixel[3] = max(max(b, g), r);
+ }
+ }
+
+ // Assumes pixels are in BGRA format. Assumes pixel values are in linear space already.
+ pub fn preblend_scaled(&self, pixels: &mut [u8], color: ColorU, percent: u8) {
+ if percent >= 100 {
+ self.preblend(pixels, color);
+ return;
+ }
+
+ let table_r = self.get_table(color.r);
+ let table_g = self.get_table(color.g);
+ let table_b = self.get_table(color.b);
+ let scale = (percent as i32 * 256) / 100;
+
+ for pixel in pixels.chunks_mut(4) {
+ let (mut b, g, mut r) = (
+ table_b[pixel[0] as usize] as i32,
+ table_g[pixel[1] as usize] as i32,
+ table_r[pixel[2] as usize] as i32,
+ );
+ b = g + (((b - g) * scale) >> 8);
+ r = g + (((r - g) * scale) >> 8);
+ pixel[0] = b as u8;
+ pixel[1] = g as u8;
+ pixel[2] = r as u8;
+ pixel[3] = max(max(b, g), r) as u8;
+ }
+ }
+
+ #[cfg(target_os="macos")]
+ pub fn coregraphics_convert_to_linear(&self, pixels: &mut [u8]) {
+ for pixel in pixels.chunks_mut(4) {
+ pixel[0] = self.cg_inverse_gamma[pixel[0] as usize];
+ pixel[1] = self.cg_inverse_gamma[pixel[1] as usize];
+ pixel[2] = self.cg_inverse_gamma[pixel[2] as usize];
+ }
+ }
+
+ // Assumes pixels are in BGRA format. Assumes pixel values are in linear space already.
+ pub fn preblend_grayscale(&self, pixels: &mut [u8], color: ColorU) {
+ let table_g = self.get_table(color.g);
+
+ for pixel in pixels.chunks_mut(4) {
+ let luminance = compute_luminance(pixel[2], pixel[1], pixel[0]);
+ let alpha = table_g[luminance as usize];
+ pixel[0] = alpha;
+ pixel[1] = alpha;
+ pixel[2] = alpha;
+ pixel[3] = alpha;
+ }
+ }
+
+} // end impl GammaLut
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ fn over(dst: u32, src: u32, alpha: u32) -> u32 {
+ (src * alpha + dst * (255 - alpha))/255
+ }
+
+ fn overf(dst: f32, src: f32, alpha: f32) -> f32 {
+ ((src * alpha + dst * (255. - alpha))/255.) as f32
+ }
+
+
+ fn absdiff(a: u32, b: u32) -> u32 {
+ if a < b { b - a } else { a - b }
+ }
+
+ #[test]
+ fn gamma() {
+ let mut table = [0u8; 256];
+ let g = 2.0;
+ let space = LuminanceColorSpace::Gamma(g);
+ let mut src : u32 = 131;
+ while src < 256 {
+ build_gamma_correcting_lut(&mut table, src as u8, 0., space, space);
+ let mut max_diff = 0;
+ let mut dst = 0;
+ while dst < 256 {
+ for alpha in 0u32..256 {
+ let preblend = table[alpha as usize];
+ let lin_dst = (dst as f32 / 255.).powf(g) * 255.;
+ let lin_src = (src as f32 / 255.).powf(g) * 255.;
+
+ let preblend_result = over(dst, src, preblend as u32);
+ let true_result = ((overf(lin_dst, lin_src, alpha as f32) / 255.).powf(1. / g) * 255.) as u32;
+ let diff = absdiff(preblend_result, true_result);
+ //println!("{} -- {} {} = {}", alpha, preblend_result, true_result, diff);
+ max_diff = max(max_diff, diff);
+ }
+
+ //println!("{} {} max {}", src, dst, max_diff);
+ assert!(max_diff <= 33);
+ dst += 1;
+
+ }
+ src += 1;
+ }
+ }
+} // end mod
diff --git a/third_party/webrender/webrender/src/glyph_cache.rs b/third_party/webrender/webrender/src/glyph_cache.rs
new file mode 100644
index 00000000000..b0b9ecf65c7
--- /dev/null
+++ b/third_party/webrender/webrender/src/glyph_cache.rs
@@ -0,0 +1,284 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use crate::glyph_rasterizer::{FontInstance, GlyphFormat, GlyphKey, GlyphRasterizer};
+use crate::internal_types::FastHashMap;
+use crate::render_backend::{FrameId, FrameStamp};
+use crate::render_task_cache::RenderTaskCache;
+use crate::resource_cache::ResourceClassCache;
+use std::sync::Arc;
+use crate::texture_cache::{EvictionNotice, TextureCache};
+use crate::texture_cache::TextureCacheHandle;
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Clone, Debug)]
+pub struct CachedGlyphInfo {
+ pub format: GlyphFormat,
+ pub texture_cache_handle: TextureCacheHandle,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum GlyphCacheEntry {
+ // A glyph that has been successfully rasterized.
+ Cached(CachedGlyphInfo),
+ // A glyph that should not be rasterized (i.e. a space).
+ Blank,
+ // A glyph that has been submitted to the font backend for rasterization,
+ // but is still pending a result.
+ #[allow(dead_code)]
+ Pending,
+}
+
+impl GlyphCacheEntry {
+ fn get_allocated_size(&self, texture_cache: &TextureCache, _: &RenderTaskCache)
+ -> Option<usize> {
+ match *self {
+ GlyphCacheEntry::Cached(ref glyph) => {
+ texture_cache.get_allocated_size(&glyph.texture_cache_handle)
+ }
+ GlyphCacheEntry::Pending | GlyphCacheEntry::Blank => Some(0),
+ }
+ }
+
+ fn is_recently_used(&self, texture_cache: &mut TextureCache) -> bool {
+ if let GlyphCacheEntry::Cached(ref glyph) = *self {
+ texture_cache.is_recently_used(&glyph.texture_cache_handle, 1)
+ } else {
+ false
+ }
+ }
+}
+
+#[allow(dead_code)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Clone)]
+pub enum CachedGlyphData {
+ Memory(Arc<Vec<u8>>),
+ Gpu,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Default)]
+pub struct GlyphKeyCacheInfo {
+ eviction_notice: EvictionNotice,
+ last_frame_used: FrameId,
+ bytes_used: usize,
+}
+
+pub type GlyphKeyCache = ResourceClassCache<GlyphKey, GlyphCacheEntry, GlyphKeyCacheInfo>;
+
+impl GlyphKeyCache {
+ const DIRTY: usize = !0;
+
+ pub fn eviction_notice(&self) -> &EvictionNotice {
+ &self.user_data.eviction_notice
+ }
+
+ fn is_recently_used(&self, current_frame: FrameId) -> bool {
+ self.user_data.last_frame_used + 1 >= current_frame
+ }
+
+ fn clear_glyphs(&mut self) -> usize {
+ let pruned = self.user_data.bytes_used;
+ self.clear();
+ self.user_data.bytes_used = 0;
+ pruned
+ }
+
+ fn prune_glyphs(
+ &mut self,
+ skip_recent: bool,
+ excess_bytes_used: usize,
+ texture_cache: &mut TextureCache,
+ render_task_cache: &RenderTaskCache,
+ ) -> usize {
+ let mut pruned = 0;
+ self.retain(|_, entry| {
+ if pruned <= excess_bytes_used &&
+ (!skip_recent || !entry.is_recently_used(texture_cache)) {
+ match entry.get_allocated_size(texture_cache, render_task_cache) {
+ Some(size) => {
+ pruned += size;
+ false
+ }
+ None => true,
+ }
+ } else {
+ true
+ }
+ });
+ self.user_data.bytes_used -= pruned;
+ pruned
+ }
+
+ pub fn add_glyph(&mut self, key: GlyphKey, value: GlyphCacheEntry) {
+ self.insert(key, value);
+ self.user_data.bytes_used = Self::DIRTY;
+ }
+
+ fn clear_evicted(
+ &mut self,
+ texture_cache: &TextureCache,
+ render_task_cache: &RenderTaskCache,
+ ) {
+ if self.eviction_notice().check() || self.user_data.bytes_used == Self::DIRTY {
+ // If there are evictions, filter out any glyphs evicted from the
+ // texture cache from the glyph key cache.
+ let mut usage = 0;
+ self.retain(|_, entry| {
+ let size = entry.get_allocated_size(texture_cache, render_task_cache);
+ usage += size.unwrap_or(0);
+ size.is_some()
+ });
+ self.user_data.bytes_used = usage;
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct GlyphCache {
+ glyph_key_caches: FastHashMap<FontInstance, GlyphKeyCache>,
+ current_frame: FrameId,
+ bytes_used: usize,
+ max_bytes_used: usize,
+}
+
+impl GlyphCache {
+ /// The default space usage threshold, in bytes, after which to start pruning away old fonts.
+ pub const DEFAULT_MAX_BYTES_USED: usize = 6 * 1024 * 1024;
+
+ pub fn new(max_bytes_used: usize) -> Self {
+ GlyphCache {
+ glyph_key_caches: FastHashMap::default(),
+ current_frame: Default::default(),
+ bytes_used: 0,
+ max_bytes_used,
+ }
+ }
+
+ pub fn get_glyph_key_cache_for_font_mut(&mut self, font: FontInstance) -> &mut GlyphKeyCache {
+ let cache = self.glyph_key_caches
+ .entry(font)
+ .or_insert_with(GlyphKeyCache::new);
+ cache.user_data.last_frame_used = self.current_frame;
+ cache
+ }
+
+ pub fn get_glyph_key_cache_for_font(&self, font: &FontInstance) -> &GlyphKeyCache {
+ self.glyph_key_caches
+ .get(font)
+ .expect("BUG: Unable to find glyph key cache!")
+ }
+
+ pub fn clear(&mut self) {
+ for (_, glyph_key_cache) in &mut self.glyph_key_caches {
+ glyph_key_cache.clear()
+ }
+ // We use this in on_memory_pressure where retaining memory allocations
+ // isn't desirable, so we completely remove the hash map instead of clearing it.
+ self.glyph_key_caches = FastHashMap::default();
+ }
+
+ pub fn clear_fonts<F>(&mut self, key_fun: F)
+ where
+ for<'r> F: Fn(&'r &FontInstance) -> bool,
+ {
+ self.glyph_key_caches.retain(|k, cache| {
+ let should_clear = key_fun(&k);
+ if !should_clear {
+ return true;
+ }
+
+ cache.clear_glyphs();
+ false
+ })
+ }
+
+ /// Clear out evicted entries from glyph key caches.
+ fn clear_evicted(
+ &mut self,
+ texture_cache: &TextureCache,
+ render_task_cache: &RenderTaskCache,
+ ) {
+ let mut usage = 0;
+ for cache in self.glyph_key_caches.values_mut() {
+ // Scan for any glyph key caches that have evictions.
+ cache.clear_evicted(texture_cache, render_task_cache);
+ usage += cache.user_data.bytes_used;
+ }
+ self.bytes_used = usage;
+ }
+
+ /// If possible, remove entirely any empty glyph key caches.
+ fn clear_empty_caches(&mut self, glyph_rasterizer: &mut GlyphRasterizer) {
+ self.glyph_key_caches.retain(|key, cache| {
+ // Discard the glyph key cache if it has no valid glyphs.
+ if cache.is_empty() {
+ glyph_rasterizer.delete_font_instance(key);
+ false
+ } else {
+ true
+ }
+ });
+ }
+
+ /// Check the total space usage of the glyph cache. If it exceeds the maximum usage threshold,
+ /// then start clearing the oldest glyphs until below the threshold.
+ fn prune_excess_usage(
+ &mut self,
+ texture_cache: &mut TextureCache,
+ render_task_cache: &RenderTaskCache,
+ ) {
+ if self.bytes_used < self.max_bytes_used {
+ return;
+ }
+ // Usage is above the threshold. Get a last-recently-used ordered list of caches to clear.
+ let mut caches: Vec<_> = self.glyph_key_caches.values_mut().collect();
+ caches.sort_unstable_by(|a, b| {
+ a.user_data.last_frame_used.cmp(&b.user_data.last_frame_used)
+ });
+ // Clear out the oldest caches until below the threshold.
+ for cache in caches {
+ if self.bytes_used < self.max_bytes_used {
+ break;
+ }
+ let recent = cache.is_recently_used(self.current_frame);
+ let excess = self.bytes_used - self.max_bytes_used;
+ if !recent && excess >= cache.user_data.bytes_used {
+ // If the excess is greater than the cache's size, just clear the whole thing.
+ self.bytes_used -= cache.clear_glyphs();
+ } else {
+ // Otherwise, just clear as little of the cache as needed to remove the excess
+ // and avoid rematerialization costs.
+ self.bytes_used -= cache.prune_glyphs(
+ recent,
+ excess,
+ texture_cache,
+ render_task_cache,
+ );
+ }
+ }
+ }
+
+ pub fn begin_frame(
+ &mut self,
+ stamp: FrameStamp,
+ texture_cache: &mut TextureCache,
+ render_task_cache: &RenderTaskCache,
+ glyph_rasterizer: &mut GlyphRasterizer,
+ ) {
+ profile_scope!("begin_frame");
+ self.current_frame = stamp.frame_id();
+ self.clear_evicted(texture_cache, render_task_cache);
+ self.prune_excess_usage(texture_cache, render_task_cache);
+ // Clearing evicted glyphs and pruning excess usage might have produced empty caches,
+ // so get rid of them if possible.
+ self.clear_empty_caches(glyph_rasterizer);
+ }
+}
diff --git a/third_party/webrender/webrender/src/glyph_rasterizer/mod.rs b/third_party/webrender/webrender/src/glyph_rasterizer/mod.rs
new file mode 100644
index 00000000000..0a60cc77d6c
--- /dev/null
+++ b/third_party/webrender/webrender/src/glyph_rasterizer/mod.rs
@@ -0,0 +1,1193 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{FontInstanceFlags, FontSize, BaseFontInstance};
+use api::{FontKey, FontRenderMode, FontTemplate};
+use api::{ColorU, GlyphIndex, GlyphDimensions, SyntheticItalics};
+use api::units::*;
+use api::{ImageDescriptor, ImageDescriptorFlags, ImageFormat, DirtyRect};
+use crate::internal_types::ResourceCacheError;
+use crate::platform::font::FontContext;
+use crate::device::TextureFilter;
+use crate::gpu_types::UvRectKind;
+use crate::glyph_cache::{GlyphCache, CachedGlyphInfo, GlyphCacheEntry};
+use crate::resource_cache::CachedImageData;
+use crate::texture_cache::{TextureCache, TextureCacheHandle, Eviction};
+use crate::gpu_cache::GpuCache;
+use crate::render_task_graph::RenderTaskGraph;
+use crate::render_task_cache::RenderTaskCache;
+use crate::profiler::TextureCacheProfileCounters;
+use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
+use rayon::ThreadPool;
+use rayon::prelude::*;
+use euclid::approxeq::ApproxEq;
+use euclid::size2;
+use std::cmp;
+use std::cell::Cell;
+use std::hash::{Hash, Hasher};
+use std::mem;
+use std::ops::Deref;
+use std::sync::{Arc, Condvar, Mutex, MutexGuard};
+use std::sync::mpsc::{channel, Receiver, Sender};
+use std::sync::atomic::{AtomicBool, Ordering};
+
+pub static GLYPH_FLASHING: AtomicBool = AtomicBool::new(false);
+
+impl FontContexts {
+ /// Get access to the font context associated to the current thread.
+ pub fn lock_current_context(&self) -> MutexGuard<FontContext> {
+ let id = self.current_worker_id();
+ self.lock_context(id)
+ }
+
+ pub(in super) fn current_worker_id(&self) -> Option<usize> {
+ self.workers.current_thread_index()
+ }
+}
+
+thread_local! {
+ pub static SEED: Cell<u32> = Cell::new(0);
+}
+
+// super simple random to avoid dependency on rand
+fn random() -> u32 {
+ SEED.with(|seed| {
+ seed.set(seed.get().wrapping_mul(22695477).wrapping_add(1));
+ seed.get()
+ })
+}
+
+impl GlyphRasterizer {
+ pub fn request_glyphs(
+ &mut self,
+ glyph_cache: &mut GlyphCache,
+ font: FontInstance,
+ glyph_keys: &[GlyphKey],
+ texture_cache: &mut TextureCache,
+ gpu_cache: &mut GpuCache,
+ _: &mut RenderTaskCache,
+ _: &mut RenderTaskGraph,
+ ) {
+ assert!(
+ self.font_contexts
+ .lock_shared_context()
+ .has_font(&font.font_key)
+ );
+ let mut new_glyphs = Vec::new();
+
+ let glyph_key_cache = glyph_cache.get_glyph_key_cache_for_font_mut(font.clone());
+
+ // select glyphs that have not been requested yet.
+ for key in glyph_keys {
+ if let Some(entry) = glyph_key_cache.try_get(key) {
+ match entry {
+ GlyphCacheEntry::Cached(ref glyph) => {
+ // Skip the glyph if it is already has a valid texture cache handle.
+ if !texture_cache.request(&glyph.texture_cache_handle, gpu_cache) {
+ continue;
+ }
+ // This case gets hit when we already rasterized the glyph, but the
+ // glyph has been evicted from the texture cache. Just force it to
+ // pending so it gets rematerialized.
+ }
+ // Otherwise, skip the entry if it is blank or pending.
+ GlyphCacheEntry::Blank | GlyphCacheEntry::Pending => continue,
+ }
+ }
+ new_glyphs.push(key.clone());
+ glyph_key_cache.add_glyph(key.clone(), GlyphCacheEntry::Pending);
+ }
+
+ if new_glyphs.is_empty() {
+ return;
+ }
+
+ self.pending_glyphs += 1;
+
+ self.request_glyphs_from_backend(font, new_glyphs);
+ }
+
+ pub fn enable_multithreading(&mut self, enable: bool) {
+ self.enable_multithreading = enable;
+ }
+
+ pub(in super) fn request_glyphs_from_backend(&mut self, font: FontInstance, glyphs: Vec<GlyphKey>) {
+ let font_contexts = Arc::clone(&self.font_contexts);
+ let glyph_tx = self.glyph_tx.clone();
+
+ fn process_glyph(key: &GlyphKey, font_contexts: &FontContexts, font: &FontInstance) -> GlyphRasterJob {
+ profile_scope!("glyph-raster");
+ let mut context = font_contexts.lock_current_context();
+ let mut job = GlyphRasterJob {
+ key: key.clone(),
+ result: context.rasterize_glyph(&font, key),
+ };
+
+ if let Ok(ref mut glyph) = job.result {
+ // Sanity check.
+ let bpp = 4; // We always render glyphs in 32 bits RGBA format.
+ assert_eq!(
+ glyph.bytes.len(),
+ bpp * (glyph.width * glyph.height) as usize
+ );
+
+ // a quick-and-dirty monochrome over
+ fn over(dst: u8, src: u8) -> u8 {
+ let a = src as u32;
+ let a = 256 - a;
+ let dst = ((dst as u32 * a) >> 8) as u8;
+ src + dst
+ }
+
+ if GLYPH_FLASHING.load(Ordering::Relaxed) {
+ let color = (random() & 0xff) as u8;
+ for i in &mut glyph.bytes {
+ *i = over(*i, color);
+ }
+ }
+
+ assert_eq!((glyph.left.fract(), glyph.top.fract()), (0.0, 0.0));
+
+ // Check if the glyph has a bitmap that needs to be downscaled.
+ glyph.downscale_bitmap_if_required(&font);
+ }
+
+ job
+ }
+
+ // if the number of glyphs is small, do it inline to avoid the threading overhead;
+ // send the result into glyph_tx so downstream code can't tell the difference.
+ if !self.enable_multithreading || glyphs.len() < 8 {
+ let jobs = glyphs.iter()
+ .map(|key: &GlyphKey| process_glyph(key, &font_contexts, &font))
+ .collect();
+ glyph_tx.send(GlyphRasterJobs { font, jobs }).unwrap();
+ } else {
+ // spawn an async task to get off of the render backend thread as early as
+ // possible and in that task use rayon's fork join dispatch to rasterize the
+ // glyphs in the thread pool.
+ profile_scope!("spawning process_glyph jobs");
+ self.workers.spawn(move || {
+ let jobs = glyphs
+ .par_iter()
+ .map(|key: &GlyphKey| process_glyph(key, &font_contexts, &font))
+ .collect();
+
+ glyph_tx.send(GlyphRasterJobs { font, jobs }).unwrap();
+ });
+ }
+ }
+
+ pub fn resolve_glyphs(
+ &mut self,
+ glyph_cache: &mut GlyphCache,
+ texture_cache: &mut TextureCache,
+ gpu_cache: &mut GpuCache,
+ _: &mut RenderTaskCache,
+ _: &mut RenderTaskGraph,
+ _: &mut TextureCacheProfileCounters,
+ ) {
+ profile_scope!("resolve_glyphs");
+ // Pull rasterized glyphs from the queue and update the caches.
+ while self.pending_glyphs > 0 {
+ self.pending_glyphs -= 1;
+
+ // TODO: rather than blocking until all pending glyphs are available
+ // we could try_recv and steal work from the thread pool to take advantage
+ // of the fact that this thread is alive and we avoid the added latency
+ // of blocking it.
+
+ let GlyphRasterJobs { font, mut jobs } = {
+ profile_scope!("blocking wait on glyph_rx");
+ self.glyph_rx
+ .recv()
+ .expect("BUG: Should be glyphs pending!")
+ };
+
+ // Ensure that the glyphs are always processed in the same
+ // order for a given text run (since iterating a hash set doesn't
+ // guarantee order). This can show up as very small float inaccuracy
+ // differences in rasterizers due to the different coordinates
+ // that text runs get associated with by the texture cache allocator.
+ jobs.sort_by(|a, b| a.key.cmp(&b.key));
+
+ let glyph_key_cache = glyph_cache.get_glyph_key_cache_for_font_mut(font);
+
+ for GlyphRasterJob { key, result } in jobs {
+ let glyph_info = match result {
+ Err(_) => GlyphCacheEntry::Blank,
+ Ok(ref glyph) if glyph.width == 0 || glyph.height == 0 => {
+ GlyphCacheEntry::Blank
+ }
+ Ok(glyph) => {
+ let mut texture_cache_handle = TextureCacheHandle::invalid();
+ texture_cache.request(&texture_cache_handle, gpu_cache);
+ texture_cache.update(
+ &mut texture_cache_handle,
+ ImageDescriptor {
+ size: size2(glyph.width, glyph.height),
+ stride: None,
+ format: FORMAT,
+ flags: ImageDescriptorFlags::empty(),
+ offset: 0,
+ },
+ TextureFilter::Linear,
+ Some(CachedImageData::Raw(Arc::new(glyph.bytes))),
+ [glyph.left, -glyph.top, glyph.scale],
+ DirtyRect::All,
+ gpu_cache,
+ Some(glyph_key_cache.eviction_notice()),
+ UvRectKind::Rect,
+ Eviction::Auto,
+ );
+ GlyphCacheEntry::Cached(CachedGlyphInfo {
+ texture_cache_handle,
+ format: glyph.format,
+ })
+ }
+ };
+ glyph_key_cache.insert(key, glyph_info);
+ }
+ }
+
+ // Now that we are done with the critical path (rendering the glyphs),
+ // we can schedule removing the fonts if needed.
+ self.remove_dead_fonts();
+ }
+}
+
+#[allow(dead_code)]
+pub const FORMAT: ImageFormat = ImageFormat::BGRA8;
+
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct FontTransform {
+ pub scale_x: f32,
+ pub skew_x: f32,
+ pub skew_y: f32,
+ pub scale_y: f32,
+}
+
+// Floats don't impl Hash/Eq/Ord...
+impl Eq for FontTransform {}
+impl Ord for FontTransform {
+ fn cmp(&self, other: &Self) -> cmp::Ordering {
+ self.partial_cmp(other).unwrap_or(cmp::Ordering::Equal)
+ }
+}
+impl Hash for FontTransform {
+ fn hash<H: Hasher>(&self, state: &mut H) {
+ // Note: this is inconsistent with the Eq impl for -0.0 (don't care).
+ self.scale_x.to_bits().hash(state);
+ self.skew_x.to_bits().hash(state);
+ self.skew_y.to_bits().hash(state);
+ self.scale_y.to_bits().hash(state);
+ }
+}
+
+impl FontTransform {
+ const QUANTIZE_SCALE: f32 = 1024.0;
+
+ pub fn new(scale_x: f32, skew_x: f32, skew_y: f32, scale_y: f32) -> Self {
+ FontTransform { scale_x, skew_x, skew_y, scale_y }
+ }
+
+ pub fn identity() -> Self {
+ FontTransform::new(1.0, 0.0, 0.0, 1.0)
+ }
+
+ #[allow(dead_code)]
+ pub fn is_identity(&self) -> bool {
+ *self == FontTransform::identity()
+ }
+
+ pub fn quantize(&self) -> Self {
+ FontTransform::new(
+ (self.scale_x * Self::QUANTIZE_SCALE).round() / Self::QUANTIZE_SCALE,
+ (self.skew_x * Self::QUANTIZE_SCALE).round() / Self::QUANTIZE_SCALE,
+ (self.skew_y * Self::QUANTIZE_SCALE).round() / Self::QUANTIZE_SCALE,
+ (self.scale_y * Self::QUANTIZE_SCALE).round() / Self::QUANTIZE_SCALE,
+ )
+ }
+
+ #[allow(dead_code)]
+ pub fn determinant(&self) -> f64 {
+ self.scale_x as f64 * self.scale_y as f64 - self.skew_y as f64 * self.skew_x as f64
+ }
+
+ #[allow(dead_code)]
+ pub fn compute_scale(&self) -> Option<(f64, f64)> {
+ let det = self.determinant();
+ if det != 0.0 {
+ let x_scale = (self.scale_x as f64).hypot(self.skew_y as f64);
+ let y_scale = det.abs() / x_scale;
+ Some((x_scale, y_scale))
+ } else {
+ None
+ }
+ }
+
+ #[allow(dead_code)]
+ pub fn pre_scale(&self, scale_x: f32, scale_y: f32) -> Self {
+ FontTransform::new(
+ self.scale_x * scale_x,
+ self.skew_x * scale_y,
+ self.skew_y * scale_x,
+ self.scale_y * scale_y,
+ )
+ }
+
+ #[allow(dead_code)]
+ pub fn scale(&self, scale: f32) -> Self { self.pre_scale(scale, scale) }
+
+ #[allow(dead_code)]
+ pub fn invert_scale(&self, x_scale: f64, y_scale: f64) -> Self {
+ self.pre_scale(x_scale.recip() as f32, y_scale.recip() as f32)
+ }
+
+ pub fn synthesize_italics(&self, angle: SyntheticItalics, size: f64, vertical: bool) -> (Self, (f64, f64)) {
+ let skew_factor = angle.to_skew();
+ if vertical {
+ // origin delta to be applied so that we effectively skew around
+ // the middle rather than edge of the glyph
+ let (tx, ty) = (0.0, -size * 0.5 * skew_factor as f64);
+ (FontTransform::new(
+ self.scale_x + self.skew_x * skew_factor,
+ self.skew_x,
+ self.skew_y + self.scale_y * skew_factor,
+ self.scale_y,
+ ), (self.scale_x as f64 * tx + self.skew_x as f64 * ty,
+ self.skew_y as f64 * tx + self.scale_y as f64 * ty))
+ } else {
+ (FontTransform::new(
+ self.scale_x,
+ self.skew_x - self.scale_x * skew_factor,
+ self.skew_y,
+ self.scale_y - self.skew_y * skew_factor,
+ ), (0.0, 0.0))
+ }
+ }
+
+ pub fn swap_xy(&self) -> Self {
+ FontTransform::new(self.skew_x, self.scale_x, self.scale_y, self.skew_y)
+ }
+
+ pub fn flip_x(&self) -> Self {
+ FontTransform::new(-self.scale_x, self.skew_x, -self.skew_y, self.scale_y)
+ }
+
+ pub fn flip_y(&self) -> Self {
+ FontTransform::new(self.scale_x, -self.skew_x, self.skew_y, -self.scale_y)
+ }
+
+ pub fn transform(&self, point: &LayoutPoint) -> DevicePoint {
+ DevicePoint::new(
+ self.scale_x * point.x + self.skew_x * point.y,
+ self.skew_y * point.x + self.scale_y * point.y,
+ )
+ }
+
+ pub fn get_subpx_dir(&self) -> SubpixelDirection {
+ if self.skew_y.approx_eq(&0.0) {
+ // The X axis is not projected onto the Y axis
+ SubpixelDirection::Horizontal
+ } else if self.scale_x.approx_eq(&0.0) {
+ // The X axis has been swapped with the Y axis
+ SubpixelDirection::Vertical
+ } else {
+ // Use subpixel precision on all axes
+ SubpixelDirection::Mixed
+ }
+ }
+}
+
+impl<'a> From<&'a LayoutToWorldTransform> for FontTransform {
+ fn from(xform: &'a LayoutToWorldTransform) -> Self {
+ FontTransform::new(xform.m11, xform.m21, xform.m12, xform.m22)
+ }
+}
+
+// Some platforms (i.e. Windows) may have trouble rasterizing glyphs above this size.
+// Ensure glyph sizes are reasonably limited to avoid that scenario.
+pub const FONT_SIZE_LIMIT: f32 = 320.0;
+
+/// A mutable font instance description.
+///
+/// Performance is sensitive to the size of this structure, so it should only contain
+/// the fields that we need to modify from the original base font instance.
+#[derive(Clone, PartialEq, Eq, Debug, Ord, PartialOrd)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct FontInstance {
+ pub base: Arc<BaseFontInstance>,
+ pub transform: FontTransform,
+ pub render_mode: FontRenderMode,
+ pub flags: FontInstanceFlags,
+ pub color: ColorU,
+ // The font size is in *device/raster* pixels, not logical pixels.
+ // It is stored as an f32 since we need sub-pixel sizes.
+ pub size: FontSize,
+}
+
+impl Hash for FontInstance {
+ fn hash<H: Hasher>(&self, state: &mut H) {
+ // Hash only the base instance's key to avoid the cost of hashing
+ // the rest.
+ self.base.instance_key.hash(state);
+ self.transform.hash(state);
+ self.render_mode.hash(state);
+ self.flags.hash(state);
+ self.color.hash(state);
+ self.size.hash(state);
+ }
+}
+
+impl Deref for FontInstance {
+ type Target = BaseFontInstance;
+ fn deref(&self) -> &BaseFontInstance {
+ self.base.as_ref()
+ }
+}
+
+impl MallocSizeOf for FontInstance {
+ fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize { 0 }
+}
+
+impl FontInstance {
+ pub fn new(
+ base: Arc<BaseFontInstance>,
+ color: ColorU,
+ render_mode: FontRenderMode,
+ flags: FontInstanceFlags,
+ ) -> Self {
+ FontInstance {
+ transform: FontTransform::identity(),
+ color,
+ size: base.size,
+ base,
+ render_mode,
+ flags,
+ }
+ }
+
+ pub fn from_base(
+ base: Arc<BaseFontInstance>,
+ ) -> Self {
+ FontInstance {
+ transform: FontTransform::identity(),
+ color: ColorU::new(0, 0, 0, 255),
+ size: base.size,
+ render_mode: base.render_mode,
+ flags: base.flags,
+ base,
+ }
+ }
+
+ pub fn use_texture_padding(&self) -> bool {
+ self.flags.contains(FontInstanceFlags::TEXTURE_PADDING)
+ }
+
+ pub fn use_transform_glyphs(&self) -> bool {
+ self.flags.contains(FontInstanceFlags::TRANSFORM_GLYPHS)
+ }
+
+ pub fn get_alpha_glyph_format(&self) -> GlyphFormat {
+ if self.use_transform_glyphs() { GlyphFormat::TransformedAlpha } else { GlyphFormat::Alpha }
+ }
+
+ pub fn get_subpixel_glyph_format(&self) -> GlyphFormat {
+ if self.use_transform_glyphs() { GlyphFormat::TransformedSubpixel } else { GlyphFormat::Subpixel }
+ }
+
+ pub fn disable_subpixel_aa(&mut self) {
+ self.render_mode = self.render_mode.limit_by(FontRenderMode::Alpha);
+ }
+
+ pub fn disable_subpixel_position(&mut self) {
+ self.flags.remove(FontInstanceFlags::SUBPIXEL_POSITION);
+ }
+
+ pub fn use_subpixel_position(&self) -> bool {
+ self.flags.contains(FontInstanceFlags::SUBPIXEL_POSITION) &&
+ self.render_mode != FontRenderMode::Mono
+ }
+
+ pub fn get_subpx_dir(&self) -> SubpixelDirection {
+ if self.use_subpixel_position() {
+ let mut subpx_dir = self.transform.get_subpx_dir();
+ if self.flags.contains(FontInstanceFlags::TRANSPOSE) {
+ subpx_dir = subpx_dir.swap_xy();
+ }
+ subpx_dir
+ } else {
+ SubpixelDirection::None
+ }
+ }
+
+ #[allow(dead_code)]
+ pub fn get_subpx_offset(&self, glyph: &GlyphKey) -> (f64, f64) {
+ if self.use_subpixel_position() {
+ let (dx, dy) = glyph.subpixel_offset();
+ (dx.into(), dy.into())
+ } else {
+ (0.0, 0.0)
+ }
+ }
+
+ #[allow(dead_code)]
+ pub fn get_glyph_format(&self) -> GlyphFormat {
+ match self.render_mode {
+ FontRenderMode::Mono | FontRenderMode::Alpha => self.get_alpha_glyph_format(),
+ FontRenderMode::Subpixel => self.get_subpixel_glyph_format(),
+ }
+ }
+
+ #[allow(dead_code)]
+ pub fn get_extra_strikes(&self, x_scale: f64) -> usize {
+ if self.flags.contains(FontInstanceFlags::SYNTHETIC_BOLD) {
+ let mut bold_offset = self.size.to_f64_px() / 48.0;
+ if bold_offset < 1.0 {
+ bold_offset = 0.25 + 0.75 * bold_offset;
+ }
+ (bold_offset * x_scale).max(1.0).round() as usize
+ } else {
+ 0
+ }
+ }
+
+ pub fn synthesize_italics(&self, transform: FontTransform, size: f64) -> (FontTransform, (f64, f64)) {
+ transform.synthesize_italics(self.synthetic_italics, size, self.flags.contains(FontInstanceFlags::VERTICAL))
+ }
+
+ #[allow(dead_code)]
+ pub fn get_transformed_size(&self) -> f64 {
+ let (_, y_scale) = self.transform.compute_scale().unwrap_or((1.0, 1.0));
+ self.size.to_f64_px() * y_scale
+ }
+}
+
+#[repr(u32)]
+#[derive(Copy, Clone, Hash, PartialEq, Eq, Debug, Ord, PartialOrd)]
+pub enum SubpixelDirection {
+ None = 0,
+ Horizontal,
+ Vertical,
+ Mixed,
+}
+
+impl SubpixelDirection {
+ // Limit the subpixel direction to what is supported by the glyph format.
+ pub fn limit_by(self, glyph_format: GlyphFormat) -> Self {
+ match glyph_format {
+ GlyphFormat::Bitmap |
+ GlyphFormat::ColorBitmap => SubpixelDirection::None,
+ _ => self,
+ }
+ }
+
+ pub fn swap_xy(self) -> Self {
+ match self {
+ SubpixelDirection::None | SubpixelDirection::Mixed => self,
+ SubpixelDirection::Horizontal => SubpixelDirection::Vertical,
+ SubpixelDirection::Vertical => SubpixelDirection::Horizontal,
+ }
+ }
+}
+
+#[repr(u8)]
+#[derive(Hash, Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum SubpixelOffset {
+ Zero = 0,
+ Quarter = 1,
+ Half = 2,
+ ThreeQuarters = 3,
+}
+
+impl SubpixelOffset {
+ // Skia quantizes subpixel offsets into 1/4 increments.
+ // Given the absolute position, return the quantized increment
+ fn quantize(pos: f32) -> Self {
+ // Following the conventions of Gecko and Skia, we want
+ // to quantize the subpixel position, such that abs(pos) gives:
+ // [0.0, 0.125) -> Zero
+ // [0.125, 0.375) -> Quarter
+ // [0.375, 0.625) -> Half
+ // [0.625, 0.875) -> ThreeQuarters,
+ // [0.875, 1.0) -> Zero
+ // The unit tests below check for this.
+ let apos = ((pos - pos.floor()) * 8.0) as i32;
+
+ match apos {
+ 1..=2 => SubpixelOffset::Quarter,
+ 3..=4 => SubpixelOffset::Half,
+ 5..=6 => SubpixelOffset::ThreeQuarters,
+ _ => SubpixelOffset::Zero,
+ }
+ }
+}
+
+impl Into<f64> for SubpixelOffset {
+ fn into(self) -> f64 {
+ match self {
+ SubpixelOffset::Zero => 0.0,
+ SubpixelOffset::Quarter => 0.25,
+ SubpixelOffset::Half => 0.5,
+ SubpixelOffset::ThreeQuarters => 0.75,
+ }
+ }
+}
+
+#[derive(Clone, Hash, PartialEq, Eq, Debug, Ord, PartialOrd)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct GlyphKey(u32);
+
+impl GlyphKey {
+ pub fn new(
+ index: u32,
+ point: DevicePoint,
+ subpx_dir: SubpixelDirection,
+ ) -> Self {
+ let (dx, dy) = match subpx_dir {
+ SubpixelDirection::None => (0.0, 0.0),
+ SubpixelDirection::Horizontal => (point.x, 0.0),
+ SubpixelDirection::Vertical => (0.0, point.y),
+ SubpixelDirection::Mixed => (point.x, point.y),
+ };
+ let sox = SubpixelOffset::quantize(dx);
+ let soy = SubpixelOffset::quantize(dy);
+ assert_eq!(0, index & 0xF0000000);
+
+ GlyphKey(index | (sox as u32) << 28 | (soy as u32) << 30)
+ }
+
+ pub fn index(&self) -> GlyphIndex {
+ self.0 & 0x0FFFFFFF
+ }
+
+ fn subpixel_offset(&self) -> (SubpixelOffset, SubpixelOffset) {
+ let x = (self.0 >> 28) as u8 & 3;
+ let y = (self.0 >> 30) as u8 & 3;
+ unsafe {
+ (mem::transmute(x), mem::transmute(y))
+ }
+ }
+}
+
+#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[allow(dead_code)]
+pub enum GlyphFormat {
+ Alpha,
+ TransformedAlpha,
+ Subpixel,
+ TransformedSubpixel,
+ Bitmap,
+ ColorBitmap,
+}
+
+impl GlyphFormat {
+ pub fn ignore_color(self) -> Self {
+ match self {
+ GlyphFormat::ColorBitmap => GlyphFormat::Bitmap,
+ _ => self,
+ }
+ }
+}
+
+pub struct RasterizedGlyph {
+ pub top: f32,
+ pub left: f32,
+ pub width: i32,
+ pub height: i32,
+ pub scale: f32,
+ pub format: GlyphFormat,
+ pub bytes: Vec<u8>,
+}
+
+impl RasterizedGlyph {
+ #[allow(dead_code)]
+ pub fn downscale_bitmap_if_required(&mut self, font: &FontInstance) {
+ // Check if the glyph is going to be downscaled in the shader. If the scaling is
+ // less than 0.5, that means bilinear filtering can't effectively filter the glyph
+ // without aliasing artifacts.
+ //
+ // Instead of fixing this by mipmapping the glyph cache texture, rather manually
+ // produce the appropriate mip level for individual glyphs where bilinear filtering
+ // will still produce acceptable results.
+ match self.format {
+ GlyphFormat::Bitmap | GlyphFormat::ColorBitmap => {},
+ _ => return,
+ }
+ let (x_scale, y_scale) = font.transform.compute_scale().unwrap_or((1.0, 1.0));
+ let upscaled = x_scale.max(y_scale) as f32;
+ let mut new_scale = self.scale;
+ if new_scale * upscaled <= 0.0 {
+ return;
+ }
+ let mut steps = 0;
+ while new_scale * upscaled <= 0.5 {
+ new_scale *= 2.0;
+ steps += 1;
+ }
+ // If no mipping is necessary, just bail.
+ if steps == 0 {
+ return;
+ }
+
+ // Calculate the actual size of the mip level.
+ let new_width = (self.width as usize + (1 << steps) - 1) >> steps;
+ let new_height = (self.height as usize + (1 << steps) - 1) >> steps;
+ let mut new_bytes: Vec<u8> = Vec::with_capacity(new_width * new_height * 4);
+
+ // Produce destination pixels by applying a box filter to the source pixels.
+ // The box filter corresponds to how graphics drivers may generate mipmaps.
+ for y in 0 .. new_height {
+ for x in 0 .. new_width {
+ // Calculate the number of source samples that contribute to the destination pixel.
+ let src_y = y << steps;
+ let src_x = x << steps;
+ let y_samples = (1 << steps).min(self.height as usize - src_y);
+ let x_samples = (1 << steps).min(self.width as usize - src_x);
+ let num_samples = (x_samples * y_samples) as u32;
+
+ let mut src_idx = (src_y * self.width as usize + src_x) * 4;
+ // Initialize the accumulator with half an increment so that when later divided
+ // by the sample count, it will effectively round the accumulator to the nearest
+ // increment.
+ let mut accum = [num_samples / 2; 4];
+ // Accumulate all the contributing source sampless.
+ for _ in 0 .. y_samples {
+ for _ in 0 .. x_samples {
+ accum[0] += self.bytes[src_idx + 0] as u32;
+ accum[1] += self.bytes[src_idx + 1] as u32;
+ accum[2] += self.bytes[src_idx + 2] as u32;
+ accum[3] += self.bytes[src_idx + 3] as u32;
+ src_idx += 4;
+ }
+ src_idx += (self.width as usize - x_samples) * 4;
+ }
+
+ // Finally, divide by the sample count to get the mean value for the new pixel.
+ new_bytes.extend_from_slice(&[
+ (accum[0] / num_samples) as u8,
+ (accum[1] / num_samples) as u8,
+ (accum[2] / num_samples) as u8,
+ (accum[3] / num_samples) as u8,
+ ]);
+ }
+ }
+
+ // Fix the bounds for the new glyph data.
+ self.top /= (1 << steps) as f32;
+ self.left /= (1 << steps) as f32;
+ self.width = new_width as i32;
+ self.height = new_height as i32;
+ self.scale = new_scale;
+ self.bytes = new_bytes;
+ }
+}
+
+pub struct FontContexts {
+ // These worker are mostly accessed from their corresponding worker threads.
+ // The goal is that there should be no noticeable contention on the mutexes.
+ worker_contexts: Vec<Mutex<FontContext>>,
+ // This worker should be accessed by threads that don't belong to the thread pool
+ // (in theory that's only the render backend thread so no contention expected either).
+ shared_context: Mutex<FontContext>,
+ // Stored here as a convenience to get the current thread index.
+ #[allow(dead_code)]
+ workers: Arc<ThreadPool>,
+ locked_mutex: Mutex<bool>,
+ locked_cond: Condvar,
+}
+
+impl FontContexts {
+
+ /// Get access to any particular font context.
+ ///
+ /// The id is ```Some(i)``` where i is an index between 0 and num_worker_contexts
+ /// for font contexts associated to the thread pool, and None for the shared
+ /// global font context for use outside of the thread pool.
+ pub fn lock_context(&self, id: Option<usize>) -> MutexGuard<FontContext> {
+ match id {
+ Some(index) => self.worker_contexts[index].lock().unwrap(),
+ None => self.shared_context.lock().unwrap(),
+ }
+ }
+
+ /// Get access to the font context usable outside of the thread pool.
+ pub fn lock_shared_context(&self) -> MutexGuard<FontContext> {
+ self.shared_context.lock().unwrap()
+ }
+
+ // number of contexts associated to workers
+ pub fn num_worker_contexts(&self) -> usize {
+ self.worker_contexts.len()
+ }
+}
+
+pub trait AsyncForEach<T> {
+ fn async_for_each<F: Fn(MutexGuard<T>) + Send + 'static>(&self, f: F);
+}
+
+impl AsyncForEach<FontContext> for Arc<FontContexts> {
+ fn async_for_each<F: Fn(MutexGuard<FontContext>) + Send + 'static>(&self, f: F) {
+ // Reset the locked condition.
+ let mut locked = self.locked_mutex.lock().unwrap();
+ *locked = false;
+
+ // Arc that can be safely moved into a spawn closure.
+ let font_contexts = self.clone();
+ // Spawn a new thread on which to run the for-each off the main thread.
+ self.workers.spawn(move || {
+ // Lock the shared and worker contexts up front.
+ let mut locks = Vec::with_capacity(font_contexts.num_worker_contexts() + 1);
+ locks.push(font_contexts.lock_shared_context());
+ for i in 0 .. font_contexts.num_worker_contexts() {
+ locks.push(font_contexts.lock_context(Some(i)));
+ }
+
+ // Signal the locked condition now that all contexts are locked.
+ *font_contexts.locked_mutex.lock().unwrap() = true;
+ font_contexts.locked_cond.notify_all();
+
+ // Now that everything is locked, proceed to processing each locked context.
+ for context in locks {
+ f(context);
+ }
+ });
+
+ // Wait for locked condition before resuming. Safe to proceed thereafter
+ // since any other thread that needs to use a FontContext will try to lock
+ // it first.
+ while !*locked {
+ locked = self.locked_cond.wait(locked).unwrap();
+ }
+ }
+}
+
+pub struct GlyphRasterizer {
+ #[allow(dead_code)]
+ workers: Arc<ThreadPool>,
+ font_contexts: Arc<FontContexts>,
+
+ // Maintain a set of glyphs that have been requested this
+ // frame. This ensures the glyph thread won't rasterize
+ // the same glyph more than once in a frame. This is required
+ // because the glyph cache hash table is not updated
+ // until the end of the frame when we wait for glyph requests
+ // to be resolved.
+ #[allow(dead_code)]
+ pending_glyphs: usize,
+
+ // Receives the rendered glyphs.
+ #[allow(dead_code)]
+ glyph_rx: Receiver<GlyphRasterJobs>,
+ #[allow(dead_code)]
+ glyph_tx: Sender<GlyphRasterJobs>,
+
+ // We defer removing fonts to the end of the frame so that:
+ // - this work is done outside of the critical path,
+ // - we don't have to worry about the ordering of events if a font is used on
+ // a frame where it is used (although it seems unlikely).
+ fonts_to_remove: Vec<FontKey>,
+ // Defer removal of font instances, as for fonts.
+ font_instances_to_remove: Vec<FontInstance>,
+
+ #[allow(dead_code)]
+ next_gpu_glyph_cache_key: GpuGlyphCacheKey,
+
+ // Whether to parallelize glyph rasterization with rayon.
+ enable_multithreading: bool,
+}
+
+impl GlyphRasterizer {
+ pub fn new(workers: Arc<ThreadPool>) -> Result<Self, ResourceCacheError> {
+ let (glyph_tx, glyph_rx) = channel();
+
+ let num_workers = workers.current_num_threads();
+ let mut contexts = Vec::with_capacity(num_workers);
+
+ let shared_context = FontContext::new()?;
+
+ for _ in 0 .. num_workers {
+ contexts.push(Mutex::new(FontContext::new()?));
+ }
+
+ let font_context = FontContexts {
+ worker_contexts: contexts,
+ shared_context: Mutex::new(shared_context),
+ workers: Arc::clone(&workers),
+ locked_mutex: Mutex::new(false),
+ locked_cond: Condvar::new(),
+ };
+
+ Ok(GlyphRasterizer {
+ font_contexts: Arc::new(font_context),
+ pending_glyphs: 0,
+ glyph_rx,
+ glyph_tx,
+ workers,
+ fonts_to_remove: Vec::new(),
+ font_instances_to_remove: Vec::new(),
+ next_gpu_glyph_cache_key: GpuGlyphCacheKey(0),
+ enable_multithreading: true,
+ })
+ }
+
+ pub fn add_font(&mut self, font_key: FontKey, template: FontTemplate) {
+ self.font_contexts.async_for_each(move |mut context| {
+ context.add_font(&font_key, &template);
+ });
+ }
+
+ pub fn delete_font(&mut self, font_key: FontKey) {
+ self.fonts_to_remove.push(font_key);
+ }
+
+ pub fn delete_font_instance(&mut self, instance: &FontInstance) {
+ self.font_instances_to_remove.push(instance.clone());
+ }
+
+ pub fn prepare_font(&self, font: &mut FontInstance) {
+ FontContext::prepare_font(font);
+
+ // Quantize the transform to minimize thrashing of the glyph cache, but
+ // only quantize the transform when preparing to access the glyph cache.
+ // This way, the glyph subpixel positions, which are calculated before
+ // this, can still use the precise transform which is required to match
+ // the subpixel positions computed for glyphs in the text run shader.
+ font.transform = font.transform.quantize();
+ }
+
+ pub fn get_glyph_dimensions(
+ &mut self,
+ font: &FontInstance,
+ glyph_index: GlyphIndex,
+ ) -> Option<GlyphDimensions> {
+ let glyph_key = GlyphKey::new(
+ glyph_index,
+ DevicePoint::zero(),
+ SubpixelDirection::None,
+ );
+
+ self.font_contexts
+ .lock_shared_context()
+ .get_glyph_dimensions(font, &glyph_key)
+ }
+
+ pub fn get_glyph_index(&mut self, font_key: FontKey, ch: char) -> Option<u32> {
+ self.font_contexts
+ .lock_shared_context()
+ .get_glyph_index(font_key, ch)
+ }
+
+ fn remove_dead_fonts(&mut self) {
+ if self.fonts_to_remove.is_empty() && self.font_instances_to_remove.is_empty() {
+ return
+ }
+
+ profile_scope!("remove_dead_fonts");
+ let fonts_to_remove = mem::replace(&mut self.fonts_to_remove, Vec::new());
+ let font_instances_to_remove = mem::replace(& mut self.font_instances_to_remove, Vec::new());
+ self.font_contexts.async_for_each(move |mut context| {
+ for font_key in &fonts_to_remove {
+ context.delete_font(font_key);
+ }
+ for instance in &font_instances_to_remove {
+ context.delete_font_instance(instance);
+ }
+ });
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn reset(&mut self) {
+ //TODO: any signals need to be sent to the workers?
+ self.pending_glyphs = 0;
+ self.fonts_to_remove.clear();
+ self.font_instances_to_remove.clear();
+ }
+}
+
+trait AddFont {
+ fn add_font(&mut self, font_key: &FontKey, template: &FontTemplate);
+}
+
+impl AddFont for FontContext {
+ fn add_font(&mut self, font_key: &FontKey, template: &FontTemplate) {
+ match *template {
+ FontTemplate::Raw(ref bytes, index) => {
+ self.add_raw_font(font_key, bytes.clone(), index);
+ }
+ FontTemplate::Native(ref native_font_handle) => {
+ self.add_native_font(font_key, (*native_font_handle).clone());
+ }
+ }
+ }
+}
+
+#[allow(dead_code)]
+pub(in crate::glyph_rasterizer) struct GlyphRasterJob {
+ key: GlyphKey,
+ result: GlyphRasterResult,
+}
+
+#[allow(dead_code)]
+pub enum GlyphRasterError {
+ LoadFailed,
+}
+
+#[allow(dead_code)]
+pub type GlyphRasterResult = Result<RasterizedGlyph, GlyphRasterError>;
+
+#[derive(Debug, Copy, Clone, Eq, Hash, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct GpuGlyphCacheKey(pub u32);
+
+#[allow(dead_code)]
+struct GlyphRasterJobs {
+ font: FontInstance,
+ jobs: Vec<GlyphRasterJob>,
+}
+
+#[cfg(test)]
+mod test_glyph_rasterizer {
+ #[test]
+ fn rasterize_200_glyphs() {
+ // This test loads a font from disc, the renders 4 requests containing
+ // 50 glyphs each, deletes the font and waits for the result.
+
+ use rayon::ThreadPoolBuilder;
+ use std::fs::File;
+ use std::io::Read;
+ use crate::texture_cache::TextureCache;
+ use crate::glyph_cache::GlyphCache;
+ use crate::gpu_cache::GpuCache;
+ use crate::render_task_cache::RenderTaskCache;
+ use crate::render_task_graph::{RenderTaskGraph, RenderTaskGraphCounters};
+ use crate::profiler::TextureCacheProfileCounters;
+ use api::{FontKey, FontInstanceKey, FontSize, FontTemplate, FontRenderMode,
+ IdNamespace, ColorU};
+ use api::units::DevicePoint;
+ use crate::render_backend::FrameId;
+ use std::sync::Arc;
+ use crate::glyph_rasterizer::{FORMAT, FontInstance, BaseFontInstance, GlyphKey, GlyphRasterizer};
+
+ let worker = ThreadPoolBuilder::new()
+ .thread_name(|idx|{ format!("WRWorker#{}", idx) })
+ .build();
+ let workers = Arc::new(worker.unwrap());
+ let mut glyph_rasterizer = GlyphRasterizer::new(workers).unwrap();
+ let mut glyph_cache = GlyphCache::new(GlyphCache::DEFAULT_MAX_BYTES_USED);
+ let mut gpu_cache = GpuCache::new_for_testing();
+ let mut texture_cache = TextureCache::new_for_testing(2048, 1024, FORMAT);
+ let mut render_task_cache = RenderTaskCache::new();
+ let mut render_task_tree = RenderTaskGraph::new(FrameId::INVALID, &RenderTaskGraphCounters::new());
+ let mut font_file =
+ File::open("../wrench/reftests/text/VeraBd.ttf").expect("Couldn't open font file");
+ let mut font_data = vec![];
+ font_file
+ .read_to_end(&mut font_data)
+ .expect("failed to read font file");
+
+ let font_key = FontKey::new(IdNamespace(0), 0);
+ glyph_rasterizer.add_font(font_key, FontTemplate::Raw(Arc::new(font_data), 0));
+
+ let font = FontInstance::from_base(Arc::new(BaseFontInstance {
+ instance_key: FontInstanceKey(IdNamespace(0), 0),
+ font_key,
+ size: FontSize::from_f32_px(32.0),
+ bg_color: ColorU::new(0, 0, 0, 0),
+ render_mode: FontRenderMode::Subpixel,
+ flags: Default::default(),
+ synthetic_italics: Default::default(),
+ platform_options: None,
+ variations: Vec::new(),
+ }));
+
+ let subpx_dir = font.get_subpx_dir();
+
+ let mut glyph_keys = Vec::with_capacity(200);
+ for i in 0 .. 200 {
+ glyph_keys.push(GlyphKey::new(
+ i,
+ DevicePoint::zero(),
+ subpx_dir,
+ ));
+ }
+
+ for i in 0 .. 4 {
+ glyph_rasterizer.request_glyphs(
+ &mut glyph_cache,
+ font.clone(),
+ &glyph_keys[(50 * i) .. (50 * (i + 1))],
+ &mut texture_cache,
+ &mut gpu_cache,
+ &mut render_task_cache,
+ &mut render_task_tree,
+ );
+ }
+
+ glyph_rasterizer.delete_font(font_key);
+
+ glyph_rasterizer.resolve_glyphs(
+ &mut glyph_cache,
+ &mut TextureCache::new_for_testing(4096, 1024, FORMAT),
+ &mut gpu_cache,
+ &mut render_task_cache,
+ &mut render_task_tree,
+ &mut TextureCacheProfileCounters::new(),
+ );
+ }
+
+ #[test]
+ fn test_subpx_quantize() {
+ use crate::glyph_rasterizer::SubpixelOffset;
+
+ assert_eq!(SubpixelOffset::quantize(0.0), SubpixelOffset::Zero);
+ assert_eq!(SubpixelOffset::quantize(-0.0), SubpixelOffset::Zero);
+
+ assert_eq!(SubpixelOffset::quantize(0.1), SubpixelOffset::Zero);
+ assert_eq!(SubpixelOffset::quantize(0.01), SubpixelOffset::Zero);
+ assert_eq!(SubpixelOffset::quantize(0.05), SubpixelOffset::Zero);
+ assert_eq!(SubpixelOffset::quantize(0.12), SubpixelOffset::Zero);
+ assert_eq!(SubpixelOffset::quantize(0.124), SubpixelOffset::Zero);
+
+ assert_eq!(SubpixelOffset::quantize(0.125), SubpixelOffset::Quarter);
+ assert_eq!(SubpixelOffset::quantize(0.2), SubpixelOffset::Quarter);
+ assert_eq!(SubpixelOffset::quantize(0.25), SubpixelOffset::Quarter);
+ assert_eq!(SubpixelOffset::quantize(0.33), SubpixelOffset::Quarter);
+ assert_eq!(SubpixelOffset::quantize(0.374), SubpixelOffset::Quarter);
+
+ assert_eq!(SubpixelOffset::quantize(0.375), SubpixelOffset::Half);
+ assert_eq!(SubpixelOffset::quantize(0.4), SubpixelOffset::Half);
+ assert_eq!(SubpixelOffset::quantize(0.5), SubpixelOffset::Half);
+ assert_eq!(SubpixelOffset::quantize(0.58), SubpixelOffset::Half);
+ assert_eq!(SubpixelOffset::quantize(0.624), SubpixelOffset::Half);
+
+ assert_eq!(SubpixelOffset::quantize(0.625), SubpixelOffset::ThreeQuarters);
+ assert_eq!(SubpixelOffset::quantize(0.67), SubpixelOffset::ThreeQuarters);
+ assert_eq!(SubpixelOffset::quantize(0.7), SubpixelOffset::ThreeQuarters);
+ assert_eq!(SubpixelOffset::quantize(0.78), SubpixelOffset::ThreeQuarters);
+ assert_eq!(SubpixelOffset::quantize(0.874), SubpixelOffset::ThreeQuarters);
+
+ assert_eq!(SubpixelOffset::quantize(0.875), SubpixelOffset::Zero);
+ assert_eq!(SubpixelOffset::quantize(0.89), SubpixelOffset::Zero);
+ assert_eq!(SubpixelOffset::quantize(0.91), SubpixelOffset::Zero);
+ assert_eq!(SubpixelOffset::quantize(0.967), SubpixelOffset::Zero);
+ assert_eq!(SubpixelOffset::quantize(0.999), SubpixelOffset::Zero);
+
+ assert_eq!(SubpixelOffset::quantize(-1.0), SubpixelOffset::Zero);
+ assert_eq!(SubpixelOffset::quantize(1.0), SubpixelOffset::Zero);
+ assert_eq!(SubpixelOffset::quantize(1.5), SubpixelOffset::Half);
+ assert_eq!(SubpixelOffset::quantize(-1.625), SubpixelOffset::Half);
+ assert_eq!(SubpixelOffset::quantize(-4.33), SubpixelOffset::ThreeQuarters);
+ }
+}
diff --git a/third_party/webrender/webrender/src/gpu_cache.rs b/third_party/webrender/webrender/src/gpu_cache.rs
new file mode 100644
index 00000000000..c34efd09d8b
--- /dev/null
+++ b/third_party/webrender/webrender/src/gpu_cache.rs
@@ -0,0 +1,924 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! Overview of the GPU cache.
+//!
+//! The main goal of the GPU cache is to allow on-demand
+//! allocation and construction of GPU resources for the
+//! vertex shaders to consume.
+//!
+//! Every item that wants to be stored in the GPU cache
+//! should create a GpuCacheHandle that is used to refer
+//! to a cached GPU resource. Creating a handle is a
+//! cheap operation, that does *not* allocate room in the
+//! cache.
+//!
+//! On any frame when that data is required, the caller
+//! must request that handle, via ```request```. If the
+//! data is not in the cache, the user provided closure
+//! will be invoked to build the data.
+//!
+//! After ```end_frame``` has occurred, callers can
+//! use the ```get_address``` API to get the allocated
+//! address in the GPU cache of a given resource slot
+//! for this frame.
+
+use api::{DebugFlags, DocumentId, PremultipliedColorF};
+#[cfg(test)]
+use api::IdNamespace;
+use api::units::TexelRect;
+use euclid::{HomogeneousVector, Rect};
+use crate::internal_types::{FastHashMap, FastHashSet};
+use crate::profiler::GpuCacheProfileCounters;
+use crate::render_backend::{FrameStamp, FrameId};
+use crate::renderer::MAX_VERTEX_TEXTURE_WIDTH;
+use std::{mem, u16, u32};
+use std::num::NonZeroU32;
+use std::ops::Add;
+use std::time::{Duration, Instant};
+
+
+/// At the time of this writing, Firefox uses about 15 GPU cache rows on
+/// startup, and then gradually works its way up to the mid-30s with normal
+/// browsing.
+pub const GPU_CACHE_INITIAL_HEIGHT: i32 = 20;
+const NEW_ROWS_PER_RESIZE: i32 = 10;
+
+/// The number of frames an entry can go unused before being evicted.
+const FRAMES_BEFORE_EVICTION: usize = 10;
+
+/// The ratio of utilized blocks to total blocks for which we start the clock
+/// on reclaiming memory.
+const RECLAIM_THRESHOLD: f32 = 0.2;
+
+/// The amount of time utilization must be below the above threshold before we
+/// blow away the cache and rebuild it.
+const RECLAIM_DELAY_S: u64 = 5;
+
+#[derive(Debug, Copy, Clone, Eq, MallocSizeOf, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct Epoch(u32);
+
+impl Epoch {
+ fn next(&mut self) {
+ *self = Epoch(self.0.wrapping_add(1));
+ }
+}
+
+#[derive(Debug, Copy, Clone, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct CacheLocation {
+ block_index: BlockIndex,
+ epoch: Epoch,
+}
+
+/// A single texel in RGBAF32 texture - 16 bytes.
+#[derive(Copy, Clone, Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct GpuBlockData {
+ data: [f32; 4],
+}
+
+impl GpuBlockData {
+ pub const EMPTY: Self = GpuBlockData { data: [0.0; 4] };
+}
+
+/// Conversion helpers for GpuBlockData
+impl From<PremultipliedColorF> for GpuBlockData {
+ fn from(c: PremultipliedColorF) -> Self {
+ GpuBlockData {
+ data: [c.r, c.g, c.b, c.a],
+ }
+ }
+}
+
+impl From<[f32; 4]> for GpuBlockData {
+ fn from(data: [f32; 4]) -> Self {
+ GpuBlockData { data }
+ }
+}
+
+impl<P> From<Rect<f32, P>> for GpuBlockData {
+ fn from(r: Rect<f32, P>) -> Self {
+ GpuBlockData {
+ data: [
+ r.origin.x,
+ r.origin.y,
+ r.size.width,
+ r.size.height,
+ ],
+ }
+ }
+}
+
+impl<P> From<HomogeneousVector<f32, P>> for GpuBlockData {
+ fn from(v: HomogeneousVector<f32, P>) -> Self {
+ GpuBlockData {
+ data: [
+ v.x,
+ v.y,
+ v.z,
+ v.w,
+ ],
+ }
+ }
+}
+
+impl From<TexelRect> for GpuBlockData {
+ fn from(tr: TexelRect) -> Self {
+ GpuBlockData {
+ data: [tr.uv0.x, tr.uv0.y, tr.uv1.x, tr.uv1.y],
+ }
+ }
+}
+
+
+// Any data type that can be stored in the GPU cache should
+// implement this trait.
+pub trait ToGpuBlocks {
+ // Request an arbitrary number of GPU data blocks.
+ fn write_gpu_blocks(&self, _: GpuDataRequest);
+}
+
+// A handle to a GPU resource.
+#[derive(Debug, Copy, Clone, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct GpuCacheHandle {
+ location: Option<CacheLocation>,
+}
+
+impl GpuCacheHandle {
+ pub fn new() -> Self {
+ GpuCacheHandle { location: None }
+ }
+}
+
+// A unique address in the GPU cache. These are uploaded
+// as part of the primitive instances, to allow the vertex
+// shader to fetch the specific data.
+#[derive(Copy, Debug, Clone, MallocSizeOf, Eq, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct GpuCacheAddress {
+ pub u: u16,
+ pub v: u16,
+}
+
+impl GpuCacheAddress {
+ fn new(u: usize, v: usize) -> Self {
+ GpuCacheAddress {
+ u: u as u16,
+ v: v as u16,
+ }
+ }
+
+ pub const INVALID: GpuCacheAddress = GpuCacheAddress {
+ u: u16::MAX,
+ v: u16::MAX,
+ };
+}
+
+impl Add<usize> for GpuCacheAddress {
+ type Output = GpuCacheAddress;
+
+ fn add(self, other: usize) -> GpuCacheAddress {
+ GpuCacheAddress {
+ u: self.u + other as u16,
+ v: self.v,
+ }
+ }
+}
+
+// An entry in a free-list of blocks in the GPU cache.
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct Block {
+ // The location in the cache of this block.
+ address: GpuCacheAddress,
+ // The current epoch (generation) of this block.
+ epoch: Epoch,
+ // Index of the next free block in the list it
+ // belongs to (either a free-list or the
+ // occupied list).
+ next: Option<BlockIndex>,
+ // The last frame this block was referenced.
+ last_access_time: FrameId,
+}
+
+impl Block {
+ fn new(
+ address: GpuCacheAddress,
+ next: Option<BlockIndex>,
+ frame_id: FrameId,
+ epoch: Epoch,
+ ) -> Self {
+ Block {
+ address,
+ next,
+ last_access_time: frame_id,
+ epoch,
+ }
+ }
+
+ fn advance_epoch(&mut self, max_epoch: &mut Epoch) {
+ self.epoch.next();
+ if max_epoch.0 < self.epoch.0 {
+ max_epoch.0 = self.epoch.0;
+ }
+ }
+
+ /// Creates an invalid dummy block ID.
+ pub const INVALID: Block = Block {
+ address: GpuCacheAddress { u: 0, v: 0 },
+ epoch: Epoch(0),
+ next: None,
+ last_access_time: FrameId::INVALID,
+ };
+}
+
+/// Represents the index of a Block in the block array. We only create such
+/// structs for blocks that represent the start of a chunk.
+///
+/// Because we use Option<BlockIndex> in a lot of places, we use a NonZeroU32
+/// here and avoid ever using the index zero.
+#[derive(Debug, Copy, Clone, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct BlockIndex(NonZeroU32);
+
+impl BlockIndex {
+ fn new(idx: usize) -> Self {
+ debug_assert!(idx <= u32::MAX as usize);
+ BlockIndex(NonZeroU32::new(idx as u32).expect("Index zero forbidden"))
+ }
+
+ fn get(&self) -> usize {
+ self.0.get() as usize
+ }
+}
+
+// A row in the cache texture.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+struct Row {
+ // The fixed size of blocks that this row supports.
+ // Each row becomes a slab allocator for a fixed block size.
+ // This means no dealing with fragmentation within a cache
+ // row as items are allocated and freed.
+ block_count_per_item: usize,
+}
+
+impl Row {
+ fn new(block_count_per_item: usize) -> Self {
+ Row {
+ block_count_per_item,
+ }
+ }
+}
+
+// A list of update operations that can be applied on the cache
+// this frame. The list of updates is created by the render backend
+// during frame construction. It's passed to the render thread
+// where GL commands can be applied.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub enum GpuCacheUpdate {
+ Copy {
+ block_index: usize,
+ block_count: usize,
+ address: GpuCacheAddress,
+ },
+}
+
+/// Command to inform the debug display in the renderer when chunks are allocated
+/// or freed.
+#[derive(MallocSizeOf)]
+pub enum GpuCacheDebugCmd {
+ /// Describes an allocated chunk.
+ Alloc(GpuCacheDebugChunk),
+ /// Describes a freed chunk.
+ Free(GpuCacheAddress),
+}
+
+#[derive(Clone, MallocSizeOf)]
+pub struct GpuCacheDebugChunk {
+ pub address: GpuCacheAddress,
+ pub size: usize,
+}
+
+#[must_use]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct GpuCacheUpdateList {
+ /// The frame current update list was generated from.
+ pub frame_id: FrameId,
+ /// Whether the texture should be cleared before updates
+ /// are applied.
+ pub clear: bool,
+ /// The current height of the texture. The render thread
+ /// should resize the texture if required.
+ pub height: i32,
+ /// List of updates to apply.
+ pub updates: Vec<GpuCacheUpdate>,
+ /// A flat list of GPU blocks that are pending upload
+ /// to GPU memory.
+ pub blocks: Vec<GpuBlockData>,
+ /// Whole state GPU block metadata for debugging.
+ #[cfg_attr(feature = "serde", serde(skip))]
+ pub debug_commands: Vec<GpuCacheDebugCmd>,
+}
+
+// Holds the free lists of fixed size blocks. Mostly
+// just serves to work around the borrow checker.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+struct FreeBlockLists {
+ free_list_1: Option<BlockIndex>,
+ free_list_2: Option<BlockIndex>,
+ free_list_4: Option<BlockIndex>,
+ free_list_8: Option<BlockIndex>,
+ free_list_16: Option<BlockIndex>,
+ free_list_32: Option<BlockIndex>,
+ free_list_64: Option<BlockIndex>,
+ free_list_128: Option<BlockIndex>,
+ free_list_256: Option<BlockIndex>,
+ free_list_341: Option<BlockIndex>,
+ free_list_512: Option<BlockIndex>,
+ free_list_1024: Option<BlockIndex>,
+}
+
+impl FreeBlockLists {
+ fn new() -> Self {
+ FreeBlockLists {
+ free_list_1: None,
+ free_list_2: None,
+ free_list_4: None,
+ free_list_8: None,
+ free_list_16: None,
+ free_list_32: None,
+ free_list_64: None,
+ free_list_128: None,
+ free_list_256: None,
+ free_list_341: None,
+ free_list_512: None,
+ free_list_1024: None,
+ }
+ }
+
+ fn get_actual_block_count_and_free_list(
+ &mut self,
+ block_count: usize,
+ ) -> (usize, &mut Option<BlockIndex>) {
+ // Find the appropriate free list to use based on the block size.
+ //
+ // Note that we cheat a bit with the 341 bucket, since it's not quite
+ // a divisor of 1024, because purecss-francine allocates many 260-block
+ // chunks, and there's no reason we shouldn't pack these three to a row.
+ // This means the allocation statistics will under-report by one block
+ // for each row using 341-block buckets, which is fine.
+ debug_assert_eq!(MAX_VERTEX_TEXTURE_WIDTH, 1024, "Need to update bucketing");
+ match block_count {
+ 0 => panic!("Can't allocate zero sized blocks!"),
+ 1 => (1, &mut self.free_list_1),
+ 2 => (2, &mut self.free_list_2),
+ 3..=4 => (4, &mut self.free_list_4),
+ 5..=8 => (8, &mut self.free_list_8),
+ 9..=16 => (16, &mut self.free_list_16),
+ 17..=32 => (32, &mut self.free_list_32),
+ 33..=64 => (64, &mut self.free_list_64),
+ 65..=128 => (128, &mut self.free_list_128),
+ 129..=256 => (256, &mut self.free_list_256),
+ 257..=341 => (341, &mut self.free_list_341),
+ 342..=512 => (512, &mut self.free_list_512),
+ 513..=1024 => (1024, &mut self.free_list_1024),
+ _ => panic!("Can't allocate > MAX_VERTEX_TEXTURE_WIDTH per resource!"),
+ }
+ }
+}
+
+// CPU-side representation of the GPU resource cache texture.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+struct Texture {
+ // Current texture height
+ height: i32,
+ // All blocks that have been created for this texture
+ blocks: Vec<Block>,
+ // Metadata about each allocated row.
+ rows: Vec<Row>,
+ // The base Epoch for this texture.
+ base_epoch: Epoch,
+ // The maximum epoch reached. We track this along with the above so
+ // that we can rebuild the Texture and avoid collisions with handles
+ // allocated for the old texture.
+ max_epoch: Epoch,
+ // Free lists of available blocks for each supported
+ // block size in the texture. These are intrusive
+ // linked lists.
+ free_lists: FreeBlockLists,
+ // Linked list of currently occupied blocks. This
+ // makes it faster to iterate blocks looking for
+ // candidates to be evicted from the cache.
+ occupied_list_heads: FastHashMap<DocumentId, BlockIndex>,
+ // Pending blocks that have been written this frame
+ // and will need to be sent to the GPU.
+ pending_blocks: Vec<GpuBlockData>,
+ // Pending update commands.
+ updates: Vec<GpuCacheUpdate>,
+ // Profile stats
+ allocated_block_count: usize,
+ // The stamp at which we first reached our threshold for reclaiming `GpuCache`
+ // memory, or `None` if the threshold hasn't been reached.
+ #[cfg_attr(feature = "serde", serde(skip))]
+ reached_reclaim_threshold: Option<Instant>,
+ // List of debug commands to be sent to the renderer when the GPU cache
+ // debug display is enabled.
+ #[cfg_attr(feature = "serde", serde(skip))]
+ debug_commands: Vec<GpuCacheDebugCmd>,
+ // The current debug flags for the system.
+ debug_flags: DebugFlags,
+}
+
+impl Texture {
+ fn new(base_epoch: Epoch, debug_flags: DebugFlags) -> Self {
+ // Pre-fill the block array with one invalid block so that we never use
+ // 0 for a BlockIndex. This lets us use NonZeroU32 for BlockIndex, which
+ // saves memory.
+ let blocks = vec![Block::INVALID];
+
+ Texture {
+ height: GPU_CACHE_INITIAL_HEIGHT,
+ blocks,
+ rows: Vec::new(),
+ base_epoch,
+ max_epoch: base_epoch,
+ free_lists: FreeBlockLists::new(),
+ pending_blocks: Vec::new(),
+ updates: Vec::new(),
+ occupied_list_heads: FastHashMap::default(),
+ allocated_block_count: 0,
+ reached_reclaim_threshold: None,
+ debug_commands: Vec::new(),
+ debug_flags,
+ }
+ }
+
+ // Push new data into the cache. The ```pending_block_index``` field represents
+ // where the data was pushed into the texture ```pending_blocks``` array.
+ // Return the allocated address for this data.
+ fn push_data(
+ &mut self,
+ pending_block_index: Option<usize>,
+ block_count: usize,
+ frame_stamp: FrameStamp
+ ) -> CacheLocation {
+ debug_assert!(frame_stamp.is_valid());
+ // Find the appropriate free list to use based on the block size.
+ let (alloc_size, free_list) = self.free_lists
+ .get_actual_block_count_and_free_list(block_count);
+
+ // See if we need a new row (if free-list has nothing available)
+ if free_list.is_none() {
+ if self.rows.len() as i32 == self.height {
+ self.height += NEW_ROWS_PER_RESIZE;
+ }
+
+ // Create a new row.
+ let items_per_row = MAX_VERTEX_TEXTURE_WIDTH / alloc_size;
+ let row_index = self.rows.len();
+ self.rows.push(Row::new(alloc_size));
+
+ // Create a ```Block``` for each possible allocation address
+ // in this row, and link it in to the free-list for this
+ // block size.
+ let mut prev_block_index = None;
+ for i in 0 .. items_per_row {
+ let address = GpuCacheAddress::new(i * alloc_size, row_index);
+ let block_index = BlockIndex::new(self.blocks.len());
+ let block = Block::new(address, prev_block_index, frame_stamp.frame_id(), self.base_epoch);
+ self.blocks.push(block);
+ prev_block_index = Some(block_index);
+ }
+
+ *free_list = prev_block_index;
+ }
+
+ // Given the code above, it's now guaranteed that there is a block
+ // available in the appropriate free-list. Pull a block from the
+ // head of the list.
+ let free_block_index = free_list.take().unwrap();
+ let block = &mut self.blocks[free_block_index.get()];
+ *free_list = block.next;
+
+ // Add the block to the occupied linked list.
+ block.next = self.occupied_list_heads.get(&frame_stamp.document_id()).cloned();
+ block.last_access_time = frame_stamp.frame_id();
+ self.occupied_list_heads.insert(frame_stamp.document_id(), free_block_index);
+ self.allocated_block_count += alloc_size;
+
+ if let Some(pending_block_index) = pending_block_index {
+ // Add this update to the pending list of blocks that need
+ // to be updated on the GPU.
+ self.updates.push(GpuCacheUpdate::Copy {
+ block_index: pending_block_index,
+ block_count,
+ address: block.address,
+ });
+ }
+
+ // If we're using the debug display, communicate the allocation to the
+ // renderer thread. Note that we do this regardless of whether or not
+ // pending_block_index is None (if it is, the renderer thread will fill
+ // in the data via a deferred resolve, but the block is still considered
+ // allocated).
+ if self.debug_flags.contains(DebugFlags::GPU_CACHE_DBG) {
+ self.debug_commands.push(GpuCacheDebugCmd::Alloc(GpuCacheDebugChunk {
+ address: block.address,
+ size: block_count,
+ }));
+ }
+
+ CacheLocation {
+ block_index: free_block_index,
+ epoch: block.epoch,
+ }
+ }
+
+ // Run through the list of occupied cache blocks and evict
+ // any old blocks that haven't been referenced for a while.
+ fn evict_old_blocks(&mut self, frame_stamp: FrameStamp) {
+ debug_assert!(frame_stamp.is_valid());
+ // Prune any old items from the list to make room.
+ // Traverse the occupied linked list and see
+ // which items have not been used for a long time.
+ let mut current_block = self.occupied_list_heads.get(&frame_stamp.document_id()).map(|x| *x);
+ let mut prev_block: Option<BlockIndex> = None;
+
+ while let Some(index) = current_block {
+ let (next_block, should_unlink) = {
+ let block = &mut self.blocks[index.get()];
+
+ let next_block = block.next;
+ let mut should_unlink = false;
+
+ // If this resource has not been used in the last
+ // few frames, free it from the texture and mark
+ // as empty.
+ if block.last_access_time + FRAMES_BEFORE_EVICTION < frame_stamp.frame_id() {
+ should_unlink = true;
+
+ // Get the row metadata from the address.
+ let row = &mut self.rows[block.address.v as usize];
+
+ // Use the row metadata to determine which free-list
+ // this block belongs to.
+ let (_, free_list) = self.free_lists
+ .get_actual_block_count_and_free_list(row.block_count_per_item);
+
+ block.advance_epoch(&mut self.max_epoch);
+ block.next = *free_list;
+ *free_list = Some(index);
+
+ self.allocated_block_count -= row.block_count_per_item;
+
+ if self.debug_flags.contains(DebugFlags::GPU_CACHE_DBG) {
+ let cmd = GpuCacheDebugCmd::Free(block.address);
+ self.debug_commands.push(cmd);
+ }
+ };
+
+ (next_block, should_unlink)
+ };
+
+ // If the block was released, we will need to remove it
+ // from the occupied linked list.
+ if should_unlink {
+ match prev_block {
+ Some(prev_block) => {
+ self.blocks[prev_block.get()].next = next_block;
+ }
+ None => {
+ match next_block {
+ Some(next_block) => {
+ self.occupied_list_heads.insert(frame_stamp.document_id(), next_block);
+ }
+ None => {
+ self.occupied_list_heads.remove(&frame_stamp.document_id());
+ }
+ }
+ }
+ }
+ } else {
+ prev_block = current_block;
+ }
+
+ current_block = next_block;
+ }
+ }
+
+ /// Returns the ratio of utilized blocks.
+ fn utilization(&self) -> f32 {
+ let total_blocks = self.rows.len() * MAX_VERTEX_TEXTURE_WIDTH;
+ debug_assert!(total_blocks > 0);
+ let ratio = self.allocated_block_count as f32 / total_blocks as f32;
+ debug_assert!(0.0 <= ratio && ratio <= 1.0, "Bad ratio: {}", ratio);
+ ratio
+ }
+}
+
+
+/// A wrapper object for GPU data requests,
+/// works as a container that can only grow.
+#[must_use]
+pub struct GpuDataRequest<'a> {
+ handle: &'a mut GpuCacheHandle,
+ frame_stamp: FrameStamp,
+ start_index: usize,
+ max_block_count: usize,
+ texture: &'a mut Texture,
+}
+
+impl<'a> GpuDataRequest<'a> {
+ pub fn push<B>(&mut self, block: B)
+ where
+ B: Into<GpuBlockData>,
+ {
+ self.texture.pending_blocks.push(block.into());
+ }
+
+ pub fn current_used_block_num(&self) -> usize {
+ self.texture.pending_blocks.len() - self.start_index
+ }
+}
+
+impl<'a> Drop for GpuDataRequest<'a> {
+ fn drop(&mut self) {
+ // Push the data to the texture pending updates list.
+ let block_count = self.current_used_block_num();
+ debug_assert!(block_count <= self.max_block_count);
+
+ let location = self.texture
+ .push_data(Some(self.start_index), block_count, self.frame_stamp);
+ self.handle.location = Some(location);
+ }
+}
+
+
+/// The main LRU cache interface.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct GpuCache {
+ /// Current FrameId.
+ now: FrameStamp,
+ /// CPU-side texture allocator.
+ texture: Texture,
+ /// Number of blocks requested this frame that don't
+ /// need to be re-uploaded.
+ saved_block_count: usize,
+ /// The current debug flags for the system.
+ debug_flags: DebugFlags,
+ /// Whether there is a pending clear to send with the
+ /// next update.
+ pending_clear: bool,
+ /// Indicates that prepare_for_frames has been called for this group of frames.
+ /// Used for sanity checks.
+ prepared_for_frames: bool,
+ /// This indicates that we performed a cleanup operation which requires all
+ /// documents to build a frame.
+ requires_frame_build: bool,
+ /// The set of documents which have had frames built in this update. Used for
+ /// sanity checks.
+ document_frames_to_build: FastHashSet<DocumentId>,
+}
+
+impl GpuCache {
+ pub fn new() -> Self {
+ let debug_flags = DebugFlags::empty();
+ GpuCache {
+ now: FrameStamp::INVALID,
+ texture: Texture::new(Epoch(0), debug_flags),
+ saved_block_count: 0,
+ debug_flags,
+ pending_clear: false,
+ prepared_for_frames: false,
+ requires_frame_build: false,
+ document_frames_to_build: FastHashSet::default(),
+ }
+ }
+
+ /// Creates a GpuCache and sets it up with a valid `FrameStamp`, which
+ /// is useful for avoiding panics when instantiating the `GpuCache`
+ /// directly from unit test code.
+ #[cfg(test)]
+ pub fn new_for_testing() -> Self {
+ let mut cache = Self::new();
+ let mut now = FrameStamp::first(DocumentId::new(IdNamespace(1), 1));
+ now.advance();
+ cache.prepared_for_frames = true;
+ cache.begin_frame(now);
+ cache
+ }
+
+ /// Drops everything in the GPU cache. Must not be called once gpu cache entries
+ /// for the next frame have already been requested.
+ pub fn clear(&mut self) {
+ assert!(self.texture.updates.is_empty(), "Clearing with pending updates");
+ let mut next_base_epoch = self.texture.max_epoch;
+ next_base_epoch.next();
+ self.texture = Texture::new(next_base_epoch, self.debug_flags);
+ self.saved_block_count = 0;
+ self.pending_clear = true;
+ self.requires_frame_build = true;
+ }
+
+ pub fn requires_frame_build(&self) -> bool {
+ self.requires_frame_build
+ }
+
+ pub fn prepare_for_frames(&mut self) {
+ self.prepared_for_frames = true;
+ if self.should_reclaim_memory() {
+ self.clear();
+ debug_assert!(self.document_frames_to_build.is_empty());
+ for &document_id in self.texture.occupied_list_heads.keys() {
+ self.document_frames_to_build.insert(document_id);
+ }
+ }
+ }
+
+ pub fn bookkeep_after_frames(&mut self) {
+ assert!(self.document_frames_to_build.is_empty());
+ assert!(self.prepared_for_frames);
+ self.requires_frame_build = false;
+ self.prepared_for_frames = false;
+ }
+
+ /// Begin a new frame.
+ pub fn begin_frame(&mut self, stamp: FrameStamp) {
+ debug_assert!(self.texture.pending_blocks.is_empty());
+ assert!(self.prepared_for_frames);
+ profile_scope!("begin_frame");
+ self.now = stamp;
+ self.texture.evict_old_blocks(self.now);
+ self.saved_block_count = 0;
+ }
+
+ // Invalidate a (possibly) existing block in the cache.
+ // This means the next call to request() for this location
+ // will rebuild the data and upload it to the GPU.
+ pub fn invalidate(&mut self, handle: &GpuCacheHandle) {
+ if let Some(ref location) = handle.location {
+ // don't invalidate blocks that are already re-assigned
+ if let Some(block) = self.texture.blocks.get_mut(location.block_index.get()) {
+ if block.epoch == location.epoch {
+ block.advance_epoch(&mut self.texture.max_epoch);
+ }
+ }
+ }
+ }
+
+ /// Request a resource be added to the cache. If the resource
+ /// is already in the cache, `None` will be returned.
+ pub fn request<'a>(&'a mut self, handle: &'a mut GpuCacheHandle) -> Option<GpuDataRequest<'a>> {
+ let mut max_block_count = MAX_VERTEX_TEXTURE_WIDTH;
+ // Check if the allocation for this handle is still valid.
+ if let Some(ref location) = handle.location {
+ if let Some(block) = self.texture.blocks.get_mut(location.block_index.get()) {
+ if block.epoch == location.epoch {
+ max_block_count = self.texture.rows[block.address.v as usize].block_count_per_item;
+ if block.last_access_time != self.now.frame_id() {
+ // Mark last access time to avoid evicting this block.
+ block.last_access_time = self.now.frame_id();
+ self.saved_block_count += max_block_count;
+ }
+ return None;
+ }
+ }
+ }
+
+ debug_assert!(self.now.is_valid());
+ Some(GpuDataRequest {
+ handle,
+ frame_stamp: self.now,
+ start_index: self.texture.pending_blocks.len(),
+ texture: &mut self.texture,
+ max_block_count,
+ })
+ }
+
+ // Push an array of data blocks to be uploaded to the GPU
+ // unconditionally for this frame. The cache handle will
+ // assert if the caller tries to retrieve the address
+ // of this handle on a subsequent frame. This is typically
+ // used for uploading data that changes every frame, and
+ // therefore makes no sense to try and cache.
+ pub fn push_per_frame_blocks(&mut self, blocks: &[GpuBlockData]) -> GpuCacheHandle {
+ let start_index = self.texture.pending_blocks.len();
+ self.texture.pending_blocks.extend_from_slice(blocks);
+ let location = self.texture
+ .push_data(Some(start_index), blocks.len(), self.now);
+ GpuCacheHandle {
+ location: Some(location),
+ }
+ }
+
+ // Reserve space in the cache for per-frame blocks that
+ // will be resolved by the render thread via the
+ // external image callback.
+ pub fn push_deferred_per_frame_blocks(&mut self, block_count: usize) -> GpuCacheHandle {
+ let location = self.texture.push_data(None, block_count, self.now);
+ GpuCacheHandle {
+ location: Some(location),
+ }
+ }
+
+ /// End the frame. Return the list of updates to apply to the
+ /// device specific cache texture.
+ pub fn end_frame(
+ &mut self,
+ profile_counters: &mut GpuCacheProfileCounters,
+ ) -> FrameStamp {
+ profile_scope!("end_frame");
+ profile_counters
+ .allocated_rows
+ .set(self.texture.rows.len());
+ profile_counters
+ .allocated_blocks
+ .set(self.texture.allocated_block_count);
+ profile_counters
+ .saved_blocks
+ .set(self.saved_block_count);
+
+ let reached_threshold =
+ self.texture.rows.len() > (GPU_CACHE_INITIAL_HEIGHT as usize) &&
+ self.texture.utilization() < RECLAIM_THRESHOLD;
+ if reached_threshold {
+ self.texture.reached_reclaim_threshold.get_or_insert_with(Instant::now);
+ } else {
+ self.texture.reached_reclaim_threshold = None;
+ }
+
+ self.document_frames_to_build.remove(&self.now.document_id());
+ self.now
+ }
+
+ /// Returns true if utilization has been low enough for long enough that we
+ /// should blow the cache away and rebuild it.
+ pub fn should_reclaim_memory(&self) -> bool {
+ self.texture.reached_reclaim_threshold
+ .map_or(false, |t| t.elapsed() > Duration::from_secs(RECLAIM_DELAY_S))
+ }
+
+ /// Extract the pending updates from the cache.
+ pub fn extract_updates(&mut self) -> GpuCacheUpdateList {
+ let clear = self.pending_clear;
+ self.pending_clear = false;
+ GpuCacheUpdateList {
+ frame_id: self.now.frame_id(),
+ clear,
+ height: self.texture.height,
+ debug_commands: mem::replace(&mut self.texture.debug_commands, Vec::new()),
+ updates: mem::replace(&mut self.texture.updates, Vec::new()),
+ blocks: mem::replace(&mut self.texture.pending_blocks, Vec::new()),
+ }
+ }
+
+ /// Sets the current debug flags for the system.
+ pub fn set_debug_flags(&mut self, flags: DebugFlags) {
+ self.debug_flags = flags;
+ self.texture.debug_flags = flags;
+ }
+
+ /// Get the actual GPU address in the texture for a given slot ID.
+ /// It's assumed at this point that the given slot has been requested
+ /// and built for this frame. Attempting to get the address for a
+ /// freed or pending slot will panic!
+ pub fn get_address(&self, id: &GpuCacheHandle) -> GpuCacheAddress {
+ let location = id.location.expect("handle not requested or allocated!");
+ let block = &self.texture.blocks[location.block_index.get()];
+ debug_assert_eq!(block.epoch, location.epoch);
+ debug_assert_eq!(block.last_access_time, self.now.frame_id());
+ block.address
+ }
+}
+
+#[test]
+#[cfg(target_pointer_width = "64")]
+fn test_struct_sizes() {
+ use std::mem;
+ // We can end up with a lot of blocks stored in the global vec, and keeping
+ // them small helps reduce memory overhead.
+ assert_eq!(mem::size_of::<Block>(), 24, "Block size changed");
+}
diff --git a/third_party/webrender/webrender/src/gpu_types.rs b/third_party/webrender/webrender/src/gpu_types.rs
new file mode 100644
index 00000000000..8e85b4dff06
--- /dev/null
+++ b/third_party/webrender/webrender/src/gpu_types.rs
@@ -0,0 +1,832 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{AlphaType, DocumentLayer, PremultipliedColorF, YuvFormat, YuvColorSpace};
+use api::EdgeAaSegmentMask;
+use api::units::*;
+use crate::spatial_tree::{SpatialTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex};
+use crate::gpu_cache::{GpuCacheAddress, GpuDataRequest};
+use crate::internal_types::FastHashMap;
+use crate::render_task::RenderTaskAddress;
+use crate::renderer::ShaderColorMode;
+use std::i32;
+use crate::util::{TransformedRectKind, MatrixHelpers};
+use crate::glyph_rasterizer::SubpixelDirection;
+use crate::util::pack_as_float;
+
+// Contains type that must exactly match the same structures declared in GLSL.
+
+pub const VECS_PER_TRANSFORM: usize = 8;
+
+#[derive(Copy, Clone, Debug, PartialEq)]
+#[repr(C)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ZBufferId(pub i32);
+
+const MAX_DOCUMENT_LAYERS : i8 = 1 << 3;
+const MAX_DOCUMENT_LAYER_VALUE : i8 = MAX_DOCUMENT_LAYERS / 2 - 1;
+const MIN_DOCUMENT_LAYER_VALUE : i8 = -MAX_DOCUMENT_LAYERS / 2;
+
+impl ZBufferId {
+ pub fn invalid() -> Self {
+ ZBufferId(i32::MAX)
+ }
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ZBufferIdGenerator {
+ base: i32,
+ next: i32,
+ max_items_per_document_layer: i32,
+}
+
+impl ZBufferIdGenerator {
+ pub fn new(layer: DocumentLayer, max_depth_ids: i32) -> Self {
+ debug_assert!(layer >= MIN_DOCUMENT_LAYER_VALUE);
+ debug_assert!(layer <= MAX_DOCUMENT_LAYER_VALUE);
+ let max_items_per_document_layer = max_depth_ids / MAX_DOCUMENT_LAYERS as i32;
+ ZBufferIdGenerator {
+ base: layer as i32 * max_items_per_document_layer,
+ next: 0,
+ max_items_per_document_layer,
+ }
+ }
+
+ pub fn next(&mut self) -> ZBufferId {
+ debug_assert!(self.next < self.max_items_per_document_layer);
+ let id = ZBufferId(self.next + self.base);
+ self.next += 1;
+ id
+ }
+}
+
+/// A shader kind identifier that can be used by a generic-shader to select the behavior at runtime.
+///
+/// Not all brush kinds need to be present in this enum, only those we want to support in the generic
+/// brush shader.
+/// Do not use the 24 lowest bits. This will be packed with other information in the vertex attributes.
+/// The constants must match the corresponding defines in brush_multi.glsl.
+#[repr(i32)]
+#[derive(Copy, Clone, Debug, PartialEq)]
+pub enum BrushShaderKind {
+ None = 0,
+ Solid = 1,
+ Image = 2,
+ Text = 3,
+ LinearGradient = 4,
+ RadialGradient = 5,
+ ConicGradient = 6,
+ Blend = 7,
+ MixBlend = 8,
+ Yuv = 9,
+ Opacity = 10,
+}
+
+#[derive(Debug, Copy, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[repr(C)]
+pub enum RasterizationSpace {
+ Local = 0,
+ Screen = 1,
+}
+
+#[derive(Debug, Copy, Clone, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[repr(C)]
+pub enum BoxShadowStretchMode {
+ Stretch = 0,
+ Simple = 1,
+}
+
+#[repr(i32)]
+#[derive(Debug, Copy, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum BlurDirection {
+ Horizontal = 0,
+ Vertical,
+}
+
+#[derive(Debug)]
+#[repr(C)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BlurInstance {
+ pub task_address: RenderTaskAddress,
+ pub src_task_address: RenderTaskAddress,
+ pub blur_direction: BlurDirection,
+}
+
+#[derive(Debug)]
+#[repr(C)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ScalingInstance {
+ pub target_rect: DeviceRect,
+ pub source_rect: DeviceIntRect,
+ pub source_layer: i32,
+}
+
+#[derive(Debug)]
+#[repr(C)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct SvgFilterInstance {
+ pub task_address: RenderTaskAddress,
+ pub input_1_task_address: RenderTaskAddress,
+ pub input_2_task_address: RenderTaskAddress,
+ pub kind: u16,
+ pub input_count: u16,
+ pub generic_int: u16,
+ pub extra_data_address: GpuCacheAddress,
+}
+
+#[derive(Copy, Clone, Debug, Hash, MallocSizeOf, PartialEq, Eq)]
+#[repr(C)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum BorderSegment {
+ TopLeft,
+ TopRight,
+ BottomRight,
+ BottomLeft,
+ Left,
+ Top,
+ Right,
+ Bottom,
+}
+
+#[derive(Debug, Clone)]
+#[repr(C)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BorderInstance {
+ pub task_origin: DevicePoint,
+ pub local_rect: DeviceRect,
+ pub color0: PremultipliedColorF,
+ pub color1: PremultipliedColorF,
+ pub flags: i32,
+ pub widths: DeviceSize,
+ pub radius: DeviceSize,
+ pub clip_params: [f32; 8],
+}
+
+/// A clipping primitive drawn into the clipping mask.
+/// Could be an image or a rectangle, which defines the
+/// way `address` is treated.
+#[derive(Debug, Copy, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[repr(C)]
+pub struct ClipMaskInstance {
+ pub clip_transform_id: TransformPaletteId,
+ pub prim_transform_id: TransformPaletteId,
+ pub clip_data_address: GpuCacheAddress,
+ pub resource_address: GpuCacheAddress,
+ pub local_pos: LayoutPoint,
+ pub tile_rect: LayoutRect,
+ pub sub_rect: DeviceRect,
+ pub task_origin: DevicePoint,
+ pub screen_origin: DevicePoint,
+ pub device_pixel_scale: f32,
+}
+
+/// A border corner dot or dash drawn into the clipping mask.
+#[derive(Debug, Copy, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[repr(C)]
+pub struct ClipMaskBorderCornerDotDash {
+ pub clip_mask_instance: ClipMaskInstance,
+ pub dot_dash_data: [f32; 8],
+}
+
+// 16 bytes per instance should be enough for anyone!
+#[derive(Debug, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PrimitiveInstanceData {
+ data: [i32; 4],
+}
+
+/// Vertex format for resolve style operations with pixel local storage.
+#[derive(Debug, Clone)]
+#[repr(C)]
+pub struct ResolveInstanceData {
+ rect: [f32; 4],
+}
+
+impl ResolveInstanceData {
+ pub fn new(rect: DeviceIntRect) -> Self {
+ ResolveInstanceData {
+ rect: [
+ rect.origin.x as f32,
+ rect.origin.y as f32,
+ rect.size.width as f32,
+ rect.size.height as f32,
+ ],
+ }
+ }
+}
+
+/// Vertex format for picture cache composite shader.
+/// When editing the members, update desc::COMPOSITE
+/// so its list of instance_attributes matches:
+#[derive(Debug, Clone)]
+#[repr(C)]
+pub struct CompositeInstance {
+ // Device space rectangle of surface
+ rect: DeviceRect,
+ // Device space clip rect for this surface
+ clip_rect: DeviceRect,
+ // Color for solid color tiles, white otherwise
+ color: PremultipliedColorF,
+
+ // Packed into a single vec4 (aParams)
+ z_id: f32,
+ color_space_or_uv_type: f32, // YuvColorSpace for YUV;
+ // UV coordinate space for RGB
+ yuv_format: f32, // YuvFormat
+ yuv_rescale: f32,
+
+ // UV rectangles (pixel space) for color / yuv texture planes
+ uv_rects: [TexelRect; 3],
+
+ // Texture array layers for color / yuv texture planes
+ texture_layers: [f32; 3],
+}
+
+impl CompositeInstance {
+ pub fn new(
+ rect: DeviceRect,
+ clip_rect: DeviceRect,
+ color: PremultipliedColorF,
+ layer: f32,
+ z_id: ZBufferId,
+ ) -> Self {
+ let uv = TexelRect::new(0.0, 0.0, 1.0, 1.0);
+ CompositeInstance {
+ rect,
+ clip_rect,
+ color,
+ z_id: z_id.0 as f32,
+ color_space_or_uv_type: pack_as_float(0u32),
+ yuv_format: 0.0,
+ yuv_rescale: 0.0,
+ texture_layers: [layer, 0.0, 0.0],
+ uv_rects: [uv, uv, uv],
+ }
+ }
+
+ pub fn new_rgb(
+ rect: DeviceRect,
+ clip_rect: DeviceRect,
+ color: PremultipliedColorF,
+ layer: f32,
+ z_id: ZBufferId,
+ uv_rect: TexelRect,
+ ) -> Self {
+ CompositeInstance {
+ rect,
+ clip_rect,
+ color,
+ z_id: z_id.0 as f32,
+ color_space_or_uv_type: pack_as_float(1u32),
+ yuv_format: 0.0,
+ yuv_rescale: 0.0,
+ texture_layers: [layer, 0.0, 0.0],
+ uv_rects: [uv_rect, uv_rect, uv_rect],
+ }
+ }
+
+ pub fn new_yuv(
+ rect: DeviceRect,
+ clip_rect: DeviceRect,
+ z_id: ZBufferId,
+ yuv_color_space: YuvColorSpace,
+ yuv_format: YuvFormat,
+ yuv_rescale: f32,
+ texture_layers: [f32; 3],
+ uv_rects: [TexelRect; 3],
+ ) -> Self {
+ CompositeInstance {
+ rect,
+ clip_rect,
+ color: PremultipliedColorF::WHITE,
+ z_id: z_id.0 as f32,
+ color_space_or_uv_type: pack_as_float(yuv_color_space as u32),
+ yuv_format: pack_as_float(yuv_format as u32),
+ yuv_rescale,
+ texture_layers,
+ uv_rects,
+ }
+ }
+}
+
+/// Vertex format for issuing colored quads.
+#[derive(Debug, Clone)]
+#[repr(C)]
+pub struct ClearInstance {
+ pub rect: [f32; 4],
+ pub color: [f32; 4],
+}
+
+#[derive(Debug, Copy, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PrimitiveHeaderIndex(pub i32);
+
+#[derive(Debug)]
+#[repr(C)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PrimitiveHeaders {
+ // The integer-type headers for a primitive.
+ pub headers_int: Vec<PrimitiveHeaderI>,
+ // The float-type headers for a primitive.
+ pub headers_float: Vec<PrimitiveHeaderF>,
+}
+
+impl PrimitiveHeaders {
+ pub fn new() -> PrimitiveHeaders {
+ PrimitiveHeaders {
+ headers_int: Vec::new(),
+ headers_float: Vec::new(),
+ }
+ }
+
+ // Add a new primitive header.
+ pub fn push(
+ &mut self,
+ prim_header: &PrimitiveHeader,
+ z: ZBufferId,
+ user_data: [i32; 4],
+ ) -> PrimitiveHeaderIndex {
+ debug_assert_eq!(self.headers_int.len(), self.headers_float.len());
+ let id = self.headers_float.len();
+
+ self.headers_float.push(PrimitiveHeaderF {
+ local_rect: prim_header.local_rect,
+ local_clip_rect: prim_header.local_clip_rect,
+ });
+
+ self.headers_int.push(PrimitiveHeaderI {
+ z,
+ unused: 0,
+ specific_prim_address: prim_header.specific_prim_address.as_int(),
+ transform_id: prim_header.transform_id,
+ user_data,
+ });
+
+ PrimitiveHeaderIndex(id as i32)
+ }
+}
+
+// This is a convenience type used to make it easier to pass
+// the common parts around during batching.
+#[derive(Debug)]
+pub struct PrimitiveHeader {
+ pub local_rect: LayoutRect,
+ pub local_clip_rect: LayoutRect,
+ pub specific_prim_address: GpuCacheAddress,
+ pub transform_id: TransformPaletteId,
+}
+
+// f32 parts of a primitive header
+#[derive(Debug)]
+#[repr(C)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PrimitiveHeaderF {
+ pub local_rect: LayoutRect,
+ pub local_clip_rect: LayoutRect,
+}
+
+// i32 parts of a primitive header
+// TODO(gw): Compress parts of these down to u16
+#[derive(Debug)]
+#[repr(C)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PrimitiveHeaderI {
+ pub z: ZBufferId,
+ pub specific_prim_address: i32,
+ pub transform_id: TransformPaletteId,
+ pub unused: i32, // To ensure required 16 byte alignment of vertex textures
+ pub user_data: [i32; 4],
+}
+
+pub struct GlyphInstance {
+ pub prim_header_index: PrimitiveHeaderIndex,
+}
+
+impl GlyphInstance {
+ pub fn new(
+ prim_header_index: PrimitiveHeaderIndex,
+ ) -> Self {
+ GlyphInstance {
+ prim_header_index,
+ }
+ }
+
+ // TODO(gw): Some of these fields can be moved to the primitive
+ // header since they are constant, and some can be
+ // compressed to a smaller size.
+ pub fn build(&self,
+ render_task: RenderTaskAddress,
+ clip_task: RenderTaskAddress,
+ subpx_dir: SubpixelDirection,
+ glyph_index_in_text_run: i32,
+ glyph_uv_rect: GpuCacheAddress,
+ color_mode: ShaderColorMode,
+ ) -> PrimitiveInstanceData {
+ PrimitiveInstanceData {
+ data: [
+ self.prim_header_index.0 as i32,
+ ((render_task.0 as i32) << 16)
+ | clip_task.0 as i32,
+ (subpx_dir as u32 as i32) << 24
+ | (color_mode as u32 as i32) << 16
+ | glyph_index_in_text_run,
+ glyph_uv_rect.as_int()
+ | ((BrushShaderKind::Text as i32) << 24),
+ ],
+ }
+ }
+}
+
+pub struct SplitCompositeInstance {
+ pub prim_header_index: PrimitiveHeaderIndex,
+ pub polygons_address: GpuCacheAddress,
+ pub z: ZBufferId,
+ pub render_task_address: RenderTaskAddress,
+}
+
+impl From<SplitCompositeInstance> for PrimitiveInstanceData {
+ fn from(instance: SplitCompositeInstance) -> Self {
+ PrimitiveInstanceData {
+ data: [
+ instance.prim_header_index.0,
+ instance.polygons_address.as_int(),
+ instance.z.0,
+ instance.render_task_address.0 as i32,
+ ],
+ }
+ }
+}
+
+bitflags! {
+ /// Flags that define how the common brush shader
+ /// code should process this instance.
+ #[cfg_attr(feature = "capture", derive(Serialize))]
+ #[cfg_attr(feature = "replay", derive(Deserialize))]
+ #[derive(MallocSizeOf)]
+ pub struct BrushFlags: u8 {
+ /// Apply perspective interpolation to UVs
+ const PERSPECTIVE_INTERPOLATION = 1;
+ /// Do interpolation relative to segment rect,
+ /// rather than primitive rect.
+ const SEGMENT_RELATIVE = 2;
+ /// Repeat UVs horizontally.
+ const SEGMENT_REPEAT_X = 4;
+ /// Repeat UVs vertically.
+ const SEGMENT_REPEAT_Y = 8;
+ /// Horizontally follow border-image-repeat: round.
+ const SEGMENT_REPEAT_X_ROUND = 16;
+ /// Vertically follow border-image-repeat: round.
+ const SEGMENT_REPEAT_Y_ROUND = 32;
+ /// Middle (fill) area of a border-image-repeat.
+ const SEGMENT_NINEPATCH_MIDDLE = 64;
+ /// The extra segment data is a texel rect.
+ const SEGMENT_TEXEL_RECT = 128;
+ }
+}
+
+/// Convenience structure to encode into PrimitiveInstanceData.
+pub struct BrushInstance {
+ pub prim_header_index: PrimitiveHeaderIndex,
+ pub render_task_address: RenderTaskAddress,
+ pub clip_task_address: RenderTaskAddress,
+ pub segment_index: i32,
+ pub edge_flags: EdgeAaSegmentMask,
+ pub brush_flags: BrushFlags,
+ pub resource_address: i32,
+ pub brush_kind: BrushShaderKind,
+}
+
+impl From<BrushInstance> for PrimitiveInstanceData {
+ fn from(instance: BrushInstance) -> Self {
+ PrimitiveInstanceData {
+ data: [
+ instance.prim_header_index.0,
+ ((instance.render_task_address.0 as i32) << 16)
+ | instance.clip_task_address.0 as i32,
+ instance.segment_index
+ | ((instance.edge_flags.bits() as i32) << 16)
+ | ((instance.brush_flags.bits() as i32) << 24),
+ instance.resource_address
+ | ((instance.brush_kind as i32) << 24),
+ ]
+ }
+ }
+}
+
+/// Convenience structure to encode into the image brush's user data.
+#[derive(Copy, Clone, Debug)]
+pub struct ImageBrushData {
+ pub color_mode: ShaderColorMode,
+ pub alpha_type: AlphaType,
+ pub raster_space: RasterizationSpace,
+ pub opacity: f32,
+}
+
+impl ImageBrushData {
+ #[inline]
+ pub fn encode(&self) -> [i32; 4] {
+ [
+ self.color_mode as i32 | ((self.alpha_type as i32) << 16),
+ self.raster_space as i32,
+ get_shader_opacity(self.opacity),
+ 0,
+ ]
+ }
+}
+
+// Represents the information about a transform palette
+// entry that is passed to shaders. It includes an index
+// into the transform palette, and a set of flags. The
+// only flag currently used determines whether the
+// transform is axis-aligned (and this should have
+// pixel snapping applied).
+#[derive(Copy, Debug, Clone, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[repr(C)]
+pub struct TransformPaletteId(pub u32);
+
+impl TransformPaletteId {
+ /// Identity transform ID.
+ pub const IDENTITY: Self = TransformPaletteId(0);
+
+ /// Extract the transform kind from the id.
+ pub fn transform_kind(&self) -> TransformedRectKind {
+ if (self.0 >> 24) == 0 {
+ TransformedRectKind::AxisAligned
+ } else {
+ TransformedRectKind::Complex
+ }
+ }
+}
+
+/// The GPU data payload for a transform palette entry.
+#[derive(Debug, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[repr(C)]
+pub struct TransformData {
+ transform: LayoutToPictureTransform,
+ inv_transform: PictureToLayoutTransform,
+}
+
+impl TransformData {
+ fn invalid() -> Self {
+ TransformData {
+ transform: LayoutToPictureTransform::identity(),
+ inv_transform: PictureToLayoutTransform::identity(),
+ }
+ }
+}
+
+// Extra data stored about each transform palette entry.
+#[derive(Clone)]
+pub struct TransformMetadata {
+ transform_kind: TransformedRectKind,
+}
+
+impl TransformMetadata {
+ pub fn invalid() -> Self {
+ TransformMetadata {
+ transform_kind: TransformedRectKind::AxisAligned,
+ }
+ }
+}
+
+#[derive(Debug, Hash, Eq, PartialEq)]
+struct RelativeTransformKey {
+ from_index: SpatialNodeIndex,
+ to_index: SpatialNodeIndex,
+}
+
+// Stores a contiguous list of TransformData structs, that
+// are ready for upload to the GPU.
+// TODO(gw): For now, this only stores the complete local
+// to world transform for each spatial node. In
+// the future, the transform palette will support
+// specifying a coordinate system that the transform
+// should be relative to.
+pub struct TransformPalette {
+ transforms: Vec<TransformData>,
+ metadata: Vec<TransformMetadata>,
+ map: FastHashMap<RelativeTransformKey, usize>,
+}
+
+impl TransformPalette {
+ pub fn new(count: usize) -> Self {
+ let _ = VECS_PER_TRANSFORM;
+ TransformPalette {
+ transforms: vec![TransformData::invalid(); count],
+ metadata: vec![TransformMetadata::invalid(); count],
+ map: FastHashMap::default(),
+ }
+ }
+
+ pub fn finish(self) -> Vec<TransformData> {
+ self.transforms
+ }
+
+ pub fn set_world_transform(
+ &mut self,
+ index: SpatialNodeIndex,
+ transform: LayoutToWorldTransform,
+ ) {
+ register_transform(
+ &mut self.metadata,
+ &mut self.transforms,
+ index,
+ ROOT_SPATIAL_NODE_INDEX,
+ // We know the root picture space == world space
+ transform.with_destination::<PicturePixel>(),
+ );
+ }
+
+ fn get_index(
+ &mut self,
+ child_index: SpatialNodeIndex,
+ parent_index: SpatialNodeIndex,
+ spatial_tree: &SpatialTree,
+ ) -> usize {
+ if parent_index == ROOT_SPATIAL_NODE_INDEX {
+ child_index.0 as usize
+ } else if child_index == parent_index {
+ 0
+ } else {
+ let key = RelativeTransformKey {
+ from_index: child_index,
+ to_index: parent_index,
+ };
+
+ let metadata = &mut self.metadata;
+ let transforms = &mut self.transforms;
+
+ *self.map
+ .entry(key)
+ .or_insert_with(|| {
+ let transform = spatial_tree.get_relative_transform(
+ child_index,
+ parent_index,
+ )
+ .into_transform()
+ .with_destination::<PicturePixel>();
+
+ register_transform(
+ metadata,
+ transforms,
+ child_index,
+ parent_index,
+ transform,
+ )
+ })
+ }
+ }
+
+ // Get a transform palette id for the given spatial node.
+ // TODO(gw): In the future, it will be possible to specify
+ // a coordinate system id here, to allow retrieving
+ // transforms in the local space of a given spatial node.
+ pub fn get_id(
+ &mut self,
+ from_index: SpatialNodeIndex,
+ to_index: SpatialNodeIndex,
+ spatial_tree: &SpatialTree,
+ ) -> TransformPaletteId {
+ let index = self.get_index(
+ from_index,
+ to_index,
+ spatial_tree,
+ );
+ let transform_kind = self.metadata[index].transform_kind as u32;
+ TransformPaletteId(
+ (index as u32) |
+ (transform_kind << 24)
+ )
+ }
+}
+
+// Texture cache resources can be either a simple rect, or define
+// a polygon within a rect by specifying a UV coordinate for each
+// corner. This is useful for rendering screen-space rasterized
+// off-screen surfaces.
+#[derive(Debug, Copy, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum UvRectKind {
+ // The 2d bounds of the texture cache entry define the
+ // valid UV space for this texture cache entry.
+ Rect,
+ // The four vertices below define a quad within
+ // the texture cache entry rect. The shader can
+ // use a bilerp() to correctly interpolate a
+ // UV coord in the vertex shader.
+ Quad {
+ top_left: DeviceHomogeneousVector,
+ top_right: DeviceHomogeneousVector,
+ bottom_left: DeviceHomogeneousVector,
+ bottom_right: DeviceHomogeneousVector,
+ },
+}
+
+#[derive(Debug, Copy, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ImageSource {
+ pub p0: DevicePoint,
+ pub p1: DevicePoint,
+ pub texture_layer: f32,
+ pub user_data: [f32; 3],
+ pub uv_rect_kind: UvRectKind,
+}
+
+impl ImageSource {
+ pub fn write_gpu_blocks(&self, request: &mut GpuDataRequest) {
+ // see fetch_image_resource in GLSL
+ // has to be VECS_PER_IMAGE_RESOURCE vectors
+ request.push([
+ self.p0.x,
+ self.p0.y,
+ self.p1.x,
+ self.p1.y,
+ ]);
+ request.push([
+ self.texture_layer,
+ self.user_data[0],
+ self.user_data[1],
+ self.user_data[2],
+ ]);
+
+ // If this is a polygon uv kind, then upload the four vertices.
+ if let UvRectKind::Quad { top_left, top_right, bottom_left, bottom_right } = self.uv_rect_kind {
+ // see fetch_image_resource_extra in GLSL
+ //Note: we really need only 3 components per point here: X, Y, and W
+ request.push(top_left);
+ request.push(top_right);
+ request.push(bottom_left);
+ request.push(bottom_right);
+ }
+ }
+}
+
+// Set the local -> world transform for a given spatial
+// node in the transform palette.
+fn register_transform(
+ metadatas: &mut Vec<TransformMetadata>,
+ transforms: &mut Vec<TransformData>,
+ from_index: SpatialNodeIndex,
+ to_index: SpatialNodeIndex,
+ transform: LayoutToPictureTransform,
+) -> usize {
+ // TODO: refactor the calling code to not even try
+ // registering a non-invertible transform.
+ let inv_transform = transform
+ .inverse()
+ .unwrap_or_else(PictureToLayoutTransform::identity);
+
+ let metadata = TransformMetadata {
+ transform_kind: transform.transform_kind()
+ };
+ let data = TransformData {
+ transform,
+ inv_transform,
+ };
+
+ if to_index == ROOT_SPATIAL_NODE_INDEX {
+ let index = from_index.0 as usize;
+ metadatas[index] = metadata;
+ transforms[index] = data;
+ index
+ } else {
+ let index = transforms.len();
+ metadatas.push(metadata);
+ transforms.push(data);
+ index
+ }
+}
+
+pub fn get_shader_opacity(opacity: f32) -> i32 {
+ (opacity * 65535.0).round() as i32
+}
diff --git a/third_party/webrender/webrender/src/hit_test.rs b/third_party/webrender/webrender/src/hit_test.rs
new file mode 100644
index 00000000000..4ab02b4124d
--- /dev/null
+++ b/third_party/webrender/webrender/src/hit_test.rs
@@ -0,0 +1,620 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{BorderRadius, ClipMode, HitTestFlags, HitTestItem, HitTestResult, ItemTag, PrimitiveFlags};
+use api::{PipelineId, ApiHitTester};
+use api::units::*;
+use crate::clip::{ClipChainId, ClipDataStore, ClipNode, ClipItemKind, ClipStore};
+use crate::clip::{rounded_rectangle_contains_point};
+use crate::spatial_tree::{SpatialNodeIndex, SpatialTree};
+use crate::internal_types::{FastHashMap, LayoutPrimitiveInfo};
+use std::{ops, u32};
+use std::sync::{Arc, Mutex};
+use crate::util::LayoutToWorldFastTransform;
+
+pub struct SharedHitTester {
+ // We don't really need a mutex here. We could do with some sort of
+ // atomic-atomic-ref-counted pointer (an Arc which would let the pointer
+ // be swapped atomically like an AtomicPtr).
+ // In practive this shouldn't cause performance issues, though.
+ hit_tester: Mutex<Arc<HitTester>>,
+}
+
+impl SharedHitTester {
+ pub fn new() -> Self {
+ SharedHitTester {
+ hit_tester: Mutex::new(Arc::new(HitTester::empty())),
+ }
+ }
+
+ pub fn get_ref(&self) -> Arc<HitTester> {
+ let guard = self.hit_tester.lock().unwrap();
+ Arc::clone(&*guard)
+ }
+
+ pub(crate) fn update(&self, new_hit_tester: Arc<HitTester>) {
+ let mut guard = self.hit_tester.lock().unwrap();
+ *guard = new_hit_tester;
+ }
+}
+
+impl ApiHitTester for SharedHitTester {
+ fn hit_test(&self,
+ pipeline_id: Option<PipelineId>,
+ point: WorldPoint,
+ flags: HitTestFlags
+ ) -> HitTestResult {
+ self.get_ref().hit_test(HitTest::new(pipeline_id, point, flags))
+ }
+}
+
+/// A copy of important spatial node data to use during hit testing. This a copy of
+/// data from the SpatialTree that will persist as a new frame is under construction,
+/// allowing hit tests consistent with the currently rendered frame.
+#[derive(MallocSizeOf)]
+pub struct HitTestSpatialNode {
+ /// The pipeline id of this node.
+ pipeline_id: PipelineId,
+
+ /// World transform for content transformed by this node.
+ world_content_transform: LayoutToWorldFastTransform,
+
+ /// World viewport transform for content transformed by this node.
+ world_viewport_transform: LayoutToWorldFastTransform,
+
+ /// The accumulated external scroll offset for this spatial node.
+ external_scroll_offset: LayoutVector2D,
+}
+
+#[derive(MallocSizeOf)]
+pub struct HitTestClipNode {
+ /// A particular point must be inside all of these regions to be considered clipped in
+ /// for the purposes of a hit test.
+ region: HitTestRegion,
+}
+
+impl HitTestClipNode {
+ fn new(node: &ClipNode) -> Self {
+ let region = match node.item.kind {
+ ClipItemKind::Rectangle { rect, mode } => {
+ HitTestRegion::Rectangle(rect, mode)
+ }
+ ClipItemKind::RoundedRectangle { rect, radius, mode } => {
+ HitTestRegion::RoundedRectangle(rect, radius, mode)
+ }
+ ClipItemKind::Image { rect, .. } => {
+ HitTestRegion::Rectangle(rect, ClipMode::Clip)
+ }
+ ClipItemKind::BoxShadow { .. } => HitTestRegion::Invalid,
+ };
+
+ HitTestClipNode {
+ region,
+ }
+ }
+}
+
+#[derive(Debug, Copy, Clone, MallocSizeOf, PartialEq, Eq, Hash)]
+pub struct HitTestClipChainId(u32);
+
+impl HitTestClipChainId {
+ pub const NONE: Self = HitTestClipChainId(u32::MAX);
+}
+
+/// A hit testing clip chain node is the same as a
+/// normal clip chain node, except that the clip
+/// node is embedded inside the clip chain, rather
+/// than referenced. This means we don't need to
+/// copy the complete interned clip data store for
+/// hit testing.
+#[derive(MallocSizeOf)]
+pub struct HitTestClipChainNode {
+ pub region: HitTestClipNode,
+ pub spatial_node_index: SpatialNodeIndex,
+ pub parent_clip_chain_id: HitTestClipChainId,
+}
+
+#[derive(Copy, Clone, Debug, MallocSizeOf)]
+pub struct HitTestingClipChainIndex(u32);
+
+#[derive(Clone, MallocSizeOf)]
+pub struct HitTestingItem {
+ rect: LayoutRect,
+ clip_rect: LayoutRect,
+ tag: ItemTag,
+ is_backface_visible: bool,
+ #[ignore_malloc_size_of = "simple"]
+ clip_chain_range: ops::Range<HitTestingClipChainIndex>,
+ spatial_node_index: SpatialNodeIndex,
+}
+
+impl HitTestingItem {
+ pub fn new(
+ tag: ItemTag,
+ info: &LayoutPrimitiveInfo,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_range: ops::Range<HitTestingClipChainIndex>,
+ ) -> HitTestingItem {
+ HitTestingItem {
+ rect: info.rect,
+ clip_rect: info.clip_rect,
+ tag,
+ is_backface_visible: info.flags.contains(PrimitiveFlags::IS_BACKFACE_VISIBLE),
+ spatial_node_index,
+ clip_chain_range,
+ }
+ }
+}
+
+/// Statistics about allocation sizes of current hit tester,
+/// used to pre-allocate size of the next hit tester.
+pub struct HitTestingSceneStats {
+ pub clip_chain_roots_count: usize,
+ pub items_count: usize,
+}
+
+impl HitTestingSceneStats {
+ pub fn empty() -> Self {
+ HitTestingSceneStats {
+ clip_chain_roots_count: 0,
+ items_count: 0,
+ }
+ }
+}
+
+/// Defines the immutable part of a hit tester for a given scene.
+/// The hit tester is recreated each time a frame is built, since
+/// it relies on the current values of the spatial tree.
+/// However, the clip chain and item definitions don't change,
+/// so they are created once per scene, and shared between
+/// hit tester instances via Arc.
+#[derive(MallocSizeOf)]
+pub struct HitTestingScene {
+ /// The list of variable clip chain roots referenced by the items.
+ pub clip_chain_roots: Vec<HitTestClipChainId>,
+
+ /// List of hit testing primitives.
+ pub items: Vec<HitTestingItem>,
+}
+
+impl HitTestingScene {
+ /// Construct a new hit testing scene, pre-allocating to size
+ /// provided by previous scene stats.
+ pub fn new(stats: &HitTestingSceneStats) -> Self {
+ HitTestingScene {
+ clip_chain_roots: Vec::with_capacity(stats.clip_chain_roots_count),
+ items: Vec::with_capacity(stats.items_count),
+ }
+ }
+
+ /// Get stats about the current scene allocation sizes.
+ pub fn get_stats(&self) -> HitTestingSceneStats {
+ HitTestingSceneStats {
+ clip_chain_roots_count: self.clip_chain_roots.len(),
+ items_count: self.items.len(),
+ }
+ }
+
+ /// Add a hit testing primitive.
+ pub fn add_item(&mut self, item: HitTestingItem) {
+ self.items.push(item);
+ }
+
+ /// Add a clip chain to the clip chain roots list.
+ pub fn add_clip_chain(&mut self, clip_chain_id: ClipChainId) {
+ if clip_chain_id != ClipChainId::INVALID {
+ self.clip_chain_roots.push(HitTestClipChainId(clip_chain_id.0));
+ }
+ }
+
+ /// Get the slice of clip chain roots for a given hit test primitive.
+ fn get_clip_chains_for_item(&self, item: &HitTestingItem) -> &[HitTestClipChainId] {
+ &self.clip_chain_roots[item.clip_chain_range.start.0 as usize .. item.clip_chain_range.end.0 as usize]
+ }
+
+ /// Get the next index of the clip chain roots list.
+ pub fn next_clip_chain_index(&self) -> HitTestingClipChainIndex {
+ HitTestingClipChainIndex(self.clip_chain_roots.len() as u32)
+ }
+}
+
+#[derive(MallocSizeOf)]
+enum HitTestRegion {
+ Invalid,
+ Rectangle(LayoutRect, ClipMode),
+ RoundedRectangle(LayoutRect, BorderRadius, ClipMode),
+}
+
+impl HitTestRegion {
+ pub fn contains(&self, point: &LayoutPoint) -> bool {
+ match *self {
+ HitTestRegion::Rectangle(ref rectangle, ClipMode::Clip) =>
+ rectangle.contains(*point),
+ HitTestRegion::Rectangle(ref rectangle, ClipMode::ClipOut) =>
+ !rectangle.contains(*point),
+ HitTestRegion::RoundedRectangle(rect, radii, ClipMode::Clip) =>
+ rounded_rectangle_contains_point(point, &rect, &radii),
+ HitTestRegion::RoundedRectangle(rect, radii, ClipMode::ClipOut) =>
+ !rounded_rectangle_contains_point(point, &rect, &radii),
+ HitTestRegion::Invalid => true,
+ }
+ }
+}
+
+#[derive(MallocSizeOf)]
+pub struct HitTester {
+ #[ignore_malloc_size_of = "Arc"]
+ scene: Arc<HitTestingScene>,
+ spatial_nodes: Vec<HitTestSpatialNode>,
+ clip_chains: Vec<HitTestClipChainNode>,
+ pipeline_root_nodes: FastHashMap<PipelineId, SpatialNodeIndex>,
+}
+
+impl HitTester {
+ pub fn empty() -> Self {
+ HitTester {
+ scene: Arc::new(HitTestingScene::new(&HitTestingSceneStats::empty())),
+ spatial_nodes: Vec::new(),
+ clip_chains: Vec::new(),
+ pipeline_root_nodes: FastHashMap::default(),
+ }
+ }
+
+ pub fn new(
+ scene: Arc<HitTestingScene>,
+ spatial_tree: &SpatialTree,
+ clip_store: &ClipStore,
+ clip_data_store: &ClipDataStore,
+ ) -> HitTester {
+ let mut hit_tester = HitTester {
+ scene,
+ spatial_nodes: Vec::new(),
+ clip_chains: Vec::new(),
+ pipeline_root_nodes: FastHashMap::default(),
+ };
+ hit_tester.read_spatial_tree(
+ spatial_tree,
+ clip_store,
+ clip_data_store,
+ );
+ hit_tester
+ }
+
+ fn read_spatial_tree(
+ &mut self,
+ spatial_tree: &SpatialTree,
+ clip_store: &ClipStore,
+ clip_data_store: &ClipDataStore,
+ ) {
+ self.spatial_nodes.clear();
+ self.clip_chains.clear();
+
+ self.spatial_nodes.reserve(spatial_tree.spatial_nodes.len());
+ for (index, node) in spatial_tree.spatial_nodes.iter().enumerate() {
+ let index = SpatialNodeIndex::new(index);
+
+ // If we haven't already seen a node for this pipeline, record this one as the root
+ // node.
+ self.pipeline_root_nodes.entry(node.pipeline_id).or_insert(index);
+
+ //TODO: avoid inverting more than necessary:
+ // - if the coordinate system is non-invertible, no need to try any of these concrete transforms
+ // - if there are other places where inversion is needed, let's not repeat the step
+
+ self.spatial_nodes.push(HitTestSpatialNode {
+ pipeline_id: node.pipeline_id,
+ world_content_transform: spatial_tree
+ .get_world_transform(index)
+ .into_fast_transform(),
+ world_viewport_transform: spatial_tree
+ .get_world_viewport_transform(index)
+ .into_fast_transform(),
+ external_scroll_offset: spatial_tree.external_scroll_offset(index),
+ });
+ }
+
+ // For each clip chain node, extract the clip node from the clip
+ // data store, and store it inline with the clip chain node.
+ self.clip_chains.reserve(clip_store.clip_chain_nodes.len());
+ for node in &clip_store.clip_chain_nodes {
+ let clip_node = &clip_data_store[node.handle];
+ self.clip_chains.push(HitTestClipChainNode {
+ region: HitTestClipNode::new(clip_node),
+ spatial_node_index: node.spatial_node_index,
+ parent_clip_chain_id: HitTestClipChainId(node.parent_clip_chain_id.0),
+ });
+ }
+ }
+
+ fn is_point_clipped_in_for_clip_chain(
+ &self,
+ point: WorldPoint,
+ clip_chain_id: HitTestClipChainId,
+ test: &mut HitTest
+ ) -> bool {
+ if clip_chain_id == HitTestClipChainId::NONE {
+ return true;
+ }
+
+ if let Some(result) = test.get_from_clip_chain_cache(clip_chain_id) {
+ return result == ClippedIn::ClippedIn;
+ }
+
+ let descriptor = &self.clip_chains[clip_chain_id.0 as usize];
+ let parent_clipped_in = self.is_point_clipped_in_for_clip_chain(
+ point,
+ descriptor.parent_clip_chain_id,
+ test,
+ );
+
+ if !parent_clipped_in {
+ test.set_in_clip_chain_cache(clip_chain_id, ClippedIn::NotClippedIn);
+ return false;
+ }
+
+ if !self.is_point_clipped_in_for_clip_node(
+ point,
+ clip_chain_id,
+ descriptor.spatial_node_index,
+ test,
+ ) {
+ test.set_in_clip_chain_cache(clip_chain_id, ClippedIn::NotClippedIn);
+ return false;
+ }
+
+ test.set_in_clip_chain_cache(clip_chain_id, ClippedIn::ClippedIn);
+ true
+ }
+
+ fn is_point_clipped_in_for_clip_node(
+ &self,
+ point: WorldPoint,
+ clip_chain_node_id: HitTestClipChainId,
+ spatial_node_index: SpatialNodeIndex,
+ test: &mut HitTest
+ ) -> bool {
+ if let Some(clipped_in) = test.node_cache.get(&clip_chain_node_id) {
+ return *clipped_in == ClippedIn::ClippedIn;
+ }
+
+ let node = &self.clip_chains[clip_chain_node_id.0 as usize].region;
+ let transform = self
+ .spatial_nodes[spatial_node_index.0 as usize]
+ .world_content_transform;
+ let transformed_point = match transform
+ .inverse()
+ .and_then(|inverted| inverted.transform_point2d(point))
+ {
+ Some(point) => point,
+ None => {
+ test.node_cache.insert(clip_chain_node_id, ClippedIn::NotClippedIn);
+ return false;
+ }
+ };
+
+ if !node.region.contains(&transformed_point) {
+ test.node_cache.insert(clip_chain_node_id, ClippedIn::NotClippedIn);
+ return false;
+ }
+
+ test.node_cache.insert(clip_chain_node_id, ClippedIn::ClippedIn);
+ true
+ }
+
+ pub fn find_node_under_point(&self, mut test: HitTest) -> Option<SpatialNodeIndex> {
+ let point = test.get_absolute_point(self);
+ let mut current_spatial_node_index = SpatialNodeIndex::INVALID;
+ let mut point_in_layer = None;
+
+ // For each hit test primitive
+ for item in self.scene.items.iter().rev() {
+ let scroll_node = &self.spatial_nodes[item.spatial_node_index.0 as usize];
+
+ // Update the cached point in layer space, if the spatial node
+ // changed since last primitive.
+ if item.spatial_node_index != current_spatial_node_index {
+ point_in_layer = scroll_node
+ .world_content_transform
+ .inverse()
+ .and_then(|inverted| inverted.transform_point2d(point));
+
+ current_spatial_node_index = item.spatial_node_index;
+ }
+
+ // Only consider hit tests on transformable layers.
+ if let Some(point_in_layer) = point_in_layer {
+ // If the item's rect or clip rect don't contain this point,
+ // it's not a valid hit.
+ if !item.rect.contains(point_in_layer) {
+ continue;
+ }
+ if !item.clip_rect.contains(point_in_layer) {
+ continue;
+ }
+
+ // See if any of the clip chain roots for this primitive
+ // cull out the item.
+ let clip_chains = self.scene.get_clip_chains_for_item(item);
+ let mut is_valid = true;
+ for clip_chain_id in clip_chains {
+ if !self.is_point_clipped_in_for_clip_chain(point, *clip_chain_id, &mut test) {
+ is_valid = false;
+ break;
+ }
+ }
+
+ // Found a valid hit test result!
+ if is_valid {
+ return Some(item.spatial_node_index);
+ }
+ }
+ }
+
+ None
+ }
+
+ pub fn hit_test(&self, mut test: HitTest) -> HitTestResult {
+ let point = test.get_absolute_point(self);
+
+ let mut result = HitTestResult::default();
+ let mut current_spatial_node_index = SpatialNodeIndex::INVALID;
+ let mut point_in_layer = None;
+ let mut current_root_spatial_node_index = SpatialNodeIndex::INVALID;
+ let mut point_in_viewport = None;
+
+ // For each hit test primitive
+ println!("WR: Hit test against {}", self.scene.items.len());
+ for item in self.scene.items.iter().rev() {
+ let scroll_node = &self.spatial_nodes[item.spatial_node_index.0 as usize];
+ let pipeline_id = scroll_node.pipeline_id;
+ match (test.pipeline_id, pipeline_id) {
+ (Some(id), node_id) if node_id != id => continue,
+ _ => {},
+ }
+
+ // Update the cached point in layer space, if the spatial node
+ // changed since last primitive.
+ if item.spatial_node_index != current_spatial_node_index {
+ point_in_layer = scroll_node
+ .world_content_transform
+ .inverse()
+ .and_then(|inverted| inverted.transform_point2d(point));
+ current_spatial_node_index = item.spatial_node_index;
+ }
+
+ // Only consider hit tests on transformable layers.
+ if let Some(point_in_layer) = point_in_layer {
+ // If the item's rect or clip rect don't contain this point,
+ // it's not a valid hit.
+ if !item.rect.contains(point_in_layer) {
+ continue;
+ }
+ if !item.clip_rect.contains(point_in_layer) {
+ continue;
+ }
+
+ // See if any of the clip chain roots for this primitive
+ // cull out the item.
+ let clip_chains = self.scene.get_clip_chains_for_item(item);
+ let mut is_valid = true;
+ for clip_chain_id in clip_chains {
+ if !self.is_point_clipped_in_for_clip_chain(point, *clip_chain_id, &mut test) {
+ is_valid = false;
+ break;
+ }
+ }
+ if !is_valid {
+ continue;
+ }
+
+ // Don't hit items with backface-visibility:hidden if they are facing the back.
+ if !item.is_backface_visible && scroll_node.world_content_transform.is_backface_visible() {
+ continue;
+ }
+
+ // We need to calculate the position of the test point relative to the origin of
+ // the pipeline of the hit item. If we cannot get a transformed point, we are
+ // in a situation with an uninvertible transformation so we should just skip this
+ // result.
+ let root_spatial_node_index = self.pipeline_root_nodes[&pipeline_id];
+ if root_spatial_node_index != current_root_spatial_node_index {
+ let root_node = &self.spatial_nodes[root_spatial_node_index.0 as usize];
+ point_in_viewport = root_node
+ .world_viewport_transform
+ .inverse()
+ .and_then(|inverted| inverted.transform_point2d(point))
+ .map(|pt| pt - scroll_node.external_scroll_offset);
+
+ current_root_spatial_node_index = root_spatial_node_index;
+ }
+
+ if let Some(point_in_viewport) = point_in_viewport {
+ result.items.push(HitTestItem {
+ pipeline: pipeline_id,
+ tag: item.tag,
+ point_in_viewport,
+ point_relative_to_item: point_in_layer - item.rect.origin.to_vector(),
+ });
+
+ if !test.flags.contains(HitTestFlags::FIND_ALL) {
+ return result;
+ }
+ }
+ }
+ }
+
+ result.items.dedup();
+ result
+ }
+
+ pub fn get_pipeline_root(&self, pipeline_id: PipelineId) -> &HitTestSpatialNode {
+ &self.spatial_nodes[self.pipeline_root_nodes[&pipeline_id].0 as usize]
+ }
+}
+
+#[derive(Clone, Copy, MallocSizeOf, PartialEq)]
+enum ClippedIn {
+ ClippedIn,
+ NotClippedIn,
+}
+
+#[derive(MallocSizeOf)]
+pub struct HitTest {
+ pipeline_id: Option<PipelineId>,
+ point: WorldPoint,
+ flags: HitTestFlags,
+ node_cache: FastHashMap<HitTestClipChainId, ClippedIn>,
+ clip_chain_cache: Vec<Option<ClippedIn>>,
+}
+
+impl HitTest {
+ pub fn new(
+ pipeline_id: Option<PipelineId>,
+ point: WorldPoint,
+ flags: HitTestFlags,
+ ) -> HitTest {
+ HitTest {
+ pipeline_id,
+ point,
+ flags,
+ node_cache: FastHashMap::default(),
+ clip_chain_cache: Vec::new(),
+ }
+ }
+
+ fn get_from_clip_chain_cache(&mut self, index: HitTestClipChainId) -> Option<ClippedIn> {
+ let index = index.0 as usize;
+ if index >= self.clip_chain_cache.len() {
+ None
+ } else {
+ self.clip_chain_cache[index]
+ }
+ }
+
+ fn set_in_clip_chain_cache(&mut self, index: HitTestClipChainId, value: ClippedIn) {
+ let index = index.0 as usize;
+ if index >= self.clip_chain_cache.len() {
+ self.clip_chain_cache.resize(index + 1, None);
+ }
+ self.clip_chain_cache[index] = Some(value);
+ }
+
+ fn get_absolute_point(&self, hit_tester: &HitTester) -> WorldPoint {
+ if !self.flags.contains(HitTestFlags::POINT_RELATIVE_TO_PIPELINE_VIEWPORT) {
+ return self.point;
+ }
+
+ let point = LayoutPoint::new(self.point.x, self.point.y);
+ self.pipeline_id
+ .and_then(|id|
+ hit_tester
+ .get_pipeline_root(id)
+ .world_viewport_transform
+ .transform_point2d(point)
+ )
+ .unwrap_or_else(|| {
+ WorldPoint::new(self.point.x, self.point.y)
+ })
+ }
+}
diff --git a/third_party/webrender/webrender/src/intern.rs b/third_party/webrender/webrender/src/intern.rs
new file mode 100644
index 00000000000..db7fd0c1c9d
--- /dev/null
+++ b/third_party/webrender/webrender/src/intern.rs
@@ -0,0 +1,377 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! The interning module provides a generic data structure
+//! interning container. It is similar in concept to a
+//! traditional string interning container, but it is
+//! specialized to the WR thread model.
+//!
+//! There is an Interner structure, that lives in the
+//! scene builder thread, and a DataStore structure
+//! that lives in the frame builder thread.
+//!
+//! Hashing, interning and handle creation is done by
+//! the interner structure during scene building.
+//!
+//! Delta changes for the interner are pushed during
+//! a transaction to the frame builder. The frame builder
+//! is then able to access the content of the interned
+//! handles quickly, via array indexing.
+//!
+//! Epoch tracking ensures that the garbage collection
+//! step which the interner uses to remove items is
+//! only invoked on items that the frame builder thread
+//! is no longer referencing.
+//!
+//! Items in the data store are stored in a traditional
+//! free-list structure, for content access and memory
+//! usage efficiency.
+//!
+//! The epoch is incremented each time a scene is
+//! built. The most recently used scene epoch is
+//! stored inside each handle. This is then used for
+//! cache invalidation.
+
+use crate::internal_types::FastHashMap;
+use malloc_size_of::MallocSizeOf;
+use crate::profiler::ResourceProfileCounter;
+use std::fmt::Debug;
+use std::hash::Hash;
+use std::marker::PhantomData;
+use std::{mem, ops, u64};
+use std::sync::atomic::{AtomicUsize, Ordering};
+use crate::util::VecHelper;
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Copy, Clone, MallocSizeOf, PartialEq)]
+struct Epoch(u64);
+
+/// A list of updates to be applied to the data store,
+/// provided by the interning structure.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct UpdateList<S> {
+ /// Items to insert.
+ pub insertions: Vec<Insertion<S>>,
+
+ /// Items to remove.
+ pub removals: Vec<Removal>,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct Insertion<S> {
+ pub index: usize,
+ pub uid: ItemUid,
+ pub value: S,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct Removal {
+ pub index: usize,
+ pub uid: ItemUid,
+}
+
+impl<S> UpdateList<S> {
+ fn new() -> UpdateList<S> {
+ UpdateList {
+ insertions: Vec::new(),
+ removals: Vec::new(),
+ }
+ }
+
+ fn take_and_preallocate(&mut self) -> UpdateList<S> {
+ UpdateList {
+ insertions: self.insertions.take_and_preallocate(),
+ removals: self.removals.take_and_preallocate(),
+ }
+ }
+}
+
+lazy_static! {
+ static ref NEXT_UID: AtomicUsize = AtomicUsize::new(0);
+}
+
+/// A globally, unique identifier
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Copy, Clone, Eq, Hash, MallocSizeOf, PartialEq)]
+pub struct ItemUid {
+ uid: usize,
+}
+
+impl ItemUid {
+ pub fn next_uid() -> ItemUid {
+ let uid = NEXT_UID.fetch_add(1, Ordering::Relaxed);
+ ItemUid { uid }
+ }
+
+ // Intended for debug usage only
+ pub fn get_uid(&self) -> usize {
+ self.uid
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, MallocSizeOf)]
+pub struct Handle<I> {
+ index: u32,
+ epoch: Epoch,
+ uid: ItemUid,
+ _marker: PhantomData<I>,
+}
+
+impl<I> Clone for Handle<I> {
+ fn clone(&self) -> Self {
+ Handle {
+ index: self.index,
+ epoch: self.epoch,
+ uid: self.uid,
+ _marker: self._marker,
+ }
+ }
+}
+
+impl<I> Copy for Handle<I> {}
+
+impl<I> Handle<I> {
+ pub fn uid(&self) -> ItemUid {
+ self.uid
+ }
+}
+
+pub trait InternDebug {
+ fn on_interned(&self, _uid: ItemUid) {}
+}
+
+/// The data store lives in the frame builder thread. It
+/// contains a free-list of items for fast access.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct DataStore<I: Internable> {
+ items: Vec<Option<I::StoreData>>,
+}
+
+impl<I: Internable> Default for DataStore<I> {
+ fn default() -> Self {
+ DataStore {
+ items: Vec::new(),
+ }
+ }
+}
+
+impl<I: Internable> DataStore<I> {
+ /// Apply any updates from the scene builder thread to
+ /// this data store.
+ pub fn apply_updates(
+ &mut self,
+ update_list: UpdateList<I::Key>,
+ profile_counter: &mut ResourceProfileCounter,
+ ) {
+ for insertion in update_list.insertions {
+ self.items
+ .entry(insertion.index)
+ .set(Some(insertion.value.into()));
+ }
+
+ for removal in update_list.removals {
+ self.items[removal.index] = None;
+ }
+
+ let per_item_size = mem::size_of::<I::Key>() + mem::size_of::<I::StoreData>();
+ profile_counter.set(self.items.len(), per_item_size * self.items.len());
+ }
+}
+
+/// Retrieve an item from the store via handle
+impl<I: Internable> ops::Index<Handle<I>> for DataStore<I> {
+ type Output = I::StoreData;
+ fn index(&self, handle: Handle<I>) -> &I::StoreData {
+ self.items[handle.index as usize].as_ref().expect("Bad datastore lookup")
+ }
+}
+
+/// Retrieve a mutable item from the store via handle
+/// Retrieve an item from the store via handle
+impl<I: Internable> ops::IndexMut<Handle<I>> for DataStore<I> {
+ fn index_mut(&mut self, handle: Handle<I>) -> &mut I::StoreData {
+ self.items[handle.index as usize].as_mut().expect("Bad datastore lookup")
+ }
+}
+
+/// The main interning data structure. This lives in the
+/// scene builder thread, and handles hashing and interning
+/// unique data structures. It also manages a free-list for
+/// the items in the data store, which is synchronized via
+/// an update list of additions / removals.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct Interner<I: Internable> {
+ /// Uniquely map an interning key to a handle
+ map: FastHashMap<I::Key, Handle<I>>,
+ /// List of free slots in the data store for re-use.
+ free_list: Vec<usize>,
+ /// Pending list of updates that need to be applied.
+ update_list: UpdateList<I::Key>,
+ /// The current epoch for the interner.
+ current_epoch: Epoch,
+ /// The information associated with each interned
+ /// item that can be accessed by the interner.
+ local_data: Vec<I::InternData>,
+}
+
+impl<I: Internable> Default for Interner<I> {
+ fn default() -> Self {
+ Interner {
+ map: FastHashMap::default(),
+ free_list: Vec::new(),
+ update_list: UpdateList::new(),
+ current_epoch: Epoch(1),
+ local_data: Vec::new(),
+ }
+ }
+}
+
+impl<I: Internable> Interner<I> {
+ /// Intern a data structure, and return a handle to
+ /// that data. The handle can then be stored in the
+ /// frame builder, and safely accessed via the data
+ /// store that lives in the frame builder thread.
+ /// The provided closure is invoked to build the
+ /// local data about an interned structure if the
+ /// key isn't already interned.
+ pub fn intern<F>(
+ &mut self,
+ data: &I::Key,
+ fun: F,
+ ) -> Handle<I> where F: FnOnce() -> I::InternData {
+ // Use get_mut rather than entry here to avoid
+ // cloning the (sometimes large) key in the common
+ // case, where the data already exists in the interner.
+ if let Some(handle) = self.map.get_mut(data) {
+ handle.epoch = self.current_epoch;
+ return *handle;
+ }
+
+ // We need to intern a new data item. First, find out
+ // if there is a spare slot in the free-list that we
+ // can use. Otherwise, append to the end of the list.
+ let index = match self.free_list.pop() {
+ Some(index) => index,
+ None => self.local_data.len(),
+ };
+
+ let uid = ItemUid::next_uid();
+
+ // Add a pending update to insert the new data.
+ self.update_list.insertions.push(Insertion {
+ index,
+ uid,
+ value: data.clone(),
+ });
+
+ // Generate a handle for access via the data store.
+ let handle = Handle {
+ index: index as u32,
+ epoch: self.current_epoch,
+ uid,
+ _marker: PhantomData,
+ };
+
+ #[cfg(debug_assertions)]
+ data.on_interned(handle.uid);
+
+ // Store this handle so the next time it is
+ // interned, it gets re-used.
+ self.map.insert(data.clone(), handle);
+
+ // Create the local data for this item that is
+ // being interned.
+ self.local_data.entry(index).set(fun());
+
+ handle
+ }
+
+ /// Retrieve the pending list of updates for an interner
+ /// that need to be applied to the data store. Also run
+ /// a GC step that removes old entries.
+ pub fn end_frame_and_get_pending_updates(&mut self) -> UpdateList<I::Key> {
+ let mut update_list = self.update_list.take_and_preallocate();
+
+ let free_list = &mut self.free_list;
+ let current_epoch = self.current_epoch.0;
+
+ // First, run a GC step. Walk through the handles, and
+ // if we find any that haven't been used for some time,
+ // remove them. If this ever shows up in profiles, we
+ // can make the GC step partial (scan only part of the
+ // map each frame). It also might make sense in the
+ // future to adjust how long items remain in the cache
+ // based on the current size of the list.
+ self.map.retain(|_, handle| {
+ if handle.epoch.0 + 10 < current_epoch {
+ // To expire an item:
+ // - Add index to the free-list for re-use.
+ // - Add an update to the data store to invalidate this slot.
+ // - Remove from the hash map.
+ free_list.push(handle.index as usize);
+ update_list.removals.push(Removal {
+ index: handle.index as usize,
+ uid: handle.uid,
+ });
+ return false;
+ }
+
+ true
+ });
+
+ // Begin the next epoch
+ self.current_epoch = Epoch(self.current_epoch.0 + 1);
+
+ update_list
+ }
+}
+
+/// Retrieve the local data for an item from the interner via handle
+impl<I: Internable> ops::Index<Handle<I>> for Interner<I> {
+ type Output = I::InternData;
+ fn index(&self, handle: Handle<I>) -> &I::InternData {
+ &self.local_data[handle.index as usize]
+ }
+}
+
+// The trick to make trait bounds configurable by features.
+mod dummy {
+ #[cfg(not(feature = "capture"))]
+ pub trait Serialize {}
+ #[cfg(not(feature = "capture"))]
+ impl<T> Serialize for T {}
+ #[cfg(not(feature = "replay"))]
+ pub trait Deserialize<'a> {}
+ #[cfg(not(feature = "replay"))]
+ impl<'a, T> Deserialize<'a> for T {}
+}
+#[cfg(feature = "capture")]
+use serde::Serialize as InternSerialize;
+#[cfg(not(feature = "capture"))]
+use self::dummy::Serialize as InternSerialize;
+#[cfg(feature = "replay")]
+use serde::Deserialize as InternDeserialize;
+#[cfg(not(feature = "replay"))]
+use self::dummy::Deserialize as InternDeserialize;
+
+/// Implement `Internable` for a type that wants to participate in interning.
+pub trait Internable: MallocSizeOf {
+ type Key: Eq + Hash + Clone + Debug + MallocSizeOf + InternDebug + InternSerialize + for<'a> InternDeserialize<'a>;
+ type StoreData: From<Self::Key> + MallocSizeOf + InternSerialize + for<'a> InternDeserialize<'a>;
+ type InternData: MallocSizeOf + InternSerialize + for<'a> InternDeserialize<'a>;
+}
diff --git a/third_party/webrender/webrender/src/internal_types.rs b/third_party/webrender/webrender/src/internal_types.rs
new file mode 100644
index 00000000000..bae74efcfa7
--- /dev/null
+++ b/third_party/webrender/webrender/src/internal_types.rs
@@ -0,0 +1,602 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{ColorF, DebugCommand, DocumentId, ExternalImageData, ExternalImageId, PrimitiveFlags};
+use api::{ImageFormat, ItemTag, NotificationRequest, Shadow, FilterOp};
+use api::units::*;
+use api;
+use crate::composite::NativeSurfaceOperation;
+use crate::device::TextureFilter;
+use crate::renderer::PipelineInfo;
+use crate::gpu_cache::GpuCacheUpdateList;
+use crate::frame_builder::Frame;
+use fxhash::FxHasher;
+use plane_split::BspSplitter;
+use crate::profiler::BackendProfileCounters;
+use smallvec::SmallVec;
+use std::{usize, i32};
+use std::collections::{HashMap, HashSet};
+use std::f32;
+use std::hash::BuildHasherDefault;
+use std::path::PathBuf;
+use std::sync::Arc;
+
+#[cfg(any(feature = "capture", feature = "replay"))]
+use crate::capture::CaptureConfig;
+#[cfg(feature = "capture")]
+use crate::capture::ExternalCaptureImage;
+#[cfg(feature = "replay")]
+use crate::capture::PlainExternalImage;
+
+pub type FastHashMap<K, V> = HashMap<K, V, BuildHasherDefault<FxHasher>>;
+pub type FastHashSet<K> = HashSet<K, BuildHasherDefault<FxHasher>>;
+
+/// Custom field embedded inside the Polygon struct of the plane-split crate.
+#[derive(Copy, Clone, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct PlaneSplitAnchor {
+ pub cluster_index: usize,
+ pub instance_index: usize,
+}
+
+impl PlaneSplitAnchor {
+ pub fn new(cluster_index: usize, instance_index: usize) -> Self {
+ PlaneSplitAnchor {
+ cluster_index,
+ instance_index,
+ }
+ }
+}
+
+impl Default for PlaneSplitAnchor {
+ fn default() -> Self {
+ PlaneSplitAnchor {
+ cluster_index: 0,
+ instance_index: 0,
+ }
+ }
+}
+
+/// A concrete plane splitter type used in WebRender.
+pub type PlaneSplitter = BspSplitter<f64, WorldPixel, PlaneSplitAnchor>;
+
+/// An arbitrary number which we assume opacity is invisible below.
+const OPACITY_EPSILON: f32 = 0.001;
+
+/// Equivalent to api::FilterOp with added internal information
+#[derive(Clone, Debug, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum Filter {
+ Identity,
+ Blur(f32),
+ Brightness(f32),
+ Contrast(f32),
+ Grayscale(f32),
+ HueRotate(f32),
+ Invert(f32),
+ Opacity(api::PropertyBinding<f32>, f32),
+ Saturate(f32),
+ Sepia(f32),
+ DropShadows(SmallVec<[Shadow; 1]>),
+ ColorMatrix(Box<[f32; 20]>),
+ SrgbToLinear,
+ LinearToSrgb,
+ ComponentTransfer,
+ Flood(ColorF),
+}
+
+impl Filter {
+ pub fn is_visible(&self) -> bool {
+ match *self {
+ Filter::Identity |
+ Filter::Blur(..) |
+ Filter::Brightness(..) |
+ Filter::Contrast(..) |
+ Filter::Grayscale(..) |
+ Filter::HueRotate(..) |
+ Filter::Invert(..) |
+ Filter::Saturate(..) |
+ Filter::Sepia(..) |
+ Filter::DropShadows(..) |
+ Filter::ColorMatrix(..) |
+ Filter::SrgbToLinear |
+ Filter::LinearToSrgb |
+ Filter::ComponentTransfer => true,
+ Filter::Opacity(_, amount) => {
+ amount > OPACITY_EPSILON
+ },
+ Filter::Flood(color) => {
+ color.a > OPACITY_EPSILON
+ }
+ }
+ }
+
+ pub fn is_noop(&self) -> bool {
+ match *self {
+ Filter::Identity => false, // this is intentional
+ Filter::Blur(length) => length == 0.0,
+ Filter::Brightness(amount) => amount == 1.0,
+ Filter::Contrast(amount) => amount == 1.0,
+ Filter::Grayscale(amount) => amount == 0.0,
+ Filter::HueRotate(amount) => amount == 0.0,
+ Filter::Invert(amount) => amount == 0.0,
+ Filter::Opacity(_, amount) => amount >= 1.0,
+ Filter::Saturate(amount) => amount == 1.0,
+ Filter::Sepia(amount) => amount == 0.0,
+ Filter::DropShadows(ref shadows) => {
+ for shadow in shadows {
+ if shadow.offset.x != 0.0 || shadow.offset.y != 0.0 || shadow.blur_radius != 0.0 {
+ return false;
+ }
+ }
+
+ true
+ }
+ Filter::ColorMatrix(ref matrix) => {
+ **matrix == [
+ 1.0, 0.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0, 0.0,
+ 0.0, 0.0, 0.0, 1.0,
+ 0.0, 0.0, 0.0, 0.0
+ ]
+ }
+ Filter::SrgbToLinear |
+ Filter::LinearToSrgb |
+ Filter::ComponentTransfer |
+ Filter::Flood(..) => false,
+ }
+ }
+
+
+ pub fn as_int(&self) -> i32 {
+ // Must be kept in sync with brush_blend.glsl
+ match *self {
+ Filter::Identity => 0, // matches `Contrast(1)`
+ Filter::Contrast(..) => 0,
+ Filter::Grayscale(..) => 1,
+ Filter::HueRotate(..) => 2,
+ Filter::Invert(..) => 3,
+ Filter::Saturate(..) => 4,
+ Filter::Sepia(..) => 5,
+ Filter::Brightness(..) => 6,
+ Filter::ColorMatrix(..) => 7,
+ Filter::SrgbToLinear => 8,
+ Filter::LinearToSrgb => 9,
+ Filter::Flood(..) => 10,
+ Filter::ComponentTransfer => 11,
+ Filter::Blur(..) => 12,
+ Filter::DropShadows(..) => 13,
+ Filter::Opacity(..) => 14,
+ }
+ }
+}
+
+impl From<FilterOp> for Filter {
+ fn from(op: FilterOp) -> Self {
+ match op {
+ FilterOp::Identity => Filter::Identity,
+ FilterOp::Blur(r) => Filter::Blur(r),
+ FilterOp::Brightness(b) => Filter::Brightness(b),
+ FilterOp::Contrast(c) => Filter::Contrast(c),
+ FilterOp::Grayscale(g) => Filter::Grayscale(g),
+ FilterOp::HueRotate(h) => Filter::HueRotate(h),
+ FilterOp::Invert(i) => Filter::Invert(i),
+ FilterOp::Opacity(binding, opacity) => Filter::Opacity(binding, opacity),
+ FilterOp::Saturate(s) => Filter::Saturate(s),
+ FilterOp::Sepia(s) => Filter::Sepia(s),
+ FilterOp::ColorMatrix(mat) => Filter::ColorMatrix(Box::new(mat)),
+ FilterOp::SrgbToLinear => Filter::SrgbToLinear,
+ FilterOp::LinearToSrgb => Filter::LinearToSrgb,
+ FilterOp::ComponentTransfer => Filter::ComponentTransfer,
+ FilterOp::DropShadow(shadow) => Filter::DropShadows(smallvec![shadow]),
+ FilterOp::Flood(color) => Filter::Flood(color),
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, PartialEq)]
+pub enum Swizzle {
+ Rgba,
+ Bgra,
+}
+
+impl Default for Swizzle {
+ fn default() -> Self {
+ Swizzle::Rgba
+ }
+}
+
+/// Swizzle settings of the texture cache.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, PartialEq)]
+pub struct SwizzleSettings {
+ /// Swizzle required on sampling a texture with BGRA8 format.
+ pub bgra8_sampling_swizzle: Swizzle,
+}
+
+/// An ID for a texture that is owned by the `texture_cache` module.
+///
+/// This can include atlases or standalone textures allocated via the texture
+/// cache (e.g. if an image is too large to be added to an atlas). The texture
+/// cache manages the allocation and freeing of these IDs, and the rendering
+/// thread maintains a map from cache texture ID to native texture.
+///
+/// We never reuse IDs, so we use a u64 here to be safe.
+#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct CacheTextureId(pub u64);
+
+/// Canonical type for texture layer indices.
+///
+/// WebRender is currently not very consistent about layer index types. Some
+/// places use i32 (since that's the type used in various OpenGL APIs), some
+/// places use u32 (since having it be signed is non-sensical, but the
+/// underlying graphics APIs generally operate on 32-bit integers) and some
+/// places use usize (since that's most natural in Rust).
+///
+/// Going forward, we aim to us usize throughout the codebase, since that allows
+/// operations like indexing without a cast, and convert to the required type in
+/// the device module when making calls into the platform layer.
+pub type LayerIndex = usize;
+
+/// Identifies a render pass target that is persisted until the end of the frame.
+///
+/// By default, only the targets of the immediately-preceding pass are bound as
+/// inputs to the next pass. However, tasks can opt into having their target
+/// preserved in a list until the end of the frame, and this type specifies the
+/// index in that list.
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct SavedTargetIndex(pub usize);
+
+impl SavedTargetIndex {
+ pub const PENDING: Self = SavedTargetIndex(!0);
+}
+
+/// Identifies the source of an input texture to a shader.
+#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum TextureSource {
+ /// Equivalent to `None`, allowing us to avoid using `Option`s everywhere.
+ Invalid,
+ /// An entry in the texture cache.
+ TextureCache(CacheTextureId, Swizzle),
+ /// An external image texture, mananged by the embedding.
+ External(ExternalImageData),
+ /// The alpha target of the immediately-preceding pass.
+ PrevPassAlpha,
+ /// The color target of the immediately-preceding pass.
+ PrevPassColor,
+ /// A render target from an earlier pass. Unlike the immediately-preceding
+ /// passes, these are not made available automatically, but are instead
+ /// opt-in by the `RenderTask` (see `mark_for_saving()`).
+ RenderTaskCache(SavedTargetIndex, Swizzle),
+ /// Select a dummy 1x1 white texture. This can be used by image
+ /// shaders that want to draw a solid color.
+ Dummy,
+}
+
+#[derive(Copy, Clone, Debug, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderTargetInfo {
+ pub has_depth: bool,
+}
+
+#[derive(Debug)]
+pub enum TextureUpdateSource {
+ External {
+ id: ExternalImageId,
+ channel_index: u8,
+ },
+ Bytes { data: Arc<Vec<u8>> },
+ /// Clears the target area, rather than uploading any pixels. Used when the
+ /// texture cache debug display is active.
+ DebugClear,
+}
+
+/// Command to allocate, reallocate, or free a texture for the texture cache.
+#[derive(Debug)]
+pub struct TextureCacheAllocation {
+ /// The virtual ID (i.e. distinct from device ID) of the texture.
+ pub id: CacheTextureId,
+ /// Details corresponding to the operation in question.
+ pub kind: TextureCacheAllocationKind,
+}
+
+/// Information used when allocating / reallocating.
+#[derive(Debug)]
+pub struct TextureCacheAllocInfo {
+ pub width: i32,
+ pub height: i32,
+ pub layer_count: i32,
+ pub format: ImageFormat,
+ pub filter: TextureFilter,
+ /// Indicates whether this corresponds to one of the shared texture caches.
+ pub is_shared_cache: bool,
+ /// If true, this texture requires a depth target.
+ pub has_depth: bool,
+}
+
+/// Sub-operation-specific information for allocation operations.
+#[derive(Debug)]
+pub enum TextureCacheAllocationKind {
+ /// Performs an initial texture allocation.
+ Alloc(TextureCacheAllocInfo),
+ /// Reallocates the texture. The existing live texture with the same id
+ /// will be deallocated and its contents blitted over. The new size must
+ /// be greater than the old size.
+ Realloc(TextureCacheAllocInfo),
+ /// Reallocates the texture without preserving its contents.
+ Reset(TextureCacheAllocInfo),
+ /// Frees the texture and the corresponding cache ID.
+ Free,
+}
+
+/// Command to update the contents of the texture cache.
+#[derive(Debug)]
+pub struct TextureCacheUpdate {
+ pub rect: DeviceIntRect,
+ pub stride: Option<i32>,
+ pub offset: i32,
+ pub layer_index: i32,
+ pub format_override: Option<ImageFormat>,
+ pub source: TextureUpdateSource,
+}
+
+/// Atomic set of commands to manipulate the texture cache, generated on the
+/// RenderBackend thread and executed on the Renderer thread.
+///
+/// The list of allocation operations is processed before the updates. This is
+/// important to allow coalescing of certain allocation operations.
+#[derive(Default)]
+pub struct TextureUpdateList {
+ /// Indicates that there was some kind of cleanup clear operation. Used for
+ /// sanity checks.
+ pub clears_shared_cache: bool,
+ /// Commands to alloc/realloc/free the textures. Processed first.
+ pub allocations: Vec<TextureCacheAllocation>,
+ /// Commands to update the contents of the textures. Processed second.
+ pub updates: FastHashMap<CacheTextureId, Vec<TextureCacheUpdate>>,
+}
+
+impl TextureUpdateList {
+ /// Mints a new `TextureUpdateList`.
+ pub fn new() -> Self {
+ TextureUpdateList {
+ clears_shared_cache: false,
+ allocations: Vec::new(),
+ updates: FastHashMap::default(),
+ }
+ }
+
+ /// Returns true if this is a no-op (no updates to be applied).
+ pub fn is_nop(&self) -> bool {
+ self.allocations.is_empty() && self.updates.is_empty()
+ }
+
+ /// Sets the clears_shared_cache flag for renderer-side sanity checks.
+ #[inline]
+ pub fn note_clear(&mut self) {
+ self.clears_shared_cache = true;
+ }
+
+ /// Pushes an update operation onto the list.
+ #[inline]
+ pub fn push_update(&mut self, id: CacheTextureId, update: TextureCacheUpdate) {
+ self.updates
+ .entry(id)
+ .or_default()
+ .push(update);
+ }
+
+ /// Sends a command to the Renderer to clear the portion of the shared region
+ /// we just freed. Used when the texture cache debugger is enabled.
+ #[cold]
+ pub fn push_debug_clear(
+ &mut self,
+ id: CacheTextureId,
+ origin: DeviceIntPoint,
+ width: i32,
+ height: i32,
+ layer_index: usize
+ ) {
+ let size = DeviceIntSize::new(width, height);
+ let rect = DeviceIntRect::new(origin, size);
+ self.push_update(id, TextureCacheUpdate {
+ rect,
+ stride: None,
+ offset: 0,
+ layer_index: layer_index as i32,
+ format_override: None,
+ source: TextureUpdateSource::DebugClear,
+ });
+ }
+
+
+ /// Pushes an allocation operation onto the list.
+ pub fn push_alloc(&mut self, id: CacheTextureId, info: TextureCacheAllocInfo) {
+ debug_assert!(!self.allocations.iter().any(|x| x.id == id));
+ self.allocations.push(TextureCacheAllocation {
+ id,
+ kind: TextureCacheAllocationKind::Alloc(info),
+ });
+ }
+
+ /// Pushes a reallocation operation onto the list, potentially coalescing
+ /// with previous operations.
+ pub fn push_realloc(&mut self, id: CacheTextureId, info: TextureCacheAllocInfo) {
+ self.debug_assert_coalesced(id);
+
+ // Coallesce this realloc into a previous alloc or realloc, if available.
+ if let Some(cur) = self.allocations.iter_mut().find(|x| x.id == id) {
+ match cur.kind {
+ TextureCacheAllocationKind::Alloc(ref mut i) => *i = info,
+ TextureCacheAllocationKind::Realloc(ref mut i) => *i = info,
+ TextureCacheAllocationKind::Reset(ref mut i) => *i = info,
+ TextureCacheAllocationKind::Free => panic!("Reallocating freed texture"),
+ }
+ return
+ }
+
+ self.allocations.push(TextureCacheAllocation {
+ id,
+ kind: TextureCacheAllocationKind::Realloc(info),
+ });
+ }
+
+ /// Pushes a reallocation operation onto the list, potentially coalescing
+ /// with previous operations.
+ pub fn push_reset(&mut self, id: CacheTextureId, info: TextureCacheAllocInfo) {
+ self.debug_assert_coalesced(id);
+
+ // Coallesce this realloc into a previous alloc or realloc, if available.
+ if let Some(cur) = self.allocations.iter_mut().find(|x| x.id == id) {
+ match cur.kind {
+ TextureCacheAllocationKind::Alloc(ref mut i) => *i = info,
+ TextureCacheAllocationKind::Reset(ref mut i) => *i = info,
+ TextureCacheAllocationKind::Free => panic!("Resetting freed texture"),
+ TextureCacheAllocationKind::Realloc(_) => {
+ // Reset takes precedence over realloc
+ cur.kind = TextureCacheAllocationKind::Reset(info);
+ }
+ }
+ return
+ }
+
+ self.allocations.push(TextureCacheAllocation {
+ id,
+ kind: TextureCacheAllocationKind::Reset(info),
+ });
+ }
+
+ /// Pushes a free operation onto the list, potentially coalescing with
+ /// previous operations.
+ pub fn push_free(&mut self, id: CacheTextureId) {
+ self.debug_assert_coalesced(id);
+
+ // Drop any unapplied updates to the to-be-freed texture.
+ self.updates.remove(&id);
+
+ // Drop any allocations for it as well. If we happen to be allocating and
+ // freeing in the same batch, we can collapse them to a no-op.
+ let idx = self.allocations.iter().position(|x| x.id == id);
+ let removed_kind = idx.map(|i| self.allocations.remove(i).kind);
+ match removed_kind {
+ Some(TextureCacheAllocationKind::Alloc(..)) => { /* no-op! */ },
+ Some(TextureCacheAllocationKind::Free) => panic!("Double free"),
+ Some(TextureCacheAllocationKind::Realloc(..)) |
+ Some(TextureCacheAllocationKind::Reset(..)) |
+ None => {
+ self.allocations.push(TextureCacheAllocation {
+ id,
+ kind: TextureCacheAllocationKind::Free,
+ });
+ }
+ };
+ }
+
+ fn debug_assert_coalesced(&self, id: CacheTextureId) {
+ debug_assert!(
+ self.allocations.iter().filter(|x| x.id == id).count() <= 1,
+ "Allocations should have been coalesced",
+ );
+ }
+}
+
+/// A list of updates built by the render backend that should be applied
+/// by the renderer thread.
+pub struct ResourceUpdateList {
+ /// List of OS native surface create / destroy operations to apply.
+ pub native_surface_updates: Vec<NativeSurfaceOperation>,
+
+ /// Atomic set of texture cache updates to apply.
+ pub texture_updates: TextureUpdateList,
+}
+
+impl ResourceUpdateList {
+ /// Returns true if this update list has no effect.
+ pub fn is_nop(&self) -> bool {
+ self.texture_updates.is_nop() && self.native_surface_updates.is_empty()
+ }
+}
+
+/// Wraps a frame_builder::Frame, but conceptually could hold more information
+pub struct RenderedDocument {
+ pub frame: Frame,
+ pub is_new_scene: bool,
+}
+
+pub enum DebugOutput {
+ FetchDocuments(String),
+ FetchClipScrollTree(String),
+ #[cfg(feature = "capture")]
+ SaveCapture(CaptureConfig, Vec<ExternalCaptureImage>),
+ #[cfg(feature = "replay")]
+ LoadCapture(CaptureConfig, Vec<PlainExternalImage>),
+}
+
+#[allow(dead_code)]
+pub enum ResultMsg {
+ DebugCommand(DebugCommand),
+ DebugOutput(DebugOutput),
+ RefreshShader(PathBuf),
+ UpdateGpuCache(GpuCacheUpdateList),
+ UpdateResources {
+ resource_updates: ResourceUpdateList,
+ memory_pressure: bool,
+ },
+ PublishPipelineInfo(PipelineInfo),
+ PublishDocument(
+ DocumentId,
+ RenderedDocument,
+ ResourceUpdateList,
+ BackendProfileCounters,
+ ),
+ AppendNotificationRequests(Vec<NotificationRequest>),
+ ForceRedraw,
+}
+
+#[derive(Clone, Debug)]
+pub struct ResourceCacheError {
+ description: String,
+}
+
+impl ResourceCacheError {
+ pub fn new(description: String) -> ResourceCacheError {
+ ResourceCacheError {
+ description,
+ }
+ }
+}
+
+/// Primitive metadata we pass around in a bunch of places
+#[derive(Copy, Clone, Debug)]
+pub struct LayoutPrimitiveInfo {
+ /// NOTE: this is *ideally* redundant with the clip_rect
+ /// but that's an ongoing project, so for now it exists and is used :(
+ pub rect: LayoutRect,
+ pub clip_rect: LayoutRect,
+ pub flags: PrimitiveFlags,
+ pub hit_info: Option<ItemTag>,
+}
+
+impl LayoutPrimitiveInfo {
+ pub fn with_clip_rect(rect: LayoutRect, clip_rect: LayoutRect) -> Self {
+ Self {
+ rect,
+ clip_rect,
+ flags: PrimitiveFlags::default(),
+ hit_info: None,
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/src/lib.rs b/third_party/webrender/webrender/src/lib.rs
new file mode 100644
index 00000000000..965f7dbc89a
--- /dev/null
+++ b/third_party/webrender/webrender/src/lib.rs
@@ -0,0 +1,226 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/*!
+A GPU based renderer for the web.
+
+It serves as an experimental render backend for [Servo](https://servo.org/),
+but it can also be used as such in a standalone application.
+
+# External dependencies
+WebRender currently depends on [FreeType](https://www.freetype.org/)
+
+# Api Structure
+The main entry point to WebRender is the [`crate::Renderer`].
+
+By calling [`Renderer::new(...)`](crate::Renderer::new) you get a [`Renderer`], as well as
+a [`RenderApiSender`](api::RenderApiSender). Your [`Renderer`] is responsible to render the
+previously processed frames onto the screen.
+
+By calling [`yourRenderApiSender.create_api()`](api::RenderApiSender::create_api), you'll
+get a [`RenderApi`](api::RenderApi) instance, which is responsible for managing resources
+and documents. A worker thread is used internally to untie the workload from the application
+thread and therefore be able to make better use of multicore systems.
+
+## Frame
+
+What is referred to as a `frame`, is the current geometry on the screen.
+A new Frame is created by calling [`set_display_list()`](api::Transaction::set_display_list)
+on the [`RenderApi`](api::RenderApi). When the geometry is processed, the application will be
+informed via a [`RenderNotifier`](api::RenderNotifier), a callback which you pass to
+[`Renderer::new`].
+More information about [stacking contexts][stacking_contexts].
+
+[`set_display_list()`](api::Transaction::set_display_list) also needs to be supplied with
+[`BuiltDisplayList`](api::BuiltDisplayList)s. These are obtained by finalizing a
+[`DisplayListBuilder`](api::DisplayListBuilder). These are used to draw your geometry. But it
+doesn't only contain trivial geometry, it can also store another
+[`StackingContext`](api::StackingContext), as they're nestable.
+
+[stacking_contexts]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
+*/
+
+#![cfg_attr(feature = "cargo-clippy", allow(clippy::unreadable_literal, clippy::new_without_default, clippy::too_many_arguments))]
+
+
+// Cribbed from the |matches| crate, for simplicity.
+macro_rules! matches {
+ ($expression:expr, $($pattern:tt)+) => {
+ match $expression {
+ $($pattern)+ => true,
+ _ => false
+ }
+ }
+}
+
+#[macro_use]
+extern crate bitflags;
+#[macro_use]
+extern crate cfg_if;
+#[macro_use]
+extern crate cstr;
+#[macro_use]
+extern crate lazy_static;
+#[macro_use]
+extern crate log;
+#[macro_use]
+extern crate malloc_size_of_derive;
+#[cfg(any(feature = "serde"))]
+#[macro_use]
+extern crate serde;
+#[macro_use]
+extern crate tracy_rs;
+
+extern crate malloc_size_of;
+extern crate svg_fmt;
+
+#[macro_use]
+mod profiler;
+
+mod batch;
+mod border;
+mod box_shadow;
+#[cfg(any(feature = "capture", feature = "replay"))]
+mod capture;
+mod clip;
+mod spatial_tree;
+mod composite;
+mod debug_colors;
+mod debug_font_data;
+mod debug_render;
+#[cfg(feature = "debugger")]
+mod debug_server;
+mod device;
+mod ellipse;
+mod filterdata;
+mod frame_builder;
+mod freelist;
+#[cfg(any(target_os = "macos", target_os = "windows"))]
+mod gamma_lut;
+mod glyph_cache;
+mod glyph_rasterizer;
+mod gpu_cache;
+mod gpu_types;
+mod hit_test;
+mod intern;
+mod internal_types;
+mod lru_cache;
+mod picture;
+mod prim_store;
+mod print_tree;
+mod render_backend;
+mod render_target;
+mod render_task_graph;
+mod render_task_cache;
+mod render_task;
+mod renderer;
+mod resource_cache;
+mod scene;
+mod scene_builder_thread;
+mod scene_building;
+mod screen_capture;
+mod segment;
+mod shade;
+mod spatial_node;
+mod storage;
+mod texture_allocator;
+mod texture_cache;
+mod util;
+
+mod shader_source {
+ include!(concat!(env!("OUT_DIR"), "/shaders.rs"));
+}
+
+mod platform {
+ #[cfg(target_os = "macos")]
+ pub use crate::platform::macos::font;
+ #[cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))]
+ pub use crate::platform::unix::font;
+ #[cfg(target_os = "windows")]
+ pub use crate::platform::windows::font;
+
+ #[cfg(target_os = "macos")]
+ pub mod macos {
+ pub mod font;
+ }
+ #[cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))]
+ pub mod unix {
+ pub mod font;
+ }
+ #[cfg(target_os = "windows")]
+ pub mod windows {
+ pub mod font;
+ }
+}
+
+#[cfg(target_os = "macos")]
+extern crate core_foundation;
+#[cfg(target_os = "macos")]
+extern crate core_graphics;
+#[cfg(target_os = "macos")]
+extern crate core_text;
+
+#[cfg(all(unix, not(target_os = "macos")))]
+extern crate freetype;
+#[cfg(all(unix, not(target_os = "macos")))]
+extern crate libc;
+
+#[cfg(target_os = "windows")]
+extern crate dwrote;
+
+extern crate bincode;
+extern crate byteorder;
+pub extern crate euclid;
+extern crate fxhash;
+extern crate gleam;
+extern crate num_traits;
+extern crate plane_split;
+extern crate rayon;
+#[cfg(feature = "ron")]
+extern crate ron;
+#[cfg(feature = "debugger")]
+extern crate serde_json;
+#[macro_use]
+extern crate smallvec;
+extern crate time;
+#[cfg(feature = "debugger")]
+extern crate ws;
+#[cfg(feature = "debugger")]
+extern crate image_loader;
+#[cfg(feature = "debugger")]
+extern crate base64;
+#[cfg(all(feature = "capture", feature = "png"))]
+extern crate png;
+#[cfg(test)]
+extern crate rand;
+
+#[macro_use]
+pub extern crate api;
+extern crate webrender_build;
+
+#[doc(hidden)]
+pub use crate::composite::{CompositorConfig, Compositor, CompositorCapabilities};
+pub use crate::composite::{NativeSurfaceId, NativeTileId, NativeSurfaceInfo};
+pub use crate::device::{UploadMethod, VertexUsageHint, get_gl_target, get_unoptimized_shader_source};
+pub use crate::device::{ProgramBinary, ProgramCache, ProgramCacheObserver, FormatDesc};
+pub use crate::device::Device;
+pub use crate::frame_builder::ChasePrimitive;
+pub use crate::prim_store::PrimitiveDebugId;
+pub use crate::profiler::{ProfilerHooks, set_profiler_hooks};
+pub use crate::renderer::{
+ AsyncPropertySampler, CpuProfile, DebugFlags, GpuProfile, GraphicsApi,
+ GraphicsApiInfo, PipelineInfo, Renderer, RendererError, RendererOptions, RenderResults,
+ RendererStats, SceneBuilderHooks, ThreadListener, ShaderPrecacheFlags,
+ MAX_VERTEX_TEXTURE_WIDTH,
+};
+pub use crate::hit_test::SharedHitTester;
+pub use crate::internal_types::FastHashMap;
+pub use crate::screen_capture::{AsyncScreenshotHandle, RecordedFrameHandle};
+pub use crate::shade::{Shaders, WrShaders};
+pub use api as webrender_api;
+pub use webrender_build::shader::ProgramSourceDigest;
+pub use crate::picture::{TileDescriptor, TileId, InvalidationReason};
+pub use crate::picture::{PrimitiveCompareResult, PrimitiveCompareResultDetail, CompareHelperResult};
+pub use crate::picture::{TileNode, TileNodeKind, TileSerializer, TileCacheInstanceSerializer, TileOffset, TileCacheLoggerUpdateLists};
+pub use crate::intern::ItemUid;
diff --git a/third_party/webrender/webrender/src/lru_cache.rs b/third_party/webrender/webrender/src/lru_cache.rs
new file mode 100644
index 00000000000..f741f9fb6ff
--- /dev/null
+++ b/third_party/webrender/webrender/src/lru_cache.rs
@@ -0,0 +1,675 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use crate::freelist::{FreeList, FreeListHandle, WeakFreeListHandle};
+use std::{mem, num};
+
+/*
+ This module implements a least recently used cache structure, which is
+ used by the texture cache to manage the lifetime of items inside the
+ texture cache. It has a few special pieces of functionality that the
+ texture cache requires, but should be usable as a general LRU cache
+ type if useful in other areas.
+
+ The cache is implemented with two backing freelists. These allow
+ random access to the underlying data, while being efficient in both
+ memory access and allocation patterns.
+
+ The first freelist stores the elements being cached (for example, the
+ CacheEntry structure for the texture cache). These elements are stored
+ in arbitrary order, reusing empty slots in the freelist where possible.
+
+ The second freelist stores the LRU tracking information. Although the
+ tracking elements are stored in arbitrary order inside a freelist for
+ efficiency, they use next/prev links to represent a doubly-linked list,
+ kept sorted in order of recent use. The next link is also used to store
+ the current freelist within the array when the element is not occupied.
+ */
+
+/// Stores the data supplied by the user to be cached, and an index
+/// into the LRU tracking freelist for this element.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct LRUCacheEntry<T> {
+ /// The location of the LRU tracking element for this cache entry.
+ /// This is None if the entry has manual eviction policy enabled.
+ lru_index: Option<ItemIndex>,
+ /// The cached data provided by the caller for this element.
+ value: T,
+}
+
+/// The main public interface to the LRU cache
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct LRUCache<T, M> {
+ /// A free list of cache entries, and indices into the LRU tracking list
+ entries: FreeList<LRUCacheEntry<T>, M>,
+ /// The LRU tracking list, allowing O(1) access to the oldest element
+ lru: LRUTracker<FreeListHandle<M>>,
+}
+
+impl<T, M> LRUCache<T, M> {
+ /// Construct a new LRU cache
+ pub fn new() -> Self {
+ LRUCache {
+ entries: FreeList::new(),
+ lru: LRUTracker::new(),
+ }
+ }
+
+ /// Insert a new element into the cache. Returns a weak handle for callers to
+ /// access the data, since the lifetime is managed by the LRU algorithm and it
+ /// may be evicted at any time.
+ pub fn push_new(
+ &mut self,
+ value: T,
+ ) -> WeakFreeListHandle<M> {
+ // It's a slightly awkward process to insert an element, since we don't know
+ // the index of the LRU tracking element until we've got a handle for the
+ // underlying cached data.
+
+ // Insert the data provided by the caller
+ let handle = self.entries.insert(LRUCacheEntry {
+ lru_index: None,
+ value,
+ });
+
+ // Get a weak handle to return to the caller
+ let weak_handle = handle.weak();
+
+ // Add an LRU tracking node that owns the strong handle, and store the location
+ // of this inside the cache entry.
+ let entry = self.entries.get_mut(&handle);
+ entry.lru_index = Some(self.lru.push_new(handle));
+
+ weak_handle
+ }
+
+ /// Get immutable access to the data at a given slot. Since this takes a strong
+ /// handle, it's guaranteed to be valid.
+ pub fn get(
+ &self,
+ handle: &FreeListHandle<M>,
+ ) -> &T {
+ &self.entries
+ .get(handle)
+ .value
+ }
+
+ /// Get immutable access to the data at a given slot. Since this takes a weak
+ /// handle, it may have been evicted, so returns an Option.
+ pub fn get_opt(
+ &self,
+ handle: &WeakFreeListHandle<M>,
+ ) -> Option<&T> {
+ self.entries
+ .get_opt(handle)
+ .map(|entry| {
+ &entry.value
+ })
+ }
+
+ /// Get mutable access to the data at a given slot. Since this takes a weak
+ /// handle, it may have been evicted, so returns an Option.
+ pub fn get_opt_mut(
+ &mut self,
+ handle: &WeakFreeListHandle<M>,
+ ) -> Option<&mut T> {
+ self.entries
+ .get_opt_mut(handle)
+ .map(|entry| {
+ &mut entry.value
+ })
+ }
+
+ /// Remove the oldest item from the cache. This is used to select elements to
+ /// be evicted. If the cache is empty, or all elements in the cache have manual
+ /// eviction enabled, this will return None
+ pub fn pop_oldest(
+ &mut self,
+ ) -> Option<T> {
+ self.lru
+ .pop_front()
+ .map(|handle| {
+ let entry = self.entries.free(handle);
+ // We should only find elements in this list with valid LRU location
+ debug_assert!(entry.lru_index.is_some());
+ entry.value
+ })
+ }
+
+ /// This is a special case of `push_new`, which is a requirement for the texture
+ /// cache. Sometimes, we want to replace the content of an existing handle if it
+ /// exists, or insert a new element if the handle is invalid (for example, if an
+ /// image is resized and it moves to a new location in the texture atlas). This
+ /// method returns the old cache entry if it existed, so it can be freed by the caller.
+ #[must_use]
+ pub fn replace_or_insert(
+ &mut self,
+ handle: &mut WeakFreeListHandle<M>,
+ data: T,
+ ) -> Option<T> {
+ match self.entries.get_opt_mut(handle) {
+ Some(entry) => {
+ Some(mem::replace(&mut entry.value, data))
+ }
+ None => {
+ *handle = self.push_new(data);
+ None
+ }
+ }
+ }
+
+ /// This is used by the calling code to signal that the element that this handle
+ /// references has been used on this frame. Internally, it updates the links in
+ /// the LRU tracking element to move this item to the end of the LRU list. Returns
+ /// the underlying data in case the client wants to mutate it.
+ pub fn touch(
+ &mut self,
+ handle: &WeakFreeListHandle<M>
+ ) -> Option<&mut T> {
+ let lru = &mut self.lru;
+
+ self.entries
+ .get_opt_mut(handle)
+ .map(|entry| {
+ // Only have a valid LRU index if eviction mode is auto
+ if let Some(lru_index) = entry.lru_index {
+ lru.mark_used(lru_index);
+ }
+
+ &mut entry.value
+ })
+ }
+
+ /// In some special cases, the caller may want to manually manage the
+ /// lifetime of a resource. This method removes the LRU tracking information
+ /// for an element, and returns the strong handle to the caller to manage.
+ #[must_use]
+ pub fn set_manual_eviction(
+ &mut self,
+ handle: &WeakFreeListHandle<M>,
+ ) -> Option<FreeListHandle<M>> {
+ let entry = self.entries
+ .get_opt_mut(handle)
+ .expect("bug: trying to set manual eviction on an invalid handle");
+
+ // Remove the LRU tracking information from this element, if it exists.
+ // (it may be None if manual eviction was already enabled for this element).
+ entry.lru_index.take().map(|lru_index| {
+ self.lru.remove(lru_index)
+ })
+ }
+
+ /// Remove an element that is in manual eviction mode. This takes the caller
+ /// managed strong handle, and removes this element from the freelist.
+ pub fn remove_manual_handle(
+ &mut self,
+ handle: FreeListHandle<M>,
+ ) -> T {
+ let entry = self.entries.free(handle);
+ debug_assert_eq!(entry.lru_index, None, "Must be manual eviction mode!");
+ entry.value
+ }
+
+ /// Try to validate that the state of the cache is consistent
+ #[cfg(test)]
+ fn validate(&self) {
+ self.lru.validate();
+ }
+}
+
+/// Index of an LRU tracking element
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+struct ItemIndex(num::NonZeroU32);
+
+impl ItemIndex {
+ fn as_usize(&self) -> usize {
+ self.0.get() as usize
+ }
+}
+
+/// Stores a strong handle controlling the lifetime of the data in the LRU
+/// cache, and a doubly-linked list node specifying where in the current LRU
+/// order this element exists. These items are themselves backed by a freelist
+/// to minimize heap allocations and improve cache access patterns.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug)]
+struct Item<H> {
+ prev: Option<ItemIndex>,
+ next: Option<ItemIndex>,
+ handle: Option<H>,
+}
+
+/// Internal implementation of the LRU tracking list
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct LRUTracker<H> {
+ /// Current head of the list - this is the oldest item that will be evicted next.
+ head: Option<ItemIndex>,
+ /// Current tail of the list - this is the most recently used element.
+ tail: Option<ItemIndex>,
+ /// As tracking items are removed, they are stored in a freelist, to minimize heap allocations
+ free_list_head: Option<ItemIndex>,
+ /// The freelist that stores all the LRU tracking items
+ items: Vec<Item<H>>,
+}
+
+impl<H> LRUTracker<H> where H: std::fmt::Debug {
+ /// Construct a new LRU tracker
+ fn new() -> Self {
+ // Push a dummy entry in the vec that is never used. This ensures the NonZeroU32
+ // property is respected, and we never create an ItemIndex(0).
+ let items = vec![
+ Item {
+ prev: None,
+ next: None,
+ handle: None,
+ },
+ ];
+
+ LRUTracker {
+ head: None,
+ tail: None,
+ free_list_head: None,
+ items,
+ }
+ }
+
+ /// Internal function that takes an item index, and links it to the
+ /// end of the tracker list (makes it the newest item).
+ fn link_as_new_tail(
+ &mut self,
+ item_index: ItemIndex,
+ ) {
+ match (self.head, self.tail) {
+ (Some(..), Some(tail)) => {
+ // Both a head and a tail
+ self.items[item_index.as_usize()].prev = Some(tail);
+ self.items[item_index.as_usize()].next = None;
+
+ self.items[tail.as_usize()].next = Some(item_index);
+ self.tail = Some(item_index);
+ }
+ (None, None) => {
+ // No head/tail, currently empty list
+ self.items[item_index.as_usize()].prev = None;
+ self.items[item_index.as_usize()].next = None;
+
+ self.head = Some(item_index);
+ self.tail = Some(item_index);
+ }
+ (Some(..), None) | (None, Some(..)) => {
+ // Invalid state
+ unreachable!();
+ }
+ }
+ }
+
+ /// Internal function that takes an LRU item index, and removes it from
+ /// the current doubly linked list. Used during removal of items, and also
+ /// when items are moved to the back of the list as they're touched.
+ fn unlink(
+ &mut self,
+ item_index: ItemIndex,
+ ) {
+ let (next, prev) = {
+ let item = &self.items[item_index.as_usize()];
+ (item.next, item.prev)
+ };
+
+ match next {
+ Some(next) => {
+ self.items[next.as_usize()].prev = prev;
+ }
+ None => {
+ debug_assert_eq!(self.tail, Some(item_index));
+ self.tail = prev;
+ }
+ }
+
+ match prev {
+ Some(prev) => {
+ self.items[prev.as_usize()].next = next;
+ }
+ None => {
+ debug_assert_eq!(self.head, Some(item_index));
+ self.head = next;
+ }
+ }
+ }
+
+ /// Push a new LRU tracking item on to the back of the list, marking
+ /// it as the most recent item.
+ fn push_new(
+ &mut self,
+ handle: H,
+ ) -> ItemIndex {
+ // See if there is a slot available in the current free list
+ let item_index = match self.free_list_head {
+ Some(index) => {
+ // Reuse an existing slot
+ let item = &mut self.items[index.as_usize()];
+
+ assert!(item.handle.is_none());
+ item.handle = Some(handle);
+
+ self.free_list_head = item.next;
+
+ index
+ }
+ None => {
+ // No free slots available, push to the end of the array
+ let index = ItemIndex(num::NonZeroU32::new(self.items.len() as u32).unwrap());
+
+ self.items.push(Item {
+ prev: None,
+ next: None,
+ handle: Some(handle),
+ });
+
+ index
+ }
+ };
+
+ // Now link this element into the LRU list
+ self.link_as_new_tail(item_index);
+
+ item_index
+ }
+
+ /// Remove the oldest element from the front of the LRU list. Returns None
+ /// if the list is empty.
+ fn pop_front(
+ &mut self,
+ ) -> Option<H> {
+ let handle = match (self.head, self.tail) {
+ (Some(head), Some(tail)) => {
+ let item_index = head;
+
+ // Head and tail are the same - removing the only element
+ if head == tail {
+ self.head = None;
+ self.tail = None;
+ } else {
+ // Update the head of the list, popping the first element off
+ let new_head = self.items[head.as_usize()].next.unwrap();
+ self.head = Some(new_head);
+ self.items[new_head.as_usize()].prev = None;
+ }
+
+ // Add this item to the freelist for later use
+ self.items[item_index.as_usize()].next = self.free_list_head;
+ self.free_list_head = Some(item_index);
+
+ // Return the handle to the user
+ Some(self.items[item_index.as_usize()].handle.take().unwrap())
+ }
+ (None, None) => {
+ // List is empty
+ None
+ }
+ (Some(..), None) | (None, Some(..)) => {
+ // Invalid state
+ unreachable!();
+ }
+ };
+
+ handle
+ }
+
+ /// Manually remove an item from the LRU tracking list. This is used
+ /// when an element switches from having its lifetime managed by the LRU
+ /// algorithm to having a manual eviction policy.
+ fn remove(
+ &mut self,
+ index: ItemIndex,
+ ) -> H {
+ // Remove from the LRU list
+ self.unlink(index);
+
+ let handle = self.items[index.as_usize()].handle.take().unwrap();
+
+ // Add LRU item to the freelist for future use.
+ self.items[index.as_usize()].next = self.free_list_head;
+ self.free_list_head = Some(index);
+
+ handle
+ }
+
+ /// Called to mark that an item was used on this frame. It unlinks the
+ /// tracking item, and then re-links it to the back of the list.
+ fn mark_used(
+ &mut self,
+ index: ItemIndex,
+ ) {
+ self.unlink(index);
+ self.link_as_new_tail(index);
+ }
+
+ /// Try to validate that the state of the linked lists are consistent
+ #[cfg(test)]
+ fn validate(&self) {
+ use std::collections::HashSet;
+
+ // Must have a valid head/tail or be empty
+ assert!((self.head.is_none() && self.tail.is_none()) || (self.head.is_some() && self.tail.is_some()));
+
+ // If there is a head, the prev of the head must be none
+ if let Some(head) = self.head {
+ assert!(self.items[head.as_usize()].prev.is_none());
+ }
+
+ // If there is a tail, the next of the tail must be none
+ if let Some(tail) = self.tail {
+ assert!(self.items[tail.as_usize()].next.is_none());
+ }
+
+ // Collect all free and valid items, both in forwards and reverse order
+ let mut free_items = Vec::new();
+ let mut free_items_set = HashSet::new();
+ let mut valid_items_front = Vec::new();
+ let mut valid_items_front_set = HashSet::new();
+ let mut valid_items_reverse = Vec::new();
+ let mut valid_items_reverse_set = HashSet::new();
+
+ let mut current = self.free_list_head;
+ while let Some(index) = current {
+ let item = &self.items[index.as_usize()];
+ free_items.push(index);
+ assert!(free_items_set.insert(index));
+ current = item.next;
+ }
+
+ current = self.head;
+ while let Some(index) = current {
+ let item = &self.items[index.as_usize()];
+ valid_items_front.push(index);
+ assert!(valid_items_front_set.insert(index));
+ current = item.next;
+ }
+
+ current = self.tail;
+ while let Some(index) = current {
+ let item = &self.items[index.as_usize()];
+ valid_items_reverse.push(index);
+ assert!(!valid_items_reverse_set.contains(&index));
+ valid_items_reverse_set.insert(index);
+ current = item.prev;
+ }
+
+ // Ensure set lengths match the vec lengths (should be enforced by the assert check during insert anyway)
+ assert_eq!(valid_items_front.len(), valid_items_front_set.len());
+ assert_eq!(valid_items_reverse.len(), valid_items_reverse_set.len());
+
+ // Length of the array should equal free + valid items count + 1 (dummy entry)
+ assert_eq!(free_items.len() + valid_items_front.len() + 1, self.items.len());
+
+ // Should be same number of items whether iterating forwards or reverse
+ assert_eq!(valid_items_front.len(), valid_items_reverse.len());
+
+ // Ensure there are no items considered in the free list that are also in the valid list
+ assert!(free_items_set.intersection(&valid_items_reverse_set).collect::<HashSet<_>>().is_empty());
+ assert!(free_items_set.intersection(&valid_items_front_set).collect::<HashSet<_>>().is_empty());
+
+ // Should be the same number of items regardless of iteration direction
+ assert_eq!(valid_items_front_set.len(), valid_items_reverse_set.len());
+
+ // Ensure that the ordering is exactly the same, regardless of iteration direction
+ for (i0, i1) in valid_items_front.iter().zip(valid_items_reverse.iter().rev()) {
+ assert_eq!(i0, i1);
+ }
+ }
+}
+
+#[test]
+fn test_lru_tracker_push_pop() {
+ // Push elements, pop them all off and ensure:
+ // - Returned in oldest order
+ // - pop_oldest returns None after last element popped
+ struct CacheMarker;
+ const NUM_ELEMENTS: usize = 50;
+
+ let mut cache: LRUCache<usize, CacheMarker> = LRUCache::new();
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS {
+ cache.push_new(i);
+ }
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS {
+ assert_eq!(cache.pop_oldest(), Some(i));
+ }
+ cache.validate();
+
+ assert_eq!(cache.pop_oldest(), None);
+}
+
+#[test]
+fn test_lru_tracker_push_touch_pop() {
+ // Push elements, touch even handles, pop them all off and ensure:
+ // - Returned in correct order
+ // - pop_oldest returns None after last element popped
+ struct CacheMarker;
+ const NUM_ELEMENTS: usize = 50;
+
+ let mut cache: LRUCache<usize, CacheMarker> = LRUCache::new();
+ let mut handles = Vec::new();
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS {
+ handles.push(cache.push_new(i));
+ }
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS/2 {
+ cache.touch(&handles[i*2]);
+ }
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS/2 {
+ assert_eq!(cache.pop_oldest(), Some(i*2+1));
+ }
+ cache.validate();
+ for i in 0 .. NUM_ELEMENTS/2 {
+ assert_eq!(cache.pop_oldest(), Some(i*2));
+ }
+ cache.validate();
+
+ assert_eq!(cache.pop_oldest(), None);
+}
+
+#[test]
+fn test_lru_tracker_push_get() {
+ // Push elements, ensure:
+ // - get access via weak handles works
+ struct CacheMarker;
+ const NUM_ELEMENTS: usize = 50;
+
+ let mut cache: LRUCache<usize, CacheMarker> = LRUCache::new();
+ let mut handles = Vec::new();
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS {
+ handles.push(cache.push_new(i));
+ }
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS/2 {
+ assert!(cache.get_opt(&handles[i]) == Some(&i));
+ }
+ cache.validate();
+}
+
+#[test]
+fn test_lru_tracker_push_replace_get() {
+ // Push elements, replace contents, ensure:
+ // - each element was replaced with new data correctly
+ // - replace_or_insert works for invalid handles
+ struct CacheMarker;
+ const NUM_ELEMENTS: usize = 50;
+
+ let mut cache: LRUCache<usize, CacheMarker> = LRUCache::new();
+ let mut handles = Vec::new();
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS {
+ handles.push(cache.push_new(i));
+ }
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS {
+ assert_eq!(cache.replace_or_insert(&mut handles[i], i * 2), Some(i));
+ }
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS/2 {
+ assert!(cache.get_opt(&handles[i]) == Some(&(i * 2)));
+ }
+ cache.validate();
+
+ let mut empty_handle = WeakFreeListHandle::invalid();
+ assert_eq!(cache.replace_or_insert(&mut empty_handle, 100), None);
+ assert_eq!(cache.get_opt(&empty_handle), Some(&100));
+}
+
+#[test]
+fn test_lru_tracker_manual_evict() {
+ // Push elements, set even as manual eviction, ensure:
+ // - correctly pop auto handles in correct order
+ // - correctly remove manual handles, and have expected value
+ struct CacheMarker;
+ const NUM_ELEMENTS: usize = 50;
+
+ let mut cache: LRUCache<usize, CacheMarker> = LRUCache::new();
+ let mut handles = Vec::new();
+ let mut manual_handles = Vec::new();
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS {
+ handles.push(cache.push_new(i));
+ }
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS/2 {
+ manual_handles.push(cache.set_manual_eviction(&handles[i*2]).unwrap());
+ }
+ cache.validate();
+
+ for i in 0 .. NUM_ELEMENTS/2 {
+ assert!(cache.pop_oldest() == Some(i*2 + 1));
+ }
+ cache.validate();
+
+ assert!(cache.pop_oldest().is_none());
+
+ for (i, manual_handle) in manual_handles.drain(..).enumerate() {
+ assert_eq!(*cache.get(&manual_handle), i*2);
+ assert_eq!(cache.remove_manual_handle(manual_handle), i*2);
+ }
+}
diff --git a/third_party/webrender/webrender/src/picture.rs b/third_party/webrender/webrender/src/picture.rs
new file mode 100644
index 00000000000..5b71479b0a5
--- /dev/null
+++ b/third_party/webrender/webrender/src/picture.rs
@@ -0,0 +1,7185 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! A picture represents a dynamically rendered image.
+//!
+//! # Overview
+//!
+//! Pictures consists of:
+//!
+//! - A number of primitives that are drawn onto the picture.
+//! - A composite operation describing how to composite this
+//! picture into its parent.
+//! - A configuration describing how to draw the primitives on
+//! this picture (e.g. in screen space or local space).
+//!
+//! The tree of pictures are generated during scene building.
+//!
+//! Depending on their composite operations pictures can be rendered into
+//! intermediate targets or folded into their parent picture.
+//!
+//! ## Picture caching
+//!
+//! Pictures can be cached to reduce the amount of rasterization happening per
+//! frame.
+//!
+//! When picture caching is enabled, the scene is cut into a small number of slices,
+//! typically:
+//!
+//! - content slice
+//! - UI slice
+//! - background UI slice which is hidden by the other two slices most of the time.
+//!
+//! Each of these slice is made up of fixed-size large tiles of 2048x512 pixels
+//! (or 128x128 for the UI slice).
+//!
+//! Tiles can be either cached rasterized content into a texture or "clear tiles"
+//! that contain only a solid color rectangle rendered directly during the composite
+//! pass.
+//!
+//! ## Invalidation
+//!
+//! Each tile keeps track of the elements that affect it, which can be:
+//!
+//! - primitives
+//! - clips
+//! - image keys
+//! - opacity bindings
+//! - transforms
+//!
+//! These dependency lists are built each frame and compared to the previous frame to
+//! see if the tile changed.
+//!
+//! The tile's primitive dependency information is organized in a quadtree, each node
+//! storing an index buffer of tile primitive dependencies.
+//!
+//! The union of the invalidated leaves of each quadtree produces a per-tile dirty rect
+//! which defines the scissor rect used when replaying the tile's drawing commands and
+//! can be used for partial present.
+//!
+//! ## Display List shape
+//!
+//! WR will first look for an iframe item in the root stacking context to apply
+//! picture caching to. If that's not found, it will apply to the entire root
+//! stacking context of the display list. Apart from that, the format of the
+//! display list is not important to picture caching. Each time a new scroll root
+//! is encountered, a new picture cache slice will be created. If the display
+//! list contains more than some arbitrary number of slices (currently 8), the
+//! content will all be squashed into a single slice, in order to save GPU memory
+//! and compositing performance.
+//!
+//! ## Compositor Surfaces
+//!
+//! Sometimes, a primitive would prefer to exist as a native compositor surface.
+//! This allows a large and/or regularly changing primitive (such as a video, or
+//! webgl canvas) to be updated each frame without invalidating the content of
+//! tiles, and can provide a significant performance win and battery saving.
+//!
+//! Since drawing a primitive as a compositor surface alters the ordering of
+//! primitives in a tile, we use 'overlay tiles' to ensure correctness. If a
+//! tile has a compositor surface, _and_ that tile has primitives that overlap
+//! the compositor surface rect, the tile switches to be drawn in alpha mode.
+//!
+//! We rely on only promoting compositor surfaces that are opaque primitives.
+//! With this assumption, the tile(s) that intersect the compositor surface get
+//! a 'cutout' in the rectangle where the compositor surface exists (not the
+//! entire tile), allowing that tile to be drawn as an alpha tile after the
+//! compositor surface.
+//!
+//! Tiles are only drawn in overlay mode if there is content that exists on top
+//! of the compositor surface. Otherwise, we can draw the tiles in the normal fast
+//! path before the compositor surface is drawn. Use of the per-tile valid and
+//! dirty rects ensure that we do a minimal amount of per-pixel work here to
+//! blend the overlay tile (this is not always optimal right now, but will be
+//! improved as a follow up).
+
+use api::{MixBlendMode, PipelineId, PremultipliedColorF, FilterPrimitiveKind};
+use api::{PropertyBinding, PropertyBindingId, FilterPrimitive};
+use api::{DebugFlags, RasterSpace, ImageKey, ColorF, ColorU, PrimitiveFlags};
+use api::{ImageRendering, ColorDepth, YuvColorSpace, YuvFormat};
+use api::units::*;
+use crate::box_shadow::BLUR_SAMPLE_SCALE;
+use crate::clip::{ClipStore, ClipChainInstance, ClipChainId, ClipInstance};
+use crate::spatial_tree::{ROOT_SPATIAL_NODE_INDEX,
+ SpatialTree, CoordinateSpaceMapping, SpatialNodeIndex, VisibleFace
+};
+use crate::composite::{CompositorKind, CompositeState, NativeSurfaceId, NativeTileId};
+use crate::composite::{ExternalSurfaceDescriptor, ExternalSurfaceDependency};
+use crate::debug_colors;
+use euclid::{vec2, vec3, Point2D, Scale, Size2D, Vector2D, Rect, Transform3D, SideOffsets2D};
+use euclid::approxeq::ApproxEq;
+use crate::filterdata::SFilterData;
+use crate::frame_builder::{FrameBuilderConfig, FrameVisibilityContext, FrameVisibilityState};
+use crate::intern::ItemUid;
+use crate::internal_types::{FastHashMap, FastHashSet, PlaneSplitter, Filter, PlaneSplitAnchor, TextureSource};
+use crate::frame_builder::{FrameBuildingContext, FrameBuildingState, PictureState, PictureContext};
+use crate::gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle};
+use crate::gpu_types::{UvRectKind, ZBufferId};
+use plane_split::{Clipper, Polygon, Splitter};
+use crate::prim_store::{SpaceMapper, PrimitiveVisibilityMask, PrimitiveTemplateKind};
+use crate::prim_store::{SpaceSnapper, PictureIndex, PrimitiveInstance, PrimitiveInstanceKind};
+use crate::prim_store::{get_raster_rects, PrimitiveScratchBuffer};
+use crate::prim_store::{OpacityBindingStorage, ImageInstanceStorage, OpacityBindingIndex};
+use crate::prim_store::{ColorBindingStorage, ColorBindingIndex, PrimitiveVisibilityFlags};
+use crate::print_tree::{PrintTree, PrintTreePrinter};
+use crate::render_backend::{DataStores, FrameId};
+use crate::render_task_graph::RenderTaskId;
+use crate::render_target::RenderTargetKind;
+use crate::render_task::{RenderTask, RenderTaskLocation, BlurTaskCache, ClearMode};
+use crate::resource_cache::{ResourceCache, ImageGeneration};
+use crate::scene::SceneProperties;
+use smallvec::SmallVec;
+use std::{mem, u8, marker, u32};
+use std::sync::atomic::{AtomicUsize, Ordering};
+use std::collections::hash_map::Entry;
+use crate::texture_cache::TextureCacheHandle;
+use crate::util::{MaxRect, VecHelper, RectHelpers, MatrixHelpers};
+use crate::filterdata::{FilterDataHandle};
+#[cfg(any(feature = "capture", feature = "replay"))]
+use ron;
+#[cfg(feature = "capture")]
+use crate::scene_builder_thread::InternerUpdates;
+#[cfg(any(feature = "capture", feature = "replay"))]
+use crate::intern::{Internable, UpdateList};
+#[cfg(any(feature = "capture", feature = "replay"))]
+use api::{ClipIntern, FilterDataIntern, PrimitiveKeyKind};
+#[cfg(any(feature = "capture", feature = "replay"))]
+use crate::prim_store::backdrop::Backdrop;
+#[cfg(any(feature = "capture", feature = "replay"))]
+use crate::prim_store::borders::{ImageBorder, NormalBorderPrim};
+#[cfg(any(feature = "capture", feature = "replay"))]
+use crate::prim_store::gradient::{LinearGradient, RadialGradient, ConicGradient};
+#[cfg(any(feature = "capture", feature = "replay"))]
+use crate::prim_store::image::{Image, YuvImage};
+#[cfg(any(feature = "capture", feature = "replay"))]
+use crate::prim_store::line_dec::LineDecoration;
+#[cfg(any(feature = "capture", feature = "replay"))]
+use crate::prim_store::picture::Picture;
+#[cfg(any(feature = "capture", feature = "replay"))]
+use crate::prim_store::text_run::TextRun;
+
+#[cfg(feature = "capture")]
+use std::fs::File;
+#[cfg(feature = "capture")]
+use std::io::prelude::*;
+#[cfg(feature = "capture")]
+use std::path::PathBuf;
+use crate::scene_building::{SliceFlags};
+
+#[cfg(feature = "replay")]
+// used by tileview so don't use an internal_types FastHashMap
+use std::collections::HashMap;
+
+// Maximum blur radius for blur filter (different than box-shadow blur).
+// Taken from FilterNodeSoftware.cpp in Gecko.
+pub const MAX_BLUR_RADIUS: f32 = 100.;
+
+/// Specify whether a surface allows subpixel AA text rendering.
+#[derive(Debug, Clone, PartialEq)]
+pub enum SubpixelMode {
+ /// This surface allows subpixel AA text
+ Allow,
+ /// Subpixel AA text cannot be drawn on this surface
+ Deny,
+ /// Subpixel AA can be drawn on this surface, if not intersecting
+ /// with the excluded regions, and inside the allowed rect.
+ Conditional {
+ allowed_rect: PictureRect,
+ excluded_rects: Vec<PictureRect>,
+ },
+}
+
+/// A comparable transform matrix, that compares with epsilon checks.
+#[derive(Debug, Clone)]
+struct MatrixKey {
+ m: [f32; 16],
+}
+
+impl PartialEq for MatrixKey {
+ fn eq(&self, other: &Self) -> bool {
+ const EPSILON: f32 = 0.001;
+
+ // TODO(gw): It's possible that we may need to adjust the epsilon
+ // to be tighter on most of the matrix, except the
+ // translation parts?
+ for (i, j) in self.m.iter().zip(other.m.iter()) {
+ if !i.approx_eq_eps(j, &EPSILON) {
+ return false;
+ }
+ }
+
+ true
+ }
+}
+
+/// A comparable / hashable version of a coordinate space mapping. Used to determine
+/// if a transform dependency for a tile has changed.
+#[derive(Debug, PartialEq, Clone)]
+enum TransformKey {
+ Local,
+ ScaleOffset {
+ scale_x: f32,
+ scale_y: f32,
+ offset_x: f32,
+ offset_y: f32,
+ },
+ Transform {
+ m: MatrixKey,
+ }
+}
+
+impl<Src, Dst> From<CoordinateSpaceMapping<Src, Dst>> for TransformKey {
+ fn from(transform: CoordinateSpaceMapping<Src, Dst>) -> TransformKey {
+ match transform {
+ CoordinateSpaceMapping::Local => {
+ TransformKey::Local
+ }
+ CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => {
+ TransformKey::ScaleOffset {
+ scale_x: scale_offset.scale.x,
+ scale_y: scale_offset.scale.y,
+ offset_x: scale_offset.offset.x,
+ offset_y: scale_offset.offset.y,
+ }
+ }
+ CoordinateSpaceMapping::Transform(ref m) => {
+ TransformKey::Transform {
+ m: MatrixKey {
+ m: m.to_array(),
+ },
+ }
+ }
+ }
+ }
+}
+
+/// Information about a picture that is pushed / popped on the
+/// PictureUpdateState during picture traversal pass.
+struct PictureInfo {
+ /// The spatial node for this picture.
+ _spatial_node_index: SpatialNodeIndex,
+}
+
+/// Picture-caching state to keep between scenes.
+pub struct PictureCacheState {
+ /// The tiles retained by this picture cache.
+ pub tiles: FastHashMap<TileOffset, Box<Tile>>,
+ /// State of the spatial nodes from previous frame
+ spatial_node_comparer: SpatialNodeComparer,
+ /// State of opacity bindings from previous frame
+ opacity_bindings: FastHashMap<PropertyBindingId, OpacityBindingInfo>,
+ /// State of color bindings from previous frame
+ color_bindings: FastHashMap<PropertyBindingId, ColorBindingInfo>,
+ /// The current transform of the picture cache root spatial node
+ root_transform: TransformKey,
+ /// The current tile size in device pixels
+ current_tile_size: DeviceIntSize,
+ /// Various allocations we want to avoid re-doing.
+ allocations: PictureCacheRecycledAllocations,
+ /// Currently allocated native compositor surface for this picture cache.
+ pub native_surface: Option<NativeSurface>,
+ /// A cache of compositor surfaces that are retained between display lists
+ pub external_native_surface_cache: FastHashMap<ExternalNativeSurfaceKey, ExternalNativeSurface>,
+ /// The retained virtual offset for this slice between display lists.
+ virtual_offset: DeviceIntPoint,
+ /// Current frame ID of this picture cache
+ frame_id: FrameId,
+}
+
+pub struct PictureCacheRecycledAllocations {
+ old_opacity_bindings: FastHashMap<PropertyBindingId, OpacityBindingInfo>,
+ old_color_bindings: FastHashMap<PropertyBindingId, ColorBindingInfo>,
+ compare_cache: FastHashMap<PrimitiveComparisonKey, PrimitiveCompareResult>,
+}
+
+/// Stores a list of cached picture tiles that are retained
+/// between new scenes.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct RetainedTiles {
+ /// The tiles retained between display lists.
+ #[cfg_attr(feature = "capture", serde(skip))] //TODO
+ pub caches: FastHashMap<usize, PictureCacheState>,
+}
+
+impl RetainedTiles {
+ pub fn new() -> Self {
+ RetainedTiles {
+ caches: FastHashMap::default(),
+ }
+ }
+
+ /// Merge items from one retained tiles into another.
+ pub fn merge(&mut self, other: RetainedTiles) {
+ assert!(self.caches.is_empty() || other.caches.is_empty());
+ if self.caches.is_empty() {
+ self.caches = other.caches;
+ }
+ }
+}
+
+/// Unit for tile coordinates.
+#[derive(Hash, Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd)]
+pub struct TileCoordinate;
+
+// Geometry types for tile coordinates.
+pub type TileOffset = Point2D<i32, TileCoordinate>;
+pub type TileSize = Size2D<i32, TileCoordinate>;
+pub type TileRect = Rect<i32, TileCoordinate>;
+
+/// The maximum number of compositor surfaces that are allowed per picture cache. This
+/// is an arbitrary number that should be enough for common cases, but low enough to
+/// prevent performance and memory usage drastically degrading in pathological cases.
+const MAX_COMPOSITOR_SURFACES: usize = 4;
+
+/// The size in device pixels of a normal cached tile.
+pub const TILE_SIZE_DEFAULT: DeviceIntSize = DeviceIntSize {
+ width: 1024,
+ height: 512,
+ _unit: marker::PhantomData,
+};
+
+/// The size in device pixels of a tile for horizontal scroll bars
+pub const TILE_SIZE_SCROLLBAR_HORIZONTAL: DeviceIntSize = DeviceIntSize {
+ width: 512,
+ height: 16,
+ _unit: marker::PhantomData,
+};
+
+/// The size in device pixels of a tile for vertical scroll bars
+pub const TILE_SIZE_SCROLLBAR_VERTICAL: DeviceIntSize = DeviceIntSize {
+ width: 16,
+ height: 512,
+ _unit: marker::PhantomData,
+};
+
+const TILE_SIZE_FOR_TESTS: [DeviceIntSize; 6] = [
+ DeviceIntSize {
+ width: 128,
+ height: 128,
+ _unit: marker::PhantomData,
+ },
+ DeviceIntSize {
+ width: 256,
+ height: 256,
+ _unit: marker::PhantomData,
+ },
+ DeviceIntSize {
+ width: 512,
+ height: 512,
+ _unit: marker::PhantomData,
+ },
+ TILE_SIZE_DEFAULT,
+ TILE_SIZE_SCROLLBAR_VERTICAL,
+ TILE_SIZE_SCROLLBAR_HORIZONTAL,
+];
+
+// Return the list of tile sizes for the renderer to allocate texture arrays for.
+pub fn tile_cache_sizes(testing: bool) -> &'static [DeviceIntSize] {
+ if testing {
+ &TILE_SIZE_FOR_TESTS
+ } else {
+ &[
+ TILE_SIZE_DEFAULT,
+ TILE_SIZE_SCROLLBAR_HORIZONTAL,
+ TILE_SIZE_SCROLLBAR_VERTICAL,
+ ]
+ }
+}
+
+/// The maximum size per axis of a surface,
+/// in WorldPixel coordinates.
+const MAX_SURFACE_SIZE: f32 = 4096.0;
+/// Maximum size of a compositor surface.
+const MAX_COMPOSITOR_SURFACES_SIZE: f32 = 8192.0;
+
+/// The maximum number of sub-dependencies (e.g. clips, transforms) we can handle
+/// per-primitive. If a primitive has more than this, it will invalidate every frame.
+const MAX_PRIM_SUB_DEPS: usize = u8::MAX as usize;
+
+/// Used to get unique tile IDs, even when the tile cache is
+/// destroyed between display lists / scenes.
+static NEXT_TILE_ID: AtomicUsize = AtomicUsize::new(0);
+
+fn clamp(value: i32, low: i32, high: i32) -> i32 {
+ value.max(low).min(high)
+}
+
+fn clampf(value: f32, low: f32, high: f32) -> f32 {
+ value.max(low).min(high)
+}
+
+/// Clamps the blur radius depending on scale factors.
+fn clamp_blur_radius(blur_radius: f32, scale_factors: (f32, f32)) -> f32 {
+ // Clamping must occur after scale factors are applied, but scale factors are not applied
+ // until later on. To clamp the blur radius, we first apply the scale factors and then clamp
+ // and finally revert the scale factors.
+
+ // TODO: the clamping should be done on a per-axis basis, but WR currently only supports
+ // having a single value for both x and y blur.
+ let largest_scale_factor = f32::max(scale_factors.0, scale_factors.1);
+ let scaled_blur_radius = blur_radius * largest_scale_factor;
+
+ if scaled_blur_radius > MAX_BLUR_RADIUS {
+ MAX_BLUR_RADIUS / largest_scale_factor
+ } else {
+ // Return the original blur radius to avoid any rounding errors
+ blur_radius
+ }
+}
+
+/// An index into the prims array in a TileDescriptor.
+#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PrimitiveDependencyIndex(pub u32);
+
+/// Information about the state of a binding.
+#[derive(Debug)]
+pub struct BindingInfo<T> {
+ /// The current value retrieved from dynamic scene properties.
+ value: T,
+ /// True if it was changed (or is new) since the last frame build.
+ changed: bool,
+}
+
+/// Information stored in a tile descriptor for a binding.
+#[derive(Debug, PartialEq, Clone, Copy)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum Binding<T> {
+ Value(T),
+ Binding(PropertyBindingId),
+}
+
+impl<T> From<PropertyBinding<T>> for Binding<T> {
+ fn from(binding: PropertyBinding<T>) -> Binding<T> {
+ match binding {
+ PropertyBinding::Binding(key, _) => Binding::Binding(key.id),
+ PropertyBinding::Value(value) => Binding::Value(value),
+ }
+ }
+}
+
+pub type OpacityBinding = Binding<f32>;
+pub type OpacityBindingInfo = BindingInfo<f32>;
+
+pub type ColorBinding = Binding<ColorU>;
+pub type ColorBindingInfo = BindingInfo<ColorU>;
+
+/// A dependency for a transform is defined by the spatial node index + frame it was used
+#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct SpatialNodeKey {
+ spatial_node_index: SpatialNodeIndex,
+ frame_id: FrameId,
+}
+
+/// A helper for comparing spatial nodes between frames. The comparisons
+/// are done by-value, so that if the shape of the spatial node tree
+/// changes, invalidations aren't done simply due to the spatial node
+/// index changing between display lists.
+struct SpatialNodeComparer {
+ /// The root spatial node index of the tile cache
+ ref_spatial_node_index: SpatialNodeIndex,
+ /// Maintains a map of currently active transform keys
+ spatial_nodes: FastHashMap<SpatialNodeKey, TransformKey>,
+ /// A cache of recent comparisons between prev and current spatial nodes
+ compare_cache: FastHashMap<(SpatialNodeKey, SpatialNodeKey), bool>,
+ /// A set of frames that we need to retain spatial node entries for
+ referenced_frames: FastHashSet<FrameId>,
+}
+
+impl SpatialNodeComparer {
+ /// Construct a new comparer
+ fn new() -> Self {
+ SpatialNodeComparer {
+ ref_spatial_node_index: ROOT_SPATIAL_NODE_INDEX,
+ spatial_nodes: FastHashMap::default(),
+ compare_cache: FastHashMap::default(),
+ referenced_frames: FastHashSet::default(),
+ }
+ }
+
+ /// Advance to the next frame
+ fn next_frame(
+ &mut self,
+ ref_spatial_node_index: SpatialNodeIndex,
+ ) {
+ // Drop any node information for unreferenced frames, to ensure that the
+ // hashmap doesn't grow indefinitely!
+ let referenced_frames = &self.referenced_frames;
+ self.spatial_nodes.retain(|key, _| {
+ referenced_frames.contains(&key.frame_id)
+ });
+
+ // Update the root spatial node for this comparer
+ self.ref_spatial_node_index = ref_spatial_node_index;
+ self.compare_cache.clear();
+ self.referenced_frames.clear();
+ }
+
+ /// Register a transform that is used, and build the transform key for it if new.
+ fn register_used_transform(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ frame_id: FrameId,
+ spatial_tree: &SpatialTree,
+ ) {
+ let key = SpatialNodeKey {
+ spatial_node_index,
+ frame_id,
+ };
+
+ if let Entry::Vacant(entry) = self.spatial_nodes.entry(key) {
+ entry.insert(
+ get_transform_key(
+ spatial_node_index,
+ self.ref_spatial_node_index,
+ spatial_tree,
+ )
+ );
+ }
+ }
+
+ /// Return true if the transforms for two given spatial nodes are considered equivalent
+ fn are_transforms_equivalent(
+ &mut self,
+ prev_spatial_node_key: &SpatialNodeKey,
+ curr_spatial_node_key: &SpatialNodeKey,
+ ) -> bool {
+ let key = (*prev_spatial_node_key, *curr_spatial_node_key);
+ let spatial_nodes = &self.spatial_nodes;
+
+ *self.compare_cache
+ .entry(key)
+ .or_insert_with(|| {
+ let prev = &spatial_nodes[&prev_spatial_node_key];
+ let curr = &spatial_nodes[&curr_spatial_node_key];
+ curr == prev
+ })
+ }
+
+ /// Ensure that the comparer won't GC any nodes for a given frame id
+ fn retain_for_frame(&mut self, frame_id: FrameId) {
+ self.referenced_frames.insert(frame_id);
+ }
+}
+
+// Immutable context passed to picture cache tiles during pre_update
+struct TilePreUpdateContext {
+ /// Maps from picture cache coords -> world space coords.
+ pic_to_world_mapper: SpaceMapper<PicturePixel, WorldPixel>,
+
+ /// The fractional position of the picture cache, which may
+ /// require invalidation of all tiles.
+ fract_offset: PictureVector2D,
+
+ /// The optional background color of the picture cache instance
+ background_color: Option<ColorF>,
+
+ /// The visible part of the screen in world coords.
+ global_screen_world_rect: WorldRect,
+
+ /// Current size of tiles in picture units.
+ tile_size: PictureSize,
+
+ /// The current frame id for this picture cache
+ frame_id: FrameId,
+}
+
+// Immutable context passed to picture cache tiles during post_update
+struct TilePostUpdateContext<'a> {
+ /// Maps from picture cache coords -> world space coords.
+ pic_to_world_mapper: SpaceMapper<PicturePixel, WorldPixel>,
+
+ /// Global scale factor from world -> device pixels.
+ global_device_pixel_scale: DevicePixelScale,
+
+ /// The local clip rect (in picture space) of the entire picture cache
+ local_clip_rect: PictureRect,
+
+ /// The calculated backdrop information for this cache instance.
+ backdrop: BackdropInfo,
+
+ /// Information about opacity bindings from the picture cache.
+ opacity_bindings: &'a FastHashMap<PropertyBindingId, OpacityBindingInfo>,
+
+ /// Information about color bindings from the picture cache.
+ color_bindings: &'a FastHashMap<PropertyBindingId, ColorBindingInfo>,
+
+ /// Current size in device pixels of tiles for this cache
+ current_tile_size: DeviceIntSize,
+
+ /// The local rect of the overall picture cache
+ local_rect: PictureRect,
+
+ /// A list of the external surfaces that are present on this slice
+ external_surfaces: &'a [ExternalSurfaceDescriptor],
+
+ /// Pre-allocated z-id to assign to opaque tiles during post_update. We
+ /// use a different z-id for opaque/alpha tiles, so that compositor
+ /// surfaces (such as videos) can have a z-id between these values,
+ /// which allows compositor surfaces to occlude opaque tiles, but not
+ /// alpha tiles.
+ z_id_opaque: ZBufferId,
+
+ /// Pre-allocated z-id to assign to alpha tiles during post_update
+ z_id_alpha: ZBufferId,
+}
+
+// Mutable state passed to picture cache tiles during post_update
+struct TilePostUpdateState<'a> {
+ /// Allow access to the texture cache for requesting tiles
+ resource_cache: &'a mut ResourceCache,
+
+ /// Current configuration and setup for compositing all the picture cache tiles in renderer.
+ composite_state: &'a mut CompositeState,
+
+ /// A cache of comparison results to avoid re-computation during invalidation.
+ compare_cache: &'a mut FastHashMap<PrimitiveComparisonKey, PrimitiveCompareResult>,
+
+ /// Information about transform node differences from last frame.
+ spatial_node_comparer: &'a mut SpatialNodeComparer,
+}
+
+/// Information about the dependencies of a single primitive instance.
+struct PrimitiveDependencyInfo {
+ /// Unique content identifier of the primitive.
+ prim_uid: ItemUid,
+
+ /// The (conservative) clipped area in picture space this primitive occupies.
+ prim_clip_box: PictureBox2D,
+
+ /// Image keys this primitive depends on.
+ images: SmallVec<[ImageDependency; 8]>,
+
+ /// Opacity bindings this primitive depends on.
+ opacity_bindings: SmallVec<[OpacityBinding; 4]>,
+
+ /// Color binding this primitive depends on.
+ color_binding: Option<ColorBinding>,
+
+ /// Clips that this primitive depends on.
+ clips: SmallVec<[ItemUid; 8]>,
+
+ /// Spatial nodes references by the clip dependencies of this primitive.
+ spatial_nodes: SmallVec<[SpatialNodeIndex; 4]>,
+
+ /// If true, this primitive has been promoted to be a compositor surface.
+ is_compositor_surface: bool,
+}
+
+impl PrimitiveDependencyInfo {
+ /// Construct dependency info for a new primitive.
+ fn new(
+ prim_uid: ItemUid,
+ prim_clip_box: PictureBox2D,
+ ) -> Self {
+ PrimitiveDependencyInfo {
+ prim_uid,
+ images: SmallVec::new(),
+ opacity_bindings: SmallVec::new(),
+ color_binding: None,
+ prim_clip_box,
+ clips: SmallVec::new(),
+ spatial_nodes: SmallVec::new(),
+ is_compositor_surface: false,
+ }
+ }
+}
+
+/// A stable ID for a given tile, to help debugging. These are also used
+/// as unique identifiers for tile surfaces when using a native compositor.
+#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Ord, Eq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct TileId(pub usize);
+
+/// A descriptor for the kind of texture that a picture cache tile will
+/// be drawn into.
+#[derive(Debug)]
+pub enum SurfaceTextureDescriptor {
+ /// When using the WR compositor, the tile is drawn into an entry
+ /// in the WR texture cache.
+ TextureCache {
+ handle: TextureCacheHandle
+ },
+ /// When using an OS compositor, the tile is drawn into a native
+ /// surface identified by arbitrary id.
+ Native {
+ /// The arbitrary id of this tile.
+ id: Option<NativeTileId>,
+ },
+}
+
+/// This is the same as a `SurfaceTextureDescriptor` but has been resolved
+/// into a texture cache handle (if appropriate) that can be used by the
+/// batching and compositing code in the renderer.
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum ResolvedSurfaceTexture {
+ TextureCache {
+ /// The texture ID to draw to.
+ texture: TextureSource,
+ /// Slice index in the texture array to draw to.
+ layer: i32,
+ },
+ Native {
+ /// The arbitrary id of this tile.
+ id: NativeTileId,
+ /// The size of the tile in device pixels.
+ size: DeviceIntSize,
+ }
+}
+
+impl SurfaceTextureDescriptor {
+ /// Create a resolved surface texture for this descriptor
+ pub fn resolve(
+ &self,
+ resource_cache: &ResourceCache,
+ size: DeviceIntSize,
+ ) -> ResolvedSurfaceTexture {
+ match self {
+ SurfaceTextureDescriptor::TextureCache { handle } => {
+ let cache_item = resource_cache.texture_cache.get(handle);
+
+ ResolvedSurfaceTexture::TextureCache {
+ texture: cache_item.texture_id,
+ layer: cache_item.texture_layer,
+ }
+ }
+ SurfaceTextureDescriptor::Native { id } => {
+ ResolvedSurfaceTexture::Native {
+ id: id.expect("bug: native surface not allocated"),
+ size,
+ }
+ }
+ }
+ }
+}
+
+/// The backing surface for this tile.
+#[derive(Debug)]
+pub enum TileSurface {
+ Texture {
+ /// Descriptor for the surface that this tile draws into.
+ descriptor: SurfaceTextureDescriptor,
+ /// Bitfield specifying the dirty region(s) that are relevant to this tile.
+ visibility_mask: PrimitiveVisibilityMask,
+ },
+ Color {
+ color: ColorF,
+ },
+ Clear,
+}
+
+impl TileSurface {
+ fn kind(&self) -> &'static str {
+ match *self {
+ TileSurface::Color { .. } => "Color",
+ TileSurface::Texture { .. } => "Texture",
+ TileSurface::Clear => "Clear",
+ }
+ }
+}
+
+/// Optional extra information returned by is_same when
+/// logging is enabled.
+#[derive(Debug, Copy, Clone, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum CompareHelperResult<T> {
+ /// Primitives match
+ Equal,
+ /// Counts differ
+ Count {
+ prev_count: u8,
+ curr_count: u8,
+ },
+ /// Sentinel
+ Sentinel,
+ /// Two items are not equal
+ NotEqual {
+ prev: T,
+ curr: T,
+ },
+ /// User callback returned true on item
+ PredicateTrue {
+ curr: T
+ },
+}
+
+/// The result of a primitive dependency comparison. Size is a u8
+/// since this is a hot path in the code, and keeping the data small
+/// is a performance win.
+#[derive(Debug, Copy, Clone, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[repr(u8)]
+pub enum PrimitiveCompareResult {
+ /// Primitives match
+ Equal,
+ /// Something in the PrimitiveDescriptor was different
+ Descriptor,
+ /// The clip node content or spatial node changed
+ Clip,
+ /// The value of the transform changed
+ Transform,
+ /// An image dependency was dirty
+ Image,
+ /// The value of an opacity binding changed
+ OpacityBinding,
+ /// The value of a color binding changed
+ ColorBinding,
+}
+
+/// A more detailed version of PrimitiveCompareResult used when
+/// debug logging is enabled.
+#[derive(Debug, Copy, Clone, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum PrimitiveCompareResultDetail {
+ /// Primitives match
+ Equal,
+ /// Something in the PrimitiveDescriptor was different
+ Descriptor {
+ old: PrimitiveDescriptor,
+ new: PrimitiveDescriptor,
+ },
+ /// The clip node content or spatial node changed
+ Clip {
+ detail: CompareHelperResult<ItemUid>,
+ },
+ /// The value of the transform changed
+ Transform {
+ detail: CompareHelperResult<SpatialNodeKey>,
+ },
+ /// An image dependency was dirty
+ Image {
+ detail: CompareHelperResult<ImageDependency>,
+ },
+ /// The value of an opacity binding changed
+ OpacityBinding {
+ detail: CompareHelperResult<OpacityBinding>,
+ },
+ /// The value of a color binding changed
+ ColorBinding {
+ detail: CompareHelperResult<ColorBinding>,
+ },
+}
+
+/// Debugging information about why a tile was invalidated
+#[derive(Debug,Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum InvalidationReason {
+ /// The fractional offset changed
+ FractionalOffset {
+ old: PictureVector2D,
+ new: PictureVector2D,
+ },
+ /// The background color changed
+ BackgroundColor {
+ old: Option<ColorF>,
+ new: Option<ColorF>,
+ },
+ /// The opaque state of the backing native surface changed
+ SurfaceOpacityChanged{
+ became_opaque: bool
+ },
+ /// There was no backing texture (evicted or never rendered)
+ NoTexture,
+ /// There was no backing native surface (never rendered, or recreated)
+ NoSurface,
+ /// The primitive count in the dependency list was different
+ PrimCount {
+ old: Option<Vec<ItemUid>>,
+ new: Option<Vec<ItemUid>>,
+ },
+ /// The content of one of the primitives was different
+ Content {
+ /// What changed in the primitive that was different
+ prim_compare_result: PrimitiveCompareResult,
+ prim_compare_result_detail: Option<PrimitiveCompareResultDetail>,
+ },
+ // The compositor type changed
+ CompositorKindChanged,
+ // The valid region of the tile changed
+ ValidRectChanged,
+}
+
+/// A minimal subset of Tile for debug capturing
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct TileSerializer {
+ pub rect: PictureRect,
+ pub current_descriptor: TileDescriptor,
+ pub fract_offset: PictureVector2D,
+ pub id: TileId,
+ pub root: TileNode,
+ pub background_color: Option<ColorF>,
+ pub invalidation_reason: Option<InvalidationReason>
+}
+
+/// A minimal subset of TileCacheInstance for debug capturing
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct TileCacheInstanceSerializer {
+ pub slice: usize,
+ pub tiles: FastHashMap<TileOffset, TileSerializer>,
+ pub background_color: Option<ColorF>,
+ pub fract_offset: PictureVector2D,
+}
+
+/// Information about a cached tile.
+pub struct Tile {
+ /// The grid position of this tile within the picture cache
+ pub tile_offset: TileOffset,
+ /// The current world rect of this tile.
+ pub world_tile_rect: WorldRect,
+ /// The current local rect of this tile.
+ pub local_tile_rect: PictureRect,
+ /// Same as local_tile_rect, but in min/max form as an optimization
+ pub local_tile_box: PictureBox2D,
+ /// The picture space dirty rect for this tile.
+ local_dirty_rect: PictureRect,
+ /// The device space dirty rect for this tile.
+ /// TODO(gw): We have multiple dirty rects available due to the quadtree above. In future,
+ /// expose these as multiple dirty rects, which will help in some cases.
+ pub device_dirty_rect: DeviceRect,
+ /// Device space rect that contains valid pixels region of this tile.
+ pub device_valid_rect: DeviceRect,
+ /// Uniquely describes the content of this tile, in a way that can be
+ /// (reasonably) efficiently hashed and compared.
+ pub current_descriptor: TileDescriptor,
+ /// The content descriptor for this tile from the previous frame.
+ pub prev_descriptor: TileDescriptor,
+ /// Handle to the backing surface for this tile.
+ pub surface: Option<TileSurface>,
+ /// If true, this tile is marked valid, and the existing texture
+ /// cache handle can be used. Tiles are invalidated during the
+ /// build_dirty_regions method.
+ pub is_valid: bool,
+ /// If true, this tile intersects with the currently visible screen
+ /// rect, and will be drawn.
+ pub is_visible: bool,
+ /// The current fractional offset of the cache transform root. If this changes,
+ /// all tiles need to be invalidated and redrawn, since snapping differences are
+ /// likely to occur.
+ fract_offset: PictureVector2D,
+ /// The tile id is stable between display lists and / or frames,
+ /// if the tile is retained. Useful for debugging tile evictions.
+ pub id: TileId,
+ /// If true, the tile was determined to be opaque, which means blending
+ /// can be disabled when drawing it.
+ pub is_opaque: bool,
+ /// Root node of the quadtree dirty rect tracker.
+ root: TileNode,
+ /// The last rendered background color on this tile.
+ background_color: Option<ColorF>,
+ /// The first reason the tile was invalidated this frame.
+ invalidation_reason: Option<InvalidationReason>,
+ /// If true, this tile has one or more compositor surfaces affecting it.
+ pub has_compositor_surface: bool,
+ /// The local space valid rect for any primitives found prior to the first compositor
+ /// surface that affects this tile.
+ bg_local_valid_rect: PictureBox2D,
+ /// The local space valid rect for any primitives found after the first compositor
+ /// surface that affects this tile.
+ fg_local_valid_rect: PictureBox2D,
+ /// z-buffer id for this tile, which is one of z_id_opaque or z_id_alpha, depending on tile opacity
+ pub z_id: ZBufferId,
+ /// The last frame this tile had its dependencies updated (dependency updating is
+ /// skipped if a tile is off-screen).
+ pub last_updated_frame_id: FrameId,
+}
+
+impl Tile {
+ /// Construct a new, invalid tile.
+ fn new(tile_offset: TileOffset) -> Self {
+ let id = TileId(NEXT_TILE_ID.fetch_add(1, Ordering::Relaxed));
+
+ Tile {
+ tile_offset,
+ local_tile_rect: PictureRect::zero(),
+ local_tile_box: PictureBox2D::zero(),
+ world_tile_rect: WorldRect::zero(),
+ device_valid_rect: DeviceRect::zero(),
+ local_dirty_rect: PictureRect::zero(),
+ device_dirty_rect: DeviceRect::zero(),
+ surface: None,
+ current_descriptor: TileDescriptor::new(),
+ prev_descriptor: TileDescriptor::new(),
+ is_valid: false,
+ is_visible: false,
+ fract_offset: PictureVector2D::zero(),
+ id,
+ is_opaque: false,
+ root: TileNode::new_leaf(Vec::new()),
+ background_color: None,
+ invalidation_reason: None,
+ has_compositor_surface: false,
+ bg_local_valid_rect: PictureBox2D::zero(),
+ fg_local_valid_rect: PictureBox2D::zero(),
+ z_id: ZBufferId::invalid(),
+ last_updated_frame_id: FrameId::INVALID,
+ }
+ }
+
+ /// Print debug information about this tile to a tree printer.
+ fn print(&self, pt: &mut dyn PrintTreePrinter) {
+ pt.new_level(format!("Tile {:?}", self.id));
+ pt.add_item(format!("local_tile_rect: {:?}", self.local_tile_rect));
+ pt.add_item(format!("fract_offset: {:?}", self.fract_offset));
+ pt.add_item(format!("background_color: {:?}", self.background_color));
+ pt.add_item(format!("invalidation_reason: {:?}", self.invalidation_reason));
+ self.current_descriptor.print(pt);
+ pt.end_level();
+ }
+
+ /// Check if the content of the previous and current tile descriptors match
+ fn update_dirty_rects(
+ &mut self,
+ ctx: &TilePostUpdateContext,
+ state: &mut TilePostUpdateState,
+ invalidation_reason: &mut Option<InvalidationReason>,
+ frame_context: &FrameVisibilityContext,
+ ) -> PictureRect {
+ let mut prim_comparer = PrimitiveComparer::new(
+ &self.prev_descriptor,
+ &self.current_descriptor,
+ state.resource_cache,
+ state.spatial_node_comparer,
+ ctx.opacity_bindings,
+ ctx.color_bindings,
+ );
+
+ let mut dirty_rect = PictureBox2D::zero();
+ self.root.update_dirty_rects(
+ &self.prev_descriptor.prims,
+ &self.current_descriptor.prims,
+ &mut prim_comparer,
+ &mut dirty_rect,
+ state.compare_cache,
+ invalidation_reason,
+ frame_context,
+ );
+
+ dirty_rect.to_rect()
+ }
+
+ /// Invalidate a tile based on change in content. This
+ /// must be called even if the tile is not currently
+ /// visible on screen. We might be able to improve this
+ /// later by changing how ComparableVec is used.
+ fn update_content_validity(
+ &mut self,
+ ctx: &TilePostUpdateContext,
+ state: &mut TilePostUpdateState,
+ frame_context: &FrameVisibilityContext,
+ ) {
+ // Check if the contents of the primitives, clips, and
+ // other dependencies are the same.
+ state.compare_cache.clear();
+ let mut invalidation_reason = None;
+ let dirty_rect = self.update_dirty_rects(
+ ctx,
+ state,
+ &mut invalidation_reason,
+ frame_context,
+ );
+ if !dirty_rect.is_empty() {
+ self.invalidate(
+ Some(dirty_rect),
+ invalidation_reason.expect("bug: no invalidation_reason"),
+ );
+ }
+ // TODO(gw): We can avoid invalidating the whole tile in some cases here,
+ // but it should be a fairly rare invalidation case.
+ if self.current_descriptor.local_valid_rect != self.prev_descriptor.local_valid_rect {
+ self.invalidate(None, InvalidationReason::ValidRectChanged);
+ state.composite_state.dirty_rects_are_valid = false;
+ }
+ }
+
+ /// Invalidate this tile. If `invalidation_rect` is None, the entire
+ /// tile is invalidated.
+ fn invalidate(
+ &mut self,
+ invalidation_rect: Option<PictureRect>,
+ reason: InvalidationReason,
+ ) {
+ self.is_valid = false;
+
+ match invalidation_rect {
+ Some(rect) => {
+ self.local_dirty_rect = self.local_dirty_rect.union(&rect);
+ }
+ None => {
+ self.local_dirty_rect = self.local_tile_rect;
+ }
+ }
+
+ if self.invalidation_reason.is_none() {
+ self.invalidation_reason = Some(reason);
+ }
+ }
+
+ /// Called during pre_update of a tile cache instance. Allows the
+ /// tile to setup state before primitive dependency calculations.
+ fn pre_update(
+ &mut self,
+ ctx: &TilePreUpdateContext,
+ ) {
+ // Ensure each tile is offset by the appropriate amount from the
+ // origin, such that the content origin will be a whole number and
+ // the snapping will be consistent.
+ self.local_tile_rect = PictureRect::new(
+ PicturePoint::new(
+ self.tile_offset.x as f32 * ctx.tile_size.width + ctx.fract_offset.x,
+ self.tile_offset.y as f32 * ctx.tile_size.height + ctx.fract_offset.y,
+ ),
+ ctx.tile_size,
+ );
+ self.local_tile_box = PictureBox2D::new(
+ self.local_tile_rect.origin,
+ self.local_tile_rect.bottom_right(),
+ );
+ self.bg_local_valid_rect = PictureBox2D::zero();
+ self.fg_local_valid_rect = PictureBox2D::zero();
+ self.invalidation_reason = None;
+ self.has_compositor_surface = false;
+
+ self.world_tile_rect = ctx.pic_to_world_mapper
+ .map(&self.local_tile_rect)
+ .expect("bug: map local tile rect");
+
+ // Check if this tile is currently on screen.
+ self.is_visible = self.world_tile_rect.intersects(&ctx.global_screen_world_rect);
+
+ // If the tile isn't visible, early exit, skipping the normal set up to
+ // validate dependencies. Instead, we will only compare the current tile
+ // dependencies the next time it comes into view.
+ if !self.is_visible {
+ return;
+ }
+
+ // Determine if the fractional offset of the transform is different this frame
+ // from the currently cached tile set.
+ let fract_changed = (self.fract_offset.x - ctx.fract_offset.x).abs() > 0.01 ||
+ (self.fract_offset.y - ctx.fract_offset.y).abs() > 0.01;
+ if fract_changed {
+ self.invalidate(None, InvalidationReason::FractionalOffset {
+ old: self.fract_offset,
+ new: ctx.fract_offset });
+ self.fract_offset = ctx.fract_offset;
+ }
+
+ if ctx.background_color != self.background_color {
+ self.invalidate(None, InvalidationReason::BackgroundColor {
+ old: self.background_color,
+ new: ctx.background_color });
+ self.background_color = ctx.background_color;
+ }
+
+ // Clear any dependencies so that when we rebuild them we
+ // can compare if the tile has the same content.
+ mem::swap(
+ &mut self.current_descriptor,
+ &mut self.prev_descriptor,
+ );
+ self.current_descriptor.clear();
+ self.root.clear(self.local_tile_rect.to_box2d());
+
+ // Since this tile is determined to be visible, it will get updated
+ // dependencies, so update the frame id we are storing dependencies for.
+ self.last_updated_frame_id = ctx.frame_id;
+ }
+
+ /// Add dependencies for a given primitive to this tile.
+ fn add_prim_dependency(
+ &mut self,
+ info: &PrimitiveDependencyInfo,
+ ) {
+ // If this tile isn't currently visible, we don't want to update the dependencies
+ // for this tile, as an optimization, since it won't be drawn anyway.
+ if !self.is_visible {
+ return;
+ }
+
+ // If this primitive is a compositor surface, any tile it affects must be
+ // drawn as an overlay tile.
+ if info.is_compositor_surface {
+ self.has_compositor_surface = true;
+ } else {
+ // Incorporate the bounding rect of the primitive in the local valid rect
+ // for this tile. This is used to minimize the size of the scissor rect
+ // during rasterization and the draw rect during composition of partial tiles.
+
+ // Once we have encountered 1+ compositor surfaces affecting this tile, include
+ // this bounding rect in the foreground. Otherwise, include in the background rect.
+ // This allows us to determine if we found any primitives that are on top of the
+ // compositor surface(s) for this tile. If so, we need to draw the tile with alpha
+ // blending as an overlay.
+ if self.has_compositor_surface {
+ self.fg_local_valid_rect = self.fg_local_valid_rect.union(&info.prim_clip_box);
+ } else {
+ self.bg_local_valid_rect = self.bg_local_valid_rect.union(&info.prim_clip_box);
+ }
+ }
+
+ // Include any image keys this tile depends on.
+ self.current_descriptor.images.extend_from_slice(&info.images);
+
+ // Include any opacity bindings this primitive depends on.
+ self.current_descriptor.opacity_bindings.extend_from_slice(&info.opacity_bindings);
+
+ // Include any clip nodes that this primitive depends on.
+ self.current_descriptor.clips.extend_from_slice(&info.clips);
+
+ // Include any transforms that this primitive depends on.
+ for spatial_node_index in &info.spatial_nodes {
+ self.current_descriptor.transforms.push(
+ SpatialNodeKey {
+ spatial_node_index: *spatial_node_index,
+ frame_id: self.last_updated_frame_id,
+ }
+ );
+ }
+
+ // Include any color bindings this primitive depends on.
+ if info.color_binding.is_some() {
+ self.current_descriptor.color_bindings.insert(
+ self.current_descriptor.color_bindings.len(), info.color_binding.unwrap());
+ }
+
+ // TODO(gw): The prim_clip_rect can be impacted by the clip rect of the display port,
+ // which can cause invalidations when a new display list with changed
+ // display port is received. To work around this, clamp the prim clip rect
+ // to the tile boundaries - if the clip hasn't affected the tile, then the
+ // changed clip can't affect the content of the primitive on this tile.
+ // In future, we could consider supplying the display port clip from Gecko
+ // in a different way (e.g. as a scroll frame clip) which still provides
+ // the desired clip for checkerboarding, but doesn't require this extra
+ // work below.
+
+ // TODO(gw): This is a hot part of the code - we could probably optimize further by:
+ // - Using min/max instead of clamps below (if we guarantee the rects are well formed)
+
+ let tile_p0 = self.local_tile_box.min;
+ let tile_p1 = self.local_tile_box.max;
+
+ let prim_clip_box = PictureBox2D::new(
+ PicturePoint::new(
+ clampf(info.prim_clip_box.min.x, tile_p0.x, tile_p1.x),
+ clampf(info.prim_clip_box.min.y, tile_p0.y, tile_p1.y),
+ ),
+ PicturePoint::new(
+ clampf(info.prim_clip_box.max.x, tile_p0.x, tile_p1.x),
+ clampf(info.prim_clip_box.max.y, tile_p0.y, tile_p1.y),
+ ),
+ );
+
+ // Update the tile descriptor, used for tile comparison during scene swaps.
+ let prim_index = PrimitiveDependencyIndex(self.current_descriptor.prims.len() as u32);
+
+ // We know that the casts below will never overflow because the array lengths are
+ // truncated to MAX_PRIM_SUB_DEPS during update_prim_dependencies.
+ debug_assert!(info.spatial_nodes.len() <= MAX_PRIM_SUB_DEPS);
+ debug_assert!(info.clips.len() <= MAX_PRIM_SUB_DEPS);
+ debug_assert!(info.images.len() <= MAX_PRIM_SUB_DEPS);
+ debug_assert!(info.opacity_bindings.len() <= MAX_PRIM_SUB_DEPS);
+
+ self.current_descriptor.prims.push(PrimitiveDescriptor {
+ prim_uid: info.prim_uid,
+ prim_clip_box,
+ transform_dep_count: info.spatial_nodes.len() as u8,
+ clip_dep_count: info.clips.len() as u8,
+ image_dep_count: info.images.len() as u8,
+ opacity_binding_dep_count: info.opacity_bindings.len() as u8,
+ color_binding_dep_count: if info.color_binding.is_some() { 1 } else { 0 } as u8,
+ });
+
+ // Add this primitive to the dirty rect quadtree.
+ self.root.add_prim(prim_index, &info.prim_clip_box);
+ }
+
+ /// Called during tile cache instance post_update. Allows invalidation and dirty
+ /// rect calculation after primitive dependencies have been updated.
+ fn post_update(
+ &mut self,
+ ctx: &TilePostUpdateContext,
+ state: &mut TilePostUpdateState,
+ frame_context: &FrameVisibilityContext,
+ ) -> bool {
+ // Register the frame id of this tile with the spatial node comparer, to ensure
+ // that it doesn't GC any spatial nodes from the comparer that are referenced
+ // by this tile. Must be done before we early exit below, so that we retain
+ // spatial node info even for tiles that are currently not visible.
+ state.spatial_node_comparer.retain_for_frame(self.last_updated_frame_id);
+
+ // If tile is not visible, just early out from here - we don't update dependencies
+ // so don't want to invalidate, merge, split etc. The tile won't need to be drawn
+ // (and thus updated / invalidated) until it is on screen again.
+ if !self.is_visible {
+ return false;
+ }
+
+ // Calculate the overall valid rect for this tile, including both the foreground
+ // and background local valid rects.
+ self.current_descriptor.local_valid_rect =
+ self.bg_local_valid_rect
+ .union(&self.fg_local_valid_rect)
+ .to_rect();
+
+ // TODO(gw): In theory, the local tile rect should always have an
+ // intersection with the overall picture rect. In practice,
+ // due to some accuracy issues with how fract_offset (and
+ // fp accuracy) are used in the calling method, this isn't
+ // always true. In this case, it's safe to set the local
+ // valid rect to zero, which means it will be clipped out
+ // and not affect the scene. In future, we should fix the
+ // accuracy issue above, so that this assumption holds, but
+ // it shouldn't have any noticeable effect on performance
+ // or memory usage (textures should never get allocated).
+ self.current_descriptor.local_valid_rect = self.local_tile_rect
+ .intersection(&ctx.local_rect)
+ .and_then(|r| r.intersection(&self.current_descriptor.local_valid_rect))
+ .unwrap_or_else(PictureRect::zero);
+
+ // Invalidate the tile based on the content changing.
+ self.update_content_validity(ctx, state, frame_context);
+
+ // If there are no primitives there is no need to draw or cache it.
+ if self.current_descriptor.prims.is_empty() {
+ // If there is a native compositor surface allocated for this (now empty) tile
+ // it must be freed here, otherwise the stale tile with previous contents will
+ // be composited. If the tile subsequently gets new primitives added to it, the
+ // surface will be re-allocated when it's added to the composite draw list.
+ if let Some(TileSurface::Texture { descriptor: SurfaceTextureDescriptor::Native { mut id, .. }, .. }) = self.surface.take() {
+ if let Some(id) = id.take() {
+ state.resource_cache.destroy_compositor_tile(id);
+ }
+ }
+
+ self.is_visible = false;
+ return false;
+ }
+
+ let world_valid_rect = ctx.pic_to_world_mapper
+ .map(&self.current_descriptor.local_valid_rect)
+ .expect("bug: map local valid rect");
+
+ // The device rect is guaranteed to be aligned on a device pixel - the round
+ // is just to deal with float accuracy. However, the valid rect is not
+ // always aligned to a device pixel. To handle this, round out to get all
+ // required pixels, and intersect with the tile device rect.
+ let device_rect = (self.world_tile_rect * ctx.global_device_pixel_scale).round();
+ self.device_valid_rect = (world_valid_rect * ctx.global_device_pixel_scale)
+ .round_out()
+ .intersection(&device_rect)
+ .unwrap_or_else(DeviceRect::zero);
+
+ // Check if this tile can be considered opaque. Opacity state must be updated only
+ // after all early out checks have been performed. Otherwise, we might miss updating
+ // the native surface next time this tile becomes visible.
+ let clipped_rect = self.current_descriptor.local_valid_rect
+ .intersection(&ctx.local_clip_rect)
+ .unwrap_or_else(PictureRect::zero);
+ let mut is_opaque = ctx.backdrop.opaque_rect.contains_rect(&clipped_rect);
+
+ if self.has_compositor_surface {
+ // If we found primitive(s) that are ordered _after_ the first compositor
+ // surface, _and_ intersect with any compositor surface, then we will need
+ // to draw this tile with alpha blending, as an overlay to the compositor surface.
+ let fg_world_valid_rect = ctx.pic_to_world_mapper
+ .map(&self.fg_local_valid_rect.to_rect())
+ .expect("bug: map fg local valid rect");
+ let fg_device_valid_rect = fg_world_valid_rect * ctx.global_device_pixel_scale;
+
+ for surface in ctx.external_surfaces {
+ if surface.device_rect.intersects(&fg_device_valid_rect) {
+ is_opaque = false;
+ break;
+ }
+ }
+ }
+
+ // Set the correct z_id for this tile based on opacity
+ if is_opaque {
+ self.z_id = ctx.z_id_opaque;
+ } else {
+ self.z_id = ctx.z_id_alpha;
+ }
+
+ if is_opaque != self.is_opaque {
+ // If opacity changed, the native compositor surface and all tiles get invalidated.
+ // (this does nothing if not using native compositor mode).
+ // TODO(gw): This property probably changes very rarely, so it is OK to invalidate
+ // everything in this case. If it turns out that this isn't true, we could
+ // consider other options, such as per-tile opacity (natively supported
+ // on CoreAnimation, and supported if backed by non-virtual surfaces in
+ // DirectComposition).
+ if let Some(TileSurface::Texture { descriptor: SurfaceTextureDescriptor::Native { ref mut id, .. }, .. }) = self.surface {
+ if let Some(id) = id.take() {
+ state.resource_cache.destroy_compositor_tile(id);
+ }
+ }
+
+ // Invalidate the entire tile to force a redraw.
+ self.invalidate(None, InvalidationReason::SurfaceOpacityChanged { became_opaque: is_opaque });
+ self.is_opaque = is_opaque;
+ }
+
+ // Check if the selected composite mode supports dirty rect updates. For Draw composite
+ // mode, we can always update the content with smaller dirty rects. For native composite
+ // mode, we can only use dirty rects if the compositor supports partial surface updates.
+ let (supports_dirty_rects, supports_simple_prims) = match state.composite_state.compositor_kind {
+ CompositorKind::Draw { .. } => {
+ (true, true)
+ }
+ CompositorKind::Native { max_update_rects, .. } => {
+ (max_update_rects > 0, false)
+ }
+ };
+
+ // TODO(gw): Consider using smaller tiles and/or tile splits for
+ // native compositors that don't support dirty rects.
+ if supports_dirty_rects {
+ // Only allow splitting for normal content sized tiles
+ if ctx.current_tile_size == TILE_SIZE_DEFAULT {
+ let max_split_level = 3;
+
+ // Consider splitting / merging dirty regions
+ self.root.maybe_merge_or_split(
+ 0,
+ &self.current_descriptor.prims,
+ max_split_level,
+ );
+ }
+ }
+
+ // The dirty rect will be set correctly by now. If the underlying platform
+ // doesn't support partial updates, and this tile isn't valid, force the dirty
+ // rect to be the size of the entire tile.
+ if !self.is_valid && !supports_dirty_rects {
+ self.local_dirty_rect = self.local_tile_rect;
+ }
+
+ // See if this tile is a simple color, in which case we can just draw
+ // it as a rect, and avoid allocating a texture surface and drawing it.
+ // TODO(gw): Initial native compositor interface doesn't support simple
+ // color tiles. We can definitely support this in DC, so this
+ // should be added as a follow up.
+ let is_simple_prim =
+ ctx.backdrop.kind.is_some() &&
+ self.current_descriptor.prims.len() == 1 &&
+ self.is_opaque &&
+ supports_simple_prims;
+
+ // Set up the backing surface for this tile.
+ let surface = if is_simple_prim {
+ // If we determine the tile can be represented by a color, set the
+ // surface unconditionally (this will drop any previously used
+ // texture cache backing surface).
+ match ctx.backdrop.kind {
+ Some(BackdropKind::Color { color }) => {
+ TileSurface::Color {
+ color,
+ }
+ }
+ Some(BackdropKind::Clear) => {
+ TileSurface::Clear
+ }
+ None => {
+ // This should be prevented by the is_simple_prim check above.
+ unreachable!();
+ }
+ }
+ } else {
+ // If this tile will be backed by a surface, we want to retain
+ // the texture handle from the previous frame, if possible. If
+ // the tile was previously a color, or not set, then just set
+ // up a new texture cache handle.
+ match self.surface.take() {
+ Some(TileSurface::Texture { descriptor, visibility_mask }) => {
+ // Reuse the existing descriptor and vis mask
+ TileSurface::Texture {
+ descriptor,
+ visibility_mask,
+ }
+ }
+ Some(TileSurface::Color { .. }) | Some(TileSurface::Clear) | None => {
+ // This is the case where we are constructing a tile surface that
+ // involves drawing to a texture. Create the correct surface
+ // descriptor depending on the compositing mode that will read
+ // the output.
+ let descriptor = match state.composite_state.compositor_kind {
+ CompositorKind::Draw { .. } => {
+ // For a texture cache entry, create an invalid handle that
+ // will be allocated when update_picture_cache is called.
+ SurfaceTextureDescriptor::TextureCache {
+ handle: TextureCacheHandle::invalid(),
+ }
+ }
+ CompositorKind::Native { .. } => {
+ // Create a native surface surface descriptor, but don't allocate
+ // a surface yet. The surface is allocated *after* occlusion
+ // culling occurs, so that only visible tiles allocate GPU memory.
+ SurfaceTextureDescriptor::Native {
+ id: None,
+ }
+ }
+ };
+
+ TileSurface::Texture {
+ descriptor,
+ visibility_mask: PrimitiveVisibilityMask::empty(),
+ }
+ }
+ }
+ };
+
+ // Store the current surface backing info for use during batching.
+ self.surface = Some(surface);
+
+ true
+ }
+}
+
+/// Defines a key that uniquely identifies a primitive instance.
+#[derive(Debug, Copy, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PrimitiveDescriptor {
+ /// Uniquely identifies the content of the primitive template.
+ pub prim_uid: ItemUid,
+ /// The clip rect for this primitive. Included here in
+ /// dependencies since there is no entry in the clip chain
+ /// dependencies for the local clip rect.
+ pub prim_clip_box: PictureBox2D,
+ /// The number of extra dependencies that this primitive has.
+ transform_dep_count: u8,
+ image_dep_count: u8,
+ opacity_binding_dep_count: u8,
+ clip_dep_count: u8,
+ color_binding_dep_count: u8,
+}
+
+impl PartialEq for PrimitiveDescriptor {
+ fn eq(&self, other: &Self) -> bool {
+ const EPSILON: f32 = 0.001;
+
+ if self.prim_uid != other.prim_uid {
+ return false;
+ }
+
+ if !self.prim_clip_box.min.x.approx_eq_eps(&other.prim_clip_box.min.x, &EPSILON) {
+ return false;
+ }
+ if !self.prim_clip_box.min.y.approx_eq_eps(&other.prim_clip_box.min.y, &EPSILON) {
+ return false;
+ }
+ if !self.prim_clip_box.max.x.approx_eq_eps(&other.prim_clip_box.max.x, &EPSILON) {
+ return false;
+ }
+ if !self.prim_clip_box.max.y.approx_eq_eps(&other.prim_clip_box.max.y, &EPSILON) {
+ return false;
+ }
+
+ true
+ }
+}
+
+/// A small helper to compare two arrays of primitive dependencies.
+struct CompareHelper<'a, T> where T: Copy {
+ offset_curr: usize,
+ offset_prev: usize,
+ curr_items: &'a [T],
+ prev_items: &'a [T],
+}
+
+impl<'a, T> CompareHelper<'a, T> where T: Copy + PartialEq {
+ /// Construct a new compare helper for a current / previous set of dependency information.
+ fn new(
+ prev_items: &'a [T],
+ curr_items: &'a [T],
+ ) -> Self {
+ CompareHelper {
+ offset_curr: 0,
+ offset_prev: 0,
+ curr_items,
+ prev_items,
+ }
+ }
+
+ /// Reset the current position in the dependency array to the start
+ fn reset(&mut self) {
+ self.offset_prev = 0;
+ self.offset_curr = 0;
+ }
+
+ /// Test if two sections of the dependency arrays are the same, by checking both
+ /// item equality, and a user closure to see if the content of the item changed.
+ fn is_same<F>(
+ &self,
+ prev_count: u8,
+ curr_count: u8,
+ mut f: F,
+ opt_detail: Option<&mut CompareHelperResult<T>>,
+ ) -> bool where F: FnMut(&T, &T) -> bool {
+ // If the number of items is different, trivial reject.
+ if prev_count != curr_count {
+ if let Some(detail) = opt_detail { *detail = CompareHelperResult::Count{ prev_count, curr_count }; }
+ return false;
+ }
+ // If both counts are 0, then no need to check these dependencies.
+ if curr_count == 0 {
+ if let Some(detail) = opt_detail { *detail = CompareHelperResult::Equal; }
+ return true;
+ }
+ // If both counts are u8::MAX, this is a sentinel that we can't compare these
+ // deps, so just trivial reject.
+ if curr_count as usize == MAX_PRIM_SUB_DEPS {
+ if let Some(detail) = opt_detail { *detail = CompareHelperResult::Sentinel; }
+ return false;
+ }
+
+ let end_prev = self.offset_prev + prev_count as usize;
+ let end_curr = self.offset_curr + curr_count as usize;
+
+ let curr_items = &self.curr_items[self.offset_curr .. end_curr];
+ let prev_items = &self.prev_items[self.offset_prev .. end_prev];
+
+ for (curr, prev) in curr_items.iter().zip(prev_items.iter()) {
+ if !f(prev, curr) {
+ if let Some(detail) = opt_detail { *detail = CompareHelperResult::PredicateTrue{ curr: *curr }; }
+ return false;
+ }
+ }
+
+ if let Some(detail) = opt_detail { *detail = CompareHelperResult::Equal; }
+ true
+ }
+
+ // Advance the prev dependency array by a given amount
+ fn advance_prev(&mut self, count: u8) {
+ self.offset_prev += count as usize;
+ }
+
+ // Advance the current dependency array by a given amount
+ fn advance_curr(&mut self, count: u8) {
+ self.offset_curr += count as usize;
+ }
+}
+
+/// Uniquely describes the content of this tile, in a way that can be
+/// (reasonably) efficiently hashed and compared.
+#[cfg_attr(any(feature="capture",feature="replay"), derive(Clone))]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct TileDescriptor {
+ /// List of primitive instance unique identifiers. The uid is guaranteed
+ /// to uniquely describe the content of the primitive template, while
+ /// the other parameters describe the clip chain and instance params.
+ pub prims: Vec<PrimitiveDescriptor>,
+
+ /// List of clip node descriptors.
+ clips: Vec<ItemUid>,
+
+ /// List of image keys that this tile depends on.
+ images: Vec<ImageDependency>,
+
+ /// The set of opacity bindings that this tile depends on.
+ // TODO(gw): Ugh, get rid of all opacity binding support!
+ opacity_bindings: Vec<OpacityBinding>,
+
+ /// List of the effects of transforms that we care about
+ /// tracking for this tile.
+ transforms: Vec<SpatialNodeKey>,
+
+ /// Picture space rect that contains valid pixels region of this tile.
+ local_valid_rect: PictureRect,
+
+ /// List of the effects of color that we care about
+ /// tracking for this tile.
+ color_bindings: Vec<ColorBinding>,
+}
+
+impl TileDescriptor {
+ fn new() -> Self {
+ TileDescriptor {
+ prims: Vec::new(),
+ clips: Vec::new(),
+ opacity_bindings: Vec::new(),
+ images: Vec::new(),
+ transforms: Vec::new(),
+ local_valid_rect: PictureRect::zero(),
+ color_bindings: Vec::new(),
+ }
+ }
+
+ /// Print debug information about this tile descriptor to a tree printer.
+ fn print(&self, pt: &mut dyn PrintTreePrinter) {
+ pt.new_level("current_descriptor".to_string());
+
+ pt.new_level("prims".to_string());
+ for prim in &self.prims {
+ pt.new_level(format!("prim uid={}", prim.prim_uid.get_uid()));
+ pt.add_item(format!("clip: p0={},{} p1={},{}",
+ prim.prim_clip_box.min.x,
+ prim.prim_clip_box.min.y,
+ prim.prim_clip_box.max.x,
+ prim.prim_clip_box.max.y,
+ ));
+ pt.add_item(format!("deps: t={} i={} o={} c={} color={}",
+ prim.transform_dep_count,
+ prim.image_dep_count,
+ prim.opacity_binding_dep_count,
+ prim.clip_dep_count,
+ prim.color_binding_dep_count,
+ ));
+ pt.end_level();
+ }
+ pt.end_level();
+
+ if !self.clips.is_empty() {
+ pt.new_level("clips".to_string());
+ for clip in &self.clips {
+ pt.new_level(format!("clip uid={}", clip.get_uid()));
+ pt.end_level();
+ }
+ pt.end_level();
+ }
+
+ if !self.images.is_empty() {
+ pt.new_level("images".to_string());
+ for info in &self.images {
+ pt.new_level(format!("key={:?}", info.key));
+ pt.add_item(format!("generation={:?}", info.generation));
+ pt.end_level();
+ }
+ pt.end_level();
+ }
+
+ if !self.opacity_bindings.is_empty() {
+ pt.new_level("opacity_bindings".to_string());
+ for opacity_binding in &self.opacity_bindings {
+ pt.new_level(format!("binding={:?}", opacity_binding));
+ pt.end_level();
+ }
+ pt.end_level();
+ }
+
+ if !self.transforms.is_empty() {
+ pt.new_level("transforms".to_string());
+ for transform in &self.transforms {
+ pt.new_level(format!("spatial_node={:?}", transform));
+ pt.end_level();
+ }
+ pt.end_level();
+ }
+
+ if !self.color_bindings.is_empty() {
+ pt.new_level("color_bindings".to_string());
+ for color_binding in &self.color_bindings {
+ pt.new_level(format!("binding={:?}", color_binding));
+ pt.end_level();
+ }
+ pt.end_level();
+ }
+
+ pt.end_level();
+ }
+
+ /// Clear the dependency information for a tile, when the dependencies
+ /// are being rebuilt.
+ fn clear(&mut self) {
+ self.prims.clear();
+ self.clips.clear();
+ self.opacity_bindings.clear();
+ self.images.clear();
+ self.transforms.clear();
+ self.local_valid_rect = PictureRect::zero();
+ self.color_bindings.clear();
+ }
+}
+
+/// Stores both the world and devices rects for a single dirty rect.
+#[derive(Debug, Clone)]
+pub struct DirtyRegionRect {
+ /// World rect of this dirty region
+ pub world_rect: WorldRect,
+ /// Bitfield for picture render tasks that draw this dirty region.
+ pub visibility_mask: PrimitiveVisibilityMask,
+}
+
+/// Represents the dirty region of a tile cache picture.
+#[derive(Debug, Clone)]
+pub struct DirtyRegion {
+ /// The individual dirty rects of this region.
+ pub dirty_rects: Vec<DirtyRegionRect>,
+
+ /// The overall dirty rect, a combination of dirty_rects
+ pub combined: WorldRect,
+}
+
+impl DirtyRegion {
+ /// Construct a new dirty region tracker.
+ pub fn new(
+ ) -> Self {
+ DirtyRegion {
+ dirty_rects: Vec::with_capacity(PrimitiveVisibilityMask::MAX_DIRTY_REGIONS),
+ combined: WorldRect::zero(),
+ }
+ }
+
+ /// Reset the dirty regions back to empty
+ pub fn clear(&mut self) {
+ self.dirty_rects.clear();
+ self.combined = WorldRect::zero();
+ }
+
+ /// Push a dirty rect into this region
+ pub fn push(
+ &mut self,
+ rect: WorldRect,
+ visibility_mask: PrimitiveVisibilityMask,
+ ) {
+ // Include this in the overall dirty rect
+ self.combined = self.combined.union(&rect);
+
+ // Store the individual dirty rect.
+ self.dirty_rects.push(DirtyRegionRect {
+ world_rect: rect,
+ visibility_mask,
+ });
+ }
+
+ /// Include another rect into an existing dirty region.
+ pub fn include_rect(
+ &mut self,
+ region_index: usize,
+ rect: WorldRect,
+ ) {
+ self.combined = self.combined.union(&rect);
+
+ let region = &mut self.dirty_rects[region_index];
+ region.world_rect = region.world_rect.union(&rect);
+ }
+
+ // TODO(gw): This returns a heap allocated object. Perhaps we can simplify this
+ // logic? Although - it's only used very rarely so it may not be an issue.
+ pub fn inflate(
+ &self,
+ inflate_amount: f32,
+ ) -> DirtyRegion {
+ let mut dirty_rects = Vec::with_capacity(self.dirty_rects.len());
+ let mut combined = WorldRect::zero();
+
+ for rect in &self.dirty_rects {
+ let world_rect = rect.world_rect.inflate(inflate_amount, inflate_amount);
+ combined = combined.union(&world_rect);
+ dirty_rects.push(DirtyRegionRect {
+ world_rect,
+ visibility_mask: rect.visibility_mask,
+ });
+ }
+
+ DirtyRegion {
+ dirty_rects,
+ combined,
+ }
+ }
+
+ /// Creates a record of this dirty region for exporting to test infrastructure.
+ pub fn record(&self) -> RecordedDirtyRegion {
+ let mut rects: Vec<WorldRect> =
+ self.dirty_rects.iter().map(|r| r.world_rect).collect();
+ rects.sort_unstable_by_key(|r| (r.origin.y as usize, r.origin.x as usize));
+ RecordedDirtyRegion { rects }
+ }
+}
+
+/// A recorded copy of the dirty region for exporting to test infrastructure.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct RecordedDirtyRegion {
+ pub rects: Vec<WorldRect>,
+}
+
+impl ::std::fmt::Display for RecordedDirtyRegion {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ for r in self.rects.iter() {
+ let (x, y, w, h) = (r.origin.x, r.origin.y, r.size.width, r.size.height);
+ write!(f, "[({},{}):{}x{}]", x, y, w, h)?;
+ }
+ Ok(())
+ }
+}
+
+impl ::std::fmt::Debug for RecordedDirtyRegion {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ ::std::fmt::Display::fmt(self, f)
+ }
+}
+
+#[derive(Debug, Copy, Clone)]
+pub enum BackdropKind {
+ Color {
+ color: ColorF,
+ },
+ Clear,
+}
+
+/// Stores information about the calculated opaque backdrop of this slice.
+#[derive(Debug, Copy, Clone)]
+pub struct BackdropInfo {
+ /// The picture space rectangle that is known to be opaque. This is used
+ /// to determine where subpixel AA can be used, and where alpha blending
+ /// can be disabled.
+ pub opaque_rect: PictureRect,
+ /// Kind of the backdrop
+ pub kind: Option<BackdropKind>,
+}
+
+impl BackdropInfo {
+ fn empty() -> Self {
+ BackdropInfo {
+ opaque_rect: PictureRect::zero(),
+ kind: None,
+ }
+ }
+}
+
+#[derive(Clone)]
+pub struct TileCacheLoggerSlice {
+ pub serialized_slice: String,
+ pub local_to_world_transform: Transform3D<f32, PicturePixel, WorldPixel>,
+}
+
+#[cfg(any(feature = "capture", feature = "replay"))]
+macro_rules! declare_tile_cache_logger_updatelists {
+ ( $( $name:ident : $ty:ty, )+ ) => {
+ #[cfg_attr(feature = "capture", derive(Serialize))]
+ #[cfg_attr(feature = "replay", derive(Deserialize))]
+ struct TileCacheLoggerUpdateListsSerializer {
+ pub ron_string: Vec<String>,
+ }
+
+ pub struct TileCacheLoggerUpdateLists {
+ $(
+ /// Generate storage, one per interner.
+ /// the tuple is a workaround to avoid the need for multiple
+ /// fields that start with $name (macro concatenation).
+ /// the string is .ron serialized updatelist at capture time;
+ /// the updates is the list of DataStore updates (avoid UpdateList
+ /// due to Default() requirements on the Keys) reconstructed at
+ /// load time.
+ pub $name: (Vec<String>, Vec<UpdateList<<$ty as Internable>::Key>>),
+ )+
+ }
+
+ impl TileCacheLoggerUpdateLists {
+ pub fn new() -> Self {
+ TileCacheLoggerUpdateLists {
+ $(
+ $name : ( Vec::new(), Vec::new() ),
+ )+
+ }
+ }
+
+ /// serialize all interners in updates to .ron
+ #[cfg(feature = "capture")]
+ fn serialize_updates(
+ &mut self,
+ updates: &InternerUpdates
+ ) {
+ $(
+ self.$name.0.push(ron::ser::to_string_pretty(&updates.$name, Default::default()).unwrap());
+ )+
+ }
+
+ fn is_empty(&self) -> bool {
+ $(
+ if !self.$name.0.is_empty() { return false; }
+ )+
+ true
+ }
+
+ #[cfg(feature = "capture")]
+ fn to_ron(&self) -> String {
+ let mut serializer =
+ TileCacheLoggerUpdateListsSerializer { ron_string: Vec::new() };
+ $(
+ serializer.ron_string.push(
+ ron::ser::to_string_pretty(&self.$name.0, Default::default()).unwrap());
+ )+
+ ron::ser::to_string_pretty(&serializer, Default::default()).unwrap()
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn from_ron(&mut self, text: &str) {
+ let serializer : TileCacheLoggerUpdateListsSerializer =
+ match ron::de::from_str(&text) {
+ Ok(data) => { data }
+ Err(e) => {
+ println!("ERROR: failed to deserialize updatelist: {:?}\n{:?}", &text, e);
+ return;
+ }
+ };
+ let mut index = 0;
+ $(
+ let ron_lists : Vec<String> = ron::de::from_str(&serializer.ron_string[index]).unwrap();
+ self.$name.1 = ron_lists.iter()
+ .map( |list| ron::de::from_str(&list).unwrap() )
+ .collect();
+ index = index + 1;
+ )+
+ // error: value assigned to `index` is never read
+ let _ = index;
+ }
+
+ /// helper method to add a stringified version of all interned keys into
+ /// a lookup table based on ItemUid. Use strings as a form of type erasure
+ /// so all UpdateLists can go into a single map.
+ /// Then during analysis, when we see an invalidation reason due to
+ /// "ItemUid such and such was added to the tile primitive list", the lookup
+ /// allows mapping that back into something readable.
+ #[cfg(feature = "replay")]
+ pub fn insert_in_lookup(
+ &mut self,
+ itemuid_to_string: &mut HashMap<ItemUid, String>)
+ {
+ $(
+ {
+ for list in &self.$name.1 {
+ for insertion in &list.insertions {
+ itemuid_to_string.insert(
+ insertion.uid,
+ format!("{:?}", insertion.value));
+ }
+ }
+ }
+ )+
+ }
+ }
+ }
+}
+
+#[cfg(any(feature = "capture", feature = "replay"))]
+enumerate_interners!(declare_tile_cache_logger_updatelists);
+
+#[cfg(not(any(feature = "capture", feature = "replay")))]
+pub struct TileCacheLoggerUpdateLists {
+}
+
+#[cfg(not(any(feature = "capture", feature = "replay")))]
+impl TileCacheLoggerUpdateLists {
+ pub fn new() -> Self { TileCacheLoggerUpdateLists {} }
+ fn is_empty(&self) -> bool { true }
+}
+
+/// Log tile cache activity for one single frame.
+/// Also stores the commands sent to the interning data_stores
+/// so we can see which items were created or destroyed this frame,
+/// and correlate that with tile invalidation activity.
+pub struct TileCacheLoggerFrame {
+ /// slices in the frame, one per take_context call
+ pub slices: Vec<TileCacheLoggerSlice>,
+ /// interning activity
+ pub update_lists: TileCacheLoggerUpdateLists
+}
+
+impl TileCacheLoggerFrame {
+ pub fn new() -> Self {
+ TileCacheLoggerFrame {
+ slices: Vec::new(),
+ update_lists: TileCacheLoggerUpdateLists::new()
+ }
+ }
+
+ pub fn is_empty(&self) -> bool {
+ self.slices.is_empty() && self.update_lists.is_empty()
+ }
+}
+
+/// Log tile cache activity whenever anything happens in take_context.
+pub struct TileCacheLogger {
+ /// next write pointer
+ pub write_index : usize,
+ /// ron serialization of tile caches;
+ pub frames: Vec<TileCacheLoggerFrame>
+}
+
+impl TileCacheLogger {
+ pub fn new(
+ num_frames: usize
+ ) -> Self {
+ let mut frames = Vec::with_capacity(num_frames);
+ for _i in 0..num_frames { // no Clone so no resize
+ frames.push(TileCacheLoggerFrame::new());
+ }
+ TileCacheLogger {
+ write_index: 0,
+ frames
+ }
+ }
+
+ pub fn is_enabled(&self) -> bool {
+ !self.frames.is_empty()
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn add(
+ &mut self,
+ serialized_slice: String,
+ local_to_world_transform: Transform3D<f32, PicturePixel, WorldPixel>
+ ) {
+ if !self.is_enabled() {
+ return;
+ }
+ self.frames[self.write_index].slices.push(
+ TileCacheLoggerSlice {
+ serialized_slice,
+ local_to_world_transform });
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn serialize_updates(&mut self, updates: &InternerUpdates) {
+ if !self.is_enabled() {
+ return;
+ }
+ self.frames[self.write_index].update_lists.serialize_updates(updates);
+ }
+
+ /// see if anything was written in this frame, and if so,
+ /// advance the write index in a circular way and clear the
+ /// recorded string.
+ pub fn advance(&mut self) {
+ if !self.is_enabled() || self.frames[self.write_index].is_empty() {
+ return;
+ }
+ self.write_index = self.write_index + 1;
+ if self.write_index >= self.frames.len() {
+ self.write_index = 0;
+ }
+ self.frames[self.write_index] = TileCacheLoggerFrame::new();
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn save_capture(
+ &self, root: &PathBuf
+ ) {
+ if !self.is_enabled() {
+ return;
+ }
+ use std::fs;
+
+ info!("saving tile cache log");
+ let path_tile_cache = root.join("tile_cache");
+ if !path_tile_cache.is_dir() {
+ fs::create_dir(&path_tile_cache).unwrap();
+ }
+
+ let mut files_written = 0;
+ for ix in 0..self.frames.len() {
+ // ...and start with write_index, since that's the oldest entry
+ // that we're about to overwrite. However when we get to
+ // save_capture, we've add()ed entries but haven't advance()d yet,
+ // so the actual oldest entry is write_index + 1
+ let index = (self.write_index + 1 + ix) % self.frames.len();
+ if self.frames[index].is_empty() {
+ continue;
+ }
+
+ let filename = path_tile_cache.join(format!("frame{:05}.ron", files_written));
+ let mut output = File::create(filename).unwrap();
+ output.write_all(b"// slice data\n").unwrap();
+ output.write_all(b"[\n").unwrap();
+ for item in &self.frames[index].slices {
+ output.write_all(b"( transform:\n").unwrap();
+ let transform =
+ ron::ser::to_string_pretty(
+ &item.local_to_world_transform, Default::default()).unwrap();
+ output.write_all(transform.as_bytes()).unwrap();
+ output.write_all(b",\n tile_cache:\n").unwrap();
+ output.write_all(item.serialized_slice.as_bytes()).unwrap();
+ output.write_all(b"\n),\n").unwrap();
+ }
+ output.write_all(b"]\n\n").unwrap();
+
+ output.write_all(b"// @@@ chunk @@@\n\n").unwrap();
+
+ output.write_all(b"// interning data\n").unwrap();
+ output.write_all(self.frames[index].update_lists.to_ron().as_bytes()).unwrap();
+
+ files_written = files_written + 1;
+ }
+ }
+}
+
+/// Represents the native surfaces created for a picture cache, if using
+/// a native compositor. An opaque and alpha surface is always created,
+/// but tiles are added to a surface based on current opacity. If the
+/// calculated opacity of a tile changes, the tile is invalidated and
+/// attached to a different native surface. This means that we don't
+/// need to invalidate the entire surface if only some tiles are changing
+/// opacity. It also means we can take advantage of opaque tiles on cache
+/// slices where only some of the tiles are opaque. There is an assumption
+/// that creating a native surface is cheap, and only when a tile is added
+/// to a surface is there a significant cost. This assumption holds true
+/// for the current native compositor implementations on Windows and Mac.
+pub struct NativeSurface {
+ /// Native surface for opaque tiles
+ pub opaque: NativeSurfaceId,
+ /// Native surface for alpha tiles
+ pub alpha: NativeSurfaceId,
+}
+
+/// Hash key for an external native compositor surface
+#[derive(PartialEq, Eq, Hash)]
+pub struct ExternalNativeSurfaceKey {
+ /// The YUV/RGB image keys that are used to draw this surface.
+ pub image_keys: [ImageKey; 3],
+ /// The current device size of the surface.
+ pub size: DeviceIntSize,
+}
+
+/// Information about a native compositor surface cached between frames.
+pub struct ExternalNativeSurface {
+ /// If true, the surface was used this frame. Used for a simple form
+ /// of GC to remove old surfaces.
+ pub used_this_frame: bool,
+ /// The native compositor surface handle
+ pub native_surface_id: NativeSurfaceId,
+ /// List of image keys, and current image generations, that are drawn in this surface.
+ /// The image generations are used to check if the compositor surface is dirty and
+ /// needs to be updated.
+ pub image_dependencies: [ImageDependency; 3],
+}
+
+/// Represents a cache of tiles that make up a picture primitives.
+pub struct TileCacheInstance {
+ /// Index of the tile cache / slice for this frame builder. It's determined
+ /// by the setup_picture_caching method during flattening, which splits the
+ /// picture tree into multiple slices. It's used as a simple input to the tile
+ /// keys. It does mean we invalidate tiles if a new layer gets inserted / removed
+ /// between display lists - this seems very unlikely to occur on most pages, but
+ /// can be revisited if we ever notice that.
+ pub slice: usize,
+ /// Propagated information about the slice
+ pub slice_flags: SliceFlags,
+ /// The currently selected tile size to use for this cache
+ pub current_tile_size: DeviceIntSize,
+ /// The positioning node for this tile cache.
+ pub spatial_node_index: SpatialNodeIndex,
+ /// Hash of tiles present in this picture.
+ pub tiles: FastHashMap<TileOffset, Box<Tile>>,
+ /// A helper struct to map local rects into surface coords.
+ map_local_to_surface: SpaceMapper<LayoutPixel, PicturePixel>,
+ /// A helper struct to map child picture rects into picture cache surface coords.
+ map_child_pic_to_surface: SpaceMapper<PicturePixel, PicturePixel>,
+ /// List of opacity bindings, with some extra information
+ /// about whether they changed since last frame.
+ opacity_bindings: FastHashMap<PropertyBindingId, OpacityBindingInfo>,
+ /// Switch back and forth between old and new bindings hashmaps to avoid re-allocating.
+ old_opacity_bindings: FastHashMap<PropertyBindingId, OpacityBindingInfo>,
+ /// A helper to compare transforms between previous and current frame.
+ spatial_node_comparer: SpatialNodeComparer,
+ /// List of color bindings, with some extra information
+ /// about whether they changed since last frame.
+ color_bindings: FastHashMap<PropertyBindingId, ColorBindingInfo>,
+ /// Switch back and forth between old and new bindings hashmaps to avoid re-allocating.
+ old_color_bindings: FastHashMap<PropertyBindingId, ColorBindingInfo>,
+ /// The current dirty region tracker for this picture.
+ pub dirty_region: DirtyRegion,
+ /// Current size of tiles in picture units.
+ tile_size: PictureSize,
+ /// Tile coords of the currently allocated grid.
+ tile_rect: TileRect,
+ /// Pre-calculated versions of the tile_rect above, used to speed up the
+ /// calculations in get_tile_coords_for_rect.
+ tile_bounds_p0: TileOffset,
+ tile_bounds_p1: TileOffset,
+ /// Local rect (unclipped) of the picture this cache covers.
+ pub local_rect: PictureRect,
+ /// The local clip rect, from the shared clips of this picture.
+ local_clip_rect: PictureRect,
+ /// The surface index that this tile cache will be drawn into.
+ surface_index: SurfaceIndex,
+ /// The background color from the renderer. If this is set opaque, we know it's
+ /// fine to clear the tiles to this and allow subpixel text on the first slice.
+ pub background_color: Option<ColorF>,
+ /// Information about the calculated backdrop content of this cache.
+ pub backdrop: BackdropInfo,
+ /// The allowed subpixel mode for this surface, which depends on the detected
+ /// opacity of the background.
+ pub subpixel_mode: SubpixelMode,
+ /// A list of clip handles that exist on every (top-level) primitive in this picture.
+ /// It's often the case that these are root / fixed position clips. By handling them
+ /// here, we can avoid applying them to the items, which reduces work, but more importantly
+ /// reduces invalidations.
+ pub shared_clips: Vec<ClipInstance>,
+ /// The clip chain that represents the shared_clips above. Used to build the local
+ /// clip rect for this tile cache.
+ shared_clip_chain: ClipChainId,
+ /// The current transform of the picture cache root spatial node
+ root_transform: TransformKey,
+ /// The number of frames until this cache next evaluates what tile size to use.
+ /// If a picture rect size is regularly changing just around a size threshold,
+ /// we don't want to constantly invalidate and reallocate different tile size
+ /// configuration each frame.
+ frames_until_size_eval: usize,
+ /// The current fractional offset of the cached picture
+ fract_offset: PictureVector2D,
+ /// For DirectComposition, virtual surfaces don't support negative coordinates. However,
+ /// picture cache tile coordinates can be negative. To handle this, we apply an offset
+ /// to each tile in DirectComposition. We want to change this as little as possible,
+ /// to avoid invalidating tiles. However, if we have a picture cache tile coordinate
+ /// which is outside the virtual surface bounds, we must change this to allow
+ /// correct remapping of the coordinates passed to BeginDraw in DC.
+ virtual_offset: DeviceIntPoint,
+ /// keep around the hash map used as compare_cache to avoid reallocating it each
+ /// frame.
+ compare_cache: FastHashMap<PrimitiveComparisonKey, PrimitiveCompareResult>,
+ /// The allocated compositor surfaces for this picture cache. May be None if
+ /// not using native compositor, or if the surface was destroyed and needs
+ /// to be reallocated next time this surface contains valid tiles.
+ pub native_surface: Option<NativeSurface>,
+ /// The current device position of this cache. Used to set the compositor
+ /// offset of the surface when building the visual tree.
+ pub device_position: DevicePoint,
+ /// The currently considered tile size override. Used to check if we should
+ /// re-evaluate tile size, even if the frame timer hasn't expired.
+ tile_size_override: Option<DeviceIntSize>,
+ /// List of external surfaces that have been promoted from primitives
+ /// in this tile cache.
+ pub external_surfaces: Vec<ExternalSurfaceDescriptor>,
+ /// z-buffer ID assigned to opaque tiles in this slice
+ pub z_id_opaque: ZBufferId,
+ /// A cache of compositor surfaces that are retained between frames
+ pub external_native_surface_cache: FastHashMap<ExternalNativeSurfaceKey, ExternalNativeSurface>,
+ /// Current frame ID of this tile cache instance. Used for book-keeping / garbage collecting
+ frame_id: FrameId,
+}
+
+enum SurfacePromotionResult {
+ Failed,
+ Success {
+ flip_y: bool,
+ }
+}
+
+impl TileCacheInstance {
+ pub fn new(
+ slice: usize,
+ slice_flags: SliceFlags,
+ spatial_node_index: SpatialNodeIndex,
+ background_color: Option<ColorF>,
+ shared_clips: Vec<ClipInstance>,
+ shared_clip_chain: ClipChainId,
+ fb_config: &FrameBuilderConfig,
+ ) -> Self {
+ let virtual_surface_size = fb_config.compositor_kind.get_virtual_surface_size();
+
+ TileCacheInstance {
+ slice,
+ slice_flags,
+ spatial_node_index,
+ tiles: FastHashMap::default(),
+ map_local_to_surface: SpaceMapper::new(
+ ROOT_SPATIAL_NODE_INDEX,
+ PictureRect::zero(),
+ ),
+ map_child_pic_to_surface: SpaceMapper::new(
+ ROOT_SPATIAL_NODE_INDEX,
+ PictureRect::zero(),
+ ),
+ opacity_bindings: FastHashMap::default(),
+ old_opacity_bindings: FastHashMap::default(),
+ spatial_node_comparer: SpatialNodeComparer::new(),
+ color_bindings: FastHashMap::default(),
+ old_color_bindings: FastHashMap::default(),
+ dirty_region: DirtyRegion::new(),
+ tile_size: PictureSize::zero(),
+ tile_rect: TileRect::zero(),
+ tile_bounds_p0: TileOffset::zero(),
+ tile_bounds_p1: TileOffset::zero(),
+ local_rect: PictureRect::zero(),
+ local_clip_rect: PictureRect::zero(),
+ surface_index: SurfaceIndex(0),
+ background_color,
+ backdrop: BackdropInfo::empty(),
+ subpixel_mode: SubpixelMode::Allow,
+ root_transform: TransformKey::Local,
+ shared_clips,
+ shared_clip_chain,
+ current_tile_size: DeviceIntSize::zero(),
+ frames_until_size_eval: 0,
+ fract_offset: PictureVector2D::zero(),
+ // Default to centering the virtual offset in the middle of the DC virtual surface
+ virtual_offset: DeviceIntPoint::new(
+ virtual_surface_size / 2,
+ virtual_surface_size / 2,
+ ),
+ compare_cache: FastHashMap::default(),
+ native_surface: None,
+ device_position: DevicePoint::zero(),
+ tile_size_override: None,
+ external_surfaces: Vec::new(),
+ z_id_opaque: ZBufferId::invalid(),
+ external_native_surface_cache: FastHashMap::default(),
+ frame_id: FrameId::INVALID,
+ }
+ }
+
+ /// Returns true if this tile cache is considered opaque.
+ pub fn is_opaque(&self) -> bool {
+ // If known opaque due to background clear color and being the first slice.
+ // The background_color will only be Some(..) if this is the first slice.
+ match self.background_color {
+ Some(color) => color.a >= 1.0,
+ None => false
+ }
+ }
+
+ /// Get the tile coordinates for a given rectangle.
+ fn get_tile_coords_for_rect(
+ &self,
+ rect: &PictureRect,
+ ) -> (TileOffset, TileOffset) {
+ // Get the tile coordinates in the picture space.
+ let mut p0 = TileOffset::new(
+ (rect.origin.x / self.tile_size.width).floor() as i32,
+ (rect.origin.y / self.tile_size.height).floor() as i32,
+ );
+
+ let mut p1 = TileOffset::new(
+ ((rect.origin.x + rect.size.width) / self.tile_size.width).ceil() as i32,
+ ((rect.origin.y + rect.size.height) / self.tile_size.height).ceil() as i32,
+ );
+
+ // Clamp the tile coordinates here to avoid looping over irrelevant tiles later on.
+ p0.x = clamp(p0.x, self.tile_bounds_p0.x, self.tile_bounds_p1.x);
+ p0.y = clamp(p0.y, self.tile_bounds_p0.y, self.tile_bounds_p1.y);
+ p1.x = clamp(p1.x, self.tile_bounds_p0.x, self.tile_bounds_p1.x);
+ p1.y = clamp(p1.y, self.tile_bounds_p0.y, self.tile_bounds_p1.y);
+
+ (p0, p1)
+ }
+
+ /// Update transforms, opacity, color bindings and tile rects.
+ pub fn pre_update(
+ &mut self,
+ pic_rect: PictureRect,
+ surface_index: SurfaceIndex,
+ frame_context: &FrameVisibilityContext,
+ frame_state: &mut FrameVisibilityState,
+ ) -> WorldRect {
+ self.external_surfaces.clear();
+ self.surface_index = surface_index;
+ self.local_rect = pic_rect;
+ self.local_clip_rect = PictureRect::max_rect();
+
+ // Opaque surfaces get the first z_id. Compositor surfaces then get
+ // allocated a z_id each. After all compositor surfaces are added,
+ // then we allocate a z_id for alpha tiles.
+ self.z_id_opaque = frame_state.composite_state.z_generator.next();
+
+ // Reset the opaque rect + subpixel mode, as they are calculated
+ // during the prim dependency checks.
+ self.backdrop = BackdropInfo::empty();
+
+ self.map_local_to_surface = SpaceMapper::new(
+ self.spatial_node_index,
+ pic_rect,
+ );
+ self.map_child_pic_to_surface = SpaceMapper::new(
+ self.spatial_node_index,
+ pic_rect,
+ );
+
+ let pic_to_world_mapper = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ self.spatial_node_index,
+ frame_context.global_screen_world_rect,
+ frame_context.spatial_tree,
+ );
+
+ // If there is a valid set of shared clips, build a clip chain instance for this,
+ // which will provide a local clip rect. This is useful for establishing things
+ // like whether the backdrop rect supplied by Gecko can be considered opaque.
+ if self.shared_clip_chain != ClipChainId::NONE {
+ let mut shared_clips = Vec::new();
+ let mut current_clip_chain_id = self.shared_clip_chain;
+ while current_clip_chain_id != ClipChainId::NONE {
+ shared_clips.push(current_clip_chain_id);
+ let clip_chain_node = &frame_state.clip_store.clip_chain_nodes[current_clip_chain_id.0 as usize];
+ current_clip_chain_id = clip_chain_node.parent_clip_chain_id;
+ }
+
+ frame_state.clip_store.set_active_clips(
+ LayoutRect::max_rect(),
+ self.spatial_node_index,
+ &shared_clips,
+ frame_context.spatial_tree,
+ &mut frame_state.data_stores.clip,
+ );
+
+ let clip_chain_instance = frame_state.clip_store.build_clip_chain_instance(
+ pic_rect.cast_unit(),
+ &self.map_local_to_surface,
+ &pic_to_world_mapper,
+ frame_context.spatial_tree,
+ frame_state.gpu_cache,
+ frame_state.resource_cache,
+ frame_context.global_device_pixel_scale,
+ &frame_context.global_screen_world_rect,
+ &mut frame_state.data_stores.clip,
+ true,
+ false,
+ );
+
+ // Ensure that if the entire picture cache is clipped out, the local
+ // clip rect is zero. This makes sure we don't register any occluders
+ // that are actually off-screen.
+ self.local_clip_rect = clip_chain_instance.map_or(PictureRect::zero(), |clip_chain_instance| {
+ clip_chain_instance.pic_clip_rect
+ });
+ }
+
+ // If there are pending retained state, retrieve it.
+ if let Some(prev_state) = frame_state.retained_tiles.caches.remove(&self.slice) {
+ self.tiles.extend(prev_state.tiles);
+ self.root_transform = prev_state.root_transform;
+ self.spatial_node_comparer = prev_state.spatial_node_comparer;
+ self.opacity_bindings = prev_state.opacity_bindings;
+ self.color_bindings = prev_state.color_bindings;
+ self.current_tile_size = prev_state.current_tile_size;
+ self.native_surface = prev_state.native_surface;
+ self.external_native_surface_cache = prev_state.external_native_surface_cache;
+ self.virtual_offset = prev_state.virtual_offset;
+ self.frame_id = prev_state.frame_id;
+
+ fn recycle_map<K: std::cmp::Eq + std::hash::Hash, V>(
+ ideal_len: usize,
+ dest: &mut FastHashMap<K, V>,
+ src: FastHashMap<K, V>,
+ ) {
+ if dest.capacity() < src.capacity() {
+ if src.capacity() < 3 * ideal_len {
+ *dest = src;
+ } else {
+ dest.clear();
+ dest.reserve(ideal_len);
+ }
+ }
+ }
+ recycle_map(
+ self.opacity_bindings.len(),
+ &mut self.old_opacity_bindings,
+ prev_state.allocations.old_opacity_bindings,
+ );
+ recycle_map(
+ self.color_bindings.len(),
+ &mut self.old_color_bindings,
+ prev_state.allocations.old_color_bindings,
+ );
+ recycle_map(
+ prev_state.allocations.compare_cache.len(),
+ &mut self.compare_cache,
+ prev_state.allocations.compare_cache,
+ );
+ }
+
+ // Advance the current frame ID counter for this picture cache (must be done
+ // after any retained prev state is taken above).
+ self.frame_id.advance();
+
+ // Notify the spatial node comparer that a new frame has started, and the
+ // current reference spatial node for this tile cache.
+ self.spatial_node_comparer.next_frame(self.spatial_node_index);
+
+ // At the start of the frame, step through each current compositor surface
+ // and mark it as unused. Later, this is used to free old compositor surfaces.
+ // TODO(gw): In future, we might make this more sophisticated - for example,
+ // retaining them for >1 frame if unused, or retaining them in some
+ // kind of pool to reduce future allocations.
+ for external_native_surface in self.external_native_surface_cache.values_mut() {
+ external_native_surface.used_this_frame = false;
+ }
+
+ // Only evaluate what tile size to use fairly infrequently, so that we don't end
+ // up constantly invalidating and reallocating tiles if the picture rect size is
+ // changing near a threshold value.
+ if self.frames_until_size_eval == 0 ||
+ self.tile_size_override != frame_context.config.tile_size_override {
+
+ // Work out what size tile is appropriate for this picture cache.
+ let desired_tile_size = match frame_context.config.tile_size_override {
+ Some(tile_size_override) => {
+ tile_size_override
+ }
+ None => {
+ if self.slice_flags.contains(SliceFlags::IS_SCROLLBAR) {
+ if pic_rect.size.width <= pic_rect.size.height {
+ TILE_SIZE_SCROLLBAR_VERTICAL
+ } else {
+ TILE_SIZE_SCROLLBAR_HORIZONTAL
+ }
+ } else {
+ TILE_SIZE_DEFAULT
+ }
+ }
+ };
+
+ // If the desired tile size has changed, then invalidate and drop any
+ // existing tiles.
+ if desired_tile_size != self.current_tile_size {
+ // Destroy any native surfaces on the tiles that will be dropped due
+ // to resizing.
+ if let Some(native_surface) = self.native_surface.take() {
+ frame_state.resource_cache.destroy_compositor_surface(native_surface.opaque);
+ frame_state.resource_cache.destroy_compositor_surface(native_surface.alpha);
+ }
+ self.tiles.clear();
+ self.current_tile_size = desired_tile_size;
+ }
+
+ // Reset counter until next evaluating the desired tile size. This is an
+ // arbitrary value.
+ self.frames_until_size_eval = 120;
+ self.tile_size_override = frame_context.config.tile_size_override;
+ }
+
+ // Map an arbitrary point in picture space to world space, to work out
+ // what the fractional translation is that's applied by this scroll root.
+ // TODO(gw): I'm not 100% sure this is right. At least, in future, we should
+ // make a specific API for this, and/or enforce that the picture
+ // cache transform only includes scale and/or translation (we
+ // already ensure it doesn't have perspective).
+ let world_origin = pic_to_world_mapper
+ .map(&PictureRect::new(PicturePoint::zero(), PictureSize::new(1.0, 1.0)))
+ .expect("bug: unable to map origin to world space")
+ .origin;
+
+ // Get the desired integer device coordinate
+ let device_origin = world_origin * frame_context.global_device_pixel_scale;
+ let desired_device_origin = device_origin.round();
+ self.device_position = desired_device_origin;
+
+ // Unmap from device space to world space rect
+ let ref_world_rect = WorldRect::new(
+ desired_device_origin / frame_context.global_device_pixel_scale,
+ WorldSize::new(1.0, 1.0),
+ );
+
+ // Unmap from world space to picture space
+ let ref_point = pic_to_world_mapper
+ .unmap(&ref_world_rect)
+ .expect("bug: unable to unmap ref world rect")
+ .origin;
+
+ // Extract the fractional offset required in picture space to align in device space
+ self.fract_offset = PictureVector2D::new(
+ ref_point.x.fract(),
+ ref_point.y.fract(),
+ );
+
+ // Do a hacky diff of opacity binding values from the last frame. This is
+ // used later on during tile invalidation tests.
+ let current_properties = frame_context.scene_properties.float_properties();
+ mem::swap(&mut self.opacity_bindings, &mut self.old_opacity_bindings);
+
+ self.opacity_bindings.clear();
+ for (id, value) in current_properties {
+ let changed = match self.old_opacity_bindings.get(id) {
+ Some(old_property) => !old_property.value.approx_eq(value),
+ None => true,
+ };
+ self.opacity_bindings.insert(*id, OpacityBindingInfo {
+ value: *value,
+ changed,
+ });
+ }
+
+ // Do a hacky diff of color binding values from the last frame. This is
+ // used later on during tile invalidation tests.
+ let current_properties = frame_context.scene_properties.color_properties();
+ mem::swap(&mut self.color_bindings, &mut self.old_color_bindings);
+
+ self.color_bindings.clear();
+ for (id, value) in current_properties {
+ let changed = match self.old_color_bindings.get(id) {
+ Some(old_property) => old_property.value != (*value).into(),
+ None => true,
+ };
+ self.color_bindings.insert(*id, ColorBindingInfo {
+ value: (*value).into(),
+ changed,
+ });
+ }
+
+ let world_tile_size = WorldSize::new(
+ self.current_tile_size.width as f32 / frame_context.global_device_pixel_scale.0,
+ self.current_tile_size.height as f32 / frame_context.global_device_pixel_scale.0,
+ );
+
+ // We know that this is an exact rectangle, since we (for now) only support tile
+ // caches where the scroll root is in the root coordinate system.
+ let local_tile_rect = pic_to_world_mapper
+ .unmap(&WorldRect::new(WorldPoint::zero(), world_tile_size))
+ .expect("bug: unable to get local tile rect");
+
+ self.tile_size = local_tile_rect.size;
+
+ let screen_rect_in_pic_space = pic_to_world_mapper
+ .unmap(&frame_context.global_screen_world_rect)
+ .expect("unable to unmap screen rect");
+
+ // Inflate the needed rect a bit, so that we retain tiles that we have drawn
+ // but have just recently gone off-screen. This means that we avoid re-drawing
+ // tiles if the user is scrolling up and down small amounts, at the cost of
+ // a bit of extra texture memory.
+ let desired_rect_in_pic_space = screen_rect_in_pic_space
+ .inflate(0.0, 1.0 * self.tile_size.height);
+
+ let needed_rect_in_pic_space = desired_rect_in_pic_space
+ .intersection(&pic_rect)
+ .unwrap_or_else(PictureRect::zero);
+
+ let p0 = needed_rect_in_pic_space.origin;
+ let p1 = needed_rect_in_pic_space.bottom_right();
+
+ let x0 = (p0.x / local_tile_rect.size.width).floor() as i32;
+ let x1 = (p1.x / local_tile_rect.size.width).ceil() as i32;
+
+ let y0 = (p0.y / local_tile_rect.size.height).floor() as i32;
+ let y1 = (p1.y / local_tile_rect.size.height).ceil() as i32;
+
+ let x_tiles = x1 - x0;
+ let y_tiles = y1 - y0;
+ let new_tile_rect = TileRect::new(
+ TileOffset::new(x0, y0),
+ TileSize::new(x_tiles, y_tiles),
+ );
+
+ // Determine whether the current bounds of the tile grid will exceed the
+ // bounds of the DC virtual surface, taking into account the current
+ // virtual offset. If so, we need to invalidate all tiles, and set up
+ // a new virtual offset, centered around the current tile grid.
+
+ if let CompositorKind::Native { virtual_surface_size, .. } = frame_context.config.compositor_kind {
+ // We only need to invalidate in this case if the underlying platform
+ // uses virtual surfaces.
+ if virtual_surface_size > 0 {
+ // Get the extremities of the tile grid after virtual offset is applied
+ let tx0 = self.virtual_offset.x + x0 * self.current_tile_size.width;
+ let ty0 = self.virtual_offset.y + y0 * self.current_tile_size.height;
+ let tx1 = self.virtual_offset.x + (x1+1) * self.current_tile_size.width;
+ let ty1 = self.virtual_offset.y + (y1+1) * self.current_tile_size.height;
+
+ let need_new_virtual_offset = tx0 < 0 ||
+ ty0 < 0 ||
+ tx1 >= virtual_surface_size ||
+ ty1 >= virtual_surface_size;
+
+ if need_new_virtual_offset {
+ // Calculate a new virtual offset, centered around the middle of the
+ // current tile grid. This means we won't need to invalidate and get
+ // a new offset for a long time!
+ self.virtual_offset = DeviceIntPoint::new(
+ (virtual_surface_size/2) - ((x0 + x1) / 2) * self.current_tile_size.width,
+ (virtual_surface_size/2) - ((y0 + y1) / 2) * self.current_tile_size.height,
+ );
+
+ // Invalidate all native tile surfaces. They will be re-allocated next time
+ // they are scheduled to be rasterized.
+ for tile in self.tiles.values_mut() {
+ if let Some(TileSurface::Texture { descriptor: SurfaceTextureDescriptor::Native { ref mut id, .. }, .. }) = tile.surface {
+ if let Some(id) = id.take() {
+ frame_state.resource_cache.destroy_compositor_tile(id);
+ tile.surface = None;
+ // Invalidate the entire tile to force a redraw.
+ // TODO(gw): Add a new invalidation reason for virtual offset changing
+ tile.invalidate(None, InvalidationReason::CompositorKindChanged);
+ }
+ }
+ }
+
+ // Destroy the native virtual surfaces. They will be re-allocated next time a tile
+ // that references them is scheduled to draw.
+ if let Some(native_surface) = self.native_surface.take() {
+ frame_state.resource_cache.destroy_compositor_surface(native_surface.opaque);
+ frame_state.resource_cache.destroy_compositor_surface(native_surface.alpha);
+ }
+ }
+ }
+ }
+
+ // Rebuild the tile grid if the picture cache rect has changed.
+ if new_tile_rect != self.tile_rect {
+ let mut old_tiles = mem::replace(&mut self.tiles, FastHashMap::default());
+ self.tiles.reserve(new_tile_rect.size.area() as usize);
+
+ for y in y0 .. y1 {
+ for x in x0 .. x1 {
+ let key = TileOffset::new(x, y);
+ let tile = old_tiles
+ .remove(&key)
+ .unwrap_or_else(|| {
+ Box::new(Tile::new(key))
+ });
+ self.tiles.insert(key, tile);
+ }
+ }
+
+ // When old tiles that remain after the loop, dirty rects are not valid.
+ if !old_tiles.is_empty() {
+ frame_state.composite_state.dirty_rects_are_valid = false;
+ }
+
+ // Any old tiles that remain after the loop above are going to be dropped. For
+ // simple composite mode, the texture cache handle will expire and be collected
+ // by the texture cache. For native compositor mode, we need to explicitly
+ // invoke a callback to the client to destroy that surface.
+ frame_state.composite_state.destroy_native_tiles(
+ old_tiles.values_mut(),
+ frame_state.resource_cache,
+ );
+ }
+
+ // This is duplicated information from tile_rect, but cached here to avoid
+ // redundant calculations during get_tile_coords_for_rect
+ self.tile_bounds_p0 = TileOffset::new(x0, y0);
+ self.tile_bounds_p1 = TileOffset::new(x1, y1);
+ self.tile_rect = new_tile_rect;
+
+ let mut world_culling_rect = WorldRect::zero();
+
+ let ctx = TilePreUpdateContext {
+ pic_to_world_mapper,
+ fract_offset: self.fract_offset,
+ background_color: self.background_color,
+ global_screen_world_rect: frame_context.global_screen_world_rect,
+ tile_size: self.tile_size,
+ frame_id: self.frame_id,
+ };
+
+ // Pre-update each tile
+ for tile in self.tiles.values_mut() {
+ tile.pre_update(&ctx);
+
+ // Only include the tiles that are currently in view into the world culling
+ // rect. This is a very important optimization for a couple of reasons:
+ // (1) Primitives that intersect with tiles in the grid that are not currently
+ // visible can be skipped from primitive preparation, clip chain building
+ // and tile dependency updates.
+ // (2) When we need to allocate an off-screen surface for a child picture (for
+ // example a CSS filter) we clip the size of the GPU surface to the world
+ // culling rect below (to ensure we draw enough of it to be sampled by any
+ // tiles that reference it). Making the world culling rect only affected
+ // by visible tiles (rather than the entire virtual tile display port) can
+ // result in allocating _much_ smaller GPU surfaces for cases where the
+ // true off-screen surface size is very large.
+ if tile.is_visible {
+ world_culling_rect = world_culling_rect.union(&tile.world_tile_rect);
+ }
+ }
+
+ // If compositor mode is changed, need to drop all incompatible tiles.
+ match frame_context.config.compositor_kind {
+ CompositorKind::Draw { .. } => {
+ for tile in self.tiles.values_mut() {
+ if let Some(TileSurface::Texture { descriptor: SurfaceTextureDescriptor::Native { ref mut id, .. }, .. }) = tile.surface {
+ if let Some(id) = id.take() {
+ frame_state.resource_cache.destroy_compositor_tile(id);
+ }
+ tile.surface = None;
+ // Invalidate the entire tile to force a redraw.
+ tile.invalidate(None, InvalidationReason::CompositorKindChanged);
+ }
+ }
+
+ if let Some(native_surface) = self.native_surface.take() {
+ frame_state.resource_cache.destroy_compositor_surface(native_surface.opaque);
+ frame_state.resource_cache.destroy_compositor_surface(native_surface.alpha);
+ }
+
+ for (_, external_surface) in self.external_native_surface_cache.drain() {
+ frame_state.resource_cache.destroy_compositor_surface(external_surface.native_surface_id)
+ }
+ }
+ CompositorKind::Native { .. } => {
+ // This could hit even when compositor mode is not changed,
+ // then we need to check if there are incompatible tiles.
+ for tile in self.tiles.values_mut() {
+ if let Some(TileSurface::Texture { descriptor: SurfaceTextureDescriptor::TextureCache { .. }, .. }) = tile.surface {
+ tile.surface = None;
+ // Invalidate the entire tile to force a redraw.
+ tile.invalidate(None, InvalidationReason::CompositorKindChanged);
+ }
+ }
+ }
+ }
+
+ world_culling_rect
+ }
+
+ fn can_promote_to_surface(
+ &mut self,
+ flags: PrimitiveFlags,
+ prim_clip_chain: &ClipChainInstance,
+ prim_spatial_node_index: SpatialNodeIndex,
+ on_picture_surface: bool,
+ frame_context: &FrameVisibilityContext,
+ ) -> SurfacePromotionResult {
+ // Check if this primitive _wants_ to be promoted to a compositor surface.
+ if !flags.contains(PrimitiveFlags::PREFER_COMPOSITOR_SURFACE) {
+ return SurfacePromotionResult::Failed;
+ }
+
+ // For now, only support a small (arbitrary) number of compositor surfaces.
+ if self.external_surfaces.len() == MAX_COMPOSITOR_SURFACES {
+ return SurfacePromotionResult::Failed;
+ }
+
+ // If a complex clip is being applied to this primitive, it can't be
+ // promoted directly to a compositor surface (we might be able to
+ // do this in limited cases in future, some native compositors do
+ // support rounded rect clips, for example)
+ if prim_clip_chain.needs_mask {
+ return SurfacePromotionResult::Failed;
+ }
+
+ // If not on the same surface as the picture cache, it has some kind of
+ // complex effect (such as a filter, mix-blend-mode or 3d transform).
+ if !on_picture_surface {
+ return SurfacePromotionResult::Failed;
+ }
+
+ let mapper : SpaceMapper<PicturePixel, WorldPixel> = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ prim_spatial_node_index,
+ frame_context.global_screen_world_rect,
+ &frame_context.spatial_tree);
+ let transform = mapper.get_transform();
+ if !transform.is_2d_scale_translation() {
+ return SurfacePromotionResult::Failed;
+ }
+ if transform.m11 < 0.0 {
+ return SurfacePromotionResult::Failed;
+ }
+
+ SurfacePromotionResult::Success {
+ flip_y: transform.m22 < 0.0,
+ }
+ }
+
+ fn setup_compositor_surfaces_yuv(
+ &mut self,
+ prim_info: &mut PrimitiveDependencyInfo,
+ prim_rect: PictureRect,
+ frame_context: &FrameVisibilityContext,
+ image_dependencies: &[ImageDependency;3],
+ api_keys: &[ImageKey; 3],
+ resource_cache: &mut ResourceCache,
+ composite_state: &mut CompositeState,
+ image_rendering: ImageRendering,
+ color_depth: ColorDepth,
+ color_space: YuvColorSpace,
+ format: YuvFormat,
+ ) -> bool {
+ self.setup_compositor_surfaces_impl(
+ prim_info,
+ prim_rect,
+ frame_context,
+ ExternalSurfaceDependency::Yuv {
+ image_dependencies: *image_dependencies,
+ color_space,
+ format,
+ rescale: color_depth.rescaling_factor(),
+ },
+ api_keys,
+ resource_cache,
+ composite_state,
+ image_rendering,
+ )
+ }
+
+ fn setup_compositor_surfaces_rgb(
+ &mut self,
+ prim_info: &mut PrimitiveDependencyInfo,
+ prim_rect: PictureRect,
+ frame_context: &FrameVisibilityContext,
+ image_dependency: ImageDependency,
+ api_key: ImageKey,
+ resource_cache: &mut ResourceCache,
+ composite_state: &mut CompositeState,
+ image_rendering: ImageRendering,
+ flip_y: bool,
+ ) -> bool {
+ let mut api_keys = [ImageKey::DUMMY; 3];
+ api_keys[0] = api_key;
+ self.setup_compositor_surfaces_impl(
+ prim_info,
+ prim_rect,
+ frame_context,
+ ExternalSurfaceDependency::Rgb {
+ image_dependency,
+ flip_y,
+ },
+ &api_keys,
+ resource_cache,
+ composite_state,
+ image_rendering,
+ )
+ }
+
+ // returns false if composition is not available for this surface,
+ // and the non-compositor path should be used to draw it instead.
+ fn setup_compositor_surfaces_impl(
+ &mut self,
+ prim_info: &mut PrimitiveDependencyInfo,
+ prim_rect: PictureRect,
+ frame_context: &FrameVisibilityContext,
+ dependency: ExternalSurfaceDependency,
+ api_keys: &[ImageKey; 3],
+ resource_cache: &mut ResourceCache,
+ composite_state: &mut CompositeState,
+ image_rendering: ImageRendering,
+ ) -> bool {
+ prim_info.is_compositor_surface = true;
+
+ let pic_to_world_mapper = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ self.spatial_node_index,
+ frame_context.global_screen_world_rect,
+ frame_context.spatial_tree,
+ );
+
+ let world_rect = pic_to_world_mapper
+ .map(&prim_rect)
+ .expect("bug: unable to map the primitive to world space");
+ let world_clip_rect = pic_to_world_mapper
+ .map(&prim_info.prim_clip_box.to_rect())
+ .expect("bug: unable to map clip to world space");
+
+ let is_visible = world_clip_rect.intersects(&frame_context.global_screen_world_rect);
+ if !is_visible {
+ return true;
+ }
+
+ // TODO(gw): Is there any case where if the primitive ends up on a fractional
+ // boundary we want to _skip_ promoting to a compositor surface and
+ // draw it as part of the content?
+ let device_rect = (world_rect * frame_context.global_device_pixel_scale).round();
+ let clip_rect = (world_clip_rect * frame_context.global_device_pixel_scale).round();
+
+ if device_rect.size.width >= MAX_COMPOSITOR_SURFACES_SIZE ||
+ device_rect.size.height >= MAX_COMPOSITOR_SURFACES_SIZE {
+ return false;
+ }
+
+ // When using native compositing, we need to find an existing native surface
+ // handle to use, or allocate a new one. For existing native surfaces, we can
+ // also determine whether this needs to be updated, depending on whether the
+ // image generation(s) of the planes have changed since last composite.
+ let (native_surface_id, update_params) = match composite_state.compositor_kind {
+ CompositorKind::Draw { .. } => {
+ (None, None)
+ }
+ CompositorKind::Native { .. } => {
+ let native_surface_size = device_rect.size.round().to_i32();
+
+ let key = ExternalNativeSurfaceKey {
+ image_keys: *api_keys,
+ size: native_surface_size,
+ };
+
+ let native_surface = self.external_native_surface_cache
+ .entry(key)
+ .or_insert_with(|| {
+ // No existing surface, so allocate a new compositor surface and
+ // a single compositor tile that covers the entire compositor surface.
+
+ let native_surface_id = resource_cache.create_compositor_surface(
+ DeviceIntPoint::zero(),
+ native_surface_size,
+ true,
+ );
+
+ let tile_id = NativeTileId {
+ surface_id: native_surface_id,
+ x: 0,
+ y: 0,
+ };
+
+ resource_cache.create_compositor_tile(tile_id);
+
+ ExternalNativeSurface {
+ used_this_frame: true,
+ native_surface_id,
+ image_dependencies: [ImageDependency::INVALID; 3],
+ }
+ });
+
+ // Mark that the surface is referenced this frame so that the
+ // backing native surface handle isn't freed.
+ native_surface.used_this_frame = true;
+
+ // If the image dependencies match, there is no need to update
+ // the backing native surface.
+ let update_params = match dependency {
+ ExternalSurfaceDependency::Yuv{ image_dependencies, .. } => {
+ if image_dependencies == native_surface.image_dependencies {
+ None
+ } else {
+ Some(native_surface_size)
+ }
+ },
+ ExternalSurfaceDependency::Rgb{ image_dependency, .. } => {
+ if image_dependency == native_surface.image_dependencies[0] {
+ None
+ } else {
+ Some(native_surface_size)
+ }
+ },
+ };
+
+ (Some(native_surface.native_surface_id), update_params)
+ }
+ };
+
+ // Each compositor surface allocates a unique z-id
+ self.external_surfaces.push(ExternalSurfaceDescriptor {
+ local_rect: prim_info.prim_clip_box.to_rect(),
+ world_rect,
+ local_clip_rect: prim_info.prim_clip_box.to_rect(),
+ dependency,
+ image_rendering,
+ device_rect,
+ clip_rect,
+ z_id: composite_state.z_generator.next(),
+ native_surface_id,
+ update_params,
+ });
+
+ true
+ }
+
+ /// Update the dependencies for each tile for a given primitive instance.
+ pub fn update_prim_dependencies(
+ &mut self,
+ prim_instance: &mut PrimitiveInstance,
+ prim_spatial_node_index: SpatialNodeIndex,
+ prim_clip_chain: Option<&ClipChainInstance>,
+ local_prim_rect: LayoutRect,
+ frame_context: &FrameVisibilityContext,
+ data_stores: &DataStores,
+ clip_store: &ClipStore,
+ pictures: &[PicturePrimitive],
+ resource_cache: &mut ResourceCache,
+ opacity_binding_store: &OpacityBindingStorage,
+ color_bindings: &ColorBindingStorage,
+ image_instances: &ImageInstanceStorage,
+ surface_stack: &[SurfaceIndex],
+ composite_state: &mut CompositeState,
+ ) -> Option<PrimitiveVisibilityFlags> {
+ // This primitive exists on the last element on the current surface stack.
+ profile_scope!("update_prim_dependencies");
+ let prim_surface_index = *surface_stack.last().unwrap();
+
+ // If the primitive is completely clipped out by the clip chain, there
+ // is no need to add it to any primitive dependencies.
+ let prim_clip_chain = match prim_clip_chain {
+ Some(prim_clip_chain) => prim_clip_chain,
+ None => return None,
+ };
+
+ self.map_local_to_surface.set_target_spatial_node(
+ prim_spatial_node_index,
+ frame_context.spatial_tree,
+ );
+
+ // Map the primitive local rect into picture space.
+ let prim_rect = match self.map_local_to_surface.map(&local_prim_rect) {
+ Some(rect) => rect,
+ None => return None,
+ };
+
+ // If the rect is invalid, no need to create dependencies.
+ if prim_rect.size.is_empty() {
+ return None;
+ }
+
+ // If the primitive is directly drawn onto this picture cache surface, then
+ // the pic_clip_rect is in the same space. If not, we need to map it from
+ // the surface space into the picture cache space.
+ let on_picture_surface = prim_surface_index == self.surface_index;
+ let pic_clip_rect = if on_picture_surface {
+ prim_clip_chain.pic_clip_rect
+ } else {
+ // We want to get the rect in the tile cache surface space that this primitive
+ // occupies, in order to enable correct invalidation regions. Each surface
+ // that exists in the chain between this primitive and the tile cache surface
+ // may have an arbitrary inflation factor (for example, in the case of a series
+ // of nested blur elements). To account for this, step through the current
+ // surface stack, mapping the primitive rect into each surface space, including
+ // the inflation factor from each intermediate surface.
+ let mut current_pic_clip_rect = prim_clip_chain.pic_clip_rect;
+ let mut current_spatial_node_index = frame_context
+ .surfaces[prim_surface_index.0]
+ .surface_spatial_node_index;
+
+ for surface_index in surface_stack.iter().rev() {
+ let surface = &frame_context.surfaces[surface_index.0];
+
+ let map_local_to_surface = SpaceMapper::new_with_target(
+ surface.surface_spatial_node_index,
+ current_spatial_node_index,
+ surface.rect,
+ frame_context.spatial_tree,
+ );
+
+ // Map the rect into the parent surface, and inflate if this surface requires
+ // it. If the rect can't be mapping (e.g. due to an invalid transform) then
+ // just bail out from the dependencies and cull this primitive.
+ current_pic_clip_rect = match map_local_to_surface.map(&current_pic_clip_rect) {
+ Some(rect) => {
+ rect.inflate(surface.inflation_factor, surface.inflation_factor)
+ }
+ None => {
+ return None;
+ }
+ };
+
+ current_spatial_node_index = surface.surface_spatial_node_index;
+ }
+
+ current_pic_clip_rect
+ };
+
+ // Get the tile coordinates in the picture space.
+ let (p0, p1) = self.get_tile_coords_for_rect(&pic_clip_rect);
+
+ // If the primitive is outside the tiling rects, it's known to not
+ // be visible.
+ if p0.x == p1.x || p0.y == p1.y {
+ return None;
+ }
+
+ // Build the list of resources that this primitive has dependencies on.
+ let mut prim_info = PrimitiveDependencyInfo::new(
+ prim_instance.uid(),
+ pic_clip_rect.to_box2d(),
+ );
+
+ // Include the prim spatial node, if differs relative to cache root.
+ if prim_spatial_node_index != self.spatial_node_index {
+ prim_info.spatial_nodes.push(prim_spatial_node_index);
+ }
+
+ // If there was a clip chain, add any clip dependencies to the list for this tile.
+ let clip_instances = &clip_store
+ .clip_node_instances[prim_clip_chain.clips_range.to_range()];
+ for clip_instance in clip_instances {
+ prim_info.clips.push(clip_instance.handle.uid());
+
+ // If the clip has the same spatial node, the relative transform
+ // will always be the same, so there's no need to depend on it.
+ if clip_instance.spatial_node_index != self.spatial_node_index
+ && !prim_info.spatial_nodes.contains(&clip_instance.spatial_node_index) {
+ prim_info.spatial_nodes.push(clip_instance.spatial_node_index);
+ }
+ }
+
+ // Certain primitives may select themselves to be a backdrop candidate, which is
+ // then applied below.
+ let mut backdrop_candidate = None;
+
+
+ // For pictures, we don't (yet) know the valid clip rect, so we can't correctly
+ // use it to calculate the local bounding rect for the tiles. If we include them
+ // then we may calculate a bounding rect that is too large, since it won't include
+ // the clip bounds of the picture. Excluding them from the bounding rect here
+ // fixes any correctness issues (the clips themselves are considered when we
+ // consider the bounds of the primitives that are *children* of the picture),
+ // however it does potentially result in some un-necessary invalidations of a
+ // tile (in cases where the picture local rect affects the tile, but the clip
+ // rect eventually means it doesn't affect that tile).
+ // TODO(gw): Get picture clips earlier (during the initial picture traversal
+ // pass) so that we can calculate these correctly.
+ match prim_instance.kind {
+ PrimitiveInstanceKind::Picture { pic_index,.. } => {
+ // Pictures can depend on animated opacity bindings.
+ let pic = &pictures[pic_index.0];
+ if let Some(PictureCompositeMode::Filter(Filter::Opacity(binding, _))) = pic.requested_composite_mode {
+ prim_info.opacity_bindings.push(binding.into());
+ }
+ }
+ PrimitiveInstanceKind::Rectangle { data_handle, opacity_binding_index, color_binding_index, .. } => {
+ if opacity_binding_index == OpacityBindingIndex::INVALID {
+ // Rectangles can only form a backdrop candidate if they are known opaque.
+ // TODO(gw): We could resolve the opacity binding here, but the common
+ // case for background rects is that they don't have animated opacity.
+ let color = match data_stores.prim[data_handle].kind {
+ PrimitiveTemplateKind::Rectangle { color, .. } => {
+ frame_context.scene_properties.resolve_color(&color)
+ }
+ _ => unreachable!(),
+ };
+ if color.a >= 1.0 {
+ backdrop_candidate = Some(BackdropInfo {
+ opaque_rect: pic_clip_rect,
+ kind: Some(BackdropKind::Color { color }),
+ });
+ }
+ } else {
+ let opacity_binding = &opacity_binding_store[opacity_binding_index];
+ for binding in &opacity_binding.bindings {
+ prim_info.opacity_bindings.push(OpacityBinding::from(*binding));
+ }
+ }
+
+ if color_binding_index != ColorBindingIndex::INVALID {
+ prim_info.color_binding = Some(color_bindings[color_binding_index].into());
+ }
+ }
+ PrimitiveInstanceKind::Image { data_handle, image_instance_index, ref mut is_compositor_surface, .. } => {
+ let image_key = &data_stores.image[data_handle];
+ let image_data = &image_key.kind;
+ let image_instance = &image_instances[image_instance_index];
+ let opacity_binding_index = image_instance.opacity_binding_index;
+
+ let mut promote_to_surface = false;
+ let mut promote_with_flip_y = false;
+ // If picture caching is disabled, we can't support any compositor surfaces.
+ if composite_state.picture_caching_is_enabled {
+ match self.can_promote_to_surface(image_key.common.flags,
+ prim_clip_chain,
+ prim_spatial_node_index,
+ on_picture_surface,
+ frame_context) {
+ SurfacePromotionResult::Failed => {
+ }
+ SurfacePromotionResult::Success{flip_y} => {
+ promote_to_surface = true;
+ promote_with_flip_y = flip_y;
+ }
+ }
+ }
+
+ if opacity_binding_index == OpacityBindingIndex::INVALID {
+ if let Some(image_properties) = resource_cache.get_image_properties(image_data.key) {
+ // For an image to be a possible opaque backdrop, it must:
+ // - Have a valid, opaque image descriptor
+ // - Not use tiling (since they can fail to draw)
+ // - Not having any spacing / padding
+ if image_properties.descriptor.is_opaque() &&
+ image_properties.tiling.is_none() &&
+ image_data.tile_spacing == LayoutSize::zero() {
+ backdrop_candidate = Some(BackdropInfo {
+ opaque_rect: pic_clip_rect,
+ kind: None,
+ });
+ }
+ }
+ } else {
+ let opacity_binding = &opacity_binding_store[opacity_binding_index];
+ for binding in &opacity_binding.bindings {
+ prim_info.opacity_bindings.push(OpacityBinding::from(*binding));
+ }
+ }
+
+ if promote_to_surface {
+ promote_to_surface = self.setup_compositor_surfaces_rgb(
+ &mut prim_info,
+ prim_rect,
+ frame_context,
+ ImageDependency {
+ key: image_data.key,
+ generation: resource_cache.get_image_generation(image_data.key),
+ },
+ image_data.key,
+ resource_cache,
+ composite_state,
+ image_data.image_rendering,
+ promote_with_flip_y,
+ );
+ }
+
+ if !promote_to_surface {
+ prim_info.images.push(ImageDependency {
+ key: image_data.key,
+ generation: resource_cache.get_image_generation(image_data.key),
+ });
+ }
+
+ *is_compositor_surface = promote_to_surface;
+ }
+ PrimitiveInstanceKind::YuvImage { data_handle, ref mut is_compositor_surface, .. } => {
+ let prim_data = &data_stores.yuv_image[data_handle];
+ // TODO(gw): For now, we only support promoting YUV primitives to be compositor
+ // surfaces. However, some videos are RGBA images. As a follow up,
+ // extract the logic below and support RGBA compositor surfaces too.
+ let mut promote_to_surface = false;
+
+ // If picture caching is disabled, we can't support any compositor surfaces.
+ if composite_state.picture_caching_is_enabled {
+ promote_to_surface = match self.can_promote_to_surface(
+ prim_data.common.flags,
+ prim_clip_chain,
+ prim_spatial_node_index,
+ on_picture_surface,
+ frame_context) {
+ SurfacePromotionResult::Failed => false,
+ SurfacePromotionResult::Success{flip_y} => !flip_y,
+ };
+
+ // TODO(gw): When we support RGBA images for external surfaces, we also
+ // need to check if opaque (YUV images are implicitly opaque).
+ }
+
+ // If this primitive is being promoted to a surface, construct an external
+ // surface descriptor for use later during batching and compositing. We only
+ // add the image keys for this primitive as a dependency if this is _not_
+ // a promoted surface, since we don't want the tiles to invalidate when the
+ // video content changes, if it's a compositor surface!
+ if promote_to_surface {
+ // Build dependency for each YUV plane, with current image generation for
+ // later detection of when the composited surface has changed.
+ let mut image_dependencies = [ImageDependency::INVALID; 3];
+ for (key, dep) in prim_data.kind.yuv_key.iter().cloned().zip(image_dependencies.iter_mut()) {
+ *dep = ImageDependency {
+ key,
+ generation: resource_cache.get_image_generation(key),
+ }
+ }
+
+ promote_to_surface = self.setup_compositor_surfaces_yuv(
+ &mut prim_info,
+ prim_rect,
+ frame_context,
+ &image_dependencies,
+ &prim_data.kind.yuv_key,
+ resource_cache,
+ composite_state,
+ prim_data.kind.image_rendering,
+ prim_data.kind.color_depth,
+ prim_data.kind.color_space,
+ prim_data.kind.format,
+ );
+ }
+
+ if !promote_to_surface {
+ prim_info.images.extend(
+ prim_data.kind.yuv_key.iter().map(|key| {
+ ImageDependency {
+ key: *key,
+ generation: resource_cache.get_image_generation(*key),
+ }
+ })
+ );
+ }
+
+ // Store on the YUV primitive instance whether this is a promoted surface.
+ // This is used by the batching code to determine whether to draw the
+ // image to the content tiles, or just a transparent z-write.
+ *is_compositor_surface = promote_to_surface;
+
+ }
+ PrimitiveInstanceKind::ImageBorder { data_handle, .. } => {
+ let border_data = &data_stores.image_border[data_handle].kind;
+ prim_info.images.push(ImageDependency {
+ key: border_data.request.key,
+ generation: resource_cache.get_image_generation(border_data.request.key),
+ });
+ }
+ PrimitiveInstanceKind::Clear { .. } => {
+ backdrop_candidate = Some(BackdropInfo {
+ opaque_rect: pic_clip_rect,
+ kind: Some(BackdropKind::Clear),
+ });
+ }
+ PrimitiveInstanceKind::LinearGradient { data_handle, .. } => {
+ let gradient_data = &data_stores.linear_grad[data_handle];
+ if gradient_data.stops_opacity.is_opaque
+ && gradient_data.tile_spacing == LayoutSize::zero()
+ {
+ backdrop_candidate = Some(BackdropInfo {
+ opaque_rect: pic_clip_rect,
+ kind: None,
+ });
+ }
+ }
+ PrimitiveInstanceKind::ConicGradient { data_handle, .. } => {
+ let gradient_data = &data_stores.conic_grad[data_handle];
+ if gradient_data.stops_opacity.is_opaque
+ && gradient_data.tile_spacing == LayoutSize::zero()
+ {
+ backdrop_candidate = Some(BackdropInfo {
+ opaque_rect: pic_clip_rect,
+ kind: None,
+ });
+ }
+ }
+ PrimitiveInstanceKind::RadialGradient { data_handle, .. } => {
+ let gradient_data = &data_stores.radial_grad[data_handle];
+ if gradient_data.stops_opacity.is_opaque
+ && gradient_data.tile_spacing == LayoutSize::zero()
+ {
+ backdrop_candidate = Some(BackdropInfo {
+ opaque_rect: pic_clip_rect,
+ kind: None,
+ });
+ }
+ }
+ PrimitiveInstanceKind::LineDecoration { .. } |
+ PrimitiveInstanceKind::NormalBorder { .. } |
+ PrimitiveInstanceKind::TextRun { .. } |
+ PrimitiveInstanceKind::Backdrop { .. } => {
+ // These don't contribute dependencies
+ }
+ };
+
+ // If this primitive considers itself a backdrop candidate, apply further
+ // checks to see if it matches all conditions to be a backdrop.
+ let mut vis_flags = PrimitiveVisibilityFlags::empty();
+
+ if let Some(backdrop_candidate) = backdrop_candidate {
+ let is_suitable_backdrop = match backdrop_candidate.kind {
+ Some(BackdropKind::Clear) => {
+ // Clear prims are special - they always end up in their own slice,
+ // and always set the backdrop. In future, we hope to completely
+ // remove clear prims, since they don't integrate with the compositing
+ // system cleanly.
+ true
+ }
+ Some(BackdropKind::Color { .. }) | None => {
+ // Check a number of conditions to see if we can consider this
+ // primitive as an opaque backdrop rect. Several of these are conservative
+ // checks and could be relaxed in future. However, these checks
+ // are quick and capture the common cases of background rects and images.
+ // Specifically, we currently require:
+ // - The primitive is on the main picture cache surface.
+ // - Same coord system as picture cache (ensures rects are axis-aligned).
+ // - No clip masks exist.
+ let same_coord_system = {
+ let prim_spatial_node = &frame_context.spatial_tree
+ .spatial_nodes[prim_spatial_node_index.0 as usize];
+ let surface_spatial_node = &frame_context.spatial_tree
+ .spatial_nodes[self.spatial_node_index.0 as usize];
+
+ prim_spatial_node.coordinate_system_id == surface_spatial_node.coordinate_system_id
+ };
+
+ same_coord_system && on_picture_surface
+ }
+ };
+
+ if is_suitable_backdrop
+ && self.external_surfaces.is_empty()
+ && !prim_clip_chain.needs_mask {
+
+ if backdrop_candidate.opaque_rect.contains_rect(&self.backdrop.opaque_rect) {
+ self.backdrop.opaque_rect = backdrop_candidate.opaque_rect;
+ }
+
+ if let Some(kind) = backdrop_candidate.kind {
+ if backdrop_candidate.opaque_rect.contains_rect(&self.local_rect) {
+ // If we have a color backdrop, mark the visibility flags
+ // of the primitive so it is skipped during batching (and
+ // also clears any previous primitives).
+ if let BackdropKind::Color { .. } = kind {
+ vis_flags |= PrimitiveVisibilityFlags::IS_BACKDROP;
+ }
+
+ self.backdrop.kind = Some(kind);
+ }
+ }
+ }
+ }
+
+ // Record any new spatial nodes in the used list.
+ for spatial_node_index in &prim_info.spatial_nodes {
+ self.spatial_node_comparer.register_used_transform(
+ *spatial_node_index,
+ self.frame_id,
+ frame_context.spatial_tree,
+ );
+ }
+
+ // Truncate the lengths of dependency arrays to the max size we can handle.
+ // Any arrays this size or longer will invalidate every frame.
+ prim_info.clips.truncate(MAX_PRIM_SUB_DEPS);
+ prim_info.opacity_bindings.truncate(MAX_PRIM_SUB_DEPS);
+ prim_info.spatial_nodes.truncate(MAX_PRIM_SUB_DEPS);
+ prim_info.images.truncate(MAX_PRIM_SUB_DEPS);
+
+ // Normalize the tile coordinates before adding to tile dependencies.
+ // For each affected tile, mark any of the primitive dependencies.
+ for y in p0.y .. p1.y {
+ for x in p0.x .. p1.x {
+ // TODO(gw): Convert to 2d array temporarily to avoid hash lookups per-tile?
+ let key = TileOffset::new(x, y);
+ let tile = self.tiles.get_mut(&key).expect("bug: no tile");
+
+ tile.add_prim_dependency(&prim_info);
+ }
+ }
+
+ Some(vis_flags)
+ }
+
+ /// Print debug information about this picture cache to a tree printer.
+ fn print(&self) {
+ // TODO(gw): This initial implementation is very basic - just printing
+ // the picture cache state to stdout. In future, we can
+ // make this dump each frame to a file, and produce a report
+ // stating which frames had invalidations. This will allow
+ // diff'ing the invalidation states in a visual tool.
+ let mut pt = PrintTree::new("Picture Cache");
+
+ pt.new_level(format!("Slice {}", self.slice));
+
+ pt.add_item(format!("fract_offset: {:?}", self.fract_offset));
+ pt.add_item(format!("background_color: {:?}", self.background_color));
+
+ for y in self.tile_bounds_p0.y .. self.tile_bounds_p1.y {
+ for x in self.tile_bounds_p0.x .. self.tile_bounds_p1.x {
+ let key = TileOffset::new(x, y);
+ let tile = &self.tiles[&key];
+ tile.print(&mut pt);
+ }
+ }
+
+ pt.end_level();
+ }
+
+ fn calculate_subpixel_mode(&self) -> SubpixelMode {
+ // If the overall tile cache is known opaque, subpixel AA is allowed everywhere
+ if self.is_opaque() {
+ return SubpixelMode::Allow;
+ }
+
+ // If we didn't find any valid opaque backdrop, no subpixel AA allowed
+ if !self.backdrop.opaque_rect.is_well_formed_and_nonempty() {
+ return SubpixelMode::Deny;
+ }
+
+ // If the opaque backdrop rect covers the entire tile cache surface,
+ // we can allow subpixel AA anywhere, skipping the per-text-run tests
+ // later on during primitive preparation.
+ if self.backdrop.opaque_rect.contains_rect(&self.local_rect) {
+ return SubpixelMode::Allow;
+ }
+
+ // If none of the simple cases above match, we need to build a list
+ // of excluded rects (compositor surfaces) and a valid inclusion rect
+ // (known opaque area) where we can support subpixel AA.
+ // TODO(gw): In future, it may make sense to have > 1 inclusion rect,
+ // but this handles the common cases.
+ // TODO(gw): If a text run gets animated such that it's moving in a way that is
+ // sometimes intersecting with the video rect, this can result in subpixel
+ // AA flicking on/off for that text run. It's probably very rare, but
+ // something we should handle in future.
+
+ let excluded_rects = self.external_surfaces
+ .iter()
+ .map(|s| {
+ s.local_rect
+ })
+ .collect();
+
+ SubpixelMode::Conditional {
+ allowed_rect: self.backdrop.opaque_rect,
+ excluded_rects,
+ }
+ }
+
+ /// Apply any updates after prim dependency updates. This applies
+ /// any late tile invalidations, and sets up the dirty rect and
+ /// set of tile blits.
+ pub fn post_update(
+ &mut self,
+ frame_context: &FrameVisibilityContext,
+ frame_state: &mut FrameVisibilityState,
+ ) {
+ self.dirty_region.clear();
+ self.subpixel_mode = self.calculate_subpixel_mode();
+
+ let map_pic_to_world = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ self.spatial_node_index,
+ frame_context.global_screen_world_rect,
+ frame_context.spatial_tree,
+ );
+
+ // Register the opaque region of this tile cache as an occluder, which
+ // is used later in the frame to occlude other tiles.
+ if self.backdrop.opaque_rect.is_well_formed_and_nonempty() {
+ let backdrop_rect = self.backdrop.opaque_rect
+ .intersection(&self.local_rect)
+ .and_then(|r| {
+ r.intersection(&self.local_clip_rect)
+ });
+
+ if let Some(backdrop_rect) = backdrop_rect {
+ let world_backdrop_rect = map_pic_to_world
+ .map(&backdrop_rect)
+ .expect("bug: unable to map backdrop to world space");
+
+ // Since we register the entire backdrop rect, use the opaque z-id for the
+ // picture cache slice.
+ frame_state.composite_state.register_occluder(
+ self.z_id_opaque,
+ world_backdrop_rect,
+ );
+ }
+ }
+
+ // Register any external compositor surfaces as potential occluders. This
+ // is especially useful when viewing video in full-screen mode, as it is
+ // able to occlude every background tile (avoiding allocation, rasterizion
+ // and compositing).
+ for external_surface in &self.external_surfaces {
+ let local_surface_rect = external_surface.local_rect
+ .intersection(&external_surface.local_clip_rect)
+ .and_then(|r| {
+ r.intersection(&self.local_clip_rect)
+ });
+
+ if let Some(local_surface_rect) = local_surface_rect {
+ let world_surface_rect = map_pic_to_world
+ .map(&local_surface_rect)
+ .expect("bug: unable to map external surface to world space");
+
+ frame_state.composite_state.register_occluder(
+ external_surface.z_id,
+ world_surface_rect,
+ );
+ }
+ }
+
+ // A simple GC of the native external surface cache, to remove and free any
+ // surfaces that were not referenced during the update_prim_dependencies pass.
+ self.external_native_surface_cache.retain(|_, surface| {
+ if !surface.used_this_frame {
+ frame_state.resource_cache.destroy_compositor_surface(surface.native_surface_id);
+ }
+
+ surface.used_this_frame
+ });
+
+ // Detect if the picture cache was scrolled or scaled. In this case,
+ // the device space dirty rects aren't applicable (until we properly
+ // integrate with OS compositors that can handle scrolling slices).
+ let root_transform = frame_context
+ .spatial_tree
+ .get_relative_transform(
+ self.spatial_node_index,
+ ROOT_SPATIAL_NODE_INDEX,
+ )
+ .into();
+ let root_transform_changed = root_transform != self.root_transform;
+ if root_transform_changed {
+ self.root_transform = root_transform;
+ frame_state.composite_state.dirty_rects_are_valid = false;
+ }
+
+ let pic_to_world_mapper = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ self.spatial_node_index,
+ frame_context.global_screen_world_rect,
+ frame_context.spatial_tree,
+ );
+
+ // All compositor surfaces have allocated a z_id, so reserve a z_id for alpha tiles.
+ let z_id_alpha = frame_state.composite_state.z_generator.next();
+
+ let ctx = TilePostUpdateContext {
+ pic_to_world_mapper,
+ global_device_pixel_scale: frame_context.global_device_pixel_scale,
+ local_clip_rect: self.local_clip_rect,
+ backdrop: self.backdrop,
+ opacity_bindings: &self.opacity_bindings,
+ color_bindings: &self.color_bindings,
+ current_tile_size: self.current_tile_size,
+ local_rect: self.local_rect,
+ external_surfaces: &self.external_surfaces,
+ z_id_opaque: self.z_id_opaque,
+ z_id_alpha,
+ };
+
+ let mut state = TilePostUpdateState {
+ resource_cache: frame_state.resource_cache,
+ composite_state: frame_state.composite_state,
+ compare_cache: &mut self.compare_cache,
+ spatial_node_comparer: &mut self.spatial_node_comparer,
+ };
+
+ // Step through each tile and invalidate if the dependencies have changed. Determine
+ // the current opacity setting and whether it's changed.
+ for tile in self.tiles.values_mut() {
+ tile.post_update(&ctx, &mut state, frame_context);
+ }
+
+ // When under test, record a copy of the dirty region to support
+ // invalidation testing in wrench.
+ if frame_context.config.testing {
+ frame_state.scratch.recorded_dirty_regions.push(self.dirty_region.record());
+ }
+ }
+}
+
+/// Maintains a stack of picture and surface information, that
+/// is used during the initial picture traversal.
+pub struct PictureUpdateState<'a> {
+ surfaces: &'a mut Vec<SurfaceInfo>,
+ surface_stack: Vec<SurfaceIndex>,
+ picture_stack: Vec<PictureInfo>,
+ are_raster_roots_assigned: bool,
+ composite_state: &'a CompositeState,
+}
+
+impl<'a> PictureUpdateState<'a> {
+ pub fn update_all(
+ surfaces: &'a mut Vec<SurfaceInfo>,
+ pic_index: PictureIndex,
+ picture_primitives: &mut [PicturePrimitive],
+ frame_context: &FrameBuildingContext,
+ gpu_cache: &mut GpuCache,
+ clip_store: &ClipStore,
+ data_stores: &mut DataStores,
+ composite_state: &CompositeState,
+ ) {
+ profile_scope!("UpdatePictures");
+ profile_marker!("UpdatePictures");
+
+ let mut state = PictureUpdateState {
+ surfaces,
+ surface_stack: vec![SurfaceIndex(0)],
+ picture_stack: Vec::new(),
+ are_raster_roots_assigned: true,
+ composite_state,
+ };
+
+ state.update(
+ pic_index,
+ picture_primitives,
+ frame_context,
+ gpu_cache,
+ clip_store,
+ data_stores,
+ );
+
+ if !state.are_raster_roots_assigned {
+ state.assign_raster_roots(
+ pic_index,
+ picture_primitives,
+ ROOT_SPATIAL_NODE_INDEX,
+ );
+ }
+ }
+
+ /// Return the current surface
+ fn current_surface(&self) -> &SurfaceInfo {
+ &self.surfaces[self.surface_stack.last().unwrap().0]
+ }
+
+ /// Return the current surface (mutable)
+ fn current_surface_mut(&mut self) -> &mut SurfaceInfo {
+ &mut self.surfaces[self.surface_stack.last().unwrap().0]
+ }
+
+ /// Push a new surface onto the update stack.
+ fn push_surface(
+ &mut self,
+ surface: SurfaceInfo,
+ ) -> SurfaceIndex {
+ let surface_index = SurfaceIndex(self.surfaces.len());
+ self.surfaces.push(surface);
+ self.surface_stack.push(surface_index);
+ surface_index
+ }
+
+ /// Pop a surface on the way up the picture traversal
+ fn pop_surface(&mut self) -> SurfaceIndex{
+ self.surface_stack.pop().unwrap()
+ }
+
+ /// Push information about a picture on the update stack
+ fn push_picture(
+ &mut self,
+ info: PictureInfo,
+ ) {
+ self.picture_stack.push(info);
+ }
+
+ /// Pop the picture info off, on the way up the picture traversal
+ fn pop_picture(
+ &mut self,
+ ) -> PictureInfo {
+ self.picture_stack.pop().unwrap()
+ }
+
+ /// Update a picture, determining surface configuration,
+ /// rasterization roots, and (in future) whether there
+ /// are cached surfaces that can be used by this picture.
+ fn update(
+ &mut self,
+ pic_index: PictureIndex,
+ picture_primitives: &mut [PicturePrimitive],
+ frame_context: &FrameBuildingContext,
+ gpu_cache: &mut GpuCache,
+ clip_store: &ClipStore,
+ data_stores: &mut DataStores,
+ ) {
+ if let Some(prim_list) = picture_primitives[pic_index.0].pre_update(
+ self,
+ frame_context,
+ ) {
+ for cluster in &prim_list.clusters {
+ if cluster.flags.contains(ClusterFlags::IS_PICTURE) {
+ for prim_instance in &cluster.prim_instances {
+ let child_pic_index = match prim_instance.kind {
+ PrimitiveInstanceKind::Picture { pic_index, .. } => pic_index,
+ _ => unreachable!(),
+ };
+
+ self.update(
+ child_pic_index,
+ picture_primitives,
+ frame_context,
+ gpu_cache,
+ clip_store,
+ data_stores,
+ );
+ }
+ }
+ }
+
+ picture_primitives[pic_index.0].post_update(
+ prim_list,
+ self,
+ frame_context,
+ data_stores,
+ );
+ }
+ }
+
+ /// Process the picture tree again in a depth-first order,
+ /// and adjust the raster roots of the pictures that want to establish
+ /// their own roots but are not able to due to the size constraints.
+ fn assign_raster_roots(
+ &mut self,
+ pic_index: PictureIndex,
+ picture_primitives: &[PicturePrimitive],
+ fallback_raster_spatial_node: SpatialNodeIndex,
+ ) {
+ let picture = &picture_primitives[pic_index.0];
+ if !picture.is_visible() {
+ return
+ }
+
+ let new_fallback = match picture.raster_config {
+ Some(ref config) => {
+ let surface = &mut self.surfaces[config.surface_index.0];
+ if !config.establishes_raster_root {
+ surface.raster_spatial_node_index = fallback_raster_spatial_node;
+ }
+ surface.raster_spatial_node_index
+ }
+ None => fallback_raster_spatial_node,
+ };
+
+ for cluster in &picture.prim_list.clusters {
+ if cluster.flags.contains(ClusterFlags::IS_PICTURE) {
+ for instance in &cluster.prim_instances {
+ let child_pic_index = match instance.kind {
+ PrimitiveInstanceKind::Picture { pic_index, .. } => pic_index,
+ _ => unreachable!(),
+ };
+ self.assign_raster_roots(
+ child_pic_index,
+ picture_primitives,
+ new_fallback,
+ );
+ }
+ }
+ }
+ }
+}
+
+#[derive(Debug, Copy, Clone, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct SurfaceIndex(pub usize);
+
+pub const ROOT_SURFACE_INDEX: SurfaceIndex = SurfaceIndex(0);
+
+#[derive(Debug, Copy, Clone)]
+pub struct SurfaceRenderTasks {
+ /// The root of the render task chain for this surface. This
+ /// is attached to parent tasks, and also the surface that
+ /// gets added during batching.
+ pub root: RenderTaskId,
+ /// The port of the render task change for this surface. This
+ /// is where child tasks for this surface get attached to.
+ pub port: RenderTaskId,
+}
+
+/// Information about an offscreen surface. For now,
+/// it contains information about the size and coordinate
+/// system of the surface. In the future, it will contain
+/// information about the contents of the surface, which
+/// will allow surfaces to be cached / retained between
+/// frames and display lists.
+#[derive(Debug)]
+pub struct SurfaceInfo {
+ /// A local rect defining the size of this surface, in the
+ /// coordinate system of the surface itself.
+ pub rect: PictureRect,
+ /// Helper structs for mapping local rects in different
+ /// coordinate systems into the surface coordinates.
+ pub map_local_to_surface: SpaceMapper<LayoutPixel, PicturePixel>,
+ /// Defines the positioning node for the surface itself,
+ /// and the rasterization root for this surface.
+ pub raster_spatial_node_index: SpatialNodeIndex,
+ pub surface_spatial_node_index: SpatialNodeIndex,
+ /// This is set when the render task is created.
+ pub render_tasks: Option<SurfaceRenderTasks>,
+ /// How much the local surface rect should be inflated (for blur radii).
+ pub inflation_factor: f32,
+ /// The device pixel ratio specific to this surface.
+ pub device_pixel_scale: DevicePixelScale,
+ /// The scale factors of the surface to raster transform.
+ pub scale_factors: (f32, f32),
+}
+
+impl SurfaceInfo {
+ pub fn new(
+ surface_spatial_node_index: SpatialNodeIndex,
+ raster_spatial_node_index: SpatialNodeIndex,
+ inflation_factor: f32,
+ world_rect: WorldRect,
+ spatial_tree: &SpatialTree,
+ device_pixel_scale: DevicePixelScale,
+ scale_factors: (f32, f32),
+ ) -> Self {
+ let map_surface_to_world = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ surface_spatial_node_index,
+ world_rect,
+ spatial_tree,
+ );
+
+ let pic_bounds = map_surface_to_world
+ .unmap(&map_surface_to_world.bounds)
+ .unwrap_or_else(PictureRect::max_rect);
+
+ let map_local_to_surface = SpaceMapper::new(
+ surface_spatial_node_index,
+ pic_bounds,
+ );
+
+ SurfaceInfo {
+ rect: PictureRect::zero(),
+ map_local_to_surface,
+ render_tasks: None,
+ raster_spatial_node_index,
+ surface_spatial_node_index,
+ inflation_factor,
+ device_pixel_scale,
+ scale_factors,
+ }
+ }
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct RasterConfig {
+ /// How this picture should be composited into
+ /// the parent surface.
+ pub composite_mode: PictureCompositeMode,
+ /// Index to the surface descriptor for this
+ /// picture.
+ pub surface_index: SurfaceIndex,
+ /// Whether this picture establishes a rasterization root.
+ pub establishes_raster_root: bool,
+ /// Scaling factor applied to fit within MAX_SURFACE_SIZE when
+ /// establishing a raster root.
+ /// Most code doesn't need to know about it, since it is folded
+ /// into device_pixel_scale when the rendertask is set up.
+ /// However e.g. text rasterization uses it to ensure consistent
+ /// on-screen font size.
+ pub root_scaling_factor: f32,
+}
+
+bitflags! {
+ /// A set of flags describing why a picture may need a backing surface.
+ #[cfg_attr(feature = "capture", derive(Serialize))]
+ pub struct BlitReason: u32 {
+ /// Mix-blend-mode on a child that requires isolation.
+ const ISOLATE = 1;
+ /// Clip node that _might_ require a surface.
+ const CLIP = 2;
+ /// Preserve-3D requires a surface for plane-splitting.
+ const PRESERVE3D = 4;
+ /// A backdrop that is reused which requires a surface.
+ const BACKDROP = 8;
+ }
+}
+
+/// Specifies how this Picture should be composited
+/// onto the target it belongs to.
+#[allow(dead_code)]
+#[derive(Debug, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub enum PictureCompositeMode {
+ /// Apply CSS mix-blend-mode effect.
+ MixBlend(MixBlendMode),
+ /// Apply a CSS filter (except component transfer).
+ Filter(Filter),
+ /// Apply a component transfer filter.
+ ComponentTransferFilter(FilterDataHandle),
+ /// Draw to intermediate surface, copy straight across. This
+ /// is used for CSS isolation, and plane splitting.
+ Blit(BlitReason),
+ /// Used to cache a picture as a series of tiles.
+ TileCache {
+ },
+ /// Apply an SVG filter
+ SvgFilter(Vec<FilterPrimitive>, Vec<SFilterData>),
+}
+
+impl PictureCompositeMode {
+ pub fn inflate_picture_rect(&self, picture_rect: PictureRect, scale_factors: (f32, f32)) -> PictureRect {
+ let mut result_rect = picture_rect;
+ match self {
+ PictureCompositeMode::Filter(filter) => match filter {
+ Filter::Blur(blur_radius) => {
+ let inflation_factor = clamp_blur_radius(*blur_radius, scale_factors).ceil() * BLUR_SAMPLE_SCALE;
+ result_rect = picture_rect.inflate(inflation_factor, inflation_factor);
+ },
+ Filter::DropShadows(shadows) => {
+ let mut max_inflation: f32 = 0.0;
+ for shadow in shadows {
+ max_inflation = max_inflation.max(shadow.blur_radius);
+ }
+ max_inflation = clamp_blur_radius(max_inflation, scale_factors).ceil() * BLUR_SAMPLE_SCALE;
+ result_rect = picture_rect.inflate(max_inflation, max_inflation);
+ },
+ _ => {}
+ }
+ PictureCompositeMode::SvgFilter(primitives, _) => {
+ let mut output_rects = Vec::with_capacity(primitives.len());
+ for (cur_index, primitive) in primitives.iter().enumerate() {
+ let output_rect = match primitive.kind {
+ FilterPrimitiveKind::Blur(ref primitive) => {
+ let input = primitive.input.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect);
+ let inflation_factor = primitive.radius.round() * BLUR_SAMPLE_SCALE;
+ input.inflate(inflation_factor, inflation_factor)
+ }
+ FilterPrimitiveKind::DropShadow(ref primitive) => {
+ let inflation_factor = primitive.shadow.blur_radius.ceil() * BLUR_SAMPLE_SCALE;
+ let input = primitive.input.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect);
+ let shadow_rect = input.inflate(inflation_factor, inflation_factor);
+ input.union(&shadow_rect.translate(primitive.shadow.offset * Scale::new(1.0)))
+ }
+ FilterPrimitiveKind::Blend(ref primitive) => {
+ primitive.input1.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect)
+ .union(&primitive.input2.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect))
+ }
+ FilterPrimitiveKind::Composite(ref primitive) => {
+ primitive.input1.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect)
+ .union(&primitive.input2.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect))
+ }
+ FilterPrimitiveKind::Identity(ref primitive) =>
+ primitive.input.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect),
+ FilterPrimitiveKind::Opacity(ref primitive) =>
+ primitive.input.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect),
+ FilterPrimitiveKind::ColorMatrix(ref primitive) =>
+ primitive.input.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect),
+ FilterPrimitiveKind::ComponentTransfer(ref primitive) =>
+ primitive.input.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect),
+ FilterPrimitiveKind::Offset(ref primitive) => {
+ let input_rect = primitive.input.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect);
+ input_rect.translate(primitive.offset * Scale::new(1.0))
+ },
+
+ FilterPrimitiveKind::Flood(..) => picture_rect,
+ };
+ output_rects.push(output_rect);
+ result_rect = result_rect.union(&output_rect);
+ }
+ }
+ _ => {},
+ }
+ result_rect
+ }
+}
+
+/// Enum value describing the place of a picture in a 3D context.
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub enum Picture3DContext<C> {
+ /// The picture is not a part of 3D context sub-hierarchy.
+ Out,
+ /// The picture is a part of 3D context.
+ In {
+ /// Additional data per child for the case of this a root of 3D hierarchy.
+ root_data: Option<Vec<C>>,
+ /// The spatial node index of an "ancestor" element, i.e. one
+ /// that establishes the transformed element's containing block.
+ ///
+ /// See CSS spec draft for more details:
+ /// https://drafts.csswg.org/css-transforms-2/#accumulated-3d-transformation-matrix-computation
+ ancestor_index: SpatialNodeIndex,
+ },
+}
+
+/// Information about a preserve-3D hierarchy child that has been plane-split
+/// and ordered according to the view direction.
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct OrderedPictureChild {
+ pub anchor: PlaneSplitAnchor,
+ pub spatial_node_index: SpatialNodeIndex,
+ pub gpu_address: GpuCacheAddress,
+}
+
+bitflags! {
+ /// A set of flags describing why a picture may need a backing surface.
+ #[cfg_attr(feature = "capture", derive(Serialize))]
+ pub struct ClusterFlags: u32 {
+ /// This cluster is a picture
+ const IS_PICTURE = 1;
+ /// Whether this cluster is visible when the position node is a backface.
+ const IS_BACKFACE_VISIBLE = 2;
+ /// This flag is set during the first pass picture traversal, depending on whether
+ /// the cluster is visible or not. It's read during the second pass when primitives
+ /// consult their owning clusters to see if the primitive itself is visible.
+ const IS_VISIBLE = 4;
+ /// Is a backdrop-filter cluster that requires special handling during post_update.
+ const IS_BACKDROP_FILTER = 8;
+ /// Force creation of a picture caching slice before this cluster.
+ const CREATE_PICTURE_CACHE_PRE = 16;
+ /// Force creation of a picture caching slice after this cluster.
+ const CREATE_PICTURE_CACHE_POST = 32;
+ /// If set, this cluster represents a scroll bar container.
+ const SCROLLBAR_CONTAINER = 64;
+ /// If set, this cluster contains clear rectangle primitives.
+ const IS_CLEAR_PRIMITIVE = 128;
+ /// This is used as a performance hint - this primitive may be promoted to a native
+ /// compositor surface under certain (implementation specific) conditions. This
+ /// is typically used for large videos, and canvas elements.
+ const PREFER_COMPOSITOR_SURFACE = 256;
+ }
+}
+
+/// Descriptor for a cluster of primitives. For now, this is quite basic but will be
+/// extended to handle more spatial clustering of primitives.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct PrimitiveCluster {
+ /// The positioning node for this cluster.
+ pub spatial_node_index: SpatialNodeIndex,
+ /// The bounding rect of the cluster, in the local space of the spatial node.
+ /// This is used to quickly determine the overall bounding rect for a picture
+ /// during the first picture traversal, which is needed for local scale
+ /// determination, and render task size calculations.
+ bounding_rect: LayoutRect,
+ /// The list of primitive instances in this cluster.
+ pub prim_instances: Vec<PrimitiveInstance>,
+ /// Various flags / state for this cluster.
+ pub flags: ClusterFlags,
+ /// An optional scroll root to use if this cluster establishes a picture cache slice.
+ pub cache_scroll_root: Option<SpatialNodeIndex>,
+}
+
+/// Where to insert a prim instance in a primitive list.
+#[derive(Debug, Copy, Clone)]
+enum PrimitiveListPosition {
+ Begin,
+ End,
+}
+
+impl PrimitiveCluster {
+ /// Construct a new primitive cluster for a given positioning node.
+ fn new(
+ spatial_node_index: SpatialNodeIndex,
+ flags: ClusterFlags,
+ ) -> Self {
+ PrimitiveCluster {
+ bounding_rect: LayoutRect::zero(),
+ spatial_node_index,
+ flags,
+ prim_instances: Vec::new(),
+ cache_scroll_root: None,
+ }
+ }
+
+ /// Return true if this cluster is compatible with the given params
+ pub fn is_compatible(
+ &self,
+ spatial_node_index: SpatialNodeIndex,
+ flags: ClusterFlags,
+ ) -> bool {
+ // If this cluster is a scrollbar, ensure that a matching scrollbar
+ // container that follows is split up, so we don't combine the
+ // scrollbars into a single slice.
+ if self.flags.contains(ClusterFlags::SCROLLBAR_CONTAINER) {
+ return false;
+ }
+
+ self.flags == flags && self.spatial_node_index == spatial_node_index
+ }
+
+ /// Add a primitive instance to this cluster, at the start or end
+ fn push(
+ &mut self,
+ prim_instance: PrimitiveInstance,
+ prim_rect: LayoutRect,
+ ) {
+ let culling_rect = prim_instance.local_clip_rect
+ .intersection(&prim_rect)
+ .unwrap_or_else(LayoutRect::zero);
+
+ self.bounding_rect = self.bounding_rect.union(&culling_rect);
+ self.prim_instances.push(prim_instance);
+ }
+}
+
+/// A list of primitive instances that are added to a picture
+/// This ensures we can keep a list of primitives that
+/// are pictures, for a fast initial traversal of the picture
+/// tree without walking the instance list.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct PrimitiveList {
+ /// List of primitives grouped into clusters.
+ pub clusters: Vec<PrimitiveCluster>,
+}
+
+impl PrimitiveList {
+ /// Construct an empty primitive list. This is
+ /// just used during the take_context / restore_context
+ /// borrow check dance, which will be removed as the
+ /// picture traversal pass is completed.
+ pub fn empty() -> Self {
+ PrimitiveList {
+ clusters: Vec::new(),
+ }
+ }
+
+ /// Add a primitive instance to this list, at the start or end
+ fn push(
+ &mut self,
+ prim_instance: PrimitiveInstance,
+ prim_rect: LayoutRect,
+ spatial_node_index: SpatialNodeIndex,
+ prim_flags: PrimitiveFlags,
+ insert_position: PrimitiveListPosition,
+ ) {
+ let mut flags = ClusterFlags::empty();
+
+ // Pictures are always put into a new cluster, to make it faster to
+ // iterate all pictures in a given primitive list.
+ match prim_instance.kind {
+ PrimitiveInstanceKind::Picture { .. } => {
+ flags.insert(ClusterFlags::IS_PICTURE);
+ }
+ PrimitiveInstanceKind::Backdrop { .. } => {
+ flags.insert(ClusterFlags::IS_BACKDROP_FILTER);
+ }
+ PrimitiveInstanceKind::Clear { .. } => {
+ flags.insert(ClusterFlags::IS_CLEAR_PRIMITIVE);
+ }
+ _ => {}
+ }
+
+ if prim_flags.contains(PrimitiveFlags::IS_BACKFACE_VISIBLE) {
+ flags.insert(ClusterFlags::IS_BACKFACE_VISIBLE);
+ }
+
+ if prim_flags.contains(PrimitiveFlags::IS_SCROLLBAR_CONTAINER) {
+ flags.insert(ClusterFlags::SCROLLBAR_CONTAINER);
+ }
+
+ if prim_flags.contains(PrimitiveFlags::PREFER_COMPOSITOR_SURFACE) {
+ flags.insert(ClusterFlags::PREFER_COMPOSITOR_SURFACE);
+ }
+
+ // Insert the primitive into the first or last cluster as required
+ match insert_position {
+ PrimitiveListPosition::Begin => {
+ let mut cluster = PrimitiveCluster::new(
+ spatial_node_index,
+ flags,
+ );
+ cluster.push(prim_instance, prim_rect);
+ self.clusters.insert(0, cluster);
+ }
+ PrimitiveListPosition::End => {
+ if let Some(cluster) = self.clusters.last_mut() {
+ if cluster.is_compatible(spatial_node_index, flags) {
+ cluster.push(prim_instance, prim_rect);
+ return;
+ }
+ }
+
+ let mut cluster = PrimitiveCluster::new(
+ spatial_node_index,
+ flags,
+ );
+ cluster.push(prim_instance, prim_rect);
+ self.clusters.push(cluster);
+ }
+ }
+ }
+
+ /// Add a primitive instance to the start of the list
+ pub fn add_prim_to_start(
+ &mut self,
+ prim_instance: PrimitiveInstance,
+ prim_rect: LayoutRect,
+ spatial_node_index: SpatialNodeIndex,
+ flags: PrimitiveFlags,
+ ) {
+ self.push(
+ prim_instance,
+ prim_rect,
+ spatial_node_index,
+ flags,
+ PrimitiveListPosition::Begin,
+ )
+ }
+
+ /// Add a primitive instance to the end of the list
+ pub fn add_prim(
+ &mut self,
+ prim_instance: PrimitiveInstance,
+ prim_rect: LayoutRect,
+ spatial_node_index: SpatialNodeIndex,
+ flags: PrimitiveFlags,
+ ) {
+ self.push(
+ prim_instance,
+ prim_rect,
+ spatial_node_index,
+ flags,
+ PrimitiveListPosition::End,
+ )
+ }
+
+ /// Returns true if there are no clusters (and thus primitives)
+ pub fn is_empty(&self) -> bool {
+ self.clusters.is_empty()
+ }
+
+ /// Add an existing cluster to this prim list
+ pub fn add_cluster(&mut self, cluster: PrimitiveCluster) {
+ self.clusters.push(cluster);
+ }
+
+ /// Merge another primitive list into this one
+ pub fn extend(&mut self, prim_list: PrimitiveList) {
+ self.clusters.extend(prim_list.clusters);
+ }
+}
+
+/// Defines configuration options for a given picture primitive.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct PictureOptions {
+ /// If true, WR should inflate the bounding rect of primitives when
+ /// using a filter effect that requires inflation.
+ pub inflate_if_required: bool,
+}
+
+impl Default for PictureOptions {
+ fn default() -> Self {
+ PictureOptions {
+ inflate_if_required: true,
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct PicturePrimitive {
+ /// List of primitives, and associated info for this picture.
+ pub prim_list: PrimitiveList,
+
+ #[cfg_attr(feature = "capture", serde(skip))]
+ pub state: Option<PictureState>,
+
+ /// If true, apply the local clip rect to primitive drawn
+ /// in this picture.
+ pub apply_local_clip_rect: bool,
+ /// If false and transform ends up showing the back of the picture,
+ /// it will be considered invisible.
+ pub is_backface_visible: bool,
+
+ // If a mix-blend-mode, contains the render task for
+ // the readback of the framebuffer that we use to sample
+ // from in the mix-blend-mode shader.
+ // For drop-shadow filter, this will store the original
+ // picture task which would be rendered on screen after
+ // blur pass.
+ pub secondary_render_task_id: Option<RenderTaskId>,
+ /// How this picture should be composited.
+ /// If None, don't composite - just draw directly on parent surface.
+ pub requested_composite_mode: Option<PictureCompositeMode>,
+ /// Requested rasterization space for this picture. It is
+ /// a performance hint only.
+ pub requested_raster_space: RasterSpace,
+
+ pub raster_config: Option<RasterConfig>,
+ pub context_3d: Picture3DContext<OrderedPictureChild>,
+
+ // If requested as a frame output (for rendering
+ // pages to a texture), this is the pipeline this
+ // picture is the root of.
+ pub frame_output_pipeline_id: Option<PipelineId>,
+ // Optional cache handles for storing extra data
+ // in the GPU cache, depending on the type of
+ // picture.
+ pub extra_gpu_data_handles: SmallVec<[GpuCacheHandle; 1]>,
+
+ /// The spatial node index of this picture when it is
+ /// composited into the parent picture.
+ pub spatial_node_index: SpatialNodeIndex,
+
+ /// The conservative local rect of this picture. It is
+ /// built dynamically during the first picture traversal.
+ /// It is composed of already snapped primitives.
+ pub estimated_local_rect: LayoutRect,
+
+ /// The local rect of this picture. It is built
+ /// dynamically during the frame visibility update. It
+ /// differs from the estimated_local_rect because it
+ /// will not contain culled primitives, takes into
+ /// account surface inflation and the whole clip chain.
+ /// It is frequently the same, but may be quite
+ /// different depending on how much was culled.
+ pub precise_local_rect: LayoutRect,
+
+ /// If false, this picture needs to (re)build segments
+ /// if it supports segment rendering. This can occur
+ /// if the local rect of the picture changes due to
+ /// transform animation and/or scrolling.
+ pub segments_are_valid: bool,
+
+ /// If Some(..) the tile cache that is associated with this picture.
+ #[cfg_attr(feature = "capture", serde(skip))] //TODO
+ pub tile_cache: Option<Box<TileCacheInstance>>,
+
+ /// The config options for this picture.
+ pub options: PictureOptions,
+
+ /// Keep track of the number of render tasks dependencies to pre-allocate
+ /// the dependency array next frame.
+ num_render_tasks: usize,
+}
+
+impl PicturePrimitive {
+ pub fn print<T: PrintTreePrinter>(
+ &self,
+ pictures: &[Self],
+ self_index: PictureIndex,
+ pt: &mut T,
+ ) {
+ pt.new_level(format!("{:?}", self_index));
+ pt.add_item(format!("cluster_count: {:?}", self.prim_list.clusters.len()));
+ pt.add_item(format!("estimated_local_rect: {:?}", self.estimated_local_rect));
+ pt.add_item(format!("precise_local_rect: {:?}", self.precise_local_rect));
+ pt.add_item(format!("spatial_node_index: {:?}", self.spatial_node_index));
+ pt.add_item(format!("raster_config: {:?}", self.raster_config));
+ pt.add_item(format!("requested_composite_mode: {:?}", self.requested_composite_mode));
+
+ for cluster in &self.prim_list.clusters {
+ if cluster.flags.contains(ClusterFlags::IS_PICTURE) {
+ for instance in &cluster.prim_instances {
+ let index = match instance.kind {
+ PrimitiveInstanceKind::Picture { pic_index, .. } => pic_index,
+ _ => unreachable!(),
+ };
+ pictures[index.0].print(pictures, index, pt);
+ }
+ }
+ }
+
+ pt.end_level();
+ }
+
+ /// Returns true if this picture supports segmented rendering.
+ pub fn can_use_segments(&self) -> bool {
+ match self.raster_config {
+ // TODO(gw): Support brush segment rendering for filter and mix-blend
+ // shaders. It's possible this already works, but I'm just
+ // applying this optimization to Blit mode for now.
+ Some(RasterConfig { composite_mode: PictureCompositeMode::MixBlend(..), .. }) |
+ Some(RasterConfig { composite_mode: PictureCompositeMode::Filter(..), .. }) |
+ Some(RasterConfig { composite_mode: PictureCompositeMode::ComponentTransferFilter(..), .. }) |
+ Some(RasterConfig { composite_mode: PictureCompositeMode::TileCache { .. }, .. }) |
+ Some(RasterConfig { composite_mode: PictureCompositeMode::SvgFilter(..), .. }) |
+ None => {
+ false
+ }
+ Some(RasterConfig { composite_mode: PictureCompositeMode::Blit(reason), ..}) => {
+ reason == BlitReason::CLIP
+ }
+ }
+ }
+
+ fn resolve_scene_properties(&mut self, properties: &SceneProperties) -> bool {
+ match self.requested_composite_mode {
+ Some(PictureCompositeMode::Filter(ref mut filter)) => {
+ match *filter {
+ Filter::Opacity(ref binding, ref mut value) => {
+ *value = properties.resolve_float(binding);
+ }
+ _ => {}
+ }
+
+ filter.is_visible()
+ }
+ _ => true,
+ }
+ }
+
+ pub fn is_visible(&self) -> bool {
+ match self.requested_composite_mode {
+ Some(PictureCompositeMode::Filter(ref filter)) => {
+ filter.is_visible()
+ }
+ _ => true,
+ }
+ }
+
+ /// Destroy an existing picture. This is called just before
+ /// a frame builder is replaced with a newly built scene. It
+ /// gives a picture a chance to retain any cached tiles that
+ /// may be useful during the next scene build.
+ pub fn destroy(
+ &mut self,
+ retained_tiles: &mut RetainedTiles,
+ ) {
+ if let Some(tile_cache) = self.tile_cache.take() {
+ if !tile_cache.tiles.is_empty() {
+ retained_tiles.caches.insert(
+ tile_cache.slice,
+ PictureCacheState {
+ tiles: tile_cache.tiles,
+ spatial_node_comparer: tile_cache.spatial_node_comparer,
+ opacity_bindings: tile_cache.opacity_bindings,
+ color_bindings: tile_cache.color_bindings,
+ root_transform: tile_cache.root_transform,
+ current_tile_size: tile_cache.current_tile_size,
+ native_surface: tile_cache.native_surface,
+ external_native_surface_cache: tile_cache.external_native_surface_cache,
+ virtual_offset: tile_cache.virtual_offset,
+ frame_id: tile_cache.frame_id,
+ allocations: PictureCacheRecycledAllocations {
+ old_opacity_bindings: tile_cache.old_opacity_bindings,
+ old_color_bindings: tile_cache.old_color_bindings,
+ compare_cache: tile_cache.compare_cache,
+ },
+ },
+ );
+ }
+ }
+ }
+
+ // TODO(gw): We have the PictureOptions struct available. We
+ // should move some of the parameter list in this
+ // method to be part of the PictureOptions, and
+ // avoid adding new parameters here.
+ pub fn new_image(
+ requested_composite_mode: Option<PictureCompositeMode>,
+ context_3d: Picture3DContext<OrderedPictureChild>,
+ frame_output_pipeline_id: Option<PipelineId>,
+ apply_local_clip_rect: bool,
+ flags: PrimitiveFlags,
+ requested_raster_space: RasterSpace,
+ prim_list: PrimitiveList,
+ spatial_node_index: SpatialNodeIndex,
+ tile_cache: Option<Box<TileCacheInstance>>,
+ options: PictureOptions,
+ ) -> Self {
+ PicturePrimitive {
+ prim_list,
+ state: None,
+ secondary_render_task_id: None,
+ requested_composite_mode,
+ raster_config: None,
+ context_3d,
+ frame_output_pipeline_id,
+ extra_gpu_data_handles: SmallVec::new(),
+ apply_local_clip_rect,
+ is_backface_visible: flags.contains(PrimitiveFlags::IS_BACKFACE_VISIBLE),
+ requested_raster_space,
+ spatial_node_index,
+ estimated_local_rect: LayoutRect::zero(),
+ precise_local_rect: LayoutRect::zero(),
+ tile_cache,
+ options,
+ segments_are_valid: false,
+ num_render_tasks: 0,
+ }
+ }
+
+ /// Gets the raster space to use when rendering the picture.
+ /// Usually this would be the requested raster space. However, if the
+ /// picture's spatial node or one of its ancestors is being pinch zoomed
+ /// then we round it. This prevents us rasterizing glyphs for every minor
+ /// change in zoom level, as that would be too expensive.
+ pub fn get_raster_space(&self, spatial_tree: &SpatialTree) -> RasterSpace {
+ let spatial_node = &spatial_tree.spatial_nodes[self.spatial_node_index.0 as usize];
+ if spatial_node.is_ancestor_or_self_zooming {
+ let scale_factors = spatial_tree
+ .get_relative_transform(self.spatial_node_index, ROOT_SPATIAL_NODE_INDEX)
+ .scale_factors();
+
+ // Round the scale up to the nearest power of 2, but don't exceed 8.
+ let scale = scale_factors.0.max(scale_factors.1).min(8.0);
+ let rounded_up = 2.0f32.powf(scale.log2().ceil());
+
+ RasterSpace::Local(rounded_up)
+ } else {
+ self.requested_raster_space
+ }
+ }
+
+ pub fn take_context(
+ &mut self,
+ pic_index: PictureIndex,
+ clipped_prim_bounding_rect: WorldRect,
+ surface_spatial_node_index: SpatialNodeIndex,
+ raster_spatial_node_index: SpatialNodeIndex,
+ parent_surface_index: SurfaceIndex,
+ parent_subpixel_mode: &SubpixelMode,
+ frame_state: &mut FrameBuildingState,
+ frame_context: &FrameBuildingContext,
+ scratch: &mut PrimitiveScratchBuffer,
+ tile_cache_logger: &mut TileCacheLogger,
+ ) -> Option<(PictureContext, PictureState, PrimitiveList)> {
+ if !self.is_visible() {
+ return None;
+ }
+
+ profile_scope!("take_context");
+ let task_id = frame_state.surfaces[parent_surface_index.0].render_tasks.unwrap().port;
+ frame_state.render_tasks[task_id].children.reserve(self.num_render_tasks);
+
+ // Extract the raster and surface spatial nodes from the raster
+ // config, if this picture establishes a surface. Otherwise just
+ // pass in the spatial node indices from the parent context.
+ let (raster_spatial_node_index, surface_spatial_node_index, surface_index, inflation_factor) = match self.raster_config {
+ Some(ref raster_config) => {
+ let surface = &frame_state.surfaces[raster_config.surface_index.0];
+
+ (
+ surface.raster_spatial_node_index,
+ self.spatial_node_index,
+ raster_config.surface_index,
+ surface.inflation_factor,
+ )
+ }
+ None => {
+ (
+ raster_spatial_node_index,
+ surface_spatial_node_index,
+ parent_surface_index,
+ 0.0,
+ )
+ }
+ };
+
+ let map_pic_to_world = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ surface_spatial_node_index,
+ frame_context.global_screen_world_rect,
+ frame_context.spatial_tree,
+ );
+
+ let pic_bounds = map_pic_to_world.unmap(&map_pic_to_world.bounds)
+ .unwrap_or_else(PictureRect::max_rect);
+
+ let map_local_to_pic = SpaceMapper::new(
+ surface_spatial_node_index,
+ pic_bounds,
+ );
+
+ let (map_raster_to_world, map_pic_to_raster) = create_raster_mappers(
+ surface_spatial_node_index,
+ raster_spatial_node_index,
+ frame_context.global_screen_world_rect,
+ frame_context.spatial_tree,
+ );
+
+ let plane_splitter = match self.context_3d {
+ Picture3DContext::Out => {
+ None
+ }
+ Picture3DContext::In { root_data: Some(_), .. } => {
+ Some(PlaneSplitter::new())
+ }
+ Picture3DContext::In { root_data: None, .. } => {
+ None
+ }
+ };
+
+ match self.raster_config {
+ Some(ref mut raster_config) => {
+ let pic_rect = self.precise_local_rect.cast_unit();
+
+ let mut device_pixel_scale = frame_state
+ .surfaces[raster_config.surface_index.0]
+ .device_pixel_scale;
+
+ let scale_factors = frame_state
+ .surfaces[raster_config.surface_index.0]
+ .scale_factors;
+
+ // If the primitive has a filter that can sample with an offset, the clip rect has
+ // to take it into account.
+ let clip_inflation = match raster_config.composite_mode {
+ PictureCompositeMode::Filter(Filter::DropShadows(ref shadows)) => {
+ let mut max_offset = vec2(0.0, 0.0);
+ let mut min_offset = vec2(0.0, 0.0);
+ for shadow in shadows {
+ let offset = layout_vector_as_picture_vector(shadow.offset);
+ max_offset = max_offset.max(offset);
+ min_offset = min_offset.min(offset);
+ }
+
+ // Get the shadow offsets in world space.
+ let raster_min = map_pic_to_raster.map_vector(min_offset);
+ let raster_max = map_pic_to_raster.map_vector(max_offset);
+ let world_min = map_raster_to_world.map_vector(raster_min);
+ let world_max = map_raster_to_world.map_vector(raster_max);
+
+ // Grow the clip in the opposite direction of the shadow's offset.
+ SideOffsets2D::from_vectors_outer(
+ -world_max.max(vec2(0.0, 0.0)),
+ -world_min.min(vec2(0.0, 0.0)),
+ )
+ }
+ _ => SideOffsets2D::zero(),
+ };
+
+ let (mut clipped, mut unclipped) = match get_raster_rects(
+ pic_rect,
+ &map_pic_to_raster,
+ &map_raster_to_world,
+ clipped_prim_bounding_rect.outer_rect(clip_inflation),
+ device_pixel_scale,
+ ) {
+ Some(info) => info,
+ None => {
+ return None
+ }
+ };
+ let transform = map_pic_to_raster.get_transform();
+
+ /// If the picture (raster_config) establishes a raster root,
+ /// its requested resolution won't be clipped by the parent or
+ /// viewport; so we need to make sure the requested resolution is
+ /// "reasonable", ie. <= MAX_SURFACE_SIZE. If not, scale the
+ /// picture down until it fits that limit. This results in a new
+ /// device_rect, a new unclipped rect, and a new device_pixel_scale.
+ ///
+ /// Since the adjusted device_pixel_scale is passed into the
+ /// RenderTask (and then the shader via RenderTaskData) this mostly
+ /// works transparently, reusing existing support for variable DPI
+ /// support. The on-the-fly scaling can be seen as on-the-fly,
+ /// per-task DPI adjustment. Logical pixels are unaffected.
+ ///
+ /// The scaling factor is returned to the caller; blur radius,
+ /// font size, etc. need to be scaled accordingly.
+ fn adjust_scale_for_max_surface_size(
+ raster_config: &RasterConfig,
+ max_target_size: i32,
+ pic_rect: PictureRect,
+ map_pic_to_raster: &SpaceMapper<PicturePixel, RasterPixel>,
+ map_raster_to_world: &SpaceMapper<RasterPixel, WorldPixel>,
+ clipped_prim_bounding_rect: WorldRect,
+ device_pixel_scale : &mut DevicePixelScale,
+ device_rect: &mut DeviceRect,
+ unclipped: &mut DeviceRect) -> Option<f32>
+ {
+ let limit = if raster_config.establishes_raster_root {
+ MAX_SURFACE_SIZE
+ } else {
+ max_target_size as f32
+ };
+ if device_rect.size.width > limit || device_rect.size.height > limit {
+ // round_out will grow by 1 integer pixel if origin is on a
+ // fractional position, so keep that margin for error with -1:
+ let scale = (limit as f32 - 1.0) /
+ (f32::max(device_rect.size.width, device_rect.size.height));
+ *device_pixel_scale = *device_pixel_scale * Scale::new(scale);
+ let new_device_rect = device_rect.to_f32() * Scale::new(scale);
+ *device_rect = new_device_rect.round_out();
+
+ *unclipped = match get_raster_rects(
+ pic_rect,
+ &map_pic_to_raster,
+ &map_raster_to_world,
+ clipped_prim_bounding_rect,
+ *device_pixel_scale
+ ) {
+ Some(info) => info.1,
+ None => {
+ return None
+ }
+ };
+ Some(scale)
+ }
+ else
+ {
+ None
+ }
+ }
+
+ let dep_info = match raster_config.composite_mode {
+ PictureCompositeMode::Filter(Filter::Blur(blur_radius)) => {
+ let blur_std_deviation = clamp_blur_radius(blur_radius, scale_factors) * device_pixel_scale.0;
+ let mut blur_std_deviation = DeviceSize::new(
+ blur_std_deviation * scale_factors.0,
+ blur_std_deviation * scale_factors.1
+ );
+ let mut device_rect = if self.options.inflate_if_required {
+ let inflation_factor = frame_state.surfaces[raster_config.surface_index.0].inflation_factor;
+ let inflation_factor = inflation_factor * device_pixel_scale.0;
+
+ // The clipped field is the part of the picture that is visible
+ // on screen. The unclipped field is the screen-space rect of
+ // the complete picture, if no screen / clip-chain was applied
+ // (this includes the extra space for blur region). To ensure
+ // that we draw a large enough part of the picture to get correct
+ // blur results, inflate that clipped area by the blur range, and
+ // then intersect with the total screen rect, to minimize the
+ // allocation size.
+ clipped
+ .inflate(inflation_factor * scale_factors.0, inflation_factor * scale_factors.1)
+ .intersection(&unclipped)
+ .unwrap()
+ } else {
+ clipped
+ };
+
+ let mut original_size = device_rect.size;
+
+ // Adjust the size to avoid introducing sampling errors during the down-scaling passes.
+ // what would be even better is to rasterize the picture at the down-scaled size
+ // directly.
+ device_rect.size = RenderTask::adjusted_blur_source_size(
+ device_rect.size,
+ blur_std_deviation,
+ );
+
+ if let Some(scale) = adjust_scale_for_max_surface_size(
+ raster_config, frame_context.fb_config.max_target_size,
+ pic_rect, &map_pic_to_raster, &map_raster_to_world,
+ clipped_prim_bounding_rect,
+ &mut device_pixel_scale, &mut device_rect, &mut unclipped,
+ ) {
+ blur_std_deviation = blur_std_deviation * scale;
+ original_size = original_size.to_f32() * scale;
+ raster_config.root_scaling_factor = scale;
+ }
+
+ let device_rect = device_rect.to_i32();
+
+ let uv_rect_kind = calculate_uv_rect_kind(
+ &pic_rect,
+ &transform,
+ &device_rect,
+ device_pixel_scale,
+ );
+
+ let picture_task_id = frame_state.render_tasks.add().init(
+ RenderTask::new_picture(
+ RenderTaskLocation::Dynamic(None, device_rect.size),
+ unclipped.size,
+ pic_index,
+ device_rect.origin,
+ uv_rect_kind,
+ surface_spatial_node_index,
+ device_pixel_scale,
+ PrimitiveVisibilityMask::all(),
+ None,
+ None,
+ )
+ );
+
+ let blur_render_task_id = RenderTask::new_blur(
+ blur_std_deviation,
+ picture_task_id,
+ frame_state.render_tasks,
+ RenderTargetKind::Color,
+ ClearMode::Transparent,
+ None,
+ original_size.to_i32(),
+ );
+
+ Some((blur_render_task_id, picture_task_id))
+ }
+ PictureCompositeMode::Filter(Filter::DropShadows(ref shadows)) => {
+ let mut max_std_deviation = 0.0;
+ for shadow in shadows {
+ max_std_deviation = f32::max(max_std_deviation, shadow.blur_radius);
+ }
+ max_std_deviation = clamp_blur_radius(max_std_deviation, scale_factors) * device_pixel_scale.0;
+ let max_blur_range = max_std_deviation * BLUR_SAMPLE_SCALE;
+
+ // We cast clipped to f32 instead of casting unclipped to i32
+ // because unclipped can overflow an i32.
+ let mut device_rect = clipped
+ .inflate(max_blur_range * scale_factors.0, max_blur_range * scale_factors.1)
+ .intersection(&unclipped)
+ .unwrap();
+
+ device_rect.size = RenderTask::adjusted_blur_source_size(
+ device_rect.size,
+ DeviceSize::new(
+ max_std_deviation * scale_factors.0,
+ max_std_deviation * scale_factors.1
+ ),
+ );
+
+ if let Some(scale) = adjust_scale_for_max_surface_size(
+ raster_config, frame_context.fb_config.max_target_size,
+ pic_rect, &map_pic_to_raster, &map_raster_to_world,
+ clipped_prim_bounding_rect,
+ &mut device_pixel_scale, &mut device_rect, &mut unclipped,
+ ) {
+ // std_dev adjusts automatically from using device_pixel_scale
+ raster_config.root_scaling_factor = scale;
+ }
+
+ let device_rect = device_rect.to_i32();
+
+ let uv_rect_kind = calculate_uv_rect_kind(
+ &pic_rect,
+ &transform,
+ &device_rect,
+ device_pixel_scale,
+ );
+
+ let picture_task_id = frame_state.render_tasks.add().init({
+ let mut picture_task = RenderTask::new_picture(
+ RenderTaskLocation::Dynamic(None, device_rect.size),
+ unclipped.size,
+ pic_index,
+ device_rect.origin,
+ uv_rect_kind,
+ surface_spatial_node_index,
+ device_pixel_scale,
+ PrimitiveVisibilityMask::all(),
+ None,
+ None,
+ );
+ picture_task.mark_for_saving();
+
+ picture_task
+ });
+
+ self.secondary_render_task_id = Some(picture_task_id);
+
+ let mut blur_tasks = BlurTaskCache::default();
+
+ self.extra_gpu_data_handles.resize(shadows.len(), GpuCacheHandle::new());
+
+ let mut blur_render_task_id = picture_task_id;
+ for shadow in shadows {
+ let blur_radius = clamp_blur_radius(shadow.blur_radius, scale_factors) * device_pixel_scale.0;
+ blur_render_task_id = RenderTask::new_blur(
+ DeviceSize::new(
+ blur_radius * scale_factors.0,
+ blur_radius * scale_factors.1,
+ ),
+ picture_task_id,
+ frame_state.render_tasks,
+ RenderTargetKind::Color,
+ ClearMode::Transparent,
+ Some(&mut blur_tasks),
+ device_rect.size,
+ );
+ }
+
+ // TODO(nical) the second one should to be the blur's task id but we have several blurs now
+ Some((blur_render_task_id, picture_task_id))
+ }
+ PictureCompositeMode::MixBlend(..) if !frame_context.fb_config.gpu_supports_advanced_blend => {
+ if let Some(scale) = adjust_scale_for_max_surface_size(
+ raster_config, frame_context.fb_config.max_target_size,
+ pic_rect, &map_pic_to_raster, &map_raster_to_world,
+ clipped_prim_bounding_rect,
+ &mut device_pixel_scale, &mut clipped, &mut unclipped,
+ ) {
+ raster_config.root_scaling_factor = scale;
+ }
+
+ let clipped = clipped.to_i32();
+
+ let uv_rect_kind = calculate_uv_rect_kind(
+ &pic_rect,
+ &transform,
+ &clipped,
+ device_pixel_scale,
+ );
+
+ let readback_task_id = frame_state.render_tasks.add().init(
+ RenderTask::new_readback(clipped)
+ );
+
+ frame_state.render_tasks.add_dependency(
+ frame_state.surfaces[parent_surface_index.0].render_tasks.unwrap().port,
+ readback_task_id,
+ );
+
+ self.secondary_render_task_id = Some(readback_task_id);
+
+ let render_task_id = frame_state.render_tasks.add().init(
+ RenderTask::new_picture(
+ RenderTaskLocation::Dynamic(None, clipped.size),
+ unclipped.size,
+ pic_index,
+ clipped.origin,
+ uv_rect_kind,
+ surface_spatial_node_index,
+ device_pixel_scale,
+ PrimitiveVisibilityMask::all(),
+ None,
+ None,
+ )
+ );
+
+ Some((render_task_id, render_task_id))
+ }
+ PictureCompositeMode::Filter(..) => {
+
+ if let Some(scale) = adjust_scale_for_max_surface_size(
+ raster_config, frame_context.fb_config.max_target_size,
+ pic_rect, &map_pic_to_raster, &map_raster_to_world,
+ clipped_prim_bounding_rect,
+ &mut device_pixel_scale, &mut clipped, &mut unclipped,
+ ) {
+ raster_config.root_scaling_factor = scale;
+ }
+
+ let clipped = clipped.to_i32();
+
+ let uv_rect_kind = calculate_uv_rect_kind(
+ &pic_rect,
+ &transform,
+ &clipped,
+ device_pixel_scale,
+ );
+
+ let render_task_id = frame_state.render_tasks.add().init(
+ RenderTask::new_picture(
+ RenderTaskLocation::Dynamic(None, clipped.size),
+ unclipped.size,
+ pic_index,
+ clipped.origin,
+ uv_rect_kind,
+ surface_spatial_node_index,
+ device_pixel_scale,
+ PrimitiveVisibilityMask::all(),
+ None,
+ None,
+ )
+ );
+
+ Some((render_task_id, render_task_id))
+ }
+ PictureCompositeMode::ComponentTransferFilter(..) => {
+ if let Some(scale) = adjust_scale_for_max_surface_size(
+ raster_config, frame_context.fb_config.max_target_size,
+ pic_rect, &map_pic_to_raster, &map_raster_to_world,
+ clipped_prim_bounding_rect,
+ &mut device_pixel_scale, &mut clipped, &mut unclipped,
+ ) {
+ raster_config.root_scaling_factor = scale;
+ }
+
+ let clipped = clipped.to_i32();
+
+ let uv_rect_kind = calculate_uv_rect_kind(
+ &pic_rect,
+ &transform,
+ &clipped,
+ device_pixel_scale,
+ );
+
+ let render_task_id = frame_state.render_tasks.add().init(
+ RenderTask::new_picture(
+ RenderTaskLocation::Dynamic(None, clipped.size),
+ unclipped.size,
+ pic_index,
+ clipped.origin,
+ uv_rect_kind,
+ surface_spatial_node_index,
+ device_pixel_scale,
+ PrimitiveVisibilityMask::all(),
+ None,
+ None,
+ )
+ );
+
+ Some((render_task_id, render_task_id))
+ }
+ PictureCompositeMode::TileCache { .. } => {
+ let tile_cache = self.tile_cache.as_mut().unwrap();
+ let mut first = true;
+
+ // Get the overall world space rect of the picture cache. Used to clip
+ // the tile rects below for occlusion testing to the relevant area.
+ let world_clip_rect = map_pic_to_world
+ .map(&tile_cache.local_clip_rect)
+ .expect("bug: unable to map clip rect");
+ let device_clip_rect = (world_clip_rect * frame_context.global_device_pixel_scale).round();
+
+ for tile in tile_cache.tiles.values_mut() {
+
+ if tile.is_visible {
+ // Get the world space rect that this tile will actually occupy on screem
+ let device_draw_rect = device_clip_rect.intersection(&tile.device_valid_rect);
+
+ // If that draw rect is occluded by some set of tiles in front of it,
+ // then mark it as not visible and skip drawing. When it's not occluded
+ // it will fail this test, and get rasterized by the render task setup
+ // code below.
+ match device_draw_rect {
+ Some(device_draw_rect) => {
+ // Only check for occlusion on visible tiles that are fixed position.
+ if tile_cache.spatial_node_index == ROOT_SPATIAL_NODE_INDEX &&
+ frame_state.composite_state.is_tile_occluded(tile.z_id, device_draw_rect) {
+ // If this tile has an allocated native surface, free it, since it's completely
+ // occluded. We will need to re-allocate this surface if it becomes visible,
+ // but that's likely to be rare (e.g. when there is no content display list
+ // for a frame or two during a tab switch).
+ let surface = tile.surface.as_mut().expect("no tile surface set!");
+
+ if let TileSurface::Texture { descriptor: SurfaceTextureDescriptor::Native { id, .. }, .. } = surface {
+ if let Some(id) = id.take() {
+ frame_state.resource_cache.destroy_compositor_tile(id);
+ }
+ }
+
+ tile.is_visible = false;
+ continue;
+ }
+ }
+ None => {
+ tile.is_visible = false;
+ }
+ }
+ }
+
+ // If we get here, we want to ensure that the surface remains valid in the texture
+ // cache, _even if_ it's not visible due to clipping or being scrolled off-screen.
+ // This ensures that we retain valid tiles that are off-screen, but still in the
+ // display port of this tile cache instance.
+ if let Some(TileSurface::Texture { descriptor, .. }) = tile.surface.as_ref() {
+ if let SurfaceTextureDescriptor::TextureCache { ref handle, .. } = descriptor {
+ frame_state.resource_cache.texture_cache.request(
+ handle,
+ frame_state.gpu_cache,
+ );
+ }
+ }
+
+ // If the tile has been found to be off-screen / clipped, skip any further processing.
+ if !tile.is_visible {
+ continue;
+ }
+
+ if frame_context.debug_flags.contains(DebugFlags::PICTURE_CACHING_DBG) {
+ tile.root.draw_debug_rects(
+ &map_pic_to_world,
+ tile.is_opaque,
+ tile.current_descriptor.local_valid_rect,
+ scratch,
+ frame_context.global_device_pixel_scale,
+ );
+
+ let label_offset = DeviceVector2D::new(20.0, 30.0);
+ let tile_device_rect = tile.world_tile_rect * frame_context.global_device_pixel_scale;
+ if tile_device_rect.size.height >= label_offset.y {
+ let surface = tile.surface.as_ref().expect("no tile surface set!");
+
+ scratch.push_debug_string(
+ tile_device_rect.origin + label_offset,
+ debug_colors::RED,
+ format!("{:?}: s={} is_opaque={} surface={}",
+ tile.id,
+ tile_cache.slice,
+ tile.is_opaque,
+ surface.kind(),
+ ),
+ );
+ }
+ }
+
+ if let TileSurface::Texture { descriptor, .. } = tile.surface.as_mut().unwrap() {
+ match descriptor {
+ SurfaceTextureDescriptor::TextureCache { ref handle, .. } => {
+ // Invalidate if the backing texture was evicted.
+ if frame_state.resource_cache.texture_cache.is_allocated(handle) {
+ // Request the backing texture so it won't get evicted this frame.
+ // We specifically want to mark the tile texture as used, even
+ // if it's detected not visible below and skipped. This is because
+ // we maintain the set of tiles we care about based on visibility
+ // during pre_update. If a tile still exists after that, we are
+ // assuming that it's either visible or we want to retain it for
+ // a while in case it gets scrolled back onto screen soon.
+ // TODO(gw): Consider switching to manual eviction policy?
+ frame_state.resource_cache.texture_cache.request(handle, frame_state.gpu_cache);
+ } else {
+ // If the texture was evicted on a previous frame, we need to assume
+ // that the entire tile rect is dirty.
+ tile.invalidate(None, InvalidationReason::NoTexture);
+ }
+ }
+ SurfaceTextureDescriptor::Native { id, .. } => {
+ if id.is_none() {
+ // There is no current surface allocation, so ensure the entire tile is invalidated
+ tile.invalidate(None, InvalidationReason::NoSurface);
+ }
+ }
+ }
+ }
+
+ // Ensure that the dirty rect doesn't extend outside the local valid rect.
+ tile.local_dirty_rect = tile.local_dirty_rect
+ .intersection(&tile.current_descriptor.local_valid_rect)
+ .unwrap_or_else(PictureRect::zero);
+
+ // Update the world/device dirty rect
+ let world_dirty_rect = map_pic_to_world.map(&tile.local_dirty_rect).expect("bug");
+
+ let device_rect = (tile.world_tile_rect * frame_context.global_device_pixel_scale).round();
+ tile.device_dirty_rect = (world_dirty_rect * frame_context.global_device_pixel_scale)
+ .round_out()
+ .intersection(&device_rect)
+ .unwrap_or_else(DeviceRect::zero);
+
+ if tile.is_valid {
+ continue;
+ }
+
+ // Ensure that this texture is allocated.
+ if let TileSurface::Texture { ref mut descriptor, ref mut visibility_mask } = tile.surface.as_mut().unwrap() {
+ match descriptor {
+ SurfaceTextureDescriptor::TextureCache { ref mut handle } => {
+ if !frame_state.resource_cache.texture_cache.is_allocated(handle) {
+ frame_state.resource_cache.texture_cache.update_picture_cache(
+ tile_cache.current_tile_size,
+ handle,
+ frame_state.gpu_cache,
+ );
+ }
+ }
+ SurfaceTextureDescriptor::Native { id } => {
+ if id.is_none() {
+ // Allocate a native surface id if we're in native compositing mode,
+ // and we don't have a surface yet (due to first frame, or destruction
+ // due to tile size changing etc).
+ if tile_cache.native_surface.is_none() {
+ let opaque = frame_state
+ .resource_cache
+ .create_compositor_surface(
+ tile_cache.virtual_offset,
+ tile_cache.current_tile_size,
+ true,
+ );
+
+ let alpha = frame_state
+ .resource_cache
+ .create_compositor_surface(
+ tile_cache.virtual_offset,
+ tile_cache.current_tile_size,
+ false,
+ );
+
+ tile_cache.native_surface = Some(NativeSurface {
+ opaque,
+ alpha,
+ });
+ }
+
+ // Create the tile identifier and allocate it.
+ let surface_id = if tile.is_opaque {
+ tile_cache.native_surface.as_ref().unwrap().opaque
+ } else {
+ tile_cache.native_surface.as_ref().unwrap().alpha
+ };
+
+ let tile_id = NativeTileId {
+ surface_id,
+ x: tile.tile_offset.x,
+ y: tile.tile_offset.y,
+ };
+
+ frame_state.resource_cache.create_compositor_tile(tile_id);
+
+ *id = Some(tile_id);
+ }
+ }
+ }
+
+ *visibility_mask = PrimitiveVisibilityMask::empty();
+ let dirty_region_index = tile_cache.dirty_region.dirty_rects.len();
+
+ // If we run out of dirty regions, then force the last dirty region to
+ // be a union of any remaining regions. This is an inefficiency, in that
+ // we'll add items to batches later on that are redundant / outside this
+ // tile, but it's really rare except in pathological cases (even on a
+ // 4k screen, the typical dirty region count is < 16).
+ if dirty_region_index < PrimitiveVisibilityMask::MAX_DIRTY_REGIONS {
+ visibility_mask.set_visible(dirty_region_index);
+
+ tile_cache.dirty_region.push(
+ world_dirty_rect,
+ *visibility_mask,
+ );
+ } else {
+ visibility_mask.set_visible(PrimitiveVisibilityMask::MAX_DIRTY_REGIONS - 1);
+
+ tile_cache.dirty_region.include_rect(
+ PrimitiveVisibilityMask::MAX_DIRTY_REGIONS - 1,
+ world_dirty_rect,
+ );
+ }
+
+ let content_origin_f = tile.world_tile_rect.origin * device_pixel_scale;
+ let content_origin = content_origin_f.round();
+ debug_assert!((content_origin_f.x - content_origin.x).abs() < 0.01);
+ debug_assert!((content_origin_f.y - content_origin.y).abs() < 0.01);
+
+ let surface = descriptor.resolve(
+ frame_state.resource_cache,
+ tile_cache.current_tile_size,
+ );
+
+ let scissor_rect = tile.device_dirty_rect
+ .translate(-device_rect.origin.to_vector())
+ .round()
+ .to_i32();
+
+ let valid_rect = tile.device_valid_rect
+ .translate(-device_rect.origin.to_vector())
+ .round()
+ .to_i32();
+
+ let render_task_id = frame_state.render_tasks.add().init(
+ RenderTask::new_picture(
+ RenderTaskLocation::PictureCache {
+ size: tile_cache.current_tile_size,
+ surface,
+ },
+ tile_cache.current_tile_size.to_f32(),
+ pic_index,
+ content_origin.to_i32(),
+ UvRectKind::Rect,
+ surface_spatial_node_index,
+ device_pixel_scale,
+ *visibility_mask,
+ Some(scissor_rect),
+ Some(valid_rect),
+ )
+ );
+
+ frame_state.render_tasks.add_dependency(
+ frame_state.surfaces[parent_surface_index.0].render_tasks.unwrap().port,
+ render_task_id,
+ );
+
+ if first {
+ // TODO(gw): Maybe we can restructure this code to avoid the
+ // first hack here. Or at least explain it with a follow up
+ // bug.
+ frame_state.surfaces[raster_config.surface_index.0].render_tasks = Some(SurfaceRenderTasks {
+ root: render_task_id,
+ port: render_task_id,
+ });
+
+ first = false;
+ }
+ }
+
+ // Now that the tile is valid, reset the dirty rect.
+ tile.local_dirty_rect = PictureRect::zero();
+ tile.is_valid = true;
+ }
+
+ // If invalidation debugging is enabled, dump the picture cache state to a tree printer.
+ if frame_context.debug_flags.contains(DebugFlags::INVALIDATION_DBG) {
+ tile_cache.print();
+ }
+
+ None
+ }
+ PictureCompositeMode::MixBlend(..) |
+ PictureCompositeMode::Blit(_) => {
+ if let Some(scale) = adjust_scale_for_max_surface_size(
+ raster_config, frame_context.fb_config.max_target_size,
+ pic_rect, &map_pic_to_raster, &map_raster_to_world,
+ clipped_prim_bounding_rect,
+ &mut device_pixel_scale, &mut clipped, &mut unclipped,
+ ) {
+ raster_config.root_scaling_factor = scale;
+ }
+
+ let clipped = clipped.to_i32();
+
+ let uv_rect_kind = calculate_uv_rect_kind(
+ &pic_rect,
+ &transform,
+ &clipped,
+ device_pixel_scale,
+ );
+
+ let render_task_id = frame_state.render_tasks.add().init(
+ RenderTask::new_picture(
+ RenderTaskLocation::Dynamic(None, clipped.size),
+ unclipped.size,
+ pic_index,
+ clipped.origin,
+ uv_rect_kind,
+ surface_spatial_node_index,
+ device_pixel_scale,
+ PrimitiveVisibilityMask::all(),
+ None,
+ None,
+ )
+ );
+
+ Some((render_task_id, render_task_id))
+ }
+ PictureCompositeMode::SvgFilter(ref primitives, ref filter_datas) => {
+
+ if let Some(scale) = adjust_scale_for_max_surface_size(
+ raster_config, frame_context.fb_config.max_target_size,
+ pic_rect, &map_pic_to_raster, &map_raster_to_world,
+ clipped_prim_bounding_rect,
+ &mut device_pixel_scale, &mut clipped, &mut unclipped,
+ ) {
+ raster_config.root_scaling_factor = scale;
+ }
+
+ let clipped = clipped.to_i32();
+
+ let uv_rect_kind = calculate_uv_rect_kind(
+ &pic_rect,
+ &transform,
+ &clipped,
+ device_pixel_scale,
+ );
+
+ let picture_task_id = frame_state.render_tasks.add().init(
+ RenderTask::new_picture(
+ RenderTaskLocation::Dynamic(None, clipped.size),
+ unclipped.size,
+ pic_index,
+ clipped.origin,
+ uv_rect_kind,
+ surface_spatial_node_index,
+ device_pixel_scale,
+ PrimitiveVisibilityMask::all(),
+ None,
+ None,
+ )
+ );
+
+ let filter_task_id = RenderTask::new_svg_filter(
+ primitives,
+ filter_datas,
+ &mut frame_state.render_tasks,
+ clipped.size,
+ uv_rect_kind,
+ picture_task_id,
+ device_pixel_scale,
+ );
+
+ Some((filter_task_id, picture_task_id))
+ }
+ };
+
+ if let Some((root, port)) = dep_info {
+ frame_state.surfaces[raster_config.surface_index.0].render_tasks = Some(SurfaceRenderTasks {
+ root,
+ port,
+ });
+
+ frame_state.render_tasks.add_dependency(
+ frame_state.surfaces[parent_surface_index.0].render_tasks.unwrap().port,
+ root,
+ );
+ }
+ }
+ None => {}
+ };
+
+ #[cfg(feature = "capture")]
+ {
+ if frame_context.debug_flags.contains(DebugFlags::TILE_CACHE_LOGGING_DBG) {
+ if let Some(ref tile_cache) = self.tile_cache
+ {
+ // extract just the fields that we're interested in
+ let mut tile_cache_tiny = TileCacheInstanceSerializer {
+ slice: tile_cache.slice,
+ tiles: FastHashMap::default(),
+ background_color: tile_cache.background_color,
+ fract_offset: tile_cache.fract_offset
+ };
+ for (key, tile) in &tile_cache.tiles {
+ tile_cache_tiny.tiles.insert(*key, TileSerializer {
+ rect: tile.local_tile_rect,
+ current_descriptor: tile.current_descriptor.clone(),
+ fract_offset: tile.fract_offset,
+ id: tile.id,
+ root: tile.root.clone(),
+ background_color: tile.background_color,
+ invalidation_reason: tile.invalidation_reason.clone()
+ });
+ }
+ let text = ron::ser::to_string_pretty(&tile_cache_tiny, Default::default()).unwrap();
+ tile_cache_logger.add(text, map_pic_to_world.get_transform());
+ }
+ }
+ }
+ #[cfg(not(feature = "capture"))]
+ {
+ let _tile_cache_logger = tile_cache_logger; // unused variable fix
+ }
+
+ let state = PictureState {
+ //TODO: check for MAX_CACHE_SIZE here?
+ map_local_to_pic,
+ map_pic_to_world,
+ map_pic_to_raster,
+ map_raster_to_world,
+ plane_splitter,
+ };
+
+ let mut dirty_region_count = 0;
+
+ // If this is a picture cache, push the dirty region to ensure any
+ // child primitives are culled and clipped to the dirty rect(s).
+ if let Some(RasterConfig { composite_mode: PictureCompositeMode::TileCache { .. }, .. }) = self.raster_config {
+ let dirty_region = self.tile_cache.as_ref().unwrap().dirty_region.clone();
+ frame_state.push_dirty_region(dirty_region);
+ dirty_region_count += 1;
+ }
+
+ if inflation_factor > 0.0 {
+ let inflated_region = frame_state.current_dirty_region().inflate(inflation_factor);
+ frame_state.push_dirty_region(inflated_region);
+ dirty_region_count += 1;
+ }
+
+ // Disallow subpixel AA if an intermediate surface is needed.
+ // TODO(lsalzman): allow overriding parent if intermediate surface is opaque
+ let (is_passthrough, subpixel_mode) = match self.raster_config {
+ Some(RasterConfig { ref composite_mode, .. }) => {
+ let subpixel_mode = match composite_mode {
+ PictureCompositeMode::TileCache { .. } => {
+ self.tile_cache.as_ref().unwrap().subpixel_mode.clone()
+ }
+ PictureCompositeMode::Blit(..) |
+ PictureCompositeMode::ComponentTransferFilter(..) |
+ PictureCompositeMode::Filter(..) |
+ PictureCompositeMode::MixBlend(..) |
+ PictureCompositeMode::SvgFilter(..) => {
+ // TODO(gw): We can take advantage of the same logic that
+ // exists in the opaque rect detection for tile
+ // caches, to allow subpixel text on other surfaces
+ // that can be detected as opaque.
+ SubpixelMode::Deny
+ }
+ };
+
+ (false, subpixel_mode)
+ }
+ None => {
+ (true, SubpixelMode::Allow)
+ }
+ };
+
+ // Still disable subpixel AA if parent forbids it
+ let subpixel_mode = match (parent_subpixel_mode, subpixel_mode) {
+ (SubpixelMode::Allow, SubpixelMode::Allow) => {
+ // Both parent and this surface unconditionally allow subpixel AA
+ SubpixelMode::Allow
+ }
+ (SubpixelMode::Allow, SubpixelMode::Conditional { allowed_rect, excluded_rects }) => {
+ // Parent allows, but we are conditional subpixel AA
+ SubpixelMode::Conditional {
+ allowed_rect,
+ excluded_rects,
+ }
+ }
+ (SubpixelMode::Conditional { allowed_rect, excluded_rects }, SubpixelMode::Allow) => {
+ // Propagate conditional subpixel mode to child pictures that allow subpixel AA
+ SubpixelMode::Conditional {
+ allowed_rect: *allowed_rect,
+ excluded_rects: excluded_rects.clone(),
+ }
+ }
+ (SubpixelMode::Conditional { .. }, SubpixelMode::Conditional { ..}) => {
+ unreachable!("bug: only top level picture caches have conditional subpixel");
+ }
+ (SubpixelMode::Deny, _) | (_, SubpixelMode::Deny) => {
+ // Either parent or this surface explicitly deny subpixel, these take precedence
+ SubpixelMode::Deny
+ }
+ };
+
+ let context = PictureContext {
+ pic_index,
+ apply_local_clip_rect: self.apply_local_clip_rect,
+ is_passthrough,
+ raster_spatial_node_index,
+ surface_spatial_node_index,
+ surface_index,
+ dirty_region_count,
+ subpixel_mode,
+ };
+
+ let prim_list = mem::replace(&mut self.prim_list, PrimitiveList::empty());
+
+ Some((context, state, prim_list))
+ }
+
+ pub fn restore_context(
+ &mut self,
+ parent_surface_index: SurfaceIndex,
+ prim_list: PrimitiveList,
+ context: PictureContext,
+ state: PictureState,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ // Pop any dirty regions this picture set
+ for _ in 0 .. context.dirty_region_count {
+ frame_state.pop_dirty_region();
+ }
+
+ let task_id = frame_state.surfaces[parent_surface_index.0].render_tasks.unwrap().port;
+ self.num_render_tasks = frame_state.render_tasks[task_id].children.len();
+
+ self.prim_list = prim_list;
+ self.state = Some(state);
+ }
+
+ pub fn take_state(&mut self) -> PictureState {
+ self.state.take().expect("bug: no state present!")
+ }
+
+ /// Add a primitive instance to the plane splitter. The function would generate
+ /// an appropriate polygon, clip it against the frustum, and register with the
+ /// given plane splitter.
+ pub fn add_split_plane(
+ splitter: &mut PlaneSplitter,
+ spatial_tree: &SpatialTree,
+ prim_spatial_node_index: SpatialNodeIndex,
+ original_local_rect: LayoutRect,
+ combined_local_clip_rect: &LayoutRect,
+ world_rect: WorldRect,
+ plane_split_anchor: PlaneSplitAnchor,
+ ) -> bool {
+ let transform = spatial_tree
+ .get_world_transform(prim_spatial_node_index);
+ let matrix = transform.clone().into_transform().cast();
+
+ // Apply the local clip rect here, before splitting. This is
+ // because the local clip rect can't be applied in the vertex
+ // shader for split composites, since we are drawing polygons
+ // rather that rectangles. The interpolation still works correctly
+ // since we determine the UVs by doing a bilerp with a factor
+ // from the original local rect.
+ let local_rect = match original_local_rect
+ .intersection(combined_local_clip_rect)
+ {
+ Some(rect) => rect.cast(),
+ None => return false,
+ };
+ let world_rect = world_rect.cast();
+
+ match transform {
+ CoordinateSpaceMapping::Local => {
+ let polygon = Polygon::from_rect(
+ local_rect * Scale::new(1.0),
+ plane_split_anchor,
+ );
+ splitter.add(polygon);
+ }
+ CoordinateSpaceMapping::ScaleOffset(scale_offset) if scale_offset.scale == Vector2D::new(1.0, 1.0) => {
+ let inv_matrix = scale_offset.inverse().to_transform().cast();
+ let polygon = Polygon::from_transformed_rect_with_inverse(
+ local_rect,
+ &matrix,
+ &inv_matrix,
+ plane_split_anchor,
+ ).unwrap();
+ splitter.add(polygon);
+ }
+ CoordinateSpaceMapping::ScaleOffset(_) |
+ CoordinateSpaceMapping::Transform(_) => {
+ let mut clipper = Clipper::new();
+ let results = clipper.clip_transformed(
+ Polygon::from_rect(
+ local_rect,
+ plane_split_anchor,
+ ),
+ &matrix,
+ Some(world_rect),
+ );
+ if let Ok(results) = results {
+ for poly in results {
+ splitter.add(poly);
+ }
+ }
+ }
+ }
+
+ true
+ }
+
+ pub fn resolve_split_planes(
+ &mut self,
+ splitter: &mut PlaneSplitter,
+ gpu_cache: &mut GpuCache,
+ spatial_tree: &SpatialTree,
+ ) {
+ let ordered = match self.context_3d {
+ Picture3DContext::In { root_data: Some(ref mut list), .. } => list,
+ _ => panic!("Expected to find 3D context root"),
+ };
+ ordered.clear();
+
+ // Process the accumulated split planes and order them for rendering.
+ // Z axis is directed at the screen, `sort` is ascending, and we need back-to-front order.
+ for poly in splitter.sort(vec3(0.0, 0.0, 1.0)) {
+ let cluster = &self.prim_list.clusters[poly.anchor.cluster_index];
+ let spatial_node_index = cluster.spatial_node_index;
+ let transform = match spatial_tree
+ .get_world_transform(spatial_node_index)
+ .inverse()
+ {
+ Some(transform) => transform.into_transform(),
+ // logging this would be a bit too verbose
+ None => continue,
+ };
+
+ let local_points = [
+ transform.transform_point3d(poly.points[0].cast()),
+ transform.transform_point3d(poly.points[1].cast()),
+ transform.transform_point3d(poly.points[2].cast()),
+ transform.transform_point3d(poly.points[3].cast()),
+ ];
+
+ // If any of the points are un-transformable, just drop this
+ // plane from drawing.
+ if local_points.iter().any(|p| p.is_none()) {
+ continue;
+ }
+
+ let p0 = local_points[0].unwrap();
+ let p1 = local_points[1].unwrap();
+ let p2 = local_points[2].unwrap();
+ let p3 = local_points[3].unwrap();
+ let gpu_blocks = [
+ [p0.x, p0.y, p1.x, p1.y].into(),
+ [p2.x, p2.y, p3.x, p3.y].into(),
+ ];
+ let gpu_handle = gpu_cache.push_per_frame_blocks(&gpu_blocks);
+ let gpu_address = gpu_cache.get_address(&gpu_handle);
+
+ ordered.push(OrderedPictureChild {
+ anchor: poly.anchor,
+ spatial_node_index,
+ gpu_address,
+ });
+ }
+ }
+
+ /// Called during initial picture traversal, before we know the
+ /// bounding rect of children. It is possible to determine the
+ /// surface / raster config now though.
+ fn pre_update(
+ &mut self,
+ state: &mut PictureUpdateState,
+ frame_context: &FrameBuildingContext,
+ ) -> Option<PrimitiveList> {
+ // Reset raster config in case we early out below.
+ self.raster_config = None;
+
+ // Resolve animation properties, and early out if the filter
+ // properties make this picture invisible.
+ if !self.resolve_scene_properties(frame_context.scene_properties) {
+ return None;
+ }
+
+ // For out-of-preserve-3d pictures, the backface visibility is determined by
+ // the local transform only.
+ // Note: we aren't taking the transform relativce to the parent picture,
+ // since picture tree can be more dense than the corresponding spatial tree.
+ if !self.is_backface_visible {
+ if let Picture3DContext::Out = self.context_3d {
+ match frame_context.spatial_tree.get_local_visible_face(self.spatial_node_index) {
+ VisibleFace::Front => {}
+ VisibleFace::Back => return None,
+ }
+ }
+ }
+
+ // Push information about this pic on stack for children to read.
+ state.push_picture(PictureInfo {
+ _spatial_node_index: self.spatial_node_index,
+ });
+
+ // See if this picture actually needs a surface for compositing.
+ let actual_composite_mode = match self.requested_composite_mode {
+ Some(PictureCompositeMode::Filter(ref filter)) if filter.is_noop() => None,
+ Some(PictureCompositeMode::TileCache { .. }) => {
+ // Only allow picture caching composite mode if global picture caching setting
+ // is enabled this frame.
+ if state.composite_state.picture_caching_is_enabled {
+ Some(PictureCompositeMode::TileCache { })
+ } else {
+ None
+ }
+ },
+ ref mode => mode.clone(),
+ };
+
+ if let Some(composite_mode) = actual_composite_mode {
+ // Retrieve the positioning node information for the parent surface.
+ let parent_raster_node_index = state.current_surface().raster_spatial_node_index;
+ let parent_device_pixel_scale = state.current_surface().device_pixel_scale;
+ let surface_spatial_node_index = self.spatial_node_index;
+
+ // Filters must be applied before transforms, to do this, we can mark this picture as establishing a raster root.
+ let has_svg_filter = if let PictureCompositeMode::SvgFilter(..) = composite_mode {
+ true
+ } else {
+ false
+ };
+
+ let surface_to_parent_transform = frame_context.spatial_tree
+ .get_relative_transform(surface_spatial_node_index, parent_raster_node_index);
+
+ // Check if there is perspective or if an SVG filter is applied, and thus whether a new
+ // rasterization root should be established.
+ let establishes_raster_root = has_svg_filter || surface_to_parent_transform.is_perspective();
+
+ let (raster_spatial_node_index, device_pixel_scale) = if establishes_raster_root {
+ // If a raster root is established, this surface should be scaled based on the scale factors of the surface raster to parent raster transform.
+ // This scaling helps ensure that the content in this surface does not become blurry or pixelated when composited in the parent surface.
+ let scale_factors = surface_to_parent_transform.scale_factors();
+
+ // Pick the largest scale factor of the transform for the scaling factor.
+ // Currently, we ensure that the scaling factor is >= 1.0 as a smaller scale factor can result in blurry output.
+ let scaling_factor = scale_factors.0.max(scale_factors.1).max(1.0);
+
+ let device_pixel_scale = parent_device_pixel_scale * Scale::new(scaling_factor);
+ (surface_spatial_node_index, device_pixel_scale)
+ } else {
+ (parent_raster_node_index, parent_device_pixel_scale)
+ };
+
+ let scale_factors = frame_context
+ .spatial_tree
+ .get_relative_transform(surface_spatial_node_index, raster_spatial_node_index)
+ .scale_factors();
+
+ // This inflation factor is to be applied to all primitives within the surface.
+ // Only inflate if the caller hasn't already inflated the bounding rects for this filter.
+ let mut inflation_factor = 0.0;
+ if self.options.inflate_if_required {
+ match composite_mode {
+ PictureCompositeMode::Filter(Filter::Blur(blur_radius)) => {
+ let blur_radius = clamp_blur_radius(blur_radius, scale_factors);
+ // The amount of extra space needed for primitives inside
+ // this picture to ensure the visibility check is correct.
+ inflation_factor = blur_radius * BLUR_SAMPLE_SCALE;
+ }
+ PictureCompositeMode::SvgFilter(ref primitives, _) => {
+ let mut max = 0.0;
+ for primitive in primitives {
+ if let FilterPrimitiveKind::Blur(ref blur) = primitive.kind {
+ max = f32::max(max, blur.radius);
+ }
+ }
+ inflation_factor = clamp_blur_radius(max, scale_factors) * BLUR_SAMPLE_SCALE;
+ }
+ PictureCompositeMode::Filter(Filter::DropShadows(ref shadows)) => {
+ // TODO(gw): This is incorrect, since we don't consider the drop shadow
+ // offset. However, fixing that is a larger task, so this is
+ // an improvement on the current case (this at least works where
+ // the offset of the drop-shadow is ~0, which is often true).
+
+ // Can't use max_by_key here since f32 isn't Ord
+ let mut max_blur_radius: f32 = 0.0;
+ for shadow in shadows {
+ max_blur_radius = max_blur_radius.max(shadow.blur_radius);
+ }
+
+ inflation_factor = clamp_blur_radius(max_blur_radius, scale_factors) * BLUR_SAMPLE_SCALE;
+ }
+ _ => {}
+ }
+ }
+
+ let surface = SurfaceInfo::new(
+ surface_spatial_node_index,
+ raster_spatial_node_index,
+ inflation_factor,
+ frame_context.global_screen_world_rect,
+ &frame_context.spatial_tree,
+ device_pixel_scale,
+ scale_factors,
+ );
+
+ self.raster_config = Some(RasterConfig {
+ composite_mode,
+ establishes_raster_root,
+ surface_index: state.push_surface(surface),
+ root_scaling_factor: 1.0,
+ });
+ }
+
+ Some(mem::replace(&mut self.prim_list, PrimitiveList::empty()))
+ }
+
+ /// Called after updating child pictures during the initial
+ /// picture traversal.
+ fn post_update(
+ &mut self,
+ prim_list: PrimitiveList,
+ state: &mut PictureUpdateState,
+ frame_context: &FrameBuildingContext,
+ data_stores: &mut DataStores,
+ ) {
+ // Restore the pictures list used during recursion.
+ self.prim_list = prim_list;
+
+ // Pop the state information about this picture.
+ state.pop_picture();
+
+ for cluster in &mut self.prim_list.clusters {
+ cluster.flags.remove(ClusterFlags::IS_VISIBLE);
+
+ // Skip the cluster if backface culled.
+ if !cluster.flags.contains(ClusterFlags::IS_BACKFACE_VISIBLE) {
+ // For in-preserve-3d primitives and pictures, the backface visibility is
+ // evaluated relative to the containing block.
+ if let Picture3DContext::In { ancestor_index, .. } = self.context_3d {
+ match frame_context.spatial_tree
+ .get_relative_transform(cluster.spatial_node_index, ancestor_index)
+ .visible_face()
+ {
+ VisibleFace::Back => continue,
+ VisibleFace::Front => (),
+ }
+ }
+ }
+
+ // No point including this cluster if it can't be transformed
+ let spatial_node = &frame_context
+ .spatial_tree
+ .spatial_nodes[cluster.spatial_node_index.0 as usize];
+ if !spatial_node.invertible {
+ continue;
+ }
+
+ // Update any primitives/cluster bounding rects that can only be done
+ // with information available during frame building.
+ if cluster.flags.contains(ClusterFlags::IS_BACKDROP_FILTER) {
+ let backdrop_to_world_mapper = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ cluster.spatial_node_index,
+ LayoutRect::max_rect(),
+ frame_context.spatial_tree,
+ );
+
+ for prim_instance in &mut cluster.prim_instances {
+ match prim_instance.kind {
+ PrimitiveInstanceKind::Backdrop { data_handle, .. } => {
+ // The actual size and clip rect of this primitive are determined by computing the bounding
+ // box of the projected rect of the backdrop-filter element onto the backdrop.
+ let prim_data = &mut data_stores.backdrop[data_handle];
+ let spatial_node_index = prim_data.kind.spatial_node_index;
+
+ // We cannot use the relative transform between the backdrop and the element because
+ // that doesn't take into account any projection transforms that both spatial nodes are children of.
+ // Instead, we first project from the element to the world space and get a flattened 2D bounding rect
+ // in the screen space, we then map this rect from the world space to the backdrop space to get the
+ // proper bounding box where the backdrop-filter needs to be processed.
+
+ let prim_to_world_mapper = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ spatial_node_index,
+ LayoutRect::max_rect(),
+ frame_context.spatial_tree,
+ );
+
+ // First map to the screen and get a flattened rect
+ let prim_rect = prim_to_world_mapper.map(&prim_data.kind.border_rect).unwrap_or_else(LayoutRect::zero);
+ // Backwards project the flattened rect onto the backdrop
+ let prim_rect = backdrop_to_world_mapper.unmap(&prim_rect).unwrap_or_else(LayoutRect::zero);
+
+ // TODO(aosmond): Is this safe? Updating the primitive size during
+ // frame building is usually problematic since scene building will cache
+ // the primitive information in the GPU already.
+ prim_data.common.prim_rect = prim_rect;
+ prim_instance.local_clip_rect = prim_rect;
+
+ // Update the cluster bounding rect now that we have the backdrop rect.
+ cluster.bounding_rect = cluster.bounding_rect.union(&prim_rect);
+ }
+ _ => {
+ panic!("BUG: unexpected deferred primitive kind for cluster updates");
+ }
+ }
+ }
+ }
+
+ // Map the cluster bounding rect into the space of the surface, and
+ // include it in the surface bounding rect.
+ let surface = state.current_surface_mut();
+ surface.map_local_to_surface.set_target_spatial_node(
+ cluster.spatial_node_index,
+ frame_context.spatial_tree,
+ );
+
+ // Mark the cluster visible, since it passed the invertible and
+ // backface checks. In future, this will include spatial clustering
+ // which will allow the frame building code to skip most of the
+ // current per-primitive culling code.
+ cluster.flags.insert(ClusterFlags::IS_VISIBLE);
+ if let Some(cluster_rect) = surface.map_local_to_surface.map(&cluster.bounding_rect) {
+ surface.rect = surface.rect.union(&cluster_rect);
+ }
+ }
+
+ // If this picture establishes a surface, then map the surface bounding
+ // rect into the parent surface coordinate space, and propagate that up
+ // to the parent.
+ if let Some(ref mut raster_config) = self.raster_config {
+ let surface = state.current_surface_mut();
+ // Inflate the local bounding rect if required by the filter effect.
+ // This inflaction factor is to be applied to the surface itself.
+ if self.options.inflate_if_required {
+ surface.rect = raster_config.composite_mode.inflate_picture_rect(surface.rect, surface.scale_factors);
+
+ // The picture's local rect is calculated as the union of the
+ // snapped primitive rects, which should result in a snapped
+ // local rect, unless it was inflated. This is also done during
+ // update visibility when calculating the picture's precise
+ // local rect.
+ let snap_surface_to_raster = SpaceSnapper::new_with_target(
+ surface.raster_spatial_node_index,
+ self.spatial_node_index,
+ surface.device_pixel_scale,
+ frame_context.spatial_tree,
+ );
+
+ surface.rect = snap_surface_to_raster.snap_rect(&surface.rect);
+ }
+
+ let mut surface_rect = surface.rect * Scale::new(1.0);
+
+ // Pop this surface from the stack
+ let surface_index = state.pop_surface();
+ debug_assert_eq!(surface_index, raster_config.surface_index);
+
+ // Check if any of the surfaces can't be rasterized in local space but want to.
+ if raster_config.establishes_raster_root
+ && (surface_rect.size.width > MAX_SURFACE_SIZE
+ || surface_rect.size.height > MAX_SURFACE_SIZE)
+ && frame_context.debug_flags.contains(DebugFlags::DISABLE_RASTER_ROOT_SCALING)
+ {
+ raster_config.establishes_raster_root = false;
+ state.are_raster_roots_assigned = false;
+ }
+
+ // Set the estimated and precise local rects. The precise local rect
+ // may be changed again during frame visibility.
+ self.estimated_local_rect = surface_rect;
+ self.precise_local_rect = surface_rect;
+
+ // Drop shadows draw both a content and shadow rect, so need to expand the local
+ // rect of any surfaces to be composited in parent surfaces correctly.
+ match raster_config.composite_mode {
+ PictureCompositeMode::Filter(Filter::DropShadows(ref shadows)) => {
+ for shadow in shadows {
+ let shadow_rect = self.estimated_local_rect.translate(shadow.offset);
+ surface_rect = surface_rect.union(&shadow_rect);
+ }
+ }
+ _ => {}
+ }
+
+ // Propagate up to parent surface, now that we know this surface's static rect
+ let parent_surface = state.current_surface_mut();
+ parent_surface.map_local_to_surface.set_target_spatial_node(
+ self.spatial_node_index,
+ frame_context.spatial_tree,
+ );
+ if let Some(parent_surface_rect) = parent_surface
+ .map_local_to_surface
+ .map(&surface_rect)
+ {
+ parent_surface.rect = parent_surface.rect.union(&parent_surface_rect);
+ }
+ }
+ }
+
+ pub fn prepare_for_render(
+ &mut self,
+ frame_context: &FrameBuildingContext,
+ frame_state: &mut FrameBuildingState,
+ data_stores: &mut DataStores,
+ ) -> bool {
+ let mut pic_state_for_children = self.take_state();
+
+ if let Some(ref mut splitter) = pic_state_for_children.plane_splitter {
+ self.resolve_split_planes(
+ splitter,
+ &mut frame_state.gpu_cache,
+ &frame_context.spatial_tree,
+ );
+ }
+
+ let raster_config = match self.raster_config {
+ Some(ref mut raster_config) => raster_config,
+ None => {
+ return true
+ }
+ };
+
+ // TODO(gw): Almost all of the Picture types below use extra_gpu_cache_data
+ // to store the same type of data. The exception is the filter
+ // with a ColorMatrix, which stores the color matrix here. It's
+ // probably worth tidying this code up to be a bit more consistent.
+ // Perhaps store the color matrix after the common data, even though
+ // it's not used by that shader.
+
+ match raster_config.composite_mode {
+ PictureCompositeMode::TileCache { .. } => {}
+ PictureCompositeMode::Filter(Filter::Blur(..)) => {}
+ PictureCompositeMode::Filter(Filter::DropShadows(ref shadows)) => {
+ self.extra_gpu_data_handles.resize(shadows.len(), GpuCacheHandle::new());
+ for (shadow, extra_handle) in shadows.iter().zip(self.extra_gpu_data_handles.iter_mut()) {
+ if let Some(mut request) = frame_state.gpu_cache.request(extra_handle) {
+ // Basic brush primitive header is (see end of prepare_prim_for_render_inner in prim_store.rs)
+ // [brush specific data]
+ // [segment_rect, segment data]
+ let shadow_rect = self.precise_local_rect.translate(shadow.offset);
+
+ // ImageBrush colors
+ request.push(shadow.color.premultiplied());
+ request.push(PremultipliedColorF::WHITE);
+ request.push([
+ self.precise_local_rect.size.width,
+ self.precise_local_rect.size.height,
+ 0.0,
+ 0.0,
+ ]);
+
+ // segment rect / extra data
+ request.push(shadow_rect);
+ request.push([0.0, 0.0, 0.0, 0.0]);
+ }
+ }
+ }
+ PictureCompositeMode::MixBlend(..) if !frame_context.fb_config.gpu_supports_advanced_blend => {}
+ PictureCompositeMode::Filter(ref filter) => {
+ match *filter {
+ Filter::ColorMatrix(ref m) => {
+ if self.extra_gpu_data_handles.is_empty() {
+ self.extra_gpu_data_handles.push(GpuCacheHandle::new());
+ }
+ if let Some(mut request) = frame_state.gpu_cache.request(&mut self.extra_gpu_data_handles[0]) {
+ for i in 0..5 {
+ request.push([m[i*4], m[i*4+1], m[i*4+2], m[i*4+3]]);
+ }
+ }
+ }
+ Filter::Flood(ref color) => {
+ if self.extra_gpu_data_handles.is_empty() {
+ self.extra_gpu_data_handles.push(GpuCacheHandle::new());
+ }
+ if let Some(mut request) = frame_state.gpu_cache.request(&mut self.extra_gpu_data_handles[0]) {
+ request.push(color.to_array());
+ }
+ }
+ _ => {}
+ }
+ }
+ PictureCompositeMode::ComponentTransferFilter(handle) => {
+ let filter_data = &mut data_stores.filter_data[handle];
+ filter_data.update(frame_state);
+ }
+ PictureCompositeMode::MixBlend(..) |
+ PictureCompositeMode::Blit(_) |
+ PictureCompositeMode::SvgFilter(..) => {}
+ }
+
+ true
+ }
+}
+
+// Calculate a single homogeneous screen-space UV for a picture.
+fn calculate_screen_uv(
+ local_pos: &PicturePoint,
+ transform: &PictureToRasterTransform,
+ rendered_rect: &DeviceRect,
+ device_pixel_scale: DevicePixelScale,
+) -> DeviceHomogeneousVector {
+ let raster_pos = transform.transform_point2d_homogeneous(*local_pos);
+
+ DeviceHomogeneousVector::new(
+ (raster_pos.x * device_pixel_scale.0 - rendered_rect.origin.x * raster_pos.w) / rendered_rect.size.width,
+ (raster_pos.y * device_pixel_scale.0 - rendered_rect.origin.y * raster_pos.w) / rendered_rect.size.height,
+ 0.0,
+ raster_pos.w,
+ )
+}
+
+// Calculate a UV rect within an image based on the screen space
+// vertex positions of a picture.
+fn calculate_uv_rect_kind(
+ pic_rect: &PictureRect,
+ transform: &PictureToRasterTransform,
+ rendered_rect: &DeviceIntRect,
+ device_pixel_scale: DevicePixelScale,
+) -> UvRectKind {
+ let rendered_rect = rendered_rect.to_f32();
+
+ let top_left = calculate_screen_uv(
+ &pic_rect.origin,
+ transform,
+ &rendered_rect,
+ device_pixel_scale,
+ );
+
+ let top_right = calculate_screen_uv(
+ &pic_rect.top_right(),
+ transform,
+ &rendered_rect,
+ device_pixel_scale,
+ );
+
+ let bottom_left = calculate_screen_uv(
+ &pic_rect.bottom_left(),
+ transform,
+ &rendered_rect,
+ device_pixel_scale,
+ );
+
+ let bottom_right = calculate_screen_uv(
+ &pic_rect.bottom_right(),
+ transform,
+ &rendered_rect,
+ device_pixel_scale,
+ );
+
+ UvRectKind::Quad {
+ top_left,
+ top_right,
+ bottom_left,
+ bottom_right,
+ }
+}
+
+fn create_raster_mappers(
+ surface_spatial_node_index: SpatialNodeIndex,
+ raster_spatial_node_index: SpatialNodeIndex,
+ world_rect: WorldRect,
+ spatial_tree: &SpatialTree,
+) -> (SpaceMapper<RasterPixel, WorldPixel>, SpaceMapper<PicturePixel, RasterPixel>) {
+ let map_raster_to_world = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ raster_spatial_node_index,
+ world_rect,
+ spatial_tree,
+ );
+
+ let raster_bounds = map_raster_to_world.unmap(&world_rect)
+ .unwrap_or_else(RasterRect::max_rect);
+
+ let map_pic_to_raster = SpaceMapper::new_with_target(
+ raster_spatial_node_index,
+ surface_spatial_node_index,
+ raster_bounds,
+ spatial_tree,
+ );
+
+ (map_raster_to_world, map_pic_to_raster)
+}
+
+fn get_transform_key(
+ spatial_node_index: SpatialNodeIndex,
+ cache_spatial_node_index: SpatialNodeIndex,
+ spatial_tree: &SpatialTree,
+) -> TransformKey {
+ // Note: this is the only place where we don't know beforehand if the tile-affecting
+ // spatial node is below or above the current picture.
+ let transform = if cache_spatial_node_index >= spatial_node_index {
+ spatial_tree
+ .get_relative_transform(
+ cache_spatial_node_index,
+ spatial_node_index,
+ )
+ } else {
+ spatial_tree
+ .get_relative_transform(
+ spatial_node_index,
+ cache_spatial_node_index,
+ )
+ };
+ transform.into()
+}
+
+/// A key for storing primitive comparison results during tile dependency tests.
+#[derive(Debug, Copy, Clone, Eq, Hash, PartialEq)]
+struct PrimitiveComparisonKey {
+ prev_index: PrimitiveDependencyIndex,
+ curr_index: PrimitiveDependencyIndex,
+}
+
+/// Information stored an image dependency
+#[derive(Debug, Copy, Clone, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ImageDependency {
+ pub key: ImageKey,
+ pub generation: ImageGeneration,
+}
+
+impl ImageDependency {
+ pub const INVALID: ImageDependency = ImageDependency {
+ key: ImageKey::DUMMY,
+ generation: ImageGeneration::INVALID,
+ };
+}
+
+/// A helper struct to compare a primitive and all its sub-dependencies.
+struct PrimitiveComparer<'a> {
+ clip_comparer: CompareHelper<'a, ItemUid>,
+ transform_comparer: CompareHelper<'a, SpatialNodeKey>,
+ image_comparer: CompareHelper<'a, ImageDependency>,
+ opacity_comparer: CompareHelper<'a, OpacityBinding>,
+ color_comparer: CompareHelper<'a, ColorBinding>,
+ resource_cache: &'a ResourceCache,
+ spatial_node_comparer: &'a mut SpatialNodeComparer,
+ opacity_bindings: &'a FastHashMap<PropertyBindingId, OpacityBindingInfo>,
+ color_bindings: &'a FastHashMap<PropertyBindingId, ColorBindingInfo>,
+}
+
+impl<'a> PrimitiveComparer<'a> {
+ fn new(
+ prev: &'a TileDescriptor,
+ curr: &'a TileDescriptor,
+ resource_cache: &'a ResourceCache,
+ spatial_node_comparer: &'a mut SpatialNodeComparer,
+ opacity_bindings: &'a FastHashMap<PropertyBindingId, OpacityBindingInfo>,
+ color_bindings: &'a FastHashMap<PropertyBindingId, ColorBindingInfo>,
+ ) -> Self {
+ let clip_comparer = CompareHelper::new(
+ &prev.clips,
+ &curr.clips,
+ );
+
+ let transform_comparer = CompareHelper::new(
+ &prev.transforms,
+ &curr.transforms,
+ );
+
+ let image_comparer = CompareHelper::new(
+ &prev.images,
+ &curr.images,
+ );
+
+ let opacity_comparer = CompareHelper::new(
+ &prev.opacity_bindings,
+ &curr.opacity_bindings,
+ );
+
+ let color_comparer = CompareHelper::new(
+ &prev.color_bindings,
+ &curr.color_bindings,
+ );
+
+ PrimitiveComparer {
+ clip_comparer,
+ transform_comparer,
+ image_comparer,
+ opacity_comparer,
+ color_comparer,
+ resource_cache,
+ spatial_node_comparer,
+ opacity_bindings,
+ color_bindings,
+ }
+ }
+
+ fn reset(&mut self) {
+ self.clip_comparer.reset();
+ self.transform_comparer.reset();
+ self.image_comparer.reset();
+ self.opacity_comparer.reset();
+ self.color_comparer.reset();
+ }
+
+ fn advance_prev(&mut self, prim: &PrimitiveDescriptor) {
+ self.clip_comparer.advance_prev(prim.clip_dep_count);
+ self.transform_comparer.advance_prev(prim.transform_dep_count);
+ self.image_comparer.advance_prev(prim.image_dep_count);
+ self.opacity_comparer.advance_prev(prim.opacity_binding_dep_count);
+ self.color_comparer.advance_prev(prim.color_binding_dep_count);
+ }
+
+ fn advance_curr(&mut self, prim: &PrimitiveDescriptor) {
+ self.clip_comparer.advance_curr(prim.clip_dep_count);
+ self.transform_comparer.advance_curr(prim.transform_dep_count);
+ self.image_comparer.advance_curr(prim.image_dep_count);
+ self.opacity_comparer.advance_curr(prim.opacity_binding_dep_count);
+ self.color_comparer.advance_curr(prim.color_binding_dep_count);
+ }
+
+ /// Check if two primitive descriptors are the same.
+ fn compare_prim(
+ &mut self,
+ prev: &PrimitiveDescriptor,
+ curr: &PrimitiveDescriptor,
+ opt_detail: Option<&mut PrimitiveCompareResultDetail>,
+ ) -> PrimitiveCompareResult {
+ let resource_cache = self.resource_cache;
+ let spatial_node_comparer = &mut self.spatial_node_comparer;
+ let opacity_bindings = self.opacity_bindings;
+ let color_bindings = self.color_bindings;
+
+ // Check equality of the PrimitiveDescriptor
+ if prev != curr {
+ if let Some(detail) = opt_detail {
+ *detail = PrimitiveCompareResultDetail::Descriptor{ old: *prev, new: *curr };
+ }
+ return PrimitiveCompareResult::Descriptor;
+ }
+
+ // Check if any of the clips this prim has are different.
+ let mut clip_result = CompareHelperResult::Equal;
+ if !self.clip_comparer.is_same(
+ prev.clip_dep_count,
+ curr.clip_dep_count,
+ |prev, curr| {
+ prev == curr
+ },
+ if opt_detail.is_some() { Some(&mut clip_result) } else { None }
+ ) {
+ if let Some(detail) = opt_detail { *detail = PrimitiveCompareResultDetail::Clip{ detail: clip_result }; }
+ return PrimitiveCompareResult::Clip;
+ }
+
+ // Check if any of the transforms this prim has are different.
+ let mut transform_result = CompareHelperResult::Equal;
+ if !self.transform_comparer.is_same(
+ prev.transform_dep_count,
+ curr.transform_dep_count,
+ |prev, curr| {
+ spatial_node_comparer.are_transforms_equivalent(prev, curr)
+ },
+ if opt_detail.is_some() { Some(&mut transform_result) } else { None },
+ ) {
+ if let Some(detail) = opt_detail {
+ *detail = PrimitiveCompareResultDetail::Transform{ detail: transform_result };
+ }
+ return PrimitiveCompareResult::Transform;
+ }
+
+ // Check if any of the images this prim has are different.
+ let mut image_result = CompareHelperResult::Equal;
+ if !self.image_comparer.is_same(
+ prev.image_dep_count,
+ curr.image_dep_count,
+ |prev, curr| {
+ prev == curr &&
+ resource_cache.get_image_generation(curr.key) == curr.generation
+ },
+ if opt_detail.is_some() { Some(&mut image_result) } else { None },
+ ) {
+ if let Some(detail) = opt_detail {
+ *detail = PrimitiveCompareResultDetail::Image{ detail: image_result };
+ }
+ return PrimitiveCompareResult::Image;
+ }
+
+ // Check if any of the opacity bindings this prim has are different.
+ let mut bind_result = CompareHelperResult::Equal;
+ if !self.opacity_comparer.is_same(
+ prev.opacity_binding_dep_count,
+ curr.opacity_binding_dep_count,
+ |prev, curr| {
+ if prev != curr {
+ return false;
+ }
+
+ if let OpacityBinding::Binding(id) = curr {
+ if opacity_bindings
+ .get(id)
+ .map_or(true, |info| info.changed) {
+ return false;
+ }
+ }
+
+ true
+ },
+ if opt_detail.is_some() { Some(&mut bind_result) } else { None },
+ ) {
+ if let Some(detail) = opt_detail {
+ *detail = PrimitiveCompareResultDetail::OpacityBinding{ detail: bind_result };
+ }
+ return PrimitiveCompareResult::OpacityBinding;
+ }
+
+ // Check if any of the color bindings this prim has are different.
+ let mut bind_result = CompareHelperResult::Equal;
+ if !self.color_comparer.is_same(
+ prev.color_binding_dep_count,
+ curr.color_binding_dep_count,
+ |prev, curr| {
+ if prev != curr {
+ return false;
+ }
+
+ if let ColorBinding::Binding(id) = curr {
+ if color_bindings
+ .get(id)
+ .map_or(true, |info| info.changed) {
+ return false;
+ }
+ }
+
+ true
+ },
+ if opt_detail.is_some() { Some(&mut bind_result) } else { None },
+ ) {
+ if let Some(detail) = opt_detail {
+ *detail = PrimitiveCompareResultDetail::ColorBinding{ detail: bind_result };
+ }
+ return PrimitiveCompareResult::ColorBinding;
+ }
+
+ PrimitiveCompareResult::Equal
+ }
+}
+
+/// Details for a node in a quadtree that tracks dirty rects for a tile.
+#[cfg_attr(any(feature="capture",feature="replay"), derive(Clone))]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum TileNodeKind {
+ Leaf {
+ /// The index buffer of primitives that affected this tile previous frame
+ #[cfg_attr(any(feature = "capture", feature = "replay"), serde(skip))]
+ prev_indices: Vec<PrimitiveDependencyIndex>,
+ /// The index buffer of primitives that affect this tile on this frame
+ #[cfg_attr(any(feature = "capture", feature = "replay"), serde(skip))]
+ curr_indices: Vec<PrimitiveDependencyIndex>,
+ /// A bitset of which of the last 64 frames have been dirty for this leaf.
+ #[cfg_attr(any(feature = "capture", feature = "replay"), serde(skip))]
+ dirty_tracker: u64,
+ /// The number of frames since this node split or merged.
+ #[cfg_attr(any(feature = "capture", feature = "replay"), serde(skip))]
+ frames_since_modified: usize,
+ },
+ Node {
+ /// The four children of this node
+ children: Vec<TileNode>,
+ },
+}
+
+/// The kind of modification that a tile wants to do
+#[derive(Copy, Clone, PartialEq, Debug)]
+enum TileModification {
+ Split,
+ Merge,
+}
+
+/// A node in the dirty rect tracking quadtree.
+#[cfg_attr(any(feature="capture",feature="replay"), derive(Clone))]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct TileNode {
+ /// Leaf or internal node
+ pub kind: TileNodeKind,
+ /// Rect of this node in the same space as the tile cache picture
+ pub rect: PictureBox2D,
+}
+
+impl TileNode {
+ /// Construct a new leaf node, with the given primitive dependency index buffer
+ fn new_leaf(curr_indices: Vec<PrimitiveDependencyIndex>) -> Self {
+ TileNode {
+ kind: TileNodeKind::Leaf {
+ prev_indices: Vec::new(),
+ curr_indices,
+ dirty_tracker: 0,
+ frames_since_modified: 0,
+ },
+ rect: PictureBox2D::zero(),
+ }
+ }
+
+ /// Draw debug information about this tile node
+ fn draw_debug_rects(
+ &self,
+ pic_to_world_mapper: &SpaceMapper<PicturePixel, WorldPixel>,
+ is_opaque: bool,
+ local_valid_rect: PictureRect,
+ scratch: &mut PrimitiveScratchBuffer,
+ global_device_pixel_scale: DevicePixelScale,
+ ) {
+ match self.kind {
+ TileNodeKind::Leaf { dirty_tracker, .. } => {
+ let color = if (dirty_tracker & 1) != 0 {
+ debug_colors::RED
+ } else if is_opaque {
+ debug_colors::GREEN
+ } else {
+ debug_colors::YELLOW
+ };
+
+ if let Some(local_rect) = local_valid_rect.intersection(&self.rect.to_rect()) {
+ let world_rect = pic_to_world_mapper
+ .map(&local_rect)
+ .unwrap();
+ let device_rect = world_rect * global_device_pixel_scale;
+
+ let outer_color = color.scale_alpha(0.3);
+ let inner_color = outer_color.scale_alpha(0.5);
+ scratch.push_debug_rect(
+ device_rect.inflate(-3.0, -3.0),
+ outer_color,
+ inner_color
+ );
+ }
+ }
+ TileNodeKind::Node { ref children, .. } => {
+ for child in children.iter() {
+ child.draw_debug_rects(
+ pic_to_world_mapper,
+ is_opaque,
+ local_valid_rect,
+ scratch,
+ global_device_pixel_scale,
+ );
+ }
+ }
+ }
+ }
+
+ /// Calculate the four child rects for a given node
+ fn get_child_rects(
+ rect: &PictureBox2D,
+ result: &mut [PictureBox2D; 4],
+ ) {
+ let p0 = rect.min;
+ let p1 = rect.max;
+ let pc = p0 + rect.size() * 0.5;
+
+ *result = [
+ PictureBox2D::new(
+ p0,
+ pc,
+ ),
+ PictureBox2D::new(
+ PicturePoint::new(pc.x, p0.y),
+ PicturePoint::new(p1.x, pc.y),
+ ),
+ PictureBox2D::new(
+ PicturePoint::new(p0.x, pc.y),
+ PicturePoint::new(pc.x, p1.y),
+ ),
+ PictureBox2D::new(
+ pc,
+ p1,
+ ),
+ ];
+ }
+
+ /// Called during pre_update, to clear the current dependencies
+ fn clear(
+ &mut self,
+ rect: PictureBox2D,
+ ) {
+ self.rect = rect;
+
+ match self.kind {
+ TileNodeKind::Leaf { ref mut prev_indices, ref mut curr_indices, ref mut dirty_tracker, ref mut frames_since_modified } => {
+ // Swap current dependencies to be the previous frame
+ mem::swap(prev_indices, curr_indices);
+ curr_indices.clear();
+ // Note that another frame has passed in the dirty bit trackers
+ *dirty_tracker = *dirty_tracker << 1;
+ *frames_since_modified += 1;
+ }
+ TileNodeKind::Node { ref mut children, .. } => {
+ let mut child_rects = [PictureBox2D::zero(); 4];
+ TileNode::get_child_rects(&rect, &mut child_rects);
+ assert_eq!(child_rects.len(), children.len());
+
+ for (child, rect) in children.iter_mut().zip(child_rects.iter()) {
+ child.clear(*rect);
+ }
+ }
+ }
+ }
+
+ /// Add a primitive dependency to this node
+ fn add_prim(
+ &mut self,
+ index: PrimitiveDependencyIndex,
+ prim_rect: &PictureBox2D,
+ ) {
+ match self.kind {
+ TileNodeKind::Leaf { ref mut curr_indices, .. } => {
+ curr_indices.push(index);
+ }
+ TileNodeKind::Node { ref mut children, .. } => {
+ for child in children.iter_mut() {
+ if child.rect.intersects(prim_rect) {
+ child.add_prim(index, prim_rect);
+ }
+ }
+ }
+ }
+ }
+
+ /// Apply a merge or split operation to this tile, if desired
+ fn maybe_merge_or_split(
+ &mut self,
+ level: i32,
+ curr_prims: &[PrimitiveDescriptor],
+ max_split_levels: i32,
+ ) {
+ // Determine if this tile wants to split or merge
+ let mut tile_mod = None;
+
+ fn get_dirty_frames(
+ dirty_tracker: u64,
+ frames_since_modified: usize,
+ ) -> Option<u32> {
+ // Only consider splitting or merging at least 64 frames since we last changed
+ if frames_since_modified > 64 {
+ // Each bit in the tracker is a frame that was recently invalidated
+ Some(dirty_tracker.count_ones())
+ } else {
+ None
+ }
+ }
+
+ match self.kind {
+ TileNodeKind::Leaf { dirty_tracker, frames_since_modified, .. } => {
+ // Only consider splitting if the tree isn't too deep.
+ if level < max_split_levels {
+ if let Some(dirty_frames) = get_dirty_frames(dirty_tracker, frames_since_modified) {
+ // If the tile has invalidated > 50% of the recent number of frames, split.
+ if dirty_frames > 32 {
+ tile_mod = Some(TileModification::Split);
+ }
+ }
+ }
+ }
+ TileNodeKind::Node { ref children, .. } => {
+ // There's two conditions that cause a node to merge its children:
+ // (1) If _all_ the child nodes are constantly invalidating, then we are wasting
+ // CPU time tracking dependencies for each child, so merge them.
+ // (2) If _none_ of the child nodes are recently invalid, then the page content
+ // has probably changed, and we no longer need to track fine grained dependencies here.
+
+ let mut static_count = 0;
+ let mut changing_count = 0;
+
+ for child in children {
+ // Only consider merging nodes at the edge of the tree.
+ if let TileNodeKind::Leaf { dirty_tracker, frames_since_modified, .. } = child.kind {
+ if let Some(dirty_frames) = get_dirty_frames(dirty_tracker, frames_since_modified) {
+ if dirty_frames == 0 {
+ // Hasn't been invalidated for some time
+ static_count += 1;
+ } else if dirty_frames == 64 {
+ // Is constantly being invalidated
+ changing_count += 1;
+ }
+ }
+ }
+
+ // Only merge if all the child tiles are in agreement. Otherwise, we have some
+ // that are invalidating / static, and it's worthwhile tracking dependencies for
+ // them individually.
+ if static_count == 4 || changing_count == 4 {
+ tile_mod = Some(TileModification::Merge);
+ }
+ }
+ }
+ }
+
+ match tile_mod {
+ Some(TileModification::Split) => {
+ // To split a node, take the current dependency index buffer for this node, and
+ // split it into child index buffers.
+ let curr_indices = match self.kind {
+ TileNodeKind::Node { .. } => {
+ unreachable!("bug - only leaves can split");
+ }
+ TileNodeKind::Leaf { ref mut curr_indices, .. } => {
+ curr_indices.take()
+ }
+ };
+
+ let mut child_rects = [PictureBox2D::zero(); 4];
+ TileNode::get_child_rects(&self.rect, &mut child_rects);
+
+ let mut child_indices = [
+ Vec::new(),
+ Vec::new(),
+ Vec::new(),
+ Vec::new(),
+ ];
+
+ // Step through the index buffer, and add primitives to each of the children
+ // that they intersect.
+ for index in curr_indices {
+ let prim = &curr_prims[index.0 as usize];
+ for (child_rect, indices) in child_rects.iter().zip(child_indices.iter_mut()) {
+ if prim.prim_clip_box.intersects(child_rect) {
+ indices.push(index);
+ }
+ }
+ }
+
+ // Create the child nodes and switch from leaf -> node.
+ let children = child_indices
+ .iter_mut()
+ .map(|i| TileNode::new_leaf(mem::replace(i, Vec::new())))
+ .collect();
+
+ self.kind = TileNodeKind::Node {
+ children,
+ };
+ }
+ Some(TileModification::Merge) => {
+ // Construct a merged index buffer by collecting the dependency index buffers
+ // from each child, and merging them into a de-duplicated index buffer.
+ let merged_indices = match self.kind {
+ TileNodeKind::Node { ref mut children, .. } => {
+ let mut merged_indices = Vec::new();
+
+ for child in children.iter() {
+ let child_indices = match child.kind {
+ TileNodeKind::Leaf { ref curr_indices, .. } => {
+ curr_indices
+ }
+ TileNodeKind::Node { .. } => {
+ unreachable!("bug: child is not a leaf");
+ }
+ };
+ merged_indices.extend_from_slice(child_indices);
+ }
+
+ merged_indices.sort();
+ merged_indices.dedup();
+
+ merged_indices
+ }
+ TileNodeKind::Leaf { .. } => {
+ unreachable!("bug - trying to merge a leaf");
+ }
+ };
+
+ // Switch from a node to a leaf, with the combined index buffer
+ self.kind = TileNodeKind::Leaf {
+ prev_indices: Vec::new(),
+ curr_indices: merged_indices,
+ dirty_tracker: 0,
+ frames_since_modified: 0,
+ };
+ }
+ None => {
+ // If this node didn't merge / split, then recurse into children
+ // to see if they want to split / merge.
+ if let TileNodeKind::Node { ref mut children, .. } = self.kind {
+ for child in children.iter_mut() {
+ child.maybe_merge_or_split(
+ level+1,
+ curr_prims,
+ max_split_levels,
+ );
+ }
+ }
+ }
+ }
+ }
+
+ /// Update the dirty state of this node, building the overall dirty rect
+ fn update_dirty_rects(
+ &mut self,
+ prev_prims: &[PrimitiveDescriptor],
+ curr_prims: &[PrimitiveDescriptor],
+ prim_comparer: &mut PrimitiveComparer,
+ dirty_rect: &mut PictureBox2D,
+ compare_cache: &mut FastHashMap<PrimitiveComparisonKey, PrimitiveCompareResult>,
+ invalidation_reason: &mut Option<InvalidationReason>,
+ frame_context: &FrameVisibilityContext,
+ ) {
+ match self.kind {
+ TileNodeKind::Node { ref mut children, .. } => {
+ for child in children.iter_mut() {
+ child.update_dirty_rects(
+ prev_prims,
+ curr_prims,
+ prim_comparer,
+ dirty_rect,
+ compare_cache,
+ invalidation_reason,
+ frame_context,
+ );
+ }
+ }
+ TileNodeKind::Leaf { ref prev_indices, ref curr_indices, ref mut dirty_tracker, .. } => {
+ // If the index buffers are of different length, they must be different
+ if prev_indices.len() == curr_indices.len() {
+ let mut prev_i0 = 0;
+ let mut prev_i1 = 0;
+ prim_comparer.reset();
+
+ // Walk each index buffer, comparing primitives
+ for (prev_index, curr_index) in prev_indices.iter().zip(curr_indices.iter()) {
+ let i0 = prev_index.0 as usize;
+ let i1 = curr_index.0 as usize;
+
+ // Advance the dependency arrays for each primitive (this handles
+ // prims that may be skipped by these index buffers).
+ for i in prev_i0 .. i0 {
+ prim_comparer.advance_prev(&prev_prims[i]);
+ }
+ for i in prev_i1 .. i1 {
+ prim_comparer.advance_curr(&curr_prims[i]);
+ }
+
+ // Compare the primitives, caching the result in a hash map
+ // to save comparisons in other tree nodes.
+ let key = PrimitiveComparisonKey {
+ prev_index: *prev_index,
+ curr_index: *curr_index,
+ };
+
+ #[cfg(any(feature = "capture", feature = "replay"))]
+ let mut compare_detail = PrimitiveCompareResultDetail::Equal;
+ #[cfg(any(feature = "capture", feature = "replay"))]
+ let prim_compare_result_detail =
+ if frame_context.debug_flags.contains(DebugFlags::TILE_CACHE_LOGGING_DBG) {
+ Some(&mut compare_detail)
+ } else {
+ None
+ };
+
+ #[cfg(not(any(feature = "capture", feature = "replay")))]
+ let compare_detail = PrimitiveCompareResultDetail::Equal;
+ #[cfg(not(any(feature = "capture", feature = "replay")))]
+ let prim_compare_result_detail = None;
+
+ let prim_compare_result = *compare_cache
+ .entry(key)
+ .or_insert_with(|| {
+ let prev = &prev_prims[i0];
+ let curr = &curr_prims[i1];
+ prim_comparer.compare_prim(prev, curr, prim_compare_result_detail)
+ });
+
+ // If not the same, mark this node as dirty and update the dirty rect
+ if prim_compare_result != PrimitiveCompareResult::Equal {
+ if invalidation_reason.is_none() {
+ *invalidation_reason = Some(InvalidationReason::Content {
+ prim_compare_result,
+ prim_compare_result_detail: Some(compare_detail)
+ });
+ }
+ *dirty_rect = self.rect.union(dirty_rect);
+ *dirty_tracker = *dirty_tracker | 1;
+ break;
+ }
+
+ prev_i0 = i0;
+ prev_i1 = i1;
+ }
+ } else {
+ if invalidation_reason.is_none() {
+ // if and only if tile logging is enabled, do the expensive step of
+ // converting indices back to ItemUids and allocating old and new vectors
+ // to store them in.
+ #[cfg(any(feature = "capture", feature = "replay"))]
+ {
+ if frame_context.debug_flags.contains(DebugFlags::TILE_CACHE_LOGGING_DBG) {
+ let old = prev_indices.iter().map( |i| prev_prims[i.0 as usize].prim_uid ).collect();
+ let new = curr_indices.iter().map( |i| curr_prims[i.0 as usize].prim_uid ).collect();
+ *invalidation_reason = Some(InvalidationReason::PrimCount {
+ old: Some(old),
+ new: Some(new) });
+ } else {
+ *invalidation_reason = Some(InvalidationReason::PrimCount {
+ old: None,
+ new: None });
+ }
+ }
+ #[cfg(not(any(feature = "capture", feature = "replay")))]
+ {
+ *invalidation_reason = Some(InvalidationReason::PrimCount {
+ old: None,
+ new: None });
+ }
+ }
+ *dirty_rect = self.rect.union(dirty_rect);
+ *dirty_tracker = *dirty_tracker | 1;
+ }
+ }
+ }
+ }
+}
+
+impl CompositeState {
+ // A helper function to destroy all native surfaces for a given list of tiles
+ pub fn destroy_native_tiles<'a, I: Iterator<Item = &'a mut Box<Tile>>>(
+ &mut self,
+ tiles_iter: I,
+ resource_cache: &mut ResourceCache,
+ ) {
+ // Any old tiles that remain after the loop above are going to be dropped. For
+ // simple composite mode, the texture cache handle will expire and be collected
+ // by the texture cache. For native compositor mode, we need to explicitly
+ // invoke a callback to the client to destroy that surface.
+ if let CompositorKind::Native { .. } = self.compositor_kind {
+ for tile in tiles_iter {
+ // Only destroy native surfaces that have been allocated. It's
+ // possible for display port tiles to be created that never
+ // come on screen, and thus never get a native surface allocated.
+ if let Some(TileSurface::Texture { descriptor: SurfaceTextureDescriptor::Native { ref mut id, .. }, .. }) = tile.surface {
+ if let Some(id) = id.take() {
+ resource_cache.destroy_compositor_tile(id);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/src/platform/macos/font.rs b/third_party/webrender/webrender/src/platform/macos/font.rs
new file mode 100644
index 00000000000..437522d5e9e
--- /dev/null
+++ b/third_party/webrender/webrender/src/platform/macos/font.rs
@@ -0,0 +1,854 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{ColorU, FontKey, FontRenderMode, FontSize, GlyphDimensions};
+use api::{FontInstanceFlags, FontVariation, NativeFontHandle};
+use core_foundation::array::{CFArray, CFArrayRef};
+use core_foundation::base::TCFType;
+use core_foundation::dictionary::CFDictionary;
+use core_foundation::number::{CFNumber, CFNumberRef};
+use core_foundation::string::{CFString, CFStringRef};
+use core_graphics::base::{kCGImageAlphaNoneSkipFirst, kCGImageAlphaPremultipliedFirst};
+use core_graphics::base::{kCGBitmapByteOrder32Little};
+use core_graphics::color_space::CGColorSpace;
+use core_graphics::context::CGContext;
+use core_graphics::context::{CGBlendMode, CGTextDrawingMode};
+use core_graphics::data_provider::CGDataProvider;
+use core_graphics::font::{CGFont, CGGlyph};
+use core_graphics::geometry::{CGAffineTransform, CGPoint, CGSize};
+use core_graphics::geometry::{CG_AFFINE_TRANSFORM_IDENTITY, CGRect};
+use core_text;
+use core_text::font::{CTFont, CTFontRef};
+use core_text::font_descriptor::{kCTFontDefaultOrientation, kCTFontColorGlyphsTrait};
+use euclid::default::Size2D;
+use crate::gamma_lut::{ColorLut, GammaLut};
+use crate::glyph_rasterizer::{FontInstance, FontTransform, GlyphKey};
+use crate::glyph_rasterizer::{GlyphFormat, GlyphRasterError, GlyphRasterResult, RasterizedGlyph};
+use crate::internal_types::{FastHashMap, ResourceCacheError};
+use std::collections::hash_map::Entry;
+use std::sync::Arc;
+
+const INITIAL_CG_CONTEXT_SIDE_LENGTH: u32 = 32;
+
+pub struct FontContext {
+ cg_fonts: FastHashMap<FontKey, CGFont>,
+ ct_fonts: FastHashMap<(FontKey, FontSize, Vec<FontVariation>), CTFont>,
+ #[allow(dead_code)]
+ graphics_context: GraphicsContext,
+ #[allow(dead_code)]
+ gamma_lut: GammaLut,
+}
+
+// core text is safe to use on multiple threads and non-shareable resources are
+// all hidden inside their font context.
+unsafe impl Send for FontContext {}
+
+struct GlyphMetrics {
+ rasterized_left: i32,
+ #[allow(dead_code)]
+ rasterized_descent: i32,
+ rasterized_ascent: i32,
+ rasterized_width: i32,
+ rasterized_height: i32,
+ advance: f32,
+}
+
+// According to the Skia source code, there's no public API to
+// determine if subpixel AA is supported. So jrmuizel ported
+// this function from Skia which is used to check if a glyph
+// can be rendered with subpixel AA.
+fn supports_subpixel_aa() -> bool {
+ let mut cg_context = CGContext::create_bitmap_context(
+ None,
+ 1,
+ 1,
+ 8,
+ 4,
+ &CGColorSpace::create_device_rgb(),
+ kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little,
+ );
+ let ct_font = core_text::font::new_from_name("Helvetica", 16.).unwrap();
+ cg_context.set_should_smooth_fonts(true);
+ cg_context.set_should_antialias(true);
+ cg_context.set_rgb_fill_color(1.0, 1.0, 1.0, 1.0);
+ let point = CGPoint { x: -1., y: 0. };
+ let glyph = '|' as CGGlyph;
+ ct_font.draw_glyphs(&[glyph], &[point], cg_context.clone());
+ let data = cg_context.data();
+ data[0] != data[1] || data[1] != data[2]
+}
+
+fn should_use_white_on_black(color: ColorU) -> bool {
+ let (r, g, b) = (color.r as u32, color.g as u32, color.b as u32);
+ // These thresholds were determined on 10.12 by observing what CG does.
+ r >= 85 && g >= 85 && b >= 85 && r + g + b >= 2 * 255
+}
+
+fn get_glyph_metrics(
+ ct_font: &CTFont,
+ transform: Option<&CGAffineTransform>,
+ glyph: CGGlyph,
+ x_offset: f64,
+ y_offset: f64,
+ extra_width: f64,
+) -> GlyphMetrics {
+ let mut bounds = ct_font.get_bounding_rects_for_glyphs(kCTFontDefaultOrientation, &[glyph]);
+
+ if bounds.origin.x.is_nan() || bounds.origin.y.is_nan() || bounds.size.width.is_nan() ||
+ bounds.size.height.is_nan()
+ {
+ // If an unexpected glyph index is requested, core text will return NaN values
+ // which causes us to do bad thing as the value is cast into an integer and
+ // overflow when expanding the bounds a few lines below.
+ // Instead we are better off returning zero-sized metrics because this special
+ // case is handled by the callers of this method.
+ return GlyphMetrics {
+ rasterized_left: 0,
+ rasterized_width: 0,
+ rasterized_height: 0,
+ rasterized_ascent: 0,
+ rasterized_descent: 0,
+ advance: 0.0,
+ };
+ }
+
+ let mut advance = CGSize { width: 0.0, height: 0.0 };
+ unsafe {
+ ct_font.get_advances_for_glyphs(kCTFontDefaultOrientation, &glyph, &mut advance, 1);
+ }
+
+ if bounds.size.width > 0.0 {
+ bounds.size.width += extra_width;
+ }
+ if advance.width > 0.0 {
+ advance.width += extra_width;
+ }
+
+ if let Some(transform) = transform {
+ bounds = bounds.apply_transform(transform);
+ }
+
+ // First round out to pixel boundaries
+ // CG Origin is bottom left
+ let mut left = bounds.origin.x.floor() as i32;
+ let mut bottom = bounds.origin.y.floor() as i32;
+ let mut right = (bounds.origin.x + bounds.size.width + x_offset).ceil() as i32;
+ let mut top = (bounds.origin.y + bounds.size.height + y_offset).ceil() as i32;
+
+ // Expand the bounds by 1 pixel, to give CG room for anti-aliasing.
+ // Note that this outset is to allow room for LCD smoothed glyphs. However, the correct outset
+ // is not currently known, as CG dilates the outlines by some percentage.
+ // This is taken from Skia.
+ left -= 1;
+ bottom -= 1;
+ right += 1;
+ top += 1;
+
+ let width = right - left;
+ let height = top - bottom;
+
+ GlyphMetrics {
+ rasterized_left: left,
+ rasterized_width: width,
+ rasterized_height: height,
+ rasterized_ascent: top,
+ rasterized_descent: -bottom,
+ advance: advance.width as f32,
+ }
+}
+
+#[link(name = "ApplicationServices", kind = "framework")]
+extern {
+ static kCTFontVariationAxisIdentifierKey: CFStringRef;
+ static kCTFontVariationAxisNameKey: CFStringRef;
+ static kCTFontVariationAxisMinimumValueKey: CFStringRef;
+ static kCTFontVariationAxisMaximumValueKey: CFStringRef;
+ static kCTFontVariationAxisDefaultValueKey: CFStringRef;
+
+ fn CTFontCopyVariationAxes(font: CTFontRef) -> CFArrayRef;
+}
+
+fn new_ct_font_with_variations(cg_font: &CGFont, size: f64, variations: &[FontVariation]) -> CTFont {
+ unsafe {
+ let ct_font = core_text::font::new_from_CGFont(cg_font, size);
+ if variations.is_empty() {
+ return ct_font;
+ }
+ let axes_ref = CTFontCopyVariationAxes(ct_font.as_concrete_TypeRef());
+ if axes_ref.is_null() {
+ return ct_font;
+ }
+ let axes: CFArray<CFDictionary> = TCFType::wrap_under_create_rule(axes_ref);
+ let mut vals: Vec<(CFString, CFNumber)> = Vec::with_capacity(variations.len() as usize);
+ for axis in axes.iter() {
+ if !axis.instance_of::<CFDictionary>() {
+ return ct_font;
+ }
+ let tag_val = match axis.find(kCTFontVariationAxisIdentifierKey as *const _) {
+ Some(tag_ptr) => {
+ let tag: CFNumber = TCFType::wrap_under_get_rule(*tag_ptr as CFNumberRef);
+ if !tag.instance_of::<CFNumber>() {
+ return ct_font;
+ }
+ match tag.to_i64() {
+ Some(val) => val,
+ None => return ct_font,
+ }
+ }
+ None => return ct_font,
+ };
+ let mut val = match variations.iter().find(|variation| (variation.tag as i64) == tag_val) {
+ Some(variation) => variation.value as f64,
+ None => continue,
+ };
+
+ let name: CFString = match axis.find(kCTFontVariationAxisNameKey as *const _) {
+ Some(name_ptr) => TCFType::wrap_under_get_rule(*name_ptr as CFStringRef),
+ None => return ct_font,
+ };
+ if !name.instance_of::<CFString>() {
+ return ct_font;
+ }
+
+ let min_val = match axis.find(kCTFontVariationAxisMinimumValueKey as *const _) {
+ Some(min_ptr) => {
+ let min: CFNumber = TCFType::wrap_under_get_rule(*min_ptr as CFNumberRef);
+ if !min.instance_of::<CFNumber>() {
+ return ct_font;
+ }
+ match min.to_f64() {
+ Some(val) => val,
+ None => return ct_font,
+ }
+ }
+ None => return ct_font,
+ };
+ let max_val = match axis.find(kCTFontVariationAxisMaximumValueKey as *const _) {
+ Some(max_ptr) => {
+ let max: CFNumber = TCFType::wrap_under_get_rule(*max_ptr as CFNumberRef);
+ if !max.instance_of::<CFNumber>() {
+ return ct_font;
+ }
+ match max.to_f64() {
+ Some(val) => val,
+ None => return ct_font,
+ }
+ }
+ None => return ct_font,
+ };
+ let def_val = match axis.find(kCTFontVariationAxisDefaultValueKey as *const _) {
+ Some(def_ptr) => {
+ let def: CFNumber = TCFType::wrap_under_get_rule(*def_ptr as CFNumberRef);
+ if !def.instance_of::<CFNumber>() {
+ return ct_font;
+ }
+ match def.to_f64() {
+ Some(val) => val,
+ None => return ct_font,
+ }
+ }
+ None => return ct_font,
+ };
+
+ val = val.max(min_val).min(max_val);
+ if val != def_val {
+ vals.push((name, CFNumber::from(val)));
+ }
+ }
+ if vals.is_empty() {
+ return ct_font;
+ }
+ let vals_dict = CFDictionary::from_CFType_pairs(&vals);
+ let cg_var_font = cg_font.create_copy_from_variations(&vals_dict).unwrap();
+ core_text::font::new_from_CGFont_with_variations(&cg_var_font, size, &vals_dict)
+ }
+}
+
+fn is_bitmap_font(ct_font: &CTFont) -> bool {
+ let traits = ct_font.symbolic_traits();
+ (traits & kCTFontColorGlyphsTrait) != 0
+}
+
+impl FontContext {
+ pub fn new() -> Result<FontContext, ResourceCacheError> {
+ debug!("Test for subpixel AA support: {}", supports_subpixel_aa());
+
+ // Force CG to use sRGB color space to gamma correct.
+ let contrast = 0.0;
+ let gamma = 0.0;
+
+ Ok(FontContext {
+ cg_fonts: FastHashMap::default(),
+ ct_fonts: FastHashMap::default(),
+ graphics_context: GraphicsContext::new(),
+ gamma_lut: GammaLut::new(contrast, gamma, gamma),
+ })
+ }
+
+ pub fn has_font(&self, font_key: &FontKey) -> bool {
+ self.cg_fonts.contains_key(font_key)
+ }
+
+ pub fn add_raw_font(&mut self, font_key: &FontKey, bytes: Arc<Vec<u8>>, index: u32) {
+ if self.cg_fonts.contains_key(font_key) {
+ return;
+ }
+
+ assert_eq!(index, 0);
+ let data_provider = CGDataProvider::from_buffer(bytes);
+ let cg_font = match CGFont::from_data_provider(data_provider) {
+ Err(_) => return,
+ Ok(cg_font) => cg_font,
+ };
+ self.cg_fonts.insert(*font_key, cg_font);
+ }
+
+ pub fn add_native_font(&mut self, font_key: &FontKey, native_font_handle: NativeFontHandle) {
+ if self.cg_fonts.contains_key(font_key) {
+ return;
+ }
+
+ self.cg_fonts
+ .insert(*font_key, native_font_handle.0);
+ }
+
+ pub fn delete_font(&mut self, font_key: &FontKey) {
+ if let Some(_) = self.cg_fonts.remove(font_key) {
+ self.ct_fonts.retain(|k, _| k.0 != *font_key);
+ }
+ }
+
+ pub fn delete_font_instance(&mut self, instance: &FontInstance) {
+ // Remove the CoreText font corresponding to this instance.
+ let size = FontSize::from_f64_px(instance.get_transformed_size());
+ self.ct_fonts.remove(&(instance.font_key, size, instance.variations.clone()));
+ }
+
+ fn get_ct_font(
+ &mut self,
+ font_key: FontKey,
+ size: f64,
+ variations: &[FontVariation],
+ ) -> Option<CTFont> {
+ match self.ct_fonts.entry((font_key, FontSize::from_f64_px(size), variations.to_vec())) {
+ Entry::Occupied(entry) => Some((*entry.get()).clone()),
+ Entry::Vacant(entry) => {
+ let cg_font = self.cg_fonts.get(&font_key)?;
+ let ct_font = new_ct_font_with_variations(cg_font, size, variations);
+ entry.insert(ct_font.clone());
+ Some(ct_font)
+ }
+ }
+ }
+
+ pub fn get_glyph_index(&mut self, font_key: FontKey, ch: char) -> Option<u32> {
+ let character = ch as u16;
+ let mut glyph = 0;
+
+ self.get_ct_font(font_key, 16.0, &[])
+ .and_then(|ref ct_font| {
+ unsafe {
+ let result = ct_font.get_glyphs_for_characters(&character, &mut glyph, 1);
+
+ if result {
+ Some(glyph as u32)
+ } else {
+ None
+ }
+ }
+ })
+ }
+
+ pub fn get_glyph_dimensions(
+ &mut self,
+ font: &FontInstance,
+ key: &GlyphKey,
+ ) -> Option<GlyphDimensions> {
+ let (x_scale, y_scale) = font.transform.compute_scale().unwrap_or((1.0, 1.0));
+ let size = font.size.to_f64_px() * y_scale;
+ self.get_ct_font(font.font_key, size, &font.variations)
+ .and_then(|ref ct_font| {
+ let glyph = key.index() as CGGlyph;
+ let bitmap = is_bitmap_font(ct_font);
+ let (mut shape, (x_offset, y_offset)) = if bitmap {
+ (FontTransform::identity(), (0.0, 0.0))
+ } else {
+ (font.transform.invert_scale(y_scale, y_scale), font.get_subpx_offset(key))
+ };
+ if font.flags.contains(FontInstanceFlags::FLIP_X) {
+ shape = shape.flip_x();
+ }
+ if font.flags.contains(FontInstanceFlags::FLIP_Y) {
+ shape = shape.flip_y();
+ }
+ if font.flags.contains(FontInstanceFlags::TRANSPOSE) {
+ shape = shape.swap_xy();
+ }
+ let (mut tx, mut ty) = (0.0, 0.0);
+ if font.synthetic_italics.is_enabled() {
+ let (shape_, (tx_, ty_)) = font.synthesize_italics(shape, size);
+ shape = shape_;
+ tx = tx_;
+ ty = ty_;
+ }
+ let transform = if !shape.is_identity() || (tx, ty) != (0.0, 0.0) {
+ Some(CGAffineTransform {
+ a: shape.scale_x as f64,
+ b: -shape.skew_y as f64,
+ c: -shape.skew_x as f64,
+ d: shape.scale_y as f64,
+ tx: tx,
+ ty: -ty,
+ })
+ } else {
+ None
+ };
+ let (strike_scale, pixel_step) = if bitmap {
+ (y_scale, 1.0)
+ } else {
+ (x_scale, y_scale / x_scale)
+ };
+ let extra_strikes = font.get_extra_strikes(strike_scale);
+ let metrics = get_glyph_metrics(
+ ct_font,
+ transform.as_ref(),
+ glyph,
+ x_offset,
+ y_offset,
+ extra_strikes as f64 * pixel_step,
+ );
+ if metrics.rasterized_width == 0 || metrics.rasterized_height == 0 {
+ None
+ } else {
+ Some(GlyphDimensions {
+ left: metrics.rasterized_left,
+ top: metrics.rasterized_ascent,
+ width: metrics.rasterized_width,
+ height: metrics.rasterized_height,
+ advance: metrics.advance,
+ })
+ }
+ })
+ }
+
+ // Assumes the pixels here are linear values from CG
+ fn gamma_correct_pixels(
+ &self,
+ pixels: &mut Vec<u8>,
+ render_mode: FontRenderMode,
+ color: ColorU,
+ ) {
+ // Then convert back to gamma corrected values.
+ match render_mode {
+ FontRenderMode::Alpha => {
+ self.gamma_lut.preblend_grayscale(pixels, color);
+ }
+ FontRenderMode::Subpixel => {
+ self.gamma_lut.preblend(pixels, color);
+ }
+ _ => {} // Again, give mono untouched since only the alpha matters.
+ }
+ }
+
+ #[allow(dead_code)]
+ fn print_glyph_data(&mut self, data: &[u8], width: usize, height: usize) {
+ // Rust doesn't have step_by support on stable :(
+ println!("Width is: {:?} height: {:?}", width, height);
+ for i in 0 .. height {
+ let current_height = i * width * 4;
+
+ for pixel in data[current_height .. current_height + (width * 4)].chunks(4) {
+ let b = pixel[0];
+ let g = pixel[1];
+ let r = pixel[2];
+ let a = pixel[3];
+ print!("({}, {}, {}, {}) ", r, g, b, a);
+ }
+ println!();
+ }
+ }
+
+ pub fn prepare_font(font: &mut FontInstance) {
+ match font.render_mode {
+ FontRenderMode::Mono => {
+ // In mono mode the color of the font is irrelevant.
+ font.color = ColorU::new(255, 255, 255, 255);
+ // Subpixel positioning is disabled in mono mode.
+ font.disable_subpixel_position();
+ }
+ FontRenderMode::Alpha => {
+ font.color = if font.flags.contains(FontInstanceFlags::FONT_SMOOTHING) {
+ // Only the G channel is used to index grayscale tables,
+ // so use R and B to preserve light/dark determination.
+ let ColorU { g, a, .. } = font.color.luminance_color().quantized_ceil();
+ let rb = if should_use_white_on_black(font.color) { 255 } else { 0 };
+ ColorU::new(rb, g, rb, a)
+ } else {
+ ColorU::new(255, 255, 255, 255)
+ };
+ }
+ FontRenderMode::Subpixel => {
+ // Quantization may change the light/dark determination, so quantize in the
+ // direction necessary to respect the threshold.
+ font.color = if should_use_white_on_black(font.color) {
+ font.color.quantized_ceil()
+ } else {
+ font.color.quantized_floor()
+ };
+ }
+ }
+ }
+
+ pub fn rasterize_glyph(&mut self, font: &FontInstance, key: &GlyphKey) -> GlyphRasterResult {
+ let (x_scale, y_scale) = font.transform.compute_scale().unwrap_or((1.0, 1.0));
+ let size = font.size.to_f64_px() * y_scale;
+ let ct_font = self.get_ct_font(font.font_key, size, &font.variations).ok_or(GlyphRasterError::LoadFailed)?;
+ let glyph_type = if is_bitmap_font(&ct_font) {
+ GlyphType::Bitmap
+ } else {
+ GlyphType::Vector
+ };
+
+ let (mut shape, (x_offset, y_offset)) = match glyph_type {
+ GlyphType::Bitmap => (FontTransform::identity(), (0.0, 0.0)),
+ GlyphType::Vector => {
+ (font.transform.invert_scale(y_scale, y_scale), font.get_subpx_offset(key))
+ }
+ };
+ if font.flags.contains(FontInstanceFlags::FLIP_X) {
+ shape = shape.flip_x();
+ }
+ if font.flags.contains(FontInstanceFlags::FLIP_Y) {
+ shape = shape.flip_y();
+ }
+ if font.flags.contains(FontInstanceFlags::TRANSPOSE) {
+ shape = shape.swap_xy();
+ }
+ let (mut tx, mut ty) = (0.0, 0.0);
+ if font.synthetic_italics.is_enabled() {
+ let (shape_, (tx_, ty_)) = font.synthesize_italics(shape, size);
+ shape = shape_;
+ tx = tx_;
+ ty = ty_;
+ }
+ let transform = if !shape.is_identity() || (tx, ty) != (0.0, 0.0) {
+ Some(CGAffineTransform {
+ a: shape.scale_x as f64,
+ b: -shape.skew_y as f64,
+ c: -shape.skew_x as f64,
+ d: shape.scale_y as f64,
+ tx: tx,
+ ty: -ty,
+ })
+ } else {
+ None
+ };
+
+ let glyph = key.index() as CGGlyph;
+ let (strike_scale, pixel_step) = if glyph_type == GlyphType::Bitmap {
+ (y_scale, 1.0)
+ } else {
+ (x_scale, y_scale / x_scale)
+ };
+
+ let extra_strikes = font.get_extra_strikes(strike_scale);
+ let metrics = get_glyph_metrics(
+ &ct_font,
+ transform.as_ref(),
+ glyph,
+ x_offset,
+ y_offset,
+ extra_strikes as f64 * pixel_step,
+ );
+ if metrics.rasterized_width == 0 || metrics.rasterized_height == 0 {
+ return Err(GlyphRasterError::LoadFailed);
+ }
+
+ let raster_size = Size2D::new(
+ metrics.rasterized_width as u32,
+ metrics.rasterized_height as u32
+ );
+
+ // If the font render mode is Alpha, we support two different ways to
+ // compute the grayscale mask, depending on the value of the platform
+ // options' font_smoothing flag:
+ // - Alpha + smoothing:
+ // We will recover a grayscale mask from a subpixel rasterization, in
+ // such a way that the result looks as close to subpixel text
+ // blending as we can make it. This involves gamma correction,
+ // luminance computations and preblending based on the text color,
+ // just like with the Subpixel render mode.
+ // - Alpha without smoothing:
+ // We will ask CoreGraphics to rasterize the text with font_smoothing
+ // off. This will cause it to use grayscale anti-aliasing with
+ // comparatively thin text. This method of text rendering is not
+ // gamma-aware.
+ //
+ // For subpixel rasterization, starting with macOS 10.11, CoreGraphics
+ // uses different glyph dilation based on the text color. Bright text
+ // uses less font dilation (looks thinner) than dark text.
+ // As a consequence, when we ask CG to rasterize with subpixel AA, we
+ // will render white-on-black text as opposed to black-on-white text if
+ // the text color brightness exceeds a certain threshold. This applies
+ // to both the Subpixel and the "Alpha + smoothing" modes, but not to
+ // the "Alpha without smoothing" and Mono modes.
+ let use_white_on_black = should_use_white_on_black(font.color);
+ let use_font_smoothing = font.flags.contains(FontInstanceFlags::FONT_SMOOTHING);
+ let (antialias, smooth, text_color, bg_color, bg_alpha, invert) = match glyph_type {
+ GlyphType::Bitmap => (true, false, 0.0, 0.0, 0.0, false),
+ GlyphType::Vector => {
+ match (font.render_mode, use_font_smoothing) {
+ (FontRenderMode::Subpixel, _) |
+ (FontRenderMode::Alpha, true) => if use_white_on_black {
+ (true, true, 1.0, 0.0, 1.0, false)
+ } else {
+ (true, true, 0.0, 1.0, 1.0, true)
+ },
+ (FontRenderMode::Alpha, false) => (true, false, 0.0, 1.0, 1.0, true),
+ (FontRenderMode::Mono, _) => (false, false, 0.0, 1.0, 1.0, true),
+ }
+ }
+ };
+
+ {
+ let cg_context = self.graphics_context.get_context(&raster_size, glyph_type);
+
+ // These are always true in Gecko, even for non-AA fonts
+ cg_context.set_allows_font_subpixel_positioning(true);
+ cg_context.set_should_subpixel_position_fonts(true);
+
+ // Don't quantize because we're doing it already.
+ cg_context.set_allows_font_subpixel_quantization(false);
+ cg_context.set_should_subpixel_quantize_fonts(false);
+
+ cg_context.set_should_smooth_fonts(smooth);
+ cg_context.set_should_antialias(antialias);
+
+ // Fill the background. This could be opaque white, opaque black, or
+ // transparency.
+ cg_context.set_rgb_fill_color(bg_color, bg_color, bg_color, bg_alpha);
+ let rect = CGRect {
+ origin: CGPoint { x: 0.0, y: 0.0 },
+ size: CGSize {
+ width: metrics.rasterized_width as f64,
+ height: metrics.rasterized_height as f64,
+ },
+ };
+
+ // Make sure we use the Copy blend mode, or else we'll get the Porter-Duff OVER
+ // operator, which can't clear to the transparent color!
+ cg_context.set_blend_mode(CGBlendMode::Copy);
+ cg_context.fill_rect(rect);
+ cg_context.set_blend_mode(CGBlendMode::Normal);
+
+ // Set the text color and draw the glyphs.
+ cg_context.set_rgb_fill_color(text_color, text_color, text_color, 1.0);
+ cg_context.set_text_drawing_mode(CGTextDrawingMode::CGTextFill);
+
+ // CG Origin is bottom left, WR is top left. Need -y offset
+ let mut draw_origin = CGPoint {
+ x: -metrics.rasterized_left as f64 + x_offset + tx,
+ y: metrics.rasterized_descent as f64 - y_offset - ty,
+ };
+
+ if let Some(transform) = transform {
+ cg_context.set_text_matrix(&transform);
+
+ draw_origin = draw_origin.apply_transform(&transform.invert());
+ } else {
+ // Make sure to reset this because some previous glyph rasterization might have
+ // changed it.
+ cg_context.set_text_matrix(&CG_AFFINE_TRANSFORM_IDENTITY);
+ }
+
+ ct_font.draw_glyphs(&[glyph], &[draw_origin], cg_context.clone());
+
+ // We'd like to render all the strikes in a single ct_font.draw_glyphs call,
+ // passing an array of glyph IDs and an array of origins, but unfortunately
+ // with some fonts, Core Text may inappropriately pixel-snap the rasterization,
+ // such that the strikes overprint instead of being offset. Rendering the
+ // strikes with individual draw_glyphs calls avoids this.
+ // (See https://bugzilla.mozilla.org/show_bug.cgi?id=1633397 for details.)
+ for i in 1 ..= extra_strikes {
+ let origin = CGPoint {
+ x: draw_origin.x + i as f64 * pixel_step,
+ y: draw_origin.y,
+ };
+ ct_font.draw_glyphs(&[glyph], &[origin], cg_context.clone());
+ }
+ }
+
+ let mut rasterized_pixels = self.graphics_context
+ .get_rasterized_pixels(&raster_size, glyph_type);
+
+ if glyph_type == GlyphType::Vector {
+ // We rendered text into an opaque surface. The code below needs to
+ // ignore the current value of each pixel's alpha channel. But it's
+ // allowed to write to the alpha channel, because we're done calling
+ // CG functions now.
+
+ if smooth {
+ // Convert to linear space for subpixel AA.
+ // We explicitly do not do this for grayscale AA ("Alpha without
+ // smoothing" or Mono) because those rendering modes are not
+ // gamma-aware in CoreGraphics.
+ self.gamma_lut.coregraphics_convert_to_linear(
+ &mut rasterized_pixels,
+ );
+ }
+
+ for pixel in rasterized_pixels.chunks_mut(4) {
+ if invert {
+ pixel[0] = 255 - pixel[0];
+ pixel[1] = 255 - pixel[1];
+ pixel[2] = 255 - pixel[2];
+ }
+
+ // Set alpha to the value of the green channel. For grayscale
+ // text, all three channels have the same value anyway.
+ // For subpixel text, the mask's alpha only makes a difference
+ // when computing the destination alpha on destination pixels
+ // that are not completely opaque. Picking an alpha value
+ // that's somehow based on the mask at least ensures that text
+ // blending doesn't modify the destination alpha on pixels where
+ // the mask is entirely zero.
+ pixel[3] = pixel[1];
+ }
+
+ if smooth {
+ // Convert back from linear space into device space, and perform
+ // some "preblending" based on the text color.
+ // In Alpha + smoothing mode, this will also convert subpixel AA
+ // into grayscale AA.
+ self.gamma_correct_pixels(
+ &mut rasterized_pixels,
+ font.render_mode,
+ font.color,
+ );
+ }
+ }
+
+ Ok(RasterizedGlyph {
+ left: metrics.rasterized_left as f32,
+ top: metrics.rasterized_ascent as f32,
+ width: metrics.rasterized_width,
+ height: metrics.rasterized_height,
+ scale: match glyph_type {
+ GlyphType::Bitmap => y_scale.recip() as f32,
+ GlyphType::Vector => 1.0,
+ },
+ format: match glyph_type {
+ GlyphType::Bitmap => GlyphFormat::ColorBitmap,
+ GlyphType::Vector => font.get_glyph_format(),
+ },
+ bytes: rasterized_pixels,
+ })
+ }
+}
+
+// Avoids taking locks by recycling Core Graphics contexts.
+#[allow(dead_code)]
+struct GraphicsContext {
+ vector_context: CGContext,
+ vector_context_size: Size2D<u32>,
+ bitmap_context: CGContext,
+ bitmap_context_size: Size2D<u32>,
+}
+
+impl GraphicsContext {
+ fn new() -> GraphicsContext {
+ let size = Size2D::new(INITIAL_CG_CONTEXT_SIDE_LENGTH, INITIAL_CG_CONTEXT_SIDE_LENGTH);
+ GraphicsContext {
+ vector_context: GraphicsContext::create_cg_context(&size, GlyphType::Vector),
+ vector_context_size: size,
+ bitmap_context: GraphicsContext::create_cg_context(&size, GlyphType::Bitmap),
+ bitmap_context_size: size,
+ }
+ }
+
+ #[allow(dead_code)]
+ fn get_context(&mut self, size: &Size2D<u32>, glyph_type: GlyphType)
+ -> &mut CGContext {
+ let (cached_context, cached_size) = match glyph_type {
+ GlyphType::Vector => {
+ (&mut self.vector_context, &mut self.vector_context_size)
+ }
+ GlyphType::Bitmap => {
+ (&mut self.bitmap_context, &mut self.bitmap_context_size)
+ }
+ };
+ let rounded_size = Size2D::new(size.width.next_power_of_two(),
+ size.height.next_power_of_two());
+ if rounded_size.width > cached_size.width || rounded_size.height > cached_size.height {
+ *cached_size = Size2D::new(u32::max(cached_size.width, rounded_size.width),
+ u32::max(cached_size.height, rounded_size.height));
+ *cached_context = GraphicsContext::create_cg_context(cached_size, glyph_type);
+ }
+ cached_context
+ }
+
+ #[allow(dead_code)]
+ fn get_rasterized_pixels(&mut self, size: &Size2D<u32>, glyph_type: GlyphType)
+ -> Vec<u8> {
+ let (cached_context, cached_size) = match glyph_type {
+ GlyphType::Vector => (&mut self.vector_context, &self.vector_context_size),
+ GlyphType::Bitmap => (&mut self.bitmap_context, &self.bitmap_context_size),
+ };
+ let cached_data = cached_context.data();
+ let cached_stride = cached_size.width as usize * 4;
+
+ let result_len = size.width as usize * size.height as usize * 4;
+ let mut result = Vec::with_capacity(result_len);
+ for y in (cached_size.height - size.height)..cached_size.height {
+ let cached_start = y as usize * cached_stride;
+ let cached_end = cached_start + size.width as usize * 4;
+ result.extend_from_slice(&cached_data[cached_start..cached_end]);
+ }
+ debug_assert_eq!(result.len(), result_len);
+ result
+ }
+
+ fn create_cg_context(size: &Size2D<u32>, glyph_type: GlyphType) -> CGContext {
+ // The result of rasterization, in all render modes, is going to be a
+ // BGRA surface with white text on transparency using premultiplied
+ // alpha. For subpixel text, the RGB values will be the mask value for
+ // the individual components. For bitmap glyphs, the RGB values will be
+ // the (premultiplied) color of the pixel. For Alpha and Mono, each
+ // pixel will have R==G==B==A at the end of this function.
+ // We access the color channels in little-endian order.
+ // The CGContext will create and own our pixel buffer.
+ // In the non-Bitmap cases, we will ask CoreGraphics to draw text onto
+ // an opaque background. In order to hit the most efficient path in CG
+ // for this, we will tell CG that the CGContext is opaque, by passing
+ // an "[...]AlphaNone[...]" context flag. This creates a slight
+ // contradiction to the way we use the buffer after CG is done with it,
+ // because we will convert it into text-on-transparency. But that's ok;
+ // we still get four bytes per pixel and CG won't mess with the alpha
+ // channel after we've stopped calling CG functions. We just need to
+ // make sure that we don't look at the alpha values of the pixels that
+ // we get from CG, and compute our own alpha value only from RGB.
+ // Note that CG requires kCGBitmapByteOrder32Little in order to do
+ // subpixel AA at all (which we need it to do in both Subpixel and
+ // Alpha+smoothing mode). But little-endian is what we want anyway, so
+ // this works out nicely.
+ let color_type = match glyph_type {
+ GlyphType::Vector => kCGImageAlphaNoneSkipFirst,
+ GlyphType::Bitmap => kCGImageAlphaPremultipliedFirst,
+ };
+
+ CGContext::create_bitmap_context(None,
+ size.width as usize,
+ size.height as usize,
+ 8,
+ size.width as usize * 4,
+ &CGColorSpace::create_device_rgb(),
+ kCGBitmapByteOrder32Little | color_type)
+ }
+}
+
+#[derive(Clone, Copy, PartialEq, Debug)]
+enum GlyphType {
+ Vector,
+ Bitmap,
+}
diff --git a/third_party/webrender/webrender/src/platform/unix/font.rs b/third_party/webrender/webrender/src/platform/unix/font.rs
new file mode 100644
index 00000000000..52c0d114101
--- /dev/null
+++ b/third_party/webrender/webrender/src/platform/unix/font.rs
@@ -0,0 +1,1038 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{ColorU, GlyphDimensions, FontKey, FontRenderMode};
+use api::{FontInstancePlatformOptions, FontLCDFilter, FontHinting};
+use api::{FontInstanceFlags, FontVariation, NativeFontHandle};
+use freetype::freetype::{FT_BBox, FT_Outline_Translate, FT_Pixel_Mode, FT_Render_Mode};
+use freetype::freetype::{FT_Done_Face, FT_Error, FT_Get_Char_Index, FT_Int32};
+use freetype::freetype::{FT_Done_FreeType, FT_Library_SetLcdFilter, FT_Pos};
+use freetype::freetype::{FT_F26Dot6, FT_Face, FT_Glyph_Format, FT_Long, FT_UInt};
+use freetype::freetype::{FT_GlyphSlot, FT_LcdFilter, FT_New_Face, FT_New_Memory_Face};
+use freetype::freetype::{FT_Init_FreeType, FT_Load_Glyph, FT_Render_Glyph};
+use freetype::freetype::{FT_Library, FT_Outline_Get_CBox, FT_Set_Char_Size, FT_Select_Size};
+use freetype::freetype::{FT_Fixed, FT_Matrix, FT_Set_Transform, FT_String, FT_ULong, FT_Vector};
+use freetype::freetype::{FT_Err_Unimplemented_Feature, FT_MulFix, FT_Outline_Embolden};
+use freetype::freetype::{FT_LOAD_COLOR, FT_LOAD_DEFAULT, FT_LOAD_FORCE_AUTOHINT};
+use freetype::freetype::{FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH, FT_LOAD_NO_AUTOHINT};
+use freetype::freetype::{FT_LOAD_NO_BITMAP, FT_LOAD_NO_HINTING};
+use freetype::freetype::{FT_FACE_FLAG_SCALABLE, FT_FACE_FLAG_FIXED_SIZES};
+use freetype::freetype::{FT_FACE_FLAG_MULTIPLE_MASTERS};
+use freetype::succeeded;
+use crate::glyph_rasterizer::{FontInstance, GlyphFormat, GlyphKey};
+use crate::glyph_rasterizer::{GlyphRasterError, GlyphRasterResult, RasterizedGlyph};
+use crate::internal_types::{FastHashMap, ResourceCacheError};
+#[cfg(any(not(target_os = "android"), feature = "no_static_freetype"))]
+use libc::{dlsym, RTLD_DEFAULT};
+use libc::free;
+use std::{cmp, mem, ptr, slice};
+use std::cmp::max;
+use std::collections::hash_map::Entry;
+use std::ffi::CString;
+use std::sync::Arc;
+
+// These constants are not present in the freetype
+// bindings due to bindgen not handling the way
+// the macros are defined.
+//const FT_LOAD_TARGET_NORMAL: FT_UInt = 0 << 16;
+const FT_LOAD_TARGET_LIGHT: FT_UInt = 1 << 16;
+const FT_LOAD_TARGET_MONO: FT_UInt = 2 << 16;
+const FT_LOAD_TARGET_LCD: FT_UInt = 3 << 16;
+const FT_LOAD_TARGET_LCD_V: FT_UInt = 4 << 16;
+
+#[repr(C)]
+struct FT_Var_Axis {
+ pub name: *mut FT_String,
+ pub minimum: FT_Fixed,
+ pub def: FT_Fixed,
+ pub maximum: FT_Fixed,
+ pub tag: FT_ULong,
+ pub strid: FT_UInt,
+}
+
+#[repr(C)]
+struct FT_Var_Named_Style {
+ pub coords: *mut FT_Fixed,
+ pub strid: FT_UInt,
+ pub psid: FT_UInt,
+}
+
+#[repr(C)]
+struct FT_MM_Var {
+ pub num_axis: FT_UInt,
+ pub num_designs: FT_UInt,
+ pub num_namedstyles: FT_UInt,
+ pub axis: *mut FT_Var_Axis,
+ pub namedstyle: *mut FT_Var_Named_Style,
+}
+
+#[inline]
+pub fn unimplemented(error: FT_Error) -> bool {
+ error == FT_Err_Unimplemented_Feature as FT_Error
+}
+
+// Use dlsym to check for symbols. If not available. just return an unimplemented error.
+#[cfg(any(not(target_os = "android"), feature = "no_static_freetype"))]
+macro_rules! ft_dyn_fn {
+ ($func_name:ident($($arg_name:ident:$arg_type:ty),*) -> FT_Error) => {
+ #[allow(non_snake_case)]
+ unsafe fn $func_name($($arg_name:$arg_type),*) -> FT_Error {
+ extern "C" fn unimpl_func($(_:$arg_type),*) -> FT_Error {
+ FT_Err_Unimplemented_Feature as FT_Error
+ }
+ lazy_static! {
+ static ref FUNC: unsafe extern "C" fn($($arg_type),*) -> FT_Error = {
+ unsafe {
+ let cname = CString::new(stringify!($func_name)).unwrap();
+ let ptr = dlsym(RTLD_DEFAULT, cname.as_ptr());
+ if !ptr.is_null() { mem::transmute(ptr) } else { unimpl_func }
+ }
+ };
+ }
+ (*FUNC)($($arg_name),*)
+ }
+ }
+}
+
+// On Android, just statically link in the symbols...
+#[cfg(all(target_os = "android", not(feature = "no_static_freetype")))]
+macro_rules! ft_dyn_fn {
+ ($($proto:tt)+) => { extern "C" { fn $($proto)+; } }
+}
+
+ft_dyn_fn!(FT_Get_MM_Var(face: FT_Face, desc: *mut *mut FT_MM_Var) -> FT_Error);
+ft_dyn_fn!(FT_Done_MM_Var(library: FT_Library, desc: *mut FT_MM_Var) -> FT_Error);
+ft_dyn_fn!(FT_Set_Var_Design_Coordinates(face: FT_Face, num_vals: FT_UInt, vals: *mut FT_Fixed) -> FT_Error);
+
+extern "C" {
+ fn FT_GlyphSlot_Embolden(slot: FT_GlyphSlot);
+}
+
+// Custom version of FT_GlyphSlot_Embolden to be less aggressive with outline
+// fonts than the default implementation in FreeType.
+#[no_mangle]
+pub extern "C" fn mozilla_glyphslot_embolden_less(slot: FT_GlyphSlot) {
+ if slot.is_null() {
+ return;
+ }
+
+ let slot_ = unsafe { &mut *slot };
+ let format = slot_.format;
+ if format != FT_Glyph_Format::FT_GLYPH_FORMAT_OUTLINE {
+ // For non-outline glyphs, just fall back to FreeType's function.
+ unsafe { FT_GlyphSlot_Embolden(slot) };
+ return;
+ }
+
+ let face_ = unsafe { *slot_.face };
+
+ // FT_GlyphSlot_Embolden uses a divisor of 24 here; we'll be only half as
+ // bold.
+ let size_ = unsafe { *face_.size };
+ let strength =
+ unsafe { FT_MulFix(face_.units_per_EM as FT_Long,
+ size_.metrics.y_scale) / 48 };
+ unsafe { FT_Outline_Embolden(&mut slot_.outline, strength) };
+
+ // Adjust metrics to suit the fattened glyph.
+ if slot_.advance.x != 0 {
+ slot_.advance.x += strength;
+ }
+ if slot_.advance.y != 0 {
+ slot_.advance.y += strength;
+ }
+ slot_.metrics.width += strength;
+ slot_.metrics.height += strength;
+ slot_.metrics.horiAdvance += strength;
+ slot_.metrics.vertAdvance += strength;
+ slot_.metrics.horiBearingY += strength;
+}
+
+enum FontFile {
+ Pathname(CString),
+ Data(Arc<Vec<u8>>),
+}
+
+struct FontFace {
+ // Raw byte data has to live until the font is deleted, according to
+ // https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_New_Memory_Face
+ file: FontFile,
+ index: u32,
+ face: FT_Face,
+ mm_var: *mut FT_MM_Var,
+}
+
+impl Drop for FontFace {
+ fn drop(&mut self) {
+ unsafe {
+ if !self.mm_var.is_null() &&
+ unimplemented(FT_Done_MM_Var((*(*self.face).glyph).library, self.mm_var)) {
+ free(self.mm_var as _);
+ }
+
+ FT_Done_Face(self.face);
+ }
+ }
+}
+
+struct VariationFace(FT_Face);
+
+impl Drop for VariationFace {
+ fn drop(&mut self) {
+ unsafe { FT_Done_Face(self.0) };
+ }
+}
+
+fn new_ft_face(font_key: &FontKey, lib: FT_Library, file: &FontFile, index: u32) -> Option<FT_Face> {
+ unsafe {
+ let mut face: FT_Face = ptr::null_mut();
+ let result = match file {
+ FontFile::Pathname(ref cstr) => FT_New_Face(
+ lib,
+ cstr.as_ptr(),
+ index as FT_Long,
+ &mut face,
+ ),
+ FontFile::Data(ref bytes) => FT_New_Memory_Face(
+ lib,
+ bytes.as_ptr(),
+ bytes.len() as FT_Long,
+ index as FT_Long,
+ &mut face,
+ ),
+ };
+ if succeeded(result) && !face.is_null() {
+ Some(face)
+ } else {
+ warn!("WARN: webrender failed to load font");
+ debug!("font={:?}, result={:?}", font_key, result);
+ None
+ }
+ }
+}
+
+pub struct FontContext {
+ lib: FT_Library,
+ faces: FastHashMap<FontKey, FontFace>,
+ variations: FastHashMap<(FontKey, Vec<FontVariation>), VariationFace>,
+ lcd_extra_pixels: i64,
+}
+
+// FreeType resources are safe to move between threads as long as they
+// are not concurrently accessed. In our case, everything is hidden inside
+// a given FontContext so it is safe to move the latter between threads.
+unsafe impl Send for FontContext {}
+
+fn get_skew_bounds(bottom: i32, top: i32, skew_factor: f32, _vertical: bool) -> (f32, f32) {
+ let skew_min = ((bottom as f32 + 0.5) * skew_factor).floor();
+ let skew_max = ((top as f32 - 0.5) * skew_factor).ceil();
+ (skew_min, skew_max)
+}
+
+fn skew_bitmap(
+ bitmap: &[u8],
+ width: usize,
+ height: usize,
+ left: i32,
+ top: i32,
+ skew_factor: f32,
+ vertical: bool, // TODO: vertical skew not yet implemented!
+) -> (Vec<u8>, usize, i32) {
+ let stride = width * 4;
+ // Calculate the skewed horizontal offsets of the bottom and top of the glyph.
+ let (skew_min, skew_max) = get_skew_bounds(top - height as i32, top, skew_factor, vertical);
+ // Allocate enough extra width for the min/max skew offsets.
+ let skew_width = width + (skew_max - skew_min) as usize;
+ let mut skew_buffer = vec![0u8; skew_width * height * 4];
+ for y in 0 .. height {
+ // Calculate a skew offset at the vertical center of the current row.
+ let offset = (top as f32 - y as f32 - 0.5) * skew_factor - skew_min;
+ // Get a blend factor in 0..256 constant across all pixels in the row.
+ let blend = (offset.fract() * 256.0) as u32;
+ let src_row = y * stride;
+ let dest_row = (y * skew_width + offset.floor() as usize) * 4;
+ let mut prev_px = [0u32; 4];
+ for (src, dest) in
+ bitmap[src_row .. src_row + stride].chunks(4).zip(
+ skew_buffer[dest_row .. dest_row + stride].chunks_mut(4)
+ ) {
+ let px = [src[0] as u32, src[1] as u32, src[2] as u32, src[3] as u32];
+ // Blend current pixel with previous pixel based on blend factor.
+ let next_px = [px[0] * blend, px[1] * blend, px[2] * blend, px[3] * blend];
+ dest[0] = ((((px[0] << 8) - next_px[0]) + prev_px[0] + 128) >> 8) as u8;
+ dest[1] = ((((px[1] << 8) - next_px[1]) + prev_px[1] + 128) >> 8) as u8;
+ dest[2] = ((((px[2] << 8) - next_px[2]) + prev_px[2] + 128) >> 8) as u8;
+ dest[3] = ((((px[3] << 8) - next_px[3]) + prev_px[3] + 128) >> 8) as u8;
+ // Save the remainder for blending onto the next pixel.
+ prev_px = next_px;
+ }
+ // If the skew misaligns the final pixel, write out the remainder.
+ if blend > 0 {
+ let dest = &mut skew_buffer[dest_row + stride .. dest_row + stride + 4];
+ dest[0] = ((prev_px[0] + 128) >> 8) as u8;
+ dest[1] = ((prev_px[1] + 128) >> 8) as u8;
+ dest[2] = ((prev_px[2] + 128) >> 8) as u8;
+ dest[3] = ((prev_px[3] + 128) >> 8) as u8;
+ }
+ }
+ (skew_buffer, skew_width, left + skew_min as i32)
+}
+
+fn transpose_bitmap(bitmap: &[u8], width: usize, height: usize) -> Vec<u8> {
+ let mut transposed = vec![0u8; width * height * 4];
+ for (y, row) in bitmap.chunks(width * 4).enumerate() {
+ let mut offset = y * 4;
+ for src in row.chunks(4) {
+ transposed[offset .. offset + 4].copy_from_slice(src);
+ offset += height * 4;
+ }
+ }
+ transposed
+}
+
+fn flip_bitmap_x(bitmap: &mut [u8], width: usize, height: usize) {
+ assert!(bitmap.len() == width * height * 4);
+ let pixels = unsafe { slice::from_raw_parts_mut(bitmap.as_mut_ptr() as *mut u32, width * height) };
+ for row in pixels.chunks_mut(width) {
+ row.reverse();
+ }
+}
+
+fn flip_bitmap_y(bitmap: &mut [u8], width: usize, height: usize) {
+ assert!(bitmap.len() == width * height * 4);
+ let pixels = unsafe { slice::from_raw_parts_mut(bitmap.as_mut_ptr() as *mut u32, width * height) };
+ for y in 0 .. height / 2 {
+ let low_row = y * width;
+ let high_row = (height - 1 - y) * width;
+ for x in 0 .. width {
+ pixels.swap(low_row + x, high_row + x);
+ }
+ }
+}
+
+impl FontContext {
+ pub fn new() -> Result<FontContext, ResourceCacheError> {
+ let mut lib: FT_Library = ptr::null_mut();
+
+ // Using an LCD filter may add one full pixel to each side if support is built in.
+ // As of FreeType 2.8.1, an LCD filter is always used regardless of settings
+ // if support for the patent-encumbered LCD filter algorithms is not built in.
+ // Thus, the only reasonable way to guess padding is to unconditonally add it if
+ // subpixel AA is used.
+ let lcd_extra_pixels = 1;
+
+ let result = unsafe {
+ FT_Init_FreeType(&mut lib)
+ };
+
+ if succeeded(result) {
+ Ok(FontContext {
+ lib,
+ faces: FastHashMap::default(),
+ variations: FastHashMap::default(),
+ lcd_extra_pixels,
+ })
+ } else {
+ // TODO(gw): Provide detailed error values.
+ Err(ResourceCacheError::new(
+ format!("Failed to initialize FreeType - {}", result)
+ ))
+ }
+ }
+
+ pub fn has_font(&self, font_key: &FontKey) -> bool {
+ self.faces.contains_key(font_key)
+ }
+
+ pub fn add_raw_font(&mut self, font_key: &FontKey, bytes: Arc<Vec<u8>>, index: u32) {
+ if !self.faces.contains_key(font_key) {
+ let file = FontFile::Data(bytes);
+ if let Some(face) = new_ft_face(font_key, self.lib, &file, index) {
+ self.faces.insert(*font_key, FontFace { file, index, face, mm_var: ptr::null_mut() });
+ }
+ }
+ }
+
+ pub fn add_native_font(&mut self, font_key: &FontKey, native_font_handle: NativeFontHandle) {
+ if !self.faces.contains_key(font_key) {
+ let cstr = CString::new(native_font_handle.path.as_os_str().to_str().unwrap()).unwrap();
+ let file = FontFile::Pathname(cstr);
+ let index = native_font_handle.index;
+ if let Some(face) = new_ft_face(font_key, self.lib, &file, index) {
+ self.faces.insert(*font_key, FontFace { file, index, face, mm_var: ptr::null_mut() });
+ }
+ }
+ }
+
+ pub fn delete_font(&mut self, font_key: &FontKey) {
+ if self.faces.remove(font_key).is_some() {
+ self.variations.retain(|k, _| k.0 != *font_key);
+ }
+ }
+
+ pub fn delete_font_instance(&mut self, instance: &FontInstance) {
+ // Ensure we don't keep around excessive amounts of stale variations.
+ if !instance.variations.is_empty() {
+ self.variations.remove(&(instance.font_key, instance.variations.clone()));
+ }
+ }
+
+ fn get_ft_face(&mut self, font: &FontInstance) -> Option<FT_Face> {
+ if font.variations.is_empty() {
+ return Some(self.faces.get(&font.font_key)?.face);
+ }
+ match self.variations.entry((font.font_key, font.variations.clone())) {
+ Entry::Occupied(entry) => Some(entry.get().0),
+ Entry::Vacant(entry) => unsafe {
+ let normal_face = self.faces.get_mut(&font.font_key)?;
+ if ((*normal_face.face).face_flags & (FT_FACE_FLAG_MULTIPLE_MASTERS as FT_Long)) == 0 {
+ return Some(normal_face.face);
+ }
+ // Clone a new FT face and attempt to set the variation values on it.
+ // Leave unspecified values at the defaults.
+ let var_face = new_ft_face(&font.font_key, self.lib, &normal_face.file, normal_face.index)?;
+ if !normal_face.mm_var.is_null() ||
+ succeeded(FT_Get_MM_Var(normal_face.face, &mut normal_face.mm_var)) {
+ let mm_var = normal_face.mm_var;
+ let num_axis = (*mm_var).num_axis;
+ let mut coords: Vec<FT_Fixed> = Vec::with_capacity(num_axis as usize);
+ for i in 0 .. num_axis {
+ let axis = (*mm_var).axis.offset(i as isize);
+ let mut value = (*axis).def;
+ for var in &font.variations {
+ if var.tag as FT_ULong == (*axis).tag {
+ value = (var.value * 65536.0 + 0.5) as FT_Fixed;
+ value = cmp::min(value, (*axis).maximum);
+ value = cmp::max(value, (*axis).minimum);
+ break;
+ }
+ }
+ coords.push(value);
+ }
+ FT_Set_Var_Design_Coordinates(var_face, num_axis, coords.as_mut_ptr());
+ }
+ entry.insert(VariationFace(var_face));
+ Some(var_face)
+ }
+ }
+ }
+
+ fn load_glyph(&mut self, font: &FontInstance, glyph: &GlyphKey) -> Option<(FT_GlyphSlot, f32)> {
+ let face = self.get_ft_face(font)?;
+
+ let mut load_flags = FT_LOAD_DEFAULT;
+ let FontInstancePlatformOptions { mut hinting, .. } = font.platform_options.unwrap_or_default();
+ // Disable hinting if there is a non-axis-aligned transform.
+ if font.synthetic_italics.is_enabled() ||
+ ((font.transform.scale_x != 0.0 || font.transform.scale_y != 0.0) &&
+ (font.transform.skew_x != 0.0 || font.transform.skew_y != 0.0)) {
+ hinting = FontHinting::None;
+ }
+ match (hinting, font.render_mode) {
+ (FontHinting::None, _) => load_flags |= FT_LOAD_NO_HINTING,
+ (FontHinting::Mono, _) => load_flags = FT_LOAD_TARGET_MONO,
+ (FontHinting::Light, _) => load_flags = FT_LOAD_TARGET_LIGHT,
+ (FontHinting::LCD, FontRenderMode::Subpixel) => {
+ load_flags = if font.flags.contains(FontInstanceFlags::LCD_VERTICAL) {
+ FT_LOAD_TARGET_LCD_V
+ } else {
+ FT_LOAD_TARGET_LCD
+ };
+ if font.flags.contains(FontInstanceFlags::FORCE_AUTOHINT) {
+ load_flags |= FT_LOAD_FORCE_AUTOHINT;
+ }
+ }
+ _ => {
+ if font.flags.contains(FontInstanceFlags::FORCE_AUTOHINT) {
+ load_flags |= FT_LOAD_FORCE_AUTOHINT;
+ }
+ }
+ }
+
+ if font.flags.contains(FontInstanceFlags::NO_AUTOHINT) {
+ load_flags |= FT_LOAD_NO_AUTOHINT;
+ }
+ if !font.flags.contains(FontInstanceFlags::EMBEDDED_BITMAPS) {
+ load_flags |= FT_LOAD_NO_BITMAP;
+ }
+
+ load_flags |= FT_LOAD_COLOR;
+ load_flags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH;
+
+ let (x_scale, y_scale) = font.transform.compute_scale().unwrap_or((1.0, 1.0));
+ let req_size = font.size.to_f64_px();
+ let face_flags = unsafe { (*face).face_flags };
+ let mut result = if (face_flags & (FT_FACE_FLAG_FIXED_SIZES as FT_Long)) != 0 &&
+ (face_flags & (FT_FACE_FLAG_SCALABLE as FT_Long)) == 0 &&
+ (load_flags & FT_LOAD_NO_BITMAP) == 0 {
+ unsafe { FT_Set_Transform(face, ptr::null_mut(), ptr::null_mut()) };
+ self.choose_bitmap_size(face, req_size * y_scale)
+ } else {
+ let mut shape = font.transform.invert_scale(x_scale, y_scale);
+ if font.flags.contains(FontInstanceFlags::FLIP_X) {
+ shape = shape.flip_x();
+ }
+ if font.flags.contains(FontInstanceFlags::FLIP_Y) {
+ shape = shape.flip_y();
+ }
+ if font.flags.contains(FontInstanceFlags::TRANSPOSE) {
+ shape = shape.swap_xy();
+ }
+ let (mut tx, mut ty) = (0.0, 0.0);
+ if font.synthetic_italics.is_enabled() {
+ let (shape_, (tx_, ty_)) = font.synthesize_italics(shape, y_scale * req_size);
+ shape = shape_;
+ tx = tx_;
+ ty = ty_;
+ };
+ let mut ft_shape = FT_Matrix {
+ xx: (shape.scale_x * 65536.0) as FT_Fixed,
+ xy: (shape.skew_x * -65536.0) as FT_Fixed,
+ yx: (shape.skew_y * -65536.0) as FT_Fixed,
+ yy: (shape.scale_y * 65536.0) as FT_Fixed,
+ };
+ // The delta vector for FT_Set_Transform is in units of 1/64 pixel.
+ let mut ft_delta = FT_Vector {
+ x: (tx * 64.0) as FT_F26Dot6,
+ y: (ty * -64.0) as FT_F26Dot6,
+ };
+ unsafe {
+ FT_Set_Transform(face, &mut ft_shape, &mut ft_delta);
+ FT_Set_Char_Size(
+ face,
+ (req_size * x_scale * 64.0 + 0.5) as FT_F26Dot6,
+ (req_size * y_scale * 64.0 + 0.5) as FT_F26Dot6,
+ 0,
+ 0,
+ )
+ }
+ };
+
+ if !succeeded(result) {
+ error!("Unable to set glyph size and transform: {}", result);
+ //let raw_error = unsafe { FT_Error_String(result) };
+ //if !raw_error.is_ptr() {
+ // error!("\tcode {:?}", CStr::from_ptr(raw_error));
+ //}
+ debug!(
+ "\t[{}] for size {:?} and scale {:?} from font {:?}",
+ glyph.index(),
+ req_size,
+ (x_scale, y_scale),
+ font.font_key,
+ );
+ return None;
+ }
+
+ result = unsafe { FT_Load_Glyph(face, glyph.index() as FT_UInt, load_flags as FT_Int32) };
+ if !succeeded(result) {
+ error!("Unable to load glyph: {}", result);
+ //let raw_error = unsafe { FT_Error_String(result) };
+ //if !raw_error.is_ptr() {
+ // error!("\tcode {:?}", CStr::from_ptr(raw_error));
+ //}
+ debug!(
+ "\t[{}] with flags {:?} from font {:?}",
+ glyph.index(),
+ load_flags,
+ font.font_key,
+ );
+ return None;
+ }
+
+ let slot = unsafe { (*face).glyph };
+ assert!(slot != ptr::null_mut());
+
+ if font.flags.contains(FontInstanceFlags::SYNTHETIC_BOLD) {
+ mozilla_glyphslot_embolden_less(slot);
+ }
+
+ let format = unsafe { (*slot).format };
+ match format {
+ FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP => {
+ let bitmap_size = unsafe { (*(*(*slot).face).size).metrics.y_ppem };
+ Some((slot, req_size as f32 / bitmap_size as f32))
+ }
+ FT_Glyph_Format::FT_GLYPH_FORMAT_OUTLINE => Some((slot, 1.0)),
+ _ => {
+ error!("Unsupported format");
+ debug!("format={:?}", format);
+ None
+ }
+ }
+ }
+
+ fn pad_bounding_box(&self, font: &FontInstance, cbox: &mut FT_BBox) {
+ // Apply extra pixel of padding for subpixel AA, due to the filter.
+ if font.render_mode == FontRenderMode::Subpixel {
+ let padding = (self.lcd_extra_pixels * 64) as FT_Pos;
+ if font.flags.contains(FontInstanceFlags::LCD_VERTICAL) {
+ cbox.yMin -= padding;
+ cbox.yMax += padding;
+ } else {
+ cbox.xMin -= padding;
+ cbox.xMax += padding;
+ }
+ }
+ }
+
+ // Get the bounding box for a glyph, accounting for sub-pixel positioning.
+ fn get_bounding_box(
+ &self,
+ slot: FT_GlyphSlot,
+ font: &FontInstance,
+ glyph: &GlyphKey,
+ scale: f32,
+ ) -> FT_BBox {
+ // Get the estimated bounding box from FT (control points).
+ let mut cbox = FT_BBox { xMin: 0, yMin: 0, xMax: 0, yMax: 0 };
+
+ unsafe {
+ FT_Outline_Get_CBox(&(*slot).outline, &mut cbox);
+ }
+
+ // For spaces and other non-printable characters, early out.
+ if unsafe { (*slot).outline.n_contours } == 0 {
+ return cbox;
+ }
+
+ self.pad_bounding_box(font, &mut cbox);
+
+ // Offset the bounding box by subpixel positioning.
+ // Convert to 26.6 fixed point format for FT.
+ let (dx, dy) = font.get_subpx_offset(glyph);
+ let (dx, dy) = (
+ (dx / scale as f64 * 64.0 + 0.5) as FT_Pos,
+ -(dy / scale as f64 * 64.0 + 0.5) as FT_Pos,
+ );
+ cbox.xMin += dx;
+ cbox.xMax += dx;
+ cbox.yMin += dy;
+ cbox.yMax += dy;
+
+ // Outset the box to device pixel boundaries
+ cbox.xMin &= !63;
+ cbox.yMin &= !63;
+ cbox.xMax = (cbox.xMax + 63) & !63;
+ cbox.yMax = (cbox.yMax + 63) & !63;
+
+ cbox
+ }
+
+ fn get_glyph_dimensions_impl(
+ &self,
+ slot: FT_GlyphSlot,
+ font: &FontInstance,
+ glyph: &GlyphKey,
+ scale: f32,
+ use_transform: bool,
+ ) -> Option<GlyphDimensions> {
+ let format = unsafe { (*slot).format };
+ let (mut left, mut top, mut width, mut height) = match format {
+ FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP => {
+ unsafe { (
+ (*slot).bitmap_left as i32,
+ (*slot).bitmap_top as i32,
+ (*slot).bitmap.width as i32,
+ (*slot).bitmap.rows as i32,
+ ) }
+ }
+ FT_Glyph_Format::FT_GLYPH_FORMAT_OUTLINE => {
+ let cbox = self.get_bounding_box(slot, font, glyph, scale);
+ (
+ (cbox.xMin >> 6) as i32,
+ (cbox.yMax >> 6) as i32,
+ ((cbox.xMax - cbox.xMin) >> 6) as i32,
+ ((cbox.yMax - cbox.yMin) >> 6) as i32,
+ )
+ }
+ _ => return None,
+ };
+ let mut advance = unsafe { (*slot).metrics.horiAdvance as f32 / 64.0 };
+ if use_transform {
+ if scale != 1.0 {
+ let x0 = left as f32 * scale;
+ let x1 = width as f32 * scale + x0;
+ let y1 = top as f32 * scale;
+ let y0 = y1 - height as f32 * scale;
+ left = x0.round() as i32;
+ top = y1.round() as i32;
+ width = (x1.ceil() - x0.floor()) as i32;
+ height = (y1.ceil() - y0.floor()) as i32;
+ advance *= scale;
+ }
+ // An outline glyph's cbox would have already been transformed inside FT_Load_Glyph,
+ // so only handle bitmap glyphs which are not handled by FT_Load_Glyph.
+ if format == FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP {
+ if font.synthetic_italics.is_enabled() {
+ let (skew_min, skew_max) = get_skew_bounds(
+ top - height as i32,
+ top,
+ font.synthetic_italics.to_skew(),
+ font.flags.contains(FontInstanceFlags::VERTICAL),
+ );
+ left += skew_min as i32;
+ width += (skew_max - skew_min) as i32;
+ }
+ if font.flags.contains(FontInstanceFlags::TRANSPOSE) {
+ mem::swap(&mut width, &mut height);
+ mem::swap(&mut left, &mut top);
+ left -= width as i32;
+ top += height as i32;
+ }
+ if font.flags.contains(FontInstanceFlags::FLIP_X) {
+ left = -(left + width as i32);
+ }
+ if font.flags.contains(FontInstanceFlags::FLIP_Y) {
+ top = -(top - height as i32);
+ }
+ }
+ }
+ Some(GlyphDimensions {
+ left,
+ top,
+ width,
+ height,
+ advance,
+ })
+ }
+
+ pub fn get_glyph_index(&mut self, font_key: FontKey, ch: char) -> Option<u32> {
+ let face = self.faces.get(&font_key)?.face;
+ unsafe {
+ let idx = FT_Get_Char_Index(face, ch as _);
+ if idx != 0 {
+ Some(idx)
+ } else {
+ None
+ }
+ }
+ }
+
+ pub fn get_glyph_dimensions(
+ &mut self,
+ font: &FontInstance,
+ key: &GlyphKey,
+ ) -> Option<GlyphDimensions> {
+ let slot = self.load_glyph(font, key);
+ slot.and_then(|(slot, scale)| self.get_glyph_dimensions_impl(slot, &font, key, scale, true))
+ }
+
+ fn choose_bitmap_size(&self, face: FT_Face, requested_size: f64) -> FT_Error {
+ let mut best_dist = unsafe { *(*face).available_sizes.offset(0) }.y_ppem as f64 / 64.0 - requested_size;
+ let mut best_size = 0;
+ let num_fixed_sizes = unsafe { (*face).num_fixed_sizes };
+ for i in 1 .. num_fixed_sizes {
+ // Distance is positive if strike is larger than desired size,
+ // or negative if smaller. If previously a found smaller strike,
+ // then prefer a larger strike. Otherwise, minimize distance.
+ let dist = unsafe { *(*face).available_sizes.offset(i as isize) }.y_ppem as f64 / 64.0 - requested_size;
+ if (best_dist < 0.0 && dist >= best_dist) || dist.abs() <= best_dist {
+ best_dist = dist;
+ best_size = i;
+ }
+ }
+ unsafe { FT_Select_Size(face, best_size) }
+ }
+
+ pub fn prepare_font(font: &mut FontInstance) {
+ match font.render_mode {
+ FontRenderMode::Mono => {
+ // In mono mode the color of the font is irrelevant.
+ font.color = ColorU::new(0xFF, 0xFF, 0xFF, 0xFF);
+ // Subpixel positioning is disabled in mono mode.
+ font.disable_subpixel_position();
+ }
+ FontRenderMode::Alpha | FontRenderMode::Subpixel => {
+ // We don't do any preblending with FreeType currently, so the color is not used.
+ font.color = ColorU::new(0xFF, 0xFF, 0xFF, 0xFF);
+ }
+ }
+ }
+
+ fn rasterize_glyph_outline(
+ &mut self,
+ slot: FT_GlyphSlot,
+ font: &FontInstance,
+ key: &GlyphKey,
+ scale: f32,
+ ) -> bool {
+ // Get the subpixel offsets in FT 26.6 format.
+ let (dx, dy) = font.get_subpx_offset(key);
+ let (dx, dy) = (
+ (dx / scale as f64 * 64.0 + 0.5) as FT_Pos,
+ -(dy / scale as f64 * 64.0 + 0.5) as FT_Pos,
+ );
+
+ // Move the outline curves to be at the origin, taking
+ // into account the subpixel positioning.
+ unsafe {
+ let outline = &(*slot).outline;
+ let mut cbox = FT_BBox { xMin: 0, yMin: 0, xMax: 0, yMax: 0 };
+ FT_Outline_Get_CBox(outline, &mut cbox);
+ self.pad_bounding_box(font, &mut cbox);
+ FT_Outline_Translate(
+ outline,
+ dx - ((cbox.xMin + dx) & !63),
+ dy - ((cbox.yMin + dy) & !63),
+ );
+ }
+
+ if font.render_mode == FontRenderMode::Subpixel {
+ let FontInstancePlatformOptions { lcd_filter, .. } = font.platform_options.unwrap_or_default();
+ let filter = match lcd_filter {
+ FontLCDFilter::None => FT_LcdFilter::FT_LCD_FILTER_NONE,
+ FontLCDFilter::Default => FT_LcdFilter::FT_LCD_FILTER_DEFAULT,
+ FontLCDFilter::Light => FT_LcdFilter::FT_LCD_FILTER_LIGHT,
+ FontLCDFilter::Legacy => FT_LcdFilter::FT_LCD_FILTER_LEGACY,
+ };
+ unsafe { FT_Library_SetLcdFilter(self.lib, filter) };
+ }
+ let render_mode = match font.render_mode {
+ FontRenderMode::Mono => FT_Render_Mode::FT_RENDER_MODE_MONO,
+ FontRenderMode::Alpha => FT_Render_Mode::FT_RENDER_MODE_NORMAL,
+ FontRenderMode::Subpixel => if font.flags.contains(FontInstanceFlags::LCD_VERTICAL) {
+ FT_Render_Mode::FT_RENDER_MODE_LCD_V
+ } else {
+ FT_Render_Mode::FT_RENDER_MODE_LCD
+ },
+ };
+ let result = unsafe { FT_Render_Glyph(slot, render_mode) };
+ if !succeeded(result) {
+ error!("Unable to rasterize");
+ debug!(
+ "{:?} with {:?}, {:?}",
+ key,
+ render_mode,
+ result
+ );
+ false
+ } else {
+ true
+ }
+ }
+
+ pub fn rasterize_glyph(&mut self, font: &FontInstance, key: &GlyphKey) -> GlyphRasterResult {
+ let (slot, scale) = self.load_glyph(font, key).ok_or(GlyphRasterError::LoadFailed)?;
+
+ // Get dimensions of the glyph, to see if we need to rasterize it.
+ // Don't apply scaling to the dimensions, as the glyph cache needs to know the actual
+ // footprint of the glyph.
+ let dimensions = self.get_glyph_dimensions_impl(slot, font, key, scale, false)
+ .ok_or(GlyphRasterError::LoadFailed)?;
+ let GlyphDimensions { mut left, mut top, width, height, .. } = dimensions;
+
+ // For spaces and other non-printable characters, early out.
+ if width == 0 || height == 0 {
+ return Err(GlyphRasterError::LoadFailed);
+ }
+
+ let format = unsafe { (*slot).format };
+ match format {
+ FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP => {}
+ FT_Glyph_Format::FT_GLYPH_FORMAT_OUTLINE => {
+ if !self.rasterize_glyph_outline(slot, font, key, scale) {
+ return Err(GlyphRasterError::LoadFailed);
+ }
+ }
+ _ => {
+ error!("Unsupported format");
+ debug!("format={:?}", format);
+ return Err(GlyphRasterError::LoadFailed);
+ }
+ };
+
+ debug!(
+ "Rasterizing {:?} as {:?} with dimensions {:?}",
+ key,
+ font.render_mode,
+ dimensions
+ );
+
+ let bitmap = unsafe { &(*slot).bitmap };
+ let pixel_mode = unsafe { mem::transmute(bitmap.pixel_mode as u32) };
+ let (mut actual_width, mut actual_height) = match pixel_mode {
+ FT_Pixel_Mode::FT_PIXEL_MODE_LCD => {
+ assert!(bitmap.width % 3 == 0);
+ ((bitmap.width / 3) as usize, bitmap.rows as usize)
+ }
+ FT_Pixel_Mode::FT_PIXEL_MODE_LCD_V => {
+ assert!(bitmap.rows % 3 == 0);
+ (bitmap.width as usize, (bitmap.rows / 3) as usize)
+ }
+ FT_Pixel_Mode::FT_PIXEL_MODE_MONO |
+ FT_Pixel_Mode::FT_PIXEL_MODE_GRAY |
+ FT_Pixel_Mode::FT_PIXEL_MODE_BGRA => {
+ (bitmap.width as usize, bitmap.rows as usize)
+ }
+ _ => panic!("Unsupported mode"),
+ };
+
+ // If we need padding, we will need to expand the buffer size.
+ let (buffer_width, buffer_height, padding) = if font.use_texture_padding() {
+ (actual_width + 2, actual_height + 2, 1)
+ } else {
+ (actual_width, actual_height, 0)
+ };
+
+ let mut final_buffer = vec![0u8; buffer_width * buffer_height * 4];
+
+ // Extract the final glyph from FT format into BGRA8 format, which is
+ // what WR expects.
+ let subpixel_bgr = font.flags.contains(FontInstanceFlags::SUBPIXEL_BGR);
+ let mut src_row = bitmap.buffer;
+ let mut dest = 4 * padding * (padding + buffer_width);
+ let actual_end = final_buffer.len() - 4 * padding * (buffer_width + 1);
+ while dest < actual_end {
+ let mut src = src_row;
+ let row_end = dest + actual_width * 4;
+ match pixel_mode {
+ FT_Pixel_Mode::FT_PIXEL_MODE_MONO => {
+ while dest < row_end {
+ // Cast the byte to signed so that we can left shift each bit into
+ // the top bit, then right shift to fill out the bits with 0s or 1s.
+ let mut byte: i8 = unsafe { *src as i8 };
+ src = unsafe { src.offset(1) };
+ let byte_end = cmp::min(row_end, dest + 8 * 4);
+ while dest < byte_end {
+ let alpha = (byte >> 7) as u8;
+ final_buffer[dest + 0] = alpha;
+ final_buffer[dest + 1] = alpha;
+ final_buffer[dest + 2] = alpha;
+ final_buffer[dest + 3] = alpha;
+ dest += 4;
+ byte <<= 1;
+ }
+ }
+ }
+ FT_Pixel_Mode::FT_PIXEL_MODE_GRAY => {
+ while dest < row_end {
+ let alpha = unsafe { *src };
+ final_buffer[dest + 0] = alpha;
+ final_buffer[dest + 1] = alpha;
+ final_buffer[dest + 2] = alpha;
+ final_buffer[dest + 3] = alpha;
+ src = unsafe { src.offset(1) };
+ dest += 4;
+ }
+ }
+ FT_Pixel_Mode::FT_PIXEL_MODE_LCD => {
+ while dest < row_end {
+ let (mut r, g, mut b) = unsafe { (*src, *src.offset(1), *src.offset(2)) };
+ if subpixel_bgr {
+ mem::swap(&mut r, &mut b);
+ }
+ final_buffer[dest + 0] = b;
+ final_buffer[dest + 1] = g;
+ final_buffer[dest + 2] = r;
+ final_buffer[dest + 3] = max(max(b, g), r);
+ src = unsafe { src.offset(3) };
+ dest += 4;
+ }
+ }
+ FT_Pixel_Mode::FT_PIXEL_MODE_LCD_V => {
+ while dest < row_end {
+ let (mut r, g, mut b) =
+ unsafe { (*src, *src.offset(bitmap.pitch as isize), *src.offset((2 * bitmap.pitch) as isize)) };
+ if subpixel_bgr {
+ mem::swap(&mut r, &mut b);
+ }
+ final_buffer[dest + 0] = b;
+ final_buffer[dest + 1] = g;
+ final_buffer[dest + 2] = r;
+ final_buffer[dest + 3] = max(max(b, g), r);
+ src = unsafe { src.offset(1) };
+ dest += 4;
+ }
+ src_row = unsafe { src_row.offset((2 * bitmap.pitch) as isize) };
+ }
+ FT_Pixel_Mode::FT_PIXEL_MODE_BGRA => {
+ // The source is premultiplied BGRA data.
+ let dest_slice = &mut final_buffer[dest .. row_end];
+ let src_slice = unsafe { slice::from_raw_parts(src, dest_slice.len()) };
+ dest_slice.copy_from_slice(src_slice);
+ }
+ _ => panic!("Unsupported mode"),
+ }
+ src_row = unsafe { src_row.offset(bitmap.pitch as isize) };
+ dest = row_end + 8 * padding;
+ }
+
+ if font.use_texture_padding() {
+ left -= padding as i32;
+ top += padding as i32;
+ actual_width = buffer_width;
+ actual_height = buffer_height;
+ }
+
+ match format {
+ FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP => {
+ if font.synthetic_italics.is_enabled() {
+ let (skew_buffer, skew_width, skew_left) = skew_bitmap(
+ &final_buffer,
+ actual_width,
+ actual_height,
+ left,
+ top,
+ font.synthetic_italics.to_skew(),
+ font.flags.contains(FontInstanceFlags::VERTICAL),
+ );
+ final_buffer = skew_buffer;
+ actual_width = skew_width;
+ left = skew_left;
+ }
+ if font.flags.contains(FontInstanceFlags::TRANSPOSE) {
+ final_buffer = transpose_bitmap(&final_buffer, actual_width, actual_height);
+ mem::swap(&mut actual_width, &mut actual_height);
+ mem::swap(&mut left, &mut top);
+ left -= actual_width as i32;
+ top += actual_height as i32;
+ }
+ if font.flags.contains(FontInstanceFlags::FLIP_X) {
+ flip_bitmap_x(&mut final_buffer, actual_width, actual_height);
+ left = -(left + actual_width as i32);
+ }
+ if font.flags.contains(FontInstanceFlags::FLIP_Y) {
+ flip_bitmap_y(&mut final_buffer, actual_width, actual_height);
+ top = -(top - actual_height as i32);
+ }
+ }
+ FT_Glyph_Format::FT_GLYPH_FORMAT_OUTLINE => {
+ unsafe {
+ left += (*slot).bitmap_left;
+ top += (*slot).bitmap_top - height as i32;
+ }
+ }
+ _ => {}
+ }
+
+ let glyph_format = match (pixel_mode, format) {
+ (FT_Pixel_Mode::FT_PIXEL_MODE_LCD, _) |
+ (FT_Pixel_Mode::FT_PIXEL_MODE_LCD_V, _) => font.get_subpixel_glyph_format(),
+ (FT_Pixel_Mode::FT_PIXEL_MODE_BGRA, _) => GlyphFormat::ColorBitmap,
+ (_, FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP) => GlyphFormat::Bitmap,
+ _ => font.get_alpha_glyph_format(),
+ };
+
+ Ok(RasterizedGlyph {
+ left: left as f32,
+ top: top as f32,
+ width: actual_width as i32,
+ height: actual_height as i32,
+ scale,
+ format: glyph_format,
+ bytes: final_buffer,
+ })
+ }
+}
+
+impl Drop for FontContext {
+ fn drop(&mut self) {
+ self.variations.clear();
+ self.faces.clear();
+ unsafe {
+ FT_Done_FreeType(self.lib);
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/src/platform/windows/font.rs b/third_party/webrender/webrender/src/platform/windows/font.rs
new file mode 100644
index 00000000000..49ec039017c
--- /dev/null
+++ b/third_party/webrender/webrender/src/platform/windows/font.rs
@@ -0,0 +1,603 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{FontInstanceFlags, FontKey, FontRenderMode, FontVariation};
+use api::{ColorU, GlyphDimensions, NativeFontHandle};
+use dwrote;
+use crate::gamma_lut::ColorLut;
+use crate::glyph_rasterizer::{FontInstance, FontTransform, GlyphKey};
+use crate::internal_types::{FastHashMap, FastHashSet, ResourceCacheError};
+use crate::glyph_rasterizer::{GlyphFormat, GlyphRasterError, GlyphRasterResult, RasterizedGlyph};
+use crate::gamma_lut::GammaLut;
+use std::borrow::Borrow;
+use std::collections::hash_map::Entry;
+use std::hash::{Hash, Hasher};
+use std::path::Path;
+use std::sync::{Arc, Mutex};
+use api::FontInstancePlatformOptions;
+use std::mem;
+
+lazy_static! {
+ static ref DEFAULT_FONT_DESCRIPTOR: dwrote::FontDescriptor = dwrote::FontDescriptor {
+ family_name: "Arial".to_owned(),
+ weight: dwrote::FontWeight::Regular,
+ stretch: dwrote::FontStretch::Normal,
+ style: dwrote::FontStyle::Normal,
+ };
+}
+
+type CachedFontKey = Arc<Path>;
+
+// A cached dwrote font file that is shared among all faces.
+// Each face holds a CachedFontKey to keep track of how many users of the font there are.
+struct CachedFont {
+ key: CachedFontKey,
+ file: dwrote::FontFile,
+}
+
+// FontFile contains a ComPtr<IDWriteFontFile>, but DWrite font files are threadsafe.
+unsafe impl Send for CachedFont {}
+
+impl PartialEq for CachedFont {
+ fn eq(&self, other: &CachedFont) -> bool {
+ self.key == other.key
+ }
+}
+impl Eq for CachedFont {}
+
+impl Hash for CachedFont {
+ fn hash<H: Hasher>(&self, state: &mut H) {
+ self.key.hash(state);
+ }
+}
+
+impl Borrow<Path> for CachedFont {
+ fn borrow(&self) -> &Path {
+ &*self.key
+ }
+}
+
+lazy_static! {
+ // This is effectively a weak map of dwrote FontFiles. CachedFonts are entered into the
+ // cache when there are any FontFaces using them. CachedFonts are removed from the cache
+ // when there are no more FontFaces using them at all.
+ static ref FONT_CACHE: Mutex<FastHashSet<CachedFont>> = Mutex::new(FastHashSet::default());
+}
+
+struct FontFace {
+ cached: Option<CachedFontKey>,
+ file: dwrote::FontFile,
+ index: u32,
+ face: dwrote::FontFace,
+}
+
+pub struct FontContext {
+ fonts: FastHashMap<FontKey, FontFace>,
+ variations: FastHashMap<(FontKey, dwrote::DWRITE_FONT_SIMULATIONS, Vec<FontVariation>), dwrote::FontFace>,
+ gamma_luts: FastHashMap<(u16, u8), GammaLut>,
+}
+
+// DirectWrite is safe to use on multiple threads and non-shareable resources are
+// all hidden inside their font context.
+unsafe impl Send for FontContext {}
+
+fn dwrite_texture_type(render_mode: FontRenderMode) -> dwrote::DWRITE_TEXTURE_TYPE {
+ match render_mode {
+ FontRenderMode::Mono => dwrote::DWRITE_TEXTURE_ALIASED_1x1,
+ FontRenderMode::Alpha |
+ FontRenderMode::Subpixel => dwrote::DWRITE_TEXTURE_CLEARTYPE_3x1,
+ }
+}
+
+fn dwrite_measure_mode(
+ font: &FontInstance,
+ bitmaps: bool,
+) -> dwrote::DWRITE_MEASURING_MODE {
+ if bitmaps || font.flags.contains(FontInstanceFlags::FORCE_GDI) {
+ dwrote::DWRITE_MEASURING_MODE_GDI_CLASSIC
+ } else {
+ match font.render_mode {
+ FontRenderMode::Mono => dwrote::DWRITE_MEASURING_MODE_GDI_CLASSIC,
+ FontRenderMode::Alpha | FontRenderMode::Subpixel => dwrote::DWRITE_MEASURING_MODE_NATURAL,
+ }
+ }
+}
+
+fn dwrite_render_mode(
+ font_face: &dwrote::FontFace,
+ font: &FontInstance,
+ em_size: f32,
+ measure_mode: dwrote::DWRITE_MEASURING_MODE,
+ bitmaps: bool,
+) -> dwrote::DWRITE_RENDERING_MODE {
+ let dwrite_render_mode = match font.render_mode {
+ FontRenderMode::Mono => dwrote::DWRITE_RENDERING_MODE_ALIASED,
+ FontRenderMode::Alpha | FontRenderMode::Subpixel => {
+ if bitmaps || font.flags.contains(FontInstanceFlags::FORCE_GDI) {
+ dwrote::DWRITE_RENDERING_MODE_GDI_CLASSIC
+ } else if font.flags.contains(FontInstanceFlags::FORCE_SYMMETRIC) {
+ dwrote::DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC
+ } else if font.flags.contains(FontInstanceFlags::NO_SYMMETRIC) {
+ dwrote::DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL
+ } else {
+ font_face.get_recommended_rendering_mode_default_params(em_size, 1.0, measure_mode)
+ }
+ }
+ };
+
+ if dwrite_render_mode == dwrote::DWRITE_RENDERING_MODE_OUTLINE {
+ // Outline mode is not supported
+ return dwrote::DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC;
+ }
+
+ dwrite_render_mode
+}
+
+fn is_bitmap_font(font: &FontInstance) -> bool {
+ // If bitmaps are requested, then treat as a bitmap font to disable transforms.
+ // If mono AA is requested, let that take priority over using bitmaps.
+ font.render_mode != FontRenderMode::Mono &&
+ font.flags.contains(FontInstanceFlags::EMBEDDED_BITMAPS)
+}
+
+impl FontContext {
+ pub fn new() -> Result<FontContext, ResourceCacheError> {
+ Ok(FontContext {
+ fonts: FastHashMap::default(),
+ variations: FastHashMap::default(),
+ gamma_luts: FastHashMap::default(),
+ })
+ }
+
+ pub fn has_font(&self, font_key: &FontKey) -> bool {
+ self.fonts.contains_key(font_key)
+ }
+
+ fn add_font_descriptor(&mut self, font_key: &FontKey, desc: &dwrote::FontDescriptor) {
+ let system_fc = dwrote::FontCollection::get_system(false);
+ if let Some(font) = system_fc.get_font_from_descriptor(desc) {
+ let face = font.create_font_face();
+ let file = face.get_files().pop().unwrap();
+ let index = face.get_index();
+ self.fonts.insert(*font_key, FontFace { cached: None, file, index, face });
+ }
+ }
+
+ pub fn add_raw_font(&mut self, font_key: &FontKey, data: Arc<Vec<u8>>, index: u32) {
+ if self.fonts.contains_key(font_key) {
+ return;
+ }
+
+ if let Some(file) = dwrote::FontFile::new_from_data(data) {
+ if let Ok(face) = file.create_face(index, dwrote::DWRITE_FONT_SIMULATIONS_NONE) {
+ self.fonts.insert(*font_key, FontFace { cached: None, file, index, face });
+ return;
+ }
+ }
+ // XXX add_raw_font needs to have a way to return an error
+ debug!("DWrite WR failed to load font from data, using Arial instead");
+ self.add_font_descriptor(font_key, &DEFAULT_FONT_DESCRIPTOR);
+ }
+
+ pub fn add_native_font(&mut self, font_key: &FontKey, font_handle: NativeFontHandle) {
+ if self.fonts.contains_key(font_key) {
+ return;
+ }
+
+ let index = font_handle.index;
+ let mut cache = FONT_CACHE.lock().unwrap();
+ // Check to see if the font is already in the cache. If so, reuse it.
+ if let Some(font) = cache.get(font_handle.path.as_path()) {
+ if let Ok(face) = font.file.create_face(index, dwrote::DWRITE_FONT_SIMULATIONS_NONE) {
+ self.fonts.insert(
+ *font_key,
+ FontFace { cached: Some(font.key.clone()), file: font.file.clone(), index, face },
+ );
+ return;
+ }
+ }
+ if let Some(file) = dwrote::FontFile::new_from_path(&font_handle.path) {
+ // The font is not in the cache yet, so try to create the font and insert it in the cache.
+ if let Ok(face) = file.create_face(index, dwrote::DWRITE_FONT_SIMULATIONS_NONE) {
+ let key: CachedFontKey = font_handle.path.into();
+ self.fonts.insert(
+ *font_key,
+ FontFace { cached: Some(key.clone()), file: file.clone(), index, face },
+ );
+ cache.insert(CachedFont { key, file });
+ return;
+ }
+ }
+
+ // XXX add_native_font needs to have a way to return an error
+ debug!("DWrite WR failed to load font from path, using Arial instead");
+ self.add_font_descriptor(font_key, &DEFAULT_FONT_DESCRIPTOR);
+ }
+
+ pub fn delete_font(&mut self, font_key: &FontKey) {
+ if let Some(face) = self.fonts.remove(font_key) {
+ self.variations.retain(|k, _| k.0 != *font_key);
+ // Check if this was a cached font.
+ if let Some(key) = face.cached {
+ let mut cache = FONT_CACHE.lock().unwrap();
+ // If there are only two references left, that means only this face and
+ // the cache are using the font. So remove it from the cache.
+ if Arc::strong_count(&key) == 2 {
+ cache.remove(&*key);
+ }
+ }
+ }
+ }
+
+ pub fn delete_font_instance(&mut self, instance: &FontInstance) {
+ // Ensure we don't keep around excessive amounts of stale variations.
+ if !instance.variations.is_empty() {
+ let sims = if instance.flags.contains(FontInstanceFlags::SYNTHETIC_BOLD) {
+ dwrote::DWRITE_FONT_SIMULATIONS_BOLD
+ } else {
+ dwrote::DWRITE_FONT_SIMULATIONS_NONE
+ };
+ self.variations.remove(&(instance.font_key, sims, instance.variations.clone()));
+ }
+ }
+
+ // Assumes RGB format from dwrite, which is 3 bytes per pixel as dwrite
+ // doesn't output an alpha value via GlyphRunAnalysis::CreateAlphaTexture
+ #[allow(dead_code)]
+ fn print_glyph_data(&self, data: &[u8], width: usize, height: usize) {
+ // Rust doesn't have step_by support on stable :(
+ for i in 0 .. height {
+ let current_height = i * width * 3;
+
+ for pixel in data[current_height .. current_height + (width * 3)].chunks(3) {
+ let r = pixel[0];
+ let g = pixel[1];
+ let b = pixel[2];
+ print!("({}, {}, {}) ", r, g, b,);
+ }
+ println!();
+ }
+ }
+
+ fn get_font_face(
+ &mut self,
+ font: &FontInstance,
+ ) -> &dwrote::FontFace {
+ if !font.flags.contains(FontInstanceFlags::SYNTHETIC_BOLD) &&
+ font.variations.is_empty() {
+ return &self.fonts.get(&font.font_key).unwrap().face;
+ }
+ let sims = if font.flags.contains(FontInstanceFlags::SYNTHETIC_BOLD) {
+ dwrote::DWRITE_FONT_SIMULATIONS_BOLD
+ } else {
+ dwrote::DWRITE_FONT_SIMULATIONS_NONE
+ };
+ match self.variations.entry((font.font_key, sims, font.variations.clone())) {
+ Entry::Occupied(entry) => entry.into_mut(),
+ Entry::Vacant(entry) => {
+ let normal_face = self.fonts.get(&font.font_key).unwrap();
+ if !font.variations.is_empty() {
+ if let Some(var_face) = normal_face.face.create_font_face_with_variations(
+ sims,
+ &font.variations.iter().map(|var| {
+ dwrote::DWRITE_FONT_AXIS_VALUE {
+ // OpenType tags are big-endian, but DWrite wants little-endian.
+ axisTag: var.tag.swap_bytes(),
+ value: var.value,
+ }
+ }).collect::<Vec<_>>(),
+ ) {
+ return entry.insert(var_face);
+ }
+ }
+ let var_face = normal_face.file
+ .create_face(normal_face.index, sims)
+ .unwrap_or_else(|_| normal_face.face.clone());
+ entry.insert(var_face)
+ }
+ }
+ }
+
+ fn create_glyph_analysis(
+ &mut self,
+ font: &FontInstance,
+ key: &GlyphKey,
+ size: f32,
+ transform: Option<dwrote::DWRITE_MATRIX>,
+ bitmaps: bool,
+ ) -> Result<(dwrote::GlyphRunAnalysis, dwrote::DWRITE_TEXTURE_TYPE, dwrote::RECT), dwrote::HRESULT> {
+ let face = self.get_font_face(font);
+ let glyph = key.index() as u16;
+ let advance = 0.0f32;
+ let offset = dwrote::GlyphOffset {
+ advanceOffset: 0.0,
+ ascenderOffset: 0.0,
+ };
+
+ let glyph_run = dwrote::DWRITE_GLYPH_RUN {
+ fontFace: unsafe { face.as_ptr() },
+ fontEmSize: size, // size in DIPs (1/96", same as CSS pixels)
+ glyphCount: 1,
+ glyphIndices: &glyph,
+ glyphAdvances: &advance,
+ glyphOffsets: &offset,
+ isSideways: 0,
+ bidiLevel: 0,
+ };
+
+ let dwrite_measure_mode = dwrite_measure_mode(font, bitmaps);
+ let dwrite_render_mode = dwrite_render_mode(
+ face,
+ font,
+ size,
+ dwrite_measure_mode,
+ bitmaps,
+ );
+
+ let analysis = dwrote::GlyphRunAnalysis::create(
+ &glyph_run,
+ 1.0,
+ transform,
+ dwrite_render_mode,
+ dwrite_measure_mode,
+ 0.0,
+ 0.0,
+ )?;
+ let texture_type = dwrite_texture_type(font.render_mode);
+ let bounds = analysis.get_alpha_texture_bounds(texture_type)?;
+ // If the bounds are empty, then we might not be able to render the glyph with cleartype.
+ // Try again with aliased rendering to check if that works instead.
+ if font.render_mode != FontRenderMode::Mono &&
+ (bounds.left == bounds.right || bounds.top == bounds.bottom) {
+ let analysis2 = dwrote::GlyphRunAnalysis::create(
+ &glyph_run,
+ 1.0,
+ transform,
+ dwrote::DWRITE_RENDERING_MODE_ALIASED,
+ dwrite_measure_mode,
+ 0.0,
+ 0.0,
+ )?;
+ let bounds2 = analysis2.get_alpha_texture_bounds(dwrote::DWRITE_TEXTURE_ALIASED_1x1)?;
+ if bounds2.left != bounds2.right && bounds2.top != bounds2.bottom {
+ return Ok((analysis2, dwrote::DWRITE_TEXTURE_ALIASED_1x1, bounds2));
+ }
+ }
+ Ok((analysis, texture_type, bounds))
+ }
+
+ pub fn get_glyph_index(&mut self, font_key: FontKey, ch: char) -> Option<u32> {
+ let face = &self.fonts.get(&font_key).unwrap().face;
+ let indices = face.get_glyph_indices(&[ch as u32]);
+ indices.first().map(|idx| *idx as u32)
+ }
+
+ pub fn get_glyph_dimensions(
+ &mut self,
+ font: &FontInstance,
+ key: &GlyphKey,
+ ) -> Option<GlyphDimensions> {
+ let (size, _, bitmaps, transform) = Self::get_glyph_parameters(font, key);
+ let (_, _, bounds) = self.create_glyph_analysis(font, key, size, transform, bitmaps).ok()?;
+
+ let width = (bounds.right - bounds.left) as i32;
+ let height = (bounds.bottom - bounds.top) as i32;
+
+ // Alpha texture bounds can sometimes return an empty rect
+ // Such as for spaces
+ if width == 0 || height == 0 {
+ return None;
+ }
+
+ let face = self.get_font_face(font);
+ face.get_design_glyph_metrics(&[key.index() as u16], false)
+ .first()
+ .map(|metrics| {
+ let em_size = size / 16.;
+ let design_units_per_pixel = face.metrics().metrics0().designUnitsPerEm as f32 / 16. as f32;
+ let scaled_design_units_to_pixels = em_size / design_units_per_pixel;
+ let advance = metrics.advanceWidth as f32 * scaled_design_units_to_pixels;
+
+ GlyphDimensions {
+ left: bounds.left,
+ top: -bounds.top,
+ width,
+ height,
+ advance,
+ }
+ })
+ }
+
+ // DWrite ClearType gives us values in RGB, but WR expects BGRA.
+ fn convert_to_bgra(
+ &self,
+ pixels: &[u8],
+ width: usize,
+ height: usize,
+ texture_type: dwrote::DWRITE_TEXTURE_TYPE,
+ render_mode: FontRenderMode,
+ bitmaps: bool,
+ subpixel_bgr: bool,
+ texture_padding: bool,
+ ) -> Vec<u8> {
+ let (buffer_width, buffer_height, padding) = if texture_padding {
+ (width + 2, height + 2, 1)
+ } else {
+ (width, height, 0)
+ };
+
+ let buffer_length = buffer_width * buffer_height * 4;
+ let mut bgra_pixels: Vec<u8> = vec![0; buffer_length];
+
+ match (texture_type, render_mode, bitmaps) {
+ (dwrote::DWRITE_TEXTURE_ALIASED_1x1, _, _) => {
+ assert!(width * height == pixels.len());
+ let mut i = 0;
+ for row in padding .. height + padding {
+ let row_offset = row * buffer_width;
+ for col in padding .. width + padding {
+ let offset = (row_offset + col) * 4;
+ let alpha = pixels[i];
+ i += 1;
+ bgra_pixels[offset + 0] = alpha;
+ bgra_pixels[offset + 1] = alpha;
+ bgra_pixels[offset + 2] = alpha;
+ bgra_pixels[offset + 3] = alpha;
+ }
+ }
+ }
+ (_, FontRenderMode::Subpixel, false) => {
+ assert!(width * height * 3 == pixels.len());
+ let mut i = 0;
+ for row in padding .. height + padding {
+ let row_offset = row * buffer_width;
+ for col in padding .. width + padding {
+ let offset = (row_offset + col) * 4;
+ let (mut r, g, mut b) = (pixels[i + 0], pixels[i + 1], pixels[i + 2]);
+ if subpixel_bgr {
+ mem::swap(&mut r, &mut b);
+ }
+ i += 3;
+ bgra_pixels[offset + 0] = b;
+ bgra_pixels[offset + 1] = g;
+ bgra_pixels[offset + 2] = r;
+ bgra_pixels[offset + 3] = 0xff;
+ }
+ }
+ }
+ _ => {
+ assert!(width * height * 3 == pixels.len());
+ let mut i = 0;
+ for row in padding .. height + padding {
+ let row_offset = row * buffer_width;
+ for col in padding .. width + padding {
+ let offset = (row_offset + col) * 4;
+ // Only take the G channel, as its closest to D2D
+ let alpha = pixels[i + 1] as u8;
+ i += 3;
+ bgra_pixels[offset + 0] = alpha;
+ bgra_pixels[offset + 1] = alpha;
+ bgra_pixels[offset + 2] = alpha;
+ bgra_pixels[offset + 3] = alpha;
+ }
+ }
+ }
+ };
+ bgra_pixels
+ }
+
+ pub fn prepare_font(font: &mut FontInstance) {
+ match font.render_mode {
+ FontRenderMode::Mono => {
+ // In mono mode the color of the font is irrelevant.
+ font.color = ColorU::new(255, 255, 255, 255);
+ // Subpixel positioning is disabled in mono mode.
+ font.disable_subpixel_position();
+ }
+ FontRenderMode::Alpha => {
+ font.color = font.color.luminance_color().quantize();
+ }
+ FontRenderMode::Subpixel => {
+ font.color = font.color.quantize();
+ }
+ }
+ }
+
+ fn get_glyph_parameters(font: &FontInstance, key: &GlyphKey) -> (f32, f64, bool, Option<dwrote::DWRITE_MATRIX>) {
+ let (_, y_scale) = font.transform.compute_scale().unwrap_or((1.0, 1.0));
+ let scaled_size = font.size.to_f64_px() * y_scale;
+ let bitmaps = is_bitmap_font(font);
+ let (mut shape, (mut x_offset, mut y_offset)) = if bitmaps {
+ (FontTransform::identity(), (0.0, 0.0))
+ } else {
+ (font.transform.invert_scale(y_scale, y_scale), font.get_subpx_offset(key))
+ };
+ if font.flags.contains(FontInstanceFlags::FLIP_X) {
+ shape = shape.flip_x();
+ }
+ if font.flags.contains(FontInstanceFlags::FLIP_Y) {
+ shape = shape.flip_y();
+ }
+ if font.flags.contains(FontInstanceFlags::TRANSPOSE) {
+ shape = shape.swap_xy();
+ }
+ let (mut tx, mut ty) = (0.0, 0.0);
+ if font.synthetic_italics.is_enabled() {
+ let (shape_, (tx_, ty_)) = font.synthesize_italics(shape, scaled_size);
+ shape = shape_;
+ tx = tx_;
+ ty = ty_;
+ };
+ x_offset += tx;
+ y_offset += ty;
+ let transform = if !shape.is_identity() || (x_offset, y_offset) != (0.0, 0.0) {
+ Some(dwrote::DWRITE_MATRIX {
+ m11: shape.scale_x,
+ m12: shape.skew_y,
+ m21: shape.skew_x,
+ m22: shape.scale_y,
+ dx: x_offset as f32,
+ dy: y_offset as f32,
+ })
+ } else {
+ None
+ };
+ (scaled_size as f32, y_scale, bitmaps, transform)
+ }
+
+ pub fn rasterize_glyph(&mut self, font: &FontInstance, key: &GlyphKey) -> GlyphRasterResult {
+ let (size, y_scale, bitmaps, transform) = Self::get_glyph_parameters(font, key);
+ let (analysis, texture_type, bounds) = self.create_glyph_analysis(font, key, size, transform, bitmaps)
+ .or(Err(GlyphRasterError::LoadFailed))?;
+ let width = (bounds.right - bounds.left) as i32;
+ let height = (bounds.bottom - bounds.top) as i32;
+ // Alpha texture bounds can sometimes return an empty rect
+ // Such as for spaces
+ if width == 0 || height == 0 {
+ return Err(GlyphRasterError::LoadFailed);
+ }
+
+ let pixels = analysis.create_alpha_texture(texture_type, bounds).or(Err(GlyphRasterError::LoadFailed))?;
+ let mut bgra_pixels = self.convert_to_bgra(&pixels, width as usize, height as usize,
+ texture_type, font.render_mode, bitmaps,
+ font.flags.contains(FontInstanceFlags::SUBPIXEL_BGR),
+ font.use_texture_padding());
+
+ let FontInstancePlatformOptions { gamma, contrast, cleartype_level, .. } =
+ font.platform_options.unwrap_or_default();
+ let gamma_lut = self.gamma_luts
+ .entry((gamma, contrast))
+ .or_insert_with(||
+ GammaLut::new(
+ contrast as f32 / 100.0,
+ gamma as f32 / 100.0,
+ gamma as f32 / 100.0,
+ ));
+ if bitmaps || texture_type == dwrote::DWRITE_TEXTURE_ALIASED_1x1 ||
+ font.render_mode != FontRenderMode::Subpixel {
+ gamma_lut.preblend(&mut bgra_pixels, font.color);
+ } else {
+ gamma_lut.preblend_scaled(&mut bgra_pixels, font.color, cleartype_level);
+ }
+
+ let format = if bitmaps {
+ GlyphFormat::Bitmap
+ } else if texture_type == dwrote::DWRITE_TEXTURE_ALIASED_1x1 {
+ font.get_alpha_glyph_format()
+ } else {
+ font.get_glyph_format()
+ };
+
+ let padding = if font.use_texture_padding() { 1 } else { 0 };
+ Ok(RasterizedGlyph {
+ left: (bounds.left - padding) as f32,
+ top: (-bounds.top + padding) as f32,
+ width: width + padding * 2,
+ height: height + padding * 2,
+ scale: (if bitmaps { y_scale.recip() } else { 1.0 }) as f32,
+ format,
+ bytes: bgra_pixels,
+ })
+ }
+}
diff --git a/third_party/webrender/webrender/src/prim_store/backdrop.rs b/third_party/webrender/webrender/src/prim_store/backdrop.rs
new file mode 100644
index 00000000000..ea033574fb2
--- /dev/null
+++ b/third_party/webrender/webrender/src/prim_store/backdrop.rs
@@ -0,0 +1,97 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::units::*;
+use crate::spatial_tree::SpatialNodeIndex;
+use crate::intern::{Internable, InternDebug, Handle as InternHandle};
+use crate::internal_types::LayoutPrimitiveInfo;
+use crate::prim_store::{
+ InternablePrimitive, PictureIndex, PrimitiveInstanceKind, PrimKey, PrimTemplate,
+ PrimTemplateCommonData, PrimitiveStore, RectangleKey,
+};
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, PartialEq, MallocSizeOf, Hash)]
+pub struct Backdrop {
+ pub pic_index: PictureIndex,
+ pub spatial_node_index: SpatialNodeIndex,
+ pub border_rect: RectangleKey,
+}
+
+impl From<Backdrop> for BackdropData {
+ fn from(backdrop: Backdrop) -> Self {
+ BackdropData {
+ pic_index: backdrop.pic_index,
+ spatial_node_index: backdrop.spatial_node_index,
+ border_rect: backdrop.border_rect.into(),
+ }
+ }
+}
+
+pub type BackdropKey = PrimKey<Backdrop>;
+
+impl BackdropKey {
+ pub fn new(
+ info: &LayoutPrimitiveInfo,
+ backdrop: Backdrop,
+ ) -> Self {
+ BackdropKey {
+ common: info.into(),
+ kind: backdrop,
+ }
+ }
+}
+
+impl InternDebug for BackdropKey {}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, MallocSizeOf)]
+pub struct BackdropData {
+ pub pic_index: PictureIndex,
+ pub spatial_node_index: SpatialNodeIndex,
+ pub border_rect: LayoutRect,
+}
+
+pub type BackdropTemplate = PrimTemplate<BackdropData>;
+
+impl From<BackdropKey> for BackdropTemplate {
+ fn from(backdrop: BackdropKey) -> Self {
+ let common = PrimTemplateCommonData::with_key_common(backdrop.common);
+
+ BackdropTemplate {
+ common,
+ kind: backdrop.kind.into(),
+ }
+ }
+}
+
+pub type BackdropDataHandle = InternHandle<Backdrop>;
+
+impl Internable for Backdrop {
+ type Key = BackdropKey;
+ type StoreData = BackdropTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for Backdrop {
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> BackdropKey {
+ BackdropKey::new(info, self)
+ }
+
+ fn make_instance_kind(
+ _key: BackdropKey,
+ data_handle: BackdropDataHandle,
+ _prim_store: &mut PrimitiveStore,
+ _reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ PrimitiveInstanceKind::Backdrop {
+ data_handle,
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/src/prim_store/borders.rs b/third_party/webrender/webrender/src/prim_store/borders.rs
new file mode 100644
index 00000000000..084350c3357
--- /dev/null
+++ b/third_party/webrender/webrender/src/prim_store/borders.rs
@@ -0,0 +1,368 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{NormalBorder, PremultipliedColorF, Shadow};
+use api::units::*;
+use crate::border::create_border_segments;
+use crate::border::NormalBorderAu;
+use crate::scene_building::{CreateShadow, IsVisible};
+use crate::frame_builder::{FrameBuildingState};
+use crate::gpu_cache::{GpuCache, GpuDataRequest};
+use crate::intern;
+use crate::internal_types::LayoutPrimitiveInfo;
+use crate::prim_store::{
+ BorderSegmentInfo, BrushSegment, NinePatchDescriptor, PrimKey,
+ PrimTemplate, PrimTemplateCommonData,
+ PrimitiveInstanceKind, PrimitiveOpacity,
+ PrimitiveStore, InternablePrimitive,
+};
+use crate::resource_cache::{ImageRequest, ResourceCache};
+use crate::storage;
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
+pub struct NormalBorderPrim {
+ pub border: NormalBorderAu,
+ pub widths: LayoutSideOffsetsAu,
+}
+
+pub type NormalBorderKey = PrimKey<NormalBorderPrim>;
+
+impl NormalBorderKey {
+ pub fn new(
+ info: &LayoutPrimitiveInfo,
+ normal_border: NormalBorderPrim,
+ ) -> Self {
+ NormalBorderKey {
+ common: info.into(),
+ kind: normal_border,
+ }
+ }
+}
+
+impl intern::InternDebug for NormalBorderKey {}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct NormalBorderData {
+ pub brush_segments: Vec<BrushSegment>,
+ pub border_segments: Vec<BorderSegmentInfo>,
+ pub border: NormalBorder,
+ pub widths: LayoutSideOffsets,
+}
+
+impl NormalBorderData {
+ /// Update the GPU cache for a given primitive template. This may be called multiple
+ /// times per frame, by each primitive reference that refers to this interned
+ /// template. The initial request call to the GPU cache ensures that work is only
+ /// done if the cache entry is invalid (due to first use or eviction).
+ pub fn update(
+ &mut self,
+ common: &mut PrimTemplateCommonData,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ if let Some(ref mut request) = frame_state.gpu_cache.request(&mut common.gpu_cache_handle) {
+ self.write_prim_gpu_blocks(request, common.prim_rect.size);
+ self.write_segment_gpu_blocks(request);
+ }
+
+ common.opacity = PrimitiveOpacity::translucent();
+ }
+
+ fn write_prim_gpu_blocks(
+ &self,
+ request: &mut GpuDataRequest,
+ prim_size: LayoutSize
+ ) {
+ // Border primitives currently used for
+ // image borders, and run through the
+ // normal brush_image shader.
+ request.push(PremultipliedColorF::WHITE);
+ request.push(PremultipliedColorF::WHITE);
+ request.push([
+ prim_size.width,
+ prim_size.height,
+ 0.0,
+ 0.0,
+ ]);
+ }
+
+ fn write_segment_gpu_blocks(
+ &self,
+ request: &mut GpuDataRequest,
+ ) {
+ for segment in &self.brush_segments {
+ // has to match VECS_PER_SEGMENT
+ request.write_segment(
+ segment.local_rect,
+ segment.extra_data,
+ );
+ }
+ }
+}
+
+pub type NormalBorderTemplate = PrimTemplate<NormalBorderData>;
+
+impl From<NormalBorderKey> for NormalBorderTemplate {
+ fn from(key: NormalBorderKey) -> Self {
+ let common = PrimTemplateCommonData::with_key_common(key.common);
+
+ let mut border: NormalBorder = key.kind.border.into();
+ let widths = LayoutSideOffsets::from_au(key.kind.widths);
+
+ // FIXME(emilio): Is this the best place to do this?
+ border.normalize(&widths);
+
+ let mut brush_segments = Vec::new();
+ let mut border_segments = Vec::new();
+
+ create_border_segments(
+ common.prim_rect.size,
+ &border,
+ &widths,
+ &mut border_segments,
+ &mut brush_segments,
+ );
+
+ NormalBorderTemplate {
+ common,
+ kind: NormalBorderData {
+ brush_segments,
+ border_segments,
+ border,
+ widths,
+ }
+ }
+ }
+}
+
+pub type NormalBorderDataHandle = intern::Handle<NormalBorderPrim>;
+
+impl intern::Internable for NormalBorderPrim {
+ type Key = NormalBorderKey;
+ type StoreData = NormalBorderTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for NormalBorderPrim {
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> NormalBorderKey {
+ NormalBorderKey::new(
+ info,
+ self,
+ )
+ }
+
+ fn make_instance_kind(
+ _key: NormalBorderKey,
+ data_handle: NormalBorderDataHandle,
+ _: &mut PrimitiveStore,
+ _reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ PrimitiveInstanceKind::NormalBorder {
+ data_handle,
+ cache_handles: storage::Range::empty(),
+ }
+ }
+}
+
+impl CreateShadow for NormalBorderPrim {
+ fn create_shadow(&self, shadow: &Shadow) -> Self {
+ let border = self.border.with_color(shadow.color.into());
+ NormalBorderPrim {
+ border,
+ widths: self.widths,
+ }
+ }
+}
+
+impl IsVisible for NormalBorderPrim {
+ fn is_visible(&self) -> bool {
+ true
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
+pub struct ImageBorder {
+ #[ignore_malloc_size_of = "Arc"]
+ pub request: ImageRequest,
+ pub nine_patch: NinePatchDescriptor,
+}
+
+pub type ImageBorderKey = PrimKey<ImageBorder>;
+
+impl ImageBorderKey {
+ pub fn new(
+ info: &LayoutPrimitiveInfo,
+ image_border: ImageBorder,
+ ) -> Self {
+ ImageBorderKey {
+ common: info.into(),
+ kind: image_border,
+ }
+ }
+}
+
+impl intern::InternDebug for ImageBorderKey {}
+
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct ImageBorderData {
+ #[ignore_malloc_size_of = "Arc"]
+ pub request: ImageRequest,
+ pub brush_segments: Vec<BrushSegment>,
+}
+
+impl ImageBorderData {
+ /// Update the GPU cache for a given primitive template. This may be called multiple
+ /// times per frame, by each primitive reference that refers to this interned
+ /// template. The initial request call to the GPU cache ensures that work is only
+ /// done if the cache entry is invalid (due to first use or eviction).
+ pub fn update(
+ &mut self,
+ common: &mut PrimTemplateCommonData,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ if let Some(ref mut request) = frame_state.gpu_cache.request(&mut common.gpu_cache_handle) {
+ self.write_prim_gpu_blocks(request, &common.prim_rect.size);
+ self.write_segment_gpu_blocks(request);
+ }
+
+ let image_properties = frame_state
+ .resource_cache
+ .get_image_properties(self.request.key);
+
+ common.opacity = if let Some(image_properties) = image_properties {
+ PrimitiveOpacity {
+ is_opaque: image_properties.descriptor.is_opaque(),
+ }
+ } else {
+ PrimitiveOpacity::opaque()
+ }
+ }
+
+ pub fn request_resources(
+ &mut self,
+ resource_cache: &mut ResourceCache,
+ gpu_cache: &mut GpuCache,
+ ) {
+ resource_cache.request_image(
+ self.request,
+ gpu_cache,
+ );
+ }
+
+ fn write_prim_gpu_blocks(
+ &self,
+ request: &mut GpuDataRequest,
+ prim_size: &LayoutSize,
+ ) {
+ // Border primitives currently used for
+ // image borders, and run through the
+ // normal brush_image shader.
+ request.push(PremultipliedColorF::WHITE);
+ request.push(PremultipliedColorF::WHITE);
+ request.push([
+ prim_size.width,
+ prim_size.height,
+ 0.0,
+ 0.0,
+ ]);
+ }
+
+ fn write_segment_gpu_blocks(
+ &self,
+ request: &mut GpuDataRequest,
+ ) {
+ for segment in &self.brush_segments {
+ // has to match VECS_PER_SEGMENT
+ request.write_segment(
+ segment.local_rect,
+ segment.extra_data,
+ );
+ }
+ }
+}
+
+pub type ImageBorderTemplate = PrimTemplate<ImageBorderData>;
+
+impl From<ImageBorderKey> for ImageBorderTemplate {
+ fn from(key: ImageBorderKey) -> Self {
+ let common = PrimTemplateCommonData::with_key_common(key.common);
+
+ let brush_segments = key.kind.nine_patch.create_segments(common.prim_rect.size);
+ ImageBorderTemplate {
+ common,
+ kind: ImageBorderData {
+ request: key.kind.request,
+ brush_segments,
+ }
+ }
+ }
+}
+
+pub type ImageBorderDataHandle = intern::Handle<ImageBorder>;
+
+impl intern::Internable for ImageBorder {
+ type Key = ImageBorderKey;
+ type StoreData = ImageBorderTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for ImageBorder {
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> ImageBorderKey {
+ ImageBorderKey::new(
+ info,
+ self,
+ )
+ }
+
+ fn make_instance_kind(
+ _key: ImageBorderKey,
+ data_handle: ImageBorderDataHandle,
+ _: &mut PrimitiveStore,
+ _reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ PrimitiveInstanceKind::ImageBorder {
+ data_handle
+ }
+ }
+}
+
+impl IsVisible for ImageBorder {
+ fn is_visible(&self) -> bool {
+ true
+ }
+}
+
+#[test]
+#[cfg(target_pointer_width = "64")]
+fn test_struct_sizes() {
+ use std::mem;
+ // The sizes of these structures are critical for performance on a number of
+ // talos stress tests. If you get a failure here on CI, there's two possibilities:
+ // (a) You made a structure smaller than it currently is. Great work! Update the
+ // test expectations and move on.
+ // (b) You made a structure larger. This is not necessarily a problem, but should only
+ // be done with care, and after checking if talos performance regresses badly.
+ assert_eq!(mem::size_of::<NormalBorderPrim>(), 84, "NormalBorderPrim size changed");
+ assert_eq!(mem::size_of::<NormalBorderTemplate>(), 216, "NormalBorderTemplate size changed");
+ assert_eq!(mem::size_of::<NormalBorderKey>(), 104, "NormalBorderKey size changed");
+ assert_eq!(mem::size_of::<ImageBorder>(), 84, "ImageBorder size changed");
+ assert_eq!(mem::size_of::<ImageBorderTemplate>(), 80, "ImageBorderTemplate size changed");
+ assert_eq!(mem::size_of::<ImageBorderKey>(), 104, "ImageBorderKey size changed");
+}
diff --git a/third_party/webrender/webrender/src/prim_store/gradient.rs b/third_party/webrender/webrender/src/prim_store/gradient.rs
new file mode 100644
index 00000000000..add65ad8cd8
--- /dev/null
+++ b/third_party/webrender/webrender/src/prim_store/gradient.rs
@@ -0,0 +1,1007 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{
+ ColorF, ColorU, ExtendMode, GradientStop,
+ PremultipliedColorF, LineOrientation,
+};
+use api::units::{LayoutPoint, LayoutSize, LayoutVector2D};
+use crate::scene_building::IsVisible;
+use euclid::approxeq::ApproxEq;
+use crate::frame_builder::FrameBuildingState;
+use crate::gpu_cache::{GpuCacheHandle, GpuDataRequest};
+use crate::intern::{Internable, InternDebug, Handle as InternHandle};
+use crate::internal_types::LayoutPrimitiveInfo;
+use crate::prim_store::{BrushSegment, CachedGradientSegment, GradientTileRange, VectorKey};
+use crate::prim_store::{PrimitiveInstanceKind, PrimitiveOpacity};
+use crate::prim_store::{PrimKeyCommonData, PrimTemplateCommonData, PrimitiveStore};
+use crate::prim_store::{NinePatchDescriptor, PointKey, SizeKey, InternablePrimitive};
+use std::{hash, ops::{Deref, DerefMut}};
+use crate::util::pack_as_float;
+use crate::texture_cache::TEXTURE_REGION_DIMENSIONS;
+
+/// The maximum number of stops a gradient may have to use the fast path.
+pub const GRADIENT_FP_STOPS: usize = 4;
+
+/// A hashable gradient stop that can be used in primitive keys.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Copy, Clone, MallocSizeOf, PartialEq)]
+pub struct GradientStopKey {
+ pub offset: f32,
+ pub color: ColorU,
+}
+
+impl GradientStopKey {
+ pub fn empty() -> Self {
+ GradientStopKey {
+ offset: 0.0,
+ color: ColorU::new(0, 0, 0, 0),
+ }
+ }
+}
+
+impl Into<GradientStopKey> for GradientStop {
+ fn into(self) -> GradientStopKey {
+ GradientStopKey {
+ offset: self.offset,
+ color: self.color.into(),
+ }
+ }
+}
+
+// Convert `stop_keys` into a vector of `GradientStop`s, which is a more
+// convenient representation for the current gradient builder. Compute the
+// minimum stop alpha along the way.
+fn stops_and_min_alpha(stop_keys: &[GradientStopKey]) -> (Vec<GradientStop>, f32) {
+ let mut min_alpha: f32 = 1.0;
+ let stops = stop_keys.iter().map(|stop_key| {
+ let color: ColorF = stop_key.color.into();
+ min_alpha = min_alpha.min(color.a);
+
+ GradientStop {
+ offset: stop_key.offset,
+ color,
+ }
+ }).collect();
+
+ (stops, min_alpha)
+}
+
+impl Eq for GradientStopKey {}
+
+impl hash::Hash for GradientStopKey {
+ fn hash<H: hash::Hasher>(&self, state: &mut H) {
+ self.offset.to_bits().hash(state);
+ self.color.hash(state);
+ }
+}
+
+/// Identifying key for a linear gradient.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, PartialEq, Hash, MallocSizeOf)]
+pub struct LinearGradientKey {
+ pub common: PrimKeyCommonData,
+ pub extend_mode: ExtendMode,
+ pub start_point: PointKey,
+ pub end_point: PointKey,
+ pub stretch_size: SizeKey,
+ pub tile_spacing: SizeKey,
+ pub stops: Vec<GradientStopKey>,
+ pub reverse_stops: bool,
+ pub nine_patch: Option<Box<NinePatchDescriptor>>,
+}
+
+impl LinearGradientKey {
+ pub fn new(
+ info: &LayoutPrimitiveInfo,
+ linear_grad: LinearGradient,
+ ) -> Self {
+ LinearGradientKey {
+ common: info.into(),
+ extend_mode: linear_grad.extend_mode,
+ start_point: linear_grad.start_point,
+ end_point: linear_grad.end_point,
+ stretch_size: linear_grad.stretch_size,
+ tile_spacing: linear_grad.tile_spacing,
+ stops: linear_grad.stops,
+ reverse_stops: linear_grad.reverse_stops,
+ nine_patch: linear_grad.nine_patch,
+ }
+ }
+}
+
+impl InternDebug for LinearGradientKey {}
+
+#[derive(Clone, Debug, Hash, MallocSizeOf, PartialEq, Eq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct GradientCacheKey {
+ pub orientation: LineOrientation,
+ pub start_stop_point: VectorKey,
+ pub stops: [GradientStopKey; GRADIENT_FP_STOPS],
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct LinearGradientTemplate {
+ pub common: PrimTemplateCommonData,
+ pub extend_mode: ExtendMode,
+ pub start_point: LayoutPoint,
+ pub end_point: LayoutPoint,
+ pub stretch_size: LayoutSize,
+ pub tile_spacing: LayoutSize,
+ pub stops_opacity: PrimitiveOpacity,
+ pub stops: Vec<GradientStop>,
+ pub brush_segments: Vec<BrushSegment>,
+ pub reverse_stops: bool,
+ pub stops_handle: GpuCacheHandle,
+ /// If true, this gradient can be drawn via the fast path
+ /// (cache gradient, and draw as image).
+ pub supports_caching: bool,
+}
+
+impl Deref for LinearGradientTemplate {
+ type Target = PrimTemplateCommonData;
+ fn deref(&self) -> &Self::Target {
+ &self.common
+ }
+}
+
+impl DerefMut for LinearGradientTemplate {
+ fn deref_mut(&mut self) -> &mut Self::Target {
+ &mut self.common
+ }
+}
+
+impl From<LinearGradientKey> for LinearGradientTemplate {
+ fn from(item: LinearGradientKey) -> Self {
+ let common = PrimTemplateCommonData::with_key_common(item.common);
+
+ // Check if we can draw this gradient via a fast path by caching the
+ // gradient in a smaller task, and drawing as an image.
+ // TODO(gw): Aim to reduce the constraints on fast path gradients in future,
+ // although this catches the vast majority of gradients on real pages.
+ let mut supports_caching =
+ // Gradient must cover entire primitive
+ item.tile_spacing.w + item.stretch_size.w >= common.prim_rect.size.width &&
+ item.tile_spacing.h + item.stretch_size.h >= common.prim_rect.size.height &&
+ // Must be a vertical or horizontal gradient
+ (item.start_point.x.approx_eq(&item.end_point.x) ||
+ item.start_point.y.approx_eq(&item.end_point.y)) &&
+ // Fast path not supported on segmented (border-image) gradients.
+ item.nine_patch.is_none();
+
+ // if we support caching and the gradient uses repeat, we might potentially
+ // emit a lot of quads to cover the primitive. each quad will still cover
+ // the entire gradient along the other axis, so the effect is linear in
+ // display resolution, not quadratic (unlike say a tiny background image
+ // tiling the display). in addition, excessive minification may lead to
+ // texture trashing. so use the minification as a proxy heuristic for both
+ // cases.
+ //
+ // note that the actual number of quads may be further increased due to
+ // hard-stops and/or more than GRADIENT_FP_STOPS stops per gradient.
+ if supports_caching && item.extend_mode == ExtendMode::Repeat {
+ let single_repeat_size =
+ if item.start_point.x.approx_eq(&item.end_point.x) {
+ item.end_point.y - item.start_point.y
+ } else {
+ item.end_point.x - item.start_point.x
+ };
+ let downscaling = single_repeat_size as f32 / TEXTURE_REGION_DIMENSIONS as f32;
+ if downscaling < 0.1 {
+ // if a single copy of the gradient is this small relative to its baked
+ // gradient cache, we have bad texture caching and/or too many quads.
+ supports_caching = false;
+ }
+ }
+
+ let (stops, min_alpha) = stops_and_min_alpha(&item.stops);
+
+ let mut brush_segments = Vec::new();
+
+ if let Some(ref nine_patch) = item.nine_patch {
+ brush_segments = nine_patch.create_segments(common.prim_rect.size);
+ }
+
+ // Save opacity of the stops for use in
+ // selecting which pass this gradient
+ // should be drawn in.
+ let stops_opacity = PrimitiveOpacity::from_alpha(min_alpha);
+
+ LinearGradientTemplate {
+ common,
+ extend_mode: item.extend_mode,
+ start_point: item.start_point.into(),
+ end_point: item.end_point.into(),
+ stretch_size: item.stretch_size.into(),
+ tile_spacing: item.tile_spacing.into(),
+ stops_opacity,
+ stops,
+ brush_segments,
+ reverse_stops: item.reverse_stops,
+ stops_handle: GpuCacheHandle::new(),
+ supports_caching,
+ }
+ }
+}
+
+impl LinearGradientTemplate {
+ /// Update the GPU cache for a given primitive template. This may be called multiple
+ /// times per frame, by each primitive reference that refers to this interned
+ /// template. The initial request call to the GPU cache ensures that work is only
+ /// done if the cache entry is invalid (due to first use or eviction).
+ pub fn update(
+ &mut self,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ if let Some(mut request) =
+ frame_state.gpu_cache.request(&mut self.common.gpu_cache_handle) {
+ // write_prim_gpu_blocks
+ request.push([
+ self.start_point.x,
+ self.start_point.y,
+ self.end_point.x,
+ self.end_point.y,
+ ]);
+ request.push([
+ pack_as_float(self.extend_mode as u32),
+ self.stretch_size.width,
+ self.stretch_size.height,
+ 0.0,
+ ]);
+
+ // write_segment_gpu_blocks
+ for segment in &self.brush_segments {
+ // has to match VECS_PER_SEGMENT
+ request.write_segment(
+ segment.local_rect,
+ segment.extra_data,
+ );
+ }
+ }
+
+ if let Some(mut request) = frame_state.gpu_cache.request(&mut self.stops_handle) {
+ GradientGpuBlockBuilder::build(
+ self.reverse_stops,
+ &mut request,
+ &self.stops,
+ );
+ }
+
+ self.opacity = {
+ // If the coverage of the gradient extends to or beyond
+ // the primitive rect, then the opacity can be determined
+ // by the colors of the stops. If we have tiling / spacing
+ // then we just assume the gradient is translucent for now.
+ // (In the future we could consider segmenting in some cases).
+ let stride = self.stretch_size + self.tile_spacing;
+ if stride.width >= self.common.prim_rect.size.width &&
+ stride.height >= self.common.prim_rect.size.height {
+ self.stops_opacity
+ } else {
+ PrimitiveOpacity::translucent()
+ }
+ }
+ }
+}
+
+pub type LinearGradientDataHandle = InternHandle<LinearGradient>;
+
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct LinearGradient {
+ pub extend_mode: ExtendMode,
+ pub start_point: PointKey,
+ pub end_point: PointKey,
+ pub stretch_size: SizeKey,
+ pub tile_spacing: SizeKey,
+ pub stops: Vec<GradientStopKey>,
+ pub reverse_stops: bool,
+ pub nine_patch: Option<Box<NinePatchDescriptor>>,
+}
+
+impl Internable for LinearGradient {
+ type Key = LinearGradientKey;
+ type StoreData = LinearGradientTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for LinearGradient {
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> LinearGradientKey {
+ LinearGradientKey::new(info, self)
+ }
+
+ fn make_instance_kind(
+ _key: LinearGradientKey,
+ data_handle: LinearGradientDataHandle,
+ prim_store: &mut PrimitiveStore,
+ _reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ let gradient_index = prim_store.linear_gradients.push(LinearGradientPrimitive {
+ cache_segments: Vec::new(),
+ visible_tiles_range: GradientTileRange::empty(),
+ });
+
+ PrimitiveInstanceKind::LinearGradient {
+ data_handle,
+ gradient_index,
+ }
+ }
+}
+
+impl IsVisible for LinearGradient {
+ fn is_visible(&self) -> bool {
+ true
+ }
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct LinearGradientPrimitive {
+ pub cache_segments: Vec<CachedGradientSegment>,
+ pub visible_tiles_range: GradientTileRange,
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+/// Hashable radial gradient parameters, for use during prim interning.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, MallocSizeOf, PartialEq)]
+pub struct RadialGradientParams {
+ pub start_radius: f32,
+ pub end_radius: f32,
+ pub ratio_xy: f32,
+}
+
+impl Eq for RadialGradientParams {}
+
+impl hash::Hash for RadialGradientParams {
+ fn hash<H: hash::Hasher>(&self, state: &mut H) {
+ self.start_radius.to_bits().hash(state);
+ self.end_radius.to_bits().hash(state);
+ self.ratio_xy.to_bits().hash(state);
+ }
+}
+
+/// Identifying key for a radial gradient.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, PartialEq, Hash, MallocSizeOf)]
+pub struct RadialGradientKey {
+ pub common: PrimKeyCommonData,
+ pub extend_mode: ExtendMode,
+ pub center: PointKey,
+ pub params: RadialGradientParams,
+ pub stretch_size: SizeKey,
+ pub stops: Vec<GradientStopKey>,
+ pub tile_spacing: SizeKey,
+ pub nine_patch: Option<Box<NinePatchDescriptor>>,
+}
+
+impl RadialGradientKey {
+ pub fn new(
+ info: &LayoutPrimitiveInfo,
+ radial_grad: RadialGradient,
+ ) -> Self {
+ RadialGradientKey {
+ common: info.into(),
+ extend_mode: radial_grad.extend_mode,
+ center: radial_grad.center,
+ params: radial_grad.params,
+ stretch_size: radial_grad.stretch_size,
+ stops: radial_grad.stops,
+ tile_spacing: radial_grad.tile_spacing,
+ nine_patch: radial_grad.nine_patch,
+ }
+ }
+}
+
+impl InternDebug for RadialGradientKey {}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct RadialGradientTemplate {
+ pub common: PrimTemplateCommonData,
+ pub extend_mode: ExtendMode,
+ pub center: LayoutPoint,
+ pub params: RadialGradientParams,
+ pub stretch_size: LayoutSize,
+ pub tile_spacing: LayoutSize,
+ pub brush_segments: Vec<BrushSegment>,
+ pub stops_opacity: PrimitiveOpacity,
+ pub stops: Vec<GradientStop>,
+ pub stops_handle: GpuCacheHandle,
+}
+
+impl Deref for RadialGradientTemplate {
+ type Target = PrimTemplateCommonData;
+ fn deref(&self) -> &Self::Target {
+ &self.common
+ }
+}
+
+impl DerefMut for RadialGradientTemplate {
+ fn deref_mut(&mut self) -> &mut Self::Target {
+ &mut self.common
+ }
+}
+
+impl From<RadialGradientKey> for RadialGradientTemplate {
+ fn from(item: RadialGradientKey) -> Self {
+ let common = PrimTemplateCommonData::with_key_common(item.common);
+ let mut brush_segments = Vec::new();
+
+ if let Some(ref nine_patch) = item.nine_patch {
+ brush_segments = nine_patch.create_segments(common.prim_rect.size);
+ }
+
+ let (stops, min_alpha) = stops_and_min_alpha(&item.stops);
+
+ // Save opacity of the stops for use in
+ // selecting which pass this gradient
+ // should be drawn in.
+ let stops_opacity = PrimitiveOpacity::from_alpha(min_alpha);
+
+ RadialGradientTemplate {
+ common,
+ center: item.center.into(),
+ extend_mode: item.extend_mode,
+ params: item.params,
+ stretch_size: item.stretch_size.into(),
+ tile_spacing: item.tile_spacing.into(),
+ brush_segments,
+ stops_opacity,
+ stops,
+ stops_handle: GpuCacheHandle::new(),
+ }
+ }
+}
+
+impl RadialGradientTemplate {
+ /// Update the GPU cache for a given primitive template. This may be called multiple
+ /// times per frame, by each primitive reference that refers to this interned
+ /// template. The initial request call to the GPU cache ensures that work is only
+ /// done if the cache entry is invalid (due to first use or eviction).
+ pub fn update(
+ &mut self,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ if let Some(mut request) =
+ frame_state.gpu_cache.request(&mut self.common.gpu_cache_handle) {
+ // write_prim_gpu_blocks
+ request.push([
+ self.center.x,
+ self.center.y,
+ self.params.start_radius,
+ self.params.end_radius,
+ ]);
+ request.push([
+ self.params.ratio_xy,
+ pack_as_float(self.extend_mode as u32),
+ self.stretch_size.width,
+ self.stretch_size.height,
+ ]);
+
+ // write_segment_gpu_blocks
+ for segment in &self.brush_segments {
+ // has to match VECS_PER_SEGMENT
+ request.write_segment(
+ segment.local_rect,
+ segment.extra_data,
+ );
+ }
+ }
+
+ if let Some(mut request) = frame_state.gpu_cache.request(&mut self.stops_handle) {
+ GradientGpuBlockBuilder::build(
+ false,
+ &mut request,
+ &self.stops,
+ );
+ }
+
+ self.opacity = PrimitiveOpacity::translucent();
+ }
+}
+
+pub type RadialGradientDataHandle = InternHandle<RadialGradient>;
+
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RadialGradient {
+ pub extend_mode: ExtendMode,
+ pub center: PointKey,
+ pub params: RadialGradientParams,
+ pub stretch_size: SizeKey,
+ pub stops: Vec<GradientStopKey>,
+ pub tile_spacing: SizeKey,
+ pub nine_patch: Option<Box<NinePatchDescriptor>>,
+}
+
+impl Internable for RadialGradient {
+ type Key = RadialGradientKey;
+ type StoreData = RadialGradientTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for RadialGradient {
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> RadialGradientKey {
+ RadialGradientKey::new(info, self)
+ }
+
+ fn make_instance_kind(
+ _key: RadialGradientKey,
+ data_handle: RadialGradientDataHandle,
+ _prim_store: &mut PrimitiveStore,
+ _reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ PrimitiveInstanceKind::RadialGradient {
+ data_handle,
+ visible_tiles_range: GradientTileRange::empty(),
+ }
+ }
+}
+
+impl IsVisible for RadialGradient {
+ fn is_visible(&self) -> bool {
+ true
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+/// Conic gradients
+
+/// Hashable conic gradient parameters, for use during prim interning.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, MallocSizeOf, PartialEq)]
+pub struct ConicGradientParams {
+ pub angle: f32, // in radians
+ pub start_offset: f32,
+ pub end_offset: f32,
+}
+
+impl Eq for ConicGradientParams {}
+
+impl hash::Hash for ConicGradientParams {
+ fn hash<H: hash::Hasher>(&self, state: &mut H) {
+ self.angle.to_bits().hash(state);
+ self.start_offset.to_bits().hash(state);
+ self.end_offset.to_bits().hash(state);
+ }
+}
+
+/// Identifying key for a line decoration.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, PartialEq, Hash, MallocSizeOf)]
+pub struct ConicGradientKey {
+ pub common: PrimKeyCommonData,
+ pub extend_mode: ExtendMode,
+ pub center: PointKey,
+ pub params: ConicGradientParams,
+ pub stretch_size: SizeKey,
+ pub stops: Vec<GradientStopKey>,
+ pub tile_spacing: SizeKey,
+ pub nine_patch: Option<Box<NinePatchDescriptor>>,
+}
+
+impl ConicGradientKey {
+ pub fn new(
+ info: &LayoutPrimitiveInfo,
+ conic_grad: ConicGradient,
+ ) -> Self {
+ ConicGradientKey {
+ common: info.into(),
+ extend_mode: conic_grad.extend_mode,
+ center: conic_grad.center,
+ params: conic_grad.params,
+ stretch_size: conic_grad.stretch_size,
+ stops: conic_grad.stops,
+ tile_spacing: conic_grad.tile_spacing,
+ nine_patch: conic_grad.nine_patch,
+ }
+ }
+}
+
+impl InternDebug for ConicGradientKey {}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct ConicGradientTemplate {
+ pub common: PrimTemplateCommonData,
+ pub extend_mode: ExtendMode,
+ pub center: LayoutPoint,
+ pub params: ConicGradientParams,
+ pub stretch_size: LayoutSize,
+ pub tile_spacing: LayoutSize,
+ pub brush_segments: Vec<BrushSegment>,
+ pub stops_opacity: PrimitiveOpacity,
+ pub stops: Vec<GradientStop>,
+ pub stops_handle: GpuCacheHandle,
+}
+
+impl Deref for ConicGradientTemplate {
+ type Target = PrimTemplateCommonData;
+ fn deref(&self) -> &Self::Target {
+ &self.common
+ }
+}
+
+impl DerefMut for ConicGradientTemplate {
+ fn deref_mut(&mut self) -> &mut Self::Target {
+ &mut self.common
+ }
+}
+
+impl From<ConicGradientKey> for ConicGradientTemplate {
+ fn from(item: ConicGradientKey) -> Self {
+ let common = PrimTemplateCommonData::with_key_common(item.common);
+ let mut brush_segments = Vec::new();
+
+ if let Some(ref nine_patch) = item.nine_patch {
+ brush_segments = nine_patch.create_segments(common.prim_rect.size);
+ }
+
+ let (stops, min_alpha) = stops_and_min_alpha(&item.stops);
+
+ // Save opacity of the stops for use in
+ // selecting which pass this gradient
+ // should be drawn in.
+ let stops_opacity = PrimitiveOpacity::from_alpha(min_alpha);
+
+ ConicGradientTemplate {
+ common,
+ center: item.center.into(),
+ extend_mode: item.extend_mode,
+ params: item.params,
+ stretch_size: item.stretch_size.into(),
+ tile_spacing: item.tile_spacing.into(),
+ brush_segments,
+ stops_opacity,
+ stops,
+ stops_handle: GpuCacheHandle::new(),
+ }
+ }
+}
+
+impl ConicGradientTemplate {
+ /// Update the GPU cache for a given primitive template. This may be called multiple
+ /// times per frame, by each primitive reference that refers to this interned
+ /// template. The initial request call to the GPU cache ensures that work is only
+ /// done if the cache entry is invalid (due to first use or eviction).
+ pub fn update(
+ &mut self,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ if let Some(mut request) =
+ frame_state.gpu_cache.request(&mut self.common.gpu_cache_handle) {
+ // write_prim_gpu_blocks
+ request.push([
+ self.center.x,
+ self.center.y,
+ self.params.start_offset,
+ self.params.end_offset,
+ ]);
+ request.push([
+ self.params.angle,
+ pack_as_float(self.extend_mode as u32),
+ self.stretch_size.width,
+ self.stretch_size.height,
+ ]);
+
+ // write_segment_gpu_blocks
+ for segment in &self.brush_segments {
+ // has to match VECS_PER_SEGMENT
+ request.write_segment(
+ segment.local_rect,
+ segment.extra_data,
+ );
+ }
+ }
+
+ if let Some(mut request) = frame_state.gpu_cache.request(&mut self.stops_handle) {
+ GradientGpuBlockBuilder::build(
+ false,
+ &mut request,
+ &self.stops,
+ );
+ }
+
+ self.opacity = PrimitiveOpacity::translucent();
+ }
+}
+
+pub type ConicGradientDataHandle = InternHandle<ConicGradient>;
+
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ConicGradient {
+ pub extend_mode: ExtendMode,
+ pub center: PointKey,
+ pub params: ConicGradientParams,
+ pub stretch_size: SizeKey,
+ pub stops: Vec<GradientStopKey>,
+ pub tile_spacing: SizeKey,
+ pub nine_patch: Option<Box<NinePatchDescriptor>>,
+}
+
+impl Internable for ConicGradient {
+ type Key = ConicGradientKey;
+ type StoreData = ConicGradientTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for ConicGradient {
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> ConicGradientKey {
+ ConicGradientKey::new(info, self)
+ }
+
+ fn make_instance_kind(
+ _key: ConicGradientKey,
+ data_handle: ConicGradientDataHandle,
+ _prim_store: &mut PrimitiveStore,
+ _reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ PrimitiveInstanceKind::ConicGradient {
+ data_handle,
+ visible_tiles_range: GradientTileRange::empty(),
+ }
+ }
+}
+
+impl IsVisible for ConicGradient {
+ fn is_visible(&self) -> bool {
+ true
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+// The gradient entry index for the first color stop
+pub const GRADIENT_DATA_FIRST_STOP: usize = 0;
+// The gradient entry index for the last color stop
+pub const GRADIENT_DATA_LAST_STOP: usize = GRADIENT_DATA_SIZE - 1;
+
+// The start of the gradient data table
+pub const GRADIENT_DATA_TABLE_BEGIN: usize = GRADIENT_DATA_FIRST_STOP + 1;
+// The exclusive bound of the gradient data table
+pub const GRADIENT_DATA_TABLE_END: usize = GRADIENT_DATA_LAST_STOP;
+// The number of entries in the gradient data table.
+pub const GRADIENT_DATA_TABLE_SIZE: usize = 128;
+
+// The number of entries in a gradient data: GRADIENT_DATA_TABLE_SIZE + first stop entry + last stop entry
+pub const GRADIENT_DATA_SIZE: usize = GRADIENT_DATA_TABLE_SIZE + 2;
+
+/// An entry in a gradient data table representing a segment of the gradient
+/// color space.
+#[derive(Debug, Copy, Clone)]
+#[repr(C)]
+struct GradientDataEntry {
+ start_color: PremultipliedColorF,
+ end_color: PremultipliedColorF,
+}
+
+impl GradientDataEntry {
+ fn white() -> Self {
+ Self {
+ start_color: PremultipliedColorF::WHITE,
+ end_color: PremultipliedColorF::WHITE,
+ }
+ }
+}
+
+// TODO(gw): Tidy this up to be a free function / module?
+struct GradientGpuBlockBuilder {}
+
+impl GradientGpuBlockBuilder {
+ /// Generate a color ramp filling the indices in [start_idx, end_idx) and interpolating
+ /// from start_color to end_color.
+ fn fill_colors(
+ start_idx: usize,
+ end_idx: usize,
+ start_color: &PremultipliedColorF,
+ end_color: &PremultipliedColorF,
+ entries: &mut [GradientDataEntry; GRADIENT_DATA_SIZE],
+ ) {
+ // Calculate the color difference for individual steps in the ramp.
+ let inv_steps = 1.0 / (end_idx - start_idx) as f32;
+ let step_r = (end_color.r - start_color.r) * inv_steps;
+ let step_g = (end_color.g - start_color.g) * inv_steps;
+ let step_b = (end_color.b - start_color.b) * inv_steps;
+ let step_a = (end_color.a - start_color.a) * inv_steps;
+
+ let mut cur_color = *start_color;
+
+ // Walk the ramp writing start and end colors for each entry.
+ for index in start_idx .. end_idx {
+ let entry = &mut entries[index];
+ entry.start_color = cur_color;
+ cur_color.r += step_r;
+ cur_color.g += step_g;
+ cur_color.b += step_b;
+ cur_color.a += step_a;
+ entry.end_color = cur_color;
+ }
+ }
+
+ /// Compute an index into the gradient entry table based on a gradient stop offset. This
+ /// function maps offsets from [0, 1] to indices in [GRADIENT_DATA_TABLE_BEGIN, GRADIENT_DATA_TABLE_END].
+ #[inline]
+ fn get_index(offset: f32) -> usize {
+ (offset.max(0.0).min(1.0) * GRADIENT_DATA_TABLE_SIZE as f32 +
+ GRADIENT_DATA_TABLE_BEGIN as f32)
+ .round() as usize
+ }
+
+ // Build the gradient data from the supplied stops, reversing them if necessary.
+ fn build(
+ reverse_stops: bool,
+ request: &mut GpuDataRequest,
+ src_stops: &[GradientStop],
+ ) {
+ // Preconditions (should be ensured by DisplayListBuilder):
+ // * we have at least two stops
+ // * first stop has offset 0.0
+ // * last stop has offset 1.0
+ let mut src_stops = src_stops.into_iter();
+ let mut cur_color = match src_stops.next() {
+ Some(stop) => {
+ debug_assert_eq!(stop.offset, 0.0);
+ stop.color.premultiplied()
+ }
+ None => {
+ error!("Zero gradient stops found!");
+ PremultipliedColorF::BLACK
+ }
+ };
+
+ // A table of gradient entries, with two colors per entry, that specify the start and end color
+ // within the segment of the gradient space represented by that entry. To lookup a gradient result,
+ // first the entry index is calculated to determine which two colors to interpolate between, then
+ // the offset within that entry bucket is used to interpolate between the two colors in that entry.
+ // This layout preserves hard stops, as the end color for a given entry can differ from the start
+ // color for the following entry, despite them being adjacent. Colors are stored within in BGRA8
+ // format for texture upload. This table requires the gradient color stops to be normalized to the
+ // range [0, 1]. The first and last entries hold the first and last color stop colors respectively,
+ // while the entries in between hold the interpolated color stop values for the range [0, 1].
+ let mut entries = [GradientDataEntry::white(); GRADIENT_DATA_SIZE];
+
+ if reverse_stops {
+ // Fill in the first entry (for reversed stops) with the first color stop
+ GradientGpuBlockBuilder::fill_colors(
+ GRADIENT_DATA_LAST_STOP,
+ GRADIENT_DATA_LAST_STOP + 1,
+ &cur_color,
+ &cur_color,
+ &mut entries,
+ );
+
+ // Fill in the center of the gradient table, generating a color ramp between each consecutive pair
+ // of gradient stops. Each iteration of a loop will fill the indices in [next_idx, cur_idx). The
+ // loop will then fill indices in [GRADIENT_DATA_TABLE_BEGIN, GRADIENT_DATA_TABLE_END).
+ let mut cur_idx = GRADIENT_DATA_TABLE_END;
+ for next in src_stops {
+ let next_color = next.color.premultiplied();
+ let next_idx = Self::get_index(1.0 - next.offset);
+
+ if next_idx < cur_idx {
+ GradientGpuBlockBuilder::fill_colors(
+ next_idx,
+ cur_idx,
+ &next_color,
+ &cur_color,
+ &mut entries,
+ );
+ cur_idx = next_idx;
+ }
+
+ cur_color = next_color;
+ }
+ if cur_idx != GRADIENT_DATA_TABLE_BEGIN {
+ error!("Gradient stops abruptly at {}, auto-completing to white", cur_idx);
+ }
+
+ // Fill in the last entry (for reversed stops) with the last color stop
+ GradientGpuBlockBuilder::fill_colors(
+ GRADIENT_DATA_FIRST_STOP,
+ GRADIENT_DATA_FIRST_STOP + 1,
+ &cur_color,
+ &cur_color,
+ &mut entries,
+ );
+ } else {
+ // Fill in the first entry with the first color stop
+ GradientGpuBlockBuilder::fill_colors(
+ GRADIENT_DATA_FIRST_STOP,
+ GRADIENT_DATA_FIRST_STOP + 1,
+ &cur_color,
+ &cur_color,
+ &mut entries,
+ );
+
+ // Fill in the center of the gradient table, generating a color ramp between each consecutive pair
+ // of gradient stops. Each iteration of a loop will fill the indices in [cur_idx, next_idx). The
+ // loop will then fill indices in [GRADIENT_DATA_TABLE_BEGIN, GRADIENT_DATA_TABLE_END).
+ let mut cur_idx = GRADIENT_DATA_TABLE_BEGIN;
+ for next in src_stops {
+ let next_color = next.color.premultiplied();
+ let next_idx = Self::get_index(next.offset);
+
+ if next_idx > cur_idx {
+ GradientGpuBlockBuilder::fill_colors(
+ cur_idx,
+ next_idx,
+ &cur_color,
+ &next_color,
+ &mut entries,
+ );
+ cur_idx = next_idx;
+ }
+
+ cur_color = next_color;
+ }
+ if cur_idx != GRADIENT_DATA_TABLE_END {
+ error!("Gradient stops abruptly at {}, auto-completing to white", cur_idx);
+ }
+
+ // Fill in the last entry with the last color stop
+ GradientGpuBlockBuilder::fill_colors(
+ GRADIENT_DATA_LAST_STOP,
+ GRADIENT_DATA_LAST_STOP + 1,
+ &cur_color,
+ &cur_color,
+ &mut entries,
+ );
+ }
+
+ for entry in entries.iter() {
+ request.push(entry.start_color);
+ request.push(entry.end_color);
+ }
+ }
+}
+
+#[test]
+#[cfg(target_pointer_width = "64")]
+fn test_struct_sizes() {
+ use std::mem;
+ // The sizes of these structures are critical for performance on a number of
+ // talos stress tests. If you get a failure here on CI, there's two possibilities:
+ // (a) You made a structure smaller than it currently is. Great work! Update the
+ // test expectations and move on.
+ // (b) You made a structure larger. This is not necessarily a problem, but should only
+ // be done with care, and after checking if talos performance regresses badly.
+ assert_eq!(mem::size_of::<LinearGradient>(), 72, "LinearGradient size changed");
+ assert_eq!(mem::size_of::<LinearGradientTemplate>(), 120, "LinearGradientTemplate size changed");
+ assert_eq!(mem::size_of::<LinearGradientKey>(), 88, "LinearGradientKey size changed");
+
+ assert_eq!(mem::size_of::<RadialGradient>(), 72, "RadialGradient size changed");
+ assert_eq!(mem::size_of::<RadialGradientTemplate>(), 128, "RadialGradientTemplate size changed");
+ assert_eq!(mem::size_of::<RadialGradientKey>(), 96, "RadialGradientKey size changed");
+
+ assert_eq!(mem::size_of::<ConicGradient>(), 72, "ConicGradient size changed");
+ assert_eq!(mem::size_of::<ConicGradientTemplate>(), 128, "ConicGradientTemplate size changed");
+ assert_eq!(mem::size_of::<ConicGradientKey>(), 96, "ConicGradientKey size changed");
+}
diff --git a/third_party/webrender/webrender/src/prim_store/image.rs b/third_party/webrender/webrender/src/prim_store/image.rs
new file mode 100644
index 00000000000..922bd5b80cd
--- /dev/null
+++ b/third_party/webrender/webrender/src/prim_store/image.rs
@@ -0,0 +1,511 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{
+ AlphaType, ColorDepth, ColorF, ColorU,
+ ImageKey as ApiImageKey, ImageRendering,
+ PremultipliedColorF, Shadow, YuvColorSpace, ColorRange, YuvFormat,
+};
+use api::units::*;
+use crate::scene_building::{CreateShadow, IsVisible};
+use crate::frame_builder::FrameBuildingState;
+use crate::gpu_cache::{GpuCache, GpuDataRequest};
+use crate::intern::{Internable, InternDebug, Handle as InternHandle};
+use crate::internal_types::{LayoutPrimitiveInfo};
+use crate::prim_store::{
+ EdgeAaSegmentMask, OpacityBindingIndex, PrimitiveInstanceKind,
+ PrimitiveOpacity, PrimKey,
+ PrimTemplate, PrimTemplateCommonData, PrimitiveStore, SegmentInstanceIndex,
+ SizeKey, InternablePrimitive,
+};
+use crate::render_target::RenderTargetKind;
+use crate::render_task::{BlitSource, RenderTask};
+use crate::render_task_cache::{
+ RenderTaskCacheEntryHandle, RenderTaskCacheKey, RenderTaskCacheKeyKind
+};
+use crate::resource_cache::{ImageRequest, ResourceCache};
+use crate::util::pack_as_float;
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct VisibleImageTile {
+ pub tile_offset: TileOffset,
+ pub edge_flags: EdgeAaSegmentMask,
+ pub local_rect: LayoutRect,
+ pub local_clip_rect: LayoutRect,
+}
+
+// Key that identifies a unique (partial) image that is being
+// stored in the render task cache.
+#[derive(Debug, Copy, Clone, Eq, Hash, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ImageCacheKey {
+ pub request: ImageRequest,
+ pub texel_rect: Option<DeviceIntRect>,
+}
+
+/// Instance specific fields for an image primitive. These are
+/// currently stored in a separate array to avoid bloating the
+/// size of PrimitiveInstance. In the future, we should be able
+/// to remove this and store the information inline, by:
+/// (a) Removing opacity collapse / binding support completely.
+/// Once we have general picture caching, we don't need this.
+/// (b) Change visible_tiles to use Storage in the primitive
+/// scratch buffer. This will reduce the size of the
+/// visible_tiles field here, and save memory allocation
+/// when image tiling is used. I've left it as a Vec for
+/// now to reduce the number of changes, and because image
+/// tiling is very rare on real pages.
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct ImageInstance {
+ pub opacity_binding_index: OpacityBindingIndex,
+ pub segment_instance_index: SegmentInstanceIndex,
+ pub tight_local_clip_rect: LayoutRect,
+ pub visible_tiles: Vec<VisibleImageTile>,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, PartialEq, MallocSizeOf, Hash)]
+pub struct Image {
+ pub key: ApiImageKey,
+ pub stretch_size: SizeKey,
+ pub tile_spacing: SizeKey,
+ pub color: ColorU,
+ pub image_rendering: ImageRendering,
+ pub alpha_type: AlphaType,
+}
+
+pub type ImageKey = PrimKey<Image>;
+
+impl ImageKey {
+ pub fn new(
+ info: &LayoutPrimitiveInfo,
+ image: Image,
+ ) -> Self {
+ ImageKey {
+ common: info.into(),
+ kind: image,
+ }
+ }
+}
+
+impl InternDebug for ImageKey {}
+
+// Where to find the texture data for an image primitive.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, MallocSizeOf)]
+pub enum ImageSource {
+ // A normal image - just reference the texture cache.
+ Default,
+ // An image that is pre-rendered into the texture cache
+ // via a render task.
+ Cache {
+ size: DeviceIntSize,
+ handle: Option<RenderTaskCacheEntryHandle>,
+ },
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, MallocSizeOf)]
+pub struct ImageData {
+ pub key: ApiImageKey,
+ pub stretch_size: LayoutSize,
+ pub tile_spacing: LayoutSize,
+ pub color: ColorF,
+ pub source: ImageSource,
+ pub image_rendering: ImageRendering,
+ pub alpha_type: AlphaType,
+}
+
+impl From<Image> for ImageData {
+ fn from(image: Image) -> Self {
+ ImageData {
+ key: image.key,
+ color: image.color.into(),
+ stretch_size: image.stretch_size.into(),
+ tile_spacing: image.tile_spacing.into(),
+ source: ImageSource::Default,
+ image_rendering: image.image_rendering,
+ alpha_type: image.alpha_type,
+ }
+ }
+}
+
+impl ImageData {
+ /// Update the GPU cache for a given primitive template. This may be called multiple
+ /// times per frame, by each primitive reference that refers to this interned
+ /// template. The initial request call to the GPU cache ensures that work is only
+ /// done if the cache entry is invalid (due to first use or eviction).
+ pub fn update(
+ &mut self,
+ common: &mut PrimTemplateCommonData,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ if let Some(mut request) = frame_state.gpu_cache.request(&mut common.gpu_cache_handle) {
+ self.write_prim_gpu_blocks(&mut request);
+ }
+
+ common.opacity = {
+ let image_properties = frame_state
+ .resource_cache
+ .get_image_properties(self.key);
+
+ match image_properties {
+ Some(image_properties) => {
+ let is_tiled = image_properties.tiling.is_some();
+
+ if self.tile_spacing != LayoutSize::zero() && !is_tiled {
+ self.source = ImageSource::Cache {
+ // Size in device-pixels we need to allocate in render task cache.
+ size: image_properties.descriptor.size.to_i32(),
+ handle: None,
+ };
+ }
+
+ let mut is_opaque = image_properties.descriptor.is_opaque();
+ let request = ImageRequest {
+ key: self.key,
+ rendering: self.image_rendering,
+ tile: None,
+ };
+
+ // Every frame, for cached items, we need to request the render
+ // task cache item. The closure will be invoked on the first
+ // time through, and any time the render task output has been
+ // evicted from the texture cache.
+ match self.source {
+ ImageSource::Cache { ref mut size, ref mut handle } => {
+ let padding = DeviceIntSideOffsets::new(
+ 0,
+ (self.tile_spacing.width * size.width as f32 / self.stretch_size.width) as i32,
+ (self.tile_spacing.height * size.height as f32 / self.stretch_size.height) as i32,
+ 0,
+ );
+
+ size.width += padding.horizontal();
+ size.height += padding.vertical();
+
+ is_opaque &= padding == DeviceIntSideOffsets::zero();
+
+ let image_cache_key = ImageCacheKey {
+ request,
+ texel_rect: None,
+ };
+ let target_kind = if image_properties.descriptor.format.bytes_per_pixel() == 1 {
+ RenderTargetKind::Alpha
+ } else {
+ RenderTargetKind::Color
+ };
+
+ // Request a pre-rendered image task.
+ *handle = Some(frame_state.resource_cache.request_render_task(
+ RenderTaskCacheKey {
+ size: *size,
+ kind: RenderTaskCacheKeyKind::Image(image_cache_key),
+ },
+ frame_state.gpu_cache,
+ frame_state.render_tasks,
+ None,
+ image_properties.descriptor.is_opaque(),
+ |render_tasks| {
+ // Create a task to blit from the texture cache to
+ // a normal transient render task surface. This will
+ // copy only the sub-rect, if specified.
+ // TODO: figure out if/when we can do a blit instead.
+ let cache_to_target_task_id = RenderTask::new_scaling_with_padding(
+ BlitSource::Image { key: image_cache_key },
+ render_tasks,
+ target_kind,
+ *size,
+ padding,
+ );
+
+ // Create a task to blit the rect from the child render
+ // task above back into the right spot in the persistent
+ // render target cache.
+ render_tasks.add().init(RenderTask::new_blit(
+ *size,
+ BlitSource::RenderTask {
+ task_id: cache_to_target_task_id,
+ },
+ ))
+ }
+ ));
+ }
+ ImageSource::Default => {}
+ }
+
+ if is_opaque {
+ PrimitiveOpacity::from_alpha(self.color.a)
+ } else {
+ PrimitiveOpacity::translucent()
+ }
+ }
+ None => {
+ PrimitiveOpacity::opaque()
+ }
+ }
+ };
+ }
+
+ pub fn write_prim_gpu_blocks(&self, request: &mut GpuDataRequest) {
+ // Images are drawn as a white color, modulated by the total
+ // opacity coming from any collapsed property bindings.
+ // Size has to match `VECS_PER_SPECIFIC_BRUSH` from `brush_image.glsl` exactly.
+ request.push(self.color.premultiplied());
+ request.push(PremultipliedColorF::WHITE);
+ request.push([
+ self.stretch_size.width + self.tile_spacing.width,
+ self.stretch_size.height + self.tile_spacing.height,
+ 0.0,
+ 0.0,
+ ]);
+ }
+}
+
+pub type ImageTemplate = PrimTemplate<ImageData>;
+
+impl From<ImageKey> for ImageTemplate {
+ fn from(image: ImageKey) -> Self {
+ let common = PrimTemplateCommonData::with_key_common(image.common);
+
+ ImageTemplate {
+ common,
+ kind: image.kind.into(),
+ }
+ }
+}
+
+pub type ImageDataHandle = InternHandle<Image>;
+
+impl Internable for Image {
+ type Key = ImageKey;
+ type StoreData = ImageTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for Image {
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> ImageKey {
+ ImageKey::new(info, self)
+ }
+
+ fn make_instance_kind(
+ _key: ImageKey,
+ data_handle: ImageDataHandle,
+ prim_store: &mut PrimitiveStore,
+ _reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ // TODO(gw): Refactor this to not need a separate image
+ // instance (see ImageInstance struct).
+ let image_instance_index = prim_store.images.push(ImageInstance {
+ opacity_binding_index: OpacityBindingIndex::INVALID,
+ segment_instance_index: SegmentInstanceIndex::INVALID,
+ tight_local_clip_rect: LayoutRect::zero(),
+ visible_tiles: Vec::new(),
+ });
+
+ PrimitiveInstanceKind::Image {
+ data_handle,
+ image_instance_index,
+ is_compositor_surface: false,
+ }
+ }
+}
+
+impl CreateShadow for Image {
+ fn create_shadow(&self, shadow: &Shadow) -> Self {
+ Image {
+ tile_spacing: self.tile_spacing,
+ stretch_size: self.stretch_size,
+ key: self.key,
+ image_rendering: self.image_rendering,
+ alpha_type: self.alpha_type,
+ color: shadow.color.into(),
+ }
+ }
+}
+
+impl IsVisible for Image {
+ fn is_visible(&self) -> bool {
+ true
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
+pub struct YuvImage {
+ pub color_depth: ColorDepth,
+ pub yuv_key: [ApiImageKey; 3],
+ pub format: YuvFormat,
+ pub color_space: YuvColorSpace,
+ pub color_range: ColorRange,
+ pub image_rendering: ImageRendering,
+}
+
+pub type YuvImageKey = PrimKey<YuvImage>;
+
+impl YuvImageKey {
+ pub fn new(
+ info: &LayoutPrimitiveInfo,
+ yuv_image: YuvImage,
+ ) -> Self {
+ YuvImageKey {
+ common: info.into(),
+ kind: yuv_image,
+ }
+ }
+}
+
+impl InternDebug for YuvImageKey {}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct YuvImageData {
+ pub color_depth: ColorDepth,
+ pub yuv_key: [ApiImageKey; 3],
+ pub format: YuvFormat,
+ pub color_space: YuvColorSpace,
+ pub color_range: ColorRange,
+ pub image_rendering: ImageRendering,
+}
+
+impl From<YuvImage> for YuvImageData {
+ fn from(image: YuvImage) -> Self {
+ YuvImageData {
+ color_depth: image.color_depth,
+ yuv_key: image.yuv_key,
+ format: image.format,
+ color_space: image.color_space,
+ color_range: image.color_range,
+ image_rendering: image.image_rendering,
+ }
+ }
+}
+
+impl YuvImageData {
+ /// Update the GPU cache for a given primitive template. This may be called multiple
+ /// times per frame, by each primitive reference that refers to this interned
+ /// template. The initial request call to the GPU cache ensures that work is only
+ /// done if the cache entry is invalid (due to first use or eviction).
+ pub fn update(
+ &mut self,
+ common: &mut PrimTemplateCommonData,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ if let Some(mut request) = frame_state.gpu_cache.request(&mut common.gpu_cache_handle) {
+ self.write_prim_gpu_blocks(&mut request);
+ };
+
+ // YUV images never have transparency
+ common.opacity = PrimitiveOpacity::opaque();
+ }
+
+ pub fn request_resources(
+ &mut self,
+ resource_cache: &mut ResourceCache,
+ gpu_cache: &mut GpuCache,
+ ) {
+ let channel_num = self.format.get_plane_num();
+ debug_assert!(channel_num <= 3);
+ for channel in 0 .. channel_num {
+ resource_cache.request_image(
+ ImageRequest {
+ key: self.yuv_key[channel],
+ rendering: self.image_rendering,
+ tile: None,
+ },
+ gpu_cache,
+ );
+ }
+ }
+
+ pub fn write_prim_gpu_blocks(&self, request: &mut GpuDataRequest) {
+ request.push([
+ self.color_depth.rescaling_factor(),
+ pack_as_float(self.color_space as u32),
+ pack_as_float(self.format as u32),
+ 0.0
+ ]);
+ }
+}
+
+pub type YuvImageTemplate = PrimTemplate<YuvImageData>;
+
+impl From<YuvImageKey> for YuvImageTemplate {
+ fn from(image: YuvImageKey) -> Self {
+ let common = PrimTemplateCommonData::with_key_common(image.common);
+
+ YuvImageTemplate {
+ common,
+ kind: image.kind.into(),
+ }
+ }
+}
+
+pub type YuvImageDataHandle = InternHandle<YuvImage>;
+
+impl Internable for YuvImage {
+ type Key = YuvImageKey;
+ type StoreData = YuvImageTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for YuvImage {
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> YuvImageKey {
+ YuvImageKey::new(info, self)
+ }
+
+ fn make_instance_kind(
+ _key: YuvImageKey,
+ data_handle: YuvImageDataHandle,
+ _prim_store: &mut PrimitiveStore,
+ _reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ PrimitiveInstanceKind::YuvImage {
+ data_handle,
+ segment_instance_index: SegmentInstanceIndex::INVALID,
+ is_compositor_surface: false,
+ }
+ }
+}
+
+impl IsVisible for YuvImage {
+ fn is_visible(&self) -> bool {
+ true
+ }
+}
+
+#[test]
+#[cfg(target_pointer_width = "64")]
+fn test_struct_sizes() {
+ use std::mem;
+ // The sizes of these structures are critical for performance on a number of
+ // talos stress tests. If you get a failure here on CI, there's two possibilities:
+ // (a) You made a structure smaller than it currently is. Great work! Update the
+ // test expectations and move on.
+ // (b) You made a structure larger. This is not necessarily a problem, but should only
+ // be done with care, and after checking if talos performance regresses badly.
+ assert_eq!(mem::size_of::<Image>(), 32, "Image size changed");
+ assert_eq!(mem::size_of::<ImageTemplate>(), 92, "ImageTemplate size changed");
+ assert_eq!(mem::size_of::<ImageKey>(), 52, "ImageKey size changed");
+ assert_eq!(mem::size_of::<YuvImage>(), 32, "YuvImage size changed");
+ assert_eq!(mem::size_of::<YuvImageTemplate>(), 60, "YuvImageTemplate size changed");
+ assert_eq!(mem::size_of::<YuvImageKey>(), 52, "YuvImageKey size changed");
+}
diff --git a/third_party/webrender/webrender/src/prim_store/interned.rs b/third_party/webrender/webrender/src/prim_store/interned.rs
new file mode 100644
index 00000000000..50337103c31
--- /dev/null
+++ b/third_party/webrender/webrender/src/prim_store/interned.rs
@@ -0,0 +1,14 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// list of all interned primitives to match enumerate_interners!
+
+pub use crate::prim_store::backdrop::Backdrop;
+pub use crate::prim_store::borders::{ImageBorder, NormalBorderPrim};
+pub use crate::prim_store::image::{Image, YuvImage};
+pub use crate::prim_store::line_dec::{LineDecoration};
+pub use crate::prim_store::gradient::{LinearGradient, RadialGradient, ConicGradient};
+pub use crate::prim_store::picture::Picture;
+pub use crate::prim_store::text_run::TextRun;
+
diff --git a/third_party/webrender/webrender/src/prim_store/line_dec.rs b/third_party/webrender/webrender/src/prim_store/line_dec.rs
new file mode 100644
index 00000000000..84537454533
--- /dev/null
+++ b/third_party/webrender/webrender/src/prim_store/line_dec.rs
@@ -0,0 +1,183 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{
+ ColorF, ColorU,
+ LineOrientation, LineStyle, PremultipliedColorF, Shadow,
+};
+use api::units::{Au, LayoutSizeAu, LayoutVector2D};
+use crate::scene_building::{CreateShadow, IsVisible};
+use crate::frame_builder::{FrameBuildingState};
+use crate::gpu_cache::GpuDataRequest;
+use crate::intern;
+use crate::internal_types::LayoutPrimitiveInfo;
+use crate::prim_store::{
+ PrimKey, PrimTemplate, PrimTemplateCommonData,
+ InternablePrimitive, PrimitiveStore,
+};
+use crate::prim_store::PrimitiveInstanceKind;
+
+/// Maximum resolution in device pixels at which line decorations are rasterized.
+pub const MAX_LINE_DECORATION_RESOLUTION: u32 = 4096;
+
+#[derive(Clone, Debug, Hash, MallocSizeOf, PartialEq, Eq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct LineDecorationCacheKey {
+ pub style: LineStyle,
+ pub orientation: LineOrientation,
+ pub wavy_line_thickness: Au,
+ pub size: LayoutSizeAu,
+}
+
+/// Identifying key for a line decoration.
+#[derive(Clone, Debug, Hash, MallocSizeOf, PartialEq, Eq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct LineDecoration {
+ // If the cache_key is Some(..) it is a line decoration
+ // that relies on a render task (e.g. wavy). If the
+ // cache key is None, it uses a fast path to draw the
+ // line decoration as a solid rect.
+ pub cache_key: Option<LineDecorationCacheKey>,
+ pub color: ColorU,
+}
+
+pub type LineDecorationKey = PrimKey<LineDecoration>;
+
+impl LineDecorationKey {
+ pub fn new(
+ info: &LayoutPrimitiveInfo,
+ line_dec: LineDecoration,
+ ) -> Self {
+ LineDecorationKey {
+ common: info.into(),
+ kind: line_dec,
+ }
+ }
+}
+
+impl intern::InternDebug for LineDecorationKey {}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct LineDecorationData {
+ pub cache_key: Option<LineDecorationCacheKey>,
+ pub color: ColorF,
+}
+
+impl LineDecorationData {
+ /// Update the GPU cache for a given primitive template. This may be called multiple
+ /// times per frame, by each primitive reference that refers to this interned
+ /// template. The initial request call to the GPU cache ensures that work is only
+ /// done if the cache entry is invalid (due to first use or eviction).
+ pub fn update(
+ &mut self,
+ common: &mut PrimTemplateCommonData,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ if let Some(ref mut request) = frame_state.gpu_cache.request(&mut common.gpu_cache_handle) {
+ self.write_prim_gpu_blocks(request);
+ }
+ }
+
+ fn write_prim_gpu_blocks(
+ &self,
+ request: &mut GpuDataRequest
+ ) {
+ match self.cache_key.as_ref() {
+ Some(cache_key) => {
+ request.push(self.color.premultiplied());
+ request.push(PremultipliedColorF::WHITE);
+ request.push([
+ cache_key.size.width.to_f32_px(),
+ cache_key.size.height.to_f32_px(),
+ 0.0,
+ 0.0,
+ ]);
+ }
+ None => {
+ request.push(self.color.premultiplied());
+ }
+ }
+ }
+}
+
+pub type LineDecorationTemplate = PrimTemplate<LineDecorationData>;
+
+impl From<LineDecorationKey> for LineDecorationTemplate {
+ fn from(line_dec: LineDecorationKey) -> Self {
+ let common = PrimTemplateCommonData::with_key_common(line_dec.common);
+ LineDecorationTemplate {
+ common,
+ kind: LineDecorationData {
+ cache_key: line_dec.kind.cache_key,
+ color: line_dec.kind.color.into(),
+ }
+ }
+ }
+}
+
+pub type LineDecorationDataHandle = intern::Handle<LineDecoration>;
+
+impl intern::Internable for LineDecoration {
+ type Key = LineDecorationKey;
+ type StoreData = LineDecorationTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for LineDecoration {
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> LineDecorationKey {
+ LineDecorationKey::new(
+ info,
+ self,
+ )
+ }
+
+ fn make_instance_kind(
+ _key: LineDecorationKey,
+ data_handle: LineDecorationDataHandle,
+ _: &mut PrimitiveStore,
+ _reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ PrimitiveInstanceKind::LineDecoration {
+ data_handle,
+ cache_handle: None,
+ }
+ }
+}
+
+impl CreateShadow for LineDecoration {
+ fn create_shadow(&self, shadow: &Shadow) -> Self {
+ LineDecoration {
+ color: shadow.color.into(),
+ cache_key: self.cache_key.clone(),
+ }
+ }
+}
+
+impl IsVisible for LineDecoration {
+ fn is_visible(&self) -> bool {
+ self.color.a > 0
+ }
+}
+
+#[test]
+#[cfg(target_pointer_width = "64")]
+fn test_struct_sizes() {
+ use std::mem;
+ // The sizes of these structures are critical for performance on a number of
+ // talos stress tests. If you get a failure here on CI, there's two possibilities:
+ // (a) You made a structure smaller than it currently is. Great work! Update the
+ // test expectations and move on.
+ // (b) You made a structure larger. This is not necessarily a problem, but should only
+ // be done with care, and after checking if talos performance regresses badly.
+ assert_eq!(mem::size_of::<LineDecoration>(), 20, "LineDecoration size changed");
+ assert_eq!(mem::size_of::<LineDecorationTemplate>(), 60, "LineDecorationTemplate size changed");
+ assert_eq!(mem::size_of::<LineDecorationKey>(), 40, "LineDecorationKey size changed");
+}
diff --git a/third_party/webrender/webrender/src/prim_store/mod.rs b/third_party/webrender/webrender/src/prim_store/mod.rs
new file mode 100644
index 00000000000..0a1514a9b35
--- /dev/null
+++ b/third_party/webrender/webrender/src/prim_store/mod.rs
@@ -0,0 +1,4529 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{BorderRadius, ClipMode, ColorF, ColorU};
+use api::{ImageRendering, RepeatMode, PrimitiveFlags};
+use api::{PremultipliedColorF, PropertyBinding, Shadow, GradientStop};
+use api::{BoxShadowClipMode, LineStyle, LineOrientation, BorderStyle};
+use api::{PrimitiveKeyKind, ExtendMode, EdgeAaSegmentMask};
+use api::image_tiling::{self, Repetition};
+use api::units::*;
+use crate::border::{get_max_scale_for_border, build_border_instances};
+use crate::border::BorderSegmentCacheKey;
+use crate::clip::{ClipStore};
+use crate::spatial_tree::{ROOT_SPATIAL_NODE_INDEX, SpatialTree, CoordinateSpaceMapping, SpatialNodeIndex, VisibleFace};
+use crate::clip::{ClipDataStore, ClipNodeFlags, ClipChainId, ClipChainInstance, ClipItemKind};
+use crate::debug_colors;
+use crate::debug_render::DebugItem;
+use crate::scene_building::{CreateShadow, IsVisible};
+use euclid::{SideOffsets2D, Transform3D, Rect, Scale, Size2D, Point2D, Vector2D};
+use euclid::approxeq::ApproxEq;
+use crate::frame_builder::{FrameBuildingContext, FrameBuildingState, PictureContext, PictureState};
+use crate::frame_builder::{FrameVisibilityContext, FrameVisibilityState};
+use crate::glyph_rasterizer::GlyphKey;
+use crate::gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle, GpuDataRequest, ToGpuBlocks};
+use crate::gpu_types::{BrushFlags};
+use crate::intern;
+use crate::internal_types::PlaneSplitAnchor;
+use malloc_size_of::MallocSizeOf;
+use crate::picture::{PictureCompositeMode, PicturePrimitive, ClusterFlags, TileCacheLogger};
+use crate::picture::{PrimitiveList, RecordedDirtyRegion, SurfaceIndex, RetainedTiles, RasterConfig};
+use crate::prim_store::backdrop::BackdropDataHandle;
+use crate::prim_store::borders::{ImageBorderDataHandle, NormalBorderDataHandle};
+use crate::prim_store::gradient::{GRADIENT_FP_STOPS, GradientCacheKey, GradientStopKey};
+use crate::prim_store::gradient::{LinearGradientPrimitive, LinearGradientDataHandle, RadialGradientDataHandle, ConicGradientDataHandle};
+use crate::prim_store::image::{ImageDataHandle, ImageInstance, VisibleImageTile, YuvImageDataHandle};
+use crate::prim_store::line_dec::{LineDecorationDataHandle,MAX_LINE_DECORATION_RESOLUTION};
+use crate::prim_store::picture::PictureDataHandle;
+use crate::prim_store::text_run::{TextRunDataHandle, TextRunPrimitive};
+#[cfg(debug_assertions)]
+use crate::render_backend::{FrameId};
+use crate::render_backend::DataStores;
+use crate::render_task_graph::RenderTaskId;
+use crate::render_task_cache::{RenderTaskCacheKeyKind, RenderTaskCacheEntryHandle, RenderTaskCacheKey, to_cache_size};
+use crate::render_task::RenderTask;
+use crate::renderer::{MAX_VERTEX_TEXTURE_WIDTH};
+use crate::resource_cache::{ImageProperties, ImageRequest};
+use crate::scene::SceneProperties;
+use crate::segment::SegmentBuilder;
+use std::{cmp, fmt, hash, ops, u32, usize, mem};
+#[cfg(debug_assertions)]
+use std::sync::atomic::{AtomicUsize, Ordering};
+use crate::storage;
+use crate::texture_cache::TEXTURE_REGION_DIMENSIONS;
+use crate::util::{MatrixHelpers, MaxRect, Recycler, ScaleOffset, RectHelpers, PointHelpers};
+use crate::util::{clamp_to_scale_factor, pack_as_float, project_rect, raster_rect_to_device_pixels};
+use crate::internal_types::{LayoutPrimitiveInfo, Filter};
+use smallvec::SmallVec;
+
+pub mod backdrop;
+pub mod borders;
+pub mod gradient;
+pub mod image;
+pub mod line_dec;
+pub mod picture;
+pub mod text_run;
+pub mod interned;
+
+/// Counter for unique primitive IDs for debug tracing.
+#[cfg(debug_assertions)]
+static NEXT_PRIM_ID: AtomicUsize = AtomicUsize::new(0);
+
+#[cfg(debug_assertions)]
+static PRIM_CHASE_ID: AtomicUsize = AtomicUsize::new(usize::MAX);
+
+#[cfg(debug_assertions)]
+pub fn register_prim_chase_id(id: PrimitiveDebugId) {
+ PRIM_CHASE_ID.store(id.0, Ordering::SeqCst);
+}
+
+#[cfg(not(debug_assertions))]
+pub fn register_prim_chase_id(_: PrimitiveDebugId) {
+}
+
+const MIN_BRUSH_SPLIT_AREA: f32 = 128.0 * 128.0;
+pub const VECS_PER_SEGMENT: usize = 2;
+
+const MAX_MASK_SIZE: f32 = 4096.0;
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Copy, Clone, MallocSizeOf)]
+pub struct PrimitiveOpacity {
+ pub is_opaque: bool,
+}
+
+impl PrimitiveOpacity {
+ pub fn opaque() -> PrimitiveOpacity {
+ PrimitiveOpacity { is_opaque: true }
+ }
+
+ pub fn translucent() -> PrimitiveOpacity {
+ PrimitiveOpacity { is_opaque: false }
+ }
+
+ pub fn from_alpha(alpha: f32) -> PrimitiveOpacity {
+ PrimitiveOpacity {
+ is_opaque: alpha >= 1.0,
+ }
+ }
+
+ pub fn combine(self, other: PrimitiveOpacity) -> PrimitiveOpacity {
+ PrimitiveOpacity{
+ is_opaque: self.is_opaque && other.is_opaque
+ }
+ }
+}
+
+#[derive(Clone, Debug)]
+pub struct SpaceSnapper {
+ pub ref_spatial_node_index: SpatialNodeIndex,
+ current_target_spatial_node_index: SpatialNodeIndex,
+ snapping_transform: Option<ScaleOffset>,
+ pub device_pixel_scale: DevicePixelScale,
+}
+
+impl SpaceSnapper {
+ pub fn new(
+ ref_spatial_node_index: SpatialNodeIndex,
+ device_pixel_scale: DevicePixelScale,
+ ) -> Self {
+ SpaceSnapper {
+ ref_spatial_node_index,
+ current_target_spatial_node_index: SpatialNodeIndex::INVALID,
+ snapping_transform: None,
+ device_pixel_scale,
+ }
+ }
+
+ pub fn new_with_target(
+ ref_spatial_node_index: SpatialNodeIndex,
+ target_node_index: SpatialNodeIndex,
+ device_pixel_scale: DevicePixelScale,
+ spatial_tree: &SpatialTree,
+ ) -> Self {
+ let mut snapper = SpaceSnapper {
+ ref_spatial_node_index,
+ current_target_spatial_node_index: SpatialNodeIndex::INVALID,
+ snapping_transform: None,
+ device_pixel_scale,
+ };
+
+ snapper.set_target_spatial_node(target_node_index, spatial_tree);
+ snapper
+ }
+
+ pub fn set_target_spatial_node(
+ &mut self,
+ target_node_index: SpatialNodeIndex,
+ spatial_tree: &SpatialTree,
+ ) {
+ if target_node_index == self.current_target_spatial_node_index {
+ return
+ }
+
+ let ref_spatial_node = &spatial_tree.spatial_nodes[self.ref_spatial_node_index.0 as usize];
+ let target_spatial_node = &spatial_tree.spatial_nodes[target_node_index.0 as usize];
+
+ self.current_target_spatial_node_index = target_node_index;
+ self.snapping_transform = match (ref_spatial_node.snapping_transform, target_spatial_node.snapping_transform) {
+ (Some(ref ref_scale_offset), Some(ref target_scale_offset)) => {
+ Some(ref_scale_offset
+ .inverse()
+ .accumulate(target_scale_offset)
+ .scale(self.device_pixel_scale.0))
+ }
+ _ => None,
+ };
+ }
+
+ pub fn snap_rect<F>(&self, rect: &Rect<f32, F>) -> Rect<f32, F> where F: fmt::Debug {
+ debug_assert!(self.current_target_spatial_node_index != SpatialNodeIndex::INVALID);
+ match self.snapping_transform {
+ Some(ref scale_offset) => {
+ let snapped_device_rect : DeviceRect = scale_offset.map_rect(rect).snap();
+ scale_offset.unmap_rect(&snapped_device_rect)
+ }
+ None => *rect,
+ }
+ }
+
+ pub fn snap_point<F>(&self, point: &Point2D<f32, F>) -> Point2D<f32, F> where F: fmt::Debug {
+ debug_assert!(self.current_target_spatial_node_index != SpatialNodeIndex::INVALID);
+ match self.snapping_transform {
+ Some(ref scale_offset) => {
+ let snapped_device_vector : DevicePoint = scale_offset.map_point(point).snap();
+ scale_offset.unmap_point(&snapped_device_vector)
+ }
+ None => *point,
+ }
+ }
+
+ pub fn snap_size<F>(&self, size: &Size2D<f32, F>) -> Size2D<f32, F> where F: fmt::Debug {
+ debug_assert!(self.current_target_spatial_node_index != SpatialNodeIndex::INVALID);
+ match self.snapping_transform {
+ Some(ref scale_offset) => {
+ let rect = Rect::<f32, F>::new(Point2D::<f32, F>::zero(), *size);
+ let snapped_device_rect : DeviceRect = scale_offset.map_rect(&rect).snap();
+ scale_offset.unmap_rect(&snapped_device_rect).size
+ }
+ None => *size,
+ }
+ }
+}
+
+#[derive(Debug, Clone)]
+pub struct SpaceMapper<F, T> {
+ kind: CoordinateSpaceMapping<F, T>,
+ pub ref_spatial_node_index: SpatialNodeIndex,
+ pub current_target_spatial_node_index: SpatialNodeIndex,
+ pub bounds: Rect<f32, T>,
+ visible_face: VisibleFace,
+}
+
+impl<F, T> SpaceMapper<F, T> where F: fmt::Debug {
+ pub fn new(
+ ref_spatial_node_index: SpatialNodeIndex,
+ bounds: Rect<f32, T>,
+ ) -> Self {
+ SpaceMapper {
+ kind: CoordinateSpaceMapping::Local,
+ ref_spatial_node_index,
+ current_target_spatial_node_index: ref_spatial_node_index,
+ bounds,
+ visible_face: VisibleFace::Front,
+ }
+ }
+
+ pub fn new_with_target(
+ ref_spatial_node_index: SpatialNodeIndex,
+ target_node_index: SpatialNodeIndex,
+ bounds: Rect<f32, T>,
+ spatial_tree: &SpatialTree,
+ ) -> Self {
+ let mut mapper = Self::new(ref_spatial_node_index, bounds);
+ mapper.set_target_spatial_node(target_node_index, spatial_tree);
+ mapper
+ }
+
+ pub fn set_target_spatial_node(
+ &mut self,
+ target_node_index: SpatialNodeIndex,
+ spatial_tree: &SpatialTree,
+ ) {
+ if target_node_index == self.current_target_spatial_node_index {
+ return
+ }
+
+ let ref_spatial_node = &spatial_tree.spatial_nodes[self.ref_spatial_node_index.0 as usize];
+ let target_spatial_node = &spatial_tree.spatial_nodes[target_node_index.0 as usize];
+
+ self.kind = if self.ref_spatial_node_index == target_node_index {
+ CoordinateSpaceMapping::Local
+ } else if ref_spatial_node.coordinate_system_id == target_spatial_node.coordinate_system_id {
+ let scale_offset = ref_spatial_node.content_transform
+ .inverse()
+ .accumulate(&target_spatial_node.content_transform);
+ CoordinateSpaceMapping::ScaleOffset(scale_offset)
+ } else {
+ let transform = spatial_tree
+ .get_relative_transform(target_node_index, self.ref_spatial_node_index)
+ .into_transform()
+ .with_source::<F>()
+ .with_destination::<T>();
+ CoordinateSpaceMapping::Transform(transform)
+ };
+
+ self.visible_face = self.kind.visible_face();
+ self.current_target_spatial_node_index = target_node_index;
+ }
+
+ pub fn get_transform(&self) -> Transform3D<f32, F, T> {
+ match self.kind {
+ CoordinateSpaceMapping::Local => {
+ Transform3D::identity()
+ }
+ CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => {
+ scale_offset.to_transform()
+ }
+ CoordinateSpaceMapping::Transform(transform) => {
+ transform
+ }
+ }
+ }
+
+ pub fn unmap(&self, rect: &Rect<f32, T>) -> Option<Rect<f32, F>> {
+ match self.kind {
+ CoordinateSpaceMapping::Local => {
+ Some(rect.cast_unit())
+ }
+ CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => {
+ Some(scale_offset.unmap_rect(rect))
+ }
+ CoordinateSpaceMapping::Transform(ref transform) => {
+ transform.inverse_rect_footprint(rect)
+ }
+ }
+ }
+
+ pub fn map(&self, rect: &Rect<f32, F>) -> Option<Rect<f32, T>> {
+ match self.kind {
+ CoordinateSpaceMapping::Local => {
+ Some(rect.cast_unit())
+ }
+ CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => {
+ Some(scale_offset.map_rect(rect))
+ }
+ CoordinateSpaceMapping::Transform(ref transform) => {
+ match project_rect(transform, rect, &self.bounds) {
+ Some(bounds) => {
+ Some(bounds)
+ }
+ None => {
+ warn!("parent relative transform can't transform the primitive rect for {:?}", rect);
+ None
+ }
+ }
+ }
+ }
+ }
+
+ pub fn map_vector(&self, v: Vector2D<f32, F>) -> Vector2D<f32, T> {
+ match self.kind {
+ CoordinateSpaceMapping::Local => {
+ v.cast_unit()
+ }
+ CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => {
+ scale_offset.map_vector(&v)
+ }
+ CoordinateSpaceMapping::Transform(ref transform) => {
+ transform.transform_vector2d(v)
+ }
+ }
+ }
+}
+
+/// For external images, it's not possible to know the
+/// UV coords of the image (or the image data itself)
+/// until the render thread receives the frame and issues
+/// callbacks to the client application. For external
+/// images that are visible, a DeferredResolve is created
+/// that is stored in the frame. This allows the render
+/// thread to iterate this list and update any changed
+/// texture data and update the UV rect. Any filtering
+/// is handled externally for NativeTexture external
+/// images.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct DeferredResolve {
+ pub address: GpuCacheAddress,
+ pub image_properties: ImageProperties,
+ pub rendering: ImageRendering,
+}
+
+#[derive(Debug, Copy, Clone, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct ClipTaskIndex(pub u16);
+
+impl ClipTaskIndex {
+ pub const INVALID: ClipTaskIndex = ClipTaskIndex(0);
+}
+
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, MallocSizeOf, Ord, PartialOrd)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PictureIndex(pub usize);
+
+impl GpuCacheHandle {
+ pub fn as_int(self, gpu_cache: &GpuCache) -> i32 {
+ gpu_cache.get_address(&self).as_int()
+ }
+}
+
+impl GpuCacheAddress {
+ pub fn as_int(self) -> i32 {
+ // TODO(gw): Temporarily encode GPU Cache addresses as a single int.
+ // In the future, we can change the PrimitiveInstanceData struct
+ // to use 2x u16 for the vertex attribute instead of an i32.
+ self.v as i32 * MAX_VERTEX_TEXTURE_WIDTH as i32 + self.u as i32
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Copy, Debug, Clone, MallocSizeOf, PartialEq)]
+pub struct RectangleKey {
+ pub x: f32,
+ pub y: f32,
+ pub w: f32,
+ pub h: f32,
+}
+
+impl RectangleKey {
+ pub fn intersects(&self, other: &Self) -> bool {
+ self.x < other.x + other.w
+ && other.x < self.x + self.w
+ && self.y < other.y + other.h
+ && other.y < self.y + self.h
+ }
+}
+
+impl Eq for RectangleKey {}
+
+impl hash::Hash for RectangleKey {
+ fn hash<H: hash::Hasher>(&self, state: &mut H) {
+ self.x.to_bits().hash(state);
+ self.y.to_bits().hash(state);
+ self.w.to_bits().hash(state);
+ self.h.to_bits().hash(state);
+ }
+}
+
+impl From<RectangleKey> for LayoutRect {
+ fn from(key: RectangleKey) -> LayoutRect {
+ LayoutRect {
+ origin: LayoutPoint::new(key.x, key.y),
+ size: LayoutSize::new(key.w, key.h),
+ }
+ }
+}
+
+impl From<RectangleKey> for WorldRect {
+ fn from(key: RectangleKey) -> WorldRect {
+ WorldRect {
+ origin: WorldPoint::new(key.x, key.y),
+ size: WorldSize::new(key.w, key.h),
+ }
+ }
+}
+
+impl From<LayoutRect> for RectangleKey {
+ fn from(rect: LayoutRect) -> RectangleKey {
+ RectangleKey {
+ x: rect.origin.x,
+ y: rect.origin.y,
+ w: rect.size.width,
+ h: rect.size.height,
+ }
+ }
+}
+
+impl From<PictureRect> for RectangleKey {
+ fn from(rect: PictureRect) -> RectangleKey {
+ RectangleKey {
+ x: rect.origin.x,
+ y: rect.origin.y,
+ w: rect.size.width,
+ h: rect.size.height,
+ }
+ }
+}
+
+impl From<WorldRect> for RectangleKey {
+ fn from(rect: WorldRect) -> RectangleKey {
+ RectangleKey {
+ x: rect.origin.x,
+ y: rect.origin.y,
+ w: rect.size.width,
+ h: rect.size.height,
+ }
+ }
+}
+
+/// A hashable SideOffset2D that can be used in primitive keys.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, MallocSizeOf, PartialEq)]
+pub struct SideOffsetsKey {
+ pub top: f32,
+ pub right: f32,
+ pub bottom: f32,
+ pub left: f32,
+}
+
+impl Eq for SideOffsetsKey {}
+
+impl hash::Hash for SideOffsetsKey {
+ fn hash<H: hash::Hasher>(&self, state: &mut H) {
+ self.top.to_bits().hash(state);
+ self.right.to_bits().hash(state);
+ self.bottom.to_bits().hash(state);
+ self.left.to_bits().hash(state);
+ }
+}
+
+impl From<SideOffsetsKey> for LayoutSideOffsets {
+ fn from(key: SideOffsetsKey) -> LayoutSideOffsets {
+ LayoutSideOffsets::new(
+ key.top,
+ key.right,
+ key.bottom,
+ key.left,
+ )
+ }
+}
+
+impl<U> From<SideOffsets2D<f32, U>> for SideOffsetsKey {
+ fn from(offsets: SideOffsets2D<f32, U>) -> SideOffsetsKey {
+ SideOffsetsKey {
+ top: offsets.top,
+ right: offsets.right,
+ bottom: offsets.bottom,
+ left: offsets.left,
+ }
+ }
+}
+
+/// A hashable size for using as a key during primitive interning.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Copy, Debug, Clone, MallocSizeOf, PartialEq)]
+pub struct SizeKey {
+ w: f32,
+ h: f32,
+}
+
+impl Eq for SizeKey {}
+
+impl hash::Hash for SizeKey {
+ fn hash<H: hash::Hasher>(&self, state: &mut H) {
+ self.w.to_bits().hash(state);
+ self.h.to_bits().hash(state);
+ }
+}
+
+impl From<SizeKey> for LayoutSize {
+ fn from(key: SizeKey) -> LayoutSize {
+ LayoutSize::new(key.w, key.h)
+ }
+}
+
+impl<U> From<Size2D<f32, U>> for SizeKey {
+ fn from(size: Size2D<f32, U>) -> SizeKey {
+ SizeKey {
+ w: size.width,
+ h: size.height,
+ }
+ }
+}
+
+/// A hashable vec for using as a key during primitive interning.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Copy, Debug, Clone, MallocSizeOf, PartialEq)]
+pub struct VectorKey {
+ pub x: f32,
+ pub y: f32,
+}
+
+impl Eq for VectorKey {}
+
+impl hash::Hash for VectorKey {
+ fn hash<H: hash::Hasher>(&self, state: &mut H) {
+ self.x.to_bits().hash(state);
+ self.y.to_bits().hash(state);
+ }
+}
+
+impl From<VectorKey> for LayoutVector2D {
+ fn from(key: VectorKey) -> LayoutVector2D {
+ LayoutVector2D::new(key.x, key.y)
+ }
+}
+
+impl From<VectorKey> for WorldVector2D {
+ fn from(key: VectorKey) -> WorldVector2D {
+ WorldVector2D::new(key.x, key.y)
+ }
+}
+
+impl From<LayoutVector2D> for VectorKey {
+ fn from(vec: LayoutVector2D) -> VectorKey {
+ VectorKey {
+ x: vec.x,
+ y: vec.y,
+ }
+ }
+}
+
+impl From<WorldVector2D> for VectorKey {
+ fn from(vec: WorldVector2D) -> VectorKey {
+ VectorKey {
+ x: vec.x,
+ y: vec.y,
+ }
+ }
+}
+
+/// A hashable point for using as a key during primitive interning.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Copy, Clone, MallocSizeOf, PartialEq)]
+pub struct PointKey {
+ pub x: f32,
+ pub y: f32,
+}
+
+impl Eq for PointKey {}
+
+impl hash::Hash for PointKey {
+ fn hash<H: hash::Hasher>(&self, state: &mut H) {
+ self.x.to_bits().hash(state);
+ self.y.to_bits().hash(state);
+ }
+}
+
+impl From<PointKey> for LayoutPoint {
+ fn from(key: PointKey) -> LayoutPoint {
+ LayoutPoint::new(key.x, key.y)
+ }
+}
+
+impl From<LayoutPoint> for PointKey {
+ fn from(p: LayoutPoint) -> PointKey {
+ PointKey {
+ x: p.x,
+ y: p.y,
+ }
+ }
+}
+
+impl From<PicturePoint> for PointKey {
+ fn from(p: PicturePoint) -> PointKey {
+ PointKey {
+ x: p.x,
+ y: p.y,
+ }
+ }
+}
+
+impl From<WorldPoint> for PointKey {
+ fn from(p: WorldPoint) -> PointKey {
+ PointKey {
+ x: p.x,
+ y: p.y,
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
+pub struct PrimKeyCommonData {
+ pub flags: PrimitiveFlags,
+ pub prim_rect: RectangleKey,
+}
+
+impl From<&LayoutPrimitiveInfo> for PrimKeyCommonData {
+ fn from(info: &LayoutPrimitiveInfo) -> Self {
+ PrimKeyCommonData {
+ flags: info.flags,
+ prim_rect: info.rect.into(),
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
+pub struct PrimKey<T: MallocSizeOf> {
+ pub common: PrimKeyCommonData,
+ pub kind: T,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
+pub struct PrimitiveKey {
+ pub common: PrimKeyCommonData,
+ pub kind: PrimitiveKeyKind,
+}
+
+impl PrimitiveKey {
+ pub fn new(
+ info: &LayoutPrimitiveInfo,
+ kind: PrimitiveKeyKind,
+ ) -> Self {
+ PrimitiveKey {
+ common: info.into(),
+ kind,
+ }
+ }
+}
+
+impl intern::InternDebug for PrimitiveKey {}
+
+/// The shared information for a given primitive. This is interned and retained
+/// both across frames and display lists, by comparing the matching PrimitiveKey.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub enum PrimitiveTemplateKind {
+ Rectangle {
+ color: PropertyBinding<ColorF>,
+ },
+ Clear,
+}
+
+/// Construct the primitive template data from a primitive key. This
+/// is invoked when a primitive key is created and the interner
+/// doesn't currently contain a primitive with this key.
+impl From<PrimitiveKeyKind> for PrimitiveTemplateKind {
+ fn from(kind: PrimitiveKeyKind) -> Self {
+ match kind {
+ PrimitiveKeyKind::Clear => {
+ PrimitiveTemplateKind::Clear
+ }
+ PrimitiveKeyKind::Rectangle { color, .. } => {
+ PrimitiveTemplateKind::Rectangle {
+ color: color.into(),
+ }
+ }
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct PrimTemplateCommonData {
+ pub flags: PrimitiveFlags,
+ pub may_need_repetition: bool,
+ pub prim_rect: LayoutRect,
+ pub opacity: PrimitiveOpacity,
+ /// The GPU cache handle for a primitive template. Since this structure
+ /// is retained across display lists by interning, this GPU cache handle
+ /// also remains valid, which reduces the number of updates to the GPU
+ /// cache when a new display list is processed.
+ pub gpu_cache_handle: GpuCacheHandle,
+}
+
+impl PrimTemplateCommonData {
+ pub fn with_key_common(common: PrimKeyCommonData) -> Self {
+ PrimTemplateCommonData {
+ flags: common.flags,
+ may_need_repetition: true,
+ prim_rect: common.prim_rect.into(),
+ gpu_cache_handle: GpuCacheHandle::new(),
+ opacity: PrimitiveOpacity::translucent(),
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct PrimTemplate<T> {
+ pub common: PrimTemplateCommonData,
+ pub kind: T,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct PrimitiveTemplate {
+ pub common: PrimTemplateCommonData,
+ pub kind: PrimitiveTemplateKind,
+}
+
+impl ops::Deref for PrimitiveTemplate {
+ type Target = PrimTemplateCommonData;
+ fn deref(&self) -> &Self::Target {
+ &self.common
+ }
+}
+
+impl ops::DerefMut for PrimitiveTemplate {
+ fn deref_mut(&mut self) -> &mut Self::Target {
+ &mut self.common
+ }
+}
+
+impl From<PrimitiveKey> for PrimitiveTemplate {
+ fn from(item: PrimitiveKey) -> Self {
+ PrimitiveTemplate {
+ common: PrimTemplateCommonData::with_key_common(item.common),
+ kind: item.kind.into(),
+ }
+ }
+}
+
+impl PrimitiveTemplateKind {
+ /// Write any GPU blocks for the primitive template to the given request object.
+ fn write_prim_gpu_blocks(
+ &self,
+ request: &mut GpuDataRequest,
+ scene_properties: &SceneProperties,
+ ) {
+ match *self {
+ PrimitiveTemplateKind::Clear => {
+ // Opaque black with operator dest out
+ request.push(PremultipliedColorF::BLACK);
+ }
+ PrimitiveTemplateKind::Rectangle { ref color, .. } => {
+ request.push(scene_properties.resolve_color(color).premultiplied())
+ }
+ }
+ }
+}
+
+impl PrimitiveTemplate {
+ /// Update the GPU cache for a given primitive template. This may be called multiple
+ /// times per frame, by each primitive reference that refers to this interned
+ /// template. The initial request call to the GPU cache ensures that work is only
+ /// done if the cache entry is invalid (due to first use or eviction).
+ pub fn update(
+ &mut self,
+ frame_state: &mut FrameBuildingState,
+ scene_properties: &SceneProperties,
+ ) {
+ if let Some(mut request) = frame_state.gpu_cache.request(&mut self.common.gpu_cache_handle) {
+ self.kind.write_prim_gpu_blocks(&mut request, scene_properties);
+ }
+
+ self.opacity = match self.kind {
+ PrimitiveTemplateKind::Clear => {
+ PrimitiveOpacity::translucent()
+ }
+ PrimitiveTemplateKind::Rectangle { ref color, .. } => {
+ PrimitiveOpacity::from_alpha(scene_properties.resolve_color(color).a)
+ }
+ };
+ }
+}
+
+type PrimitiveDataHandle = intern::Handle<PrimitiveKeyKind>;
+
+impl intern::Internable for PrimitiveKeyKind {
+ type Key = PrimitiveKey;
+ type StoreData = PrimitiveTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for PrimitiveKeyKind {
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> PrimitiveKey {
+ PrimitiveKey::new(info, self)
+ }
+
+ fn make_instance_kind(
+ key: PrimitiveKey,
+ data_handle: PrimitiveDataHandle,
+ prim_store: &mut PrimitiveStore,
+ _reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ match key.kind {
+ PrimitiveKeyKind::Clear => {
+ PrimitiveInstanceKind::Clear {
+ data_handle
+ }
+ }
+ PrimitiveKeyKind::Rectangle { color, .. } => {
+ let color_binding_index = match color {
+ PropertyBinding::Binding(..) => {
+ prim_store.color_bindings.push(color)
+ }
+ PropertyBinding::Value(..) => ColorBindingIndex::INVALID,
+ };
+ PrimitiveInstanceKind::Rectangle {
+ data_handle,
+ opacity_binding_index: OpacityBindingIndex::INVALID,
+ segment_instance_index: SegmentInstanceIndex::INVALID,
+ color_binding_index,
+ }
+ }
+ }
+ }
+}
+
+// Maintains a list of opacity bindings that have been collapsed into
+// the color of a single primitive. This is an important optimization
+// that avoids allocating an intermediate surface for most common
+// uses of opacity filters.
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct OpacityBinding {
+ pub bindings: Vec<PropertyBinding<f32>>,
+ pub current: f32,
+}
+
+impl OpacityBinding {
+ pub fn new() -> OpacityBinding {
+ OpacityBinding {
+ bindings: Vec::new(),
+ current: 1.0,
+ }
+ }
+
+ // Add a new opacity value / binding to the list
+ pub fn push(&mut self, binding: PropertyBinding<f32>) {
+ self.bindings.push(binding);
+ }
+
+ // Resolve the current value of each opacity binding, and
+ // store that as a single combined opacity.
+ pub fn update(&mut self, scene_properties: &SceneProperties) {
+ let mut new_opacity = 1.0;
+
+ for binding in &self.bindings {
+ let opacity = scene_properties.resolve_float(binding);
+ new_opacity = new_opacity * opacity;
+ }
+
+ self.current = new_opacity;
+ }
+}
+
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct VisibleMaskImageTile {
+ pub tile_offset: TileOffset,
+ pub tile_rect: LayoutRect,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct VisibleGradientTile {
+ pub handle: GpuCacheHandle,
+ pub local_rect: LayoutRect,
+ pub local_clip_rect: LayoutRect,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct CachedGradientSegment {
+ pub handle: RenderTaskCacheEntryHandle,
+ pub local_rect: LayoutRect,
+}
+
+/// Information about how to cache a border segment,
+/// along with the current render task cache entry.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, MallocSizeOf)]
+pub struct BorderSegmentInfo {
+ pub local_task_size: LayoutSize,
+ pub cache_key: BorderSegmentCacheKey,
+}
+
+/// Represents the visibility state of a segment (wrt clip masks).
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[derive(Debug, Clone)]
+pub enum ClipMaskKind {
+ /// The segment has a clip mask, specified by the render task.
+ Mask(RenderTaskId),
+ /// The segment has no clip mask.
+ None,
+ /// The segment is made invisible / clipped completely.
+ Clipped,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, MallocSizeOf)]
+pub struct BrushSegment {
+ pub local_rect: LayoutRect,
+ pub may_need_clip_mask: bool,
+ pub edge_flags: EdgeAaSegmentMask,
+ pub extra_data: [f32; 4],
+ pub brush_flags: BrushFlags,
+}
+
+impl BrushSegment {
+ pub fn new(
+ local_rect: LayoutRect,
+ may_need_clip_mask: bool,
+ edge_flags: EdgeAaSegmentMask,
+ extra_data: [f32; 4],
+ brush_flags: BrushFlags,
+ ) -> Self {
+ Self {
+ local_rect,
+ may_need_clip_mask,
+ edge_flags,
+ extra_data,
+ brush_flags,
+ }
+ }
+
+ /// Write out to the clip mask instances array the correct clip mask
+ /// config for this segment.
+ pub fn update_clip_task(
+ &self,
+ clip_chain: Option<&ClipChainInstance>,
+ prim_bounding_rect: WorldRect,
+ root_spatial_node_index: SpatialNodeIndex,
+ surface_index: SurfaceIndex,
+ pic_state: &mut PictureState,
+ frame_context: &FrameBuildingContext,
+ frame_state: &mut FrameBuildingState,
+ clip_data_store: &mut ClipDataStore,
+ unclipped: &DeviceRect,
+ device_pixel_scale: DevicePixelScale,
+ ) -> ClipMaskKind {
+ match clip_chain {
+ Some(clip_chain) => {
+ if !clip_chain.needs_mask ||
+ (!self.may_need_clip_mask && !clip_chain.has_non_local_clips) {
+ return ClipMaskKind::None;
+ }
+
+ let segment_world_rect = match pic_state.map_pic_to_world.map(&clip_chain.pic_clip_rect) {
+ Some(rect) => rect,
+ None => return ClipMaskKind::Clipped,
+ };
+
+ let segment_world_rect = match segment_world_rect.intersection(&prim_bounding_rect) {
+ Some(rect) => rect,
+ None => return ClipMaskKind::Clipped,
+ };
+
+ // Get a minimal device space rect, clipped to the screen that we
+ // need to allocate for the clip mask, as well as interpolated
+ // snap offsets.
+ let device_rect = match get_clipped_device_rect(
+ unclipped,
+ &pic_state.map_raster_to_world,
+ segment_world_rect,
+ device_pixel_scale,
+ ) {
+ Some(info) => info,
+ None => {
+ return ClipMaskKind::Clipped;
+ }
+ };
+
+ let (device_rect, device_pixel_scale) = adjust_mask_scale_for_max_size(device_rect, device_pixel_scale);
+
+ let clip_task_id = RenderTask::new_mask(
+ device_rect.to_i32(),
+ clip_chain.clips_range,
+ root_spatial_node_index,
+ frame_state.clip_store,
+ frame_state.gpu_cache,
+ frame_state.resource_cache,
+ frame_state.render_tasks,
+ clip_data_store,
+ device_pixel_scale,
+ frame_context.fb_config,
+ );
+ let port = frame_state
+ .surfaces[surface_index.0]
+ .render_tasks
+ .unwrap_or_else(|| panic!("bug: no task for surface {:?}", surface_index))
+ .port;
+ frame_state.render_tasks.add_dependency(port, clip_task_id);
+ ClipMaskKind::Mask(clip_task_id)
+ }
+ None => {
+ ClipMaskKind::Clipped
+ }
+ }
+ }
+}
+
+#[derive(Debug)]
+#[repr(C)]
+struct ClipRect {
+ rect: LayoutRect,
+ mode: f32,
+}
+
+#[derive(Debug)]
+#[repr(C)]
+struct ClipCorner {
+ rect: LayoutRect,
+ outer_radius_x: f32,
+ outer_radius_y: f32,
+ inner_radius_x: f32,
+ inner_radius_y: f32,
+}
+
+impl ToGpuBlocks for ClipCorner {
+ fn write_gpu_blocks(&self, mut request: GpuDataRequest) {
+ self.write(&mut request)
+ }
+}
+
+impl ClipCorner {
+ fn write(&self, request: &mut GpuDataRequest) {
+ request.push(self.rect);
+ request.push([
+ self.outer_radius_x,
+ self.outer_radius_y,
+ self.inner_radius_x,
+ self.inner_radius_y,
+ ]);
+ }
+
+ fn uniform(rect: LayoutRect, outer_radius: f32, inner_radius: f32) -> ClipCorner {
+ ClipCorner {
+ rect,
+ outer_radius_x: outer_radius,
+ outer_radius_y: outer_radius,
+ inner_radius_x: inner_radius,
+ inner_radius_y: inner_radius,
+ }
+ }
+}
+
+#[derive(Debug)]
+#[repr(C)]
+pub struct ImageMaskData {
+ /// The local size of the whole masked area.
+ pub local_mask_size: LayoutSize,
+}
+
+impl ToGpuBlocks for ImageMaskData {
+ fn write_gpu_blocks(&self, mut request: GpuDataRequest) {
+ request.push([
+ self.local_mask_size.width,
+ self.local_mask_size.height,
+ 0.0,
+ 0.0,
+ ]);
+ }
+}
+
+#[derive(Debug)]
+pub struct ClipData {
+ rect: ClipRect,
+ top_left: ClipCorner,
+ top_right: ClipCorner,
+ bottom_left: ClipCorner,
+ bottom_right: ClipCorner,
+}
+
+impl ClipData {
+ pub fn rounded_rect(size: LayoutSize, radii: &BorderRadius, mode: ClipMode) -> ClipData {
+ // TODO(gw): For simplicity, keep most of the clip GPU structs the
+ // same as they were, even though the origin is now always
+ // zero, since they are in the clip's local space. In future,
+ // we could reduce the GPU cache size of ClipData.
+ let rect = LayoutRect::new(
+ LayoutPoint::zero(),
+ size,
+ );
+
+ ClipData {
+ rect: ClipRect {
+ rect,
+ mode: mode as u32 as f32,
+ },
+ top_left: ClipCorner {
+ rect: LayoutRect::new(
+ LayoutPoint::new(rect.origin.x, rect.origin.y),
+ LayoutSize::new(radii.top_left.width, radii.top_left.height),
+ ),
+ outer_radius_x: radii.top_left.width,
+ outer_radius_y: radii.top_left.height,
+ inner_radius_x: 0.0,
+ inner_radius_y: 0.0,
+ },
+ top_right: ClipCorner {
+ rect: LayoutRect::new(
+ LayoutPoint::new(
+ rect.origin.x + rect.size.width - radii.top_right.width,
+ rect.origin.y,
+ ),
+ LayoutSize::new(radii.top_right.width, radii.top_right.height),
+ ),
+ outer_radius_x: radii.top_right.width,
+ outer_radius_y: radii.top_right.height,
+ inner_radius_x: 0.0,
+ inner_radius_y: 0.0,
+ },
+ bottom_left: ClipCorner {
+ rect: LayoutRect::new(
+ LayoutPoint::new(
+ rect.origin.x,
+ rect.origin.y + rect.size.height - radii.bottom_left.height,
+ ),
+ LayoutSize::new(radii.bottom_left.width, radii.bottom_left.height),
+ ),
+ outer_radius_x: radii.bottom_left.width,
+ outer_radius_y: radii.bottom_left.height,
+ inner_radius_x: 0.0,
+ inner_radius_y: 0.0,
+ },
+ bottom_right: ClipCorner {
+ rect: LayoutRect::new(
+ LayoutPoint::new(
+ rect.origin.x + rect.size.width - radii.bottom_right.width,
+ rect.origin.y + rect.size.height - radii.bottom_right.height,
+ ),
+ LayoutSize::new(radii.bottom_right.width, radii.bottom_right.height),
+ ),
+ outer_radius_x: radii.bottom_right.width,
+ outer_radius_y: radii.bottom_right.height,
+ inner_radius_x: 0.0,
+ inner_radius_y: 0.0,
+ },
+ }
+ }
+
+ pub fn uniform(size: LayoutSize, radius: f32, mode: ClipMode) -> ClipData {
+ // TODO(gw): For simplicity, keep most of the clip GPU structs the
+ // same as they were, even though the origin is now always
+ // zero, since they are in the clip's local space. In future,
+ // we could reduce the GPU cache size of ClipData.
+ let rect = LayoutRect::new(
+ LayoutPoint::zero(),
+ size,
+ );
+
+ ClipData {
+ rect: ClipRect {
+ rect,
+ mode: mode as u32 as f32,
+ },
+ top_left: ClipCorner::uniform(
+ LayoutRect::new(
+ LayoutPoint::new(rect.origin.x, rect.origin.y),
+ LayoutSize::new(radius, radius),
+ ),
+ radius,
+ 0.0,
+ ),
+ top_right: ClipCorner::uniform(
+ LayoutRect::new(
+ LayoutPoint::new(rect.origin.x + rect.size.width - radius, rect.origin.y),
+ LayoutSize::new(radius, radius),
+ ),
+ radius,
+ 0.0,
+ ),
+ bottom_left: ClipCorner::uniform(
+ LayoutRect::new(
+ LayoutPoint::new(rect.origin.x, rect.origin.y + rect.size.height - radius),
+ LayoutSize::new(radius, radius),
+ ),
+ radius,
+ 0.0,
+ ),
+ bottom_right: ClipCorner::uniform(
+ LayoutRect::new(
+ LayoutPoint::new(
+ rect.origin.x + rect.size.width - radius,
+ rect.origin.y + rect.size.height - radius,
+ ),
+ LayoutSize::new(radius, radius),
+ ),
+ radius,
+ 0.0,
+ ),
+ }
+ }
+
+ pub fn write(&self, request: &mut GpuDataRequest) {
+ request.push(self.rect.rect);
+ request.push([self.rect.mode, 0.0, 0.0, 0.0]);
+ for corner in &[
+ &self.top_left,
+ &self.top_right,
+ &self.bottom_left,
+ &self.bottom_right,
+ ] {
+ corner.write(request);
+ }
+ }
+}
+
+/// A hashable descriptor for nine-patches, used by image and
+/// gradient borders.
+#[derive(Debug, Clone, PartialEq, Eq, Hash, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct NinePatchDescriptor {
+ pub width: i32,
+ pub height: i32,
+ pub slice: DeviceIntSideOffsets,
+ pub fill: bool,
+ pub repeat_horizontal: RepeatMode,
+ pub repeat_vertical: RepeatMode,
+ pub outset: SideOffsetsKey,
+ pub widths: SideOffsetsKey,
+}
+
+impl IsVisible for PrimitiveKeyKind {
+ // Return true if the primary primitive is visible.
+ // Used to trivially reject non-visible primitives.
+ // TODO(gw): Currently, primitives other than those
+ // listed here are handled before the
+ // add_primitive() call. In the future
+ // we should move the logic for all other
+ // primitive types to use this.
+ fn is_visible(&self) -> bool {
+ match *self {
+ PrimitiveKeyKind::Clear => {
+ true
+ }
+ PrimitiveKeyKind::Rectangle { ref color, .. } => {
+ match *color {
+ PropertyBinding::Value(value) => value.a > 0,
+ PropertyBinding::Binding(..) => true,
+ }
+ }
+ }
+ }
+}
+
+impl CreateShadow for PrimitiveKeyKind {
+ // Create a clone of this PrimitiveContainer, applying whatever
+ // changes are necessary to the primitive to support rendering
+ // it as part of the supplied shadow.
+ fn create_shadow(
+ &self,
+ shadow: &Shadow,
+ ) -> PrimitiveKeyKind {
+ match *self {
+ PrimitiveKeyKind::Rectangle { .. } => {
+ PrimitiveKeyKind::Rectangle {
+ color: PropertyBinding::Value(shadow.color.into()),
+ }
+ }
+ PrimitiveKeyKind::Clear => {
+ panic!("bug: this prim is not supported in shadow contexts");
+ }
+ }
+ }
+}
+
+#[derive(Clone, Copy, Debug, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PrimitiveDebugId(pub usize);
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub enum PrimitiveInstanceKind {
+ /// Direct reference to a Picture
+ Picture {
+ /// Handle to the common interned data for this primitive.
+ data_handle: PictureDataHandle,
+ pic_index: PictureIndex,
+ segment_instance_index: SegmentInstanceIndex,
+ },
+ /// A run of glyphs, with associated font parameters.
+ TextRun {
+ /// Handle to the common interned data for this primitive.
+ data_handle: TextRunDataHandle,
+ /// Index to the per instance scratch data for this primitive.
+ run_index: TextRunIndex,
+ },
+ /// A line decoration. cache_handle refers to a cached render
+ /// task handle, if this line decoration is not a simple solid.
+ LineDecoration {
+ /// Handle to the common interned data for this primitive.
+ data_handle: LineDecorationDataHandle,
+ // TODO(gw): For now, we need to store some information in
+ // the primitive instance that is created during
+ // prepare_prims and read during the batching pass.
+ // Once we unify the prepare_prims and batching to
+ // occur at the same time, we can remove most of
+ // the things we store here in the instance, and
+ // use them directly. This will remove cache_handle,
+ // but also the opacity, clip_task_id etc below.
+ cache_handle: Option<RenderTaskCacheEntryHandle>,
+ },
+ NormalBorder {
+ /// Handle to the common interned data for this primitive.
+ data_handle: NormalBorderDataHandle,
+ cache_handles: storage::Range<RenderTaskCacheEntryHandle>,
+ },
+ ImageBorder {
+ /// Handle to the common interned data for this primitive.
+ data_handle: ImageBorderDataHandle,
+ },
+ Rectangle {
+ /// Handle to the common interned data for this primitive.
+ data_handle: PrimitiveDataHandle,
+ opacity_binding_index: OpacityBindingIndex,
+ segment_instance_index: SegmentInstanceIndex,
+ color_binding_index: ColorBindingIndex,
+ },
+ YuvImage {
+ /// Handle to the common interned data for this primitive.
+ data_handle: YuvImageDataHandle,
+ segment_instance_index: SegmentInstanceIndex,
+ is_compositor_surface: bool,
+ },
+ Image {
+ /// Handle to the common interned data for this primitive.
+ data_handle: ImageDataHandle,
+ image_instance_index: ImageInstanceIndex,
+ is_compositor_surface: bool,
+ },
+ LinearGradient {
+ /// Handle to the common interned data for this primitive.
+ data_handle: LinearGradientDataHandle,
+ gradient_index: LinearGradientIndex,
+ },
+ RadialGradient {
+ /// Handle to the common interned data for this primitive.
+ data_handle: RadialGradientDataHandle,
+ visible_tiles_range: GradientTileRange,
+ },
+ ConicGradient {
+ /// Handle to the common interned data for this primitive.
+ data_handle: ConicGradientDataHandle,
+ visible_tiles_range: GradientTileRange,
+ },
+ /// Clear out a rect, used for special effects.
+ Clear {
+ /// Handle to the common interned data for this primitive.
+ data_handle: PrimitiveDataHandle,
+ },
+ /// Render a portion of a specified backdrop.
+ Backdrop {
+ data_handle: BackdropDataHandle,
+ },
+}
+
+#[derive(Debug, Copy, Clone, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct PrimitiveVisibilityIndex(pub u32);
+
+impl PrimitiveVisibilityIndex {
+ pub const INVALID: PrimitiveVisibilityIndex = PrimitiveVisibilityIndex(u32::MAX);
+}
+
+/// A bit mask describing which dirty regions a primitive is visible in.
+/// A value of 0 means not visible in any region, while a mask of 0xffff
+/// would be considered visible in all regions.
+#[derive(Debug, Copy, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PrimitiveVisibilityMask {
+ bits: u16,
+}
+
+impl PrimitiveVisibilityMask {
+ /// Construct a default mask, where no regions are considered visible
+ pub fn empty() -> Self {
+ PrimitiveVisibilityMask {
+ bits: 0,
+ }
+ }
+
+ pub fn all() -> Self {
+ PrimitiveVisibilityMask {
+ bits: !0,
+ }
+ }
+
+ pub fn include(&mut self, other: PrimitiveVisibilityMask) {
+ self.bits |= other.bits;
+ }
+
+ pub fn intersects(&self, other: PrimitiveVisibilityMask) -> bool {
+ (self.bits & other.bits) != 0
+ }
+
+ /// Mark a given region index as visible
+ pub fn set_visible(&mut self, region_index: usize) {
+ debug_assert!(region_index < PrimitiveVisibilityMask::MAX_DIRTY_REGIONS);
+ self.bits |= 1 << region_index;
+ }
+
+ /// Returns true if there are no visible regions
+ pub fn is_empty(&self) -> bool {
+ self.bits == 0
+ }
+
+ /// The maximum number of supported dirty regions.
+ pub const MAX_DIRTY_REGIONS: usize = 8 * mem::size_of::<PrimitiveVisibilityMask>();
+}
+
+bitflags! {
+ /// A set of bitflags that can be set in the visibility information
+ /// for a primitive instance. This can be used to control how primitives
+ /// are treated during batching.
+ // TODO(gw): We should also move `is_compositor_surface` to be part of
+ // this flags struct.
+ #[cfg_attr(feature = "capture", derive(Serialize))]
+ pub struct PrimitiveVisibilityFlags: u16 {
+ /// Implies that this primitive covers the entire picture cache slice,
+ /// and can thus be dropped during batching and drawn with clear color.
+ const IS_BACKDROP = 1;
+ }
+}
+
+/// Information stored for a visible primitive about the visible
+/// rect and associated clip information.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct PrimitiveVisibility {
+ /// The clip chain instance that was built for this primitive.
+ pub clip_chain: ClipChainInstance,
+
+ /// The current world rect, clipped to screen / dirty rect boundaries.
+ // TODO(gw): This is only used by a small number of primitives.
+ // It's probably faster to not store this and recalculate
+ // on demand in those cases?
+ pub clipped_world_rect: WorldRect,
+
+ /// An index into the clip task instances array in the primitive
+ /// store. If this is ClipTaskIndex::INVALID, then the primitive
+ /// has no clip mask. Otherwise, it may store the offset of the
+ /// global clip mask task for this primitive, or the first of
+ /// a list of clip task ids (one per segment).
+ pub clip_task_index: ClipTaskIndex,
+
+ /// A set of flags that define how this primitive should be handled
+ /// during batching of visibile primitives.
+ pub flags: PrimitiveVisibilityFlags,
+
+ /// A mask defining which of the dirty regions this primitive is visible in.
+ pub visibility_mask: PrimitiveVisibilityMask,
+
+ /// The current combined local clip for this primitive, from
+ /// the primitive local clip above and the current clip chain.
+ pub combined_local_clip_rect: LayoutRect,
+}
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct PrimitiveInstance {
+ /// Identifies the kind of primitive this
+ /// instance is, and references to where
+ /// the relevant information for the primitive
+ /// can be found.
+ pub kind: PrimitiveInstanceKind,
+
+ /// Local space clip rect for this instance
+ pub local_clip_rect: LayoutRect,
+
+ #[cfg(debug_assertions)]
+ pub id: PrimitiveDebugId,
+
+ /// The last frame ID (of the `RenderTaskGraph`) this primitive
+ /// was prepared for rendering in.
+ #[cfg(debug_assertions)]
+ pub prepared_frame_id: FrameId,
+
+ /// If this primitive is visible, an index into the instance
+ /// visibility scratch buffer. If not visible, INVALID.
+ pub visibility_info: PrimitiveVisibilityIndex,
+
+ /// ID of the clip chain that this primitive is clipped by.
+ pub clip_chain_id: ClipChainId,
+}
+
+impl PrimitiveInstance {
+ pub fn new(
+ local_clip_rect: LayoutRect,
+ kind: PrimitiveInstanceKind,
+ clip_chain_id: ClipChainId,
+ ) -> Self {
+ PrimitiveInstance {
+ local_clip_rect,
+ kind,
+ #[cfg(debug_assertions)]
+ prepared_frame_id: FrameId::INVALID,
+ #[cfg(debug_assertions)]
+ id: PrimitiveDebugId(NEXT_PRIM_ID.fetch_add(1, Ordering::Relaxed)),
+ visibility_info: PrimitiveVisibilityIndex::INVALID,
+ clip_chain_id,
+ }
+ }
+
+ // Reset any pre-frame state for this primitive.
+ pub fn reset(&mut self) {
+ self.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ }
+
+ #[cfg(debug_assertions)]
+ pub fn is_chased(&self) -> bool {
+ PRIM_CHASE_ID.load(Ordering::SeqCst) == self.id.0
+ }
+
+ #[cfg(not(debug_assertions))]
+ pub fn is_chased(&self) -> bool {
+ false
+ }
+
+ pub fn uid(&self) -> intern::ItemUid {
+ match &self.kind {
+ PrimitiveInstanceKind::Clear { data_handle, .. } |
+ PrimitiveInstanceKind::Rectangle { data_handle, .. } => {
+ data_handle.uid()
+ }
+ PrimitiveInstanceKind::Image { data_handle, .. } => {
+ data_handle.uid()
+ }
+ PrimitiveInstanceKind::ImageBorder { data_handle, .. } => {
+ data_handle.uid()
+ }
+ PrimitiveInstanceKind::LineDecoration { data_handle, .. } => {
+ data_handle.uid()
+ }
+ PrimitiveInstanceKind::LinearGradient { data_handle, .. } => {
+ data_handle.uid()
+ }
+ PrimitiveInstanceKind::NormalBorder { data_handle, .. } => {
+ data_handle.uid()
+ }
+ PrimitiveInstanceKind::Picture { data_handle, .. } => {
+ data_handle.uid()
+ }
+ PrimitiveInstanceKind::RadialGradient { data_handle, .. } => {
+ data_handle.uid()
+ }
+ PrimitiveInstanceKind::ConicGradient { data_handle, .. } => {
+ data_handle.uid()
+ }
+ PrimitiveInstanceKind::TextRun { data_handle, .. } => {
+ data_handle.uid()
+ }
+ PrimitiveInstanceKind::YuvImage { data_handle, .. } => {
+ data_handle.uid()
+ }
+ PrimitiveInstanceKind::Backdrop { data_handle, .. } => {
+ data_handle.uid()
+ }
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[derive(Debug)]
+pub struct SegmentedInstance {
+ pub gpu_cache_handle: GpuCacheHandle,
+ pub segments_range: SegmentsRange,
+}
+
+pub type GlyphKeyStorage = storage::Storage<GlyphKey>;
+pub type TextRunIndex = storage::Index<TextRunPrimitive>;
+pub type TextRunStorage = storage::Storage<TextRunPrimitive>;
+pub type OpacityBindingIndex = storage::Index<OpacityBinding>;
+pub type OpacityBindingStorage = storage::Storage<OpacityBinding>;
+pub type ColorBindingIndex = storage::Index<PropertyBinding<ColorU>>;
+pub type ColorBindingStorage = storage::Storage<PropertyBinding<ColorU>>;
+pub type BorderHandleStorage = storage::Storage<RenderTaskCacheEntryHandle>;
+pub type SegmentStorage = storage::Storage<BrushSegment>;
+pub type SegmentsRange = storage::Range<BrushSegment>;
+pub type SegmentInstanceStorage = storage::Storage<SegmentedInstance>;
+pub type SegmentInstanceIndex = storage::Index<SegmentedInstance>;
+pub type ImageInstanceStorage = storage::Storage<ImageInstance>;
+pub type ImageInstanceIndex = storage::Index<ImageInstance>;
+pub type GradientTileStorage = storage::Storage<VisibleGradientTile>;
+pub type GradientTileRange = storage::Range<VisibleGradientTile>;
+pub type LinearGradientIndex = storage::Index<LinearGradientPrimitive>;
+pub type LinearGradientStorage = storage::Storage<LinearGradientPrimitive>;
+
+/// Contains various vecs of data that is used only during frame building,
+/// where we want to recycle the memory each new display list, to avoid constantly
+/// re-allocating and moving memory around. Written during primitive preparation,
+/// and read during batching.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct PrimitiveScratchBuffer {
+ /// Contains a list of clip mask instance parameters
+ /// per segment generated.
+ pub clip_mask_instances: Vec<ClipMaskKind>,
+
+ /// List of glyphs keys that are allocated by each
+ /// text run instance.
+ pub glyph_keys: GlyphKeyStorage,
+
+ /// List of render task handles for border segment instances
+ /// that have been added this frame.
+ pub border_cache_handles: BorderHandleStorage,
+
+ /// A list of brush segments that have been built for this scene.
+ pub segments: SegmentStorage,
+
+ /// A list of segment ranges and GPU cache handles for prim instances
+ /// that have opted into segment building. In future, this should be
+ /// removed in favor of segment building during primitive interning.
+ pub segment_instances: SegmentInstanceStorage,
+
+ /// A list of visible tiles that tiled gradients use to store
+ /// per-tile information.
+ pub gradient_tiles: GradientTileStorage,
+
+ /// List of the visibility information for currently visible primitives.
+ pub prim_info: Vec<PrimitiveVisibility>,
+
+ /// List of dirty regions for the cached pictures in this document, used to
+ /// verify invalidation in wrench reftests. Only collected in testing.
+ pub recorded_dirty_regions: Vec<RecordedDirtyRegion>,
+
+ /// List of debug display items for rendering.
+ pub debug_items: Vec<DebugItem>,
+}
+
+impl PrimitiveScratchBuffer {
+ pub fn new() -> Self {
+ PrimitiveScratchBuffer {
+ clip_mask_instances: Vec::new(),
+ glyph_keys: GlyphKeyStorage::new(0),
+ border_cache_handles: BorderHandleStorage::new(0),
+ segments: SegmentStorage::new(0),
+ segment_instances: SegmentInstanceStorage::new(0),
+ gradient_tiles: GradientTileStorage::new(0),
+ recorded_dirty_regions: Vec::new(),
+ debug_items: Vec::new(),
+ prim_info: Vec::new(),
+ }
+ }
+
+ pub fn recycle(&mut self, recycler: &mut Recycler) {
+ recycler.recycle_vec(&mut self.clip_mask_instances);
+ recycler.recycle_vec(&mut self.prim_info);
+ self.glyph_keys.recycle(recycler);
+ self.border_cache_handles.recycle(recycler);
+ self.segments.recycle(recycler);
+ self.segment_instances.recycle(recycler);
+ self.gradient_tiles.recycle(recycler);
+ recycler.recycle_vec(&mut self.debug_items);
+ }
+
+ pub fn begin_frame(&mut self) {
+ // Clear the clip mask tasks for the beginning of the frame. Append
+ // a single kind representing no clip mask, at the ClipTaskIndex::INVALID
+ // location.
+ self.clip_mask_instances.clear();
+ self.clip_mask_instances.push(ClipMaskKind::None);
+
+ self.border_cache_handles.clear();
+
+ // TODO(gw): As in the previous code, the gradient tiles store GPU cache
+ // handles that are cleared (and thus invalidated + re-uploaded)
+ // every frame. This maintains the existing behavior, but we
+ // should fix this in the future to retain handles.
+ self.gradient_tiles.clear();
+
+ self.prim_info.clear();
+
+ self.debug_items.clear();
+
+ assert!(self.recorded_dirty_regions.is_empty(), "Should have sent to Renderer");
+ }
+
+ #[allow(dead_code)]
+ pub fn push_debug_rect(
+ &mut self,
+ rect: DeviceRect,
+ outer_color: ColorF,
+ inner_color: ColorF,
+ ) {
+ self.debug_items.push(DebugItem::Rect {
+ rect,
+ outer_color,
+ inner_color,
+ });
+ }
+
+ #[allow(dead_code)]
+ pub fn push_debug_string(
+ &mut self,
+ position: DevicePoint,
+ color: ColorF,
+ msg: String,
+ ) {
+ self.debug_items.push(DebugItem::Text {
+ position,
+ color,
+ msg,
+ });
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Clone, Debug)]
+pub struct PrimitiveStoreStats {
+ picture_count: usize,
+ text_run_count: usize,
+ opacity_binding_count: usize,
+ image_count: usize,
+ linear_gradient_count: usize,
+ color_binding_count: usize,
+}
+
+impl PrimitiveStoreStats {
+ pub fn empty() -> Self {
+ PrimitiveStoreStats {
+ picture_count: 0,
+ text_run_count: 0,
+ opacity_binding_count: 0,
+ image_count: 0,
+ linear_gradient_count: 0,
+ color_binding_count: 0,
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct PrimitiveStore {
+ pub pictures: Vec<PicturePrimitive>,
+ pub text_runs: TextRunStorage,
+ pub linear_gradients: LinearGradientStorage,
+
+ /// A list of image instances. These are stored separately as
+ /// storing them inline in the instance makes the structure bigger
+ /// for other types.
+ pub images: ImageInstanceStorage,
+
+ /// List of animated opacity bindings for a primitive.
+ pub opacity_bindings: OpacityBindingStorage,
+ /// animated color bindings for this primitive.
+ pub color_bindings: ColorBindingStorage,
+}
+
+impl PrimitiveStore {
+ pub fn new(stats: &PrimitiveStoreStats) -> PrimitiveStore {
+ PrimitiveStore {
+ pictures: Vec::with_capacity(stats.picture_count),
+ text_runs: TextRunStorage::new(stats.text_run_count),
+ images: ImageInstanceStorage::new(stats.image_count),
+ opacity_bindings: OpacityBindingStorage::new(stats.opacity_binding_count),
+ color_bindings: ColorBindingStorage::new(stats.color_binding_count),
+ linear_gradients: LinearGradientStorage::new(stats.linear_gradient_count),
+ }
+ }
+
+ pub fn get_stats(&self) -> PrimitiveStoreStats {
+ PrimitiveStoreStats {
+ picture_count: self.pictures.len(),
+ text_run_count: self.text_runs.len(),
+ image_count: self.images.len(),
+ opacity_binding_count: self.opacity_bindings.len(),
+ linear_gradient_count: self.linear_gradients.len(),
+ color_binding_count: self.color_bindings.len(),
+ }
+ }
+
+ #[allow(unused)]
+ pub fn print_picture_tree(&self, root: PictureIndex) {
+ use crate::print_tree::PrintTree;
+ let mut pt = PrintTree::new("picture tree");
+ self.pictures[root.0].print(&self.pictures, root, &mut pt);
+ }
+
+ /// Destroy an existing primitive store. This is called just before
+ /// a primitive store is replaced with a newly built scene.
+ pub fn destroy(
+ &mut self,
+ retained_tiles: &mut RetainedTiles,
+ ) {
+ for pic in &mut self.pictures {
+ pic.destroy(
+ retained_tiles,
+ );
+ }
+ }
+
+ /// Returns the total count of primitive instances contained in pictures.
+ pub fn prim_count(&self) -> usize {
+ let mut prim_count = 0;
+ for pic in &self.pictures {
+ for cluster in &pic.prim_list.clusters {
+ prim_count += cluster.prim_instances.len();
+ }
+ }
+ prim_count
+ }
+
+ /// Update visibility pass - update each primitive visibility struct, and
+ /// build the clip chain instance if appropriate.
+ pub fn update_visibility(
+ &mut self,
+ pic_index: PictureIndex,
+ parent_surface_index: SurfaceIndex,
+ world_culling_rect: &WorldRect,
+ frame_context: &FrameVisibilityContext,
+ frame_state: &mut FrameVisibilityState,
+ ) -> Option<PictureRect> {
+ profile_scope!("update_visibility");
+ let (mut prim_list, surface_index, apply_local_clip_rect, world_culling_rect, is_composite) = {
+ let pic = &mut self.pictures[pic_index.0];
+ let mut world_culling_rect = *world_culling_rect;
+
+ let prim_list = mem::replace(&mut pic.prim_list, PrimitiveList::empty());
+ let (surface_index, is_composite) = match pic.raster_config {
+ Some(ref raster_config) => (raster_config.surface_index, true),
+ None => (parent_surface_index, false)
+ };
+
+ match pic.raster_config {
+ Some(RasterConfig { composite_mode: PictureCompositeMode::TileCache { .. }, .. }) => {
+ let mut tile_cache = pic.tile_cache.take().unwrap();
+ debug_assert!(frame_state.tile_cache.is_none());
+
+ // If we have a tile cache for this picture, see if any of the
+ // relative transforms have changed, which means we need to
+ // re-map the dependencies of any child primitives.
+ world_culling_rect = tile_cache.pre_update(
+ layout_rect_as_picture_rect(&pic.estimated_local_rect),
+ surface_index,
+ frame_context,
+ frame_state,
+ );
+
+ // Push a new surface, supplying the list of clips that should be
+ // ignored, since they are handled by clipping when drawing this surface.
+ frame_state.push_surface(
+ surface_index,
+ &tile_cache.shared_clips,
+ frame_context.spatial_tree,
+ );
+ frame_state.tile_cache = Some(tile_cache);
+ }
+ _ => {
+ if is_composite {
+ frame_state.push_surface(
+ surface_index,
+ &[],
+ frame_context.spatial_tree,
+ );
+ }
+ }
+ }
+
+ (prim_list, surface_index, pic.apply_local_clip_rect, world_culling_rect, is_composite)
+ };
+
+ let surface = &frame_context.surfaces[surface_index.0 as usize];
+
+ let mut map_local_to_surface = surface
+ .map_local_to_surface
+ .clone();
+
+ let map_surface_to_world = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ surface.surface_spatial_node_index,
+ frame_context.global_screen_world_rect,
+ frame_context.spatial_tree,
+ );
+
+ let mut surface_rect = PictureRect::zero();
+
+ for cluster in &mut prim_list.clusters {
+ profile_scope!("cluster");
+ // Get the cluster and see if is visible
+ if !cluster.flags.contains(ClusterFlags::IS_VISIBLE) {
+ // Each prim instance must have reset called each frame, to clear
+ // indices into various scratch buffers. If this doesn't occur,
+ // the primitive may incorrectly be considered visible, which can
+ // cause unexpected conditions to occur later during the frame.
+ // Primitive instances are normally reset in the main loop below,
+ // but we must also reset them in the rare case that the cluster
+ // visibility has changed (due to an invalid transform and/or
+ // backface visibility changing for this cluster).
+ // TODO(gw): This is difficult to test for in CI - as a follow up,
+ // we should add a debug flag that validates the prim
+ // instance is always reset every frame to catch similar
+ // issues in future.
+ for prim_instance in &mut cluster.prim_instances {
+ prim_instance.reset();
+ }
+ continue;
+ }
+
+ map_local_to_surface.set_target_spatial_node(
+ cluster.spatial_node_index,
+ frame_context.spatial_tree,
+ );
+
+ for prim_instance in &mut cluster.prim_instances {
+ prim_instance.reset();
+
+ if prim_instance.is_chased() {
+ #[cfg(debug_assertions)] // needed for ".id" part
+ println!("\tpreparing {:?} in {:?}", prim_instance.id, pic_index);
+ println!("\t{:?}", prim_instance.kind);
+ }
+
+ let (is_passthrough, prim_local_rect, prim_shadowed_rect) = match prim_instance.kind {
+ PrimitiveInstanceKind::Picture { pic_index, .. } => {
+ if !self.pictures[pic_index.0].is_visible() {
+ continue;
+ }
+
+ frame_state.clip_chain_stack.push_clip(
+ prim_instance.clip_chain_id,
+ frame_state.clip_store,
+ );
+
+ let pic_surface_rect = self.update_visibility(
+ pic_index,
+ surface_index,
+ &world_culling_rect,
+ frame_context,
+ frame_state,
+ );
+
+ frame_state.clip_chain_stack.pop_clip();
+
+ let pic = &self.pictures[pic_index.0];
+
+ if prim_instance.is_chased() && pic.estimated_local_rect != pic.precise_local_rect {
+ println!("\testimate {:?} adjusted to {:?}", pic.estimated_local_rect, pic.precise_local_rect);
+ }
+
+ let mut shadow_rect = pic.precise_local_rect;
+ match pic.raster_config {
+ Some(ref rc) => match rc.composite_mode {
+ // If we have a drop shadow filter, we also need to include the shadow in
+ // our shadowed local rect for the purpose of calculating the size of the
+ // picture.
+ PictureCompositeMode::Filter(Filter::DropShadows(ref shadows)) => {
+ for shadow in shadows {
+ shadow_rect = shadow_rect.union(&pic.precise_local_rect.translate(shadow.offset));
+ }
+ }
+ _ => {}
+ }
+ None => {
+ // If the primitive does not have its own raster config, we need to
+ // propogate the surface rect calculation to the parent.
+ if let Some(ref rect) = pic_surface_rect {
+ surface_rect = surface_rect.union(rect);
+ }
+ }
+ }
+
+ (pic.raster_config.is_none(), pic.precise_local_rect, shadow_rect)
+ }
+ _ => {
+ let prim_data = &frame_state.data_stores.as_common_data(&prim_instance);
+
+ (false, prim_data.prim_rect, prim_data.prim_rect)
+ }
+ };
+
+ if is_passthrough {
+ let vis_index = PrimitiveVisibilityIndex(frame_state.scratch.prim_info.len() as u32);
+
+ frame_state.scratch.prim_info.push(
+ PrimitiveVisibility {
+ clipped_world_rect: WorldRect::max_rect(),
+ clip_chain: ClipChainInstance::empty(),
+ clip_task_index: ClipTaskIndex::INVALID,
+ combined_local_clip_rect: LayoutRect::zero(),
+ visibility_mask: PrimitiveVisibilityMask::empty(),
+ flags: PrimitiveVisibilityFlags::empty(),
+ }
+ );
+
+ prim_instance.visibility_info = vis_index;
+ } else {
+ if prim_local_rect.size.width <= 0.0 || prim_local_rect.size.height <= 0.0 {
+ if prim_instance.is_chased() {
+ println!("\tculled for zero local rectangle");
+ }
+ continue;
+ }
+
+ // Inflate the local rect for this primitive by the inflation factor of
+ // the picture context and include the shadow offset. This ensures that
+ // even if the primitive itself is not visible, any effects from the
+ // blur radius or shadow will be correctly taken into account.
+ let inflation_factor = surface.inflation_factor;
+ let local_rect = prim_shadowed_rect
+ .inflate(inflation_factor, inflation_factor)
+ .intersection(&prim_instance.local_clip_rect);
+ let local_rect = match local_rect {
+ Some(local_rect) => local_rect,
+ None => {
+ if prim_instance.is_chased() {
+ println!("\tculled for being out of the local clip rectangle: {:?}",
+ prim_instance.local_clip_rect);
+ }
+ continue;
+ }
+ };
+
+ // Include the clip chain for this primitive in the current stack.
+ frame_state.clip_chain_stack.push_clip(
+ prim_instance.clip_chain_id,
+ frame_state.clip_store,
+ );
+
+ frame_state.clip_store.set_active_clips(
+ prim_instance.local_clip_rect,
+ cluster.spatial_node_index,
+ frame_state.clip_chain_stack.current_clips_array(),
+ &frame_context.spatial_tree,
+ &frame_state.data_stores.clip,
+ );
+
+ let clip_chain = frame_state
+ .clip_store
+ .build_clip_chain_instance(
+ local_rect,
+ &map_local_to_surface,
+ &map_surface_to_world,
+ &frame_context.spatial_tree,
+ frame_state.gpu_cache,
+ frame_state.resource_cache,
+ surface.device_pixel_scale,
+ &world_culling_rect,
+ &mut frame_state.data_stores.clip,
+ true,
+ prim_instance.is_chased(),
+ );
+
+ // Primitive visibility flags default to empty, but may be supplied
+ // by the `update_prim_dependencies` method below when picture caching
+ // is active.
+ let mut vis_flags = PrimitiveVisibilityFlags::empty();
+
+ if let Some(ref mut tile_cache) = frame_state.tile_cache {
+ // TODO(gw): Refactor how tile_cache is stored in frame_state
+ // so that we can pass frame_state directly to
+ // update_prim_dependencies, rather than splitting borrows.
+ match tile_cache.update_prim_dependencies(
+ prim_instance,
+ cluster.spatial_node_index,
+ clip_chain.as_ref(),
+ prim_local_rect,
+ frame_context,
+ frame_state.data_stores,
+ frame_state.clip_store,
+ &self.pictures,
+ frame_state.resource_cache,
+ &self.opacity_bindings,
+ &self.color_bindings,
+ &self.images,
+ &frame_state.surface_stack,
+ &mut frame_state.composite_state,
+ ) {
+ Some(flags) => {
+ vis_flags = flags;
+ }
+ None => {
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ // Ensure the primitive clip is popped - perhaps we can use
+ // some kind of scope to do this automatically in future.
+ frame_state.clip_chain_stack.pop_clip();
+ continue;
+ }
+ }
+ }
+
+ // Ensure the primitive clip is popped
+ frame_state.clip_chain_stack.pop_clip();
+
+ let clip_chain = match clip_chain {
+ Some(clip_chain) => clip_chain,
+ None => {
+ if prim_instance.is_chased() {
+ println!("\tunable to build the clip chain, skipping");
+ }
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ continue;
+ }
+ };
+
+ if prim_instance.is_chased() {
+ println!("\teffective clip chain from {:?} {}",
+ clip_chain.clips_range,
+ if apply_local_clip_rect { "(applied)" } else { "" },
+ );
+ println!("\tpicture rect {:?} @{:?}",
+ clip_chain.pic_clip_rect,
+ clip_chain.pic_spatial_node_index,
+ );
+ }
+
+ // Check if the clip bounding rect (in pic space) is visible on screen
+ // This includes both the prim bounding rect + local prim clip rect!
+ let world_rect = match map_surface_to_world.map(&clip_chain.pic_clip_rect) {
+ Some(world_rect) => world_rect,
+ None => {
+ continue;
+ }
+ };
+
+ let clipped_world_rect = match world_rect.intersection(&world_culling_rect) {
+ Some(rect) => rect,
+ None => {
+ continue;
+ }
+ };
+
+ let combined_local_clip_rect = if apply_local_clip_rect {
+ clip_chain.local_clip_rect
+ } else {
+ prim_instance.local_clip_rect
+ };
+
+ if combined_local_clip_rect.size.is_empty() {
+ debug_assert!(combined_local_clip_rect.size.width >= 0.0 &&
+ combined_local_clip_rect.size.height >= 0.0);
+ if prim_instance.is_chased() {
+ println!("\tculled for zero local clip rectangle");
+ }
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ continue;
+ }
+
+ // Include the visible area for primitive, including any shadows, in
+ // the area affected by the surface.
+ match combined_local_clip_rect.intersection(&local_rect) {
+ Some(visible_rect) => {
+ if let Some(rect) = map_local_to_surface.map(&visible_rect) {
+ surface_rect = surface_rect.union(&rect);
+ }
+ }
+ None => {
+ if prim_instance.is_chased() {
+ println!("\tculled for zero visible rectangle");
+ }
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ continue;
+ }
+ }
+
+ // When the debug display is enabled, paint a colored rectangle around each
+ // primitive.
+ if frame_context.debug_flags.contains(::api::DebugFlags::PRIMITIVE_DBG) {
+ let debug_color = match prim_instance.kind {
+ PrimitiveInstanceKind::Picture { .. } => ColorF::TRANSPARENT,
+ PrimitiveInstanceKind::TextRun { .. } => debug_colors::RED,
+ PrimitiveInstanceKind::LineDecoration { .. } => debug_colors::PURPLE,
+ PrimitiveInstanceKind::NormalBorder { .. } |
+ PrimitiveInstanceKind::ImageBorder { .. } => debug_colors::ORANGE,
+ PrimitiveInstanceKind::Rectangle { .. } => ColorF { r: 0.8, g: 0.8, b: 0.8, a: 0.5 },
+ PrimitiveInstanceKind::YuvImage { .. } => debug_colors::BLUE,
+ PrimitiveInstanceKind::Image { .. } => debug_colors::BLUE,
+ PrimitiveInstanceKind::LinearGradient { .. } => debug_colors::PINK,
+ PrimitiveInstanceKind::RadialGradient { .. } => debug_colors::PINK,
+ PrimitiveInstanceKind::ConicGradient { .. } => debug_colors::PINK,
+ PrimitiveInstanceKind::Clear { .. } => debug_colors::CYAN,
+ PrimitiveInstanceKind::Backdrop { .. } => debug_colors::MEDIUMAQUAMARINE,
+ };
+ if debug_color.a != 0.0 {
+ let debug_rect = clipped_world_rect * frame_context.global_device_pixel_scale;
+ frame_state.scratch.push_debug_rect(debug_rect, debug_color, debug_color.scale_alpha(0.5));
+ }
+ } else if frame_context.debug_flags.contains(::api::DebugFlags::OBSCURE_IMAGES) {
+ let is_image = matches!(
+ prim_instance.kind,
+ PrimitiveInstanceKind::Image { .. } | PrimitiveInstanceKind::YuvImage { .. }
+ );
+ if is_image {
+ // We allow "small" images, since they're generally UI elements.
+ let rect = clipped_world_rect * frame_context.global_device_pixel_scale;
+ if rect.size.width > 70.0 && rect.size.height > 70.0 {
+ frame_state.scratch.push_debug_rect(rect, debug_colors::PURPLE, debug_colors::PURPLE);
+ }
+ }
+ }
+
+ let vis_index = PrimitiveVisibilityIndex(frame_state.scratch.prim_info.len() as u32);
+ if prim_instance.is_chased() {
+ println!("\tvisible {:?} with {:?}", vis_index, combined_local_clip_rect);
+ }
+
+ frame_state.scratch.prim_info.push(
+ PrimitiveVisibility {
+ clipped_world_rect,
+ clip_chain,
+ clip_task_index: ClipTaskIndex::INVALID,
+ combined_local_clip_rect,
+ visibility_mask: PrimitiveVisibilityMask::empty(),
+ flags: vis_flags,
+ }
+ );
+
+ prim_instance.visibility_info = vis_index;
+
+ self.request_resources_for_prim(
+ prim_instance,
+ cluster.spatial_node_index,
+ clipped_world_rect,
+ frame_context,
+ frame_state,
+ );
+ }
+ }
+ }
+
+ // Similar to above, pop either the clip chain or root entry off the current clip stack.
+ if is_composite {
+ frame_state.pop_surface();
+ }
+
+ let pic = &mut self.pictures[pic_index.0];
+ pic.prim_list = prim_list;
+
+ // If the local rect changed (due to transforms in child primitives) then
+ // invalidate the GPU cache location to re-upload the new local rect
+ // and stretch size. Drop shadow filters also depend on the local rect
+ // size for the extra GPU cache data handle.
+ // TODO(gw): In future, if we support specifying a flag which gets the
+ // stretch size from the segment rect in the shaders, we can
+ // remove this invalidation here completely.
+ if let Some(ref rc) = pic.raster_config {
+ // Inflate the local bounding rect if required by the filter effect.
+ // This inflaction factor is to be applied to the surface itself.
+ if pic.options.inflate_if_required {
+ // The picture's local rect is calculated as the union of the
+ // snapped primitive rects, which should result in a snapped
+ // local rect, unless it was inflated. This is also done during
+ // surface configuration when calculating the picture's
+ // estimated local rect.
+ let snap_pic_to_raster = SpaceSnapper::new_with_target(
+ surface.raster_spatial_node_index,
+ pic.spatial_node_index,
+ surface.device_pixel_scale,
+ frame_context.spatial_tree,
+ );
+
+ surface_rect = rc.composite_mode.inflate_picture_rect(surface_rect, surface.scale_factors);
+ surface_rect = snap_pic_to_raster.snap_rect(&surface_rect);
+ }
+
+ // Layout space for the picture is picture space from the
+ // perspective of its child primitives.
+ let pic_local_rect = surface_rect * Scale::new(1.0);
+ if pic.precise_local_rect != pic_local_rect {
+ match rc.composite_mode {
+ PictureCompositeMode::Filter(Filter::DropShadows(..)) => {
+ for handle in &pic.extra_gpu_data_handles {
+ frame_state.gpu_cache.invalidate(handle);
+ }
+ }
+ _ => {}
+ }
+ // Invalidate any segments built for this picture, since the local
+ // rect has changed.
+ pic.segments_are_valid = false;
+ pic.precise_local_rect = pic_local_rect;
+ }
+
+ if let PictureCompositeMode::TileCache { .. } = rc.composite_mode {
+ let mut tile_cache = frame_state.tile_cache.take().unwrap();
+
+ // Build the dirty region(s) for this tile cache.
+ tile_cache.post_update(
+ frame_context,
+ frame_state,
+ );
+
+ pic.tile_cache = Some(tile_cache);
+ }
+
+ None
+ } else {
+ let parent_surface = &frame_context.surfaces[parent_surface_index.0 as usize];
+ let map_surface_to_parent_surface = SpaceMapper::new_with_target(
+ parent_surface.surface_spatial_node_index,
+ surface.surface_spatial_node_index,
+ PictureRect::max_rect(),
+ frame_context.spatial_tree,
+ );
+ map_surface_to_parent_surface.map(&surface_rect)
+ }
+ }
+
+ fn request_resources_for_prim(
+ &mut self,
+ prim_instance: &mut PrimitiveInstance,
+ prim_spatial_node_index: SpatialNodeIndex,
+ prim_world_rect: WorldRect,
+ frame_context: &FrameVisibilityContext,
+ frame_state: &mut FrameVisibilityState,
+ ) {
+ profile_scope!("request_resources_for_prim");
+ match prim_instance.kind {
+ PrimitiveInstanceKind::TextRun { .. } => {
+ // Text runs can't request resources early here, as we don't
+ // know until TileCache::post_update() whether we are drawing
+ // on an opaque surface.
+ // TODO(gw): We might be able to detect simple cases of this earlier,
+ // during the picture traversal. But it's probably not worth it?
+ }
+ PrimitiveInstanceKind::Image { data_handle, image_instance_index, .. } => {
+ let prim_data = &mut frame_state.data_stores.image[data_handle];
+ let common_data = &mut prim_data.common;
+ let image_data = &mut prim_data.kind;
+ let image_instance = &mut self.images[image_instance_index];
+
+ let image_properties = frame_state
+ .resource_cache
+ .get_image_properties(image_data.key);
+
+ let request = ImageRequest {
+ key: image_data.key,
+ rendering: image_data.image_rendering,
+ tile: None,
+ };
+
+ match image_properties {
+ Some(ImageProperties { tiling: None, .. }) => {
+
+ frame_state.resource_cache.request_image(
+ request,
+ frame_state.gpu_cache,
+ );
+ }
+ Some(ImageProperties { tiling: Some(tile_size), visible_rect, .. }) => {
+ image_instance.visible_tiles.clear();
+ // TODO: rename the blob's visible_rect into something that doesn't conflict
+ // with the terminology we use during culling since it's not really the same
+ // thing.
+ let active_rect = visible_rect;
+
+ // Tighten the clip rect because decomposing the repeated image can
+ // produce primitives that are partially covering the original image
+ // rect and we want to clip these extra parts out.
+ let prim_info = &frame_state.scratch.prim_info[prim_instance.visibility_info.0 as usize];
+ let tight_clip_rect = prim_info
+ .combined_local_clip_rect
+ .intersection(&common_data.prim_rect).unwrap();
+ image_instance.tight_local_clip_rect = tight_clip_rect;
+
+ let map_local_to_world = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ prim_spatial_node_index,
+ frame_context.global_screen_world_rect,
+ frame_context.spatial_tree,
+ );
+
+ let visible_rect = compute_conservative_visible_rect(
+ &tight_clip_rect,
+ prim_world_rect,
+ &map_local_to_world,
+ );
+
+ let base_edge_flags = edge_flags_for_tile_spacing(&image_data.tile_spacing);
+
+ let stride = image_data.stretch_size + image_data.tile_spacing;
+
+ // We are performing the decomposition on the CPU here, no need to
+ // have it in the shader.
+ common_data.may_need_repetition = false;
+
+ let repetitions = image_tiling::repetitions(
+ &common_data.prim_rect,
+ &visible_rect,
+ stride,
+ );
+
+ for Repetition { origin, edge_flags } in repetitions {
+ let edge_flags = base_edge_flags | edge_flags;
+
+ let layout_image_rect = LayoutRect {
+ origin,
+ size: image_data.stretch_size,
+ };
+
+ let tiles = image_tiling::tiles(
+ &layout_image_rect,
+ &visible_rect,
+ &active_rect,
+ tile_size as i32,
+ );
+
+ for tile in tiles {
+ frame_state.resource_cache.request_image(
+ request.with_tile(tile.offset),
+ frame_state.gpu_cache,
+ );
+
+ image_instance.visible_tiles.push(VisibleImageTile {
+ tile_offset: tile.offset,
+ edge_flags: tile.edge_flags & edge_flags,
+ local_rect: tile.rect,
+ local_clip_rect: tight_clip_rect,
+ });
+ }
+ }
+
+ if image_instance.visible_tiles.is_empty() {
+ // Mark as invisible
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ }
+ }
+ None => {}
+ }
+ }
+ PrimitiveInstanceKind::ImageBorder { data_handle, .. } => {
+ let prim_data = &mut frame_state.data_stores.image_border[data_handle];
+ prim_data.kind.request_resources(
+ frame_state.resource_cache,
+ frame_state.gpu_cache,
+ );
+ }
+ PrimitiveInstanceKind::YuvImage { data_handle, .. } => {
+ let prim_data = &mut frame_state.data_stores.yuv_image[data_handle];
+ prim_data.kind.request_resources(
+ frame_state.resource_cache,
+ frame_state.gpu_cache,
+ );
+ }
+ _ => {}
+ }
+ }
+
+ pub fn get_opacity_binding(
+ &self,
+ opacity_binding_index: OpacityBindingIndex,
+ ) -> f32 {
+ if opacity_binding_index == OpacityBindingIndex::INVALID {
+ 1.0
+ } else {
+ self.opacity_bindings[opacity_binding_index].current
+ }
+ }
+
+ // Internal method that retrieves the primitive index of a primitive
+ // that can be the target for collapsing parent opacity filters into.
+ fn get_opacity_collapse_prim(
+ &self,
+ pic_index: PictureIndex,
+ ) -> Option<PictureIndex> {
+ let pic = &self.pictures[pic_index.0];
+
+ // We can only collapse opacity if there is a single primitive, otherwise
+ // the opacity needs to be applied to the primitives as a group.
+ if pic.prim_list.clusters.len() != 1 {
+ return None;
+ }
+
+ let cluster = &pic.prim_list.clusters[0];
+ if cluster.prim_instances.len() != 1 {
+ return None;
+ }
+
+ let prim_instance = &cluster.prim_instances[0];
+
+ // For now, we only support opacity collapse on solid rects and images.
+ // This covers the most common types of opacity filters that can be
+ // handled by this optimization. In the future, we can easily extend
+ // this to other primitives, such as text runs and gradients.
+ match prim_instance.kind {
+ // If we find a single rect or image, we can use that
+ // as the primitive to collapse the opacity into.
+ PrimitiveInstanceKind::Rectangle { .. } |
+ PrimitiveInstanceKind::Image { .. } => {
+ return Some(pic_index);
+ }
+ PrimitiveInstanceKind::Clear { .. } |
+ PrimitiveInstanceKind::TextRun { .. } |
+ PrimitiveInstanceKind::NormalBorder { .. } |
+ PrimitiveInstanceKind::ImageBorder { .. } |
+ PrimitiveInstanceKind::YuvImage { .. } |
+ PrimitiveInstanceKind::LinearGradient { .. } |
+ PrimitiveInstanceKind::RadialGradient { .. } |
+ PrimitiveInstanceKind::ConicGradient { .. } |
+ PrimitiveInstanceKind::LineDecoration { .. } |
+ PrimitiveInstanceKind::Backdrop { .. } => {
+ // These prims don't support opacity collapse
+ }
+ PrimitiveInstanceKind::Picture { pic_index, .. } => {
+ let pic = &self.pictures[pic_index.0];
+
+ // If we encounter a picture that is a pass-through
+ // (i.e. no composite mode), then we can recurse into
+ // that to try and find a primitive to collapse to.
+ if pic.requested_composite_mode.is_none() {
+ return self.get_opacity_collapse_prim(pic_index);
+ }
+ }
+ }
+
+ None
+ }
+
+ // Apply any optimizations to drawing this picture. Currently,
+ // we just support collapsing pictures with an opacity filter
+ // by pushing that opacity value into the color of a primitive
+ // if that picture contains one compatible primitive.
+ pub fn optimize_picture_if_possible(
+ &mut self,
+ pic_index: PictureIndex,
+ ) {
+ // Only handle opacity filters for now.
+ let binding = match self.pictures[pic_index.0].requested_composite_mode {
+ Some(PictureCompositeMode::Filter(Filter::Opacity(binding, _))) => {
+ binding
+ }
+ _ => {
+ return;
+ }
+ };
+
+ // See if this picture contains a single primitive that supports
+ // opacity collapse.
+ match self.get_opacity_collapse_prim(pic_index) {
+ Some(pic_index) => {
+ let pic = &mut self.pictures[pic_index.0];
+ let prim_instance = &mut pic.prim_list.clusters[0].prim_instances[0];
+ match prim_instance.kind {
+ PrimitiveInstanceKind::Image { image_instance_index, .. } => {
+ let image_instance = &mut self.images[image_instance_index];
+ // By this point, we know we should only have found a primitive
+ // that supports opacity collapse.
+ if image_instance.opacity_binding_index == OpacityBindingIndex::INVALID {
+ image_instance.opacity_binding_index = self.opacity_bindings.push(OpacityBinding::new());
+ }
+ let opacity_binding = &mut self.opacity_bindings[image_instance.opacity_binding_index];
+ opacity_binding.push(binding);
+ }
+ PrimitiveInstanceKind::Rectangle { ref mut opacity_binding_index, .. } => {
+ // By this point, we know we should only have found a primitive
+ // that supports opacity collapse.
+ if *opacity_binding_index == OpacityBindingIndex::INVALID {
+ *opacity_binding_index = self.opacity_bindings.push(OpacityBinding::new());
+ }
+ let opacity_binding = &mut self.opacity_bindings[*opacity_binding_index];
+ opacity_binding.push(binding);
+ }
+ _ => {
+ unreachable!();
+ }
+ }
+ }
+ None => {
+ return;
+ }
+ }
+
+ // The opacity filter has been collapsed, so mark this picture
+ // as a pass though. This means it will no longer allocate an
+ // intermediate surface or incur an extra blend / blit. Instead,
+ // the collapsed primitive will be drawn directly into the
+ // parent picture.
+ self.pictures[pic_index.0].requested_composite_mode = None;
+ }
+
+ fn prepare_prim_for_render(
+ &mut self,
+ prim_instance: &mut PrimitiveInstance,
+ prim_spatial_node_index: SpatialNodeIndex,
+ pic_context: &PictureContext,
+ pic_state: &mut PictureState,
+ frame_context: &FrameBuildingContext,
+ frame_state: &mut FrameBuildingState,
+ plane_split_anchor: PlaneSplitAnchor,
+ data_stores: &mut DataStores,
+ scratch: &mut PrimitiveScratchBuffer,
+ tile_cache_log: &mut TileCacheLogger,
+ ) -> bool {
+ profile_scope!("prepare_prim_for_render");
+ // If we have dependencies, we need to prepare them first, in order
+ // to know the actual rect of this primitive.
+ // For example, scrolling may affect the location of an item in
+ // local space, which may force us to render this item on a larger
+ // picture target, if being composited.
+ let pic_info = {
+ match prim_instance.kind {
+ PrimitiveInstanceKind::Picture { pic_index ,.. } => {
+ let pic = &mut self.pictures[pic_index.0];
+
+ let clipped_prim_bounding_rect = scratch
+ .prim_info[prim_instance.visibility_info.0 as usize]
+ .clipped_world_rect;
+
+ match pic.take_context(
+ pic_index,
+ clipped_prim_bounding_rect,
+ pic_context.surface_spatial_node_index,
+ pic_context.raster_spatial_node_index,
+ pic_context.surface_index,
+ &pic_context.subpixel_mode,
+ frame_state,
+ frame_context,
+ scratch,
+ tile_cache_log,
+ ) {
+ Some(info) => Some(info),
+ None => {
+ if prim_instance.is_chased() {
+ println!("\tculled for carrying an invisible composite filter");
+ }
+
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+
+ return false;
+ }
+ }
+ }
+ PrimitiveInstanceKind::TextRun { .. } |
+ PrimitiveInstanceKind::Rectangle { .. } |
+ PrimitiveInstanceKind::LineDecoration { .. } |
+ PrimitiveInstanceKind::NormalBorder { .. } |
+ PrimitiveInstanceKind::ImageBorder { .. } |
+ PrimitiveInstanceKind::YuvImage { .. } |
+ PrimitiveInstanceKind::Image { .. } |
+ PrimitiveInstanceKind::LinearGradient { .. } |
+ PrimitiveInstanceKind::RadialGradient { .. } |
+ PrimitiveInstanceKind::ConicGradient { .. } |
+ PrimitiveInstanceKind::Clear { .. } |
+ PrimitiveInstanceKind::Backdrop { .. } => {
+ None
+ }
+ }
+ };
+
+ let is_passthrough = match pic_info {
+ Some((pic_context_for_children, mut pic_state_for_children, mut prim_list)) => {
+ let is_passthrough = pic_context_for_children.is_passthrough;
+
+ self.prepare_primitives(
+ &mut prim_list,
+ &pic_context_for_children,
+ &mut pic_state_for_children,
+ frame_context,
+ frame_state,
+ data_stores,
+ scratch,
+ tile_cache_log,
+ );
+
+ // Restore the dependencies (borrow check dance)
+ self.pictures[pic_context_for_children.pic_index.0]
+ .restore_context(
+ pic_context.surface_index,
+ prim_list,
+ pic_context_for_children,
+ pic_state_for_children,
+ frame_state,
+ );
+
+ is_passthrough
+ }
+ None => {
+ false
+ }
+ };
+
+ let prim_rect = data_stores.get_local_prim_rect(
+ prim_instance,
+ self,
+ );
+
+ if !is_passthrough {
+ prim_instance.update_clip_task(
+ &prim_rect.origin,
+ prim_spatial_node_index,
+ pic_context.raster_spatial_node_index,
+ pic_context,
+ pic_state,
+ frame_context,
+ frame_state,
+ self,
+ data_stores,
+ scratch,
+ );
+
+ if prim_instance.is_chased() {
+ println!("\tconsidered visible and ready with local pos {:?}", prim_rect.origin);
+ }
+ }
+
+ #[cfg(debug_assertions)]
+ {
+ prim_instance.prepared_frame_id = frame_state.render_tasks.frame_id();
+ }
+
+ self.prepare_interned_prim_for_render(
+ prim_instance,
+ prim_spatial_node_index,
+ plane_split_anchor,
+ pic_context,
+ pic_state,
+ frame_context,
+ frame_state,
+ data_stores,
+ scratch,
+ );
+
+ true
+ }
+
+ pub fn prepare_primitives(
+ &mut self,
+ prim_list: &mut PrimitiveList,
+ pic_context: &PictureContext,
+ pic_state: &mut PictureState,
+ frame_context: &FrameBuildingContext,
+ frame_state: &mut FrameBuildingState,
+ data_stores: &mut DataStores,
+ scratch: &mut PrimitiveScratchBuffer,
+ tile_cache_log: &mut TileCacheLogger,
+ ) {
+ profile_scope!("prepare_primitives");
+ for (cluster_index, cluster) in prim_list.clusters.iter_mut().enumerate() {
+ profile_scope!("cluster");
+ pic_state.map_local_to_pic.set_target_spatial_node(
+ cluster.spatial_node_index,
+ frame_context.spatial_tree,
+ );
+
+ for (prim_instance_index, prim_instance) in cluster.prim_instances.iter_mut().enumerate() {
+ if prim_instance.visibility_info == PrimitiveVisibilityIndex::INVALID {
+ continue;
+ }
+
+ // The original clipped world rect was calculated during the initial visibility pass.
+ // However, it's possible that the dirty rect has got smaller, if tiles were not
+ // dirty. Intersecting with the dirty rect here eliminates preparing any primitives
+ // outside the dirty rect, and reduces the size of any off-screen surface allocations
+ // for clip masks / render tasks that we make.
+ {
+ let visibility_info = &mut scratch.prim_info[prim_instance.visibility_info.0 as usize];
+ let dirty_region = frame_state.current_dirty_region();
+
+ for dirty_region in &dirty_region.dirty_rects {
+ if visibility_info.clipped_world_rect.intersects(&dirty_region.world_rect) {
+ visibility_info.visibility_mask.include(dirty_region.visibility_mask);
+ }
+ }
+
+ if visibility_info.visibility_mask.is_empty() {
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ continue;
+ }
+ }
+
+ let plane_split_anchor = PlaneSplitAnchor::new(cluster_index, prim_instance_index);
+
+ if self.prepare_prim_for_render(
+ prim_instance,
+ cluster.spatial_node_index,
+ pic_context,
+ pic_state,
+ frame_context,
+ frame_state,
+ plane_split_anchor,
+ data_stores,
+ scratch,
+ tile_cache_log,
+ ) {
+ frame_state.profile_counters.visible_primitives.inc();
+ }
+ }
+ }
+ }
+
+ /// Prepare an interned primitive for rendering, by requesting
+ /// resources, render tasks etc. This is equivalent to the
+ /// prepare_prim_for_render_inner call for old style primitives.
+ fn prepare_interned_prim_for_render(
+ &mut self,
+ prim_instance: &mut PrimitiveInstance,
+ prim_spatial_node_index: SpatialNodeIndex,
+ plane_split_anchor: PlaneSplitAnchor,
+ pic_context: &PictureContext,
+ pic_state: &mut PictureState,
+ frame_context: &FrameBuildingContext,
+ frame_state: &mut FrameBuildingState,
+ data_stores: &mut DataStores,
+ scratch: &mut PrimitiveScratchBuffer,
+ ) {
+ let is_chased = prim_instance.is_chased();
+ let device_pixel_scale = frame_state.surfaces[pic_context.surface_index.0].device_pixel_scale;
+
+ match &mut prim_instance.kind {
+ PrimitiveInstanceKind::LineDecoration { data_handle, ref mut cache_handle, .. } => {
+ profile_scope!("LineDecoration");
+ let prim_data = &mut data_stores.line_decoration[*data_handle];
+ let common_data = &mut prim_data.common;
+ let line_dec_data = &mut prim_data.kind;
+
+ // Update the template this instane references, which may refresh the GPU
+ // cache with any shared template data.
+ line_dec_data.update(common_data, frame_state);
+
+ // Work out the device pixel size to be used to cache this line decoration.
+ if is_chased {
+ println!("\tline decoration key={:?}", line_dec_data.cache_key);
+ }
+
+ // If we have a cache key, it's a wavy / dashed / dotted line. Otherwise, it's
+ // a simple solid line.
+ if let Some(cache_key) = line_dec_data.cache_key.as_ref() {
+ // TODO(gw): Do we ever need / want to support scales for text decorations
+ // based on the current transform?
+ let scale_factor = Scale::new(1.0) * device_pixel_scale;
+ let mut task_size = (LayoutSize::from_au(cache_key.size) * scale_factor).ceil().to_i32();
+ if task_size.width > MAX_LINE_DECORATION_RESOLUTION as i32 ||
+ task_size.height > MAX_LINE_DECORATION_RESOLUTION as i32 {
+ let max_extent = cmp::max(task_size.width, task_size.height);
+ let task_scale_factor = Scale::new(MAX_LINE_DECORATION_RESOLUTION as f32 / max_extent as f32);
+ task_size = (LayoutSize::from_au(cache_key.size) * scale_factor * task_scale_factor)
+ .ceil().to_i32();
+ }
+
+ // Request a pre-rendered image task.
+ // TODO(gw): This match is a bit untidy, but it should disappear completely
+ // once the prepare_prims and batching are unified. When that
+ // happens, we can use the cache handle immediately, and not need
+ // to temporarily store it in the primitive instance.
+ *cache_handle = Some(frame_state.resource_cache.request_render_task(
+ RenderTaskCacheKey {
+ size: task_size,
+ kind: RenderTaskCacheKeyKind::LineDecoration(cache_key.clone()),
+ },
+ frame_state.gpu_cache,
+ frame_state.render_tasks,
+ None,
+ false,
+ |render_tasks| {
+ render_tasks.add().init(RenderTask::new_line_decoration(
+ task_size,
+ cache_key.style,
+ cache_key.orientation,
+ cache_key.wavy_line_thickness.to_f32_px(),
+ LayoutSize::from_au(cache_key.size),
+ ))
+ }
+ ));
+ }
+ }
+ PrimitiveInstanceKind::TextRun { run_index, data_handle, .. } => {
+ profile_scope!("TextRun");
+ let prim_data = &mut data_stores.text_run[*data_handle];
+ let run = &mut self.text_runs[*run_index];
+
+ prim_data.common.may_need_repetition = false;
+
+ // The glyph transform has to match `glyph_transform` in "ps_text_run" shader.
+ // It's relative to the rasterizing space of a glyph.
+ let transform = frame_context.spatial_tree
+ .get_relative_transform(
+ prim_spatial_node_index,
+ pic_context.raster_spatial_node_index,
+ )
+ .into_fast_transform();
+ let prim_offset = prim_data.common.prim_rect.origin.to_vector() - run.reference_frame_relative_offset;
+
+ let pic = &self.pictures[pic_context.pic_index.0];
+ let raster_space = pic.get_raster_space(frame_context.spatial_tree);
+ let surface = &frame_state.surfaces[pic_context.surface_index.0];
+ let prim_info = &scratch.prim_info[prim_instance.visibility_info.0 as usize];
+ let root_scaling_factor = match pic.raster_config {
+ Some(ref raster_config) => raster_config.root_scaling_factor,
+ None => 1.0
+ };
+
+ run.request_resources(
+ prim_offset,
+ prim_info.clip_chain.pic_clip_rect,
+ &prim_data.font,
+ &prim_data.glyphs,
+ &transform.to_transform().with_destination::<_>(),
+ surface,
+ prim_spatial_node_index,
+ raster_space,
+ root_scaling_factor,
+ &pic_context.subpixel_mode,
+ frame_state.resource_cache,
+ frame_state.gpu_cache,
+ frame_state.render_tasks,
+ frame_context.spatial_tree,
+ scratch,
+ );
+
+ // Update the template this instane references, which may refresh the GPU
+ // cache with any shared template data.
+ prim_data.update(frame_state);
+ }
+ PrimitiveInstanceKind::Clear { data_handle, .. } => {
+ profile_scope!("Clear");
+ let prim_data = &mut data_stores.prim[*data_handle];
+
+ prim_data.common.may_need_repetition = false;
+
+ // Update the template this instane references, which may refresh the GPU
+ // cache with any shared template data.
+ prim_data.update(frame_state, frame_context.scene_properties);
+ }
+ PrimitiveInstanceKind::NormalBorder { data_handle, ref mut cache_handles, .. } => {
+ profile_scope!("NormalBorder");
+ let prim_data = &mut data_stores.normal_border[*data_handle];
+ let common_data = &mut prim_data.common;
+ let border_data = &mut prim_data.kind;
+
+ common_data.may_need_repetition =
+ matches!(border_data.border.top.style, BorderStyle::Dotted | BorderStyle::Dashed) ||
+ matches!(border_data.border.right.style, BorderStyle::Dotted | BorderStyle::Dashed) ||
+ matches!(border_data.border.bottom.style, BorderStyle::Dotted | BorderStyle::Dashed) ||
+ matches!(border_data.border.left.style, BorderStyle::Dotted | BorderStyle::Dashed);
+
+
+ // Update the template this instance references, which may refresh the GPU
+ // cache with any shared template data.
+ border_data.update(common_data, frame_state);
+
+ // TODO(gw): For now, the scale factors to rasterize borders at are
+ // based on the true world transform of the primitive. When
+ // raster roots with local scale are supported in future,
+ // that will need to be accounted for here.
+ let scale = frame_context
+ .spatial_tree
+ .get_world_transform(prim_spatial_node_index)
+ .scale_factors();
+
+ // Scale factors are normalized to a power of 2 to reduce the number of
+ // resolution changes.
+ // For frames with a changing scale transform round scale factors up to
+ // nearest power-of-2 boundary so that we don't keep having to redraw
+ // the content as it scales up and down. Rounding up to nearest
+ // power-of-2 boundary ensures we never scale up, only down --- avoiding
+ // jaggies. It also ensures we never scale down by more than a factor of
+ // 2, avoiding bad downscaling quality.
+ let scale_width = clamp_to_scale_factor(scale.0, false);
+ let scale_height = clamp_to_scale_factor(scale.1, false);
+ // Pick the maximum dimension as scale
+ let world_scale = LayoutToWorldScale::new(scale_width.max(scale_height));
+ let mut scale = world_scale * device_pixel_scale;
+ let max_scale = get_max_scale_for_border(border_data);
+ scale.0 = scale.0.min(max_scale.0);
+
+ // For each edge and corner, request the render task by content key
+ // from the render task cache. This ensures that the render task for
+ // this segment will be available for batching later in the frame.
+ let mut handles: SmallVec<[RenderTaskCacheEntryHandle; 8]> = SmallVec::new();
+
+ for segment in &border_data.border_segments {
+ // Update the cache key device size based on requested scale.
+ let cache_size = to_cache_size(segment.local_task_size * scale);
+ let cache_key = RenderTaskCacheKey {
+ kind: RenderTaskCacheKeyKind::BorderSegment(segment.cache_key.clone()),
+ size: cache_size,
+ };
+
+ handles.push(frame_state.resource_cache.request_render_task(
+ cache_key,
+ frame_state.gpu_cache,
+ frame_state.render_tasks,
+ None,
+ false, // TODO(gw): We don't calculate opacity for borders yet!
+ |render_tasks| {
+ render_tasks.add().init(RenderTask::new_border_segment(
+ cache_size,
+ build_border_instances(
+ &segment.cache_key,
+ cache_size,
+ &border_data.border,
+ scale,
+ ),
+ ))
+ }
+ ));
+ }
+
+ *cache_handles = scratch
+ .border_cache_handles
+ .extend(handles);
+ }
+ PrimitiveInstanceKind::ImageBorder { data_handle, .. } => {
+ profile_scope!("ImageBorder");
+ let prim_data = &mut data_stores.image_border[*data_handle];
+
+ // TODO: get access to the ninepatch and to check whwther we need support
+ // for repetitions in the shader.
+
+ // Update the template this instane references, which may refresh the GPU
+ // cache with any shared template data.
+ prim_data.kind.update(&mut prim_data.common, frame_state);
+ }
+ PrimitiveInstanceKind::Rectangle { data_handle, segment_instance_index, opacity_binding_index, color_binding_index, .. } => {
+ profile_scope!("Rectangle");
+ let prim_data = &mut data_stores.prim[*data_handle];
+ prim_data.common.may_need_repetition = false;
+
+ if *color_binding_index != ColorBindingIndex::INVALID {
+ match self.color_bindings[*color_binding_index] {
+ PropertyBinding::Binding(..) => {
+ // We explicitly invalidate the gpu cache
+ // if the color is animating.
+ let gpu_cache_handle =
+ if *segment_instance_index == SegmentInstanceIndex::INVALID {
+ None
+ } else if *segment_instance_index == SegmentInstanceIndex::UNUSED {
+ Some(&prim_data.common.gpu_cache_handle)
+ } else {
+ Some(&scratch.segment_instances[*segment_instance_index].gpu_cache_handle)
+ };
+ if let Some(gpu_cache_handle) = gpu_cache_handle {
+ frame_state.gpu_cache.invalidate(gpu_cache_handle);
+ }
+ }
+ PropertyBinding::Value(..) => {},
+ }
+ }
+
+ // Update the template this instane references, which may refresh the GPU
+ // cache with any shared template data.
+ prim_data.update(
+ frame_state,
+ frame_context.scene_properties,
+ );
+
+ update_opacity_binding(
+ &mut self.opacity_bindings,
+ *opacity_binding_index,
+ frame_context.scene_properties,
+ );
+
+ write_segment(
+ *segment_instance_index,
+ frame_state,
+ &mut scratch.segments,
+ &mut scratch.segment_instances,
+ |request| {
+ prim_data.kind.write_prim_gpu_blocks(
+ request,
+ frame_context.scene_properties,
+ );
+ }
+ );
+ }
+ PrimitiveInstanceKind::YuvImage { data_handle, segment_instance_index, .. } => {
+ profile_scope!("YuvImage");
+ let prim_data = &mut data_stores.yuv_image[*data_handle];
+ let common_data = &mut prim_data.common;
+ let yuv_image_data = &mut prim_data.kind;
+
+ common_data.may_need_repetition = false;
+
+ // Update the template this instane references, which may refresh the GPU
+ // cache with any shared template data.
+ yuv_image_data.update(common_data, frame_state);
+
+ write_segment(
+ *segment_instance_index,
+ frame_state,
+ &mut scratch.segments,
+ &mut scratch.segment_instances,
+ |request| {
+ yuv_image_data.write_prim_gpu_blocks(request);
+ }
+ );
+ }
+ PrimitiveInstanceKind::Image { data_handle, image_instance_index, .. } => {
+ profile_scope!("Image");
+ let prim_data = &mut data_stores.image[*data_handle];
+ let common_data = &mut prim_data.common;
+ let image_data = &mut prim_data.kind;
+
+ if image_data.stretch_size.width >= common_data.prim_rect.size.width &&
+ image_data.stretch_size.height >= common_data.prim_rect.size.height {
+
+ common_data.may_need_repetition = false;
+ }
+
+ // Update the template this instane references, which may refresh the GPU
+ // cache with any shared template data.
+ image_data.update(common_data, frame_state);
+
+ let image_instance = &mut self.images[*image_instance_index];
+
+ update_opacity_binding(
+ &mut self.opacity_bindings,
+ image_instance.opacity_binding_index,
+ frame_context.scene_properties,
+ );
+
+ write_segment(
+ image_instance.segment_instance_index,
+ frame_state,
+ &mut scratch.segments,
+ &mut scratch.segment_instances,
+ |request| {
+ image_data.write_prim_gpu_blocks(request);
+ },
+ );
+ }
+ PrimitiveInstanceKind::LinearGradient { data_handle, gradient_index, .. } => {
+ profile_scope!("LinearGradient");
+ let prim_data = &mut data_stores.linear_grad[*data_handle];
+ let gradient = &mut self.linear_gradients[*gradient_index];
+
+ // Update the template this instane references, which may refresh the GPU
+ // cache with any shared template data.
+ prim_data.update(frame_state);
+
+ if prim_data.stretch_size.width >= prim_data.common.prim_rect.size.width &&
+ prim_data.stretch_size.height >= prim_data.common.prim_rect.size.height {
+
+ prim_data.common.may_need_repetition = false;
+ }
+
+ if prim_data.supports_caching {
+ let gradient_size = (prim_data.end_point - prim_data.start_point).to_size();
+
+ // Calculate what the range of the gradient is that covers this
+ // primitive. These values are included in the cache key. The
+ // size of the gradient task is the length of a texture cache
+ // region, for maximum accuracy, and a minimal size on the
+ // axis that doesn't matter.
+ let (size, orientation, prim_start_offset, prim_end_offset) =
+ if prim_data.start_point.x.approx_eq(&prim_data.end_point.x) {
+ let prim_start_offset = -prim_data.start_point.y / gradient_size.height;
+ let prim_end_offset = (prim_data.common.prim_rect.size.height - prim_data.start_point.y)
+ / gradient_size.height;
+ let size = DeviceIntSize::new(16, TEXTURE_REGION_DIMENSIONS);
+ (size, LineOrientation::Vertical, prim_start_offset, prim_end_offset)
+ } else {
+ let prim_start_offset = -prim_data.start_point.x / gradient_size.width;
+ let prim_end_offset = (prim_data.common.prim_rect.size.width - prim_data.start_point.x)
+ / gradient_size.width;
+ let size = DeviceIntSize::new(TEXTURE_REGION_DIMENSIONS, 16);
+ (size, LineOrientation::Horizontal, prim_start_offset, prim_end_offset)
+ };
+
+ // Build the cache key, including information about the stops.
+ let mut stops = vec![GradientStopKey::empty(); prim_data.stops.len()];
+
+ // Reverse the stops as required, same as the gradient builder does
+ // for the slow path.
+ if prim_data.reverse_stops {
+ for (src, dest) in prim_data.stops.iter().rev().zip(stops.iter_mut()) {
+ let stop = GradientStop {
+ offset: 1.0 - src.offset,
+ color: src.color,
+ };
+ *dest = stop.into();
+ }
+ } else {
+ for (src, dest) in prim_data.stops.iter().zip(stops.iter_mut()) {
+ *dest = (*src).into();
+ }
+ }
+
+ gradient.cache_segments.clear();
+
+ // emit render task caches and image rectangles to draw a gradient
+ // with offsets from start_offset to end_offset.
+ //
+ // the primitive is covered by a gradient that ranges from
+ // prim_start_offset to prim_end_offset.
+ //
+ // when clamping, these two pairs of offsets will always be the same.
+ // when repeating, however, we march across the primitive, blitting
+ // copies of the gradient along the way. each copy has a range from
+ // 0.0 to 1.0 (assuming it's fully visible), but where it appears on
+ // the primitive changes as we go. this position is also expressed
+ // as an offset: gradient_offset_base. that is, in terms of stops,
+ // we draw a gradient from start_offset to end_offset. its actual
+ // location on the primitive is at start_offset + gradient_offset_base.
+ //
+ // either way, we need a while-loop to draw the gradient as well
+ // because it might have more than 4 stops (the maximum of a cached
+ // segment) and/or hard stops. so we have a walk-within-the-walk from
+ // start_offset to end_offset caching up to GRADIENT_FP_STOPS stops at a
+ // time.
+ fn emit_segments(start_offset: f32, // start and end offset together are
+ end_offset: f32, // always a subrange of 0..1
+ gradient_offset_base: f32,
+ prim_start_offset: f32, // the offsets of the entire gradient as it
+ prim_end_offset: f32, // covers the entire primitive.
+ prim_origin_in: LayoutPoint,
+ prim_size_in: LayoutSize,
+ task_size: DeviceIntSize,
+ is_opaque: bool,
+ stops: &[GradientStopKey],
+ orientation: LineOrientation,
+ frame_state: &mut FrameBuildingState,
+ gradient: &mut LinearGradientPrimitive)
+ {
+ // these prints are used to generate documentation examples, so
+ // leaving them in but commented out:
+ //println!("emit_segments call:");
+ //println!("\tstart_offset: {}, end_offset: {}", start_offset, end_offset);
+ //println!("\tprim_start_offset: {}, prim_end_offset: {}", prim_start_offset, prim_end_offset);
+ //println!("\tgradient_offset_base: {}", gradient_offset_base);
+ let mut first_stop = 0;
+ // look for an inclusive range of stops [first_stop, last_stop].
+ // once first_stop points at (or past) the last stop, we're done.
+ while first_stop < stops.len()-1 {
+
+ // if the entire sub-gradient starts at an offset that's past the
+ // segment's end offset, we're done.
+ if stops[first_stop].offset > end_offset {
+ return;
+ }
+
+ // accumulate stops until we have GRADIENT_FP_STOPS of them, or we hit
+ // a hard stop:
+ let mut last_stop = first_stop;
+ let mut hard_stop = false; // did we stop on a hard stop?
+ while last_stop < stops.len()-1 &&
+ last_stop - first_stop + 1 < GRADIENT_FP_STOPS
+ {
+ if stops[last_stop+1].offset == stops[last_stop].offset {
+ hard_stop = true;
+ break;
+ }
+
+ last_stop = last_stop + 1;
+ }
+
+ let num_stops = last_stop - first_stop + 1;
+
+ // repeated hard stops at the same offset, skip
+ if num_stops == 0 {
+ first_stop = last_stop + 1;
+ continue;
+ }
+
+ // if the last_stop offset is before start_offset, the segment's not visible:
+ if stops[last_stop].offset < start_offset {
+ first_stop = if hard_stop { last_stop+1 } else { last_stop };
+ continue;
+ }
+
+ let segment_start_point = start_offset.max(stops[first_stop].offset);
+ let segment_end_point = end_offset .min(stops[last_stop ].offset);
+
+ let mut segment_stops = [GradientStopKey::empty(); GRADIENT_FP_STOPS];
+ for i in 0..num_stops {
+ segment_stops[i] = stops[first_stop + i];
+ }
+
+ let cache_key = GradientCacheKey {
+ orientation,
+ start_stop_point: VectorKey {
+ x: segment_start_point,
+ y: segment_end_point,
+ },
+ stops: segment_stops,
+ };
+
+ let mut prim_origin = prim_origin_in;
+ let mut prim_size = prim_size_in;
+
+ // the primitive is covered by a segment from overall_start to
+ // overall_end; scale and shift based on the length of the actual
+ // segment that we're drawing:
+ let inv_length = 1.0 / ( prim_end_offset - prim_start_offset );
+ if orientation == LineOrientation::Horizontal {
+ prim_origin.x += ( segment_start_point + gradient_offset_base - prim_start_offset )
+ * inv_length * prim_size.width;
+ prim_size.width *= ( segment_end_point - segment_start_point )
+ * inv_length; // 2 gradient_offset_bases cancel out
+ } else {
+ prim_origin.y += ( segment_start_point + gradient_offset_base - prim_start_offset )
+ * inv_length * prim_size.height;
+ prim_size.height *= ( segment_end_point - segment_start_point )
+ * inv_length; // 2 gradient_offset_bases cancel out
+ }
+
+ // <= 0 can happen if a hardstop lands exactly on an edge
+ if prim_size.area() > 0.0 {
+ let local_rect = LayoutRect::new( prim_origin, prim_size );
+
+ // documentation example traces:
+ //println!("\t\tcaching from offset {} to {}", segment_start_point, segment_end_point);
+ //println!("\t\tand blitting to {:?}", local_rect);
+
+ // Request the render task each frame.
+ gradient.cache_segments.push(
+ CachedGradientSegment {
+ handle: frame_state.resource_cache.request_render_task(
+ RenderTaskCacheKey {
+ size: task_size,
+ kind: RenderTaskCacheKeyKind::Gradient(cache_key),
+ },
+ frame_state.gpu_cache,
+ frame_state.render_tasks,
+ None,
+ is_opaque,
+ |render_tasks| {
+ render_tasks.add().init(RenderTask::new_gradient(
+ task_size,
+ segment_stops,
+ orientation,
+ segment_start_point,
+ segment_end_point,
+ ))
+ }),
+ local_rect: local_rect,
+ }
+ );
+ }
+
+ // if ending on a hardstop, skip past it for the start of the next run:
+ first_stop = if hard_stop { last_stop + 1 } else { last_stop };
+ }
+ }
+
+ if prim_data.extend_mode == ExtendMode::Clamp ||
+ ( prim_start_offset >= 0.0 && prim_end_offset <= 1.0 ) // repeat doesn't matter
+ {
+ // To support clamping, we need to make sure that quads are emitted for the
+ // segments before and after the 0.0...1.0 range of offsets. emit_segments
+ // can handle that by duplicating the first and last point if necessary:
+ if prim_start_offset < 0.0 {
+ stops.insert(0, GradientStopKey {
+ offset: prim_start_offset,
+ color : stops[0].color
+ });
+ }
+
+ if prim_end_offset > 1.0 {
+ stops.push( GradientStopKey {
+ offset: prim_end_offset,
+ color : stops[stops.len()-1].color
+ });
+ }
+
+ emit_segments(prim_start_offset, prim_end_offset,
+ 0.0,
+ prim_start_offset, prim_end_offset,
+ prim_data.common.prim_rect.origin,
+ prim_data.common.prim_rect.size,
+ size,
+ prim_data.stops_opacity.is_opaque,
+ &stops,
+ orientation,
+ frame_state,
+ gradient);
+ }
+ else
+ {
+ let mut segment_start_point = prim_start_offset;
+ while segment_start_point < prim_end_offset {
+
+ // gradient stops are expressed in the range 0.0 ... 1.0, so to blit
+ // a copy of the gradient, snap to the integer just before the offset
+ // we want ...
+ let gradient_offset_base = segment_start_point.floor();
+ // .. and then draw from a start offset in range 0 to 1 ...
+ let repeat_start = segment_start_point - gradient_offset_base;
+ // .. up to the next integer, but clamped to the primitive's real
+ // end offset:
+ let repeat_end = (gradient_offset_base + 1.0).min(prim_end_offset) - gradient_offset_base;
+
+ emit_segments(repeat_start, repeat_end,
+ gradient_offset_base,
+ prim_start_offset, prim_end_offset,
+ prim_data.common.prim_rect.origin,
+ prim_data.common.prim_rect.size,
+ size,
+ prim_data.stops_opacity.is_opaque,
+ &stops,
+ orientation,
+ frame_state,
+ gradient);
+
+ segment_start_point = repeat_end + gradient_offset_base;
+ }
+ }
+ }
+
+ if prim_data.tile_spacing != LayoutSize::zero() {
+ // We are performing the decomposition on the CPU here, no need to
+ // have it in the shader.
+ prim_data.common.may_need_repetition = false;
+
+ let prim_info = &scratch.prim_info[prim_instance.visibility_info.0 as usize];
+
+ let map_local_to_world = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ prim_spatial_node_index,
+ frame_context.global_screen_world_rect,
+ frame_context.spatial_tree,
+ );
+
+ gradient.visible_tiles_range = decompose_repeated_primitive(
+ &prim_info.combined_local_clip_rect,
+ &prim_data.common.prim_rect,
+ prim_info.clipped_world_rect,
+ &prim_data.stretch_size,
+ &prim_data.tile_spacing,
+ frame_state,
+ &mut scratch.gradient_tiles,
+ &map_local_to_world,
+ &mut |_, mut request| {
+ request.push([
+ prim_data.start_point.x,
+ prim_data.start_point.y,
+ prim_data.end_point.x,
+ prim_data.end_point.y,
+ ]);
+ request.push([
+ pack_as_float(prim_data.extend_mode as u32),
+ prim_data.stretch_size.width,
+ prim_data.stretch_size.height,
+ 0.0,
+ ]);
+ }
+ );
+
+ if gradient.visible_tiles_range.is_empty() {
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ }
+ }
+
+ // TODO(gw): Consider whether it's worth doing segment building
+ // for gradient primitives.
+ }
+ PrimitiveInstanceKind::RadialGradient { data_handle, ref mut visible_tiles_range, .. } => {
+ profile_scope!("RadialGradient");
+ let prim_data = &mut data_stores.radial_grad[*data_handle];
+
+ if prim_data.stretch_size.width >= prim_data.common.prim_rect.size.width &&
+ prim_data.stretch_size.height >= prim_data.common.prim_rect.size.height {
+
+ // We are performing the decomposition on the CPU here, no need to
+ // have it in the shader.
+ prim_data.common.may_need_repetition = false;
+ }
+
+ // Update the template this instane references, which may refresh the GPU
+ // cache with any shared template data.
+ prim_data.update(frame_state);
+
+ if prim_data.tile_spacing != LayoutSize::zero() {
+ let prim_info = &scratch.prim_info[prim_instance.visibility_info.0 as usize];
+
+ let map_local_to_world = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ prim_spatial_node_index,
+ frame_context.global_screen_world_rect,
+ frame_context.spatial_tree,
+ );
+
+ prim_data.common.may_need_repetition = false;
+
+ *visible_tiles_range = decompose_repeated_primitive(
+ &prim_info.combined_local_clip_rect,
+ &prim_data.common.prim_rect,
+ prim_info.clipped_world_rect,
+ &prim_data.stretch_size,
+ &prim_data.tile_spacing,
+ frame_state,
+ &mut scratch.gradient_tiles,
+ &map_local_to_world,
+ &mut |_, mut request| {
+ request.push([
+ prim_data.center.x,
+ prim_data.center.y,
+ prim_data.params.start_radius,
+ prim_data.params.end_radius,
+ ]);
+ request.push([
+ prim_data.params.ratio_xy,
+ pack_as_float(prim_data.extend_mode as u32),
+ prim_data.stretch_size.width,
+ prim_data.stretch_size.height,
+ ]);
+ },
+ );
+
+ if visible_tiles_range.is_empty() {
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ }
+ }
+
+ // TODO(gw): Consider whether it's worth doing segment building
+ // for gradient primitives.
+ }
+ PrimitiveInstanceKind::ConicGradient { data_handle, ref mut visible_tiles_range, .. } => {
+ profile_scope!("ConicGradient");
+ let prim_data = &mut data_stores.conic_grad[*data_handle];
+
+ if prim_data.stretch_size.width >= prim_data.common.prim_rect.size.width &&
+ prim_data.stretch_size.height >= prim_data.common.prim_rect.size.height {
+
+ // We are performing the decomposition on the CPU here, no need to
+ // have it in the shader.
+ prim_data.common.may_need_repetition = false;
+ }
+
+ // Update the template this instane references, which may refresh the GPU
+ // cache with any shared template data.
+ prim_data.update(frame_state);
+
+ if prim_data.tile_spacing != LayoutSize::zero() {
+ let prim_info = &scratch.prim_info[prim_instance.visibility_info.0 as usize];
+
+ let map_local_to_world = SpaceMapper::new_with_target(
+ ROOT_SPATIAL_NODE_INDEX,
+ prim_spatial_node_index,
+ frame_context.global_screen_world_rect,
+ frame_context.spatial_tree,
+ );
+
+ prim_data.common.may_need_repetition = false;
+
+ *visible_tiles_range = decompose_repeated_primitive(
+ &prim_info.combined_local_clip_rect,
+ &prim_data.common.prim_rect,
+ prim_info.clipped_world_rect,
+ &prim_data.stretch_size,
+ &prim_data.tile_spacing,
+ frame_state,
+ &mut scratch.gradient_tiles,
+ &map_local_to_world,
+ &mut |_, mut request| {
+ request.push([
+ prim_data.center.x,
+ prim_data.center.y,
+ prim_data.params.start_offset,
+ prim_data.params.end_offset,
+ ]);
+ request.push([
+ prim_data.params.angle,
+ pack_as_float(prim_data.extend_mode as u32),
+ prim_data.stretch_size.width,
+ prim_data.stretch_size.height,
+ ]);
+ },
+ );
+
+ if visible_tiles_range.is_empty() {
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ }
+ }
+
+ // TODO(gw): Consider whether it's worth doing segment building
+ // for gradient primitives.
+ }
+ PrimitiveInstanceKind::Picture { pic_index, segment_instance_index, .. } => {
+ profile_scope!("Picture");
+ let pic = &mut self.pictures[pic_index.0];
+ let prim_info = &scratch.prim_info[prim_instance.visibility_info.0 as usize];
+
+ if pic.prepare_for_render(
+ frame_context,
+ frame_state,
+ data_stores,
+ ) {
+ if let Some(ref mut splitter) = pic_state.plane_splitter {
+ PicturePrimitive::add_split_plane(
+ splitter,
+ frame_context.spatial_tree,
+ prim_spatial_node_index,
+ pic.precise_local_rect,
+ &prim_info.combined_local_clip_rect,
+ frame_state.current_dirty_region().combined,
+ plane_split_anchor,
+ );
+ }
+
+ // If this picture uses segments, ensure the GPU cache is
+ // up to date with segment local rects.
+ // TODO(gw): This entire match statement above can now be
+ // refactored into prepare_interned_prim_for_render.
+ if pic.can_use_segments() {
+ write_segment(
+ *segment_instance_index,
+ frame_state,
+ &mut scratch.segments,
+ &mut scratch.segment_instances,
+ |request| {
+ request.push(PremultipliedColorF::WHITE);
+ request.push(PremultipliedColorF::WHITE);
+ request.push([
+ -1.0, // -ve means use prim rect for stretch size
+ 0.0,
+ 0.0,
+ 0.0,
+ ]);
+ }
+ );
+ }
+ } else {
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ }
+ }
+ PrimitiveInstanceKind::Backdrop { data_handle } => {
+ profile_scope!("Backdrop");
+ let backdrop_pic_index = data_stores.backdrop[*data_handle].kind.pic_index;
+
+ // Setup a dependency on the backdrop picture to ensure it is rendered prior to rendering this primitive.
+ let backdrop_surface_index = self.pictures[backdrop_pic_index.0].raster_config.as_ref().unwrap().surface_index;
+ if let Some(backdrop_tasks) = frame_state.surfaces[backdrop_surface_index.0].render_tasks {
+ let picture_task_id = frame_state.surfaces[pic_context.surface_index.0].render_tasks.as_ref().unwrap().port;
+ frame_state.render_tasks.add_dependency(picture_task_id, backdrop_tasks.root);
+ } else {
+ if prim_instance.is_chased() {
+ println!("\tBackdrop primitive culled because backdrop task was not assigned render tasks");
+ }
+ prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+ }
+ }
+ };
+ }
+}
+
+fn write_segment<F>(
+ segment_instance_index: SegmentInstanceIndex,
+ frame_state: &mut FrameBuildingState,
+ segments: &mut SegmentStorage,
+ segment_instances: &mut SegmentInstanceStorage,
+ f: F,
+) where F: Fn(&mut GpuDataRequest) {
+ debug_assert_ne!(segment_instance_index, SegmentInstanceIndex::INVALID);
+ if segment_instance_index != SegmentInstanceIndex::UNUSED {
+ let segment_instance = &mut segment_instances[segment_instance_index];
+
+ if let Some(mut request) = frame_state.gpu_cache.request(&mut segment_instance.gpu_cache_handle) {
+ let segments = &segments[segment_instance.segments_range];
+
+ f(&mut request);
+
+ for segment in segments {
+ request.write_segment(
+ segment.local_rect,
+ [0.0; 4],
+ );
+ }
+ }
+ }
+}
+
+fn decompose_repeated_primitive(
+ combined_local_clip_rect: &LayoutRect,
+ prim_local_rect: &LayoutRect,
+ prim_world_rect: WorldRect,
+ stretch_size: &LayoutSize,
+ tile_spacing: &LayoutSize,
+ frame_state: &mut FrameBuildingState,
+ gradient_tiles: &mut GradientTileStorage,
+ map_local_to_world: &SpaceMapper<LayoutPixel, WorldPixel>,
+ callback: &mut dyn FnMut(&LayoutRect, GpuDataRequest),
+) -> GradientTileRange {
+ let mut visible_tiles = Vec::new();
+
+ // Tighten the clip rect because decomposing the repeated image can
+ // produce primitives that are partially covering the original image
+ // rect and we want to clip these extra parts out.
+ let tight_clip_rect = combined_local_clip_rect
+ .intersection(prim_local_rect).unwrap();
+
+ let visible_rect = compute_conservative_visible_rect(
+ &tight_clip_rect,
+ prim_world_rect,
+ map_local_to_world,
+ );
+ let stride = *stretch_size + *tile_spacing;
+
+ let repetitions = image_tiling::repetitions(prim_local_rect, &visible_rect, stride);
+ for Repetition { origin, .. } in repetitions {
+ let mut handle = GpuCacheHandle::new();
+ let rect = LayoutRect {
+ origin,
+ size: *stretch_size,
+ };
+
+ if let Some(request) = frame_state.gpu_cache.request(&mut handle) {
+ callback(&rect, request);
+ }
+
+ visible_tiles.push(VisibleGradientTile {
+ local_rect: rect,
+ local_clip_rect: tight_clip_rect,
+ handle
+ });
+ }
+
+ // At this point if we don't have tiles to show it means we could probably
+ // have done a better a job at culling during an earlier stage.
+ // Clearing the screen rect has the effect of "culling out" the primitive
+ // from the point of view of the batch builder, and ensures we don't hit
+ // assertions later on because we didn't request any image.
+ if visible_tiles.is_empty() {
+ GradientTileRange::empty()
+ } else {
+ gradient_tiles.extend(visible_tiles)
+ }
+}
+
+fn compute_conservative_visible_rect(
+ local_clip_rect: &LayoutRect,
+ world_culling_rect: WorldRect,
+ map_local_to_world: &SpaceMapper<LayoutPixel, WorldPixel>,
+) -> LayoutRect {
+ if let Some(local_bounds) = map_local_to_world.unmap(&world_culling_rect) {
+ return local_clip_rect.intersection(&local_bounds).unwrap_or_else(LayoutRect::zero)
+ }
+
+ *local_clip_rect
+}
+
+fn edge_flags_for_tile_spacing(tile_spacing: &LayoutSize) -> EdgeAaSegmentMask {
+ let mut flags = EdgeAaSegmentMask::empty();
+
+ if tile_spacing.width > 0.0 {
+ flags |= EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::RIGHT;
+ }
+ if tile_spacing.height > 0.0 {
+ flags |= EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::BOTTOM;
+ }
+
+ flags
+}
+
+impl<'a> GpuDataRequest<'a> {
+ // Write the GPU cache data for an individual segment.
+ fn write_segment(
+ &mut self,
+ local_rect: LayoutRect,
+ extra_data: [f32; 4],
+ ) {
+ let _ = VECS_PER_SEGMENT;
+ self.push(local_rect);
+ self.push(extra_data);
+ }
+}
+
+ fn write_brush_segment_description(
+ prim_local_rect: LayoutRect,
+ prim_local_clip_rect: LayoutRect,
+ clip_chain: &ClipChainInstance,
+ segment_builder: &mut SegmentBuilder,
+ clip_store: &ClipStore,
+ data_stores: &DataStores,
+ ) -> bool {
+ // If the brush is small, we want to skip building segments
+ // and just draw it as a single primitive with clip mask.
+ if prim_local_rect.size.area() < MIN_BRUSH_SPLIT_AREA {
+ return false;
+ }
+
+ segment_builder.initialize(
+ prim_local_rect,
+ None,
+ prim_local_clip_rect
+ );
+
+ // Segment the primitive on all the local-space clip sources that we can.
+ for i in 0 .. clip_chain.clips_range.count {
+ let clip_instance = clip_store
+ .get_instance_from_range(&clip_chain.clips_range, i);
+ let clip_node = &data_stores.clip[clip_instance.handle];
+
+ // If this clip item is positioned by another positioning node, its relative position
+ // could change during scrolling. This means that we would need to resegment. Instead
+ // of doing that, only segment with clips that have the same positioning node.
+ // TODO(mrobinson, #2858): It may make sense to include these nodes, resegmenting only
+ // when necessary while scrolling.
+ if !clip_instance.flags.contains(ClipNodeFlags::SAME_SPATIAL_NODE) {
+ continue;
+ }
+
+ let (local_clip_rect, radius, mode) = match clip_node.item.kind {
+ ClipItemKind::RoundedRectangle { rect, radius, mode } => {
+ (rect, Some(radius), mode)
+ }
+ ClipItemKind::Rectangle { rect, mode } => {
+ (rect, None, mode)
+ }
+ ClipItemKind::BoxShadow { ref source } => {
+ // For inset box shadows, we can clip out any
+ // pixels that are inside the shadow region
+ // and are beyond the inner rect, as they can't
+ // be affected by the blur radius.
+ let inner_clip_mode = match source.clip_mode {
+ BoxShadowClipMode::Outset => None,
+ BoxShadowClipMode::Inset => Some(ClipMode::ClipOut),
+ };
+
+ // Push a region into the segment builder where the
+ // box-shadow can have an effect on the result. This
+ // ensures clip-mask tasks get allocated for these
+ // pixel regions, even if no other clips affect them.
+ segment_builder.push_mask_region(
+ source.prim_shadow_rect,
+ source.prim_shadow_rect.inflate(
+ -0.5 * source.original_alloc_size.width,
+ -0.5 * source.original_alloc_size.height,
+ ),
+ inner_clip_mode,
+ );
+
+ continue;
+ }
+ ClipItemKind::Image { .. } => {
+ // If we encounter an image mask, bail out from segment building.
+ // It's not possible to know which parts of the primitive are affected
+ // by the mask (without inspecting the pixels). We could do something
+ // better here in the future if it ever shows up as a performance issue
+ // (for instance, at least segment based on the bounding rect of the
+ // image mask if it's non-repeating).
+ return false;
+ }
+ };
+
+ segment_builder.push_clip_rect(local_clip_rect, radius, mode);
+ }
+
+ true
+ }
+
+impl PrimitiveInstance {
+ fn build_segments_if_needed(
+ &mut self,
+ prim_info: &PrimitiveVisibility,
+ frame_state: &mut FrameBuildingState,
+ prim_store: &mut PrimitiveStore,
+ data_stores: &DataStores,
+ segments_store: &mut SegmentStorage,
+ segment_instances_store: &mut SegmentInstanceStorage,
+ ) {
+ let prim_clip_chain = &prim_info.clip_chain;
+
+ // Usually, the primitive rect can be found from information
+ // in the instance and primitive template.
+ let prim_local_rect = data_stores.get_local_prim_rect(
+ self,
+ prim_store,
+ );
+
+ let segment_instance_index = match self.kind {
+ PrimitiveInstanceKind::Rectangle { ref mut segment_instance_index, .. } |
+ PrimitiveInstanceKind::YuvImage { ref mut segment_instance_index, .. } => {
+ segment_instance_index
+ }
+ PrimitiveInstanceKind::Image { data_handle, image_instance_index, .. } => {
+ let image_data = &data_stores.image[data_handle].kind;
+ let image_instance = &mut prim_store.images[image_instance_index];
+ //Note: tiled images don't support automatic segmentation,
+ // they strictly produce one segment per visible tile instead.
+ if frame_state
+ .resource_cache
+ .get_image_properties(image_data.key)
+ .and_then(|properties| properties.tiling)
+ .is_some()
+ {
+ image_instance.segment_instance_index = SegmentInstanceIndex::UNUSED;
+ return;
+ }
+ &mut image_instance.segment_instance_index
+ }
+ PrimitiveInstanceKind::Picture { ref mut segment_instance_index, pic_index, .. } => {
+ let pic = &mut prim_store.pictures[pic_index.0];
+
+ // If this picture supports segment rendering
+ if pic.can_use_segments() {
+ // If the segments have been invalidated, ensure the current
+ // index of segments is invalid. This ensures that the segment
+ // building logic below will be run.
+ if !pic.segments_are_valid {
+ *segment_instance_index = SegmentInstanceIndex::INVALID;
+ pic.segments_are_valid = true;
+ }
+
+ segment_instance_index
+ } else {
+ return;
+ }
+ }
+ PrimitiveInstanceKind::TextRun { .. } |
+ PrimitiveInstanceKind::NormalBorder { .. } |
+ PrimitiveInstanceKind::ImageBorder { .. } |
+ PrimitiveInstanceKind::Clear { .. } |
+ PrimitiveInstanceKind::LinearGradient { .. } |
+ PrimitiveInstanceKind::RadialGradient { .. } |
+ PrimitiveInstanceKind::ConicGradient { .. } |
+ PrimitiveInstanceKind::LineDecoration { .. } |
+ PrimitiveInstanceKind::Backdrop { .. } => {
+ // These primitives don't support / need segments.
+ return;
+ }
+ };
+
+ if *segment_instance_index == SegmentInstanceIndex::INVALID {
+ let mut segments: SmallVec<[BrushSegment; 8]> = SmallVec::new();
+
+ if write_brush_segment_description(
+ prim_local_rect,
+ self.local_clip_rect,
+ prim_clip_chain,
+ &mut frame_state.segment_builder,
+ frame_state.clip_store,
+ data_stores,
+ ) {
+ frame_state.segment_builder.build(|segment| {
+ segments.push(
+ BrushSegment::new(
+ segment.rect.translate(-prim_local_rect.origin.to_vector()),
+ segment.has_mask,
+ segment.edge_flags,
+ [0.0; 4],
+ BrushFlags::PERSPECTIVE_INTERPOLATION,
+ ),
+ );
+ });
+ }
+
+ // If only a single segment is produced, there is no benefit to writing
+ // a segment instance array. Instead, just use the main primitive rect
+ // written into the GPU cache.
+ // TODO(gw): This is (sortof) a bandaid - due to a limitation in the current
+ // brush encoding, we can only support a total of up to 2^16 segments.
+ // This should be (more than) enough for any real world case, so for
+ // now we can handle this by skipping cases where we were generating
+ // segments where there is no benefit. The long term / robust fix
+ // for this is to move the segment building to be done as a more
+ // limited nine-patch system during scene building, removing arbitrary
+ // segmentation during frame-building (see bug #1617491).
+ if segments.len() <= 1 {
+ *segment_instance_index = SegmentInstanceIndex::UNUSED;
+ } else {
+ let segments_range = segments_store.extend(segments);
+
+ let instance = SegmentedInstance {
+ segments_range,
+ gpu_cache_handle: GpuCacheHandle::new(),
+ };
+
+ *segment_instance_index = segment_instances_store.push(instance);
+ };
+ }
+ }
+
+ fn update_clip_task_for_brush(
+ &self,
+ prim_origin: &LayoutPoint,
+ prim_info: &mut PrimitiveVisibility,
+ prim_spatial_node_index: SpatialNodeIndex,
+ root_spatial_node_index: SpatialNodeIndex,
+ pic_context: &PictureContext,
+ pic_state: &mut PictureState,
+ frame_context: &FrameBuildingContext,
+ frame_state: &mut FrameBuildingState,
+ prim_store: &PrimitiveStore,
+ data_stores: &mut DataStores,
+ segments_store: &mut SegmentStorage,
+ segment_instances_store: &mut SegmentInstanceStorage,
+ clip_mask_instances: &mut Vec<ClipMaskKind>,
+ unclipped: &DeviceRect,
+ device_pixel_scale: DevicePixelScale,
+ ) -> bool {
+ let segments = match self.kind {
+ PrimitiveInstanceKind::TextRun { .. } |
+ PrimitiveInstanceKind::Clear { .. } |
+ PrimitiveInstanceKind::LineDecoration { .. } |
+ PrimitiveInstanceKind::Backdrop { .. } => {
+ return false;
+ }
+ PrimitiveInstanceKind::Image { image_instance_index, .. } => {
+ let segment_instance_index = prim_store
+ .images[image_instance_index]
+ .segment_instance_index;
+
+ if segment_instance_index == SegmentInstanceIndex::UNUSED {
+ return false;
+ }
+
+ let segment_instance = &segment_instances_store[segment_instance_index];
+
+ &segments_store[segment_instance.segments_range]
+ }
+ PrimitiveInstanceKind::Picture { segment_instance_index, .. } => {
+ // Pictures may not support segment rendering at all (INVALID)
+ // or support segment rendering but choose not to due to size
+ // or some other factor (UNUSED).
+ if segment_instance_index == SegmentInstanceIndex::UNUSED ||
+ segment_instance_index == SegmentInstanceIndex::INVALID {
+ return false;
+ }
+
+ let segment_instance = &segment_instances_store[segment_instance_index];
+ &segments_store[segment_instance.segments_range]
+ }
+ PrimitiveInstanceKind::YuvImage { segment_instance_index, .. } |
+ PrimitiveInstanceKind::Rectangle { segment_instance_index, .. } => {
+ debug_assert!(segment_instance_index != SegmentInstanceIndex::INVALID);
+
+ if segment_instance_index == SegmentInstanceIndex::UNUSED {
+ return false;
+ }
+
+ let segment_instance = &segment_instances_store[segment_instance_index];
+
+ &segments_store[segment_instance.segments_range]
+ }
+ PrimitiveInstanceKind::ImageBorder { data_handle, .. } => {
+ let border_data = &data_stores.image_border[data_handle].kind;
+
+ // TODO: This is quite messy - once we remove legacy primitives we
+ // can change this to be a tuple match on (instance, template)
+ border_data.brush_segments.as_slice()
+ }
+ PrimitiveInstanceKind::NormalBorder { data_handle, .. } => {
+ let border_data = &data_stores.normal_border[data_handle].kind;
+
+ // TODO: This is quite messy - once we remove legacy primitives we
+ // can change this to be a tuple match on (instance, template)
+ border_data.brush_segments.as_slice()
+ }
+ PrimitiveInstanceKind::LinearGradient { data_handle, .. } => {
+ let prim_data = &data_stores.linear_grad[data_handle];
+
+ // TODO: This is quite messy - once we remove legacy primitives we
+ // can change this to be a tuple match on (instance, template)
+ if prim_data.brush_segments.is_empty() {
+ return false;
+ }
+
+ prim_data.brush_segments.as_slice()
+ }
+ PrimitiveInstanceKind::RadialGradient { data_handle, .. } => {
+ let prim_data = &data_stores.radial_grad[data_handle];
+
+ // TODO: This is quite messy - once we remove legacy primitives we
+ // can change this to be a tuple match on (instance, template)
+ if prim_data.brush_segments.is_empty() {
+ return false;
+ }
+
+ prim_data.brush_segments.as_slice()
+ }
+ PrimitiveInstanceKind::ConicGradient { data_handle, .. } => {
+ let prim_data = &data_stores.conic_grad[data_handle];
+
+ // TODO: This is quite messy - once we remove legacy primitives we
+ // can change this to be a tuple match on (instance, template)
+ if prim_data.brush_segments.is_empty() {
+ return false;
+ }
+
+ prim_data.brush_segments.as_slice()
+ }
+ };
+
+ // If there are no segments, early out to avoid setting a valid
+ // clip task instance location below.
+ if segments.is_empty() {
+ return true;
+ }
+
+ // Set where in the clip mask instances array the clip mask info
+ // can be found for this primitive. Each segment will push the
+ // clip mask information for itself in update_clip_task below.
+ prim_info.clip_task_index = ClipTaskIndex(clip_mask_instances.len() as _);
+
+ // If we only built 1 segment, there is no point in re-running
+ // the clip chain builder. Instead, just use the clip chain
+ // instance that was built for the main primitive. This is a
+ // significant optimization for the common case.
+ if segments.len() == 1 {
+ let clip_mask_kind = segments[0].update_clip_task(
+ Some(&prim_info.clip_chain),
+ prim_info.clipped_world_rect,
+ root_spatial_node_index,
+ pic_context.surface_index,
+ pic_state,
+ frame_context,
+ frame_state,
+ &mut data_stores.clip,
+ unclipped,
+ device_pixel_scale,
+ );
+ clip_mask_instances.push(clip_mask_kind);
+ } else {
+ let dirty_world_rect = frame_state.current_dirty_region().combined;
+
+ for segment in segments {
+ // Build a clip chain for the smaller segment rect. This will
+ // often manage to eliminate most/all clips, and sometimes
+ // clip the segment completely.
+ frame_state.clip_store.set_active_clips_from_clip_chain(
+ &prim_info.clip_chain,
+ prim_spatial_node_index,
+ &frame_context.spatial_tree,
+ );
+
+ let segment_clip_chain = frame_state
+ .clip_store
+ .build_clip_chain_instance(
+ segment.local_rect.translate(prim_origin.to_vector()),
+ &pic_state.map_local_to_pic,
+ &pic_state.map_pic_to_world,
+ &frame_context.spatial_tree,
+ frame_state.gpu_cache,
+ frame_state.resource_cache,
+ device_pixel_scale,
+ &dirty_world_rect,
+ &mut data_stores.clip,
+ false,
+ self.is_chased(),
+ );
+
+ let clip_mask_kind = segment.update_clip_task(
+ segment_clip_chain.as_ref(),
+ prim_info.clipped_world_rect,
+ root_spatial_node_index,
+ pic_context.surface_index,
+ pic_state,
+ frame_context,
+ frame_state,
+ &mut data_stores.clip,
+ unclipped,
+ device_pixel_scale,
+ );
+ clip_mask_instances.push(clip_mask_kind);
+ }
+ }
+
+ true
+ }
+
+ fn update_clip_task(
+ &mut self,
+ prim_origin: &LayoutPoint,
+ prim_spatial_node_index: SpatialNodeIndex,
+ root_spatial_node_index: SpatialNodeIndex,
+ pic_context: &PictureContext,
+ pic_state: &mut PictureState,
+ frame_context: &FrameBuildingContext,
+ frame_state: &mut FrameBuildingState,
+ prim_store: &mut PrimitiveStore,
+ data_stores: &mut DataStores,
+ scratch: &mut PrimitiveScratchBuffer,
+ ) {
+ let prim_info = &mut scratch.prim_info[self.visibility_info.0 as usize];
+ let device_pixel_scale = frame_state.surfaces[pic_context.surface_index.0].device_pixel_scale;
+
+ if self.is_chased() {
+ println!("\tupdating clip task with pic rect {:?}", prim_info.clip_chain.pic_clip_rect);
+ }
+
+ // Get the device space rect for the primitive if it was unclipped.
+ let unclipped = match get_unclipped_device_rect(
+ prim_info.clip_chain.pic_clip_rect,
+ &pic_state.map_pic_to_raster,
+ device_pixel_scale,
+ ) {
+ Some(rect) => rect,
+ None => return,
+ };
+
+ self.build_segments_if_needed(
+ &prim_info,
+ frame_state,
+ prim_store,
+ data_stores,
+ &mut scratch.segments,
+ &mut scratch.segment_instances,
+ );
+
+ // First try to render this primitive's mask using optimized brush rendering.
+ if self.update_clip_task_for_brush(
+ prim_origin,
+ prim_info,
+ prim_spatial_node_index,
+ root_spatial_node_index,
+ pic_context,
+ pic_state,
+ frame_context,
+ frame_state,
+ prim_store,
+ data_stores,
+ &mut scratch.segments,
+ &mut scratch.segment_instances,
+ &mut scratch.clip_mask_instances,
+ &unclipped,
+ device_pixel_scale,
+ ) {
+ if self.is_chased() {
+ println!("\tsegment tasks have been created for clipping");
+ }
+ return;
+ }
+
+ if prim_info.clip_chain.needs_mask {
+ // Get a minimal device space rect, clipped to the screen that we
+ // need to allocate for the clip mask, as well as interpolated
+ // snap offsets.
+ if let Some(device_rect) = get_clipped_device_rect(
+ &unclipped,
+ &pic_state.map_raster_to_world,
+ prim_info.clipped_world_rect,
+ device_pixel_scale,
+ ) {
+ let (device_rect, device_pixel_scale) = adjust_mask_scale_for_max_size(device_rect, device_pixel_scale);
+
+ let clip_task_id = RenderTask::new_mask(
+ device_rect,
+ prim_info.clip_chain.clips_range,
+ root_spatial_node_index,
+ frame_state.clip_store,
+ frame_state.gpu_cache,
+ frame_state.resource_cache,
+ frame_state.render_tasks,
+ &mut data_stores.clip,
+ device_pixel_scale,
+ frame_context.fb_config,
+ );
+ if self.is_chased() {
+ println!("\tcreated task {:?} with device rect {:?}",
+ clip_task_id, device_rect);
+ }
+ // Set the global clip mask instance for this primitive.
+ let clip_task_index = ClipTaskIndex(scratch.clip_mask_instances.len() as _);
+ scratch.clip_mask_instances.push(ClipMaskKind::Mask(clip_task_id));
+ prim_info.clip_task_index = clip_task_index;
+ frame_state.render_tasks.add_dependency(
+ frame_state.surfaces[pic_context.surface_index.0].render_tasks.unwrap().port,
+ clip_task_id,
+ );
+ }
+ }
+ }
+}
+
+// Ensures that the size of mask render tasks are within MAX_MASK_SIZE.
+fn adjust_mask_scale_for_max_size(device_rect: DeviceRect, device_pixel_scale: DevicePixelScale) -> (DeviceIntRect, DevicePixelScale) {
+ if device_rect.width() > MAX_MASK_SIZE || device_rect.height() > MAX_MASK_SIZE {
+ // round_out will grow by 1 integer pixel if origin is on a
+ // fractional position, so keep that margin for error with -1:
+ let scale = (MAX_MASK_SIZE - 1.0) /
+ f32::max(device_rect.width(), device_rect.height());
+ let new_device_pixel_scale = device_pixel_scale * Scale::new(scale);
+ let new_device_rect = (device_rect.to_f32() * Scale::new(scale))
+ .round_out()
+ .to_i32();
+ (new_device_rect, new_device_pixel_scale)
+ } else {
+ (device_rect.to_i32(), device_pixel_scale)
+ }
+}
+
+/// Retrieve the exact unsnapped device space rectangle for a primitive.
+fn get_unclipped_device_rect(
+ prim_rect: PictureRect,
+ map_to_raster: &SpaceMapper<PicturePixel, RasterPixel>,
+ device_pixel_scale: DevicePixelScale,
+) -> Option<DeviceRect> {
+ let raster_rect = map_to_raster.map(&prim_rect)?;
+ let world_rect = raster_rect * Scale::new(1.0);
+ Some(world_rect * device_pixel_scale)
+}
+
+/// Given an unclipped device rect, try to find a minimal device space
+/// rect to allocate a clip mask for, by clipping to the screen. This
+/// function is very similar to get_raster_rects below. It is far from
+/// ideal, and should be refactored as part of the support for setting
+/// scale per-raster-root.
+fn get_clipped_device_rect(
+ unclipped: &DeviceRect,
+ map_to_world: &SpaceMapper<RasterPixel, WorldPixel>,
+ prim_bounding_rect: WorldRect,
+ device_pixel_scale: DevicePixelScale,
+) -> Option<DeviceRect> {
+ let unclipped_raster_rect = {
+ let world_rect = *unclipped * Scale::new(1.0);
+ let raster_rect = world_rect * device_pixel_scale.inverse();
+
+ raster_rect.cast_unit()
+ };
+
+ let unclipped_world_rect = map_to_world.map(&unclipped_raster_rect)?;
+
+ let clipped_world_rect = unclipped_world_rect.intersection(&prim_bounding_rect)?;
+
+ let clipped_raster_rect = map_to_world.unmap(&clipped_world_rect)?;
+
+ let clipped_raster_rect = clipped_raster_rect.intersection(&unclipped_raster_rect)?;
+
+ // Ensure that we won't try to allocate a zero-sized clip render task.
+ if clipped_raster_rect.is_empty() {
+ return None;
+ }
+
+ let clipped = raster_rect_to_device_pixels(
+ clipped_raster_rect,
+ device_pixel_scale,
+ );
+
+ Some(clipped)
+}
+
+pub fn get_raster_rects(
+ pic_rect: PictureRect,
+ map_to_raster: &SpaceMapper<PicturePixel, RasterPixel>,
+ map_to_world: &SpaceMapper<RasterPixel, WorldPixel>,
+ prim_bounding_rect: WorldRect,
+ device_pixel_scale: DevicePixelScale,
+) -> Option<(DeviceRect, DeviceRect)> {
+ let unclipped_raster_rect = map_to_raster.map(&pic_rect)?;
+
+ let unclipped = raster_rect_to_device_pixels(
+ unclipped_raster_rect,
+ device_pixel_scale,
+ );
+
+ let unclipped_world_rect = map_to_world.map(&unclipped_raster_rect)?;
+
+ let clipped_world_rect = unclipped_world_rect.intersection(&prim_bounding_rect)?;
+
+ let clipped_raster_rect = map_to_world.unmap(&clipped_world_rect)?;
+
+ let clipped_raster_rect = clipped_raster_rect.intersection(&unclipped_raster_rect)?;
+
+ let clipped = raster_rect_to_device_pixels(
+ clipped_raster_rect,
+ device_pixel_scale,
+ );
+
+ // Ensure that we won't try to allocate a zero-sized clip render task.
+ if clipped.is_empty() {
+ return None;
+ }
+
+ Some((clipped, unclipped))
+}
+
+/// Choose the decoration mask tile size for a given line.
+///
+/// Given a line with overall size `rect_size` and the given `orientation`,
+/// return the dimensions of a single mask tile for the decoration pattern
+/// described by `style` and `wavy_line_thickness`.
+///
+/// If `style` is `Solid`, no mask tile is necessary; return `None`. The other
+/// styles each have their own characteristic periods of repetition, so for each
+/// one, this function returns a `LayoutSize` with the right aspect ratio and
+/// whose specific size is convenient for the `cs_line_decoration.glsl` fragment
+/// shader to work with. The shader uses a local coordinate space in which the
+/// tile fills a rectangle with one corner at the origin, and with the size this
+/// function returns.
+///
+/// The returned size is not necessarily in pixels; device scaling and other
+/// concerns can still affect the actual task size.
+///
+/// Regardless of whether `orientation` is `Vertical` or `Horizontal`, the
+/// `width` and `height` of the returned size are always horizontal and
+/// vertical, respectively.
+pub fn get_line_decoration_size(
+ rect_size: &LayoutSize,
+ orientation: LineOrientation,
+ style: LineStyle,
+ wavy_line_thickness: f32,
+) -> Option<LayoutSize> {
+ let h = match orientation {
+ LineOrientation::Horizontal => rect_size.height,
+ LineOrientation::Vertical => rect_size.width,
+ };
+
+ // TODO(gw): The formulae below are based on the existing gecko and line
+ // shader code. They give reasonable results for most inputs,
+ // but could definitely do with a detailed pass to get better
+ // quality on a wider range of inputs!
+ // See nsCSSRendering::PaintDecorationLine in Gecko.
+
+ let (parallel, perpendicular) = match style {
+ LineStyle::Solid => {
+ return None;
+ }
+ LineStyle::Dashed => {
+ let dash_length = (3.0 * h).min(64.0).max(1.0);
+
+ (2.0 * dash_length, 4.0)
+ }
+ LineStyle::Dotted => {
+ let diameter = h.min(64.0).max(1.0);
+ let period = 2.0 * diameter;
+
+ (period, diameter)
+ }
+ LineStyle::Wavy => {
+ let line_thickness = wavy_line_thickness.max(1.0);
+ let slope_length = h - line_thickness;
+ let flat_length = ((line_thickness - 1.0) * 2.0).max(1.0);
+ let approx_period = 2.0 * (slope_length + flat_length);
+
+ (approx_period, h)
+ }
+ };
+
+ Some(match orientation {
+ LineOrientation::Horizontal => LayoutSize::new(parallel, perpendicular),
+ LineOrientation::Vertical => LayoutSize::new(perpendicular, parallel),
+ })
+}
+
+fn update_opacity_binding(
+ opacity_bindings: &mut OpacityBindingStorage,
+ opacity_binding_index: OpacityBindingIndex,
+ scene_properties: &SceneProperties,
+) {
+ if opacity_binding_index != OpacityBindingIndex::INVALID {
+ let binding = &mut opacity_bindings[opacity_binding_index];
+ binding.update(scene_properties);
+ }
+}
+
+/// Trait for primitives that are directly internable.
+/// see SceneBuilder::add_primitive<P>
+pub trait InternablePrimitive: intern::Internable<InternData = ()> + Sized {
+ /// Build a new key from self with `info`.
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> Self::Key;
+
+ fn make_instance_kind(
+ key: Self::Key,
+ data_handle: intern::Handle<Self>,
+ prim_store: &mut PrimitiveStore,
+ reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind;
+}
+
+
+#[test]
+#[cfg(target_pointer_width = "64")]
+fn test_struct_sizes() {
+ use std::mem;
+ // The sizes of these structures are critical for performance on a number of
+ // talos stress tests. If you get a failure here on CI, there's two possibilities:
+ // (a) You made a structure smaller than it currently is. Great work! Update the
+ // test expectations and move on.
+ // (b) You made a structure larger. This is not necessarily a problem, but should only
+ // be done with care, and after checking if talos performance regresses badly.
+ assert_eq!(mem::size_of::<PrimitiveInstance>(), 80, "PrimitiveInstance size changed");
+ assert_eq!(mem::size_of::<PrimitiveInstanceKind>(), 40, "PrimitiveInstanceKind size changed");
+ assert_eq!(mem::size_of::<PrimitiveTemplate>(), 56, "PrimitiveTemplate size changed");
+ assert_eq!(mem::size_of::<PrimitiveTemplateKind>(), 28, "PrimitiveTemplateKind size changed");
+ assert_eq!(mem::size_of::<PrimitiveKey>(), 36, "PrimitiveKey size changed");
+ assert_eq!(mem::size_of::<PrimitiveKeyKind>(), 16, "PrimitiveKeyKind size changed");
+}
diff --git a/third_party/webrender/webrender/src/prim_store/picture.rs b/third_party/webrender/webrender/src/prim_store/picture.rs
new file mode 100644
index 00000000000..46a52e0a807
--- /dev/null
+++ b/third_party/webrender/webrender/src/prim_store/picture.rs
@@ -0,0 +1,319 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{
+ ColorU, MixBlendMode, FilterPrimitiveInput, FilterPrimitiveKind, ColorSpace,
+ PropertyBinding, PropertyBindingId, CompositeOperator,
+};
+use api::units::{Au, LayoutVector2D};
+use crate::scene_building::IsVisible;
+use crate::filterdata::SFilterData;
+use crate::intern::ItemUid;
+use crate::intern::{Internable, InternDebug, Handle as InternHandle};
+use crate::internal_types::{LayoutPrimitiveInfo, Filter};
+use crate::picture::PictureCompositeMode;
+use crate::prim_store::{
+ PrimitiveInstanceKind, PrimitiveStore, VectorKey,
+ InternablePrimitive,
+};
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, MallocSizeOf, PartialEq, Hash, Eq)]
+pub enum CompositeOperatorKey {
+ Over,
+ In,
+ Out,
+ Atop,
+ Xor,
+ Lighter,
+ Arithmetic([Au; 4]),
+}
+
+impl From<CompositeOperator> for CompositeOperatorKey {
+ fn from(operator: CompositeOperator) -> Self {
+ match operator {
+ CompositeOperator::Over => CompositeOperatorKey::Over,
+ CompositeOperator::In => CompositeOperatorKey::In,
+ CompositeOperator::Out => CompositeOperatorKey::Out,
+ CompositeOperator::Atop => CompositeOperatorKey::Atop,
+ CompositeOperator::Xor => CompositeOperatorKey::Xor,
+ CompositeOperator::Lighter => CompositeOperatorKey::Lighter,
+ CompositeOperator::Arithmetic(k_vals) => {
+ let k_vals = [
+ Au::from_f32_px(k_vals[0]),
+ Au::from_f32_px(k_vals[1]),
+ Au::from_f32_px(k_vals[2]),
+ Au::from_f32_px(k_vals[3]),
+ ];
+ CompositeOperatorKey::Arithmetic(k_vals)
+ }
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, MallocSizeOf, PartialEq, Hash, Eq)]
+pub enum FilterPrimitiveKey {
+ Identity(ColorSpace, FilterPrimitiveInput),
+ Flood(ColorSpace, ColorU),
+ Blend(ColorSpace, MixBlendMode, FilterPrimitiveInput, FilterPrimitiveInput),
+ Blur(ColorSpace, Au, FilterPrimitiveInput),
+ Opacity(ColorSpace, Au, FilterPrimitiveInput),
+ ColorMatrix(ColorSpace, [Au; 20], FilterPrimitiveInput),
+ DropShadow(ColorSpace, (VectorKey, Au, ColorU), FilterPrimitiveInput),
+ ComponentTransfer(ColorSpace, FilterPrimitiveInput, Vec<SFilterData>),
+ Offset(ColorSpace, FilterPrimitiveInput, VectorKey),
+ Composite(ColorSpace, FilterPrimitiveInput, FilterPrimitiveInput, CompositeOperatorKey),
+}
+
+/// Represents a hashable description of how a picture primitive
+/// will be composited into its parent.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, MallocSizeOf, PartialEq, Hash, Eq)]
+pub enum PictureCompositeKey {
+ // No visual compositing effect
+ Identity,
+
+ // FilterOp
+ Blur(Au),
+ Brightness(Au),
+ Contrast(Au),
+ Grayscale(Au),
+ HueRotate(Au),
+ Invert(Au),
+ Opacity(Au),
+ OpacityBinding(PropertyBindingId, Au),
+ Saturate(Au),
+ Sepia(Au),
+ DropShadows(Vec<(VectorKey, Au, ColorU)>),
+ ColorMatrix([Au; 20]),
+ SrgbToLinear,
+ LinearToSrgb,
+ ComponentTransfer(ItemUid),
+ Flood(ColorU),
+ SvgFilter(Vec<FilterPrimitiveKey>),
+
+ // MixBlendMode
+ Multiply,
+ Screen,
+ Overlay,
+ Darken,
+ Lighten,
+ ColorDodge,
+ ColorBurn,
+ HardLight,
+ SoftLight,
+ Difference,
+ Exclusion,
+ Hue,
+ Saturation,
+ Color,
+ Luminosity,
+}
+
+impl From<Option<PictureCompositeMode>> for PictureCompositeKey {
+ fn from(mode: Option<PictureCompositeMode>) -> Self {
+ match mode {
+ Some(PictureCompositeMode::MixBlend(mode)) => {
+ match mode {
+ MixBlendMode::Normal => PictureCompositeKey::Identity,
+ MixBlendMode::Multiply => PictureCompositeKey::Multiply,
+ MixBlendMode::Screen => PictureCompositeKey::Screen,
+ MixBlendMode::Overlay => PictureCompositeKey::Overlay,
+ MixBlendMode::Darken => PictureCompositeKey::Darken,
+ MixBlendMode::Lighten => PictureCompositeKey::Lighten,
+ MixBlendMode::ColorDodge => PictureCompositeKey::ColorDodge,
+ MixBlendMode::ColorBurn => PictureCompositeKey::ColorBurn,
+ MixBlendMode::HardLight => PictureCompositeKey::HardLight,
+ MixBlendMode::SoftLight => PictureCompositeKey::SoftLight,
+ MixBlendMode::Difference => PictureCompositeKey::Difference,
+ MixBlendMode::Exclusion => PictureCompositeKey::Exclusion,
+ MixBlendMode::Hue => PictureCompositeKey::Hue,
+ MixBlendMode::Saturation => PictureCompositeKey::Saturation,
+ MixBlendMode::Color => PictureCompositeKey::Color,
+ MixBlendMode::Luminosity => PictureCompositeKey::Luminosity,
+ }
+ }
+ Some(PictureCompositeMode::Filter(op)) => {
+ match op {
+ Filter::Blur(value) => PictureCompositeKey::Blur(Au::from_f32_px(value)),
+ Filter::Brightness(value) => PictureCompositeKey::Brightness(Au::from_f32_px(value)),
+ Filter::Contrast(value) => PictureCompositeKey::Contrast(Au::from_f32_px(value)),
+ Filter::Grayscale(value) => PictureCompositeKey::Grayscale(Au::from_f32_px(value)),
+ Filter::HueRotate(value) => PictureCompositeKey::HueRotate(Au::from_f32_px(value)),
+ Filter::Invert(value) => PictureCompositeKey::Invert(Au::from_f32_px(value)),
+ Filter::Saturate(value) => PictureCompositeKey::Saturate(Au::from_f32_px(value)),
+ Filter::Sepia(value) => PictureCompositeKey::Sepia(Au::from_f32_px(value)),
+ Filter::SrgbToLinear => PictureCompositeKey::SrgbToLinear,
+ Filter::LinearToSrgb => PictureCompositeKey::LinearToSrgb,
+ Filter::Identity => PictureCompositeKey::Identity,
+ Filter::DropShadows(ref shadows) => {
+ PictureCompositeKey::DropShadows(
+ shadows.iter().map(|shadow| {
+ (shadow.offset.into(), Au::from_f32_px(shadow.blur_radius), shadow.color.into())
+ }).collect()
+ )
+ }
+ Filter::Opacity(binding, _) => {
+ match binding {
+ PropertyBinding::Value(value) => {
+ PictureCompositeKey::Opacity(Au::from_f32_px(value))
+ }
+ PropertyBinding::Binding(key, default) => {
+ PictureCompositeKey::OpacityBinding(key.id, Au::from_f32_px(default))
+ }
+ }
+ }
+ Filter::ColorMatrix(values) => {
+ let mut quantized_values: [Au; 20] = [Au(0); 20];
+ for (value, result) in values.iter().zip(quantized_values.iter_mut()) {
+ *result = Au::from_f32_px(*value);
+ }
+ PictureCompositeKey::ColorMatrix(quantized_values)
+ }
+ Filter::ComponentTransfer => unreachable!(),
+ Filter::Flood(color) => PictureCompositeKey::Flood(color.into()),
+ }
+ }
+ Some(PictureCompositeMode::ComponentTransferFilter(handle)) => {
+ PictureCompositeKey::ComponentTransfer(handle.uid())
+ }
+ Some(PictureCompositeMode::SvgFilter(filter_primitives, filter_data)) => {
+ PictureCompositeKey::SvgFilter(filter_primitives.into_iter().map(|primitive| {
+ match primitive.kind {
+ FilterPrimitiveKind::Identity(identity) => FilterPrimitiveKey::Identity(primitive.color_space, identity.input),
+ FilterPrimitiveKind::Blend(blend) => FilterPrimitiveKey::Blend(primitive.color_space, blend.mode, blend.input1, blend.input2),
+ FilterPrimitiveKind::Flood(flood) => FilterPrimitiveKey::Flood(primitive.color_space, flood.color.into()),
+ FilterPrimitiveKind::Blur(blur) => FilterPrimitiveKey::Blur(primitive.color_space, Au::from_f32_px(blur.radius), blur.input),
+ FilterPrimitiveKind::Opacity(opacity) =>
+ FilterPrimitiveKey::Opacity(primitive.color_space, Au::from_f32_px(opacity.opacity), opacity.input),
+ FilterPrimitiveKind::ColorMatrix(color_matrix) => {
+ let mut quantized_values: [Au; 20] = [Au(0); 20];
+ for (value, result) in color_matrix.matrix.iter().zip(quantized_values.iter_mut()) {
+ *result = Au::from_f32_px(*value);
+ }
+ FilterPrimitiveKey::ColorMatrix(primitive.color_space, quantized_values, color_matrix.input)
+ }
+ FilterPrimitiveKind::DropShadow(drop_shadow) => {
+ FilterPrimitiveKey::DropShadow(
+ primitive.color_space,
+ (
+ drop_shadow.shadow.offset.into(),
+ Au::from_f32_px(drop_shadow.shadow.blur_radius),
+ drop_shadow.shadow.color.into(),
+ ),
+ drop_shadow.input,
+ )
+ }
+ FilterPrimitiveKind::ComponentTransfer(component_transfer) =>
+ FilterPrimitiveKey::ComponentTransfer(primitive.color_space, component_transfer.input, filter_data.clone()),
+ FilterPrimitiveKind::Offset(info) =>
+ FilterPrimitiveKey::Offset(primitive.color_space, info.input, info.offset.into()),
+ FilterPrimitiveKind::Composite(info) =>
+ FilterPrimitiveKey::Composite(primitive.color_space, info.input1, info.input2, info.operator.into()),
+ }
+ }).collect())
+ }
+ Some(PictureCompositeMode::Blit(_)) |
+ Some(PictureCompositeMode::TileCache { .. }) |
+ None => {
+ PictureCompositeKey::Identity
+ }
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
+pub struct Picture {
+ pub composite_mode_key: PictureCompositeKey,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
+pub struct PictureKey {
+ pub composite_mode_key: PictureCompositeKey,
+}
+
+impl PictureKey {
+ pub fn new(
+ pic: Picture,
+ ) -> Self {
+ PictureKey {
+ composite_mode_key: pic.composite_mode_key,
+ }
+ }
+}
+
+impl InternDebug for PictureKey {}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct PictureData;
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct PictureTemplate;
+
+impl From<PictureKey> for PictureTemplate {
+ fn from(_: PictureKey) -> Self {
+ PictureTemplate
+ }
+}
+
+pub type PictureDataHandle = InternHandle<Picture>;
+
+impl Internable for Picture {
+ type Key = PictureKey;
+ type StoreData = PictureTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for Picture {
+ fn into_key(
+ self,
+ _: &LayoutPrimitiveInfo,
+ ) -> PictureKey {
+ PictureKey::new(self)
+ }
+
+ fn make_instance_kind(
+ _key: PictureKey,
+ _: PictureDataHandle,
+ _: &mut PrimitiveStore,
+ _reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ // Should never be hit as this method should not be
+ // called for pictures.
+ unreachable!();
+ }
+}
+
+impl IsVisible for Picture {
+ fn is_visible(&self) -> bool {
+ true
+ }
+}
+
+#[test]
+#[cfg(target_pointer_width = "64")]
+fn test_struct_sizes() {
+ use std::mem;
+ // The sizes of these structures are critical for performance on a number of
+ // talos stress tests. If you get a failure here on CI, there's two possibilities:
+ // (a) You made a structure smaller than it currently is. Great work! Update the
+ // test expectations and move on.
+ // (b) You made a structure larger. This is not necessarily a problem, but should only
+ // be done with care, and after checking if talos performance regresses badly.
+ assert_eq!(mem::size_of::<Picture>(), 88, "Picture size changed");
+ assert_eq!(mem::size_of::<PictureTemplate>(), 0, "PictureTemplate size changed");
+ assert_eq!(mem::size_of::<PictureKey>(), 88, "PictureKey size changed");
+}
diff --git a/third_party/webrender/webrender/src/prim_store/text_run.rs b/third_party/webrender/webrender/src/prim_store/text_run.rs
new file mode 100644
index 00000000000..a5c96e3c11d
--- /dev/null
+++ b/third_party/webrender/webrender/src/prim_store/text_run.rs
@@ -0,0 +1,444 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{ColorF, FontInstanceFlags, GlyphInstance, RasterSpace, Shadow};
+use api::units::{LayoutToWorldTransform, LayoutVector2D, PictureRect};
+use crate::scene_building::{CreateShadow, IsVisible};
+use crate::frame_builder::FrameBuildingState;
+use crate::glyph_rasterizer::{FontInstance, FontTransform, GlyphKey, FONT_SIZE_LIMIT};
+use crate::gpu_cache::GpuCache;
+use crate::intern;
+use crate::internal_types::LayoutPrimitiveInfo;
+use crate::picture::{SubpixelMode, SurfaceInfo};
+use crate::prim_store::{PrimitiveOpacity, PrimitiveScratchBuffer};
+use crate::prim_store::{PrimitiveStore, PrimKeyCommonData, PrimTemplateCommonData};
+use crate::render_task_graph::RenderTaskGraph;
+use crate::renderer::{MAX_VERTEX_TEXTURE_WIDTH};
+use crate::resource_cache::{ResourceCache};
+use crate::util::{MatrixHelpers};
+use crate::prim_store::{InternablePrimitive, PrimitiveInstanceKind, SpaceSnapper};
+use crate::spatial_tree::{SpatialTree, SpatialNodeIndex};
+use std::ops;
+use std::sync::Arc;
+use crate::storage;
+use crate::util::PrimaryArc;
+
+/// A run of glyphs, with associated font information.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
+pub struct TextRunKey {
+ pub common: PrimKeyCommonData,
+ pub font: FontInstance,
+ pub glyphs: PrimaryArc<Vec<GlyphInstance>>,
+ pub shadow: bool,
+}
+
+impl TextRunKey {
+ pub fn new(
+ info: &LayoutPrimitiveInfo,
+ text_run: TextRun,
+ ) -> Self {
+ TextRunKey {
+ common: info.into(),
+ font: text_run.font,
+ glyphs: PrimaryArc(text_run.glyphs),
+ shadow: text_run.shadow,
+ }
+ }
+}
+
+impl intern::InternDebug for TextRunKey {}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(MallocSizeOf)]
+pub struct TextRunTemplate {
+ pub common: PrimTemplateCommonData,
+ pub font: FontInstance,
+ #[ignore_malloc_size_of = "Measured via PrimaryArc"]
+ pub glyphs: Arc<Vec<GlyphInstance>>,
+}
+
+impl ops::Deref for TextRunTemplate {
+ type Target = PrimTemplateCommonData;
+ fn deref(&self) -> &Self::Target {
+ &self.common
+ }
+}
+
+impl ops::DerefMut for TextRunTemplate {
+ fn deref_mut(&mut self) -> &mut Self::Target {
+ &mut self.common
+ }
+}
+
+impl From<TextRunKey> for TextRunTemplate {
+ fn from(item: TextRunKey) -> Self {
+ let common = PrimTemplateCommonData::with_key_common(item.common);
+ TextRunTemplate {
+ common,
+ font: item.font,
+ glyphs: item.glyphs.0,
+ }
+ }
+}
+
+impl TextRunTemplate {
+ /// Update the GPU cache for a given primitive template. This may be called multiple
+ /// times per frame, by each primitive reference that refers to this interned
+ /// template. The initial request call to the GPU cache ensures that work is only
+ /// done if the cache entry is invalid (due to first use or eviction).
+ pub fn update(
+ &mut self,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ self.write_prim_gpu_blocks(frame_state);
+ self.opacity = PrimitiveOpacity::translucent();
+ }
+
+ fn write_prim_gpu_blocks(
+ &mut self,
+ frame_state: &mut FrameBuildingState,
+ ) {
+ // corresponds to `fetch_glyph` in the shaders
+ if let Some(mut request) = frame_state.gpu_cache.request(&mut self.common.gpu_cache_handle) {
+ request.push(ColorF::from(self.font.color).premultiplied());
+ // this is the only case where we need to provide plain color to GPU
+ let bg_color = ColorF::from(self.font.bg_color);
+ request.push([bg_color.r, bg_color.g, bg_color.b, 1.0]);
+
+ let mut gpu_block = [0.0; 4];
+ for (i, src) in self.glyphs.iter().enumerate() {
+ // Two glyphs are packed per GPU block.
+
+ if (i & 1) == 0 {
+ gpu_block[0] = src.point.x;
+ gpu_block[1] = src.point.y;
+ } else {
+ gpu_block[2] = src.point.x;
+ gpu_block[3] = src.point.y;
+ request.push(gpu_block);
+ }
+ }
+
+ // Ensure the last block is added in the case
+ // of an odd number of glyphs.
+ if (self.glyphs.len() & 1) != 0 {
+ request.push(gpu_block);
+ }
+
+ assert!(request.current_used_block_num() <= MAX_VERTEX_TEXTURE_WIDTH);
+ }
+ }
+}
+
+pub type TextRunDataHandle = intern::Handle<TextRun>;
+
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct TextRun {
+ pub font: FontInstance,
+ #[ignore_malloc_size_of = "Measured via PrimaryArc"]
+ pub glyphs: Arc<Vec<GlyphInstance>>,
+ pub shadow: bool,
+}
+
+impl intern::Internable for TextRun {
+ type Key = TextRunKey;
+ type StoreData = TextRunTemplate;
+ type InternData = ();
+}
+
+impl InternablePrimitive for TextRun {
+ fn into_key(
+ self,
+ info: &LayoutPrimitiveInfo,
+ ) -> TextRunKey {
+ TextRunKey::new(
+ info,
+ self,
+ )
+ }
+
+ fn make_instance_kind(
+ key: TextRunKey,
+ data_handle: TextRunDataHandle,
+ prim_store: &mut PrimitiveStore,
+ reference_frame_relative_offset: LayoutVector2D,
+ ) -> PrimitiveInstanceKind {
+ let run_index = prim_store.text_runs.push(TextRunPrimitive {
+ used_font: key.font.clone(),
+ glyph_keys_range: storage::Range::empty(),
+ reference_frame_relative_offset,
+ snapped_reference_frame_relative_offset: reference_frame_relative_offset,
+ shadow: key.shadow,
+ raster_space: RasterSpace::Screen,
+ });
+
+ PrimitiveInstanceKind::TextRun{ data_handle, run_index }
+ }
+}
+
+impl CreateShadow for TextRun {
+ fn create_shadow(&self, shadow: &Shadow) -> Self {
+ let mut font = FontInstance {
+ color: shadow.color.into(),
+ ..self.font.clone()
+ };
+ if shadow.blur_radius > 0.0 {
+ font.disable_subpixel_aa();
+ }
+
+ TextRun {
+ font,
+ glyphs: self.glyphs.clone(),
+ shadow: true,
+ }
+ }
+}
+
+impl IsVisible for TextRun {
+ fn is_visible(&self) -> bool {
+ self.font.color.a > 0
+ }
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct TextRunPrimitive {
+ pub used_font: FontInstance,
+ pub glyph_keys_range: storage::Range<GlyphKey>,
+ pub reference_frame_relative_offset: LayoutVector2D,
+ pub snapped_reference_frame_relative_offset: LayoutVector2D,
+ pub shadow: bool,
+ pub raster_space: RasterSpace,
+}
+
+impl TextRunPrimitive {
+ pub fn update_font_instance(
+ &mut self,
+ specified_font: &FontInstance,
+ surface: &SurfaceInfo,
+ spatial_node_index: SpatialNodeIndex,
+ transform: &LayoutToWorldTransform,
+ subpixel_mode: &SubpixelMode,
+ raster_space: RasterSpace,
+ prim_rect: PictureRect,
+ root_scaling_factor: f32,
+ spatial_tree: &SpatialTree,
+ ) -> bool {
+ // If local raster space is specified, include that in the scale
+ // of the glyphs that get rasterized.
+ // TODO(gw): Once we support proper local space raster modes, this
+ // will implicitly be part of the device pixel ratio for
+ // the (cached) local space surface, and so this code
+ // will no longer be required.
+
+ let raster_scale = raster_space.local_scale().unwrap_or(1.0).max(0.001);
+ // root_scaling_factor is used to scale very large pictures that establish
+ // a raster root back to something sane, thus scale the device size accordingly.
+ // to the shader it looks like a change in DPI which it already supports.
+ let dps = surface.device_pixel_scale.0 * root_scaling_factor;
+ let font_size = specified_font.size.to_f32_px();
+ let mut device_font_size = font_size * dps * raster_scale;
+
+ // Check there is a valid transform that doesn't exceed the font size limit.
+ // Ensure the font is supposed to be rasterized in screen-space.
+ // Only support transforms that can be coerced to simple 2D transforms.
+ // Add texture padding to the rasterized glyph buffer when one anticipates
+ // the glyph will need to be scaled when rendered.
+ let (use_subpixel_aa, transform_glyphs, texture_padding, oversized) = if raster_space != RasterSpace::Screen ||
+ transform.has_perspective_component() || !transform.has_2d_inverse()
+ {
+ (false, false, true, device_font_size > FONT_SIZE_LIMIT)
+ } else if transform.exceeds_2d_scale((FONT_SIZE_LIMIT / device_font_size) as f64) {
+ (false, false, true, true)
+ } else {
+ (true, !transform.is_simple_2d_translation(), false, false)
+ };
+
+ let font_transform = if transform_glyphs {
+ // Get the font transform matrix (skew / scale) from the complete transform.
+ // Fold in the device pixel scale.
+ self.raster_space = RasterSpace::Screen;
+ FontTransform::from(transform)
+ } else {
+ if oversized {
+ // Font sizes larger than the limit need to be scaled, thus can't use subpixels.
+ // In this case we adjust the font size and raster space to ensure
+ // we rasterize at the limit, to minimize the amount of scaling.
+ let limited_raster_scale = FONT_SIZE_LIMIT / (font_size * dps);
+ device_font_size = FONT_SIZE_LIMIT;
+
+ // Record the raster space the text needs to be snapped in. The original raster
+ // scale would have been too big.
+ self.raster_space = RasterSpace::Local(limited_raster_scale);
+ } else {
+ // Record the raster space the text needs to be snapped in. We may have changed
+ // from RasterSpace::Screen due to a transform with perspective or without a 2d
+ // inverse, or it may have been RasterSpace::Local all along.
+ self.raster_space = RasterSpace::Local(raster_scale);
+ }
+
+ // Rasterize the glyph without any transform
+ FontTransform::identity()
+ };
+
+ // TODO(aosmond): Snapping really ought to happen during scene building
+ // as much as possible. This will allow clips to be already adjusted
+ // based on the snapping requirements of the primitive. This may affect
+ // complex clips that create a different task, and when we rasterize
+ // glyphs without the transform (because the shader doesn't have the
+ // snap offsets to adjust its clip). These rects are fairly conservative
+ // to begin with and do not appear to be causing significant issues at
+ // this time.
+ self.snapped_reference_frame_relative_offset = if transform_glyphs {
+ // Don't touch the reference frame relative offset. We'll let the
+ // shader do the snapping in device pixels.
+ self.reference_frame_relative_offset
+ } else {
+ // There may be an animation, so snap the reference frame relative
+ // offset such that it excludes the impact, if any.
+ let snap_to_device = SpaceSnapper::new_with_target(
+ surface.raster_spatial_node_index,
+ spatial_node_index,
+ surface.device_pixel_scale,
+ spatial_tree,
+ );
+ snap_to_device.snap_point(&self.reference_frame_relative_offset.to_point()).to_vector()
+ };
+
+ let mut flags = specified_font.flags;
+ if transform_glyphs {
+ flags |= FontInstanceFlags::TRANSFORM_GLYPHS;
+ }
+ if texture_padding {
+ flags |= FontInstanceFlags::TEXTURE_PADDING;
+ }
+
+ // If the transform or device size is different, then the caller of
+ // this method needs to know to rebuild the glyphs.
+ let cache_dirty =
+ self.used_font.transform != font_transform ||
+ self.used_font.size != device_font_size.into() ||
+ self.used_font.flags != flags;
+
+ // Construct used font instance from the specified font instance
+ self.used_font = FontInstance {
+ transform: font_transform,
+ size: device_font_size.into(),
+ flags,
+ ..specified_font.clone()
+ };
+
+ // If subpixel AA is disabled due to the backing surface the glyphs
+ // are being drawn onto, disable it (unless we are using the
+ // specifial subpixel mode that estimates background color).
+ let mut allow_subpixel = match subpixel_mode {
+ SubpixelMode::Allow => true,
+ SubpixelMode::Deny => false,
+ SubpixelMode::Conditional { allowed_rect, excluded_rects } => {
+ // Conditional mode allows subpixel AA to be enabled for this
+ // text run, so long as it doesn't intersect with any of the
+ // cutout rectangles in the list, and it's inside the allowed rect.
+ allowed_rect.contains_rect(&prim_rect) &&
+ excluded_rects.iter().all(|rect| !rect.intersects(&prim_rect))
+ }
+ };
+
+ // If we are using special estimated background subpixel blending, then
+ // we can allow it regardless of what the surface says.
+ allow_subpixel |= self.used_font.bg_color.a != 0;
+
+ // If using local space glyphs, we don't want subpixel AA.
+ if !allow_subpixel || !use_subpixel_aa {
+ self.used_font.disable_subpixel_aa();
+
+ // Disable subpixel positioning for oversized glyphs to avoid
+ // thrashing the glyph cache with many subpixel variations of
+ // big glyph textures. A possible subpixel positioning error
+ // is small relative to the maximum font size and thus should
+ // not be very noticeable.
+ if oversized {
+ self.used_font.disable_subpixel_position();
+ }
+ }
+
+ cache_dirty
+ }
+
+ pub fn request_resources(
+ &mut self,
+ prim_offset: LayoutVector2D,
+ prim_rect: PictureRect,
+ specified_font: &FontInstance,
+ glyphs: &[GlyphInstance],
+ transform: &LayoutToWorldTransform,
+ surface: &SurfaceInfo,
+ spatial_node_index: SpatialNodeIndex,
+ raster_space: RasterSpace,
+ root_scaling_factor: f32,
+ subpixel_mode: &SubpixelMode,
+ resource_cache: &mut ResourceCache,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &mut RenderTaskGraph,
+ spatial_tree: &SpatialTree,
+ scratch: &mut PrimitiveScratchBuffer,
+ ) {
+ let cache_dirty = self.update_font_instance(
+ specified_font,
+ surface,
+ spatial_node_index,
+ transform,
+ subpixel_mode,
+ raster_space,
+ prim_rect,
+ root_scaling_factor,
+ spatial_tree,
+ );
+
+ if self.glyph_keys_range.is_empty() || cache_dirty {
+ let subpx_dir = self.used_font.get_subpx_dir();
+
+ let dps = surface.device_pixel_scale.0 * root_scaling_factor;
+ let transform = match self.raster_space {
+ RasterSpace::Local(scale) => FontTransform::new(scale * dps, 0.0, 0.0, scale * dps),
+ RasterSpace::Screen => self.used_font.transform.scale(dps),
+ };
+
+ self.glyph_keys_range = scratch.glyph_keys.extend(
+ glyphs.iter().map(|src| {
+ let src_point = src.point + prim_offset;
+ let device_offset = transform.transform(&src_point);
+ GlyphKey::new(src.index, device_offset, subpx_dir)
+ }));
+ }
+
+ resource_cache.request_glyphs(
+ self.used_font.clone(),
+ &scratch.glyph_keys[self.glyph_keys_range],
+ gpu_cache,
+ render_tasks,
+ );
+ }
+}
+
+/// These are linux only because FontInstancePlatformOptions varies in size by platform.
+#[test]
+#[cfg(target_os = "linux")]
+fn test_struct_sizes() {
+ use std::mem;
+ // The sizes of these structures are critical for performance on a number of
+ // talos stress tests. If you get a failure here on CI, there's two possibilities:
+ // (a) You made a structure smaller than it currently is. Great work! Update the
+ // test expectations and move on.
+ // (b) You made a structure larger. This is not necessarily a problem, but should only
+ // be done with care, and after checking if talos performance regresses badly.
+ assert_eq!(mem::size_of::<TextRun>(), 56, "TextRun size changed");
+ assert_eq!(mem::size_of::<TextRunTemplate>(), 80, "TextRunTemplate size changed");
+ assert_eq!(mem::size_of::<TextRunKey>(), 72, "TextRunKey size changed");
+ assert_eq!(mem::size_of::<TextRunPrimitive>(), 80, "TextRunPrimitive size changed");
+}
diff --git a/third_party/webrender/webrender/src/print_tree.rs b/third_party/webrender/webrender/src/print_tree.rs
new file mode 100644
index 00000000000..bfcb82fa2a5
--- /dev/null
+++ b/third_party/webrender/webrender/src/print_tree.rs
@@ -0,0 +1,105 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use std::io::{stdout, Stdout, Write};
+
+/// A struct that makes it easier to print out a pretty tree of data, which
+/// can be visually scanned more easily.
+pub struct PrintTree<W>
+where
+ W: Write
+{
+ /// The current level of recursion.
+ level: u32,
+
+ /// An item which is queued up, so that we can determine if we need
+ /// a mid-tree prefix or a branch ending prefix.
+ queued_item: Option<String>,
+
+ /// The sink to print to.
+ sink: W,
+}
+
+/// A trait that makes it easy to describe a pretty tree of data,
+/// regardless of the printing destination, to either print it
+/// directly to stdout, or serialize it as in the debugger
+pub trait PrintTreePrinter {
+ fn new_level(&mut self, title: String);
+ fn end_level(&mut self);
+ fn add_item(&mut self, text: String);
+}
+
+impl PrintTree<Stdout> {
+ pub fn new(title: &str) -> Self {
+ PrintTree::new_with_sink(title, stdout())
+ }
+}
+
+impl<W> PrintTree<W>
+where
+ W: Write
+{
+ pub fn new_with_sink(title: &str, mut sink: W) -> Self {
+ writeln!(sink, "\u{250c} {}", title).unwrap();
+ PrintTree {
+ level: 1,
+ queued_item: None,
+ sink,
+ }
+ }
+
+ fn print_level_prefix(&mut self) {
+ for _ in 0 .. self.level {
+ write!(self.sink, "\u{2502} ").unwrap();
+ }
+ }
+
+ fn flush_queued_item(&mut self, prefix: &str) {
+ if let Some(queued_item) = self.queued_item.take() {
+ self.print_level_prefix();
+ writeln!(self.sink, "{} {}", prefix, queued_item).unwrap();
+ }
+ }
+}
+
+// The default `println!` based printer
+impl<W> PrintTreePrinter for PrintTree<W>
+where
+ W: Write
+{
+ /// Descend one level in the tree with the given title.
+ fn new_level(&mut self, title: String) {
+ self.flush_queued_item("\u{251C}\u{2500}");
+
+ self.print_level_prefix();
+ writeln!(self.sink, "\u{251C}\u{2500} {}", title).unwrap();
+
+ self.level = self.level + 1;
+ }
+
+ /// Ascend one level in the tree.
+ fn end_level(&mut self) {
+ self.flush_queued_item("\u{2514}\u{2500}");
+ self.level = self.level - 1;
+ }
+
+ /// Add an item to the current level in the tree.
+ fn add_item(&mut self, text: String) {
+ self.flush_queued_item("\u{251C}\u{2500}");
+ self.queued_item = Some(text);
+ }
+}
+
+impl<W> Drop for PrintTree<W>
+where
+ W: Write
+{
+ fn drop(&mut self) {
+ self.flush_queued_item("\u{9492}\u{9472}");
+ }
+}
+
+pub trait PrintableTree {
+ fn print_with<T: PrintTreePrinter>(&self, pt: &mut T);
+}
diff --git a/third_party/webrender/webrender/src/profiler.rs b/third_party/webrender/webrender/src/profiler.rs
new file mode 100644
index 00000000000..cd4d6f5069c
--- /dev/null
+++ b/third_party/webrender/webrender/src/profiler.rs
@@ -0,0 +1,1901 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{ColorF, ColorU};
+use crate::debug_render::DebugRenderer;
+use crate::device::query::{GpuSampler, GpuTimer, NamedTag};
+use euclid::{Point2D, Rect, Size2D, vec2, default};
+use crate::internal_types::FastHashMap;
+use crate::renderer::{MAX_VERTEX_TEXTURE_WIDTH, wr_has_been_initialized};
+use std::collections::vec_deque::VecDeque;
+use std::{f32, mem};
+use std::ffi::CStr;
+use std::ops::Range;
+use std::time::Duration;
+use time::precise_time_ns;
+
+pub mod expected {
+ use std::ops::Range;
+ pub const AVG_BACKEND_CPU_TIME: Range<f64> = 0.0..3.0;
+ pub const MAX_BACKEND_CPU_TIME: Range<f64> = 0.0..6.0;
+ pub const AVG_RENDERER_CPU_TIME: Range<f64> = 0.0..5.0;
+ pub const MAX_RENDERER_CPU_TIME: Range<f64> = 0.0..10.0;
+ pub const AVG_IPC_TIME: Range<f64> = 0.0..2.0;
+ pub const MAX_IPC_TIME: Range<f64> = 0.0..4.0;
+ pub const AVG_GPU_TIME: Range<f64> = 0.0..8.0;
+ pub const MAX_GPU_TIME: Range<f64> = 0.0..15.0;
+ pub const DRAW_CALLS: Range<u64> = 1..100;
+ pub const VERTICES: Range<u64> = 10..25_000;
+ pub const TOTAL_PRIMITIVES: Range<u64> = 1..5000;
+ pub const VISIBLE_PRIMITIVES: Range<u64> = 1..5000;
+ pub const USED_TARGETS: Range<u64> = 1..4;
+ pub const COLOR_PASSES: Range<u64> = 1..4;
+ pub const ALPHA_PASSES: Range<u64> = 0..3;
+ pub const RENDERED_PICTURE_CACHE_TILES: Range<u64> = 0..5;
+ pub const TOTAL_PICTURE_CACHE_TILES: Range<u64> = 0..15;
+ pub const CREATED_TARGETS: Range<u64> = 0..3;
+ pub const CHANGED_TARGETS: Range<u64> = 0..3;
+ pub const TEXTURE_DATA_UPLOADED: Range<u64> = 0..10;
+ pub const GPU_CACHE_ROWS_TOTAL: Range<u64> = 1..50;
+ pub const GPU_CACHE_ROWS_UPDATED: Range<u64> = 0..25;
+ pub const GPU_CACHE_BLOCKS_TOTAL: Range<u64> = 1..65_000;
+ pub const GPU_CACHE_BLOCKS_UPDATED: Range<u64> = 0..1000;
+ pub const GPU_CACHE_BLOCKS_SAVED: Range<u64> = 0..50_000;
+ pub const DISPLAY_LIST_BUILD_TIME: Range<f64> = 0.0..3.0;
+ pub const MAX_SCENE_BUILD_TIME: Range<f64> = 0.0..3.0;
+ pub const DISPLAY_LIST_SEND_TIME: Range<f64> = 0.0..1.0;
+ pub const DISPLAY_LIST_TOTAL_TIME: Range<f64> = 0.0..4.0;
+ pub const NUM_FONT_TEMPLATES: Range<usize> = 0..50;
+ pub const FONT_TEMPLATES_MB: Range<f32> = 0.0..40.0;
+ pub const NUM_IMAGE_TEMPLATES: Range<usize> = 0..20;
+ pub const IMAGE_TEMPLATES_MB: Range<f32> = 0.0..10.0;
+ pub const DISPLAY_LIST_MB: Range<f32> = 0.0..0.2;
+ pub const NUM_RASTERIZED_BLOBS: Range<usize> = 0..25; // in tiles
+ pub const RASTERIZED_BLOBS_MB: Range<f32> = 0.0..4.0;
+}
+
+const GRAPH_WIDTH: f32 = 1024.0;
+const GRAPH_HEIGHT: f32 = 320.0;
+const GRAPH_PADDING: f32 = 8.0;
+const GRAPH_FRAME_HEIGHT: f32 = 16.0;
+const PROFILE_PADDING: f32 = 8.0;
+
+const ONE_SECOND_NS: u64 = 1000000000;
+const AVERAGE_OVER_NS: u64 = ONE_SECOND_NS / 2;
+
+#[derive(Copy, Clone, Debug, PartialEq)]
+pub enum ProfileStyle {
+ Full,
+ Compact,
+ Smart,
+}
+
+/// Defines the interface for hooking up an external profiler to WR.
+pub trait ProfilerHooks : Send + Sync {
+ /// Called at the beginning of a profile scope. The label must
+ /// be a C string (null terminated).
+ fn begin_marker(&self, label: &CStr);
+
+ /// Called at the end of a profile scope. The label must
+ /// be a C string (null terminated).
+ fn end_marker(&self, label: &CStr);
+
+ /// Called to mark an event happening. The label must
+ /// be a C string (null terminated).
+ fn event_marker(&self, label: &CStr);
+
+ /// Called with a duration to indicate a text marker that just ended. Text
+ /// markers allow different types of entries to be recorded on the same row
+ /// in the timeline, by adding labels to the entry.
+ ///
+ /// This variant is also useful when the caller only wants to record events
+ /// longer than a certain threshold, and thus they don't know in advance
+ /// whether the event will qualify.
+ fn add_text_marker(&self, label: &CStr, text: &str, duration: Duration);
+
+ /// Returns true if the current thread is being profiled.
+ fn thread_is_being_profiled(&self) -> bool;
+}
+
+/// The current global profiler callbacks, if set by embedder.
+pub static mut PROFILER_HOOKS: Option<&'static dyn ProfilerHooks> = None;
+
+/// Set the profiler callbacks, or None to disable the profiler.
+/// This function must only ever be called before any WR instances
+/// have been created, or the hooks will not be set.
+pub fn set_profiler_hooks(hooks: Option<&'static dyn ProfilerHooks>) {
+ if !wr_has_been_initialized() {
+ unsafe {
+ PROFILER_HOOKS = hooks;
+ }
+ }
+}
+
+/// A simple RAII style struct to manage a profile scope.
+pub struct ProfileScope {
+ name: &'static CStr,
+}
+
+/// Records a marker of the given duration that just ended.
+pub fn add_text_marker(label: &CStr, text: &str, duration: Duration) {
+ unsafe {
+ if let Some(ref hooks) = PROFILER_HOOKS {
+ hooks.add_text_marker(label, text, duration);
+ }
+ }
+}
+
+/// Records a marker of the given duration that just ended.
+pub fn add_event_marker(label: &CStr) {
+ unsafe {
+ if let Some(ref hooks) = PROFILER_HOOKS {
+ hooks.event_marker(label);
+ }
+ }
+}
+
+/// Returns true if the current thread is being profiled.
+pub fn thread_is_being_profiled() -> bool {
+ unsafe {
+ PROFILER_HOOKS.map_or(false, |h| h.thread_is_being_profiled())
+ }
+}
+
+impl ProfileScope {
+ /// Begin a new profile scope
+ pub fn new(name: &'static CStr) -> Self {
+ unsafe {
+ if let Some(ref hooks) = PROFILER_HOOKS {
+ hooks.begin_marker(name);
+ }
+ }
+
+ ProfileScope {
+ name,
+ }
+ }
+}
+
+impl Drop for ProfileScope {
+ fn drop(&mut self) {
+ unsafe {
+ if let Some(ref hooks) = PROFILER_HOOKS {
+ hooks.end_marker(self.name);
+ }
+ }
+ }
+}
+
+/// A helper macro to define profile scopes.
+macro_rules! profile_marker {
+ ($string:expr) => {
+ let _scope = $crate::profiler::ProfileScope::new(cstr!($string));
+ };
+}
+
+#[derive(Debug, Clone)]
+pub struct GpuProfileTag {
+ pub label: &'static str,
+ pub color: ColorF,
+}
+
+impl NamedTag for GpuProfileTag {
+ fn get_label(&self) -> &str {
+ self.label
+ }
+}
+
+trait ProfileCounter {
+ fn description(&self) -> &'static str;
+ fn value(&self) -> String;
+ fn is_expected(&self) -> bool;
+}
+
+#[derive(Clone)]
+pub struct IntProfileCounter {
+ description: &'static str,
+ value: usize,
+ expect: Option<Range<u64>>,
+}
+
+impl IntProfileCounter {
+ fn new(description: &'static str, expect: Option<Range<u64>>) -> Self {
+ IntProfileCounter {
+ description,
+ value: 0,
+ expect,
+ }
+ }
+
+ #[inline(always)]
+ pub fn inc(&mut self) {
+ self.value += 1;
+ }
+
+ pub fn set(&mut self, value: usize) {
+ self.value = value;
+ }
+}
+
+impl ProfileCounter for IntProfileCounter {
+ fn description(&self) -> &'static str {
+ self.description
+ }
+
+ fn value(&self) -> String {
+ format!("{}", self.value)
+ }
+
+ fn is_expected(&self) -> bool {
+ self.expect.as_ref().map(|range| range.contains(&(self.value as u64))).unwrap_or(true)
+ }
+}
+
+/// A profile counter recording average and maximum integer values over time slices
+/// of half a second.
+#[derive(Clone)]
+pub struct AverageIntProfileCounter {
+ description: &'static str,
+ /// Start of the current time slice.
+ start_ns: u64,
+ /// Sum of the values recorded during the current time slice.
+ sum: u64,
+ /// Number of samples in the current time slice.
+ num_samples: u64,
+ /// The max value in in-progress time slice.
+ next_max: u64,
+ /// The max value of the previous time slice (displayed).
+ max: u64,
+ /// The average value of the previous time slice (displayed).
+ avg: u64,
+ /// Intermediate accumulator for `add` and `inc`.
+ accum: u64,
+ /// Expected average range of values, if any.
+ expect_avg: Option<Range<u64>>,
+ /// Expected maximum range of values, if any.
+ expect_max: Option<Range<u64>>,
+}
+
+impl AverageIntProfileCounter {
+ pub fn new(
+ description: &'static str,
+ expect_avg: Option<Range<u64>>,
+ expect_max: Option<Range<u64>>,
+ ) -> Self {
+ AverageIntProfileCounter {
+ description,
+ start_ns: precise_time_ns(),
+ sum: 0,
+ num_samples: 0,
+ next_max: 0,
+ max: 0,
+ avg: 0,
+ accum: 0,
+ expect_avg,
+ expect_max,
+ }
+ }
+
+ pub fn reset(&mut self) {
+ if self.accum > 0 {
+ self.set_u64(self.accum);
+ self.accum = 0;
+ }
+ }
+
+ pub fn set(&mut self, val: usize) {
+ self.set_u64(val as u64);
+ }
+
+ pub fn set_u64(&mut self, val: u64) {
+ let now = precise_time_ns();
+ if (now - self.start_ns) > AVERAGE_OVER_NS && self.num_samples > 0 {
+ self.avg = self.sum / self.num_samples;
+ self.max = self.next_max;
+ self.start_ns = now;
+ self.sum = 0;
+ self.num_samples = 0;
+ self.next_max = 0;
+ }
+ self.next_max = self.next_max.max(val);
+ self.sum += val;
+ self.num_samples += 1;
+ self.accum = 0;
+ }
+
+ pub fn add(&mut self, val: usize) {
+ self.accum += val as u64;
+ }
+
+ pub fn inc(&mut self) {
+ self.accum += 1;
+ }
+
+ pub fn get_accum(&mut self) -> u64{
+ self.accum
+ }
+
+ /// Returns either the most up to date value if the counter is updated
+ /// with add add inc, or the average over the previous time slice.
+ pub fn get(&self) -> usize {
+ let result = if self.accum != 0 {
+ self.accum
+ } else {
+ self.avg
+ };
+
+ result as usize
+ }
+}
+
+impl ProfileCounter for AverageIntProfileCounter {
+ fn description(&self) -> &'static str {
+ self.description
+ }
+
+ fn value(&self) -> String {
+ format!("{:.2} (max {:.2})", self.avg, self.max)
+ }
+
+ fn is_expected(&self) -> bool {
+ self.expect_avg.as_ref().map(|range| range.contains(&self.avg)).unwrap_or(true)
+ && self.expect_max.as_ref().map(|range| range.contains(&self.max)).unwrap_or(true)
+ }
+}
+
+pub struct PercentageProfileCounter {
+ description: &'static str,
+ value: f32,
+}
+
+impl ProfileCounter for PercentageProfileCounter {
+ fn description(&self) -> &'static str {
+ self.description
+ }
+
+ fn value(&self) -> String {
+ format!("{:.2}%", self.value * 100.0)
+ }
+
+ fn is_expected(&self) -> bool { true }
+}
+
+#[derive(Clone)]
+pub struct ResourceProfileCounter {
+ description: &'static str,
+ value: usize,
+ // in bytes.
+ size: usize,
+ expected_count: Option<Range<usize>>,
+ // in MB
+ expected_size: Option<Range<f32>>,
+}
+
+impl ResourceProfileCounter {
+ fn new(
+ description: &'static str,
+ expected_count: Option<Range<usize>>,
+ expected_size: Option<Range<f32>>
+ ) -> Self {
+ ResourceProfileCounter {
+ description,
+ value: 0,
+ size: 0,
+ expected_count,
+ expected_size,
+ }
+ }
+
+ #[allow(dead_code)]
+ fn reset(&mut self) {
+ self.value = 0;
+ self.size = 0;
+ }
+
+ #[inline(always)]
+ pub fn inc(&mut self, size: usize) {
+ self.value += 1;
+ self.size += size;
+ }
+
+ pub fn set(&mut self, count: usize, size: usize) {
+ self.value = count;
+ self.size = size;
+ }
+
+ pub fn size_mb(&self) -> f32 {
+ self.size as f32 / (1024.0 * 1024.0)
+ }
+}
+
+impl ProfileCounter for ResourceProfileCounter {
+ fn description(&self) -> &'static str {
+ self.description
+ }
+
+ fn value(&self) -> String {
+ format!("{} ({:.2} MB)", self.value, self.size_mb())
+ }
+
+ fn is_expected(&self) -> bool {
+ self.expected_count.as_ref().map(|range| range.contains(&self.value)).unwrap_or(true)
+ && self.expected_size.as_ref().map(|range| range.contains(&self.size_mb())).unwrap_or(true)
+ }
+}
+
+#[derive(Clone)]
+pub struct TimeProfileCounter {
+ description: &'static str,
+ nanoseconds: u64,
+ invert: bool,
+ expect_ms: Option<Range<f64>>,
+}
+
+pub struct Timer<'a> {
+ start: u64,
+ result: &'a mut u64,
+}
+
+impl<'a> Drop for Timer<'a> {
+ fn drop(&mut self) {
+ let end = precise_time_ns();
+ *self.result += end - self.start;
+ }
+}
+
+impl TimeProfileCounter {
+ pub fn new(description: &'static str, invert: bool, expect_ms: Option<Range<f64>>) -> Self {
+ TimeProfileCounter {
+ description,
+ nanoseconds: 0,
+ invert,
+ expect_ms,
+ }
+ }
+
+ fn reset(&mut self) {
+ self.nanoseconds = 0;
+ }
+
+ #[allow(dead_code)]
+ pub fn set(&mut self, ns: u64) {
+ self.nanoseconds = ns;
+ }
+
+ pub fn profile<T, F>(&mut self, callback: F) -> T
+ where
+ F: FnOnce() -> T,
+ {
+ let t0 = precise_time_ns();
+ let val = callback();
+ let t1 = precise_time_ns();
+ let ns = t1 - t0;
+ self.nanoseconds += ns;
+ val
+ }
+
+ pub fn timer(&mut self) -> Timer {
+ Timer {
+ start: precise_time_ns(),
+ result: &mut self.nanoseconds,
+ }
+ }
+
+ pub fn inc(&mut self, ns: u64) {
+ self.nanoseconds += ns;
+ }
+
+ pub fn get(&self) -> u64 {
+ self.nanoseconds
+ }
+
+ pub fn get_ms(&self) -> f64 {
+ self.nanoseconds as f64 / 1000000.0
+ }
+}
+
+impl ProfileCounter for TimeProfileCounter {
+ fn description(&self) -> &'static str {
+ self.description
+ }
+
+ fn value(&self) -> String {
+ if self.invert {
+ format!("{:.2} fps", 1000000000.0 / self.nanoseconds as f64)
+ } else {
+ format!("{:.2} ms", self.get_ms())
+ }
+ }
+
+ fn is_expected(&self) -> bool {
+ self.expect_ms.as_ref()
+ .map(|range| range.contains(&(self.nanoseconds as f64 / 1000000.0)))
+ .unwrap_or(true)
+ }
+}
+
+#[derive(Clone)]
+pub struct AverageTimeProfileCounter {
+ counter: AverageIntProfileCounter,
+ invert: bool,
+}
+
+impl AverageTimeProfileCounter {
+ pub fn new(
+ description: &'static str,
+ invert: bool,
+ expect_avg: Option<Range<f64>>,
+ expect_max: Option<Range<f64>>,
+ ) -> Self {
+ let expect_avg_ns = expect_avg.map(
+ |range| (range.start * 1000000.0) as u64 .. (range.end * 1000000.0) as u64
+ );
+ let expect_max_ns = expect_max.map(
+ |range| (range.start * 1000000.0) as u64 .. (range.end * 1000000.0) as u64
+ );
+
+ AverageTimeProfileCounter {
+ counter: AverageIntProfileCounter::new(
+ description,
+ expect_avg_ns,
+ expect_max_ns,
+ ),
+ invert,
+ }
+ }
+
+ pub fn set(&mut self, ns: u64) {
+ self.counter.set_u64(ns);
+ }
+
+ #[allow(dead_code)]
+ pub fn profile<T, F>(&mut self, callback: F) -> T
+ where
+ F: FnOnce() -> T,
+ {
+ let t0 = precise_time_ns();
+ let val = callback();
+ let t1 = precise_time_ns();
+ self.counter.set_u64(t1 - t0);
+ val
+ }
+
+ pub fn avg_ms(&self) -> f64 { self.counter.avg as f64 / 1000000.0 }
+
+ pub fn max_ms(&self) -> f64 { self.counter.max as f64 / 1000000.0 }
+}
+
+impl ProfileCounter for AverageTimeProfileCounter {
+ fn description(&self) -> &'static str {
+ self.counter.description
+ }
+
+ fn value(&self) -> String {
+ if self.invert {
+ format!("{:.2} fps", 1000000000.0 / self.counter.avg as f64)
+ } else {
+ format!("{:.2} ms (max {:.2} ms)", self.avg_ms(), self.max_ms())
+ }
+ }
+
+ fn is_expected(&self) -> bool {
+ self.counter.is_expected()
+ }
+}
+
+
+#[derive(Clone)]
+pub struct FrameProfileCounters {
+ pub total_primitives: AverageIntProfileCounter,
+ pub visible_primitives: AverageIntProfileCounter,
+ pub targets_used: AverageIntProfileCounter,
+ pub targets_changed: AverageIntProfileCounter,
+ pub targets_created: AverageIntProfileCounter,
+}
+
+impl FrameProfileCounters {
+ pub fn new() -> Self {
+ FrameProfileCounters {
+ total_primitives: AverageIntProfileCounter::new(
+ "Total Primitives",
+ None, Some(expected::TOTAL_PRIMITIVES),
+ ),
+ visible_primitives: AverageIntProfileCounter::new(
+ "Visible Primitives",
+ None, Some(expected::VISIBLE_PRIMITIVES),
+ ),
+ targets_used: AverageIntProfileCounter::new(
+ "Used targets",
+ None, Some(expected::USED_TARGETS),
+ ),
+ targets_changed: AverageIntProfileCounter::new(
+ "Changed targets",
+ None, Some(expected::CHANGED_TARGETS),
+ ),
+ targets_created: AverageIntProfileCounter::new(
+ "Created targets",
+ None, Some(expected::CREATED_TARGETS),
+ ),
+ }
+ }
+
+ pub fn reset_targets(&mut self) {
+ self.targets_used.reset();
+ self.targets_changed.reset();
+ self.targets_created.reset();
+ }
+}
+
+#[derive(Clone)]
+pub struct TextureCacheProfileCounters {
+ pub pages_alpha8_linear: ResourceProfileCounter,
+ pub pages_alpha16_linear: ResourceProfileCounter,
+ pub pages_color8_linear: ResourceProfileCounter,
+ pub pages_color8_nearest: ResourceProfileCounter,
+ pub pages_picture: ResourceProfileCounter,
+ pub rasterized_blob_pixels: ResourceProfileCounter,
+ pub standalone_bytes: IntProfileCounter,
+ pub shared_bytes: IntProfileCounter,
+}
+
+impl TextureCacheProfileCounters {
+ pub fn new() -> Self {
+ TextureCacheProfileCounters {
+ pages_alpha8_linear: ResourceProfileCounter::new("Texture A8 cached pages", None, None),
+ pages_alpha16_linear: ResourceProfileCounter::new("Texture A16 cached pages", None, None),
+ pages_color8_linear: ResourceProfileCounter::new("Texture RGBA8 cached pages (L)", None, None),
+ pages_color8_nearest: ResourceProfileCounter::new("Texture RGBA8 cached pages (N)", None, None),
+ pages_picture: ResourceProfileCounter::new("Picture cached pages", None, None),
+ rasterized_blob_pixels: ResourceProfileCounter::new(
+ "Rasterized Blob Pixels",
+ Some(expected::NUM_RASTERIZED_BLOBS),
+ Some(expected::RASTERIZED_BLOBS_MB),
+ ),
+ standalone_bytes: IntProfileCounter::new("Standalone", None),
+ shared_bytes: IntProfileCounter::new("Shared", None),
+ }
+ }
+}
+
+#[derive(Clone)]
+pub struct GpuCacheProfileCounters {
+ pub allocated_rows: AverageIntProfileCounter,
+ pub allocated_blocks: AverageIntProfileCounter,
+ pub updated_rows: AverageIntProfileCounter,
+ pub updated_blocks: AverageIntProfileCounter,
+ pub saved_blocks: AverageIntProfileCounter,
+}
+
+impl GpuCacheProfileCounters {
+ pub fn new() -> Self {
+ GpuCacheProfileCounters {
+ allocated_rows: AverageIntProfileCounter::new(
+ "GPU cache rows: total",
+ None, Some(expected::GPU_CACHE_ROWS_TOTAL),
+ ),
+ updated_rows: AverageIntProfileCounter::new(
+ "GPU cache rows: updated",
+ None, Some(expected::GPU_CACHE_ROWS_UPDATED),
+ ),
+ allocated_blocks: AverageIntProfileCounter::new(
+ "GPU cache blocks: total",
+ None, Some(expected::GPU_CACHE_BLOCKS_TOTAL),
+ ),
+ updated_blocks: AverageIntProfileCounter::new(
+ "GPU cache blocks: updated",
+ None, Some(expected::GPU_CACHE_BLOCKS_UPDATED),
+ ),
+ saved_blocks: AverageIntProfileCounter::new(
+ "GPU cache blocks: saved",
+ None, Some(expected::GPU_CACHE_BLOCKS_SAVED),
+ ),
+ }
+ }
+}
+
+#[derive(Clone)]
+pub struct BackendProfileCounters {
+ pub total_time: TimeProfileCounter,
+ pub resources: ResourceProfileCounters,
+ pub txn: TransactionProfileCounters,
+ pub intern: InternProfileCounters,
+ pub scene_changed: bool,
+}
+
+#[derive(Clone)]
+pub struct ResourceProfileCounters {
+ pub font_templates: ResourceProfileCounter,
+ pub image_templates: ResourceProfileCounter,
+ pub texture_cache: TextureCacheProfileCounters,
+ pub gpu_cache: GpuCacheProfileCounters,
+ pub content_slices: IntProfileCounter,
+}
+
+#[derive(Clone)]
+pub struct TransactionProfileCounters {
+ pub display_list_build_time: TimeProfileCounter,
+ pub scene_build_time: TimeProfileCounter,
+ /// Time between when the display list is built and when it is sent by the API.
+ pub content_send_time: TimeProfileCounter,
+ /// Time between sending the SetDisplayList from the API and picking it up on
+ /// the render scene builder thread.
+ pub api_send_time: TimeProfileCounter,
+ /// Sum of content_send_time and api_send_time.
+ pub total_send_time: TimeProfileCounter,
+ pub display_lists: ResourceProfileCounter,
+}
+
+macro_rules! declare_intern_profile_counters {
+ ( $( $name:ident : $ty:ty, )+ ) => {
+ #[derive(Clone)]
+ pub struct InternProfileCounters {
+ $(
+ pub $name: ResourceProfileCounter,
+ )+
+ }
+
+ impl InternProfileCounters {
+ fn draw(
+ &self,
+ debug_renderer: &mut DebugRenderer,
+ draw_state: &mut DrawState,
+ ) {
+ Profiler::draw_counters(
+ &[
+ $(
+ &self.$name,
+ )+
+ ],
+ None,
+ debug_renderer,
+ false,
+ draw_state,
+ );
+ }
+ }
+ }
+}
+
+enumerate_interners!(declare_intern_profile_counters);
+
+impl TransactionProfileCounters {
+ pub fn set(
+ &mut self,
+ dl_build_start: u64,
+ dl_build_end: u64,
+ send_start: u64,
+ scene_build_start: u64,
+ scene_build_end: u64,
+ display_len: usize,
+ ) {
+ self.display_list_build_time.reset();
+ self.content_send_time.reset();
+ self.api_send_time.reset();
+ self.total_send_time.reset();
+ self.scene_build_time.reset();
+ self.display_lists.reset();
+
+ let dl_build_time = dl_build_end - dl_build_start;
+ let scene_build_time = scene_build_end - scene_build_start;
+ let content_send_time = send_start - dl_build_end;
+ let api_send_time = scene_build_start - send_start;
+ self.display_list_build_time.inc(dl_build_time);
+ self.scene_build_time.inc(scene_build_time);
+ self.content_send_time.inc(content_send_time);
+ self.api_send_time.inc(api_send_time);
+ self.total_send_time.inc(content_send_time + api_send_time);
+ self.display_lists.inc(display_len);
+ }
+}
+
+impl BackendProfileCounters {
+ pub fn new() -> Self {
+ BackendProfileCounters {
+ total_time: TimeProfileCounter::new(
+ "Backend CPU Time", false,
+ Some(expected::MAX_BACKEND_CPU_TIME),
+ ),
+ resources: ResourceProfileCounters {
+ font_templates: ResourceProfileCounter::new(
+ "Font Templates",
+ Some(expected::NUM_FONT_TEMPLATES),
+ Some(expected::FONT_TEMPLATES_MB),
+ ),
+ image_templates: ResourceProfileCounter::new(
+ "Image Templates",
+ Some(expected::NUM_IMAGE_TEMPLATES),
+ Some(expected::IMAGE_TEMPLATES_MB),
+ ),
+ content_slices: IntProfileCounter::new(
+ "Content Slices",
+ None,
+ ),
+ texture_cache: TextureCacheProfileCounters::new(),
+ gpu_cache: GpuCacheProfileCounters::new(),
+ },
+ txn: TransactionProfileCounters {
+ display_list_build_time: TimeProfileCounter::new(
+ "DisplayList Build Time", false,
+ Some(expected::DISPLAY_LIST_BUILD_TIME)
+ ),
+ scene_build_time: TimeProfileCounter::new(
+ "Scene build time", false,
+ Some(expected::MAX_SCENE_BUILD_TIME),
+ ),
+ content_send_time: TimeProfileCounter::new(
+ "Content Send Time", false,
+ Some(expected::DISPLAY_LIST_SEND_TIME),
+ ),
+ api_send_time: TimeProfileCounter::new(
+ "API Send Time", false,
+ Some(expected::DISPLAY_LIST_SEND_TIME),
+ ),
+ total_send_time: TimeProfileCounter::new(
+ "Total IPC Time", false,
+ Some(expected::DISPLAY_LIST_TOTAL_TIME),
+ ),
+ display_lists: ResourceProfileCounter::new(
+ "DisplayLists Sent",
+ None, Some(expected::DISPLAY_LIST_MB),
+ ),
+ },
+ //TODO: generate this by a macro
+ intern: InternProfileCounters {
+ prim: ResourceProfileCounter::new("Interned primitives", None, None),
+ conic_grad: ResourceProfileCounter::new("Interned conic gradients", None, None),
+ image: ResourceProfileCounter::new("Interned images", None, None),
+ image_border: ResourceProfileCounter::new("Interned image borders", None, None),
+ line_decoration: ResourceProfileCounter::new("Interned line decorations", None, None),
+ linear_grad: ResourceProfileCounter::new("Interned linear gradients", None, None),
+ normal_border: ResourceProfileCounter::new("Interned normal borders", None, None),
+ picture: ResourceProfileCounter::new("Interned pictures", None, None),
+ radial_grad: ResourceProfileCounter::new("Interned radial gradients", None, None),
+ text_run: ResourceProfileCounter::new("Interned text runs", None, None),
+ yuv_image: ResourceProfileCounter::new("Interned YUV images", None, None),
+ clip: ResourceProfileCounter::new("Interned clips", None, None),
+ filter_data: ResourceProfileCounter::new("Interned filter data", None, None),
+ backdrop: ResourceProfileCounter::new("Interned backdrops", None, None),
+ },
+ scene_changed: false,
+ }
+ }
+
+ pub fn reset(&mut self) {
+ self.total_time.reset();
+ self.resources.texture_cache.rasterized_blob_pixels.reset();
+ self.scene_changed = false;
+ }
+}
+
+pub struct RendererProfileCounters {
+ pub frame_counter: IntProfileCounter,
+ pub frame_time: AverageTimeProfileCounter,
+ pub draw_calls: AverageIntProfileCounter,
+ pub vertices: AverageIntProfileCounter,
+ pub vao_count_and_size: ResourceProfileCounter,
+ pub color_passes: AverageIntProfileCounter,
+ pub alpha_passes: AverageIntProfileCounter,
+ pub texture_data_uploaded: AverageIntProfileCounter,
+ pub rendered_picture_cache_tiles: AverageIntProfileCounter,
+ pub total_picture_cache_tiles: AverageIntProfileCounter,
+}
+
+pub struct RendererProfileTimers {
+ pub cpu_time: TimeProfileCounter,
+ pub gpu_graph: TimeProfileCounter,
+ pub gpu_samples: Vec<GpuTimer<GpuProfileTag>>,
+}
+
+impl RendererProfileCounters {
+ pub fn new() -> Self {
+ RendererProfileCounters {
+ frame_counter: IntProfileCounter::new("Frame", None),
+ frame_time: AverageTimeProfileCounter::new(
+ "FPS", true, None, None,
+ ),
+ draw_calls: AverageIntProfileCounter::new(
+ "Draw Calls",
+ None, Some(expected::DRAW_CALLS),
+ ),
+ vertices: AverageIntProfileCounter::new(
+ "Vertices",
+ None, Some(expected::VERTICES),
+ ),
+ vao_count_and_size: ResourceProfileCounter::new("VAO", None, None),
+ color_passes: AverageIntProfileCounter::new(
+ "Color passes",
+ None, Some(expected::COLOR_PASSES),
+ ),
+ alpha_passes: AverageIntProfileCounter::new(
+ "Alpha passes",
+ None, Some(expected::ALPHA_PASSES),
+ ),
+ texture_data_uploaded: AverageIntProfileCounter::new(
+ "Texture data, kb",
+ None, Some(expected::TEXTURE_DATA_UPLOADED),
+ ),
+ rendered_picture_cache_tiles: AverageIntProfileCounter::new(
+ "Rendered tiles",
+ None, Some(expected::RENDERED_PICTURE_CACHE_TILES),
+ ),
+ total_picture_cache_tiles: AverageIntProfileCounter::new(
+ "Total tiles",
+ None, Some(expected::TOTAL_PICTURE_CACHE_TILES),
+ ),
+ }
+ }
+
+ pub fn reset(&mut self) {
+ self.draw_calls.reset();
+ self.vertices.reset();
+ self.color_passes.reset();
+ self.alpha_passes.reset();
+ self.texture_data_uploaded.reset();
+ self.rendered_picture_cache_tiles.reset();
+ self.total_picture_cache_tiles.reset();
+ }
+}
+
+impl RendererProfileTimers {
+ pub fn new() -> Self {
+ RendererProfileTimers {
+ cpu_time: TimeProfileCounter::new("Renderer CPU Time", false, None),
+ gpu_samples: Vec::new(),
+ gpu_graph: TimeProfileCounter::new("GPU Time", false, None),
+ }
+ }
+}
+
+struct GraphStats {
+ min_value: f32,
+ mean_value: f32,
+ max_value: f32,
+}
+
+struct ProfileGraph {
+ max_samples: usize,
+ scale: f32,
+ values: VecDeque<f32>,
+ short_description: &'static str,
+ unit_description: &'static str,
+}
+
+impl ProfileGraph {
+ fn new(
+ max_samples: usize,
+ scale: f32,
+ short_description: &'static str,
+ unit_description: &'static str,
+ ) -> Self {
+ ProfileGraph {
+ max_samples,
+ scale,
+ values: VecDeque::new(),
+ short_description,
+ unit_description,
+ }
+ }
+
+ fn push(&mut self, ns: u64) {
+ let val = ns as f64 * self.scale as f64;
+ if self.values.len() == self.max_samples {
+ self.values.pop_back();
+ }
+ self.values.push_front(val as f32);
+ }
+
+ fn stats(&self) -> GraphStats {
+ let mut stats = GraphStats {
+ min_value: f32::MAX,
+ mean_value: 0.0,
+ max_value: -f32::MAX,
+ };
+
+ for value in &self.values {
+ stats.min_value = stats.min_value.min(*value);
+ stats.mean_value += *value;
+ stats.max_value = stats.max_value.max(*value);
+ }
+
+ if !self.values.is_empty() {
+ stats.mean_value /= self.values.len() as f32;
+ }
+
+ stats
+ }
+
+ fn draw_graph(
+ &self,
+ x: f32,
+ y: f32,
+ description: &'static str,
+ debug_renderer: &mut DebugRenderer,
+ ) -> default::Rect<f32> {
+ let size = Size2D::new(600.0, 100.0);
+ let line_height = debug_renderer.line_height();
+ let graph_rect = Rect::new(Point2D::new(x, y), size);
+ let mut rect = graph_rect.inflate(10.0, 10.0);
+
+ let stats = self.stats();
+
+ let text_color = ColorU::new(255, 255, 0, 255);
+ let text_origin = rect.origin + vec2(rect.size.width, 20.0);
+ debug_renderer.add_text(
+ text_origin.x,
+ text_origin.y,
+ description,
+ ColorU::new(0, 255, 0, 255),
+ None,
+ );
+ debug_renderer.add_text(
+ text_origin.x,
+ text_origin.y + line_height,
+ &format!("Min: {:.2} {}", stats.min_value, self.unit_description),
+ text_color,
+ None,
+ );
+ debug_renderer.add_text(
+ text_origin.x,
+ text_origin.y + line_height * 2.0,
+ &format!("Mean: {:.2} {}", stats.mean_value, self.unit_description),
+ text_color,
+ None,
+ );
+ debug_renderer.add_text(
+ text_origin.x,
+ text_origin.y + line_height * 3.0,
+ &format!("Max: {:.2} {}", stats.max_value, self.unit_description),
+ text_color,
+ None,
+ );
+
+ rect.size.width += 140.0;
+ debug_renderer.add_quad(
+ rect.origin.x,
+ rect.origin.y,
+ rect.origin.x + rect.size.width + 10.0,
+ rect.origin.y + rect.size.height,
+ ColorU::new(25, 25, 25, 200),
+ ColorU::new(51, 51, 51, 200),
+ );
+
+ let bx1 = graph_rect.max_x();
+ let by1 = graph_rect.max_y();
+
+ let w = graph_rect.size.width / self.max_samples as f32;
+ let h = graph_rect.size.height;
+
+ let color_t0 = ColorU::new(0, 255, 0, 255);
+ let color_b0 = ColorU::new(0, 180, 0, 255);
+
+ let color_t1 = ColorU::new(0, 255, 0, 255);
+ let color_b1 = ColorU::new(0, 180, 0, 255);
+
+ let color_t2 = ColorU::new(255, 0, 0, 255);
+ let color_b2 = ColorU::new(180, 0, 0, 255);
+
+ for (index, sample) in self.values.iter().enumerate() {
+ let sample = *sample;
+ let x1 = bx1 - index as f32 * w;
+ let x0 = x1 - w;
+
+ let y0 = by1 - (sample / stats.max_value) as f32 * h;
+ let y1 = by1;
+
+ let (color_top, color_bottom) = if sample < 1000.0 / 60.0 {
+ (color_t0, color_b0)
+ } else if sample < 1000.0 / 30.0 {
+ (color_t1, color_b1)
+ } else {
+ (color_t2, color_b2)
+ };
+
+ debug_renderer.add_quad(x0, y0, x1, y1, color_top, color_bottom);
+ }
+
+ rect
+ }
+}
+
+impl ProfileCounter for ProfileGraph {
+ fn description(&self) -> &'static str {
+ self.short_description
+ }
+
+ fn value(&self) -> String {
+ format!("{:.2}ms", self.stats().mean_value)
+ }
+
+ fn is_expected(&self) -> bool { true }
+}
+
+struct GpuFrame {
+ total_time: u64,
+ samples: Vec<GpuTimer<GpuProfileTag>>,
+}
+
+struct GpuFrameCollection {
+ frames: VecDeque<GpuFrame>,
+}
+
+impl GpuFrameCollection {
+ fn new() -> Self {
+ GpuFrameCollection {
+ frames: VecDeque::new(),
+ }
+ }
+
+ fn push(&mut self, total_time: u64, samples: Vec<GpuTimer<GpuProfileTag>>) {
+ if self.frames.len() == 20 {
+ self.frames.pop_back();
+ }
+ self.frames.push_front(GpuFrame {
+ total_time,
+ samples,
+ });
+ }
+}
+
+impl GpuFrameCollection {
+ fn draw(&self, x: f32, y: f32, debug_renderer: &mut DebugRenderer) -> default::Rect<f32> {
+ let graph_rect = Rect::new(
+ Point2D::new(x, y),
+ Size2D::new(GRAPH_WIDTH, GRAPH_HEIGHT),
+ );
+ let bounding_rect = graph_rect.inflate(GRAPH_PADDING, GRAPH_PADDING);
+
+ debug_renderer.add_quad(
+ bounding_rect.origin.x,
+ bounding_rect.origin.y,
+ bounding_rect.origin.x + bounding_rect.size.width,
+ bounding_rect.origin.y + bounding_rect.size.height,
+ ColorU::new(25, 25, 25, 200),
+ ColorU::new(51, 51, 51, 200),
+ );
+
+ let w = graph_rect.size.width;
+ let mut y0 = graph_rect.origin.y;
+
+ let max_time = self.frames
+ .iter()
+ .max_by_key(|f| f.total_time)
+ .unwrap()
+ .total_time as f32;
+
+ let mut tags_present = FastHashMap::default();
+
+ for frame in &self.frames {
+ let y1 = y0 + GRAPH_FRAME_HEIGHT;
+
+ let mut current_ns = 0;
+ for sample in &frame.samples {
+ let x0 = graph_rect.origin.x + w * current_ns as f32 / max_time;
+ current_ns += sample.time_ns;
+ let x1 = graph_rect.origin.x + w * current_ns as f32 / max_time;
+ let mut bottom_color = sample.tag.color;
+ bottom_color.a *= 0.5;
+
+ debug_renderer.add_quad(
+ x0,
+ y0,
+ x1,
+ y1,
+ sample.tag.color.into(),
+ bottom_color.into(),
+ );
+
+ tags_present.insert(sample.tag.label, sample.tag.color);
+ }
+
+ y0 = y1;
+ }
+
+ // Add a legend to see which color correspond to what primitive.
+ const LEGEND_SIZE: f32 = 20.0;
+ const PADDED_LEGEND_SIZE: f32 = 25.0;
+ if !tags_present.is_empty() {
+ debug_renderer.add_quad(
+ bounding_rect.max_x() + GRAPH_PADDING,
+ bounding_rect.origin.y,
+ bounding_rect.max_x() + GRAPH_PADDING + 200.0,
+ bounding_rect.origin.y + tags_present.len() as f32 * PADDED_LEGEND_SIZE + GRAPH_PADDING,
+ ColorU::new(25, 25, 25, 200),
+ ColorU::new(51, 51, 51, 200),
+ );
+ }
+
+ for (i, (label, &color)) in tags_present.iter().enumerate() {
+ let x0 = bounding_rect.origin.x + bounding_rect.size.width + GRAPH_PADDING * 2.0;
+ let y0 = bounding_rect.origin.y + GRAPH_PADDING + i as f32 * PADDED_LEGEND_SIZE;
+
+ debug_renderer.add_quad(
+ x0, y0, x0 + LEGEND_SIZE, y0 + LEGEND_SIZE,
+ color.into(),
+ color.into(),
+ );
+
+ debug_renderer.add_text(
+ x0 + PADDED_LEGEND_SIZE,
+ y0 + LEGEND_SIZE * 0.75,
+ label,
+ ColorU::new(255, 255, 0, 255),
+ None,
+ );
+ }
+
+ bounding_rect
+ }
+}
+
+struct DrawState {
+ x_left: f32,
+ y_left: f32,
+ x_right: f32,
+ y_right: f32,
+}
+
+pub struct Profiler {
+ draw_state: DrawState,
+ backend_graph: ProfileGraph,
+ renderer_graph: ProfileGraph,
+ gpu_graph: ProfileGraph,
+ ipc_graph: ProfileGraph,
+ display_list_build_graph: ProfileGraph,
+ scene_build_graph: ProfileGraph,
+ blob_raster_graph: ProfileGraph,
+ backend_time: AverageTimeProfileCounter,
+ renderer_time: AverageTimeProfileCounter,
+ gpu_time: AverageTimeProfileCounter,
+ ipc_time: AverageTimeProfileCounter,
+ gpu_frames: GpuFrameCollection,
+ cooldowns: Vec<i32>,
+}
+
+impl Profiler {
+ pub fn new() -> Self {
+ let to_ms_scale = 1.0 / 1000000.0;
+ Profiler {
+ draw_state: DrawState {
+ x_left: 0.0,
+ y_left: 0.0,
+ x_right: 0.0,
+ y_right: 0.0,
+ },
+ backend_graph: ProfileGraph::new(600, to_ms_scale, "Backend:", "ms"),
+ renderer_graph: ProfileGraph::new(600, to_ms_scale, "Renderer:", "ms"),
+ gpu_graph: ProfileGraph::new(600, to_ms_scale, "GPU:", "ms"),
+ ipc_graph: ProfileGraph::new(600, to_ms_scale, "IPC:", "ms"),
+ display_list_build_graph: ProfileGraph::new(600, to_ms_scale, "DisplayList build", "ms"),
+ scene_build_graph: ProfileGraph::new(600, to_ms_scale, "Scene build:", "ms"),
+ blob_raster_graph: ProfileGraph::new(600, 1.0, "Rasterized blob pixels:", "px"),
+ gpu_frames: GpuFrameCollection::new(),
+ backend_time: AverageTimeProfileCounter::new(
+ "Backend:", false,
+ Some(expected::AVG_BACKEND_CPU_TIME),
+ Some(expected::MAX_BACKEND_CPU_TIME),
+ ),
+ renderer_time: AverageTimeProfileCounter::new(
+ "Renderer:", false,
+ Some(expected::AVG_RENDERER_CPU_TIME),
+ Some(expected::MAX_RENDERER_CPU_TIME),
+ ),
+ ipc_time: AverageTimeProfileCounter::new(
+ "IPC:", false,
+ Some(expected::AVG_IPC_TIME),
+ Some(expected::MAX_IPC_TIME),
+ ),
+ gpu_time: AverageTimeProfileCounter::new(
+ "GPU:", false,
+ Some(expected::AVG_GPU_TIME),
+ Some(expected::MAX_GPU_TIME),
+ ),
+ cooldowns: Vec::new(),
+ }
+ }
+
+ // If we have an array of "cooldown" counters, then only display profiles that
+ // are out of the ordinary and keep displaying them until the cooldown is over.
+ fn draw_counters<T: ProfileCounter + ?Sized>(
+ counters: &[&T],
+ mut cooldowns: Option<&mut [i32]>,
+ debug_renderer: &mut DebugRenderer,
+ left: bool,
+ draw_state: &mut DrawState,
+ ) {
+ let mut label_rect = Rect::zero();
+ let mut value_rect = Rect::zero();
+ let (mut current_x, mut current_y) = if left {
+ (draw_state.x_left, draw_state.y_left)
+ } else {
+ (draw_state.x_right, draw_state.y_right)
+ };
+ let mut color_index = 0;
+ let line_height = debug_renderer.line_height();
+
+ let colors = [
+ // Regular values,
+ ColorU::new(255, 255, 255, 255),
+ ColorU::new(255, 255, 0, 255),
+ // Unexpected values,
+ ColorU::new(255, 80, 0, 255),
+ ColorU::new(255, 0, 0, 255),
+ ];
+
+ for (idx, counter) in counters.iter().enumerate() {
+ if let Some(cooldowns) = cooldowns.as_mut() {
+ if !counter.is_expected() {
+ cooldowns[idx] = 40;
+ }
+ if cooldowns[idx] == 0 {
+ continue;
+ }
+ }
+ let rect = debug_renderer.add_text(
+ current_x,
+ current_y,
+ counter.description(),
+ colors[color_index],
+ None,
+ );
+ color_index = (color_index + 1) % 2;
+
+ label_rect = label_rect.union(&rect);
+ current_y += line_height;
+ }
+
+ color_index = 0;
+ current_x = label_rect.origin.x + label_rect.size.width + 60.0;
+ current_y = if left { draw_state.y_left } else { draw_state.y_right };
+
+ for (idx, counter) in counters.iter().enumerate() {
+ let expected_offset = if counter.is_expected() || cooldowns.is_some() { 0 } else { 2 };
+ if let Some(cooldowns) = cooldowns.as_mut() {
+ if cooldowns[idx] > 0 {
+ cooldowns[idx] -= 1;
+ } else {
+ continue;
+ }
+ }
+ let rect = debug_renderer.add_text(
+ current_x,
+ current_y,
+ &counter.value(),
+ colors[color_index + expected_offset],
+ None,
+ );
+ color_index = (color_index + 1) % 2;
+
+ value_rect = value_rect.union(&rect);
+ current_y += line_height;
+ }
+
+ let total_rect = label_rect.union(&value_rect).inflate(10.0, 10.0);
+ debug_renderer.add_quad(
+ total_rect.origin.x,
+ total_rect.origin.y,
+ total_rect.origin.x + total_rect.size.width,
+ total_rect.origin.y + total_rect.size.height,
+ ColorF::new(0.1, 0.1, 0.1, 0.8).into(),
+ ColorF::new(0.2, 0.2, 0.2, 0.8).into(),
+ );
+ let new_y = total_rect.origin.y + total_rect.size.height + 30.0;
+ if left {
+ draw_state.y_left = new_y;
+ } else {
+ draw_state.y_right = new_y;
+ }
+ }
+
+ fn draw_bar(
+ &mut self,
+ label: &str,
+ label_color: ColorU,
+ counters: &[(ColorU, &AverageIntProfileCounter)],
+ debug_renderer: &mut DebugRenderer,
+ ) -> default::Rect<f32> {
+ let mut rect = debug_renderer.add_text(
+ self.draw_state.x_left,
+ self.draw_state.y_left,
+ label,
+ label_color,
+ None,
+ );
+
+ let x_base = rect.origin.x + rect.size.width + 10.0;
+ let height = debug_renderer.line_height();
+ let width = (self.draw_state.x_right - 30.0 - x_base).max(0.0);
+ let total_value = counters.last().unwrap().1.get();
+ let scale = width / total_value as f32;
+ let mut x_current = x_base;
+
+ for &(color, counter) in counters {
+ let x_stop = x_base + counter.get() as f32 * scale;
+ debug_renderer.add_quad(
+ x_current,
+ rect.origin.y,
+ x_stop,
+ rect.origin.y + height,
+ color,
+ color,
+ );
+ x_current = x_stop;
+ }
+
+ self.draw_state.y_left += height;
+
+ rect.size.width += width + 10.0;
+ rect
+ }
+
+ fn draw_gpu_cache_bars(
+ &mut self,
+ counters: &GpuCacheProfileCounters,
+ debug_renderer: &mut DebugRenderer,
+ ) {
+ let color_updated = ColorU::new(0xFF, 0, 0, 0xFF);
+ let color_free = ColorU::new(0, 0, 0xFF, 0xFF);
+ let color_saved = ColorU::new(0, 0xFF, 0, 0xFF);
+
+ let mut requested_blocks = AverageIntProfileCounter::new("", None, None);
+ requested_blocks.set(counters.updated_blocks.get() + counters.saved_blocks.get());
+
+ let mut total_blocks = AverageIntProfileCounter::new("", None, None);
+ total_blocks.set(counters.allocated_rows.get() * MAX_VERTEX_TEXTURE_WIDTH);
+
+ let rect0 = self.draw_bar(
+ &format!("GPU cache rows ({}):", counters.allocated_rows.get()),
+ ColorU::new(0xFF, 0xFF, 0xFF, 0xFF),
+ &[
+ (color_updated, &counters.updated_rows),
+ (color_free, &counters.allocated_rows),
+ ],
+ debug_renderer,
+ );
+
+ let rect1 = self.draw_bar(
+ "GPU cache blocks",
+ ColorU::new(0xFF, 0xFF, 0, 0xFF),
+ &[
+ (color_updated, &counters.updated_blocks),
+ (color_saved, &requested_blocks),
+ (color_free, &counters.allocated_blocks),
+ (ColorU::new(0, 0, 0, 0xFF), &total_blocks),
+ ],
+ debug_renderer,
+ );
+
+ let total_rect = rect0.union(&rect1).inflate(10.0, 10.0);
+ debug_renderer.add_quad(
+ total_rect.origin.x,
+ total_rect.origin.y,
+ total_rect.origin.x + total_rect.size.width,
+ total_rect.origin.y + total_rect.size.height,
+ ColorF::new(0.1, 0.1, 0.1, 0.8).into(),
+ ColorF::new(0.2, 0.2, 0.2, 0.8).into(),
+ );
+
+ self.draw_state.y_left = total_rect.origin.y + total_rect.size.height + 30.0;
+ }
+
+ fn draw_frame_bars(
+ &mut self,
+ counters: &FrameProfileCounters,
+ debug_renderer: &mut DebugRenderer,
+ ) {
+ let rect0 = self.draw_bar(
+ &format!("primitives ({}):", counters.total_primitives.get()),
+ ColorU::new(0xFF, 0xFF, 0xFF, 0xFF),
+ &[
+ (ColorU::new(0, 0, 0xFF, 0xFF), &counters.visible_primitives),
+ (ColorU::new(0, 0, 0, 0xFF), &counters.total_primitives),
+ ],
+ debug_renderer,
+ );
+
+ let rect1 = self.draw_bar(
+ &format!("GPU targets ({}):", &counters.targets_used.get()),
+ ColorU::new(0xFF, 0xFF, 0, 0xFF),
+ &[
+ (ColorU::new(0, 0, 0xFF, 0xFF), &counters.targets_created),
+ (ColorU::new(0xFF, 0, 0, 0xFF), &counters.targets_changed),
+ (ColorU::new(0, 0xFF, 0, 0xFF), &counters.targets_used),
+ ],
+ debug_renderer,
+ );
+
+ let total_rect = rect0.union(&rect1).inflate(10.0, 10.0);
+ debug_renderer.add_quad(
+ total_rect.origin.x,
+ total_rect.origin.y,
+ total_rect.origin.x + total_rect.size.width,
+ total_rect.origin.y + total_rect.size.height,
+ ColorF::new(0.1, 0.1, 0.1, 0.8).into(),
+ ColorF::new(0.2, 0.2, 0.2, 0.8).into(),
+ );
+
+ self.draw_state.y_left = total_rect.origin.y + total_rect.size.height + 30.0;
+ }
+
+ fn draw_compact_profile(
+ &mut self,
+ backend_profile: &BackendProfileCounters,
+ renderer_profile: &RendererProfileCounters,
+ debug_renderer: &mut DebugRenderer,
+ ) {
+ Profiler::draw_counters(
+ &[
+ &renderer_profile.frame_time as &dyn ProfileCounter,
+ &renderer_profile.color_passes,
+ &renderer_profile.alpha_passes,
+ &renderer_profile.draw_calls,
+ &renderer_profile.vertices,
+ &renderer_profile.rendered_picture_cache_tiles,
+ &renderer_profile.texture_data_uploaded,
+ &backend_profile.resources.content_slices,
+ &self.ipc_time,
+ &self.backend_time,
+ &self.renderer_time,
+ &self.gpu_time,
+ ],
+ None,
+ debug_renderer,
+ true,
+ &mut self.draw_state,
+ );
+ }
+
+ fn draw_full_profile(
+ &mut self,
+ frame_profiles: &[FrameProfileCounters],
+ backend_profile: &BackendProfileCounters,
+ renderer_profile: &RendererProfileCounters,
+ renderer_timers: &mut RendererProfileTimers,
+ gpu_samplers: &[GpuSampler<GpuProfileTag>],
+ screen_fraction: f32,
+ debug_renderer: &mut DebugRenderer,
+ ) {
+ Profiler::draw_counters(
+ &[
+ &renderer_profile.frame_time as &dyn ProfileCounter,
+ &renderer_profile.frame_counter,
+ &renderer_profile.color_passes,
+ &renderer_profile.alpha_passes,
+ &renderer_profile.rendered_picture_cache_tiles,
+ &renderer_profile.total_picture_cache_tiles,
+ &renderer_profile.texture_data_uploaded,
+ &backend_profile.resources.content_slices,
+ &backend_profile.resources.texture_cache.shared_bytes,
+ &backend_profile.resources.texture_cache.standalone_bytes,
+ ],
+ None,
+ debug_renderer,
+ true,
+ &mut self.draw_state
+ );
+
+ self.draw_gpu_cache_bars(
+ &backend_profile.resources.gpu_cache,
+ debug_renderer,
+ );
+
+ Profiler::draw_counters(
+ &[
+ &backend_profile.resources.font_templates,
+ &backend_profile.resources.image_templates,
+ ],
+ None,
+ debug_renderer,
+ true,
+ &mut self.draw_state
+ );
+
+ backend_profile.intern.draw(debug_renderer, &mut self.draw_state);
+
+ Profiler::draw_counters(
+ &[
+ &backend_profile.resources.texture_cache.pages_alpha8_linear,
+ &backend_profile.resources.texture_cache.pages_color8_linear,
+ &backend_profile.resources.texture_cache.pages_color8_nearest,
+ &backend_profile.txn.display_lists,
+ ],
+ None,
+ debug_renderer,
+ true,
+ &mut self.draw_state
+ );
+
+ Profiler::draw_counters(
+ &[
+ &backend_profile.txn.display_list_build_time,
+ &backend_profile.txn.scene_build_time,
+ &backend_profile.txn.content_send_time,
+ &backend_profile.txn.api_send_time,
+ &backend_profile.txn.total_send_time,
+ ],
+ None,
+ debug_renderer,
+ true,
+ &mut self.draw_state
+ );
+
+ for frame_profile in frame_profiles {
+ self.draw_frame_bars(frame_profile, debug_renderer);
+ }
+
+ Profiler::draw_counters(
+ &[&renderer_profile.draw_calls, &renderer_profile.vertices],
+ None,
+ debug_renderer,
+ true,
+ &mut self.draw_state
+ );
+
+ Profiler::draw_counters(
+ &[
+ &backend_profile.total_time,
+ &renderer_timers.cpu_time,
+ &renderer_timers.gpu_graph,
+ ],
+ None,
+ debug_renderer,
+ false,
+ &mut self.draw_state
+ );
+
+ if !gpu_samplers.is_empty() {
+ let mut samplers = Vec::<PercentageProfileCounter>::new();
+ // Gathering unique GPU samplers. This has O(N^2) complexity,
+ // but we only have a few samplers per target.
+ let mut total = 0.0;
+ for sampler in gpu_samplers {
+ let value = sampler.count as f32 * screen_fraction;
+ total += value;
+ match samplers.iter().position(|s| {
+ s.description as *const _ == sampler.tag.label as *const _
+ }) {
+ Some(pos) => samplers[pos].value += value,
+ None => samplers.push(PercentageProfileCounter {
+ description: sampler.tag.label,
+ value,
+ }),
+ }
+ }
+ samplers.push(PercentageProfileCounter {
+ description: "Total",
+ value: total,
+ });
+ let samplers: Vec<&dyn ProfileCounter> = samplers.iter().map(|sampler| {
+ sampler as &dyn ProfileCounter
+ }).collect();
+ Profiler::draw_counters(
+ &samplers,
+ None,
+ debug_renderer,
+ false,
+ &mut self.draw_state,
+ );
+ }
+
+ let rect =
+ self.backend_graph
+ .draw_graph(self.draw_state.x_right, self.draw_state.y_right, "CPU (backend)", debug_renderer);
+ self.draw_state.y_right += rect.size.height + PROFILE_PADDING;
+ let rect = self.renderer_graph.draw_graph(
+ self.draw_state.x_right,
+ self.draw_state.y_right,
+ "CPU (renderer)",
+ debug_renderer,
+ );
+ self.draw_state.y_right += rect.size.height + PROFILE_PADDING;
+ let rect =
+ self.ipc_graph
+ .draw_graph(self.draw_state.x_right, self.draw_state.y_right, "DisplayList IPC", debug_renderer);
+ self.draw_state.y_right += rect.size.height + PROFILE_PADDING;
+
+ let rect = self.display_list_build_graph
+ .draw_graph(self.draw_state.x_right, self.draw_state.y_right, "DisplayList build", debug_renderer);
+ self.draw_state.y_right += rect.size.height + PROFILE_PADDING;
+
+ let rect = self.scene_build_graph
+ .draw_graph(self.draw_state.x_right, self.draw_state.y_right, "Scene build", debug_renderer);
+ self.draw_state.y_right += rect.size.height + PROFILE_PADDING;
+
+ let rect = self.gpu_graph
+ .draw_graph(self.draw_state.x_right, self.draw_state.y_right, "GPU", debug_renderer);
+ self.draw_state.y_right += rect.size.height + PROFILE_PADDING;
+
+ let rect = self.blob_raster_graph
+ .draw_graph(self.draw_state.x_right, self.draw_state.y_right, "Blob pixels", debug_renderer);
+ self.draw_state.y_right += rect.size.height + PROFILE_PADDING;
+
+ let rect = self.gpu_frames
+ .draw(self.draw_state.x_left, f32::max(self.draw_state.y_left, self.draw_state.y_right), debug_renderer);
+ self.draw_state.y_right += rect.size.height + PROFILE_PADDING;
+ }
+
+ fn draw_smart_profile(
+ &mut self,
+ backend_profile: &BackendProfileCounters,
+ renderer_profile: &RendererProfileCounters,
+ debug_renderer: &mut DebugRenderer,
+ ) {
+ while self.cooldowns.len() < 18 {
+ self.cooldowns.push(0);
+ }
+
+ // Always show the fps counter.
+ Profiler::draw_counters(
+ &[
+ &renderer_profile.frame_time,
+ ],
+ None,
+ debug_renderer,
+ true,
+ &mut self.draw_state,
+ );
+
+ let mut start = 0;
+ let counters: &[&[&dyn ProfileCounter]] = &[
+ &[
+ &self.backend_time,
+ &self.renderer_time,
+ &self.gpu_time,
+ ],
+ &[
+ &renderer_profile.color_passes,
+ &renderer_profile.alpha_passes,
+ &renderer_profile.draw_calls,
+ &renderer_profile.vertices,
+ &renderer_profile.rendered_picture_cache_tiles,
+ &renderer_profile.total_picture_cache_tiles,
+ ],
+ &[
+ &backend_profile.resources.gpu_cache.allocated_rows,
+ &backend_profile.resources.gpu_cache.updated_rows,
+ &backend_profile.resources.gpu_cache.allocated_blocks,
+ &backend_profile.resources.gpu_cache.updated_blocks,
+ &backend_profile.resources.gpu_cache.saved_blocks,
+ ],
+ &[
+ &backend_profile.resources.image_templates,
+ &backend_profile.resources.font_templates,
+ &backend_profile.resources.texture_cache.rasterized_blob_pixels,
+ &backend_profile.txn.display_lists,
+ ],
+ ];
+
+ for group in counters {
+ let end = start + group.len();
+ Profiler::draw_counters(
+ &group[..],
+ Some(&mut self.cooldowns[start..end]),
+ debug_renderer,
+ true,
+ &mut self.draw_state,
+ );
+ start = end;
+ }
+ }
+
+ pub fn draw_profile(
+ &mut self,
+ frame_profiles: &[FrameProfileCounters],
+ backend_profile: &BackendProfileCounters,
+ renderer_profile: &RendererProfileCounters,
+ renderer_timers: &mut RendererProfileTimers,
+ gpu_samplers: &[GpuSampler<GpuProfileTag>],
+ screen_fraction: f32,
+ debug_renderer: &mut DebugRenderer,
+ style: ProfileStyle,
+ ) {
+ self.draw_state.x_left = 20.0;
+ self.draw_state.y_left = 50.0;
+ self.draw_state.x_right = 450.0;
+ self.draw_state.y_right = 40.0;
+
+ let mut gpu_graph = 0;
+ let gpu_graphrs = mem::replace(&mut renderer_timers.gpu_samples, Vec::new());
+ for sample in &gpu_graphrs {
+ gpu_graph += sample.time_ns;
+ }
+ renderer_timers.gpu_graph.set(gpu_graph);
+
+ self.backend_graph
+ .push(backend_profile.total_time.nanoseconds);
+ self.backend_time.set(backend_profile.total_time.nanoseconds);
+ self.renderer_graph
+ .push(renderer_timers.cpu_time.nanoseconds);
+ self.renderer_time.set(renderer_timers.cpu_time.nanoseconds);
+ self.ipc_graph
+ .push(backend_profile.txn.total_send_time.nanoseconds);
+ self.display_list_build_graph
+ .push(backend_profile.txn.display_list_build_time.nanoseconds);
+ self.scene_build_graph
+ .push(backend_profile.txn.scene_build_time.nanoseconds);
+ self.blob_raster_graph
+ .push(backend_profile.resources.texture_cache.rasterized_blob_pixels.size as u64);
+ self.ipc_time.set(backend_profile.txn.total_send_time.nanoseconds);
+ self.gpu_graph.push(gpu_graph);
+ self.gpu_time.set(gpu_graph);
+ self.gpu_frames.push(gpu_graph, gpu_graphrs);
+
+ match style {
+ ProfileStyle::Full => {
+ self.draw_full_profile(
+ frame_profiles,
+ backend_profile,
+ renderer_profile,
+ renderer_timers,
+ gpu_samplers,
+ screen_fraction,
+ debug_renderer,
+ );
+ }
+ ProfileStyle::Compact => {
+ self.draw_compact_profile(
+ backend_profile,
+ renderer_profile,
+ debug_renderer,
+ );
+ }
+ ProfileStyle::Smart => {
+ self.draw_smart_profile(
+ backend_profile,
+ renderer_profile,
+ debug_renderer,
+ );
+ }
+ }
+ }
+}
+
+pub struct ChangeIndicator {
+ counter: u32,
+}
+
+impl ChangeIndicator {
+ pub fn new() -> Self {
+ ChangeIndicator {
+ counter: 0
+ }
+ }
+
+ pub fn changed(&mut self) {
+ self.counter = (self.counter + 1) % 15;
+ }
+
+ const WIDTH : f32 = 20.0;
+ const HEIGHT: f32 = 10.0;
+
+ pub fn width() -> f32 {
+ ChangeIndicator::WIDTH * 16.0
+ }
+
+ pub fn draw(
+ &self,
+ x: f32, y: f32,
+ color: ColorU,
+ debug_renderer: &mut DebugRenderer
+ ) {
+ let margin = 0.0;
+ let tx = self.counter as f32 * ChangeIndicator::WIDTH;
+ debug_renderer.add_quad(
+ x - margin,
+ y - margin,
+ x + 15.0 * ChangeIndicator::WIDTH + margin,
+ y + ChangeIndicator::HEIGHT + margin,
+ ColorU::new(0, 0, 0, 150),
+ ColorU::new(0, 0, 0, 150),
+ );
+
+ debug_renderer.add_quad(
+ x + tx,
+ y,
+ x + tx + ChangeIndicator::WIDTH,
+ y + ChangeIndicator::HEIGHT,
+ color,
+ ColorU::new(25, 25, 25, 255),
+ );
+ }
+}
diff --git a/third_party/webrender/webrender/src/render_backend.rs b/third_party/webrender/webrender/src/render_backend.rs
new file mode 100644
index 00000000000..e22596a1bab
--- /dev/null
+++ b/third_party/webrender/webrender/src/render_backend.rs
@@ -0,0 +1,2009 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! The high-level module responsible for managing the pipeline and preparing
+//! commands to be issued by the `Renderer`.
+//!
+//! See the comment at the top of the `renderer` module for a description of
+//! how these two pieces interact.
+
+use api::{ApiMsg, ClearCache, DebugCommand, DebugFlags, BlobImageHandler};
+use api::{DocumentId, DocumentLayer, ExternalScrollId, FrameMsg, HitTestFlags, HitTestResult};
+use api::{IdNamespace, MemoryReport, PipelineId, RenderNotifier, ScrollClamping};
+use api::{ScrollLocation, TransactionMsg, ResourceUpdate};
+use api::{NotificationRequest, Checkpoint, QualitySettings};
+use api::{ClipIntern, FilterDataIntern, PrimitiveKeyKind};
+use api::units::*;
+#[cfg(any(feature = "capture", feature = "replay"))]
+use api::CaptureBits;
+#[cfg(feature = "replay")]
+use api::CapturedDocument;
+use crate::spatial_tree::SpatialNodeIndex;
+#[cfg(any(feature = "capture", feature = "replay"))]
+use crate::capture::CaptureConfig;
+use crate::composite::{CompositorKind, CompositeDescriptor};
+#[cfg(feature = "debugger")]
+use crate::debug_server;
+use crate::frame_builder::{FrameBuilder, FrameBuilderConfig};
+use crate::glyph_rasterizer::{FontInstance};
+use crate::gpu_cache::GpuCache;
+use crate::hit_test::{HitTest, HitTester, SharedHitTester};
+use crate::intern::DataStore;
+use crate::internal_types::{DebugOutput, FastHashMap, RenderedDocument, ResultMsg};
+use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
+use crate::picture::{RetainedTiles, TileCacheLogger};
+use crate::prim_store::{PrimitiveScratchBuffer, PrimitiveInstance};
+use crate::prim_store::{PrimitiveInstanceKind, PrimTemplateCommonData, PrimitiveStore};
+use crate::prim_store::interned::*;
+use crate::profiler::{BackendProfileCounters, ResourceProfileCounters};
+use crate::render_task_graph::RenderTaskGraphCounters;
+use crate::renderer::{AsyncPropertySampler, PipelineInfo};
+use crate::resource_cache::ResourceCache;
+#[cfg(feature = "replay")]
+use crate::resource_cache::PlainCacheOwn;
+#[cfg(feature = "replay")]
+use crate::resource_cache::PlainResources;
+#[cfg(feature = "replay")]
+use crate::scene::Scene;
+use crate::scene::{BuiltScene, SceneProperties};
+use crate::scene_builder_thread::*;
+#[cfg(feature = "serialize")]
+use serde::{Serialize, Deserialize};
+#[cfg(feature = "debugger")]
+use serde_json;
+#[cfg(feature = "replay")]
+use std::collections::hash_map::Entry::{Occupied, Vacant};
+use std::sync::Arc;
+use std::sync::atomic::{AtomicUsize, Ordering};
+use std::sync::mpsc::{channel, Sender, Receiver};
+use std::time::{UNIX_EPOCH, SystemTime};
+use std::u32;
+#[cfg(feature = "capture")]
+use std::path::PathBuf;
+#[cfg(feature = "replay")]
+use crate::frame_builder::Frame;
+use time::precise_time_ns;
+use crate::util::{Recycler, VecHelper, drain_filter};
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Copy, Clone)]
+pub struct DocumentView {
+ scene: SceneView,
+ frame: FrameView,
+}
+
+/// Some rendering parameters applying at the scene level.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Copy, Clone)]
+pub struct SceneView {
+ pub device_rect: DeviceIntRect,
+ pub layer: DocumentLayer,
+ pub device_pixel_ratio: f32,
+ pub page_zoom_factor: f32,
+ pub quality_settings: QualitySettings,
+}
+
+impl SceneView {
+ pub fn accumulated_scale_factor_for_snapping(&self) -> DevicePixelScale {
+ DevicePixelScale::new(
+ self.device_pixel_ratio *
+ self.page_zoom_factor
+ )
+ }
+}
+
+/// Some rendering parameters applying at the frame level.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Copy, Clone)]
+pub struct FrameView {
+ pan: DeviceIntPoint,
+ pinch_zoom_factor: f32,
+}
+
+impl DocumentView {
+ pub fn accumulated_scale_factor(&self) -> DevicePixelScale {
+ DevicePixelScale::new(
+ self.scene.device_pixel_ratio *
+ self.scene.page_zoom_factor *
+ self.frame.pinch_zoom_factor
+ )
+ }
+}
+
+#[derive(Copy, Clone, Hash, MallocSizeOf, PartialEq, PartialOrd, Debug, Eq, Ord)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct FrameId(usize);
+
+impl FrameId {
+ /// Returns a FrameId corresponding to the first frame.
+ ///
+ /// Note that we use 0 as the internal id here because the current code
+ /// increments the frame id at the beginning of the frame, rather than
+ /// at the end, and we want the first frame to be 1. It would probably
+ /// be sensible to move the advance() call to after frame-building, and
+ /// then make this method return FrameId(1).
+ pub fn first() -> Self {
+ FrameId(0)
+ }
+
+ /// Returns the backing usize for this FrameId.
+ pub fn as_usize(&self) -> usize {
+ self.0
+ }
+
+ /// Advances this FrameId to the next frame.
+ pub fn advance(&mut self) {
+ self.0 += 1;
+ }
+
+ /// An invalid sentinel FrameId, which will always compare less than
+ /// any valid FrameId.
+ pub const INVALID: FrameId = FrameId(0);
+}
+
+impl Default for FrameId {
+ fn default() -> Self {
+ FrameId::INVALID
+ }
+}
+
+impl ::std::ops::Add<usize> for FrameId {
+ type Output = Self;
+ fn add(self, other: usize) -> FrameId {
+ FrameId(self.0 + other)
+ }
+}
+
+impl ::std::ops::Sub<usize> for FrameId {
+ type Output = Self;
+ fn sub(self, other: usize) -> FrameId {
+ assert!(self.0 >= other, "Underflow subtracting FrameIds");
+ FrameId(self.0 - other)
+ }
+}
+
+enum RenderBackendStatus {
+ Continue,
+ ShutDown(Option<Sender<()>>),
+}
+
+/// Identifier to track a sequence of frames.
+///
+/// This is effectively a `FrameId` with a ridealong timestamp corresponding
+/// to when advance() was called, which allows for more nuanced cache eviction
+/// decisions. As such, we use the `FrameId` for equality and comparison, since
+/// we should never have two `FrameStamps` with the same id but different
+/// timestamps.
+#[derive(Copy, Clone, Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct FrameStamp {
+ id: FrameId,
+ time: SystemTime,
+ document_id: DocumentId,
+}
+
+impl Eq for FrameStamp {}
+
+impl PartialEq for FrameStamp {
+ fn eq(&self, other: &Self) -> bool {
+ // We should not be checking equality unless the documents are the same
+ debug_assert!(self.document_id == other.document_id);
+ self.id == other.id
+ }
+}
+
+impl PartialOrd for FrameStamp {
+ fn partial_cmp(&self, other: &Self) -> Option<::std::cmp::Ordering> {
+ self.id.partial_cmp(&other.id)
+ }
+}
+
+impl FrameStamp {
+ /// Gets the FrameId in this stamp.
+ pub fn frame_id(&self) -> FrameId {
+ self.id
+ }
+
+ /// Gets the time associated with this FrameStamp.
+ pub fn time(&self) -> SystemTime {
+ self.time
+ }
+
+ /// Gets the DocumentId in this stamp.
+ pub fn document_id(&self) -> DocumentId {
+ self.document_id
+ }
+
+ pub fn is_valid(&self) -> bool {
+ // If any fields are their default values, the whole struct should equal INVALID
+ debug_assert!((self.time != UNIX_EPOCH && self.id != FrameId(0) && self.document_id != DocumentId::INVALID) ||
+ *self == Self::INVALID);
+ self.document_id != DocumentId::INVALID
+ }
+
+ /// Returns a FrameStamp corresponding to the first frame.
+ pub fn first(document_id: DocumentId) -> Self {
+ FrameStamp {
+ id: FrameId::first(),
+ time: SystemTime::now(),
+ document_id,
+ }
+ }
+
+ /// Advances to a new frame.
+ pub fn advance(&mut self) {
+ self.id.advance();
+ self.time = SystemTime::now();
+ }
+
+ /// An invalid sentinel FrameStamp.
+ pub const INVALID: FrameStamp = FrameStamp {
+ id: FrameId(0),
+ time: UNIX_EPOCH,
+ document_id: DocumentId::INVALID,
+ };
+}
+
+macro_rules! declare_data_stores {
+ ( $( $name:ident : $ty:ty, )+ ) => {
+ /// A collection of resources that are shared by clips, primitives
+ /// between display lists.
+ #[cfg_attr(feature = "capture", derive(Serialize))]
+ #[cfg_attr(feature = "replay", derive(Deserialize))]
+ #[derive(Default)]
+ pub struct DataStores {
+ $(
+ pub $name: DataStore<$ty>,
+ )+
+ }
+
+ impl DataStores {
+ /// Reports CPU heap usage.
+ fn report_memory(&self, ops: &mut MallocSizeOfOps, r: &mut MemoryReport) {
+ $(
+ r.interning.data_stores.$name += self.$name.size_of(ops);
+ )+
+ }
+
+ fn apply_updates(
+ &mut self,
+ updates: InternerUpdates,
+ profile_counters: &mut BackendProfileCounters,
+ ) {
+ $(
+ self.$name.apply_updates(
+ updates.$name,
+ &mut profile_counters.intern.$name,
+ );
+ )+
+ }
+ }
+ }
+}
+
+enumerate_interners!(declare_data_stores);
+
+impl DataStores {
+ /// Returns the local rect for a primitive. For most primitives, this is
+ /// stored in the template. For pictures, this is stored inside the picture
+ /// primitive instance itself, since this is determined during frame building.
+ pub fn get_local_prim_rect(
+ &self,
+ prim_instance: &PrimitiveInstance,
+ prim_store: &PrimitiveStore,
+ ) -> LayoutRect {
+ match prim_instance.kind {
+ PrimitiveInstanceKind::Picture { pic_index, .. } => {
+ let pic = &prim_store.pictures[pic_index.0];
+ pic.precise_local_rect
+ }
+ _ => {
+ self.as_common_data(prim_instance).prim_rect
+ }
+ }
+ }
+
+ /// Returns true if this primitive might need repition.
+ // TODO(gw): This seems like the wrong place for this - maybe this flag should
+ // not be in the common prim template data?
+ pub fn prim_may_need_repetition(
+ &self,
+ prim_instance: &PrimitiveInstance,
+ ) -> bool {
+ match prim_instance.kind {
+ PrimitiveInstanceKind::Picture { .. } => {
+ false
+ }
+ _ => {
+ self.as_common_data(prim_instance).may_need_repetition
+ }
+ }
+ }
+
+ pub fn as_common_data(
+ &self,
+ prim_inst: &PrimitiveInstance
+ ) -> &PrimTemplateCommonData {
+ match prim_inst.kind {
+ PrimitiveInstanceKind::Rectangle { data_handle, .. } |
+ PrimitiveInstanceKind::Clear { data_handle, .. } => {
+ let prim_data = &self.prim[data_handle];
+ &prim_data.common
+ }
+ PrimitiveInstanceKind::Image { data_handle, .. } => {
+ let prim_data = &self.image[data_handle];
+ &prim_data.common
+ }
+ PrimitiveInstanceKind::ImageBorder { data_handle, .. } => {
+ let prim_data = &self.image_border[data_handle];
+ &prim_data.common
+ }
+ PrimitiveInstanceKind::LineDecoration { data_handle, .. } => {
+ let prim_data = &self.line_decoration[data_handle];
+ &prim_data.common
+ }
+ PrimitiveInstanceKind::LinearGradient { data_handle, .. } => {
+ let prim_data = &self.linear_grad[data_handle];
+ &prim_data.common
+ }
+ PrimitiveInstanceKind::NormalBorder { data_handle, .. } => {
+ let prim_data = &self.normal_border[data_handle];
+ &prim_data.common
+ }
+ PrimitiveInstanceKind::Picture { .. } => {
+ panic!("BUG: picture prims don't have common data!");
+ }
+ PrimitiveInstanceKind::RadialGradient { data_handle, .. } => {
+ let prim_data = &self.radial_grad[data_handle];
+ &prim_data.common
+ }
+ PrimitiveInstanceKind::ConicGradient { data_handle, .. } => {
+ let prim_data = &self.conic_grad[data_handle];
+ &prim_data.common
+ }
+ PrimitiveInstanceKind::TextRun { data_handle, .. } => {
+ let prim_data = &self.text_run[data_handle];
+ &prim_data.common
+ }
+ PrimitiveInstanceKind::YuvImage { data_handle, .. } => {
+ let prim_data = &self.yuv_image[data_handle];
+ &prim_data.common
+ }
+ PrimitiveInstanceKind::Backdrop { data_handle, .. } => {
+ let prim_data = &self.backdrop[data_handle];
+ &prim_data.common
+ }
+ }
+ }
+}
+
+struct Document {
+ /// The id of this document
+ id: DocumentId,
+
+ /// Temporary list of removed pipelines received from the scene builder
+ /// thread and forwarded to the renderer.
+ removed_pipelines: Vec<(PipelineId, DocumentId)>,
+
+ view: DocumentView,
+
+ /// The id and time of the current frame.
+ stamp: FrameStamp,
+
+ /// The latest built scene, usable to build frames.
+ /// received from the scene builder thread.
+ scene: BuiltScene,
+
+ /// The builder object that prodces frames, kept around to preserve some retained state.
+ frame_builder: FrameBuilder,
+
+ /// A data structure to allow hit testing against rendered frames. This is updated
+ /// every time we produce a fully rendered frame.
+ hit_tester: Option<Arc<HitTester>>,
+ /// To avoid synchronous messaging we update a shared hit-tester that other threads
+ /// can query.
+ shared_hit_tester: Arc<SharedHitTester>,
+
+ /// Properties that are resolved during frame building and can be changed at any time
+ /// without requiring the scene to be re-built.
+ dynamic_properties: SceneProperties,
+
+ /// Track whether the last built frame is up to date or if it will need to be re-built
+ /// before rendering again.
+ frame_is_valid: bool,
+ hit_tester_is_valid: bool,
+ rendered_frame_is_valid: bool,
+ /// We track this information to be able to display debugging information from the
+ /// renderer.
+ has_built_scene: bool,
+
+ data_stores: DataStores,
+
+ /// Contains various vecs of data that is used only during frame building,
+ /// where we want to recycle the memory each new display list, to avoid constantly
+ /// re-allocating and moving memory around.
+ scratch: PrimitiveScratchBuffer,
+ /// Keep track of the size of render task graph to pre-allocate memory up-front
+ /// the next frame.
+ render_task_counters: RenderTaskGraphCounters,
+
+ #[cfg(feature = "replay")]
+ loaded_scene: Scene,
+
+ /// Tracks the state of the picture cache tiles that were composited on the previous frame.
+ prev_composite_descriptor: CompositeDescriptor,
+}
+
+impl Document {
+ pub fn new(
+ id: DocumentId,
+ size: DeviceIntSize,
+ layer: DocumentLayer,
+ default_device_pixel_ratio: f32,
+ ) -> Self {
+ Document {
+ id,
+ removed_pipelines: Vec::new(),
+ view: DocumentView {
+ scene: SceneView {
+ device_rect: size.into(),
+ layer,
+ page_zoom_factor: 1.0,
+ device_pixel_ratio: default_device_pixel_ratio,
+ quality_settings: QualitySettings::default(),
+ },
+ frame: FrameView {
+ pan: DeviceIntPoint::new(0, 0),
+ pinch_zoom_factor: 1.0,
+ },
+ },
+ stamp: FrameStamp::first(id),
+ scene: BuiltScene::empty(),
+ frame_builder: FrameBuilder::new(),
+ hit_tester: None,
+ shared_hit_tester: Arc::new(SharedHitTester::new()),
+ dynamic_properties: SceneProperties::new(),
+ frame_is_valid: false,
+ hit_tester_is_valid: false,
+ rendered_frame_is_valid: false,
+ has_built_scene: false,
+ data_stores: DataStores::default(),
+ scratch: PrimitiveScratchBuffer::new(),
+ render_task_counters: RenderTaskGraphCounters::new(),
+ #[cfg(feature = "replay")]
+ loaded_scene: Scene::new(),
+ prev_composite_descriptor: CompositeDescriptor::empty(),
+ }
+ }
+
+ fn can_render(&self) -> bool {
+ self.scene.has_root_pipeline
+ }
+
+ fn has_pixels(&self) -> bool {
+ !self.view.scene.device_rect.size.is_empty()
+ }
+
+ fn process_frame_msg(
+ &mut self,
+ message: FrameMsg,
+ ) -> DocumentOps {
+ match message {
+ FrameMsg::UpdateEpoch(pipeline_id, epoch) => {
+ self.scene.pipeline_epochs.insert(pipeline_id, epoch);
+ }
+ FrameMsg::Scroll(delta, cursor) => {
+ profile_scope!("Scroll");
+
+ let node_index = match self.hit_tester {
+ Some(ref hit_tester) => {
+ // Ideally we would call self.scroll_nearest_scrolling_ancestor here, but
+ // we need have to avoid a double-borrow.
+ let test = HitTest::new(None, cursor, HitTestFlags::empty());
+ hit_tester.find_node_under_point(test)
+ }
+ None => {
+ None
+ }
+ };
+
+ if self.hit_tester.is_some()
+ && self.scroll_nearest_scrolling_ancestor(delta, node_index) {
+ self.hit_tester_is_valid = false;
+ self.frame_is_valid = false;
+ }
+
+ return DocumentOps {
+ // TODO: Does it make sense to track this as a scrolling even if we
+ // ended up not scrolling anything?
+ scroll: true,
+ ..DocumentOps::nop()
+ };
+ }
+ FrameMsg::HitTest(pipeline_id, point, flags, tx) => {
+ if !self.hit_tester_is_valid {
+ self.rebuild_hit_tester();
+ }
+
+ let result = match self.hit_tester {
+ Some(ref hit_tester) => {
+ hit_tester.hit_test(HitTest::new(pipeline_id, point, flags))
+ }
+ None => HitTestResult { items: Vec::new() },
+ };
+
+ tx.send(result).unwrap();
+ }
+ FrameMsg::RequestHitTester(tx) => {
+ tx.send(self.shared_hit_tester.clone()).unwrap();
+ }
+ FrameMsg::SetPan(pan) => {
+ if self.view.frame.pan != pan {
+ self.view.frame.pan = pan;
+ self.hit_tester_is_valid = false;
+ self.frame_is_valid = false;
+ }
+ }
+ FrameMsg::ScrollNodeWithId(origin, id, clamp) => {
+ profile_scope!("ScrollNodeWithScrollId");
+
+ if self.scroll_node(origin, id, clamp) {
+ self.hit_tester_is_valid = false;
+ self.frame_is_valid = false;
+ }
+
+ return DocumentOps {
+ scroll: true,
+ ..DocumentOps::nop()
+ };
+ }
+ FrameMsg::GetScrollNodeState(tx) => {
+ profile_scope!("GetScrollNodeState");
+ tx.send(self.scene.spatial_tree.get_scroll_node_state()).unwrap();
+ }
+ FrameMsg::UpdateDynamicProperties(property_bindings) => {
+ self.dynamic_properties.set_properties(property_bindings);
+ }
+ FrameMsg::AppendDynamicTransformProperties(property_bindings) => {
+ self.dynamic_properties.add_transforms(property_bindings);
+ }
+ FrameMsg::SetPinchZoom(factor) => {
+ if self.view.frame.pinch_zoom_factor != factor.get() {
+ self.view.frame.pinch_zoom_factor = factor.get();
+ self.frame_is_valid = false;
+ }
+ }
+ FrameMsg::SetIsTransformAsyncZooming(is_zooming, animation_id) => {
+ let node = self.scene.spatial_tree.spatial_nodes.iter_mut()
+ .find(|node| node.is_transform_bound_to_property(animation_id));
+ if let Some(node) = node {
+ if node.is_async_zooming != is_zooming {
+ node.is_async_zooming = is_zooming;
+ self.frame_is_valid = false;
+ }
+ }
+ }
+ }
+
+ DocumentOps::nop()
+ }
+
+ fn build_frame(
+ &mut self,
+ resource_cache: &mut ResourceCache,
+ gpu_cache: &mut GpuCache,
+ resource_profile: &mut ResourceProfileCounters,
+ debug_flags: DebugFlags,
+ tile_cache_logger: &mut TileCacheLogger,
+ ) -> RenderedDocument {
+ let accumulated_scale_factor = self.view.accumulated_scale_factor();
+ let pan = self.view.frame.pan.to_f32() / accumulated_scale_factor;
+
+ // Advance to the next frame.
+ self.stamp.advance();
+
+ assert!(self.stamp.frame_id() != FrameId::INVALID,
+ "First frame increment must happen before build_frame()");
+
+ let frame = {
+ let frame = self.frame_builder.build(
+ &mut self.scene,
+ resource_cache,
+ gpu_cache,
+ self.stamp,
+ accumulated_scale_factor,
+ self.view.scene.layer,
+ self.view.scene.device_rect.origin,
+ pan,
+ resource_profile,
+ &self.dynamic_properties,
+ &mut self.data_stores,
+ &mut self.scratch,
+ &mut self.render_task_counters,
+ debug_flags,
+ tile_cache_logger,
+ );
+
+ frame
+ };
+
+ self.frame_is_valid = true;
+
+ let is_new_scene = self.has_built_scene;
+ self.has_built_scene = false;
+
+ RenderedDocument {
+ frame,
+ is_new_scene,
+ }
+ }
+
+ fn rebuild_hit_tester(&mut self) {
+ let accumulated_scale_factor = self.view.accumulated_scale_factor();
+ let pan = self.view.frame.pan.to_f32() / accumulated_scale_factor;
+
+ self.scene.spatial_tree.update_tree(
+ pan,
+ accumulated_scale_factor,
+ &self.dynamic_properties,
+ );
+
+ let hit_tester = Arc::new(self.scene.create_hit_tester(&self.data_stores.clip));
+ self.hit_tester = Some(Arc::clone(&hit_tester));
+ self.shared_hit_tester.update(hit_tester);
+ self.hit_tester_is_valid = true;
+ }
+
+ pub fn updated_pipeline_info(&mut self) -> PipelineInfo {
+ let removed_pipelines = self.removed_pipelines.take_and_preallocate();
+ PipelineInfo {
+ epochs: self.scene.pipeline_epochs.iter()
+ .map(|(&pipeline_id, &epoch)| ((pipeline_id, self.id), epoch)).collect(),
+ removed_pipelines,
+ }
+ }
+
+ /// Returns true if any nodes actually changed position or false otherwise.
+ pub fn scroll_nearest_scrolling_ancestor(
+ &mut self,
+ scroll_location: ScrollLocation,
+ scroll_node_index: Option<SpatialNodeIndex>,
+ ) -> bool {
+ self.scene.spatial_tree.scroll_nearest_scrolling_ancestor(scroll_location, scroll_node_index)
+ }
+
+ /// Returns true if the node actually changed position or false otherwise.
+ pub fn scroll_node(
+ &mut self,
+ origin: LayoutPoint,
+ id: ExternalScrollId,
+ clamp: ScrollClamping
+ ) -> bool {
+ self.scene.spatial_tree.scroll_node(origin, id, clamp)
+ }
+
+ pub fn new_async_scene_ready(
+ &mut self,
+ built_scene: BuiltScene,
+ recycler: &mut Recycler,
+ ) {
+ self.frame_is_valid = false;
+ self.hit_tester_is_valid = false;
+
+ // Give the old scene a chance to destroy any resources.
+ // Right now, all this does is build a hash map of any cached
+ // surface tiles, that can be provided to the next scene.
+ // TODO(nical) - It's a bit awkward how these retained tiles live
+ // in the scene's prim store then temporarily in the frame builder
+ // and then presumably back in the prim store during the next frame
+ // build.
+ let mut retained_tiles = RetainedTiles::new();
+ self.scene.prim_store.destroy(&mut retained_tiles);
+ let old_scrolling_states = self.scene.spatial_tree.drain();
+
+ self.scene = built_scene;
+
+ // Provide any cached tiles from the previous scene to
+ // the newly built one.
+ self.frame_builder.set_retained_resources(retained_tiles);
+
+ self.scratch.recycle(recycler);
+
+ self.scene.spatial_tree.finalize_and_apply_pending_scroll_offsets(old_scrolling_states);
+ }
+}
+
+struct DocumentOps {
+ scroll: bool,
+}
+
+impl DocumentOps {
+ fn nop() -> Self {
+ DocumentOps {
+ scroll: false,
+ }
+ }
+}
+
+/// The unique id for WR resource identification.
+/// The namespace_id should start from 1.
+static NEXT_NAMESPACE_ID: AtomicUsize = AtomicUsize::new(1);
+
+#[cfg(any(feature = "capture", feature = "replay"))]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct PlainRenderBackend {
+ default_device_pixel_ratio: f32,
+ frame_config: FrameBuilderConfig,
+ documents: FastHashMap<DocumentId, DocumentView>,
+ resource_sequence_id: u32,
+}
+
+/// The render backend is responsible for transforming high level display lists into
+/// GPU-friendly work which is then submitted to the renderer in the form of a frame::Frame.
+///
+/// The render backend operates on its own thread.
+pub struct RenderBackend {
+ api_rx: Receiver<ApiMsg>,
+ result_tx: Sender<ResultMsg>,
+ scene_tx: Sender<SceneBuilderRequest>,
+ low_priority_scene_tx: Sender<SceneBuilderRequest>,
+ backend_scene_tx: Sender<BackendSceneBuilderRequest>,
+ scene_rx: Receiver<SceneBuilderResult>,
+
+ default_device_pixel_ratio: f32,
+
+ gpu_cache: GpuCache,
+ resource_cache: ResourceCache,
+
+ frame_config: FrameBuilderConfig,
+ default_compositor_kind: CompositorKind,
+ documents: FastHashMap<DocumentId, Document>,
+
+ notifier: Box<dyn RenderNotifier>,
+ tile_cache_logger: TileCacheLogger,
+ sampler: Option<Box<dyn AsyncPropertySampler + Send>>,
+ size_of_ops: Option<MallocSizeOfOps>,
+ debug_flags: DebugFlags,
+ namespace_alloc_by_client: bool,
+
+ // We keep one around to be able to call clear_namespace
+ // after the api object is deleted. For most purposes the
+ // api object's blob handler should be used instead.
+ blob_image_handler: Option<Box<dyn BlobImageHandler>>,
+
+ recycler: Recycler,
+ #[cfg(feature = "capture")]
+ capture_config: Option<CaptureConfig>,
+ #[cfg(feature = "replay")]
+ loaded_resource_sequence_id: u32,
+}
+
+impl RenderBackend {
+ pub fn new(
+ api_rx: Receiver<ApiMsg>,
+ result_tx: Sender<ResultMsg>,
+ scene_tx: Sender<SceneBuilderRequest>,
+ low_priority_scene_tx: Sender<SceneBuilderRequest>,
+ backend_scene_tx: Sender<BackendSceneBuilderRequest>,
+ scene_rx: Receiver<SceneBuilderResult>,
+ default_device_pixel_ratio: f32,
+ resource_cache: ResourceCache,
+ notifier: Box<dyn RenderNotifier>,
+ blob_image_handler: Option<Box<dyn BlobImageHandler>>,
+ frame_config: FrameBuilderConfig,
+ sampler: Option<Box<dyn AsyncPropertySampler + Send>>,
+ size_of_ops: Option<MallocSizeOfOps>,
+ debug_flags: DebugFlags,
+ namespace_alloc_by_client: bool,
+ ) -> RenderBackend {
+ RenderBackend {
+ api_rx,
+ result_tx,
+ scene_tx,
+ low_priority_scene_tx,
+ backend_scene_tx,
+ scene_rx,
+ default_device_pixel_ratio,
+ resource_cache,
+ gpu_cache: GpuCache::new(),
+ frame_config,
+ default_compositor_kind : frame_config.compositor_kind,
+ documents: FastHashMap::default(),
+ notifier,
+ tile_cache_logger: TileCacheLogger::new(500usize),
+ sampler,
+ size_of_ops,
+ debug_flags,
+ namespace_alloc_by_client,
+ recycler: Recycler::new(),
+ blob_image_handler,
+ #[cfg(feature = "capture")]
+ capture_config: None,
+ #[cfg(feature = "replay")]
+ loaded_resource_sequence_id: 0,
+ }
+ }
+
+ fn next_namespace_id(&self) -> IdNamespace {
+ IdNamespace(NEXT_NAMESPACE_ID.fetch_add(1, Ordering::Relaxed) as u32)
+ }
+
+ pub fn run(&mut self, mut profile_counters: BackendProfileCounters) {
+ let mut frame_counter: u32 = 0;
+ let mut status = RenderBackendStatus::Continue;
+
+ if let Some(ref sampler) = self.sampler {
+ sampler.register();
+ }
+
+ while let RenderBackendStatus::Continue = status {
+ while let Ok(msg) = self.scene_rx.try_recv() {
+ profile_scope!("rb_msg");
+
+ match msg {
+ SceneBuilderResult::Transactions(txns, result_tx) => {
+ self.process_transaction(
+ txns,
+ result_tx,
+ &mut frame_counter,
+ &mut profile_counters,
+ );
+ self.bookkeep_after_frames();
+ },
+ #[cfg(feature = "capture")]
+ SceneBuilderResult::CapturedTransactions(txns, capture_config, result_tx) => {
+ if let Some(ref mut old_config) = self.capture_config {
+ assert!(old_config.scene_id <= capture_config.scene_id);
+ if old_config.scene_id < capture_config.scene_id {
+ old_config.scene_id = capture_config.scene_id;
+ old_config.frame_id = 0;
+ }
+ } else {
+ self.capture_config = Some(capture_config);
+ }
+
+ let built_frame = self.process_transaction(
+ txns,
+ result_tx,
+ &mut frame_counter,
+ &mut profile_counters,
+ );
+
+ if built_frame {
+ self.save_capture_sequence();
+ }
+
+ self.bookkeep_after_frames();
+ },
+ SceneBuilderResult::GetGlyphDimensions(request) => {
+ let mut glyph_dimensions = Vec::with_capacity(request.glyph_indices.len());
+ if let Some(base) = self.resource_cache.get_font_instance(request.key) {
+ let font = FontInstance::from_base(Arc::clone(&base));
+ for glyph_index in &request.glyph_indices {
+ let glyph_dim = self.resource_cache.get_glyph_dimensions(&font, *glyph_index);
+ glyph_dimensions.push(glyph_dim);
+ }
+ }
+ request.sender.send(glyph_dimensions).unwrap();
+ }
+ SceneBuilderResult::GetGlyphIndices(request) => {
+ let mut glyph_indices = Vec::with_capacity(request.text.len());
+ for ch in request.text.chars() {
+ let index = self.resource_cache.get_glyph_index(request.key, ch);
+ glyph_indices.push(index);
+ }
+ request.sender.send(glyph_indices).unwrap();
+ }
+ SceneBuilderResult::FlushComplete(tx) => {
+ tx.send(()).ok();
+ }
+ SceneBuilderResult::ExternalEvent(evt) => {
+ self.notifier.external_event(evt);
+ }
+ SceneBuilderResult::ClearNamespace(id) => {
+ self.resource_cache.clear_namespace(id);
+ self.documents.retain(|doc_id, _doc| doc_id.namespace_id != id);
+ if let Some(handler) = &mut self.blob_image_handler {
+ handler.clear_namespace(id);
+ }
+ }
+ SceneBuilderResult::Stopped => {
+ panic!("We haven't sent a Stop yet, how did we get a Stopped back?");
+ }
+ SceneBuilderResult::DocumentsForDebugger(json) => {
+ let msg = ResultMsg::DebugOutput(DebugOutput::FetchDocuments(json));
+ self.result_tx.send(msg).unwrap();
+ self.notifier.wake_up();
+ }
+ }
+ }
+
+ status = match self.api_rx.recv() {
+ Ok(msg) => {
+ self.process_api_msg(msg, &mut profile_counters, &mut frame_counter)
+ }
+ Err(..) => { RenderBackendStatus::ShutDown(None) }
+ };
+ }
+
+ let _ = self.low_priority_scene_tx.send(SceneBuilderRequest::Stop);
+ // Ensure we read everything the scene builder is sending us from
+ // inflight messages, otherwise the scene builder might panic.
+ while let Ok(msg) = self.scene_rx.recv() {
+ match msg {
+ SceneBuilderResult::FlushComplete(tx) => {
+ // If somebody's blocked waiting for a flush, how did they
+ // trigger the RB thread to shut down? This shouldn't happen
+ // but handle it gracefully anyway.
+ debug_assert!(false);
+ tx.send(()).ok();
+ }
+ SceneBuilderResult::Stopped => break,
+ _ => continue,
+ }
+ }
+
+ self.documents.clear();
+
+ self.notifier.shut_down();
+
+ if let Some(ref sampler) = self.sampler {
+ sampler.deregister();
+ }
+
+
+ if let RenderBackendStatus::ShutDown(Some(sender)) = status {
+ let _ = sender.send(());
+ }
+ }
+
+ fn process_transaction(
+ &mut self,
+ mut txns: Vec<Box<BuiltTransaction>>,
+ result_tx: Option<Sender<SceneSwapResult>>,
+ frame_counter: &mut u32,
+ profile_counters: &mut BackendProfileCounters,
+ ) -> bool {
+ self.prepare_for_frames();
+ self.maybe_force_nop_documents(
+ frame_counter,
+ profile_counters,
+ |document_id| txns.iter().any(|txn| txn.document_id == document_id));
+
+ let mut built_frame = false;
+ for mut txn in txns.drain(..) {
+ let has_built_scene = txn.built_scene.is_some();
+
+ if let Some(timings) = txn.timings {
+ if has_built_scene {
+ profile_counters.scene_changed = true;
+ }
+
+ profile_counters.txn.set(
+ timings.builder_start_time_ns,
+ timings.builder_end_time_ns,
+ timings.send_time_ns,
+ timings.scene_build_start_time_ns,
+ timings.scene_build_end_time_ns,
+ timings.display_list_len,
+ );
+ }
+
+ if let Some(doc) = self.documents.get_mut(&txn.document_id) {
+ doc.removed_pipelines.append(&mut txn.removed_pipelines);
+ doc.view.scene = txn.view;
+
+ if let Some(built_scene) = txn.built_scene.take() {
+ doc.new_async_scene_ready(
+ built_scene,
+ &mut self.recycler,
+ );
+ }
+
+ // If there are any additions or removals of clip modes
+ // during the scene build, apply them to the data store now.
+ // This needs to happen before we build the hit tester.
+ if let Some(updates) = txn.interner_updates.take() {
+ #[cfg(feature = "capture")]
+ {
+ if self.debug_flags.contains(DebugFlags::TILE_CACHE_LOGGING_DBG) {
+ self.tile_cache_logger.serialize_updates(&updates);
+ }
+ }
+ doc.data_stores.apply_updates(updates, profile_counters);
+ }
+
+ // Build the hit tester while the APZ lock is held so that its content
+ // is in sync with the gecko APZ tree.
+ if !doc.hit_tester_is_valid {
+ doc.rebuild_hit_tester();
+ }
+
+ if let Some(ref tx) = result_tx {
+ let (resume_tx, resume_rx) = channel();
+ tx.send(SceneSwapResult::Complete(resume_tx)).unwrap();
+ // Block until the post-swap hook has completed on
+ // the scene builder thread. We need to do this before
+ // we can sample from the sampler hook which might happen
+ // in the update_document call below.
+ resume_rx.recv().ok();
+ }
+
+ for pipeline_id in &txn.discard_frame_state_for_pipelines {
+ doc.scene
+ .spatial_tree
+ .discard_frame_state_for_pipeline(*pipeline_id);
+ }
+ } else {
+ // The document was removed while we were building it, skip it.
+ // TODO: we might want to just ensure that removed documents are
+ // always forwarded to the scene builder thread to avoid this case.
+ if let Some(ref tx) = result_tx {
+ tx.send(SceneSwapResult::Aborted).unwrap();
+ }
+ continue;
+ }
+
+ self.resource_cache.add_rasterized_blob_images(
+ txn.rasterized_blobs.take(),
+ &mut profile_counters.resources.texture_cache,
+ );
+
+ built_frame |= self.update_document(
+ txn.document_id,
+ txn.resource_updates.take(),
+ txn.frame_ops.take(),
+ txn.notifications.take(),
+ txn.render_frame,
+ txn.invalidate_rendered_frame,
+ frame_counter,
+ profile_counters,
+ has_built_scene,
+ );
+ }
+
+ built_frame
+ }
+
+ fn process_api_msg(
+ &mut self,
+ msg: ApiMsg,
+ profile_counters: &mut BackendProfileCounters,
+ frame_counter: &mut u32,
+ ) -> RenderBackendStatus {
+ match msg {
+ ApiMsg::WakeUp => {}
+ ApiMsg::WakeSceneBuilder => {
+ self.scene_tx.send(SceneBuilderRequest::WakeUp).unwrap();
+ }
+ ApiMsg::FlushSceneBuilder(tx) => {
+ self.low_priority_scene_tx.send(SceneBuilderRequest::Flush(tx)).unwrap();
+ }
+ ApiMsg::GetGlyphDimensions(request) => {
+ self.scene_tx.send(SceneBuilderRequest::GetGlyphDimensions(request)).unwrap();
+ }
+ ApiMsg::GetGlyphIndices(request) => {
+ self.scene_tx.send(SceneBuilderRequest::GetGlyphIndices(request)).unwrap();
+ }
+ ApiMsg::CloneApi(sender) => {
+ assert!(!self.namespace_alloc_by_client);
+ sender.send(self.next_namespace_id()).unwrap();
+ }
+ ApiMsg::CloneApiByClient(namespace_id) => {
+ assert!(self.namespace_alloc_by_client);
+ debug_assert!(!self.documents.iter().any(|(did, _doc)| did.namespace_id == namespace_id));
+ }
+ ApiMsg::AddDocument(document_id, initial_size, layer) => {
+ let document = Document::new(
+ document_id,
+ initial_size,
+ layer,
+ self.default_device_pixel_ratio,
+ );
+ let old = self.documents.insert(document_id, document);
+ debug_assert!(old.is_none());
+
+ self.scene_tx.send(
+ SceneBuilderRequest::AddDocument(document_id, initial_size, layer)
+ ).unwrap();
+
+ }
+ ApiMsg::DeleteDocument(document_id) => {
+ self.documents.remove(&document_id);
+ self.low_priority_scene_tx.send(
+ SceneBuilderRequest::DeleteDocument(document_id)
+ ).unwrap();
+ }
+ ApiMsg::ExternalEvent(evt) => {
+ self.low_priority_scene_tx.send(SceneBuilderRequest::ExternalEvent(evt)).unwrap();
+ }
+ ApiMsg::ClearNamespace(id) => {
+ self.low_priority_scene_tx.send(SceneBuilderRequest::ClearNamespace(id)).unwrap();
+ }
+ ApiMsg::MemoryPressure => {
+ // This is drastic. It will basically flush everything out of the cache,
+ // and the next frame will have to rebuild all of its resources.
+ // We may want to look into something less extreme, but on the other hand this
+ // should only be used in situations where are running low enough on memory
+ // that we risk crashing if we don't do something about it.
+ // The advantage of clearing the cache completely is that it gets rid of any
+ // remaining fragmentation that could have persisted if we kept around the most
+ // recently used resources.
+ self.resource_cache.clear(ClearCache::all());
+
+ self.gpu_cache.clear();
+
+ let resource_updates = self.resource_cache.pending_updates();
+ let msg = ResultMsg::UpdateResources {
+ resource_updates,
+ memory_pressure: true,
+ };
+ self.result_tx.send(msg).unwrap();
+ self.notifier.wake_up();
+ }
+ ApiMsg::ReportMemory(tx) => {
+ self.report_memory(tx);
+ }
+ ApiMsg::DebugCommand(option) => {
+ let msg = match option {
+ DebugCommand::EnableDualSourceBlending(enable) => {
+ // Set in the config used for any future documents
+ // that are created.
+ self.frame_config
+ .dual_source_blending_is_enabled = enable;
+ self.update_frame_builder_config();
+
+ // We don't want to forward this message to the renderer.
+ return RenderBackendStatus::Continue;
+ }
+ DebugCommand::SetPictureTileSize(tile_size) => {
+ self.frame_config.tile_size_override = tile_size;
+ self.update_frame_builder_config();
+
+ return RenderBackendStatus::Continue;
+ }
+ DebugCommand::FetchDocuments => {
+ // Ask SceneBuilderThread to send JSON presentation of the documents,
+ // that will be forwarded to Renderer.
+ self.send_backend_message(BackendSceneBuilderRequest::DocumentsForDebugger);
+ return RenderBackendStatus::Continue;
+ }
+ DebugCommand::FetchClipScrollTree => {
+ let json = self.get_spatial_tree_for_debugger();
+ ResultMsg::DebugOutput(DebugOutput::FetchClipScrollTree(json))
+ }
+ #[cfg(feature = "capture")]
+ DebugCommand::SaveCapture(root, bits) => {
+ let output = self.save_capture(root, bits, profile_counters);
+ ResultMsg::DebugOutput(output)
+ },
+ #[cfg(feature = "capture")]
+ DebugCommand::StartCaptureSequence(root, bits) => {
+ self.start_capture_sequence(root, bits);
+ return RenderBackendStatus::Continue;
+ },
+ #[cfg(feature = "capture")]
+ DebugCommand::StopCaptureSequence => {
+ self.stop_capture_sequence();
+ return RenderBackendStatus::Continue;
+ },
+ #[cfg(feature = "replay")]
+ DebugCommand::LoadCapture(path, ids, tx) => {
+ NEXT_NAMESPACE_ID.fetch_add(1, Ordering::Relaxed);
+ *frame_counter += 1;
+
+ let mut config = CaptureConfig::new(path, CaptureBits::all());
+ if let Some((scene_id, frame_id)) = ids {
+ config.scene_id = scene_id;
+ config.frame_id = frame_id;
+ }
+
+ self.load_capture(config, profile_counters);
+
+ for (id, doc) in &self.documents {
+ let captured = CapturedDocument {
+ document_id: *id,
+ root_pipeline_id: doc.loaded_scene.root_pipeline_id,
+ };
+ tx.send(captured).unwrap();
+ }
+
+ // Note: we can't pass `LoadCapture` here since it needs to arrive
+ // before the `PublishDocument` messages sent by `load_capture`.
+ return RenderBackendStatus::Continue;
+ }
+ DebugCommand::ClearCaches(mask) => {
+ self.resource_cache.clear(mask);
+ return RenderBackendStatus::Continue;
+ }
+ DebugCommand::EnableNativeCompositor(enable) => {
+ // Default CompositorKind should be Native
+ if let CompositorKind::Draw { .. } = self.default_compositor_kind {
+ unreachable!();
+ }
+
+ let compositor_kind = if enable {
+ self.default_compositor_kind
+ } else {
+ CompositorKind::default()
+ };
+
+ for (_, doc) in &mut self.documents {
+ doc.scene.config.compositor_kind = compositor_kind;
+ doc.frame_is_valid = false;
+ }
+
+ self.frame_config.compositor_kind = compositor_kind;
+ self.update_frame_builder_config();
+
+ // We don't want to forward this message to the renderer.
+ return RenderBackendStatus::Continue;
+ }
+ DebugCommand::EnableMultithreading(enable) => {
+ self.resource_cache.enable_multithreading(enable);
+ return RenderBackendStatus::Continue;
+ }
+ DebugCommand::SetBatchingLookback(count) => {
+ self.frame_config.batch_lookback_count = count as usize;
+ self.update_frame_builder_config();
+
+ return RenderBackendStatus::Continue;
+ }
+ DebugCommand::SimulateLongSceneBuild(time_ms) => {
+ self.scene_tx.send(SceneBuilderRequest::SimulateLongSceneBuild(time_ms)).unwrap();
+ return RenderBackendStatus::Continue;
+ }
+ DebugCommand::SimulateLongLowPrioritySceneBuild(time_ms) => {
+ self.low_priority_scene_tx.send(
+ SceneBuilderRequest::SimulateLongLowPrioritySceneBuild(time_ms)
+ ).unwrap();
+ return RenderBackendStatus::Continue;
+ }
+ DebugCommand::SetFlags(flags) => {
+ self.resource_cache.set_debug_flags(flags);
+ self.gpu_cache.set_debug_flags(flags);
+
+ // If we're toggling on the GPU cache debug display, we
+ // need to blow away the cache. This is because we only
+ // send allocation/free notifications to the renderer
+ // thread when the debug display is enabled, and thus
+ // enabling it when the cache is partially populated will
+ // give the renderer an incomplete view of the world.
+ // And since we might as well drop all the debugging state
+ // from the renderer when we disable the debug display,
+ // we just clear the cache on toggle.
+ let changed = self.debug_flags ^ flags;
+ if changed.contains(DebugFlags::GPU_CACHE_DBG) {
+ self.gpu_cache.clear();
+ }
+ self.debug_flags = flags;
+
+ ResultMsg::DebugCommand(option)
+ }
+ _ => ResultMsg::DebugCommand(option),
+ };
+ self.result_tx.send(msg).unwrap();
+ self.notifier.wake_up();
+ }
+ ApiMsg::ShutDown(sender) => {
+ info!("Recycling stats: {:?}", self.recycler);
+ return RenderBackendStatus::ShutDown(sender);
+ }
+ ApiMsg::UpdateDocuments(transaction_msgs) => {
+ self.prepare_transactions(
+ transaction_msgs,
+ frame_counter,
+ profile_counters,
+ );
+ }
+ }
+
+ RenderBackendStatus::Continue
+ }
+
+ fn update_frame_builder_config(&self) {
+ self.send_backend_message(
+ BackendSceneBuilderRequest::SetFrameBuilderConfig(
+ self.frame_config.clone()
+ )
+ );
+ }
+
+ fn prepare_for_frames(&mut self) {
+ self.gpu_cache.prepare_for_frames();
+ }
+
+ fn bookkeep_after_frames(&mut self) {
+ self.gpu_cache.bookkeep_after_frames();
+ }
+
+ fn requires_frame_build(&mut self) -> bool {
+ self.gpu_cache.requires_frame_build()
+ }
+
+ fn prepare_transactions(
+ &mut self,
+ txns: Vec<Box<TransactionMsg>>,
+ frame_counter: &mut u32,
+ profile_counters: &mut BackendProfileCounters,
+ ) {
+ let mut use_scene_builder = txns.iter()
+ .any(|transaction_msg| transaction_msg.use_scene_builder_thread);
+ let use_high_priority = txns.iter()
+ .any(|transaction_msg| !transaction_msg.low_priority);
+
+ use_scene_builder = use_scene_builder || txns.iter().any(|txn| {
+ !txn.scene_ops.is_empty()
+ || !txn.blob_requests.is_empty()
+ || txn.blob_rasterizer.is_some()
+ });
+
+ if !use_scene_builder {
+ self.prepare_for_frames();
+ self.maybe_force_nop_documents(
+ frame_counter,
+ profile_counters,
+ |document_id| txns.iter().any(|txn| txn.document_id == document_id));
+
+ let mut built_frame = false;
+ for mut txn in txns {
+ built_frame |= self.update_document(
+ txn.document_id,
+ txn.resource_updates.take(),
+ txn.frame_ops.take(),
+ txn.notifications.take(),
+ txn.generate_frame,
+ txn.invalidate_rendered_frame,
+ frame_counter,
+ profile_counters,
+ false
+ );
+ }
+ if built_frame {
+ #[cfg(feature = "capture")]
+ self.save_capture_sequence();
+ }
+ self.bookkeep_after_frames();
+ return;
+ }
+
+ let tx = if use_high_priority {
+ &self.scene_tx
+ } else {
+ &self.low_priority_scene_tx
+ };
+
+ tx.send(SceneBuilderRequest::Transactions(txns)).unwrap();
+ }
+
+ /// In certain cases, resources shared by multiple documents have to run
+ /// maintenance operations, like cleaning up unused cache items. In those
+ /// cases, we are forced to build frames for all documents, however we
+ /// may not have a transaction ready for every document - this method
+ /// calls update_document with the details of a fake, nop transaction just
+ /// to force a frame build.
+ fn maybe_force_nop_documents<F>(&mut self,
+ frame_counter: &mut u32,
+ profile_counters: &mut BackendProfileCounters,
+ document_already_present: F) where
+ F: Fn(DocumentId) -> bool {
+ if self.requires_frame_build() {
+ let nop_documents : Vec<DocumentId> = self.documents.keys()
+ .cloned()
+ .filter(|key| !document_already_present(*key))
+ .collect();
+ #[allow(unused_variables)]
+ let mut built_frame = false;
+ for &document_id in &nop_documents {
+ built_frame |= self.update_document(
+ document_id,
+ Vec::default(),
+ Vec::default(),
+ Vec::default(),
+ false,
+ false,
+ frame_counter,
+ profile_counters,
+ false);
+ }
+ #[cfg(feature = "capture")]
+ match built_frame {
+ true => self.save_capture_sequence(),
+ _ => {},
+ }
+ }
+ }
+
+ fn update_document(
+ &mut self,
+ document_id: DocumentId,
+ resource_updates: Vec<ResourceUpdate>,
+ mut frame_ops: Vec<FrameMsg>,
+ mut notifications: Vec<NotificationRequest>,
+ mut render_frame: bool,
+ invalidate_rendered_frame: bool,
+ frame_counter: &mut u32,
+ profile_counters: &mut BackendProfileCounters,
+ has_built_scene: bool,
+ ) -> bool {
+ let requested_frame = render_frame;
+
+ let requires_frame_build = self.requires_frame_build();
+ let doc = self.documents.get_mut(&document_id).unwrap();
+ // If we have a sampler, get more frame ops from it and add them
+ // to the transaction. This is a hook to allow the WR user code to
+ // fiddle with things after a potentially long scene build, but just
+ // before rendering. This is useful for rendering with the latest
+ // async transforms.
+ if requested_frame || has_built_scene {
+ if let Some(ref sampler) = self.sampler {
+ frame_ops.append(&mut sampler.sample(document_id,
+ &doc.scene.pipeline_epochs));
+ }
+ }
+
+ doc.has_built_scene |= has_built_scene;
+
+ // TODO: this scroll variable doesn't necessarily mean we scrolled. It is only used
+ // for something wrench specific and we should remove it.
+ let mut scroll = false;
+ for frame_msg in frame_ops {
+ let _timer = profile_counters.total_time.timer();
+ let op = doc.process_frame_msg(frame_msg);
+ scroll |= op.scroll;
+ }
+
+ for update in &resource_updates {
+ if let ResourceUpdate::UpdateImage(..) = update {
+ doc.frame_is_valid = false;
+ }
+ }
+
+ self.resource_cache.post_scene_building_update(
+ resource_updates,
+ &mut profile_counters.resources,
+ );
+
+ if doc.dynamic_properties.flush_pending_updates() {
+ doc.frame_is_valid = false;
+ doc.hit_tester_is_valid = false;
+ }
+
+ if !doc.can_render() {
+ // TODO: this happens if we are building the first scene asynchronously and
+ // scroll at the same time. we should keep track of the fact that we skipped
+ // composition here and do it as soon as we receive the scene.
+ render_frame = false;
+ }
+
+ // Avoid re-building the frame if the current built frame is still valid.
+ // However, if the resource_cache requires a frame build, _always_ do that, unless
+ // doc.can_render() is false, as in that case a frame build can't happen anyway.
+ // We want to ensure we do this because even if the doc doesn't have pixels it
+ // can still try to access stale texture cache items.
+ let build_frame = (render_frame && !doc.frame_is_valid && doc.has_pixels()) ||
+ (requires_frame_build && doc.can_render());
+
+ // Request composite is true when we want to composite frame even when
+ // there is no frame update. This happens when video frame is updated under
+ // external image with NativeTexture or when platform requested to composite frame.
+ if invalidate_rendered_frame {
+ doc.rendered_frame_is_valid = false;
+ if let CompositorKind::Draw { max_partial_present_rects, .. } = doc.scene.config.compositor_kind {
+
+ // When partial present is enabled, we need to force redraw.
+ if max_partial_present_rects > 0 {
+ let msg = ResultMsg::ForceRedraw;
+ self.result_tx.send(msg).unwrap();
+ }
+ }
+ }
+
+ let mut frame_build_time = None;
+ if build_frame {
+ profile_scope!("generate frame");
+
+ *frame_counter += 1;
+
+ // borrow ck hack for profile_counters
+ let (pending_update, rendered_document) = {
+ let _timer = profile_counters.total_time.timer();
+ let frame_build_start_time = precise_time_ns();
+
+ let rendered_document = doc.build_frame(
+ &mut self.resource_cache,
+ &mut self.gpu_cache,
+ &mut profile_counters.resources,
+ self.debug_flags,
+ &mut self.tile_cache_logger,
+ );
+
+ debug!("generated frame for document {:?} with {} passes",
+ document_id, rendered_document.frame.passes.len());
+
+ let msg = ResultMsg::UpdateGpuCache(self.gpu_cache.extract_updates());
+ self.result_tx.send(msg).unwrap();
+
+ frame_build_time = Some(precise_time_ns() - frame_build_start_time);
+
+ let pending_update = self.resource_cache.pending_updates();
+ (pending_update, rendered_document)
+ };
+
+ // Build a small struct that represents the state of the tiles to be composited.
+ let composite_descriptor = rendered_document
+ .frame
+ .composite_state
+ .descriptor
+ .clone();
+
+ // If there are texture cache updates to apply, or if the produced
+ // frame is not a no-op, or the compositor state has changed,
+ // then we cannot skip compositing this frame.
+ if !pending_update.is_nop() ||
+ !rendered_document.frame.is_nop() ||
+ composite_descriptor != doc.prev_composite_descriptor {
+ doc.rendered_frame_is_valid = false;
+ }
+ doc.prev_composite_descriptor = composite_descriptor;
+
+ #[cfg(feature = "capture")]
+ match self.capture_config {
+ Some(ref mut config) => {
+ // FIXME(aosmond): document splitting causes multiple prepare frames
+ config.prepare_frame();
+
+ if config.bits.contains(CaptureBits::FRAME) {
+ let file_name = format!("frame-{}-{}", document_id.namespace_id.0, document_id.id);
+ config.serialize_for_frame(&rendered_document.frame, file_name);
+ }
+
+ let data_stores_name = format!("data-stores-{}-{}", document_id.namespace_id.0, document_id.id);
+ config.serialize_for_frame(&doc.data_stores, data_stores_name);
+
+ let properties_name = format!("properties-{}-{}", document_id.namespace_id.0, document_id.id);
+ config.serialize_for_frame(&doc.dynamic_properties, properties_name);
+ },
+ None => {},
+ }
+
+ let msg = ResultMsg::PublishPipelineInfo(doc.updated_pipeline_info());
+ self.result_tx.send(msg).unwrap();
+
+ // Publish the frame
+ let msg = ResultMsg::PublishDocument(
+ document_id,
+ rendered_document,
+ pending_update,
+ profile_counters.clone()
+ );
+ self.result_tx.send(msg).unwrap();
+ profile_counters.reset();
+ } else if requested_frame {
+ // WR-internal optimization to avoid doing a bunch of render work if
+ // there's no pixels. We still want to pretend to render and request
+ // a render to make sure that the callbacks (particularly the
+ // new_frame_ready callback below) has the right flags.
+ let msg = ResultMsg::PublishPipelineInfo(doc.updated_pipeline_info());
+ self.result_tx.send(msg).unwrap();
+ }
+
+ drain_filter(
+ &mut notifications,
+ |n| { n.when() == Checkpoint::FrameBuilt },
+ |n| { n.notify(); },
+ );
+
+ if !notifications.is_empty() {
+ self.result_tx.send(ResultMsg::AppendNotificationRequests(notifications)).unwrap();
+ }
+
+ // Always forward the transaction to the renderer if a frame was requested,
+ // otherwise gecko can get into a state where it waits (forever) for the
+ // transaction to complete before sending new work.
+ if requested_frame {
+ // If rendered frame is already valid, there is no need to render frame.
+ if doc.rendered_frame_is_valid {
+ render_frame = false;
+ } else if render_frame {
+ doc.rendered_frame_is_valid = true;
+ }
+ self.notifier.new_frame_ready(document_id, scroll, render_frame, frame_build_time);
+ }
+
+ if !doc.hit_tester_is_valid {
+ doc.rebuild_hit_tester();
+ }
+
+ build_frame
+ }
+
+ fn send_backend_message(&self, msg: BackendSceneBuilderRequest) {
+ self.backend_scene_tx.send(msg).unwrap();
+ self.low_priority_scene_tx.send(SceneBuilderRequest::BackendMessage).unwrap();
+ }
+
+ #[cfg(not(feature = "debugger"))]
+ fn get_spatial_tree_for_debugger(&self) -> String {
+ String::new()
+ }
+
+ #[cfg(feature = "debugger")]
+ fn get_spatial_tree_for_debugger(&self) -> String {
+ use crate::print_tree::PrintableTree;
+
+ let mut debug_root = debug_server::SpatialTreeList::new();
+
+ for (_, doc) in &self.documents {
+ let debug_node = debug_server::TreeNode::new("document spatial tree");
+ let mut builder = debug_server::TreeNodeBuilder::new(debug_node);
+
+ doc.scene.spatial_tree.print_with(&mut builder);
+
+ debug_root.add(builder.build());
+ }
+
+ serde_json::to_string(&debug_root).unwrap()
+ }
+
+ fn report_memory(&mut self, tx: Sender<Box<MemoryReport>>) {
+ let mut report = Box::new(MemoryReport::default());
+ let ops = self.size_of_ops.as_mut().unwrap();
+ let op = ops.size_of_op;
+ report.gpu_cache_metadata = self.gpu_cache.size_of(ops);
+ for doc in self.documents.values() {
+ report.clip_stores += doc.scene.clip_store.size_of(ops);
+ report.hit_testers += match &doc.hit_tester {
+ Some(hit_tester) => hit_tester.size_of(ops),
+ None => 0,
+ };
+
+ doc.data_stores.report_memory(ops, &mut report)
+ }
+
+ (*report) += self.resource_cache.report_memory(op);
+
+ // Send a message to report memory on the scene-builder thread, which
+ // will add its report to this one and send the result back to the original
+ // thread waiting on the request.
+ self.send_backend_message(
+ BackendSceneBuilderRequest::ReportMemory(report, tx)
+ );
+ }
+
+ #[cfg(feature = "capture")]
+ fn save_capture_sequence(&mut self) {
+ if let Some(ref mut config) = self.capture_config {
+ let deferred = self.resource_cache.save_capture_sequence(config);
+
+ let backend = PlainRenderBackend {
+ default_device_pixel_ratio: self.default_device_pixel_ratio,
+ frame_config: self.frame_config.clone(),
+ resource_sequence_id: config.resource_id,
+ documents: self.documents
+ .iter()
+ .map(|(id, doc)| (*id, doc.view))
+ .collect(),
+ };
+ config.serialize_for_frame(&backend, "backend");
+
+ if !deferred.is_empty() {
+ let msg = ResultMsg::DebugOutput(DebugOutput::SaveCapture(config.clone(), deferred));
+ self.result_tx.send(msg).unwrap();
+ }
+ }
+ }
+}
+
+impl RenderBackend {
+ #[cfg(feature = "capture")]
+ // Note: the mutable `self` is only needed here for resolving blob images
+ fn save_capture(
+ &mut self,
+ root: PathBuf,
+ bits: CaptureBits,
+ profile_counters: &mut BackendProfileCounters,
+ ) -> DebugOutput {
+ use std::fs;
+ use crate::render_task_graph::dump_render_tasks_as_svg;
+
+ debug!("capture: saving {:?}", root);
+ if !root.is_dir() {
+ if let Err(e) = fs::create_dir_all(&root) {
+ panic!("Unable to create capture dir: {:?}", e);
+ }
+ }
+ let config = CaptureConfig::new(root, bits);
+
+ if config.bits.contains(CaptureBits::FRAME) {
+ self.prepare_for_frames();
+ }
+
+ for (&id, doc) in &mut self.documents {
+ debug!("\tdocument {:?}", id);
+ if config.bits.contains(CaptureBits::FRAME) {
+ let rendered_document = doc.build_frame(
+ &mut self.resource_cache,
+ &mut self.gpu_cache,
+ &mut profile_counters.resources,
+ self.debug_flags,
+ &mut self.tile_cache_logger,
+ );
+ // After we rendered the frames, there are pending updates to both
+ // GPU cache and resources. Instead of serializing them, we are going to make sure
+ // they are applied on the `Renderer` side.
+ let msg_update_gpu_cache = ResultMsg::UpdateGpuCache(self.gpu_cache.extract_updates());
+ self.result_tx.send(msg_update_gpu_cache).unwrap();
+ //TODO: write down doc's pipeline info?
+ // it has `pipeline_epoch_map`,
+ // which may capture necessary details for some cases.
+ let file_name = format!("frame-{}-{}", id.namespace_id.0, id.id);
+ config.serialize_for_frame(&rendered_document.frame, file_name);
+ let file_name = format!("spatial-{}-{}", id.namespace_id.0, id.id);
+ config.serialize_tree_for_frame(&doc.scene.spatial_tree, file_name);
+ let file_name = format!("built-primitives-{}-{}", id.namespace_id.0, id.id);
+ config.serialize_for_frame(&doc.scene.prim_store, file_name);
+ let file_name = format!("built-clips-{}-{}", id.namespace_id.0, id.id);
+ config.serialize_for_frame(&doc.scene.clip_store, file_name);
+ let file_name = format!("scratch-{}-{}", id.namespace_id.0, id.id);
+ config.serialize_for_frame(&doc.scratch, file_name);
+ let file_name = format!("render-tasks-{}-{}.svg", id.namespace_id.0, id.id);
+ let mut svg_file = fs::File::create(&config.file_path_for_frame(file_name, "svg"))
+ .expect("Failed to open the SVG file.");
+ dump_render_tasks_as_svg(
+ &rendered_document.frame.render_tasks,
+ &rendered_document.frame.passes,
+ &mut svg_file
+ ).unwrap();
+ }
+
+ let data_stores_name = format!("data-stores-{}-{}", id.namespace_id.0, id.id);
+ config.serialize_for_frame(&doc.data_stores, data_stores_name);
+
+ let properties_name = format!("properties-{}-{}", id.namespace_id.0, id.id);
+ config.serialize_for_frame(&doc.dynamic_properties, properties_name);
+ }
+
+ if config.bits.contains(CaptureBits::FRAME) {
+ // TODO: there is no guarantee that we won't hit this case, but we want to
+ // report it here if we do. If we don't, it will simply crash in
+ // Renderer::render_impl and give us less information about the source.
+ assert!(!self.requires_frame_build(), "Caches were cleared during a capture.");
+ self.bookkeep_after_frames();
+ }
+
+ debug!("\tscene builder");
+ self.send_backend_message(
+ BackendSceneBuilderRequest::SaveScene(config.clone())
+ );
+
+ debug!("\tresource cache");
+ let (resources, deferred) = self.resource_cache.save_capture(&config.root);
+
+ if config.bits.contains(CaptureBits::TILE_CACHE) {
+ debug!("\ttile cache");
+ self.tile_cache_logger.save_capture(&config.root);
+ }
+
+ info!("\tbackend");
+ let backend = PlainRenderBackend {
+ default_device_pixel_ratio: self.default_device_pixel_ratio,
+ frame_config: self.frame_config.clone(),
+ resource_sequence_id: 0,
+ documents: self.documents
+ .iter()
+ .map(|(id, doc)| (*id, doc.view))
+ .collect(),
+ };
+
+ config.serialize_for_frame(&backend, "backend");
+ config.serialize_for_frame(&resources, "plain-resources");
+
+ if config.bits.contains(CaptureBits::FRAME) {
+ let msg_update_resources = ResultMsg::UpdateResources {
+ resource_updates: self.resource_cache.pending_updates(),
+ memory_pressure: false,
+ };
+ self.result_tx.send(msg_update_resources).unwrap();
+ // Save the texture/glyph/image caches.
+ info!("\tresource cache");
+ let caches = self.resource_cache.save_caches(&config.root);
+ config.serialize_for_resource(&caches, "resource_cache");
+ info!("\tgpu cache");
+ config.serialize_for_resource(&self.gpu_cache, "gpu_cache");
+ }
+
+ DebugOutput::SaveCapture(config, deferred)
+ }
+
+ #[cfg(feature = "capture")]
+ fn start_capture_sequence(
+ &mut self,
+ root: PathBuf,
+ bits: CaptureBits,
+ ) {
+ self.send_backend_message(
+ BackendSceneBuilderRequest::StartCaptureSequence(CaptureConfig::new(root, bits))
+ );
+ }
+
+ #[cfg(feature = "capture")]
+ fn stop_capture_sequence(
+ &mut self,
+ ) {
+ self.send_backend_message(
+ BackendSceneBuilderRequest::StopCaptureSequence
+ );
+ }
+
+ #[cfg(feature = "replay")]
+ fn load_capture(
+ &mut self,
+ mut config: CaptureConfig,
+ profile_counters: &mut BackendProfileCounters,
+ ) {
+ debug!("capture: loading {:?}", config.frame_root());
+ let backend = config.deserialize_for_frame::<PlainRenderBackend, _>("backend")
+ .expect("Unable to open backend.ron");
+
+ // If this is a capture sequence, then the ID will be non-zero, and won't
+ // match what is loaded, but for still captures, the ID will be zero.
+ let first_load = backend.resource_sequence_id == 0;
+ if self.loaded_resource_sequence_id != backend.resource_sequence_id || first_load {
+ // FIXME(aosmond): We clear the documents because when we update the
+ // resource cache, we actually wipe and reload, because we don't
+ // know what is the same and what has changed. If we were to keep as
+ // much of the resource cache state as possible, we could avoid
+ // flushing the document state (which has its own dependecies on the
+ // cache).
+ //
+ // FIXME(aosmond): If we try to load the next capture in the
+ // sequence too quickly, we may lose resources we depend on in the
+ // current frame. This can cause panics. Ideally we would not
+ // advance to the next frame until the FrameRendered event for all
+ // of the pipelines.
+ self.documents.clear();
+
+ config.resource_id = backend.resource_sequence_id;
+ self.loaded_resource_sequence_id = backend.resource_sequence_id;
+
+ let plain_resources = config.deserialize_for_resource::<PlainResources, _>("plain-resources")
+ .expect("Unable to open plain-resources.ron");
+ let caches_maybe = config.deserialize_for_resource::<PlainCacheOwn, _>("resource_cache");
+
+ // Note: it would be great to have `RenderBackend` to be split
+ // rather explicitly on what's used before and after scene building
+ // so that, for example, we never miss anything in the code below:
+
+ let plain_externals = self.resource_cache.load_capture(
+ plain_resources,
+ caches_maybe,
+ &config,
+ );
+
+ let msg_load = ResultMsg::DebugOutput(
+ DebugOutput::LoadCapture(config.clone(), plain_externals)
+ );
+ self.result_tx.send(msg_load).unwrap();
+
+ self.gpu_cache = match config.deserialize_for_resource::<GpuCache, _>("gpu_cache") {
+ Some(gpu_cache) => gpu_cache,
+ None => GpuCache::new(),
+ };
+ }
+
+ self.default_device_pixel_ratio = backend.default_device_pixel_ratio;
+ self.frame_config = backend.frame_config;
+
+ let mut scenes_to_build = Vec::new();
+
+ for (id, view) in backend.documents {
+ debug!("\tdocument {:?}", id);
+ let scene_name = format!("scene-{}-{}", id.namespace_id.0, id.id);
+ let scene = config.deserialize_for_scene::<Scene, _>(&scene_name)
+ .expect(&format!("Unable to open {}.ron", scene_name));
+
+ let interners_name = format!("interners-{}-{}", id.namespace_id.0, id.id);
+ let interners = config.deserialize_for_scene::<Interners, _>(&interners_name)
+ .expect(&format!("Unable to open {}.ron", interners_name));
+
+ let data_stores_name = format!("data-stores-{}-{}", id.namespace_id.0, id.id);
+ let data_stores = config.deserialize_for_frame::<DataStores, _>(&data_stores_name)
+ .expect(&format!("Unable to open {}.ron", data_stores_name));
+
+ let properties_name = format!("properties-{}-{}", id.namespace_id.0, id.id);
+ let properties = config.deserialize_for_frame::<SceneProperties, _>(&properties_name)
+ .expect(&format!("Unable to open {}.ron", properties_name));
+
+ // Update the document if it still exists, rather than replace it entirely.
+ // This allows us to preserve state information such as the frame stamp,
+ // which is necessary for cache sanity.
+ match self.documents.entry(id) {
+ Occupied(entry) => {
+ let doc = entry.into_mut();
+ doc.view = view;
+ doc.loaded_scene = scene.clone();
+ doc.data_stores = data_stores;
+ doc.dynamic_properties = properties;
+ doc.frame_is_valid = false;
+ doc.rendered_frame_is_valid = false;
+ doc.has_built_scene = false;
+ doc.hit_tester_is_valid = false;
+ }
+ Vacant(entry) => {
+ let doc = Document {
+ id,
+ scene: BuiltScene::empty(),
+ removed_pipelines: Vec::new(),
+ view,
+ stamp: FrameStamp::first(id),
+ frame_builder: FrameBuilder::new(),
+ dynamic_properties: properties,
+ hit_tester: None,
+ shared_hit_tester: Arc::new(SharedHitTester::new()),
+ frame_is_valid: false,
+ hit_tester_is_valid: false,
+ rendered_frame_is_valid: false,
+ has_built_scene: false,
+ data_stores,
+ scratch: PrimitiveScratchBuffer::new(),
+ render_task_counters: RenderTaskGraphCounters::new(),
+ loaded_scene: scene.clone(),
+ prev_composite_descriptor: CompositeDescriptor::empty(),
+ };
+ entry.insert(doc);
+ }
+ };
+
+ let frame_name = format!("frame-{}-{}", id.namespace_id.0, id.id);
+ let frame = config.deserialize_for_frame::<Frame, _>(frame_name);
+ let build_frame = match frame {
+ Some(frame) => {
+ info!("\tloaded a built frame with {} passes", frame.passes.len());
+
+ let msg_update = ResultMsg::UpdateGpuCache(self.gpu_cache.extract_updates());
+ self.result_tx.send(msg_update).unwrap();
+
+ let msg_publish = ResultMsg::PublishDocument(
+ id,
+ RenderedDocument { frame, is_new_scene: true },
+ self.resource_cache.pending_updates(),
+ profile_counters.clone(),
+ );
+ self.result_tx.send(msg_publish).unwrap();
+ profile_counters.reset();
+
+ self.notifier.new_frame_ready(id, false, true, None);
+
+ // We deserialized the state of the frame so we don't want to build
+ // it (but we do want to update the scene builder's state)
+ false
+ }
+ None => true,
+ };
+
+ scenes_to_build.push(LoadScene {
+ document_id: id,
+ scene,
+ view: view.scene.clone(),
+ config: self.frame_config.clone(),
+ font_instances: self.resource_cache.get_font_instances(),
+ build_frame,
+ interners,
+ });
+ }
+
+ if !scenes_to_build.is_empty() {
+ self.send_backend_message(
+ BackendSceneBuilderRequest::LoadScenes(scenes_to_build)
+ );
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/src/render_target.rs b/third_party/webrender/webrender/src/render_target.rs
new file mode 100644
index 00000000000..9a3c953f42a
--- /dev/null
+++ b/third_party/webrender/webrender/src/render_target.rs
@@ -0,0 +1,1091 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+
+use api::units::*;
+use api::{ColorF, PremultipliedColorF, ImageFormat, LineOrientation, BorderStyle, PipelineId};
+use crate::batch::{AlphaBatchBuilder, AlphaBatchContainer, BatchTextures, resolve_image};
+use crate::batch::{ClipBatcher, BatchBuilder};
+use crate::spatial_tree::{SpatialTree, ROOT_SPATIAL_NODE_INDEX};
+use crate::clip::ClipStore;
+use crate::composite::CompositeState;
+use crate::device::Texture;
+use crate::frame_builder::{FrameGlobalResources};
+use crate::gpu_cache::{GpuCache, GpuCacheAddress};
+use crate::gpu_types::{BorderInstance, SvgFilterInstance, BlurDirection, BlurInstance, PrimitiveHeaders, ScalingInstance};
+use crate::gpu_types::{TransformPalette, ZBufferIdGenerator};
+use crate::internal_types::{FastHashMap, TextureSource, LayerIndex, Swizzle, SavedTargetIndex};
+use crate::picture::{SurfaceInfo, ResolvedSurfaceTexture};
+use crate::prim_store::{PrimitiveStore, DeferredResolve, PrimitiveScratchBuffer, PrimitiveVisibilityMask};
+use crate::prim_store::gradient::GRADIENT_FP_STOPS;
+use crate::render_backend::DataStores;
+use crate::render_task::{RenderTaskKind, RenderTaskAddress, ClearMode, BlitSource};
+use crate::render_task::{RenderTask, ScalingTask, SvgFilterInfo};
+use crate::render_task_graph::{RenderTaskGraph, RenderTaskId};
+use crate::resource_cache::ResourceCache;
+use crate::texture_allocator::{ArrayAllocationTracker, FreeRectSlice};
+use std::{cmp, mem};
+
+
+const STYLE_SOLID: i32 = ((BorderStyle::Solid as i32) << 8) | ((BorderStyle::Solid as i32) << 16);
+const STYLE_MASK: i32 = 0x00FF_FF00;
+
+/// According to apitrace, textures larger than 2048 break fast clear
+/// optimizations on some intel drivers. We sometimes need to go larger, but
+/// we try to avoid it. This can go away when proper tiling support lands,
+/// since we can then split large primitives across multiple textures.
+const IDEAL_MAX_TEXTURE_DIMENSION: i32 = 2048;
+/// If we ever need a larger texture than the ideal, we better round it up to a
+/// reasonable number in order to have a bit of leeway in placing things inside.
+const TEXTURE_DIMENSION_MASK: i32 = 0xFF;
+
+/// A tag used to identify the output format of a `RenderTarget`.
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum RenderTargetKind {
+ Color, // RGBA8
+ Alpha, // R8
+}
+
+/// Identifies a given `RenderTarget` in a `RenderTargetList`.
+#[derive(Debug, Copy, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderTargetIndex(pub usize);
+
+pub struct RenderTargetContext<'a, 'rc> {
+ pub global_device_pixel_scale: DevicePixelScale,
+ pub prim_store: &'a PrimitiveStore,
+ pub resource_cache: &'rc mut ResourceCache,
+ pub use_dual_source_blending: bool,
+ pub use_advanced_blending: bool,
+ pub break_advanced_blend_batches: bool,
+ pub batch_lookback_count: usize,
+ pub spatial_tree: &'a SpatialTree,
+ pub data_stores: &'a DataStores,
+ pub surfaces: &'a [SurfaceInfo],
+ pub scratch: &'a PrimitiveScratchBuffer,
+ pub screen_world_rect: WorldRect,
+ pub globals: &'a FrameGlobalResources,
+}
+
+/// Represents a number of rendering operations on a surface.
+///
+/// In graphics parlance, a "render target" usually means "a surface (texture or
+/// framebuffer) bound to the output of a shader". This trait has a slightly
+/// different meaning, in that it represents the operations on that surface
+/// _before_ it's actually bound and rendered. So a `RenderTarget` is built by
+/// the `RenderBackend` by inserting tasks, and then shipped over to the
+/// `Renderer` where a device surface is resolved and the tasks are transformed
+/// into draw commands on that surface.
+///
+/// We express this as a trait to generalize over color and alpha surfaces.
+/// a given `RenderTask` will draw to one or the other, depending on its type
+/// and sometimes on its parameters. See `RenderTask::target_kind`.
+pub trait RenderTarget {
+ /// Creates a new RenderTarget of the given type.
+ fn new(
+ screen_size: DeviceIntSize,
+ gpu_supports_fast_clears: bool,
+ ) -> Self;
+
+ /// Optional hook to provide additional processing for the target at the
+ /// end of the build phase.
+ fn build(
+ &mut self,
+ _ctx: &mut RenderTargetContext,
+ _gpu_cache: &mut GpuCache,
+ _render_tasks: &mut RenderTaskGraph,
+ _deferred_resolves: &mut Vec<DeferredResolve>,
+ _prim_headers: &mut PrimitiveHeaders,
+ _transforms: &mut TransformPalette,
+ _z_generator: &mut ZBufferIdGenerator,
+ _composite_state: &mut CompositeState,
+ ) {
+ }
+
+ /// Associates a `RenderTask` with this target. That task must be assigned
+ /// to a region returned by invoking `allocate()` on this target.
+ ///
+ /// TODO(gw): It's a bit odd that we need the deferred resolves and mutable
+ /// GPU cache here. They are typically used by the build step above. They
+ /// are used for the blit jobs to allow resolve_image to be called. It's a
+ /// bit of extra overhead to store the image key here and the resolve them
+ /// in the build step separately. BUT: if/when we add more texture cache
+ /// target jobs, we might want to tidy this up.
+ fn add_task(
+ &mut self,
+ task_id: RenderTaskId,
+ ctx: &RenderTargetContext,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &RenderTaskGraph,
+ clip_store: &ClipStore,
+ transforms: &mut TransformPalette,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+ );
+
+ fn needs_depth(&self) -> bool;
+
+ fn used_rect(&self) -> DeviceIntRect;
+ fn add_used(&mut self, rect: DeviceIntRect);
+}
+
+/// A series of `RenderTarget` instances, serving as the high-level container
+/// into which `RenderTasks` are assigned.
+///
+/// During the build phase, we iterate over the tasks in each `RenderPass`. For
+/// each task, we invoke `allocate()` on the `RenderTargetList`, which in turn
+/// attempts to allocate an output region in the last `RenderTarget` in the
+/// list. If allocation fails (or if the list is empty), a new `RenderTarget` is
+/// created and appended to the list. The build phase then assign the task into
+/// the target associated with the final allocation.
+///
+/// The result is that each `RenderPass` is associated with one or two
+/// `RenderTargetLists`, depending on whether we have all our tasks have the
+/// same `RenderTargetKind`. The lists are then shipped to the `Renderer`, which
+/// allocates a device texture array, with one slice per render target in the
+/// list.
+///
+/// The upshot of this scheme is that it maximizes batching. In a given pass,
+/// we need to do a separate batch for each individual render target. But with
+/// the texture array, we can expose the entirety of the previous pass to each
+/// task in the current pass in a single batch, which generally allows each
+/// task to be drawn in a single batch regardless of how many results from the
+/// previous pass it depends on.
+///
+/// Note that in some cases (like drop-shadows), we can depend on the output of
+/// a pass earlier than the immediately-preceding pass. See `SavedTargetIndex`.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderTargetList<T> {
+ screen_size: DeviceIntSize,
+ pub format: ImageFormat,
+ /// The maximum width and height of any single primitive we've encountered
+ /// that will be drawn to a dynamic location.
+ ///
+ /// We initially create our per-slice allocators with a width and height of
+ /// IDEAL_MAX_TEXTURE_DIMENSION. If we encounter a larger primitive, the
+ /// allocation will fail, but we'll bump max_dynamic_size, which will cause the
+ /// allocator for the next slice to be just large enough to accomodate it.
+ pub max_dynamic_size: DeviceIntSize,
+ pub targets: Vec<T>,
+ pub saved_index: Option<SavedTargetIndex>,
+ pub alloc_tracker: ArrayAllocationTracker,
+ gpu_supports_fast_clears: bool,
+}
+
+impl<T: RenderTarget> RenderTargetList<T> {
+ pub fn new(
+ screen_size: DeviceIntSize,
+ format: ImageFormat,
+ gpu_supports_fast_clears: bool,
+ ) -> Self {
+ RenderTargetList {
+ screen_size,
+ format,
+ max_dynamic_size: DeviceIntSize::new(0, 0),
+ targets: Vec::new(),
+ saved_index: None,
+ alloc_tracker: ArrayAllocationTracker::new(),
+ gpu_supports_fast_clears,
+ }
+ }
+
+ pub fn build(
+ &mut self,
+ ctx: &mut RenderTargetContext,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &mut RenderTaskGraph,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+ saved_index: Option<SavedTargetIndex>,
+ prim_headers: &mut PrimitiveHeaders,
+ transforms: &mut TransformPalette,
+ z_generator: &mut ZBufferIdGenerator,
+ composite_state: &mut CompositeState,
+ ) {
+ debug_assert_eq!(None, self.saved_index);
+ self.saved_index = saved_index;
+
+ for target in &mut self.targets {
+ target.build(
+ ctx,
+ gpu_cache,
+ render_tasks,
+ deferred_resolves,
+ prim_headers,
+ transforms,
+ z_generator,
+ composite_state,
+ );
+ }
+ }
+
+ pub fn allocate(
+ &mut self,
+ alloc_size: DeviceIntSize,
+ ) -> (RenderTargetIndex, DeviceIntPoint) {
+ let (free_rect_slice, origin) = match self.alloc_tracker.allocate(&alloc_size) {
+ Some(allocation) => allocation,
+ None => {
+ // Have the allocator restrict slice sizes to our max ideal
+ // dimensions, unless we've already gone bigger on a previous
+ // slice.
+ let rounded_dimensions = DeviceIntSize::new(
+ (self.max_dynamic_size.width + TEXTURE_DIMENSION_MASK) & !TEXTURE_DIMENSION_MASK,
+ (self.max_dynamic_size.height + TEXTURE_DIMENSION_MASK) & !TEXTURE_DIMENSION_MASK,
+ );
+ let allocator_dimensions = DeviceIntSize::new(
+ cmp::max(IDEAL_MAX_TEXTURE_DIMENSION, rounded_dimensions.width),
+ cmp::max(IDEAL_MAX_TEXTURE_DIMENSION, rounded_dimensions.height),
+ );
+
+ assert!(alloc_size.width <= allocator_dimensions.width &&
+ alloc_size.height <= allocator_dimensions.height);
+ let slice = FreeRectSlice(self.targets.len() as u32);
+ self.targets.push(T::new(self.screen_size, self.gpu_supports_fast_clears));
+
+ self.alloc_tracker.extend(
+ slice,
+ allocator_dimensions,
+ alloc_size,
+ );
+
+ (slice, DeviceIntPoint::zero())
+ }
+ };
+
+ if alloc_size.is_empty() && self.targets.is_empty() {
+ // push an unused target here, only if we don't have any
+ self.targets.push(T::new(self.screen_size, self.gpu_supports_fast_clears));
+ }
+
+ self.targets[free_rect_slice.0 as usize]
+ .add_used(DeviceIntRect::new(origin, alloc_size));
+
+ (RenderTargetIndex(free_rect_slice.0 as usize), origin)
+ }
+
+ pub fn needs_depth(&self) -> bool {
+ self.targets.iter().any(|target| target.needs_depth())
+ }
+
+ pub fn check_ready(&self, t: &Texture) {
+ let dimensions = t.get_dimensions();
+ assert!(dimensions.width >= self.max_dynamic_size.width);
+ assert!(dimensions.height >= self.max_dynamic_size.height);
+ assert_eq!(t.get_format(), self.format);
+ assert_eq!(t.get_layer_count() as usize, self.targets.len());
+ assert!(t.supports_depth() >= self.needs_depth());
+ }
+}
+
+
+/// Contains the work (in the form of instance arrays) needed to fill a color
+/// color output surface (RGBA8).
+///
+/// See `RenderTarget`.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ColorRenderTarget {
+ pub alpha_batch_containers: Vec<AlphaBatchContainer>,
+ // List of blur operations to apply for this render target.
+ pub vertical_blurs: Vec<BlurInstance>,
+ pub horizontal_blurs: Vec<BlurInstance>,
+ pub readbacks: Vec<DeviceIntRect>,
+ pub scalings: FastHashMap<TextureSource, Vec<ScalingInstance>>,
+ pub svg_filters: Vec<(BatchTextures, Vec<SvgFilterInstance>)>,
+ pub blits: Vec<BlitJob>,
+ // List of frame buffer outputs for this render target.
+ pub outputs: Vec<FrameOutput>,
+ alpha_tasks: Vec<RenderTaskId>,
+ screen_size: DeviceIntSize,
+ // Track the used rect of the render target, so that
+ // we can set a scissor rect and only clear to the
+ // used portion of the target as an optimization.
+ pub used_rect: DeviceIntRect,
+}
+
+impl RenderTarget for ColorRenderTarget {
+ fn new(
+ screen_size: DeviceIntSize,
+ _: bool,
+ ) -> Self {
+ ColorRenderTarget {
+ alpha_batch_containers: Vec::new(),
+ vertical_blurs: Vec::new(),
+ horizontal_blurs: Vec::new(),
+ readbacks: Vec::new(),
+ scalings: FastHashMap::default(),
+ svg_filters: Vec::new(),
+ blits: Vec::new(),
+ outputs: Vec::new(),
+ alpha_tasks: Vec::new(),
+ screen_size,
+ used_rect: DeviceIntRect::zero(),
+ }
+ }
+
+ fn build(
+ &mut self,
+ ctx: &mut RenderTargetContext,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &mut RenderTaskGraph,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+ prim_headers: &mut PrimitiveHeaders,
+ transforms: &mut TransformPalette,
+ z_generator: &mut ZBufferIdGenerator,
+ composite_state: &mut CompositeState,
+ ) {
+ profile_scope!("build");
+ let mut merged_batches = AlphaBatchContainer::new(None);
+
+ for task_id in &self.alpha_tasks {
+ profile_scope!("alpha_task");
+ let task = &render_tasks[*task_id];
+
+ match task.clear_mode {
+ ClearMode::One |
+ ClearMode::Zero => {
+ panic!("bug: invalid clear mode for color task");
+ }
+ ClearMode::DontCare |
+ ClearMode::Transparent => {}
+ }
+
+ match task.kind {
+ RenderTaskKind::Picture(ref pic_task) => {
+ let pic = &ctx.prim_store.pictures[pic_task.pic_index.0];
+
+ let raster_spatial_node_index = match pic.raster_config {
+ Some(ref raster_config) => {
+ let surface = &ctx.surfaces[raster_config.surface_index.0];
+ surface.raster_spatial_node_index
+ }
+ None => {
+ // This must be the main framebuffer
+ ROOT_SPATIAL_NODE_INDEX
+ }
+ };
+
+ let (target_rect, _) = task.get_target_rect();
+
+ let scissor_rect = if pic_task.can_merge {
+ None
+ } else {
+ Some(target_rect)
+ };
+
+ // TODO(gw): The type names of AlphaBatchBuilder and BatchBuilder
+ // are still confusing. Once more of the picture caching
+ // improvement code lands, the AlphaBatchBuilder and
+ // AlphaBatchList types will be collapsed into one, which
+ // should simplify coming up with better type names.
+ let alpha_batch_builder = AlphaBatchBuilder::new(
+ self.screen_size,
+ ctx.break_advanced_blend_batches,
+ ctx.batch_lookback_count,
+ *task_id,
+ render_tasks.get_task_address(*task_id),
+ PrimitiveVisibilityMask::all(),
+ );
+
+ let mut batch_builder = BatchBuilder::new(
+ vec![alpha_batch_builder],
+ );
+
+ batch_builder.add_pic_to_batch(
+ pic,
+ ctx,
+ gpu_cache,
+ render_tasks,
+ deferred_resolves,
+ prim_headers,
+ transforms,
+ raster_spatial_node_index,
+ pic_task.surface_spatial_node_index,
+ z_generator,
+ composite_state,
+ );
+
+ let alpha_batch_builders = batch_builder.finalize();
+
+ for batcher in alpha_batch_builders {
+ batcher.build(
+ &mut self.alpha_batch_containers,
+ &mut merged_batches,
+ target_rect,
+ scissor_rect,
+ );
+ }
+ }
+ _ => {
+ unreachable!();
+ }
+ }
+ }
+
+ if !merged_batches.is_empty() {
+ self.alpha_batch_containers.push(merged_batches);
+ }
+ }
+
+ fn add_task(
+ &mut self,
+ task_id: RenderTaskId,
+ ctx: &RenderTargetContext,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &RenderTaskGraph,
+ _: &ClipStore,
+ _: &mut TransformPalette,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+ ) {
+ profile_scope!("add_task");
+ let task = &render_tasks[task_id];
+
+ match task.kind {
+ RenderTaskKind::VerticalBlur(..) => {
+ add_blur_instances(
+ &mut self.vertical_blurs,
+ BlurDirection::Vertical,
+ render_tasks.get_task_address(task_id),
+ render_tasks.get_task_address(task.children[0]),
+ );
+ }
+ RenderTaskKind::HorizontalBlur(..) => {
+ add_blur_instances(
+ &mut self.horizontal_blurs,
+ BlurDirection::Horizontal,
+ render_tasks.get_task_address(task_id),
+ render_tasks.get_task_address(task.children[0]),
+ );
+ }
+ RenderTaskKind::Picture(ref task_info) => {
+ let pic = &ctx.prim_store.pictures[task_info.pic_index.0];
+ self.alpha_tasks.push(task_id);
+
+ // If this pipeline is registered as a frame output
+ // store the information necessary to do the copy.
+ if let Some(pipeline_id) = pic.frame_output_pipeline_id {
+ self.outputs.push(FrameOutput {
+ pipeline_id,
+ task_id,
+ });
+ }
+ }
+ RenderTaskKind::SvgFilter(ref task_info) => {
+ add_svg_filter_instances(
+ &mut self.svg_filters,
+ render_tasks,
+ &task_info.info,
+ task_id,
+ task.children.get(0).cloned(),
+ task.children.get(1).cloned(),
+ task_info.extra_gpu_cache_handle.map(|handle| gpu_cache.get_address(&handle)),
+ )
+ }
+ RenderTaskKind::ClipRegion(..) |
+ RenderTaskKind::Border(..) |
+ RenderTaskKind::CacheMask(..) |
+ RenderTaskKind::Gradient(..) |
+ RenderTaskKind::LineDecoration(..) => {
+ panic!("Should not be added to color target!");
+ }
+ RenderTaskKind::Readback(device_rect) => {
+ self.readbacks.push(device_rect);
+ }
+ RenderTaskKind::Scaling(ref info) => {
+ add_scaling_instances(
+ info,
+ &mut self.scalings,
+ task,
+ task.children.first().map(|&child| &render_tasks[child]),
+ ctx.resource_cache,
+ gpu_cache,
+ deferred_resolves,
+ );
+ }
+ RenderTaskKind::Blit(ref task_info) => {
+ let source = match task_info.source {
+ BlitSource::Image { key } => {
+ // Get the cache item for the source texture.
+ let cache_item = resolve_image(
+ key.request,
+ ctx.resource_cache,
+ gpu_cache,
+ deferred_resolves,
+ );
+
+ // Work out a source rect to copy from the texture, depending on whether
+ // a sub-rect is present or not.
+ let source_rect = key.texel_rect.map_or(cache_item.uv_rect.to_i32(), |sub_rect| {
+ DeviceIntRect::new(
+ DeviceIntPoint::new(
+ cache_item.uv_rect.origin.x as i32 + sub_rect.origin.x,
+ cache_item.uv_rect.origin.y as i32 + sub_rect.origin.y,
+ ),
+ sub_rect.size,
+ )
+ });
+
+ // Store the blit job for the renderer to execute, including
+ // the allocated destination rect within this target.
+ BlitJobSource::Texture(
+ cache_item.texture_id,
+ cache_item.texture_layer,
+ source_rect,
+ )
+ }
+ BlitSource::RenderTask { task_id } => {
+ BlitJobSource::RenderTask(task_id)
+ }
+ };
+
+ let target_rect = task
+ .get_target_rect()
+ .0
+ .inner_rect(task_info.padding);
+ self.blits.push(BlitJob {
+ source,
+ target_rect,
+ });
+ }
+ #[cfg(test)]
+ RenderTaskKind::Test(..) => {}
+ }
+ }
+
+ fn needs_depth(&self) -> bool {
+ self.alpha_batch_containers.iter().any(|ab| {
+ !ab.opaque_batches.is_empty()
+ })
+ }
+
+ fn used_rect(&self) -> DeviceIntRect {
+ self.used_rect
+ }
+
+ fn add_used(&mut self, rect: DeviceIntRect) {
+ self.used_rect = self.used_rect.union(&rect);
+ }
+}
+
+/// Contains the work (in the form of instance arrays) needed to fill an alpha
+/// output surface (R8).
+///
+/// See `RenderTarget`.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct AlphaRenderTarget {
+ pub clip_batcher: ClipBatcher,
+ // List of blur operations to apply for this render target.
+ pub vertical_blurs: Vec<BlurInstance>,
+ pub horizontal_blurs: Vec<BlurInstance>,
+ pub scalings: FastHashMap<TextureSource, Vec<ScalingInstance>>,
+ pub zero_clears: Vec<RenderTaskId>,
+ pub one_clears: Vec<RenderTaskId>,
+ // Track the used rect of the render target, so that
+ // we can set a scissor rect and only clear to the
+ // used portion of the target as an optimization.
+ pub used_rect: DeviceIntRect,
+}
+
+impl RenderTarget for AlphaRenderTarget {
+ fn new(
+ _: DeviceIntSize,
+ gpu_supports_fast_clears: bool,
+ ) -> Self {
+ AlphaRenderTarget {
+ clip_batcher: ClipBatcher::new(gpu_supports_fast_clears),
+ vertical_blurs: Vec::new(),
+ horizontal_blurs: Vec::new(),
+ scalings: FastHashMap::default(),
+ zero_clears: Vec::new(),
+ one_clears: Vec::new(),
+ used_rect: DeviceIntRect::zero(),
+ }
+ }
+
+ fn add_task(
+ &mut self,
+ task_id: RenderTaskId,
+ ctx: &RenderTargetContext,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &RenderTaskGraph,
+ clip_store: &ClipStore,
+ transforms: &mut TransformPalette,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+ ) {
+ profile_scope!("add_task");
+ let task = &render_tasks[task_id];
+ let (target_rect, _) = task.get_target_rect();
+
+ match task.clear_mode {
+ ClearMode::Zero => {
+ self.zero_clears.push(task_id);
+ }
+ ClearMode::One => {
+ self.one_clears.push(task_id);
+ }
+ ClearMode::DontCare => {}
+ ClearMode::Transparent => {
+ panic!("bug: invalid clear mode for alpha task");
+ }
+ }
+
+ match task.kind {
+ RenderTaskKind::Readback(..) |
+ RenderTaskKind::Picture(..) |
+ RenderTaskKind::Blit(..) |
+ RenderTaskKind::Border(..) |
+ RenderTaskKind::LineDecoration(..) |
+ RenderTaskKind::Gradient(..) |
+ RenderTaskKind::SvgFilter(..) => {
+ panic!("BUG: should not be added to alpha target!");
+ }
+ RenderTaskKind::VerticalBlur(..) => {
+ add_blur_instances(
+ &mut self.vertical_blurs,
+ BlurDirection::Vertical,
+ render_tasks.get_task_address(task_id),
+ render_tasks.get_task_address(task.children[0]),
+ );
+ }
+ RenderTaskKind::HorizontalBlur(..) => {
+ add_blur_instances(
+ &mut self.horizontal_blurs,
+ BlurDirection::Horizontal,
+ render_tasks.get_task_address(task_id),
+ render_tasks.get_task_address(task.children[0]),
+ );
+ }
+ RenderTaskKind::CacheMask(ref task_info) => {
+ self.clip_batcher.add(
+ task_info.clip_node_range,
+ task_info.root_spatial_node_index,
+ ctx.resource_cache,
+ gpu_cache,
+ clip_store,
+ ctx.spatial_tree,
+ transforms,
+ &ctx.data_stores.clip,
+ task_info.actual_rect,
+ &ctx.screen_world_rect,
+ task_info.device_pixel_scale,
+ target_rect.origin.to_f32(),
+ task_info.actual_rect.origin.to_f32(),
+ );
+ }
+ RenderTaskKind::ClipRegion(ref region_task) => {
+ let device_rect = DeviceRect::new(
+ DevicePoint::zero(),
+ target_rect.size.to_f32(),
+ );
+ self.clip_batcher.add_clip_region(
+ region_task.clip_data_address,
+ region_task.local_pos,
+ device_rect,
+ target_rect.origin.to_f32(),
+ DevicePoint::zero(),
+ region_task.device_pixel_scale.0,
+ );
+ }
+ RenderTaskKind::Scaling(ref info) => {
+ add_scaling_instances(
+ info,
+ &mut self.scalings,
+ task,
+ task.children.first().map(|&child| &render_tasks[child]),
+ ctx.resource_cache,
+ gpu_cache,
+ deferred_resolves,
+ );
+ }
+ #[cfg(test)]
+ RenderTaskKind::Test(..) => {}
+ }
+ }
+
+ fn needs_depth(&self) -> bool {
+ false
+ }
+
+ fn used_rect(&self) -> DeviceIntRect {
+ self.used_rect
+ }
+
+ fn add_used(&mut self, rect: DeviceIntRect) {
+ self.used_rect = self.used_rect.union(&rect);
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PictureCacheTarget {
+ pub surface: ResolvedSurfaceTexture,
+ pub alpha_batch_container: AlphaBatchContainer,
+ pub clear_color: Option<ColorF>,
+ pub dirty_rect: DeviceIntRect,
+ pub valid_rect: DeviceIntRect,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct TextureCacheRenderTarget {
+ pub target_kind: RenderTargetKind,
+ pub horizontal_blurs: Vec<BlurInstance>,
+ pub blits: Vec<BlitJob>,
+ pub border_segments_complex: Vec<BorderInstance>,
+ pub border_segments_solid: Vec<BorderInstance>,
+ pub clears: Vec<DeviceIntRect>,
+ pub line_decorations: Vec<LineDecorationJob>,
+ pub gradients: Vec<GradientJob>,
+}
+
+impl TextureCacheRenderTarget {
+ pub fn new(target_kind: RenderTargetKind) -> Self {
+ TextureCacheRenderTarget {
+ target_kind,
+ horizontal_blurs: vec![],
+ blits: vec![],
+ border_segments_complex: vec![],
+ border_segments_solid: vec![],
+ clears: vec![],
+ line_decorations: vec![],
+ gradients: vec![],
+ }
+ }
+
+ pub fn add_task(
+ &mut self,
+ task_id: RenderTaskId,
+ render_tasks: &mut RenderTaskGraph,
+ ) {
+ profile_scope!("add_task");
+ let task_address = render_tasks.get_task_address(task_id);
+ let src_task_address = render_tasks[task_id].children.get(0).map(|src_task_id| {
+ render_tasks.get_task_address(*src_task_id)
+ });
+
+ let task = &mut render_tasks[task_id];
+ let target_rect = task.get_target_rect();
+
+ match task.kind {
+ RenderTaskKind::LineDecoration(ref info) => {
+ self.clears.push(target_rect.0);
+
+ self.line_decorations.push(LineDecorationJob {
+ task_rect: target_rect.0.to_f32(),
+ local_size: info.local_size,
+ style: info.style as i32,
+ axis_select: match info.orientation {
+ LineOrientation::Horizontal => 0.0,
+ LineOrientation::Vertical => 1.0,
+ },
+ wavy_line_thickness: info.wavy_line_thickness,
+ });
+ }
+ RenderTaskKind::HorizontalBlur(..) => {
+ add_blur_instances(
+ &mut self.horizontal_blurs,
+ BlurDirection::Horizontal,
+ task_address,
+ src_task_address.unwrap(),
+ );
+ }
+ RenderTaskKind::Blit(ref task_info) => {
+ match task_info.source {
+ BlitSource::Image { .. } => {
+ // reading/writing from the texture cache at the same time
+ // is undefined behavior.
+ panic!("bug: a single blit cannot be to/from texture cache");
+ }
+ BlitSource::RenderTask { task_id } => {
+ // Add a blit job to copy from an existing render
+ // task to this target.
+ self.blits.push(BlitJob {
+ source: BlitJobSource::RenderTask(task_id),
+ target_rect: target_rect.0.inner_rect(task_info.padding),
+ });
+ }
+ }
+ }
+ RenderTaskKind::Border(ref mut task_info) => {
+ self.clears.push(target_rect.0);
+
+ let task_origin = target_rect.0.origin.to_f32();
+ let instances = mem::replace(&mut task_info.instances, Vec::new());
+ for mut instance in instances {
+ // TODO(gw): It may be better to store the task origin in
+ // the render task data instead of per instance.
+ instance.task_origin = task_origin;
+ if instance.flags & STYLE_MASK == STYLE_SOLID {
+ self.border_segments_solid.push(instance);
+ } else {
+ self.border_segments_complex.push(instance);
+ }
+ }
+ }
+ RenderTaskKind::Gradient(ref task_info) => {
+ let mut stops = [0.0; 4];
+ let mut colors = [PremultipliedColorF::BLACK; 4];
+
+ let axis_select = match task_info.orientation {
+ LineOrientation::Horizontal => 0.0,
+ LineOrientation::Vertical => 1.0,
+ };
+
+ for (stop, (offset, color)) in task_info.stops.iter().zip(stops.iter_mut().zip(colors.iter_mut())) {
+ *offset = stop.offset;
+ *color = ColorF::from(stop.color).premultiplied();
+ }
+
+ self.gradients.push(GradientJob {
+ task_rect: target_rect.0.to_f32(),
+ axis_select,
+ stops,
+ colors,
+ start_stop: [task_info.start_point, task_info.end_point],
+ });
+ }
+ RenderTaskKind::VerticalBlur(..) |
+ RenderTaskKind::Picture(..) |
+ RenderTaskKind::ClipRegion(..) |
+ RenderTaskKind::CacheMask(..) |
+ RenderTaskKind::Readback(..) |
+ RenderTaskKind::Scaling(..) |
+ RenderTaskKind::SvgFilter(..) => {
+ panic!("BUG: unexpected task kind for texture cache target");
+ }
+ #[cfg(test)]
+ RenderTaskKind::Test(..) => {}
+ }
+ }
+}
+
+fn add_blur_instances(
+ instances: &mut Vec<BlurInstance>,
+ blur_direction: BlurDirection,
+ task_address: RenderTaskAddress,
+ src_task_address: RenderTaskAddress,
+) {
+ let instance = BlurInstance {
+ task_address,
+ src_task_address,
+ blur_direction,
+ };
+
+ instances.push(instance);
+}
+
+fn add_scaling_instances(
+ task: &ScalingTask,
+ instances: &mut FastHashMap<TextureSource, Vec<ScalingInstance>>,
+ target_task: &RenderTask,
+ source_task: Option<&RenderTask>,
+ resource_cache: &ResourceCache,
+ gpu_cache: &mut GpuCache,
+ deferred_resolves: &mut Vec<DeferredResolve>,
+) {
+ let target_rect = target_task
+ .get_target_rect()
+ .0
+ .inner_rect(task.padding)
+ .to_f32();
+
+ let (source, (source_rect, source_layer)) = match task.image {
+ Some(key) => {
+ assert!(source_task.is_none());
+
+ // Get the cache item for the source texture.
+ let cache_item = resolve_image(
+ key.request,
+ resource_cache,
+ gpu_cache,
+ deferred_resolves,
+ );
+
+ // Work out a source rect to copy from the texture, depending on whether
+ // a sub-rect is present or not.
+ let source_rect = key.texel_rect.map_or(cache_item.uv_rect, |sub_rect| {
+ DeviceIntRect::new(
+ DeviceIntPoint::new(
+ cache_item.uv_rect.origin.x + sub_rect.origin.x,
+ cache_item.uv_rect.origin.y + sub_rect.origin.y,
+ ),
+ sub_rect.size,
+ )
+ });
+
+ (
+ cache_item.texture_id,
+ (source_rect, cache_item.texture_layer as LayerIndex),
+ )
+ }
+ None => {
+ (
+ match task.target_kind {
+ RenderTargetKind::Color => TextureSource::PrevPassColor,
+ RenderTargetKind::Alpha => TextureSource::PrevPassAlpha,
+ },
+ source_task.unwrap().location.to_source_rect(),
+ )
+ }
+ };
+
+ instances
+ .entry(source)
+ .or_insert(Vec::new())
+ .push(ScalingInstance {
+ target_rect,
+ source_rect,
+ source_layer: source_layer as i32,
+ });
+}
+
+fn add_svg_filter_instances(
+ instances: &mut Vec<(BatchTextures, Vec<SvgFilterInstance>)>,
+ render_tasks: &RenderTaskGraph,
+ filter: &SvgFilterInfo,
+ task_id: RenderTaskId,
+ input_1_task: Option<RenderTaskId>,
+ input_2_task: Option<RenderTaskId>,
+ extra_data_address: Option<GpuCacheAddress>,
+) {
+ let mut textures = BatchTextures::no_texture();
+
+ if let Some(saved_index) = input_1_task.map(|id| &render_tasks[id].saved_index) {
+ textures.colors[0] = match saved_index {
+ Some(saved_index) => TextureSource::RenderTaskCache(*saved_index, Swizzle::default()),
+ None => TextureSource::PrevPassColor,
+ };
+ }
+
+ if let Some(saved_index) = input_2_task.map(|id| &render_tasks[id].saved_index) {
+ textures.colors[1] = match saved_index {
+ Some(saved_index) => TextureSource::RenderTaskCache(*saved_index, Swizzle::default()),
+ None => TextureSource::PrevPassColor,
+ };
+ }
+
+ let kind = match filter {
+ SvgFilterInfo::Blend(..) => 0,
+ SvgFilterInfo::Flood(..) => 1,
+ SvgFilterInfo::LinearToSrgb => 2,
+ SvgFilterInfo::SrgbToLinear => 3,
+ SvgFilterInfo::Opacity(..) => 4,
+ SvgFilterInfo::ColorMatrix(..) => 5,
+ SvgFilterInfo::DropShadow(..) => 6,
+ SvgFilterInfo::Offset(..) => 7,
+ SvgFilterInfo::ComponentTransfer(..) => 8,
+ SvgFilterInfo::Identity => 9,
+ SvgFilterInfo::Composite(..) => 10,
+ };
+
+ let input_count = match filter {
+ SvgFilterInfo::Flood(..) => 0,
+
+ SvgFilterInfo::LinearToSrgb |
+ SvgFilterInfo::SrgbToLinear |
+ SvgFilterInfo::Opacity(..) |
+ SvgFilterInfo::ColorMatrix(..) |
+ SvgFilterInfo::Offset(..) |
+ SvgFilterInfo::ComponentTransfer(..) |
+ SvgFilterInfo::Identity => 1,
+
+ // Not techincally a 2 input filter, but we have 2 inputs here: original content & blurred content.
+ SvgFilterInfo::DropShadow(..) |
+ SvgFilterInfo::Blend(..) |
+ SvgFilterInfo::Composite(..) => 2,
+ };
+
+ let generic_int = match filter {
+ SvgFilterInfo::Blend(mode) => *mode as u16,
+ SvgFilterInfo::ComponentTransfer(data) =>
+ ((data.r_func.to_int() << 12 |
+ data.g_func.to_int() << 8 |
+ data.b_func.to_int() << 4 |
+ data.a_func.to_int()) as u16),
+ SvgFilterInfo::Composite(operator) =>
+ operator.as_int() as u16,
+ SvgFilterInfo::LinearToSrgb |
+ SvgFilterInfo::SrgbToLinear |
+ SvgFilterInfo::Flood(..) |
+ SvgFilterInfo::Opacity(..) |
+ SvgFilterInfo::ColorMatrix(..) |
+ SvgFilterInfo::DropShadow(..) |
+ SvgFilterInfo::Offset(..) |
+ SvgFilterInfo::Identity => 0,
+ };
+
+ let instance = SvgFilterInstance {
+ task_address: render_tasks.get_task_address(task_id),
+ input_1_task_address: input_1_task.map(|id| render_tasks.get_task_address(id)).unwrap_or(RenderTaskAddress(0)),
+ input_2_task_address: input_2_task.map(|id| render_tasks.get_task_address(id)).unwrap_or(RenderTaskAddress(0)),
+ kind,
+ input_count,
+ generic_int,
+ extra_data_address: extra_data_address.unwrap_or(GpuCacheAddress::INVALID),
+ };
+
+ for (ref mut batch_textures, ref mut batch) in instances.iter_mut() {
+ if let Some(combined_textures) = batch_textures.combine_textures(textures) {
+ batch.push(instance);
+ // Update the batch textures to the newly combined batch textures
+ *batch_textures = combined_textures;
+ return;
+ }
+ }
+
+ instances.push((textures, vec![instance]));
+}
+
+// Defines where the source data for a blit job can be found.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum BlitJobSource {
+ Texture(TextureSource, i32, DeviceIntRect),
+ RenderTask(RenderTaskId),
+}
+
+// Information required to do a blit from a source to a target.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BlitJob {
+ pub source: BlitJobSource,
+ pub target_rect: DeviceIntRect,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug)]
+pub struct LineDecorationJob {
+ pub task_rect: DeviceRect,
+ pub local_size: LayoutSize,
+ pub wavy_line_thickness: f32,
+ pub style: i32,
+ pub axis_select: f32,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[repr(C)]
+pub struct GradientJob {
+ pub task_rect: DeviceRect,
+ pub stops: [f32; GRADIENT_FP_STOPS],
+ pub colors: [PremultipliedColorF; GRADIENT_FP_STOPS],
+ pub axis_select: f32,
+ pub start_stop: [f32; 2],
+}
+
+/// Frame output information for a given pipeline ID.
+/// Storing the task ID allows the renderer to find
+/// the target rect within the render target that this
+/// pipeline exists at.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct FrameOutput {
+ pub task_id: RenderTaskId,
+ pub pipeline_id: PipelineId,
+}
diff --git a/third_party/webrender/webrender/src/render_task.rs b/third_party/webrender/webrender/src/render_task.rs
new file mode 100644
index 00000000000..acfae0ebae6
--- /dev/null
+++ b/third_party/webrender/webrender/src/render_task.rs
@@ -0,0 +1,1564 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{CompositeOperator, FilterPrimitive, FilterPrimitiveInput, FilterPrimitiveKind};
+use api::{LineStyle, LineOrientation, ClipMode, MixBlendMode, ColorF, ColorSpace};
+use api::units::*;
+use crate::clip::{ClipDataStore, ClipItemKind, ClipStore, ClipNodeRange, ClipNodeFlags};
+use crate::spatial_tree::SpatialNodeIndex;
+use crate::filterdata::SFilterData;
+use crate::frame_builder::FrameBuilderConfig;
+use crate::gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle};
+use crate::gpu_types::{BorderInstance, ImageSource, UvRectKind};
+use crate::internal_types::{CacheTextureId, FastHashMap, LayerIndex, SavedTargetIndex};
+use crate::picture::ResolvedSurfaceTexture;
+use crate::prim_store::{PictureIndex, PrimitiveVisibilityMask};
+use crate::prim_store::image::ImageCacheKey;
+use crate::prim_store::gradient::{GRADIENT_FP_STOPS, GradientStopKey};
+#[cfg(feature = "debugger")]
+use crate::print_tree::{PrintTreePrinter};
+use crate::resource_cache::ResourceCache;
+use std::{usize, f32, i32, u32};
+use crate::render_target::{RenderTargetIndex, RenderTargetKind};
+use crate::render_task_graph::{RenderTaskGraph, RenderTaskId};
+use crate::render_task_cache::{RenderTaskCacheKey, RenderTaskCacheKeyKind};
+use smallvec::SmallVec;
+
+const RENDER_TASK_SIZE_SANITY_CHECK: i32 = 16000;
+const FLOATS_PER_RENDER_TASK_INFO: usize = 8;
+pub const MAX_BLUR_STD_DEVIATION: f32 = 4.0;
+pub const MIN_DOWNSCALING_RT_SIZE: i32 = 8;
+
+fn render_task_sanity_check(size: &DeviceIntSize) {
+ if size.width > RENDER_TASK_SIZE_SANITY_CHECK ||
+ size.height > RENDER_TASK_SIZE_SANITY_CHECK {
+ error!("Attempting to create a render task of size {}x{}", size.width, size.height);
+ panic!();
+ }
+}
+
+#[derive(Debug, Copy, Clone, PartialEq)]
+#[repr(C)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderTaskAddress(pub u16);
+
+/// Identifies the output buffer location for a given `RenderTask`.
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum RenderTaskLocation {
+ /// The `RenderTask` should be drawn to a fixed region in a specific render
+ /// target. This is used for the root `RenderTask`, where the main
+ /// framebuffer is used as the render target.
+ Fixed(DeviceIntRect),
+ /// The `RenderTask` should be drawn to a target provided by the atlas
+ /// allocator. This is the most common case.
+ ///
+ /// The second member specifies the width and height of the task
+ /// output, and the first member is initially left as `None`. During the
+ /// build phase, we invoke `RenderTargetList::alloc()` and store the
+ /// resulting location in the first member. That location identifies the
+ /// render target and the offset of the allocated region within that target.
+ Dynamic(Option<(DeviceIntPoint, RenderTargetIndex)>, DeviceIntSize),
+ /// The output of the `RenderTask` will be persisted beyond this frame, and
+ /// thus should be drawn into the `TextureCache`.
+ TextureCache {
+ /// Which texture in the texture cache should be drawn into.
+ texture: CacheTextureId,
+ /// The target layer in the above texture.
+ layer: LayerIndex,
+ /// The target region within the above layer.
+ rect: DeviceIntRect,
+
+ },
+ /// This render task will be drawn to a picture cache texture that is
+ /// persisted between both frames and scenes, if the content remains valid.
+ PictureCache {
+ /// Describes either a WR texture or a native OS compositor target
+ surface: ResolvedSurfaceTexture,
+ /// Size in device pixels of this picture cache tile.
+ size: DeviceIntSize,
+ },
+}
+
+impl RenderTaskLocation {
+ /// Returns true if this is a dynamic location.
+ pub fn is_dynamic(&self) -> bool {
+ match *self {
+ RenderTaskLocation::Dynamic(..) => true,
+ _ => false,
+ }
+ }
+
+ pub fn size(&self) -> DeviceIntSize {
+ match self {
+ RenderTaskLocation::Fixed(rect) => rect.size,
+ RenderTaskLocation::Dynamic(_, size) => *size,
+ RenderTaskLocation::TextureCache { rect, .. } => rect.size,
+ RenderTaskLocation::PictureCache { size, .. } => *size,
+ }
+ }
+
+ pub fn to_source_rect(&self) -> (DeviceIntRect, LayerIndex) {
+ match *self {
+ RenderTaskLocation::Fixed(rect) => (rect, 0),
+ RenderTaskLocation::Dynamic(None, _) => panic!("Expected position to be set for the task!"),
+ RenderTaskLocation::Dynamic(Some((origin, layer)), size) => (DeviceIntRect::new(origin, size), layer.0 as LayerIndex),
+ RenderTaskLocation::TextureCache { rect, layer, .. } => (rect, layer),
+ RenderTaskLocation::PictureCache { .. } => {
+ panic!("bug: picture cache tasks should never be a source!");
+ }
+ }
+ }
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct CacheMaskTask {
+ pub actual_rect: DeviceIntRect,
+ pub root_spatial_node_index: SpatialNodeIndex,
+ pub clip_node_range: ClipNodeRange,
+ pub device_pixel_scale: DevicePixelScale,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ClipRegionTask {
+ pub clip_data_address: GpuCacheAddress,
+ pub local_pos: LayoutPoint,
+ pub device_pixel_scale: DevicePixelScale,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PictureTask {
+ pub pic_index: PictureIndex,
+ pub can_merge: bool,
+ pub content_origin: DeviceIntPoint,
+ pub uv_rect_handle: GpuCacheHandle,
+ pub surface_spatial_node_index: SpatialNodeIndex,
+ uv_rect_kind: UvRectKind,
+ pub device_pixel_scale: DevicePixelScale,
+ /// A bitfield that describes which dirty regions should be included
+ /// in batches built for this picture task.
+ pub vis_mask: PrimitiveVisibilityMask,
+ pub scissor_rect: Option<DeviceIntRect>,
+ pub valid_rect: Option<DeviceIntRect>,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BlurTask {
+ pub blur_std_deviation: f32,
+ pub target_kind: RenderTargetKind,
+ pub uv_rect_handle: GpuCacheHandle,
+ pub blur_region: DeviceIntSize,
+ uv_rect_kind: UvRectKind,
+}
+
+impl BlurTask {
+ #[cfg(feature = "debugger")]
+ fn print_with<T: PrintTreePrinter>(&self, pt: &mut T) {
+ pt.add_item(format!("std deviation: {}", self.blur_std_deviation));
+ pt.add_item(format!("target: {:?}", self.target_kind));
+ }
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ScalingTask {
+ pub target_kind: RenderTargetKind,
+ pub image: Option<ImageCacheKey>,
+ uv_rect_kind: UvRectKind,
+ pub padding: DeviceIntSideOffsets,
+}
+
+// Where the source data for a blit task can be found.
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum BlitSource {
+ Image {
+ key: ImageCacheKey,
+ },
+ RenderTask {
+ task_id: RenderTaskId,
+ },
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BorderTask {
+ pub instances: Vec<BorderInstance>,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct BlitTask {
+ pub source: BlitSource,
+ pub padding: DeviceIntSideOffsets,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct GradientTask {
+ pub stops: [GradientStopKey; GRADIENT_FP_STOPS],
+ pub orientation: LineOrientation,
+ pub start_point: f32,
+ pub end_point: f32,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct LineDecorationTask {
+ pub wavy_line_thickness: f32,
+ pub style: LineStyle,
+ pub orientation: LineOrientation,
+ pub local_size: LayoutSize,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum SvgFilterInfo {
+ Blend(MixBlendMode),
+ Flood(ColorF),
+ LinearToSrgb,
+ SrgbToLinear,
+ Opacity(f32),
+ ColorMatrix(Box<[f32; 20]>),
+ DropShadow(ColorF),
+ Offset(DeviceVector2D),
+ ComponentTransfer(SFilterData),
+ Composite(CompositeOperator),
+ // TODO: This is used as a hack to ensure that a blur task's input is always in the blur's previous pass.
+ Identity,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct SvgFilterTask {
+ pub info: SvgFilterInfo,
+ pub extra_gpu_cache_handle: Option<GpuCacheHandle>,
+ pub uv_rect_handle: GpuCacheHandle,
+ uv_rect_kind: UvRectKind,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderTaskData {
+ pub data: [f32; FLOATS_PER_RENDER_TASK_INFO],
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum RenderTaskKind {
+ Picture(PictureTask),
+ CacheMask(CacheMaskTask),
+ ClipRegion(ClipRegionTask),
+ VerticalBlur(BlurTask),
+ HorizontalBlur(BlurTask),
+ Readback(DeviceIntRect),
+ Scaling(ScalingTask),
+ Blit(BlitTask),
+ Border(BorderTask),
+ LineDecoration(LineDecorationTask),
+ Gradient(GradientTask),
+ SvgFilter(SvgFilterTask),
+ #[cfg(test)]
+ Test(RenderTargetKind),
+}
+
+impl RenderTaskKind {
+ pub fn as_str(&self) -> &'static str {
+ match *self {
+ RenderTaskKind::Picture(..) => "Picture",
+ RenderTaskKind::CacheMask(..) => "CacheMask",
+ RenderTaskKind::ClipRegion(..) => "ClipRegion",
+ RenderTaskKind::VerticalBlur(..) => "VerticalBlur",
+ RenderTaskKind::HorizontalBlur(..) => "HorizontalBlur",
+ RenderTaskKind::Readback(..) => "Readback",
+ RenderTaskKind::Scaling(..) => "Scaling",
+ RenderTaskKind::Blit(..) => "Blit",
+ RenderTaskKind::Border(..) => "Border",
+ RenderTaskKind::LineDecoration(..) => "LineDecoration",
+ RenderTaskKind::Gradient(..) => "Gradient",
+ RenderTaskKind::SvgFilter(..) => "SvgFilter",
+ #[cfg(test)]
+ RenderTaskKind::Test(..) => "Test",
+ }
+ }
+}
+
+#[derive(Debug, Copy, Clone, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum ClearMode {
+ // Applicable to color and alpha targets.
+ Zero,
+ One,
+ /// This task doesn't care what it is cleared to - it will completely overwrite it.
+ DontCare,
+
+ // Applicable to color targets only.
+ Transparent,
+}
+
+/// In order to avoid duplicating the down-scaling and blur passes when a picture has several blurs,
+/// we use a local (primitive-level) cache of the render tasks generated for a single shadowed primitive
+/// in a single frame.
+pub type BlurTaskCache = FastHashMap<BlurTaskKey, RenderTaskId>;
+
+/// Since we only use it within a single primitive, the key only needs to contain the down-scaling level
+/// and the blur std deviation.
+#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
+pub enum BlurTaskKey {
+ DownScale(u32),
+ Blur { downscale_level: u32, stddev_x: u32, stddev_y: u32 },
+}
+
+impl BlurTaskKey {
+ fn downscale_and_blur(downscale_level: u32, blur_stddev: DeviceSize) -> Self {
+ // Quantise the std deviations and store it as integers to work around
+ // Eq and Hash's f32 allergy.
+ // The blur radius is rounded before RenderTask::new_blur so we don't need
+ // a lot of precision.
+ const QUANTIZATION_FACTOR: f32 = 1024.0;
+ let stddev_x = (blur_stddev.width * QUANTIZATION_FACTOR) as u32;
+ let stddev_y = (blur_stddev.height * QUANTIZATION_FACTOR) as u32;
+ BlurTaskKey::Blur { downscale_level, stddev_x, stddev_y }
+ }
+}
+
+// The majority of render tasks have 0, 1 or 2 dependencies, except for pictures that
+// typically have dozens to hundreds of dependencies. SmallVec with 2 inline elements
+// avoids many tiny heap allocations in pages with a lot of text shadows and other
+// types of render tasks.
+pub type TaskDependencies = SmallVec<[RenderTaskId;2]>;
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderTask {
+ pub location: RenderTaskLocation,
+ pub children: TaskDependencies,
+ pub kind: RenderTaskKind,
+ pub clear_mode: ClearMode,
+ pub saved_index: Option<SavedTargetIndex>,
+}
+
+impl RenderTask {
+ #[inline]
+ pub fn with_dynamic_location(
+ size: DeviceIntSize,
+ children: TaskDependencies,
+ kind: RenderTaskKind,
+ clear_mode: ClearMode,
+ ) -> Self {
+ render_task_sanity_check(&size);
+
+ RenderTask {
+ location: RenderTaskLocation::Dynamic(None, size),
+ children,
+ kind,
+ clear_mode,
+ saved_index: None,
+ }
+ }
+
+ #[cfg(test)]
+ pub fn new_test(
+ target: RenderTargetKind,
+ location: RenderTaskLocation,
+ children: TaskDependencies,
+ ) -> Self {
+ RenderTask {
+ location,
+ children,
+ kind: RenderTaskKind::Test(target),
+ clear_mode: ClearMode::Transparent,
+ saved_index: None,
+ }
+ }
+
+ pub fn new_picture(
+ location: RenderTaskLocation,
+ unclipped_size: DeviceSize,
+ pic_index: PictureIndex,
+ content_origin: DeviceIntPoint,
+ uv_rect_kind: UvRectKind,
+ surface_spatial_node_index: SpatialNodeIndex,
+ device_pixel_scale: DevicePixelScale,
+ vis_mask: PrimitiveVisibilityMask,
+ scissor_rect: Option<DeviceIntRect>,
+ valid_rect: Option<DeviceIntRect>,
+ ) -> Self {
+ let size = match location {
+ RenderTaskLocation::Dynamic(_, size) => size,
+ RenderTaskLocation::Fixed(rect) => rect.size,
+ RenderTaskLocation::TextureCache { rect, .. } => rect.size,
+ RenderTaskLocation::PictureCache { size, .. } => size,
+ };
+
+ render_task_sanity_check(&size);
+
+ let can_merge = size.width as f32 >= unclipped_size.width &&
+ size.height as f32 >= unclipped_size.height;
+
+ RenderTask {
+ location,
+ children: TaskDependencies::new(),
+ kind: RenderTaskKind::Picture(PictureTask {
+ pic_index,
+ content_origin,
+ can_merge,
+ uv_rect_handle: GpuCacheHandle::new(),
+ uv_rect_kind,
+ surface_spatial_node_index,
+ device_pixel_scale,
+ vis_mask,
+ scissor_rect,
+ valid_rect,
+ }),
+ clear_mode: ClearMode::Transparent,
+ saved_index: None,
+ }
+ }
+
+ pub fn new_gradient(
+ size: DeviceIntSize,
+ stops: [GradientStopKey; GRADIENT_FP_STOPS],
+ orientation: LineOrientation,
+ start_point: f32,
+ end_point: f32,
+ ) -> Self {
+ RenderTask::with_dynamic_location(
+ size,
+ TaskDependencies::new(),
+ RenderTaskKind::Gradient(GradientTask {
+ stops,
+ orientation,
+ start_point,
+ end_point,
+ }),
+ ClearMode::DontCare,
+ )
+ }
+
+ pub fn new_readback(screen_rect: DeviceIntRect) -> Self {
+ RenderTask::with_dynamic_location(
+ screen_rect.size,
+ TaskDependencies::new(),
+ RenderTaskKind::Readback(screen_rect),
+ ClearMode::Transparent,
+ )
+ }
+
+ pub fn new_blit(
+ size: DeviceIntSize,
+ source: BlitSource,
+ ) -> Self {
+ RenderTask::new_blit_with_padding(size, DeviceIntSideOffsets::zero(), source)
+ }
+
+ pub fn new_blit_with_padding(
+ padded_size: DeviceIntSize,
+ padding: DeviceIntSideOffsets,
+ source: BlitSource,
+ ) -> Self {
+ // If this blit uses a render task as a source,
+ // ensure it's added as a child task. This will
+ // ensure it gets allocated in the correct pass
+ // and made available as an input when this task
+ // executes.
+ let children = match source {
+ BlitSource::RenderTask { task_id } => smallvec![task_id],
+ BlitSource::Image { .. } => smallvec![],
+ };
+
+ RenderTask::with_dynamic_location(
+ padded_size,
+ children,
+ RenderTaskKind::Blit(BlitTask {
+ source,
+ padding,
+ }),
+ ClearMode::Transparent,
+ )
+ }
+
+ pub fn new_line_decoration(
+ size: DeviceIntSize,
+ style: LineStyle,
+ orientation: LineOrientation,
+ wavy_line_thickness: f32,
+ local_size: LayoutSize,
+ ) -> Self {
+ RenderTask::with_dynamic_location(
+ size,
+ TaskDependencies::new(),
+ RenderTaskKind::LineDecoration(LineDecorationTask {
+ style,
+ orientation,
+ wavy_line_thickness,
+ local_size,
+ }),
+ ClearMode::Transparent,
+ )
+ }
+
+ pub fn new_mask(
+ outer_rect: DeviceIntRect,
+ clip_node_range: ClipNodeRange,
+ root_spatial_node_index: SpatialNodeIndex,
+ clip_store: &mut ClipStore,
+ gpu_cache: &mut GpuCache,
+ resource_cache: &mut ResourceCache,
+ render_tasks: &mut RenderTaskGraph,
+ clip_data_store: &mut ClipDataStore,
+ device_pixel_scale: DevicePixelScale,
+ fb_config: &FrameBuilderConfig,
+ ) -> RenderTaskId {
+ // Step through the clip sources that make up this mask. If we find
+ // any box-shadow clip sources, request that image from the render
+ // task cache. This allows the blurred box-shadow rect to be cached
+ // in the texture cache across frames.
+ // TODO(gw): Consider moving this logic outside this function, especially
+ // as we add more clip sources that depend on render tasks.
+ // TODO(gw): If this ever shows up in a profile, we could pre-calculate
+ // whether a ClipSources contains any box-shadows and skip
+ // this iteration for the majority of cases.
+ let mut needs_clear = fb_config.gpu_supports_fast_clears;
+
+ for i in 0 .. clip_node_range.count {
+ let clip_instance = clip_store.get_instance_from_range(&clip_node_range, i);
+ let clip_node = &mut clip_data_store[clip_instance.handle];
+ match clip_node.item.kind {
+ ClipItemKind::BoxShadow { ref mut source } => {
+ let (cache_size, cache_key) = source.cache_key
+ .as_ref()
+ .expect("bug: no cache key set")
+ .clone();
+ let blur_radius_dp = cache_key.blur_radius_dp as f32;
+ let clip_data_address = gpu_cache.get_address(&source.clip_data_handle);
+
+ // Request a cacheable render task with a blurred, minimal
+ // sized box-shadow rect.
+ source.cache_handle = Some(resource_cache.request_render_task(
+ RenderTaskCacheKey {
+ size: cache_size,
+ kind: RenderTaskCacheKeyKind::BoxShadow(cache_key),
+ },
+ gpu_cache,
+ render_tasks,
+ None,
+ false,
+ |render_tasks| {
+ // Draw the rounded rect.
+ let mask_task_id = render_tasks.add().init(RenderTask::new_rounded_rect_mask(
+ cache_size,
+ clip_data_address,
+ source.minimal_shadow_rect.origin,
+ device_pixel_scale,
+ fb_config,
+ ));
+
+ // Blur it
+ RenderTask::new_blur(
+ DeviceSize::new(blur_radius_dp, blur_radius_dp),
+ mask_task_id,
+ render_tasks,
+ RenderTargetKind::Alpha,
+ ClearMode::Zero,
+ None,
+ cache_size,
+ )
+ }
+ ));
+ }
+ ClipItemKind::Rectangle { mode: ClipMode::Clip, .. } => {
+ if !clip_instance.flags.contains(ClipNodeFlags::SAME_COORD_SYSTEM) {
+ // This is conservative - it's only the case that we actually need
+ // a clear here if we end up adding this mask via add_tiled_clip_mask,
+ // but for simplicity we will just clear if any of these are encountered,
+ // since they are rare.
+ needs_clear = true;
+ }
+ }
+ ClipItemKind::Rectangle { mode: ClipMode::ClipOut, .. } |
+ ClipItemKind::RoundedRectangle { .. } |
+ ClipItemKind::Image { .. } => {}
+ }
+ }
+
+ // If we have a potentially tiled clip mask, clear the mask area first. Otherwise,
+ // the first (primary) clip mask will overwrite all the clip mask pixels with
+ // blending disabled to set to the initial value.
+ let clear_mode = if needs_clear {
+ ClearMode::One
+ } else {
+ ClearMode::DontCare
+ };
+
+ render_tasks.add().init(
+ RenderTask::with_dynamic_location(
+ outer_rect.size,
+ smallvec![],
+ RenderTaskKind::CacheMask(CacheMaskTask {
+ actual_rect: outer_rect,
+ clip_node_range,
+ root_spatial_node_index,
+ device_pixel_scale,
+ }),
+ clear_mode,
+ )
+ )
+ }
+
+ pub fn new_rounded_rect_mask(
+ size: DeviceIntSize,
+ clip_data_address: GpuCacheAddress,
+ local_pos: LayoutPoint,
+ device_pixel_scale: DevicePixelScale,
+ fb_config: &FrameBuilderConfig,
+ ) -> Self {
+ let clear_mode = if fb_config.gpu_supports_fast_clears {
+ ClearMode::One
+ } else {
+ ClearMode::DontCare
+ };
+
+ RenderTask::with_dynamic_location(
+ size,
+ TaskDependencies::new(),
+ RenderTaskKind::ClipRegion(ClipRegionTask {
+ clip_data_address,
+ local_pos,
+ device_pixel_scale,
+ }),
+ clear_mode,
+ )
+ }
+
+ // In order to do the blur down-scaling passes without introducing errors, we need the
+ // source of each down-scale pass to be a multuple of two. If need be, this inflates
+ // the source size so that each down-scale pass will sample correctly.
+ pub fn adjusted_blur_source_size(original_size: DeviceSize, mut std_dev: DeviceSize) -> DeviceSize {
+ let mut adjusted_size = original_size;
+ let mut scale_factor = 1.0;
+ while std_dev.width > MAX_BLUR_STD_DEVIATION && std_dev.height > MAX_BLUR_STD_DEVIATION {
+ if adjusted_size.width < MIN_DOWNSCALING_RT_SIZE as f32 ||
+ adjusted_size.height < MIN_DOWNSCALING_RT_SIZE as f32 {
+ break;
+ }
+ std_dev = std_dev * 0.5;
+ scale_factor *= 2.0;
+ adjusted_size = (original_size.to_f32() / scale_factor).ceil();
+ }
+
+ adjusted_size * scale_factor
+ }
+
+ // Construct a render task to apply a blur to a primitive.
+ // The render task chain that is constructed looks like:
+ //
+ // PrimitiveCacheTask: Draw the primitives.
+ // ^
+ // |
+ // DownscalingTask(s): Each downscaling task reduces the size of render target to
+ // ^ half. Also reduce the std deviation to half until the std
+ // | deviation less than 4.0.
+ // |
+ // |
+ // VerticalBlurTask: Apply the separable vertical blur to the primitive.
+ // ^
+ // |
+ // HorizontalBlurTask: Apply the separable horizontal blur to the vertical blur.
+ // |
+ // +---- This is stored as the input task to the primitive shader.
+ //
+ pub fn new_blur(
+ blur_std_deviation: DeviceSize,
+ src_task_id: RenderTaskId,
+ render_tasks: &mut RenderTaskGraph,
+ target_kind: RenderTargetKind,
+ clear_mode: ClearMode,
+ mut blur_cache: Option<&mut BlurTaskCache>,
+ blur_region: DeviceIntSize,
+ ) -> RenderTaskId {
+ // Adjust large std deviation value.
+ let mut adjusted_blur_std_deviation = blur_std_deviation;
+ let (blur_target_size, uv_rect_kind) = {
+ let src_task = &render_tasks[src_task_id];
+ (src_task.get_dynamic_size(), src_task.uv_rect_kind())
+ };
+ let mut adjusted_blur_target_size = blur_target_size;
+ let mut downscaling_src_task_id = src_task_id;
+ let mut scale_factor = 1.0;
+ let mut n_downscales = 1;
+ while adjusted_blur_std_deviation.width > MAX_BLUR_STD_DEVIATION &&
+ adjusted_blur_std_deviation.height > MAX_BLUR_STD_DEVIATION {
+ if adjusted_blur_target_size.width < MIN_DOWNSCALING_RT_SIZE ||
+ adjusted_blur_target_size.height < MIN_DOWNSCALING_RT_SIZE {
+ break;
+ }
+ adjusted_blur_std_deviation = adjusted_blur_std_deviation * 0.5;
+ scale_factor *= 2.0;
+ adjusted_blur_target_size = (blur_target_size.to_f32() / scale_factor).to_i32();
+
+ let cached_task = match blur_cache {
+ Some(ref mut cache) => cache.get(&BlurTaskKey::DownScale(n_downscales)).cloned(),
+ None => None,
+ };
+
+ downscaling_src_task_id = cached_task.unwrap_or_else(|| {
+ RenderTask::new_scaling(
+ downscaling_src_task_id,
+ render_tasks,
+ target_kind,
+ adjusted_blur_target_size,
+ )
+ });
+
+ if let Some(ref mut cache) = blur_cache {
+ cache.insert(BlurTaskKey::DownScale(n_downscales), downscaling_src_task_id);
+ }
+
+ n_downscales += 1;
+ }
+
+
+ let blur_key = BlurTaskKey::downscale_and_blur(n_downscales, adjusted_blur_std_deviation);
+
+ let cached_task = match blur_cache {
+ Some(ref mut cache) => cache.get(&blur_key).cloned(),
+ None => None,
+ };
+
+ let blur_region = blur_region / (scale_factor as i32);
+
+ let blur_task_id = cached_task.unwrap_or_else(|| {
+ let blur_task_v = render_tasks.add().init(RenderTask::with_dynamic_location(
+ adjusted_blur_target_size,
+ smallvec![downscaling_src_task_id],
+ RenderTaskKind::VerticalBlur(BlurTask {
+ blur_std_deviation: adjusted_blur_std_deviation.height,
+ target_kind,
+ uv_rect_handle: GpuCacheHandle::new(),
+ blur_region,
+ uv_rect_kind,
+ }),
+ clear_mode,
+ ));
+
+ render_tasks.add().init(RenderTask::with_dynamic_location(
+ adjusted_blur_target_size,
+ smallvec![blur_task_v],
+ RenderTaskKind::HorizontalBlur(BlurTask {
+ blur_std_deviation: adjusted_blur_std_deviation.width,
+ target_kind,
+ uv_rect_handle: GpuCacheHandle::new(),
+ blur_region,
+ uv_rect_kind,
+ }),
+ clear_mode,
+ ))
+ });
+
+ if let Some(ref mut cache) = blur_cache {
+ cache.insert(blur_key, blur_task_id);
+ }
+
+ blur_task_id
+ }
+
+ pub fn new_border_segment(
+ size: DeviceIntSize,
+ instances: Vec<BorderInstance>,
+ ) -> Self {
+ RenderTask::with_dynamic_location(
+ size,
+ TaskDependencies::new(),
+ RenderTaskKind::Border(BorderTask {
+ instances,
+ }),
+ ClearMode::Transparent,
+ )
+ }
+
+ pub fn new_scaling(
+ src_task_id: RenderTaskId,
+ render_tasks: &mut RenderTaskGraph,
+ target_kind: RenderTargetKind,
+ size: DeviceIntSize,
+ ) -> RenderTaskId {
+ Self::new_scaling_with_padding(
+ BlitSource::RenderTask { task_id: src_task_id },
+ render_tasks,
+ target_kind,
+ size,
+ DeviceIntSideOffsets::zero(),
+ )
+ }
+
+ pub fn new_scaling_with_padding(
+ source: BlitSource,
+ render_tasks: &mut RenderTaskGraph,
+ target_kind: RenderTargetKind,
+ padded_size: DeviceIntSize,
+ padding: DeviceIntSideOffsets,
+ ) -> RenderTaskId {
+ let (uv_rect_kind, children, image) = match source {
+ BlitSource::RenderTask { task_id } => (render_tasks[task_id].uv_rect_kind(), smallvec![task_id], None),
+ BlitSource::Image { key } => (UvRectKind::Rect, smallvec![], Some(key)),
+ };
+
+ render_tasks.add().init(
+ RenderTask::with_dynamic_location(
+ padded_size,
+ children,
+ RenderTaskKind::Scaling(ScalingTask {
+ target_kind,
+ image,
+ uv_rect_kind,
+ padding,
+ }),
+ ClearMode::DontCare,
+ )
+ )
+ }
+
+ pub fn new_svg_filter(
+ filter_primitives: &[FilterPrimitive],
+ filter_datas: &[SFilterData],
+ render_tasks: &mut RenderTaskGraph,
+ content_size: DeviceIntSize,
+ uv_rect_kind: UvRectKind,
+ original_task_id: RenderTaskId,
+ device_pixel_scale: DevicePixelScale,
+ ) -> RenderTaskId {
+
+ if filter_primitives.is_empty() {
+ return original_task_id;
+ }
+
+ // Resolves the input to a filter primitive
+ let get_task_input = |
+ input: &FilterPrimitiveInput,
+ filter_primitives: &[FilterPrimitive],
+ render_tasks: &mut RenderTaskGraph,
+ cur_index: usize,
+ outputs: &[RenderTaskId],
+ original: RenderTaskId,
+ color_space: ColorSpace,
+ | {
+ // TODO(cbrewster): Not sure we can assume that the original input is sRGB.
+ let (mut task_id, input_color_space) = match input.to_index(cur_index) {
+ Some(index) => (outputs[index], filter_primitives[index].color_space),
+ None => (original, ColorSpace::Srgb),
+ };
+
+ match (input_color_space, color_space) {
+ (ColorSpace::Srgb, ColorSpace::LinearRgb) => {
+ task_id = render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::SrgbToLinear,
+ ));
+ },
+ (ColorSpace::LinearRgb, ColorSpace::Srgb) => {
+ task_id = render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::LinearToSrgb,
+ ));
+ },
+ _ => {},
+ }
+
+ task_id
+ };
+
+ let mut outputs = vec![];
+ let mut cur_filter_data = 0;
+ for (cur_index, primitive) in filter_primitives.iter().enumerate() {
+ let render_task_id = match primitive.kind {
+ FilterPrimitiveKind::Identity(ref identity) => {
+ // Identity does not create a task, it provides its input's render task
+ get_task_input(
+ &identity.input,
+ filter_primitives,
+ render_tasks,
+ cur_index,
+ &outputs,
+ original_task_id,
+ primitive.color_space
+ )
+ }
+ FilterPrimitiveKind::Blend(ref blend) => {
+ let input_1_task_id = get_task_input(
+ &blend.input1,
+ filter_primitives,
+ render_tasks,
+ cur_index,
+ &outputs,
+ original_task_id,
+ primitive.color_space
+ );
+ let input_2_task_id = get_task_input(
+ &blend.input2,
+ filter_primitives,
+ render_tasks,
+ cur_index,
+ &outputs,
+ original_task_id,
+ primitive.color_space
+ );
+
+ render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![input_1_task_id, input_2_task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::Blend(blend.mode),
+ ))
+ },
+ FilterPrimitiveKind::Flood(ref flood) => {
+ render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::Flood(flood.color),
+ ))
+ }
+ FilterPrimitiveKind::Blur(ref blur) => {
+ let blur_std_deviation = blur.radius * device_pixel_scale.0;
+ let input_task_id = get_task_input(
+ &blur.input,
+ filter_primitives,
+ render_tasks,
+ cur_index,
+ &outputs,
+ original_task_id,
+ primitive.color_space
+ );
+
+ RenderTask::new_blur(
+ DeviceSize::new(blur_std_deviation, blur_std_deviation),
+ // TODO: This is a hack to ensure that a blur task's input is always
+ // in the blur's previous pass.
+ render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![input_task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::Identity,
+ )),
+ render_tasks,
+ RenderTargetKind::Color,
+ ClearMode::Transparent,
+ None,
+ content_size,
+ )
+ }
+ FilterPrimitiveKind::Opacity(ref opacity) => {
+ let input_task_id = get_task_input(
+ &opacity.input,
+ filter_primitives,
+ render_tasks,
+ cur_index,
+ &outputs,
+ original_task_id,
+ primitive.color_space
+ );
+
+ render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![input_task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::Opacity(opacity.opacity),
+ ))
+ }
+ FilterPrimitiveKind::ColorMatrix(ref color_matrix) => {
+ let input_task_id = get_task_input(
+ &color_matrix.input,
+ filter_primitives,
+ render_tasks,
+ cur_index,
+ &outputs,
+ original_task_id,
+ primitive.color_space
+ );
+
+ render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![input_task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::ColorMatrix(Box::new(color_matrix.matrix)),
+ ))
+ }
+ FilterPrimitiveKind::DropShadow(ref drop_shadow) => {
+ let input_task_id = get_task_input(
+ &drop_shadow.input,
+ filter_primitives,
+ render_tasks,
+ cur_index,
+ &outputs,
+ original_task_id,
+ primitive.color_space
+ );
+
+ let blur_std_deviation = drop_shadow.shadow.blur_radius * device_pixel_scale.0;
+ let offset = drop_shadow.shadow.offset * LayoutToWorldScale::new(1.0) * device_pixel_scale;
+
+ let offset_task_id = render_tasks.add().init(
+ RenderTask::new_svg_filter_primitive(
+ smallvec![input_task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::Offset(offset),
+ )
+ );
+
+ let blur_task_id = RenderTask::new_blur(
+ DeviceSize::new(blur_std_deviation, blur_std_deviation),
+ offset_task_id,
+ render_tasks,
+ RenderTargetKind::Color,
+ ClearMode::Transparent,
+ None,
+ content_size,
+ );
+
+ render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![input_task_id, blur_task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::DropShadow(drop_shadow.shadow.color),
+ ))
+ }
+ FilterPrimitiveKind::ComponentTransfer(ref component_transfer) => {
+ let input_task_id = get_task_input(
+ &component_transfer.input,
+ filter_primitives,
+ render_tasks,
+ cur_index,
+ &outputs,
+ original_task_id,
+ primitive.color_space
+ );
+
+ let filter_data = &filter_datas[cur_filter_data];
+ cur_filter_data += 1;
+ if filter_data.is_identity() {
+ input_task_id
+ } else {
+ render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![input_task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::ComponentTransfer(filter_data.clone()),
+ ))
+ }
+ }
+ FilterPrimitiveKind::Offset(ref info) => {
+ let input_task_id = get_task_input(
+ &info.input,
+ filter_primitives,
+ render_tasks,
+ cur_index,
+ &outputs,
+ original_task_id,
+ primitive.color_space
+ );
+
+ let offset = info.offset * LayoutToWorldScale::new(1.0) * device_pixel_scale;
+ render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![input_task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::Offset(offset),
+ ))
+ }
+ FilterPrimitiveKind::Composite(info) => {
+ let input_1_task_id = get_task_input(
+ &info.input1,
+ filter_primitives,
+ render_tasks,
+ cur_index,
+ &outputs,
+ original_task_id,
+ primitive.color_space
+ );
+ let input_2_task_id = get_task_input(
+ &info.input2,
+ filter_primitives,
+ render_tasks,
+ cur_index,
+ &outputs,
+ original_task_id,
+ primitive.color_space
+ );
+
+ render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![input_1_task_id, input_2_task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::Composite(info.operator),
+ ))
+ }
+ };
+ outputs.push(render_task_id);
+ }
+
+ // The output of a filter is the output of the last primitive in the chain.
+ let mut render_task_id = *outputs.last().unwrap();
+
+ // Convert to sRGB if needed
+ if filter_primitives.last().unwrap().color_space == ColorSpace::LinearRgb {
+ render_task_id = render_tasks.add().init(RenderTask::new_svg_filter_primitive(
+ smallvec![render_task_id],
+ content_size,
+ uv_rect_kind,
+ SvgFilterInfo::LinearToSrgb,
+ ));
+ }
+
+ render_task_id
+ }
+
+ pub fn new_svg_filter_primitive(
+ tasks: TaskDependencies,
+ target_size: DeviceIntSize,
+ uv_rect_kind: UvRectKind,
+ info: SvgFilterInfo,
+ ) -> Self {
+ RenderTask::with_dynamic_location(
+ target_size,
+ tasks,
+ RenderTaskKind::SvgFilter(SvgFilterTask {
+ extra_gpu_cache_handle: None,
+ uv_rect_handle: GpuCacheHandle::new(),
+ uv_rect_kind,
+ info,
+ }),
+ ClearMode::Transparent,
+ )
+ }
+
+ pub fn uv_rect_kind(&self) -> UvRectKind {
+ match self.kind {
+ RenderTaskKind::CacheMask(..) |
+ RenderTaskKind::Readback(..) => {
+ unreachable!("bug: unexpected render task");
+ }
+
+ RenderTaskKind::Picture(ref task) => {
+ task.uv_rect_kind
+ }
+
+ RenderTaskKind::VerticalBlur(ref task) |
+ RenderTaskKind::HorizontalBlur(ref task) => {
+ task.uv_rect_kind
+ }
+
+ RenderTaskKind::Scaling(ref task) => {
+ task.uv_rect_kind
+ }
+
+ RenderTaskKind::SvgFilter(ref task) => {
+ task.uv_rect_kind
+ }
+
+ RenderTaskKind::ClipRegion(..) |
+ RenderTaskKind::Border(..) |
+ RenderTaskKind::Gradient(..) |
+ RenderTaskKind::LineDecoration(..) |
+ RenderTaskKind::Blit(..) => {
+ UvRectKind::Rect
+ }
+
+ #[cfg(test)]
+ RenderTaskKind::Test(..) => {
+ unreachable!("Unexpected render task");
+ }
+ }
+ }
+
+ // Write (up to) 8 floats of data specific to the type
+ // of render task that is provided to the GPU shaders
+ // via a vertex texture.
+ pub fn write_task_data(&self) -> RenderTaskData {
+ // NOTE: The ordering and layout of these structures are
+ // required to match both the GPU structures declared
+ // in prim_shared.glsl, and also the uses in submit_batch()
+ // in renderer.rs.
+ // TODO(gw): Maybe there's a way to make this stuff a bit
+ // more type-safe. Although, it will always need
+ // to be kept in sync with the GLSL code anyway.
+
+ let data = match self.kind {
+ RenderTaskKind::Picture(ref task) => {
+ // Note: has to match `PICTURE_TYPE_*` in shaders
+ [
+ task.device_pixel_scale.0,
+ task.content_origin.x as f32,
+ task.content_origin.y as f32,
+ ]
+ }
+ RenderTaskKind::CacheMask(ref task) => {
+ [
+ task.device_pixel_scale.0,
+ task.actual_rect.origin.x as f32,
+ task.actual_rect.origin.y as f32,
+ ]
+ }
+ RenderTaskKind::ClipRegion(ref task) => {
+ [
+ task.device_pixel_scale.0,
+ 0.0,
+ 0.0,
+ ]
+ }
+ RenderTaskKind::VerticalBlur(ref task) |
+ RenderTaskKind::HorizontalBlur(ref task) => {
+ [
+ task.blur_std_deviation,
+ task.blur_region.width as f32,
+ task.blur_region.height as f32,
+ ]
+ }
+ RenderTaskKind::Readback(..) |
+ RenderTaskKind::Scaling(..) |
+ RenderTaskKind::Border(..) |
+ RenderTaskKind::LineDecoration(..) |
+ RenderTaskKind::Gradient(..) |
+ RenderTaskKind::Blit(..) => {
+ [0.0; 3]
+ }
+
+
+ RenderTaskKind::SvgFilter(ref task) => {
+ match task.info {
+ SvgFilterInfo::Opacity(opacity) => [opacity, 0.0, 0.0],
+ SvgFilterInfo::Offset(offset) => [offset.x, offset.y, 0.0],
+ _ => [0.0; 3]
+ }
+ }
+
+ #[cfg(test)]
+ RenderTaskKind::Test(..) => {
+ unreachable!();
+ }
+ };
+
+ let (mut target_rect, target_index) = self.get_target_rect();
+ // The primitives inside a fixed-location render task
+ // are already placed to their corresponding positions,
+ // so the shader doesn't need to shift by the origin.
+ if let RenderTaskLocation::Fixed(_) = self.location {
+ target_rect.origin = DeviceIntPoint::origin();
+ }
+
+ RenderTaskData {
+ data: [
+ target_rect.origin.x as f32,
+ target_rect.origin.y as f32,
+ target_rect.size.width as f32,
+ target_rect.size.height as f32,
+ target_index.0 as f32,
+ data[0],
+ data[1],
+ data[2],
+ ]
+ }
+ }
+
+ pub fn get_texture_address(&self, gpu_cache: &GpuCache) -> GpuCacheAddress {
+ match self.kind {
+ RenderTaskKind::Picture(ref info) => {
+ gpu_cache.get_address(&info.uv_rect_handle)
+ }
+ RenderTaskKind::VerticalBlur(ref info) |
+ RenderTaskKind::HorizontalBlur(ref info) => {
+ gpu_cache.get_address(&info.uv_rect_handle)
+ }
+ RenderTaskKind::SvgFilter(ref info) => {
+ gpu_cache.get_address(&info.uv_rect_handle)
+ }
+ RenderTaskKind::ClipRegion(..) |
+ RenderTaskKind::Readback(..) |
+ RenderTaskKind::Scaling(..) |
+ RenderTaskKind::Blit(..) |
+ RenderTaskKind::Border(..) |
+ RenderTaskKind::CacheMask(..) |
+ RenderTaskKind::Gradient(..) |
+ RenderTaskKind::LineDecoration(..) => {
+ panic!("texture handle not supported for this task kind");
+ }
+ #[cfg(test)]
+ RenderTaskKind::Test(..) => {
+ panic!("RenderTask tests aren't expected to exercise this code");
+ }
+ }
+ }
+
+ pub fn get_dynamic_size(&self) -> DeviceIntSize {
+ match self.location {
+ RenderTaskLocation::Fixed(..) => DeviceIntSize::zero(),
+ RenderTaskLocation::Dynamic(_, size) => size,
+ RenderTaskLocation::TextureCache { rect, .. } => rect.size,
+ RenderTaskLocation::PictureCache { size, .. } => size,
+ }
+ }
+
+ pub fn get_target_rect(&self) -> (DeviceIntRect, RenderTargetIndex) {
+ match self.location {
+ RenderTaskLocation::Fixed(rect) => {
+ (rect, RenderTargetIndex(0))
+ }
+ // Previously, we only added render tasks after the entire
+ // primitive chain was determined visible. This meant that
+ // we could assert any render task in the list was also
+ // allocated (assigned to passes). Now, we add render
+ // tasks earlier, and the picture they belong to may be
+ // culled out later, so we can't assert that the task
+ // has been allocated.
+ // Render tasks that are created but not assigned to
+ // passes consume a row in the render task texture, but
+ // don't allocate any space in render targets nor
+ // draw any pixels.
+ // TODO(gw): Consider some kind of tag or other method
+ // to mark a task as unused explicitly. This
+ // would allow us to restore this debug check.
+ RenderTaskLocation::Dynamic(Some((origin, target_index)), size) => {
+ (DeviceIntRect::new(origin, size), target_index)
+ }
+ RenderTaskLocation::Dynamic(None, _) => {
+ (DeviceIntRect::zero(), RenderTargetIndex(0))
+ }
+ RenderTaskLocation::TextureCache {layer, rect, .. } => {
+ (rect, RenderTargetIndex(layer as usize))
+ }
+ RenderTaskLocation::PictureCache { ref surface, size, .. } => {
+ let layer = match surface {
+ ResolvedSurfaceTexture::TextureCache { layer, .. } => *layer,
+ ResolvedSurfaceTexture::Native { .. } => 0,
+ };
+
+ (
+ DeviceIntRect::new(
+ DeviceIntPoint::zero(),
+ size,
+ ),
+ RenderTargetIndex(layer as usize),
+ )
+ }
+ }
+ }
+
+ pub fn target_kind(&self) -> RenderTargetKind {
+ match self.kind {
+ RenderTaskKind::LineDecoration(..) |
+ RenderTaskKind::Readback(..) |
+ RenderTaskKind::Border(..) |
+ RenderTaskKind::Gradient(..) |
+ RenderTaskKind::Picture(..) |
+ RenderTaskKind::Blit(..) |
+ RenderTaskKind::SvgFilter(..) => {
+ RenderTargetKind::Color
+ }
+
+ RenderTaskKind::ClipRegion(..) |
+ RenderTaskKind::CacheMask(..) => {
+ RenderTargetKind::Alpha
+ }
+
+ RenderTaskKind::VerticalBlur(ref task_info) |
+ RenderTaskKind::HorizontalBlur(ref task_info) => {
+ task_info.target_kind
+ }
+
+ RenderTaskKind::Scaling(ref task_info) => {
+ task_info.target_kind
+ }
+
+ #[cfg(test)]
+ RenderTaskKind::Test(kind) => kind,
+ }
+ }
+
+ pub fn write_gpu_blocks(
+ &mut self,
+ gpu_cache: &mut GpuCache,
+ ) {
+ profile_scope!("write_gpu_blocks");
+ let (target_rect, target_index) = self.get_target_rect();
+
+ let (cache_handle, uv_rect_kind) = match self.kind {
+ RenderTaskKind::HorizontalBlur(ref mut info) |
+ RenderTaskKind::VerticalBlur(ref mut info) => {
+ (&mut info.uv_rect_handle, info.uv_rect_kind)
+ }
+ RenderTaskKind::Picture(ref mut info) => {
+ (&mut info.uv_rect_handle, info.uv_rect_kind)
+ }
+ RenderTaskKind::SvgFilter(ref mut info) => {
+ (&mut info.uv_rect_handle, info.uv_rect_kind)
+ }
+ RenderTaskKind::Readback(..) |
+ RenderTaskKind::Scaling(..) |
+ RenderTaskKind::Blit(..) |
+ RenderTaskKind::ClipRegion(..) |
+ RenderTaskKind::Border(..) |
+ RenderTaskKind::CacheMask(..) |
+ RenderTaskKind::Gradient(..) |
+ RenderTaskKind::LineDecoration(..) => {
+ return;
+ }
+ #[cfg(test)]
+ RenderTaskKind::Test(..) => {
+ panic!("RenderTask tests aren't expected to exercise this code");
+ }
+ };
+
+ if let Some(mut request) = gpu_cache.request(cache_handle) {
+ let p0 = target_rect.min().to_f32();
+ let p1 = target_rect.max().to_f32();
+ let image_source = ImageSource {
+ p0,
+ p1,
+ texture_layer: target_index.0 as f32,
+ user_data: [0.0; 3],
+ uv_rect_kind,
+ };
+ image_source.write_gpu_blocks(&mut request);
+ }
+
+ if let RenderTaskKind::SvgFilter(ref mut filter_task) = self.kind {
+ match filter_task.info {
+ SvgFilterInfo::ColorMatrix(ref matrix) => {
+ let handle = filter_task.extra_gpu_cache_handle.get_or_insert_with(GpuCacheHandle::new);
+ if let Some(mut request) = gpu_cache.request(handle) {
+ for i in 0..5 {
+ request.push([matrix[i*4], matrix[i*4+1], matrix[i*4+2], matrix[i*4+3]]);
+ }
+ }
+ }
+ SvgFilterInfo::DropShadow(color) |
+ SvgFilterInfo::Flood(color) => {
+ let handle = filter_task.extra_gpu_cache_handle.get_or_insert_with(GpuCacheHandle::new);
+ if let Some(mut request) = gpu_cache.request(handle) {
+ request.push(color.to_array());
+ }
+ }
+ SvgFilterInfo::ComponentTransfer(ref data) => {
+ let handle = filter_task.extra_gpu_cache_handle.get_or_insert_with(GpuCacheHandle::new);
+ if let Some(request) = gpu_cache.request(handle) {
+ data.update(request);
+ }
+ }
+ SvgFilterInfo::Composite(ref operator) => {
+ if let CompositeOperator::Arithmetic(k_vals) = operator {
+ let handle = filter_task.extra_gpu_cache_handle.get_or_insert_with(GpuCacheHandle::new);
+ if let Some(mut request) = gpu_cache.request(handle) {
+ request.push(*k_vals);
+ }
+ }
+ }
+ _ => {},
+ }
+ }
+ }
+
+ #[cfg(feature = "debugger")]
+ pub fn print_with<T: PrintTreePrinter>(&self, pt: &mut T, tree: &RenderTaskGraph) -> bool {
+ match self.kind {
+ RenderTaskKind::Picture(ref task) => {
+ pt.new_level(format!("Picture of {:?}", task.pic_index));
+ }
+ RenderTaskKind::CacheMask(ref task) => {
+ pt.new_level(format!("CacheMask with {} clips", task.clip_node_range.count));
+ pt.add_item(format!("rect: {:?}", task.actual_rect));
+ }
+ RenderTaskKind::LineDecoration(..) => {
+ pt.new_level("LineDecoration".to_owned());
+ }
+ RenderTaskKind::ClipRegion(..) => {
+ pt.new_level("ClipRegion".to_owned());
+ }
+ RenderTaskKind::VerticalBlur(ref task) => {
+ pt.new_level("VerticalBlur".to_owned());
+ task.print_with(pt);
+ }
+ RenderTaskKind::HorizontalBlur(ref task) => {
+ pt.new_level("HorizontalBlur".to_owned());
+ task.print_with(pt);
+ }
+ RenderTaskKind::Readback(ref rect) => {
+ pt.new_level("Readback".to_owned());
+ pt.add_item(format!("rect: {:?}", rect));
+ }
+ RenderTaskKind::Scaling(ref kind) => {
+ pt.new_level("Scaling".to_owned());
+ pt.add_item(format!("kind: {:?}", kind));
+ }
+ RenderTaskKind::Border(..) => {
+ pt.new_level("Border".to_owned());
+ }
+ RenderTaskKind::Blit(ref task) => {
+ pt.new_level("Blit".to_owned());
+ pt.add_item(format!("source: {:?}", task.source));
+ }
+ RenderTaskKind::Gradient(..) => {
+ pt.new_level("Gradient".to_owned());
+ }
+ RenderTaskKind::SvgFilter(ref task) => {
+ pt.new_level("SvgFilter".to_owned());
+ pt.add_item(format!("primitive: {:?}", task.info));
+ }
+ #[cfg(test)]
+ RenderTaskKind::Test(..) => {
+ pt.new_level("Test".to_owned());
+ }
+ }
+
+ pt.add_item(format!("clear to: {:?}", self.clear_mode));
+ pt.add_item(format!("dimensions: {:?}", self.location.size()));
+
+ for &child_id in &self.children {
+ if tree[child_id].print_with(pt, tree) {
+ pt.add_item(format!("self: {:?}", child_id))
+ }
+ }
+
+ pt.end_level();
+ true
+ }
+
+ /// Mark this render task for keeping the results alive up until the end of the frame.
+ #[inline]
+ pub fn mark_for_saving(&mut self) {
+ match self.location {
+ RenderTaskLocation::Fixed(..) |
+ RenderTaskLocation::Dynamic(..) => {
+ self.saved_index = Some(SavedTargetIndex::PENDING);
+ }
+ RenderTaskLocation::TextureCache { .. } |
+ RenderTaskLocation::PictureCache { .. } => {
+ panic!("Unable to mark a permanently cached task for saving!");
+ }
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/src/render_task_cache.rs b/third_party/webrender/webrender/src/render_task_cache.rs
new file mode 100644
index 00000000000..22ea235e33e
--- /dev/null
+++ b/third_party/webrender/webrender/src/render_task_cache.rs
@@ -0,0 +1,267 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+
+use api::{ImageDescriptor, ImageDescriptorFlags, DirtyRect};
+use api::units::*;
+use crate::border::BorderSegmentCacheKey;
+use crate::box_shadow::{BoxShadowCacheKey};
+use crate::device::TextureFilter;
+use crate::freelist::{FreeList, FreeListHandle, WeakFreeListHandle};
+use crate::gpu_cache::GpuCache;
+use crate::internal_types::FastHashMap;
+use crate::prim_store::image::ImageCacheKey;
+use crate::prim_store::gradient::GradientCacheKey;
+use crate::prim_store::line_dec::LineDecorationCacheKey;
+use crate::resource_cache::CacheItem;
+use std::{mem, usize, f32, i32};
+use crate::texture_cache::{TextureCache, TextureCacheHandle, Eviction};
+use crate::render_target::RenderTargetKind;
+use crate::render_task::{RenderTask, RenderTaskLocation};
+use crate::render_task_graph::{RenderTaskGraph, RenderTaskId};
+
+#[derive(Clone, Debug, Hash, PartialEq, Eq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum RenderTaskCacheKeyKind {
+ BoxShadow(BoxShadowCacheKey),
+ Image(ImageCacheKey),
+ BorderSegment(BorderSegmentCacheKey),
+ LineDecoration(LineDecorationCacheKey),
+ Gradient(GradientCacheKey),
+}
+
+#[derive(Clone, Debug, Hash, PartialEq, Eq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderTaskCacheKey {
+ pub size: DeviceIntSize,
+ pub kind: RenderTaskCacheKeyKind,
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderTaskCacheEntry {
+ user_data: Option<[f32; 3]>,
+ is_opaque: bool,
+ pub handle: TextureCacheHandle,
+}
+
+#[derive(Debug, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub enum RenderTaskCacheMarker {}
+
+// A cache of render tasks that are stored in the texture
+// cache for usage across frames.
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderTaskCache {
+ map: FastHashMap<RenderTaskCacheKey, FreeListHandle<RenderTaskCacheMarker>>,
+ cache_entries: FreeList<RenderTaskCacheEntry, RenderTaskCacheMarker>,
+}
+
+pub type RenderTaskCacheEntryHandle = WeakFreeListHandle<RenderTaskCacheMarker>;
+
+impl RenderTaskCache {
+ pub fn new() -> Self {
+ RenderTaskCache {
+ map: FastHashMap::default(),
+ cache_entries: FreeList::new(),
+ }
+ }
+
+ pub fn clear(&mut self) {
+ self.map.clear();
+ self.cache_entries.clear();
+ }
+
+ pub fn begin_frame(
+ &mut self,
+ texture_cache: &mut TextureCache,
+ ) {
+ profile_scope!("begin_frame");
+ // Drop any items from the cache that have been
+ // evicted from the texture cache.
+ //
+ // This isn't actually necessary for the texture
+ // cache to be able to evict old render tasks.
+ // It will evict render tasks as required, since
+ // the access time in the texture cache entry will
+ // be stale if this task hasn't been requested
+ // for a while.
+ //
+ // Nonetheless, we should remove stale entries
+ // from here so that this hash map doesn't
+ // grow indefinitely!
+ let cache_entries = &mut self.cache_entries;
+
+ self.map.retain(|_, handle| {
+ let retain = texture_cache.is_allocated(
+ &cache_entries.get(handle).handle,
+ );
+ if !retain {
+ let handle = mem::replace(handle, FreeListHandle::invalid());
+ cache_entries.free(handle);
+ }
+ retain
+ });
+ }
+
+ fn alloc_render_task(
+ render_task: &mut RenderTask,
+ entry: &mut RenderTaskCacheEntry,
+ gpu_cache: &mut GpuCache,
+ texture_cache: &mut TextureCache,
+ ) {
+ // Find out what size to alloc in the texture cache.
+ let size = match render_task.location {
+ RenderTaskLocation::Fixed(..) |
+ RenderTaskLocation::PictureCache { .. } |
+ RenderTaskLocation::TextureCache { .. } => {
+ panic!("BUG: dynamic task was expected");
+ }
+ RenderTaskLocation::Dynamic(_, size) => size,
+ };
+
+ // Select the right texture page to allocate from.
+ let image_format = match render_task.target_kind() {
+ RenderTargetKind::Color => texture_cache.shared_color_expected_format(),
+ RenderTargetKind::Alpha => texture_cache.shared_alpha_expected_format(),
+ };
+
+ let flags = if entry.is_opaque {
+ ImageDescriptorFlags::IS_OPAQUE
+ } else {
+ ImageDescriptorFlags::empty()
+ };
+
+ let descriptor = ImageDescriptor::new(
+ size.width,
+ size.height,
+ image_format,
+ flags,
+ );
+
+ // Allocate space in the texture cache, but don't supply
+ // and CPU-side data to be uploaded.
+ texture_cache.update(
+ &mut entry.handle,
+ descriptor,
+ TextureFilter::Linear,
+ None,
+ entry.user_data.unwrap_or([0.0; 3]),
+ DirtyRect::All,
+ gpu_cache,
+ None,
+ render_task.uv_rect_kind(),
+ Eviction::Auto,
+ );
+
+ // Get the allocation details in the texture cache, and store
+ // this in the render task. The renderer will draw this
+ // task into the appropriate layer and rect of the texture
+ // cache on this frame.
+ let (texture_id, texture_layer, uv_rect, _, _) =
+ texture_cache.get_cache_location(&entry.handle);
+
+ render_task.location = RenderTaskLocation::TextureCache {
+ texture: texture_id,
+ layer: texture_layer,
+ rect: uv_rect.to_i32(),
+ };
+ }
+
+ pub fn request_render_task<F>(
+ &mut self,
+ key: RenderTaskCacheKey,
+ texture_cache: &mut TextureCache,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &mut RenderTaskGraph,
+ user_data: Option<[f32; 3]>,
+ is_opaque: bool,
+ f: F,
+ ) -> Result<RenderTaskCacheEntryHandle, ()>
+ where
+ F: FnOnce(&mut RenderTaskGraph) -> Result<RenderTaskId, ()>,
+ {
+ // Get the texture cache handle for this cache key,
+ // or create one.
+ let cache_entries = &mut self.cache_entries;
+ let entry_handle = self.map.entry(key).or_insert_with(|| {
+ let entry = RenderTaskCacheEntry {
+ handle: TextureCacheHandle::invalid(),
+ user_data,
+ is_opaque,
+ };
+ cache_entries.insert(entry)
+ });
+ let cache_entry = cache_entries.get_mut(entry_handle);
+
+ // Check if this texture cache handle is valid.
+ if texture_cache.request(&cache_entry.handle, gpu_cache) {
+ // Invoke user closure to get render task chain
+ // to draw this into the texture cache.
+ let render_task_id = f(render_tasks)?;
+ render_tasks.cacheable_render_tasks.push(render_task_id);
+
+ cache_entry.user_data = user_data;
+ cache_entry.is_opaque = is_opaque;
+
+ RenderTaskCache::alloc_render_task(
+ &mut render_tasks[render_task_id],
+ cache_entry,
+ gpu_cache,
+ texture_cache,
+ );
+ }
+
+ Ok(entry_handle.weak())
+ }
+
+ pub fn get_cache_entry(
+ &self,
+ handle: &RenderTaskCacheEntryHandle,
+ ) -> &RenderTaskCacheEntry {
+ self.cache_entries
+ .get_opt(handle)
+ .expect("bug: invalid render task cache handle")
+ }
+
+ #[allow(dead_code)]
+ pub fn get_cache_item_for_render_task(&self,
+ texture_cache: &TextureCache,
+ key: &RenderTaskCacheKey)
+ -> CacheItem {
+ // Get the texture cache handle for this cache key.
+ let handle = self.map.get(key).unwrap();
+ let cache_entry = self.cache_entries.get(handle);
+ texture_cache.get(&cache_entry.handle)
+ }
+
+ #[allow(dead_code)]
+ pub fn get_allocated_size_for_render_task(&self,
+ texture_cache: &TextureCache,
+ key: &RenderTaskCacheKey)
+ -> Option<usize> {
+ let handle = self.map.get(key).unwrap();
+ let cache_entry = self.cache_entries.get(handle);
+ texture_cache.get_allocated_size(&cache_entry.handle)
+ }
+}
+
+// TODO(gw): Rounding the content rect here to device pixels is not
+// technically correct. Ideally we should ceil() here, and ensure that
+// the extra part pixel in the case of fractional sizes is correctly
+// handled. For now, just use rounding which passes the existing
+// Gecko tests.
+// Note: zero-square tasks are prohibited in WR task graph, so
+// we ensure each dimension to be at least the length of 1 after rounding.
+pub fn to_cache_size(size: DeviceSize) -> DeviceIntSize {
+ DeviceIntSize::new(
+ 1.max(size.width.round() as i32),
+ 1.max(size.height.round() as i32),
+ )
+}
diff --git a/third_party/webrender/webrender/src/render_task_graph.rs b/third_party/webrender/webrender/src/render_task_graph.rs
new file mode 100644
index 00000000000..3058a988386
--- /dev/null
+++ b/third_party/webrender/webrender/src/render_task_graph.rs
@@ -0,0 +1,887 @@
+//! This module contains the render task graph.
+//!
+//! Code associated with creating specific render tasks is in the render_task
+//! module.
+
+use api::ImageFormat;
+use api::units::*;
+use crate::internal_types::{CacheTextureId, FastHashMap, SavedTargetIndex};
+use crate::render_backend::FrameId;
+use crate::render_target::{RenderTarget, RenderTargetKind, RenderTargetList, ColorRenderTarget};
+use crate::render_target::{PictureCacheTarget, TextureCacheRenderTarget, AlphaRenderTarget};
+use crate::render_task::{BlitSource, RenderTask, RenderTaskKind, RenderTaskAddress, RenderTaskData};
+use crate::render_task::{RenderTaskLocation};
+use crate::util::{VecHelper, Allocation};
+use std::{cmp, usize, f32, i32, u32};
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderTaskGraph {
+ pub tasks: Vec<RenderTask>,
+ pub task_data: Vec<RenderTaskData>,
+ /// Tasks that don't have dependencies, and that may be shared between
+ /// picture tasks.
+ ///
+ /// We render these unconditionally before-rendering the rest of the tree.
+ pub cacheable_render_tasks: Vec<RenderTaskId>,
+ next_saved: SavedTargetIndex,
+ frame_id: FrameId,
+}
+
+/// Allows initializing a render task directly into the render task buffer.
+///
+/// See utils::VecHelpers. RenderTask is fairly large so avoiding the move when
+/// pushing into the vector can save a lot of exensive memcpys on pages with many
+/// render tasks.
+pub struct RenderTaskAllocation<'a> {
+ alloc: Allocation<'a, RenderTask>,
+ #[cfg(debug_assertions)]
+ frame_id: FrameId,
+}
+
+impl<'l> RenderTaskAllocation<'l> {
+ #[inline(always)]
+ pub fn init(self, value: RenderTask) -> RenderTaskId {
+ RenderTaskId {
+ index: self.alloc.init(value) as u32,
+ #[cfg(debug_assertions)]
+ frame_id: self.frame_id,
+ }
+ }
+}
+
+impl RenderTaskGraph {
+ pub fn new(frame_id: FrameId, counters: &RenderTaskGraphCounters) -> Self {
+ // Preallocate a little more than what we needed in the previous frame so that small variations
+ // in the number of items don't cause us to constantly reallocate.
+ let extra_items = 8;
+ RenderTaskGraph {
+ tasks: Vec::with_capacity(counters.tasks_len + extra_items),
+ task_data: Vec::with_capacity(counters.task_data_len + extra_items),
+ cacheable_render_tasks: Vec::with_capacity(counters.cacheable_render_tasks_len + extra_items),
+ next_saved: SavedTargetIndex(0),
+ frame_id,
+ }
+ }
+
+ pub fn counters(&self) -> RenderTaskGraphCounters {
+ RenderTaskGraphCounters {
+ tasks_len: self.tasks.len(),
+ task_data_len: self.task_data.len(),
+ cacheable_render_tasks_len: self.cacheable_render_tasks.len(),
+ }
+ }
+
+ pub fn add(&mut self) -> RenderTaskAllocation {
+ RenderTaskAllocation {
+ alloc: self.tasks.alloc(),
+ #[cfg(debug_assertions)]
+ frame_id: self.frame_id,
+ }
+ }
+
+ /// Express a render task dependency between a parent and child task.
+ /// This is used to assign tasks to render passes.
+ pub fn add_dependency(
+ &mut self,
+ parent_id: RenderTaskId,
+ child_id: RenderTaskId,
+ ) {
+ let parent = &mut self[parent_id];
+ parent.children.push(child_id);
+ }
+
+ /// Assign this frame's render tasks to render passes ordered so that passes appear
+ /// earlier than the ones that depend on them.
+ pub fn generate_passes(
+ &mut self,
+ main_render_task: Option<RenderTaskId>,
+ screen_size: DeviceIntSize,
+ gpu_supports_fast_clears: bool,
+ ) -> Vec<RenderPass> {
+ profile_scope!("generate_passes");
+ let mut passes = Vec::new();
+
+ if !self.cacheable_render_tasks.is_empty() {
+ self.generate_passes_impl(
+ &self.cacheable_render_tasks[..],
+ screen_size,
+ gpu_supports_fast_clears,
+ false,
+ &mut passes,
+ );
+ }
+
+ if let Some(main_task) = main_render_task {
+ self.generate_passes_impl(
+ &[main_task],
+ screen_size,
+ gpu_supports_fast_clears,
+ true,
+ &mut passes,
+ );
+ }
+
+
+ self.resolve_target_conflicts(&mut passes);
+
+ passes
+ }
+
+ /// Assign the render tasks from the tree rooted at root_task to render passes and
+ /// append them to the `passes` vector so that the passes that we depend on end up
+ /// _earlier_ in the pass list.
+ fn generate_passes_impl(
+ &self,
+ root_tasks: &[RenderTaskId],
+ screen_size: DeviceIntSize,
+ gpu_supports_fast_clears: bool,
+ for_main_framebuffer: bool,
+ passes: &mut Vec<RenderPass>,
+ ) {
+ // We recursively visit tasks from the roots (main and cached render tasks), to figure out
+ // which ones affect the frame and which passes they should be assigned to.
+ //
+ // We track the maximum depth of each task (how far it is from the roots) as well as the total
+ // maximum depth of the graph to determine each tasks' pass index. In a nutshell, depth 0 is
+ // for the last render pass (for example the main framebuffer), while the highest depth
+ // corresponds to the first pass.
+
+ fn assign_task_depth(
+ tasks: &[RenderTask],
+ task_id: RenderTaskId,
+ task_depth: i32,
+ task_max_depths: &mut [i32],
+ max_depth: &mut i32,
+ ) {
+ *max_depth = std::cmp::max(*max_depth, task_depth);
+
+ let task_max_depth = &mut task_max_depths[task_id.index as usize];
+ if task_depth > *task_max_depth {
+ *task_max_depth = task_depth;
+ } else {
+ // If this task has already been processed at a larger depth,
+ // there is no need to process it again.
+ return;
+ }
+
+ let task = &tasks[task_id.index as usize];
+ for child in &task.children {
+ assign_task_depth(
+ tasks,
+ *child,
+ task_depth + 1,
+ task_max_depths,
+ max_depth,
+ );
+ }
+ }
+
+ // The maximum depth of each task. Values that are still equal to -1 after recursively visiting
+ // the nodes correspond to tasks that don't contribute to the frame.
+ let mut task_max_depths = vec![-1; self.tasks.len()];
+ let mut max_depth = 0;
+
+ for root_task in root_tasks {
+ assign_task_depth(
+ &self.tasks,
+ *root_task,
+ 0,
+ &mut task_max_depths,
+ &mut max_depth,
+ );
+ }
+
+ let offset = passes.len();
+
+ passes.reserve(max_depth as usize + 1);
+ for _ in 0..max_depth {
+ passes.alloc().init(RenderPass::new_off_screen(screen_size, gpu_supports_fast_clears));
+ }
+
+ if for_main_framebuffer {
+ passes.alloc().init(RenderPass::new_main_framebuffer(screen_size, gpu_supports_fast_clears));
+ } else {
+ passes.alloc().init(RenderPass::new_off_screen(screen_size, gpu_supports_fast_clears));
+ }
+
+ // Assign tasks to their render passes.
+ for task_index in 0..self.tasks.len() {
+ if task_max_depths[task_index] < 0 {
+ // The task wasn't visited, it means it doesn't contribute to this frame.
+ continue;
+ }
+ let pass_index = offset + (max_depth - task_max_depths[task_index]) as usize;
+ let task_id = RenderTaskId {
+ index: task_index as u32,
+ #[cfg(debug_assertions)]
+ frame_id: self.frame_id,
+ };
+ let task = &self.tasks[task_index];
+ passes[pass_index as usize].add_render_task(
+ task_id,
+ task.get_dynamic_size(),
+ task.target_kind(),
+ &task.location,
+ );
+ }
+ }
+
+ /// Resolve conflicts between the generated passes and the limitiations of our target
+ /// allocation scheme.
+ ///
+ /// The render task graph operates with a ping-pong target allocation scheme where
+ /// a set of targets is written to by even passes and a different set of targets is
+ /// written to by odd passes.
+ /// Since tasks cannot read and write the same target, we can run into issues if a
+ /// task pass in N + 2 reads the result of a task in pass N.
+ /// To avoid such cases have to insert blit tasks to copy the content of the task
+ /// into pass N + 1 which is readable by pass N + 2.
+ ///
+ /// In addition, allocated rects of pass N are currently not tracked and can be
+ /// overwritten by allocations in later passes on the same target, unless the task
+ /// has been marked for saving, which perserves the allocated rect until the end of
+ /// the frame. This is a big hammer, hopefully we won't need to mark many passes
+ /// for saving. A better solution would be to track allocations through the entire
+ /// graph, there is a prototype of that in https://github.com/nical/toy-render-graph/
+ fn resolve_target_conflicts(&mut self, passes: &mut [RenderPass]) {
+ // Keep track of blit tasks we inserted to avoid adding several blits for the same
+ // task.
+ let mut task_redirects = vec![None; self.tasks.len()];
+
+ let mut task_passes = vec![-1; self.tasks.len()];
+ for pass_index in 0..passes.len() {
+ for task in &passes[pass_index].tasks {
+ task_passes[task.index as usize] = pass_index as i32;
+ }
+ }
+
+ for task_index in 0..self.tasks.len() {
+ if task_passes[task_index] < 0 {
+ // The task doesn't contribute to this frame.
+ continue;
+ }
+
+ let pass_index = task_passes[task_index];
+
+ // Go through each dependency and check whether they belong
+ // to a pass that uses the same targets and/or are more than
+ // one pass behind.
+ for nth_child in 0..self.tasks[task_index].children.len() {
+ let child_task_index = self.tasks[task_index].children[nth_child].index as usize;
+ let child_pass_index = task_passes[child_task_index];
+
+ if child_pass_index == pass_index - 1 {
+ // This should be the most common case.
+ continue;
+ }
+
+ // TODO: Picture tasks don't support having their dependency tasks redirected.
+ // Pictures store their respective render task(s) on their SurfaceInfo.
+ // We cannot blit the picture task here because we would need to update the
+ // surface's render tasks, but we don't have access to that info here.
+ // Also a surface may be expecting a picture task and not a blit task, so
+ // even if we could update the surface's render task(s), it might cause other issues.
+ // For now we mark the task to be saved rather than trying to redirect to a blit task.
+ let task_is_picture = if let RenderTaskKind::Picture(..) = self.tasks[task_index].kind {
+ true
+ } else {
+ false
+ };
+
+ if child_pass_index % 2 != pass_index % 2 || task_is_picture {
+ // The tasks and its dependency aren't on the same targets,
+ // but the dependency needs to be kept alive.
+ self.tasks[child_task_index].mark_for_saving();
+ continue;
+ }
+
+ if let Some(blit_id) = task_redirects[child_task_index] {
+ // We already resolved a similar conflict with a blit task,
+ // reuse the same blit instead of creating a new one.
+ self.tasks[task_index].children[nth_child] = blit_id;
+
+ // Mark for saving if the blit is more than pass appart from
+ // our task.
+ if child_pass_index < pass_index - 2 {
+ self.tasks[blit_id.index as usize].mark_for_saving();
+ }
+
+ continue;
+ }
+
+ // Our dependency is an even number of passes behind, need
+ // to insert a blit to ensure we don't read and write from
+ // the same target.
+
+ let child_task_id = RenderTaskId {
+ index: child_task_index as u32,
+ #[cfg(debug_assertions)]
+ frame_id: self.frame_id,
+ };
+
+ let mut blit = RenderTask::new_blit(
+ self.tasks[child_task_index].location.size(),
+ BlitSource::RenderTask { task_id: child_task_id },
+ );
+
+ // Mark for saving if the blit is more than pass appart from
+ // our task.
+ if child_pass_index < pass_index - 2 {
+ blit.mark_for_saving();
+ }
+
+ let blit_id = RenderTaskId {
+ index: self.tasks.len() as u32,
+ #[cfg(debug_assertions)]
+ frame_id: self.frame_id,
+ };
+
+ self.tasks.alloc().init(blit);
+
+ passes[child_pass_index as usize + 1].tasks.push(blit_id);
+
+ self.tasks[task_index].children[nth_child] = blit_id;
+ task_redirects[child_task_index] = Some(blit_id);
+ }
+ }
+ }
+
+ pub fn get_task_address(&self, id: RenderTaskId) -> RenderTaskAddress {
+ #[cfg(all(debug_assertions, not(feature = "replay")))]
+ debug_assert_eq!(self.frame_id, id.frame_id);
+ RenderTaskAddress(id.index as u16)
+ }
+
+ pub fn write_task_data(&mut self) {
+ profile_scope!("write_task_data");
+ for task in &self.tasks {
+ self.task_data.push(task.write_task_data());
+ }
+ }
+
+ pub fn save_target(&mut self) -> SavedTargetIndex {
+ let id = self.next_saved;
+ self.next_saved.0 += 1;
+ id
+ }
+
+ #[cfg(debug_assertions)]
+ pub fn frame_id(&self) -> FrameId {
+ self.frame_id
+ }
+}
+
+impl std::ops::Index<RenderTaskId> for RenderTaskGraph {
+ type Output = RenderTask;
+ fn index(&self, id: RenderTaskId) -> &RenderTask {
+ #[cfg(all(debug_assertions, not(feature = "replay")))]
+ debug_assert_eq!(self.frame_id, id.frame_id);
+ &self.tasks[id.index as usize]
+ }
+}
+
+impl std::ops::IndexMut<RenderTaskId> for RenderTaskGraph {
+ fn index_mut(&mut self, id: RenderTaskId) -> &mut RenderTask {
+ #[cfg(all(debug_assertions, not(feature = "replay")))]
+ debug_assert_eq!(self.frame_id, id.frame_id);
+ &mut self.tasks[id.index as usize]
+ }
+}
+
+#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderTaskId {
+ pub index: u32,
+
+ #[cfg(debug_assertions)]
+ #[cfg_attr(feature = "replay", serde(default = "FrameId::first"))]
+ frame_id: FrameId,
+}
+
+#[derive(Debug)]
+pub struct RenderTaskGraphCounters {
+ tasks_len: usize,
+ task_data_len: usize,
+ cacheable_render_tasks_len: usize,
+}
+
+impl RenderTaskGraphCounters {
+ pub fn new() -> Self {
+ RenderTaskGraphCounters {
+ tasks_len: 0,
+ task_data_len: 0,
+ cacheable_render_tasks_len: 0,
+ }
+ }
+}
+
+impl RenderTaskId {
+ pub const INVALID: RenderTaskId = RenderTaskId {
+ index: u32::MAX,
+ #[cfg(debug_assertions)]
+ frame_id: FrameId::INVALID,
+ };
+}
+
+/// Contains the set of `RenderTarget`s specific to the kind of pass.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum RenderPassKind {
+ /// The final pass to the main frame buffer, where we have a single color
+ /// target for display to the user.
+ MainFramebuffer {
+ main_target: ColorRenderTarget,
+ },
+ /// An intermediate pass, where we may have multiple targets.
+ OffScreen {
+ alpha: RenderTargetList<AlphaRenderTarget>,
+ color: RenderTargetList<ColorRenderTarget>,
+ texture_cache: FastHashMap<(CacheTextureId, usize), TextureCacheRenderTarget>,
+ picture_cache: Vec<PictureCacheTarget>,
+ },
+}
+
+/// A render pass represents a set of rendering operations that don't depend on one
+/// another.
+///
+/// A render pass can have several render targets if there wasn't enough space in one
+/// target to do all of the rendering for that pass. See `RenderTargetList`.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct RenderPass {
+ /// The kind of pass, as well as the set of targets associated with that
+ /// kind of pass.
+ pub kind: RenderPassKind,
+ /// The set of tasks to be performed in this pass, as indices into the
+ /// `RenderTaskGraph`.
+ pub tasks: Vec<RenderTaskId>,
+ /// Screen size in device pixels - used for opaque alpha batch break threshold.
+ pub screen_size: DeviceIntSize,
+}
+
+impl RenderPass {
+ /// Creates a pass for the main framebuffer. There is only one of these, and
+ /// it is always the last pass.
+ pub fn new_main_framebuffer(
+ screen_size: DeviceIntSize,
+ gpu_supports_fast_clears: bool,
+ ) -> Self {
+ let main_target = ColorRenderTarget::new(screen_size, gpu_supports_fast_clears);
+ RenderPass {
+ kind: RenderPassKind::MainFramebuffer {
+ main_target,
+ },
+ tasks: vec![],
+ screen_size,
+ }
+ }
+
+ /// Creates an intermediate off-screen pass.
+ pub fn new_off_screen(
+ screen_size: DeviceIntSize,
+ gpu_supports_fast_clears: bool,
+ ) -> Self {
+ RenderPass {
+ kind: RenderPassKind::OffScreen {
+ color: RenderTargetList::new(
+ screen_size,
+ ImageFormat::RGBA8,
+ gpu_supports_fast_clears,
+ ),
+ alpha: RenderTargetList::new(
+ screen_size,
+ ImageFormat::R8,
+ gpu_supports_fast_clears,
+ ),
+ texture_cache: FastHashMap::default(),
+ picture_cache: Vec::new(),
+ },
+ tasks: vec![],
+ screen_size,
+ }
+ }
+
+ /// Adds a task to this pass.
+ pub fn add_render_task(
+ &mut self,
+ task_id: RenderTaskId,
+ size: DeviceIntSize,
+ target_kind: RenderTargetKind,
+ location: &RenderTaskLocation,
+ ) {
+ if let RenderPassKind::OffScreen { ref mut color, ref mut alpha, .. } = self.kind {
+ // If this will be rendered to a dynamically-allocated region on an
+ // off-screen render target, update the max-encountered size. We don't
+ // need to do this for things drawn to the texture cache, since those
+ // don't affect our render target allocation.
+ if location.is_dynamic() {
+ let max_size = match target_kind {
+ RenderTargetKind::Color => &mut color.max_dynamic_size,
+ RenderTargetKind::Alpha => &mut alpha.max_dynamic_size,
+ };
+ max_size.width = cmp::max(max_size.width, size.width);
+ max_size.height = cmp::max(max_size.height, size.height);
+ }
+ }
+
+ self.tasks.push(task_id);
+ }
+}
+
+// Dump an SVG visualization of the render graph for debugging purposes
+#[allow(dead_code)]
+pub fn dump_render_tasks_as_svg(
+ render_tasks: &RenderTaskGraph,
+ passes: &[RenderPass],
+ output: &mut dyn std::io::Write,
+) -> std::io::Result<()> {
+ use svg_fmt::*;
+
+ let node_width = 80.0;
+ let node_height = 30.0;
+ let vertical_spacing = 8.0;
+ let horizontal_spacing = 20.0;
+ let margin = 10.0;
+ let text_size = 10.0;
+
+ let mut pass_rects = Vec::new();
+ let mut nodes = vec![None; render_tasks.tasks.len()];
+
+ let mut x = margin;
+ let mut max_y: f32 = 0.0;
+
+ #[derive(Clone)]
+ struct Node {
+ rect: Rectangle,
+ label: Text,
+ size: Text,
+ }
+
+ for pass in passes {
+ let mut layout = VerticalLayout::new(x, margin, node_width);
+
+ for task_id in &pass.tasks {
+ let task_index = task_id.index as usize;
+ let task = &render_tasks.tasks[task_index];
+
+ let rect = layout.push_rectangle(node_height);
+
+ let tx = rect.x + rect.w / 2.0;
+ let ty = rect.y + 10.0;
+
+ let saved = if task.saved_index.is_some() { " (Saved)" } else { "" };
+ let label = text(tx, ty, format!("{}{}", task.kind.as_str(), saved));
+ let size = text(tx, ty + 12.0, format!("{:?}", task.location.size()));
+
+ nodes[task_index] = Some(Node { rect, label, size });
+
+ layout.advance(vertical_spacing);
+ }
+
+ pass_rects.push(layout.total_rectangle());
+
+ x += node_width + horizontal_spacing;
+ max_y = max_y.max(layout.y + margin);
+ }
+
+ let mut links = Vec::new();
+ for node_index in 0..nodes.len() {
+ if nodes[node_index].is_none() {
+ continue;
+ }
+
+ let task = &render_tasks.tasks[node_index];
+ for dep in &task.children {
+ let dep_index = dep.index as usize;
+
+ if let (&Some(ref node), &Some(ref dep_node)) = (&nodes[node_index], &nodes[dep_index]) {
+ links.push((
+ dep_node.rect.x + dep_node.rect.w,
+ dep_node.rect.y + dep_node.rect.h / 2.0,
+ node.rect.x,
+ node.rect.y + node.rect.h / 2.0,
+ ));
+ }
+ }
+ }
+
+ let svg_w = x + margin;
+ let svg_h = max_y + margin;
+ writeln!(output, "{}", BeginSvg { w: svg_w, h: svg_h })?;
+
+ // Background.
+ writeln!(output,
+ " {}",
+ rectangle(0.0, 0.0, svg_w, svg_h)
+ .inflate(1.0, 1.0)
+ .fill(rgb(50, 50, 50))
+ )?;
+
+ // Passes.
+ for rect in pass_rects {
+ writeln!(output,
+ " {}",
+ rect.inflate(3.0, 3.0)
+ .border_radius(4.0)
+ .opacity(0.4)
+ .fill(black())
+ )?;
+ }
+
+ // Links.
+ for (x1, y1, x2, y2) in links {
+ dump_task_dependency_link(output, x1, y1, x2, y2);
+ }
+
+ // Tasks.
+ for node in &nodes {
+ if let Some(node) = node {
+ writeln!(output,
+ " {}",
+ node.rect
+ .clone()
+ .fill(black())
+ .border_radius(3.0)
+ .opacity(0.5)
+ .offset(0.0, 2.0)
+ )?;
+ writeln!(output,
+ " {}",
+ node.rect
+ .clone()
+ .fill(rgb(200, 200, 200))
+ .border_radius(3.0)
+ .opacity(0.8)
+ )?;
+
+ writeln!(output,
+ " {}",
+ node.label
+ .clone()
+ .size(text_size)
+ .align(Align::Center)
+ .color(rgb(50, 50, 50))
+ )?;
+ writeln!(output,
+ " {}",
+ node.size
+ .clone()
+ .size(text_size * 0.7)
+ .align(Align::Center)
+ .color(rgb(50, 50, 50))
+ )?;
+ }
+ }
+
+ writeln!(output, "{}", EndSvg)
+}
+
+#[allow(dead_code)]
+fn dump_task_dependency_link(
+ output: &mut dyn std::io::Write,
+ x1: f32, y1: f32,
+ x2: f32, y2: f32,
+) {
+ use svg_fmt::*;
+
+ // If the link is a straight horizontal line and spans over multiple passes, it
+ // is likely to go straight though unrelated nodes in a way that makes it look like
+ // they are connected, so we bend the line upward a bit to avoid that.
+ let simple_path = (y1 - y2).abs() > 1.0 || (x2 - x1) < 45.0;
+
+ let mid_x = (x1 + x2) / 2.0;
+ if simple_path {
+ write!(output, " {}",
+ path().move_to(x1, y1)
+ .cubic_bezier_to(mid_x, y1, mid_x, y2, x2, y2)
+ .fill(Fill::None)
+ .stroke(Stroke::Color(rgb(100, 100, 100), 3.0))
+ ).unwrap();
+ } else {
+ let ctrl1_x = (mid_x + x1) / 2.0;
+ let ctrl2_x = (mid_x + x2) / 2.0;
+ let ctrl_y = y1 - 25.0;
+ write!(output, " {}",
+ path().move_to(x1, y1)
+ .cubic_bezier_to(ctrl1_x, y1, ctrl1_x, ctrl_y, mid_x, ctrl_y)
+ .cubic_bezier_to(ctrl2_x, ctrl_y, ctrl2_x, y2, x2, y2)
+ .fill(Fill::None)
+ .stroke(Stroke::Color(rgb(100, 100, 100), 3.0))
+ ).unwrap();
+ }
+}
+
+#[cfg(test)]
+use euclid::{size2, rect};
+#[cfg(test)]
+use smallvec::SmallVec;
+
+#[cfg(test)]
+fn dyn_location(w: i32, h: i32) -> RenderTaskLocation {
+ RenderTaskLocation::Dynamic(None, size2(w, h))
+}
+
+#[test]
+fn diamond_task_graph() {
+ // A simple diamon shaped task graph.
+ //
+ // [b1]
+ // / \
+ // [a] [main_pic]
+ // \ /
+ // [b2]
+
+ let color = RenderTargetKind::Color;
+
+ let counters = RenderTaskGraphCounters::new();
+ let mut tasks = RenderTaskGraph::new(FrameId::first(), &counters);
+
+ let a = tasks.add().init(RenderTask::new_test(color, dyn_location(640, 640), SmallVec::new()));
+ let b1 = tasks.add().init(RenderTask::new_test(color, dyn_location(320, 320), smallvec![a]));
+ let b2 = tasks.add().init(RenderTask::new_test(color, dyn_location(320, 320), smallvec![a]));
+
+ let main_pic = tasks.add().init(RenderTask::new_test(
+ color,
+ RenderTaskLocation::Fixed(rect(0, 0, 3200, 1800)),
+ smallvec![b1, b2],
+ ));
+
+ let initial_number_of_tasks = tasks.tasks.len();
+
+ let passes = tasks.generate_passes(Some(main_pic), size2(3200, 1800), true);
+
+ // We should not have added any blits.
+ assert_eq!(tasks.tasks.len(), initial_number_of_tasks);
+
+ assert_eq!(passes.len(), 3);
+ assert_eq!(passes[0].tasks, vec![a]);
+
+ assert_eq!(passes[1].tasks.len(), 2);
+ assert!(passes[1].tasks.contains(&b1));
+ assert!(passes[1].tasks.contains(&b2));
+
+ assert_eq!(passes[2].tasks, vec![main_pic]);
+}
+
+#[test]
+fn blur_task_graph() {
+ // This test simulates a complicated shadow stack effect with target allocation
+ // conflicts to resolve.
+
+ let color = RenderTargetKind::Color;
+
+ let counters = RenderTaskGraphCounters::new();
+ let mut tasks = RenderTaskGraph::new(FrameId::first(), &counters);
+
+ let pic = tasks.add().init(RenderTask::new_test(color, dyn_location(640, 640), SmallVec::new()));
+ let scale1 = tasks.add().init(RenderTask::new_test(color, dyn_location(320, 320), smallvec![pic]));
+ let scale2 = tasks.add().init(RenderTask::new_test(color, dyn_location(160, 160), smallvec![scale1]));
+ let scale3 = tasks.add().init(RenderTask::new_test(color, dyn_location(80, 80), smallvec![scale2]));
+ let scale4 = tasks.add().init(RenderTask::new_test(color, dyn_location(40, 40), smallvec![scale3]));
+
+ let vblur1 = tasks.add().init(RenderTask::new_test(color, dyn_location(40, 40), smallvec![scale4]));
+ let hblur1 = tasks.add().init(RenderTask::new_test(color, dyn_location(40, 40), smallvec![vblur1]));
+
+ let vblur2 = tasks.add().init(RenderTask::new_test(color, dyn_location(40, 40), smallvec![scale4]));
+ let hblur2 = tasks.add().init(RenderTask::new_test(color, dyn_location(40, 40), smallvec![vblur2]));
+
+ // Insert a task that is an even number of passes away from its dependency.
+ // This means the source and destination are on the same target and we have to resolve
+ // this conflict by automatically inserting a blit task.
+ let vblur3 = tasks.add().init(RenderTask::new_test(color, dyn_location(80, 80), smallvec![scale3]));
+ let hblur3 = tasks.add().init(RenderTask::new_test(color, dyn_location(80, 80), smallvec![vblur3]));
+
+ // Insert a task that is an odd number > 1 of passes away from its dependency.
+ // This should force us to mark the dependency "for saving" to keep its content valid
+ // until the task can access it.
+ let vblur4 = tasks.add().init(RenderTask::new_test(color, dyn_location(160, 160), smallvec![scale2]));
+ let hblur4 = tasks.add().init(RenderTask::new_test(color, dyn_location(160, 160), smallvec![vblur4]));
+
+ let main_pic = tasks.add().init(RenderTask::new_test(
+ color,
+ RenderTaskLocation::Fixed(rect(0, 0, 3200, 1800)),
+ smallvec![hblur1, hblur2, hblur3, hblur4],
+ ));
+
+ let initial_number_of_tasks = tasks.tasks.len();
+
+ let passes = tasks.generate_passes(Some(main_pic), size2(3200, 1800), true);
+
+ // We should have added a single blit task.
+ assert_eq!(tasks.tasks.len(), initial_number_of_tasks + 1);
+
+ // vblur3's dependency to scale3 should be replaced by a blit.
+ let blit = tasks[vblur3].children[0];
+ assert!(blit != scale3);
+
+ match tasks[blit].kind {
+ RenderTaskKind::Blit(..) => {}
+ _ => { panic!("This should be a blit task."); }
+ }
+
+ assert_eq!(passes.len(), 8);
+
+ assert_eq!(passes[0].tasks, vec![pic]);
+ assert_eq!(passes[1].tasks, vec![scale1]);
+ assert_eq!(passes[2].tasks, vec![scale2]);
+ assert_eq!(passes[3].tasks, vec![scale3]);
+
+ assert_eq!(passes[4].tasks.len(), 2);
+ assert!(passes[4].tasks.contains(&scale4));
+ assert!(passes[4].tasks.contains(&blit));
+
+ assert_eq!(passes[5].tasks.len(), 4);
+ assert!(passes[5].tasks.contains(&vblur1));
+ assert!(passes[5].tasks.contains(&vblur2));
+ assert!(passes[5].tasks.contains(&vblur3));
+ assert!(passes[5].tasks.contains(&vblur4));
+
+ assert_eq!(passes[6].tasks.len(), 4);
+ assert!(passes[6].tasks.contains(&hblur1));
+ assert!(passes[6].tasks.contains(&hblur2));
+ assert!(passes[6].tasks.contains(&hblur3));
+ assert!(passes[6].tasks.contains(&hblur4));
+
+ assert_eq!(passes[7].tasks, vec![main_pic]);
+
+ // See vblur4's comment above.
+ assert!(tasks[scale2].saved_index.is_some());
+}
+
+#[test]
+fn culled_tasks() {
+ // This test checks that tasks that do not contribute to the frame don't appear in the
+ // generated passes.
+
+ let color = RenderTargetKind::Color;
+
+ let counters = RenderTaskGraphCounters::new();
+ let mut tasks = RenderTaskGraph::new(FrameId::first(), &counters);
+
+ let a1 = tasks.add().init(RenderTask::new_test(color, dyn_location(640, 640), SmallVec::new()));
+ let _a2 = tasks.add().init(RenderTask::new_test(color, dyn_location(320, 320), smallvec![a1]));
+
+ let b1 = tasks.add().init(RenderTask::new_test(color, dyn_location(640, 640), SmallVec::new()));
+ let b2 = tasks.add().init(RenderTask::new_test(color, dyn_location(320, 320), smallvec![b1]));
+ let _b3 = tasks.add().init(RenderTask::new_test(color, dyn_location(320, 320), smallvec![b2]));
+
+ let main_pic = tasks.add().init(RenderTask::new_test(
+ color,
+ RenderTaskLocation::Fixed(rect(0, 0, 3200, 1800)),
+ smallvec![b2],
+ ));
+
+ let initial_number_of_tasks = tasks.tasks.len();
+
+ let passes = tasks.generate_passes(Some(main_pic), size2(3200, 1800), true);
+
+ // We should not have added any blits.
+ assert_eq!(tasks.tasks.len(), initial_number_of_tasks);
+
+ assert_eq!(passes.len(), 3);
+ assert_eq!(passes[0].tasks, vec![b1]);
+ assert_eq!(passes[1].tasks, vec![b2]);
+ assert_eq!(passes[2].tasks, vec![main_pic]);
+}
diff --git a/third_party/webrender/webrender/src/renderer.rs b/third_party/webrender/webrender/src/renderer.rs
new file mode 100644
index 00000000000..3552a304f76
--- /dev/null
+++ b/third_party/webrender/webrender/src/renderer.rs
@@ -0,0 +1,7671 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! The high-level module responsible for interfacing with the GPU.
+//!
+//! Much of WebRender's design is driven by separating work into different
+//! threads. To avoid the complexities of multi-threaded GPU access, we restrict
+//! all communication with the GPU to one thread, the render thread. But since
+//! issuing GPU commands is often a bottleneck, we move everything else (i.e.
+//! the computation of what commands to issue) to another thread, the
+//! RenderBackend thread. The RenderBackend, in turn, may delegate work to other
+//! thread (like the SceneBuilder threads or Rayon workers), but the
+//! Render-vs-RenderBackend distinction is the most important.
+//!
+//! The consumer is responsible for initializing the render thread before
+//! calling into WebRender, which means that this module also serves as the
+//! initial entry point into WebRender, and is responsible for spawning the
+//! various other threads discussed above. That said, WebRender initialization
+//! returns both the `Renderer` instance as well as a channel for communicating
+//! directly with the `RenderBackend`. Aside from a few high-level operations
+//! like 'render now', most of interesting commands from the consumer go over
+//! that channel and operate on the `RenderBackend`.
+//!
+//! ## Space conversion guidelines
+//! At this stage, we shuld be operating with `DevicePixel` and `FramebufferPixel` only.
+//! "Framebuffer" space represents the final destination of our rendeing,
+//! and it happens to be Y-flipped on OpenGL. The conversion is done as follows:
+//! - for rasterized primitives, the orthographics projection transforms
+//! the content rectangle to -1 to 1
+//! - the viewport transformation is setup to map the whole range to
+//! the framebuffer rectangle provided by the document view, stored in `DrawTarget`
+//! - all the direct framebuffer operations, like blitting, reading pixels, and setting
+//! up the scissor, are accepting already transformed coordinates, which we can get by
+//! calling `DrawTarget::to_framebuffer_rect`
+
+use api::{ApiMsg, BlobImageHandler, ColorF, ColorU, MixBlendMode};
+use api::{DocumentId, Epoch, ExternalImageHandler, ExternalImageId};
+use api::{ExternalImageSource, ExternalImageType, FontRenderMode, FrameMsg, ImageFormat};
+use api::{PipelineId, ImageRendering, Checkpoint, NotificationRequest, OutputImageHandler};
+use api::{DebugCommand, MemoryReport, VoidPtrToSizeFn, PremultipliedColorF};
+use api::{RenderApiSender, RenderNotifier, TextureTarget, SharedFontInstanceMap};
+#[cfg(feature = "replay")]
+use api::ExternalImage;
+use api::units::*;
+pub use api::DebugFlags;
+use crate::batch::{AlphaBatchContainer, BatchKind, BatchFeatures, BatchTextures, BrushBatchKind, ClipBatchList};
+#[cfg(any(feature = "capture", feature = "replay"))]
+use crate::capture::{CaptureConfig, ExternalCaptureImage, PlainExternalImage};
+use crate::composite::{CompositeState, CompositeTileSurface, CompositeTile, ResolvedExternalSurface};
+use crate::composite::{CompositorKind, Compositor, NativeTileId, CompositeSurfaceFormat, ResolvedExternalSurfaceColorData};
+use crate::composite::{CompositorConfig, NativeSurfaceOperationDetails, NativeSurfaceId, NativeSurfaceOperation};
+use crate::debug_colors;
+use crate::debug_render::{DebugItem, DebugRenderer};
+use crate::device::{DepthFunction, Device, GpuFrameId, Program, UploadMethod, Texture, PBO};
+use crate::device::{DrawTarget, ExternalTexture, FBOId, ReadTarget, TextureSlot};
+use crate::device::{ShaderError, TextureFilter, TextureFlags,
+ VertexUsageHint, VAO, VBO, CustomVAO};
+use crate::device::ProgramCache;
+use crate::device::query::GpuTimer;
+use euclid::{rect, Transform3D, Scale, default};
+use crate::frame_builder::{Frame, ChasePrimitive, FrameBuilderConfig};
+use gleam::gl;
+use crate::glyph_cache::GlyphCache;
+use crate::glyph_rasterizer::{GlyphFormat, GlyphRasterizer};
+use crate::gpu_cache::{GpuBlockData, GpuCacheUpdate, GpuCacheUpdateList};
+use crate::gpu_cache::{GpuCacheDebugChunk, GpuCacheDebugCmd};
+use crate::gpu_types::{PrimitiveHeaderI, PrimitiveHeaderF, ScalingInstance, SvgFilterInstance, TransformData};
+use crate::gpu_types::{ClearInstance, CompositeInstance, ResolveInstanceData, ZBufferId};
+use crate::internal_types::{TextureSource, ResourceCacheError};
+use crate::internal_types::{CacheTextureId, DebugOutput, FastHashMap, FastHashSet, LayerIndex, RenderedDocument, ResultMsg};
+use crate::internal_types::{TextureCacheAllocationKind, TextureCacheUpdate, TextureUpdateList, TextureUpdateSource};
+use crate::internal_types::{RenderTargetInfo, SavedTargetIndex, Swizzle};
+use malloc_size_of::MallocSizeOfOps;
+use crate::picture::{RecordedDirtyRegion, tile_cache_sizes, ResolvedSurfaceTexture};
+use crate::prim_store::DeferredResolve;
+use crate::profiler::{BackendProfileCounters, FrameProfileCounters, TimeProfileCounter,
+ GpuProfileTag, RendererProfileCounters, RendererProfileTimers};
+use crate::profiler::{Profiler, ChangeIndicator, ProfileStyle, add_event_marker, thread_is_being_profiled};
+use crate::device::query::{GpuProfiler, GpuDebugMethod};
+use rayon::{ThreadPool, ThreadPoolBuilder};
+use crate::render_backend::{FrameId, RenderBackend};
+use crate::render_task_graph::RenderTaskGraph;
+use crate::render_task::{RenderTask, RenderTaskData, RenderTaskKind};
+use crate::resource_cache::ResourceCache;
+use crate::scene_builder_thread::{SceneBuilderThread, SceneBuilderThreadChannels, LowPrioritySceneBuilderThread};
+use crate::screen_capture::AsyncScreenshotGrabber;
+use crate::shade::{Shaders, WrShaders};
+use smallvec::SmallVec;
+use crate::texture_cache::TextureCache;
+use crate::render_target::{AlphaRenderTarget, ColorRenderTarget, PictureCacheTarget};
+use crate::render_target::{RenderTarget, TextureCacheRenderTarget, RenderTargetList};
+use crate::render_target::{RenderTargetKind, BlitJob, BlitJobSource};
+use crate::render_task_graph::RenderPassKind;
+use crate::util::drain_filter;
+use crate::c_str;
+
+use std;
+use std::cmp;
+use std::collections::VecDeque;
+use std::collections::hash_map::Entry;
+use std::f32;
+use std::marker::PhantomData;
+use std::mem;
+use std::os::raw::c_void;
+use std::path::PathBuf;
+use std::rc::Rc;
+use std::sync::Arc;
+use std::sync::atomic::{AtomicBool, Ordering};
+use std::sync::mpsc::{channel, Sender, Receiver};
+use std::thread;
+use std::cell::RefCell;
+use tracy_rs::register_thread_with_profiler;
+use time::precise_time_ns;
+use std::ffi::CString;
+
+cfg_if! {
+ if #[cfg(feature = "debugger")] {
+ use serde_json;
+ use crate::debug_server;
+ }
+}
+
+const DEFAULT_BATCH_LOOKBACK_COUNT: usize = 10;
+const VERTEX_TEXTURE_EXTRA_ROWS: i32 = 10;
+
+/// The size of the array of each type of vertex data texture that
+/// is round-robin-ed each frame during bind_frame_data. Doing this
+/// helps avoid driver stalls while updating the texture in some
+/// drivers. The size of these textures are typically very small
+/// (e.g. < 16 kB) so it's not a huge waste of memory. Despite that,
+/// this is a short-term solution - we want to find a better way
+/// to provide this frame data, which will likely involve some
+/// combination of UBO/SSBO usage. Although this only affects some
+/// platforms, it's enabled on all platforms to reduce testing
+/// differences between platforms.
+const VERTEX_DATA_TEXTURE_COUNT: usize = 3;
+
+/// Is only false if no WR instances have ever been created.
+static HAS_BEEN_INITIALIZED: AtomicBool = AtomicBool::new(false);
+
+/// Returns true if a WR instance has ever been initialized in this process.
+pub fn wr_has_been_initialized() -> bool {
+ HAS_BEEN_INITIALIZED.load(Ordering::SeqCst)
+}
+
+pub const MAX_VERTEX_TEXTURE_WIDTH: usize = webrender_build::MAX_VERTEX_TEXTURE_WIDTH;
+/// Enabling this toggle would force the GPU cache scattered texture to
+/// be resized every frame, which enables GPU debuggers to see if this
+/// is performed correctly.
+const GPU_CACHE_RESIZE_TEST: bool = false;
+
+/// Number of GPU blocks per UV rectangle provided for an image.
+pub const BLOCKS_PER_UV_RECT: usize = 2;
+
+const GPU_TAG_BRUSH_OPACITY: GpuProfileTag = GpuProfileTag {
+ label: "B_Opacity",
+ color: debug_colors::DARKMAGENTA,
+};
+const GPU_TAG_BRUSH_LINEAR_GRADIENT: GpuProfileTag = GpuProfileTag {
+ label: "B_LinearGradient",
+ color: debug_colors::POWDERBLUE,
+};
+const GPU_TAG_BRUSH_RADIAL_GRADIENT: GpuProfileTag = GpuProfileTag {
+ label: "B_RadialGradient",
+ color: debug_colors::LIGHTPINK,
+};
+const GPU_TAG_BRUSH_CONIC_GRADIENT: GpuProfileTag = GpuProfileTag {
+ label: "B_ConicGradient",
+ color: debug_colors::GREEN,
+};
+const GPU_TAG_BRUSH_YUV_IMAGE: GpuProfileTag = GpuProfileTag {
+ label: "B_YuvImage",
+ color: debug_colors::DARKGREEN,
+};
+const GPU_TAG_BRUSH_MIXBLEND: GpuProfileTag = GpuProfileTag {
+ label: "B_MixBlend",
+ color: debug_colors::MAGENTA,
+};
+const GPU_TAG_BRUSH_BLEND: GpuProfileTag = GpuProfileTag {
+ label: "B_Blend",
+ color: debug_colors::ORANGE,
+};
+const GPU_TAG_BRUSH_IMAGE: GpuProfileTag = GpuProfileTag {
+ label: "B_Image",
+ color: debug_colors::SPRINGGREEN,
+};
+const GPU_TAG_BRUSH_SOLID: GpuProfileTag = GpuProfileTag {
+ label: "B_Solid",
+ color: debug_colors::RED,
+};
+const GPU_TAG_CACHE_CLIP: GpuProfileTag = GpuProfileTag {
+ label: "C_Clip",
+ color: debug_colors::PURPLE,
+};
+const GPU_TAG_CACHE_BORDER: GpuProfileTag = GpuProfileTag {
+ label: "C_Border",
+ color: debug_colors::CORNSILK,
+};
+const GPU_TAG_CACHE_LINE_DECORATION: GpuProfileTag = GpuProfileTag {
+ label: "C_LineDecoration",
+ color: debug_colors::YELLOWGREEN,
+};
+const GPU_TAG_CACHE_GRADIENT: GpuProfileTag = GpuProfileTag {
+ label: "C_Gradient",
+ color: debug_colors::BROWN,
+};
+const GPU_TAG_SETUP_TARGET: GpuProfileTag = GpuProfileTag {
+ label: "target init",
+ color: debug_colors::SLATEGREY,
+};
+const GPU_TAG_SETUP_DATA: GpuProfileTag = GpuProfileTag {
+ label: "data init",
+ color: debug_colors::LIGHTGREY,
+};
+const GPU_TAG_PRIM_SPLIT_COMPOSITE: GpuProfileTag = GpuProfileTag {
+ label: "SplitComposite",
+ color: debug_colors::DARKBLUE,
+};
+const GPU_TAG_PRIM_TEXT_RUN: GpuProfileTag = GpuProfileTag {
+ label: "TextRun",
+ color: debug_colors::BLUE,
+};
+const GPU_TAG_BLUR: GpuProfileTag = GpuProfileTag {
+ label: "Blur",
+ color: debug_colors::VIOLET,
+};
+const GPU_TAG_BLIT: GpuProfileTag = GpuProfileTag {
+ label: "Blit",
+ color: debug_colors::LIME,
+};
+const GPU_TAG_SCALE: GpuProfileTag = GpuProfileTag {
+ label: "Scale",
+ color: debug_colors::GHOSTWHITE,
+};
+const GPU_SAMPLER_TAG_ALPHA: GpuProfileTag = GpuProfileTag {
+ label: "Alpha Targets",
+ color: debug_colors::BLACK,
+};
+const GPU_SAMPLER_TAG_OPAQUE: GpuProfileTag = GpuProfileTag {
+ label: "Opaque Pass",
+ color: debug_colors::BLACK,
+};
+const GPU_SAMPLER_TAG_TRANSPARENT: GpuProfileTag = GpuProfileTag {
+ label: "Transparent Pass",
+ color: debug_colors::BLACK,
+};
+const GPU_TAG_SVG_FILTER: GpuProfileTag = GpuProfileTag {
+ label: "SvgFilter",
+ color: debug_colors::LEMONCHIFFON,
+};
+const GPU_TAG_COMPOSITE: GpuProfileTag = GpuProfileTag {
+ label: "Composite",
+ color: debug_colors::TOMATO,
+};
+const GPU_TAG_CLEAR: GpuProfileTag = GpuProfileTag {
+ label: "Clear",
+ color: debug_colors::CHOCOLATE,
+};
+
+/// The clear color used for the texture cache when the debug display is enabled.
+/// We use a shade of blue so that we can still identify completely blue items in
+/// the texture cache.
+const TEXTURE_CACHE_DBG_CLEAR_COLOR: [f32; 4] = [0.0, 0.0, 0.8, 1.0];
+
+impl BatchKind {
+ #[cfg(feature = "debugger")]
+ fn debug_name(&self) -> &'static str {
+ match *self {
+ BatchKind::SplitComposite => "SplitComposite",
+ BatchKind::Brush(kind) => {
+ match kind {
+ BrushBatchKind::Solid => "Brush (Solid)",
+ BrushBatchKind::Image(..) => "Brush (Image)",
+ BrushBatchKind::Blend => "Brush (Blend)",
+ BrushBatchKind::MixBlend { .. } => "Brush (Composite)",
+ BrushBatchKind::YuvImage(..) => "Brush (YuvImage)",
+ BrushBatchKind::ConicGradient => "Brush (ConicGradient)",
+ BrushBatchKind::RadialGradient => "Brush (RadialGradient)",
+ BrushBatchKind::LinearGradient => "Brush (LinearGradient)",
+ BrushBatchKind::Opacity => "Brush (Opacity)",
+ }
+ }
+ BatchKind::TextRun(_) => "TextRun",
+ }
+ }
+
+ fn sampler_tag(&self) -> GpuProfileTag {
+ match *self {
+ BatchKind::SplitComposite => GPU_TAG_PRIM_SPLIT_COMPOSITE,
+ BatchKind::Brush(kind) => {
+ match kind {
+ BrushBatchKind::Solid => GPU_TAG_BRUSH_SOLID,
+ BrushBatchKind::Image(..) => GPU_TAG_BRUSH_IMAGE,
+ BrushBatchKind::Blend => GPU_TAG_BRUSH_BLEND,
+ BrushBatchKind::MixBlend { .. } => GPU_TAG_BRUSH_MIXBLEND,
+ BrushBatchKind::YuvImage(..) => GPU_TAG_BRUSH_YUV_IMAGE,
+ BrushBatchKind::ConicGradient => GPU_TAG_BRUSH_CONIC_GRADIENT,
+ BrushBatchKind::RadialGradient => GPU_TAG_BRUSH_RADIAL_GRADIENT,
+ BrushBatchKind::LinearGradient => GPU_TAG_BRUSH_LINEAR_GRADIENT,
+ BrushBatchKind::Opacity => GPU_TAG_BRUSH_OPACITY,
+ }
+ }
+ BatchKind::TextRun(_) => GPU_TAG_PRIM_TEXT_RUN,
+ }
+ }
+}
+
+fn flag_changed(before: DebugFlags, after: DebugFlags, select: DebugFlags) -> Option<bool> {
+ if before & select != after & select {
+ Some(after.contains(select))
+ } else {
+ None
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone, Debug)]
+pub enum ShaderColorMode {
+ FromRenderPassMode = 0,
+ Alpha = 1,
+ SubpixelConstantTextColor = 2,
+ SubpixelWithBgColorPass0 = 3,
+ SubpixelWithBgColorPass1 = 4,
+ SubpixelWithBgColorPass2 = 5,
+ SubpixelDualSource = 6,
+ Bitmap = 7,
+ ColorBitmap = 8,
+ Image = 9,
+}
+
+impl From<GlyphFormat> for ShaderColorMode {
+ fn from(format: GlyphFormat) -> ShaderColorMode {
+ match format {
+ GlyphFormat::Alpha | GlyphFormat::TransformedAlpha => ShaderColorMode::Alpha,
+ GlyphFormat::Subpixel | GlyphFormat::TransformedSubpixel => {
+ panic!("Subpixel glyph formats must be handled separately.");
+ }
+ GlyphFormat::Bitmap => ShaderColorMode::Bitmap,
+ GlyphFormat::ColorBitmap => ShaderColorMode::ColorBitmap,
+ }
+ }
+}
+
+/// Enumeration of the texture samplers used across the various WebRender shaders.
+///
+/// Each variant corresponds to a uniform declared in shader source. We only bind
+/// the variants we need for a given shader, so not every variant is bound for every
+/// batch.
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub(crate) enum TextureSampler {
+ Color0,
+ Color1,
+ Color2,
+ PrevPassAlpha,
+ PrevPassColor,
+ GpuCache,
+ TransformPalette,
+ RenderTasks,
+ Dither,
+ PrimitiveHeadersF,
+ PrimitiveHeadersI,
+}
+
+impl TextureSampler {
+ pub(crate) fn color(n: usize) -> TextureSampler {
+ match n {
+ 0 => TextureSampler::Color0,
+ 1 => TextureSampler::Color1,
+ 2 => TextureSampler::Color2,
+ _ => {
+ panic!("There are only 3 color samplers.");
+ }
+ }
+ }
+}
+
+impl Into<TextureSlot> for TextureSampler {
+ fn into(self) -> TextureSlot {
+ match self {
+ TextureSampler::Color0 => TextureSlot(0),
+ TextureSampler::Color1 => TextureSlot(1),
+ TextureSampler::Color2 => TextureSlot(2),
+ TextureSampler::PrevPassAlpha => TextureSlot(3),
+ TextureSampler::PrevPassColor => TextureSlot(4),
+ TextureSampler::GpuCache => TextureSlot(5),
+ TextureSampler::TransformPalette => TextureSlot(6),
+ TextureSampler::RenderTasks => TextureSlot(7),
+ TextureSampler::Dither => TextureSlot(8),
+ TextureSampler::PrimitiveHeadersF => TextureSlot(9),
+ TextureSampler::PrimitiveHeadersI => TextureSlot(10),
+ }
+ }
+}
+
+#[derive(Debug, Clone, Copy)]
+#[repr(C)]
+pub struct PackedVertex {
+ pub pos: [f32; 2],
+}
+
+pub(crate) mod desc {
+ use crate::device::{VertexAttribute, VertexAttributeKind, VertexDescriptor};
+
+ pub const PRIM_INSTANCES: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aData",
+ count: 4,
+ kind: VertexAttributeKind::I32,
+ },
+ ],
+ };
+
+ pub const BLUR: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aBlurRenderTaskAddress",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
+ name: "aBlurSourceTaskAddress",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
+ name: "aBlurDirection",
+ count: 1,
+ kind: VertexAttributeKind::I32,
+ },
+ ],
+ };
+
+ pub const LINE: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aTaskRect",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aLocalSize",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aWavyLineThickness",
+ count: 1,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aStyle",
+ count: 1,
+ kind: VertexAttributeKind::I32,
+ },
+ VertexAttribute {
+ name: "aAxisSelect",
+ count: 1,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ };
+
+ pub const GRADIENT: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aTaskRect",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aStops",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ // TODO(gw): We should probably pack these as u32 colors instead
+ // of passing as full float vec4 here. It won't make much
+ // difference in real world, since these are only invoked
+ // rarely, when creating the cache.
+ VertexAttribute {
+ name: "aColor0",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aColor1",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aColor2",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aColor3",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aAxisSelect",
+ count: 1,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aStartStop",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ };
+
+ pub const BORDER: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aTaskOrigin",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aRect",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aColor0",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aColor1",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aFlags",
+ count: 1,
+ kind: VertexAttributeKind::I32,
+ },
+ VertexAttribute {
+ name: "aWidths",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aRadii",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aClipParams1",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aClipParams2",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ };
+
+ pub const SCALE: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aScaleTargetRect",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aScaleSourceRect",
+ count: 4,
+ kind: VertexAttributeKind::I32,
+ },
+ VertexAttribute {
+ name: "aScaleSourceLayer",
+ count: 1,
+ kind: VertexAttributeKind::I32,
+ },
+ ],
+ };
+
+ pub const CLIP: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aTransformIds",
+ count: 2,
+ kind: VertexAttributeKind::I32,
+ },
+ VertexAttribute {
+ name: "aClipDataResourceAddress",
+ count: 4,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
+ name: "aClipLocalPos",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aClipTileRect",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aClipDeviceArea",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aClipOrigins",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aDevicePixelScale",
+ count: 1,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ };
+
+ pub const GPU_CACHE_UPDATE: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::U16Norm,
+ },
+ VertexAttribute {
+ name: "aValue",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[],
+ };
+
+ pub const RESOLVE: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aRect",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ };
+
+ pub const SVG_FILTER: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aFilterRenderTaskAddress",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
+ name: "aFilterInput1TaskAddress",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
+ name: "aFilterInput2TaskAddress",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
+ name: "aFilterKind",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
+ name: "aFilterInputCount",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
+ name: "aFilterGenericInt",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
+ name: "aFilterExtraDataAddress",
+ count: 2,
+ kind: VertexAttributeKind::U16,
+ },
+ ],
+ };
+
+ pub const VECTOR_STENCIL: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aFromPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aCtrlPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aToPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aFromNormal",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aCtrlNormal",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aToNormal",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aPathID",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
+ name: "aPad",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ ],
+ };
+
+ pub const VECTOR_COVER: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aTargetRect",
+ count: 4,
+ kind: VertexAttributeKind::I32,
+ },
+ VertexAttribute {
+ name: "aStencilOrigin",
+ count: 2,
+ kind: VertexAttributeKind::I32,
+ },
+ VertexAttribute {
+ name: "aSubpixel",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ VertexAttribute {
+ name: "aPad",
+ count: 1,
+ kind: VertexAttributeKind::U16,
+ },
+ ],
+ };
+
+ pub const COMPOSITE: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aDeviceRect",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aDeviceClipRect",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aColor",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aParams",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aUvRect0",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aUvRect1",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aUvRect2",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aTextureLayers",
+ count: 3,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ };
+
+ pub const CLEAR: VertexDescriptor = VertexDescriptor {
+ vertex_attributes: &[
+ VertexAttribute {
+ name: "aPosition",
+ count: 2,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ instance_attributes: &[
+ VertexAttribute {
+ name: "aRect",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ VertexAttribute {
+ name: "aColor",
+ count: 4,
+ kind: VertexAttributeKind::F32,
+ },
+ ],
+ };
+}
+
+#[derive(Debug, Copy, Clone)]
+pub(crate) enum VertexArrayKind {
+ Primitive,
+ Blur,
+ Clip,
+ VectorStencil,
+ VectorCover,
+ Border,
+ Scale,
+ LineDecoration,
+ Gradient,
+ Resolve,
+ SvgFilter,
+ Composite,
+ Clear,
+}
+
+#[derive(Clone, Debug, PartialEq)]
+pub enum GraphicsApi {
+ OpenGL,
+}
+
+#[derive(Clone, Debug)]
+pub struct GraphicsApiInfo {
+ pub kind: GraphicsApi,
+ pub renderer: String,
+ pub version: String,
+}
+
+#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum ImageBufferKind {
+ Texture2D = 0,
+ TextureRect = 1,
+ TextureExternal = 2,
+ Texture2DArray = 3,
+}
+
+//TODO: those types are the same, so let's merge them
+impl From<TextureTarget> for ImageBufferKind {
+ fn from(target: TextureTarget) -> Self {
+ match target {
+ TextureTarget::Default => ImageBufferKind::Texture2D,
+ TextureTarget::Rect => ImageBufferKind::TextureRect,
+ TextureTarget::Array => ImageBufferKind::Texture2DArray,
+ TextureTarget::External => ImageBufferKind::TextureExternal,
+ }
+ }
+}
+
+#[derive(Debug)]
+pub struct GpuProfile {
+ pub frame_id: GpuFrameId,
+ pub paint_time_ns: u64,
+}
+
+impl GpuProfile {
+ fn new<T>(frame_id: GpuFrameId, timers: &[GpuTimer<T>]) -> GpuProfile {
+ let mut paint_time_ns = 0;
+ for timer in timers {
+ paint_time_ns += timer.time_ns;
+ }
+ GpuProfile {
+ frame_id,
+ paint_time_ns,
+ }
+ }
+}
+
+#[derive(Debug)]
+pub struct CpuProfile {
+ pub frame_id: GpuFrameId,
+ pub backend_time_ns: u64,
+ pub composite_time_ns: u64,
+ pub draw_calls: usize,
+}
+
+impl CpuProfile {
+ fn new(
+ frame_id: GpuFrameId,
+ backend_time_ns: u64,
+ composite_time_ns: u64,
+ draw_calls: usize,
+ ) -> CpuProfile {
+ CpuProfile {
+ frame_id,
+ backend_time_ns,
+ composite_time_ns,
+ draw_calls,
+ }
+ }
+}
+
+/// The selected partial present mode for a given frame.
+#[derive(Debug, Copy, Clone)]
+enum PartialPresentMode {
+ /// The device supports fewer dirty rects than the number of dirty rects
+ /// that WR produced. In this case, the WR dirty rects are union'ed into
+ /// a single dirty rect, that is provided to the caller.
+ Single {
+ dirty_rect: DeviceRect,
+ },
+}
+
+/// A Texture that has been initialized by the `device` module and is ready to
+/// be used.
+struct ActiveTexture {
+ texture: Texture,
+ saved_index: Option<SavedTargetIndex>,
+}
+
+/// Helper struct for resolving device Textures for use during rendering passes.
+///
+/// Manages the mapping between the at-a-distance texture handles used by the
+/// `RenderBackend` (which does not directly interface with the GPU) and actual
+/// device texture handles.
+struct TextureResolver {
+ /// A map to resolve texture cache IDs to native textures.
+ texture_cache_map: FastHashMap<CacheTextureId, Texture>,
+
+ /// Map of external image IDs to native textures.
+ external_images: FastHashMap<(ExternalImageId, u8), ExternalTexture>,
+
+ /// A special 1x1 dummy texture used for shaders that expect to work with
+ /// the output of the previous pass but are actually running in the first
+ /// pass.
+ dummy_cache_texture: Texture,
+
+ /// The outputs of the previous pass, if applicable.
+ prev_pass_color: Option<ActiveTexture>,
+ prev_pass_alpha: Option<ActiveTexture>,
+
+ /// Saved render targets from previous passes. This is used when a pass
+ /// needs access to the result of a pass other than the immediately-preceding
+ /// one. In this case, the `RenderTask` will get a non-`None` `saved_index`,
+ /// which will cause the resulting render target to be persisted in this list
+ /// (at that index) until the end of the frame.
+ saved_targets: Vec<Texture>,
+
+ /// Pool of idle render target textures ready for re-use.
+ ///
+ /// Naively, it would seem like we only ever need two pairs of (color,
+ /// alpha) render targets: one for the output of the previous pass (serving
+ /// as input to the current pass), and one for the output of the current
+ /// pass. However, there are cases where the output of one pass is used as
+ /// the input to multiple future passes. For example, drop-shadows draw the
+ /// picture in pass X, then reference it in pass X+1 to create the blurred
+ /// shadow, and pass the results of both X and X+1 to pass X+2 draw the
+ /// actual content.
+ ///
+ /// See the comments in `allocate_target_texture` for more insight on why
+ /// reuse is a win.
+ render_target_pool: Vec<Texture>,
+}
+
+impl TextureResolver {
+ fn new(device: &mut Device) -> TextureResolver {
+ let dummy_cache_texture = device
+ .create_texture(
+ TextureTarget::Array,
+ ImageFormat::RGBA8,
+ 1,
+ 1,
+ TextureFilter::Linear,
+ None,
+ 1,
+ );
+ device.upload_texture_immediate(
+ &dummy_cache_texture,
+ &[0xff, 0xff, 0xff, 0xff],
+ );
+
+ TextureResolver {
+ texture_cache_map: FastHashMap::default(),
+ external_images: FastHashMap::default(),
+ dummy_cache_texture,
+ prev_pass_alpha: None,
+ prev_pass_color: None,
+ saved_targets: Vec::default(),
+ render_target_pool: Vec::new(),
+ }
+ }
+
+ fn deinit(self, device: &mut Device) {
+ device.delete_texture(self.dummy_cache_texture);
+
+ for (_id, texture) in self.texture_cache_map {
+ device.delete_texture(texture);
+ }
+
+ for texture in self.render_target_pool {
+ device.delete_texture(texture);
+ }
+ }
+
+ fn begin_frame(&mut self) {
+ assert!(self.prev_pass_color.is_none());
+ assert!(self.prev_pass_alpha.is_none());
+ assert!(self.saved_targets.is_empty());
+ }
+
+ fn end_frame(&mut self, device: &mut Device, frame_id: GpuFrameId) {
+ // return the cached targets to the pool
+ self.end_pass(device, None, None);
+ // return the saved targets as well
+ while let Some(target) = self.saved_targets.pop() {
+ self.return_to_pool(device, target);
+ }
+
+ // GC the render target pool, if it's currently > 32 MB in size.
+ //
+ // We use a simple scheme whereby we drop any texture that hasn't been used
+ // in the last 60 frames, until we are below the size threshold. This should
+ // generally prevent any sustained build-up of unused textures, unless we don't
+ // generate frames for a long period. This can happen when the window is
+ // minimized, and we probably want to flush all the WebRender caches in that case [1].
+ // There is also a second "red line" memory threshold which prevents
+ // memory exhaustion if many render targets are allocated within a small
+ // number of frames. For now this is set at 320 MB (10x the normal memory threshold).
+ //
+ // [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1494099
+ self.gc_targets(
+ device,
+ frame_id,
+ 32 * 1024 * 1024,
+ 32 * 1024 * 1024 * 10,
+ 60,
+ );
+ }
+
+ /// Transfers ownership of a render target back to the pool.
+ fn return_to_pool(&mut self, device: &mut Device, target: Texture) {
+ device.invalidate_render_target(&target);
+ self.render_target_pool.push(target);
+ }
+
+ /// Frees any memory possible, in the event of a memory pressure signal.
+ fn on_memory_pressure(
+ &mut self,
+ device: &mut Device,
+ ) {
+ // Clear all textures in the render target pool
+ for target in self.render_target_pool.drain(..) {
+ device.delete_texture(target);
+ }
+ }
+
+ /// Drops all targets from the render target pool that do not satisfy the predicate.
+ pub fn gc_targets(
+ &mut self,
+ device: &mut Device,
+ current_frame_id: GpuFrameId,
+ total_bytes_threshold: usize,
+ total_bytes_red_line_threshold: usize,
+ frames_threshold: usize,
+ ) {
+ // Get the total GPU memory size used by the current render target pool
+ let mut rt_pool_size_in_bytes: usize = self.render_target_pool
+ .iter()
+ .map(|t| t.size_in_bytes())
+ .sum();
+
+ // If the total size of the pool is less than the threshold, don't bother
+ // trying to GC any targets
+ if rt_pool_size_in_bytes <= total_bytes_threshold {
+ return;
+ }
+
+ // Sort the current pool by age, so that we remove oldest textures first
+ self.render_target_pool.sort_by_key(|t| t.last_frame_used());
+
+ // We can't just use retain() because `Texture` requires manual cleanup.
+ let mut retained_targets = SmallVec::<[Texture; 8]>::new();
+
+ for target in self.render_target_pool.drain(..) {
+ // Drop oldest textures until we are under the allowed size threshold.
+ // However, if it's been used in very recently, it is always kept around,
+ // which ensures we don't thrash texture allocations on pages that do
+ // require a very large render target pool and are regularly changing.
+ if (rt_pool_size_in_bytes > total_bytes_red_line_threshold) ||
+ (rt_pool_size_in_bytes > total_bytes_threshold &&
+ !target.used_recently(current_frame_id, frames_threshold))
+ {
+ rt_pool_size_in_bytes -= target.size_in_bytes();
+ device.delete_texture(target);
+ } else {
+ retained_targets.push(target);
+ }
+ }
+
+ self.render_target_pool.extend(retained_targets);
+ }
+
+ fn end_pass(
+ &mut self,
+ device: &mut Device,
+ a8_texture: Option<ActiveTexture>,
+ rgba8_texture: Option<ActiveTexture>,
+ ) {
+ // If we have cache textures from previous pass, return them to the pool.
+ // Also assign the pool index of those cache textures to last pass's index because this is
+ // the result of last pass.
+ // Note: the order here is important, needs to match the logic in `RenderPass::build()`.
+ if let Some(at) = self.prev_pass_color.take() {
+ if let Some(index) = at.saved_index {
+ assert_eq!(self.saved_targets.len(), index.0);
+ self.saved_targets.push(at.texture);
+ } else {
+ self.return_to_pool(device, at.texture);
+ }
+ }
+ if let Some(at) = self.prev_pass_alpha.take() {
+ if let Some(index) = at.saved_index {
+ assert_eq!(self.saved_targets.len(), index.0);
+ self.saved_targets.push(at.texture);
+ } else {
+ self.return_to_pool(device, at.texture);
+ }
+ }
+
+ // We have another pass to process, make these textures available
+ // as inputs to the next pass.
+ self.prev_pass_color = rgba8_texture;
+ self.prev_pass_alpha = a8_texture;
+ }
+
+ // Bind a source texture to the device.
+ fn bind(&self, texture_id: &TextureSource, sampler: TextureSampler, device: &mut Device) -> Swizzle {
+ match *texture_id {
+ TextureSource::Invalid => {
+ Swizzle::default()
+ }
+ TextureSource::Dummy => {
+ let swizzle = Swizzle::default();
+ device.bind_texture(sampler, &self.dummy_cache_texture, swizzle);
+ swizzle
+ }
+ TextureSource::PrevPassAlpha => {
+ let texture = match self.prev_pass_alpha {
+ Some(ref at) => &at.texture,
+ None => &self.dummy_cache_texture,
+ };
+ let swizzle = Swizzle::default();
+ device.bind_texture(sampler, texture, swizzle);
+ swizzle
+ }
+ TextureSource::PrevPassColor => {
+ let texture = match self.prev_pass_color {
+ Some(ref at) => &at.texture,
+ None => &self.dummy_cache_texture,
+ };
+ let swizzle = Swizzle::default();
+ device.bind_texture(sampler, texture, swizzle);
+ swizzle
+ }
+ TextureSource::External(external_image) => {
+ let texture = self.external_images
+ .get(&(external_image.id, external_image.channel_index))
+ .expect("BUG: External image should be resolved by now");
+ device.bind_external_texture(sampler, texture);
+ Swizzle::default()
+ }
+ TextureSource::TextureCache(index, swizzle) => {
+ let texture = &self.texture_cache_map[&index];
+ device.bind_texture(sampler, texture, swizzle);
+ swizzle
+ }
+ TextureSource::RenderTaskCache(saved_index, swizzle) => {
+ if saved_index.0 < self.saved_targets.len() {
+ let texture = &self.saved_targets[saved_index.0];
+ device.bind_texture(sampler, texture, swizzle)
+ } else {
+ // Check if this saved index is referring to a the prev pass
+ if Some(saved_index) == self.prev_pass_color.as_ref().and_then(|at| at.saved_index) {
+ let texture = match self.prev_pass_color {
+ Some(ref at) => &at.texture,
+ None => &self.dummy_cache_texture,
+ };
+ device.bind_texture(sampler, texture, swizzle);
+ } else if Some(saved_index) == self.prev_pass_alpha.as_ref().and_then(|at| at.saved_index) {
+ let texture = match self.prev_pass_alpha {
+ Some(ref at) => &at.texture,
+ None => &self.dummy_cache_texture,
+ };
+ device.bind_texture(sampler, texture, swizzle);
+ }
+ }
+ swizzle
+ }
+ }
+ }
+
+ // Get the real (OpenGL) texture ID for a given source texture.
+ // For a texture cache texture, the IDs are stored in a vector
+ // map for fast access.
+ fn resolve(&self, texture_id: &TextureSource) -> Option<(&Texture, Swizzle)> {
+ match *texture_id {
+ TextureSource::Invalid => None,
+ TextureSource::Dummy => {
+ Some((&self.dummy_cache_texture, Swizzle::default()))
+ }
+ TextureSource::PrevPassAlpha => Some((
+ match self.prev_pass_alpha {
+ Some(ref at) => &at.texture,
+ None => &self.dummy_cache_texture,
+ },
+ Swizzle::default(),
+ )),
+ TextureSource::PrevPassColor => Some((
+ match self.prev_pass_color {
+ Some(ref at) => &at.texture,
+ None => &self.dummy_cache_texture,
+ },
+ Swizzle::default(),
+ )),
+ TextureSource::External(..) => {
+ panic!("BUG: External textures cannot be resolved, they can only be bound.");
+ }
+ TextureSource::TextureCache(index, swizzle) => {
+ Some((&self.texture_cache_map[&index], swizzle))
+ }
+ TextureSource::RenderTaskCache(saved_index, swizzle) => {
+ Some((&self.saved_targets[saved_index.0], swizzle))
+ }
+ }
+ }
+
+ // Retrieve the deferred / resolved UV rect if an external texture, otherwise
+ // return the default supplied UV rect.
+ fn get_uv_rect(
+ &self,
+ source: &TextureSource,
+ default_value: TexelRect,
+ ) -> TexelRect {
+ match source {
+ TextureSource::External(ref external_image) => {
+ let texture = self.external_images
+ .get(&(external_image.id, external_image.channel_index))
+ .expect("BUG: External image should be resolved by now");
+ texture.get_uv_rect()
+ }
+ _ => {
+ default_value
+ }
+ }
+ }
+
+ fn report_memory(&self) -> MemoryReport {
+ let mut report = MemoryReport::default();
+
+ // We're reporting GPU memory rather than heap-allocations, so we don't
+ // use size_of_op.
+ for t in self.texture_cache_map.values() {
+ report.texture_cache_textures += t.size_in_bytes();
+ }
+ for t in self.render_target_pool.iter() {
+ report.render_target_textures += t.size_in_bytes();
+ }
+
+ report
+ }
+}
+
+#[derive(Debug, Copy, Clone, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum BlendMode {
+ None,
+ Alpha,
+ PremultipliedAlpha,
+ PremultipliedDestOut,
+ SubpixelDualSource,
+ SubpixelConstantTextColor(ColorF),
+ SubpixelWithBgColor,
+ Advanced(MixBlendMode),
+}
+
+/// Tracks the state of each row in the GPU cache texture.
+struct CacheRow {
+ /// Mirrored block data on CPU for this row. We store a copy of
+ /// the data on the CPU side to improve upload batching.
+ cpu_blocks: Box<[GpuBlockData; MAX_VERTEX_TEXTURE_WIDTH]>,
+ /// The first offset in this row that is dirty.
+ min_dirty: u16,
+ /// The last offset in this row that is dirty.
+ max_dirty: u16,
+}
+
+impl CacheRow {
+ fn new() -> Self {
+ CacheRow {
+ cpu_blocks: Box::new([GpuBlockData::EMPTY; MAX_VERTEX_TEXTURE_WIDTH]),
+ min_dirty: MAX_VERTEX_TEXTURE_WIDTH as _,
+ max_dirty: 0,
+ }
+ }
+
+ fn is_dirty(&self) -> bool {
+ return self.min_dirty < self.max_dirty;
+ }
+
+ fn clear_dirty(&mut self) {
+ self.min_dirty = MAX_VERTEX_TEXTURE_WIDTH as _;
+ self.max_dirty = 0;
+ }
+
+ fn add_dirty(&mut self, block_offset: usize, block_count: usize) {
+ self.min_dirty = self.min_dirty.min(block_offset as _);
+ self.max_dirty = self.max_dirty.max((block_offset + block_count) as _);
+ }
+
+ fn dirty_blocks(&self) -> &[GpuBlockData] {
+ return &self.cpu_blocks[self.min_dirty as usize .. self.max_dirty as usize];
+ }
+}
+
+/// The bus over which CPU and GPU versions of the GPU cache
+/// get synchronized.
+enum GpuCacheBus {
+ /// PBO-based updates, currently operate on a row granularity.
+ /// Therefore, are subject to fragmentation issues.
+ PixelBuffer {
+ /// PBO used for transfers.
+ buffer: PBO,
+ /// Per-row data.
+ rows: Vec<CacheRow>,
+ },
+ /// Shader-based scattering updates. Currently rendered by a set
+ /// of points into the GPU texture, each carrying a `GpuBlockData`.
+ Scatter {
+ /// Special program to run the scattered update.
+ program: Program,
+ /// VAO containing the source vertex buffers.
+ vao: CustomVAO,
+ /// VBO for positional data, supplied as normalized `u16`.
+ buf_position: VBO<[u16; 2]>,
+ /// VBO for gpu block data.
+ buf_value: VBO<GpuBlockData>,
+ /// Currently stored block count.
+ count: usize,
+ },
+}
+
+/// The device-specific representation of the cache texture in gpu_cache.rs
+struct GpuCacheTexture {
+ texture: Option<Texture>,
+ bus: GpuCacheBus,
+}
+
+impl GpuCacheTexture {
+
+ /// Ensures that we have an appropriately-sized texture. Returns true if a
+ /// new texture was created.
+ fn ensure_texture(&mut self, device: &mut Device, height: i32) {
+ // If we already have a texture that works, we're done.
+ if self.texture.as_ref().map_or(false, |t| t.get_dimensions().height >= height) {
+ if GPU_CACHE_RESIZE_TEST {
+ // Special debug mode - resize the texture even though it's fine.
+ } else {
+ return;
+ }
+ }
+
+ // Take the old texture, if any.
+ let blit_source = self.texture.take();
+
+ // Create the new texture.
+ assert!(height >= 2, "Height is too small for ANGLE");
+ let new_size = DeviceIntSize::new(MAX_VERTEX_TEXTURE_WIDTH as _, height);
+ // If glCopyImageSubData is supported, this texture doesn't need
+ // to be a render target. This prevents GL errors due to framebuffer
+ // incompleteness on devices that don't support RGBAF32 render targets.
+ // TODO(gw): We still need a proper solution for the subset of devices
+ // that don't support glCopyImageSubData *OR* rendering to a
+ // RGBAF32 render target. These devices will currently fail
+ // to resize the GPU cache texture.
+ let supports_copy_image_sub_data = device.get_capabilities().supports_copy_image_sub_data;
+ let rt_info = if supports_copy_image_sub_data {
+ None
+ } else {
+ Some(RenderTargetInfo { has_depth: false })
+ };
+ let mut texture = device.create_texture(
+ TextureTarget::Default,
+ ImageFormat::RGBAF32,
+ new_size.width,
+ new_size.height,
+ TextureFilter::Nearest,
+ rt_info,
+ 1,
+ );
+
+ // Blit the contents of the previous texture, if applicable.
+ if let Some(blit_source) = blit_source {
+ device.blit_renderable_texture(&mut texture, &blit_source);
+ device.delete_texture(blit_source);
+ }
+
+ self.texture = Some(texture);
+ }
+
+ fn new(device: &mut Device, use_scatter: bool) -> Result<Self, RendererError> {
+ let bus = if use_scatter {
+ let program = device.create_program_linked(
+ "gpu_cache_update",
+ &[],
+ &desc::GPU_CACHE_UPDATE,
+ )?;
+ let buf_position = device.create_vbo();
+ let buf_value = device.create_vbo();
+ //Note: the vertex attributes have to be supplied in the same order
+ // as for program creation, but each assigned to a different stream.
+ let vao = device.create_custom_vao(&[
+ buf_position.stream_with(&desc::GPU_CACHE_UPDATE.vertex_attributes[0..1]),
+ buf_value .stream_with(&desc::GPU_CACHE_UPDATE.vertex_attributes[1..2]),
+ ]);
+ GpuCacheBus::Scatter {
+ program,
+ vao,
+ buf_position,
+ buf_value,
+ count: 0,
+ }
+ } else {
+ let buffer = device.create_pbo();
+ GpuCacheBus::PixelBuffer {
+ buffer,
+ rows: Vec::new(),
+ }
+ };
+
+ Ok(GpuCacheTexture {
+ texture: None,
+ bus,
+ })
+ }
+
+ fn deinit(mut self, device: &mut Device) {
+ if let Some(t) = self.texture.take() {
+ device.delete_texture(t);
+ }
+ match self.bus {
+ GpuCacheBus::PixelBuffer { buffer, ..} => {
+ device.delete_pbo(buffer);
+ }
+ GpuCacheBus::Scatter { program, vao, buf_position, buf_value, ..} => {
+ device.delete_program(program);
+ device.delete_custom_vao(vao);
+ device.delete_vbo(buf_position);
+ device.delete_vbo(buf_value);
+ }
+ }
+ }
+
+ fn get_height(&self) -> i32 {
+ self.texture.as_ref().map_or(0, |t| t.get_dimensions().height)
+ }
+
+ fn prepare_for_updates(
+ &mut self,
+ device: &mut Device,
+ total_block_count: usize,
+ max_height: i32,
+ ) {
+ self.ensure_texture(device, max_height);
+ match self.bus {
+ GpuCacheBus::PixelBuffer { .. } => {},
+ GpuCacheBus::Scatter {
+ ref mut buf_position,
+ ref mut buf_value,
+ ref mut count,
+ ..
+ } => {
+ *count = 0;
+ if total_block_count > buf_value.allocated_count() {
+ device.allocate_vbo(buf_position, total_block_count, VertexUsageHint::Stream);
+ device.allocate_vbo(buf_value, total_block_count, VertexUsageHint::Stream);
+ }
+ }
+ }
+ }
+
+ fn update(&mut self, device: &mut Device, updates: &GpuCacheUpdateList) {
+ match self.bus {
+ GpuCacheBus::PixelBuffer { ref mut rows, .. } => {
+ for update in &updates.updates {
+ match *update {
+ GpuCacheUpdate::Copy {
+ block_index,
+ block_count,
+ address,
+ } => {
+ let row = address.v as usize;
+
+ // Ensure that the CPU-side shadow copy of the GPU cache data has enough
+ // rows to apply this patch.
+ while rows.len() <= row {
+ // Add a new row.
+ rows.push(CacheRow::new());
+ }
+
+ // Copy the blocks from the patch array in the shadow CPU copy.
+ let block_offset = address.u as usize;
+ let data = &mut rows[row].cpu_blocks;
+ for i in 0 .. block_count {
+ data[block_offset + i] = updates.blocks[block_index + i];
+ }
+
+ // This row is dirty (needs to be updated in GPU texture).
+ rows[row].add_dirty(block_offset, block_count);
+ }
+ }
+ }
+ }
+ GpuCacheBus::Scatter {
+ ref buf_position,
+ ref buf_value,
+ ref mut count,
+ ..
+ } => {
+ //TODO: re-use this heap allocation
+ // Unused positions will be left as 0xFFFF, which translates to
+ // (1.0, 1.0) in the vertex output position and gets culled out
+ let mut position_data = vec![[!0u16; 2]; updates.blocks.len()];
+ let size = self.texture.as_ref().unwrap().get_dimensions().to_usize();
+
+ for update in &updates.updates {
+ match *update {
+ GpuCacheUpdate::Copy {
+ block_index,
+ block_count,
+ address,
+ } => {
+ // Convert the absolute texel position into normalized
+ let y = ((2*address.v as usize + 1) << 15) / size.height;
+ for i in 0 .. block_count {
+ let x = ((2*address.u as usize + 2*i + 1) << 15) / size.width;
+ position_data[block_index + i] = [x as _, y as _];
+ }
+ }
+ }
+ }
+
+ device.fill_vbo(buf_value, &updates.blocks, *count);
+ device.fill_vbo(buf_position, &position_data, *count);
+ *count += position_data.len();
+ }
+ }
+ }
+
+ fn flush(&mut self, device: &mut Device) -> usize {
+ let texture = self.texture.as_ref().unwrap();
+ match self.bus {
+ GpuCacheBus::PixelBuffer { ref buffer, ref mut rows } => {
+ let rows_dirty = rows
+ .iter()
+ .filter(|row| row.is_dirty())
+ .count();
+ if rows_dirty == 0 {
+ return 0
+ }
+
+ let (upload_size, _) = device.required_upload_size_and_stride(
+ DeviceIntSize::new(MAX_VERTEX_TEXTURE_WIDTH as i32, 1),
+ texture.get_format(),
+ );
+
+ let mut uploader = device.upload_texture(
+ texture,
+ buffer,
+ rows_dirty * upload_size,
+ );
+
+ for (row_index, row) in rows.iter_mut().enumerate() {
+ if !row.is_dirty() {
+ continue;
+ }
+
+ let blocks = row.dirty_blocks();
+ let rect = DeviceIntRect::new(
+ DeviceIntPoint::new(row.min_dirty as i32, row_index as i32),
+ DeviceIntSize::new(blocks.len() as i32, 1),
+ );
+
+ uploader.upload(rect, 0, None, None, blocks.as_ptr(), blocks.len());
+
+ row.clear_dirty();
+ }
+
+ rows_dirty
+ }
+ GpuCacheBus::Scatter { ref program, ref vao, count, .. } => {
+ device.disable_depth();
+ device.set_blend(false);
+ device.bind_program(program);
+ device.bind_custom_vao(vao);
+ device.bind_draw_target(
+ DrawTarget::from_texture(
+ texture,
+ 0,
+ false,
+ ),
+ );
+ device.draw_nonindexed_points(0, count as _);
+ 0
+ }
+ }
+ }
+}
+
+struct VertexDataTexture<T> {
+ texture: Option<Texture>,
+ format: ImageFormat,
+ pbo: PBO,
+ _marker: PhantomData<T>,
+}
+
+impl<T> VertexDataTexture<T> {
+ fn new(
+ device: &mut Device,
+ format: ImageFormat,
+ ) -> Self {
+ VertexDataTexture {
+ texture: None,
+ format,
+ pbo: device.create_pbo(),
+ _marker: PhantomData,
+ }
+ }
+
+ /// Returns a borrow of the GPU texture. Panics if it hasn't been initialized.
+ fn texture(&self) -> &Texture {
+ self.texture.as_ref().unwrap()
+ }
+
+ /// Returns an estimate of the GPU memory consumed by this VertexDataTexture.
+ fn size_in_bytes(&self) -> usize {
+ self.texture.as_ref().map_or(0, |t| t.size_in_bytes())
+ }
+
+ fn update(&mut self, device: &mut Device, data: &mut Vec<T>) {
+ debug_assert!(mem::size_of::<T>() % 16 == 0);
+ let texels_per_item = mem::size_of::<T>() / 16;
+ let items_per_row = MAX_VERTEX_TEXTURE_WIDTH / texels_per_item;
+ debug_assert_ne!(items_per_row, 0);
+
+ // Ensure we always end up with a texture when leaving this method.
+ let mut len = data.len();
+ if len == 0 {
+ if self.texture.is_some() {
+ return;
+ }
+ data.reserve(items_per_row);
+ len = items_per_row;
+ } else {
+ // Extend the data array to have enough capacity to upload at least
+ // a multiple of the row size. This ensures memory safety when the
+ // array is passed to OpenGL to upload to the GPU.
+ let extra = len % items_per_row;
+ if extra != 0 {
+ let padding = items_per_row - extra;
+ data.reserve(padding);
+ len += padding;
+ }
+ }
+
+ let needed_height = (len / items_per_row) as i32;
+ let existing_height = self.texture.as_ref().map_or(0, |t| t.get_dimensions().height);
+
+ // Create a new texture if needed.
+ //
+ // These textures are generally very small, which is why we don't bother
+ // with incremental updates and just re-upload every frame. For most pages
+ // they're one row each, and on stress tests like css-francine they end up
+ // in the 6-14 range. So we size the texture tightly to what we need (usually
+ // 1), and shrink it if the waste would be more than `VERTEX_TEXTURE_EXTRA_ROWS`
+ // rows. This helps with memory overhead, especially because there are several
+ // instances of these textures per Renderer.
+ if needed_height > existing_height || needed_height + VERTEX_TEXTURE_EXTRA_ROWS < existing_height {
+ // Drop the existing texture, if any.
+ if let Some(t) = self.texture.take() {
+ device.delete_texture(t);
+ }
+
+ let texture = device.create_texture(
+ TextureTarget::Default,
+ self.format,
+ MAX_VERTEX_TEXTURE_WIDTH as i32,
+ // Ensure height is at least two to work around
+ // https://bugs.chromium.org/p/angleproject/issues/detail?id=3039
+ needed_height.max(2),
+ TextureFilter::Nearest,
+ None,
+ 1,
+ );
+ self.texture = Some(texture);
+ }
+
+ // Note: the actual width can be larger than the logical one, with a few texels
+ // of each row unused at the tail. This is needed because there is still hardware
+ // (like Intel iGPUs) that prefers power-of-two sizes of textures ([1]).
+ //
+ // [1] https://software.intel.com/en-us/articles/opengl-performance-tips-power-of-two-textures-have-better-performance
+ let logical_width = if needed_height == 1 {
+ data.len() * texels_per_item
+ } else {
+ MAX_VERTEX_TEXTURE_WIDTH - (MAX_VERTEX_TEXTURE_WIDTH % texels_per_item)
+ };
+
+ let rect = DeviceIntRect::new(
+ DeviceIntPoint::zero(),
+ DeviceIntSize::new(logical_width as i32, needed_height),
+ );
+
+ debug_assert!(len <= data.capacity(), "CPU copy will read out of bounds");
+ let (upload_size, _) = device.required_upload_size_and_stride(
+ rect.size,
+ self.texture().get_format(),
+ );
+ if upload_size > 0 {
+ device
+ .upload_texture(self.texture(), &self.pbo, upload_size)
+ .upload(rect, 0, None, None, data.as_ptr(), len);
+ }
+ }
+
+ fn deinit(mut self, device: &mut Device) {
+ device.delete_pbo(self.pbo);
+ if let Some(t) = self.texture.take() {
+ device.delete_texture(t);
+ }
+ }
+}
+
+struct FrameOutput {
+ last_access: GpuFrameId,
+ fbo_id: FBOId,
+}
+
+#[derive(PartialEq)]
+struct TargetSelector {
+ size: DeviceIntSize,
+ num_layers: usize,
+ format: ImageFormat,
+}
+
+struct LazyInitializedDebugRenderer {
+ debug_renderer: Option<DebugRenderer>,
+ failed: bool,
+}
+
+impl LazyInitializedDebugRenderer {
+ pub fn new() -> Self {
+ Self {
+ debug_renderer: None,
+ failed: false,
+ }
+ }
+
+ pub fn get_mut<'a>(&'a mut self, device: &mut Device) -> Option<&'a mut DebugRenderer> {
+ if self.failed {
+ return None;
+ }
+ if self.debug_renderer.is_none() {
+ match DebugRenderer::new(device) {
+ Ok(renderer) => { self.debug_renderer = Some(renderer); }
+ Err(_) => {
+ // The shader compilation code already logs errors.
+ self.failed = true;
+ }
+ }
+ }
+
+ self.debug_renderer.as_mut()
+ }
+
+ /// Returns mut ref to `DebugRenderer` if one already exists, otherwise returns `None`.
+ pub fn try_get_mut<'a>(&'a mut self) -> Option<&'a mut DebugRenderer> {
+ self.debug_renderer.as_mut()
+ }
+
+ pub fn deinit(self, device: &mut Device) {
+ if let Some(debug_renderer) = self.debug_renderer {
+ debug_renderer.deinit(device);
+ }
+ }
+}
+
+// NB: If you add more VAOs here, be sure to deinitialize them in
+// `Renderer::deinit()` below.
+pub struct RendererVAOs {
+ prim_vao: VAO,
+ blur_vao: VAO,
+ clip_vao: VAO,
+ border_vao: VAO,
+ line_vao: VAO,
+ scale_vao: VAO,
+ gradient_vao: VAO,
+ resolve_vao: VAO,
+ svg_filter_vao: VAO,
+ composite_vao: VAO,
+ clear_vao: VAO,
+}
+
+/// Information about the state of the debugging / profiler overlay in native compositing mode.
+struct DebugOverlayState {
+ /// True if any of the current debug flags will result in drawing a debug overlay.
+ is_enabled: bool,
+
+ /// The current size of the debug overlay surface. None implies that the
+ /// debug surface isn't currently allocated.
+ current_size: Option<DeviceIntSize>,
+}
+
+impl DebugOverlayState {
+ fn new() -> Self {
+ DebugOverlayState {
+ is_enabled: false,
+ current_size: None,
+ }
+ }
+}
+
+pub struct VertexDataTextures {
+ prim_header_f_texture: VertexDataTexture<PrimitiveHeaderF>,
+ prim_header_i_texture: VertexDataTexture<PrimitiveHeaderI>,
+ transforms_texture: VertexDataTexture<TransformData>,
+ render_task_texture: VertexDataTexture<RenderTaskData>,
+}
+
+impl VertexDataTextures {
+ fn new(
+ device: &mut Device,
+ ) -> Self {
+ VertexDataTextures {
+ prim_header_f_texture: VertexDataTexture::new(device, ImageFormat::RGBAF32),
+ prim_header_i_texture: VertexDataTexture::new(device, ImageFormat::RGBAI32),
+ transforms_texture: VertexDataTexture::new(device, ImageFormat::RGBAF32),
+ render_task_texture: VertexDataTexture::new(device, ImageFormat::RGBAF32),
+ }
+ }
+
+ fn update(
+ &mut self,
+ device: &mut Device,
+ frame: &mut Frame,
+ ) {
+ self.prim_header_f_texture.update(
+ device,
+ &mut frame.prim_headers.headers_float,
+ );
+ device.bind_texture(
+ TextureSampler::PrimitiveHeadersF,
+ &self.prim_header_f_texture.texture(),
+ Swizzle::default(),
+ );
+
+ self.prim_header_i_texture.update(
+ device,
+ &mut frame.prim_headers.headers_int,
+ );
+ device.bind_texture(
+ TextureSampler::PrimitiveHeadersI,
+ &self.prim_header_i_texture.texture(),
+ Swizzle::default(),
+ );
+
+ self.transforms_texture.update(
+ device,
+ &mut frame.transform_palette,
+ );
+ device.bind_texture(
+ TextureSampler::TransformPalette,
+ &self.transforms_texture.texture(),
+ Swizzle::default(),
+ );
+
+ self.render_task_texture.update(
+ device,
+ &mut frame.render_tasks.task_data,
+ );
+ device.bind_texture(
+ TextureSampler::RenderTasks,
+ &self.render_task_texture.texture(),
+ Swizzle::default(),
+ );
+ }
+
+ fn size_in_bytes(&self) -> usize {
+ self.prim_header_f_texture.size_in_bytes() +
+ self.prim_header_i_texture.size_in_bytes() +
+ self.transforms_texture.size_in_bytes() +
+ self.render_task_texture.size_in_bytes()
+ }
+
+ fn deinit(
+ self,
+ device: &mut Device,
+ ) {
+ self.transforms_texture.deinit(device);
+ self.prim_header_f_texture.deinit(device);
+ self.prim_header_i_texture.deinit(device);
+ self.render_task_texture.deinit(device);
+ }
+}
+
+/// The renderer is responsible for submitting to the GPU the work prepared by the
+/// RenderBackend.
+///
+/// We have a separate `Renderer` instance for each instance of WebRender (generally
+/// one per OS window), and all instances share the same thread.
+pub struct Renderer {
+ result_rx: Receiver<ResultMsg>,
+ debug_server: Box<dyn DebugServer>,
+ pub device: Device,
+ pending_texture_updates: Vec<TextureUpdateList>,
+ /// True if there are any TextureCacheUpdate pending.
+ pending_texture_cache_updates: bool,
+ pending_native_surface_updates: Vec<NativeSurfaceOperation>,
+ pending_gpu_cache_updates: Vec<GpuCacheUpdateList>,
+ pending_gpu_cache_clear: bool,
+ pending_shader_updates: Vec<PathBuf>,
+ active_documents: Vec<(DocumentId, RenderedDocument)>,
+
+ shaders: Rc<RefCell<Shaders>>,
+
+ max_recorded_profiles: usize,
+
+ clear_color: Option<ColorF>,
+ enable_clear_scissor: bool,
+ enable_advanced_blend_barriers: bool,
+ clear_caches_with_quads: bool,
+
+ debug: LazyInitializedDebugRenderer,
+ debug_flags: DebugFlags,
+ backend_profile_counters: BackendProfileCounters,
+ profile_counters: RendererProfileCounters,
+ resource_upload_time: u64,
+ gpu_cache_upload_time: u64,
+ profiler: Profiler,
+ new_frame_indicator: ChangeIndicator,
+ new_scene_indicator: ChangeIndicator,
+ slow_frame_indicator: ChangeIndicator,
+ slow_txn_indicator: ChangeIndicator,
+
+ last_time: u64,
+
+ pub gpu_profile: GpuProfiler<GpuProfileTag>,
+ vaos: RendererVAOs,
+
+ gpu_cache_texture: GpuCacheTexture,
+ vertex_data_textures: Vec<VertexDataTextures>,
+ current_vertex_data_textures: usize,
+
+ /// When the GPU cache debugger is enabled, we keep track of the live blocks
+ /// in the GPU cache so that we can use them for the debug display. This
+ /// member stores those live blocks, indexed by row.
+ gpu_cache_debug_chunks: Vec<Vec<GpuCacheDebugChunk>>,
+
+ gpu_cache_frame_id: FrameId,
+ gpu_cache_overflow: bool,
+
+ pipeline_info: PipelineInfo,
+
+ // Manages and resolves source textures IDs to real texture IDs.
+ texture_resolver: TextureResolver,
+
+ // A PBO used to do asynchronous texture cache uploads.
+ texture_cache_upload_pbo: PBO,
+
+ dither_matrix_texture: Option<Texture>,
+
+ /// Optional trait object that allows the client
+ /// application to provide external buffers for image data.
+ external_image_handler: Option<Box<dyn ExternalImageHandler>>,
+
+ /// Optional trait object that allows the client
+ /// application to provide a texture handle to
+ /// copy the WR output to.
+ output_image_handler: Option<Box<dyn OutputImageHandler>>,
+
+ /// Optional function pointers for measuring memory used by a given
+ /// heap-allocated pointer.
+ size_of_ops: Option<MallocSizeOfOps>,
+
+ // Currently allocated FBOs for output frames.
+ output_targets: FastHashMap<u32, FrameOutput>,
+
+ pub renderer_errors: Vec<RendererError>,
+
+ pub(in crate) async_frame_recorder: Option<AsyncScreenshotGrabber>,
+ pub(in crate) async_screenshots: Option<AsyncScreenshotGrabber>,
+
+ /// List of profile results from previous frames. Can be retrieved
+ /// via get_frame_profiles().
+ cpu_profiles: VecDeque<CpuProfile>,
+ gpu_profiles: VecDeque<GpuProfile>,
+
+ /// Notification requests to be fulfilled after rendering.
+ notifications: Vec<NotificationRequest>,
+
+ device_size: Option<DeviceIntSize>,
+
+ /// A lazily created texture for the zoom debugging widget.
+ zoom_debug_texture: Option<Texture>,
+
+ /// The current mouse position. This is used for debugging
+ /// functionality only, such as the debug zoom widget.
+ cursor_position: DeviceIntPoint,
+
+ /// Guards to check if we might be rendering a frame with expired texture
+ /// cache entries.
+ shared_texture_cache_cleared: bool,
+
+ /// The set of documents which we've seen a publish for since last render.
+ documents_seen: FastHashSet<DocumentId>,
+
+ #[cfg(feature = "capture")]
+ read_fbo: FBOId,
+ #[cfg(feature = "replay")]
+ owned_external_images: FastHashMap<(ExternalImageId, u8), ExternalTexture>,
+
+ /// The compositing config, affecting how WR composites into the final scene.
+ compositor_config: CompositorConfig,
+
+ current_compositor_kind: CompositorKind,
+
+ /// Maintains a set of allocated native composite surfaces. This allows any
+ /// currently allocated surfaces to be cleaned up as soon as deinit() is
+ /// called (the normal bookkeeping for native surfaces exists in the
+ /// render backend thread).
+ allocated_native_surfaces: FastHashSet<NativeSurfaceId>,
+
+ /// If true, partial present state has been reset and everything needs to
+ /// be drawn on the next render.
+ force_redraw: bool,
+
+ /// State related to the debug / profiling overlays
+ debug_overlay_state: DebugOverlayState,
+
+ /// The dirty rectangle from the previous frame, used on platforms that
+ /// require keeping the front buffer fully correct when doing
+ /// partial present (e.g. unix desktop with EGL_EXT_buffer_age).
+ prev_dirty_rect: DeviceRect,
+}
+
+#[derive(Debug)]
+pub enum RendererError {
+ Shader(ShaderError),
+ Thread(std::io::Error),
+ Resource(ResourceCacheError),
+ MaxTextureSize,
+}
+
+impl From<ShaderError> for RendererError {
+ fn from(err: ShaderError) -> Self {
+ RendererError::Shader(err)
+ }
+}
+
+impl From<std::io::Error> for RendererError {
+ fn from(err: std::io::Error) -> Self {
+ RendererError::Thread(err)
+ }
+}
+
+impl From<ResourceCacheError> for RendererError {
+ fn from(err: ResourceCacheError) -> Self {
+ RendererError::Resource(err)
+ }
+}
+
+impl Renderer {
+ /// Initializes WebRender and creates a `Renderer` and `RenderApiSender`.
+ ///
+ /// # Examples
+ /// Initializes a `Renderer` with some reasonable values. For more information see
+ /// [`RendererOptions`][rendereroptions].
+ ///
+ /// ```rust,ignore
+ /// # use webrender::renderer::Renderer;
+ /// # use std::path::PathBuf;
+ /// let opts = webrender::RendererOptions {
+ /// device_pixel_ratio: 1.0,
+ /// resource_override_path: None,
+ /// enable_aa: false,
+ /// };
+ /// let (renderer, sender) = Renderer::new(opts);
+ /// ```
+ /// [rendereroptions]: struct.RendererOptions.html
+ pub fn new(
+ gl: Rc<dyn gl::Gl>,
+ notifier: Box<dyn RenderNotifier>,
+ mut options: RendererOptions,
+ shaders: Option<&mut WrShaders>,
+ start_size: DeviceIntSize,
+ ) -> Result<(Self, RenderApiSender), RendererError> {
+ if !wr_has_been_initialized() {
+ // If the profiler feature is enabled, try to load the profiler shared library
+ // if the path was provided.
+ #[cfg(feature = "profiler")]
+ unsafe {
+ if let Ok(ref tracy_path) = std::env::var("WR_TRACY_PATH") {
+ let ok = tracy_rs::load(tracy_path);
+ println!("Load tracy from {} -> {}", tracy_path, ok);
+ }
+ }
+
+ register_thread_with_profiler("Compositor".to_owned());
+ }
+
+ HAS_BEEN_INITIALIZED.store(true, Ordering::SeqCst);
+
+ let (api_tx, api_rx) = channel();
+ let (result_tx, result_rx) = channel();
+ let gl_type = gl.get_type();
+
+ let debug_server = new_debug_server(options.start_debug_server, api_tx.clone());
+
+ let mut device = Device::new(
+ gl,
+ options.resource_override_path.clone(),
+ options.use_optimized_shaders,
+ options.upload_method.clone(),
+ options.cached_programs.take(),
+ options.allow_pixel_local_storage_support,
+ options.allow_texture_storage_support,
+ options.allow_texture_swizzling,
+ options.dump_shader_source.take(),
+ options.surface_origin_is_top_left,
+ options.panic_on_gl_error,
+ );
+
+ let color_cache_formats = device.preferred_color_formats();
+ let swizzle_settings = device.swizzle_settings();
+ let use_dual_source_blending =
+ device.get_capabilities().supports_dual_source_blending &&
+ options.allow_dual_source_blending &&
+ // If using pixel local storage, subpixel AA isn't supported (we disable it on all
+ // mobile devices explicitly anyway).
+ !device.get_capabilities().supports_pixel_local_storage;
+ let ext_blend_equation_advanced =
+ options.allow_advanced_blend_equation &&
+ device.get_capabilities().supports_advanced_blend_equation;
+ let ext_blend_equation_advanced_coherent =
+ device.supports_extension("GL_KHR_blend_equation_advanced_coherent");
+
+ // 512 is the minimum that the texture cache can work with.
+ const MIN_TEXTURE_SIZE: i32 = 512;
+ if let Some(user_limit) = options.max_texture_size {
+ assert!(user_limit >= MIN_TEXTURE_SIZE);
+ device.clamp_max_texture_size(user_limit);
+ }
+ if device.max_texture_size() < MIN_TEXTURE_SIZE {
+ // Broken GL contexts can return a max texture size of zero (See #1260).
+ // Better to gracefully fail now than panic as soon as a texture is allocated.
+ error!(
+ "Device reporting insufficient max texture size ({})",
+ device.max_texture_size()
+ );
+ return Err(RendererError::MaxTextureSize);
+ }
+ let max_texture_size = device.max_texture_size();
+ let max_texture_layers = device.max_texture_layers();
+
+ device.begin_frame();
+
+ let shaders = match shaders {
+ Some(shaders) => Rc::clone(&shaders.shaders),
+ None => Rc::new(RefCell::new(Shaders::new(&mut device, gl_type, &options)?)),
+ };
+
+ let backend_profile_counters = BackendProfileCounters::new();
+
+ let dither_matrix_texture = if options.enable_dithering {
+ let dither_matrix: [u8; 64] = [
+ 0,
+ 48,
+ 12,
+ 60,
+ 3,
+ 51,
+ 15,
+ 63,
+ 32,
+ 16,
+ 44,
+ 28,
+ 35,
+ 19,
+ 47,
+ 31,
+ 8,
+ 56,
+ 4,
+ 52,
+ 11,
+ 59,
+ 7,
+ 55,
+ 40,
+ 24,
+ 36,
+ 20,
+ 43,
+ 27,
+ 39,
+ 23,
+ 2,
+ 50,
+ 14,
+ 62,
+ 1,
+ 49,
+ 13,
+ 61,
+ 34,
+ 18,
+ 46,
+ 30,
+ 33,
+ 17,
+ 45,
+ 29,
+ 10,
+ 58,
+ 6,
+ 54,
+ 9,
+ 57,
+ 5,
+ 53,
+ 42,
+ 26,
+ 38,
+ 22,
+ 41,
+ 25,
+ 37,
+ 21,
+ ];
+
+ let texture = device.create_texture(
+ TextureTarget::Default,
+ ImageFormat::R8,
+ 8,
+ 8,
+ TextureFilter::Nearest,
+ None,
+ 1,
+ );
+ device.upload_texture_immediate(&texture, &dither_matrix);
+
+ Some(texture)
+ } else {
+ None
+ };
+
+ let x0 = 0.0;
+ let y0 = 0.0;
+ let x1 = 1.0;
+ let y1 = 1.0;
+
+ let quad_indices: [u16; 6] = [0, 1, 2, 2, 1, 3];
+ let quad_vertices = [
+ PackedVertex { pos: [x0, y0] },
+ PackedVertex { pos: [x1, y0] },
+ PackedVertex { pos: [x0, y1] },
+ PackedVertex { pos: [x1, y1] },
+ ];
+
+ let prim_vao = device.create_vao(&desc::PRIM_INSTANCES);
+ device.bind_vao(&prim_vao);
+ device.update_vao_indices(&prim_vao, &quad_indices, VertexUsageHint::Static);
+ device.update_vao_main_vertices(&prim_vao, &quad_vertices, VertexUsageHint::Static);
+
+ let blur_vao = device.create_vao_with_new_instances(&desc::BLUR, &prim_vao);
+ let clip_vao = device.create_vao_with_new_instances(&desc::CLIP, &prim_vao);
+ let border_vao = device.create_vao_with_new_instances(&desc::BORDER, &prim_vao);
+ let scale_vao = device.create_vao_with_new_instances(&desc::SCALE, &prim_vao);
+ let line_vao = device.create_vao_with_new_instances(&desc::LINE, &prim_vao);
+ let gradient_vao = device.create_vao_with_new_instances(&desc::GRADIENT, &prim_vao);
+ let resolve_vao = device.create_vao_with_new_instances(&desc::RESOLVE, &prim_vao);
+ let svg_filter_vao = device.create_vao_with_new_instances(&desc::SVG_FILTER, &prim_vao);
+ let composite_vao = device.create_vao_with_new_instances(&desc::COMPOSITE, &prim_vao);
+ let clear_vao = device.create_vao_with_new_instances(&desc::CLEAR, &prim_vao);
+ let texture_cache_upload_pbo = device.create_pbo();
+
+ let texture_resolver = TextureResolver::new(&mut device);
+
+ let mut vertex_data_textures = Vec::new();
+ for _ in 0 .. VERTEX_DATA_TEXTURE_COUNT {
+ vertex_data_textures.push(VertexDataTextures::new(&mut device));
+ }
+
+ // On some (mostly older, integrated) GPUs, the normal GPU texture cache update path
+ // doesn't work well when running on ANGLE, causing CPU stalls inside D3D and/or the
+ // GPU driver. See https://bugzilla.mozilla.org/show_bug.cgi?id=1576637 for much
+ // more detail. To reduce the number of code paths we have active that require testing,
+ // we will enable the GPU cache scatter update path on all devices running with ANGLE.
+ // We want a better solution long-term, but for now this is a significant performance
+ // improvement on HD4600 era GPUs, and shouldn't hurt performance in a noticeable
+ // way on other systems running under ANGLE.
+ let is_angle = device.get_capabilities().renderer_name.contains("ANGLE");
+
+ let gpu_cache_texture = GpuCacheTexture::new(
+ &mut device,
+ is_angle,
+ )?;
+
+ device.end_frame();
+
+ let backend_notifier = notifier.clone();
+
+ let prefer_subpixel_aa = options.force_subpixel_aa || (options.enable_subpixel_aa && use_dual_source_blending);
+ let default_font_render_mode = match (options.enable_aa, prefer_subpixel_aa) {
+ (true, true) => FontRenderMode::Subpixel,
+ (true, false) => FontRenderMode::Alpha,
+ (false, _) => FontRenderMode::Mono,
+ };
+
+ let compositor_kind = match options.compositor_config {
+ CompositorConfig::Draw { max_partial_present_rects, draw_previous_partial_present_regions } => {
+ CompositorKind::Draw { max_partial_present_rects, draw_previous_partial_present_regions }
+ }
+ CompositorConfig::Native { ref compositor, max_update_rects, .. } => {
+ let capabilities = compositor.get_capabilities();
+
+ CompositorKind::Native {
+ max_update_rects,
+ virtual_surface_size: capabilities.virtual_surface_size,
+ }
+ }
+ };
+
+ let config = FrameBuilderConfig {
+ default_font_render_mode,
+ dual_source_blending_is_enabled: true,
+ dual_source_blending_is_supported: use_dual_source_blending,
+ chase_primitive: options.chase_primitive,
+ global_enable_picture_caching: options.enable_picture_caching,
+ testing: options.testing,
+ gpu_supports_fast_clears: options.gpu_supports_fast_clears,
+ gpu_supports_advanced_blend: ext_blend_equation_advanced,
+ advanced_blend_is_coherent: ext_blend_equation_advanced_coherent,
+ batch_lookback_count: options.batch_lookback_count,
+ background_color: options.clear_color,
+ compositor_kind,
+ tile_size_override: None,
+ max_depth_ids: device.max_depth_ids(),
+ max_target_size: max_texture_size,
+ };
+ info!("WR {:?}", config);
+
+ let device_pixel_ratio = options.device_pixel_ratio;
+ let debug_flags = options.debug_flags;
+ let size_of_op = options.size_of_op;
+ let enclosing_size_of_op = options.enclosing_size_of_op;
+ let make_size_of_ops =
+ move || size_of_op.map(|o| MallocSizeOfOps::new(o, enclosing_size_of_op));
+ let thread_listener = Arc::new(options.thread_listener);
+ let thread_listener_for_rayon_start = thread_listener.clone();
+ let thread_listener_for_rayon_end = thread_listener.clone();
+ let workers = options
+ .workers
+ .take()
+ .unwrap_or_else(|| {
+ let worker = ThreadPoolBuilder::new()
+ .thread_name(|idx|{ format!("WRWorker#{}", idx) })
+ .start_handler(move |idx| {
+ register_thread_with_profiler(format!("WRWorker#{}", idx));
+ if let Some(ref thread_listener) = *thread_listener_for_rayon_start {
+ thread_listener.thread_started(&format!("WRWorker#{}", idx));
+ }
+ })
+ .exit_handler(move |idx| {
+ if let Some(ref thread_listener) = *thread_listener_for_rayon_end {
+ thread_listener.thread_stopped(&format!("WRWorker#{}", idx));
+ }
+ })
+ .build();
+ Arc::new(worker.unwrap())
+ });
+ let sampler = options.sampler;
+ let namespace_alloc_by_client = options.namespace_alloc_by_client;
+ let max_glyph_cache_size = options.max_glyph_cache_size.unwrap_or(GlyphCache::DEFAULT_MAX_BYTES_USED);
+
+ let font_instances = SharedFontInstanceMap::new();
+
+ let blob_image_handler = options.blob_image_handler.take();
+ let thread_listener_for_render_backend = thread_listener.clone();
+ let thread_listener_for_scene_builder = thread_listener.clone();
+ let thread_listener_for_lp_scene_builder = thread_listener.clone();
+ let scene_builder_hooks = options.scene_builder_hooks;
+ let rb_thread_name = format!("WRRenderBackend#{}", options.renderer_id.unwrap_or(0));
+ let scene_thread_name = format!("WRSceneBuilder#{}", options.renderer_id.unwrap_or(0));
+ let lp_scene_thread_name = format!("WRSceneBuilderLP#{}", options.renderer_id.unwrap_or(0));
+ let glyph_rasterizer = GlyphRasterizer::new(workers)?;
+
+ let (scene_builder_channels, scene_tx, backend_scene_tx, scene_rx) =
+ SceneBuilderThreadChannels::new(api_tx.clone());
+
+ let sb_font_instances = font_instances.clone();
+
+ thread::Builder::new().name(scene_thread_name.clone()).spawn(move || {
+ register_thread_with_profiler(scene_thread_name.clone());
+ if let Some(ref thread_listener) = *thread_listener_for_scene_builder {
+ thread_listener.thread_started(&scene_thread_name);
+ }
+
+ let mut scene_builder = SceneBuilderThread::new(
+ config,
+ device_pixel_ratio,
+ sb_font_instances,
+ make_size_of_ops(),
+ scene_builder_hooks,
+ scene_builder_channels,
+ );
+ scene_builder.run();
+
+ if let Some(ref thread_listener) = *thread_listener_for_scene_builder {
+ thread_listener.thread_stopped(&scene_thread_name);
+ }
+ })?;
+
+ let low_priority_scene_tx = if options.support_low_priority_transactions {
+ let (low_priority_scene_tx, low_priority_scene_rx) = channel();
+ let lp_builder = LowPrioritySceneBuilderThread {
+ rx: low_priority_scene_rx,
+ tx: scene_tx.clone(),
+ simulate_slow_ms: 0,
+ };
+
+ thread::Builder::new().name(lp_scene_thread_name.clone()).spawn(move || {
+ register_thread_with_profiler(lp_scene_thread_name.clone());
+ if let Some(ref thread_listener) = *thread_listener_for_lp_scene_builder {
+ thread_listener.thread_started(&lp_scene_thread_name);
+ }
+
+ let mut scene_builder = lp_builder;
+ scene_builder.run();
+
+ if let Some(ref thread_listener) = *thread_listener_for_lp_scene_builder {
+ thread_listener.thread_stopped(&lp_scene_thread_name);
+ }
+ })?;
+
+ low_priority_scene_tx
+ } else {
+ scene_tx.clone()
+ };
+
+ let backend_blob_handler = blob_image_handler
+ .as_ref()
+ .map(|handler| handler.create_similar());
+
+ let rb_font_instances = font_instances.clone();
+ let enable_multithreading = options.enable_multithreading;
+ let texture_cache_eviction_threshold_bytes = options.texture_cache_eviction_threshold_bytes;
+ let texture_cache_max_evictions_per_frame = options.texture_cache_max_evictions_per_frame;
+ thread::Builder::new().name(rb_thread_name.clone()).spawn(move || {
+ register_thread_with_profiler(rb_thread_name.clone());
+ if let Some(ref thread_listener) = *thread_listener_for_render_backend {
+ thread_listener.thread_started(&rb_thread_name);
+ }
+
+ let texture_cache = TextureCache::new(
+ max_texture_size,
+ max_texture_layers,
+ if config.global_enable_picture_caching {
+ tile_cache_sizes(config.testing)
+ } else {
+ &[]
+ },
+ start_size,
+ color_cache_formats,
+ swizzle_settings,
+ texture_cache_eviction_threshold_bytes,
+ texture_cache_max_evictions_per_frame,
+ );
+
+ let glyph_cache = GlyphCache::new(max_glyph_cache_size);
+
+ let mut resource_cache = ResourceCache::new(
+ texture_cache,
+ glyph_rasterizer,
+ glyph_cache,
+ rb_font_instances,
+ );
+
+ resource_cache.enable_multithreading(enable_multithreading);
+
+ let mut backend = RenderBackend::new(
+ api_rx,
+ result_tx,
+ scene_tx,
+ low_priority_scene_tx,
+ backend_scene_tx,
+ scene_rx,
+ device_pixel_ratio,
+ resource_cache,
+ backend_notifier,
+ backend_blob_handler,
+ config,
+ sampler,
+ make_size_of_ops(),
+ debug_flags,
+ namespace_alloc_by_client,
+ );
+ backend.run(backend_profile_counters);
+ if let Some(ref thread_listener) = *thread_listener_for_render_backend {
+ thread_listener.thread_stopped(&rb_thread_name);
+ }
+ })?;
+
+ let debug_method = if !options.enable_gpu_markers {
+ // The GPU markers are disabled.
+ GpuDebugMethod::None
+ } else if device.supports_extension("GL_KHR_debug") {
+ GpuDebugMethod::KHR
+ } else if device.supports_extension("GL_EXT_debug_marker") {
+ GpuDebugMethod::MarkerEXT
+ } else {
+ println!("Warning: asking to enable_gpu_markers but no supporting extension was found");
+ GpuDebugMethod::None
+ };
+
+ info!("using {:?}", debug_method);
+
+ let gpu_profile = GpuProfiler::new(Rc::clone(device.rc_gl()), debug_method);
+ #[cfg(feature = "capture")]
+ let read_fbo = device.create_fbo();
+
+ let mut renderer = Renderer {
+ result_rx,
+ debug_server,
+ device,
+ active_documents: Vec::new(),
+ pending_texture_updates: Vec::new(),
+ pending_texture_cache_updates: false,
+ pending_native_surface_updates: Vec::new(),
+ pending_gpu_cache_updates: Vec::new(),
+ pending_gpu_cache_clear: false,
+ pending_shader_updates: Vec::new(),
+ shaders,
+ debug: LazyInitializedDebugRenderer::new(),
+ debug_flags: DebugFlags::empty(),
+ backend_profile_counters: BackendProfileCounters::new(),
+ profile_counters: RendererProfileCounters::new(),
+ resource_upload_time: 0,
+ gpu_cache_upload_time: 0,
+ profiler: Profiler::new(),
+ new_frame_indicator: ChangeIndicator::new(),
+ new_scene_indicator: ChangeIndicator::new(),
+ slow_frame_indicator: ChangeIndicator::new(),
+ slow_txn_indicator: ChangeIndicator::new(),
+ max_recorded_profiles: options.max_recorded_profiles,
+ clear_color: options.clear_color,
+ enable_clear_scissor: options.enable_clear_scissor,
+ enable_advanced_blend_barriers: !ext_blend_equation_advanced_coherent,
+ clear_caches_with_quads: options.clear_caches_with_quads,
+ last_time: 0,
+ gpu_profile,
+ vaos: RendererVAOs {
+ prim_vao,
+ blur_vao,
+ clip_vao,
+ border_vao,
+ scale_vao,
+ gradient_vao,
+ resolve_vao,
+ line_vao,
+ svg_filter_vao,
+ composite_vao,
+ clear_vao,
+ },
+ vertex_data_textures,
+ current_vertex_data_textures: 0,
+ pipeline_info: PipelineInfo::default(),
+ dither_matrix_texture,
+ external_image_handler: None,
+ output_image_handler: None,
+ size_of_ops: make_size_of_ops(),
+ output_targets: FastHashMap::default(),
+ cpu_profiles: VecDeque::new(),
+ gpu_profiles: VecDeque::new(),
+ gpu_cache_texture,
+ gpu_cache_debug_chunks: Vec::new(),
+ gpu_cache_frame_id: FrameId::INVALID,
+ gpu_cache_overflow: false,
+ texture_cache_upload_pbo,
+ texture_resolver,
+ renderer_errors: Vec::new(),
+ async_frame_recorder: None,
+ async_screenshots: None,
+ #[cfg(feature = "capture")]
+ read_fbo,
+ #[cfg(feature = "replay")]
+ owned_external_images: FastHashMap::default(),
+ notifications: Vec::new(),
+ device_size: None,
+ zoom_debug_texture: None,
+ cursor_position: DeviceIntPoint::zero(),
+ shared_texture_cache_cleared: false,
+ documents_seen: FastHashSet::default(),
+ force_redraw: true,
+ compositor_config: options.compositor_config,
+ current_compositor_kind: compositor_kind,
+ allocated_native_surfaces: FastHashSet::default(),
+ debug_overlay_state: DebugOverlayState::new(),
+ prev_dirty_rect: DeviceRect::zero(),
+ };
+
+ // We initially set the flags to default and then now call set_debug_flags
+ // to ensure any potential transition when enabling a flag is run.
+ renderer.set_debug_flags(debug_flags);
+
+ let sender = RenderApiSender::new(api_tx, blob_image_handler, font_instances);
+ Ok((renderer, sender))
+ }
+
+ pub fn device_size(&self) -> Option<DeviceIntSize> {
+ self.device_size
+ }
+
+ /// Update the current position of the debug cursor.
+ pub fn set_cursor_position(
+ &mut self,
+ position: DeviceIntPoint,
+ ) {
+ self.cursor_position = position;
+ }
+
+ pub fn get_max_texture_size(&self) -> i32 {
+ self.device.max_texture_size()
+ }
+
+ pub fn get_graphics_api_info(&self) -> GraphicsApiInfo {
+ GraphicsApiInfo {
+ kind: GraphicsApi::OpenGL,
+ version: self.device.gl().get_string(gl::VERSION),
+ renderer: self.device.gl().get_string(gl::RENDERER),
+ }
+ }
+
+ pub fn preferred_color_format(&self) -> ImageFormat {
+ self.device.preferred_color_formats().external
+ }
+
+ pub fn optimal_texture_stride_alignment(&self, format: ImageFormat) -> usize {
+ self.device.optimal_pbo_stride().num_bytes(format).get()
+ }
+
+ pub fn flush_pipeline_info(&mut self) -> PipelineInfo {
+ mem::replace(&mut self.pipeline_info, PipelineInfo::default())
+ }
+
+ /// Returns the Epoch of the current frame in a pipeline.
+ pub fn current_epoch(&self, document_id: DocumentId, pipeline_id: PipelineId) -> Option<Epoch> {
+ self.pipeline_info.epochs.get(&(pipeline_id, document_id)).cloned()
+ }
+
+ /// Processes the result queue.
+ ///
+ /// Should be called before `render()`, as texture cache updates are done here.
+ pub fn update(&mut self) {
+ profile_scope!("update");
+ // Pull any pending results and return the most recent.
+ while let Ok(msg) = self.result_rx.try_recv() {
+ match msg {
+ ResultMsg::PublishPipelineInfo(mut pipeline_info) => {
+ for ((pipeline_id, document_id), epoch) in pipeline_info.epochs {
+ self.pipeline_info.epochs.insert((pipeline_id, document_id), epoch);
+ }
+ self.pipeline_info.removed_pipelines.extend(pipeline_info.removed_pipelines.drain(..));
+ }
+ ResultMsg::PublishDocument(
+ document_id,
+ doc,
+ resource_update_list,
+ profile_counters,
+ ) => {
+ if doc.is_new_scene {
+ self.new_scene_indicator.changed();
+ }
+
+ // Add a new document to the active set, expressed as a `Vec` in order
+ // to re-order based on `DocumentLayer` during rendering.
+ match self.active_documents.iter().position(|&(id, _)| id == document_id) {
+ Some(pos) => {
+ // If the document we are replacing must be drawn
+ // (in order to update the texture cache), issue
+ // a render just to off-screen targets.
+ if self.active_documents[pos].1.frame.must_be_drawn() {
+ let device_size = self.device_size;
+ self.render_impl(device_size).ok();
+ }
+
+ self.active_documents[pos].1 = doc;
+ }
+ None => self.active_documents.push((document_id, doc)),
+ }
+
+ // IMPORTANT: The pending texture cache updates must be applied
+ // *after* the previous frame has been rendered above
+ // (if neceessary for a texture cache update). For
+ // an example of why this is required:
+ // 1) Previous frame contains a render task that
+ // targets Texture X.
+ // 2) New frame contains a texture cache update which
+ // frees Texture X.
+ // 3) bad stuff happens.
+
+ //TODO: associate `document_id` with target window
+ self.pending_texture_cache_updates |= !resource_update_list.texture_updates.updates.is_empty();
+ self.pending_texture_updates.push(resource_update_list.texture_updates);
+ self.pending_native_surface_updates.extend(resource_update_list.native_surface_updates);
+ self.backend_profile_counters = profile_counters;
+ self.documents_seen.insert(document_id);
+ }
+ ResultMsg::UpdateGpuCache(mut list) => {
+ if list.clear {
+ self.pending_gpu_cache_clear = true;
+ }
+ if list.clear {
+ self.gpu_cache_debug_chunks = Vec::new();
+ }
+ for cmd in mem::replace(&mut list.debug_commands, Vec::new()) {
+ match cmd {
+ GpuCacheDebugCmd::Alloc(chunk) => {
+ let row = chunk.address.v as usize;
+ if row >= self.gpu_cache_debug_chunks.len() {
+ self.gpu_cache_debug_chunks.resize(row + 1, Vec::new());
+ }
+ self.gpu_cache_debug_chunks[row].push(chunk);
+ },
+ GpuCacheDebugCmd::Free(address) => {
+ let chunks = &mut self.gpu_cache_debug_chunks[address.v as usize];
+ let pos = chunks.iter()
+ .position(|x| x.address == address).unwrap();
+ chunks.remove(pos);
+ },
+ }
+ }
+ self.pending_gpu_cache_updates.push(list);
+ }
+ ResultMsg::UpdateResources {
+ resource_updates,
+ memory_pressure,
+ } => {
+ if memory_pressure {
+ // If a memory pressure event arrives _after_ a new scene has
+ // been published that writes persistent targets (i.e. cached
+ // render tasks to the texture cache, or picture cache tiles)
+ // but _before_ the next update/render loop, those targets
+ // will not be updated due to the active_documents list being
+ // cleared at the end of this message. To work around that,
+ // if any of the existing documents have not rendered yet, and
+ // have picture/texture cache targets, force a render so that
+ // those targets are updated.
+ let must_be_drawn = self.active_documents
+ .iter()
+ .any(|(_, doc)| {
+ doc.frame.must_be_drawn()
+ });
+
+ if must_be_drawn {
+ let device_size = self.device_size;
+ self.render_impl(device_size).ok();
+ }
+ }
+
+ self.pending_texture_cache_updates |= !resource_updates.texture_updates.updates.is_empty();
+ self.pending_texture_updates.push(resource_updates.texture_updates);
+ self.pending_native_surface_updates.extend(resource_updates.native_surface_updates);
+ self.device.begin_frame();
+
+ self.update_texture_cache();
+ self.update_native_surfaces();
+
+ // Flush the render target pool on memory pressure.
+ //
+ // This needs to be separate from the block below because
+ // the device module asserts if we delete textures while
+ // not in a frame.
+ if memory_pressure {
+ self.texture_resolver.on_memory_pressure(
+ &mut self.device,
+ );
+ }
+
+ self.device.end_frame();
+ // If we receive a `PublishDocument` message followed by this one
+ // within the same update we need to cancel the frame because we
+ // might have deleted the resources in use in the frame due to a
+ // memory pressure event.
+ if memory_pressure {
+ self.active_documents.clear();
+ }
+ }
+ ResultMsg::AppendNotificationRequests(mut notifications) => {
+ // We need to know specifically if there are any pending
+ // TextureCacheUpdate updates in any of the entries in
+ // pending_texture_updates. They may simply be nops, which do not
+ // need to prevent issuing the notification, and if so, may not
+ // cause a timely frame render to occur to wake up any listeners.
+ if !self.pending_texture_cache_updates {
+ drain_filter(
+ &mut notifications,
+ |n| { n.when() == Checkpoint::FrameTexturesUpdated },
+ |n| { n.notify(); },
+ );
+ }
+ self.notifications.append(&mut notifications);
+ }
+ ResultMsg::ForceRedraw => {
+ self.force_redraw = true;
+ }
+ ResultMsg::RefreshShader(path) => {
+ self.pending_shader_updates.push(path);
+ }
+ ResultMsg::DebugOutput(output) => match output {
+ DebugOutput::FetchDocuments(string) |
+ DebugOutput::FetchClipScrollTree(string) => {
+ self.debug_server.send(string);
+ }
+ #[cfg(feature = "capture")]
+ DebugOutput::SaveCapture(config, deferred) => {
+ self.save_capture(config, deferred);
+ }
+ #[cfg(feature = "replay")]
+ DebugOutput::LoadCapture(config, plain_externals) => {
+ self.active_documents.clear();
+ self.load_capture(config, plain_externals);
+ }
+ },
+ ResultMsg::DebugCommand(command) => {
+ self.handle_debug_command(command);
+ }
+ }
+ }
+ }
+
+ #[cfg(not(feature = "debugger"))]
+ fn get_screenshot_for_debugger(&mut self) -> String {
+ // Avoid unused param warning.
+ let _ = &self.debug_server;
+ String::new()
+ }
+
+ #[cfg(feature = "debugger")]
+ fn get_screenshot_for_debugger(&mut self) -> String {
+ use api::{ImageDescriptor, ImageDescriptorFlags};
+
+ let desc = ImageDescriptor::new(1024, 768, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE);
+ let data = self.device.read_pixels(&desc);
+ let screenshot = debug_server::Screenshot::new(desc.size, data);
+
+ serde_json::to_string(&screenshot).unwrap()
+ }
+
+ #[cfg(not(feature = "debugger"))]
+ fn get_passes_for_debugger(&self) -> String {
+ // Avoid unused param warning.
+ let _ = &self.debug_server;
+ String::new()
+ }
+
+ #[cfg(feature = "debugger")]
+ fn debug_alpha_target(target: &AlphaRenderTarget) -> debug_server::Target {
+ let mut debug_target = debug_server::Target::new("A8");
+
+ debug_target.add(
+ debug_server::BatchKind::Cache,
+ "Scalings",
+ target.scalings.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Cache,
+ "Zero Clears",
+ target.zero_clears.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Cache,
+ "One Clears",
+ target.one_clears.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Clip,
+ "BoxShadows [p]",
+ target.clip_batcher.primary_clips.box_shadows.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Clip,
+ "BoxShadows [s]",
+ target.clip_batcher.secondary_clips.box_shadows.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Cache,
+ "Vertical Blur",
+ target.vertical_blurs.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Cache,
+ "Horizontal Blur",
+ target.horizontal_blurs.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Clip,
+ "Slow Rectangles [p]",
+ target.clip_batcher.primary_clips.slow_rectangles.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Clip,
+ "Fast Rectangles [p]",
+ target.clip_batcher.primary_clips.fast_rectangles.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Clip,
+ "Slow Rectangles [s]",
+ target.clip_batcher.secondary_clips.slow_rectangles.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Clip,
+ "Fast Rectangles [s]",
+ target.clip_batcher.secondary_clips.fast_rectangles.len(),
+ );
+ for (_, items) in target.clip_batcher.primary_clips.images.iter() {
+ debug_target.add(debug_server::BatchKind::Clip, "Image mask [p]", items.len());
+ }
+ for (_, items) in target.clip_batcher.secondary_clips.images.iter() {
+ debug_target.add(debug_server::BatchKind::Clip, "Image mask [s]", items.len());
+ }
+
+ debug_target
+ }
+
+ #[cfg(feature = "debugger")]
+ fn debug_color_target(target: &ColorRenderTarget) -> debug_server::Target {
+ let mut debug_target = debug_server::Target::new("RGBA8");
+
+ debug_target.add(
+ debug_server::BatchKind::Cache,
+ "Scalings",
+ target.scalings.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Cache,
+ "Readbacks",
+ target.readbacks.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Cache,
+ "Vertical Blur",
+ target.vertical_blurs.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Cache,
+ "Horizontal Blur",
+ target.horizontal_blurs.len(),
+ );
+ debug_target.add(
+ debug_server::BatchKind::Cache,
+ "SVG Filters",
+ target.svg_filters.iter().map(|(_, batch)| batch.len()).sum(),
+ );
+
+ for alpha_batch_container in &target.alpha_batch_containers {
+ for batch in alpha_batch_container.opaque_batches.iter().rev() {
+ debug_target.add(
+ debug_server::BatchKind::Opaque,
+ batch.key.kind.debug_name(),
+ batch.instances.len(),
+ );
+ }
+
+ for batch in &alpha_batch_container.alpha_batches {
+ debug_target.add(
+ debug_server::BatchKind::Alpha,
+ batch.key.kind.debug_name(),
+ batch.instances.len(),
+ );
+ }
+ }
+
+ debug_target
+ }
+
+ #[cfg(feature = "debugger")]
+ fn debug_texture_cache_target(target: &TextureCacheRenderTarget) -> debug_server::Target {
+ let mut debug_target = debug_server::Target::new("Texture Cache");
+
+ debug_target.add(
+ debug_server::BatchKind::Cache,
+ "Horizontal Blur",
+ target.horizontal_blurs.len(),
+ );
+
+ debug_target
+ }
+
+ #[cfg(feature = "debugger")]
+ fn get_passes_for_debugger(&self) -> String {
+ let mut debug_passes = debug_server::PassList::new();
+
+ for &(_, ref render_doc) in &self.active_documents {
+ for pass in &render_doc.frame.passes {
+ let mut debug_targets = Vec::new();
+ match pass.kind {
+ RenderPassKind::MainFramebuffer { ref main_target, .. } => {
+ debug_targets.push(Self::debug_color_target(main_target));
+ }
+ RenderPassKind::OffScreen { ref alpha, ref color, ref texture_cache, .. } => {
+ debug_targets.extend(alpha.targets.iter().map(Self::debug_alpha_target));
+ debug_targets.extend(color.targets.iter().map(Self::debug_color_target));
+ debug_targets.extend(texture_cache.iter().map(|(_, target)| Self::debug_texture_cache_target(target)));
+ }
+ }
+
+ debug_passes.add(debug_server::Pass { targets: debug_targets });
+ }
+ }
+
+ serde_json::to_string(&debug_passes).unwrap()
+ }
+
+ #[cfg(not(feature = "debugger"))]
+ fn get_render_tasks_for_debugger(&self) -> String {
+ String::new()
+ }
+
+ #[cfg(feature = "debugger")]
+ fn get_render_tasks_for_debugger(&self) -> String {
+ let mut debug_root = debug_server::RenderTaskList::new();
+
+ for &(_, ref render_doc) in &self.active_documents {
+ let debug_node = debug_server::TreeNode::new("document render tasks");
+ let mut builder = debug_server::TreeNodeBuilder::new(debug_node);
+
+ let render_tasks = &render_doc.frame.render_tasks;
+ match render_tasks.tasks.first() {
+ Some(main_task) => main_task.print_with(&mut builder, render_tasks),
+ None => continue,
+ };
+
+ debug_root.add(builder.build());
+ }
+
+ serde_json::to_string(&debug_root).unwrap()
+ }
+
+ fn handle_debug_command(&mut self, command: DebugCommand) {
+ match command {
+ DebugCommand::EnableDualSourceBlending(_) |
+ DebugCommand::SetPictureTileSize(_) => {
+ panic!("Should be handled by render backend");
+ }
+ DebugCommand::FetchDocuments |
+ DebugCommand::FetchClipScrollTree => {}
+ DebugCommand::FetchRenderTasks => {
+ let json = self.get_render_tasks_for_debugger();
+ self.debug_server.send(json);
+ }
+ DebugCommand::FetchPasses => {
+ let json = self.get_passes_for_debugger();
+ self.debug_server.send(json);
+ }
+ DebugCommand::FetchScreenshot => {
+ let json = self.get_screenshot_for_debugger();
+ self.debug_server.send(json);
+ }
+ DebugCommand::SaveCapture(..) |
+ DebugCommand::LoadCapture(..) |
+ DebugCommand::StartCaptureSequence(..) |
+ DebugCommand::StopCaptureSequence => {
+ panic!("Capture commands are not welcome here! Did you build with 'capture' feature?")
+ }
+ DebugCommand::ClearCaches(_)
+ | DebugCommand::SimulateLongSceneBuild(_)
+ | DebugCommand::SimulateLongLowPrioritySceneBuild(_)
+ | DebugCommand::EnableNativeCompositor(_)
+ | DebugCommand::SetBatchingLookback(_)
+ | DebugCommand::EnableMultithreading(_) => {}
+ DebugCommand::InvalidateGpuCache => {
+ match self.gpu_cache_texture.bus {
+ GpuCacheBus::PixelBuffer { ref mut rows, .. } => {
+ info!("Invalidating GPU caches");
+ for row in rows {
+ row.add_dirty(0, MAX_VERTEX_TEXTURE_WIDTH);
+ }
+ }
+ GpuCacheBus::Scatter { .. } => {
+ warn!("Unable to invalidate scattered GPU cache");
+ }
+ }
+ }
+ DebugCommand::SetFlags(flags) => {
+ self.set_debug_flags(flags);
+ }
+ }
+ }
+
+ /// Set a callback for handling external images.
+ pub fn set_external_image_handler(&mut self, handler: Box<dyn ExternalImageHandler>) {
+ self.external_image_handler = Some(handler);
+ }
+
+ /// Set a callback for handling external outputs.
+ pub fn set_output_image_handler(&mut self, handler: Box<dyn OutputImageHandler>) {
+ self.output_image_handler = Some(handler);
+ }
+
+ /// Retrieve (and clear) the current list of recorded frame profiles.
+ pub fn get_frame_profiles(&mut self) -> (Vec<CpuProfile>, Vec<GpuProfile>) {
+ let cpu_profiles = self.cpu_profiles.drain(..).collect();
+ let gpu_profiles = self.gpu_profiles.drain(..).collect();
+ (cpu_profiles, gpu_profiles)
+ }
+
+ /// Reset the current partial present state. This forces the entire framebuffer
+ /// to be refreshed next time `render` is called.
+ pub fn force_redraw(&mut self) {
+ self.force_redraw = true;
+ }
+
+ /// Renders the current frame.
+ ///
+ /// A Frame is supplied by calling [`generate_frame()`][webrender_api::Transaction::generate_frame].
+ pub fn render(
+ &mut self,
+ device_size: DeviceIntSize,
+ ) -> Result<RenderResults, Vec<RendererError>> {
+ self.device_size = Some(device_size);
+
+ let result = self.render_impl(Some(device_size));
+
+ drain_filter(
+ &mut self.notifications,
+ |n| { n.when() == Checkpoint::FrameRendered },
+ |n| { n.notify(); },
+ );
+
+ // This is the end of the rendering pipeline. If some notifications are is still there,
+ // just clear them and they will autimatically fire the Checkpoint::TransactionDropped
+ // event. Otherwise they would just pile up in this vector forever.
+ self.notifications.clear();
+
+ tracy_frame_marker!();
+
+ result
+ }
+
+ /// Update the state of any debug / profiler overlays. This is currently only needed
+ /// when running with the native compositor enabled.
+ fn update_debug_overlay(&mut self, framebuffer_size: DeviceIntSize) {
+ // If any of the following debug flags are set, something will be drawn on the debug overlay.
+ self.debug_overlay_state.is_enabled = self.debug_flags.intersects(
+ DebugFlags::PROFILER_DBG |
+ DebugFlags::RENDER_TARGET_DBG |
+ DebugFlags::TEXTURE_CACHE_DBG |
+ DebugFlags::EPOCHS |
+ DebugFlags::NEW_FRAME_INDICATOR |
+ DebugFlags::NEW_SCENE_INDICATOR |
+ DebugFlags::GPU_CACHE_DBG |
+ DebugFlags::SLOW_FRAME_INDICATOR |
+ DebugFlags::PICTURE_CACHING_DBG |
+ DebugFlags::PRIMITIVE_DBG |
+ DebugFlags::ZOOM_DBG
+ );
+
+ // Update the debug overlay surface, if we are running in native compositor mode.
+ if let CompositorKind::Native { .. } = self.current_compositor_kind {
+ let compositor = self.compositor_config.compositor().unwrap();
+
+ // If there is a current surface, destroy it if we don't need it for this frame, or if
+ // the size has changed.
+ if let Some(current_size) = self.debug_overlay_state.current_size {
+ if !self.debug_overlay_state.is_enabled || current_size != framebuffer_size {
+ compositor.destroy_surface(NativeSurfaceId::DEBUG_OVERLAY);
+ self.debug_overlay_state.current_size = None;
+ }
+ }
+
+ // Allocate a new surface, if we need it and there isn't one.
+ if self.debug_overlay_state.is_enabled && self.debug_overlay_state.current_size.is_none() {
+ compositor.create_surface(
+ NativeSurfaceId::DEBUG_OVERLAY,
+ DeviceIntPoint::zero(),
+ framebuffer_size,
+ false,
+ );
+ compositor.create_tile(
+ NativeTileId::DEBUG_OVERLAY,
+ );
+ self.debug_overlay_state.current_size = Some(framebuffer_size);
+ }
+ }
+ }
+
+ /// Bind a draw target for the debug / profiler overlays, if required.
+ fn bind_debug_overlay(&mut self) {
+ // Debug overlay setup are only required in native compositing mode
+ if self.debug_overlay_state.is_enabled {
+ if let CompositorKind::Native { .. } = self.current_compositor_kind {
+ let compositor = self.compositor_config.compositor().unwrap();
+ let surface_size = self.debug_overlay_state.current_size.unwrap();
+
+ // Bind the native surface
+ let surface_info = compositor.bind(
+ NativeTileId::DEBUG_OVERLAY,
+ DeviceIntRect::new(
+ DeviceIntPoint::zero(),
+ surface_size,
+ ),
+ DeviceIntRect::new(
+ DeviceIntPoint::zero(),
+ surface_size,
+ ),
+ );
+
+ // Bind the native surface to current FBO target
+ let draw_target = DrawTarget::NativeSurface {
+ offset: surface_info.origin,
+ external_fbo_id: surface_info.fbo_id,
+ dimensions: surface_size,
+ };
+ self.device.bind_draw_target(draw_target);
+
+ // When native compositing, clear the debug overlay each frame.
+ self.device.clear_target(
+ Some([0.0, 0.0, 0.0, 0.0]),
+ Some(1.0),
+ None,
+ );
+ }
+ }
+ }
+
+ /// Unbind the draw target for debug / profiler overlays, if required.
+ fn unbind_debug_overlay(&mut self) {
+ // Debug overlay setup are only required in native compositing mode
+ if self.debug_overlay_state.is_enabled {
+ if let CompositorKind::Native { .. } = self.current_compositor_kind {
+ let compositor = self.compositor_config.compositor().unwrap();
+ // Unbind the draw target and add it to the visual tree to be composited
+ compositor.unbind();
+
+ compositor.add_surface(
+ NativeSurfaceId::DEBUG_OVERLAY,
+ DeviceIntPoint::zero(),
+ DeviceIntRect::new(
+ DeviceIntPoint::zero(),
+ self.debug_overlay_state.current_size.unwrap(),
+ ),
+ );
+ }
+ }
+ }
+
+ // If device_size is None, don't render
+ // to the main frame buffer. This is useful
+ // to update texture cache render tasks but
+ // avoid doing a full frame render.
+ fn render_impl(
+ &mut self,
+ device_size: Option<DeviceIntSize>,
+ ) -> Result<RenderResults, Vec<RendererError>> {
+ profile_scope!("render");
+ let mut results = RenderResults::default();
+ if self.active_documents.is_empty() {
+ self.last_time = precise_time_ns();
+ return Ok(results);
+ }
+
+ let compositor_kind = self.active_documents[0].1.frame.composite_state.compositor_kind;
+ // CompositorKind is updated
+ if self.current_compositor_kind != compositor_kind {
+ let enable = match (self.current_compositor_kind, compositor_kind) {
+ (CompositorKind::Native { .. }, CompositorKind::Draw { .. }) => {
+ if self.debug_overlay_state.current_size.is_some() {
+ self.compositor_config
+ .compositor()
+ .unwrap()
+ .destroy_surface(NativeSurfaceId::DEBUG_OVERLAY);
+ self.debug_overlay_state.current_size = None;
+ }
+ false
+ }
+ (CompositorKind::Draw { .. }, CompositorKind::Native { .. }) => {
+ true
+ }
+ (_, _) => {
+ unreachable!();
+ }
+ };
+
+ self.compositor_config
+ .compositor()
+ .unwrap()
+ .enable_native_compositor(enable);
+ self.current_compositor_kind = compositor_kind;
+ }
+
+ let mut frame_profiles = Vec::new();
+ let mut profile_timers = RendererProfileTimers::new();
+
+ // The texture resolver scope should be outside of any rendering, including
+ // debug rendering. This ensures that when we return render targets to the
+ // pool via glInvalidateFramebuffer, we don't do any debug rendering after
+ // that point. Otherwise, the bind / invalidate / bind logic trips up the
+ // render pass logic in tiled / mobile GPUs, resulting in an extra copy /
+ // resolve step when the debug overlay is enabled.
+ self.texture_resolver.begin_frame();
+
+ let profile_samplers = {
+ let _gm = self.gpu_profile.start_marker("build samples");
+ // Block CPU waiting for last frame's GPU profiles to arrive.
+ // In general this shouldn't block unless heavily GPU limited.
+ let (gpu_frame_id, timers, samplers) = self.gpu_profile.build_samples();
+
+ if self.max_recorded_profiles > 0 {
+ while self.gpu_profiles.len() >= self.max_recorded_profiles {
+ self.gpu_profiles.pop_front();
+ }
+ self.gpu_profiles
+ .push_back(GpuProfile::new(gpu_frame_id, &timers));
+ }
+ profile_timers.gpu_samples = timers;
+ samplers
+ };
+
+
+ let cpu_frame_id = profile_timers.cpu_time.profile(|| {
+ let _gm = self.gpu_profile.start_marker("begin frame");
+ let frame_id = self.device.begin_frame();
+ self.gpu_profile.begin_frame(frame_id);
+
+ self.device.disable_scissor();
+ self.device.disable_depth();
+ self.set_blend(false, FramebufferKind::Main);
+ //self.update_shaders();
+
+ self.update_texture_cache();
+ self.update_native_surfaces();
+
+ frame_id
+ });
+
+ // Inform the client that we are starting a composition transaction if native
+ // compositing is enabled. This needs to be done early in the frame, so that
+ // we can create debug overlays after drawing the main surfaces.
+ if let CompositorKind::Native { .. } = self.current_compositor_kind {
+ let compositor = self.compositor_config.compositor().unwrap();
+ compositor.begin_frame();
+ }
+
+ profile_timers.cpu_time.profile(|| {
+ //Note: another borrowck dance
+ let mut active_documents = mem::replace(&mut self.active_documents, Vec::default());
+ // sort by the document layer id
+ active_documents.sort_by_key(|&(_, ref render_doc)| render_doc.frame.layer);
+
+ #[cfg(feature = "replay")]
+ self.texture_resolver.external_images.extend(
+ self.owned_external_images.iter().map(|(key, value)| (*key, value.clone()))
+ );
+
+ let last_document_index = active_documents.len() - 1;
+ for (doc_index, (document_id, RenderedDocument { ref mut frame, .. })) in active_documents.iter_mut().enumerate() {
+ assert!(self.current_compositor_kind == frame.composite_state.compositor_kind);
+
+ if self.shared_texture_cache_cleared {
+ assert!(self.documents_seen.contains(&document_id),
+ "Cleared texture cache without sending new document frame.");
+ }
+
+ frame.profile_counters.reset_targets();
+ if let Err(e) = self.prepare_gpu_cache(frame) {
+ self.renderer_errors.push(e);
+ continue;
+ }
+ assert!(frame.gpu_cache_frame_id <= self.gpu_cache_frame_id,
+ "Received frame depends on a later GPU cache epoch ({:?}) than one we received last via `UpdateGpuCache` ({:?})",
+ frame.gpu_cache_frame_id, self.gpu_cache_frame_id);
+
+ {
+ profile_scope!("gl.flush");
+ self.device.gl().flush(); // early start on gpu cache updates
+ }
+
+ self.draw_frame(
+ frame,
+ device_size,
+ cpu_frame_id,
+ &mut results,
+ doc_index == 0,
+ );
+
+ // Profile marker for the number of invalidated picture cache
+ if thread_is_being_profiled() {
+ let num_invalidated = self.profile_counters.rendered_picture_cache_tiles.get_accum();
+ let message = format!("NumPictureCacheInvalidated: {}", num_invalidated);
+ add_event_marker(&(CString::new(message).unwrap()));
+ }
+
+ if device_size.is_some() {
+ self.draw_frame_debug_items(&frame.debug_items);
+ }
+ if self.debug_flags.contains(DebugFlags::PROFILER_DBG) {
+ frame_profiles.push(frame.profile_counters.clone());
+ }
+
+ let dirty_regions =
+ mem::replace(&mut frame.recorded_dirty_regions, Vec::new());
+ results.recorded_dirty_regions.extend(dirty_regions);
+
+ // If we're the last document, don't call end_pass here, because we'll
+ // be moving on to drawing the debug overlays. See the comment above
+ // the end_pass call in draw_frame about debug draw overlays
+ // for a bit more context.
+ if doc_index != last_document_index {
+ self.texture_resolver.end_pass(&mut self.device, None, None);
+ }
+ }
+
+ self.unlock_external_images();
+ self.active_documents = active_documents;
+
+ let _gm = self.gpu_profile.start_marker("end frame");
+ self.gpu_profile.end_frame();
+ });
+
+ if let Some(device_size) = device_size {
+ // Update the state of the debug overlay surface, ensuring that
+ // the compositor mode has a suitable surface to draw to, if required.
+ self.update_debug_overlay(device_size);
+
+ // Bind a surface to draw the debug / profiler information to.
+ self.bind_debug_overlay();
+
+ self.draw_render_target_debug(device_size);
+ self.draw_texture_cache_debug(device_size);
+ self.draw_gpu_cache_debug(device_size);
+ self.draw_zoom_debug(device_size);
+ self.draw_epoch_debug();
+ }
+
+ let current_time = precise_time_ns();
+ if device_size.is_some() {
+ let ns = current_time - self.last_time;
+ self.profile_counters.frame_time.set(ns);
+ }
+
+ let frame_cpu_time_ns = self.backend_profile_counters.total_time.get()
+ + profile_timers.cpu_time.get();
+ let frame_cpu_time_ms = frame_cpu_time_ns as f64 / 1000000.0;
+ if frame_cpu_time_ms > 16.0 {
+ self.slow_frame_indicator.changed();
+ }
+
+ if self.backend_profile_counters.scene_changed {
+ let txn_time_ns = self.backend_profile_counters.txn.total_send_time.get()
+ + self.backend_profile_counters.txn.display_list_build_time.get()
+ + self.backend_profile_counters.txn.scene_build_time.get();
+ let txn_time_ms = txn_time_ns as f64 / 1000000.0;
+ if txn_time_ms > 100.0 {
+ self.slow_txn_indicator.changed();
+ }
+ }
+
+ if self.max_recorded_profiles > 0 {
+ while self.cpu_profiles.len() >= self.max_recorded_profiles {
+ self.cpu_profiles.pop_front();
+ }
+ let cpu_profile = CpuProfile::new(
+ cpu_frame_id,
+ self.backend_profile_counters.total_time.get(),
+ profile_timers.cpu_time.get(),
+ self.profile_counters.draw_calls.get(),
+ );
+ self.cpu_profiles.push_back(cpu_profile);
+ }
+
+ if self.debug_flags.contains(DebugFlags::PROFILER_DBG) {
+ if let Some(device_size) = device_size {
+ //TODO: take device/pixel ratio into equation?
+ if let Some(debug_renderer) = self.debug.get_mut(&mut self.device) {
+ let style = if self.debug_flags.contains(DebugFlags::SMART_PROFILER) {
+ ProfileStyle::Smart
+ } else if self.debug_flags.contains(DebugFlags::COMPACT_PROFILER) {
+ ProfileStyle::Compact
+ } else {
+ ProfileStyle::Full
+ };
+
+ let screen_fraction = 1.0 / device_size.to_f32().area();
+ self.profiler.draw_profile(
+ &frame_profiles,
+ &self.backend_profile_counters,
+ &self.profile_counters,
+ &mut profile_timers,
+ &profile_samplers,
+ screen_fraction,
+ debug_renderer,
+ style,
+ );
+ }
+ }
+ }
+
+ let mut x = 0.0;
+ if self.debug_flags.contains(DebugFlags::NEW_FRAME_INDICATOR) {
+ if let Some(debug_renderer) = self.debug.get_mut(&mut self.device) {
+ self.new_frame_indicator.changed();
+ self.new_frame_indicator.draw(
+ x, 0.0,
+ ColorU::new(0, 110, 220, 255),
+ debug_renderer,
+ );
+ x += ChangeIndicator::width();
+ }
+ }
+
+ if self.debug_flags.contains(DebugFlags::NEW_SCENE_INDICATOR) {
+ if let Some(debug_renderer) = self.debug.get_mut(&mut self.device) {
+ self.new_scene_indicator.draw(
+ x, 0.0,
+ ColorU::new(0, 220, 110, 255),
+ debug_renderer,
+ );
+ x += ChangeIndicator::width();
+ }
+ }
+
+ if self.debug_flags.contains(DebugFlags::SLOW_FRAME_INDICATOR) {
+ if let Some(debug_renderer) = self.debug.get_mut(&mut self.device) {
+ self.slow_txn_indicator.draw(
+ x, 0.0,
+ ColorU::new(250, 80, 80, 255),
+ debug_renderer,
+ );
+ self.slow_frame_indicator.draw(
+ x, 10.0,
+ ColorU::new(220, 30, 10, 255),
+ debug_renderer,
+ );
+ }
+ }
+
+ if self.debug_flags.contains(DebugFlags::ECHO_DRIVER_MESSAGES) {
+ self.device.echo_driver_messages();
+ }
+
+ results.stats.texture_upload_kb = self.profile_counters.texture_data_uploaded.get();
+ self.backend_profile_counters.reset();
+ self.profile_counters.reset();
+ self.profile_counters.frame_counter.inc();
+ results.stats.resource_upload_time = self.resource_upload_time;
+ self.resource_upload_time = 0;
+ results.stats.gpu_cache_upload_time = self.gpu_cache_upload_time;
+ self.gpu_cache_upload_time = 0;
+
+ profile_timers.cpu_time.profile(|| {
+ if let Some(debug_renderer) = self.debug.try_get_mut() {
+ let small_screen = self.debug_flags.contains(DebugFlags::SMALL_SCREEN);
+ let scale = if small_screen { 1.6 } else { 1.0 };
+ // TODO(gw): Tidy this up so that compositor config integrates better
+ // with the (non-compositor) surface y-flip options.
+ let surface_origin_is_top_left = match self.current_compositor_kind {
+ CompositorKind::Native { .. } => true,
+ CompositorKind::Draw { .. } => self.device.surface_origin_is_top_left(),
+ };
+ debug_renderer.render(
+ &mut self.device,
+ device_size,
+ scale,
+ surface_origin_is_top_left,
+ );
+ }
+ // See comment for texture_resolver.begin_frame() for explanation
+ // of why this must be done after all rendering, including debug
+ // overlays. The end_frame() call implicitly calls end_pass(), which
+ // should ensure any left over render targets get invalidated and
+ // returned to the pool correctly.
+ self.texture_resolver.end_frame(&mut self.device, cpu_frame_id);
+ self.device.end_frame();
+ });
+
+ if device_size.is_some() {
+ self.last_time = current_time;
+
+ // Unbind the target for the debug overlay. No debug or profiler drawing
+ // can occur afer this point.
+ self.unbind_debug_overlay();
+ }
+
+ // Inform the client that we are finished this composition transaction if native
+ // compositing is enabled. This must be called after any debug / profiling compositor
+ // surfaces have been drawn and added to the visual tree.
+ if let CompositorKind::Native { .. } = self.current_compositor_kind {
+ profile_scope!("compositor.end_frame");
+ let compositor = self.compositor_config.compositor().unwrap();
+ compositor.end_frame();
+ }
+
+ self.documents_seen.clear();
+ self.shared_texture_cache_cleared = false;
+
+ if self.renderer_errors.is_empty() {
+ Ok(results)
+ } else {
+ Err(mem::replace(&mut self.renderer_errors, Vec::new()))
+ }
+ }
+
+ fn update_gpu_cache(&mut self) {
+ let _gm = self.gpu_profile.start_marker("gpu cache update");
+
+ // For an artificial stress test of GPU cache resizing,
+ // always pass an extra update list with at least one block in it.
+ let gpu_cache_height = self.gpu_cache_texture.get_height();
+ if gpu_cache_height != 0 && GPU_CACHE_RESIZE_TEST {
+ self.pending_gpu_cache_updates.push(GpuCacheUpdateList {
+ frame_id: FrameId::INVALID,
+ clear: false,
+ height: gpu_cache_height,
+ blocks: vec![[1f32; 4].into()],
+ updates: Vec::new(),
+ debug_commands: Vec::new(),
+ });
+ }
+
+ let (updated_blocks, max_requested_height) = self
+ .pending_gpu_cache_updates
+ .iter()
+ .fold((0, gpu_cache_height), |(count, height), list| {
+ (count + list.blocks.len(), cmp::max(height, list.height))
+ });
+
+ if max_requested_height > self.get_max_texture_size() && !self.gpu_cache_overflow {
+ self.gpu_cache_overflow = true;
+ self.renderer_errors.push(RendererError::MaxTextureSize);
+ }
+
+ // Note: if we decide to switch to scatter-style GPU cache update
+ // permanently, we can have this code nicer with `BufferUploader` kind
+ // of helper, similarly to how `TextureUploader` API is used.
+ self.gpu_cache_texture.prepare_for_updates(
+ &mut self.device,
+ updated_blocks,
+ max_requested_height,
+ );
+
+ for update_list in self.pending_gpu_cache_updates.drain(..) {
+ assert!(update_list.height <= max_requested_height);
+ if update_list.frame_id > self.gpu_cache_frame_id {
+ self.gpu_cache_frame_id = update_list.frame_id
+ }
+ self.gpu_cache_texture
+ .update(&mut self.device, &update_list);
+ }
+
+ let mut upload_time = TimeProfileCounter::new("GPU cache upload time", false, Some(0.0..2.0));
+ let updated_rows = upload_time.profile(|| {
+ self.gpu_cache_texture.flush(&mut self.device)
+ });
+ self.gpu_cache_upload_time += upload_time.get();
+
+ let counters = &mut self.backend_profile_counters.resources.gpu_cache;
+ counters.updated_rows.set(updated_rows);
+ counters.updated_blocks.set(updated_blocks);
+ }
+
+ fn prepare_gpu_cache(&mut self, frame: &Frame) -> Result<(), RendererError> {
+ if self.pending_gpu_cache_clear {
+ let use_scatter =
+ matches!(self.gpu_cache_texture.bus, GpuCacheBus::Scatter { .. });
+ let new_cache = GpuCacheTexture::new(&mut self.device, use_scatter)?;
+ let old_cache = mem::replace(&mut self.gpu_cache_texture, new_cache);
+ old_cache.deinit(&mut self.device);
+ self.pending_gpu_cache_clear = false;
+ }
+
+ let deferred_update_list = self.update_deferred_resolves(&frame.deferred_resolves);
+ self.pending_gpu_cache_updates.extend(deferred_update_list);
+
+ self.update_gpu_cache();
+
+ // Note: the texture might have changed during the `update`,
+ // so we need to bind it here.
+ self.device.bind_texture(
+ TextureSampler::GpuCache,
+ self.gpu_cache_texture.texture.as_ref().unwrap(),
+ Swizzle::default(),
+ );
+
+ Ok(())
+ }
+
+ fn update_texture_cache(&mut self) {
+ profile_scope!("update_texture_cache");
+
+ let _gm = self.gpu_profile.start_marker("texture cache update");
+ let mut pending_texture_updates = mem::replace(&mut self.pending_texture_updates, vec![]);
+ self.pending_texture_cache_updates = false;
+
+ let mut upload_time = TimeProfileCounter::new("Resource upload time", false, Some(0.0..2.0));
+ upload_time.profile(|| {
+ for update_list in pending_texture_updates.drain(..) {
+ for allocation in update_list.allocations {
+ match allocation.kind {
+ TextureCacheAllocationKind::Alloc(_) => add_event_marker(c_str!("TextureCacheAlloc")),
+ TextureCacheAllocationKind::Realloc(_) => add_event_marker(c_str!("TextureCacheRealloc")),
+ TextureCacheAllocationKind::Reset(_) => add_event_marker(c_str!("TextureCacheReset")),
+ TextureCacheAllocationKind::Free => add_event_marker(c_str!("TextureCacheFree")),
+ };
+ let old = match allocation.kind {
+ TextureCacheAllocationKind::Alloc(ref info) |
+ TextureCacheAllocationKind::Realloc(ref info) |
+ TextureCacheAllocationKind::Reset(ref info) => {
+ // Create a new native texture, as requested by the texture cache.
+ //
+ // Ensure no PBO is bound when creating the texture storage,
+ // or GL will attempt to read data from there.
+ let mut texture = self.device.create_texture(
+ TextureTarget::Array,
+ info.format,
+ info.width,
+ info.height,
+ info.filter,
+ // This needs to be a render target because some render
+ // tasks get rendered into the texture cache.
+ Some(RenderTargetInfo { has_depth: info.has_depth }),
+ info.layer_count,
+ );
+
+ if info.is_shared_cache {
+ texture.flags_mut()
+ .insert(TextureFlags::IS_SHARED_TEXTURE_CACHE);
+
+ // Textures in the cache generally don't need to be cleared,
+ // but we do so if the debug display is active to make it
+ // easier to identify unallocated regions.
+ if self.debug_flags.contains(DebugFlags::TEXTURE_CACHE_DBG) {
+ self.clear_texture(&texture, TEXTURE_CACHE_DBG_CLEAR_COLOR);
+ }
+ }
+
+ self.texture_resolver.texture_cache_map.insert(allocation.id, texture)
+ }
+ TextureCacheAllocationKind::Free => {
+ self.texture_resolver.texture_cache_map.remove(&allocation.id)
+ }
+ };
+
+ match allocation.kind {
+ TextureCacheAllocationKind::Alloc(_) => {
+ assert!(old.is_none(), "Renderer and backend disagree!");
+ }
+ TextureCacheAllocationKind::Realloc(_) => {
+ self.device.blit_renderable_texture(
+ self.texture_resolver.texture_cache_map.get_mut(&allocation.id).unwrap(),
+ old.as_ref().unwrap(),
+ );
+ }
+ TextureCacheAllocationKind::Reset(_) |
+ TextureCacheAllocationKind::Free => {
+ assert!(old.is_some(), "Renderer and backend disagree!");
+ }
+ }
+
+ if let Some(old) = old {
+ self.device.delete_texture(old);
+ }
+ }
+
+ for (texture_id, updates) in update_list.updates {
+ let texture = &self.texture_resolver.texture_cache_map[&texture_id];
+ let device = &mut self.device;
+
+ // Calculate the total size of buffer required to upload all updates.
+ let required_size = updates.iter().map(|update| {
+ // Perform any debug clears now. As this requires a mutable borrow of device,
+ // it must be done before all the updates which require a TextureUploader.
+ if let TextureUpdateSource::DebugClear = update.source {
+ let draw_target = DrawTarget::from_texture(
+ texture,
+ update.layer_index as usize,
+ false,
+ );
+ device.bind_draw_target(draw_target);
+ device.clear_target(
+ Some(TEXTURE_CACHE_DBG_CLEAR_COLOR),
+ None,
+ Some(draw_target.to_framebuffer_rect(update.rect.to_i32()))
+ );
+
+ 0
+ } else {
+ let (upload_size, _) = device.required_upload_size_and_stride(
+ update.rect.size,
+ texture.get_format(),
+ );
+ upload_size
+ }
+ }).sum();
+
+ if required_size == 0 {
+ continue;
+ }
+
+ // For best performance we use a single TextureUploader for all uploads.
+ // Using individual TextureUploaders was causing performance issues on some drivers
+ // due to allocating too many PBOs.
+ let mut uploader = device.upload_texture(
+ texture,
+ &self.texture_cache_upload_pbo,
+ required_size
+ );
+
+ for update in updates {
+ let TextureCacheUpdate { rect, stride, offset, layer_index, format_override, source } = update;
+
+ let bytes_uploaded = match source {
+ TextureUpdateSource::Bytes { data } => {
+ let data = &data[offset as usize ..];
+ uploader.upload(
+ rect,
+ layer_index,
+ stride,
+ format_override,
+ data.as_ptr(),
+ data.len(),
+ )
+ }
+ TextureUpdateSource::External { id, channel_index } => {
+ let handler = self.external_image_handler
+ .as_mut()
+ .expect("Found external image, but no handler set!");
+ // The filter is only relevant for NativeTexture external images.
+ let dummy_data;
+ let data = match handler.lock(id, channel_index, ImageRendering::Auto).source {
+ ExternalImageSource::RawData(data) => {
+ &data[offset as usize ..]
+ }
+ ExternalImageSource::Invalid => {
+ // Create a local buffer to fill the pbo.
+ let bpp = texture.get_format().bytes_per_pixel();
+ let width = stride.unwrap_or(rect.size.width * bpp);
+ let total_size = width * rect.size.height;
+ // WR haven't support RGBAF32 format in texture_cache, so
+ // we use u8 type here.
+ dummy_data = vec![0xFFu8; total_size as usize];
+ &dummy_data
+ }
+ ExternalImageSource::NativeTexture(eid) => {
+ panic!("Unexpected external texture {:?} for the texture cache update of {:?}", eid, id);
+ }
+ };
+ let size = uploader.upload(
+ rect,
+ layer_index,
+ stride,
+ format_override,
+ data.as_ptr(),
+ data.len()
+ );
+ handler.unlock(id, channel_index);
+ size
+ }
+ TextureUpdateSource::DebugClear => {
+ // DebugClear updates are handled separately.
+ 0
+ }
+ };
+ self.profile_counters.texture_data_uploaded.add(bytes_uploaded >> 10);
+ }
+ }
+
+ if update_list.clears_shared_cache {
+ self.shared_texture_cache_cleared = true;
+ }
+ }
+
+ drain_filter(
+ &mut self.notifications,
+ |n| { n.when() == Checkpoint::FrameTexturesUpdated },
+ |n| { n.notify(); },
+ );
+ });
+ self.resource_upload_time += upload_time.get();
+ }
+
+ pub(crate) fn draw_instanced_batch<T>(
+ &mut self,
+ data: &[T],
+ vertex_array_kind: VertexArrayKind,
+ textures: &BatchTextures,
+ stats: &mut RendererStats,
+ ) {
+ let mut swizzles = [Swizzle::default(); 3];
+ for i in 0 .. textures.colors.len() {
+ let swizzle = self.texture_resolver.bind(
+ &textures.colors[i],
+ TextureSampler::color(i),
+ &mut self.device,
+ );
+ if cfg!(debug_assertions) {
+ swizzles[i] = swizzle;
+ for j in 0 .. i {
+ if textures.colors[j] == textures.colors[i] && swizzles[j] != swizzle {
+ error!("Swizzling conflict in {:?}", textures);
+ }
+ }
+ }
+ }
+
+ // TODO: this probably isn't the best place for this.
+ if let Some(ref texture) = self.dither_matrix_texture {
+ self.device.bind_texture(TextureSampler::Dither, texture, Swizzle::default());
+ }
+
+ self.draw_instanced_batch_with_previously_bound_textures(data, vertex_array_kind, stats)
+ }
+
+ pub(crate) fn draw_instanced_batch_with_previously_bound_textures<T>(
+ &mut self,
+ data: &[T],
+ vertex_array_kind: VertexArrayKind,
+ stats: &mut RendererStats,
+ ) {
+ // If we end up with an empty draw call here, that means we have
+ // probably introduced unnecessary batch breaks during frame
+ // building - so we should be catching this earlier and removing
+ // the batch.
+ debug_assert!(!data.is_empty());
+
+ let vao = get_vao(vertex_array_kind, &self.vaos);
+
+ self.device.bind_vao(vao);
+
+ let batched = !self.debug_flags.contains(DebugFlags::DISABLE_BATCHING);
+
+ if batched {
+ self.device
+ .update_vao_instances(vao, data, VertexUsageHint::Stream);
+ self.device
+ .draw_indexed_triangles_instanced_u16(6, data.len() as i32);
+ self.profile_counters.draw_calls.inc();
+ stats.total_draw_calls += 1;
+ } else {
+ for i in 0 .. data.len() {
+ self.device
+ .update_vao_instances(vao, &data[i .. i + 1], VertexUsageHint::Stream);
+ self.device.draw_triangles_u16(0, 6);
+ self.profile_counters.draw_calls.inc();
+ stats.total_draw_calls += 1;
+ }
+ }
+
+ self.profile_counters.vertices.add(6 * data.len());
+ }
+
+ fn handle_readback_composite(
+ &mut self,
+ draw_target: DrawTarget,
+ uses_scissor: bool,
+ source: &RenderTask,
+ backdrop: &RenderTask,
+ readback: &RenderTask,
+ ) {
+ if uses_scissor {
+ self.device.disable_scissor();
+ }
+
+ let (cache_texture, _) = self.texture_resolver
+ .resolve(&TextureSource::PrevPassColor)
+ .unwrap();
+
+ // Before submitting the composite batch, do the
+ // framebuffer readbacks that are needed for each
+ // composite operation in this batch.
+ let (readback_rect, readback_layer) = readback.get_target_rect();
+ let (backdrop_rect, _) = backdrop.get_target_rect();
+ let (backdrop_screen_origin, backdrop_scale) = match backdrop.kind {
+ RenderTaskKind::Picture(ref task_info) => (task_info.content_origin, task_info.device_pixel_scale),
+ _ => panic!("bug: composite on non-picture?"),
+ };
+ let (source_screen_origin, source_scale) = match source.kind {
+ RenderTaskKind::Picture(ref task_info) => (task_info.content_origin, task_info.device_pixel_scale),
+ _ => panic!("bug: composite on non-picture?"),
+ };
+
+ // Bind the FBO to blit the backdrop to.
+ // Called per-instance in case the layer (and therefore FBO)
+ // changes. The device will skip the GL call if the requested
+ // target is already bound.
+ let cache_draw_target = DrawTarget::from_texture(
+ cache_texture,
+ readback_layer.0 as usize,
+ false,
+ );
+
+ let source_in_backdrop_space = source_screen_origin.to_f32() * (backdrop_scale.0 / source_scale.0);
+
+ let mut src = DeviceIntRect::new(
+ (source_in_backdrop_space + (backdrop_rect.origin - backdrop_screen_origin).to_f32()).to_i32(),
+ readback_rect.size,
+ );
+ let mut dest = readback_rect.to_i32();
+ let device_to_framebuffer = Scale::new(1i32);
+
+ // Need to invert the y coordinates and flip the image vertically when
+ // reading back from the framebuffer.
+ if draw_target.is_default() {
+ src.origin.y = draw_target.dimensions().height as i32 - src.size.height - src.origin.y;
+ dest.origin.y += dest.size.height;
+ dest.size.height = -dest.size.height;
+ }
+
+ self.device.blit_render_target(
+ draw_target.into(),
+ src * device_to_framebuffer,
+ cache_draw_target,
+ dest * device_to_framebuffer,
+ TextureFilter::Linear,
+ );
+
+ // Restore draw target to current pass render target + layer, and reset
+ // the read target.
+ self.device.bind_draw_target(draw_target);
+ self.device.reset_read_target();
+
+ if uses_scissor {
+ self.device.enable_scissor();
+ }
+ }
+
+ fn handle_blits(
+ &mut self,
+ blits: &[BlitJob],
+ render_tasks: &RenderTaskGraph,
+ draw_target: DrawTarget,
+ content_origin: &DeviceIntPoint,
+ ) {
+ if blits.is_empty() {
+ return;
+ }
+
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_BLIT);
+
+ // TODO(gw): For now, we don't bother batching these by source texture.
+ // If if ever shows up as an issue, we can easily batch them.
+ for blit in blits {
+ let (source, layer, source_rect) = match blit.source {
+ BlitJobSource::Texture(texture_id, layer, source_rect) => {
+ // A blit from a texture into this target.
+ (texture_id, layer as usize, source_rect)
+ }
+ BlitJobSource::RenderTask(task_id) => {
+ // A blit from the child render task into this target.
+ // TODO(gw): Support R8 format here once we start
+ // creating mips for alpha masks.
+ let source = &render_tasks[task_id];
+ let (source_rect, layer) = source.get_target_rect();
+ (TextureSource::PrevPassColor, layer.0, source_rect)
+ }
+ };
+
+ debug_assert_eq!(source_rect.size, blit.target_rect.size);
+ let (texture, swizzle) = self.texture_resolver
+ .resolve(&source)
+ .expect("BUG: invalid source texture");
+
+ if swizzle != Swizzle::default() {
+ error!("Swizzle {:?} can't be handled by a blit", swizzle);
+ }
+
+ let read_target = DrawTarget::from_texture(
+ texture,
+ layer,
+ false,
+ );
+
+ self.device.blit_render_target(
+ read_target.into(),
+ read_target.to_framebuffer_rect(source_rect),
+ draw_target,
+ draw_target.to_framebuffer_rect(blit.target_rect.translate(-content_origin.to_vector())),
+ TextureFilter::Linear,
+ );
+ }
+ }
+
+ fn handle_scaling(
+ &mut self,
+ scalings: &FastHashMap<TextureSource, Vec<ScalingInstance>>,
+ projection: &default::Transform3D<f32>,
+ stats: &mut RendererStats,
+ ) {
+ if scalings.is_empty() {
+ return
+ }
+
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_SCALE);
+
+ self.shaders
+ .borrow_mut()
+ .cs_scale
+ .bind(
+ &mut self.device,
+ &projection,
+ &mut self.renderer_errors,
+ );
+
+ for (source, instances) in scalings {
+ self.draw_instanced_batch(
+ instances,
+ VertexArrayKind::Scale,
+ &BatchTextures::color(*source),
+ stats,
+ );
+ }
+ }
+
+ fn handle_svg_filters(
+ &mut self,
+ textures: &BatchTextures,
+ svg_filters: &[SvgFilterInstance],
+ projection: &default::Transform3D<f32>,
+ stats: &mut RendererStats,
+ ) {
+ if svg_filters.is_empty() {
+ return;
+ }
+
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_SVG_FILTER);
+
+ self.shaders.borrow_mut().cs_svg_filter.bind(
+ &mut self.device,
+ &projection,
+ &mut self.renderer_errors
+ );
+
+ self.draw_instanced_batch(
+ &svg_filters,
+ VertexArrayKind::SvgFilter,
+ textures,
+ stats,
+ );
+ }
+
+ fn draw_picture_cache_target(
+ &mut self,
+ target: &PictureCacheTarget,
+ draw_target: DrawTarget,
+ content_origin: DeviceIntPoint,
+ projection: &default::Transform3D<f32>,
+ render_tasks: &RenderTaskGraph,
+ stats: &mut RendererStats,
+ ) {
+ profile_scope!("draw_picture_cache_target");
+
+ self.profile_counters.rendered_picture_cache_tiles.inc();
+ let _gm = self.gpu_profile.start_marker("picture cache target");
+ let framebuffer_kind = FramebufferKind::Other;
+
+ {
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_SETUP_TARGET);
+ self.device.bind_draw_target(draw_target);
+ self.device.enable_depth_write();
+ self.set_blend(false, framebuffer_kind);
+
+ let clear_color = target.clear_color.map(|c| c.to_array());
+ match target.alpha_batch_container.task_scissor_rect {
+ // If updating only a dirty rect within a picture cache target, the
+ // clear must also be scissored to that dirty region.
+ Some(r) if self.clear_caches_with_quads => {
+ self.device.enable_depth(DepthFunction::Always);
+ // Save the draw call count so that our reftests don't get confused...
+ let old_draw_call_count = stats.total_draw_calls;
+ if clear_color.is_none() {
+ self.device.disable_color_write();
+ }
+ let instance = ClearInstance {
+ rect: [
+ r.origin.x as f32, r.origin.y as f32,
+ r.size.width as f32, r.size.height as f32,
+ ],
+ color: clear_color.unwrap_or([0.0; 4]),
+ };
+ self.shaders.borrow_mut().ps_clear.bind(
+ &mut self.device,
+ &projection,
+ &mut self.renderer_errors,
+ );
+ self.draw_instanced_batch(
+ &[instance],
+ VertexArrayKind::Clear,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ if clear_color.is_none() {
+ self.device.enable_color_write();
+ }
+ stats.total_draw_calls = old_draw_call_count;
+ self.device.disable_depth();
+ }
+ other => {
+ let scissor_rect = other.map(|rect| {
+ draw_target.build_scissor_rect(
+ Some(rect),
+ content_origin,
+ )
+ });
+ self.device.clear_target(clear_color, Some(1.0), scissor_rect);
+ }
+ };
+ self.device.disable_depth_write();
+ }
+
+ self.draw_alpha_batch_container(
+ &target.alpha_batch_container,
+ draw_target,
+ content_origin,
+ framebuffer_kind,
+ projection,
+ render_tasks,
+ stats,
+ );
+ }
+
+ /// Draw an alpha batch container into a given draw target. This is used
+ /// by both color and picture cache target kinds.
+ fn draw_alpha_batch_container(
+ &mut self,
+ alpha_batch_container: &AlphaBatchContainer,
+ draw_target: DrawTarget,
+ content_origin: DeviceIntPoint,
+ framebuffer_kind: FramebufferKind,
+ projection: &default::Transform3D<f32>,
+ render_tasks: &RenderTaskGraph,
+ stats: &mut RendererStats,
+ ) {
+ let uses_scissor = alpha_batch_container.task_scissor_rect.is_some();
+
+ if uses_scissor {
+ self.device.enable_scissor();
+ let scissor_rect = draw_target.build_scissor_rect(
+ alpha_batch_container.task_scissor_rect,
+ content_origin,
+ );
+ self.device.set_scissor_rect(scissor_rect)
+ }
+
+ if !alpha_batch_container.opaque_batches.is_empty()
+ && !self.debug_flags.contains(DebugFlags::DISABLE_OPAQUE_PASS) {
+ let _gl = self.gpu_profile.start_marker("opaque batches");
+ let opaque_sampler = self.gpu_profile.start_sampler(GPU_SAMPLER_TAG_OPAQUE);
+ self.set_blend(false, framebuffer_kind);
+ //Note: depth equality is needed for split planes
+ self.device.enable_depth(DepthFunction::LessEqual);
+ self.device.enable_depth_write();
+
+ // Draw opaque batches front-to-back for maximum
+ // z-buffer efficiency!
+ for batch in alpha_batch_container
+ .opaque_batches
+ .iter()
+ .rev()
+ {
+ if should_skip_batch(&batch.key.kind, self.debug_flags) {
+ continue;
+ }
+
+ self.shaders.borrow_mut()
+ .get(&batch.key, batch.features, self.debug_flags)
+ .bind(
+ &mut self.device, projection,
+ &mut self.renderer_errors,
+ );
+
+ let _timer = self.gpu_profile.start_timer(batch.key.kind.sampler_tag());
+ self.draw_instanced_batch(
+ &batch.instances,
+ VertexArrayKind::Primitive,
+ &batch.key.textures,
+ stats
+ );
+ }
+
+ self.device.disable_depth_write();
+ self.gpu_profile.finish_sampler(opaque_sampler);
+ } else {
+ self.device.disable_depth();
+ }
+
+ if !alpha_batch_container.alpha_batches.is_empty()
+ && !self.debug_flags.contains(DebugFlags::DISABLE_ALPHA_PASS) {
+ let _gl = self.gpu_profile.start_marker("alpha batches");
+ let transparent_sampler = self.gpu_profile.start_sampler(GPU_SAMPLER_TAG_TRANSPARENT);
+ self.set_blend(true, framebuffer_kind);
+
+ let mut prev_blend_mode = BlendMode::None;
+ let shaders_rc = self.shaders.clone();
+
+ // If the device supports pixel local storage, initialize the PLS buffer for
+ // the transparent pass. This involves reading the current framebuffer value
+ // and storing that in PLS.
+ // TODO(gw): This is quite expensive and relies on framebuffer fetch being
+ // available. We can probably switch the opaque pass over to use
+ // PLS too, and remove this pass completely.
+ if self.device.get_capabilities().supports_pixel_local_storage {
+ // TODO(gw): If using PLS, the fixed function blender is disabled. It's possible
+ // we could take advantage of this by skipping batching on the blend
+ // mode in these cases.
+ self.init_pixel_local_storage(
+ alpha_batch_container.task_rect,
+ projection,
+ stats,
+ );
+ }
+
+ for batch in &alpha_batch_container.alpha_batches {
+ if should_skip_batch(&batch.key.kind, self.debug_flags) {
+ continue;
+ }
+
+ let mut shaders = shaders_rc.borrow_mut();
+ let shader = shaders.get(
+ &batch.key,
+ batch.features | BatchFeatures::ALPHA_PASS,
+ self.debug_flags,
+ );
+
+ if batch.key.blend_mode != prev_blend_mode {
+ match batch.key.blend_mode {
+ _ if self.debug_flags.contains(DebugFlags::SHOW_OVERDRAW) &&
+ framebuffer_kind == FramebufferKind::Main => {
+ self.device.set_blend_mode_show_overdraw();
+ }
+ BlendMode::None => {
+ unreachable!("bug: opaque blend in alpha pass");
+ }
+ BlendMode::Alpha => {
+ self.device.set_blend_mode_alpha();
+ }
+ BlendMode::PremultipliedAlpha => {
+ self.device.set_blend_mode_premultiplied_alpha();
+ }
+ BlendMode::PremultipliedDestOut => {
+ self.device.set_blend_mode_premultiplied_dest_out();
+ }
+ BlendMode::SubpixelDualSource => {
+ self.device.set_blend_mode_subpixel_dual_source();
+ }
+ BlendMode::SubpixelConstantTextColor(color) => {
+ self.device.set_blend_mode_subpixel_constant_text_color(color);
+ }
+ BlendMode::SubpixelWithBgColor => {
+ // Using the three pass "component alpha with font smoothing
+ // background color" rendering technique:
+ //
+ // /webrender/doc/text-rendering.md
+ //
+ self.device.set_blend_mode_subpixel_with_bg_color_pass0();
+ // need to make sure the shader is bound
+ shader.bind(
+ &mut self.device,
+ projection,
+ &mut self.renderer_errors,
+ );
+ self.device.switch_mode(ShaderColorMode::SubpixelWithBgColorPass0 as _);
+ }
+ BlendMode::Advanced(mode) => {
+ if self.enable_advanced_blend_barriers {
+ self.device.gl().blend_barrier_khr();
+ }
+ self.device.set_blend_mode_advanced(mode);
+ }
+ }
+ prev_blend_mode = batch.key.blend_mode;
+ }
+
+ // Handle special case readback for composites.
+ if let BatchKind::Brush(BrushBatchKind::MixBlend { task_id, source_id, backdrop_id }) = batch.key.kind {
+ // composites can't be grouped together because
+ // they may overlap and affect each other.
+ debug_assert_eq!(batch.instances.len(), 1);
+ self.handle_readback_composite(
+ draw_target,
+ uses_scissor,
+ &render_tasks[source_id],
+ &render_tasks[task_id],
+ &render_tasks[backdrop_id],
+ );
+ }
+
+ let _timer = self.gpu_profile.start_timer(batch.key.kind.sampler_tag());
+ shader.bind(
+ &mut self.device,
+ projection,
+ &mut self.renderer_errors,
+ );
+
+ self.draw_instanced_batch(
+ &batch.instances,
+ VertexArrayKind::Primitive,
+ &batch.key.textures,
+ stats
+ );
+
+ if batch.key.blend_mode == BlendMode::SubpixelWithBgColor {
+ self.set_blend_mode_subpixel_with_bg_color_pass1(framebuffer_kind);
+ // re-binding the shader after the blend mode change
+ shader.bind(
+ &mut self.device,
+ projection,
+ &mut self.renderer_errors,
+ );
+ self.device.switch_mode(ShaderColorMode::SubpixelWithBgColorPass1 as _);
+
+ // When drawing the 2nd and 3rd passes, we know that the VAO, textures etc
+ // are all set up from the previous draw_instanced_batch call,
+ // so just issue a draw call here to avoid re-uploading the
+ // instances and re-binding textures etc.
+ self.device
+ .draw_indexed_triangles_instanced_u16(6, batch.instances.len() as i32);
+
+ self.set_blend_mode_subpixel_with_bg_color_pass2(framebuffer_kind);
+ // re-binding the shader after the blend mode change
+ shader.bind(
+ &mut self.device,
+ projection,
+ &mut self.renderer_errors,
+ );
+ self.device.switch_mode(ShaderColorMode::SubpixelWithBgColorPass2 as _);
+
+ self.device
+ .draw_indexed_triangles_instanced_u16(6, batch.instances.len() as i32);
+ }
+
+ if batch.key.blend_mode == BlendMode::SubpixelWithBgColor {
+ prev_blend_mode = BlendMode::None;
+ }
+ }
+
+ // If the device supports pixel local storage, resolve the PLS values.
+ // This pass reads the final PLS color value, and writes it to a normal
+ // fragment output.
+ if self.device.get_capabilities().supports_pixel_local_storage {
+ self.resolve_pixel_local_storage(
+ alpha_batch_container.task_rect,
+ projection,
+ stats,
+ );
+ }
+
+ self.set_blend(false, framebuffer_kind);
+ self.gpu_profile.finish_sampler(transparent_sampler);
+ }
+
+ self.device.disable_depth();
+ if uses_scissor {
+ self.device.disable_scissor();
+ }
+ }
+
+ /// Rasterize any external compositor surfaces that require updating
+ fn update_external_native_surfaces(
+ &mut self,
+ external_surfaces: &[ResolvedExternalSurface],
+ results: &mut RenderResults,
+ ) {
+ if external_surfaces.is_empty() {
+ return;
+ }
+
+ let opaque_sampler = self.gpu_profile.start_sampler(GPU_SAMPLER_TAG_OPAQUE);
+
+ self.device.disable_depth();
+ self.set_blend(false, FramebufferKind::Main);
+
+ for surface in external_surfaces {
+ // See if this surface needs to be updated
+ let (native_surface_id, surface_size) = match surface.update_params {
+ Some(params) => params,
+ None => continue,
+ };
+
+ // When updating an external surface, the entire surface rect is used
+ // for all of the draw, dirty, valid and clip rect parameters.
+ let surface_rect = surface_size.into();
+
+ // Bind the native compositor surface to update
+ let surface_info = self.compositor_config
+ .compositor()
+ .unwrap()
+ .bind(
+ NativeTileId {
+ surface_id: native_surface_id,
+ x: 0,
+ y: 0,
+ },
+ surface_rect,
+ surface_rect,
+ );
+
+ // Bind the native surface to current FBO target
+ let draw_target = DrawTarget::NativeSurface {
+ offset: surface_info.origin,
+ external_fbo_id: surface_info.fbo_id,
+ dimensions: surface_size,
+ };
+ self.device.bind_draw_target(draw_target);
+
+ let projection = Transform3D::ortho(
+ 0.0,
+ surface_size.width as f32,
+ 0.0,
+ surface_size.height as f32,
+ self.device.ortho_near_plane(),
+ self.device.ortho_far_plane(),
+ );
+
+ let ( textures, instance ) = match surface.color_data {
+ ResolvedExternalSurfaceColorData::Yuv{
+ ref planes, color_space, format, rescale, .. } => {
+
+ // Bind an appropriate YUV shader for the texture format kind
+ self.shaders
+ .borrow_mut()
+ .get_composite_shader(
+ CompositeSurfaceFormat::Yuv,
+ surface.image_buffer_kind,
+ ).bind(
+ &mut self.device,
+ &projection,
+ &mut self.renderer_errors
+ );
+
+ let textures = BatchTextures {
+ colors: [
+ planes[0].texture,
+ planes[1].texture,
+ planes[2].texture,
+ ],
+ };
+
+ // When the texture is an external texture, the UV rect is not known when
+ // the external surface descriptor is created, because external textures
+ // are not resolved until the lock() callback is invoked at the start of
+ // the frame render. To handle this, query the texture resolver for the
+ // UV rect if it's an external texture, otherwise use the default UV rect.
+ let uv_rects = [
+ self.texture_resolver.get_uv_rect(&textures.colors[0], planes[0].uv_rect),
+ self.texture_resolver.get_uv_rect(&textures.colors[1], planes[1].uv_rect),
+ self.texture_resolver.get_uv_rect(&textures.colors[2], planes[2].uv_rect),
+ ];
+
+ let instance = CompositeInstance::new_yuv(
+ surface_rect.to_f32(),
+ surface_rect.to_f32(),
+ // z-id is not relevant when updating a native compositor surface.
+ // TODO(gw): Support compositor surfaces without z-buffer, for memory / perf win here.
+ ZBufferId(0),
+ color_space,
+ format,
+ rescale,
+ [
+ planes[0].texture_layer as f32,
+ planes[1].texture_layer as f32,
+ planes[2].texture_layer as f32,
+ ],
+ uv_rects,
+ );
+
+ ( textures, instance )
+ },
+ ResolvedExternalSurfaceColorData::Rgb{ ref plane, flip_y, .. } => {
+
+ self.shaders
+ .borrow_mut()
+ .get_composite_shader(
+ CompositeSurfaceFormat::Rgba,
+ surface.image_buffer_kind,
+ ).bind(
+ &mut self.device,
+ &projection,
+ &mut self.renderer_errors
+ );
+
+ let textures = BatchTextures::color(plane.texture);
+ let mut uv_rect = self.texture_resolver.get_uv_rect(&textures.colors[0], plane.uv_rect);
+ if flip_y {
+ let y = uv_rect.uv0.y;
+ uv_rect.uv0.y = uv_rect.uv1.y;
+ uv_rect.uv1.y = y;
+ }
+
+ let instance = CompositeInstance::new_rgb(
+ surface_rect.to_f32(),
+ surface_rect.to_f32(),
+ PremultipliedColorF::WHITE,
+ plane.texture_layer as f32,
+ ZBufferId(0),
+ uv_rect,
+ );
+
+ ( textures, instance )
+ },
+ };
+
+ self.draw_instanced_batch(
+ &[instance],
+ VertexArrayKind::Composite,
+ &textures,
+ &mut results.stats,
+ );
+
+ self.compositor_config
+ .compositor()
+ .unwrap()
+ .unbind();
+ }
+
+ self.gpu_profile.finish_sampler(opaque_sampler);
+ }
+
+ /// Draw a list of tiles to the framebuffer
+ fn draw_tile_list<'a, I: Iterator<Item = &'a CompositeTile>>(
+ &mut self,
+ tiles_iter: I,
+ external_surfaces: &[ResolvedExternalSurface],
+ projection: &default::Transform3D<f32>,
+ partial_present_mode: Option<PartialPresentMode>,
+ stats: &mut RendererStats,
+ ) {
+ self.shaders
+ .borrow_mut()
+ .get_composite_shader(
+ CompositeSurfaceFormat::Rgba,
+ ImageBufferKind::Texture2DArray,
+ ).bind(
+ &mut self.device,
+ projection,
+ &mut self.renderer_errors
+ );
+
+ let mut current_shader_params = (CompositeSurfaceFormat::Rgba, ImageBufferKind::Texture2DArray);
+ let mut current_textures = BatchTextures::no_texture();
+ let mut instances = Vec::new();
+
+ for tile in tiles_iter {
+ // Determine a clip rect to apply to this tile, depending on what
+ // the partial present mode is.
+ let partial_clip_rect = match partial_present_mode {
+ Some(PartialPresentMode::Single { dirty_rect }) => dirty_rect,
+ None => tile.rect,
+ };
+
+ let clip_rect = match partial_clip_rect.intersection(&tile.clip_rect) {
+ Some(rect) => rect,
+ None => continue,
+ };
+
+ // Simple compositor needs the valid rect in device space to match clip rect
+ let valid_device_rect = tile.valid_rect.translate(
+ tile.rect.origin.to_vector()
+ );
+
+ // Only composite the part of the tile that contains valid pixels
+ let clip_rect = match clip_rect.intersection(&valid_device_rect) {
+ Some(rect) => rect,
+ None => continue,
+ };
+
+ // Work out the draw params based on the tile surface
+ let (instance, textures, shader_params) = match tile.surface {
+ CompositeTileSurface::Color { color } => {
+ (
+ CompositeInstance::new(
+ tile.rect,
+ clip_rect,
+ color.premultiplied(),
+ 0.0,
+ tile.z_id,
+ ),
+ BatchTextures::color(TextureSource::Dummy),
+ (CompositeSurfaceFormat::Rgba, ImageBufferKind::Texture2DArray),
+ )
+ }
+ CompositeTileSurface::Clear => {
+ (
+ CompositeInstance::new(
+ tile.rect,
+ clip_rect,
+ PremultipliedColorF::BLACK,
+ 0.0,
+ tile.z_id,
+ ),
+ BatchTextures::color(TextureSource::Dummy),
+ (CompositeSurfaceFormat::Rgba, ImageBufferKind::Texture2DArray),
+ )
+ }
+ CompositeTileSurface::Texture { surface: ResolvedSurfaceTexture::TextureCache { texture, layer } } => {
+ (
+ CompositeInstance::new(
+ tile.rect,
+ clip_rect,
+ PremultipliedColorF::WHITE,
+ layer as f32,
+ tile.z_id,
+ ),
+ BatchTextures::color(texture),
+ (CompositeSurfaceFormat::Rgba, ImageBufferKind::Texture2DArray),
+ )
+ }
+ CompositeTileSurface::ExternalSurface { external_surface_index } => {
+ let surface = &external_surfaces[external_surface_index.0];
+
+ match surface.color_data {
+ ResolvedExternalSurfaceColorData::Yuv{ ref planes, color_space, format, rescale, .. } => {
+
+ let textures = BatchTextures {
+ colors: [
+ planes[0].texture,
+ planes[1].texture,
+ planes[2].texture,
+ ],
+ };
+
+ // When the texture is an external texture, the UV rect is not known when
+ // the external surface descriptor is created, because external textures
+ // are not resolved until the lock() callback is invoked at the start of
+ // the frame render. To handle this, query the texture resolver for the
+ // UV rect if it's an external texture, otherwise use the default UV rect.
+ let uv_rects = [
+ self.texture_resolver.get_uv_rect(&textures.colors[0], planes[0].uv_rect),
+ self.texture_resolver.get_uv_rect(&textures.colors[1], planes[1].uv_rect),
+ self.texture_resolver.get_uv_rect(&textures.colors[2], planes[2].uv_rect),
+ ];
+
+ (
+ CompositeInstance::new_yuv(
+ tile.rect,
+ clip_rect,
+ tile.z_id,
+ color_space,
+ format,
+ rescale,
+ [
+ planes[0].texture_layer as f32,
+ planes[1].texture_layer as f32,
+ planes[2].texture_layer as f32,
+ ],
+ uv_rects,
+ ),
+ textures,
+ (CompositeSurfaceFormat::Yuv, surface.image_buffer_kind),
+ )
+ },
+ ResolvedExternalSurfaceColorData::Rgb{ ref plane, flip_y, .. } => {
+
+ let mut uv_rect = self.texture_resolver.get_uv_rect(&plane.texture, plane.uv_rect);
+ if flip_y {
+ let y = uv_rect.uv0.y;
+ uv_rect.uv0.y = uv_rect.uv1.y;
+ uv_rect.uv1.y = y;
+ }
+
+ (
+ CompositeInstance::new_rgb(
+ tile.rect,
+ clip_rect,
+ PremultipliedColorF::WHITE,
+ plane.texture_layer as f32,
+ tile.z_id,
+ uv_rect,
+ ),
+ BatchTextures::color(plane.texture),
+ (CompositeSurfaceFormat::Rgba, surface.image_buffer_kind),
+ )
+ },
+ }
+ }
+ CompositeTileSurface::Texture { surface: ResolvedSurfaceTexture::Native { .. } } => {
+ unreachable!("bug: found native surface in simple composite path");
+ }
+ };
+
+ // Flush batch if shader params or textures changed
+ let flush_batch = !current_textures.is_compatible_with(&textures) ||
+ shader_params != current_shader_params;
+
+ if flush_batch {
+ if !instances.is_empty() {
+ self.draw_instanced_batch(
+ &instances,
+ VertexArrayKind::Composite,
+ &current_textures,
+ stats,
+ );
+ instances.clear();
+ }
+ }
+
+ if shader_params != current_shader_params {
+ self.shaders
+ .borrow_mut()
+ .get_composite_shader(shader_params.0, shader_params.1)
+ .bind(
+ &mut self.device,
+ projection,
+ &mut self.renderer_errors
+ );
+
+ current_shader_params = shader_params;
+ }
+
+ current_textures = textures;
+
+ // Add instance to current batch
+ instances.push(instance);
+ }
+
+ // Flush the last batch
+ if !instances.is_empty() {
+ self.draw_instanced_batch(
+ &instances,
+ VertexArrayKind::Composite,
+ &current_textures,
+ stats,
+ );
+ }
+ }
+
+ /// Composite picture cache tiles into the framebuffer. This is currently
+ /// the only way that picture cache tiles get drawn. In future, the tiles
+ /// will often be handed to the OS compositor, and this method will be
+ /// rarely used.
+ fn composite_simple(
+ &mut self,
+ composite_state: &CompositeState,
+ clear_framebuffer: bool,
+ draw_target: DrawTarget,
+ projection: &default::Transform3D<f32>,
+ results: &mut RenderResults,
+ max_partial_present_rects: usize,
+ draw_previous_partial_present_regions: bool,
+ ) {
+ let _gm = self.gpu_profile.start_marker("framebuffer");
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_COMPOSITE);
+
+ self.device.bind_draw_target(draw_target);
+ self.device.enable_depth(DepthFunction::LessEqual);
+ self.device.enable_depth_write();
+
+ // Determine the partial present mode for this frame, which is used during
+ // framebuffer clears and calculating the clip rect for each tile that is drawn.
+ let mut partial_present_mode = None;
+
+ if max_partial_present_rects > 0 {
+ // We can only use partial present if we have valid dirty rects and the
+ // client hasn't reset partial present state since last frame.
+ if composite_state.dirty_rects_are_valid && !self.force_redraw {
+ let mut combined_dirty_rect = DeviceRect::zero();
+
+ // Work out how many dirty rects WR produced, and if that's more than
+ // what the device supports.
+ for tile in composite_state.opaque_tiles.iter().chain(composite_state.alpha_tiles.iter()) {
+ let dirty_rect = tile.dirty_rect.translate(tile.rect.origin.to_vector());
+ combined_dirty_rect = combined_dirty_rect.union(&dirty_rect);
+ }
+
+ let combined_dirty_rect = combined_dirty_rect.round();
+ let combined_dirty_rect_i32 = combined_dirty_rect.to_i32();
+ // If nothing has changed, don't return any dirty rects at all (the client
+ // can use this as a signal to skip present completely).
+ if !combined_dirty_rect.is_empty() {
+ results.dirty_rects.push(combined_dirty_rect_i32);
+ }
+
+ // If the implementation requires manually keeping the buffer consistent,
+ // combine the previous frame's damage for tile clipping.
+ // (Not for the returned region though, that should be from this frame only)
+ partial_present_mode = Some(PartialPresentMode::Single {
+ dirty_rect: if draw_previous_partial_present_regions {
+ combined_dirty_rect.union(&self.prev_dirty_rect)
+ } else { combined_dirty_rect },
+ });
+
+ if draw_previous_partial_present_regions {
+ self.prev_dirty_rect = combined_dirty_rect;
+ }
+ } else {
+ // If we don't have a valid partial present scenario, return a single
+ // dirty rect to the client that covers the entire framebuffer.
+ let fb_rect = DeviceIntRect::new(
+ DeviceIntPoint::zero(),
+ draw_target.dimensions(),
+ );
+ results.dirty_rects.push(fb_rect);
+
+ if draw_previous_partial_present_regions {
+ self.prev_dirty_rect = fb_rect.to_f32();
+ }
+ }
+
+ self.force_redraw = false;
+ }
+
+ // Clear the framebuffer, if required
+ if clear_framebuffer {
+ let clear_color = self.clear_color.map(|color| color.to_array());
+
+ match partial_present_mode {
+ Some(PartialPresentMode::Single { dirty_rect }) => {
+ // We have a single dirty rect, so clear only that
+ self.device.clear_target(clear_color,
+ Some(1.0),
+ Some(draw_target.to_framebuffer_rect(dirty_rect.to_i32())));
+ }
+ None => {
+ // Partial present is disabled, so clear the entire framebuffer
+ self.device.clear_target(clear_color,
+ Some(1.0),
+ None);
+ }
+ }
+ }
+
+ // We are only interested in tiles backed with actual cached pixels so we don't
+ // count clear tiles here.
+ let num_tiles = composite_state.opaque_tiles.len()
+ + composite_state.alpha_tiles.len();
+ self.profile_counters.total_picture_cache_tiles.set(num_tiles);
+
+ // Draw opaque tiles first, front-to-back to get maxmum
+ // z-reject efficiency.
+ if !composite_state.opaque_tiles.is_empty() {
+ let opaque_sampler = self.gpu_profile.start_sampler(GPU_SAMPLER_TAG_OPAQUE);
+ self.device.enable_depth_write();
+ self.set_blend(false, FramebufferKind::Main);
+ self.draw_tile_list(
+ composite_state.opaque_tiles.iter().rev(),
+ &composite_state.external_surfaces,
+ projection,
+ partial_present_mode,
+ &mut results.stats,
+ );
+ self.gpu_profile.finish_sampler(opaque_sampler);
+ }
+
+ if !composite_state.clear_tiles.is_empty() {
+ let transparent_sampler = self.gpu_profile.start_sampler(GPU_SAMPLER_TAG_TRANSPARENT);
+ self.device.disable_depth_write();
+ self.set_blend(true, FramebufferKind::Main);
+ self.device.set_blend_mode_premultiplied_dest_out();
+ self.draw_tile_list(
+ composite_state.clear_tiles.iter(),
+ &composite_state.external_surfaces,
+ projection,
+ partial_present_mode,
+ &mut results.stats,
+ );
+ self.gpu_profile.finish_sampler(transparent_sampler);
+ }
+
+ // Draw alpha tiles
+ if !composite_state.alpha_tiles.is_empty() {
+ let transparent_sampler = self.gpu_profile.start_sampler(GPU_SAMPLER_TAG_TRANSPARENT);
+ self.device.disable_depth_write();
+ self.set_blend(true, FramebufferKind::Main);
+ self.set_blend_mode_premultiplied_alpha(FramebufferKind::Main);
+ self.draw_tile_list(
+ composite_state.alpha_tiles.iter(),
+ &composite_state.external_surfaces,
+ projection,
+ partial_present_mode,
+ &mut results.stats,
+ );
+ self.gpu_profile.finish_sampler(transparent_sampler);
+ }
+ }
+
+ fn draw_color_target(
+ &mut self,
+ draw_target: DrawTarget,
+ target: &ColorRenderTarget,
+ content_origin: DeviceIntPoint,
+ clear_color: Option<[f32; 4]>,
+ clear_depth: Option<f32>,
+ render_tasks: &RenderTaskGraph,
+ projection: &default::Transform3D<f32>,
+ frame_id: GpuFrameId,
+ stats: &mut RendererStats,
+ ) {
+ profile_scope!("draw_color_target");
+
+ self.profile_counters.color_passes.inc();
+ let _gm = self.gpu_profile.start_marker("color target");
+
+ // sanity check for the depth buffer
+ if let DrawTarget::Texture { with_depth, .. } = draw_target {
+ assert!(with_depth >= target.needs_depth());
+ }
+
+ let framebuffer_kind = if draw_target.is_default() {
+ FramebufferKind::Main
+ } else {
+ FramebufferKind::Other
+ };
+
+ {
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_SETUP_TARGET);
+ self.device.bind_draw_target(draw_target);
+ self.device.disable_depth();
+ self.set_blend(false, framebuffer_kind);
+
+ if clear_depth.is_some() {
+ self.device.enable_depth_write();
+ }
+
+ let clear_rect = match draw_target {
+ DrawTarget::NativeSurface { .. } => {
+ unreachable!("bug: native compositor surface in child target");
+ }
+ DrawTarget::Default { rect, total_size, .. } if rect.origin == FramebufferIntPoint::zero() && rect.size == total_size => {
+ // whole screen is covered, no need for scissor
+ None
+ }
+ DrawTarget::Default { rect, .. } => {
+ Some(rect)
+ }
+ DrawTarget::Texture { .. } if self.enable_clear_scissor => {
+ // TODO(gw): Applying a scissor rect and minimal clear here
+ // is a very large performance win on the Intel and nVidia
+ // GPUs that I have tested with. It's possible it may be a
+ // performance penalty on other GPU types - we should test this
+ // and consider different code paths.
+ //
+ // Note: The above measurements were taken when render
+ // target slices were minimum 2048x2048. Now that we size
+ // them adaptively, this may be less of a win (except perhaps
+ // on a mostly-unused last slice of a large texture array).
+ Some(draw_target.to_framebuffer_rect(target.used_rect()))
+ }
+ DrawTarget::Texture { .. } | DrawTarget::External { .. } => {
+ None
+ }
+ };
+
+ self.device.clear_target(
+ clear_color,
+ clear_depth,
+ clear_rect,
+ );
+
+ if clear_depth.is_some() {
+ self.device.disable_depth_write();
+ }
+ }
+
+ // Handle any blits from the texture cache to this target.
+ self.handle_blits(
+ &target.blits, render_tasks, draw_target, &content_origin,
+ );
+
+ // Draw any blurs for this target.
+ // Blurs are rendered as a standard 2-pass
+ // separable implementation.
+ // TODO(gw): In the future, consider having
+ // fast path blur shaders for common
+ // blur radii with fixed weights.
+ if !target.vertical_blurs.is_empty() || !target.horizontal_blurs.is_empty() {
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_BLUR);
+
+ self.set_blend(false, framebuffer_kind);
+ self.shaders.borrow_mut().cs_blur_rgba8
+ .bind(&mut self.device, projection, &mut self.renderer_errors);
+
+ if !target.vertical_blurs.is_empty() {
+ self.draw_instanced_batch(
+ &target.vertical_blurs,
+ VertexArrayKind::Blur,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ }
+
+ if !target.horizontal_blurs.is_empty() {
+ self.draw_instanced_batch(
+ &target.horizontal_blurs,
+ VertexArrayKind::Blur,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ }
+ }
+
+ self.handle_scaling(
+ &target.scalings,
+ projection,
+ stats,
+ );
+
+ for (ref textures, ref filters) in &target.svg_filters {
+ self.handle_svg_filters(
+ textures,
+ filters,
+ projection,
+ stats,
+ );
+ }
+
+ for alpha_batch_container in &target.alpha_batch_containers {
+ self.draw_alpha_batch_container(
+ alpha_batch_container,
+ draw_target,
+ content_origin,
+ framebuffer_kind,
+ projection,
+ render_tasks,
+ stats,
+ );
+ }
+
+ // For any registered image outputs on this render target,
+ // get the texture from caller and blit it.
+ for output in &target.outputs {
+ let handler = self.output_image_handler
+ .as_mut()
+ .expect("Found output image, but no handler set!");
+ if let Some((texture_id, output_size)) = handler.lock(output.pipeline_id) {
+ let fbo_id = match self.output_targets.entry(texture_id) {
+ Entry::Vacant(entry) => {
+ let fbo_id = self.device.create_fbo_for_external_texture(texture_id);
+ entry.insert(FrameOutput {
+ fbo_id,
+ last_access: frame_id,
+ });
+ fbo_id
+ }
+ Entry::Occupied(mut entry) => {
+ let target = entry.get_mut();
+ target.last_access = frame_id;
+ target.fbo_id
+ }
+ };
+ let (src_rect, _) = render_tasks[output.task_id].get_target_rect();
+ if !self.device.surface_origin_is_top_left() {
+ self.device.blit_render_target_invert_y(
+ draw_target.into(),
+ draw_target.to_framebuffer_rect(src_rect.translate(-content_origin.to_vector())),
+ DrawTarget::External { fbo: fbo_id, size: output_size },
+ output_size.into(),
+ );
+ } else {
+ self.device.blit_render_target(
+ draw_target.into(),
+ draw_target.to_framebuffer_rect(src_rect.translate(-content_origin.to_vector())),
+ DrawTarget::External { fbo: fbo_id, size: output_size },
+ output_size.into(),
+ TextureFilter::Linear,
+ );
+ }
+ handler.unlock(output.pipeline_id);
+ }
+ }
+ }
+
+ /// Draw all the instances in a clip batcher list to the current target.
+ fn draw_clip_batch_list(
+ &mut self,
+ list: &ClipBatchList,
+ projection: &default::Transform3D<f32>,
+ stats: &mut RendererStats,
+ ) {
+ if self.debug_flags.contains(DebugFlags::DISABLE_CLIP_MASKS) {
+ return;
+ }
+
+ // draw rounded cornered rectangles
+ if !list.slow_rectangles.is_empty() {
+ let _gm2 = self.gpu_profile.start_marker("slow clip rectangles");
+ self.shaders.borrow_mut().cs_clip_rectangle_slow.bind(
+ &mut self.device,
+ projection,
+ &mut self.renderer_errors,
+ );
+ self.draw_instanced_batch(
+ &list.slow_rectangles,
+ VertexArrayKind::Clip,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ }
+ if !list.fast_rectangles.is_empty() {
+ let _gm2 = self.gpu_profile.start_marker("fast clip rectangles");
+ self.shaders.borrow_mut().cs_clip_rectangle_fast.bind(
+ &mut self.device,
+ projection,
+ &mut self.renderer_errors,
+ );
+ self.draw_instanced_batch(
+ &list.fast_rectangles,
+ VertexArrayKind::Clip,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ }
+ // draw box-shadow clips
+ for (mask_texture_id, items) in list.box_shadows.iter() {
+ let _gm2 = self.gpu_profile.start_marker("box-shadows");
+ let textures = BatchTextures {
+ colors: [
+ *mask_texture_id,
+ TextureSource::Invalid,
+ TextureSource::Invalid,
+ ],
+ };
+ self.shaders.borrow_mut().cs_clip_box_shadow
+ .bind(&mut self.device, projection, &mut self.renderer_errors);
+ self.draw_instanced_batch(
+ items,
+ VertexArrayKind::Clip,
+ &textures,
+ stats,
+ );
+ }
+
+ // draw image masks
+ for (mask_texture_id, items) in list.images.iter() {
+ let _gm2 = self.gpu_profile.start_marker("clip images");
+ let textures = BatchTextures {
+ colors: [
+ *mask_texture_id,
+ TextureSource::Invalid,
+ TextureSource::Invalid,
+ ],
+ };
+ self.shaders.borrow_mut().cs_clip_image
+ .bind(&mut self.device, projection, &mut self.renderer_errors);
+ self.draw_instanced_batch(
+ items,
+ VertexArrayKind::Clip,
+ &textures,
+ stats,
+ );
+ }
+ }
+
+ fn draw_alpha_target(
+ &mut self,
+ draw_target: DrawTarget,
+ target: &AlphaRenderTarget,
+ projection: &default::Transform3D<f32>,
+ render_tasks: &RenderTaskGraph,
+ stats: &mut RendererStats,
+ ) {
+ profile_scope!("draw_alpha_target");
+
+ self.profile_counters.alpha_passes.inc();
+ let _gm = self.gpu_profile.start_marker("alpha target");
+ let alpha_sampler = self.gpu_profile.start_sampler(GPU_SAMPLER_TAG_ALPHA);
+
+ {
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_SETUP_TARGET);
+ self.device.bind_draw_target(draw_target);
+ self.device.disable_depth();
+ self.device.disable_depth_write();
+ self.set_blend(false, FramebufferKind::Other);
+
+ // TODO(gw): Applying a scissor rect and minimal clear here
+ // is a very large performance win on the Intel and nVidia
+ // GPUs that I have tested with. It's possible it may be a
+ // performance penalty on other GPU types - we should test this
+ // and consider different code paths.
+
+ let zero_color = [0.0, 0.0, 0.0, 0.0];
+ for &task_id in &target.zero_clears {
+ let (rect, _) = render_tasks[task_id].get_target_rect();
+ self.device.clear_target(
+ Some(zero_color),
+ None,
+ Some(draw_target.to_framebuffer_rect(rect)),
+ );
+ }
+
+ let one_color = [1.0, 1.0, 1.0, 1.0];
+ for &task_id in &target.one_clears {
+ let (rect, _) = render_tasks[task_id].get_target_rect();
+ self.device.clear_target(
+ Some(one_color),
+ None,
+ Some(draw_target.to_framebuffer_rect(rect)),
+ );
+ }
+ }
+
+ // Draw any blurs for this target.
+ // Blurs are rendered as a standard 2-pass
+ // separable implementation.
+ // TODO(gw): In the future, consider having
+ // fast path blur shaders for common
+ // blur radii with fixed weights.
+ if !target.vertical_blurs.is_empty() || !target.horizontal_blurs.is_empty() {
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_BLUR);
+
+ self.shaders.borrow_mut().cs_blur_a8
+ .bind(&mut self.device, projection, &mut self.renderer_errors);
+
+ if !target.vertical_blurs.is_empty() {
+ self.draw_instanced_batch(
+ &target.vertical_blurs,
+ VertexArrayKind::Blur,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ }
+
+ if !target.horizontal_blurs.is_empty() {
+ self.draw_instanced_batch(
+ &target.horizontal_blurs,
+ VertexArrayKind::Blur,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ }
+ }
+
+ self.handle_scaling(
+ &target.scalings,
+ projection,
+ stats,
+ );
+
+ // Draw the clip items into the tiled alpha mask.
+ {
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_CACHE_CLIP);
+
+ // TODO(gw): Consider grouping multiple clip masks per shader
+ // invocation here to reduce memory bandwith further?
+
+ // Draw the primary clip mask - since this is the first mask
+ // for the task, we can disable blending, knowing that it will
+ // overwrite every pixel in the mask area.
+ self.set_blend(false, FramebufferKind::Other);
+ self.draw_clip_batch_list(
+ &target.clip_batcher.primary_clips,
+ projection,
+ stats,
+ );
+
+ // switch to multiplicative blending for secondary masks, using
+ // multiplicative blending to accumulate clips into the mask.
+ self.set_blend(true, FramebufferKind::Other);
+ self.set_blend_mode_multiply(FramebufferKind::Other);
+ self.draw_clip_batch_list(
+ &target.clip_batcher.secondary_clips,
+ projection,
+ stats,
+ );
+ }
+
+ self.gpu_profile.finish_sampler(alpha_sampler);
+ }
+
+ fn draw_texture_cache_target(
+ &mut self,
+ texture: &CacheTextureId,
+ layer: LayerIndex,
+ target: &TextureCacheRenderTarget,
+ render_tasks: &RenderTaskGraph,
+ stats: &mut RendererStats,
+ ) {
+ profile_scope!("draw_texture_cache_target");
+
+ let texture_source = TextureSource::TextureCache(*texture, Swizzle::default());
+ let projection = {
+ let (texture, _) = self.texture_resolver
+ .resolve(&texture_source)
+ .expect("BUG: invalid target texture");
+ let target_size = texture.get_dimensions();
+
+ Transform3D::ortho(
+ 0.0,
+ target_size.width as f32,
+ 0.0,
+ target_size.height as f32,
+ self.device.ortho_near_plane(),
+ self.device.ortho_far_plane(),
+ )
+ };
+
+ self.device.disable_depth();
+ self.device.disable_depth_write();
+
+ self.set_blend(false, FramebufferKind::Other);
+
+ {
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_CLEAR);
+
+ let (texture, _) = self.texture_resolver
+ .resolve(&texture_source)
+ .expect("BUG: invalid target texture");
+ let draw_target = DrawTarget::from_texture(
+ texture,
+ layer,
+ false,
+ );
+ self.device.bind_draw_target(draw_target);
+
+ self.device.disable_depth();
+ self.device.disable_depth_write();
+ self.set_blend(false, FramebufferKind::Other);
+
+ let color = [0.0, 0.0, 0.0, 0.0];
+ if self.clear_caches_with_quads && !target.clears.is_empty() {
+ let instances = target.clears
+ .iter()
+ .map(|r| ClearInstance {
+ rect: [
+ r.origin.x as f32, r.origin.y as f32,
+ r.size.width as f32, r.size.height as f32,
+ ],
+ color,
+ })
+ .collect::<Vec<_>>();
+ self.shaders.borrow_mut().ps_clear.bind(
+ &mut self.device,
+ &projection,
+ &mut self.renderer_errors,
+ );
+ self.draw_instanced_batch(
+ &instances,
+ VertexArrayKind::Clear,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ } else {
+ for rect in &target.clears {
+ self.device.clear_target(
+ Some(color),
+ None,
+ Some(draw_target.to_framebuffer_rect(*rect)),
+ );
+ }
+ }
+
+ // Handle any blits to this texture from child tasks.
+ self.handle_blits(
+ &target.blits, render_tasks, draw_target, &DeviceIntPoint::zero(),
+ );
+ }
+
+ // Draw any borders for this target.
+ if !target.border_segments_solid.is_empty() ||
+ !target.border_segments_complex.is_empty()
+ {
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_CACHE_BORDER);
+
+ self.set_blend(true, FramebufferKind::Other);
+ self.set_blend_mode_premultiplied_alpha(FramebufferKind::Other);
+
+ if !target.border_segments_solid.is_empty() {
+ self.shaders.borrow_mut().cs_border_solid.bind(
+ &mut self.device,
+ &projection,
+ &mut self.renderer_errors,
+ );
+
+ self.draw_instanced_batch(
+ &target.border_segments_solid,
+ VertexArrayKind::Border,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ }
+
+ if !target.border_segments_complex.is_empty() {
+ self.shaders.borrow_mut().cs_border_segment.bind(
+ &mut self.device,
+ &projection,
+ &mut self.renderer_errors,
+ );
+
+ self.draw_instanced_batch(
+ &target.border_segments_complex,
+ VertexArrayKind::Border,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ }
+
+ self.set_blend(false, FramebufferKind::Other);
+ }
+
+ // Draw any line decorations for this target.
+ if !target.line_decorations.is_empty() {
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_CACHE_LINE_DECORATION);
+
+ self.set_blend(true, FramebufferKind::Other);
+ self.set_blend_mode_premultiplied_alpha(FramebufferKind::Other);
+
+ self.shaders.borrow_mut().cs_line_decoration.bind(
+ &mut self.device,
+ &projection,
+ &mut self.renderer_errors,
+ );
+
+ self.draw_instanced_batch(
+ &target.line_decorations,
+ VertexArrayKind::LineDecoration,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+
+ self.set_blend(false, FramebufferKind::Other);
+ }
+
+ // Draw any gradients for this target.
+ if !target.gradients.is_empty() {
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_CACHE_GRADIENT);
+
+ self.set_blend(false, FramebufferKind::Other);
+
+ self.shaders.borrow_mut().cs_gradient.bind(
+ &mut self.device,
+ &projection,
+ &mut self.renderer_errors,
+ );
+
+ self.draw_instanced_batch(
+ &target.gradients,
+ VertexArrayKind::Gradient,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ }
+
+ // Draw any blurs for this target.
+ if !target.horizontal_blurs.is_empty() {
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_BLUR);
+
+ {
+ let mut shaders = self.shaders.borrow_mut();
+ match target.target_kind {
+ RenderTargetKind::Alpha => &mut shaders.cs_blur_a8,
+ RenderTargetKind::Color => &mut shaders.cs_blur_rgba8,
+ }.bind(&mut self.device, &projection, &mut self.renderer_errors);
+ }
+
+ self.draw_instanced_batch(
+ &target.horizontal_blurs,
+ VertexArrayKind::Blur,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ }
+ }
+
+ fn update_deferred_resolves(&mut self, deferred_resolves: &[DeferredResolve]) -> Option<GpuCacheUpdateList> {
+ // The first thing we do is run through any pending deferred
+ // resolves, and use a callback to get the UV rect for this
+ // custom item. Then we patch the resource_rects structure
+ // here before it's uploaded to the GPU.
+ if deferred_resolves.is_empty() {
+ return None;
+ }
+
+ let handler = self.external_image_handler
+ .as_mut()
+ .expect("Found external image, but no handler set!");
+
+ let mut list = GpuCacheUpdateList {
+ frame_id: FrameId::INVALID,
+ clear: false,
+ height: self.gpu_cache_texture.get_height(),
+ blocks: Vec::new(),
+ updates: Vec::new(),
+ debug_commands: Vec::new(),
+ };
+
+ for deferred_resolve in deferred_resolves {
+ self.gpu_profile.place_marker("deferred resolve");
+ let props = &deferred_resolve.image_properties;
+ let ext_image = props
+ .external_image
+ .expect("BUG: Deferred resolves must be external images!");
+ // Provide rendering information for NativeTexture external images.
+ let image = handler.lock(ext_image.id, ext_image.channel_index, deferred_resolve.rendering);
+ let texture_target = match ext_image.image_type {
+ ExternalImageType::TextureHandle(target) => target,
+ ExternalImageType::Buffer => {
+ panic!("not a suitable image type in update_deferred_resolves()");
+ }
+ };
+
+ // In order to produce the handle, the external image handler may call into
+ // the GL context and change some states.
+ self.device.reset_state();
+
+ let texture = match image.source {
+ ExternalImageSource::NativeTexture(texture_id) => {
+ ExternalTexture::new(
+ texture_id,
+ texture_target,
+ Swizzle::default(),
+ image.uv,
+ )
+ }
+ ExternalImageSource::Invalid => {
+ warn!("Invalid ext-image");
+ debug!(
+ "For ext_id:{:?}, channel:{}.",
+ ext_image.id,
+ ext_image.channel_index
+ );
+ // Just use 0 as the gl handle for this failed case.
+ ExternalTexture::new(
+ 0,
+ texture_target,
+ Swizzle::default(),
+ image.uv,
+ )
+ }
+ ExternalImageSource::RawData(_) => {
+ panic!("Raw external data is not expected for deferred resolves!");
+ }
+ };
+
+ self.texture_resolver
+ .external_images
+ .insert((ext_image.id, ext_image.channel_index), texture);
+
+ list.updates.push(GpuCacheUpdate::Copy {
+ block_index: list.blocks.len(),
+ block_count: BLOCKS_PER_UV_RECT,
+ address: deferred_resolve.address,
+ });
+ list.blocks.push(image.uv.into());
+ list.blocks.push([0f32; 4].into());
+ }
+
+ Some(list)
+ }
+
+ fn unlock_external_images(&mut self) {
+ if !self.texture_resolver.external_images.is_empty() {
+ let handler = self.external_image_handler
+ .as_mut()
+ .expect("Found external image, but no handler set!");
+
+ for (ext_data, _) in self.texture_resolver.external_images.drain() {
+ handler.unlock(ext_data.0, ext_data.1);
+ }
+ }
+ }
+
+ /// Allocates a texture to be used as the output for a rendering pass.
+ ///
+ /// We make an effort to reuse render targe textures across passes and
+ /// across frames when the format and dimensions match. Because we use
+ /// immutable storage, we can't resize textures.
+ ///
+ /// We could consider approaches to re-use part of a larger target, if
+ /// available. However, we'd need to be careful about eviction. Currently,
+ /// render targets are freed if they haven't been used in 30 frames. If we
+ /// used partial targets, we'd need to track how _much_ of the target has
+ /// been used in the last 30 frames, since we could otherwise end up
+ /// keeping an enormous target alive indefinitely by constantly using it
+ /// in situations where a much smaller target would suffice.
+ fn allocate_target_texture<T: RenderTarget>(
+ &mut self,
+ list: &mut RenderTargetList<T>,
+ counters: &mut FrameProfileCounters,
+ ) -> Option<ActiveTexture> {
+ if list.targets.is_empty() {
+ return None
+ }
+
+ // Get a bounding rect of all the layers, and round it up to a multiple
+ // of 256. This improves render target reuse when resizing the window,
+ // since we don't need to create a new render target for each slightly-
+ // larger frame.
+ let mut bounding_rect = DeviceIntRect::zero();
+ for t in list.targets.iter() {
+ bounding_rect = t.used_rect().union(&bounding_rect);
+ }
+ debug_assert_eq!(bounding_rect.origin, DeviceIntPoint::zero());
+ let dimensions = DeviceIntSize::new(
+ (bounding_rect.size.width + 255) & !255,
+ (bounding_rect.size.height + 255) & !255,
+ );
+
+ counters.targets_used.inc();
+
+ // Try finding a match in the existing pool. If there's no match, we'll
+ // create a new texture.
+ let selector = TargetSelector {
+ size: dimensions,
+ num_layers: list.targets.len(),
+ format: list.format,
+ };
+ let index = self.texture_resolver.render_target_pool
+ .iter()
+ .position(|texture| {
+ selector == TargetSelector {
+ size: texture.get_dimensions(),
+ num_layers: texture.get_layer_count() as usize,
+ format: texture.get_format(),
+ }
+ });
+
+ let rt_info = RenderTargetInfo { has_depth: list.needs_depth() };
+ let texture = if let Some(idx) = index {
+ let mut t = self.texture_resolver.render_target_pool.swap_remove(idx);
+ self.device.reuse_render_target::<u8>(&mut t, rt_info);
+ t
+ } else {
+ counters.targets_created.inc();
+ self.device.create_texture(
+ TextureTarget::Array,
+ list.format,
+ dimensions.width,
+ dimensions.height,
+ TextureFilter::Linear,
+ Some(rt_info),
+ list.targets.len() as _,
+ )
+ };
+
+ list.check_ready(&texture);
+ Some(ActiveTexture {
+ texture,
+ saved_index: list.saved_index.clone(),
+ })
+ }
+
+ fn bind_frame_data(&mut self, frame: &mut Frame) {
+ profile_scope!("bind_frame_data");
+
+ let _timer = self.gpu_profile.start_timer(GPU_TAG_SETUP_DATA);
+
+ self.vertex_data_textures[self.current_vertex_data_textures].update(
+ &mut self.device,
+ frame,
+ );
+ self.current_vertex_data_textures =
+ (self.current_vertex_data_textures + 1) % VERTEX_DATA_TEXTURE_COUNT;
+
+ debug_assert!(self.texture_resolver.prev_pass_alpha.is_none());
+ debug_assert!(self.texture_resolver.prev_pass_color.is_none());
+ }
+
+ fn update_native_surfaces(&mut self) {
+ profile_scope!("update_native_surfaces");
+
+ match self.compositor_config {
+ CompositorConfig::Native { ref mut compositor, .. } => {
+ for op in self.pending_native_surface_updates.drain(..) {
+ match op.details {
+ NativeSurfaceOperationDetails::CreateSurface { id, virtual_offset, tile_size, is_opaque } => {
+ let _inserted = self.allocated_native_surfaces.insert(id);
+ debug_assert!(_inserted, "bug: creating existing surface");
+ compositor.create_surface(
+ id,
+ virtual_offset,
+ tile_size,
+ is_opaque,
+ );
+ }
+ NativeSurfaceOperationDetails::DestroySurface { id } => {
+ let _existed = self.allocated_native_surfaces.remove(&id);
+ debug_assert!(_existed, "bug: removing unknown surface");
+ compositor.destroy_surface(id);
+ }
+ NativeSurfaceOperationDetails::CreateTile { id } => {
+ compositor.create_tile(id);
+ }
+ NativeSurfaceOperationDetails::DestroyTile { id } => {
+ compositor.destroy_tile(id);
+ }
+ }
+ }
+ }
+ CompositorConfig::Draw { .. } => {
+ // Ensure nothing is added in simple composite mode, since otherwise
+ // memory will leak as this doesn't get drained
+ debug_assert!(self.pending_native_surface_updates.is_empty());
+ }
+ }
+ }
+
+ fn draw_frame(
+ &mut self,
+ frame: &mut Frame,
+ device_size: Option<DeviceIntSize>,
+ frame_id: GpuFrameId,
+ results: &mut RenderResults,
+ clear_framebuffer: bool,
+ ) {
+ profile_scope!("draw_frame");
+
+ // These markers seem to crash a lot on Android, see bug 1559834
+ #[cfg(not(target_os = "android"))]
+ let _gm = self.gpu_profile.start_marker("draw frame");
+
+ if frame.passes.is_empty() {
+ frame.has_been_rendered = true;
+ return;
+ }
+
+ self.device.disable_depth_write();
+ self.set_blend(false, FramebufferKind::Other);
+ self.device.disable_stencil();
+
+ self.bind_frame_data(frame);
+
+ for (_pass_index, pass) in frame.passes.iter_mut().enumerate() {
+ #[cfg(not(target_os = "android"))]
+ let _gm = self.gpu_profile.start_marker(&format!("pass {}", _pass_index));
+
+ self.texture_resolver.bind(
+ &TextureSource::PrevPassAlpha,
+ TextureSampler::PrevPassAlpha,
+ &mut self.device,
+ );
+ self.texture_resolver.bind(
+ &TextureSource::PrevPassColor,
+ TextureSampler::PrevPassColor,
+ &mut self.device,
+ );
+
+ match pass.kind {
+ RenderPassKind::MainFramebuffer { ref main_target, .. } => {
+ profile_scope!("main target");
+
+ if let Some(device_size) = device_size {
+ results.stats.color_target_count += 1;
+
+ let offset = frame.content_origin.to_f32();
+ let size = frame.device_rect.size.to_f32();
+ let surface_origin_is_top_left = self.device.surface_origin_is_top_left();
+ let (bottom, top) = if surface_origin_is_top_left {
+ (offset.y, offset.y + size.height)
+ } else {
+ (offset.y + size.height, offset.y)
+ };
+
+ let projection = Transform3D::ortho(
+ offset.x,
+ offset.x + size.width,
+ bottom,
+ top,
+ self.device.ortho_near_plane(),
+ self.device.ortho_far_plane(),
+ );
+
+ let fb_scale = Scale::<_, _, FramebufferPixel>::new(1i32);
+ let mut fb_rect = frame.device_rect * fb_scale;
+
+ if !surface_origin_is_top_left {
+ fb_rect.origin.y = device_size.height - fb_rect.origin.y - fb_rect.size.height;
+ }
+
+ let draw_target = DrawTarget::Default {
+ rect: fb_rect,
+ total_size: device_size * fb_scale,
+ surface_origin_is_top_left,
+ };
+
+ // Picture caching can be enabled / disabled dynamically from frame to
+ // frame. This is determined by what the frame builder selected, and is
+ // passed to the renderer via the composite state.
+ if frame.composite_state.picture_caching_is_enabled {
+ // If we have a native OS compositor, then make use of that interface
+ // to specify how to composite each of the picture cache surfaces.
+ match self.current_compositor_kind {
+ CompositorKind::Native { .. } => {
+ self.update_external_native_surfaces(
+ &frame.composite_state.external_surfaces,
+ results,
+ );
+ let compositor = self.compositor_config.compositor().unwrap();
+ frame.composite_state.composite_native(&mut **compositor);
+ }
+ CompositorKind::Draw { max_partial_present_rects, draw_previous_partial_present_regions, .. } => {
+ self.composite_simple(
+ &frame.composite_state,
+ clear_framebuffer,
+ draw_target,
+ &projection,
+ results,
+ max_partial_present_rects,
+ draw_previous_partial_present_regions,
+ );
+ }
+ }
+ } else {
+ if clear_framebuffer {
+ let clear_color = self.clear_color.map(|color| color.to_array());
+ self.device.bind_draw_target(draw_target);
+ self.device.enable_depth_write();
+ self.device.clear_target(clear_color,
+ Some(1.0),
+ None);
+ }
+
+ // If picture caching is disabled, we will be drawing the entire
+ // framebuffer. In that case, we need to push a screen size dirty
+ // rect, in case partial present is enabled (an empty array of
+ // dirty rects when partial present is enabled is interpreted by
+ // Gecko as meaning nothing has changed and a swap is not required).
+ results.dirty_rects.push(frame.device_rect);
+
+ self.draw_color_target(
+ draw_target,
+ main_target,
+ frame.content_origin,
+ None,
+ None,
+ &frame.render_tasks,
+ &projection,
+ frame_id,
+ &mut results.stats,
+ );
+ }
+ }
+ }
+ RenderPassKind::OffScreen {
+ ref mut alpha,
+ ref mut color,
+ ref mut texture_cache,
+ ref mut picture_cache,
+ } => {
+ profile_scope!("offscreen target");
+
+ let alpha_tex = self.allocate_target_texture(alpha, &mut frame.profile_counters);
+ let color_tex = self.allocate_target_texture(color, &mut frame.profile_counters);
+
+ // If this frame has already been drawn, then any texture
+ // cache targets have already been updated and can be
+ // skipped this time.
+ if !frame.has_been_rendered {
+ for (&(texture_id, target_index), target) in texture_cache {
+ self.draw_texture_cache_target(
+ &texture_id,
+ target_index,
+ target,
+ &frame.render_tasks,
+ &mut results.stats,
+ );
+ }
+
+ if !picture_cache.is_empty() {
+ self.profile_counters.color_passes.inc();
+ }
+
+ // Draw picture caching tiles for this pass.
+ for picture_target in picture_cache {
+ results.stats.color_target_count += 1;
+
+ let draw_target = match picture_target.surface {
+ ResolvedSurfaceTexture::TextureCache { ref texture, layer } => {
+ let (texture, _) = self.texture_resolver
+ .resolve(texture)
+ .expect("bug");
+
+ DrawTarget::from_texture(
+ texture,
+ layer as usize,
+ true,
+ )
+ }
+ ResolvedSurfaceTexture::Native { id, size } => {
+ let surface_info = match self.current_compositor_kind {
+ CompositorKind::Native { .. } => {
+ let compositor = self.compositor_config.compositor().unwrap();
+ compositor.bind(
+ id,
+ picture_target.dirty_rect,
+ picture_target.valid_rect,
+ )
+ }
+ CompositorKind::Draw { .. } => {
+ unreachable!();
+ }
+ };
+
+ DrawTarget::NativeSurface {
+ offset: surface_info.origin,
+ external_fbo_id: surface_info.fbo_id,
+ dimensions: size,
+ }
+ }
+ };
+
+ let projection = Transform3D::ortho(
+ 0.0,
+ draw_target.dimensions().width as f32,
+ 0.0,
+ draw_target.dimensions().height as f32,
+ self.device.ortho_near_plane(),
+ self.device.ortho_far_plane(),
+ );
+
+ self.draw_picture_cache_target(
+ picture_target,
+ draw_target,
+ frame.content_origin,
+ &projection,
+ &frame.render_tasks,
+ &mut results.stats,
+ );
+
+ // Native OS surfaces must be unbound at the end of drawing to them
+ if let ResolvedSurfaceTexture::Native { .. } = picture_target.surface {
+ match self.current_compositor_kind {
+ CompositorKind::Native { .. } => {
+ let compositor = self.compositor_config.compositor().unwrap();
+ compositor.unbind();
+ }
+ CompositorKind::Draw { .. } => {
+ unreachable!();
+ }
+ }
+ }
+ }
+ }
+
+ for (target_index, target) in alpha.targets.iter().enumerate() {
+ results.stats.alpha_target_count += 1;
+ let draw_target = DrawTarget::from_texture(
+ &alpha_tex.as_ref().unwrap().texture,
+ target_index,
+ false,
+ );
+
+ let projection = Transform3D::ortho(
+ 0.0,
+ draw_target.dimensions().width as f32,
+ 0.0,
+ draw_target.dimensions().height as f32,
+ self.device.ortho_near_plane(),
+ self.device.ortho_far_plane(),
+ );
+
+ self.draw_alpha_target(
+ draw_target,
+ target,
+ &projection,
+ &frame.render_tasks,
+ &mut results.stats,
+ );
+ }
+
+ for (target_index, target) in color.targets.iter().enumerate() {
+ results.stats.color_target_count += 1;
+ let draw_target = DrawTarget::from_texture(
+ &color_tex.as_ref().unwrap().texture,
+ target_index,
+ target.needs_depth(),
+ );
+
+ let projection = Transform3D::ortho(
+ 0.0,
+ draw_target.dimensions().width as f32,
+ 0.0,
+ draw_target.dimensions().height as f32,
+ self.device.ortho_near_plane(),
+ self.device.ortho_far_plane(),
+ );
+
+ let clear_depth = if target.needs_depth() {
+ Some(1.0)
+ } else {
+ None
+ };
+
+ self.draw_color_target(
+ draw_target,
+ target,
+ frame.content_origin,
+ Some([0.0, 0.0, 0.0, 0.0]),
+ clear_depth,
+ &frame.render_tasks,
+ &projection,
+ frame_id,
+ &mut results.stats,
+ );
+ }
+
+ // Only end the pass here and invalidate previous textures for
+ // off-screen targets. Deferring return of the inputs to the
+ // frame buffer until the implicit end_pass in end_frame allows
+ // debug draw overlays to be added without triggering a copy
+ // resolve stage in mobile / tiled GPUs.
+ self.texture_resolver.end_pass(
+ &mut self.device,
+ alpha_tex,
+ color_tex,
+ );
+ }
+ }
+ {
+ profile_scope!("gl.flush");
+ self.device.gl().flush();
+ }
+ }
+
+ if let Some(device_size) = device_size {
+ self.draw_frame_debug_items(&frame.debug_items);
+ self.draw_render_target_debug(device_size);
+ self.draw_texture_cache_debug(device_size);
+ self.draw_gpu_cache_debug(device_size);
+ self.draw_zoom_debug(device_size);
+ }
+ self.draw_epoch_debug();
+
+ // Garbage collect any frame outputs that weren't used this frame.
+ let device = &mut self.device;
+ self.output_targets
+ .retain(|_, target| if target.last_access != frame_id {
+ device.delete_fbo(target.fbo_id);
+ false
+ } else {
+ true
+ });
+
+ frame.has_been_rendered = true;
+ }
+
+ /// Initialize the PLS block, by reading the current framebuffer color.
+ pub fn init_pixel_local_storage(
+ &mut self,
+ task_rect: DeviceIntRect,
+ projection: &default::Transform3D<f32>,
+ stats: &mut RendererStats,
+ ) {
+ self.device.enable_pixel_local_storage(true);
+
+ self.shaders
+ .borrow_mut()
+ .pls_init
+ .as_mut()
+ .unwrap()
+ .bind(
+ &mut self.device,
+ projection,
+ &mut self.renderer_errors,
+ );
+
+ let instances = [
+ ResolveInstanceData::new(task_rect),
+ ];
+
+ self.draw_instanced_batch(
+ &instances,
+ VertexArrayKind::Resolve,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+ }
+
+ /// Resolve the current PLS structure, writing it to a fragment color output.
+ pub fn resolve_pixel_local_storage(
+ &mut self,
+ task_rect: DeviceIntRect,
+ projection: &default::Transform3D<f32>,
+ stats: &mut RendererStats,
+ ) {
+ self.shaders
+ .borrow_mut()
+ .pls_resolve
+ .as_mut()
+ .unwrap()
+ .bind(
+ &mut self.device,
+ projection,
+ &mut self.renderer_errors,
+ );
+
+ let instances = [
+ ResolveInstanceData::new(task_rect),
+ ];
+
+ self.draw_instanced_batch(
+ &instances,
+ VertexArrayKind::Resolve,
+ &BatchTextures::no_texture(),
+ stats,
+ );
+
+ self.device.enable_pixel_local_storage(false);
+ }
+
+ pub fn debug_renderer(&mut self) -> Option<&mut DebugRenderer> {
+ self.debug.get_mut(&mut self.device)
+ }
+
+ pub fn get_debug_flags(&self) -> DebugFlags {
+ self.debug_flags
+ }
+
+ pub fn set_debug_flags(&mut self, flags: DebugFlags) {
+ if let Some(enabled) = flag_changed(self.debug_flags, flags, DebugFlags::GPU_TIME_QUERIES) {
+ if enabled {
+ self.gpu_profile.enable_timers();
+ } else {
+ self.gpu_profile.disable_timers();
+ }
+ }
+ if let Some(enabled) = flag_changed(self.debug_flags, flags, DebugFlags::GPU_SAMPLE_QUERIES) {
+ if enabled {
+ self.gpu_profile.enable_samplers();
+ } else {
+ self.gpu_profile.disable_samplers();
+ }
+ }
+
+ self.debug_flags = flags;
+ }
+
+ fn draw_frame_debug_items(&mut self, items: &[DebugItem]) {
+ if items.is_empty() {
+ return;
+ }
+
+ let debug_renderer = match self.debug.get_mut(&mut self.device) {
+ Some(render) => render,
+ None => return,
+ };
+
+ for item in items {
+ match item {
+ DebugItem::Rect { rect, outer_color, inner_color } => {
+ debug_renderer.add_quad(
+ rect.origin.x,
+ rect.origin.y,
+ rect.origin.x + rect.size.width,
+ rect.origin.y + rect.size.height,
+ (*inner_color).into(),
+ (*inner_color).into(),
+ );
+
+ debug_renderer.add_rect(
+ &rect.to_i32(),
+ (*outer_color).into(),
+ );
+ }
+ DebugItem::Text { ref msg, position, color } => {
+ debug_renderer.add_text(
+ position.x,
+ position.y,
+ msg,
+ (*color).into(),
+ None,
+ );
+ }
+ }
+ }
+ }
+
+ fn draw_render_target_debug(&mut self, device_size: DeviceIntSize) {
+ if !self.debug_flags.contains(DebugFlags::RENDER_TARGET_DBG) {
+ return;
+ }
+
+ let debug_renderer = match self.debug.get_mut(&mut self.device) {
+ Some(render) => render,
+ None => return,
+ };
+
+ let textures =
+ self.texture_resolver.render_target_pool.iter().collect::<Vec<&Texture>>();
+
+ Self::do_debug_blit(
+ &mut self.device,
+ debug_renderer,
+ textures,
+ device_size,
+ 0,
+ &|_| [0.0, 1.0, 0.0, 1.0], // Use green for all RTs.
+ );
+ }
+
+ fn draw_zoom_debug(
+ &mut self,
+ device_size: DeviceIntSize,
+ ) {
+ if !self.debug_flags.contains(DebugFlags::ZOOM_DBG) {
+ return;
+ }
+
+ let debug_renderer = match self.debug.get_mut(&mut self.device) {
+ Some(render) => render,
+ None => return,
+ };
+
+ let source_size = DeviceIntSize::new(64, 64);
+ let target_size = DeviceIntSize::new(1024, 1024);
+
+ let source_origin = DeviceIntPoint::new(
+ (self.cursor_position.x - source_size.width / 2)
+ .min(device_size.width - source_size.width)
+ .max(0),
+ (self.cursor_position.y - source_size.height / 2)
+ .min(device_size.height - source_size.height)
+ .max(0),
+ );
+
+ let source_rect = DeviceIntRect::new(
+ source_origin,
+ source_size,
+ );
+
+ let target_rect = DeviceIntRect::new(
+ DeviceIntPoint::new(
+ device_size.width - target_size.width - 64,
+ device_size.height - target_size.height - 64,
+ ),
+ target_size,
+ );
+
+ let texture_rect = FramebufferIntRect::new(
+ FramebufferIntPoint::zero(),
+ source_rect.size.cast_unit(),
+ );
+
+ debug_renderer.add_rect(
+ &target_rect.inflate(1, 1),
+ debug_colors::RED.into(),
+ );
+
+ if self.zoom_debug_texture.is_none() {
+ let texture = self.device.create_texture(
+ TextureTarget::Default,
+ ImageFormat::BGRA8,
+ source_rect.size.width,
+ source_rect.size.height,
+ TextureFilter::Nearest,
+ Some(RenderTargetInfo { has_depth: false }),
+ 1,
+ );
+
+ self.zoom_debug_texture = Some(texture);
+ }
+
+ // Copy frame buffer into the zoom texture
+ let read_target = DrawTarget::new_default(device_size, self.device.surface_origin_is_top_left());
+ self.device.blit_render_target(
+ read_target.into(),
+ read_target.to_framebuffer_rect(source_rect),
+ DrawTarget::from_texture(
+ self.zoom_debug_texture.as_ref().unwrap(),
+ 0,
+ false,
+ ),
+ texture_rect,
+ TextureFilter::Nearest,
+ );
+
+ // Draw the zoom texture back to the framebuffer
+ self.device.blit_render_target(
+ ReadTarget::from_texture(
+ self.zoom_debug_texture.as_ref().unwrap(),
+ 0,
+ ),
+ texture_rect,
+ read_target,
+ read_target.to_framebuffer_rect(target_rect),
+ TextureFilter::Nearest,
+ );
+ }
+
+ fn draw_texture_cache_debug(&mut self, device_size: DeviceIntSize) {
+ if !self.debug_flags.contains(DebugFlags::TEXTURE_CACHE_DBG) {
+ return;
+ }
+
+ let debug_renderer = match self.debug.get_mut(&mut self.device) {
+ Some(render) => render,
+ None => return,
+ };
+
+ let textures =
+ self.texture_resolver.texture_cache_map.values().collect::<Vec<&Texture>>();
+
+ fn select_color(texture: &Texture) -> [f32; 4] {
+ if texture.flags().contains(TextureFlags::IS_SHARED_TEXTURE_CACHE) {
+ [1.0, 0.5, 0.0, 1.0] // Orange for shared.
+ } else {
+ [1.0, 0.0, 1.0, 1.0] // Fuchsia for standalone.
+ }
+ }
+
+ Self::do_debug_blit(
+ &mut self.device,
+ debug_renderer,
+ textures,
+ device_size,
+ if self.debug_flags.contains(DebugFlags::RENDER_TARGET_DBG) { 544 } else { 0 },
+ &select_color,
+ );
+ }
+
+ fn do_debug_blit(
+ device: &mut Device,
+ debug_renderer: &mut DebugRenderer,
+ mut textures: Vec<&Texture>,
+ device_size: DeviceIntSize,
+ bottom: i32,
+ select_color: &dyn Fn(&Texture) -> [f32; 4],
+ ) {
+ let mut spacing = 16;
+ let mut size = 512;
+
+ let fb_width = device_size.width;
+ let fb_height = device_size.height;
+ let num_layers: i32 = textures.iter()
+ .map(|texture| texture.get_layer_count())
+ .sum();
+
+ if num_layers * (size + spacing) > fb_width {
+ let factor = fb_width as f32 / (num_layers * (size + spacing)) as f32;
+ size = (size as f32 * factor) as i32;
+ spacing = (spacing as f32 * factor) as i32;
+ }
+
+ // Sort the display by layer size (in bytes), so that left-to-right is
+ // largest-to-smallest.
+ //
+ // Note that the vec here is in increasing order, because the elements
+ // get drawn right-to-left.
+ textures.sort_by_key(|t| t.layer_size_in_bytes());
+
+ let mut i = 0;
+ for texture in textures.iter() {
+ let y = spacing + bottom;
+ let dimensions = texture.get_dimensions();
+ let src_rect = FramebufferIntRect::new(
+ FramebufferIntPoint::zero(),
+ FramebufferIntSize::new(dimensions.width as i32, dimensions.height as i32),
+ );
+
+ let layer_count = texture.get_layer_count() as usize;
+ for layer in 0 .. layer_count {
+ let x = fb_width - (spacing + size) * (i as i32 + 1);
+
+ // If we have more targets than fit on one row in screen, just early exit.
+ if x > fb_width {
+ return;
+ }
+
+ //TODO: properly use FramebufferPixel coordinates
+
+ // Draw the info tag.
+ let text_margin = 1;
+ let text_height = 14; // Visually aproximated.
+ let tag_height = text_height + text_margin * 2;
+ let tag_rect = rect(x, y, size, tag_height);
+ let tag_color = select_color(texture);
+ device.clear_target(
+ Some(tag_color),
+ None,
+ Some(tag_rect.cast_unit()),
+ );
+
+ // Draw the dimensions onto the tag.
+ let dim = texture.get_dimensions();
+ let mut text_rect = tag_rect;
+ text_rect.origin.y =
+ fb_height - text_rect.origin.y - text_rect.size.height; // Top-relative.
+ debug_renderer.add_text(
+ (x + text_margin) as f32,
+ (fb_height - y - text_margin) as f32, // Top-relative.
+ &format!("{}x{}", dim.width, dim.height),
+ ColorU::new(0, 0, 0, 255),
+ Some(text_rect.to_f32())
+ );
+
+ // Blit the contents of the layer. We need to invert Y because
+ // we're blitting from a texture to the main framebuffer, which
+ // use different conventions.
+ let dest_rect = rect(x, y + tag_height, size, size);
+ if !device.surface_origin_is_top_left() {
+ device.blit_render_target_invert_y(
+ ReadTarget::from_texture(texture, layer),
+ src_rect,
+ DrawTarget::new_default(device_size, device.surface_origin_is_top_left()),
+ FramebufferIntRect::from_untyped(&dest_rect),
+ );
+ } else {
+ device.blit_render_target(
+ ReadTarget::from_texture(texture, layer),
+ src_rect,
+ DrawTarget::new_default(device_size, device.surface_origin_is_top_left()),
+ FramebufferIntRect::from_untyped(&dest_rect),
+ TextureFilter::Linear,
+ );
+ }
+ i += 1;
+ }
+ }
+ }
+
+ fn draw_epoch_debug(&mut self) {
+ if !self.debug_flags.contains(DebugFlags::EPOCHS) {
+ return;
+ }
+
+ let debug_renderer = match self.debug.get_mut(&mut self.device) {
+ Some(render) => render,
+ None => return,
+ };
+
+ let dy = debug_renderer.line_height();
+ let x0: f32 = 30.0;
+ let y0: f32 = 30.0;
+ let mut y = y0;
+ let mut text_width = 0.0;
+ for ((pipeline, document_id), epoch) in &self.pipeline_info.epochs {
+ y += dy;
+ let w = debug_renderer.add_text(
+ x0, y,
+ &format!("({:?}, {:?}): {:?}", pipeline, document_id, epoch),
+ ColorU::new(255, 255, 0, 255),
+ None,
+ ).size.width;
+ text_width = f32::max(text_width, w);
+ }
+
+ let margin = 10.0;
+ debug_renderer.add_quad(
+ x0 - margin,
+ y0 - margin,
+ x0 + text_width + margin,
+ y + margin,
+ ColorU::new(25, 25, 25, 200),
+ ColorU::new(51, 51, 51, 200),
+ );
+ }
+
+ fn draw_gpu_cache_debug(&mut self, device_size: DeviceIntSize) {
+ if !self.debug_flags.contains(DebugFlags::GPU_CACHE_DBG) {
+ return;
+ }
+
+ let debug_renderer = match self.debug.get_mut(&mut self.device) {
+ Some(render) => render,
+ None => return,
+ };
+
+ let (x_off, y_off) = (30f32, 30f32);
+ let height = self.gpu_cache_texture.texture
+ .as_ref().map_or(0, |t| t.get_dimensions().height)
+ .min(device_size.height - (y_off as i32) * 2) as usize;
+ debug_renderer.add_quad(
+ x_off,
+ y_off,
+ x_off + MAX_VERTEX_TEXTURE_WIDTH as f32,
+ y_off + height as f32,
+ ColorU::new(80, 80, 80, 80),
+ ColorU::new(80, 80, 80, 80),
+ );
+
+ let upper = self.gpu_cache_debug_chunks.len().min(height);
+ for chunk in self.gpu_cache_debug_chunks[0..upper].iter().flatten() {
+ let color = ColorU::new(250, 0, 0, 200);
+ debug_renderer.add_quad(
+ x_off + chunk.address.u as f32,
+ y_off + chunk.address.v as f32,
+ x_off + chunk.address.u as f32 + chunk.size as f32,
+ y_off + chunk.address.v as f32 + 1.0,
+ color,
+ color,
+ );
+ }
+ }
+
+ /// Pass-through to `Device::read_pixels_into`, used by Gecko's WR bindings.
+ pub fn read_pixels_into(&mut self, rect: FramebufferIntRect, format: ImageFormat, output: &mut [u8]) {
+ self.device.read_pixels_into(rect, format, output);
+ }
+
+ pub fn read_pixels_rgba8(&mut self, rect: FramebufferIntRect) -> Vec<u8> {
+ let mut pixels = vec![0; (rect.size.width * rect.size.height * 4) as usize];
+ self.device.read_pixels_into(rect, ImageFormat::RGBA8, &mut pixels);
+ pixels
+ }
+
+ pub fn read_gpu_cache(&mut self) -> (DeviceIntSize, Vec<u8>) {
+ let texture = self.gpu_cache_texture.texture.as_ref().unwrap();
+ let size = device_size_as_framebuffer_size(texture.get_dimensions());
+ let mut texels = vec![0; (size.width * size.height * 16) as usize];
+ self.device.begin_frame();
+ self.device.bind_read_target(ReadTarget::from_texture(texture, 0));
+ self.device.read_pixels_into(
+ size.into(),
+ ImageFormat::RGBAF32,
+ &mut texels,
+ );
+ self.device.reset_read_target();
+ self.device.end_frame();
+ (texture.get_dimensions(), texels)
+ }
+
+ // De-initialize the Renderer safely, assuming the GL is still alive and active.
+ pub fn deinit(mut self) {
+ //Note: this is a fake frame, only needed because texture deletion is require to happen inside a frame
+ self.device.begin_frame();
+ // If we are using a native compositor, ensure that any remaining native
+ // surfaces are freed.
+ if let CompositorConfig::Native { mut compositor, .. } = self.compositor_config {
+ for id in self.allocated_native_surfaces.drain() {
+ compositor.destroy_surface(id);
+ }
+ // Destroy the debug overlay surface, if currently allocated.
+ if self.debug_overlay_state.current_size.is_some() {
+ compositor.destroy_surface(NativeSurfaceId::DEBUG_OVERLAY);
+ }
+ compositor.deinit();
+ }
+ self.gpu_cache_texture.deinit(&mut self.device);
+ if let Some(dither_matrix_texture) = self.dither_matrix_texture {
+ self.device.delete_texture(dither_matrix_texture);
+ }
+ if let Some(zoom_debug_texture) = self.zoom_debug_texture {
+ self.device.delete_texture(zoom_debug_texture);
+ }
+ for textures in self.vertex_data_textures.drain(..) {
+ textures.deinit(&mut self.device);
+ }
+ self.device.delete_pbo(self.texture_cache_upload_pbo);
+ self.texture_resolver.deinit(&mut self.device);
+ self.device.delete_vao(self.vaos.prim_vao);
+ self.device.delete_vao(self.vaos.resolve_vao);
+ self.device.delete_vao(self.vaos.clip_vao);
+ self.device.delete_vao(self.vaos.gradient_vao);
+ self.device.delete_vao(self.vaos.blur_vao);
+ self.device.delete_vao(self.vaos.line_vao);
+ self.device.delete_vao(self.vaos.border_vao);
+ self.device.delete_vao(self.vaos.scale_vao);
+ self.device.delete_vao(self.vaos.svg_filter_vao);
+ self.device.delete_vao(self.vaos.composite_vao);
+ self.device.delete_vao(self.vaos.clear_vao);
+
+ self.debug.deinit(&mut self.device);
+
+ for (_, target) in self.output_targets {
+ self.device.delete_fbo(target.fbo_id);
+ }
+ if let Ok(shaders) = Rc::try_unwrap(self.shaders) {
+ shaders.into_inner().deinit(&mut self.device);
+ }
+
+ if let Some(async_screenshots) = self.async_screenshots.take() {
+ async_screenshots.deinit(&mut self.device);
+ }
+
+ if let Some(async_frame_recorder) = self.async_frame_recorder.take() {
+ async_frame_recorder.deinit(&mut self.device);
+ }
+
+ #[cfg(feature = "capture")]
+ self.device.delete_fbo(self.read_fbo);
+ #[cfg(feature = "replay")]
+ for (_, ext) in self.owned_external_images {
+ self.device.delete_external_texture(ext);
+ }
+ self.device.end_frame();
+ }
+
+ fn size_of<T>(&self, ptr: *const T) -> usize {
+ let op = self.size_of_ops.as_ref().unwrap().size_of_op;
+ unsafe { op(ptr as *const c_void) }
+ }
+
+ /// Collects a memory report.
+ pub fn report_memory(&self) -> MemoryReport {
+ let mut report = MemoryReport::default();
+
+ // GPU cache CPU memory.
+ if let GpuCacheBus::PixelBuffer{ref rows, ..} = self.gpu_cache_texture.bus {
+ for row in rows.iter() {
+ report.gpu_cache_cpu_mirror += self.size_of(&*row.cpu_blocks as *const _);
+ }
+ }
+
+ // GPU cache GPU memory.
+ report.gpu_cache_textures +=
+ self.gpu_cache_texture.texture.as_ref().map_or(0, |t| t.size_in_bytes());
+
+ // Render task CPU memory.
+ for (_id, doc) in &self.active_documents {
+ report.render_tasks += self.size_of(doc.frame.render_tasks.tasks.as_ptr());
+ report.render_tasks += self.size_of(doc.frame.render_tasks.task_data.as_ptr());
+ }
+
+ // Vertex data GPU memory.
+ for textures in &self.vertex_data_textures {
+ report.vertex_data_textures += textures.size_in_bytes();
+ }
+
+ // Texture cache and render target GPU memory.
+ report += self.texture_resolver.report_memory();
+
+ // Textures held internally within the device layer.
+ report += self.device.report_memory();
+
+ report
+ }
+
+ // Sets the blend mode. Blend is unconditionally set if the "show overdraw" debugging mode is
+ // enabled.
+ fn set_blend(&mut self, mut blend: bool, framebuffer_kind: FramebufferKind) {
+ if framebuffer_kind == FramebufferKind::Main &&
+ self.debug_flags.contains(DebugFlags::SHOW_OVERDRAW) {
+ blend = true
+ }
+ self.device.set_blend(blend)
+ }
+
+ fn set_blend_mode_multiply(&mut self, framebuffer_kind: FramebufferKind) {
+ if framebuffer_kind == FramebufferKind::Main &&
+ self.debug_flags.contains(DebugFlags::SHOW_OVERDRAW) {
+ self.device.set_blend_mode_show_overdraw();
+ } else {
+ self.device.set_blend_mode_multiply();
+ }
+ }
+
+ fn set_blend_mode_premultiplied_alpha(&mut self, framebuffer_kind: FramebufferKind) {
+ if framebuffer_kind == FramebufferKind::Main &&
+ self.debug_flags.contains(DebugFlags::SHOW_OVERDRAW) {
+ self.device.set_blend_mode_show_overdraw();
+ } else {
+ self.device.set_blend_mode_premultiplied_alpha();
+ }
+ }
+
+ fn set_blend_mode_subpixel_with_bg_color_pass1(&mut self, framebuffer_kind: FramebufferKind) {
+ if framebuffer_kind == FramebufferKind::Main &&
+ self.debug_flags.contains(DebugFlags::SHOW_OVERDRAW) {
+ self.device.set_blend_mode_show_overdraw();
+ } else {
+ self.device.set_blend_mode_subpixel_with_bg_color_pass1();
+ }
+ }
+
+ fn set_blend_mode_subpixel_with_bg_color_pass2(&mut self, framebuffer_kind: FramebufferKind) {
+ if framebuffer_kind == FramebufferKind::Main &&
+ self.debug_flags.contains(DebugFlags::SHOW_OVERDRAW) {
+ self.device.set_blend_mode_show_overdraw();
+ } else {
+ self.device.set_blend_mode_subpixel_with_bg_color_pass2();
+ }
+ }
+
+ /// Clears all the layers of a texture with a given color.
+ fn clear_texture(&mut self, texture: &Texture, color: [f32; 4]) {
+ for i in 0..texture.get_layer_count() {
+ self.device.bind_draw_target(DrawTarget::from_texture(
+ &texture,
+ i as usize,
+ false,
+ ));
+ self.device.clear_target(Some(color), None, None);
+ }
+ }
+}
+
+pub trait ThreadListener {
+ fn thread_started(&self, thread_name: &str);
+ fn thread_stopped(&self, thread_name: &str);
+}
+
+/// Allows callers to hook in at certain points of the async scene build. These
+/// functions are all called from the scene builder thread.
+pub trait SceneBuilderHooks {
+ /// This is called exactly once, when the scene builder thread is started
+ /// and before it processes anything.
+ fn register(&self);
+ /// This is called before each scene build starts.
+ fn pre_scene_build(&self);
+ /// This is called before each scene swap occurs.
+ fn pre_scene_swap(&self, scenebuild_time: u64);
+ /// This is called after each scene swap occurs. The PipelineInfo contains
+ /// the updated epochs and pipelines removed in the new scene compared to
+ /// the old scene.
+ fn post_scene_swap(&self, document_id: &Vec<DocumentId>, info: PipelineInfo, sceneswap_time: u64);
+ /// This is called after a resource update operation on the scene builder
+ /// thread, in the case where resource updates were applied without a scene
+ /// build.
+ fn post_resource_update(&self, document_ids: &Vec<DocumentId>);
+ /// This is called after a scene build completes without any changes being
+ /// made. We guarantee that each pre_scene_build call will be matched with
+ /// exactly one of post_scene_swap, post_resource_update or
+ /// post_empty_scene_build.
+ fn post_empty_scene_build(&self);
+ /// This is a generic callback which provides an opportunity to run code
+ /// on the scene builder thread. This is called as part of the main message
+ /// loop of the scene builder thread, but outside of any specific message
+ /// handler.
+ fn poke(&self);
+ /// This is called exactly once, when the scene builder thread is about to
+ /// terminate.
+ fn deregister(&self);
+}
+
+/// Allows callers to hook into the main render_backend loop and provide
+/// additional frame ops for generate_frame transactions. These functions
+/// are all called from the render backend thread.
+pub trait AsyncPropertySampler {
+ /// This is called exactly once, when the render backend thread is started
+ /// and before it processes anything.
+ fn register(&self);
+ /// This is called for each transaction with the generate_frame flag set
+ /// (i.e. that will trigger a render). The list of frame messages returned
+ /// are processed as though they were part of the original transaction.
+ fn sample(&self, document_id: DocumentId,
+ doc: &FastHashMap<PipelineId, Epoch>) -> Vec<FrameMsg>;
+ /// This is called exactly once, when the render backend thread is about to
+ /// terminate.
+ fn deregister(&self);
+}
+
+bitflags! {
+ /// Flags that control how shaders are pre-cached, if at all.
+ #[derive(Default)]
+ pub struct ShaderPrecacheFlags: u32 {
+ /// Needed for const initialization
+ const EMPTY = 0;
+
+ /// Only start async compile
+ const ASYNC_COMPILE = 1 << 2;
+
+ /// Do a full compile/link during startup
+ const FULL_COMPILE = 1 << 3;
+ }
+}
+
+pub struct RendererOptions {
+ pub device_pixel_ratio: f32,
+ pub resource_override_path: Option<PathBuf>,
+ /// Whether to use shaders that have been optimized at build time.
+ pub use_optimized_shaders: bool,
+ pub enable_aa: bool,
+ pub enable_dithering: bool,
+ pub max_recorded_profiles: usize,
+ pub precache_flags: ShaderPrecacheFlags,
+ /// Enable sub-pixel anti-aliasing if a fast implementation is available.
+ pub enable_subpixel_aa: bool,
+ /// Enable sub-pixel anti-aliasing if it requires a slow implementation.
+ pub force_subpixel_aa: bool,
+ pub clear_color: Option<ColorF>,
+ pub enable_clear_scissor: bool,
+ pub max_texture_size: Option<i32>,
+ pub max_glyph_cache_size: Option<usize>,
+ pub upload_method: UploadMethod,
+ pub workers: Option<Arc<ThreadPool>>,
+ pub enable_multithreading: bool,
+ pub blob_image_handler: Option<Box<dyn BlobImageHandler>>,
+ pub thread_listener: Option<Box<dyn ThreadListener + Send + Sync>>,
+ pub size_of_op: Option<VoidPtrToSizeFn>,
+ pub enclosing_size_of_op: Option<VoidPtrToSizeFn>,
+ pub cached_programs: Option<Rc<ProgramCache>>,
+ pub debug_flags: DebugFlags,
+ pub renderer_id: Option<u64>,
+ pub scene_builder_hooks: Option<Box<dyn SceneBuilderHooks + Send>>,
+ pub sampler: Option<Box<dyn AsyncPropertySampler + Send>>,
+ pub chase_primitive: ChasePrimitive,
+ pub support_low_priority_transactions: bool,
+ pub namespace_alloc_by_client: bool,
+ pub enable_picture_caching: bool,
+ pub testing: bool,
+ /// Set to true if this GPU supports hardware fast clears as a performance
+ /// optimization. Likely requires benchmarking on various GPUs to see if
+ /// it is a performance win. The default is false, which tends to be best
+ /// performance on lower end / integrated GPUs.
+ pub gpu_supports_fast_clears: bool,
+ pub allow_dual_source_blending: bool,
+ pub allow_advanced_blend_equation: bool,
+ /// If true, allow WR to use pixel local storage if the device supports it.
+ /// For now, this defaults to false since the code is still experimental
+ /// and not complete. This option will probably be removed once support is
+ /// complete, and WR can implicitly choose whether to make use of PLS.
+ pub allow_pixel_local_storage_support: bool,
+ /// If true, allow textures to be initialized with glTexStorage.
+ /// This affects VRAM consumption and data upload paths.
+ pub allow_texture_storage_support: bool,
+ /// If true, we allow the data uploaded in a different format from the
+ /// one expected by the driver, pretending the format is matching, and
+ /// swizzling the components on all the shader sampling.
+ pub allow_texture_swizzling: bool,
+ /// Number of batches to look back in history for adding the current
+ /// transparent instance into.
+ pub batch_lookback_count: usize,
+ /// Use `ps_clear` shader with batched quad rendering to clear the rects
+ /// in texture cache and picture cache tasks.
+ /// This helps to work around some Intel drivers
+ /// that incorrectly synchronize clears to following draws.
+ pub clear_caches_with_quads: bool,
+ /// Start the debug server for this renderer.
+ pub start_debug_server: bool,
+ /// Output the source of the shader with the given name.
+ pub dump_shader_source: Option<String>,
+ pub surface_origin_is_top_left: bool,
+ /// The configuration options defining how WR composites the final scene.
+ pub compositor_config: CompositorConfig,
+ pub enable_gpu_markers: bool,
+ /// If true, panic whenever a GL error occurs. This has a significant
+ /// performance impact, so only use when debugging specific problems!
+ pub panic_on_gl_error: bool,
+ /// If the total bytes allocated in shared / standalone cache is less
+ /// than this, then allow the cache to grow without forcing an eviction.
+ pub texture_cache_eviction_threshold_bytes: usize,
+ /// The maximum number of items that will be evicted per frame. This limit helps avoid jank
+ /// on frames where we want to evict a large number of items. Instead, we'd prefer to drop
+ /// the items incrementally over a number of frames, even if that means the total allocated
+ /// size of the cache is above the desired threshold for a small number of frames.
+ pub texture_cache_max_evictions_per_frame: usize,
+}
+
+impl Default for RendererOptions {
+ fn default() -> Self {
+ RendererOptions {
+ device_pixel_ratio: 1.0,
+ resource_override_path: None,
+ use_optimized_shaders: false,
+ enable_aa: true,
+ enable_dithering: false,
+ debug_flags: DebugFlags::empty(),
+ max_recorded_profiles: 0,
+ precache_flags: ShaderPrecacheFlags::empty(),
+ enable_subpixel_aa: false,
+ force_subpixel_aa: false,
+ clear_color: Some(ColorF::new(1.0, 1.0, 1.0, 1.0)),
+ enable_clear_scissor: true,
+ max_texture_size: None,
+ max_glyph_cache_size: None,
+ // This is best as `Immediate` on Angle, or `Pixelbuffer(Dynamic)` on GL,
+ // but we are unable to make this decision here, so picking the reasonable medium.
+ upload_method: UploadMethod::PixelBuffer(VertexUsageHint::Stream),
+ workers: None,
+ enable_multithreading: true,
+ blob_image_handler: None,
+ thread_listener: None,
+ size_of_op: None,
+ enclosing_size_of_op: None,
+ renderer_id: None,
+ cached_programs: None,
+ scene_builder_hooks: None,
+ sampler: None,
+ chase_primitive: ChasePrimitive::Nothing,
+ support_low_priority_transactions: false,
+ namespace_alloc_by_client: false,
+ enable_picture_caching: false,
+ testing: false,
+ gpu_supports_fast_clears: false,
+ allow_dual_source_blending: true,
+ allow_advanced_blend_equation: false,
+ allow_pixel_local_storage_support: false,
+ allow_texture_storage_support: true,
+ allow_texture_swizzling: true,
+ batch_lookback_count: DEFAULT_BATCH_LOOKBACK_COUNT,
+ clear_caches_with_quads: true,
+ // For backwards compatibility we set this to true by default, so
+ // that if the debugger feature is enabled, the debug server will
+ // be started automatically. Users can explicitly disable this as
+ // needed.
+ start_debug_server: true,
+ dump_shader_source: None,
+ surface_origin_is_top_left: false,
+ compositor_config: CompositorConfig::default(),
+ enable_gpu_markers: true,
+ panic_on_gl_error: false,
+ texture_cache_eviction_threshold_bytes: 64 * 1024 * 1024,
+ texture_cache_max_evictions_per_frame: 32,
+ }
+ }
+}
+
+pub trait DebugServer {
+ fn send(&mut self, _message: String);
+}
+
+struct NoopDebugServer;
+
+impl NoopDebugServer {
+ fn new(_: Sender<ApiMsg>) -> Self {
+ NoopDebugServer
+ }
+}
+
+impl DebugServer for NoopDebugServer {
+ fn send(&mut self, _: String) {}
+}
+
+#[cfg(feature = "debugger")]
+fn new_debug_server(enable: bool, api_tx: Sender<ApiMsg>) -> Box<dyn DebugServer> {
+ if enable {
+ Box::new(debug_server::DebugServerImpl::new(api_tx))
+ } else {
+ Box::new(NoopDebugServer::new(api_tx))
+ }
+}
+
+#[cfg(not(feature = "debugger"))]
+fn new_debug_server(_enable: bool, api_tx: Sender<ApiMsg>) -> Box<dyn DebugServer> {
+ Box::new(NoopDebugServer::new(api_tx))
+}
+
+/// Some basic statistics about the rendered scene, used in Gecko, as
+/// well as in wrench reftests to ensure that tests are batching and/or
+/// allocating on render targets as we expect them to.
+#[repr(C)]
+#[derive(Debug, Default)]
+pub struct RendererStats {
+ pub total_draw_calls: usize,
+ pub alpha_target_count: usize,
+ pub color_target_count: usize,
+ pub texture_upload_kb: usize,
+ pub resource_upload_time: u64,
+ pub gpu_cache_upload_time: u64,
+}
+
+/// Return type from render(), which contains some repr(C) statistics as well as
+/// some non-repr(C) data.
+#[derive(Debug, Default)]
+pub struct RenderResults {
+ /// Statistics about the frame that was rendered.
+ pub stats: RendererStats,
+
+ /// A list of dirty world rects. This is only currently
+ /// useful to test infrastructure.
+ /// TODO(gw): This needs to be refactored / removed.
+ pub recorded_dirty_regions: Vec<RecordedDirtyRegion>,
+
+ /// A list of the device dirty rects that were updated
+ /// this frame.
+ /// TODO(gw): This is an initial interface, likely to change in future.
+ /// TODO(gw): The dirty rects here are currently only useful when scrolling
+ /// is not occurring. They are still correct in the case of
+ /// scrolling, but will be very large (until we expose proper
+ /// OS compositor support where the dirty rects apply to a
+ /// specific picture cache slice / OS compositor surface).
+ pub dirty_rects: Vec<DeviceIntRect>,
+}
+
+#[cfg(any(feature = "capture", feature = "replay"))]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct PlainTexture {
+ data: String,
+ size: (DeviceIntSize, i32),
+ format: ImageFormat,
+ filter: TextureFilter,
+ has_depth: bool,
+}
+
+
+#[cfg(any(feature = "capture", feature = "replay"))]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct PlainRenderer {
+ device_size: Option<DeviceIntSize>,
+ gpu_cache: PlainTexture,
+ gpu_cache_frame_id: FrameId,
+ textures: FastHashMap<CacheTextureId, PlainTexture>,
+}
+
+#[cfg(any(feature = "capture", feature = "replay"))]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct PlainExternalResources {
+ images: Vec<ExternalCaptureImage>
+}
+
+#[cfg(feature = "replay")]
+enum CapturedExternalImageData {
+ NativeTexture(gl::GLuint),
+ Buffer(Arc<Vec<u8>>),
+}
+
+#[cfg(feature = "replay")]
+struct DummyExternalImageHandler {
+ data: FastHashMap<(ExternalImageId, u8), (CapturedExternalImageData, TexelRect)>,
+}
+
+#[cfg(feature = "replay")]
+impl ExternalImageHandler for DummyExternalImageHandler {
+ fn lock(&mut self, key: ExternalImageId, channel_index: u8, _rendering: ImageRendering) -> ExternalImage {
+ let (ref captured_data, ref uv) = self.data[&(key, channel_index)];
+ ExternalImage {
+ uv: *uv,
+ source: match *captured_data {
+ CapturedExternalImageData::NativeTexture(tid) => ExternalImageSource::NativeTexture(tid),
+ CapturedExternalImageData::Buffer(ref arc) => ExternalImageSource::RawData(&*arc),
+ }
+ }
+ }
+ fn unlock(&mut self, _key: ExternalImageId, _channel_index: u8) {}
+}
+
+#[cfg(feature = "replay")]
+struct VoidHandler;
+
+#[cfg(feature = "replay")]
+impl OutputImageHandler for VoidHandler {
+ fn lock(&mut self, _: PipelineId) -> Option<(u32, FramebufferIntSize)> {
+ None
+ }
+ fn unlock(&mut self, _: PipelineId) {
+ unreachable!()
+ }
+}
+
+#[derive(Default)]
+pub struct PipelineInfo {
+ pub epochs: FastHashMap<(PipelineId, DocumentId), Epoch>,
+ pub removed_pipelines: Vec<(PipelineId, DocumentId)>,
+}
+
+impl Renderer {
+ #[cfg(feature = "capture")]
+ fn save_texture(
+ texture: &Texture, name: &str, root: &PathBuf, device: &mut Device
+ ) -> PlainTexture {
+ use std::fs;
+ use std::io::Write;
+
+ let short_path = format!("textures/{}.raw", name);
+
+ let bytes_per_pixel = texture.get_format().bytes_per_pixel();
+ let read_format = texture.get_format();
+ let rect_size = texture.get_dimensions();
+
+ let mut file = fs::File::create(root.join(&short_path))
+ .expect(&format!("Unable to create {}", short_path));
+ let bytes_per_layer = (rect_size.width * rect_size.height * bytes_per_pixel) as usize;
+ let mut data = vec![0; bytes_per_layer];
+
+ //TODO: instead of reading from an FBO with `read_pixels*`, we could
+ // read from textures directly with `get_tex_image*`.
+
+ for layer_id in 0 .. texture.get_layer_count() {
+ let rect = device_size_as_framebuffer_size(rect_size).into();
+
+ device.attach_read_texture(texture, layer_id);
+ #[cfg(feature = "png")]
+ {
+ let mut png_data;
+ let (data_ref, format) = match texture.get_format() {
+ ImageFormat::RGBAF32 => {
+ png_data = vec![0; (rect_size.width * rect_size.height * 4) as usize];
+ device.read_pixels_into(rect, ImageFormat::RGBA8, &mut png_data);
+ (&png_data, ImageFormat::RGBA8)
+ }
+ fm => (&data, fm),
+ };
+ CaptureConfig::save_png(
+ root.join(format!("textures/{}-{}.png", name, layer_id)),
+ rect_size, format,
+ None,
+ data_ref,
+ );
+ }
+ device.read_pixels_into(rect, read_format, &mut data);
+ file.write_all(&data)
+ .unwrap();
+ }
+
+ PlainTexture {
+ data: short_path,
+ size: (rect_size, texture.get_layer_count()),
+ format: texture.get_format(),
+ filter: texture.get_filter(),
+ has_depth: texture.supports_depth(),
+ }
+ }
+
+ #[cfg(feature = "replay")]
+ fn load_texture(
+ target: TextureTarget,
+ plain: &PlainTexture,
+ rt_info: Option<RenderTargetInfo>,
+ root: &PathBuf,
+ device: &mut Device
+ ) -> (Texture, Vec<u8>)
+ {
+ use std::fs::File;
+ use std::io::Read;
+
+ let mut texels = Vec::new();
+ File::open(root.join(&plain.data))
+ .expect(&format!("Unable to open texture at {}", plain.data))
+ .read_to_end(&mut texels)
+ .unwrap();
+
+ let texture = device.create_texture(
+ target,
+ plain.format,
+ plain.size.0.width,
+ plain.size.0.height,
+ plain.filter,
+ rt_info,
+ plain.size.1,
+ );
+ device.upload_texture_immediate(&texture, &texels);
+
+ (texture, texels)
+ }
+
+ #[cfg(feature = "capture")]
+ fn save_capture(
+ &mut self,
+ config: CaptureConfig,
+ deferred_images: Vec<ExternalCaptureImage>,
+ ) {
+ use std::fs;
+ use std::io::Write;
+ use api::{CaptureBits, ExternalImageData};
+
+ let root = config.resource_root();
+
+ self.device.begin_frame();
+ let _gm = self.gpu_profile.start_marker("read GPU data");
+ self.device.bind_read_target_impl(self.read_fbo);
+
+ if config.bits.contains(CaptureBits::EXTERNAL_RESOURCES) && !deferred_images.is_empty() {
+ info!("saving external images");
+ let mut arc_map = FastHashMap::<*const u8, String>::default();
+ let mut tex_map = FastHashMap::<u32, String>::default();
+ let handler = self.external_image_handler
+ .as_mut()
+ .expect("Unable to lock the external image handler!");
+ for def in &deferred_images {
+ info!("\t{}", def.short_path);
+ let ExternalImageData { id, channel_index, image_type } = def.external;
+ // The image rendering parameter is irrelevant because no filtering happens during capturing.
+ let ext_image = handler.lock(id, channel_index, ImageRendering::Auto);
+ let (data, short_path) = match ext_image.source {
+ ExternalImageSource::RawData(data) => {
+ let arc_id = arc_map.len() + 1;
+ match arc_map.entry(data.as_ptr()) {
+ Entry::Occupied(e) => {
+ (None, e.get().clone())
+ }
+ Entry::Vacant(e) => {
+ let short_path = format!("externals/d{}.raw", arc_id);
+ (Some(data.to_vec()), e.insert(short_path).clone())
+ }
+ }
+ }
+ ExternalImageSource::NativeTexture(gl_id) => {
+ let tex_id = tex_map.len() + 1;
+ match tex_map.entry(gl_id) {
+ Entry::Occupied(e) => {
+ (None, e.get().clone())
+ }
+ Entry::Vacant(e) => {
+ let target = match image_type {
+ ExternalImageType::TextureHandle(target) => target,
+ ExternalImageType::Buffer => unreachable!(),
+ };
+ info!("\t\tnative texture of target {:?}", target);
+ let layer_index = 0; //TODO: what about layered textures?
+ self.device.attach_read_texture_external(gl_id, target, layer_index);
+ let data = self.device.read_pixels(&def.descriptor);
+ let short_path = format!("externals/t{}.raw", tex_id);
+ (Some(data), e.insert(short_path).clone())
+ }
+ }
+ }
+ ExternalImageSource::Invalid => {
+ info!("\t\tinvalid source!");
+ (None, String::new())
+ }
+ };
+ if let Some(bytes) = data {
+ fs::File::create(root.join(&short_path))
+ .expect(&format!("Unable to create {}", short_path))
+ .write_all(&bytes)
+ .unwrap();
+ #[cfg(feature = "png")]
+ CaptureConfig::save_png(
+ root.join(&short_path).with_extension("png"),
+ def.descriptor.size,
+ def.descriptor.format,
+ def.descriptor.stride,
+ &bytes,
+ );
+ }
+ let plain = PlainExternalImage {
+ data: short_path,
+ external: def.external,
+ uv: ext_image.uv,
+ };
+ config.serialize_for_resource(&plain, &def.short_path);
+ }
+ for def in &deferred_images {
+ handler.unlock(def.external.id, def.external.channel_index);
+ }
+ let plain_external = PlainExternalResources {
+ images: deferred_images,
+ };
+ config.serialize_for_resource(&plain_external, "external_resources");
+ }
+
+ if config.bits.contains(CaptureBits::FRAME) {
+ let path_textures = root.join("textures");
+ if !path_textures.is_dir() {
+ fs::create_dir(&path_textures).unwrap();
+ }
+
+ info!("saving GPU cache");
+ self.update_gpu_cache(); // flush pending updates
+ let mut plain_self = PlainRenderer {
+ device_size: self.device_size,
+ gpu_cache: Self::save_texture(
+ &self.gpu_cache_texture.texture.as_ref().unwrap(),
+ "gpu", &root, &mut self.device,
+ ),
+ gpu_cache_frame_id: self.gpu_cache_frame_id,
+ textures: FastHashMap::default(),
+ };
+
+ info!("saving cached textures");
+ for (id, texture) in &self.texture_resolver.texture_cache_map {
+ let file_name = format!("cache-{}", plain_self.textures.len() + 1);
+ info!("\t{}", file_name);
+ let plain = Self::save_texture(texture, &file_name, &root, &mut self.device);
+ plain_self.textures.insert(*id, plain);
+ }
+
+ config.serialize_for_resource(&plain_self, "renderer");
+ }
+
+ self.device.reset_read_target();
+ self.device.end_frame();
+ info!("done.");
+ }
+
+ #[cfg(feature = "replay")]
+ fn load_capture(
+ &mut self,
+ config: CaptureConfig,
+ plain_externals: Vec<PlainExternalImage>,
+ ) {
+ use std::fs::File;
+ use std::io::Read;
+ use std::slice;
+
+ info!("loading external buffer-backed images");
+ assert!(self.texture_resolver.external_images.is_empty());
+ let mut raw_map = FastHashMap::<String, Arc<Vec<u8>>>::default();
+ let mut image_handler = DummyExternalImageHandler {
+ data: FastHashMap::default(),
+ };
+
+ let root = config.resource_root();
+
+ // Note: this is a `SCENE` level population of the external image handlers
+ // It would put both external buffers and texture into the map.
+ // But latter are going to be overwritten later in this function
+ // if we are in the `FRAME` level.
+ for plain_ext in plain_externals {
+ let data = match raw_map.entry(plain_ext.data) {
+ Entry::Occupied(e) => e.get().clone(),
+ Entry::Vacant(e) => {
+ let mut buffer = Vec::new();
+ File::open(root.join(e.key()))
+ .expect(&format!("Unable to open {}", e.key()))
+ .read_to_end(&mut buffer)
+ .unwrap();
+ e.insert(Arc::new(buffer)).clone()
+ }
+ };
+ let ext = plain_ext.external;
+ let value = (CapturedExternalImageData::Buffer(data), plain_ext.uv);
+ image_handler.data.insert((ext.id, ext.channel_index), value);
+ }
+
+ if let Some(external_resources) = config.deserialize_for_resource::<PlainExternalResources, _>("external_resources") {
+ info!("loading external texture-backed images");
+ let mut native_map = FastHashMap::<String, gl::GLuint>::default();
+ for ExternalCaptureImage { short_path, external, descriptor } in external_resources.images {
+ let target = match external.image_type {
+ ExternalImageType::TextureHandle(target) => target,
+ ExternalImageType::Buffer => continue,
+ };
+ let plain_ext = config.deserialize_for_resource::<PlainExternalImage, _>(&short_path)
+ .expect(&format!("Unable to read {}.ron", short_path));
+ let key = (external.id, external.channel_index);
+
+ let tid = match native_map.entry(plain_ext.data) {
+ Entry::Occupied(e) => e.get().clone(),
+ Entry::Vacant(e) => {
+ //TODO: provide a way to query both the layer count and the filter from external images
+ let (layer_count, filter) = (1, TextureFilter::Linear);
+ let plain_tex = PlainTexture {
+ data: e.key().clone(),
+ size: (descriptor.size, layer_count),
+ format: descriptor.format,
+ filter,
+ has_depth: false,
+ };
+ let t = Self::load_texture(
+ target,
+ &plain_tex,
+ None,
+ &root,
+ &mut self.device
+ );
+ let extex = t.0.into_external();
+ self.owned_external_images.insert(key, extex.clone());
+ e.insert(extex.internal_id()).clone()
+ }
+ };
+
+ let value = (CapturedExternalImageData::NativeTexture(tid), plain_ext.uv);
+ image_handler.data.insert(key, value);
+ }
+ }
+
+ if let Some(renderer) = config.deserialize_for_resource::<PlainRenderer, _>("renderer") {
+ info!("loading cached textures");
+ self.device_size = renderer.device_size;
+ self.device.begin_frame();
+
+ for (_id, texture) in self.texture_resolver.texture_cache_map.drain() {
+ self.device.delete_texture(texture);
+ }
+ for (id, texture) in renderer.textures {
+ info!("\t{}", texture.data);
+ let t = Self::load_texture(
+ TextureTarget::Array,
+ &texture,
+ Some(RenderTargetInfo { has_depth: texture.has_depth }),
+ &root,
+ &mut self.device
+ );
+ self.texture_resolver.texture_cache_map.insert(id, t.0);
+ }
+
+ info!("loading gpu cache");
+ if let Some(t) = self.gpu_cache_texture.texture.take() {
+ self.device.delete_texture(t);
+ }
+ let (t, gpu_cache_data) = Self::load_texture(
+ TextureTarget::Default,
+ &renderer.gpu_cache,
+ Some(RenderTargetInfo { has_depth: false }),
+ &root,
+ &mut self.device,
+ );
+ self.gpu_cache_texture.texture = Some(t);
+ match self.gpu_cache_texture.bus {
+ GpuCacheBus::PixelBuffer { ref mut rows, .. } => {
+ let dim = self.gpu_cache_texture.texture.as_ref().unwrap().get_dimensions();
+ let blocks = unsafe {
+ slice::from_raw_parts(
+ gpu_cache_data.as_ptr() as *const GpuBlockData,
+ gpu_cache_data.len() / mem::size_of::<GpuBlockData>(),
+ )
+ };
+ // fill up the CPU cache from the contents we just loaded
+ rows.clear();
+ rows.extend((0 .. dim.height).map(|_| CacheRow::new()));
+ let chunks = blocks.chunks(MAX_VERTEX_TEXTURE_WIDTH);
+ debug_assert_eq!(chunks.len(), rows.len());
+ for (row, chunk) in rows.iter_mut().zip(chunks) {
+ row.cpu_blocks.copy_from_slice(chunk);
+ }
+ }
+ GpuCacheBus::Scatter { .. } => {}
+ }
+ self.gpu_cache_frame_id = renderer.gpu_cache_frame_id;
+
+ self.device.end_frame();
+ } else {
+ info!("loading cached textures");
+ self.device.begin_frame();
+ for (_id, texture) in self.texture_resolver.texture_cache_map.drain() {
+ self.device.delete_texture(texture);
+ }
+
+ info!("loading gpu cache");
+ if let Some(t) = self.gpu_cache_texture.texture.take() {
+ self.device.delete_texture(t);
+ }
+ self.device.end_frame();
+ }
+
+ self.output_image_handler = Some(Box::new(VoidHandler) as Box<_>);
+ self.external_image_handler = Some(Box::new(image_handler) as Box<_>);
+ info!("done.");
+ }
+}
+
+fn get_vao(vertex_array_kind: VertexArrayKind, vaos: &RendererVAOs) -> &VAO {
+ match vertex_array_kind {
+ VertexArrayKind::Primitive => &vaos.prim_vao,
+ VertexArrayKind::Clip => &vaos.clip_vao,
+ VertexArrayKind::Blur => &vaos.blur_vao,
+ VertexArrayKind::VectorStencil | VertexArrayKind::VectorCover => unreachable!(),
+ VertexArrayKind::Border => &vaos.border_vao,
+ VertexArrayKind::Scale => &vaos.scale_vao,
+ VertexArrayKind::LineDecoration => &vaos.line_vao,
+ VertexArrayKind::Gradient => &vaos.gradient_vao,
+ VertexArrayKind::Resolve => &vaos.resolve_vao,
+ VertexArrayKind::SvgFilter => &vaos.svg_filter_vao,
+ VertexArrayKind::Composite => &vaos.composite_vao,
+ VertexArrayKind::Clear => &vaos.clear_vao,
+ }
+}
+#[derive(Clone, Copy, PartialEq)]
+enum FramebufferKind {
+ Main,
+ Other,
+}
+
+fn should_skip_batch(kind: &BatchKind, flags: DebugFlags) -> bool {
+ match kind {
+ BatchKind::TextRun(_) => {
+ flags.contains(DebugFlags::DISABLE_TEXT_PRIMS)
+ }
+ BatchKind::Brush(BrushBatchKind::ConicGradient) |
+ BatchKind::Brush(BrushBatchKind::RadialGradient) |
+ BatchKind::Brush(BrushBatchKind::LinearGradient) => {
+ flags.contains(DebugFlags::DISABLE_GRADIENT_PRIMS)
+ }
+ _ => false,
+ }
+}
+
+impl CompositeState {
+ /// Use the client provided native compositor interface to add all picture
+ /// cache tiles to the OS compositor
+ fn composite_native(
+ &self,
+ compositor: &mut dyn Compositor,
+ ) {
+ // Add each surface to the visual tree. z-order is implicit based on
+ // order added. Offset and clip rect apply to all tiles within this
+ // surface.
+ for surface in &self.descriptor.surfaces {
+ compositor.add_surface(
+ surface.surface_id.expect("bug: no native surface allocated"),
+ surface.offset.to_i32(),
+ surface.clip_rect.to_i32(),
+ );
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/src/resource_cache.rs b/third_party/webrender/webrender/src/resource_cache.rs
new file mode 100644
index 00000000000..a87d179b08d
--- /dev/null
+++ b/third_party/webrender/webrender/src/resource_cache.rs
@@ -0,0 +1,1829 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{AddFont, BlobImageResources, ResourceUpdate};
+use api::{BlobImageRequest, RasterizedBlobImage};
+use api::{ClearCache, DebugFlags, FontInstanceKey, FontKey, FontTemplate, GlyphIndex};
+use api::{ExternalImageData, ExternalImageType, BlobImageResult, FontInstanceData};
+use api::{DirtyRect, GlyphDimensions, IdNamespace, DEFAULT_TILE_SIZE};
+use api::{ImageData, ImageDescriptor, ImageKey, ImageRendering, TileSize};
+use api::{BlobImageKey, MemoryReport, VoidPtrToSizeFn};
+use api::{SharedFontInstanceMap, BaseFontInstance};
+use api::image_tiling::{compute_tile_size, compute_tile_range};
+use api::units::*;
+#[cfg(feature = "capture")]
+use crate::capture::ExternalCaptureImage;
+#[cfg(feature = "replay")]
+use crate::capture::PlainExternalImage;
+#[cfg(any(feature = "replay", feature = "png", feature="capture"))]
+use crate::capture::CaptureConfig;
+use crate::composite::{NativeSurfaceId, NativeSurfaceOperation, NativeTileId, NativeSurfaceOperationDetails};
+use crate::device::TextureFilter;
+use crate::glyph_cache::GlyphCache;
+use crate::glyph_cache::GlyphCacheEntry;
+use crate::glyph_rasterizer::{GLYPH_FLASHING, FontInstance, GlyphFormat, GlyphKey, GlyphRasterizer};
+use crate::gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle};
+use crate::gpu_types::UvRectKind;
+use crate::internal_types::{FastHashMap, FastHashSet, TextureSource, ResourceUpdateList};
+use crate::profiler::{ResourceProfileCounters, TextureCacheProfileCounters};
+use crate::render_backend::{FrameId, FrameStamp};
+use crate::render_task_graph::{RenderTaskGraph, RenderTaskId};
+use crate::render_task_cache::{RenderTaskCache, RenderTaskCacheKey};
+use crate::render_task_cache::{RenderTaskCacheEntry, RenderTaskCacheEntryHandle};
+use euclid::point2;
+use smallvec::SmallVec;
+use std::collections::hash_map::Entry::{self, Occupied, Vacant};
+use std::collections::hash_map::{Iter, IterMut};
+use std::collections::VecDeque;
+#[cfg(any(feature = "capture", feature = "replay"))]
+use std::collections::HashMap;
+use std::{cmp, mem};
+use std::fmt::Debug;
+use std::hash::Hash;
+use std::os::raw::c_void;
+#[cfg(any(feature = "capture", feature = "replay"))]
+use std::path::PathBuf;
+use std::sync::Arc;
+use std::sync::atomic::{AtomicUsize, Ordering};
+use std::u32;
+use crate::texture_cache::{TextureCache, TextureCacheHandle, Eviction};
+
+// Counter for generating unique native surface ids
+static NEXT_NATIVE_SURFACE_ID: AtomicUsize = AtomicUsize::new(0);
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct GlyphFetchResult {
+ pub index_in_text_run: i32,
+ pub uv_rect_address: GpuCacheAddress,
+}
+
+// These coordinates are always in texels.
+// They are converted to normalized ST
+// values in the vertex shader. The reason
+// for this is that the texture may change
+// dimensions (e.g. the pages in a texture
+// atlas can grow). When this happens, by
+// storing the coordinates as texel values
+// we don't need to go through and update
+// various CPU-side structures.
+#[derive(Debug, Clone)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct CacheItem {
+ pub texture_id: TextureSource,
+ pub uv_rect_handle: GpuCacheHandle,
+ pub uv_rect: DeviceIntRect,
+ pub texture_layer: i32,
+}
+
+impl CacheItem {
+ pub fn invalid() -> Self {
+ CacheItem {
+ texture_id: TextureSource::Invalid,
+ uv_rect_handle: GpuCacheHandle::new(),
+ uv_rect: DeviceIntRect::zero(),
+ texture_layer: 0,
+ }
+ }
+}
+
+/// Represents the backing store of an image in the cache.
+/// This storage can take several forms.
+#[derive(Clone, Debug)]
+pub enum CachedImageData {
+ /// A simple series of bytes, provided by the embedding and owned by WebRender.
+ /// The format is stored out-of-band, currently in ImageDescriptor.
+ Raw(Arc<Vec<u8>>),
+ /// An series of commands that can be rasterized into an image via an
+ /// embedding-provided callback.
+ ///
+ /// The commands are stored elsewhere and this variant is used as a placeholder.
+ Blob,
+ /// An image owned by the embedding, and referenced by WebRender. This may
+ /// take the form of a texture or a heap-allocated buffer.
+ External(ExternalImageData),
+}
+
+impl From<ImageData> for CachedImageData {
+ fn from(img_data: ImageData) -> Self {
+ match img_data {
+ ImageData::Raw(data) => CachedImageData::Raw(data),
+ ImageData::External(data) => CachedImageData::External(data),
+ }
+ }
+}
+
+impl CachedImageData {
+ /// Returns true if this represents a blob.
+ #[inline]
+ pub fn is_blob(&self) -> bool {
+ match *self {
+ CachedImageData::Blob => true,
+ _ => false,
+ }
+ }
+
+ /// Returns true if this variant of CachedImageData should go through the texture
+ /// cache.
+ #[inline]
+ pub fn uses_texture_cache(&self) -> bool {
+ match *self {
+ CachedImageData::External(ref ext_data) => match ext_data.image_type {
+ ExternalImageType::TextureHandle(_) => false,
+ ExternalImageType::Buffer => true,
+ },
+ CachedImageData::Blob => true,
+ CachedImageData::Raw(_) => true,
+ }
+ }
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ImageProperties {
+ pub descriptor: ImageDescriptor,
+ pub external_image: Option<ExternalImageData>,
+ pub tiling: Option<TileSize>,
+ // Potentially a subset of the image's total rectangle. This rectangle is what
+ // we map to the (layout space) display item bounds.
+ pub visible_rect: DeviceIntRect,
+}
+
+#[derive(Debug, Copy, Clone, PartialEq)]
+enum State {
+ Idle,
+ AddResources,
+ QueryResources,
+}
+
+/// Post scene building state.
+type RasterizedBlob = FastHashMap<TileOffset, RasterizedBlobImage>;
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Debug, Copy, Clone, PartialEq)]
+pub struct ImageGeneration(pub u32);
+
+impl ImageGeneration {
+ pub const INVALID: ImageGeneration = ImageGeneration(u32::MAX);
+}
+
+struct ImageResource {
+ data: CachedImageData,
+ descriptor: ImageDescriptor,
+ tiling: Option<TileSize>,
+ /// This is used to express images that are virtually very large
+ /// but with only a visible sub-set that is valid at a given time.
+ visible_rect: DeviceIntRect,
+ generation: ImageGeneration,
+}
+
+#[derive(Clone, Debug)]
+pub struct ImageTiling {
+ pub image_size: DeviceIntSize,
+ pub tile_size: TileSize,
+}
+
+#[derive(Default)]
+struct ImageTemplates {
+ images: FastHashMap<ImageKey, ImageResource>,
+}
+
+impl ImageTemplates {
+ fn insert(&mut self, key: ImageKey, resource: ImageResource) {
+ self.images.insert(key, resource);
+ }
+
+ fn remove(&mut self, key: ImageKey) -> Option<ImageResource> {
+ self.images.remove(&key)
+ }
+
+ fn get(&self, key: ImageKey) -> Option<&ImageResource> {
+ self.images.get(&key)
+ }
+
+ fn get_mut(&mut self, key: ImageKey) -> Option<&mut ImageResource> {
+ self.images.get_mut(&key)
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct CachedImageInfo {
+ texture_cache_handle: TextureCacheHandle,
+ dirty_rect: ImageDirtyRect,
+ manual_eviction: bool,
+}
+
+impl CachedImageInfo {
+ fn mark_unused(&mut self, texture_cache: &mut TextureCache) {
+ if self.manual_eviction {
+ texture_cache.evict_manual_handle(&self.texture_cache_handle);
+ }
+ self.manual_eviction = false;
+ }
+}
+
+#[cfg(debug_assertions)]
+impl Drop for CachedImageInfo {
+ fn drop(&mut self) {
+ debug_assert!(!self.manual_eviction, "Manual eviction requires cleanup");
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ResourceClassCache<K: Hash + Eq, V, U: Default> {
+ resources: FastHashMap<K, V>,
+ pub user_data: U,
+}
+
+impl<K, V, U> ResourceClassCache<K, V, U>
+where
+ K: Clone + Hash + Eq + Debug,
+ U: Default,
+{
+ pub fn new() -> Self {
+ ResourceClassCache {
+ resources: FastHashMap::default(),
+ user_data: Default::default(),
+ }
+ }
+
+ pub fn get(&self, key: &K) -> &V {
+ self.resources.get(key)
+ .expect("Didn't find a cached resource with that ID!")
+ }
+
+ pub fn try_get(&self, key: &K) -> Option<&V> {
+ self.resources.get(key)
+ }
+
+ pub fn insert(&mut self, key: K, value: V) {
+ self.resources.insert(key, value);
+ }
+
+ pub fn remove(&mut self, key: &K) -> Option<V> {
+ self.resources.remove(key)
+ }
+
+ pub fn get_mut(&mut self, key: &K) -> &mut V {
+ self.resources.get_mut(key)
+ .expect("Didn't find a cached resource with that ID!")
+ }
+
+ pub fn try_get_mut(&mut self, key: &K) -> Option<&mut V> {
+ self.resources.get_mut(key)
+ }
+
+ pub fn entry(&mut self, key: K) -> Entry<K, V> {
+ self.resources.entry(key)
+ }
+
+ pub fn iter(&self) -> Iter<K, V> {
+ self.resources.iter()
+ }
+
+ pub fn iter_mut(&mut self) -> IterMut<K, V> {
+ self.resources.iter_mut()
+ }
+
+ pub fn is_empty(&mut self) -> bool {
+ self.resources.is_empty()
+ }
+
+ pub fn clear(&mut self) {
+ self.resources.clear();
+ }
+
+ pub fn retain<F>(&mut self, f: F)
+ where
+ F: FnMut(&K, &mut V) -> bool,
+ {
+ self.resources.retain(f);
+ }
+}
+
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct CachedImageKey {
+ pub rendering: ImageRendering,
+ pub tile: Option<TileOffset>,
+}
+
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ImageRequest {
+ pub key: ImageKey,
+ pub rendering: ImageRendering,
+ pub tile: Option<TileOffset>,
+}
+
+impl ImageRequest {
+ pub fn with_tile(&self, offset: TileOffset) -> Self {
+ ImageRequest {
+ key: self.key,
+ rendering: self.rendering,
+ tile: Some(offset),
+ }
+ }
+
+ pub fn is_untiled_auto(&self) -> bool {
+ self.tile.is_none() && self.rendering == ImageRendering::Auto
+ }
+}
+
+impl Into<BlobImageRequest> for ImageRequest {
+ fn into(self) -> BlobImageRequest {
+ BlobImageRequest {
+ key: BlobImageKey(self.key),
+ tile: self.tile.unwrap(),
+ }
+ }
+}
+
+impl Into<CachedImageKey> for ImageRequest {
+ fn into(self) -> CachedImageKey {
+ CachedImageKey {
+ rendering: self.rendering,
+ tile: self.tile,
+ }
+ }
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Clone, Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum ImageCacheError {
+ OverLimitSize,
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+enum ImageResult {
+ UntiledAuto(CachedImageInfo),
+ Multi(ResourceClassCache<CachedImageKey, CachedImageInfo, ()>),
+ Err(ImageCacheError),
+}
+
+impl ImageResult {
+ /// Releases any texture cache entries held alive by this ImageResult.
+ fn drop_from_cache(&mut self, texture_cache: &mut TextureCache) {
+ match *self {
+ ImageResult::UntiledAuto(ref mut entry) => {
+ entry.mark_unused(texture_cache);
+ },
+ ImageResult::Multi(ref mut entries) => {
+ for entry in entries.resources.values_mut() {
+ entry.mark_unused(texture_cache);
+ }
+ },
+ ImageResult::Err(_) => {},
+ }
+ }
+}
+
+type ImageCache = ResourceClassCache<ImageKey, ImageResult, ()>;
+
+struct Resources {
+ font_templates: FastHashMap<FontKey, FontTemplate>,
+ font_instances: SharedFontInstanceMap,
+ image_templates: ImageTemplates,
+}
+
+impl BlobImageResources for Resources {
+ fn get_font_data(&self, key: FontKey) -> &FontTemplate {
+ self.font_templates.get(&key).unwrap()
+ }
+ fn get_font_instance_data(&self, key: FontInstanceKey) -> Option<FontInstanceData> {
+ self.font_instances.get_font_instance_data(key)
+ }
+}
+
+// We only use this to report glyph dimensions to the user of the API, so using
+// the font instance key should be enough. If we start using it to cache dimensions
+// for internal font instances we should change the hash key accordingly.
+pub type GlyphDimensionsCache = FastHashMap<(FontInstanceKey, GlyphIndex), Option<GlyphDimensions>>;
+
+#[derive(Clone, Copy, Debug, PartialEq)]
+pub struct BlobImageRasterizerEpoch(usize);
+
+/// High-level container for resources managed by the `RenderBackend`.
+///
+/// This includes a variety of things, including images, fonts, and glyphs,
+/// which may be stored as memory buffers, GPU textures, or handles to resources
+/// managed by the OS or other parts of WebRender.
+pub struct ResourceCache {
+ cached_glyphs: GlyphCache,
+ cached_images: ImageCache,
+ cached_render_tasks: RenderTaskCache,
+
+ resources: Resources,
+ state: State,
+ current_frame_id: FrameId,
+
+ #[cfg(feature = "capture")]
+ /// Used for capture sequences. If the resource cache is updated, then we
+ /// mark it as dirty. When the next frame is captured in the sequence, we
+ /// dump the state of the resource cache.
+ capture_dirty: bool,
+
+ pub texture_cache: TextureCache,
+
+ /// TODO(gw): We should expire (parts of) this cache semi-regularly!
+ cached_glyph_dimensions: GlyphDimensionsCache,
+ glyph_rasterizer: GlyphRasterizer,
+
+ /// The set of images that aren't present or valid in the texture cache,
+ /// and need to be rasterized and/or uploaded this frame. This includes
+ /// both blobs and regular images.
+ pending_image_requests: FastHashSet<ImageRequest>,
+
+ rasterized_blob_images: FastHashMap<BlobImageKey, RasterizedBlob>,
+
+ /// A log of the last three frames worth of deleted image keys kept
+ /// for debugging purposes.
+ deleted_blob_keys: VecDeque<Vec<BlobImageKey>>,
+
+ /// A list of queued compositor surface updates to apply next frame.
+ pending_native_surface_updates: Vec<NativeSurfaceOperation>,
+}
+
+impl ResourceCache {
+ pub fn new(
+ texture_cache: TextureCache,
+ glyph_rasterizer: GlyphRasterizer,
+ cached_glyphs: GlyphCache,
+ font_instances: SharedFontInstanceMap,
+ ) -> Self {
+ ResourceCache {
+ cached_glyphs,
+ cached_images: ResourceClassCache::new(),
+ cached_render_tasks: RenderTaskCache::new(),
+ resources: Resources {
+ font_instances,
+ font_templates: FastHashMap::default(),
+ image_templates: ImageTemplates::default(),
+ },
+ cached_glyph_dimensions: FastHashMap::default(),
+ texture_cache,
+ state: State::Idle,
+ current_frame_id: FrameId::INVALID,
+ pending_image_requests: FastHashSet::default(),
+ glyph_rasterizer,
+ rasterized_blob_images: FastHashMap::default(),
+ // We want to keep three frames worth of delete blob keys
+ deleted_blob_keys: vec![Vec::new(), Vec::new(), Vec::new()].into(),
+ pending_native_surface_updates: Vec::new(),
+ #[cfg(feature = "capture")]
+ capture_dirty: true,
+ }
+ }
+
+ pub fn max_texture_size(&self) -> i32 {
+ self.texture_cache.max_texture_size()
+ }
+
+ pub fn enable_multithreading(&mut self, enable: bool) {
+ self.glyph_rasterizer.enable_multithreading(enable);
+ }
+
+ fn should_tile(limit: i32, descriptor: &ImageDescriptor, data: &CachedImageData) -> bool {
+ let size_check = descriptor.size.width > limit || descriptor.size.height > limit;
+ match *data {
+ CachedImageData::Raw(_) | CachedImageData::Blob => size_check,
+ CachedImageData::External(info) => {
+ // External handles already represent existing textures so it does
+ // not make sense to tile them into smaller ones.
+ info.image_type == ExternalImageType::Buffer && size_check
+ }
+ }
+ }
+
+ // Request the texture cache item for a cacheable render
+ // task. If the item is already cached, the texture cache
+ // handle will be returned. Otherwise, the user supplied
+ // closure will be invoked to generate the render task
+ // chain that is required to draw this task.
+ pub fn request_render_task<F>(
+ &mut self,
+ key: RenderTaskCacheKey,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &mut RenderTaskGraph,
+ user_data: Option<[f32; 3]>,
+ is_opaque: bool,
+ f: F,
+ ) -> RenderTaskCacheEntryHandle
+ where
+ F: FnOnce(&mut RenderTaskGraph) -> RenderTaskId,
+ {
+ self.cached_render_tasks.request_render_task(
+ key,
+ &mut self.texture_cache,
+ gpu_cache,
+ render_tasks,
+ user_data,
+ is_opaque,
+ |render_graph| Ok(f(render_graph))
+ ).expect("Failed to request a render task from the resource cache!")
+ }
+
+ pub fn post_scene_building_update(
+ &mut self,
+ updates: Vec<ResourceUpdate>,
+ profile_counters: &mut ResourceProfileCounters,
+ ) {
+ // TODO, there is potential for optimization here, by processing updates in
+ // bulk rather than one by one (for example by sorting allocations by size or
+ // in a way that reduces fragmentation in the atlas).
+ #[cfg(feature = "capture")]
+ match updates.is_empty() {
+ false => self.capture_dirty = true,
+ _ => {},
+ }
+
+ for update in updates {
+ match update {
+ ResourceUpdate::AddImage(img) => {
+ if let ImageData::Raw(ref bytes) = img.data {
+ profile_counters.image_templates.inc(bytes.len());
+ }
+ self.add_image_template(
+ img.key,
+ img.descriptor,
+ img.data.into(),
+ &img.descriptor.size.into(),
+ img.tiling,
+ );
+ }
+ ResourceUpdate::UpdateImage(img) => {
+ self.update_image_template(img.key, img.descriptor, img.data.into(), &img.dirty_rect);
+ }
+ ResourceUpdate::AddBlobImage(img) => {
+ self.add_image_template(
+ img.key.as_image(),
+ img.descriptor,
+ CachedImageData::Blob,
+ &img.visible_rect,
+ Some(img.tile_size),
+ );
+ }
+ ResourceUpdate::UpdateBlobImage(img) => {
+ self.update_image_template(
+ img.key.as_image(),
+ img.descriptor,
+ CachedImageData::Blob,
+ &to_image_dirty_rect(
+ &img.dirty_rect
+ ),
+ );
+ self.discard_tiles_outside_visible_area(img.key, &img.visible_rect); // TODO: remove?
+ self.set_image_visible_rect(img.key.as_image(), &img.visible_rect);
+ }
+ ResourceUpdate::DeleteImage(img) => {
+ self.delete_image_template(img);
+ }
+ ResourceUpdate::DeleteBlobImage(img) => {
+ self.delete_image_template(img.as_image());
+ }
+ ResourceUpdate::DeleteFont(font) => {
+ self.delete_font_template(font);
+ }
+ ResourceUpdate::DeleteFontInstance(font) => {
+ self.delete_font_instance(font);
+ }
+ ResourceUpdate::SetBlobImageVisibleArea(key, area) => {
+ self.discard_tiles_outside_visible_area(key, &area);
+ self.set_image_visible_rect(key.as_image(), &area);
+ }
+ ResourceUpdate::AddFont(font) => {
+ match font {
+ AddFont::Raw(id, bytes, index) => {
+ profile_counters.font_templates.inc(bytes.len());
+ self.add_font_template(id, FontTemplate::Raw(bytes, index));
+ }
+ AddFont::Native(id, native_font_handle) => {
+ self.add_font_template(id, FontTemplate::Native(native_font_handle));
+ }
+ }
+ }
+ ResourceUpdate::AddFontInstance(..) => {
+ // Already added in ApiResources.
+ }
+ }
+ }
+ }
+
+ pub fn add_rasterized_blob_images(
+ &mut self,
+ images: Vec<(BlobImageRequest, BlobImageResult)>,
+ texture_cache_profile: &mut TextureCacheProfileCounters,
+ ) {
+ for (request, result) in images {
+ let data = match result {
+ Ok(data) => data,
+ Err(..) => {
+ warn!("Failed to rasterize a blob image");
+ continue;
+ }
+ };
+
+ texture_cache_profile.rasterized_blob_pixels.inc(data.rasterized_rect.area() as usize);
+
+ // First make sure we have an entry for this key (using a placeholder
+ // if need be).
+ let tiles = self.rasterized_blob_images.entry(request.key).or_insert_with(
+ || { RasterizedBlob::default() }
+ );
+
+ tiles.insert(request.tile, data);
+
+ match self.cached_images.try_get_mut(&request.key.as_image()) {
+ Some(&mut ImageResult::Multi(ref mut entries)) => {
+ let cached_key = CachedImageKey {
+ rendering: ImageRendering::Auto, // TODO(nical)
+ tile: Some(request.tile),
+ };
+ if let Some(entry) = entries.try_get_mut(&cached_key) {
+ entry.dirty_rect = DirtyRect::All;
+ }
+ }
+ _ => {}
+ }
+ }
+ }
+
+ pub fn add_font_template(&mut self, font_key: FontKey, template: FontTemplate) {
+ // Push the new font to the font renderer, and also store
+ // it locally for glyph metric requests.
+ self.glyph_rasterizer.add_font(font_key, template.clone());
+ self.resources.font_templates.insert(font_key, template);
+ }
+
+ pub fn delete_font_template(&mut self, font_key: FontKey) {
+ self.glyph_rasterizer.delete_font(font_key);
+ self.resources.font_templates.remove(&font_key);
+ self.cached_glyphs
+ .clear_fonts(|font| font.font_key == font_key);
+ }
+
+ pub fn delete_font_instance(&mut self, instance_key: FontInstanceKey) {
+ self.resources.font_instances.delete_font_instance(instance_key);
+ }
+
+ pub fn get_font_instances(&self) -> SharedFontInstanceMap {
+ self.resources.font_instances.clone()
+ }
+
+ pub fn get_font_instance(&self, instance_key: FontInstanceKey) -> Option<Arc<BaseFontInstance>> {
+ self.resources.font_instances.get_font_instance(instance_key)
+ }
+
+ pub fn add_image_template(
+ &mut self,
+ image_key: ImageKey,
+ descriptor: ImageDescriptor,
+ data: CachedImageData,
+ visible_rect: &DeviceIntRect,
+ mut tiling: Option<TileSize>,
+ ) {
+ if tiling.is_none() && Self::should_tile(self.max_texture_size(), &descriptor, &data) {
+ // We aren't going to be able to upload a texture this big, so tile it, even
+ // if tiling was not requested.
+ tiling = Some(DEFAULT_TILE_SIZE);
+ }
+
+ let resource = ImageResource {
+ descriptor,
+ data,
+ tiling,
+ visible_rect: *visible_rect,
+ generation: ImageGeneration(0),
+ };
+
+ self.resources.image_templates.insert(image_key, resource);
+ }
+
+ pub fn update_image_template(
+ &mut self,
+ image_key: ImageKey,
+ descriptor: ImageDescriptor,
+ data: CachedImageData,
+ dirty_rect: &ImageDirtyRect,
+ ) {
+ let max_texture_size = self.max_texture_size();
+ let image = match self.resources.image_templates.get_mut(image_key) {
+ Some(res) => res,
+ None => panic!("Attempt to update non-existent image"),
+ };
+
+ let mut tiling = image.tiling;
+ if tiling.is_none() && Self::should_tile(max_texture_size, &descriptor, &data) {
+ tiling = Some(DEFAULT_TILE_SIZE);
+ }
+
+ // Each cache entry stores its own copy of the image's dirty rect. This allows them to be
+ // updated independently.
+ match self.cached_images.try_get_mut(&image_key) {
+ Some(&mut ImageResult::UntiledAuto(ref mut entry)) => {
+ entry.dirty_rect = entry.dirty_rect.union(dirty_rect);
+ }
+ Some(&mut ImageResult::Multi(ref mut entries)) => {
+ for (key, entry) in entries.iter_mut() {
+ // We want the dirty rect relative to the tile and not the whole image.
+ let local_dirty_rect = match (tiling, key.tile) {
+ (Some(tile_size), Some(tile)) => {
+ dirty_rect.map(|mut rect|{
+ let tile_offset = DeviceIntPoint::new(
+ tile.x as i32,
+ tile.y as i32,
+ ) * tile_size as i32;
+ rect.origin -= tile_offset.to_vector();
+
+ let tile_rect = compute_tile_size(
+ &descriptor.size.into(),
+ tile_size,
+ tile,
+ ).into();
+
+ rect.intersection(&tile_rect).unwrap_or_else(DeviceIntRect::zero)
+ })
+ }
+ (None, Some(..)) => DirtyRect::All,
+ _ => *dirty_rect,
+ };
+ entry.dirty_rect = entry.dirty_rect.union(&local_dirty_rect);
+ }
+ }
+ _ => {}
+ }
+
+ if image.descriptor.format != descriptor.format {
+ // could be a stronger warning/error?
+ trace!("Format change {:?} -> {:?}", image.descriptor.format, descriptor.format);
+ }
+ *image = ImageResource {
+ descriptor,
+ data,
+ tiling,
+ visible_rect: descriptor.size.into(),
+ generation: ImageGeneration(image.generation.0 + 1),
+ };
+ }
+
+ pub fn delete_image_template(&mut self, image_key: ImageKey) {
+ // Remove the template.
+ let value = self.resources.image_templates.remove(image_key);
+
+ // Release the corresponding texture cache entry, if any.
+ if let Some(mut cached) = self.cached_images.remove(&image_key) {
+ cached.drop_from_cache(&mut self.texture_cache);
+ }
+
+ match value {
+ Some(image) => if image.data.is_blob() {
+ let blob_key = BlobImageKey(image_key);
+ self.deleted_blob_keys.back_mut().unwrap().push(blob_key);
+ self.rasterized_blob_images.remove(&blob_key);
+ },
+ None => {
+ warn!("Delete the non-exist key");
+ debug!("key={:?}", image_key);
+ }
+ }
+ }
+
+ /// Return the current generation of an image template
+ pub fn get_image_generation(&self, key: ImageKey) -> ImageGeneration {
+ self.resources
+ .image_templates
+ .get(key)
+ .map_or(ImageGeneration::INVALID, |template| template.generation)
+ }
+
+ pub fn request_image(
+ &mut self,
+ request: ImageRequest,
+ gpu_cache: &mut GpuCache,
+ ) {
+ debug_assert_eq!(self.state, State::AddResources);
+
+ let template = match self.resources.image_templates.get(request.key) {
+ Some(template) => template,
+ None => {
+ warn!("ERROR: Trying to render deleted / non-existent key");
+ debug!("key={:?}", request.key);
+ return
+ }
+ };
+
+ // Images that don't use the texture cache can early out.
+ if !template.data.uses_texture_cache() {
+ return;
+ }
+
+ let side_size =
+ template.tiling.map_or(cmp::max(template.descriptor.size.width, template.descriptor.size.height),
+ |tile_size| tile_size as i32);
+ if side_size > self.texture_cache.max_texture_size() {
+ // The image or tiling size is too big for hardware texture size.
+ warn!("Dropping image, image:(w:{},h:{}, tile:{}) is too big for hardware!",
+ template.descriptor.size.width, template.descriptor.size.height, template.tiling.unwrap_or(0));
+ self.cached_images.insert(request.key, ImageResult::Err(ImageCacheError::OverLimitSize));
+ return;
+ }
+
+ let storage = match self.cached_images.entry(request.key) {
+ Occupied(e) => {
+ // We might have an existing untiled entry, and need to insert
+ // a second entry. In such cases we need to move the old entry
+ // out first, replacing it with a dummy entry, and then creating
+ // the tiled/multi-entry variant.
+ let entry = e.into_mut();
+ if !request.is_untiled_auto() {
+ let untiled_entry = match entry {
+ &mut ImageResult::UntiledAuto(ref mut entry) => {
+ Some(mem::replace(entry, CachedImageInfo {
+ texture_cache_handle: TextureCacheHandle::invalid(),
+ dirty_rect: DirtyRect::All,
+ manual_eviction: false,
+ }))
+ }
+ _ => None
+ };
+
+ if let Some(untiled_entry) = untiled_entry {
+ let mut entries = ResourceClassCache::new();
+ let untiled_key = CachedImageKey {
+ rendering: ImageRendering::Auto,
+ tile: None,
+ };
+ entries.insert(untiled_key, untiled_entry);
+ *entry = ImageResult::Multi(entries);
+ }
+ }
+ entry
+ }
+ Vacant(entry) => {
+ entry.insert(if request.is_untiled_auto() {
+ ImageResult::UntiledAuto(CachedImageInfo {
+ texture_cache_handle: TextureCacheHandle::invalid(),
+ dirty_rect: DirtyRect::All,
+ manual_eviction: false,
+ })
+ } else {
+ ImageResult::Multi(ResourceClassCache::new())
+ })
+ }
+ };
+
+ // If this image exists in the texture cache, *and* the dirty rect
+ // in the cache is empty, then it is valid to use as-is.
+ let entry = match *storage {
+ ImageResult::UntiledAuto(ref mut entry) => entry,
+ ImageResult::Multi(ref mut entries) => {
+ entries.entry(request.into())
+ .or_insert(CachedImageInfo {
+ texture_cache_handle: TextureCacheHandle::invalid(),
+ dirty_rect: DirtyRect::All,
+ manual_eviction: false,
+ })
+ },
+ ImageResult::Err(_) => panic!("Errors should already have been handled"),
+ };
+
+ let needs_upload = self.texture_cache.request(&entry.texture_cache_handle, gpu_cache);
+
+ if !needs_upload && entry.dirty_rect.is_empty() {
+ return
+ }
+
+ if !self.pending_image_requests.insert(request) {
+ return
+ }
+
+ if template.data.is_blob() {
+ let request: BlobImageRequest = request.into();
+ let missing = match self.rasterized_blob_images.get(&request.key) {
+ Some(tiles) => !tiles.contains_key(&request.tile),
+ _ => true,
+ };
+
+ assert!(!missing);
+ }
+ }
+
+ fn discard_tiles_outside_visible_area(
+ &mut self,
+ key: BlobImageKey,
+ area: &DeviceIntRect
+ ) {
+ let tile_size = match self.resources.image_templates.get(key.as_image()) {
+ Some(template) => template.tiling.unwrap(),
+ None => {
+ //println!("Missing image template (key={:?})!", key);
+ return;
+ }
+ };
+
+ let tiles = match self.rasterized_blob_images.get_mut(&key) {
+ Some(tiles) => tiles,
+ _ => { return; }
+ };
+
+ let tile_range = compute_tile_range(
+ &area,
+ tile_size,
+ );
+
+ tiles.retain(|tile, _| { tile_range.contains(*tile) });
+
+ let texture_cache = &mut self.texture_cache;
+ match self.cached_images.try_get_mut(&key.as_image()) {
+ Some(&mut ImageResult::Multi(ref mut entries)) => {
+ entries.retain(|key, entry| {
+ if key.tile.is_none() || tile_range.contains(key.tile.unwrap()) {
+ return true;
+ }
+ entry.mark_unused(texture_cache);
+ return false;
+ });
+ }
+ _ => {}
+ }
+ }
+
+ fn set_image_visible_rect(&mut self, key: ImageKey, rect: &DeviceIntRect) {
+ if let Some(image) = self.resources.image_templates.get_mut(key) {
+ image.visible_rect = *rect;
+ image.descriptor.size = rect.size;
+ }
+ }
+
+ pub fn request_glyphs(
+ &mut self,
+ mut font: FontInstance,
+ glyph_keys: &[GlyphKey],
+ gpu_cache: &mut GpuCache,
+ render_task_tree: &mut RenderTaskGraph,
+ ) {
+ debug_assert_eq!(self.state, State::AddResources);
+
+ self.glyph_rasterizer.prepare_font(&mut font);
+ self.glyph_rasterizer.request_glyphs(
+ &mut self.cached_glyphs,
+ font,
+ glyph_keys,
+ &mut self.texture_cache,
+ gpu_cache,
+ &mut self.cached_render_tasks,
+ render_task_tree,
+ );
+ }
+
+ pub fn pending_updates(&mut self) -> ResourceUpdateList {
+ ResourceUpdateList {
+ texture_updates: self.texture_cache.pending_updates(),
+ native_surface_updates: mem::replace(&mut self.pending_native_surface_updates, Vec::new()),
+ }
+ }
+
+ pub fn fetch_glyphs<F>(
+ &self,
+ mut font: FontInstance,
+ glyph_keys: &[GlyphKey],
+ fetch_buffer: &mut Vec<GlyphFetchResult>,
+ gpu_cache: &mut GpuCache,
+ mut f: F,
+ ) where
+ F: FnMut(TextureSource, GlyphFormat, &[GlyphFetchResult]),
+ {
+ debug_assert_eq!(self.state, State::QueryResources);
+
+ self.glyph_rasterizer.prepare_font(&mut font);
+ let glyph_key_cache = self.cached_glyphs.get_glyph_key_cache_for_font(&font);
+
+ let mut current_texture_id = TextureSource::Invalid;
+ let mut current_glyph_format = GlyphFormat::Subpixel;
+ debug_assert!(fetch_buffer.is_empty());
+
+ for (loop_index, key) in glyph_keys.iter().enumerate() {
+ let (cache_item, glyph_format) = match *glyph_key_cache.get(key) {
+ GlyphCacheEntry::Cached(ref glyph) => {
+ (self.texture_cache.get(&glyph.texture_cache_handle), glyph.format)
+ }
+ GlyphCacheEntry::Blank | GlyphCacheEntry::Pending => continue,
+ };
+ if current_texture_id != cache_item.texture_id ||
+ current_glyph_format != glyph_format {
+ if !fetch_buffer.is_empty() {
+ f(current_texture_id, current_glyph_format, fetch_buffer);
+ fetch_buffer.clear();
+ }
+ current_texture_id = cache_item.texture_id;
+ current_glyph_format = glyph_format;
+ }
+ fetch_buffer.push(GlyphFetchResult {
+ index_in_text_run: loop_index as i32,
+ uv_rect_address: gpu_cache.get_address(&cache_item.uv_rect_handle),
+ });
+ }
+
+ if !fetch_buffer.is_empty() {
+ f(current_texture_id, current_glyph_format, fetch_buffer);
+ fetch_buffer.clear();
+ }
+ }
+
+ pub fn get_glyph_dimensions(
+ &mut self,
+ font: &FontInstance,
+ glyph_index: GlyphIndex,
+ ) -> Option<GlyphDimensions> {
+ match self.cached_glyph_dimensions.entry((font.instance_key, glyph_index)) {
+ Occupied(entry) => *entry.get(),
+ Vacant(entry) => *entry.insert(
+ self.glyph_rasterizer
+ .get_glyph_dimensions(font, glyph_index),
+ ),
+ }
+ }
+
+ pub fn get_glyph_index(&mut self, font_key: FontKey, ch: char) -> Option<u32> {
+ self.glyph_rasterizer.get_glyph_index(font_key, ch)
+ }
+
+ #[inline]
+ pub fn get_cached_image(&self, request: ImageRequest) -> Result<CacheItem, ()> {
+ debug_assert_eq!(self.state, State::QueryResources);
+ let image_info = self.get_image_info(request)?;
+ Ok(self.get_texture_cache_item(&image_info.texture_cache_handle))
+ }
+
+ pub fn get_cached_render_task(
+ &self,
+ handle: &RenderTaskCacheEntryHandle,
+ ) -> &RenderTaskCacheEntry {
+ self.cached_render_tasks.get_cache_entry(handle)
+ }
+
+ #[inline]
+ fn get_image_info(&self, request: ImageRequest) -> Result<&CachedImageInfo, ()> {
+ // TODO(Jerry): add a debug option to visualize the corresponding area for
+ // the Err() case of CacheItem.
+ match *self.cached_images.get(&request.key) {
+ ImageResult::UntiledAuto(ref image_info) => Ok(image_info),
+ ImageResult::Multi(ref entries) => Ok(entries.get(&request.into())),
+ ImageResult::Err(_) => Err(()),
+ }
+ }
+
+ #[inline]
+ pub fn get_texture_cache_item(&self, handle: &TextureCacheHandle) -> CacheItem {
+ self.texture_cache.get(handle)
+ }
+
+ pub fn get_image_properties(&self, image_key: ImageKey) -> Option<ImageProperties> {
+ let image_template = &self.resources.image_templates.get(image_key);
+
+ image_template.map(|image_template| {
+ let external_image = match image_template.data {
+ CachedImageData::External(ext_image) => match ext_image.image_type {
+ ExternalImageType::TextureHandle(_) => Some(ext_image),
+ // external buffer uses resource_cache.
+ ExternalImageType::Buffer => None,
+ },
+ // raw and blob image are all using resource_cache.
+ CachedImageData::Raw(..) | CachedImageData::Blob => None,
+ };
+
+ ImageProperties {
+ descriptor: image_template.descriptor,
+ external_image,
+ tiling: image_template.tiling,
+ visible_rect: image_template.visible_rect,
+ }
+ })
+ }
+
+ pub fn begin_frame(&mut self, stamp: FrameStamp) {
+ profile_scope!("begin_frame");
+ debug_assert_eq!(self.state, State::Idle);
+ self.state = State::AddResources;
+ self.texture_cache.begin_frame(stamp);
+ self.cached_glyphs.begin_frame(
+ stamp,
+ &mut self.texture_cache,
+ &self.cached_render_tasks,
+ &mut self.glyph_rasterizer,
+ );
+ self.cached_render_tasks.begin_frame(&mut self.texture_cache);
+ self.current_frame_id = stamp.frame_id();
+
+ // pop the old frame and push a new one
+ self.deleted_blob_keys.pop_front();
+ self.deleted_blob_keys.push_back(Vec::new());
+ }
+
+ pub fn block_until_all_resources_added(
+ &mut self,
+ gpu_cache: &mut GpuCache,
+ render_tasks: &mut RenderTaskGraph,
+ texture_cache_profile: &mut TextureCacheProfileCounters,
+ ) {
+ profile_scope!("block_until_all_resources_added");
+
+ debug_assert_eq!(self.state, State::AddResources);
+ self.state = State::QueryResources;
+
+ self.glyph_rasterizer.resolve_glyphs(
+ &mut self.cached_glyphs,
+ &mut self.texture_cache,
+ gpu_cache,
+ &mut self.cached_render_tasks,
+ render_tasks,
+ texture_cache_profile,
+ );
+
+ // Apply any updates of new / updated images (incl. blobs) to the texture cache.
+ self.update_texture_cache(gpu_cache);
+ }
+
+ fn update_texture_cache(&mut self, gpu_cache: &mut GpuCache) {
+ profile_scope!("update_texture_cache");
+ for request in self.pending_image_requests.drain() {
+ let image_template = self.resources.image_templates.get_mut(request.key).unwrap();
+ debug_assert!(image_template.data.uses_texture_cache());
+
+ let mut updates: SmallVec<[(CachedImageData, Option<DeviceIntRect>); 1]> = SmallVec::new();
+
+ match image_template.data {
+ CachedImageData::Raw(..) | CachedImageData::External(..) => {
+ // Safe to clone here since the Raw image data is an
+ // Arc, and the external image data is small.
+ updates.push((image_template.data.clone(), None));
+ }
+ CachedImageData::Blob => {
+ let blob_image = self.rasterized_blob_images.get_mut(&BlobImageKey(request.key)).unwrap();
+ let img = &blob_image[&request.tile.unwrap()];
+ updates.push((
+ CachedImageData::Raw(Arc::clone(&img.data)),
+ Some(img.rasterized_rect)
+ ));
+ }
+ };
+
+ for (image_data, blob_rasterized_rect) in updates {
+ let entry = match *self.cached_images.get_mut(&request.key) {
+ ImageResult::UntiledAuto(ref mut entry) => entry,
+ ImageResult::Multi(ref mut entries) => entries.get_mut(&request.into()),
+ ImageResult::Err(_) => panic!("Update requested for invalid entry")
+ };
+
+ let mut descriptor = image_template.descriptor.clone();
+ let mut dirty_rect = entry.dirty_rect.replace_with_empty();
+
+ if let Some(tile) = request.tile {
+ let tile_size = image_template.tiling.unwrap();
+ let clipped_tile_size = compute_tile_size(&image_template.visible_rect, tile_size, tile);
+ // The tiled image could be stored on the CPU as one large image or be
+ // already broken up into tiles. This affects the way we compute the stride
+ // and offset.
+ let tiled_on_cpu = image_template.data.is_blob();
+ if !tiled_on_cpu {
+ // we don't expect to have partial tiles at the top and left of non-blob
+ // images.
+ debug_assert_eq!(image_template.visible_rect.origin, point2(0, 0));
+ let bpp = descriptor.format.bytes_per_pixel();
+ let stride = descriptor.compute_stride();
+ descriptor.stride = Some(stride);
+ descriptor.offset +=
+ tile.y as i32 * tile_size as i32 * stride +
+ tile.x as i32 * tile_size as i32 * bpp;
+ }
+
+ descriptor.size = clipped_tile_size;
+ }
+
+ // If we are uploading the dirty region of a blob image we might have several
+ // rects to upload so we use each of these rasterized rects rather than the
+ // overall dirty rect of the image.
+ if let Some(rect) = blob_rasterized_rect {
+ dirty_rect = DirtyRect::Partial(rect);
+ }
+
+ let filter = match request.rendering {
+ ImageRendering::Pixelated => {
+ TextureFilter::Nearest
+ }
+ ImageRendering::Auto | ImageRendering::CrispEdges => {
+ // If the texture uses linear filtering, enable mipmaps and
+ // trilinear filtering, for better image quality. We only
+ // support this for now on textures that are not placed
+ // into the shared cache. This accounts for any image
+ // that is > 512 in either dimension, so it should cover
+ // the most important use cases. We may want to support
+ // mip-maps on shared cache items in the future.
+ if descriptor.allow_mipmaps() &&
+ descriptor.size.width > 512 &&
+ descriptor.size.height > 512 &&
+ !self.texture_cache.is_allowed_in_shared_cache(
+ TextureFilter::Linear,
+ &descriptor,
+ ) {
+ TextureFilter::Trilinear
+ } else {
+ TextureFilter::Linear
+ }
+ }
+ };
+
+ let eviction = if image_template.data.is_blob() {
+ entry.manual_eviction = true;
+ Eviction::Manual
+ } else {
+ Eviction::Auto
+ };
+
+ //Note: at this point, the dirty rectangle is local to the descriptor space
+ self.texture_cache.update(
+ &mut entry.texture_cache_handle,
+ descriptor,
+ filter,
+ Some(image_data),
+ [0.0; 3],
+ dirty_rect,
+ gpu_cache,
+ None,
+ UvRectKind::Rect,
+ eviction,
+ );
+ }
+ }
+ }
+
+ /// Queue up allocation of a new OS native compositor surface with the
+ /// specified tile size.
+ pub fn create_compositor_surface(
+ &mut self,
+ virtual_offset: DeviceIntPoint,
+ tile_size: DeviceIntSize,
+ is_opaque: bool,
+ ) -> NativeSurfaceId {
+ let id = NativeSurfaceId(NEXT_NATIVE_SURFACE_ID.fetch_add(1, Ordering::Relaxed) as u64);
+
+ self.pending_native_surface_updates.push(
+ NativeSurfaceOperation {
+ details: NativeSurfaceOperationDetails::CreateSurface {
+ id,
+ virtual_offset,
+ tile_size,
+ is_opaque,
+ },
+ }
+ );
+
+ id
+ }
+
+ /// Queue up destruction of an existing native OS surface. This is used when
+ /// a picture cache surface is dropped or resized.
+ pub fn destroy_compositor_surface(
+ &mut self,
+ id: NativeSurfaceId,
+ ) {
+ self.pending_native_surface_updates.push(
+ NativeSurfaceOperation {
+ details: NativeSurfaceOperationDetails::DestroySurface {
+ id,
+ }
+ }
+ );
+ }
+
+ /// Queue construction of a native compositor tile on a given surface.
+ pub fn create_compositor_tile(
+ &mut self,
+ id: NativeTileId,
+ ) {
+ self.pending_native_surface_updates.push(
+ NativeSurfaceOperation {
+ details: NativeSurfaceOperationDetails::CreateTile {
+ id,
+ },
+ }
+ );
+ }
+
+ /// Queue destruction of a native compositor tile.
+ pub fn destroy_compositor_tile(
+ &mut self,
+ id: NativeTileId,
+ ) {
+ self.pending_native_surface_updates.push(
+ NativeSurfaceOperation {
+ details: NativeSurfaceOperationDetails::DestroyTile {
+ id,
+ },
+ }
+ );
+ }
+
+ pub fn end_frame(&mut self, texture_cache_profile: &mut TextureCacheProfileCounters) {
+ debug_assert_eq!(self.state, State::QueryResources);
+ profile_scope!("end_frame");
+ self.state = State::Idle;
+ self.texture_cache.end_frame(texture_cache_profile);
+ }
+
+ pub fn set_debug_flags(&mut self, flags: DebugFlags) {
+ GLYPH_FLASHING.store(flags.contains(DebugFlags::GLYPH_FLASHING), std::sync::atomic::Ordering::Relaxed);
+ self.texture_cache.set_debug_flags(flags);
+ }
+
+ pub fn clear(&mut self, what: ClearCache) {
+ if what.contains(ClearCache::IMAGES) {
+ for (_key, mut cached) in self.cached_images.resources.drain() {
+ cached.drop_from_cache(&mut self.texture_cache);
+ }
+ }
+ if what.contains(ClearCache::GLYPHS) {
+ self.cached_glyphs.clear();
+ }
+ if what.contains(ClearCache::GLYPH_DIMENSIONS) {
+ self.cached_glyph_dimensions.clear();
+ }
+ if what.contains(ClearCache::RENDER_TASKS) {
+ self.cached_render_tasks.clear();
+ }
+ if what.contains(ClearCache::TEXTURE_CACHE) {
+ self.texture_cache.clear_all();
+ }
+ }
+
+ pub fn clear_namespace(&mut self, namespace: IdNamespace) {
+ self.clear_images(|k| k.0 == namespace);
+
+ self.resources.font_instances.clear_namespace(namespace);
+
+ for &key in self.resources.font_templates.keys().filter(|key| key.0 == namespace) {
+ self.glyph_rasterizer.delete_font(key);
+ }
+ self.resources
+ .font_templates
+ .retain(|key, _| key.0 != namespace);
+ self.cached_glyphs
+ .clear_fonts(|font| font.font_key.0 == namespace);
+ }
+
+ /// Reports the CPU heap usage of this ResourceCache.
+ ///
+ /// NB: It would be much better to use the derive(MallocSizeOf) machinery
+ /// here, but the Arcs complicate things. The two ways to handle that would
+ /// be to either (a) Implement MallocSizeOf manually for the things that own
+ /// them and manually avoid double-counting, or (b) Use the "seen this pointer
+ /// yet" machinery from the proper malloc_size_of crate. We can do this if/when
+ /// more accurate memory reporting on these resources becomes a priority.
+ pub fn report_memory(&self, op: VoidPtrToSizeFn) -> MemoryReport {
+ let mut report = MemoryReport::default();
+
+ // Measure fonts. We only need the templates here, because the instances
+ // don't have big buffers.
+ for (_, font) in self.resources.font_templates.iter() {
+ if let FontTemplate::Raw(ref raw, _) = font {
+ report.fonts += unsafe { op(raw.as_ptr() as *const c_void) };
+ }
+ }
+
+ // Measure images.
+ for (_, image) in self.resources.image_templates.images.iter() {
+ report.images += match image.data {
+ CachedImageData::Raw(ref v) => unsafe { op(v.as_ptr() as *const c_void) },
+ CachedImageData::Blob | CachedImageData::External(..) => 0,
+ }
+ }
+
+ // Mesure rasterized blobs.
+ // TODO(gw): Temporarily disabled while we roll back a crash. We can re-enable
+ // these when that crash is fixed.
+ /*
+ for (_, image) in self.rasterized_blob_images.iter() {
+ let mut accumulate = |b: &RasterizedBlobImage| {
+ report.rasterized_blobs += unsafe { op(b.data.as_ptr() as *const c_void) };
+ };
+ match image {
+ RasterizedBlob::Tiled(map) => map.values().for_each(&mut accumulate),
+ RasterizedBlob::NonTiled(vec) => vec.iter().for_each(&mut accumulate),
+ };
+ }
+ */
+
+ report
+ }
+
+ /// Properly deletes all images matching the predicate.
+ fn clear_images<F: Fn(&ImageKey) -> bool>(&mut self, f: F) {
+ let keys = self.resources.image_templates.images.keys().filter(|k| f(*k))
+ .cloned().collect::<SmallVec<[ImageKey; 16]>>();
+
+ for key in keys {
+ self.delete_image_template(key);
+ }
+
+ #[cfg(features="leak_checks")]
+ let check_leaks = true;
+ #[cfg(not(features="leak_checks"))]
+ let check_leaks = false;
+
+ if check_leaks {
+ let blob_f = |key: &BlobImageKey| { f(&key.as_image()) };
+ assert!(!self.resources.image_templates.images.keys().any(&f));
+ assert!(!self.cached_images.resources.keys().any(&f));
+ assert!(!self.rasterized_blob_images.keys().any(&blob_f));
+ }
+ }
+}
+
+impl Drop for ResourceCache {
+ fn drop(&mut self) {
+ self.clear_images(|_| true);
+ }
+}
+
+#[cfg(any(feature = "capture", feature = "replay"))]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct PlainFontTemplate {
+ data: String,
+ index: u32,
+}
+
+#[cfg(any(feature = "capture", feature = "replay"))]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct PlainImageTemplate {
+ data: String,
+ descriptor: ImageDescriptor,
+ tiling: Option<TileSize>,
+ generation: ImageGeneration,
+}
+
+#[cfg(any(feature = "capture", feature = "replay"))]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct PlainResources {
+ font_templates: FastHashMap<FontKey, PlainFontTemplate>,
+ font_instances: HashMap<FontInstanceKey, Arc<BaseFontInstance>>,
+ image_templates: FastHashMap<ImageKey, PlainImageTemplate>,
+}
+
+#[cfg(feature = "capture")]
+#[derive(Serialize)]
+pub struct PlainCacheRef<'a> {
+ current_frame_id: FrameId,
+ glyphs: &'a GlyphCache,
+ glyph_dimensions: &'a GlyphDimensionsCache,
+ images: &'a ImageCache,
+ render_tasks: &'a RenderTaskCache,
+ textures: &'a TextureCache,
+}
+
+#[cfg(feature = "replay")]
+#[derive(Deserialize)]
+pub struct PlainCacheOwn {
+ current_frame_id: FrameId,
+ glyphs: GlyphCache,
+ glyph_dimensions: GlyphDimensionsCache,
+ images: ImageCache,
+ render_tasks: RenderTaskCache,
+ textures: TextureCache,
+}
+
+#[cfg(feature = "replay")]
+const NATIVE_FONT: &'static [u8] = include_bytes!("../res/Proggy.ttf");
+
+// This currently only casts the unit but will soon apply an offset
+fn to_image_dirty_rect(blob_dirty_rect: &BlobDirtyRect) -> ImageDirtyRect {
+ match *blob_dirty_rect {
+ DirtyRect::Partial(rect) => DirtyRect::Partial(
+ DeviceIntRect {
+ origin: DeviceIntPoint::new(rect.origin.x, rect.origin.y),
+ size: DeviceIntSize::new(rect.size.width, rect.size.height),
+ }
+ ),
+ DirtyRect::All => DirtyRect::All,
+ }
+}
+
+impl ResourceCache {
+ #[cfg(feature = "capture")]
+ pub fn save_capture(
+ &mut self, root: &PathBuf
+ ) -> (PlainResources, Vec<ExternalCaptureImage>) {
+ use std::fs;
+ use std::io::Write;
+
+ info!("saving resource cache");
+ let res = &self.resources;
+ let path_fonts = root.join("fonts");
+ if !path_fonts.is_dir() {
+ fs::create_dir(&path_fonts).unwrap();
+ }
+ let path_images = root.join("images");
+ if !path_images.is_dir() {
+ fs::create_dir(&path_images).unwrap();
+ }
+ let path_blobs = root.join("blobs");
+ if !path_blobs.is_dir() {
+ fs::create_dir(&path_blobs).unwrap();
+ }
+ let path_externals = root.join("externals");
+ if !path_externals.is_dir() {
+ fs::create_dir(&path_externals).unwrap();
+ }
+
+ info!("\tfont templates");
+ let mut font_paths = FastHashMap::default();
+ for template in res.font_templates.values() {
+ let data: &[u8] = match *template {
+ FontTemplate::Raw(ref arc, _) => arc,
+ FontTemplate::Native(_) => continue,
+ };
+ let font_id = res.font_templates.len() + 1;
+ let entry = match font_paths.entry(data.as_ptr()) {
+ Entry::Occupied(_) => continue,
+ Entry::Vacant(e) => e,
+ };
+ let file_name = format!("{}.raw", font_id);
+ let short_path = format!("fonts/{}", file_name);
+ fs::File::create(path_fonts.join(file_name))
+ .expect(&format!("Unable to create {}", short_path))
+ .write_all(data)
+ .unwrap();
+ entry.insert(short_path);
+ }
+
+ info!("\timage templates");
+ let mut image_paths = FastHashMap::default();
+ let mut other_paths = FastHashMap::default();
+ let mut num_blobs = 0;
+ let mut external_images = Vec::new();
+ for (&key, template) in res.image_templates.images.iter() {
+ let desc = &template.descriptor;
+ match template.data {
+ CachedImageData::Raw(ref arc) => {
+ let image_id = image_paths.len() + 1;
+ let entry = match image_paths.entry(arc.as_ptr()) {
+ Entry::Occupied(_) => continue,
+ Entry::Vacant(e) => e,
+ };
+
+ #[cfg(feature = "png")]
+ CaptureConfig::save_png(
+ root.join(format!("images/{}.png", image_id)),
+ desc.size,
+ desc.format,
+ desc.stride,
+ &arc,
+ );
+ let file_name = format!("{}.raw", image_id);
+ let short_path = format!("images/{}", file_name);
+ fs::File::create(path_images.join(file_name))
+ .expect(&format!("Unable to create {}", short_path))
+ .write_all(&*arc)
+ .unwrap();
+ entry.insert(short_path);
+ }
+ CachedImageData::Blob => {
+ warn!("Tiled blob images aren't supported yet");
+ let result = RasterizedBlobImage {
+ rasterized_rect: desc.size.into(),
+ data: Arc::new(vec![0; desc.compute_total_size() as usize])
+ };
+
+ assert_eq!(result.rasterized_rect.size, desc.size);
+ assert_eq!(result.data.len(), desc.compute_total_size() as usize);
+
+ num_blobs += 1;
+ #[cfg(feature = "png")]
+ CaptureConfig::save_png(
+ root.join(format!("blobs/{}.png", num_blobs)),
+ desc.size,
+ desc.format,
+ desc.stride,
+ &result.data,
+ );
+ let file_name = format!("{}.raw", num_blobs);
+ let short_path = format!("blobs/{}", file_name);
+ let full_path = path_blobs.clone().join(&file_name);
+ fs::File::create(full_path)
+ .expect(&format!("Unable to create {}", short_path))
+ .write_all(&result.data)
+ .unwrap();
+ other_paths.insert(key, short_path);
+ }
+ CachedImageData::External(ref ext) => {
+ let short_path = format!("externals/{}", external_images.len() + 1);
+ other_paths.insert(key, short_path.clone());
+ external_images.push(ExternalCaptureImage {
+ short_path,
+ descriptor: desc.clone(),
+ external: ext.clone(),
+ });
+ }
+ }
+ }
+
+ let resources = PlainResources {
+ font_templates: res.font_templates
+ .iter()
+ .map(|(key, template)| {
+ (*key, match *template {
+ FontTemplate::Raw(ref arc, index) => {
+ PlainFontTemplate {
+ data: font_paths[&arc.as_ptr()].clone(),
+ index,
+ }
+ }
+ #[cfg(not(target_os = "macos"))]
+ FontTemplate::Native(ref native) => {
+ PlainFontTemplate {
+ data: native.path.to_string_lossy().to_string(),
+ index: native.index,
+ }
+ }
+ #[cfg(target_os = "macos")]
+ FontTemplate::Native(ref native) => {
+ PlainFontTemplate {
+ data: native.0.postscript_name().to_string(),
+ index: 0,
+ }
+ }
+ })
+ })
+ .collect(),
+ font_instances: res.font_instances.clone_map(),
+ image_templates: res.image_templates.images
+ .iter()
+ .map(|(key, template)| {
+ (*key, PlainImageTemplate {
+ data: match template.data {
+ CachedImageData::Raw(ref arc) => image_paths[&arc.as_ptr()].clone(),
+ _ => other_paths[key].clone(),
+ },
+ descriptor: template.descriptor.clone(),
+ tiling: template.tiling,
+ generation: template.generation,
+ })
+ })
+ .collect(),
+ };
+
+ (resources, external_images)
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn save_caches(&self, _root: &PathBuf) -> PlainCacheRef {
+ PlainCacheRef {
+ current_frame_id: self.current_frame_id,
+ glyphs: &self.cached_glyphs,
+ glyph_dimensions: &self.cached_glyph_dimensions,
+ images: &self.cached_images,
+ render_tasks: &self.cached_render_tasks,
+ textures: &self.texture_cache,
+ }
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn load_capture(
+ &mut self,
+ resources: PlainResources,
+ caches: Option<PlainCacheOwn>,
+ config: &CaptureConfig,
+ ) -> Vec<PlainExternalImage> {
+ use std::{fs, path::Path};
+
+ info!("loading resource cache");
+ //TODO: instead of filling the local path to Arc<data> map as we process
+ // each of the resource types, we could go through all of the local paths
+ // and fill out the map as the first step.
+ let mut raw_map = FastHashMap::<String, Arc<Vec<u8>>>::default();
+
+ self.clear(ClearCache::all());
+ self.clear_images(|_| true);
+
+ match caches {
+ Some(cached) => {
+ self.current_frame_id = cached.current_frame_id;
+ self.cached_glyphs = cached.glyphs;
+ self.cached_glyph_dimensions = cached.glyph_dimensions;
+ self.cached_images = cached.images;
+ self.cached_render_tasks = cached.render_tasks;
+ self.texture_cache = cached.textures;
+ }
+ None => {
+ self.current_frame_id = FrameId::INVALID;
+ self.texture_cache = TextureCache::new(
+ self.texture_cache.max_texture_size(),
+ self.texture_cache.max_texture_layers(),
+ &self.texture_cache.picture_tile_sizes(),
+ DeviceIntSize::zero(),
+ self.texture_cache.color_formats(),
+ self.texture_cache.swizzle_settings(),
+ self.texture_cache.eviction_threshold_bytes(),
+ self.texture_cache.max_evictions_per_frame(),
+ );
+ }
+ }
+
+ self.glyph_rasterizer.reset();
+ let res = &mut self.resources;
+ res.font_templates.clear();
+ res.font_instances.set(resources.font_instances);
+ res.image_templates.images.clear();
+
+ info!("\tfont templates...");
+ let root = config.resource_root();
+ let native_font_replacement = Arc::new(NATIVE_FONT.to_vec());
+ for (key, plain_template) in resources.font_templates {
+ let arc = match raw_map.entry(plain_template.data) {
+ Entry::Occupied(e) => {
+ e.get().clone()
+ }
+ Entry::Vacant(e) => {
+ let file_path = if Path::new(e.key()).is_absolute() {
+ PathBuf::from(e.key())
+ } else {
+ root.join(e.key())
+ };
+ let arc = match fs::read(file_path) {
+ Ok(buffer) => Arc::new(buffer),
+ Err(err) => {
+ error!("Unable to open font template {:?}: {:?}", e.key(), err);
+ Arc::clone(&native_font_replacement)
+ }
+ };
+ e.insert(arc).clone()
+ }
+ };
+
+ let template = FontTemplate::Raw(arc, plain_template.index);
+ self.glyph_rasterizer.add_font(key, template.clone());
+ res.font_templates.insert(key, template);
+ }
+
+ info!("\timage templates...");
+ let mut external_images = Vec::new();
+ for (key, template) in resources.image_templates {
+ let data = match config.deserialize_for_resource::<PlainExternalImage, _>(&template.data) {
+ Some(plain) => {
+ let ext_data = plain.external;
+ external_images.push(plain);
+ CachedImageData::External(ext_data)
+ }
+ None => {
+ let arc = match raw_map.entry(template.data) {
+ Entry::Occupied(e) => {
+ e.get().clone()
+ }
+ Entry::Vacant(e) => {
+ let buffer = fs::read(root.join(e.key()))
+ .expect(&format!("Unable to open {}", e.key()));
+ e.insert(Arc::new(buffer))
+ .clone()
+ }
+ };
+ CachedImageData::Raw(arc)
+ }
+ };
+
+ res.image_templates.images.insert(key, ImageResource {
+ data,
+ descriptor: template.descriptor,
+ tiling: template.tiling,
+ visible_rect: template.descriptor.size.into(),
+ generation: template.generation,
+ });
+ }
+
+ external_images
+ }
+
+ #[cfg(feature = "capture")]
+ pub fn save_capture_sequence(&mut self, config: &mut CaptureConfig) -> Vec<ExternalCaptureImage> {
+ if self.capture_dirty {
+ self.capture_dirty = false;
+ config.prepare_resource();
+ let (resources, deferred) = self.save_capture(&config.resource_root());
+ config.serialize_for_resource(&resources, "plain-resources.ron");
+ deferred
+ } else {
+ Vec::new()
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/src/scene.rs b/third_party/webrender/webrender/src/scene.rs
new file mode 100644
index 00000000000..3caf68ab603
--- /dev/null
+++ b/third_party/webrender/webrender/src/scene.rs
@@ -0,0 +1,354 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{BuiltDisplayList, DisplayListWithCache, ColorF, DynamicProperties, Epoch, FontRenderMode};
+use api::{PipelineId, PropertyBinding, PropertyBindingId, PropertyValue, MixBlendMode, StackingContext};
+use api::MemoryReport;
+use api::units::*;
+use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
+use crate::composite::CompositorKind;
+use crate::clip::{ClipStore, ClipDataStore};
+use crate::spatial_tree::{SpatialTree, SpatialNodeIndex};
+use crate::frame_builder::{ChasePrimitive, FrameBuilderConfig};
+use crate::hit_test::{HitTester, HitTestingScene, HitTestingSceneStats};
+use crate::internal_types::{FastHashMap, FastHashSet};
+use crate::prim_store::{PrimitiveStore, PrimitiveStoreStats, PictureIndex};
+use std::sync::Arc;
+
+/// Stores a map of the animated property bindings for the current display list. These
+/// can be used to animate the transform and/or opacity of a display list without
+/// re-submitting the display list itself.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct SceneProperties {
+ transform_properties: FastHashMap<PropertyBindingId, LayoutTransform>,
+ float_properties: FastHashMap<PropertyBindingId, f32>,
+ color_properties: FastHashMap<PropertyBindingId, ColorF>,
+ current_properties: DynamicProperties,
+ pending_properties: Option<DynamicProperties>,
+}
+
+impl SceneProperties {
+ pub fn new() -> Self {
+ SceneProperties {
+ transform_properties: FastHashMap::default(),
+ float_properties: FastHashMap::default(),
+ color_properties: FastHashMap::default(),
+ current_properties: DynamicProperties::default(),
+ pending_properties: None,
+ }
+ }
+
+ /// Set the current property list for this display list.
+ pub fn set_properties(&mut self, properties: DynamicProperties) {
+ self.pending_properties = Some(properties);
+ }
+
+ /// Add to the current property list for this display list.
+ pub fn add_transforms(&mut self, transforms: Vec<PropertyValue<LayoutTransform>>) {
+ let mut pending_properties = self.pending_properties
+ .take()
+ .unwrap_or_default();
+
+ pending_properties.transforms.extend(transforms);
+
+ self.pending_properties = Some(pending_properties);
+ }
+
+ /// Flush any pending updates to the scene properties. Returns
+ /// true if the properties have changed since the last flush
+ /// was called. This code allows properties to be changed by
+ /// multiple set_properties and add_properties calls during a
+ /// single transaction, and still correctly determine if any
+ /// properties have changed. This can have significant power
+ /// saving implications, allowing a frame build to be skipped
+ /// if the properties haven't changed in many cases.
+ pub fn flush_pending_updates(&mut self) -> bool {
+ let mut properties_changed = false;
+
+ if let Some(ref pending_properties) = self.pending_properties {
+ if *pending_properties != self.current_properties {
+ self.transform_properties.clear();
+ self.float_properties.clear();
+
+ for property in &pending_properties.transforms {
+ self.transform_properties
+ .insert(property.key.id, property.value);
+ }
+
+ for property in &pending_properties.floats {
+ self.float_properties
+ .insert(property.key.id, property.value);
+ }
+
+ for property in &pending_properties.colors {
+ self.color_properties
+ .insert(property.key.id, property.value);
+ }
+
+ self.current_properties = pending_properties.clone();
+ properties_changed = true;
+ }
+ }
+
+ properties_changed
+ }
+
+ /// Get the current value for a transform property.
+ pub fn resolve_layout_transform(
+ &self,
+ property: &PropertyBinding<LayoutTransform>,
+ ) -> LayoutTransform {
+ match *property {
+ PropertyBinding::Value(value) => value,
+ PropertyBinding::Binding(ref key, v) => {
+ self.transform_properties
+ .get(&key.id)
+ .cloned()
+ .unwrap_or(v)
+ }
+ }
+ }
+
+ /// Get the current value for a float property.
+ pub fn resolve_float(
+ &self,
+ property: &PropertyBinding<f32>
+ ) -> f32 {
+ match *property {
+ PropertyBinding::Value(value) => value,
+ PropertyBinding::Binding(ref key, v) => {
+ self.float_properties
+ .get(&key.id)
+ .cloned()
+ .unwrap_or(v)
+ }
+ }
+ }
+
+ pub fn float_properties(&self) -> &FastHashMap<PropertyBindingId, f32> {
+ &self.float_properties
+ }
+
+ /// Get the current value for a color property.
+ pub fn resolve_color(
+ &self,
+ property: &PropertyBinding<ColorF>
+ ) -> ColorF {
+ match *property {
+ PropertyBinding::Value(value) => value,
+ PropertyBinding::Binding(ref key, v) => {
+ self.color_properties
+ .get(&key.id)
+ .cloned()
+ .unwrap_or(v)
+ }
+ }
+ }
+
+ pub fn color_properties(&self) -> &FastHashMap<PropertyBindingId, ColorF> {
+ &self.color_properties
+ }
+
+}
+
+/// A representation of the layout within the display port for a given document or iframe.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Clone)]
+pub struct ScenePipeline {
+ pub pipeline_id: PipelineId,
+ pub viewport_size: LayoutSize,
+ pub content_size: LayoutSize,
+ pub background_color: Option<ColorF>,
+ pub display_list: DisplayListWithCache,
+}
+
+/// A complete representation of the layout bundling visible pipelines together.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Clone)]
+pub struct Scene {
+ pub root_pipeline_id: Option<PipelineId>,
+ pub pipelines: FastHashMap<PipelineId, ScenePipeline>,
+ pub pipeline_epochs: FastHashMap<PipelineId, Epoch>,
+}
+
+impl Scene {
+ pub fn new() -> Self {
+ Scene {
+ root_pipeline_id: None,
+ pipelines: FastHashMap::default(),
+ pipeline_epochs: FastHashMap::default(),
+ }
+ }
+
+ pub fn set_root_pipeline_id(&mut self, pipeline_id: PipelineId) {
+ self.root_pipeline_id = Some(pipeline_id);
+ }
+
+ pub fn set_display_list(
+ &mut self,
+ pipeline_id: PipelineId,
+ epoch: Epoch,
+ display_list: BuiltDisplayList,
+ background_color: Option<ColorF>,
+ viewport_size: LayoutSize,
+ content_size: LayoutSize,
+ ) {
+ // Adds a cache to the given display list. If this pipeline already had
+ // a display list before, that display list is updated and used instead.
+ let display_list = match self.pipelines.remove(&pipeline_id) {
+ Some(mut pipeline) => {
+ pipeline.display_list.update(display_list);
+ pipeline.display_list
+ }
+ None => DisplayListWithCache::new_from_list(display_list)
+ };
+
+ let new_pipeline = ScenePipeline {
+ pipeline_id,
+ viewport_size,
+ content_size,
+ background_color,
+ display_list,
+ };
+
+ self.pipelines.insert(pipeline_id, new_pipeline);
+ self.pipeline_epochs.insert(pipeline_id, epoch);
+ }
+
+ pub fn remove_pipeline(&mut self, pipeline_id: PipelineId) {
+ if self.root_pipeline_id == Some(pipeline_id) {
+ self.root_pipeline_id = None;
+ }
+ self.pipelines.remove(&pipeline_id);
+ self.pipeline_epochs.remove(&pipeline_id);
+ }
+
+ pub fn update_epoch(&mut self, pipeline_id: PipelineId, epoch: Epoch) {
+ self.pipeline_epochs.insert(pipeline_id, epoch);
+ }
+
+ pub fn has_root_pipeline(&self) -> bool {
+ if let Some(ref root_id) = self.root_pipeline_id {
+ return self.pipelines.contains_key(root_id);
+ }
+
+ false
+ }
+
+ pub fn report_memory(
+ &self,
+ ops: &mut MallocSizeOfOps,
+ report: &mut MemoryReport
+ ) {
+ for (_, pipeline) in &self.pipelines {
+ report.display_list += pipeline.display_list.size_of(ops)
+ }
+ }
+}
+
+pub trait StackingContextHelpers {
+ fn mix_blend_mode_for_compositing(&self) -> Option<MixBlendMode>;
+}
+
+impl StackingContextHelpers for StackingContext {
+ fn mix_blend_mode_for_compositing(&self) -> Option<MixBlendMode> {
+ match self.mix_blend_mode {
+ MixBlendMode::Normal => None,
+ _ => Some(self.mix_blend_mode),
+ }
+ }
+}
+
+
+/// WebRender's internal representation of the scene.
+pub struct BuiltScene {
+ pub has_root_pipeline: bool,
+ pub pipeline_epochs: FastHashMap<PipelineId, Epoch>,
+ pub output_rect: DeviceIntRect,
+ pub background_color: Option<ColorF>,
+ pub root_pic_index: PictureIndex,
+ pub prim_store: PrimitiveStore,
+ pub clip_store: ClipStore,
+ pub config: FrameBuilderConfig,
+ pub spatial_tree: SpatialTree,
+ pub hit_testing_scene: Arc<HitTestingScene>,
+ pub content_slice_count: usize,
+ pub picture_cache_spatial_nodes: FastHashSet<SpatialNodeIndex>,
+}
+
+impl BuiltScene {
+ pub fn empty() -> Self {
+ BuiltScene {
+ has_root_pipeline: false,
+ pipeline_epochs: FastHashMap::default(),
+ output_rect: DeviceIntRect::zero(),
+ background_color: None,
+ root_pic_index: PictureIndex(0),
+ prim_store: PrimitiveStore::new(&PrimitiveStoreStats::empty()),
+ clip_store: ClipStore::new(),
+ spatial_tree: SpatialTree::new(),
+ hit_testing_scene: Arc::new(HitTestingScene::new(&HitTestingSceneStats::empty())),
+ content_slice_count: 0,
+ picture_cache_spatial_nodes: FastHashSet::default(),
+ config: FrameBuilderConfig {
+ default_font_render_mode: FontRenderMode::Mono,
+ dual_source_blending_is_enabled: true,
+ dual_source_blending_is_supported: false,
+ chase_primitive: ChasePrimitive::Nothing,
+ global_enable_picture_caching: false,
+ testing: false,
+ gpu_supports_fast_clears: false,
+ gpu_supports_advanced_blend: false,
+ advanced_blend_is_coherent: false,
+ batch_lookback_count: 0,
+ background_color: None,
+ compositor_kind: CompositorKind::default(),
+ tile_size_override: None,
+ max_depth_ids: 0,
+ max_target_size: 0,
+ },
+ }
+ }
+
+ /// Get the memory usage statistics to pre-allocate for the next scene.
+ pub fn get_stats(&self) -> SceneStats {
+ SceneStats {
+ prim_store_stats: self.prim_store.get_stats(),
+ hit_test_stats: self.hit_testing_scene.get_stats(),
+ }
+ }
+
+ pub fn create_hit_tester(
+ &mut self,
+ clip_data_store: &ClipDataStore,
+ ) -> HitTester {
+ HitTester::new(
+ Arc::clone(&self.hit_testing_scene),
+ &self.spatial_tree,
+ &self.clip_store,
+ clip_data_store,
+ )
+ }
+}
+
+/// Stores the allocation sizes of various arrays in the built
+/// scene. This is retrieved from the current frame builder
+/// and used to reserve an approximately correct capacity of
+/// the arrays for the next scene that is getting built.
+pub struct SceneStats {
+ pub prim_store_stats: PrimitiveStoreStats,
+ pub hit_test_stats: HitTestingSceneStats,
+}
+
+impl SceneStats {
+ pub fn empty() -> Self {
+ SceneStats {
+ prim_store_stats: PrimitiveStoreStats::empty(),
+ hit_test_stats: HitTestingSceneStats::empty(),
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/src/scene_builder_thread.rs b/third_party/webrender/webrender/src/scene_builder_thread.rs
new file mode 100644
index 00000000000..dd599f45f84
--- /dev/null
+++ b/third_party/webrender/webrender/src/scene_builder_thread.rs
@@ -0,0 +1,911 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{AsyncBlobImageRasterizer, BlobImageRequest, BlobImageResult};
+use api::{DocumentId, PipelineId, ApiMsg, FrameMsg, SceneMsg, ResourceUpdate, ExternalEvent};
+use api::{NotificationRequest, Checkpoint, IdNamespace, QualitySettings, TransactionMsg};
+use api::{ClipIntern, FilterDataIntern, MemoryReport, PrimitiveKeyKind, SharedFontInstanceMap};
+use api::{DocumentLayer, GlyphDimensionRequest, GlyphIndexRequest};
+use api::units::*;
+#[cfg(feature = "capture")]
+use crate::capture::CaptureConfig;
+use crate::frame_builder::FrameBuilderConfig;
+use crate::scene_building::SceneBuilder;
+use crate::intern::{Internable, Interner, UpdateList};
+use crate::internal_types::{FastHashMap, FastHashSet};
+use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
+use crate::prim_store::backdrop::Backdrop;
+use crate::prim_store::borders::{ImageBorder, NormalBorderPrim};
+use crate::prim_store::gradient::{LinearGradient, RadialGradient, ConicGradient};
+use crate::prim_store::image::{Image, YuvImage};
+use crate::prim_store::line_dec::LineDecoration;
+use crate::prim_store::picture::Picture;
+use crate::prim_store::text_run::TextRun;
+use crate::render_backend::SceneView;
+use crate::renderer::{PipelineInfo, SceneBuilderHooks};
+use crate::scene::{Scene, BuiltScene, SceneStats};
+use std::iter;
+use std::sync::mpsc::{channel, Receiver, Sender};
+use std::mem::replace;
+use time::precise_time_ns;
+use crate::util::drain_filter;
+use std::thread;
+use std::time::Duration;
+
+#[cfg(feature = "debugger")]
+use crate::debug_server;
+#[cfg(feature = "debugger")]
+use api::{BuiltDisplayListIter, DisplayItem};
+
+/// Various timing information that will be turned into
+/// TransactionProfileCounters later down the pipeline.
+#[derive(Clone, Debug)]
+pub struct TransactionTimings {
+ pub builder_start_time_ns: u64,
+ pub builder_end_time_ns: u64,
+ pub send_time_ns: u64,
+ pub scene_build_start_time_ns: u64,
+ pub scene_build_end_time_ns: u64,
+ pub blob_rasterization_end_time_ns: u64,
+ pub display_list_len: usize,
+}
+
+fn rasterize_blobs(txn: &mut TransactionMsg, is_low_priority: bool) {
+ profile_scope!("rasterize_blobs");
+
+ if let Some(ref mut rasterizer) = txn.blob_rasterizer {
+ let mut rasterized_blobs = rasterizer.rasterize(&txn.blob_requests, is_low_priority);
+ // try using the existing allocation if our current list is empty
+ if txn.rasterized_blobs.is_empty() {
+ txn.rasterized_blobs = rasterized_blobs;
+ } else {
+ txn.rasterized_blobs.append(&mut rasterized_blobs);
+ }
+ }
+}
+
+/// Represent the remaining work associated to a transaction after the scene building
+/// phase as well as the result of scene building itself if applicable.
+pub struct BuiltTransaction {
+ pub document_id: DocumentId,
+ pub built_scene: Option<BuiltScene>,
+ pub view: SceneView,
+ pub resource_updates: Vec<ResourceUpdate>,
+ pub rasterized_blobs: Vec<(BlobImageRequest, BlobImageResult)>,
+ pub blob_rasterizer: Option<Box<dyn AsyncBlobImageRasterizer>>,
+ pub frame_ops: Vec<FrameMsg>,
+ pub removed_pipelines: Vec<(PipelineId, DocumentId)>,
+ pub notifications: Vec<NotificationRequest>,
+ pub interner_updates: Option<InternerUpdates>,
+ pub scene_build_start_time: u64,
+ pub scene_build_end_time: u64,
+ pub render_frame: bool,
+ pub invalidate_rendered_frame: bool,
+ pub discard_frame_state_for_pipelines: Vec<PipelineId>,
+ pub timings: Option<TransactionTimings>,
+}
+
+#[cfg(feature = "replay")]
+pub struct LoadScene {
+ pub document_id: DocumentId,
+ pub scene: Scene,
+ pub font_instances: SharedFontInstanceMap,
+ pub view: SceneView,
+ pub config: FrameBuilderConfig,
+ pub build_frame: bool,
+ pub interners: Interners,
+}
+
+// Message to the scene builder thread.
+pub enum SceneBuilderRequest {
+ Transactions(Vec<Box<TransactionMsg>>),
+ ExternalEvent(ExternalEvent),
+ AddDocument(DocumentId, DeviceIntSize, DocumentLayer),
+ DeleteDocument(DocumentId),
+ GetGlyphDimensions(GlyphDimensionRequest),
+ GetGlyphIndices(GlyphIndexRequest),
+ WakeUp,
+ Stop,
+ Flush(Sender<()>),
+ ClearNamespace(IdNamespace),
+ SimulateLongSceneBuild(u32),
+ SimulateLongLowPrioritySceneBuild(u32),
+ /// Enqueue this to inform the scene builder to pick one message from
+ /// backend_rx.
+ BackendMessage,
+}
+
+/// Message from render backend to scene builder.
+pub enum BackendSceneBuilderRequest {
+ SetFrameBuilderConfig(FrameBuilderConfig),
+ ReportMemory(Box<MemoryReport>, Sender<Box<MemoryReport>>),
+ #[cfg(feature = "capture")]
+ SaveScene(CaptureConfig),
+ #[cfg(feature = "replay")]
+ LoadScenes(Vec<LoadScene>),
+ #[cfg(feature = "capture")]
+ StartCaptureSequence(CaptureConfig),
+ #[cfg(feature = "capture")]
+ StopCaptureSequence,
+ DocumentsForDebugger
+}
+
+// Message from scene builder to render backend.
+pub enum SceneBuilderResult {
+ Transactions(Vec<Box<BuiltTransaction>>, Option<Sender<SceneSwapResult>>),
+ #[cfg(feature = "capture")]
+ CapturedTransactions(Vec<Box<BuiltTransaction>>, CaptureConfig, Option<Sender<SceneSwapResult>>),
+ ExternalEvent(ExternalEvent),
+ FlushComplete(Sender<()>),
+ ClearNamespace(IdNamespace),
+ GetGlyphDimensions(GlyphDimensionRequest),
+ GetGlyphIndices(GlyphIndexRequest),
+ Stopped,
+ DocumentsForDebugger(String)
+}
+
+// Message from render backend to scene builder to indicate the
+// scene swap was completed. We need a separate channel for this
+// so that they don't get mixed with SceneBuilderRequest messages.
+pub enum SceneSwapResult {
+ Complete(Sender<()>),
+ Aborted,
+}
+
+macro_rules! declare_interners {
+ ( $( $name:ident : $ty:ident, )+ ) => {
+ /// This struct contains all items that can be shared between
+ /// display lists. We want to intern and share the same clips,
+ /// primitives and other things between display lists so that:
+ /// - GPU cache handles remain valid, reducing GPU cache updates.
+ /// - Comparison of primitives and pictures between two
+ /// display lists is (a) fast (b) done during scene building.
+ #[cfg_attr(feature = "capture", derive(Serialize))]
+ #[cfg_attr(feature = "replay", derive(Deserialize))]
+ #[derive(Default)]
+ pub struct Interners {
+ $(
+ pub $name: Interner<$ty>,
+ )+
+ }
+
+ $(
+ impl AsMut<Interner<$ty>> for Interners {
+ fn as_mut(&mut self) -> &mut Interner<$ty> {
+ &mut self.$name
+ }
+ }
+ )+
+
+ pub struct InternerUpdates {
+ $(
+ pub $name: UpdateList<<$ty as Internable>::Key>,
+ )+
+ }
+
+ impl Interners {
+ /// Reports CPU heap memory used by the interners.
+ fn report_memory(
+ &self,
+ ops: &mut MallocSizeOfOps,
+ r: &mut MemoryReport,
+ ) {
+ $(
+ r.interning.interners.$name += self.$name.size_of(ops);
+ )+
+ }
+
+ fn end_frame_and_get_pending_updates(&mut self) -> InternerUpdates {
+ InternerUpdates {
+ $(
+ $name: self.$name.end_frame_and_get_pending_updates(),
+ )+
+ }
+ }
+ }
+ }
+}
+
+enumerate_interners!(declare_interners);
+
+// A document in the scene builder contains the current scene,
+// as well as a persistent clip interner. This allows clips
+// to be de-duplicated, and persisted in the GPU cache between
+// display lists.
+struct Document {
+ scene: Scene,
+ interners: Interners,
+ stats: SceneStats,
+ view: SceneView,
+ /// A set of pipelines that the caller has requested be
+ /// made available as output textures.
+ output_pipelines: FastHashSet<PipelineId>,
+}
+
+impl Document {
+ fn new(device_rect: DeviceIntRect, layer: DocumentLayer, device_pixel_ratio: f32) -> Self {
+ Document {
+ scene: Scene::new(),
+ interners: Interners::default(),
+ stats: SceneStats::empty(),
+ output_pipelines: FastHashSet::default(),
+ view: SceneView {
+ device_rect,
+ layer,
+ device_pixel_ratio,
+ page_zoom_factor: 1.0,
+ quality_settings: QualitySettings::default(),
+ },
+ }
+ }
+}
+
+pub struct SceneBuilderThread {
+ documents: FastHashMap<DocumentId, Document>,
+ rx: Receiver<SceneBuilderRequest>,
+ backend_rx: Receiver<BackendSceneBuilderRequest>,
+ tx: Sender<SceneBuilderResult>,
+ api_tx: Sender<ApiMsg>,
+ config: FrameBuilderConfig,
+ default_device_pixel_ratio: f32,
+ font_instances: SharedFontInstanceMap,
+ size_of_ops: Option<MallocSizeOfOps>,
+ hooks: Option<Box<dyn SceneBuilderHooks + Send>>,
+ simulate_slow_ms: u32,
+ removed_pipelines: FastHashSet<PipelineId>,
+ #[cfg(feature = "capture")]
+ capture_config: Option<CaptureConfig>,
+}
+
+pub struct SceneBuilderThreadChannels {
+ rx: Receiver<SceneBuilderRequest>,
+ backend_rx: Receiver<BackendSceneBuilderRequest>,
+ tx: Sender<SceneBuilderResult>,
+ api_tx: Sender<ApiMsg>,
+}
+
+impl SceneBuilderThreadChannels {
+ pub fn new(
+ api_tx: Sender<ApiMsg>
+ ) -> (Self, Sender<SceneBuilderRequest>, Sender<BackendSceneBuilderRequest>, Receiver<SceneBuilderResult>) {
+ let (in_tx, in_rx) = channel();
+ let (out_tx, out_rx) = channel();
+ let (backend_tx, backend_rx) = channel();
+ (
+ Self {
+ rx: in_rx,
+ backend_rx,
+ tx: out_tx,
+ api_tx,
+ },
+ in_tx,
+ backend_tx,
+ out_rx,
+ )
+ }
+}
+
+impl SceneBuilderThread {
+ pub fn new(
+ config: FrameBuilderConfig,
+ default_device_pixel_ratio: f32,
+ font_instances: SharedFontInstanceMap,
+ size_of_ops: Option<MallocSizeOfOps>,
+ hooks: Option<Box<dyn SceneBuilderHooks + Send>>,
+ channels: SceneBuilderThreadChannels,
+ ) -> Self {
+ let SceneBuilderThreadChannels { rx, backend_rx, tx, api_tx } = channels;
+
+ Self {
+ documents: Default::default(),
+ rx,
+ backend_rx,
+ tx,
+ api_tx,
+ config,
+ default_device_pixel_ratio,
+ font_instances,
+ size_of_ops,
+ hooks,
+ simulate_slow_ms: 0,
+ removed_pipelines: FastHashSet::default(),
+ #[cfg(feature = "capture")]
+ capture_config: None,
+ }
+ }
+
+ /// Send a message to the render backend thread.
+ ///
+ /// We first put something in the result queue and then send a wake-up
+ /// message to the api queue that the render backend is blocking on.
+ pub fn send(&self, msg: SceneBuilderResult) {
+ self.tx.send(msg).unwrap();
+ let _ = self.api_tx.send(ApiMsg::WakeUp);
+ }
+
+ /// The scene builder thread's event loop.
+ pub fn run(&mut self) {
+ if let Some(ref hooks) = self.hooks {
+ hooks.register();
+ }
+
+ loop {
+ tracy_begin_frame!("scene_builder_thread");
+
+ match self.rx.recv() {
+ Ok(SceneBuilderRequest::WakeUp) => {}
+ Ok(SceneBuilderRequest::Flush(tx)) => {
+ self.send(SceneBuilderResult::FlushComplete(tx));
+ }
+ Ok(SceneBuilderRequest::Transactions(mut txns)) => {
+ let built_txns : Vec<Box<BuiltTransaction>> = txns.iter_mut()
+ .map(|txn| self.process_transaction(txn))
+ .collect();
+ #[cfg(feature = "capture")]
+ match built_txns.iter().any(|txn| txn.built_scene.is_some()) {
+ true => self.save_capture_sequence(),
+ _ => {},
+ }
+ self.forward_built_transactions(built_txns);
+ }
+ Ok(SceneBuilderRequest::AddDocument(document_id, initial_size, layer)) => {
+ let old = self.documents.insert(document_id, Document::new(
+ initial_size.into(),
+ layer,
+ self.default_device_pixel_ratio,
+ ));
+ debug_assert!(old.is_none());
+ }
+ Ok(SceneBuilderRequest::DeleteDocument(document_id)) => {
+ self.documents.remove(&document_id);
+ }
+ Ok(SceneBuilderRequest::ClearNamespace(id)) => {
+ self.documents.retain(|doc_id, _doc| doc_id.namespace_id != id);
+ self.send(SceneBuilderResult::ClearNamespace(id));
+ }
+ Ok(SceneBuilderRequest::ExternalEvent(evt)) => {
+ self.send(SceneBuilderResult::ExternalEvent(evt));
+ }
+ Ok(SceneBuilderRequest::GetGlyphDimensions(request)) => {
+ self.send(SceneBuilderResult::GetGlyphDimensions(request))
+ }
+ Ok(SceneBuilderRequest::GetGlyphIndices(request)) => {
+ self.send(SceneBuilderResult::GetGlyphIndices(request))
+ }
+ Ok(SceneBuilderRequest::Stop) => {
+ self.tx.send(SceneBuilderResult::Stopped).unwrap();
+ // We don't need to send a WakeUp to api_tx because we only
+ // get the Stop when the RenderBackend loop is exiting.
+ break;
+ }
+ Ok(SceneBuilderRequest::SimulateLongSceneBuild(time_ms)) => {
+ self.simulate_slow_ms = time_ms
+ }
+ Ok(SceneBuilderRequest::SimulateLongLowPrioritySceneBuild(_)) => {}
+ Ok(SceneBuilderRequest::BackendMessage) => {
+ let msg = self.backend_rx.try_recv().unwrap();
+ match msg {
+ BackendSceneBuilderRequest::ReportMemory(mut report, tx) => {
+ (*report) += self.report_memory();
+ tx.send(report).unwrap();
+ }
+ BackendSceneBuilderRequest::SetFrameBuilderConfig(cfg) => {
+ self.config = cfg;
+ }
+ #[cfg(feature = "replay")]
+ BackendSceneBuilderRequest::LoadScenes(msg) => {
+ self.load_scenes(msg);
+ }
+ #[cfg(feature = "capture")]
+ BackendSceneBuilderRequest::SaveScene(config) => {
+ self.save_scene(config);
+ }
+ #[cfg(feature = "capture")]
+ BackendSceneBuilderRequest::StartCaptureSequence(config) => {
+ self.start_capture_sequence(config);
+ }
+ #[cfg(feature = "capture")]
+ BackendSceneBuilderRequest::StopCaptureSequence => {
+ // FIXME(aosmond): clear config for frames and resource cache without scene
+ // rebuild?
+ self.capture_config = None;
+ }
+ BackendSceneBuilderRequest::DocumentsForDebugger => {
+ let json = self.get_docs_for_debugger();
+ self.send(SceneBuilderResult::DocumentsForDebugger(json));
+ }
+ }
+ }
+ Err(_) => {
+ break;
+ }
+ }
+
+ if let Some(ref hooks) = self.hooks {
+ hooks.poke();
+ }
+
+ tracy_end_frame!("scene_builder_thread");
+ }
+
+ if let Some(ref hooks) = self.hooks {
+ hooks.deregister();
+ }
+ }
+
+ #[cfg(feature = "capture")]
+ fn save_scene(&mut self, config: CaptureConfig) {
+ for (id, doc) in &self.documents {
+ let interners_name = format!("interners-{}-{}", id.namespace_id.0, id.id);
+ config.serialize_for_scene(&doc.interners, interners_name);
+
+ if config.bits.contains(api::CaptureBits::SCENE) {
+ let file_name = format!("scene-{}-{}", id.namespace_id.0, id.id);
+ config.serialize_for_scene(&doc.scene, file_name);
+ }
+ }
+ }
+
+ #[cfg(feature = "replay")]
+ fn load_scenes(&mut self, scenes: Vec<LoadScene>) {
+ for mut item in scenes {
+ self.config = item.config;
+
+ let scene_build_start_time = precise_time_ns();
+
+ let mut built_scene = None;
+ let mut interner_updates = None;
+
+ let output_pipelines = FastHashSet::default();
+
+ if item.scene.has_root_pipeline() {
+ built_scene = Some(SceneBuilder::build(
+ &item.scene,
+ item.font_instances,
+ &item.view,
+ &output_pipelines,
+ &self.config,
+ &mut item.interners,
+ &SceneStats::empty(),
+ ));
+
+ interner_updates = Some(
+ item.interners.end_frame_and_get_pending_updates()
+ );
+ }
+
+ self.documents.insert(
+ item.document_id,
+ Document {
+ scene: item.scene,
+ interners: item.interners,
+ stats: SceneStats::empty(),
+ view: item.view.clone(),
+ output_pipelines,
+ },
+ );
+
+ let txns = vec![Box::new(BuiltTransaction {
+ document_id: item.document_id,
+ render_frame: item.build_frame,
+ invalidate_rendered_frame: false,
+ built_scene,
+ view: item.view,
+ resource_updates: Vec::new(),
+ rasterized_blobs: Vec::new(),
+ blob_rasterizer: None,
+ frame_ops: Vec::new(),
+ removed_pipelines: Vec::new(),
+ discard_frame_state_for_pipelines: Vec::new(),
+ notifications: Vec::new(),
+ scene_build_start_time,
+ scene_build_end_time: precise_time_ns(),
+ interner_updates,
+ timings: None,
+ })];
+
+ self.forward_built_transactions(txns);
+ }
+ }
+
+ #[cfg(feature = "capture")]
+ fn save_capture_sequence(
+ &mut self,
+ ) {
+ if let Some(ref mut config) = self.capture_config {
+ config.prepare_scene();
+ for (id, doc) in &self.documents {
+ let interners_name = format!("interners-{}-{}", id.namespace_id.0, id.id);
+ config.serialize_for_scene(&doc.interners, interners_name);
+
+ if config.bits.contains(api::CaptureBits::SCENE) {
+ let file_name = format!("scene-{}-{}", id.namespace_id.0, id.id);
+ config.serialize_for_scene(&doc.scene, file_name);
+ }
+ }
+ }
+ }
+
+ #[cfg(feature = "capture")]
+ fn start_capture_sequence(
+ &mut self,
+ config: CaptureConfig,
+ ) {
+ self.capture_config = Some(config);
+ self.save_capture_sequence();
+ }
+
+ #[cfg(feature = "debugger")]
+ fn traverse_items<'a>(
+ &self,
+ traversal: &mut BuiltDisplayListIter<'a>,
+ node: &mut debug_server::TreeNode,
+ ) {
+ loop {
+ let subtraversal = {
+ let item = match traversal.next() {
+ Some(item) => item,
+ None => break,
+ };
+
+ match *item.item() {
+ display_item @ DisplayItem::PushStackingContext(..) => {
+ let mut subtraversal = item.sub_iter();
+ let mut child_node =
+ debug_server::TreeNode::new(&display_item.debug_name().to_string());
+ self.traverse_items(&mut subtraversal, &mut child_node);
+ node.add_child(child_node);
+ Some(subtraversal)
+ }
+ DisplayItem::PopStackingContext => {
+ return;
+ }
+ display_item => {
+ node.add_item(&display_item.debug_name().to_string());
+ None
+ }
+ }
+ };
+
+ // If flatten_item created a sub-traversal, we need `traversal` to have the
+ // same state as the completed subtraversal, so we reinitialize it here.
+ if let Some(subtraversal) = subtraversal {
+ *traversal = subtraversal;
+ }
+ }
+ }
+
+ #[cfg(not(feature = "debugger"))]
+ fn get_docs_for_debugger(&self) -> String {
+ String::new()
+ }
+
+ #[cfg(feature = "debugger")]
+ fn get_docs_for_debugger(&self) -> String {
+ let mut docs = debug_server::DocumentList::new();
+
+ for (_, doc) in &self.documents {
+ let mut debug_doc = debug_server::TreeNode::new("document");
+
+ for (_, pipeline) in &doc.scene.pipelines {
+ let mut debug_dl = debug_server::TreeNode::new("display-list");
+ self.traverse_items(&mut pipeline.display_list.iter(), &mut debug_dl);
+ debug_doc.add_child(debug_dl);
+ }
+
+ docs.add(debug_doc);
+ }
+
+ serde_json::to_string(&docs).unwrap()
+ }
+
+ /// Do the bulk of the work of the scene builder thread.
+ fn process_transaction(&mut self, txn: &mut TransactionMsg) -> Box<BuiltTransaction> {
+ profile_scope!("process_transaction");
+
+ if let Some(ref hooks) = self.hooks {
+ hooks.pre_scene_build();
+ }
+
+ let scene_build_start_time = precise_time_ns();
+
+ let doc = self.documents.get_mut(&txn.document_id).unwrap();
+ let scene = &mut doc.scene;
+
+ let mut timings = None;
+
+ let mut discard_frame_state_for_pipelines = Vec::new();
+ let mut removed_pipelines = Vec::new();
+ let mut rebuild_scene = false;
+ for message in txn.scene_ops.drain(..) {
+ match message {
+ SceneMsg::UpdateEpoch(pipeline_id, epoch) => {
+ scene.update_epoch(pipeline_id, epoch);
+ }
+ SceneMsg::SetPageZoom(factor) => {
+ doc.view.page_zoom_factor = factor.get();
+ }
+ SceneMsg::SetQualitySettings { settings } => {
+ doc.view.quality_settings = settings;
+ }
+ SceneMsg::SetDocumentView { device_rect, device_pixel_ratio } => {
+ doc.view.device_rect = device_rect;
+ doc.view.device_pixel_ratio = device_pixel_ratio;
+ }
+ SceneMsg::SetDisplayList {
+ epoch,
+ pipeline_id,
+ background,
+ viewport_size,
+ content_size,
+ display_list,
+ preserve_frame_state,
+ } => {
+ let display_list_len = display_list.data().len();
+
+ let (builder_start_time_ns, builder_end_time_ns, send_time_ns) =
+ display_list.times();
+
+ if self.removed_pipelines.contains(&pipeline_id) {
+ continue;
+ }
+
+ // Note: We could further reduce the amount of unnecessary scene
+ // building by keeping track of which pipelines are used by the
+ // scene (bug 1490751).
+ rebuild_scene = true;
+
+ scene.set_display_list(
+ pipeline_id,
+ epoch,
+ display_list,
+ background,
+ viewport_size,
+ content_size,
+ );
+
+ timings = Some(TransactionTimings {
+ builder_start_time_ns,
+ builder_end_time_ns,
+ send_time_ns,
+ scene_build_start_time_ns: 0,
+ scene_build_end_time_ns: 0,
+ blob_rasterization_end_time_ns: 0,
+ display_list_len,
+ });
+
+ if !preserve_frame_state {
+ discard_frame_state_for_pipelines.push(pipeline_id);
+ }
+ }
+ SceneMsg::SetRootPipeline(pipeline_id) => {
+ if scene.root_pipeline_id != Some(pipeline_id) {
+ rebuild_scene = true;
+ scene.set_root_pipeline_id(pipeline_id);
+ }
+ }
+ SceneMsg::RemovePipeline(pipeline_id) => {
+ scene.remove_pipeline(pipeline_id);
+ self.removed_pipelines.insert(pipeline_id);
+ removed_pipelines.push((pipeline_id, txn.document_id));
+ }
+ SceneMsg::EnableFrameOutput(pipeline_id, enable) => {
+ if enable {
+ doc.output_pipelines.insert(pipeline_id);
+ } else {
+ doc.output_pipelines.remove(&pipeline_id);
+ }
+ }
+ }
+ }
+
+ self.removed_pipelines.clear();
+
+ let mut built_scene = None;
+ let mut interner_updates = None;
+ if scene.has_root_pipeline() && rebuild_scene {
+
+ let built = SceneBuilder::build(
+ &scene,
+ self.font_instances.clone(),
+ &doc.view,
+ &doc.output_pipelines,
+ &self.config,
+ &mut doc.interners,
+ &doc.stats,
+ );
+
+ // Update the allocation stats for next scene
+ doc.stats = built.get_stats();
+
+ // Retrieve the list of updates from the clip interner.
+ interner_updates = Some(
+ doc.interners.end_frame_and_get_pending_updates()
+ );
+
+ built_scene = Some(built);
+ }
+
+ let scene_build_end_time = precise_time_ns();
+
+ let is_low_priority = false;
+ rasterize_blobs(txn, is_low_priority);
+
+ if let Some(timings) = timings.as_mut() {
+ timings.blob_rasterization_end_time_ns = precise_time_ns();
+ timings.scene_build_start_time_ns = scene_build_start_time;
+ timings.scene_build_end_time_ns = scene_build_end_time;
+ }
+
+ drain_filter(
+ &mut txn.notifications,
+ |n| { n.when() == Checkpoint::SceneBuilt },
+ |n| { n.notify(); },
+ );
+
+ if self.simulate_slow_ms > 0 {
+ thread::sleep(Duration::from_millis(self.simulate_slow_ms as u64));
+ }
+
+ Box::new(BuiltTransaction {
+ document_id: txn.document_id,
+ render_frame: txn.generate_frame,
+ invalidate_rendered_frame: txn.invalidate_rendered_frame,
+ built_scene,
+ view: doc.view,
+ rasterized_blobs: replace(&mut txn.rasterized_blobs, Vec::new()),
+ resource_updates: replace(&mut txn.resource_updates, Vec::new()),
+ blob_rasterizer: replace(&mut txn.blob_rasterizer, None),
+ frame_ops: replace(&mut txn.frame_ops, Vec::new()),
+ removed_pipelines,
+ discard_frame_state_for_pipelines,
+ notifications: replace(&mut txn.notifications, Vec::new()),
+ interner_updates,
+ scene_build_start_time,
+ scene_build_end_time,
+ timings,
+ })
+ }
+
+ /// Send the results of process_transaction back to the render backend.
+ fn forward_built_transactions(&mut self, txns: Vec<Box<BuiltTransaction>>) {
+ let (pipeline_info, result_tx, result_rx) = match self.hooks {
+ Some(ref hooks) => {
+ if txns.iter().any(|txn| txn.built_scene.is_some()) {
+ let info = PipelineInfo {
+ epochs: txns.iter()
+ .filter(|txn| txn.built_scene.is_some())
+ .map(|txn| {
+ txn.built_scene.as_ref().unwrap()
+ .pipeline_epochs.iter()
+ .zip(iter::repeat(txn.document_id))
+ .map(|((&pipeline_id, &epoch), document_id)| ((pipeline_id, document_id), epoch))
+ }).flatten().collect(),
+ removed_pipelines: txns.iter()
+ .map(|txn| txn.removed_pipelines.clone())
+ .flatten().collect(),
+ };
+
+ let (tx, rx) = channel();
+ let txn = txns.iter().find(|txn| txn.built_scene.is_some()).unwrap();
+ hooks.pre_scene_swap(txn.scene_build_end_time - txn.scene_build_start_time);
+
+ (Some(info), Some(tx), Some(rx))
+ } else {
+ (None, None, None)
+ }
+ }
+ _ => (None, None, None)
+ };
+
+ let scene_swap_start_time = precise_time_ns();
+ let document_ids = txns.iter().map(|txn| txn.document_id).collect();
+ let have_resources_updates : Vec<DocumentId> = if pipeline_info.is_none() {
+ txns.iter()
+ .filter(|txn| !txn.resource_updates.is_empty() || txn.invalidate_rendered_frame)
+ .map(|txn| txn.document_id)
+ .collect()
+ } else {
+ Vec::new()
+ };
+
+ #[cfg(feature = "capture")]
+ match self.capture_config {
+ Some(ref config) => self.tx.send(SceneBuilderResult::CapturedTransactions(txns, config.clone(), result_tx)).unwrap(),
+ None => self.tx.send(SceneBuilderResult::Transactions(txns, result_tx)).unwrap(),
+ }
+
+ #[cfg(not(feature = "capture"))]
+ self.tx.send(SceneBuilderResult::Transactions(txns, result_tx)).unwrap();
+
+ let _ = self.api_tx.send(ApiMsg::WakeUp);
+
+ if let Some(pipeline_info) = pipeline_info {
+ // Block until the swap is done, then invoke the hook.
+ let swap_result = result_rx.unwrap().recv();
+ let scene_swap_time = precise_time_ns() - scene_swap_start_time;
+ self.hooks.as_ref().unwrap().post_scene_swap(&document_ids,
+ pipeline_info, scene_swap_time);
+ // Once the hook is done, allow the RB thread to resume
+ if let Ok(SceneSwapResult::Complete(resume_tx)) = swap_result {
+ resume_tx.send(()).ok();
+ }
+ } else if !have_resources_updates.is_empty() {
+ if let Some(ref hooks) = self.hooks {
+ hooks.post_resource_update(&have_resources_updates);
+ }
+ } else if let Some(ref hooks) = self.hooks {
+ hooks.post_empty_scene_build();
+ }
+ }
+
+ /// Reports CPU heap memory used by the SceneBuilder.
+ fn report_memory(&mut self) -> MemoryReport {
+ let ops = self.size_of_ops.as_mut().unwrap();
+ let mut report = MemoryReport::default();
+ for doc in self.documents.values() {
+ doc.interners.report_memory(ops, &mut report);
+ doc.scene.report_memory(ops, &mut report);
+ }
+
+ report
+ }
+}
+
+/// A scene builder thread which executes expensive operations such as blob rasterization
+/// with a lower priority than the normal scene builder thread.
+///
+/// After rasterizing blobs, the secene building request is forwarded to the normal scene
+/// builder where the FrameBuilder is generated.
+pub struct LowPrioritySceneBuilderThread {
+ pub rx: Receiver<SceneBuilderRequest>,
+ pub tx: Sender<SceneBuilderRequest>,
+ pub simulate_slow_ms: u32,
+}
+
+impl LowPrioritySceneBuilderThread {
+ pub fn run(&mut self) {
+ loop {
+ match self.rx.recv() {
+ Ok(SceneBuilderRequest::Transactions(mut txns)) => {
+ let txns : Vec<Box<TransactionMsg>> = txns.drain(..)
+ .map(|txn| self.process_transaction(txn))
+ .collect();
+ self.tx.send(SceneBuilderRequest::Transactions(txns)).unwrap();
+ }
+ Ok(SceneBuilderRequest::AddDocument(id, size, layer)) => {
+ self.tx.send(SceneBuilderRequest::AddDocument(id, size, layer)).unwrap();
+ }
+ Ok(SceneBuilderRequest::DeleteDocument(document_id)) => {
+ self.tx.send(SceneBuilderRequest::DeleteDocument(document_id)).unwrap();
+ }
+ Ok(SceneBuilderRequest::Stop) => {
+ self.tx.send(SceneBuilderRequest::Stop).unwrap();
+ break;
+ }
+ Ok(SceneBuilderRequest::SimulateLongLowPrioritySceneBuild(time_ms)) => {
+ self.simulate_slow_ms = time_ms;
+ }
+ Ok(other) => {
+ self.tx.send(other).unwrap();
+ }
+ Err(_) => {
+ break;
+ }
+ }
+ }
+ }
+
+ fn process_transaction(&mut self, mut txn: Box<TransactionMsg>) -> Box<TransactionMsg> {
+ let is_low_priority = true;
+ rasterize_blobs(&mut txn, is_low_priority);
+ txn.blob_requests = Vec::new();
+
+ if self.simulate_slow_ms > 0 {
+ thread::sleep(Duration::from_millis(self.simulate_slow_ms as u64));
+ }
+
+ txn
+ }
+}
diff --git a/third_party/webrender/webrender/src/scene_building.rs b/third_party/webrender/webrender/src/scene_building.rs
new file mode 100644
index 00000000000..bfc466640bc
--- /dev/null
+++ b/third_party/webrender/webrender/src/scene_building.rs
@@ -0,0 +1,4090 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{AlphaType, BorderDetails, BorderDisplayItem, BuiltDisplayListIter, PrimitiveFlags};
+use api::{ClipId, ColorF, CommonItemProperties, ComplexClipRegion, ComponentTransferFuncType, RasterSpace};
+use api::{DisplayItem, DisplayItemRef, ExtendMode, ExternalScrollId, FilterData, SharedFontInstanceMap};
+use api::{FilterOp, FilterPrimitive, FontInstanceKey, FontSize, GlyphInstance, GlyphOptions, GradientStop};
+use api::{IframeDisplayItem, ImageKey, ImageRendering, ItemRange, ColorDepth, QualitySettings};
+use api::{LineOrientation, LineStyle, NinePatchBorderSource, PipelineId, MixBlendMode, StackingContextFlags};
+use api::{PropertyBinding, ReferenceFrame, ReferenceFrameKind, ScrollFrameDisplayItem, ScrollSensitivity};
+use api::{Shadow, SpaceAndClipInfo, SpatialId, StackingContext, StickyFrameDisplayItem, ImageMask};
+use api::{ClipMode, PrimitiveKeyKind, TransformStyle, YuvColorSpace, ColorRange, YuvData, TempFilterData};
+use api::image_tiling::simplify_repeated_primitive;
+use api::units::*;
+use crate::clip::{ClipChainId, ClipRegion, ClipItemKey, ClipStore, ClipItemKeyKind};
+use crate::clip::{ClipInternData, ClipNodeKind, ClipInstance};
+use crate::spatial_tree::{ROOT_SPATIAL_NODE_INDEX, SpatialTree, SpatialNodeIndex};
+use crate::frame_builder::{ChasePrimitive, FrameBuilderConfig};
+use crate::glyph_rasterizer::FontInstance;
+use crate::hit_test::{HitTestingItem, HitTestingScene};
+use crate::intern::Interner;
+use crate::internal_types::{FastHashMap, FastHashSet, LayoutPrimitiveInfo, Filter};
+use crate::picture::{Picture3DContext, PictureCompositeMode, PicturePrimitive, PictureOptions};
+use crate::picture::{BlitReason, OrderedPictureChild, PrimitiveList, TileCacheInstance, ClusterFlags};
+use crate::prim_store::PrimitiveInstance;
+use crate::prim_store::{PrimitiveInstanceKind, NinePatchDescriptor, PrimitiveStore};
+use crate::prim_store::{InternablePrimitive, SegmentInstanceIndex, PictureIndex};
+use crate::prim_store::{register_prim_chase_id, get_line_decoration_size};
+use crate::prim_store::{SpaceSnapper};
+use crate::prim_store::backdrop::Backdrop;
+use crate::prim_store::borders::{ImageBorder, NormalBorderPrim};
+use crate::prim_store::gradient::{GradientStopKey, LinearGradient, RadialGradient, RadialGradientParams, ConicGradient, ConicGradientParams};
+use crate::prim_store::image::{Image, YuvImage};
+use crate::prim_store::line_dec::{LineDecoration, LineDecorationCacheKey};
+use crate::prim_store::picture::{Picture, PictureCompositeKey, PictureKey};
+use crate::prim_store::text_run::TextRun;
+use crate::render_backend::SceneView;
+use crate::resource_cache::ImageRequest;
+use crate::scene::{Scene, BuiltScene, SceneStats, StackingContextHelpers};
+use crate::scene_builder_thread::Interners;
+use crate::spatial_node::{StickyFrameInfo, ScrollFrameKind};
+use euclid::approxeq::ApproxEq;
+use std::{f32, mem, usize, ops};
+use std::collections::vec_deque::VecDeque;
+use std::sync::Arc;
+use crate::util::{MaxRect, VecHelper};
+use crate::filterdata::{SFilterDataComponent, SFilterData, SFilterDataKey};
+use smallvec::SmallVec;
+
+/// The offset stack for a given reference frame.
+struct ReferenceFrameState {
+ /// A stack of current offsets from the current reference frame scope.
+ offsets: Vec<LayoutVector2D>,
+}
+
+/// Maps from stacking context layout coordinates into reference frame
+/// relative coordinates.
+struct ReferenceFrameMapper {
+ /// A stack of reference frame scopes.
+ frames: Vec<ReferenceFrameState>,
+}
+
+impl ReferenceFrameMapper {
+ fn new() -> Self {
+ ReferenceFrameMapper {
+ frames: vec![
+ ReferenceFrameState {
+ offsets: vec![
+ LayoutVector2D::zero(),
+ ],
+ }
+ ],
+ }
+ }
+
+ /// Push a new scope. This resets the current offset to zero, and is
+ /// used when a new reference frame or iframe is pushed.
+ fn push_scope(&mut self) {
+ self.frames.push(ReferenceFrameState {
+ offsets: vec![
+ LayoutVector2D::zero(),
+ ],
+ });
+ }
+
+ /// Pop a reference frame scope off the stack.
+ fn pop_scope(&mut self) {
+ self.frames.pop().unwrap();
+ }
+
+ /// Push a new offset for the current scope. This is used when
+ /// a new stacking context is pushed.
+ fn push_offset(&mut self, offset: LayoutVector2D) {
+ let frame = self.frames.last_mut().unwrap();
+ let current_offset = *frame.offsets.last().unwrap();
+ frame.offsets.push(current_offset + offset);
+ }
+
+ /// Pop a local stacking context offset from the current scope.
+ fn pop_offset(&mut self) {
+ let frame = self.frames.last_mut().unwrap();
+ frame.offsets.pop().unwrap();
+ }
+
+ /// Retrieve the current offset to allow converting a stacking context
+ /// relative coordinate to be relative to the owing reference frame.
+ /// TODO(gw): We could perhaps have separate coordinate spaces for this,
+ /// however that's going to either mean a lot of changes to
+ /// public API code, or a lot of changes to internal code.
+ /// Before doing that, we should revisit how Gecko would
+ /// prefer to provide coordinates.
+ /// TODO(gw): For now, this includes only the reference frame relative
+ /// offset. Soon, we will expand this to include the initial
+ /// scroll offsets that are now available on scroll nodes. This
+ /// will allow normalizing the coordinates even between display
+ /// lists where APZ has scrolled the content.
+ fn current_offset(&self) -> LayoutVector2D {
+ *self.frames.last().unwrap().offsets.last().unwrap()
+ }
+}
+
+/// Offsets primitives (and clips) by the external scroll offset
+/// supplied to scroll nodes.
+pub struct ScrollOffsetMapper {
+ pub current_spatial_node: SpatialNodeIndex,
+ pub current_offset: LayoutVector2D,
+}
+
+impl ScrollOffsetMapper {
+ fn new() -> Self {
+ ScrollOffsetMapper {
+ current_spatial_node: SpatialNodeIndex::INVALID,
+ current_offset: LayoutVector2D::zero(),
+ }
+ }
+
+ /// Return the accumulated external scroll offset for a spatial
+ /// node. This caches the last result, which is the common case,
+ /// or defers to the spatial tree to build the value.
+ fn external_scroll_offset(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ spatial_tree: &SpatialTree,
+ ) -> LayoutVector2D {
+ if spatial_node_index != self.current_spatial_node {
+ self.current_spatial_node = spatial_node_index;
+ self.current_offset = spatial_tree.external_scroll_offset(spatial_node_index);
+ }
+
+ self.current_offset
+ }
+}
+
+/// A data structure that keeps track of mapping between API Ids for spatials and the indices
+/// used internally in the SpatialTree to avoid having to do HashMap lookups for primitives
+/// and clips during frame building.
+#[derive(Default)]
+pub struct NodeIdToIndexMapper {
+ spatial_node_map: FastHashMap<SpatialId, SpatialNodeIndex>,
+}
+
+impl NodeIdToIndexMapper {
+ fn add_spatial_node(&mut self, id: SpatialId, index: SpatialNodeIndex) {
+ let _old_value = self.spatial_node_map.insert(id, index);
+ debug_assert!(_old_value.is_none());
+ }
+
+ fn get_spatial_node_index(&self, id: SpatialId) -> SpatialNodeIndex {
+ self.spatial_node_map[&id]
+ }
+}
+
+#[derive(Debug, Clone, Default)]
+pub struct CompositeOps {
+ // Requires only a single texture as input (e.g. most filters)
+ pub filters: Vec<Filter>,
+ pub filter_datas: Vec<FilterData>,
+ pub filter_primitives: Vec<FilterPrimitive>,
+
+ // Requires two source textures (e.g. mix-blend-mode)
+ pub mix_blend_mode: Option<MixBlendMode>,
+}
+
+impl CompositeOps {
+ pub fn new(
+ filters: Vec<Filter>,
+ filter_datas: Vec<FilterData>,
+ filter_primitives: Vec<FilterPrimitive>,
+ mix_blend_mode: Option<MixBlendMode>
+ ) -> Self {
+ CompositeOps {
+ filters,
+ filter_datas,
+ filter_primitives,
+ mix_blend_mode,
+ }
+ }
+
+ pub fn is_empty(&self) -> bool {
+ self.filters.is_empty() &&
+ self.filter_primitives.is_empty() &&
+ self.mix_blend_mode.is_none()
+ }
+}
+
+bitflags! {
+ /// Slice flags
+ pub struct SliceFlags : u8 {
+ /// Slice created by a cluster that has ClusterFlags::SCROLLBAR_CONTAINER
+ const IS_SCROLLBAR = 1;
+ }
+}
+
+/// Information about a set of primitive clusters that will form a picture cache slice.
+struct Slice {
+ /// The spatial node root of the picture cache. If this is None, the slice
+ /// will not be cached and instead drawn directly to the parent surface. This
+ /// is a temporary measure until we enable caching all slices.
+ cache_scroll_root: Option<SpatialNodeIndex>,
+ /// List of primitive clusters that make up this slice
+ prim_list: PrimitiveList,
+ /// A list of clips that are shared by all primitives in the slice. These can be
+ /// filtered out and applied when the tile cache is composited rather than per-item.
+ shared_clips: Option<Vec<ClipInstance>>,
+ /// Various flags describing properties of this slice
+ pub flags: SliceFlags,
+}
+
+/// A structure that converts a serialized display list into a form that WebRender
+/// can use to later build a frame. This structure produces a BuiltScene. Public
+/// members are typically those that are destructured into the BuiltScene.
+pub struct SceneBuilder<'a> {
+ /// The scene that we are currently building.
+ scene: &'a Scene,
+
+ /// The map of all font instances.
+ font_instances: SharedFontInstanceMap,
+
+ /// A set of pipelines that the caller has requested be made available as
+ /// output textures.
+ output_pipelines: &'a FastHashSet<PipelineId>,
+
+ /// The data structure that converts between ClipId/SpatialId and the various
+ /// index types that the SpatialTree uses.
+ id_to_index_mapper: NodeIdToIndexMapper,
+
+ /// A stack of stacking context properties.
+ sc_stack: Vec<FlattenedStackingContext>,
+
+ /// Maintains state for any currently active shadows
+ pending_shadow_items: VecDeque<ShadowItem>,
+
+ /// The SpatialTree that we are currently building during building.
+ pub spatial_tree: SpatialTree,
+
+ /// The store of primitives.
+ pub prim_store: PrimitiveStore,
+
+ /// Information about all primitives involved in hit testing.
+ pub hit_testing_scene: HitTestingScene,
+
+ /// The store which holds all complex clipping information.
+ pub clip_store: ClipStore,
+
+ /// The configuration to use for the FrameBuilder. We consult this in
+ /// order to determine the default font.
+ pub config: FrameBuilderConfig,
+
+ /// Reference to the set of data that is interned across display lists.
+ interners: &'a mut Interners,
+
+ /// The root picture index for this builder. This is the picture
+ /// to start the culling phase from.
+ pub root_pic_index: PictureIndex,
+
+ /// Helper struct to map stacking context coords <-> reference frame coords.
+ rf_mapper: ReferenceFrameMapper,
+
+ /// Helper struct to map spatial nodes to external scroll offsets.
+ external_scroll_mapper: ScrollOffsetMapper,
+
+ /// If true, picture caching setup has already been completed.
+ picture_caching_initialized: bool,
+
+ /// The current recursion depth of iframes encountered. Used to restrict picture
+ /// caching slices to only the top-level content frame.
+ iframe_depth: usize,
+
+ /// The number of picture cache slices that were created for content.
+ content_slice_count: usize,
+
+ /// A set of any spatial nodes that are attached to either a picture cache
+ /// root, or a clip node on the picture cache primitive. These are used
+ /// to detect cases where picture caching must be disabled. This is mostly
+ /// a temporary workaround for some existing wrench tests. I don't think
+ /// Gecko ever produces picture cache slices with complex transforms, so
+ /// in future we should prevent this in the public API and remove this hack.
+ picture_cache_spatial_nodes: FastHashSet<SpatialNodeIndex>,
+
+ /// The current quality / performance settings for this scene.
+ quality_settings: QualitySettings,
+}
+
+impl<'a> SceneBuilder<'a> {
+ pub fn build(
+ scene: &Scene,
+ font_instances: SharedFontInstanceMap,
+ view: &SceneView,
+ output_pipelines: &FastHashSet<PipelineId>,
+ frame_builder_config: &FrameBuilderConfig,
+ interners: &mut Interners,
+ stats: &SceneStats,
+ ) -> BuiltScene {
+ profile_scope!("build_scene");
+
+ // We checked that the root pipeline is available on the render backend.
+ let root_pipeline_id = scene.root_pipeline_id.unwrap();
+ let root_pipeline = scene.pipelines.get(&root_pipeline_id).unwrap();
+
+ let background_color = root_pipeline
+ .background_color
+ .and_then(|color| if color.a > 0.0 { Some(color) } else { None });
+
+ let mut builder = SceneBuilder {
+ scene,
+ spatial_tree: SpatialTree::new(),
+ font_instances,
+ config: *frame_builder_config,
+ output_pipelines,
+ id_to_index_mapper: NodeIdToIndexMapper::default(),
+ hit_testing_scene: HitTestingScene::new(&stats.hit_test_stats),
+ pending_shadow_items: VecDeque::new(),
+ sc_stack: Vec::new(),
+ prim_store: PrimitiveStore::new(&stats.prim_store_stats),
+ clip_store: ClipStore::new(),
+ interners,
+ root_pic_index: PictureIndex(0),
+ rf_mapper: ReferenceFrameMapper::new(),
+ external_scroll_mapper: ScrollOffsetMapper::new(),
+ picture_caching_initialized: false,
+ iframe_depth: 0,
+ content_slice_count: 0,
+ picture_cache_spatial_nodes: FastHashSet::default(),
+ quality_settings: view.quality_settings,
+ };
+
+ let device_pixel_scale = view.accumulated_scale_factor_for_snapping();
+
+ builder.clip_store.register_clip_template(
+ ClipId::root(root_pipeline_id),
+ ClipId::root(root_pipeline_id),
+ &[],
+ );
+
+ builder.clip_store.push_clip_root(
+ Some(ClipId::root(root_pipeline_id)),
+ false,
+ );
+
+ builder.push_root(
+ root_pipeline_id,
+ &root_pipeline.viewport_size,
+ &root_pipeline.content_size,
+ device_pixel_scale,
+ );
+
+ // In order to ensure we have a single root stacking context for the
+ // entire display list, we push one here. Gecko _almost_ wraps its
+ // entire display list within a single stacking context, but sometimes
+ // appends a few extra items in AddWindowOverlayWebRenderCommands. We
+ // could fix it there, but it's easier and more robust for WebRender
+ // to just ensure there's a context on the stack whenever we append
+ // primitives (since otherwise we'd panic).
+ //
+ // Note that we don't do this for iframes, even if they're pipeline
+ // roots, because they should be entirely contained within a stacking
+ // context, and we probably wouldn't crash if they weren't.
+ builder.push_stacking_context(
+ root_pipeline.pipeline_id,
+ CompositeOps::default(),
+ TransformStyle::Flat,
+ /* prim_flags = */ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ ROOT_SPATIAL_NODE_INDEX,
+ None,
+ RasterSpace::Screen,
+ StackingContextFlags::IS_BACKDROP_ROOT,
+ device_pixel_scale,
+ );
+
+ builder.build_items(
+ &mut root_pipeline.display_list.iter(),
+ root_pipeline.pipeline_id,
+ );
+
+ builder.pop_stacking_context();
+ builder.clip_store.pop_clip_root();
+
+ debug_assert!(builder.sc_stack.is_empty());
+
+ BuiltScene {
+ has_root_pipeline: scene.has_root_pipeline(),
+ pipeline_epochs: scene.pipeline_epochs.clone(),
+ output_rect: view.device_rect.size.into(),
+ background_color,
+ hit_testing_scene: Arc::new(builder.hit_testing_scene),
+ spatial_tree: builder.spatial_tree,
+ prim_store: builder.prim_store,
+ clip_store: builder.clip_store,
+ root_pic_index: builder.root_pic_index,
+ config: builder.config,
+ content_slice_count: builder.content_slice_count,
+ picture_cache_spatial_nodes: builder.picture_cache_spatial_nodes,
+ }
+ }
+
+ /// Retrieve the current offset to allow converting a stacking context
+ /// relative coordinate to be relative to the owing reference frame,
+ /// also considering any external scroll offset on the provided
+ /// spatial node.
+ fn current_offset(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ ) -> LayoutVector2D {
+ // Get the current offset from stacking context <-> reference frame space.
+ let rf_offset = self.rf_mapper.current_offset();
+
+ // Get the external scroll offset, if applicable.
+ let scroll_offset = self
+ .external_scroll_mapper
+ .external_scroll_offset(
+ spatial_node_index,
+ &self.spatial_tree,
+ );
+
+ rf_offset + scroll_offset
+ }
+
+ /// Figure out the shape of the display list, and wrap various primitive clusters
+ /// into tile cache primitive instances.
+ fn setup_picture_caching(
+ &mut self,
+ main_prim_list: &mut PrimitiveList,
+ ) {
+ if !self.config.global_enable_picture_caching {
+ return;
+ }
+
+ // Ensure that setup_picture_caching has executed
+ debug_assert!(self.picture_caching_initialized);
+
+ // Unconditionally insert a marker to create a picture cache slice on the
+ // first cluster. This handles implicit picture caches, and also the common
+ // case, by allowing the root / background primitives to be cached in a slice.
+ if let Some(cluster) = main_prim_list.clusters.first_mut() {
+ cluster.flags.insert(ClusterFlags::CREATE_PICTURE_CACHE_PRE);
+ }
+
+ // List of slices that have been found
+ let mut slices: Vec<Slice> = Vec::new();
+ // Tracker for whether a new slice should be created
+ let mut create_slice = true;
+ // The clips found the last time we traversed a set of clip chains. Stored and cleared
+ // here to avoid constant allocations.
+ let mut prim_clips = Vec::new();
+ // If true, the cache is out of date and needs to be rebuilt.
+ let mut update_shared_clips = true;
+ // The last prim clip chain we build prim_clips for.
+ let mut last_prim_clip_chain_id = ClipChainId::NONE;
+
+ // Walk the supplied top level of clusters, slicing into slices as appropriate
+ for cluster in main_prim_list.clusters.drain(..) {
+ // Check if this cluster requires a new slice
+ create_slice |= cluster.flags.intersects(
+ ClusterFlags::CREATE_PICTURE_CACHE_PRE | ClusterFlags::IS_CLEAR_PRIMITIVE
+ );
+
+ if create_slice {
+ let slice_flags = if cluster.flags.contains(ClusterFlags::SCROLLBAR_CONTAINER) {
+ SliceFlags::IS_SCROLLBAR
+ } else {
+ SliceFlags::empty()
+ };
+ let slice = Slice {
+ cache_scroll_root: cluster.cache_scroll_root,
+ prim_list: PrimitiveList::empty(),
+ shared_clips: None,
+ flags: slice_flags
+ };
+
+ // Open up clip chains on the stack on the new slice
+ slices.push(slice);
+ create_slice = false;
+ }
+
+ // Step through each prim instance, in order to collect shared clips for the slice.
+ for instance in &cluster.prim_instances {
+ // If the primitive clip chain is different, then we need to rebuild prim_clips.
+ update_shared_clips |= last_prim_clip_chain_id != instance.clip_chain_id;
+ last_prim_clip_chain_id = instance.clip_chain_id;
+
+ if update_shared_clips {
+ prim_clips.clear();
+ // Update the list of clips that apply to this primitive instance
+ add_clips(
+ instance.clip_chain_id,
+ &mut prim_clips,
+ &self.clip_store,
+ &self.interners,
+ );
+ }
+
+ // If there are no shared clips set for this slice, the shared clips are just
+ // the current clips set. Otherwise, the shared clips are those that are
+ // in both the current shared list and the clips list for this primitive.
+ match slices.last_mut().unwrap().shared_clips {
+ Some(ref mut shared_clips) => {
+ if update_shared_clips {
+ shared_clips.retain(|h1: &ClipInstance| {
+ let uid = h1.handle.uid();
+ prim_clips.iter().any(|h2| {
+ uid == h2.handle.uid() &&
+ h1.spatial_node_index == h2.spatial_node_index
+ })
+ });
+ }
+ }
+ ref mut shared_clips @ None => {
+ *shared_clips = Some(prim_clips.clone());
+ }
+ }
+
+ update_shared_clips = false;
+ }
+
+ // If this cluster creates a slice after, then note that for next cluster
+ create_slice |= cluster.flags.intersects(
+ ClusterFlags::CREATE_PICTURE_CACHE_POST | ClusterFlags::IS_CLEAR_PRIMITIVE
+ );
+
+ // Finally, add this cluster to the current slice
+ slices.last_mut().unwrap().prim_list.add_cluster(cluster);
+ }
+
+ // Step through the slices, creating picture cache wrapper instances.
+ for (slice_index, slice) in slices.drain(..).enumerate() {
+ let background_color = if slice_index == 0 {
+ self.config.background_color
+ } else {
+ None
+ };
+
+ // If the cluster specifies a scroll root, use it. Otherwise,
+ // just cache assuming no scrolling takes place. Even if that's
+ // not true, we still get caching benefits for any changes that
+ // occur while not scrolling (such as animation, video etc);
+ let scroll_root = slice.cache_scroll_root.unwrap_or(ROOT_SPATIAL_NODE_INDEX);
+
+ let instance = create_tile_cache(
+ slice_index,
+ slice.flags,
+ scroll_root,
+ slice.prim_list,
+ background_color,
+ slice.shared_clips.unwrap_or_else(Vec::new),
+ &mut self.interners,
+ &mut self.prim_store,
+ &mut self.clip_store,
+ &mut self.picture_cache_spatial_nodes,
+ &self.config,
+ );
+
+ main_prim_list.add_prim(
+ instance,
+ LayoutRect::zero(),
+ scroll_root,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+ }
+ }
+
+ fn build_items(
+ &mut self,
+ traversal: &mut BuiltDisplayListIter<'a>,
+ pipeline_id: PipelineId,
+ ) {
+ loop {
+ let item = match traversal.next() {
+ Some(item) => item,
+ None => break,
+ };
+
+ let subtraversal = match item.item() {
+ DisplayItem::PushStackingContext(ref info) => {
+ let space = self.get_space(info.spatial_id);
+ let mut subtraversal = item.sub_iter();
+ self.build_stacking_context(
+ &mut subtraversal,
+ pipeline_id,
+ &info.stacking_context,
+ space,
+ info.origin,
+ item.filters(),
+ &item.filter_datas(),
+ item.filter_primitives(),
+ info.prim_flags,
+ );
+ Some(subtraversal)
+ }
+ DisplayItem::PushReferenceFrame(ref info) => {
+ let parent_space = self.get_space(info.parent_spatial_id);
+ let mut subtraversal = item.sub_iter();
+ self.build_reference_frame(
+ &mut subtraversal,
+ pipeline_id,
+ parent_space,
+ info.origin,
+ &info.reference_frame,
+ );
+ Some(subtraversal)
+ }
+ DisplayItem::PopReferenceFrame |
+ DisplayItem::PopStackingContext => return,
+ _ => None,
+ };
+
+ // If build_item created a sub-traversal, we need `traversal` to have the
+ // same state as the completed subtraversal, so we reinitialize it here.
+ if let Some(mut subtraversal) = subtraversal {
+ subtraversal.merge_debug_stats_from(traversal);
+ *traversal = subtraversal;
+ } else {
+ self.build_item(item, pipeline_id);
+ }
+ }
+
+ // TODO: factor this out to be part of capture
+ if cfg!(feature = "display_list_stats") {
+ let stats = traversal.debug_stats();
+ let total_bytes: usize = stats.iter().map(|(_, stats)| stats.num_bytes).sum();
+ println!("item, total count, total bytes, % of DL bytes, bytes per item");
+ for (label, stats) in stats {
+ println!("{}, {}, {}kb, {}%, {}",
+ label,
+ stats.total_count,
+ stats.num_bytes / 1000,
+ ((stats.num_bytes as f32 / total_bytes.max(1) as f32) * 100.0) as usize,
+ stats.num_bytes / stats.total_count.max(1));
+ }
+ println!();
+ }
+ }
+
+ fn build_sticky_frame(
+ &mut self,
+ info: &StickyFrameDisplayItem,
+ parent_node_index: SpatialNodeIndex,
+ ) {
+ let current_offset = self.current_offset(parent_node_index);
+ let frame_rect = info.bounds.translate(current_offset);
+ let sticky_frame_info = StickyFrameInfo::new(
+ frame_rect,
+ info.margins,
+ info.vertical_offset_bounds,
+ info.horizontal_offset_bounds,
+ info.previously_applied_offset,
+ );
+
+ let index = self.spatial_tree.add_sticky_frame(
+ parent_node_index,
+ sticky_frame_info,
+ info.id.pipeline_id(),
+ );
+ self.id_to_index_mapper.add_spatial_node(info.id, index);
+ }
+
+ fn build_scroll_frame(
+ &mut self,
+ info: &ScrollFrameDisplayItem,
+ parent_node_index: SpatialNodeIndex,
+ pipeline_id: PipelineId,
+ ) {
+ let current_offset = self.current_offset(parent_node_index);
+ let clip_region = ClipRegion::create_for_clip_node_with_local_clip(
+ &info.clip_rect,
+ &current_offset,
+ );
+ // Just use clip rectangle as the frame rect for this scroll frame.
+ // This is useful when calculating scroll extents for the
+ // SpatialNode::scroll(..) API as well as for properly setting sticky
+ // positioning offsets.
+ let frame_rect = clip_region.main;
+ let content_size = info.content_rect.size;
+
+ self.add_clip_node(info.clip_id, &info.parent_space_and_clip, clip_region);
+
+ self.add_scroll_frame(
+ info.scroll_frame_id,
+ parent_node_index,
+ info.external_id,
+ pipeline_id,
+ &frame_rect,
+ &content_size,
+ info.scroll_sensitivity,
+ ScrollFrameKind::Explicit,
+ info.external_scroll_offset,
+ );
+ }
+
+ fn build_reference_frame(
+ &mut self,
+ traversal: &mut BuiltDisplayListIter<'a>,
+ pipeline_id: PipelineId,
+ parent_spatial_node: SpatialNodeIndex,
+ origin: LayoutPoint,
+ reference_frame: &ReferenceFrame,
+ ) {
+ profile_scope!("build_reference_frame");
+ let current_offset = self.current_offset(parent_spatial_node);
+ self.push_reference_frame(
+ reference_frame.id,
+ Some(parent_spatial_node),
+ pipeline_id,
+ reference_frame.transform_style,
+ reference_frame.transform,
+ reference_frame.kind,
+ current_offset + origin.to_vector(),
+ );
+
+ self.rf_mapper.push_scope();
+ self.build_items(
+ traversal,
+ pipeline_id,
+ );
+ self.rf_mapper.pop_scope();
+ }
+
+
+ fn build_stacking_context(
+ &mut self,
+ traversal: &mut BuiltDisplayListIter<'a>,
+ pipeline_id: PipelineId,
+ stacking_context: &StackingContext,
+ spatial_node_index: SpatialNodeIndex,
+ origin: LayoutPoint,
+ filters: ItemRange<FilterOp>,
+ filter_datas: &[TempFilterData],
+ filter_primitives: ItemRange<FilterPrimitive>,
+ prim_flags: PrimitiveFlags,
+ ) {
+ profile_scope!("build_stacking_context");
+ // Avoid doing unnecessary work for empty stacking contexts.
+ if traversal.current_stacking_context_empty() {
+ traversal.skip_current_stacking_context();
+ return;
+ }
+
+ let composition_operations = {
+ CompositeOps::new(
+ filter_ops_for_compositing(filters),
+ filter_datas_for_compositing(filter_datas),
+ filter_primitives_for_compositing(filter_primitives),
+ stacking_context.mix_blend_mode_for_compositing(),
+ )
+ };
+
+ self.push_stacking_context(
+ pipeline_id,
+ composition_operations,
+ stacking_context.transform_style,
+ prim_flags,
+ spatial_node_index,
+ stacking_context.clip_id,
+ stacking_context.raster_space,
+ stacking_context.flags,
+ self.sc_stack.last().unwrap().snap_to_device.device_pixel_scale,
+ );
+
+ self.rf_mapper.push_offset(origin.to_vector());
+ self.build_items(
+ traversal,
+ pipeline_id,
+ );
+ self.rf_mapper.pop_offset();
+
+ self.pop_stacking_context();
+ }
+
+ fn build_iframe(
+ &mut self,
+ info: &IframeDisplayItem,
+ spatial_node_index: SpatialNodeIndex,
+ ) {
+ let iframe_pipeline_id = info.pipeline_id;
+ let pipeline = match self.scene.pipelines.get(&iframe_pipeline_id) {
+ Some(pipeline) => pipeline,
+ None => {
+ debug_assert!(info.ignore_missing_pipeline);
+ return
+ },
+ };
+
+ let current_offset = self.current_offset(spatial_node_index);
+ self.add_clip_node(
+ ClipId::root(iframe_pipeline_id),
+ &info.space_and_clip,
+ ClipRegion::create_for_clip_node_with_local_clip(
+ &info.clip_rect,
+ &current_offset,
+ ),
+ );
+
+ self.clip_store.push_clip_root(
+ Some(ClipId::root(iframe_pipeline_id)),
+ true,
+ );
+
+ let snap_to_device = &mut self.sc_stack.last_mut().unwrap().snap_to_device;
+ snap_to_device.set_target_spatial_node(
+ spatial_node_index,
+ &self.spatial_tree,
+ );
+
+ let bounds = snap_to_device.snap_rect(
+ &info.bounds.translate(current_offset),
+ );
+
+ let content_size = snap_to_device.snap_size(&pipeline.content_size);
+
+ let spatial_node_index = self.push_reference_frame(
+ SpatialId::root_reference_frame(iframe_pipeline_id),
+ Some(spatial_node_index),
+ iframe_pipeline_id,
+ TransformStyle::Flat,
+ PropertyBinding::Value(LayoutTransform::identity()),
+ ReferenceFrameKind::Transform,
+ bounds.origin.to_vector(),
+ );
+
+ let iframe_rect = LayoutRect::new(LayoutPoint::zero(), bounds.size);
+ self.add_scroll_frame(
+ SpatialId::root_scroll_node(iframe_pipeline_id),
+ spatial_node_index,
+ Some(ExternalScrollId(0, iframe_pipeline_id)),
+ iframe_pipeline_id,
+ &iframe_rect,
+ &content_size,
+ ScrollSensitivity::ScriptAndInputEvents,
+ ScrollFrameKind::PipelineRoot,
+ LayoutVector2D::zero(),
+ );
+
+ self.rf_mapper.push_scope();
+ self.iframe_depth += 1;
+
+ self.build_items(
+ &mut pipeline.display_list.iter(),
+ pipeline.pipeline_id,
+ );
+ self.iframe_depth -= 1;
+ self.rf_mapper.pop_scope();
+
+ self.clip_store.pop_clip_root();
+ }
+
+ fn get_space(
+ &self,
+ spatial_id: SpatialId,
+ ) -> SpatialNodeIndex {
+ self.id_to_index_mapper.get_spatial_node_index(spatial_id)
+ }
+
+ fn get_clip_chain(
+ &mut self,
+ clip_id: ClipId,
+ ) -> ClipChainId {
+ self.clip_store.get_or_build_clip_chain_id(clip_id)
+ }
+
+ fn process_common_properties(
+ &mut self,
+ common: &CommonItemProperties,
+ bounds: Option<&LayoutRect>,
+ ) -> (LayoutPrimitiveInfo, LayoutRect, SpatialNodeIndex, ClipChainId) {
+ let spatial_node_index = self.get_space(common.spatial_id);
+ let clip_chain_id = self.get_clip_chain(common.clip_id);
+
+ let current_offset = self.current_offset(spatial_node_index);
+
+ let snap_to_device = &mut self.sc_stack.last_mut().unwrap().snap_to_device;
+ snap_to_device.set_target_spatial_node(
+ spatial_node_index,
+ &self.spatial_tree
+ );
+
+ let unsnapped_clip_rect = common.clip_rect.translate(current_offset);
+ let clip_rect = snap_to_device.snap_rect(&unsnapped_clip_rect);
+
+ let unsnapped_rect = bounds.map(|bounds| {
+ bounds.translate(current_offset)
+ });
+
+ // If no bounds rect is given, default to clip rect.
+ let rect = unsnapped_rect.map_or(clip_rect, |bounds| {
+ snap_to_device.snap_rect(&bounds)
+ });
+
+ let layout = LayoutPrimitiveInfo {
+ rect,
+ clip_rect,
+ flags: common.flags,
+ hit_info: common.hit_info,
+ };
+
+ (layout, unsnapped_rect.unwrap_or(unsnapped_clip_rect), spatial_node_index, clip_chain_id)
+ }
+
+ fn process_common_properties_with_bounds(
+ &mut self,
+ common: &CommonItemProperties,
+ bounds: &LayoutRect,
+ ) -> (LayoutPrimitiveInfo, LayoutRect, SpatialNodeIndex, ClipChainId) {
+ self.process_common_properties(
+ common,
+ Some(bounds),
+ )
+ }
+
+ pub fn snap_rect(
+ &mut self,
+ rect: &LayoutRect,
+ target_spatial_node: SpatialNodeIndex,
+ ) -> LayoutRect {
+ let snap_to_device = &mut self.sc_stack.last_mut().unwrap().snap_to_device;
+ snap_to_device.set_target_spatial_node(
+ target_spatial_node,
+ &self.spatial_tree
+ );
+ snap_to_device.snap_rect(rect)
+ }
+
+ fn build_item<'b>(
+ &'b mut self,
+ item: DisplayItemRef,
+ pipeline_id: PipelineId,
+ ) {
+ match *item.item() {
+ DisplayItem::Image(ref info) => {
+ let (layout, _, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.bounds,
+ );
+
+ self.add_image(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ layout.rect.size,
+ LayoutSize::zero(),
+ info.image_key,
+ info.image_rendering,
+ info.alpha_type,
+ info.color,
+ );
+ }
+ DisplayItem::RepeatingImage(ref info) => {
+ let (layout, unsnapped_rect, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.bounds,
+ );
+
+ let stretch_size = process_repeat_size(
+ &layout.rect,
+ &unsnapped_rect,
+ info.stretch_size,
+ );
+
+ self.add_image(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ stretch_size,
+ info.tile_spacing,
+ info.image_key,
+ info.image_rendering,
+ info.alpha_type,
+ info.color,
+ );
+ }
+ DisplayItem::YuvImage(ref info) => {
+ let (layout, _, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.bounds,
+ );
+
+ self.add_yuv_image(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ info.yuv_data,
+ info.color_depth,
+ info.color_space,
+ info.color_range,
+ info.image_rendering,
+ );
+ }
+ DisplayItem::Text(ref info) => {
+ // TODO(aosmond): Snapping text primitives does not make much sense, given the
+ // primitive bounds and clip are supposed to be conservative, not definitive.
+ // E.g. they should be able to grow and not impact the output. However there
+ // are subtle interactions between the primitive origin and the glyph offset
+ // which appear to be significant (presumably due to some sort of accumulated
+ // error throughout the layers). We should fix this at some point.
+ let (layout, _, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.bounds,
+ );
+
+ self.add_text(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ &info.font_key,
+ &info.color,
+ item.glyphs(),
+ info.glyph_options,
+ );
+ }
+ DisplayItem::Rectangle(ref info) => {
+ let (layout, _, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.bounds,
+ );
+
+ self.add_solid_rectangle(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ info.color,
+ );
+ }
+ DisplayItem::HitTest(ref info) => {
+ let (layout, _, spatial_node_index, clip_chain_id) = self.process_common_properties(
+ &info.common,
+ None,
+ );
+
+ self.add_solid_rectangle(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ PropertyBinding::Value(ColorF::TRANSPARENT),
+ );
+ }
+ DisplayItem::ClearRectangle(ref info) => {
+ let (layout, _, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.bounds,
+ );
+
+ self.add_clear_rectangle(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ );
+ }
+ DisplayItem::Line(ref info) => {
+ let (layout, _, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.area,
+ );
+
+ self.add_line(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ info.wavy_line_thickness,
+ info.orientation,
+ info.color,
+ info.style,
+ );
+ }
+ DisplayItem::Gradient(ref info) => {
+ let (layout, unsnapped_rect, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.bounds,
+ );
+
+ let tile_size = process_repeat_size(
+ &layout.rect,
+ &unsnapped_rect,
+ info.tile_size,
+ );
+
+ if let Some(prim_key_kind) = self.create_linear_gradient_prim(
+ &layout,
+ info.gradient.start_point,
+ info.gradient.end_point,
+ item.gradient_stops(),
+ info.gradient.extend_mode,
+ tile_size,
+ info.tile_spacing,
+ None,
+ ) {
+ self.add_nonshadowable_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ Vec::new(),
+ prim_key_kind,
+ );
+ }
+ }
+ DisplayItem::RadialGradient(ref info) => {
+ let (layout, unsnapped_rect, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.bounds,
+ );
+
+ let tile_size = process_repeat_size(
+ &layout.rect,
+ &unsnapped_rect,
+ info.tile_size,
+ );
+
+ let prim_key_kind = self.create_radial_gradient_prim(
+ &layout,
+ info.gradient.center,
+ info.gradient.start_offset * info.gradient.radius.width,
+ info.gradient.end_offset * info.gradient.radius.width,
+ info.gradient.radius.width / info.gradient.radius.height,
+ item.gradient_stops(),
+ info.gradient.extend_mode,
+ tile_size,
+ info.tile_spacing,
+ None,
+ );
+
+ self.add_nonshadowable_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ Vec::new(),
+ prim_key_kind,
+ );
+ }
+ DisplayItem::ConicGradient(ref info) => {
+ let (layout, unsnapped_rect, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.bounds,
+ );
+
+ let tile_size = process_repeat_size(
+ &layout.rect,
+ &unsnapped_rect,
+ info.tile_size,
+ );
+
+ let prim_key_kind = self.create_conic_gradient_prim(
+ &layout,
+ info.gradient.center,
+ info.gradient.angle,
+ info.gradient.start_offset,
+ info.gradient.end_offset,
+ item.gradient_stops(),
+ info.gradient.extend_mode,
+ tile_size,
+ info.tile_spacing,
+ None,
+ );
+
+ self.add_nonshadowable_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ Vec::new(),
+ prim_key_kind,
+ );
+ }
+ DisplayItem::BoxShadow(ref info) => {
+ let (layout, _, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.box_bounds,
+ );
+
+ self.add_box_shadow(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ &info.offset,
+ info.color,
+ info.blur_radius,
+ info.spread_radius,
+ info.border_radius,
+ info.clip_mode,
+ );
+ }
+ DisplayItem::Border(ref info) => {
+ let (layout, _, spatial_node_index, clip_chain_id) = self.process_common_properties_with_bounds(
+ &info.common,
+ &info.bounds,
+ );
+
+ self.add_border(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ info,
+ item.gradient_stops(),
+ );
+ }
+ DisplayItem::Iframe(ref info) => {
+ let space = self.get_space(info.space_and_clip.spatial_id);
+ self.build_iframe(
+ info,
+ space,
+ );
+ }
+ DisplayItem::ImageMaskClip(ref info) => {
+ let parent_space = self.get_space(info.parent_space_and_clip.spatial_id);
+ let current_offset = self.current_offset(parent_space);
+
+ let image_mask = ImageMask {
+ rect: info.image_mask.rect.translate(current_offset),
+ ..info.image_mask
+ };
+
+ self.add_image_mask_clip_node(
+ info.id,
+ &info.parent_space_and_clip,
+ &image_mask,
+ );
+ }
+ DisplayItem::RoundedRectClip(ref info) => {
+ let parent_space = self.get_space(info.parent_space_and_clip.spatial_id);
+ let current_offset = self.current_offset(parent_space);
+
+ self.add_rounded_rect_clip_node(
+ info.id,
+ &info.parent_space_and_clip,
+ &info.clip,
+ current_offset,
+ );
+ }
+ DisplayItem::RectClip(ref info) => {
+ let parent_space = self.get_space(info.parent_space_and_clip.spatial_id);
+ let current_offset = self.current_offset(parent_space);
+ let clip_rect = info.clip_rect.translate(current_offset);
+
+ self.add_rect_clip_node(
+ info.id,
+ &info.parent_space_and_clip,
+ &clip_rect,
+ );
+ }
+ DisplayItem::Clip(ref info) => {
+ let parent_space = self.get_space(info.parent_space_and_clip.spatial_id);
+ let current_offset = self.current_offset(parent_space);
+ let clip_region = ClipRegion::create_for_clip_node(
+ info.clip_rect,
+ item.complex_clip().iter(),
+ &current_offset,
+ );
+ self.add_clip_node(info.id, &info.parent_space_and_clip, clip_region);
+ }
+ DisplayItem::ClipChain(ref info) => {
+ let parent = info.parent.map_or(ClipId::root(pipeline_id), |id| ClipId::ClipChain(id));
+ let mut instances: SmallVec<[ClipInstance; 4]> = SmallVec::new();
+
+ for clip_item in item.clip_chain_items() {
+ let template = self.clip_store.get_template(clip_item);
+ instances.extend_from_slice(&template.instances);
+ }
+
+ self.clip_store.register_clip_template(
+ ClipId::ClipChain(info.id),
+ parent,
+ &instances,
+ );
+ },
+ DisplayItem::ScrollFrame(ref info) => {
+ let parent_space = self.get_space(info.parent_space_and_clip.spatial_id);
+ self.build_scroll_frame(
+ info,
+ parent_space,
+ pipeline_id,
+ );
+ }
+ DisplayItem::StickyFrame(ref info) => {
+ let parent_space = self.get_space(info.parent_spatial_id);
+ self.build_sticky_frame(
+ info,
+ parent_space,
+ );
+ }
+ DisplayItem::BackdropFilter(ref info) => {
+ let (layout, _, spatial_node_index, clip_chain_id) = self.process_common_properties(
+ &info.common,
+ None,
+ );
+
+ let filters = filter_ops_for_compositing(item.filters());
+ let filter_datas = filter_datas_for_compositing(item.filter_datas());
+ let filter_primitives = filter_primitives_for_compositing(item.filter_primitives());
+
+ self.add_backdrop_filter(
+ spatial_node_index,
+ clip_chain_id,
+ &layout,
+ filters,
+ filter_datas,
+ filter_primitives,
+ );
+ }
+
+ // Do nothing; these are dummy items for the display list parser
+ DisplayItem::SetGradientStops |
+ DisplayItem::SetFilterOps |
+ DisplayItem::SetFilterData |
+ DisplayItem::SetFilterPrimitives => {}
+
+ // Special items that are handled in the parent method
+ DisplayItem::PushStackingContext(..) |
+ DisplayItem::PushReferenceFrame(..) |
+ DisplayItem::PopReferenceFrame |
+ DisplayItem::PopStackingContext => {
+ unreachable!("Should have returned in parent method.")
+ }
+
+ DisplayItem::ReuseItems(key) |
+ DisplayItem::RetainedItems(key) => {
+ unreachable!("Iterator logic error: {:?}", key);
+ }
+
+ DisplayItem::PushShadow(info) => {
+ let spatial_node_index = self.get_space(info.space_and_clip.spatial_id);
+ let clip_chain_id = self.get_clip_chain(
+ info.space_and_clip.clip_id,
+ );
+
+ self.push_shadow(
+ info.shadow,
+ spatial_node_index,
+ clip_chain_id,
+ info.should_inflate,
+ );
+ }
+ DisplayItem::PopAllShadows => {
+ self.pop_all_shadows();
+ }
+ }
+ }
+
+ // Given a list of clip sources, a positioning node and
+ // a parent clip chain, return a new clip chain entry.
+ // If the supplied list of clip sources is empty, then
+ // just return the parent clip chain id directly.
+ fn build_clip_chain(
+ &mut self,
+ clip_items: Vec<ClipItemKey>,
+ spatial_node_index: SpatialNodeIndex,
+ parent_clip_chain_id: ClipChainId,
+ ) -> ClipChainId {
+ if clip_items.is_empty() {
+ parent_clip_chain_id
+ } else {
+ let mut clip_chain_id = parent_clip_chain_id;
+
+ for item in clip_items {
+ // Intern this clip item, and store the handle
+ // in the clip chain node.
+ let handle = self.interners
+ .clip
+ .intern(&item, || {
+ ClipInternData {
+ clip_node_kind: item.kind.node_kind(),
+ }
+ });
+
+ clip_chain_id = self.clip_store.add_clip_chain_node(
+ handle,
+ spatial_node_index,
+ clip_chain_id,
+ );
+ }
+
+ clip_chain_id
+ }
+ }
+
+ /// Create a primitive and add it to the prim store. This method doesn't
+ /// add the primitive to the draw list, so can be used for creating
+ /// sub-primitives.
+ ///
+ /// TODO(djg): Can this inline into `add_interned_prim_to_draw_list`
+ fn create_primitive<P>(
+ &mut self,
+ info: &LayoutPrimitiveInfo,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ prim: P,
+ ) -> PrimitiveInstance
+ where
+ P: InternablePrimitive,
+ Interners: AsMut<Interner<P>>,
+ {
+ // Build a primitive key.
+ let prim_key = prim.into_key(info);
+
+ let current_offset = self.current_offset(spatial_node_index);
+ let interner = self.interners.as_mut();
+ let prim_data_handle = interner
+ .intern(&prim_key, || ());
+
+ let instance_kind = P::make_instance_kind(
+ prim_key,
+ prim_data_handle,
+ &mut self.prim_store,
+ current_offset,
+ );
+
+ PrimitiveInstance::new(
+ info.clip_rect,
+ instance_kind,
+ clip_chain_id,
+ )
+ }
+
+ pub fn add_primitive_to_hit_testing_list(
+ &mut self,
+ info: &LayoutPrimitiveInfo,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ ) {
+ let tag = match info.hit_info {
+ Some(tag) => tag,
+ None => return,
+ };
+
+ // We want to get a range of clip chain roots that apply to this
+ // hit testing primitive.
+
+ // Get the start index for the clip chain root range for this primitive.
+ let start = self.hit_testing_scene.next_clip_chain_index();
+
+ // Add the clip chain root for the primitive itself.
+ self.hit_testing_scene.add_clip_chain(clip_chain_id);
+
+ // Append any clip chain roots from enclosing stacking contexts.
+ for sc in &self.sc_stack {
+ self.hit_testing_scene.add_clip_chain(sc.clip_chain_id);
+ }
+
+ // Construct a clip chain roots range to be stored with the item.
+ let clip_chain_range = ops::Range {
+ start,
+ end: self.hit_testing_scene.next_clip_chain_index(),
+ };
+
+ // Create and store the hit testing primitive itself.
+ let new_item = HitTestingItem::new(
+ tag,
+ info,
+ spatial_node_index,
+ clip_chain_range,
+ );
+ self.hit_testing_scene.add_item(new_item);
+ }
+
+ /// Add an already created primitive to the draw lists.
+ pub fn add_primitive_to_draw_list(
+ &mut self,
+ prim_instance: PrimitiveInstance,
+ prim_rect: LayoutRect,
+ spatial_node_index: SpatialNodeIndex,
+ flags: PrimitiveFlags,
+ ) {
+ // Add primitive to the top-most stacking context on the stack.
+ if prim_instance.is_chased() {
+ println!("\tadded to stacking context at {}", self.sc_stack.len());
+ }
+
+ let stacking_context = self.sc_stack.last_mut().unwrap();
+ stacking_context.prim_list.add_prim(
+ prim_instance,
+ prim_rect,
+ spatial_node_index,
+ flags,
+ );
+ }
+
+ /// Convenience interface that creates a primitive entry and adds it
+ /// to the draw list.
+ fn add_nonshadowable_primitive<P>(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ info: &LayoutPrimitiveInfo,
+ clip_items: Vec<ClipItemKey>,
+ prim: P,
+ )
+ where
+ P: InternablePrimitive + IsVisible,
+ Interners: AsMut<Interner<P>>,
+ {
+ if prim.is_visible() {
+ let clip_chain_id = self.build_clip_chain(
+ clip_items,
+ spatial_node_index,
+ clip_chain_id,
+ );
+ self.add_prim_to_draw_list(
+ info,
+ spatial_node_index,
+ clip_chain_id,
+ prim,
+ );
+ }
+ }
+
+ pub fn add_primitive<P>(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ info: &LayoutPrimitiveInfo,
+ clip_items: Vec<ClipItemKey>,
+ prim: P,
+ )
+ where
+ P: InternablePrimitive + IsVisible,
+ Interners: AsMut<Interner<P>>,
+ ShadowItem: From<PendingPrimitive<P>>
+ {
+ // If a shadow context is not active, then add the primitive
+ // directly to the parent picture.
+ if self.pending_shadow_items.is_empty() {
+ self.add_nonshadowable_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ info,
+ clip_items,
+ prim,
+ );
+ } else {
+ debug_assert!(clip_items.is_empty(), "No per-prim clips expected for shadowed primitives");
+
+ // There is an active shadow context. Store as a pending primitive
+ // for processing during pop_all_shadows.
+ self.pending_shadow_items.push_back(PendingPrimitive {
+ spatial_node_index,
+ clip_chain_id,
+ info: *info,
+ prim,
+ }.into());
+ }
+ }
+
+ fn add_prim_to_draw_list<P>(
+ &mut self,
+ info: &LayoutPrimitiveInfo,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ prim: P,
+ )
+ where
+ P: InternablePrimitive,
+ Interners: AsMut<Interner<P>>,
+ {
+ let prim_instance = self.create_primitive(
+ info,
+ spatial_node_index,
+ clip_chain_id,
+ prim,
+ );
+ self.register_chase_primitive_by_rect(
+ &info.rect,
+ &prim_instance,
+ );
+ self.add_primitive_to_hit_testing_list(
+ info,
+ spatial_node_index,
+ clip_chain_id,
+ );
+ self.add_primitive_to_draw_list(
+ prim_instance,
+ info.rect,
+ spatial_node_index,
+ info.flags,
+ );
+ }
+
+ pub fn push_stacking_context(
+ &mut self,
+ pipeline_id: PipelineId,
+ composite_ops: CompositeOps,
+ transform_style: TransformStyle,
+ prim_flags: PrimitiveFlags,
+ spatial_node_index: SpatialNodeIndex,
+ clip_id: Option<ClipId>,
+ requested_raster_space: RasterSpace,
+ flags: StackingContextFlags,
+ device_pixel_scale: DevicePixelScale,
+ ) {
+ // Check if this stacking context is the root of a pipeline, and the caller
+ // has requested it as an output frame.
+ let is_pipeline_root =
+ self.sc_stack.last().map_or(true, |sc| sc.pipeline_id != pipeline_id);
+ let frame_output_pipeline_id = if is_pipeline_root && self.output_pipelines.contains(&pipeline_id) {
+ Some(pipeline_id)
+ } else {
+ None
+ };
+
+ let clip_chain_id = match clip_id {
+ Some(clip_id) => self.clip_store.get_or_build_clip_chain_id(clip_id),
+ None => ClipChainId::NONE,
+ };
+
+ // Get the transform-style of the parent stacking context,
+ // which determines if we *might* need to draw this on
+ // an intermediate surface for plane splitting purposes.
+ let (parent_is_3d, extra_3d_instance) = match self.sc_stack.last_mut() {
+ Some(ref mut sc) if sc.is_3d() => {
+ let flat_items_context_3d = match sc.context_3d {
+ Picture3DContext::In { ancestor_index, .. } => Picture3DContext::In {
+ root_data: None,
+ ancestor_index,
+ },
+ Picture3DContext::Out => panic!("Unexpected out of 3D context"),
+ };
+ // Cut the sequence of flat children before starting a child stacking context,
+ // so that the relative order between them and our current SC is preserved.
+ let extra_instance = sc.cut_item_sequence(
+ &mut self.prim_store,
+ &mut self.interners,
+ Some(PictureCompositeMode::Blit(BlitReason::PRESERVE3D)),
+ flat_items_context_3d,
+ );
+ let extra_instance = extra_instance.map(|(_, instance)| {
+ ExtendedPrimitiveInstance {
+ instance,
+ spatial_node_index: sc.spatial_node_index,
+ flags: sc.prim_flags,
+ }
+ });
+ (true, extra_instance)
+ },
+ _ => (false, None),
+ };
+
+ if let Some(instance) = extra_3d_instance {
+ self.add_primitive_instance_to_3d_root(instance);
+ }
+
+ // If this is preserve-3d *or* the parent is, then this stacking
+ // context is participating in the 3d rendering context. In that
+ // case, hoist the picture up to the 3d rendering context
+ // container, so that it's rendered as a sibling with other
+ // elements in this context.
+ let participating_in_3d_context =
+ composite_ops.is_empty() &&
+ (parent_is_3d || transform_style == TransformStyle::Preserve3D);
+
+ let context_3d = if participating_in_3d_context {
+ // Find the spatial node index of the containing block, which
+ // defines the context of backface-visibility.
+ let ancestor_context = self.sc_stack
+ .iter()
+ .rfind(|sc| !sc.is_3d());
+ Picture3DContext::In {
+ root_data: if parent_is_3d {
+ None
+ } else {
+ Some(Vec::new())
+ },
+ ancestor_index: match ancestor_context {
+ Some(sc) => sc.spatial_node_index,
+ None => ROOT_SPATIAL_NODE_INDEX,
+ },
+ }
+ } else {
+ Picture3DContext::Out
+ };
+
+ // Force an intermediate surface if the stacking context has a
+ // complex clip node. In the future, we may decide during
+ // prepare step to skip the intermediate surface if the
+ // clip node doesn't affect the stacking context rect.
+ let mut blit_reason = BlitReason::empty();
+ let mut current_clip_chain_id = clip_chain_id;
+
+ if flags.contains(StackingContextFlags::IS_BLEND_CONTAINER) {
+ blit_reason |= BlitReason::ISOLATE;
+ }
+
+ // Walk each clip in this chain, to see whether any of the clips
+ // require that we draw this to an intermediate surface.
+ while current_clip_chain_id != ClipChainId::NONE {
+ let clip_chain_node = &self
+ .clip_store
+ .clip_chain_nodes[current_clip_chain_id.0 as usize];
+
+ let clip_node_data = &self.interners.clip[clip_chain_node.handle];
+
+ if let ClipNodeKind::Complex = clip_node_data.clip_node_kind {
+ blit_reason = BlitReason::CLIP;
+ break;
+ }
+
+ current_clip_chain_id = clip_chain_node.parent_clip_chain_id;
+ }
+
+ let snap_to_device = self.sc_stack.last().map_or(
+ SpaceSnapper::new(
+ ROOT_SPATIAL_NODE_INDEX,
+ device_pixel_scale,
+ ),
+ |sc| sc.snap_to_device.clone(),
+ );
+
+ let is_redundant = match self.sc_stack.last() {
+ Some(parent) => {
+ FlattenedStackingContext::is_redundant(
+ &context_3d,
+ &composite_ops,
+ prim_flags,
+ blit_reason,
+ requested_raster_space,
+ parent,
+ )
+ }
+ None => {
+ false
+ }
+ };
+
+ if let Some(clip_id) = clip_id {
+ // If this stacking context is redundant (prims will be pushed into
+ // the parent during pop) but it has a valid clip, then we need to
+ // add that clip to the current clip chain builder, so it's correctly
+ // applied to any primitives within this redundant stacking context.
+ // For the normal case, we start a new clip root, knowing that the
+ // clip on this stacking context will be pushed onto the stack during
+ // frame building.
+ if is_redundant {
+ self.clip_store.push_clip_root(Some(clip_id), true);
+ } else {
+ self.clip_store.push_clip_root(None, false);
+ }
+ }
+
+ // Push the SC onto the stack, so we know how to handle things in
+ // pop_stacking_context.
+ self.sc_stack.push(FlattenedStackingContext {
+ prim_list: PrimitiveList::empty(),
+ pipeline_id,
+ prim_flags,
+ requested_raster_space,
+ spatial_node_index,
+ clip_id,
+ clip_chain_id,
+ frame_output_pipeline_id,
+ composite_ops,
+ blit_reason,
+ transform_style,
+ context_3d,
+ is_redundant,
+ is_backdrop_root: flags.contains(StackingContextFlags::IS_BACKDROP_ROOT),
+ snap_to_device,
+ });
+ }
+
+ pub fn pop_stacking_context(&mut self) {
+ let mut stacking_context = self.sc_stack.pop().unwrap();
+
+ if stacking_context.clip_id.is_some() {
+ self.clip_store.pop_clip_root();
+ }
+
+ // If we encounter a stacking context that is effectively a no-op, then instead
+ // of creating a picture, just append the primitive list to the parent stacking
+ // context as a short cut. This serves two purposes:
+ // (a) It's an optimization to reduce picture count and allocations, as display lists
+ // often contain a lot of these stacking contexts that don't require pictures or
+ // off-screen surfaces.
+ // (b) It's useful for the initial version of picture caching in gecko, by enabling
+ // is to just look for interesting scroll roots on the root stacking context,
+ // without having to consider cuts at stacking context boundaries.
+ let parent_is_empty = match self.sc_stack.last_mut() {
+ Some(parent_sc) => {
+ if stacking_context.is_redundant {
+ if !stacking_context.prim_list.is_empty() {
+ // If popping a redundant stacking context that is from a different pipeline,
+ // we want to insert flags where the picture cache slices should be created
+ // for this iframe. For now, we want to match existing behavior, that is:
+ // - Only cache content that is within the main scroll root, and:
+ // - Skip caching fixed position content before / after the scroll root.
+ // This means that we don't add scrollbars, which cause lots of extra
+ // invalidations. There is ongoing work to add tags to primitives that
+ // are scrollbars. Once this lands, we can simplify this logic considerably
+ // (and add a separate picture cache slice / OS layer for scroll bars).
+ if parent_sc.pipeline_id != stacking_context.pipeline_id && self.iframe_depth == 1 {
+ self.content_slice_count = stacking_context.init_picture_caching(
+ &self.spatial_tree,
+ &self.clip_store,
+ &self.quality_settings,
+ );
+
+ // Mark that a user supplied tile cache was specified.
+ self.picture_caching_initialized = true;
+ }
+
+ // If the parent context primitives list is empty, it's faster
+ // to assign the storage of the popped context instead of paying
+ // the copying cost for extend.
+ if parent_sc.prim_list.is_empty() {
+ parent_sc.prim_list = stacking_context.prim_list;
+ } else {
+ parent_sc.prim_list.extend(stacking_context.prim_list);
+ }
+ }
+
+ return;
+ }
+ parent_sc.prim_list.is_empty()
+ },
+ None => true,
+ };
+
+ if self.sc_stack.is_empty() {
+ // If we didn't encounter a content iframe, then set up picture caching slice markers
+ // on the root stacking context. This can happen in Gecko when the parent process
+ // provides the content display list (e.g. about:support, about:config etc).
+ if !self.picture_caching_initialized {
+ self.content_slice_count = stacking_context.init_picture_caching(
+ &self.spatial_tree,
+ &self.clip_store,
+ &self.quality_settings,
+ );
+ self.picture_caching_initialized = true;
+ }
+
+ self.setup_picture_caching(
+ &mut stacking_context.prim_list,
+ );
+ }
+
+ let (leaf_context_3d, leaf_composite_mode, leaf_output_pipeline_id) = match stacking_context.context_3d {
+ // TODO(gw): For now, as soon as this picture is in
+ // a 3D context, we draw it to an intermediate
+ // surface and apply plane splitting. However,
+ // there is a large optimization opportunity here.
+ // During culling, we can check if there is actually
+ // perspective present, and skip the plane splitting
+ // completely when that is not the case.
+ Picture3DContext::In { ancestor_index, .. } => (
+ Picture3DContext::In { root_data: None, ancestor_index },
+ Some(PictureCompositeMode::Blit(BlitReason::PRESERVE3D | stacking_context.blit_reason)),
+ None,
+ ),
+ Picture3DContext::Out => (
+ Picture3DContext::Out,
+ if stacking_context.blit_reason.is_empty() {
+ // By default, this picture will be collapsed into
+ // the owning target.
+ None
+ } else {
+ // Add a dummy composite filter if the SC has to be isolated.
+ Some(PictureCompositeMode::Blit(stacking_context.blit_reason))
+ },
+ stacking_context.frame_output_pipeline_id
+ ),
+ };
+
+ // Add picture for this actual stacking context contents to render into.
+ let leaf_pic_index = PictureIndex(self.prim_store.pictures
+ .alloc()
+ .init(PicturePrimitive::new_image(
+ leaf_composite_mode.clone(),
+ leaf_context_3d,
+ leaf_output_pipeline_id,
+ true,
+ stacking_context.prim_flags,
+ stacking_context.requested_raster_space,
+ stacking_context.prim_list,
+ stacking_context.spatial_node_index,
+ None,
+ PictureOptions::default(),
+ ))
+ );
+
+ // Create a chain of pictures based on presence of filters,
+ // mix-blend-mode and/or 3d rendering context containers.
+
+ let mut current_pic_index = leaf_pic_index;
+ let mut cur_instance = create_prim_instance(
+ leaf_pic_index,
+ leaf_composite_mode.into(),
+ ClipChainId::NONE,
+ &mut self.interners,
+ );
+
+ if cur_instance.is_chased() {
+ println!("\tis a leaf primitive for a stacking context");
+ }
+
+ // If establishing a 3d context, the `cur_instance` represents
+ // a picture with all the *trailing* immediate children elements.
+ // We append this to the preserve-3D picture set and make a container picture of them.
+ if let Picture3DContext::In { root_data: Some(mut prims), ancestor_index } = stacking_context.context_3d {
+ prims.push(ExtendedPrimitiveInstance {
+ instance: cur_instance,
+ spatial_node_index: stacking_context.spatial_node_index,
+ flags: stacking_context.prim_flags,
+ });
+
+ let mut prim_list = PrimitiveList::empty();
+ for ext_prim in prims.drain(..) {
+ prim_list.add_prim(
+ ext_prim.instance,
+ LayoutRect::zero(),
+ ext_prim.spatial_node_index,
+ ext_prim.flags,
+ );
+ }
+
+ // This is the acttual picture representing our 3D hierarchy root.
+ current_pic_index = PictureIndex(self.prim_store.pictures
+ .alloc()
+ .init(PicturePrimitive::new_image(
+ None,
+ Picture3DContext::In {
+ root_data: Some(Vec::new()),
+ ancestor_index,
+ },
+ stacking_context.frame_output_pipeline_id,
+ true,
+ stacking_context.prim_flags,
+ stacking_context.requested_raster_space,
+ prim_list,
+ stacking_context.spatial_node_index,
+ None,
+ PictureOptions::default(),
+ ))
+ );
+
+ cur_instance = create_prim_instance(
+ current_pic_index,
+ PictureCompositeKey::Identity,
+ ClipChainId::NONE,
+ &mut self.interners,
+ );
+ }
+
+ let (filtered_pic_index, filtered_instance) = self.wrap_prim_with_filters(
+ cur_instance,
+ current_pic_index,
+ stacking_context.composite_ops.filters,
+ stacking_context.composite_ops.filter_primitives,
+ stacking_context.composite_ops.filter_datas,
+ stacking_context.prim_flags,
+ stacking_context.requested_raster_space,
+ stacking_context.spatial_node_index,
+ true,
+ );
+
+ let has_filters = current_pic_index != filtered_pic_index;
+
+ current_pic_index = filtered_pic_index;
+ cur_instance = filtered_instance;
+
+ // Same for mix-blend-mode, except we can skip if this primitive is the first in the parent
+ // stacking context.
+ // From https://drafts.fxtf.org/compositing-1/#generalformula, the formula for blending is:
+ // Cs = (1 - ab) x Cs + ab x Blend(Cb, Cs)
+ // where
+ // Cs = Source color
+ // ab = Backdrop alpha
+ // Cb = Backdrop color
+ //
+ // If we're the first primitive within a stacking context, then we can guarantee that the
+ // backdrop alpha will be 0, and then the blend equation collapses to just
+ // Cs = Cs, and the blend mode isn't taken into account at all.
+ if let (Some(mix_blend_mode), false) = (stacking_context.composite_ops.mix_blend_mode, parent_is_empty) {
+ if self.sc_stack.last().unwrap().blit_reason.contains(BlitReason::ISOLATE) {
+ let composite_mode = Some(PictureCompositeMode::MixBlend(mix_blend_mode));
+
+ let mut prim_list = PrimitiveList::empty();
+ prim_list.add_prim(
+ cur_instance.clone(),
+ LayoutRect::zero(),
+ stacking_context.spatial_node_index,
+ stacking_context.prim_flags,
+ );
+
+ let blend_pic_index = PictureIndex(self.prim_store.pictures
+ .alloc()
+ .init(PicturePrimitive::new_image(
+ composite_mode.clone(),
+ Picture3DContext::Out,
+ None,
+ true,
+ stacking_context.prim_flags,
+ stacking_context.requested_raster_space,
+ prim_list,
+ stacking_context.spatial_node_index,
+ None,
+ PictureOptions::default(),
+ ))
+ );
+
+ current_pic_index = blend_pic_index;
+ cur_instance = create_prim_instance(
+ blend_pic_index,
+ composite_mode.into(),
+ ClipChainId::NONE,
+ &mut self.interners,
+ );
+
+ if cur_instance.is_chased() {
+ println!("\tis a mix-blend picture for a stacking context with {:?}", mix_blend_mode);
+ }
+ } else {
+ // If we have a mix-blend-mode, the stacking context needs to be isolated
+ // to blend correctly as per the CSS spec.
+ // If not already isolated, we can't correctly blend.
+ warn!("found a mix-blend-mode outside a blend container, ignoring");
+ }
+ }
+
+ // Set the stacking context clip on the outermost picture in the chain,
+ // unless we already set it on the leaf picture.
+ cur_instance.clip_chain_id = stacking_context.clip_chain_id;
+
+ // The primitive instance for the remainder of flat children of this SC
+ // if it's a part of 3D hierarchy but not the root of it.
+ let trailing_children_instance = match self.sc_stack.last_mut() {
+ // Preserve3D path (only relevant if there are no filters/mix-blend modes)
+ Some(ref parent_sc) if !has_filters && parent_sc.is_3d() => {
+ Some(cur_instance)
+ }
+ // Regular parenting path
+ Some(ref mut parent_sc) => {
+ parent_sc.prim_list.add_prim(
+ cur_instance,
+ LayoutRect::zero(),
+ stacking_context.spatial_node_index,
+ stacking_context.prim_flags,
+ );
+ None
+ }
+ // This must be the root stacking context
+ None => {
+ self.root_pic_index = current_pic_index;
+ None
+ }
+ };
+
+ // finally, if there any outstanding 3D primitive instances,
+ // find the 3D hierarchy root and add them there.
+ if let Some(instance) = trailing_children_instance {
+ self.add_primitive_instance_to_3d_root(ExtendedPrimitiveInstance {
+ instance,
+ spatial_node_index: stacking_context.spatial_node_index,
+ flags: stacking_context.prim_flags,
+ });
+ }
+
+ assert!(
+ self.pending_shadow_items.is_empty(),
+ "Found unpopped shadows when popping stacking context!"
+ );
+ }
+
+ pub fn push_reference_frame(
+ &mut self,
+ reference_frame_id: SpatialId,
+ parent_index: Option<SpatialNodeIndex>,
+ pipeline_id: PipelineId,
+ transform_style: TransformStyle,
+ source_transform: PropertyBinding<LayoutTransform>,
+ kind: ReferenceFrameKind,
+ origin_in_parent_reference_frame: LayoutVector2D,
+ ) -> SpatialNodeIndex {
+ let index = self.spatial_tree.add_reference_frame(
+ parent_index,
+ transform_style,
+ source_transform,
+ kind,
+ origin_in_parent_reference_frame,
+ pipeline_id,
+ );
+ self.id_to_index_mapper.add_spatial_node(reference_frame_id, index);
+
+ index
+ }
+
+ pub fn push_root(
+ &mut self,
+ pipeline_id: PipelineId,
+ viewport_size: &LayoutSize,
+ content_size: &LayoutSize,
+ device_pixel_scale: DevicePixelScale,
+ ) {
+ if let ChasePrimitive::Id(id) = self.config.chase_primitive {
+ println!("Chasing {:?} by index", id);
+ register_prim_chase_id(id);
+ }
+
+ let spatial_node_index = self.push_reference_frame(
+ SpatialId::root_reference_frame(pipeline_id),
+ None,
+ pipeline_id,
+ TransformStyle::Flat,
+ PropertyBinding::Value(LayoutTransform::identity()),
+ ReferenceFrameKind::Transform,
+ LayoutVector2D::zero(),
+ );
+
+ // We can't use this with the stacking context because it does not exist
+ // yet. Just create a dedicated snapper for the root.
+ let snap_to_device = SpaceSnapper::new_with_target(
+ spatial_node_index,
+ ROOT_SPATIAL_NODE_INDEX,
+ device_pixel_scale,
+ &self.spatial_tree,
+ );
+
+ let content_size = snap_to_device.snap_size(content_size);
+ let viewport_rect = snap_to_device.snap_rect(
+ &LayoutRect::new(LayoutPoint::zero(), *viewport_size),
+ );
+
+ self.add_scroll_frame(
+ SpatialId::root_scroll_node(pipeline_id),
+ spatial_node_index,
+ Some(ExternalScrollId(0, pipeline_id)),
+ pipeline_id,
+ &viewport_rect,
+ &content_size,
+ ScrollSensitivity::ScriptAndInputEvents,
+ ScrollFrameKind::PipelineRoot,
+ LayoutVector2D::zero(),
+ );
+ }
+
+ fn add_image_mask_clip_node(
+ &mut self,
+ new_node_id: ClipId,
+ space_and_clip: &SpaceAndClipInfo,
+ image_mask: &ImageMask,
+ ) {
+ let spatial_node_index = self.id_to_index_mapper.get_spatial_node_index(space_and_clip.spatial_id);
+
+ let snap_to_device = &mut self.sc_stack.last_mut().unwrap().snap_to_device;
+ snap_to_device.set_target_spatial_node(
+ spatial_node_index,
+ &self.spatial_tree,
+ );
+
+ let snapped_mask_rect = snap_to_device.snap_rect(&image_mask.rect);
+ let item = ClipItemKey {
+ kind: ClipItemKeyKind::image_mask(image_mask, snapped_mask_rect),
+ };
+
+ let handle = self
+ .interners
+ .clip
+ .intern(&item, || {
+ ClipInternData {
+ clip_node_kind: ClipNodeKind::Complex,
+ }
+ });
+
+ let instance = ClipInstance::new(handle, spatial_node_index);
+
+ self.clip_store.register_clip_template(
+ new_node_id,
+ space_and_clip.clip_id,
+ &[instance],
+ );
+ }
+
+ /// Add a new rectangle clip, positioned by the spatial node in the `space_and_clip`.
+ pub fn add_rect_clip_node(
+ &mut self,
+ new_node_id: ClipId,
+ space_and_clip: &SpaceAndClipInfo,
+ clip_rect: &LayoutRect,
+ ) {
+ let spatial_node_index = self.id_to_index_mapper.get_spatial_node_index(space_and_clip.spatial_id);
+
+ let snap_to_device = &mut self.sc_stack.last_mut().unwrap().snap_to_device;
+ snap_to_device.set_target_spatial_node(
+ spatial_node_index,
+ &self.spatial_tree,
+ );
+
+ let snapped_clip_rect = snap_to_device.snap_rect(clip_rect);
+
+ let item = ClipItemKey {
+ kind: ClipItemKeyKind::rectangle(snapped_clip_rect, ClipMode::Clip),
+ };
+ let handle = self
+ .interners
+ .clip
+ .intern(&item, || {
+ ClipInternData {
+ clip_node_kind: ClipNodeKind::Rectangle,
+ }
+ });
+
+ let instance = ClipInstance::new(handle, spatial_node_index);
+
+ self.clip_store.register_clip_template(
+ new_node_id,
+ space_and_clip.clip_id,
+ &[instance],
+ );
+ }
+
+ pub fn add_rounded_rect_clip_node(
+ &mut self,
+ new_node_id: ClipId,
+ space_and_clip: &SpaceAndClipInfo,
+ clip: &ComplexClipRegion,
+ current_offset: LayoutVector2D,
+ ) {
+ let spatial_node_index = self.id_to_index_mapper.get_spatial_node_index(space_and_clip.spatial_id);
+
+ let snap_to_device = &mut self.sc_stack.last_mut().unwrap().snap_to_device;
+ snap_to_device.set_target_spatial_node(
+ spatial_node_index,
+ &self.spatial_tree,
+ );
+
+ let snapped_region_rect = snap_to_device.snap_rect(&clip.rect.translate(current_offset));
+ let item = ClipItemKey {
+ kind: ClipItemKeyKind::rounded_rect(
+ snapped_region_rect,
+ clip.radii,
+ clip.mode,
+ ),
+ };
+
+ let handle = self
+ .interners
+ .clip
+ .intern(&item, || {
+ ClipInternData {
+ clip_node_kind: ClipNodeKind::Complex,
+ }
+ });
+
+ let instance = ClipInstance::new(handle, spatial_node_index);
+
+ self.clip_store.register_clip_template(
+ new_node_id,
+ space_and_clip.clip_id,
+ &[instance],
+ );
+ }
+
+ pub fn add_clip_node<I>(
+ &mut self,
+ new_node_id: ClipId,
+ space_and_clip: &SpaceAndClipInfo,
+ clip_region: ClipRegion<I>,
+ )
+ where
+ I: IntoIterator<Item = ComplexClipRegion>
+ {
+ // Map the ClipId for the positioning node to a spatial node index.
+ let spatial_node_index = self.id_to_index_mapper.get_spatial_node_index(space_and_clip.spatial_id);
+
+ let snap_to_device = &mut self.sc_stack.last_mut().unwrap().snap_to_device;
+ snap_to_device.set_target_spatial_node(
+ spatial_node_index,
+ &self.spatial_tree,
+ );
+
+ let snapped_clip_rect = snap_to_device.snap_rect(&clip_region.main);
+ let mut instances: SmallVec<[ClipInstance; 4]> = SmallVec::new();
+
+ // Intern each clip item in this clip node, and add the interned
+ // handle to a clip chain node, parented to form a chain.
+ // TODO(gw): We could re-structure this to share some of the
+ // interning and chaining code.
+
+ // Build the clip sources from the supplied region.
+ let item = ClipItemKey {
+ kind: ClipItemKeyKind::rectangle(snapped_clip_rect, ClipMode::Clip),
+ };
+ let handle = self
+ .interners
+ .clip
+ .intern(&item, || {
+ ClipInternData {
+ clip_node_kind: ClipNodeKind::Rectangle,
+ }
+ });
+ instances.push(ClipInstance::new(handle, spatial_node_index));
+
+ for region in clip_region.complex_clips {
+ let snapped_region_rect = snap_to_device.snap_rect(&region.rect);
+ let item = ClipItemKey {
+ kind: ClipItemKeyKind::rounded_rect(
+ snapped_region_rect,
+ region.radii,
+ region.mode,
+ ),
+ };
+
+ let handle = self
+ .interners
+ .clip
+ .intern(&item, || {
+ ClipInternData {
+ clip_node_kind: ClipNodeKind::Complex,
+ }
+ });
+
+ instances.push(ClipInstance::new(handle, spatial_node_index));
+ }
+
+ self.clip_store.register_clip_template(
+ new_node_id,
+ space_and_clip.clip_id,
+ &instances,
+ );
+ }
+
+ pub fn add_scroll_frame(
+ &mut self,
+ new_node_id: SpatialId,
+ parent_node_index: SpatialNodeIndex,
+ external_id: Option<ExternalScrollId>,
+ pipeline_id: PipelineId,
+ frame_rect: &LayoutRect,
+ content_size: &LayoutSize,
+ scroll_sensitivity: ScrollSensitivity,
+ frame_kind: ScrollFrameKind,
+ external_scroll_offset: LayoutVector2D,
+ ) -> SpatialNodeIndex {
+ let node_index = self.spatial_tree.add_scroll_frame(
+ parent_node_index,
+ external_id,
+ pipeline_id,
+ frame_rect,
+ content_size,
+ scroll_sensitivity,
+ frame_kind,
+ external_scroll_offset,
+ );
+ self.id_to_index_mapper.add_spatial_node(new_node_id, node_index);
+ node_index
+ }
+
+ pub fn push_shadow(
+ &mut self,
+ shadow: Shadow,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ should_inflate: bool,
+ ) {
+ // Store this shadow in the pending list, for processing
+ // during pop_all_shadows.
+ self.pending_shadow_items.push_back(ShadowItem::Shadow(PendingShadow {
+ shadow,
+ spatial_node_index,
+ clip_chain_id,
+ should_inflate,
+ }));
+ }
+
+ pub fn pop_all_shadows(
+ &mut self,
+ ) {
+ assert!(!self.pending_shadow_items.is_empty(), "popped shadows, but none were present");
+
+ let mut items = mem::replace(&mut self.pending_shadow_items, VecDeque::new());
+
+ //
+ // The pending_shadow_items queue contains a list of shadows and primitives
+ // that were pushed during the active shadow context. To process these, we:
+ //
+ // Iterate the list, popping an item from the front each iteration.
+ //
+ // If the item is a shadow:
+ // - Create a shadow picture primitive.
+ // - Add *any* primitives that remain in the item list to this shadow.
+ // If the item is a primitive:
+ // - Add that primitive as a normal item (if alpha > 0)
+ //
+
+ while let Some(item) = items.pop_front() {
+ match item {
+ ShadowItem::Shadow(pending_shadow) => {
+ // Quote from https://drafts.csswg.org/css-backgrounds-3/#shadow-blur
+ // "the image that would be generated by applying to the shadow a
+ // Gaussian blur with a standard deviation equal to half the blur radius."
+ let std_deviation = pending_shadow.shadow.blur_radius * 0.5;
+
+ // If the shadow has no blur, any elements will get directly rendered
+ // into the parent picture surface, instead of allocating and drawing
+ // into an intermediate surface. In this case, we will need to apply
+ // the local clip rect to primitives.
+ let is_passthrough = pending_shadow.shadow.blur_radius == 0.0;
+
+ // shadows always rasterize in local space.
+ // TODO(gw): expose API for clients to specify a raster scale
+ let raster_space = if is_passthrough {
+ self.sc_stack.last().unwrap().requested_raster_space
+ } else {
+ RasterSpace::Local(1.0)
+ };
+
+ // Add any primitives that come after this shadow in the item
+ // list to this shadow.
+ let mut prim_list = PrimitiveList::empty();
+
+ for item in &items {
+ match item {
+ ShadowItem::Image(ref pending_image) => {
+ self.add_shadow_prim(
+ &pending_shadow,
+ pending_image,
+ &mut prim_list,
+ )
+ }
+ ShadowItem::LineDecoration(ref pending_line_dec) => {
+ self.add_shadow_prim(
+ &pending_shadow,
+ pending_line_dec,
+ &mut prim_list,
+ )
+ }
+ ShadowItem::NormalBorder(ref pending_border) => {
+ self.add_shadow_prim(
+ &pending_shadow,
+ pending_border,
+ &mut prim_list,
+ )
+ }
+ ShadowItem::Primitive(ref pending_primitive) => {
+ self.add_shadow_prim(
+ &pending_shadow,
+ pending_primitive,
+ &mut prim_list,
+ )
+ }
+ ShadowItem::TextRun(ref pending_text_run) => {
+ self.add_shadow_prim(
+ &pending_shadow,
+ pending_text_run,
+ &mut prim_list,
+ )
+ }
+ _ => {}
+ }
+ }
+
+ // No point in adding a shadow here if there were no primitives
+ // added to the shadow.
+ if !prim_list.is_empty() {
+ // Create a picture that the shadow primitives will be added to. If the
+ // blur radius is 0, the code in Picture::prepare_for_render will
+ // detect this and mark the picture to be drawn directly into the
+ // parent picture, which avoids an intermediate surface and blur.
+ let blur_filter = Filter::Blur(std_deviation);
+ let composite_mode = PictureCompositeMode::Filter(blur_filter);
+ let composite_mode_key = Some(composite_mode.clone()).into();
+
+ // Pass through configuration information about whether WR should
+ // do the bounding rect inflation for text shadows.
+ let options = PictureOptions {
+ inflate_if_required: pending_shadow.should_inflate,
+ };
+
+ // Create the primitive to draw the shadow picture into the scene.
+ let shadow_pic_index = PictureIndex(self.prim_store.pictures
+ .alloc()
+ .init(PicturePrimitive::new_image(
+ Some(composite_mode),
+ Picture3DContext::Out,
+ None,
+ is_passthrough,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ raster_space,
+ prim_list,
+ pending_shadow.spatial_node_index,
+ None,
+ options,
+ ))
+ );
+
+ let shadow_pic_key = PictureKey::new(
+ Picture { composite_mode_key },
+ );
+
+ let shadow_prim_data_handle = self.interners
+ .picture
+ .intern(&shadow_pic_key, || ());
+
+ let shadow_prim_instance = PrimitiveInstance::new(
+ LayoutRect::max_rect(),
+ PrimitiveInstanceKind::Picture {
+ data_handle: shadow_prim_data_handle,
+ pic_index: shadow_pic_index,
+ segment_instance_index: SegmentInstanceIndex::INVALID,
+ },
+ pending_shadow.clip_chain_id,
+ );
+
+ // Add the shadow primitive. This must be done before pushing this
+ // picture on to the shadow stack, to avoid infinite recursion!
+ self.add_primitive_to_draw_list(
+ shadow_prim_instance,
+ LayoutRect::zero(),
+ pending_shadow.spatial_node_index,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ );
+ }
+ }
+ ShadowItem::Image(pending_image) => {
+ self.add_shadow_prim_to_draw_list(
+ pending_image,
+ )
+ },
+ ShadowItem::LineDecoration(pending_line_dec) => {
+ self.add_shadow_prim_to_draw_list(
+ pending_line_dec,
+ )
+ },
+ ShadowItem::NormalBorder(pending_border) => {
+ self.add_shadow_prim_to_draw_list(
+ pending_border,
+ )
+ },
+ ShadowItem::Primitive(pending_primitive) => {
+ self.add_shadow_prim_to_draw_list(
+ pending_primitive,
+ )
+ },
+ ShadowItem::TextRun(pending_text_run) => {
+ self.add_shadow_prim_to_draw_list(
+ pending_text_run,
+ )
+ },
+ }
+ }
+
+ debug_assert!(items.is_empty());
+ self.pending_shadow_items = items;
+ }
+
+ fn add_shadow_prim<P>(
+ &mut self,
+ pending_shadow: &PendingShadow,
+ pending_primitive: &PendingPrimitive<P>,
+ prim_list: &mut PrimitiveList,
+ )
+ where
+ P: InternablePrimitive + CreateShadow,
+ Interners: AsMut<Interner<P>>,
+ {
+ let snap_to_device = &mut self.sc_stack.last_mut().unwrap().snap_to_device;
+ snap_to_device.set_target_spatial_node(
+ pending_primitive.spatial_node_index,
+ &self.spatial_tree,
+ );
+
+ // Offset the local rect and clip rect by the shadow offset. The pending
+ // primitive has already been snapped, but we will need to snap the
+ // shadow after translation. We don't need to worry about the size
+ // changing because the shadow has the same raster space as the
+ // primitive, and thus we know the size is already rounded.
+ let mut info = pending_primitive.info.clone();
+ info.rect = snap_to_device.snap_rect(
+ &info.rect.translate(pending_shadow.shadow.offset),
+ );
+ info.clip_rect = snap_to_device.snap_rect(
+ &info.clip_rect.translate(pending_shadow.shadow.offset),
+ );
+
+ // Construct and add a primitive for the given shadow.
+ let shadow_prim_instance = self.create_primitive(
+ &info,
+ pending_primitive.spatial_node_index,
+ pending_primitive.clip_chain_id,
+ pending_primitive.prim.create_shadow(&pending_shadow.shadow),
+ );
+
+ // Add the new primitive to the shadow picture.
+ prim_list.add_prim(
+ shadow_prim_instance,
+ info.rect,
+ pending_primitive.spatial_node_index,
+ info.flags,
+ );
+ }
+
+ fn add_shadow_prim_to_draw_list<P>(
+ &mut self,
+ pending_primitive: PendingPrimitive<P>,
+ ) where
+ P: InternablePrimitive + IsVisible,
+ Interners: AsMut<Interner<P>>,
+ {
+ // For a normal primitive, if it has alpha > 0, then we add this
+ // as a normal primitive to the parent picture.
+ if pending_primitive.prim.is_visible() {
+ self.add_prim_to_draw_list(
+ &pending_primitive.info,
+ pending_primitive.spatial_node_index,
+ pending_primitive.clip_chain_id,
+ pending_primitive.prim,
+ );
+ }
+ }
+
+ #[cfg(debug_assertions)]
+ fn register_chase_primitive_by_rect(
+ &mut self,
+ rect: &LayoutRect,
+ prim_instance: &PrimitiveInstance,
+ ) {
+ if ChasePrimitive::LocalRect(*rect) == self.config.chase_primitive {
+ println!("Chasing {:?} by local rect", prim_instance.id);
+ register_prim_chase_id(prim_instance.id);
+ }
+ }
+
+ #[cfg(not(debug_assertions))]
+ fn register_chase_primitive_by_rect(
+ &mut self,
+ _rect: &LayoutRect,
+ _prim_instance: &PrimitiveInstance,
+ ) {
+ }
+
+ pub fn add_solid_rectangle(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ info: &LayoutPrimitiveInfo,
+ color: PropertyBinding<ColorF>,
+ ) {
+ match color {
+ PropertyBinding::Value(value) => {
+ if value.a == 0.0 {
+ // Don't add transparent rectangles to the draw list,
+ // but do consider them for hit testing. This allows
+ // specifying invisible hit testing areas.
+ self.add_primitive_to_hit_testing_list(
+ info,
+ spatial_node_index,
+ clip_chain_id,
+ );
+ return;
+ }
+ },
+ PropertyBinding::Binding(..) => {},
+ }
+
+ self.add_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ info,
+ Vec::new(),
+ PrimitiveKeyKind::Rectangle {
+ color: color.into(),
+ },
+ );
+ }
+
+ pub fn add_clear_rectangle(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ info: &LayoutPrimitiveInfo,
+ ) {
+ self.add_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ info,
+ Vec::new(),
+ PrimitiveKeyKind::Clear,
+ );
+ }
+
+ pub fn add_line(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ info: &LayoutPrimitiveInfo,
+ wavy_line_thickness: f32,
+ orientation: LineOrientation,
+ color: ColorF,
+ style: LineStyle,
+ ) {
+ // For line decorations, we can construct the render task cache key
+ // here during scene building, since it doesn't depend on device
+ // pixel ratio or transform.
+ let mut info = info.clone();
+
+ let size = get_line_decoration_size(
+ &info.rect.size,
+ orientation,
+ style,
+ wavy_line_thickness,
+ );
+
+ let cache_key = size.map(|size| {
+ // If dotted, adjust the clip rect to ensure we don't draw a final
+ // partial dot.
+ if style == LineStyle::Dotted {
+ let clip_size = match orientation {
+ LineOrientation::Horizontal => {
+ LayoutSize::new(
+ size.width * (info.rect.size.width / size.width).floor(),
+ info.rect.size.height,
+ )
+ }
+ LineOrientation::Vertical => {
+ LayoutSize::new(
+ info.rect.size.width,
+ size.height * (info.rect.size.height / size.height).floor(),
+ )
+ }
+ };
+ let clip_rect = LayoutRect::new(
+ info.rect.origin,
+ clip_size,
+ );
+ info.clip_rect = clip_rect
+ .intersection(&info.clip_rect)
+ .unwrap_or_else(LayoutRect::zero);
+ }
+
+ LineDecorationCacheKey {
+ style,
+ orientation,
+ wavy_line_thickness: Au::from_f32_px(wavy_line_thickness),
+ size: size.to_au(),
+ }
+ });
+
+ self.add_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ &info,
+ Vec::new(),
+ LineDecoration {
+ cache_key,
+ color: color.into(),
+ },
+ );
+ }
+
+ pub fn add_border(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ info: &LayoutPrimitiveInfo,
+ border_item: &BorderDisplayItem,
+ gradient_stops: ItemRange<GradientStop>,
+ ) {
+ match border_item.details {
+ BorderDetails::NinePatch(ref border) => {
+ let nine_patch = NinePatchDescriptor {
+ width: border.width,
+ height: border.height,
+ slice: border.slice,
+ fill: border.fill,
+ repeat_horizontal: border.repeat_horizontal,
+ repeat_vertical: border.repeat_vertical,
+ outset: border.outset.into(),
+ widths: border_item.widths.into(),
+ };
+
+ match border.source {
+ NinePatchBorderSource::Image(image_key) => {
+ let prim = ImageBorder {
+ request: ImageRequest {
+ key: image_key,
+ rendering: ImageRendering::Auto,
+ tile: None,
+ },
+ nine_patch,
+ };
+
+ self.add_nonshadowable_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ info,
+ Vec::new(),
+ prim,
+ );
+ }
+ NinePatchBorderSource::Gradient(gradient) => {
+ let prim = match self.create_linear_gradient_prim(
+ &info,
+ gradient.start_point,
+ gradient.end_point,
+ gradient_stops,
+ gradient.extend_mode,
+ LayoutSize::new(border.height as f32, border.width as f32),
+ LayoutSize::zero(),
+ Some(Box::new(nine_patch)),
+ ) {
+ Some(prim) => prim,
+ None => return,
+ };
+
+ self.add_nonshadowable_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ info,
+ Vec::new(),
+ prim,
+ );
+ }
+ NinePatchBorderSource::RadialGradient(gradient) => {
+ let prim = self.create_radial_gradient_prim(
+ &info,
+ gradient.center,
+ gradient.start_offset * gradient.radius.width,
+ gradient.end_offset * gradient.radius.width,
+ gradient.radius.width / gradient.radius.height,
+ gradient_stops,
+ gradient.extend_mode,
+ LayoutSize::new(border.height as f32, border.width as f32),
+ LayoutSize::zero(),
+ Some(Box::new(nine_patch)),
+ );
+
+ self.add_nonshadowable_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ info,
+ Vec::new(),
+ prim,
+ );
+ }
+ NinePatchBorderSource::ConicGradient(gradient) => {
+ let prim = self.create_conic_gradient_prim(
+ &info,
+ gradient.center,
+ gradient.angle,
+ gradient.start_offset,
+ gradient.end_offset,
+ gradient_stops,
+ gradient.extend_mode,
+ LayoutSize::new(border.height as f32, border.width as f32),
+ LayoutSize::zero(),
+ Some(Box::new(nine_patch)),
+ );
+
+ self.add_nonshadowable_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ info,
+ Vec::new(),
+ prim,
+ );
+ }
+ };
+ }
+ BorderDetails::Normal(ref border) => {
+ self.add_normal_border(
+ info,
+ border,
+ border_item.widths,
+ spatial_node_index,
+ clip_chain_id,
+ );
+ }
+ }
+ }
+
+ pub fn create_linear_gradient_prim(
+ &mut self,
+ info: &LayoutPrimitiveInfo,
+ start_point: LayoutPoint,
+ end_point: LayoutPoint,
+ stops: ItemRange<GradientStop>,
+ extend_mode: ExtendMode,
+ stretch_size: LayoutSize,
+ mut tile_spacing: LayoutSize,
+ nine_patch: Option<Box<NinePatchDescriptor>>,
+ ) -> Option<LinearGradient> {
+ let mut prim_rect = info.rect;
+ simplify_repeated_primitive(&stretch_size, &mut tile_spacing, &mut prim_rect);
+
+ let mut max_alpha: f32 = 0.0;
+
+ let stops = stops.iter().map(|stop| {
+ max_alpha = max_alpha.max(stop.color.a);
+ GradientStopKey {
+ offset: stop.offset,
+ color: stop.color.into(),
+ }
+ }).collect();
+
+ // If all the stops have no alpha, then this
+ // gradient can't contribute to the scene.
+ if max_alpha <= 0.0 {
+ return None;
+ }
+
+ // Try to ensure that if the gradient is specified in reverse, then so long as the stops
+ // are also supplied in reverse that the rendered result will be equivalent. To do this,
+ // a reference orientation for the gradient line must be chosen, somewhat arbitrarily, so
+ // just designate the reference orientation as start < end. Aligned gradient rendering
+ // manages to produce the same result regardless of orientation, so don't worry about
+ // reversing in that case.
+ let reverse_stops = start_point.x > end_point.x ||
+ (start_point.x == end_point.x && start_point.y > end_point.y);
+
+ // To get reftests exactly matching with reverse start/end
+ // points, it's necessary to reverse the gradient
+ // line in some cases.
+ let (sp, ep) = if reverse_stops {
+ (end_point, start_point)
+ } else {
+ (start_point, end_point)
+ };
+
+ Some(LinearGradient {
+ extend_mode,
+ start_point: sp.into(),
+ end_point: ep.into(),
+ stretch_size: stretch_size.into(),
+ tile_spacing: tile_spacing.into(),
+ stops,
+ reverse_stops,
+ nine_patch,
+ })
+ }
+
+ pub fn create_radial_gradient_prim(
+ &mut self,
+ info: &LayoutPrimitiveInfo,
+ center: LayoutPoint,
+ start_radius: f32,
+ end_radius: f32,
+ ratio_xy: f32,
+ stops: ItemRange<GradientStop>,
+ extend_mode: ExtendMode,
+ stretch_size: LayoutSize,
+ mut tile_spacing: LayoutSize,
+ nine_patch: Option<Box<NinePatchDescriptor>>,
+ ) -> RadialGradient {
+ let mut prim_rect = info.rect;
+ simplify_repeated_primitive(&stretch_size, &mut tile_spacing, &mut prim_rect);
+
+ let params = RadialGradientParams {
+ start_radius,
+ end_radius,
+ ratio_xy,
+ };
+
+ let stops = stops.iter().map(|stop| {
+ GradientStopKey {
+ offset: stop.offset,
+ color: stop.color.into(),
+ }
+ }).collect();
+
+ RadialGradient {
+ extend_mode,
+ center: center.into(),
+ params,
+ stretch_size: stretch_size.into(),
+ tile_spacing: tile_spacing.into(),
+ nine_patch,
+ stops,
+ }
+ }
+
+ pub fn create_conic_gradient_prim(
+ &mut self,
+ info: &LayoutPrimitiveInfo,
+ center: LayoutPoint,
+ angle: f32,
+ start_offset: f32,
+ end_offset: f32,
+ stops: ItemRange<GradientStop>,
+ extend_mode: ExtendMode,
+ stretch_size: LayoutSize,
+ mut tile_spacing: LayoutSize,
+ nine_patch: Option<Box<NinePatchDescriptor>>,
+ ) -> ConicGradient {
+ let mut prim_rect = info.rect;
+ simplify_repeated_primitive(&stretch_size, &mut tile_spacing, &mut prim_rect);
+
+ let stops = stops.iter().map(|stop| {
+ GradientStopKey {
+ offset: stop.offset,
+ color: stop.color.into(),
+ }
+ }).collect();
+
+ ConicGradient {
+ extend_mode,
+ center: center.into(),
+ params: ConicGradientParams { angle, start_offset, end_offset },
+ stretch_size: stretch_size.into(),
+ tile_spacing: tile_spacing.into(),
+ nine_patch,
+ stops,
+ }
+ }
+
+ pub fn add_text(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ prim_info: &LayoutPrimitiveInfo,
+ font_instance_key: &FontInstanceKey,
+ text_color: &ColorF,
+ glyph_range: ItemRange<GlyphInstance>,
+ glyph_options: Option<GlyphOptions>,
+ ) {
+ let offset = self.current_offset(spatial_node_index);
+
+ let text_run = {
+ let instance_map = self.font_instances.lock().unwrap();
+ let font_instance = match instance_map.get(font_instance_key) {
+ Some(instance) => instance,
+ None => {
+ warn!("Unknown font instance key");
+ debug!("key={:?}", font_instance_key);
+ return;
+ }
+ };
+
+ // Trivial early out checks
+ if font_instance.size <= FontSize::zero() {
+ return;
+ }
+
+ // TODO(gw): Use a proper algorithm to select
+ // whether this item should be rendered with
+ // subpixel AA!
+ let mut render_mode = self.config
+ .default_font_render_mode
+ .limit_by(font_instance.render_mode);
+ let mut flags = font_instance.flags;
+ if let Some(options) = glyph_options {
+ render_mode = render_mode.limit_by(options.render_mode);
+ flags |= options.flags;
+ }
+
+ let font = FontInstance::new(
+ Arc::clone(font_instance),
+ (*text_color).into(),
+ render_mode,
+ flags,
+ );
+
+ // TODO(gw): It'd be nice not to have to allocate here for creating
+ // the primitive key, when the common case is that the
+ // hash will match and we won't end up creating a new
+ // primitive template.
+ let prim_offset = prim_info.rect.origin.to_vector() - offset;
+ let glyphs = glyph_range
+ .iter()
+ .map(|glyph| {
+ GlyphInstance {
+ index: glyph.index,
+ point: glyph.point - prim_offset,
+ }
+ })
+ .collect();
+
+ TextRun {
+ glyphs: Arc::new(glyphs),
+ font,
+ shadow: false,
+ }
+ };
+
+ self.add_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ prim_info,
+ Vec::new(),
+ text_run,
+ );
+ }
+
+ pub fn add_image(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ info: &LayoutPrimitiveInfo,
+ stretch_size: LayoutSize,
+ mut tile_spacing: LayoutSize,
+ image_key: ImageKey,
+ image_rendering: ImageRendering,
+ alpha_type: AlphaType,
+ color: ColorF,
+ ) {
+ let mut prim_rect = info.rect;
+ simplify_repeated_primitive(&stretch_size, &mut tile_spacing, &mut prim_rect);
+ let info = LayoutPrimitiveInfo {
+ rect: prim_rect,
+ .. *info
+ };
+
+ self.add_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ &info,
+ Vec::new(),
+ Image {
+ key: image_key,
+ tile_spacing: tile_spacing.into(),
+ stretch_size: stretch_size.into(),
+ color: color.into(),
+ image_rendering,
+ alpha_type,
+ },
+ );
+ }
+
+ pub fn add_yuv_image(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ info: &LayoutPrimitiveInfo,
+ yuv_data: YuvData,
+ color_depth: ColorDepth,
+ color_space: YuvColorSpace,
+ color_range: ColorRange,
+ image_rendering: ImageRendering,
+ ) {
+ let format = yuv_data.get_format();
+ let yuv_key = match yuv_data {
+ YuvData::NV12(plane_0, plane_1) => [plane_0, plane_1, ImageKey::DUMMY],
+ YuvData::PlanarYCbCr(plane_0, plane_1, plane_2) => [plane_0, plane_1, plane_2],
+ YuvData::InterleavedYCbCr(plane_0) => [plane_0, ImageKey::DUMMY, ImageKey::DUMMY],
+ };
+
+ self.add_nonshadowable_primitive(
+ spatial_node_index,
+ clip_chain_id,
+ info,
+ Vec::new(),
+ YuvImage {
+ color_depth,
+ yuv_key,
+ format,
+ color_space,
+ color_range,
+ image_rendering,
+ },
+ );
+ }
+
+ fn add_primitive_instance_to_3d_root(
+ &mut self,
+ prim: ExtendedPrimitiveInstance,
+ ) {
+ // find the 3D root and append to the children list
+ for sc in self.sc_stack.iter_mut().rev() {
+ match sc.context_3d {
+ Picture3DContext::In { root_data: Some(ref mut prims), .. } => {
+ prims.push(prim);
+ break;
+ }
+ Picture3DContext::In { .. } => {}
+ Picture3DContext::Out => panic!("Unable to find 3D root"),
+ }
+ }
+ }
+
+ pub fn add_backdrop_filter(
+ &mut self,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ info: &LayoutPrimitiveInfo,
+ filters: Vec<Filter>,
+ filter_datas: Vec<FilterData>,
+ filter_primitives: Vec<FilterPrimitive>,
+ ) {
+ let mut backdrop_pic_index = match self.cut_backdrop_picture() {
+ // Backdrop contains no content, so no need to add backdrop-filter
+ None => return,
+ Some(backdrop_pic_index) => backdrop_pic_index,
+ };
+
+ let backdrop_spatial_node_index = self.prim_store.pictures[backdrop_pic_index.0].spatial_node_index;
+ let requested_raster_space = self.sc_stack.last().expect("no active stacking context").requested_raster_space;
+
+ let mut instance = self.create_primitive(
+ info,
+ // TODO(cbrewster): This is a bit of a hack to help figure out the correct sizing of the backdrop
+ // region. By makings sure to include this, the clip chain instance computes the correct clip rect,
+ // but we don't actually apply the filtered backdrop clip yet (this is done to the last instance in
+ // the filter chain below).
+ backdrop_spatial_node_index,
+ clip_chain_id,
+ Backdrop {
+ pic_index: backdrop_pic_index,
+ spatial_node_index,
+ border_rect: info.rect.into(),
+ },
+ );
+
+ // We will append the filtered backdrop to the backdrop root, but we need to
+ // make sure all clips between the current stacking context and backdrop root
+ // are taken into account. So we wrap the backdrop filter instance with a picture with
+ // a clip for each stacking context.
+ for stacking_context in self.sc_stack.iter().rev().take_while(|sc| !sc.is_backdrop_root) {
+ let clip_chain_id = stacking_context.clip_chain_id;
+ let prim_flags = stacking_context.prim_flags;
+ let composite_mode = None;
+
+ let mut prim_list = PrimitiveList::empty();
+ prim_list.add_prim(
+ instance,
+ LayoutRect::zero(),
+ backdrop_spatial_node_index,
+ prim_flags,
+ );
+
+ backdrop_pic_index = PictureIndex(self.prim_store.pictures
+ .alloc()
+ .init(PicturePrimitive::new_image(
+ composite_mode.clone(),
+ Picture3DContext::Out,
+ None,
+ true,
+ prim_flags,
+ requested_raster_space,
+ prim_list,
+ backdrop_spatial_node_index,
+ None,
+ PictureOptions {
+ inflate_if_required: false,
+ },
+ ))
+ );
+
+ instance = create_prim_instance(
+ backdrop_pic_index,
+ composite_mode.into(),
+ clip_chain_id,
+ &mut self.interners,
+ );
+ }
+
+ let (mut filtered_pic_index, mut filtered_instance) = self.wrap_prim_with_filters(
+ instance,
+ backdrop_pic_index,
+ filters,
+ filter_primitives,
+ filter_datas,
+ info.flags,
+ requested_raster_space,
+ backdrop_spatial_node_index,
+ false,
+ );
+
+ // Apply filters from all stacking contexts up to, but not including the backdrop root.
+ // Gecko pushes separate stacking contexts for filters and opacity,
+ // so we must iterate through multiple stacking contexts to find all effects
+ // that need to be applied to the filtered backdrop.
+ let backdrop_root_pos = self.sc_stack.iter().rposition(|sc| sc.is_backdrop_root).expect("no backdrop root?");
+ for i in ((backdrop_root_pos + 1)..self.sc_stack.len()).rev() {
+ let stacking_context = &self.sc_stack[i];
+ let filters = stacking_context.composite_ops.filters.clone();
+ let filter_primitives = stacking_context.composite_ops.filter_primitives.clone();
+ let filter_datas = stacking_context.composite_ops.filter_datas.clone();
+
+ let (pic_index, instance) = self.wrap_prim_with_filters(
+ filtered_instance,
+ filtered_pic_index,
+ filters,
+ filter_primitives,
+ filter_datas,
+ info.flags,
+ requested_raster_space,
+ backdrop_spatial_node_index,
+ false,
+ );
+
+ filtered_instance = instance;
+ filtered_pic_index = pic_index;
+ }
+
+ filtered_instance.clip_chain_id = clip_chain_id;
+
+ self.sc_stack
+ .iter_mut()
+ .rev()
+ .find(|sc| sc.is_backdrop_root)
+ .unwrap()
+ .prim_list
+ .add_prim(
+ filtered_instance,
+ LayoutRect::zero(),
+ backdrop_spatial_node_index,
+ info.flags,
+ );
+ }
+
+ pub fn cut_backdrop_picture(&mut self) -> Option<PictureIndex> {
+ let mut flattened_items = None;
+ let mut backdrop_root = None;
+ let mut spatial_node_index = SpatialNodeIndex::INVALID;
+ let mut prim_flags = PrimitiveFlags::default();
+ for sc in self.sc_stack.iter_mut().rev() {
+ // Add child contents to parent stacking context
+ if let Some((_, flattened_instance)) = flattened_items.take() {
+ sc.prim_list.add_prim(
+ flattened_instance,
+ LayoutRect::zero(),
+ spatial_node_index,
+ prim_flags,
+ );
+ }
+ flattened_items = sc.cut_item_sequence(
+ &mut self.prim_store,
+ &mut self.interners,
+ None,
+ Picture3DContext::Out,
+ );
+ spatial_node_index = sc.spatial_node_index;
+ prim_flags = sc.prim_flags;
+ if sc.is_backdrop_root {
+ backdrop_root = Some(sc);
+ break;
+ }
+ }
+
+ let (pic_index, instance) = flattened_items?;
+ self.prim_store.pictures[pic_index.0].requested_composite_mode = Some(PictureCompositeMode::Blit(BlitReason::BACKDROP));
+ backdrop_root.expect("no backdrop root found")
+ .prim_list
+ .add_prim(
+ instance,
+ LayoutRect::zero(),
+ spatial_node_index,
+ prim_flags,
+ );
+
+ Some(pic_index)
+ }
+
+ fn wrap_prim_with_filters(
+ &mut self,
+ mut cur_instance: PrimitiveInstance,
+ mut current_pic_index: PictureIndex,
+ mut filter_ops: Vec<Filter>,
+ mut filter_primitives: Vec<FilterPrimitive>,
+ filter_datas: Vec<FilterData>,
+ flags: PrimitiveFlags,
+ requested_raster_space: RasterSpace,
+ spatial_node_index: SpatialNodeIndex,
+ inflate_if_required: bool,
+ ) -> (PictureIndex, PrimitiveInstance) {
+ // TODO(cbrewster): Currently CSS and SVG filters live side by side in WebRender, but unexpected results will
+ // happen if they are used simulataneously. Gecko only provides either filter ops or filter primitives.
+ // At some point, these two should be combined and CSS filters should be expressed in terms of SVG filters.
+ assert!(filter_ops.is_empty() || filter_primitives.is_empty(),
+ "Filter ops and filter primitives are not allowed on the same stacking context.");
+
+ // For each filter, create a new image with that composite mode.
+ let mut current_filter_data_index = 0;
+ for filter in &mut filter_ops {
+ let composite_mode = Some(match *filter {
+ Filter::ComponentTransfer => {
+ let filter_data =
+ &filter_datas[current_filter_data_index];
+ let filter_data = filter_data.sanitize();
+ current_filter_data_index = current_filter_data_index + 1;
+ if filter_data.is_identity() {
+ continue
+ } else {
+ let filter_data_key = SFilterDataKey {
+ data:
+ SFilterData {
+ r_func: SFilterDataComponent::from_functype_values(
+ filter_data.func_r_type, &filter_data.r_values),
+ g_func: SFilterDataComponent::from_functype_values(
+ filter_data.func_g_type, &filter_data.g_values),
+ b_func: SFilterDataComponent::from_functype_values(
+ filter_data.func_b_type, &filter_data.b_values),
+ a_func: SFilterDataComponent::from_functype_values(
+ filter_data.func_a_type, &filter_data.a_values),
+ },
+ };
+
+ let handle = self.interners
+ .filter_data
+ .intern(&filter_data_key, || ());
+ PictureCompositeMode::ComponentTransferFilter(handle)
+ }
+ }
+ _ => PictureCompositeMode::Filter(filter.clone()),
+ });
+
+ let mut prim_list = PrimitiveList::empty();
+ prim_list.add_prim(
+ cur_instance.clone(),
+ LayoutRect::zero(),
+ spatial_node_index,
+ flags,
+ );
+
+ let filter_pic_index = PictureIndex(self.prim_store.pictures
+ .alloc()
+ .init(PicturePrimitive::new_image(
+ composite_mode.clone(),
+ Picture3DContext::Out,
+ None,
+ true,
+ flags,
+ requested_raster_space,
+ prim_list,
+ spatial_node_index,
+ None,
+ PictureOptions {
+ inflate_if_required,
+ },
+ ))
+ );
+
+ current_pic_index = filter_pic_index;
+ cur_instance = create_prim_instance(
+ current_pic_index,
+ composite_mode.into(),
+ ClipChainId::NONE,
+ &mut self.interners,
+ );
+
+ if cur_instance.is_chased() {
+ println!("\tis a composite picture for a stacking context with {:?}", filter);
+ }
+
+ // Run the optimize pass on this picture, to see if we can
+ // collapse opacity and avoid drawing to an off-screen surface.
+ self.prim_store.optimize_picture_if_possible(current_pic_index);
+ }
+
+ if !filter_primitives.is_empty() {
+ let filter_datas = filter_datas.iter()
+ .map(|filter_data| filter_data.sanitize())
+ .map(|filter_data| {
+ SFilterData {
+ r_func: SFilterDataComponent::from_functype_values(
+ filter_data.func_r_type, &filter_data.r_values),
+ g_func: SFilterDataComponent::from_functype_values(
+ filter_data.func_g_type, &filter_data.g_values),
+ b_func: SFilterDataComponent::from_functype_values(
+ filter_data.func_b_type, &filter_data.b_values),
+ a_func: SFilterDataComponent::from_functype_values(
+ filter_data.func_a_type, &filter_data.a_values),
+ }
+ })
+ .collect();
+
+ // Sanitize filter inputs
+ for primitive in &mut filter_primitives {
+ primitive.sanitize();
+ }
+
+ let composite_mode = PictureCompositeMode::SvgFilter(
+ filter_primitives,
+ filter_datas,
+ );
+
+ let mut prim_list = PrimitiveList::empty();
+ prim_list.add_prim(
+ cur_instance.clone(),
+ LayoutRect::zero(),
+ spatial_node_index,
+ flags,
+ );
+
+ let filter_pic_index = PictureIndex(self.prim_store.pictures
+ .alloc()
+ .init(PicturePrimitive::new_image(
+ Some(composite_mode.clone()),
+ Picture3DContext::Out,
+ None,
+ true,
+ flags,
+ requested_raster_space,
+ prim_list,
+ spatial_node_index,
+ None,
+ PictureOptions {
+ inflate_if_required,
+ },
+ ))
+ );
+
+ current_pic_index = filter_pic_index;
+ cur_instance = create_prim_instance(
+ current_pic_index,
+ Some(composite_mode).into(),
+ ClipChainId::NONE,
+ &mut self.interners,
+ );
+
+ if cur_instance.is_chased() {
+ println!("\tis a composite picture for a stacking context with an SVG filter");
+ }
+
+ // Run the optimize pass on this picture, to see if we can
+ // collapse opacity and avoid drawing to an off-screen surface.
+ self.prim_store.optimize_picture_if_possible(current_pic_index);
+ }
+ (current_pic_index, cur_instance)
+ }
+}
+
+
+pub trait CreateShadow {
+ fn create_shadow(&self, shadow: &Shadow) -> Self;
+}
+
+pub trait IsVisible {
+ fn is_visible(&self) -> bool;
+}
+
+/// A primitive instance + some extra information about the primitive. This is
+/// stored when constructing 3d rendering contexts, which involve cutting
+/// primitive lists.
+struct ExtendedPrimitiveInstance {
+ instance: PrimitiveInstance,
+ spatial_node_index: SpatialNodeIndex,
+ flags: PrimitiveFlags,
+}
+
+/// Properties of a stacking context that are maintained
+/// during creation of the scene. These structures are
+/// not persisted after the initial scene build.
+struct FlattenedStackingContext {
+ /// The list of primitive instances added to this stacking context.
+ prim_list: PrimitiveList,
+
+ /// Primitive instance flags for compositing this stacking context
+ prim_flags: PrimitiveFlags,
+
+ /// Whether or not the caller wants this drawn in
+ /// screen space (quality) or local space (performance)
+ requested_raster_space: RasterSpace,
+
+ /// The positioning node for this stacking context
+ spatial_node_index: SpatialNodeIndex,
+
+ /// The clip chain for this stacking context
+ clip_chain_id: ClipChainId,
+ clip_id: Option<ClipId>,
+
+ /// If set, this should be provided to caller
+ /// as an output texture.
+ frame_output_pipeline_id: Option<PipelineId>,
+
+ /// The list of filters / mix-blend-mode for this
+ /// stacking context.
+ composite_ops: CompositeOps,
+
+ /// Bitfield of reasons this stacking context needs to
+ /// be an offscreen surface.
+ blit_reason: BlitReason,
+
+ /// Pipeline this stacking context belongs to.
+ pipeline_id: PipelineId,
+
+ /// CSS transform-style property.
+ transform_style: TransformStyle,
+
+ /// Defines the relationship to a preserve-3D hiearachy.
+ context_3d: Picture3DContext<ExtendedPrimitiveInstance>,
+
+ /// True if this stacking context is a backdrop root.
+ is_backdrop_root: bool,
+
+ /// True if this stacking context is redundant (i.e. doesn't require a surface)
+ is_redundant: bool,
+
+ /// A helper struct to snap local rects in device space. During frame
+ /// building we may establish new raster roots, however typically that is in
+ /// cases where we won't be applying snapping (e.g. has perspective), or in
+ /// edge cases (e.g. SVG filter) where we can accept slightly incorrect
+ /// behaviour in favour of getting the common case right.
+ snap_to_device: SpaceSnapper,
+}
+
+impl FlattenedStackingContext {
+ /// Return true if the stacking context has a valid preserve-3d property
+ pub fn is_3d(&self) -> bool {
+ self.transform_style == TransformStyle::Preserve3D && self.composite_ops.is_empty()
+ }
+
+ /// Set up appropriate cluster flags for picture caching on this stacking context.
+ fn init_picture_caching(
+ &mut self,
+ spatial_tree: &SpatialTree,
+ clip_store: &ClipStore,
+ quality_settings: &QualitySettings,
+ ) -> usize {
+ struct SliceInfo {
+ cluster_index: usize,
+ scroll_root: SpatialNodeIndex,
+ cluster_flags: ClusterFlags,
+ }
+
+ let mut content_slice_count = 0;
+ let mut slices: Vec<SliceInfo> = Vec::new();
+
+ // Step through each cluster, and work out where the slice boundaries should be.
+ for (cluster_index, cluster) in self.prim_list.clusters.iter().enumerate() {
+ let scroll_root = spatial_tree.find_scroll_root(
+ cluster.spatial_node_index,
+ );
+
+ // We want to create a slice in the following conditions:
+ // (1) This cluster is a scrollbar
+ // (2) Certain conditions when the scroll root changes (see below)
+ // (3) No slice exists yet
+ let mut cluster_flags = ClusterFlags::empty();
+
+ if cluster.flags.contains(ClusterFlags::SCROLLBAR_CONTAINER) {
+ // Scrollbar containers need to ensure that a new slice is
+ // created both before and after the scrollbar, so that no
+ // other prims with the same scroll root sneak into this slice.
+ cluster_flags.insert(
+ ClusterFlags::CREATE_PICTURE_CACHE_PRE |
+ ClusterFlags::CREATE_PICTURE_CACHE_POST
+ );
+ }
+
+ let create_new_slice_for_scroll_root =
+ slices.last().map(|slice| {
+ match (slice.scroll_root, scroll_root) {
+ (ROOT_SPATIAL_NODE_INDEX, ROOT_SPATIAL_NODE_INDEX) => {
+ // Both current slice and this cluster are fixed position, no need to cut
+ false
+ }
+ (ROOT_SPATIAL_NODE_INDEX, _) => {
+ // A real scroll root is being established, so create a cache slice
+ true
+ }
+ (_, ROOT_SPATIAL_NODE_INDEX) => {
+ // If quality settings force subpixel AA over performance, skip creating
+ // a slice for the fixed position element(s) here.
+ if quality_settings.force_subpixel_aa_where_possible {
+ return false;
+ }
+
+ // A fixed position slice is encountered within a scroll root. Only create
+ // a slice in this case if all the clips referenced by this cluster are also
+ // fixed position. There's no real point in creating slices for these cases,
+ // since we'll have to rasterize them as the scrolling clip moves anyway. It
+ // also allows us to retain subpixel AA in these cases. For these types of
+ // slices, the intra-slice dirty rect handling typically works quite well
+ // (a common case is parallax scrolling effects).
+ for prim_instance in &cluster.prim_instances {
+ let mut current_clip_chain_id = prim_instance.clip_chain_id;
+
+ while current_clip_chain_id != ClipChainId::NONE {
+ let clip_chain_node = &clip_store
+ .clip_chain_nodes[current_clip_chain_id.0 as usize];
+ let spatial_root = spatial_tree.find_scroll_root(clip_chain_node.spatial_node_index);
+ if spatial_root != ROOT_SPATIAL_NODE_INDEX {
+ return false;
+ }
+ current_clip_chain_id = clip_chain_node.parent_clip_chain_id;
+ }
+ }
+
+ true
+ }
+ (curr_scroll_root, scroll_root) => {
+ // Two scrolling roots - only need a new slice if they differ
+ curr_scroll_root != scroll_root
+ }
+ }
+ }).unwrap_or(true);
+
+ if create_new_slice_for_scroll_root {
+ cluster_flags.insert(ClusterFlags::CREATE_PICTURE_CACHE_PRE);
+ }
+
+ // Create a new slice if required
+ if !cluster_flags.is_empty() {
+ slices.push(SliceInfo {
+ cluster_index,
+ scroll_root,
+ cluster_flags,
+ });
+ }
+ }
+
+ // If the page would create too many slices (an arbitrary definition where
+ // it's assumed the GPU memory + compositing overhead would be too high)
+ // then just create a single picture cache for the entire content. This at
+ // least means that we can cache small content changes efficiently when
+ // scrolling isn't occurring. Scrolling regions will be handled reasonably
+ // efficiently by the dirty rect tracking (since it's likely that if the
+ // page has so many slices there isn't a single major scroll region).
+ const MAX_CONTENT_SLICES: usize = 8;
+
+ if slices.len() > MAX_CONTENT_SLICES {
+ if let Some(cluster) = self.prim_list.clusters.first_mut() {
+ content_slice_count = 1;
+ cluster.flags.insert(ClusterFlags::CREATE_PICTURE_CACHE_PRE);
+ cluster.cache_scroll_root = None;
+ }
+ } else {
+ // Walk the list of slices, setting appropriate flags on the clusters which are
+ // later used during setup_picture_caching.
+ for slice in slices.drain(..) {
+ content_slice_count += 1;
+ let cluster = &mut self.prim_list.clusters[slice.cluster_index];
+ // Mark that this cluster creates a picture cache slice
+ cluster.flags.insert(slice.cluster_flags);
+ cluster.cache_scroll_root = Some(slice.scroll_root);
+ }
+ }
+
+ // Always end the cache at the end of the stacking context, so that we don't
+ // cache anything from primitives outside this pipeline in the same slice.
+ if let Some(cluster) = self.prim_list.clusters.last_mut() {
+ cluster.flags.insert(ClusterFlags::CREATE_PICTURE_CACHE_POST);
+ }
+
+ content_slice_count
+ }
+
+ /// Return true if the stacking context isn't needed.
+ pub fn is_redundant(
+ context_3d: &Picture3DContext<ExtendedPrimitiveInstance>,
+ composite_ops: &CompositeOps,
+ prim_flags: PrimitiveFlags,
+ blit_reason: BlitReason,
+ requested_raster_space: RasterSpace,
+ parent: &FlattenedStackingContext,
+ ) -> bool {
+ // Any 3d context is required
+ if let Picture3DContext::In { .. } = context_3d {
+ return false;
+ }
+
+ // If there are filters / mix-blend-mode
+ if !composite_ops.filters.is_empty() {
+ return false;
+ }
+
+ // If there are svg filters
+ if !composite_ops.filter_primitives.is_empty() {
+ return false;
+ }
+
+ // We can skip mix-blend modes if they are the first primitive in a stacking context,
+ // see pop_stacking_context for a full explanation.
+ if composite_ops.mix_blend_mode.is_some() &&
+ !parent.prim_list.is_empty() {
+ return false;
+ }
+
+ // If backface visibility is explicitly set.
+ if !prim_flags.contains(PrimitiveFlags::IS_BACKFACE_VISIBLE) {
+ return false;
+ }
+
+ // If rasterization space is different
+ if requested_raster_space != parent.requested_raster_space {
+ return false;
+ }
+
+ // If need to isolate in surface due to clipping / mix-blend-mode
+ if !blit_reason.is_empty() {
+ return false;
+ }
+
+ // If this stacking context is a scrollbar, retain it so it can form a picture cache slice
+ if prim_flags.contains(PrimitiveFlags::IS_SCROLLBAR_CONTAINER) {
+ return false;
+ }
+
+ // It is redundant!
+ true
+ }
+
+ /// Cut the sequence of the immediate children recorded so far and generate a picture from them.
+ pub fn cut_item_sequence(
+ &mut self,
+ prim_store: &mut PrimitiveStore,
+ interners: &mut Interners,
+ composite_mode: Option<PictureCompositeMode>,
+ flat_items_context_3d: Picture3DContext<OrderedPictureChild>,
+ ) -> Option<(PictureIndex, PrimitiveInstance)> {
+ if self.prim_list.is_empty() {
+ return None
+ }
+
+ let pic_index = PictureIndex(prim_store.pictures
+ .alloc()
+ .init(PicturePrimitive::new_image(
+ composite_mode.clone(),
+ flat_items_context_3d,
+ None,
+ true,
+ self.prim_flags,
+ self.requested_raster_space,
+ mem::replace(&mut self.prim_list, PrimitiveList::empty()),
+ self.spatial_node_index,
+ None,
+ PictureOptions::default(),
+ ))
+ );
+
+ let prim_instance = create_prim_instance(
+ pic_index,
+ composite_mode.into(),
+ self.clip_chain_id,
+ interners,
+ );
+
+ Some((pic_index, prim_instance))
+ }
+}
+
+/// A primitive that is added while a shadow context is
+/// active is stored as a pending primitive and only
+/// added to pictures during pop_all_shadows.
+pub struct PendingPrimitive<T> {
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+ info: LayoutPrimitiveInfo,
+ prim: T,
+}
+
+/// As shadows are pushed, they are stored as pending
+/// shadows, and handled at once during pop_all_shadows.
+pub struct PendingShadow {
+ shadow: Shadow,
+ should_inflate: bool,
+ spatial_node_index: SpatialNodeIndex,
+ clip_chain_id: ClipChainId,
+}
+
+pub enum ShadowItem {
+ Shadow(PendingShadow),
+ Image(PendingPrimitive<Image>),
+ LineDecoration(PendingPrimitive<LineDecoration>),
+ NormalBorder(PendingPrimitive<NormalBorderPrim>),
+ Primitive(PendingPrimitive<PrimitiveKeyKind>),
+ TextRun(PendingPrimitive<TextRun>),
+}
+
+impl From<PendingPrimitive<Image>> for ShadowItem {
+ fn from(image: PendingPrimitive<Image>) -> Self {
+ ShadowItem::Image(image)
+ }
+}
+
+impl From<PendingPrimitive<LineDecoration>> for ShadowItem {
+ fn from(line_dec: PendingPrimitive<LineDecoration>) -> Self {
+ ShadowItem::LineDecoration(line_dec)
+ }
+}
+
+impl From<PendingPrimitive<NormalBorderPrim>> for ShadowItem {
+ fn from(border: PendingPrimitive<NormalBorderPrim>) -> Self {
+ ShadowItem::NormalBorder(border)
+ }
+}
+
+impl From<PendingPrimitive<PrimitiveKeyKind>> for ShadowItem {
+ fn from(container: PendingPrimitive<PrimitiveKeyKind>) -> Self {
+ ShadowItem::Primitive(container)
+ }
+}
+
+impl From<PendingPrimitive<TextRun>> for ShadowItem {
+ fn from(text_run: PendingPrimitive<TextRun>) -> Self {
+ ShadowItem::TextRun(text_run)
+ }
+}
+
+fn create_prim_instance(
+ pic_index: PictureIndex,
+ composite_mode_key: PictureCompositeKey,
+ clip_chain_id: ClipChainId,
+ interners: &mut Interners,
+) -> PrimitiveInstance {
+ let pic_key = PictureKey::new(
+ Picture { composite_mode_key },
+ );
+
+ let data_handle = interners
+ .picture
+ .intern(&pic_key, || ());
+
+ PrimitiveInstance::new(
+ LayoutRect::max_rect(),
+ PrimitiveInstanceKind::Picture {
+ data_handle,
+ pic_index,
+ segment_instance_index: SegmentInstanceIndex::INVALID,
+ },
+ clip_chain_id,
+ )
+}
+
+fn filter_ops_for_compositing(
+ input_filters: ItemRange<FilterOp>,
+) -> Vec<Filter> {
+ // TODO(gw): Now that we resolve these later on,
+ // we could probably make it a bit
+ // more efficient than cloning these here.
+ input_filters.iter().map(|filter| filter.into()).collect()
+}
+
+fn filter_datas_for_compositing(
+ input_filter_datas: &[TempFilterData],
+) -> Vec<FilterData> {
+ // TODO(gw): Now that we resolve these later on,
+ // we could probably make it a bit
+ // more efficient than cloning these here.
+ let mut filter_datas = vec![];
+ for temp_filter_data in input_filter_datas {
+ let func_types : Vec<ComponentTransferFuncType> = temp_filter_data.func_types.iter().collect();
+ debug_assert!(func_types.len() == 4);
+ filter_datas.push( FilterData {
+ func_r_type: func_types[0],
+ r_values: temp_filter_data.r_values.iter().collect(),
+ func_g_type: func_types[1],
+ g_values: temp_filter_data.g_values.iter().collect(),
+ func_b_type: func_types[2],
+ b_values: temp_filter_data.b_values.iter().collect(),
+ func_a_type: func_types[3],
+ a_values: temp_filter_data.a_values.iter().collect(),
+ });
+ }
+ filter_datas
+}
+
+fn filter_primitives_for_compositing(
+ input_filter_primitives: ItemRange<FilterPrimitive>,
+) -> Vec<FilterPrimitive> {
+ // Resolve these in the flattener?
+ // TODO(gw): Now that we resolve these later on,
+ // we could probably make it a bit
+ // more efficient than cloning these here.
+ input_filter_primitives.iter().map(|primitive| primitive).collect()
+}
+
+fn process_repeat_size(
+ snapped_rect: &LayoutRect,
+ unsnapped_rect: &LayoutRect,
+ repeat_size: LayoutSize,
+) -> LayoutSize {
+ // FIXME(aosmond): The tile size is calculated based on several parameters
+ // during display list building. It may produce a slightly different result
+ // than the bounds due to floating point error accumulation, even though in
+ // theory they should be the same. We do a fuzzy check here to paper over
+ // that. It may make more sense to push the original parameters into scene
+ // building and let it do a saner calculation with more information (e.g.
+ // the snapped values).
+ const EPSILON: f32 = 0.001;
+ LayoutSize::new(
+ if repeat_size.width.approx_eq_eps(&unsnapped_rect.size.width, &EPSILON) {
+ snapped_rect.size.width
+ } else {
+ repeat_size.width
+ },
+ if repeat_size.height.approx_eq_eps(&unsnapped_rect.size.height, &EPSILON) {
+ snapped_rect.size.height
+ } else {
+ repeat_size.height
+ },
+ )
+}
+
+/// Given a PrimitiveList and scroll root, construct a tile cache primitive instance
+/// that wraps the primitive list.
+fn create_tile_cache(
+ slice: usize,
+ slice_flags: SliceFlags,
+ scroll_root: SpatialNodeIndex,
+ prim_list: PrimitiveList,
+ background_color: Option<ColorF>,
+ shared_clips: Vec<ClipInstance>,
+ interners: &mut Interners,
+ prim_store: &mut PrimitiveStore,
+ clip_store: &mut ClipStore,
+ picture_cache_spatial_nodes: &mut FastHashSet<SpatialNodeIndex>,
+ frame_builder_config: &FrameBuilderConfig,
+) -> PrimitiveInstance {
+ // Add this spatial node to the list to check for complex transforms
+ // at the start of a frame build.
+ picture_cache_spatial_nodes.insert(scroll_root);
+
+ // Now, create a picture with tile caching enabled that will hold all
+ // of the primitives selected as belonging to the main scroll root.
+ let pic_key = PictureKey::new(
+ Picture {
+ composite_mode_key: PictureCompositeKey::Identity,
+ },
+ );
+
+ let pic_data_handle = interners
+ .picture
+ .intern(&pic_key, || ());
+
+ // Build a clip-chain for the tile cache, that contains any of the shared clips
+ // we will apply when drawing the tiles. In all cases provided by Gecko, these
+ // are rectangle clips with a scale/offset transform only, and get handled as
+ // a simple local clip rect in the vertex shader. However, this should in theory
+ // also work with any complex clips, such as rounded rects and image masks, by
+ // producing a clip mask that is applied to the picture cache tiles.
+ let mut parent_clip_chain_id = ClipChainId::NONE;
+ for clip_instance in &shared_clips {
+ // Add this spatial node to the list to check for complex transforms
+ // at the start of a frame build.
+ picture_cache_spatial_nodes.insert(clip_instance.spatial_node_index);
+
+ parent_clip_chain_id = clip_store.add_clip_chain_node(
+ clip_instance.handle,
+ clip_instance.spatial_node_index,
+ parent_clip_chain_id,
+ );
+ }
+
+ let tile_cache = Box::new(TileCacheInstance::new(
+ slice,
+ slice_flags,
+ scroll_root,
+ background_color,
+ shared_clips,
+ parent_clip_chain_id,
+ frame_builder_config,
+ ));
+
+ let pic_index = prim_store.pictures.alloc().init(PicturePrimitive::new_image(
+ Some(PictureCompositeMode::TileCache { }),
+ Picture3DContext::Out,
+ None,
+ true,
+ PrimitiveFlags::IS_BACKFACE_VISIBLE,
+ RasterSpace::Screen,
+ prim_list,
+ scroll_root,
+ Some(tile_cache),
+ PictureOptions::default(),
+ ));
+
+ PrimitiveInstance::new(
+ LayoutRect::max_rect(),
+ PrimitiveInstanceKind::Picture {
+ data_handle: pic_data_handle,
+ pic_index: PictureIndex(pic_index),
+ segment_instance_index: SegmentInstanceIndex::INVALID,
+ },
+ parent_clip_chain_id,
+ )
+}
+
+// Helper fn to collect clip handles from a given clip chain.
+fn add_clips(
+ clip_chain_id: ClipChainId,
+ prim_clips: &mut Vec<ClipInstance>,
+ clip_store: &ClipStore,
+ interners: &Interners,
+) {
+ let mut current_clip_chain_id = clip_chain_id;
+
+ while current_clip_chain_id != ClipChainId::NONE {
+ let clip_chain_node = &clip_store
+ .clip_chain_nodes[current_clip_chain_id.0 as usize];
+
+ let clip_node_data = &interners.clip[clip_chain_node.handle];
+ if let ClipNodeKind::Rectangle = clip_node_data.clip_node_kind {
+ prim_clips.push(ClipInstance::new(clip_chain_node.handle, clip_chain_node.spatial_node_index));
+ }
+
+ current_clip_chain_id = clip_chain_node.parent_clip_chain_id;
+ }
+}
diff --git a/third_party/webrender/webrender/src/screen_capture.rs b/third_party/webrender/webrender/src/screen_capture.rs
new file mode 100644
index 00000000000..56fdf458674
--- /dev/null
+++ b/third_party/webrender/webrender/src/screen_capture.rs
@@ -0,0 +1,493 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! Screen capture infrastructure for the Gecko Profiler and Composition Recorder.
+
+use std::collections::HashMap;
+
+use api::{ImageFormat, TextureTarget};
+use api::units::*;
+use gleam::gl::GlType;
+
+use crate::device::{Device, PBO, DrawTarget, ReadTarget, Texture, TextureFilter};
+use crate::internal_types::RenderTargetInfo;
+use crate::renderer::Renderer;
+use crate::util::round_up_to_multiple;
+
+/// A handle to a screenshot that is being asynchronously captured and scaled.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
+pub struct AsyncScreenshotHandle(usize);
+
+/// A handle to a recorded frame that was captured.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Eq, PartialEq)]
+pub struct RecordedFrameHandle(usize);
+
+/// An asynchronously captured screenshot bound to a PBO which has not yet been mapped for copying.
+struct AsyncScreenshot {
+ /// The PBO that will contain the screenshot data.
+ pbo: PBO,
+ /// The size of the screenshot.
+ screenshot_size: DeviceIntSize,
+ /// The stride of the data in the PBO.
+ buffer_stride: usize,
+ /// Thge image format of the screenshot.
+ image_format: ImageFormat,
+}
+
+/// How the `AsyncScreenshotGrabber` captures frames.
+#[derive(Debug, Eq, PartialEq)]
+enum AsyncScreenshotGrabberMode {
+ /// Capture screenshots for the Gecko profiler.
+ ///
+ /// This mode will asynchronously scale the screenshots captured.
+ ProfilerScreenshots,
+
+ /// Capture screenshots for the CompositionRecorder.
+ ///
+ /// This mode does not scale the captured screenshots.
+ CompositionRecorder,
+}
+
+/// Renderer infrastructure for capturing screenshots and scaling them asynchronously.
+pub(in crate) struct AsyncScreenshotGrabber {
+ /// The textures used to scale screenshots.
+ scaling_textures: Vec<Texture>,
+ /// PBOs available to be used for screenshot readback.
+ available_pbos: Vec<PBO>,
+ /// PBOs containing screenshots that are awaiting readback.
+ awaiting_readback: HashMap<AsyncScreenshotHandle, AsyncScreenshot>,
+ /// The handle for the net PBO that will be inserted into `in_use_pbos`.
+ next_pbo_handle: usize,
+ /// The mode the grabber operates in.
+ mode: AsyncScreenshotGrabberMode,
+}
+
+impl Default for AsyncScreenshotGrabber {
+ fn default() -> Self {
+ AsyncScreenshotGrabber {
+ scaling_textures: Vec::new(),
+ available_pbos: Vec::new(),
+ awaiting_readback: HashMap::new(),
+ next_pbo_handle: 1,
+ mode: AsyncScreenshotGrabberMode::ProfilerScreenshots,
+ }
+ }
+}
+
+impl AsyncScreenshotGrabber {
+ /// Create a new AsyncScreenshotGrabber for the composition recorder.
+ pub fn new_composition_recorder() -> Self {
+ let mut recorder = Self::default();
+ recorder.mode = AsyncScreenshotGrabberMode::CompositionRecorder;
+
+ recorder
+ }
+
+ /// Deinitialize the allocated textures and PBOs.
+ pub fn deinit(self, device: &mut Device) {
+ for texture in self.scaling_textures {
+ device.delete_texture(texture);
+ }
+
+ for pbo in self.available_pbos {
+ device.delete_pbo(pbo);
+ }
+
+ for (_, async_screenshot) in self.awaiting_readback {
+ device.delete_pbo(async_screenshot.pbo);
+ }
+ }
+
+ /// Take a screenshot and scale it asynchronously.
+ ///
+ /// The returned handle can be used to access the mapped screenshot data via
+ /// `map_and_recycle_screenshot`.
+ /// The returned size is the size of the screenshot.
+ pub fn get_screenshot(
+ &mut self,
+ device: &mut Device,
+ window_rect: DeviceIntRect,
+ buffer_size: DeviceIntSize,
+ image_format: ImageFormat,
+ ) -> (AsyncScreenshotHandle, DeviceIntSize) {
+ let screenshot_size = match self.mode {
+ AsyncScreenshotGrabberMode::ProfilerScreenshots => {
+ let scale = (buffer_size.width as f32 / window_rect.size.width as f32)
+ .min(buffer_size.height as f32 / window_rect.size.height as f32);
+
+ (window_rect.size.to_f32() * scale).round().to_i32()
+ }
+
+ AsyncScreenshotGrabberMode::CompositionRecorder => {
+ assert_eq!(buffer_size, window_rect.size);
+ buffer_size
+ }
+ };
+
+ assert!(screenshot_size.width <= buffer_size.width);
+ assert!(screenshot_size.height <= buffer_size.height);
+
+ // To ensure that we hit the fast path when reading from a
+ // framebuffer we must ensure that the width of the area we read
+ // is a multiple of the device's optimal pixel-transfer stride.
+ // The read_size should therefore be the screenshot_size with the width
+ // increased to a suitable value. We will also pass this value to
+ // scale_screenshot() as the min_texture_size, to ensure the texture is
+ // large enough to read from. In CompositionRecorder mode we read
+ // directly from the default framebuffer so are unable choose this size.
+ let read_size = match self.mode {
+ AsyncScreenshotGrabberMode::ProfilerScreenshots => {
+ let stride = (screenshot_size.width * image_format.bytes_per_pixel()) as usize;
+ let rounded = round_up_to_multiple(stride, device.optimal_pbo_stride().num_bytes(image_format));
+ let optimal_width = rounded as i32 / image_format.bytes_per_pixel();
+
+ DeviceIntSize::new(
+ optimal_width,
+ screenshot_size.height,
+ )
+ }
+ AsyncScreenshotGrabberMode::CompositionRecorder => buffer_size,
+ };
+ let required_size = read_size.area() as usize * image_format.bytes_per_pixel() as usize;
+
+ // Find an available PBO with the required size, creating a new one if necessary.
+ let pbo = {
+ let mut reusable_pbo = None;
+ while let Some(pbo) = self.available_pbos.pop() {
+ if pbo.get_reserved_size() != required_size {
+ device.delete_pbo(pbo);
+ } else {
+ reusable_pbo = Some(pbo);
+ break;
+ }
+ };
+
+ reusable_pbo.unwrap_or_else(|| device.create_pbo_with_size(required_size))
+ };
+ assert_eq!(pbo.get_reserved_size(), required_size);
+
+ let read_target = match self.mode {
+ AsyncScreenshotGrabberMode::ProfilerScreenshots => {
+ self.scale_screenshot(
+ device,
+ ReadTarget::Default,
+ window_rect,
+ buffer_size,
+ read_size,
+ screenshot_size,
+ image_format,
+ 0,
+ );
+
+ ReadTarget::from_texture(&self.scaling_textures[0], 0)
+ }
+
+ AsyncScreenshotGrabberMode::CompositionRecorder => ReadTarget::Default,
+ };
+
+ device.read_pixels_into_pbo(
+ read_target,
+ DeviceIntRect::new(DeviceIntPoint::new(0, 0), read_size),
+ image_format,
+ &pbo,
+ );
+
+ let handle = AsyncScreenshotHandle(self.next_pbo_handle);
+ self.next_pbo_handle += 1;
+
+ self.awaiting_readback.insert(
+ handle,
+ AsyncScreenshot {
+ pbo,
+ screenshot_size,
+ buffer_stride: (read_size.width * image_format.bytes_per_pixel()) as usize,
+ image_format,
+ },
+ );
+
+ (handle, screenshot_size)
+ }
+
+ /// Take the screenshot in the given `ReadTarget` and scale it to `dest_size` recursively.
+ ///
+ /// Each scaling operation scales only by a factor of two to preserve quality.
+ ///
+ /// Textures are scaled such that `scaling_textures[n]` is half the size of
+ /// `scaling_textures[n+1]`.
+ ///
+ /// After the scaling completes, the final screenshot will be in
+ /// `scaling_textures[0]`.
+ ///
+ /// The size of `scaling_textures[0]` will be increased to `min_texture_size`
+ /// so that an optimally-sized area can be read from it.
+ fn scale_screenshot(
+ &mut self,
+ device: &mut Device,
+ read_target: ReadTarget,
+ read_target_rect: DeviceIntRect,
+ buffer_size: DeviceIntSize,
+ min_texture_size: DeviceIntSize,
+ dest_size: DeviceIntSize,
+ image_format: ImageFormat,
+ level: usize,
+ ) {
+ assert_eq!(self.mode, AsyncScreenshotGrabberMode::ProfilerScreenshots);
+
+ let texture_size = {
+ let size = buffer_size * (1 << level);
+ DeviceIntSize::new(
+ size.width.max(min_texture_size.width),
+ size.height.max(min_texture_size.height),
+ )
+ };
+
+ // If we haven't created a texture for this level, or the existing
+ // texture is the wrong size, then create a new one.
+ if level == self.scaling_textures.len() || self.scaling_textures[level].get_dimensions() != texture_size {
+ let texture = device.create_texture(
+ TextureTarget::Default,
+ image_format,
+ texture_size.width,
+ texture_size.height,
+ TextureFilter::Linear,
+ Some(RenderTargetInfo { has_depth: false }),
+ 1,
+ );
+ if level == self.scaling_textures.len() {
+ self.scaling_textures.push(texture);
+ } else {
+ let old_texture = std::mem::replace(&mut self.scaling_textures[level], texture);
+ device.delete_texture(old_texture);
+ }
+ }
+ assert_eq!(self.scaling_textures[level].get_dimensions(), texture_size);
+
+ let (read_target, read_target_rect) = if read_target_rect.size.width > 2 * dest_size.width {
+ self.scale_screenshot(
+ device,
+ read_target,
+ read_target_rect,
+ buffer_size,
+ min_texture_size,
+ dest_size * 2,
+ image_format,
+ level + 1,
+ );
+
+ (
+ ReadTarget::from_texture(&self.scaling_textures[level + 1], 0),
+ DeviceIntRect::new(DeviceIntPoint::new(0, 0), dest_size * 2),
+ )
+ } else {
+ (read_target, read_target_rect)
+ };
+
+ let draw_target = DrawTarget::from_texture(&self.scaling_textures[level], 0 as _, false);
+
+ let draw_target_rect = draw_target
+ .to_framebuffer_rect(DeviceIntRect::new(DeviceIntPoint::new(0, 0), dest_size));
+
+ let read_target_rect = device_rect_as_framebuffer_rect(&read_target_rect);
+
+ if level == 0 && !device.surface_origin_is_top_left() {
+ device.blit_render_target_invert_y(
+ read_target,
+ read_target_rect,
+ draw_target,
+ draw_target_rect,
+ );
+ } else {
+ device.blit_render_target(
+ read_target,
+ read_target_rect,
+ draw_target,
+ draw_target_rect,
+ TextureFilter::Linear,
+ );
+ }
+ }
+
+ /// Map the contents of the screenshot given by the handle and copy it into
+ /// the given buffer.
+ pub fn map_and_recycle_screenshot(
+ &mut self,
+ device: &mut Device,
+ handle: AsyncScreenshotHandle,
+ dst_buffer: &mut [u8],
+ dst_stride: usize,
+ ) -> bool {
+ let AsyncScreenshot {
+ pbo,
+ screenshot_size,
+ buffer_stride,
+ image_format,
+ } = match self.awaiting_readback.remove(&handle) {
+ Some(screenshot) => screenshot,
+ None => return false,
+ };
+
+ let gl_type = device.gl().get_type();
+
+ let success = if let Some(bound_pbo) = device.map_pbo_for_readback(&pbo) {
+ let src_buffer = &bound_pbo.data;
+ let src_stride = buffer_stride;
+ let src_width =
+ screenshot_size.width as usize * image_format.bytes_per_pixel() as usize;
+
+ for (src_slice, dst_slice) in self
+ .iter_src_buffer_chunked(gl_type, src_buffer, src_stride)
+ .zip(dst_buffer.chunks_mut(dst_stride))
+ .take(screenshot_size.height as usize)
+ {
+ dst_slice[.. src_width].copy_from_slice(&src_slice[.. src_width]);
+ }
+
+ true
+ } else {
+ false
+ };
+
+ match self.mode {
+ AsyncScreenshotGrabberMode::ProfilerScreenshots => self.available_pbos.push(pbo),
+ AsyncScreenshotGrabberMode::CompositionRecorder => device.delete_pbo(pbo),
+ }
+
+ success
+ }
+
+ fn iter_src_buffer_chunked<'a>(
+ &self,
+ gl_type: GlType,
+ src_buffer: &'a [u8],
+ src_stride: usize,
+ ) -> Box<dyn Iterator<Item = &'a [u8]> + 'a> {
+ use AsyncScreenshotGrabberMode::*;
+
+ let is_angle = cfg!(windows) && gl_type == GlType::Gles;
+
+ if self.mode == CompositionRecorder && !is_angle {
+ // This is a non-ANGLE configuration. in this case, the recorded frames were captured
+ // upside down, so we have to flip them right side up.
+ Box::new(src_buffer.chunks(src_stride).rev())
+ } else {
+ // This is either an ANGLE configuration in the `CompositionRecorder` mode or a
+ // non-ANGLE configuration in the `ProfilerScreenshots` mode. In either case, the
+ // captured frames are right-side up.
+ Box::new(src_buffer.chunks(src_stride))
+ }
+ }
+}
+
+// Screen-capture specific Renderer impls.
+impl Renderer {
+ /// Record a frame for the Composition Recorder.
+ ///
+ /// The returned handle can be passed to `map_recorded_frame` to copy it into
+ /// a buffer.
+ /// The returned size is the size of the frame.
+ pub fn record_frame(
+ &mut self,
+ image_format: ImageFormat,
+ ) -> Option<(RecordedFrameHandle, DeviceIntSize)> {
+ let device_size = self.device_size()?;
+ self.device.begin_frame();
+
+ let (handle, _) = self
+ .async_frame_recorder
+ .get_or_insert_with(AsyncScreenshotGrabber::new_composition_recorder)
+ .get_screenshot(
+ &mut self.device,
+ DeviceIntRect::new(DeviceIntPoint::new(0, 0), device_size),
+ device_size,
+ image_format,
+ );
+
+ self.device.end_frame();
+
+ Some((RecordedFrameHandle(handle.0), device_size))
+ }
+
+ /// Map a frame captured for the composition recorder into the given buffer.
+ pub fn map_recorded_frame(
+ &mut self,
+ handle: RecordedFrameHandle,
+ dst_buffer: &mut [u8],
+ dst_stride: usize,
+ ) -> bool {
+ if let Some(async_frame_recorder) = self.async_frame_recorder.as_mut() {
+ async_frame_recorder.map_and_recycle_screenshot(
+ &mut self.device,
+ AsyncScreenshotHandle(handle.0),
+ dst_buffer,
+ dst_stride,
+ )
+ } else {
+ false
+ }
+ }
+
+ /// Free the data structures used by the composition recorder.
+ pub fn release_composition_recorder_structures(&mut self) {
+ if let Some(async_frame_recorder) = self.async_frame_recorder.take() {
+ self.device.begin_frame();
+ async_frame_recorder.deinit(&mut self.device);
+ self.device.end_frame();
+ }
+ }
+
+ /// Take a screenshot and scale it asynchronously.
+ ///
+ /// The returned handle can be used to access the mapped screenshot data via
+ /// `map_and_recycle_screenshot`.
+ ///
+ /// The returned size is the size of the screenshot.
+ pub fn get_screenshot_async(
+ &mut self,
+ window_rect: DeviceIntRect,
+ buffer_size: DeviceIntSize,
+ image_format: ImageFormat,
+ ) -> (AsyncScreenshotHandle, DeviceIntSize) {
+ self.device.begin_frame();
+
+ let handle = self
+ .async_screenshots
+ .get_or_insert_with(AsyncScreenshotGrabber::default)
+ .get_screenshot(&mut self.device, window_rect, buffer_size, image_format);
+
+ self.device.end_frame();
+
+ handle
+ }
+
+ /// Map the contents of the screenshot given by the handle and copy it into
+ /// the given buffer.
+ pub fn map_and_recycle_screenshot(
+ &mut self,
+ handle: AsyncScreenshotHandle,
+ dst_buffer: &mut [u8],
+ dst_stride: usize,
+ ) -> bool {
+ if let Some(async_screenshots) = self.async_screenshots.as_mut() {
+ async_screenshots.map_and_recycle_screenshot(
+ &mut self.device,
+ handle,
+ dst_buffer,
+ dst_stride,
+ )
+ } else {
+ false
+ }
+ }
+
+ /// Release the screenshot grabbing structures that the profiler was using.
+ pub fn release_profiler_structures(&mut self) {
+ if let Some(async_screenshots) = self.async_screenshots.take() {
+ self.device.begin_frame();
+ async_screenshots.deinit(&mut self.device);
+ self.device.end_frame();
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/src/segment.rs b/third_party/webrender/webrender/src/segment.rs
new file mode 100644
index 00000000000..77bca528215
--- /dev/null
+++ b/third_party/webrender/webrender/src/segment.rs
@@ -0,0 +1,1326 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! Primitive segmentation
+//!
+//! # Overview
+//!
+//! Segmenting is the process of breaking rectangular primitives into smaller rectangular
+//! primitives in order to extract parts that could benefit from a fast paths.
+//!
+//! Typically this is used to allow fully opaque segments to be rendered in the opaque
+//! pass. For example when an opaque rectangle has a non-axis-aligned transform applied,
+//! we usually have to apply some anti-aliasing around the edges which requires alpha
+//! blending. By segmenting the edges out of the center of the primitive, we can keep a
+//! large amount of pixels in the opaque pass.
+//! Segmenting also lets us avoids rasterizing parts of clip masks that we know to have
+//! no effect or to be fully masking. For example by segmenting the corners of a rounded
+//! rectangle clip, we can optimize both rendering the mask and the primitive by only
+//! rasterize the corners in the mask and not applying any clipping to the segments of
+//! the primitive that don't overlap the borders.
+//!
+//! It is a flexible system in the sense that different sources of segmentation (for
+//! example two rounded rectangle clips) can affect the segmentation, and the possibility
+//! to segment some effects such as specific clip kinds does not necessarily mean the
+//! primitive will actually be segmented.
+//!
+//! ## Segments and clipping
+//!
+//! Segments of a primitive can be either not clipped, fully clipped, or partially clipped.
+//! In the first two case we don't need a clip mask. For each partially masked segments, a
+//! mask is rasterized using a render task. All of the interesting steps happen during frame
+//! building.
+//!
+//! - The first step is to determine the segmentation and write the associated GPU data.
+//! See `PrimitiveInstance::build_segments_if_needed` and `write_brush_segment_description`
+//! in `prim_store/mod.rs` which uses the segment builder of this module.
+//! - The second step is to generate the mask render tasks.
+//! See `BrushSegment::update_clip_task` and `RenderTask::new_mask`. For each segment that
+//! needs a mask, the contribution of all clips that affect the segment is added to the
+//! mask's render task.
+//! - Segments are assigned to batches (See `batch.rs`). Segments of a given primitive can
+//! be assigned to different batches.
+//!
+//! See also the [`clip` module documentation][clip.rs] for details about how clipping
+//! information is represented.
+//!
+//!
+//! [clip.rs]: ../clip/index.html
+//!
+
+use api::{BorderRadius, ClipMode, EdgeAaSegmentMask};
+use api::units::*;
+use std::{cmp, usize};
+use crate::util::{extract_inner_rect_safe, RectHelpers};
+use smallvec::SmallVec;
+
+bitflags! {
+ pub struct ItemFlags: u8 {
+ const X_ACTIVE = 0x1;
+ const Y_ACTIVE = 0x2;
+ const HAS_MASK = 0x4;
+ }
+}
+
+// The segment builder outputs a list of these segments.
+#[derive(Debug, PartialEq)]
+pub struct Segment {
+ pub rect: LayoutRect,
+ pub has_mask: bool,
+ pub edge_flags: EdgeAaSegmentMask,
+ pub region_x: usize,
+ pub region_y: usize,
+}
+
+// The segment builder creates a list of x/y axis events
+// that are used to build a segment list. Right now, we
+// don't bother providing a list of *which* clip regions
+// are active for a given segment. Instead, if there is
+// any clip mask present in a segment, we will just end
+// up drawing each of the masks to that segment clip.
+// This is a fairly rare case, but we can detect this
+// in the future and only apply clip masks that are
+// relevant to each segment region.
+// TODO(gw): Provide clip region info with each segment.
+#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd)]
+enum EventKind {
+ // Beginning of a clip (rounded) rect.
+ BeginClip,
+ // End of a clip (rounded) rect.
+ EndClip,
+ // Begin the next region in the primitive.
+ BeginRegion,
+}
+
+// Events must be ordered such that when the coordinates
+// of two events are the same, the end events are processed
+// before the begin events. This ensures that we're able
+// to detect which regions are active for a given segment.
+impl Ord for EventKind {
+ fn cmp(&self, other: &EventKind) -> cmp::Ordering {
+ match (*self, *other) {
+ (EventKind::BeginRegion, EventKind::BeginRegion) => {
+ panic!("bug: regions must be non-overlapping")
+ }
+ (EventKind::EndClip, EventKind::BeginRegion) |
+ (EventKind::BeginRegion, EventKind::BeginClip) => {
+ cmp::Ordering::Less
+ }
+ (EventKind::BeginClip, EventKind::BeginRegion) |
+ (EventKind::BeginRegion, EventKind::EndClip) => {
+ cmp::Ordering::Greater
+ }
+ (EventKind::BeginClip, EventKind::BeginClip) |
+ (EventKind::EndClip, EventKind::EndClip) => {
+ cmp::Ordering::Equal
+ }
+ (EventKind::BeginClip, EventKind::EndClip) => {
+ cmp::Ordering::Greater
+ }
+ (EventKind::EndClip, EventKind::BeginClip) => {
+ cmp::Ordering::Less
+ }
+ }
+ }
+}
+
+// A x/y event where we will create a vertex in the
+// segment builder.
+#[derive(Debug, Eq, PartialEq, PartialOrd)]
+struct Event {
+ value: Au,
+ item_index: ItemIndex,
+ kind: EventKind,
+}
+
+impl Ord for Event {
+ fn cmp(&self, other: &Event) -> cmp::Ordering {
+ self.value
+ .cmp(&other.value)
+ .then(self.kind.cmp(&other.kind))
+ }
+}
+
+impl Event {
+ fn begin(value: f32, index: usize) -> Event {
+ Event {
+ value: Au::from_f32_px(value),
+ item_index: ItemIndex(index),
+ kind: EventKind::BeginClip,
+ }
+ }
+
+ fn end(value: f32, index: usize) -> Event {
+ Event {
+ value: Au::from_f32_px(value),
+ item_index: ItemIndex(index),
+ kind: EventKind::EndClip,
+ }
+ }
+
+ fn region(value: f32) -> Event {
+ Event {
+ value: Au::from_f32_px(value),
+ kind: EventKind::BeginRegion,
+ item_index: ItemIndex(usize::MAX),
+ }
+ }
+
+ fn update(
+ &self,
+ flag: ItemFlags,
+ items: &mut [Item],
+ region: &mut usize,
+ ) {
+ let is_active = match self.kind {
+ EventKind::BeginClip => true,
+ EventKind::EndClip => false,
+ EventKind::BeginRegion => {
+ *region += 1;
+ return;
+ }
+ };
+
+ items[self.item_index.0].flags.set(flag, is_active);
+ }
+}
+
+// An item that provides some kind of clip region (either
+// a clip in/out rect, or a mask region).
+#[derive(Debug)]
+struct Item {
+ rect: LayoutRect,
+ mode: Option<ClipMode>,
+ flags: ItemFlags,
+}
+
+impl Item {
+ fn new(
+ rect: LayoutRect,
+ mode: Option<ClipMode>,
+ has_mask: bool,
+ ) -> Item {
+ let flags = if has_mask {
+ ItemFlags::HAS_MASK
+ } else {
+ ItemFlags::empty()
+ };
+
+ Item {
+ rect,
+ mode,
+ flags,
+ }
+ }
+}
+
+#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd)]
+struct ItemIndex(usize);
+
+// The main public interface to the segment module.
+pub struct SegmentBuilder {
+ items: Vec<Item>,
+ inner_rect: Option<LayoutRect>,
+ bounding_rect: Option<LayoutRect>,
+ has_interesting_clips: bool,
+
+ #[cfg(debug_assertions)]
+ initialized: bool,
+}
+
+impl SegmentBuilder {
+ // Create a new segment builder, supplying the primitive
+ // local rect and associated local clip rect.
+ pub fn new() -> SegmentBuilder {
+ SegmentBuilder {
+ items: Vec::with_capacity(4),
+ bounding_rect: None,
+ inner_rect: None,
+ has_interesting_clips: false,
+ #[cfg(debug_assertions)]
+ initialized: false,
+ }
+ }
+
+ pub fn initialize(
+ &mut self,
+ local_rect: LayoutRect,
+ inner_rect: Option<LayoutRect>,
+ local_clip_rect: LayoutRect,
+ ) {
+ self.items.clear();
+ self.inner_rect = inner_rect;
+ self.bounding_rect = Some(local_rect);
+
+ self.push_clip_rect(local_rect, None, ClipMode::Clip);
+ self.push_clip_rect(local_clip_rect, None, ClipMode::Clip);
+
+ // This must be set after the push_clip_rect calls above, since we
+ // want to skip segment building if those are the only clips.
+ self.has_interesting_clips = false;
+
+ #[cfg(debug_assertions)]
+ {
+ self.initialized = true;
+ }
+ }
+
+ // Push a region defined by an inner and outer rect where there
+ // is a mask required. This ensures that segments which intersect
+ // with these areas will get a clip mask task allocated. This
+ // is currently used to mark where a box-shadow region can affect
+ // the pixels of a clip-mask. It might be useful for other types
+ // such as dashed and dotted borders in the future.
+ pub fn push_mask_region(
+ &mut self,
+ outer_rect: LayoutRect,
+ inner_rect: LayoutRect,
+ inner_clip_mode: Option<ClipMode>,
+ ) {
+ self.has_interesting_clips = true;
+
+ if !inner_rect.is_well_formed_and_nonempty() {
+ self.items.push(Item::new(
+ outer_rect,
+ None,
+ true
+ ));
+ return;
+ }
+
+ debug_assert!(outer_rect.contains_rect(&inner_rect));
+
+ let p0 = outer_rect.origin;
+ let p1 = inner_rect.origin;
+ let p2 = inner_rect.bottom_right();
+ let p3 = outer_rect.bottom_right();
+
+ let segments = &[
+ LayoutRect::new(
+ LayoutPoint::new(p0.x, p0.y),
+ LayoutSize::new(p1.x - p0.x, p1.y - p0.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p2.x, p0.y),
+ LayoutSize::new(p3.x - p2.x, p1.y - p0.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p2.x, p2.y),
+ LayoutSize::new(p3.x - p2.x, p3.y - p2.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p0.x, p2.y),
+ LayoutSize::new(p1.x - p0.x, p3.y - p2.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p1.x, p0.y),
+ LayoutSize::new(p2.x - p1.x, p1.y - p0.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p2.x, p1.y),
+ LayoutSize::new(p3.x - p2.x, p2.y - p1.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p1.x, p2.y),
+ LayoutSize::new(p2.x - p1.x, p3.y - p2.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p0.x, p1.y),
+ LayoutSize::new(p1.x - p0.x, p2.y - p1.y),
+ ),
+ ];
+
+ for segment in segments {
+ self.items.push(Item::new(
+ *segment,
+ None,
+ true
+ ));
+ }
+
+ if inner_clip_mode.is_some() {
+ self.items.push(Item::new(
+ inner_rect,
+ inner_clip_mode,
+ false,
+ ));
+ }
+ }
+
+ // Push some kind of clipping region into the segment builder.
+ // If radius is None, it's a simple rect.
+ pub fn push_clip_rect(
+ &mut self,
+ rect: LayoutRect,
+ radius: Option<BorderRadius>,
+ mode: ClipMode,
+ ) {
+ self.has_interesting_clips = true;
+
+ // Keep track of a minimal bounding rect for the set of
+ // segments that will be generated.
+ if mode == ClipMode::Clip {
+ self.bounding_rect = self.bounding_rect.and_then(|bounding_rect| {
+ bounding_rect.intersection(&rect)
+ });
+ }
+ let mode = Some(mode);
+
+ match radius {
+ Some(radius) => {
+ // For a rounded rect, try to create a nine-patch where there
+ // is a clip item for each corner, inner and edge region.
+ match extract_inner_rect_safe(&rect, &radius) {
+ Some(inner) => {
+ let p0 = rect.origin;
+ let p1 = inner.origin;
+ let p2 = inner.bottom_right();
+ let p3 = rect.bottom_right();
+
+ let corner_segments = &[
+ LayoutRect::new(
+ LayoutPoint::new(p0.x, p0.y),
+ LayoutSize::new(p1.x - p0.x, p1.y - p0.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p2.x, p0.y),
+ LayoutSize::new(p3.x - p2.x, p1.y - p0.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p2.x, p2.y),
+ LayoutSize::new(p3.x - p2.x, p3.y - p2.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p0.x, p2.y),
+ LayoutSize::new(p1.x - p0.x, p3.y - p2.y),
+ ),
+ ];
+
+ for segment in corner_segments {
+ self.items.push(Item::new(
+ *segment,
+ mode,
+ true
+ ));
+ }
+
+ let other_segments = &[
+ LayoutRect::new(
+ LayoutPoint::new(p1.x, p0.y),
+ LayoutSize::new(p2.x - p1.x, p1.y - p0.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p2.x, p1.y),
+ LayoutSize::new(p3.x - p2.x, p2.y - p1.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p1.x, p2.y),
+ LayoutSize::new(p2.x - p1.x, p3.y - p2.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p0.x, p1.y),
+ LayoutSize::new(p1.x - p0.x, p2.y - p1.y),
+ ),
+ LayoutRect::new(
+ LayoutPoint::new(p1.x, p1.y),
+ LayoutSize::new(p2.x - p1.x, p2.y - p1.y),
+ ),
+ ];
+
+ for segment in other_segments {
+ self.items.push(Item::new(
+ *segment,
+ mode,
+ false,
+ ));
+ }
+ }
+ None => {
+ // If we get here, we could not extract an inner rectangle
+ // for this clip region. This can occur in cases such as
+ // a rounded rect where the top-left and bottom-left radii
+ // result in overlapping rects. In that case, just create
+ // a single clip region for the entire rounded rect.
+ self.items.push(Item::new(
+ rect,
+ mode,
+ true,
+ ))
+ }
+ }
+ }
+ None => {
+ // For a simple rect, just create one clipping item.
+ self.items.push(Item::new(
+ rect,
+ mode,
+ false,
+ ))
+ }
+ }
+ }
+
+ // Consume this segment builder and produce a list of segments.
+ pub fn build<F>(&mut self, mut f: F) where F: FnMut(&Segment) {
+ #[cfg(debug_assertions)]
+ debug_assert!(self.initialized);
+
+ #[cfg(debug_assertions)]
+ {
+ self.initialized = false;
+ }
+
+ let bounding_rect = match self.bounding_rect {
+ Some(bounding_rect) => bounding_rect,
+ None => return,
+ };
+
+ if !self.has_interesting_clips {
+ // There were no additional clips added, so don't bother building segments.
+ // Just emit a single segment for the bounding rect of the primitive.
+ f(&Segment {
+ edge_flags: EdgeAaSegmentMask::all(),
+ region_x: 0,
+ region_y: 0,
+ has_mask: false,
+ rect: bounding_rect,
+ });
+ return
+ }
+
+ // First, filter out any items that don't intersect
+ // with the visible bounding rect.
+ self.items.retain(|item| item.rect.intersects(&bounding_rect));
+
+ // Create events for each item
+ let mut x_events : SmallVec<[Event; 4]> = SmallVec::new();
+ let mut y_events : SmallVec<[Event; 4]> = SmallVec::new();
+
+ for (item_index, item) in self.items.iter().enumerate() {
+ let p0 = item.rect.origin;
+ let p1 = item.rect.bottom_right();
+
+ x_events.push(Event::begin(p0.x, item_index));
+ x_events.push(Event::end(p1.x, item_index));
+ y_events.push(Event::begin(p0.y, item_index));
+ y_events.push(Event::end(p1.y, item_index));
+ }
+
+ // Add the region events, if provided.
+ if let Some(inner_rect) = self.inner_rect {
+ x_events.push(Event::region(inner_rect.origin.x));
+ x_events.push(Event::region(inner_rect.origin.x + inner_rect.size.width));
+
+ y_events.push(Event::region(inner_rect.origin.y));
+ y_events.push(Event::region(inner_rect.origin.y + inner_rect.size.height));
+ }
+
+ // Get the minimal bounding rect in app units. We will
+ // work in fixed point in order to avoid float precision
+ // error while handling events.
+ let p0 = LayoutPointAu::new(
+ Au::from_f32_px(bounding_rect.origin.x),
+ Au::from_f32_px(bounding_rect.origin.y),
+ );
+
+ let p1 = LayoutPointAu::new(
+ Au::from_f32_px(bounding_rect.origin.x + bounding_rect.size.width),
+ Au::from_f32_px(bounding_rect.origin.y + bounding_rect.size.height),
+ );
+
+ // Sort the events in ascending order.
+ x_events.sort();
+ y_events.sort();
+
+ // Generate segments from the event lists, by sweeping the y-axis
+ // and then the x-axis for each event. This can generate a significant
+ // number of segments, but most importantly, it ensures that there are
+ // no t-junctions in the generated segments. It's probably possible
+ // to come up with more efficient segmentation algorithms, at least
+ // for simple / common cases.
+
+ // Each coordinate is clamped to the bounds of the minimal
+ // bounding rect. This ensures that we don't generate segments
+ // outside that bounding rect, but does allow correctly handling
+ // clips where the clip region starts outside the minimal
+ // rect but still intersects with it.
+
+ let mut prev_y = clamp(p0.y, y_events[0].value, p1.y);
+ let mut region_y = 0;
+ let mut segments : SmallVec<[_; 4]> = SmallVec::new();
+ let mut x_count = 0;
+ let mut y_count = 0;
+
+ for ey in &y_events {
+ let cur_y = clamp(p0.y, ey.value, p1.y);
+
+ if cur_y != prev_y {
+ let mut prev_x = clamp(p0.x, x_events[0].value, p1.x);
+ let mut region_x = 0;
+
+ for ex in &x_events {
+ let cur_x = clamp(p0.x, ex.value, p1.x);
+
+ if cur_x != prev_x {
+ segments.push(emit_segment_if_needed(
+ prev_x,
+ prev_y,
+ cur_x,
+ cur_y,
+ region_x,
+ region_y,
+ &self.items,
+ ));
+
+ prev_x = cur_x;
+ if y_count == 0 {
+ x_count += 1;
+ }
+ }
+
+ ex.update(
+ ItemFlags::X_ACTIVE,
+ &mut self.items,
+ &mut region_x,
+ );
+ }
+
+ prev_y = cur_y;
+ y_count += 1;
+ }
+
+ ey.update(
+ ItemFlags::Y_ACTIVE,
+ &mut self.items,
+ &mut region_y,
+ );
+ }
+
+ // Run user supplied closure for each valid segment.
+ debug_assert_eq!(segments.len(), x_count * y_count);
+ for y in 0 .. y_count {
+ for x in 0 .. x_count {
+ let mut edge_flags = EdgeAaSegmentMask::empty();
+
+ if x == 0 || segments[y * x_count + x - 1].is_none() {
+ edge_flags |= EdgeAaSegmentMask::LEFT;
+ }
+ if x == x_count-1 || segments[y * x_count + x + 1].is_none() {
+ edge_flags |= EdgeAaSegmentMask::RIGHT;
+ }
+ if y == 0 || segments[(y-1) * x_count + x].is_none() {
+ edge_flags |= EdgeAaSegmentMask::TOP;
+ }
+ if y == y_count-1 || segments[(y+1) * x_count + x].is_none() {
+ edge_flags |= EdgeAaSegmentMask::BOTTOM;
+ }
+
+ if let Some(ref mut segment) = segments[y * x_count + x] {
+ segment.edge_flags = edge_flags;
+ f(segment);
+ }
+ }
+ }
+ }
+}
+
+fn clamp(low: Au, value: Au, high: Au) -> Au {
+ value.max(low).min(high)
+}
+
+fn emit_segment_if_needed(
+ x0: Au,
+ y0: Au,
+ x1: Au,
+ y1: Au,
+ region_x: usize,
+ region_y: usize,
+ items: &[Item],
+) -> Option<Segment> {
+ debug_assert!(x1 > x0);
+ debug_assert!(y1 > y0);
+
+ // TODO(gw): Don't scan the whole list of items for
+ // each segment rect. Store active list
+ // in a hash set or similar if this ever
+ // shows up in a profile.
+ let mut has_clip_mask = false;
+
+ for item in items {
+ if item.flags.contains(ItemFlags::X_ACTIVE | ItemFlags::Y_ACTIVE) {
+ has_clip_mask |= item.flags.contains(ItemFlags::HAS_MASK);
+
+ if item.mode == Some(ClipMode::ClipOut) && !item.flags.contains(ItemFlags::HAS_MASK) {
+ return None;
+ }
+ }
+ }
+
+ let segment_rect = LayoutRect::new(
+ LayoutPoint::new(
+ x0.to_f32_px(),
+ y0.to_f32_px(),
+ ),
+ LayoutSize::new(
+ (x1 - x0).to_f32_px(),
+ (y1 - y0).to_f32_px(),
+ ),
+ );
+
+ Some(Segment {
+ rect: segment_rect,
+ has_mask: has_clip_mask,
+ edge_flags: EdgeAaSegmentMask::empty(),
+ region_x,
+ region_y,
+ })
+}
+
+#[cfg(test)]
+mod test {
+ use api::{BorderRadius, ClipMode, EdgeAaSegmentMask};
+ use api::units::{LayoutPoint, LayoutRect, LayoutSize};
+ use super::{Segment, SegmentBuilder};
+ use std::cmp;
+
+ fn rect(x0: f32, y0: f32, x1: f32, y1: f32) -> LayoutRect {
+ LayoutRect::new(
+ LayoutPoint::new(x0, y0),
+ LayoutSize::new(x1-x0, y1-y0),
+ )
+ }
+
+ fn seg(
+ x0: f32,
+ y0: f32,
+ x1: f32,
+ y1: f32,
+ has_mask: bool,
+ edge_flags: Option<EdgeAaSegmentMask>,
+ ) -> Segment {
+ seg_region(x0, y0, x1, y1, 0, 0, has_mask, edge_flags)
+ }
+
+ fn seg_region(
+ x0: f32,
+ y0: f32,
+ x1: f32,
+ y1: f32,
+ region_x: usize,
+ region_y: usize,
+ has_mask: bool,
+ edge_flags: Option<EdgeAaSegmentMask>,
+ ) -> Segment {
+ Segment {
+ rect: LayoutRect::new(
+ LayoutPoint::new(x0, y0),
+ LayoutSize::new(x1-x0, y1-y0),
+ ),
+ has_mask,
+ edge_flags: edge_flags.unwrap_or(EdgeAaSegmentMask::empty()),
+ region_x,
+ region_y,
+ }
+ }
+
+ fn segment_sorter(s0: &Segment, s1: &Segment) -> cmp::Ordering {
+ let r0 = &s0.rect;
+ let r1 = &s1.rect;
+
+ (
+ (r0.origin.x, r0.origin.y, r0.size.width, r0.size.height)
+ ).partial_cmp(&
+ (r1.origin.x, r1.origin.y, r1.size.width, r1.size.height)
+ ).unwrap()
+ }
+
+ fn seg_test(
+ local_rect: LayoutRect,
+ inner_rect: Option<LayoutRect>,
+ local_clip_rect: LayoutRect,
+ clips: &[(LayoutRect, Option<BorderRadius>, ClipMode)],
+ expected_segments: &mut [Segment]
+ ) {
+ let mut sb = SegmentBuilder::new();
+ sb.initialize(
+ local_rect,
+ inner_rect,
+ local_clip_rect,
+ );
+ sb.push_clip_rect(local_rect, None, ClipMode::Clip);
+ sb.push_clip_rect(local_clip_rect, None, ClipMode::Clip);
+ let mut segments = Vec::new();
+ for &(rect, radius, mode) in clips {
+ sb.push_clip_rect(rect, radius, mode);
+ }
+ sb.build(|segment| {
+ segments.push(Segment {
+ ..*segment
+ });
+ });
+ segments.sort_by(segment_sorter);
+ expected_segments.sort_by(segment_sorter);
+ assert_eq!(
+ segments.len(),
+ expected_segments.len(),
+ "segments\n{:?}\nexpected\n{:?}\n",
+ segments,
+ expected_segments
+ );
+ for (segment, expected) in segments.iter().zip(expected_segments.iter()) {
+ assert_eq!(segment, expected);
+ }
+ }
+
+ #[test]
+ fn segment_empty() {
+ seg_test(
+ rect(0.0, 0.0, 0.0, 0.0),
+ None,
+ rect(0.0, 0.0, 0.0, 0.0),
+ &[],
+ &mut [],
+ );
+ }
+
+ #[test]
+ fn segment_single() {
+ seg_test(
+ rect(10.0, 20.0, 30.0, 40.0),
+ None,
+ rect(10.0, 20.0, 30.0, 40.0),
+ &[],
+ &mut [
+ seg(10.0, 20.0, 30.0, 40.0, false,
+ Some(EdgeAaSegmentMask::LEFT |
+ EdgeAaSegmentMask::TOP |
+ EdgeAaSegmentMask::RIGHT |
+ EdgeAaSegmentMask::BOTTOM
+ )
+ ),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_single_clip() {
+ seg_test(
+ rect(10.0, 20.0, 30.0, 40.0),
+ None,
+ rect(10.0, 20.0, 25.0, 35.0),
+ &[],
+ &mut [
+ seg(10.0, 20.0, 25.0, 35.0, false,
+ Some(EdgeAaSegmentMask::LEFT |
+ EdgeAaSegmentMask::TOP |
+ EdgeAaSegmentMask::RIGHT |
+ EdgeAaSegmentMask::BOTTOM
+ )
+ ),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_inner_clip() {
+ seg_test(
+ rect(10.0, 20.0, 30.0, 40.0),
+ None,
+ rect(15.0, 25.0, 25.0, 35.0),
+ &[],
+ &mut [
+ seg(15.0, 25.0, 25.0, 35.0, false,
+ Some(EdgeAaSegmentMask::LEFT |
+ EdgeAaSegmentMask::TOP |
+ EdgeAaSegmentMask::RIGHT |
+ EdgeAaSegmentMask::BOTTOM
+ )
+ ),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_outer_clip() {
+ seg_test(
+ rect(15.0, 25.0, 25.0, 35.0),
+ None,
+ rect(10.0, 20.0, 30.0, 40.0),
+ &[],
+ &mut [
+ seg(15.0, 25.0, 25.0, 35.0, false,
+ Some(EdgeAaSegmentMask::LEFT |
+ EdgeAaSegmentMask::TOP |
+ EdgeAaSegmentMask::RIGHT |
+ EdgeAaSegmentMask::BOTTOM
+ )
+ ),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_clip_int() {
+ seg_test(
+ rect(10.0, 20.0, 30.0, 40.0),
+ None,
+ rect(20.0, 10.0, 40.0, 30.0),
+ &[],
+ &mut [
+ seg(20.0, 20.0, 30.0, 30.0, false,
+ Some(EdgeAaSegmentMask::LEFT |
+ EdgeAaSegmentMask::TOP |
+ EdgeAaSegmentMask::RIGHT |
+ EdgeAaSegmentMask::BOTTOM
+ )
+ ),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_clip_disjoint() {
+ seg_test(
+ rect(10.0, 20.0, 30.0, 40.0),
+ None,
+ rect(30.0, 20.0, 50.0, 40.0),
+ &[],
+ &mut [],
+ );
+ }
+
+ #[test]
+ fn segment_clips() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ None,
+ rect(-1000.0, -1000.0, 1000.0, 1000.0),
+ &[
+ (rect(20.0, 20.0, 40.0, 40.0), None, ClipMode::Clip),
+ (rect(40.0, 20.0, 60.0, 40.0), None, ClipMode::Clip),
+ ],
+ &mut [
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_rounded_clip() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ None,
+ rect(-1000.0, -1000.0, 1000.0, 1000.0),
+ &[
+ (rect(20.0, 20.0, 60.0, 60.0), Some(BorderRadius::uniform(10.0)), ClipMode::Clip),
+ ],
+ &mut [
+ // corners
+ seg(20.0, 20.0, 30.0, 30.0, true, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::TOP)),
+ seg(20.0, 50.0, 30.0, 60.0, true, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::BOTTOM)),
+ seg(50.0, 20.0, 60.0, 30.0, true, Some(EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::TOP)),
+ seg(50.0, 50.0, 60.0, 60.0, true, Some(EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::BOTTOM)),
+
+ // inner
+ seg(30.0, 30.0, 50.0, 50.0, false, None),
+
+ // edges
+ seg(30.0, 20.0, 50.0, 30.0, false, Some(EdgeAaSegmentMask::TOP)),
+ seg(30.0, 50.0, 50.0, 60.0, false, Some(EdgeAaSegmentMask::BOTTOM)),
+ seg(20.0, 30.0, 30.0, 50.0, false, Some(EdgeAaSegmentMask::LEFT)),
+ seg(50.0, 30.0, 60.0, 50.0, false, Some(EdgeAaSegmentMask::RIGHT)),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_clip_out() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ None,
+ rect(-1000.0, -1000.0, 2000.0, 2000.0),
+ &[
+ (rect(20.0, 20.0, 60.0, 60.0), None, ClipMode::ClipOut),
+ ],
+ &mut [
+ seg(0.0, 0.0, 20.0, 20.0, false, Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::LEFT)),
+ seg(20.0, 0.0, 60.0, 20.0, false, Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::BOTTOM)),
+ seg(60.0, 0.0, 100.0, 20.0, false, Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::RIGHT)),
+
+ seg(0.0, 20.0, 20.0, 60.0, false, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::RIGHT)),
+ seg(60.0, 20.0, 100.0, 60.0, false, Some(EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::LEFT)),
+
+ seg(0.0, 60.0, 20.0, 100.0, false, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::BOTTOM)),
+ seg(20.0, 60.0, 60.0, 100.0, false, Some(EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::TOP)),
+ seg(60.0, 60.0, 100.0, 100.0, false, Some(EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::RIGHT)),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_rounded_clip_out() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ None,
+ rect(-1000.0, -1000.0, 2000.0, 2000.0),
+ &[
+ (rect(20.0, 20.0, 60.0, 60.0), Some(BorderRadius::uniform(10.0)), ClipMode::ClipOut),
+ ],
+ &mut [
+ // top row
+ seg(0.0, 0.0, 20.0, 20.0, false, Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::LEFT)),
+ seg(20.0, 0.0, 30.0, 20.0, false, Some(EdgeAaSegmentMask::TOP)),
+ seg(30.0, 0.0, 50.0, 20.0, false, Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::BOTTOM)),
+ seg(50.0, 0.0, 60.0, 20.0, false, Some(EdgeAaSegmentMask::TOP)),
+ seg(60.0, 0.0, 100.0, 20.0, false, Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::RIGHT)),
+
+ // left
+ seg(0.0, 20.0, 20.0, 30.0, false, Some(EdgeAaSegmentMask::LEFT)),
+ seg(0.0, 30.0, 20.0, 50.0, false, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::RIGHT)),
+ seg(0.0, 50.0, 20.0, 60.0, false, Some(EdgeAaSegmentMask::LEFT)),
+
+ // right
+ seg(60.0, 20.0, 100.0, 30.0, false, Some(EdgeAaSegmentMask::RIGHT)),
+ seg(60.0, 30.0, 100.0, 50.0, false, Some(EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::LEFT)),
+ seg(60.0, 50.0, 100.0, 60.0, false, Some(EdgeAaSegmentMask::RIGHT)),
+
+ // bottom row
+ seg(0.0, 60.0, 20.0, 100.0, false, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::BOTTOM)),
+ seg(20.0, 60.0, 30.0, 100.0, false, Some(EdgeAaSegmentMask::BOTTOM)),
+ seg(30.0, 60.0, 50.0, 100.0, false, Some(EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::TOP)),
+ seg(50.0, 60.0, 60.0, 100.0, false, Some(EdgeAaSegmentMask::BOTTOM)),
+ seg(60.0, 60.0, 100.0, 100.0, false, Some(EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::BOTTOM)),
+
+ // inner corners
+ seg(20.0, 20.0, 30.0, 30.0, true, Some(EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::BOTTOM)),
+ seg(20.0, 50.0, 30.0, 60.0, true, Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::RIGHT)),
+ seg(50.0, 20.0, 60.0, 30.0, true, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::BOTTOM)),
+ seg(50.0, 50.0, 60.0, 60.0, true, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::TOP)),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_clip_in_clip_out() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ None,
+ rect(-1000.0, -1000.0, 2000.0, 2000.0),
+ &[
+ (rect(20.0, 20.0, 60.0, 60.0), None, ClipMode::Clip),
+ (rect(50.0, 50.0, 80.0, 80.0), None, ClipMode::ClipOut),
+ ],
+ &mut [
+ seg(20.0, 20.0, 50.0, 50.0, false, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::TOP)),
+ seg(50.0, 20.0, 60.0, 50.0, false, Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::BOTTOM)),
+ seg(20.0, 50.0, 50.0, 60.0, false, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::RIGHT)),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_rounded_clip_overlap() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ None,
+ rect(0.0, 0.0, 100.0, 100.0),
+ &[
+ (rect(0.0, 0.0, 10.0, 10.0), None, ClipMode::ClipOut),
+ (rect(0.0, 0.0, 100.0, 100.0), Some(BorderRadius::uniform(10.0)), ClipMode::Clip),
+ ],
+ &mut [
+ // corners
+ seg(0.0, 90.0, 10.0, 100.0, true, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::BOTTOM)),
+ seg(90.0, 0.0, 100.0, 10.0, true, Some(EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::TOP)),
+ seg(90.0, 90.0, 100.0, 100.0, true, Some(EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::BOTTOM)),
+
+ // inner
+ seg(10.0, 10.0, 90.0, 90.0, false, None),
+
+ // edges
+ seg(10.0, 0.0, 90.0, 10.0, false, Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::LEFT)),
+ seg(10.0, 90.0, 90.0, 100.0, false, Some(EdgeAaSegmentMask::BOTTOM)),
+ seg(0.0, 10.0, 10.0, 90.0, false, Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::TOP)),
+ seg(90.0, 10.0, 100.0, 90.0, false, Some(EdgeAaSegmentMask::RIGHT)),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_rounded_clip_overlap_reverse() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ None,
+ rect(0.0, 0.0, 100.0, 100.0),
+ &[
+ (rect(10.0, 10.0, 90.0, 90.0), None, ClipMode::Clip),
+ (rect(0.0, 0.0, 100.0, 100.0), Some(BorderRadius::uniform(10.0)), ClipMode::Clip),
+ ],
+ &mut [
+ seg(10.0, 10.0, 90.0, 90.0, false,
+ Some(EdgeAaSegmentMask::LEFT |
+ EdgeAaSegmentMask::TOP |
+ EdgeAaSegmentMask::RIGHT |
+ EdgeAaSegmentMask::BOTTOM
+ )
+ ),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_clip_in_clip_out_overlap() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ None,
+ rect(0.0, 0.0, 100.0, 100.0),
+ &[
+ (rect(10.0, 10.0, 90.0, 90.0), None, ClipMode::Clip),
+ (rect(10.0, 10.0, 90.0, 90.0), None, ClipMode::ClipOut),
+ ],
+ &mut [
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_event_order() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ None,
+ rect(0.0, 0.0, 100.0, 100.0),
+ &[
+ (rect(0.0, 0.0, 100.0, 90.0), None, ClipMode::ClipOut),
+ ],
+ &mut [
+ seg(0.0, 90.0, 100.0, 100.0, false, Some(
+ EdgeAaSegmentMask::LEFT |
+ EdgeAaSegmentMask::RIGHT |
+ EdgeAaSegmentMask::BOTTOM |
+ EdgeAaSegmentMask::TOP
+ )),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_region_simple() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ Some(rect(20.0, 40.0, 60.0, 80.0)),
+ rect(0.0, 0.0, 100.0, 100.0),
+ &[
+ ],
+ &mut [
+ seg_region(
+ 0.0, 0.0,
+ 20.0, 40.0,
+ 0, 0,
+ false,
+ Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::TOP)
+ ),
+
+ seg_region(
+ 20.0, 0.0,
+ 60.0, 40.0,
+ 1, 0,
+ false,
+ Some(EdgeAaSegmentMask::TOP)
+ ),
+
+ seg_region(
+ 60.0, 0.0,
+ 100.0, 40.0,
+ 2, 0,
+ false,
+ Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::RIGHT)
+ ),
+
+ seg_region(
+ 0.0, 40.0,
+ 20.0, 80.0,
+ 0, 1,
+ false,
+ Some(EdgeAaSegmentMask::LEFT)
+ ),
+
+ seg_region(
+ 20.0, 40.0,
+ 60.0, 80.0,
+ 1, 1,
+ false,
+ None,
+ ),
+
+ seg_region(
+ 60.0, 40.0,
+ 100.0, 80.0,
+ 2, 1,
+ false,
+ Some(EdgeAaSegmentMask::RIGHT)
+ ),
+
+ seg_region(
+ 0.0, 80.0,
+ 20.0, 100.0,
+ 0, 2,
+ false,
+ Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::BOTTOM)
+ ),
+
+ seg_region(
+ 20.0, 80.0,
+ 60.0, 100.0,
+ 1, 2,
+ false,
+ Some(EdgeAaSegmentMask::BOTTOM),
+ ),
+
+ seg_region(
+ 60.0, 80.0,
+ 100.0, 100.0,
+ 2, 2,
+ false,
+ Some(EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::BOTTOM)
+ ),
+
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_region_clip() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ Some(rect(20.0, 40.0, 60.0, 80.0)),
+ rect(0.0, 0.0, 100.0, 100.0),
+ &[
+ (rect(0.0, 0.0, 100.0, 90.0), None, ClipMode::ClipOut),
+ ],
+ &mut [
+ seg_region(
+ 0.0, 90.0,
+ 20.0, 100.0,
+ 0, 2,
+ false,
+ Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::TOP)
+ ),
+
+ seg_region(
+ 20.0, 90.0,
+ 60.0, 100.0,
+ 1, 2,
+ false,
+ Some(EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::TOP),
+ ),
+
+ seg_region(
+ 60.0, 90.0,
+ 100.0, 100.0,
+ 2, 2,
+ false,
+ Some(EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::TOP)
+ ),
+
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_region_clip2() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ Some(rect(20.0, 20.0, 80.0, 80.0)),
+ rect(0.0, 0.0, 100.0, 100.0),
+ &[
+ (rect(20.0, 20.0, 100.0, 100.0), None, ClipMode::ClipOut),
+ ],
+ &mut [
+ seg_region(
+ 0.0, 0.0,
+ 20.0, 20.0,
+ 0, 0,
+ false,
+ Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::TOP)
+ ),
+
+ seg_region(
+ 20.0, 0.0,
+ 80.0, 20.0,
+ 1, 0,
+ false,
+ Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::BOTTOM),
+ ),
+
+ seg_region(
+ 80.0, 0.0,
+ 100.0, 20.0,
+ 2, 0,
+ false,
+ Some(EdgeAaSegmentMask::RIGHT | EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::BOTTOM)
+ ),
+
+ seg_region(
+ 0.0, 20.0,
+ 20.0, 80.0,
+ 0, 1,
+ false,
+ Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::RIGHT)
+ ),
+
+ seg_region(
+ 0.0, 80.0,
+ 20.0, 100.0,
+ 0, 2,
+ false,
+ Some(EdgeAaSegmentMask::LEFT | EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::RIGHT)
+ ),
+ ],
+ );
+ }
+
+ #[test]
+ fn segment_region_clip3() {
+ seg_test(
+ rect(0.0, 0.0, 100.0, 100.0),
+ Some(rect(20.0, 20.0, 80.0, 80.0)),
+ rect(0.0, 0.0, 100.0, 100.0),
+ &[
+ (rect(10.0, 10.0, 30.0, 30.0), None, ClipMode::Clip),
+ ],
+ &mut [
+ seg_region(
+ 10.0, 10.0,
+ 20.0, 20.0,
+ 0, 0,
+ false,
+ Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::LEFT),
+ ),
+
+ seg_region(
+ 20.0, 10.0,
+ 30.0, 20.0,
+ 1, 0,
+ false,
+ Some(EdgeAaSegmentMask::TOP | EdgeAaSegmentMask::RIGHT),
+ ),
+
+ seg_region(
+ 10.0, 20.0,
+ 20.0, 30.0,
+ 0, 1,
+ false,
+ Some(EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::LEFT),
+ ),
+
+ seg_region(
+ 20.0, 20.0,
+ 30.0, 30.0,
+ 1, 1,
+ false,
+ Some(EdgeAaSegmentMask::BOTTOM | EdgeAaSegmentMask::RIGHT),
+ ),
+ ],
+ );
+ }
+}
diff --git a/third_party/webrender/webrender/src/shade.rs b/third_party/webrender/webrender/src/shade.rs
new file mode 100644
index 00000000000..cce58259015
--- /dev/null
+++ b/third_party/webrender/webrender/src/shade.rs
@@ -0,0 +1,1189 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use crate::batch::{BatchKey, BatchKind, BrushBatchKind, BatchFeatures};
+use crate::composite::CompositeSurfaceFormat;
+use crate::device::{Device, Program, ShaderError};
+use euclid::default::Transform3D;
+use crate::glyph_rasterizer::GlyphFormat;
+use crate::renderer::{
+ desc,
+ BlendMode, DebugFlags, ImageBufferKind, RendererError, RendererOptions,
+ TextureSampler, VertexArrayKind, ShaderPrecacheFlags,
+};
+
+use gleam::gl::GlType;
+use time::precise_time_ns;
+
+use std::cell::RefCell;
+use std::rc::Rc;
+
+use webrender_build::shader::{ShaderFeatures, ShaderFeatureFlags, get_shader_features};
+
+impl ImageBufferKind {
+ pub(crate) fn get_feature_string(&self) -> &'static str {
+ match *self {
+ ImageBufferKind::Texture2D => "TEXTURE_2D",
+ ImageBufferKind::Texture2DArray => "",
+ ImageBufferKind::TextureRect => "TEXTURE_RECT",
+ ImageBufferKind::TextureExternal => "TEXTURE_EXTERNAL",
+ }
+ }
+
+ fn has_platform_support(&self, gl_type: &GlType) -> bool {
+ match (*self, gl_type) {
+ (ImageBufferKind::Texture2D, _) => true,
+ (ImageBufferKind::Texture2DArray, _) => true,
+ (ImageBufferKind::TextureRect, &GlType::Gles) => false,
+ (ImageBufferKind::TextureRect, &GlType::Gl) => true,
+ (ImageBufferKind::TextureExternal, &GlType::Gles) => true,
+ (ImageBufferKind::TextureExternal, &GlType::Gl) => false,
+ }
+ }
+}
+
+pub const IMAGE_BUFFER_KINDS: [ImageBufferKind; 4] = [
+ ImageBufferKind::Texture2D,
+ ImageBufferKind::TextureRect,
+ ImageBufferKind::TextureExternal,
+ ImageBufferKind::Texture2DArray,
+];
+
+const ADVANCED_BLEND_FEATURE: &str = "ADVANCED_BLEND";
+const ALPHA_FEATURE: &str = "ALPHA_PASS";
+const DEBUG_OVERDRAW_FEATURE: &str = "DEBUG_OVERDRAW";
+const DITHERING_FEATURE: &str = "DITHERING";
+const DUAL_SOURCE_FEATURE: &str = "DUAL_SOURCE_BLENDING";
+const FAST_PATH_FEATURE: &str = "FAST_PATH";
+const PIXEL_LOCAL_STORAGE_FEATURE: &str = "PIXEL_LOCAL_STORAGE";
+
+pub(crate) enum ShaderKind {
+ Primitive,
+ Cache(VertexArrayKind),
+ ClipCache,
+ Brush,
+ Text,
+ #[allow(dead_code)]
+ VectorStencil,
+ #[allow(dead_code)]
+ VectorCover,
+ Resolve,
+ Composite,
+ Clear,
+}
+
+pub struct LazilyCompiledShader {
+ program: Option<Program>,
+ name: &'static str,
+ kind: ShaderKind,
+ cached_projection: Transform3D<f32>,
+ features: Vec<&'static str>,
+}
+
+impl LazilyCompiledShader {
+ pub(crate) fn new(
+ kind: ShaderKind,
+ name: &'static str,
+ features: &[&'static str],
+ device: &mut Device,
+ precache_flags: ShaderPrecacheFlags,
+ shader_list: &ShaderFeatures,
+ ) -> Result<Self, ShaderError> {
+ let mut shader = LazilyCompiledShader {
+ program: None,
+ name,
+ kind,
+ //Note: this isn't really the default state, but there is no chance
+ // an actual projection passed here would accidentally match.
+ cached_projection: Transform3D::identity(),
+ features: features.to_vec(),
+ };
+
+ // Ensure this shader config is in the available shader list so that we get
+ // alerted if the list gets out-of-date when shaders or features are added.
+ let config = features.join(",");
+ assert!(
+ shader_list.get(name).map_or(false, |f| f.contains(&config)),
+ "shader \"{}\" with features \"{}\" not in available shader list",
+ name,
+ config,
+ );
+
+ if precache_flags.intersects(ShaderPrecacheFlags::ASYNC_COMPILE | ShaderPrecacheFlags::FULL_COMPILE) {
+ let t0 = precise_time_ns();
+ shader.get_internal(device, precache_flags)?;
+ let t1 = precise_time_ns();
+ debug!("[C: {:.1} ms ] Precache {} {:?}",
+ (t1 - t0) as f64 / 1000000.0,
+ name,
+ features
+ );
+ }
+
+ Ok(shader)
+ }
+
+ pub fn bind(
+ &mut self,
+ device: &mut Device,
+ projection: &Transform3D<f32>,
+ renderer_errors: &mut Vec<RendererError>,
+ ) {
+ let update_projection = self.cached_projection != *projection;
+ let program = match self.get_internal(device, ShaderPrecacheFlags::FULL_COMPILE) {
+ Ok(program) => program,
+ Err(e) => {
+ renderer_errors.push(RendererError::from(e));
+ return;
+ }
+ };
+ device.bind_program(program);
+ if update_projection {
+ device.set_uniforms(program, projection);
+ // thanks NLL for this (`program` technically borrows `self`)
+ self.cached_projection = *projection;
+ }
+ }
+
+ fn get_internal(
+ &mut self,
+ device: &mut Device,
+ precache_flags: ShaderPrecacheFlags,
+ ) -> Result<&mut Program, ShaderError> {
+ if self.program.is_none() {
+ let program = match self.kind {
+ ShaderKind::Primitive | ShaderKind::Brush | ShaderKind::Text | ShaderKind::Resolve | ShaderKind::Clear => {
+ create_prim_shader(
+ self.name,
+ device,
+ &self.features,
+ )
+ }
+ ShaderKind::Cache(..) => {
+ create_prim_shader(
+ self.name,
+ device,
+ &self.features,
+ )
+ }
+ ShaderKind::VectorStencil => {
+ create_prim_shader(
+ self.name,
+ device,
+ &self.features,
+ )
+ }
+ ShaderKind::VectorCover => {
+ create_prim_shader(
+ self.name,
+ device,
+ &self.features,
+ )
+ }
+ ShaderKind::Composite => {
+ create_prim_shader(
+ self.name,
+ device,
+ &self.features,
+ )
+ }
+ ShaderKind::ClipCache => {
+ create_clip_shader(
+ self.name,
+ device,
+ &self.features,
+ )
+ }
+ };
+ self.program = Some(program?);
+ }
+
+ let program = self.program.as_mut().unwrap();
+
+ if precache_flags.contains(ShaderPrecacheFlags::FULL_COMPILE) && !program.is_initialized() {
+ let vertex_format = match self.kind {
+ ShaderKind::Primitive |
+ ShaderKind::Brush |
+ ShaderKind::Text => VertexArrayKind::Primitive,
+ ShaderKind::Cache(format) => format,
+ ShaderKind::VectorStencil => VertexArrayKind::VectorStencil,
+ ShaderKind::VectorCover => VertexArrayKind::VectorCover,
+ ShaderKind::ClipCache => VertexArrayKind::Clip,
+ ShaderKind::Resolve => VertexArrayKind::Resolve,
+ ShaderKind::Composite => VertexArrayKind::Composite,
+ ShaderKind::Clear => VertexArrayKind::Clear,
+ };
+
+ let vertex_descriptor = match vertex_format {
+ VertexArrayKind::Primitive => &desc::PRIM_INSTANCES,
+ VertexArrayKind::LineDecoration => &desc::LINE,
+ VertexArrayKind::Gradient => &desc::GRADIENT,
+ VertexArrayKind::Blur => &desc::BLUR,
+ VertexArrayKind::Clip => &desc::CLIP,
+ VertexArrayKind::VectorStencil => &desc::VECTOR_STENCIL,
+ VertexArrayKind::VectorCover => &desc::VECTOR_COVER,
+ VertexArrayKind::Border => &desc::BORDER,
+ VertexArrayKind::Scale => &desc::SCALE,
+ VertexArrayKind::Resolve => &desc::RESOLVE,
+ VertexArrayKind::SvgFilter => &desc::SVG_FILTER,
+ VertexArrayKind::Composite => &desc::COMPOSITE,
+ VertexArrayKind::Clear => &desc::CLEAR,
+ };
+
+ device.link_program(program, vertex_descriptor)?;
+ device.bind_program(program);
+ match self.kind {
+ ShaderKind::ClipCache => {
+ device.bind_shader_samplers(
+ &program,
+ &[
+ ("sColor0", TextureSampler::Color0),
+ ("sTransformPalette", TextureSampler::TransformPalette),
+ ("sRenderTasks", TextureSampler::RenderTasks),
+ ("sGpuCache", TextureSampler::GpuCache),
+ ("sPrimitiveHeadersF", TextureSampler::PrimitiveHeadersF),
+ ("sPrimitiveHeadersI", TextureSampler::PrimitiveHeadersI),
+ ],
+ );
+ }
+ _ => {
+ device.bind_shader_samplers(
+ &program,
+ &[
+ ("sColor0", TextureSampler::Color0),
+ ("sColor1", TextureSampler::Color1),
+ ("sColor2", TextureSampler::Color2),
+ ("sDither", TextureSampler::Dither),
+ ("sPrevPassAlpha", TextureSampler::PrevPassAlpha),
+ ("sPrevPassColor", TextureSampler::PrevPassColor),
+ ("sTransformPalette", TextureSampler::TransformPalette),
+ ("sRenderTasks", TextureSampler::RenderTasks),
+ ("sGpuCache", TextureSampler::GpuCache),
+ ("sPrimitiveHeadersF", TextureSampler::PrimitiveHeadersF),
+ ("sPrimitiveHeadersI", TextureSampler::PrimitiveHeadersI),
+ ],
+ );
+ }
+ }
+ }
+
+ Ok(program)
+ }
+
+ fn deinit(self, device: &mut Device) {
+ if let Some(program) = self.program {
+ device.delete_program(program);
+ }
+ }
+}
+
+// A brush shader supports two modes:
+// opaque:
+// Used for completely opaque primitives,
+// or inside segments of partially
+// opaque primitives. Assumes no need
+// for clip masks, AA etc.
+// alpha:
+// Used for brush primitives in the alpha
+// pass. Assumes that AA should be applied
+// along the primitive edge, and also that
+// clip mask is present.
+struct BrushShader {
+ opaque: LazilyCompiledShader,
+ alpha: LazilyCompiledShader,
+ advanced_blend: Option<LazilyCompiledShader>,
+ dual_source: Option<LazilyCompiledShader>,
+ debug_overdraw: LazilyCompiledShader,
+}
+
+impl BrushShader {
+ fn new(
+ name: &'static str,
+ device: &mut Device,
+ features: &[&'static str],
+ precache_flags: ShaderPrecacheFlags,
+ shader_list: &ShaderFeatures,
+ use_advanced_blend: bool,
+ use_dual_source: bool,
+ use_pixel_local_storage: bool,
+ ) -> Result<Self, ShaderError> {
+ let opaque = LazilyCompiledShader::new(
+ ShaderKind::Brush,
+ name,
+ features,
+ device,
+ precache_flags,
+ &shader_list,
+ )?;
+
+ let mut alpha_features = features.to_vec();
+ alpha_features.push(ALPHA_FEATURE);
+ if use_pixel_local_storage {
+ alpha_features.push(PIXEL_LOCAL_STORAGE_FEATURE);
+ }
+
+ let alpha = LazilyCompiledShader::new(
+ ShaderKind::Brush,
+ name,
+ &alpha_features,
+ device,
+ precache_flags,
+ &shader_list,
+ )?;
+
+ let advanced_blend = if use_advanced_blend {
+ let mut advanced_blend_features = alpha_features.to_vec();
+ advanced_blend_features.push(ADVANCED_BLEND_FEATURE);
+
+ let shader = LazilyCompiledShader::new(
+ ShaderKind::Brush,
+ name,
+ &advanced_blend_features,
+ device,
+ precache_flags,
+ &shader_list,
+ )?;
+
+ Some(shader)
+ } else {
+ None
+ };
+
+ let dual_source = if use_dual_source {
+ let mut dual_source_features = alpha_features.to_vec();
+ dual_source_features.push(DUAL_SOURCE_FEATURE);
+
+ let shader = LazilyCompiledShader::new(
+ ShaderKind::Brush,
+ name,
+ &dual_source_features,
+ device,
+ precache_flags,
+ &shader_list,
+ )?;
+
+ Some(shader)
+ } else {
+ None
+ };
+
+ let mut debug_overdraw_features = features.to_vec();
+ debug_overdraw_features.push(DEBUG_OVERDRAW_FEATURE);
+
+ let debug_overdraw = LazilyCompiledShader::new(
+ ShaderKind::Brush,
+ name,
+ &debug_overdraw_features,
+ device,
+ precache_flags,
+ &shader_list,
+ )?;
+
+ Ok(BrushShader {
+ opaque,
+ alpha,
+ advanced_blend,
+ dual_source,
+ debug_overdraw,
+ })
+ }
+
+ fn get(&mut self, blend_mode: BlendMode, debug_flags: DebugFlags)
+ -> &mut LazilyCompiledShader {
+ match blend_mode {
+ _ if debug_flags.contains(DebugFlags::SHOW_OVERDRAW) => &mut self.debug_overdraw,
+ BlendMode::None => &mut self.opaque,
+ BlendMode::Alpha |
+ BlendMode::PremultipliedAlpha |
+ BlendMode::PremultipliedDestOut |
+ BlendMode::SubpixelConstantTextColor(..) |
+ BlendMode::SubpixelWithBgColor => &mut self.alpha,
+ BlendMode::Advanced(_) => {
+ self.advanced_blend
+ .as_mut()
+ .expect("bug: no advanced blend shader loaded")
+ }
+ BlendMode::SubpixelDualSource => {
+ self.dual_source
+ .as_mut()
+ .expect("bug: no dual source shader loaded")
+ }
+ }
+ }
+
+ fn deinit(self, device: &mut Device) {
+ self.opaque.deinit(device);
+ self.alpha.deinit(device);
+ if let Some(advanced_blend) = self.advanced_blend {
+ advanced_blend.deinit(device);
+ }
+ if let Some(dual_source) = self.dual_source {
+ dual_source.deinit(device);
+ }
+ self.debug_overdraw.deinit(device);
+ }
+}
+
+pub struct TextShader {
+ simple: LazilyCompiledShader,
+ glyph_transform: LazilyCompiledShader,
+ debug_overdraw: LazilyCompiledShader,
+}
+
+impl TextShader {
+ fn new(
+ name: &'static str,
+ device: &mut Device,
+ features: &[&'static str],
+ precache_flags: ShaderPrecacheFlags,
+ shader_list: &ShaderFeatures,
+ ) -> Result<Self, ShaderError> {
+ let mut simple_features = features.to_vec();
+ simple_features.push("ALPHA_PASS");
+
+ let simple = LazilyCompiledShader::new(
+ ShaderKind::Text,
+ name,
+ &simple_features,
+ device,
+ precache_flags,
+ &shader_list,
+ )?;
+
+ let mut glyph_transform_features = features.to_vec();
+ glyph_transform_features.push("GLYPH_TRANSFORM");
+ glyph_transform_features.push("ALPHA_PASS");
+
+ let glyph_transform = LazilyCompiledShader::new(
+ ShaderKind::Text,
+ name,
+ &glyph_transform_features,
+ device,
+ precache_flags,
+ &shader_list,
+ )?;
+
+ let mut debug_overdraw_features = features.to_vec();
+ debug_overdraw_features.push("DEBUG_OVERDRAW");
+
+ let debug_overdraw = LazilyCompiledShader::new(
+ ShaderKind::Text,
+ name,
+ &debug_overdraw_features,
+ device,
+ precache_flags,
+ &shader_list,
+ )?;
+
+ Ok(TextShader { simple, glyph_transform, debug_overdraw })
+ }
+
+ pub fn get(
+ &mut self,
+ glyph_format: GlyphFormat,
+ debug_flags: DebugFlags,
+ ) -> &mut LazilyCompiledShader {
+ match glyph_format {
+ _ if debug_flags.contains(DebugFlags::SHOW_OVERDRAW) => &mut self.debug_overdraw,
+ GlyphFormat::Alpha |
+ GlyphFormat::Subpixel |
+ GlyphFormat::Bitmap |
+ GlyphFormat::ColorBitmap => &mut self.simple,
+ GlyphFormat::TransformedAlpha |
+ GlyphFormat::TransformedSubpixel => &mut self.glyph_transform,
+ }
+ }
+
+ fn deinit(self, device: &mut Device) {
+ self.simple.deinit(device);
+ self.glyph_transform.deinit(device);
+ self.debug_overdraw.deinit(device);
+ }
+}
+
+fn create_prim_shader(
+ name: &'static str,
+ device: &mut Device,
+ features: &[&'static str],
+) -> Result<Program, ShaderError> {
+ debug!("PrimShader {}", name);
+
+ device.create_program(name, features)
+}
+
+fn create_clip_shader(
+ name: &'static str,
+ device: &mut Device,
+ features: &[&'static str],
+) -> Result<Program, ShaderError> {
+ debug!("ClipShader {}", name);
+
+ device.create_program(name, features)
+}
+
+// NB: If you add a new shader here, make sure to deinitialize it
+// in `Shaders::deinit()` below.
+pub struct Shaders {
+ // These are "cache shaders". These shaders are used to
+ // draw intermediate results to cache targets. The results
+ // of these shaders are then used by the primitive shaders.
+ pub cs_blur_a8: LazilyCompiledShader,
+ pub cs_blur_rgba8: LazilyCompiledShader,
+ pub cs_border_segment: LazilyCompiledShader,
+ pub cs_border_solid: LazilyCompiledShader,
+ pub cs_scale: LazilyCompiledShader,
+ pub cs_line_decoration: LazilyCompiledShader,
+ pub cs_gradient: LazilyCompiledShader,
+ pub cs_svg_filter: LazilyCompiledShader,
+
+ // Brush shaders
+ brush_solid: BrushShader,
+ brush_image: Vec<Option<BrushShader>>,
+ brush_fast_image: Vec<Option<BrushShader>>,
+ brush_blend: BrushShader,
+ brush_mix_blend: BrushShader,
+ brush_yuv_image: Vec<Option<BrushShader>>,
+ brush_conic_gradient: BrushShader,
+ brush_radial_gradient: BrushShader,
+ brush_linear_gradient: BrushShader,
+ brush_opacity: BrushShader,
+
+ /// These are "cache clip shaders". These shaders are used to
+ /// draw clip instances into the cached clip mask. The results
+ /// of these shaders are also used by the primitive shaders.
+ pub cs_clip_rectangle_slow: LazilyCompiledShader,
+ pub cs_clip_rectangle_fast: LazilyCompiledShader,
+ pub cs_clip_box_shadow: LazilyCompiledShader,
+ pub cs_clip_image: LazilyCompiledShader,
+
+ // The are "primitive shaders". These shaders draw and blend
+ // final results on screen. They are aware of tile boundaries.
+ // Most draw directly to the framebuffer, but some use inputs
+ // from the cache shaders to draw. Specifically, the box
+ // shadow primitive shader stretches the box shadow cache
+ // output, and the cache_image shader blits the results of
+ // a cache shader (e.g. blur) to the screen.
+ pub ps_text_run: TextShader,
+ pub ps_text_run_dual_source: Option<TextShader>,
+
+ // Helper shaders for pixel local storage render paths.
+ // pls_init: Initialize pixel local storage, based on current framebuffer value.
+ // pls_resolve: Convert pixel local storage, writing out to fragment value.
+ pub pls_init: Option<LazilyCompiledShader>,
+ pub pls_resolve: Option<LazilyCompiledShader>,
+
+ ps_split_composite: LazilyCompiledShader,
+ pub ps_clear: LazilyCompiledShader,
+
+ // Composite shaders. These are very simple shaders used to composite
+ // picture cache tiles into the framebuffer on platforms that do not have an
+ // OS Compositor (or we cannot use it). Such an OS Compositor (such as
+ // DirectComposite or CoreAnimation) handles the composition of the picture
+ // cache tiles at a lower level (e.g. in DWM for Windows); in that case we
+ // directly hand the picture cache surfaces over to the OS Compositor, and
+ // our own Composite shaders below never run.
+ // To composite external (RGB) surfaces we need various permutations of
+ // shaders with WR_FEATURE flags on or off based on the type of image
+ // buffer we're sourcing from (see IMAGE_BUFFER_KINDS).
+ pub composite_rgba: Vec<Option<LazilyCompiledShader>>,
+ // The same set of composite shaders but with WR_FEATURE_YUV added.
+ pub composite_yuv: Vec<Option<LazilyCompiledShader>>,
+}
+
+impl Shaders {
+ pub fn new(
+ device: &mut Device,
+ gl_type: GlType,
+ options: &RendererOptions,
+ ) -> Result<Self, ShaderError> {
+ let use_pixel_local_storage = device
+ .get_capabilities()
+ .supports_pixel_local_storage;
+ // If using PLS, we disable all subpixel AA implicitly. Subpixel AA is always
+ // disabled on mobile devices anyway, due to uncertainty over the subpixel
+ // layout configuration.
+ let use_dual_source_blending =
+ device.get_capabilities().supports_dual_source_blending &&
+ options.allow_dual_source_blending &&
+ !use_pixel_local_storage;
+ let use_advanced_blend_equation =
+ device.get_capabilities().supports_advanced_blend_equation &&
+ options.allow_advanced_blend_equation;
+
+ let mut shader_flags = match gl_type {
+ GlType::Gl => ShaderFeatureFlags::GL,
+ GlType::Gles => ShaderFeatureFlags::GLES | ShaderFeatureFlags::TEXTURE_EXTERNAL,
+ };
+ shader_flags.set(ShaderFeatureFlags::PIXEL_LOCAL_STORAGE, use_pixel_local_storage);
+ shader_flags.set(ShaderFeatureFlags::ADVANCED_BLEND_EQUATION, use_advanced_blend_equation);
+ shader_flags.set(ShaderFeatureFlags::DUAL_SOURCE_BLENDING, use_dual_source_blending);
+ shader_flags.set(ShaderFeatureFlags::DITHERING, options.enable_dithering);
+ let shader_list = get_shader_features(shader_flags);
+
+ let brush_solid = BrushShader::new(
+ "brush_solid",
+ device,
+ &[],
+ options.precache_flags,
+ &shader_list,
+ false /* advanced blend */,
+ false /* dual source */,
+ use_pixel_local_storage,
+ )?;
+
+ let brush_blend = BrushShader::new(
+ "brush_blend",
+ device,
+ &[],
+ options.precache_flags,
+ &shader_list,
+ false /* advanced blend */,
+ false /* dual source */,
+ use_pixel_local_storage,
+ )?;
+
+ let brush_mix_blend = BrushShader::new(
+ "brush_mix_blend",
+ device,
+ &[],
+ options.precache_flags,
+ &shader_list,
+ false /* advanced blend */,
+ false /* dual source */,
+ use_pixel_local_storage,
+ )?;
+
+ let brush_conic_gradient = BrushShader::new(
+ "brush_conic_gradient",
+ device,
+ if options.enable_dithering {
+ &[DITHERING_FEATURE]
+ } else {
+ &[]
+ },
+ options.precache_flags,
+ &shader_list,
+ false /* advanced blend */,
+ false /* dual source */,
+ use_pixel_local_storage,
+ )?;
+
+ let brush_radial_gradient = BrushShader::new(
+ "brush_radial_gradient",
+ device,
+ if options.enable_dithering {
+ &[DITHERING_FEATURE]
+ } else {
+ &[]
+ },
+ options.precache_flags,
+ &shader_list,
+ false /* advanced blend */,
+ false /* dual source */,
+ use_pixel_local_storage,
+ )?;
+
+ let brush_linear_gradient = BrushShader::new(
+ "brush_linear_gradient",
+ device,
+ if options.enable_dithering {
+ &[DITHERING_FEATURE]
+ } else {
+ &[]
+ },
+ options.precache_flags,
+ &shader_list,
+ false /* advanced blend */,
+ false /* dual source */,
+ use_pixel_local_storage,
+ )?;
+
+ let brush_opacity = BrushShader::new(
+ "brush_opacity",
+ device,
+ &[],
+ options.precache_flags,
+ &shader_list,
+ false /* advanced blend */,
+ false /* dual source */,
+ use_pixel_local_storage,
+ )?;
+
+ let cs_blur_a8 = LazilyCompiledShader::new(
+ ShaderKind::Cache(VertexArrayKind::Blur),
+ "cs_blur",
+ &["ALPHA_TARGET"],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let cs_blur_rgba8 = LazilyCompiledShader::new(
+ ShaderKind::Cache(VertexArrayKind::Blur),
+ "cs_blur",
+ &["COLOR_TARGET"],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let cs_svg_filter = LazilyCompiledShader::new(
+ ShaderKind::Cache(VertexArrayKind::SvgFilter),
+ "cs_svg_filter",
+ &[],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let cs_clip_rectangle_slow = LazilyCompiledShader::new(
+ ShaderKind::ClipCache,
+ "cs_clip_rectangle",
+ &[],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let cs_clip_rectangle_fast = LazilyCompiledShader::new(
+ ShaderKind::ClipCache,
+ "cs_clip_rectangle",
+ &[FAST_PATH_FEATURE],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let cs_clip_box_shadow = LazilyCompiledShader::new(
+ ShaderKind::ClipCache,
+ "cs_clip_box_shadow",
+ &[],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let cs_clip_image = LazilyCompiledShader::new(
+ ShaderKind::ClipCache,
+ "cs_clip_image",
+ &[],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let pls_init = if use_pixel_local_storage {
+ Some(LazilyCompiledShader::new(
+ ShaderKind::Resolve,
+ "pls_init",
+ &[PIXEL_LOCAL_STORAGE_FEATURE],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?)
+ } else {
+ None
+ };
+
+ let pls_resolve = if use_pixel_local_storage {
+ Some(LazilyCompiledShader::new(
+ ShaderKind::Resolve,
+ "pls_resolve",
+ &[PIXEL_LOCAL_STORAGE_FEATURE],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?)
+ } else {
+ None
+ };
+
+ let cs_scale = LazilyCompiledShader::new(
+ ShaderKind::Cache(VertexArrayKind::Scale),
+ "cs_scale",
+ &[],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ // TODO(gw): The split composite + text shader are special cases - the only
+ // shaders used during normal scene rendering that aren't a brush
+ // shader. Perhaps we can unify these in future?
+ let mut extra_features = Vec::new();
+ if use_pixel_local_storage {
+ extra_features.push(PIXEL_LOCAL_STORAGE_FEATURE);
+ }
+
+ let ps_text_run = TextShader::new("ps_text_run",
+ device,
+ &extra_features,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let ps_text_run_dual_source = if use_dual_source_blending {
+ Some(TextShader::new("ps_text_run",
+ device,
+ &[DUAL_SOURCE_FEATURE],
+ options.precache_flags,
+ &shader_list,
+ )?)
+ } else {
+ None
+ };
+
+ let ps_split_composite = LazilyCompiledShader::new(
+ ShaderKind::Primitive,
+ "ps_split_composite",
+ &extra_features,
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let ps_clear = LazilyCompiledShader::new(
+ ShaderKind::Clear,
+ "ps_clear",
+ &extra_features,
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ // All image configuration.
+ let mut image_features = Vec::new();
+ let mut brush_image = Vec::new();
+ let mut brush_fast_image = Vec::new();
+ // PrimitiveShader is not clonable. Use push() to initialize the vec.
+ for _ in 0 .. IMAGE_BUFFER_KINDS.len() {
+ brush_image.push(None);
+ brush_fast_image.push(None);
+ }
+ for buffer_kind in 0 .. IMAGE_BUFFER_KINDS.len() {
+ if !IMAGE_BUFFER_KINDS[buffer_kind].has_platform_support(&gl_type) {
+ continue;
+ }
+
+ let feature_string = IMAGE_BUFFER_KINDS[buffer_kind].get_feature_string();
+ if feature_string != "" {
+ image_features.push(feature_string);
+ }
+
+ brush_fast_image[buffer_kind] = Some(BrushShader::new(
+ "brush_image",
+ device,
+ &image_features,
+ options.precache_flags,
+ &shader_list,
+ use_advanced_blend_equation,
+ use_dual_source_blending,
+ use_pixel_local_storage,
+ )?);
+
+ image_features.push("REPETITION");
+ image_features.push("ANTIALIASING");
+
+ brush_image[buffer_kind] = Some(BrushShader::new(
+ "brush_image",
+ device,
+ &image_features,
+ options.precache_flags,
+ &shader_list,
+ use_advanced_blend_equation,
+ use_dual_source_blending,
+ use_pixel_local_storage,
+ )?);
+
+ image_features.clear();
+ }
+
+ // All yuv_image configuration.
+ let mut yuv_features = Vec::new();
+ let mut rgba_features = Vec::new();
+ let yuv_shader_num = IMAGE_BUFFER_KINDS.len();
+ let mut brush_yuv_image = Vec::new();
+ let mut composite_yuv = Vec::new();
+ let mut composite_rgba = Vec::new();
+ // PrimitiveShader is not clonable. Use push() to initialize the vec.
+ for _ in 0 .. yuv_shader_num {
+ brush_yuv_image.push(None);
+ composite_yuv.push(None);
+ composite_rgba.push(None);
+ }
+ for image_buffer_kind in &IMAGE_BUFFER_KINDS {
+ if image_buffer_kind.has_platform_support(&gl_type) {
+ yuv_features.push("YUV");
+
+ let feature_string = image_buffer_kind.get_feature_string();
+ if feature_string != "" {
+ yuv_features.push(feature_string);
+ rgba_features.push(feature_string);
+ }
+
+ let brush_shader = BrushShader::new(
+ "brush_yuv_image",
+ device,
+ &yuv_features,
+ options.precache_flags,
+ &shader_list,
+ false /* advanced blend */,
+ false /* dual source */,
+ use_pixel_local_storage,
+ )?;
+
+ let composite_yuv_shader = LazilyCompiledShader::new(
+ ShaderKind::Composite,
+ "composite",
+ &yuv_features,
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let composite_rgba_shader = LazilyCompiledShader::new(
+ ShaderKind::Composite,
+ "composite",
+ &rgba_features,
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let index = Self::get_compositing_shader_index(
+ *image_buffer_kind,
+ );
+ brush_yuv_image[index] = Some(brush_shader);
+ composite_yuv[index] = Some(composite_yuv_shader);
+ composite_rgba[index] = Some(composite_rgba_shader);
+
+ yuv_features.clear();
+ rgba_features.clear()
+ }
+ }
+
+ let cs_line_decoration = LazilyCompiledShader::new(
+ ShaderKind::Cache(VertexArrayKind::LineDecoration),
+ "cs_line_decoration",
+ &[],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let cs_gradient = LazilyCompiledShader::new(
+ ShaderKind::Cache(VertexArrayKind::Gradient),
+ "cs_gradient",
+ &[],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let cs_border_segment = LazilyCompiledShader::new(
+ ShaderKind::Cache(VertexArrayKind::Border),
+ "cs_border_segment",
+ &[],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ let cs_border_solid = LazilyCompiledShader::new(
+ ShaderKind::Cache(VertexArrayKind::Border),
+ "cs_border_solid",
+ &[],
+ device,
+ options.precache_flags,
+ &shader_list,
+ )?;
+
+ Ok(Shaders {
+ cs_blur_a8,
+ cs_blur_rgba8,
+ cs_border_segment,
+ cs_line_decoration,
+ cs_gradient,
+ cs_border_solid,
+ cs_scale,
+ cs_svg_filter,
+ brush_solid,
+ brush_image,
+ brush_fast_image,
+ brush_blend,
+ brush_mix_blend,
+ brush_yuv_image,
+ brush_conic_gradient,
+ brush_radial_gradient,
+ brush_linear_gradient,
+ brush_opacity,
+ cs_clip_rectangle_slow,
+ cs_clip_rectangle_fast,
+ cs_clip_box_shadow,
+ cs_clip_image,
+ pls_init,
+ pls_resolve,
+ ps_text_run,
+ ps_text_run_dual_source,
+ ps_split_composite,
+ ps_clear,
+ composite_rgba,
+ composite_yuv,
+ })
+ }
+
+ fn get_compositing_shader_index(buffer_kind: ImageBufferKind) -> usize {
+ buffer_kind as usize
+ }
+
+ pub fn get_composite_shader(
+ &mut self,
+ format: CompositeSurfaceFormat,
+ buffer_kind: ImageBufferKind,
+ ) -> &mut LazilyCompiledShader {
+ match format {
+ CompositeSurfaceFormat::Rgba => {
+ let shader_index = Self::get_compositing_shader_index(buffer_kind);
+ self.composite_rgba[shader_index]
+ .as_mut()
+ .expect("bug: unsupported rgba shader requested")
+ }
+ CompositeSurfaceFormat::Yuv => {
+ let shader_index = Self::get_compositing_shader_index(buffer_kind);
+ self.composite_yuv[shader_index]
+ .as_mut()
+ .expect("bug: unsupported yuv shader requested")
+ }
+ }
+ }
+
+ pub fn get(&mut self, key: &BatchKey, features: BatchFeatures, debug_flags: DebugFlags) -> &mut LazilyCompiledShader {
+ match key.kind {
+ BatchKind::SplitComposite => {
+ &mut self.ps_split_composite
+ }
+ BatchKind::Brush(brush_kind) => {
+ let brush_shader = match brush_kind {
+ BrushBatchKind::Solid => {
+ &mut self.brush_solid
+ }
+ BrushBatchKind::Image(image_buffer_kind) => {
+ if features.contains(BatchFeatures::ANTIALIASING) ||
+ features.contains(BatchFeatures::REPETITION) {
+
+ self.brush_image[image_buffer_kind as usize]
+ .as_mut()
+ .expect("Unsupported image shader kind")
+ } else {
+ self.brush_fast_image[image_buffer_kind as usize]
+ .as_mut()
+ .expect("Unsupported image shader kind")
+ }
+ }
+ BrushBatchKind::Blend => {
+ &mut self.brush_blend
+ }
+ BrushBatchKind::MixBlend { .. } => {
+ &mut self.brush_mix_blend
+ }
+ BrushBatchKind::ConicGradient => {
+ &mut self.brush_conic_gradient
+ }
+ BrushBatchKind::RadialGradient => {
+ &mut self.brush_radial_gradient
+ }
+ BrushBatchKind::LinearGradient => {
+ &mut self.brush_linear_gradient
+ }
+ BrushBatchKind::YuvImage(image_buffer_kind, ..) => {
+ let shader_index =
+ Self::get_compositing_shader_index(image_buffer_kind);
+ self.brush_yuv_image[shader_index]
+ .as_mut()
+ .expect("Unsupported YUV shader kind")
+ }
+ BrushBatchKind::Opacity => {
+ &mut self.brush_opacity
+ }
+ };
+ brush_shader.get(key.blend_mode, debug_flags)
+ }
+ BatchKind::TextRun(glyph_format) => {
+ let text_shader = match key.blend_mode {
+ BlendMode::SubpixelDualSource => self.ps_text_run_dual_source.as_mut().unwrap(),
+ _ => &mut self.ps_text_run,
+ };
+ text_shader.get(glyph_format, debug_flags)
+ }
+ }
+ }
+
+ pub fn deinit(self, device: &mut Device) {
+ self.cs_scale.deinit(device);
+ self.cs_blur_a8.deinit(device);
+ self.cs_blur_rgba8.deinit(device);
+ self.cs_svg_filter.deinit(device);
+ self.brush_solid.deinit(device);
+ self.brush_blend.deinit(device);
+ self.brush_mix_blend.deinit(device);
+ self.brush_conic_gradient.deinit(device);
+ self.brush_radial_gradient.deinit(device);
+ self.brush_linear_gradient.deinit(device);
+ self.brush_opacity.deinit(device);
+ self.cs_clip_rectangle_slow.deinit(device);
+ self.cs_clip_rectangle_fast.deinit(device);
+ self.cs_clip_box_shadow.deinit(device);
+ self.cs_clip_image.deinit(device);
+ if let Some(shader) = self.pls_init {
+ shader.deinit(device);
+ }
+ if let Some(shader) = self.pls_resolve {
+ shader.deinit(device);
+ }
+ self.ps_text_run.deinit(device);
+ if let Some(shader) = self.ps_text_run_dual_source {
+ shader.deinit(device);
+ }
+ for shader in self.brush_image {
+ if let Some(shader) = shader {
+ shader.deinit(device);
+ }
+ }
+ for shader in self.brush_fast_image {
+ if let Some(shader) = shader {
+ shader.deinit(device);
+ }
+ }
+ for shader in self.brush_yuv_image {
+ if let Some(shader) = shader {
+ shader.deinit(device);
+ }
+ }
+ self.cs_border_solid.deinit(device);
+ self.cs_gradient.deinit(device);
+ self.cs_line_decoration.deinit(device);
+ self.cs_border_segment.deinit(device);
+ self.ps_split_composite.deinit(device);
+ self.ps_clear.deinit(device);
+
+ for shader in self.composite_rgba {
+ if let Some(shader) = shader {
+ shader.deinit(device);
+ }
+ }
+ for shader in self.composite_yuv {
+ if let Some(shader) = shader {
+ shader.deinit(device);
+ }
+ }
+ }
+}
+
+// A wrapper around a strong reference to a Shaders
+// object. We have this so that external (ffi)
+// consumers can own a reference to a shared Shaders
+// instance without understanding rust's refcounting.
+pub struct WrShaders {
+ pub shaders: Rc<RefCell<Shaders>>,
+}
diff --git a/third_party/webrender/webrender/src/spatial_node.rs b/third_party/webrender/webrender/src/spatial_node.rs
new file mode 100644
index 00000000000..2283b0fe1a9
--- /dev/null
+++ b/third_party/webrender/webrender/src/spatial_node.rs
@@ -0,0 +1,959 @@
+
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{ExternalScrollId, PipelineId, PropertyBinding, PropertyBindingId, ReferenceFrameKind, ScrollClamping, ScrollLocation};
+use api::{TransformStyle, ScrollSensitivity, StickyOffsetBounds};
+use api::units::*;
+use crate::spatial_tree::{CoordinateSystem, CoordinateSystemId, SpatialNodeIndex, TransformUpdateState};
+use euclid::{Point2D, Vector2D, SideOffsets2D};
+use crate::scene::SceneProperties;
+use crate::util::{LayoutFastTransform, MatrixHelpers, ScaleOffset, TransformedRectKind, PointHelpers};
+
+#[derive(Clone, Debug)]
+pub enum SpatialNodeType {
+ /// A special kind of node that adjusts its position based on the position
+ /// of its parent node and a given set of sticky positioning offset bounds.
+ /// Sticky positioned is described in the CSS Positioned Layout Module Level 3 here:
+ /// https://www.w3.org/TR/css-position-3/#sticky-pos
+ StickyFrame(StickyFrameInfo),
+
+ /// Transforms it's content, but doesn't clip it. Can also be adjusted
+ /// by scroll events or setting scroll offsets.
+ ScrollFrame(ScrollFrameInfo),
+
+ /// A reference frame establishes a new coordinate space in the tree.
+ ReferenceFrame(ReferenceFrameInfo),
+}
+
+/// Contains information common among all types of SpatialTree nodes.
+#[derive(Clone, Debug)]
+pub struct SpatialNode {
+ /// The scale/offset of the viewport for this spatial node, relative to the
+ /// coordinate system. Includes any accumulated scrolling offsets from nodes
+ /// between our reference frame and this node.
+ pub viewport_transform: ScaleOffset,
+
+ /// Content scale/offset relative to the coordinate system.
+ pub content_transform: ScaleOffset,
+
+ /// Snapping scale/offset relative to the coordinate system. If None, then
+ /// we should not snap entities bound to this spatial node.
+ pub snapping_transform: Option<ScaleOffset>,
+
+ /// The axis-aligned coordinate system id of this node.
+ pub coordinate_system_id: CoordinateSystemId,
+
+ /// The current transform kind of this node.
+ pub transform_kind: TransformedRectKind,
+
+ /// Pipeline that this layer belongs to
+ pub pipeline_id: PipelineId,
+
+ /// Parent layer. If this is None, we are the root node.
+ pub parent: Option<SpatialNodeIndex>,
+
+ /// Child layers
+ pub children: Vec<SpatialNodeIndex>,
+
+ /// The type of this node and any data associated with that node type.
+ pub node_type: SpatialNodeType,
+
+ /// True if this node is transformed by an invertible transform. If not, display items
+ /// transformed by this node will not be displayed and display items not transformed by this
+ /// node will not be clipped by clips that are transformed by this node.
+ pub invertible: bool,
+
+ /// Whether this specific node is currently being async zoomed.
+ /// Should be set when a SetIsTransformAsyncZooming FrameMsg is received.
+ pub is_async_zooming: bool,
+
+ /// Whether this node or any of its ancestors is being pinch zoomed.
+ /// This is calculated in update(). This will be used to decide whether
+ /// to override corresponding picture's raster space as an optimisation.
+ pub is_ancestor_or_self_zooming: bool,
+}
+
+fn compute_offset_from(
+ mut current: Option<SpatialNodeIndex>,
+ external_id: ExternalScrollId,
+ previous_spatial_nodes: &[SpatialNode],
+) -> LayoutVector2D {
+ let mut offset = LayoutVector2D::zero();
+ while let Some(parent_index) = current {
+ let ancestor = &previous_spatial_nodes[parent_index.0 as usize];
+ match ancestor.node_type {
+ SpatialNodeType::ReferenceFrame(..) => {
+ // We don't want to scroll across reference frames.
+ break;
+ },
+ SpatialNodeType::ScrollFrame(ref info) => {
+ if info.external_id == Some(external_id) {
+ break;
+ }
+
+ // External scroll offsets are not propagated across
+ // reference frame boundaries, so undo them here.
+ offset += info.offset + info.external_scroll_offset;
+ },
+ SpatialNodeType::StickyFrame(ref info) => {
+ offset += info.current_offset;
+ },
+ }
+ current = ancestor.parent;
+ }
+ offset
+}
+
+/// Snap an offset to be incorporated into a transform, where the local space
+/// may be considered the world space. We convert from world space to device
+/// space using the global device pixel scale, which may not always be correct
+/// if there are intermediate surfaces used, however those are either cases
+/// where snapping is not important (e.g. has perspective or is not axis
+/// aligned), or an edge case (e.g. SVG filters) which we can accept
+/// imperfection for now.
+fn snap_offset<OffsetUnits, ScaleUnits>(
+ offset: Vector2D<f32, OffsetUnits>,
+ scale: Vector2D<f32, ScaleUnits>,
+ global_device_pixel_scale: DevicePixelScale,
+) -> Vector2D<f32, OffsetUnits> {
+ let world_offset = Point2D::new(offset.x * scale.x, offset.y * scale.y);
+ let snapped_device_offset = (world_offset * global_device_pixel_scale).snap();
+ let snapped_world_offset = snapped_device_offset / global_device_pixel_scale;
+ Vector2D::new(
+ if scale.x != 0.0 { snapped_world_offset.x / scale.x } else { offset.x },
+ if scale.y != 0.0 { snapped_world_offset.y / scale.y } else { offset.y },
+ )
+}
+
+impl SpatialNode {
+ pub fn new(
+ pipeline_id: PipelineId,
+ parent_index: Option<SpatialNodeIndex>,
+ node_type: SpatialNodeType,
+ ) -> Self {
+ SpatialNode {
+ viewport_transform: ScaleOffset::identity(),
+ content_transform: ScaleOffset::identity(),
+ snapping_transform: None,
+ coordinate_system_id: CoordinateSystemId(0),
+ transform_kind: TransformedRectKind::AxisAligned,
+ parent: parent_index,
+ children: Vec::new(),
+ pipeline_id,
+ node_type,
+ invertible: true,
+ is_async_zooming: false,
+ is_ancestor_or_self_zooming: false,
+ }
+ }
+
+ pub fn new_scroll_frame(
+ pipeline_id: PipelineId,
+ parent_index: SpatialNodeIndex,
+ external_id: Option<ExternalScrollId>,
+ frame_rect: &LayoutRect,
+ content_size: &LayoutSize,
+ scroll_sensitivity: ScrollSensitivity,
+ frame_kind: ScrollFrameKind,
+ external_scroll_offset: LayoutVector2D,
+ ) -> Self {
+ let node_type = SpatialNodeType::ScrollFrame(ScrollFrameInfo::new(
+ *frame_rect,
+ scroll_sensitivity,
+ LayoutSize::new(
+ (content_size.width - frame_rect.size.width).max(0.0),
+ (content_size.height - frame_rect.size.height).max(0.0)
+ ),
+ external_id,
+ frame_kind,
+ external_scroll_offset,
+ )
+ );
+
+ Self::new(pipeline_id, Some(parent_index), node_type)
+ }
+
+ pub fn new_reference_frame(
+ parent_index: Option<SpatialNodeIndex>,
+ transform_style: TransformStyle,
+ source_transform: PropertyBinding<LayoutTransform>,
+ kind: ReferenceFrameKind,
+ origin_in_parent_reference_frame: LayoutVector2D,
+ pipeline_id: PipelineId,
+ ) -> Self {
+ let info = ReferenceFrameInfo {
+ transform_style,
+ source_transform,
+ kind,
+ origin_in_parent_reference_frame,
+ invertible: true,
+ };
+ Self::new(pipeline_id, parent_index, SpatialNodeType::ReferenceFrame(info))
+ }
+
+ pub fn new_sticky_frame(
+ parent_index: SpatialNodeIndex,
+ sticky_frame_info: StickyFrameInfo,
+ pipeline_id: PipelineId,
+ ) -> Self {
+ Self::new(pipeline_id, Some(parent_index), SpatialNodeType::StickyFrame(sticky_frame_info))
+ }
+
+ pub fn add_child(&mut self, child: SpatialNodeIndex) {
+ self.children.push(child);
+ }
+
+ pub fn apply_old_scrolling_state(&mut self, old_scroll_info: &ScrollFrameInfo) {
+ match self.node_type {
+ SpatialNodeType::ScrollFrame(ref mut scrolling) => {
+ *scrolling = scrolling.combine_with_old_scroll_info(old_scroll_info);
+ }
+ _ if old_scroll_info.offset != LayoutVector2D::zero() => {
+ warn!("Tried to scroll a non-scroll node.")
+ }
+ _ => {}
+ }
+ }
+
+ pub fn set_scroll_origin(&mut self, origin: &LayoutPoint, clamp: ScrollClamping) -> bool {
+ let scrolling = match self.node_type {
+ SpatialNodeType::ScrollFrame(ref mut scrolling) => scrolling,
+ _ => {
+ warn!("Tried to scroll a non-scroll node.");
+ return false;
+ }
+ };
+
+ let normalized_offset = match clamp {
+ ScrollClamping::ToContentBounds => {
+ let scrollable_size = scrolling.scrollable_size;
+ let scrollable_width = scrollable_size.width;
+ let scrollable_height = scrollable_size.height;
+
+ if scrollable_height <= 0. && scrollable_width <= 0. {
+ return false;
+ }
+
+ let origin = LayoutPoint::new(origin.x.max(0.0), origin.y.max(0.0));
+ LayoutVector2D::new(
+ (-origin.x).max(-scrollable_width).min(0.0),
+ (-origin.y).max(-scrollable_height).min(0.0),
+ )
+ }
+ ScrollClamping::NoClamping => LayoutPoint::zero() - *origin,
+ };
+
+ let new_offset = normalized_offset - scrolling.external_scroll_offset;
+
+ if new_offset == scrolling.offset {
+ return false;
+ }
+
+ scrolling.offset = new_offset;
+ true
+ }
+
+ pub fn mark_uninvertible(
+ &mut self,
+ state: &TransformUpdateState,
+ ) {
+ self.invertible = false;
+ self.viewport_transform = ScaleOffset::identity();
+ self.content_transform = ScaleOffset::identity();
+ self.coordinate_system_id = state.current_coordinate_system_id;
+ }
+
+ pub fn update(
+ &mut self,
+ state: &mut TransformUpdateState,
+ coord_systems: &mut Vec<CoordinateSystem>,
+ global_device_pixel_scale: DevicePixelScale,
+ scene_properties: &SceneProperties,
+ previous_spatial_nodes: &[SpatialNode],
+ ) {
+ // If any of our parents was not rendered, we are not rendered either and can just
+ // quit here.
+ if !state.invertible {
+ self.mark_uninvertible(state);
+ return;
+ }
+
+ self.update_transform(state, coord_systems, global_device_pixel_scale, scene_properties, previous_spatial_nodes);
+ //TODO: remove the field entirely?
+ self.transform_kind = if self.coordinate_system_id.0 == 0 {
+ TransformedRectKind::AxisAligned
+ } else {
+ TransformedRectKind::Complex
+ };
+
+ let is_parent_zooming = match self.parent {
+ Some(parent) => previous_spatial_nodes[parent.0 as usize].is_ancestor_or_self_zooming,
+ _ => false,
+ };
+ self.is_ancestor_or_self_zooming = self.is_async_zooming | is_parent_zooming;
+
+ // If this node is a reference frame, we check if it has a non-invertible matrix.
+ // For non-reference-frames we assume that they will produce only additional
+ // translations which should be invertible.
+ match self.node_type {
+ SpatialNodeType::ReferenceFrame(info) if !info.invertible => {
+ self.mark_uninvertible(state);
+ }
+ _ => self.invertible = true,
+ }
+ }
+
+ pub fn update_transform(
+ &mut self,
+ state: &mut TransformUpdateState,
+ coord_systems: &mut Vec<CoordinateSystem>,
+ global_device_pixel_scale: DevicePixelScale,
+ scene_properties: &SceneProperties,
+ previous_spatial_nodes: &[SpatialNode],
+ ) {
+ match self.node_type {
+ SpatialNodeType::ReferenceFrame(ref mut info) => {
+ let mut cs_scale_offset = ScaleOffset::identity();
+
+ if info.invertible {
+ // Resolve the transform against any property bindings.
+ let source_transform = LayoutFastTransform::from(
+ scene_properties.resolve_layout_transform(&info.source_transform)
+ );
+
+ // Do a change-basis operation on the perspective matrix using
+ // the scroll offset.
+ let source_transform = match info.kind {
+ ReferenceFrameKind::Perspective { scrolling_relative_to: Some(external_id) } => {
+ let scroll_offset = compute_offset_from(
+ self.parent,
+ external_id,
+ previous_spatial_nodes,
+ );
+
+ // Do a change-basis operation on the
+ // perspective matrix using the scroll offset.
+ source_transform
+ .pre_translate(scroll_offset)
+ .then_translate(-scroll_offset)
+ }
+ ReferenceFrameKind::Perspective { scrolling_relative_to: None } |
+ ReferenceFrameKind::Transform | ReferenceFrameKind::Zoom => source_transform,
+ };
+
+ let resolved_transform =
+ LayoutFastTransform::with_vector(info.origin_in_parent_reference_frame)
+ .pre_transform(&source_transform);
+
+ // The transformation for this viewport in world coordinates is the transformation for
+ // our parent reference frame, plus any accumulated scrolling offsets from nodes
+ // between our reference frame and this node. Finally, we also include
+ // whatever local transformation this reference frame provides.
+ let relative_transform = resolved_transform
+ .then_translate(snap_offset(state.parent_accumulated_scroll_offset, state.coordinate_system_relative_scale_offset.scale, global_device_pixel_scale))
+ .to_transform()
+ .with_destination::<LayoutPixel>();
+
+ let mut reset_cs_id = match info.transform_style {
+ TransformStyle::Preserve3D => !state.preserves_3d,
+ TransformStyle::Flat => state.preserves_3d,
+ };
+
+ // We reset the coordinate system upon either crossing the preserve-3d context boundary,
+ // or simply a 3D transformation.
+ if !reset_cs_id {
+ // Try to update our compatible coordinate system transform. If we cannot, start a new
+ // incompatible coordinate system.
+ match ScaleOffset::from_transform(&relative_transform) {
+ Some(ref scale_offset) => {
+ // We generally do not want to snap animated transforms as it causes jitter.
+ // However, we do want to snap the visual viewport offset when scrolling.
+ // Therefore only snap the transform for Zoom reference frames. This may still
+ // cause jitter when zooming, unfortunately.
+ let mut maybe_snapped = scale_offset.clone();
+ if info.kind == ReferenceFrameKind::Zoom {
+ maybe_snapped.offset = snap_offset(
+ scale_offset.offset,
+ state.coordinate_system_relative_scale_offset.scale,
+ global_device_pixel_scale
+ );
+ }
+ cs_scale_offset =
+ state.coordinate_system_relative_scale_offset.accumulate(&maybe_snapped);
+ }
+ None => reset_cs_id = true,
+ }
+ }
+ if reset_cs_id {
+ // If we break 2D axis alignment or have a perspective component, we need to start a
+ // new incompatible coordinate system with which we cannot share clips without masking.
+ let transform = relative_transform.then(
+ &state.coordinate_system_relative_scale_offset.to_transform()
+ );
+
+ // Push that new coordinate system and record the new id.
+ let coord_system = {
+ let parent_system = &coord_systems[state.current_coordinate_system_id.0 as usize];
+ let mut cur_transform = transform;
+ if parent_system.should_flatten {
+ cur_transform.flatten_z_output();
+ }
+ let world_transform = cur_transform.then(&parent_system.world_transform);
+ let determinant = world_transform.determinant();
+ info.invertible = determinant != 0.0 && !determinant.is_nan();
+
+ CoordinateSystem {
+ transform,
+ world_transform,
+ should_flatten: match (info.transform_style, info.kind) {
+ (TransformStyle::Flat, ReferenceFrameKind::Transform) => true,
+ (_, _) => false,
+ },
+ parent: Some(state.current_coordinate_system_id),
+ }
+ };
+ state.current_coordinate_system_id = CoordinateSystemId(coord_systems.len() as u32);
+ coord_systems.push(coord_system);
+ }
+ }
+
+ // Ensure that the current coordinate system ID is propagated to child
+ // nodes, even if we encounter a node that is not invertible. This ensures
+ // that the invariant in get_relative_transform is not violated.
+ self.coordinate_system_id = state.current_coordinate_system_id;
+ self.viewport_transform = cs_scale_offset;
+ self.content_transform = cs_scale_offset;
+ self.invertible = info.invertible;
+ }
+ _ => {
+ // We calculate this here to avoid a double-borrow later.
+ let sticky_offset = self.calculate_sticky_offset(
+ &state.nearest_scrolling_ancestor_offset,
+ &state.nearest_scrolling_ancestor_viewport,
+ );
+
+ // The transformation for the bounds of our viewport is the parent reference frame
+ // transform, plus any accumulated scroll offset from our parents, plus any offset
+ // provided by our own sticky positioning.
+ let accumulated_offset = state.parent_accumulated_scroll_offset + sticky_offset;
+ self.viewport_transform = state.coordinate_system_relative_scale_offset
+ .offset(snap_offset(accumulated_offset, state.coordinate_system_relative_scale_offset.scale, global_device_pixel_scale).to_untyped());
+
+ // The transformation for any content inside of us is the viewport transformation, plus
+ // whatever scrolling offset we supply as well.
+ let added_offset = accumulated_offset + self.scroll_offset();
+ self.content_transform = state.coordinate_system_relative_scale_offset
+ .offset(snap_offset(added_offset, state.coordinate_system_relative_scale_offset.scale, global_device_pixel_scale).to_untyped());
+
+ if let SpatialNodeType::StickyFrame(ref mut info) = self.node_type {
+ info.current_offset = sticky_offset;
+ }
+
+ self.coordinate_system_id = state.current_coordinate_system_id;
+ }
+ }
+ }
+
+ fn calculate_sticky_offset(
+ &self,
+ viewport_scroll_offset: &LayoutVector2D,
+ viewport_rect: &LayoutRect,
+ ) -> LayoutVector2D {
+ let info = match self.node_type {
+ SpatialNodeType::StickyFrame(ref info) => info,
+ _ => return LayoutVector2D::zero(),
+ };
+
+ if info.margins.top.is_none() && info.margins.bottom.is_none() &&
+ info.margins.left.is_none() && info.margins.right.is_none() {
+ return LayoutVector2D::zero();
+ }
+
+ // The viewport and margins of the item establishes the maximum amount that it can
+ // be offset in order to keep it on screen. Since we care about the relationship
+ // between the scrolled content and unscrolled viewport we adjust the viewport's
+ // position by the scroll offset in order to work with their relative positions on the
+ // page.
+ let mut sticky_rect = info.frame_rect.translate(*viewport_scroll_offset);
+
+ let mut sticky_offset = LayoutVector2D::zero();
+ if let Some(margin) = info.margins.top {
+ let top_viewport_edge = viewport_rect.min_y() + margin;
+ if sticky_rect.min_y() < top_viewport_edge {
+ // If the sticky rect is positioned above the top edge of the viewport (plus margin)
+ // we move it down so that it is fully inside the viewport.
+ sticky_offset.y = top_viewport_edge - sticky_rect.min_y();
+ } else if info.previously_applied_offset.y > 0.0 &&
+ sticky_rect.min_y() > top_viewport_edge {
+ // However, if the sticky rect is positioned *below* the top edge of the viewport
+ // and there is already some offset applied to the sticky rect's position, then
+ // we need to move it up so that it remains at the correct position. This
+ // makes sticky_offset.y negative and effectively reduces the amount of the
+ // offset that was already applied. We limit the reduction so that it can, at most,
+ // cancel out the already-applied offset, but should never end up adjusting the
+ // position the other way.
+ sticky_offset.y = top_viewport_edge - sticky_rect.min_y();
+ sticky_offset.y = sticky_offset.y.max(-info.previously_applied_offset.y);
+ }
+ }
+
+ // If we don't have a sticky-top offset (sticky_offset.y + info.previously_applied_offset.y
+ // == 0), or if we have a previously-applied bottom offset (previously_applied_offset.y < 0)
+ // then we check for handling the bottom margin case. Note that the "don't have a sticky-top
+ // offset" case includes the case where we *had* a sticky-top offset but we reduced it to
+ // zero in the above block.
+ if sticky_offset.y + info.previously_applied_offset.y <= 0.0 {
+ if let Some(margin) = info.margins.bottom {
+ // If sticky_offset.y is nonzero that means we must have set it
+ // in the sticky-top handling code above, so this item must have
+ // both top and bottom sticky margins. We adjust the item's rect
+ // by the top-sticky offset, and then combine any offset from
+ // the bottom-sticky calculation into sticky_offset below.
+ sticky_rect.origin.y += sticky_offset.y;
+
+ // Same as the above case, but inverted for bottom-sticky items. Here
+ // we adjust items upwards, resulting in a negative sticky_offset.y,
+ // or reduce the already-present upward adjustment, resulting in a positive
+ // sticky_offset.y.
+ let bottom_viewport_edge = viewport_rect.max_y() - margin;
+ if sticky_rect.max_y() > bottom_viewport_edge {
+ sticky_offset.y += bottom_viewport_edge - sticky_rect.max_y();
+ } else if info.previously_applied_offset.y < 0.0 &&
+ sticky_rect.max_y() < bottom_viewport_edge {
+ sticky_offset.y += bottom_viewport_edge - sticky_rect.max_y();
+ sticky_offset.y = sticky_offset.y.min(-info.previously_applied_offset.y);
+ }
+ }
+ }
+
+ // Same as above, but for the x-axis.
+ if let Some(margin) = info.margins.left {
+ let left_viewport_edge = viewport_rect.min_x() + margin;
+ if sticky_rect.min_x() < left_viewport_edge {
+ sticky_offset.x = left_viewport_edge - sticky_rect.min_x();
+ } else if info.previously_applied_offset.x > 0.0 &&
+ sticky_rect.min_x() > left_viewport_edge {
+ sticky_offset.x = left_viewport_edge - sticky_rect.min_x();
+ sticky_offset.x = sticky_offset.x.max(-info.previously_applied_offset.x);
+ }
+ }
+
+ if sticky_offset.x + info.previously_applied_offset.x <= 0.0 {
+ if let Some(margin) = info.margins.right {
+ sticky_rect.origin.x += sticky_offset.x;
+ let right_viewport_edge = viewport_rect.max_x() - margin;
+ if sticky_rect.max_x() > right_viewport_edge {
+ sticky_offset.x += right_viewport_edge - sticky_rect.max_x();
+ } else if info.previously_applied_offset.x < 0.0 &&
+ sticky_rect.max_x() < right_viewport_edge {
+ sticky_offset.x += right_viewport_edge - sticky_rect.max_x();
+ sticky_offset.x = sticky_offset.x.min(-info.previously_applied_offset.x);
+ }
+ }
+ }
+
+ // The total "sticky offset" (which is the sum that was already applied by
+ // the calling code, stored in info.previously_applied_offset, and the extra amount we
+ // computed as a result of scrolling, stored in sticky_offset) needs to be
+ // clamped to the provided bounds.
+ let clamp_adjusted = |value: f32, adjust: f32, bounds: &StickyOffsetBounds| {
+ (value + adjust).max(bounds.min).min(bounds.max) - adjust
+ };
+ sticky_offset.y = clamp_adjusted(sticky_offset.y,
+ info.previously_applied_offset.y,
+ &info.vertical_offset_bounds);
+ sticky_offset.x = clamp_adjusted(sticky_offset.x,
+ info.previously_applied_offset.x,
+ &info.horizontal_offset_bounds);
+
+ sticky_offset
+ }
+
+ pub fn prepare_state_for_children(&self, state: &mut TransformUpdateState) {
+ if !self.invertible {
+ state.invertible = false;
+ return;
+ }
+
+ // The transformation we are passing is the transformation of the parent
+ // reference frame and the offset is the accumulated offset of all the nodes
+ // between us and the parent reference frame. If we are a reference frame,
+ // we need to reset both these values.
+ match self.node_type {
+ SpatialNodeType::StickyFrame(ref info) => {
+ // We don't translate the combined rect by the sticky offset, because sticky
+ // offsets actually adjust the node position itself, whereas scroll offsets
+ // only apply to contents inside the node.
+ state.parent_accumulated_scroll_offset += info.current_offset;
+ // We want nested sticky items to take into account the shift
+ // we applied as well.
+ state.nearest_scrolling_ancestor_offset += info.current_offset;
+ state.preserves_3d = false;
+ }
+ SpatialNodeType::ScrollFrame(ref scrolling) => {
+ state.parent_accumulated_scroll_offset += scrolling.offset;
+ state.nearest_scrolling_ancestor_offset = scrolling.offset;
+ state.nearest_scrolling_ancestor_viewport = scrolling.viewport_rect;
+ state.preserves_3d = false;
+ }
+ SpatialNodeType::ReferenceFrame(ref info) => {
+ state.preserves_3d = info.transform_style == TransformStyle::Preserve3D;
+ state.parent_accumulated_scroll_offset = LayoutVector2D::zero();
+ state.coordinate_system_relative_scale_offset = self.content_transform;
+ let translation = -info.origin_in_parent_reference_frame;
+ state.nearest_scrolling_ancestor_viewport =
+ state.nearest_scrolling_ancestor_viewport
+ .translate(translation);
+ }
+ }
+ }
+
+ pub fn scroll(&mut self, scroll_location: ScrollLocation) -> bool {
+ // TODO(gw): This scroll method doesn't currently support
+ // scroll nodes with non-zero external scroll
+ // offsets. However, it's never used by Gecko,
+ // which is the only client that requires
+ // non-zero external scroll offsets.
+
+ let scrolling = match self.node_type {
+ SpatialNodeType::ScrollFrame(ref mut scrolling) => scrolling,
+ _ => return false,
+ };
+
+ let delta = match scroll_location {
+ ScrollLocation::Delta(delta) => delta,
+ ScrollLocation::Start => {
+ if scrolling.offset.y.round() >= 0.0 {
+ // Nothing to do on this layer.
+ return false;
+ }
+
+ scrolling.offset.y = 0.0;
+ return true;
+ }
+ ScrollLocation::End => {
+ let end_pos = -scrolling.scrollable_size.height;
+ if scrolling.offset.y.round() <= end_pos {
+ // Nothing to do on this layer.
+ return false;
+ }
+
+ scrolling.offset.y = end_pos;
+ return true;
+ }
+ };
+
+ let scrollable_width = scrolling.scrollable_size.width;
+ let scrollable_height = scrolling.scrollable_size.height;
+ let original_layer_scroll_offset = scrolling.offset;
+
+ if scrollable_width > 0. {
+ scrolling.offset.x = (scrolling.offset.x + delta.x)
+ .min(0.0)
+ .max(-scrollable_width);
+ }
+
+ if scrollable_height > 0. {
+ scrolling.offset.y = (scrolling.offset.y + delta.y)
+ .min(0.0)
+ .max(-scrollable_height);
+ }
+
+ scrolling.offset != original_layer_scroll_offset
+ }
+
+ pub fn scroll_offset(&self) -> LayoutVector2D {
+ match self.node_type {
+ SpatialNodeType::ScrollFrame(ref scrolling) => scrolling.offset,
+ _ => LayoutVector2D::zero(),
+ }
+ }
+
+ pub fn matches_external_id(&self, external_id: ExternalScrollId) -> bool {
+ match self.node_type {
+ SpatialNodeType::ScrollFrame(info) if info.external_id == Some(external_id) => true,
+ _ => false,
+ }
+ }
+
+ /// Updates the snapping transform.
+ pub fn update_snapping(
+ &mut self,
+ parent: Option<&SpatialNode>,
+ ) {
+ // Reset in case of an early return.
+ self.snapping_transform = None;
+
+ // We need to incorporate the parent scale/offset with the child.
+ // If the parent does not have a scale/offset, then we know we are
+ // not 2d axis aligned and thus do not need to snap its children
+ // either.
+ let parent_scale_offset = match parent {
+ Some(parent) => {
+ match parent.snapping_transform {
+ Some(scale_offset) => scale_offset,
+ None => return,
+ }
+ },
+ _ => ScaleOffset::identity(),
+ };
+
+ let scale_offset = match self.node_type {
+ SpatialNodeType::ReferenceFrame(ref info) => {
+ match info.source_transform {
+ PropertyBinding::Value(ref value) => {
+ // We can only get a ScaleOffset if the transform is 2d axis
+ // aligned.
+ match ScaleOffset::from_transform(value) {
+ Some(scale_offset) => {
+ let origin_offset = info.origin_in_parent_reference_frame;
+ ScaleOffset::from_offset(origin_offset.to_untyped())
+ .accumulate(&scale_offset)
+ }
+ None => return,
+ }
+ }
+
+ // Assume animations start at the identity transform for snapping purposes.
+ // We still want to incorporate the reference frame offset however.
+ // TODO(aosmond): Is there a better known starting point?
+ PropertyBinding::Binding(..) => {
+ let origin_offset = info.origin_in_parent_reference_frame;
+ ScaleOffset::from_offset(origin_offset.to_untyped())
+ }
+ }
+ }
+ _ => ScaleOffset::identity(),
+ };
+
+ self.snapping_transform = Some(parent_scale_offset.accumulate(&scale_offset));
+ }
+
+ /// Returns true for ReferenceFrames whose source_transform is
+ /// bound to the property binding id.
+ pub fn is_transform_bound_to_property(&self, id: PropertyBindingId) -> bool {
+ if let SpatialNodeType::ReferenceFrame(ref info) = self.node_type {
+ if let PropertyBinding::Binding(key, _) = info.source_transform {
+ id == key.id
+ } else {
+ false
+ }
+ } else {
+ false
+ }
+ }
+}
+
+/// Defines whether we have an implicit scroll frame for a pipeline root,
+/// or an explicitly defined scroll frame from the display list.
+#[derive(Copy, Clone, Debug)]
+pub enum ScrollFrameKind {
+ PipelineRoot,
+ Explicit,
+}
+
+#[derive(Copy, Clone, Debug)]
+pub struct ScrollFrameInfo {
+ /// The rectangle of the viewport of this scroll frame. This is important for
+ /// positioning of items inside child StickyFrames.
+ pub viewport_rect: LayoutRect,
+
+ pub scroll_sensitivity: ScrollSensitivity,
+
+ /// Amount that this ScrollFrame can scroll in both directions.
+ pub scrollable_size: LayoutSize,
+
+ /// An external id to identify this scroll frame to API clients. This
+ /// allows setting scroll positions via the API without relying on ClipsIds
+ /// which may change between frames.
+ pub external_id: Option<ExternalScrollId>,
+
+ /// Stores whether this is a scroll frame added implicitly by WR when adding
+ /// a pipeline (either the root or an iframe). We need to exclude these
+ /// when searching for scroll roots we care about for picture caching.
+ /// TODO(gw): I think we can actually completely remove the implicit
+ /// scroll frame being added by WR, and rely on the embedder
+ /// to define scroll frames. However, that involves API changes
+ /// so we will use this as a temporary hack!
+ pub frame_kind: ScrollFrameKind,
+
+ /// Amount that visual components attached to this scroll node have been
+ /// pre-scrolled in their local coordinates.
+ pub external_scroll_offset: LayoutVector2D,
+
+ /// The current offset of this scroll node.
+ pub offset: LayoutVector2D,
+}
+
+/// Manages scrolling offset.
+impl ScrollFrameInfo {
+ pub fn new(
+ viewport_rect: LayoutRect,
+ scroll_sensitivity: ScrollSensitivity,
+ scrollable_size: LayoutSize,
+ external_id: Option<ExternalScrollId>,
+ frame_kind: ScrollFrameKind,
+ external_scroll_offset: LayoutVector2D,
+ ) -> ScrollFrameInfo {
+ ScrollFrameInfo {
+ viewport_rect,
+ offset: -external_scroll_offset,
+ scroll_sensitivity,
+ scrollable_size,
+ external_id,
+ frame_kind,
+ external_scroll_offset,
+ }
+ }
+
+ pub fn sensitive_to_input_events(&self) -> bool {
+ match self.scroll_sensitivity {
+ ScrollSensitivity::ScriptAndInputEvents => true,
+ ScrollSensitivity::Script => false,
+ }
+ }
+
+ pub fn combine_with_old_scroll_info(
+ self,
+ old_scroll_info: &ScrollFrameInfo
+ ) -> ScrollFrameInfo {
+ let offset =
+ old_scroll_info.offset +
+ self.external_scroll_offset -
+ old_scroll_info.external_scroll_offset;
+
+ ScrollFrameInfo {
+ viewport_rect: self.viewport_rect,
+ offset,
+ scroll_sensitivity: self.scroll_sensitivity,
+ scrollable_size: self.scrollable_size,
+ external_id: self.external_id,
+ frame_kind: self.frame_kind,
+ external_scroll_offset: self.external_scroll_offset,
+ }
+ }
+}
+
+/// Contains information about reference frames.
+#[derive(Copy, Clone, Debug)]
+pub struct ReferenceFrameInfo {
+ /// The source transform and perspective matrices provided by the stacking context
+ /// that forms this reference frame. We maintain the property binding information
+ /// here so that we can resolve the animated transform and update the tree each
+ /// frame.
+ pub source_transform: PropertyBinding<LayoutTransform>,
+ pub transform_style: TransformStyle,
+ pub kind: ReferenceFrameKind,
+
+ /// The original, not including the transform and relative to the parent reference frame,
+ /// origin of this reference frame. This is already rolled into the `transform' property, but
+ /// we also store it here to properly transform the viewport for sticky positioning.
+ pub origin_in_parent_reference_frame: LayoutVector2D,
+
+ /// True if the resolved transform is invertible.
+ pub invertible: bool,
+}
+
+#[derive(Clone, Debug)]
+pub struct StickyFrameInfo {
+ pub frame_rect: LayoutRect,
+ pub margins: SideOffsets2D<Option<f32>, LayoutPixel>,
+ pub vertical_offset_bounds: StickyOffsetBounds,
+ pub horizontal_offset_bounds: StickyOffsetBounds,
+ pub previously_applied_offset: LayoutVector2D,
+ pub current_offset: LayoutVector2D,
+}
+
+impl StickyFrameInfo {
+ pub fn new(
+ frame_rect: LayoutRect,
+ margins: SideOffsets2D<Option<f32>, LayoutPixel>,
+ vertical_offset_bounds: StickyOffsetBounds,
+ horizontal_offset_bounds: StickyOffsetBounds,
+ previously_applied_offset: LayoutVector2D
+ ) -> StickyFrameInfo {
+ StickyFrameInfo {
+ frame_rect,
+ margins,
+ vertical_offset_bounds,
+ horizontal_offset_bounds,
+ previously_applied_offset,
+ current_offset: LayoutVector2D::zero(),
+ }
+ }
+}
+
+#[test]
+fn test_cst_perspective_relative_scroll() {
+ // Verify that when computing the offset from a perspective transform
+ // to a relative scroll node that any external scroll offset is
+ // ignored. This is because external scroll offsets are not
+ // propagated across reference frame boundaries.
+
+ // It's not currently possible to verify this with a wrench reftest,
+ // since wrench doesn't understand external scroll ids. When wrench
+ // supports this, we could also verify with a reftest.
+
+ use crate::spatial_tree::SpatialTree;
+ use euclid::approxeq::ApproxEq;
+
+ let mut cst = SpatialTree::new();
+ let pipeline_id = PipelineId::dummy();
+ let ext_scroll_id = ExternalScrollId(1, pipeline_id);
+ let transform = LayoutTransform::perspective(100.0);
+
+ let root = cst.add_reference_frame(
+ None,
+ TransformStyle::Flat,
+ PropertyBinding::Value(LayoutTransform::identity()),
+ ReferenceFrameKind::Transform,
+ LayoutVector2D::zero(),
+ pipeline_id,
+ );
+
+ let scroll_frame_1 = cst.add_scroll_frame(
+ root,
+ Some(ext_scroll_id),
+ pipeline_id,
+ &LayoutRect::new(LayoutPoint::zero(), LayoutSize::new(100.0, 100.0)),
+ &LayoutSize::new(100.0, 500.0),
+ ScrollSensitivity::Script,
+ ScrollFrameKind::Explicit,
+ LayoutVector2D::zero(),
+ );
+
+ let scroll_frame_2 = cst.add_scroll_frame(
+ scroll_frame_1,
+ None,
+ pipeline_id,
+ &LayoutRect::new(LayoutPoint::zero(), LayoutSize::new(100.0, 100.0)),
+ &LayoutSize::new(100.0, 500.0),
+ ScrollSensitivity::Script,
+ ScrollFrameKind::Explicit,
+ LayoutVector2D::new(0.0, 50.0),
+ );
+
+ let ref_frame = cst.add_reference_frame(
+ Some(scroll_frame_2),
+ TransformStyle::Preserve3D,
+ PropertyBinding::Value(transform),
+ ReferenceFrameKind::Perspective {
+ scrolling_relative_to: Some(ext_scroll_id),
+ },
+ LayoutVector2D::zero(),
+ pipeline_id,
+ );
+
+ cst.update_tree(WorldPoint::zero(), DevicePixelScale::new(1.0), &SceneProperties::new());
+
+ let scroll_offset = compute_offset_from(
+ cst.spatial_nodes[ref_frame.0 as usize].parent,
+ ext_scroll_id,
+ &cst.spatial_nodes,
+ );
+
+ assert!(scroll_offset.x.approx_eq(&0.0));
+ assert!(scroll_offset.y.approx_eq(&0.0));
+}
diff --git a/third_party/webrender/webrender/src/spatial_tree.rs b/third_party/webrender/webrender/src/spatial_tree.rs
new file mode 100644
index 00000000000..d1eaca9d8fc
--- /dev/null
+++ b/third_party/webrender/webrender/src/spatial_tree.rs
@@ -0,0 +1,965 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{ExternalScrollId, PropertyBinding, ReferenceFrameKind, TransformStyle};
+use api::{PipelineId, ScrollClamping, ScrollNodeState, ScrollLocation, ScrollSensitivity};
+use api::units::*;
+use euclid::Transform3D;
+use crate::gpu_types::TransformPalette;
+use crate::internal_types::{FastHashMap, FastHashSet};
+use crate::print_tree::{PrintableTree, PrintTree, PrintTreePrinter};
+use crate::scene::SceneProperties;
+use crate::spatial_node::{ScrollFrameInfo, SpatialNode, SpatialNodeType, StickyFrameInfo, ScrollFrameKind};
+use std::{ops, u32};
+use crate::util::{FastTransform, LayoutToWorldFastTransform, MatrixHelpers, ScaleOffset, scale_factors};
+
+pub type ScrollStates = FastHashMap<ExternalScrollId, ScrollFrameInfo>;
+
+/// An id that identifies coordinate systems in the SpatialTree. Each
+/// coordinate system has an id and those ids will be shared when the coordinates
+/// system are the same or are in the same axis-aligned space. This allows
+/// for optimizing mask generation.
+#[derive(Debug, Copy, Clone, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct CoordinateSystemId(pub u32);
+
+/// A node in the hierarchy of coordinate system
+/// transforms.
+#[derive(Debug)]
+pub struct CoordinateSystem {
+ pub transform: LayoutTransform,
+ pub world_transform: LayoutToWorldTransform,
+ pub should_flatten: bool,
+ pub parent: Option<CoordinateSystemId>,
+}
+
+impl CoordinateSystem {
+ fn root() -> Self {
+ CoordinateSystem {
+ transform: LayoutTransform::identity(),
+ world_transform: LayoutToWorldTransform::identity(),
+ should_flatten: false,
+ parent: None,
+ }
+ }
+}
+
+#[derive(Debug, Copy, Clone, Eq, Hash, MallocSizeOf, PartialEq, PartialOrd, Ord)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct SpatialNodeIndex(pub u32);
+
+impl SpatialNodeIndex {
+ pub const INVALID: SpatialNodeIndex = SpatialNodeIndex(u32::MAX);
+}
+
+//Note: these have to match ROOT_REFERENCE_FRAME_SPATIAL_ID and ROOT_SCROLL_NODE_SPATIAL_ID
+pub const ROOT_SPATIAL_NODE_INDEX: SpatialNodeIndex = SpatialNodeIndex(0);
+const TOPMOST_SCROLL_NODE_INDEX: SpatialNodeIndex = SpatialNodeIndex(1);
+
+impl SpatialNodeIndex {
+ pub fn new(index: usize) -> Self {
+ debug_assert!(index < ::std::u32::MAX as usize);
+ SpatialNodeIndex(index as u32)
+ }
+}
+
+impl CoordinateSystemId {
+ pub fn root() -> Self {
+ CoordinateSystemId(0)
+ }
+}
+
+#[derive(Debug, Copy, Clone, PartialEq)]
+pub enum VisibleFace {
+ Front,
+ Back,
+}
+
+impl Default for VisibleFace {
+ fn default() -> Self {
+ VisibleFace::Front
+ }
+}
+
+impl ops::Not for VisibleFace {
+ type Output = Self;
+ fn not(self) -> Self {
+ match self {
+ VisibleFace::Front => VisibleFace::Back,
+ VisibleFace::Back => VisibleFace::Front,
+ }
+ }
+}
+
+pub struct SpatialTree {
+ /// Nodes which determine the positions (offsets and transforms) for primitives
+ /// and clips.
+ pub spatial_nodes: Vec<SpatialNode>,
+
+ /// A list of transforms that establish new coordinate systems.
+ /// Spatial nodes only establish a new coordinate system when
+ /// they have a transform that is not a simple 2d translation.
+ coord_systems: Vec<CoordinateSystem>,
+
+ pub pending_scroll_offsets: FastHashMap<ExternalScrollId, (LayoutPoint, ScrollClamping)>,
+
+ /// A set of pipelines which should be discarded the next time this
+ /// tree is drained.
+ pub pipelines_to_discard: FastHashSet<PipelineId>,
+
+ /// Temporary stack of nodes to update when traversing the tree.
+ nodes_to_update: Vec<(SpatialNodeIndex, TransformUpdateState)>,
+}
+
+#[derive(Clone)]
+pub struct TransformUpdateState {
+ pub parent_reference_frame_transform: LayoutToWorldFastTransform,
+ pub parent_accumulated_scroll_offset: LayoutVector2D,
+ pub nearest_scrolling_ancestor_offset: LayoutVector2D,
+ pub nearest_scrolling_ancestor_viewport: LayoutRect,
+
+ /// An id for keeping track of the axis-aligned space of this node. This is used in
+ /// order to to track what kinds of clip optimizations can be done for a particular
+ /// display list item, since optimizations can usually only be done among
+ /// coordinate systems which are relatively axis aligned.
+ pub current_coordinate_system_id: CoordinateSystemId,
+
+ /// Scale and offset from the coordinate system that started this compatible coordinate system.
+ pub coordinate_system_relative_scale_offset: ScaleOffset,
+
+ /// True if this node is transformed by an invertible transform. If not, display items
+ /// transformed by this node will not be displayed and display items not transformed by this
+ /// node will not be clipped by clips that are transformed by this node.
+ pub invertible: bool,
+
+ /// True if this node is a part of Preserve3D hierarchy.
+ pub preserves_3d: bool,
+}
+
+
+/// Transformation between two nodes in the spatial tree that can sometimes be
+/// encoded more efficiently than with a full matrix.
+#[derive(Debug, Clone)]
+pub enum CoordinateSpaceMapping<Src, Dst> {
+ Local,
+ ScaleOffset(ScaleOffset),
+ Transform(Transform3D<f32, Src, Dst>),
+}
+
+impl<Src, Dst> CoordinateSpaceMapping<Src, Dst> {
+ pub fn into_transform(self) -> Transform3D<f32, Src, Dst> {
+ match self {
+ CoordinateSpaceMapping::Local => Transform3D::identity(),
+ CoordinateSpaceMapping::ScaleOffset(scale_offset) => scale_offset.to_transform(),
+ CoordinateSpaceMapping::Transform(transform) => transform,
+ }
+ }
+
+ pub fn into_fast_transform(self) -> FastTransform<Src, Dst> {
+ match self {
+ CoordinateSpaceMapping::Local => FastTransform::identity(),
+ CoordinateSpaceMapping::ScaleOffset(scale_offset) => FastTransform::with_scale_offset(scale_offset),
+ CoordinateSpaceMapping::Transform(transform) => FastTransform::with_transform(transform),
+ }
+ }
+
+ pub fn visible_face(&self) -> VisibleFace {
+ match *self {
+ CoordinateSpaceMapping::Transform(ref transform) if transform.is_backface_visible() => VisibleFace::Back,
+ CoordinateSpaceMapping::Local |
+ CoordinateSpaceMapping::Transform(_) |
+ CoordinateSpaceMapping::ScaleOffset(_) => VisibleFace::Front,
+
+ }
+ }
+
+ pub fn is_perspective(&self) -> bool {
+ match *self {
+ CoordinateSpaceMapping::Local |
+ CoordinateSpaceMapping::ScaleOffset(_) => false,
+ CoordinateSpaceMapping::Transform(ref transform) => transform.has_perspective_component(),
+ }
+ }
+
+ pub fn is_2d_axis_aligned(&self) -> bool {
+ match *self {
+ CoordinateSpaceMapping::Local |
+ CoordinateSpaceMapping::ScaleOffset(_) => true,
+ CoordinateSpaceMapping::Transform(ref transform) => transform.preserves_2d_axis_alignment(),
+ }
+ }
+
+ pub fn scale_factors(&self) -> (f32, f32) {
+ match *self {
+ CoordinateSpaceMapping::Local => (1.0, 1.0),
+ CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => (scale_offset.scale.x, scale_offset.scale.y),
+ CoordinateSpaceMapping::Transform(ref transform) => scale_factors(transform),
+ }
+ }
+
+ pub fn inverse(&self) -> Option<CoordinateSpaceMapping<Dst, Src>> {
+ match *self {
+ CoordinateSpaceMapping::Local => Some(CoordinateSpaceMapping::Local),
+ CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => {
+ Some(CoordinateSpaceMapping::ScaleOffset(scale_offset.inverse()))
+ }
+ CoordinateSpaceMapping::Transform(ref transform) => {
+ transform.inverse().map(CoordinateSpaceMapping::Transform)
+ }
+ }
+ }
+}
+
+enum TransformScroll {
+ Scrolled,
+ Unscrolled,
+}
+
+impl SpatialTree {
+ pub fn new() -> Self {
+ SpatialTree {
+ spatial_nodes: Vec::new(),
+ coord_systems: Vec::new(),
+ pending_scroll_offsets: FastHashMap::default(),
+ pipelines_to_discard: FastHashSet::default(),
+ nodes_to_update: Vec::new(),
+ }
+ }
+
+ /// Calculate the accumulated external scroll offset for
+ /// a given spatial node.
+ pub fn external_scroll_offset(&self, node_index: SpatialNodeIndex) -> LayoutVector2D {
+ let mut offset = LayoutVector2D::zero();
+ let mut current_node = Some(node_index);
+
+ while let Some(node_index) = current_node {
+ let node = &self.spatial_nodes[node_index.0 as usize];
+
+ match node.node_type {
+ SpatialNodeType::ScrollFrame(ref scrolling) => {
+ offset += scrolling.external_scroll_offset;
+ }
+ SpatialNodeType::StickyFrame(..) => {
+ // Doesn't provide any external scroll offset
+ }
+ SpatialNodeType::ReferenceFrame(..) => {
+ // External scroll offsets are not propagated across
+ // reference frames.
+ break;
+ }
+ }
+
+ current_node = node.parent;
+ }
+
+ offset
+ }
+
+ /// Calculate the relative transform from `child_index` to `parent_index`.
+ /// This method will panic if the nodes are not connected!
+ pub fn get_relative_transform(
+ &self,
+ child_index: SpatialNodeIndex,
+ parent_index: SpatialNodeIndex,
+ ) -> CoordinateSpaceMapping<LayoutPixel, LayoutPixel> {
+ if child_index == parent_index {
+ return CoordinateSpaceMapping::Local;
+ }
+
+ let child = &self.spatial_nodes[child_index.0 as usize];
+ let parent = &self.spatial_nodes[parent_index.0 as usize];
+
+ if child.coordinate_system_id == parent.coordinate_system_id {
+ let scale_offset = parent.content_transform
+ .inverse()
+ .accumulate(&child.content_transform);
+ return CoordinateSpaceMapping::ScaleOffset(scale_offset);
+ }
+
+ if child_index.0 < parent_index.0 {
+ warn!("Unexpected transform queried from {:?} to {:?}, please call the graphics team!", child_index, parent_index);
+ let child_cs = &self.coord_systems[child.coordinate_system_id.0 as usize];
+ let child_transform = child.content_transform
+ .to_transform::<LayoutPixel, LayoutPixel>()
+ .then(&child_cs.world_transform);
+ let parent_cs = &self.coord_systems[parent.coordinate_system_id.0 as usize];
+ let parent_transform = parent.content_transform
+ .to_transform()
+ .then(&parent_cs.world_transform);
+
+ let result = parent_transform
+ .inverse()
+ .unwrap_or_default()
+ .then(&child_transform)
+ .with_source::<LayoutPixel>()
+ .with_destination::<LayoutPixel>();
+ return CoordinateSpaceMapping::Transform(result);
+ }
+
+ let mut coordinate_system_id = child.coordinate_system_id;
+ let mut transform = child.content_transform.to_transform();
+
+ // we need to update the associated parameters of a transform in two cases:
+ // 1) when the flattening happens, so that we don't lose that original 3D aspects
+ // 2) when we reach the end of iteration, so that our result is up to date
+
+ while coordinate_system_id != parent.coordinate_system_id {
+ let coord_system = &self.coord_systems[coordinate_system_id.0 as usize];
+
+ if coord_system.should_flatten {
+ transform.flatten_z_output();
+ }
+
+ coordinate_system_id = coord_system.parent.expect("invalid parent!");
+ transform = transform.then(&coord_system.transform);
+ }
+
+ transform = transform.then(
+ &parent.content_transform
+ .inverse()
+ .to_transform(),
+ );
+
+ CoordinateSpaceMapping::Transform(transform)
+ }
+
+ fn get_world_transform_impl(
+ &self,
+ index: SpatialNodeIndex,
+ scroll: TransformScroll,
+ ) -> CoordinateSpaceMapping<LayoutPixel, WorldPixel> {
+ let child = &self.spatial_nodes[index.0 as usize];
+
+ if child.coordinate_system_id.0 == 0 {
+ if index == ROOT_SPATIAL_NODE_INDEX {
+ CoordinateSpaceMapping::Local
+ } else {
+ CoordinateSpaceMapping::ScaleOffset(child.content_transform)
+ }
+ } else {
+ let system = &self.coord_systems[child.coordinate_system_id.0 as usize];
+ let scale_offset = match scroll {
+ TransformScroll::Scrolled => &child.content_transform,
+ TransformScroll::Unscrolled => &child.viewport_transform,
+ };
+ let transform = scale_offset
+ .to_transform()
+ .then(&system.world_transform);
+
+ CoordinateSpaceMapping::Transform(transform)
+ }
+ }
+
+ /// Calculate the relative transform from `index` to the root.
+ pub fn get_world_transform(
+ &self,
+ index: SpatialNodeIndex,
+ ) -> CoordinateSpaceMapping<LayoutPixel, WorldPixel> {
+ self.get_world_transform_impl(index, TransformScroll::Scrolled)
+ }
+
+ /// Calculate the relative transform from `index` to the root.
+ /// Unlike `get_world_transform`, this variant doesn't account for the local scroll offset.
+ pub fn get_world_viewport_transform(
+ &self,
+ index: SpatialNodeIndex,
+ ) -> CoordinateSpaceMapping<LayoutPixel, WorldPixel> {
+ self.get_world_transform_impl(index, TransformScroll::Unscrolled)
+ }
+
+ /// The root reference frame, which is the true root of the SpatialTree. Initially
+ /// this ID is not valid, which is indicated by ```spatial_nodes``` being empty.
+ pub fn root_reference_frame_index(&self) -> SpatialNodeIndex {
+ // TODO(mrobinson): We should eventually make this impossible to misuse.
+ debug_assert!(!self.spatial_nodes.is_empty());
+ ROOT_SPATIAL_NODE_INDEX
+ }
+
+ /// The root scroll node which is the first child of the root reference frame.
+ /// Initially this ID is not valid, which is indicated by ```spatial_nodes``` being empty.
+ pub fn topmost_scroll_node_index(&self) -> SpatialNodeIndex {
+ // TODO(mrobinson): We should eventually make this impossible to misuse.
+ debug_assert!(self.spatial_nodes.len() >= 1);
+ TOPMOST_SCROLL_NODE_INDEX
+ }
+
+ pub fn get_scroll_node_state(&self) -> Vec<ScrollNodeState> {
+ let mut result = vec![];
+ for node in &self.spatial_nodes {
+ if let SpatialNodeType::ScrollFrame(info) = node.node_type {
+ if let Some(id) = info.external_id {
+ result.push(ScrollNodeState {
+ id,
+ scroll_offset: info.offset - info.external_scroll_offset,
+ })
+ }
+ }
+ }
+ result
+ }
+
+ pub fn drain(&mut self) -> ScrollStates {
+ let mut scroll_states = FastHashMap::default();
+ for old_node in &mut self.spatial_nodes.drain(..) {
+ if self.pipelines_to_discard.contains(&old_node.pipeline_id) {
+ continue;
+ }
+
+ match old_node.node_type {
+ SpatialNodeType::ScrollFrame(info) if info.external_id.is_some() => {
+ scroll_states.insert(info.external_id.unwrap(), info);
+ }
+ _ => {}
+ }
+ }
+
+ self.coord_systems.clear();
+ self.pipelines_to_discard.clear();
+ scroll_states
+ }
+
+ pub fn scroll_node(
+ &mut self,
+ origin: LayoutPoint,
+ id: ExternalScrollId,
+ clamp: ScrollClamping
+ ) -> bool {
+ for node in &mut self.spatial_nodes {
+ if node.matches_external_id(id) {
+ return node.set_scroll_origin(&origin, clamp);
+ }
+ }
+
+ self.pending_scroll_offsets.insert(id, (origin, clamp));
+ false
+ }
+
+ fn find_nearest_scrolling_ancestor(
+ &self,
+ index: Option<SpatialNodeIndex>
+ ) -> SpatialNodeIndex {
+ let index = match index {
+ Some(index) => index,
+ None => return self.topmost_scroll_node_index(),
+ };
+
+ let node = &self.spatial_nodes[index.0 as usize];
+ match node.node_type {
+ SpatialNodeType::ScrollFrame(state) if state.sensitive_to_input_events() => index,
+ _ => self.find_nearest_scrolling_ancestor(node.parent)
+ }
+ }
+
+ pub fn scroll_nearest_scrolling_ancestor(
+ &mut self,
+ scroll_location: ScrollLocation,
+ node_index: Option<SpatialNodeIndex>,
+ ) -> bool {
+ if self.spatial_nodes.is_empty() {
+ return false;
+ }
+ let node_index = self.find_nearest_scrolling_ancestor(node_index);
+ self.spatial_nodes[node_index.0 as usize].scroll(scroll_location)
+ }
+
+ pub fn update_tree(
+ &mut self,
+ pan: WorldPoint,
+ global_device_pixel_scale: DevicePixelScale,
+ scene_properties: &SceneProperties,
+ ) {
+ if self.spatial_nodes.is_empty() {
+ return;
+ }
+
+ profile_scope!("update_tree");
+ self.coord_systems.clear();
+ self.coord_systems.push(CoordinateSystem::root());
+
+ let root_node_index = self.root_reference_frame_index();
+ let state = TransformUpdateState {
+ parent_reference_frame_transform: LayoutVector2D::new(pan.x, pan.y).into(),
+ parent_accumulated_scroll_offset: LayoutVector2D::zero(),
+ nearest_scrolling_ancestor_offset: LayoutVector2D::zero(),
+ nearest_scrolling_ancestor_viewport: LayoutRect::zero(),
+ current_coordinate_system_id: CoordinateSystemId::root(),
+ coordinate_system_relative_scale_offset: ScaleOffset::identity(),
+ invertible: true,
+ preserves_3d: false,
+ };
+ debug_assert!(self.nodes_to_update.is_empty());
+ self.nodes_to_update.push((root_node_index, state));
+
+ while let Some((node_index, mut state)) = self.nodes_to_update.pop() {
+ let (previous, following) = self.spatial_nodes.split_at_mut(node_index.0 as usize);
+ let node = match following.get_mut(0) {
+ Some(node) => node,
+ None => continue,
+ };
+
+ node.update(&mut state, &mut self.coord_systems, global_device_pixel_scale, scene_properties, &*previous);
+
+ if !node.children.is_empty() {
+ node.prepare_state_for_children(&mut state);
+ self.nodes_to_update.extend(node.children
+ .iter()
+ .rev()
+ .map(|child_index| (*child_index, state.clone()))
+ );
+ }
+ }
+ }
+
+ pub fn build_transform_palette(&self) -> TransformPalette {
+ profile_scope!("build_transform_palette");
+ let mut palette = TransformPalette::new(self.spatial_nodes.len());
+ //Note: getting the world transform of a node is O(1) operation
+ for i in 0 .. self.spatial_nodes.len() {
+ let index = SpatialNodeIndex(i as u32);
+ let world_transform = self.get_world_transform(index).into_transform();
+ palette.set_world_transform(index, world_transform);
+ }
+ palette
+ }
+
+ pub fn finalize_and_apply_pending_scroll_offsets(&mut self, old_states: ScrollStates) {
+ for node in &mut self.spatial_nodes {
+ let external_id = match node.node_type {
+ SpatialNodeType::ScrollFrame(ScrollFrameInfo { external_id: Some(id), ..} ) => id,
+ _ => continue,
+ };
+
+ if let Some(scrolling_state) = old_states.get(&external_id) {
+ node.apply_old_scrolling_state(scrolling_state);
+ }
+
+ if let Some((offset, clamping)) = self.pending_scroll_offsets.remove(&external_id) {
+ node.set_scroll_origin(&offset, clamping);
+ }
+ }
+ }
+
+ pub fn add_scroll_frame(
+ &mut self,
+ parent_index: SpatialNodeIndex,
+ external_id: Option<ExternalScrollId>,
+ pipeline_id: PipelineId,
+ frame_rect: &LayoutRect,
+ content_size: &LayoutSize,
+ scroll_sensitivity: ScrollSensitivity,
+ frame_kind: ScrollFrameKind,
+ external_scroll_offset: LayoutVector2D,
+ ) -> SpatialNodeIndex {
+ let node = SpatialNode::new_scroll_frame(
+ pipeline_id,
+ parent_index,
+ external_id,
+ frame_rect,
+ content_size,
+ scroll_sensitivity,
+ frame_kind,
+ external_scroll_offset,
+ );
+ self.add_spatial_node(node)
+ }
+
+ pub fn add_reference_frame(
+ &mut self,
+ parent_index: Option<SpatialNodeIndex>,
+ transform_style: TransformStyle,
+ source_transform: PropertyBinding<LayoutTransform>,
+ kind: ReferenceFrameKind,
+ origin_in_parent_reference_frame: LayoutVector2D,
+ pipeline_id: PipelineId,
+ ) -> SpatialNodeIndex {
+ let node = SpatialNode::new_reference_frame(
+ parent_index,
+ transform_style,
+ source_transform,
+ kind,
+ origin_in_parent_reference_frame,
+ pipeline_id,
+ );
+ self.add_spatial_node(node)
+ }
+
+ pub fn add_sticky_frame(
+ &mut self,
+ parent_index: SpatialNodeIndex,
+ sticky_frame_info: StickyFrameInfo,
+ pipeline_id: PipelineId,
+ ) -> SpatialNodeIndex {
+ let node = SpatialNode::new_sticky_frame(
+ parent_index,
+ sticky_frame_info,
+ pipeline_id,
+ );
+ self.add_spatial_node(node)
+ }
+
+ pub fn add_spatial_node(&mut self, mut node: SpatialNode) -> SpatialNodeIndex {
+ let index = SpatialNodeIndex::new(self.spatial_nodes.len());
+
+ // When the parent node is None this means we are adding the root.
+ if let Some(parent_index) = node.parent {
+ let parent_node = &mut self.spatial_nodes[parent_index.0 as usize];
+ parent_node.add_child(index);
+ node.update_snapping(Some(parent_node));
+ } else {
+ node.update_snapping(None);
+ }
+
+ self.spatial_nodes.push(node);
+ index
+ }
+
+ pub fn discard_frame_state_for_pipeline(&mut self, pipeline_id: PipelineId) {
+ self.pipelines_to_discard.insert(pipeline_id);
+ }
+
+ /// Find the spatial node that is the scroll root for a given spatial node.
+ /// A scroll root is the first spatial node when found travelling up the
+ /// spatial node tree that is an explicit scroll frame.
+ pub fn find_scroll_root(
+ &self,
+ spatial_node_index: SpatialNodeIndex,
+ ) -> SpatialNodeIndex {
+ let mut scroll_root = ROOT_SPATIAL_NODE_INDEX;
+ let mut node_index = spatial_node_index;
+
+ while node_index != ROOT_SPATIAL_NODE_INDEX {
+ let node = &self.spatial_nodes[node_index.0 as usize];
+ match node.node_type {
+ SpatialNodeType::ReferenceFrame(ref info) => {
+ match info.kind {
+ ReferenceFrameKind::Zoom => {
+ // We can handle scroll nodes that pass through a zoom node
+ }
+ ReferenceFrameKind::Transform |
+ ReferenceFrameKind::Perspective { .. } => {
+ // When a reference frame is encountered, forget any scroll roots
+ // we have encountered, as they may end up with a non-axis-aligned transform.
+ scroll_root = ROOT_SPATIAL_NODE_INDEX;
+ }
+ }
+ }
+ SpatialNodeType::StickyFrame(..) => {}
+ SpatialNodeType::ScrollFrame(ref info) => {
+ match info.frame_kind {
+ ScrollFrameKind::PipelineRoot => {
+ // Once we encounter a pipeline root, there is no need to look further
+ break;
+ }
+ ScrollFrameKind::Explicit => {
+ // If the scroll root has no scrollable area, we don't want to
+ // consider it. This helps pages that have a nested scroll root
+ // within a redundant scroll root to avoid selecting the wrong
+ // reference spatial node for a picture cache.
+ if info.scrollable_size.width > 0.0 ||
+ info.scrollable_size.height > 0.0 {
+ // Since we are skipping redundant scroll roots, we may end up
+ // selecting inner scroll roots that are very small. There is
+ // no performance benefit to creating a slice for these roots,
+ // as they are cheap to rasterize. The size comparison is in
+ // local-space, but makes for a reasonable estimate. The value
+ // is arbitrary, but is generally small enough to ignore things
+ // like scroll roots around text input elements.
+ if info.viewport_rect.size.width > 128.0 &&
+ info.viewport_rect.size.height > 128.0 {
+ // If we've found a root that is scrollable, and a reasonable
+ // size, select that as the current root for this node
+ scroll_root = node_index;
+ }
+ }
+ }
+ }
+ }
+ }
+ node_index = node.parent.expect("unable to find parent node");
+ }
+
+ scroll_root
+ }
+
+ fn print_node<T: PrintTreePrinter>(
+ &self,
+ index: SpatialNodeIndex,
+ pt: &mut T,
+ ) {
+ let node = &self.spatial_nodes[index.0 as usize];
+ match node.node_type {
+ SpatialNodeType::StickyFrame(ref sticky_frame_info) => {
+ pt.new_level(format!("StickyFrame"));
+ pt.add_item(format!("sticky info: {:?}", sticky_frame_info));
+ }
+ SpatialNodeType::ScrollFrame(scrolling_info) => {
+ pt.new_level(format!("ScrollFrame"));
+ pt.add_item(format!("viewport: {:?}", scrolling_info.viewport_rect));
+ pt.add_item(format!("scrollable_size: {:?}", scrolling_info.scrollable_size));
+ pt.add_item(format!("scroll offset: {:?}", scrolling_info.offset));
+ pt.add_item(format!("external_scroll_offset: {:?}", scrolling_info.external_scroll_offset));
+ pt.add_item(format!("kind: {:?}", scrolling_info.frame_kind));
+ }
+ SpatialNodeType::ReferenceFrame(ref info) => {
+ pt.new_level(format!("ReferenceFrame"));
+ pt.add_item(format!("kind: {:?}", info.kind));
+ pt.add_item(format!("transform_style: {:?}", info.transform_style));
+ pt.add_item(format!("source_transform: {:?}", info.source_transform));
+ pt.add_item(format!("origin_in_parent_reference_frame: {:?}", info.origin_in_parent_reference_frame));
+ }
+ }
+
+ pt.add_item(format!("index: {:?}", index));
+ pt.add_item(format!("content_transform: {:?}", node.content_transform));
+ pt.add_item(format!("viewport_transform: {:?}", node.viewport_transform));
+ pt.add_item(format!("snapping_transform: {:?}", node.snapping_transform));
+ pt.add_item(format!("coordinate_system_id: {:?}", node.coordinate_system_id));
+
+ for child_index in &node.children {
+ self.print_node(*child_index, pt);
+ }
+
+ pt.end_level();
+ }
+
+ /// Get the visible face of the transfrom from the specified node to its parent.
+ pub fn get_local_visible_face(&self, node_index: SpatialNodeIndex) -> VisibleFace {
+ let node = &self.spatial_nodes[node_index.0 as usize];
+ let parent_index = match node.parent {
+ Some(index) => index,
+ None => return VisibleFace::Front
+ };
+ self.get_relative_transform(node_index, parent_index)
+ .visible_face()
+ }
+
+ #[allow(dead_code)]
+ pub fn print(&self) {
+ if !self.spatial_nodes.is_empty() {
+ let mut buf = Vec::<u8>::new();
+ {
+ let mut pt = PrintTree::new_with_sink("spatial tree", &mut buf);
+ self.print_with(&mut pt);
+ }
+ // If running in Gecko, set RUST_LOG=webrender::spatial_tree=debug
+ // to get this logging to be emitted to stderr/logcat.
+ debug!("{}", std::str::from_utf8(&buf).unwrap_or("(Tree printer emitted non-utf8)"));
+ }
+ }
+}
+
+impl PrintableTree for SpatialTree {
+ fn print_with<T: PrintTreePrinter>(&self, pt: &mut T) {
+ if !self.spatial_nodes.is_empty() {
+ self.print_node(self.root_reference_frame_index(), pt);
+ }
+ }
+}
+
+#[cfg(test)]
+fn add_reference_frame(
+ cst: &mut SpatialTree,
+ parent: Option<SpatialNodeIndex>,
+ transform: LayoutTransform,
+ origin_in_parent_reference_frame: LayoutVector2D,
+) -> SpatialNodeIndex {
+ cst.add_reference_frame(
+ parent,
+ TransformStyle::Preserve3D,
+ PropertyBinding::Value(transform),
+ ReferenceFrameKind::Transform,
+ origin_in_parent_reference_frame,
+ PipelineId::dummy(),
+ )
+}
+
+#[cfg(test)]
+fn test_pt(
+ px: f32,
+ py: f32,
+ cst: &SpatialTree,
+ child: SpatialNodeIndex,
+ parent: SpatialNodeIndex,
+ expected_x: f32,
+ expected_y: f32,
+) {
+ use euclid::approxeq::ApproxEq;
+ const EPSILON: f32 = 0.0001;
+
+ let p = LayoutPoint::new(px, py);
+ let m = cst.get_relative_transform(child, parent).into_transform();
+ let pt = m.transform_point2d(p).unwrap();
+ assert!(pt.x.approx_eq_eps(&expected_x, &EPSILON) &&
+ pt.y.approx_eq_eps(&expected_y, &EPSILON),
+ "p: {:?} -> {:?}\nm={:?}",
+ p, pt, m,
+ );
+}
+
+#[test]
+fn test_cst_simple_translation() {
+ // Basic translations only
+
+ let mut cst = SpatialTree::new();
+
+ let root = add_reference_frame(
+ &mut cst,
+ None,
+ LayoutTransform::identity(),
+ LayoutVector2D::zero(),
+ );
+
+ let child1 = add_reference_frame(
+ &mut cst,
+ Some(root),
+ LayoutTransform::translation(100.0, 0.0, 0.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child2 = add_reference_frame(
+ &mut cst,
+ Some(child1),
+ LayoutTransform::translation(0.0, 50.0, 0.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child3 = add_reference_frame(
+ &mut cst,
+ Some(child2),
+ LayoutTransform::translation(200.0, 200.0, 0.0),
+ LayoutVector2D::zero(),
+ );
+
+ cst.update_tree(WorldPoint::zero(), DevicePixelScale::new(1.0), &SceneProperties::new());
+
+ test_pt(100.0, 100.0, &cst, child1, root, 200.0, 100.0);
+ test_pt(100.0, 100.0, &cst, child2, root, 200.0, 150.0);
+ test_pt(100.0, 100.0, &cst, child2, child1, 100.0, 150.0);
+ test_pt(100.0, 100.0, &cst, child3, root, 400.0, 350.0);
+}
+
+#[test]
+fn test_cst_simple_scale() {
+ // Basic scale only
+
+ let mut cst = SpatialTree::new();
+
+ let root = add_reference_frame(
+ &mut cst,
+ None,
+ LayoutTransform::identity(),
+ LayoutVector2D::zero(),
+ );
+
+ let child1 = add_reference_frame(
+ &mut cst,
+ Some(root),
+ LayoutTransform::scale(4.0, 1.0, 1.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child2 = add_reference_frame(
+ &mut cst,
+ Some(child1),
+ LayoutTransform::scale(1.0, 2.0, 1.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child3 = add_reference_frame(
+ &mut cst,
+ Some(child2),
+ LayoutTransform::scale(2.0, 2.0, 1.0),
+ LayoutVector2D::zero(),
+ );
+
+ cst.update_tree(WorldPoint::zero(), DevicePixelScale::new(1.0), &SceneProperties::new());
+
+ test_pt(100.0, 100.0, &cst, child1, root, 400.0, 100.0);
+ test_pt(100.0, 100.0, &cst, child2, root, 400.0, 200.0);
+ test_pt(100.0, 100.0, &cst, child3, root, 800.0, 400.0);
+ test_pt(100.0, 100.0, &cst, child2, child1, 100.0, 200.0);
+ test_pt(100.0, 100.0, &cst, child3, child1, 200.0, 400.0);
+}
+
+#[test]
+fn test_cst_scale_translation() {
+ // Scale + translation
+
+ let mut cst = SpatialTree::new();
+
+ let root = add_reference_frame(
+ &mut cst,
+ None,
+ LayoutTransform::identity(),
+ LayoutVector2D::zero(),
+ );
+
+ let child1 = add_reference_frame(
+ &mut cst,
+ Some(root),
+ LayoutTransform::translation(100.0, 50.0, 0.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child2 = add_reference_frame(
+ &mut cst,
+ Some(child1),
+ LayoutTransform::scale(2.0, 4.0, 1.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child3 = add_reference_frame(
+ &mut cst,
+ Some(child2),
+ LayoutTransform::translation(200.0, -100.0, 0.0),
+ LayoutVector2D::zero(),
+ );
+
+ let child4 = add_reference_frame(
+ &mut cst,
+ Some(child3),
+ LayoutTransform::scale(3.0, 2.0, 1.0),
+ LayoutVector2D::zero(),
+ );
+
+ cst.update_tree(WorldPoint::zero(), DevicePixelScale::new(1.0), &SceneProperties::new());
+
+ test_pt(100.0, 100.0, &cst, child1, root, 200.0, 150.0);
+ test_pt(100.0, 100.0, &cst, child2, root, 300.0, 450.0);
+ test_pt(100.0, 100.0, &cst, child4, root, 1100.0, 450.0);
+
+ test_pt(0.0, 0.0, &cst, child4, child1, 400.0, -400.0);
+ test_pt(100.0, 100.0, &cst, child4, child1, 1000.0, 400.0);
+ test_pt(100.0, 100.0, &cst, child2, child1, 200.0, 400.0);
+
+ test_pt(100.0, 100.0, &cst, child3, child1, 600.0, 0.0);
+}
+
+#[test]
+fn test_cst_translation_rotate() {
+ // Rotation + translation
+ use euclid::Angle;
+
+ let mut cst = SpatialTree::new();
+
+ let root = add_reference_frame(
+ &mut cst,
+ None,
+ LayoutTransform::identity(),
+ LayoutVector2D::zero(),
+ );
+
+ let child1 = add_reference_frame(
+ &mut cst,
+ Some(root),
+ LayoutTransform::rotation(0.0, 0.0, 1.0, Angle::degrees(-90.0)),
+ LayoutVector2D::zero(),
+ );
+
+ cst.update_tree(WorldPoint::zero(), DevicePixelScale::new(1.0), &SceneProperties::new());
+
+ test_pt(100.0, 0.0, &cst, child1, root, 0.0, -100.0);
+}
diff --git a/third_party/webrender/webrender/src/storage.rs b/third_party/webrender/webrender/src/storage.rs
new file mode 100644
index 00000000000..a928192cd99
--- /dev/null
+++ b/third_party/webrender/webrender/src/storage.rs
@@ -0,0 +1,134 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use std::{iter::Extend, ops, marker::PhantomData, u32};
+use crate::util::Recycler;
+
+#[derive(Debug, Hash)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct Index<T>(u32, PhantomData<T>);
+
+// We explicitly implement Copy + Clone instead of using #[derive(Copy, Clone)]
+// because we don't want to require that T implements Clone + Copy.
+impl<T> Clone for Index<T> {
+ fn clone(&self) -> Self { *self }
+}
+
+impl<T> Copy for Index<T> {}
+
+impl<T> PartialEq for Index<T> {
+ fn eq(&self, other: &Self) -> bool {
+ self.0 == other.0
+ }
+}
+
+impl<T> Index<T> {
+ fn new(idx: usize) -> Self {
+ debug_assert!(idx < u32::max_value() as usize);
+ Index(idx as u32, PhantomData)
+ }
+
+ pub const INVALID: Index<T> = Index(u32::MAX, PhantomData);
+ pub const UNUSED: Index<T> = Index(u32::MAX-1, PhantomData);
+}
+
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct Range<T> {
+ pub start: Index<T>,
+ pub end: Index<T>,
+}
+
+// We explicitly implement Copy + Clone instead of using #[derive(Copy, Clone)]
+// because we don't want to require that T implements Clone + Copy.
+impl<T> Clone for Range<T> {
+ fn clone(&self) -> Self {
+ Range { start: self.start, end: self.end }
+ }
+}
+impl<T> Copy for Range<T> {}
+
+impl<T> Range<T> {
+ /// Create an empty `Range`
+ pub fn empty() -> Self {
+ Range {
+ start: Index::new(0),
+ end: Index::new(0),
+ }
+ }
+
+ /// Check for an empty `Range`
+ pub fn is_empty(self) -> bool {
+ self.start.0 >= self.end.0
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct Storage<T> {
+ data: Vec<T>,
+}
+
+impl<T> Storage<T> {
+ pub fn new(initial_capacity: usize) -> Self {
+ Storage {
+ data: Vec::with_capacity(initial_capacity),
+ }
+ }
+
+ pub fn len(&self) -> usize {
+ self.data.len()
+ }
+
+ pub fn clear(&mut self) {
+ self.data.clear();
+ }
+
+ pub fn push(&mut self, t: T) -> Index<T> {
+ let index = self.data.len();
+ self.data.push(t);
+ Index(index as u32, PhantomData)
+ }
+
+ pub fn recycle(&mut self, recycler: &mut Recycler) {
+ recycler.recycle_vec(&mut self.data);
+ }
+
+ pub fn extend<II: IntoIterator<Item=T>>(&mut self, iter: II) -> Range<T> {
+ let start = Index::new(self.data.len());
+ self.data.extend(iter);
+ let end = Index::new(self.data.len());
+ Range { start, end }
+ }
+}
+
+impl<T> ops::Index<Index<T>> for Storage<T> {
+ type Output = T;
+ fn index(&self, index: Index<T>) -> &Self::Output {
+ &self.data[index.0 as usize]
+ }
+}
+
+impl<T> ops::IndexMut<Index<T>> for Storage<T> {
+ fn index_mut(&mut self, index: Index<T>) -> &mut Self::Output {
+ &mut self.data[index.0 as usize]
+ }
+}
+
+impl<T> ops::Index<Range<T>> for Storage<T> {
+ type Output = [T];
+ fn index(&self, index: Range<T>) -> &Self::Output {
+ let start = index.start.0 as _;
+ let end = index.end.0 as _;
+ &self.data[start..end]
+ }
+}
+
+impl<T> ops::IndexMut<Range<T>> for Storage<T> {
+ fn index_mut(&mut self, index: Range<T>) -> &mut Self::Output {
+ let start = index.start.0 as _;
+ let end = index.end.0 as _;
+ &mut self.data[start..end]
+ }
+}
diff --git a/third_party/webrender/webrender/src/texture_allocator.rs b/third_party/webrender/webrender/src/texture_allocator.rs
new file mode 100644
index 00000000000..1f7902b2191
--- /dev/null
+++ b/third_party/webrender/webrender/src/texture_allocator.rs
@@ -0,0 +1,270 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize};
+
+//TODO: gather real-world statistics on the bin usage in order to assist the decision
+// on where to place the size thresholds.
+
+/// This is an optimization tweak to enable looking through all the free rectangles in a bin
+/// and choosing the smallest, as opposed to picking the first match.
+const FIND_SMALLEST_AREA: bool = false;
+
+const NUM_BINS: usize = 3;
+/// The minimum number of pixels on each side that we require for rects to be classified as
+/// particular bin of freelists.
+const MIN_RECT_AXIS_SIZES: [i32; NUM_BINS] = [1, 16, 32];
+
+#[derive(Debug, Clone, Copy, PartialEq, PartialOrd)]
+struct FreeListBin(u8);
+
+#[derive(Debug, Clone, Copy)]
+struct FreeListIndex(usize);
+
+impl FreeListBin {
+ fn for_size(size: &DeviceIntSize) -> Self {
+ MIN_RECT_AXIS_SIZES
+ .iter()
+ .enumerate()
+ .rev()
+ .find(|(_, &min_size)| min_size <= size.width && min_size <= size.height)
+ .map(|(id, _)| FreeListBin(id as u8))
+ .expect("Unable to find a bin!")
+ }
+}
+
+#[derive(Debug, Clone, Copy, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct FreeRectSlice(pub u32);
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct FreeRect {
+ slice: FreeRectSlice,
+ rect: DeviceIntRect,
+}
+
+/// A texture allocator using the guillotine algorithm with the rectangle merge improvement. See
+/// sections 2.2 and 2.2.5 in "A Thousand Ways to Pack the Bin - A Practical Approach to Two-
+/// Dimensional Rectangle Bin Packing":
+///
+/// http://clb.demon.fi/files/RectangleBinPack.pdf
+///
+/// This approach was chosen because of its simplicity, good performance, and easy support for
+/// dynamic texture deallocation.
+///
+/// Note: the allocations are spread across multiple textures, and also are binned
+/// orthogonally in order to speed up the search.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct ArrayAllocationTracker {
+ bins: [Vec<FreeRect>; NUM_BINS],
+}
+
+impl ArrayAllocationTracker {
+ pub fn new() -> Self {
+ ArrayAllocationTracker {
+ bins: [
+ Vec::new(),
+ Vec::new(),
+ Vec::new(),
+ ],
+ }
+ }
+
+ fn push(&mut self, slice: FreeRectSlice, rect: DeviceIntRect) {
+ let id = FreeListBin::for_size(&rect.size).0 as usize;
+ self.bins[id].push(FreeRect {
+ slice,
+ rect,
+ })
+ }
+
+ /// Find a suitable rect in the free list. We choose the smallest such rect
+ /// in terms of area (Best-Area-Fit, BAF).
+ fn find_index_of_best_rect(
+ &self,
+ requested_dimensions: &DeviceIntSize,
+ ) -> Option<(FreeListBin, FreeListIndex)> {
+ let start_bin = FreeListBin::for_size(requested_dimensions);
+ (start_bin.0 .. NUM_BINS as u8)
+ .find_map(|id| if FIND_SMALLEST_AREA {
+ let mut smallest_index_and_area = None;
+ for (candidate_index, candidate) in self.bins[id as usize].iter().enumerate() {
+ if requested_dimensions.width > candidate.rect.size.width ||
+ requested_dimensions.height > candidate.rect.size.height
+ {
+ continue;
+ }
+
+ let candidate_area = candidate.rect.size.area();
+ match smallest_index_and_area {
+ Some((_, area)) if candidate_area >= area => continue,
+ _ => smallest_index_and_area = Some((candidate_index, candidate_area)),
+ }
+ }
+
+ smallest_index_and_area
+ .map(|(index, _)| (FreeListBin(id), FreeListIndex(index)))
+ } else {
+ self.bins[id as usize]
+ .iter()
+ .position(|candidate| {
+ requested_dimensions.width <= candidate.rect.size.width &&
+ requested_dimensions.height <= candidate.rect.size.height
+ })
+ .map(|index| (FreeListBin(id), FreeListIndex(index)))
+ })
+ }
+
+ // Split that results in the single largest area (Min Area Split Rule, MINAS).
+ fn split_guillotine(&mut self, chosen: &FreeRect, requested_dimensions: &DeviceIntSize) {
+ let candidate_free_rect_to_right = DeviceIntRect::new(
+ DeviceIntPoint::new(
+ chosen.rect.origin.x + requested_dimensions.width,
+ chosen.rect.origin.y,
+ ),
+ DeviceIntSize::new(
+ chosen.rect.size.width - requested_dimensions.width,
+ requested_dimensions.height,
+ ),
+ );
+ let candidate_free_rect_to_bottom = DeviceIntRect::new(
+ DeviceIntPoint::new(
+ chosen.rect.origin.x,
+ chosen.rect.origin.y + requested_dimensions.height,
+ ),
+ DeviceIntSize::new(
+ requested_dimensions.width,
+ chosen.rect.size.height - requested_dimensions.height,
+ ),
+ );
+
+ // Guillotine the rectangle.
+ let new_free_rect_to_right;
+ let new_free_rect_to_bottom;
+ if candidate_free_rect_to_right.size.area() > candidate_free_rect_to_bottom.size.area() {
+ new_free_rect_to_right = DeviceIntRect::new(
+ candidate_free_rect_to_right.origin,
+ DeviceIntSize::new(
+ candidate_free_rect_to_right.size.width,
+ chosen.rect.size.height,
+ ),
+ );
+ new_free_rect_to_bottom = candidate_free_rect_to_bottom
+ } else {
+ new_free_rect_to_right = candidate_free_rect_to_right;
+ new_free_rect_to_bottom = DeviceIntRect::new(
+ candidate_free_rect_to_bottom.origin,
+ DeviceIntSize::new(
+ chosen.rect.size.width,
+ candidate_free_rect_to_bottom.size.height,
+ ),
+ )
+ }
+
+ // Add the guillotined rects back to the free list.
+ if !new_free_rect_to_right.is_empty() {
+ self.push(chosen.slice, new_free_rect_to_right);
+ }
+ if !new_free_rect_to_bottom.is_empty() {
+ self.push(chosen.slice, new_free_rect_to_bottom);
+ }
+ }
+
+ pub fn allocate(
+ &mut self, requested_dimensions: &DeviceIntSize
+ ) -> Option<(FreeRectSlice, DeviceIntPoint)> {
+ if requested_dimensions.width == 0 || requested_dimensions.height == 0 {
+ return Some((FreeRectSlice(0), DeviceIntPoint::new(0, 0)));
+ }
+ let (bin, index) = self.find_index_of_best_rect(requested_dimensions)?;
+
+ // Remove the rect from the free list and decide how to guillotine it.
+ let chosen = self.bins[bin.0 as usize].swap_remove(index.0);
+ self.split_guillotine(&chosen, requested_dimensions);
+
+ // Return the result.
+ Some((chosen.slice, chosen.rect.origin))
+ }
+
+ /// Add a new slice to the allocator, and immediately allocate a rect from it.
+ pub fn extend(
+ &mut self,
+ slice: FreeRectSlice,
+ total_size: DeviceIntSize,
+ requested_dimensions: DeviceIntSize,
+ ) {
+ self.split_guillotine(
+ &FreeRect { slice, rect: total_size.into() },
+ &requested_dimensions
+ );
+ }
+}
+
+#[cfg(test)]
+fn random_fill(count: usize, texture_size: i32) -> f32 {
+ use rand::{thread_rng, Rng};
+
+ let total_rect = DeviceIntRect::new(
+ DeviceIntPoint::zero(),
+ DeviceIntSize::new(texture_size, texture_size),
+ );
+ let mut rng = thread_rng();
+ let mut allocator = ArrayAllocationTracker::new();
+
+ // check for empty allocation
+ assert_eq!(
+ allocator.allocate(&DeviceIntSize::new(0, 12)),
+ Some((FreeRectSlice(0), DeviceIntPoint::zero())),
+ );
+
+ let mut slices: Vec<Vec<DeviceIntRect>> = Vec::new();
+ let mut requested_area = 0f32;
+ // fill up the allocator
+ for _ in 0 .. count {
+ let size = DeviceIntSize::new(
+ rng.gen_range(1, texture_size),
+ rng.gen_range(1, texture_size),
+ );
+ requested_area += size.area() as f32;
+
+ match allocator.allocate(&size) {
+ Some((slice, origin)) => {
+ let rect = DeviceIntRect::new(origin, size);
+ assert_eq!(None, slices[slice.0 as usize].iter().find(|r| r.intersects(&rect)));
+ assert!(total_rect.contains_rect(&rect));
+ slices[slice.0 as usize].push(rect);
+ }
+ None => {
+ allocator.extend(FreeRectSlice(slices.len() as u32), total_rect.size, size);
+ let rect = DeviceIntRect::new(DeviceIntPoint::zero(), size);
+ slices.push(vec![rect]);
+ }
+ }
+ }
+ // validate the free rects
+ for (i, free_vecs) in allocator.bins.iter().enumerate() {
+ for fr in free_vecs {
+ assert_eq!(FreeListBin(i as u8), FreeListBin::for_size(&fr.rect.size));
+ assert_eq!(None, slices[fr.slice.0 as usize].iter().find(|r| r.intersects(&fr.rect)));
+ assert!(total_rect.contains_rect(&fr.rect));
+ slices[fr.slice.0 as usize].push(fr.rect);
+ }
+ }
+
+ let allocated_area = slices.len() as f32 * (texture_size * texture_size) as f32;
+ requested_area / allocated_area
+}
+
+#[test]
+fn test_small() {
+ random_fill(100, 100);
+}
+
+#[test]
+fn test_large() {
+ random_fill(1000, 10000);
+}
diff --git a/third_party/webrender/webrender/src/texture_cache.rs b/third_party/webrender/webrender/src/texture_cache.rs
new file mode 100644
index 00000000000..9b244656805
--- /dev/null
+++ b/third_party/webrender/webrender/src/texture_cache.rs
@@ -0,0 +1,1782 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::{DirtyRect, ExternalImageType, ImageFormat};
+use api::{DebugFlags, ImageDescriptor};
+use api::units::*;
+#[cfg(test)]
+use api::{DocumentId, IdNamespace};
+use crate::device::{TextureFilter, TextureFormatPair};
+use crate::freelist::{FreeListHandle, WeakFreeListHandle};
+use crate::gpu_cache::{GpuCache, GpuCacheHandle};
+use crate::gpu_types::{ImageSource, UvRectKind};
+use crate::internal_types::{
+ CacheTextureId, LayerIndex, Swizzle, SwizzleSettings,
+ TextureUpdateList, TextureUpdateSource, TextureSource,
+ TextureCacheAllocInfo, TextureCacheUpdate,
+};
+use crate::lru_cache::LRUCache;
+use crate::profiler::{ResourceProfileCounter, TextureCacheProfileCounters};
+use crate::render_backend::FrameStamp;
+use crate::resource_cache::{CacheItem, CachedImageData};
+use smallvec::SmallVec;
+use std::cell::Cell;
+use std::cmp;
+use std::mem;
+use std::rc::Rc;
+
+/// The size of each region/layer in shared cache texture arrays.
+pub const TEXTURE_REGION_DIMENSIONS: i32 = 512;
+
+const PICTURE_TEXTURE_ADD_SLICES: usize = 4;
+
+/// The chosen image format for picture tiles.
+const PICTURE_TILE_FORMAT: ImageFormat = ImageFormat::RGBA8;
+
+/// The number of pixels in a region. Derived from the above.
+const TEXTURE_REGION_PIXELS: usize =
+ (TEXTURE_REGION_DIMENSIONS as usize) * (TEXTURE_REGION_DIMENSIONS as usize);
+
+/// Items in the texture cache can either be standalone textures,
+/// or a sub-rect inside the shared cache.
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+enum EntryDetails {
+ Standalone {
+ /// Number of bytes this entry allocates
+ size_in_bytes: usize,
+ },
+ Picture {
+ // Index in the picture_textures array
+ texture_index: usize,
+ // Slice in the texture array
+ layer_index: usize,
+ },
+ Cache {
+ /// Origin within the texture layer where this item exists.
+ origin: DeviceIntPoint,
+ /// The layer index of the texture array.
+ layer_index: usize,
+ },
+}
+
+impl EntryDetails {
+ fn describe(&self) -> (LayerIndex, DeviceIntPoint) {
+ match *self {
+ EntryDetails::Standalone { .. } => (0, DeviceIntPoint::zero()),
+ EntryDetails::Picture { layer_index, .. } => (layer_index, DeviceIntPoint::zero()),
+ EntryDetails::Cache { origin, layer_index, .. } => (layer_index, origin),
+ }
+ }
+}
+
+#[derive(Debug, PartialEq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum CacheEntryMarker {}
+
+// Stores information related to a single entry in the texture
+// cache. This is stored for each item whether it's in the shared
+// cache or a standalone texture.
+#[derive(Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct CacheEntry {
+ /// Size the requested item, in device pixels.
+ size: DeviceIntSize,
+ /// Details specific to standalone or shared items.
+ details: EntryDetails,
+ /// Arbitrary user data associated with this item.
+ user_data: [f32; 3],
+ /// The last frame this item was requested for rendering.
+ // TODO(gw): This stamp is only used for picture cache tiles, and some checks
+ // in the glyph cache eviction code. We could probably remove it
+ // entirely in future (or move to EntryDetails::Picture).
+ last_access: FrameStamp,
+ /// Handle to the resource rect in the GPU cache.
+ uv_rect_handle: GpuCacheHandle,
+ /// Image format of the data that the entry expects.
+ input_format: ImageFormat,
+ filter: TextureFilter,
+ swizzle: Swizzle,
+ /// The actual device texture ID this is part of.
+ texture_id: CacheTextureId,
+ /// Optional notice when the entry is evicted from the cache.
+ eviction_notice: Option<EvictionNotice>,
+ /// The type of UV rect this entry specifies.
+ uv_rect_kind: UvRectKind,
+}
+
+impl CacheEntry {
+ // Create a new entry for a standalone texture.
+ fn new_standalone(
+ texture_id: CacheTextureId,
+ last_access: FrameStamp,
+ params: &CacheAllocParams,
+ swizzle: Swizzle,
+ size_in_bytes: usize,
+ ) -> Self {
+ CacheEntry {
+ size: params.descriptor.size,
+ user_data: params.user_data,
+ last_access,
+ details: EntryDetails::Standalone {
+ size_in_bytes,
+ },
+ texture_id,
+ input_format: params.descriptor.format,
+ filter: params.filter,
+ swizzle,
+ uv_rect_handle: GpuCacheHandle::new(),
+ eviction_notice: None,
+ uv_rect_kind: params.uv_rect_kind,
+ }
+ }
+
+ // Update the GPU cache for this texture cache entry.
+ // This ensures that the UV rect, and texture layer index
+ // are up to date in the GPU cache for vertex shaders
+ // to fetch from.
+ fn update_gpu_cache(&mut self, gpu_cache: &mut GpuCache) {
+ if let Some(mut request) = gpu_cache.request(&mut self.uv_rect_handle) {
+ let (layer_index, origin) = self.details.describe();
+ let image_source = ImageSource {
+ p0: origin.to_f32(),
+ p1: (origin + self.size).to_f32(),
+ texture_layer: layer_index as f32,
+ user_data: self.user_data,
+ uv_rect_kind: self.uv_rect_kind,
+ };
+ image_source.write_gpu_blocks(&mut request);
+ }
+ }
+
+ fn evict(&self) {
+ if let Some(eviction_notice) = self.eviction_notice.as_ref() {
+ eviction_notice.notify();
+ }
+ }
+
+ fn alternative_input_format(&self) -> ImageFormat {
+ match self.input_format {
+ ImageFormat::RGBA8 => ImageFormat::BGRA8,
+ ImageFormat::BGRA8 => ImageFormat::RGBA8,
+ other => other,
+ }
+ }
+}
+
+
+/// A texture cache handle is a weak reference to a cache entry.
+///
+/// If the handle has not been inserted into the cache yet, or if the entry was
+/// previously inserted and then evicted, lookup of the handle will fail, and
+/// the cache handle needs to re-upload this item to the texture cache (see
+/// request() below).
+pub type TextureCacheHandle = WeakFreeListHandle<CacheEntryMarker>;
+
+/// Describes the eviction policy for a given entry in the texture cache.
+#[derive(Copy, Clone, Debug, PartialEq, Eq)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum Eviction {
+ /// The entry will be evicted under the normal rules (which differ between
+ /// standalone and shared entries).
+ Auto,
+ /// The entry will not be evicted until the policy is explicitly set to a
+ /// different value.
+ Manual,
+}
+
+// An eviction notice is a shared condition useful for detecting
+// when a TextureCacheHandle gets evicted from the TextureCache.
+// It is optionally installed to the TextureCache when an update()
+// is scheduled. A single notice may be shared among any number of
+// TextureCacheHandle updates. The notice may then be subsequently
+// checked to see if any of the updates using it have been evicted.
+#[derive(Clone, Debug, Default)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct EvictionNotice {
+ evicted: Rc<Cell<bool>>,
+}
+
+impl EvictionNotice {
+ fn notify(&self) {
+ self.evicted.set(true);
+ }
+
+ pub fn check(&self) -> bool {
+ if self.evicted.get() {
+ self.evicted.set(false);
+ true
+ } else {
+ false
+ }
+ }
+}
+
+/// A set of lazily allocated, fixed size, texture arrays for each format the
+/// texture cache supports.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct SharedTextures {
+ array_color8_nearest: TextureArray,
+ array_alpha8_linear: TextureArray,
+ array_alpha16_linear: TextureArray,
+ array_color8_linear: TextureArray,
+}
+
+impl SharedTextures {
+ /// Mints a new set of shared textures.
+ fn new(color_formats: TextureFormatPair<ImageFormat>) -> Self {
+ Self {
+ // Used primarily for cached shadow masks. There can be lots of
+ // these on some pages like francine, but most pages don't use it
+ // much.
+ array_alpha8_linear: TextureArray::new(
+ TextureFormatPair::from(ImageFormat::R8),
+ TextureFilter::Linear,
+ 4,
+ ),
+ // Used for experimental hdr yuv texture support, but not used in
+ // production Firefox.
+ array_alpha16_linear: TextureArray::new(
+ TextureFormatPair::from(ImageFormat::R16),
+ TextureFilter::Linear,
+ 1,
+ ),
+ // The primary cache for images, glyphs, etc.
+ array_color8_linear: TextureArray::new(
+ color_formats.clone(),
+ TextureFilter::Linear,
+ 16,
+ ),
+ // Used for image-rendering: crisp. This is mostly favicons, which
+ // are small. Some other images use it too, but those tend to be
+ // larger than 512x512 and thus don't use the shared cache anyway.
+ array_color8_nearest: TextureArray::new(
+ color_formats,
+ TextureFilter::Nearest,
+ 1,
+ ),
+ }
+ }
+
+ /// Clears each texture in the set, with the given set of pending updates.
+ fn clear(&mut self, updates: &mut TextureUpdateList) {
+ self.array_alpha8_linear.clear(updates);
+ self.array_alpha16_linear.clear(updates);
+ self.array_color8_linear.clear(updates);
+ self.array_color8_nearest.clear(updates);
+ }
+
+ /// Returns a mutable borrow for the shared texture array matching the parameters.
+ fn select(
+ &mut self, external_format: ImageFormat, filter: TextureFilter
+ ) -> &mut TextureArray {
+ match external_format {
+ ImageFormat::R8 => {
+ assert_eq!(filter, TextureFilter::Linear);
+ &mut self.array_alpha8_linear
+ }
+ ImageFormat::R16 => {
+ assert_eq!(filter, TextureFilter::Linear);
+ &mut self.array_alpha16_linear
+ }
+ ImageFormat::RGBA8 |
+ ImageFormat::BGRA8 => {
+ match filter {
+ TextureFilter::Linear => &mut self.array_color8_linear,
+ TextureFilter::Nearest => &mut self.array_color8_nearest,
+ _ => panic!("Unexpexcted filter {:?}", filter),
+ }
+ }
+ _ => panic!("Unexpected format {:?}", external_format),
+ }
+ }
+}
+
+/// The texture arrays used to hold picture cache tiles.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct PictureTextures {
+ textures: Vec<WholeTextureArray>,
+}
+
+impl PictureTextures {
+ fn new(
+ initial_window_size: DeviceIntSize,
+ picture_tile_sizes: &[DeviceIntSize],
+ next_texture_id: &mut CacheTextureId,
+ pending_updates: &mut TextureUpdateList,
+ ) -> Self {
+ let mut textures = Vec::new();
+ for tile_size in picture_tile_sizes {
+ // TODO(gw): The way initial size is used here may allocate a lot of memory once
+ // we are using multiple slice sizes. Do some measurements once we
+ // have multiple slices here and adjust the calculations as required.
+ let num_x = (initial_window_size.width + tile_size.width - 1) / tile_size.width;
+ let num_y = (initial_window_size.height + tile_size.height - 1) / tile_size.height;
+ let mut slice_count = (num_x * num_y).max(1).min(16) as usize;
+ if slice_count < 4 {
+ // On some platforms we get bogus (1x1) initial window size. The first real frame will then
+ // reallocate many more picture cache slices. Don't bother preallocating in that case.
+ slice_count = 0;
+ }
+
+ if slice_count == 0 {
+ continue;
+ }
+
+ let texture = WholeTextureArray {
+ size: *tile_size,
+ filter: TextureFilter::Nearest,
+ format: PICTURE_TILE_FORMAT,
+ texture_id: *next_texture_id,
+ slices: vec![WholeTextureSlice { uv_rect_handle: None }; slice_count],
+ has_depth: true,
+ };
+
+ next_texture_id.0 += 1;
+
+ pending_updates.push_alloc(texture.texture_id, texture.to_info());
+
+ textures.push(texture);
+ }
+
+ PictureTextures { textures }
+ }
+
+ fn get_or_allocate_tile(
+ &mut self,
+ tile_size: DeviceIntSize,
+ now: FrameStamp,
+ next_texture_id: &mut CacheTextureId,
+ pending_updates: &mut TextureUpdateList,
+ ) -> CacheEntry {
+ let texture_index = self.textures
+ .iter()
+ .position(|texture| { texture.size == tile_size })
+ .unwrap_or(self.textures.len());
+
+ if texture_index == self.textures.len() {
+ self.textures.push(WholeTextureArray {
+ size: tile_size,
+ filter: TextureFilter::Nearest,
+ format: PICTURE_TILE_FORMAT,
+ texture_id: *next_texture_id,
+ slices: Vec::new(),
+ has_depth: true,
+ });
+ next_texture_id.0 += 1;
+ }
+
+ let texture = &mut self.textures[texture_index];
+
+ let layer_index = match texture.find_free() {
+ Some(index) => index,
+ None => {
+ let was_empty = texture.slices.is_empty();
+ let index = texture.grow(PICTURE_TEXTURE_ADD_SLICES);
+ let info = texture.to_info();
+ if was_empty {
+ pending_updates.push_alloc(texture.texture_id, info);
+ } else {
+ pending_updates.push_realloc(texture.texture_id, info);
+ }
+
+ index
+ },
+ };
+
+ texture.occupy(texture_index, layer_index, now)
+ }
+
+ fn get(&mut self, index: usize) -> &mut WholeTextureArray {
+ &mut self.textures[index]
+ }
+
+ fn clear(&mut self, pending_updates: &mut TextureUpdateList) {
+ for texture in &mut self.textures {
+ if texture.slices.is_empty() {
+ continue;
+ }
+
+ if let Some(texture_id) = texture.reset(PICTURE_TEXTURE_ADD_SLICES) {
+ pending_updates.push_reset(texture_id, texture.to_info());
+ }
+ }
+ }
+
+ fn update_profile(&self, profile: &mut ResourceProfileCounter) {
+ // For now, this profile counter just accumulates the slices and bytes
+ // from all picture cache texture arrays.
+ let mut picture_slices = 0;
+ let mut picture_bytes = 0;
+ for texture in &self.textures {
+ picture_slices += texture.slices.len();
+ picture_bytes += texture.size_in_bytes();
+ }
+ profile.set(picture_slices, picture_bytes);
+ }
+
+ #[cfg(feature = "replay")]
+ fn tile_sizes(&self) -> Vec<DeviceIntSize> {
+ self.textures.iter().map(|pt| pt.size).collect()
+ }
+}
+
+/// Container struct for the various parameters used in cache allocation.
+struct CacheAllocParams {
+ descriptor: ImageDescriptor,
+ filter: TextureFilter,
+ user_data: [f32; 3],
+ uv_rect_kind: UvRectKind,
+}
+
+/// General-purpose manager for images in GPU memory. This includes images,
+/// rasterized glyphs, rasterized blobs, cached render tasks, etc.
+///
+/// The texture cache is owned and managed by the RenderBackend thread, and
+/// produces a series of commands to manipulate the textures on the Renderer
+/// thread. These commands are executed before any rendering is performed for
+/// a given frame.
+///
+/// Entries in the texture cache are not guaranteed to live past the end of the
+/// frame in which they are requested, and may be evicted. The API supports
+/// querying whether an entry is still available.
+///
+/// The TextureCache is different from the GpuCache in that the former stores
+/// images, whereas the latter stores data and parameters for use in the shaders.
+/// This means that the texture cache can be visualized, which is a good way to
+/// understand how it works. Enabling gfx.webrender.debug.texture-cache shows a
+/// live view of its contents in Firefox.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub struct TextureCache {
+ /// Set of texture arrays in different formats used for the shared cache.
+ shared_textures: SharedTextures,
+
+ /// A texture array per tile size for picture caching.
+ picture_textures: PictureTextures,
+
+ /// Maximum texture size supported by hardware.
+ max_texture_size: i32,
+
+ /// Maximum number of texture layers supported by hardware.
+ max_texture_layers: usize,
+
+ /// Settings on using texture unit swizzling.
+ swizzle: Option<SwizzleSettings>,
+
+ /// The current set of debug flags.
+ debug_flags: DebugFlags,
+
+ /// The next unused virtual texture ID. Monotonically increasing.
+ next_id: CacheTextureId,
+
+ /// A list of allocations and updates that need to be applied to the texture
+ /// cache in the rendering thread this frame.
+ #[cfg_attr(all(feature = "serde", any(feature = "capture", feature = "replay")), serde(skip))]
+ pending_updates: TextureUpdateList,
+
+ /// The current `FrameStamp`. Used for cache eviction policies.
+ now: FrameStamp,
+
+ /// List of picture cache entries. These are maintained separately from regular
+ /// texture cache entries.
+ picture_cache_handles: Vec<FreeListHandle<CacheEntryMarker>>,
+
+ /// Cache of texture cache handles with automatic lifetime management, evicted
+ /// in a least-recently-used order (except those entries with manual eviction enabled).
+ lru_cache: LRUCache<CacheEntry, CacheEntryMarker>,
+
+ /// A list of texture cache handles that have been set to explicitly have manual
+ /// eviction policy enabled. The handles reference cache entries in the lru_cache
+ /// above, but have opted in to manual lifetime management.
+ manual_handles: Vec<FreeListHandle<CacheEntryMarker>>,
+
+ /// Estimated memory usage of allocated entries in all of the shared textures. This
+ /// is used to decide when to evict old items from the cache.
+ shared_bytes_allocated: usize,
+
+ /// Number of bytes allocated in standalone textures. Used as an input to deciding
+ /// when to run texture cache eviction.
+ standalone_bytes_allocated: usize,
+
+ /// If the total bytes allocated in shared / standalone cache is less
+ /// than this, then allow the cache to grow without forcing an eviction.
+ // TODO(gw): In future, it's probably reasonable to make this higher again, perhaps 64-128 MB.
+ eviction_threshold_bytes: usize,
+
+ /// The maximum number of items that will be evicted per frame. This limit helps avoid jank
+ /// on frames where we want to evict a large number of items. Instead, we'd prefer to drop
+ /// the items incrementally over a number of frames, even if that means the total allocated
+ /// size of the cache is above the desired threshold for a small number of frames.
+ max_evictions_per_frame: usize,
+}
+
+impl TextureCache {
+ pub fn new(
+ max_texture_size: i32,
+ mut max_texture_layers: usize,
+ picture_tile_sizes: &[DeviceIntSize],
+ initial_size: DeviceIntSize,
+ color_formats: TextureFormatPair<ImageFormat>,
+ swizzle: Option<SwizzleSettings>,
+ eviction_threshold_bytes: usize,
+ max_evictions_per_frame: usize,
+ ) -> Self {
+ // On MBP integrated Intel GPUs, texture arrays appear to be
+ // implemented as a single texture of stacked layers, and that
+ // texture appears to be subject to the texture size limit. As such,
+ // allocating more than 32 512x512 regions results in a dimension
+ // longer than 16k (the max texture size), causing incorrect behavior.
+ //
+ // So we clamp the number of layers on mac. This results in maximum
+ // texture array size of 32MB, which isn't ideal but isn't terrible
+ // either. OpenGL on mac is not long for this earth, so this may be
+ // good enough until we have WebRender on gfx-rs (on Metal).
+ //
+ // On all platforms, we also clamp the number of textures per layer to 16
+ // to avoid the cost of resizing large texture arrays (at the expense
+ // of batching efficiency).
+ //
+ // Note that we could also define this more generally in terms of
+ // |max_texture_size / TEXTURE_REGION_DIMENSION|, except:
+ // * max_texture_size is actually clamped beyond the device limit
+ // by Gecko to 8192, so we'd need to thread the raw device value
+ // here, and:
+ // * The bug we're working around is likely specific to a single
+ // driver family, and those drivers are also likely to share
+ // the same max texture size of 16k. If we do encounter a driver
+ // with the same bug but a lower max texture size, we might need
+ // to rethink our strategy anyway, since a limit below 32MB might
+ // start to introduce performance issues.
+ max_texture_layers = max_texture_layers.min(16);
+
+ let mut pending_updates = TextureUpdateList::new();
+
+ // Shared texture cache controls swizzling on a per-entry basis, assuming that
+ // the texture as a whole doesn't need to be swizzled (but only some entries do).
+ // It would be possible to support this, but not needed at the moment.
+ assert!(color_formats.internal != ImageFormat::BGRA8 ||
+ swizzle.map_or(true, |s| s.bgra8_sampling_swizzle == Swizzle::default())
+ );
+
+ let mut next_texture_id = CacheTextureId(1);
+
+ TextureCache {
+ shared_textures: SharedTextures::new(color_formats),
+ picture_textures: PictureTextures::new(
+ initial_size,
+ picture_tile_sizes,
+ &mut next_texture_id,
+ &mut pending_updates,
+ ),
+ max_texture_size,
+ max_texture_layers,
+ swizzle,
+ debug_flags: DebugFlags::empty(),
+ next_id: next_texture_id,
+ pending_updates,
+ now: FrameStamp::INVALID,
+ lru_cache: LRUCache::new(),
+ shared_bytes_allocated: 0,
+ standalone_bytes_allocated: 0,
+ picture_cache_handles: Vec::new(),
+ manual_handles: Vec::new(),
+ eviction_threshold_bytes,
+ max_evictions_per_frame,
+ }
+ }
+
+ /// Creates a TextureCache and sets it up with a valid `FrameStamp`, which
+ /// is useful for avoiding panics when instantiating the `TextureCache`
+ /// directly from unit test code.
+ #[cfg(test)]
+ pub fn new_for_testing(
+ max_texture_size: i32,
+ max_texture_layers: usize,
+ image_format: ImageFormat,
+ ) -> Self {
+ let mut cache = Self::new(
+ max_texture_size,
+ max_texture_layers,
+ &[],
+ DeviceIntSize::zero(),
+ TextureFormatPair::from(image_format),
+ None,
+ 64 * 1024 * 1024,
+ 32,
+ );
+ let mut now = FrameStamp::first(DocumentId::new(IdNamespace(1), 1));
+ now.advance();
+ cache.begin_frame(now);
+ cache
+ }
+
+ pub fn set_debug_flags(&mut self, flags: DebugFlags) {
+ self.debug_flags = flags;
+ }
+
+ /// Clear all entries in the texture cache. This is a fairly drastic
+ /// step that should only be called very rarely.
+ pub fn clear_all(&mut self) {
+ // Evict all manual eviction handles
+ let manual_handles = mem::replace(
+ &mut self.manual_handles,
+ Vec::new(),
+ );
+ for handle in manual_handles {
+ self.evict_impl(handle);
+ }
+
+ // Evict all picture cache handles
+ let picture_handles = mem::replace(
+ &mut self.picture_cache_handles,
+ Vec::new(),
+ );
+ for handle in picture_handles {
+ self.evict_impl(handle);
+ }
+
+ // Evict all auto (LRU) cache handles
+ while let Some(entry) = self.lru_cache.pop_oldest() {
+ entry.evict();
+ self.free(&entry);
+ }
+
+ // Free the picture and shared textures
+ self.picture_textures.clear(&mut self.pending_updates);
+ self.shared_textures.clear(&mut self.pending_updates);
+ self.pending_updates.note_clear();
+ }
+
+ /// Called at the beginning of each frame.
+ pub fn begin_frame(&mut self, stamp: FrameStamp) {
+ debug_assert!(!self.now.is_valid());
+ profile_scope!("begin_frame");
+ self.now = stamp;
+
+ // Texture cache eviction is done at the start of the frame. This ensures that
+ // we won't evict items that have been requested on this frame.
+ self.evict_items_from_cache_if_required();
+ }
+
+ pub fn end_frame(&mut self, texture_cache_profile: &mut TextureCacheProfileCounters) {
+ debug_assert!(self.now.is_valid());
+ self.expire_old_picture_cache_tiles();
+
+ // Release of empty shared textures is done at the end of the frame. That way, if the
+ // eviction at the start of the frame frees up a texture, that is then subsequently
+ // used during the frame, we avoid doing a free/alloc for it.
+ self.shared_textures.array_alpha8_linear.release_empty_textures(&mut self.pending_updates);
+ self.shared_textures.array_alpha16_linear.release_empty_textures(&mut self.pending_updates);
+ self.shared_textures.array_color8_linear.release_empty_textures(&mut self.pending_updates);
+ self.shared_textures.array_color8_nearest.release_empty_textures(&mut self.pending_updates);
+
+ self.shared_textures.array_alpha8_linear
+ .update_profile(&mut texture_cache_profile.pages_alpha8_linear);
+ self.shared_textures.array_alpha16_linear
+ .update_profile(&mut texture_cache_profile.pages_alpha16_linear);
+ self.shared_textures.array_color8_linear
+ .update_profile(&mut texture_cache_profile.pages_color8_linear);
+ self.shared_textures.array_color8_nearest
+ .update_profile(&mut texture_cache_profile.pages_color8_nearest);
+ self.picture_textures
+ .update_profile(&mut texture_cache_profile.pages_picture);
+ texture_cache_profile.shared_bytes.set(self.shared_bytes_allocated);
+ texture_cache_profile.standalone_bytes.set(self.standalone_bytes_allocated);
+
+ self.now = FrameStamp::INVALID;
+ }
+
+ // Request an item in the texture cache. All images that will
+ // be used on a frame *must* have request() called on their
+ // handle, to update the last used timestamp and ensure
+ // that resources are not flushed from the cache too early.
+ //
+ // Returns true if the image needs to be uploaded to the
+ // texture cache (either never uploaded, or has been
+ // evicted on a previous frame).
+ pub fn request(&mut self, handle: &TextureCacheHandle, gpu_cache: &mut GpuCache) -> bool {
+ match self.lru_cache.touch(handle) {
+ // If an image is requested that is already in the cache,
+ // refresh the GPU cache data associated with this item.
+ Some(entry) => {
+ entry.last_access = self.now;
+ entry.update_gpu_cache(gpu_cache);
+ false
+ }
+ None => true,
+ }
+ }
+
+ // Returns true if the image needs to be uploaded to the
+ // texture cache (either never uploaded, or has been
+ // evicted on a previous frame).
+ pub fn needs_upload(&self, handle: &TextureCacheHandle) -> bool {
+ self.lru_cache.get_opt(handle).is_none()
+ }
+
+ pub fn max_texture_size(&self) -> i32 {
+ self.max_texture_size
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn max_texture_layers(&self) -> usize {
+ self.max_texture_layers
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn picture_tile_sizes(&self) -> Vec<DeviceIntSize> {
+ self.picture_textures.tile_sizes()
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn color_formats(&self) -> TextureFormatPair<ImageFormat> {
+ self.shared_textures.array_color8_linear.formats.clone()
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn swizzle_settings(&self) -> Option<SwizzleSettings> {
+ self.swizzle
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn eviction_threshold_bytes(&self) -> usize {
+ self.eviction_threshold_bytes
+ }
+
+ #[cfg(feature = "replay")]
+ pub fn max_evictions_per_frame(&self) -> usize {
+ self.max_evictions_per_frame
+ }
+
+ pub fn pending_updates(&mut self) -> TextureUpdateList {
+ mem::replace(&mut self.pending_updates, TextureUpdateList::new())
+ }
+
+ // Update the data stored by a given texture cache handle.
+ pub fn update(
+ &mut self,
+ handle: &mut TextureCacheHandle,
+ descriptor: ImageDescriptor,
+ filter: TextureFilter,
+ data: Option<CachedImageData>,
+ user_data: [f32; 3],
+ mut dirty_rect: ImageDirtyRect,
+ gpu_cache: &mut GpuCache,
+ eviction_notice: Option<&EvictionNotice>,
+ uv_rect_kind: UvRectKind,
+ eviction: Eviction,
+ ) {
+ debug_assert!(self.now.is_valid());
+
+ // Determine if we need to allocate texture cache memory
+ // for this item. We need to reallocate if any of the following
+ // is true:
+ // - Never been in the cache
+ // - Has been in the cache but was evicted.
+ // - Exists in the cache but dimensions / format have changed.
+ let realloc = match self.lru_cache.get_opt(handle) {
+ Some(entry) => {
+ entry.size != descriptor.size || (entry.input_format != descriptor.format &&
+ entry.alternative_input_format() != descriptor.format)
+ }
+ None => {
+ // Not allocated, or was previously allocated but has been evicted.
+ true
+ }
+ };
+
+ if realloc {
+ let params = CacheAllocParams { descriptor, filter, user_data, uv_rect_kind };
+ self.allocate(&params, handle);
+
+ // If we reallocated, we need to upload the whole item again.
+ dirty_rect = DirtyRect::All;
+ }
+
+ // Update eviction policy (this is a no-op if it hasn't changed)
+ if eviction == Eviction::Manual {
+ if let Some(manual_handle) = self.lru_cache.set_manual_eviction(handle) {
+ self.manual_handles.push(manual_handle);
+ }
+ }
+
+ let entry = self.lru_cache.get_opt_mut(handle)
+ .expect("BUG: handle must be valid now");
+
+ // Install the new eviction notice for this update, if applicable.
+ entry.eviction_notice = eviction_notice.cloned();
+ entry.uv_rect_kind = uv_rect_kind;
+
+ // Invalidate the contents of the resource rect in the GPU cache.
+ // This ensures that the update_gpu_cache below will add
+ // the new information to the GPU cache.
+ //TODO: only invalidate if the parameters change?
+ gpu_cache.invalidate(&entry.uv_rect_handle);
+
+ // Upload the resource rect and texture array layer.
+ entry.update_gpu_cache(gpu_cache);
+
+ // Create an update command, which the render thread processes
+ // to upload the new image data into the correct location
+ // in GPU memory.
+ if let Some(data) = data {
+ // If the swizzling is supported, we always upload in the internal
+ // texture format (thus avoiding the conversion by the driver).
+ // Otherwise, pass the external format to the driver.
+ let use_upload_format = self.swizzle.is_none();
+ let (layer_index, origin) = entry.details.describe();
+ let op = TextureCacheUpdate::new_update(
+ data,
+ &descriptor,
+ origin,
+ entry.size,
+ layer_index as i32,
+ use_upload_format,
+ &dirty_rect,
+ );
+ self.pending_updates.push_update(entry.texture_id, op);
+ }
+ }
+
+ // Check if a given texture handle has a valid allocation
+ // in the texture cache.
+ pub fn is_allocated(&self, handle: &TextureCacheHandle) -> bool {
+ self.lru_cache.get_opt(handle).is_some()
+ }
+
+ // Check if a given texture handle was last used as recently
+ // as the specified number of previous frames.
+ pub fn is_recently_used(&self, handle: &TextureCacheHandle, margin: usize) -> bool {
+ self.lru_cache.get_opt(handle).map_or(false, |entry| {
+ entry.last_access.frame_id() + margin >= self.now.frame_id()
+ })
+ }
+
+ // Return the allocated size of the texture handle's associated data,
+ // or otherwise indicate the handle is invalid.
+ pub fn get_allocated_size(&self, handle: &TextureCacheHandle) -> Option<usize> {
+ self.lru_cache.get_opt(handle).map(|entry| {
+ (entry.input_format.bytes_per_pixel() * entry.size.area()) as usize
+ })
+ }
+
+ // Retrieve the details of an item in the cache. This is used
+ // during batch creation to provide the resource rect address
+ // to the shaders and texture ID to the batching logic.
+ // This function will assert in debug modes if the caller
+ // tries to get a handle that was not requested this frame.
+ pub fn get(&self, handle: &TextureCacheHandle) -> CacheItem {
+ let (texture_id, layer_index, uv_rect, swizzle, uv_rect_handle) = self.get_cache_location(handle);
+ CacheItem {
+ uv_rect_handle,
+ texture_id: TextureSource::TextureCache(texture_id, swizzle),
+ uv_rect,
+ texture_layer: layer_index as i32,
+ }
+ }
+
+ /// A more detailed version of get(). This allows access to the actual
+ /// device rect of the cache allocation.
+ ///
+ /// Returns a tuple identifying the texture, the layer, the region,
+ /// and its GPU handle.
+ pub fn get_cache_location(
+ &self,
+ handle: &TextureCacheHandle,
+ ) -> (CacheTextureId, LayerIndex, DeviceIntRect, Swizzle, GpuCacheHandle) {
+ let entry = self.lru_cache
+ .get_opt(handle)
+ .expect("BUG: was dropped from cache or not updated!");
+ debug_assert_eq!(entry.last_access, self.now);
+ let (layer_index, origin) = entry.details.describe();
+ (entry.texture_id,
+ layer_index as usize,
+ DeviceIntRect::new(origin, entry.size),
+ entry.swizzle,
+ entry.uv_rect_handle)
+ }
+
+ /// Internal helper function to evict a strong texture cache handle
+ fn evict_impl(
+ &mut self,
+ handle: FreeListHandle<CacheEntryMarker>,
+ ) {
+ let entry = self.lru_cache.remove_manual_handle(handle);
+ entry.evict();
+ self.free(&entry);
+ }
+
+ /// Evict a texture cache handle that was previously set to be in manual
+ /// eviction mode.
+ pub fn evict_manual_handle(&mut self, handle: &TextureCacheHandle) {
+ // Find the strong handle that matches this weak handle. If this
+ // ever shows up in profiles, we can make it a hash (but the number
+ // of manual eviction handles is typically small).
+ let index = self.manual_handles.iter().position(|strong_handle| {
+ strong_handle.matches(handle)
+ });
+
+ if let Some(index) = index {
+ let handle = self.manual_handles.swap_remove(index);
+ self.evict_impl(handle);
+ }
+ }
+
+ /// Expire picture cache tiles that haven't been referenced in the last frame.
+ /// The picture cache code manually keeps tiles alive by calling `request` on
+ /// them if it wants to retain a tile that is currently not visible.
+ fn expire_old_picture_cache_tiles(&mut self) {
+ for i in (0 .. self.picture_cache_handles.len()).rev() {
+ let evict = {
+ let entry = self.lru_cache.get(&self.picture_cache_handles[i]);
+
+ // Texture cache entries can be evicted at the start of
+ // a frame, or at any time during the frame when a cache
+ // allocation is occurring. This means that entries tagged
+ // with eager eviction may get evicted before they have a
+ // chance to be requested on the current frame. Instead,
+ // advance the frame id of the entry by one before
+ // comparison. This ensures that an eager entry will
+ // not be evicted until it is not used for at least
+ // one complete frame.
+ let mut entry_frame_id = entry.last_access.frame_id();
+ entry_frame_id.advance();
+
+ entry_frame_id < self.now.frame_id()
+ };
+
+ if evict {
+ let handle = self.picture_cache_handles.swap_remove(i);
+ self.evict_impl(handle);
+ }
+ }
+ }
+
+ /// Evict old items from the shared and standalone caches, if we're over a
+ /// threshold memory usage value
+ fn evict_items_from_cache_if_required(&mut self) {
+ let mut eviction_count = 0;
+
+ // Keep evicting while memory is above the threshold, and we haven't
+ // reached a maximum number of evictions this frame.
+ while self.current_memory_estimate() > self.eviction_threshold_bytes && eviction_count < self.max_evictions_per_frame {
+ match self.lru_cache.pop_oldest() {
+ Some(entry) => {
+ entry.evict();
+ self.free(&entry);
+ eviction_count += 1;
+ }
+ None => {
+ // It's possible that we could fail to pop an item from the LRU list to evict, if every
+ // item in the cache is set to manual eviction mode. In this case, just break out of the
+ // loop as there's nothing we can do until the calling code manually evicts items to
+ // reduce the allocated cache size.
+ break;
+ }
+ }
+ }
+ }
+
+ /// Return the total used bytes in standalone and shared textures. This is
+ /// used to determine how many textures need to be evicted to keep texture
+ /// cache memory usage under a reasonable limit. Note that this does not
+ /// include memory allocated to picture cache tiles, which are considered
+ /// separately for the purposes of texture cache eviction.
+ fn current_memory_estimate(&self) -> usize {
+ self.standalone_bytes_allocated + self.shared_bytes_allocated
+ }
+
+ // Free a cache entry from the standalone list or shared cache.
+ fn free(&mut self, entry: &CacheEntry) {
+ match entry.details {
+ EntryDetails::Picture { texture_index, layer_index } => {
+ let picture_texture = self.picture_textures.get(texture_index);
+ picture_texture.slices[layer_index].uv_rect_handle = None;
+ if self.debug_flags.contains(
+ DebugFlags::TEXTURE_CACHE_DBG |
+ DebugFlags::TEXTURE_CACHE_DBG_CLEAR_EVICTED)
+ {
+ self.pending_updates.push_debug_clear(
+ entry.texture_id,
+ DeviceIntPoint::zero(),
+ picture_texture.size.width,
+ picture_texture.size.height,
+ layer_index,
+ );
+ }
+ }
+ EntryDetails::Standalone { size_in_bytes, .. } => {
+ self.standalone_bytes_allocated -= size_in_bytes;
+
+ // This is a standalone texture allocation. Free it directly.
+ self.pending_updates.push_free(entry.texture_id);
+ }
+ EntryDetails::Cache { origin, layer_index, .. } => {
+ // Free the block in the given region.
+ let texture_array = self.shared_textures.select(entry.input_format, entry.filter);
+ let unit = texture_array.units
+ .iter_mut()
+ .find(|unit| unit.texture_id == entry.texture_id)
+ .expect("Unable to find the associated texture array unit");
+ let region = &mut unit.regions[layer_index];
+
+ self.shared_bytes_allocated -= region.slab_size.size_in_bytes(texture_array.formats.internal);
+
+ if self.debug_flags.contains(
+ DebugFlags::TEXTURE_CACHE_DBG |
+ DebugFlags::TEXTURE_CACHE_DBG_CLEAR_EVICTED)
+ {
+ self.pending_updates.push_debug_clear(
+ entry.texture_id,
+ origin,
+ region.slab_size.width,
+ region.slab_size.height,
+ layer_index,
+ );
+ }
+ region.free(origin, &mut unit.empty_regions);
+ }
+ }
+ }
+
+ /// Allocate a block from the shared cache.
+ fn allocate_from_shared_cache(
+ &mut self,
+ params: &CacheAllocParams,
+ ) -> CacheEntry {
+ // Mutably borrow the correct texture.
+ let texture_array = self.shared_textures.select(
+ params.descriptor.format,
+ params.filter,
+ );
+ let swizzle = if texture_array.formats.external == params.descriptor.format {
+ Swizzle::default()
+ } else {
+ match self.swizzle {
+ Some(_) => Swizzle::Bgra,
+ None => Swizzle::default(),
+ }
+ };
+
+ let max_texture_layers = self.max_texture_layers;
+ let slab_size = SlabSize::new(params.descriptor.size);
+
+ let mut info = TextureCacheAllocInfo {
+ width: TEXTURE_REGION_DIMENSIONS,
+ height: TEXTURE_REGION_DIMENSIONS,
+ format: texture_array.formats.internal,
+ filter: texture_array.filter,
+ layer_count: 1,
+ is_shared_cache: true,
+ has_depth: false,
+ };
+
+ let unit_index = if let Some(index) = texture_array.units
+ .iter()
+ .position(|unit| unit.can_alloc(slab_size))
+ {
+ index
+ } else if let Some(index) = texture_array.units
+ .iter()
+ .position(|unit| unit.regions.len() < max_texture_layers)
+ {
+ let unit = &mut texture_array.units[index];
+
+ unit.push_regions(texture_array.layers_per_allocation);
+
+ info.layer_count = unit.regions.len() as i32;
+ self.pending_updates.push_realloc(unit.texture_id, info);
+
+ index
+ } else {
+ let index = texture_array.units.len();
+ texture_array.units.push(TextureArrayUnit {
+ texture_id: self.next_id,
+ regions: Vec::new(),
+ empty_regions: 0,
+ });
+
+ let unit = &mut texture_array.units[index];
+
+ unit.push_regions(texture_array.layers_per_allocation);
+
+ info.layer_count = unit.regions.len() as i32;
+ self.pending_updates.push_alloc(self.next_id, info);
+ self.next_id.0 += 1;
+ index
+ };
+
+ self.shared_bytes_allocated += slab_size.size_in_bytes(texture_array.formats.internal);
+
+ // Do the allocation. This can fail and return None
+ // if there are no free slots or regions available.
+ texture_array.alloc(params, unit_index, self.now, swizzle)
+ }
+
+ // Returns true if the given image descriptor *may* be
+ // placed in the shared texture cache.
+ pub fn is_allowed_in_shared_cache(
+ &self,
+ filter: TextureFilter,
+ descriptor: &ImageDescriptor,
+ ) -> bool {
+ let mut allowed_in_shared_cache = true;
+
+ // Anything larger than TEXTURE_REGION_DIMENSIONS goes in a standalone texture.
+ // TODO(gw): If we find pages that suffer from batch breaks in this
+ // case, add support for storing these in a standalone
+ // texture array.
+ if descriptor.size.width > TEXTURE_REGION_DIMENSIONS ||
+ descriptor.size.height > TEXTURE_REGION_DIMENSIONS
+ {
+ allowed_in_shared_cache = false;
+ }
+
+ // TODO(gw): For now, alpha formats of the texture cache can only be linearly sampled.
+ // Nearest sampling gets a standalone texture.
+ // This is probably rare enough that it can be fixed up later.
+ if filter == TextureFilter::Nearest &&
+ descriptor.format.bytes_per_pixel() <= 2
+ {
+ allowed_in_shared_cache = false;
+ }
+
+ allowed_in_shared_cache
+ }
+
+ /// Allocates a new standalone cache entry.
+ fn allocate_standalone_entry(
+ &mut self,
+ params: &CacheAllocParams,
+ ) -> CacheEntry {
+ let texture_id = self.next_id;
+ self.next_id.0 += 1;
+
+ // Push a command to allocate device storage of the right size / format.
+ let info = TextureCacheAllocInfo {
+ width: params.descriptor.size.width,
+ height: params.descriptor.size.height,
+ format: params.descriptor.format,
+ filter: params.filter,
+ layer_count: 1,
+ is_shared_cache: false,
+ has_depth: false,
+ };
+
+ let size_in_bytes = (info.width * info.height * info.format.bytes_per_pixel()) as usize;
+ self.standalone_bytes_allocated += size_in_bytes;
+
+ self.pending_updates.push_alloc(texture_id, info);
+
+ // Special handing for BGRA8 textures that may need to be swizzled.
+ let swizzle = if params.descriptor.format == ImageFormat::BGRA8 {
+ self.swizzle.map(|s| s.bgra8_sampling_swizzle)
+ } else {
+ None
+ };
+
+ CacheEntry::new_standalone(
+ texture_id,
+ self.now,
+ params,
+ swizzle.unwrap_or_default(),
+ size_in_bytes,
+ )
+ }
+
+ /// Allocates a cache entry appropriate for the given parameters.
+ ///
+ /// This allocates from the shared cache unless the parameters do not meet
+ /// the shared cache requirements, in which case a standalone texture is
+ /// used.
+ fn allocate_cache_entry(
+ &mut self,
+ params: &CacheAllocParams,
+ ) -> CacheEntry {
+ assert!(!params.descriptor.size.is_empty());
+
+ // If this image doesn't qualify to go in the shared (batching) cache,
+ // allocate a standalone entry.
+ if self.is_allowed_in_shared_cache(params.filter, &params.descriptor) {
+ self.allocate_from_shared_cache(params)
+ } else {
+ self.allocate_standalone_entry(params)
+ }
+ }
+
+ /// Allocates a cache entry for the given parameters, and updates the
+ /// provided handle to point to the new entry.
+ fn allocate(&mut self, params: &CacheAllocParams, handle: &mut TextureCacheHandle) {
+ debug_assert!(self.now.is_valid());
+ let new_cache_entry = self.allocate_cache_entry(params);
+
+ // If the handle points to a valid cache entry, we want to replace the
+ // cache entry with our newly updated location. We also need to ensure
+ // that the storage (region or standalone) associated with the previous
+ // entry here gets freed.
+ //
+ // If the handle is invalid, we need to insert the data, and append the
+ // result to the corresponding vector.
+ if let Some(old_entry) = self.lru_cache.replace_or_insert(handle, new_cache_entry) {
+ old_entry.evict();
+ self.free(&old_entry);
+ }
+ }
+
+ // Update the data stored by a given texture cache handle for picture caching specifically.
+ pub fn update_picture_cache(
+ &mut self,
+ tile_size: DeviceIntSize,
+ handle: &mut TextureCacheHandle,
+ gpu_cache: &mut GpuCache,
+ ) {
+ debug_assert!(self.now.is_valid());
+ debug_assert!(tile_size.width > 0 && tile_size.height > 0);
+
+ if self.lru_cache.get_opt(handle).is_none() {
+ let cache_entry = self.picture_textures.get_or_allocate_tile(
+ tile_size,
+ self.now,
+ &mut self.next_id,
+ &mut self.pending_updates,
+ );
+
+ // Add the cache entry to the LRU cache, then mark it for manual eviction
+ // so that the lifetime is controlled by the texture cache.
+
+ *handle = self.lru_cache.push_new(cache_entry);
+
+ let strong_handle = self.lru_cache
+ .set_manual_eviction(handle)
+ .expect("bug: handle must be valid here");
+ self.picture_cache_handles.push(strong_handle);
+ }
+
+ // Upload the resource rect and texture array layer.
+ self.lru_cache
+ .get_opt_mut(handle)
+ .expect("BUG: handle must be valid now")
+ .update_gpu_cache(gpu_cache);
+ }
+
+ pub fn shared_alpha_expected_format(&self) -> ImageFormat {
+ self.shared_textures.array_alpha8_linear.formats.external
+ }
+
+ pub fn shared_color_expected_format(&self) -> ImageFormat {
+ self.shared_textures.array_color8_linear.formats.external
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Copy, Clone, PartialEq)]
+struct SlabSize {
+ width: i32,
+ height: i32,
+}
+
+impl SlabSize {
+ fn new(size: DeviceIntSize) -> Self {
+ let x_size = quantize_dimension(size.width);
+ let y_size = quantize_dimension(size.height);
+
+ assert!(x_size > 0 && x_size <= TEXTURE_REGION_DIMENSIONS);
+ assert!(y_size > 0 && y_size <= TEXTURE_REGION_DIMENSIONS);
+
+ let (width, height) = match (x_size, y_size) {
+ // Special cased rectangular slab pages.
+ (512, 0..=64) => (512, 64),
+ (512, 128) => (512, 128),
+ (512, 256) => (512, 256),
+ (0..=64, 512) => (64, 512),
+ (128, 512) => (128, 512),
+ (256, 512) => (256, 512),
+
+ // If none of those fit, use a square slab size.
+ (x_size, y_size) => {
+ let square_size = cmp::max(x_size, y_size);
+ (square_size, square_size)
+ }
+ };
+
+ SlabSize {
+ width,
+ height,
+ }
+ }
+
+ fn size_in_bytes(&self, format: ImageFormat) -> usize {
+ let bpp = format.bytes_per_pixel();
+ (self.width * self.height * bpp) as usize
+ }
+
+ fn invalid() -> SlabSize {
+ SlabSize {
+ width: 0,
+ height: 0,
+ }
+ }
+}
+
+// The x/y location within a texture region of an allocation.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct TextureLocation(u8, u8);
+
+impl TextureLocation {
+ fn new(x: i32, y: i32) -> Self {
+ debug_assert!(x >= 0 && y >= 0 && x < 0x100 && y < 0x100);
+ TextureLocation(x as u8, y as u8)
+ }
+}
+
+/// A region corresponds to a layer in a shared cache texture.
+///
+/// All allocations within a region are of the same size.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct TextureRegion {
+ layer_index: usize,
+ slab_size: SlabSize,
+ free_slots: Vec<TextureLocation>,
+ total_slot_count: usize,
+}
+
+impl TextureRegion {
+ fn new(layer_index: usize) -> Self {
+ TextureRegion {
+ layer_index,
+ slab_size: SlabSize::invalid(),
+ free_slots: Vec::new(),
+ total_slot_count: 0,
+ }
+ }
+
+ // Initialize a region to be an allocator for a specific slab size.
+ fn init(&mut self, slab_size: SlabSize, empty_regions: &mut usize) {
+ debug_assert!(self.slab_size == SlabSize::invalid());
+ debug_assert!(self.free_slots.is_empty());
+
+ self.slab_size = slab_size;
+ let slots_per_x_axis = TEXTURE_REGION_DIMENSIONS / self.slab_size.width;
+ let slots_per_y_axis = TEXTURE_REGION_DIMENSIONS / self.slab_size.height;
+
+ // Add each block to a freelist.
+ for y in 0 .. slots_per_y_axis {
+ for x in 0 .. slots_per_x_axis {
+ self.free_slots.push(TextureLocation::new(x, y));
+ }
+ }
+
+ self.total_slot_count = self.free_slots.len();
+ *empty_regions -= 1;
+ }
+
+ // Deinit a region, allowing it to become a region with
+ // a different allocator size.
+ fn deinit(&mut self, empty_regions: &mut usize) {
+ self.slab_size = SlabSize::invalid();
+ self.free_slots.clear();
+ self.total_slot_count = 0;
+ *empty_regions += 1;
+ }
+
+ fn is_empty(&self) -> bool {
+ self.slab_size == SlabSize::invalid()
+ }
+
+ // Attempt to allocate a fixed size block from this region.
+ fn alloc(&mut self) -> Option<DeviceIntPoint> {
+ debug_assert!(self.slab_size != SlabSize::invalid());
+
+ self.free_slots.pop().map(|location| {
+ DeviceIntPoint::new(
+ self.slab_size.width * location.0 as i32,
+ self.slab_size.height * location.1 as i32,
+ )
+ })
+ }
+
+ // Free a block in this region.
+ fn free(&mut self, point: DeviceIntPoint, empty_regions: &mut usize) {
+ let x = point.x / self.slab_size.width;
+ let y = point.y / self.slab_size.height;
+ self.free_slots.push(TextureLocation::new(x, y));
+
+ // If this region is completely unused, deinit it
+ // so that it can become a different slab size
+ // as required.
+ if self.free_slots.len() == self.total_slot_count {
+ self.deinit(empty_regions);
+ }
+ }
+}
+
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct TextureArrayUnit {
+ texture_id: CacheTextureId,
+ regions: Vec<TextureRegion>,
+ empty_regions: usize,
+}
+
+impl TextureArrayUnit {
+ /// Adds a new empty region to the array.
+ fn push_regions(&mut self, count: i32) {
+ assert!(self.empty_regions <= self.regions.len());
+ for _ in 0..count {
+ let index = self.regions.len();
+ self.regions.push(TextureRegion::new(index));
+ self.empty_regions += 1;
+ }
+ }
+
+ /// Returns true if we can allocate the given entry.
+ fn can_alloc(&self, slab_size: SlabSize) -> bool {
+ self.empty_regions != 0 || self.regions.iter().any(|region| {
+ region.slab_size == slab_size && !region.free_slots.is_empty()
+ })
+ }
+
+ fn is_empty(&self) -> bool {
+ self.empty_regions == self.regions.len()
+ }
+}
+
+/// A texture array contains a number of textures, each with a number of
+/// layers, where each layer contains a region that can act as a slab allocator.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct TextureArray {
+ filter: TextureFilter,
+ formats: TextureFormatPair<ImageFormat>,
+ units: SmallVec<[TextureArrayUnit; 1]>,
+ layers_per_allocation: i32,
+}
+
+impl TextureArray {
+ fn new(
+ formats: TextureFormatPair<ImageFormat>,
+ filter: TextureFilter,
+ layers_per_allocation: i32,
+ ) -> Self {
+ TextureArray {
+ formats,
+ filter,
+ units: SmallVec::new(),
+ layers_per_allocation,
+ }
+ }
+
+ /// Returns the number of GPU bytes consumed by this texture array.
+ fn size_in_bytes(&self) -> usize {
+ let bpp = self.formats.internal.bytes_per_pixel() as usize;
+ let num_regions: usize = self.units.iter().map(|u| u.regions.len()).sum();
+ num_regions * TEXTURE_REGION_PIXELS * bpp
+ }
+
+ fn clear(&mut self, updates: &mut TextureUpdateList) {
+ for unit in self.units.drain(..) {
+ updates.push_free(unit.texture_id);
+ }
+ }
+
+ fn release_empty_textures(&mut self, updates: &mut TextureUpdateList) {
+ self.units.retain(|unit| {
+ if unit.is_empty() {
+ updates.push_free(unit.texture_id);
+
+ false
+ } else {
+ true
+ }
+ });
+ }
+
+ fn update_profile(&self, counter: &mut ResourceProfileCounter) {
+ let num_regions: usize = self.units.iter().map(|u| u.regions.len()).sum();
+ counter.set(num_regions, self.size_in_bytes());
+ }
+
+ /// Allocate space in this texture array.
+ fn alloc(
+ &mut self,
+ params: &CacheAllocParams,
+ unit_index: usize,
+ now: FrameStamp,
+ swizzle: Swizzle,
+ ) -> CacheEntry {
+ // Quantize the size of the allocation to select a region to
+ // allocate from.
+ let slab_size = SlabSize::new(params.descriptor.size);
+ let unit = &mut self.units[unit_index];
+
+ // TODO(gw): For simplicity, the initial implementation just
+ // has a single vec<> of regions. We could easily
+ // make this more efficient by storing a list of
+ // regions for each slab size specifically...
+
+ // Keep track of the location of an empty region,
+ // in case we need to select a new empty region
+ // after the loop.
+ let mut empty_region_index = None;
+ let mut entry_details = None;
+
+ // Run through the existing regions of this size, and see if
+ // we can find a free block in any of them.
+ for (i, region) in unit.regions.iter_mut().enumerate() {
+ if region.is_empty() {
+ empty_region_index = Some(i);
+ } else if region.slab_size == slab_size {
+ if let Some(location) = region.alloc() {
+ entry_details = Some(EntryDetails::Cache {
+ layer_index: region.layer_index,
+ origin: location,
+ });
+ break;
+ }
+ }
+ }
+
+ // Find a region of the right size and try to allocate from it.
+ let details = match entry_details {
+ Some(details) => details,
+ None => {
+ let region = &mut unit.regions[empty_region_index.unwrap()];
+ region.init(slab_size, &mut unit.empty_regions);
+ EntryDetails::Cache {
+ layer_index: region.layer_index,
+ origin: region.alloc().unwrap(),
+ }
+ }
+ };
+
+ CacheEntry {
+ size: params.descriptor.size,
+ user_data: params.user_data,
+ last_access: now,
+ details,
+ uv_rect_handle: GpuCacheHandle::new(),
+ input_format: params.descriptor.format,
+ filter: self.filter,
+ swizzle,
+ texture_id: unit.texture_id,
+ eviction_notice: None,
+ uv_rect_kind: params.uv_rect_kind,
+ }
+ }
+}
+
+
+/// A tracking structure for each slice in `WholeTextureArray`.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Clone, Copy, Debug)]
+struct WholeTextureSlice {
+ uv_rect_handle: Option<GpuCacheHandle>,
+}
+
+/// A texture array that allocates whole slices and doesn't do any region tracking.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+struct WholeTextureArray {
+ size: DeviceIntSize,
+ filter: TextureFilter,
+ format: ImageFormat,
+ texture_id: CacheTextureId,
+ slices: Vec<WholeTextureSlice>,
+ has_depth: bool,
+}
+
+impl WholeTextureArray {
+ fn to_info(&self) -> TextureCacheAllocInfo {
+ TextureCacheAllocInfo {
+ width: self.size.width,
+ height: self.size.height,
+ format: self.format,
+ filter: self.filter,
+ layer_count: self.slices.len() as i32,
+ is_shared_cache: true, //TODO: reconsider
+ has_depth: self.has_depth,
+ }
+ }
+
+ /// Returns the number of GPU bytes consumed by this texture array.
+ fn size_in_bytes(&self) -> usize {
+ let bpp = self.format.bytes_per_pixel() as usize;
+ self.slices.len() * (self.size.width * self.size.height) as usize * bpp
+ }
+
+ /// Find an free slice.
+ fn find_free(&self) -> Option<LayerIndex> {
+ self.slices.iter().position(|slice| slice.uv_rect_handle.is_none())
+ }
+
+ /// Grow the array by the specified number of slices
+ fn grow(&mut self, count: usize) -> LayerIndex {
+ let index = self.slices.len();
+ for _ in 0 .. count {
+ self.slices.push(WholeTextureSlice {
+ uv_rect_handle: None,
+ });
+ }
+ index
+ }
+
+ fn cache_entry_impl(
+ &self,
+ texture_index: usize,
+ layer_index: usize,
+ now: FrameStamp,
+ uv_rect_handle: GpuCacheHandle,
+ texture_id: CacheTextureId,
+ ) -> CacheEntry {
+ CacheEntry {
+ size: self.size,
+ user_data: [0.0; 3],
+ last_access: now,
+ details: EntryDetails::Picture {
+ texture_index,
+ layer_index,
+ },
+ uv_rect_handle,
+ input_format: self.format,
+ filter: self.filter,
+ swizzle: Swizzle::default(),
+ texture_id,
+ eviction_notice: None,
+ uv_rect_kind: UvRectKind::Rect,
+ }
+ }
+
+ /// Occupy a specified slice by a cache entry.
+ fn occupy(
+ &mut self,
+ texture_index: usize,
+ layer_index: usize,
+ now: FrameStamp,
+ ) -> CacheEntry {
+ let uv_rect_handle = GpuCacheHandle::new();
+ assert!(self.slices[layer_index].uv_rect_handle.is_none());
+ self.slices[layer_index].uv_rect_handle = Some(uv_rect_handle);
+ self.cache_entry_impl(
+ texture_index,
+ layer_index,
+ now,
+ uv_rect_handle,
+ self.texture_id,
+ )
+ }
+
+ /// Reset the texture array to the specified number of slices, if it's larger.
+ fn reset(
+ &mut self, num_slices: usize
+ ) -> Option<CacheTextureId> {
+ if self.slices.len() <= num_slices {
+ None
+ } else {
+ self.slices.truncate(num_slices);
+ Some(self.texture_id)
+ }
+ }
+}
+
+
+impl TextureCacheUpdate {
+ // Constructs a TextureCacheUpdate operation to be passed to the
+ // rendering thread in order to do an upload to the right
+ // location in the texture cache.
+ fn new_update(
+ data: CachedImageData,
+ descriptor: &ImageDescriptor,
+ origin: DeviceIntPoint,
+ size: DeviceIntSize,
+ layer_index: i32,
+ use_upload_format: bool,
+ dirty_rect: &ImageDirtyRect,
+ ) -> TextureCacheUpdate {
+ let source = match data {
+ CachedImageData::Blob => {
+ panic!("The vector image should have been rasterized.");
+ }
+ CachedImageData::External(ext_image) => match ext_image.image_type {
+ ExternalImageType::TextureHandle(_) => {
+ panic!("External texture handle should not go through texture_cache.");
+ }
+ ExternalImageType::Buffer => TextureUpdateSource::External {
+ id: ext_image.id,
+ channel_index: ext_image.channel_index,
+ },
+ },
+ CachedImageData::Raw(bytes) => {
+ let finish = descriptor.offset +
+ descriptor.size.width * descriptor.format.bytes_per_pixel() +
+ (descriptor.size.height - 1) * descriptor.compute_stride();
+ assert!(bytes.len() >= finish as usize);
+
+ TextureUpdateSource::Bytes { data: bytes }
+ }
+ };
+ let format_override = if use_upload_format {
+ Some(descriptor.format)
+ } else {
+ None
+ };
+
+ match *dirty_rect {
+ DirtyRect::Partial(dirty) => {
+ // the dirty rectangle doesn't have to be within the area but has to intersect it, at least
+ let stride = descriptor.compute_stride();
+ let offset = descriptor.offset + dirty.origin.y * stride + dirty.origin.x * descriptor.format.bytes_per_pixel();
+
+ TextureCacheUpdate {
+ rect: DeviceIntRect::new(
+ DeviceIntPoint::new(origin.x + dirty.origin.x, origin.y + dirty.origin.y),
+ DeviceIntSize::new(
+ dirty.size.width.min(size.width - dirty.origin.x),
+ dirty.size.height.min(size.height - dirty.origin.y),
+ ),
+ ),
+ source,
+ stride: Some(stride),
+ offset,
+ format_override,
+ layer_index,
+ }
+ }
+ DirtyRect::All => {
+ TextureCacheUpdate {
+ rect: DeviceIntRect::new(origin, size),
+ source,
+ stride: descriptor.stride,
+ offset: descriptor.offset,
+ format_override,
+ layer_index,
+ }
+ }
+ }
+ }
+}
+
+fn quantize_dimension(size: i32) -> i32 {
+ match size {
+ 0 => unreachable!(),
+ 1..=16 => 16,
+ 17..=32 => 32,
+ 33..=64 => 64,
+ 65..=128 => 128,
+ 129..=256 => 256,
+ 257..=512 => 512,
+ _ => panic!("Invalid dimensions for cache!"),
+ }
+}
diff --git a/third_party/webrender/webrender/src/util.rs b/third_party/webrender/webrender/src/util.rs
new file mode 100644
index 00000000000..c6a10386432
--- /dev/null
+++ b/third_party/webrender/webrender/src/util.rs
@@ -0,0 +1,1221 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use api::BorderRadius;
+use api::units::*;
+use euclid::{Point2D, Rect, Size2D, Vector2D};
+use euclid::{default, Transform2D, Transform3D, Scale};
+use malloc_size_of::{MallocShallowSizeOf, MallocSizeOf, MallocSizeOfOps};
+use plane_split::{Clipper, Polygon};
+use std::{i32, f32, fmt, ptr};
+use std::borrow::Cow;
+use std::num::NonZeroUsize;
+use std::os::raw::c_void;
+use std::sync::Arc;
+use std::mem::replace;
+
+
+// Matches the definition of SK_ScalarNearlyZero in Skia.
+const NEARLY_ZERO: f32 = 1.0 / 4096.0;
+
+/// A typesafe helper that separates new value construction from
+/// vector growing, allowing LLVM to ideally construct the element in place.
+pub struct Allocation<'a, T: 'a> {
+ vec: &'a mut Vec<T>,
+ index: usize,
+}
+
+impl<'a, T> Allocation<'a, T> {
+ // writing is safe because alloc() ensured enough capacity
+ // and `Allocation` holds a mutable borrow to prevent anyone else
+ // from breaking this invariant.
+ #[inline(always)]
+ pub fn init(self, value: T) -> usize {
+ unsafe {
+ ptr::write(self.vec.as_mut_ptr().add(self.index), value);
+ self.vec.set_len(self.index + 1);
+ }
+ self.index
+ }
+}
+
+/// An entry into a vector, similar to `std::collections::hash_map::Entry`.
+pub enum VecEntry<'a, T: 'a> {
+ Vacant(Allocation<'a, T>),
+ Occupied(&'a mut T),
+}
+
+impl<'a, T> VecEntry<'a, T> {
+ #[inline(always)]
+ pub fn set(self, value: T) {
+ match self {
+ VecEntry::Vacant(alloc) => { alloc.init(value); }
+ VecEntry::Occupied(slot) => { *slot = value; }
+ }
+ }
+}
+
+pub trait VecHelper<T> {
+ /// Growns the vector by a single entry, returning the allocation.
+ fn alloc(&mut self) -> Allocation<T>;
+ /// Either returns an existing elemenet, or grows the vector by one.
+ /// Doesn't expect indices to be higher than the current length.
+ fn entry(&mut self, index: usize) -> VecEntry<T>;
+
+ /// Equivalent to `mem::replace(&mut vec, Vec::new())`
+ fn take(&mut self) -> Self;
+
+ /// Functionally equivalent to `mem::replace(&mut vec, Vec::new())` but tries
+ /// to keep the allocation in the caller if it is empty or replace it with a
+ /// pre-allocated vector.
+ fn take_and_preallocate(&mut self) -> Self;
+}
+
+impl<T> VecHelper<T> for Vec<T> {
+ fn alloc(&mut self) -> Allocation<T> {
+ let index = self.len();
+ if self.capacity() == index {
+ self.reserve(1);
+ }
+ Allocation {
+ vec: self,
+ index,
+ }
+ }
+
+ fn entry(&mut self, index: usize) -> VecEntry<T> {
+ if index < self.len() {
+ VecEntry::Occupied(unsafe {
+ self.get_unchecked_mut(index)
+ })
+ } else {
+ assert_eq!(index, self.len());
+ VecEntry::Vacant(self.alloc())
+ }
+ }
+
+ fn take(&mut self) -> Self {
+ replace(self, Vec::new())
+ }
+
+ fn take_and_preallocate(&mut self) -> Self {
+ let len = self.len();
+ if len == 0 {
+ self.clear();
+ return Vec::new();
+ }
+ replace(self, Vec::with_capacity(len + 8))
+ }
+}
+
+
+// Represents an optimized transform where there is only
+// a scale and translation (which are guaranteed to maintain
+// an axis align rectangle under transformation). The
+// scaling is applied first, followed by the translation.
+// TODO(gw): We should try and incorporate F <-> T units here,
+// but it's a bit tricky to do that now with the
+// way the current spatial tree works.
+#[derive(Debug, Clone, Copy, MallocSizeOf)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+pub struct ScaleOffset {
+ pub scale: default::Vector2D<f32>,
+ pub offset: default::Vector2D<f32>,
+}
+
+impl ScaleOffset {
+ pub fn identity() -> Self {
+ ScaleOffset {
+ scale: Vector2D::new(1.0, 1.0),
+ offset: Vector2D::zero(),
+ }
+ }
+
+ // Construct a ScaleOffset from a transform. Returns
+ // None if the matrix is not a pure scale / translation.
+ pub fn from_transform<F, T>(
+ m: &Transform3D<f32, F, T>,
+ ) -> Option<ScaleOffset> {
+
+ // To check that we have a pure scale / translation:
+ // Every field must match an identity matrix, except:
+ // - Any value present in tx,ty
+ // - Any non-neg value present in sx,sy (avoid negative for reflection/rotation)
+
+ if m.m11 < 0.0 ||
+ m.m12.abs() > NEARLY_ZERO ||
+ m.m13.abs() > NEARLY_ZERO ||
+ m.m14.abs() > NEARLY_ZERO ||
+ m.m21.abs() > NEARLY_ZERO ||
+ m.m22 < 0.0 ||
+ m.m23.abs() > NEARLY_ZERO ||
+ m.m24.abs() > NEARLY_ZERO ||
+ m.m31.abs() > NEARLY_ZERO ||
+ m.m32.abs() > NEARLY_ZERO ||
+ (m.m33 - 1.0).abs() > NEARLY_ZERO ||
+ m.m34.abs() > NEARLY_ZERO ||
+ m.m43.abs() > NEARLY_ZERO ||
+ (m.m44 - 1.0).abs() > NEARLY_ZERO {
+ return None;
+ }
+
+ Some(ScaleOffset {
+ scale: Vector2D::new(m.m11, m.m22),
+ offset: Vector2D::new(m.m41, m.m42),
+ })
+ }
+
+ pub fn from_offset(offset: default::Vector2D<f32>) -> Self {
+ ScaleOffset {
+ scale: Vector2D::new(1.0, 1.0),
+ offset,
+ }
+ }
+
+ pub fn inverse(&self) -> Self {
+ ScaleOffset {
+ scale: Vector2D::new(
+ 1.0 / self.scale.x,
+ 1.0 / self.scale.y,
+ ),
+ offset: Vector2D::new(
+ -self.offset.x / self.scale.x,
+ -self.offset.y / self.scale.y,
+ ),
+ }
+ }
+
+ pub fn offset(&self, offset: default::Vector2D<f32>) -> Self {
+ self.accumulate(
+ &ScaleOffset {
+ scale: Vector2D::new(1.0, 1.0),
+ offset,
+ }
+ )
+ }
+
+ pub fn scale(&self, scale: f32) -> Self {
+ self.accumulate(
+ &ScaleOffset {
+ scale: Vector2D::new(scale, scale),
+ offset: Vector2D::zero(),
+ }
+ )
+ }
+
+ /// Produce a ScaleOffset that includes both self and other.
+ /// The 'self' ScaleOffset is applied after other.
+ /// This is equivalent to `Transform3D::pre_transform`.
+ pub fn accumulate(&self, other: &ScaleOffset) -> Self {
+ ScaleOffset {
+ scale: Vector2D::new(
+ self.scale.x * other.scale.x,
+ self.scale.y * other.scale.y,
+ ),
+ offset: Vector2D::new(
+ self.offset.x + self.scale.x * other.offset.x,
+ self.offset.y + self.scale.y * other.offset.y,
+ ),
+ }
+ }
+
+ pub fn map_rect<F, T>(&self, rect: &Rect<f32, F>) -> Rect<f32, T> {
+ Rect::new(
+ Point2D::new(
+ rect.origin.x * self.scale.x + self.offset.x,
+ rect.origin.y * self.scale.y + self.offset.y,
+ ),
+ Size2D::new(
+ rect.size.width * self.scale.x,
+ rect.size.height * self.scale.y,
+ )
+ )
+ }
+
+ pub fn unmap_rect<F, T>(&self, rect: &Rect<f32, F>) -> Rect<f32, T> {
+ Rect::new(
+ Point2D::new(
+ (rect.origin.x - self.offset.x) / self.scale.x,
+ (rect.origin.y - self.offset.y) / self.scale.y,
+ ),
+ Size2D::new(
+ rect.size.width / self.scale.x,
+ rect.size.height / self.scale.y,
+ )
+ )
+ }
+
+ pub fn map_vector<F, T>(&self, vector: &Vector2D<f32, F>) -> Vector2D<f32, T> {
+ Vector2D::new(
+ vector.x * self.scale.x,
+ vector.y * self.scale.y,
+ )
+ }
+
+ pub fn unmap_vector<F, T>(&self, vector: &Vector2D<f32, F>) -> Vector2D<f32, T> {
+ Vector2D::new(
+ vector.x / self.scale.x,
+ vector.y / self.scale.y,
+ )
+ }
+
+ pub fn map_point<F, T>(&self, point: &Point2D<f32, F>) -> Point2D<f32, T> {
+ Point2D::new(
+ point.x * self.scale.x + self.offset.x,
+ point.y * self.scale.y + self.offset.y,
+ )
+ }
+
+ pub fn unmap_point<F, T>(&self, point: &Point2D<f32, F>) -> Point2D<f32, T> {
+ Point2D::new(
+ (point.x - self.offset.x) / self.scale.x,
+ (point.y - self.offset.y) / self.scale.y,
+ )
+ }
+
+ pub fn to_transform<F, T>(&self) -> Transform3D<f32, F, T> {
+ Transform3D::new(
+ self.scale.x,
+ 0.0,
+ 0.0,
+ 0.0,
+
+ 0.0,
+ self.scale.y,
+ 0.0,
+ 0.0,
+
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+
+ self.offset.x,
+ self.offset.y,
+ 0.0,
+ 1.0,
+ )
+ }
+}
+
+// TODO: Implement these in euclid!
+pub trait MatrixHelpers<Src, Dst> {
+ /// A port of the preserves2dAxisAlignment function in Skia.
+ /// Defined in the SkMatrix44 class.
+ fn preserves_2d_axis_alignment(&self) -> bool;
+ fn has_perspective_component(&self) -> bool;
+ fn has_2d_inverse(&self) -> bool;
+ /// Check if the matrix post-scaling on either the X or Y axes could cause geometry
+ /// transformed by this matrix to have scaling exceeding the supplied limit.
+ fn exceeds_2d_scale(&self, limit: f64) -> bool;
+ fn inverse_project(&self, target: &Point2D<f32, Dst>) -> Option<Point2D<f32, Src>>;
+ fn inverse_rect_footprint(&self, rect: &Rect<f32, Dst>) -> Option<Rect<f32, Src>>;
+ fn transform_kind(&self) -> TransformedRectKind;
+ fn is_simple_translation(&self) -> bool;
+ fn is_simple_2d_translation(&self) -> bool;
+ fn is_2d_scale_translation(&self) -> bool;
+ /// Return the determinant of the 2D part of the matrix.
+ fn determinant_2d(&self) -> f32;
+ /// This function returns a point in the `Src` space that projects into zero XY.
+ /// It ignores the Z coordinate and is usable for "flattened" transformations,
+ /// since they are not generally inversible.
+ fn inverse_project_2d_origin(&self) -> Option<Point2D<f32, Src>>;
+ /// Turn Z transformation into identity. This is useful when crossing "flat"
+ /// transform styled stacking contexts upon traversing the coordinate systems.
+ fn flatten_z_output(&mut self);
+}
+
+impl<Src, Dst> MatrixHelpers<Src, Dst> for Transform3D<f32, Src, Dst> {
+ fn preserves_2d_axis_alignment(&self) -> bool {
+ if self.m14 != 0.0 || self.m24 != 0.0 {
+ return false;
+ }
+
+ let mut col0 = 0;
+ let mut col1 = 0;
+ let mut row0 = 0;
+ let mut row1 = 0;
+
+ if self.m11.abs() > NEARLY_ZERO {
+ col0 += 1;
+ row0 += 1;
+ }
+ if self.m12.abs() > NEARLY_ZERO {
+ col1 += 1;
+ row0 += 1;
+ }
+ if self.m21.abs() > NEARLY_ZERO {
+ col0 += 1;
+ row1 += 1;
+ }
+ if self.m22.abs() > NEARLY_ZERO {
+ col1 += 1;
+ row1 += 1;
+ }
+
+ col0 < 2 && col1 < 2 && row0 < 2 && row1 < 2
+ }
+
+ fn has_perspective_component(&self) -> bool {
+ self.m14.abs() > NEARLY_ZERO ||
+ self.m24.abs() > NEARLY_ZERO ||
+ self.m34.abs() > NEARLY_ZERO ||
+ (self.m44 - 1.0).abs() > NEARLY_ZERO
+ }
+
+ fn has_2d_inverse(&self) -> bool {
+ self.determinant_2d() != 0.0
+ }
+
+ fn exceeds_2d_scale(&self, limit: f64) -> bool {
+ let limit2 = (limit * limit) as f32;
+ self.m11 * self.m11 + self.m12 * self.m12 > limit2 ||
+ self.m21 * self.m21 + self.m22 * self.m22 > limit2
+ }
+
+ fn inverse_project(&self, target: &Point2D<f32, Dst>) -> Option<Point2D<f32, Src>> {
+ let m: Transform2D<f32, Src, Dst>;
+ m = Transform2D::new(
+ self.m11 - target.x * self.m14, self.m12 - target.y * self.m14,
+ self.m21 - target.x * self.m24, self.m22 - target.y * self.m24,
+ self.m41 - target.x * self.m44, self.m42 - target.y * self.m44,
+ );
+ m.inverse().map(|inv| Point2D::new(inv.m31, inv.m32))
+ }
+
+ fn inverse_rect_footprint(&self, rect: &Rect<f32, Dst>) -> Option<Rect<f32, Src>> {
+ Some(Rect::from_points(&[
+ self.inverse_project(&rect.origin)?,
+ self.inverse_project(&rect.top_right())?,
+ self.inverse_project(&rect.bottom_left())?,
+ self.inverse_project(&rect.bottom_right())?,
+ ]))
+ }
+
+ fn transform_kind(&self) -> TransformedRectKind {
+ if self.preserves_2d_axis_alignment() {
+ TransformedRectKind::AxisAligned
+ } else {
+ TransformedRectKind::Complex
+ }
+ }
+
+ fn is_simple_translation(&self) -> bool {
+ if (self.m11 - 1.0).abs() > NEARLY_ZERO ||
+ (self.m22 - 1.0).abs() > NEARLY_ZERO ||
+ (self.m33 - 1.0).abs() > NEARLY_ZERO ||
+ (self.m44 - 1.0).abs() > NEARLY_ZERO {
+ return false;
+ }
+
+ self.m12.abs() < NEARLY_ZERO && self.m13.abs() < NEARLY_ZERO &&
+ self.m14.abs() < NEARLY_ZERO && self.m21.abs() < NEARLY_ZERO &&
+ self.m23.abs() < NEARLY_ZERO && self.m24.abs() < NEARLY_ZERO &&
+ self.m31.abs() < NEARLY_ZERO && self.m32.abs() < NEARLY_ZERO &&
+ self.m34.abs() < NEARLY_ZERO
+ }
+
+ fn is_simple_2d_translation(&self) -> bool {
+ if !self.is_simple_translation() {
+ return false;
+ }
+
+ self.m43.abs() < NEARLY_ZERO
+ }
+
+ /* is this...
+ * X 0 0 0
+ * 0 Y 0 0
+ * 0 0 1 0
+ * a b 0 1
+ */
+ fn is_2d_scale_translation(&self) -> bool {
+ (self.m33 - 1.0).abs() < NEARLY_ZERO &&
+ (self.m44 - 1.0).abs() < NEARLY_ZERO &&
+ self.m12.abs() < NEARLY_ZERO && self.m13.abs() < NEARLY_ZERO && self.m14.abs() < NEARLY_ZERO &&
+ self.m21.abs() < NEARLY_ZERO && self.m23.abs() < NEARLY_ZERO && self.m24.abs() < NEARLY_ZERO &&
+ self.m31.abs() < NEARLY_ZERO && self.m32.abs() < NEARLY_ZERO && self.m34.abs() < NEARLY_ZERO &&
+ self.m43.abs() < NEARLY_ZERO
+ }
+
+ fn determinant_2d(&self) -> f32 {
+ self.m11 * self.m22 - self.m12 * self.m21
+ }
+
+ fn inverse_project_2d_origin(&self) -> Option<Point2D<f32, Src>> {
+ let det = self.determinant_2d();
+ if det != 0.0 {
+ let x = (self.m21 * self.m42 - self.m41 * self.m22) / det;
+ let y = (self.m12 * self.m41 - self.m11 * self.m42) / det;
+ Some(Point2D::new(x, y))
+ } else {
+ None
+ }
+ }
+
+ fn flatten_z_output(&mut self) {
+ self.m13 = 0.0;
+ self.m23 = 0.0;
+ self.m33 = 1.0;
+ self.m43 = 0.0;
+ }
+}
+
+pub trait PointHelpers<U>
+where
+ Self: Sized,
+{
+ fn snap(&self) -> Self;
+}
+
+impl<U> PointHelpers<U> for Point2D<f32, U> {
+ fn snap(&self) -> Self {
+ Point2D::new(
+ (self.x + 0.5).floor(),
+ (self.y + 0.5).floor(),
+ )
+ }
+}
+
+pub trait RectHelpers<U>
+where
+ Self: Sized,
+{
+ fn from_floats(x0: f32, y0: f32, x1: f32, y1: f32) -> Self;
+ fn is_well_formed_and_nonempty(&self) -> bool;
+ fn snap(&self) -> Self;
+}
+
+impl<U> RectHelpers<U> for Rect<f32, U> {
+ fn from_floats(x0: f32, y0: f32, x1: f32, y1: f32) -> Self {
+ Rect::new(
+ Point2D::new(x0, y0),
+ Size2D::new(x1 - x0, y1 - y0),
+ )
+ }
+
+ fn is_well_formed_and_nonempty(&self) -> bool {
+ self.size.width > 0.0 && self.size.height > 0.0
+ }
+
+ fn snap(&self) -> Self {
+ let origin = Point2D::new(
+ (self.origin.x + 0.5).floor(),
+ (self.origin.y + 0.5).floor(),
+ );
+ Rect::new(
+ origin,
+ Size2D::new(
+ (self.origin.x + self.size.width + 0.5).floor() - origin.x,
+ (self.origin.y + self.size.height + 0.5).floor() - origin.y,
+ ),
+ )
+ }
+}
+
+pub trait VectorHelpers<U>
+where
+ Self: Sized,
+{
+ fn snap(&self) -> Self;
+}
+
+impl<U> VectorHelpers<U> for Vector2D<f32, U> {
+ fn snap(&self) -> Self {
+ Vector2D::new(
+ (self.x + 0.5).floor(),
+ (self.y + 0.5).floor(),
+ )
+ }
+}
+
+pub fn lerp(a: f32, b: f32, t: f32) -> f32 {
+ (b - a) * t + a
+}
+
+#[repr(u32)]
+#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+pub enum TransformedRectKind {
+ AxisAligned = 0,
+ Complex = 1,
+}
+
+#[inline(always)]
+pub fn pack_as_float(value: u32) -> f32 {
+ value as f32 + 0.5
+}
+
+#[inline]
+fn extract_inner_rect_impl<U>(
+ rect: &Rect<f32, U>,
+ radii: &BorderRadius,
+ k: f32,
+) -> Option<Rect<f32, U>> {
+ // `k` defines how much border is taken into account
+ // We enforce the offsets to be rounded to pixel boundaries
+ // by `ceil`-ing and `floor`-ing them
+
+ let xl = (k * radii.top_left.width.max(radii.bottom_left.width)).ceil();
+ let xr = (rect.size.width - k * radii.top_right.width.max(radii.bottom_right.width)).floor();
+ let yt = (k * radii.top_left.height.max(radii.top_right.height)).ceil();
+ let yb =
+ (rect.size.height - k * radii.bottom_left.height.max(radii.bottom_right.height)).floor();
+
+ if xl <= xr && yt <= yb {
+ Some(Rect::new(
+ Point2D::new(rect.origin.x + xl, rect.origin.y + yt),
+ Size2D::new(xr - xl, yb - yt),
+ ))
+ } else {
+ None
+ }
+}
+
+/// Return an aligned rectangle that is inside the clip region and doesn't intersect
+/// any of the bounding rectangles of the rounded corners.
+pub fn extract_inner_rect_safe<U>(
+ rect: &Rect<f32, U>,
+ radii: &BorderRadius,
+) -> Option<Rect<f32, U>> {
+ // value of `k==1.0` is used for extraction of the corner rectangles
+ // see `SEGMENT_CORNER_*` in `clip_shared.glsl`
+ extract_inner_rect_impl(rect, radii, 1.0)
+}
+
+#[cfg(test)]
+use euclid::vec3;
+
+#[cfg(test)]
+pub mod test {
+ use super::*;
+ use euclid::default::{Point2D, Transform3D};
+ use euclid::Angle;
+ use std::f32::consts::PI;
+
+ #[test]
+ fn inverse_project() {
+ let m0 = Transform3D::identity();
+ let p0 = Point2D::new(1.0, 2.0);
+ // an identical transform doesn't need any inverse projection
+ assert_eq!(m0.inverse_project(&p0), Some(p0));
+ let m1 = Transform3D::rotation(0.0, 1.0, 0.0, Angle::radians(-PI / 3.0));
+ // rotation by 60 degrees would imply scaling of X component by a factor of 2
+ assert_eq!(m1.inverse_project(&p0), Some(Point2D::new(2.0, 2.0)));
+ }
+
+ fn validate_convert(xref: &LayoutTransform) {
+ let so = ScaleOffset::from_transform(xref).unwrap();
+ let xf = so.to_transform();
+ assert!(xref.approx_eq(&xf));
+ }
+
+ #[test]
+ fn scale_offset_convert() {
+ let xref = LayoutTransform::translation(130.0, 200.0, 0.0);
+ validate_convert(&xref);
+
+ let xref = LayoutTransform::scale(13.0, 8.0, 1.0);
+ validate_convert(&xref);
+
+ let xref = LayoutTransform::scale(0.5, 0.5, 1.0)
+ .pre_translate(LayoutVector3D::new(124.0, 38.0, 0.0));
+ validate_convert(&xref);
+
+ let xref = LayoutTransform::scale(30.0, 11.0, 1.0)
+ .then_translate(vec3(50.0, 240.0, 0.0));
+ validate_convert(&xref);
+ }
+
+ fn validate_inverse(xref: &LayoutTransform) {
+ let s0 = ScaleOffset::from_transform(xref).unwrap();
+ let s1 = s0.inverse().accumulate(&s0);
+ assert!((s1.scale.x - 1.0).abs() < NEARLY_ZERO &&
+ (s1.scale.y - 1.0).abs() < NEARLY_ZERO &&
+ s1.offset.x.abs() < NEARLY_ZERO &&
+ s1.offset.y.abs() < NEARLY_ZERO,
+ "{:?}",
+ s1);
+ }
+
+ #[test]
+ fn scale_offset_inverse() {
+ let xref = LayoutTransform::translation(130.0, 200.0, 0.0);
+ validate_inverse(&xref);
+
+ let xref = LayoutTransform::scale(13.0, 8.0, 1.0);
+ validate_inverse(&xref);
+
+ let xref = LayoutTransform::translation(124.0, 38.0, 0.0).
+ then_scale(0.5, 0.5, 1.0);
+
+ validate_inverse(&xref);
+
+ let xref = LayoutTransform::scale(30.0, 11.0, 1.0)
+ .then_translate(vec3(50.0, 240.0, 0.0));
+ validate_inverse(&xref);
+ }
+
+ fn validate_accumulate(x0: &LayoutTransform, x1: &LayoutTransform) {
+ let x = x1.then(&x0);
+
+ let s0 = ScaleOffset::from_transform(x0).unwrap();
+ let s1 = ScaleOffset::from_transform(x1).unwrap();
+
+ let s = s0.accumulate(&s1).to_transform();
+
+ assert!(x.approx_eq(&s), "{:?}\n{:?}", x, s);
+ }
+
+ #[test]
+ fn scale_offset_accumulate() {
+ let x0 = LayoutTransform::translation(130.0, 200.0, 0.0);
+ let x1 = LayoutTransform::scale(7.0, 3.0, 1.0);
+
+ validate_accumulate(&x0, &x1);
+ }
+
+ #[test]
+ fn inverse_project_2d_origin() {
+ let mut m = Transform3D::identity();
+ assert_eq!(m.inverse_project_2d_origin(), Some(Point2D::zero()));
+ m.m11 = 0.0;
+ assert_eq!(m.inverse_project_2d_origin(), None);
+ m.m21 = -2.0;
+ m.m22 = 0.0;
+ m.m12 = -0.5;
+ m.m41 = 1.0;
+ m.m42 = 0.5;
+ let origin = m.inverse_project_2d_origin().unwrap();
+ assert_eq!(origin, Point2D::new(1.0, 0.5));
+ assert_eq!(m.transform_point2d(origin), Some(Point2D::zero()));
+ }
+}
+
+pub trait MaxRect {
+ fn max_rect() -> Self;
+}
+
+impl MaxRect for DeviceIntRect {
+ fn max_rect() -> Self {
+ DeviceIntRect::new(
+ DeviceIntPoint::new(i32::MIN / 2, i32::MIN / 2),
+ DeviceIntSize::new(i32::MAX, i32::MAX),
+ )
+ }
+}
+
+impl<U> MaxRect for Rect<f32, U> {
+ fn max_rect() -> Self {
+ // Having an unlimited bounding box is fine up until we try
+ // to cast it to `i32`, where we get `-2147483648` for any
+ // values larger than or equal to 2^31.
+ //
+ // Note: clamping to i32::MIN and i32::MAX is not a solution,
+ // with explanation left as an exercise for the reader.
+ const MAX_COORD: f32 = 1.0e9;
+
+ Rect::new(
+ Point2D::new(-MAX_COORD, -MAX_COORD),
+ Size2D::new(2.0 * MAX_COORD, 2.0 * MAX_COORD),
+ )
+ }
+}
+
+/// An enum that tries to avoid expensive transformation matrix calculations
+/// when possible when dealing with non-perspective axis-aligned transformations.
+#[derive(Debug, MallocSizeOf)]
+pub enum FastTransform<Src, Dst> {
+ /// A simple offset, which can be used without doing any matrix math.
+ Offset(Vector2D<f32, Src>),
+
+ /// A 2D transformation with an inverse.
+ Transform {
+ transform: Transform3D<f32, Src, Dst>,
+ inverse: Option<Transform3D<f32, Dst, Src>>,
+ is_2d: bool,
+ },
+}
+
+impl<Src, Dst> Clone for FastTransform<Src, Dst> {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+
+impl<Src, Dst> Copy for FastTransform<Src, Dst> { }
+
+impl<Src, Dst> FastTransform<Src, Dst> {
+ pub fn identity() -> Self {
+ FastTransform::Offset(Vector2D::zero())
+ }
+
+ pub fn with_vector(offset: Vector2D<f32, Src>) -> Self {
+ FastTransform::Offset(offset)
+ }
+
+ pub fn with_scale_offset(scale_offset: ScaleOffset) -> Self {
+ if scale_offset.scale == Vector2D::new(1.0, 1.0) {
+ FastTransform::Offset(Vector2D::from_untyped(scale_offset.offset))
+ } else {
+ FastTransform::Transform {
+ transform: scale_offset.to_transform(),
+ inverse: Some(scale_offset.inverse().to_transform()),
+ is_2d: true,
+ }
+ }
+ }
+
+ #[inline(always)]
+ pub fn with_transform(transform: Transform3D<f32, Src, Dst>) -> Self {
+ if transform.is_simple_2d_translation() {
+ return FastTransform::Offset(Vector2D::new(transform.m41, transform.m42));
+ }
+ let inverse = transform.inverse();
+ let is_2d = transform.is_2d();
+ FastTransform::Transform { transform, inverse, is_2d}
+ }
+
+ pub fn to_transform(&self) -> Cow<Transform3D<f32, Src, Dst>> {
+ match *self {
+ FastTransform::Offset(offset) => Cow::Owned(
+ Transform3D::translation(offset.x, offset.y, 0.0)
+ ),
+ FastTransform::Transform { ref transform, .. } => Cow::Borrowed(transform),
+ }
+ }
+
+ /// Return true if this is an identity transform
+ #[allow(unused)]
+ pub fn is_identity(&self)-> bool {
+ match *self {
+ FastTransform::Offset(offset) => {
+ offset == Vector2D::zero()
+ }
+ FastTransform::Transform { ref transform, .. } => {
+ *transform == Transform3D::identity()
+ }
+ }
+ }
+
+ pub fn then<NewDst>(&self, other: &FastTransform<Dst, NewDst>) -> FastTransform<Src, NewDst> {
+ match *self {
+ FastTransform::Offset(offset) => match *other {
+ FastTransform::Offset(other_offset) => {
+ FastTransform::Offset(offset + other_offset * Scale::<_, _, Src>::new(1.0))
+ }
+ FastTransform::Transform { transform: ref other_transform, .. } => {
+ FastTransform::with_transform(
+ other_transform
+ .with_source::<Src>()
+ .pre_translate(offset.to_3d())
+ )
+ }
+ }
+ FastTransform::Transform { ref transform, ref inverse, is_2d } => match *other {
+ FastTransform::Offset(other_offset) => {
+ FastTransform::with_transform(
+ transform
+ .then_translate(other_offset.to_3d())
+ .with_destination::<NewDst>()
+ )
+ }
+ FastTransform::Transform { transform: ref other_transform, inverse: ref other_inverse, is_2d: other_is_2d } => {
+ FastTransform::Transform {
+ transform: transform.then(other_transform),
+ inverse: inverse.as_ref().and_then(|self_inv|
+ other_inverse.as_ref().map(|other_inv| other_inv.then(self_inv))
+ ),
+ is_2d: is_2d & other_is_2d,
+ }
+ }
+ }
+ }
+ }
+
+ pub fn pre_transform<NewSrc>(
+ &self,
+ other: &FastTransform<NewSrc, Src>
+ ) -> FastTransform<NewSrc, Dst> {
+ other.then(self)
+ }
+
+ pub fn pre_translate(&self, other_offset: Vector2D<f32, Src>) -> Self {
+ match *self {
+ FastTransform::Offset(offset) =>
+ FastTransform::Offset(offset + other_offset),
+ FastTransform::Transform { transform, .. } =>
+ FastTransform::with_transform(transform.pre_translate(other_offset.to_3d()))
+ }
+ }
+
+ pub fn then_translate(&self, other_offset: Vector2D<f32, Dst>) -> Self {
+ match *self {
+ FastTransform::Offset(offset) => {
+ FastTransform::Offset(offset + other_offset * Scale::<_, _, Src>::new(1.0))
+ }
+ FastTransform::Transform { ref transform, .. } => {
+ let transform = transform.then_translate(other_offset.to_3d());
+ FastTransform::with_transform(transform)
+ }
+ }
+ }
+
+ #[inline(always)]
+ pub fn is_backface_visible(&self) -> bool {
+ match *self {
+ FastTransform::Offset(..) => false,
+ FastTransform::Transform { inverse: None, .. } => false,
+ //TODO: fix this properly by taking "det|M33| * det|M34| > 0"
+ // see https://www.w3.org/Bugs/Public/show_bug.cgi?id=23014
+ FastTransform::Transform { inverse: Some(ref inverse), .. } => inverse.m33 < 0.0,
+ }
+ }
+
+ #[inline(always)]
+ pub fn transform_point2d(&self, point: Point2D<f32, Src>) -> Option<Point2D<f32, Dst>> {
+ match *self {
+ FastTransform::Offset(offset) => {
+ let new_point = point + offset;
+ Some(Point2D::from_untyped(new_point.to_untyped()))
+ }
+ FastTransform::Transform { ref transform, .. } => transform.transform_point2d(point),
+ }
+ }
+
+ #[inline(always)]
+ pub fn inverse(&self) -> Option<FastTransform<Dst, Src>> {
+ match *self {
+ FastTransform::Offset(offset) =>
+ Some(FastTransform::Offset(Vector2D::new(-offset.x, -offset.y))),
+ FastTransform::Transform { transform, inverse: Some(inverse), is_2d, } =>
+ Some(FastTransform::Transform {
+ transform: inverse,
+ inverse: Some(transform),
+ is_2d
+ }),
+ FastTransform::Transform { inverse: None, .. } => None,
+
+ }
+ }
+}
+
+impl<Src, Dst> From<Transform3D<f32, Src, Dst>> for FastTransform<Src, Dst> {
+ fn from(transform: Transform3D<f32, Src, Dst>) -> Self {
+ FastTransform::with_transform(transform)
+ }
+}
+
+impl<Src, Dst> From<Vector2D<f32, Src>> for FastTransform<Src, Dst> {
+ fn from(vector: Vector2D<f32, Src>) -> Self {
+ FastTransform::with_vector(vector)
+ }
+}
+
+pub type LayoutFastTransform = FastTransform<LayoutPixel, LayoutPixel>;
+pub type LayoutToWorldFastTransform = FastTransform<LayoutPixel, WorldPixel>;
+
+pub fn project_rect<F, T>(
+ transform: &Transform3D<f32, F, T>,
+ rect: &Rect<f32, F>,
+ bounds: &Rect<f32, T>,
+) -> Option<Rect<f32, T>>
+ where F: fmt::Debug
+{
+ let homogens = [
+ transform.transform_point2d_homogeneous(rect.origin),
+ transform.transform_point2d_homogeneous(rect.top_right()),
+ transform.transform_point2d_homogeneous(rect.bottom_left()),
+ transform.transform_point2d_homogeneous(rect.bottom_right()),
+ ];
+
+ // Note: we only do the full frustum collision when the polygon approaches the camera plane.
+ // Otherwise, it will be clamped to the screen bounds anyway.
+ if homogens.iter().any(|h| h.w <= 0.0 || h.w.is_nan()) {
+ let mut clipper = Clipper::new();
+ let polygon = Polygon::from_rect(*rect, 1);
+
+ let planes = match Clipper::<_, _, usize>::frustum_planes(
+ transform,
+ Some(*bounds),
+ ) {
+ Ok(planes) => planes,
+ Err(..) => return None,
+ };
+
+ for plane in planes {
+ clipper.add(plane);
+ }
+
+ let results = clipper.clip(polygon);
+ if results.is_empty() {
+ return None
+ }
+
+ Some(Rect::from_points(results
+ .into_iter()
+ // filter out parts behind the view plane
+ .flat_map(|poly| &poly.points)
+ .map(|p| {
+ let mut homo = transform.transform_point2d_homogeneous(p.to_2d());
+ homo.w = homo.w.max(0.00000001); // avoid infinite values
+ homo.to_point2d().unwrap()
+ })
+ ))
+ } else {
+ // we just checked for all the points to be in positive hemisphere, so `unwrap` is valid
+ Some(Rect::from_points(&[
+ homogens[0].to_point2d().unwrap(),
+ homogens[1].to_point2d().unwrap(),
+ homogens[2].to_point2d().unwrap(),
+ homogens[3].to_point2d().unwrap(),
+ ]))
+ }
+}
+
+pub fn raster_rect_to_device_pixels(
+ rect: RasterRect,
+ device_pixel_scale: DevicePixelScale,
+) -> DeviceRect {
+ let world_rect = rect * Scale::new(1.0);
+ let device_rect = world_rect * device_pixel_scale;
+ device_rect.round_out()
+}
+
+/// Run the first callback over all elements in the array. If the callback returns true,
+/// the element is removed from the array and moved to a second callback.
+///
+/// This is a simple implementation waiting for Vec::drain_filter to be stable.
+/// When that happens, code like:
+///
+/// let filter = |op| {
+/// match *op {
+/// Enum::Foo | Enum::Bar => true,
+/// Enum::Baz => false,
+/// }
+/// };
+/// drain_filter(
+/// &mut ops,
+/// filter,
+/// |op| {
+/// match op {
+/// Enum::Foo => { foo(); }
+/// Enum::Bar => { bar(); }
+/// Enum::Baz => { unreachable!(); }
+/// }
+/// },
+/// );
+///
+/// Can be rewritten as:
+///
+/// let filter = |op| {
+/// match *op {
+/// Enum::Foo | Enum::Bar => true,
+/// Enum::Baz => false,
+/// }
+/// };
+/// for op in ops.drain_filter(filter) {
+/// match op {
+/// Enum::Foo => { foo(); }
+/// Enum::Bar => { bar(); }
+/// Enum::Baz => { unreachable!(); }
+/// }
+/// }
+///
+/// See https://doc.rust-lang.org/std/vec/struct.Vec.html#method.drain_filter
+pub fn drain_filter<T, Filter, Action>(
+ vec: &mut Vec<T>,
+ mut filter: Filter,
+ mut action: Action,
+)
+where
+ Filter: FnMut(&mut T) -> bool,
+ Action: FnMut(T)
+{
+ let mut i = 0;
+ while i != vec.len() {
+ if filter(&mut vec[i]) {
+ action(vec.remove(i));
+ } else {
+ i += 1;
+ }
+ }
+}
+
+
+#[derive(Debug)]
+pub struct Recycler {
+ pub num_allocations: usize,
+}
+
+impl Recycler {
+ /// Maximum extra capacity that a recycled vector is allowed to have. If the actual capacity
+ /// is larger, we re-allocate the vector storage with lower capacity.
+ const MAX_EXTRA_CAPACITY_PERCENT: usize = 200;
+ /// Minimum extra capacity to keep when re-allocating the vector storage.
+ const MIN_EXTRA_CAPACITY_PERCENT: usize = 20;
+ /// Minimum sensible vector length to consider for re-allocation.
+ const MIN_VECTOR_LENGTH: usize = 16;
+
+ pub fn new() -> Self {
+ Recycler {
+ num_allocations: 0,
+ }
+ }
+
+ /// Clear a vector for re-use, while retaining the backing memory buffer. May shrink the buffer
+ /// if it's currently much larger than was actually used.
+ pub fn recycle_vec<T>(&mut self, vec: &mut Vec<T>) {
+ let extra_capacity = (vec.capacity() - vec.len()) * 100 / vec.len().max(Self::MIN_VECTOR_LENGTH);
+
+ if extra_capacity > Self::MAX_EXTRA_CAPACITY_PERCENT {
+ // Reduce capacity of the buffer if it is a lot larger than it needs to be. This prevents
+ // a frame with exceptionally large allocations to cause subsequent frames to retain
+ // more memory than they need.
+ //TODO: use `shrink_to` when it's stable
+ *vec = Vec::with_capacity(vec.len() + vec.len() * Self::MIN_EXTRA_CAPACITY_PERCENT / 100);
+ self.num_allocations += 1;
+ } else {
+ vec.clear();
+ }
+ }
+}
+
+/// Arc wrapper to support measurement via MallocSizeOf.
+///
+/// Memory reporting for Arcs is tricky because of the risk of double-counting.
+/// One way to measure them is to keep a table of pointers that have already been
+/// traversed. The other way is to use knowledge of the program structure to
+/// identify which Arc instances should be measured and which should be skipped to
+/// avoid double-counting.
+///
+/// This struct implements the second approach. It identifies the "main" pointer
+/// to the Arc-ed resource, and measures the buffer as if it were an owned pointer.
+/// The programmer should ensure that there is at most one PrimaryArc for a given
+/// underlying ArcInner.
+#[cfg_attr(feature = "capture", derive(Serialize))]
+#[cfg_attr(feature = "replay", derive(Deserialize))]
+#[derive(Clone, Debug, Hash, PartialEq, Eq)]
+pub struct PrimaryArc<T>(pub Arc<T>);
+
+impl<T> ::std::ops::Deref for PrimaryArc<T> {
+ type Target = Arc<T>;
+
+ #[inline]
+ fn deref(&self) -> &Arc<T> {
+ &self.0
+ }
+}
+
+impl<T> MallocShallowSizeOf for PrimaryArc<T> {
+ fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ unsafe {
+ // This is a bit sketchy, but std::sync::Arc doesn't expose the
+ // base pointer.
+ let raw_arc_ptr: *const Arc<T> = &self.0;
+ let raw_ptr_ptr: *const *const c_void = raw_arc_ptr as _;
+ let raw_ptr = *raw_ptr_ptr;
+ (ops.size_of_op)(raw_ptr)
+ }
+ }
+}
+
+impl<T: MallocSizeOf> MallocSizeOf for PrimaryArc<T> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.shallow_size_of(ops) + (**self).size_of(ops)
+ }
+}
+
+/// Computes the scale factors of this matrix; that is,
+/// the amounts each basis vector is scaled by.
+///
+/// This code comes from gecko gfx/2d/Matrix.h with the following
+/// modifications:
+///
+/// * Removed `xMajor` parameter.
+pub fn scale_factors<Src, Dst>(
+ mat: &Transform3D<f32, Src, Dst>
+) -> (f32, f32) {
+ // Determinant is just of the 2D component.
+ let det = mat.m11 * mat.m22 - mat.m12 * mat.m21;
+ if det == 0.0 {
+ return (0.0, 0.0);
+ }
+
+ // ignore mirroring
+ let det = det.abs();
+
+ let major = (mat.m11 * mat.m11 + mat.m12 * mat.m12).sqrt();
+ let minor = if major != 0.0 { det / major } else { 0.0 };
+
+ (major, minor)
+}
+
+/// Clamp scaling factor to a power of two.
+///
+/// This code comes from gecko gfx/thebes/gfxUtils.cpp with the following
+/// modification:
+///
+/// * logs are taken in base 2 instead of base e.
+pub fn clamp_to_scale_factor(val: f32, round_down: bool) -> f32 {
+ // Arbitary scale factor limitation. We can increase this
+ // for better scaling performance at the cost of worse
+ // quality.
+ const SCALE_RESOLUTION: f32 = 2.0;
+
+ // Negative scaling is just a flip and irrelevant to
+ // our resolution calculation.
+ let val = val.abs();
+
+ let (val, inverse) = if val < 1.0 {
+ (1.0 / val, true)
+ } else {
+ (val, false)
+ };
+
+ let power = val.log2() / SCALE_RESOLUTION.log2();
+
+ // If power is within 1e-5 of an integer, round to nearest to
+ // prevent floating point errors, otherwise round up to the
+ // next integer value.
+ let power = if (power - power.round()).abs() < 1e-5 {
+ power.round()
+ } else if inverse != round_down {
+ // Use floor when we are either inverted or rounding down, but
+ // not both.
+ power.floor()
+ } else {
+ // Otherwise, ceil when we are not inverted and not rounding
+ // down, or we are inverted and rounding down.
+ power.ceil()
+ };
+
+ let scale = SCALE_RESOLUTION.powf(power);
+
+ if inverse {
+ 1.0 / scale
+ } else {
+ scale
+ }
+}
+
+/// Rounds a value up to the nearest multiple of mul
+pub fn round_up_to_multiple(val: usize, mul: NonZeroUsize) -> usize {
+ match val % mul.get() {
+ 0 => val,
+ rem => val - rem + mul.get(),
+ }
+}
+
+
+#[macro_export]
+macro_rules! c_str {
+ ($lit:expr) => {
+ unsafe {
+ std::ffi::CStr::from_ptr(concat!($lit, "\0").as_ptr()
+ as *const std::os::raw::c_char)
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/tests/angle_shader_validation.rs b/third_party/webrender/webrender/tests/angle_shader_validation.rs
new file mode 100644
index 00000000000..0a099d0b045
--- /dev/null
+++ b/third_party/webrender/webrender/tests/angle_shader_validation.rs
@@ -0,0 +1,62 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+extern crate mozangle;
+extern crate webrender;
+extern crate webrender_build;
+
+use mozangle::shaders::{BuiltInResources, Output, ShaderSpec, ShaderValidator};
+use webrender_build::shader::{ShaderFeatureFlags, ShaderVersion, build_shader_strings, get_shader_features};
+
+// from glslang
+const FRAGMENT_SHADER: u32 = 0x8B30;
+const VERTEX_SHADER: u32 = 0x8B31;
+
+#[test]
+fn validate_shaders() {
+ mozangle::shaders::initialize().unwrap();
+
+ let resources = BuiltInResources::default();
+ let vs_validator =
+ ShaderValidator::new(VERTEX_SHADER, ShaderSpec::Gles3, Output::Essl, &resources).unwrap();
+
+ let fs_validator =
+ ShaderValidator::new(FRAGMENT_SHADER, ShaderSpec::Gles3, Output::Essl, &resources).unwrap();
+
+ for (shader, configs) in get_shader_features(ShaderFeatureFlags::GLES) {
+ for config in configs {
+ let features = config.split(",").filter(|f| !f.is_empty()).collect::<Vec<_>>();
+
+ let (vs, fs) = build_shader_strings(
+ ShaderVersion::Gles,
+ &features,
+ shader,
+ &|f| webrender::get_unoptimized_shader_source(f, None)
+ );
+
+ validate(&vs_validator, shader, vs);
+ validate(&fs_validator, shader, fs);
+ }
+ }
+}
+
+fn validate(validator: &ShaderValidator, name: &str, source: String) {
+ // Check for each `switch` to have a `default`, see
+ // https://github.com/servo/webrender/wiki/Driver-issues#lack-of-default-case-in-a-switch
+ assert_eq!(source.matches("switch").count(), source.matches("default:").count(),
+ "Shader '{}' doesn't have all `switch` covered with `default` cases", name);
+ // Run Angle validator
+ match validator.compile_and_translate(&[&source]) {
+ Ok(_) => {
+ println!("Shader translated succesfully: {}", name);
+ }
+ Err(_) => {
+ panic!(
+ "Shader compilation failed: {}\n{}",
+ name,
+ validator.info_log()
+ );
+ }
+ }
+}
diff --git a/third_party/webrender/webrender/tests/bug_124.html b/third_party/webrender/webrender/tests/bug_124.html
new file mode 100644
index 00000000000..9f15bbd01a0
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_124.html
@@ -0,0 +1,5 @@
+<body style="margin:0">
+ <div style="background: blue; width: 100%; height: 100%; position: absolute; overflow: hidden;">
+ <div style="background: red; height: 40px; position: absolute; width: 40px; box-shadow: 10px 10px 10px black;"></div>
+ </div>
+</body>
diff --git a/third_party/webrender/webrender/tests/bug_134.html b/third_party/webrender/webrender/tests/bug_134.html
new file mode 100644
index 00000000000..2d1c177a517
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_134.html
@@ -0,0 +1,29 @@
+<style>
+
+ div {
+ background: #F00;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ perspective: 0px;
+ left: 0;
+ }
+
+ iframe {
+ display: block;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ transform: translate3d(0px, 0px, 0px);
+
+ /* Not visible: */
+ background: #00F;
+ border: 4px solid #0F0;
+
+ }
+
+</style>
+
+<div>
+ <iframe src="data:,XXX"></iframe>
+</div>
diff --git a/third_party/webrender/webrender/tests/bug_137.html b/third_party/webrender/webrender/tests/bug_137.html
new file mode 100644
index 00000000000..bc76802de74
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_137.html
@@ -0,0 +1,25 @@
+<style>
+ body {
+ margin: 0;
+ background: red;
+ width: 100%;
+ height: 100%;
+ }
+
+ div {
+ background-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=");
+ background-repeat: no-repeat;
+ background-size: 200px 200px;
+ position: absolute;
+ height: 30px;
+ width: 30px;
+ border: 2px solid black;
+ bottom: 0;
+ right: 0;
+ }
+
+
+
+</style>
+
+<div></div>
diff --git a/third_party/webrender/webrender/tests/bug_143.html b/third_party/webrender/webrender/tests/bug_143.html
new file mode 100644
index 00000000000..7ae5c0c0339
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_143.html
@@ -0,0 +1,11 @@
+<style>
+ div {
+ background-size: cover;
+ border-radius: 10px;
+ width: 100px;
+ height: 100px;
+ //border:0.5px solid red;
+ background-image: url(http://www.google.com/favicon.ico);
+ }
+</style>
+<div></div>
diff --git a/third_party/webrender/webrender/tests/bug_159.html b/third_party/webrender/webrender/tests/bug_159.html
new file mode 100644
index 00000000000..325b99dc922
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_159.html
@@ -0,0 +1,2 @@
+<h1>foobar</h1>
+<div style="height: 100px; width: 100px; box-shadow: 0px 0px 50px rgba(255,0,0,0.2);"></div>
diff --git a/third_party/webrender/webrender/tests/bug_166.html b/third_party/webrender/webrender/tests/bug_166.html
new file mode 100644
index 00000000000..c1c52b1eaa5
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_166.html
@@ -0,0 +1,10 @@
+<style>
+ body {
+ padding: 20px;
+ background: rgb(65, 149, 250);
+ //font-size: 200px;
+ }
+</style>
+
+<div style="opacity: 0.999; color: white">FOOBAR</div>
+<div style="opacity: 1.0; color: white">FOOBAR</div>
diff --git a/third_party/webrender/webrender/tests/bug_176.html b/third_party/webrender/webrender/tests/bug_176.html
new file mode 100644
index 00000000000..3650dad8205
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_176.html
@@ -0,0 +1 @@
+<div style="opacity: 0.8">FOOBAR</div>
diff --git a/third_party/webrender/webrender/tests/bug_177.html b/third_party/webrender/webrender/tests/bug_177.html
new file mode 100644
index 00000000000..188f0b3d93a
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_177.html
@@ -0,0 +1,23 @@
+<style>
+
+ .green {
+ background: green;
+ position: absolute;
+ width: 100%;
+ height: 100px;
+ transform: translateX(-200px);
+ }
+
+ .red {
+ background: red;
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ right: -50px;
+ }
+
+</style>
+
+<div class="green">
+ <div class="red"></div>
+</div>
diff --git a/third_party/webrender/webrender/tests/bug_178.html b/third_party/webrender/webrender/tests/bug_178.html
new file mode 100644
index 00000000000..e8d341f231b
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_178.html
@@ -0,0 +1,24 @@
+<style>
+
+ .green {
+ background: green;
+ width: 100px;
+ height: 100px;
+ position: absolute;
+ transform: translateX(4px);
+ }
+
+ .red {
+ position: absolute;
+ left: 25px;
+ width: 50px;
+ height: 26px;
+ background: red;
+ background-image: linear-gradient(to bottom, red, yellow);
+}
+
+</style>
+
+<div class="green">
+ <div class="red"></div>
+</div>
diff --git a/third_party/webrender/webrender/tests/bug_203a.html b/third_party/webrender/webrender/tests/bug_203a.html
new file mode 100644
index 00000000000..dc46d06772c
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_203a.html
@@ -0,0 +1,13 @@
+<style>
+ body {
+ margin: 0;
+ }
+ iframe {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ width: 200px;
+ height: 200px;
+ }
+</style>
+<iframe src="bug_203b.html"></iframe>
diff --git a/third_party/webrender/webrender/tests/bug_203b.html b/third_party/webrender/webrender/tests/bug_203b.html
new file mode 100644
index 00000000000..72f99618898
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_203b.html
@@ -0,0 +1,14 @@
+<style>
+ div {
+ position: fixed;
+ width: 100px;
+ height: 100px;
+ background: red;
+ left: 0px;
+ top: 0px;
+ }
+</style>
+<body>
+ <div></div>
+ <h1>content</h1>
+</body>
diff --git a/third_party/webrender/webrender/tests/bug_servo_10136.html b/third_party/webrender/webrender/tests/bug_servo_10136.html
new file mode 100644
index 00000000000..bca2e3dc29f
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_servo_10136.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<style>
+body {
+ background: black;
+}
+div {
+ color: white;
+ text-shadow: 5px 5px 5px white;
+}
+</style>
+<div>whoa</div>
diff --git a/third_party/webrender/webrender/tests/bug_servo_10164.html b/third_party/webrender/webrender/tests/bug_servo_10164.html
new file mode 100644
index 00000000000..8377818cdde
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_servo_10164.html
@@ -0,0 +1,19 @@
+<style>
+ .red {
+ width: 200px;
+ height: 200px;
+ overflow: hidden;
+ transform: scale(0.5);
+ background: red;
+ }
+ .green {
+ height: 100px;
+ width: 200px;
+ transform: translateX(-100px);
+ background-color: green;
+ }
+</style>
+
+<div class="red">
+ <div class="green"></div>
+</div>
diff --git a/third_party/webrender/webrender/tests/bug_servo_10307.html b/third_party/webrender/webrender/tests/bug_servo_10307.html
new file mode 100644
index 00000000000..e1775939f11
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_servo_10307.html
@@ -0,0 +1,12 @@
+<style>
+ div {
+ width: 200px;
+ height: 200px;
+ margin: 50px;
+ box-shadow: 0 0 0 20px black;
+ transform: translate(20px, 20px);
+ background: red;
+ }
+</style>
+There should be a red square with a black border around it.
+<div></div>
diff --git a/third_party/webrender/webrender/tests/bug_servo_11358.html b/third_party/webrender/webrender/tests/bug_servo_11358.html
new file mode 100644
index 00000000000..2e99b6ff860
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_servo_11358.html
@@ -0,0 +1,12 @@
+<style>
+ body {
+ background: green;
+ }
+ iframe {
+ width: 100vw;
+ height: 100vh;
+ border: 10px solid red;
+ transform: scale(.5);
+ }
+</style>
+<iframe src="data:text/html,<body style='overflow: hidden; overflow-y: auto;'><div style='background: blue; height: 2000px'>"></iframe>
diff --git a/third_party/webrender/webrender/tests/bug_servo_9983a.html b/third_party/webrender/webrender/tests/bug_servo_9983a.html
new file mode 100644
index 00000000000..92830ed9b1f
--- /dev/null
+++ b/third_party/webrender/webrender/tests/bug_servo_9983a.html
@@ -0,0 +1,17 @@
+<style>
+ div {
+ position: relative;
+ width: 100px;
+ height: 100px;
+ background: red;
+ overflow: hidden;
+ }
+ iframe {
+ position: absolute;
+ height: 200px;
+ width: 100px;
+ border: none;
+ }
+</style>
+Test passes if there is a single 100x100px orange square.
+<div><iframe src="data:text/html,<style>body{background:orange}</style>"></iframe></div>
diff --git a/third_party/webrender/webrender/tests/color_pattern_1.png b/third_party/webrender/webrender/tests/color_pattern_1.png
new file mode 100644
index 00000000000..61b47eb2685
--- /dev/null
+++ b/third_party/webrender/webrender/tests/color_pattern_1.png
Binary files differ
diff --git a/third_party/webrender/webrender/tests/color_pattern_2.png b/third_party/webrender/webrender/tests/color_pattern_2.png
new file mode 100644
index 00000000000..e8605692b4b
--- /dev/null
+++ b/third_party/webrender/webrender/tests/color_pattern_2.png
Binary files differ
diff --git a/third_party/webrender/webrender/tests/fixed-position.html b/third_party/webrender/webrender/tests/fixed-position.html
new file mode 100644
index 00000000000..1b79da2018c
--- /dev/null
+++ b/third_party/webrender/webrender/tests/fixed-position.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>test - fixed position</title>
+ <style type="text/css">
+ #container {
+ background-color: red;
+ }
+
+ .block {
+ width: 100%;
+ height: 100px;
+ background-color: green;
+ margin-bottom: 10px;
+ }
+
+ .fixed {
+ position: fixed;
+ top: 50px;
+ left: 50px;
+ width: 100px;
+ height: 100px;
+ background-color: yellow;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="container">
+ <div class="fixed"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ <div class="block"></div>
+ </div>
+ </body>
+</html>
diff --git a/third_party/webrender/webrender/tests/mix-blend-mode-2.html b/third_party/webrender/webrender/tests/mix-blend-mode-2.html
new file mode 100644
index 00000000000..8c7b028b420
--- /dev/null
+++ b/third_party/webrender/webrender/tests/mix-blend-mode-2.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ html, body {
+ margin: 0;
+ }
+ img {
+ display: block;
+ }
+ #container {
+ margin: 0;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ }
+ .rect {
+ position: absolute;
+ width: 25%;
+ height: 25%;
+ //background-image: url("color_pattern_1.png");
+ }
+ .overlay {
+ z-index: 1;
+ }
+ .inner {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ background-image: url("color_pattern_2.png");
+ }
+ </style>
+ </head>
+ <body>
+ <div id="container">
+ <img src="color_pattern_1.png" class="rect" style="left: 0%; top: 0%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 0%; top: 0%;" style="mix-blend-mode: normal;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 25%; top: 0%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 25%; top: 0%; mix-blend-mode: multiply;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 50%; top: 0%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 50%; top: 0%; mix-blend-mode: screen;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 75%; top: 0%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 75%; top: 0%; mix-blend-mode: overlay;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 0%; top: 25%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 0%; top: 25%; mix-blend-mode: darken;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 25%; top: 25%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 25%; top: 25%; mix-blend-mode: lighten;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 50%; top: 25%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 50%; top: 25%; mix-blend-mode: color-dodge;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 75%; top: 25%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 75%; top: 25%; mix-blend-mode: color-burn;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 0%; top: 50%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 0%; top: 50%; mix-blend-mode: hard-light;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 25%; top: 50%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 25%; top: 50%; mix-blend-mode: soft-light;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 50%; top: 50%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 50%; top: 50%; mix-blend-mode: difference;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 75%; top: 50%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 75%; top: 50%; mix-blend-mode: exclusion;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 0%; top: 75%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 0%; top: 75%; mix-blend-mode: hue;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 25%; top: 75%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 25%; top: 75%; mix-blend-mode: saturation;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 50%; top: 75%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 50%; top: 75%; mix-blend-mode: color;"/>
+
+ <img src="color_pattern_1.png" class="rect" style="left: 75%; top: 75%;"/>
+ <img src="color_pattern_2.png" class="rect" style="left: 75%; top: 75%; mix-blend-mode: luminosity;"/>
+ </div>
+ </body>
+</html>
diff --git a/third_party/webrender/webrender/tests/mix-blend-mode.html b/third_party/webrender/webrender/tests/mix-blend-mode.html
new file mode 100644
index 00000000000..565feb74fef
--- /dev/null
+++ b/third_party/webrender/webrender/tests/mix-blend-mode.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ #container {
+ position: absolute;
+ left: 100px;
+ top: 100px;
+ width: 467px;
+ height: 462px;
+ background-color: rgb(128, 128, 128);
+ }
+ .rect {
+ position: absolute;
+ mix-blend-mode: difference;
+ }
+ #pink {
+ left: 80px;
+ top: 60px;
+ width: 250px;
+ height: 250px;
+ background-color: rgb(128, 128, 0);
+ }
+ #blue {
+ left: 140px;
+ top: 120px;
+ width: 250px;
+ height: 250px;
+ background-color: rgb(0, 128, 128);
+ }
+ #turquoise {
+ left: 180px;
+ top: 180px;
+ width: 250px;
+ height: 250px;
+ background-color: rgb(128, 0, 128);
+ }
+ </style>
+ </head>
+ <body>
+ <div id="container">
+ <div id="pink" class="rect"></div>
+ <div id="blue" class="rect"></div>
+ <div id="turquoise" class="rect"></div>
+ </div>
+ </body>
+</html>
diff --git a/third_party/webrender/webrender/tests/nav-1.html b/third_party/webrender/webrender/tests/nav-1.html
new file mode 100644
index 00000000000..7c3e21bb804
--- /dev/null
+++ b/third_party/webrender/webrender/tests/nav-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>nav1</title>
+ <style type="text/css">
+ html {
+ background: rgb(100, 0, 0);
+ color: white;
+ }
+ </style>
+ </head>
+ <body>
+ <a href="nav-2.html">Goto nav2</a>
+ </body>
+</html>
diff --git a/third_party/webrender/webrender/tests/nav-2.html b/third_party/webrender/webrender/tests/nav-2.html
new file mode 100644
index 00000000000..f05399f329b
--- /dev/null
+++ b/third_party/webrender/webrender/tests/nav-2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>nav2</title>
+ <style type="text/css">
+ html {
+ background: rgb(0, 100, 0);
+ color: white;
+ }
+ </style>
+ </head>
+ <body>
+ <a href="nav-1.html">Goto nav1</a>
+ </body>
+</html>
diff --git a/third_party/webrender/webrender_api/Cargo.toml b/third_party/webrender/webrender_api/Cargo.toml
new file mode 100644
index 00000000000..1a48083a10b
--- /dev/null
+++ b/third_party/webrender/webrender_api/Cargo.toml
@@ -0,0 +1,32 @@
+[package]
+name = "webrender_api"
+version = "0.61.0"
+authors = ["Glenn Watson <gw@intuitionlibrary.com>"]
+license = "MPL-2.0"
+repository = "https://github.com/servo/webrender"
+description = "Public API for WebRender"
+edition = "2018"
+
+[features]
+nightly = ["euclid/unstable", "serde/unstable"]
+serialize = []
+deserialize = []
+display_list_stats = []
+
+[dependencies]
+app_units = "0.7"
+bitflags = "1.2"
+byteorder = "1.2.1"
+derive_more = "0.99"
+euclid = { version = "0.22.0", features = ["serde"] }
+malloc_size_of_derive = "0.1"
+serde = { version = "1.0", features = ["rc"] }
+serde_derive = "1.0"
+serde_bytes = "0.11"
+time = "0.1"
+malloc_size_of = { version = "0.0.1", path = "../wr_malloc_size_of", package = "wr_malloc_size_of" }
+peek-poke = { version = "0.2", path = "../peek-poke", features = ["extras"] }
+
+[target.'cfg(target_os = "macos")'.dependencies]
+core-foundation = "0.9"
+core-graphics = "0.22"
diff --git a/third_party/webrender/webrender_api/src/api.rs b/third_party/webrender/webrender_api/src/api.rs
new file mode 100644
index 00000000000..3e8a99e9215
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/api.rs
@@ -0,0 +1,2123 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#![deny(missing_docs)]
+
+extern crate serde_bytes;
+
+use peek_poke::PeekPoke;
+use std::cell::Cell;
+use std::fmt;
+use std::marker::PhantomData;
+use std::os::raw::c_void;
+use std::path::PathBuf;
+use std::sync::Arc;
+use std::u32;
+use std::sync::mpsc::{Sender, Receiver, channel};
+use time::precise_time_ns;
+// local imports
+use crate::{display_item as di, font};
+use crate::color::{ColorU, ColorF};
+use crate::display_list::BuiltDisplayList;
+use crate::font::SharedFontInstanceMap;
+use crate::image::{BlobImageData, BlobImageKey, ImageData, ImageDescriptor, ImageKey};
+use crate::image::{BlobImageParams, BlobImageRequest, BlobImageResult, AsyncBlobImageRasterizer, BlobImageHandler};
+use crate::image::DEFAULT_TILE_SIZE;
+use crate::resources::ApiResources;
+use crate::units::*;
+
+/// Width and height in device pixels of image tiles.
+pub type TileSize = u16;
+
+/// Documents are rendered in the ascending order of their associated layer values.
+pub type DocumentLayer = i8;
+
+/// Various settings that the caller can select based on desired tradeoffs
+/// between rendering quality and performance / power usage.
+#[derive(Copy, Clone, Deserialize, Serialize)]
+pub struct QualitySettings {
+ /// If true, disable creating separate picture cache slices when the
+ /// scroll root changes. This gives maximum opportunity to find an
+ /// opaque background, which enables subpixel AA. However, it is
+ /// usually significantly more expensive to render when scrolling.
+ pub force_subpixel_aa_where_possible: bool,
+}
+
+impl Default for QualitySettings {
+ fn default() -> Self {
+ QualitySettings {
+ // Prefer performance over maximum subpixel AA quality, since WR
+ // already enables subpixel AA in more situations than other browsers.
+ force_subpixel_aa_where_possible: false,
+ }
+ }
+}
+
+/// Update of a persistent resource in WebRender.
+///
+/// ResourceUpdate changes keep theirs effect across display list changes.
+#[derive(Clone, Deserialize, Serialize)]
+pub enum ResourceUpdate {
+ /// See `AddImage`.
+ AddImage(AddImage),
+ /// See `UpdateImage`.
+ UpdateImage(UpdateImage),
+ /// Delete an existing image resource.
+ ///
+ /// It is invalid to continue referring to the image key in any display list
+ /// in the transaction that contains the `DeleteImage` message and subsequent
+ /// transactions.
+ DeleteImage(ImageKey),
+ /// See `AddBlobImage`.
+ AddBlobImage(AddBlobImage),
+ /// See `UpdateBlobImage`.
+ UpdateBlobImage(UpdateBlobImage),
+ /// Delete existing blob image resource.
+ DeleteBlobImage(BlobImageKey),
+ /// See `AddBlobImage::visible_area`.
+ SetBlobImageVisibleArea(BlobImageKey, DeviceIntRect),
+ /// See `AddFont`.
+ AddFont(AddFont),
+ /// Deletes an already existing font resource.
+ ///
+ /// It is invalid to continue referring to the font key in any display list
+ /// in the transaction that contains the `DeleteImage` message and subsequent
+ /// transactions.
+ DeleteFont(font::FontKey),
+ /// See `AddFontInstance`.
+ AddFontInstance(AddFontInstance),
+ /// Deletes an already existing font instance resource.
+ ///
+ /// It is invalid to continue referring to the font instance in any display
+ /// list in the transaction that contains the `DeleteImage` message and
+ /// subsequent transactions.
+ DeleteFontInstance(font::FontInstanceKey),
+}
+
+impl fmt::Debug for ResourceUpdate {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ match self {
+ ResourceUpdate::AddImage(ref i) => f.write_fmt(format_args!(
+ "ResourceUpdate::AddImage size({:?})",
+ &i.descriptor.size
+ )),
+ ResourceUpdate::UpdateImage(ref i) => f.write_fmt(format_args!(
+ "ResourceUpdate::UpdateImage size({:?})",
+ &i.descriptor.size
+ )),
+ ResourceUpdate::AddBlobImage(ref i) => f.write_fmt(format_args!(
+ "ResourceUFpdate::AddBlobImage size({:?})",
+ &i.descriptor.size
+ )),
+ ResourceUpdate::UpdateBlobImage(i) => f.write_fmt(format_args!(
+ "ResourceUpdate::UpdateBlobImage size({:?})",
+ &i.descriptor.size
+ )),
+ ResourceUpdate::DeleteImage(..) => f.write_str("ResourceUpdate::DeleteImage"),
+ ResourceUpdate::DeleteBlobImage(..) => f.write_str("ResourceUpdate::DeleteBlobImage"),
+ ResourceUpdate::SetBlobImageVisibleArea(..) => f.write_str("ResourceUpdate::SetBlobImageVisibleArea"),
+ ResourceUpdate::AddFont(..) => f.write_str("ResourceUpdate::AddFont"),
+ ResourceUpdate::DeleteFont(..) => f.write_str("ResourceUpdate::DeleteFont"),
+ ResourceUpdate::AddFontInstance(..) => f.write_str("ResourceUpdate::AddFontInstance"),
+ ResourceUpdate::DeleteFontInstance(..) => f.write_str("ResourceUpdate::DeleteFontInstance"),
+ }
+ }
+}
+
+/// A Transaction is a group of commands to apply atomically to a document.
+///
+/// This mechanism ensures that:
+/// - no other message can be interleaved between two commands that need to be applied together.
+/// - no redundant work is performed if two commands in the same transaction cause the scene or
+/// the frame to be rebuilt.
+pub struct Transaction {
+ /// Operations affecting the scene (applied before scene building).
+ scene_ops: Vec<SceneMsg>,
+ /// Operations affecting the generation of frames (applied after scene building).
+ frame_ops: Vec<FrameMsg>,
+
+ notifications: Vec<NotificationRequest>,
+
+ /// Persistent resource updates to apply as part of this transaction.
+ pub resource_updates: Vec<ResourceUpdate>,
+
+ /// If true the transaction is piped through the scene building thread, if false
+ /// it will be applied directly on the render backend.
+ use_scene_builder_thread: bool,
+
+ generate_frame: bool,
+
+ /// Set to true in order to force re-rendering even if WebRender can't internally
+ /// detect that something has changed.
+ pub invalidate_rendered_frame: bool,
+
+ low_priority: bool,
+}
+
+impl Transaction {
+ /// Constructor.
+ pub fn new() -> Self {
+ Transaction {
+ scene_ops: Vec::new(),
+ frame_ops: Vec::new(),
+ resource_updates: Vec::new(),
+ notifications: Vec::new(),
+ use_scene_builder_thread: true,
+ generate_frame: false,
+ invalidate_rendered_frame: false,
+ low_priority: false,
+ }
+ }
+
+ /// Marks this transaction to allow it to skip going through the scene builder
+ /// thread.
+ ///
+ /// This is useful to avoid jank in transaction associated with animated
+ /// property updates, panning and zooming.
+ ///
+ /// Note that transactions that skip the scene builder thread can race ahead of
+ /// transactions that don't skip it.
+ pub fn skip_scene_builder(&mut self) {
+ self.use_scene_builder_thread = false;
+ }
+
+ /// Marks this transaction to enforce going through the scene builder thread.
+ pub fn use_scene_builder_thread(&mut self) {
+ self.use_scene_builder_thread = true;
+ }
+
+ /// Returns true if the transaction has no effect.
+ pub fn is_empty(&self) -> bool {
+ !self.generate_frame &&
+ !self.invalidate_rendered_frame &&
+ self.scene_ops.is_empty() &&
+ self.frame_ops.is_empty() &&
+ self.resource_updates.is_empty() &&
+ self.notifications.is_empty()
+ }
+
+ /// Update a pipeline's epoch.
+ pub fn update_epoch(&mut self, pipeline_id: PipelineId, epoch: Epoch) {
+ // We track epochs before and after scene building.
+ // This one will be applied to the pending scene right away:
+ self.scene_ops.push(SceneMsg::UpdateEpoch(pipeline_id, epoch));
+ // And this one will be applied to the currently built scene at the end
+ // of the transaction (potentially long after the scene_ops one).
+ self.frame_ops.push(FrameMsg::UpdateEpoch(pipeline_id, epoch));
+ // We could avoid the duplication here by storing the epoch updates in a
+ // separate array and let the render backend schedule the updates at the
+ // proper times, but it wouldn't make things simpler.
+ }
+
+ /// Sets the root pipeline.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// # use webrender_api::{PipelineId, RenderApiSender, Transaction};
+ /// # use webrender_api::units::{DeviceIntSize};
+ /// # fn example() {
+ /// let pipeline_id = PipelineId(0, 0);
+ /// let mut txn = Transaction::new();
+ /// txn.set_root_pipeline(pipeline_id);
+ /// # }
+ /// ```
+ pub fn set_root_pipeline(&mut self, pipeline_id: PipelineId) {
+ self.scene_ops.push(SceneMsg::SetRootPipeline(pipeline_id));
+ }
+
+ /// Removes data associated with a pipeline from the internal data structures.
+ /// If the specified `pipeline_id` is for the root pipeline, the root pipeline
+ /// is reset back to `None`.
+ pub fn remove_pipeline(&mut self, pipeline_id: PipelineId) {
+ self.scene_ops.push(SceneMsg::RemovePipeline(pipeline_id));
+ }
+
+ /// Supplies a new frame to WebRender.
+ ///
+ /// Non-blocking, it notifies a worker process which processes the display list.
+ ///
+ /// Note: Scrolling doesn't require an own Frame.
+ ///
+ /// Arguments:
+ ///
+ /// * `epoch`: The unique Frame ID, monotonically increasing.
+ /// * `background`: The background color of this pipeline.
+ /// * `viewport_size`: The size of the viewport for this frame.
+ /// * `pipeline_id`: The ID of the pipeline that is supplying this display list.
+ /// * `content_size`: The total screen space size of this display list's display items.
+ /// * `display_list`: The root Display list used in this frame.
+ /// * `preserve_frame_state`: If a previous frame exists which matches this pipeline
+ /// id, this setting determines if frame state (such as scrolling
+ /// position) should be preserved for this new display list.
+ pub fn set_display_list(
+ &mut self,
+ epoch: Epoch,
+ background: Option<ColorF>,
+ viewport_size: LayoutSize,
+ (pipeline_id, content_size, mut display_list): (PipelineId, LayoutSize, BuiltDisplayList),
+ preserve_frame_state: bool,
+ ) {
+ display_list.set_send_time_ns(precise_time_ns());
+ self.scene_ops.push(
+ SceneMsg::SetDisplayList {
+ display_list,
+ epoch,
+ pipeline_id,
+ background,
+ viewport_size,
+ content_size,
+ preserve_frame_state,
+ }
+ );
+ }
+
+ /// Add a set of persistent resource updates to apply as part of this transaction.
+ pub fn update_resources(&mut self, mut resources: Vec<ResourceUpdate>) {
+ self.resource_updates.append(&mut resources);
+ }
+
+ // Note: Gecko uses this to get notified when a transaction that contains
+ // potentially long blob rasterization or scene build is ready to be rendered.
+ // so that the tab-switching integration can react adequately when tab
+ // switching takes too long. For this use case when matters is that the
+ // notification doesn't fire before scene building and blob rasterization.
+
+ /// Trigger a notification at a certain stage of the rendering pipeline.
+ ///
+ /// Not that notification requests are skipped during serialization, so is is
+ /// best to use them for synchronization purposes and not for things that could
+ /// affect the WebRender's state.
+ pub fn notify(&mut self, event: NotificationRequest) {
+ self.notifications.push(event);
+ }
+
+ /// Setup the output region in the framebuffer for a given document.
+ pub fn set_document_view(
+ &mut self,
+ device_rect: DeviceIntRect,
+ device_pixel_ratio: f32,
+ ) {
+ self.scene_ops.push(
+ SceneMsg::SetDocumentView {
+ device_rect,
+ device_pixel_ratio,
+ },
+ );
+ }
+
+ /// Enable copying of the output of this pipeline id to
+ /// an external texture for callers to consume.
+ pub fn enable_frame_output(&mut self, pipeline_id: PipelineId, enable: bool) {
+ self.scene_ops.push(SceneMsg::EnableFrameOutput(pipeline_id, enable));
+ }
+
+ /// Scrolls the scrolling layer under the `cursor`
+ ///
+ /// WebRender looks for the layer closest to the user
+ /// which has `ScrollPolicy::Scrollable` set.
+ pub fn scroll(&mut self, scroll_location: ScrollLocation, cursor: WorldPoint) {
+ self.frame_ops.push(FrameMsg::Scroll(scroll_location, cursor));
+ }
+
+ ///
+ pub fn scroll_node_with_id(
+ &mut self,
+ origin: LayoutPoint,
+ id: di::ExternalScrollId,
+ clamp: ScrollClamping,
+ ) {
+ self.frame_ops.push(FrameMsg::ScrollNodeWithId(origin, id, clamp));
+ }
+
+ /// Set the current quality / performance settings for this document.
+ pub fn set_quality_settings(&mut self, settings: QualitySettings) {
+ self.scene_ops.push(SceneMsg::SetQualitySettings { settings });
+ }
+
+ ///
+ pub fn set_page_zoom(&mut self, page_zoom: ZoomFactor) {
+ self.scene_ops.push(SceneMsg::SetPageZoom(page_zoom));
+ }
+
+ ///
+ pub fn set_pinch_zoom(&mut self, pinch_zoom: ZoomFactor) {
+ self.frame_ops.push(FrameMsg::SetPinchZoom(pinch_zoom));
+ }
+
+ ///
+ pub fn set_is_transform_async_zooming(&mut self, is_zooming: bool, animation_id: PropertyBindingId) {
+ self.frame_ops.push(FrameMsg::SetIsTransformAsyncZooming(is_zooming, animation_id));
+ }
+
+ ///
+ pub fn set_pan(&mut self, pan: DeviceIntPoint) {
+ self.frame_ops.push(FrameMsg::SetPan(pan));
+ }
+
+ /// Generate a new frame. When it's done and a RenderNotifier has been set
+ /// in `webrender::Renderer`, [new_frame_ready()][notifier] gets called.
+ /// Note that the notifier is called even if the frame generation was a
+ /// no-op; the arguments passed to `new_frame_ready` will provide information
+ /// as to when happened.
+ ///
+ /// [notifier]: trait.RenderNotifier.html#tymethod.new_frame_ready
+ pub fn generate_frame(&mut self) {
+ self.generate_frame = true;
+ }
+
+ /// Invalidate rendered frame. It ensure that frame will be rendered during
+ /// next frame generation. WebRender could skip frame rendering if there
+ /// is no update.
+ /// But there are cases that needs to force rendering.
+ /// - Content of image is updated by reusing same ExternalImageId.
+ /// - Platform requests it if pixels become stale (like wakeup from standby).
+ pub fn invalidate_rendered_frame(&mut self) {
+ self.invalidate_rendered_frame = true;
+ }
+
+ /// Supply a list of animated property bindings that should be used to resolve
+ /// bindings in the current display list.
+ pub fn update_dynamic_properties(&mut self, properties: DynamicProperties) {
+ self.frame_ops.push(FrameMsg::UpdateDynamicProperties(properties));
+ }
+
+ /// Add to the list of animated property bindings that should be used to
+ /// resolve bindings in the current display list. This is a convenience method
+ /// so the caller doesn't have to figure out all the dynamic properties before
+ /// setting them on the transaction but can do them incrementally.
+ pub fn append_dynamic_transform_properties(&mut self, transforms: Vec<PropertyValue<LayoutTransform>>) {
+ self.frame_ops.push(FrameMsg::AppendDynamicTransformProperties(transforms));
+ }
+
+ /// Consumes this object and just returns the frame ops.
+ pub fn get_frame_ops(self) -> Vec<FrameMsg> {
+ self.frame_ops
+ }
+
+ fn finalize(self, document_id: DocumentId) -> Box<TransactionMsg> {
+ Box::new(TransactionMsg {
+ document_id,
+ scene_ops: self.scene_ops,
+ frame_ops: self.frame_ops,
+ resource_updates: self.resource_updates,
+ notifications: self.notifications,
+ use_scene_builder_thread: self.use_scene_builder_thread,
+ generate_frame: self.generate_frame,
+ invalidate_rendered_frame: self.invalidate_rendered_frame,
+ low_priority: self.low_priority,
+ blob_rasterizer: None,
+ blob_requests: Vec::new(),
+ rasterized_blobs: Vec::new(),
+ })
+ }
+
+ /// See `ResourceUpdate::AddImage`.
+ pub fn add_image(
+ &mut self,
+ key: ImageKey,
+ descriptor: ImageDescriptor,
+ data: ImageData,
+ tiling: Option<TileSize>,
+ ) {
+ self.resource_updates.push(ResourceUpdate::AddImage(AddImage {
+ key,
+ descriptor,
+ data,
+ tiling,
+ }));
+ }
+
+ /// See `ResourceUpdate::UpdateImage`.
+ pub fn update_image(
+ &mut self,
+ key: ImageKey,
+ descriptor: ImageDescriptor,
+ data: ImageData,
+ dirty_rect: &ImageDirtyRect,
+ ) {
+ self.resource_updates.push(ResourceUpdate::UpdateImage(UpdateImage {
+ key,
+ descriptor,
+ data,
+ dirty_rect: *dirty_rect,
+ }));
+ }
+
+ /// See `ResourceUpdate::DeleteImage`.
+ pub fn delete_image(&mut self, key: ImageKey) {
+ self.resource_updates.push(ResourceUpdate::DeleteImage(key));
+ }
+
+ /// See `ResourceUpdate::AddBlobImage`.
+ pub fn add_blob_image(
+ &mut self,
+ key: BlobImageKey,
+ descriptor: ImageDescriptor,
+ data: Arc<BlobImageData>,
+ visible_rect: DeviceIntRect,
+ tile_size: Option<TileSize>,
+ ) {
+ self.resource_updates.push(
+ ResourceUpdate::AddBlobImage(AddBlobImage {
+ key,
+ descriptor,
+ data,
+ visible_rect,
+ tile_size: tile_size.unwrap_or(DEFAULT_TILE_SIZE),
+ })
+ );
+ }
+
+ /// See `ResourceUpdate::UpdateBlobImage`.
+ pub fn update_blob_image(
+ &mut self,
+ key: BlobImageKey,
+ descriptor: ImageDescriptor,
+ data: Arc<BlobImageData>,
+ visible_rect: DeviceIntRect,
+ dirty_rect: &BlobDirtyRect,
+ ) {
+ self.resource_updates.push(
+ ResourceUpdate::UpdateBlobImage(UpdateBlobImage {
+ key,
+ descriptor,
+ data,
+ visible_rect,
+ dirty_rect: *dirty_rect,
+ })
+ );
+ }
+
+ /// See `ResourceUpdate::DeleteBlobImage`.
+ pub fn delete_blob_image(&mut self, key: BlobImageKey) {
+ self.resource_updates.push(ResourceUpdate::DeleteBlobImage(key));
+ }
+
+ /// See `ResourceUpdate::SetBlobImageVisibleArea`.
+ pub fn set_blob_image_visible_area(&mut self, key: BlobImageKey, area: DeviceIntRect) {
+ self.resource_updates.push(ResourceUpdate::SetBlobImageVisibleArea(key, area))
+ }
+
+ /// See `ResourceUpdate::AddFont`.
+ pub fn add_raw_font(&mut self, key: font::FontKey, bytes: Vec<u8>, index: u32) {
+ self.resource_updates
+ .push(ResourceUpdate::AddFont(AddFont::Raw(key, Arc::new(bytes), index)));
+ }
+
+ /// See `ResourceUpdate::AddFont`.
+ pub fn add_native_font(&mut self, key: font::FontKey, native_handle: font::NativeFontHandle) {
+ self.resource_updates
+ .push(ResourceUpdate::AddFont(AddFont::Native(key, native_handle)));
+ }
+
+ /// See `ResourceUpdate::DeleteFont`.
+ pub fn delete_font(&mut self, key: font::FontKey) {
+ self.resource_updates.push(ResourceUpdate::DeleteFont(key));
+ }
+
+ /// See `ResourceUpdate::AddFontInstance`.
+ pub fn add_font_instance(
+ &mut self,
+ key: font::FontInstanceKey,
+ font_key: font::FontKey,
+ glyph_size: f32,
+ options: Option<font::FontInstanceOptions>,
+ platform_options: Option<font::FontInstancePlatformOptions>,
+ variations: Vec<font::FontVariation>,
+ ) {
+ self.resource_updates
+ .push(ResourceUpdate::AddFontInstance(AddFontInstance {
+ key,
+ font_key,
+ glyph_size,
+ options,
+ platform_options,
+ variations,
+ }));
+ }
+
+ /// See `ResourceUpdate::DeleteFontInstance`.
+ pub fn delete_font_instance(&mut self, key: font::FontInstanceKey) {
+ self.resource_updates.push(ResourceUpdate::DeleteFontInstance(key));
+ }
+
+ /// A hint that this transaction can be processed at a lower priority. High-
+ /// priority transactions can jump ahead of regular-priority transactions,
+ /// but both high- and regular-priority transactions are processed in order
+ /// relative to other transactions of the same priority.
+ pub fn set_low_priority(&mut self, low_priority: bool) {
+ self.low_priority = low_priority;
+ }
+
+ /// Returns whether this transaction is marked as low priority.
+ pub fn is_low_priority(&self) -> bool {
+ self.low_priority
+ }
+}
+
+///
+pub struct DocumentTransaction {
+ ///
+ pub document_id: DocumentId,
+ ///
+ pub transaction: Transaction,
+}
+
+/// Represents a transaction in the format sent through the channel.
+pub struct TransactionMsg {
+ ///
+ pub document_id: DocumentId,
+ /// Changes that require re-building the scene.
+ pub scene_ops: Vec<SceneMsg>,
+ /// Changes to animated properties that do not require re-building the scene.
+ pub frame_ops: Vec<FrameMsg>,
+ /// Updates to resources that persist across display lists.
+ pub resource_updates: Vec<ResourceUpdate>,
+ /// Whether to trigger frame building and rendering if something has changed.
+ pub generate_frame: bool,
+ /// Whether to force frame building and rendering even if no changes are internally
+ /// observed.
+ pub invalidate_rendered_frame: bool,
+ /// Whether to enforce that this transaction go through the scene builder.
+ pub use_scene_builder_thread: bool,
+ ///
+ pub low_priority: bool,
+
+ /// Handlers to notify at certain points of the pipeline.
+ pub notifications: Vec<NotificationRequest>,
+ ///
+ pub blob_rasterizer: Option<Box<dyn AsyncBlobImageRasterizer>>,
+ ///
+ pub blob_requests: Vec<BlobImageParams>,
+ ///
+ pub rasterized_blobs: Vec<(BlobImageRequest, BlobImageResult)>,
+}
+
+impl fmt::Debug for TransactionMsg {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ writeln!(f, "threaded={}, genframe={}, invalidate={}, low_priority={}",
+ self.use_scene_builder_thread,
+ self.generate_frame,
+ self.invalidate_rendered_frame,
+ self.low_priority,
+ ).unwrap();
+ for scene_op in &self.scene_ops {
+ writeln!(f, "\t\t{:?}", scene_op).unwrap();
+ }
+
+ for frame_op in &self.frame_ops {
+ writeln!(f, "\t\t{:?}", frame_op).unwrap();
+ }
+
+ for resource_update in &self.resource_updates {
+ writeln!(f, "\t\t{:?}", resource_update).unwrap();
+ }
+ Ok(())
+ }
+}
+
+impl TransactionMsg {
+ /// Returns true if this transaction has no effect.
+ pub fn is_empty(&self) -> bool {
+ !self.generate_frame &&
+ !self.invalidate_rendered_frame &&
+ self.scene_ops.is_empty() &&
+ self.frame_ops.is_empty() &&
+ self.resource_updates.is_empty() &&
+ self.notifications.is_empty()
+ }
+}
+
+/// Creates an image resource with provided parameters.
+///
+/// Must be matched with a `DeleteImage` at some point to prevent memory leaks.
+#[derive(Clone, Deserialize, Serialize)]
+pub struct AddImage {
+ /// A key to identify the image resource.
+ pub key: ImageKey,
+ /// Properties of the image.
+ pub descriptor: ImageDescriptor,
+ /// The pixels of the image.
+ pub data: ImageData,
+ /// An optional tiling scheme to apply when storing the image's data
+ /// on the GPU. Applies to both width and heights of the tiles.
+ ///
+ /// Note that WebRender may internally chose to tile large images
+ /// even if this member is set to `None`.
+ pub tiling: Option<TileSize>,
+}
+
+/// Updates an already existing image resource.
+#[derive(Clone, Deserialize, Serialize)]
+pub struct UpdateImage {
+ /// The key identfying the image resource to update.
+ pub key: ImageKey,
+ /// Properties of the image.
+ pub descriptor: ImageDescriptor,
+ /// The pixels of the image.
+ pub data: ImageData,
+ /// An optional dirty rect that lets WebRender optimize the amount of
+ /// data to transfer to the GPU.
+ ///
+ /// The data provided must still represent the entire image.
+ pub dirty_rect: ImageDirtyRect,
+}
+
+/// Creates a blob-image resource with provided parameters.
+///
+/// Must be matched with a `DeleteImage` at some point to prevent memory leaks.
+#[derive(Clone, Deserialize, Serialize)]
+pub struct AddBlobImage {
+ /// A key to identify the blob-image resource.
+ pub key: BlobImageKey,
+ /// Properties of the image.
+ pub descriptor: ImageDescriptor,
+ /// The blob-image's serialized commands.
+ pub data: Arc<BlobImageData>,
+ /// The portion of the plane in the blob-image's internal coordinate
+ /// system that is stretched to fill the image display item.
+ ///
+ /// Unlike regular images, blob images are not limited in size. The
+ /// top-left corner of their internal coordinate system is also not
+ /// necessary at (0, 0).
+ /// This means that blob images can be updated to insert/remove content
+ /// in any direction to support panning and zooming.
+ pub visible_rect: DeviceIntRect,
+ /// The blob image's tile size to apply when rasterizing the blob-image
+ /// and when storing its rasterized data on the GPU.
+ /// Applies to both width and heights of the tiles.
+ ///
+ /// All blob images are tiled.
+ pub tile_size: TileSize,
+}
+
+/// Updates an already existing blob-image resource.
+#[derive(Clone, Deserialize, Serialize)]
+pub struct UpdateBlobImage {
+ /// The key identfying the blob-image resource to update.
+ pub key: BlobImageKey,
+ /// Properties of the image.
+ pub descriptor: ImageDescriptor,
+ /// The blob-image's serialized commands.
+ pub data: Arc<BlobImageData>,
+ /// See `AddBlobImage::visible_rect`.
+ pub visible_rect: DeviceIntRect,
+ /// An optional dirty rect that lets WebRender optimize the amount of
+ /// data to to rasterize and transfer to the GPU.
+ pub dirty_rect: BlobDirtyRect,
+}
+
+/// Creates a font resource.
+///
+/// Must be matched with a corresponding `ResourceUpdate::DeleteFont` at some point to prevent
+/// memory leaks.
+#[derive(Clone, Deserialize, Serialize)]
+pub enum AddFont {
+ ///
+ Raw(font::FontKey, Arc<Vec<u8>>, u32),
+ ///
+ Native(font::FontKey, font::NativeFontHandle),
+}
+
+/// Describe an item that matched a hit-test query.
+#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
+pub struct HitTestItem {
+ /// The pipeline that the display item that was hit belongs to.
+ pub pipeline: PipelineId,
+
+ /// The tag of the hit display item.
+ pub tag: di::ItemTag,
+
+ /// The hit point in the coordinate space of the "viewport" of the display item. The
+ /// viewport is the scroll node formed by the root reference frame of the display item's
+ /// pipeline.
+ pub point_in_viewport: LayoutPoint,
+
+ /// The coordinates of the original hit test point relative to the origin of this item.
+ /// This is useful for calculating things like text offsets in the client.
+ pub point_relative_to_item: LayoutPoint,
+}
+
+/// Returned by `RenderApi::hit_test`.
+#[derive(Clone, Debug, Default, Deserialize, Serialize)]
+pub struct HitTestResult {
+ /// List of items that are match the hit-test query.
+ pub items: Vec<HitTestItem>,
+}
+
+bitflags! {
+ #[derive(Deserialize, MallocSizeOf, Serialize)]
+ ///
+ pub struct HitTestFlags: u8 {
+ ///
+ const FIND_ALL = 0b00000001;
+ ///
+ const POINT_RELATIVE_TO_PIPELINE_VIEWPORT = 0b00000010;
+ }
+}
+
+/// Creates a font instance resource.
+///
+/// Must be matched with a corresponding `DeleteFontInstance` at some point
+/// to prevent memory leaks.
+#[derive(Clone, Deserialize, Serialize)]
+pub struct AddFontInstance {
+ /// A key to identify the font instance.
+ pub key: font::FontInstanceKey,
+ /// The font resource's key.
+ pub font_key: font::FontKey,
+ /// Glyph size in app units.
+ pub glyph_size: f32,
+ ///
+ pub options: Option<font::FontInstanceOptions>,
+ ///
+ pub platform_options: Option<font::FontInstancePlatformOptions>,
+ ///
+ pub variations: Vec<font::FontVariation>,
+}
+
+/// Frame messages affect building the scene.
+pub enum SceneMsg {
+ ///
+ UpdateEpoch(PipelineId, Epoch),
+ ///
+ SetPageZoom(ZoomFactor),
+ ///
+ SetRootPipeline(PipelineId),
+ ///
+ RemovePipeline(PipelineId),
+ ///
+ EnableFrameOutput(PipelineId, bool),
+ ///
+ SetDisplayList {
+ ///
+ display_list: BuiltDisplayList,
+ ///
+ epoch: Epoch,
+ ///
+ pipeline_id: PipelineId,
+ ///
+ background: Option<ColorF>,
+ ///
+ viewport_size: LayoutSize,
+ ///
+ content_size: LayoutSize,
+ ///
+ preserve_frame_state: bool,
+ },
+ ///
+ SetDocumentView {
+ ///
+ device_rect: DeviceIntRect,
+ ///
+ device_pixel_ratio: f32,
+ },
+ /// Set the current quality / performance configuration for this document.
+ SetQualitySettings {
+ /// The set of available quality / performance config values.
+ settings: QualitySettings,
+ },
+}
+
+/// Frame messages affect frame generation (applied after building the scene).
+pub enum FrameMsg {
+ ///
+ UpdateEpoch(PipelineId, Epoch),
+ ///
+ HitTest(Option<PipelineId>, WorldPoint, HitTestFlags, Sender<HitTestResult>),
+ ///
+ RequestHitTester(Sender<Arc<dyn ApiHitTester>>),
+ ///
+ SetPan(DeviceIntPoint),
+ ///
+ Scroll(ScrollLocation, WorldPoint),
+ ///
+ ScrollNodeWithId(LayoutPoint, di::ExternalScrollId, ScrollClamping),
+ ///
+ GetScrollNodeState(Sender<Vec<ScrollNodeState>>),
+ ///
+ UpdateDynamicProperties(DynamicProperties),
+ ///
+ AppendDynamicTransformProperties(Vec<PropertyValue<LayoutTransform>>),
+ ///
+ SetPinchZoom(ZoomFactor),
+ ///
+ SetIsTransformAsyncZooming(bool, PropertyBindingId),
+}
+
+impl fmt::Debug for SceneMsg {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ f.write_str(match *self {
+ SceneMsg::UpdateEpoch(..) => "SceneMsg::UpdateEpoch",
+ SceneMsg::SetDisplayList { .. } => "SceneMsg::SetDisplayList",
+ SceneMsg::SetPageZoom(..) => "SceneMsg::SetPageZoom",
+ SceneMsg::RemovePipeline(..) => "SceneMsg::RemovePipeline",
+ SceneMsg::EnableFrameOutput(..) => "SceneMsg::EnableFrameOutput",
+ SceneMsg::SetDocumentView { .. } => "SceneMsg::SetDocumentView",
+ SceneMsg::SetRootPipeline(..) => "SceneMsg::SetRootPipeline",
+ SceneMsg::SetQualitySettings { .. } => "SceneMsg::SetQualitySettings",
+ })
+ }
+}
+
+impl fmt::Debug for FrameMsg {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ f.write_str(match *self {
+ FrameMsg::UpdateEpoch(..) => "FrameMsg::UpdateEpoch",
+ FrameMsg::HitTest(..) => "FrameMsg::HitTest",
+ FrameMsg::RequestHitTester(..) => "FrameMsg::RequestHitTester",
+ FrameMsg::SetPan(..) => "FrameMsg::SetPan",
+ FrameMsg::Scroll(..) => "FrameMsg::Scroll",
+ FrameMsg::ScrollNodeWithId(..) => "FrameMsg::ScrollNodeWithId",
+ FrameMsg::GetScrollNodeState(..) => "FrameMsg::GetScrollNodeState",
+ FrameMsg::UpdateDynamicProperties(..) => "FrameMsg::UpdateDynamicProperties",
+ FrameMsg::AppendDynamicTransformProperties(..) => "FrameMsg::AppendDynamicTransformProperties",
+ FrameMsg::SetPinchZoom(..) => "FrameMsg::SetPinchZoom",
+ FrameMsg::SetIsTransformAsyncZooming(..) => "FrameMsg::SetIsTransformAsyncZooming",
+ })
+ }
+}
+
+bitflags!{
+ /// Bit flags for WR stages to store in a capture.
+ // Note: capturing `FRAME` without `SCENE` is not currently supported.
+ pub struct CaptureBits: u8 {
+ ///
+ const SCENE = 0x1;
+ ///
+ const FRAME = 0x2;
+ ///
+ const TILE_CACHE = 0x4;
+ ///
+ const EXTERNAL_RESOURCES = 0x8;
+ }
+}
+
+bitflags!{
+ /// Mask for clearing caches in debug commands.
+ pub struct ClearCache: u8 {
+ ///
+ const IMAGES = 0b1;
+ ///
+ const GLYPHS = 0b01;
+ ///
+ const GLYPH_DIMENSIONS = 0b001;
+ ///
+ const RENDER_TASKS = 0b0001;
+ ///
+ const TEXTURE_CACHE = 0b00001;
+ }
+}
+
+/// Information about a loaded capture of each document
+/// that is returned by `RenderBackend`.
+#[derive(Clone, Debug)]
+pub struct CapturedDocument {
+ ///
+ pub document_id: DocumentId,
+ ///
+ pub root_pipeline_id: Option<PipelineId>,
+}
+
+/// Update of the state of built-in debugging facilities.
+#[derive(Clone)]
+pub enum DebugCommand {
+ /// Sets the provided debug flags.
+ SetFlags(DebugFlags),
+ /// Configure if dual-source blending is used, if available.
+ EnableDualSourceBlending(bool),
+ /// Fetch current documents and display lists.
+ FetchDocuments,
+ /// Fetch current passes and batches.
+ FetchPasses,
+ // TODO: This should be called FetchClipScrollTree. However, that requires making
+ // changes to webrender's web debugger ui, touching a 4Mb minified file that
+ // is too big to submit through the conventional means.
+ /// Fetch the spatial tree.
+ FetchClipScrollTree,
+ /// Fetch render tasks.
+ FetchRenderTasks,
+ /// Fetch screenshot.
+ FetchScreenshot,
+ /// Save a capture of all the documents state.
+ SaveCapture(PathBuf, CaptureBits),
+ /// Load a capture of all the documents state.
+ LoadCapture(PathBuf, Option<(u32, u32)>, Sender<CapturedDocument>),
+ /// Start capturing a sequence of scene/frame changes.
+ StartCaptureSequence(PathBuf, CaptureBits),
+ /// Stop capturing a sequence of scene/frame changes.
+ StopCaptureSequence,
+ /// Clear cached resources, forcing them to be re-uploaded from templates.
+ ClearCaches(ClearCache),
+ /// Enable/disable native compositor usage
+ EnableNativeCompositor(bool),
+ /// Enable/disable parallel job execution with rayon.
+ EnableMultithreading(bool),
+ /// Sets the maximum amount of existing batches to visit before creating a new one.
+ SetBatchingLookback(u32),
+ /// Invalidate GPU cache, forcing the update from the CPU mirror.
+ InvalidateGpuCache,
+ /// Causes the scene builder to pause for a given amount of milliseconds each time it
+ /// processes a transaction.
+ SimulateLongSceneBuild(u32),
+ /// Causes the low priority scene builder to pause for a given amount of milliseconds
+ /// each time it processes a transaction.
+ SimulateLongLowPrioritySceneBuild(u32),
+ /// Set an override tile size to use for picture caches
+ SetPictureTileSize(Option<DeviceIntSize>),
+}
+
+/// Message sent by the `RenderApi` to the render backend thread.
+pub enum ApiMsg {
+ /// Gets the glyph dimensions
+ GetGlyphDimensions(font::GlyphDimensionRequest),
+ /// Gets the glyph indices from a string
+ GetGlyphIndices(font::GlyphIndexRequest),
+ /// Adds a new document namespace.
+ CloneApi(Sender<IdNamespace>),
+ /// Adds a new document namespace.
+ CloneApiByClient(IdNamespace),
+ /// Adds a new document with given initial size.
+ AddDocument(DocumentId, DeviceIntSize, DocumentLayer),
+ /// A message targeted at a particular document.
+ UpdateDocuments(Vec<Box<TransactionMsg>>),
+ /// Deletes an existing document.
+ DeleteDocument(DocumentId),
+ /// An opaque handle that must be passed to the render notifier. It is used by Gecko
+ /// to forward gecko-specific messages to the render thread preserving the ordering
+ /// within the other messages.
+ ExternalEvent(ExternalEvent),
+ /// Removes all resources associated with a namespace.
+ ClearNamespace(IdNamespace),
+ /// Flush from the caches anything that isn't necessary, to free some memory.
+ MemoryPressure,
+ /// Collects a memory report.
+ ReportMemory(Sender<Box<MemoryReport>>),
+ /// Change debugging options.
+ DebugCommand(DebugCommand),
+ /// Wakes the render backend's event loop up. Needed when an event is communicated
+ /// through another channel.
+ WakeUp,
+ /// See `RenderApi::wake_scene_builder`.
+ WakeSceneBuilder,
+ /// Block until a round-trip to the scene builder thread has completed. This
+ /// ensures that any transactions (including ones deferred to the scene
+ /// builder thread) have been processed.
+ FlushSceneBuilder(Sender<()>),
+ /// Shut the WebRender instance down.
+ ShutDown(Option<Sender<()>>),
+}
+
+impl fmt::Debug for ApiMsg {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ f.write_str(match *self {
+ ApiMsg::GetGlyphDimensions(..) => "ApiMsg::GetGlyphDimensions",
+ ApiMsg::GetGlyphIndices(..) => "ApiMsg::GetGlyphIndices",
+ ApiMsg::CloneApi(..) => "ApiMsg::CloneApi",
+ ApiMsg::CloneApiByClient(..) => "ApiMsg::CloneApiByClient",
+ ApiMsg::AddDocument(..) => "ApiMsg::AddDocument",
+ ApiMsg::UpdateDocuments(..) => "ApiMsg::UpdateDocuments",
+ ApiMsg::DeleteDocument(..) => "ApiMsg::DeleteDocument",
+ ApiMsg::ExternalEvent(..) => "ApiMsg::ExternalEvent",
+ ApiMsg::ClearNamespace(..) => "ApiMsg::ClearNamespace",
+ ApiMsg::MemoryPressure => "ApiMsg::MemoryPressure",
+ ApiMsg::ReportMemory(..) => "ApiMsg::ReportMemory",
+ ApiMsg::DebugCommand(..) => "ApiMsg::DebugCommand",
+ ApiMsg::ShutDown(..) => "ApiMsg::ShutDown",
+ ApiMsg::WakeUp => "ApiMsg::WakeUp",
+ ApiMsg::WakeSceneBuilder => "ApiMsg::WakeSceneBuilder",
+ ApiMsg::FlushSceneBuilder(..) => "ApiMsg::FlushSceneBuilder",
+ })
+ }
+}
+
+/// An epoch identifies the state of a pipeline in time.
+///
+/// This is mostly used as a synchronization mechanism to observe how/when particular pipeline
+/// updates propagate through WebRender and are applied at various stages.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
+pub struct Epoch(pub u32);
+
+impl Epoch {
+ /// Magic invalid epoch value.
+ pub fn invalid() -> Epoch {
+ Epoch(u32::MAX)
+ }
+}
+
+/// ID namespaces uniquely identify different users of WebRender's API.
+///
+/// For example in Gecko each content process uses a separate id namespace.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Eq, MallocSizeOf, PartialEq, Hash, Ord, PartialOrd, PeekPoke)]
+#[derive(Deserialize, Serialize)]
+pub struct IdNamespace(pub u32);
+
+/// A key uniquely identifying a WebRender document.
+///
+/// Instances can manage one or several documents (using the same render backend thread).
+/// Each document will internally correspond to a single scene, and scenes are made of
+/// one or several pipelines.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub struct DocumentId {
+ ///
+ pub namespace_id: IdNamespace,
+ ///
+ pub id: u32,
+}
+
+impl DocumentId {
+ ///
+ pub fn new(namespace_id: IdNamespace, id: u32) -> Self {
+ DocumentId {
+ namespace_id,
+ id,
+ }
+ }
+
+ ///
+ pub const INVALID: DocumentId = DocumentId { namespace_id: IdNamespace(0), id: 0 };
+}
+
+/// This type carries no valuable semantics for WR. However, it reflects the fact that
+/// clients (Servo) may generate pipelines by different semi-independent sources.
+/// These pipelines still belong to the same `IdNamespace` and the same `DocumentId`.
+/// Having this extra Id field enables them to generate `PipelineId` without collision.
+pub type PipelineSourceId = u32;
+
+/// From the point of view of WR, `PipelineId` is completely opaque and generic as long as
+/// it's clonable, serializable, comparable, and hashable.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub struct PipelineId(pub PipelineSourceId, pub u32);
+
+impl Default for PipelineId {
+ fn default() -> Self {
+ PipelineId::dummy()
+ }
+}
+
+impl PipelineId {
+ ///
+ pub fn dummy() -> Self {
+ PipelineId(0, 0)
+ }
+}
+
+///
+#[derive(Copy, Clone, Debug, MallocSizeOf, Serialize, Deserialize)]
+pub enum ClipIntern {}
+
+///
+#[derive(Copy, Clone, Debug, MallocSizeOf, Serialize, Deserialize)]
+pub enum FilterDataIntern {}
+
+/// Information specific to a primitive type that
+/// uniquely identifies a primitive template by key.
+#[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash, Serialize, Deserialize)]
+pub enum PrimitiveKeyKind {
+ /// Clear an existing rect, used for special effects on some platforms.
+ Clear,
+ ///
+ Rectangle {
+ ///
+ color: PropertyBinding<ColorU>,
+ },
+}
+
+/// Meta-macro to enumerate the various interner identifiers and types.
+///
+/// IMPORTANT: Keep this synchronized with the list in mozilla-central located at
+/// gfx/webrender_bindings/webrender_ffi.h
+///
+/// Note that this could be a lot less verbose if concat_idents! were stable. :-(
+#[macro_export]
+macro_rules! enumerate_interners {
+ ($macro_name: ident) => {
+ $macro_name! {
+ clip: ClipIntern,
+ prim: PrimitiveKeyKind,
+ normal_border: NormalBorderPrim,
+ image_border: ImageBorder,
+ image: Image,
+ yuv_image: YuvImage,
+ line_decoration: LineDecoration,
+ linear_grad: LinearGradient,
+ radial_grad: RadialGradient,
+ conic_grad: ConicGradient,
+ picture: Picture,
+ text_run: TextRun,
+ filter_data: FilterDataIntern,
+ backdrop: Backdrop,
+ }
+ }
+}
+
+macro_rules! declare_interning_memory_report {
+ ( $( $name:ident: $ty:ident, )+ ) => {
+ ///
+ #[repr(C)]
+ #[derive(AddAssign, Clone, Debug, Default)]
+ pub struct InternerSubReport {
+ $(
+ ///
+ pub $name: usize,
+ )+
+ }
+ }
+}
+
+enumerate_interners!(declare_interning_memory_report);
+
+/// Memory report for interning-related data structures.
+/// cbindgen:derive-eq=false
+#[repr(C)]
+#[derive(Clone, Debug, Default)]
+pub struct InterningMemoryReport {
+ ///
+ pub interners: InternerSubReport,
+ ///
+ pub data_stores: InternerSubReport,
+}
+
+impl ::std::ops::AddAssign for InterningMemoryReport {
+ fn add_assign(&mut self, other: InterningMemoryReport) {
+ self.interners += other.interners;
+ self.data_stores += other.data_stores;
+ }
+}
+
+/// Collection of heap sizes, in bytes.
+/// cbindgen:derive-eq=false
+#[repr(C)]
+#[allow(missing_docs)]
+#[derive(AddAssign, Clone, Debug, Default)]
+pub struct MemoryReport {
+ //
+ // CPU Memory.
+ //
+ pub clip_stores: usize,
+ pub gpu_cache_metadata: usize,
+ pub gpu_cache_cpu_mirror: usize,
+ pub render_tasks: usize,
+ pub hit_testers: usize,
+ pub fonts: usize,
+ pub images: usize,
+ pub rasterized_blobs: usize,
+ pub shader_cache: usize,
+ pub interning: InterningMemoryReport,
+ pub display_list: usize,
+
+ //
+ // GPU memory.
+ //
+ pub gpu_cache_textures: usize,
+ pub vertex_data_textures: usize,
+ pub render_target_textures: usize,
+ pub texture_cache_textures: usize,
+ pub depth_target_textures: usize,
+ pub swap_chain: usize,
+}
+
+/// A C function that takes a pointer to a heap allocation and returns its size.
+///
+/// This is borrowed from the malloc_size_of crate, upon which we want to avoid
+/// a dependency from WebRender.
+pub type VoidPtrToSizeFn = unsafe extern "C" fn(ptr: *const c_void) -> usize;
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
+struct ResourceId(pub u32);
+
+/// An opaque pointer-sized value.
+#[repr(C)]
+#[derive(Clone)]
+pub struct ExternalEvent {
+ raw: usize,
+}
+
+unsafe impl Send for ExternalEvent {}
+
+impl ExternalEvent {
+ /// Creates the event from an opaque pointer-sized value.
+ pub fn from_raw(raw: usize) -> Self {
+ ExternalEvent { raw }
+ }
+ /// Consumes self to make it obvious that the event should be forwarded only once.
+ pub fn unwrap(self) -> usize {
+ self.raw
+ }
+}
+
+/// Describe whether or not scrolling should be clamped by the content bounds.
+#[derive(Clone, Deserialize, Serialize)]
+pub enum ScrollClamping {
+ ///
+ ToContentBounds,
+ ///
+ NoClamping,
+}
+
+/// Allows the API to communicate with WebRender.
+///
+/// This object is created along with the `Renderer` and it's main use from a
+/// user perspective is to create one or several `RenderApi` objects.
+pub struct RenderApiSender {
+ api_sender: Sender<ApiMsg>,
+ blob_image_handler: Option<Box<dyn BlobImageHandler>>,
+ shared_font_instances: SharedFontInstanceMap,
+}
+
+impl RenderApiSender {
+ /// Used internally by the `Renderer`.
+ pub fn new(
+ api_sender: Sender<ApiMsg>,
+ blob_image_handler: Option<Box<dyn BlobImageHandler>>,
+ shared_font_instances: SharedFontInstanceMap,
+ ) -> Self {
+ RenderApiSender {
+ api_sender,
+ blob_image_handler,
+ shared_font_instances,
+ }
+ }
+
+ /// Creates a new resource API object with a dedicated namespace.
+ pub fn create_api(&self) -> RenderApi {
+ let (sync_tx, sync_rx) = channel();
+ let msg = ApiMsg::CloneApi(sync_tx);
+ self.api_sender.send(msg).expect("Failed to send CloneApi message");
+ let namespace_id = match sync_rx.recv() {
+ Ok(id) => id,
+ Err(e) => {
+ // This is used to discover the underlying cause of https://github.com/servo/servo/issues/13480.
+ let webrender_is_alive = self.api_sender.send(ApiMsg::WakeUp);
+ if webrender_is_alive.is_err() {
+ panic!("WebRender was shut down before processing CloneApi: {}", e);
+ } else {
+ panic!("CloneApi message response was dropped while WebRender was still alive: {}", e);
+ }
+ }
+ };
+ RenderApi {
+ api_sender: self.api_sender.clone(),
+ namespace_id,
+ next_id: Cell::new(ResourceId(0)),
+ resources: ApiResources::new(
+ self.blob_image_handler.as_ref().map(|handler| handler.create_similar()),
+ self.shared_font_instances.clone(),
+ ),
+ }
+ }
+
+ /// Creates a new resource API object with a dedicated namespace.
+ /// Namespace id is allocated by client.
+ ///
+ /// The function could be used only when RendererOptions::namespace_alloc_by_client is true.
+ /// When the option is true, create_api() could not be used to prevent namespace id conflict.
+ pub fn create_api_by_client(&self, namespace_id: IdNamespace) -> RenderApi {
+ let msg = ApiMsg::CloneApiByClient(namespace_id);
+ self.api_sender.send(msg).expect("Failed to send CloneApiByClient message");
+ RenderApi {
+ api_sender: self.api_sender.clone(),
+ namespace_id,
+ next_id: Cell::new(ResourceId(0)),
+ resources: ApiResources::new(
+ self.blob_image_handler.as_ref().map(|handler| handler.create_similar()),
+ self.shared_font_instances.clone(),
+ ),
+ }
+ }
+}
+
+bitflags! {
+ /// Flags to enable/disable various builtin debugging tools.
+ #[repr(C)]
+ #[derive(Default, Deserialize, MallocSizeOf, Serialize)]
+ pub struct DebugFlags: u32 {
+ /// Display the frame profiler on screen.
+ const PROFILER_DBG = 1 << 0;
+ /// Display intermediate render targets on screen.
+ const RENDER_TARGET_DBG = 1 << 1;
+ /// Display all texture cache pages on screen.
+ const TEXTURE_CACHE_DBG = 1 << 2;
+ /// Display GPU timing results.
+ const GPU_TIME_QUERIES = 1 << 3;
+ /// Query the number of pixels that pass the depth test divided and show it
+ /// in the profiler as a percentage of the number of pixels in the screen
+ /// (window width times height).
+ const GPU_SAMPLE_QUERIES = 1 << 4;
+ /// Render each quad with their own draw call.
+ ///
+ /// Terrible for performance but can help with understanding the drawing
+ /// order when inspecting renderdoc or apitrace recordings.
+ const DISABLE_BATCHING = 1 << 5;
+ /// Display the pipeline epochs.
+ const EPOCHS = 1 << 6;
+ /// Reduce the amount of information displayed by the profiler so that
+ /// it occupies less screen real-estate.
+ const COMPACT_PROFILER = 1 << 7;
+ /// Print driver messages to stdout.
+ const ECHO_DRIVER_MESSAGES = 1 << 8;
+ /// Show an indicator that moves every time a frame is rendered.
+ const NEW_FRAME_INDICATOR = 1 << 9;
+ /// Show an indicator that moves every time a scene is built.
+ const NEW_SCENE_INDICATOR = 1 << 10;
+ /// Show an overlay displaying overdraw amount.
+ const SHOW_OVERDRAW = 1 << 11;
+ /// Display the contents of GPU cache.
+ const GPU_CACHE_DBG = 1 << 12;
+ /// Show a red bar that moves each time a slow frame is detected.
+ const SLOW_FRAME_INDICATOR = 1 << 13;
+ /// Clear evicted parts of the texture cache for debugging purposes.
+ const TEXTURE_CACHE_DBG_CLEAR_EVICTED = 1 << 14;
+ /// Show picture caching debug overlay
+ const PICTURE_CACHING_DBG = 1 << 15;
+ /// Highlight all primitives with colors based on kind.
+ const PRIMITIVE_DBG = 1 << 16;
+ /// Draw a zoom widget showing part of the framebuffer zoomed in.
+ const ZOOM_DBG = 1 << 17;
+ /// Scale the debug renderer down for a smaller screen. This will disrupt
+ /// any mapping between debug display items and page content, so shouldn't
+ /// be used with overlays like the picture caching or primitive display.
+ const SMALL_SCREEN = 1 << 18;
+ /// Disable various bits of the WebRender pipeline, to help narrow
+ /// down where slowness might be coming from.
+ const DISABLE_OPAQUE_PASS = 1 << 19;
+ ///
+ const DISABLE_ALPHA_PASS = 1 << 20;
+ ///
+ const DISABLE_CLIP_MASKS = 1 << 21;
+ ///
+ const DISABLE_TEXT_PRIMS = 1 << 22;
+ ///
+ const DISABLE_GRADIENT_PRIMS = 1 << 23;
+ ///
+ const OBSCURE_IMAGES = 1 << 24;
+ /// Taint the transparent area of the glyphs with a random opacity to easily
+ /// see when glyphs are re-rasterized.
+ const GLYPH_FLASHING = 1 << 25;
+ /// The profiler only displays information that is out of the ordinary.
+ const SMART_PROFILER = 1 << 26;
+ /// Dynamically control whether picture caching is enabled.
+ const DISABLE_PICTURE_CACHING = 1 << 27;
+ /// If set, dump picture cache invalidation debug to console.
+ const INVALIDATION_DBG = 1 << 28;
+ /// Log tile cache to memory for later saving as part of wr-capture
+ const TILE_CACHE_LOGGING_DBG = 1 << 29;
+ /// For debugging, force-disable automatic scaling of establishes_raster_root
+ /// pictures that are too large (ie go back to old behavior that prevents those
+ /// large pictures from establishing a raster root).
+ const DISABLE_RASTER_ROOT_SCALING = 1 << 30;
+ }
+}
+
+/// The main entry point to interact with WebRender.
+pub struct RenderApi {
+ api_sender: Sender<ApiMsg>,
+ namespace_id: IdNamespace,
+ next_id: Cell<ResourceId>,
+ resources: ApiResources,
+}
+
+impl RenderApi {
+ /// Returns the namespace ID used by this API object.
+ pub fn get_namespace_id(&self) -> IdNamespace {
+ self.namespace_id
+ }
+
+ ///
+ pub fn create_sender(&self) -> RenderApiSender {
+ RenderApiSender::new(
+ self.api_sender.clone(),
+ self.resources.blob_image_handler.as_ref().map(|handler| handler.create_similar()),
+ self.resources.get_shared_font_instances(),
+ )
+ }
+
+ /// Add a document to the WebRender instance.
+ ///
+ /// Instances can manage one or several documents (using the same render backend thread).
+ /// Each document will internally correspond to a single scene, and scenes are made of
+ /// one or several pipelines.
+ pub fn add_document(&self, initial_size: DeviceIntSize, layer: DocumentLayer) -> DocumentId {
+ let new_id = self.next_unique_id();
+ self.add_document_with_id(initial_size, layer, new_id)
+ }
+
+ /// See `add_document`
+ pub fn add_document_with_id(&self,
+ initial_size: DeviceIntSize,
+ layer: DocumentLayer,
+ id: u32) -> DocumentId {
+ let document_id = DocumentId::new(self.namespace_id, id);
+
+ let msg = ApiMsg::AddDocument(document_id, initial_size, layer);
+ self.api_sender.send(msg).unwrap();
+
+ document_id
+ }
+
+ /// Delete a document.
+ pub fn delete_document(&self, document_id: DocumentId) {
+ let msg = ApiMsg::DeleteDocument(document_id);
+ self.api_sender.send(msg).unwrap();
+ }
+
+ /// Generate a new font key
+ pub fn generate_font_key(&self) -> font::FontKey {
+ let new_id = self.next_unique_id();
+ font::FontKey::new(self.namespace_id, new_id)
+ }
+
+ /// Generate a new font instance key
+ pub fn generate_font_instance_key(&self) -> font::FontInstanceKey {
+ let new_id = self.next_unique_id();
+ font::FontInstanceKey::new(self.namespace_id, new_id)
+ }
+
+ /// Gets the dimensions for the supplied glyph keys
+ ///
+ /// Note: Internally, the internal texture cache doesn't store
+ /// 'empty' textures (height or width = 0)
+ /// This means that glyph dimensions e.g. for spaces (' ') will mostly be None.
+ pub fn get_glyph_dimensions(
+ &self,
+ key: font::FontInstanceKey,
+ glyph_indices: Vec<font::GlyphIndex>,
+ ) -> Vec<Option<font::GlyphDimensions>> {
+ let (sender, rx) = channel();
+ let msg = ApiMsg::GetGlyphDimensions(font::GlyphDimensionRequest {
+ key,
+ glyph_indices,
+ sender
+ });
+ self.api_sender.send(msg).unwrap();
+ rx.recv().unwrap()
+ }
+
+ /// Gets the glyph indices for the supplied string. These
+ /// can be used to construct GlyphKeys.
+ pub fn get_glyph_indices(&self, key: font::FontKey, text: &str) -> Vec<Option<u32>> {
+ let (sender, rx) = channel();
+ let msg = ApiMsg::GetGlyphIndices(font::GlyphIndexRequest {
+ key,
+ text: text.to_string(),
+ sender,
+ });
+ self.api_sender.send(msg).unwrap();
+ rx.recv().unwrap()
+ }
+
+ /// Creates an `ImageKey`.
+ pub fn generate_image_key(&self) -> ImageKey {
+ let new_id = self.next_unique_id();
+ ImageKey::new(self.namespace_id, new_id)
+ }
+
+ /// Creates a `BlobImageKey`.
+ pub fn generate_blob_image_key(&self) -> BlobImageKey {
+ BlobImageKey(self.generate_image_key())
+ }
+
+ /// A Gecko-specific notification mechanism to get some code executed on the
+ /// `Renderer`'s thread, mostly replaced by `NotificationHandler`. You should
+ /// probably use the latter instead.
+ pub fn send_external_event(&self, evt: ExternalEvent) {
+ let msg = ApiMsg::ExternalEvent(evt);
+ self.api_sender.send(msg).unwrap();
+ }
+
+ /// Notify WebRender that now is a good time to flush caches and release
+ /// as much memory as possible.
+ pub fn notify_memory_pressure(&self) {
+ self.api_sender.send(ApiMsg::MemoryPressure).unwrap();
+ }
+
+ /// Synchronously requests memory report.
+ pub fn report_memory(&self) -> MemoryReport {
+ let (tx, rx) = channel();
+ self.api_sender.send(ApiMsg::ReportMemory(tx)).unwrap();
+ *rx.recv().unwrap()
+ }
+
+ /// Update debugging flags.
+ pub fn set_debug_flags(&self, flags: DebugFlags) {
+ let cmd = DebugCommand::SetFlags(flags);
+ self.api_sender.send(ApiMsg::DebugCommand(cmd)).unwrap();
+ }
+
+ /// Shut the WebRender instance down.
+ pub fn shut_down(&self, synchronously: bool) {
+ if synchronously {
+ let (tx, rx) = channel();
+ self.api_sender.send(ApiMsg::ShutDown(Some(tx))).unwrap();
+ rx.recv().unwrap();
+ } else {
+ self.api_sender.send(ApiMsg::ShutDown(None)).unwrap();
+ }
+ }
+
+ /// Create a new unique key that can be used for
+ /// animated property bindings.
+ pub fn generate_property_binding_key<T: Copy>(&self) -> PropertyBindingKey<T> {
+ let new_id = self.next_unique_id();
+ PropertyBindingKey {
+ id: PropertyBindingId {
+ namespace: self.namespace_id,
+ uid: new_id,
+ },
+ _phantom: PhantomData,
+ }
+ }
+
+ #[inline]
+ fn next_unique_id(&self) -> u32 {
+ let ResourceId(id) = self.next_id.get();
+ self.next_id.set(ResourceId(id + 1));
+ id
+ }
+
+ // For use in Wrench only
+ #[doc(hidden)]
+ pub fn send_message(&self, msg: ApiMsg) {
+ self.api_sender.send(msg).unwrap();
+ }
+
+ /// Creates a transaction message from a single frame message.
+ fn frame_message(&self, msg: FrameMsg, document_id: DocumentId) -> Box<TransactionMsg> {
+ Box::new(TransactionMsg {
+ document_id,
+ scene_ops: Vec::new(),
+ frame_ops: vec![msg],
+ resource_updates: Vec::new(),
+ notifications: Vec::new(),
+ generate_frame: false,
+ invalidate_rendered_frame: false,
+ use_scene_builder_thread: false,
+ low_priority: false,
+ blob_rasterizer: None,
+ blob_requests: Vec::new(),
+ rasterized_blobs: Vec::new(),
+ })
+ }
+
+ /// Creates a transaction message from a single scene message.
+ fn scene_message(&self, msg: SceneMsg, document_id: DocumentId) -> Box<TransactionMsg> {
+ Box::new(TransactionMsg {
+ document_id,
+ scene_ops: vec![msg],
+ frame_ops: Vec::new(),
+ resource_updates: Vec::new(),
+ notifications: Vec::new(),
+ generate_frame: false,
+ invalidate_rendered_frame: false,
+ use_scene_builder_thread: false,
+ low_priority: false,
+ blob_rasterizer: None,
+ blob_requests: Vec::new(),
+ rasterized_blobs: Vec::new(),
+ })
+ }
+
+ /// A helper method to send document messages.
+ fn send_scene_msg(&self, document_id: DocumentId, msg: SceneMsg) {
+ // This assertion fails on Servo use-cases, because it creates different
+ // `RenderApi` instances for layout and compositor.
+ //assert_eq!(document_id.0, self.namespace_id);
+ self.api_sender
+ .send(ApiMsg::UpdateDocuments(vec![self.scene_message(msg, document_id)]))
+ .unwrap()
+ }
+
+ /// A helper method to send document messages.
+ fn send_frame_msg(&self, document_id: DocumentId, msg: FrameMsg) {
+ // This assertion fails on Servo use-cases, because it creates different
+ // `RenderApi` instances for layout and compositor.
+ //assert_eq!(document_id.0, self.namespace_id);
+ self.api_sender
+ .send(ApiMsg::UpdateDocuments(vec![self.frame_message(msg, document_id)]))
+ .unwrap()
+ }
+
+ /// Send a transaction to WebRender.
+ pub fn send_transaction(&mut self, document_id: DocumentId, transaction: Transaction) {
+ let mut transaction = transaction.finalize(document_id);
+
+ self.resources.update(&mut transaction);
+
+ self.api_sender.send(ApiMsg::UpdateDocuments(vec![transaction])).unwrap();
+ }
+
+ /// Send multiple transactions.
+ pub fn send_transactions(&mut self, document_ids: Vec<DocumentId>, mut transactions: Vec<Transaction>) {
+ debug_assert!(document_ids.len() == transactions.len());
+ let msgs = transactions.drain(..).zip(document_ids)
+ .map(|(txn, id)| {
+ let mut txn = txn.finalize(id);
+ self.resources.update(&mut txn);
+
+ txn
+ })
+ .collect();
+
+ self.api_sender.send(ApiMsg::UpdateDocuments(msgs)).unwrap();
+ }
+
+ /// Does a hit test on display items in the specified document, at the given
+ /// point. If a pipeline_id is specified, it is used to further restrict the
+ /// hit results so that only items inside that pipeline are matched. If the
+ /// HitTestFlags argument contains the FIND_ALL flag, then the vector of hit
+ /// results will contain all display items that match, ordered from front
+ /// to back.
+ pub fn hit_test(&self,
+ document_id: DocumentId,
+ pipeline_id: Option<PipelineId>,
+ point: WorldPoint,
+ flags: HitTestFlags)
+ -> HitTestResult {
+ let (tx, rx) = channel();
+
+ self.send_frame_msg(
+ document_id,
+ FrameMsg::HitTest(pipeline_id, point, flags, tx)
+ );
+ rx.recv().unwrap()
+ }
+
+ /// Synchronously request an object that can perform fast hit testing queries.
+ pub fn request_hit_tester(&self, document_id: DocumentId) -> HitTesterRequest {
+ let (tx, rx) = channel();
+ self.send_frame_msg(
+ document_id,
+ FrameMsg::RequestHitTester(tx)
+ );
+
+ HitTesterRequest { rx }
+ }
+
+ /// Setup the output region in the framebuffer for a given document.
+ pub fn set_document_view(
+ &self,
+ document_id: DocumentId,
+ device_rect: DeviceIntRect,
+ device_pixel_ratio: f32,
+ ) {
+ self.send_scene_msg(
+ document_id,
+ SceneMsg::SetDocumentView { device_rect, device_pixel_ratio },
+ );
+ }
+
+ /// Setup the output region in the framebuffer for a given document.
+ /// Enable copying of the output of this pipeline id to
+ /// an external texture for callers to consume.
+ pub fn enable_frame_output(
+ &self,
+ document_id: DocumentId,
+ pipeline_id: PipelineId,
+ enable: bool,
+ ) {
+ self.send_scene_msg(
+ document_id,
+ SceneMsg::EnableFrameOutput(pipeline_id, enable),
+ );
+ }
+
+ ///
+ pub fn get_scroll_node_state(&self, document_id: DocumentId) -> Vec<ScrollNodeState> {
+ let (tx, rx) = channel();
+ self.send_frame_msg(document_id, FrameMsg::GetScrollNodeState(tx));
+ rx.recv().unwrap()
+ }
+
+ // Some internal scheduling magic that leaked into the API.
+ // Buckle up and see APZUpdater.cpp for more info about what this is about.
+ #[doc(hidden)]
+ pub fn wake_scene_builder(&self) {
+ self.send_message(ApiMsg::WakeSceneBuilder);
+ }
+
+ /// Block until a round-trip to the scene builder thread has completed. This
+ /// ensures that any transactions (including ones deferred to the scene
+ /// builder thread) have been processed.
+ pub fn flush_scene_builder(&self) {
+ let (tx, rx) = channel();
+ self.send_message(ApiMsg::FlushSceneBuilder(tx));
+ rx.recv().unwrap(); // block until done
+ }
+
+ /// Save a capture of the current frame state for debugging.
+ pub fn save_capture(&self, path: PathBuf, bits: CaptureBits) {
+ let msg = ApiMsg::DebugCommand(DebugCommand::SaveCapture(path, bits));
+ self.send_message(msg);
+ }
+
+ /// Load a capture of the current frame state for debugging.
+ pub fn load_capture(&self, path: PathBuf, ids: Option<(u32, u32)>) -> Vec<CapturedDocument> {
+ // First flush the scene builder otherwise async scenes might clobber
+ // the capture we are about to load.
+ self.flush_scene_builder();
+
+ let (tx, rx) = channel();
+ let msg = ApiMsg::DebugCommand(DebugCommand::LoadCapture(path, ids, tx));
+ self.send_message(msg);
+
+ let mut documents = Vec::new();
+ while let Ok(captured_doc) = rx.recv() {
+ documents.push(captured_doc);
+ }
+ documents
+ }
+
+ /// Start capturing a sequence of frames.
+ pub fn start_capture_sequence(&self, path: PathBuf, bits: CaptureBits) {
+ let msg = ApiMsg::DebugCommand(DebugCommand::StartCaptureSequence(path, bits));
+ self.send_message(msg);
+ }
+
+ /// Stop capturing sequences of frames.
+ pub fn stop_capture_sequence(&self) {
+ let msg = ApiMsg::DebugCommand(DebugCommand::StopCaptureSequence);
+ self.send_message(msg);
+ }
+
+ /// Update the state of builtin debugging facilities.
+ pub fn send_debug_cmd(&mut self, cmd: DebugCommand) {
+ if let DebugCommand::EnableMultithreading(enable) = cmd {
+ // TODO(nical) we should enable it for all RenderApis.
+ self.resources.enable_multithreading(enable);
+ }
+ let msg = ApiMsg::DebugCommand(cmd);
+ self.send_message(msg);
+ }
+}
+
+impl Drop for RenderApi {
+ fn drop(&mut self) {
+ let msg = ApiMsg::ClearNamespace(self.namespace_id);
+ let _ = self.api_sender.send(msg);
+ }
+}
+
+/// A hit tester requested to the render backend thread but not necessarily ready yet.
+///
+/// The request should be resolved as late as possible to reduce the likelihood of blocking.
+pub struct HitTesterRequest {
+ rx: Receiver<Arc<dyn ApiHitTester>>,
+}
+
+impl HitTesterRequest {
+ /// Block until the hit tester is available and return it, consuming teh request.
+ pub fn resolve(self) -> Arc<dyn ApiHitTester> {
+ self.rx.recv().unwrap()
+ }
+}
+
+///
+#[derive(Clone)]
+pub struct ScrollNodeState {
+ ///
+ pub id: di::ExternalScrollId,
+ ///
+ pub scroll_offset: LayoutVector2D,
+}
+
+///
+#[derive(Clone, Copy, Debug)]
+pub enum ScrollLocation {
+ /// Scroll by a certain amount.
+ Delta(LayoutVector2D),
+ /// Scroll to very top of element.
+ Start,
+ /// Scroll to very bottom of element.
+ End,
+}
+
+/// Represents a zoom factor.
+#[derive(Clone, Copy, Debug)]
+pub struct ZoomFactor(f32);
+
+impl ZoomFactor {
+ /// Construct a new zoom factor.
+ pub fn new(scale: f32) -> Self {
+ ZoomFactor(scale)
+ }
+
+ /// Get the zoom factor as an untyped float.
+ pub fn get(self) -> f32 {
+ self.0
+ }
+}
+
+/// A key to identify an animated property binding.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, MallocSizeOf, PartialEq, Serialize, Eq, Hash, PeekPoke)]
+pub struct PropertyBindingId {
+ namespace: IdNamespace,
+ uid: u32,
+}
+
+impl PropertyBindingId {
+ /// Constructor.
+ pub fn new(value: u64) -> Self {
+ PropertyBindingId {
+ namespace: IdNamespace((value >> 32) as u32),
+ uid: value as u32,
+ }
+ }
+}
+
+/// A unique key that is used for connecting animated property
+/// values to bindings in the display list.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub struct PropertyBindingKey<T> {
+ ///
+ pub id: PropertyBindingId,
+ _phantom: PhantomData<T>,
+}
+
+/// Construct a property value from a given key and value.
+impl<T: Copy> PropertyBindingKey<T> {
+ ///
+ pub fn with(self, value: T) -> PropertyValue<T> {
+ PropertyValue { key: self, value }
+ }
+}
+
+impl<T> PropertyBindingKey<T> {
+ /// Constructor.
+ pub fn new(value: u64) -> Self {
+ PropertyBindingKey {
+ id: PropertyBindingId::new(value),
+ _phantom: PhantomData,
+ }
+ }
+}
+
+/// A binding property can either be a specific value
+/// (the normal, non-animated case) or point to a binding location
+/// to fetch the current value from.
+/// Note that Binding has also a non-animated value, the value is
+/// used for the case where the animation is still in-delay phase
+/// (i.e. the animation doesn't produce any animation values).
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum PropertyBinding<T> {
+ /// Non-animated value.
+ Value(T),
+ /// Animated binding.
+ Binding(PropertyBindingKey<T>, T),
+}
+
+impl<T: Default> Default for PropertyBinding<T> {
+ fn default() -> Self {
+ PropertyBinding::Value(Default::default())
+ }
+}
+
+impl<T> From<T> for PropertyBinding<T> {
+ fn from(value: T) -> PropertyBinding<T> {
+ PropertyBinding::Value(value)
+ }
+}
+
+impl From<PropertyBindingKey<ColorF>> for PropertyBindingKey<ColorU> {
+ fn from(key: PropertyBindingKey<ColorF>) -> PropertyBindingKey<ColorU> {
+ PropertyBindingKey {
+ id: key.id.clone(),
+ _phantom: PhantomData,
+ }
+ }
+}
+
+impl From<PropertyBindingKey<ColorU>> for PropertyBindingKey<ColorF> {
+ fn from(key: PropertyBindingKey<ColorU>) -> PropertyBindingKey<ColorF> {
+ PropertyBindingKey {
+ id: key.id.clone(),
+ _phantom: PhantomData,
+ }
+ }
+}
+
+impl From<PropertyBinding<ColorF>> for PropertyBinding<ColorU> {
+ fn from(value: PropertyBinding<ColorF>) -> PropertyBinding<ColorU> {
+ match value {
+ PropertyBinding::Value(value) => PropertyBinding::Value(value.into()),
+ PropertyBinding::Binding(k, v) => {
+ PropertyBinding::Binding(k.into(), v.into())
+ }
+ }
+ }
+}
+
+impl From<PropertyBinding<ColorU>> for PropertyBinding<ColorF> {
+ fn from(value: PropertyBinding<ColorU>) -> PropertyBinding<ColorF> {
+ match value {
+ PropertyBinding::Value(value) => PropertyBinding::Value(value.into()),
+ PropertyBinding::Binding(k, v) => {
+ PropertyBinding::Binding(k.into(), v.into())
+ }
+ }
+ }
+}
+
+/// The current value of an animated property. This is
+/// supplied by the calling code.
+#[derive(Clone, Copy, Debug, Deserialize, Serialize, PartialEq)]
+pub struct PropertyValue<T> {
+ ///
+ pub key: PropertyBindingKey<T>,
+ ///
+ pub value: T,
+}
+
+/// When using `generate_frame()`, a list of `PropertyValue` structures
+/// can optionally be supplied to provide the current value of any
+/// animated properties.
+#[derive(Clone, Deserialize, Serialize, Debug, PartialEq, Default)]
+pub struct DynamicProperties {
+ ///
+ pub transforms: Vec<PropertyValue<LayoutTransform>>,
+ /// opacity
+ pub floats: Vec<PropertyValue<f32>>,
+ /// background color
+ pub colors: Vec<PropertyValue<ColorF>>,
+}
+
+/// A handler to integrate WebRender with the thread that contains the `Renderer`.
+pub trait RenderNotifier: Send {
+ ///
+ fn clone(&self) -> Box<dyn RenderNotifier>;
+ /// Wake the thread containing the `Renderer` up (after updates have been put
+ /// in the renderer's queue).
+ fn wake_up(&self);
+ /// Notify the thread containing the `Renderer` that a new frame is ready.
+ fn new_frame_ready(&self, _: DocumentId, scrolled: bool, composite_needed: bool, render_time_ns: Option<u64>);
+ /// A Gecko-specific notification mechanism to get some code executed on the
+ /// `Renderer`'s thread, mostly replaced by `NotificationHandler`. You should
+ /// probably use the latter instead.
+ fn external_event(&self, _evt: ExternalEvent) {
+ unimplemented!()
+ }
+ /// Notify the thread containing the `Renderer` that the render backend has been
+ /// shut down.
+ fn shut_down(&self) {}
+}
+
+/// A stage of the rendering pipeline.
+#[repr(u32)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq)]
+pub enum Checkpoint {
+ ///
+ SceneBuilt,
+ ///
+ FrameBuilt,
+ ///
+ FrameTexturesUpdated,
+ ///
+ FrameRendered,
+ /// NotificationRequests get notified with this if they get dropped without having been
+ /// notified. This provides the guarantee that if a request is created it will get notified.
+ TransactionDropped,
+}
+
+/// A handler to notify when a transaction reaches certain stages of the rendering
+/// pipeline.
+pub trait NotificationHandler : Send + Sync {
+ /// Entry point of the handler to implement. Invoked by WebRender.
+ fn notify(&self, when: Checkpoint);
+}
+
+/// A request to notify a handler when the transaction reaches certain stages of the
+/// rendering pipeline.
+///
+/// The request is guaranteed to be notified once and only once, even if the transaction
+/// is dropped before the requested check-point.
+pub struct NotificationRequest {
+ handler: Option<Box<dyn NotificationHandler>>,
+ when: Checkpoint,
+}
+
+impl NotificationRequest {
+ /// Constructor.
+ pub fn new(when: Checkpoint, handler: Box<dyn NotificationHandler>) -> Self {
+ NotificationRequest {
+ handler: Some(handler),
+ when,
+ }
+ }
+
+ /// The specified stage at which point the handler should be notified.
+ pub fn when(&self) -> Checkpoint { self.when }
+
+ /// Called by WebRender at specified stages to notify the registered handler.
+ pub fn notify(mut self) {
+ if let Some(handler) = self.handler.take() {
+ handler.notify(self.when);
+ }
+ }
+}
+
+/// An object that can perform hit-testing without doing synchronous queries to
+/// the RenderBackendThread.
+pub trait ApiHitTester: Send + Sync {
+ /// Does a hit test on display items in the specified document, at the given
+ /// point. If a pipeline_id is specified, it is used to further restrict the
+ /// hit results so that only items inside that pipeline are matched. If the
+ /// HitTestFlags argument contains the FIND_ALL flag, then the vector of hit
+ /// results will contain all display items that match, ordered from front
+ /// to back.
+ fn hit_test(&self, pipeline_id: Option<PipelineId>, point: WorldPoint, flags: HitTestFlags) -> HitTestResult;
+}
+
+impl Drop for NotificationRequest {
+ fn drop(&mut self) {
+ if let Some(ref mut handler) = self.handler {
+ handler.notify(Checkpoint::TransactionDropped);
+ }
+ }
+}
+
+// This Clone impl yields an "empty" request because we don't want the requests
+// to be notified twice so the request is owned by only one of the API messages
+// (the original one) after the clone.
+// This works in practice because the notifications requests are used for
+// synchronization so we don't need to include them in the recording mechanism
+// in wrench that clones the messages.
+impl Clone for NotificationRequest {
+ fn clone(&self) -> Self {
+ NotificationRequest {
+ when: self.when,
+ handler: None,
+ }
+ }
+}
+
+
+bitflags! {
+ /// Each bit of the edge AA mask is:
+ /// 0, when the edge of the primitive needs to be considered for AA
+ /// 1, when the edge of the segment needs to be considered for AA
+ ///
+ /// *Note*: the bit values have to match the shader logic in
+ /// `write_transform_vertex()` function.
+ #[cfg_attr(feature = "serialize", derive(Serialize))]
+ #[cfg_attr(feature = "deserialize", derive(Deserialize))]
+ #[derive(MallocSizeOf)]
+ pub struct EdgeAaSegmentMask: u8 {
+ ///
+ const LEFT = 0x1;
+ ///
+ const TOP = 0x2;
+ ///
+ const RIGHT = 0x4;
+ ///
+ const BOTTOM = 0x8;
+ }
+}
diff --git a/third_party/webrender/webrender_api/src/channel.rs b/third_party/webrender/webrender_api/src/channel.rs
new file mode 100644
index 00000000000..2bc4a5f16b8
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/channel.rs
@@ -0,0 +1,131 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use crate::api::{Epoch, PipelineId};
+use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
+use serde::{Deserialize, Deserializer, Serialize, Serializer};
+use std::io::{self, Cursor, Error, ErrorKind, Read};
+use std::mem;
+use std::sync::mpsc;
+
+#[derive(Clone)]
+pub struct Payload {
+ /// An epoch used to get the proper payload for a pipeline id frame request.
+ ///
+ /// TODO(emilio): Is this still relevant? We send the messages for the same
+ /// pipeline in order, so we shouldn't need it. Seems like this was only
+ /// wallpapering (in most cases) the underlying problem in #991.
+ pub epoch: Epoch,
+ /// A pipeline id to key the payload with, along with the epoch.
+ pub pipeline_id: PipelineId,
+ pub display_list_data: Vec<u8>,
+}
+
+impl Payload {
+ /// Convert the payload to a raw byte vector, in order for it to be
+ /// efficiently shared via shmem, for example.
+ /// This is a helper static method working on a slice.
+ pub fn construct_data(epoch: Epoch, pipeline_id: PipelineId, dl_data: &[u8]) -> Vec<u8> {
+ let mut data = Vec::with_capacity(
+ mem::size_of::<u32>() + 2 * mem::size_of::<u32>() + mem::size_of::<u64>() + dl_data.len(),
+ );
+ data.write_u32::<LittleEndian>(epoch.0).unwrap();
+ data.write_u32::<LittleEndian>(pipeline_id.0).unwrap();
+ data.write_u32::<LittleEndian>(pipeline_id.1).unwrap();
+ data.write_u64::<LittleEndian>(dl_data.len() as u64)
+ .unwrap();
+ data.extend_from_slice(dl_data);
+ data
+ }
+ /// Convert the payload to a raw byte vector, in order for it to be
+ /// efficiently shared via shmem, for example.
+ pub fn to_data(&self) -> Vec<u8> {
+ Self::construct_data(self.epoch, self.pipeline_id, &self.display_list_data)
+ }
+
+ /// Deserializes the given payload from a raw byte vector.
+ pub fn from_data(data: &[u8]) -> Payload {
+ let mut payload_reader = Cursor::new(data);
+ let epoch = Epoch(payload_reader.read_u32::<LittleEndian>().unwrap());
+ let pipeline_id = PipelineId(
+ payload_reader.read_u32::<LittleEndian>().unwrap(),
+ payload_reader.read_u32::<LittleEndian>().unwrap(),
+ );
+
+ let dl_size = payload_reader.read_u64::<LittleEndian>().unwrap() as usize;
+ let mut built_display_list_data = vec![0; dl_size];
+ payload_reader
+ .read_exact(&mut built_display_list_data[..])
+ .unwrap();
+
+ assert_eq!(payload_reader.position(), data.len() as u64);
+
+ Payload {
+ epoch,
+ pipeline_id,
+ display_list_data: built_display_list_data,
+ }
+ }
+}
+
+pub type PayloadSender = MsgSender<Payload>;
+
+pub type PayloadReceiver = MsgReceiver<Payload>;
+
+pub struct MsgReceiver<T> {
+ rx: mpsc::Receiver<T>,
+}
+
+impl<T> MsgReceiver<T> {
+ pub fn recv(&self) -> Result<T, Error> {
+ self.rx.recv().map_err(|e| io::Error::new(ErrorKind::Other, e.to_string()))
+ }
+
+ pub fn to_mpsc_receiver(self) -> mpsc::Receiver<T> {
+ self.rx
+ }
+}
+
+#[derive(Clone)]
+pub struct MsgSender<T> {
+ tx: mpsc::Sender<T>,
+}
+
+impl<T> MsgSender<T> {
+ pub fn send(&self, data: T) -> Result<(), Error> {
+ self.tx.send(data).map_err(|_| Error::new(ErrorKind::Other, "cannot send on closed channel"))
+ }
+}
+
+pub fn payload_channel() -> Result<(PayloadSender, PayloadReceiver), Error> {
+ let (tx, rx) = mpsc::channel();
+ Ok((PayloadSender { tx }, PayloadReceiver { rx }))
+}
+
+pub fn msg_channel<T>() -> Result<(MsgSender<T>, MsgReceiver<T>), Error> {
+ let (tx, rx) = mpsc::channel();
+ Ok((MsgSender { tx }, MsgReceiver { rx }))
+}
+
+///
+/// These serialize methods are needed to satisfy the compiler
+/// which uses these implementations for the recording tool.
+/// The recording tool only outputs messages that don't contain
+/// Senders or Receivers, so in theory these should never be
+/// called in the in-process config. If they are called,
+/// there may be a bug in the messages that the replay tool is writing.
+///
+
+impl<T> Serialize for MsgSender<T> {
+ fn serialize<S: Serializer>(&self, _: S) -> Result<S::Ok, S::Error> {
+ unreachable!();
+ }
+}
+
+impl<'de, T> Deserialize<'de> for MsgSender<T> {
+ fn deserialize<D>(_: D) -> Result<MsgSender<T>, D::Error>
+ where D: Deserializer<'de> {
+ unreachable!();
+ }
+}
diff --git a/third_party/webrender/webrender_api/src/color.rs b/third_party/webrender/webrender_api/src/color.rs
new file mode 100644
index 00000000000..f19f83bb3d0
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/color.rs
@@ -0,0 +1,160 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use peek_poke::PeekPoke;
+use std::cmp;
+use std::hash::{Hash, Hasher};
+
+/// Represents pre-multiplied RGBA colors with floating point numbers.
+///
+/// All components must be between 0.0 and 1.0.
+/// An alpha value of 1.0 is opaque while 0.0 is fully transparent.
+///
+/// In premultiplied colors transitions to transparent always look "nice"
+/// therefore they are used in CSS gradients.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, PartialEq, PartialOrd, Serialize)]
+pub struct PremultipliedColorF {
+ pub r: f32,
+ pub g: f32,
+ pub b: f32,
+ pub a: f32,
+}
+
+#[allow(missing_docs)]
+impl PremultipliedColorF {
+ pub const BLACK: PremultipliedColorF = PremultipliedColorF { r: 0.0, g: 0.0, b: 0.0, a: 1.0 };
+ pub const TRANSPARENT: PremultipliedColorF = PremultipliedColorF { r: 0.0, g: 0.0, b: 0.0, a: 0.0 };
+ pub const WHITE: PremultipliedColorF = PremultipliedColorF { r: 1.0, g: 1.0, b: 1.0, a: 1.0 };
+
+ pub fn to_array(&self) -> [f32; 4] {
+ [self.r, self.g, self.b, self.a]
+ }
+}
+
+/// Represents RGBA screen colors with floating point numbers.
+///
+/// All components must be between 0.0 and 1.0.
+/// An alpha value of 1.0 is opaque while 0.0 is fully transparent.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub struct ColorF {
+ pub r: f32,
+ pub g: f32,
+ pub b: f32,
+ pub a: f32,
+}
+
+#[allow(missing_docs)]
+impl ColorF {
+ pub const BLACK: ColorF = ColorF { r: 0.0, g: 0.0, b: 0.0, a: 1.0 };
+ pub const TRANSPARENT: ColorF = ColorF { r: 0.0, g: 0.0, b: 0.0, a: 0.0 };
+ pub const WHITE: ColorF = ColorF { r: 1.0, g: 1.0, b: 1.0, a: 1.0 };
+
+ /// Constructs a new `ColorF` from its components.
+ pub fn new(r: f32, g: f32, b: f32, a: f32) -> Self {
+ ColorF { r, g, b, a }
+ }
+
+ /// Multiply the RGB channels (but not alpha) with a given factor.
+ pub fn scale_rgb(&self, scale: f32) -> Self {
+ ColorF {
+ r: self.r * scale,
+ g: self.g * scale,
+ b: self.b * scale,
+ a: self.a,
+ }
+ }
+
+ // Scale the alpha by a given factor.
+ pub fn scale_alpha(&self, scale: f32) -> Self {
+ ColorF {
+ r: self.r,
+ g: self.g,
+ b: self.b,
+ a: self.a * scale,
+ }
+ }
+
+ pub fn to_array(&self) -> [f32; 4] {
+ [self.r, self.g, self.b, self.a]
+ }
+
+ /// Multiply the RGB components with the alpha channel.
+ pub fn premultiplied(&self) -> PremultipliedColorF {
+ let c = self.scale_rgb(self.a);
+ PremultipliedColorF { r: c.r, g: c.g, b: c.b, a: c.a }
+ }
+}
+
+// Floats don't impl Hash/Eq/Ord...
+impl Eq for PremultipliedColorF {}
+impl Ord for PremultipliedColorF {
+ fn cmp(&self, other: &Self) -> cmp::Ordering {
+ self.partial_cmp(other).unwrap_or(cmp::Ordering::Equal)
+ }
+}
+
+#[cfg_attr(feature = "cargo-clippy", allow(clippy::derive_hash_xor_eq))]
+impl Hash for PremultipliedColorF {
+ fn hash<H: Hasher>(&self, state: &mut H) {
+ // Note: this is inconsistent with the Eq impl for -0.0 (don't care).
+ self.r.to_bits().hash(state);
+ self.g.to_bits().hash(state);
+ self.b.to_bits().hash(state);
+ self.a.to_bits().hash(state);
+ }
+}
+
+/// Represents RGBA screen colors with one byte per channel.
+///
+/// If the alpha value `a` is 255 the color is opaque.
+#[repr(C)]
+#[derive(Clone, Copy, Hash, Eq, Debug, Deserialize, MallocSizeOf, PartialEq, PartialOrd, Ord, Serialize)]
+pub struct ColorU {
+ pub r: u8,
+ pub g: u8,
+ pub b: u8,
+ pub a: u8,
+}
+
+impl ColorU {
+ /// Constructs a new additive `ColorU` from its components.
+ pub fn new(r: u8, g: u8, b: u8, a: u8) -> Self {
+ ColorU { r, g, b, a }
+ }
+}
+
+fn round_to_int(x: f32) -> u8 {
+ debug_assert!((0.0 <= x) && (x <= 1.0), "{} should be between 0 and 1", x);
+ let f = (255.0 * x) + 0.5;
+ let val = f.floor();
+ debug_assert!(val <= 255.0);
+ val as u8
+}
+
+// TODO: We shouldn't really convert back to `ColorU` ever,
+// since it's lossy. One of the blockers is that all of our debug colors
+// are specified in `ColorF`. Changing it to `ColorU` would be nice.
+impl From<ColorF> for ColorU {
+ fn from(color: ColorF) -> Self {
+ ColorU {
+ r: round_to_int(color.r),
+ g: round_to_int(color.g),
+ b: round_to_int(color.b),
+ a: round_to_int(color.a),
+ }
+ }
+}
+
+impl From<ColorU> for ColorF {
+ fn from(color: ColorU) -> Self {
+ ColorF {
+ r: color.r as f32 / 255.0,
+ g: color.g as f32 / 255.0,
+ b: color.b as f32 / 255.0,
+ a: color.a as f32 / 255.0,
+ }
+ }
+}
diff --git a/third_party/webrender/webrender_api/src/display_item.rs b/third_party/webrender/webrender_api/src/display_item.rs
new file mode 100644
index 00000000000..e6b8e036e46
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/display_item.rs
@@ -0,0 +1,1589 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use euclid::SideOffsets2D;
+use peek_poke::PeekPoke;
+use std::ops::Not;
+// local imports
+use crate::font;
+use crate::api::{PipelineId, PropertyBinding};
+use crate::color::ColorF;
+use crate::image::{ColorDepth, ImageKey};
+use crate::units::*;
+
+// ******************************************************************
+// * NOTE: some of these structs have an "IMPLICIT" comment. *
+// * This indicates that the BuiltDisplayList will have serialized *
+// * a list of values nearby that this item consumes. The traversal *
+// * iterator should handle finding these. DebugDisplayItem should *
+// * make them explicit. *
+// ******************************************************************
+
+/// A tag that can be used to identify items during hit testing. If the tag
+/// is missing then the item doesn't take part in hit testing at all. This
+/// is composed of two numbers. In Servo, the first is an identifier while the
+/// second is used to select the cursor that should be used during mouse
+/// movement. In Gecko, the first is a scrollframe identifier, while the second
+/// is used to store various flags that APZ needs to properly process input
+/// events.
+pub type ItemTag = (u64, u16);
+
+/// An identifier used to refer to previously sent display items. Currently it
+/// refers to individual display items, but this may change later.
+pub type ItemKey = u16;
+
+bitflags! {
+ #[repr(C)]
+ #[derive(Deserialize, MallocSizeOf, Serialize, PeekPoke)]
+ pub struct PrimitiveFlags: u8 {
+ /// The CSS backface-visibility property (yes, it can be really granular)
+ const IS_BACKFACE_VISIBLE = 1 << 0;
+ /// If set, this primitive represents a scroll bar container
+ const IS_SCROLLBAR_CONTAINER = 1 << 1;
+ /// If set, this primitive represents a scroll bar thumb
+ const IS_SCROLLBAR_THUMB = 1 << 2;
+ /// This is used as a performance hint - this primitive may be promoted to a native
+ /// compositor surface under certain (implementation specific) conditions. This
+ /// is typically used for large videos, and canvas elements.
+ const PREFER_COMPOSITOR_SURFACE = 1 << 3;
+ }
+}
+
+impl Default for PrimitiveFlags {
+ fn default() -> Self {
+ PrimitiveFlags::IS_BACKFACE_VISIBLE
+ }
+}
+
+/// A grouping of fields a lot of display items need, just to avoid
+/// repeating these over and over in this file.
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct CommonItemProperties {
+ /// Bounds of the display item to clip to. Many items are logically
+ /// infinite, and rely on this clip_rect to define their bounds
+ /// (solid colors, background-images, gradients, etc).
+ pub clip_rect: LayoutRect,
+ /// Additional clips
+ pub clip_id: ClipId,
+ /// The coordinate-space the item is in (yes, it can be really granular)
+ pub spatial_id: SpatialId,
+ /// Opaque bits for our clients to use for hit-testing. This is the most
+ /// dubious "common" field, but because it's an Option, it usually only
+ /// wastes a single byte (for None).
+ pub hit_info: Option<ItemTag>,
+ /// Various flags describing properties of this primitive.
+ pub flags: PrimitiveFlags,
+}
+
+impl CommonItemProperties {
+ /// Convenience for tests.
+ pub fn new(
+ clip_rect: LayoutRect,
+ space_and_clip: SpaceAndClipInfo,
+ ) -> Self {
+ Self {
+ clip_rect,
+ spatial_id: space_and_clip.spatial_id,
+ clip_id: space_and_clip.clip_id,
+ hit_info: None,
+ flags: PrimitiveFlags::default(),
+ }
+ }
+}
+
+/// Per-primitive information about the nodes in the clip tree and
+/// the spatial tree that the primitive belongs to.
+///
+/// Note: this is a separate struct from `PrimitiveInfo` because
+/// it needs indirectional mapping during the DL flattening phase,
+/// turning into `ScrollNodeAndClipChain`.
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct SpaceAndClipInfo {
+ pub spatial_id: SpatialId,
+ pub clip_id: ClipId,
+}
+
+impl SpaceAndClipInfo {
+ /// Create a new space/clip info associated with the root
+ /// scroll frame.
+ pub fn root_scroll(pipeline_id: PipelineId) -> Self {
+ SpaceAndClipInfo {
+ spatial_id: SpatialId::root_scroll_node(pipeline_id),
+ clip_id: ClipId::root(pipeline_id),
+ }
+ }
+}
+
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub enum DisplayItem {
+ // These are the "real content" display items
+ Rectangle(RectangleDisplayItem),
+ ClearRectangle(ClearRectangleDisplayItem),
+ HitTest(HitTestDisplayItem),
+ Text(TextDisplayItem),
+ Line(LineDisplayItem),
+ Border(BorderDisplayItem),
+ BoxShadow(BoxShadowDisplayItem),
+ PushShadow(PushShadowDisplayItem),
+ Gradient(GradientDisplayItem),
+ RadialGradient(RadialGradientDisplayItem),
+ ConicGradient(ConicGradientDisplayItem),
+ Image(ImageDisplayItem),
+ RepeatingImage(RepeatingImageDisplayItem),
+ YuvImage(YuvImageDisplayItem),
+ BackdropFilter(BackdropFilterDisplayItem),
+
+ // Clips
+ RectClip(RectClipDisplayItem),
+ RoundedRectClip(RoundedRectClipDisplayItem),
+ ImageMaskClip(ImageMaskClipDisplayItem),
+ Clip(ClipDisplayItem),
+ ClipChain(ClipChainItem),
+
+ // Spaces and Frames that content can be scoped under.
+ ScrollFrame(ScrollFrameDisplayItem),
+ StickyFrame(StickyFrameDisplayItem),
+ Iframe(IframeDisplayItem),
+ PushReferenceFrame(ReferenceFrameDisplayListItem),
+ PushStackingContext(PushStackingContextDisplayItem),
+
+ // These marker items indicate an array of data follows, to be used for the
+ // next non-marker item.
+ SetGradientStops,
+ SetFilterOps,
+ SetFilterData,
+ SetFilterPrimitives,
+
+ // These marker items terminate a scope introduced by a previous item.
+ PopReferenceFrame,
+ PopStackingContext,
+ PopAllShadows,
+
+ ReuseItems(ItemKey),
+ RetainedItems(ItemKey),
+}
+
+/// This is a "complete" version of the DisplayItem, with all implicit trailing
+/// arrays included, for debug serialization (captures).
+#[cfg(any(feature = "serialize", feature = "deserialize"))]
+#[cfg_attr(feature = "serialize", derive(Serialize))]
+#[cfg_attr(feature = "deserialize", derive(Deserialize))]
+pub enum DebugDisplayItem {
+ Rectangle(RectangleDisplayItem),
+ ClearRectangle(ClearRectangleDisplayItem),
+ HitTest(HitTestDisplayItem),
+ Text(TextDisplayItem, Vec<font::GlyphInstance>),
+ Line(LineDisplayItem),
+ Border(BorderDisplayItem),
+ BoxShadow(BoxShadowDisplayItem),
+ PushShadow(PushShadowDisplayItem),
+ Gradient(GradientDisplayItem),
+ RadialGradient(RadialGradientDisplayItem),
+ ConicGradient(ConicGradientDisplayItem),
+ Image(ImageDisplayItem),
+ RepeatingImage(RepeatingImageDisplayItem),
+ YuvImage(YuvImageDisplayItem),
+ BackdropFilter(BackdropFilterDisplayItem),
+
+ ImageMaskClip(ImageMaskClipDisplayItem),
+ RoundedRectClip(RoundedRectClipDisplayItem),
+ RectClip(RectClipDisplayItem),
+ Clip(ClipDisplayItem, Vec<ComplexClipRegion>),
+ ClipChain(ClipChainItem, Vec<ClipId>),
+
+ ScrollFrame(ScrollFrameDisplayItem),
+ StickyFrame(StickyFrameDisplayItem),
+ Iframe(IframeDisplayItem),
+ PushReferenceFrame(ReferenceFrameDisplayListItem),
+ PushStackingContext(PushStackingContextDisplayItem),
+
+ SetGradientStops(Vec<GradientStop>),
+ SetFilterOps(Vec<FilterOp>),
+ SetFilterData(FilterData),
+ SetFilterPrimitives(Vec<FilterPrimitive>),
+
+ PopReferenceFrame,
+ PopStackingContext,
+ PopAllShadows,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ImageMaskClipDisplayItem {
+ pub id: ClipId,
+ pub parent_space_and_clip: SpaceAndClipInfo,
+ pub image_mask: ImageMask,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct RectClipDisplayItem {
+ pub id: ClipId,
+ pub parent_space_and_clip: SpaceAndClipInfo,
+ pub clip_rect: LayoutRect,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct RoundedRectClipDisplayItem {
+ pub id: ClipId,
+ pub parent_space_and_clip: SpaceAndClipInfo,
+ pub clip: ComplexClipRegion,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ClipDisplayItem {
+ pub id: ClipId,
+ pub parent_space_and_clip: SpaceAndClipInfo,
+ pub clip_rect: LayoutRect,
+} // IMPLICIT: complex_clips: Vec<ComplexClipRegion>
+
+/// The minimum and maximum allowable offset for a sticky frame in a single dimension.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct StickyOffsetBounds {
+ /// The minimum offset for this frame, typically a negative value, which specifies how
+ /// far in the negative direction the sticky frame can offset its contents in this
+ /// dimension.
+ pub min: f32,
+
+ /// The maximum offset for this frame, typically a positive value, which specifies how
+ /// far in the positive direction the sticky frame can offset its contents in this
+ /// dimension.
+ pub max: f32,
+}
+
+impl StickyOffsetBounds {
+ pub fn new(min: f32, max: f32) -> StickyOffsetBounds {
+ StickyOffsetBounds { min, max }
+ }
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct StickyFrameDisplayItem {
+ pub id: SpatialId,
+ pub parent_spatial_id: SpatialId,
+ pub bounds: LayoutRect,
+
+ /// The margins that should be maintained between the edge of the parent viewport and this
+ /// sticky frame. A margin of None indicates that the sticky frame should not stick at all
+ /// to that particular edge of the viewport.
+ pub margins: SideOffsets2D<Option<f32>, LayoutPixel>,
+
+ /// The minimum and maximum vertical offsets for this sticky frame. Ignoring these constraints,
+ /// the sticky frame will continue to stick to the edge of the viewport as its original
+ /// position is scrolled out of view. Constraints specify a maximum and minimum offset from the
+ /// original position relative to non-sticky content within the same scrolling frame.
+ pub vertical_offset_bounds: StickyOffsetBounds,
+
+ /// The minimum and maximum horizontal offsets for this sticky frame. Ignoring these constraints,
+ /// the sticky frame will continue to stick to the edge of the viewport as its original
+ /// position is scrolled out of view. Constraints specify a maximum and minimum offset from the
+ /// original position relative to non-sticky content within the same scrolling frame.
+ pub horizontal_offset_bounds: StickyOffsetBounds,
+
+ /// The amount of offset that has already been applied to the sticky frame. A positive y
+ /// component this field means that a top-sticky item was in a scrollframe that has been
+ /// scrolled down, such that the sticky item's position needed to be offset downwards by
+ /// `previously_applied_offset.y`. A negative y component corresponds to the upward offset
+ /// applied due to bottom-stickiness. The x-axis works analogously.
+ pub previously_applied_offset: LayoutVector2D,
+}
+
+#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub enum ScrollSensitivity {
+ ScriptAndInputEvents,
+ Script,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ScrollFrameDisplayItem {
+ /// The id of the clip this scroll frame creates
+ pub clip_id: ClipId,
+ /// The id of the space this scroll frame creates
+ pub scroll_frame_id: SpatialId,
+ /// The size of the contents this contains (so the backend knows how far it can scroll).
+ // FIXME: this can *probably* just be a size? Origin seems to just get thrown out.
+ pub content_rect: LayoutRect,
+ pub clip_rect: LayoutRect,
+ pub parent_space_and_clip: SpaceAndClipInfo,
+ pub external_id: Option<ExternalScrollId>,
+ pub scroll_sensitivity: ScrollSensitivity,
+ /// The amount this scrollframe has already been scrolled by, in the caller.
+ /// This means that all the display items that are inside the scrollframe
+ /// will have their coordinates shifted by this amount, and this offset
+ /// should be added to those display item coordinates in order to get a
+ /// normalized value that is consistent across display lists.
+ pub external_scroll_offset: LayoutVector2D,
+}
+
+/// A solid or an animating color to draw (may not actually be a rectangle due to complex clips)
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct RectangleDisplayItem {
+ pub common: CommonItemProperties,
+ pub bounds: LayoutRect,
+ pub color: PropertyBinding<ColorF>,
+}
+
+/// Clears all colors from the area, making it possible to cut holes in the window.
+/// (useful for things like the macos frosted-glass effect).
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ClearRectangleDisplayItem {
+ pub common: CommonItemProperties,
+ pub bounds: LayoutRect,
+}
+
+/// A minimal hit-testable item for the parent browser's convenience, and is
+/// slimmer than a RectangleDisplayItem (no color). The existence of this as a
+/// distinct item also makes it easier to inspect/debug display items.
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct HitTestDisplayItem {
+ pub common: CommonItemProperties,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct LineDisplayItem {
+ pub common: CommonItemProperties,
+ /// We need a separate rect from common.clip_rect to encode cute
+ /// tricks that firefox does to make a series of text-decorations seamlessly
+ /// line up -- snapping the decorations to a multiple of their period, and
+ /// then clipping them to their "proper" area. This rect is that "logical"
+ /// snapped area that may be clipped to the right size by the clip_rect.
+ pub area: LayoutRect,
+ /// Whether the rect is interpretted as vertical or horizontal
+ pub orientation: LineOrientation,
+ /// This could potentially be implied from area, but we currently prefer
+ /// that this is the responsibility of the layout engine. Value irrelevant
+ /// for non-wavy lines.
+ // FIXME: this was done before we could use tagged unions in enums, but now
+ // it should just be part of LineStyle::Wavy.
+ pub wavy_line_thickness: f32,
+ pub color: ColorF,
+ pub style: LineStyle,
+}
+
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, PartialEq, Serialize, Eq, Hash, PeekPoke)]
+pub enum LineOrientation {
+ Vertical,
+ Horizontal,
+}
+
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, PartialEq, Serialize, Eq, Hash, PeekPoke)]
+pub enum LineStyle {
+ Solid,
+ Dotted,
+ Dashed,
+ Wavy,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct TextDisplayItem {
+ pub common: CommonItemProperties,
+ /// The area all the glyphs should be found in. Strictly speaking this isn't
+ /// necessarily needed, but layout engines should already "know" this, and we
+ /// use it cull and size things quickly before glyph layout is done. Currently
+ /// the glyphs *can* be outside these bounds, but that should imply they
+ /// can be cut off.
+ // FIXME: these are currently sometimes ignored to keep some old wrench tests
+ // working, but we should really just fix the tests!
+ pub bounds: LayoutRect,
+ pub font_key: font::FontInstanceKey,
+ pub color: ColorF,
+ pub glyph_options: Option<font::GlyphOptions>,
+} // IMPLICIT: glyphs: Vec<font::GlyphInstance>
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub struct NormalBorder {
+ pub left: BorderSide,
+ pub right: BorderSide,
+ pub top: BorderSide,
+ pub bottom: BorderSide,
+ pub radius: BorderRadius,
+ /// Whether to apply anti-aliasing on the border corners.
+ ///
+ /// Note that for this to be `false` and work, this requires the borders to
+ /// be solid, and no border-radius.
+ pub do_aa: bool,
+}
+
+impl NormalBorder {
+ fn can_disable_antialiasing(&self) -> bool {
+ fn is_valid(style: BorderStyle) -> bool {
+ style == BorderStyle::Solid || style == BorderStyle::None
+ }
+
+ self.radius.is_zero() &&
+ is_valid(self.top.style) &&
+ is_valid(self.left.style) &&
+ is_valid(self.bottom.style) &&
+ is_valid(self.right.style)
+ }
+
+ /// Normalizes a border so that we don't render disallowed stuff, like inset
+ /// borders that are less than two pixels wide.
+ #[inline]
+ pub fn normalize(&mut self, widths: &LayoutSideOffsets) {
+ debug_assert!(
+ self.do_aa || self.can_disable_antialiasing(),
+ "Unexpected disabled-antialiasing in a border, likely won't work or will be ignored"
+ );
+
+ #[inline]
+ fn renders_small_border_solid(style: BorderStyle) -> bool {
+ match style {
+ BorderStyle::Groove |
+ BorderStyle::Ridge => true,
+ _ => false,
+ }
+ }
+
+ let normalize_side = |side: &mut BorderSide, width: f32| {
+ if renders_small_border_solid(side.style) && width < 2. {
+ side.style = BorderStyle::Solid;
+ }
+ };
+
+ normalize_side(&mut self.left, widths.left);
+ normalize_side(&mut self.right, widths.right);
+ normalize_side(&mut self.top, widths.top);
+ normalize_side(&mut self.bottom, widths.bottom);
+ }
+}
+
+#[repr(u8)]
+#[derive(Debug, Copy, Clone, MallocSizeOf, PartialEq, Serialize, Deserialize, Eq, Hash, PeekPoke)]
+pub enum RepeatMode {
+ Stretch,
+ Repeat,
+ Round,
+ Space,
+}
+
+#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub enum NinePatchBorderSource {
+ Image(ImageKey),
+ Gradient(Gradient),
+ RadialGradient(RadialGradient),
+ ConicGradient(ConicGradient),
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct NinePatchBorder {
+ /// Describes what to use as the 9-patch source image. If this is an image,
+ /// it will be stretched to fill the size given by width x height.
+ pub source: NinePatchBorderSource,
+
+ /// The width of the 9-part image.
+ pub width: i32,
+
+ /// The height of the 9-part image.
+ pub height: i32,
+
+ /// Distances from each edge where the image should be sliced up. These
+ /// values are in 9-part-image space (the same space as width and height),
+ /// and the resulting image parts will be used to fill the corresponding
+ /// parts of the border as given by the border widths. This can lead to
+ /// stretching.
+ /// Slices can be overlapping. In that case, the same pixels from the
+ /// 9-part image will show up in multiple parts of the resulting border.
+ pub slice: DeviceIntSideOffsets,
+
+ /// Controls whether the center of the 9 patch image is rendered or
+ /// ignored. The center is never rendered if the slices are overlapping.
+ pub fill: bool,
+
+ /// Determines what happens if the horizontal side parts of the 9-part
+ /// image have a different size than the horizontal parts of the border.
+ pub repeat_horizontal: RepeatMode,
+
+ /// Determines what happens if the vertical side parts of the 9-part
+ /// image have a different size than the vertical parts of the border.
+ pub repeat_vertical: RepeatMode,
+
+ /// The outset for the border.
+ /// TODO(mrobinson): This should be removed and handled by the client.
+ pub outset: LayoutSideOffsets, // TODO: what unit is this in?
+}
+
+#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub enum BorderDetails {
+ Normal(NormalBorder),
+ NinePatch(NinePatchBorder),
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct BorderDisplayItem {
+ pub common: CommonItemProperties,
+ pub bounds: LayoutRect,
+ pub widths: LayoutSideOffsets,
+ pub details: BorderDetails,
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub enum BorderRadiusKind {
+ Uniform,
+ NonUniform,
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub struct BorderRadius {
+ pub top_left: LayoutSize,
+ pub top_right: LayoutSize,
+ pub bottom_left: LayoutSize,
+ pub bottom_right: LayoutSize,
+}
+
+impl Default for BorderRadius {
+ fn default() -> Self {
+ BorderRadius {
+ top_left: LayoutSize::zero(),
+ top_right: LayoutSize::zero(),
+ bottom_left: LayoutSize::zero(),
+ bottom_right: LayoutSize::zero(),
+ }
+ }
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub struct BorderSide {
+ pub color: ColorF,
+ pub style: BorderStyle,
+}
+
+#[repr(u32)]
+#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, PartialEq, Serialize, Hash, Eq, PeekPoke)]
+pub enum BorderStyle {
+ None = 0,
+ Solid = 1,
+ Double = 2,
+ Dotted = 3,
+ Dashed = 4,
+ Hidden = 5,
+ Groove = 6,
+ Ridge = 7,
+ Inset = 8,
+ Outset = 9,
+}
+
+impl BorderStyle {
+ pub fn is_hidden(self) -> bool {
+ self == BorderStyle::Hidden || self == BorderStyle::None
+ }
+}
+
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum BoxShadowClipMode {
+ Outset = 0,
+ Inset = 1,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct BoxShadowDisplayItem {
+ pub common: CommonItemProperties,
+ pub box_bounds: LayoutRect,
+ pub offset: LayoutVector2D,
+ pub color: ColorF,
+ pub blur_radius: f32,
+ pub spread_radius: f32,
+ pub border_radius: BorderRadius,
+ pub clip_mode: BoxShadowClipMode,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct PushShadowDisplayItem {
+ pub space_and_clip: SpaceAndClipInfo,
+ pub shadow: Shadow,
+ pub should_inflate: bool,
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct Shadow {
+ pub offset: LayoutVector2D,
+ pub color: ColorF,
+ pub blur_radius: f32,
+}
+
+#[repr(u8)]
+#[derive(Debug, Copy, Clone, Hash, Eq, MallocSizeOf, PartialEq, Serialize, Deserialize, Ord, PartialOrd, PeekPoke)]
+pub enum ExtendMode {
+ Clamp,
+ Repeat,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct Gradient {
+ pub start_point: LayoutPoint,
+ pub end_point: LayoutPoint,
+ pub extend_mode: ExtendMode,
+} // IMPLICIT: stops: Vec<GradientStop>
+
+/// The area
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct GradientDisplayItem {
+ /// NOTE: common.clip_rect is the area the gradient covers
+ pub common: CommonItemProperties,
+ /// The area to tile the gradient over (first tile starts at origin of this rect)
+ // FIXME: this should ideally just be `tile_origin` here, with the clip_rect
+ // defining the bounds of the item. Needs non-trivial backend changes.
+ pub bounds: LayoutRect,
+ /// How big a tile of the of the gradient should be (common case: bounds.size)
+ pub tile_size: LayoutSize,
+ /// The space between tiles of the gradient (common case: 0)
+ pub tile_spacing: LayoutSize,
+ pub gradient: Gradient,
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub struct GradientStop {
+ pub offset: f32,
+ pub color: ColorF,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct RadialGradient {
+ pub center: LayoutPoint,
+ pub radius: LayoutSize,
+ pub start_offset: f32,
+ pub end_offset: f32,
+ pub extend_mode: ExtendMode,
+} // IMPLICIT stops: Vec<GradientStop>
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ConicGradient {
+ pub center: LayoutPoint,
+ pub angle: f32,
+ pub start_offset: f32,
+ pub end_offset: f32,
+ pub extend_mode: ExtendMode,
+} // IMPLICIT stops: Vec<GradientStop>
+
+/// Just an abstraction for bundling up a bunch of clips into a "super clip".
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ClipChainItem {
+ pub id: ClipChainId,
+ pub parent: Option<ClipChainId>,
+} // IMPLICIT clip_ids: Vec<ClipId>
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct RadialGradientDisplayItem {
+ pub common: CommonItemProperties,
+ /// The area to tile the gradient over (first tile starts at origin of this rect)
+ // FIXME: this should ideally just be `tile_origin` here, with the clip_rect
+ // defining the bounds of the item. Needs non-trivial backend changes.
+ pub bounds: LayoutRect,
+ pub gradient: RadialGradient,
+ pub tile_size: LayoutSize,
+ pub tile_spacing: LayoutSize,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ConicGradientDisplayItem {
+ pub common: CommonItemProperties,
+ /// The area to tile the gradient over (first tile starts at origin of this rect)
+ // FIXME: this should ideally just be `tile_origin` here, with the clip_rect
+ // defining the bounds of the item. Needs non-trivial backend changes.
+ pub bounds: LayoutRect,
+ pub gradient: ConicGradient,
+ pub tile_size: LayoutSize,
+ pub tile_spacing: LayoutSize,
+}
+
+/// Renders a filtered region of its backdrop
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct BackdropFilterDisplayItem {
+ pub common: CommonItemProperties,
+}
+// IMPLICIT: filters: Vec<FilterOp>, filter_datas: Vec<FilterData>, filter_primitives: Vec<FilterPrimitive>
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ReferenceFrameDisplayListItem {
+ pub origin: LayoutPoint,
+ pub parent_spatial_id: SpatialId,
+ pub reference_frame: ReferenceFrame,
+}
+
+#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub enum ReferenceFrameKind {
+ /// Zoom reference frames must be a scale + translation only
+ Zoom,
+ /// A normal transform matrix, may contain perspective (the CSS transform property)
+ Transform,
+ /// A perspective transform, that optionally scrolls relative to a specific scroll node
+ Perspective {
+ scrolling_relative_to: Option<ExternalScrollId>,
+ }
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ReferenceFrame {
+ pub kind: ReferenceFrameKind,
+ pub transform_style: TransformStyle,
+ /// The transform matrix, either the perspective matrix or the transform
+ /// matrix.
+ pub transform: PropertyBinding<LayoutTransform>,
+ pub id: SpatialId,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct PushStackingContextDisplayItem {
+ pub origin: LayoutPoint,
+ pub spatial_id: SpatialId,
+ pub prim_flags: PrimitiveFlags,
+ pub stacking_context: StackingContext,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct StackingContext {
+ pub transform_style: TransformStyle,
+ pub mix_blend_mode: MixBlendMode,
+ pub clip_id: Option<ClipId>,
+ pub raster_space: RasterSpace,
+ pub flags: StackingContextFlags,
+}
+// IMPLICIT: filters: Vec<FilterOp>, filter_datas: Vec<FilterData>, filter_primitives: Vec<FilterPrimitive>
+
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize, PeekPoke)]
+pub enum TransformStyle {
+ Flat = 0,
+ Preserve3D = 1,
+}
+
+/// Configure whether the contents of a stacking context
+/// should be rasterized in local space or screen space.
+/// Local space rasterized pictures are typically used
+/// when we want to cache the output, and performance is
+/// important. Note that this is a performance hint only,
+/// which WR may choose to ignore.
+#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize, PeekPoke)]
+#[repr(u8)]
+pub enum RasterSpace {
+ // Rasterize in local-space, applying supplied scale to primitives.
+ // Best performance, but lower quality.
+ Local(f32),
+
+ // Rasterize the picture in screen-space, including rotation / skew etc in
+ // the rasterized element. Best quality, but slower performance. Note that
+ // any stacking context with a perspective transform will be rasterized
+ // in local-space, even if this is set.
+ Screen,
+}
+
+impl RasterSpace {
+ pub fn local_scale(self) -> Option<f32> {
+ match self {
+ RasterSpace::Local(scale) => Some(scale),
+ RasterSpace::Screen => None,
+ }
+ }
+}
+
+bitflags! {
+ #[repr(C)]
+ #[derive(Deserialize, MallocSizeOf, Serialize, PeekPoke)]
+ pub struct StackingContextFlags: u8 {
+ /// If true, this stacking context represents a backdrop root, per the CSS
+ /// filter-effects specification (see https://drafts.fxtf.org/filter-effects-2/#BackdropRoot).
+ const IS_BACKDROP_ROOT = 1 << 0;
+ /// If true, this stacking context is a blend container than contains
+ /// mix-blend-mode children (and should thus be isolated).
+ const IS_BLEND_CONTAINER = 1 << 1;
+ }
+}
+
+impl Default for StackingContextFlags {
+ fn default() -> Self {
+ StackingContextFlags::empty()
+ }
+}
+
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum MixBlendMode {
+ Normal = 0,
+ Multiply = 1,
+ Screen = 2,
+ Overlay = 3,
+ Darken = 4,
+ Lighten = 5,
+ ColorDodge = 6,
+ ColorBurn = 7,
+ HardLight = 8,
+ SoftLight = 9,
+ Difference = 10,
+ Exclusion = 11,
+ Hue = 12,
+ Saturation = 13,
+ Color = 14,
+ Luminosity = 15,
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum ColorSpace {
+ Srgb,
+ LinearRgb,
+}
+
+/// Available composite operoations for the composite filter primitive
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum CompositeOperator {
+ Over,
+ In,
+ Atop,
+ Out,
+ Xor,
+ Lighter,
+ Arithmetic([f32; 4]),
+}
+
+impl CompositeOperator {
+ // This must stay in sync with the composite operator defines in cs_svg_filter.glsl
+ pub fn as_int(&self) -> u32 {
+ match self {
+ CompositeOperator::Over => 0,
+ CompositeOperator::In => 1,
+ CompositeOperator::Out => 2,
+ CompositeOperator::Atop => 3,
+ CompositeOperator::Xor => 4,
+ CompositeOperator::Lighter => 5,
+ CompositeOperator::Arithmetic(..) => 6,
+ }
+ }
+}
+
+/// An input to a SVG filter primitive.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum FilterPrimitiveInput {
+ /// The input is the original graphic that the filter is being applied to.
+ Original,
+ /// The input is the output of the previous filter primitive in the filter primitive chain.
+ Previous,
+ /// The input is the output of the filter primitive at the given index in the filter primitive chain.
+ OutputOfPrimitiveIndex(usize),
+}
+
+impl FilterPrimitiveInput {
+ /// Gets the index of the input.
+ /// Returns `None` if the source graphic is the input.
+ pub fn to_index(self, cur_index: usize) -> Option<usize> {
+ match self {
+ FilterPrimitiveInput::Previous if cur_index > 0 => Some(cur_index - 1),
+ FilterPrimitiveInput::OutputOfPrimitiveIndex(index) => Some(index),
+ _ => None,
+ }
+ }
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct BlendPrimitive {
+ pub input1: FilterPrimitiveInput,
+ pub input2: FilterPrimitiveInput,
+ pub mode: MixBlendMode,
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct FloodPrimitive {
+ pub color: ColorF,
+}
+
+impl FloodPrimitive {
+ pub fn sanitize(&mut self) {
+ self.color.r = self.color.r.min(1.0).max(0.0);
+ self.color.g = self.color.g.min(1.0).max(0.0);
+ self.color.b = self.color.b.min(1.0).max(0.0);
+ self.color.a = self.color.a.min(1.0).max(0.0);
+ }
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct BlurPrimitive {
+ pub input: FilterPrimitiveInput,
+ pub radius: f32,
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct OpacityPrimitive {
+ pub input: FilterPrimitiveInput,
+ pub opacity: f32,
+}
+
+impl OpacityPrimitive {
+ pub fn sanitize(&mut self) {
+ self.opacity = self.opacity.min(1.0).max(0.0);
+ }
+}
+
+/// cbindgen:derive-eq=false
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ColorMatrixPrimitive {
+ pub input: FilterPrimitiveInput,
+ pub matrix: [f32; 20],
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct DropShadowPrimitive {
+ pub input: FilterPrimitiveInput,
+ pub shadow: Shadow,
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ComponentTransferPrimitive {
+ pub input: FilterPrimitiveInput,
+ // Component transfer data is stored in FilterData.
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct IdentityPrimitive {
+ pub input: FilterPrimitiveInput,
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct OffsetPrimitive {
+ pub input: FilterPrimitiveInput,
+ pub offset: LayoutVector2D,
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct CompositePrimitive {
+ pub input1: FilterPrimitiveInput,
+ pub input2: FilterPrimitiveInput,
+ pub operator: CompositeOperator,
+}
+
+/// See: https://github.com/eqrion/cbindgen/issues/9
+/// cbindgen:derive-eq=false
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub enum FilterPrimitiveKind {
+ Identity(IdentityPrimitive),
+ Blend(BlendPrimitive),
+ Flood(FloodPrimitive),
+ Blur(BlurPrimitive),
+ // TODO: Support animated opacity?
+ Opacity(OpacityPrimitive),
+ /// cbindgen:derive-eq=false
+ ColorMatrix(ColorMatrixPrimitive),
+ DropShadow(DropShadowPrimitive),
+ ComponentTransfer(ComponentTransferPrimitive),
+ Offset(OffsetPrimitive),
+ Composite(CompositePrimitive),
+}
+
+impl Default for FilterPrimitiveKind {
+ fn default() -> Self {
+ FilterPrimitiveKind::Identity(IdentityPrimitive::default())
+ }
+}
+
+impl FilterPrimitiveKind {
+ pub fn sanitize(&mut self) {
+ match self {
+ FilterPrimitiveKind::Flood(flood) => flood.sanitize(),
+ FilterPrimitiveKind::Opacity(opacity) => opacity.sanitize(),
+
+ // No sanitization needed.
+ FilterPrimitiveKind::Identity(..) |
+ FilterPrimitiveKind::Blend(..) |
+ FilterPrimitiveKind::ColorMatrix(..) |
+ FilterPrimitiveKind::Offset(..) |
+ FilterPrimitiveKind::Composite(..) |
+ FilterPrimitiveKind::Blur(..) |
+ FilterPrimitiveKind::DropShadow(..) |
+ // Component transfer's filter data is sanitized separately.
+ FilterPrimitiveKind::ComponentTransfer(..) => {}
+ }
+ }
+}
+
+/// SVG Filter Primitive.
+/// See: https://github.com/eqrion/cbindgen/issues/9
+/// cbindgen:derive-eq=false
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct FilterPrimitive {
+ pub kind: FilterPrimitiveKind,
+ pub color_space: ColorSpace,
+}
+
+impl FilterPrimitive {
+ pub fn sanitize(&mut self) {
+ self.kind.sanitize();
+ }
+}
+
+/// CSS filter.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize, PeekPoke)]
+pub enum FilterOp {
+ /// Filter that does no transformation of the colors, needed for
+ /// debug purposes only.
+ Identity,
+ Blur(f32),
+ Brightness(f32),
+ Contrast(f32),
+ Grayscale(f32),
+ HueRotate(f32),
+ Invert(f32),
+ Opacity(PropertyBinding<f32>, f32),
+ Saturate(f32),
+ Sepia(f32),
+ DropShadow(Shadow),
+ ColorMatrix([f32; 20]),
+ SrgbToLinear,
+ LinearToSrgb,
+ ComponentTransfer,
+ Flood(ColorF),
+}
+
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize, PeekPoke)]
+pub enum ComponentTransferFuncType {
+ Identity = 0,
+ Table = 1,
+ Discrete = 2,
+ Linear = 3,
+ Gamma = 4,
+}
+
+#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
+pub struct FilterData {
+ pub func_r_type: ComponentTransferFuncType,
+ pub r_values: Vec<f32>,
+ pub func_g_type: ComponentTransferFuncType,
+ pub g_values: Vec<f32>,
+ pub func_b_type: ComponentTransferFuncType,
+ pub b_values: Vec<f32>,
+ pub func_a_type: ComponentTransferFuncType,
+ pub a_values: Vec<f32>,
+}
+
+fn sanitize_func_type(
+ func_type: ComponentTransferFuncType,
+ values: &[f32],
+) -> ComponentTransferFuncType {
+ if values.is_empty() {
+ return ComponentTransferFuncType::Identity;
+ }
+ if values.len() < 2 && func_type == ComponentTransferFuncType::Linear {
+ return ComponentTransferFuncType::Identity;
+ }
+ if values.len() < 3 && func_type == ComponentTransferFuncType::Gamma {
+ return ComponentTransferFuncType::Identity;
+ }
+ func_type
+}
+
+fn sanitize_values(
+ func_type: ComponentTransferFuncType,
+ values: &[f32],
+) -> bool {
+ if values.len() < 2 && func_type == ComponentTransferFuncType::Linear {
+ return false;
+ }
+ if values.len() < 3 && func_type == ComponentTransferFuncType::Gamma {
+ return false;
+ }
+ true
+}
+
+impl FilterData {
+ /// Ensure that the number of values matches up with the function type.
+ pub fn sanitize(&self) -> FilterData {
+ FilterData {
+ func_r_type: sanitize_func_type(self.func_r_type, &self.r_values),
+ r_values:
+ if sanitize_values(self.func_r_type, &self.r_values) {
+ self.r_values.clone()
+ } else {
+ Vec::new()
+ },
+ func_g_type: sanitize_func_type(self.func_g_type, &self.g_values),
+ g_values:
+ if sanitize_values(self.func_g_type, &self.g_values) {
+ self.g_values.clone()
+ } else {
+ Vec::new()
+ },
+
+ func_b_type: sanitize_func_type(self.func_b_type, &self.b_values),
+ b_values:
+ if sanitize_values(self.func_b_type, &self.b_values) {
+ self.b_values.clone()
+ } else {
+ Vec::new()
+ },
+
+ func_a_type: sanitize_func_type(self.func_a_type, &self.a_values),
+ a_values:
+ if sanitize_values(self.func_a_type, &self.a_values) {
+ self.a_values.clone()
+ } else {
+ Vec::new()
+ },
+
+ }
+ }
+
+ pub fn is_identity(&self) -> bool {
+ self.func_r_type == ComponentTransferFuncType::Identity &&
+ self.func_g_type == ComponentTransferFuncType::Identity &&
+ self.func_b_type == ComponentTransferFuncType::Identity &&
+ self.func_a_type == ComponentTransferFuncType::Identity
+ }
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct IframeDisplayItem {
+ pub bounds: LayoutRect,
+ pub clip_rect: LayoutRect,
+ pub space_and_clip: SpaceAndClipInfo,
+ pub pipeline_id: PipelineId,
+ pub ignore_missing_pipeline: bool,
+}
+
+/// This describes an image that fills the specified area. It stretches or shrinks
+/// the image as necessary. While RepeatingImageDisplayItem could otherwise provide
+/// a superset of the functionality, it has been problematic inferring the desired
+/// repetition properties when snapping changes the size of the primitive.
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ImageDisplayItem {
+ pub common: CommonItemProperties,
+ /// The area to tile the image over (first tile starts at origin of this rect)
+ // FIXME: this should ideally just be `tile_origin` here, with the clip_rect
+ // defining the bounds of the item. Needs non-trivial backend changes.
+ pub bounds: LayoutRect,
+ pub image_key: ImageKey,
+ pub image_rendering: ImageRendering,
+ pub alpha_type: AlphaType,
+ /// A hack used by gecko to color a simple bitmap font used for tofu glyphs
+ pub color: ColorF,
+}
+
+/// This describes a background-image and its tiling. It repeats in a grid to fill
+/// the specified area.
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct RepeatingImageDisplayItem {
+ pub common: CommonItemProperties,
+ /// The area to tile the image over (first tile starts at origin of this rect)
+ // FIXME: this should ideally just be `tile_origin` here, with the clip_rect
+ // defining the bounds of the item. Needs non-trivial backend changes.
+ pub bounds: LayoutRect,
+ /// How large to make a single tile of the image (common case: bounds.size)
+ pub stretch_size: LayoutSize,
+ /// The space between tiles (common case: 0)
+ pub tile_spacing: LayoutSize,
+ pub image_key: ImageKey,
+ pub image_rendering: ImageRendering,
+ pub alpha_type: AlphaType,
+ /// A hack used by gecko to color a simple bitmap font used for tofu glyphs
+ pub color: ColorF,
+}
+
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum ImageRendering {
+ Auto = 0,
+ CrispEdges = 1,
+ Pixelated = 2,
+}
+
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum AlphaType {
+ Alpha = 0,
+ PremultipliedAlpha = 1,
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct YuvImageDisplayItem {
+ pub common: CommonItemProperties,
+ pub bounds: LayoutRect,
+ pub yuv_data: YuvData,
+ pub color_depth: ColorDepth,
+ pub color_space: YuvColorSpace,
+ pub color_range: ColorRange,
+ pub image_rendering: ImageRendering,
+}
+
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum YuvColorSpace {
+ Rec601 = 0,
+ Rec709 = 1,
+ Rec2020 = 2,
+}
+
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum ColorRange {
+ Limited = 0,
+ Full = 1,
+}
+
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize, PeekPoke)]
+pub enum YuvData {
+ NV12(ImageKey, ImageKey), // (Y channel, CbCr interleaved channel)
+ PlanarYCbCr(ImageKey, ImageKey, ImageKey), // (Y channel, Cb channel, Cr Channel)
+ InterleavedYCbCr(ImageKey), // (YCbCr interleaved channel)
+}
+
+impl YuvData {
+ pub fn get_format(&self) -> YuvFormat {
+ match *self {
+ YuvData::NV12(..) => YuvFormat::NV12,
+ YuvData::PlanarYCbCr(..) => YuvFormat::PlanarYCbCr,
+ YuvData::InterleavedYCbCr(..) => YuvFormat::InterleavedYCbCr,
+ }
+ }
+}
+
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum YuvFormat {
+ NV12 = 0,
+ PlanarYCbCr = 1,
+ InterleavedYCbCr = 2,
+}
+
+impl YuvFormat {
+ pub fn get_plane_num(self) -> usize {
+ match self {
+ YuvFormat::NV12 => 2,
+ YuvFormat::PlanarYCbCr => 3,
+ YuvFormat::InterleavedYCbCr => 1,
+ }
+ }
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ImageMask {
+ pub image: ImageKey,
+ pub rect: LayoutRect,
+ pub repeat: bool,
+}
+
+impl ImageMask {
+ /// Get a local clipping rect contributed by this mask.
+ pub fn get_local_clip_rect(&self) -> Option<LayoutRect> {
+ if self.repeat {
+ None
+ } else {
+ Some(self.rect)
+ }
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone, Debug, MallocSizeOf, PartialEq, Serialize, Deserialize, Eq, Hash, PeekPoke)]
+pub enum ClipMode {
+ Clip, // Pixels inside the region are visible.
+ ClipOut, // Pixels outside the region are visible.
+}
+
+impl Not for ClipMode {
+ type Output = ClipMode;
+
+ fn not(self) -> ClipMode {
+ match self {
+ ClipMode::Clip => ClipMode::ClipOut,
+ ClipMode::ClipOut => ClipMode::Clip,
+ }
+ }
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
+pub struct ComplexClipRegion {
+ /// The boundaries of the rectangle.
+ pub rect: LayoutRect,
+ /// Border radii of this rectangle.
+ pub radii: BorderRadius,
+ /// Whether we are clipping inside or outside
+ /// the region.
+ pub mode: ClipMode,
+}
+
+impl BorderRadius {
+ pub fn zero() -> BorderRadius {
+ BorderRadius {
+ top_left: LayoutSize::new(0.0, 0.0),
+ top_right: LayoutSize::new(0.0, 0.0),
+ bottom_left: LayoutSize::new(0.0, 0.0),
+ bottom_right: LayoutSize::new(0.0, 0.0),
+ }
+ }
+
+ pub fn uniform(radius: f32) -> BorderRadius {
+ BorderRadius {
+ top_left: LayoutSize::new(radius, radius),
+ top_right: LayoutSize::new(radius, radius),
+ bottom_left: LayoutSize::new(radius, radius),
+ bottom_right: LayoutSize::new(radius, radius),
+ }
+ }
+
+ pub fn uniform_size(radius: LayoutSize) -> BorderRadius {
+ BorderRadius {
+ top_left: radius,
+ top_right: radius,
+ bottom_left: radius,
+ bottom_right: radius,
+ }
+ }
+
+ pub fn is_uniform(&self) -> Option<f32> {
+ match self.is_uniform_size() {
+ Some(radius) if radius.width == radius.height => Some(radius.width),
+ _ => None,
+ }
+ }
+
+ pub fn is_uniform_size(&self) -> Option<LayoutSize> {
+ let uniform_radius = self.top_left;
+ if self.top_right == uniform_radius && self.bottom_left == uniform_radius &&
+ self.bottom_right == uniform_radius
+ {
+ Some(uniform_radius)
+ } else {
+ None
+ }
+ }
+
+ /// Return whether, in each corner, the radius in *either* direction is zero.
+ /// This means that none of the corners are rounded.
+ pub fn is_zero(&self) -> bool {
+ let corner_is_zero = |corner: &LayoutSize| corner.width == 0.0 || corner.height == 0.0;
+ corner_is_zero(&self.top_left) &&
+ corner_is_zero(&self.top_right) &&
+ corner_is_zero(&self.bottom_right) &&
+ corner_is_zero(&self.bottom_left)
+ }
+}
+
+impl ComplexClipRegion {
+ /// Create a new complex clip region.
+ pub fn new(
+ rect: LayoutRect,
+ radii: BorderRadius,
+ mode: ClipMode,
+ ) -> Self {
+ ComplexClipRegion { rect, radii, mode }
+ }
+}
+
+impl ComplexClipRegion {
+ /// Get a local clipping rect contributed by this clip region.
+ pub fn get_local_clip_rect(&self) -> Option<LayoutRect> {
+ match self.mode {
+ ClipMode::Clip => {
+ Some(self.rect)
+ }
+ ClipMode::ClipOut => {
+ None
+ }
+ }
+ }
+}
+
+#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize, PeekPoke)]
+pub struct ClipChainId(pub u64, pub PipelineId);
+
+/// A reference to a clipping node defining how an item is clipped.
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize, PeekPoke)]
+pub enum ClipId {
+ Clip(usize, PipelineId),
+ ClipChain(ClipChainId),
+}
+
+const ROOT_CLIP_ID: usize = 0;
+
+impl ClipId {
+ /// Return the root clip ID - effectively doing no clipping.
+ pub fn root(pipeline_id: PipelineId) -> Self {
+ ClipId::Clip(ROOT_CLIP_ID, pipeline_id)
+ }
+
+ /// Return an invalid clip ID - needed in places where we carry
+ /// one but need to not attempt to use it.
+ pub fn invalid() -> Self {
+ ClipId::Clip(!0, PipelineId::dummy())
+ }
+
+ pub fn pipeline_id(&self) -> PipelineId {
+ match *self {
+ ClipId::Clip(_, pipeline_id) |
+ ClipId::ClipChain(ClipChainId(_, pipeline_id)) => pipeline_id,
+ }
+ }
+
+ pub fn is_root(&self) -> bool {
+ match *self {
+ ClipId::Clip(id, _) => id == ROOT_CLIP_ID,
+ ClipId::ClipChain(_) => false,
+ }
+ }
+
+ pub fn is_valid(&self) -> bool {
+ match *self {
+ ClipId::Clip(id, _) => id != !0,
+ _ => true,
+ }
+ }
+}
+
+/// A reference to a spatial node defining item positioning.
+#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize, PeekPoke)]
+pub struct SpatialId(pub usize, PipelineId);
+
+const ROOT_REFERENCE_FRAME_SPATIAL_ID: usize = 0;
+const ROOT_SCROLL_NODE_SPATIAL_ID: usize = 1;
+
+impl SpatialId {
+ pub fn new(spatial_node_index: usize, pipeline_id: PipelineId) -> Self {
+ SpatialId(spatial_node_index, pipeline_id)
+ }
+
+ pub fn root_reference_frame(pipeline_id: PipelineId) -> Self {
+ SpatialId(ROOT_REFERENCE_FRAME_SPATIAL_ID, pipeline_id)
+ }
+
+ pub fn root_scroll_node(pipeline_id: PipelineId) -> Self {
+ SpatialId(ROOT_SCROLL_NODE_SPATIAL_ID, pipeline_id)
+ }
+
+ pub fn pipeline_id(&self) -> PipelineId {
+ self.1
+ }
+
+ pub fn is_root_reference_frame(&self) -> bool {
+ self.0 == ROOT_REFERENCE_FRAME_SPATIAL_ID
+ }
+
+ pub fn is_root_scroll_node(&self) -> bool {
+ self.0 == ROOT_SCROLL_NODE_SPATIAL_ID
+ }
+}
+
+/// An external identifier that uniquely identifies a scroll frame independent of its ClipId, which
+/// may change from frame to frame. This should be unique within a pipeline. WebRender makes no
+/// attempt to ensure uniqueness. The zero value is reserved for use by the root scroll node of
+/// every pipeline, which always has an external id.
+///
+/// When setting display lists with the `preserve_frame_state` this id is used to preserve scroll
+/// offsets between different sets of SpatialNodes which are ScrollFrames.
+#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize, PeekPoke)]
+#[repr(C)]
+pub struct ExternalScrollId(pub u64, pub PipelineId);
+
+impl ExternalScrollId {
+ pub fn pipeline_id(&self) -> PipelineId {
+ self.1
+ }
+
+ pub fn is_root(&self) -> bool {
+ self.0 == 0
+ }
+}
+
+impl DisplayItem {
+ pub fn debug_name(&self) -> &'static str {
+ match *self {
+ DisplayItem::Border(..) => "border",
+ DisplayItem::BoxShadow(..) => "box_shadow",
+ DisplayItem::ClearRectangle(..) => "clear_rectangle",
+ DisplayItem::HitTest(..) => "hit_test",
+ DisplayItem::RectClip(..) => "rect_clip",
+ DisplayItem::RoundedRectClip(..) => "rounded_rect_clip",
+ DisplayItem::ImageMaskClip(..) => "image_mask_clip",
+ DisplayItem::Clip(..) => "clip",
+ DisplayItem::ClipChain(..) => "clip_chain",
+ DisplayItem::ConicGradient(..) => "conic_gradient",
+ DisplayItem::Gradient(..) => "gradient",
+ DisplayItem::Iframe(..) => "iframe",
+ DisplayItem::Image(..) => "image",
+ DisplayItem::RepeatingImage(..) => "repeating_image",
+ DisplayItem::Line(..) => "line",
+ DisplayItem::PopAllShadows => "pop_all_shadows",
+ DisplayItem::PopReferenceFrame => "pop_reference_frame",
+ DisplayItem::PopStackingContext => "pop_stacking_context",
+ DisplayItem::PushShadow(..) => "push_shadow",
+ DisplayItem::PushReferenceFrame(..) => "push_reference_frame",
+ DisplayItem::PushStackingContext(..) => "push_stacking_context",
+ DisplayItem::SetFilterOps => "set_filter_ops",
+ DisplayItem::SetFilterData => "set_filter_data",
+ DisplayItem::SetFilterPrimitives => "set_filter_primitives",
+ DisplayItem::RadialGradient(..) => "radial_gradient",
+ DisplayItem::Rectangle(..) => "rectangle",
+ DisplayItem::ScrollFrame(..) => "scroll_frame",
+ DisplayItem::SetGradientStops => "set_gradient_stops",
+ DisplayItem::ReuseItems(..) => "reuse_item",
+ DisplayItem::RetainedItems(..) => "retained_items",
+ DisplayItem::StickyFrame(..) => "sticky_frame",
+ DisplayItem::Text(..) => "text",
+ DisplayItem::YuvImage(..) => "yuv_image",
+ DisplayItem::BackdropFilter(..) => "backdrop_filter",
+ }
+ }
+}
+
+macro_rules! impl_default_for_enums {
+ ($($enum:ident => $init:expr ),+) => {
+ $(impl Default for $enum {
+ #[allow(unused_imports)]
+ fn default() -> Self {
+ use $enum::*;
+ $init
+ }
+ })*
+ }
+}
+
+impl_default_for_enums! {
+ DisplayItem => PopStackingContext,
+ ScrollSensitivity => ScriptAndInputEvents,
+ LineOrientation => Vertical,
+ LineStyle => Solid,
+ RepeatMode => Stretch,
+ NinePatchBorderSource => Image(ImageKey::default()),
+ BorderDetails => Normal(NormalBorder::default()),
+ BorderRadiusKind => Uniform,
+ BorderStyle => None,
+ BoxShadowClipMode => Outset,
+ ExtendMode => Clamp,
+ FilterOp => Identity,
+ ComponentTransferFuncType => Identity,
+ ClipMode => Clip,
+ ClipId => ClipId::invalid(),
+ ReferenceFrameKind => Transform,
+ TransformStyle => Flat,
+ RasterSpace => Local(f32::default()),
+ MixBlendMode => Normal,
+ ImageRendering => Auto,
+ AlphaType => Alpha,
+ YuvColorSpace => Rec601,
+ ColorRange => Limited,
+ YuvData => NV12(ImageKey::default(), ImageKey::default()),
+ YuvFormat => NV12,
+ FilterPrimitiveInput => Original,
+ ColorSpace => Srgb,
+ CompositeOperator => Over
+}
diff --git a/third_party/webrender/webrender_api/src/display_item_cache.rs b/third_party/webrender/webrender_api/src/display_item_cache.rs
new file mode 100644
index 00000000000..169e54797a9
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/display_item_cache.rs
@@ -0,0 +1,115 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use crate::display_item::*;
+use crate::display_list::*;
+use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
+
+#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
+pub struct CachedDisplayItem {
+ item: DisplayItem,
+ data: Vec<u8>,
+}
+
+impl CachedDisplayItem {
+ pub fn display_item(&self) -> &DisplayItem {
+ &self.item
+ }
+
+ pub fn data_as_item_range<T>(&self) -> ItemRange<T> {
+ ItemRange::new(&self.data)
+ }
+}
+
+impl MallocSizeOf for CachedDisplayItem {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.data.size_of(ops)
+ }
+}
+
+impl From<DisplayItemRef<'_, '_>> for CachedDisplayItem {
+ fn from(item_ref: DisplayItemRef) -> Self {
+ let item = item_ref.item();
+
+ match item {
+ DisplayItem::Text(..) => CachedDisplayItem {
+ item: *item,
+ data: item_ref.glyphs().bytes().to_vec(),
+ },
+ _ => CachedDisplayItem {
+ item: *item,
+ data: Vec::new(),
+ },
+ }
+ }
+}
+
+#[derive(Clone, Deserialize, MallocSizeOf, Serialize)]
+struct CacheEntry {
+ items: Vec<CachedDisplayItem>,
+ occupied: bool,
+}
+
+#[derive(Clone, Deserialize, MallocSizeOf, Serialize)]
+pub struct DisplayItemCache {
+ entries: Vec<CacheEntry>,
+}
+
+impl DisplayItemCache {
+ fn add_item(&mut self, key: ItemKey, item: CachedDisplayItem) {
+ let mut entry = &mut self.entries[key as usize];
+ entry.items.push(item);
+ entry.occupied = true;
+ }
+
+ fn clear_entry(&mut self, key: ItemKey) {
+ let mut entry = &mut self.entries[key as usize];
+ entry.items.clear();
+ entry.occupied = false;
+ }
+
+ fn grow_if_needed(&mut self, capacity: usize) {
+ if capacity > self.entries.len() {
+ self.entries.resize_with(capacity, || CacheEntry {
+ items: Vec::new(),
+ occupied: false,
+ });
+ }
+ }
+
+ pub fn get_items(&self, key: ItemKey) -> &[CachedDisplayItem] {
+ let entry = &self.entries[key as usize];
+ debug_assert!(entry.occupied);
+ entry.items.as_slice()
+ }
+
+ pub fn new() -> Self {
+ Self {
+ entries: Vec::new(),
+ }
+ }
+
+ pub fn update(&mut self, display_list: &BuiltDisplayList) {
+ self.grow_if_needed(display_list.cache_size());
+
+ let mut iter = display_list.extra_data_iter();
+ let mut current_key: Option<ItemKey> = None;
+ loop {
+ let item = match iter.next() {
+ Some(item) => item,
+ None => break,
+ };
+
+ if let DisplayItem::RetainedItems(key) = item.item() {
+ current_key = Some(*key);
+ self.clear_entry(*key);
+ continue;
+ }
+
+ let key = current_key.expect("Missing RetainedItems marker");
+ let cached_item = CachedDisplayItem::from(item);
+ self.add_item(key, cached_item);
+ }
+ }
+}
diff --git a/third_party/webrender/webrender_api/src/display_list.rs b/third_party/webrender/webrender_api/src/display_list.rs
new file mode 100644
index 00000000000..0680a9875d3
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/display_list.rs
@@ -0,0 +1,1969 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use euclid::SideOffsets2D;
+use peek_poke::{ensure_red_zone, peek_from_slice, poke_extend_vec};
+use peek_poke::{poke_inplace_slice, poke_into_vec, Poke};
+#[cfg(feature = "deserialize")]
+use serde::de::Deserializer;
+#[cfg(feature = "serialize")]
+use serde::ser::{Serializer, SerializeSeq};
+use serde::{Deserialize, Serialize};
+use std::io::Write;
+use std::marker::PhantomData;
+use std::ops::Range;
+use std::mem;
+use std::collections::HashMap;
+use time::precise_time_ns;
+use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
+// local imports
+use crate::display_item as di;
+use crate::display_item_cache::*;
+use crate::api::{PipelineId, PropertyBinding};
+use crate::gradient_builder::GradientBuilder;
+use crate::color::ColorF;
+use crate::font::{FontInstanceKey, GlyphInstance, GlyphOptions};
+use crate::image::{ColorDepth, ImageKey};
+use crate::units::*;
+
+
+// We don't want to push a long text-run. If a text-run is too long, split it into several parts.
+// This needs to be set to (renderer::MAX_VERTEX_TEXTURE_WIDTH - VECS_PER_TEXT_RUN) * 2
+pub const MAX_TEXT_RUN_LENGTH: usize = 2040;
+
+// See ROOT_REFERENCE_FRAME_SPATIAL_ID and ROOT_SCROLL_NODE_SPATIAL_ID
+// TODO(mrobinson): It would be a good idea to eliminate the root scroll frame which is only
+// used by Servo.
+const FIRST_SPATIAL_NODE_INDEX: usize = 2;
+
+// See ROOT_SCROLL_NODE_SPATIAL_ID
+const FIRST_CLIP_NODE_INDEX: usize = 1;
+
+#[repr(C)]
+#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
+pub struct ItemRange<'a, T> {
+ bytes: &'a [u8],
+ _boo: PhantomData<T>,
+}
+
+impl<'a, T> Copy for ItemRange<'a, T> {}
+impl<'a, T> Clone for ItemRange<'a, T> {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+
+impl<'a, T> Default for ItemRange<'a, T> {
+ fn default() -> Self {
+ ItemRange {
+ bytes: Default::default(),
+ _boo: PhantomData,
+ }
+ }
+}
+
+impl<'a, T> ItemRange<'a, T> {
+ pub fn new(bytes: &'a [u8]) -> Self {
+ Self {
+ bytes,
+ _boo: PhantomData
+ }
+ }
+
+ pub fn is_empty(&self) -> bool {
+ // Nothing more than space for a length (0).
+ self.bytes.len() <= mem::size_of::<usize>()
+ }
+
+ pub fn bytes(&self) -> &[u8] {
+ &self.bytes
+ }
+}
+
+impl<'a, T: Default> ItemRange<'a, T> {
+ pub fn iter(&self) -> AuxIter<'a, T> {
+ AuxIter::new(T::default(), self.bytes)
+ }
+}
+
+impl<'a, T> IntoIterator for ItemRange<'a, T>
+where
+ T: Copy + Default + peek_poke::Peek,
+{
+ type Item = T;
+ type IntoIter = AuxIter<'a, T>;
+ fn into_iter(self) -> Self::IntoIter {
+ self.iter()
+ }
+}
+
+#[derive(Copy, Clone)]
+pub struct TempFilterData<'a> {
+ pub func_types: ItemRange<'a, di::ComponentTransferFuncType>,
+ pub r_values: ItemRange<'a, f32>,
+ pub g_values: ItemRange<'a, f32>,
+ pub b_values: ItemRange<'a, f32>,
+ pub a_values: ItemRange<'a, f32>,
+}
+
+/// A display list.
+#[derive(Clone, Default)]
+pub struct BuiltDisplayList {
+ /// Serde encoded bytes. Mostly DisplayItems, but some mixed in slices.
+ data: Vec<u8>,
+ descriptor: BuiltDisplayListDescriptor,
+}
+
+/// Describes the memory layout of a display list.
+///
+/// A display list consists of some number of display list items, followed by a number of display
+/// items.
+#[repr(C)]
+#[derive(Copy, Clone, Default, Deserialize, Serialize)]
+pub struct BuiltDisplayListDescriptor {
+ /// The first IPC time stamp: before any work has been done
+ builder_start_time: u64,
+ /// The second IPC time stamp: after serialization
+ builder_finish_time: u64,
+ /// The third IPC time stamp: just before sending
+ send_start_time: u64,
+ /// The amount of clipping nodes created while building this display list.
+ total_clip_nodes: usize,
+ /// The amount of spatial nodes created while building this display list.
+ total_spatial_nodes: usize,
+ /// The size of the cache for this display list.
+ cache_size: usize,
+ /// The offset for additional display list data.
+ extra_data_offset: usize,
+}
+
+#[derive(Clone)]
+pub struct DisplayListWithCache {
+ display_list: BuiltDisplayList,
+ cache: DisplayItemCache,
+}
+
+impl DisplayListWithCache {
+ pub fn iter(&self) -> BuiltDisplayListIter {
+ self.display_list.iter_with_cache(&self.cache)
+ }
+
+ pub fn new_from_list(display_list: BuiltDisplayList) -> Self {
+ let mut cache = DisplayItemCache::new();
+ cache.update(&display_list);
+
+ DisplayListWithCache {
+ display_list,
+ cache
+ }
+ }
+
+ pub fn update(&mut self, display_list: BuiltDisplayList) {
+ self.cache.update(&display_list);
+ self.display_list = display_list;
+ }
+
+ pub fn descriptor(&self) -> &BuiltDisplayListDescriptor {
+ self.display_list.descriptor()
+ }
+
+ pub fn data(&self) -> &[u8] {
+ self.display_list.data()
+ }
+}
+
+impl MallocSizeOf for DisplayListWithCache {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.display_list.data.size_of(ops) + self.cache.size_of(ops)
+ }
+}
+
+#[cfg(feature = "serialize")]
+impl Serialize for DisplayListWithCache {
+ fn serialize<S: Serializer>(
+ &self,
+ serializer: S
+ ) -> Result<S::Ok, S::Error> {
+ BuiltDisplayList::serialize_with_iterator(serializer, self.iter())
+ }
+}
+
+#[cfg(feature = "deserialize")]
+impl<'de> Deserialize<'de> for DisplayListWithCache {
+ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+ where
+ D: Deserializer<'de>,
+ {
+ let display_list = BuiltDisplayList::deserialize(deserializer)?;
+ let cache = DisplayItemCache::new();
+
+ Ok(DisplayListWithCache {
+ display_list,
+ cache,
+ })
+ }
+}
+
+impl BuiltDisplayListDescriptor {}
+
+pub struct BuiltDisplayListIter<'a> {
+ list: &'a BuiltDisplayList,
+ data: &'a [u8],
+ cache: Option<&'a DisplayItemCache>,
+ pending_items: std::slice::Iter<'a, CachedDisplayItem>,
+ cur_cached_item: Option<&'a CachedDisplayItem>,
+ cur_item: di::DisplayItem,
+ cur_stops: ItemRange<'a, di::GradientStop>,
+ cur_glyphs: ItemRange<'a, GlyphInstance>,
+ cur_filters: ItemRange<'a, di::FilterOp>,
+ cur_filter_data: Vec<TempFilterData<'a>>,
+ cur_filter_primitives: ItemRange<'a, di::FilterPrimitive>,
+ cur_clip_chain_items: ItemRange<'a, di::ClipId>,
+ cur_complex_clip: ItemRange<'a, di::ComplexClipRegion>,
+ peeking: Peek,
+ /// Should just be initialized but never populated in release builds
+ debug_stats: DebugStats,
+}
+
+/// Internal info used for more detailed analysis of serialized display lists
+#[allow(dead_code)]
+struct DebugStats {
+ /// Last address in the buffer we pointed to, for computing serialized sizes
+ last_addr: usize,
+ stats: HashMap<&'static str, ItemStats>,
+}
+
+impl DebugStats {
+ #[cfg(feature = "display_list_stats")]
+ fn _update_entry(&mut self, name: &'static str, item_count: usize, byte_count: usize) {
+ let entry = self.stats.entry(name).or_default();
+ entry.total_count += item_count;
+ entry.num_bytes += byte_count;
+ }
+
+ /// Computes the number of bytes we've processed since we last called
+ /// this method, so we can compute the serialized size of a display item.
+ #[cfg(feature = "display_list_stats")]
+ fn debug_num_bytes(&mut self, data: &[u8]) -> usize {
+ let old_addr = self.last_addr;
+ let new_addr = data.as_ptr() as usize;
+ let delta = new_addr - old_addr;
+ self.last_addr = new_addr;
+
+ delta
+ }
+
+ /// Logs stats for the last deserialized display item
+ #[cfg(feature = "display_list_stats")]
+ fn log_item(&mut self, data: &[u8], item: &di::DisplayItem) {
+ let num_bytes = self.debug_num_bytes(data);
+ self._update_entry(item.debug_name(), 1, num_bytes);
+ }
+
+ /// Logs the stats for the given serialized slice
+ #[cfg(feature = "display_list_stats")]
+ fn log_slice<T: Peek>(
+ &mut self,
+ slice_name: &'static str,
+ range: &ItemRange<T>,
+ ) {
+ // Run this so log_item_stats is accurate, but ignore its result
+ // because log_slice_stats may be called after multiple slices have been
+ // processed, and the `range` has everything we need.
+ self.last_addr = range.bytes.as_ptr() as usize + range.bytes.len();
+
+ self._update_entry(slice_name, range.iter().len(), range.bytes.len());
+ }
+
+ #[cfg(not(feature = "display_list_stats"))]
+ fn log_slice<T>(&mut self, _slice_name: &str, _range: &ItemRange<T>) {
+ /* no-op */
+ }
+}
+
+/// Stats for an individual item
+#[derive(Copy, Clone, Debug, Default)]
+pub struct ItemStats {
+ /// How many instances of this kind of item we deserialized
+ pub total_count: usize,
+ /// How many bytes we processed for this kind of item
+ pub num_bytes: usize,
+}
+
+pub struct DisplayItemRef<'a: 'b, 'b> {
+ iter: &'b BuiltDisplayListIter<'a>,
+}
+
+// Some of these might just become ItemRanges
+impl<'a, 'b> DisplayItemRef<'a, 'b> {
+ pub fn display_list(&self) -> &BuiltDisplayList {
+ self.iter.display_list()
+ }
+
+ // Creates a new iterator where this element's iterator is, to hack around borrowck.
+ pub fn sub_iter(&self) -> BuiltDisplayListIter<'a> {
+ self.iter.sub_iter()
+ }
+
+ pub fn item(&self) -> &di::DisplayItem {
+ self.iter.current_item()
+ }
+
+ pub fn clip_chain_items(&self) -> ItemRange<di::ClipId> {
+ self.iter.cur_clip_chain_items
+ }
+
+ pub fn complex_clip(&self) -> ItemRange<di::ComplexClipRegion> {
+ self.iter.cur_complex_clip
+ }
+
+ pub fn glyphs(&self) -> ItemRange<GlyphInstance> {
+ self.iter.glyphs()
+ }
+
+ pub fn gradient_stops(&self) -> ItemRange<di::GradientStop> {
+ self.iter.gradient_stops()
+ }
+
+ pub fn filters(&self) -> ItemRange<di::FilterOp> {
+ self.iter.cur_filters
+ }
+
+ pub fn filter_datas(&self) -> &Vec<TempFilterData> {
+ &self.iter.cur_filter_data
+ }
+
+ pub fn filter_primitives(&self) -> ItemRange<di::FilterPrimitive> {
+ self.iter.cur_filter_primitives
+ }
+}
+
+#[derive(PartialEq)]
+enum Peek {
+ StartPeeking,
+ IsPeeking,
+ NotPeeking,
+}
+
+#[derive(Clone)]
+pub struct AuxIter<'a, T> {
+ item: T,
+ data: &'a [u8],
+ size: usize,
+// _boo: PhantomData<T>,
+}
+
+impl BuiltDisplayList {
+ pub fn from_data(data: Vec<u8>, descriptor: BuiltDisplayListDescriptor) -> Self {
+ BuiltDisplayList { data, descriptor }
+ }
+
+ pub fn into_data(self) -> (Vec<u8>, BuiltDisplayListDescriptor) {
+ (self.data, self.descriptor)
+ }
+
+ pub fn data(&self) -> &[u8] {
+ &self.data[..]
+ }
+
+ pub fn item_slice(&self) -> &[u8] {
+ &self.data[..self.descriptor.extra_data_offset]
+ }
+
+ pub fn extra_slice(&self) -> &[u8] {
+ &self.data[self.descriptor.extra_data_offset..]
+ }
+
+ pub fn descriptor(&self) -> &BuiltDisplayListDescriptor {
+ &self.descriptor
+ }
+
+ pub fn set_send_time_ns(&mut self, time: u64) {
+ self.descriptor.send_start_time = time;
+ }
+
+ pub fn times(&self) -> (u64, u64, u64) {
+ (
+ self.descriptor.builder_start_time,
+ self.descriptor.builder_finish_time,
+ self.descriptor.send_start_time,
+ )
+ }
+
+ pub fn total_clip_nodes(&self) -> usize {
+ self.descriptor.total_clip_nodes
+ }
+
+ pub fn total_spatial_nodes(&self) -> usize {
+ self.descriptor.total_spatial_nodes
+ }
+
+ pub fn iter(&self) -> BuiltDisplayListIter {
+ BuiltDisplayListIter::new(self, self.item_slice(), None)
+ }
+
+ pub fn extra_data_iter(&self) -> BuiltDisplayListIter {
+ BuiltDisplayListIter::new(self, self.extra_slice(), None)
+ }
+
+ pub fn iter_with_cache<'a>(
+ &'a self,
+ cache: &'a DisplayItemCache
+ ) -> BuiltDisplayListIter<'a> {
+ BuiltDisplayListIter::new(self, self.item_slice(), Some(cache))
+ }
+
+ pub fn cache_size(&self) -> usize {
+ self.descriptor.cache_size
+ }
+
+ #[cfg(feature = "serialize")]
+ pub fn serialize_with_iterator<S: Serializer>(
+ serializer: S,
+ mut iterator: BuiltDisplayListIter,
+ ) -> Result<S::Ok, S::Error> {
+ use crate::display_item::DisplayItem as Real;
+ use crate::display_item::DebugDisplayItem as Debug;
+
+ let mut seq = serializer.serialize_seq(None)?;
+
+ while let Some(item) = iterator.next_raw() {
+ let serial_di = match *item.item() {
+ Real::Clip(v) => Debug::Clip(
+ v,
+ item.iter.cur_complex_clip.iter().collect()
+ ),
+ Real::ClipChain(v) => Debug::ClipChain(
+ v,
+ item.iter.cur_clip_chain_items.iter().collect()
+ ),
+ Real::ScrollFrame(v) => Debug::ScrollFrame(v),
+ Real::Text(v) => Debug::Text(
+ v,
+ item.iter.cur_glyphs.iter().collect()
+ ),
+ Real::SetFilterOps => Debug::SetFilterOps(
+ item.iter.cur_filters.iter().collect()
+ ),
+ Real::SetFilterData => {
+ debug_assert!(!item.iter.cur_filter_data.is_empty(),
+ "next_raw should have populated cur_filter_data");
+ let temp_filter_data = &item.iter.cur_filter_data[item.iter.cur_filter_data.len()-1];
+
+ let func_types: Vec<di::ComponentTransferFuncType> =
+ temp_filter_data.func_types.iter().collect();
+ debug_assert!(func_types.len() == 4,
+ "someone changed the number of filter funcs without updating this code");
+ Debug::SetFilterData(di::FilterData {
+ func_r_type: func_types[0],
+ r_values: temp_filter_data.r_values.iter().collect(),
+ func_g_type: func_types[1],
+ g_values: temp_filter_data.g_values.iter().collect(),
+ func_b_type: func_types[2],
+ b_values: temp_filter_data.b_values.iter().collect(),
+ func_a_type: func_types[3],
+ a_values: temp_filter_data.a_values.iter().collect(),
+ })
+ },
+ Real::SetFilterPrimitives => Debug::SetFilterPrimitives(
+ item.iter.cur_filter_primitives.iter().collect()
+ ),
+ Real::SetGradientStops => Debug::SetGradientStops(
+ item.iter.cur_stops.iter().collect()
+ ),
+ Real::RectClip(v) => Debug::RectClip(v),
+ Real::RoundedRectClip(v) => Debug::RoundedRectClip(v),
+ Real::ImageMaskClip(v) => Debug::ImageMaskClip(v),
+ Real::StickyFrame(v) => Debug::StickyFrame(v),
+ Real::Rectangle(v) => Debug::Rectangle(v),
+ Real::ClearRectangle(v) => Debug::ClearRectangle(v),
+ Real::HitTest(v) => Debug::HitTest(v),
+ Real::Line(v) => Debug::Line(v),
+ Real::Image(v) => Debug::Image(v),
+ Real::RepeatingImage(v) => Debug::RepeatingImage(v),
+ Real::YuvImage(v) => Debug::YuvImage(v),
+ Real::Border(v) => Debug::Border(v),
+ Real::BoxShadow(v) => Debug::BoxShadow(v),
+ Real::Gradient(v) => Debug::Gradient(v),
+ Real::RadialGradient(v) => Debug::RadialGradient(v),
+ Real::ConicGradient(v) => Debug::ConicGradient(v),
+ Real::Iframe(v) => Debug::Iframe(v),
+ Real::PushReferenceFrame(v) => Debug::PushReferenceFrame(v),
+ Real::PushStackingContext(v) => Debug::PushStackingContext(v),
+ Real::PushShadow(v) => Debug::PushShadow(v),
+ Real::BackdropFilter(v) => Debug::BackdropFilter(v),
+
+ Real::PopReferenceFrame => Debug::PopReferenceFrame,
+ Real::PopStackingContext => Debug::PopStackingContext,
+ Real::PopAllShadows => Debug::PopAllShadows,
+ Real::ReuseItems(_) |
+ Real::RetainedItems(_) => unreachable!("Unexpected item"),
+ };
+ seq.serialize_element(&serial_di)?
+ }
+ seq.end()
+ }
+}
+
+/// Returns the byte-range the slice occupied.
+fn skip_slice<'a, T: peek_poke::Peek>(data: &mut &'a [u8]) -> ItemRange<'a, T> {
+ let mut skip_offset = 0usize;
+ *data = peek_from_slice(data, &mut skip_offset);
+ let (skip, rest) = data.split_at(skip_offset);
+
+ // Adjust data pointer to skip read values
+ *data = rest;
+
+ ItemRange {
+ bytes: skip,
+ _boo: PhantomData,
+ }
+}
+
+impl<'a> BuiltDisplayListIter<'a> {
+ pub fn new(
+ list: &'a BuiltDisplayList,
+ data: &'a [u8],
+ cache: Option<&'a DisplayItemCache>,
+ ) -> Self {
+ Self {
+ list,
+ data,
+ cache,
+ pending_items: [].iter(),
+ cur_cached_item: None,
+ cur_item: di::DisplayItem::PopStackingContext,
+ cur_stops: ItemRange::default(),
+ cur_glyphs: ItemRange::default(),
+ cur_filters: ItemRange::default(),
+ cur_filter_data: Vec::new(),
+ cur_filter_primitives: ItemRange::default(),
+ cur_clip_chain_items: ItemRange::default(),
+ cur_complex_clip: ItemRange::default(),
+ peeking: Peek::NotPeeking,
+ debug_stats: DebugStats {
+ last_addr: data.as_ptr() as usize,
+ stats: HashMap::default(),
+ },
+ }
+ }
+
+ pub fn sub_iter(&self) -> Self {
+ let mut iter = BuiltDisplayListIter::new(
+ self.list, self.data, self.cache
+ );
+ iter.pending_items = self.pending_items.clone();
+ iter
+ }
+
+ pub fn display_list(&self) -> &'a BuiltDisplayList {
+ self.list
+ }
+
+ pub fn current_item(&self) -> &di::DisplayItem {
+ match self.cur_cached_item {
+ Some(cached_item) => cached_item.display_item(),
+ None => &self.cur_item
+ }
+ }
+
+ fn cached_item_range_or<T>(
+ &self,
+ data: ItemRange<'a, T>
+ ) -> ItemRange<'a, T> {
+ match self.cur_cached_item {
+ Some(cached_item) => cached_item.data_as_item_range(),
+ None => data,
+ }
+ }
+
+ pub fn glyphs(&self) -> ItemRange<GlyphInstance> {
+ self.cached_item_range_or(self.cur_glyphs)
+ }
+
+ pub fn gradient_stops(&self) -> ItemRange<di::GradientStop> {
+ self.cached_item_range_or(self.cur_stops)
+ }
+
+ fn advance_pending_items(&mut self) -> bool {
+ self.cur_cached_item = self.pending_items.next();
+ self.cur_cached_item.is_some()
+ }
+
+ pub fn next<'b>(&'b mut self) -> Option<DisplayItemRef<'a, 'b>> {
+ use crate::DisplayItem::*;
+
+ match self.peeking {
+ Peek::IsPeeking => {
+ self.peeking = Peek::NotPeeking;
+ return Some(self.as_ref());
+ }
+ Peek::StartPeeking => {
+ self.peeking = Peek::IsPeeking;
+ }
+ Peek::NotPeeking => { /* do nothing */ }
+ }
+
+ // Don't let these bleed into another item
+ self.cur_stops = ItemRange::default();
+ self.cur_complex_clip = ItemRange::default();
+ self.cur_clip_chain_items = ItemRange::default();
+ self.cur_filters = ItemRange::default();
+ self.cur_filter_primitives = ItemRange::default();
+ self.cur_filter_data.clear();
+
+ loop {
+ self.next_raw()?;
+ match self.cur_item {
+ SetGradientStops |
+ SetFilterOps |
+ SetFilterData |
+ SetFilterPrimitives => {
+ // These are marker items for populating other display items, don't yield them.
+ continue;
+ }
+ _ => {
+ break;
+ }
+ }
+ }
+
+ Some(self.as_ref())
+ }
+
+ /// Gets the next display item, even if it's a dummy. Also doesn't handle peeking
+ /// and may leave irrelevant ranges live (so a Clip may have GradientStops if
+ /// for some reason you ask).
+ pub fn next_raw<'b>(&'b mut self) -> Option<DisplayItemRef<'a, 'b>> {
+ use crate::DisplayItem::*;
+
+ if self.advance_pending_items() {
+ return Some(self.as_ref());
+ }
+
+ // A "red zone" of DisplayItem::max_size() bytes has been added to the
+ // end of the serialized display list. If this amount, or less, is
+ // remaining then we've reached the end of the display list.
+ if self.data.len() <= di::DisplayItem::max_size() {
+ return None;
+ }
+
+ self.data = peek_from_slice(self.data, &mut self.cur_item);
+ self.log_item_stats();
+
+ match self.cur_item {
+ SetGradientStops => {
+ self.cur_stops = skip_slice::<di::GradientStop>(&mut self.data);
+ self.debug_stats.log_slice("set_gradient_stops.stops", &self.cur_stops);
+ }
+ SetFilterOps => {
+ self.cur_filters = skip_slice::<di::FilterOp>(&mut self.data);
+ self.debug_stats.log_slice("set_filter_ops.ops", &self.cur_filters);
+ }
+ SetFilterData => {
+ self.cur_filter_data.push(TempFilterData {
+ func_types: skip_slice::<di::ComponentTransferFuncType>(&mut self.data),
+ r_values: skip_slice::<f32>(&mut self.data),
+ g_values: skip_slice::<f32>(&mut self.data),
+ b_values: skip_slice::<f32>(&mut self.data),
+ a_values: skip_slice::<f32>(&mut self.data),
+ });
+
+ let data = *self.cur_filter_data.last().unwrap();
+ self.debug_stats.log_slice("set_filter_data.func_types", &data.func_types);
+ self.debug_stats.log_slice("set_filter_data.r_values", &data.r_values);
+ self.debug_stats.log_slice("set_filter_data.g_values", &data.g_values);
+ self.debug_stats.log_slice("set_filter_data.b_values", &data.b_values);
+ self.debug_stats.log_slice("set_filter_data.a_values", &data.a_values);
+ }
+ SetFilterPrimitives => {
+ self.cur_filter_primitives = skip_slice::<di::FilterPrimitive>(&mut self.data);
+ self.debug_stats.log_slice("set_filter_primitives.primitives", &self.cur_filter_primitives);
+ }
+ ClipChain(_) => {
+ self.cur_clip_chain_items = skip_slice::<di::ClipId>(&mut self.data);
+ self.debug_stats.log_slice("clip_chain.clip_ids", &self.cur_clip_chain_items);
+ }
+ Clip(_) => {
+ self.cur_complex_clip = skip_slice::<di::ComplexClipRegion>(&mut self.data);
+ self.debug_stats.log_slice("clip.complex_clips", &self.cur_complex_clip);
+ }
+ Text(_) => {
+ self.cur_glyphs = skip_slice::<GlyphInstance>(&mut self.data);
+ self.debug_stats.log_slice("text.glyphs", &self.cur_glyphs);
+ }
+ ReuseItems(key) => {
+ match self.cache {
+ Some(cache) => {
+ self.pending_items = cache.get_items(key).iter();
+ self.advance_pending_items();
+ }
+ None => {
+ unreachable!("Cache marker without cache!");
+ }
+ }
+ }
+ _ => { /* do nothing */ }
+ }
+
+ Some(self.as_ref())
+ }
+
+ pub fn as_ref<'b>(&'b self) -> DisplayItemRef<'a, 'b> {
+ DisplayItemRef {
+ iter: self,
+ }
+ }
+
+ pub fn skip_current_stacking_context(&mut self) {
+ let mut depth = 0;
+ while let Some(item) = self.next() {
+ match *item.item() {
+ di::DisplayItem::PushStackingContext(..) => depth += 1,
+ di::DisplayItem::PopStackingContext if depth == 0 => return,
+ di::DisplayItem::PopStackingContext => depth -= 1,
+ _ => {}
+ }
+ }
+ }
+
+ pub fn current_stacking_context_empty(&mut self) -> bool {
+ match self.peek() {
+ Some(item) => *item.item() == di::DisplayItem::PopStackingContext,
+ None => true,
+ }
+ }
+
+ pub fn peek<'b>(&'b mut self) -> Option<DisplayItemRef<'a, 'b>> {
+ if self.peeking == Peek::NotPeeking {
+ self.peeking = Peek::StartPeeking;
+ self.next()
+ } else {
+ Some(self.as_ref())
+ }
+ }
+
+ /// Get the debug stats for what this iterator has deserialized.
+ /// Should always be empty in release builds.
+ pub fn debug_stats(&mut self) -> Vec<(&'static str, ItemStats)> {
+ let mut result = self.debug_stats.stats.drain().collect::<Vec<_>>();
+ result.sort_by_key(|stats| stats.0);
+ result
+ }
+
+ /// Adds the debug stats from another to our own, assuming we are a sub-iter of the other
+ /// (so we can ignore where they were in the traversal).
+ pub fn merge_debug_stats_from(&mut self, other: &mut Self) {
+ for (key, other_entry) in other.debug_stats.stats.iter() {
+ let entry = self.debug_stats.stats.entry(key).or_default();
+
+ entry.total_count += other_entry.total_count;
+ entry.num_bytes += other_entry.num_bytes;
+ }
+ }
+
+ /// Logs stats for the last deserialized display item
+ #[cfg(feature = "display_list_stats")]
+ fn log_item_stats(&mut self) {
+ self.debug_stats.log_item(self.data, &self.cur_item);
+ }
+
+ #[cfg(not(feature = "display_list_stats"))]
+ fn log_item_stats(&mut self) { /* no-op */ }
+}
+
+impl<'a, T> AuxIter<'a, T> {
+ pub fn new(item: T, mut data: &'a [u8]) -> Self {
+ let mut size = 0usize;
+ if !data.is_empty() {
+ data = peek_from_slice(data, &mut size);
+ };
+
+ AuxIter {
+ item,
+ data,
+ size,
+// _boo: PhantomData,
+ }
+ }
+}
+
+impl<'a, T: Copy + peek_poke::Peek> Iterator for AuxIter<'a, T> {
+ type Item = T;
+
+ fn next(&mut self) -> Option<Self::Item> {
+ if self.size == 0 {
+ None
+ } else {
+ self.size -= 1;
+ self.data = peek_from_slice(self.data, &mut self.item);
+ Some(self.item)
+ }
+ }
+
+ fn size_hint(&self) -> (usize, Option<usize>) {
+ (self.size, Some(self.size))
+ }
+}
+
+impl<'a, T: Copy + peek_poke::Peek> ::std::iter::ExactSizeIterator for AuxIter<'a, T> {}
+
+#[cfg(feature = "serialize")]
+impl Serialize for BuiltDisplayList {
+ fn serialize<S: Serializer>(
+ &self,
+ serializer: S
+ ) -> Result<S::Ok, S::Error> {
+ Self::serialize_with_iterator(serializer, self.iter())
+ }
+}
+
+// The purpose of this implementation is to deserialize
+// a display list from one format just to immediately
+// serialize then into a "built" `Vec<u8>`.
+
+#[cfg(feature = "deserialize")]
+impl<'de> Deserialize<'de> for BuiltDisplayList {
+ fn deserialize<D: Deserializer<'de>>(
+ deserializer: D
+ ) -> Result<Self, D::Error> {
+ use crate::display_item::DisplayItem as Real;
+ use crate::display_item::DebugDisplayItem as Debug;
+
+ let list = Vec::<Debug>::deserialize(deserializer)?;
+
+ let mut data = Vec::new();
+ let mut temp = Vec::new();
+ let mut total_clip_nodes = FIRST_CLIP_NODE_INDEX;
+ let mut total_spatial_nodes = FIRST_SPATIAL_NODE_INDEX;
+ for complete in list {
+ let item = match complete {
+ Debug::Clip(v, complex_clips) => {
+ total_clip_nodes += 1;
+ DisplayListBuilder::push_iter_impl(&mut temp, complex_clips);
+ Real::Clip(v)
+ },
+ Debug::ClipChain(v, clip_chain_ids) => {
+ DisplayListBuilder::push_iter_impl(&mut temp, clip_chain_ids);
+ Real::ClipChain(v)
+ }
+ Debug::ScrollFrame(v) => {
+ total_spatial_nodes += 1;
+ total_clip_nodes += 1;
+ Real::ScrollFrame(v)
+ }
+ Debug::StickyFrame(v) => {
+ total_spatial_nodes += 1;
+ Real::StickyFrame(v)
+ }
+ Debug::Text(v, glyphs) => {
+ DisplayListBuilder::push_iter_impl(&mut temp, glyphs);
+ Real::Text(v)
+ },
+ Debug::Iframe(v) => {
+ total_clip_nodes += 1;
+ Real::Iframe(v)
+ }
+ Debug::PushReferenceFrame(v) => {
+ total_spatial_nodes += 1;
+ Real::PushReferenceFrame(v)
+ }
+ Debug::SetFilterOps(filters) => {
+ DisplayListBuilder::push_iter_impl(&mut temp, filters);
+ Real::SetFilterOps
+ },
+ Debug::SetFilterData(filter_data) => {
+ let func_types: Vec<di::ComponentTransferFuncType> =
+ [filter_data.func_r_type,
+ filter_data.func_g_type,
+ filter_data.func_b_type,
+ filter_data.func_a_type].to_vec();
+ DisplayListBuilder::push_iter_impl(&mut temp, func_types);
+ DisplayListBuilder::push_iter_impl(&mut temp, filter_data.r_values);
+ DisplayListBuilder::push_iter_impl(&mut temp, filter_data.g_values);
+ DisplayListBuilder::push_iter_impl(&mut temp, filter_data.b_values);
+ DisplayListBuilder::push_iter_impl(&mut temp, filter_data.a_values);
+ Real::SetFilterData
+ },
+ Debug::SetFilterPrimitives(filter_primitives) => {
+ DisplayListBuilder::push_iter_impl(&mut temp, filter_primitives);
+ Real::SetFilterPrimitives
+ }
+ Debug::SetGradientStops(stops) => {
+ DisplayListBuilder::push_iter_impl(&mut temp, stops);
+ Real::SetGradientStops
+ },
+ Debug::RectClip(v) => Real::RectClip(v),
+ Debug::RoundedRectClip(v) => Real::RoundedRectClip(v),
+ Debug::ImageMaskClip(v) => Real::ImageMaskClip(v),
+ Debug::Rectangle(v) => Real::Rectangle(v),
+ Debug::ClearRectangle(v) => Real::ClearRectangle(v),
+ Debug::HitTest(v) => Real::HitTest(v),
+ Debug::Line(v) => Real::Line(v),
+ Debug::Image(v) => Real::Image(v),
+ Debug::RepeatingImage(v) => Real::RepeatingImage(v),
+ Debug::YuvImage(v) => Real::YuvImage(v),
+ Debug::Border(v) => Real::Border(v),
+ Debug::BoxShadow(v) => Real::BoxShadow(v),
+ Debug::Gradient(v) => Real::Gradient(v),
+ Debug::RadialGradient(v) => Real::RadialGradient(v),
+ Debug::ConicGradient(v) => Real::ConicGradient(v),
+ Debug::PushStackingContext(v) => Real::PushStackingContext(v),
+ Debug::PushShadow(v) => Real::PushShadow(v),
+ Debug::BackdropFilter(v) => Real::BackdropFilter(v),
+
+ Debug::PopStackingContext => Real::PopStackingContext,
+ Debug::PopReferenceFrame => Real::PopReferenceFrame,
+ Debug::PopAllShadows => Real::PopAllShadows,
+ };
+ poke_into_vec(&item, &mut data);
+ // the aux data is serialized after the item, hence the temporary
+ data.extend(temp.drain(..));
+ }
+
+ // Add `DisplayItem::max_size` zone of zeroes to the end of display list
+ // so there is at least this amount available in the display list during
+ // serialization.
+ ensure_red_zone::<di::DisplayItem>(&mut data);
+ let extra_data_offset = data.len();
+
+ Ok(BuiltDisplayList {
+ data,
+ descriptor: BuiltDisplayListDescriptor {
+ builder_start_time: 0,
+ builder_finish_time: 1,
+ send_start_time: 1,
+ total_clip_nodes,
+ total_spatial_nodes,
+ extra_data_offset,
+ cache_size: 0,
+ },
+ })
+ }
+}
+
+#[derive(Clone, Debug)]
+pub struct SaveState {
+ dl_len: usize,
+ next_clip_index: usize,
+ next_spatial_index: usize,
+ next_clip_chain_id: u64,
+}
+
+/// DisplayListSection determines the target buffer for the display items.
+pub enum DisplayListSection {
+ /// The main/default buffer: contains item data and item group markers.
+ Data,
+ /// Auxiliary buffer: contains the item data for item groups.
+ ExtraData,
+ /// Temporary buffer: contains the data for pending item group. Flushed to
+ /// one of the buffers above, after item grouping finishes.
+ Chunk,
+}
+
+#[derive(Clone)]
+pub struct DisplayListBuilder {
+ pub data: Vec<u8>,
+ pub pipeline_id: PipelineId,
+
+ extra_data: Vec<u8>,
+ pending_chunk: Vec<u8>,
+ writing_to_chunk: bool,
+
+ next_clip_index: usize,
+ next_spatial_index: usize,
+ next_clip_chain_id: u64,
+ builder_start_time: u64,
+
+ /// The size of the content of this display list. This is used to allow scrolling
+ /// outside the bounds of the display list items themselves.
+ content_size: LayoutSize,
+ save_state: Option<SaveState>,
+
+ cache_size: usize,
+ serialized_content_buffer: Option<String>,
+}
+
+impl DisplayListBuilder {
+ pub fn new(pipeline_id: PipelineId, content_size: LayoutSize) -> Self {
+ Self::with_capacity(pipeline_id, content_size, 0)
+ }
+
+ pub fn with_capacity(
+ pipeline_id: PipelineId,
+ content_size: LayoutSize,
+ capacity: usize,
+ ) -> Self {
+ let start_time = precise_time_ns();
+
+ DisplayListBuilder {
+ data: Vec::with_capacity(capacity),
+ pipeline_id,
+
+ extra_data: Vec::new(),
+ pending_chunk: Vec::new(),
+ writing_to_chunk: false,
+
+ next_clip_index: FIRST_CLIP_NODE_INDEX,
+ next_spatial_index: FIRST_SPATIAL_NODE_INDEX,
+ next_clip_chain_id: 0,
+ builder_start_time: start_time,
+ content_size,
+ save_state: None,
+ cache_size: 0,
+ serialized_content_buffer: None,
+ }
+ }
+
+ /// Return the content size for this display list
+ pub fn content_size(&self) -> LayoutSize {
+ self.content_size
+ }
+
+ /// Saves the current display list state, so it may be `restore()`'d.
+ ///
+ /// # Conditions:
+ ///
+ /// * Doesn't support popping clips that were pushed before the save.
+ /// * Doesn't support nested saves.
+ /// * Must call `clear_save()` if the restore becomes unnecessary.
+ pub fn save(&mut self) {
+ assert!(self.save_state.is_none(), "DisplayListBuilder doesn't support nested saves");
+
+ self.save_state = Some(SaveState {
+ dl_len: self.data.len(),
+ next_clip_index: self.next_clip_index,
+ next_spatial_index: self.next_spatial_index,
+ next_clip_chain_id: self.next_clip_chain_id,
+ });
+ }
+
+ /// Restores the state of the builder to when `save()` was last called.
+ pub fn restore(&mut self) {
+ let state = self.save_state.take().expect("No save to restore DisplayListBuilder from");
+
+ self.data.truncate(state.dl_len);
+ self.next_clip_index = state.next_clip_index;
+ self.next_spatial_index = state.next_spatial_index;
+ self.next_clip_chain_id = state.next_clip_chain_id;
+ }
+
+ /// Discards the builder's save (indicating the attempted operation was successful).
+ pub fn clear_save(&mut self) {
+ self.save_state.take().expect("No save to clear in DisplayListBuilder");
+ }
+
+ /// Emits a debug representation of display items in the list, for debugging
+ /// purposes. If the range's start parameter is specified, only display
+ /// items starting at that index (inclusive) will be printed. If the range's
+ /// end parameter is specified, only display items before that index
+ /// (exclusive) will be printed. Calling this function with end <= start is
+ /// allowed but is just a waste of CPU cycles. The function emits the
+ /// debug representation of the selected display items, one per line, with
+ /// the given indent, to the provided sink object. The return value is
+ /// the total number of items in the display list, which allows the
+ /// caller to subsequently invoke this function to only dump the newly-added
+ /// items.
+ pub fn emit_display_list<W>(
+ &mut self,
+ indent: usize,
+ range: Range<Option<usize>>,
+ mut sink: W,
+ ) -> usize
+ where
+ W: Write
+ {
+ let mut temp = BuiltDisplayList::default();
+ mem::swap(&mut temp.data, &mut self.data);
+
+ let mut index: usize = 0;
+ {
+ let mut iter = temp.iter();
+ while let Some(item) = iter.next_raw() {
+ if index >= range.start.unwrap_or(0) && range.end.map_or(true, |e| index < e) {
+ writeln!(sink, "{}{:?}", " ".repeat(indent), item.item()).unwrap();
+ }
+ index += 1;
+ }
+ }
+
+ self.data = temp.data;
+ index
+ }
+
+ /// Print the display items in the list to stdout.
+ pub fn dump_serialized_display_list(&mut self) {
+ self.serialized_content_buffer = Some(String::new());
+ }
+
+ fn add_to_display_list_dump<T: std::fmt::Debug>(&mut self, item: T) {
+ if let Some(ref mut content) = self.serialized_content_buffer {
+ use std::fmt::Write;
+ write!(content, "{:?}\n", item).expect("DL dump write failed.");
+ }
+ }
+
+ /// Returns the default section that DisplayListBuilder will write to,
+ /// if no section is specified explicitly.
+ fn default_section(&self) -> DisplayListSection {
+ if self.writing_to_chunk {
+ DisplayListSection::Chunk
+ } else {
+ DisplayListSection::Data
+ }
+ }
+
+ fn buffer_from_section(
+ &mut self,
+ section: DisplayListSection
+ ) -> &mut Vec<u8> {
+ match section {
+ DisplayListSection::Data => &mut self.data,
+ DisplayListSection::ExtraData => &mut self.extra_data,
+ DisplayListSection::Chunk => &mut self.pending_chunk,
+ }
+ }
+
+ #[inline]
+ pub fn push_item_to_section(
+ &mut self,
+ item: &di::DisplayItem,
+ section: DisplayListSection,
+ ) {
+ poke_into_vec(item, self.buffer_from_section(section));
+ self.add_to_display_list_dump(item);
+ }
+
+ /// Add an item to the display list.
+ ///
+ /// NOTE: It is usually preferable to use the specialized methods to push
+ /// display items. Pushing unexpected or invalid items here may
+ /// result in WebRender panicking or behaving in unexpected ways.
+ #[inline]
+ pub fn push_item(&mut self, item: &di::DisplayItem) {
+ self.push_item_to_section(item, self.default_section());
+ }
+
+ fn push_iter_impl<I>(data: &mut Vec<u8>, iter_source: I)
+ where
+ I: IntoIterator,
+ I::IntoIter: ExactSizeIterator,
+ I::Item: Poke,
+ {
+ let iter = iter_source.into_iter();
+ let len = iter.len();
+ // Format:
+ // payload_byte_size: usize, item_count: usize, [I; item_count]
+
+ // Track the the location of where to write byte size with offsets
+ // instead of pointers because data may be moved in memory during
+ // `serialize_iter_fast`.
+ let byte_size_offset = data.len();
+
+ // We write a dummy value so there's room for later
+ poke_into_vec(&0usize, data);
+ poke_into_vec(&len, data);
+ let count = poke_extend_vec(iter, data);
+ debug_assert_eq!(len, count, "iterator.len() returned two different values");
+
+ // Add red zone
+ ensure_red_zone::<I::Item>(data);
+
+ // Now write the actual byte_size
+ let final_offset = data.len();
+ debug_assert!(final_offset >= (byte_size_offset + mem::size_of::<usize>()),
+ "space was never allocated for this array's byte_size");
+ let byte_size = final_offset - byte_size_offset - mem::size_of::<usize>();
+ poke_inplace_slice(&byte_size, &mut data[byte_size_offset..]);
+ }
+
+ /// Push items from an iterator to the display list.
+ ///
+ /// NOTE: Pushing unexpected or invalid items to the display list
+ /// may result in panic and confusion.
+ pub fn push_iter<I>(&mut self, iter: I)
+ where
+ I: IntoIterator,
+ I::IntoIter: ExactSizeIterator,
+ I::Item: Poke,
+ {
+ let mut buffer = self.buffer_from_section(self.default_section());
+ Self::push_iter_impl(&mut buffer, iter);
+ }
+
+ pub fn push_rect(
+ &mut self,
+ common: &di::CommonItemProperties,
+ bounds: LayoutRect,
+ color: ColorF,
+ ) {
+ let item = di::DisplayItem::Rectangle(di::RectangleDisplayItem {
+ common: *common,
+ color: PropertyBinding::Value(color),
+ bounds,
+ });
+ self.push_item(&item);
+ }
+
+ pub fn push_rect_with_animation(
+ &mut self,
+ common: &di::CommonItemProperties,
+ bounds: LayoutRect,
+ color: PropertyBinding<ColorF>,
+ ) {
+ let item = di::DisplayItem::Rectangle(di::RectangleDisplayItem {
+ common: *common,
+ color,
+ bounds,
+ });
+ self.push_item(&item);
+ }
+
+ pub fn push_clear_rect(
+ &mut self,
+ common: &di::CommonItemProperties,
+ bounds: LayoutRect,
+ ) {
+ let item = di::DisplayItem::ClearRectangle(di::ClearRectangleDisplayItem {
+ common: *common,
+ bounds,
+ });
+ self.push_item(&item);
+ }
+
+ pub fn push_hit_test(
+ &mut self,
+ common: &di::CommonItemProperties,
+ ) {
+ let item = di::DisplayItem::HitTest(di::HitTestDisplayItem {
+ common: *common,
+ });
+ self.push_item(&item);
+ }
+
+ pub fn push_line(
+ &mut self,
+ common: &di::CommonItemProperties,
+ area: &LayoutRect,
+ wavy_line_thickness: f32,
+ orientation: di::LineOrientation,
+ color: &ColorF,
+ style: di::LineStyle,
+ ) {
+ let item = di::DisplayItem::Line(di::LineDisplayItem {
+ common: *common,
+ area: *area,
+ wavy_line_thickness,
+ orientation,
+ color: *color,
+ style,
+ });
+
+ self.push_item(&item);
+ }
+
+ pub fn push_image(
+ &mut self,
+ common: &di::CommonItemProperties,
+ bounds: LayoutRect,
+ image_rendering: di::ImageRendering,
+ alpha_type: di::AlphaType,
+ key: ImageKey,
+ color: ColorF,
+ ) {
+ let item = di::DisplayItem::Image(di::ImageDisplayItem {
+ common: *common,
+ bounds,
+ image_key: key,
+ image_rendering,
+ alpha_type,
+ color,
+ });
+
+ self.push_item(&item);
+ }
+
+ pub fn push_repeating_image(
+ &mut self,
+ common: &di::CommonItemProperties,
+ bounds: LayoutRect,
+ stretch_size: LayoutSize,
+ tile_spacing: LayoutSize,
+ image_rendering: di::ImageRendering,
+ alpha_type: di::AlphaType,
+ key: ImageKey,
+ color: ColorF,
+ ) {
+ let item = di::DisplayItem::RepeatingImage(di::RepeatingImageDisplayItem {
+ common: *common,
+ bounds,
+ image_key: key,
+ stretch_size,
+ tile_spacing,
+ image_rendering,
+ alpha_type,
+ color,
+ });
+
+ self.push_item(&item);
+ }
+
+ /// Push a yuv image. All planar data in yuv image should use the same buffer type.
+ pub fn push_yuv_image(
+ &mut self,
+ common: &di::CommonItemProperties,
+ bounds: LayoutRect,
+ yuv_data: di::YuvData,
+ color_depth: ColorDepth,
+ color_space: di::YuvColorSpace,
+ color_range: di::ColorRange,
+ image_rendering: di::ImageRendering,
+ ) {
+ let item = di::DisplayItem::YuvImage(di::YuvImageDisplayItem {
+ common: *common,
+ bounds,
+ yuv_data,
+ color_depth,
+ color_space,
+ color_range,
+ image_rendering,
+ });
+ self.push_item(&item);
+ }
+
+ pub fn push_text(
+ &mut self,
+ common: &di::CommonItemProperties,
+ bounds: LayoutRect,
+ glyphs: &[GlyphInstance],
+ font_key: FontInstanceKey,
+ color: ColorF,
+ glyph_options: Option<GlyphOptions>,
+ ) {
+ let item = di::DisplayItem::Text(di::TextDisplayItem {
+ common: *common,
+ bounds,
+ color,
+ font_key,
+ glyph_options,
+ });
+
+ for split_glyphs in glyphs.chunks(MAX_TEXT_RUN_LENGTH) {
+ self.push_item(&item);
+ self.push_iter(split_glyphs);
+ }
+ }
+
+ /// NOTE: gradients must be pushed in the order they're created
+ /// because create_gradient stores the stops in anticipation.
+ pub fn create_gradient(
+ &mut self,
+ start_point: LayoutPoint,
+ end_point: LayoutPoint,
+ stops: Vec<di::GradientStop>,
+ extend_mode: di::ExtendMode,
+ ) -> di::Gradient {
+ let mut builder = GradientBuilder::with_stops(stops);
+ let gradient = builder.gradient(start_point, end_point, extend_mode);
+ self.push_stops(builder.stops());
+ gradient
+ }
+
+ /// NOTE: gradients must be pushed in the order they're created
+ /// because create_gradient stores the stops in anticipation.
+ pub fn create_radial_gradient(
+ &mut self,
+ center: LayoutPoint,
+ radius: LayoutSize,
+ stops: Vec<di::GradientStop>,
+ extend_mode: di::ExtendMode,
+ ) -> di::RadialGradient {
+ let mut builder = GradientBuilder::with_stops(stops);
+ let gradient = builder.radial_gradient(center, radius, extend_mode);
+ self.push_stops(builder.stops());
+ gradient
+ }
+
+ /// NOTE: gradients must be pushed in the order they're created
+ /// because create_gradient stores the stops in anticipation.
+ pub fn create_conic_gradient(
+ &mut self,
+ center: LayoutPoint,
+ angle: f32,
+ stops: Vec<di::GradientStop>,
+ extend_mode: di::ExtendMode,
+ ) -> di::ConicGradient {
+ let mut builder = GradientBuilder::with_stops(stops);
+ let gradient = builder.conic_gradient(center, angle, extend_mode);
+ self.push_stops(builder.stops());
+ gradient
+ }
+
+ pub fn push_border(
+ &mut self,
+ common: &di::CommonItemProperties,
+ bounds: LayoutRect,
+ widths: LayoutSideOffsets,
+ details: di::BorderDetails,
+ ) {
+ let item = di::DisplayItem::Border(di::BorderDisplayItem {
+ common: *common,
+ bounds,
+ details,
+ widths,
+ });
+
+ self.push_item(&item);
+ }
+
+ pub fn push_box_shadow(
+ &mut self,
+ common: &di::CommonItemProperties,
+ box_bounds: LayoutRect,
+ offset: LayoutVector2D,
+ color: ColorF,
+ blur_radius: f32,
+ spread_radius: f32,
+ border_radius: di::BorderRadius,
+ clip_mode: di::BoxShadowClipMode,
+ ) {
+ let item = di::DisplayItem::BoxShadow(di::BoxShadowDisplayItem {
+ common: *common,
+ box_bounds,
+ offset,
+ color,
+ blur_radius,
+ spread_radius,
+ border_radius,
+ clip_mode,
+ });
+
+ self.push_item(&item);
+ }
+
+ /// Pushes a linear gradient to be displayed.
+ ///
+ /// The gradient itself is described in the
+ /// `gradient` parameter. It is drawn on
+ /// a "tile" with the dimensions from `tile_size`.
+ /// These tiles are now repeated to the right and
+ /// to the bottom infinitely. If `tile_spacing`
+ /// is not zero spacers with the given dimensions
+ /// are inserted between the tiles as seams.
+ ///
+ /// The origin of the tiles is given in `layout.rect.origin`.
+ /// If the gradient should only be displayed once limit
+ /// the `layout.rect.size` to a single tile.
+ /// The gradient is only visible within the local clip.
+ pub fn push_gradient(
+ &mut self,
+ common: &di::CommonItemProperties,
+ bounds: LayoutRect,
+ gradient: di::Gradient,
+ tile_size: LayoutSize,
+ tile_spacing: LayoutSize,
+ ) {
+ let item = di::DisplayItem::Gradient(di::GradientDisplayItem {
+ common: *common,
+ bounds,
+ gradient,
+ tile_size,
+ tile_spacing,
+ });
+
+ self.push_item(&item);
+ }
+
+ /// Pushes a radial gradient to be displayed.
+ ///
+ /// See [`push_gradient`](#method.push_gradient) for explanation.
+ pub fn push_radial_gradient(
+ &mut self,
+ common: &di::CommonItemProperties,
+ bounds: LayoutRect,
+ gradient: di::RadialGradient,
+ tile_size: LayoutSize,
+ tile_spacing: LayoutSize,
+ ) {
+ let item = di::DisplayItem::RadialGradient(di::RadialGradientDisplayItem {
+ common: *common,
+ bounds,
+ gradient,
+ tile_size,
+ tile_spacing,
+ });
+
+ self.push_item(&item);
+ }
+
+ /// Pushes a conic gradient to be displayed.
+ ///
+ /// See [`push_gradient`](#method.push_gradient) for explanation.
+ pub fn push_conic_gradient(
+ &mut self,
+ common: &di::CommonItemProperties,
+ bounds: LayoutRect,
+ gradient: di::ConicGradient,
+ tile_size: LayoutSize,
+ tile_spacing: LayoutSize,
+ ) {
+ let item = di::DisplayItem::ConicGradient(di::ConicGradientDisplayItem {
+ common: *common,
+ bounds,
+ gradient,
+ tile_size,
+ tile_spacing,
+ });
+
+ self.push_item(&item);
+ }
+
+ pub fn push_reference_frame(
+ &mut self,
+ origin: LayoutPoint,
+ parent_spatial_id: di::SpatialId,
+ transform_style: di::TransformStyle,
+ transform: PropertyBinding<LayoutTransform>,
+ kind: di::ReferenceFrameKind,
+ ) -> di::SpatialId {
+ let id = self.generate_spatial_index();
+
+ let item = di::DisplayItem::PushReferenceFrame(di::ReferenceFrameDisplayListItem {
+ parent_spatial_id,
+ origin,
+ reference_frame: di::ReferenceFrame {
+ transform_style,
+ transform,
+ kind,
+ id,
+ },
+ });
+
+ self.push_item(&item);
+ id
+ }
+
+ pub fn pop_reference_frame(&mut self) {
+ self.push_item(&di::DisplayItem::PopReferenceFrame);
+ }
+
+ pub fn push_stacking_context(
+ &mut self,
+ origin: LayoutPoint,
+ spatial_id: di::SpatialId,
+ prim_flags: di::PrimitiveFlags,
+ clip_id: Option<di::ClipId>,
+ transform_style: di::TransformStyle,
+ mix_blend_mode: di::MixBlendMode,
+ filters: &[di::FilterOp],
+ filter_datas: &[di::FilterData],
+ filter_primitives: &[di::FilterPrimitive],
+ raster_space: di::RasterSpace,
+ flags: di::StackingContextFlags,
+ ) {
+ self.push_filters(filters, filter_datas, filter_primitives);
+
+ let item = di::DisplayItem::PushStackingContext(di::PushStackingContextDisplayItem {
+ origin,
+ spatial_id,
+ prim_flags,
+ stacking_context: di::StackingContext {
+ transform_style,
+ mix_blend_mode,
+ clip_id,
+ raster_space,
+ flags,
+ },
+ });
+
+ self.push_item(&item);
+ }
+
+ /// Helper for examples/ code.
+ pub fn push_simple_stacking_context(
+ &mut self,
+ origin: LayoutPoint,
+ spatial_id: di::SpatialId,
+ prim_flags: di::PrimitiveFlags,
+ ) {
+ self.push_simple_stacking_context_with_filters(
+ origin,
+ spatial_id,
+ prim_flags,
+ &[],
+ &[],
+ &[],
+ );
+ }
+
+ /// Helper for examples/ code.
+ pub fn push_simple_stacking_context_with_filters(
+ &mut self,
+ origin: LayoutPoint,
+ spatial_id: di::SpatialId,
+ prim_flags: di::PrimitiveFlags,
+ filters: &[di::FilterOp],
+ filter_datas: &[di::FilterData],
+ filter_primitives: &[di::FilterPrimitive],
+ ) {
+ self.push_stacking_context(
+ origin,
+ spatial_id,
+ prim_flags,
+ None,
+ di::TransformStyle::Flat,
+ di::MixBlendMode::Normal,
+ filters,
+ filter_datas,
+ filter_primitives,
+ di::RasterSpace::Screen,
+ di::StackingContextFlags::empty(),
+ );
+ }
+
+ pub fn pop_stacking_context(&mut self) {
+ self.push_item(&di::DisplayItem::PopStackingContext);
+ }
+
+ pub fn push_stops(&mut self, stops: &[di::GradientStop]) {
+ if stops.is_empty() {
+ return;
+ }
+ self.push_item(&di::DisplayItem::SetGradientStops);
+ self.push_iter(stops);
+ }
+
+ pub fn push_backdrop_filter(
+ &mut self,
+ common: &di::CommonItemProperties,
+ filters: &[di::FilterOp],
+ filter_datas: &[di::FilterData],
+ filter_primitives: &[di::FilterPrimitive],
+ ) {
+ self.push_filters(filters, filter_datas, filter_primitives);
+
+ let item = di::DisplayItem::BackdropFilter(di::BackdropFilterDisplayItem {
+ common: *common,
+ });
+ self.push_item(&item);
+ }
+
+ pub fn push_filters(
+ &mut self,
+ filters: &[di::FilterOp],
+ filter_datas: &[di::FilterData],
+ filter_primitives: &[di::FilterPrimitive],
+ ) {
+ if !filters.is_empty() {
+ self.push_item(&di::DisplayItem::SetFilterOps);
+ self.push_iter(filters);
+ }
+
+ for filter_data in filter_datas {
+ let func_types = [
+ filter_data.func_r_type, filter_data.func_g_type,
+ filter_data.func_b_type, filter_data.func_a_type];
+ self.push_item(&di::DisplayItem::SetFilterData);
+ self.push_iter(&func_types);
+ self.push_iter(&filter_data.r_values);
+ self.push_iter(&filter_data.g_values);
+ self.push_iter(&filter_data.b_values);
+ self.push_iter(&filter_data.a_values);
+ }
+
+ if !filter_primitives.is_empty() {
+ self.push_item(&di::DisplayItem::SetFilterPrimitives);
+ self.push_iter(filter_primitives);
+ }
+ }
+
+ fn generate_clip_index(&mut self) -> di::ClipId {
+ self.next_clip_index += 1;
+ di::ClipId::Clip(self.next_clip_index - 1, self.pipeline_id)
+ }
+
+ fn generate_spatial_index(&mut self) -> di::SpatialId {
+ self.next_spatial_index += 1;
+ di::SpatialId::new(self.next_spatial_index - 1, self.pipeline_id)
+ }
+
+ fn generate_clip_chain_id(&mut self) -> di::ClipChainId {
+ self.next_clip_chain_id += 1;
+ di::ClipChainId(self.next_clip_chain_id - 1, self.pipeline_id)
+ }
+
+ pub fn define_scroll_frame(
+ &mut self,
+ parent_space_and_clip: &di::SpaceAndClipInfo,
+ external_id: Option<di::ExternalScrollId>,
+ content_rect: LayoutRect,
+ clip_rect: LayoutRect,
+ scroll_sensitivity: di::ScrollSensitivity,
+ external_scroll_offset: LayoutVector2D,
+ ) -> di::SpaceAndClipInfo {
+ let clip_id = self.generate_clip_index();
+ let scroll_frame_id = self.generate_spatial_index();
+ let item = di::DisplayItem::ScrollFrame(di::ScrollFrameDisplayItem {
+ content_rect,
+ clip_rect,
+ parent_space_and_clip: *parent_space_and_clip,
+ clip_id,
+ scroll_frame_id,
+ external_id,
+ scroll_sensitivity,
+ external_scroll_offset,
+ });
+
+ self.push_item(&item);
+
+ di::SpaceAndClipInfo {
+ spatial_id: scroll_frame_id,
+ clip_id,
+ }
+ }
+
+ pub fn define_clip_chain<I>(
+ &mut self,
+ parent: Option<di::ClipChainId>,
+ clips: I,
+ ) -> di::ClipChainId
+ where
+ I: IntoIterator<Item = di::ClipId>,
+ I::IntoIter: ExactSizeIterator + Clone,
+ {
+ let id = self.generate_clip_chain_id();
+ self.push_item(&di::DisplayItem::ClipChain(di::ClipChainItem { id, parent }));
+ self.push_iter(clips);
+ id
+ }
+
+ pub fn define_clip_image_mask(
+ &mut self,
+ parent_space_and_clip: &di::SpaceAndClipInfo,
+ image_mask: di::ImageMask,
+ ) -> di::ClipId {
+ let id = self.generate_clip_index();
+ let item = di::DisplayItem::ImageMaskClip(di::ImageMaskClipDisplayItem {
+ id,
+ parent_space_and_clip: *parent_space_and_clip,
+ image_mask,
+ });
+
+ self.push_item(&item);
+ id
+ }
+
+ pub fn define_clip_rect(
+ &mut self,
+ parent_space_and_clip: &di::SpaceAndClipInfo,
+ clip_rect: LayoutRect,
+ ) -> di::ClipId {
+ let id = self.generate_clip_index();
+ let item = di::DisplayItem::RectClip(di::RectClipDisplayItem {
+ id,
+ parent_space_and_clip: *parent_space_and_clip,
+ clip_rect,
+ });
+
+ self.push_item(&item);
+ id
+ }
+
+ pub fn define_clip_rounded_rect(
+ &mut self,
+ parent_space_and_clip: &di::SpaceAndClipInfo,
+ clip: di::ComplexClipRegion,
+ ) -> di::ClipId {
+ let id = self.generate_clip_index();
+ let item = di::DisplayItem::RoundedRectClip(di::RoundedRectClipDisplayItem {
+ id,
+ parent_space_and_clip: *parent_space_and_clip,
+ clip,
+ });
+
+ self.push_item(&item);
+ id
+ }
+
+ pub fn define_clip<I>(
+ &mut self,
+ parent_space_and_clip: &di::SpaceAndClipInfo,
+ clip_rect: LayoutRect,
+ complex_clips: I,
+ ) -> di::ClipId
+ where
+ I: IntoIterator<Item = di::ComplexClipRegion>,
+ I::IntoIter: ExactSizeIterator + Clone,
+ {
+ let id = self.generate_clip_index();
+ let item = di::DisplayItem::Clip(di::ClipDisplayItem {
+ id,
+ parent_space_and_clip: *parent_space_and_clip,
+ clip_rect,
+ });
+
+ self.push_item(&item);
+ self.push_iter(complex_clips);
+ id
+ }
+
+ pub fn define_sticky_frame(
+ &mut self,
+ parent_spatial_id: di::SpatialId,
+ frame_rect: LayoutRect,
+ margins: SideOffsets2D<Option<f32>, LayoutPixel>,
+ vertical_offset_bounds: di::StickyOffsetBounds,
+ horizontal_offset_bounds: di::StickyOffsetBounds,
+ previously_applied_offset: LayoutVector2D,
+ ) -> di::SpatialId {
+ let id = self.generate_spatial_index();
+ let item = di::DisplayItem::StickyFrame(di::StickyFrameDisplayItem {
+ parent_spatial_id,
+ id,
+ bounds: frame_rect,
+ margins,
+ vertical_offset_bounds,
+ horizontal_offset_bounds,
+ previously_applied_offset,
+ });
+
+ self.push_item(&item);
+ id
+ }
+
+ pub fn push_iframe(
+ &mut self,
+ bounds: LayoutRect,
+ clip_rect: LayoutRect,
+ space_and_clip: &di::SpaceAndClipInfo,
+ pipeline_id: PipelineId,
+ ignore_missing_pipeline: bool
+ ) {
+ let item = di::DisplayItem::Iframe(di::IframeDisplayItem {
+ bounds,
+ clip_rect,
+ space_and_clip: *space_and_clip,
+ pipeline_id,
+ ignore_missing_pipeline,
+ });
+ self.push_item(&item);
+ }
+
+ pub fn push_shadow(
+ &mut self,
+ space_and_clip: &di::SpaceAndClipInfo,
+ shadow: di::Shadow,
+ should_inflate: bool,
+ ) {
+ let item = di::DisplayItem::PushShadow(di::PushShadowDisplayItem {
+ space_and_clip: *space_and_clip,
+ shadow,
+ should_inflate,
+ });
+ self.push_item(&item);
+ }
+
+ pub fn pop_all_shadows(&mut self) {
+ self.push_item(&di::DisplayItem::PopAllShadows);
+ }
+
+ pub fn start_item_group(&mut self) {
+ debug_assert!(!self.writing_to_chunk);
+ debug_assert!(self.pending_chunk.is_empty());
+
+ self.writing_to_chunk = true;
+ }
+
+ fn flush_pending_item_group(&mut self, key: di::ItemKey) {
+ // Push RetainedItems-marker to extra_data section.
+ self.push_retained_items(key);
+
+ // Push pending chunk to extra_data section.
+ self.extra_data.append(&mut self.pending_chunk);
+
+ // Push ReuseItems-marker to data section.
+ self.push_reuse_items(key);
+ }
+
+ pub fn finish_item_group(&mut self, key: di::ItemKey) -> bool {
+ debug_assert!(self.writing_to_chunk);
+ self.writing_to_chunk = false;
+
+ if self.pending_chunk.is_empty() {
+ return false;
+ }
+
+ self.flush_pending_item_group(key);
+ true
+ }
+
+ pub fn cancel_item_group(&mut self, discard: bool) {
+ debug_assert!(self.writing_to_chunk);
+ self.writing_to_chunk = false;
+
+ if discard {
+ self.pending_chunk.clear();
+ } else {
+ // Push pending chunk to data section.
+ self.data.append(&mut self.pending_chunk);
+ }
+ }
+
+ pub fn push_reuse_items(&mut self, key: di::ItemKey) {
+ self.push_item_to_section(
+ &di::DisplayItem::ReuseItems(key),
+ DisplayListSection::Data
+ );
+ }
+
+ fn push_retained_items(&mut self, key: di::ItemKey) {
+ self.push_item_to_section(
+ &di::DisplayItem::RetainedItems(key),
+ DisplayListSection::ExtraData
+ );
+ }
+
+ pub fn set_cache_size(&mut self, cache_size: usize) {
+ self.cache_size = cache_size;
+ }
+
+ pub fn finalize(mut self) -> (PipelineId, LayoutSize, BuiltDisplayList) {
+ assert!(self.save_state.is_none(), "Finalized DisplayListBuilder with a pending save");
+
+ if let Some(content) = self.serialized_content_buffer.take() {
+ println!("-- WebRender display list for {:?} --\n{}",
+ self.pipeline_id, content);
+ }
+
+ // Add `DisplayItem::max_size` zone of zeroes to the end of display list
+ // so there is at least this amount available in the display list during
+ // serialization.
+ ensure_red_zone::<di::DisplayItem>(&mut self.data);
+
+ let extra_data_offset = self.data.len();
+
+ if self.extra_data.len() > 0 {
+ ensure_red_zone::<di::DisplayItem>(&mut self.extra_data);
+ self.data.extend(self.extra_data);
+ }
+
+ let end_time = precise_time_ns();
+ (
+ self.pipeline_id,
+ self.content_size,
+ BuiltDisplayList {
+ descriptor: BuiltDisplayListDescriptor {
+ builder_start_time: self.builder_start_time,
+ builder_finish_time: end_time,
+ send_start_time: end_time,
+ total_clip_nodes: self.next_clip_index,
+ total_spatial_nodes: self.next_spatial_index,
+ cache_size: self.cache_size,
+ extra_data_offset,
+ },
+ data: self.data,
+ },
+ )
+ }
+}
diff --git a/third_party/webrender/webrender_api/src/font.rs b/third_party/webrender/webrender_api/src/font.rs
new file mode 100644
index 00000000000..7f24736f09e
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/font.rs
@@ -0,0 +1,604 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#[cfg(target_os = "macos")]
+use core_foundation::string::CFString;
+#[cfg(target_os = "macos")]
+use core_graphics::font::CGFont;
+use peek_poke::PeekPoke;
+#[cfg(target_os = "macos")]
+use serde::de::{self, Deserialize, Deserializer};
+#[cfg(target_os = "macos")]
+use serde::ser::{Serialize, Serializer};
+use std::cmp::Ordering;
+use std::hash::{Hash, Hasher};
+#[cfg(not(target_os = "macos"))]
+use std::path::PathBuf;
+use std::sync::{Arc, RwLock, RwLockReadGuard, mpsc::Sender};
+use std::collections::HashMap;
+// local imports
+use crate::api::IdNamespace;
+use crate::color::ColorU;
+use crate::units::LayoutPoint;
+
+/// Hashable floating-point storage for font size.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd, Deserialize, Serialize)]
+pub struct FontSize(pub f32);
+
+impl Ord for FontSize {
+ fn cmp(&self, other: &FontSize) -> Ordering {
+ self.partial_cmp(other).unwrap_or(Ordering::Equal)
+ }
+}
+
+impl Eq for FontSize {}
+
+impl Hash for FontSize {
+ fn hash<H: Hasher>(&self, state: &mut H) {
+ self.0.to_bits().hash(state);
+ }
+}
+
+impl From<f32> for FontSize {
+ fn from(size: f32) -> Self { FontSize(size) }
+}
+
+impl From<FontSize> for f32 {
+ fn from(size: FontSize) -> Self { size.0 }
+}
+
+impl FontSize {
+ pub fn zero() -> Self { FontSize(0.0) }
+
+ pub fn from_f32_px(size: f32) -> Self { FontSize(size) }
+
+ pub fn to_f32_px(&self) -> f32 { self.0 }
+
+ pub fn from_f64_px(size: f64) -> Self { FontSize(size as f32) }
+
+ pub fn to_f64_px(&self) -> f64 { self.0 as f64 }
+}
+
+/// Immutable description of a font instance requested by the user of the API.
+///
+/// `BaseFontInstance` can be identified by a `FontInstanceKey` so we should
+/// never need to hash it.
+#[derive(Clone, PartialEq, Eq, Debug, Ord, PartialOrd, MallocSizeOf)]
+#[cfg_attr(feature = "serialize", derive(Serialize))]
+#[cfg_attr(feature = "deserialize", derive(Deserialize))]
+pub struct BaseFontInstance {
+ ///
+ pub instance_key: FontInstanceKey,
+ ///
+ pub font_key: FontKey,
+ ///
+ pub size: FontSize,
+ ///
+ pub bg_color: ColorU,
+ ///
+ pub render_mode: FontRenderMode,
+ ///
+ pub flags: FontInstanceFlags,
+ ///
+ pub synthetic_italics: SyntheticItalics,
+ ///
+ #[cfg_attr(any(feature = "serialize", feature = "deserialize"), serde(skip))]
+ pub platform_options: Option<FontInstancePlatformOptions>,
+ ///
+ pub variations: Vec<FontVariation>,
+}
+
+pub type FontInstanceMap = HashMap<FontInstanceKey, Arc<BaseFontInstance>>;
+/// A map of font instance data accessed concurrently from multiple threads.
+#[derive(Clone)]
+#[cfg_attr(feature = "serialize", derive(Serialize))]
+#[cfg_attr(feature = "deserialize", derive(Deserialize))]
+pub struct SharedFontInstanceMap {
+ map: Arc<RwLock<FontInstanceMap>>,
+}
+
+impl SharedFontInstanceMap {
+ /// Creates an empty shared map.
+ pub fn new() -> Self {
+ SharedFontInstanceMap {
+ map: Arc::new(RwLock::new(HashMap::default()))
+ }
+ }
+
+ /// Acquires a write lock on the shared map.
+ pub fn lock(&mut self) -> Option<RwLockReadGuard<FontInstanceMap>> {
+ self.map.read().ok()
+ }
+
+ ///
+ pub fn get_font_instance_data(&self, key: FontInstanceKey) -> Option<FontInstanceData> {
+ match self.map.read().unwrap().get(&key) {
+ Some(instance) => Some(FontInstanceData {
+ font_key: instance.font_key,
+ size: instance.size.into(),
+ options: Some(FontInstanceOptions {
+ render_mode: instance.render_mode,
+ flags: instance.flags,
+ bg_color: instance.bg_color,
+ synthetic_italics: instance.synthetic_italics,
+ }),
+ platform_options: instance.platform_options,
+ variations: instance.variations.clone(),
+ }),
+ None => None,
+ }
+ }
+
+ /// Replace the shared map with the provided map.
+ pub fn set(&mut self, map: FontInstanceMap) {
+ *self.map.write().unwrap() = map;
+ }
+
+ ///
+ pub fn get_font_instance(&self, instance_key: FontInstanceKey) -> Option<Arc<BaseFontInstance>> {
+ let instance_map = self.map.read().unwrap();
+ instance_map.get(&instance_key).map(|instance| { Arc::clone(instance) })
+ }
+
+ ///
+ pub fn add_font_instance(
+ &mut self,
+ instance_key: FontInstanceKey,
+ font_key: FontKey,
+ size: f32,
+ options: Option<FontInstanceOptions>,
+ platform_options: Option<FontInstancePlatformOptions>,
+ variations: Vec<FontVariation>,
+ ) {
+ let FontInstanceOptions {
+ render_mode,
+ flags,
+ bg_color,
+ synthetic_italics,
+ ..
+ } = options.unwrap_or_default();
+
+ let instance = Arc::new(BaseFontInstance {
+ instance_key,
+ font_key,
+ size: size.into(),
+ bg_color,
+ render_mode,
+ flags,
+ synthetic_italics,
+ platform_options,
+ variations,
+ });
+
+ self.map
+ .write()
+ .unwrap()
+ .insert(instance_key, instance);
+ }
+
+ ///
+ pub fn delete_font_instance(&mut self, instance_key: FontInstanceKey) {
+ self.map.write().unwrap().remove(&instance_key);
+ }
+
+ ///
+ pub fn clear_namespace(&mut self, namespace: IdNamespace) {
+ self.map
+ .write()
+ .unwrap()
+ .retain(|key, _| key.0 != namespace);
+ }
+
+ ///
+ pub fn clone_map(&self) -> FontInstanceMap {
+ self.map.read().unwrap().clone()
+ }
+}
+
+#[cfg(not(target_os = "macos"))]
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub struct NativeFontHandle {
+ pub path: PathBuf,
+ pub index: u32,
+}
+
+#[cfg(target_os = "macos")]
+#[derive(Clone)]
+pub struct NativeFontHandle(pub CGFont);
+
+#[cfg(target_os = "macos")]
+impl Serialize for NativeFontHandle {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ self.0
+ .postscript_name()
+ .to_string()
+ .serialize(serializer)
+ }
+}
+
+#[cfg(target_os = "macos")]
+impl<'de> Deserialize<'de> for NativeFontHandle {
+ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+ where
+ D: Deserializer<'de>,
+ {
+ let postscript_name: String = Deserialize::deserialize(deserializer)?;
+
+ match CGFont::from_name(&CFString::new(&*postscript_name)) {
+ Ok(font) => Ok(NativeFontHandle(font)),
+ Err(_) => Err(de::Error::custom(
+ "Couldn't find a font with that PostScript name!",
+ )),
+ }
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone, Deserialize, Serialize, Debug)]
+pub struct GlyphDimensions {
+ pub left: i32,
+ pub top: i32,
+ pub width: i32,
+ pub height: i32,
+ pub advance: f32,
+}
+
+pub struct GlyphDimensionRequest {
+ pub key: FontInstanceKey,
+ pub glyph_indices: Vec<GlyphIndex>,
+ pub sender: Sender<Vec<Option<GlyphDimensions>>>,
+}
+
+pub struct GlyphIndexRequest {
+ pub key: FontKey,
+ pub text: String,
+ pub sender: Sender<Vec<Option<u32>>>,
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, Ord, PartialOrd)]
+pub struct FontKey(pub IdNamespace, pub u32);
+
+impl FontKey {
+ pub fn new(namespace: IdNamespace, key: u32) -> FontKey {
+ FontKey(namespace, key)
+ }
+}
+
+/// Container for the raw data describing a font. This might be a stream of
+/// bytes corresponding to a downloaded font, or a handle to a native font from
+/// the operating system.
+///
+/// Note that fonts need to be instantiated before being used, which involves
+/// assigning size and various other options. The word 'template' here is
+/// intended to distinguish this data from instance-specific data.
+#[derive(Clone)]
+pub enum FontTemplate {
+ Raw(Arc<Vec<u8>>, u32),
+ Native(NativeFontHandle),
+}
+
+#[repr(u8)]
+#[derive(Debug, Copy, Clone, Hash, Eq, MallocSizeOf, PartialEq, Serialize, Deserialize, Ord, PartialOrd, PeekPoke)]
+pub enum FontRenderMode {
+ Mono = 0,
+ Alpha,
+ Subpixel,
+}
+
+impl Default for FontRenderMode {
+ fn default() -> Self {
+ FontRenderMode::Mono
+ }
+}
+
+impl FontRenderMode {
+ // Combine two font render modes such that the lesser amount of AA limits the AA of the result.
+ pub fn limit_by(self, other: FontRenderMode) -> FontRenderMode {
+ match (self, other) {
+ (FontRenderMode::Subpixel, _) | (_, FontRenderMode::Mono) => other,
+ _ => self,
+ }
+ }
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialOrd, Deserialize, Serialize)]
+pub struct FontVariation {
+ pub tag: u32,
+ pub value: f32,
+}
+
+impl Ord for FontVariation {
+ fn cmp(&self, other: &FontVariation) -> Ordering {
+ self.tag.cmp(&other.tag)
+ .then(self.value.to_bits().cmp(&other.value.to_bits()))
+ }
+}
+
+impl PartialEq for FontVariation {
+ fn eq(&self, other: &FontVariation) -> bool {
+ self.tag == other.tag &&
+ self.value.to_bits() == other.value.to_bits()
+ }
+}
+
+impl Eq for FontVariation {}
+
+impl Hash for FontVariation {
+ fn hash<H: Hasher>(&self, state: &mut H) {
+ self.tag.hash(state);
+ self.value.to_bits().hash(state);
+ }
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Hash, Eq, PartialEq, PartialOrd, Ord, Serialize, PeekPoke)]
+pub struct GlyphOptions {
+ pub render_mode: FontRenderMode,
+ pub flags: FontInstanceFlags,
+}
+
+impl Default for GlyphOptions {
+ fn default() -> Self {
+ GlyphOptions {
+ render_mode: FontRenderMode::Subpixel,
+ flags: FontInstanceFlags::empty(),
+ }
+ }
+}
+
+bitflags! {
+ #[repr(C)]
+ #[derive(Deserialize, MallocSizeOf, Serialize, PeekPoke)]
+ pub struct FontInstanceFlags: u32 {
+ // Common flags
+ const SYNTHETIC_BOLD = 1 << 1;
+ const EMBEDDED_BITMAPS = 1 << 2;
+ const SUBPIXEL_BGR = 1 << 3;
+ const TRANSPOSE = 1 << 4;
+ const FLIP_X = 1 << 5;
+ const FLIP_Y = 1 << 6;
+ const SUBPIXEL_POSITION = 1 << 7;
+ const VERTICAL = 1 << 8;
+
+ // Internal flags
+ const TRANSFORM_GLYPHS = 1 << 12;
+ const TEXTURE_PADDING = 1 << 13;
+
+ // Windows flags
+ const FORCE_GDI = 1 << 16;
+ const FORCE_SYMMETRIC = 1 << 17;
+ const NO_SYMMETRIC = 1 << 18;
+
+ // Mac flags
+ const FONT_SMOOTHING = 1 << 16;
+
+ // FreeType flags
+ const FORCE_AUTOHINT = 1 << 16;
+ const NO_AUTOHINT = 1 << 17;
+ const VERTICAL_LAYOUT = 1 << 18;
+ const LCD_VERTICAL = 1 << 19;
+ }
+}
+
+impl Default for FontInstanceFlags {
+ #[cfg(target_os = "windows")]
+ fn default() -> FontInstanceFlags {
+ FontInstanceFlags::SUBPIXEL_POSITION
+ }
+
+ #[cfg(target_os = "macos")]
+ fn default() -> FontInstanceFlags {
+ FontInstanceFlags::SUBPIXEL_POSITION |
+ FontInstanceFlags::FONT_SMOOTHING
+ }
+
+ #[cfg(not(any(target_os = "macos", target_os = "windows")))]
+ fn default() -> FontInstanceFlags {
+ FontInstanceFlags::SUBPIXEL_POSITION
+ }
+}
+
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Hash, Eq, MallocSizeOf, PartialEq, PartialOrd, Ord, Serialize)]
+pub struct SyntheticItalics {
+ // Angle in degrees (-90..90) for synthetic italics in 8.8 fixed-point.
+ pub angle: i16,
+}
+
+impl SyntheticItalics {
+ pub const ANGLE_SCALE: f32 = 256.0;
+
+ pub fn from_degrees(degrees: f32) -> Self {
+ SyntheticItalics { angle: (degrees.max(-89.0).min(89.0) * Self::ANGLE_SCALE) as i16 }
+ }
+
+ pub fn to_degrees(self) -> f32 {
+ self.angle as f32 / Self::ANGLE_SCALE
+ }
+
+ pub fn to_radians(self) -> f32 {
+ self.to_degrees().to_radians()
+ }
+
+ pub fn to_skew(self) -> f32 {
+ self.to_radians().tan()
+ }
+
+ pub fn enabled() -> Self {
+ Self::from_degrees(14.0)
+ }
+
+ pub fn disabled() -> Self {
+ SyntheticItalics { angle: 0 }
+ }
+
+ pub fn is_enabled(self) -> bool {
+ self.angle != 0
+ }
+}
+
+impl Default for SyntheticItalics {
+ fn default() -> Self {
+ SyntheticItalics::disabled()
+ }
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Hash, Eq, PartialEq, PartialOrd, Ord, Serialize)]
+pub struct FontInstanceOptions {
+ pub render_mode: FontRenderMode,
+ pub flags: FontInstanceFlags,
+ /// When bg_color.a is != 0 and render_mode is FontRenderMode::Subpixel,
+ /// the text will be rendered with bg_color.r/g/b as an opaque estimated
+ /// background color.
+ pub bg_color: ColorU,
+ pub synthetic_italics: SyntheticItalics,
+}
+
+impl Default for FontInstanceOptions {
+ fn default() -> FontInstanceOptions {
+ FontInstanceOptions {
+ render_mode: FontRenderMode::Subpixel,
+ flags: Default::default(),
+ bg_color: ColorU::new(0, 0, 0, 0),
+ synthetic_italics: SyntheticItalics::disabled(),
+ }
+ }
+}
+
+#[cfg(target_os = "windows")]
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Hash, Eq, MallocSizeOf, PartialEq, PartialOrd, Ord, Serialize)]
+pub struct FontInstancePlatformOptions {
+ pub gamma: u16, // percent
+ pub contrast: u8, // percent
+ pub cleartype_level: u8, // percent
+}
+
+#[cfg(target_os = "windows")]
+impl Default for FontInstancePlatformOptions {
+ fn default() -> FontInstancePlatformOptions {
+ FontInstancePlatformOptions {
+ gamma: 180, // Default DWrite gamma
+ contrast: 100,
+ cleartype_level: 100,
+ }
+ }
+}
+
+#[cfg(target_os = "macos")]
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Hash, Eq, MallocSizeOf, PartialEq, PartialOrd, Ord, Serialize)]
+pub struct FontInstancePlatformOptions {
+ pub unused: u32,
+}
+
+#[cfg(target_os = "macos")]
+impl Default for FontInstancePlatformOptions {
+ fn default() -> FontInstancePlatformOptions {
+ FontInstancePlatformOptions {
+ unused: 0,
+ }
+ }
+}
+
+#[cfg(not(any(target_os = "macos", target_os = "windows")))]
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, PartialOrd, Ord, Serialize)]
+pub enum FontLCDFilter {
+ None,
+ Default,
+ Light,
+ Legacy,
+}
+
+#[cfg(not(any(target_os = "macos", target_os = "windows")))]
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, PartialOrd, Ord, Serialize)]
+pub enum FontHinting {
+ None,
+ Mono,
+ Light,
+ Normal,
+ LCD,
+}
+
+#[cfg(not(any(target_os = "macos", target_os = "windows")))]
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Hash, Eq, MallocSizeOf, PartialEq, PartialOrd, Ord, Serialize)]
+pub struct FontInstancePlatformOptions {
+ pub lcd_filter: FontLCDFilter,
+ pub hinting: FontHinting,
+}
+
+#[cfg(not(any(target_os = "macos", target_os = "windows")))]
+impl Default for FontInstancePlatformOptions {
+ fn default() -> FontInstancePlatformOptions {
+ FontInstancePlatformOptions {
+ lcd_filter: FontLCDFilter::Default,
+ hinting: FontHinting::LCD,
+ }
+ }
+}
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq, Ord, PartialOrd, MallocSizeOf, PeekPoke)]
+#[derive(Deserialize, Serialize)]
+pub struct FontInstanceKey(pub IdNamespace, pub u32);
+
+impl FontInstanceKey {
+ pub fn new(namespace: IdNamespace, key: u32) -> FontInstanceKey {
+ FontInstanceKey(namespace, key)
+ }
+}
+
+/// Data corresponding to an instantiation of a font, with size and
+/// other options specified.
+///
+/// Note that the actual font is stored out-of-band in `FontTemplate`.
+#[derive(Clone)]
+pub struct FontInstanceData {
+ pub font_key: FontKey,
+ pub size: f32,
+ pub options: Option<FontInstanceOptions>,
+ pub platform_options: Option<FontInstancePlatformOptions>,
+ pub variations: Vec<FontVariation>,
+}
+
+pub type GlyphIndex = u32;
+
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub struct GlyphInstance {
+ pub index: GlyphIndex,
+ pub point: LayoutPoint,
+}
+
+impl Default for GlyphInstance {
+ fn default() -> Self {
+ GlyphInstance {
+ index: 0,
+ point: LayoutPoint::zero(),
+ }
+ }
+}
+
+impl Eq for GlyphInstance {}
+
+#[cfg_attr(feature = "cargo-clippy", allow(clippy::derive_hash_xor_eq))]
+impl Hash for GlyphInstance {
+ fn hash<H: Hasher>(&self, state: &mut H) {
+ // Note: this is inconsistent with the Eq impl for -0.0 (don't care).
+ self.index.hash(state);
+ self.point.x.to_bits().hash(state);
+ self.point.y.to_bits().hash(state);
+ }
+}
diff --git a/third_party/webrender/webrender_api/src/gradient_builder.rs b/third_party/webrender/webrender_api/src/gradient_builder.rs
new file mode 100644
index 00000000000..883acbafa38
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/gradient_builder.rs
@@ -0,0 +1,178 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use crate::display_item as di;
+use crate::units::*;
+
+
+/// Construct a gradient to be used in display lists.
+///
+/// Each gradient needs at least two stops.
+pub struct GradientBuilder {
+ stops: Vec<di::GradientStop>,
+}
+
+impl GradientBuilder {
+ /// Create a new gradient builder.
+ pub fn new() -> Self {
+ GradientBuilder {
+ stops: Vec::new(),
+ }
+ }
+
+ /// Create a gradient builder with a list of stops.
+ pub fn with_stops(stops: Vec<di::GradientStop>) -> GradientBuilder {
+ GradientBuilder { stops }
+ }
+
+ /// Push an additional stop for the gradient.
+ pub fn push(&mut self, stop: di::GradientStop) {
+ self.stops.push(stop);
+ }
+
+ /// Get a reference to the list of stops.
+ pub fn stops(&self) -> &[di::GradientStop] {
+ self.stops.as_ref()
+ }
+
+ /// Return the gradient stops vector.
+ pub fn into_stops(self) -> Vec<di::GradientStop> {
+ self.stops
+ }
+
+ /// Produce a linear gradient, normalize the stops.
+ pub fn gradient(
+ &mut self,
+ start_point: LayoutPoint,
+ end_point: LayoutPoint,
+ extend_mode: di::ExtendMode,
+ ) -> di::Gradient {
+ let (start_offset, end_offset) = self.normalize(extend_mode);
+ let start_to_end = end_point - start_point;
+
+ di::Gradient {
+ start_point: start_point + start_to_end * start_offset,
+ end_point: start_point + start_to_end * end_offset,
+ extend_mode,
+ }
+ }
+
+ /// Produce a radial gradient, normalize the stops.
+ ///
+ /// Will replace the gradient with a single color
+ /// if the radius negative.
+ pub fn radial_gradient(
+ &mut self,
+ center: LayoutPoint,
+ radius: LayoutSize,
+ extend_mode: di::ExtendMode,
+ ) -> di::RadialGradient {
+ if radius.width <= 0.0 || radius.height <= 0.0 {
+ // The shader cannot handle a non positive radius. So
+ // reuse the stops vector and construct an equivalent
+ // gradient.
+ let last_color = self.stops.last().unwrap().color;
+
+ self.stops.clear();
+ self.stops.push(di::GradientStop { offset: 0.0, color: last_color, });
+ self.stops.push(di::GradientStop { offset: 1.0, color: last_color, });
+
+ return di::RadialGradient {
+ center,
+ radius: LayoutSize::new(1.0, 1.0),
+ start_offset: 0.0,
+ end_offset: 1.0,
+ extend_mode,
+ };
+ }
+
+ let (start_offset, end_offset) =
+ self.normalize(extend_mode);
+
+ di::RadialGradient {
+ center,
+ radius,
+ start_offset,
+ end_offset,
+ extend_mode,
+ }
+ }
+
+ /// Produce a conic gradient, normalize the stops.
+ pub fn conic_gradient(
+ &mut self,
+ center: LayoutPoint,
+ angle: f32,
+ extend_mode: di::ExtendMode,
+ ) -> di::ConicGradient {
+ let (start_offset, end_offset) =
+ self.normalize(extend_mode);
+
+ di::ConicGradient {
+ center,
+ angle,
+ start_offset,
+ end_offset,
+ extend_mode,
+ }
+ }
+
+ /// Gradients can be defined with stops outside the range of [0, 1]
+ /// when this happens the gradient needs to be normalized by adjusting
+ /// the gradient stops and gradient line into an equivalent gradient
+ /// with stops in the range [0, 1]. this is done by moving the beginning
+ /// of the gradient line to where stop[0] and the end of the gradient line
+ /// to stop[n-1]. this function adjusts the stops in place, and returns
+ /// the amount to adjust the gradient line start and stop.
+ fn normalize(&mut self, extend_mode: di::ExtendMode) -> (f32, f32) {
+ let stops = &mut self.stops;
+ assert!(stops.len() >= 2);
+
+ let first = *stops.first().unwrap();
+ let last = *stops.last().unwrap();
+
+ assert!(first.offset <= last.offset);
+
+ let stops_delta = last.offset - first.offset;
+
+ if stops_delta > 0.000001 {
+ for stop in stops {
+ stop.offset = (stop.offset - first.offset) / stops_delta;
+ }
+
+ (first.offset, last.offset)
+ } else {
+ // We have a degenerate gradient and can't accurately transform the stops
+ // what happens here depends on the repeat behavior, but in any case
+ // we reconstruct the gradient stops to something simpler and equivalent
+ stops.clear();
+
+ match extend_mode {
+ di::ExtendMode::Clamp => {
+ // This gradient is two colors split at the offset of the stops,
+ // so create a gradient with two colors split at 0.5 and adjust
+ // the gradient line so 0.5 is at the offset of the stops
+ stops.push(di::GradientStop { color: first.color, offset: 0.0, });
+ stops.push(di::GradientStop { color: first.color, offset: 0.5, });
+ stops.push(di::GradientStop { color: last.color, offset: 0.5, });
+ stops.push(di::GradientStop { color: last.color, offset: 1.0, });
+
+ let offset = last.offset;
+
+ (offset - 0.5, offset + 0.5)
+ }
+ di::ExtendMode::Repeat => {
+ // A repeating gradient with stops that are all in the same
+ // position should just display the last color. I believe the
+ // spec says that it should be the average color of the gradient,
+ // but this matches what Gecko and Blink does
+ stops.push(di::GradientStop { color: last.color, offset: 0.0, });
+ stops.push(di::GradientStop { color: last.color, offset: 1.0, });
+
+ (0.0, 1.0)
+ }
+ }
+ }
+ }
+}
diff --git a/third_party/webrender/webrender_api/src/image.rs b/third_party/webrender/webrender_api/src/image.rs
new file mode 100644
index 00000000000..deaeb92aeb1
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/image.rs
@@ -0,0 +1,595 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#![deny(missing_docs)]
+
+use euclid::{size2, Rect, num::Zero};
+use peek_poke::PeekPoke;
+use std::ops::{Add, Sub};
+use std::sync::Arc;
+// local imports
+use crate::api::{IdNamespace, PipelineId, TileSize};
+use crate::display_item::ImageRendering;
+use crate::font::{FontInstanceKey, FontInstanceData, FontKey, FontTemplate};
+use crate::units::*;
+
+/// The default tile size for blob images and regular images larger than
+/// the maximum texture size.
+pub const DEFAULT_TILE_SIZE: TileSize = 512;
+
+/// An opaque identifier describing an image registered with WebRender.
+/// This is used as a handle to reference images, and is used as the
+/// hash map key for the actual image storage in the `ResourceCache`.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub struct ImageKey(pub IdNamespace, pub u32);
+
+impl Default for ImageKey {
+ fn default() -> Self {
+ ImageKey::DUMMY
+ }
+}
+
+impl ImageKey {
+ /// Placeholder Image key, used to represent None.
+ pub const DUMMY: Self = ImageKey(IdNamespace(0), 0);
+
+ /// Mints a new ImageKey. The given ID must be unique.
+ pub fn new(namespace: IdNamespace, key: u32) -> Self {
+ ImageKey(namespace, key)
+ }
+}
+
+/// An opaque identifier describing a blob image registered with WebRender.
+/// This is used as a handle to reference blob images, and can be used as an
+/// image in display items.
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
+pub struct BlobImageKey(pub ImageKey);
+
+impl BlobImageKey {
+ /// Interpret this blob image as an image for a display item.
+ pub fn as_image(self) -> ImageKey {
+ self.0
+ }
+}
+
+/// An arbitrary identifier for an external image provided by the
+/// application. It must be a unique identifier for each external
+/// image.
+#[repr(C)]
+#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Serialize, Deserialize)]
+pub struct ExternalImageId(pub u64);
+
+/// The source for an external image.
+pub enum ExternalImageSource<'a> {
+ /// A raw pixel buffer.
+ RawData(&'a [u8]),
+ /// A gl::GLuint texture handle.
+ NativeTexture(u32),
+ /// An invalid source.
+ Invalid,
+}
+
+/// The data that an external client should provide about
+/// an external image. For instance, if providing video frames,
+/// the application could call wr.render() whenever a new
+/// video frame is ready. Note that the UV coords are supplied
+/// in texel-space!
+pub struct ExternalImage<'a> {
+ /// UV coordinates for the image.
+ pub uv: TexelRect,
+ /// The source for this image's contents.
+ pub source: ExternalImageSource<'a>,
+}
+
+/// The interfaces that an application can implement to support providing
+/// external image buffers.
+/// When the application passes an external image to WR, it should keep that
+/// external image life time. People could check the epoch id in RenderNotifier
+/// at the client side to make sure that the external image is not used by WR.
+/// Then, do the clean up for that external image.
+pub trait ExternalImageHandler {
+ /// Lock the external image. Then, WR could start to read the image content.
+ /// The WR client should not change the image content until the unlock()
+ /// call. Provide ImageRendering for NativeTexture external images.
+ fn lock(&mut self, key: ExternalImageId, channel_index: u8, rendering: ImageRendering) -> ExternalImage;
+ /// Unlock the external image. WR should not read the image content
+ /// after this call.
+ fn unlock(&mut self, key: ExternalImageId, channel_index: u8);
+}
+
+/// Allows callers to receive a texture with the contents of a specific
+/// pipeline copied to it.
+pub trait OutputImageHandler {
+ /// Return the native texture handle and the size of the texture.
+ fn lock(&mut self, pipeline_id: PipelineId) -> Option<(u32, FramebufferIntSize)>;
+ /// Unlock will only be called if the lock() call succeeds, when WR has issued
+ /// the GL commands to copy the output to the texture handle.
+ fn unlock(&mut self, pipeline_id: PipelineId);
+}
+
+/// Specifies the type of texture target in driver terms.
+#[repr(u8)]
+#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
+pub enum TextureTarget {
+ /// Standard texture. This maps to GL_TEXTURE_2D in OpenGL.
+ Default = 0,
+ /// Array texture. This maps to GL_TEXTURE_2D_ARRAY in OpenGL. See
+ /// https://www.khronos.org/opengl/wiki/Array_Texture for background
+ /// on Array textures.
+ Array = 1,
+ /// Rectangle texture. This maps to GL_TEXTURE_RECTANGLE in OpenGL. This
+ /// is similar to a standard texture, with a few subtle differences
+ /// (no mipmaps, non-power-of-two dimensions, different coordinate space)
+ /// that make it useful for representing the kinds of textures we use
+ /// in WebRender. See https://www.khronos.org/opengl/wiki/Rectangle_Texture
+ /// for background on Rectangle textures.
+ Rect = 2,
+ /// External texture. This maps to GL_TEXTURE_EXTERNAL_OES in OpenGL, which
+ /// is an extension. This is used for image formats that OpenGL doesn't
+ /// understand, particularly YUV. See
+ /// https://www.khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external.txt
+ External = 3,
+}
+
+/// Storage format identifier for externally-managed images.
+#[repr(u8)]
+#[derive(Debug, Copy, Clone, Eq, Hash, PartialEq, Serialize, Deserialize)]
+pub enum ExternalImageType {
+ /// The image is texture-backed.
+ TextureHandle(TextureTarget),
+ /// The image is heap-allocated by the embedding.
+ Buffer,
+}
+
+/// Descriptor for external image resources. See `ImageData`.
+#[repr(C)]
+#[derive(Debug, Copy, Clone, Eq, Hash, PartialEq, Serialize, Deserialize)]
+pub struct ExternalImageData {
+ /// The identifier of this external image, provided by the embedding.
+ pub id: ExternalImageId,
+ /// For multi-plane images (i.e. YUV), indicates the plane of the
+ /// original image that this struct represents. 0 for single-plane images.
+ pub channel_index: u8,
+ /// Storage format identifier.
+ pub image_type: ExternalImageType,
+}
+
+/// Specifies the format of a series of pixels, in driver terms.
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
+pub enum ImageFormat {
+ /// One-channel, byte storage. The "red" doesn't map to the color
+ /// red per se, and is just the way that OpenGL has historically referred
+ /// to single-channel buffers.
+ R8 = 1,
+ /// One-channel, short storage
+ R16 = 2,
+ /// Four channels, byte storage.
+ BGRA8 = 3,
+ /// Four channels, float storage.
+ RGBAF32 = 4,
+ /// Two-channels, byte storage. Similar to `R8`, this just means
+ /// "two channels" rather than "red and green".
+ RG8 = 5,
+ /// Two-channels, byte storage. Similar to `R16`, this just means
+ /// "two channels" rather than "red and green".
+ RG16 = 6,
+
+ /// Four channels, signed integer storage.
+ RGBAI32 = 7,
+ /// Four channels, byte storage.
+ RGBA8 = 8,
+}
+
+impl ImageFormat {
+ /// Returns the number of bytes per pixel for the given format.
+ pub fn bytes_per_pixel(self) -> i32 {
+ match self {
+ ImageFormat::R8 => 1,
+ ImageFormat::R16 => 2,
+ ImageFormat::BGRA8 => 4,
+ ImageFormat::RGBAF32 => 16,
+ ImageFormat::RG8 => 2,
+ ImageFormat::RG16 => 4,
+ ImageFormat::RGBAI32 => 16,
+ ImageFormat::RGBA8 => 4,
+ }
+ }
+}
+
+/// Specifies the color depth of an image. Currently only used for YUV images.
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
+pub enum ColorDepth {
+ /// 8 bits image (most common)
+ Color8,
+ /// 10 bits image
+ Color10,
+ /// 12 bits image
+ Color12,
+ /// 16 bits image
+ Color16,
+}
+
+impl Default for ColorDepth {
+ fn default() -> Self {
+ ColorDepth::Color8
+ }
+}
+
+impl ColorDepth {
+ /// Return the numerical bit depth value for the type.
+ pub fn bit_depth(self) -> u32 {
+ match self {
+ ColorDepth::Color8 => 8,
+ ColorDepth::Color10 => 10,
+ ColorDepth::Color12 => 12,
+ ColorDepth::Color16 => 16,
+ }
+ }
+ /// 10 and 12 bits images are encoded using 16 bits integer, we need to
+ /// rescale the 10 or 12 bits value to extend to 16 bits.
+ pub fn rescaling_factor(self) -> f32 {
+ match self {
+ ColorDepth::Color8 => 1.0,
+ ColorDepth::Color10 => 64.0,
+ ColorDepth::Color12 => 16.0,
+ ColorDepth::Color16 => 1.0,
+ }
+ }
+}
+
+bitflags! {
+ /// Various flags that are part of an image descriptor.
+ #[derive(Deserialize, Serialize)]
+ pub struct ImageDescriptorFlags: u32 {
+ /// Whether this image is opaque, or has an alpha channel. Avoiding blending
+ /// for opaque surfaces is an important optimization.
+ const IS_OPAQUE = 1;
+ /// Whether to allow the driver to automatically generate mipmaps. If images
+ /// are already downscaled appropriately, mipmap generation can be wasted
+ /// work, and cause performance problems on some cards/drivers.
+ ///
+ /// See https://github.com/servo/webrender/pull/2555/
+ const ALLOW_MIPMAPS = 2;
+ }
+}
+
+/// Metadata (but not storage) describing an image In WebRender.
+#[derive(Copy, Clone, Debug, Deserialize, PartialEq, Serialize)]
+pub struct ImageDescriptor {
+ /// Format of the image data.
+ pub format: ImageFormat,
+ /// Width and length of the image data, in pixels.
+ pub size: DeviceIntSize,
+ /// The number of bytes from the start of one row to the next. If non-None,
+ /// `compute_stride` will return this value, otherwise it returns
+ /// `width * bpp`. Different source of images have different alignment
+ /// constraints for rows, so the stride isn't always equal to width * bpp.
+ pub stride: Option<i32>,
+ /// Offset in bytes of the first pixel of this image in its backing buffer.
+ /// This is used for tiling, wherein WebRender extracts chunks of input images
+ /// in order to cache, manipulate, and render them individually. This offset
+ /// tells the texture upload machinery where to find the bytes to upload for
+ /// this tile. Non-tiled images generally set this to zero.
+ pub offset: i32,
+ /// Various bool flags related to this descriptor.
+ pub flags: ImageDescriptorFlags,
+}
+
+impl ImageDescriptor {
+ /// Mints a new ImageDescriptor.
+ pub fn new(
+ width: i32,
+ height: i32,
+ format: ImageFormat,
+ flags: ImageDescriptorFlags,
+ ) -> Self {
+ ImageDescriptor {
+ size: size2(width, height),
+ format,
+ stride: None,
+ offset: 0,
+ flags,
+ }
+ }
+
+ /// Returns the stride, either via an explicit stride stashed on the object
+ /// or by the default computation.
+ pub fn compute_stride(&self) -> i32 {
+ self.stride.unwrap_or(self.size.width * self.format.bytes_per_pixel())
+ }
+
+ /// Computes the total size of the image, in bytes.
+ pub fn compute_total_size(&self) -> i32 {
+ self.compute_stride() * self.size.height
+ }
+
+ /// Computes the bounding rectangle for the image, rooted at (0, 0).
+ pub fn full_rect(&self) -> DeviceIntRect {
+ DeviceIntRect::new(
+ DeviceIntPoint::zero(),
+ self.size,
+ )
+ }
+
+ /// Returns true if this descriptor is opaque
+ pub fn is_opaque(&self) -> bool {
+ self.flags.contains(ImageDescriptorFlags::IS_OPAQUE)
+ }
+
+ /// Returns true if this descriptor allows mipmaps
+ pub fn allow_mipmaps(&self) -> bool {
+ self.flags.contains(ImageDescriptorFlags::ALLOW_MIPMAPS)
+ }
+}
+
+/// Represents the backing store of an arbitrary series of pixels for display by
+/// WebRender. This storage can take several forms.
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub enum ImageData {
+ /// A simple series of bytes, provided by the embedding and owned by WebRender.
+ /// The format is stored out-of-band, currently in ImageDescriptor.
+ Raw(#[serde(with = "serde_image_data_raw")] Arc<Vec<u8>>),
+ /// An image owned by the embedding, and referenced by WebRender. This may
+ /// take the form of a texture or a heap-allocated buffer.
+ External(ExternalImageData),
+}
+
+mod serde_image_data_raw {
+ extern crate serde_bytes;
+
+ use std::sync::Arc;
+ use serde::{Deserializer, Serializer};
+
+ pub fn serialize<S: Serializer>(bytes: &Arc<Vec<u8>>, serializer: S) -> Result<S::Ok, S::Error> {
+ serde_bytes::serialize(bytes.as_slice(), serializer)
+ }
+
+ pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result<Arc<Vec<u8>>, D::Error> {
+ serde_bytes::deserialize(deserializer).map(Arc::new)
+ }
+}
+
+impl ImageData {
+ /// Mints a new raw ImageData, taking ownership of the bytes.
+ pub fn new(bytes: Vec<u8>) -> Self {
+ ImageData::Raw(Arc::new(bytes))
+ }
+
+ /// Mints a new raw ImageData from Arc-ed bytes.
+ pub fn new_shared(bytes: Arc<Vec<u8>>) -> Self {
+ ImageData::Raw(bytes)
+ }
+}
+
+/// The resources exposed by the resource cache available for use by the blob rasterizer.
+pub trait BlobImageResources {
+ /// Returns the `FontTemplate` for the given key.
+ fn get_font_data(&self, key: FontKey) -> &FontTemplate;
+ /// Returns the `FontInstanceData` for the given key, if found.
+ fn get_font_instance_data(&self, key: FontInstanceKey) -> Option<FontInstanceData>;
+}
+
+/// A handler on the render backend that can create rasterizer objects which will
+/// be sent to the scene builder thread to execute the rasterization.
+///
+/// The handler is responsible for collecting resources, managing/updating blob commands
+/// and creating the rasterizer objects, but isn't expected to do any rasterization itself.
+pub trait BlobImageHandler: Send {
+ /// Creates a snapshot of the current state of blob images in the handler.
+ fn create_blob_rasterizer(&mut self) -> Box<dyn AsyncBlobImageRasterizer>;
+
+ /// Creates an empty blob handler of the same type.
+ ///
+ /// This is used to allow creating new API endpoints with blob handlers installed on them.
+ fn create_similar(&self) -> Box<dyn BlobImageHandler>;
+
+ /// A hook to let the blob image handler update any state related to resources that
+ /// are not bundled in the blob recording itself.
+ fn prepare_resources(
+ &mut self,
+ services: &dyn BlobImageResources,
+ requests: &[BlobImageParams],
+ );
+
+ /// Register a blob image.
+ fn add(&mut self, key: BlobImageKey, data: Arc<BlobImageData>, visible_rect: &DeviceIntRect,
+ tile_size: TileSize);
+
+ /// Update an already registered blob image.
+ fn update(&mut self, key: BlobImageKey, data: Arc<BlobImageData>, visible_rect: &DeviceIntRect,
+ dirty_rect: &BlobDirtyRect);
+
+ /// Delete an already registered blob image.
+ fn delete(&mut self, key: BlobImageKey);
+
+ /// A hook to let the handler clean up any state related to a font which the resource
+ /// cache is about to delete.
+ fn delete_font(&mut self, key: FontKey);
+
+ /// A hook to let the handler clean up any state related to a font instance which the
+ /// resource cache is about to delete.
+ fn delete_font_instance(&mut self, key: FontInstanceKey);
+
+ /// A hook to let the handler clean up any state related a given namespace before the
+ /// resource cache deletes them.
+ fn clear_namespace(&mut self, namespace: IdNamespace);
+
+ /// Whether to allow rendering blobs on multiple threads.
+ fn enable_multithreading(&mut self, enable: bool);
+}
+
+/// A group of rasterization requests to execute synchronously on the scene builder thread.
+pub trait AsyncBlobImageRasterizer : Send {
+ /// Rasterize the requests.
+ ///
+ /// Gecko uses te priority hint to schedule work in a way that minimizes the risk
+ /// of high priority work being blocked by (or enqued behind) low priority work.
+ fn rasterize(
+ &mut self,
+ requests: &[BlobImageParams],
+ low_priority: bool
+ ) -> Vec<(BlobImageRequest, BlobImageResult)>;
+}
+
+
+/// Input parameters for the BlobImageRasterizer.
+#[derive(Copy, Clone, Debug)]
+pub struct BlobImageParams {
+ /// A key that identifies the blob image rasterization request.
+ pub request: BlobImageRequest,
+ /// Description of the format of the blob's output image.
+ pub descriptor: BlobImageDescriptor,
+ /// An optional sub-rectangle of the image to avoid re-rasterizing
+ /// the entire image when only a portion is updated.
+ ///
+ /// If set to None the entire image is rasterized.
+ pub dirty_rect: BlobDirtyRect,
+}
+
+/// The possible states of a Dirty rect.
+///
+/// This exists because people kept getting confused with `Option<Rect>`.
+#[derive(Debug, Serialize, Deserialize)]
+pub enum DirtyRect<T: Copy, U> {
+ /// Everything is Dirty, equivalent to Partial(image_bounds)
+ All,
+ /// Some specific amount is dirty
+ Partial(Rect<T, U>)
+}
+
+impl<T, U> DirtyRect<T, U>
+where
+ T: Copy + Clone
+ + PartialOrd + PartialEq
+ + Add<T, Output = T>
+ + Sub<T, Output = T>
+ + Zero
+{
+ /// Creates an empty DirtyRect (indicating nothing is invalid)
+ pub fn empty() -> Self {
+ DirtyRect::Partial(Rect::zero())
+ }
+
+ /// Returns whether the dirty rect is empty
+ pub fn is_empty(&self) -> bool {
+ match self {
+ DirtyRect::All => false,
+ DirtyRect::Partial(rect) => rect.is_empty(),
+ }
+ }
+
+ /// Replaces self with the empty rect and returns the old value.
+ pub fn replace_with_empty(&mut self) -> Self {
+ ::std::mem::replace(self, DirtyRect::empty())
+ }
+
+ /// Maps over the contents of Partial.
+ pub fn map<F>(self, func: F) -> Self
+ where F: FnOnce(Rect<T, U>) -> Rect<T, U>,
+ {
+ use crate::DirtyRect::*;
+
+ match self {
+ All => All,
+ Partial(rect) => Partial(func(rect)),
+ }
+ }
+
+ /// Unions the dirty rects.
+ pub fn union(&self, other: &Self) -> Self {
+ use crate::DirtyRect::*;
+
+ match (*self, *other) {
+ (All, _) | (_, All) => All,
+ (Partial(rect1), Partial(rect2)) => Partial(rect1.union(&rect2)),
+ }
+ }
+
+ /// Intersects the dirty rects.
+ pub fn intersection(&self, other: &Self) -> Self {
+ use crate::DirtyRect::*;
+
+ match (*self, *other) {
+ (All, rect) | (rect, All) => rect,
+ (Partial(rect1), Partial(rect2)) => {
+ Partial(rect1.intersection(&rect2).unwrap_or_else(Rect::zero))
+ }
+ }
+ }
+
+ /// Converts the dirty rect into a subrect of the given one via intersection.
+ pub fn to_subrect_of(&self, rect: &Rect<T, U>) -> Rect<T, U> {
+ use crate::DirtyRect::*;
+
+ match *self {
+ All => *rect,
+ Partial(dirty_rect) => {
+ dirty_rect.intersection(rect).unwrap_or_else(Rect::zero)
+ }
+ }
+ }
+}
+
+impl<T: Copy, U> Copy for DirtyRect<T, U> {}
+impl<T: Copy, U> Clone for DirtyRect<T, U> {
+ fn clone(&self) -> Self { *self }
+}
+
+impl<T: Copy, U> From<Rect<T, U>> for DirtyRect<T, U> {
+ fn from(rect: Rect<T, U>) -> Self {
+ DirtyRect::Partial(rect)
+ }
+}
+
+/// Backing store for blob image command streams.
+pub type BlobImageData = Vec<u8>;
+
+/// Result type for blob raserization.
+pub type BlobImageResult = Result<RasterizedBlobImage, BlobImageError>;
+
+/// Metadata (but not storage) for a blob image.
+#[repr(C)]
+#[derive(Copy, Clone, Debug)]
+pub struct BlobImageDescriptor {
+ /// Surface of the image or tile to render in the same coordinate space as
+ /// the drawing commands.
+ pub rect: LayoutIntRect,
+ /// Format for the data in the backing store.
+ pub format: ImageFormat,
+}
+
+/// Representation of a rasterized blob image. This is obtained by passing
+/// `BlobImageData` to the embedding via the rasterization callback.
+pub struct RasterizedBlobImage {
+ /// The rectangle that was rasterized in device pixels, relative to the
+ /// image or tile.
+ pub rasterized_rect: DeviceIntRect,
+ /// Backing store. The format is stored out of band in `BlobImageDescriptor`.
+ pub data: Arc<Vec<u8>>,
+}
+
+/// Error code for when blob rasterization failed.
+#[derive(Clone, Debug)]
+pub enum BlobImageError {
+ /// Out of memory.
+ Oom,
+ /// Other failure, embedding-specified.
+ Other(String),
+}
+
+
+
+/// A key identifying blob image rasterization work requested from the blob
+/// image rasterizer.
+#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+pub struct BlobImageRequest {
+ /// Unique handle to the image.
+ pub key: BlobImageKey,
+ /// Tiling offset in number of tiles.
+ pub tile: TileOffset,
+}
diff --git a/third_party/webrender/webrender_api/src/image_tiling.rs b/third_party/webrender/webrender_api/src/image_tiling.rs
new file mode 100644
index 00000000000..8fdc82ef24d
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/image_tiling.rs
@@ -0,0 +1,815 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use crate::{TileSize, EdgeAaSegmentMask};
+use crate::units::*;
+use euclid::{point2, size2};
+use std::i32;
+use std::ops::Range;
+
+/// If repetitions are far enough apart that only one is within
+/// the primitive rect, then we can simplify the parameters and
+/// treat the primitive as not repeated.
+/// This can let us avoid unnecessary work later to handle some
+/// of the parameters.
+pub fn simplify_repeated_primitive(
+ stretch_size: &LayoutSize,
+ tile_spacing: &mut LayoutSize,
+ prim_rect: &mut LayoutRect,
+) {
+ let stride = *stretch_size + *tile_spacing;
+
+ if stride.width >= prim_rect.size.width {
+ tile_spacing.width = 0.0;
+ prim_rect.size.width = f32::min(prim_rect.size.width, stretch_size.width);
+ }
+ if stride.height >= prim_rect.size.height {
+ tile_spacing.height = 0.0;
+ prim_rect.size.height = f32::min(prim_rect.size.height, stretch_size.height);
+ }
+}
+
+pub struct Repetition {
+ pub origin: LayoutPoint,
+ pub edge_flags: EdgeAaSegmentMask,
+}
+
+pub struct RepetitionIterator {
+ current_x: i32,
+ x_count: i32,
+ current_y: i32,
+ y_count: i32,
+ row_flags: EdgeAaSegmentMask,
+ current_origin: LayoutPoint,
+ initial_origin: LayoutPoint,
+ stride: LayoutSize,
+}
+
+impl Iterator for RepetitionIterator {
+ type Item = Repetition;
+
+ fn next(&mut self) -> Option<Self::Item> {
+ if self.current_x == self.x_count {
+ self.current_y += 1;
+ if self.current_y >= self.y_count {
+ return None;
+ }
+ self.current_x = 0;
+
+ self.row_flags = EdgeAaSegmentMask::empty();
+ if self.current_y == self.y_count - 1 {
+ self.row_flags |= EdgeAaSegmentMask::BOTTOM;
+ }
+
+ self.current_origin.x = self.initial_origin.x;
+ self.current_origin.y += self.stride.height;
+ }
+
+ let mut edge_flags = self.row_flags;
+ if self.current_x == 0 {
+ edge_flags |= EdgeAaSegmentMask::LEFT;
+ }
+
+ if self.current_x == self.x_count - 1 {
+ edge_flags |= EdgeAaSegmentMask::RIGHT;
+ }
+
+ let repetition = Repetition {
+ origin: self.current_origin,
+ edge_flags,
+ };
+
+ self.current_origin.x += self.stride.width;
+ self.current_x += 1;
+
+ Some(repetition)
+ }
+}
+
+pub fn repetitions(
+ prim_rect: &LayoutRect,
+ visible_rect: &LayoutRect,
+ stride: LayoutSize,
+) -> RepetitionIterator {
+ assert!(stride.width > 0.0);
+ assert!(stride.height > 0.0);
+
+ let visible_rect = match prim_rect.intersection(&visible_rect) {
+ Some(rect) => rect,
+ None => {
+ return RepetitionIterator {
+ current_origin: LayoutPoint::zero(),
+ initial_origin: LayoutPoint::zero(),
+ current_x: 0,
+ current_y: 0,
+ x_count: 0,
+ y_count: 0,
+ stride,
+ row_flags: EdgeAaSegmentMask::empty(),
+ }
+ }
+ };
+
+ let nx = if visible_rect.origin.x > prim_rect.origin.x {
+ f32::floor((visible_rect.origin.x - prim_rect.origin.x) / stride.width)
+ } else {
+ 0.0
+ };
+
+ let ny = if visible_rect.origin.y > prim_rect.origin.y {
+ f32::floor((visible_rect.origin.y - prim_rect.origin.y) / stride.height)
+ } else {
+ 0.0
+ };
+
+ let x0 = prim_rect.origin.x + nx * stride.width;
+ let y0 = prim_rect.origin.y + ny * stride.height;
+
+ let x_most = visible_rect.max_x();
+ let y_most = visible_rect.max_y();
+
+ let x_count = f32::ceil((x_most - x0) / stride.width) as i32;
+ let y_count = f32::ceil((y_most - y0) / stride.height) as i32;
+
+ let mut row_flags = EdgeAaSegmentMask::TOP;
+ if y_count == 1 {
+ row_flags |= EdgeAaSegmentMask::BOTTOM;
+ }
+
+ RepetitionIterator {
+ current_origin: LayoutPoint::new(x0, y0),
+ initial_origin: LayoutPoint::new(x0, y0),
+ current_x: 0,
+ current_y: 0,
+ x_count,
+ y_count,
+ row_flags,
+ stride,
+ }
+}
+
+#[derive(Debug)]
+pub struct Tile {
+ pub rect: LayoutRect,
+ pub offset: TileOffset,
+ pub edge_flags: EdgeAaSegmentMask,
+}
+
+#[derive(Debug)]
+pub struct TileIteratorExtent {
+ /// Range of visible tiles to iterate over in number of tiles.
+ tile_range: Range<i32>,
+ /// Range of tiles of the full image including tiles that are culled out.
+ image_tiles: Range<i32>,
+ /// Size of the first tile in layout space.
+ first_tile_layout_size: f32,
+ /// Size of the last tile in layout space.
+ last_tile_layout_size: f32,
+ /// Position of blob point (0, 0) in layout space.
+ layout_tiling_origin: f32,
+ /// Position of the top-left corner of the primitive rect in layout space.
+ layout_prim_start: f32,
+}
+
+#[derive(Debug)]
+pub struct TileIterator {
+ current_tile: TileOffset,
+ x: TileIteratorExtent,
+ y: TileIteratorExtent,
+ regular_tile_size: LayoutSize,
+}
+
+impl Iterator for TileIterator {
+ type Item = Tile;
+
+ fn next(&mut self) -> Option<Self::Item> {
+ // If we reach the end of a row, reset to the beginning of the next row.
+ if self.current_tile.x >= self.x.tile_range.end {
+ self.current_tile.y += 1;
+ self.current_tile.x = self.x.tile_range.start;
+ }
+
+ // Stop iterating if we reach the last tile. We may start here if there
+ // were no tiles to iterate over.
+ if self.current_tile.x >= self.x.tile_range.end || self.current_tile.y >= self.y.tile_range.end {
+ return None;
+ }
+
+ let tile_offset = self.current_tile;
+
+ let mut segment_rect = LayoutRect {
+ origin: LayoutPoint::new(
+ self.x.layout_tiling_origin + tile_offset.x as f32 * self.regular_tile_size.width,
+ self.y.layout_tiling_origin + tile_offset.y as f32 * self.regular_tile_size.height,
+ ),
+ size: self.regular_tile_size,
+ };
+
+ let mut edge_flags = EdgeAaSegmentMask::empty();
+
+ if tile_offset.x == self.x.image_tiles.start {
+ edge_flags |= EdgeAaSegmentMask::LEFT;
+ segment_rect.size.width = self.x.first_tile_layout_size;
+ segment_rect.origin.x = self.x.layout_prim_start;
+ }
+ if tile_offset.x == self.x.image_tiles.end - 1 {
+ edge_flags |= EdgeAaSegmentMask::RIGHT;
+ segment_rect.size.width = self.x.last_tile_layout_size;
+ }
+
+ if tile_offset.y == self.y.image_tiles.start {
+ segment_rect.size.height = self.y.first_tile_layout_size;
+ segment_rect.origin.y = self.y.layout_prim_start;
+ edge_flags |= EdgeAaSegmentMask::TOP;
+ }
+ if tile_offset.y == self.y.image_tiles.end - 1 {
+ segment_rect.size.height = self.y.last_tile_layout_size;
+ edge_flags |= EdgeAaSegmentMask::BOTTOM;
+ }
+
+ assert!(tile_offset.y < self.y.tile_range.end);
+ let tile = Tile {
+ rect: segment_rect,
+ offset: tile_offset,
+ edge_flags,
+ };
+
+ self.current_tile.x += 1;
+
+ Some(tile)
+ }
+}
+
+pub fn tiles(
+ prim_rect: &LayoutRect,
+ visible_rect: &LayoutRect,
+ image_rect: &DeviceIntRect,
+ device_tile_size: i32,
+) -> TileIterator {
+ // The image resource is tiled. We have to generate an image primitive
+ // for each tile.
+ // We need to do this because the image is broken up into smaller tiles in the texture
+ // cache and the image shader is not able to work with this type of sparse representation.
+
+ // The tiling logic works as follows:
+ //
+ // +-#################-+ -+
+ // | #//| | |//# | | image size
+ // | #//| | |//# | |
+ // +-#--+----+----+--#-+ | -+
+ // | #//| | |//# | | | regular tile size
+ // | #//| | |//# | | |
+ // +-#--+----+----+--#-+ | -+-+
+ // | #//|////|////|//# | | | "leftover" height
+ // | ################# | -+ ---+
+ // +----+----+----+----+
+ //
+ // In the ascii diagram above, a large image is split into tiles of almost regular size.
+ // The tiles on the edges (hatched in the diagram) can be smaller than the regular tiles
+ // and are handled separately in the code (we'll call them boundary tiles).
+ //
+ // Each generated segment corresponds to a tile in the texture cache, with the
+ // assumption that the boundary tiles are sized to fit their own irregular size in the
+ // texture cache.
+ //
+ // Because we can have very large virtual images we iterate over the visible portion of
+ // the image in layer space instead of iterating over all device tiles.
+
+ let visible_rect = match prim_rect.intersection(&visible_rect) {
+ Some(rect) => rect,
+ None => {
+ return TileIterator {
+ current_tile: TileOffset::zero(),
+ x: TileIteratorExtent {
+ tile_range: 0..0,
+ image_tiles: 0..0,
+ first_tile_layout_size: 0.0,
+ last_tile_layout_size: 0.0,
+ layout_tiling_origin: 0.0,
+ layout_prim_start: prim_rect.origin.x,
+ },
+ y: TileIteratorExtent {
+ tile_range: 0..0,
+ image_tiles: 0..0,
+ first_tile_layout_size: 0.0,
+ last_tile_layout_size: 0.0,
+ layout_tiling_origin: 0.0,
+ layout_prim_start: prim_rect.origin.y,
+ },
+ regular_tile_size: LayoutSize::zero(),
+ }
+ }
+ };
+
+ // Size of regular tiles in layout space.
+ let layout_tile_size = LayoutSize::new(
+ device_tile_size as f32 / image_rect.size.width as f32 * prim_rect.size.width,
+ device_tile_size as f32 / image_rect.size.height as f32 * prim_rect.size.height,
+ );
+
+ // The decomposition logic is exactly the same on each axis so we reduce
+ // this to a 1-dimensional problem in an attempt to make the code simpler.
+
+ let x_extent = tiles_1d(
+ layout_tile_size.width,
+ visible_rect.x_range(),
+ prim_rect.min_x(),
+ image_rect.x_range(),
+ device_tile_size,
+ );
+
+ let y_extent = tiles_1d(
+ layout_tile_size.height,
+ visible_rect.y_range(),
+ prim_rect.min_y(),
+ image_rect.y_range(),
+ device_tile_size,
+ );
+
+ TileIterator {
+ current_tile: point2(
+ x_extent.tile_range.start,
+ y_extent.tile_range.start,
+ ),
+ x: x_extent,
+ y: y_extent,
+ regular_tile_size: layout_tile_size,
+ }
+}
+
+/// Decompose tiles along an arbitrary axis.
+///
+/// This does most of the heavy lifting needed for `tiles` but in a single dimension for
+/// the sake of simplicity since the problem is independent on the x and y axes.
+fn tiles_1d(
+ layout_tile_size: f32,
+ layout_visible_range: Range<f32>,
+ layout_prim_start: f32,
+ device_image_range: Range<i32>,
+ device_tile_size: i32,
+) -> TileIteratorExtent {
+ // A few sanity checks.
+ debug_assert!(layout_tile_size > 0.0);
+ debug_assert!(layout_visible_range.end >= layout_visible_range.start);
+ debug_assert!(device_image_range.end > device_image_range.start);
+ debug_assert!(device_tile_size > 0);
+
+ // Sizes of the boundary tiles in pixels.
+ let first_tile_device_size = first_tile_size_1d(&device_image_range, device_tile_size);
+ let last_tile_device_size = last_tile_size_1d(&device_image_range, device_tile_size);
+
+ // [start..end[ Range of tiles of this row/column (in number of tiles) without
+ // taking culling into account.
+ let image_tiles = tile_range_1d(&device_image_range, device_tile_size);
+
+ // Layout offset of tile (0, 0) with respect to the top-left corner of the display item.
+ let layout_offset = device_image_range.start as f32 * layout_tile_size / device_tile_size as f32;
+ // Position in layout space of tile (0, 0).
+ let layout_tiling_origin = layout_prim_start - layout_offset;
+
+ // [start..end[ Range of the visible tiles (because of culling).
+ let visible_tiles_start = f32::floor((layout_visible_range.start - layout_tiling_origin) / layout_tile_size) as i32;
+ let visible_tiles_end = f32::ceil((layout_visible_range.end - layout_tiling_origin) / layout_tile_size) as i32;
+
+ // Combine the above two to get the tiles in the image that are visible this frame.
+ let mut tiles_start = i32::max(image_tiles.start, visible_tiles_start);
+ let tiles_end = i32::min(image_tiles.end, visible_tiles_end);
+ if tiles_start > tiles_end {
+ tiles_start = tiles_end;
+ }
+
+ // The size in layout space of the boundary tiles.
+ let first_tile_layout_size = if tiles_start == image_tiles.start {
+ first_tile_device_size as f32 * layout_tile_size / device_tile_size as f32
+ } else {
+ // boundary tile was culled out, so the new first tile is a regularly sized tile.
+ layout_tile_size
+ };
+
+ // Same here.
+ let last_tile_layout_size = if tiles_end == image_tiles.end {
+ last_tile_device_size as f32 * layout_tile_size / device_tile_size as f32
+ } else {
+ layout_tile_size
+ };
+
+ TileIteratorExtent {
+ tile_range: tiles_start..tiles_end,
+ image_tiles,
+ first_tile_layout_size,
+ last_tile_layout_size,
+ layout_tiling_origin,
+ layout_prim_start,
+ }
+}
+
+/// Compute the range of tiles (in number of tiles) that intersect the provided
+/// image range (in pixels) in an arbitrary dimension.
+///
+/// ```ignore
+///
+/// 0
+/// :
+/// #-+---+---+---+---+---+--#
+/// # | | | | | | #
+/// #-+---+---+---+---+---+--#
+/// ^ : ^
+///
+/// +------------------------+ image_range
+/// +---+ regular_tile_size
+///
+/// ```
+fn tile_range_1d(
+ image_range: &Range<i32>,
+ regular_tile_size: i32,
+) -> Range<i32> {
+ // Integer division truncates towards zero so with negative values if the first/last
+ // tile isn't a full tile we can get offset by one which we account for here.
+
+ let mut start = image_range.start / regular_tile_size;
+ if image_range.start % regular_tile_size < 0 {
+ start -= 1;
+ }
+
+ let mut end = image_range.end / regular_tile_size;
+ if image_range.end % regular_tile_size > 0 {
+ end += 1;
+ }
+
+ start..end
+}
+
+// Sizes of the first boundary tile in pixels.
+//
+// It can be smaller than the regular tile size if the image is not a multiple
+// of the regular tile size.
+fn first_tile_size_1d(
+ image_range: &Range<i32>,
+ regular_tile_size: i32,
+) -> i32 {
+ // We have to account for how the % operation behaves for negative values.
+ let image_size = image_range.end - image_range.start;
+ i32::min(
+ match image_range.start % regular_tile_size {
+ // . #------+------+ .
+ // . #//////| | .
+ 0 => regular_tile_size,
+ // (zero) -> 0 . #--+------+ .
+ // . . #//| | .
+ // %(m): ~~>
+ m if m > 0 => regular_tile_size - m,
+ // . . #--+------+ 0 <- (zero)
+ // . . #//| | .
+ // %(m): <~~
+ m => -m,
+ },
+ image_size
+ )
+}
+
+// Sizes of the last boundary tile in pixels.
+//
+// It can be smaller than the regular tile size if the image is not a multiple
+// of the regular tile size.
+fn last_tile_size_1d(
+ image_range: &Range<i32>,
+ regular_tile_size: i32,
+) -> i32 {
+ // We have to account for how the modulo operation behaves for negative values.
+ let image_size = image_range.end - image_range.start;
+ i32::min(
+ match image_range.end % regular_tile_size {
+ // +------+------# .
+ // tiles: . | |//////# .
+ 0 => regular_tile_size,
+ // . +------+--# . 0 <- (zero)
+ // . | |//# . .
+ // modulo (m): <~~
+ m if m < 0 => regular_tile_size + m,
+ // (zero) -> 0 +------+--# . .
+ // . | |//# . .
+ // modulo (m): ~~>
+ m => m,
+ },
+ image_size,
+ )
+}
+
+pub fn compute_tile_rect(
+ image_rect: &DeviceIntRect,
+ regular_tile_size: TileSize,
+ tile: TileOffset,
+) -> DeviceIntRect {
+ let regular_tile_size = regular_tile_size as i32;
+ DeviceIntRect {
+ origin: point2(
+ compute_tile_origin_1d(image_rect.x_range(), regular_tile_size, tile.x as i32),
+ compute_tile_origin_1d(image_rect.y_range(), regular_tile_size, tile.y as i32),
+ ),
+ size: size2(
+ compute_tile_size_1d(image_rect.x_range(), regular_tile_size, tile.x as i32),
+ compute_tile_size_1d(image_rect.y_range(), regular_tile_size, tile.y as i32),
+ ),
+ }
+}
+
+fn compute_tile_origin_1d(
+ img_range: Range<i32>,
+ regular_tile_size: i32,
+ tile_offset: i32,
+) -> i32 {
+ let tile_range = tile_range_1d(&img_range, regular_tile_size);
+ if tile_offset == tile_range.start {
+ img_range.start
+ } else {
+ tile_offset * regular_tile_size
+ }
+}
+
+// Compute the width and height in pixels of a tile depending on its position in the image.
+pub fn compute_tile_size(
+ image_rect: &DeviceIntRect,
+ regular_tile_size: TileSize,
+ tile: TileOffset,
+) -> DeviceIntSize {
+ let regular_tile_size = regular_tile_size as i32;
+ size2(
+ compute_tile_size_1d(image_rect.x_range(), regular_tile_size, tile.x as i32),
+ compute_tile_size_1d(image_rect.y_range(), regular_tile_size, tile.y as i32),
+ )
+}
+
+fn compute_tile_size_1d(
+ img_range: Range<i32>,
+ regular_tile_size: i32,
+ tile_offset: i32,
+) -> i32 {
+ let tile_range = tile_range_1d(&img_range, regular_tile_size);
+
+ // Most tiles are going to have base_size as width and height,
+ // except for tiles around the edges that are shrunk to fit the image data.
+ let actual_size = if tile_offset == tile_range.start {
+ first_tile_size_1d(&img_range, regular_tile_size)
+ } else if tile_offset == tile_range.end - 1 {
+ last_tile_size_1d(&img_range, regular_tile_size)
+ } else {
+ regular_tile_size
+ };
+
+ assert!(actual_size > 0);
+
+ actual_size
+}
+
+pub fn compute_tile_range(
+ visible_area: &DeviceIntRect,
+ tile_size: u16,
+) -> TileRange {
+ let tile_size = tile_size as i32;
+ let x_range = tile_range_1d(&visible_area.x_range(), tile_size);
+ let y_range = tile_range_1d(&visible_area.y_range(), tile_size);
+
+ TileRange {
+ origin: point2(x_range.start, y_range.start),
+ size: size2(x_range.end - x_range.start, y_range.end - y_range.start),
+ }
+}
+
+pub fn for_each_tile_in_range(
+ range: &TileRange,
+ mut callback: impl FnMut(TileOffset),
+) {
+ for y in range.y_range() {
+ for x in range.x_range() {
+ callback(point2(x, y));
+ }
+ }
+}
+
+pub fn compute_valid_tiles_if_bounds_change(
+ prev_rect: &DeviceIntRect,
+ new_rect: &DeviceIntRect,
+ tile_size: u16,
+) -> Option<TileRange> {
+ let intersection = match prev_rect.intersection(new_rect) {
+ Some(rect) => rect,
+ None => {
+ return Some(TileRange::zero());
+ }
+ };
+
+ let left = prev_rect.min_x() != new_rect.min_x();
+ let right = prev_rect.max_x() != new_rect.max_x();
+ let top = prev_rect.min_y() != new_rect.min_y();
+ let bottom = prev_rect.max_y() != new_rect.max_y();
+
+ if !left && !right && !top && !bottom {
+ // Bounds have not changed.
+ return None;
+ }
+
+ let tw = 1.0 / (tile_size as f32);
+ let th = 1.0 / (tile_size as f32);
+
+ let tiles = intersection
+ .cast::<f32>()
+ .scale(tw, th);
+
+ let min_x = if left { f32::ceil(tiles.min_x()) } else { f32::floor(tiles.min_x()) };
+ let min_y = if top { f32::ceil(tiles.min_y()) } else { f32::floor(tiles.min_y()) };
+ let max_x = if right { f32::floor(tiles.max_x()) } else { f32::ceil(tiles.max_x()) };
+ let max_y = if bottom { f32::floor(tiles.max_y()) } else { f32::ceil(tiles.max_y()) };
+
+ Some(TileRange {
+ origin: point2(min_x as i32, min_y as i32),
+ size: size2((max_x - min_x) as i32, (max_y - min_y) as i32),
+ })
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use std::collections::HashSet;
+ use euclid::rect;
+
+ // this checks some additional invariants
+ fn checked_for_each_tile(
+ prim_rect: &LayoutRect,
+ visible_rect: &LayoutRect,
+ device_image_rect: &DeviceIntRect,
+ device_tile_size: i32,
+ callback: &mut dyn FnMut(&LayoutRect, TileOffset, EdgeAaSegmentMask),
+ ) {
+ let mut coverage = LayoutRect::zero();
+ let mut seen_tiles = HashSet::new();
+ for tile in tiles(
+ prim_rect,
+ visible_rect,
+ device_image_rect,
+ device_tile_size,
+ ) {
+ // make sure we don't get sent duplicate tiles
+ assert!(!seen_tiles.contains(&tile.offset));
+ seen_tiles.insert(tile.offset);
+ coverage = coverage.union(&tile.rect);
+ assert!(prim_rect.contains_rect(&tile.rect));
+ callback(&tile.rect, tile.offset, tile.edge_flags);
+ }
+ assert!(prim_rect.contains_rect(&coverage));
+ assert!(coverage.contains_rect(&visible_rect.intersection(&prim_rect).unwrap_or(LayoutRect::zero())));
+ }
+
+ #[test]
+ fn basic() {
+ let mut count = 0;
+ checked_for_each_tile(&rect(0., 0., 1000., 1000.),
+ &rect(75., 75., 400., 400.),
+ &rect(0, 0, 400, 400),
+ 36,
+ &mut |_tile_rect, _tile_offset, _tile_flags| {
+ count += 1;
+ },
+ );
+ assert_eq!(count, 36);
+ }
+
+ #[test]
+ fn empty() {
+ let mut count = 0;
+ checked_for_each_tile(&rect(0., 0., 74., 74.),
+ &rect(75., 75., 400., 400.),
+ &rect(0, 0, 400, 400),
+ 36,
+ &mut |_tile_rect, _tile_offset, _tile_flags| {
+ count += 1;
+ },
+ );
+ assert_eq!(count, 0);
+ }
+
+ #[test]
+ fn test_tiles_1d() {
+ // Exactly one full tile at positive offset.
+ let result = tiles_1d(64.0, -10000.0..10000.0, 0.0, 0..64, 64);
+ assert_eq!(result.tile_range.start, 0);
+ assert_eq!(result.tile_range.end, 1);
+ assert_eq!(result.first_tile_layout_size, 64.0);
+ assert_eq!(result.last_tile_layout_size, 64.0);
+
+ // Exactly one full tile at negative offset.
+ let result = tiles_1d(64.0, -10000.0..10000.0, -64.0, -64..0, 64);
+ assert_eq!(result.tile_range.start, -1);
+ assert_eq!(result.tile_range.end, 0);
+ assert_eq!(result.first_tile_layout_size, 64.0);
+ assert_eq!(result.last_tile_layout_size, 64.0);
+
+ // Two full tiles at negative and positive offsets.
+ let result = tiles_1d(64.0, -10000.0..10000.0, -64.0, -64..64, 64);
+ assert_eq!(result.tile_range.start, -1);
+ assert_eq!(result.tile_range.end, 1);
+ assert_eq!(result.first_tile_layout_size, 64.0);
+ assert_eq!(result.last_tile_layout_size, 64.0);
+
+ // One partial tile at positive offset, non-zero origin, culled out.
+ let result = tiles_1d(64.0, -100.0..10.0, 64.0, 64..310, 64);
+ assert_eq!(result.tile_range.start, result.tile_range.end);
+
+ // Two tiles at negative and positive offsets, one of which is culled out.
+ // The remaining tile is partially culled but it should still generate a full tile.
+ let result = tiles_1d(64.0, 10.0..10000.0, -64.0, -64..64, 64);
+ assert_eq!(result.tile_range.start, 0);
+ assert_eq!(result.tile_range.end, 1);
+ assert_eq!(result.first_tile_layout_size, 64.0);
+ assert_eq!(result.last_tile_layout_size, 64.0);
+ let result = tiles_1d(64.0, -10000.0..-10.0, -64.0, -64..64, 64);
+ assert_eq!(result.tile_range.start, -1);
+ assert_eq!(result.tile_range.end, 0);
+ assert_eq!(result.first_tile_layout_size, 64.0);
+ assert_eq!(result.last_tile_layout_size, 64.0);
+
+ // Stretched tile in layout space device tile size is 64 and layout tile size is 128.
+ // So the resulting tile sizes in layout space should be multiplied by two.
+ let result = tiles_1d(128.0, -10000.0..10000.0, -64.0, -64..32, 64);
+ assert_eq!(result.tile_range.start, -1);
+ assert_eq!(result.tile_range.end, 1);
+ assert_eq!(result.first_tile_layout_size, 128.0);
+ assert_eq!(result.last_tile_layout_size, 64.0);
+
+ // Two visible tiles (the rest is culled out).
+ let result = tiles_1d(10.0, 0.0..20.0, 0.0, 0..64, 64);
+ assert_eq!(result.tile_range.start, 0);
+ assert_eq!(result.tile_range.end, 1);
+ assert_eq!(result.first_tile_layout_size, 10.0);
+ assert_eq!(result.last_tile_layout_size, 10.0);
+
+ // Two visible tiles at negative layout offsets (the rest is culled out).
+ let result = tiles_1d(10.0, -20.0..0.0, -20.0, 0..64, 64);
+ assert_eq!(result.tile_range.start, 0);
+ assert_eq!(result.tile_range.end, 1);
+ assert_eq!(result.first_tile_layout_size, 10.0);
+ assert_eq!(result.last_tile_layout_size, 10.0);
+ }
+
+ #[test]
+ fn test_tile_range_1d() {
+ assert_eq!(tile_range_1d(&(0..256), 256), 0..1);
+ assert_eq!(tile_range_1d(&(0..257), 256), 0..2);
+ assert_eq!(tile_range_1d(&(-1..257), 256), -1..2);
+ assert_eq!(tile_range_1d(&(-256..256), 256), -1..1);
+ assert_eq!(tile_range_1d(&(-20..-10), 6), -4..-1);
+ assert_eq!(tile_range_1d(&(20..100), 256), 0..1);
+ }
+
+ #[test]
+ fn test_first_last_tile_size_1d() {
+ assert_eq!(first_tile_size_1d(&(0..10), 64), 10);
+ assert_eq!(first_tile_size_1d(&(-20..0), 64), 20);
+
+ assert_eq!(last_tile_size_1d(&(0..10), 64), 10);
+ assert_eq!(last_tile_size_1d(&(-20..0), 64), 20);
+ }
+
+ #[test]
+ fn doubly_partial_tiles() {
+ // In the following tests the image is a single tile and none of the sides of the tile
+ // align with the tile grid.
+ // This can only happen when we have a single non-aligned partial tile and no regular
+ // tiles.
+ assert_eq!(first_tile_size_1d(&(300..310), 64), 10);
+ assert_eq!(first_tile_size_1d(&(-20..-10), 64), 10);
+
+ assert_eq!(last_tile_size_1d(&(300..310), 64), 10);
+ assert_eq!(last_tile_size_1d(&(-20..-10), 64), 10);
+
+
+ // One partial tile at positve offset, non-zero origin.
+ let result = tiles_1d(64.0, -10000.0..10000.0, 0.0, 300..310, 64);
+ assert_eq!(result.tile_range.start, 4);
+ assert_eq!(result.tile_range.end, 5);
+ assert_eq!(result.first_tile_layout_size, 10.0);
+ assert_eq!(result.last_tile_layout_size, 10.0);
+ }
+
+ #[test]
+ fn smaller_than_tile_size_at_origin() {
+ let r = compute_tile_rect(
+ &rect(0, 0, 80, 80),
+ 256,
+ point2(0, 0),
+ );
+
+ assert_eq!(r, rect(0, 0, 80, 80));
+ }
+
+ #[test]
+ fn smaller_than_tile_size_with_offset() {
+ let r = compute_tile_rect(
+ &rect(20, 20, 80, 80),
+ 256,
+ point2(0, 0),
+ );
+
+ assert_eq!(r, rect(20, 20, 80, 80));
+ }
+}
diff --git a/third_party/webrender/webrender_api/src/lib.rs b/third_party/webrender/webrender_api/src/lib.rs
new file mode 100644
index 00000000000..5f274753e8f
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/lib.rs
@@ -0,0 +1,64 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! The `webrender_api` crate contains an assortment types and functions used
+//! by WebRender consumers as well as, in many cases, WebRender itself.
+//!
+//! This separation allows Servo to parallelize compilation across `webrender`
+//! and other crates that depend on `webrender_api`. So in practice, we put
+//! things in this crate when Servo needs to use them. Firefox depends on the
+//! `webrender` crate directly, and so this distinction is not really relevant
+//! there.
+
+#![cfg_attr(feature = "nightly", feature(nonzero))]
+#![cfg_attr(feature = "cargo-clippy", allow(clippy::float_cmp, clippy::too_many_arguments))]
+#![cfg_attr(feature = "cargo-clippy", allow(clippy::unreadable_literal, clippy::new_without_default))]
+
+extern crate app_units;
+#[macro_use]
+extern crate bitflags;
+extern crate byteorder;
+#[cfg(feature = "nightly")]
+extern crate core;
+#[cfg(target_os = "macos")]
+extern crate core_foundation;
+#[cfg(target_os = "macos")]
+extern crate core_graphics;
+#[macro_use]
+extern crate derive_more;
+pub extern crate euclid;
+#[macro_use]
+extern crate malloc_size_of_derive;
+extern crate serde;
+#[macro_use]
+extern crate serde_derive;
+extern crate time;
+
+extern crate malloc_size_of;
+extern crate peek_poke;
+
+mod api;
+pub mod channel;
+mod color;
+mod display_item;
+mod display_item_cache;
+mod display_list;
+mod font;
+mod gradient_builder;
+mod image;
+mod resources;
+pub mod units;
+
+#[doc(hidden)]
+pub mod image_tiling;
+
+pub use crate::api::*;
+pub use crate::color::*;
+pub use crate::display_item::*;
+pub use crate::display_item_cache::DisplayItemCache;
+pub use crate::display_list::*;
+pub use crate::font::*;
+pub use crate::gradient_builder::*;
+pub use crate::image::*;
+pub use crate::resources::DEFAULT_TILE_SIZE;
diff --git a/third_party/webrender/webrender_api/src/resources.rs b/third_party/webrender/webrender_api/src/resources.rs
new file mode 100644
index 00000000000..c41fdc3009e
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/resources.rs
@@ -0,0 +1,327 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use crate::{BlobImageKey, ImageDescriptor, DirtyRect, TileSize, ResourceUpdate};
+use crate::{BlobImageHandler, AsyncBlobImageRasterizer, BlobImageData, BlobImageParams};
+use crate::{BlobImageRequest, BlobImageDescriptor, BlobImageResources, TransactionMsg};
+use crate::{FontKey, FontTemplate, FontInstanceData, FontInstanceKey, AddFont};
+use crate::image_tiling::*;
+use crate::units::*;
+use crate::font::SharedFontInstanceMap;
+use crate::euclid::{point2, size2};
+
+pub const DEFAULT_TILE_SIZE: TileSize = 512;
+
+use std::collections::HashMap;
+use std::sync::Arc;
+
+/// We use this to generate the async blob rendering requests.
+struct BlobImageTemplate {
+ descriptor: ImageDescriptor,
+ tile_size: TileSize,
+ dirty_rect: BlobDirtyRect,
+ /// See ImageResource::visible_rect.
+ visible_rect: DeviceIntRect,
+ // If the active rect of the blob changes, this represents the
+ // range of tiles that remain valid. This must be taken into
+ // account in addition to the valid rect when submitting blob
+ // rasterization requests.
+ // `None` means the bounds have not changed (tiles are still valid).
+ // `Some(TileRange::zero())` means all of the tiles are invalid.
+ valid_tiles_after_bounds_change: Option<TileRange>,
+}
+
+struct FontResources {
+ templates: HashMap<FontKey, FontTemplate>,
+ instances: SharedFontInstanceMap,
+}
+
+pub struct ApiResources {
+ blob_image_templates: HashMap<BlobImageKey, BlobImageTemplate>,
+ pub blob_image_handler: Option<Box<dyn BlobImageHandler>>,
+ fonts: FontResources,
+}
+
+impl BlobImageResources for FontResources {
+ fn get_font_data(&self, key: FontKey) -> &FontTemplate {
+ self.templates.get(&key).unwrap()
+ }
+ fn get_font_instance_data(&self, key: FontInstanceKey) -> Option<FontInstanceData> {
+ self.instances.get_font_instance_data(key)
+ }
+}
+
+impl ApiResources {
+ pub fn new(
+ blob_image_handler: Option<Box<dyn BlobImageHandler>>,
+ instances: SharedFontInstanceMap,
+ ) -> Self {
+ ApiResources {
+ blob_image_templates: HashMap::new(),
+ blob_image_handler,
+ fonts: FontResources {
+ templates: HashMap::new(),
+ instances,
+ }
+ }
+ }
+
+ pub fn get_shared_font_instances(&self) -> SharedFontInstanceMap {
+ self.fonts.instances.clone()
+ }
+
+ pub fn update(&mut self, transaction: &mut TransactionMsg) {
+ let mut blobs_to_rasterize = Vec::new();
+ for update in &transaction.resource_updates {
+ match *update {
+ ResourceUpdate::AddBlobImage(ref img) => {
+ self.blob_image_handler
+ .as_mut()
+ .unwrap()
+ .add(img.key, Arc::clone(&img.data), &img.visible_rect, img.tile_size);
+
+ self.blob_image_templates.insert(
+ img.key,
+ BlobImageTemplate {
+ descriptor: img.descriptor,
+ tile_size: img.tile_size,
+ dirty_rect: DirtyRect::All,
+ valid_tiles_after_bounds_change: None,
+ visible_rect: img.visible_rect,
+ },
+ );
+ blobs_to_rasterize.push(img.key);
+ }
+ ResourceUpdate::UpdateBlobImage(ref img) => {
+ debug_assert_eq!(img.visible_rect.size, img.descriptor.size);
+ self.update_blob_image(
+ img.key,
+ Some(&img.descriptor),
+ Some(&img.dirty_rect),
+ Some(Arc::clone(&img.data)),
+ &img.visible_rect,
+ );
+ blobs_to_rasterize.push(img.key);
+ }
+ ResourceUpdate::DeleteBlobImage(key) => {
+ self.blob_image_templates.remove(&key);
+ }
+ ResourceUpdate::SetBlobImageVisibleArea(ref key, ref area) => {
+ self.update_blob_image(*key, None, None, None, area);
+ blobs_to_rasterize.push(*key);
+ }
+ ResourceUpdate::AddFont(ref font) => {
+ match font {
+ AddFont::Raw(key, bytes, index) => {
+ self.fonts.templates.insert(
+ *key,
+ FontTemplate::Raw(Arc::clone(bytes), *index),
+ );
+ }
+ AddFont::Native(key, native_font_handle) => {
+ self.fonts.templates.insert(
+ *key,
+ FontTemplate::Native(native_font_handle.clone()),
+ );
+ }
+ }
+ }
+ ResourceUpdate::AddFontInstance(ref instance) => {
+ // TODO(nical): Don't clone these.
+ self.fonts.instances.add_font_instance(
+ instance.key,
+ instance.font_key,
+ instance.glyph_size,
+ instance.options.clone(),
+ instance.platform_options.clone(),
+ instance.variations.clone(),
+ );
+ }
+ ResourceUpdate::DeleteFont(key) => {
+ self.fonts.templates.remove(&key);
+ if let Some(ref mut handler) = self.blob_image_handler {
+ handler.delete_font(key);
+ }
+ }
+ ResourceUpdate::DeleteFontInstance(key) => {
+ // We will delete from the shared font instance map in the resource cache
+ // after scene swap.
+
+ if let Some(ref mut r) = self.blob_image_handler {
+ r.delete_font_instance(key);
+ }
+ }
+ _ => {}
+ }
+ }
+
+ let (rasterizer, requests) = self.create_blob_scene_builder_requests(&blobs_to_rasterize);
+ transaction.blob_rasterizer = rasterizer;
+ transaction.blob_requests = requests;
+ }
+
+ pub fn enable_multithreading(&mut self, enable: bool) {
+ if let Some(ref mut handler) = self.blob_image_handler {
+ handler.enable_multithreading(enable);
+ }
+ }
+
+ fn update_blob_image(
+ &mut self,
+ key: BlobImageKey,
+ descriptor: Option<&ImageDescriptor>,
+ dirty_rect: Option<&BlobDirtyRect>,
+ data: Option<Arc<BlobImageData>>,
+ visible_rect: &DeviceIntRect,
+ ) {
+ if let Some(data) = data {
+ let dirty_rect = dirty_rect.unwrap();
+ self.blob_image_handler.as_mut().unwrap().update(key, data, visible_rect, dirty_rect);
+ }
+
+ let image = self.blob_image_templates
+ .get_mut(&key)
+ .expect("Attempt to update non-existent blob image");
+
+ let mut valid_tiles_after_bounds_change = compute_valid_tiles_if_bounds_change(
+ &image.visible_rect,
+ visible_rect,
+ image.tile_size,
+ );
+
+ match (image.valid_tiles_after_bounds_change, valid_tiles_after_bounds_change) {
+ (Some(old), Some(ref mut new)) => {
+ *new = new.intersection(&old).unwrap_or_else(TileRange::zero);
+ }
+ (Some(old), None) => {
+ valid_tiles_after_bounds_change = Some(old);
+ }
+ _ => {}
+ }
+
+ let blob_size = visible_rect.size;
+
+ if let Some(descriptor) = descriptor {
+ image.descriptor = *descriptor;
+ } else {
+ // make sure the descriptor size matches the visible rect.
+ // This might not be necessary but let's stay on the safe side.
+ image.descriptor.size = blob_size;
+ }
+
+ if let Some(dirty_rect) = dirty_rect {
+ image.dirty_rect = image.dirty_rect.union(dirty_rect);
+ }
+
+ image.valid_tiles_after_bounds_change = valid_tiles_after_bounds_change;
+ image.visible_rect = *visible_rect;
+ }
+
+ pub fn create_blob_scene_builder_requests(
+ &mut self,
+ keys: &[BlobImageKey]
+ ) -> (Option<Box<dyn AsyncBlobImageRasterizer>>, Vec<BlobImageParams>) {
+ if self.blob_image_handler.is_none() || keys.is_empty() {
+ return (None, Vec::new());
+ }
+
+ let mut blob_request_params = Vec::new();
+ for key in keys {
+ let template = self.blob_image_templates.get_mut(key).unwrap();
+
+ // If we know that only a portion of the blob image is in the viewport,
+ // only request these visible tiles since blob images can be huge.
+ let tiles = compute_tile_range(
+ &template.visible_rect,
+ template.tile_size,
+ );
+
+ // Don't request tiles that weren't invalidated.
+ let dirty_tiles = match template.dirty_rect {
+ DirtyRect::Partial(dirty_rect) => {
+ compute_tile_range(
+ &dirty_rect.cast_unit(),
+ template.tile_size,
+ )
+ }
+ DirtyRect::All => tiles,
+ };
+
+ for_each_tile_in_range(&tiles, |tile| {
+ let still_valid = template.valid_tiles_after_bounds_change
+ .map(|valid_tiles| valid_tiles.contains(tile))
+ .unwrap_or(true);
+
+ if still_valid && !dirty_tiles.contains(tile) {
+ return;
+ }
+
+ let descriptor = BlobImageDescriptor {
+ rect: compute_tile_rect(
+ &template.visible_rect,
+ template.tile_size,
+ tile,
+ ).cast_unit(),
+ format: template.descriptor.format,
+ };
+
+ assert!(descriptor.rect.size.width > 0 && descriptor.rect.size.height > 0);
+ blob_request_params.push(
+ BlobImageParams {
+ request: BlobImageRequest { key: *key, tile },
+ descriptor,
+ dirty_rect: DirtyRect::All,
+ }
+ );
+ });
+
+ template.dirty_rect = DirtyRect::empty();
+ template.valid_tiles_after_bounds_change = None;
+ }
+
+ let handler = self.blob_image_handler.as_mut().unwrap();
+ handler.prepare_resources(&self.fonts, &blob_request_params);
+ (Some(handler.create_blob_rasterizer()), blob_request_params)
+ }
+}
+
+fn compute_valid_tiles_if_bounds_change(
+ prev_rect: &DeviceIntRect,
+ new_rect: &DeviceIntRect,
+ tile_size: u16,
+) -> Option<TileRange> {
+ let intersection = match prev_rect.intersection(new_rect) {
+ Some(rect) => rect,
+ None => {
+ return Some(TileRange::zero());
+ }
+ };
+
+ let left = prev_rect.min_x() != new_rect.min_x();
+ let right = prev_rect.max_x() != new_rect.max_x();
+ let top = prev_rect.min_y() != new_rect.min_y();
+ let bottom = prev_rect.max_y() != new_rect.max_y();
+
+ if !left && !right && !top && !bottom {
+ // Bounds have not changed.
+ return None;
+ }
+
+ let tw = 1.0 / (tile_size as f32);
+ let th = 1.0 / (tile_size as f32);
+
+ let tiles = intersection
+ .cast::<f32>()
+ .scale(tw, th);
+
+ let min_x = if left { f32::ceil(tiles.min_x()) } else { f32::floor(tiles.min_x()) };
+ let min_y = if top { f32::ceil(tiles.min_y()) } else { f32::floor(tiles.min_y()) };
+ let max_x = if right { f32::floor(tiles.max_x()) } else { f32::ceil(tiles.max_x()) };
+ let max_y = if bottom { f32::floor(tiles.max_y()) } else { f32::ceil(tiles.max_y()) };
+
+ Some(TileRange {
+ origin: point2(min_x as i32, min_y as i32),
+ size: size2((max_x - min_x) as i32, (max_y - min_y) as i32),
+ })
+}
diff --git a/third_party/webrender/webrender_api/src/units.rs b/third_party/webrender/webrender_api/src/units.rs
new file mode 100644
index 00000000000..9913e4e6647
--- /dev/null
+++ b/third_party/webrender/webrender_api/src/units.rs
@@ -0,0 +1,324 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! A collection of coordinate spaces and their corresponding Point, Size and Rect types.
+//!
+//! Physical pixels take into account the device pixel ratio and their dimensions tend
+//! to correspond to the allocated size of resources in memory, while logical pixels
+//! don't have the device pixel ratio applied which means they are agnostic to the usage
+//! of hidpi screens and the like.
+//!
+//! The terms "layer" and "stacking context" can be used interchangeably
+//! in the context of coordinate systems.
+
+pub use app_units::Au;
+use euclid::{Length, Rect, Scale, Size2D, Transform3D, Translation2D};
+use euclid::{Point2D, Point3D, Vector2D, Vector3D, SideOffsets2D, Box2D};
+use euclid::HomogeneousVector;
+use peek_poke::PeekPoke;
+// local imports
+use crate::image::DirtyRect;
+
+/// Geometry in the coordinate system of the render target (screen or intermediate
+/// surface) in physical pixels.
+#[derive(Hash, Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)]
+pub struct DevicePixel;
+
+pub type DeviceIntRect = Rect<i32, DevicePixel>;
+pub type DeviceIntPoint = Point2D<i32, DevicePixel>;
+pub type DeviceIntSize = Size2D<i32, DevicePixel>;
+pub type DeviceIntLength = Length<i32, DevicePixel>;
+pub type DeviceIntSideOffsets = SideOffsets2D<i32, DevicePixel>;
+
+pub type DeviceRect = Rect<f32, DevicePixel>;
+pub type DevicePoint = Point2D<f32, DevicePixel>;
+pub type DeviceVector2D = Vector2D<f32, DevicePixel>;
+pub type DeviceSize = Size2D<f32, DevicePixel>;
+pub type DeviceHomogeneousVector = HomogeneousVector<f32, DevicePixel>;
+
+/// Geometry in the coordinate system of the framebuffer in physical pixels.
+/// It's Y-flipped comparing to DevicePixel.
+#[derive(Hash, Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)]
+pub struct FramebufferPixel;
+
+pub type FramebufferIntPoint = Point2D<i32, FramebufferPixel>;
+pub type FramebufferIntSize = Size2D<i32, FramebufferPixel>;
+pub type FramebufferIntRect = Rect<i32, FramebufferPixel>;
+
+/// Geometry in the coordinate system of a Picture (intermediate
+/// surface) in physical pixels.
+#[derive(Hash, Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd)]
+pub struct PicturePixel;
+
+pub type PictureIntRect = Rect<i32, PicturePixel>;
+pub type PictureIntPoint = Point2D<i32, PicturePixel>;
+pub type PictureIntSize = Size2D<i32, PicturePixel>;
+pub type PictureRect = Rect<f32, PicturePixel>;
+pub type PicturePoint = Point2D<f32, PicturePixel>;
+pub type PictureSize = Size2D<f32, PicturePixel>;
+pub type PicturePoint3D = Point3D<f32, PicturePixel>;
+pub type PictureVector2D = Vector2D<f32, PicturePixel>;
+pub type PictureVector3D = Vector3D<f32, PicturePixel>;
+pub type PictureBox2D = Box2D<f32, PicturePixel>;
+
+/// Geometry gets rasterized in a given root coordinate space. This
+/// is often the root spatial node (world space), but may be a local
+/// space for a variety of reasons (e.g. perspective).
+#[derive(Hash, Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd)]
+pub struct RasterPixel;
+
+pub type RasterIntRect = Rect<i32, RasterPixel>;
+pub type RasterIntPoint = Point2D<i32, RasterPixel>;
+pub type RasterIntSize = Size2D<i32, RasterPixel>;
+pub type RasterRect = Rect<f32, RasterPixel>;
+pub type RasterPoint = Point2D<f32, RasterPixel>;
+pub type RasterSize = Size2D<f32, RasterPixel>;
+pub type RasterPoint3D = Point3D<f32, RasterPixel>;
+pub type RasterVector2D = Vector2D<f32, RasterPixel>;
+pub type RasterVector3D = Vector3D<f32, RasterPixel>;
+
+/// Geometry in a stacking context's local coordinate space (logical pixels).
+#[derive(Hash, Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, Ord, PartialOrd, Deserialize, Serialize, PeekPoke)]
+pub struct LayoutPixel;
+
+pub type LayoutRect = Rect<f32, LayoutPixel>;
+pub type LayoutPoint = Point2D<f32, LayoutPixel>;
+pub type LayoutPoint3D = Point3D<f32, LayoutPixel>;
+pub type LayoutVector2D = Vector2D<f32, LayoutPixel>;
+pub type LayoutVector3D = Vector3D<f32, LayoutPixel>;
+pub type LayoutSize = Size2D<f32, LayoutPixel>;
+pub type LayoutSideOffsets = SideOffsets2D<f32, LayoutPixel>;
+
+pub type LayoutIntRect = Rect<i32, LayoutPixel>;
+pub type LayoutIntPoint = Point2D<i32, LayoutPixel>;
+pub type LayoutIntSize = Size2D<i32, LayoutPixel>;
+
+/// Geometry in the document's coordinate space (logical pixels).
+#[derive(Hash, Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, Ord, PartialOrd)]
+pub struct WorldPixel;
+
+pub type WorldRect = Rect<f32, WorldPixel>;
+pub type WorldPoint = Point2D<f32, WorldPixel>;
+pub type WorldSize = Size2D<f32, WorldPixel>;
+pub type WorldPoint3D = Point3D<f32, WorldPixel>;
+pub type WorldVector2D = Vector2D<f32, WorldPixel>;
+pub type WorldVector3D = Vector3D<f32, WorldPixel>;
+
+/// Offset in number of tiles.
+#[derive(Hash, Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd)]
+pub struct Tiles;
+pub type TileOffset = Point2D<i32, Tiles>;
+pub type TileRange = Rect<i32, Tiles>;
+
+/// Scaling ratio from world pixels to device pixels.
+pub type DevicePixelScale = Scale<f32, WorldPixel, DevicePixel>;
+/// Scaling ratio from layout to world. Used for cases where we know the layout
+/// is in world space, or specifically want to treat it this way.
+pub type LayoutToWorldScale = Scale<f32, LayoutPixel, WorldPixel>;
+/// A complete scaling ratio from layout space to device pixel space.
+pub type LayoutToDeviceScale = Scale<f32, LayoutPixel, DevicePixel>;
+
+pub type LayoutTransform = Transform3D<f32, LayoutPixel, LayoutPixel>;
+pub type LayoutToWorldTransform = Transform3D<f32, LayoutPixel, WorldPixel>;
+pub type WorldToLayoutTransform = Transform3D<f32, WorldPixel, LayoutPixel>;
+
+pub type LayoutToPictureTransform = Transform3D<f32, LayoutPixel, PicturePixel>;
+pub type PictureToLayoutTransform = Transform3D<f32, PicturePixel, LayoutPixel>;
+
+pub type LayoutToRasterTransform = Transform3D<f32, LayoutPixel, RasterPixel>;
+pub type RasterToLayoutTransform = Transform3D<f32, RasterPixel, LayoutPixel>;
+
+pub type PictureToRasterTransform = Transform3D<f32, PicturePixel, RasterPixel>;
+pub type RasterToPictureTransform = Transform3D<f32, RasterPixel, PicturePixel>;
+
+// Fixed position coordinates, to avoid float precision errors.
+pub type LayoutPointAu = Point2D<Au, LayoutPixel>;
+pub type LayoutRectAu = Rect<Au, LayoutPixel>;
+pub type LayoutSizeAu = Size2D<Au, LayoutPixel>;
+pub type LayoutVector2DAu = Vector2D<Au, LayoutPixel>;
+pub type LayoutSideOffsetsAu = SideOffsets2D<Au, LayoutPixel>;
+
+pub type ImageDirtyRect = DirtyRect<i32, DevicePixel>;
+pub type BlobDirtyRect = DirtyRect<i32, LayoutPixel>;
+
+pub type BlobToDeviceTranslation = Translation2D<i32, LayoutPixel, DevicePixel>;
+
+/// Stores two coordinates in texel space. The coordinates
+/// are stored in texel coordinates because the texture atlas
+/// may grow. Storing them as texel coords and normalizing
+/// the UVs in the vertex shader means nothing needs to be
+/// updated on the CPU when the texture size changes.
+#[derive(Copy, Clone, Debug, Serialize, Deserialize)]
+pub struct TexelRect {
+ pub uv0: DevicePoint,
+ pub uv1: DevicePoint,
+}
+
+impl TexelRect {
+ pub fn new(u0: f32, v0: f32, u1: f32, v1: f32) -> Self {
+ TexelRect {
+ uv0: DevicePoint::new(u0, v0),
+ uv1: DevicePoint::new(u1, v1),
+ }
+ }
+
+ pub fn invalid() -> Self {
+ TexelRect {
+ uv0: DevicePoint::new(-1.0, -1.0),
+ uv1: DevicePoint::new(-1.0, -1.0),
+ }
+ }
+}
+
+impl Into<TexelRect> for DeviceIntRect {
+ fn into(self) -> TexelRect {
+ TexelRect {
+ uv0: self.min().to_f32(),
+ uv1: self.max().to_f32(),
+ }
+ }
+}
+
+const MAX_AU_FLOAT: f32 = 1.0e6;
+
+pub trait AuHelpers<T> {
+ fn from_au(data: T) -> Self;
+ fn to_au(&self) -> T;
+}
+
+impl AuHelpers<LayoutSizeAu> for LayoutSize {
+ fn from_au(size: LayoutSizeAu) -> Self {
+ LayoutSize::new(
+ size.width.to_f32_px(),
+ size.height.to_f32_px(),
+ )
+ }
+
+ fn to_au(&self) -> LayoutSizeAu {
+ let width = self.width.min(2.0 * MAX_AU_FLOAT);
+ let height = self.height.min(2.0 * MAX_AU_FLOAT);
+
+ LayoutSizeAu::new(
+ Au::from_f32_px(width),
+ Au::from_f32_px(height),
+ )
+ }
+}
+
+impl AuHelpers<LayoutVector2DAu> for LayoutVector2D {
+ fn from_au(size: LayoutVector2DAu) -> Self {
+ LayoutVector2D::new(
+ size.x.to_f32_px(),
+ size.y.to_f32_px(),
+ )
+ }
+
+ fn to_au(&self) -> LayoutVector2DAu {
+ LayoutVector2DAu::new(
+ Au::from_f32_px(self.x),
+ Au::from_f32_px(self.y),
+ )
+ }
+}
+
+impl AuHelpers<LayoutPointAu> for LayoutPoint {
+ fn from_au(point: LayoutPointAu) -> Self {
+ LayoutPoint::new(
+ point.x.to_f32_px(),
+ point.y.to_f32_px(),
+ )
+ }
+
+ fn to_au(&self) -> LayoutPointAu {
+ let x = self.x.min(MAX_AU_FLOAT).max(-MAX_AU_FLOAT);
+ let y = self.y.min(MAX_AU_FLOAT).max(-MAX_AU_FLOAT);
+
+ LayoutPointAu::new(
+ Au::from_f32_px(x),
+ Au::from_f32_px(y),
+ )
+ }
+}
+
+impl AuHelpers<LayoutRectAu> for LayoutRect {
+ fn from_au(rect: LayoutRectAu) -> Self {
+ LayoutRect::new(
+ LayoutPoint::from_au(rect.origin),
+ LayoutSize::from_au(rect.size),
+ )
+ }
+
+ fn to_au(&self) -> LayoutRectAu {
+ LayoutRectAu::new(
+ self.origin.to_au(),
+ self.size.to_au(),
+ )
+ }
+}
+
+impl AuHelpers<LayoutSideOffsetsAu> for LayoutSideOffsets {
+ fn from_au(offsets: LayoutSideOffsetsAu) -> Self {
+ LayoutSideOffsets::new(
+ offsets.top.to_f32_px(),
+ offsets.right.to_f32_px(),
+ offsets.bottom.to_f32_px(),
+ offsets.left.to_f32_px(),
+ )
+ }
+
+ fn to_au(&self) -> LayoutSideOffsetsAu {
+ LayoutSideOffsetsAu::new(
+ Au::from_f32_px(self.top),
+ Au::from_f32_px(self.right),
+ Au::from_f32_px(self.bottom),
+ Au::from_f32_px(self.left),
+ )
+ }
+}
+
+pub trait RectExt {
+ type Point;
+ fn top_left(&self) -> Self::Point;
+ fn top_right(&self) -> Self::Point;
+ fn bottom_left(&self) -> Self::Point;
+ fn bottom_right(&self) -> Self::Point;
+}
+
+impl<U> RectExt for Rect<f32, U> {
+ type Point = Point2D<f32, U>;
+ fn top_left(&self) -> Self::Point {
+ self.min()
+ }
+ fn top_right(&self) -> Self::Point {
+ Point2D::new(self.max_x(), self.min_y())
+ }
+ fn bottom_left(&self) -> Self::Point {
+ Point2D::new(self.min_x(), self.max_y())
+ }
+ fn bottom_right(&self) -> Self::Point {
+ self.max()
+ }
+}
+
+// A few helpers to convert to cast between coordinate spaces that are often equivalent.
+
+#[inline]
+pub fn layout_rect_as_picture_rect(layout_rect: &LayoutRect) -> PictureRect {
+ layout_rect.cast_unit()
+}
+
+#[inline]
+pub fn layout_vector_as_picture_vector(layout_vector: LayoutVector2D) -> PictureVector2D {
+ layout_vector.cast_unit()
+}
+
+#[inline]
+pub fn device_size_as_framebuffer_size(framebuffer_size: DeviceIntSize) -> FramebufferIntSize {
+ framebuffer_size.cast_unit()
+}
+
+#[inline]
+pub fn device_rect_as_framebuffer_rect(framebuffer_rect: &DeviceIntRect) -> FramebufferIntRect {
+ framebuffer_rect.cast_unit()
+}
diff --git a/third_party/webrender/webrender_build/Cargo.toml b/third_party/webrender/webrender_build/Cargo.toml
new file mode 100644
index 00000000000..862d2a77b14
--- /dev/null
+++ b/third_party/webrender/webrender_build/Cargo.toml
@@ -0,0 +1,16 @@
+[package]
+name = "webrender_build"
+authors = ["The Servo Project Developers"]
+version = "0.0.1"
+license = "MPL-2.0"
+repository = "https://github.com/servo/webrender"
+description = "Code shared between precompilation (build.rs) and the rest of WebRender"
+edition = "2018"
+
+[features]
+serialize_program = ["serde"]
+
+[dependencies]
+bitflags = "1.2"
+lazy_static = "1"
+serde = { optional = true, version = "1.0", features = ["serde_derive"] }
diff --git a/third_party/webrender/webrender_build/src/lib.rs b/third_party/webrender/webrender_build/src/lib.rs
new file mode 100644
index 00000000000..23438a478e6
--- /dev/null
+++ b/third_party/webrender/webrender_build/src/lib.rs
@@ -0,0 +1,19 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#[macro_use]
+extern crate bitflags;
+
+#[macro_use]
+extern crate lazy_static;
+
+#[cfg(any(feature = "serde"))]
+#[macro_use]
+extern crate serde;
+
+pub mod shader;
+pub mod shader_features;
+
+/// This must be known at build-time as the shaders depend on it.
+pub const MAX_VERTEX_TEXTURE_WIDTH: usize = 1024;
diff --git a/third_party/webrender/webrender_build/src/shader.rs b/third_party/webrender/webrender_build/src/shader.rs
new file mode 100644
index 00000000000..3c15f4f4148
--- /dev/null
+++ b/third_party/webrender/webrender_build/src/shader.rs
@@ -0,0 +1,222 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//! Functionality for managing source code for shaders.
+//!
+//! This module is used during precompilation (build.rs) and regular compilation,
+//! so it has minimal dependencies.
+
+use std::borrow::Cow;
+use std::fs::File;
+use std::io::Read;
+use std::path::Path;
+use std::collections::HashSet;
+use std::collections::hash_map::DefaultHasher;
+use crate::MAX_VERTEX_TEXTURE_WIDTH;
+
+pub use crate::shader_features::*;
+
+lazy_static! {
+ static ref MAX_VERTEX_TEXTURE_WIDTH_STRING: String = MAX_VERTEX_TEXTURE_WIDTH.to_string();
+}
+
+#[derive(Clone, Copy, Debug)]
+pub enum ShaderKind {
+ Vertex,
+ Fragment,
+}
+
+#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
+pub enum ShaderVersion {
+ Gl,
+ Gles,
+}
+
+impl ShaderVersion {
+ /// Return the full variant name, for use in code generation.
+ pub fn variant_name(&self) -> &'static str {
+ match self {
+ ShaderVersion::Gl => "ShaderVersion::Gl",
+ ShaderVersion::Gles => "ShaderVersion::Gles",
+ }
+ }
+}
+
+#[derive(PartialEq, Eq, Hash, Debug, Clone, Default)]
+#[cfg_attr(feature = "serialize_program", derive(Deserialize, Serialize))]
+pub struct ProgramSourceDigest(u64);
+
+impl ::std::fmt::Display for ProgramSourceDigest {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ write!(f, "{:02x}", self.0)
+ }
+}
+
+impl From<DefaultHasher> for ProgramSourceDigest {
+ fn from(hasher: DefaultHasher) -> Self {
+ use std::hash::Hasher;
+ ProgramSourceDigest(hasher.finish())
+ }
+}
+
+const SHADER_IMPORT: &str = "#include ";
+
+pub struct ShaderSourceParser {
+ included: HashSet<String>,
+}
+
+impl ShaderSourceParser {
+ pub fn new() -> Self {
+ ShaderSourceParser {
+ included: HashSet::new(),
+ }
+ }
+
+ /// Parses a shader string for imports. Imports are recursively processed, and
+ /// prepended to the output stream.
+ pub fn parse<F: FnMut(&str), G: Fn(&str) -> Cow<'static, str>>(
+ &mut self,
+ source: Cow<'static, str>,
+ get_source: &G,
+ output: &mut F,
+ ) {
+ for line in source.lines() {
+ if line.starts_with(SHADER_IMPORT) {
+ let imports = line[SHADER_IMPORT.len() ..].split(',');
+
+ // For each import, get the source, and recurse.
+ for import in imports {
+ if self.included.insert(import.into()) {
+ let include = get_source(import);
+ self.parse(include, get_source, output);
+ } else {
+ output(&format!("// {} is already included\n", import));
+ }
+ }
+ } else {
+ output(line);
+ output("\n");
+ }
+ }
+ }
+}
+
+/// Reads a shader source file from disk into a String.
+pub fn shader_source_from_file(shader_path: &Path) -> String {
+ assert!(shader_path.exists(), "Shader not found {:?}", shader_path);
+ let mut source = String::new();
+ File::open(&shader_path)
+ .expect("Shader not found")
+ .read_to_string(&mut source)
+ .unwrap();
+ source
+}
+
+/// Creates heap-allocated strings for both vertex and fragment shaders.
+pub fn build_shader_strings<G: Fn(&str) -> Cow<'static, str>>(
+ gl_version: ShaderVersion,
+ features: &[&str],
+ base_filename: &str,
+ get_source: &G,
+) -> (String, String) {
+ let mut vs_source = String::new();
+ do_build_shader_string(
+ gl_version,
+ features,
+ ShaderKind::Vertex,
+ base_filename,
+ get_source,
+ |s| vs_source.push_str(s),
+ );
+
+ let mut fs_source = String::new();
+ do_build_shader_string(
+ gl_version,
+ features,
+ ShaderKind::Fragment,
+ base_filename,
+ get_source,
+ |s| fs_source.push_str(s),
+ );
+
+ (vs_source, fs_source)
+}
+
+/// Walks the given shader string and applies the output to the provided
+/// callback. Assuming an override path is not used, does no heap allocation
+/// and no I/O.
+pub fn do_build_shader_string<F: FnMut(&str), G: Fn(&str) -> Cow<'static, str>>(
+ gl_version: ShaderVersion,
+ features: &[&str],
+ kind: ShaderKind,
+ base_filename: &str,
+ get_source: &G,
+ mut output: F,
+) {
+ build_shader_prefix_string(gl_version, features, kind, base_filename, &mut output);
+ build_shader_main_string(base_filename, get_source, &mut output);
+}
+
+/// Walks the prefix section of the shader string, which manages the various
+/// defines for features etc.
+pub fn build_shader_prefix_string<F: FnMut(&str)>(
+ gl_version: ShaderVersion,
+ features: &[&str],
+ kind: ShaderKind,
+ base_filename: &str,
+ output: &mut F,
+) {
+ // GLSL requires that the version number comes first.
+ let gl_version_string = match gl_version {
+ ShaderVersion::Gl => "#version 150\n",
+ ShaderVersion::Gles => "#version 300 es\n",
+ };
+ output(gl_version_string);
+
+ // Insert the shader name to make debugging easier.
+ output("// shader: ");
+ output(base_filename);
+ output(" ");
+ for (i, feature) in features.iter().enumerate() {
+ output(feature);
+ if i != features.len() - 1 {
+ output(",");
+ }
+ }
+ output("\n");
+
+ // Define a constant depending on whether we are compiling VS or FS.
+ let kind_string = match kind {
+ ShaderKind::Vertex => "#define WR_VERTEX_SHADER\n",
+ ShaderKind::Fragment => "#define WR_FRAGMENT_SHADER\n",
+ };
+ output(kind_string);
+
+ // Define a constant for the vertex texture width.
+ output("#define WR_MAX_VERTEX_TEXTURE_WIDTH ");
+ output(&MAX_VERTEX_TEXTURE_WIDTH_STRING);
+ output("U\n");
+
+ // Add any defines for features that were passed by the caller.
+ for feature in features {
+ assert!(!feature.is_empty());
+ output("#define WR_FEATURE_");
+ output(feature);
+ output("\n");
+ }
+}
+
+/// Walks the main .glsl file, including any imports.
+pub fn build_shader_main_string<F: FnMut(&str), G: Fn(&str) -> Cow<'static, str>>(
+ base_filename: &str,
+ get_source: &G,
+ output: &mut F,
+) {
+ let shared_source = get_source(base_filename);
+ ShaderSourceParser::new().parse(
+ shared_source,
+ &|f| get_source(f),
+ output
+ );
+}
diff --git a/third_party/webrender/webrender_build/src/shader_features.rs b/third_party/webrender/webrender_build/src/shader_features.rs
new file mode 100644
index 00000000000..06e6b0da8a7
--- /dev/null
+++ b/third_party/webrender/webrender_build/src/shader_features.rs
@@ -0,0 +1,152 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use std::collections::HashMap;
+
+bitflags! {
+ #[derive(Default)]
+ pub struct ShaderFeatureFlags: u32 {
+ const GL = 1 << 0;
+ const GLES = 1 << 1;
+
+ const ADVANCED_BLEND_EQUATION = 1 << 8;
+ const DUAL_SOURCE_BLENDING = 1 << 9;
+ const PIXEL_LOCAL_STORAGE = 1 << 10;
+ const DITHERING = 1 << 11;
+ const TEXTURE_EXTERNAL = 1 << 12;
+ }
+}
+
+pub type ShaderFeatures = HashMap<&'static str, Vec<String>>;
+
+macro_rules! features {
+ ($($str:expr),*) => { vec![$(String::from($str),)*] as Vec<String> };
+}
+
+fn concat_features(a: &str, b: &str) -> String {
+ if a.is_empty() {
+ b.to_string()
+ } else if b.is_empty() {
+ a.to_string()
+ } else {
+ [a, b].join(",")
+ }
+}
+
+/// Computes available shaders and their features for the given feature flags.
+pub fn get_shader_features(flags: ShaderFeatureFlags) -> ShaderFeatures {
+ let mut shaders = ShaderFeatures::new();
+
+ // Clip shaders
+ shaders.insert("cs_clip_rectangle", features!["", "FAST_PATH"]);
+ for name in &["cs_clip_image", "cs_clip_box_shadow"] {
+ shaders.insert(name, features![""]);
+ }
+
+ // Cache shaders
+ shaders.insert("cs_blur", features!["ALPHA_TARGET", "COLOR_TARGET"]);
+
+ for name in &["cs_line_decoration", "cs_gradient", "cs_border_segment", "cs_border_solid", "cs_svg_filter"] {
+ shaders.insert(name, features![""]);
+ }
+
+ shaders.insert("cs_scale", features![""]);
+
+ // Pixel local storage shaders
+ let pls_feature = if flags.contains(ShaderFeatureFlags::PIXEL_LOCAL_STORAGE) {
+ for name in &["pls_init", "pls_resolve"] {
+ shaders.insert(name, features!["PIXEL_LOCAL_STORAGE"]);
+ }
+
+ "PIXEL_LOCAL_STORAGE"
+ } else {
+ ""
+ };
+
+ // Brush shaders
+ let brush_alpha_features = concat_features("ALPHA_PASS", pls_feature);
+ for name in &["brush_solid", "brush_blend", "brush_mix_blend", "brush_opacity"] {
+ shaders.insert(name, features!["", &brush_alpha_features, "DEBUG_OVERDRAW"]);
+ }
+ for name in &["brush_conic_gradient", "brush_radial_gradient", "brush_linear_gradient"] {
+ let mut features: Vec<String> = Vec::new();
+ let base = if flags.contains(ShaderFeatureFlags::DITHERING) {
+ "DITHERING"
+ } else {
+ ""
+ };
+ features.push(base.to_string());
+ features.push(concat_features(base, &brush_alpha_features));
+ features.push(concat_features(base, "DEBUG_OVERDRAW"));
+ shaders.insert(name, features);
+ }
+
+ // Image brush shaders
+ let mut texture_types = vec!["", "TEXTURE_2D"];
+ if flags.contains(ShaderFeatureFlags::GL) {
+ texture_types.push("TEXTURE_RECT");
+ }
+ if flags.contains(ShaderFeatureFlags::TEXTURE_EXTERNAL) {
+ texture_types.push("TEXTURE_EXTERNAL");
+ }
+ let mut image_features: Vec<String> = Vec::new();
+ for texture_type in &texture_types {
+ let fast = texture_type.to_string();
+ image_features.push(fast.clone());
+ image_features.push(concat_features(&fast, &brush_alpha_features));
+ image_features.push(concat_features(&fast, "DEBUG_OVERDRAW"));
+ let slow = concat_features(texture_type, "REPETITION,ANTIALIASING");
+ image_features.push(slow.clone());
+ image_features.push(concat_features(&slow, &brush_alpha_features));
+ image_features.push(concat_features(&slow, "DEBUG_OVERDRAW"));
+ if flags.contains(ShaderFeatureFlags::ADVANCED_BLEND_EQUATION) {
+ let advanced_blend_features = concat_features(&brush_alpha_features, "ADVANCED_BLEND");
+ image_features.push(concat_features(&fast, &advanced_blend_features));
+ image_features.push(concat_features(&slow, &advanced_blend_features));
+ }
+ if flags.contains(ShaderFeatureFlags::DUAL_SOURCE_BLENDING) {
+ let dual_source_features = concat_features(&brush_alpha_features, "DUAL_SOURCE_BLENDING");
+ image_features.push(concat_features(&fast, &dual_source_features));
+ image_features.push(concat_features(&slow, &dual_source_features));
+ }
+ }
+ shaders.insert("brush_image", image_features);
+
+ let mut composite_features: Vec<String> = Vec::new();
+ for texture_type in &texture_types {
+ let base = concat_features("", texture_type);
+ composite_features.push(base.clone());
+ }
+ // YUV image brush shaders
+ let mut yuv_features: Vec<String> = Vec::new();
+ for texture_type in &texture_types {
+ let base = concat_features("YUV", texture_type);
+ composite_features.push(base.clone());
+ yuv_features.push(base.clone());
+ yuv_features.push(concat_features(&base, &brush_alpha_features));
+ yuv_features.push(concat_features(&base, "DEBUG_OVERDRAW"));
+ }
+ shaders.insert("composite", composite_features);
+ shaders.insert("brush_yuv_image", yuv_features);
+
+ // Prim shaders
+ let mut text_types = vec![pls_feature];
+ if flags.contains(ShaderFeatureFlags::DUAL_SOURCE_BLENDING) {
+ text_types.push("DUAL_SOURCE_BLENDING");
+ }
+ let mut text_features: Vec<String> = Vec::new();
+ for text_type in &text_types {
+ text_features.push(concat_features(text_type, "ALPHA_PASS"));
+ text_features.push(concat_features(text_type, "GLYPH_TRANSFORM,ALPHA_PASS"));
+ text_features.push(concat_features(text_type, "DEBUG_OVERDRAW"));
+ }
+ shaders.insert("ps_text_run", text_features);
+
+ shaders.insert("ps_split_composite", features![pls_feature]);
+
+ shaders.insert("ps_clear", features![""]);
+
+ shaders
+}
+
diff --git a/third_party/webrender/wr_malloc_size_of/Cargo.toml b/third_party/webrender/wr_malloc_size_of/Cargo.toml
new file mode 100644
index 00000000000..a1f92126fc4
--- /dev/null
+++ b/third_party/webrender/wr_malloc_size_of/Cargo.toml
@@ -0,0 +1,14 @@
+[package]
+authors = ["The Servo Project Developers"]
+description = "Internal utility to measure memory usage in WebRender."
+name = "wr_malloc_size_of"
+version = "0.0.1"
+license = "MIT/Apache-2.0"
+edition = "2018"
+
+[lib]
+path = "lib.rs"
+
+[dependencies]
+app_units = "0.7"
+euclid = "0.22"
diff --git a/third_party/webrender/wr_malloc_size_of/LICENSE-APACHE b/third_party/webrender/wr_malloc_size_of/LICENSE-APACHE
new file mode 100644
index 00000000000..16fe87b06e8
--- /dev/null
+++ b/third_party/webrender/wr_malloc_size_of/LICENSE-APACHE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/third_party/webrender/wr_malloc_size_of/LICENSE-MIT b/third_party/webrender/wr_malloc_size_of/LICENSE-MIT
new file mode 100644
index 00000000000..31aa79387f2
--- /dev/null
+++ b/third_party/webrender/wr_malloc_size_of/LICENSE-MIT
@@ -0,0 +1,23 @@
+Permission is hereby granted, free of charge, to any
+person obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the
+Software without restriction, including without
+limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software
+is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice
+shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/third_party/webrender/wr_malloc_size_of/lib.rs b/third_party/webrender/wr_malloc_size_of/lib.rs
new file mode 100644
index 00000000000..49a9666342a
--- /dev/null
+++ b/third_party/webrender/wr_malloc_size_of/lib.rs
@@ -0,0 +1,435 @@
+// Copyright 2016-2017 The Servo Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! A reduced fork of Firefox's malloc_size_of crate, for bundling with WebRender.
+
+extern crate app_units;
+extern crate euclid;
+
+use std::hash::{BuildHasher, Hash};
+use std::mem::size_of;
+use std::ops::Range;
+use std::os::raw::c_void;
+
+/// A C function that takes a pointer to a heap allocation and returns its size.
+type VoidPtrToSizeFn = unsafe extern "C" fn(ptr: *const c_void) -> usize;
+
+/// Operations used when measuring heap usage of data structures.
+pub struct MallocSizeOfOps {
+ /// A function that returns the size of a heap allocation.
+ pub size_of_op: VoidPtrToSizeFn,
+
+ /// Like `size_of_op`, but can take an interior pointer. Optional because
+ /// not all allocators support this operation. If it's not provided, some
+ /// memory measurements will actually be computed estimates rather than
+ /// real and accurate measurements.
+ pub enclosing_size_of_op: Option<VoidPtrToSizeFn>,
+}
+
+impl MallocSizeOfOps {
+ pub fn new(
+ size_of: VoidPtrToSizeFn,
+ malloc_enclosing_size_of: Option<VoidPtrToSizeFn>,
+ ) -> Self {
+ MallocSizeOfOps {
+ size_of_op: size_of,
+ enclosing_size_of_op: malloc_enclosing_size_of,
+ }
+ }
+
+ /// Check if an allocation is empty. This relies on knowledge of how Rust
+ /// handles empty allocations, which may change in the future.
+ fn is_empty<T: ?Sized>(ptr: *const T) -> bool {
+ // The correct condition is this:
+ // `ptr as usize <= ::std::mem::align_of::<T>()`
+ // But we can't call align_of() on a ?Sized T. So we approximate it
+ // with the following. 256 is large enough that it should always be
+ // larger than the required alignment, but small enough that it is
+ // always in the first page of memory and therefore not a legitimate
+ // address.
+ ptr as *const usize as usize <= 256
+ }
+
+ /// Call `size_of_op` on `ptr`, first checking that the allocation isn't
+ /// empty, because some types (such as `Vec`) utilize empty allocations.
+ pub unsafe fn malloc_size_of<T: ?Sized>(&self, ptr: *const T) -> usize {
+ if MallocSizeOfOps::is_empty(ptr) {
+ 0
+ } else {
+ (self.size_of_op)(ptr as *const c_void)
+ }
+ }
+
+ /// Is an `enclosing_size_of_op` available?
+ pub fn has_malloc_enclosing_size_of(&self) -> bool {
+ self.enclosing_size_of_op.is_some()
+ }
+
+ /// Call `enclosing_size_of_op`, which must be available, on `ptr`, which
+ /// must not be empty.
+ pub unsafe fn malloc_enclosing_size_of<T>(&self, ptr: *const T) -> usize {
+ assert!(!MallocSizeOfOps::is_empty(ptr));
+ (self.enclosing_size_of_op.unwrap())(ptr as *const c_void)
+ }
+}
+
+/// Trait for measuring the "deep" heap usage of a data structure. This is the
+/// most commonly-used of the traits.
+pub trait MallocSizeOf {
+ /// Measure the heap usage of all descendant heap-allocated structures, but
+ /// not the space taken up by the value itself.
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize;
+}
+
+/// Trait for measuring the "shallow" heap usage of a container.
+pub trait MallocShallowSizeOf {
+ /// Measure the heap usage of immediate heap-allocated descendant
+ /// structures, but not the space taken up by the value itself. Anything
+ /// beyond the immediate descendants must be measured separately, using
+ /// iteration.
+ fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize;
+}
+
+impl MallocSizeOf for String {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ unsafe { ops.malloc_size_of(self.as_ptr()) }
+ }
+}
+
+impl<T: ?Sized> MallocShallowSizeOf for Box<T> {
+ fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ unsafe { ops.malloc_size_of(&**self) }
+ }
+}
+
+impl<T: MallocSizeOf + ?Sized> MallocSizeOf for Box<T> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.shallow_size_of(ops) + (**self).size_of(ops)
+ }
+}
+
+impl MallocSizeOf for () {
+ fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize {
+ 0
+ }
+}
+
+impl<T1, T2> MallocSizeOf for (T1, T2)
+where
+ T1: MallocSizeOf,
+ T2: MallocSizeOf,
+{
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.0.size_of(ops) + self.1.size_of(ops)
+ }
+}
+
+impl<T1, T2, T3> MallocSizeOf for (T1, T2, T3)
+where
+ T1: MallocSizeOf,
+ T2: MallocSizeOf,
+ T3: MallocSizeOf,
+{
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.0.size_of(ops) + self.1.size_of(ops) + self.2.size_of(ops)
+ }
+}
+
+impl<T1, T2, T3, T4> MallocSizeOf for (T1, T2, T3, T4)
+where
+ T1: MallocSizeOf,
+ T2: MallocSizeOf,
+ T3: MallocSizeOf,
+ T4: MallocSizeOf,
+{
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.0.size_of(ops) + self.1.size_of(ops) + self.2.size_of(ops) + self.3.size_of(ops)
+ }
+}
+
+impl<T: MallocSizeOf> MallocSizeOf for Option<T> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ if let Some(val) = self.as_ref() {
+ val.size_of(ops)
+ } else {
+ 0
+ }
+ }
+}
+
+impl<T: MallocSizeOf, E: MallocSizeOf> MallocSizeOf for Result<T, E> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ match *self {
+ Ok(ref x) => x.size_of(ops),
+ Err(ref e) => e.size_of(ops),
+ }
+ }
+}
+
+impl<T: MallocSizeOf + Copy> MallocSizeOf for std::cell::Cell<T> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.get().size_of(ops)
+ }
+}
+
+impl<T: MallocSizeOf> MallocSizeOf for std::cell::RefCell<T> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.borrow().size_of(ops)
+ }
+}
+
+impl<'a, B: ?Sized + ToOwned> MallocSizeOf for std::borrow::Cow<'a, B>
+where
+ B::Owned: MallocSizeOf,
+{
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ match *self {
+ std::borrow::Cow::Borrowed(_) => 0,
+ std::borrow::Cow::Owned(ref b) => b.size_of(ops),
+ }
+ }
+}
+
+impl<T: MallocSizeOf> MallocSizeOf for [T] {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ let mut n = 0;
+ for elem in self.iter() {
+ n += elem.size_of(ops);
+ }
+ n
+ }
+}
+
+impl<T> MallocShallowSizeOf for Vec<T> {
+ fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ unsafe { ops.malloc_size_of(self.as_ptr()) }
+ }
+}
+
+impl<T: MallocSizeOf> MallocSizeOf for Vec<T> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ let mut n = self.shallow_size_of(ops);
+ for elem in self.iter() {
+ n += elem.size_of(ops);
+ }
+ n
+ }
+}
+
+macro_rules! malloc_size_of_hash_set {
+ ($ty:ty) => {
+ impl<T, S> MallocShallowSizeOf for $ty
+ where
+ T: Eq + Hash,
+ S: BuildHasher,
+ {
+ fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ if ops.has_malloc_enclosing_size_of() {
+ // The first value from the iterator gives us an interior pointer.
+ // `ops.malloc_enclosing_size_of()` then gives us the storage size.
+ // This assumes that the `HashSet`'s contents (values and hashes)
+ // are all stored in a single contiguous heap allocation.
+ self.iter()
+ .next()
+ .map_or(0, |t| unsafe { ops.malloc_enclosing_size_of(t) })
+ } else {
+ // An estimate.
+ self.capacity() * (size_of::<T>() + size_of::<usize>())
+ }
+ }
+ }
+
+ impl<T, S> MallocSizeOf for $ty
+ where
+ T: Eq + Hash + MallocSizeOf,
+ S: BuildHasher,
+ {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ let mut n = self.shallow_size_of(ops);
+ for t in self.iter() {
+ n += t.size_of(ops);
+ }
+ n
+ }
+ }
+ };
+}
+
+malloc_size_of_hash_set!(std::collections::HashSet<T, S>);
+
+macro_rules! malloc_size_of_hash_map {
+ ($ty:ty) => {
+ impl<K, V, S> MallocShallowSizeOf for $ty
+ where
+ K: Eq + Hash,
+ S: BuildHasher,
+ {
+ fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ // See the implementation for std::collections::HashSet for details.
+ if ops.has_malloc_enclosing_size_of() {
+ self.values()
+ .next()
+ .map_or(0, |v| unsafe { ops.malloc_enclosing_size_of(v) })
+ } else {
+ self.capacity() * (size_of::<V>() + size_of::<K>() + size_of::<usize>())
+ }
+ }
+ }
+
+ impl<K, V, S> MallocSizeOf for $ty
+ where
+ K: Eq + Hash + MallocSizeOf,
+ V: MallocSizeOf,
+ S: BuildHasher,
+ {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ let mut n = self.shallow_size_of(ops);
+ for (k, v) in self.iter() {
+ n += k.size_of(ops);
+ n += v.size_of(ops);
+ }
+ n
+ }
+ }
+ };
+}
+
+malloc_size_of_hash_map!(std::collections::HashMap<K, V, S>);
+
+// PhantomData is always 0.
+impl<T> MallocSizeOf for std::marker::PhantomData<T> {
+ fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize {
+ 0
+ }
+}
+
+impl<T: MallocSizeOf, Unit> MallocSizeOf for euclid::Length<T, Unit> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.0.size_of(ops)
+ }
+}
+
+impl<T: MallocSizeOf, Src, Dst> MallocSizeOf for euclid::Scale<T, Src, Dst> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.0.size_of(ops)
+ }
+}
+
+impl<T: MallocSizeOf, U> MallocSizeOf for euclid::Point2D<T, U> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.x.size_of(ops) + self.y.size_of(ops)
+ }
+}
+
+impl<T: MallocSizeOf, U> MallocSizeOf for euclid::Rect<T, U> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.origin.size_of(ops) + self.size.size_of(ops)
+ }
+}
+
+impl<T: MallocSizeOf, U> MallocSizeOf for euclid::SideOffsets2D<T, U> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.top.size_of(ops) +
+ self.right.size_of(ops) +
+ self.bottom.size_of(ops) +
+ self.left.size_of(ops)
+ }
+}
+
+impl<T: MallocSizeOf, U> MallocSizeOf for euclid::Size2D<T, U> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.width.size_of(ops) + self.height.size_of(ops)
+ }
+}
+
+impl<T: MallocSizeOf, Src, Dst> MallocSizeOf for euclid::Transform2D<T, Src, Dst> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.m11.size_of(ops) +
+ self.m12.size_of(ops) +
+ self.m21.size_of(ops) +
+ self.m22.size_of(ops) +
+ self.m31.size_of(ops) +
+ self.m32.size_of(ops)
+ }
+}
+
+impl<T: MallocSizeOf, Src, Dst> MallocSizeOf for euclid::Transform3D<T, Src, Dst> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.m11.size_of(ops) +
+ self.m12.size_of(ops) +
+ self.m13.size_of(ops) +
+ self.m14.size_of(ops) +
+ self.m21.size_of(ops) +
+ self.m22.size_of(ops) +
+ self.m23.size_of(ops) +
+ self.m24.size_of(ops) +
+ self.m31.size_of(ops) +
+ self.m32.size_of(ops) +
+ self.m33.size_of(ops) +
+ self.m34.size_of(ops) +
+ self.m41.size_of(ops) +
+ self.m42.size_of(ops) +
+ self.m43.size_of(ops) +
+ self.m44.size_of(ops)
+ }
+}
+
+impl<T: MallocSizeOf, U> MallocSizeOf for euclid::Vector2D<T, U> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.x.size_of(ops) + self.y.size_of(ops)
+ }
+}
+
+/// For use on types where size_of() returns 0.
+#[macro_export]
+macro_rules! malloc_size_of_is_0(
+ ($($ty:ty),+) => (
+ $(
+ impl $crate::MallocSizeOf for $ty {
+ #[inline(always)]
+ fn size_of(&self, _: &mut $crate::MallocSizeOfOps) -> usize {
+ 0
+ }
+ }
+ )+
+ );
+ ($($ty:ident<$($gen:ident),+>),+) => (
+ $(
+ impl<$($gen: $crate::MallocSizeOf),+> $crate::MallocSizeOf for $ty<$($gen),+> {
+ #[inline(always)]
+ fn size_of(&self, _: &mut $crate::MallocSizeOfOps) -> usize {
+ 0
+ }
+ }
+ )+
+ );
+);
+
+malloc_size_of_is_0!(bool, char, str);
+malloc_size_of_is_0!(u8, u16, u32, u64, u128, usize);
+malloc_size_of_is_0!(i8, i16, i32, i64, i128, isize);
+malloc_size_of_is_0!(f32, f64);
+
+malloc_size_of_is_0!(std::sync::atomic::AtomicBool);
+malloc_size_of_is_0!(std::sync::atomic::AtomicIsize);
+malloc_size_of_is_0!(std::sync::atomic::AtomicUsize);
+
+malloc_size_of_is_0!(std::num::NonZeroUsize);
+malloc_size_of_is_0!(std::num::NonZeroU32);
+
+malloc_size_of_is_0!(std::time::Duration);
+malloc_size_of_is_0!(std::time::Instant);
+malloc_size_of_is_0!(std::time::SystemTime);
+
+malloc_size_of_is_0!(Range<u8>, Range<u16>, Range<u32>, Range<u64>, Range<usize>);
+malloc_size_of_is_0!(Range<i8>, Range<i16>, Range<i32>, Range<i64>, Range<isize>);
+malloc_size_of_is_0!(Range<f32>, Range<f64>);
+
+malloc_size_of_is_0!(app_units::Au);
diff --git a/third_party/webrender/wrench/.gitignore b/third_party/webrender/wrench/.gitignore
new file mode 100644
index 00000000000..341d13d0f75
--- /dev/null
+++ b/third_party/webrender/wrench/.gitignore
@@ -0,0 +1,7 @@
+Cargo.lock
+target/
+*#
+*~
+yaml_frames/
+json_frames/
+bin_frames/
diff --git a/third_party/webrender/wrench/Cargo.toml b/third_party/webrender/wrench/Cargo.toml
new file mode 100644
index 00000000000..5595ced68e2
--- /dev/null
+++ b/third_party/webrender/wrench/Cargo.toml
@@ -0,0 +1,73 @@
+[package]
+name = "wrench"
+version = "0.3.0"
+authors = ["Vladimir Vukicevic <vladimir@pobox.com>"]
+build = "build.rs"
+license = "MPL-2.0"
+edition = "2018"
+
+[dependencies]
+base64 = "0.10"
+bincode = "1.0"
+byteorder = "1.0"
+env_logger = { version = "0.5", optional = true }
+euclid = "0.22"
+gleam = "0.12"
+glutin = "0.21"
+app_units = "0.7"
+clap = { version = "2", features = ["yaml"] }
+log = "0.4"
+yaml-rust = "0.4"
+serde_json = "1.0"
+ron = "0.5"
+time = "0.1"
+chrono = "0.2"
+crossbeam = "0.2"
+osmesa-sys = { version = "0.1.2", optional = true }
+osmesa-src = { git = "https://github.com/servo/osmesa-src", optional = true }
+webrender = {path = "../webrender", features=["capture","replay","debugger","png","profiler","no_static_freetype", "leak_checks"]}
+webrender_api = {path = "../webrender_api", features=["serialize","deserialize"]}
+winit = "0.19"
+serde = {version = "1.0", features = ["derive"] }
+semver = "0.9.0"
+swgl = { path = "../swgl", optional = true }
+
+[dependencies.image]
+version = "0.23"
+default-features = false
+features = ["png"]
+
+[target.'cfg(target_os = "macos")'.dependencies]
+core-graphics = "0.22"
+core-foundation = "0.9"
+
+[features]
+default = [ "env_logger" ]
+headless = [ "osmesa-sys", "osmesa-src" ]
+software = [ "swgl" ]
+
+[target.'cfg(target_os = "windows")'.dependencies]
+dwrote = "0.11"
+mozangle = {version = "0.3.1", features = ["egl"]}
+
+[target.'cfg(all(unix, not(target_os = "android")))'.dependencies]
+font-loader = "0.11"
+
+# Configuration information used when building wrench as an APK.
+[package.metadata.android]
+package_name = "org.mozilla.wrench"
+label = "Wrench"
+android_version = 29
+target_sdk_version = 18
+min_sdk_version = 18
+fullscreen = true
+build_targets = [ "armv7-linux-androideabi", "i686-linux-android" ]
+opengles_version_major = 3
+opengles_version_minor = 0
+[package.metadata.android.application_attributes]
+"android:hardwareAccelerated" = "true"
+[package.metadata.android.activity_attributes]
+"android:screenOrientation" = "unspecified"
+"android:uiOptions" = "none"
+[[package.metadata.android.permission]]
+name = "android.permission.READ_EXTERNAL_STORAGE"
diff --git a/third_party/webrender/wrench/README.md b/third_party/webrender/wrench/README.md
new file mode 100644
index 00000000000..1119a27112e
--- /dev/null
+++ b/third_party/webrender/wrench/README.md
@@ -0,0 +1,35 @@
+# wrench
+
+`wrench` is a tool for debugging webrender outside of a browser engine.
+
+## headless
+
+`wrench` has an optional headless mode for use in continuous integration. To run in headless mode, instead of using `cargo run -- args`, use `./headless.py args`.
+
+## `replay` and `show`
+
+Binary recordings can be generated by webrender and replayed with `wrench replay`. Enable binary recording in `RendererOptions`.
+
+```rust
+RendererOptions {
+ ...
+ recorder: Some(Box::new(BinaryRecorder::new("wr-frame.bin"))),
+ ...
+}
+```
+
+If you are working on gecko integration you can enable recording in `webrender_bindings/src/bindings.rs` by setting
+
+```rust
+static ENABLE_RECORDING: bool = true;
+```
+
+`wrench replay --save yaml` will convert the recording into frames described in yaml. Frames can then be replayed with `wrench show`.
+
+## `reftest`
+
+Wrench also has a reftest system for catching regressions.
+* To run all reftests, run `script/headless.py reftest`
+* To run specific reftests, run `script/headless.py reftest path/to/test/or/dir`
+* To examine test failures, use the [reftest analyzer](https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml)
+* To add a new reftest, create an example frame and a reference frame in `reftests/` and then add an entry to `reftests/reftest.list`
diff --git a/third_party/webrender/wrench/android.txt b/third_party/webrender/wrench/android.txt
new file mode 100644
index 00000000000..7ff0ac0eb1d
--- /dev/null
+++ b/third_party/webrender/wrench/android.txt
@@ -0,0 +1,93 @@
+Running Wrench on Android devices.
+==================================
+
+Setting up the environment:
+---------------------------
+
+Follow the steps at https://github.com/rust-windowing/android-rs-glue#setting-up-your-environment, with exceptions:
+ - No need to download the Android NDK and SDK, we will use the ones downloaded by Gecko in ~/.mozbuild/
+
+ - Install both the i686-linux-android and armv7-linux-androideabi rust
+ targets, as the APK will include native libraries with both architectures.
+
+ - Don't install currently published version of cargo-apk (it doesn't support newer NDKs).
+ Instead, install the git master version like so:
+ cargo install --git https://github.com/rust-windowing/android-rs-glue cargo-apk
+
+ - Consider adding ~/.mozbuild/android-sdk-linux/platform-tools to your path, for the adb commands below.
+
+Compiling and running:
+----------------------
+
+ Compile wrench:
+ cd wrench
+ export ANDROID_HOME=$HOME/.mozbuild/android-sdk-linux # exact path may vary
+ export NDK_HOME=$HOME/.mozbuild/android-ndk-r17b # exact path may vary
+ cargo apk build
+
+ Install the APK:
+ adb install -r ../target/android-artifacts/debug/apk/wrench.apk
+
+ Set command line arguments and env vars for wrench:
+ adb shell
+ mkdir /sdcard/wrench
+ echo "load reftests/aa/rounded-rects.yaml" >/sdcard/wrench/args
+ echo "env: WRENCH_REFTEST_CONDITION_EMULATOR=1" >>/sdcard/wrench/args # If you're using the emulator
+ echo "env: WRENCH_REFTEST_CONDITION_DEVICE=1" >>/sdcard/wrench/args # If you're using a device
+ exit
+
+ Push reftests (if you need these files for what you're doing):
+ adb push reftests /sdcard/wrench/
+
+ Run the application:
+ adb shell am start -n org.mozilla.wrench/android.app.NativeActivity
+ (or click the icon in the launcher)
+
+Release mode:
+-------------
+
+ Building in release does work as well. Use the following steps to compile wrench:
+ cd wrench
+ export ANDROID_HOME=$HOME/.mozbuild/android-sdk-linux # exact path may vary
+ export NDK_HOME=$HOME/.mozbuild/android-ndk # exact path may vary
+ cargo apk build --release
+
+ Now the APK at ../target/android-artifacts/release/apk/wrench.apk
+ should be signed and installable (you may need to uninstall the debug APK first if you
+ have that installed).
+
+Running reftests like a boss (on a local emulator):
+---------------------------------------------------
+
+ First, compile wrench as described above (debug mode).
+ Then, from the root gecko source dir, run:
+ ./mach python testing/mozharness/scripts/android_wrench.py --config testing/mozharness/configs/android/wrench.py
+ This will automatically do the following:
+ - Download the blessed android AVDs from taskcluster
+ - Start the emulator (using your ~/.mozbuild/android-sdk-linux emulator binaries)
+ - Install the debug APK (from gfx/wr/wrench/target/android-artifacts/debug/apk/wrench.apk)
+ - Copy the reftests to the sdcard
+ - Write an args file to the sdcard
+ - Run wrench
+ - Wait for wrench to finish running
+ - Scrape the logcat for reftest output
+ Other logs (e.g. full logcat) can be found in your ~/.wrench/logs folder. Note that
+ this will also leave the android emulator running, so repeating the command will be
+ even faster the next time around as it won't need to redownload the AVDs or restart
+ the emulator. It will reinstall the APK and re-push the reftests folder though.
+
+ If you want to use a release APK (runs much faster), build it as per the "Release mode"
+ instructions above and set the WRENCH_APK env var to point to the APK:
+ to point to it:
+ export WRENCH_APK=gfx/wr/target/android-artifacts/release/apk/wrench.apk
+ ./mach python testing/mozharness/scripts/android_wrench.py --config testing/mozharness/configs/android/wrench.py
+
+Running reftests like a boss (on a local device):
+-------------------------------------------------
+
+ Same steps as running on a local emulator, except you need to do this:
+ export DEVICE_SERIAL=<your device's serial>
+ before running the `./mach python` command. You can get the serial of
+ your device by running `adb devices` with the device plugged in. When running
+ on a device, the android_emulator_wrench.py script will skip the steps to
+ download the AVDs and start the emulator.
diff --git a/third_party/webrender/wrench/benchmarks/aligned-gradient.yaml b/third_party/webrender/wrench/benchmarks/aligned-gradient.yaml
new file mode 100644
index 00000000000..b0e2f0a6452
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/aligned-gradient.yaml
@@ -0,0 +1,62 @@
+root:
+ items:
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
diff --git a/third_party/webrender/wrench/benchmarks/benchmarks.list b/third_party/webrender/wrench/benchmarks/benchmarks.list
new file mode 100644
index 00000000000..c7235dcfd28
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/benchmarks.list
@@ -0,0 +1,11 @@
+aligned-gradient.yaml
+unaligned-gradient.yaml
+simple-batching.yaml
+large-boxshadow-ellipse.yaml
+large-boxshadow-ellipse-2.yaml
+large-clip-rect.yaml
+transforms-simple.yaml
+text-rendering.yaml
+many-images.yaml
+large-blur-radius.yaml
+
diff --git a/third_party/webrender/wrench/benchmarks/box-shadow-large.yaml b/third_party/webrender/wrench/benchmarks/box-shadow-large.yaml
new file mode 100644
index 00000000000..83c8ce53269
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/box-shadow-large.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 100, 100, 800, 800 ]
+ blur-radius: 20
+ border-radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [100, 100],
+ }
+ color: blue
+ clip-mode: outset
diff --git a/third_party/webrender/wrench/benchmarks/clip-clear.yaml b/third_party/webrender/wrench/benchmarks/clip-clear.yaml
new file mode 100644
index 00000000000..f23440a3f11
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/clip-clear.yaml
@@ -0,0 +1,48 @@
+# Benchmark to test the cost of clears on a clip mask target that
+# is large but has low usage.
+---
+root:
+ items:
+ -
+ bounds: 0 0 1000 1000
+ type: stacking-context
+ items:
+ - type: clip
+ bounds: [50, 50, 300, 300]
+ complex:
+ - rect: [50, 50, 300, 300]
+ radius: 50
+ items:
+ - type: rect
+ bounds: 50 50 300 300
+ color: red
+ - type: rect
+ bounds: 50 50 300 300
+ color: red
+ - type: rect
+ bounds: 50 50 300 300
+ color: red
+ - type: rect
+ bounds: 50 50 300 300
+ color: red
+ - type: rect
+ bounds: 50 50 300 300
+ color: red
+ - type: rect
+ bounds: 50 50 300 300
+ color: red
+ - type: rect
+ bounds: 50 50 300 300
+ color: red
+ - type: rect
+ bounds: 50 50 300 300
+ color: red
+ - type: rect
+ bounds: 50 50 300 300
+ color: red
+ - type: rect
+ bounds: 50 50 300 300
+ color: red
+ - type: rect
+ bounds: 50 50 300 300
+ color: red
diff --git a/third_party/webrender/wrench/benchmarks/large-blur-radius.yaml b/third_party/webrender/wrench/benchmarks/large-blur-radius.yaml
new file mode 100644
index 00000000000..927e4237656
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/large-blur-radius.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 100 100 1024 1024
+ filters: blur(100)
+ items:
+ - type: rect
+ bounds: 0 0 1024 1024
+ color: red
diff --git a/third_party/webrender/wrench/benchmarks/large-boxshadow-ellipse-2.yaml b/third_party/webrender/wrench/benchmarks/large-boxshadow-ellipse-2.yaml
new file mode 100644
index 00000000000..bcb57434ece
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/large-boxshadow-ellipse-2.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: box-shadow
+ bounds: [ 0, 0, 1024, 1024 ]
+ color: green
+ clip-mode: inset
+ blur-radius: 10000
+ border-radius: {
+ top-left: [500, 700],
+ top-right: [500, 700],
+ bottom-left: [600, 400],
+ bottom-right: [600, 400],
+ }
+
diff --git a/third_party/webrender/wrench/benchmarks/large-boxshadow-ellipse.yaml b/third_party/webrender/wrench/benchmarks/large-boxshadow-ellipse.yaml
new file mode 100644
index 00000000000..a9670f78fab
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/large-boxshadow-ellipse.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: box-shadow
+ bounds: [ 0, 0, 1024, 1024 ]
+ color: green
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: {
+ top-left: [10, 30],
+ top-right: [10, 30],
+ bottom-left: [30, 10],
+ bottom-right: [30, 10],
+ }
+
diff --git a/third_party/webrender/wrench/benchmarks/large-clip-rect.yaml b/third_party/webrender/wrench/benchmarks/large-clip-rect.yaml
new file mode 100644
index 00000000000..7bd8f1f6a55
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/large-clip-rect.yaml
@@ -0,0 +1,33 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 1024, 1024]
+ complex:
+ - rect: [0, 0, 1024, 1024]
+ radius: 16
+ items:
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: red
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: red
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: red
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: red
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: red
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: red
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: red
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: red
diff --git a/third_party/webrender/wrench/benchmarks/many-box-shadows.yaml b/third_party/webrender/wrench/benchmarks/many-box-shadows.yaml
new file mode 100644
index 00000000000..424c8379a23
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/many-box-shadows.yaml
@@ -0,0 +1,125 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [68, 431, 539, 805]
+ "clip-rect": [5, 390, 665, 932]
+ "clip-and-scroll": 0
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [68, 431, 539, 805]
+ offset: [0, 22.5]
+ color: 0 0 0 0.1020
+ "blur-radius": 45
+ "spread-radius": 0
+ "clip-mode": outset
+ -
+ bounds: [668, 431, 539, 805]
+ "clip-rect": [605, 390, 665, 932]
+ "clip-and-scroll": 0
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [668, 431, 539, 805]
+ offset: [0, 22.5]
+ color: 0 0 0 0.1020
+ "blur-radius": 45
+ "spread-radius": 0
+ "clip-mode": outset
+ -
+ bounds: [1268, 431, 540, 805]
+ "clip-rect": [1205, 390, 666, 932]
+ "clip-and-scroll": 0
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [1268, 431, 540, 805]
+ offset: [0, 22.5]
+ color: 0 0 0 0.1020
+ "blur-radius": 45
+ "spread-radius": 0
+ "clip-mode": outset
+ -
+ bounds: [68, 1284, 539, 771]
+ "clip-rect": [5, 1244, 665, 897]
+ "clip-and-scroll": 0
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [68, 1284, 539, 771]
+ offset: [0, 22.5]
+ color: 0 0 0 0.1020
+ "blur-radius": 45
+ "spread-radius": 0
+ "clip-mode": outset
+ -
+ bounds: [668, 1284, 539, 771]
+ "clip-rect": [605, 1244, 665, 897]
+ "clip-and-scroll": 0
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [668, 1284, 539, 771]
+ offset: [0, 22.5]
+ color: 0 0 0 0.1020
+ "blur-radius": 45
+ "spread-radius": 0
+ "clip-mode": outset
+ -
+ bounds: [1268, 1284, 540, 771]
+ "clip-rect": [1205, 1244, 666, 897]
+ "clip-and-scroll": 0
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [1268, 1284, 540, 771]
+ offset: [0, 22.5]
+ color: 0 0 0 0.1020
+ "blur-radius": 45
+ "spread-radius": 0
+ "clip-mode": outset
+ -
+ bounds: [68, 2103, 539, 839]
+ "clip-rect": [5, 2063, 665, 965]
+ "clip-and-scroll": 0
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [68, 2103, 539, 839]
+ offset: [0, 22.5]
+ color: 0 0 0 0.1020
+ "blur-radius": 45
+ "spread-radius": 0
+ "clip-mode": outset
+ -
+ bounds: [668, 2103, 539, 839]
+ "clip-rect": [605, 2063, 665, 965]
+ "clip-and-scroll": 0
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [668, 2103, 539, 839]
+ offset: [0, 22.5]
+ color: 0 0 0 0.1020
+ "blur-radius": 45
+ "spread-radius": 0
+ "clip-mode": outset
+ -
+ bounds: [1268, 2103, 540, 839]
+ "clip-rect": [1205, 2063, 666, 965]
+ "clip-and-scroll": 0
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [1268, 2103, 540, 839]
+ offset: [0, 22.5]
+ color: 0 0 0 0.1020
+ "blur-radius": 45
+ "spread-radius": 0
+ "clip-mode": outset
+ -
+ bounds: [0, 0, 1875, 154]
+ "clip-rect": [-2, 0, 1879, 158]
+ "clip-and-scroll": 0
+ type: "box-shadow"
+ "box-bounds": [0, 0, 1875, 154]
+ offset: [0, 1.5]
+ color: 0 0 0 0.4000
+ "blur-radius": 1.5
+ "spread-radius": 0
+ "clip-mode": outset
diff --git a/third_party/webrender/wrench/benchmarks/many-images.yaml b/third_party/webrender/wrench/benchmarks/many-images.yaml
new file mode 100644
index 00000000000..963fdef8814
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/many-images.yaml
@@ -0,0 +1,16386 @@
+root:
+ items:
+ - image: solid-color(0, 0, 0, 255, 8, 8)
+ bounds: 0 0 8 8
+ - image: solid-color(1, 0, 0, 255, 8, 8)
+ bounds: 8 0 8 8
+ - image: solid-color(2, 0, 0, 255, 8, 8)
+ bounds: 16 0 8 8
+ - image: solid-color(3, 0, 0, 255, 8, 8)
+ bounds: 24 0 8 8
+ - image: solid-color(4, 0, 0, 255, 8, 8)
+ bounds: 32 0 8 8
+ - image: solid-color(5, 0, 0, 255, 8, 8)
+ bounds: 40 0 8 8
+ - image: solid-color(6, 0, 0, 255, 8, 8)
+ bounds: 48 0 8 8
+ - image: solid-color(7, 0, 0, 255, 8, 8)
+ bounds: 56 0 8 8
+ - image: solid-color(8, 0, 0, 255, 8, 8)
+ bounds: 64 0 8 8
+ - image: solid-color(9, 0, 0, 255, 8, 8)
+ bounds: 72 0 8 8
+ - image: solid-color(10, 0, 0, 255, 8, 8)
+ bounds: 80 0 8 8
+ - image: solid-color(11, 0, 0, 255, 8, 8)
+ bounds: 88 0 8 8
+ - image: solid-color(12, 0, 0, 255, 8, 8)
+ bounds: 96 0 8 8
+ - image: solid-color(13, 0, 0, 255, 8, 8)
+ bounds: 104 0 8 8
+ - image: solid-color(14, 0, 0, 255, 8, 8)
+ bounds: 112 0 8 8
+ - image: solid-color(15, 0, 0, 255, 8, 8)
+ bounds: 120 0 8 8
+ - image: solid-color(16, 0, 0, 255, 8, 8)
+ bounds: 128 0 8 8
+ - image: solid-color(17, 0, 0, 255, 8, 8)
+ bounds: 136 0 8 8
+ - image: solid-color(18, 0, 0, 255, 8, 8)
+ bounds: 144 0 8 8
+ - image: solid-color(19, 0, 0, 255, 8, 8)
+ bounds: 152 0 8 8
+ - image: solid-color(20, 0, 0, 255, 8, 8)
+ bounds: 160 0 8 8
+ - image: solid-color(21, 0, 0, 255, 8, 8)
+ bounds: 168 0 8 8
+ - image: solid-color(22, 0, 0, 255, 8, 8)
+ bounds: 176 0 8 8
+ - image: solid-color(23, 0, 0, 255, 8, 8)
+ bounds: 184 0 8 8
+ - image: solid-color(24, 0, 0, 255, 8, 8)
+ bounds: 192 0 8 8
+ - image: solid-color(25, 0, 0, 255, 8, 8)
+ bounds: 200 0 8 8
+ - image: solid-color(26, 0, 0, 255, 8, 8)
+ bounds: 208 0 8 8
+ - image: solid-color(27, 0, 0, 255, 8, 8)
+ bounds: 216 0 8 8
+ - image: solid-color(28, 0, 0, 255, 8, 8)
+ bounds: 224 0 8 8
+ - image: solid-color(29, 0, 0, 255, 8, 8)
+ bounds: 232 0 8 8
+ - image: solid-color(30, 0, 0, 255, 8, 8)
+ bounds: 240 0 8 8
+ - image: solid-color(31, 0, 0, 255, 8, 8)
+ bounds: 248 0 8 8
+ - image: solid-color(32, 0, 0, 255, 8, 8)
+ bounds: 256 0 8 8
+ - image: solid-color(33, 0, 0, 255, 8, 8)
+ bounds: 264 0 8 8
+ - image: solid-color(34, 0, 0, 255, 8, 8)
+ bounds: 272 0 8 8
+ - image: solid-color(35, 0, 0, 255, 8, 8)
+ bounds: 280 0 8 8
+ - image: solid-color(36, 0, 0, 255, 8, 8)
+ bounds: 288 0 8 8
+ - image: solid-color(37, 0, 0, 255, 8, 8)
+ bounds: 296 0 8 8
+ - image: solid-color(38, 0, 0, 255, 8, 8)
+ bounds: 304 0 8 8
+ - image: solid-color(39, 0, 0, 255, 8, 8)
+ bounds: 312 0 8 8
+ - image: solid-color(40, 0, 0, 255, 8, 8)
+ bounds: 320 0 8 8
+ - image: solid-color(41, 0, 0, 255, 8, 8)
+ bounds: 328 0 8 8
+ - image: solid-color(42, 0, 0, 255, 8, 8)
+ bounds: 336 0 8 8
+ - image: solid-color(43, 0, 0, 255, 8, 8)
+ bounds: 344 0 8 8
+ - image: solid-color(44, 0, 0, 255, 8, 8)
+ bounds: 352 0 8 8
+ - image: solid-color(45, 0, 0, 255, 8, 8)
+ bounds: 360 0 8 8
+ - image: solid-color(46, 0, 0, 255, 8, 8)
+ bounds: 368 0 8 8
+ - image: solid-color(47, 0, 0, 255, 8, 8)
+ bounds: 376 0 8 8
+ - image: solid-color(48, 0, 0, 255, 8, 8)
+ bounds: 384 0 8 8
+ - image: solid-color(49, 0, 0, 255, 8, 8)
+ bounds: 392 0 8 8
+ - image: solid-color(50, 0, 0, 255, 8, 8)
+ bounds: 400 0 8 8
+ - image: solid-color(51, 0, 0, 255, 8, 8)
+ bounds: 408 0 8 8
+ - image: solid-color(52, 0, 0, 255, 8, 8)
+ bounds: 416 0 8 8
+ - image: solid-color(53, 0, 0, 255, 8, 8)
+ bounds: 424 0 8 8
+ - image: solid-color(54, 0, 0, 255, 8, 8)
+ bounds: 432 0 8 8
+ - image: solid-color(55, 0, 0, 255, 8, 8)
+ bounds: 440 0 8 8
+ - image: solid-color(56, 0, 0, 255, 8, 8)
+ bounds: 448 0 8 8
+ - image: solid-color(57, 0, 0, 255, 8, 8)
+ bounds: 456 0 8 8
+ - image: solid-color(58, 0, 0, 255, 8, 8)
+ bounds: 464 0 8 8
+ - image: solid-color(59, 0, 0, 255, 8, 8)
+ bounds: 472 0 8 8
+ - image: solid-color(60, 0, 0, 255, 8, 8)
+ bounds: 480 0 8 8
+ - image: solid-color(61, 0, 0, 255, 8, 8)
+ bounds: 488 0 8 8
+ - image: solid-color(62, 0, 0, 255, 8, 8)
+ bounds: 496 0 8 8
+ - image: solid-color(63, 0, 0, 255, 8, 8)
+ bounds: 504 0 8 8
+ - image: solid-color(64, 0, 0, 255, 8, 8)
+ bounds: 512 0 8 8
+ - image: solid-color(65, 0, 0, 255, 8, 8)
+ bounds: 520 0 8 8
+ - image: solid-color(66, 0, 0, 255, 8, 8)
+ bounds: 528 0 8 8
+ - image: solid-color(67, 0, 0, 255, 8, 8)
+ bounds: 536 0 8 8
+ - image: solid-color(68, 0, 0, 255, 8, 8)
+ bounds: 544 0 8 8
+ - image: solid-color(69, 0, 0, 255, 8, 8)
+ bounds: 552 0 8 8
+ - image: solid-color(70, 0, 0, 255, 8, 8)
+ bounds: 560 0 8 8
+ - image: solid-color(71, 0, 0, 255, 8, 8)
+ bounds: 568 0 8 8
+ - image: solid-color(72, 0, 0, 255, 8, 8)
+ bounds: 576 0 8 8
+ - image: solid-color(73, 0, 0, 255, 8, 8)
+ bounds: 584 0 8 8
+ - image: solid-color(74, 0, 0, 255, 8, 8)
+ bounds: 592 0 8 8
+ - image: solid-color(75, 0, 0, 255, 8, 8)
+ bounds: 600 0 8 8
+ - image: solid-color(76, 0, 0, 255, 8, 8)
+ bounds: 608 0 8 8
+ - image: solid-color(77, 0, 0, 255, 8, 8)
+ bounds: 616 0 8 8
+ - image: solid-color(78, 0, 0, 255, 8, 8)
+ bounds: 624 0 8 8
+ - image: solid-color(79, 0, 0, 255, 8, 8)
+ bounds: 632 0 8 8
+ - image: solid-color(80, 0, 0, 255, 8, 8)
+ bounds: 640 0 8 8
+ - image: solid-color(81, 0, 0, 255, 8, 8)
+ bounds: 648 0 8 8
+ - image: solid-color(82, 0, 0, 255, 8, 8)
+ bounds: 656 0 8 8
+ - image: solid-color(83, 0, 0, 255, 8, 8)
+ bounds: 664 0 8 8
+ - image: solid-color(84, 0, 0, 255, 8, 8)
+ bounds: 672 0 8 8
+ - image: solid-color(85, 0, 0, 255, 8, 8)
+ bounds: 680 0 8 8
+ - image: solid-color(86, 0, 0, 255, 8, 8)
+ bounds: 688 0 8 8
+ - image: solid-color(87, 0, 0, 255, 8, 8)
+ bounds: 696 0 8 8
+ - image: solid-color(88, 0, 0, 255, 8, 8)
+ bounds: 704 0 8 8
+ - image: solid-color(89, 0, 0, 255, 8, 8)
+ bounds: 712 0 8 8
+ - image: solid-color(90, 0, 0, 255, 8, 8)
+ bounds: 720 0 8 8
+ - image: solid-color(91, 0, 0, 255, 8, 8)
+ bounds: 728 0 8 8
+ - image: solid-color(92, 0, 0, 255, 8, 8)
+ bounds: 736 0 8 8
+ - image: solid-color(93, 0, 0, 255, 8, 8)
+ bounds: 744 0 8 8
+ - image: solid-color(94, 0, 0, 255, 8, 8)
+ bounds: 752 0 8 8
+ - image: solid-color(95, 0, 0, 255, 8, 8)
+ bounds: 760 0 8 8
+ - image: solid-color(96, 0, 0, 255, 8, 8)
+ bounds: 768 0 8 8
+ - image: solid-color(97, 0, 0, 255, 8, 8)
+ bounds: 776 0 8 8
+ - image: solid-color(98, 0, 0, 255, 8, 8)
+ bounds: 784 0 8 8
+ - image: solid-color(99, 0, 0, 255, 8, 8)
+ bounds: 792 0 8 8
+ - image: solid-color(100, 0, 0, 255, 8, 8)
+ bounds: 800 0 8 8
+ - image: solid-color(101, 0, 0, 255, 8, 8)
+ bounds: 808 0 8 8
+ - image: solid-color(102, 0, 0, 255, 8, 8)
+ bounds: 816 0 8 8
+ - image: solid-color(103, 0, 0, 255, 8, 8)
+ bounds: 824 0 8 8
+ - image: solid-color(104, 0, 0, 255, 8, 8)
+ bounds: 832 0 8 8
+ - image: solid-color(105, 0, 0, 255, 8, 8)
+ bounds: 840 0 8 8
+ - image: solid-color(106, 0, 0, 255, 8, 8)
+ bounds: 848 0 8 8
+ - image: solid-color(107, 0, 0, 255, 8, 8)
+ bounds: 856 0 8 8
+ - image: solid-color(108, 0, 0, 255, 8, 8)
+ bounds: 864 0 8 8
+ - image: solid-color(109, 0, 0, 255, 8, 8)
+ bounds: 872 0 8 8
+ - image: solid-color(110, 0, 0, 255, 8, 8)
+ bounds: 880 0 8 8
+ - image: solid-color(111, 0, 0, 255, 8, 8)
+ bounds: 888 0 8 8
+ - image: solid-color(112, 0, 0, 255, 8, 8)
+ bounds: 896 0 8 8
+ - image: solid-color(113, 0, 0, 255, 8, 8)
+ bounds: 904 0 8 8
+ - image: solid-color(114, 0, 0, 255, 8, 8)
+ bounds: 912 0 8 8
+ - image: solid-color(115, 0, 0, 255, 8, 8)
+ bounds: 920 0 8 8
+ - image: solid-color(116, 0, 0, 255, 8, 8)
+ bounds: 928 0 8 8
+ - image: solid-color(117, 0, 0, 255, 8, 8)
+ bounds: 936 0 8 8
+ - image: solid-color(118, 0, 0, 255, 8, 8)
+ bounds: 944 0 8 8
+ - image: solid-color(119, 0, 0, 255, 8, 8)
+ bounds: 952 0 8 8
+ - image: solid-color(120, 0, 0, 255, 8, 8)
+ bounds: 960 0 8 8
+ - image: solid-color(121, 0, 0, 255, 8, 8)
+ bounds: 968 0 8 8
+ - image: solid-color(122, 0, 0, 255, 8, 8)
+ bounds: 976 0 8 8
+ - image: solid-color(123, 0, 0, 255, 8, 8)
+ bounds: 984 0 8 8
+ - image: solid-color(124, 0, 0, 255, 8, 8)
+ bounds: 992 0 8 8
+ - image: solid-color(125, 0, 0, 255, 8, 8)
+ bounds: 1000 0 8 8
+ - image: solid-color(126, 0, 0, 255, 8, 8)
+ bounds: 1008 0 8 8
+ - image: solid-color(127, 0, 0, 255, 8, 8)
+ bounds: 1016 0 8 8
+ - image: solid-color(0, 1, 0, 255, 8, 8)
+ bounds: 0 8 8 8
+ - image: solid-color(1, 1, 0, 255, 8, 8)
+ bounds: 8 8 8 8
+ - image: solid-color(2, 1, 0, 255, 8, 8)
+ bounds: 16 8 8 8
+ - image: solid-color(3, 1, 0, 255, 8, 8)
+ bounds: 24 8 8 8
+ - image: solid-color(4, 1, 0, 255, 8, 8)
+ bounds: 32 8 8 8
+ - image: solid-color(5, 1, 0, 255, 8, 8)
+ bounds: 40 8 8 8
+ - image: solid-color(6, 1, 0, 255, 8, 8)
+ bounds: 48 8 8 8
+ - image: solid-color(7, 1, 0, 255, 8, 8)
+ bounds: 56 8 8 8
+ - image: solid-color(8, 1, 0, 255, 8, 8)
+ bounds: 64 8 8 8
+ - image: solid-color(9, 1, 0, 255, 8, 8)
+ bounds: 72 8 8 8
+ - image: solid-color(10, 1, 0, 255, 8, 8)
+ bounds: 80 8 8 8
+ - image: solid-color(11, 1, 0, 255, 8, 8)
+ bounds: 88 8 8 8
+ - image: solid-color(12, 1, 0, 255, 8, 8)
+ bounds: 96 8 8 8
+ - image: solid-color(13, 1, 0, 255, 8, 8)
+ bounds: 104 8 8 8
+ - image: solid-color(14, 1, 0, 255, 8, 8)
+ bounds: 112 8 8 8
+ - image: solid-color(15, 1, 0, 255, 8, 8)
+ bounds: 120 8 8 8
+ - image: solid-color(16, 1, 0, 255, 8, 8)
+ bounds: 128 8 8 8
+ - image: solid-color(17, 1, 0, 255, 8, 8)
+ bounds: 136 8 8 8
+ - image: solid-color(18, 1, 0, 255, 8, 8)
+ bounds: 144 8 8 8
+ - image: solid-color(19, 1, 0, 255, 8, 8)
+ bounds: 152 8 8 8
+ - image: solid-color(20, 1, 0, 255, 8, 8)
+ bounds: 160 8 8 8
+ - image: solid-color(21, 1, 0, 255, 8, 8)
+ bounds: 168 8 8 8
+ - image: solid-color(22, 1, 0, 255, 8, 8)
+ bounds: 176 8 8 8
+ - image: solid-color(23, 1, 0, 255, 8, 8)
+ bounds: 184 8 8 8
+ - image: solid-color(24, 1, 0, 255, 8, 8)
+ bounds: 192 8 8 8
+ - image: solid-color(25, 1, 0, 255, 8, 8)
+ bounds: 200 8 8 8
+ - image: solid-color(26, 1, 0, 255, 8, 8)
+ bounds: 208 8 8 8
+ - image: solid-color(27, 1, 0, 255, 8, 8)
+ bounds: 216 8 8 8
+ - image: solid-color(28, 1, 0, 255, 8, 8)
+ bounds: 224 8 8 8
+ - image: solid-color(29, 1, 0, 255, 8, 8)
+ bounds: 232 8 8 8
+ - image: solid-color(30, 1, 0, 255, 8, 8)
+ bounds: 240 8 8 8
+ - image: solid-color(31, 1, 0, 255, 8, 8)
+ bounds: 248 8 8 8
+ - image: solid-color(32, 1, 0, 255, 8, 8)
+ bounds: 256 8 8 8
+ - image: solid-color(33, 1, 0, 255, 8, 8)
+ bounds: 264 8 8 8
+ - image: solid-color(34, 1, 0, 255, 8, 8)
+ bounds: 272 8 8 8
+ - image: solid-color(35, 1, 0, 255, 8, 8)
+ bounds: 280 8 8 8
+ - image: solid-color(36, 1, 0, 255, 8, 8)
+ bounds: 288 8 8 8
+ - image: solid-color(37, 1, 0, 255, 8, 8)
+ bounds: 296 8 8 8
+ - image: solid-color(38, 1, 0, 255, 8, 8)
+ bounds: 304 8 8 8
+ - image: solid-color(39, 1, 0, 255, 8, 8)
+ bounds: 312 8 8 8
+ - image: solid-color(40, 1, 0, 255, 8, 8)
+ bounds: 320 8 8 8
+ - image: solid-color(41, 1, 0, 255, 8, 8)
+ bounds: 328 8 8 8
+ - image: solid-color(42, 1, 0, 255, 8, 8)
+ bounds: 336 8 8 8
+ - image: solid-color(43, 1, 0, 255, 8, 8)
+ bounds: 344 8 8 8
+ - image: solid-color(44, 1, 0, 255, 8, 8)
+ bounds: 352 8 8 8
+ - image: solid-color(45, 1, 0, 255, 8, 8)
+ bounds: 360 8 8 8
+ - image: solid-color(46, 1, 0, 255, 8, 8)
+ bounds: 368 8 8 8
+ - image: solid-color(47, 1, 0, 255, 8, 8)
+ bounds: 376 8 8 8
+ - image: solid-color(48, 1, 0, 255, 8, 8)
+ bounds: 384 8 8 8
+ - image: solid-color(49, 1, 0, 255, 8, 8)
+ bounds: 392 8 8 8
+ - image: solid-color(50, 1, 0, 255, 8, 8)
+ bounds: 400 8 8 8
+ - image: solid-color(51, 1, 0, 255, 8, 8)
+ bounds: 408 8 8 8
+ - image: solid-color(52, 1, 0, 255, 8, 8)
+ bounds: 416 8 8 8
+ - image: solid-color(53, 1, 0, 255, 8, 8)
+ bounds: 424 8 8 8
+ - image: solid-color(54, 1, 0, 255, 8, 8)
+ bounds: 432 8 8 8
+ - image: solid-color(55, 1, 0, 255, 8, 8)
+ bounds: 440 8 8 8
+ - image: solid-color(56, 1, 0, 255, 8, 8)
+ bounds: 448 8 8 8
+ - image: solid-color(57, 1, 0, 255, 8, 8)
+ bounds: 456 8 8 8
+ - image: solid-color(58, 1, 0, 255, 8, 8)
+ bounds: 464 8 8 8
+ - image: solid-color(59, 1, 0, 255, 8, 8)
+ bounds: 472 8 8 8
+ - image: solid-color(60, 1, 0, 255, 8, 8)
+ bounds: 480 8 8 8
+ - image: solid-color(61, 1, 0, 255, 8, 8)
+ bounds: 488 8 8 8
+ - image: solid-color(62, 1, 0, 255, 8, 8)
+ bounds: 496 8 8 8
+ - image: solid-color(63, 1, 0, 255, 8, 8)
+ bounds: 504 8 8 8
+ - image: solid-color(64, 1, 0, 255, 8, 8)
+ bounds: 512 8 8 8
+ - image: solid-color(65, 1, 0, 255, 8, 8)
+ bounds: 520 8 8 8
+ - image: solid-color(66, 1, 0, 255, 8, 8)
+ bounds: 528 8 8 8
+ - image: solid-color(67, 1, 0, 255, 8, 8)
+ bounds: 536 8 8 8
+ - image: solid-color(68, 1, 0, 255, 8, 8)
+ bounds: 544 8 8 8
+ - image: solid-color(69, 1, 0, 255, 8, 8)
+ bounds: 552 8 8 8
+ - image: solid-color(70, 1, 0, 255, 8, 8)
+ bounds: 560 8 8 8
+ - image: solid-color(71, 1, 0, 255, 8, 8)
+ bounds: 568 8 8 8
+ - image: solid-color(72, 1, 0, 255, 8, 8)
+ bounds: 576 8 8 8
+ - image: solid-color(73, 1, 0, 255, 8, 8)
+ bounds: 584 8 8 8
+ - image: solid-color(74, 1, 0, 255, 8, 8)
+ bounds: 592 8 8 8
+ - image: solid-color(75, 1, 0, 255, 8, 8)
+ bounds: 600 8 8 8
+ - image: solid-color(76, 1, 0, 255, 8, 8)
+ bounds: 608 8 8 8
+ - image: solid-color(77, 1, 0, 255, 8, 8)
+ bounds: 616 8 8 8
+ - image: solid-color(78, 1, 0, 255, 8, 8)
+ bounds: 624 8 8 8
+ - image: solid-color(79, 1, 0, 255, 8, 8)
+ bounds: 632 8 8 8
+ - image: solid-color(80, 1, 0, 255, 8, 8)
+ bounds: 640 8 8 8
+ - image: solid-color(81, 1, 0, 255, 8, 8)
+ bounds: 648 8 8 8
+ - image: solid-color(82, 1, 0, 255, 8, 8)
+ bounds: 656 8 8 8
+ - image: solid-color(83, 1, 0, 255, 8, 8)
+ bounds: 664 8 8 8
+ - image: solid-color(84, 1, 0, 255, 8, 8)
+ bounds: 672 8 8 8
+ - image: solid-color(85, 1, 0, 255, 8, 8)
+ bounds: 680 8 8 8
+ - image: solid-color(86, 1, 0, 255, 8, 8)
+ bounds: 688 8 8 8
+ - image: solid-color(87, 1, 0, 255, 8, 8)
+ bounds: 696 8 8 8
+ - image: solid-color(88, 1, 0, 255, 8, 8)
+ bounds: 704 8 8 8
+ - image: solid-color(89, 1, 0, 255, 8, 8)
+ bounds: 712 8 8 8
+ - image: solid-color(90, 1, 0, 255, 8, 8)
+ bounds: 720 8 8 8
+ - image: solid-color(91, 1, 0, 255, 8, 8)
+ bounds: 728 8 8 8
+ - image: solid-color(92, 1, 0, 255, 8, 8)
+ bounds: 736 8 8 8
+ - image: solid-color(93, 1, 0, 255, 8, 8)
+ bounds: 744 8 8 8
+ - image: solid-color(94, 1, 0, 255, 8, 8)
+ bounds: 752 8 8 8
+ - image: solid-color(95, 1, 0, 255, 8, 8)
+ bounds: 760 8 8 8
+ - image: solid-color(96, 1, 0, 255, 8, 8)
+ bounds: 768 8 8 8
+ - image: solid-color(97, 1, 0, 255, 8, 8)
+ bounds: 776 8 8 8
+ - image: solid-color(98, 1, 0, 255, 8, 8)
+ bounds: 784 8 8 8
+ - image: solid-color(99, 1, 0, 255, 8, 8)
+ bounds: 792 8 8 8
+ - image: solid-color(100, 1, 0, 255, 8, 8)
+ bounds: 800 8 8 8
+ - image: solid-color(101, 1, 0, 255, 8, 8)
+ bounds: 808 8 8 8
+ - image: solid-color(102, 1, 0, 255, 8, 8)
+ bounds: 816 8 8 8
+ - image: solid-color(103, 1, 0, 255, 8, 8)
+ bounds: 824 8 8 8
+ - image: solid-color(104, 1, 0, 255, 8, 8)
+ bounds: 832 8 8 8
+ - image: solid-color(105, 1, 0, 255, 8, 8)
+ bounds: 840 8 8 8
+ - image: solid-color(106, 1, 0, 255, 8, 8)
+ bounds: 848 8 8 8
+ - image: solid-color(107, 1, 0, 255, 8, 8)
+ bounds: 856 8 8 8
+ - image: solid-color(108, 1, 0, 255, 8, 8)
+ bounds: 864 8 8 8
+ - image: solid-color(109, 1, 0, 255, 8, 8)
+ bounds: 872 8 8 8
+ - image: solid-color(110, 1, 0, 255, 8, 8)
+ bounds: 880 8 8 8
+ - image: solid-color(111, 1, 0, 255, 8, 8)
+ bounds: 888 8 8 8
+ - image: solid-color(112, 1, 0, 255, 8, 8)
+ bounds: 896 8 8 8
+ - image: solid-color(113, 1, 0, 255, 8, 8)
+ bounds: 904 8 8 8
+ - image: solid-color(114, 1, 0, 255, 8, 8)
+ bounds: 912 8 8 8
+ - image: solid-color(115, 1, 0, 255, 8, 8)
+ bounds: 920 8 8 8
+ - image: solid-color(116, 1, 0, 255, 8, 8)
+ bounds: 928 8 8 8
+ - image: solid-color(117, 1, 0, 255, 8, 8)
+ bounds: 936 8 8 8
+ - image: solid-color(118, 1, 0, 255, 8, 8)
+ bounds: 944 8 8 8
+ - image: solid-color(119, 1, 0, 255, 8, 8)
+ bounds: 952 8 8 8
+ - image: solid-color(120, 1, 0, 255, 8, 8)
+ bounds: 960 8 8 8
+ - image: solid-color(121, 1, 0, 255, 8, 8)
+ bounds: 968 8 8 8
+ - image: solid-color(122, 1, 0, 255, 8, 8)
+ bounds: 976 8 8 8
+ - image: solid-color(123, 1, 0, 255, 8, 8)
+ bounds: 984 8 8 8
+ - image: solid-color(124, 1, 0, 255, 8, 8)
+ bounds: 992 8 8 8
+ - image: solid-color(125, 1, 0, 255, 8, 8)
+ bounds: 1000 8 8 8
+ - image: solid-color(126, 1, 0, 255, 8, 8)
+ bounds: 1008 8 8 8
+ - image: solid-color(127, 1, 0, 255, 8, 8)
+ bounds: 1016 8 8 8
+ - image: solid-color(0, 2, 0, 255, 8, 8)
+ bounds: 0 16 8 8
+ - image: solid-color(1, 2, 0, 255, 8, 8)
+ bounds: 8 16 8 8
+ - image: solid-color(2, 2, 0, 255, 8, 8)
+ bounds: 16 16 8 8
+ - image: solid-color(3, 2, 0, 255, 8, 8)
+ bounds: 24 16 8 8
+ - image: solid-color(4, 2, 0, 255, 8, 8)
+ bounds: 32 16 8 8
+ - image: solid-color(5, 2, 0, 255, 8, 8)
+ bounds: 40 16 8 8
+ - image: solid-color(6, 2, 0, 255, 8, 8)
+ bounds: 48 16 8 8
+ - image: solid-color(7, 2, 0, 255, 8, 8)
+ bounds: 56 16 8 8
+ - image: solid-color(8, 2, 0, 255, 8, 8)
+ bounds: 64 16 8 8
+ - image: solid-color(9, 2, 0, 255, 8, 8)
+ bounds: 72 16 8 8
+ - image: solid-color(10, 2, 0, 255, 8, 8)
+ bounds: 80 16 8 8
+ - image: solid-color(11, 2, 0, 255, 8, 8)
+ bounds: 88 16 8 8
+ - image: solid-color(12, 2, 0, 255, 8, 8)
+ bounds: 96 16 8 8
+ - image: solid-color(13, 2, 0, 255, 8, 8)
+ bounds: 104 16 8 8
+ - image: solid-color(14, 2, 0, 255, 8, 8)
+ bounds: 112 16 8 8
+ - image: solid-color(15, 2, 0, 255, 8, 8)
+ bounds: 120 16 8 8
+ - image: solid-color(16, 2, 0, 255, 8, 8)
+ bounds: 128 16 8 8
+ - image: solid-color(17, 2, 0, 255, 8, 8)
+ bounds: 136 16 8 8
+ - image: solid-color(18, 2, 0, 255, 8, 8)
+ bounds: 144 16 8 8
+ - image: solid-color(19, 2, 0, 255, 8, 8)
+ bounds: 152 16 8 8
+ - image: solid-color(20, 2, 0, 255, 8, 8)
+ bounds: 160 16 8 8
+ - image: solid-color(21, 2, 0, 255, 8, 8)
+ bounds: 168 16 8 8
+ - image: solid-color(22, 2, 0, 255, 8, 8)
+ bounds: 176 16 8 8
+ - image: solid-color(23, 2, 0, 255, 8, 8)
+ bounds: 184 16 8 8
+ - image: solid-color(24, 2, 0, 255, 8, 8)
+ bounds: 192 16 8 8
+ - image: solid-color(25, 2, 0, 255, 8, 8)
+ bounds: 200 16 8 8
+ - image: solid-color(26, 2, 0, 255, 8, 8)
+ bounds: 208 16 8 8
+ - image: solid-color(27, 2, 0, 255, 8, 8)
+ bounds: 216 16 8 8
+ - image: solid-color(28, 2, 0, 255, 8, 8)
+ bounds: 224 16 8 8
+ - image: solid-color(29, 2, 0, 255, 8, 8)
+ bounds: 232 16 8 8
+ - image: solid-color(30, 2, 0, 255, 8, 8)
+ bounds: 240 16 8 8
+ - image: solid-color(31, 2, 0, 255, 8, 8)
+ bounds: 248 16 8 8
+ - image: solid-color(32, 2, 0, 255, 8, 8)
+ bounds: 256 16 8 8
+ - image: solid-color(33, 2, 0, 255, 8, 8)
+ bounds: 264 16 8 8
+ - image: solid-color(34, 2, 0, 255, 8, 8)
+ bounds: 272 16 8 8
+ - image: solid-color(35, 2, 0, 255, 8, 8)
+ bounds: 280 16 8 8
+ - image: solid-color(36, 2, 0, 255, 8, 8)
+ bounds: 288 16 8 8
+ - image: solid-color(37, 2, 0, 255, 8, 8)
+ bounds: 296 16 8 8
+ - image: solid-color(38, 2, 0, 255, 8, 8)
+ bounds: 304 16 8 8
+ - image: solid-color(39, 2, 0, 255, 8, 8)
+ bounds: 312 16 8 8
+ - image: solid-color(40, 2, 0, 255, 8, 8)
+ bounds: 320 16 8 8
+ - image: solid-color(41, 2, 0, 255, 8, 8)
+ bounds: 328 16 8 8
+ - image: solid-color(42, 2, 0, 255, 8, 8)
+ bounds: 336 16 8 8
+ - image: solid-color(43, 2, 0, 255, 8, 8)
+ bounds: 344 16 8 8
+ - image: solid-color(44, 2, 0, 255, 8, 8)
+ bounds: 352 16 8 8
+ - image: solid-color(45, 2, 0, 255, 8, 8)
+ bounds: 360 16 8 8
+ - image: solid-color(46, 2, 0, 255, 8, 8)
+ bounds: 368 16 8 8
+ - image: solid-color(47, 2, 0, 255, 8, 8)
+ bounds: 376 16 8 8
+ - image: solid-color(48, 2, 0, 255, 8, 8)
+ bounds: 384 16 8 8
+ - image: solid-color(49, 2, 0, 255, 8, 8)
+ bounds: 392 16 8 8
+ - image: solid-color(50, 2, 0, 255, 8, 8)
+ bounds: 400 16 8 8
+ - image: solid-color(51, 2, 0, 255, 8, 8)
+ bounds: 408 16 8 8
+ - image: solid-color(52, 2, 0, 255, 8, 8)
+ bounds: 416 16 8 8
+ - image: solid-color(53, 2, 0, 255, 8, 8)
+ bounds: 424 16 8 8
+ - image: solid-color(54, 2, 0, 255, 8, 8)
+ bounds: 432 16 8 8
+ - image: solid-color(55, 2, 0, 255, 8, 8)
+ bounds: 440 16 8 8
+ - image: solid-color(56, 2, 0, 255, 8, 8)
+ bounds: 448 16 8 8
+ - image: solid-color(57, 2, 0, 255, 8, 8)
+ bounds: 456 16 8 8
+ - image: solid-color(58, 2, 0, 255, 8, 8)
+ bounds: 464 16 8 8
+ - image: solid-color(59, 2, 0, 255, 8, 8)
+ bounds: 472 16 8 8
+ - image: solid-color(60, 2, 0, 255, 8, 8)
+ bounds: 480 16 8 8
+ - image: solid-color(61, 2, 0, 255, 8, 8)
+ bounds: 488 16 8 8
+ - image: solid-color(62, 2, 0, 255, 8, 8)
+ bounds: 496 16 8 8
+ - image: solid-color(63, 2, 0, 255, 8, 8)
+ bounds: 504 16 8 8
+ - image: solid-color(64, 2, 0, 255, 8, 8)
+ bounds: 512 16 8 8
+ - image: solid-color(65, 2, 0, 255, 8, 8)
+ bounds: 520 16 8 8
+ - image: solid-color(66, 2, 0, 255, 8, 8)
+ bounds: 528 16 8 8
+ - image: solid-color(67, 2, 0, 255, 8, 8)
+ bounds: 536 16 8 8
+ - image: solid-color(68, 2, 0, 255, 8, 8)
+ bounds: 544 16 8 8
+ - image: solid-color(69, 2, 0, 255, 8, 8)
+ bounds: 552 16 8 8
+ - image: solid-color(70, 2, 0, 255, 8, 8)
+ bounds: 560 16 8 8
+ - image: solid-color(71, 2, 0, 255, 8, 8)
+ bounds: 568 16 8 8
+ - image: solid-color(72, 2, 0, 255, 8, 8)
+ bounds: 576 16 8 8
+ - image: solid-color(73, 2, 0, 255, 8, 8)
+ bounds: 584 16 8 8
+ - image: solid-color(74, 2, 0, 255, 8, 8)
+ bounds: 592 16 8 8
+ - image: solid-color(75, 2, 0, 255, 8, 8)
+ bounds: 600 16 8 8
+ - image: solid-color(76, 2, 0, 255, 8, 8)
+ bounds: 608 16 8 8
+ - image: solid-color(77, 2, 0, 255, 8, 8)
+ bounds: 616 16 8 8
+ - image: solid-color(78, 2, 0, 255, 8, 8)
+ bounds: 624 16 8 8
+ - image: solid-color(79, 2, 0, 255, 8, 8)
+ bounds: 632 16 8 8
+ - image: solid-color(80, 2, 0, 255, 8, 8)
+ bounds: 640 16 8 8
+ - image: solid-color(81, 2, 0, 255, 8, 8)
+ bounds: 648 16 8 8
+ - image: solid-color(82, 2, 0, 255, 8, 8)
+ bounds: 656 16 8 8
+ - image: solid-color(83, 2, 0, 255, 8, 8)
+ bounds: 664 16 8 8
+ - image: solid-color(84, 2, 0, 255, 8, 8)
+ bounds: 672 16 8 8
+ - image: solid-color(85, 2, 0, 255, 8, 8)
+ bounds: 680 16 8 8
+ - image: solid-color(86, 2, 0, 255, 8, 8)
+ bounds: 688 16 8 8
+ - image: solid-color(87, 2, 0, 255, 8, 8)
+ bounds: 696 16 8 8
+ - image: solid-color(88, 2, 0, 255, 8, 8)
+ bounds: 704 16 8 8
+ - image: solid-color(89, 2, 0, 255, 8, 8)
+ bounds: 712 16 8 8
+ - image: solid-color(90, 2, 0, 255, 8, 8)
+ bounds: 720 16 8 8
+ - image: solid-color(91, 2, 0, 255, 8, 8)
+ bounds: 728 16 8 8
+ - image: solid-color(92, 2, 0, 255, 8, 8)
+ bounds: 736 16 8 8
+ - image: solid-color(93, 2, 0, 255, 8, 8)
+ bounds: 744 16 8 8
+ - image: solid-color(94, 2, 0, 255, 8, 8)
+ bounds: 752 16 8 8
+ - image: solid-color(95, 2, 0, 255, 8, 8)
+ bounds: 760 16 8 8
+ - image: solid-color(96, 2, 0, 255, 8, 8)
+ bounds: 768 16 8 8
+ - image: solid-color(97, 2, 0, 255, 8, 8)
+ bounds: 776 16 8 8
+ - image: solid-color(98, 2, 0, 255, 8, 8)
+ bounds: 784 16 8 8
+ - image: solid-color(99, 2, 0, 255, 8, 8)
+ bounds: 792 16 8 8
+ - image: solid-color(100, 2, 0, 255, 8, 8)
+ bounds: 800 16 8 8
+ - image: solid-color(101, 2, 0, 255, 8, 8)
+ bounds: 808 16 8 8
+ - image: solid-color(102, 2, 0, 255, 8, 8)
+ bounds: 816 16 8 8
+ - image: solid-color(103, 2, 0, 255, 8, 8)
+ bounds: 824 16 8 8
+ - image: solid-color(104, 2, 0, 255, 8, 8)
+ bounds: 832 16 8 8
+ - image: solid-color(105, 2, 0, 255, 8, 8)
+ bounds: 840 16 8 8
+ - image: solid-color(106, 2, 0, 255, 8, 8)
+ bounds: 848 16 8 8
+ - image: solid-color(107, 2, 0, 255, 8, 8)
+ bounds: 856 16 8 8
+ - image: solid-color(108, 2, 0, 255, 8, 8)
+ bounds: 864 16 8 8
+ - image: solid-color(109, 2, 0, 255, 8, 8)
+ bounds: 872 16 8 8
+ - image: solid-color(110, 2, 0, 255, 8, 8)
+ bounds: 880 16 8 8
+ - image: solid-color(111, 2, 0, 255, 8, 8)
+ bounds: 888 16 8 8
+ - image: solid-color(112, 2, 0, 255, 8, 8)
+ bounds: 896 16 8 8
+ - image: solid-color(113, 2, 0, 255, 8, 8)
+ bounds: 904 16 8 8
+ - image: solid-color(114, 2, 0, 255, 8, 8)
+ bounds: 912 16 8 8
+ - image: solid-color(115, 2, 0, 255, 8, 8)
+ bounds: 920 16 8 8
+ - image: solid-color(116, 2, 0, 255, 8, 8)
+ bounds: 928 16 8 8
+ - image: solid-color(117, 2, 0, 255, 8, 8)
+ bounds: 936 16 8 8
+ - image: solid-color(118, 2, 0, 255, 8, 8)
+ bounds: 944 16 8 8
+ - image: solid-color(119, 2, 0, 255, 8, 8)
+ bounds: 952 16 8 8
+ - image: solid-color(120, 2, 0, 255, 8, 8)
+ bounds: 960 16 8 8
+ - image: solid-color(121, 2, 0, 255, 8, 8)
+ bounds: 968 16 8 8
+ - image: solid-color(122, 2, 0, 255, 8, 8)
+ bounds: 976 16 8 8
+ - image: solid-color(123, 2, 0, 255, 8, 8)
+ bounds: 984 16 8 8
+ - image: solid-color(124, 2, 0, 255, 8, 8)
+ bounds: 992 16 8 8
+ - image: solid-color(125, 2, 0, 255, 8, 8)
+ bounds: 1000 16 8 8
+ - image: solid-color(126, 2, 0, 255, 8, 8)
+ bounds: 1008 16 8 8
+ - image: solid-color(127, 2, 0, 255, 8, 8)
+ bounds: 1016 16 8 8
+ - image: solid-color(0, 3, 0, 255, 8, 8)
+ bounds: 0 24 8 8
+ - image: solid-color(1, 3, 0, 255, 8, 8)
+ bounds: 8 24 8 8
+ - image: solid-color(2, 3, 0, 255, 8, 8)
+ bounds: 16 24 8 8
+ - image: solid-color(3, 3, 0, 255, 8, 8)
+ bounds: 24 24 8 8
+ - image: solid-color(4, 3, 0, 255, 8, 8)
+ bounds: 32 24 8 8
+ - image: solid-color(5, 3, 0, 255, 8, 8)
+ bounds: 40 24 8 8
+ - image: solid-color(6, 3, 0, 255, 8, 8)
+ bounds: 48 24 8 8
+ - image: solid-color(7, 3, 0, 255, 8, 8)
+ bounds: 56 24 8 8
+ - image: solid-color(8, 3, 0, 255, 8, 8)
+ bounds: 64 24 8 8
+ - image: solid-color(9, 3, 0, 255, 8, 8)
+ bounds: 72 24 8 8
+ - image: solid-color(10, 3, 0, 255, 8, 8)
+ bounds: 80 24 8 8
+ - image: solid-color(11, 3, 0, 255, 8, 8)
+ bounds: 88 24 8 8
+ - image: solid-color(12, 3, 0, 255, 8, 8)
+ bounds: 96 24 8 8
+ - image: solid-color(13, 3, 0, 255, 8, 8)
+ bounds: 104 24 8 8
+ - image: solid-color(14, 3, 0, 255, 8, 8)
+ bounds: 112 24 8 8
+ - image: solid-color(15, 3, 0, 255, 8, 8)
+ bounds: 120 24 8 8
+ - image: solid-color(16, 3, 0, 255, 8, 8)
+ bounds: 128 24 8 8
+ - image: solid-color(17, 3, 0, 255, 8, 8)
+ bounds: 136 24 8 8
+ - image: solid-color(18, 3, 0, 255, 8, 8)
+ bounds: 144 24 8 8
+ - image: solid-color(19, 3, 0, 255, 8, 8)
+ bounds: 152 24 8 8
+ - image: solid-color(20, 3, 0, 255, 8, 8)
+ bounds: 160 24 8 8
+ - image: solid-color(21, 3, 0, 255, 8, 8)
+ bounds: 168 24 8 8
+ - image: solid-color(22, 3, 0, 255, 8, 8)
+ bounds: 176 24 8 8
+ - image: solid-color(23, 3, 0, 255, 8, 8)
+ bounds: 184 24 8 8
+ - image: solid-color(24, 3, 0, 255, 8, 8)
+ bounds: 192 24 8 8
+ - image: solid-color(25, 3, 0, 255, 8, 8)
+ bounds: 200 24 8 8
+ - image: solid-color(26, 3, 0, 255, 8, 8)
+ bounds: 208 24 8 8
+ - image: solid-color(27, 3, 0, 255, 8, 8)
+ bounds: 216 24 8 8
+ - image: solid-color(28, 3, 0, 255, 8, 8)
+ bounds: 224 24 8 8
+ - image: solid-color(29, 3, 0, 255, 8, 8)
+ bounds: 232 24 8 8
+ - image: solid-color(30, 3, 0, 255, 8, 8)
+ bounds: 240 24 8 8
+ - image: solid-color(31, 3, 0, 255, 8, 8)
+ bounds: 248 24 8 8
+ - image: solid-color(32, 3, 0, 255, 8, 8)
+ bounds: 256 24 8 8
+ - image: solid-color(33, 3, 0, 255, 8, 8)
+ bounds: 264 24 8 8
+ - image: solid-color(34, 3, 0, 255, 8, 8)
+ bounds: 272 24 8 8
+ - image: solid-color(35, 3, 0, 255, 8, 8)
+ bounds: 280 24 8 8
+ - image: solid-color(36, 3, 0, 255, 8, 8)
+ bounds: 288 24 8 8
+ - image: solid-color(37, 3, 0, 255, 8, 8)
+ bounds: 296 24 8 8
+ - image: solid-color(38, 3, 0, 255, 8, 8)
+ bounds: 304 24 8 8
+ - image: solid-color(39, 3, 0, 255, 8, 8)
+ bounds: 312 24 8 8
+ - image: solid-color(40, 3, 0, 255, 8, 8)
+ bounds: 320 24 8 8
+ - image: solid-color(41, 3, 0, 255, 8, 8)
+ bounds: 328 24 8 8
+ - image: solid-color(42, 3, 0, 255, 8, 8)
+ bounds: 336 24 8 8
+ - image: solid-color(43, 3, 0, 255, 8, 8)
+ bounds: 344 24 8 8
+ - image: solid-color(44, 3, 0, 255, 8, 8)
+ bounds: 352 24 8 8
+ - image: solid-color(45, 3, 0, 255, 8, 8)
+ bounds: 360 24 8 8
+ - image: solid-color(46, 3, 0, 255, 8, 8)
+ bounds: 368 24 8 8
+ - image: solid-color(47, 3, 0, 255, 8, 8)
+ bounds: 376 24 8 8
+ - image: solid-color(48, 3, 0, 255, 8, 8)
+ bounds: 384 24 8 8
+ - image: solid-color(49, 3, 0, 255, 8, 8)
+ bounds: 392 24 8 8
+ - image: solid-color(50, 3, 0, 255, 8, 8)
+ bounds: 400 24 8 8
+ - image: solid-color(51, 3, 0, 255, 8, 8)
+ bounds: 408 24 8 8
+ - image: solid-color(52, 3, 0, 255, 8, 8)
+ bounds: 416 24 8 8
+ - image: solid-color(53, 3, 0, 255, 8, 8)
+ bounds: 424 24 8 8
+ - image: solid-color(54, 3, 0, 255, 8, 8)
+ bounds: 432 24 8 8
+ - image: solid-color(55, 3, 0, 255, 8, 8)
+ bounds: 440 24 8 8
+ - image: solid-color(56, 3, 0, 255, 8, 8)
+ bounds: 448 24 8 8
+ - image: solid-color(57, 3, 0, 255, 8, 8)
+ bounds: 456 24 8 8
+ - image: solid-color(58, 3, 0, 255, 8, 8)
+ bounds: 464 24 8 8
+ - image: solid-color(59, 3, 0, 255, 8, 8)
+ bounds: 472 24 8 8
+ - image: solid-color(60, 3, 0, 255, 8, 8)
+ bounds: 480 24 8 8
+ - image: solid-color(61, 3, 0, 255, 8, 8)
+ bounds: 488 24 8 8
+ - image: solid-color(62, 3, 0, 255, 8, 8)
+ bounds: 496 24 8 8
+ - image: solid-color(63, 3, 0, 255, 8, 8)
+ bounds: 504 24 8 8
+ - image: solid-color(64, 3, 0, 255, 8, 8)
+ bounds: 512 24 8 8
+ - image: solid-color(65, 3, 0, 255, 8, 8)
+ bounds: 520 24 8 8
+ - image: solid-color(66, 3, 0, 255, 8, 8)
+ bounds: 528 24 8 8
+ - image: solid-color(67, 3, 0, 255, 8, 8)
+ bounds: 536 24 8 8
+ - image: solid-color(68, 3, 0, 255, 8, 8)
+ bounds: 544 24 8 8
+ - image: solid-color(69, 3, 0, 255, 8, 8)
+ bounds: 552 24 8 8
+ - image: solid-color(70, 3, 0, 255, 8, 8)
+ bounds: 560 24 8 8
+ - image: solid-color(71, 3, 0, 255, 8, 8)
+ bounds: 568 24 8 8
+ - image: solid-color(72, 3, 0, 255, 8, 8)
+ bounds: 576 24 8 8
+ - image: solid-color(73, 3, 0, 255, 8, 8)
+ bounds: 584 24 8 8
+ - image: solid-color(74, 3, 0, 255, 8, 8)
+ bounds: 592 24 8 8
+ - image: solid-color(75, 3, 0, 255, 8, 8)
+ bounds: 600 24 8 8
+ - image: solid-color(76, 3, 0, 255, 8, 8)
+ bounds: 608 24 8 8
+ - image: solid-color(77, 3, 0, 255, 8, 8)
+ bounds: 616 24 8 8
+ - image: solid-color(78, 3, 0, 255, 8, 8)
+ bounds: 624 24 8 8
+ - image: solid-color(79, 3, 0, 255, 8, 8)
+ bounds: 632 24 8 8
+ - image: solid-color(80, 3, 0, 255, 8, 8)
+ bounds: 640 24 8 8
+ - image: solid-color(81, 3, 0, 255, 8, 8)
+ bounds: 648 24 8 8
+ - image: solid-color(82, 3, 0, 255, 8, 8)
+ bounds: 656 24 8 8
+ - image: solid-color(83, 3, 0, 255, 8, 8)
+ bounds: 664 24 8 8
+ - image: solid-color(84, 3, 0, 255, 8, 8)
+ bounds: 672 24 8 8
+ - image: solid-color(85, 3, 0, 255, 8, 8)
+ bounds: 680 24 8 8
+ - image: solid-color(86, 3, 0, 255, 8, 8)
+ bounds: 688 24 8 8
+ - image: solid-color(87, 3, 0, 255, 8, 8)
+ bounds: 696 24 8 8
+ - image: solid-color(88, 3, 0, 255, 8, 8)
+ bounds: 704 24 8 8
+ - image: solid-color(89, 3, 0, 255, 8, 8)
+ bounds: 712 24 8 8
+ - image: solid-color(90, 3, 0, 255, 8, 8)
+ bounds: 720 24 8 8
+ - image: solid-color(91, 3, 0, 255, 8, 8)
+ bounds: 728 24 8 8
+ - image: solid-color(92, 3, 0, 255, 8, 8)
+ bounds: 736 24 8 8
+ - image: solid-color(93, 3, 0, 255, 8, 8)
+ bounds: 744 24 8 8
+ - image: solid-color(94, 3, 0, 255, 8, 8)
+ bounds: 752 24 8 8
+ - image: solid-color(95, 3, 0, 255, 8, 8)
+ bounds: 760 24 8 8
+ - image: solid-color(96, 3, 0, 255, 8, 8)
+ bounds: 768 24 8 8
+ - image: solid-color(97, 3, 0, 255, 8, 8)
+ bounds: 776 24 8 8
+ - image: solid-color(98, 3, 0, 255, 8, 8)
+ bounds: 784 24 8 8
+ - image: solid-color(99, 3, 0, 255, 8, 8)
+ bounds: 792 24 8 8
+ - image: solid-color(100, 3, 0, 255, 8, 8)
+ bounds: 800 24 8 8
+ - image: solid-color(101, 3, 0, 255, 8, 8)
+ bounds: 808 24 8 8
+ - image: solid-color(102, 3, 0, 255, 8, 8)
+ bounds: 816 24 8 8
+ - image: solid-color(103, 3, 0, 255, 8, 8)
+ bounds: 824 24 8 8
+ - image: solid-color(104, 3, 0, 255, 8, 8)
+ bounds: 832 24 8 8
+ - image: solid-color(105, 3, 0, 255, 8, 8)
+ bounds: 840 24 8 8
+ - image: solid-color(106, 3, 0, 255, 8, 8)
+ bounds: 848 24 8 8
+ - image: solid-color(107, 3, 0, 255, 8, 8)
+ bounds: 856 24 8 8
+ - image: solid-color(108, 3, 0, 255, 8, 8)
+ bounds: 864 24 8 8
+ - image: solid-color(109, 3, 0, 255, 8, 8)
+ bounds: 872 24 8 8
+ - image: solid-color(110, 3, 0, 255, 8, 8)
+ bounds: 880 24 8 8
+ - image: solid-color(111, 3, 0, 255, 8, 8)
+ bounds: 888 24 8 8
+ - image: solid-color(112, 3, 0, 255, 8, 8)
+ bounds: 896 24 8 8
+ - image: solid-color(113, 3, 0, 255, 8, 8)
+ bounds: 904 24 8 8
+ - image: solid-color(114, 3, 0, 255, 8, 8)
+ bounds: 912 24 8 8
+ - image: solid-color(115, 3, 0, 255, 8, 8)
+ bounds: 920 24 8 8
+ - image: solid-color(116, 3, 0, 255, 8, 8)
+ bounds: 928 24 8 8
+ - image: solid-color(117, 3, 0, 255, 8, 8)
+ bounds: 936 24 8 8
+ - image: solid-color(118, 3, 0, 255, 8, 8)
+ bounds: 944 24 8 8
+ - image: solid-color(119, 3, 0, 255, 8, 8)
+ bounds: 952 24 8 8
+ - image: solid-color(120, 3, 0, 255, 8, 8)
+ bounds: 960 24 8 8
+ - image: solid-color(121, 3, 0, 255, 8, 8)
+ bounds: 968 24 8 8
+ - image: solid-color(122, 3, 0, 255, 8, 8)
+ bounds: 976 24 8 8
+ - image: solid-color(123, 3, 0, 255, 8, 8)
+ bounds: 984 24 8 8
+ - image: solid-color(124, 3, 0, 255, 8, 8)
+ bounds: 992 24 8 8
+ - image: solid-color(125, 3, 0, 255, 8, 8)
+ bounds: 1000 24 8 8
+ - image: solid-color(126, 3, 0, 255, 8, 8)
+ bounds: 1008 24 8 8
+ - image: solid-color(127, 3, 0, 255, 8, 8)
+ bounds: 1016 24 8 8
+ - image: solid-color(0, 4, 0, 255, 8, 8)
+ bounds: 0 32 8 8
+ - image: solid-color(1, 4, 0, 255, 8, 8)
+ bounds: 8 32 8 8
+ - image: solid-color(2, 4, 0, 255, 8, 8)
+ bounds: 16 32 8 8
+ - image: solid-color(3, 4, 0, 255, 8, 8)
+ bounds: 24 32 8 8
+ - image: solid-color(4, 4, 0, 255, 8, 8)
+ bounds: 32 32 8 8
+ - image: solid-color(5, 4, 0, 255, 8, 8)
+ bounds: 40 32 8 8
+ - image: solid-color(6, 4, 0, 255, 8, 8)
+ bounds: 48 32 8 8
+ - image: solid-color(7, 4, 0, 255, 8, 8)
+ bounds: 56 32 8 8
+ - image: solid-color(8, 4, 0, 255, 8, 8)
+ bounds: 64 32 8 8
+ - image: solid-color(9, 4, 0, 255, 8, 8)
+ bounds: 72 32 8 8
+ - image: solid-color(10, 4, 0, 255, 8, 8)
+ bounds: 80 32 8 8
+ - image: solid-color(11, 4, 0, 255, 8, 8)
+ bounds: 88 32 8 8
+ - image: solid-color(12, 4, 0, 255, 8, 8)
+ bounds: 96 32 8 8
+ - image: solid-color(13, 4, 0, 255, 8, 8)
+ bounds: 104 32 8 8
+ - image: solid-color(14, 4, 0, 255, 8, 8)
+ bounds: 112 32 8 8
+ - image: solid-color(15, 4, 0, 255, 8, 8)
+ bounds: 120 32 8 8
+ - image: solid-color(16, 4, 0, 255, 8, 8)
+ bounds: 128 32 8 8
+ - image: solid-color(17, 4, 0, 255, 8, 8)
+ bounds: 136 32 8 8
+ - image: solid-color(18, 4, 0, 255, 8, 8)
+ bounds: 144 32 8 8
+ - image: solid-color(19, 4, 0, 255, 8, 8)
+ bounds: 152 32 8 8
+ - image: solid-color(20, 4, 0, 255, 8, 8)
+ bounds: 160 32 8 8
+ - image: solid-color(21, 4, 0, 255, 8, 8)
+ bounds: 168 32 8 8
+ - image: solid-color(22, 4, 0, 255, 8, 8)
+ bounds: 176 32 8 8
+ - image: solid-color(23, 4, 0, 255, 8, 8)
+ bounds: 184 32 8 8
+ - image: solid-color(24, 4, 0, 255, 8, 8)
+ bounds: 192 32 8 8
+ - image: solid-color(25, 4, 0, 255, 8, 8)
+ bounds: 200 32 8 8
+ - image: solid-color(26, 4, 0, 255, 8, 8)
+ bounds: 208 32 8 8
+ - image: solid-color(27, 4, 0, 255, 8, 8)
+ bounds: 216 32 8 8
+ - image: solid-color(28, 4, 0, 255, 8, 8)
+ bounds: 224 32 8 8
+ - image: solid-color(29, 4, 0, 255, 8, 8)
+ bounds: 232 32 8 8
+ - image: solid-color(30, 4, 0, 255, 8, 8)
+ bounds: 240 32 8 8
+ - image: solid-color(31, 4, 0, 255, 8, 8)
+ bounds: 248 32 8 8
+ - image: solid-color(32, 4, 0, 255, 8, 8)
+ bounds: 256 32 8 8
+ - image: solid-color(33, 4, 0, 255, 8, 8)
+ bounds: 264 32 8 8
+ - image: solid-color(34, 4, 0, 255, 8, 8)
+ bounds: 272 32 8 8
+ - image: solid-color(35, 4, 0, 255, 8, 8)
+ bounds: 280 32 8 8
+ - image: solid-color(36, 4, 0, 255, 8, 8)
+ bounds: 288 32 8 8
+ - image: solid-color(37, 4, 0, 255, 8, 8)
+ bounds: 296 32 8 8
+ - image: solid-color(38, 4, 0, 255, 8, 8)
+ bounds: 304 32 8 8
+ - image: solid-color(39, 4, 0, 255, 8, 8)
+ bounds: 312 32 8 8
+ - image: solid-color(40, 4, 0, 255, 8, 8)
+ bounds: 320 32 8 8
+ - image: solid-color(41, 4, 0, 255, 8, 8)
+ bounds: 328 32 8 8
+ - image: solid-color(42, 4, 0, 255, 8, 8)
+ bounds: 336 32 8 8
+ - image: solid-color(43, 4, 0, 255, 8, 8)
+ bounds: 344 32 8 8
+ - image: solid-color(44, 4, 0, 255, 8, 8)
+ bounds: 352 32 8 8
+ - image: solid-color(45, 4, 0, 255, 8, 8)
+ bounds: 360 32 8 8
+ - image: solid-color(46, 4, 0, 255, 8, 8)
+ bounds: 368 32 8 8
+ - image: solid-color(47, 4, 0, 255, 8, 8)
+ bounds: 376 32 8 8
+ - image: solid-color(48, 4, 0, 255, 8, 8)
+ bounds: 384 32 8 8
+ - image: solid-color(49, 4, 0, 255, 8, 8)
+ bounds: 392 32 8 8
+ - image: solid-color(50, 4, 0, 255, 8, 8)
+ bounds: 400 32 8 8
+ - image: solid-color(51, 4, 0, 255, 8, 8)
+ bounds: 408 32 8 8
+ - image: solid-color(52, 4, 0, 255, 8, 8)
+ bounds: 416 32 8 8
+ - image: solid-color(53, 4, 0, 255, 8, 8)
+ bounds: 424 32 8 8
+ - image: solid-color(54, 4, 0, 255, 8, 8)
+ bounds: 432 32 8 8
+ - image: solid-color(55, 4, 0, 255, 8, 8)
+ bounds: 440 32 8 8
+ - image: solid-color(56, 4, 0, 255, 8, 8)
+ bounds: 448 32 8 8
+ - image: solid-color(57, 4, 0, 255, 8, 8)
+ bounds: 456 32 8 8
+ - image: solid-color(58, 4, 0, 255, 8, 8)
+ bounds: 464 32 8 8
+ - image: solid-color(59, 4, 0, 255, 8, 8)
+ bounds: 472 32 8 8
+ - image: solid-color(60, 4, 0, 255, 8, 8)
+ bounds: 480 32 8 8
+ - image: solid-color(61, 4, 0, 255, 8, 8)
+ bounds: 488 32 8 8
+ - image: solid-color(62, 4, 0, 255, 8, 8)
+ bounds: 496 32 8 8
+ - image: solid-color(63, 4, 0, 255, 8, 8)
+ bounds: 504 32 8 8
+ - image: solid-color(64, 4, 0, 255, 8, 8)
+ bounds: 512 32 8 8
+ - image: solid-color(65, 4, 0, 255, 8, 8)
+ bounds: 520 32 8 8
+ - image: solid-color(66, 4, 0, 255, 8, 8)
+ bounds: 528 32 8 8
+ - image: solid-color(67, 4, 0, 255, 8, 8)
+ bounds: 536 32 8 8
+ - image: solid-color(68, 4, 0, 255, 8, 8)
+ bounds: 544 32 8 8
+ - image: solid-color(69, 4, 0, 255, 8, 8)
+ bounds: 552 32 8 8
+ - image: solid-color(70, 4, 0, 255, 8, 8)
+ bounds: 560 32 8 8
+ - image: solid-color(71, 4, 0, 255, 8, 8)
+ bounds: 568 32 8 8
+ - image: solid-color(72, 4, 0, 255, 8, 8)
+ bounds: 576 32 8 8
+ - image: solid-color(73, 4, 0, 255, 8, 8)
+ bounds: 584 32 8 8
+ - image: solid-color(74, 4, 0, 255, 8, 8)
+ bounds: 592 32 8 8
+ - image: solid-color(75, 4, 0, 255, 8, 8)
+ bounds: 600 32 8 8
+ - image: solid-color(76, 4, 0, 255, 8, 8)
+ bounds: 608 32 8 8
+ - image: solid-color(77, 4, 0, 255, 8, 8)
+ bounds: 616 32 8 8
+ - image: solid-color(78, 4, 0, 255, 8, 8)
+ bounds: 624 32 8 8
+ - image: solid-color(79, 4, 0, 255, 8, 8)
+ bounds: 632 32 8 8
+ - image: solid-color(80, 4, 0, 255, 8, 8)
+ bounds: 640 32 8 8
+ - image: solid-color(81, 4, 0, 255, 8, 8)
+ bounds: 648 32 8 8
+ - image: solid-color(82, 4, 0, 255, 8, 8)
+ bounds: 656 32 8 8
+ - image: solid-color(83, 4, 0, 255, 8, 8)
+ bounds: 664 32 8 8
+ - image: solid-color(84, 4, 0, 255, 8, 8)
+ bounds: 672 32 8 8
+ - image: solid-color(85, 4, 0, 255, 8, 8)
+ bounds: 680 32 8 8
+ - image: solid-color(86, 4, 0, 255, 8, 8)
+ bounds: 688 32 8 8
+ - image: solid-color(87, 4, 0, 255, 8, 8)
+ bounds: 696 32 8 8
+ - image: solid-color(88, 4, 0, 255, 8, 8)
+ bounds: 704 32 8 8
+ - image: solid-color(89, 4, 0, 255, 8, 8)
+ bounds: 712 32 8 8
+ - image: solid-color(90, 4, 0, 255, 8, 8)
+ bounds: 720 32 8 8
+ - image: solid-color(91, 4, 0, 255, 8, 8)
+ bounds: 728 32 8 8
+ - image: solid-color(92, 4, 0, 255, 8, 8)
+ bounds: 736 32 8 8
+ - image: solid-color(93, 4, 0, 255, 8, 8)
+ bounds: 744 32 8 8
+ - image: solid-color(94, 4, 0, 255, 8, 8)
+ bounds: 752 32 8 8
+ - image: solid-color(95, 4, 0, 255, 8, 8)
+ bounds: 760 32 8 8
+ - image: solid-color(96, 4, 0, 255, 8, 8)
+ bounds: 768 32 8 8
+ - image: solid-color(97, 4, 0, 255, 8, 8)
+ bounds: 776 32 8 8
+ - image: solid-color(98, 4, 0, 255, 8, 8)
+ bounds: 784 32 8 8
+ - image: solid-color(99, 4, 0, 255, 8, 8)
+ bounds: 792 32 8 8
+ - image: solid-color(100, 4, 0, 255, 8, 8)
+ bounds: 800 32 8 8
+ - image: solid-color(101, 4, 0, 255, 8, 8)
+ bounds: 808 32 8 8
+ - image: solid-color(102, 4, 0, 255, 8, 8)
+ bounds: 816 32 8 8
+ - image: solid-color(103, 4, 0, 255, 8, 8)
+ bounds: 824 32 8 8
+ - image: solid-color(104, 4, 0, 255, 8, 8)
+ bounds: 832 32 8 8
+ - image: solid-color(105, 4, 0, 255, 8, 8)
+ bounds: 840 32 8 8
+ - image: solid-color(106, 4, 0, 255, 8, 8)
+ bounds: 848 32 8 8
+ - image: solid-color(107, 4, 0, 255, 8, 8)
+ bounds: 856 32 8 8
+ - image: solid-color(108, 4, 0, 255, 8, 8)
+ bounds: 864 32 8 8
+ - image: solid-color(109, 4, 0, 255, 8, 8)
+ bounds: 872 32 8 8
+ - image: solid-color(110, 4, 0, 255, 8, 8)
+ bounds: 880 32 8 8
+ - image: solid-color(111, 4, 0, 255, 8, 8)
+ bounds: 888 32 8 8
+ - image: solid-color(112, 4, 0, 255, 8, 8)
+ bounds: 896 32 8 8
+ - image: solid-color(113, 4, 0, 255, 8, 8)
+ bounds: 904 32 8 8
+ - image: solid-color(114, 4, 0, 255, 8, 8)
+ bounds: 912 32 8 8
+ - image: solid-color(115, 4, 0, 255, 8, 8)
+ bounds: 920 32 8 8
+ - image: solid-color(116, 4, 0, 255, 8, 8)
+ bounds: 928 32 8 8
+ - image: solid-color(117, 4, 0, 255, 8, 8)
+ bounds: 936 32 8 8
+ - image: solid-color(118, 4, 0, 255, 8, 8)
+ bounds: 944 32 8 8
+ - image: solid-color(119, 4, 0, 255, 8, 8)
+ bounds: 952 32 8 8
+ - image: solid-color(120, 4, 0, 255, 8, 8)
+ bounds: 960 32 8 8
+ - image: solid-color(121, 4, 0, 255, 8, 8)
+ bounds: 968 32 8 8
+ - image: solid-color(122, 4, 0, 255, 8, 8)
+ bounds: 976 32 8 8
+ - image: solid-color(123, 4, 0, 255, 8, 8)
+ bounds: 984 32 8 8
+ - image: solid-color(124, 4, 0, 255, 8, 8)
+ bounds: 992 32 8 8
+ - image: solid-color(125, 4, 0, 255, 8, 8)
+ bounds: 1000 32 8 8
+ - image: solid-color(126, 4, 0, 255, 8, 8)
+ bounds: 1008 32 8 8
+ - image: solid-color(127, 4, 0, 255, 8, 8)
+ bounds: 1016 32 8 8
+ - image: solid-color(0, 5, 0, 255, 8, 8)
+ bounds: 0 40 8 8
+ - image: solid-color(1, 5, 0, 255, 8, 8)
+ bounds: 8 40 8 8
+ - image: solid-color(2, 5, 0, 255, 8, 8)
+ bounds: 16 40 8 8
+ - image: solid-color(3, 5, 0, 255, 8, 8)
+ bounds: 24 40 8 8
+ - image: solid-color(4, 5, 0, 255, 8, 8)
+ bounds: 32 40 8 8
+ - image: solid-color(5, 5, 0, 255, 8, 8)
+ bounds: 40 40 8 8
+ - image: solid-color(6, 5, 0, 255, 8, 8)
+ bounds: 48 40 8 8
+ - image: solid-color(7, 5, 0, 255, 8, 8)
+ bounds: 56 40 8 8
+ - image: solid-color(8, 5, 0, 255, 8, 8)
+ bounds: 64 40 8 8
+ - image: solid-color(9, 5, 0, 255, 8, 8)
+ bounds: 72 40 8 8
+ - image: solid-color(10, 5, 0, 255, 8, 8)
+ bounds: 80 40 8 8
+ - image: solid-color(11, 5, 0, 255, 8, 8)
+ bounds: 88 40 8 8
+ - image: solid-color(12, 5, 0, 255, 8, 8)
+ bounds: 96 40 8 8
+ - image: solid-color(13, 5, 0, 255, 8, 8)
+ bounds: 104 40 8 8
+ - image: solid-color(14, 5, 0, 255, 8, 8)
+ bounds: 112 40 8 8
+ - image: solid-color(15, 5, 0, 255, 8, 8)
+ bounds: 120 40 8 8
+ - image: solid-color(16, 5, 0, 255, 8, 8)
+ bounds: 128 40 8 8
+ - image: solid-color(17, 5, 0, 255, 8, 8)
+ bounds: 136 40 8 8
+ - image: solid-color(18, 5, 0, 255, 8, 8)
+ bounds: 144 40 8 8
+ - image: solid-color(19, 5, 0, 255, 8, 8)
+ bounds: 152 40 8 8
+ - image: solid-color(20, 5, 0, 255, 8, 8)
+ bounds: 160 40 8 8
+ - image: solid-color(21, 5, 0, 255, 8, 8)
+ bounds: 168 40 8 8
+ - image: solid-color(22, 5, 0, 255, 8, 8)
+ bounds: 176 40 8 8
+ - image: solid-color(23, 5, 0, 255, 8, 8)
+ bounds: 184 40 8 8
+ - image: solid-color(24, 5, 0, 255, 8, 8)
+ bounds: 192 40 8 8
+ - image: solid-color(25, 5, 0, 255, 8, 8)
+ bounds: 200 40 8 8
+ - image: solid-color(26, 5, 0, 255, 8, 8)
+ bounds: 208 40 8 8
+ - image: solid-color(27, 5, 0, 255, 8, 8)
+ bounds: 216 40 8 8
+ - image: solid-color(28, 5, 0, 255, 8, 8)
+ bounds: 224 40 8 8
+ - image: solid-color(29, 5, 0, 255, 8, 8)
+ bounds: 232 40 8 8
+ - image: solid-color(30, 5, 0, 255, 8, 8)
+ bounds: 240 40 8 8
+ - image: solid-color(31, 5, 0, 255, 8, 8)
+ bounds: 248 40 8 8
+ - image: solid-color(32, 5, 0, 255, 8, 8)
+ bounds: 256 40 8 8
+ - image: solid-color(33, 5, 0, 255, 8, 8)
+ bounds: 264 40 8 8
+ - image: solid-color(34, 5, 0, 255, 8, 8)
+ bounds: 272 40 8 8
+ - image: solid-color(35, 5, 0, 255, 8, 8)
+ bounds: 280 40 8 8
+ - image: solid-color(36, 5, 0, 255, 8, 8)
+ bounds: 288 40 8 8
+ - image: solid-color(37, 5, 0, 255, 8, 8)
+ bounds: 296 40 8 8
+ - image: solid-color(38, 5, 0, 255, 8, 8)
+ bounds: 304 40 8 8
+ - image: solid-color(39, 5, 0, 255, 8, 8)
+ bounds: 312 40 8 8
+ - image: solid-color(40, 5, 0, 255, 8, 8)
+ bounds: 320 40 8 8
+ - image: solid-color(41, 5, 0, 255, 8, 8)
+ bounds: 328 40 8 8
+ - image: solid-color(42, 5, 0, 255, 8, 8)
+ bounds: 336 40 8 8
+ - image: solid-color(43, 5, 0, 255, 8, 8)
+ bounds: 344 40 8 8
+ - image: solid-color(44, 5, 0, 255, 8, 8)
+ bounds: 352 40 8 8
+ - image: solid-color(45, 5, 0, 255, 8, 8)
+ bounds: 360 40 8 8
+ - image: solid-color(46, 5, 0, 255, 8, 8)
+ bounds: 368 40 8 8
+ - image: solid-color(47, 5, 0, 255, 8, 8)
+ bounds: 376 40 8 8
+ - image: solid-color(48, 5, 0, 255, 8, 8)
+ bounds: 384 40 8 8
+ - image: solid-color(49, 5, 0, 255, 8, 8)
+ bounds: 392 40 8 8
+ - image: solid-color(50, 5, 0, 255, 8, 8)
+ bounds: 400 40 8 8
+ - image: solid-color(51, 5, 0, 255, 8, 8)
+ bounds: 408 40 8 8
+ - image: solid-color(52, 5, 0, 255, 8, 8)
+ bounds: 416 40 8 8
+ - image: solid-color(53, 5, 0, 255, 8, 8)
+ bounds: 424 40 8 8
+ - image: solid-color(54, 5, 0, 255, 8, 8)
+ bounds: 432 40 8 8
+ - image: solid-color(55, 5, 0, 255, 8, 8)
+ bounds: 440 40 8 8
+ - image: solid-color(56, 5, 0, 255, 8, 8)
+ bounds: 448 40 8 8
+ - image: solid-color(57, 5, 0, 255, 8, 8)
+ bounds: 456 40 8 8
+ - image: solid-color(58, 5, 0, 255, 8, 8)
+ bounds: 464 40 8 8
+ - image: solid-color(59, 5, 0, 255, 8, 8)
+ bounds: 472 40 8 8
+ - image: solid-color(60, 5, 0, 255, 8, 8)
+ bounds: 480 40 8 8
+ - image: solid-color(61, 5, 0, 255, 8, 8)
+ bounds: 488 40 8 8
+ - image: solid-color(62, 5, 0, 255, 8, 8)
+ bounds: 496 40 8 8
+ - image: solid-color(63, 5, 0, 255, 8, 8)
+ bounds: 504 40 8 8
+ - image: solid-color(64, 5, 0, 255, 8, 8)
+ bounds: 512 40 8 8
+ - image: solid-color(65, 5, 0, 255, 8, 8)
+ bounds: 520 40 8 8
+ - image: solid-color(66, 5, 0, 255, 8, 8)
+ bounds: 528 40 8 8
+ - image: solid-color(67, 5, 0, 255, 8, 8)
+ bounds: 536 40 8 8
+ - image: solid-color(68, 5, 0, 255, 8, 8)
+ bounds: 544 40 8 8
+ - image: solid-color(69, 5, 0, 255, 8, 8)
+ bounds: 552 40 8 8
+ - image: solid-color(70, 5, 0, 255, 8, 8)
+ bounds: 560 40 8 8
+ - image: solid-color(71, 5, 0, 255, 8, 8)
+ bounds: 568 40 8 8
+ - image: solid-color(72, 5, 0, 255, 8, 8)
+ bounds: 576 40 8 8
+ - image: solid-color(73, 5, 0, 255, 8, 8)
+ bounds: 584 40 8 8
+ - image: solid-color(74, 5, 0, 255, 8, 8)
+ bounds: 592 40 8 8
+ - image: solid-color(75, 5, 0, 255, 8, 8)
+ bounds: 600 40 8 8
+ - image: solid-color(76, 5, 0, 255, 8, 8)
+ bounds: 608 40 8 8
+ - image: solid-color(77, 5, 0, 255, 8, 8)
+ bounds: 616 40 8 8
+ - image: solid-color(78, 5, 0, 255, 8, 8)
+ bounds: 624 40 8 8
+ - image: solid-color(79, 5, 0, 255, 8, 8)
+ bounds: 632 40 8 8
+ - image: solid-color(80, 5, 0, 255, 8, 8)
+ bounds: 640 40 8 8
+ - image: solid-color(81, 5, 0, 255, 8, 8)
+ bounds: 648 40 8 8
+ - image: solid-color(82, 5, 0, 255, 8, 8)
+ bounds: 656 40 8 8
+ - image: solid-color(83, 5, 0, 255, 8, 8)
+ bounds: 664 40 8 8
+ - image: solid-color(84, 5, 0, 255, 8, 8)
+ bounds: 672 40 8 8
+ - image: solid-color(85, 5, 0, 255, 8, 8)
+ bounds: 680 40 8 8
+ - image: solid-color(86, 5, 0, 255, 8, 8)
+ bounds: 688 40 8 8
+ - image: solid-color(87, 5, 0, 255, 8, 8)
+ bounds: 696 40 8 8
+ - image: solid-color(88, 5, 0, 255, 8, 8)
+ bounds: 704 40 8 8
+ - image: solid-color(89, 5, 0, 255, 8, 8)
+ bounds: 712 40 8 8
+ - image: solid-color(90, 5, 0, 255, 8, 8)
+ bounds: 720 40 8 8
+ - image: solid-color(91, 5, 0, 255, 8, 8)
+ bounds: 728 40 8 8
+ - image: solid-color(92, 5, 0, 255, 8, 8)
+ bounds: 736 40 8 8
+ - image: solid-color(93, 5, 0, 255, 8, 8)
+ bounds: 744 40 8 8
+ - image: solid-color(94, 5, 0, 255, 8, 8)
+ bounds: 752 40 8 8
+ - image: solid-color(95, 5, 0, 255, 8, 8)
+ bounds: 760 40 8 8
+ - image: solid-color(96, 5, 0, 255, 8, 8)
+ bounds: 768 40 8 8
+ - image: solid-color(97, 5, 0, 255, 8, 8)
+ bounds: 776 40 8 8
+ - image: solid-color(98, 5, 0, 255, 8, 8)
+ bounds: 784 40 8 8
+ - image: solid-color(99, 5, 0, 255, 8, 8)
+ bounds: 792 40 8 8
+ - image: solid-color(100, 5, 0, 255, 8, 8)
+ bounds: 800 40 8 8
+ - image: solid-color(101, 5, 0, 255, 8, 8)
+ bounds: 808 40 8 8
+ - image: solid-color(102, 5, 0, 255, 8, 8)
+ bounds: 816 40 8 8
+ - image: solid-color(103, 5, 0, 255, 8, 8)
+ bounds: 824 40 8 8
+ - image: solid-color(104, 5, 0, 255, 8, 8)
+ bounds: 832 40 8 8
+ - image: solid-color(105, 5, 0, 255, 8, 8)
+ bounds: 840 40 8 8
+ - image: solid-color(106, 5, 0, 255, 8, 8)
+ bounds: 848 40 8 8
+ - image: solid-color(107, 5, 0, 255, 8, 8)
+ bounds: 856 40 8 8
+ - image: solid-color(108, 5, 0, 255, 8, 8)
+ bounds: 864 40 8 8
+ - image: solid-color(109, 5, 0, 255, 8, 8)
+ bounds: 872 40 8 8
+ - image: solid-color(110, 5, 0, 255, 8, 8)
+ bounds: 880 40 8 8
+ - image: solid-color(111, 5, 0, 255, 8, 8)
+ bounds: 888 40 8 8
+ - image: solid-color(112, 5, 0, 255, 8, 8)
+ bounds: 896 40 8 8
+ - image: solid-color(113, 5, 0, 255, 8, 8)
+ bounds: 904 40 8 8
+ - image: solid-color(114, 5, 0, 255, 8, 8)
+ bounds: 912 40 8 8
+ - image: solid-color(115, 5, 0, 255, 8, 8)
+ bounds: 920 40 8 8
+ - image: solid-color(116, 5, 0, 255, 8, 8)
+ bounds: 928 40 8 8
+ - image: solid-color(117, 5, 0, 255, 8, 8)
+ bounds: 936 40 8 8
+ - image: solid-color(118, 5, 0, 255, 8, 8)
+ bounds: 944 40 8 8
+ - image: solid-color(119, 5, 0, 255, 8, 8)
+ bounds: 952 40 8 8
+ - image: solid-color(120, 5, 0, 255, 8, 8)
+ bounds: 960 40 8 8
+ - image: solid-color(121, 5, 0, 255, 8, 8)
+ bounds: 968 40 8 8
+ - image: solid-color(122, 5, 0, 255, 8, 8)
+ bounds: 976 40 8 8
+ - image: solid-color(123, 5, 0, 255, 8, 8)
+ bounds: 984 40 8 8
+ - image: solid-color(124, 5, 0, 255, 8, 8)
+ bounds: 992 40 8 8
+ - image: solid-color(125, 5, 0, 255, 8, 8)
+ bounds: 1000 40 8 8
+ - image: solid-color(126, 5, 0, 255, 8, 8)
+ bounds: 1008 40 8 8
+ - image: solid-color(127, 5, 0, 255, 8, 8)
+ bounds: 1016 40 8 8
+ - image: solid-color(0, 6, 0, 255, 8, 8)
+ bounds: 0 48 8 8
+ - image: solid-color(1, 6, 0, 255, 8, 8)
+ bounds: 8 48 8 8
+ - image: solid-color(2, 6, 0, 255, 8, 8)
+ bounds: 16 48 8 8
+ - image: solid-color(3, 6, 0, 255, 8, 8)
+ bounds: 24 48 8 8
+ - image: solid-color(4, 6, 0, 255, 8, 8)
+ bounds: 32 48 8 8
+ - image: solid-color(5, 6, 0, 255, 8, 8)
+ bounds: 40 48 8 8
+ - image: solid-color(6, 6, 0, 255, 8, 8)
+ bounds: 48 48 8 8
+ - image: solid-color(7, 6, 0, 255, 8, 8)
+ bounds: 56 48 8 8
+ - image: solid-color(8, 6, 0, 255, 8, 8)
+ bounds: 64 48 8 8
+ - image: solid-color(9, 6, 0, 255, 8, 8)
+ bounds: 72 48 8 8
+ - image: solid-color(10, 6, 0, 255, 8, 8)
+ bounds: 80 48 8 8
+ - image: solid-color(11, 6, 0, 255, 8, 8)
+ bounds: 88 48 8 8
+ - image: solid-color(12, 6, 0, 255, 8, 8)
+ bounds: 96 48 8 8
+ - image: solid-color(13, 6, 0, 255, 8, 8)
+ bounds: 104 48 8 8
+ - image: solid-color(14, 6, 0, 255, 8, 8)
+ bounds: 112 48 8 8
+ - image: solid-color(15, 6, 0, 255, 8, 8)
+ bounds: 120 48 8 8
+ - image: solid-color(16, 6, 0, 255, 8, 8)
+ bounds: 128 48 8 8
+ - image: solid-color(17, 6, 0, 255, 8, 8)
+ bounds: 136 48 8 8
+ - image: solid-color(18, 6, 0, 255, 8, 8)
+ bounds: 144 48 8 8
+ - image: solid-color(19, 6, 0, 255, 8, 8)
+ bounds: 152 48 8 8
+ - image: solid-color(20, 6, 0, 255, 8, 8)
+ bounds: 160 48 8 8
+ - image: solid-color(21, 6, 0, 255, 8, 8)
+ bounds: 168 48 8 8
+ - image: solid-color(22, 6, 0, 255, 8, 8)
+ bounds: 176 48 8 8
+ - image: solid-color(23, 6, 0, 255, 8, 8)
+ bounds: 184 48 8 8
+ - image: solid-color(24, 6, 0, 255, 8, 8)
+ bounds: 192 48 8 8
+ - image: solid-color(25, 6, 0, 255, 8, 8)
+ bounds: 200 48 8 8
+ - image: solid-color(26, 6, 0, 255, 8, 8)
+ bounds: 208 48 8 8
+ - image: solid-color(27, 6, 0, 255, 8, 8)
+ bounds: 216 48 8 8
+ - image: solid-color(28, 6, 0, 255, 8, 8)
+ bounds: 224 48 8 8
+ - image: solid-color(29, 6, 0, 255, 8, 8)
+ bounds: 232 48 8 8
+ - image: solid-color(30, 6, 0, 255, 8, 8)
+ bounds: 240 48 8 8
+ - image: solid-color(31, 6, 0, 255, 8, 8)
+ bounds: 248 48 8 8
+ - image: solid-color(32, 6, 0, 255, 8, 8)
+ bounds: 256 48 8 8
+ - image: solid-color(33, 6, 0, 255, 8, 8)
+ bounds: 264 48 8 8
+ - image: solid-color(34, 6, 0, 255, 8, 8)
+ bounds: 272 48 8 8
+ - image: solid-color(35, 6, 0, 255, 8, 8)
+ bounds: 280 48 8 8
+ - image: solid-color(36, 6, 0, 255, 8, 8)
+ bounds: 288 48 8 8
+ - image: solid-color(37, 6, 0, 255, 8, 8)
+ bounds: 296 48 8 8
+ - image: solid-color(38, 6, 0, 255, 8, 8)
+ bounds: 304 48 8 8
+ - image: solid-color(39, 6, 0, 255, 8, 8)
+ bounds: 312 48 8 8
+ - image: solid-color(40, 6, 0, 255, 8, 8)
+ bounds: 320 48 8 8
+ - image: solid-color(41, 6, 0, 255, 8, 8)
+ bounds: 328 48 8 8
+ - image: solid-color(42, 6, 0, 255, 8, 8)
+ bounds: 336 48 8 8
+ - image: solid-color(43, 6, 0, 255, 8, 8)
+ bounds: 344 48 8 8
+ - image: solid-color(44, 6, 0, 255, 8, 8)
+ bounds: 352 48 8 8
+ - image: solid-color(45, 6, 0, 255, 8, 8)
+ bounds: 360 48 8 8
+ - image: solid-color(46, 6, 0, 255, 8, 8)
+ bounds: 368 48 8 8
+ - image: solid-color(47, 6, 0, 255, 8, 8)
+ bounds: 376 48 8 8
+ - image: solid-color(48, 6, 0, 255, 8, 8)
+ bounds: 384 48 8 8
+ - image: solid-color(49, 6, 0, 255, 8, 8)
+ bounds: 392 48 8 8
+ - image: solid-color(50, 6, 0, 255, 8, 8)
+ bounds: 400 48 8 8
+ - image: solid-color(51, 6, 0, 255, 8, 8)
+ bounds: 408 48 8 8
+ - image: solid-color(52, 6, 0, 255, 8, 8)
+ bounds: 416 48 8 8
+ - image: solid-color(53, 6, 0, 255, 8, 8)
+ bounds: 424 48 8 8
+ - image: solid-color(54, 6, 0, 255, 8, 8)
+ bounds: 432 48 8 8
+ - image: solid-color(55, 6, 0, 255, 8, 8)
+ bounds: 440 48 8 8
+ - image: solid-color(56, 6, 0, 255, 8, 8)
+ bounds: 448 48 8 8
+ - image: solid-color(57, 6, 0, 255, 8, 8)
+ bounds: 456 48 8 8
+ - image: solid-color(58, 6, 0, 255, 8, 8)
+ bounds: 464 48 8 8
+ - image: solid-color(59, 6, 0, 255, 8, 8)
+ bounds: 472 48 8 8
+ - image: solid-color(60, 6, 0, 255, 8, 8)
+ bounds: 480 48 8 8
+ - image: solid-color(61, 6, 0, 255, 8, 8)
+ bounds: 488 48 8 8
+ - image: solid-color(62, 6, 0, 255, 8, 8)
+ bounds: 496 48 8 8
+ - image: solid-color(63, 6, 0, 255, 8, 8)
+ bounds: 504 48 8 8
+ - image: solid-color(64, 6, 0, 255, 8, 8)
+ bounds: 512 48 8 8
+ - image: solid-color(65, 6, 0, 255, 8, 8)
+ bounds: 520 48 8 8
+ - image: solid-color(66, 6, 0, 255, 8, 8)
+ bounds: 528 48 8 8
+ - image: solid-color(67, 6, 0, 255, 8, 8)
+ bounds: 536 48 8 8
+ - image: solid-color(68, 6, 0, 255, 8, 8)
+ bounds: 544 48 8 8
+ - image: solid-color(69, 6, 0, 255, 8, 8)
+ bounds: 552 48 8 8
+ - image: solid-color(70, 6, 0, 255, 8, 8)
+ bounds: 560 48 8 8
+ - image: solid-color(71, 6, 0, 255, 8, 8)
+ bounds: 568 48 8 8
+ - image: solid-color(72, 6, 0, 255, 8, 8)
+ bounds: 576 48 8 8
+ - image: solid-color(73, 6, 0, 255, 8, 8)
+ bounds: 584 48 8 8
+ - image: solid-color(74, 6, 0, 255, 8, 8)
+ bounds: 592 48 8 8
+ - image: solid-color(75, 6, 0, 255, 8, 8)
+ bounds: 600 48 8 8
+ - image: solid-color(76, 6, 0, 255, 8, 8)
+ bounds: 608 48 8 8
+ - image: solid-color(77, 6, 0, 255, 8, 8)
+ bounds: 616 48 8 8
+ - image: solid-color(78, 6, 0, 255, 8, 8)
+ bounds: 624 48 8 8
+ - image: solid-color(79, 6, 0, 255, 8, 8)
+ bounds: 632 48 8 8
+ - image: solid-color(80, 6, 0, 255, 8, 8)
+ bounds: 640 48 8 8
+ - image: solid-color(81, 6, 0, 255, 8, 8)
+ bounds: 648 48 8 8
+ - image: solid-color(82, 6, 0, 255, 8, 8)
+ bounds: 656 48 8 8
+ - image: solid-color(83, 6, 0, 255, 8, 8)
+ bounds: 664 48 8 8
+ - image: solid-color(84, 6, 0, 255, 8, 8)
+ bounds: 672 48 8 8
+ - image: solid-color(85, 6, 0, 255, 8, 8)
+ bounds: 680 48 8 8
+ - image: solid-color(86, 6, 0, 255, 8, 8)
+ bounds: 688 48 8 8
+ - image: solid-color(87, 6, 0, 255, 8, 8)
+ bounds: 696 48 8 8
+ - image: solid-color(88, 6, 0, 255, 8, 8)
+ bounds: 704 48 8 8
+ - image: solid-color(89, 6, 0, 255, 8, 8)
+ bounds: 712 48 8 8
+ - image: solid-color(90, 6, 0, 255, 8, 8)
+ bounds: 720 48 8 8
+ - image: solid-color(91, 6, 0, 255, 8, 8)
+ bounds: 728 48 8 8
+ - image: solid-color(92, 6, 0, 255, 8, 8)
+ bounds: 736 48 8 8
+ - image: solid-color(93, 6, 0, 255, 8, 8)
+ bounds: 744 48 8 8
+ - image: solid-color(94, 6, 0, 255, 8, 8)
+ bounds: 752 48 8 8
+ - image: solid-color(95, 6, 0, 255, 8, 8)
+ bounds: 760 48 8 8
+ - image: solid-color(96, 6, 0, 255, 8, 8)
+ bounds: 768 48 8 8
+ - image: solid-color(97, 6, 0, 255, 8, 8)
+ bounds: 776 48 8 8
+ - image: solid-color(98, 6, 0, 255, 8, 8)
+ bounds: 784 48 8 8
+ - image: solid-color(99, 6, 0, 255, 8, 8)
+ bounds: 792 48 8 8
+ - image: solid-color(100, 6, 0, 255, 8, 8)
+ bounds: 800 48 8 8
+ - image: solid-color(101, 6, 0, 255, 8, 8)
+ bounds: 808 48 8 8
+ - image: solid-color(102, 6, 0, 255, 8, 8)
+ bounds: 816 48 8 8
+ - image: solid-color(103, 6, 0, 255, 8, 8)
+ bounds: 824 48 8 8
+ - image: solid-color(104, 6, 0, 255, 8, 8)
+ bounds: 832 48 8 8
+ - image: solid-color(105, 6, 0, 255, 8, 8)
+ bounds: 840 48 8 8
+ - image: solid-color(106, 6, 0, 255, 8, 8)
+ bounds: 848 48 8 8
+ - image: solid-color(107, 6, 0, 255, 8, 8)
+ bounds: 856 48 8 8
+ - image: solid-color(108, 6, 0, 255, 8, 8)
+ bounds: 864 48 8 8
+ - image: solid-color(109, 6, 0, 255, 8, 8)
+ bounds: 872 48 8 8
+ - image: solid-color(110, 6, 0, 255, 8, 8)
+ bounds: 880 48 8 8
+ - image: solid-color(111, 6, 0, 255, 8, 8)
+ bounds: 888 48 8 8
+ - image: solid-color(112, 6, 0, 255, 8, 8)
+ bounds: 896 48 8 8
+ - image: solid-color(113, 6, 0, 255, 8, 8)
+ bounds: 904 48 8 8
+ - image: solid-color(114, 6, 0, 255, 8, 8)
+ bounds: 912 48 8 8
+ - image: solid-color(115, 6, 0, 255, 8, 8)
+ bounds: 920 48 8 8
+ - image: solid-color(116, 6, 0, 255, 8, 8)
+ bounds: 928 48 8 8
+ - image: solid-color(117, 6, 0, 255, 8, 8)
+ bounds: 936 48 8 8
+ - image: solid-color(118, 6, 0, 255, 8, 8)
+ bounds: 944 48 8 8
+ - image: solid-color(119, 6, 0, 255, 8, 8)
+ bounds: 952 48 8 8
+ - image: solid-color(120, 6, 0, 255, 8, 8)
+ bounds: 960 48 8 8
+ - image: solid-color(121, 6, 0, 255, 8, 8)
+ bounds: 968 48 8 8
+ - image: solid-color(122, 6, 0, 255, 8, 8)
+ bounds: 976 48 8 8
+ - image: solid-color(123, 6, 0, 255, 8, 8)
+ bounds: 984 48 8 8
+ - image: solid-color(124, 6, 0, 255, 8, 8)
+ bounds: 992 48 8 8
+ - image: solid-color(125, 6, 0, 255, 8, 8)
+ bounds: 1000 48 8 8
+ - image: solid-color(126, 6, 0, 255, 8, 8)
+ bounds: 1008 48 8 8
+ - image: solid-color(127, 6, 0, 255, 8, 8)
+ bounds: 1016 48 8 8
+ - image: solid-color(0, 7, 0, 255, 8, 8)
+ bounds: 0 56 8 8
+ - image: solid-color(1, 7, 0, 255, 8, 8)
+ bounds: 8 56 8 8
+ - image: solid-color(2, 7, 0, 255, 8, 8)
+ bounds: 16 56 8 8
+ - image: solid-color(3, 7, 0, 255, 8, 8)
+ bounds: 24 56 8 8
+ - image: solid-color(4, 7, 0, 255, 8, 8)
+ bounds: 32 56 8 8
+ - image: solid-color(5, 7, 0, 255, 8, 8)
+ bounds: 40 56 8 8
+ - image: solid-color(6, 7, 0, 255, 8, 8)
+ bounds: 48 56 8 8
+ - image: solid-color(7, 7, 0, 255, 8, 8)
+ bounds: 56 56 8 8
+ - image: solid-color(8, 7, 0, 255, 8, 8)
+ bounds: 64 56 8 8
+ - image: solid-color(9, 7, 0, 255, 8, 8)
+ bounds: 72 56 8 8
+ - image: solid-color(10, 7, 0, 255, 8, 8)
+ bounds: 80 56 8 8
+ - image: solid-color(11, 7, 0, 255, 8, 8)
+ bounds: 88 56 8 8
+ - image: solid-color(12, 7, 0, 255, 8, 8)
+ bounds: 96 56 8 8
+ - image: solid-color(13, 7, 0, 255, 8, 8)
+ bounds: 104 56 8 8
+ - image: solid-color(14, 7, 0, 255, 8, 8)
+ bounds: 112 56 8 8
+ - image: solid-color(15, 7, 0, 255, 8, 8)
+ bounds: 120 56 8 8
+ - image: solid-color(16, 7, 0, 255, 8, 8)
+ bounds: 128 56 8 8
+ - image: solid-color(17, 7, 0, 255, 8, 8)
+ bounds: 136 56 8 8
+ - image: solid-color(18, 7, 0, 255, 8, 8)
+ bounds: 144 56 8 8
+ - image: solid-color(19, 7, 0, 255, 8, 8)
+ bounds: 152 56 8 8
+ - image: solid-color(20, 7, 0, 255, 8, 8)
+ bounds: 160 56 8 8
+ - image: solid-color(21, 7, 0, 255, 8, 8)
+ bounds: 168 56 8 8
+ - image: solid-color(22, 7, 0, 255, 8, 8)
+ bounds: 176 56 8 8
+ - image: solid-color(23, 7, 0, 255, 8, 8)
+ bounds: 184 56 8 8
+ - image: solid-color(24, 7, 0, 255, 8, 8)
+ bounds: 192 56 8 8
+ - image: solid-color(25, 7, 0, 255, 8, 8)
+ bounds: 200 56 8 8
+ - image: solid-color(26, 7, 0, 255, 8, 8)
+ bounds: 208 56 8 8
+ - image: solid-color(27, 7, 0, 255, 8, 8)
+ bounds: 216 56 8 8
+ - image: solid-color(28, 7, 0, 255, 8, 8)
+ bounds: 224 56 8 8
+ - image: solid-color(29, 7, 0, 255, 8, 8)
+ bounds: 232 56 8 8
+ - image: solid-color(30, 7, 0, 255, 8, 8)
+ bounds: 240 56 8 8
+ - image: solid-color(31, 7, 0, 255, 8, 8)
+ bounds: 248 56 8 8
+ - image: solid-color(32, 7, 0, 255, 8, 8)
+ bounds: 256 56 8 8
+ - image: solid-color(33, 7, 0, 255, 8, 8)
+ bounds: 264 56 8 8
+ - image: solid-color(34, 7, 0, 255, 8, 8)
+ bounds: 272 56 8 8
+ - image: solid-color(35, 7, 0, 255, 8, 8)
+ bounds: 280 56 8 8
+ - image: solid-color(36, 7, 0, 255, 8, 8)
+ bounds: 288 56 8 8
+ - image: solid-color(37, 7, 0, 255, 8, 8)
+ bounds: 296 56 8 8
+ - image: solid-color(38, 7, 0, 255, 8, 8)
+ bounds: 304 56 8 8
+ - image: solid-color(39, 7, 0, 255, 8, 8)
+ bounds: 312 56 8 8
+ - image: solid-color(40, 7, 0, 255, 8, 8)
+ bounds: 320 56 8 8
+ - image: solid-color(41, 7, 0, 255, 8, 8)
+ bounds: 328 56 8 8
+ - image: solid-color(42, 7, 0, 255, 8, 8)
+ bounds: 336 56 8 8
+ - image: solid-color(43, 7, 0, 255, 8, 8)
+ bounds: 344 56 8 8
+ - image: solid-color(44, 7, 0, 255, 8, 8)
+ bounds: 352 56 8 8
+ - image: solid-color(45, 7, 0, 255, 8, 8)
+ bounds: 360 56 8 8
+ - image: solid-color(46, 7, 0, 255, 8, 8)
+ bounds: 368 56 8 8
+ - image: solid-color(47, 7, 0, 255, 8, 8)
+ bounds: 376 56 8 8
+ - image: solid-color(48, 7, 0, 255, 8, 8)
+ bounds: 384 56 8 8
+ - image: solid-color(49, 7, 0, 255, 8, 8)
+ bounds: 392 56 8 8
+ - image: solid-color(50, 7, 0, 255, 8, 8)
+ bounds: 400 56 8 8
+ - image: solid-color(51, 7, 0, 255, 8, 8)
+ bounds: 408 56 8 8
+ - image: solid-color(52, 7, 0, 255, 8, 8)
+ bounds: 416 56 8 8
+ - image: solid-color(53, 7, 0, 255, 8, 8)
+ bounds: 424 56 8 8
+ - image: solid-color(54, 7, 0, 255, 8, 8)
+ bounds: 432 56 8 8
+ - image: solid-color(55, 7, 0, 255, 8, 8)
+ bounds: 440 56 8 8
+ - image: solid-color(56, 7, 0, 255, 8, 8)
+ bounds: 448 56 8 8
+ - image: solid-color(57, 7, 0, 255, 8, 8)
+ bounds: 456 56 8 8
+ - image: solid-color(58, 7, 0, 255, 8, 8)
+ bounds: 464 56 8 8
+ - image: solid-color(59, 7, 0, 255, 8, 8)
+ bounds: 472 56 8 8
+ - image: solid-color(60, 7, 0, 255, 8, 8)
+ bounds: 480 56 8 8
+ - image: solid-color(61, 7, 0, 255, 8, 8)
+ bounds: 488 56 8 8
+ - image: solid-color(62, 7, 0, 255, 8, 8)
+ bounds: 496 56 8 8
+ - image: solid-color(63, 7, 0, 255, 8, 8)
+ bounds: 504 56 8 8
+ - image: solid-color(64, 7, 0, 255, 8, 8)
+ bounds: 512 56 8 8
+ - image: solid-color(65, 7, 0, 255, 8, 8)
+ bounds: 520 56 8 8
+ - image: solid-color(66, 7, 0, 255, 8, 8)
+ bounds: 528 56 8 8
+ - image: solid-color(67, 7, 0, 255, 8, 8)
+ bounds: 536 56 8 8
+ - image: solid-color(68, 7, 0, 255, 8, 8)
+ bounds: 544 56 8 8
+ - image: solid-color(69, 7, 0, 255, 8, 8)
+ bounds: 552 56 8 8
+ - image: solid-color(70, 7, 0, 255, 8, 8)
+ bounds: 560 56 8 8
+ - image: solid-color(71, 7, 0, 255, 8, 8)
+ bounds: 568 56 8 8
+ - image: solid-color(72, 7, 0, 255, 8, 8)
+ bounds: 576 56 8 8
+ - image: solid-color(73, 7, 0, 255, 8, 8)
+ bounds: 584 56 8 8
+ - image: solid-color(74, 7, 0, 255, 8, 8)
+ bounds: 592 56 8 8
+ - image: solid-color(75, 7, 0, 255, 8, 8)
+ bounds: 600 56 8 8
+ - image: solid-color(76, 7, 0, 255, 8, 8)
+ bounds: 608 56 8 8
+ - image: solid-color(77, 7, 0, 255, 8, 8)
+ bounds: 616 56 8 8
+ - image: solid-color(78, 7, 0, 255, 8, 8)
+ bounds: 624 56 8 8
+ - image: solid-color(79, 7, 0, 255, 8, 8)
+ bounds: 632 56 8 8
+ - image: solid-color(80, 7, 0, 255, 8, 8)
+ bounds: 640 56 8 8
+ - image: solid-color(81, 7, 0, 255, 8, 8)
+ bounds: 648 56 8 8
+ - image: solid-color(82, 7, 0, 255, 8, 8)
+ bounds: 656 56 8 8
+ - image: solid-color(83, 7, 0, 255, 8, 8)
+ bounds: 664 56 8 8
+ - image: solid-color(84, 7, 0, 255, 8, 8)
+ bounds: 672 56 8 8
+ - image: solid-color(85, 7, 0, 255, 8, 8)
+ bounds: 680 56 8 8
+ - image: solid-color(86, 7, 0, 255, 8, 8)
+ bounds: 688 56 8 8
+ - image: solid-color(87, 7, 0, 255, 8, 8)
+ bounds: 696 56 8 8
+ - image: solid-color(88, 7, 0, 255, 8, 8)
+ bounds: 704 56 8 8
+ - image: solid-color(89, 7, 0, 255, 8, 8)
+ bounds: 712 56 8 8
+ - image: solid-color(90, 7, 0, 255, 8, 8)
+ bounds: 720 56 8 8
+ - image: solid-color(91, 7, 0, 255, 8, 8)
+ bounds: 728 56 8 8
+ - image: solid-color(92, 7, 0, 255, 8, 8)
+ bounds: 736 56 8 8
+ - image: solid-color(93, 7, 0, 255, 8, 8)
+ bounds: 744 56 8 8
+ - image: solid-color(94, 7, 0, 255, 8, 8)
+ bounds: 752 56 8 8
+ - image: solid-color(95, 7, 0, 255, 8, 8)
+ bounds: 760 56 8 8
+ - image: solid-color(96, 7, 0, 255, 8, 8)
+ bounds: 768 56 8 8
+ - image: solid-color(97, 7, 0, 255, 8, 8)
+ bounds: 776 56 8 8
+ - image: solid-color(98, 7, 0, 255, 8, 8)
+ bounds: 784 56 8 8
+ - image: solid-color(99, 7, 0, 255, 8, 8)
+ bounds: 792 56 8 8
+ - image: solid-color(100, 7, 0, 255, 8, 8)
+ bounds: 800 56 8 8
+ - image: solid-color(101, 7, 0, 255, 8, 8)
+ bounds: 808 56 8 8
+ - image: solid-color(102, 7, 0, 255, 8, 8)
+ bounds: 816 56 8 8
+ - image: solid-color(103, 7, 0, 255, 8, 8)
+ bounds: 824 56 8 8
+ - image: solid-color(104, 7, 0, 255, 8, 8)
+ bounds: 832 56 8 8
+ - image: solid-color(105, 7, 0, 255, 8, 8)
+ bounds: 840 56 8 8
+ - image: solid-color(106, 7, 0, 255, 8, 8)
+ bounds: 848 56 8 8
+ - image: solid-color(107, 7, 0, 255, 8, 8)
+ bounds: 856 56 8 8
+ - image: solid-color(108, 7, 0, 255, 8, 8)
+ bounds: 864 56 8 8
+ - image: solid-color(109, 7, 0, 255, 8, 8)
+ bounds: 872 56 8 8
+ - image: solid-color(110, 7, 0, 255, 8, 8)
+ bounds: 880 56 8 8
+ - image: solid-color(111, 7, 0, 255, 8, 8)
+ bounds: 888 56 8 8
+ - image: solid-color(112, 7, 0, 255, 8, 8)
+ bounds: 896 56 8 8
+ - image: solid-color(113, 7, 0, 255, 8, 8)
+ bounds: 904 56 8 8
+ - image: solid-color(114, 7, 0, 255, 8, 8)
+ bounds: 912 56 8 8
+ - image: solid-color(115, 7, 0, 255, 8, 8)
+ bounds: 920 56 8 8
+ - image: solid-color(116, 7, 0, 255, 8, 8)
+ bounds: 928 56 8 8
+ - image: solid-color(117, 7, 0, 255, 8, 8)
+ bounds: 936 56 8 8
+ - image: solid-color(118, 7, 0, 255, 8, 8)
+ bounds: 944 56 8 8
+ - image: solid-color(119, 7, 0, 255, 8, 8)
+ bounds: 952 56 8 8
+ - image: solid-color(120, 7, 0, 255, 8, 8)
+ bounds: 960 56 8 8
+ - image: solid-color(121, 7, 0, 255, 8, 8)
+ bounds: 968 56 8 8
+ - image: solid-color(122, 7, 0, 255, 8, 8)
+ bounds: 976 56 8 8
+ - image: solid-color(123, 7, 0, 255, 8, 8)
+ bounds: 984 56 8 8
+ - image: solid-color(124, 7, 0, 255, 8, 8)
+ bounds: 992 56 8 8
+ - image: solid-color(125, 7, 0, 255, 8, 8)
+ bounds: 1000 56 8 8
+ - image: solid-color(126, 7, 0, 255, 8, 8)
+ bounds: 1008 56 8 8
+ - image: solid-color(127, 7, 0, 255, 8, 8)
+ bounds: 1016 56 8 8
+ - image: solid-color(0, 8, 0, 255, 8, 8)
+ bounds: 0 64 8 8
+ - image: solid-color(1, 8, 0, 255, 8, 8)
+ bounds: 8 64 8 8
+ - image: solid-color(2, 8, 0, 255, 8, 8)
+ bounds: 16 64 8 8
+ - image: solid-color(3, 8, 0, 255, 8, 8)
+ bounds: 24 64 8 8
+ - image: solid-color(4, 8, 0, 255, 8, 8)
+ bounds: 32 64 8 8
+ - image: solid-color(5, 8, 0, 255, 8, 8)
+ bounds: 40 64 8 8
+ - image: solid-color(6, 8, 0, 255, 8, 8)
+ bounds: 48 64 8 8
+ - image: solid-color(7, 8, 0, 255, 8, 8)
+ bounds: 56 64 8 8
+ - image: solid-color(8, 8, 0, 255, 8, 8)
+ bounds: 64 64 8 8
+ - image: solid-color(9, 8, 0, 255, 8, 8)
+ bounds: 72 64 8 8
+ - image: solid-color(10, 8, 0, 255, 8, 8)
+ bounds: 80 64 8 8
+ - image: solid-color(11, 8, 0, 255, 8, 8)
+ bounds: 88 64 8 8
+ - image: solid-color(12, 8, 0, 255, 8, 8)
+ bounds: 96 64 8 8
+ - image: solid-color(13, 8, 0, 255, 8, 8)
+ bounds: 104 64 8 8
+ - image: solid-color(14, 8, 0, 255, 8, 8)
+ bounds: 112 64 8 8
+ - image: solid-color(15, 8, 0, 255, 8, 8)
+ bounds: 120 64 8 8
+ - image: solid-color(16, 8, 0, 255, 8, 8)
+ bounds: 128 64 8 8
+ - image: solid-color(17, 8, 0, 255, 8, 8)
+ bounds: 136 64 8 8
+ - image: solid-color(18, 8, 0, 255, 8, 8)
+ bounds: 144 64 8 8
+ - image: solid-color(19, 8, 0, 255, 8, 8)
+ bounds: 152 64 8 8
+ - image: solid-color(20, 8, 0, 255, 8, 8)
+ bounds: 160 64 8 8
+ - image: solid-color(21, 8, 0, 255, 8, 8)
+ bounds: 168 64 8 8
+ - image: solid-color(22, 8, 0, 255, 8, 8)
+ bounds: 176 64 8 8
+ - image: solid-color(23, 8, 0, 255, 8, 8)
+ bounds: 184 64 8 8
+ - image: solid-color(24, 8, 0, 255, 8, 8)
+ bounds: 192 64 8 8
+ - image: solid-color(25, 8, 0, 255, 8, 8)
+ bounds: 200 64 8 8
+ - image: solid-color(26, 8, 0, 255, 8, 8)
+ bounds: 208 64 8 8
+ - image: solid-color(27, 8, 0, 255, 8, 8)
+ bounds: 216 64 8 8
+ - image: solid-color(28, 8, 0, 255, 8, 8)
+ bounds: 224 64 8 8
+ - image: solid-color(29, 8, 0, 255, 8, 8)
+ bounds: 232 64 8 8
+ - image: solid-color(30, 8, 0, 255, 8, 8)
+ bounds: 240 64 8 8
+ - image: solid-color(31, 8, 0, 255, 8, 8)
+ bounds: 248 64 8 8
+ - image: solid-color(32, 8, 0, 255, 8, 8)
+ bounds: 256 64 8 8
+ - image: solid-color(33, 8, 0, 255, 8, 8)
+ bounds: 264 64 8 8
+ - image: solid-color(34, 8, 0, 255, 8, 8)
+ bounds: 272 64 8 8
+ - image: solid-color(35, 8, 0, 255, 8, 8)
+ bounds: 280 64 8 8
+ - image: solid-color(36, 8, 0, 255, 8, 8)
+ bounds: 288 64 8 8
+ - image: solid-color(37, 8, 0, 255, 8, 8)
+ bounds: 296 64 8 8
+ - image: solid-color(38, 8, 0, 255, 8, 8)
+ bounds: 304 64 8 8
+ - image: solid-color(39, 8, 0, 255, 8, 8)
+ bounds: 312 64 8 8
+ - image: solid-color(40, 8, 0, 255, 8, 8)
+ bounds: 320 64 8 8
+ - image: solid-color(41, 8, 0, 255, 8, 8)
+ bounds: 328 64 8 8
+ - image: solid-color(42, 8, 0, 255, 8, 8)
+ bounds: 336 64 8 8
+ - image: solid-color(43, 8, 0, 255, 8, 8)
+ bounds: 344 64 8 8
+ - image: solid-color(44, 8, 0, 255, 8, 8)
+ bounds: 352 64 8 8
+ - image: solid-color(45, 8, 0, 255, 8, 8)
+ bounds: 360 64 8 8
+ - image: solid-color(46, 8, 0, 255, 8, 8)
+ bounds: 368 64 8 8
+ - image: solid-color(47, 8, 0, 255, 8, 8)
+ bounds: 376 64 8 8
+ - image: solid-color(48, 8, 0, 255, 8, 8)
+ bounds: 384 64 8 8
+ - image: solid-color(49, 8, 0, 255, 8, 8)
+ bounds: 392 64 8 8
+ - image: solid-color(50, 8, 0, 255, 8, 8)
+ bounds: 400 64 8 8
+ - image: solid-color(51, 8, 0, 255, 8, 8)
+ bounds: 408 64 8 8
+ - image: solid-color(52, 8, 0, 255, 8, 8)
+ bounds: 416 64 8 8
+ - image: solid-color(53, 8, 0, 255, 8, 8)
+ bounds: 424 64 8 8
+ - image: solid-color(54, 8, 0, 255, 8, 8)
+ bounds: 432 64 8 8
+ - image: solid-color(55, 8, 0, 255, 8, 8)
+ bounds: 440 64 8 8
+ - image: solid-color(56, 8, 0, 255, 8, 8)
+ bounds: 448 64 8 8
+ - image: solid-color(57, 8, 0, 255, 8, 8)
+ bounds: 456 64 8 8
+ - image: solid-color(58, 8, 0, 255, 8, 8)
+ bounds: 464 64 8 8
+ - image: solid-color(59, 8, 0, 255, 8, 8)
+ bounds: 472 64 8 8
+ - image: solid-color(60, 8, 0, 255, 8, 8)
+ bounds: 480 64 8 8
+ - image: solid-color(61, 8, 0, 255, 8, 8)
+ bounds: 488 64 8 8
+ - image: solid-color(62, 8, 0, 255, 8, 8)
+ bounds: 496 64 8 8
+ - image: solid-color(63, 8, 0, 255, 8, 8)
+ bounds: 504 64 8 8
+ - image: solid-color(64, 8, 0, 255, 8, 8)
+ bounds: 512 64 8 8
+ - image: solid-color(65, 8, 0, 255, 8, 8)
+ bounds: 520 64 8 8
+ - image: solid-color(66, 8, 0, 255, 8, 8)
+ bounds: 528 64 8 8
+ - image: solid-color(67, 8, 0, 255, 8, 8)
+ bounds: 536 64 8 8
+ - image: solid-color(68, 8, 0, 255, 8, 8)
+ bounds: 544 64 8 8
+ - image: solid-color(69, 8, 0, 255, 8, 8)
+ bounds: 552 64 8 8
+ - image: solid-color(70, 8, 0, 255, 8, 8)
+ bounds: 560 64 8 8
+ - image: solid-color(71, 8, 0, 255, 8, 8)
+ bounds: 568 64 8 8
+ - image: solid-color(72, 8, 0, 255, 8, 8)
+ bounds: 576 64 8 8
+ - image: solid-color(73, 8, 0, 255, 8, 8)
+ bounds: 584 64 8 8
+ - image: solid-color(74, 8, 0, 255, 8, 8)
+ bounds: 592 64 8 8
+ - image: solid-color(75, 8, 0, 255, 8, 8)
+ bounds: 600 64 8 8
+ - image: solid-color(76, 8, 0, 255, 8, 8)
+ bounds: 608 64 8 8
+ - image: solid-color(77, 8, 0, 255, 8, 8)
+ bounds: 616 64 8 8
+ - image: solid-color(78, 8, 0, 255, 8, 8)
+ bounds: 624 64 8 8
+ - image: solid-color(79, 8, 0, 255, 8, 8)
+ bounds: 632 64 8 8
+ - image: solid-color(80, 8, 0, 255, 8, 8)
+ bounds: 640 64 8 8
+ - image: solid-color(81, 8, 0, 255, 8, 8)
+ bounds: 648 64 8 8
+ - image: solid-color(82, 8, 0, 255, 8, 8)
+ bounds: 656 64 8 8
+ - image: solid-color(83, 8, 0, 255, 8, 8)
+ bounds: 664 64 8 8
+ - image: solid-color(84, 8, 0, 255, 8, 8)
+ bounds: 672 64 8 8
+ - image: solid-color(85, 8, 0, 255, 8, 8)
+ bounds: 680 64 8 8
+ - image: solid-color(86, 8, 0, 255, 8, 8)
+ bounds: 688 64 8 8
+ - image: solid-color(87, 8, 0, 255, 8, 8)
+ bounds: 696 64 8 8
+ - image: solid-color(88, 8, 0, 255, 8, 8)
+ bounds: 704 64 8 8
+ - image: solid-color(89, 8, 0, 255, 8, 8)
+ bounds: 712 64 8 8
+ - image: solid-color(90, 8, 0, 255, 8, 8)
+ bounds: 720 64 8 8
+ - image: solid-color(91, 8, 0, 255, 8, 8)
+ bounds: 728 64 8 8
+ - image: solid-color(92, 8, 0, 255, 8, 8)
+ bounds: 736 64 8 8
+ - image: solid-color(93, 8, 0, 255, 8, 8)
+ bounds: 744 64 8 8
+ - image: solid-color(94, 8, 0, 255, 8, 8)
+ bounds: 752 64 8 8
+ - image: solid-color(95, 8, 0, 255, 8, 8)
+ bounds: 760 64 8 8
+ - image: solid-color(96, 8, 0, 255, 8, 8)
+ bounds: 768 64 8 8
+ - image: solid-color(97, 8, 0, 255, 8, 8)
+ bounds: 776 64 8 8
+ - image: solid-color(98, 8, 0, 255, 8, 8)
+ bounds: 784 64 8 8
+ - image: solid-color(99, 8, 0, 255, 8, 8)
+ bounds: 792 64 8 8
+ - image: solid-color(100, 8, 0, 255, 8, 8)
+ bounds: 800 64 8 8
+ - image: solid-color(101, 8, 0, 255, 8, 8)
+ bounds: 808 64 8 8
+ - image: solid-color(102, 8, 0, 255, 8, 8)
+ bounds: 816 64 8 8
+ - image: solid-color(103, 8, 0, 255, 8, 8)
+ bounds: 824 64 8 8
+ - image: solid-color(104, 8, 0, 255, 8, 8)
+ bounds: 832 64 8 8
+ - image: solid-color(105, 8, 0, 255, 8, 8)
+ bounds: 840 64 8 8
+ - image: solid-color(106, 8, 0, 255, 8, 8)
+ bounds: 848 64 8 8
+ - image: solid-color(107, 8, 0, 255, 8, 8)
+ bounds: 856 64 8 8
+ - image: solid-color(108, 8, 0, 255, 8, 8)
+ bounds: 864 64 8 8
+ - image: solid-color(109, 8, 0, 255, 8, 8)
+ bounds: 872 64 8 8
+ - image: solid-color(110, 8, 0, 255, 8, 8)
+ bounds: 880 64 8 8
+ - image: solid-color(111, 8, 0, 255, 8, 8)
+ bounds: 888 64 8 8
+ - image: solid-color(112, 8, 0, 255, 8, 8)
+ bounds: 896 64 8 8
+ - image: solid-color(113, 8, 0, 255, 8, 8)
+ bounds: 904 64 8 8
+ - image: solid-color(114, 8, 0, 255, 8, 8)
+ bounds: 912 64 8 8
+ - image: solid-color(115, 8, 0, 255, 8, 8)
+ bounds: 920 64 8 8
+ - image: solid-color(116, 8, 0, 255, 8, 8)
+ bounds: 928 64 8 8
+ - image: solid-color(117, 8, 0, 255, 8, 8)
+ bounds: 936 64 8 8
+ - image: solid-color(118, 8, 0, 255, 8, 8)
+ bounds: 944 64 8 8
+ - image: solid-color(119, 8, 0, 255, 8, 8)
+ bounds: 952 64 8 8
+ - image: solid-color(120, 8, 0, 255, 8, 8)
+ bounds: 960 64 8 8
+ - image: solid-color(121, 8, 0, 255, 8, 8)
+ bounds: 968 64 8 8
+ - image: solid-color(122, 8, 0, 255, 8, 8)
+ bounds: 976 64 8 8
+ - image: solid-color(123, 8, 0, 255, 8, 8)
+ bounds: 984 64 8 8
+ - image: solid-color(124, 8, 0, 255, 8, 8)
+ bounds: 992 64 8 8
+ - image: solid-color(125, 8, 0, 255, 8, 8)
+ bounds: 1000 64 8 8
+ - image: solid-color(126, 8, 0, 255, 8, 8)
+ bounds: 1008 64 8 8
+ - image: solid-color(127, 8, 0, 255, 8, 8)
+ bounds: 1016 64 8 8
+ - image: solid-color(0, 9, 0, 255, 8, 8)
+ bounds: 0 72 8 8
+ - image: solid-color(1, 9, 0, 255, 8, 8)
+ bounds: 8 72 8 8
+ - image: solid-color(2, 9, 0, 255, 8, 8)
+ bounds: 16 72 8 8
+ - image: solid-color(3, 9, 0, 255, 8, 8)
+ bounds: 24 72 8 8
+ - image: solid-color(4, 9, 0, 255, 8, 8)
+ bounds: 32 72 8 8
+ - image: solid-color(5, 9, 0, 255, 8, 8)
+ bounds: 40 72 8 8
+ - image: solid-color(6, 9, 0, 255, 8, 8)
+ bounds: 48 72 8 8
+ - image: solid-color(7, 9, 0, 255, 8, 8)
+ bounds: 56 72 8 8
+ - image: solid-color(8, 9, 0, 255, 8, 8)
+ bounds: 64 72 8 8
+ - image: solid-color(9, 9, 0, 255, 8, 8)
+ bounds: 72 72 8 8
+ - image: solid-color(10, 9, 0, 255, 8, 8)
+ bounds: 80 72 8 8
+ - image: solid-color(11, 9, 0, 255, 8, 8)
+ bounds: 88 72 8 8
+ - image: solid-color(12, 9, 0, 255, 8, 8)
+ bounds: 96 72 8 8
+ - image: solid-color(13, 9, 0, 255, 8, 8)
+ bounds: 104 72 8 8
+ - image: solid-color(14, 9, 0, 255, 8, 8)
+ bounds: 112 72 8 8
+ - image: solid-color(15, 9, 0, 255, 8, 8)
+ bounds: 120 72 8 8
+ - image: solid-color(16, 9, 0, 255, 8, 8)
+ bounds: 128 72 8 8
+ - image: solid-color(17, 9, 0, 255, 8, 8)
+ bounds: 136 72 8 8
+ - image: solid-color(18, 9, 0, 255, 8, 8)
+ bounds: 144 72 8 8
+ - image: solid-color(19, 9, 0, 255, 8, 8)
+ bounds: 152 72 8 8
+ - image: solid-color(20, 9, 0, 255, 8, 8)
+ bounds: 160 72 8 8
+ - image: solid-color(21, 9, 0, 255, 8, 8)
+ bounds: 168 72 8 8
+ - image: solid-color(22, 9, 0, 255, 8, 8)
+ bounds: 176 72 8 8
+ - image: solid-color(23, 9, 0, 255, 8, 8)
+ bounds: 184 72 8 8
+ - image: solid-color(24, 9, 0, 255, 8, 8)
+ bounds: 192 72 8 8
+ - image: solid-color(25, 9, 0, 255, 8, 8)
+ bounds: 200 72 8 8
+ - image: solid-color(26, 9, 0, 255, 8, 8)
+ bounds: 208 72 8 8
+ - image: solid-color(27, 9, 0, 255, 8, 8)
+ bounds: 216 72 8 8
+ - image: solid-color(28, 9, 0, 255, 8, 8)
+ bounds: 224 72 8 8
+ - image: solid-color(29, 9, 0, 255, 8, 8)
+ bounds: 232 72 8 8
+ - image: solid-color(30, 9, 0, 255, 8, 8)
+ bounds: 240 72 8 8
+ - image: solid-color(31, 9, 0, 255, 8, 8)
+ bounds: 248 72 8 8
+ - image: solid-color(32, 9, 0, 255, 8, 8)
+ bounds: 256 72 8 8
+ - image: solid-color(33, 9, 0, 255, 8, 8)
+ bounds: 264 72 8 8
+ - image: solid-color(34, 9, 0, 255, 8, 8)
+ bounds: 272 72 8 8
+ - image: solid-color(35, 9, 0, 255, 8, 8)
+ bounds: 280 72 8 8
+ - image: solid-color(36, 9, 0, 255, 8, 8)
+ bounds: 288 72 8 8
+ - image: solid-color(37, 9, 0, 255, 8, 8)
+ bounds: 296 72 8 8
+ - image: solid-color(38, 9, 0, 255, 8, 8)
+ bounds: 304 72 8 8
+ - image: solid-color(39, 9, 0, 255, 8, 8)
+ bounds: 312 72 8 8
+ - image: solid-color(40, 9, 0, 255, 8, 8)
+ bounds: 320 72 8 8
+ - image: solid-color(41, 9, 0, 255, 8, 8)
+ bounds: 328 72 8 8
+ - image: solid-color(42, 9, 0, 255, 8, 8)
+ bounds: 336 72 8 8
+ - image: solid-color(43, 9, 0, 255, 8, 8)
+ bounds: 344 72 8 8
+ - image: solid-color(44, 9, 0, 255, 8, 8)
+ bounds: 352 72 8 8
+ - image: solid-color(45, 9, 0, 255, 8, 8)
+ bounds: 360 72 8 8
+ - image: solid-color(46, 9, 0, 255, 8, 8)
+ bounds: 368 72 8 8
+ - image: solid-color(47, 9, 0, 255, 8, 8)
+ bounds: 376 72 8 8
+ - image: solid-color(48, 9, 0, 255, 8, 8)
+ bounds: 384 72 8 8
+ - image: solid-color(49, 9, 0, 255, 8, 8)
+ bounds: 392 72 8 8
+ - image: solid-color(50, 9, 0, 255, 8, 8)
+ bounds: 400 72 8 8
+ - image: solid-color(51, 9, 0, 255, 8, 8)
+ bounds: 408 72 8 8
+ - image: solid-color(52, 9, 0, 255, 8, 8)
+ bounds: 416 72 8 8
+ - image: solid-color(53, 9, 0, 255, 8, 8)
+ bounds: 424 72 8 8
+ - image: solid-color(54, 9, 0, 255, 8, 8)
+ bounds: 432 72 8 8
+ - image: solid-color(55, 9, 0, 255, 8, 8)
+ bounds: 440 72 8 8
+ - image: solid-color(56, 9, 0, 255, 8, 8)
+ bounds: 448 72 8 8
+ - image: solid-color(57, 9, 0, 255, 8, 8)
+ bounds: 456 72 8 8
+ - image: solid-color(58, 9, 0, 255, 8, 8)
+ bounds: 464 72 8 8
+ - image: solid-color(59, 9, 0, 255, 8, 8)
+ bounds: 472 72 8 8
+ - image: solid-color(60, 9, 0, 255, 8, 8)
+ bounds: 480 72 8 8
+ - image: solid-color(61, 9, 0, 255, 8, 8)
+ bounds: 488 72 8 8
+ - image: solid-color(62, 9, 0, 255, 8, 8)
+ bounds: 496 72 8 8
+ - image: solid-color(63, 9, 0, 255, 8, 8)
+ bounds: 504 72 8 8
+ - image: solid-color(64, 9, 0, 255, 8, 8)
+ bounds: 512 72 8 8
+ - image: solid-color(65, 9, 0, 255, 8, 8)
+ bounds: 520 72 8 8
+ - image: solid-color(66, 9, 0, 255, 8, 8)
+ bounds: 528 72 8 8
+ - image: solid-color(67, 9, 0, 255, 8, 8)
+ bounds: 536 72 8 8
+ - image: solid-color(68, 9, 0, 255, 8, 8)
+ bounds: 544 72 8 8
+ - image: solid-color(69, 9, 0, 255, 8, 8)
+ bounds: 552 72 8 8
+ - image: solid-color(70, 9, 0, 255, 8, 8)
+ bounds: 560 72 8 8
+ - image: solid-color(71, 9, 0, 255, 8, 8)
+ bounds: 568 72 8 8
+ - image: solid-color(72, 9, 0, 255, 8, 8)
+ bounds: 576 72 8 8
+ - image: solid-color(73, 9, 0, 255, 8, 8)
+ bounds: 584 72 8 8
+ - image: solid-color(74, 9, 0, 255, 8, 8)
+ bounds: 592 72 8 8
+ - image: solid-color(75, 9, 0, 255, 8, 8)
+ bounds: 600 72 8 8
+ - image: solid-color(76, 9, 0, 255, 8, 8)
+ bounds: 608 72 8 8
+ - image: solid-color(77, 9, 0, 255, 8, 8)
+ bounds: 616 72 8 8
+ - image: solid-color(78, 9, 0, 255, 8, 8)
+ bounds: 624 72 8 8
+ - image: solid-color(79, 9, 0, 255, 8, 8)
+ bounds: 632 72 8 8
+ - image: solid-color(80, 9, 0, 255, 8, 8)
+ bounds: 640 72 8 8
+ - image: solid-color(81, 9, 0, 255, 8, 8)
+ bounds: 648 72 8 8
+ - image: solid-color(82, 9, 0, 255, 8, 8)
+ bounds: 656 72 8 8
+ - image: solid-color(83, 9, 0, 255, 8, 8)
+ bounds: 664 72 8 8
+ - image: solid-color(84, 9, 0, 255, 8, 8)
+ bounds: 672 72 8 8
+ - image: solid-color(85, 9, 0, 255, 8, 8)
+ bounds: 680 72 8 8
+ - image: solid-color(86, 9, 0, 255, 8, 8)
+ bounds: 688 72 8 8
+ - image: solid-color(87, 9, 0, 255, 8, 8)
+ bounds: 696 72 8 8
+ - image: solid-color(88, 9, 0, 255, 8, 8)
+ bounds: 704 72 8 8
+ - image: solid-color(89, 9, 0, 255, 8, 8)
+ bounds: 712 72 8 8
+ - image: solid-color(90, 9, 0, 255, 8, 8)
+ bounds: 720 72 8 8
+ - image: solid-color(91, 9, 0, 255, 8, 8)
+ bounds: 728 72 8 8
+ - image: solid-color(92, 9, 0, 255, 8, 8)
+ bounds: 736 72 8 8
+ - image: solid-color(93, 9, 0, 255, 8, 8)
+ bounds: 744 72 8 8
+ - image: solid-color(94, 9, 0, 255, 8, 8)
+ bounds: 752 72 8 8
+ - image: solid-color(95, 9, 0, 255, 8, 8)
+ bounds: 760 72 8 8
+ - image: solid-color(96, 9, 0, 255, 8, 8)
+ bounds: 768 72 8 8
+ - image: solid-color(97, 9, 0, 255, 8, 8)
+ bounds: 776 72 8 8
+ - image: solid-color(98, 9, 0, 255, 8, 8)
+ bounds: 784 72 8 8
+ - image: solid-color(99, 9, 0, 255, 8, 8)
+ bounds: 792 72 8 8
+ - image: solid-color(100, 9, 0, 255, 8, 8)
+ bounds: 800 72 8 8
+ - image: solid-color(101, 9, 0, 255, 8, 8)
+ bounds: 808 72 8 8
+ - image: solid-color(102, 9, 0, 255, 8, 8)
+ bounds: 816 72 8 8
+ - image: solid-color(103, 9, 0, 255, 8, 8)
+ bounds: 824 72 8 8
+ - image: solid-color(104, 9, 0, 255, 8, 8)
+ bounds: 832 72 8 8
+ - image: solid-color(105, 9, 0, 255, 8, 8)
+ bounds: 840 72 8 8
+ - image: solid-color(106, 9, 0, 255, 8, 8)
+ bounds: 848 72 8 8
+ - image: solid-color(107, 9, 0, 255, 8, 8)
+ bounds: 856 72 8 8
+ - image: solid-color(108, 9, 0, 255, 8, 8)
+ bounds: 864 72 8 8
+ - image: solid-color(109, 9, 0, 255, 8, 8)
+ bounds: 872 72 8 8
+ - image: solid-color(110, 9, 0, 255, 8, 8)
+ bounds: 880 72 8 8
+ - image: solid-color(111, 9, 0, 255, 8, 8)
+ bounds: 888 72 8 8
+ - image: solid-color(112, 9, 0, 255, 8, 8)
+ bounds: 896 72 8 8
+ - image: solid-color(113, 9, 0, 255, 8, 8)
+ bounds: 904 72 8 8
+ - image: solid-color(114, 9, 0, 255, 8, 8)
+ bounds: 912 72 8 8
+ - image: solid-color(115, 9, 0, 255, 8, 8)
+ bounds: 920 72 8 8
+ - image: solid-color(116, 9, 0, 255, 8, 8)
+ bounds: 928 72 8 8
+ - image: solid-color(117, 9, 0, 255, 8, 8)
+ bounds: 936 72 8 8
+ - image: solid-color(118, 9, 0, 255, 8, 8)
+ bounds: 944 72 8 8
+ - image: solid-color(119, 9, 0, 255, 8, 8)
+ bounds: 952 72 8 8
+ - image: solid-color(120, 9, 0, 255, 8, 8)
+ bounds: 960 72 8 8
+ - image: solid-color(121, 9, 0, 255, 8, 8)
+ bounds: 968 72 8 8
+ - image: solid-color(122, 9, 0, 255, 8, 8)
+ bounds: 976 72 8 8
+ - image: solid-color(123, 9, 0, 255, 8, 8)
+ bounds: 984 72 8 8
+ - image: solid-color(124, 9, 0, 255, 8, 8)
+ bounds: 992 72 8 8
+ - image: solid-color(125, 9, 0, 255, 8, 8)
+ bounds: 1000 72 8 8
+ - image: solid-color(126, 9, 0, 255, 8, 8)
+ bounds: 1008 72 8 8
+ - image: solid-color(127, 9, 0, 255, 8, 8)
+ bounds: 1016 72 8 8
+ - image: solid-color(0, 10, 0, 255, 8, 8)
+ bounds: 0 80 8 8
+ - image: solid-color(1, 10, 0, 255, 8, 8)
+ bounds: 8 80 8 8
+ - image: solid-color(2, 10, 0, 255, 8, 8)
+ bounds: 16 80 8 8
+ - image: solid-color(3, 10, 0, 255, 8, 8)
+ bounds: 24 80 8 8
+ - image: solid-color(4, 10, 0, 255, 8, 8)
+ bounds: 32 80 8 8
+ - image: solid-color(5, 10, 0, 255, 8, 8)
+ bounds: 40 80 8 8
+ - image: solid-color(6, 10, 0, 255, 8, 8)
+ bounds: 48 80 8 8
+ - image: solid-color(7, 10, 0, 255, 8, 8)
+ bounds: 56 80 8 8
+ - image: solid-color(8, 10, 0, 255, 8, 8)
+ bounds: 64 80 8 8
+ - image: solid-color(9, 10, 0, 255, 8, 8)
+ bounds: 72 80 8 8
+ - image: solid-color(10, 10, 0, 255, 8, 8)
+ bounds: 80 80 8 8
+ - image: solid-color(11, 10, 0, 255, 8, 8)
+ bounds: 88 80 8 8
+ - image: solid-color(12, 10, 0, 255, 8, 8)
+ bounds: 96 80 8 8
+ - image: solid-color(13, 10, 0, 255, 8, 8)
+ bounds: 104 80 8 8
+ - image: solid-color(14, 10, 0, 255, 8, 8)
+ bounds: 112 80 8 8
+ - image: solid-color(15, 10, 0, 255, 8, 8)
+ bounds: 120 80 8 8
+ - image: solid-color(16, 10, 0, 255, 8, 8)
+ bounds: 128 80 8 8
+ - image: solid-color(17, 10, 0, 255, 8, 8)
+ bounds: 136 80 8 8
+ - image: solid-color(18, 10, 0, 255, 8, 8)
+ bounds: 144 80 8 8
+ - image: solid-color(19, 10, 0, 255, 8, 8)
+ bounds: 152 80 8 8
+ - image: solid-color(20, 10, 0, 255, 8, 8)
+ bounds: 160 80 8 8
+ - image: solid-color(21, 10, 0, 255, 8, 8)
+ bounds: 168 80 8 8
+ - image: solid-color(22, 10, 0, 255, 8, 8)
+ bounds: 176 80 8 8
+ - image: solid-color(23, 10, 0, 255, 8, 8)
+ bounds: 184 80 8 8
+ - image: solid-color(24, 10, 0, 255, 8, 8)
+ bounds: 192 80 8 8
+ - image: solid-color(25, 10, 0, 255, 8, 8)
+ bounds: 200 80 8 8
+ - image: solid-color(26, 10, 0, 255, 8, 8)
+ bounds: 208 80 8 8
+ - image: solid-color(27, 10, 0, 255, 8, 8)
+ bounds: 216 80 8 8
+ - image: solid-color(28, 10, 0, 255, 8, 8)
+ bounds: 224 80 8 8
+ - image: solid-color(29, 10, 0, 255, 8, 8)
+ bounds: 232 80 8 8
+ - image: solid-color(30, 10, 0, 255, 8, 8)
+ bounds: 240 80 8 8
+ - image: solid-color(31, 10, 0, 255, 8, 8)
+ bounds: 248 80 8 8
+ - image: solid-color(32, 10, 0, 255, 8, 8)
+ bounds: 256 80 8 8
+ - image: solid-color(33, 10, 0, 255, 8, 8)
+ bounds: 264 80 8 8
+ - image: solid-color(34, 10, 0, 255, 8, 8)
+ bounds: 272 80 8 8
+ - image: solid-color(35, 10, 0, 255, 8, 8)
+ bounds: 280 80 8 8
+ - image: solid-color(36, 10, 0, 255, 8, 8)
+ bounds: 288 80 8 8
+ - image: solid-color(37, 10, 0, 255, 8, 8)
+ bounds: 296 80 8 8
+ - image: solid-color(38, 10, 0, 255, 8, 8)
+ bounds: 304 80 8 8
+ - image: solid-color(39, 10, 0, 255, 8, 8)
+ bounds: 312 80 8 8
+ - image: solid-color(40, 10, 0, 255, 8, 8)
+ bounds: 320 80 8 8
+ - image: solid-color(41, 10, 0, 255, 8, 8)
+ bounds: 328 80 8 8
+ - image: solid-color(42, 10, 0, 255, 8, 8)
+ bounds: 336 80 8 8
+ - image: solid-color(43, 10, 0, 255, 8, 8)
+ bounds: 344 80 8 8
+ - image: solid-color(44, 10, 0, 255, 8, 8)
+ bounds: 352 80 8 8
+ - image: solid-color(45, 10, 0, 255, 8, 8)
+ bounds: 360 80 8 8
+ - image: solid-color(46, 10, 0, 255, 8, 8)
+ bounds: 368 80 8 8
+ - image: solid-color(47, 10, 0, 255, 8, 8)
+ bounds: 376 80 8 8
+ - image: solid-color(48, 10, 0, 255, 8, 8)
+ bounds: 384 80 8 8
+ - image: solid-color(49, 10, 0, 255, 8, 8)
+ bounds: 392 80 8 8
+ - image: solid-color(50, 10, 0, 255, 8, 8)
+ bounds: 400 80 8 8
+ - image: solid-color(51, 10, 0, 255, 8, 8)
+ bounds: 408 80 8 8
+ - image: solid-color(52, 10, 0, 255, 8, 8)
+ bounds: 416 80 8 8
+ - image: solid-color(53, 10, 0, 255, 8, 8)
+ bounds: 424 80 8 8
+ - image: solid-color(54, 10, 0, 255, 8, 8)
+ bounds: 432 80 8 8
+ - image: solid-color(55, 10, 0, 255, 8, 8)
+ bounds: 440 80 8 8
+ - image: solid-color(56, 10, 0, 255, 8, 8)
+ bounds: 448 80 8 8
+ - image: solid-color(57, 10, 0, 255, 8, 8)
+ bounds: 456 80 8 8
+ - image: solid-color(58, 10, 0, 255, 8, 8)
+ bounds: 464 80 8 8
+ - image: solid-color(59, 10, 0, 255, 8, 8)
+ bounds: 472 80 8 8
+ - image: solid-color(60, 10, 0, 255, 8, 8)
+ bounds: 480 80 8 8
+ - image: solid-color(61, 10, 0, 255, 8, 8)
+ bounds: 488 80 8 8
+ - image: solid-color(62, 10, 0, 255, 8, 8)
+ bounds: 496 80 8 8
+ - image: solid-color(63, 10, 0, 255, 8, 8)
+ bounds: 504 80 8 8
+ - image: solid-color(64, 10, 0, 255, 8, 8)
+ bounds: 512 80 8 8
+ - image: solid-color(65, 10, 0, 255, 8, 8)
+ bounds: 520 80 8 8
+ - image: solid-color(66, 10, 0, 255, 8, 8)
+ bounds: 528 80 8 8
+ - image: solid-color(67, 10, 0, 255, 8, 8)
+ bounds: 536 80 8 8
+ - image: solid-color(68, 10, 0, 255, 8, 8)
+ bounds: 544 80 8 8
+ - image: solid-color(69, 10, 0, 255, 8, 8)
+ bounds: 552 80 8 8
+ - image: solid-color(70, 10, 0, 255, 8, 8)
+ bounds: 560 80 8 8
+ - image: solid-color(71, 10, 0, 255, 8, 8)
+ bounds: 568 80 8 8
+ - image: solid-color(72, 10, 0, 255, 8, 8)
+ bounds: 576 80 8 8
+ - image: solid-color(73, 10, 0, 255, 8, 8)
+ bounds: 584 80 8 8
+ - image: solid-color(74, 10, 0, 255, 8, 8)
+ bounds: 592 80 8 8
+ - image: solid-color(75, 10, 0, 255, 8, 8)
+ bounds: 600 80 8 8
+ - image: solid-color(76, 10, 0, 255, 8, 8)
+ bounds: 608 80 8 8
+ - image: solid-color(77, 10, 0, 255, 8, 8)
+ bounds: 616 80 8 8
+ - image: solid-color(78, 10, 0, 255, 8, 8)
+ bounds: 624 80 8 8
+ - image: solid-color(79, 10, 0, 255, 8, 8)
+ bounds: 632 80 8 8
+ - image: solid-color(80, 10, 0, 255, 8, 8)
+ bounds: 640 80 8 8
+ - image: solid-color(81, 10, 0, 255, 8, 8)
+ bounds: 648 80 8 8
+ - image: solid-color(82, 10, 0, 255, 8, 8)
+ bounds: 656 80 8 8
+ - image: solid-color(83, 10, 0, 255, 8, 8)
+ bounds: 664 80 8 8
+ - image: solid-color(84, 10, 0, 255, 8, 8)
+ bounds: 672 80 8 8
+ - image: solid-color(85, 10, 0, 255, 8, 8)
+ bounds: 680 80 8 8
+ - image: solid-color(86, 10, 0, 255, 8, 8)
+ bounds: 688 80 8 8
+ - image: solid-color(87, 10, 0, 255, 8, 8)
+ bounds: 696 80 8 8
+ - image: solid-color(88, 10, 0, 255, 8, 8)
+ bounds: 704 80 8 8
+ - image: solid-color(89, 10, 0, 255, 8, 8)
+ bounds: 712 80 8 8
+ - image: solid-color(90, 10, 0, 255, 8, 8)
+ bounds: 720 80 8 8
+ - image: solid-color(91, 10, 0, 255, 8, 8)
+ bounds: 728 80 8 8
+ - image: solid-color(92, 10, 0, 255, 8, 8)
+ bounds: 736 80 8 8
+ - image: solid-color(93, 10, 0, 255, 8, 8)
+ bounds: 744 80 8 8
+ - image: solid-color(94, 10, 0, 255, 8, 8)
+ bounds: 752 80 8 8
+ - image: solid-color(95, 10, 0, 255, 8, 8)
+ bounds: 760 80 8 8
+ - image: solid-color(96, 10, 0, 255, 8, 8)
+ bounds: 768 80 8 8
+ - image: solid-color(97, 10, 0, 255, 8, 8)
+ bounds: 776 80 8 8
+ - image: solid-color(98, 10, 0, 255, 8, 8)
+ bounds: 784 80 8 8
+ - image: solid-color(99, 10, 0, 255, 8, 8)
+ bounds: 792 80 8 8
+ - image: solid-color(100, 10, 0, 255, 8, 8)
+ bounds: 800 80 8 8
+ - image: solid-color(101, 10, 0, 255, 8, 8)
+ bounds: 808 80 8 8
+ - image: solid-color(102, 10, 0, 255, 8, 8)
+ bounds: 816 80 8 8
+ - image: solid-color(103, 10, 0, 255, 8, 8)
+ bounds: 824 80 8 8
+ - image: solid-color(104, 10, 0, 255, 8, 8)
+ bounds: 832 80 8 8
+ - image: solid-color(105, 10, 0, 255, 8, 8)
+ bounds: 840 80 8 8
+ - image: solid-color(106, 10, 0, 255, 8, 8)
+ bounds: 848 80 8 8
+ - image: solid-color(107, 10, 0, 255, 8, 8)
+ bounds: 856 80 8 8
+ - image: solid-color(108, 10, 0, 255, 8, 8)
+ bounds: 864 80 8 8
+ - image: solid-color(109, 10, 0, 255, 8, 8)
+ bounds: 872 80 8 8
+ - image: solid-color(110, 10, 0, 255, 8, 8)
+ bounds: 880 80 8 8
+ - image: solid-color(111, 10, 0, 255, 8, 8)
+ bounds: 888 80 8 8
+ - image: solid-color(112, 10, 0, 255, 8, 8)
+ bounds: 896 80 8 8
+ - image: solid-color(113, 10, 0, 255, 8, 8)
+ bounds: 904 80 8 8
+ - image: solid-color(114, 10, 0, 255, 8, 8)
+ bounds: 912 80 8 8
+ - image: solid-color(115, 10, 0, 255, 8, 8)
+ bounds: 920 80 8 8
+ - image: solid-color(116, 10, 0, 255, 8, 8)
+ bounds: 928 80 8 8
+ - image: solid-color(117, 10, 0, 255, 8, 8)
+ bounds: 936 80 8 8
+ - image: solid-color(118, 10, 0, 255, 8, 8)
+ bounds: 944 80 8 8
+ - image: solid-color(119, 10, 0, 255, 8, 8)
+ bounds: 952 80 8 8
+ - image: solid-color(120, 10, 0, 255, 8, 8)
+ bounds: 960 80 8 8
+ - image: solid-color(121, 10, 0, 255, 8, 8)
+ bounds: 968 80 8 8
+ - image: solid-color(122, 10, 0, 255, 8, 8)
+ bounds: 976 80 8 8
+ - image: solid-color(123, 10, 0, 255, 8, 8)
+ bounds: 984 80 8 8
+ - image: solid-color(124, 10, 0, 255, 8, 8)
+ bounds: 992 80 8 8
+ - image: solid-color(125, 10, 0, 255, 8, 8)
+ bounds: 1000 80 8 8
+ - image: solid-color(126, 10, 0, 255, 8, 8)
+ bounds: 1008 80 8 8
+ - image: solid-color(127, 10, 0, 255, 8, 8)
+ bounds: 1016 80 8 8
+ - image: solid-color(0, 11, 0, 255, 8, 8)
+ bounds: 0 88 8 8
+ - image: solid-color(1, 11, 0, 255, 8, 8)
+ bounds: 8 88 8 8
+ - image: solid-color(2, 11, 0, 255, 8, 8)
+ bounds: 16 88 8 8
+ - image: solid-color(3, 11, 0, 255, 8, 8)
+ bounds: 24 88 8 8
+ - image: solid-color(4, 11, 0, 255, 8, 8)
+ bounds: 32 88 8 8
+ - image: solid-color(5, 11, 0, 255, 8, 8)
+ bounds: 40 88 8 8
+ - image: solid-color(6, 11, 0, 255, 8, 8)
+ bounds: 48 88 8 8
+ - image: solid-color(7, 11, 0, 255, 8, 8)
+ bounds: 56 88 8 8
+ - image: solid-color(8, 11, 0, 255, 8, 8)
+ bounds: 64 88 8 8
+ - image: solid-color(9, 11, 0, 255, 8, 8)
+ bounds: 72 88 8 8
+ - image: solid-color(10, 11, 0, 255, 8, 8)
+ bounds: 80 88 8 8
+ - image: solid-color(11, 11, 0, 255, 8, 8)
+ bounds: 88 88 8 8
+ - image: solid-color(12, 11, 0, 255, 8, 8)
+ bounds: 96 88 8 8
+ - image: solid-color(13, 11, 0, 255, 8, 8)
+ bounds: 104 88 8 8
+ - image: solid-color(14, 11, 0, 255, 8, 8)
+ bounds: 112 88 8 8
+ - image: solid-color(15, 11, 0, 255, 8, 8)
+ bounds: 120 88 8 8
+ - image: solid-color(16, 11, 0, 255, 8, 8)
+ bounds: 128 88 8 8
+ - image: solid-color(17, 11, 0, 255, 8, 8)
+ bounds: 136 88 8 8
+ - image: solid-color(18, 11, 0, 255, 8, 8)
+ bounds: 144 88 8 8
+ - image: solid-color(19, 11, 0, 255, 8, 8)
+ bounds: 152 88 8 8
+ - image: solid-color(20, 11, 0, 255, 8, 8)
+ bounds: 160 88 8 8
+ - image: solid-color(21, 11, 0, 255, 8, 8)
+ bounds: 168 88 8 8
+ - image: solid-color(22, 11, 0, 255, 8, 8)
+ bounds: 176 88 8 8
+ - image: solid-color(23, 11, 0, 255, 8, 8)
+ bounds: 184 88 8 8
+ - image: solid-color(24, 11, 0, 255, 8, 8)
+ bounds: 192 88 8 8
+ - image: solid-color(25, 11, 0, 255, 8, 8)
+ bounds: 200 88 8 8
+ - image: solid-color(26, 11, 0, 255, 8, 8)
+ bounds: 208 88 8 8
+ - image: solid-color(27, 11, 0, 255, 8, 8)
+ bounds: 216 88 8 8
+ - image: solid-color(28, 11, 0, 255, 8, 8)
+ bounds: 224 88 8 8
+ - image: solid-color(29, 11, 0, 255, 8, 8)
+ bounds: 232 88 8 8
+ - image: solid-color(30, 11, 0, 255, 8, 8)
+ bounds: 240 88 8 8
+ - image: solid-color(31, 11, 0, 255, 8, 8)
+ bounds: 248 88 8 8
+ - image: solid-color(32, 11, 0, 255, 8, 8)
+ bounds: 256 88 8 8
+ - image: solid-color(33, 11, 0, 255, 8, 8)
+ bounds: 264 88 8 8
+ - image: solid-color(34, 11, 0, 255, 8, 8)
+ bounds: 272 88 8 8
+ - image: solid-color(35, 11, 0, 255, 8, 8)
+ bounds: 280 88 8 8
+ - image: solid-color(36, 11, 0, 255, 8, 8)
+ bounds: 288 88 8 8
+ - image: solid-color(37, 11, 0, 255, 8, 8)
+ bounds: 296 88 8 8
+ - image: solid-color(38, 11, 0, 255, 8, 8)
+ bounds: 304 88 8 8
+ - image: solid-color(39, 11, 0, 255, 8, 8)
+ bounds: 312 88 8 8
+ - image: solid-color(40, 11, 0, 255, 8, 8)
+ bounds: 320 88 8 8
+ - image: solid-color(41, 11, 0, 255, 8, 8)
+ bounds: 328 88 8 8
+ - image: solid-color(42, 11, 0, 255, 8, 8)
+ bounds: 336 88 8 8
+ - image: solid-color(43, 11, 0, 255, 8, 8)
+ bounds: 344 88 8 8
+ - image: solid-color(44, 11, 0, 255, 8, 8)
+ bounds: 352 88 8 8
+ - image: solid-color(45, 11, 0, 255, 8, 8)
+ bounds: 360 88 8 8
+ - image: solid-color(46, 11, 0, 255, 8, 8)
+ bounds: 368 88 8 8
+ - image: solid-color(47, 11, 0, 255, 8, 8)
+ bounds: 376 88 8 8
+ - image: solid-color(48, 11, 0, 255, 8, 8)
+ bounds: 384 88 8 8
+ - image: solid-color(49, 11, 0, 255, 8, 8)
+ bounds: 392 88 8 8
+ - image: solid-color(50, 11, 0, 255, 8, 8)
+ bounds: 400 88 8 8
+ - image: solid-color(51, 11, 0, 255, 8, 8)
+ bounds: 408 88 8 8
+ - image: solid-color(52, 11, 0, 255, 8, 8)
+ bounds: 416 88 8 8
+ - image: solid-color(53, 11, 0, 255, 8, 8)
+ bounds: 424 88 8 8
+ - image: solid-color(54, 11, 0, 255, 8, 8)
+ bounds: 432 88 8 8
+ - image: solid-color(55, 11, 0, 255, 8, 8)
+ bounds: 440 88 8 8
+ - image: solid-color(56, 11, 0, 255, 8, 8)
+ bounds: 448 88 8 8
+ - image: solid-color(57, 11, 0, 255, 8, 8)
+ bounds: 456 88 8 8
+ - image: solid-color(58, 11, 0, 255, 8, 8)
+ bounds: 464 88 8 8
+ - image: solid-color(59, 11, 0, 255, 8, 8)
+ bounds: 472 88 8 8
+ - image: solid-color(60, 11, 0, 255, 8, 8)
+ bounds: 480 88 8 8
+ - image: solid-color(61, 11, 0, 255, 8, 8)
+ bounds: 488 88 8 8
+ - image: solid-color(62, 11, 0, 255, 8, 8)
+ bounds: 496 88 8 8
+ - image: solid-color(63, 11, 0, 255, 8, 8)
+ bounds: 504 88 8 8
+ - image: solid-color(64, 11, 0, 255, 8, 8)
+ bounds: 512 88 8 8
+ - image: solid-color(65, 11, 0, 255, 8, 8)
+ bounds: 520 88 8 8
+ - image: solid-color(66, 11, 0, 255, 8, 8)
+ bounds: 528 88 8 8
+ - image: solid-color(67, 11, 0, 255, 8, 8)
+ bounds: 536 88 8 8
+ - image: solid-color(68, 11, 0, 255, 8, 8)
+ bounds: 544 88 8 8
+ - image: solid-color(69, 11, 0, 255, 8, 8)
+ bounds: 552 88 8 8
+ - image: solid-color(70, 11, 0, 255, 8, 8)
+ bounds: 560 88 8 8
+ - image: solid-color(71, 11, 0, 255, 8, 8)
+ bounds: 568 88 8 8
+ - image: solid-color(72, 11, 0, 255, 8, 8)
+ bounds: 576 88 8 8
+ - image: solid-color(73, 11, 0, 255, 8, 8)
+ bounds: 584 88 8 8
+ - image: solid-color(74, 11, 0, 255, 8, 8)
+ bounds: 592 88 8 8
+ - image: solid-color(75, 11, 0, 255, 8, 8)
+ bounds: 600 88 8 8
+ - image: solid-color(76, 11, 0, 255, 8, 8)
+ bounds: 608 88 8 8
+ - image: solid-color(77, 11, 0, 255, 8, 8)
+ bounds: 616 88 8 8
+ - image: solid-color(78, 11, 0, 255, 8, 8)
+ bounds: 624 88 8 8
+ - image: solid-color(79, 11, 0, 255, 8, 8)
+ bounds: 632 88 8 8
+ - image: solid-color(80, 11, 0, 255, 8, 8)
+ bounds: 640 88 8 8
+ - image: solid-color(81, 11, 0, 255, 8, 8)
+ bounds: 648 88 8 8
+ - image: solid-color(82, 11, 0, 255, 8, 8)
+ bounds: 656 88 8 8
+ - image: solid-color(83, 11, 0, 255, 8, 8)
+ bounds: 664 88 8 8
+ - image: solid-color(84, 11, 0, 255, 8, 8)
+ bounds: 672 88 8 8
+ - image: solid-color(85, 11, 0, 255, 8, 8)
+ bounds: 680 88 8 8
+ - image: solid-color(86, 11, 0, 255, 8, 8)
+ bounds: 688 88 8 8
+ - image: solid-color(87, 11, 0, 255, 8, 8)
+ bounds: 696 88 8 8
+ - image: solid-color(88, 11, 0, 255, 8, 8)
+ bounds: 704 88 8 8
+ - image: solid-color(89, 11, 0, 255, 8, 8)
+ bounds: 712 88 8 8
+ - image: solid-color(90, 11, 0, 255, 8, 8)
+ bounds: 720 88 8 8
+ - image: solid-color(91, 11, 0, 255, 8, 8)
+ bounds: 728 88 8 8
+ - image: solid-color(92, 11, 0, 255, 8, 8)
+ bounds: 736 88 8 8
+ - image: solid-color(93, 11, 0, 255, 8, 8)
+ bounds: 744 88 8 8
+ - image: solid-color(94, 11, 0, 255, 8, 8)
+ bounds: 752 88 8 8
+ - image: solid-color(95, 11, 0, 255, 8, 8)
+ bounds: 760 88 8 8
+ - image: solid-color(96, 11, 0, 255, 8, 8)
+ bounds: 768 88 8 8
+ - image: solid-color(97, 11, 0, 255, 8, 8)
+ bounds: 776 88 8 8
+ - image: solid-color(98, 11, 0, 255, 8, 8)
+ bounds: 784 88 8 8
+ - image: solid-color(99, 11, 0, 255, 8, 8)
+ bounds: 792 88 8 8
+ - image: solid-color(100, 11, 0, 255, 8, 8)
+ bounds: 800 88 8 8
+ - image: solid-color(101, 11, 0, 255, 8, 8)
+ bounds: 808 88 8 8
+ - image: solid-color(102, 11, 0, 255, 8, 8)
+ bounds: 816 88 8 8
+ - image: solid-color(103, 11, 0, 255, 8, 8)
+ bounds: 824 88 8 8
+ - image: solid-color(104, 11, 0, 255, 8, 8)
+ bounds: 832 88 8 8
+ - image: solid-color(105, 11, 0, 255, 8, 8)
+ bounds: 840 88 8 8
+ - image: solid-color(106, 11, 0, 255, 8, 8)
+ bounds: 848 88 8 8
+ - image: solid-color(107, 11, 0, 255, 8, 8)
+ bounds: 856 88 8 8
+ - image: solid-color(108, 11, 0, 255, 8, 8)
+ bounds: 864 88 8 8
+ - image: solid-color(109, 11, 0, 255, 8, 8)
+ bounds: 872 88 8 8
+ - image: solid-color(110, 11, 0, 255, 8, 8)
+ bounds: 880 88 8 8
+ - image: solid-color(111, 11, 0, 255, 8, 8)
+ bounds: 888 88 8 8
+ - image: solid-color(112, 11, 0, 255, 8, 8)
+ bounds: 896 88 8 8
+ - image: solid-color(113, 11, 0, 255, 8, 8)
+ bounds: 904 88 8 8
+ - image: solid-color(114, 11, 0, 255, 8, 8)
+ bounds: 912 88 8 8
+ - image: solid-color(115, 11, 0, 255, 8, 8)
+ bounds: 920 88 8 8
+ - image: solid-color(116, 11, 0, 255, 8, 8)
+ bounds: 928 88 8 8
+ - image: solid-color(117, 11, 0, 255, 8, 8)
+ bounds: 936 88 8 8
+ - image: solid-color(118, 11, 0, 255, 8, 8)
+ bounds: 944 88 8 8
+ - image: solid-color(119, 11, 0, 255, 8, 8)
+ bounds: 952 88 8 8
+ - image: solid-color(120, 11, 0, 255, 8, 8)
+ bounds: 960 88 8 8
+ - image: solid-color(121, 11, 0, 255, 8, 8)
+ bounds: 968 88 8 8
+ - image: solid-color(122, 11, 0, 255, 8, 8)
+ bounds: 976 88 8 8
+ - image: solid-color(123, 11, 0, 255, 8, 8)
+ bounds: 984 88 8 8
+ - image: solid-color(124, 11, 0, 255, 8, 8)
+ bounds: 992 88 8 8
+ - image: solid-color(125, 11, 0, 255, 8, 8)
+ bounds: 1000 88 8 8
+ - image: solid-color(126, 11, 0, 255, 8, 8)
+ bounds: 1008 88 8 8
+ - image: solid-color(127, 11, 0, 255, 8, 8)
+ bounds: 1016 88 8 8
+ - image: solid-color(0, 12, 0, 255, 8, 8)
+ bounds: 0 96 8 8
+ - image: solid-color(1, 12, 0, 255, 8, 8)
+ bounds: 8 96 8 8
+ - image: solid-color(2, 12, 0, 255, 8, 8)
+ bounds: 16 96 8 8
+ - image: solid-color(3, 12, 0, 255, 8, 8)
+ bounds: 24 96 8 8
+ - image: solid-color(4, 12, 0, 255, 8, 8)
+ bounds: 32 96 8 8
+ - image: solid-color(5, 12, 0, 255, 8, 8)
+ bounds: 40 96 8 8
+ - image: solid-color(6, 12, 0, 255, 8, 8)
+ bounds: 48 96 8 8
+ - image: solid-color(7, 12, 0, 255, 8, 8)
+ bounds: 56 96 8 8
+ - image: solid-color(8, 12, 0, 255, 8, 8)
+ bounds: 64 96 8 8
+ - image: solid-color(9, 12, 0, 255, 8, 8)
+ bounds: 72 96 8 8
+ - image: solid-color(10, 12, 0, 255, 8, 8)
+ bounds: 80 96 8 8
+ - image: solid-color(11, 12, 0, 255, 8, 8)
+ bounds: 88 96 8 8
+ - image: solid-color(12, 12, 0, 255, 8, 8)
+ bounds: 96 96 8 8
+ - image: solid-color(13, 12, 0, 255, 8, 8)
+ bounds: 104 96 8 8
+ - image: solid-color(14, 12, 0, 255, 8, 8)
+ bounds: 112 96 8 8
+ - image: solid-color(15, 12, 0, 255, 8, 8)
+ bounds: 120 96 8 8
+ - image: solid-color(16, 12, 0, 255, 8, 8)
+ bounds: 128 96 8 8
+ - image: solid-color(17, 12, 0, 255, 8, 8)
+ bounds: 136 96 8 8
+ - image: solid-color(18, 12, 0, 255, 8, 8)
+ bounds: 144 96 8 8
+ - image: solid-color(19, 12, 0, 255, 8, 8)
+ bounds: 152 96 8 8
+ - image: solid-color(20, 12, 0, 255, 8, 8)
+ bounds: 160 96 8 8
+ - image: solid-color(21, 12, 0, 255, 8, 8)
+ bounds: 168 96 8 8
+ - image: solid-color(22, 12, 0, 255, 8, 8)
+ bounds: 176 96 8 8
+ - image: solid-color(23, 12, 0, 255, 8, 8)
+ bounds: 184 96 8 8
+ - image: solid-color(24, 12, 0, 255, 8, 8)
+ bounds: 192 96 8 8
+ - image: solid-color(25, 12, 0, 255, 8, 8)
+ bounds: 200 96 8 8
+ - image: solid-color(26, 12, 0, 255, 8, 8)
+ bounds: 208 96 8 8
+ - image: solid-color(27, 12, 0, 255, 8, 8)
+ bounds: 216 96 8 8
+ - image: solid-color(28, 12, 0, 255, 8, 8)
+ bounds: 224 96 8 8
+ - image: solid-color(29, 12, 0, 255, 8, 8)
+ bounds: 232 96 8 8
+ - image: solid-color(30, 12, 0, 255, 8, 8)
+ bounds: 240 96 8 8
+ - image: solid-color(31, 12, 0, 255, 8, 8)
+ bounds: 248 96 8 8
+ - image: solid-color(32, 12, 0, 255, 8, 8)
+ bounds: 256 96 8 8
+ - image: solid-color(33, 12, 0, 255, 8, 8)
+ bounds: 264 96 8 8
+ - image: solid-color(34, 12, 0, 255, 8, 8)
+ bounds: 272 96 8 8
+ - image: solid-color(35, 12, 0, 255, 8, 8)
+ bounds: 280 96 8 8
+ - image: solid-color(36, 12, 0, 255, 8, 8)
+ bounds: 288 96 8 8
+ - image: solid-color(37, 12, 0, 255, 8, 8)
+ bounds: 296 96 8 8
+ - image: solid-color(38, 12, 0, 255, 8, 8)
+ bounds: 304 96 8 8
+ - image: solid-color(39, 12, 0, 255, 8, 8)
+ bounds: 312 96 8 8
+ - image: solid-color(40, 12, 0, 255, 8, 8)
+ bounds: 320 96 8 8
+ - image: solid-color(41, 12, 0, 255, 8, 8)
+ bounds: 328 96 8 8
+ - image: solid-color(42, 12, 0, 255, 8, 8)
+ bounds: 336 96 8 8
+ - image: solid-color(43, 12, 0, 255, 8, 8)
+ bounds: 344 96 8 8
+ - image: solid-color(44, 12, 0, 255, 8, 8)
+ bounds: 352 96 8 8
+ - image: solid-color(45, 12, 0, 255, 8, 8)
+ bounds: 360 96 8 8
+ - image: solid-color(46, 12, 0, 255, 8, 8)
+ bounds: 368 96 8 8
+ - image: solid-color(47, 12, 0, 255, 8, 8)
+ bounds: 376 96 8 8
+ - image: solid-color(48, 12, 0, 255, 8, 8)
+ bounds: 384 96 8 8
+ - image: solid-color(49, 12, 0, 255, 8, 8)
+ bounds: 392 96 8 8
+ - image: solid-color(50, 12, 0, 255, 8, 8)
+ bounds: 400 96 8 8
+ - image: solid-color(51, 12, 0, 255, 8, 8)
+ bounds: 408 96 8 8
+ - image: solid-color(52, 12, 0, 255, 8, 8)
+ bounds: 416 96 8 8
+ - image: solid-color(53, 12, 0, 255, 8, 8)
+ bounds: 424 96 8 8
+ - image: solid-color(54, 12, 0, 255, 8, 8)
+ bounds: 432 96 8 8
+ - image: solid-color(55, 12, 0, 255, 8, 8)
+ bounds: 440 96 8 8
+ - image: solid-color(56, 12, 0, 255, 8, 8)
+ bounds: 448 96 8 8
+ - image: solid-color(57, 12, 0, 255, 8, 8)
+ bounds: 456 96 8 8
+ - image: solid-color(58, 12, 0, 255, 8, 8)
+ bounds: 464 96 8 8
+ - image: solid-color(59, 12, 0, 255, 8, 8)
+ bounds: 472 96 8 8
+ - image: solid-color(60, 12, 0, 255, 8, 8)
+ bounds: 480 96 8 8
+ - image: solid-color(61, 12, 0, 255, 8, 8)
+ bounds: 488 96 8 8
+ - image: solid-color(62, 12, 0, 255, 8, 8)
+ bounds: 496 96 8 8
+ - image: solid-color(63, 12, 0, 255, 8, 8)
+ bounds: 504 96 8 8
+ - image: solid-color(64, 12, 0, 255, 8, 8)
+ bounds: 512 96 8 8
+ - image: solid-color(65, 12, 0, 255, 8, 8)
+ bounds: 520 96 8 8
+ - image: solid-color(66, 12, 0, 255, 8, 8)
+ bounds: 528 96 8 8
+ - image: solid-color(67, 12, 0, 255, 8, 8)
+ bounds: 536 96 8 8
+ - image: solid-color(68, 12, 0, 255, 8, 8)
+ bounds: 544 96 8 8
+ - image: solid-color(69, 12, 0, 255, 8, 8)
+ bounds: 552 96 8 8
+ - image: solid-color(70, 12, 0, 255, 8, 8)
+ bounds: 560 96 8 8
+ - image: solid-color(71, 12, 0, 255, 8, 8)
+ bounds: 568 96 8 8
+ - image: solid-color(72, 12, 0, 255, 8, 8)
+ bounds: 576 96 8 8
+ - image: solid-color(73, 12, 0, 255, 8, 8)
+ bounds: 584 96 8 8
+ - image: solid-color(74, 12, 0, 255, 8, 8)
+ bounds: 592 96 8 8
+ - image: solid-color(75, 12, 0, 255, 8, 8)
+ bounds: 600 96 8 8
+ - image: solid-color(76, 12, 0, 255, 8, 8)
+ bounds: 608 96 8 8
+ - image: solid-color(77, 12, 0, 255, 8, 8)
+ bounds: 616 96 8 8
+ - image: solid-color(78, 12, 0, 255, 8, 8)
+ bounds: 624 96 8 8
+ - image: solid-color(79, 12, 0, 255, 8, 8)
+ bounds: 632 96 8 8
+ - image: solid-color(80, 12, 0, 255, 8, 8)
+ bounds: 640 96 8 8
+ - image: solid-color(81, 12, 0, 255, 8, 8)
+ bounds: 648 96 8 8
+ - image: solid-color(82, 12, 0, 255, 8, 8)
+ bounds: 656 96 8 8
+ - image: solid-color(83, 12, 0, 255, 8, 8)
+ bounds: 664 96 8 8
+ - image: solid-color(84, 12, 0, 255, 8, 8)
+ bounds: 672 96 8 8
+ - image: solid-color(85, 12, 0, 255, 8, 8)
+ bounds: 680 96 8 8
+ - image: solid-color(86, 12, 0, 255, 8, 8)
+ bounds: 688 96 8 8
+ - image: solid-color(87, 12, 0, 255, 8, 8)
+ bounds: 696 96 8 8
+ - image: solid-color(88, 12, 0, 255, 8, 8)
+ bounds: 704 96 8 8
+ - image: solid-color(89, 12, 0, 255, 8, 8)
+ bounds: 712 96 8 8
+ - image: solid-color(90, 12, 0, 255, 8, 8)
+ bounds: 720 96 8 8
+ - image: solid-color(91, 12, 0, 255, 8, 8)
+ bounds: 728 96 8 8
+ - image: solid-color(92, 12, 0, 255, 8, 8)
+ bounds: 736 96 8 8
+ - image: solid-color(93, 12, 0, 255, 8, 8)
+ bounds: 744 96 8 8
+ - image: solid-color(94, 12, 0, 255, 8, 8)
+ bounds: 752 96 8 8
+ - image: solid-color(95, 12, 0, 255, 8, 8)
+ bounds: 760 96 8 8
+ - image: solid-color(96, 12, 0, 255, 8, 8)
+ bounds: 768 96 8 8
+ - image: solid-color(97, 12, 0, 255, 8, 8)
+ bounds: 776 96 8 8
+ - image: solid-color(98, 12, 0, 255, 8, 8)
+ bounds: 784 96 8 8
+ - image: solid-color(99, 12, 0, 255, 8, 8)
+ bounds: 792 96 8 8
+ - image: solid-color(100, 12, 0, 255, 8, 8)
+ bounds: 800 96 8 8
+ - image: solid-color(101, 12, 0, 255, 8, 8)
+ bounds: 808 96 8 8
+ - image: solid-color(102, 12, 0, 255, 8, 8)
+ bounds: 816 96 8 8
+ - image: solid-color(103, 12, 0, 255, 8, 8)
+ bounds: 824 96 8 8
+ - image: solid-color(104, 12, 0, 255, 8, 8)
+ bounds: 832 96 8 8
+ - image: solid-color(105, 12, 0, 255, 8, 8)
+ bounds: 840 96 8 8
+ - image: solid-color(106, 12, 0, 255, 8, 8)
+ bounds: 848 96 8 8
+ - image: solid-color(107, 12, 0, 255, 8, 8)
+ bounds: 856 96 8 8
+ - image: solid-color(108, 12, 0, 255, 8, 8)
+ bounds: 864 96 8 8
+ - image: solid-color(109, 12, 0, 255, 8, 8)
+ bounds: 872 96 8 8
+ - image: solid-color(110, 12, 0, 255, 8, 8)
+ bounds: 880 96 8 8
+ - image: solid-color(111, 12, 0, 255, 8, 8)
+ bounds: 888 96 8 8
+ - image: solid-color(112, 12, 0, 255, 8, 8)
+ bounds: 896 96 8 8
+ - image: solid-color(113, 12, 0, 255, 8, 8)
+ bounds: 904 96 8 8
+ - image: solid-color(114, 12, 0, 255, 8, 8)
+ bounds: 912 96 8 8
+ - image: solid-color(115, 12, 0, 255, 8, 8)
+ bounds: 920 96 8 8
+ - image: solid-color(116, 12, 0, 255, 8, 8)
+ bounds: 928 96 8 8
+ - image: solid-color(117, 12, 0, 255, 8, 8)
+ bounds: 936 96 8 8
+ - image: solid-color(118, 12, 0, 255, 8, 8)
+ bounds: 944 96 8 8
+ - image: solid-color(119, 12, 0, 255, 8, 8)
+ bounds: 952 96 8 8
+ - image: solid-color(120, 12, 0, 255, 8, 8)
+ bounds: 960 96 8 8
+ - image: solid-color(121, 12, 0, 255, 8, 8)
+ bounds: 968 96 8 8
+ - image: solid-color(122, 12, 0, 255, 8, 8)
+ bounds: 976 96 8 8
+ - image: solid-color(123, 12, 0, 255, 8, 8)
+ bounds: 984 96 8 8
+ - image: solid-color(124, 12, 0, 255, 8, 8)
+ bounds: 992 96 8 8
+ - image: solid-color(125, 12, 0, 255, 8, 8)
+ bounds: 1000 96 8 8
+ - image: solid-color(126, 12, 0, 255, 8, 8)
+ bounds: 1008 96 8 8
+ - image: solid-color(127, 12, 0, 255, 8, 8)
+ bounds: 1016 96 8 8
+ - image: solid-color(0, 13, 0, 255, 8, 8)
+ bounds: 0 104 8 8
+ - image: solid-color(1, 13, 0, 255, 8, 8)
+ bounds: 8 104 8 8
+ - image: solid-color(2, 13, 0, 255, 8, 8)
+ bounds: 16 104 8 8
+ - image: solid-color(3, 13, 0, 255, 8, 8)
+ bounds: 24 104 8 8
+ - image: solid-color(4, 13, 0, 255, 8, 8)
+ bounds: 32 104 8 8
+ - image: solid-color(5, 13, 0, 255, 8, 8)
+ bounds: 40 104 8 8
+ - image: solid-color(6, 13, 0, 255, 8, 8)
+ bounds: 48 104 8 8
+ - image: solid-color(7, 13, 0, 255, 8, 8)
+ bounds: 56 104 8 8
+ - image: solid-color(8, 13, 0, 255, 8, 8)
+ bounds: 64 104 8 8
+ - image: solid-color(9, 13, 0, 255, 8, 8)
+ bounds: 72 104 8 8
+ - image: solid-color(10, 13, 0, 255, 8, 8)
+ bounds: 80 104 8 8
+ - image: solid-color(11, 13, 0, 255, 8, 8)
+ bounds: 88 104 8 8
+ - image: solid-color(12, 13, 0, 255, 8, 8)
+ bounds: 96 104 8 8
+ - image: solid-color(13, 13, 0, 255, 8, 8)
+ bounds: 104 104 8 8
+ - image: solid-color(14, 13, 0, 255, 8, 8)
+ bounds: 112 104 8 8
+ - image: solid-color(15, 13, 0, 255, 8, 8)
+ bounds: 120 104 8 8
+ - image: solid-color(16, 13, 0, 255, 8, 8)
+ bounds: 128 104 8 8
+ - image: solid-color(17, 13, 0, 255, 8, 8)
+ bounds: 136 104 8 8
+ - image: solid-color(18, 13, 0, 255, 8, 8)
+ bounds: 144 104 8 8
+ - image: solid-color(19, 13, 0, 255, 8, 8)
+ bounds: 152 104 8 8
+ - image: solid-color(20, 13, 0, 255, 8, 8)
+ bounds: 160 104 8 8
+ - image: solid-color(21, 13, 0, 255, 8, 8)
+ bounds: 168 104 8 8
+ - image: solid-color(22, 13, 0, 255, 8, 8)
+ bounds: 176 104 8 8
+ - image: solid-color(23, 13, 0, 255, 8, 8)
+ bounds: 184 104 8 8
+ - image: solid-color(24, 13, 0, 255, 8, 8)
+ bounds: 192 104 8 8
+ - image: solid-color(25, 13, 0, 255, 8, 8)
+ bounds: 200 104 8 8
+ - image: solid-color(26, 13, 0, 255, 8, 8)
+ bounds: 208 104 8 8
+ - image: solid-color(27, 13, 0, 255, 8, 8)
+ bounds: 216 104 8 8
+ - image: solid-color(28, 13, 0, 255, 8, 8)
+ bounds: 224 104 8 8
+ - image: solid-color(29, 13, 0, 255, 8, 8)
+ bounds: 232 104 8 8
+ - image: solid-color(30, 13, 0, 255, 8, 8)
+ bounds: 240 104 8 8
+ - image: solid-color(31, 13, 0, 255, 8, 8)
+ bounds: 248 104 8 8
+ - image: solid-color(32, 13, 0, 255, 8, 8)
+ bounds: 256 104 8 8
+ - image: solid-color(33, 13, 0, 255, 8, 8)
+ bounds: 264 104 8 8
+ - image: solid-color(34, 13, 0, 255, 8, 8)
+ bounds: 272 104 8 8
+ - image: solid-color(35, 13, 0, 255, 8, 8)
+ bounds: 280 104 8 8
+ - image: solid-color(36, 13, 0, 255, 8, 8)
+ bounds: 288 104 8 8
+ - image: solid-color(37, 13, 0, 255, 8, 8)
+ bounds: 296 104 8 8
+ - image: solid-color(38, 13, 0, 255, 8, 8)
+ bounds: 304 104 8 8
+ - image: solid-color(39, 13, 0, 255, 8, 8)
+ bounds: 312 104 8 8
+ - image: solid-color(40, 13, 0, 255, 8, 8)
+ bounds: 320 104 8 8
+ - image: solid-color(41, 13, 0, 255, 8, 8)
+ bounds: 328 104 8 8
+ - image: solid-color(42, 13, 0, 255, 8, 8)
+ bounds: 336 104 8 8
+ - image: solid-color(43, 13, 0, 255, 8, 8)
+ bounds: 344 104 8 8
+ - image: solid-color(44, 13, 0, 255, 8, 8)
+ bounds: 352 104 8 8
+ - image: solid-color(45, 13, 0, 255, 8, 8)
+ bounds: 360 104 8 8
+ - image: solid-color(46, 13, 0, 255, 8, 8)
+ bounds: 368 104 8 8
+ - image: solid-color(47, 13, 0, 255, 8, 8)
+ bounds: 376 104 8 8
+ - image: solid-color(48, 13, 0, 255, 8, 8)
+ bounds: 384 104 8 8
+ - image: solid-color(49, 13, 0, 255, 8, 8)
+ bounds: 392 104 8 8
+ - image: solid-color(50, 13, 0, 255, 8, 8)
+ bounds: 400 104 8 8
+ - image: solid-color(51, 13, 0, 255, 8, 8)
+ bounds: 408 104 8 8
+ - image: solid-color(52, 13, 0, 255, 8, 8)
+ bounds: 416 104 8 8
+ - image: solid-color(53, 13, 0, 255, 8, 8)
+ bounds: 424 104 8 8
+ - image: solid-color(54, 13, 0, 255, 8, 8)
+ bounds: 432 104 8 8
+ - image: solid-color(55, 13, 0, 255, 8, 8)
+ bounds: 440 104 8 8
+ - image: solid-color(56, 13, 0, 255, 8, 8)
+ bounds: 448 104 8 8
+ - image: solid-color(57, 13, 0, 255, 8, 8)
+ bounds: 456 104 8 8
+ - image: solid-color(58, 13, 0, 255, 8, 8)
+ bounds: 464 104 8 8
+ - image: solid-color(59, 13, 0, 255, 8, 8)
+ bounds: 472 104 8 8
+ - image: solid-color(60, 13, 0, 255, 8, 8)
+ bounds: 480 104 8 8
+ - image: solid-color(61, 13, 0, 255, 8, 8)
+ bounds: 488 104 8 8
+ - image: solid-color(62, 13, 0, 255, 8, 8)
+ bounds: 496 104 8 8
+ - image: solid-color(63, 13, 0, 255, 8, 8)
+ bounds: 504 104 8 8
+ - image: solid-color(64, 13, 0, 255, 8, 8)
+ bounds: 512 104 8 8
+ - image: solid-color(65, 13, 0, 255, 8, 8)
+ bounds: 520 104 8 8
+ - image: solid-color(66, 13, 0, 255, 8, 8)
+ bounds: 528 104 8 8
+ - image: solid-color(67, 13, 0, 255, 8, 8)
+ bounds: 536 104 8 8
+ - image: solid-color(68, 13, 0, 255, 8, 8)
+ bounds: 544 104 8 8
+ - image: solid-color(69, 13, 0, 255, 8, 8)
+ bounds: 552 104 8 8
+ - image: solid-color(70, 13, 0, 255, 8, 8)
+ bounds: 560 104 8 8
+ - image: solid-color(71, 13, 0, 255, 8, 8)
+ bounds: 568 104 8 8
+ - image: solid-color(72, 13, 0, 255, 8, 8)
+ bounds: 576 104 8 8
+ - image: solid-color(73, 13, 0, 255, 8, 8)
+ bounds: 584 104 8 8
+ - image: solid-color(74, 13, 0, 255, 8, 8)
+ bounds: 592 104 8 8
+ - image: solid-color(75, 13, 0, 255, 8, 8)
+ bounds: 600 104 8 8
+ - image: solid-color(76, 13, 0, 255, 8, 8)
+ bounds: 608 104 8 8
+ - image: solid-color(77, 13, 0, 255, 8, 8)
+ bounds: 616 104 8 8
+ - image: solid-color(78, 13, 0, 255, 8, 8)
+ bounds: 624 104 8 8
+ - image: solid-color(79, 13, 0, 255, 8, 8)
+ bounds: 632 104 8 8
+ - image: solid-color(80, 13, 0, 255, 8, 8)
+ bounds: 640 104 8 8
+ - image: solid-color(81, 13, 0, 255, 8, 8)
+ bounds: 648 104 8 8
+ - image: solid-color(82, 13, 0, 255, 8, 8)
+ bounds: 656 104 8 8
+ - image: solid-color(83, 13, 0, 255, 8, 8)
+ bounds: 664 104 8 8
+ - image: solid-color(84, 13, 0, 255, 8, 8)
+ bounds: 672 104 8 8
+ - image: solid-color(85, 13, 0, 255, 8, 8)
+ bounds: 680 104 8 8
+ - image: solid-color(86, 13, 0, 255, 8, 8)
+ bounds: 688 104 8 8
+ - image: solid-color(87, 13, 0, 255, 8, 8)
+ bounds: 696 104 8 8
+ - image: solid-color(88, 13, 0, 255, 8, 8)
+ bounds: 704 104 8 8
+ - image: solid-color(89, 13, 0, 255, 8, 8)
+ bounds: 712 104 8 8
+ - image: solid-color(90, 13, 0, 255, 8, 8)
+ bounds: 720 104 8 8
+ - image: solid-color(91, 13, 0, 255, 8, 8)
+ bounds: 728 104 8 8
+ - image: solid-color(92, 13, 0, 255, 8, 8)
+ bounds: 736 104 8 8
+ - image: solid-color(93, 13, 0, 255, 8, 8)
+ bounds: 744 104 8 8
+ - image: solid-color(94, 13, 0, 255, 8, 8)
+ bounds: 752 104 8 8
+ - image: solid-color(95, 13, 0, 255, 8, 8)
+ bounds: 760 104 8 8
+ - image: solid-color(96, 13, 0, 255, 8, 8)
+ bounds: 768 104 8 8
+ - image: solid-color(97, 13, 0, 255, 8, 8)
+ bounds: 776 104 8 8
+ - image: solid-color(98, 13, 0, 255, 8, 8)
+ bounds: 784 104 8 8
+ - image: solid-color(99, 13, 0, 255, 8, 8)
+ bounds: 792 104 8 8
+ - image: solid-color(100, 13, 0, 255, 8, 8)
+ bounds: 800 104 8 8
+ - image: solid-color(101, 13, 0, 255, 8, 8)
+ bounds: 808 104 8 8
+ - image: solid-color(102, 13, 0, 255, 8, 8)
+ bounds: 816 104 8 8
+ - image: solid-color(103, 13, 0, 255, 8, 8)
+ bounds: 824 104 8 8
+ - image: solid-color(104, 13, 0, 255, 8, 8)
+ bounds: 832 104 8 8
+ - image: solid-color(105, 13, 0, 255, 8, 8)
+ bounds: 840 104 8 8
+ - image: solid-color(106, 13, 0, 255, 8, 8)
+ bounds: 848 104 8 8
+ - image: solid-color(107, 13, 0, 255, 8, 8)
+ bounds: 856 104 8 8
+ - image: solid-color(108, 13, 0, 255, 8, 8)
+ bounds: 864 104 8 8
+ - image: solid-color(109, 13, 0, 255, 8, 8)
+ bounds: 872 104 8 8
+ - image: solid-color(110, 13, 0, 255, 8, 8)
+ bounds: 880 104 8 8
+ - image: solid-color(111, 13, 0, 255, 8, 8)
+ bounds: 888 104 8 8
+ - image: solid-color(112, 13, 0, 255, 8, 8)
+ bounds: 896 104 8 8
+ - image: solid-color(113, 13, 0, 255, 8, 8)
+ bounds: 904 104 8 8
+ - image: solid-color(114, 13, 0, 255, 8, 8)
+ bounds: 912 104 8 8
+ - image: solid-color(115, 13, 0, 255, 8, 8)
+ bounds: 920 104 8 8
+ - image: solid-color(116, 13, 0, 255, 8, 8)
+ bounds: 928 104 8 8
+ - image: solid-color(117, 13, 0, 255, 8, 8)
+ bounds: 936 104 8 8
+ - image: solid-color(118, 13, 0, 255, 8, 8)
+ bounds: 944 104 8 8
+ - image: solid-color(119, 13, 0, 255, 8, 8)
+ bounds: 952 104 8 8
+ - image: solid-color(120, 13, 0, 255, 8, 8)
+ bounds: 960 104 8 8
+ - image: solid-color(121, 13, 0, 255, 8, 8)
+ bounds: 968 104 8 8
+ - image: solid-color(122, 13, 0, 255, 8, 8)
+ bounds: 976 104 8 8
+ - image: solid-color(123, 13, 0, 255, 8, 8)
+ bounds: 984 104 8 8
+ - image: solid-color(124, 13, 0, 255, 8, 8)
+ bounds: 992 104 8 8
+ - image: solid-color(125, 13, 0, 255, 8, 8)
+ bounds: 1000 104 8 8
+ - image: solid-color(126, 13, 0, 255, 8, 8)
+ bounds: 1008 104 8 8
+ - image: solid-color(127, 13, 0, 255, 8, 8)
+ bounds: 1016 104 8 8
+ - image: solid-color(0, 14, 0, 255, 8, 8)
+ bounds: 0 112 8 8
+ - image: solid-color(1, 14, 0, 255, 8, 8)
+ bounds: 8 112 8 8
+ - image: solid-color(2, 14, 0, 255, 8, 8)
+ bounds: 16 112 8 8
+ - image: solid-color(3, 14, 0, 255, 8, 8)
+ bounds: 24 112 8 8
+ - image: solid-color(4, 14, 0, 255, 8, 8)
+ bounds: 32 112 8 8
+ - image: solid-color(5, 14, 0, 255, 8, 8)
+ bounds: 40 112 8 8
+ - image: solid-color(6, 14, 0, 255, 8, 8)
+ bounds: 48 112 8 8
+ - image: solid-color(7, 14, 0, 255, 8, 8)
+ bounds: 56 112 8 8
+ - image: solid-color(8, 14, 0, 255, 8, 8)
+ bounds: 64 112 8 8
+ - image: solid-color(9, 14, 0, 255, 8, 8)
+ bounds: 72 112 8 8
+ - image: solid-color(10, 14, 0, 255, 8, 8)
+ bounds: 80 112 8 8
+ - image: solid-color(11, 14, 0, 255, 8, 8)
+ bounds: 88 112 8 8
+ - image: solid-color(12, 14, 0, 255, 8, 8)
+ bounds: 96 112 8 8
+ - image: solid-color(13, 14, 0, 255, 8, 8)
+ bounds: 104 112 8 8
+ - image: solid-color(14, 14, 0, 255, 8, 8)
+ bounds: 112 112 8 8
+ - image: solid-color(15, 14, 0, 255, 8, 8)
+ bounds: 120 112 8 8
+ - image: solid-color(16, 14, 0, 255, 8, 8)
+ bounds: 128 112 8 8
+ - image: solid-color(17, 14, 0, 255, 8, 8)
+ bounds: 136 112 8 8
+ - image: solid-color(18, 14, 0, 255, 8, 8)
+ bounds: 144 112 8 8
+ - image: solid-color(19, 14, 0, 255, 8, 8)
+ bounds: 152 112 8 8
+ - image: solid-color(20, 14, 0, 255, 8, 8)
+ bounds: 160 112 8 8
+ - image: solid-color(21, 14, 0, 255, 8, 8)
+ bounds: 168 112 8 8
+ - image: solid-color(22, 14, 0, 255, 8, 8)
+ bounds: 176 112 8 8
+ - image: solid-color(23, 14, 0, 255, 8, 8)
+ bounds: 184 112 8 8
+ - image: solid-color(24, 14, 0, 255, 8, 8)
+ bounds: 192 112 8 8
+ - image: solid-color(25, 14, 0, 255, 8, 8)
+ bounds: 200 112 8 8
+ - image: solid-color(26, 14, 0, 255, 8, 8)
+ bounds: 208 112 8 8
+ - image: solid-color(27, 14, 0, 255, 8, 8)
+ bounds: 216 112 8 8
+ - image: solid-color(28, 14, 0, 255, 8, 8)
+ bounds: 224 112 8 8
+ - image: solid-color(29, 14, 0, 255, 8, 8)
+ bounds: 232 112 8 8
+ - image: solid-color(30, 14, 0, 255, 8, 8)
+ bounds: 240 112 8 8
+ - image: solid-color(31, 14, 0, 255, 8, 8)
+ bounds: 248 112 8 8
+ - image: solid-color(32, 14, 0, 255, 8, 8)
+ bounds: 256 112 8 8
+ - image: solid-color(33, 14, 0, 255, 8, 8)
+ bounds: 264 112 8 8
+ - image: solid-color(34, 14, 0, 255, 8, 8)
+ bounds: 272 112 8 8
+ - image: solid-color(35, 14, 0, 255, 8, 8)
+ bounds: 280 112 8 8
+ - image: solid-color(36, 14, 0, 255, 8, 8)
+ bounds: 288 112 8 8
+ - image: solid-color(37, 14, 0, 255, 8, 8)
+ bounds: 296 112 8 8
+ - image: solid-color(38, 14, 0, 255, 8, 8)
+ bounds: 304 112 8 8
+ - image: solid-color(39, 14, 0, 255, 8, 8)
+ bounds: 312 112 8 8
+ - image: solid-color(40, 14, 0, 255, 8, 8)
+ bounds: 320 112 8 8
+ - image: solid-color(41, 14, 0, 255, 8, 8)
+ bounds: 328 112 8 8
+ - image: solid-color(42, 14, 0, 255, 8, 8)
+ bounds: 336 112 8 8
+ - image: solid-color(43, 14, 0, 255, 8, 8)
+ bounds: 344 112 8 8
+ - image: solid-color(44, 14, 0, 255, 8, 8)
+ bounds: 352 112 8 8
+ - image: solid-color(45, 14, 0, 255, 8, 8)
+ bounds: 360 112 8 8
+ - image: solid-color(46, 14, 0, 255, 8, 8)
+ bounds: 368 112 8 8
+ - image: solid-color(47, 14, 0, 255, 8, 8)
+ bounds: 376 112 8 8
+ - image: solid-color(48, 14, 0, 255, 8, 8)
+ bounds: 384 112 8 8
+ - image: solid-color(49, 14, 0, 255, 8, 8)
+ bounds: 392 112 8 8
+ - image: solid-color(50, 14, 0, 255, 8, 8)
+ bounds: 400 112 8 8
+ - image: solid-color(51, 14, 0, 255, 8, 8)
+ bounds: 408 112 8 8
+ - image: solid-color(52, 14, 0, 255, 8, 8)
+ bounds: 416 112 8 8
+ - image: solid-color(53, 14, 0, 255, 8, 8)
+ bounds: 424 112 8 8
+ - image: solid-color(54, 14, 0, 255, 8, 8)
+ bounds: 432 112 8 8
+ - image: solid-color(55, 14, 0, 255, 8, 8)
+ bounds: 440 112 8 8
+ - image: solid-color(56, 14, 0, 255, 8, 8)
+ bounds: 448 112 8 8
+ - image: solid-color(57, 14, 0, 255, 8, 8)
+ bounds: 456 112 8 8
+ - image: solid-color(58, 14, 0, 255, 8, 8)
+ bounds: 464 112 8 8
+ - image: solid-color(59, 14, 0, 255, 8, 8)
+ bounds: 472 112 8 8
+ - image: solid-color(60, 14, 0, 255, 8, 8)
+ bounds: 480 112 8 8
+ - image: solid-color(61, 14, 0, 255, 8, 8)
+ bounds: 488 112 8 8
+ - image: solid-color(62, 14, 0, 255, 8, 8)
+ bounds: 496 112 8 8
+ - image: solid-color(63, 14, 0, 255, 8, 8)
+ bounds: 504 112 8 8
+ - image: solid-color(64, 14, 0, 255, 8, 8)
+ bounds: 512 112 8 8
+ - image: solid-color(65, 14, 0, 255, 8, 8)
+ bounds: 520 112 8 8
+ - image: solid-color(66, 14, 0, 255, 8, 8)
+ bounds: 528 112 8 8
+ - image: solid-color(67, 14, 0, 255, 8, 8)
+ bounds: 536 112 8 8
+ - image: solid-color(68, 14, 0, 255, 8, 8)
+ bounds: 544 112 8 8
+ - image: solid-color(69, 14, 0, 255, 8, 8)
+ bounds: 552 112 8 8
+ - image: solid-color(70, 14, 0, 255, 8, 8)
+ bounds: 560 112 8 8
+ - image: solid-color(71, 14, 0, 255, 8, 8)
+ bounds: 568 112 8 8
+ - image: solid-color(72, 14, 0, 255, 8, 8)
+ bounds: 576 112 8 8
+ - image: solid-color(73, 14, 0, 255, 8, 8)
+ bounds: 584 112 8 8
+ - image: solid-color(74, 14, 0, 255, 8, 8)
+ bounds: 592 112 8 8
+ - image: solid-color(75, 14, 0, 255, 8, 8)
+ bounds: 600 112 8 8
+ - image: solid-color(76, 14, 0, 255, 8, 8)
+ bounds: 608 112 8 8
+ - image: solid-color(77, 14, 0, 255, 8, 8)
+ bounds: 616 112 8 8
+ - image: solid-color(78, 14, 0, 255, 8, 8)
+ bounds: 624 112 8 8
+ - image: solid-color(79, 14, 0, 255, 8, 8)
+ bounds: 632 112 8 8
+ - image: solid-color(80, 14, 0, 255, 8, 8)
+ bounds: 640 112 8 8
+ - image: solid-color(81, 14, 0, 255, 8, 8)
+ bounds: 648 112 8 8
+ - image: solid-color(82, 14, 0, 255, 8, 8)
+ bounds: 656 112 8 8
+ - image: solid-color(83, 14, 0, 255, 8, 8)
+ bounds: 664 112 8 8
+ - image: solid-color(84, 14, 0, 255, 8, 8)
+ bounds: 672 112 8 8
+ - image: solid-color(85, 14, 0, 255, 8, 8)
+ bounds: 680 112 8 8
+ - image: solid-color(86, 14, 0, 255, 8, 8)
+ bounds: 688 112 8 8
+ - image: solid-color(87, 14, 0, 255, 8, 8)
+ bounds: 696 112 8 8
+ - image: solid-color(88, 14, 0, 255, 8, 8)
+ bounds: 704 112 8 8
+ - image: solid-color(89, 14, 0, 255, 8, 8)
+ bounds: 712 112 8 8
+ - image: solid-color(90, 14, 0, 255, 8, 8)
+ bounds: 720 112 8 8
+ - image: solid-color(91, 14, 0, 255, 8, 8)
+ bounds: 728 112 8 8
+ - image: solid-color(92, 14, 0, 255, 8, 8)
+ bounds: 736 112 8 8
+ - image: solid-color(93, 14, 0, 255, 8, 8)
+ bounds: 744 112 8 8
+ - image: solid-color(94, 14, 0, 255, 8, 8)
+ bounds: 752 112 8 8
+ - image: solid-color(95, 14, 0, 255, 8, 8)
+ bounds: 760 112 8 8
+ - image: solid-color(96, 14, 0, 255, 8, 8)
+ bounds: 768 112 8 8
+ - image: solid-color(97, 14, 0, 255, 8, 8)
+ bounds: 776 112 8 8
+ - image: solid-color(98, 14, 0, 255, 8, 8)
+ bounds: 784 112 8 8
+ - image: solid-color(99, 14, 0, 255, 8, 8)
+ bounds: 792 112 8 8
+ - image: solid-color(100, 14, 0, 255, 8, 8)
+ bounds: 800 112 8 8
+ - image: solid-color(101, 14, 0, 255, 8, 8)
+ bounds: 808 112 8 8
+ - image: solid-color(102, 14, 0, 255, 8, 8)
+ bounds: 816 112 8 8
+ - image: solid-color(103, 14, 0, 255, 8, 8)
+ bounds: 824 112 8 8
+ - image: solid-color(104, 14, 0, 255, 8, 8)
+ bounds: 832 112 8 8
+ - image: solid-color(105, 14, 0, 255, 8, 8)
+ bounds: 840 112 8 8
+ - image: solid-color(106, 14, 0, 255, 8, 8)
+ bounds: 848 112 8 8
+ - image: solid-color(107, 14, 0, 255, 8, 8)
+ bounds: 856 112 8 8
+ - image: solid-color(108, 14, 0, 255, 8, 8)
+ bounds: 864 112 8 8
+ - image: solid-color(109, 14, 0, 255, 8, 8)
+ bounds: 872 112 8 8
+ - image: solid-color(110, 14, 0, 255, 8, 8)
+ bounds: 880 112 8 8
+ - image: solid-color(111, 14, 0, 255, 8, 8)
+ bounds: 888 112 8 8
+ - image: solid-color(112, 14, 0, 255, 8, 8)
+ bounds: 896 112 8 8
+ - image: solid-color(113, 14, 0, 255, 8, 8)
+ bounds: 904 112 8 8
+ - image: solid-color(114, 14, 0, 255, 8, 8)
+ bounds: 912 112 8 8
+ - image: solid-color(115, 14, 0, 255, 8, 8)
+ bounds: 920 112 8 8
+ - image: solid-color(116, 14, 0, 255, 8, 8)
+ bounds: 928 112 8 8
+ - image: solid-color(117, 14, 0, 255, 8, 8)
+ bounds: 936 112 8 8
+ - image: solid-color(118, 14, 0, 255, 8, 8)
+ bounds: 944 112 8 8
+ - image: solid-color(119, 14, 0, 255, 8, 8)
+ bounds: 952 112 8 8
+ - image: solid-color(120, 14, 0, 255, 8, 8)
+ bounds: 960 112 8 8
+ - image: solid-color(121, 14, 0, 255, 8, 8)
+ bounds: 968 112 8 8
+ - image: solid-color(122, 14, 0, 255, 8, 8)
+ bounds: 976 112 8 8
+ - image: solid-color(123, 14, 0, 255, 8, 8)
+ bounds: 984 112 8 8
+ - image: solid-color(124, 14, 0, 255, 8, 8)
+ bounds: 992 112 8 8
+ - image: solid-color(125, 14, 0, 255, 8, 8)
+ bounds: 1000 112 8 8
+ - image: solid-color(126, 14, 0, 255, 8, 8)
+ bounds: 1008 112 8 8
+ - image: solid-color(127, 14, 0, 255, 8, 8)
+ bounds: 1016 112 8 8
+ - image: solid-color(0, 15, 0, 255, 8, 8)
+ bounds: 0 120 8 8
+ - image: solid-color(1, 15, 0, 255, 8, 8)
+ bounds: 8 120 8 8
+ - image: solid-color(2, 15, 0, 255, 8, 8)
+ bounds: 16 120 8 8
+ - image: solid-color(3, 15, 0, 255, 8, 8)
+ bounds: 24 120 8 8
+ - image: solid-color(4, 15, 0, 255, 8, 8)
+ bounds: 32 120 8 8
+ - image: solid-color(5, 15, 0, 255, 8, 8)
+ bounds: 40 120 8 8
+ - image: solid-color(6, 15, 0, 255, 8, 8)
+ bounds: 48 120 8 8
+ - image: solid-color(7, 15, 0, 255, 8, 8)
+ bounds: 56 120 8 8
+ - image: solid-color(8, 15, 0, 255, 8, 8)
+ bounds: 64 120 8 8
+ - image: solid-color(9, 15, 0, 255, 8, 8)
+ bounds: 72 120 8 8
+ - image: solid-color(10, 15, 0, 255, 8, 8)
+ bounds: 80 120 8 8
+ - image: solid-color(11, 15, 0, 255, 8, 8)
+ bounds: 88 120 8 8
+ - image: solid-color(12, 15, 0, 255, 8, 8)
+ bounds: 96 120 8 8
+ - image: solid-color(13, 15, 0, 255, 8, 8)
+ bounds: 104 120 8 8
+ - image: solid-color(14, 15, 0, 255, 8, 8)
+ bounds: 112 120 8 8
+ - image: solid-color(15, 15, 0, 255, 8, 8)
+ bounds: 120 120 8 8
+ - image: solid-color(16, 15, 0, 255, 8, 8)
+ bounds: 128 120 8 8
+ - image: solid-color(17, 15, 0, 255, 8, 8)
+ bounds: 136 120 8 8
+ - image: solid-color(18, 15, 0, 255, 8, 8)
+ bounds: 144 120 8 8
+ - image: solid-color(19, 15, 0, 255, 8, 8)
+ bounds: 152 120 8 8
+ - image: solid-color(20, 15, 0, 255, 8, 8)
+ bounds: 160 120 8 8
+ - image: solid-color(21, 15, 0, 255, 8, 8)
+ bounds: 168 120 8 8
+ - image: solid-color(22, 15, 0, 255, 8, 8)
+ bounds: 176 120 8 8
+ - image: solid-color(23, 15, 0, 255, 8, 8)
+ bounds: 184 120 8 8
+ - image: solid-color(24, 15, 0, 255, 8, 8)
+ bounds: 192 120 8 8
+ - image: solid-color(25, 15, 0, 255, 8, 8)
+ bounds: 200 120 8 8
+ - image: solid-color(26, 15, 0, 255, 8, 8)
+ bounds: 208 120 8 8
+ - image: solid-color(27, 15, 0, 255, 8, 8)
+ bounds: 216 120 8 8
+ - image: solid-color(28, 15, 0, 255, 8, 8)
+ bounds: 224 120 8 8
+ - image: solid-color(29, 15, 0, 255, 8, 8)
+ bounds: 232 120 8 8
+ - image: solid-color(30, 15, 0, 255, 8, 8)
+ bounds: 240 120 8 8
+ - image: solid-color(31, 15, 0, 255, 8, 8)
+ bounds: 248 120 8 8
+ - image: solid-color(32, 15, 0, 255, 8, 8)
+ bounds: 256 120 8 8
+ - image: solid-color(33, 15, 0, 255, 8, 8)
+ bounds: 264 120 8 8
+ - image: solid-color(34, 15, 0, 255, 8, 8)
+ bounds: 272 120 8 8
+ - image: solid-color(35, 15, 0, 255, 8, 8)
+ bounds: 280 120 8 8
+ - image: solid-color(36, 15, 0, 255, 8, 8)
+ bounds: 288 120 8 8
+ - image: solid-color(37, 15, 0, 255, 8, 8)
+ bounds: 296 120 8 8
+ - image: solid-color(38, 15, 0, 255, 8, 8)
+ bounds: 304 120 8 8
+ - image: solid-color(39, 15, 0, 255, 8, 8)
+ bounds: 312 120 8 8
+ - image: solid-color(40, 15, 0, 255, 8, 8)
+ bounds: 320 120 8 8
+ - image: solid-color(41, 15, 0, 255, 8, 8)
+ bounds: 328 120 8 8
+ - image: solid-color(42, 15, 0, 255, 8, 8)
+ bounds: 336 120 8 8
+ - image: solid-color(43, 15, 0, 255, 8, 8)
+ bounds: 344 120 8 8
+ - image: solid-color(44, 15, 0, 255, 8, 8)
+ bounds: 352 120 8 8
+ - image: solid-color(45, 15, 0, 255, 8, 8)
+ bounds: 360 120 8 8
+ - image: solid-color(46, 15, 0, 255, 8, 8)
+ bounds: 368 120 8 8
+ - image: solid-color(47, 15, 0, 255, 8, 8)
+ bounds: 376 120 8 8
+ - image: solid-color(48, 15, 0, 255, 8, 8)
+ bounds: 384 120 8 8
+ - image: solid-color(49, 15, 0, 255, 8, 8)
+ bounds: 392 120 8 8
+ - image: solid-color(50, 15, 0, 255, 8, 8)
+ bounds: 400 120 8 8
+ - image: solid-color(51, 15, 0, 255, 8, 8)
+ bounds: 408 120 8 8
+ - image: solid-color(52, 15, 0, 255, 8, 8)
+ bounds: 416 120 8 8
+ - image: solid-color(53, 15, 0, 255, 8, 8)
+ bounds: 424 120 8 8
+ - image: solid-color(54, 15, 0, 255, 8, 8)
+ bounds: 432 120 8 8
+ - image: solid-color(55, 15, 0, 255, 8, 8)
+ bounds: 440 120 8 8
+ - image: solid-color(56, 15, 0, 255, 8, 8)
+ bounds: 448 120 8 8
+ - image: solid-color(57, 15, 0, 255, 8, 8)
+ bounds: 456 120 8 8
+ - image: solid-color(58, 15, 0, 255, 8, 8)
+ bounds: 464 120 8 8
+ - image: solid-color(59, 15, 0, 255, 8, 8)
+ bounds: 472 120 8 8
+ - image: solid-color(60, 15, 0, 255, 8, 8)
+ bounds: 480 120 8 8
+ - image: solid-color(61, 15, 0, 255, 8, 8)
+ bounds: 488 120 8 8
+ - image: solid-color(62, 15, 0, 255, 8, 8)
+ bounds: 496 120 8 8
+ - image: solid-color(63, 15, 0, 255, 8, 8)
+ bounds: 504 120 8 8
+ - image: solid-color(64, 15, 0, 255, 8, 8)
+ bounds: 512 120 8 8
+ - image: solid-color(65, 15, 0, 255, 8, 8)
+ bounds: 520 120 8 8
+ - image: solid-color(66, 15, 0, 255, 8, 8)
+ bounds: 528 120 8 8
+ - image: solid-color(67, 15, 0, 255, 8, 8)
+ bounds: 536 120 8 8
+ - image: solid-color(68, 15, 0, 255, 8, 8)
+ bounds: 544 120 8 8
+ - image: solid-color(69, 15, 0, 255, 8, 8)
+ bounds: 552 120 8 8
+ - image: solid-color(70, 15, 0, 255, 8, 8)
+ bounds: 560 120 8 8
+ - image: solid-color(71, 15, 0, 255, 8, 8)
+ bounds: 568 120 8 8
+ - image: solid-color(72, 15, 0, 255, 8, 8)
+ bounds: 576 120 8 8
+ - image: solid-color(73, 15, 0, 255, 8, 8)
+ bounds: 584 120 8 8
+ - image: solid-color(74, 15, 0, 255, 8, 8)
+ bounds: 592 120 8 8
+ - image: solid-color(75, 15, 0, 255, 8, 8)
+ bounds: 600 120 8 8
+ - image: solid-color(76, 15, 0, 255, 8, 8)
+ bounds: 608 120 8 8
+ - image: solid-color(77, 15, 0, 255, 8, 8)
+ bounds: 616 120 8 8
+ - image: solid-color(78, 15, 0, 255, 8, 8)
+ bounds: 624 120 8 8
+ - image: solid-color(79, 15, 0, 255, 8, 8)
+ bounds: 632 120 8 8
+ - image: solid-color(80, 15, 0, 255, 8, 8)
+ bounds: 640 120 8 8
+ - image: solid-color(81, 15, 0, 255, 8, 8)
+ bounds: 648 120 8 8
+ - image: solid-color(82, 15, 0, 255, 8, 8)
+ bounds: 656 120 8 8
+ - image: solid-color(83, 15, 0, 255, 8, 8)
+ bounds: 664 120 8 8
+ - image: solid-color(84, 15, 0, 255, 8, 8)
+ bounds: 672 120 8 8
+ - image: solid-color(85, 15, 0, 255, 8, 8)
+ bounds: 680 120 8 8
+ - image: solid-color(86, 15, 0, 255, 8, 8)
+ bounds: 688 120 8 8
+ - image: solid-color(87, 15, 0, 255, 8, 8)
+ bounds: 696 120 8 8
+ - image: solid-color(88, 15, 0, 255, 8, 8)
+ bounds: 704 120 8 8
+ - image: solid-color(89, 15, 0, 255, 8, 8)
+ bounds: 712 120 8 8
+ - image: solid-color(90, 15, 0, 255, 8, 8)
+ bounds: 720 120 8 8
+ - image: solid-color(91, 15, 0, 255, 8, 8)
+ bounds: 728 120 8 8
+ - image: solid-color(92, 15, 0, 255, 8, 8)
+ bounds: 736 120 8 8
+ - image: solid-color(93, 15, 0, 255, 8, 8)
+ bounds: 744 120 8 8
+ - image: solid-color(94, 15, 0, 255, 8, 8)
+ bounds: 752 120 8 8
+ - image: solid-color(95, 15, 0, 255, 8, 8)
+ bounds: 760 120 8 8
+ - image: solid-color(96, 15, 0, 255, 8, 8)
+ bounds: 768 120 8 8
+ - image: solid-color(97, 15, 0, 255, 8, 8)
+ bounds: 776 120 8 8
+ - image: solid-color(98, 15, 0, 255, 8, 8)
+ bounds: 784 120 8 8
+ - image: solid-color(99, 15, 0, 255, 8, 8)
+ bounds: 792 120 8 8
+ - image: solid-color(100, 15, 0, 255, 8, 8)
+ bounds: 800 120 8 8
+ - image: solid-color(101, 15, 0, 255, 8, 8)
+ bounds: 808 120 8 8
+ - image: solid-color(102, 15, 0, 255, 8, 8)
+ bounds: 816 120 8 8
+ - image: solid-color(103, 15, 0, 255, 8, 8)
+ bounds: 824 120 8 8
+ - image: solid-color(104, 15, 0, 255, 8, 8)
+ bounds: 832 120 8 8
+ - image: solid-color(105, 15, 0, 255, 8, 8)
+ bounds: 840 120 8 8
+ - image: solid-color(106, 15, 0, 255, 8, 8)
+ bounds: 848 120 8 8
+ - image: solid-color(107, 15, 0, 255, 8, 8)
+ bounds: 856 120 8 8
+ - image: solid-color(108, 15, 0, 255, 8, 8)
+ bounds: 864 120 8 8
+ - image: solid-color(109, 15, 0, 255, 8, 8)
+ bounds: 872 120 8 8
+ - image: solid-color(110, 15, 0, 255, 8, 8)
+ bounds: 880 120 8 8
+ - image: solid-color(111, 15, 0, 255, 8, 8)
+ bounds: 888 120 8 8
+ - image: solid-color(112, 15, 0, 255, 8, 8)
+ bounds: 896 120 8 8
+ - image: solid-color(113, 15, 0, 255, 8, 8)
+ bounds: 904 120 8 8
+ - image: solid-color(114, 15, 0, 255, 8, 8)
+ bounds: 912 120 8 8
+ - image: solid-color(115, 15, 0, 255, 8, 8)
+ bounds: 920 120 8 8
+ - image: solid-color(116, 15, 0, 255, 8, 8)
+ bounds: 928 120 8 8
+ - image: solid-color(117, 15, 0, 255, 8, 8)
+ bounds: 936 120 8 8
+ - image: solid-color(118, 15, 0, 255, 8, 8)
+ bounds: 944 120 8 8
+ - image: solid-color(119, 15, 0, 255, 8, 8)
+ bounds: 952 120 8 8
+ - image: solid-color(120, 15, 0, 255, 8, 8)
+ bounds: 960 120 8 8
+ - image: solid-color(121, 15, 0, 255, 8, 8)
+ bounds: 968 120 8 8
+ - image: solid-color(122, 15, 0, 255, 8, 8)
+ bounds: 976 120 8 8
+ - image: solid-color(123, 15, 0, 255, 8, 8)
+ bounds: 984 120 8 8
+ - image: solid-color(124, 15, 0, 255, 8, 8)
+ bounds: 992 120 8 8
+ - image: solid-color(125, 15, 0, 255, 8, 8)
+ bounds: 1000 120 8 8
+ - image: solid-color(126, 15, 0, 255, 8, 8)
+ bounds: 1008 120 8 8
+ - image: solid-color(127, 15, 0, 255, 8, 8)
+ bounds: 1016 120 8 8
+ - image: solid-color(0, 16, 0, 255, 8, 8)
+ bounds: 0 128 8 8
+ - image: solid-color(1, 16, 0, 255, 8, 8)
+ bounds: 8 128 8 8
+ - image: solid-color(2, 16, 0, 255, 8, 8)
+ bounds: 16 128 8 8
+ - image: solid-color(3, 16, 0, 255, 8, 8)
+ bounds: 24 128 8 8
+ - image: solid-color(4, 16, 0, 255, 8, 8)
+ bounds: 32 128 8 8
+ - image: solid-color(5, 16, 0, 255, 8, 8)
+ bounds: 40 128 8 8
+ - image: solid-color(6, 16, 0, 255, 8, 8)
+ bounds: 48 128 8 8
+ - image: solid-color(7, 16, 0, 255, 8, 8)
+ bounds: 56 128 8 8
+ - image: solid-color(8, 16, 0, 255, 8, 8)
+ bounds: 64 128 8 8
+ - image: solid-color(9, 16, 0, 255, 8, 8)
+ bounds: 72 128 8 8
+ - image: solid-color(10, 16, 0, 255, 8, 8)
+ bounds: 80 128 8 8
+ - image: solid-color(11, 16, 0, 255, 8, 8)
+ bounds: 88 128 8 8
+ - image: solid-color(12, 16, 0, 255, 8, 8)
+ bounds: 96 128 8 8
+ - image: solid-color(13, 16, 0, 255, 8, 8)
+ bounds: 104 128 8 8
+ - image: solid-color(14, 16, 0, 255, 8, 8)
+ bounds: 112 128 8 8
+ - image: solid-color(15, 16, 0, 255, 8, 8)
+ bounds: 120 128 8 8
+ - image: solid-color(16, 16, 0, 255, 8, 8)
+ bounds: 128 128 8 8
+ - image: solid-color(17, 16, 0, 255, 8, 8)
+ bounds: 136 128 8 8
+ - image: solid-color(18, 16, 0, 255, 8, 8)
+ bounds: 144 128 8 8
+ - image: solid-color(19, 16, 0, 255, 8, 8)
+ bounds: 152 128 8 8
+ - image: solid-color(20, 16, 0, 255, 8, 8)
+ bounds: 160 128 8 8
+ - image: solid-color(21, 16, 0, 255, 8, 8)
+ bounds: 168 128 8 8
+ - image: solid-color(22, 16, 0, 255, 8, 8)
+ bounds: 176 128 8 8
+ - image: solid-color(23, 16, 0, 255, 8, 8)
+ bounds: 184 128 8 8
+ - image: solid-color(24, 16, 0, 255, 8, 8)
+ bounds: 192 128 8 8
+ - image: solid-color(25, 16, 0, 255, 8, 8)
+ bounds: 200 128 8 8
+ - image: solid-color(26, 16, 0, 255, 8, 8)
+ bounds: 208 128 8 8
+ - image: solid-color(27, 16, 0, 255, 8, 8)
+ bounds: 216 128 8 8
+ - image: solid-color(28, 16, 0, 255, 8, 8)
+ bounds: 224 128 8 8
+ - image: solid-color(29, 16, 0, 255, 8, 8)
+ bounds: 232 128 8 8
+ - image: solid-color(30, 16, 0, 255, 8, 8)
+ bounds: 240 128 8 8
+ - image: solid-color(31, 16, 0, 255, 8, 8)
+ bounds: 248 128 8 8
+ - image: solid-color(32, 16, 0, 255, 8, 8)
+ bounds: 256 128 8 8
+ - image: solid-color(33, 16, 0, 255, 8, 8)
+ bounds: 264 128 8 8
+ - image: solid-color(34, 16, 0, 255, 8, 8)
+ bounds: 272 128 8 8
+ - image: solid-color(35, 16, 0, 255, 8, 8)
+ bounds: 280 128 8 8
+ - image: solid-color(36, 16, 0, 255, 8, 8)
+ bounds: 288 128 8 8
+ - image: solid-color(37, 16, 0, 255, 8, 8)
+ bounds: 296 128 8 8
+ - image: solid-color(38, 16, 0, 255, 8, 8)
+ bounds: 304 128 8 8
+ - image: solid-color(39, 16, 0, 255, 8, 8)
+ bounds: 312 128 8 8
+ - image: solid-color(40, 16, 0, 255, 8, 8)
+ bounds: 320 128 8 8
+ - image: solid-color(41, 16, 0, 255, 8, 8)
+ bounds: 328 128 8 8
+ - image: solid-color(42, 16, 0, 255, 8, 8)
+ bounds: 336 128 8 8
+ - image: solid-color(43, 16, 0, 255, 8, 8)
+ bounds: 344 128 8 8
+ - image: solid-color(44, 16, 0, 255, 8, 8)
+ bounds: 352 128 8 8
+ - image: solid-color(45, 16, 0, 255, 8, 8)
+ bounds: 360 128 8 8
+ - image: solid-color(46, 16, 0, 255, 8, 8)
+ bounds: 368 128 8 8
+ - image: solid-color(47, 16, 0, 255, 8, 8)
+ bounds: 376 128 8 8
+ - image: solid-color(48, 16, 0, 255, 8, 8)
+ bounds: 384 128 8 8
+ - image: solid-color(49, 16, 0, 255, 8, 8)
+ bounds: 392 128 8 8
+ - image: solid-color(50, 16, 0, 255, 8, 8)
+ bounds: 400 128 8 8
+ - image: solid-color(51, 16, 0, 255, 8, 8)
+ bounds: 408 128 8 8
+ - image: solid-color(52, 16, 0, 255, 8, 8)
+ bounds: 416 128 8 8
+ - image: solid-color(53, 16, 0, 255, 8, 8)
+ bounds: 424 128 8 8
+ - image: solid-color(54, 16, 0, 255, 8, 8)
+ bounds: 432 128 8 8
+ - image: solid-color(55, 16, 0, 255, 8, 8)
+ bounds: 440 128 8 8
+ - image: solid-color(56, 16, 0, 255, 8, 8)
+ bounds: 448 128 8 8
+ - image: solid-color(57, 16, 0, 255, 8, 8)
+ bounds: 456 128 8 8
+ - image: solid-color(58, 16, 0, 255, 8, 8)
+ bounds: 464 128 8 8
+ - image: solid-color(59, 16, 0, 255, 8, 8)
+ bounds: 472 128 8 8
+ - image: solid-color(60, 16, 0, 255, 8, 8)
+ bounds: 480 128 8 8
+ - image: solid-color(61, 16, 0, 255, 8, 8)
+ bounds: 488 128 8 8
+ - image: solid-color(62, 16, 0, 255, 8, 8)
+ bounds: 496 128 8 8
+ - image: solid-color(63, 16, 0, 255, 8, 8)
+ bounds: 504 128 8 8
+ - image: solid-color(64, 16, 0, 255, 8, 8)
+ bounds: 512 128 8 8
+ - image: solid-color(65, 16, 0, 255, 8, 8)
+ bounds: 520 128 8 8
+ - image: solid-color(66, 16, 0, 255, 8, 8)
+ bounds: 528 128 8 8
+ - image: solid-color(67, 16, 0, 255, 8, 8)
+ bounds: 536 128 8 8
+ - image: solid-color(68, 16, 0, 255, 8, 8)
+ bounds: 544 128 8 8
+ - image: solid-color(69, 16, 0, 255, 8, 8)
+ bounds: 552 128 8 8
+ - image: solid-color(70, 16, 0, 255, 8, 8)
+ bounds: 560 128 8 8
+ - image: solid-color(71, 16, 0, 255, 8, 8)
+ bounds: 568 128 8 8
+ - image: solid-color(72, 16, 0, 255, 8, 8)
+ bounds: 576 128 8 8
+ - image: solid-color(73, 16, 0, 255, 8, 8)
+ bounds: 584 128 8 8
+ - image: solid-color(74, 16, 0, 255, 8, 8)
+ bounds: 592 128 8 8
+ - image: solid-color(75, 16, 0, 255, 8, 8)
+ bounds: 600 128 8 8
+ - image: solid-color(76, 16, 0, 255, 8, 8)
+ bounds: 608 128 8 8
+ - image: solid-color(77, 16, 0, 255, 8, 8)
+ bounds: 616 128 8 8
+ - image: solid-color(78, 16, 0, 255, 8, 8)
+ bounds: 624 128 8 8
+ - image: solid-color(79, 16, 0, 255, 8, 8)
+ bounds: 632 128 8 8
+ - image: solid-color(80, 16, 0, 255, 8, 8)
+ bounds: 640 128 8 8
+ - image: solid-color(81, 16, 0, 255, 8, 8)
+ bounds: 648 128 8 8
+ - image: solid-color(82, 16, 0, 255, 8, 8)
+ bounds: 656 128 8 8
+ - image: solid-color(83, 16, 0, 255, 8, 8)
+ bounds: 664 128 8 8
+ - image: solid-color(84, 16, 0, 255, 8, 8)
+ bounds: 672 128 8 8
+ - image: solid-color(85, 16, 0, 255, 8, 8)
+ bounds: 680 128 8 8
+ - image: solid-color(86, 16, 0, 255, 8, 8)
+ bounds: 688 128 8 8
+ - image: solid-color(87, 16, 0, 255, 8, 8)
+ bounds: 696 128 8 8
+ - image: solid-color(88, 16, 0, 255, 8, 8)
+ bounds: 704 128 8 8
+ - image: solid-color(89, 16, 0, 255, 8, 8)
+ bounds: 712 128 8 8
+ - image: solid-color(90, 16, 0, 255, 8, 8)
+ bounds: 720 128 8 8
+ - image: solid-color(91, 16, 0, 255, 8, 8)
+ bounds: 728 128 8 8
+ - image: solid-color(92, 16, 0, 255, 8, 8)
+ bounds: 736 128 8 8
+ - image: solid-color(93, 16, 0, 255, 8, 8)
+ bounds: 744 128 8 8
+ - image: solid-color(94, 16, 0, 255, 8, 8)
+ bounds: 752 128 8 8
+ - image: solid-color(95, 16, 0, 255, 8, 8)
+ bounds: 760 128 8 8
+ - image: solid-color(96, 16, 0, 255, 8, 8)
+ bounds: 768 128 8 8
+ - image: solid-color(97, 16, 0, 255, 8, 8)
+ bounds: 776 128 8 8
+ - image: solid-color(98, 16, 0, 255, 8, 8)
+ bounds: 784 128 8 8
+ - image: solid-color(99, 16, 0, 255, 8, 8)
+ bounds: 792 128 8 8
+ - image: solid-color(100, 16, 0, 255, 8, 8)
+ bounds: 800 128 8 8
+ - image: solid-color(101, 16, 0, 255, 8, 8)
+ bounds: 808 128 8 8
+ - image: solid-color(102, 16, 0, 255, 8, 8)
+ bounds: 816 128 8 8
+ - image: solid-color(103, 16, 0, 255, 8, 8)
+ bounds: 824 128 8 8
+ - image: solid-color(104, 16, 0, 255, 8, 8)
+ bounds: 832 128 8 8
+ - image: solid-color(105, 16, 0, 255, 8, 8)
+ bounds: 840 128 8 8
+ - image: solid-color(106, 16, 0, 255, 8, 8)
+ bounds: 848 128 8 8
+ - image: solid-color(107, 16, 0, 255, 8, 8)
+ bounds: 856 128 8 8
+ - image: solid-color(108, 16, 0, 255, 8, 8)
+ bounds: 864 128 8 8
+ - image: solid-color(109, 16, 0, 255, 8, 8)
+ bounds: 872 128 8 8
+ - image: solid-color(110, 16, 0, 255, 8, 8)
+ bounds: 880 128 8 8
+ - image: solid-color(111, 16, 0, 255, 8, 8)
+ bounds: 888 128 8 8
+ - image: solid-color(112, 16, 0, 255, 8, 8)
+ bounds: 896 128 8 8
+ - image: solid-color(113, 16, 0, 255, 8, 8)
+ bounds: 904 128 8 8
+ - image: solid-color(114, 16, 0, 255, 8, 8)
+ bounds: 912 128 8 8
+ - image: solid-color(115, 16, 0, 255, 8, 8)
+ bounds: 920 128 8 8
+ - image: solid-color(116, 16, 0, 255, 8, 8)
+ bounds: 928 128 8 8
+ - image: solid-color(117, 16, 0, 255, 8, 8)
+ bounds: 936 128 8 8
+ - image: solid-color(118, 16, 0, 255, 8, 8)
+ bounds: 944 128 8 8
+ - image: solid-color(119, 16, 0, 255, 8, 8)
+ bounds: 952 128 8 8
+ - image: solid-color(120, 16, 0, 255, 8, 8)
+ bounds: 960 128 8 8
+ - image: solid-color(121, 16, 0, 255, 8, 8)
+ bounds: 968 128 8 8
+ - image: solid-color(122, 16, 0, 255, 8, 8)
+ bounds: 976 128 8 8
+ - image: solid-color(123, 16, 0, 255, 8, 8)
+ bounds: 984 128 8 8
+ - image: solid-color(124, 16, 0, 255, 8, 8)
+ bounds: 992 128 8 8
+ - image: solid-color(125, 16, 0, 255, 8, 8)
+ bounds: 1000 128 8 8
+ - image: solid-color(126, 16, 0, 255, 8, 8)
+ bounds: 1008 128 8 8
+ - image: solid-color(127, 16, 0, 255, 8, 8)
+ bounds: 1016 128 8 8
+ - image: solid-color(0, 17, 0, 255, 8, 8)
+ bounds: 0 136 8 8
+ - image: solid-color(1, 17, 0, 255, 8, 8)
+ bounds: 8 136 8 8
+ - image: solid-color(2, 17, 0, 255, 8, 8)
+ bounds: 16 136 8 8
+ - image: solid-color(3, 17, 0, 255, 8, 8)
+ bounds: 24 136 8 8
+ - image: solid-color(4, 17, 0, 255, 8, 8)
+ bounds: 32 136 8 8
+ - image: solid-color(5, 17, 0, 255, 8, 8)
+ bounds: 40 136 8 8
+ - image: solid-color(6, 17, 0, 255, 8, 8)
+ bounds: 48 136 8 8
+ - image: solid-color(7, 17, 0, 255, 8, 8)
+ bounds: 56 136 8 8
+ - image: solid-color(8, 17, 0, 255, 8, 8)
+ bounds: 64 136 8 8
+ - image: solid-color(9, 17, 0, 255, 8, 8)
+ bounds: 72 136 8 8
+ - image: solid-color(10, 17, 0, 255, 8, 8)
+ bounds: 80 136 8 8
+ - image: solid-color(11, 17, 0, 255, 8, 8)
+ bounds: 88 136 8 8
+ - image: solid-color(12, 17, 0, 255, 8, 8)
+ bounds: 96 136 8 8
+ - image: solid-color(13, 17, 0, 255, 8, 8)
+ bounds: 104 136 8 8
+ - image: solid-color(14, 17, 0, 255, 8, 8)
+ bounds: 112 136 8 8
+ - image: solid-color(15, 17, 0, 255, 8, 8)
+ bounds: 120 136 8 8
+ - image: solid-color(16, 17, 0, 255, 8, 8)
+ bounds: 128 136 8 8
+ - image: solid-color(17, 17, 0, 255, 8, 8)
+ bounds: 136 136 8 8
+ - image: solid-color(18, 17, 0, 255, 8, 8)
+ bounds: 144 136 8 8
+ - image: solid-color(19, 17, 0, 255, 8, 8)
+ bounds: 152 136 8 8
+ - image: solid-color(20, 17, 0, 255, 8, 8)
+ bounds: 160 136 8 8
+ - image: solid-color(21, 17, 0, 255, 8, 8)
+ bounds: 168 136 8 8
+ - image: solid-color(22, 17, 0, 255, 8, 8)
+ bounds: 176 136 8 8
+ - image: solid-color(23, 17, 0, 255, 8, 8)
+ bounds: 184 136 8 8
+ - image: solid-color(24, 17, 0, 255, 8, 8)
+ bounds: 192 136 8 8
+ - image: solid-color(25, 17, 0, 255, 8, 8)
+ bounds: 200 136 8 8
+ - image: solid-color(26, 17, 0, 255, 8, 8)
+ bounds: 208 136 8 8
+ - image: solid-color(27, 17, 0, 255, 8, 8)
+ bounds: 216 136 8 8
+ - image: solid-color(28, 17, 0, 255, 8, 8)
+ bounds: 224 136 8 8
+ - image: solid-color(29, 17, 0, 255, 8, 8)
+ bounds: 232 136 8 8
+ - image: solid-color(30, 17, 0, 255, 8, 8)
+ bounds: 240 136 8 8
+ - image: solid-color(31, 17, 0, 255, 8, 8)
+ bounds: 248 136 8 8
+ - image: solid-color(32, 17, 0, 255, 8, 8)
+ bounds: 256 136 8 8
+ - image: solid-color(33, 17, 0, 255, 8, 8)
+ bounds: 264 136 8 8
+ - image: solid-color(34, 17, 0, 255, 8, 8)
+ bounds: 272 136 8 8
+ - image: solid-color(35, 17, 0, 255, 8, 8)
+ bounds: 280 136 8 8
+ - image: solid-color(36, 17, 0, 255, 8, 8)
+ bounds: 288 136 8 8
+ - image: solid-color(37, 17, 0, 255, 8, 8)
+ bounds: 296 136 8 8
+ - image: solid-color(38, 17, 0, 255, 8, 8)
+ bounds: 304 136 8 8
+ - image: solid-color(39, 17, 0, 255, 8, 8)
+ bounds: 312 136 8 8
+ - image: solid-color(40, 17, 0, 255, 8, 8)
+ bounds: 320 136 8 8
+ - image: solid-color(41, 17, 0, 255, 8, 8)
+ bounds: 328 136 8 8
+ - image: solid-color(42, 17, 0, 255, 8, 8)
+ bounds: 336 136 8 8
+ - image: solid-color(43, 17, 0, 255, 8, 8)
+ bounds: 344 136 8 8
+ - image: solid-color(44, 17, 0, 255, 8, 8)
+ bounds: 352 136 8 8
+ - image: solid-color(45, 17, 0, 255, 8, 8)
+ bounds: 360 136 8 8
+ - image: solid-color(46, 17, 0, 255, 8, 8)
+ bounds: 368 136 8 8
+ - image: solid-color(47, 17, 0, 255, 8, 8)
+ bounds: 376 136 8 8
+ - image: solid-color(48, 17, 0, 255, 8, 8)
+ bounds: 384 136 8 8
+ - image: solid-color(49, 17, 0, 255, 8, 8)
+ bounds: 392 136 8 8
+ - image: solid-color(50, 17, 0, 255, 8, 8)
+ bounds: 400 136 8 8
+ - image: solid-color(51, 17, 0, 255, 8, 8)
+ bounds: 408 136 8 8
+ - image: solid-color(52, 17, 0, 255, 8, 8)
+ bounds: 416 136 8 8
+ - image: solid-color(53, 17, 0, 255, 8, 8)
+ bounds: 424 136 8 8
+ - image: solid-color(54, 17, 0, 255, 8, 8)
+ bounds: 432 136 8 8
+ - image: solid-color(55, 17, 0, 255, 8, 8)
+ bounds: 440 136 8 8
+ - image: solid-color(56, 17, 0, 255, 8, 8)
+ bounds: 448 136 8 8
+ - image: solid-color(57, 17, 0, 255, 8, 8)
+ bounds: 456 136 8 8
+ - image: solid-color(58, 17, 0, 255, 8, 8)
+ bounds: 464 136 8 8
+ - image: solid-color(59, 17, 0, 255, 8, 8)
+ bounds: 472 136 8 8
+ - image: solid-color(60, 17, 0, 255, 8, 8)
+ bounds: 480 136 8 8
+ - image: solid-color(61, 17, 0, 255, 8, 8)
+ bounds: 488 136 8 8
+ - image: solid-color(62, 17, 0, 255, 8, 8)
+ bounds: 496 136 8 8
+ - image: solid-color(63, 17, 0, 255, 8, 8)
+ bounds: 504 136 8 8
+ - image: solid-color(64, 17, 0, 255, 8, 8)
+ bounds: 512 136 8 8
+ - image: solid-color(65, 17, 0, 255, 8, 8)
+ bounds: 520 136 8 8
+ - image: solid-color(66, 17, 0, 255, 8, 8)
+ bounds: 528 136 8 8
+ - image: solid-color(67, 17, 0, 255, 8, 8)
+ bounds: 536 136 8 8
+ - image: solid-color(68, 17, 0, 255, 8, 8)
+ bounds: 544 136 8 8
+ - image: solid-color(69, 17, 0, 255, 8, 8)
+ bounds: 552 136 8 8
+ - image: solid-color(70, 17, 0, 255, 8, 8)
+ bounds: 560 136 8 8
+ - image: solid-color(71, 17, 0, 255, 8, 8)
+ bounds: 568 136 8 8
+ - image: solid-color(72, 17, 0, 255, 8, 8)
+ bounds: 576 136 8 8
+ - image: solid-color(73, 17, 0, 255, 8, 8)
+ bounds: 584 136 8 8
+ - image: solid-color(74, 17, 0, 255, 8, 8)
+ bounds: 592 136 8 8
+ - image: solid-color(75, 17, 0, 255, 8, 8)
+ bounds: 600 136 8 8
+ - image: solid-color(76, 17, 0, 255, 8, 8)
+ bounds: 608 136 8 8
+ - image: solid-color(77, 17, 0, 255, 8, 8)
+ bounds: 616 136 8 8
+ - image: solid-color(78, 17, 0, 255, 8, 8)
+ bounds: 624 136 8 8
+ - image: solid-color(79, 17, 0, 255, 8, 8)
+ bounds: 632 136 8 8
+ - image: solid-color(80, 17, 0, 255, 8, 8)
+ bounds: 640 136 8 8
+ - image: solid-color(81, 17, 0, 255, 8, 8)
+ bounds: 648 136 8 8
+ - image: solid-color(82, 17, 0, 255, 8, 8)
+ bounds: 656 136 8 8
+ - image: solid-color(83, 17, 0, 255, 8, 8)
+ bounds: 664 136 8 8
+ - image: solid-color(84, 17, 0, 255, 8, 8)
+ bounds: 672 136 8 8
+ - image: solid-color(85, 17, 0, 255, 8, 8)
+ bounds: 680 136 8 8
+ - image: solid-color(86, 17, 0, 255, 8, 8)
+ bounds: 688 136 8 8
+ - image: solid-color(87, 17, 0, 255, 8, 8)
+ bounds: 696 136 8 8
+ - image: solid-color(88, 17, 0, 255, 8, 8)
+ bounds: 704 136 8 8
+ - image: solid-color(89, 17, 0, 255, 8, 8)
+ bounds: 712 136 8 8
+ - image: solid-color(90, 17, 0, 255, 8, 8)
+ bounds: 720 136 8 8
+ - image: solid-color(91, 17, 0, 255, 8, 8)
+ bounds: 728 136 8 8
+ - image: solid-color(92, 17, 0, 255, 8, 8)
+ bounds: 736 136 8 8
+ - image: solid-color(93, 17, 0, 255, 8, 8)
+ bounds: 744 136 8 8
+ - image: solid-color(94, 17, 0, 255, 8, 8)
+ bounds: 752 136 8 8
+ - image: solid-color(95, 17, 0, 255, 8, 8)
+ bounds: 760 136 8 8
+ - image: solid-color(96, 17, 0, 255, 8, 8)
+ bounds: 768 136 8 8
+ - image: solid-color(97, 17, 0, 255, 8, 8)
+ bounds: 776 136 8 8
+ - image: solid-color(98, 17, 0, 255, 8, 8)
+ bounds: 784 136 8 8
+ - image: solid-color(99, 17, 0, 255, 8, 8)
+ bounds: 792 136 8 8
+ - image: solid-color(100, 17, 0, 255, 8, 8)
+ bounds: 800 136 8 8
+ - image: solid-color(101, 17, 0, 255, 8, 8)
+ bounds: 808 136 8 8
+ - image: solid-color(102, 17, 0, 255, 8, 8)
+ bounds: 816 136 8 8
+ - image: solid-color(103, 17, 0, 255, 8, 8)
+ bounds: 824 136 8 8
+ - image: solid-color(104, 17, 0, 255, 8, 8)
+ bounds: 832 136 8 8
+ - image: solid-color(105, 17, 0, 255, 8, 8)
+ bounds: 840 136 8 8
+ - image: solid-color(106, 17, 0, 255, 8, 8)
+ bounds: 848 136 8 8
+ - image: solid-color(107, 17, 0, 255, 8, 8)
+ bounds: 856 136 8 8
+ - image: solid-color(108, 17, 0, 255, 8, 8)
+ bounds: 864 136 8 8
+ - image: solid-color(109, 17, 0, 255, 8, 8)
+ bounds: 872 136 8 8
+ - image: solid-color(110, 17, 0, 255, 8, 8)
+ bounds: 880 136 8 8
+ - image: solid-color(111, 17, 0, 255, 8, 8)
+ bounds: 888 136 8 8
+ - image: solid-color(112, 17, 0, 255, 8, 8)
+ bounds: 896 136 8 8
+ - image: solid-color(113, 17, 0, 255, 8, 8)
+ bounds: 904 136 8 8
+ - image: solid-color(114, 17, 0, 255, 8, 8)
+ bounds: 912 136 8 8
+ - image: solid-color(115, 17, 0, 255, 8, 8)
+ bounds: 920 136 8 8
+ - image: solid-color(116, 17, 0, 255, 8, 8)
+ bounds: 928 136 8 8
+ - image: solid-color(117, 17, 0, 255, 8, 8)
+ bounds: 936 136 8 8
+ - image: solid-color(118, 17, 0, 255, 8, 8)
+ bounds: 944 136 8 8
+ - image: solid-color(119, 17, 0, 255, 8, 8)
+ bounds: 952 136 8 8
+ - image: solid-color(120, 17, 0, 255, 8, 8)
+ bounds: 960 136 8 8
+ - image: solid-color(121, 17, 0, 255, 8, 8)
+ bounds: 968 136 8 8
+ - image: solid-color(122, 17, 0, 255, 8, 8)
+ bounds: 976 136 8 8
+ - image: solid-color(123, 17, 0, 255, 8, 8)
+ bounds: 984 136 8 8
+ - image: solid-color(124, 17, 0, 255, 8, 8)
+ bounds: 992 136 8 8
+ - image: solid-color(125, 17, 0, 255, 8, 8)
+ bounds: 1000 136 8 8
+ - image: solid-color(126, 17, 0, 255, 8, 8)
+ bounds: 1008 136 8 8
+ - image: solid-color(127, 17, 0, 255, 8, 8)
+ bounds: 1016 136 8 8
+ - image: solid-color(0, 18, 0, 255, 8, 8)
+ bounds: 0 144 8 8
+ - image: solid-color(1, 18, 0, 255, 8, 8)
+ bounds: 8 144 8 8
+ - image: solid-color(2, 18, 0, 255, 8, 8)
+ bounds: 16 144 8 8
+ - image: solid-color(3, 18, 0, 255, 8, 8)
+ bounds: 24 144 8 8
+ - image: solid-color(4, 18, 0, 255, 8, 8)
+ bounds: 32 144 8 8
+ - image: solid-color(5, 18, 0, 255, 8, 8)
+ bounds: 40 144 8 8
+ - image: solid-color(6, 18, 0, 255, 8, 8)
+ bounds: 48 144 8 8
+ - image: solid-color(7, 18, 0, 255, 8, 8)
+ bounds: 56 144 8 8
+ - image: solid-color(8, 18, 0, 255, 8, 8)
+ bounds: 64 144 8 8
+ - image: solid-color(9, 18, 0, 255, 8, 8)
+ bounds: 72 144 8 8
+ - image: solid-color(10, 18, 0, 255, 8, 8)
+ bounds: 80 144 8 8
+ - image: solid-color(11, 18, 0, 255, 8, 8)
+ bounds: 88 144 8 8
+ - image: solid-color(12, 18, 0, 255, 8, 8)
+ bounds: 96 144 8 8
+ - image: solid-color(13, 18, 0, 255, 8, 8)
+ bounds: 104 144 8 8
+ - image: solid-color(14, 18, 0, 255, 8, 8)
+ bounds: 112 144 8 8
+ - image: solid-color(15, 18, 0, 255, 8, 8)
+ bounds: 120 144 8 8
+ - image: solid-color(16, 18, 0, 255, 8, 8)
+ bounds: 128 144 8 8
+ - image: solid-color(17, 18, 0, 255, 8, 8)
+ bounds: 136 144 8 8
+ - image: solid-color(18, 18, 0, 255, 8, 8)
+ bounds: 144 144 8 8
+ - image: solid-color(19, 18, 0, 255, 8, 8)
+ bounds: 152 144 8 8
+ - image: solid-color(20, 18, 0, 255, 8, 8)
+ bounds: 160 144 8 8
+ - image: solid-color(21, 18, 0, 255, 8, 8)
+ bounds: 168 144 8 8
+ - image: solid-color(22, 18, 0, 255, 8, 8)
+ bounds: 176 144 8 8
+ - image: solid-color(23, 18, 0, 255, 8, 8)
+ bounds: 184 144 8 8
+ - image: solid-color(24, 18, 0, 255, 8, 8)
+ bounds: 192 144 8 8
+ - image: solid-color(25, 18, 0, 255, 8, 8)
+ bounds: 200 144 8 8
+ - image: solid-color(26, 18, 0, 255, 8, 8)
+ bounds: 208 144 8 8
+ - image: solid-color(27, 18, 0, 255, 8, 8)
+ bounds: 216 144 8 8
+ - image: solid-color(28, 18, 0, 255, 8, 8)
+ bounds: 224 144 8 8
+ - image: solid-color(29, 18, 0, 255, 8, 8)
+ bounds: 232 144 8 8
+ - image: solid-color(30, 18, 0, 255, 8, 8)
+ bounds: 240 144 8 8
+ - image: solid-color(31, 18, 0, 255, 8, 8)
+ bounds: 248 144 8 8
+ - image: solid-color(32, 18, 0, 255, 8, 8)
+ bounds: 256 144 8 8
+ - image: solid-color(33, 18, 0, 255, 8, 8)
+ bounds: 264 144 8 8
+ - image: solid-color(34, 18, 0, 255, 8, 8)
+ bounds: 272 144 8 8
+ - image: solid-color(35, 18, 0, 255, 8, 8)
+ bounds: 280 144 8 8
+ - image: solid-color(36, 18, 0, 255, 8, 8)
+ bounds: 288 144 8 8
+ - image: solid-color(37, 18, 0, 255, 8, 8)
+ bounds: 296 144 8 8
+ - image: solid-color(38, 18, 0, 255, 8, 8)
+ bounds: 304 144 8 8
+ - image: solid-color(39, 18, 0, 255, 8, 8)
+ bounds: 312 144 8 8
+ - image: solid-color(40, 18, 0, 255, 8, 8)
+ bounds: 320 144 8 8
+ - image: solid-color(41, 18, 0, 255, 8, 8)
+ bounds: 328 144 8 8
+ - image: solid-color(42, 18, 0, 255, 8, 8)
+ bounds: 336 144 8 8
+ - image: solid-color(43, 18, 0, 255, 8, 8)
+ bounds: 344 144 8 8
+ - image: solid-color(44, 18, 0, 255, 8, 8)
+ bounds: 352 144 8 8
+ - image: solid-color(45, 18, 0, 255, 8, 8)
+ bounds: 360 144 8 8
+ - image: solid-color(46, 18, 0, 255, 8, 8)
+ bounds: 368 144 8 8
+ - image: solid-color(47, 18, 0, 255, 8, 8)
+ bounds: 376 144 8 8
+ - image: solid-color(48, 18, 0, 255, 8, 8)
+ bounds: 384 144 8 8
+ - image: solid-color(49, 18, 0, 255, 8, 8)
+ bounds: 392 144 8 8
+ - image: solid-color(50, 18, 0, 255, 8, 8)
+ bounds: 400 144 8 8
+ - image: solid-color(51, 18, 0, 255, 8, 8)
+ bounds: 408 144 8 8
+ - image: solid-color(52, 18, 0, 255, 8, 8)
+ bounds: 416 144 8 8
+ - image: solid-color(53, 18, 0, 255, 8, 8)
+ bounds: 424 144 8 8
+ - image: solid-color(54, 18, 0, 255, 8, 8)
+ bounds: 432 144 8 8
+ - image: solid-color(55, 18, 0, 255, 8, 8)
+ bounds: 440 144 8 8
+ - image: solid-color(56, 18, 0, 255, 8, 8)
+ bounds: 448 144 8 8
+ - image: solid-color(57, 18, 0, 255, 8, 8)
+ bounds: 456 144 8 8
+ - image: solid-color(58, 18, 0, 255, 8, 8)
+ bounds: 464 144 8 8
+ - image: solid-color(59, 18, 0, 255, 8, 8)
+ bounds: 472 144 8 8
+ - image: solid-color(60, 18, 0, 255, 8, 8)
+ bounds: 480 144 8 8
+ - image: solid-color(61, 18, 0, 255, 8, 8)
+ bounds: 488 144 8 8
+ - image: solid-color(62, 18, 0, 255, 8, 8)
+ bounds: 496 144 8 8
+ - image: solid-color(63, 18, 0, 255, 8, 8)
+ bounds: 504 144 8 8
+ - image: solid-color(64, 18, 0, 255, 8, 8)
+ bounds: 512 144 8 8
+ - image: solid-color(65, 18, 0, 255, 8, 8)
+ bounds: 520 144 8 8
+ - image: solid-color(66, 18, 0, 255, 8, 8)
+ bounds: 528 144 8 8
+ - image: solid-color(67, 18, 0, 255, 8, 8)
+ bounds: 536 144 8 8
+ - image: solid-color(68, 18, 0, 255, 8, 8)
+ bounds: 544 144 8 8
+ - image: solid-color(69, 18, 0, 255, 8, 8)
+ bounds: 552 144 8 8
+ - image: solid-color(70, 18, 0, 255, 8, 8)
+ bounds: 560 144 8 8
+ - image: solid-color(71, 18, 0, 255, 8, 8)
+ bounds: 568 144 8 8
+ - image: solid-color(72, 18, 0, 255, 8, 8)
+ bounds: 576 144 8 8
+ - image: solid-color(73, 18, 0, 255, 8, 8)
+ bounds: 584 144 8 8
+ - image: solid-color(74, 18, 0, 255, 8, 8)
+ bounds: 592 144 8 8
+ - image: solid-color(75, 18, 0, 255, 8, 8)
+ bounds: 600 144 8 8
+ - image: solid-color(76, 18, 0, 255, 8, 8)
+ bounds: 608 144 8 8
+ - image: solid-color(77, 18, 0, 255, 8, 8)
+ bounds: 616 144 8 8
+ - image: solid-color(78, 18, 0, 255, 8, 8)
+ bounds: 624 144 8 8
+ - image: solid-color(79, 18, 0, 255, 8, 8)
+ bounds: 632 144 8 8
+ - image: solid-color(80, 18, 0, 255, 8, 8)
+ bounds: 640 144 8 8
+ - image: solid-color(81, 18, 0, 255, 8, 8)
+ bounds: 648 144 8 8
+ - image: solid-color(82, 18, 0, 255, 8, 8)
+ bounds: 656 144 8 8
+ - image: solid-color(83, 18, 0, 255, 8, 8)
+ bounds: 664 144 8 8
+ - image: solid-color(84, 18, 0, 255, 8, 8)
+ bounds: 672 144 8 8
+ - image: solid-color(85, 18, 0, 255, 8, 8)
+ bounds: 680 144 8 8
+ - image: solid-color(86, 18, 0, 255, 8, 8)
+ bounds: 688 144 8 8
+ - image: solid-color(87, 18, 0, 255, 8, 8)
+ bounds: 696 144 8 8
+ - image: solid-color(88, 18, 0, 255, 8, 8)
+ bounds: 704 144 8 8
+ - image: solid-color(89, 18, 0, 255, 8, 8)
+ bounds: 712 144 8 8
+ - image: solid-color(90, 18, 0, 255, 8, 8)
+ bounds: 720 144 8 8
+ - image: solid-color(91, 18, 0, 255, 8, 8)
+ bounds: 728 144 8 8
+ - image: solid-color(92, 18, 0, 255, 8, 8)
+ bounds: 736 144 8 8
+ - image: solid-color(93, 18, 0, 255, 8, 8)
+ bounds: 744 144 8 8
+ - image: solid-color(94, 18, 0, 255, 8, 8)
+ bounds: 752 144 8 8
+ - image: solid-color(95, 18, 0, 255, 8, 8)
+ bounds: 760 144 8 8
+ - image: solid-color(96, 18, 0, 255, 8, 8)
+ bounds: 768 144 8 8
+ - image: solid-color(97, 18, 0, 255, 8, 8)
+ bounds: 776 144 8 8
+ - image: solid-color(98, 18, 0, 255, 8, 8)
+ bounds: 784 144 8 8
+ - image: solid-color(99, 18, 0, 255, 8, 8)
+ bounds: 792 144 8 8
+ - image: solid-color(100, 18, 0, 255, 8, 8)
+ bounds: 800 144 8 8
+ - image: solid-color(101, 18, 0, 255, 8, 8)
+ bounds: 808 144 8 8
+ - image: solid-color(102, 18, 0, 255, 8, 8)
+ bounds: 816 144 8 8
+ - image: solid-color(103, 18, 0, 255, 8, 8)
+ bounds: 824 144 8 8
+ - image: solid-color(104, 18, 0, 255, 8, 8)
+ bounds: 832 144 8 8
+ - image: solid-color(105, 18, 0, 255, 8, 8)
+ bounds: 840 144 8 8
+ - image: solid-color(106, 18, 0, 255, 8, 8)
+ bounds: 848 144 8 8
+ - image: solid-color(107, 18, 0, 255, 8, 8)
+ bounds: 856 144 8 8
+ - image: solid-color(108, 18, 0, 255, 8, 8)
+ bounds: 864 144 8 8
+ - image: solid-color(109, 18, 0, 255, 8, 8)
+ bounds: 872 144 8 8
+ - image: solid-color(110, 18, 0, 255, 8, 8)
+ bounds: 880 144 8 8
+ - image: solid-color(111, 18, 0, 255, 8, 8)
+ bounds: 888 144 8 8
+ - image: solid-color(112, 18, 0, 255, 8, 8)
+ bounds: 896 144 8 8
+ - image: solid-color(113, 18, 0, 255, 8, 8)
+ bounds: 904 144 8 8
+ - image: solid-color(114, 18, 0, 255, 8, 8)
+ bounds: 912 144 8 8
+ - image: solid-color(115, 18, 0, 255, 8, 8)
+ bounds: 920 144 8 8
+ - image: solid-color(116, 18, 0, 255, 8, 8)
+ bounds: 928 144 8 8
+ - image: solid-color(117, 18, 0, 255, 8, 8)
+ bounds: 936 144 8 8
+ - image: solid-color(118, 18, 0, 255, 8, 8)
+ bounds: 944 144 8 8
+ - image: solid-color(119, 18, 0, 255, 8, 8)
+ bounds: 952 144 8 8
+ - image: solid-color(120, 18, 0, 255, 8, 8)
+ bounds: 960 144 8 8
+ - image: solid-color(121, 18, 0, 255, 8, 8)
+ bounds: 968 144 8 8
+ - image: solid-color(122, 18, 0, 255, 8, 8)
+ bounds: 976 144 8 8
+ - image: solid-color(123, 18, 0, 255, 8, 8)
+ bounds: 984 144 8 8
+ - image: solid-color(124, 18, 0, 255, 8, 8)
+ bounds: 992 144 8 8
+ - image: solid-color(125, 18, 0, 255, 8, 8)
+ bounds: 1000 144 8 8
+ - image: solid-color(126, 18, 0, 255, 8, 8)
+ bounds: 1008 144 8 8
+ - image: solid-color(127, 18, 0, 255, 8, 8)
+ bounds: 1016 144 8 8
+ - image: solid-color(0, 19, 0, 255, 8, 8)
+ bounds: 0 152 8 8
+ - image: solid-color(1, 19, 0, 255, 8, 8)
+ bounds: 8 152 8 8
+ - image: solid-color(2, 19, 0, 255, 8, 8)
+ bounds: 16 152 8 8
+ - image: solid-color(3, 19, 0, 255, 8, 8)
+ bounds: 24 152 8 8
+ - image: solid-color(4, 19, 0, 255, 8, 8)
+ bounds: 32 152 8 8
+ - image: solid-color(5, 19, 0, 255, 8, 8)
+ bounds: 40 152 8 8
+ - image: solid-color(6, 19, 0, 255, 8, 8)
+ bounds: 48 152 8 8
+ - image: solid-color(7, 19, 0, 255, 8, 8)
+ bounds: 56 152 8 8
+ - image: solid-color(8, 19, 0, 255, 8, 8)
+ bounds: 64 152 8 8
+ - image: solid-color(9, 19, 0, 255, 8, 8)
+ bounds: 72 152 8 8
+ - image: solid-color(10, 19, 0, 255, 8, 8)
+ bounds: 80 152 8 8
+ - image: solid-color(11, 19, 0, 255, 8, 8)
+ bounds: 88 152 8 8
+ - image: solid-color(12, 19, 0, 255, 8, 8)
+ bounds: 96 152 8 8
+ - image: solid-color(13, 19, 0, 255, 8, 8)
+ bounds: 104 152 8 8
+ - image: solid-color(14, 19, 0, 255, 8, 8)
+ bounds: 112 152 8 8
+ - image: solid-color(15, 19, 0, 255, 8, 8)
+ bounds: 120 152 8 8
+ - image: solid-color(16, 19, 0, 255, 8, 8)
+ bounds: 128 152 8 8
+ - image: solid-color(17, 19, 0, 255, 8, 8)
+ bounds: 136 152 8 8
+ - image: solid-color(18, 19, 0, 255, 8, 8)
+ bounds: 144 152 8 8
+ - image: solid-color(19, 19, 0, 255, 8, 8)
+ bounds: 152 152 8 8
+ - image: solid-color(20, 19, 0, 255, 8, 8)
+ bounds: 160 152 8 8
+ - image: solid-color(21, 19, 0, 255, 8, 8)
+ bounds: 168 152 8 8
+ - image: solid-color(22, 19, 0, 255, 8, 8)
+ bounds: 176 152 8 8
+ - image: solid-color(23, 19, 0, 255, 8, 8)
+ bounds: 184 152 8 8
+ - image: solid-color(24, 19, 0, 255, 8, 8)
+ bounds: 192 152 8 8
+ - image: solid-color(25, 19, 0, 255, 8, 8)
+ bounds: 200 152 8 8
+ - image: solid-color(26, 19, 0, 255, 8, 8)
+ bounds: 208 152 8 8
+ - image: solid-color(27, 19, 0, 255, 8, 8)
+ bounds: 216 152 8 8
+ - image: solid-color(28, 19, 0, 255, 8, 8)
+ bounds: 224 152 8 8
+ - image: solid-color(29, 19, 0, 255, 8, 8)
+ bounds: 232 152 8 8
+ - image: solid-color(30, 19, 0, 255, 8, 8)
+ bounds: 240 152 8 8
+ - image: solid-color(31, 19, 0, 255, 8, 8)
+ bounds: 248 152 8 8
+ - image: solid-color(32, 19, 0, 255, 8, 8)
+ bounds: 256 152 8 8
+ - image: solid-color(33, 19, 0, 255, 8, 8)
+ bounds: 264 152 8 8
+ - image: solid-color(34, 19, 0, 255, 8, 8)
+ bounds: 272 152 8 8
+ - image: solid-color(35, 19, 0, 255, 8, 8)
+ bounds: 280 152 8 8
+ - image: solid-color(36, 19, 0, 255, 8, 8)
+ bounds: 288 152 8 8
+ - image: solid-color(37, 19, 0, 255, 8, 8)
+ bounds: 296 152 8 8
+ - image: solid-color(38, 19, 0, 255, 8, 8)
+ bounds: 304 152 8 8
+ - image: solid-color(39, 19, 0, 255, 8, 8)
+ bounds: 312 152 8 8
+ - image: solid-color(40, 19, 0, 255, 8, 8)
+ bounds: 320 152 8 8
+ - image: solid-color(41, 19, 0, 255, 8, 8)
+ bounds: 328 152 8 8
+ - image: solid-color(42, 19, 0, 255, 8, 8)
+ bounds: 336 152 8 8
+ - image: solid-color(43, 19, 0, 255, 8, 8)
+ bounds: 344 152 8 8
+ - image: solid-color(44, 19, 0, 255, 8, 8)
+ bounds: 352 152 8 8
+ - image: solid-color(45, 19, 0, 255, 8, 8)
+ bounds: 360 152 8 8
+ - image: solid-color(46, 19, 0, 255, 8, 8)
+ bounds: 368 152 8 8
+ - image: solid-color(47, 19, 0, 255, 8, 8)
+ bounds: 376 152 8 8
+ - image: solid-color(48, 19, 0, 255, 8, 8)
+ bounds: 384 152 8 8
+ - image: solid-color(49, 19, 0, 255, 8, 8)
+ bounds: 392 152 8 8
+ - image: solid-color(50, 19, 0, 255, 8, 8)
+ bounds: 400 152 8 8
+ - image: solid-color(51, 19, 0, 255, 8, 8)
+ bounds: 408 152 8 8
+ - image: solid-color(52, 19, 0, 255, 8, 8)
+ bounds: 416 152 8 8
+ - image: solid-color(53, 19, 0, 255, 8, 8)
+ bounds: 424 152 8 8
+ - image: solid-color(54, 19, 0, 255, 8, 8)
+ bounds: 432 152 8 8
+ - image: solid-color(55, 19, 0, 255, 8, 8)
+ bounds: 440 152 8 8
+ - image: solid-color(56, 19, 0, 255, 8, 8)
+ bounds: 448 152 8 8
+ - image: solid-color(57, 19, 0, 255, 8, 8)
+ bounds: 456 152 8 8
+ - image: solid-color(58, 19, 0, 255, 8, 8)
+ bounds: 464 152 8 8
+ - image: solid-color(59, 19, 0, 255, 8, 8)
+ bounds: 472 152 8 8
+ - image: solid-color(60, 19, 0, 255, 8, 8)
+ bounds: 480 152 8 8
+ - image: solid-color(61, 19, 0, 255, 8, 8)
+ bounds: 488 152 8 8
+ - image: solid-color(62, 19, 0, 255, 8, 8)
+ bounds: 496 152 8 8
+ - image: solid-color(63, 19, 0, 255, 8, 8)
+ bounds: 504 152 8 8
+ - image: solid-color(64, 19, 0, 255, 8, 8)
+ bounds: 512 152 8 8
+ - image: solid-color(65, 19, 0, 255, 8, 8)
+ bounds: 520 152 8 8
+ - image: solid-color(66, 19, 0, 255, 8, 8)
+ bounds: 528 152 8 8
+ - image: solid-color(67, 19, 0, 255, 8, 8)
+ bounds: 536 152 8 8
+ - image: solid-color(68, 19, 0, 255, 8, 8)
+ bounds: 544 152 8 8
+ - image: solid-color(69, 19, 0, 255, 8, 8)
+ bounds: 552 152 8 8
+ - image: solid-color(70, 19, 0, 255, 8, 8)
+ bounds: 560 152 8 8
+ - image: solid-color(71, 19, 0, 255, 8, 8)
+ bounds: 568 152 8 8
+ - image: solid-color(72, 19, 0, 255, 8, 8)
+ bounds: 576 152 8 8
+ - image: solid-color(73, 19, 0, 255, 8, 8)
+ bounds: 584 152 8 8
+ - image: solid-color(74, 19, 0, 255, 8, 8)
+ bounds: 592 152 8 8
+ - image: solid-color(75, 19, 0, 255, 8, 8)
+ bounds: 600 152 8 8
+ - image: solid-color(76, 19, 0, 255, 8, 8)
+ bounds: 608 152 8 8
+ - image: solid-color(77, 19, 0, 255, 8, 8)
+ bounds: 616 152 8 8
+ - image: solid-color(78, 19, 0, 255, 8, 8)
+ bounds: 624 152 8 8
+ - image: solid-color(79, 19, 0, 255, 8, 8)
+ bounds: 632 152 8 8
+ - image: solid-color(80, 19, 0, 255, 8, 8)
+ bounds: 640 152 8 8
+ - image: solid-color(81, 19, 0, 255, 8, 8)
+ bounds: 648 152 8 8
+ - image: solid-color(82, 19, 0, 255, 8, 8)
+ bounds: 656 152 8 8
+ - image: solid-color(83, 19, 0, 255, 8, 8)
+ bounds: 664 152 8 8
+ - image: solid-color(84, 19, 0, 255, 8, 8)
+ bounds: 672 152 8 8
+ - image: solid-color(85, 19, 0, 255, 8, 8)
+ bounds: 680 152 8 8
+ - image: solid-color(86, 19, 0, 255, 8, 8)
+ bounds: 688 152 8 8
+ - image: solid-color(87, 19, 0, 255, 8, 8)
+ bounds: 696 152 8 8
+ - image: solid-color(88, 19, 0, 255, 8, 8)
+ bounds: 704 152 8 8
+ - image: solid-color(89, 19, 0, 255, 8, 8)
+ bounds: 712 152 8 8
+ - image: solid-color(90, 19, 0, 255, 8, 8)
+ bounds: 720 152 8 8
+ - image: solid-color(91, 19, 0, 255, 8, 8)
+ bounds: 728 152 8 8
+ - image: solid-color(92, 19, 0, 255, 8, 8)
+ bounds: 736 152 8 8
+ - image: solid-color(93, 19, 0, 255, 8, 8)
+ bounds: 744 152 8 8
+ - image: solid-color(94, 19, 0, 255, 8, 8)
+ bounds: 752 152 8 8
+ - image: solid-color(95, 19, 0, 255, 8, 8)
+ bounds: 760 152 8 8
+ - image: solid-color(96, 19, 0, 255, 8, 8)
+ bounds: 768 152 8 8
+ - image: solid-color(97, 19, 0, 255, 8, 8)
+ bounds: 776 152 8 8
+ - image: solid-color(98, 19, 0, 255, 8, 8)
+ bounds: 784 152 8 8
+ - image: solid-color(99, 19, 0, 255, 8, 8)
+ bounds: 792 152 8 8
+ - image: solid-color(100, 19, 0, 255, 8, 8)
+ bounds: 800 152 8 8
+ - image: solid-color(101, 19, 0, 255, 8, 8)
+ bounds: 808 152 8 8
+ - image: solid-color(102, 19, 0, 255, 8, 8)
+ bounds: 816 152 8 8
+ - image: solid-color(103, 19, 0, 255, 8, 8)
+ bounds: 824 152 8 8
+ - image: solid-color(104, 19, 0, 255, 8, 8)
+ bounds: 832 152 8 8
+ - image: solid-color(105, 19, 0, 255, 8, 8)
+ bounds: 840 152 8 8
+ - image: solid-color(106, 19, 0, 255, 8, 8)
+ bounds: 848 152 8 8
+ - image: solid-color(107, 19, 0, 255, 8, 8)
+ bounds: 856 152 8 8
+ - image: solid-color(108, 19, 0, 255, 8, 8)
+ bounds: 864 152 8 8
+ - image: solid-color(109, 19, 0, 255, 8, 8)
+ bounds: 872 152 8 8
+ - image: solid-color(110, 19, 0, 255, 8, 8)
+ bounds: 880 152 8 8
+ - image: solid-color(111, 19, 0, 255, 8, 8)
+ bounds: 888 152 8 8
+ - image: solid-color(112, 19, 0, 255, 8, 8)
+ bounds: 896 152 8 8
+ - image: solid-color(113, 19, 0, 255, 8, 8)
+ bounds: 904 152 8 8
+ - image: solid-color(114, 19, 0, 255, 8, 8)
+ bounds: 912 152 8 8
+ - image: solid-color(115, 19, 0, 255, 8, 8)
+ bounds: 920 152 8 8
+ - image: solid-color(116, 19, 0, 255, 8, 8)
+ bounds: 928 152 8 8
+ - image: solid-color(117, 19, 0, 255, 8, 8)
+ bounds: 936 152 8 8
+ - image: solid-color(118, 19, 0, 255, 8, 8)
+ bounds: 944 152 8 8
+ - image: solid-color(119, 19, 0, 255, 8, 8)
+ bounds: 952 152 8 8
+ - image: solid-color(120, 19, 0, 255, 8, 8)
+ bounds: 960 152 8 8
+ - image: solid-color(121, 19, 0, 255, 8, 8)
+ bounds: 968 152 8 8
+ - image: solid-color(122, 19, 0, 255, 8, 8)
+ bounds: 976 152 8 8
+ - image: solid-color(123, 19, 0, 255, 8, 8)
+ bounds: 984 152 8 8
+ - image: solid-color(124, 19, 0, 255, 8, 8)
+ bounds: 992 152 8 8
+ - image: solid-color(125, 19, 0, 255, 8, 8)
+ bounds: 1000 152 8 8
+ - image: solid-color(126, 19, 0, 255, 8, 8)
+ bounds: 1008 152 8 8
+ - image: solid-color(127, 19, 0, 255, 8, 8)
+ bounds: 1016 152 8 8
+ - image: solid-color(0, 20, 0, 255, 8, 8)
+ bounds: 0 160 8 8
+ - image: solid-color(1, 20, 0, 255, 8, 8)
+ bounds: 8 160 8 8
+ - image: solid-color(2, 20, 0, 255, 8, 8)
+ bounds: 16 160 8 8
+ - image: solid-color(3, 20, 0, 255, 8, 8)
+ bounds: 24 160 8 8
+ - image: solid-color(4, 20, 0, 255, 8, 8)
+ bounds: 32 160 8 8
+ - image: solid-color(5, 20, 0, 255, 8, 8)
+ bounds: 40 160 8 8
+ - image: solid-color(6, 20, 0, 255, 8, 8)
+ bounds: 48 160 8 8
+ - image: solid-color(7, 20, 0, 255, 8, 8)
+ bounds: 56 160 8 8
+ - image: solid-color(8, 20, 0, 255, 8, 8)
+ bounds: 64 160 8 8
+ - image: solid-color(9, 20, 0, 255, 8, 8)
+ bounds: 72 160 8 8
+ - image: solid-color(10, 20, 0, 255, 8, 8)
+ bounds: 80 160 8 8
+ - image: solid-color(11, 20, 0, 255, 8, 8)
+ bounds: 88 160 8 8
+ - image: solid-color(12, 20, 0, 255, 8, 8)
+ bounds: 96 160 8 8
+ - image: solid-color(13, 20, 0, 255, 8, 8)
+ bounds: 104 160 8 8
+ - image: solid-color(14, 20, 0, 255, 8, 8)
+ bounds: 112 160 8 8
+ - image: solid-color(15, 20, 0, 255, 8, 8)
+ bounds: 120 160 8 8
+ - image: solid-color(16, 20, 0, 255, 8, 8)
+ bounds: 128 160 8 8
+ - image: solid-color(17, 20, 0, 255, 8, 8)
+ bounds: 136 160 8 8
+ - image: solid-color(18, 20, 0, 255, 8, 8)
+ bounds: 144 160 8 8
+ - image: solid-color(19, 20, 0, 255, 8, 8)
+ bounds: 152 160 8 8
+ - image: solid-color(20, 20, 0, 255, 8, 8)
+ bounds: 160 160 8 8
+ - image: solid-color(21, 20, 0, 255, 8, 8)
+ bounds: 168 160 8 8
+ - image: solid-color(22, 20, 0, 255, 8, 8)
+ bounds: 176 160 8 8
+ - image: solid-color(23, 20, 0, 255, 8, 8)
+ bounds: 184 160 8 8
+ - image: solid-color(24, 20, 0, 255, 8, 8)
+ bounds: 192 160 8 8
+ - image: solid-color(25, 20, 0, 255, 8, 8)
+ bounds: 200 160 8 8
+ - image: solid-color(26, 20, 0, 255, 8, 8)
+ bounds: 208 160 8 8
+ - image: solid-color(27, 20, 0, 255, 8, 8)
+ bounds: 216 160 8 8
+ - image: solid-color(28, 20, 0, 255, 8, 8)
+ bounds: 224 160 8 8
+ - image: solid-color(29, 20, 0, 255, 8, 8)
+ bounds: 232 160 8 8
+ - image: solid-color(30, 20, 0, 255, 8, 8)
+ bounds: 240 160 8 8
+ - image: solid-color(31, 20, 0, 255, 8, 8)
+ bounds: 248 160 8 8
+ - image: solid-color(32, 20, 0, 255, 8, 8)
+ bounds: 256 160 8 8
+ - image: solid-color(33, 20, 0, 255, 8, 8)
+ bounds: 264 160 8 8
+ - image: solid-color(34, 20, 0, 255, 8, 8)
+ bounds: 272 160 8 8
+ - image: solid-color(35, 20, 0, 255, 8, 8)
+ bounds: 280 160 8 8
+ - image: solid-color(36, 20, 0, 255, 8, 8)
+ bounds: 288 160 8 8
+ - image: solid-color(37, 20, 0, 255, 8, 8)
+ bounds: 296 160 8 8
+ - image: solid-color(38, 20, 0, 255, 8, 8)
+ bounds: 304 160 8 8
+ - image: solid-color(39, 20, 0, 255, 8, 8)
+ bounds: 312 160 8 8
+ - image: solid-color(40, 20, 0, 255, 8, 8)
+ bounds: 320 160 8 8
+ - image: solid-color(41, 20, 0, 255, 8, 8)
+ bounds: 328 160 8 8
+ - image: solid-color(42, 20, 0, 255, 8, 8)
+ bounds: 336 160 8 8
+ - image: solid-color(43, 20, 0, 255, 8, 8)
+ bounds: 344 160 8 8
+ - image: solid-color(44, 20, 0, 255, 8, 8)
+ bounds: 352 160 8 8
+ - image: solid-color(45, 20, 0, 255, 8, 8)
+ bounds: 360 160 8 8
+ - image: solid-color(46, 20, 0, 255, 8, 8)
+ bounds: 368 160 8 8
+ - image: solid-color(47, 20, 0, 255, 8, 8)
+ bounds: 376 160 8 8
+ - image: solid-color(48, 20, 0, 255, 8, 8)
+ bounds: 384 160 8 8
+ - image: solid-color(49, 20, 0, 255, 8, 8)
+ bounds: 392 160 8 8
+ - image: solid-color(50, 20, 0, 255, 8, 8)
+ bounds: 400 160 8 8
+ - image: solid-color(51, 20, 0, 255, 8, 8)
+ bounds: 408 160 8 8
+ - image: solid-color(52, 20, 0, 255, 8, 8)
+ bounds: 416 160 8 8
+ - image: solid-color(53, 20, 0, 255, 8, 8)
+ bounds: 424 160 8 8
+ - image: solid-color(54, 20, 0, 255, 8, 8)
+ bounds: 432 160 8 8
+ - image: solid-color(55, 20, 0, 255, 8, 8)
+ bounds: 440 160 8 8
+ - image: solid-color(56, 20, 0, 255, 8, 8)
+ bounds: 448 160 8 8
+ - image: solid-color(57, 20, 0, 255, 8, 8)
+ bounds: 456 160 8 8
+ - image: solid-color(58, 20, 0, 255, 8, 8)
+ bounds: 464 160 8 8
+ - image: solid-color(59, 20, 0, 255, 8, 8)
+ bounds: 472 160 8 8
+ - image: solid-color(60, 20, 0, 255, 8, 8)
+ bounds: 480 160 8 8
+ - image: solid-color(61, 20, 0, 255, 8, 8)
+ bounds: 488 160 8 8
+ - image: solid-color(62, 20, 0, 255, 8, 8)
+ bounds: 496 160 8 8
+ - image: solid-color(63, 20, 0, 255, 8, 8)
+ bounds: 504 160 8 8
+ - image: solid-color(64, 20, 0, 255, 8, 8)
+ bounds: 512 160 8 8
+ - image: solid-color(65, 20, 0, 255, 8, 8)
+ bounds: 520 160 8 8
+ - image: solid-color(66, 20, 0, 255, 8, 8)
+ bounds: 528 160 8 8
+ - image: solid-color(67, 20, 0, 255, 8, 8)
+ bounds: 536 160 8 8
+ - image: solid-color(68, 20, 0, 255, 8, 8)
+ bounds: 544 160 8 8
+ - image: solid-color(69, 20, 0, 255, 8, 8)
+ bounds: 552 160 8 8
+ - image: solid-color(70, 20, 0, 255, 8, 8)
+ bounds: 560 160 8 8
+ - image: solid-color(71, 20, 0, 255, 8, 8)
+ bounds: 568 160 8 8
+ - image: solid-color(72, 20, 0, 255, 8, 8)
+ bounds: 576 160 8 8
+ - image: solid-color(73, 20, 0, 255, 8, 8)
+ bounds: 584 160 8 8
+ - image: solid-color(74, 20, 0, 255, 8, 8)
+ bounds: 592 160 8 8
+ - image: solid-color(75, 20, 0, 255, 8, 8)
+ bounds: 600 160 8 8
+ - image: solid-color(76, 20, 0, 255, 8, 8)
+ bounds: 608 160 8 8
+ - image: solid-color(77, 20, 0, 255, 8, 8)
+ bounds: 616 160 8 8
+ - image: solid-color(78, 20, 0, 255, 8, 8)
+ bounds: 624 160 8 8
+ - image: solid-color(79, 20, 0, 255, 8, 8)
+ bounds: 632 160 8 8
+ - image: solid-color(80, 20, 0, 255, 8, 8)
+ bounds: 640 160 8 8
+ - image: solid-color(81, 20, 0, 255, 8, 8)
+ bounds: 648 160 8 8
+ - image: solid-color(82, 20, 0, 255, 8, 8)
+ bounds: 656 160 8 8
+ - image: solid-color(83, 20, 0, 255, 8, 8)
+ bounds: 664 160 8 8
+ - image: solid-color(84, 20, 0, 255, 8, 8)
+ bounds: 672 160 8 8
+ - image: solid-color(85, 20, 0, 255, 8, 8)
+ bounds: 680 160 8 8
+ - image: solid-color(86, 20, 0, 255, 8, 8)
+ bounds: 688 160 8 8
+ - image: solid-color(87, 20, 0, 255, 8, 8)
+ bounds: 696 160 8 8
+ - image: solid-color(88, 20, 0, 255, 8, 8)
+ bounds: 704 160 8 8
+ - image: solid-color(89, 20, 0, 255, 8, 8)
+ bounds: 712 160 8 8
+ - image: solid-color(90, 20, 0, 255, 8, 8)
+ bounds: 720 160 8 8
+ - image: solid-color(91, 20, 0, 255, 8, 8)
+ bounds: 728 160 8 8
+ - image: solid-color(92, 20, 0, 255, 8, 8)
+ bounds: 736 160 8 8
+ - image: solid-color(93, 20, 0, 255, 8, 8)
+ bounds: 744 160 8 8
+ - image: solid-color(94, 20, 0, 255, 8, 8)
+ bounds: 752 160 8 8
+ - image: solid-color(95, 20, 0, 255, 8, 8)
+ bounds: 760 160 8 8
+ - image: solid-color(96, 20, 0, 255, 8, 8)
+ bounds: 768 160 8 8
+ - image: solid-color(97, 20, 0, 255, 8, 8)
+ bounds: 776 160 8 8
+ - image: solid-color(98, 20, 0, 255, 8, 8)
+ bounds: 784 160 8 8
+ - image: solid-color(99, 20, 0, 255, 8, 8)
+ bounds: 792 160 8 8
+ - image: solid-color(100, 20, 0, 255, 8, 8)
+ bounds: 800 160 8 8
+ - image: solid-color(101, 20, 0, 255, 8, 8)
+ bounds: 808 160 8 8
+ - image: solid-color(102, 20, 0, 255, 8, 8)
+ bounds: 816 160 8 8
+ - image: solid-color(103, 20, 0, 255, 8, 8)
+ bounds: 824 160 8 8
+ - image: solid-color(104, 20, 0, 255, 8, 8)
+ bounds: 832 160 8 8
+ - image: solid-color(105, 20, 0, 255, 8, 8)
+ bounds: 840 160 8 8
+ - image: solid-color(106, 20, 0, 255, 8, 8)
+ bounds: 848 160 8 8
+ - image: solid-color(107, 20, 0, 255, 8, 8)
+ bounds: 856 160 8 8
+ - image: solid-color(108, 20, 0, 255, 8, 8)
+ bounds: 864 160 8 8
+ - image: solid-color(109, 20, 0, 255, 8, 8)
+ bounds: 872 160 8 8
+ - image: solid-color(110, 20, 0, 255, 8, 8)
+ bounds: 880 160 8 8
+ - image: solid-color(111, 20, 0, 255, 8, 8)
+ bounds: 888 160 8 8
+ - image: solid-color(112, 20, 0, 255, 8, 8)
+ bounds: 896 160 8 8
+ - image: solid-color(113, 20, 0, 255, 8, 8)
+ bounds: 904 160 8 8
+ - image: solid-color(114, 20, 0, 255, 8, 8)
+ bounds: 912 160 8 8
+ - image: solid-color(115, 20, 0, 255, 8, 8)
+ bounds: 920 160 8 8
+ - image: solid-color(116, 20, 0, 255, 8, 8)
+ bounds: 928 160 8 8
+ - image: solid-color(117, 20, 0, 255, 8, 8)
+ bounds: 936 160 8 8
+ - image: solid-color(118, 20, 0, 255, 8, 8)
+ bounds: 944 160 8 8
+ - image: solid-color(119, 20, 0, 255, 8, 8)
+ bounds: 952 160 8 8
+ - image: solid-color(120, 20, 0, 255, 8, 8)
+ bounds: 960 160 8 8
+ - image: solid-color(121, 20, 0, 255, 8, 8)
+ bounds: 968 160 8 8
+ - image: solid-color(122, 20, 0, 255, 8, 8)
+ bounds: 976 160 8 8
+ - image: solid-color(123, 20, 0, 255, 8, 8)
+ bounds: 984 160 8 8
+ - image: solid-color(124, 20, 0, 255, 8, 8)
+ bounds: 992 160 8 8
+ - image: solid-color(125, 20, 0, 255, 8, 8)
+ bounds: 1000 160 8 8
+ - image: solid-color(126, 20, 0, 255, 8, 8)
+ bounds: 1008 160 8 8
+ - image: solid-color(127, 20, 0, 255, 8, 8)
+ bounds: 1016 160 8 8
+ - image: solid-color(0, 21, 0, 255, 8, 8)
+ bounds: 0 168 8 8
+ - image: solid-color(1, 21, 0, 255, 8, 8)
+ bounds: 8 168 8 8
+ - image: solid-color(2, 21, 0, 255, 8, 8)
+ bounds: 16 168 8 8
+ - image: solid-color(3, 21, 0, 255, 8, 8)
+ bounds: 24 168 8 8
+ - image: solid-color(4, 21, 0, 255, 8, 8)
+ bounds: 32 168 8 8
+ - image: solid-color(5, 21, 0, 255, 8, 8)
+ bounds: 40 168 8 8
+ - image: solid-color(6, 21, 0, 255, 8, 8)
+ bounds: 48 168 8 8
+ - image: solid-color(7, 21, 0, 255, 8, 8)
+ bounds: 56 168 8 8
+ - image: solid-color(8, 21, 0, 255, 8, 8)
+ bounds: 64 168 8 8
+ - image: solid-color(9, 21, 0, 255, 8, 8)
+ bounds: 72 168 8 8
+ - image: solid-color(10, 21, 0, 255, 8, 8)
+ bounds: 80 168 8 8
+ - image: solid-color(11, 21, 0, 255, 8, 8)
+ bounds: 88 168 8 8
+ - image: solid-color(12, 21, 0, 255, 8, 8)
+ bounds: 96 168 8 8
+ - image: solid-color(13, 21, 0, 255, 8, 8)
+ bounds: 104 168 8 8
+ - image: solid-color(14, 21, 0, 255, 8, 8)
+ bounds: 112 168 8 8
+ - image: solid-color(15, 21, 0, 255, 8, 8)
+ bounds: 120 168 8 8
+ - image: solid-color(16, 21, 0, 255, 8, 8)
+ bounds: 128 168 8 8
+ - image: solid-color(17, 21, 0, 255, 8, 8)
+ bounds: 136 168 8 8
+ - image: solid-color(18, 21, 0, 255, 8, 8)
+ bounds: 144 168 8 8
+ - image: solid-color(19, 21, 0, 255, 8, 8)
+ bounds: 152 168 8 8
+ - image: solid-color(20, 21, 0, 255, 8, 8)
+ bounds: 160 168 8 8
+ - image: solid-color(21, 21, 0, 255, 8, 8)
+ bounds: 168 168 8 8
+ - image: solid-color(22, 21, 0, 255, 8, 8)
+ bounds: 176 168 8 8
+ - image: solid-color(23, 21, 0, 255, 8, 8)
+ bounds: 184 168 8 8
+ - image: solid-color(24, 21, 0, 255, 8, 8)
+ bounds: 192 168 8 8
+ - image: solid-color(25, 21, 0, 255, 8, 8)
+ bounds: 200 168 8 8
+ - image: solid-color(26, 21, 0, 255, 8, 8)
+ bounds: 208 168 8 8
+ - image: solid-color(27, 21, 0, 255, 8, 8)
+ bounds: 216 168 8 8
+ - image: solid-color(28, 21, 0, 255, 8, 8)
+ bounds: 224 168 8 8
+ - image: solid-color(29, 21, 0, 255, 8, 8)
+ bounds: 232 168 8 8
+ - image: solid-color(30, 21, 0, 255, 8, 8)
+ bounds: 240 168 8 8
+ - image: solid-color(31, 21, 0, 255, 8, 8)
+ bounds: 248 168 8 8
+ - image: solid-color(32, 21, 0, 255, 8, 8)
+ bounds: 256 168 8 8
+ - image: solid-color(33, 21, 0, 255, 8, 8)
+ bounds: 264 168 8 8
+ - image: solid-color(34, 21, 0, 255, 8, 8)
+ bounds: 272 168 8 8
+ - image: solid-color(35, 21, 0, 255, 8, 8)
+ bounds: 280 168 8 8
+ - image: solid-color(36, 21, 0, 255, 8, 8)
+ bounds: 288 168 8 8
+ - image: solid-color(37, 21, 0, 255, 8, 8)
+ bounds: 296 168 8 8
+ - image: solid-color(38, 21, 0, 255, 8, 8)
+ bounds: 304 168 8 8
+ - image: solid-color(39, 21, 0, 255, 8, 8)
+ bounds: 312 168 8 8
+ - image: solid-color(40, 21, 0, 255, 8, 8)
+ bounds: 320 168 8 8
+ - image: solid-color(41, 21, 0, 255, 8, 8)
+ bounds: 328 168 8 8
+ - image: solid-color(42, 21, 0, 255, 8, 8)
+ bounds: 336 168 8 8
+ - image: solid-color(43, 21, 0, 255, 8, 8)
+ bounds: 344 168 8 8
+ - image: solid-color(44, 21, 0, 255, 8, 8)
+ bounds: 352 168 8 8
+ - image: solid-color(45, 21, 0, 255, 8, 8)
+ bounds: 360 168 8 8
+ - image: solid-color(46, 21, 0, 255, 8, 8)
+ bounds: 368 168 8 8
+ - image: solid-color(47, 21, 0, 255, 8, 8)
+ bounds: 376 168 8 8
+ - image: solid-color(48, 21, 0, 255, 8, 8)
+ bounds: 384 168 8 8
+ - image: solid-color(49, 21, 0, 255, 8, 8)
+ bounds: 392 168 8 8
+ - image: solid-color(50, 21, 0, 255, 8, 8)
+ bounds: 400 168 8 8
+ - image: solid-color(51, 21, 0, 255, 8, 8)
+ bounds: 408 168 8 8
+ - image: solid-color(52, 21, 0, 255, 8, 8)
+ bounds: 416 168 8 8
+ - image: solid-color(53, 21, 0, 255, 8, 8)
+ bounds: 424 168 8 8
+ - image: solid-color(54, 21, 0, 255, 8, 8)
+ bounds: 432 168 8 8
+ - image: solid-color(55, 21, 0, 255, 8, 8)
+ bounds: 440 168 8 8
+ - image: solid-color(56, 21, 0, 255, 8, 8)
+ bounds: 448 168 8 8
+ - image: solid-color(57, 21, 0, 255, 8, 8)
+ bounds: 456 168 8 8
+ - image: solid-color(58, 21, 0, 255, 8, 8)
+ bounds: 464 168 8 8
+ - image: solid-color(59, 21, 0, 255, 8, 8)
+ bounds: 472 168 8 8
+ - image: solid-color(60, 21, 0, 255, 8, 8)
+ bounds: 480 168 8 8
+ - image: solid-color(61, 21, 0, 255, 8, 8)
+ bounds: 488 168 8 8
+ - image: solid-color(62, 21, 0, 255, 8, 8)
+ bounds: 496 168 8 8
+ - image: solid-color(63, 21, 0, 255, 8, 8)
+ bounds: 504 168 8 8
+ - image: solid-color(64, 21, 0, 255, 8, 8)
+ bounds: 512 168 8 8
+ - image: solid-color(65, 21, 0, 255, 8, 8)
+ bounds: 520 168 8 8
+ - image: solid-color(66, 21, 0, 255, 8, 8)
+ bounds: 528 168 8 8
+ - image: solid-color(67, 21, 0, 255, 8, 8)
+ bounds: 536 168 8 8
+ - image: solid-color(68, 21, 0, 255, 8, 8)
+ bounds: 544 168 8 8
+ - image: solid-color(69, 21, 0, 255, 8, 8)
+ bounds: 552 168 8 8
+ - image: solid-color(70, 21, 0, 255, 8, 8)
+ bounds: 560 168 8 8
+ - image: solid-color(71, 21, 0, 255, 8, 8)
+ bounds: 568 168 8 8
+ - image: solid-color(72, 21, 0, 255, 8, 8)
+ bounds: 576 168 8 8
+ - image: solid-color(73, 21, 0, 255, 8, 8)
+ bounds: 584 168 8 8
+ - image: solid-color(74, 21, 0, 255, 8, 8)
+ bounds: 592 168 8 8
+ - image: solid-color(75, 21, 0, 255, 8, 8)
+ bounds: 600 168 8 8
+ - image: solid-color(76, 21, 0, 255, 8, 8)
+ bounds: 608 168 8 8
+ - image: solid-color(77, 21, 0, 255, 8, 8)
+ bounds: 616 168 8 8
+ - image: solid-color(78, 21, 0, 255, 8, 8)
+ bounds: 624 168 8 8
+ - image: solid-color(79, 21, 0, 255, 8, 8)
+ bounds: 632 168 8 8
+ - image: solid-color(80, 21, 0, 255, 8, 8)
+ bounds: 640 168 8 8
+ - image: solid-color(81, 21, 0, 255, 8, 8)
+ bounds: 648 168 8 8
+ - image: solid-color(82, 21, 0, 255, 8, 8)
+ bounds: 656 168 8 8
+ - image: solid-color(83, 21, 0, 255, 8, 8)
+ bounds: 664 168 8 8
+ - image: solid-color(84, 21, 0, 255, 8, 8)
+ bounds: 672 168 8 8
+ - image: solid-color(85, 21, 0, 255, 8, 8)
+ bounds: 680 168 8 8
+ - image: solid-color(86, 21, 0, 255, 8, 8)
+ bounds: 688 168 8 8
+ - image: solid-color(87, 21, 0, 255, 8, 8)
+ bounds: 696 168 8 8
+ - image: solid-color(88, 21, 0, 255, 8, 8)
+ bounds: 704 168 8 8
+ - image: solid-color(89, 21, 0, 255, 8, 8)
+ bounds: 712 168 8 8
+ - image: solid-color(90, 21, 0, 255, 8, 8)
+ bounds: 720 168 8 8
+ - image: solid-color(91, 21, 0, 255, 8, 8)
+ bounds: 728 168 8 8
+ - image: solid-color(92, 21, 0, 255, 8, 8)
+ bounds: 736 168 8 8
+ - image: solid-color(93, 21, 0, 255, 8, 8)
+ bounds: 744 168 8 8
+ - image: solid-color(94, 21, 0, 255, 8, 8)
+ bounds: 752 168 8 8
+ - image: solid-color(95, 21, 0, 255, 8, 8)
+ bounds: 760 168 8 8
+ - image: solid-color(96, 21, 0, 255, 8, 8)
+ bounds: 768 168 8 8
+ - image: solid-color(97, 21, 0, 255, 8, 8)
+ bounds: 776 168 8 8
+ - image: solid-color(98, 21, 0, 255, 8, 8)
+ bounds: 784 168 8 8
+ - image: solid-color(99, 21, 0, 255, 8, 8)
+ bounds: 792 168 8 8
+ - image: solid-color(100, 21, 0, 255, 8, 8)
+ bounds: 800 168 8 8
+ - image: solid-color(101, 21, 0, 255, 8, 8)
+ bounds: 808 168 8 8
+ - image: solid-color(102, 21, 0, 255, 8, 8)
+ bounds: 816 168 8 8
+ - image: solid-color(103, 21, 0, 255, 8, 8)
+ bounds: 824 168 8 8
+ - image: solid-color(104, 21, 0, 255, 8, 8)
+ bounds: 832 168 8 8
+ - image: solid-color(105, 21, 0, 255, 8, 8)
+ bounds: 840 168 8 8
+ - image: solid-color(106, 21, 0, 255, 8, 8)
+ bounds: 848 168 8 8
+ - image: solid-color(107, 21, 0, 255, 8, 8)
+ bounds: 856 168 8 8
+ - image: solid-color(108, 21, 0, 255, 8, 8)
+ bounds: 864 168 8 8
+ - image: solid-color(109, 21, 0, 255, 8, 8)
+ bounds: 872 168 8 8
+ - image: solid-color(110, 21, 0, 255, 8, 8)
+ bounds: 880 168 8 8
+ - image: solid-color(111, 21, 0, 255, 8, 8)
+ bounds: 888 168 8 8
+ - image: solid-color(112, 21, 0, 255, 8, 8)
+ bounds: 896 168 8 8
+ - image: solid-color(113, 21, 0, 255, 8, 8)
+ bounds: 904 168 8 8
+ - image: solid-color(114, 21, 0, 255, 8, 8)
+ bounds: 912 168 8 8
+ - image: solid-color(115, 21, 0, 255, 8, 8)
+ bounds: 920 168 8 8
+ - image: solid-color(116, 21, 0, 255, 8, 8)
+ bounds: 928 168 8 8
+ - image: solid-color(117, 21, 0, 255, 8, 8)
+ bounds: 936 168 8 8
+ - image: solid-color(118, 21, 0, 255, 8, 8)
+ bounds: 944 168 8 8
+ - image: solid-color(119, 21, 0, 255, 8, 8)
+ bounds: 952 168 8 8
+ - image: solid-color(120, 21, 0, 255, 8, 8)
+ bounds: 960 168 8 8
+ - image: solid-color(121, 21, 0, 255, 8, 8)
+ bounds: 968 168 8 8
+ - image: solid-color(122, 21, 0, 255, 8, 8)
+ bounds: 976 168 8 8
+ - image: solid-color(123, 21, 0, 255, 8, 8)
+ bounds: 984 168 8 8
+ - image: solid-color(124, 21, 0, 255, 8, 8)
+ bounds: 992 168 8 8
+ - image: solid-color(125, 21, 0, 255, 8, 8)
+ bounds: 1000 168 8 8
+ - image: solid-color(126, 21, 0, 255, 8, 8)
+ bounds: 1008 168 8 8
+ - image: solid-color(127, 21, 0, 255, 8, 8)
+ bounds: 1016 168 8 8
+ - image: solid-color(0, 22, 0, 255, 8, 8)
+ bounds: 0 176 8 8
+ - image: solid-color(1, 22, 0, 255, 8, 8)
+ bounds: 8 176 8 8
+ - image: solid-color(2, 22, 0, 255, 8, 8)
+ bounds: 16 176 8 8
+ - image: solid-color(3, 22, 0, 255, 8, 8)
+ bounds: 24 176 8 8
+ - image: solid-color(4, 22, 0, 255, 8, 8)
+ bounds: 32 176 8 8
+ - image: solid-color(5, 22, 0, 255, 8, 8)
+ bounds: 40 176 8 8
+ - image: solid-color(6, 22, 0, 255, 8, 8)
+ bounds: 48 176 8 8
+ - image: solid-color(7, 22, 0, 255, 8, 8)
+ bounds: 56 176 8 8
+ - image: solid-color(8, 22, 0, 255, 8, 8)
+ bounds: 64 176 8 8
+ - image: solid-color(9, 22, 0, 255, 8, 8)
+ bounds: 72 176 8 8
+ - image: solid-color(10, 22, 0, 255, 8, 8)
+ bounds: 80 176 8 8
+ - image: solid-color(11, 22, 0, 255, 8, 8)
+ bounds: 88 176 8 8
+ - image: solid-color(12, 22, 0, 255, 8, 8)
+ bounds: 96 176 8 8
+ - image: solid-color(13, 22, 0, 255, 8, 8)
+ bounds: 104 176 8 8
+ - image: solid-color(14, 22, 0, 255, 8, 8)
+ bounds: 112 176 8 8
+ - image: solid-color(15, 22, 0, 255, 8, 8)
+ bounds: 120 176 8 8
+ - image: solid-color(16, 22, 0, 255, 8, 8)
+ bounds: 128 176 8 8
+ - image: solid-color(17, 22, 0, 255, 8, 8)
+ bounds: 136 176 8 8
+ - image: solid-color(18, 22, 0, 255, 8, 8)
+ bounds: 144 176 8 8
+ - image: solid-color(19, 22, 0, 255, 8, 8)
+ bounds: 152 176 8 8
+ - image: solid-color(20, 22, 0, 255, 8, 8)
+ bounds: 160 176 8 8
+ - image: solid-color(21, 22, 0, 255, 8, 8)
+ bounds: 168 176 8 8
+ - image: solid-color(22, 22, 0, 255, 8, 8)
+ bounds: 176 176 8 8
+ - image: solid-color(23, 22, 0, 255, 8, 8)
+ bounds: 184 176 8 8
+ - image: solid-color(24, 22, 0, 255, 8, 8)
+ bounds: 192 176 8 8
+ - image: solid-color(25, 22, 0, 255, 8, 8)
+ bounds: 200 176 8 8
+ - image: solid-color(26, 22, 0, 255, 8, 8)
+ bounds: 208 176 8 8
+ - image: solid-color(27, 22, 0, 255, 8, 8)
+ bounds: 216 176 8 8
+ - image: solid-color(28, 22, 0, 255, 8, 8)
+ bounds: 224 176 8 8
+ - image: solid-color(29, 22, 0, 255, 8, 8)
+ bounds: 232 176 8 8
+ - image: solid-color(30, 22, 0, 255, 8, 8)
+ bounds: 240 176 8 8
+ - image: solid-color(31, 22, 0, 255, 8, 8)
+ bounds: 248 176 8 8
+ - image: solid-color(32, 22, 0, 255, 8, 8)
+ bounds: 256 176 8 8
+ - image: solid-color(33, 22, 0, 255, 8, 8)
+ bounds: 264 176 8 8
+ - image: solid-color(34, 22, 0, 255, 8, 8)
+ bounds: 272 176 8 8
+ - image: solid-color(35, 22, 0, 255, 8, 8)
+ bounds: 280 176 8 8
+ - image: solid-color(36, 22, 0, 255, 8, 8)
+ bounds: 288 176 8 8
+ - image: solid-color(37, 22, 0, 255, 8, 8)
+ bounds: 296 176 8 8
+ - image: solid-color(38, 22, 0, 255, 8, 8)
+ bounds: 304 176 8 8
+ - image: solid-color(39, 22, 0, 255, 8, 8)
+ bounds: 312 176 8 8
+ - image: solid-color(40, 22, 0, 255, 8, 8)
+ bounds: 320 176 8 8
+ - image: solid-color(41, 22, 0, 255, 8, 8)
+ bounds: 328 176 8 8
+ - image: solid-color(42, 22, 0, 255, 8, 8)
+ bounds: 336 176 8 8
+ - image: solid-color(43, 22, 0, 255, 8, 8)
+ bounds: 344 176 8 8
+ - image: solid-color(44, 22, 0, 255, 8, 8)
+ bounds: 352 176 8 8
+ - image: solid-color(45, 22, 0, 255, 8, 8)
+ bounds: 360 176 8 8
+ - image: solid-color(46, 22, 0, 255, 8, 8)
+ bounds: 368 176 8 8
+ - image: solid-color(47, 22, 0, 255, 8, 8)
+ bounds: 376 176 8 8
+ - image: solid-color(48, 22, 0, 255, 8, 8)
+ bounds: 384 176 8 8
+ - image: solid-color(49, 22, 0, 255, 8, 8)
+ bounds: 392 176 8 8
+ - image: solid-color(50, 22, 0, 255, 8, 8)
+ bounds: 400 176 8 8
+ - image: solid-color(51, 22, 0, 255, 8, 8)
+ bounds: 408 176 8 8
+ - image: solid-color(52, 22, 0, 255, 8, 8)
+ bounds: 416 176 8 8
+ - image: solid-color(53, 22, 0, 255, 8, 8)
+ bounds: 424 176 8 8
+ - image: solid-color(54, 22, 0, 255, 8, 8)
+ bounds: 432 176 8 8
+ - image: solid-color(55, 22, 0, 255, 8, 8)
+ bounds: 440 176 8 8
+ - image: solid-color(56, 22, 0, 255, 8, 8)
+ bounds: 448 176 8 8
+ - image: solid-color(57, 22, 0, 255, 8, 8)
+ bounds: 456 176 8 8
+ - image: solid-color(58, 22, 0, 255, 8, 8)
+ bounds: 464 176 8 8
+ - image: solid-color(59, 22, 0, 255, 8, 8)
+ bounds: 472 176 8 8
+ - image: solid-color(60, 22, 0, 255, 8, 8)
+ bounds: 480 176 8 8
+ - image: solid-color(61, 22, 0, 255, 8, 8)
+ bounds: 488 176 8 8
+ - image: solid-color(62, 22, 0, 255, 8, 8)
+ bounds: 496 176 8 8
+ - image: solid-color(63, 22, 0, 255, 8, 8)
+ bounds: 504 176 8 8
+ - image: solid-color(64, 22, 0, 255, 8, 8)
+ bounds: 512 176 8 8
+ - image: solid-color(65, 22, 0, 255, 8, 8)
+ bounds: 520 176 8 8
+ - image: solid-color(66, 22, 0, 255, 8, 8)
+ bounds: 528 176 8 8
+ - image: solid-color(67, 22, 0, 255, 8, 8)
+ bounds: 536 176 8 8
+ - image: solid-color(68, 22, 0, 255, 8, 8)
+ bounds: 544 176 8 8
+ - image: solid-color(69, 22, 0, 255, 8, 8)
+ bounds: 552 176 8 8
+ - image: solid-color(70, 22, 0, 255, 8, 8)
+ bounds: 560 176 8 8
+ - image: solid-color(71, 22, 0, 255, 8, 8)
+ bounds: 568 176 8 8
+ - image: solid-color(72, 22, 0, 255, 8, 8)
+ bounds: 576 176 8 8
+ - image: solid-color(73, 22, 0, 255, 8, 8)
+ bounds: 584 176 8 8
+ - image: solid-color(74, 22, 0, 255, 8, 8)
+ bounds: 592 176 8 8
+ - image: solid-color(75, 22, 0, 255, 8, 8)
+ bounds: 600 176 8 8
+ - image: solid-color(76, 22, 0, 255, 8, 8)
+ bounds: 608 176 8 8
+ - image: solid-color(77, 22, 0, 255, 8, 8)
+ bounds: 616 176 8 8
+ - image: solid-color(78, 22, 0, 255, 8, 8)
+ bounds: 624 176 8 8
+ - image: solid-color(79, 22, 0, 255, 8, 8)
+ bounds: 632 176 8 8
+ - image: solid-color(80, 22, 0, 255, 8, 8)
+ bounds: 640 176 8 8
+ - image: solid-color(81, 22, 0, 255, 8, 8)
+ bounds: 648 176 8 8
+ - image: solid-color(82, 22, 0, 255, 8, 8)
+ bounds: 656 176 8 8
+ - image: solid-color(83, 22, 0, 255, 8, 8)
+ bounds: 664 176 8 8
+ - image: solid-color(84, 22, 0, 255, 8, 8)
+ bounds: 672 176 8 8
+ - image: solid-color(85, 22, 0, 255, 8, 8)
+ bounds: 680 176 8 8
+ - image: solid-color(86, 22, 0, 255, 8, 8)
+ bounds: 688 176 8 8
+ - image: solid-color(87, 22, 0, 255, 8, 8)
+ bounds: 696 176 8 8
+ - image: solid-color(88, 22, 0, 255, 8, 8)
+ bounds: 704 176 8 8
+ - image: solid-color(89, 22, 0, 255, 8, 8)
+ bounds: 712 176 8 8
+ - image: solid-color(90, 22, 0, 255, 8, 8)
+ bounds: 720 176 8 8
+ - image: solid-color(91, 22, 0, 255, 8, 8)
+ bounds: 728 176 8 8
+ - image: solid-color(92, 22, 0, 255, 8, 8)
+ bounds: 736 176 8 8
+ - image: solid-color(93, 22, 0, 255, 8, 8)
+ bounds: 744 176 8 8
+ - image: solid-color(94, 22, 0, 255, 8, 8)
+ bounds: 752 176 8 8
+ - image: solid-color(95, 22, 0, 255, 8, 8)
+ bounds: 760 176 8 8
+ - image: solid-color(96, 22, 0, 255, 8, 8)
+ bounds: 768 176 8 8
+ - image: solid-color(97, 22, 0, 255, 8, 8)
+ bounds: 776 176 8 8
+ - image: solid-color(98, 22, 0, 255, 8, 8)
+ bounds: 784 176 8 8
+ - image: solid-color(99, 22, 0, 255, 8, 8)
+ bounds: 792 176 8 8
+ - image: solid-color(100, 22, 0, 255, 8, 8)
+ bounds: 800 176 8 8
+ - image: solid-color(101, 22, 0, 255, 8, 8)
+ bounds: 808 176 8 8
+ - image: solid-color(102, 22, 0, 255, 8, 8)
+ bounds: 816 176 8 8
+ - image: solid-color(103, 22, 0, 255, 8, 8)
+ bounds: 824 176 8 8
+ - image: solid-color(104, 22, 0, 255, 8, 8)
+ bounds: 832 176 8 8
+ - image: solid-color(105, 22, 0, 255, 8, 8)
+ bounds: 840 176 8 8
+ - image: solid-color(106, 22, 0, 255, 8, 8)
+ bounds: 848 176 8 8
+ - image: solid-color(107, 22, 0, 255, 8, 8)
+ bounds: 856 176 8 8
+ - image: solid-color(108, 22, 0, 255, 8, 8)
+ bounds: 864 176 8 8
+ - image: solid-color(109, 22, 0, 255, 8, 8)
+ bounds: 872 176 8 8
+ - image: solid-color(110, 22, 0, 255, 8, 8)
+ bounds: 880 176 8 8
+ - image: solid-color(111, 22, 0, 255, 8, 8)
+ bounds: 888 176 8 8
+ - image: solid-color(112, 22, 0, 255, 8, 8)
+ bounds: 896 176 8 8
+ - image: solid-color(113, 22, 0, 255, 8, 8)
+ bounds: 904 176 8 8
+ - image: solid-color(114, 22, 0, 255, 8, 8)
+ bounds: 912 176 8 8
+ - image: solid-color(115, 22, 0, 255, 8, 8)
+ bounds: 920 176 8 8
+ - image: solid-color(116, 22, 0, 255, 8, 8)
+ bounds: 928 176 8 8
+ - image: solid-color(117, 22, 0, 255, 8, 8)
+ bounds: 936 176 8 8
+ - image: solid-color(118, 22, 0, 255, 8, 8)
+ bounds: 944 176 8 8
+ - image: solid-color(119, 22, 0, 255, 8, 8)
+ bounds: 952 176 8 8
+ - image: solid-color(120, 22, 0, 255, 8, 8)
+ bounds: 960 176 8 8
+ - image: solid-color(121, 22, 0, 255, 8, 8)
+ bounds: 968 176 8 8
+ - image: solid-color(122, 22, 0, 255, 8, 8)
+ bounds: 976 176 8 8
+ - image: solid-color(123, 22, 0, 255, 8, 8)
+ bounds: 984 176 8 8
+ - image: solid-color(124, 22, 0, 255, 8, 8)
+ bounds: 992 176 8 8
+ - image: solid-color(125, 22, 0, 255, 8, 8)
+ bounds: 1000 176 8 8
+ - image: solid-color(126, 22, 0, 255, 8, 8)
+ bounds: 1008 176 8 8
+ - image: solid-color(127, 22, 0, 255, 8, 8)
+ bounds: 1016 176 8 8
+ - image: solid-color(0, 23, 0, 255, 8, 8)
+ bounds: 0 184 8 8
+ - image: solid-color(1, 23, 0, 255, 8, 8)
+ bounds: 8 184 8 8
+ - image: solid-color(2, 23, 0, 255, 8, 8)
+ bounds: 16 184 8 8
+ - image: solid-color(3, 23, 0, 255, 8, 8)
+ bounds: 24 184 8 8
+ - image: solid-color(4, 23, 0, 255, 8, 8)
+ bounds: 32 184 8 8
+ - image: solid-color(5, 23, 0, 255, 8, 8)
+ bounds: 40 184 8 8
+ - image: solid-color(6, 23, 0, 255, 8, 8)
+ bounds: 48 184 8 8
+ - image: solid-color(7, 23, 0, 255, 8, 8)
+ bounds: 56 184 8 8
+ - image: solid-color(8, 23, 0, 255, 8, 8)
+ bounds: 64 184 8 8
+ - image: solid-color(9, 23, 0, 255, 8, 8)
+ bounds: 72 184 8 8
+ - image: solid-color(10, 23, 0, 255, 8, 8)
+ bounds: 80 184 8 8
+ - image: solid-color(11, 23, 0, 255, 8, 8)
+ bounds: 88 184 8 8
+ - image: solid-color(12, 23, 0, 255, 8, 8)
+ bounds: 96 184 8 8
+ - image: solid-color(13, 23, 0, 255, 8, 8)
+ bounds: 104 184 8 8
+ - image: solid-color(14, 23, 0, 255, 8, 8)
+ bounds: 112 184 8 8
+ - image: solid-color(15, 23, 0, 255, 8, 8)
+ bounds: 120 184 8 8
+ - image: solid-color(16, 23, 0, 255, 8, 8)
+ bounds: 128 184 8 8
+ - image: solid-color(17, 23, 0, 255, 8, 8)
+ bounds: 136 184 8 8
+ - image: solid-color(18, 23, 0, 255, 8, 8)
+ bounds: 144 184 8 8
+ - image: solid-color(19, 23, 0, 255, 8, 8)
+ bounds: 152 184 8 8
+ - image: solid-color(20, 23, 0, 255, 8, 8)
+ bounds: 160 184 8 8
+ - image: solid-color(21, 23, 0, 255, 8, 8)
+ bounds: 168 184 8 8
+ - image: solid-color(22, 23, 0, 255, 8, 8)
+ bounds: 176 184 8 8
+ - image: solid-color(23, 23, 0, 255, 8, 8)
+ bounds: 184 184 8 8
+ - image: solid-color(24, 23, 0, 255, 8, 8)
+ bounds: 192 184 8 8
+ - image: solid-color(25, 23, 0, 255, 8, 8)
+ bounds: 200 184 8 8
+ - image: solid-color(26, 23, 0, 255, 8, 8)
+ bounds: 208 184 8 8
+ - image: solid-color(27, 23, 0, 255, 8, 8)
+ bounds: 216 184 8 8
+ - image: solid-color(28, 23, 0, 255, 8, 8)
+ bounds: 224 184 8 8
+ - image: solid-color(29, 23, 0, 255, 8, 8)
+ bounds: 232 184 8 8
+ - image: solid-color(30, 23, 0, 255, 8, 8)
+ bounds: 240 184 8 8
+ - image: solid-color(31, 23, 0, 255, 8, 8)
+ bounds: 248 184 8 8
+ - image: solid-color(32, 23, 0, 255, 8, 8)
+ bounds: 256 184 8 8
+ - image: solid-color(33, 23, 0, 255, 8, 8)
+ bounds: 264 184 8 8
+ - image: solid-color(34, 23, 0, 255, 8, 8)
+ bounds: 272 184 8 8
+ - image: solid-color(35, 23, 0, 255, 8, 8)
+ bounds: 280 184 8 8
+ - image: solid-color(36, 23, 0, 255, 8, 8)
+ bounds: 288 184 8 8
+ - image: solid-color(37, 23, 0, 255, 8, 8)
+ bounds: 296 184 8 8
+ - image: solid-color(38, 23, 0, 255, 8, 8)
+ bounds: 304 184 8 8
+ - image: solid-color(39, 23, 0, 255, 8, 8)
+ bounds: 312 184 8 8
+ - image: solid-color(40, 23, 0, 255, 8, 8)
+ bounds: 320 184 8 8
+ - image: solid-color(41, 23, 0, 255, 8, 8)
+ bounds: 328 184 8 8
+ - image: solid-color(42, 23, 0, 255, 8, 8)
+ bounds: 336 184 8 8
+ - image: solid-color(43, 23, 0, 255, 8, 8)
+ bounds: 344 184 8 8
+ - image: solid-color(44, 23, 0, 255, 8, 8)
+ bounds: 352 184 8 8
+ - image: solid-color(45, 23, 0, 255, 8, 8)
+ bounds: 360 184 8 8
+ - image: solid-color(46, 23, 0, 255, 8, 8)
+ bounds: 368 184 8 8
+ - image: solid-color(47, 23, 0, 255, 8, 8)
+ bounds: 376 184 8 8
+ - image: solid-color(48, 23, 0, 255, 8, 8)
+ bounds: 384 184 8 8
+ - image: solid-color(49, 23, 0, 255, 8, 8)
+ bounds: 392 184 8 8
+ - image: solid-color(50, 23, 0, 255, 8, 8)
+ bounds: 400 184 8 8
+ - image: solid-color(51, 23, 0, 255, 8, 8)
+ bounds: 408 184 8 8
+ - image: solid-color(52, 23, 0, 255, 8, 8)
+ bounds: 416 184 8 8
+ - image: solid-color(53, 23, 0, 255, 8, 8)
+ bounds: 424 184 8 8
+ - image: solid-color(54, 23, 0, 255, 8, 8)
+ bounds: 432 184 8 8
+ - image: solid-color(55, 23, 0, 255, 8, 8)
+ bounds: 440 184 8 8
+ - image: solid-color(56, 23, 0, 255, 8, 8)
+ bounds: 448 184 8 8
+ - image: solid-color(57, 23, 0, 255, 8, 8)
+ bounds: 456 184 8 8
+ - image: solid-color(58, 23, 0, 255, 8, 8)
+ bounds: 464 184 8 8
+ - image: solid-color(59, 23, 0, 255, 8, 8)
+ bounds: 472 184 8 8
+ - image: solid-color(60, 23, 0, 255, 8, 8)
+ bounds: 480 184 8 8
+ - image: solid-color(61, 23, 0, 255, 8, 8)
+ bounds: 488 184 8 8
+ - image: solid-color(62, 23, 0, 255, 8, 8)
+ bounds: 496 184 8 8
+ - image: solid-color(63, 23, 0, 255, 8, 8)
+ bounds: 504 184 8 8
+ - image: solid-color(64, 23, 0, 255, 8, 8)
+ bounds: 512 184 8 8
+ - image: solid-color(65, 23, 0, 255, 8, 8)
+ bounds: 520 184 8 8
+ - image: solid-color(66, 23, 0, 255, 8, 8)
+ bounds: 528 184 8 8
+ - image: solid-color(67, 23, 0, 255, 8, 8)
+ bounds: 536 184 8 8
+ - image: solid-color(68, 23, 0, 255, 8, 8)
+ bounds: 544 184 8 8
+ - image: solid-color(69, 23, 0, 255, 8, 8)
+ bounds: 552 184 8 8
+ - image: solid-color(70, 23, 0, 255, 8, 8)
+ bounds: 560 184 8 8
+ - image: solid-color(71, 23, 0, 255, 8, 8)
+ bounds: 568 184 8 8
+ - image: solid-color(72, 23, 0, 255, 8, 8)
+ bounds: 576 184 8 8
+ - image: solid-color(73, 23, 0, 255, 8, 8)
+ bounds: 584 184 8 8
+ - image: solid-color(74, 23, 0, 255, 8, 8)
+ bounds: 592 184 8 8
+ - image: solid-color(75, 23, 0, 255, 8, 8)
+ bounds: 600 184 8 8
+ - image: solid-color(76, 23, 0, 255, 8, 8)
+ bounds: 608 184 8 8
+ - image: solid-color(77, 23, 0, 255, 8, 8)
+ bounds: 616 184 8 8
+ - image: solid-color(78, 23, 0, 255, 8, 8)
+ bounds: 624 184 8 8
+ - image: solid-color(79, 23, 0, 255, 8, 8)
+ bounds: 632 184 8 8
+ - image: solid-color(80, 23, 0, 255, 8, 8)
+ bounds: 640 184 8 8
+ - image: solid-color(81, 23, 0, 255, 8, 8)
+ bounds: 648 184 8 8
+ - image: solid-color(82, 23, 0, 255, 8, 8)
+ bounds: 656 184 8 8
+ - image: solid-color(83, 23, 0, 255, 8, 8)
+ bounds: 664 184 8 8
+ - image: solid-color(84, 23, 0, 255, 8, 8)
+ bounds: 672 184 8 8
+ - image: solid-color(85, 23, 0, 255, 8, 8)
+ bounds: 680 184 8 8
+ - image: solid-color(86, 23, 0, 255, 8, 8)
+ bounds: 688 184 8 8
+ - image: solid-color(87, 23, 0, 255, 8, 8)
+ bounds: 696 184 8 8
+ - image: solid-color(88, 23, 0, 255, 8, 8)
+ bounds: 704 184 8 8
+ - image: solid-color(89, 23, 0, 255, 8, 8)
+ bounds: 712 184 8 8
+ - image: solid-color(90, 23, 0, 255, 8, 8)
+ bounds: 720 184 8 8
+ - image: solid-color(91, 23, 0, 255, 8, 8)
+ bounds: 728 184 8 8
+ - image: solid-color(92, 23, 0, 255, 8, 8)
+ bounds: 736 184 8 8
+ - image: solid-color(93, 23, 0, 255, 8, 8)
+ bounds: 744 184 8 8
+ - image: solid-color(94, 23, 0, 255, 8, 8)
+ bounds: 752 184 8 8
+ - image: solid-color(95, 23, 0, 255, 8, 8)
+ bounds: 760 184 8 8
+ - image: solid-color(96, 23, 0, 255, 8, 8)
+ bounds: 768 184 8 8
+ - image: solid-color(97, 23, 0, 255, 8, 8)
+ bounds: 776 184 8 8
+ - image: solid-color(98, 23, 0, 255, 8, 8)
+ bounds: 784 184 8 8
+ - image: solid-color(99, 23, 0, 255, 8, 8)
+ bounds: 792 184 8 8
+ - image: solid-color(100, 23, 0, 255, 8, 8)
+ bounds: 800 184 8 8
+ - image: solid-color(101, 23, 0, 255, 8, 8)
+ bounds: 808 184 8 8
+ - image: solid-color(102, 23, 0, 255, 8, 8)
+ bounds: 816 184 8 8
+ - image: solid-color(103, 23, 0, 255, 8, 8)
+ bounds: 824 184 8 8
+ - image: solid-color(104, 23, 0, 255, 8, 8)
+ bounds: 832 184 8 8
+ - image: solid-color(105, 23, 0, 255, 8, 8)
+ bounds: 840 184 8 8
+ - image: solid-color(106, 23, 0, 255, 8, 8)
+ bounds: 848 184 8 8
+ - image: solid-color(107, 23, 0, 255, 8, 8)
+ bounds: 856 184 8 8
+ - image: solid-color(108, 23, 0, 255, 8, 8)
+ bounds: 864 184 8 8
+ - image: solid-color(109, 23, 0, 255, 8, 8)
+ bounds: 872 184 8 8
+ - image: solid-color(110, 23, 0, 255, 8, 8)
+ bounds: 880 184 8 8
+ - image: solid-color(111, 23, 0, 255, 8, 8)
+ bounds: 888 184 8 8
+ - image: solid-color(112, 23, 0, 255, 8, 8)
+ bounds: 896 184 8 8
+ - image: solid-color(113, 23, 0, 255, 8, 8)
+ bounds: 904 184 8 8
+ - image: solid-color(114, 23, 0, 255, 8, 8)
+ bounds: 912 184 8 8
+ - image: solid-color(115, 23, 0, 255, 8, 8)
+ bounds: 920 184 8 8
+ - image: solid-color(116, 23, 0, 255, 8, 8)
+ bounds: 928 184 8 8
+ - image: solid-color(117, 23, 0, 255, 8, 8)
+ bounds: 936 184 8 8
+ - image: solid-color(118, 23, 0, 255, 8, 8)
+ bounds: 944 184 8 8
+ - image: solid-color(119, 23, 0, 255, 8, 8)
+ bounds: 952 184 8 8
+ - image: solid-color(120, 23, 0, 255, 8, 8)
+ bounds: 960 184 8 8
+ - image: solid-color(121, 23, 0, 255, 8, 8)
+ bounds: 968 184 8 8
+ - image: solid-color(122, 23, 0, 255, 8, 8)
+ bounds: 976 184 8 8
+ - image: solid-color(123, 23, 0, 255, 8, 8)
+ bounds: 984 184 8 8
+ - image: solid-color(124, 23, 0, 255, 8, 8)
+ bounds: 992 184 8 8
+ - image: solid-color(125, 23, 0, 255, 8, 8)
+ bounds: 1000 184 8 8
+ - image: solid-color(126, 23, 0, 255, 8, 8)
+ bounds: 1008 184 8 8
+ - image: solid-color(127, 23, 0, 255, 8, 8)
+ bounds: 1016 184 8 8
+ - image: solid-color(0, 24, 0, 255, 8, 8)
+ bounds: 0 192 8 8
+ - image: solid-color(1, 24, 0, 255, 8, 8)
+ bounds: 8 192 8 8
+ - image: solid-color(2, 24, 0, 255, 8, 8)
+ bounds: 16 192 8 8
+ - image: solid-color(3, 24, 0, 255, 8, 8)
+ bounds: 24 192 8 8
+ - image: solid-color(4, 24, 0, 255, 8, 8)
+ bounds: 32 192 8 8
+ - image: solid-color(5, 24, 0, 255, 8, 8)
+ bounds: 40 192 8 8
+ - image: solid-color(6, 24, 0, 255, 8, 8)
+ bounds: 48 192 8 8
+ - image: solid-color(7, 24, 0, 255, 8, 8)
+ bounds: 56 192 8 8
+ - image: solid-color(8, 24, 0, 255, 8, 8)
+ bounds: 64 192 8 8
+ - image: solid-color(9, 24, 0, 255, 8, 8)
+ bounds: 72 192 8 8
+ - image: solid-color(10, 24, 0, 255, 8, 8)
+ bounds: 80 192 8 8
+ - image: solid-color(11, 24, 0, 255, 8, 8)
+ bounds: 88 192 8 8
+ - image: solid-color(12, 24, 0, 255, 8, 8)
+ bounds: 96 192 8 8
+ - image: solid-color(13, 24, 0, 255, 8, 8)
+ bounds: 104 192 8 8
+ - image: solid-color(14, 24, 0, 255, 8, 8)
+ bounds: 112 192 8 8
+ - image: solid-color(15, 24, 0, 255, 8, 8)
+ bounds: 120 192 8 8
+ - image: solid-color(16, 24, 0, 255, 8, 8)
+ bounds: 128 192 8 8
+ - image: solid-color(17, 24, 0, 255, 8, 8)
+ bounds: 136 192 8 8
+ - image: solid-color(18, 24, 0, 255, 8, 8)
+ bounds: 144 192 8 8
+ - image: solid-color(19, 24, 0, 255, 8, 8)
+ bounds: 152 192 8 8
+ - image: solid-color(20, 24, 0, 255, 8, 8)
+ bounds: 160 192 8 8
+ - image: solid-color(21, 24, 0, 255, 8, 8)
+ bounds: 168 192 8 8
+ - image: solid-color(22, 24, 0, 255, 8, 8)
+ bounds: 176 192 8 8
+ - image: solid-color(23, 24, 0, 255, 8, 8)
+ bounds: 184 192 8 8
+ - image: solid-color(24, 24, 0, 255, 8, 8)
+ bounds: 192 192 8 8
+ - image: solid-color(25, 24, 0, 255, 8, 8)
+ bounds: 200 192 8 8
+ - image: solid-color(26, 24, 0, 255, 8, 8)
+ bounds: 208 192 8 8
+ - image: solid-color(27, 24, 0, 255, 8, 8)
+ bounds: 216 192 8 8
+ - image: solid-color(28, 24, 0, 255, 8, 8)
+ bounds: 224 192 8 8
+ - image: solid-color(29, 24, 0, 255, 8, 8)
+ bounds: 232 192 8 8
+ - image: solid-color(30, 24, 0, 255, 8, 8)
+ bounds: 240 192 8 8
+ - image: solid-color(31, 24, 0, 255, 8, 8)
+ bounds: 248 192 8 8
+ - image: solid-color(32, 24, 0, 255, 8, 8)
+ bounds: 256 192 8 8
+ - image: solid-color(33, 24, 0, 255, 8, 8)
+ bounds: 264 192 8 8
+ - image: solid-color(34, 24, 0, 255, 8, 8)
+ bounds: 272 192 8 8
+ - image: solid-color(35, 24, 0, 255, 8, 8)
+ bounds: 280 192 8 8
+ - image: solid-color(36, 24, 0, 255, 8, 8)
+ bounds: 288 192 8 8
+ - image: solid-color(37, 24, 0, 255, 8, 8)
+ bounds: 296 192 8 8
+ - image: solid-color(38, 24, 0, 255, 8, 8)
+ bounds: 304 192 8 8
+ - image: solid-color(39, 24, 0, 255, 8, 8)
+ bounds: 312 192 8 8
+ - image: solid-color(40, 24, 0, 255, 8, 8)
+ bounds: 320 192 8 8
+ - image: solid-color(41, 24, 0, 255, 8, 8)
+ bounds: 328 192 8 8
+ - image: solid-color(42, 24, 0, 255, 8, 8)
+ bounds: 336 192 8 8
+ - image: solid-color(43, 24, 0, 255, 8, 8)
+ bounds: 344 192 8 8
+ - image: solid-color(44, 24, 0, 255, 8, 8)
+ bounds: 352 192 8 8
+ - image: solid-color(45, 24, 0, 255, 8, 8)
+ bounds: 360 192 8 8
+ - image: solid-color(46, 24, 0, 255, 8, 8)
+ bounds: 368 192 8 8
+ - image: solid-color(47, 24, 0, 255, 8, 8)
+ bounds: 376 192 8 8
+ - image: solid-color(48, 24, 0, 255, 8, 8)
+ bounds: 384 192 8 8
+ - image: solid-color(49, 24, 0, 255, 8, 8)
+ bounds: 392 192 8 8
+ - image: solid-color(50, 24, 0, 255, 8, 8)
+ bounds: 400 192 8 8
+ - image: solid-color(51, 24, 0, 255, 8, 8)
+ bounds: 408 192 8 8
+ - image: solid-color(52, 24, 0, 255, 8, 8)
+ bounds: 416 192 8 8
+ - image: solid-color(53, 24, 0, 255, 8, 8)
+ bounds: 424 192 8 8
+ - image: solid-color(54, 24, 0, 255, 8, 8)
+ bounds: 432 192 8 8
+ - image: solid-color(55, 24, 0, 255, 8, 8)
+ bounds: 440 192 8 8
+ - image: solid-color(56, 24, 0, 255, 8, 8)
+ bounds: 448 192 8 8
+ - image: solid-color(57, 24, 0, 255, 8, 8)
+ bounds: 456 192 8 8
+ - image: solid-color(58, 24, 0, 255, 8, 8)
+ bounds: 464 192 8 8
+ - image: solid-color(59, 24, 0, 255, 8, 8)
+ bounds: 472 192 8 8
+ - image: solid-color(60, 24, 0, 255, 8, 8)
+ bounds: 480 192 8 8
+ - image: solid-color(61, 24, 0, 255, 8, 8)
+ bounds: 488 192 8 8
+ - image: solid-color(62, 24, 0, 255, 8, 8)
+ bounds: 496 192 8 8
+ - image: solid-color(63, 24, 0, 255, 8, 8)
+ bounds: 504 192 8 8
+ - image: solid-color(64, 24, 0, 255, 8, 8)
+ bounds: 512 192 8 8
+ - image: solid-color(65, 24, 0, 255, 8, 8)
+ bounds: 520 192 8 8
+ - image: solid-color(66, 24, 0, 255, 8, 8)
+ bounds: 528 192 8 8
+ - image: solid-color(67, 24, 0, 255, 8, 8)
+ bounds: 536 192 8 8
+ - image: solid-color(68, 24, 0, 255, 8, 8)
+ bounds: 544 192 8 8
+ - image: solid-color(69, 24, 0, 255, 8, 8)
+ bounds: 552 192 8 8
+ - image: solid-color(70, 24, 0, 255, 8, 8)
+ bounds: 560 192 8 8
+ - image: solid-color(71, 24, 0, 255, 8, 8)
+ bounds: 568 192 8 8
+ - image: solid-color(72, 24, 0, 255, 8, 8)
+ bounds: 576 192 8 8
+ - image: solid-color(73, 24, 0, 255, 8, 8)
+ bounds: 584 192 8 8
+ - image: solid-color(74, 24, 0, 255, 8, 8)
+ bounds: 592 192 8 8
+ - image: solid-color(75, 24, 0, 255, 8, 8)
+ bounds: 600 192 8 8
+ - image: solid-color(76, 24, 0, 255, 8, 8)
+ bounds: 608 192 8 8
+ - image: solid-color(77, 24, 0, 255, 8, 8)
+ bounds: 616 192 8 8
+ - image: solid-color(78, 24, 0, 255, 8, 8)
+ bounds: 624 192 8 8
+ - image: solid-color(79, 24, 0, 255, 8, 8)
+ bounds: 632 192 8 8
+ - image: solid-color(80, 24, 0, 255, 8, 8)
+ bounds: 640 192 8 8
+ - image: solid-color(81, 24, 0, 255, 8, 8)
+ bounds: 648 192 8 8
+ - image: solid-color(82, 24, 0, 255, 8, 8)
+ bounds: 656 192 8 8
+ - image: solid-color(83, 24, 0, 255, 8, 8)
+ bounds: 664 192 8 8
+ - image: solid-color(84, 24, 0, 255, 8, 8)
+ bounds: 672 192 8 8
+ - image: solid-color(85, 24, 0, 255, 8, 8)
+ bounds: 680 192 8 8
+ - image: solid-color(86, 24, 0, 255, 8, 8)
+ bounds: 688 192 8 8
+ - image: solid-color(87, 24, 0, 255, 8, 8)
+ bounds: 696 192 8 8
+ - image: solid-color(88, 24, 0, 255, 8, 8)
+ bounds: 704 192 8 8
+ - image: solid-color(89, 24, 0, 255, 8, 8)
+ bounds: 712 192 8 8
+ - image: solid-color(90, 24, 0, 255, 8, 8)
+ bounds: 720 192 8 8
+ - image: solid-color(91, 24, 0, 255, 8, 8)
+ bounds: 728 192 8 8
+ - image: solid-color(92, 24, 0, 255, 8, 8)
+ bounds: 736 192 8 8
+ - image: solid-color(93, 24, 0, 255, 8, 8)
+ bounds: 744 192 8 8
+ - image: solid-color(94, 24, 0, 255, 8, 8)
+ bounds: 752 192 8 8
+ - image: solid-color(95, 24, 0, 255, 8, 8)
+ bounds: 760 192 8 8
+ - image: solid-color(96, 24, 0, 255, 8, 8)
+ bounds: 768 192 8 8
+ - image: solid-color(97, 24, 0, 255, 8, 8)
+ bounds: 776 192 8 8
+ - image: solid-color(98, 24, 0, 255, 8, 8)
+ bounds: 784 192 8 8
+ - image: solid-color(99, 24, 0, 255, 8, 8)
+ bounds: 792 192 8 8
+ - image: solid-color(100, 24, 0, 255, 8, 8)
+ bounds: 800 192 8 8
+ - image: solid-color(101, 24, 0, 255, 8, 8)
+ bounds: 808 192 8 8
+ - image: solid-color(102, 24, 0, 255, 8, 8)
+ bounds: 816 192 8 8
+ - image: solid-color(103, 24, 0, 255, 8, 8)
+ bounds: 824 192 8 8
+ - image: solid-color(104, 24, 0, 255, 8, 8)
+ bounds: 832 192 8 8
+ - image: solid-color(105, 24, 0, 255, 8, 8)
+ bounds: 840 192 8 8
+ - image: solid-color(106, 24, 0, 255, 8, 8)
+ bounds: 848 192 8 8
+ - image: solid-color(107, 24, 0, 255, 8, 8)
+ bounds: 856 192 8 8
+ - image: solid-color(108, 24, 0, 255, 8, 8)
+ bounds: 864 192 8 8
+ - image: solid-color(109, 24, 0, 255, 8, 8)
+ bounds: 872 192 8 8
+ - image: solid-color(110, 24, 0, 255, 8, 8)
+ bounds: 880 192 8 8
+ - image: solid-color(111, 24, 0, 255, 8, 8)
+ bounds: 888 192 8 8
+ - image: solid-color(112, 24, 0, 255, 8, 8)
+ bounds: 896 192 8 8
+ - image: solid-color(113, 24, 0, 255, 8, 8)
+ bounds: 904 192 8 8
+ - image: solid-color(114, 24, 0, 255, 8, 8)
+ bounds: 912 192 8 8
+ - image: solid-color(115, 24, 0, 255, 8, 8)
+ bounds: 920 192 8 8
+ - image: solid-color(116, 24, 0, 255, 8, 8)
+ bounds: 928 192 8 8
+ - image: solid-color(117, 24, 0, 255, 8, 8)
+ bounds: 936 192 8 8
+ - image: solid-color(118, 24, 0, 255, 8, 8)
+ bounds: 944 192 8 8
+ - image: solid-color(119, 24, 0, 255, 8, 8)
+ bounds: 952 192 8 8
+ - image: solid-color(120, 24, 0, 255, 8, 8)
+ bounds: 960 192 8 8
+ - image: solid-color(121, 24, 0, 255, 8, 8)
+ bounds: 968 192 8 8
+ - image: solid-color(122, 24, 0, 255, 8, 8)
+ bounds: 976 192 8 8
+ - image: solid-color(123, 24, 0, 255, 8, 8)
+ bounds: 984 192 8 8
+ - image: solid-color(124, 24, 0, 255, 8, 8)
+ bounds: 992 192 8 8
+ - image: solid-color(125, 24, 0, 255, 8, 8)
+ bounds: 1000 192 8 8
+ - image: solid-color(126, 24, 0, 255, 8, 8)
+ bounds: 1008 192 8 8
+ - image: solid-color(127, 24, 0, 255, 8, 8)
+ bounds: 1016 192 8 8
+ - image: solid-color(0, 25, 0, 255, 8, 8)
+ bounds: 0 200 8 8
+ - image: solid-color(1, 25, 0, 255, 8, 8)
+ bounds: 8 200 8 8
+ - image: solid-color(2, 25, 0, 255, 8, 8)
+ bounds: 16 200 8 8
+ - image: solid-color(3, 25, 0, 255, 8, 8)
+ bounds: 24 200 8 8
+ - image: solid-color(4, 25, 0, 255, 8, 8)
+ bounds: 32 200 8 8
+ - image: solid-color(5, 25, 0, 255, 8, 8)
+ bounds: 40 200 8 8
+ - image: solid-color(6, 25, 0, 255, 8, 8)
+ bounds: 48 200 8 8
+ - image: solid-color(7, 25, 0, 255, 8, 8)
+ bounds: 56 200 8 8
+ - image: solid-color(8, 25, 0, 255, 8, 8)
+ bounds: 64 200 8 8
+ - image: solid-color(9, 25, 0, 255, 8, 8)
+ bounds: 72 200 8 8
+ - image: solid-color(10, 25, 0, 255, 8, 8)
+ bounds: 80 200 8 8
+ - image: solid-color(11, 25, 0, 255, 8, 8)
+ bounds: 88 200 8 8
+ - image: solid-color(12, 25, 0, 255, 8, 8)
+ bounds: 96 200 8 8
+ - image: solid-color(13, 25, 0, 255, 8, 8)
+ bounds: 104 200 8 8
+ - image: solid-color(14, 25, 0, 255, 8, 8)
+ bounds: 112 200 8 8
+ - image: solid-color(15, 25, 0, 255, 8, 8)
+ bounds: 120 200 8 8
+ - image: solid-color(16, 25, 0, 255, 8, 8)
+ bounds: 128 200 8 8
+ - image: solid-color(17, 25, 0, 255, 8, 8)
+ bounds: 136 200 8 8
+ - image: solid-color(18, 25, 0, 255, 8, 8)
+ bounds: 144 200 8 8
+ - image: solid-color(19, 25, 0, 255, 8, 8)
+ bounds: 152 200 8 8
+ - image: solid-color(20, 25, 0, 255, 8, 8)
+ bounds: 160 200 8 8
+ - image: solid-color(21, 25, 0, 255, 8, 8)
+ bounds: 168 200 8 8
+ - image: solid-color(22, 25, 0, 255, 8, 8)
+ bounds: 176 200 8 8
+ - image: solid-color(23, 25, 0, 255, 8, 8)
+ bounds: 184 200 8 8
+ - image: solid-color(24, 25, 0, 255, 8, 8)
+ bounds: 192 200 8 8
+ - image: solid-color(25, 25, 0, 255, 8, 8)
+ bounds: 200 200 8 8
+ - image: solid-color(26, 25, 0, 255, 8, 8)
+ bounds: 208 200 8 8
+ - image: solid-color(27, 25, 0, 255, 8, 8)
+ bounds: 216 200 8 8
+ - image: solid-color(28, 25, 0, 255, 8, 8)
+ bounds: 224 200 8 8
+ - image: solid-color(29, 25, 0, 255, 8, 8)
+ bounds: 232 200 8 8
+ - image: solid-color(30, 25, 0, 255, 8, 8)
+ bounds: 240 200 8 8
+ - image: solid-color(31, 25, 0, 255, 8, 8)
+ bounds: 248 200 8 8
+ - image: solid-color(32, 25, 0, 255, 8, 8)
+ bounds: 256 200 8 8
+ - image: solid-color(33, 25, 0, 255, 8, 8)
+ bounds: 264 200 8 8
+ - image: solid-color(34, 25, 0, 255, 8, 8)
+ bounds: 272 200 8 8
+ - image: solid-color(35, 25, 0, 255, 8, 8)
+ bounds: 280 200 8 8
+ - image: solid-color(36, 25, 0, 255, 8, 8)
+ bounds: 288 200 8 8
+ - image: solid-color(37, 25, 0, 255, 8, 8)
+ bounds: 296 200 8 8
+ - image: solid-color(38, 25, 0, 255, 8, 8)
+ bounds: 304 200 8 8
+ - image: solid-color(39, 25, 0, 255, 8, 8)
+ bounds: 312 200 8 8
+ - image: solid-color(40, 25, 0, 255, 8, 8)
+ bounds: 320 200 8 8
+ - image: solid-color(41, 25, 0, 255, 8, 8)
+ bounds: 328 200 8 8
+ - image: solid-color(42, 25, 0, 255, 8, 8)
+ bounds: 336 200 8 8
+ - image: solid-color(43, 25, 0, 255, 8, 8)
+ bounds: 344 200 8 8
+ - image: solid-color(44, 25, 0, 255, 8, 8)
+ bounds: 352 200 8 8
+ - image: solid-color(45, 25, 0, 255, 8, 8)
+ bounds: 360 200 8 8
+ - image: solid-color(46, 25, 0, 255, 8, 8)
+ bounds: 368 200 8 8
+ - image: solid-color(47, 25, 0, 255, 8, 8)
+ bounds: 376 200 8 8
+ - image: solid-color(48, 25, 0, 255, 8, 8)
+ bounds: 384 200 8 8
+ - image: solid-color(49, 25, 0, 255, 8, 8)
+ bounds: 392 200 8 8
+ - image: solid-color(50, 25, 0, 255, 8, 8)
+ bounds: 400 200 8 8
+ - image: solid-color(51, 25, 0, 255, 8, 8)
+ bounds: 408 200 8 8
+ - image: solid-color(52, 25, 0, 255, 8, 8)
+ bounds: 416 200 8 8
+ - image: solid-color(53, 25, 0, 255, 8, 8)
+ bounds: 424 200 8 8
+ - image: solid-color(54, 25, 0, 255, 8, 8)
+ bounds: 432 200 8 8
+ - image: solid-color(55, 25, 0, 255, 8, 8)
+ bounds: 440 200 8 8
+ - image: solid-color(56, 25, 0, 255, 8, 8)
+ bounds: 448 200 8 8
+ - image: solid-color(57, 25, 0, 255, 8, 8)
+ bounds: 456 200 8 8
+ - image: solid-color(58, 25, 0, 255, 8, 8)
+ bounds: 464 200 8 8
+ - image: solid-color(59, 25, 0, 255, 8, 8)
+ bounds: 472 200 8 8
+ - image: solid-color(60, 25, 0, 255, 8, 8)
+ bounds: 480 200 8 8
+ - image: solid-color(61, 25, 0, 255, 8, 8)
+ bounds: 488 200 8 8
+ - image: solid-color(62, 25, 0, 255, 8, 8)
+ bounds: 496 200 8 8
+ - image: solid-color(63, 25, 0, 255, 8, 8)
+ bounds: 504 200 8 8
+ - image: solid-color(64, 25, 0, 255, 8, 8)
+ bounds: 512 200 8 8
+ - image: solid-color(65, 25, 0, 255, 8, 8)
+ bounds: 520 200 8 8
+ - image: solid-color(66, 25, 0, 255, 8, 8)
+ bounds: 528 200 8 8
+ - image: solid-color(67, 25, 0, 255, 8, 8)
+ bounds: 536 200 8 8
+ - image: solid-color(68, 25, 0, 255, 8, 8)
+ bounds: 544 200 8 8
+ - image: solid-color(69, 25, 0, 255, 8, 8)
+ bounds: 552 200 8 8
+ - image: solid-color(70, 25, 0, 255, 8, 8)
+ bounds: 560 200 8 8
+ - image: solid-color(71, 25, 0, 255, 8, 8)
+ bounds: 568 200 8 8
+ - image: solid-color(72, 25, 0, 255, 8, 8)
+ bounds: 576 200 8 8
+ - image: solid-color(73, 25, 0, 255, 8, 8)
+ bounds: 584 200 8 8
+ - image: solid-color(74, 25, 0, 255, 8, 8)
+ bounds: 592 200 8 8
+ - image: solid-color(75, 25, 0, 255, 8, 8)
+ bounds: 600 200 8 8
+ - image: solid-color(76, 25, 0, 255, 8, 8)
+ bounds: 608 200 8 8
+ - image: solid-color(77, 25, 0, 255, 8, 8)
+ bounds: 616 200 8 8
+ - image: solid-color(78, 25, 0, 255, 8, 8)
+ bounds: 624 200 8 8
+ - image: solid-color(79, 25, 0, 255, 8, 8)
+ bounds: 632 200 8 8
+ - image: solid-color(80, 25, 0, 255, 8, 8)
+ bounds: 640 200 8 8
+ - image: solid-color(81, 25, 0, 255, 8, 8)
+ bounds: 648 200 8 8
+ - image: solid-color(82, 25, 0, 255, 8, 8)
+ bounds: 656 200 8 8
+ - image: solid-color(83, 25, 0, 255, 8, 8)
+ bounds: 664 200 8 8
+ - image: solid-color(84, 25, 0, 255, 8, 8)
+ bounds: 672 200 8 8
+ - image: solid-color(85, 25, 0, 255, 8, 8)
+ bounds: 680 200 8 8
+ - image: solid-color(86, 25, 0, 255, 8, 8)
+ bounds: 688 200 8 8
+ - image: solid-color(87, 25, 0, 255, 8, 8)
+ bounds: 696 200 8 8
+ - image: solid-color(88, 25, 0, 255, 8, 8)
+ bounds: 704 200 8 8
+ - image: solid-color(89, 25, 0, 255, 8, 8)
+ bounds: 712 200 8 8
+ - image: solid-color(90, 25, 0, 255, 8, 8)
+ bounds: 720 200 8 8
+ - image: solid-color(91, 25, 0, 255, 8, 8)
+ bounds: 728 200 8 8
+ - image: solid-color(92, 25, 0, 255, 8, 8)
+ bounds: 736 200 8 8
+ - image: solid-color(93, 25, 0, 255, 8, 8)
+ bounds: 744 200 8 8
+ - image: solid-color(94, 25, 0, 255, 8, 8)
+ bounds: 752 200 8 8
+ - image: solid-color(95, 25, 0, 255, 8, 8)
+ bounds: 760 200 8 8
+ - image: solid-color(96, 25, 0, 255, 8, 8)
+ bounds: 768 200 8 8
+ - image: solid-color(97, 25, 0, 255, 8, 8)
+ bounds: 776 200 8 8
+ - image: solid-color(98, 25, 0, 255, 8, 8)
+ bounds: 784 200 8 8
+ - image: solid-color(99, 25, 0, 255, 8, 8)
+ bounds: 792 200 8 8
+ - image: solid-color(100, 25, 0, 255, 8, 8)
+ bounds: 800 200 8 8
+ - image: solid-color(101, 25, 0, 255, 8, 8)
+ bounds: 808 200 8 8
+ - image: solid-color(102, 25, 0, 255, 8, 8)
+ bounds: 816 200 8 8
+ - image: solid-color(103, 25, 0, 255, 8, 8)
+ bounds: 824 200 8 8
+ - image: solid-color(104, 25, 0, 255, 8, 8)
+ bounds: 832 200 8 8
+ - image: solid-color(105, 25, 0, 255, 8, 8)
+ bounds: 840 200 8 8
+ - image: solid-color(106, 25, 0, 255, 8, 8)
+ bounds: 848 200 8 8
+ - image: solid-color(107, 25, 0, 255, 8, 8)
+ bounds: 856 200 8 8
+ - image: solid-color(108, 25, 0, 255, 8, 8)
+ bounds: 864 200 8 8
+ - image: solid-color(109, 25, 0, 255, 8, 8)
+ bounds: 872 200 8 8
+ - image: solid-color(110, 25, 0, 255, 8, 8)
+ bounds: 880 200 8 8
+ - image: solid-color(111, 25, 0, 255, 8, 8)
+ bounds: 888 200 8 8
+ - image: solid-color(112, 25, 0, 255, 8, 8)
+ bounds: 896 200 8 8
+ - image: solid-color(113, 25, 0, 255, 8, 8)
+ bounds: 904 200 8 8
+ - image: solid-color(114, 25, 0, 255, 8, 8)
+ bounds: 912 200 8 8
+ - image: solid-color(115, 25, 0, 255, 8, 8)
+ bounds: 920 200 8 8
+ - image: solid-color(116, 25, 0, 255, 8, 8)
+ bounds: 928 200 8 8
+ - image: solid-color(117, 25, 0, 255, 8, 8)
+ bounds: 936 200 8 8
+ - image: solid-color(118, 25, 0, 255, 8, 8)
+ bounds: 944 200 8 8
+ - image: solid-color(119, 25, 0, 255, 8, 8)
+ bounds: 952 200 8 8
+ - image: solid-color(120, 25, 0, 255, 8, 8)
+ bounds: 960 200 8 8
+ - image: solid-color(121, 25, 0, 255, 8, 8)
+ bounds: 968 200 8 8
+ - image: solid-color(122, 25, 0, 255, 8, 8)
+ bounds: 976 200 8 8
+ - image: solid-color(123, 25, 0, 255, 8, 8)
+ bounds: 984 200 8 8
+ - image: solid-color(124, 25, 0, 255, 8, 8)
+ bounds: 992 200 8 8
+ - image: solid-color(125, 25, 0, 255, 8, 8)
+ bounds: 1000 200 8 8
+ - image: solid-color(126, 25, 0, 255, 8, 8)
+ bounds: 1008 200 8 8
+ - image: solid-color(127, 25, 0, 255, 8, 8)
+ bounds: 1016 200 8 8
+ - image: solid-color(0, 26, 0, 255, 8, 8)
+ bounds: 0 208 8 8
+ - image: solid-color(1, 26, 0, 255, 8, 8)
+ bounds: 8 208 8 8
+ - image: solid-color(2, 26, 0, 255, 8, 8)
+ bounds: 16 208 8 8
+ - image: solid-color(3, 26, 0, 255, 8, 8)
+ bounds: 24 208 8 8
+ - image: solid-color(4, 26, 0, 255, 8, 8)
+ bounds: 32 208 8 8
+ - image: solid-color(5, 26, 0, 255, 8, 8)
+ bounds: 40 208 8 8
+ - image: solid-color(6, 26, 0, 255, 8, 8)
+ bounds: 48 208 8 8
+ - image: solid-color(7, 26, 0, 255, 8, 8)
+ bounds: 56 208 8 8
+ - image: solid-color(8, 26, 0, 255, 8, 8)
+ bounds: 64 208 8 8
+ - image: solid-color(9, 26, 0, 255, 8, 8)
+ bounds: 72 208 8 8
+ - image: solid-color(10, 26, 0, 255, 8, 8)
+ bounds: 80 208 8 8
+ - image: solid-color(11, 26, 0, 255, 8, 8)
+ bounds: 88 208 8 8
+ - image: solid-color(12, 26, 0, 255, 8, 8)
+ bounds: 96 208 8 8
+ - image: solid-color(13, 26, 0, 255, 8, 8)
+ bounds: 104 208 8 8
+ - image: solid-color(14, 26, 0, 255, 8, 8)
+ bounds: 112 208 8 8
+ - image: solid-color(15, 26, 0, 255, 8, 8)
+ bounds: 120 208 8 8
+ - image: solid-color(16, 26, 0, 255, 8, 8)
+ bounds: 128 208 8 8
+ - image: solid-color(17, 26, 0, 255, 8, 8)
+ bounds: 136 208 8 8
+ - image: solid-color(18, 26, 0, 255, 8, 8)
+ bounds: 144 208 8 8
+ - image: solid-color(19, 26, 0, 255, 8, 8)
+ bounds: 152 208 8 8
+ - image: solid-color(20, 26, 0, 255, 8, 8)
+ bounds: 160 208 8 8
+ - image: solid-color(21, 26, 0, 255, 8, 8)
+ bounds: 168 208 8 8
+ - image: solid-color(22, 26, 0, 255, 8, 8)
+ bounds: 176 208 8 8
+ - image: solid-color(23, 26, 0, 255, 8, 8)
+ bounds: 184 208 8 8
+ - image: solid-color(24, 26, 0, 255, 8, 8)
+ bounds: 192 208 8 8
+ - image: solid-color(25, 26, 0, 255, 8, 8)
+ bounds: 200 208 8 8
+ - image: solid-color(26, 26, 0, 255, 8, 8)
+ bounds: 208 208 8 8
+ - image: solid-color(27, 26, 0, 255, 8, 8)
+ bounds: 216 208 8 8
+ - image: solid-color(28, 26, 0, 255, 8, 8)
+ bounds: 224 208 8 8
+ - image: solid-color(29, 26, 0, 255, 8, 8)
+ bounds: 232 208 8 8
+ - image: solid-color(30, 26, 0, 255, 8, 8)
+ bounds: 240 208 8 8
+ - image: solid-color(31, 26, 0, 255, 8, 8)
+ bounds: 248 208 8 8
+ - image: solid-color(32, 26, 0, 255, 8, 8)
+ bounds: 256 208 8 8
+ - image: solid-color(33, 26, 0, 255, 8, 8)
+ bounds: 264 208 8 8
+ - image: solid-color(34, 26, 0, 255, 8, 8)
+ bounds: 272 208 8 8
+ - image: solid-color(35, 26, 0, 255, 8, 8)
+ bounds: 280 208 8 8
+ - image: solid-color(36, 26, 0, 255, 8, 8)
+ bounds: 288 208 8 8
+ - image: solid-color(37, 26, 0, 255, 8, 8)
+ bounds: 296 208 8 8
+ - image: solid-color(38, 26, 0, 255, 8, 8)
+ bounds: 304 208 8 8
+ - image: solid-color(39, 26, 0, 255, 8, 8)
+ bounds: 312 208 8 8
+ - image: solid-color(40, 26, 0, 255, 8, 8)
+ bounds: 320 208 8 8
+ - image: solid-color(41, 26, 0, 255, 8, 8)
+ bounds: 328 208 8 8
+ - image: solid-color(42, 26, 0, 255, 8, 8)
+ bounds: 336 208 8 8
+ - image: solid-color(43, 26, 0, 255, 8, 8)
+ bounds: 344 208 8 8
+ - image: solid-color(44, 26, 0, 255, 8, 8)
+ bounds: 352 208 8 8
+ - image: solid-color(45, 26, 0, 255, 8, 8)
+ bounds: 360 208 8 8
+ - image: solid-color(46, 26, 0, 255, 8, 8)
+ bounds: 368 208 8 8
+ - image: solid-color(47, 26, 0, 255, 8, 8)
+ bounds: 376 208 8 8
+ - image: solid-color(48, 26, 0, 255, 8, 8)
+ bounds: 384 208 8 8
+ - image: solid-color(49, 26, 0, 255, 8, 8)
+ bounds: 392 208 8 8
+ - image: solid-color(50, 26, 0, 255, 8, 8)
+ bounds: 400 208 8 8
+ - image: solid-color(51, 26, 0, 255, 8, 8)
+ bounds: 408 208 8 8
+ - image: solid-color(52, 26, 0, 255, 8, 8)
+ bounds: 416 208 8 8
+ - image: solid-color(53, 26, 0, 255, 8, 8)
+ bounds: 424 208 8 8
+ - image: solid-color(54, 26, 0, 255, 8, 8)
+ bounds: 432 208 8 8
+ - image: solid-color(55, 26, 0, 255, 8, 8)
+ bounds: 440 208 8 8
+ - image: solid-color(56, 26, 0, 255, 8, 8)
+ bounds: 448 208 8 8
+ - image: solid-color(57, 26, 0, 255, 8, 8)
+ bounds: 456 208 8 8
+ - image: solid-color(58, 26, 0, 255, 8, 8)
+ bounds: 464 208 8 8
+ - image: solid-color(59, 26, 0, 255, 8, 8)
+ bounds: 472 208 8 8
+ - image: solid-color(60, 26, 0, 255, 8, 8)
+ bounds: 480 208 8 8
+ - image: solid-color(61, 26, 0, 255, 8, 8)
+ bounds: 488 208 8 8
+ - image: solid-color(62, 26, 0, 255, 8, 8)
+ bounds: 496 208 8 8
+ - image: solid-color(63, 26, 0, 255, 8, 8)
+ bounds: 504 208 8 8
+ - image: solid-color(64, 26, 0, 255, 8, 8)
+ bounds: 512 208 8 8
+ - image: solid-color(65, 26, 0, 255, 8, 8)
+ bounds: 520 208 8 8
+ - image: solid-color(66, 26, 0, 255, 8, 8)
+ bounds: 528 208 8 8
+ - image: solid-color(67, 26, 0, 255, 8, 8)
+ bounds: 536 208 8 8
+ - image: solid-color(68, 26, 0, 255, 8, 8)
+ bounds: 544 208 8 8
+ - image: solid-color(69, 26, 0, 255, 8, 8)
+ bounds: 552 208 8 8
+ - image: solid-color(70, 26, 0, 255, 8, 8)
+ bounds: 560 208 8 8
+ - image: solid-color(71, 26, 0, 255, 8, 8)
+ bounds: 568 208 8 8
+ - image: solid-color(72, 26, 0, 255, 8, 8)
+ bounds: 576 208 8 8
+ - image: solid-color(73, 26, 0, 255, 8, 8)
+ bounds: 584 208 8 8
+ - image: solid-color(74, 26, 0, 255, 8, 8)
+ bounds: 592 208 8 8
+ - image: solid-color(75, 26, 0, 255, 8, 8)
+ bounds: 600 208 8 8
+ - image: solid-color(76, 26, 0, 255, 8, 8)
+ bounds: 608 208 8 8
+ - image: solid-color(77, 26, 0, 255, 8, 8)
+ bounds: 616 208 8 8
+ - image: solid-color(78, 26, 0, 255, 8, 8)
+ bounds: 624 208 8 8
+ - image: solid-color(79, 26, 0, 255, 8, 8)
+ bounds: 632 208 8 8
+ - image: solid-color(80, 26, 0, 255, 8, 8)
+ bounds: 640 208 8 8
+ - image: solid-color(81, 26, 0, 255, 8, 8)
+ bounds: 648 208 8 8
+ - image: solid-color(82, 26, 0, 255, 8, 8)
+ bounds: 656 208 8 8
+ - image: solid-color(83, 26, 0, 255, 8, 8)
+ bounds: 664 208 8 8
+ - image: solid-color(84, 26, 0, 255, 8, 8)
+ bounds: 672 208 8 8
+ - image: solid-color(85, 26, 0, 255, 8, 8)
+ bounds: 680 208 8 8
+ - image: solid-color(86, 26, 0, 255, 8, 8)
+ bounds: 688 208 8 8
+ - image: solid-color(87, 26, 0, 255, 8, 8)
+ bounds: 696 208 8 8
+ - image: solid-color(88, 26, 0, 255, 8, 8)
+ bounds: 704 208 8 8
+ - image: solid-color(89, 26, 0, 255, 8, 8)
+ bounds: 712 208 8 8
+ - image: solid-color(90, 26, 0, 255, 8, 8)
+ bounds: 720 208 8 8
+ - image: solid-color(91, 26, 0, 255, 8, 8)
+ bounds: 728 208 8 8
+ - image: solid-color(92, 26, 0, 255, 8, 8)
+ bounds: 736 208 8 8
+ - image: solid-color(93, 26, 0, 255, 8, 8)
+ bounds: 744 208 8 8
+ - image: solid-color(94, 26, 0, 255, 8, 8)
+ bounds: 752 208 8 8
+ - image: solid-color(95, 26, 0, 255, 8, 8)
+ bounds: 760 208 8 8
+ - image: solid-color(96, 26, 0, 255, 8, 8)
+ bounds: 768 208 8 8
+ - image: solid-color(97, 26, 0, 255, 8, 8)
+ bounds: 776 208 8 8
+ - image: solid-color(98, 26, 0, 255, 8, 8)
+ bounds: 784 208 8 8
+ - image: solid-color(99, 26, 0, 255, 8, 8)
+ bounds: 792 208 8 8
+ - image: solid-color(100, 26, 0, 255, 8, 8)
+ bounds: 800 208 8 8
+ - image: solid-color(101, 26, 0, 255, 8, 8)
+ bounds: 808 208 8 8
+ - image: solid-color(102, 26, 0, 255, 8, 8)
+ bounds: 816 208 8 8
+ - image: solid-color(103, 26, 0, 255, 8, 8)
+ bounds: 824 208 8 8
+ - image: solid-color(104, 26, 0, 255, 8, 8)
+ bounds: 832 208 8 8
+ - image: solid-color(105, 26, 0, 255, 8, 8)
+ bounds: 840 208 8 8
+ - image: solid-color(106, 26, 0, 255, 8, 8)
+ bounds: 848 208 8 8
+ - image: solid-color(107, 26, 0, 255, 8, 8)
+ bounds: 856 208 8 8
+ - image: solid-color(108, 26, 0, 255, 8, 8)
+ bounds: 864 208 8 8
+ - image: solid-color(109, 26, 0, 255, 8, 8)
+ bounds: 872 208 8 8
+ - image: solid-color(110, 26, 0, 255, 8, 8)
+ bounds: 880 208 8 8
+ - image: solid-color(111, 26, 0, 255, 8, 8)
+ bounds: 888 208 8 8
+ - image: solid-color(112, 26, 0, 255, 8, 8)
+ bounds: 896 208 8 8
+ - image: solid-color(113, 26, 0, 255, 8, 8)
+ bounds: 904 208 8 8
+ - image: solid-color(114, 26, 0, 255, 8, 8)
+ bounds: 912 208 8 8
+ - image: solid-color(115, 26, 0, 255, 8, 8)
+ bounds: 920 208 8 8
+ - image: solid-color(116, 26, 0, 255, 8, 8)
+ bounds: 928 208 8 8
+ - image: solid-color(117, 26, 0, 255, 8, 8)
+ bounds: 936 208 8 8
+ - image: solid-color(118, 26, 0, 255, 8, 8)
+ bounds: 944 208 8 8
+ - image: solid-color(119, 26, 0, 255, 8, 8)
+ bounds: 952 208 8 8
+ - image: solid-color(120, 26, 0, 255, 8, 8)
+ bounds: 960 208 8 8
+ - image: solid-color(121, 26, 0, 255, 8, 8)
+ bounds: 968 208 8 8
+ - image: solid-color(122, 26, 0, 255, 8, 8)
+ bounds: 976 208 8 8
+ - image: solid-color(123, 26, 0, 255, 8, 8)
+ bounds: 984 208 8 8
+ - image: solid-color(124, 26, 0, 255, 8, 8)
+ bounds: 992 208 8 8
+ - image: solid-color(125, 26, 0, 255, 8, 8)
+ bounds: 1000 208 8 8
+ - image: solid-color(126, 26, 0, 255, 8, 8)
+ bounds: 1008 208 8 8
+ - image: solid-color(127, 26, 0, 255, 8, 8)
+ bounds: 1016 208 8 8
+ - image: solid-color(0, 27, 0, 255, 8, 8)
+ bounds: 0 216 8 8
+ - image: solid-color(1, 27, 0, 255, 8, 8)
+ bounds: 8 216 8 8
+ - image: solid-color(2, 27, 0, 255, 8, 8)
+ bounds: 16 216 8 8
+ - image: solid-color(3, 27, 0, 255, 8, 8)
+ bounds: 24 216 8 8
+ - image: solid-color(4, 27, 0, 255, 8, 8)
+ bounds: 32 216 8 8
+ - image: solid-color(5, 27, 0, 255, 8, 8)
+ bounds: 40 216 8 8
+ - image: solid-color(6, 27, 0, 255, 8, 8)
+ bounds: 48 216 8 8
+ - image: solid-color(7, 27, 0, 255, 8, 8)
+ bounds: 56 216 8 8
+ - image: solid-color(8, 27, 0, 255, 8, 8)
+ bounds: 64 216 8 8
+ - image: solid-color(9, 27, 0, 255, 8, 8)
+ bounds: 72 216 8 8
+ - image: solid-color(10, 27, 0, 255, 8, 8)
+ bounds: 80 216 8 8
+ - image: solid-color(11, 27, 0, 255, 8, 8)
+ bounds: 88 216 8 8
+ - image: solid-color(12, 27, 0, 255, 8, 8)
+ bounds: 96 216 8 8
+ - image: solid-color(13, 27, 0, 255, 8, 8)
+ bounds: 104 216 8 8
+ - image: solid-color(14, 27, 0, 255, 8, 8)
+ bounds: 112 216 8 8
+ - image: solid-color(15, 27, 0, 255, 8, 8)
+ bounds: 120 216 8 8
+ - image: solid-color(16, 27, 0, 255, 8, 8)
+ bounds: 128 216 8 8
+ - image: solid-color(17, 27, 0, 255, 8, 8)
+ bounds: 136 216 8 8
+ - image: solid-color(18, 27, 0, 255, 8, 8)
+ bounds: 144 216 8 8
+ - image: solid-color(19, 27, 0, 255, 8, 8)
+ bounds: 152 216 8 8
+ - image: solid-color(20, 27, 0, 255, 8, 8)
+ bounds: 160 216 8 8
+ - image: solid-color(21, 27, 0, 255, 8, 8)
+ bounds: 168 216 8 8
+ - image: solid-color(22, 27, 0, 255, 8, 8)
+ bounds: 176 216 8 8
+ - image: solid-color(23, 27, 0, 255, 8, 8)
+ bounds: 184 216 8 8
+ - image: solid-color(24, 27, 0, 255, 8, 8)
+ bounds: 192 216 8 8
+ - image: solid-color(25, 27, 0, 255, 8, 8)
+ bounds: 200 216 8 8
+ - image: solid-color(26, 27, 0, 255, 8, 8)
+ bounds: 208 216 8 8
+ - image: solid-color(27, 27, 0, 255, 8, 8)
+ bounds: 216 216 8 8
+ - image: solid-color(28, 27, 0, 255, 8, 8)
+ bounds: 224 216 8 8
+ - image: solid-color(29, 27, 0, 255, 8, 8)
+ bounds: 232 216 8 8
+ - image: solid-color(30, 27, 0, 255, 8, 8)
+ bounds: 240 216 8 8
+ - image: solid-color(31, 27, 0, 255, 8, 8)
+ bounds: 248 216 8 8
+ - image: solid-color(32, 27, 0, 255, 8, 8)
+ bounds: 256 216 8 8
+ - image: solid-color(33, 27, 0, 255, 8, 8)
+ bounds: 264 216 8 8
+ - image: solid-color(34, 27, 0, 255, 8, 8)
+ bounds: 272 216 8 8
+ - image: solid-color(35, 27, 0, 255, 8, 8)
+ bounds: 280 216 8 8
+ - image: solid-color(36, 27, 0, 255, 8, 8)
+ bounds: 288 216 8 8
+ - image: solid-color(37, 27, 0, 255, 8, 8)
+ bounds: 296 216 8 8
+ - image: solid-color(38, 27, 0, 255, 8, 8)
+ bounds: 304 216 8 8
+ - image: solid-color(39, 27, 0, 255, 8, 8)
+ bounds: 312 216 8 8
+ - image: solid-color(40, 27, 0, 255, 8, 8)
+ bounds: 320 216 8 8
+ - image: solid-color(41, 27, 0, 255, 8, 8)
+ bounds: 328 216 8 8
+ - image: solid-color(42, 27, 0, 255, 8, 8)
+ bounds: 336 216 8 8
+ - image: solid-color(43, 27, 0, 255, 8, 8)
+ bounds: 344 216 8 8
+ - image: solid-color(44, 27, 0, 255, 8, 8)
+ bounds: 352 216 8 8
+ - image: solid-color(45, 27, 0, 255, 8, 8)
+ bounds: 360 216 8 8
+ - image: solid-color(46, 27, 0, 255, 8, 8)
+ bounds: 368 216 8 8
+ - image: solid-color(47, 27, 0, 255, 8, 8)
+ bounds: 376 216 8 8
+ - image: solid-color(48, 27, 0, 255, 8, 8)
+ bounds: 384 216 8 8
+ - image: solid-color(49, 27, 0, 255, 8, 8)
+ bounds: 392 216 8 8
+ - image: solid-color(50, 27, 0, 255, 8, 8)
+ bounds: 400 216 8 8
+ - image: solid-color(51, 27, 0, 255, 8, 8)
+ bounds: 408 216 8 8
+ - image: solid-color(52, 27, 0, 255, 8, 8)
+ bounds: 416 216 8 8
+ - image: solid-color(53, 27, 0, 255, 8, 8)
+ bounds: 424 216 8 8
+ - image: solid-color(54, 27, 0, 255, 8, 8)
+ bounds: 432 216 8 8
+ - image: solid-color(55, 27, 0, 255, 8, 8)
+ bounds: 440 216 8 8
+ - image: solid-color(56, 27, 0, 255, 8, 8)
+ bounds: 448 216 8 8
+ - image: solid-color(57, 27, 0, 255, 8, 8)
+ bounds: 456 216 8 8
+ - image: solid-color(58, 27, 0, 255, 8, 8)
+ bounds: 464 216 8 8
+ - image: solid-color(59, 27, 0, 255, 8, 8)
+ bounds: 472 216 8 8
+ - image: solid-color(60, 27, 0, 255, 8, 8)
+ bounds: 480 216 8 8
+ - image: solid-color(61, 27, 0, 255, 8, 8)
+ bounds: 488 216 8 8
+ - image: solid-color(62, 27, 0, 255, 8, 8)
+ bounds: 496 216 8 8
+ - image: solid-color(63, 27, 0, 255, 8, 8)
+ bounds: 504 216 8 8
+ - image: solid-color(64, 27, 0, 255, 8, 8)
+ bounds: 512 216 8 8
+ - image: solid-color(65, 27, 0, 255, 8, 8)
+ bounds: 520 216 8 8
+ - image: solid-color(66, 27, 0, 255, 8, 8)
+ bounds: 528 216 8 8
+ - image: solid-color(67, 27, 0, 255, 8, 8)
+ bounds: 536 216 8 8
+ - image: solid-color(68, 27, 0, 255, 8, 8)
+ bounds: 544 216 8 8
+ - image: solid-color(69, 27, 0, 255, 8, 8)
+ bounds: 552 216 8 8
+ - image: solid-color(70, 27, 0, 255, 8, 8)
+ bounds: 560 216 8 8
+ - image: solid-color(71, 27, 0, 255, 8, 8)
+ bounds: 568 216 8 8
+ - image: solid-color(72, 27, 0, 255, 8, 8)
+ bounds: 576 216 8 8
+ - image: solid-color(73, 27, 0, 255, 8, 8)
+ bounds: 584 216 8 8
+ - image: solid-color(74, 27, 0, 255, 8, 8)
+ bounds: 592 216 8 8
+ - image: solid-color(75, 27, 0, 255, 8, 8)
+ bounds: 600 216 8 8
+ - image: solid-color(76, 27, 0, 255, 8, 8)
+ bounds: 608 216 8 8
+ - image: solid-color(77, 27, 0, 255, 8, 8)
+ bounds: 616 216 8 8
+ - image: solid-color(78, 27, 0, 255, 8, 8)
+ bounds: 624 216 8 8
+ - image: solid-color(79, 27, 0, 255, 8, 8)
+ bounds: 632 216 8 8
+ - image: solid-color(80, 27, 0, 255, 8, 8)
+ bounds: 640 216 8 8
+ - image: solid-color(81, 27, 0, 255, 8, 8)
+ bounds: 648 216 8 8
+ - image: solid-color(82, 27, 0, 255, 8, 8)
+ bounds: 656 216 8 8
+ - image: solid-color(83, 27, 0, 255, 8, 8)
+ bounds: 664 216 8 8
+ - image: solid-color(84, 27, 0, 255, 8, 8)
+ bounds: 672 216 8 8
+ - image: solid-color(85, 27, 0, 255, 8, 8)
+ bounds: 680 216 8 8
+ - image: solid-color(86, 27, 0, 255, 8, 8)
+ bounds: 688 216 8 8
+ - image: solid-color(87, 27, 0, 255, 8, 8)
+ bounds: 696 216 8 8
+ - image: solid-color(88, 27, 0, 255, 8, 8)
+ bounds: 704 216 8 8
+ - image: solid-color(89, 27, 0, 255, 8, 8)
+ bounds: 712 216 8 8
+ - image: solid-color(90, 27, 0, 255, 8, 8)
+ bounds: 720 216 8 8
+ - image: solid-color(91, 27, 0, 255, 8, 8)
+ bounds: 728 216 8 8
+ - image: solid-color(92, 27, 0, 255, 8, 8)
+ bounds: 736 216 8 8
+ - image: solid-color(93, 27, 0, 255, 8, 8)
+ bounds: 744 216 8 8
+ - image: solid-color(94, 27, 0, 255, 8, 8)
+ bounds: 752 216 8 8
+ - image: solid-color(95, 27, 0, 255, 8, 8)
+ bounds: 760 216 8 8
+ - image: solid-color(96, 27, 0, 255, 8, 8)
+ bounds: 768 216 8 8
+ - image: solid-color(97, 27, 0, 255, 8, 8)
+ bounds: 776 216 8 8
+ - image: solid-color(98, 27, 0, 255, 8, 8)
+ bounds: 784 216 8 8
+ - image: solid-color(99, 27, 0, 255, 8, 8)
+ bounds: 792 216 8 8
+ - image: solid-color(100, 27, 0, 255, 8, 8)
+ bounds: 800 216 8 8
+ - image: solid-color(101, 27, 0, 255, 8, 8)
+ bounds: 808 216 8 8
+ - image: solid-color(102, 27, 0, 255, 8, 8)
+ bounds: 816 216 8 8
+ - image: solid-color(103, 27, 0, 255, 8, 8)
+ bounds: 824 216 8 8
+ - image: solid-color(104, 27, 0, 255, 8, 8)
+ bounds: 832 216 8 8
+ - image: solid-color(105, 27, 0, 255, 8, 8)
+ bounds: 840 216 8 8
+ - image: solid-color(106, 27, 0, 255, 8, 8)
+ bounds: 848 216 8 8
+ - image: solid-color(107, 27, 0, 255, 8, 8)
+ bounds: 856 216 8 8
+ - image: solid-color(108, 27, 0, 255, 8, 8)
+ bounds: 864 216 8 8
+ - image: solid-color(109, 27, 0, 255, 8, 8)
+ bounds: 872 216 8 8
+ - image: solid-color(110, 27, 0, 255, 8, 8)
+ bounds: 880 216 8 8
+ - image: solid-color(111, 27, 0, 255, 8, 8)
+ bounds: 888 216 8 8
+ - image: solid-color(112, 27, 0, 255, 8, 8)
+ bounds: 896 216 8 8
+ - image: solid-color(113, 27, 0, 255, 8, 8)
+ bounds: 904 216 8 8
+ - image: solid-color(114, 27, 0, 255, 8, 8)
+ bounds: 912 216 8 8
+ - image: solid-color(115, 27, 0, 255, 8, 8)
+ bounds: 920 216 8 8
+ - image: solid-color(116, 27, 0, 255, 8, 8)
+ bounds: 928 216 8 8
+ - image: solid-color(117, 27, 0, 255, 8, 8)
+ bounds: 936 216 8 8
+ - image: solid-color(118, 27, 0, 255, 8, 8)
+ bounds: 944 216 8 8
+ - image: solid-color(119, 27, 0, 255, 8, 8)
+ bounds: 952 216 8 8
+ - image: solid-color(120, 27, 0, 255, 8, 8)
+ bounds: 960 216 8 8
+ - image: solid-color(121, 27, 0, 255, 8, 8)
+ bounds: 968 216 8 8
+ - image: solid-color(122, 27, 0, 255, 8, 8)
+ bounds: 976 216 8 8
+ - image: solid-color(123, 27, 0, 255, 8, 8)
+ bounds: 984 216 8 8
+ - image: solid-color(124, 27, 0, 255, 8, 8)
+ bounds: 992 216 8 8
+ - image: solid-color(125, 27, 0, 255, 8, 8)
+ bounds: 1000 216 8 8
+ - image: solid-color(126, 27, 0, 255, 8, 8)
+ bounds: 1008 216 8 8
+ - image: solid-color(127, 27, 0, 255, 8, 8)
+ bounds: 1016 216 8 8
+ - image: solid-color(0, 28, 0, 255, 8, 8)
+ bounds: 0 224 8 8
+ - image: solid-color(1, 28, 0, 255, 8, 8)
+ bounds: 8 224 8 8
+ - image: solid-color(2, 28, 0, 255, 8, 8)
+ bounds: 16 224 8 8
+ - image: solid-color(3, 28, 0, 255, 8, 8)
+ bounds: 24 224 8 8
+ - image: solid-color(4, 28, 0, 255, 8, 8)
+ bounds: 32 224 8 8
+ - image: solid-color(5, 28, 0, 255, 8, 8)
+ bounds: 40 224 8 8
+ - image: solid-color(6, 28, 0, 255, 8, 8)
+ bounds: 48 224 8 8
+ - image: solid-color(7, 28, 0, 255, 8, 8)
+ bounds: 56 224 8 8
+ - image: solid-color(8, 28, 0, 255, 8, 8)
+ bounds: 64 224 8 8
+ - image: solid-color(9, 28, 0, 255, 8, 8)
+ bounds: 72 224 8 8
+ - image: solid-color(10, 28, 0, 255, 8, 8)
+ bounds: 80 224 8 8
+ - image: solid-color(11, 28, 0, 255, 8, 8)
+ bounds: 88 224 8 8
+ - image: solid-color(12, 28, 0, 255, 8, 8)
+ bounds: 96 224 8 8
+ - image: solid-color(13, 28, 0, 255, 8, 8)
+ bounds: 104 224 8 8
+ - image: solid-color(14, 28, 0, 255, 8, 8)
+ bounds: 112 224 8 8
+ - image: solid-color(15, 28, 0, 255, 8, 8)
+ bounds: 120 224 8 8
+ - image: solid-color(16, 28, 0, 255, 8, 8)
+ bounds: 128 224 8 8
+ - image: solid-color(17, 28, 0, 255, 8, 8)
+ bounds: 136 224 8 8
+ - image: solid-color(18, 28, 0, 255, 8, 8)
+ bounds: 144 224 8 8
+ - image: solid-color(19, 28, 0, 255, 8, 8)
+ bounds: 152 224 8 8
+ - image: solid-color(20, 28, 0, 255, 8, 8)
+ bounds: 160 224 8 8
+ - image: solid-color(21, 28, 0, 255, 8, 8)
+ bounds: 168 224 8 8
+ - image: solid-color(22, 28, 0, 255, 8, 8)
+ bounds: 176 224 8 8
+ - image: solid-color(23, 28, 0, 255, 8, 8)
+ bounds: 184 224 8 8
+ - image: solid-color(24, 28, 0, 255, 8, 8)
+ bounds: 192 224 8 8
+ - image: solid-color(25, 28, 0, 255, 8, 8)
+ bounds: 200 224 8 8
+ - image: solid-color(26, 28, 0, 255, 8, 8)
+ bounds: 208 224 8 8
+ - image: solid-color(27, 28, 0, 255, 8, 8)
+ bounds: 216 224 8 8
+ - image: solid-color(28, 28, 0, 255, 8, 8)
+ bounds: 224 224 8 8
+ - image: solid-color(29, 28, 0, 255, 8, 8)
+ bounds: 232 224 8 8
+ - image: solid-color(30, 28, 0, 255, 8, 8)
+ bounds: 240 224 8 8
+ - image: solid-color(31, 28, 0, 255, 8, 8)
+ bounds: 248 224 8 8
+ - image: solid-color(32, 28, 0, 255, 8, 8)
+ bounds: 256 224 8 8
+ - image: solid-color(33, 28, 0, 255, 8, 8)
+ bounds: 264 224 8 8
+ - image: solid-color(34, 28, 0, 255, 8, 8)
+ bounds: 272 224 8 8
+ - image: solid-color(35, 28, 0, 255, 8, 8)
+ bounds: 280 224 8 8
+ - image: solid-color(36, 28, 0, 255, 8, 8)
+ bounds: 288 224 8 8
+ - image: solid-color(37, 28, 0, 255, 8, 8)
+ bounds: 296 224 8 8
+ - image: solid-color(38, 28, 0, 255, 8, 8)
+ bounds: 304 224 8 8
+ - image: solid-color(39, 28, 0, 255, 8, 8)
+ bounds: 312 224 8 8
+ - image: solid-color(40, 28, 0, 255, 8, 8)
+ bounds: 320 224 8 8
+ - image: solid-color(41, 28, 0, 255, 8, 8)
+ bounds: 328 224 8 8
+ - image: solid-color(42, 28, 0, 255, 8, 8)
+ bounds: 336 224 8 8
+ - image: solid-color(43, 28, 0, 255, 8, 8)
+ bounds: 344 224 8 8
+ - image: solid-color(44, 28, 0, 255, 8, 8)
+ bounds: 352 224 8 8
+ - image: solid-color(45, 28, 0, 255, 8, 8)
+ bounds: 360 224 8 8
+ - image: solid-color(46, 28, 0, 255, 8, 8)
+ bounds: 368 224 8 8
+ - image: solid-color(47, 28, 0, 255, 8, 8)
+ bounds: 376 224 8 8
+ - image: solid-color(48, 28, 0, 255, 8, 8)
+ bounds: 384 224 8 8
+ - image: solid-color(49, 28, 0, 255, 8, 8)
+ bounds: 392 224 8 8
+ - image: solid-color(50, 28, 0, 255, 8, 8)
+ bounds: 400 224 8 8
+ - image: solid-color(51, 28, 0, 255, 8, 8)
+ bounds: 408 224 8 8
+ - image: solid-color(52, 28, 0, 255, 8, 8)
+ bounds: 416 224 8 8
+ - image: solid-color(53, 28, 0, 255, 8, 8)
+ bounds: 424 224 8 8
+ - image: solid-color(54, 28, 0, 255, 8, 8)
+ bounds: 432 224 8 8
+ - image: solid-color(55, 28, 0, 255, 8, 8)
+ bounds: 440 224 8 8
+ - image: solid-color(56, 28, 0, 255, 8, 8)
+ bounds: 448 224 8 8
+ - image: solid-color(57, 28, 0, 255, 8, 8)
+ bounds: 456 224 8 8
+ - image: solid-color(58, 28, 0, 255, 8, 8)
+ bounds: 464 224 8 8
+ - image: solid-color(59, 28, 0, 255, 8, 8)
+ bounds: 472 224 8 8
+ - image: solid-color(60, 28, 0, 255, 8, 8)
+ bounds: 480 224 8 8
+ - image: solid-color(61, 28, 0, 255, 8, 8)
+ bounds: 488 224 8 8
+ - image: solid-color(62, 28, 0, 255, 8, 8)
+ bounds: 496 224 8 8
+ - image: solid-color(63, 28, 0, 255, 8, 8)
+ bounds: 504 224 8 8
+ - image: solid-color(64, 28, 0, 255, 8, 8)
+ bounds: 512 224 8 8
+ - image: solid-color(65, 28, 0, 255, 8, 8)
+ bounds: 520 224 8 8
+ - image: solid-color(66, 28, 0, 255, 8, 8)
+ bounds: 528 224 8 8
+ - image: solid-color(67, 28, 0, 255, 8, 8)
+ bounds: 536 224 8 8
+ - image: solid-color(68, 28, 0, 255, 8, 8)
+ bounds: 544 224 8 8
+ - image: solid-color(69, 28, 0, 255, 8, 8)
+ bounds: 552 224 8 8
+ - image: solid-color(70, 28, 0, 255, 8, 8)
+ bounds: 560 224 8 8
+ - image: solid-color(71, 28, 0, 255, 8, 8)
+ bounds: 568 224 8 8
+ - image: solid-color(72, 28, 0, 255, 8, 8)
+ bounds: 576 224 8 8
+ - image: solid-color(73, 28, 0, 255, 8, 8)
+ bounds: 584 224 8 8
+ - image: solid-color(74, 28, 0, 255, 8, 8)
+ bounds: 592 224 8 8
+ - image: solid-color(75, 28, 0, 255, 8, 8)
+ bounds: 600 224 8 8
+ - image: solid-color(76, 28, 0, 255, 8, 8)
+ bounds: 608 224 8 8
+ - image: solid-color(77, 28, 0, 255, 8, 8)
+ bounds: 616 224 8 8
+ - image: solid-color(78, 28, 0, 255, 8, 8)
+ bounds: 624 224 8 8
+ - image: solid-color(79, 28, 0, 255, 8, 8)
+ bounds: 632 224 8 8
+ - image: solid-color(80, 28, 0, 255, 8, 8)
+ bounds: 640 224 8 8
+ - image: solid-color(81, 28, 0, 255, 8, 8)
+ bounds: 648 224 8 8
+ - image: solid-color(82, 28, 0, 255, 8, 8)
+ bounds: 656 224 8 8
+ - image: solid-color(83, 28, 0, 255, 8, 8)
+ bounds: 664 224 8 8
+ - image: solid-color(84, 28, 0, 255, 8, 8)
+ bounds: 672 224 8 8
+ - image: solid-color(85, 28, 0, 255, 8, 8)
+ bounds: 680 224 8 8
+ - image: solid-color(86, 28, 0, 255, 8, 8)
+ bounds: 688 224 8 8
+ - image: solid-color(87, 28, 0, 255, 8, 8)
+ bounds: 696 224 8 8
+ - image: solid-color(88, 28, 0, 255, 8, 8)
+ bounds: 704 224 8 8
+ - image: solid-color(89, 28, 0, 255, 8, 8)
+ bounds: 712 224 8 8
+ - image: solid-color(90, 28, 0, 255, 8, 8)
+ bounds: 720 224 8 8
+ - image: solid-color(91, 28, 0, 255, 8, 8)
+ bounds: 728 224 8 8
+ - image: solid-color(92, 28, 0, 255, 8, 8)
+ bounds: 736 224 8 8
+ - image: solid-color(93, 28, 0, 255, 8, 8)
+ bounds: 744 224 8 8
+ - image: solid-color(94, 28, 0, 255, 8, 8)
+ bounds: 752 224 8 8
+ - image: solid-color(95, 28, 0, 255, 8, 8)
+ bounds: 760 224 8 8
+ - image: solid-color(96, 28, 0, 255, 8, 8)
+ bounds: 768 224 8 8
+ - image: solid-color(97, 28, 0, 255, 8, 8)
+ bounds: 776 224 8 8
+ - image: solid-color(98, 28, 0, 255, 8, 8)
+ bounds: 784 224 8 8
+ - image: solid-color(99, 28, 0, 255, 8, 8)
+ bounds: 792 224 8 8
+ - image: solid-color(100, 28, 0, 255, 8, 8)
+ bounds: 800 224 8 8
+ - image: solid-color(101, 28, 0, 255, 8, 8)
+ bounds: 808 224 8 8
+ - image: solid-color(102, 28, 0, 255, 8, 8)
+ bounds: 816 224 8 8
+ - image: solid-color(103, 28, 0, 255, 8, 8)
+ bounds: 824 224 8 8
+ - image: solid-color(104, 28, 0, 255, 8, 8)
+ bounds: 832 224 8 8
+ - image: solid-color(105, 28, 0, 255, 8, 8)
+ bounds: 840 224 8 8
+ - image: solid-color(106, 28, 0, 255, 8, 8)
+ bounds: 848 224 8 8
+ - image: solid-color(107, 28, 0, 255, 8, 8)
+ bounds: 856 224 8 8
+ - image: solid-color(108, 28, 0, 255, 8, 8)
+ bounds: 864 224 8 8
+ - image: solid-color(109, 28, 0, 255, 8, 8)
+ bounds: 872 224 8 8
+ - image: solid-color(110, 28, 0, 255, 8, 8)
+ bounds: 880 224 8 8
+ - image: solid-color(111, 28, 0, 255, 8, 8)
+ bounds: 888 224 8 8
+ - image: solid-color(112, 28, 0, 255, 8, 8)
+ bounds: 896 224 8 8
+ - image: solid-color(113, 28, 0, 255, 8, 8)
+ bounds: 904 224 8 8
+ - image: solid-color(114, 28, 0, 255, 8, 8)
+ bounds: 912 224 8 8
+ - image: solid-color(115, 28, 0, 255, 8, 8)
+ bounds: 920 224 8 8
+ - image: solid-color(116, 28, 0, 255, 8, 8)
+ bounds: 928 224 8 8
+ - image: solid-color(117, 28, 0, 255, 8, 8)
+ bounds: 936 224 8 8
+ - image: solid-color(118, 28, 0, 255, 8, 8)
+ bounds: 944 224 8 8
+ - image: solid-color(119, 28, 0, 255, 8, 8)
+ bounds: 952 224 8 8
+ - image: solid-color(120, 28, 0, 255, 8, 8)
+ bounds: 960 224 8 8
+ - image: solid-color(121, 28, 0, 255, 8, 8)
+ bounds: 968 224 8 8
+ - image: solid-color(122, 28, 0, 255, 8, 8)
+ bounds: 976 224 8 8
+ - image: solid-color(123, 28, 0, 255, 8, 8)
+ bounds: 984 224 8 8
+ - image: solid-color(124, 28, 0, 255, 8, 8)
+ bounds: 992 224 8 8
+ - image: solid-color(125, 28, 0, 255, 8, 8)
+ bounds: 1000 224 8 8
+ - image: solid-color(126, 28, 0, 255, 8, 8)
+ bounds: 1008 224 8 8
+ - image: solid-color(127, 28, 0, 255, 8, 8)
+ bounds: 1016 224 8 8
+ - image: solid-color(0, 29, 0, 255, 8, 8)
+ bounds: 0 232 8 8
+ - image: solid-color(1, 29, 0, 255, 8, 8)
+ bounds: 8 232 8 8
+ - image: solid-color(2, 29, 0, 255, 8, 8)
+ bounds: 16 232 8 8
+ - image: solid-color(3, 29, 0, 255, 8, 8)
+ bounds: 24 232 8 8
+ - image: solid-color(4, 29, 0, 255, 8, 8)
+ bounds: 32 232 8 8
+ - image: solid-color(5, 29, 0, 255, 8, 8)
+ bounds: 40 232 8 8
+ - image: solid-color(6, 29, 0, 255, 8, 8)
+ bounds: 48 232 8 8
+ - image: solid-color(7, 29, 0, 255, 8, 8)
+ bounds: 56 232 8 8
+ - image: solid-color(8, 29, 0, 255, 8, 8)
+ bounds: 64 232 8 8
+ - image: solid-color(9, 29, 0, 255, 8, 8)
+ bounds: 72 232 8 8
+ - image: solid-color(10, 29, 0, 255, 8, 8)
+ bounds: 80 232 8 8
+ - image: solid-color(11, 29, 0, 255, 8, 8)
+ bounds: 88 232 8 8
+ - image: solid-color(12, 29, 0, 255, 8, 8)
+ bounds: 96 232 8 8
+ - image: solid-color(13, 29, 0, 255, 8, 8)
+ bounds: 104 232 8 8
+ - image: solid-color(14, 29, 0, 255, 8, 8)
+ bounds: 112 232 8 8
+ - image: solid-color(15, 29, 0, 255, 8, 8)
+ bounds: 120 232 8 8
+ - image: solid-color(16, 29, 0, 255, 8, 8)
+ bounds: 128 232 8 8
+ - image: solid-color(17, 29, 0, 255, 8, 8)
+ bounds: 136 232 8 8
+ - image: solid-color(18, 29, 0, 255, 8, 8)
+ bounds: 144 232 8 8
+ - image: solid-color(19, 29, 0, 255, 8, 8)
+ bounds: 152 232 8 8
+ - image: solid-color(20, 29, 0, 255, 8, 8)
+ bounds: 160 232 8 8
+ - image: solid-color(21, 29, 0, 255, 8, 8)
+ bounds: 168 232 8 8
+ - image: solid-color(22, 29, 0, 255, 8, 8)
+ bounds: 176 232 8 8
+ - image: solid-color(23, 29, 0, 255, 8, 8)
+ bounds: 184 232 8 8
+ - image: solid-color(24, 29, 0, 255, 8, 8)
+ bounds: 192 232 8 8
+ - image: solid-color(25, 29, 0, 255, 8, 8)
+ bounds: 200 232 8 8
+ - image: solid-color(26, 29, 0, 255, 8, 8)
+ bounds: 208 232 8 8
+ - image: solid-color(27, 29, 0, 255, 8, 8)
+ bounds: 216 232 8 8
+ - image: solid-color(28, 29, 0, 255, 8, 8)
+ bounds: 224 232 8 8
+ - image: solid-color(29, 29, 0, 255, 8, 8)
+ bounds: 232 232 8 8
+ - image: solid-color(30, 29, 0, 255, 8, 8)
+ bounds: 240 232 8 8
+ - image: solid-color(31, 29, 0, 255, 8, 8)
+ bounds: 248 232 8 8
+ - image: solid-color(32, 29, 0, 255, 8, 8)
+ bounds: 256 232 8 8
+ - image: solid-color(33, 29, 0, 255, 8, 8)
+ bounds: 264 232 8 8
+ - image: solid-color(34, 29, 0, 255, 8, 8)
+ bounds: 272 232 8 8
+ - image: solid-color(35, 29, 0, 255, 8, 8)
+ bounds: 280 232 8 8
+ - image: solid-color(36, 29, 0, 255, 8, 8)
+ bounds: 288 232 8 8
+ - image: solid-color(37, 29, 0, 255, 8, 8)
+ bounds: 296 232 8 8
+ - image: solid-color(38, 29, 0, 255, 8, 8)
+ bounds: 304 232 8 8
+ - image: solid-color(39, 29, 0, 255, 8, 8)
+ bounds: 312 232 8 8
+ - image: solid-color(40, 29, 0, 255, 8, 8)
+ bounds: 320 232 8 8
+ - image: solid-color(41, 29, 0, 255, 8, 8)
+ bounds: 328 232 8 8
+ - image: solid-color(42, 29, 0, 255, 8, 8)
+ bounds: 336 232 8 8
+ - image: solid-color(43, 29, 0, 255, 8, 8)
+ bounds: 344 232 8 8
+ - image: solid-color(44, 29, 0, 255, 8, 8)
+ bounds: 352 232 8 8
+ - image: solid-color(45, 29, 0, 255, 8, 8)
+ bounds: 360 232 8 8
+ - image: solid-color(46, 29, 0, 255, 8, 8)
+ bounds: 368 232 8 8
+ - image: solid-color(47, 29, 0, 255, 8, 8)
+ bounds: 376 232 8 8
+ - image: solid-color(48, 29, 0, 255, 8, 8)
+ bounds: 384 232 8 8
+ - image: solid-color(49, 29, 0, 255, 8, 8)
+ bounds: 392 232 8 8
+ - image: solid-color(50, 29, 0, 255, 8, 8)
+ bounds: 400 232 8 8
+ - image: solid-color(51, 29, 0, 255, 8, 8)
+ bounds: 408 232 8 8
+ - image: solid-color(52, 29, 0, 255, 8, 8)
+ bounds: 416 232 8 8
+ - image: solid-color(53, 29, 0, 255, 8, 8)
+ bounds: 424 232 8 8
+ - image: solid-color(54, 29, 0, 255, 8, 8)
+ bounds: 432 232 8 8
+ - image: solid-color(55, 29, 0, 255, 8, 8)
+ bounds: 440 232 8 8
+ - image: solid-color(56, 29, 0, 255, 8, 8)
+ bounds: 448 232 8 8
+ - image: solid-color(57, 29, 0, 255, 8, 8)
+ bounds: 456 232 8 8
+ - image: solid-color(58, 29, 0, 255, 8, 8)
+ bounds: 464 232 8 8
+ - image: solid-color(59, 29, 0, 255, 8, 8)
+ bounds: 472 232 8 8
+ - image: solid-color(60, 29, 0, 255, 8, 8)
+ bounds: 480 232 8 8
+ - image: solid-color(61, 29, 0, 255, 8, 8)
+ bounds: 488 232 8 8
+ - image: solid-color(62, 29, 0, 255, 8, 8)
+ bounds: 496 232 8 8
+ - image: solid-color(63, 29, 0, 255, 8, 8)
+ bounds: 504 232 8 8
+ - image: solid-color(64, 29, 0, 255, 8, 8)
+ bounds: 512 232 8 8
+ - image: solid-color(65, 29, 0, 255, 8, 8)
+ bounds: 520 232 8 8
+ - image: solid-color(66, 29, 0, 255, 8, 8)
+ bounds: 528 232 8 8
+ - image: solid-color(67, 29, 0, 255, 8, 8)
+ bounds: 536 232 8 8
+ - image: solid-color(68, 29, 0, 255, 8, 8)
+ bounds: 544 232 8 8
+ - image: solid-color(69, 29, 0, 255, 8, 8)
+ bounds: 552 232 8 8
+ - image: solid-color(70, 29, 0, 255, 8, 8)
+ bounds: 560 232 8 8
+ - image: solid-color(71, 29, 0, 255, 8, 8)
+ bounds: 568 232 8 8
+ - image: solid-color(72, 29, 0, 255, 8, 8)
+ bounds: 576 232 8 8
+ - image: solid-color(73, 29, 0, 255, 8, 8)
+ bounds: 584 232 8 8
+ - image: solid-color(74, 29, 0, 255, 8, 8)
+ bounds: 592 232 8 8
+ - image: solid-color(75, 29, 0, 255, 8, 8)
+ bounds: 600 232 8 8
+ - image: solid-color(76, 29, 0, 255, 8, 8)
+ bounds: 608 232 8 8
+ - image: solid-color(77, 29, 0, 255, 8, 8)
+ bounds: 616 232 8 8
+ - image: solid-color(78, 29, 0, 255, 8, 8)
+ bounds: 624 232 8 8
+ - image: solid-color(79, 29, 0, 255, 8, 8)
+ bounds: 632 232 8 8
+ - image: solid-color(80, 29, 0, 255, 8, 8)
+ bounds: 640 232 8 8
+ - image: solid-color(81, 29, 0, 255, 8, 8)
+ bounds: 648 232 8 8
+ - image: solid-color(82, 29, 0, 255, 8, 8)
+ bounds: 656 232 8 8
+ - image: solid-color(83, 29, 0, 255, 8, 8)
+ bounds: 664 232 8 8
+ - image: solid-color(84, 29, 0, 255, 8, 8)
+ bounds: 672 232 8 8
+ - image: solid-color(85, 29, 0, 255, 8, 8)
+ bounds: 680 232 8 8
+ - image: solid-color(86, 29, 0, 255, 8, 8)
+ bounds: 688 232 8 8
+ - image: solid-color(87, 29, 0, 255, 8, 8)
+ bounds: 696 232 8 8
+ - image: solid-color(88, 29, 0, 255, 8, 8)
+ bounds: 704 232 8 8
+ - image: solid-color(89, 29, 0, 255, 8, 8)
+ bounds: 712 232 8 8
+ - image: solid-color(90, 29, 0, 255, 8, 8)
+ bounds: 720 232 8 8
+ - image: solid-color(91, 29, 0, 255, 8, 8)
+ bounds: 728 232 8 8
+ - image: solid-color(92, 29, 0, 255, 8, 8)
+ bounds: 736 232 8 8
+ - image: solid-color(93, 29, 0, 255, 8, 8)
+ bounds: 744 232 8 8
+ - image: solid-color(94, 29, 0, 255, 8, 8)
+ bounds: 752 232 8 8
+ - image: solid-color(95, 29, 0, 255, 8, 8)
+ bounds: 760 232 8 8
+ - image: solid-color(96, 29, 0, 255, 8, 8)
+ bounds: 768 232 8 8
+ - image: solid-color(97, 29, 0, 255, 8, 8)
+ bounds: 776 232 8 8
+ - image: solid-color(98, 29, 0, 255, 8, 8)
+ bounds: 784 232 8 8
+ - image: solid-color(99, 29, 0, 255, 8, 8)
+ bounds: 792 232 8 8
+ - image: solid-color(100, 29, 0, 255, 8, 8)
+ bounds: 800 232 8 8
+ - image: solid-color(101, 29, 0, 255, 8, 8)
+ bounds: 808 232 8 8
+ - image: solid-color(102, 29, 0, 255, 8, 8)
+ bounds: 816 232 8 8
+ - image: solid-color(103, 29, 0, 255, 8, 8)
+ bounds: 824 232 8 8
+ - image: solid-color(104, 29, 0, 255, 8, 8)
+ bounds: 832 232 8 8
+ - image: solid-color(105, 29, 0, 255, 8, 8)
+ bounds: 840 232 8 8
+ - image: solid-color(106, 29, 0, 255, 8, 8)
+ bounds: 848 232 8 8
+ - image: solid-color(107, 29, 0, 255, 8, 8)
+ bounds: 856 232 8 8
+ - image: solid-color(108, 29, 0, 255, 8, 8)
+ bounds: 864 232 8 8
+ - image: solid-color(109, 29, 0, 255, 8, 8)
+ bounds: 872 232 8 8
+ - image: solid-color(110, 29, 0, 255, 8, 8)
+ bounds: 880 232 8 8
+ - image: solid-color(111, 29, 0, 255, 8, 8)
+ bounds: 888 232 8 8
+ - image: solid-color(112, 29, 0, 255, 8, 8)
+ bounds: 896 232 8 8
+ - image: solid-color(113, 29, 0, 255, 8, 8)
+ bounds: 904 232 8 8
+ - image: solid-color(114, 29, 0, 255, 8, 8)
+ bounds: 912 232 8 8
+ - image: solid-color(115, 29, 0, 255, 8, 8)
+ bounds: 920 232 8 8
+ - image: solid-color(116, 29, 0, 255, 8, 8)
+ bounds: 928 232 8 8
+ - image: solid-color(117, 29, 0, 255, 8, 8)
+ bounds: 936 232 8 8
+ - image: solid-color(118, 29, 0, 255, 8, 8)
+ bounds: 944 232 8 8
+ - image: solid-color(119, 29, 0, 255, 8, 8)
+ bounds: 952 232 8 8
+ - image: solid-color(120, 29, 0, 255, 8, 8)
+ bounds: 960 232 8 8
+ - image: solid-color(121, 29, 0, 255, 8, 8)
+ bounds: 968 232 8 8
+ - image: solid-color(122, 29, 0, 255, 8, 8)
+ bounds: 976 232 8 8
+ - image: solid-color(123, 29, 0, 255, 8, 8)
+ bounds: 984 232 8 8
+ - image: solid-color(124, 29, 0, 255, 8, 8)
+ bounds: 992 232 8 8
+ - image: solid-color(125, 29, 0, 255, 8, 8)
+ bounds: 1000 232 8 8
+ - image: solid-color(126, 29, 0, 255, 8, 8)
+ bounds: 1008 232 8 8
+ - image: solid-color(127, 29, 0, 255, 8, 8)
+ bounds: 1016 232 8 8
+ - image: solid-color(0, 30, 0, 255, 8, 8)
+ bounds: 0 240 8 8
+ - image: solid-color(1, 30, 0, 255, 8, 8)
+ bounds: 8 240 8 8
+ - image: solid-color(2, 30, 0, 255, 8, 8)
+ bounds: 16 240 8 8
+ - image: solid-color(3, 30, 0, 255, 8, 8)
+ bounds: 24 240 8 8
+ - image: solid-color(4, 30, 0, 255, 8, 8)
+ bounds: 32 240 8 8
+ - image: solid-color(5, 30, 0, 255, 8, 8)
+ bounds: 40 240 8 8
+ - image: solid-color(6, 30, 0, 255, 8, 8)
+ bounds: 48 240 8 8
+ - image: solid-color(7, 30, 0, 255, 8, 8)
+ bounds: 56 240 8 8
+ - image: solid-color(8, 30, 0, 255, 8, 8)
+ bounds: 64 240 8 8
+ - image: solid-color(9, 30, 0, 255, 8, 8)
+ bounds: 72 240 8 8
+ - image: solid-color(10, 30, 0, 255, 8, 8)
+ bounds: 80 240 8 8
+ - image: solid-color(11, 30, 0, 255, 8, 8)
+ bounds: 88 240 8 8
+ - image: solid-color(12, 30, 0, 255, 8, 8)
+ bounds: 96 240 8 8
+ - image: solid-color(13, 30, 0, 255, 8, 8)
+ bounds: 104 240 8 8
+ - image: solid-color(14, 30, 0, 255, 8, 8)
+ bounds: 112 240 8 8
+ - image: solid-color(15, 30, 0, 255, 8, 8)
+ bounds: 120 240 8 8
+ - image: solid-color(16, 30, 0, 255, 8, 8)
+ bounds: 128 240 8 8
+ - image: solid-color(17, 30, 0, 255, 8, 8)
+ bounds: 136 240 8 8
+ - image: solid-color(18, 30, 0, 255, 8, 8)
+ bounds: 144 240 8 8
+ - image: solid-color(19, 30, 0, 255, 8, 8)
+ bounds: 152 240 8 8
+ - image: solid-color(20, 30, 0, 255, 8, 8)
+ bounds: 160 240 8 8
+ - image: solid-color(21, 30, 0, 255, 8, 8)
+ bounds: 168 240 8 8
+ - image: solid-color(22, 30, 0, 255, 8, 8)
+ bounds: 176 240 8 8
+ - image: solid-color(23, 30, 0, 255, 8, 8)
+ bounds: 184 240 8 8
+ - image: solid-color(24, 30, 0, 255, 8, 8)
+ bounds: 192 240 8 8
+ - image: solid-color(25, 30, 0, 255, 8, 8)
+ bounds: 200 240 8 8
+ - image: solid-color(26, 30, 0, 255, 8, 8)
+ bounds: 208 240 8 8
+ - image: solid-color(27, 30, 0, 255, 8, 8)
+ bounds: 216 240 8 8
+ - image: solid-color(28, 30, 0, 255, 8, 8)
+ bounds: 224 240 8 8
+ - image: solid-color(29, 30, 0, 255, 8, 8)
+ bounds: 232 240 8 8
+ - image: solid-color(30, 30, 0, 255, 8, 8)
+ bounds: 240 240 8 8
+ - image: solid-color(31, 30, 0, 255, 8, 8)
+ bounds: 248 240 8 8
+ - image: solid-color(32, 30, 0, 255, 8, 8)
+ bounds: 256 240 8 8
+ - image: solid-color(33, 30, 0, 255, 8, 8)
+ bounds: 264 240 8 8
+ - image: solid-color(34, 30, 0, 255, 8, 8)
+ bounds: 272 240 8 8
+ - image: solid-color(35, 30, 0, 255, 8, 8)
+ bounds: 280 240 8 8
+ - image: solid-color(36, 30, 0, 255, 8, 8)
+ bounds: 288 240 8 8
+ - image: solid-color(37, 30, 0, 255, 8, 8)
+ bounds: 296 240 8 8
+ - image: solid-color(38, 30, 0, 255, 8, 8)
+ bounds: 304 240 8 8
+ - image: solid-color(39, 30, 0, 255, 8, 8)
+ bounds: 312 240 8 8
+ - image: solid-color(40, 30, 0, 255, 8, 8)
+ bounds: 320 240 8 8
+ - image: solid-color(41, 30, 0, 255, 8, 8)
+ bounds: 328 240 8 8
+ - image: solid-color(42, 30, 0, 255, 8, 8)
+ bounds: 336 240 8 8
+ - image: solid-color(43, 30, 0, 255, 8, 8)
+ bounds: 344 240 8 8
+ - image: solid-color(44, 30, 0, 255, 8, 8)
+ bounds: 352 240 8 8
+ - image: solid-color(45, 30, 0, 255, 8, 8)
+ bounds: 360 240 8 8
+ - image: solid-color(46, 30, 0, 255, 8, 8)
+ bounds: 368 240 8 8
+ - image: solid-color(47, 30, 0, 255, 8, 8)
+ bounds: 376 240 8 8
+ - image: solid-color(48, 30, 0, 255, 8, 8)
+ bounds: 384 240 8 8
+ - image: solid-color(49, 30, 0, 255, 8, 8)
+ bounds: 392 240 8 8
+ - image: solid-color(50, 30, 0, 255, 8, 8)
+ bounds: 400 240 8 8
+ - image: solid-color(51, 30, 0, 255, 8, 8)
+ bounds: 408 240 8 8
+ - image: solid-color(52, 30, 0, 255, 8, 8)
+ bounds: 416 240 8 8
+ - image: solid-color(53, 30, 0, 255, 8, 8)
+ bounds: 424 240 8 8
+ - image: solid-color(54, 30, 0, 255, 8, 8)
+ bounds: 432 240 8 8
+ - image: solid-color(55, 30, 0, 255, 8, 8)
+ bounds: 440 240 8 8
+ - image: solid-color(56, 30, 0, 255, 8, 8)
+ bounds: 448 240 8 8
+ - image: solid-color(57, 30, 0, 255, 8, 8)
+ bounds: 456 240 8 8
+ - image: solid-color(58, 30, 0, 255, 8, 8)
+ bounds: 464 240 8 8
+ - image: solid-color(59, 30, 0, 255, 8, 8)
+ bounds: 472 240 8 8
+ - image: solid-color(60, 30, 0, 255, 8, 8)
+ bounds: 480 240 8 8
+ - image: solid-color(61, 30, 0, 255, 8, 8)
+ bounds: 488 240 8 8
+ - image: solid-color(62, 30, 0, 255, 8, 8)
+ bounds: 496 240 8 8
+ - image: solid-color(63, 30, 0, 255, 8, 8)
+ bounds: 504 240 8 8
+ - image: solid-color(64, 30, 0, 255, 8, 8)
+ bounds: 512 240 8 8
+ - image: solid-color(65, 30, 0, 255, 8, 8)
+ bounds: 520 240 8 8
+ - image: solid-color(66, 30, 0, 255, 8, 8)
+ bounds: 528 240 8 8
+ - image: solid-color(67, 30, 0, 255, 8, 8)
+ bounds: 536 240 8 8
+ - image: solid-color(68, 30, 0, 255, 8, 8)
+ bounds: 544 240 8 8
+ - image: solid-color(69, 30, 0, 255, 8, 8)
+ bounds: 552 240 8 8
+ - image: solid-color(70, 30, 0, 255, 8, 8)
+ bounds: 560 240 8 8
+ - image: solid-color(71, 30, 0, 255, 8, 8)
+ bounds: 568 240 8 8
+ - image: solid-color(72, 30, 0, 255, 8, 8)
+ bounds: 576 240 8 8
+ - image: solid-color(73, 30, 0, 255, 8, 8)
+ bounds: 584 240 8 8
+ - image: solid-color(74, 30, 0, 255, 8, 8)
+ bounds: 592 240 8 8
+ - image: solid-color(75, 30, 0, 255, 8, 8)
+ bounds: 600 240 8 8
+ - image: solid-color(76, 30, 0, 255, 8, 8)
+ bounds: 608 240 8 8
+ - image: solid-color(77, 30, 0, 255, 8, 8)
+ bounds: 616 240 8 8
+ - image: solid-color(78, 30, 0, 255, 8, 8)
+ bounds: 624 240 8 8
+ - image: solid-color(79, 30, 0, 255, 8, 8)
+ bounds: 632 240 8 8
+ - image: solid-color(80, 30, 0, 255, 8, 8)
+ bounds: 640 240 8 8
+ - image: solid-color(81, 30, 0, 255, 8, 8)
+ bounds: 648 240 8 8
+ - image: solid-color(82, 30, 0, 255, 8, 8)
+ bounds: 656 240 8 8
+ - image: solid-color(83, 30, 0, 255, 8, 8)
+ bounds: 664 240 8 8
+ - image: solid-color(84, 30, 0, 255, 8, 8)
+ bounds: 672 240 8 8
+ - image: solid-color(85, 30, 0, 255, 8, 8)
+ bounds: 680 240 8 8
+ - image: solid-color(86, 30, 0, 255, 8, 8)
+ bounds: 688 240 8 8
+ - image: solid-color(87, 30, 0, 255, 8, 8)
+ bounds: 696 240 8 8
+ - image: solid-color(88, 30, 0, 255, 8, 8)
+ bounds: 704 240 8 8
+ - image: solid-color(89, 30, 0, 255, 8, 8)
+ bounds: 712 240 8 8
+ - image: solid-color(90, 30, 0, 255, 8, 8)
+ bounds: 720 240 8 8
+ - image: solid-color(91, 30, 0, 255, 8, 8)
+ bounds: 728 240 8 8
+ - image: solid-color(92, 30, 0, 255, 8, 8)
+ bounds: 736 240 8 8
+ - image: solid-color(93, 30, 0, 255, 8, 8)
+ bounds: 744 240 8 8
+ - image: solid-color(94, 30, 0, 255, 8, 8)
+ bounds: 752 240 8 8
+ - image: solid-color(95, 30, 0, 255, 8, 8)
+ bounds: 760 240 8 8
+ - image: solid-color(96, 30, 0, 255, 8, 8)
+ bounds: 768 240 8 8
+ - image: solid-color(97, 30, 0, 255, 8, 8)
+ bounds: 776 240 8 8
+ - image: solid-color(98, 30, 0, 255, 8, 8)
+ bounds: 784 240 8 8
+ - image: solid-color(99, 30, 0, 255, 8, 8)
+ bounds: 792 240 8 8
+ - image: solid-color(100, 30, 0, 255, 8, 8)
+ bounds: 800 240 8 8
+ - image: solid-color(101, 30, 0, 255, 8, 8)
+ bounds: 808 240 8 8
+ - image: solid-color(102, 30, 0, 255, 8, 8)
+ bounds: 816 240 8 8
+ - image: solid-color(103, 30, 0, 255, 8, 8)
+ bounds: 824 240 8 8
+ - image: solid-color(104, 30, 0, 255, 8, 8)
+ bounds: 832 240 8 8
+ - image: solid-color(105, 30, 0, 255, 8, 8)
+ bounds: 840 240 8 8
+ - image: solid-color(106, 30, 0, 255, 8, 8)
+ bounds: 848 240 8 8
+ - image: solid-color(107, 30, 0, 255, 8, 8)
+ bounds: 856 240 8 8
+ - image: solid-color(108, 30, 0, 255, 8, 8)
+ bounds: 864 240 8 8
+ - image: solid-color(109, 30, 0, 255, 8, 8)
+ bounds: 872 240 8 8
+ - image: solid-color(110, 30, 0, 255, 8, 8)
+ bounds: 880 240 8 8
+ - image: solid-color(111, 30, 0, 255, 8, 8)
+ bounds: 888 240 8 8
+ - image: solid-color(112, 30, 0, 255, 8, 8)
+ bounds: 896 240 8 8
+ - image: solid-color(113, 30, 0, 255, 8, 8)
+ bounds: 904 240 8 8
+ - image: solid-color(114, 30, 0, 255, 8, 8)
+ bounds: 912 240 8 8
+ - image: solid-color(115, 30, 0, 255, 8, 8)
+ bounds: 920 240 8 8
+ - image: solid-color(116, 30, 0, 255, 8, 8)
+ bounds: 928 240 8 8
+ - image: solid-color(117, 30, 0, 255, 8, 8)
+ bounds: 936 240 8 8
+ - image: solid-color(118, 30, 0, 255, 8, 8)
+ bounds: 944 240 8 8
+ - image: solid-color(119, 30, 0, 255, 8, 8)
+ bounds: 952 240 8 8
+ - image: solid-color(120, 30, 0, 255, 8, 8)
+ bounds: 960 240 8 8
+ - image: solid-color(121, 30, 0, 255, 8, 8)
+ bounds: 968 240 8 8
+ - image: solid-color(122, 30, 0, 255, 8, 8)
+ bounds: 976 240 8 8
+ - image: solid-color(123, 30, 0, 255, 8, 8)
+ bounds: 984 240 8 8
+ - image: solid-color(124, 30, 0, 255, 8, 8)
+ bounds: 992 240 8 8
+ - image: solid-color(125, 30, 0, 255, 8, 8)
+ bounds: 1000 240 8 8
+ - image: solid-color(126, 30, 0, 255, 8, 8)
+ bounds: 1008 240 8 8
+ - image: solid-color(127, 30, 0, 255, 8, 8)
+ bounds: 1016 240 8 8
+ - image: solid-color(0, 31, 0, 255, 8, 8)
+ bounds: 0 248 8 8
+ - image: solid-color(1, 31, 0, 255, 8, 8)
+ bounds: 8 248 8 8
+ - image: solid-color(2, 31, 0, 255, 8, 8)
+ bounds: 16 248 8 8
+ - image: solid-color(3, 31, 0, 255, 8, 8)
+ bounds: 24 248 8 8
+ - image: solid-color(4, 31, 0, 255, 8, 8)
+ bounds: 32 248 8 8
+ - image: solid-color(5, 31, 0, 255, 8, 8)
+ bounds: 40 248 8 8
+ - image: solid-color(6, 31, 0, 255, 8, 8)
+ bounds: 48 248 8 8
+ - image: solid-color(7, 31, 0, 255, 8, 8)
+ bounds: 56 248 8 8
+ - image: solid-color(8, 31, 0, 255, 8, 8)
+ bounds: 64 248 8 8
+ - image: solid-color(9, 31, 0, 255, 8, 8)
+ bounds: 72 248 8 8
+ - image: solid-color(10, 31, 0, 255, 8, 8)
+ bounds: 80 248 8 8
+ - image: solid-color(11, 31, 0, 255, 8, 8)
+ bounds: 88 248 8 8
+ - image: solid-color(12, 31, 0, 255, 8, 8)
+ bounds: 96 248 8 8
+ - image: solid-color(13, 31, 0, 255, 8, 8)
+ bounds: 104 248 8 8
+ - image: solid-color(14, 31, 0, 255, 8, 8)
+ bounds: 112 248 8 8
+ - image: solid-color(15, 31, 0, 255, 8, 8)
+ bounds: 120 248 8 8
+ - image: solid-color(16, 31, 0, 255, 8, 8)
+ bounds: 128 248 8 8
+ - image: solid-color(17, 31, 0, 255, 8, 8)
+ bounds: 136 248 8 8
+ - image: solid-color(18, 31, 0, 255, 8, 8)
+ bounds: 144 248 8 8
+ - image: solid-color(19, 31, 0, 255, 8, 8)
+ bounds: 152 248 8 8
+ - image: solid-color(20, 31, 0, 255, 8, 8)
+ bounds: 160 248 8 8
+ - image: solid-color(21, 31, 0, 255, 8, 8)
+ bounds: 168 248 8 8
+ - image: solid-color(22, 31, 0, 255, 8, 8)
+ bounds: 176 248 8 8
+ - image: solid-color(23, 31, 0, 255, 8, 8)
+ bounds: 184 248 8 8
+ - image: solid-color(24, 31, 0, 255, 8, 8)
+ bounds: 192 248 8 8
+ - image: solid-color(25, 31, 0, 255, 8, 8)
+ bounds: 200 248 8 8
+ - image: solid-color(26, 31, 0, 255, 8, 8)
+ bounds: 208 248 8 8
+ - image: solid-color(27, 31, 0, 255, 8, 8)
+ bounds: 216 248 8 8
+ - image: solid-color(28, 31, 0, 255, 8, 8)
+ bounds: 224 248 8 8
+ - image: solid-color(29, 31, 0, 255, 8, 8)
+ bounds: 232 248 8 8
+ - image: solid-color(30, 31, 0, 255, 8, 8)
+ bounds: 240 248 8 8
+ - image: solid-color(31, 31, 0, 255, 8, 8)
+ bounds: 248 248 8 8
+ - image: solid-color(32, 31, 0, 255, 8, 8)
+ bounds: 256 248 8 8
+ - image: solid-color(33, 31, 0, 255, 8, 8)
+ bounds: 264 248 8 8
+ - image: solid-color(34, 31, 0, 255, 8, 8)
+ bounds: 272 248 8 8
+ - image: solid-color(35, 31, 0, 255, 8, 8)
+ bounds: 280 248 8 8
+ - image: solid-color(36, 31, 0, 255, 8, 8)
+ bounds: 288 248 8 8
+ - image: solid-color(37, 31, 0, 255, 8, 8)
+ bounds: 296 248 8 8
+ - image: solid-color(38, 31, 0, 255, 8, 8)
+ bounds: 304 248 8 8
+ - image: solid-color(39, 31, 0, 255, 8, 8)
+ bounds: 312 248 8 8
+ - image: solid-color(40, 31, 0, 255, 8, 8)
+ bounds: 320 248 8 8
+ - image: solid-color(41, 31, 0, 255, 8, 8)
+ bounds: 328 248 8 8
+ - image: solid-color(42, 31, 0, 255, 8, 8)
+ bounds: 336 248 8 8
+ - image: solid-color(43, 31, 0, 255, 8, 8)
+ bounds: 344 248 8 8
+ - image: solid-color(44, 31, 0, 255, 8, 8)
+ bounds: 352 248 8 8
+ - image: solid-color(45, 31, 0, 255, 8, 8)
+ bounds: 360 248 8 8
+ - image: solid-color(46, 31, 0, 255, 8, 8)
+ bounds: 368 248 8 8
+ - image: solid-color(47, 31, 0, 255, 8, 8)
+ bounds: 376 248 8 8
+ - image: solid-color(48, 31, 0, 255, 8, 8)
+ bounds: 384 248 8 8
+ - image: solid-color(49, 31, 0, 255, 8, 8)
+ bounds: 392 248 8 8
+ - image: solid-color(50, 31, 0, 255, 8, 8)
+ bounds: 400 248 8 8
+ - image: solid-color(51, 31, 0, 255, 8, 8)
+ bounds: 408 248 8 8
+ - image: solid-color(52, 31, 0, 255, 8, 8)
+ bounds: 416 248 8 8
+ - image: solid-color(53, 31, 0, 255, 8, 8)
+ bounds: 424 248 8 8
+ - image: solid-color(54, 31, 0, 255, 8, 8)
+ bounds: 432 248 8 8
+ - image: solid-color(55, 31, 0, 255, 8, 8)
+ bounds: 440 248 8 8
+ - image: solid-color(56, 31, 0, 255, 8, 8)
+ bounds: 448 248 8 8
+ - image: solid-color(57, 31, 0, 255, 8, 8)
+ bounds: 456 248 8 8
+ - image: solid-color(58, 31, 0, 255, 8, 8)
+ bounds: 464 248 8 8
+ - image: solid-color(59, 31, 0, 255, 8, 8)
+ bounds: 472 248 8 8
+ - image: solid-color(60, 31, 0, 255, 8, 8)
+ bounds: 480 248 8 8
+ - image: solid-color(61, 31, 0, 255, 8, 8)
+ bounds: 488 248 8 8
+ - image: solid-color(62, 31, 0, 255, 8, 8)
+ bounds: 496 248 8 8
+ - image: solid-color(63, 31, 0, 255, 8, 8)
+ bounds: 504 248 8 8
+ - image: solid-color(64, 31, 0, 255, 8, 8)
+ bounds: 512 248 8 8
+ - image: solid-color(65, 31, 0, 255, 8, 8)
+ bounds: 520 248 8 8
+ - image: solid-color(66, 31, 0, 255, 8, 8)
+ bounds: 528 248 8 8
+ - image: solid-color(67, 31, 0, 255, 8, 8)
+ bounds: 536 248 8 8
+ - image: solid-color(68, 31, 0, 255, 8, 8)
+ bounds: 544 248 8 8
+ - image: solid-color(69, 31, 0, 255, 8, 8)
+ bounds: 552 248 8 8
+ - image: solid-color(70, 31, 0, 255, 8, 8)
+ bounds: 560 248 8 8
+ - image: solid-color(71, 31, 0, 255, 8, 8)
+ bounds: 568 248 8 8
+ - image: solid-color(72, 31, 0, 255, 8, 8)
+ bounds: 576 248 8 8
+ - image: solid-color(73, 31, 0, 255, 8, 8)
+ bounds: 584 248 8 8
+ - image: solid-color(74, 31, 0, 255, 8, 8)
+ bounds: 592 248 8 8
+ - image: solid-color(75, 31, 0, 255, 8, 8)
+ bounds: 600 248 8 8
+ - image: solid-color(76, 31, 0, 255, 8, 8)
+ bounds: 608 248 8 8
+ - image: solid-color(77, 31, 0, 255, 8, 8)
+ bounds: 616 248 8 8
+ - image: solid-color(78, 31, 0, 255, 8, 8)
+ bounds: 624 248 8 8
+ - image: solid-color(79, 31, 0, 255, 8, 8)
+ bounds: 632 248 8 8
+ - image: solid-color(80, 31, 0, 255, 8, 8)
+ bounds: 640 248 8 8
+ - image: solid-color(81, 31, 0, 255, 8, 8)
+ bounds: 648 248 8 8
+ - image: solid-color(82, 31, 0, 255, 8, 8)
+ bounds: 656 248 8 8
+ - image: solid-color(83, 31, 0, 255, 8, 8)
+ bounds: 664 248 8 8
+ - image: solid-color(84, 31, 0, 255, 8, 8)
+ bounds: 672 248 8 8
+ - image: solid-color(85, 31, 0, 255, 8, 8)
+ bounds: 680 248 8 8
+ - image: solid-color(86, 31, 0, 255, 8, 8)
+ bounds: 688 248 8 8
+ - image: solid-color(87, 31, 0, 255, 8, 8)
+ bounds: 696 248 8 8
+ - image: solid-color(88, 31, 0, 255, 8, 8)
+ bounds: 704 248 8 8
+ - image: solid-color(89, 31, 0, 255, 8, 8)
+ bounds: 712 248 8 8
+ - image: solid-color(90, 31, 0, 255, 8, 8)
+ bounds: 720 248 8 8
+ - image: solid-color(91, 31, 0, 255, 8, 8)
+ bounds: 728 248 8 8
+ - image: solid-color(92, 31, 0, 255, 8, 8)
+ bounds: 736 248 8 8
+ - image: solid-color(93, 31, 0, 255, 8, 8)
+ bounds: 744 248 8 8
+ - image: solid-color(94, 31, 0, 255, 8, 8)
+ bounds: 752 248 8 8
+ - image: solid-color(95, 31, 0, 255, 8, 8)
+ bounds: 760 248 8 8
+ - image: solid-color(96, 31, 0, 255, 8, 8)
+ bounds: 768 248 8 8
+ - image: solid-color(97, 31, 0, 255, 8, 8)
+ bounds: 776 248 8 8
+ - image: solid-color(98, 31, 0, 255, 8, 8)
+ bounds: 784 248 8 8
+ - image: solid-color(99, 31, 0, 255, 8, 8)
+ bounds: 792 248 8 8
+ - image: solid-color(100, 31, 0, 255, 8, 8)
+ bounds: 800 248 8 8
+ - image: solid-color(101, 31, 0, 255, 8, 8)
+ bounds: 808 248 8 8
+ - image: solid-color(102, 31, 0, 255, 8, 8)
+ bounds: 816 248 8 8
+ - image: solid-color(103, 31, 0, 255, 8, 8)
+ bounds: 824 248 8 8
+ - image: solid-color(104, 31, 0, 255, 8, 8)
+ bounds: 832 248 8 8
+ - image: solid-color(105, 31, 0, 255, 8, 8)
+ bounds: 840 248 8 8
+ - image: solid-color(106, 31, 0, 255, 8, 8)
+ bounds: 848 248 8 8
+ - image: solid-color(107, 31, 0, 255, 8, 8)
+ bounds: 856 248 8 8
+ - image: solid-color(108, 31, 0, 255, 8, 8)
+ bounds: 864 248 8 8
+ - image: solid-color(109, 31, 0, 255, 8, 8)
+ bounds: 872 248 8 8
+ - image: solid-color(110, 31, 0, 255, 8, 8)
+ bounds: 880 248 8 8
+ - image: solid-color(111, 31, 0, 255, 8, 8)
+ bounds: 888 248 8 8
+ - image: solid-color(112, 31, 0, 255, 8, 8)
+ bounds: 896 248 8 8
+ - image: solid-color(113, 31, 0, 255, 8, 8)
+ bounds: 904 248 8 8
+ - image: solid-color(114, 31, 0, 255, 8, 8)
+ bounds: 912 248 8 8
+ - image: solid-color(115, 31, 0, 255, 8, 8)
+ bounds: 920 248 8 8
+ - image: solid-color(116, 31, 0, 255, 8, 8)
+ bounds: 928 248 8 8
+ - image: solid-color(117, 31, 0, 255, 8, 8)
+ bounds: 936 248 8 8
+ - image: solid-color(118, 31, 0, 255, 8, 8)
+ bounds: 944 248 8 8
+ - image: solid-color(119, 31, 0, 255, 8, 8)
+ bounds: 952 248 8 8
+ - image: solid-color(120, 31, 0, 255, 8, 8)
+ bounds: 960 248 8 8
+ - image: solid-color(121, 31, 0, 255, 8, 8)
+ bounds: 968 248 8 8
+ - image: solid-color(122, 31, 0, 255, 8, 8)
+ bounds: 976 248 8 8
+ - image: solid-color(123, 31, 0, 255, 8, 8)
+ bounds: 984 248 8 8
+ - image: solid-color(124, 31, 0, 255, 8, 8)
+ bounds: 992 248 8 8
+ - image: solid-color(125, 31, 0, 255, 8, 8)
+ bounds: 1000 248 8 8
+ - image: solid-color(126, 31, 0, 255, 8, 8)
+ bounds: 1008 248 8 8
+ - image: solid-color(127, 31, 0, 255, 8, 8)
+ bounds: 1016 248 8 8
+ - image: solid-color(0, 32, 0, 255, 8, 8)
+ bounds: 0 256 8 8
+ - image: solid-color(1, 32, 0, 255, 8, 8)
+ bounds: 8 256 8 8
+ - image: solid-color(2, 32, 0, 255, 8, 8)
+ bounds: 16 256 8 8
+ - image: solid-color(3, 32, 0, 255, 8, 8)
+ bounds: 24 256 8 8
+ - image: solid-color(4, 32, 0, 255, 8, 8)
+ bounds: 32 256 8 8
+ - image: solid-color(5, 32, 0, 255, 8, 8)
+ bounds: 40 256 8 8
+ - image: solid-color(6, 32, 0, 255, 8, 8)
+ bounds: 48 256 8 8
+ - image: solid-color(7, 32, 0, 255, 8, 8)
+ bounds: 56 256 8 8
+ - image: solid-color(8, 32, 0, 255, 8, 8)
+ bounds: 64 256 8 8
+ - image: solid-color(9, 32, 0, 255, 8, 8)
+ bounds: 72 256 8 8
+ - image: solid-color(10, 32, 0, 255, 8, 8)
+ bounds: 80 256 8 8
+ - image: solid-color(11, 32, 0, 255, 8, 8)
+ bounds: 88 256 8 8
+ - image: solid-color(12, 32, 0, 255, 8, 8)
+ bounds: 96 256 8 8
+ - image: solid-color(13, 32, 0, 255, 8, 8)
+ bounds: 104 256 8 8
+ - image: solid-color(14, 32, 0, 255, 8, 8)
+ bounds: 112 256 8 8
+ - image: solid-color(15, 32, 0, 255, 8, 8)
+ bounds: 120 256 8 8
+ - image: solid-color(16, 32, 0, 255, 8, 8)
+ bounds: 128 256 8 8
+ - image: solid-color(17, 32, 0, 255, 8, 8)
+ bounds: 136 256 8 8
+ - image: solid-color(18, 32, 0, 255, 8, 8)
+ bounds: 144 256 8 8
+ - image: solid-color(19, 32, 0, 255, 8, 8)
+ bounds: 152 256 8 8
+ - image: solid-color(20, 32, 0, 255, 8, 8)
+ bounds: 160 256 8 8
+ - image: solid-color(21, 32, 0, 255, 8, 8)
+ bounds: 168 256 8 8
+ - image: solid-color(22, 32, 0, 255, 8, 8)
+ bounds: 176 256 8 8
+ - image: solid-color(23, 32, 0, 255, 8, 8)
+ bounds: 184 256 8 8
+ - image: solid-color(24, 32, 0, 255, 8, 8)
+ bounds: 192 256 8 8
+ - image: solid-color(25, 32, 0, 255, 8, 8)
+ bounds: 200 256 8 8
+ - image: solid-color(26, 32, 0, 255, 8, 8)
+ bounds: 208 256 8 8
+ - image: solid-color(27, 32, 0, 255, 8, 8)
+ bounds: 216 256 8 8
+ - image: solid-color(28, 32, 0, 255, 8, 8)
+ bounds: 224 256 8 8
+ - image: solid-color(29, 32, 0, 255, 8, 8)
+ bounds: 232 256 8 8
+ - image: solid-color(30, 32, 0, 255, 8, 8)
+ bounds: 240 256 8 8
+ - image: solid-color(31, 32, 0, 255, 8, 8)
+ bounds: 248 256 8 8
+ - image: solid-color(32, 32, 0, 255, 8, 8)
+ bounds: 256 256 8 8
+ - image: solid-color(33, 32, 0, 255, 8, 8)
+ bounds: 264 256 8 8
+ - image: solid-color(34, 32, 0, 255, 8, 8)
+ bounds: 272 256 8 8
+ - image: solid-color(35, 32, 0, 255, 8, 8)
+ bounds: 280 256 8 8
+ - image: solid-color(36, 32, 0, 255, 8, 8)
+ bounds: 288 256 8 8
+ - image: solid-color(37, 32, 0, 255, 8, 8)
+ bounds: 296 256 8 8
+ - image: solid-color(38, 32, 0, 255, 8, 8)
+ bounds: 304 256 8 8
+ - image: solid-color(39, 32, 0, 255, 8, 8)
+ bounds: 312 256 8 8
+ - image: solid-color(40, 32, 0, 255, 8, 8)
+ bounds: 320 256 8 8
+ - image: solid-color(41, 32, 0, 255, 8, 8)
+ bounds: 328 256 8 8
+ - image: solid-color(42, 32, 0, 255, 8, 8)
+ bounds: 336 256 8 8
+ - image: solid-color(43, 32, 0, 255, 8, 8)
+ bounds: 344 256 8 8
+ - image: solid-color(44, 32, 0, 255, 8, 8)
+ bounds: 352 256 8 8
+ - image: solid-color(45, 32, 0, 255, 8, 8)
+ bounds: 360 256 8 8
+ - image: solid-color(46, 32, 0, 255, 8, 8)
+ bounds: 368 256 8 8
+ - image: solid-color(47, 32, 0, 255, 8, 8)
+ bounds: 376 256 8 8
+ - image: solid-color(48, 32, 0, 255, 8, 8)
+ bounds: 384 256 8 8
+ - image: solid-color(49, 32, 0, 255, 8, 8)
+ bounds: 392 256 8 8
+ - image: solid-color(50, 32, 0, 255, 8, 8)
+ bounds: 400 256 8 8
+ - image: solid-color(51, 32, 0, 255, 8, 8)
+ bounds: 408 256 8 8
+ - image: solid-color(52, 32, 0, 255, 8, 8)
+ bounds: 416 256 8 8
+ - image: solid-color(53, 32, 0, 255, 8, 8)
+ bounds: 424 256 8 8
+ - image: solid-color(54, 32, 0, 255, 8, 8)
+ bounds: 432 256 8 8
+ - image: solid-color(55, 32, 0, 255, 8, 8)
+ bounds: 440 256 8 8
+ - image: solid-color(56, 32, 0, 255, 8, 8)
+ bounds: 448 256 8 8
+ - image: solid-color(57, 32, 0, 255, 8, 8)
+ bounds: 456 256 8 8
+ - image: solid-color(58, 32, 0, 255, 8, 8)
+ bounds: 464 256 8 8
+ - image: solid-color(59, 32, 0, 255, 8, 8)
+ bounds: 472 256 8 8
+ - image: solid-color(60, 32, 0, 255, 8, 8)
+ bounds: 480 256 8 8
+ - image: solid-color(61, 32, 0, 255, 8, 8)
+ bounds: 488 256 8 8
+ - image: solid-color(62, 32, 0, 255, 8, 8)
+ bounds: 496 256 8 8
+ - image: solid-color(63, 32, 0, 255, 8, 8)
+ bounds: 504 256 8 8
+ - image: solid-color(64, 32, 0, 255, 8, 8)
+ bounds: 512 256 8 8
+ - image: solid-color(65, 32, 0, 255, 8, 8)
+ bounds: 520 256 8 8
+ - image: solid-color(66, 32, 0, 255, 8, 8)
+ bounds: 528 256 8 8
+ - image: solid-color(67, 32, 0, 255, 8, 8)
+ bounds: 536 256 8 8
+ - image: solid-color(68, 32, 0, 255, 8, 8)
+ bounds: 544 256 8 8
+ - image: solid-color(69, 32, 0, 255, 8, 8)
+ bounds: 552 256 8 8
+ - image: solid-color(70, 32, 0, 255, 8, 8)
+ bounds: 560 256 8 8
+ - image: solid-color(71, 32, 0, 255, 8, 8)
+ bounds: 568 256 8 8
+ - image: solid-color(72, 32, 0, 255, 8, 8)
+ bounds: 576 256 8 8
+ - image: solid-color(73, 32, 0, 255, 8, 8)
+ bounds: 584 256 8 8
+ - image: solid-color(74, 32, 0, 255, 8, 8)
+ bounds: 592 256 8 8
+ - image: solid-color(75, 32, 0, 255, 8, 8)
+ bounds: 600 256 8 8
+ - image: solid-color(76, 32, 0, 255, 8, 8)
+ bounds: 608 256 8 8
+ - image: solid-color(77, 32, 0, 255, 8, 8)
+ bounds: 616 256 8 8
+ - image: solid-color(78, 32, 0, 255, 8, 8)
+ bounds: 624 256 8 8
+ - image: solid-color(79, 32, 0, 255, 8, 8)
+ bounds: 632 256 8 8
+ - image: solid-color(80, 32, 0, 255, 8, 8)
+ bounds: 640 256 8 8
+ - image: solid-color(81, 32, 0, 255, 8, 8)
+ bounds: 648 256 8 8
+ - image: solid-color(82, 32, 0, 255, 8, 8)
+ bounds: 656 256 8 8
+ - image: solid-color(83, 32, 0, 255, 8, 8)
+ bounds: 664 256 8 8
+ - image: solid-color(84, 32, 0, 255, 8, 8)
+ bounds: 672 256 8 8
+ - image: solid-color(85, 32, 0, 255, 8, 8)
+ bounds: 680 256 8 8
+ - image: solid-color(86, 32, 0, 255, 8, 8)
+ bounds: 688 256 8 8
+ - image: solid-color(87, 32, 0, 255, 8, 8)
+ bounds: 696 256 8 8
+ - image: solid-color(88, 32, 0, 255, 8, 8)
+ bounds: 704 256 8 8
+ - image: solid-color(89, 32, 0, 255, 8, 8)
+ bounds: 712 256 8 8
+ - image: solid-color(90, 32, 0, 255, 8, 8)
+ bounds: 720 256 8 8
+ - image: solid-color(91, 32, 0, 255, 8, 8)
+ bounds: 728 256 8 8
+ - image: solid-color(92, 32, 0, 255, 8, 8)
+ bounds: 736 256 8 8
+ - image: solid-color(93, 32, 0, 255, 8, 8)
+ bounds: 744 256 8 8
+ - image: solid-color(94, 32, 0, 255, 8, 8)
+ bounds: 752 256 8 8
+ - image: solid-color(95, 32, 0, 255, 8, 8)
+ bounds: 760 256 8 8
+ - image: solid-color(96, 32, 0, 255, 8, 8)
+ bounds: 768 256 8 8
+ - image: solid-color(97, 32, 0, 255, 8, 8)
+ bounds: 776 256 8 8
+ - image: solid-color(98, 32, 0, 255, 8, 8)
+ bounds: 784 256 8 8
+ - image: solid-color(99, 32, 0, 255, 8, 8)
+ bounds: 792 256 8 8
+ - image: solid-color(100, 32, 0, 255, 8, 8)
+ bounds: 800 256 8 8
+ - image: solid-color(101, 32, 0, 255, 8, 8)
+ bounds: 808 256 8 8
+ - image: solid-color(102, 32, 0, 255, 8, 8)
+ bounds: 816 256 8 8
+ - image: solid-color(103, 32, 0, 255, 8, 8)
+ bounds: 824 256 8 8
+ - image: solid-color(104, 32, 0, 255, 8, 8)
+ bounds: 832 256 8 8
+ - image: solid-color(105, 32, 0, 255, 8, 8)
+ bounds: 840 256 8 8
+ - image: solid-color(106, 32, 0, 255, 8, 8)
+ bounds: 848 256 8 8
+ - image: solid-color(107, 32, 0, 255, 8, 8)
+ bounds: 856 256 8 8
+ - image: solid-color(108, 32, 0, 255, 8, 8)
+ bounds: 864 256 8 8
+ - image: solid-color(109, 32, 0, 255, 8, 8)
+ bounds: 872 256 8 8
+ - image: solid-color(110, 32, 0, 255, 8, 8)
+ bounds: 880 256 8 8
+ - image: solid-color(111, 32, 0, 255, 8, 8)
+ bounds: 888 256 8 8
+ - image: solid-color(112, 32, 0, 255, 8, 8)
+ bounds: 896 256 8 8
+ - image: solid-color(113, 32, 0, 255, 8, 8)
+ bounds: 904 256 8 8
+ - image: solid-color(114, 32, 0, 255, 8, 8)
+ bounds: 912 256 8 8
+ - image: solid-color(115, 32, 0, 255, 8, 8)
+ bounds: 920 256 8 8
+ - image: solid-color(116, 32, 0, 255, 8, 8)
+ bounds: 928 256 8 8
+ - image: solid-color(117, 32, 0, 255, 8, 8)
+ bounds: 936 256 8 8
+ - image: solid-color(118, 32, 0, 255, 8, 8)
+ bounds: 944 256 8 8
+ - image: solid-color(119, 32, 0, 255, 8, 8)
+ bounds: 952 256 8 8
+ - image: solid-color(120, 32, 0, 255, 8, 8)
+ bounds: 960 256 8 8
+ - image: solid-color(121, 32, 0, 255, 8, 8)
+ bounds: 968 256 8 8
+ - image: solid-color(122, 32, 0, 255, 8, 8)
+ bounds: 976 256 8 8
+ - image: solid-color(123, 32, 0, 255, 8, 8)
+ bounds: 984 256 8 8
+ - image: solid-color(124, 32, 0, 255, 8, 8)
+ bounds: 992 256 8 8
+ - image: solid-color(125, 32, 0, 255, 8, 8)
+ bounds: 1000 256 8 8
+ - image: solid-color(126, 32, 0, 255, 8, 8)
+ bounds: 1008 256 8 8
+ - image: solid-color(127, 32, 0, 255, 8, 8)
+ bounds: 1016 256 8 8
+ - image: solid-color(0, 33, 0, 255, 8, 8)
+ bounds: 0 264 8 8
+ - image: solid-color(1, 33, 0, 255, 8, 8)
+ bounds: 8 264 8 8
+ - image: solid-color(2, 33, 0, 255, 8, 8)
+ bounds: 16 264 8 8
+ - image: solid-color(3, 33, 0, 255, 8, 8)
+ bounds: 24 264 8 8
+ - image: solid-color(4, 33, 0, 255, 8, 8)
+ bounds: 32 264 8 8
+ - image: solid-color(5, 33, 0, 255, 8, 8)
+ bounds: 40 264 8 8
+ - image: solid-color(6, 33, 0, 255, 8, 8)
+ bounds: 48 264 8 8
+ - image: solid-color(7, 33, 0, 255, 8, 8)
+ bounds: 56 264 8 8
+ - image: solid-color(8, 33, 0, 255, 8, 8)
+ bounds: 64 264 8 8
+ - image: solid-color(9, 33, 0, 255, 8, 8)
+ bounds: 72 264 8 8
+ - image: solid-color(10, 33, 0, 255, 8, 8)
+ bounds: 80 264 8 8
+ - image: solid-color(11, 33, 0, 255, 8, 8)
+ bounds: 88 264 8 8
+ - image: solid-color(12, 33, 0, 255, 8, 8)
+ bounds: 96 264 8 8
+ - image: solid-color(13, 33, 0, 255, 8, 8)
+ bounds: 104 264 8 8
+ - image: solid-color(14, 33, 0, 255, 8, 8)
+ bounds: 112 264 8 8
+ - image: solid-color(15, 33, 0, 255, 8, 8)
+ bounds: 120 264 8 8
+ - image: solid-color(16, 33, 0, 255, 8, 8)
+ bounds: 128 264 8 8
+ - image: solid-color(17, 33, 0, 255, 8, 8)
+ bounds: 136 264 8 8
+ - image: solid-color(18, 33, 0, 255, 8, 8)
+ bounds: 144 264 8 8
+ - image: solid-color(19, 33, 0, 255, 8, 8)
+ bounds: 152 264 8 8
+ - image: solid-color(20, 33, 0, 255, 8, 8)
+ bounds: 160 264 8 8
+ - image: solid-color(21, 33, 0, 255, 8, 8)
+ bounds: 168 264 8 8
+ - image: solid-color(22, 33, 0, 255, 8, 8)
+ bounds: 176 264 8 8
+ - image: solid-color(23, 33, 0, 255, 8, 8)
+ bounds: 184 264 8 8
+ - image: solid-color(24, 33, 0, 255, 8, 8)
+ bounds: 192 264 8 8
+ - image: solid-color(25, 33, 0, 255, 8, 8)
+ bounds: 200 264 8 8
+ - image: solid-color(26, 33, 0, 255, 8, 8)
+ bounds: 208 264 8 8
+ - image: solid-color(27, 33, 0, 255, 8, 8)
+ bounds: 216 264 8 8
+ - image: solid-color(28, 33, 0, 255, 8, 8)
+ bounds: 224 264 8 8
+ - image: solid-color(29, 33, 0, 255, 8, 8)
+ bounds: 232 264 8 8
+ - image: solid-color(30, 33, 0, 255, 8, 8)
+ bounds: 240 264 8 8
+ - image: solid-color(31, 33, 0, 255, 8, 8)
+ bounds: 248 264 8 8
+ - image: solid-color(32, 33, 0, 255, 8, 8)
+ bounds: 256 264 8 8
+ - image: solid-color(33, 33, 0, 255, 8, 8)
+ bounds: 264 264 8 8
+ - image: solid-color(34, 33, 0, 255, 8, 8)
+ bounds: 272 264 8 8
+ - image: solid-color(35, 33, 0, 255, 8, 8)
+ bounds: 280 264 8 8
+ - image: solid-color(36, 33, 0, 255, 8, 8)
+ bounds: 288 264 8 8
+ - image: solid-color(37, 33, 0, 255, 8, 8)
+ bounds: 296 264 8 8
+ - image: solid-color(38, 33, 0, 255, 8, 8)
+ bounds: 304 264 8 8
+ - image: solid-color(39, 33, 0, 255, 8, 8)
+ bounds: 312 264 8 8
+ - image: solid-color(40, 33, 0, 255, 8, 8)
+ bounds: 320 264 8 8
+ - image: solid-color(41, 33, 0, 255, 8, 8)
+ bounds: 328 264 8 8
+ - image: solid-color(42, 33, 0, 255, 8, 8)
+ bounds: 336 264 8 8
+ - image: solid-color(43, 33, 0, 255, 8, 8)
+ bounds: 344 264 8 8
+ - image: solid-color(44, 33, 0, 255, 8, 8)
+ bounds: 352 264 8 8
+ - image: solid-color(45, 33, 0, 255, 8, 8)
+ bounds: 360 264 8 8
+ - image: solid-color(46, 33, 0, 255, 8, 8)
+ bounds: 368 264 8 8
+ - image: solid-color(47, 33, 0, 255, 8, 8)
+ bounds: 376 264 8 8
+ - image: solid-color(48, 33, 0, 255, 8, 8)
+ bounds: 384 264 8 8
+ - image: solid-color(49, 33, 0, 255, 8, 8)
+ bounds: 392 264 8 8
+ - image: solid-color(50, 33, 0, 255, 8, 8)
+ bounds: 400 264 8 8
+ - image: solid-color(51, 33, 0, 255, 8, 8)
+ bounds: 408 264 8 8
+ - image: solid-color(52, 33, 0, 255, 8, 8)
+ bounds: 416 264 8 8
+ - image: solid-color(53, 33, 0, 255, 8, 8)
+ bounds: 424 264 8 8
+ - image: solid-color(54, 33, 0, 255, 8, 8)
+ bounds: 432 264 8 8
+ - image: solid-color(55, 33, 0, 255, 8, 8)
+ bounds: 440 264 8 8
+ - image: solid-color(56, 33, 0, 255, 8, 8)
+ bounds: 448 264 8 8
+ - image: solid-color(57, 33, 0, 255, 8, 8)
+ bounds: 456 264 8 8
+ - image: solid-color(58, 33, 0, 255, 8, 8)
+ bounds: 464 264 8 8
+ - image: solid-color(59, 33, 0, 255, 8, 8)
+ bounds: 472 264 8 8
+ - image: solid-color(60, 33, 0, 255, 8, 8)
+ bounds: 480 264 8 8
+ - image: solid-color(61, 33, 0, 255, 8, 8)
+ bounds: 488 264 8 8
+ - image: solid-color(62, 33, 0, 255, 8, 8)
+ bounds: 496 264 8 8
+ - image: solid-color(63, 33, 0, 255, 8, 8)
+ bounds: 504 264 8 8
+ - image: solid-color(64, 33, 0, 255, 8, 8)
+ bounds: 512 264 8 8
+ - image: solid-color(65, 33, 0, 255, 8, 8)
+ bounds: 520 264 8 8
+ - image: solid-color(66, 33, 0, 255, 8, 8)
+ bounds: 528 264 8 8
+ - image: solid-color(67, 33, 0, 255, 8, 8)
+ bounds: 536 264 8 8
+ - image: solid-color(68, 33, 0, 255, 8, 8)
+ bounds: 544 264 8 8
+ - image: solid-color(69, 33, 0, 255, 8, 8)
+ bounds: 552 264 8 8
+ - image: solid-color(70, 33, 0, 255, 8, 8)
+ bounds: 560 264 8 8
+ - image: solid-color(71, 33, 0, 255, 8, 8)
+ bounds: 568 264 8 8
+ - image: solid-color(72, 33, 0, 255, 8, 8)
+ bounds: 576 264 8 8
+ - image: solid-color(73, 33, 0, 255, 8, 8)
+ bounds: 584 264 8 8
+ - image: solid-color(74, 33, 0, 255, 8, 8)
+ bounds: 592 264 8 8
+ - image: solid-color(75, 33, 0, 255, 8, 8)
+ bounds: 600 264 8 8
+ - image: solid-color(76, 33, 0, 255, 8, 8)
+ bounds: 608 264 8 8
+ - image: solid-color(77, 33, 0, 255, 8, 8)
+ bounds: 616 264 8 8
+ - image: solid-color(78, 33, 0, 255, 8, 8)
+ bounds: 624 264 8 8
+ - image: solid-color(79, 33, 0, 255, 8, 8)
+ bounds: 632 264 8 8
+ - image: solid-color(80, 33, 0, 255, 8, 8)
+ bounds: 640 264 8 8
+ - image: solid-color(81, 33, 0, 255, 8, 8)
+ bounds: 648 264 8 8
+ - image: solid-color(82, 33, 0, 255, 8, 8)
+ bounds: 656 264 8 8
+ - image: solid-color(83, 33, 0, 255, 8, 8)
+ bounds: 664 264 8 8
+ - image: solid-color(84, 33, 0, 255, 8, 8)
+ bounds: 672 264 8 8
+ - image: solid-color(85, 33, 0, 255, 8, 8)
+ bounds: 680 264 8 8
+ - image: solid-color(86, 33, 0, 255, 8, 8)
+ bounds: 688 264 8 8
+ - image: solid-color(87, 33, 0, 255, 8, 8)
+ bounds: 696 264 8 8
+ - image: solid-color(88, 33, 0, 255, 8, 8)
+ bounds: 704 264 8 8
+ - image: solid-color(89, 33, 0, 255, 8, 8)
+ bounds: 712 264 8 8
+ - image: solid-color(90, 33, 0, 255, 8, 8)
+ bounds: 720 264 8 8
+ - image: solid-color(91, 33, 0, 255, 8, 8)
+ bounds: 728 264 8 8
+ - image: solid-color(92, 33, 0, 255, 8, 8)
+ bounds: 736 264 8 8
+ - image: solid-color(93, 33, 0, 255, 8, 8)
+ bounds: 744 264 8 8
+ - image: solid-color(94, 33, 0, 255, 8, 8)
+ bounds: 752 264 8 8
+ - image: solid-color(95, 33, 0, 255, 8, 8)
+ bounds: 760 264 8 8
+ - image: solid-color(96, 33, 0, 255, 8, 8)
+ bounds: 768 264 8 8
+ - image: solid-color(97, 33, 0, 255, 8, 8)
+ bounds: 776 264 8 8
+ - image: solid-color(98, 33, 0, 255, 8, 8)
+ bounds: 784 264 8 8
+ - image: solid-color(99, 33, 0, 255, 8, 8)
+ bounds: 792 264 8 8
+ - image: solid-color(100, 33, 0, 255, 8, 8)
+ bounds: 800 264 8 8
+ - image: solid-color(101, 33, 0, 255, 8, 8)
+ bounds: 808 264 8 8
+ - image: solid-color(102, 33, 0, 255, 8, 8)
+ bounds: 816 264 8 8
+ - image: solid-color(103, 33, 0, 255, 8, 8)
+ bounds: 824 264 8 8
+ - image: solid-color(104, 33, 0, 255, 8, 8)
+ bounds: 832 264 8 8
+ - image: solid-color(105, 33, 0, 255, 8, 8)
+ bounds: 840 264 8 8
+ - image: solid-color(106, 33, 0, 255, 8, 8)
+ bounds: 848 264 8 8
+ - image: solid-color(107, 33, 0, 255, 8, 8)
+ bounds: 856 264 8 8
+ - image: solid-color(108, 33, 0, 255, 8, 8)
+ bounds: 864 264 8 8
+ - image: solid-color(109, 33, 0, 255, 8, 8)
+ bounds: 872 264 8 8
+ - image: solid-color(110, 33, 0, 255, 8, 8)
+ bounds: 880 264 8 8
+ - image: solid-color(111, 33, 0, 255, 8, 8)
+ bounds: 888 264 8 8
+ - image: solid-color(112, 33, 0, 255, 8, 8)
+ bounds: 896 264 8 8
+ - image: solid-color(113, 33, 0, 255, 8, 8)
+ bounds: 904 264 8 8
+ - image: solid-color(114, 33, 0, 255, 8, 8)
+ bounds: 912 264 8 8
+ - image: solid-color(115, 33, 0, 255, 8, 8)
+ bounds: 920 264 8 8
+ - image: solid-color(116, 33, 0, 255, 8, 8)
+ bounds: 928 264 8 8
+ - image: solid-color(117, 33, 0, 255, 8, 8)
+ bounds: 936 264 8 8
+ - image: solid-color(118, 33, 0, 255, 8, 8)
+ bounds: 944 264 8 8
+ - image: solid-color(119, 33, 0, 255, 8, 8)
+ bounds: 952 264 8 8
+ - image: solid-color(120, 33, 0, 255, 8, 8)
+ bounds: 960 264 8 8
+ - image: solid-color(121, 33, 0, 255, 8, 8)
+ bounds: 968 264 8 8
+ - image: solid-color(122, 33, 0, 255, 8, 8)
+ bounds: 976 264 8 8
+ - image: solid-color(123, 33, 0, 255, 8, 8)
+ bounds: 984 264 8 8
+ - image: solid-color(124, 33, 0, 255, 8, 8)
+ bounds: 992 264 8 8
+ - image: solid-color(125, 33, 0, 255, 8, 8)
+ bounds: 1000 264 8 8
+ - image: solid-color(126, 33, 0, 255, 8, 8)
+ bounds: 1008 264 8 8
+ - image: solid-color(127, 33, 0, 255, 8, 8)
+ bounds: 1016 264 8 8
+ - image: solid-color(0, 34, 0, 255, 8, 8)
+ bounds: 0 272 8 8
+ - image: solid-color(1, 34, 0, 255, 8, 8)
+ bounds: 8 272 8 8
+ - image: solid-color(2, 34, 0, 255, 8, 8)
+ bounds: 16 272 8 8
+ - image: solid-color(3, 34, 0, 255, 8, 8)
+ bounds: 24 272 8 8
+ - image: solid-color(4, 34, 0, 255, 8, 8)
+ bounds: 32 272 8 8
+ - image: solid-color(5, 34, 0, 255, 8, 8)
+ bounds: 40 272 8 8
+ - image: solid-color(6, 34, 0, 255, 8, 8)
+ bounds: 48 272 8 8
+ - image: solid-color(7, 34, 0, 255, 8, 8)
+ bounds: 56 272 8 8
+ - image: solid-color(8, 34, 0, 255, 8, 8)
+ bounds: 64 272 8 8
+ - image: solid-color(9, 34, 0, 255, 8, 8)
+ bounds: 72 272 8 8
+ - image: solid-color(10, 34, 0, 255, 8, 8)
+ bounds: 80 272 8 8
+ - image: solid-color(11, 34, 0, 255, 8, 8)
+ bounds: 88 272 8 8
+ - image: solid-color(12, 34, 0, 255, 8, 8)
+ bounds: 96 272 8 8
+ - image: solid-color(13, 34, 0, 255, 8, 8)
+ bounds: 104 272 8 8
+ - image: solid-color(14, 34, 0, 255, 8, 8)
+ bounds: 112 272 8 8
+ - image: solid-color(15, 34, 0, 255, 8, 8)
+ bounds: 120 272 8 8
+ - image: solid-color(16, 34, 0, 255, 8, 8)
+ bounds: 128 272 8 8
+ - image: solid-color(17, 34, 0, 255, 8, 8)
+ bounds: 136 272 8 8
+ - image: solid-color(18, 34, 0, 255, 8, 8)
+ bounds: 144 272 8 8
+ - image: solid-color(19, 34, 0, 255, 8, 8)
+ bounds: 152 272 8 8
+ - image: solid-color(20, 34, 0, 255, 8, 8)
+ bounds: 160 272 8 8
+ - image: solid-color(21, 34, 0, 255, 8, 8)
+ bounds: 168 272 8 8
+ - image: solid-color(22, 34, 0, 255, 8, 8)
+ bounds: 176 272 8 8
+ - image: solid-color(23, 34, 0, 255, 8, 8)
+ bounds: 184 272 8 8
+ - image: solid-color(24, 34, 0, 255, 8, 8)
+ bounds: 192 272 8 8
+ - image: solid-color(25, 34, 0, 255, 8, 8)
+ bounds: 200 272 8 8
+ - image: solid-color(26, 34, 0, 255, 8, 8)
+ bounds: 208 272 8 8
+ - image: solid-color(27, 34, 0, 255, 8, 8)
+ bounds: 216 272 8 8
+ - image: solid-color(28, 34, 0, 255, 8, 8)
+ bounds: 224 272 8 8
+ - image: solid-color(29, 34, 0, 255, 8, 8)
+ bounds: 232 272 8 8
+ - image: solid-color(30, 34, 0, 255, 8, 8)
+ bounds: 240 272 8 8
+ - image: solid-color(31, 34, 0, 255, 8, 8)
+ bounds: 248 272 8 8
+ - image: solid-color(32, 34, 0, 255, 8, 8)
+ bounds: 256 272 8 8
+ - image: solid-color(33, 34, 0, 255, 8, 8)
+ bounds: 264 272 8 8
+ - image: solid-color(34, 34, 0, 255, 8, 8)
+ bounds: 272 272 8 8
+ - image: solid-color(35, 34, 0, 255, 8, 8)
+ bounds: 280 272 8 8
+ - image: solid-color(36, 34, 0, 255, 8, 8)
+ bounds: 288 272 8 8
+ - image: solid-color(37, 34, 0, 255, 8, 8)
+ bounds: 296 272 8 8
+ - image: solid-color(38, 34, 0, 255, 8, 8)
+ bounds: 304 272 8 8
+ - image: solid-color(39, 34, 0, 255, 8, 8)
+ bounds: 312 272 8 8
+ - image: solid-color(40, 34, 0, 255, 8, 8)
+ bounds: 320 272 8 8
+ - image: solid-color(41, 34, 0, 255, 8, 8)
+ bounds: 328 272 8 8
+ - image: solid-color(42, 34, 0, 255, 8, 8)
+ bounds: 336 272 8 8
+ - image: solid-color(43, 34, 0, 255, 8, 8)
+ bounds: 344 272 8 8
+ - image: solid-color(44, 34, 0, 255, 8, 8)
+ bounds: 352 272 8 8
+ - image: solid-color(45, 34, 0, 255, 8, 8)
+ bounds: 360 272 8 8
+ - image: solid-color(46, 34, 0, 255, 8, 8)
+ bounds: 368 272 8 8
+ - image: solid-color(47, 34, 0, 255, 8, 8)
+ bounds: 376 272 8 8
+ - image: solid-color(48, 34, 0, 255, 8, 8)
+ bounds: 384 272 8 8
+ - image: solid-color(49, 34, 0, 255, 8, 8)
+ bounds: 392 272 8 8
+ - image: solid-color(50, 34, 0, 255, 8, 8)
+ bounds: 400 272 8 8
+ - image: solid-color(51, 34, 0, 255, 8, 8)
+ bounds: 408 272 8 8
+ - image: solid-color(52, 34, 0, 255, 8, 8)
+ bounds: 416 272 8 8
+ - image: solid-color(53, 34, 0, 255, 8, 8)
+ bounds: 424 272 8 8
+ - image: solid-color(54, 34, 0, 255, 8, 8)
+ bounds: 432 272 8 8
+ - image: solid-color(55, 34, 0, 255, 8, 8)
+ bounds: 440 272 8 8
+ - image: solid-color(56, 34, 0, 255, 8, 8)
+ bounds: 448 272 8 8
+ - image: solid-color(57, 34, 0, 255, 8, 8)
+ bounds: 456 272 8 8
+ - image: solid-color(58, 34, 0, 255, 8, 8)
+ bounds: 464 272 8 8
+ - image: solid-color(59, 34, 0, 255, 8, 8)
+ bounds: 472 272 8 8
+ - image: solid-color(60, 34, 0, 255, 8, 8)
+ bounds: 480 272 8 8
+ - image: solid-color(61, 34, 0, 255, 8, 8)
+ bounds: 488 272 8 8
+ - image: solid-color(62, 34, 0, 255, 8, 8)
+ bounds: 496 272 8 8
+ - image: solid-color(63, 34, 0, 255, 8, 8)
+ bounds: 504 272 8 8
+ - image: solid-color(64, 34, 0, 255, 8, 8)
+ bounds: 512 272 8 8
+ - image: solid-color(65, 34, 0, 255, 8, 8)
+ bounds: 520 272 8 8
+ - image: solid-color(66, 34, 0, 255, 8, 8)
+ bounds: 528 272 8 8
+ - image: solid-color(67, 34, 0, 255, 8, 8)
+ bounds: 536 272 8 8
+ - image: solid-color(68, 34, 0, 255, 8, 8)
+ bounds: 544 272 8 8
+ - image: solid-color(69, 34, 0, 255, 8, 8)
+ bounds: 552 272 8 8
+ - image: solid-color(70, 34, 0, 255, 8, 8)
+ bounds: 560 272 8 8
+ - image: solid-color(71, 34, 0, 255, 8, 8)
+ bounds: 568 272 8 8
+ - image: solid-color(72, 34, 0, 255, 8, 8)
+ bounds: 576 272 8 8
+ - image: solid-color(73, 34, 0, 255, 8, 8)
+ bounds: 584 272 8 8
+ - image: solid-color(74, 34, 0, 255, 8, 8)
+ bounds: 592 272 8 8
+ - image: solid-color(75, 34, 0, 255, 8, 8)
+ bounds: 600 272 8 8
+ - image: solid-color(76, 34, 0, 255, 8, 8)
+ bounds: 608 272 8 8
+ - image: solid-color(77, 34, 0, 255, 8, 8)
+ bounds: 616 272 8 8
+ - image: solid-color(78, 34, 0, 255, 8, 8)
+ bounds: 624 272 8 8
+ - image: solid-color(79, 34, 0, 255, 8, 8)
+ bounds: 632 272 8 8
+ - image: solid-color(80, 34, 0, 255, 8, 8)
+ bounds: 640 272 8 8
+ - image: solid-color(81, 34, 0, 255, 8, 8)
+ bounds: 648 272 8 8
+ - image: solid-color(82, 34, 0, 255, 8, 8)
+ bounds: 656 272 8 8
+ - image: solid-color(83, 34, 0, 255, 8, 8)
+ bounds: 664 272 8 8
+ - image: solid-color(84, 34, 0, 255, 8, 8)
+ bounds: 672 272 8 8
+ - image: solid-color(85, 34, 0, 255, 8, 8)
+ bounds: 680 272 8 8
+ - image: solid-color(86, 34, 0, 255, 8, 8)
+ bounds: 688 272 8 8
+ - image: solid-color(87, 34, 0, 255, 8, 8)
+ bounds: 696 272 8 8
+ - image: solid-color(88, 34, 0, 255, 8, 8)
+ bounds: 704 272 8 8
+ - image: solid-color(89, 34, 0, 255, 8, 8)
+ bounds: 712 272 8 8
+ - image: solid-color(90, 34, 0, 255, 8, 8)
+ bounds: 720 272 8 8
+ - image: solid-color(91, 34, 0, 255, 8, 8)
+ bounds: 728 272 8 8
+ - image: solid-color(92, 34, 0, 255, 8, 8)
+ bounds: 736 272 8 8
+ - image: solid-color(93, 34, 0, 255, 8, 8)
+ bounds: 744 272 8 8
+ - image: solid-color(94, 34, 0, 255, 8, 8)
+ bounds: 752 272 8 8
+ - image: solid-color(95, 34, 0, 255, 8, 8)
+ bounds: 760 272 8 8
+ - image: solid-color(96, 34, 0, 255, 8, 8)
+ bounds: 768 272 8 8
+ - image: solid-color(97, 34, 0, 255, 8, 8)
+ bounds: 776 272 8 8
+ - image: solid-color(98, 34, 0, 255, 8, 8)
+ bounds: 784 272 8 8
+ - image: solid-color(99, 34, 0, 255, 8, 8)
+ bounds: 792 272 8 8
+ - image: solid-color(100, 34, 0, 255, 8, 8)
+ bounds: 800 272 8 8
+ - image: solid-color(101, 34, 0, 255, 8, 8)
+ bounds: 808 272 8 8
+ - image: solid-color(102, 34, 0, 255, 8, 8)
+ bounds: 816 272 8 8
+ - image: solid-color(103, 34, 0, 255, 8, 8)
+ bounds: 824 272 8 8
+ - image: solid-color(104, 34, 0, 255, 8, 8)
+ bounds: 832 272 8 8
+ - image: solid-color(105, 34, 0, 255, 8, 8)
+ bounds: 840 272 8 8
+ - image: solid-color(106, 34, 0, 255, 8, 8)
+ bounds: 848 272 8 8
+ - image: solid-color(107, 34, 0, 255, 8, 8)
+ bounds: 856 272 8 8
+ - image: solid-color(108, 34, 0, 255, 8, 8)
+ bounds: 864 272 8 8
+ - image: solid-color(109, 34, 0, 255, 8, 8)
+ bounds: 872 272 8 8
+ - image: solid-color(110, 34, 0, 255, 8, 8)
+ bounds: 880 272 8 8
+ - image: solid-color(111, 34, 0, 255, 8, 8)
+ bounds: 888 272 8 8
+ - image: solid-color(112, 34, 0, 255, 8, 8)
+ bounds: 896 272 8 8
+ - image: solid-color(113, 34, 0, 255, 8, 8)
+ bounds: 904 272 8 8
+ - image: solid-color(114, 34, 0, 255, 8, 8)
+ bounds: 912 272 8 8
+ - image: solid-color(115, 34, 0, 255, 8, 8)
+ bounds: 920 272 8 8
+ - image: solid-color(116, 34, 0, 255, 8, 8)
+ bounds: 928 272 8 8
+ - image: solid-color(117, 34, 0, 255, 8, 8)
+ bounds: 936 272 8 8
+ - image: solid-color(118, 34, 0, 255, 8, 8)
+ bounds: 944 272 8 8
+ - image: solid-color(119, 34, 0, 255, 8, 8)
+ bounds: 952 272 8 8
+ - image: solid-color(120, 34, 0, 255, 8, 8)
+ bounds: 960 272 8 8
+ - image: solid-color(121, 34, 0, 255, 8, 8)
+ bounds: 968 272 8 8
+ - image: solid-color(122, 34, 0, 255, 8, 8)
+ bounds: 976 272 8 8
+ - image: solid-color(123, 34, 0, 255, 8, 8)
+ bounds: 984 272 8 8
+ - image: solid-color(124, 34, 0, 255, 8, 8)
+ bounds: 992 272 8 8
+ - image: solid-color(125, 34, 0, 255, 8, 8)
+ bounds: 1000 272 8 8
+ - image: solid-color(126, 34, 0, 255, 8, 8)
+ bounds: 1008 272 8 8
+ - image: solid-color(127, 34, 0, 255, 8, 8)
+ bounds: 1016 272 8 8
+ - image: solid-color(0, 35, 0, 255, 8, 8)
+ bounds: 0 280 8 8
+ - image: solid-color(1, 35, 0, 255, 8, 8)
+ bounds: 8 280 8 8
+ - image: solid-color(2, 35, 0, 255, 8, 8)
+ bounds: 16 280 8 8
+ - image: solid-color(3, 35, 0, 255, 8, 8)
+ bounds: 24 280 8 8
+ - image: solid-color(4, 35, 0, 255, 8, 8)
+ bounds: 32 280 8 8
+ - image: solid-color(5, 35, 0, 255, 8, 8)
+ bounds: 40 280 8 8
+ - image: solid-color(6, 35, 0, 255, 8, 8)
+ bounds: 48 280 8 8
+ - image: solid-color(7, 35, 0, 255, 8, 8)
+ bounds: 56 280 8 8
+ - image: solid-color(8, 35, 0, 255, 8, 8)
+ bounds: 64 280 8 8
+ - image: solid-color(9, 35, 0, 255, 8, 8)
+ bounds: 72 280 8 8
+ - image: solid-color(10, 35, 0, 255, 8, 8)
+ bounds: 80 280 8 8
+ - image: solid-color(11, 35, 0, 255, 8, 8)
+ bounds: 88 280 8 8
+ - image: solid-color(12, 35, 0, 255, 8, 8)
+ bounds: 96 280 8 8
+ - image: solid-color(13, 35, 0, 255, 8, 8)
+ bounds: 104 280 8 8
+ - image: solid-color(14, 35, 0, 255, 8, 8)
+ bounds: 112 280 8 8
+ - image: solid-color(15, 35, 0, 255, 8, 8)
+ bounds: 120 280 8 8
+ - image: solid-color(16, 35, 0, 255, 8, 8)
+ bounds: 128 280 8 8
+ - image: solid-color(17, 35, 0, 255, 8, 8)
+ bounds: 136 280 8 8
+ - image: solid-color(18, 35, 0, 255, 8, 8)
+ bounds: 144 280 8 8
+ - image: solid-color(19, 35, 0, 255, 8, 8)
+ bounds: 152 280 8 8
+ - image: solid-color(20, 35, 0, 255, 8, 8)
+ bounds: 160 280 8 8
+ - image: solid-color(21, 35, 0, 255, 8, 8)
+ bounds: 168 280 8 8
+ - image: solid-color(22, 35, 0, 255, 8, 8)
+ bounds: 176 280 8 8
+ - image: solid-color(23, 35, 0, 255, 8, 8)
+ bounds: 184 280 8 8
+ - image: solid-color(24, 35, 0, 255, 8, 8)
+ bounds: 192 280 8 8
+ - image: solid-color(25, 35, 0, 255, 8, 8)
+ bounds: 200 280 8 8
+ - image: solid-color(26, 35, 0, 255, 8, 8)
+ bounds: 208 280 8 8
+ - image: solid-color(27, 35, 0, 255, 8, 8)
+ bounds: 216 280 8 8
+ - image: solid-color(28, 35, 0, 255, 8, 8)
+ bounds: 224 280 8 8
+ - image: solid-color(29, 35, 0, 255, 8, 8)
+ bounds: 232 280 8 8
+ - image: solid-color(30, 35, 0, 255, 8, 8)
+ bounds: 240 280 8 8
+ - image: solid-color(31, 35, 0, 255, 8, 8)
+ bounds: 248 280 8 8
+ - image: solid-color(32, 35, 0, 255, 8, 8)
+ bounds: 256 280 8 8
+ - image: solid-color(33, 35, 0, 255, 8, 8)
+ bounds: 264 280 8 8
+ - image: solid-color(34, 35, 0, 255, 8, 8)
+ bounds: 272 280 8 8
+ - image: solid-color(35, 35, 0, 255, 8, 8)
+ bounds: 280 280 8 8
+ - image: solid-color(36, 35, 0, 255, 8, 8)
+ bounds: 288 280 8 8
+ - image: solid-color(37, 35, 0, 255, 8, 8)
+ bounds: 296 280 8 8
+ - image: solid-color(38, 35, 0, 255, 8, 8)
+ bounds: 304 280 8 8
+ - image: solid-color(39, 35, 0, 255, 8, 8)
+ bounds: 312 280 8 8
+ - image: solid-color(40, 35, 0, 255, 8, 8)
+ bounds: 320 280 8 8
+ - image: solid-color(41, 35, 0, 255, 8, 8)
+ bounds: 328 280 8 8
+ - image: solid-color(42, 35, 0, 255, 8, 8)
+ bounds: 336 280 8 8
+ - image: solid-color(43, 35, 0, 255, 8, 8)
+ bounds: 344 280 8 8
+ - image: solid-color(44, 35, 0, 255, 8, 8)
+ bounds: 352 280 8 8
+ - image: solid-color(45, 35, 0, 255, 8, 8)
+ bounds: 360 280 8 8
+ - image: solid-color(46, 35, 0, 255, 8, 8)
+ bounds: 368 280 8 8
+ - image: solid-color(47, 35, 0, 255, 8, 8)
+ bounds: 376 280 8 8
+ - image: solid-color(48, 35, 0, 255, 8, 8)
+ bounds: 384 280 8 8
+ - image: solid-color(49, 35, 0, 255, 8, 8)
+ bounds: 392 280 8 8
+ - image: solid-color(50, 35, 0, 255, 8, 8)
+ bounds: 400 280 8 8
+ - image: solid-color(51, 35, 0, 255, 8, 8)
+ bounds: 408 280 8 8
+ - image: solid-color(52, 35, 0, 255, 8, 8)
+ bounds: 416 280 8 8
+ - image: solid-color(53, 35, 0, 255, 8, 8)
+ bounds: 424 280 8 8
+ - image: solid-color(54, 35, 0, 255, 8, 8)
+ bounds: 432 280 8 8
+ - image: solid-color(55, 35, 0, 255, 8, 8)
+ bounds: 440 280 8 8
+ - image: solid-color(56, 35, 0, 255, 8, 8)
+ bounds: 448 280 8 8
+ - image: solid-color(57, 35, 0, 255, 8, 8)
+ bounds: 456 280 8 8
+ - image: solid-color(58, 35, 0, 255, 8, 8)
+ bounds: 464 280 8 8
+ - image: solid-color(59, 35, 0, 255, 8, 8)
+ bounds: 472 280 8 8
+ - image: solid-color(60, 35, 0, 255, 8, 8)
+ bounds: 480 280 8 8
+ - image: solid-color(61, 35, 0, 255, 8, 8)
+ bounds: 488 280 8 8
+ - image: solid-color(62, 35, 0, 255, 8, 8)
+ bounds: 496 280 8 8
+ - image: solid-color(63, 35, 0, 255, 8, 8)
+ bounds: 504 280 8 8
+ - image: solid-color(64, 35, 0, 255, 8, 8)
+ bounds: 512 280 8 8
+ - image: solid-color(65, 35, 0, 255, 8, 8)
+ bounds: 520 280 8 8
+ - image: solid-color(66, 35, 0, 255, 8, 8)
+ bounds: 528 280 8 8
+ - image: solid-color(67, 35, 0, 255, 8, 8)
+ bounds: 536 280 8 8
+ - image: solid-color(68, 35, 0, 255, 8, 8)
+ bounds: 544 280 8 8
+ - image: solid-color(69, 35, 0, 255, 8, 8)
+ bounds: 552 280 8 8
+ - image: solid-color(70, 35, 0, 255, 8, 8)
+ bounds: 560 280 8 8
+ - image: solid-color(71, 35, 0, 255, 8, 8)
+ bounds: 568 280 8 8
+ - image: solid-color(72, 35, 0, 255, 8, 8)
+ bounds: 576 280 8 8
+ - image: solid-color(73, 35, 0, 255, 8, 8)
+ bounds: 584 280 8 8
+ - image: solid-color(74, 35, 0, 255, 8, 8)
+ bounds: 592 280 8 8
+ - image: solid-color(75, 35, 0, 255, 8, 8)
+ bounds: 600 280 8 8
+ - image: solid-color(76, 35, 0, 255, 8, 8)
+ bounds: 608 280 8 8
+ - image: solid-color(77, 35, 0, 255, 8, 8)
+ bounds: 616 280 8 8
+ - image: solid-color(78, 35, 0, 255, 8, 8)
+ bounds: 624 280 8 8
+ - image: solid-color(79, 35, 0, 255, 8, 8)
+ bounds: 632 280 8 8
+ - image: solid-color(80, 35, 0, 255, 8, 8)
+ bounds: 640 280 8 8
+ - image: solid-color(81, 35, 0, 255, 8, 8)
+ bounds: 648 280 8 8
+ - image: solid-color(82, 35, 0, 255, 8, 8)
+ bounds: 656 280 8 8
+ - image: solid-color(83, 35, 0, 255, 8, 8)
+ bounds: 664 280 8 8
+ - image: solid-color(84, 35, 0, 255, 8, 8)
+ bounds: 672 280 8 8
+ - image: solid-color(85, 35, 0, 255, 8, 8)
+ bounds: 680 280 8 8
+ - image: solid-color(86, 35, 0, 255, 8, 8)
+ bounds: 688 280 8 8
+ - image: solid-color(87, 35, 0, 255, 8, 8)
+ bounds: 696 280 8 8
+ - image: solid-color(88, 35, 0, 255, 8, 8)
+ bounds: 704 280 8 8
+ - image: solid-color(89, 35, 0, 255, 8, 8)
+ bounds: 712 280 8 8
+ - image: solid-color(90, 35, 0, 255, 8, 8)
+ bounds: 720 280 8 8
+ - image: solid-color(91, 35, 0, 255, 8, 8)
+ bounds: 728 280 8 8
+ - image: solid-color(92, 35, 0, 255, 8, 8)
+ bounds: 736 280 8 8
+ - image: solid-color(93, 35, 0, 255, 8, 8)
+ bounds: 744 280 8 8
+ - image: solid-color(94, 35, 0, 255, 8, 8)
+ bounds: 752 280 8 8
+ - image: solid-color(95, 35, 0, 255, 8, 8)
+ bounds: 760 280 8 8
+ - image: solid-color(96, 35, 0, 255, 8, 8)
+ bounds: 768 280 8 8
+ - image: solid-color(97, 35, 0, 255, 8, 8)
+ bounds: 776 280 8 8
+ - image: solid-color(98, 35, 0, 255, 8, 8)
+ bounds: 784 280 8 8
+ - image: solid-color(99, 35, 0, 255, 8, 8)
+ bounds: 792 280 8 8
+ - image: solid-color(100, 35, 0, 255, 8, 8)
+ bounds: 800 280 8 8
+ - image: solid-color(101, 35, 0, 255, 8, 8)
+ bounds: 808 280 8 8
+ - image: solid-color(102, 35, 0, 255, 8, 8)
+ bounds: 816 280 8 8
+ - image: solid-color(103, 35, 0, 255, 8, 8)
+ bounds: 824 280 8 8
+ - image: solid-color(104, 35, 0, 255, 8, 8)
+ bounds: 832 280 8 8
+ - image: solid-color(105, 35, 0, 255, 8, 8)
+ bounds: 840 280 8 8
+ - image: solid-color(106, 35, 0, 255, 8, 8)
+ bounds: 848 280 8 8
+ - image: solid-color(107, 35, 0, 255, 8, 8)
+ bounds: 856 280 8 8
+ - image: solid-color(108, 35, 0, 255, 8, 8)
+ bounds: 864 280 8 8
+ - image: solid-color(109, 35, 0, 255, 8, 8)
+ bounds: 872 280 8 8
+ - image: solid-color(110, 35, 0, 255, 8, 8)
+ bounds: 880 280 8 8
+ - image: solid-color(111, 35, 0, 255, 8, 8)
+ bounds: 888 280 8 8
+ - image: solid-color(112, 35, 0, 255, 8, 8)
+ bounds: 896 280 8 8
+ - image: solid-color(113, 35, 0, 255, 8, 8)
+ bounds: 904 280 8 8
+ - image: solid-color(114, 35, 0, 255, 8, 8)
+ bounds: 912 280 8 8
+ - image: solid-color(115, 35, 0, 255, 8, 8)
+ bounds: 920 280 8 8
+ - image: solid-color(116, 35, 0, 255, 8, 8)
+ bounds: 928 280 8 8
+ - image: solid-color(117, 35, 0, 255, 8, 8)
+ bounds: 936 280 8 8
+ - image: solid-color(118, 35, 0, 255, 8, 8)
+ bounds: 944 280 8 8
+ - image: solid-color(119, 35, 0, 255, 8, 8)
+ bounds: 952 280 8 8
+ - image: solid-color(120, 35, 0, 255, 8, 8)
+ bounds: 960 280 8 8
+ - image: solid-color(121, 35, 0, 255, 8, 8)
+ bounds: 968 280 8 8
+ - image: solid-color(122, 35, 0, 255, 8, 8)
+ bounds: 976 280 8 8
+ - image: solid-color(123, 35, 0, 255, 8, 8)
+ bounds: 984 280 8 8
+ - image: solid-color(124, 35, 0, 255, 8, 8)
+ bounds: 992 280 8 8
+ - image: solid-color(125, 35, 0, 255, 8, 8)
+ bounds: 1000 280 8 8
+ - image: solid-color(126, 35, 0, 255, 8, 8)
+ bounds: 1008 280 8 8
+ - image: solid-color(127, 35, 0, 255, 8, 8)
+ bounds: 1016 280 8 8
+ - image: solid-color(0, 36, 0, 255, 8, 8)
+ bounds: 0 288 8 8
+ - image: solid-color(1, 36, 0, 255, 8, 8)
+ bounds: 8 288 8 8
+ - image: solid-color(2, 36, 0, 255, 8, 8)
+ bounds: 16 288 8 8
+ - image: solid-color(3, 36, 0, 255, 8, 8)
+ bounds: 24 288 8 8
+ - image: solid-color(4, 36, 0, 255, 8, 8)
+ bounds: 32 288 8 8
+ - image: solid-color(5, 36, 0, 255, 8, 8)
+ bounds: 40 288 8 8
+ - image: solid-color(6, 36, 0, 255, 8, 8)
+ bounds: 48 288 8 8
+ - image: solid-color(7, 36, 0, 255, 8, 8)
+ bounds: 56 288 8 8
+ - image: solid-color(8, 36, 0, 255, 8, 8)
+ bounds: 64 288 8 8
+ - image: solid-color(9, 36, 0, 255, 8, 8)
+ bounds: 72 288 8 8
+ - image: solid-color(10, 36, 0, 255, 8, 8)
+ bounds: 80 288 8 8
+ - image: solid-color(11, 36, 0, 255, 8, 8)
+ bounds: 88 288 8 8
+ - image: solid-color(12, 36, 0, 255, 8, 8)
+ bounds: 96 288 8 8
+ - image: solid-color(13, 36, 0, 255, 8, 8)
+ bounds: 104 288 8 8
+ - image: solid-color(14, 36, 0, 255, 8, 8)
+ bounds: 112 288 8 8
+ - image: solid-color(15, 36, 0, 255, 8, 8)
+ bounds: 120 288 8 8
+ - image: solid-color(16, 36, 0, 255, 8, 8)
+ bounds: 128 288 8 8
+ - image: solid-color(17, 36, 0, 255, 8, 8)
+ bounds: 136 288 8 8
+ - image: solid-color(18, 36, 0, 255, 8, 8)
+ bounds: 144 288 8 8
+ - image: solid-color(19, 36, 0, 255, 8, 8)
+ bounds: 152 288 8 8
+ - image: solid-color(20, 36, 0, 255, 8, 8)
+ bounds: 160 288 8 8
+ - image: solid-color(21, 36, 0, 255, 8, 8)
+ bounds: 168 288 8 8
+ - image: solid-color(22, 36, 0, 255, 8, 8)
+ bounds: 176 288 8 8
+ - image: solid-color(23, 36, 0, 255, 8, 8)
+ bounds: 184 288 8 8
+ - image: solid-color(24, 36, 0, 255, 8, 8)
+ bounds: 192 288 8 8
+ - image: solid-color(25, 36, 0, 255, 8, 8)
+ bounds: 200 288 8 8
+ - image: solid-color(26, 36, 0, 255, 8, 8)
+ bounds: 208 288 8 8
+ - image: solid-color(27, 36, 0, 255, 8, 8)
+ bounds: 216 288 8 8
+ - image: solid-color(28, 36, 0, 255, 8, 8)
+ bounds: 224 288 8 8
+ - image: solid-color(29, 36, 0, 255, 8, 8)
+ bounds: 232 288 8 8
+ - image: solid-color(30, 36, 0, 255, 8, 8)
+ bounds: 240 288 8 8
+ - image: solid-color(31, 36, 0, 255, 8, 8)
+ bounds: 248 288 8 8
+ - image: solid-color(32, 36, 0, 255, 8, 8)
+ bounds: 256 288 8 8
+ - image: solid-color(33, 36, 0, 255, 8, 8)
+ bounds: 264 288 8 8
+ - image: solid-color(34, 36, 0, 255, 8, 8)
+ bounds: 272 288 8 8
+ - image: solid-color(35, 36, 0, 255, 8, 8)
+ bounds: 280 288 8 8
+ - image: solid-color(36, 36, 0, 255, 8, 8)
+ bounds: 288 288 8 8
+ - image: solid-color(37, 36, 0, 255, 8, 8)
+ bounds: 296 288 8 8
+ - image: solid-color(38, 36, 0, 255, 8, 8)
+ bounds: 304 288 8 8
+ - image: solid-color(39, 36, 0, 255, 8, 8)
+ bounds: 312 288 8 8
+ - image: solid-color(40, 36, 0, 255, 8, 8)
+ bounds: 320 288 8 8
+ - image: solid-color(41, 36, 0, 255, 8, 8)
+ bounds: 328 288 8 8
+ - image: solid-color(42, 36, 0, 255, 8, 8)
+ bounds: 336 288 8 8
+ - image: solid-color(43, 36, 0, 255, 8, 8)
+ bounds: 344 288 8 8
+ - image: solid-color(44, 36, 0, 255, 8, 8)
+ bounds: 352 288 8 8
+ - image: solid-color(45, 36, 0, 255, 8, 8)
+ bounds: 360 288 8 8
+ - image: solid-color(46, 36, 0, 255, 8, 8)
+ bounds: 368 288 8 8
+ - image: solid-color(47, 36, 0, 255, 8, 8)
+ bounds: 376 288 8 8
+ - image: solid-color(48, 36, 0, 255, 8, 8)
+ bounds: 384 288 8 8
+ - image: solid-color(49, 36, 0, 255, 8, 8)
+ bounds: 392 288 8 8
+ - image: solid-color(50, 36, 0, 255, 8, 8)
+ bounds: 400 288 8 8
+ - image: solid-color(51, 36, 0, 255, 8, 8)
+ bounds: 408 288 8 8
+ - image: solid-color(52, 36, 0, 255, 8, 8)
+ bounds: 416 288 8 8
+ - image: solid-color(53, 36, 0, 255, 8, 8)
+ bounds: 424 288 8 8
+ - image: solid-color(54, 36, 0, 255, 8, 8)
+ bounds: 432 288 8 8
+ - image: solid-color(55, 36, 0, 255, 8, 8)
+ bounds: 440 288 8 8
+ - image: solid-color(56, 36, 0, 255, 8, 8)
+ bounds: 448 288 8 8
+ - image: solid-color(57, 36, 0, 255, 8, 8)
+ bounds: 456 288 8 8
+ - image: solid-color(58, 36, 0, 255, 8, 8)
+ bounds: 464 288 8 8
+ - image: solid-color(59, 36, 0, 255, 8, 8)
+ bounds: 472 288 8 8
+ - image: solid-color(60, 36, 0, 255, 8, 8)
+ bounds: 480 288 8 8
+ - image: solid-color(61, 36, 0, 255, 8, 8)
+ bounds: 488 288 8 8
+ - image: solid-color(62, 36, 0, 255, 8, 8)
+ bounds: 496 288 8 8
+ - image: solid-color(63, 36, 0, 255, 8, 8)
+ bounds: 504 288 8 8
+ - image: solid-color(64, 36, 0, 255, 8, 8)
+ bounds: 512 288 8 8
+ - image: solid-color(65, 36, 0, 255, 8, 8)
+ bounds: 520 288 8 8
+ - image: solid-color(66, 36, 0, 255, 8, 8)
+ bounds: 528 288 8 8
+ - image: solid-color(67, 36, 0, 255, 8, 8)
+ bounds: 536 288 8 8
+ - image: solid-color(68, 36, 0, 255, 8, 8)
+ bounds: 544 288 8 8
+ - image: solid-color(69, 36, 0, 255, 8, 8)
+ bounds: 552 288 8 8
+ - image: solid-color(70, 36, 0, 255, 8, 8)
+ bounds: 560 288 8 8
+ - image: solid-color(71, 36, 0, 255, 8, 8)
+ bounds: 568 288 8 8
+ - image: solid-color(72, 36, 0, 255, 8, 8)
+ bounds: 576 288 8 8
+ - image: solid-color(73, 36, 0, 255, 8, 8)
+ bounds: 584 288 8 8
+ - image: solid-color(74, 36, 0, 255, 8, 8)
+ bounds: 592 288 8 8
+ - image: solid-color(75, 36, 0, 255, 8, 8)
+ bounds: 600 288 8 8
+ - image: solid-color(76, 36, 0, 255, 8, 8)
+ bounds: 608 288 8 8
+ - image: solid-color(77, 36, 0, 255, 8, 8)
+ bounds: 616 288 8 8
+ - image: solid-color(78, 36, 0, 255, 8, 8)
+ bounds: 624 288 8 8
+ - image: solid-color(79, 36, 0, 255, 8, 8)
+ bounds: 632 288 8 8
+ - image: solid-color(80, 36, 0, 255, 8, 8)
+ bounds: 640 288 8 8
+ - image: solid-color(81, 36, 0, 255, 8, 8)
+ bounds: 648 288 8 8
+ - image: solid-color(82, 36, 0, 255, 8, 8)
+ bounds: 656 288 8 8
+ - image: solid-color(83, 36, 0, 255, 8, 8)
+ bounds: 664 288 8 8
+ - image: solid-color(84, 36, 0, 255, 8, 8)
+ bounds: 672 288 8 8
+ - image: solid-color(85, 36, 0, 255, 8, 8)
+ bounds: 680 288 8 8
+ - image: solid-color(86, 36, 0, 255, 8, 8)
+ bounds: 688 288 8 8
+ - image: solid-color(87, 36, 0, 255, 8, 8)
+ bounds: 696 288 8 8
+ - image: solid-color(88, 36, 0, 255, 8, 8)
+ bounds: 704 288 8 8
+ - image: solid-color(89, 36, 0, 255, 8, 8)
+ bounds: 712 288 8 8
+ - image: solid-color(90, 36, 0, 255, 8, 8)
+ bounds: 720 288 8 8
+ - image: solid-color(91, 36, 0, 255, 8, 8)
+ bounds: 728 288 8 8
+ - image: solid-color(92, 36, 0, 255, 8, 8)
+ bounds: 736 288 8 8
+ - image: solid-color(93, 36, 0, 255, 8, 8)
+ bounds: 744 288 8 8
+ - image: solid-color(94, 36, 0, 255, 8, 8)
+ bounds: 752 288 8 8
+ - image: solid-color(95, 36, 0, 255, 8, 8)
+ bounds: 760 288 8 8
+ - image: solid-color(96, 36, 0, 255, 8, 8)
+ bounds: 768 288 8 8
+ - image: solid-color(97, 36, 0, 255, 8, 8)
+ bounds: 776 288 8 8
+ - image: solid-color(98, 36, 0, 255, 8, 8)
+ bounds: 784 288 8 8
+ - image: solid-color(99, 36, 0, 255, 8, 8)
+ bounds: 792 288 8 8
+ - image: solid-color(100, 36, 0, 255, 8, 8)
+ bounds: 800 288 8 8
+ - image: solid-color(101, 36, 0, 255, 8, 8)
+ bounds: 808 288 8 8
+ - image: solid-color(102, 36, 0, 255, 8, 8)
+ bounds: 816 288 8 8
+ - image: solid-color(103, 36, 0, 255, 8, 8)
+ bounds: 824 288 8 8
+ - image: solid-color(104, 36, 0, 255, 8, 8)
+ bounds: 832 288 8 8
+ - image: solid-color(105, 36, 0, 255, 8, 8)
+ bounds: 840 288 8 8
+ - image: solid-color(106, 36, 0, 255, 8, 8)
+ bounds: 848 288 8 8
+ - image: solid-color(107, 36, 0, 255, 8, 8)
+ bounds: 856 288 8 8
+ - image: solid-color(108, 36, 0, 255, 8, 8)
+ bounds: 864 288 8 8
+ - image: solid-color(109, 36, 0, 255, 8, 8)
+ bounds: 872 288 8 8
+ - image: solid-color(110, 36, 0, 255, 8, 8)
+ bounds: 880 288 8 8
+ - image: solid-color(111, 36, 0, 255, 8, 8)
+ bounds: 888 288 8 8
+ - image: solid-color(112, 36, 0, 255, 8, 8)
+ bounds: 896 288 8 8
+ - image: solid-color(113, 36, 0, 255, 8, 8)
+ bounds: 904 288 8 8
+ - image: solid-color(114, 36, 0, 255, 8, 8)
+ bounds: 912 288 8 8
+ - image: solid-color(115, 36, 0, 255, 8, 8)
+ bounds: 920 288 8 8
+ - image: solid-color(116, 36, 0, 255, 8, 8)
+ bounds: 928 288 8 8
+ - image: solid-color(117, 36, 0, 255, 8, 8)
+ bounds: 936 288 8 8
+ - image: solid-color(118, 36, 0, 255, 8, 8)
+ bounds: 944 288 8 8
+ - image: solid-color(119, 36, 0, 255, 8, 8)
+ bounds: 952 288 8 8
+ - image: solid-color(120, 36, 0, 255, 8, 8)
+ bounds: 960 288 8 8
+ - image: solid-color(121, 36, 0, 255, 8, 8)
+ bounds: 968 288 8 8
+ - image: solid-color(122, 36, 0, 255, 8, 8)
+ bounds: 976 288 8 8
+ - image: solid-color(123, 36, 0, 255, 8, 8)
+ bounds: 984 288 8 8
+ - image: solid-color(124, 36, 0, 255, 8, 8)
+ bounds: 992 288 8 8
+ - image: solid-color(125, 36, 0, 255, 8, 8)
+ bounds: 1000 288 8 8
+ - image: solid-color(126, 36, 0, 255, 8, 8)
+ bounds: 1008 288 8 8
+ - image: solid-color(127, 36, 0, 255, 8, 8)
+ bounds: 1016 288 8 8
+ - image: solid-color(0, 37, 0, 255, 8, 8)
+ bounds: 0 296 8 8
+ - image: solid-color(1, 37, 0, 255, 8, 8)
+ bounds: 8 296 8 8
+ - image: solid-color(2, 37, 0, 255, 8, 8)
+ bounds: 16 296 8 8
+ - image: solid-color(3, 37, 0, 255, 8, 8)
+ bounds: 24 296 8 8
+ - image: solid-color(4, 37, 0, 255, 8, 8)
+ bounds: 32 296 8 8
+ - image: solid-color(5, 37, 0, 255, 8, 8)
+ bounds: 40 296 8 8
+ - image: solid-color(6, 37, 0, 255, 8, 8)
+ bounds: 48 296 8 8
+ - image: solid-color(7, 37, 0, 255, 8, 8)
+ bounds: 56 296 8 8
+ - image: solid-color(8, 37, 0, 255, 8, 8)
+ bounds: 64 296 8 8
+ - image: solid-color(9, 37, 0, 255, 8, 8)
+ bounds: 72 296 8 8
+ - image: solid-color(10, 37, 0, 255, 8, 8)
+ bounds: 80 296 8 8
+ - image: solid-color(11, 37, 0, 255, 8, 8)
+ bounds: 88 296 8 8
+ - image: solid-color(12, 37, 0, 255, 8, 8)
+ bounds: 96 296 8 8
+ - image: solid-color(13, 37, 0, 255, 8, 8)
+ bounds: 104 296 8 8
+ - image: solid-color(14, 37, 0, 255, 8, 8)
+ bounds: 112 296 8 8
+ - image: solid-color(15, 37, 0, 255, 8, 8)
+ bounds: 120 296 8 8
+ - image: solid-color(16, 37, 0, 255, 8, 8)
+ bounds: 128 296 8 8
+ - image: solid-color(17, 37, 0, 255, 8, 8)
+ bounds: 136 296 8 8
+ - image: solid-color(18, 37, 0, 255, 8, 8)
+ bounds: 144 296 8 8
+ - image: solid-color(19, 37, 0, 255, 8, 8)
+ bounds: 152 296 8 8
+ - image: solid-color(20, 37, 0, 255, 8, 8)
+ bounds: 160 296 8 8
+ - image: solid-color(21, 37, 0, 255, 8, 8)
+ bounds: 168 296 8 8
+ - image: solid-color(22, 37, 0, 255, 8, 8)
+ bounds: 176 296 8 8
+ - image: solid-color(23, 37, 0, 255, 8, 8)
+ bounds: 184 296 8 8
+ - image: solid-color(24, 37, 0, 255, 8, 8)
+ bounds: 192 296 8 8
+ - image: solid-color(25, 37, 0, 255, 8, 8)
+ bounds: 200 296 8 8
+ - image: solid-color(26, 37, 0, 255, 8, 8)
+ bounds: 208 296 8 8
+ - image: solid-color(27, 37, 0, 255, 8, 8)
+ bounds: 216 296 8 8
+ - image: solid-color(28, 37, 0, 255, 8, 8)
+ bounds: 224 296 8 8
+ - image: solid-color(29, 37, 0, 255, 8, 8)
+ bounds: 232 296 8 8
+ - image: solid-color(30, 37, 0, 255, 8, 8)
+ bounds: 240 296 8 8
+ - image: solid-color(31, 37, 0, 255, 8, 8)
+ bounds: 248 296 8 8
+ - image: solid-color(32, 37, 0, 255, 8, 8)
+ bounds: 256 296 8 8
+ - image: solid-color(33, 37, 0, 255, 8, 8)
+ bounds: 264 296 8 8
+ - image: solid-color(34, 37, 0, 255, 8, 8)
+ bounds: 272 296 8 8
+ - image: solid-color(35, 37, 0, 255, 8, 8)
+ bounds: 280 296 8 8
+ - image: solid-color(36, 37, 0, 255, 8, 8)
+ bounds: 288 296 8 8
+ - image: solid-color(37, 37, 0, 255, 8, 8)
+ bounds: 296 296 8 8
+ - image: solid-color(38, 37, 0, 255, 8, 8)
+ bounds: 304 296 8 8
+ - image: solid-color(39, 37, 0, 255, 8, 8)
+ bounds: 312 296 8 8
+ - image: solid-color(40, 37, 0, 255, 8, 8)
+ bounds: 320 296 8 8
+ - image: solid-color(41, 37, 0, 255, 8, 8)
+ bounds: 328 296 8 8
+ - image: solid-color(42, 37, 0, 255, 8, 8)
+ bounds: 336 296 8 8
+ - image: solid-color(43, 37, 0, 255, 8, 8)
+ bounds: 344 296 8 8
+ - image: solid-color(44, 37, 0, 255, 8, 8)
+ bounds: 352 296 8 8
+ - image: solid-color(45, 37, 0, 255, 8, 8)
+ bounds: 360 296 8 8
+ - image: solid-color(46, 37, 0, 255, 8, 8)
+ bounds: 368 296 8 8
+ - image: solid-color(47, 37, 0, 255, 8, 8)
+ bounds: 376 296 8 8
+ - image: solid-color(48, 37, 0, 255, 8, 8)
+ bounds: 384 296 8 8
+ - image: solid-color(49, 37, 0, 255, 8, 8)
+ bounds: 392 296 8 8
+ - image: solid-color(50, 37, 0, 255, 8, 8)
+ bounds: 400 296 8 8
+ - image: solid-color(51, 37, 0, 255, 8, 8)
+ bounds: 408 296 8 8
+ - image: solid-color(52, 37, 0, 255, 8, 8)
+ bounds: 416 296 8 8
+ - image: solid-color(53, 37, 0, 255, 8, 8)
+ bounds: 424 296 8 8
+ - image: solid-color(54, 37, 0, 255, 8, 8)
+ bounds: 432 296 8 8
+ - image: solid-color(55, 37, 0, 255, 8, 8)
+ bounds: 440 296 8 8
+ - image: solid-color(56, 37, 0, 255, 8, 8)
+ bounds: 448 296 8 8
+ - image: solid-color(57, 37, 0, 255, 8, 8)
+ bounds: 456 296 8 8
+ - image: solid-color(58, 37, 0, 255, 8, 8)
+ bounds: 464 296 8 8
+ - image: solid-color(59, 37, 0, 255, 8, 8)
+ bounds: 472 296 8 8
+ - image: solid-color(60, 37, 0, 255, 8, 8)
+ bounds: 480 296 8 8
+ - image: solid-color(61, 37, 0, 255, 8, 8)
+ bounds: 488 296 8 8
+ - image: solid-color(62, 37, 0, 255, 8, 8)
+ bounds: 496 296 8 8
+ - image: solid-color(63, 37, 0, 255, 8, 8)
+ bounds: 504 296 8 8
+ - image: solid-color(64, 37, 0, 255, 8, 8)
+ bounds: 512 296 8 8
+ - image: solid-color(65, 37, 0, 255, 8, 8)
+ bounds: 520 296 8 8
+ - image: solid-color(66, 37, 0, 255, 8, 8)
+ bounds: 528 296 8 8
+ - image: solid-color(67, 37, 0, 255, 8, 8)
+ bounds: 536 296 8 8
+ - image: solid-color(68, 37, 0, 255, 8, 8)
+ bounds: 544 296 8 8
+ - image: solid-color(69, 37, 0, 255, 8, 8)
+ bounds: 552 296 8 8
+ - image: solid-color(70, 37, 0, 255, 8, 8)
+ bounds: 560 296 8 8
+ - image: solid-color(71, 37, 0, 255, 8, 8)
+ bounds: 568 296 8 8
+ - image: solid-color(72, 37, 0, 255, 8, 8)
+ bounds: 576 296 8 8
+ - image: solid-color(73, 37, 0, 255, 8, 8)
+ bounds: 584 296 8 8
+ - image: solid-color(74, 37, 0, 255, 8, 8)
+ bounds: 592 296 8 8
+ - image: solid-color(75, 37, 0, 255, 8, 8)
+ bounds: 600 296 8 8
+ - image: solid-color(76, 37, 0, 255, 8, 8)
+ bounds: 608 296 8 8
+ - image: solid-color(77, 37, 0, 255, 8, 8)
+ bounds: 616 296 8 8
+ - image: solid-color(78, 37, 0, 255, 8, 8)
+ bounds: 624 296 8 8
+ - image: solid-color(79, 37, 0, 255, 8, 8)
+ bounds: 632 296 8 8
+ - image: solid-color(80, 37, 0, 255, 8, 8)
+ bounds: 640 296 8 8
+ - image: solid-color(81, 37, 0, 255, 8, 8)
+ bounds: 648 296 8 8
+ - image: solid-color(82, 37, 0, 255, 8, 8)
+ bounds: 656 296 8 8
+ - image: solid-color(83, 37, 0, 255, 8, 8)
+ bounds: 664 296 8 8
+ - image: solid-color(84, 37, 0, 255, 8, 8)
+ bounds: 672 296 8 8
+ - image: solid-color(85, 37, 0, 255, 8, 8)
+ bounds: 680 296 8 8
+ - image: solid-color(86, 37, 0, 255, 8, 8)
+ bounds: 688 296 8 8
+ - image: solid-color(87, 37, 0, 255, 8, 8)
+ bounds: 696 296 8 8
+ - image: solid-color(88, 37, 0, 255, 8, 8)
+ bounds: 704 296 8 8
+ - image: solid-color(89, 37, 0, 255, 8, 8)
+ bounds: 712 296 8 8
+ - image: solid-color(90, 37, 0, 255, 8, 8)
+ bounds: 720 296 8 8
+ - image: solid-color(91, 37, 0, 255, 8, 8)
+ bounds: 728 296 8 8
+ - image: solid-color(92, 37, 0, 255, 8, 8)
+ bounds: 736 296 8 8
+ - image: solid-color(93, 37, 0, 255, 8, 8)
+ bounds: 744 296 8 8
+ - image: solid-color(94, 37, 0, 255, 8, 8)
+ bounds: 752 296 8 8
+ - image: solid-color(95, 37, 0, 255, 8, 8)
+ bounds: 760 296 8 8
+ - image: solid-color(96, 37, 0, 255, 8, 8)
+ bounds: 768 296 8 8
+ - image: solid-color(97, 37, 0, 255, 8, 8)
+ bounds: 776 296 8 8
+ - image: solid-color(98, 37, 0, 255, 8, 8)
+ bounds: 784 296 8 8
+ - image: solid-color(99, 37, 0, 255, 8, 8)
+ bounds: 792 296 8 8
+ - image: solid-color(100, 37, 0, 255, 8, 8)
+ bounds: 800 296 8 8
+ - image: solid-color(101, 37, 0, 255, 8, 8)
+ bounds: 808 296 8 8
+ - image: solid-color(102, 37, 0, 255, 8, 8)
+ bounds: 816 296 8 8
+ - image: solid-color(103, 37, 0, 255, 8, 8)
+ bounds: 824 296 8 8
+ - image: solid-color(104, 37, 0, 255, 8, 8)
+ bounds: 832 296 8 8
+ - image: solid-color(105, 37, 0, 255, 8, 8)
+ bounds: 840 296 8 8
+ - image: solid-color(106, 37, 0, 255, 8, 8)
+ bounds: 848 296 8 8
+ - image: solid-color(107, 37, 0, 255, 8, 8)
+ bounds: 856 296 8 8
+ - image: solid-color(108, 37, 0, 255, 8, 8)
+ bounds: 864 296 8 8
+ - image: solid-color(109, 37, 0, 255, 8, 8)
+ bounds: 872 296 8 8
+ - image: solid-color(110, 37, 0, 255, 8, 8)
+ bounds: 880 296 8 8
+ - image: solid-color(111, 37, 0, 255, 8, 8)
+ bounds: 888 296 8 8
+ - image: solid-color(112, 37, 0, 255, 8, 8)
+ bounds: 896 296 8 8
+ - image: solid-color(113, 37, 0, 255, 8, 8)
+ bounds: 904 296 8 8
+ - image: solid-color(114, 37, 0, 255, 8, 8)
+ bounds: 912 296 8 8
+ - image: solid-color(115, 37, 0, 255, 8, 8)
+ bounds: 920 296 8 8
+ - image: solid-color(116, 37, 0, 255, 8, 8)
+ bounds: 928 296 8 8
+ - image: solid-color(117, 37, 0, 255, 8, 8)
+ bounds: 936 296 8 8
+ - image: solid-color(118, 37, 0, 255, 8, 8)
+ bounds: 944 296 8 8
+ - image: solid-color(119, 37, 0, 255, 8, 8)
+ bounds: 952 296 8 8
+ - image: solid-color(120, 37, 0, 255, 8, 8)
+ bounds: 960 296 8 8
+ - image: solid-color(121, 37, 0, 255, 8, 8)
+ bounds: 968 296 8 8
+ - image: solid-color(122, 37, 0, 255, 8, 8)
+ bounds: 976 296 8 8
+ - image: solid-color(123, 37, 0, 255, 8, 8)
+ bounds: 984 296 8 8
+ - image: solid-color(124, 37, 0, 255, 8, 8)
+ bounds: 992 296 8 8
+ - image: solid-color(125, 37, 0, 255, 8, 8)
+ bounds: 1000 296 8 8
+ - image: solid-color(126, 37, 0, 255, 8, 8)
+ bounds: 1008 296 8 8
+ - image: solid-color(127, 37, 0, 255, 8, 8)
+ bounds: 1016 296 8 8
+ - image: solid-color(0, 38, 0, 255, 8, 8)
+ bounds: 0 304 8 8
+ - image: solid-color(1, 38, 0, 255, 8, 8)
+ bounds: 8 304 8 8
+ - image: solid-color(2, 38, 0, 255, 8, 8)
+ bounds: 16 304 8 8
+ - image: solid-color(3, 38, 0, 255, 8, 8)
+ bounds: 24 304 8 8
+ - image: solid-color(4, 38, 0, 255, 8, 8)
+ bounds: 32 304 8 8
+ - image: solid-color(5, 38, 0, 255, 8, 8)
+ bounds: 40 304 8 8
+ - image: solid-color(6, 38, 0, 255, 8, 8)
+ bounds: 48 304 8 8
+ - image: solid-color(7, 38, 0, 255, 8, 8)
+ bounds: 56 304 8 8
+ - image: solid-color(8, 38, 0, 255, 8, 8)
+ bounds: 64 304 8 8
+ - image: solid-color(9, 38, 0, 255, 8, 8)
+ bounds: 72 304 8 8
+ - image: solid-color(10, 38, 0, 255, 8, 8)
+ bounds: 80 304 8 8
+ - image: solid-color(11, 38, 0, 255, 8, 8)
+ bounds: 88 304 8 8
+ - image: solid-color(12, 38, 0, 255, 8, 8)
+ bounds: 96 304 8 8
+ - image: solid-color(13, 38, 0, 255, 8, 8)
+ bounds: 104 304 8 8
+ - image: solid-color(14, 38, 0, 255, 8, 8)
+ bounds: 112 304 8 8
+ - image: solid-color(15, 38, 0, 255, 8, 8)
+ bounds: 120 304 8 8
+ - image: solid-color(16, 38, 0, 255, 8, 8)
+ bounds: 128 304 8 8
+ - image: solid-color(17, 38, 0, 255, 8, 8)
+ bounds: 136 304 8 8
+ - image: solid-color(18, 38, 0, 255, 8, 8)
+ bounds: 144 304 8 8
+ - image: solid-color(19, 38, 0, 255, 8, 8)
+ bounds: 152 304 8 8
+ - image: solid-color(20, 38, 0, 255, 8, 8)
+ bounds: 160 304 8 8
+ - image: solid-color(21, 38, 0, 255, 8, 8)
+ bounds: 168 304 8 8
+ - image: solid-color(22, 38, 0, 255, 8, 8)
+ bounds: 176 304 8 8
+ - image: solid-color(23, 38, 0, 255, 8, 8)
+ bounds: 184 304 8 8
+ - image: solid-color(24, 38, 0, 255, 8, 8)
+ bounds: 192 304 8 8
+ - image: solid-color(25, 38, 0, 255, 8, 8)
+ bounds: 200 304 8 8
+ - image: solid-color(26, 38, 0, 255, 8, 8)
+ bounds: 208 304 8 8
+ - image: solid-color(27, 38, 0, 255, 8, 8)
+ bounds: 216 304 8 8
+ - image: solid-color(28, 38, 0, 255, 8, 8)
+ bounds: 224 304 8 8
+ - image: solid-color(29, 38, 0, 255, 8, 8)
+ bounds: 232 304 8 8
+ - image: solid-color(30, 38, 0, 255, 8, 8)
+ bounds: 240 304 8 8
+ - image: solid-color(31, 38, 0, 255, 8, 8)
+ bounds: 248 304 8 8
+ - image: solid-color(32, 38, 0, 255, 8, 8)
+ bounds: 256 304 8 8
+ - image: solid-color(33, 38, 0, 255, 8, 8)
+ bounds: 264 304 8 8
+ - image: solid-color(34, 38, 0, 255, 8, 8)
+ bounds: 272 304 8 8
+ - image: solid-color(35, 38, 0, 255, 8, 8)
+ bounds: 280 304 8 8
+ - image: solid-color(36, 38, 0, 255, 8, 8)
+ bounds: 288 304 8 8
+ - image: solid-color(37, 38, 0, 255, 8, 8)
+ bounds: 296 304 8 8
+ - image: solid-color(38, 38, 0, 255, 8, 8)
+ bounds: 304 304 8 8
+ - image: solid-color(39, 38, 0, 255, 8, 8)
+ bounds: 312 304 8 8
+ - image: solid-color(40, 38, 0, 255, 8, 8)
+ bounds: 320 304 8 8
+ - image: solid-color(41, 38, 0, 255, 8, 8)
+ bounds: 328 304 8 8
+ - image: solid-color(42, 38, 0, 255, 8, 8)
+ bounds: 336 304 8 8
+ - image: solid-color(43, 38, 0, 255, 8, 8)
+ bounds: 344 304 8 8
+ - image: solid-color(44, 38, 0, 255, 8, 8)
+ bounds: 352 304 8 8
+ - image: solid-color(45, 38, 0, 255, 8, 8)
+ bounds: 360 304 8 8
+ - image: solid-color(46, 38, 0, 255, 8, 8)
+ bounds: 368 304 8 8
+ - image: solid-color(47, 38, 0, 255, 8, 8)
+ bounds: 376 304 8 8
+ - image: solid-color(48, 38, 0, 255, 8, 8)
+ bounds: 384 304 8 8
+ - image: solid-color(49, 38, 0, 255, 8, 8)
+ bounds: 392 304 8 8
+ - image: solid-color(50, 38, 0, 255, 8, 8)
+ bounds: 400 304 8 8
+ - image: solid-color(51, 38, 0, 255, 8, 8)
+ bounds: 408 304 8 8
+ - image: solid-color(52, 38, 0, 255, 8, 8)
+ bounds: 416 304 8 8
+ - image: solid-color(53, 38, 0, 255, 8, 8)
+ bounds: 424 304 8 8
+ - image: solid-color(54, 38, 0, 255, 8, 8)
+ bounds: 432 304 8 8
+ - image: solid-color(55, 38, 0, 255, 8, 8)
+ bounds: 440 304 8 8
+ - image: solid-color(56, 38, 0, 255, 8, 8)
+ bounds: 448 304 8 8
+ - image: solid-color(57, 38, 0, 255, 8, 8)
+ bounds: 456 304 8 8
+ - image: solid-color(58, 38, 0, 255, 8, 8)
+ bounds: 464 304 8 8
+ - image: solid-color(59, 38, 0, 255, 8, 8)
+ bounds: 472 304 8 8
+ - image: solid-color(60, 38, 0, 255, 8, 8)
+ bounds: 480 304 8 8
+ - image: solid-color(61, 38, 0, 255, 8, 8)
+ bounds: 488 304 8 8
+ - image: solid-color(62, 38, 0, 255, 8, 8)
+ bounds: 496 304 8 8
+ - image: solid-color(63, 38, 0, 255, 8, 8)
+ bounds: 504 304 8 8
+ - image: solid-color(64, 38, 0, 255, 8, 8)
+ bounds: 512 304 8 8
+ - image: solid-color(65, 38, 0, 255, 8, 8)
+ bounds: 520 304 8 8
+ - image: solid-color(66, 38, 0, 255, 8, 8)
+ bounds: 528 304 8 8
+ - image: solid-color(67, 38, 0, 255, 8, 8)
+ bounds: 536 304 8 8
+ - image: solid-color(68, 38, 0, 255, 8, 8)
+ bounds: 544 304 8 8
+ - image: solid-color(69, 38, 0, 255, 8, 8)
+ bounds: 552 304 8 8
+ - image: solid-color(70, 38, 0, 255, 8, 8)
+ bounds: 560 304 8 8
+ - image: solid-color(71, 38, 0, 255, 8, 8)
+ bounds: 568 304 8 8
+ - image: solid-color(72, 38, 0, 255, 8, 8)
+ bounds: 576 304 8 8
+ - image: solid-color(73, 38, 0, 255, 8, 8)
+ bounds: 584 304 8 8
+ - image: solid-color(74, 38, 0, 255, 8, 8)
+ bounds: 592 304 8 8
+ - image: solid-color(75, 38, 0, 255, 8, 8)
+ bounds: 600 304 8 8
+ - image: solid-color(76, 38, 0, 255, 8, 8)
+ bounds: 608 304 8 8
+ - image: solid-color(77, 38, 0, 255, 8, 8)
+ bounds: 616 304 8 8
+ - image: solid-color(78, 38, 0, 255, 8, 8)
+ bounds: 624 304 8 8
+ - image: solid-color(79, 38, 0, 255, 8, 8)
+ bounds: 632 304 8 8
+ - image: solid-color(80, 38, 0, 255, 8, 8)
+ bounds: 640 304 8 8
+ - image: solid-color(81, 38, 0, 255, 8, 8)
+ bounds: 648 304 8 8
+ - image: solid-color(82, 38, 0, 255, 8, 8)
+ bounds: 656 304 8 8
+ - image: solid-color(83, 38, 0, 255, 8, 8)
+ bounds: 664 304 8 8
+ - image: solid-color(84, 38, 0, 255, 8, 8)
+ bounds: 672 304 8 8
+ - image: solid-color(85, 38, 0, 255, 8, 8)
+ bounds: 680 304 8 8
+ - image: solid-color(86, 38, 0, 255, 8, 8)
+ bounds: 688 304 8 8
+ - image: solid-color(87, 38, 0, 255, 8, 8)
+ bounds: 696 304 8 8
+ - image: solid-color(88, 38, 0, 255, 8, 8)
+ bounds: 704 304 8 8
+ - image: solid-color(89, 38, 0, 255, 8, 8)
+ bounds: 712 304 8 8
+ - image: solid-color(90, 38, 0, 255, 8, 8)
+ bounds: 720 304 8 8
+ - image: solid-color(91, 38, 0, 255, 8, 8)
+ bounds: 728 304 8 8
+ - image: solid-color(92, 38, 0, 255, 8, 8)
+ bounds: 736 304 8 8
+ - image: solid-color(93, 38, 0, 255, 8, 8)
+ bounds: 744 304 8 8
+ - image: solid-color(94, 38, 0, 255, 8, 8)
+ bounds: 752 304 8 8
+ - image: solid-color(95, 38, 0, 255, 8, 8)
+ bounds: 760 304 8 8
+ - image: solid-color(96, 38, 0, 255, 8, 8)
+ bounds: 768 304 8 8
+ - image: solid-color(97, 38, 0, 255, 8, 8)
+ bounds: 776 304 8 8
+ - image: solid-color(98, 38, 0, 255, 8, 8)
+ bounds: 784 304 8 8
+ - image: solid-color(99, 38, 0, 255, 8, 8)
+ bounds: 792 304 8 8
+ - image: solid-color(100, 38, 0, 255, 8, 8)
+ bounds: 800 304 8 8
+ - image: solid-color(101, 38, 0, 255, 8, 8)
+ bounds: 808 304 8 8
+ - image: solid-color(102, 38, 0, 255, 8, 8)
+ bounds: 816 304 8 8
+ - image: solid-color(103, 38, 0, 255, 8, 8)
+ bounds: 824 304 8 8
+ - image: solid-color(104, 38, 0, 255, 8, 8)
+ bounds: 832 304 8 8
+ - image: solid-color(105, 38, 0, 255, 8, 8)
+ bounds: 840 304 8 8
+ - image: solid-color(106, 38, 0, 255, 8, 8)
+ bounds: 848 304 8 8
+ - image: solid-color(107, 38, 0, 255, 8, 8)
+ bounds: 856 304 8 8
+ - image: solid-color(108, 38, 0, 255, 8, 8)
+ bounds: 864 304 8 8
+ - image: solid-color(109, 38, 0, 255, 8, 8)
+ bounds: 872 304 8 8
+ - image: solid-color(110, 38, 0, 255, 8, 8)
+ bounds: 880 304 8 8
+ - image: solid-color(111, 38, 0, 255, 8, 8)
+ bounds: 888 304 8 8
+ - image: solid-color(112, 38, 0, 255, 8, 8)
+ bounds: 896 304 8 8
+ - image: solid-color(113, 38, 0, 255, 8, 8)
+ bounds: 904 304 8 8
+ - image: solid-color(114, 38, 0, 255, 8, 8)
+ bounds: 912 304 8 8
+ - image: solid-color(115, 38, 0, 255, 8, 8)
+ bounds: 920 304 8 8
+ - image: solid-color(116, 38, 0, 255, 8, 8)
+ bounds: 928 304 8 8
+ - image: solid-color(117, 38, 0, 255, 8, 8)
+ bounds: 936 304 8 8
+ - image: solid-color(118, 38, 0, 255, 8, 8)
+ bounds: 944 304 8 8
+ - image: solid-color(119, 38, 0, 255, 8, 8)
+ bounds: 952 304 8 8
+ - image: solid-color(120, 38, 0, 255, 8, 8)
+ bounds: 960 304 8 8
+ - image: solid-color(121, 38, 0, 255, 8, 8)
+ bounds: 968 304 8 8
+ - image: solid-color(122, 38, 0, 255, 8, 8)
+ bounds: 976 304 8 8
+ - image: solid-color(123, 38, 0, 255, 8, 8)
+ bounds: 984 304 8 8
+ - image: solid-color(124, 38, 0, 255, 8, 8)
+ bounds: 992 304 8 8
+ - image: solid-color(125, 38, 0, 255, 8, 8)
+ bounds: 1000 304 8 8
+ - image: solid-color(126, 38, 0, 255, 8, 8)
+ bounds: 1008 304 8 8
+ - image: solid-color(127, 38, 0, 255, 8, 8)
+ bounds: 1016 304 8 8
+ - image: solid-color(0, 39, 0, 255, 8, 8)
+ bounds: 0 312 8 8
+ - image: solid-color(1, 39, 0, 255, 8, 8)
+ bounds: 8 312 8 8
+ - image: solid-color(2, 39, 0, 255, 8, 8)
+ bounds: 16 312 8 8
+ - image: solid-color(3, 39, 0, 255, 8, 8)
+ bounds: 24 312 8 8
+ - image: solid-color(4, 39, 0, 255, 8, 8)
+ bounds: 32 312 8 8
+ - image: solid-color(5, 39, 0, 255, 8, 8)
+ bounds: 40 312 8 8
+ - image: solid-color(6, 39, 0, 255, 8, 8)
+ bounds: 48 312 8 8
+ - image: solid-color(7, 39, 0, 255, 8, 8)
+ bounds: 56 312 8 8
+ - image: solid-color(8, 39, 0, 255, 8, 8)
+ bounds: 64 312 8 8
+ - image: solid-color(9, 39, 0, 255, 8, 8)
+ bounds: 72 312 8 8
+ - image: solid-color(10, 39, 0, 255, 8, 8)
+ bounds: 80 312 8 8
+ - image: solid-color(11, 39, 0, 255, 8, 8)
+ bounds: 88 312 8 8
+ - image: solid-color(12, 39, 0, 255, 8, 8)
+ bounds: 96 312 8 8
+ - image: solid-color(13, 39, 0, 255, 8, 8)
+ bounds: 104 312 8 8
+ - image: solid-color(14, 39, 0, 255, 8, 8)
+ bounds: 112 312 8 8
+ - image: solid-color(15, 39, 0, 255, 8, 8)
+ bounds: 120 312 8 8
+ - image: solid-color(16, 39, 0, 255, 8, 8)
+ bounds: 128 312 8 8
+ - image: solid-color(17, 39, 0, 255, 8, 8)
+ bounds: 136 312 8 8
+ - image: solid-color(18, 39, 0, 255, 8, 8)
+ bounds: 144 312 8 8
+ - image: solid-color(19, 39, 0, 255, 8, 8)
+ bounds: 152 312 8 8
+ - image: solid-color(20, 39, 0, 255, 8, 8)
+ bounds: 160 312 8 8
+ - image: solid-color(21, 39, 0, 255, 8, 8)
+ bounds: 168 312 8 8
+ - image: solid-color(22, 39, 0, 255, 8, 8)
+ bounds: 176 312 8 8
+ - image: solid-color(23, 39, 0, 255, 8, 8)
+ bounds: 184 312 8 8
+ - image: solid-color(24, 39, 0, 255, 8, 8)
+ bounds: 192 312 8 8
+ - image: solid-color(25, 39, 0, 255, 8, 8)
+ bounds: 200 312 8 8
+ - image: solid-color(26, 39, 0, 255, 8, 8)
+ bounds: 208 312 8 8
+ - image: solid-color(27, 39, 0, 255, 8, 8)
+ bounds: 216 312 8 8
+ - image: solid-color(28, 39, 0, 255, 8, 8)
+ bounds: 224 312 8 8
+ - image: solid-color(29, 39, 0, 255, 8, 8)
+ bounds: 232 312 8 8
+ - image: solid-color(30, 39, 0, 255, 8, 8)
+ bounds: 240 312 8 8
+ - image: solid-color(31, 39, 0, 255, 8, 8)
+ bounds: 248 312 8 8
+ - image: solid-color(32, 39, 0, 255, 8, 8)
+ bounds: 256 312 8 8
+ - image: solid-color(33, 39, 0, 255, 8, 8)
+ bounds: 264 312 8 8
+ - image: solid-color(34, 39, 0, 255, 8, 8)
+ bounds: 272 312 8 8
+ - image: solid-color(35, 39, 0, 255, 8, 8)
+ bounds: 280 312 8 8
+ - image: solid-color(36, 39, 0, 255, 8, 8)
+ bounds: 288 312 8 8
+ - image: solid-color(37, 39, 0, 255, 8, 8)
+ bounds: 296 312 8 8
+ - image: solid-color(38, 39, 0, 255, 8, 8)
+ bounds: 304 312 8 8
+ - image: solid-color(39, 39, 0, 255, 8, 8)
+ bounds: 312 312 8 8
+ - image: solid-color(40, 39, 0, 255, 8, 8)
+ bounds: 320 312 8 8
+ - image: solid-color(41, 39, 0, 255, 8, 8)
+ bounds: 328 312 8 8
+ - image: solid-color(42, 39, 0, 255, 8, 8)
+ bounds: 336 312 8 8
+ - image: solid-color(43, 39, 0, 255, 8, 8)
+ bounds: 344 312 8 8
+ - image: solid-color(44, 39, 0, 255, 8, 8)
+ bounds: 352 312 8 8
+ - image: solid-color(45, 39, 0, 255, 8, 8)
+ bounds: 360 312 8 8
+ - image: solid-color(46, 39, 0, 255, 8, 8)
+ bounds: 368 312 8 8
+ - image: solid-color(47, 39, 0, 255, 8, 8)
+ bounds: 376 312 8 8
+ - image: solid-color(48, 39, 0, 255, 8, 8)
+ bounds: 384 312 8 8
+ - image: solid-color(49, 39, 0, 255, 8, 8)
+ bounds: 392 312 8 8
+ - image: solid-color(50, 39, 0, 255, 8, 8)
+ bounds: 400 312 8 8
+ - image: solid-color(51, 39, 0, 255, 8, 8)
+ bounds: 408 312 8 8
+ - image: solid-color(52, 39, 0, 255, 8, 8)
+ bounds: 416 312 8 8
+ - image: solid-color(53, 39, 0, 255, 8, 8)
+ bounds: 424 312 8 8
+ - image: solid-color(54, 39, 0, 255, 8, 8)
+ bounds: 432 312 8 8
+ - image: solid-color(55, 39, 0, 255, 8, 8)
+ bounds: 440 312 8 8
+ - image: solid-color(56, 39, 0, 255, 8, 8)
+ bounds: 448 312 8 8
+ - image: solid-color(57, 39, 0, 255, 8, 8)
+ bounds: 456 312 8 8
+ - image: solid-color(58, 39, 0, 255, 8, 8)
+ bounds: 464 312 8 8
+ - image: solid-color(59, 39, 0, 255, 8, 8)
+ bounds: 472 312 8 8
+ - image: solid-color(60, 39, 0, 255, 8, 8)
+ bounds: 480 312 8 8
+ - image: solid-color(61, 39, 0, 255, 8, 8)
+ bounds: 488 312 8 8
+ - image: solid-color(62, 39, 0, 255, 8, 8)
+ bounds: 496 312 8 8
+ - image: solid-color(63, 39, 0, 255, 8, 8)
+ bounds: 504 312 8 8
+ - image: solid-color(64, 39, 0, 255, 8, 8)
+ bounds: 512 312 8 8
+ - image: solid-color(65, 39, 0, 255, 8, 8)
+ bounds: 520 312 8 8
+ - image: solid-color(66, 39, 0, 255, 8, 8)
+ bounds: 528 312 8 8
+ - image: solid-color(67, 39, 0, 255, 8, 8)
+ bounds: 536 312 8 8
+ - image: solid-color(68, 39, 0, 255, 8, 8)
+ bounds: 544 312 8 8
+ - image: solid-color(69, 39, 0, 255, 8, 8)
+ bounds: 552 312 8 8
+ - image: solid-color(70, 39, 0, 255, 8, 8)
+ bounds: 560 312 8 8
+ - image: solid-color(71, 39, 0, 255, 8, 8)
+ bounds: 568 312 8 8
+ - image: solid-color(72, 39, 0, 255, 8, 8)
+ bounds: 576 312 8 8
+ - image: solid-color(73, 39, 0, 255, 8, 8)
+ bounds: 584 312 8 8
+ - image: solid-color(74, 39, 0, 255, 8, 8)
+ bounds: 592 312 8 8
+ - image: solid-color(75, 39, 0, 255, 8, 8)
+ bounds: 600 312 8 8
+ - image: solid-color(76, 39, 0, 255, 8, 8)
+ bounds: 608 312 8 8
+ - image: solid-color(77, 39, 0, 255, 8, 8)
+ bounds: 616 312 8 8
+ - image: solid-color(78, 39, 0, 255, 8, 8)
+ bounds: 624 312 8 8
+ - image: solid-color(79, 39, 0, 255, 8, 8)
+ bounds: 632 312 8 8
+ - image: solid-color(80, 39, 0, 255, 8, 8)
+ bounds: 640 312 8 8
+ - image: solid-color(81, 39, 0, 255, 8, 8)
+ bounds: 648 312 8 8
+ - image: solid-color(82, 39, 0, 255, 8, 8)
+ bounds: 656 312 8 8
+ - image: solid-color(83, 39, 0, 255, 8, 8)
+ bounds: 664 312 8 8
+ - image: solid-color(84, 39, 0, 255, 8, 8)
+ bounds: 672 312 8 8
+ - image: solid-color(85, 39, 0, 255, 8, 8)
+ bounds: 680 312 8 8
+ - image: solid-color(86, 39, 0, 255, 8, 8)
+ bounds: 688 312 8 8
+ - image: solid-color(87, 39, 0, 255, 8, 8)
+ bounds: 696 312 8 8
+ - image: solid-color(88, 39, 0, 255, 8, 8)
+ bounds: 704 312 8 8
+ - image: solid-color(89, 39, 0, 255, 8, 8)
+ bounds: 712 312 8 8
+ - image: solid-color(90, 39, 0, 255, 8, 8)
+ bounds: 720 312 8 8
+ - image: solid-color(91, 39, 0, 255, 8, 8)
+ bounds: 728 312 8 8
+ - image: solid-color(92, 39, 0, 255, 8, 8)
+ bounds: 736 312 8 8
+ - image: solid-color(93, 39, 0, 255, 8, 8)
+ bounds: 744 312 8 8
+ - image: solid-color(94, 39, 0, 255, 8, 8)
+ bounds: 752 312 8 8
+ - image: solid-color(95, 39, 0, 255, 8, 8)
+ bounds: 760 312 8 8
+ - image: solid-color(96, 39, 0, 255, 8, 8)
+ bounds: 768 312 8 8
+ - image: solid-color(97, 39, 0, 255, 8, 8)
+ bounds: 776 312 8 8
+ - image: solid-color(98, 39, 0, 255, 8, 8)
+ bounds: 784 312 8 8
+ - image: solid-color(99, 39, 0, 255, 8, 8)
+ bounds: 792 312 8 8
+ - image: solid-color(100, 39, 0, 255, 8, 8)
+ bounds: 800 312 8 8
+ - image: solid-color(101, 39, 0, 255, 8, 8)
+ bounds: 808 312 8 8
+ - image: solid-color(102, 39, 0, 255, 8, 8)
+ bounds: 816 312 8 8
+ - image: solid-color(103, 39, 0, 255, 8, 8)
+ bounds: 824 312 8 8
+ - image: solid-color(104, 39, 0, 255, 8, 8)
+ bounds: 832 312 8 8
+ - image: solid-color(105, 39, 0, 255, 8, 8)
+ bounds: 840 312 8 8
+ - image: solid-color(106, 39, 0, 255, 8, 8)
+ bounds: 848 312 8 8
+ - image: solid-color(107, 39, 0, 255, 8, 8)
+ bounds: 856 312 8 8
+ - image: solid-color(108, 39, 0, 255, 8, 8)
+ bounds: 864 312 8 8
+ - image: solid-color(109, 39, 0, 255, 8, 8)
+ bounds: 872 312 8 8
+ - image: solid-color(110, 39, 0, 255, 8, 8)
+ bounds: 880 312 8 8
+ - image: solid-color(111, 39, 0, 255, 8, 8)
+ bounds: 888 312 8 8
+ - image: solid-color(112, 39, 0, 255, 8, 8)
+ bounds: 896 312 8 8
+ - image: solid-color(113, 39, 0, 255, 8, 8)
+ bounds: 904 312 8 8
+ - image: solid-color(114, 39, 0, 255, 8, 8)
+ bounds: 912 312 8 8
+ - image: solid-color(115, 39, 0, 255, 8, 8)
+ bounds: 920 312 8 8
+ - image: solid-color(116, 39, 0, 255, 8, 8)
+ bounds: 928 312 8 8
+ - image: solid-color(117, 39, 0, 255, 8, 8)
+ bounds: 936 312 8 8
+ - image: solid-color(118, 39, 0, 255, 8, 8)
+ bounds: 944 312 8 8
+ - image: solid-color(119, 39, 0, 255, 8, 8)
+ bounds: 952 312 8 8
+ - image: solid-color(120, 39, 0, 255, 8, 8)
+ bounds: 960 312 8 8
+ - image: solid-color(121, 39, 0, 255, 8, 8)
+ bounds: 968 312 8 8
+ - image: solid-color(122, 39, 0, 255, 8, 8)
+ bounds: 976 312 8 8
+ - image: solid-color(123, 39, 0, 255, 8, 8)
+ bounds: 984 312 8 8
+ - image: solid-color(124, 39, 0, 255, 8, 8)
+ bounds: 992 312 8 8
+ - image: solid-color(125, 39, 0, 255, 8, 8)
+ bounds: 1000 312 8 8
+ - image: solid-color(126, 39, 0, 255, 8, 8)
+ bounds: 1008 312 8 8
+ - image: solid-color(127, 39, 0, 255, 8, 8)
+ bounds: 1016 312 8 8
+ - image: solid-color(0, 40, 0, 255, 8, 8)
+ bounds: 0 320 8 8
+ - image: solid-color(1, 40, 0, 255, 8, 8)
+ bounds: 8 320 8 8
+ - image: solid-color(2, 40, 0, 255, 8, 8)
+ bounds: 16 320 8 8
+ - image: solid-color(3, 40, 0, 255, 8, 8)
+ bounds: 24 320 8 8
+ - image: solid-color(4, 40, 0, 255, 8, 8)
+ bounds: 32 320 8 8
+ - image: solid-color(5, 40, 0, 255, 8, 8)
+ bounds: 40 320 8 8
+ - image: solid-color(6, 40, 0, 255, 8, 8)
+ bounds: 48 320 8 8
+ - image: solid-color(7, 40, 0, 255, 8, 8)
+ bounds: 56 320 8 8
+ - image: solid-color(8, 40, 0, 255, 8, 8)
+ bounds: 64 320 8 8
+ - image: solid-color(9, 40, 0, 255, 8, 8)
+ bounds: 72 320 8 8
+ - image: solid-color(10, 40, 0, 255, 8, 8)
+ bounds: 80 320 8 8
+ - image: solid-color(11, 40, 0, 255, 8, 8)
+ bounds: 88 320 8 8
+ - image: solid-color(12, 40, 0, 255, 8, 8)
+ bounds: 96 320 8 8
+ - image: solid-color(13, 40, 0, 255, 8, 8)
+ bounds: 104 320 8 8
+ - image: solid-color(14, 40, 0, 255, 8, 8)
+ bounds: 112 320 8 8
+ - image: solid-color(15, 40, 0, 255, 8, 8)
+ bounds: 120 320 8 8
+ - image: solid-color(16, 40, 0, 255, 8, 8)
+ bounds: 128 320 8 8
+ - image: solid-color(17, 40, 0, 255, 8, 8)
+ bounds: 136 320 8 8
+ - image: solid-color(18, 40, 0, 255, 8, 8)
+ bounds: 144 320 8 8
+ - image: solid-color(19, 40, 0, 255, 8, 8)
+ bounds: 152 320 8 8
+ - image: solid-color(20, 40, 0, 255, 8, 8)
+ bounds: 160 320 8 8
+ - image: solid-color(21, 40, 0, 255, 8, 8)
+ bounds: 168 320 8 8
+ - image: solid-color(22, 40, 0, 255, 8, 8)
+ bounds: 176 320 8 8
+ - image: solid-color(23, 40, 0, 255, 8, 8)
+ bounds: 184 320 8 8
+ - image: solid-color(24, 40, 0, 255, 8, 8)
+ bounds: 192 320 8 8
+ - image: solid-color(25, 40, 0, 255, 8, 8)
+ bounds: 200 320 8 8
+ - image: solid-color(26, 40, 0, 255, 8, 8)
+ bounds: 208 320 8 8
+ - image: solid-color(27, 40, 0, 255, 8, 8)
+ bounds: 216 320 8 8
+ - image: solid-color(28, 40, 0, 255, 8, 8)
+ bounds: 224 320 8 8
+ - image: solid-color(29, 40, 0, 255, 8, 8)
+ bounds: 232 320 8 8
+ - image: solid-color(30, 40, 0, 255, 8, 8)
+ bounds: 240 320 8 8
+ - image: solid-color(31, 40, 0, 255, 8, 8)
+ bounds: 248 320 8 8
+ - image: solid-color(32, 40, 0, 255, 8, 8)
+ bounds: 256 320 8 8
+ - image: solid-color(33, 40, 0, 255, 8, 8)
+ bounds: 264 320 8 8
+ - image: solid-color(34, 40, 0, 255, 8, 8)
+ bounds: 272 320 8 8
+ - image: solid-color(35, 40, 0, 255, 8, 8)
+ bounds: 280 320 8 8
+ - image: solid-color(36, 40, 0, 255, 8, 8)
+ bounds: 288 320 8 8
+ - image: solid-color(37, 40, 0, 255, 8, 8)
+ bounds: 296 320 8 8
+ - image: solid-color(38, 40, 0, 255, 8, 8)
+ bounds: 304 320 8 8
+ - image: solid-color(39, 40, 0, 255, 8, 8)
+ bounds: 312 320 8 8
+ - image: solid-color(40, 40, 0, 255, 8, 8)
+ bounds: 320 320 8 8
+ - image: solid-color(41, 40, 0, 255, 8, 8)
+ bounds: 328 320 8 8
+ - image: solid-color(42, 40, 0, 255, 8, 8)
+ bounds: 336 320 8 8
+ - image: solid-color(43, 40, 0, 255, 8, 8)
+ bounds: 344 320 8 8
+ - image: solid-color(44, 40, 0, 255, 8, 8)
+ bounds: 352 320 8 8
+ - image: solid-color(45, 40, 0, 255, 8, 8)
+ bounds: 360 320 8 8
+ - image: solid-color(46, 40, 0, 255, 8, 8)
+ bounds: 368 320 8 8
+ - image: solid-color(47, 40, 0, 255, 8, 8)
+ bounds: 376 320 8 8
+ - image: solid-color(48, 40, 0, 255, 8, 8)
+ bounds: 384 320 8 8
+ - image: solid-color(49, 40, 0, 255, 8, 8)
+ bounds: 392 320 8 8
+ - image: solid-color(50, 40, 0, 255, 8, 8)
+ bounds: 400 320 8 8
+ - image: solid-color(51, 40, 0, 255, 8, 8)
+ bounds: 408 320 8 8
+ - image: solid-color(52, 40, 0, 255, 8, 8)
+ bounds: 416 320 8 8
+ - image: solid-color(53, 40, 0, 255, 8, 8)
+ bounds: 424 320 8 8
+ - image: solid-color(54, 40, 0, 255, 8, 8)
+ bounds: 432 320 8 8
+ - image: solid-color(55, 40, 0, 255, 8, 8)
+ bounds: 440 320 8 8
+ - image: solid-color(56, 40, 0, 255, 8, 8)
+ bounds: 448 320 8 8
+ - image: solid-color(57, 40, 0, 255, 8, 8)
+ bounds: 456 320 8 8
+ - image: solid-color(58, 40, 0, 255, 8, 8)
+ bounds: 464 320 8 8
+ - image: solid-color(59, 40, 0, 255, 8, 8)
+ bounds: 472 320 8 8
+ - image: solid-color(60, 40, 0, 255, 8, 8)
+ bounds: 480 320 8 8
+ - image: solid-color(61, 40, 0, 255, 8, 8)
+ bounds: 488 320 8 8
+ - image: solid-color(62, 40, 0, 255, 8, 8)
+ bounds: 496 320 8 8
+ - image: solid-color(63, 40, 0, 255, 8, 8)
+ bounds: 504 320 8 8
+ - image: solid-color(64, 40, 0, 255, 8, 8)
+ bounds: 512 320 8 8
+ - image: solid-color(65, 40, 0, 255, 8, 8)
+ bounds: 520 320 8 8
+ - image: solid-color(66, 40, 0, 255, 8, 8)
+ bounds: 528 320 8 8
+ - image: solid-color(67, 40, 0, 255, 8, 8)
+ bounds: 536 320 8 8
+ - image: solid-color(68, 40, 0, 255, 8, 8)
+ bounds: 544 320 8 8
+ - image: solid-color(69, 40, 0, 255, 8, 8)
+ bounds: 552 320 8 8
+ - image: solid-color(70, 40, 0, 255, 8, 8)
+ bounds: 560 320 8 8
+ - image: solid-color(71, 40, 0, 255, 8, 8)
+ bounds: 568 320 8 8
+ - image: solid-color(72, 40, 0, 255, 8, 8)
+ bounds: 576 320 8 8
+ - image: solid-color(73, 40, 0, 255, 8, 8)
+ bounds: 584 320 8 8
+ - image: solid-color(74, 40, 0, 255, 8, 8)
+ bounds: 592 320 8 8
+ - image: solid-color(75, 40, 0, 255, 8, 8)
+ bounds: 600 320 8 8
+ - image: solid-color(76, 40, 0, 255, 8, 8)
+ bounds: 608 320 8 8
+ - image: solid-color(77, 40, 0, 255, 8, 8)
+ bounds: 616 320 8 8
+ - image: solid-color(78, 40, 0, 255, 8, 8)
+ bounds: 624 320 8 8
+ - image: solid-color(79, 40, 0, 255, 8, 8)
+ bounds: 632 320 8 8
+ - image: solid-color(80, 40, 0, 255, 8, 8)
+ bounds: 640 320 8 8
+ - image: solid-color(81, 40, 0, 255, 8, 8)
+ bounds: 648 320 8 8
+ - image: solid-color(82, 40, 0, 255, 8, 8)
+ bounds: 656 320 8 8
+ - image: solid-color(83, 40, 0, 255, 8, 8)
+ bounds: 664 320 8 8
+ - image: solid-color(84, 40, 0, 255, 8, 8)
+ bounds: 672 320 8 8
+ - image: solid-color(85, 40, 0, 255, 8, 8)
+ bounds: 680 320 8 8
+ - image: solid-color(86, 40, 0, 255, 8, 8)
+ bounds: 688 320 8 8
+ - image: solid-color(87, 40, 0, 255, 8, 8)
+ bounds: 696 320 8 8
+ - image: solid-color(88, 40, 0, 255, 8, 8)
+ bounds: 704 320 8 8
+ - image: solid-color(89, 40, 0, 255, 8, 8)
+ bounds: 712 320 8 8
+ - image: solid-color(90, 40, 0, 255, 8, 8)
+ bounds: 720 320 8 8
+ - image: solid-color(91, 40, 0, 255, 8, 8)
+ bounds: 728 320 8 8
+ - image: solid-color(92, 40, 0, 255, 8, 8)
+ bounds: 736 320 8 8
+ - image: solid-color(93, 40, 0, 255, 8, 8)
+ bounds: 744 320 8 8
+ - image: solid-color(94, 40, 0, 255, 8, 8)
+ bounds: 752 320 8 8
+ - image: solid-color(95, 40, 0, 255, 8, 8)
+ bounds: 760 320 8 8
+ - image: solid-color(96, 40, 0, 255, 8, 8)
+ bounds: 768 320 8 8
+ - image: solid-color(97, 40, 0, 255, 8, 8)
+ bounds: 776 320 8 8
+ - image: solid-color(98, 40, 0, 255, 8, 8)
+ bounds: 784 320 8 8
+ - image: solid-color(99, 40, 0, 255, 8, 8)
+ bounds: 792 320 8 8
+ - image: solid-color(100, 40, 0, 255, 8, 8)
+ bounds: 800 320 8 8
+ - image: solid-color(101, 40, 0, 255, 8, 8)
+ bounds: 808 320 8 8
+ - image: solid-color(102, 40, 0, 255, 8, 8)
+ bounds: 816 320 8 8
+ - image: solid-color(103, 40, 0, 255, 8, 8)
+ bounds: 824 320 8 8
+ - image: solid-color(104, 40, 0, 255, 8, 8)
+ bounds: 832 320 8 8
+ - image: solid-color(105, 40, 0, 255, 8, 8)
+ bounds: 840 320 8 8
+ - image: solid-color(106, 40, 0, 255, 8, 8)
+ bounds: 848 320 8 8
+ - image: solid-color(107, 40, 0, 255, 8, 8)
+ bounds: 856 320 8 8
+ - image: solid-color(108, 40, 0, 255, 8, 8)
+ bounds: 864 320 8 8
+ - image: solid-color(109, 40, 0, 255, 8, 8)
+ bounds: 872 320 8 8
+ - image: solid-color(110, 40, 0, 255, 8, 8)
+ bounds: 880 320 8 8
+ - image: solid-color(111, 40, 0, 255, 8, 8)
+ bounds: 888 320 8 8
+ - image: solid-color(112, 40, 0, 255, 8, 8)
+ bounds: 896 320 8 8
+ - image: solid-color(113, 40, 0, 255, 8, 8)
+ bounds: 904 320 8 8
+ - image: solid-color(114, 40, 0, 255, 8, 8)
+ bounds: 912 320 8 8
+ - image: solid-color(115, 40, 0, 255, 8, 8)
+ bounds: 920 320 8 8
+ - image: solid-color(116, 40, 0, 255, 8, 8)
+ bounds: 928 320 8 8
+ - image: solid-color(117, 40, 0, 255, 8, 8)
+ bounds: 936 320 8 8
+ - image: solid-color(118, 40, 0, 255, 8, 8)
+ bounds: 944 320 8 8
+ - image: solid-color(119, 40, 0, 255, 8, 8)
+ bounds: 952 320 8 8
+ - image: solid-color(120, 40, 0, 255, 8, 8)
+ bounds: 960 320 8 8
+ - image: solid-color(121, 40, 0, 255, 8, 8)
+ bounds: 968 320 8 8
+ - image: solid-color(122, 40, 0, 255, 8, 8)
+ bounds: 976 320 8 8
+ - image: solid-color(123, 40, 0, 255, 8, 8)
+ bounds: 984 320 8 8
+ - image: solid-color(124, 40, 0, 255, 8, 8)
+ bounds: 992 320 8 8
+ - image: solid-color(125, 40, 0, 255, 8, 8)
+ bounds: 1000 320 8 8
+ - image: solid-color(126, 40, 0, 255, 8, 8)
+ bounds: 1008 320 8 8
+ - image: solid-color(127, 40, 0, 255, 8, 8)
+ bounds: 1016 320 8 8
+ - image: solid-color(0, 41, 0, 255, 8, 8)
+ bounds: 0 328 8 8
+ - image: solid-color(1, 41, 0, 255, 8, 8)
+ bounds: 8 328 8 8
+ - image: solid-color(2, 41, 0, 255, 8, 8)
+ bounds: 16 328 8 8
+ - image: solid-color(3, 41, 0, 255, 8, 8)
+ bounds: 24 328 8 8
+ - image: solid-color(4, 41, 0, 255, 8, 8)
+ bounds: 32 328 8 8
+ - image: solid-color(5, 41, 0, 255, 8, 8)
+ bounds: 40 328 8 8
+ - image: solid-color(6, 41, 0, 255, 8, 8)
+ bounds: 48 328 8 8
+ - image: solid-color(7, 41, 0, 255, 8, 8)
+ bounds: 56 328 8 8
+ - image: solid-color(8, 41, 0, 255, 8, 8)
+ bounds: 64 328 8 8
+ - image: solid-color(9, 41, 0, 255, 8, 8)
+ bounds: 72 328 8 8
+ - image: solid-color(10, 41, 0, 255, 8, 8)
+ bounds: 80 328 8 8
+ - image: solid-color(11, 41, 0, 255, 8, 8)
+ bounds: 88 328 8 8
+ - image: solid-color(12, 41, 0, 255, 8, 8)
+ bounds: 96 328 8 8
+ - image: solid-color(13, 41, 0, 255, 8, 8)
+ bounds: 104 328 8 8
+ - image: solid-color(14, 41, 0, 255, 8, 8)
+ bounds: 112 328 8 8
+ - image: solid-color(15, 41, 0, 255, 8, 8)
+ bounds: 120 328 8 8
+ - image: solid-color(16, 41, 0, 255, 8, 8)
+ bounds: 128 328 8 8
+ - image: solid-color(17, 41, 0, 255, 8, 8)
+ bounds: 136 328 8 8
+ - image: solid-color(18, 41, 0, 255, 8, 8)
+ bounds: 144 328 8 8
+ - image: solid-color(19, 41, 0, 255, 8, 8)
+ bounds: 152 328 8 8
+ - image: solid-color(20, 41, 0, 255, 8, 8)
+ bounds: 160 328 8 8
+ - image: solid-color(21, 41, 0, 255, 8, 8)
+ bounds: 168 328 8 8
+ - image: solid-color(22, 41, 0, 255, 8, 8)
+ bounds: 176 328 8 8
+ - image: solid-color(23, 41, 0, 255, 8, 8)
+ bounds: 184 328 8 8
+ - image: solid-color(24, 41, 0, 255, 8, 8)
+ bounds: 192 328 8 8
+ - image: solid-color(25, 41, 0, 255, 8, 8)
+ bounds: 200 328 8 8
+ - image: solid-color(26, 41, 0, 255, 8, 8)
+ bounds: 208 328 8 8
+ - image: solid-color(27, 41, 0, 255, 8, 8)
+ bounds: 216 328 8 8
+ - image: solid-color(28, 41, 0, 255, 8, 8)
+ bounds: 224 328 8 8
+ - image: solid-color(29, 41, 0, 255, 8, 8)
+ bounds: 232 328 8 8
+ - image: solid-color(30, 41, 0, 255, 8, 8)
+ bounds: 240 328 8 8
+ - image: solid-color(31, 41, 0, 255, 8, 8)
+ bounds: 248 328 8 8
+ - image: solid-color(32, 41, 0, 255, 8, 8)
+ bounds: 256 328 8 8
+ - image: solid-color(33, 41, 0, 255, 8, 8)
+ bounds: 264 328 8 8
+ - image: solid-color(34, 41, 0, 255, 8, 8)
+ bounds: 272 328 8 8
+ - image: solid-color(35, 41, 0, 255, 8, 8)
+ bounds: 280 328 8 8
+ - image: solid-color(36, 41, 0, 255, 8, 8)
+ bounds: 288 328 8 8
+ - image: solid-color(37, 41, 0, 255, 8, 8)
+ bounds: 296 328 8 8
+ - image: solid-color(38, 41, 0, 255, 8, 8)
+ bounds: 304 328 8 8
+ - image: solid-color(39, 41, 0, 255, 8, 8)
+ bounds: 312 328 8 8
+ - image: solid-color(40, 41, 0, 255, 8, 8)
+ bounds: 320 328 8 8
+ - image: solid-color(41, 41, 0, 255, 8, 8)
+ bounds: 328 328 8 8
+ - image: solid-color(42, 41, 0, 255, 8, 8)
+ bounds: 336 328 8 8
+ - image: solid-color(43, 41, 0, 255, 8, 8)
+ bounds: 344 328 8 8
+ - image: solid-color(44, 41, 0, 255, 8, 8)
+ bounds: 352 328 8 8
+ - image: solid-color(45, 41, 0, 255, 8, 8)
+ bounds: 360 328 8 8
+ - image: solid-color(46, 41, 0, 255, 8, 8)
+ bounds: 368 328 8 8
+ - image: solid-color(47, 41, 0, 255, 8, 8)
+ bounds: 376 328 8 8
+ - image: solid-color(48, 41, 0, 255, 8, 8)
+ bounds: 384 328 8 8
+ - image: solid-color(49, 41, 0, 255, 8, 8)
+ bounds: 392 328 8 8
+ - image: solid-color(50, 41, 0, 255, 8, 8)
+ bounds: 400 328 8 8
+ - image: solid-color(51, 41, 0, 255, 8, 8)
+ bounds: 408 328 8 8
+ - image: solid-color(52, 41, 0, 255, 8, 8)
+ bounds: 416 328 8 8
+ - image: solid-color(53, 41, 0, 255, 8, 8)
+ bounds: 424 328 8 8
+ - image: solid-color(54, 41, 0, 255, 8, 8)
+ bounds: 432 328 8 8
+ - image: solid-color(55, 41, 0, 255, 8, 8)
+ bounds: 440 328 8 8
+ - image: solid-color(56, 41, 0, 255, 8, 8)
+ bounds: 448 328 8 8
+ - image: solid-color(57, 41, 0, 255, 8, 8)
+ bounds: 456 328 8 8
+ - image: solid-color(58, 41, 0, 255, 8, 8)
+ bounds: 464 328 8 8
+ - image: solid-color(59, 41, 0, 255, 8, 8)
+ bounds: 472 328 8 8
+ - image: solid-color(60, 41, 0, 255, 8, 8)
+ bounds: 480 328 8 8
+ - image: solid-color(61, 41, 0, 255, 8, 8)
+ bounds: 488 328 8 8
+ - image: solid-color(62, 41, 0, 255, 8, 8)
+ bounds: 496 328 8 8
+ - image: solid-color(63, 41, 0, 255, 8, 8)
+ bounds: 504 328 8 8
+ - image: solid-color(64, 41, 0, 255, 8, 8)
+ bounds: 512 328 8 8
+ - image: solid-color(65, 41, 0, 255, 8, 8)
+ bounds: 520 328 8 8
+ - image: solid-color(66, 41, 0, 255, 8, 8)
+ bounds: 528 328 8 8
+ - image: solid-color(67, 41, 0, 255, 8, 8)
+ bounds: 536 328 8 8
+ - image: solid-color(68, 41, 0, 255, 8, 8)
+ bounds: 544 328 8 8
+ - image: solid-color(69, 41, 0, 255, 8, 8)
+ bounds: 552 328 8 8
+ - image: solid-color(70, 41, 0, 255, 8, 8)
+ bounds: 560 328 8 8
+ - image: solid-color(71, 41, 0, 255, 8, 8)
+ bounds: 568 328 8 8
+ - image: solid-color(72, 41, 0, 255, 8, 8)
+ bounds: 576 328 8 8
+ - image: solid-color(73, 41, 0, 255, 8, 8)
+ bounds: 584 328 8 8
+ - image: solid-color(74, 41, 0, 255, 8, 8)
+ bounds: 592 328 8 8
+ - image: solid-color(75, 41, 0, 255, 8, 8)
+ bounds: 600 328 8 8
+ - image: solid-color(76, 41, 0, 255, 8, 8)
+ bounds: 608 328 8 8
+ - image: solid-color(77, 41, 0, 255, 8, 8)
+ bounds: 616 328 8 8
+ - image: solid-color(78, 41, 0, 255, 8, 8)
+ bounds: 624 328 8 8
+ - image: solid-color(79, 41, 0, 255, 8, 8)
+ bounds: 632 328 8 8
+ - image: solid-color(80, 41, 0, 255, 8, 8)
+ bounds: 640 328 8 8
+ - image: solid-color(81, 41, 0, 255, 8, 8)
+ bounds: 648 328 8 8
+ - image: solid-color(82, 41, 0, 255, 8, 8)
+ bounds: 656 328 8 8
+ - image: solid-color(83, 41, 0, 255, 8, 8)
+ bounds: 664 328 8 8
+ - image: solid-color(84, 41, 0, 255, 8, 8)
+ bounds: 672 328 8 8
+ - image: solid-color(85, 41, 0, 255, 8, 8)
+ bounds: 680 328 8 8
+ - image: solid-color(86, 41, 0, 255, 8, 8)
+ bounds: 688 328 8 8
+ - image: solid-color(87, 41, 0, 255, 8, 8)
+ bounds: 696 328 8 8
+ - image: solid-color(88, 41, 0, 255, 8, 8)
+ bounds: 704 328 8 8
+ - image: solid-color(89, 41, 0, 255, 8, 8)
+ bounds: 712 328 8 8
+ - image: solid-color(90, 41, 0, 255, 8, 8)
+ bounds: 720 328 8 8
+ - image: solid-color(91, 41, 0, 255, 8, 8)
+ bounds: 728 328 8 8
+ - image: solid-color(92, 41, 0, 255, 8, 8)
+ bounds: 736 328 8 8
+ - image: solid-color(93, 41, 0, 255, 8, 8)
+ bounds: 744 328 8 8
+ - image: solid-color(94, 41, 0, 255, 8, 8)
+ bounds: 752 328 8 8
+ - image: solid-color(95, 41, 0, 255, 8, 8)
+ bounds: 760 328 8 8
+ - image: solid-color(96, 41, 0, 255, 8, 8)
+ bounds: 768 328 8 8
+ - image: solid-color(97, 41, 0, 255, 8, 8)
+ bounds: 776 328 8 8
+ - image: solid-color(98, 41, 0, 255, 8, 8)
+ bounds: 784 328 8 8
+ - image: solid-color(99, 41, 0, 255, 8, 8)
+ bounds: 792 328 8 8
+ - image: solid-color(100, 41, 0, 255, 8, 8)
+ bounds: 800 328 8 8
+ - image: solid-color(101, 41, 0, 255, 8, 8)
+ bounds: 808 328 8 8
+ - image: solid-color(102, 41, 0, 255, 8, 8)
+ bounds: 816 328 8 8
+ - image: solid-color(103, 41, 0, 255, 8, 8)
+ bounds: 824 328 8 8
+ - image: solid-color(104, 41, 0, 255, 8, 8)
+ bounds: 832 328 8 8
+ - image: solid-color(105, 41, 0, 255, 8, 8)
+ bounds: 840 328 8 8
+ - image: solid-color(106, 41, 0, 255, 8, 8)
+ bounds: 848 328 8 8
+ - image: solid-color(107, 41, 0, 255, 8, 8)
+ bounds: 856 328 8 8
+ - image: solid-color(108, 41, 0, 255, 8, 8)
+ bounds: 864 328 8 8
+ - image: solid-color(109, 41, 0, 255, 8, 8)
+ bounds: 872 328 8 8
+ - image: solid-color(110, 41, 0, 255, 8, 8)
+ bounds: 880 328 8 8
+ - image: solid-color(111, 41, 0, 255, 8, 8)
+ bounds: 888 328 8 8
+ - image: solid-color(112, 41, 0, 255, 8, 8)
+ bounds: 896 328 8 8
+ - image: solid-color(113, 41, 0, 255, 8, 8)
+ bounds: 904 328 8 8
+ - image: solid-color(114, 41, 0, 255, 8, 8)
+ bounds: 912 328 8 8
+ - image: solid-color(115, 41, 0, 255, 8, 8)
+ bounds: 920 328 8 8
+ - image: solid-color(116, 41, 0, 255, 8, 8)
+ bounds: 928 328 8 8
+ - image: solid-color(117, 41, 0, 255, 8, 8)
+ bounds: 936 328 8 8
+ - image: solid-color(118, 41, 0, 255, 8, 8)
+ bounds: 944 328 8 8
+ - image: solid-color(119, 41, 0, 255, 8, 8)
+ bounds: 952 328 8 8
+ - image: solid-color(120, 41, 0, 255, 8, 8)
+ bounds: 960 328 8 8
+ - image: solid-color(121, 41, 0, 255, 8, 8)
+ bounds: 968 328 8 8
+ - image: solid-color(122, 41, 0, 255, 8, 8)
+ bounds: 976 328 8 8
+ - image: solid-color(123, 41, 0, 255, 8, 8)
+ bounds: 984 328 8 8
+ - image: solid-color(124, 41, 0, 255, 8, 8)
+ bounds: 992 328 8 8
+ - image: solid-color(125, 41, 0, 255, 8, 8)
+ bounds: 1000 328 8 8
+ - image: solid-color(126, 41, 0, 255, 8, 8)
+ bounds: 1008 328 8 8
+ - image: solid-color(127, 41, 0, 255, 8, 8)
+ bounds: 1016 328 8 8
+ - image: solid-color(0, 42, 0, 255, 8, 8)
+ bounds: 0 336 8 8
+ - image: solid-color(1, 42, 0, 255, 8, 8)
+ bounds: 8 336 8 8
+ - image: solid-color(2, 42, 0, 255, 8, 8)
+ bounds: 16 336 8 8
+ - image: solid-color(3, 42, 0, 255, 8, 8)
+ bounds: 24 336 8 8
+ - image: solid-color(4, 42, 0, 255, 8, 8)
+ bounds: 32 336 8 8
+ - image: solid-color(5, 42, 0, 255, 8, 8)
+ bounds: 40 336 8 8
+ - image: solid-color(6, 42, 0, 255, 8, 8)
+ bounds: 48 336 8 8
+ - image: solid-color(7, 42, 0, 255, 8, 8)
+ bounds: 56 336 8 8
+ - image: solid-color(8, 42, 0, 255, 8, 8)
+ bounds: 64 336 8 8
+ - image: solid-color(9, 42, 0, 255, 8, 8)
+ bounds: 72 336 8 8
+ - image: solid-color(10, 42, 0, 255, 8, 8)
+ bounds: 80 336 8 8
+ - image: solid-color(11, 42, 0, 255, 8, 8)
+ bounds: 88 336 8 8
+ - image: solid-color(12, 42, 0, 255, 8, 8)
+ bounds: 96 336 8 8
+ - image: solid-color(13, 42, 0, 255, 8, 8)
+ bounds: 104 336 8 8
+ - image: solid-color(14, 42, 0, 255, 8, 8)
+ bounds: 112 336 8 8
+ - image: solid-color(15, 42, 0, 255, 8, 8)
+ bounds: 120 336 8 8
+ - image: solid-color(16, 42, 0, 255, 8, 8)
+ bounds: 128 336 8 8
+ - image: solid-color(17, 42, 0, 255, 8, 8)
+ bounds: 136 336 8 8
+ - image: solid-color(18, 42, 0, 255, 8, 8)
+ bounds: 144 336 8 8
+ - image: solid-color(19, 42, 0, 255, 8, 8)
+ bounds: 152 336 8 8
+ - image: solid-color(20, 42, 0, 255, 8, 8)
+ bounds: 160 336 8 8
+ - image: solid-color(21, 42, 0, 255, 8, 8)
+ bounds: 168 336 8 8
+ - image: solid-color(22, 42, 0, 255, 8, 8)
+ bounds: 176 336 8 8
+ - image: solid-color(23, 42, 0, 255, 8, 8)
+ bounds: 184 336 8 8
+ - image: solid-color(24, 42, 0, 255, 8, 8)
+ bounds: 192 336 8 8
+ - image: solid-color(25, 42, 0, 255, 8, 8)
+ bounds: 200 336 8 8
+ - image: solid-color(26, 42, 0, 255, 8, 8)
+ bounds: 208 336 8 8
+ - image: solid-color(27, 42, 0, 255, 8, 8)
+ bounds: 216 336 8 8
+ - image: solid-color(28, 42, 0, 255, 8, 8)
+ bounds: 224 336 8 8
+ - image: solid-color(29, 42, 0, 255, 8, 8)
+ bounds: 232 336 8 8
+ - image: solid-color(30, 42, 0, 255, 8, 8)
+ bounds: 240 336 8 8
+ - image: solid-color(31, 42, 0, 255, 8, 8)
+ bounds: 248 336 8 8
+ - image: solid-color(32, 42, 0, 255, 8, 8)
+ bounds: 256 336 8 8
+ - image: solid-color(33, 42, 0, 255, 8, 8)
+ bounds: 264 336 8 8
+ - image: solid-color(34, 42, 0, 255, 8, 8)
+ bounds: 272 336 8 8
+ - image: solid-color(35, 42, 0, 255, 8, 8)
+ bounds: 280 336 8 8
+ - image: solid-color(36, 42, 0, 255, 8, 8)
+ bounds: 288 336 8 8
+ - image: solid-color(37, 42, 0, 255, 8, 8)
+ bounds: 296 336 8 8
+ - image: solid-color(38, 42, 0, 255, 8, 8)
+ bounds: 304 336 8 8
+ - image: solid-color(39, 42, 0, 255, 8, 8)
+ bounds: 312 336 8 8
+ - image: solid-color(40, 42, 0, 255, 8, 8)
+ bounds: 320 336 8 8
+ - image: solid-color(41, 42, 0, 255, 8, 8)
+ bounds: 328 336 8 8
+ - image: solid-color(42, 42, 0, 255, 8, 8)
+ bounds: 336 336 8 8
+ - image: solid-color(43, 42, 0, 255, 8, 8)
+ bounds: 344 336 8 8
+ - image: solid-color(44, 42, 0, 255, 8, 8)
+ bounds: 352 336 8 8
+ - image: solid-color(45, 42, 0, 255, 8, 8)
+ bounds: 360 336 8 8
+ - image: solid-color(46, 42, 0, 255, 8, 8)
+ bounds: 368 336 8 8
+ - image: solid-color(47, 42, 0, 255, 8, 8)
+ bounds: 376 336 8 8
+ - image: solid-color(48, 42, 0, 255, 8, 8)
+ bounds: 384 336 8 8
+ - image: solid-color(49, 42, 0, 255, 8, 8)
+ bounds: 392 336 8 8
+ - image: solid-color(50, 42, 0, 255, 8, 8)
+ bounds: 400 336 8 8
+ - image: solid-color(51, 42, 0, 255, 8, 8)
+ bounds: 408 336 8 8
+ - image: solid-color(52, 42, 0, 255, 8, 8)
+ bounds: 416 336 8 8
+ - image: solid-color(53, 42, 0, 255, 8, 8)
+ bounds: 424 336 8 8
+ - image: solid-color(54, 42, 0, 255, 8, 8)
+ bounds: 432 336 8 8
+ - image: solid-color(55, 42, 0, 255, 8, 8)
+ bounds: 440 336 8 8
+ - image: solid-color(56, 42, 0, 255, 8, 8)
+ bounds: 448 336 8 8
+ - image: solid-color(57, 42, 0, 255, 8, 8)
+ bounds: 456 336 8 8
+ - image: solid-color(58, 42, 0, 255, 8, 8)
+ bounds: 464 336 8 8
+ - image: solid-color(59, 42, 0, 255, 8, 8)
+ bounds: 472 336 8 8
+ - image: solid-color(60, 42, 0, 255, 8, 8)
+ bounds: 480 336 8 8
+ - image: solid-color(61, 42, 0, 255, 8, 8)
+ bounds: 488 336 8 8
+ - image: solid-color(62, 42, 0, 255, 8, 8)
+ bounds: 496 336 8 8
+ - image: solid-color(63, 42, 0, 255, 8, 8)
+ bounds: 504 336 8 8
+ - image: solid-color(64, 42, 0, 255, 8, 8)
+ bounds: 512 336 8 8
+ - image: solid-color(65, 42, 0, 255, 8, 8)
+ bounds: 520 336 8 8
+ - image: solid-color(66, 42, 0, 255, 8, 8)
+ bounds: 528 336 8 8
+ - image: solid-color(67, 42, 0, 255, 8, 8)
+ bounds: 536 336 8 8
+ - image: solid-color(68, 42, 0, 255, 8, 8)
+ bounds: 544 336 8 8
+ - image: solid-color(69, 42, 0, 255, 8, 8)
+ bounds: 552 336 8 8
+ - image: solid-color(70, 42, 0, 255, 8, 8)
+ bounds: 560 336 8 8
+ - image: solid-color(71, 42, 0, 255, 8, 8)
+ bounds: 568 336 8 8
+ - image: solid-color(72, 42, 0, 255, 8, 8)
+ bounds: 576 336 8 8
+ - image: solid-color(73, 42, 0, 255, 8, 8)
+ bounds: 584 336 8 8
+ - image: solid-color(74, 42, 0, 255, 8, 8)
+ bounds: 592 336 8 8
+ - image: solid-color(75, 42, 0, 255, 8, 8)
+ bounds: 600 336 8 8
+ - image: solid-color(76, 42, 0, 255, 8, 8)
+ bounds: 608 336 8 8
+ - image: solid-color(77, 42, 0, 255, 8, 8)
+ bounds: 616 336 8 8
+ - image: solid-color(78, 42, 0, 255, 8, 8)
+ bounds: 624 336 8 8
+ - image: solid-color(79, 42, 0, 255, 8, 8)
+ bounds: 632 336 8 8
+ - image: solid-color(80, 42, 0, 255, 8, 8)
+ bounds: 640 336 8 8
+ - image: solid-color(81, 42, 0, 255, 8, 8)
+ bounds: 648 336 8 8
+ - image: solid-color(82, 42, 0, 255, 8, 8)
+ bounds: 656 336 8 8
+ - image: solid-color(83, 42, 0, 255, 8, 8)
+ bounds: 664 336 8 8
+ - image: solid-color(84, 42, 0, 255, 8, 8)
+ bounds: 672 336 8 8
+ - image: solid-color(85, 42, 0, 255, 8, 8)
+ bounds: 680 336 8 8
+ - image: solid-color(86, 42, 0, 255, 8, 8)
+ bounds: 688 336 8 8
+ - image: solid-color(87, 42, 0, 255, 8, 8)
+ bounds: 696 336 8 8
+ - image: solid-color(88, 42, 0, 255, 8, 8)
+ bounds: 704 336 8 8
+ - image: solid-color(89, 42, 0, 255, 8, 8)
+ bounds: 712 336 8 8
+ - image: solid-color(90, 42, 0, 255, 8, 8)
+ bounds: 720 336 8 8
+ - image: solid-color(91, 42, 0, 255, 8, 8)
+ bounds: 728 336 8 8
+ - image: solid-color(92, 42, 0, 255, 8, 8)
+ bounds: 736 336 8 8
+ - image: solid-color(93, 42, 0, 255, 8, 8)
+ bounds: 744 336 8 8
+ - image: solid-color(94, 42, 0, 255, 8, 8)
+ bounds: 752 336 8 8
+ - image: solid-color(95, 42, 0, 255, 8, 8)
+ bounds: 760 336 8 8
+ - image: solid-color(96, 42, 0, 255, 8, 8)
+ bounds: 768 336 8 8
+ - image: solid-color(97, 42, 0, 255, 8, 8)
+ bounds: 776 336 8 8
+ - image: solid-color(98, 42, 0, 255, 8, 8)
+ bounds: 784 336 8 8
+ - image: solid-color(99, 42, 0, 255, 8, 8)
+ bounds: 792 336 8 8
+ - image: solid-color(100, 42, 0, 255, 8, 8)
+ bounds: 800 336 8 8
+ - image: solid-color(101, 42, 0, 255, 8, 8)
+ bounds: 808 336 8 8
+ - image: solid-color(102, 42, 0, 255, 8, 8)
+ bounds: 816 336 8 8
+ - image: solid-color(103, 42, 0, 255, 8, 8)
+ bounds: 824 336 8 8
+ - image: solid-color(104, 42, 0, 255, 8, 8)
+ bounds: 832 336 8 8
+ - image: solid-color(105, 42, 0, 255, 8, 8)
+ bounds: 840 336 8 8
+ - image: solid-color(106, 42, 0, 255, 8, 8)
+ bounds: 848 336 8 8
+ - image: solid-color(107, 42, 0, 255, 8, 8)
+ bounds: 856 336 8 8
+ - image: solid-color(108, 42, 0, 255, 8, 8)
+ bounds: 864 336 8 8
+ - image: solid-color(109, 42, 0, 255, 8, 8)
+ bounds: 872 336 8 8
+ - image: solid-color(110, 42, 0, 255, 8, 8)
+ bounds: 880 336 8 8
+ - image: solid-color(111, 42, 0, 255, 8, 8)
+ bounds: 888 336 8 8
+ - image: solid-color(112, 42, 0, 255, 8, 8)
+ bounds: 896 336 8 8
+ - image: solid-color(113, 42, 0, 255, 8, 8)
+ bounds: 904 336 8 8
+ - image: solid-color(114, 42, 0, 255, 8, 8)
+ bounds: 912 336 8 8
+ - image: solid-color(115, 42, 0, 255, 8, 8)
+ bounds: 920 336 8 8
+ - image: solid-color(116, 42, 0, 255, 8, 8)
+ bounds: 928 336 8 8
+ - image: solid-color(117, 42, 0, 255, 8, 8)
+ bounds: 936 336 8 8
+ - image: solid-color(118, 42, 0, 255, 8, 8)
+ bounds: 944 336 8 8
+ - image: solid-color(119, 42, 0, 255, 8, 8)
+ bounds: 952 336 8 8
+ - image: solid-color(120, 42, 0, 255, 8, 8)
+ bounds: 960 336 8 8
+ - image: solid-color(121, 42, 0, 255, 8, 8)
+ bounds: 968 336 8 8
+ - image: solid-color(122, 42, 0, 255, 8, 8)
+ bounds: 976 336 8 8
+ - image: solid-color(123, 42, 0, 255, 8, 8)
+ bounds: 984 336 8 8
+ - image: solid-color(124, 42, 0, 255, 8, 8)
+ bounds: 992 336 8 8
+ - image: solid-color(125, 42, 0, 255, 8, 8)
+ bounds: 1000 336 8 8
+ - image: solid-color(126, 42, 0, 255, 8, 8)
+ bounds: 1008 336 8 8
+ - image: solid-color(127, 42, 0, 255, 8, 8)
+ bounds: 1016 336 8 8
+ - image: solid-color(0, 43, 0, 255, 8, 8)
+ bounds: 0 344 8 8
+ - image: solid-color(1, 43, 0, 255, 8, 8)
+ bounds: 8 344 8 8
+ - image: solid-color(2, 43, 0, 255, 8, 8)
+ bounds: 16 344 8 8
+ - image: solid-color(3, 43, 0, 255, 8, 8)
+ bounds: 24 344 8 8
+ - image: solid-color(4, 43, 0, 255, 8, 8)
+ bounds: 32 344 8 8
+ - image: solid-color(5, 43, 0, 255, 8, 8)
+ bounds: 40 344 8 8
+ - image: solid-color(6, 43, 0, 255, 8, 8)
+ bounds: 48 344 8 8
+ - image: solid-color(7, 43, 0, 255, 8, 8)
+ bounds: 56 344 8 8
+ - image: solid-color(8, 43, 0, 255, 8, 8)
+ bounds: 64 344 8 8
+ - image: solid-color(9, 43, 0, 255, 8, 8)
+ bounds: 72 344 8 8
+ - image: solid-color(10, 43, 0, 255, 8, 8)
+ bounds: 80 344 8 8
+ - image: solid-color(11, 43, 0, 255, 8, 8)
+ bounds: 88 344 8 8
+ - image: solid-color(12, 43, 0, 255, 8, 8)
+ bounds: 96 344 8 8
+ - image: solid-color(13, 43, 0, 255, 8, 8)
+ bounds: 104 344 8 8
+ - image: solid-color(14, 43, 0, 255, 8, 8)
+ bounds: 112 344 8 8
+ - image: solid-color(15, 43, 0, 255, 8, 8)
+ bounds: 120 344 8 8
+ - image: solid-color(16, 43, 0, 255, 8, 8)
+ bounds: 128 344 8 8
+ - image: solid-color(17, 43, 0, 255, 8, 8)
+ bounds: 136 344 8 8
+ - image: solid-color(18, 43, 0, 255, 8, 8)
+ bounds: 144 344 8 8
+ - image: solid-color(19, 43, 0, 255, 8, 8)
+ bounds: 152 344 8 8
+ - image: solid-color(20, 43, 0, 255, 8, 8)
+ bounds: 160 344 8 8
+ - image: solid-color(21, 43, 0, 255, 8, 8)
+ bounds: 168 344 8 8
+ - image: solid-color(22, 43, 0, 255, 8, 8)
+ bounds: 176 344 8 8
+ - image: solid-color(23, 43, 0, 255, 8, 8)
+ bounds: 184 344 8 8
+ - image: solid-color(24, 43, 0, 255, 8, 8)
+ bounds: 192 344 8 8
+ - image: solid-color(25, 43, 0, 255, 8, 8)
+ bounds: 200 344 8 8
+ - image: solid-color(26, 43, 0, 255, 8, 8)
+ bounds: 208 344 8 8
+ - image: solid-color(27, 43, 0, 255, 8, 8)
+ bounds: 216 344 8 8
+ - image: solid-color(28, 43, 0, 255, 8, 8)
+ bounds: 224 344 8 8
+ - image: solid-color(29, 43, 0, 255, 8, 8)
+ bounds: 232 344 8 8
+ - image: solid-color(30, 43, 0, 255, 8, 8)
+ bounds: 240 344 8 8
+ - image: solid-color(31, 43, 0, 255, 8, 8)
+ bounds: 248 344 8 8
+ - image: solid-color(32, 43, 0, 255, 8, 8)
+ bounds: 256 344 8 8
+ - image: solid-color(33, 43, 0, 255, 8, 8)
+ bounds: 264 344 8 8
+ - image: solid-color(34, 43, 0, 255, 8, 8)
+ bounds: 272 344 8 8
+ - image: solid-color(35, 43, 0, 255, 8, 8)
+ bounds: 280 344 8 8
+ - image: solid-color(36, 43, 0, 255, 8, 8)
+ bounds: 288 344 8 8
+ - image: solid-color(37, 43, 0, 255, 8, 8)
+ bounds: 296 344 8 8
+ - image: solid-color(38, 43, 0, 255, 8, 8)
+ bounds: 304 344 8 8
+ - image: solid-color(39, 43, 0, 255, 8, 8)
+ bounds: 312 344 8 8
+ - image: solid-color(40, 43, 0, 255, 8, 8)
+ bounds: 320 344 8 8
+ - image: solid-color(41, 43, 0, 255, 8, 8)
+ bounds: 328 344 8 8
+ - image: solid-color(42, 43, 0, 255, 8, 8)
+ bounds: 336 344 8 8
+ - image: solid-color(43, 43, 0, 255, 8, 8)
+ bounds: 344 344 8 8
+ - image: solid-color(44, 43, 0, 255, 8, 8)
+ bounds: 352 344 8 8
+ - image: solid-color(45, 43, 0, 255, 8, 8)
+ bounds: 360 344 8 8
+ - image: solid-color(46, 43, 0, 255, 8, 8)
+ bounds: 368 344 8 8
+ - image: solid-color(47, 43, 0, 255, 8, 8)
+ bounds: 376 344 8 8
+ - image: solid-color(48, 43, 0, 255, 8, 8)
+ bounds: 384 344 8 8
+ - image: solid-color(49, 43, 0, 255, 8, 8)
+ bounds: 392 344 8 8
+ - image: solid-color(50, 43, 0, 255, 8, 8)
+ bounds: 400 344 8 8
+ - image: solid-color(51, 43, 0, 255, 8, 8)
+ bounds: 408 344 8 8
+ - image: solid-color(52, 43, 0, 255, 8, 8)
+ bounds: 416 344 8 8
+ - image: solid-color(53, 43, 0, 255, 8, 8)
+ bounds: 424 344 8 8
+ - image: solid-color(54, 43, 0, 255, 8, 8)
+ bounds: 432 344 8 8
+ - image: solid-color(55, 43, 0, 255, 8, 8)
+ bounds: 440 344 8 8
+ - image: solid-color(56, 43, 0, 255, 8, 8)
+ bounds: 448 344 8 8
+ - image: solid-color(57, 43, 0, 255, 8, 8)
+ bounds: 456 344 8 8
+ - image: solid-color(58, 43, 0, 255, 8, 8)
+ bounds: 464 344 8 8
+ - image: solid-color(59, 43, 0, 255, 8, 8)
+ bounds: 472 344 8 8
+ - image: solid-color(60, 43, 0, 255, 8, 8)
+ bounds: 480 344 8 8
+ - image: solid-color(61, 43, 0, 255, 8, 8)
+ bounds: 488 344 8 8
+ - image: solid-color(62, 43, 0, 255, 8, 8)
+ bounds: 496 344 8 8
+ - image: solid-color(63, 43, 0, 255, 8, 8)
+ bounds: 504 344 8 8
+ - image: solid-color(64, 43, 0, 255, 8, 8)
+ bounds: 512 344 8 8
+ - image: solid-color(65, 43, 0, 255, 8, 8)
+ bounds: 520 344 8 8
+ - image: solid-color(66, 43, 0, 255, 8, 8)
+ bounds: 528 344 8 8
+ - image: solid-color(67, 43, 0, 255, 8, 8)
+ bounds: 536 344 8 8
+ - image: solid-color(68, 43, 0, 255, 8, 8)
+ bounds: 544 344 8 8
+ - image: solid-color(69, 43, 0, 255, 8, 8)
+ bounds: 552 344 8 8
+ - image: solid-color(70, 43, 0, 255, 8, 8)
+ bounds: 560 344 8 8
+ - image: solid-color(71, 43, 0, 255, 8, 8)
+ bounds: 568 344 8 8
+ - image: solid-color(72, 43, 0, 255, 8, 8)
+ bounds: 576 344 8 8
+ - image: solid-color(73, 43, 0, 255, 8, 8)
+ bounds: 584 344 8 8
+ - image: solid-color(74, 43, 0, 255, 8, 8)
+ bounds: 592 344 8 8
+ - image: solid-color(75, 43, 0, 255, 8, 8)
+ bounds: 600 344 8 8
+ - image: solid-color(76, 43, 0, 255, 8, 8)
+ bounds: 608 344 8 8
+ - image: solid-color(77, 43, 0, 255, 8, 8)
+ bounds: 616 344 8 8
+ - image: solid-color(78, 43, 0, 255, 8, 8)
+ bounds: 624 344 8 8
+ - image: solid-color(79, 43, 0, 255, 8, 8)
+ bounds: 632 344 8 8
+ - image: solid-color(80, 43, 0, 255, 8, 8)
+ bounds: 640 344 8 8
+ - image: solid-color(81, 43, 0, 255, 8, 8)
+ bounds: 648 344 8 8
+ - image: solid-color(82, 43, 0, 255, 8, 8)
+ bounds: 656 344 8 8
+ - image: solid-color(83, 43, 0, 255, 8, 8)
+ bounds: 664 344 8 8
+ - image: solid-color(84, 43, 0, 255, 8, 8)
+ bounds: 672 344 8 8
+ - image: solid-color(85, 43, 0, 255, 8, 8)
+ bounds: 680 344 8 8
+ - image: solid-color(86, 43, 0, 255, 8, 8)
+ bounds: 688 344 8 8
+ - image: solid-color(87, 43, 0, 255, 8, 8)
+ bounds: 696 344 8 8
+ - image: solid-color(88, 43, 0, 255, 8, 8)
+ bounds: 704 344 8 8
+ - image: solid-color(89, 43, 0, 255, 8, 8)
+ bounds: 712 344 8 8
+ - image: solid-color(90, 43, 0, 255, 8, 8)
+ bounds: 720 344 8 8
+ - image: solid-color(91, 43, 0, 255, 8, 8)
+ bounds: 728 344 8 8
+ - image: solid-color(92, 43, 0, 255, 8, 8)
+ bounds: 736 344 8 8
+ - image: solid-color(93, 43, 0, 255, 8, 8)
+ bounds: 744 344 8 8
+ - image: solid-color(94, 43, 0, 255, 8, 8)
+ bounds: 752 344 8 8
+ - image: solid-color(95, 43, 0, 255, 8, 8)
+ bounds: 760 344 8 8
+ - image: solid-color(96, 43, 0, 255, 8, 8)
+ bounds: 768 344 8 8
+ - image: solid-color(97, 43, 0, 255, 8, 8)
+ bounds: 776 344 8 8
+ - image: solid-color(98, 43, 0, 255, 8, 8)
+ bounds: 784 344 8 8
+ - image: solid-color(99, 43, 0, 255, 8, 8)
+ bounds: 792 344 8 8
+ - image: solid-color(100, 43, 0, 255, 8, 8)
+ bounds: 800 344 8 8
+ - image: solid-color(101, 43, 0, 255, 8, 8)
+ bounds: 808 344 8 8
+ - image: solid-color(102, 43, 0, 255, 8, 8)
+ bounds: 816 344 8 8
+ - image: solid-color(103, 43, 0, 255, 8, 8)
+ bounds: 824 344 8 8
+ - image: solid-color(104, 43, 0, 255, 8, 8)
+ bounds: 832 344 8 8
+ - image: solid-color(105, 43, 0, 255, 8, 8)
+ bounds: 840 344 8 8
+ - image: solid-color(106, 43, 0, 255, 8, 8)
+ bounds: 848 344 8 8
+ - image: solid-color(107, 43, 0, 255, 8, 8)
+ bounds: 856 344 8 8
+ - image: solid-color(108, 43, 0, 255, 8, 8)
+ bounds: 864 344 8 8
+ - image: solid-color(109, 43, 0, 255, 8, 8)
+ bounds: 872 344 8 8
+ - image: solid-color(110, 43, 0, 255, 8, 8)
+ bounds: 880 344 8 8
+ - image: solid-color(111, 43, 0, 255, 8, 8)
+ bounds: 888 344 8 8
+ - image: solid-color(112, 43, 0, 255, 8, 8)
+ bounds: 896 344 8 8
+ - image: solid-color(113, 43, 0, 255, 8, 8)
+ bounds: 904 344 8 8
+ - image: solid-color(114, 43, 0, 255, 8, 8)
+ bounds: 912 344 8 8
+ - image: solid-color(115, 43, 0, 255, 8, 8)
+ bounds: 920 344 8 8
+ - image: solid-color(116, 43, 0, 255, 8, 8)
+ bounds: 928 344 8 8
+ - image: solid-color(117, 43, 0, 255, 8, 8)
+ bounds: 936 344 8 8
+ - image: solid-color(118, 43, 0, 255, 8, 8)
+ bounds: 944 344 8 8
+ - image: solid-color(119, 43, 0, 255, 8, 8)
+ bounds: 952 344 8 8
+ - image: solid-color(120, 43, 0, 255, 8, 8)
+ bounds: 960 344 8 8
+ - image: solid-color(121, 43, 0, 255, 8, 8)
+ bounds: 968 344 8 8
+ - image: solid-color(122, 43, 0, 255, 8, 8)
+ bounds: 976 344 8 8
+ - image: solid-color(123, 43, 0, 255, 8, 8)
+ bounds: 984 344 8 8
+ - image: solid-color(124, 43, 0, 255, 8, 8)
+ bounds: 992 344 8 8
+ - image: solid-color(125, 43, 0, 255, 8, 8)
+ bounds: 1000 344 8 8
+ - image: solid-color(126, 43, 0, 255, 8, 8)
+ bounds: 1008 344 8 8
+ - image: solid-color(127, 43, 0, 255, 8, 8)
+ bounds: 1016 344 8 8
+ - image: solid-color(0, 44, 0, 255, 8, 8)
+ bounds: 0 352 8 8
+ - image: solid-color(1, 44, 0, 255, 8, 8)
+ bounds: 8 352 8 8
+ - image: solid-color(2, 44, 0, 255, 8, 8)
+ bounds: 16 352 8 8
+ - image: solid-color(3, 44, 0, 255, 8, 8)
+ bounds: 24 352 8 8
+ - image: solid-color(4, 44, 0, 255, 8, 8)
+ bounds: 32 352 8 8
+ - image: solid-color(5, 44, 0, 255, 8, 8)
+ bounds: 40 352 8 8
+ - image: solid-color(6, 44, 0, 255, 8, 8)
+ bounds: 48 352 8 8
+ - image: solid-color(7, 44, 0, 255, 8, 8)
+ bounds: 56 352 8 8
+ - image: solid-color(8, 44, 0, 255, 8, 8)
+ bounds: 64 352 8 8
+ - image: solid-color(9, 44, 0, 255, 8, 8)
+ bounds: 72 352 8 8
+ - image: solid-color(10, 44, 0, 255, 8, 8)
+ bounds: 80 352 8 8
+ - image: solid-color(11, 44, 0, 255, 8, 8)
+ bounds: 88 352 8 8
+ - image: solid-color(12, 44, 0, 255, 8, 8)
+ bounds: 96 352 8 8
+ - image: solid-color(13, 44, 0, 255, 8, 8)
+ bounds: 104 352 8 8
+ - image: solid-color(14, 44, 0, 255, 8, 8)
+ bounds: 112 352 8 8
+ - image: solid-color(15, 44, 0, 255, 8, 8)
+ bounds: 120 352 8 8
+ - image: solid-color(16, 44, 0, 255, 8, 8)
+ bounds: 128 352 8 8
+ - image: solid-color(17, 44, 0, 255, 8, 8)
+ bounds: 136 352 8 8
+ - image: solid-color(18, 44, 0, 255, 8, 8)
+ bounds: 144 352 8 8
+ - image: solid-color(19, 44, 0, 255, 8, 8)
+ bounds: 152 352 8 8
+ - image: solid-color(20, 44, 0, 255, 8, 8)
+ bounds: 160 352 8 8
+ - image: solid-color(21, 44, 0, 255, 8, 8)
+ bounds: 168 352 8 8
+ - image: solid-color(22, 44, 0, 255, 8, 8)
+ bounds: 176 352 8 8
+ - image: solid-color(23, 44, 0, 255, 8, 8)
+ bounds: 184 352 8 8
+ - image: solid-color(24, 44, 0, 255, 8, 8)
+ bounds: 192 352 8 8
+ - image: solid-color(25, 44, 0, 255, 8, 8)
+ bounds: 200 352 8 8
+ - image: solid-color(26, 44, 0, 255, 8, 8)
+ bounds: 208 352 8 8
+ - image: solid-color(27, 44, 0, 255, 8, 8)
+ bounds: 216 352 8 8
+ - image: solid-color(28, 44, 0, 255, 8, 8)
+ bounds: 224 352 8 8
+ - image: solid-color(29, 44, 0, 255, 8, 8)
+ bounds: 232 352 8 8
+ - image: solid-color(30, 44, 0, 255, 8, 8)
+ bounds: 240 352 8 8
+ - image: solid-color(31, 44, 0, 255, 8, 8)
+ bounds: 248 352 8 8
+ - image: solid-color(32, 44, 0, 255, 8, 8)
+ bounds: 256 352 8 8
+ - image: solid-color(33, 44, 0, 255, 8, 8)
+ bounds: 264 352 8 8
+ - image: solid-color(34, 44, 0, 255, 8, 8)
+ bounds: 272 352 8 8
+ - image: solid-color(35, 44, 0, 255, 8, 8)
+ bounds: 280 352 8 8
+ - image: solid-color(36, 44, 0, 255, 8, 8)
+ bounds: 288 352 8 8
+ - image: solid-color(37, 44, 0, 255, 8, 8)
+ bounds: 296 352 8 8
+ - image: solid-color(38, 44, 0, 255, 8, 8)
+ bounds: 304 352 8 8
+ - image: solid-color(39, 44, 0, 255, 8, 8)
+ bounds: 312 352 8 8
+ - image: solid-color(40, 44, 0, 255, 8, 8)
+ bounds: 320 352 8 8
+ - image: solid-color(41, 44, 0, 255, 8, 8)
+ bounds: 328 352 8 8
+ - image: solid-color(42, 44, 0, 255, 8, 8)
+ bounds: 336 352 8 8
+ - image: solid-color(43, 44, 0, 255, 8, 8)
+ bounds: 344 352 8 8
+ - image: solid-color(44, 44, 0, 255, 8, 8)
+ bounds: 352 352 8 8
+ - image: solid-color(45, 44, 0, 255, 8, 8)
+ bounds: 360 352 8 8
+ - image: solid-color(46, 44, 0, 255, 8, 8)
+ bounds: 368 352 8 8
+ - image: solid-color(47, 44, 0, 255, 8, 8)
+ bounds: 376 352 8 8
+ - image: solid-color(48, 44, 0, 255, 8, 8)
+ bounds: 384 352 8 8
+ - image: solid-color(49, 44, 0, 255, 8, 8)
+ bounds: 392 352 8 8
+ - image: solid-color(50, 44, 0, 255, 8, 8)
+ bounds: 400 352 8 8
+ - image: solid-color(51, 44, 0, 255, 8, 8)
+ bounds: 408 352 8 8
+ - image: solid-color(52, 44, 0, 255, 8, 8)
+ bounds: 416 352 8 8
+ - image: solid-color(53, 44, 0, 255, 8, 8)
+ bounds: 424 352 8 8
+ - image: solid-color(54, 44, 0, 255, 8, 8)
+ bounds: 432 352 8 8
+ - image: solid-color(55, 44, 0, 255, 8, 8)
+ bounds: 440 352 8 8
+ - image: solid-color(56, 44, 0, 255, 8, 8)
+ bounds: 448 352 8 8
+ - image: solid-color(57, 44, 0, 255, 8, 8)
+ bounds: 456 352 8 8
+ - image: solid-color(58, 44, 0, 255, 8, 8)
+ bounds: 464 352 8 8
+ - image: solid-color(59, 44, 0, 255, 8, 8)
+ bounds: 472 352 8 8
+ - image: solid-color(60, 44, 0, 255, 8, 8)
+ bounds: 480 352 8 8
+ - image: solid-color(61, 44, 0, 255, 8, 8)
+ bounds: 488 352 8 8
+ - image: solid-color(62, 44, 0, 255, 8, 8)
+ bounds: 496 352 8 8
+ - image: solid-color(63, 44, 0, 255, 8, 8)
+ bounds: 504 352 8 8
+ - image: solid-color(64, 44, 0, 255, 8, 8)
+ bounds: 512 352 8 8
+ - image: solid-color(65, 44, 0, 255, 8, 8)
+ bounds: 520 352 8 8
+ - image: solid-color(66, 44, 0, 255, 8, 8)
+ bounds: 528 352 8 8
+ - image: solid-color(67, 44, 0, 255, 8, 8)
+ bounds: 536 352 8 8
+ - image: solid-color(68, 44, 0, 255, 8, 8)
+ bounds: 544 352 8 8
+ - image: solid-color(69, 44, 0, 255, 8, 8)
+ bounds: 552 352 8 8
+ - image: solid-color(70, 44, 0, 255, 8, 8)
+ bounds: 560 352 8 8
+ - image: solid-color(71, 44, 0, 255, 8, 8)
+ bounds: 568 352 8 8
+ - image: solid-color(72, 44, 0, 255, 8, 8)
+ bounds: 576 352 8 8
+ - image: solid-color(73, 44, 0, 255, 8, 8)
+ bounds: 584 352 8 8
+ - image: solid-color(74, 44, 0, 255, 8, 8)
+ bounds: 592 352 8 8
+ - image: solid-color(75, 44, 0, 255, 8, 8)
+ bounds: 600 352 8 8
+ - image: solid-color(76, 44, 0, 255, 8, 8)
+ bounds: 608 352 8 8
+ - image: solid-color(77, 44, 0, 255, 8, 8)
+ bounds: 616 352 8 8
+ - image: solid-color(78, 44, 0, 255, 8, 8)
+ bounds: 624 352 8 8
+ - image: solid-color(79, 44, 0, 255, 8, 8)
+ bounds: 632 352 8 8
+ - image: solid-color(80, 44, 0, 255, 8, 8)
+ bounds: 640 352 8 8
+ - image: solid-color(81, 44, 0, 255, 8, 8)
+ bounds: 648 352 8 8
+ - image: solid-color(82, 44, 0, 255, 8, 8)
+ bounds: 656 352 8 8
+ - image: solid-color(83, 44, 0, 255, 8, 8)
+ bounds: 664 352 8 8
+ - image: solid-color(84, 44, 0, 255, 8, 8)
+ bounds: 672 352 8 8
+ - image: solid-color(85, 44, 0, 255, 8, 8)
+ bounds: 680 352 8 8
+ - image: solid-color(86, 44, 0, 255, 8, 8)
+ bounds: 688 352 8 8
+ - image: solid-color(87, 44, 0, 255, 8, 8)
+ bounds: 696 352 8 8
+ - image: solid-color(88, 44, 0, 255, 8, 8)
+ bounds: 704 352 8 8
+ - image: solid-color(89, 44, 0, 255, 8, 8)
+ bounds: 712 352 8 8
+ - image: solid-color(90, 44, 0, 255, 8, 8)
+ bounds: 720 352 8 8
+ - image: solid-color(91, 44, 0, 255, 8, 8)
+ bounds: 728 352 8 8
+ - image: solid-color(92, 44, 0, 255, 8, 8)
+ bounds: 736 352 8 8
+ - image: solid-color(93, 44, 0, 255, 8, 8)
+ bounds: 744 352 8 8
+ - image: solid-color(94, 44, 0, 255, 8, 8)
+ bounds: 752 352 8 8
+ - image: solid-color(95, 44, 0, 255, 8, 8)
+ bounds: 760 352 8 8
+ - image: solid-color(96, 44, 0, 255, 8, 8)
+ bounds: 768 352 8 8
+ - image: solid-color(97, 44, 0, 255, 8, 8)
+ bounds: 776 352 8 8
+ - image: solid-color(98, 44, 0, 255, 8, 8)
+ bounds: 784 352 8 8
+ - image: solid-color(99, 44, 0, 255, 8, 8)
+ bounds: 792 352 8 8
+ - image: solid-color(100, 44, 0, 255, 8, 8)
+ bounds: 800 352 8 8
+ - image: solid-color(101, 44, 0, 255, 8, 8)
+ bounds: 808 352 8 8
+ - image: solid-color(102, 44, 0, 255, 8, 8)
+ bounds: 816 352 8 8
+ - image: solid-color(103, 44, 0, 255, 8, 8)
+ bounds: 824 352 8 8
+ - image: solid-color(104, 44, 0, 255, 8, 8)
+ bounds: 832 352 8 8
+ - image: solid-color(105, 44, 0, 255, 8, 8)
+ bounds: 840 352 8 8
+ - image: solid-color(106, 44, 0, 255, 8, 8)
+ bounds: 848 352 8 8
+ - image: solid-color(107, 44, 0, 255, 8, 8)
+ bounds: 856 352 8 8
+ - image: solid-color(108, 44, 0, 255, 8, 8)
+ bounds: 864 352 8 8
+ - image: solid-color(109, 44, 0, 255, 8, 8)
+ bounds: 872 352 8 8
+ - image: solid-color(110, 44, 0, 255, 8, 8)
+ bounds: 880 352 8 8
+ - image: solid-color(111, 44, 0, 255, 8, 8)
+ bounds: 888 352 8 8
+ - image: solid-color(112, 44, 0, 255, 8, 8)
+ bounds: 896 352 8 8
+ - image: solid-color(113, 44, 0, 255, 8, 8)
+ bounds: 904 352 8 8
+ - image: solid-color(114, 44, 0, 255, 8, 8)
+ bounds: 912 352 8 8
+ - image: solid-color(115, 44, 0, 255, 8, 8)
+ bounds: 920 352 8 8
+ - image: solid-color(116, 44, 0, 255, 8, 8)
+ bounds: 928 352 8 8
+ - image: solid-color(117, 44, 0, 255, 8, 8)
+ bounds: 936 352 8 8
+ - image: solid-color(118, 44, 0, 255, 8, 8)
+ bounds: 944 352 8 8
+ - image: solid-color(119, 44, 0, 255, 8, 8)
+ bounds: 952 352 8 8
+ - image: solid-color(120, 44, 0, 255, 8, 8)
+ bounds: 960 352 8 8
+ - image: solid-color(121, 44, 0, 255, 8, 8)
+ bounds: 968 352 8 8
+ - image: solid-color(122, 44, 0, 255, 8, 8)
+ bounds: 976 352 8 8
+ - image: solid-color(123, 44, 0, 255, 8, 8)
+ bounds: 984 352 8 8
+ - image: solid-color(124, 44, 0, 255, 8, 8)
+ bounds: 992 352 8 8
+ - image: solid-color(125, 44, 0, 255, 8, 8)
+ bounds: 1000 352 8 8
+ - image: solid-color(126, 44, 0, 255, 8, 8)
+ bounds: 1008 352 8 8
+ - image: solid-color(127, 44, 0, 255, 8, 8)
+ bounds: 1016 352 8 8
+ - image: solid-color(0, 45, 0, 255, 8, 8)
+ bounds: 0 360 8 8
+ - image: solid-color(1, 45, 0, 255, 8, 8)
+ bounds: 8 360 8 8
+ - image: solid-color(2, 45, 0, 255, 8, 8)
+ bounds: 16 360 8 8
+ - image: solid-color(3, 45, 0, 255, 8, 8)
+ bounds: 24 360 8 8
+ - image: solid-color(4, 45, 0, 255, 8, 8)
+ bounds: 32 360 8 8
+ - image: solid-color(5, 45, 0, 255, 8, 8)
+ bounds: 40 360 8 8
+ - image: solid-color(6, 45, 0, 255, 8, 8)
+ bounds: 48 360 8 8
+ - image: solid-color(7, 45, 0, 255, 8, 8)
+ bounds: 56 360 8 8
+ - image: solid-color(8, 45, 0, 255, 8, 8)
+ bounds: 64 360 8 8
+ - image: solid-color(9, 45, 0, 255, 8, 8)
+ bounds: 72 360 8 8
+ - image: solid-color(10, 45, 0, 255, 8, 8)
+ bounds: 80 360 8 8
+ - image: solid-color(11, 45, 0, 255, 8, 8)
+ bounds: 88 360 8 8
+ - image: solid-color(12, 45, 0, 255, 8, 8)
+ bounds: 96 360 8 8
+ - image: solid-color(13, 45, 0, 255, 8, 8)
+ bounds: 104 360 8 8
+ - image: solid-color(14, 45, 0, 255, 8, 8)
+ bounds: 112 360 8 8
+ - image: solid-color(15, 45, 0, 255, 8, 8)
+ bounds: 120 360 8 8
+ - image: solid-color(16, 45, 0, 255, 8, 8)
+ bounds: 128 360 8 8
+ - image: solid-color(17, 45, 0, 255, 8, 8)
+ bounds: 136 360 8 8
+ - image: solid-color(18, 45, 0, 255, 8, 8)
+ bounds: 144 360 8 8
+ - image: solid-color(19, 45, 0, 255, 8, 8)
+ bounds: 152 360 8 8
+ - image: solid-color(20, 45, 0, 255, 8, 8)
+ bounds: 160 360 8 8
+ - image: solid-color(21, 45, 0, 255, 8, 8)
+ bounds: 168 360 8 8
+ - image: solid-color(22, 45, 0, 255, 8, 8)
+ bounds: 176 360 8 8
+ - image: solid-color(23, 45, 0, 255, 8, 8)
+ bounds: 184 360 8 8
+ - image: solid-color(24, 45, 0, 255, 8, 8)
+ bounds: 192 360 8 8
+ - image: solid-color(25, 45, 0, 255, 8, 8)
+ bounds: 200 360 8 8
+ - image: solid-color(26, 45, 0, 255, 8, 8)
+ bounds: 208 360 8 8
+ - image: solid-color(27, 45, 0, 255, 8, 8)
+ bounds: 216 360 8 8
+ - image: solid-color(28, 45, 0, 255, 8, 8)
+ bounds: 224 360 8 8
+ - image: solid-color(29, 45, 0, 255, 8, 8)
+ bounds: 232 360 8 8
+ - image: solid-color(30, 45, 0, 255, 8, 8)
+ bounds: 240 360 8 8
+ - image: solid-color(31, 45, 0, 255, 8, 8)
+ bounds: 248 360 8 8
+ - image: solid-color(32, 45, 0, 255, 8, 8)
+ bounds: 256 360 8 8
+ - image: solid-color(33, 45, 0, 255, 8, 8)
+ bounds: 264 360 8 8
+ - image: solid-color(34, 45, 0, 255, 8, 8)
+ bounds: 272 360 8 8
+ - image: solid-color(35, 45, 0, 255, 8, 8)
+ bounds: 280 360 8 8
+ - image: solid-color(36, 45, 0, 255, 8, 8)
+ bounds: 288 360 8 8
+ - image: solid-color(37, 45, 0, 255, 8, 8)
+ bounds: 296 360 8 8
+ - image: solid-color(38, 45, 0, 255, 8, 8)
+ bounds: 304 360 8 8
+ - image: solid-color(39, 45, 0, 255, 8, 8)
+ bounds: 312 360 8 8
+ - image: solid-color(40, 45, 0, 255, 8, 8)
+ bounds: 320 360 8 8
+ - image: solid-color(41, 45, 0, 255, 8, 8)
+ bounds: 328 360 8 8
+ - image: solid-color(42, 45, 0, 255, 8, 8)
+ bounds: 336 360 8 8
+ - image: solid-color(43, 45, 0, 255, 8, 8)
+ bounds: 344 360 8 8
+ - image: solid-color(44, 45, 0, 255, 8, 8)
+ bounds: 352 360 8 8
+ - image: solid-color(45, 45, 0, 255, 8, 8)
+ bounds: 360 360 8 8
+ - image: solid-color(46, 45, 0, 255, 8, 8)
+ bounds: 368 360 8 8
+ - image: solid-color(47, 45, 0, 255, 8, 8)
+ bounds: 376 360 8 8
+ - image: solid-color(48, 45, 0, 255, 8, 8)
+ bounds: 384 360 8 8
+ - image: solid-color(49, 45, 0, 255, 8, 8)
+ bounds: 392 360 8 8
+ - image: solid-color(50, 45, 0, 255, 8, 8)
+ bounds: 400 360 8 8
+ - image: solid-color(51, 45, 0, 255, 8, 8)
+ bounds: 408 360 8 8
+ - image: solid-color(52, 45, 0, 255, 8, 8)
+ bounds: 416 360 8 8
+ - image: solid-color(53, 45, 0, 255, 8, 8)
+ bounds: 424 360 8 8
+ - image: solid-color(54, 45, 0, 255, 8, 8)
+ bounds: 432 360 8 8
+ - image: solid-color(55, 45, 0, 255, 8, 8)
+ bounds: 440 360 8 8
+ - image: solid-color(56, 45, 0, 255, 8, 8)
+ bounds: 448 360 8 8
+ - image: solid-color(57, 45, 0, 255, 8, 8)
+ bounds: 456 360 8 8
+ - image: solid-color(58, 45, 0, 255, 8, 8)
+ bounds: 464 360 8 8
+ - image: solid-color(59, 45, 0, 255, 8, 8)
+ bounds: 472 360 8 8
+ - image: solid-color(60, 45, 0, 255, 8, 8)
+ bounds: 480 360 8 8
+ - image: solid-color(61, 45, 0, 255, 8, 8)
+ bounds: 488 360 8 8
+ - image: solid-color(62, 45, 0, 255, 8, 8)
+ bounds: 496 360 8 8
+ - image: solid-color(63, 45, 0, 255, 8, 8)
+ bounds: 504 360 8 8
+ - image: solid-color(64, 45, 0, 255, 8, 8)
+ bounds: 512 360 8 8
+ - image: solid-color(65, 45, 0, 255, 8, 8)
+ bounds: 520 360 8 8
+ - image: solid-color(66, 45, 0, 255, 8, 8)
+ bounds: 528 360 8 8
+ - image: solid-color(67, 45, 0, 255, 8, 8)
+ bounds: 536 360 8 8
+ - image: solid-color(68, 45, 0, 255, 8, 8)
+ bounds: 544 360 8 8
+ - image: solid-color(69, 45, 0, 255, 8, 8)
+ bounds: 552 360 8 8
+ - image: solid-color(70, 45, 0, 255, 8, 8)
+ bounds: 560 360 8 8
+ - image: solid-color(71, 45, 0, 255, 8, 8)
+ bounds: 568 360 8 8
+ - image: solid-color(72, 45, 0, 255, 8, 8)
+ bounds: 576 360 8 8
+ - image: solid-color(73, 45, 0, 255, 8, 8)
+ bounds: 584 360 8 8
+ - image: solid-color(74, 45, 0, 255, 8, 8)
+ bounds: 592 360 8 8
+ - image: solid-color(75, 45, 0, 255, 8, 8)
+ bounds: 600 360 8 8
+ - image: solid-color(76, 45, 0, 255, 8, 8)
+ bounds: 608 360 8 8
+ - image: solid-color(77, 45, 0, 255, 8, 8)
+ bounds: 616 360 8 8
+ - image: solid-color(78, 45, 0, 255, 8, 8)
+ bounds: 624 360 8 8
+ - image: solid-color(79, 45, 0, 255, 8, 8)
+ bounds: 632 360 8 8
+ - image: solid-color(80, 45, 0, 255, 8, 8)
+ bounds: 640 360 8 8
+ - image: solid-color(81, 45, 0, 255, 8, 8)
+ bounds: 648 360 8 8
+ - image: solid-color(82, 45, 0, 255, 8, 8)
+ bounds: 656 360 8 8
+ - image: solid-color(83, 45, 0, 255, 8, 8)
+ bounds: 664 360 8 8
+ - image: solid-color(84, 45, 0, 255, 8, 8)
+ bounds: 672 360 8 8
+ - image: solid-color(85, 45, 0, 255, 8, 8)
+ bounds: 680 360 8 8
+ - image: solid-color(86, 45, 0, 255, 8, 8)
+ bounds: 688 360 8 8
+ - image: solid-color(87, 45, 0, 255, 8, 8)
+ bounds: 696 360 8 8
+ - image: solid-color(88, 45, 0, 255, 8, 8)
+ bounds: 704 360 8 8
+ - image: solid-color(89, 45, 0, 255, 8, 8)
+ bounds: 712 360 8 8
+ - image: solid-color(90, 45, 0, 255, 8, 8)
+ bounds: 720 360 8 8
+ - image: solid-color(91, 45, 0, 255, 8, 8)
+ bounds: 728 360 8 8
+ - image: solid-color(92, 45, 0, 255, 8, 8)
+ bounds: 736 360 8 8
+ - image: solid-color(93, 45, 0, 255, 8, 8)
+ bounds: 744 360 8 8
+ - image: solid-color(94, 45, 0, 255, 8, 8)
+ bounds: 752 360 8 8
+ - image: solid-color(95, 45, 0, 255, 8, 8)
+ bounds: 760 360 8 8
+ - image: solid-color(96, 45, 0, 255, 8, 8)
+ bounds: 768 360 8 8
+ - image: solid-color(97, 45, 0, 255, 8, 8)
+ bounds: 776 360 8 8
+ - image: solid-color(98, 45, 0, 255, 8, 8)
+ bounds: 784 360 8 8
+ - image: solid-color(99, 45, 0, 255, 8, 8)
+ bounds: 792 360 8 8
+ - image: solid-color(100, 45, 0, 255, 8, 8)
+ bounds: 800 360 8 8
+ - image: solid-color(101, 45, 0, 255, 8, 8)
+ bounds: 808 360 8 8
+ - image: solid-color(102, 45, 0, 255, 8, 8)
+ bounds: 816 360 8 8
+ - image: solid-color(103, 45, 0, 255, 8, 8)
+ bounds: 824 360 8 8
+ - image: solid-color(104, 45, 0, 255, 8, 8)
+ bounds: 832 360 8 8
+ - image: solid-color(105, 45, 0, 255, 8, 8)
+ bounds: 840 360 8 8
+ - image: solid-color(106, 45, 0, 255, 8, 8)
+ bounds: 848 360 8 8
+ - image: solid-color(107, 45, 0, 255, 8, 8)
+ bounds: 856 360 8 8
+ - image: solid-color(108, 45, 0, 255, 8, 8)
+ bounds: 864 360 8 8
+ - image: solid-color(109, 45, 0, 255, 8, 8)
+ bounds: 872 360 8 8
+ - image: solid-color(110, 45, 0, 255, 8, 8)
+ bounds: 880 360 8 8
+ - image: solid-color(111, 45, 0, 255, 8, 8)
+ bounds: 888 360 8 8
+ - image: solid-color(112, 45, 0, 255, 8, 8)
+ bounds: 896 360 8 8
+ - image: solid-color(113, 45, 0, 255, 8, 8)
+ bounds: 904 360 8 8
+ - image: solid-color(114, 45, 0, 255, 8, 8)
+ bounds: 912 360 8 8
+ - image: solid-color(115, 45, 0, 255, 8, 8)
+ bounds: 920 360 8 8
+ - image: solid-color(116, 45, 0, 255, 8, 8)
+ bounds: 928 360 8 8
+ - image: solid-color(117, 45, 0, 255, 8, 8)
+ bounds: 936 360 8 8
+ - image: solid-color(118, 45, 0, 255, 8, 8)
+ bounds: 944 360 8 8
+ - image: solid-color(119, 45, 0, 255, 8, 8)
+ bounds: 952 360 8 8
+ - image: solid-color(120, 45, 0, 255, 8, 8)
+ bounds: 960 360 8 8
+ - image: solid-color(121, 45, 0, 255, 8, 8)
+ bounds: 968 360 8 8
+ - image: solid-color(122, 45, 0, 255, 8, 8)
+ bounds: 976 360 8 8
+ - image: solid-color(123, 45, 0, 255, 8, 8)
+ bounds: 984 360 8 8
+ - image: solid-color(124, 45, 0, 255, 8, 8)
+ bounds: 992 360 8 8
+ - image: solid-color(125, 45, 0, 255, 8, 8)
+ bounds: 1000 360 8 8
+ - image: solid-color(126, 45, 0, 255, 8, 8)
+ bounds: 1008 360 8 8
+ - image: solid-color(127, 45, 0, 255, 8, 8)
+ bounds: 1016 360 8 8
+ - image: solid-color(0, 46, 0, 255, 8, 8)
+ bounds: 0 368 8 8
+ - image: solid-color(1, 46, 0, 255, 8, 8)
+ bounds: 8 368 8 8
+ - image: solid-color(2, 46, 0, 255, 8, 8)
+ bounds: 16 368 8 8
+ - image: solid-color(3, 46, 0, 255, 8, 8)
+ bounds: 24 368 8 8
+ - image: solid-color(4, 46, 0, 255, 8, 8)
+ bounds: 32 368 8 8
+ - image: solid-color(5, 46, 0, 255, 8, 8)
+ bounds: 40 368 8 8
+ - image: solid-color(6, 46, 0, 255, 8, 8)
+ bounds: 48 368 8 8
+ - image: solid-color(7, 46, 0, 255, 8, 8)
+ bounds: 56 368 8 8
+ - image: solid-color(8, 46, 0, 255, 8, 8)
+ bounds: 64 368 8 8
+ - image: solid-color(9, 46, 0, 255, 8, 8)
+ bounds: 72 368 8 8
+ - image: solid-color(10, 46, 0, 255, 8, 8)
+ bounds: 80 368 8 8
+ - image: solid-color(11, 46, 0, 255, 8, 8)
+ bounds: 88 368 8 8
+ - image: solid-color(12, 46, 0, 255, 8, 8)
+ bounds: 96 368 8 8
+ - image: solid-color(13, 46, 0, 255, 8, 8)
+ bounds: 104 368 8 8
+ - image: solid-color(14, 46, 0, 255, 8, 8)
+ bounds: 112 368 8 8
+ - image: solid-color(15, 46, 0, 255, 8, 8)
+ bounds: 120 368 8 8
+ - image: solid-color(16, 46, 0, 255, 8, 8)
+ bounds: 128 368 8 8
+ - image: solid-color(17, 46, 0, 255, 8, 8)
+ bounds: 136 368 8 8
+ - image: solid-color(18, 46, 0, 255, 8, 8)
+ bounds: 144 368 8 8
+ - image: solid-color(19, 46, 0, 255, 8, 8)
+ bounds: 152 368 8 8
+ - image: solid-color(20, 46, 0, 255, 8, 8)
+ bounds: 160 368 8 8
+ - image: solid-color(21, 46, 0, 255, 8, 8)
+ bounds: 168 368 8 8
+ - image: solid-color(22, 46, 0, 255, 8, 8)
+ bounds: 176 368 8 8
+ - image: solid-color(23, 46, 0, 255, 8, 8)
+ bounds: 184 368 8 8
+ - image: solid-color(24, 46, 0, 255, 8, 8)
+ bounds: 192 368 8 8
+ - image: solid-color(25, 46, 0, 255, 8, 8)
+ bounds: 200 368 8 8
+ - image: solid-color(26, 46, 0, 255, 8, 8)
+ bounds: 208 368 8 8
+ - image: solid-color(27, 46, 0, 255, 8, 8)
+ bounds: 216 368 8 8
+ - image: solid-color(28, 46, 0, 255, 8, 8)
+ bounds: 224 368 8 8
+ - image: solid-color(29, 46, 0, 255, 8, 8)
+ bounds: 232 368 8 8
+ - image: solid-color(30, 46, 0, 255, 8, 8)
+ bounds: 240 368 8 8
+ - image: solid-color(31, 46, 0, 255, 8, 8)
+ bounds: 248 368 8 8
+ - image: solid-color(32, 46, 0, 255, 8, 8)
+ bounds: 256 368 8 8
+ - image: solid-color(33, 46, 0, 255, 8, 8)
+ bounds: 264 368 8 8
+ - image: solid-color(34, 46, 0, 255, 8, 8)
+ bounds: 272 368 8 8
+ - image: solid-color(35, 46, 0, 255, 8, 8)
+ bounds: 280 368 8 8
+ - image: solid-color(36, 46, 0, 255, 8, 8)
+ bounds: 288 368 8 8
+ - image: solid-color(37, 46, 0, 255, 8, 8)
+ bounds: 296 368 8 8
+ - image: solid-color(38, 46, 0, 255, 8, 8)
+ bounds: 304 368 8 8
+ - image: solid-color(39, 46, 0, 255, 8, 8)
+ bounds: 312 368 8 8
+ - image: solid-color(40, 46, 0, 255, 8, 8)
+ bounds: 320 368 8 8
+ - image: solid-color(41, 46, 0, 255, 8, 8)
+ bounds: 328 368 8 8
+ - image: solid-color(42, 46, 0, 255, 8, 8)
+ bounds: 336 368 8 8
+ - image: solid-color(43, 46, 0, 255, 8, 8)
+ bounds: 344 368 8 8
+ - image: solid-color(44, 46, 0, 255, 8, 8)
+ bounds: 352 368 8 8
+ - image: solid-color(45, 46, 0, 255, 8, 8)
+ bounds: 360 368 8 8
+ - image: solid-color(46, 46, 0, 255, 8, 8)
+ bounds: 368 368 8 8
+ - image: solid-color(47, 46, 0, 255, 8, 8)
+ bounds: 376 368 8 8
+ - image: solid-color(48, 46, 0, 255, 8, 8)
+ bounds: 384 368 8 8
+ - image: solid-color(49, 46, 0, 255, 8, 8)
+ bounds: 392 368 8 8
+ - image: solid-color(50, 46, 0, 255, 8, 8)
+ bounds: 400 368 8 8
+ - image: solid-color(51, 46, 0, 255, 8, 8)
+ bounds: 408 368 8 8
+ - image: solid-color(52, 46, 0, 255, 8, 8)
+ bounds: 416 368 8 8
+ - image: solid-color(53, 46, 0, 255, 8, 8)
+ bounds: 424 368 8 8
+ - image: solid-color(54, 46, 0, 255, 8, 8)
+ bounds: 432 368 8 8
+ - image: solid-color(55, 46, 0, 255, 8, 8)
+ bounds: 440 368 8 8
+ - image: solid-color(56, 46, 0, 255, 8, 8)
+ bounds: 448 368 8 8
+ - image: solid-color(57, 46, 0, 255, 8, 8)
+ bounds: 456 368 8 8
+ - image: solid-color(58, 46, 0, 255, 8, 8)
+ bounds: 464 368 8 8
+ - image: solid-color(59, 46, 0, 255, 8, 8)
+ bounds: 472 368 8 8
+ - image: solid-color(60, 46, 0, 255, 8, 8)
+ bounds: 480 368 8 8
+ - image: solid-color(61, 46, 0, 255, 8, 8)
+ bounds: 488 368 8 8
+ - image: solid-color(62, 46, 0, 255, 8, 8)
+ bounds: 496 368 8 8
+ - image: solid-color(63, 46, 0, 255, 8, 8)
+ bounds: 504 368 8 8
+ - image: solid-color(64, 46, 0, 255, 8, 8)
+ bounds: 512 368 8 8
+ - image: solid-color(65, 46, 0, 255, 8, 8)
+ bounds: 520 368 8 8
+ - image: solid-color(66, 46, 0, 255, 8, 8)
+ bounds: 528 368 8 8
+ - image: solid-color(67, 46, 0, 255, 8, 8)
+ bounds: 536 368 8 8
+ - image: solid-color(68, 46, 0, 255, 8, 8)
+ bounds: 544 368 8 8
+ - image: solid-color(69, 46, 0, 255, 8, 8)
+ bounds: 552 368 8 8
+ - image: solid-color(70, 46, 0, 255, 8, 8)
+ bounds: 560 368 8 8
+ - image: solid-color(71, 46, 0, 255, 8, 8)
+ bounds: 568 368 8 8
+ - image: solid-color(72, 46, 0, 255, 8, 8)
+ bounds: 576 368 8 8
+ - image: solid-color(73, 46, 0, 255, 8, 8)
+ bounds: 584 368 8 8
+ - image: solid-color(74, 46, 0, 255, 8, 8)
+ bounds: 592 368 8 8
+ - image: solid-color(75, 46, 0, 255, 8, 8)
+ bounds: 600 368 8 8
+ - image: solid-color(76, 46, 0, 255, 8, 8)
+ bounds: 608 368 8 8
+ - image: solid-color(77, 46, 0, 255, 8, 8)
+ bounds: 616 368 8 8
+ - image: solid-color(78, 46, 0, 255, 8, 8)
+ bounds: 624 368 8 8
+ - image: solid-color(79, 46, 0, 255, 8, 8)
+ bounds: 632 368 8 8
+ - image: solid-color(80, 46, 0, 255, 8, 8)
+ bounds: 640 368 8 8
+ - image: solid-color(81, 46, 0, 255, 8, 8)
+ bounds: 648 368 8 8
+ - image: solid-color(82, 46, 0, 255, 8, 8)
+ bounds: 656 368 8 8
+ - image: solid-color(83, 46, 0, 255, 8, 8)
+ bounds: 664 368 8 8
+ - image: solid-color(84, 46, 0, 255, 8, 8)
+ bounds: 672 368 8 8
+ - image: solid-color(85, 46, 0, 255, 8, 8)
+ bounds: 680 368 8 8
+ - image: solid-color(86, 46, 0, 255, 8, 8)
+ bounds: 688 368 8 8
+ - image: solid-color(87, 46, 0, 255, 8, 8)
+ bounds: 696 368 8 8
+ - image: solid-color(88, 46, 0, 255, 8, 8)
+ bounds: 704 368 8 8
+ - image: solid-color(89, 46, 0, 255, 8, 8)
+ bounds: 712 368 8 8
+ - image: solid-color(90, 46, 0, 255, 8, 8)
+ bounds: 720 368 8 8
+ - image: solid-color(91, 46, 0, 255, 8, 8)
+ bounds: 728 368 8 8
+ - image: solid-color(92, 46, 0, 255, 8, 8)
+ bounds: 736 368 8 8
+ - image: solid-color(93, 46, 0, 255, 8, 8)
+ bounds: 744 368 8 8
+ - image: solid-color(94, 46, 0, 255, 8, 8)
+ bounds: 752 368 8 8
+ - image: solid-color(95, 46, 0, 255, 8, 8)
+ bounds: 760 368 8 8
+ - image: solid-color(96, 46, 0, 255, 8, 8)
+ bounds: 768 368 8 8
+ - image: solid-color(97, 46, 0, 255, 8, 8)
+ bounds: 776 368 8 8
+ - image: solid-color(98, 46, 0, 255, 8, 8)
+ bounds: 784 368 8 8
+ - image: solid-color(99, 46, 0, 255, 8, 8)
+ bounds: 792 368 8 8
+ - image: solid-color(100, 46, 0, 255, 8, 8)
+ bounds: 800 368 8 8
+ - image: solid-color(101, 46, 0, 255, 8, 8)
+ bounds: 808 368 8 8
+ - image: solid-color(102, 46, 0, 255, 8, 8)
+ bounds: 816 368 8 8
+ - image: solid-color(103, 46, 0, 255, 8, 8)
+ bounds: 824 368 8 8
+ - image: solid-color(104, 46, 0, 255, 8, 8)
+ bounds: 832 368 8 8
+ - image: solid-color(105, 46, 0, 255, 8, 8)
+ bounds: 840 368 8 8
+ - image: solid-color(106, 46, 0, 255, 8, 8)
+ bounds: 848 368 8 8
+ - image: solid-color(107, 46, 0, 255, 8, 8)
+ bounds: 856 368 8 8
+ - image: solid-color(108, 46, 0, 255, 8, 8)
+ bounds: 864 368 8 8
+ - image: solid-color(109, 46, 0, 255, 8, 8)
+ bounds: 872 368 8 8
+ - image: solid-color(110, 46, 0, 255, 8, 8)
+ bounds: 880 368 8 8
+ - image: solid-color(111, 46, 0, 255, 8, 8)
+ bounds: 888 368 8 8
+ - image: solid-color(112, 46, 0, 255, 8, 8)
+ bounds: 896 368 8 8
+ - image: solid-color(113, 46, 0, 255, 8, 8)
+ bounds: 904 368 8 8
+ - image: solid-color(114, 46, 0, 255, 8, 8)
+ bounds: 912 368 8 8
+ - image: solid-color(115, 46, 0, 255, 8, 8)
+ bounds: 920 368 8 8
+ - image: solid-color(116, 46, 0, 255, 8, 8)
+ bounds: 928 368 8 8
+ - image: solid-color(117, 46, 0, 255, 8, 8)
+ bounds: 936 368 8 8
+ - image: solid-color(118, 46, 0, 255, 8, 8)
+ bounds: 944 368 8 8
+ - image: solid-color(119, 46, 0, 255, 8, 8)
+ bounds: 952 368 8 8
+ - image: solid-color(120, 46, 0, 255, 8, 8)
+ bounds: 960 368 8 8
+ - image: solid-color(121, 46, 0, 255, 8, 8)
+ bounds: 968 368 8 8
+ - image: solid-color(122, 46, 0, 255, 8, 8)
+ bounds: 976 368 8 8
+ - image: solid-color(123, 46, 0, 255, 8, 8)
+ bounds: 984 368 8 8
+ - image: solid-color(124, 46, 0, 255, 8, 8)
+ bounds: 992 368 8 8
+ - image: solid-color(125, 46, 0, 255, 8, 8)
+ bounds: 1000 368 8 8
+ - image: solid-color(126, 46, 0, 255, 8, 8)
+ bounds: 1008 368 8 8
+ - image: solid-color(127, 46, 0, 255, 8, 8)
+ bounds: 1016 368 8 8
+ - image: solid-color(0, 47, 0, 255, 8, 8)
+ bounds: 0 376 8 8
+ - image: solid-color(1, 47, 0, 255, 8, 8)
+ bounds: 8 376 8 8
+ - image: solid-color(2, 47, 0, 255, 8, 8)
+ bounds: 16 376 8 8
+ - image: solid-color(3, 47, 0, 255, 8, 8)
+ bounds: 24 376 8 8
+ - image: solid-color(4, 47, 0, 255, 8, 8)
+ bounds: 32 376 8 8
+ - image: solid-color(5, 47, 0, 255, 8, 8)
+ bounds: 40 376 8 8
+ - image: solid-color(6, 47, 0, 255, 8, 8)
+ bounds: 48 376 8 8
+ - image: solid-color(7, 47, 0, 255, 8, 8)
+ bounds: 56 376 8 8
+ - image: solid-color(8, 47, 0, 255, 8, 8)
+ bounds: 64 376 8 8
+ - image: solid-color(9, 47, 0, 255, 8, 8)
+ bounds: 72 376 8 8
+ - image: solid-color(10, 47, 0, 255, 8, 8)
+ bounds: 80 376 8 8
+ - image: solid-color(11, 47, 0, 255, 8, 8)
+ bounds: 88 376 8 8
+ - image: solid-color(12, 47, 0, 255, 8, 8)
+ bounds: 96 376 8 8
+ - image: solid-color(13, 47, 0, 255, 8, 8)
+ bounds: 104 376 8 8
+ - image: solid-color(14, 47, 0, 255, 8, 8)
+ bounds: 112 376 8 8
+ - image: solid-color(15, 47, 0, 255, 8, 8)
+ bounds: 120 376 8 8
+ - image: solid-color(16, 47, 0, 255, 8, 8)
+ bounds: 128 376 8 8
+ - image: solid-color(17, 47, 0, 255, 8, 8)
+ bounds: 136 376 8 8
+ - image: solid-color(18, 47, 0, 255, 8, 8)
+ bounds: 144 376 8 8
+ - image: solid-color(19, 47, 0, 255, 8, 8)
+ bounds: 152 376 8 8
+ - image: solid-color(20, 47, 0, 255, 8, 8)
+ bounds: 160 376 8 8
+ - image: solid-color(21, 47, 0, 255, 8, 8)
+ bounds: 168 376 8 8
+ - image: solid-color(22, 47, 0, 255, 8, 8)
+ bounds: 176 376 8 8
+ - image: solid-color(23, 47, 0, 255, 8, 8)
+ bounds: 184 376 8 8
+ - image: solid-color(24, 47, 0, 255, 8, 8)
+ bounds: 192 376 8 8
+ - image: solid-color(25, 47, 0, 255, 8, 8)
+ bounds: 200 376 8 8
+ - image: solid-color(26, 47, 0, 255, 8, 8)
+ bounds: 208 376 8 8
+ - image: solid-color(27, 47, 0, 255, 8, 8)
+ bounds: 216 376 8 8
+ - image: solid-color(28, 47, 0, 255, 8, 8)
+ bounds: 224 376 8 8
+ - image: solid-color(29, 47, 0, 255, 8, 8)
+ bounds: 232 376 8 8
+ - image: solid-color(30, 47, 0, 255, 8, 8)
+ bounds: 240 376 8 8
+ - image: solid-color(31, 47, 0, 255, 8, 8)
+ bounds: 248 376 8 8
+ - image: solid-color(32, 47, 0, 255, 8, 8)
+ bounds: 256 376 8 8
+ - image: solid-color(33, 47, 0, 255, 8, 8)
+ bounds: 264 376 8 8
+ - image: solid-color(34, 47, 0, 255, 8, 8)
+ bounds: 272 376 8 8
+ - image: solid-color(35, 47, 0, 255, 8, 8)
+ bounds: 280 376 8 8
+ - image: solid-color(36, 47, 0, 255, 8, 8)
+ bounds: 288 376 8 8
+ - image: solid-color(37, 47, 0, 255, 8, 8)
+ bounds: 296 376 8 8
+ - image: solid-color(38, 47, 0, 255, 8, 8)
+ bounds: 304 376 8 8
+ - image: solid-color(39, 47, 0, 255, 8, 8)
+ bounds: 312 376 8 8
+ - image: solid-color(40, 47, 0, 255, 8, 8)
+ bounds: 320 376 8 8
+ - image: solid-color(41, 47, 0, 255, 8, 8)
+ bounds: 328 376 8 8
+ - image: solid-color(42, 47, 0, 255, 8, 8)
+ bounds: 336 376 8 8
+ - image: solid-color(43, 47, 0, 255, 8, 8)
+ bounds: 344 376 8 8
+ - image: solid-color(44, 47, 0, 255, 8, 8)
+ bounds: 352 376 8 8
+ - image: solid-color(45, 47, 0, 255, 8, 8)
+ bounds: 360 376 8 8
+ - image: solid-color(46, 47, 0, 255, 8, 8)
+ bounds: 368 376 8 8
+ - image: solid-color(47, 47, 0, 255, 8, 8)
+ bounds: 376 376 8 8
+ - image: solid-color(48, 47, 0, 255, 8, 8)
+ bounds: 384 376 8 8
+ - image: solid-color(49, 47, 0, 255, 8, 8)
+ bounds: 392 376 8 8
+ - image: solid-color(50, 47, 0, 255, 8, 8)
+ bounds: 400 376 8 8
+ - image: solid-color(51, 47, 0, 255, 8, 8)
+ bounds: 408 376 8 8
+ - image: solid-color(52, 47, 0, 255, 8, 8)
+ bounds: 416 376 8 8
+ - image: solid-color(53, 47, 0, 255, 8, 8)
+ bounds: 424 376 8 8
+ - image: solid-color(54, 47, 0, 255, 8, 8)
+ bounds: 432 376 8 8
+ - image: solid-color(55, 47, 0, 255, 8, 8)
+ bounds: 440 376 8 8
+ - image: solid-color(56, 47, 0, 255, 8, 8)
+ bounds: 448 376 8 8
+ - image: solid-color(57, 47, 0, 255, 8, 8)
+ bounds: 456 376 8 8
+ - image: solid-color(58, 47, 0, 255, 8, 8)
+ bounds: 464 376 8 8
+ - image: solid-color(59, 47, 0, 255, 8, 8)
+ bounds: 472 376 8 8
+ - image: solid-color(60, 47, 0, 255, 8, 8)
+ bounds: 480 376 8 8
+ - image: solid-color(61, 47, 0, 255, 8, 8)
+ bounds: 488 376 8 8
+ - image: solid-color(62, 47, 0, 255, 8, 8)
+ bounds: 496 376 8 8
+ - image: solid-color(63, 47, 0, 255, 8, 8)
+ bounds: 504 376 8 8
+ - image: solid-color(64, 47, 0, 255, 8, 8)
+ bounds: 512 376 8 8
+ - image: solid-color(65, 47, 0, 255, 8, 8)
+ bounds: 520 376 8 8
+ - image: solid-color(66, 47, 0, 255, 8, 8)
+ bounds: 528 376 8 8
+ - image: solid-color(67, 47, 0, 255, 8, 8)
+ bounds: 536 376 8 8
+ - image: solid-color(68, 47, 0, 255, 8, 8)
+ bounds: 544 376 8 8
+ - image: solid-color(69, 47, 0, 255, 8, 8)
+ bounds: 552 376 8 8
+ - image: solid-color(70, 47, 0, 255, 8, 8)
+ bounds: 560 376 8 8
+ - image: solid-color(71, 47, 0, 255, 8, 8)
+ bounds: 568 376 8 8
+ - image: solid-color(72, 47, 0, 255, 8, 8)
+ bounds: 576 376 8 8
+ - image: solid-color(73, 47, 0, 255, 8, 8)
+ bounds: 584 376 8 8
+ - image: solid-color(74, 47, 0, 255, 8, 8)
+ bounds: 592 376 8 8
+ - image: solid-color(75, 47, 0, 255, 8, 8)
+ bounds: 600 376 8 8
+ - image: solid-color(76, 47, 0, 255, 8, 8)
+ bounds: 608 376 8 8
+ - image: solid-color(77, 47, 0, 255, 8, 8)
+ bounds: 616 376 8 8
+ - image: solid-color(78, 47, 0, 255, 8, 8)
+ bounds: 624 376 8 8
+ - image: solid-color(79, 47, 0, 255, 8, 8)
+ bounds: 632 376 8 8
+ - image: solid-color(80, 47, 0, 255, 8, 8)
+ bounds: 640 376 8 8
+ - image: solid-color(81, 47, 0, 255, 8, 8)
+ bounds: 648 376 8 8
+ - image: solid-color(82, 47, 0, 255, 8, 8)
+ bounds: 656 376 8 8
+ - image: solid-color(83, 47, 0, 255, 8, 8)
+ bounds: 664 376 8 8
+ - image: solid-color(84, 47, 0, 255, 8, 8)
+ bounds: 672 376 8 8
+ - image: solid-color(85, 47, 0, 255, 8, 8)
+ bounds: 680 376 8 8
+ - image: solid-color(86, 47, 0, 255, 8, 8)
+ bounds: 688 376 8 8
+ - image: solid-color(87, 47, 0, 255, 8, 8)
+ bounds: 696 376 8 8
+ - image: solid-color(88, 47, 0, 255, 8, 8)
+ bounds: 704 376 8 8
+ - image: solid-color(89, 47, 0, 255, 8, 8)
+ bounds: 712 376 8 8
+ - image: solid-color(90, 47, 0, 255, 8, 8)
+ bounds: 720 376 8 8
+ - image: solid-color(91, 47, 0, 255, 8, 8)
+ bounds: 728 376 8 8
+ - image: solid-color(92, 47, 0, 255, 8, 8)
+ bounds: 736 376 8 8
+ - image: solid-color(93, 47, 0, 255, 8, 8)
+ bounds: 744 376 8 8
+ - image: solid-color(94, 47, 0, 255, 8, 8)
+ bounds: 752 376 8 8
+ - image: solid-color(95, 47, 0, 255, 8, 8)
+ bounds: 760 376 8 8
+ - image: solid-color(96, 47, 0, 255, 8, 8)
+ bounds: 768 376 8 8
+ - image: solid-color(97, 47, 0, 255, 8, 8)
+ bounds: 776 376 8 8
+ - image: solid-color(98, 47, 0, 255, 8, 8)
+ bounds: 784 376 8 8
+ - image: solid-color(99, 47, 0, 255, 8, 8)
+ bounds: 792 376 8 8
+ - image: solid-color(100, 47, 0, 255, 8, 8)
+ bounds: 800 376 8 8
+ - image: solid-color(101, 47, 0, 255, 8, 8)
+ bounds: 808 376 8 8
+ - image: solid-color(102, 47, 0, 255, 8, 8)
+ bounds: 816 376 8 8
+ - image: solid-color(103, 47, 0, 255, 8, 8)
+ bounds: 824 376 8 8
+ - image: solid-color(104, 47, 0, 255, 8, 8)
+ bounds: 832 376 8 8
+ - image: solid-color(105, 47, 0, 255, 8, 8)
+ bounds: 840 376 8 8
+ - image: solid-color(106, 47, 0, 255, 8, 8)
+ bounds: 848 376 8 8
+ - image: solid-color(107, 47, 0, 255, 8, 8)
+ bounds: 856 376 8 8
+ - image: solid-color(108, 47, 0, 255, 8, 8)
+ bounds: 864 376 8 8
+ - image: solid-color(109, 47, 0, 255, 8, 8)
+ bounds: 872 376 8 8
+ - image: solid-color(110, 47, 0, 255, 8, 8)
+ bounds: 880 376 8 8
+ - image: solid-color(111, 47, 0, 255, 8, 8)
+ bounds: 888 376 8 8
+ - image: solid-color(112, 47, 0, 255, 8, 8)
+ bounds: 896 376 8 8
+ - image: solid-color(113, 47, 0, 255, 8, 8)
+ bounds: 904 376 8 8
+ - image: solid-color(114, 47, 0, 255, 8, 8)
+ bounds: 912 376 8 8
+ - image: solid-color(115, 47, 0, 255, 8, 8)
+ bounds: 920 376 8 8
+ - image: solid-color(116, 47, 0, 255, 8, 8)
+ bounds: 928 376 8 8
+ - image: solid-color(117, 47, 0, 255, 8, 8)
+ bounds: 936 376 8 8
+ - image: solid-color(118, 47, 0, 255, 8, 8)
+ bounds: 944 376 8 8
+ - image: solid-color(119, 47, 0, 255, 8, 8)
+ bounds: 952 376 8 8
+ - image: solid-color(120, 47, 0, 255, 8, 8)
+ bounds: 960 376 8 8
+ - image: solid-color(121, 47, 0, 255, 8, 8)
+ bounds: 968 376 8 8
+ - image: solid-color(122, 47, 0, 255, 8, 8)
+ bounds: 976 376 8 8
+ - image: solid-color(123, 47, 0, 255, 8, 8)
+ bounds: 984 376 8 8
+ - image: solid-color(124, 47, 0, 255, 8, 8)
+ bounds: 992 376 8 8
+ - image: solid-color(125, 47, 0, 255, 8, 8)
+ bounds: 1000 376 8 8
+ - image: solid-color(126, 47, 0, 255, 8, 8)
+ bounds: 1008 376 8 8
+ - image: solid-color(127, 47, 0, 255, 8, 8)
+ bounds: 1016 376 8 8
+ - image: solid-color(0, 48, 0, 255, 8, 8)
+ bounds: 0 384 8 8
+ - image: solid-color(1, 48, 0, 255, 8, 8)
+ bounds: 8 384 8 8
+ - image: solid-color(2, 48, 0, 255, 8, 8)
+ bounds: 16 384 8 8
+ - image: solid-color(3, 48, 0, 255, 8, 8)
+ bounds: 24 384 8 8
+ - image: solid-color(4, 48, 0, 255, 8, 8)
+ bounds: 32 384 8 8
+ - image: solid-color(5, 48, 0, 255, 8, 8)
+ bounds: 40 384 8 8
+ - image: solid-color(6, 48, 0, 255, 8, 8)
+ bounds: 48 384 8 8
+ - image: solid-color(7, 48, 0, 255, 8, 8)
+ bounds: 56 384 8 8
+ - image: solid-color(8, 48, 0, 255, 8, 8)
+ bounds: 64 384 8 8
+ - image: solid-color(9, 48, 0, 255, 8, 8)
+ bounds: 72 384 8 8
+ - image: solid-color(10, 48, 0, 255, 8, 8)
+ bounds: 80 384 8 8
+ - image: solid-color(11, 48, 0, 255, 8, 8)
+ bounds: 88 384 8 8
+ - image: solid-color(12, 48, 0, 255, 8, 8)
+ bounds: 96 384 8 8
+ - image: solid-color(13, 48, 0, 255, 8, 8)
+ bounds: 104 384 8 8
+ - image: solid-color(14, 48, 0, 255, 8, 8)
+ bounds: 112 384 8 8
+ - image: solid-color(15, 48, 0, 255, 8, 8)
+ bounds: 120 384 8 8
+ - image: solid-color(16, 48, 0, 255, 8, 8)
+ bounds: 128 384 8 8
+ - image: solid-color(17, 48, 0, 255, 8, 8)
+ bounds: 136 384 8 8
+ - image: solid-color(18, 48, 0, 255, 8, 8)
+ bounds: 144 384 8 8
+ - image: solid-color(19, 48, 0, 255, 8, 8)
+ bounds: 152 384 8 8
+ - image: solid-color(20, 48, 0, 255, 8, 8)
+ bounds: 160 384 8 8
+ - image: solid-color(21, 48, 0, 255, 8, 8)
+ bounds: 168 384 8 8
+ - image: solid-color(22, 48, 0, 255, 8, 8)
+ bounds: 176 384 8 8
+ - image: solid-color(23, 48, 0, 255, 8, 8)
+ bounds: 184 384 8 8
+ - image: solid-color(24, 48, 0, 255, 8, 8)
+ bounds: 192 384 8 8
+ - image: solid-color(25, 48, 0, 255, 8, 8)
+ bounds: 200 384 8 8
+ - image: solid-color(26, 48, 0, 255, 8, 8)
+ bounds: 208 384 8 8
+ - image: solid-color(27, 48, 0, 255, 8, 8)
+ bounds: 216 384 8 8
+ - image: solid-color(28, 48, 0, 255, 8, 8)
+ bounds: 224 384 8 8
+ - image: solid-color(29, 48, 0, 255, 8, 8)
+ bounds: 232 384 8 8
+ - image: solid-color(30, 48, 0, 255, 8, 8)
+ bounds: 240 384 8 8
+ - image: solid-color(31, 48, 0, 255, 8, 8)
+ bounds: 248 384 8 8
+ - image: solid-color(32, 48, 0, 255, 8, 8)
+ bounds: 256 384 8 8
+ - image: solid-color(33, 48, 0, 255, 8, 8)
+ bounds: 264 384 8 8
+ - image: solid-color(34, 48, 0, 255, 8, 8)
+ bounds: 272 384 8 8
+ - image: solid-color(35, 48, 0, 255, 8, 8)
+ bounds: 280 384 8 8
+ - image: solid-color(36, 48, 0, 255, 8, 8)
+ bounds: 288 384 8 8
+ - image: solid-color(37, 48, 0, 255, 8, 8)
+ bounds: 296 384 8 8
+ - image: solid-color(38, 48, 0, 255, 8, 8)
+ bounds: 304 384 8 8
+ - image: solid-color(39, 48, 0, 255, 8, 8)
+ bounds: 312 384 8 8
+ - image: solid-color(40, 48, 0, 255, 8, 8)
+ bounds: 320 384 8 8
+ - image: solid-color(41, 48, 0, 255, 8, 8)
+ bounds: 328 384 8 8
+ - image: solid-color(42, 48, 0, 255, 8, 8)
+ bounds: 336 384 8 8
+ - image: solid-color(43, 48, 0, 255, 8, 8)
+ bounds: 344 384 8 8
+ - image: solid-color(44, 48, 0, 255, 8, 8)
+ bounds: 352 384 8 8
+ - image: solid-color(45, 48, 0, 255, 8, 8)
+ bounds: 360 384 8 8
+ - image: solid-color(46, 48, 0, 255, 8, 8)
+ bounds: 368 384 8 8
+ - image: solid-color(47, 48, 0, 255, 8, 8)
+ bounds: 376 384 8 8
+ - image: solid-color(48, 48, 0, 255, 8, 8)
+ bounds: 384 384 8 8
+ - image: solid-color(49, 48, 0, 255, 8, 8)
+ bounds: 392 384 8 8
+ - image: solid-color(50, 48, 0, 255, 8, 8)
+ bounds: 400 384 8 8
+ - image: solid-color(51, 48, 0, 255, 8, 8)
+ bounds: 408 384 8 8
+ - image: solid-color(52, 48, 0, 255, 8, 8)
+ bounds: 416 384 8 8
+ - image: solid-color(53, 48, 0, 255, 8, 8)
+ bounds: 424 384 8 8
+ - image: solid-color(54, 48, 0, 255, 8, 8)
+ bounds: 432 384 8 8
+ - image: solid-color(55, 48, 0, 255, 8, 8)
+ bounds: 440 384 8 8
+ - image: solid-color(56, 48, 0, 255, 8, 8)
+ bounds: 448 384 8 8
+ - image: solid-color(57, 48, 0, 255, 8, 8)
+ bounds: 456 384 8 8
+ - image: solid-color(58, 48, 0, 255, 8, 8)
+ bounds: 464 384 8 8
+ - image: solid-color(59, 48, 0, 255, 8, 8)
+ bounds: 472 384 8 8
+ - image: solid-color(60, 48, 0, 255, 8, 8)
+ bounds: 480 384 8 8
+ - image: solid-color(61, 48, 0, 255, 8, 8)
+ bounds: 488 384 8 8
+ - image: solid-color(62, 48, 0, 255, 8, 8)
+ bounds: 496 384 8 8
+ - image: solid-color(63, 48, 0, 255, 8, 8)
+ bounds: 504 384 8 8
+ - image: solid-color(64, 48, 0, 255, 8, 8)
+ bounds: 512 384 8 8
+ - image: solid-color(65, 48, 0, 255, 8, 8)
+ bounds: 520 384 8 8
+ - image: solid-color(66, 48, 0, 255, 8, 8)
+ bounds: 528 384 8 8
+ - image: solid-color(67, 48, 0, 255, 8, 8)
+ bounds: 536 384 8 8
+ - image: solid-color(68, 48, 0, 255, 8, 8)
+ bounds: 544 384 8 8
+ - image: solid-color(69, 48, 0, 255, 8, 8)
+ bounds: 552 384 8 8
+ - image: solid-color(70, 48, 0, 255, 8, 8)
+ bounds: 560 384 8 8
+ - image: solid-color(71, 48, 0, 255, 8, 8)
+ bounds: 568 384 8 8
+ - image: solid-color(72, 48, 0, 255, 8, 8)
+ bounds: 576 384 8 8
+ - image: solid-color(73, 48, 0, 255, 8, 8)
+ bounds: 584 384 8 8
+ - image: solid-color(74, 48, 0, 255, 8, 8)
+ bounds: 592 384 8 8
+ - image: solid-color(75, 48, 0, 255, 8, 8)
+ bounds: 600 384 8 8
+ - image: solid-color(76, 48, 0, 255, 8, 8)
+ bounds: 608 384 8 8
+ - image: solid-color(77, 48, 0, 255, 8, 8)
+ bounds: 616 384 8 8
+ - image: solid-color(78, 48, 0, 255, 8, 8)
+ bounds: 624 384 8 8
+ - image: solid-color(79, 48, 0, 255, 8, 8)
+ bounds: 632 384 8 8
+ - image: solid-color(80, 48, 0, 255, 8, 8)
+ bounds: 640 384 8 8
+ - image: solid-color(81, 48, 0, 255, 8, 8)
+ bounds: 648 384 8 8
+ - image: solid-color(82, 48, 0, 255, 8, 8)
+ bounds: 656 384 8 8
+ - image: solid-color(83, 48, 0, 255, 8, 8)
+ bounds: 664 384 8 8
+ - image: solid-color(84, 48, 0, 255, 8, 8)
+ bounds: 672 384 8 8
+ - image: solid-color(85, 48, 0, 255, 8, 8)
+ bounds: 680 384 8 8
+ - image: solid-color(86, 48, 0, 255, 8, 8)
+ bounds: 688 384 8 8
+ - image: solid-color(87, 48, 0, 255, 8, 8)
+ bounds: 696 384 8 8
+ - image: solid-color(88, 48, 0, 255, 8, 8)
+ bounds: 704 384 8 8
+ - image: solid-color(89, 48, 0, 255, 8, 8)
+ bounds: 712 384 8 8
+ - image: solid-color(90, 48, 0, 255, 8, 8)
+ bounds: 720 384 8 8
+ - image: solid-color(91, 48, 0, 255, 8, 8)
+ bounds: 728 384 8 8
+ - image: solid-color(92, 48, 0, 255, 8, 8)
+ bounds: 736 384 8 8
+ - image: solid-color(93, 48, 0, 255, 8, 8)
+ bounds: 744 384 8 8
+ - image: solid-color(94, 48, 0, 255, 8, 8)
+ bounds: 752 384 8 8
+ - image: solid-color(95, 48, 0, 255, 8, 8)
+ bounds: 760 384 8 8
+ - image: solid-color(96, 48, 0, 255, 8, 8)
+ bounds: 768 384 8 8
+ - image: solid-color(97, 48, 0, 255, 8, 8)
+ bounds: 776 384 8 8
+ - image: solid-color(98, 48, 0, 255, 8, 8)
+ bounds: 784 384 8 8
+ - image: solid-color(99, 48, 0, 255, 8, 8)
+ bounds: 792 384 8 8
+ - image: solid-color(100, 48, 0, 255, 8, 8)
+ bounds: 800 384 8 8
+ - image: solid-color(101, 48, 0, 255, 8, 8)
+ bounds: 808 384 8 8
+ - image: solid-color(102, 48, 0, 255, 8, 8)
+ bounds: 816 384 8 8
+ - image: solid-color(103, 48, 0, 255, 8, 8)
+ bounds: 824 384 8 8
+ - image: solid-color(104, 48, 0, 255, 8, 8)
+ bounds: 832 384 8 8
+ - image: solid-color(105, 48, 0, 255, 8, 8)
+ bounds: 840 384 8 8
+ - image: solid-color(106, 48, 0, 255, 8, 8)
+ bounds: 848 384 8 8
+ - image: solid-color(107, 48, 0, 255, 8, 8)
+ bounds: 856 384 8 8
+ - image: solid-color(108, 48, 0, 255, 8, 8)
+ bounds: 864 384 8 8
+ - image: solid-color(109, 48, 0, 255, 8, 8)
+ bounds: 872 384 8 8
+ - image: solid-color(110, 48, 0, 255, 8, 8)
+ bounds: 880 384 8 8
+ - image: solid-color(111, 48, 0, 255, 8, 8)
+ bounds: 888 384 8 8
+ - image: solid-color(112, 48, 0, 255, 8, 8)
+ bounds: 896 384 8 8
+ - image: solid-color(113, 48, 0, 255, 8, 8)
+ bounds: 904 384 8 8
+ - image: solid-color(114, 48, 0, 255, 8, 8)
+ bounds: 912 384 8 8
+ - image: solid-color(115, 48, 0, 255, 8, 8)
+ bounds: 920 384 8 8
+ - image: solid-color(116, 48, 0, 255, 8, 8)
+ bounds: 928 384 8 8
+ - image: solid-color(117, 48, 0, 255, 8, 8)
+ bounds: 936 384 8 8
+ - image: solid-color(118, 48, 0, 255, 8, 8)
+ bounds: 944 384 8 8
+ - image: solid-color(119, 48, 0, 255, 8, 8)
+ bounds: 952 384 8 8
+ - image: solid-color(120, 48, 0, 255, 8, 8)
+ bounds: 960 384 8 8
+ - image: solid-color(121, 48, 0, 255, 8, 8)
+ bounds: 968 384 8 8
+ - image: solid-color(122, 48, 0, 255, 8, 8)
+ bounds: 976 384 8 8
+ - image: solid-color(123, 48, 0, 255, 8, 8)
+ bounds: 984 384 8 8
+ - image: solid-color(124, 48, 0, 255, 8, 8)
+ bounds: 992 384 8 8
+ - image: solid-color(125, 48, 0, 255, 8, 8)
+ bounds: 1000 384 8 8
+ - image: solid-color(126, 48, 0, 255, 8, 8)
+ bounds: 1008 384 8 8
+ - image: solid-color(127, 48, 0, 255, 8, 8)
+ bounds: 1016 384 8 8
+ - image: solid-color(0, 49, 0, 255, 8, 8)
+ bounds: 0 392 8 8
+ - image: solid-color(1, 49, 0, 255, 8, 8)
+ bounds: 8 392 8 8
+ - image: solid-color(2, 49, 0, 255, 8, 8)
+ bounds: 16 392 8 8
+ - image: solid-color(3, 49, 0, 255, 8, 8)
+ bounds: 24 392 8 8
+ - image: solid-color(4, 49, 0, 255, 8, 8)
+ bounds: 32 392 8 8
+ - image: solid-color(5, 49, 0, 255, 8, 8)
+ bounds: 40 392 8 8
+ - image: solid-color(6, 49, 0, 255, 8, 8)
+ bounds: 48 392 8 8
+ - image: solid-color(7, 49, 0, 255, 8, 8)
+ bounds: 56 392 8 8
+ - image: solid-color(8, 49, 0, 255, 8, 8)
+ bounds: 64 392 8 8
+ - image: solid-color(9, 49, 0, 255, 8, 8)
+ bounds: 72 392 8 8
+ - image: solid-color(10, 49, 0, 255, 8, 8)
+ bounds: 80 392 8 8
+ - image: solid-color(11, 49, 0, 255, 8, 8)
+ bounds: 88 392 8 8
+ - image: solid-color(12, 49, 0, 255, 8, 8)
+ bounds: 96 392 8 8
+ - image: solid-color(13, 49, 0, 255, 8, 8)
+ bounds: 104 392 8 8
+ - image: solid-color(14, 49, 0, 255, 8, 8)
+ bounds: 112 392 8 8
+ - image: solid-color(15, 49, 0, 255, 8, 8)
+ bounds: 120 392 8 8
+ - image: solid-color(16, 49, 0, 255, 8, 8)
+ bounds: 128 392 8 8
+ - image: solid-color(17, 49, 0, 255, 8, 8)
+ bounds: 136 392 8 8
+ - image: solid-color(18, 49, 0, 255, 8, 8)
+ bounds: 144 392 8 8
+ - image: solid-color(19, 49, 0, 255, 8, 8)
+ bounds: 152 392 8 8
+ - image: solid-color(20, 49, 0, 255, 8, 8)
+ bounds: 160 392 8 8
+ - image: solid-color(21, 49, 0, 255, 8, 8)
+ bounds: 168 392 8 8
+ - image: solid-color(22, 49, 0, 255, 8, 8)
+ bounds: 176 392 8 8
+ - image: solid-color(23, 49, 0, 255, 8, 8)
+ bounds: 184 392 8 8
+ - image: solid-color(24, 49, 0, 255, 8, 8)
+ bounds: 192 392 8 8
+ - image: solid-color(25, 49, 0, 255, 8, 8)
+ bounds: 200 392 8 8
+ - image: solid-color(26, 49, 0, 255, 8, 8)
+ bounds: 208 392 8 8
+ - image: solid-color(27, 49, 0, 255, 8, 8)
+ bounds: 216 392 8 8
+ - image: solid-color(28, 49, 0, 255, 8, 8)
+ bounds: 224 392 8 8
+ - image: solid-color(29, 49, 0, 255, 8, 8)
+ bounds: 232 392 8 8
+ - image: solid-color(30, 49, 0, 255, 8, 8)
+ bounds: 240 392 8 8
+ - image: solid-color(31, 49, 0, 255, 8, 8)
+ bounds: 248 392 8 8
+ - image: solid-color(32, 49, 0, 255, 8, 8)
+ bounds: 256 392 8 8
+ - image: solid-color(33, 49, 0, 255, 8, 8)
+ bounds: 264 392 8 8
+ - image: solid-color(34, 49, 0, 255, 8, 8)
+ bounds: 272 392 8 8
+ - image: solid-color(35, 49, 0, 255, 8, 8)
+ bounds: 280 392 8 8
+ - image: solid-color(36, 49, 0, 255, 8, 8)
+ bounds: 288 392 8 8
+ - image: solid-color(37, 49, 0, 255, 8, 8)
+ bounds: 296 392 8 8
+ - image: solid-color(38, 49, 0, 255, 8, 8)
+ bounds: 304 392 8 8
+ - image: solid-color(39, 49, 0, 255, 8, 8)
+ bounds: 312 392 8 8
+ - image: solid-color(40, 49, 0, 255, 8, 8)
+ bounds: 320 392 8 8
+ - image: solid-color(41, 49, 0, 255, 8, 8)
+ bounds: 328 392 8 8
+ - image: solid-color(42, 49, 0, 255, 8, 8)
+ bounds: 336 392 8 8
+ - image: solid-color(43, 49, 0, 255, 8, 8)
+ bounds: 344 392 8 8
+ - image: solid-color(44, 49, 0, 255, 8, 8)
+ bounds: 352 392 8 8
+ - image: solid-color(45, 49, 0, 255, 8, 8)
+ bounds: 360 392 8 8
+ - image: solid-color(46, 49, 0, 255, 8, 8)
+ bounds: 368 392 8 8
+ - image: solid-color(47, 49, 0, 255, 8, 8)
+ bounds: 376 392 8 8
+ - image: solid-color(48, 49, 0, 255, 8, 8)
+ bounds: 384 392 8 8
+ - image: solid-color(49, 49, 0, 255, 8, 8)
+ bounds: 392 392 8 8
+ - image: solid-color(50, 49, 0, 255, 8, 8)
+ bounds: 400 392 8 8
+ - image: solid-color(51, 49, 0, 255, 8, 8)
+ bounds: 408 392 8 8
+ - image: solid-color(52, 49, 0, 255, 8, 8)
+ bounds: 416 392 8 8
+ - image: solid-color(53, 49, 0, 255, 8, 8)
+ bounds: 424 392 8 8
+ - image: solid-color(54, 49, 0, 255, 8, 8)
+ bounds: 432 392 8 8
+ - image: solid-color(55, 49, 0, 255, 8, 8)
+ bounds: 440 392 8 8
+ - image: solid-color(56, 49, 0, 255, 8, 8)
+ bounds: 448 392 8 8
+ - image: solid-color(57, 49, 0, 255, 8, 8)
+ bounds: 456 392 8 8
+ - image: solid-color(58, 49, 0, 255, 8, 8)
+ bounds: 464 392 8 8
+ - image: solid-color(59, 49, 0, 255, 8, 8)
+ bounds: 472 392 8 8
+ - image: solid-color(60, 49, 0, 255, 8, 8)
+ bounds: 480 392 8 8
+ - image: solid-color(61, 49, 0, 255, 8, 8)
+ bounds: 488 392 8 8
+ - image: solid-color(62, 49, 0, 255, 8, 8)
+ bounds: 496 392 8 8
+ - image: solid-color(63, 49, 0, 255, 8, 8)
+ bounds: 504 392 8 8
+ - image: solid-color(64, 49, 0, 255, 8, 8)
+ bounds: 512 392 8 8
+ - image: solid-color(65, 49, 0, 255, 8, 8)
+ bounds: 520 392 8 8
+ - image: solid-color(66, 49, 0, 255, 8, 8)
+ bounds: 528 392 8 8
+ - image: solid-color(67, 49, 0, 255, 8, 8)
+ bounds: 536 392 8 8
+ - image: solid-color(68, 49, 0, 255, 8, 8)
+ bounds: 544 392 8 8
+ - image: solid-color(69, 49, 0, 255, 8, 8)
+ bounds: 552 392 8 8
+ - image: solid-color(70, 49, 0, 255, 8, 8)
+ bounds: 560 392 8 8
+ - image: solid-color(71, 49, 0, 255, 8, 8)
+ bounds: 568 392 8 8
+ - image: solid-color(72, 49, 0, 255, 8, 8)
+ bounds: 576 392 8 8
+ - image: solid-color(73, 49, 0, 255, 8, 8)
+ bounds: 584 392 8 8
+ - image: solid-color(74, 49, 0, 255, 8, 8)
+ bounds: 592 392 8 8
+ - image: solid-color(75, 49, 0, 255, 8, 8)
+ bounds: 600 392 8 8
+ - image: solid-color(76, 49, 0, 255, 8, 8)
+ bounds: 608 392 8 8
+ - image: solid-color(77, 49, 0, 255, 8, 8)
+ bounds: 616 392 8 8
+ - image: solid-color(78, 49, 0, 255, 8, 8)
+ bounds: 624 392 8 8
+ - image: solid-color(79, 49, 0, 255, 8, 8)
+ bounds: 632 392 8 8
+ - image: solid-color(80, 49, 0, 255, 8, 8)
+ bounds: 640 392 8 8
+ - image: solid-color(81, 49, 0, 255, 8, 8)
+ bounds: 648 392 8 8
+ - image: solid-color(82, 49, 0, 255, 8, 8)
+ bounds: 656 392 8 8
+ - image: solid-color(83, 49, 0, 255, 8, 8)
+ bounds: 664 392 8 8
+ - image: solid-color(84, 49, 0, 255, 8, 8)
+ bounds: 672 392 8 8
+ - image: solid-color(85, 49, 0, 255, 8, 8)
+ bounds: 680 392 8 8
+ - image: solid-color(86, 49, 0, 255, 8, 8)
+ bounds: 688 392 8 8
+ - image: solid-color(87, 49, 0, 255, 8, 8)
+ bounds: 696 392 8 8
+ - image: solid-color(88, 49, 0, 255, 8, 8)
+ bounds: 704 392 8 8
+ - image: solid-color(89, 49, 0, 255, 8, 8)
+ bounds: 712 392 8 8
+ - image: solid-color(90, 49, 0, 255, 8, 8)
+ bounds: 720 392 8 8
+ - image: solid-color(91, 49, 0, 255, 8, 8)
+ bounds: 728 392 8 8
+ - image: solid-color(92, 49, 0, 255, 8, 8)
+ bounds: 736 392 8 8
+ - image: solid-color(93, 49, 0, 255, 8, 8)
+ bounds: 744 392 8 8
+ - image: solid-color(94, 49, 0, 255, 8, 8)
+ bounds: 752 392 8 8
+ - image: solid-color(95, 49, 0, 255, 8, 8)
+ bounds: 760 392 8 8
+ - image: solid-color(96, 49, 0, 255, 8, 8)
+ bounds: 768 392 8 8
+ - image: solid-color(97, 49, 0, 255, 8, 8)
+ bounds: 776 392 8 8
+ - image: solid-color(98, 49, 0, 255, 8, 8)
+ bounds: 784 392 8 8
+ - image: solid-color(99, 49, 0, 255, 8, 8)
+ bounds: 792 392 8 8
+ - image: solid-color(100, 49, 0, 255, 8, 8)
+ bounds: 800 392 8 8
+ - image: solid-color(101, 49, 0, 255, 8, 8)
+ bounds: 808 392 8 8
+ - image: solid-color(102, 49, 0, 255, 8, 8)
+ bounds: 816 392 8 8
+ - image: solid-color(103, 49, 0, 255, 8, 8)
+ bounds: 824 392 8 8
+ - image: solid-color(104, 49, 0, 255, 8, 8)
+ bounds: 832 392 8 8
+ - image: solid-color(105, 49, 0, 255, 8, 8)
+ bounds: 840 392 8 8
+ - image: solid-color(106, 49, 0, 255, 8, 8)
+ bounds: 848 392 8 8
+ - image: solid-color(107, 49, 0, 255, 8, 8)
+ bounds: 856 392 8 8
+ - image: solid-color(108, 49, 0, 255, 8, 8)
+ bounds: 864 392 8 8
+ - image: solid-color(109, 49, 0, 255, 8, 8)
+ bounds: 872 392 8 8
+ - image: solid-color(110, 49, 0, 255, 8, 8)
+ bounds: 880 392 8 8
+ - image: solid-color(111, 49, 0, 255, 8, 8)
+ bounds: 888 392 8 8
+ - image: solid-color(112, 49, 0, 255, 8, 8)
+ bounds: 896 392 8 8
+ - image: solid-color(113, 49, 0, 255, 8, 8)
+ bounds: 904 392 8 8
+ - image: solid-color(114, 49, 0, 255, 8, 8)
+ bounds: 912 392 8 8
+ - image: solid-color(115, 49, 0, 255, 8, 8)
+ bounds: 920 392 8 8
+ - image: solid-color(116, 49, 0, 255, 8, 8)
+ bounds: 928 392 8 8
+ - image: solid-color(117, 49, 0, 255, 8, 8)
+ bounds: 936 392 8 8
+ - image: solid-color(118, 49, 0, 255, 8, 8)
+ bounds: 944 392 8 8
+ - image: solid-color(119, 49, 0, 255, 8, 8)
+ bounds: 952 392 8 8
+ - image: solid-color(120, 49, 0, 255, 8, 8)
+ bounds: 960 392 8 8
+ - image: solid-color(121, 49, 0, 255, 8, 8)
+ bounds: 968 392 8 8
+ - image: solid-color(122, 49, 0, 255, 8, 8)
+ bounds: 976 392 8 8
+ - image: solid-color(123, 49, 0, 255, 8, 8)
+ bounds: 984 392 8 8
+ - image: solid-color(124, 49, 0, 255, 8, 8)
+ bounds: 992 392 8 8
+ - image: solid-color(125, 49, 0, 255, 8, 8)
+ bounds: 1000 392 8 8
+ - image: solid-color(126, 49, 0, 255, 8, 8)
+ bounds: 1008 392 8 8
+ - image: solid-color(127, 49, 0, 255, 8, 8)
+ bounds: 1016 392 8 8
+ - image: solid-color(0, 50, 0, 255, 8, 8)
+ bounds: 0 400 8 8
+ - image: solid-color(1, 50, 0, 255, 8, 8)
+ bounds: 8 400 8 8
+ - image: solid-color(2, 50, 0, 255, 8, 8)
+ bounds: 16 400 8 8
+ - image: solid-color(3, 50, 0, 255, 8, 8)
+ bounds: 24 400 8 8
+ - image: solid-color(4, 50, 0, 255, 8, 8)
+ bounds: 32 400 8 8
+ - image: solid-color(5, 50, 0, 255, 8, 8)
+ bounds: 40 400 8 8
+ - image: solid-color(6, 50, 0, 255, 8, 8)
+ bounds: 48 400 8 8
+ - image: solid-color(7, 50, 0, 255, 8, 8)
+ bounds: 56 400 8 8
+ - image: solid-color(8, 50, 0, 255, 8, 8)
+ bounds: 64 400 8 8
+ - image: solid-color(9, 50, 0, 255, 8, 8)
+ bounds: 72 400 8 8
+ - image: solid-color(10, 50, 0, 255, 8, 8)
+ bounds: 80 400 8 8
+ - image: solid-color(11, 50, 0, 255, 8, 8)
+ bounds: 88 400 8 8
+ - image: solid-color(12, 50, 0, 255, 8, 8)
+ bounds: 96 400 8 8
+ - image: solid-color(13, 50, 0, 255, 8, 8)
+ bounds: 104 400 8 8
+ - image: solid-color(14, 50, 0, 255, 8, 8)
+ bounds: 112 400 8 8
+ - image: solid-color(15, 50, 0, 255, 8, 8)
+ bounds: 120 400 8 8
+ - image: solid-color(16, 50, 0, 255, 8, 8)
+ bounds: 128 400 8 8
+ - image: solid-color(17, 50, 0, 255, 8, 8)
+ bounds: 136 400 8 8
+ - image: solid-color(18, 50, 0, 255, 8, 8)
+ bounds: 144 400 8 8
+ - image: solid-color(19, 50, 0, 255, 8, 8)
+ bounds: 152 400 8 8
+ - image: solid-color(20, 50, 0, 255, 8, 8)
+ bounds: 160 400 8 8
+ - image: solid-color(21, 50, 0, 255, 8, 8)
+ bounds: 168 400 8 8
+ - image: solid-color(22, 50, 0, 255, 8, 8)
+ bounds: 176 400 8 8
+ - image: solid-color(23, 50, 0, 255, 8, 8)
+ bounds: 184 400 8 8
+ - image: solid-color(24, 50, 0, 255, 8, 8)
+ bounds: 192 400 8 8
+ - image: solid-color(25, 50, 0, 255, 8, 8)
+ bounds: 200 400 8 8
+ - image: solid-color(26, 50, 0, 255, 8, 8)
+ bounds: 208 400 8 8
+ - image: solid-color(27, 50, 0, 255, 8, 8)
+ bounds: 216 400 8 8
+ - image: solid-color(28, 50, 0, 255, 8, 8)
+ bounds: 224 400 8 8
+ - image: solid-color(29, 50, 0, 255, 8, 8)
+ bounds: 232 400 8 8
+ - image: solid-color(30, 50, 0, 255, 8, 8)
+ bounds: 240 400 8 8
+ - image: solid-color(31, 50, 0, 255, 8, 8)
+ bounds: 248 400 8 8
+ - image: solid-color(32, 50, 0, 255, 8, 8)
+ bounds: 256 400 8 8
+ - image: solid-color(33, 50, 0, 255, 8, 8)
+ bounds: 264 400 8 8
+ - image: solid-color(34, 50, 0, 255, 8, 8)
+ bounds: 272 400 8 8
+ - image: solid-color(35, 50, 0, 255, 8, 8)
+ bounds: 280 400 8 8
+ - image: solid-color(36, 50, 0, 255, 8, 8)
+ bounds: 288 400 8 8
+ - image: solid-color(37, 50, 0, 255, 8, 8)
+ bounds: 296 400 8 8
+ - image: solid-color(38, 50, 0, 255, 8, 8)
+ bounds: 304 400 8 8
+ - image: solid-color(39, 50, 0, 255, 8, 8)
+ bounds: 312 400 8 8
+ - image: solid-color(40, 50, 0, 255, 8, 8)
+ bounds: 320 400 8 8
+ - image: solid-color(41, 50, 0, 255, 8, 8)
+ bounds: 328 400 8 8
+ - image: solid-color(42, 50, 0, 255, 8, 8)
+ bounds: 336 400 8 8
+ - image: solid-color(43, 50, 0, 255, 8, 8)
+ bounds: 344 400 8 8
+ - image: solid-color(44, 50, 0, 255, 8, 8)
+ bounds: 352 400 8 8
+ - image: solid-color(45, 50, 0, 255, 8, 8)
+ bounds: 360 400 8 8
+ - image: solid-color(46, 50, 0, 255, 8, 8)
+ bounds: 368 400 8 8
+ - image: solid-color(47, 50, 0, 255, 8, 8)
+ bounds: 376 400 8 8
+ - image: solid-color(48, 50, 0, 255, 8, 8)
+ bounds: 384 400 8 8
+ - image: solid-color(49, 50, 0, 255, 8, 8)
+ bounds: 392 400 8 8
+ - image: solid-color(50, 50, 0, 255, 8, 8)
+ bounds: 400 400 8 8
+ - image: solid-color(51, 50, 0, 255, 8, 8)
+ bounds: 408 400 8 8
+ - image: solid-color(52, 50, 0, 255, 8, 8)
+ bounds: 416 400 8 8
+ - image: solid-color(53, 50, 0, 255, 8, 8)
+ bounds: 424 400 8 8
+ - image: solid-color(54, 50, 0, 255, 8, 8)
+ bounds: 432 400 8 8
+ - image: solid-color(55, 50, 0, 255, 8, 8)
+ bounds: 440 400 8 8
+ - image: solid-color(56, 50, 0, 255, 8, 8)
+ bounds: 448 400 8 8
+ - image: solid-color(57, 50, 0, 255, 8, 8)
+ bounds: 456 400 8 8
+ - image: solid-color(58, 50, 0, 255, 8, 8)
+ bounds: 464 400 8 8
+ - image: solid-color(59, 50, 0, 255, 8, 8)
+ bounds: 472 400 8 8
+ - image: solid-color(60, 50, 0, 255, 8, 8)
+ bounds: 480 400 8 8
+ - image: solid-color(61, 50, 0, 255, 8, 8)
+ bounds: 488 400 8 8
+ - image: solid-color(62, 50, 0, 255, 8, 8)
+ bounds: 496 400 8 8
+ - image: solid-color(63, 50, 0, 255, 8, 8)
+ bounds: 504 400 8 8
+ - image: solid-color(64, 50, 0, 255, 8, 8)
+ bounds: 512 400 8 8
+ - image: solid-color(65, 50, 0, 255, 8, 8)
+ bounds: 520 400 8 8
+ - image: solid-color(66, 50, 0, 255, 8, 8)
+ bounds: 528 400 8 8
+ - image: solid-color(67, 50, 0, 255, 8, 8)
+ bounds: 536 400 8 8
+ - image: solid-color(68, 50, 0, 255, 8, 8)
+ bounds: 544 400 8 8
+ - image: solid-color(69, 50, 0, 255, 8, 8)
+ bounds: 552 400 8 8
+ - image: solid-color(70, 50, 0, 255, 8, 8)
+ bounds: 560 400 8 8
+ - image: solid-color(71, 50, 0, 255, 8, 8)
+ bounds: 568 400 8 8
+ - image: solid-color(72, 50, 0, 255, 8, 8)
+ bounds: 576 400 8 8
+ - image: solid-color(73, 50, 0, 255, 8, 8)
+ bounds: 584 400 8 8
+ - image: solid-color(74, 50, 0, 255, 8, 8)
+ bounds: 592 400 8 8
+ - image: solid-color(75, 50, 0, 255, 8, 8)
+ bounds: 600 400 8 8
+ - image: solid-color(76, 50, 0, 255, 8, 8)
+ bounds: 608 400 8 8
+ - image: solid-color(77, 50, 0, 255, 8, 8)
+ bounds: 616 400 8 8
+ - image: solid-color(78, 50, 0, 255, 8, 8)
+ bounds: 624 400 8 8
+ - image: solid-color(79, 50, 0, 255, 8, 8)
+ bounds: 632 400 8 8
+ - image: solid-color(80, 50, 0, 255, 8, 8)
+ bounds: 640 400 8 8
+ - image: solid-color(81, 50, 0, 255, 8, 8)
+ bounds: 648 400 8 8
+ - image: solid-color(82, 50, 0, 255, 8, 8)
+ bounds: 656 400 8 8
+ - image: solid-color(83, 50, 0, 255, 8, 8)
+ bounds: 664 400 8 8
+ - image: solid-color(84, 50, 0, 255, 8, 8)
+ bounds: 672 400 8 8
+ - image: solid-color(85, 50, 0, 255, 8, 8)
+ bounds: 680 400 8 8
+ - image: solid-color(86, 50, 0, 255, 8, 8)
+ bounds: 688 400 8 8
+ - image: solid-color(87, 50, 0, 255, 8, 8)
+ bounds: 696 400 8 8
+ - image: solid-color(88, 50, 0, 255, 8, 8)
+ bounds: 704 400 8 8
+ - image: solid-color(89, 50, 0, 255, 8, 8)
+ bounds: 712 400 8 8
+ - image: solid-color(90, 50, 0, 255, 8, 8)
+ bounds: 720 400 8 8
+ - image: solid-color(91, 50, 0, 255, 8, 8)
+ bounds: 728 400 8 8
+ - image: solid-color(92, 50, 0, 255, 8, 8)
+ bounds: 736 400 8 8
+ - image: solid-color(93, 50, 0, 255, 8, 8)
+ bounds: 744 400 8 8
+ - image: solid-color(94, 50, 0, 255, 8, 8)
+ bounds: 752 400 8 8
+ - image: solid-color(95, 50, 0, 255, 8, 8)
+ bounds: 760 400 8 8
+ - image: solid-color(96, 50, 0, 255, 8, 8)
+ bounds: 768 400 8 8
+ - image: solid-color(97, 50, 0, 255, 8, 8)
+ bounds: 776 400 8 8
+ - image: solid-color(98, 50, 0, 255, 8, 8)
+ bounds: 784 400 8 8
+ - image: solid-color(99, 50, 0, 255, 8, 8)
+ bounds: 792 400 8 8
+ - image: solid-color(100, 50, 0, 255, 8, 8)
+ bounds: 800 400 8 8
+ - image: solid-color(101, 50, 0, 255, 8, 8)
+ bounds: 808 400 8 8
+ - image: solid-color(102, 50, 0, 255, 8, 8)
+ bounds: 816 400 8 8
+ - image: solid-color(103, 50, 0, 255, 8, 8)
+ bounds: 824 400 8 8
+ - image: solid-color(104, 50, 0, 255, 8, 8)
+ bounds: 832 400 8 8
+ - image: solid-color(105, 50, 0, 255, 8, 8)
+ bounds: 840 400 8 8
+ - image: solid-color(106, 50, 0, 255, 8, 8)
+ bounds: 848 400 8 8
+ - image: solid-color(107, 50, 0, 255, 8, 8)
+ bounds: 856 400 8 8
+ - image: solid-color(108, 50, 0, 255, 8, 8)
+ bounds: 864 400 8 8
+ - image: solid-color(109, 50, 0, 255, 8, 8)
+ bounds: 872 400 8 8
+ - image: solid-color(110, 50, 0, 255, 8, 8)
+ bounds: 880 400 8 8
+ - image: solid-color(111, 50, 0, 255, 8, 8)
+ bounds: 888 400 8 8
+ - image: solid-color(112, 50, 0, 255, 8, 8)
+ bounds: 896 400 8 8
+ - image: solid-color(113, 50, 0, 255, 8, 8)
+ bounds: 904 400 8 8
+ - image: solid-color(114, 50, 0, 255, 8, 8)
+ bounds: 912 400 8 8
+ - image: solid-color(115, 50, 0, 255, 8, 8)
+ bounds: 920 400 8 8
+ - image: solid-color(116, 50, 0, 255, 8, 8)
+ bounds: 928 400 8 8
+ - image: solid-color(117, 50, 0, 255, 8, 8)
+ bounds: 936 400 8 8
+ - image: solid-color(118, 50, 0, 255, 8, 8)
+ bounds: 944 400 8 8
+ - image: solid-color(119, 50, 0, 255, 8, 8)
+ bounds: 952 400 8 8
+ - image: solid-color(120, 50, 0, 255, 8, 8)
+ bounds: 960 400 8 8
+ - image: solid-color(121, 50, 0, 255, 8, 8)
+ bounds: 968 400 8 8
+ - image: solid-color(122, 50, 0, 255, 8, 8)
+ bounds: 976 400 8 8
+ - image: solid-color(123, 50, 0, 255, 8, 8)
+ bounds: 984 400 8 8
+ - image: solid-color(124, 50, 0, 255, 8, 8)
+ bounds: 992 400 8 8
+ - image: solid-color(125, 50, 0, 255, 8, 8)
+ bounds: 1000 400 8 8
+ - image: solid-color(126, 50, 0, 255, 8, 8)
+ bounds: 1008 400 8 8
+ - image: solid-color(127, 50, 0, 255, 8, 8)
+ bounds: 1016 400 8 8
+ - image: solid-color(0, 51, 0, 255, 8, 8)
+ bounds: 0 408 8 8
+ - image: solid-color(1, 51, 0, 255, 8, 8)
+ bounds: 8 408 8 8
+ - image: solid-color(2, 51, 0, 255, 8, 8)
+ bounds: 16 408 8 8
+ - image: solid-color(3, 51, 0, 255, 8, 8)
+ bounds: 24 408 8 8
+ - image: solid-color(4, 51, 0, 255, 8, 8)
+ bounds: 32 408 8 8
+ - image: solid-color(5, 51, 0, 255, 8, 8)
+ bounds: 40 408 8 8
+ - image: solid-color(6, 51, 0, 255, 8, 8)
+ bounds: 48 408 8 8
+ - image: solid-color(7, 51, 0, 255, 8, 8)
+ bounds: 56 408 8 8
+ - image: solid-color(8, 51, 0, 255, 8, 8)
+ bounds: 64 408 8 8
+ - image: solid-color(9, 51, 0, 255, 8, 8)
+ bounds: 72 408 8 8
+ - image: solid-color(10, 51, 0, 255, 8, 8)
+ bounds: 80 408 8 8
+ - image: solid-color(11, 51, 0, 255, 8, 8)
+ bounds: 88 408 8 8
+ - image: solid-color(12, 51, 0, 255, 8, 8)
+ bounds: 96 408 8 8
+ - image: solid-color(13, 51, 0, 255, 8, 8)
+ bounds: 104 408 8 8
+ - image: solid-color(14, 51, 0, 255, 8, 8)
+ bounds: 112 408 8 8
+ - image: solid-color(15, 51, 0, 255, 8, 8)
+ bounds: 120 408 8 8
+ - image: solid-color(16, 51, 0, 255, 8, 8)
+ bounds: 128 408 8 8
+ - image: solid-color(17, 51, 0, 255, 8, 8)
+ bounds: 136 408 8 8
+ - image: solid-color(18, 51, 0, 255, 8, 8)
+ bounds: 144 408 8 8
+ - image: solid-color(19, 51, 0, 255, 8, 8)
+ bounds: 152 408 8 8
+ - image: solid-color(20, 51, 0, 255, 8, 8)
+ bounds: 160 408 8 8
+ - image: solid-color(21, 51, 0, 255, 8, 8)
+ bounds: 168 408 8 8
+ - image: solid-color(22, 51, 0, 255, 8, 8)
+ bounds: 176 408 8 8
+ - image: solid-color(23, 51, 0, 255, 8, 8)
+ bounds: 184 408 8 8
+ - image: solid-color(24, 51, 0, 255, 8, 8)
+ bounds: 192 408 8 8
+ - image: solid-color(25, 51, 0, 255, 8, 8)
+ bounds: 200 408 8 8
+ - image: solid-color(26, 51, 0, 255, 8, 8)
+ bounds: 208 408 8 8
+ - image: solid-color(27, 51, 0, 255, 8, 8)
+ bounds: 216 408 8 8
+ - image: solid-color(28, 51, 0, 255, 8, 8)
+ bounds: 224 408 8 8
+ - image: solid-color(29, 51, 0, 255, 8, 8)
+ bounds: 232 408 8 8
+ - image: solid-color(30, 51, 0, 255, 8, 8)
+ bounds: 240 408 8 8
+ - image: solid-color(31, 51, 0, 255, 8, 8)
+ bounds: 248 408 8 8
+ - image: solid-color(32, 51, 0, 255, 8, 8)
+ bounds: 256 408 8 8
+ - image: solid-color(33, 51, 0, 255, 8, 8)
+ bounds: 264 408 8 8
+ - image: solid-color(34, 51, 0, 255, 8, 8)
+ bounds: 272 408 8 8
+ - image: solid-color(35, 51, 0, 255, 8, 8)
+ bounds: 280 408 8 8
+ - image: solid-color(36, 51, 0, 255, 8, 8)
+ bounds: 288 408 8 8
+ - image: solid-color(37, 51, 0, 255, 8, 8)
+ bounds: 296 408 8 8
+ - image: solid-color(38, 51, 0, 255, 8, 8)
+ bounds: 304 408 8 8
+ - image: solid-color(39, 51, 0, 255, 8, 8)
+ bounds: 312 408 8 8
+ - image: solid-color(40, 51, 0, 255, 8, 8)
+ bounds: 320 408 8 8
+ - image: solid-color(41, 51, 0, 255, 8, 8)
+ bounds: 328 408 8 8
+ - image: solid-color(42, 51, 0, 255, 8, 8)
+ bounds: 336 408 8 8
+ - image: solid-color(43, 51, 0, 255, 8, 8)
+ bounds: 344 408 8 8
+ - image: solid-color(44, 51, 0, 255, 8, 8)
+ bounds: 352 408 8 8
+ - image: solid-color(45, 51, 0, 255, 8, 8)
+ bounds: 360 408 8 8
+ - image: solid-color(46, 51, 0, 255, 8, 8)
+ bounds: 368 408 8 8
+ - image: solid-color(47, 51, 0, 255, 8, 8)
+ bounds: 376 408 8 8
+ - image: solid-color(48, 51, 0, 255, 8, 8)
+ bounds: 384 408 8 8
+ - image: solid-color(49, 51, 0, 255, 8, 8)
+ bounds: 392 408 8 8
+ - image: solid-color(50, 51, 0, 255, 8, 8)
+ bounds: 400 408 8 8
+ - image: solid-color(51, 51, 0, 255, 8, 8)
+ bounds: 408 408 8 8
+ - image: solid-color(52, 51, 0, 255, 8, 8)
+ bounds: 416 408 8 8
+ - image: solid-color(53, 51, 0, 255, 8, 8)
+ bounds: 424 408 8 8
+ - image: solid-color(54, 51, 0, 255, 8, 8)
+ bounds: 432 408 8 8
+ - image: solid-color(55, 51, 0, 255, 8, 8)
+ bounds: 440 408 8 8
+ - image: solid-color(56, 51, 0, 255, 8, 8)
+ bounds: 448 408 8 8
+ - image: solid-color(57, 51, 0, 255, 8, 8)
+ bounds: 456 408 8 8
+ - image: solid-color(58, 51, 0, 255, 8, 8)
+ bounds: 464 408 8 8
+ - image: solid-color(59, 51, 0, 255, 8, 8)
+ bounds: 472 408 8 8
+ - image: solid-color(60, 51, 0, 255, 8, 8)
+ bounds: 480 408 8 8
+ - image: solid-color(61, 51, 0, 255, 8, 8)
+ bounds: 488 408 8 8
+ - image: solid-color(62, 51, 0, 255, 8, 8)
+ bounds: 496 408 8 8
+ - image: solid-color(63, 51, 0, 255, 8, 8)
+ bounds: 504 408 8 8
+ - image: solid-color(64, 51, 0, 255, 8, 8)
+ bounds: 512 408 8 8
+ - image: solid-color(65, 51, 0, 255, 8, 8)
+ bounds: 520 408 8 8
+ - image: solid-color(66, 51, 0, 255, 8, 8)
+ bounds: 528 408 8 8
+ - image: solid-color(67, 51, 0, 255, 8, 8)
+ bounds: 536 408 8 8
+ - image: solid-color(68, 51, 0, 255, 8, 8)
+ bounds: 544 408 8 8
+ - image: solid-color(69, 51, 0, 255, 8, 8)
+ bounds: 552 408 8 8
+ - image: solid-color(70, 51, 0, 255, 8, 8)
+ bounds: 560 408 8 8
+ - image: solid-color(71, 51, 0, 255, 8, 8)
+ bounds: 568 408 8 8
+ - image: solid-color(72, 51, 0, 255, 8, 8)
+ bounds: 576 408 8 8
+ - image: solid-color(73, 51, 0, 255, 8, 8)
+ bounds: 584 408 8 8
+ - image: solid-color(74, 51, 0, 255, 8, 8)
+ bounds: 592 408 8 8
+ - image: solid-color(75, 51, 0, 255, 8, 8)
+ bounds: 600 408 8 8
+ - image: solid-color(76, 51, 0, 255, 8, 8)
+ bounds: 608 408 8 8
+ - image: solid-color(77, 51, 0, 255, 8, 8)
+ bounds: 616 408 8 8
+ - image: solid-color(78, 51, 0, 255, 8, 8)
+ bounds: 624 408 8 8
+ - image: solid-color(79, 51, 0, 255, 8, 8)
+ bounds: 632 408 8 8
+ - image: solid-color(80, 51, 0, 255, 8, 8)
+ bounds: 640 408 8 8
+ - image: solid-color(81, 51, 0, 255, 8, 8)
+ bounds: 648 408 8 8
+ - image: solid-color(82, 51, 0, 255, 8, 8)
+ bounds: 656 408 8 8
+ - image: solid-color(83, 51, 0, 255, 8, 8)
+ bounds: 664 408 8 8
+ - image: solid-color(84, 51, 0, 255, 8, 8)
+ bounds: 672 408 8 8
+ - image: solid-color(85, 51, 0, 255, 8, 8)
+ bounds: 680 408 8 8
+ - image: solid-color(86, 51, 0, 255, 8, 8)
+ bounds: 688 408 8 8
+ - image: solid-color(87, 51, 0, 255, 8, 8)
+ bounds: 696 408 8 8
+ - image: solid-color(88, 51, 0, 255, 8, 8)
+ bounds: 704 408 8 8
+ - image: solid-color(89, 51, 0, 255, 8, 8)
+ bounds: 712 408 8 8
+ - image: solid-color(90, 51, 0, 255, 8, 8)
+ bounds: 720 408 8 8
+ - image: solid-color(91, 51, 0, 255, 8, 8)
+ bounds: 728 408 8 8
+ - image: solid-color(92, 51, 0, 255, 8, 8)
+ bounds: 736 408 8 8
+ - image: solid-color(93, 51, 0, 255, 8, 8)
+ bounds: 744 408 8 8
+ - image: solid-color(94, 51, 0, 255, 8, 8)
+ bounds: 752 408 8 8
+ - image: solid-color(95, 51, 0, 255, 8, 8)
+ bounds: 760 408 8 8
+ - image: solid-color(96, 51, 0, 255, 8, 8)
+ bounds: 768 408 8 8
+ - image: solid-color(97, 51, 0, 255, 8, 8)
+ bounds: 776 408 8 8
+ - image: solid-color(98, 51, 0, 255, 8, 8)
+ bounds: 784 408 8 8
+ - image: solid-color(99, 51, 0, 255, 8, 8)
+ bounds: 792 408 8 8
+ - image: solid-color(100, 51, 0, 255, 8, 8)
+ bounds: 800 408 8 8
+ - image: solid-color(101, 51, 0, 255, 8, 8)
+ bounds: 808 408 8 8
+ - image: solid-color(102, 51, 0, 255, 8, 8)
+ bounds: 816 408 8 8
+ - image: solid-color(103, 51, 0, 255, 8, 8)
+ bounds: 824 408 8 8
+ - image: solid-color(104, 51, 0, 255, 8, 8)
+ bounds: 832 408 8 8
+ - image: solid-color(105, 51, 0, 255, 8, 8)
+ bounds: 840 408 8 8
+ - image: solid-color(106, 51, 0, 255, 8, 8)
+ bounds: 848 408 8 8
+ - image: solid-color(107, 51, 0, 255, 8, 8)
+ bounds: 856 408 8 8
+ - image: solid-color(108, 51, 0, 255, 8, 8)
+ bounds: 864 408 8 8
+ - image: solid-color(109, 51, 0, 255, 8, 8)
+ bounds: 872 408 8 8
+ - image: solid-color(110, 51, 0, 255, 8, 8)
+ bounds: 880 408 8 8
+ - image: solid-color(111, 51, 0, 255, 8, 8)
+ bounds: 888 408 8 8
+ - image: solid-color(112, 51, 0, 255, 8, 8)
+ bounds: 896 408 8 8
+ - image: solid-color(113, 51, 0, 255, 8, 8)
+ bounds: 904 408 8 8
+ - image: solid-color(114, 51, 0, 255, 8, 8)
+ bounds: 912 408 8 8
+ - image: solid-color(115, 51, 0, 255, 8, 8)
+ bounds: 920 408 8 8
+ - image: solid-color(116, 51, 0, 255, 8, 8)
+ bounds: 928 408 8 8
+ - image: solid-color(117, 51, 0, 255, 8, 8)
+ bounds: 936 408 8 8
+ - image: solid-color(118, 51, 0, 255, 8, 8)
+ bounds: 944 408 8 8
+ - image: solid-color(119, 51, 0, 255, 8, 8)
+ bounds: 952 408 8 8
+ - image: solid-color(120, 51, 0, 255, 8, 8)
+ bounds: 960 408 8 8
+ - image: solid-color(121, 51, 0, 255, 8, 8)
+ bounds: 968 408 8 8
+ - image: solid-color(122, 51, 0, 255, 8, 8)
+ bounds: 976 408 8 8
+ - image: solid-color(123, 51, 0, 255, 8, 8)
+ bounds: 984 408 8 8
+ - image: solid-color(124, 51, 0, 255, 8, 8)
+ bounds: 992 408 8 8
+ - image: solid-color(125, 51, 0, 255, 8, 8)
+ bounds: 1000 408 8 8
+ - image: solid-color(126, 51, 0, 255, 8, 8)
+ bounds: 1008 408 8 8
+ - image: solid-color(127, 51, 0, 255, 8, 8)
+ bounds: 1016 408 8 8
+ - image: solid-color(0, 52, 0, 255, 8, 8)
+ bounds: 0 416 8 8
+ - image: solid-color(1, 52, 0, 255, 8, 8)
+ bounds: 8 416 8 8
+ - image: solid-color(2, 52, 0, 255, 8, 8)
+ bounds: 16 416 8 8
+ - image: solid-color(3, 52, 0, 255, 8, 8)
+ bounds: 24 416 8 8
+ - image: solid-color(4, 52, 0, 255, 8, 8)
+ bounds: 32 416 8 8
+ - image: solid-color(5, 52, 0, 255, 8, 8)
+ bounds: 40 416 8 8
+ - image: solid-color(6, 52, 0, 255, 8, 8)
+ bounds: 48 416 8 8
+ - image: solid-color(7, 52, 0, 255, 8, 8)
+ bounds: 56 416 8 8
+ - image: solid-color(8, 52, 0, 255, 8, 8)
+ bounds: 64 416 8 8
+ - image: solid-color(9, 52, 0, 255, 8, 8)
+ bounds: 72 416 8 8
+ - image: solid-color(10, 52, 0, 255, 8, 8)
+ bounds: 80 416 8 8
+ - image: solid-color(11, 52, 0, 255, 8, 8)
+ bounds: 88 416 8 8
+ - image: solid-color(12, 52, 0, 255, 8, 8)
+ bounds: 96 416 8 8
+ - image: solid-color(13, 52, 0, 255, 8, 8)
+ bounds: 104 416 8 8
+ - image: solid-color(14, 52, 0, 255, 8, 8)
+ bounds: 112 416 8 8
+ - image: solid-color(15, 52, 0, 255, 8, 8)
+ bounds: 120 416 8 8
+ - image: solid-color(16, 52, 0, 255, 8, 8)
+ bounds: 128 416 8 8
+ - image: solid-color(17, 52, 0, 255, 8, 8)
+ bounds: 136 416 8 8
+ - image: solid-color(18, 52, 0, 255, 8, 8)
+ bounds: 144 416 8 8
+ - image: solid-color(19, 52, 0, 255, 8, 8)
+ bounds: 152 416 8 8
+ - image: solid-color(20, 52, 0, 255, 8, 8)
+ bounds: 160 416 8 8
+ - image: solid-color(21, 52, 0, 255, 8, 8)
+ bounds: 168 416 8 8
+ - image: solid-color(22, 52, 0, 255, 8, 8)
+ bounds: 176 416 8 8
+ - image: solid-color(23, 52, 0, 255, 8, 8)
+ bounds: 184 416 8 8
+ - image: solid-color(24, 52, 0, 255, 8, 8)
+ bounds: 192 416 8 8
+ - image: solid-color(25, 52, 0, 255, 8, 8)
+ bounds: 200 416 8 8
+ - image: solid-color(26, 52, 0, 255, 8, 8)
+ bounds: 208 416 8 8
+ - image: solid-color(27, 52, 0, 255, 8, 8)
+ bounds: 216 416 8 8
+ - image: solid-color(28, 52, 0, 255, 8, 8)
+ bounds: 224 416 8 8
+ - image: solid-color(29, 52, 0, 255, 8, 8)
+ bounds: 232 416 8 8
+ - image: solid-color(30, 52, 0, 255, 8, 8)
+ bounds: 240 416 8 8
+ - image: solid-color(31, 52, 0, 255, 8, 8)
+ bounds: 248 416 8 8
+ - image: solid-color(32, 52, 0, 255, 8, 8)
+ bounds: 256 416 8 8
+ - image: solid-color(33, 52, 0, 255, 8, 8)
+ bounds: 264 416 8 8
+ - image: solid-color(34, 52, 0, 255, 8, 8)
+ bounds: 272 416 8 8
+ - image: solid-color(35, 52, 0, 255, 8, 8)
+ bounds: 280 416 8 8
+ - image: solid-color(36, 52, 0, 255, 8, 8)
+ bounds: 288 416 8 8
+ - image: solid-color(37, 52, 0, 255, 8, 8)
+ bounds: 296 416 8 8
+ - image: solid-color(38, 52, 0, 255, 8, 8)
+ bounds: 304 416 8 8
+ - image: solid-color(39, 52, 0, 255, 8, 8)
+ bounds: 312 416 8 8
+ - image: solid-color(40, 52, 0, 255, 8, 8)
+ bounds: 320 416 8 8
+ - image: solid-color(41, 52, 0, 255, 8, 8)
+ bounds: 328 416 8 8
+ - image: solid-color(42, 52, 0, 255, 8, 8)
+ bounds: 336 416 8 8
+ - image: solid-color(43, 52, 0, 255, 8, 8)
+ bounds: 344 416 8 8
+ - image: solid-color(44, 52, 0, 255, 8, 8)
+ bounds: 352 416 8 8
+ - image: solid-color(45, 52, 0, 255, 8, 8)
+ bounds: 360 416 8 8
+ - image: solid-color(46, 52, 0, 255, 8, 8)
+ bounds: 368 416 8 8
+ - image: solid-color(47, 52, 0, 255, 8, 8)
+ bounds: 376 416 8 8
+ - image: solid-color(48, 52, 0, 255, 8, 8)
+ bounds: 384 416 8 8
+ - image: solid-color(49, 52, 0, 255, 8, 8)
+ bounds: 392 416 8 8
+ - image: solid-color(50, 52, 0, 255, 8, 8)
+ bounds: 400 416 8 8
+ - image: solid-color(51, 52, 0, 255, 8, 8)
+ bounds: 408 416 8 8
+ - image: solid-color(52, 52, 0, 255, 8, 8)
+ bounds: 416 416 8 8
+ - image: solid-color(53, 52, 0, 255, 8, 8)
+ bounds: 424 416 8 8
+ - image: solid-color(54, 52, 0, 255, 8, 8)
+ bounds: 432 416 8 8
+ - image: solid-color(55, 52, 0, 255, 8, 8)
+ bounds: 440 416 8 8
+ - image: solid-color(56, 52, 0, 255, 8, 8)
+ bounds: 448 416 8 8
+ - image: solid-color(57, 52, 0, 255, 8, 8)
+ bounds: 456 416 8 8
+ - image: solid-color(58, 52, 0, 255, 8, 8)
+ bounds: 464 416 8 8
+ - image: solid-color(59, 52, 0, 255, 8, 8)
+ bounds: 472 416 8 8
+ - image: solid-color(60, 52, 0, 255, 8, 8)
+ bounds: 480 416 8 8
+ - image: solid-color(61, 52, 0, 255, 8, 8)
+ bounds: 488 416 8 8
+ - image: solid-color(62, 52, 0, 255, 8, 8)
+ bounds: 496 416 8 8
+ - image: solid-color(63, 52, 0, 255, 8, 8)
+ bounds: 504 416 8 8
+ - image: solid-color(64, 52, 0, 255, 8, 8)
+ bounds: 512 416 8 8
+ - image: solid-color(65, 52, 0, 255, 8, 8)
+ bounds: 520 416 8 8
+ - image: solid-color(66, 52, 0, 255, 8, 8)
+ bounds: 528 416 8 8
+ - image: solid-color(67, 52, 0, 255, 8, 8)
+ bounds: 536 416 8 8
+ - image: solid-color(68, 52, 0, 255, 8, 8)
+ bounds: 544 416 8 8
+ - image: solid-color(69, 52, 0, 255, 8, 8)
+ bounds: 552 416 8 8
+ - image: solid-color(70, 52, 0, 255, 8, 8)
+ bounds: 560 416 8 8
+ - image: solid-color(71, 52, 0, 255, 8, 8)
+ bounds: 568 416 8 8
+ - image: solid-color(72, 52, 0, 255, 8, 8)
+ bounds: 576 416 8 8
+ - image: solid-color(73, 52, 0, 255, 8, 8)
+ bounds: 584 416 8 8
+ - image: solid-color(74, 52, 0, 255, 8, 8)
+ bounds: 592 416 8 8
+ - image: solid-color(75, 52, 0, 255, 8, 8)
+ bounds: 600 416 8 8
+ - image: solid-color(76, 52, 0, 255, 8, 8)
+ bounds: 608 416 8 8
+ - image: solid-color(77, 52, 0, 255, 8, 8)
+ bounds: 616 416 8 8
+ - image: solid-color(78, 52, 0, 255, 8, 8)
+ bounds: 624 416 8 8
+ - image: solid-color(79, 52, 0, 255, 8, 8)
+ bounds: 632 416 8 8
+ - image: solid-color(80, 52, 0, 255, 8, 8)
+ bounds: 640 416 8 8
+ - image: solid-color(81, 52, 0, 255, 8, 8)
+ bounds: 648 416 8 8
+ - image: solid-color(82, 52, 0, 255, 8, 8)
+ bounds: 656 416 8 8
+ - image: solid-color(83, 52, 0, 255, 8, 8)
+ bounds: 664 416 8 8
+ - image: solid-color(84, 52, 0, 255, 8, 8)
+ bounds: 672 416 8 8
+ - image: solid-color(85, 52, 0, 255, 8, 8)
+ bounds: 680 416 8 8
+ - image: solid-color(86, 52, 0, 255, 8, 8)
+ bounds: 688 416 8 8
+ - image: solid-color(87, 52, 0, 255, 8, 8)
+ bounds: 696 416 8 8
+ - image: solid-color(88, 52, 0, 255, 8, 8)
+ bounds: 704 416 8 8
+ - image: solid-color(89, 52, 0, 255, 8, 8)
+ bounds: 712 416 8 8
+ - image: solid-color(90, 52, 0, 255, 8, 8)
+ bounds: 720 416 8 8
+ - image: solid-color(91, 52, 0, 255, 8, 8)
+ bounds: 728 416 8 8
+ - image: solid-color(92, 52, 0, 255, 8, 8)
+ bounds: 736 416 8 8
+ - image: solid-color(93, 52, 0, 255, 8, 8)
+ bounds: 744 416 8 8
+ - image: solid-color(94, 52, 0, 255, 8, 8)
+ bounds: 752 416 8 8
+ - image: solid-color(95, 52, 0, 255, 8, 8)
+ bounds: 760 416 8 8
+ - image: solid-color(96, 52, 0, 255, 8, 8)
+ bounds: 768 416 8 8
+ - image: solid-color(97, 52, 0, 255, 8, 8)
+ bounds: 776 416 8 8
+ - image: solid-color(98, 52, 0, 255, 8, 8)
+ bounds: 784 416 8 8
+ - image: solid-color(99, 52, 0, 255, 8, 8)
+ bounds: 792 416 8 8
+ - image: solid-color(100, 52, 0, 255, 8, 8)
+ bounds: 800 416 8 8
+ - image: solid-color(101, 52, 0, 255, 8, 8)
+ bounds: 808 416 8 8
+ - image: solid-color(102, 52, 0, 255, 8, 8)
+ bounds: 816 416 8 8
+ - image: solid-color(103, 52, 0, 255, 8, 8)
+ bounds: 824 416 8 8
+ - image: solid-color(104, 52, 0, 255, 8, 8)
+ bounds: 832 416 8 8
+ - image: solid-color(105, 52, 0, 255, 8, 8)
+ bounds: 840 416 8 8
+ - image: solid-color(106, 52, 0, 255, 8, 8)
+ bounds: 848 416 8 8
+ - image: solid-color(107, 52, 0, 255, 8, 8)
+ bounds: 856 416 8 8
+ - image: solid-color(108, 52, 0, 255, 8, 8)
+ bounds: 864 416 8 8
+ - image: solid-color(109, 52, 0, 255, 8, 8)
+ bounds: 872 416 8 8
+ - image: solid-color(110, 52, 0, 255, 8, 8)
+ bounds: 880 416 8 8
+ - image: solid-color(111, 52, 0, 255, 8, 8)
+ bounds: 888 416 8 8
+ - image: solid-color(112, 52, 0, 255, 8, 8)
+ bounds: 896 416 8 8
+ - image: solid-color(113, 52, 0, 255, 8, 8)
+ bounds: 904 416 8 8
+ - image: solid-color(114, 52, 0, 255, 8, 8)
+ bounds: 912 416 8 8
+ - image: solid-color(115, 52, 0, 255, 8, 8)
+ bounds: 920 416 8 8
+ - image: solid-color(116, 52, 0, 255, 8, 8)
+ bounds: 928 416 8 8
+ - image: solid-color(117, 52, 0, 255, 8, 8)
+ bounds: 936 416 8 8
+ - image: solid-color(118, 52, 0, 255, 8, 8)
+ bounds: 944 416 8 8
+ - image: solid-color(119, 52, 0, 255, 8, 8)
+ bounds: 952 416 8 8
+ - image: solid-color(120, 52, 0, 255, 8, 8)
+ bounds: 960 416 8 8
+ - image: solid-color(121, 52, 0, 255, 8, 8)
+ bounds: 968 416 8 8
+ - image: solid-color(122, 52, 0, 255, 8, 8)
+ bounds: 976 416 8 8
+ - image: solid-color(123, 52, 0, 255, 8, 8)
+ bounds: 984 416 8 8
+ - image: solid-color(124, 52, 0, 255, 8, 8)
+ bounds: 992 416 8 8
+ - image: solid-color(125, 52, 0, 255, 8, 8)
+ bounds: 1000 416 8 8
+ - image: solid-color(126, 52, 0, 255, 8, 8)
+ bounds: 1008 416 8 8
+ - image: solid-color(127, 52, 0, 255, 8, 8)
+ bounds: 1016 416 8 8
+ - image: solid-color(0, 53, 0, 255, 8, 8)
+ bounds: 0 424 8 8
+ - image: solid-color(1, 53, 0, 255, 8, 8)
+ bounds: 8 424 8 8
+ - image: solid-color(2, 53, 0, 255, 8, 8)
+ bounds: 16 424 8 8
+ - image: solid-color(3, 53, 0, 255, 8, 8)
+ bounds: 24 424 8 8
+ - image: solid-color(4, 53, 0, 255, 8, 8)
+ bounds: 32 424 8 8
+ - image: solid-color(5, 53, 0, 255, 8, 8)
+ bounds: 40 424 8 8
+ - image: solid-color(6, 53, 0, 255, 8, 8)
+ bounds: 48 424 8 8
+ - image: solid-color(7, 53, 0, 255, 8, 8)
+ bounds: 56 424 8 8
+ - image: solid-color(8, 53, 0, 255, 8, 8)
+ bounds: 64 424 8 8
+ - image: solid-color(9, 53, 0, 255, 8, 8)
+ bounds: 72 424 8 8
+ - image: solid-color(10, 53, 0, 255, 8, 8)
+ bounds: 80 424 8 8
+ - image: solid-color(11, 53, 0, 255, 8, 8)
+ bounds: 88 424 8 8
+ - image: solid-color(12, 53, 0, 255, 8, 8)
+ bounds: 96 424 8 8
+ - image: solid-color(13, 53, 0, 255, 8, 8)
+ bounds: 104 424 8 8
+ - image: solid-color(14, 53, 0, 255, 8, 8)
+ bounds: 112 424 8 8
+ - image: solid-color(15, 53, 0, 255, 8, 8)
+ bounds: 120 424 8 8
+ - image: solid-color(16, 53, 0, 255, 8, 8)
+ bounds: 128 424 8 8
+ - image: solid-color(17, 53, 0, 255, 8, 8)
+ bounds: 136 424 8 8
+ - image: solid-color(18, 53, 0, 255, 8, 8)
+ bounds: 144 424 8 8
+ - image: solid-color(19, 53, 0, 255, 8, 8)
+ bounds: 152 424 8 8
+ - image: solid-color(20, 53, 0, 255, 8, 8)
+ bounds: 160 424 8 8
+ - image: solid-color(21, 53, 0, 255, 8, 8)
+ bounds: 168 424 8 8
+ - image: solid-color(22, 53, 0, 255, 8, 8)
+ bounds: 176 424 8 8
+ - image: solid-color(23, 53, 0, 255, 8, 8)
+ bounds: 184 424 8 8
+ - image: solid-color(24, 53, 0, 255, 8, 8)
+ bounds: 192 424 8 8
+ - image: solid-color(25, 53, 0, 255, 8, 8)
+ bounds: 200 424 8 8
+ - image: solid-color(26, 53, 0, 255, 8, 8)
+ bounds: 208 424 8 8
+ - image: solid-color(27, 53, 0, 255, 8, 8)
+ bounds: 216 424 8 8
+ - image: solid-color(28, 53, 0, 255, 8, 8)
+ bounds: 224 424 8 8
+ - image: solid-color(29, 53, 0, 255, 8, 8)
+ bounds: 232 424 8 8
+ - image: solid-color(30, 53, 0, 255, 8, 8)
+ bounds: 240 424 8 8
+ - image: solid-color(31, 53, 0, 255, 8, 8)
+ bounds: 248 424 8 8
+ - image: solid-color(32, 53, 0, 255, 8, 8)
+ bounds: 256 424 8 8
+ - image: solid-color(33, 53, 0, 255, 8, 8)
+ bounds: 264 424 8 8
+ - image: solid-color(34, 53, 0, 255, 8, 8)
+ bounds: 272 424 8 8
+ - image: solid-color(35, 53, 0, 255, 8, 8)
+ bounds: 280 424 8 8
+ - image: solid-color(36, 53, 0, 255, 8, 8)
+ bounds: 288 424 8 8
+ - image: solid-color(37, 53, 0, 255, 8, 8)
+ bounds: 296 424 8 8
+ - image: solid-color(38, 53, 0, 255, 8, 8)
+ bounds: 304 424 8 8
+ - image: solid-color(39, 53, 0, 255, 8, 8)
+ bounds: 312 424 8 8
+ - image: solid-color(40, 53, 0, 255, 8, 8)
+ bounds: 320 424 8 8
+ - image: solid-color(41, 53, 0, 255, 8, 8)
+ bounds: 328 424 8 8
+ - image: solid-color(42, 53, 0, 255, 8, 8)
+ bounds: 336 424 8 8
+ - image: solid-color(43, 53, 0, 255, 8, 8)
+ bounds: 344 424 8 8
+ - image: solid-color(44, 53, 0, 255, 8, 8)
+ bounds: 352 424 8 8
+ - image: solid-color(45, 53, 0, 255, 8, 8)
+ bounds: 360 424 8 8
+ - image: solid-color(46, 53, 0, 255, 8, 8)
+ bounds: 368 424 8 8
+ - image: solid-color(47, 53, 0, 255, 8, 8)
+ bounds: 376 424 8 8
+ - image: solid-color(48, 53, 0, 255, 8, 8)
+ bounds: 384 424 8 8
+ - image: solid-color(49, 53, 0, 255, 8, 8)
+ bounds: 392 424 8 8
+ - image: solid-color(50, 53, 0, 255, 8, 8)
+ bounds: 400 424 8 8
+ - image: solid-color(51, 53, 0, 255, 8, 8)
+ bounds: 408 424 8 8
+ - image: solid-color(52, 53, 0, 255, 8, 8)
+ bounds: 416 424 8 8
+ - image: solid-color(53, 53, 0, 255, 8, 8)
+ bounds: 424 424 8 8
+ - image: solid-color(54, 53, 0, 255, 8, 8)
+ bounds: 432 424 8 8
+ - image: solid-color(55, 53, 0, 255, 8, 8)
+ bounds: 440 424 8 8
+ - image: solid-color(56, 53, 0, 255, 8, 8)
+ bounds: 448 424 8 8
+ - image: solid-color(57, 53, 0, 255, 8, 8)
+ bounds: 456 424 8 8
+ - image: solid-color(58, 53, 0, 255, 8, 8)
+ bounds: 464 424 8 8
+ - image: solid-color(59, 53, 0, 255, 8, 8)
+ bounds: 472 424 8 8
+ - image: solid-color(60, 53, 0, 255, 8, 8)
+ bounds: 480 424 8 8
+ - image: solid-color(61, 53, 0, 255, 8, 8)
+ bounds: 488 424 8 8
+ - image: solid-color(62, 53, 0, 255, 8, 8)
+ bounds: 496 424 8 8
+ - image: solid-color(63, 53, 0, 255, 8, 8)
+ bounds: 504 424 8 8
+ - image: solid-color(64, 53, 0, 255, 8, 8)
+ bounds: 512 424 8 8
+ - image: solid-color(65, 53, 0, 255, 8, 8)
+ bounds: 520 424 8 8
+ - image: solid-color(66, 53, 0, 255, 8, 8)
+ bounds: 528 424 8 8
+ - image: solid-color(67, 53, 0, 255, 8, 8)
+ bounds: 536 424 8 8
+ - image: solid-color(68, 53, 0, 255, 8, 8)
+ bounds: 544 424 8 8
+ - image: solid-color(69, 53, 0, 255, 8, 8)
+ bounds: 552 424 8 8
+ - image: solid-color(70, 53, 0, 255, 8, 8)
+ bounds: 560 424 8 8
+ - image: solid-color(71, 53, 0, 255, 8, 8)
+ bounds: 568 424 8 8
+ - image: solid-color(72, 53, 0, 255, 8, 8)
+ bounds: 576 424 8 8
+ - image: solid-color(73, 53, 0, 255, 8, 8)
+ bounds: 584 424 8 8
+ - image: solid-color(74, 53, 0, 255, 8, 8)
+ bounds: 592 424 8 8
+ - image: solid-color(75, 53, 0, 255, 8, 8)
+ bounds: 600 424 8 8
+ - image: solid-color(76, 53, 0, 255, 8, 8)
+ bounds: 608 424 8 8
+ - image: solid-color(77, 53, 0, 255, 8, 8)
+ bounds: 616 424 8 8
+ - image: solid-color(78, 53, 0, 255, 8, 8)
+ bounds: 624 424 8 8
+ - image: solid-color(79, 53, 0, 255, 8, 8)
+ bounds: 632 424 8 8
+ - image: solid-color(80, 53, 0, 255, 8, 8)
+ bounds: 640 424 8 8
+ - image: solid-color(81, 53, 0, 255, 8, 8)
+ bounds: 648 424 8 8
+ - image: solid-color(82, 53, 0, 255, 8, 8)
+ bounds: 656 424 8 8
+ - image: solid-color(83, 53, 0, 255, 8, 8)
+ bounds: 664 424 8 8
+ - image: solid-color(84, 53, 0, 255, 8, 8)
+ bounds: 672 424 8 8
+ - image: solid-color(85, 53, 0, 255, 8, 8)
+ bounds: 680 424 8 8
+ - image: solid-color(86, 53, 0, 255, 8, 8)
+ bounds: 688 424 8 8
+ - image: solid-color(87, 53, 0, 255, 8, 8)
+ bounds: 696 424 8 8
+ - image: solid-color(88, 53, 0, 255, 8, 8)
+ bounds: 704 424 8 8
+ - image: solid-color(89, 53, 0, 255, 8, 8)
+ bounds: 712 424 8 8
+ - image: solid-color(90, 53, 0, 255, 8, 8)
+ bounds: 720 424 8 8
+ - image: solid-color(91, 53, 0, 255, 8, 8)
+ bounds: 728 424 8 8
+ - image: solid-color(92, 53, 0, 255, 8, 8)
+ bounds: 736 424 8 8
+ - image: solid-color(93, 53, 0, 255, 8, 8)
+ bounds: 744 424 8 8
+ - image: solid-color(94, 53, 0, 255, 8, 8)
+ bounds: 752 424 8 8
+ - image: solid-color(95, 53, 0, 255, 8, 8)
+ bounds: 760 424 8 8
+ - image: solid-color(96, 53, 0, 255, 8, 8)
+ bounds: 768 424 8 8
+ - image: solid-color(97, 53, 0, 255, 8, 8)
+ bounds: 776 424 8 8
+ - image: solid-color(98, 53, 0, 255, 8, 8)
+ bounds: 784 424 8 8
+ - image: solid-color(99, 53, 0, 255, 8, 8)
+ bounds: 792 424 8 8
+ - image: solid-color(100, 53, 0, 255, 8, 8)
+ bounds: 800 424 8 8
+ - image: solid-color(101, 53, 0, 255, 8, 8)
+ bounds: 808 424 8 8
+ - image: solid-color(102, 53, 0, 255, 8, 8)
+ bounds: 816 424 8 8
+ - image: solid-color(103, 53, 0, 255, 8, 8)
+ bounds: 824 424 8 8
+ - image: solid-color(104, 53, 0, 255, 8, 8)
+ bounds: 832 424 8 8
+ - image: solid-color(105, 53, 0, 255, 8, 8)
+ bounds: 840 424 8 8
+ - image: solid-color(106, 53, 0, 255, 8, 8)
+ bounds: 848 424 8 8
+ - image: solid-color(107, 53, 0, 255, 8, 8)
+ bounds: 856 424 8 8
+ - image: solid-color(108, 53, 0, 255, 8, 8)
+ bounds: 864 424 8 8
+ - image: solid-color(109, 53, 0, 255, 8, 8)
+ bounds: 872 424 8 8
+ - image: solid-color(110, 53, 0, 255, 8, 8)
+ bounds: 880 424 8 8
+ - image: solid-color(111, 53, 0, 255, 8, 8)
+ bounds: 888 424 8 8
+ - image: solid-color(112, 53, 0, 255, 8, 8)
+ bounds: 896 424 8 8
+ - image: solid-color(113, 53, 0, 255, 8, 8)
+ bounds: 904 424 8 8
+ - image: solid-color(114, 53, 0, 255, 8, 8)
+ bounds: 912 424 8 8
+ - image: solid-color(115, 53, 0, 255, 8, 8)
+ bounds: 920 424 8 8
+ - image: solid-color(116, 53, 0, 255, 8, 8)
+ bounds: 928 424 8 8
+ - image: solid-color(117, 53, 0, 255, 8, 8)
+ bounds: 936 424 8 8
+ - image: solid-color(118, 53, 0, 255, 8, 8)
+ bounds: 944 424 8 8
+ - image: solid-color(119, 53, 0, 255, 8, 8)
+ bounds: 952 424 8 8
+ - image: solid-color(120, 53, 0, 255, 8, 8)
+ bounds: 960 424 8 8
+ - image: solid-color(121, 53, 0, 255, 8, 8)
+ bounds: 968 424 8 8
+ - image: solid-color(122, 53, 0, 255, 8, 8)
+ bounds: 976 424 8 8
+ - image: solid-color(123, 53, 0, 255, 8, 8)
+ bounds: 984 424 8 8
+ - image: solid-color(124, 53, 0, 255, 8, 8)
+ bounds: 992 424 8 8
+ - image: solid-color(125, 53, 0, 255, 8, 8)
+ bounds: 1000 424 8 8
+ - image: solid-color(126, 53, 0, 255, 8, 8)
+ bounds: 1008 424 8 8
+ - image: solid-color(127, 53, 0, 255, 8, 8)
+ bounds: 1016 424 8 8
+ - image: solid-color(0, 54, 0, 255, 8, 8)
+ bounds: 0 432 8 8
+ - image: solid-color(1, 54, 0, 255, 8, 8)
+ bounds: 8 432 8 8
+ - image: solid-color(2, 54, 0, 255, 8, 8)
+ bounds: 16 432 8 8
+ - image: solid-color(3, 54, 0, 255, 8, 8)
+ bounds: 24 432 8 8
+ - image: solid-color(4, 54, 0, 255, 8, 8)
+ bounds: 32 432 8 8
+ - image: solid-color(5, 54, 0, 255, 8, 8)
+ bounds: 40 432 8 8
+ - image: solid-color(6, 54, 0, 255, 8, 8)
+ bounds: 48 432 8 8
+ - image: solid-color(7, 54, 0, 255, 8, 8)
+ bounds: 56 432 8 8
+ - image: solid-color(8, 54, 0, 255, 8, 8)
+ bounds: 64 432 8 8
+ - image: solid-color(9, 54, 0, 255, 8, 8)
+ bounds: 72 432 8 8
+ - image: solid-color(10, 54, 0, 255, 8, 8)
+ bounds: 80 432 8 8
+ - image: solid-color(11, 54, 0, 255, 8, 8)
+ bounds: 88 432 8 8
+ - image: solid-color(12, 54, 0, 255, 8, 8)
+ bounds: 96 432 8 8
+ - image: solid-color(13, 54, 0, 255, 8, 8)
+ bounds: 104 432 8 8
+ - image: solid-color(14, 54, 0, 255, 8, 8)
+ bounds: 112 432 8 8
+ - image: solid-color(15, 54, 0, 255, 8, 8)
+ bounds: 120 432 8 8
+ - image: solid-color(16, 54, 0, 255, 8, 8)
+ bounds: 128 432 8 8
+ - image: solid-color(17, 54, 0, 255, 8, 8)
+ bounds: 136 432 8 8
+ - image: solid-color(18, 54, 0, 255, 8, 8)
+ bounds: 144 432 8 8
+ - image: solid-color(19, 54, 0, 255, 8, 8)
+ bounds: 152 432 8 8
+ - image: solid-color(20, 54, 0, 255, 8, 8)
+ bounds: 160 432 8 8
+ - image: solid-color(21, 54, 0, 255, 8, 8)
+ bounds: 168 432 8 8
+ - image: solid-color(22, 54, 0, 255, 8, 8)
+ bounds: 176 432 8 8
+ - image: solid-color(23, 54, 0, 255, 8, 8)
+ bounds: 184 432 8 8
+ - image: solid-color(24, 54, 0, 255, 8, 8)
+ bounds: 192 432 8 8
+ - image: solid-color(25, 54, 0, 255, 8, 8)
+ bounds: 200 432 8 8
+ - image: solid-color(26, 54, 0, 255, 8, 8)
+ bounds: 208 432 8 8
+ - image: solid-color(27, 54, 0, 255, 8, 8)
+ bounds: 216 432 8 8
+ - image: solid-color(28, 54, 0, 255, 8, 8)
+ bounds: 224 432 8 8
+ - image: solid-color(29, 54, 0, 255, 8, 8)
+ bounds: 232 432 8 8
+ - image: solid-color(30, 54, 0, 255, 8, 8)
+ bounds: 240 432 8 8
+ - image: solid-color(31, 54, 0, 255, 8, 8)
+ bounds: 248 432 8 8
+ - image: solid-color(32, 54, 0, 255, 8, 8)
+ bounds: 256 432 8 8
+ - image: solid-color(33, 54, 0, 255, 8, 8)
+ bounds: 264 432 8 8
+ - image: solid-color(34, 54, 0, 255, 8, 8)
+ bounds: 272 432 8 8
+ - image: solid-color(35, 54, 0, 255, 8, 8)
+ bounds: 280 432 8 8
+ - image: solid-color(36, 54, 0, 255, 8, 8)
+ bounds: 288 432 8 8
+ - image: solid-color(37, 54, 0, 255, 8, 8)
+ bounds: 296 432 8 8
+ - image: solid-color(38, 54, 0, 255, 8, 8)
+ bounds: 304 432 8 8
+ - image: solid-color(39, 54, 0, 255, 8, 8)
+ bounds: 312 432 8 8
+ - image: solid-color(40, 54, 0, 255, 8, 8)
+ bounds: 320 432 8 8
+ - image: solid-color(41, 54, 0, 255, 8, 8)
+ bounds: 328 432 8 8
+ - image: solid-color(42, 54, 0, 255, 8, 8)
+ bounds: 336 432 8 8
+ - image: solid-color(43, 54, 0, 255, 8, 8)
+ bounds: 344 432 8 8
+ - image: solid-color(44, 54, 0, 255, 8, 8)
+ bounds: 352 432 8 8
+ - image: solid-color(45, 54, 0, 255, 8, 8)
+ bounds: 360 432 8 8
+ - image: solid-color(46, 54, 0, 255, 8, 8)
+ bounds: 368 432 8 8
+ - image: solid-color(47, 54, 0, 255, 8, 8)
+ bounds: 376 432 8 8
+ - image: solid-color(48, 54, 0, 255, 8, 8)
+ bounds: 384 432 8 8
+ - image: solid-color(49, 54, 0, 255, 8, 8)
+ bounds: 392 432 8 8
+ - image: solid-color(50, 54, 0, 255, 8, 8)
+ bounds: 400 432 8 8
+ - image: solid-color(51, 54, 0, 255, 8, 8)
+ bounds: 408 432 8 8
+ - image: solid-color(52, 54, 0, 255, 8, 8)
+ bounds: 416 432 8 8
+ - image: solid-color(53, 54, 0, 255, 8, 8)
+ bounds: 424 432 8 8
+ - image: solid-color(54, 54, 0, 255, 8, 8)
+ bounds: 432 432 8 8
+ - image: solid-color(55, 54, 0, 255, 8, 8)
+ bounds: 440 432 8 8
+ - image: solid-color(56, 54, 0, 255, 8, 8)
+ bounds: 448 432 8 8
+ - image: solid-color(57, 54, 0, 255, 8, 8)
+ bounds: 456 432 8 8
+ - image: solid-color(58, 54, 0, 255, 8, 8)
+ bounds: 464 432 8 8
+ - image: solid-color(59, 54, 0, 255, 8, 8)
+ bounds: 472 432 8 8
+ - image: solid-color(60, 54, 0, 255, 8, 8)
+ bounds: 480 432 8 8
+ - image: solid-color(61, 54, 0, 255, 8, 8)
+ bounds: 488 432 8 8
+ - image: solid-color(62, 54, 0, 255, 8, 8)
+ bounds: 496 432 8 8
+ - image: solid-color(63, 54, 0, 255, 8, 8)
+ bounds: 504 432 8 8
+ - image: solid-color(64, 54, 0, 255, 8, 8)
+ bounds: 512 432 8 8
+ - image: solid-color(65, 54, 0, 255, 8, 8)
+ bounds: 520 432 8 8
+ - image: solid-color(66, 54, 0, 255, 8, 8)
+ bounds: 528 432 8 8
+ - image: solid-color(67, 54, 0, 255, 8, 8)
+ bounds: 536 432 8 8
+ - image: solid-color(68, 54, 0, 255, 8, 8)
+ bounds: 544 432 8 8
+ - image: solid-color(69, 54, 0, 255, 8, 8)
+ bounds: 552 432 8 8
+ - image: solid-color(70, 54, 0, 255, 8, 8)
+ bounds: 560 432 8 8
+ - image: solid-color(71, 54, 0, 255, 8, 8)
+ bounds: 568 432 8 8
+ - image: solid-color(72, 54, 0, 255, 8, 8)
+ bounds: 576 432 8 8
+ - image: solid-color(73, 54, 0, 255, 8, 8)
+ bounds: 584 432 8 8
+ - image: solid-color(74, 54, 0, 255, 8, 8)
+ bounds: 592 432 8 8
+ - image: solid-color(75, 54, 0, 255, 8, 8)
+ bounds: 600 432 8 8
+ - image: solid-color(76, 54, 0, 255, 8, 8)
+ bounds: 608 432 8 8
+ - image: solid-color(77, 54, 0, 255, 8, 8)
+ bounds: 616 432 8 8
+ - image: solid-color(78, 54, 0, 255, 8, 8)
+ bounds: 624 432 8 8
+ - image: solid-color(79, 54, 0, 255, 8, 8)
+ bounds: 632 432 8 8
+ - image: solid-color(80, 54, 0, 255, 8, 8)
+ bounds: 640 432 8 8
+ - image: solid-color(81, 54, 0, 255, 8, 8)
+ bounds: 648 432 8 8
+ - image: solid-color(82, 54, 0, 255, 8, 8)
+ bounds: 656 432 8 8
+ - image: solid-color(83, 54, 0, 255, 8, 8)
+ bounds: 664 432 8 8
+ - image: solid-color(84, 54, 0, 255, 8, 8)
+ bounds: 672 432 8 8
+ - image: solid-color(85, 54, 0, 255, 8, 8)
+ bounds: 680 432 8 8
+ - image: solid-color(86, 54, 0, 255, 8, 8)
+ bounds: 688 432 8 8
+ - image: solid-color(87, 54, 0, 255, 8, 8)
+ bounds: 696 432 8 8
+ - image: solid-color(88, 54, 0, 255, 8, 8)
+ bounds: 704 432 8 8
+ - image: solid-color(89, 54, 0, 255, 8, 8)
+ bounds: 712 432 8 8
+ - image: solid-color(90, 54, 0, 255, 8, 8)
+ bounds: 720 432 8 8
+ - image: solid-color(91, 54, 0, 255, 8, 8)
+ bounds: 728 432 8 8
+ - image: solid-color(92, 54, 0, 255, 8, 8)
+ bounds: 736 432 8 8
+ - image: solid-color(93, 54, 0, 255, 8, 8)
+ bounds: 744 432 8 8
+ - image: solid-color(94, 54, 0, 255, 8, 8)
+ bounds: 752 432 8 8
+ - image: solid-color(95, 54, 0, 255, 8, 8)
+ bounds: 760 432 8 8
+ - image: solid-color(96, 54, 0, 255, 8, 8)
+ bounds: 768 432 8 8
+ - image: solid-color(97, 54, 0, 255, 8, 8)
+ bounds: 776 432 8 8
+ - image: solid-color(98, 54, 0, 255, 8, 8)
+ bounds: 784 432 8 8
+ - image: solid-color(99, 54, 0, 255, 8, 8)
+ bounds: 792 432 8 8
+ - image: solid-color(100, 54, 0, 255, 8, 8)
+ bounds: 800 432 8 8
+ - image: solid-color(101, 54, 0, 255, 8, 8)
+ bounds: 808 432 8 8
+ - image: solid-color(102, 54, 0, 255, 8, 8)
+ bounds: 816 432 8 8
+ - image: solid-color(103, 54, 0, 255, 8, 8)
+ bounds: 824 432 8 8
+ - image: solid-color(104, 54, 0, 255, 8, 8)
+ bounds: 832 432 8 8
+ - image: solid-color(105, 54, 0, 255, 8, 8)
+ bounds: 840 432 8 8
+ - image: solid-color(106, 54, 0, 255, 8, 8)
+ bounds: 848 432 8 8
+ - image: solid-color(107, 54, 0, 255, 8, 8)
+ bounds: 856 432 8 8
+ - image: solid-color(108, 54, 0, 255, 8, 8)
+ bounds: 864 432 8 8
+ - image: solid-color(109, 54, 0, 255, 8, 8)
+ bounds: 872 432 8 8
+ - image: solid-color(110, 54, 0, 255, 8, 8)
+ bounds: 880 432 8 8
+ - image: solid-color(111, 54, 0, 255, 8, 8)
+ bounds: 888 432 8 8
+ - image: solid-color(112, 54, 0, 255, 8, 8)
+ bounds: 896 432 8 8
+ - image: solid-color(113, 54, 0, 255, 8, 8)
+ bounds: 904 432 8 8
+ - image: solid-color(114, 54, 0, 255, 8, 8)
+ bounds: 912 432 8 8
+ - image: solid-color(115, 54, 0, 255, 8, 8)
+ bounds: 920 432 8 8
+ - image: solid-color(116, 54, 0, 255, 8, 8)
+ bounds: 928 432 8 8
+ - image: solid-color(117, 54, 0, 255, 8, 8)
+ bounds: 936 432 8 8
+ - image: solid-color(118, 54, 0, 255, 8, 8)
+ bounds: 944 432 8 8
+ - image: solid-color(119, 54, 0, 255, 8, 8)
+ bounds: 952 432 8 8
+ - image: solid-color(120, 54, 0, 255, 8, 8)
+ bounds: 960 432 8 8
+ - image: solid-color(121, 54, 0, 255, 8, 8)
+ bounds: 968 432 8 8
+ - image: solid-color(122, 54, 0, 255, 8, 8)
+ bounds: 976 432 8 8
+ - image: solid-color(123, 54, 0, 255, 8, 8)
+ bounds: 984 432 8 8
+ - image: solid-color(124, 54, 0, 255, 8, 8)
+ bounds: 992 432 8 8
+ - image: solid-color(125, 54, 0, 255, 8, 8)
+ bounds: 1000 432 8 8
+ - image: solid-color(126, 54, 0, 255, 8, 8)
+ bounds: 1008 432 8 8
+ - image: solid-color(127, 54, 0, 255, 8, 8)
+ bounds: 1016 432 8 8
+ - image: solid-color(0, 55, 0, 255, 8, 8)
+ bounds: 0 440 8 8
+ - image: solid-color(1, 55, 0, 255, 8, 8)
+ bounds: 8 440 8 8
+ - image: solid-color(2, 55, 0, 255, 8, 8)
+ bounds: 16 440 8 8
+ - image: solid-color(3, 55, 0, 255, 8, 8)
+ bounds: 24 440 8 8
+ - image: solid-color(4, 55, 0, 255, 8, 8)
+ bounds: 32 440 8 8
+ - image: solid-color(5, 55, 0, 255, 8, 8)
+ bounds: 40 440 8 8
+ - image: solid-color(6, 55, 0, 255, 8, 8)
+ bounds: 48 440 8 8
+ - image: solid-color(7, 55, 0, 255, 8, 8)
+ bounds: 56 440 8 8
+ - image: solid-color(8, 55, 0, 255, 8, 8)
+ bounds: 64 440 8 8
+ - image: solid-color(9, 55, 0, 255, 8, 8)
+ bounds: 72 440 8 8
+ - image: solid-color(10, 55, 0, 255, 8, 8)
+ bounds: 80 440 8 8
+ - image: solid-color(11, 55, 0, 255, 8, 8)
+ bounds: 88 440 8 8
+ - image: solid-color(12, 55, 0, 255, 8, 8)
+ bounds: 96 440 8 8
+ - image: solid-color(13, 55, 0, 255, 8, 8)
+ bounds: 104 440 8 8
+ - image: solid-color(14, 55, 0, 255, 8, 8)
+ bounds: 112 440 8 8
+ - image: solid-color(15, 55, 0, 255, 8, 8)
+ bounds: 120 440 8 8
+ - image: solid-color(16, 55, 0, 255, 8, 8)
+ bounds: 128 440 8 8
+ - image: solid-color(17, 55, 0, 255, 8, 8)
+ bounds: 136 440 8 8
+ - image: solid-color(18, 55, 0, 255, 8, 8)
+ bounds: 144 440 8 8
+ - image: solid-color(19, 55, 0, 255, 8, 8)
+ bounds: 152 440 8 8
+ - image: solid-color(20, 55, 0, 255, 8, 8)
+ bounds: 160 440 8 8
+ - image: solid-color(21, 55, 0, 255, 8, 8)
+ bounds: 168 440 8 8
+ - image: solid-color(22, 55, 0, 255, 8, 8)
+ bounds: 176 440 8 8
+ - image: solid-color(23, 55, 0, 255, 8, 8)
+ bounds: 184 440 8 8
+ - image: solid-color(24, 55, 0, 255, 8, 8)
+ bounds: 192 440 8 8
+ - image: solid-color(25, 55, 0, 255, 8, 8)
+ bounds: 200 440 8 8
+ - image: solid-color(26, 55, 0, 255, 8, 8)
+ bounds: 208 440 8 8
+ - image: solid-color(27, 55, 0, 255, 8, 8)
+ bounds: 216 440 8 8
+ - image: solid-color(28, 55, 0, 255, 8, 8)
+ bounds: 224 440 8 8
+ - image: solid-color(29, 55, 0, 255, 8, 8)
+ bounds: 232 440 8 8
+ - image: solid-color(30, 55, 0, 255, 8, 8)
+ bounds: 240 440 8 8
+ - image: solid-color(31, 55, 0, 255, 8, 8)
+ bounds: 248 440 8 8
+ - image: solid-color(32, 55, 0, 255, 8, 8)
+ bounds: 256 440 8 8
+ - image: solid-color(33, 55, 0, 255, 8, 8)
+ bounds: 264 440 8 8
+ - image: solid-color(34, 55, 0, 255, 8, 8)
+ bounds: 272 440 8 8
+ - image: solid-color(35, 55, 0, 255, 8, 8)
+ bounds: 280 440 8 8
+ - image: solid-color(36, 55, 0, 255, 8, 8)
+ bounds: 288 440 8 8
+ - image: solid-color(37, 55, 0, 255, 8, 8)
+ bounds: 296 440 8 8
+ - image: solid-color(38, 55, 0, 255, 8, 8)
+ bounds: 304 440 8 8
+ - image: solid-color(39, 55, 0, 255, 8, 8)
+ bounds: 312 440 8 8
+ - image: solid-color(40, 55, 0, 255, 8, 8)
+ bounds: 320 440 8 8
+ - image: solid-color(41, 55, 0, 255, 8, 8)
+ bounds: 328 440 8 8
+ - image: solid-color(42, 55, 0, 255, 8, 8)
+ bounds: 336 440 8 8
+ - image: solid-color(43, 55, 0, 255, 8, 8)
+ bounds: 344 440 8 8
+ - image: solid-color(44, 55, 0, 255, 8, 8)
+ bounds: 352 440 8 8
+ - image: solid-color(45, 55, 0, 255, 8, 8)
+ bounds: 360 440 8 8
+ - image: solid-color(46, 55, 0, 255, 8, 8)
+ bounds: 368 440 8 8
+ - image: solid-color(47, 55, 0, 255, 8, 8)
+ bounds: 376 440 8 8
+ - image: solid-color(48, 55, 0, 255, 8, 8)
+ bounds: 384 440 8 8
+ - image: solid-color(49, 55, 0, 255, 8, 8)
+ bounds: 392 440 8 8
+ - image: solid-color(50, 55, 0, 255, 8, 8)
+ bounds: 400 440 8 8
+ - image: solid-color(51, 55, 0, 255, 8, 8)
+ bounds: 408 440 8 8
+ - image: solid-color(52, 55, 0, 255, 8, 8)
+ bounds: 416 440 8 8
+ - image: solid-color(53, 55, 0, 255, 8, 8)
+ bounds: 424 440 8 8
+ - image: solid-color(54, 55, 0, 255, 8, 8)
+ bounds: 432 440 8 8
+ - image: solid-color(55, 55, 0, 255, 8, 8)
+ bounds: 440 440 8 8
+ - image: solid-color(56, 55, 0, 255, 8, 8)
+ bounds: 448 440 8 8
+ - image: solid-color(57, 55, 0, 255, 8, 8)
+ bounds: 456 440 8 8
+ - image: solid-color(58, 55, 0, 255, 8, 8)
+ bounds: 464 440 8 8
+ - image: solid-color(59, 55, 0, 255, 8, 8)
+ bounds: 472 440 8 8
+ - image: solid-color(60, 55, 0, 255, 8, 8)
+ bounds: 480 440 8 8
+ - image: solid-color(61, 55, 0, 255, 8, 8)
+ bounds: 488 440 8 8
+ - image: solid-color(62, 55, 0, 255, 8, 8)
+ bounds: 496 440 8 8
+ - image: solid-color(63, 55, 0, 255, 8, 8)
+ bounds: 504 440 8 8
+ - image: solid-color(64, 55, 0, 255, 8, 8)
+ bounds: 512 440 8 8
+ - image: solid-color(65, 55, 0, 255, 8, 8)
+ bounds: 520 440 8 8
+ - image: solid-color(66, 55, 0, 255, 8, 8)
+ bounds: 528 440 8 8
+ - image: solid-color(67, 55, 0, 255, 8, 8)
+ bounds: 536 440 8 8
+ - image: solid-color(68, 55, 0, 255, 8, 8)
+ bounds: 544 440 8 8
+ - image: solid-color(69, 55, 0, 255, 8, 8)
+ bounds: 552 440 8 8
+ - image: solid-color(70, 55, 0, 255, 8, 8)
+ bounds: 560 440 8 8
+ - image: solid-color(71, 55, 0, 255, 8, 8)
+ bounds: 568 440 8 8
+ - image: solid-color(72, 55, 0, 255, 8, 8)
+ bounds: 576 440 8 8
+ - image: solid-color(73, 55, 0, 255, 8, 8)
+ bounds: 584 440 8 8
+ - image: solid-color(74, 55, 0, 255, 8, 8)
+ bounds: 592 440 8 8
+ - image: solid-color(75, 55, 0, 255, 8, 8)
+ bounds: 600 440 8 8
+ - image: solid-color(76, 55, 0, 255, 8, 8)
+ bounds: 608 440 8 8
+ - image: solid-color(77, 55, 0, 255, 8, 8)
+ bounds: 616 440 8 8
+ - image: solid-color(78, 55, 0, 255, 8, 8)
+ bounds: 624 440 8 8
+ - image: solid-color(79, 55, 0, 255, 8, 8)
+ bounds: 632 440 8 8
+ - image: solid-color(80, 55, 0, 255, 8, 8)
+ bounds: 640 440 8 8
+ - image: solid-color(81, 55, 0, 255, 8, 8)
+ bounds: 648 440 8 8
+ - image: solid-color(82, 55, 0, 255, 8, 8)
+ bounds: 656 440 8 8
+ - image: solid-color(83, 55, 0, 255, 8, 8)
+ bounds: 664 440 8 8
+ - image: solid-color(84, 55, 0, 255, 8, 8)
+ bounds: 672 440 8 8
+ - image: solid-color(85, 55, 0, 255, 8, 8)
+ bounds: 680 440 8 8
+ - image: solid-color(86, 55, 0, 255, 8, 8)
+ bounds: 688 440 8 8
+ - image: solid-color(87, 55, 0, 255, 8, 8)
+ bounds: 696 440 8 8
+ - image: solid-color(88, 55, 0, 255, 8, 8)
+ bounds: 704 440 8 8
+ - image: solid-color(89, 55, 0, 255, 8, 8)
+ bounds: 712 440 8 8
+ - image: solid-color(90, 55, 0, 255, 8, 8)
+ bounds: 720 440 8 8
+ - image: solid-color(91, 55, 0, 255, 8, 8)
+ bounds: 728 440 8 8
+ - image: solid-color(92, 55, 0, 255, 8, 8)
+ bounds: 736 440 8 8
+ - image: solid-color(93, 55, 0, 255, 8, 8)
+ bounds: 744 440 8 8
+ - image: solid-color(94, 55, 0, 255, 8, 8)
+ bounds: 752 440 8 8
+ - image: solid-color(95, 55, 0, 255, 8, 8)
+ bounds: 760 440 8 8
+ - image: solid-color(96, 55, 0, 255, 8, 8)
+ bounds: 768 440 8 8
+ - image: solid-color(97, 55, 0, 255, 8, 8)
+ bounds: 776 440 8 8
+ - image: solid-color(98, 55, 0, 255, 8, 8)
+ bounds: 784 440 8 8
+ - image: solid-color(99, 55, 0, 255, 8, 8)
+ bounds: 792 440 8 8
+ - image: solid-color(100, 55, 0, 255, 8, 8)
+ bounds: 800 440 8 8
+ - image: solid-color(101, 55, 0, 255, 8, 8)
+ bounds: 808 440 8 8
+ - image: solid-color(102, 55, 0, 255, 8, 8)
+ bounds: 816 440 8 8
+ - image: solid-color(103, 55, 0, 255, 8, 8)
+ bounds: 824 440 8 8
+ - image: solid-color(104, 55, 0, 255, 8, 8)
+ bounds: 832 440 8 8
+ - image: solid-color(105, 55, 0, 255, 8, 8)
+ bounds: 840 440 8 8
+ - image: solid-color(106, 55, 0, 255, 8, 8)
+ bounds: 848 440 8 8
+ - image: solid-color(107, 55, 0, 255, 8, 8)
+ bounds: 856 440 8 8
+ - image: solid-color(108, 55, 0, 255, 8, 8)
+ bounds: 864 440 8 8
+ - image: solid-color(109, 55, 0, 255, 8, 8)
+ bounds: 872 440 8 8
+ - image: solid-color(110, 55, 0, 255, 8, 8)
+ bounds: 880 440 8 8
+ - image: solid-color(111, 55, 0, 255, 8, 8)
+ bounds: 888 440 8 8
+ - image: solid-color(112, 55, 0, 255, 8, 8)
+ bounds: 896 440 8 8
+ - image: solid-color(113, 55, 0, 255, 8, 8)
+ bounds: 904 440 8 8
+ - image: solid-color(114, 55, 0, 255, 8, 8)
+ bounds: 912 440 8 8
+ - image: solid-color(115, 55, 0, 255, 8, 8)
+ bounds: 920 440 8 8
+ - image: solid-color(116, 55, 0, 255, 8, 8)
+ bounds: 928 440 8 8
+ - image: solid-color(117, 55, 0, 255, 8, 8)
+ bounds: 936 440 8 8
+ - image: solid-color(118, 55, 0, 255, 8, 8)
+ bounds: 944 440 8 8
+ - image: solid-color(119, 55, 0, 255, 8, 8)
+ bounds: 952 440 8 8
+ - image: solid-color(120, 55, 0, 255, 8, 8)
+ bounds: 960 440 8 8
+ - image: solid-color(121, 55, 0, 255, 8, 8)
+ bounds: 968 440 8 8
+ - image: solid-color(122, 55, 0, 255, 8, 8)
+ bounds: 976 440 8 8
+ - image: solid-color(123, 55, 0, 255, 8, 8)
+ bounds: 984 440 8 8
+ - image: solid-color(124, 55, 0, 255, 8, 8)
+ bounds: 992 440 8 8
+ - image: solid-color(125, 55, 0, 255, 8, 8)
+ bounds: 1000 440 8 8
+ - image: solid-color(126, 55, 0, 255, 8, 8)
+ bounds: 1008 440 8 8
+ - image: solid-color(127, 55, 0, 255, 8, 8)
+ bounds: 1016 440 8 8
+ - image: solid-color(0, 56, 0, 255, 8, 8)
+ bounds: 0 448 8 8
+ - image: solid-color(1, 56, 0, 255, 8, 8)
+ bounds: 8 448 8 8
+ - image: solid-color(2, 56, 0, 255, 8, 8)
+ bounds: 16 448 8 8
+ - image: solid-color(3, 56, 0, 255, 8, 8)
+ bounds: 24 448 8 8
+ - image: solid-color(4, 56, 0, 255, 8, 8)
+ bounds: 32 448 8 8
+ - image: solid-color(5, 56, 0, 255, 8, 8)
+ bounds: 40 448 8 8
+ - image: solid-color(6, 56, 0, 255, 8, 8)
+ bounds: 48 448 8 8
+ - image: solid-color(7, 56, 0, 255, 8, 8)
+ bounds: 56 448 8 8
+ - image: solid-color(8, 56, 0, 255, 8, 8)
+ bounds: 64 448 8 8
+ - image: solid-color(9, 56, 0, 255, 8, 8)
+ bounds: 72 448 8 8
+ - image: solid-color(10, 56, 0, 255, 8, 8)
+ bounds: 80 448 8 8
+ - image: solid-color(11, 56, 0, 255, 8, 8)
+ bounds: 88 448 8 8
+ - image: solid-color(12, 56, 0, 255, 8, 8)
+ bounds: 96 448 8 8
+ - image: solid-color(13, 56, 0, 255, 8, 8)
+ bounds: 104 448 8 8
+ - image: solid-color(14, 56, 0, 255, 8, 8)
+ bounds: 112 448 8 8
+ - image: solid-color(15, 56, 0, 255, 8, 8)
+ bounds: 120 448 8 8
+ - image: solid-color(16, 56, 0, 255, 8, 8)
+ bounds: 128 448 8 8
+ - image: solid-color(17, 56, 0, 255, 8, 8)
+ bounds: 136 448 8 8
+ - image: solid-color(18, 56, 0, 255, 8, 8)
+ bounds: 144 448 8 8
+ - image: solid-color(19, 56, 0, 255, 8, 8)
+ bounds: 152 448 8 8
+ - image: solid-color(20, 56, 0, 255, 8, 8)
+ bounds: 160 448 8 8
+ - image: solid-color(21, 56, 0, 255, 8, 8)
+ bounds: 168 448 8 8
+ - image: solid-color(22, 56, 0, 255, 8, 8)
+ bounds: 176 448 8 8
+ - image: solid-color(23, 56, 0, 255, 8, 8)
+ bounds: 184 448 8 8
+ - image: solid-color(24, 56, 0, 255, 8, 8)
+ bounds: 192 448 8 8
+ - image: solid-color(25, 56, 0, 255, 8, 8)
+ bounds: 200 448 8 8
+ - image: solid-color(26, 56, 0, 255, 8, 8)
+ bounds: 208 448 8 8
+ - image: solid-color(27, 56, 0, 255, 8, 8)
+ bounds: 216 448 8 8
+ - image: solid-color(28, 56, 0, 255, 8, 8)
+ bounds: 224 448 8 8
+ - image: solid-color(29, 56, 0, 255, 8, 8)
+ bounds: 232 448 8 8
+ - image: solid-color(30, 56, 0, 255, 8, 8)
+ bounds: 240 448 8 8
+ - image: solid-color(31, 56, 0, 255, 8, 8)
+ bounds: 248 448 8 8
+ - image: solid-color(32, 56, 0, 255, 8, 8)
+ bounds: 256 448 8 8
+ - image: solid-color(33, 56, 0, 255, 8, 8)
+ bounds: 264 448 8 8
+ - image: solid-color(34, 56, 0, 255, 8, 8)
+ bounds: 272 448 8 8
+ - image: solid-color(35, 56, 0, 255, 8, 8)
+ bounds: 280 448 8 8
+ - image: solid-color(36, 56, 0, 255, 8, 8)
+ bounds: 288 448 8 8
+ - image: solid-color(37, 56, 0, 255, 8, 8)
+ bounds: 296 448 8 8
+ - image: solid-color(38, 56, 0, 255, 8, 8)
+ bounds: 304 448 8 8
+ - image: solid-color(39, 56, 0, 255, 8, 8)
+ bounds: 312 448 8 8
+ - image: solid-color(40, 56, 0, 255, 8, 8)
+ bounds: 320 448 8 8
+ - image: solid-color(41, 56, 0, 255, 8, 8)
+ bounds: 328 448 8 8
+ - image: solid-color(42, 56, 0, 255, 8, 8)
+ bounds: 336 448 8 8
+ - image: solid-color(43, 56, 0, 255, 8, 8)
+ bounds: 344 448 8 8
+ - image: solid-color(44, 56, 0, 255, 8, 8)
+ bounds: 352 448 8 8
+ - image: solid-color(45, 56, 0, 255, 8, 8)
+ bounds: 360 448 8 8
+ - image: solid-color(46, 56, 0, 255, 8, 8)
+ bounds: 368 448 8 8
+ - image: solid-color(47, 56, 0, 255, 8, 8)
+ bounds: 376 448 8 8
+ - image: solid-color(48, 56, 0, 255, 8, 8)
+ bounds: 384 448 8 8
+ - image: solid-color(49, 56, 0, 255, 8, 8)
+ bounds: 392 448 8 8
+ - image: solid-color(50, 56, 0, 255, 8, 8)
+ bounds: 400 448 8 8
+ - image: solid-color(51, 56, 0, 255, 8, 8)
+ bounds: 408 448 8 8
+ - image: solid-color(52, 56, 0, 255, 8, 8)
+ bounds: 416 448 8 8
+ - image: solid-color(53, 56, 0, 255, 8, 8)
+ bounds: 424 448 8 8
+ - image: solid-color(54, 56, 0, 255, 8, 8)
+ bounds: 432 448 8 8
+ - image: solid-color(55, 56, 0, 255, 8, 8)
+ bounds: 440 448 8 8
+ - image: solid-color(56, 56, 0, 255, 8, 8)
+ bounds: 448 448 8 8
+ - image: solid-color(57, 56, 0, 255, 8, 8)
+ bounds: 456 448 8 8
+ - image: solid-color(58, 56, 0, 255, 8, 8)
+ bounds: 464 448 8 8
+ - image: solid-color(59, 56, 0, 255, 8, 8)
+ bounds: 472 448 8 8
+ - image: solid-color(60, 56, 0, 255, 8, 8)
+ bounds: 480 448 8 8
+ - image: solid-color(61, 56, 0, 255, 8, 8)
+ bounds: 488 448 8 8
+ - image: solid-color(62, 56, 0, 255, 8, 8)
+ bounds: 496 448 8 8
+ - image: solid-color(63, 56, 0, 255, 8, 8)
+ bounds: 504 448 8 8
+ - image: solid-color(64, 56, 0, 255, 8, 8)
+ bounds: 512 448 8 8
+ - image: solid-color(65, 56, 0, 255, 8, 8)
+ bounds: 520 448 8 8
+ - image: solid-color(66, 56, 0, 255, 8, 8)
+ bounds: 528 448 8 8
+ - image: solid-color(67, 56, 0, 255, 8, 8)
+ bounds: 536 448 8 8
+ - image: solid-color(68, 56, 0, 255, 8, 8)
+ bounds: 544 448 8 8
+ - image: solid-color(69, 56, 0, 255, 8, 8)
+ bounds: 552 448 8 8
+ - image: solid-color(70, 56, 0, 255, 8, 8)
+ bounds: 560 448 8 8
+ - image: solid-color(71, 56, 0, 255, 8, 8)
+ bounds: 568 448 8 8
+ - image: solid-color(72, 56, 0, 255, 8, 8)
+ bounds: 576 448 8 8
+ - image: solid-color(73, 56, 0, 255, 8, 8)
+ bounds: 584 448 8 8
+ - image: solid-color(74, 56, 0, 255, 8, 8)
+ bounds: 592 448 8 8
+ - image: solid-color(75, 56, 0, 255, 8, 8)
+ bounds: 600 448 8 8
+ - image: solid-color(76, 56, 0, 255, 8, 8)
+ bounds: 608 448 8 8
+ - image: solid-color(77, 56, 0, 255, 8, 8)
+ bounds: 616 448 8 8
+ - image: solid-color(78, 56, 0, 255, 8, 8)
+ bounds: 624 448 8 8
+ - image: solid-color(79, 56, 0, 255, 8, 8)
+ bounds: 632 448 8 8
+ - image: solid-color(80, 56, 0, 255, 8, 8)
+ bounds: 640 448 8 8
+ - image: solid-color(81, 56, 0, 255, 8, 8)
+ bounds: 648 448 8 8
+ - image: solid-color(82, 56, 0, 255, 8, 8)
+ bounds: 656 448 8 8
+ - image: solid-color(83, 56, 0, 255, 8, 8)
+ bounds: 664 448 8 8
+ - image: solid-color(84, 56, 0, 255, 8, 8)
+ bounds: 672 448 8 8
+ - image: solid-color(85, 56, 0, 255, 8, 8)
+ bounds: 680 448 8 8
+ - image: solid-color(86, 56, 0, 255, 8, 8)
+ bounds: 688 448 8 8
+ - image: solid-color(87, 56, 0, 255, 8, 8)
+ bounds: 696 448 8 8
+ - image: solid-color(88, 56, 0, 255, 8, 8)
+ bounds: 704 448 8 8
+ - image: solid-color(89, 56, 0, 255, 8, 8)
+ bounds: 712 448 8 8
+ - image: solid-color(90, 56, 0, 255, 8, 8)
+ bounds: 720 448 8 8
+ - image: solid-color(91, 56, 0, 255, 8, 8)
+ bounds: 728 448 8 8
+ - image: solid-color(92, 56, 0, 255, 8, 8)
+ bounds: 736 448 8 8
+ - image: solid-color(93, 56, 0, 255, 8, 8)
+ bounds: 744 448 8 8
+ - image: solid-color(94, 56, 0, 255, 8, 8)
+ bounds: 752 448 8 8
+ - image: solid-color(95, 56, 0, 255, 8, 8)
+ bounds: 760 448 8 8
+ - image: solid-color(96, 56, 0, 255, 8, 8)
+ bounds: 768 448 8 8
+ - image: solid-color(97, 56, 0, 255, 8, 8)
+ bounds: 776 448 8 8
+ - image: solid-color(98, 56, 0, 255, 8, 8)
+ bounds: 784 448 8 8
+ - image: solid-color(99, 56, 0, 255, 8, 8)
+ bounds: 792 448 8 8
+ - image: solid-color(100, 56, 0, 255, 8, 8)
+ bounds: 800 448 8 8
+ - image: solid-color(101, 56, 0, 255, 8, 8)
+ bounds: 808 448 8 8
+ - image: solid-color(102, 56, 0, 255, 8, 8)
+ bounds: 816 448 8 8
+ - image: solid-color(103, 56, 0, 255, 8, 8)
+ bounds: 824 448 8 8
+ - image: solid-color(104, 56, 0, 255, 8, 8)
+ bounds: 832 448 8 8
+ - image: solid-color(105, 56, 0, 255, 8, 8)
+ bounds: 840 448 8 8
+ - image: solid-color(106, 56, 0, 255, 8, 8)
+ bounds: 848 448 8 8
+ - image: solid-color(107, 56, 0, 255, 8, 8)
+ bounds: 856 448 8 8
+ - image: solid-color(108, 56, 0, 255, 8, 8)
+ bounds: 864 448 8 8
+ - image: solid-color(109, 56, 0, 255, 8, 8)
+ bounds: 872 448 8 8
+ - image: solid-color(110, 56, 0, 255, 8, 8)
+ bounds: 880 448 8 8
+ - image: solid-color(111, 56, 0, 255, 8, 8)
+ bounds: 888 448 8 8
+ - image: solid-color(112, 56, 0, 255, 8, 8)
+ bounds: 896 448 8 8
+ - image: solid-color(113, 56, 0, 255, 8, 8)
+ bounds: 904 448 8 8
+ - image: solid-color(114, 56, 0, 255, 8, 8)
+ bounds: 912 448 8 8
+ - image: solid-color(115, 56, 0, 255, 8, 8)
+ bounds: 920 448 8 8
+ - image: solid-color(116, 56, 0, 255, 8, 8)
+ bounds: 928 448 8 8
+ - image: solid-color(117, 56, 0, 255, 8, 8)
+ bounds: 936 448 8 8
+ - image: solid-color(118, 56, 0, 255, 8, 8)
+ bounds: 944 448 8 8
+ - image: solid-color(119, 56, 0, 255, 8, 8)
+ bounds: 952 448 8 8
+ - image: solid-color(120, 56, 0, 255, 8, 8)
+ bounds: 960 448 8 8
+ - image: solid-color(121, 56, 0, 255, 8, 8)
+ bounds: 968 448 8 8
+ - image: solid-color(122, 56, 0, 255, 8, 8)
+ bounds: 976 448 8 8
+ - image: solid-color(123, 56, 0, 255, 8, 8)
+ bounds: 984 448 8 8
+ - image: solid-color(124, 56, 0, 255, 8, 8)
+ bounds: 992 448 8 8
+ - image: solid-color(125, 56, 0, 255, 8, 8)
+ bounds: 1000 448 8 8
+ - image: solid-color(126, 56, 0, 255, 8, 8)
+ bounds: 1008 448 8 8
+ - image: solid-color(127, 56, 0, 255, 8, 8)
+ bounds: 1016 448 8 8
+ - image: solid-color(0, 57, 0, 255, 8, 8)
+ bounds: 0 456 8 8
+ - image: solid-color(1, 57, 0, 255, 8, 8)
+ bounds: 8 456 8 8
+ - image: solid-color(2, 57, 0, 255, 8, 8)
+ bounds: 16 456 8 8
+ - image: solid-color(3, 57, 0, 255, 8, 8)
+ bounds: 24 456 8 8
+ - image: solid-color(4, 57, 0, 255, 8, 8)
+ bounds: 32 456 8 8
+ - image: solid-color(5, 57, 0, 255, 8, 8)
+ bounds: 40 456 8 8
+ - image: solid-color(6, 57, 0, 255, 8, 8)
+ bounds: 48 456 8 8
+ - image: solid-color(7, 57, 0, 255, 8, 8)
+ bounds: 56 456 8 8
+ - image: solid-color(8, 57, 0, 255, 8, 8)
+ bounds: 64 456 8 8
+ - image: solid-color(9, 57, 0, 255, 8, 8)
+ bounds: 72 456 8 8
+ - image: solid-color(10, 57, 0, 255, 8, 8)
+ bounds: 80 456 8 8
+ - image: solid-color(11, 57, 0, 255, 8, 8)
+ bounds: 88 456 8 8
+ - image: solid-color(12, 57, 0, 255, 8, 8)
+ bounds: 96 456 8 8
+ - image: solid-color(13, 57, 0, 255, 8, 8)
+ bounds: 104 456 8 8
+ - image: solid-color(14, 57, 0, 255, 8, 8)
+ bounds: 112 456 8 8
+ - image: solid-color(15, 57, 0, 255, 8, 8)
+ bounds: 120 456 8 8
+ - image: solid-color(16, 57, 0, 255, 8, 8)
+ bounds: 128 456 8 8
+ - image: solid-color(17, 57, 0, 255, 8, 8)
+ bounds: 136 456 8 8
+ - image: solid-color(18, 57, 0, 255, 8, 8)
+ bounds: 144 456 8 8
+ - image: solid-color(19, 57, 0, 255, 8, 8)
+ bounds: 152 456 8 8
+ - image: solid-color(20, 57, 0, 255, 8, 8)
+ bounds: 160 456 8 8
+ - image: solid-color(21, 57, 0, 255, 8, 8)
+ bounds: 168 456 8 8
+ - image: solid-color(22, 57, 0, 255, 8, 8)
+ bounds: 176 456 8 8
+ - image: solid-color(23, 57, 0, 255, 8, 8)
+ bounds: 184 456 8 8
+ - image: solid-color(24, 57, 0, 255, 8, 8)
+ bounds: 192 456 8 8
+ - image: solid-color(25, 57, 0, 255, 8, 8)
+ bounds: 200 456 8 8
+ - image: solid-color(26, 57, 0, 255, 8, 8)
+ bounds: 208 456 8 8
+ - image: solid-color(27, 57, 0, 255, 8, 8)
+ bounds: 216 456 8 8
+ - image: solid-color(28, 57, 0, 255, 8, 8)
+ bounds: 224 456 8 8
+ - image: solid-color(29, 57, 0, 255, 8, 8)
+ bounds: 232 456 8 8
+ - image: solid-color(30, 57, 0, 255, 8, 8)
+ bounds: 240 456 8 8
+ - image: solid-color(31, 57, 0, 255, 8, 8)
+ bounds: 248 456 8 8
+ - image: solid-color(32, 57, 0, 255, 8, 8)
+ bounds: 256 456 8 8
+ - image: solid-color(33, 57, 0, 255, 8, 8)
+ bounds: 264 456 8 8
+ - image: solid-color(34, 57, 0, 255, 8, 8)
+ bounds: 272 456 8 8
+ - image: solid-color(35, 57, 0, 255, 8, 8)
+ bounds: 280 456 8 8
+ - image: solid-color(36, 57, 0, 255, 8, 8)
+ bounds: 288 456 8 8
+ - image: solid-color(37, 57, 0, 255, 8, 8)
+ bounds: 296 456 8 8
+ - image: solid-color(38, 57, 0, 255, 8, 8)
+ bounds: 304 456 8 8
+ - image: solid-color(39, 57, 0, 255, 8, 8)
+ bounds: 312 456 8 8
+ - image: solid-color(40, 57, 0, 255, 8, 8)
+ bounds: 320 456 8 8
+ - image: solid-color(41, 57, 0, 255, 8, 8)
+ bounds: 328 456 8 8
+ - image: solid-color(42, 57, 0, 255, 8, 8)
+ bounds: 336 456 8 8
+ - image: solid-color(43, 57, 0, 255, 8, 8)
+ bounds: 344 456 8 8
+ - image: solid-color(44, 57, 0, 255, 8, 8)
+ bounds: 352 456 8 8
+ - image: solid-color(45, 57, 0, 255, 8, 8)
+ bounds: 360 456 8 8
+ - image: solid-color(46, 57, 0, 255, 8, 8)
+ bounds: 368 456 8 8
+ - image: solid-color(47, 57, 0, 255, 8, 8)
+ bounds: 376 456 8 8
+ - image: solid-color(48, 57, 0, 255, 8, 8)
+ bounds: 384 456 8 8
+ - image: solid-color(49, 57, 0, 255, 8, 8)
+ bounds: 392 456 8 8
+ - image: solid-color(50, 57, 0, 255, 8, 8)
+ bounds: 400 456 8 8
+ - image: solid-color(51, 57, 0, 255, 8, 8)
+ bounds: 408 456 8 8
+ - image: solid-color(52, 57, 0, 255, 8, 8)
+ bounds: 416 456 8 8
+ - image: solid-color(53, 57, 0, 255, 8, 8)
+ bounds: 424 456 8 8
+ - image: solid-color(54, 57, 0, 255, 8, 8)
+ bounds: 432 456 8 8
+ - image: solid-color(55, 57, 0, 255, 8, 8)
+ bounds: 440 456 8 8
+ - image: solid-color(56, 57, 0, 255, 8, 8)
+ bounds: 448 456 8 8
+ - image: solid-color(57, 57, 0, 255, 8, 8)
+ bounds: 456 456 8 8
+ - image: solid-color(58, 57, 0, 255, 8, 8)
+ bounds: 464 456 8 8
+ - image: solid-color(59, 57, 0, 255, 8, 8)
+ bounds: 472 456 8 8
+ - image: solid-color(60, 57, 0, 255, 8, 8)
+ bounds: 480 456 8 8
+ - image: solid-color(61, 57, 0, 255, 8, 8)
+ bounds: 488 456 8 8
+ - image: solid-color(62, 57, 0, 255, 8, 8)
+ bounds: 496 456 8 8
+ - image: solid-color(63, 57, 0, 255, 8, 8)
+ bounds: 504 456 8 8
+ - image: solid-color(64, 57, 0, 255, 8, 8)
+ bounds: 512 456 8 8
+ - image: solid-color(65, 57, 0, 255, 8, 8)
+ bounds: 520 456 8 8
+ - image: solid-color(66, 57, 0, 255, 8, 8)
+ bounds: 528 456 8 8
+ - image: solid-color(67, 57, 0, 255, 8, 8)
+ bounds: 536 456 8 8
+ - image: solid-color(68, 57, 0, 255, 8, 8)
+ bounds: 544 456 8 8
+ - image: solid-color(69, 57, 0, 255, 8, 8)
+ bounds: 552 456 8 8
+ - image: solid-color(70, 57, 0, 255, 8, 8)
+ bounds: 560 456 8 8
+ - image: solid-color(71, 57, 0, 255, 8, 8)
+ bounds: 568 456 8 8
+ - image: solid-color(72, 57, 0, 255, 8, 8)
+ bounds: 576 456 8 8
+ - image: solid-color(73, 57, 0, 255, 8, 8)
+ bounds: 584 456 8 8
+ - image: solid-color(74, 57, 0, 255, 8, 8)
+ bounds: 592 456 8 8
+ - image: solid-color(75, 57, 0, 255, 8, 8)
+ bounds: 600 456 8 8
+ - image: solid-color(76, 57, 0, 255, 8, 8)
+ bounds: 608 456 8 8
+ - image: solid-color(77, 57, 0, 255, 8, 8)
+ bounds: 616 456 8 8
+ - image: solid-color(78, 57, 0, 255, 8, 8)
+ bounds: 624 456 8 8
+ - image: solid-color(79, 57, 0, 255, 8, 8)
+ bounds: 632 456 8 8
+ - image: solid-color(80, 57, 0, 255, 8, 8)
+ bounds: 640 456 8 8
+ - image: solid-color(81, 57, 0, 255, 8, 8)
+ bounds: 648 456 8 8
+ - image: solid-color(82, 57, 0, 255, 8, 8)
+ bounds: 656 456 8 8
+ - image: solid-color(83, 57, 0, 255, 8, 8)
+ bounds: 664 456 8 8
+ - image: solid-color(84, 57, 0, 255, 8, 8)
+ bounds: 672 456 8 8
+ - image: solid-color(85, 57, 0, 255, 8, 8)
+ bounds: 680 456 8 8
+ - image: solid-color(86, 57, 0, 255, 8, 8)
+ bounds: 688 456 8 8
+ - image: solid-color(87, 57, 0, 255, 8, 8)
+ bounds: 696 456 8 8
+ - image: solid-color(88, 57, 0, 255, 8, 8)
+ bounds: 704 456 8 8
+ - image: solid-color(89, 57, 0, 255, 8, 8)
+ bounds: 712 456 8 8
+ - image: solid-color(90, 57, 0, 255, 8, 8)
+ bounds: 720 456 8 8
+ - image: solid-color(91, 57, 0, 255, 8, 8)
+ bounds: 728 456 8 8
+ - image: solid-color(92, 57, 0, 255, 8, 8)
+ bounds: 736 456 8 8
+ - image: solid-color(93, 57, 0, 255, 8, 8)
+ bounds: 744 456 8 8
+ - image: solid-color(94, 57, 0, 255, 8, 8)
+ bounds: 752 456 8 8
+ - image: solid-color(95, 57, 0, 255, 8, 8)
+ bounds: 760 456 8 8
+ - image: solid-color(96, 57, 0, 255, 8, 8)
+ bounds: 768 456 8 8
+ - image: solid-color(97, 57, 0, 255, 8, 8)
+ bounds: 776 456 8 8
+ - image: solid-color(98, 57, 0, 255, 8, 8)
+ bounds: 784 456 8 8
+ - image: solid-color(99, 57, 0, 255, 8, 8)
+ bounds: 792 456 8 8
+ - image: solid-color(100, 57, 0, 255, 8, 8)
+ bounds: 800 456 8 8
+ - image: solid-color(101, 57, 0, 255, 8, 8)
+ bounds: 808 456 8 8
+ - image: solid-color(102, 57, 0, 255, 8, 8)
+ bounds: 816 456 8 8
+ - image: solid-color(103, 57, 0, 255, 8, 8)
+ bounds: 824 456 8 8
+ - image: solid-color(104, 57, 0, 255, 8, 8)
+ bounds: 832 456 8 8
+ - image: solid-color(105, 57, 0, 255, 8, 8)
+ bounds: 840 456 8 8
+ - image: solid-color(106, 57, 0, 255, 8, 8)
+ bounds: 848 456 8 8
+ - image: solid-color(107, 57, 0, 255, 8, 8)
+ bounds: 856 456 8 8
+ - image: solid-color(108, 57, 0, 255, 8, 8)
+ bounds: 864 456 8 8
+ - image: solid-color(109, 57, 0, 255, 8, 8)
+ bounds: 872 456 8 8
+ - image: solid-color(110, 57, 0, 255, 8, 8)
+ bounds: 880 456 8 8
+ - image: solid-color(111, 57, 0, 255, 8, 8)
+ bounds: 888 456 8 8
+ - image: solid-color(112, 57, 0, 255, 8, 8)
+ bounds: 896 456 8 8
+ - image: solid-color(113, 57, 0, 255, 8, 8)
+ bounds: 904 456 8 8
+ - image: solid-color(114, 57, 0, 255, 8, 8)
+ bounds: 912 456 8 8
+ - image: solid-color(115, 57, 0, 255, 8, 8)
+ bounds: 920 456 8 8
+ - image: solid-color(116, 57, 0, 255, 8, 8)
+ bounds: 928 456 8 8
+ - image: solid-color(117, 57, 0, 255, 8, 8)
+ bounds: 936 456 8 8
+ - image: solid-color(118, 57, 0, 255, 8, 8)
+ bounds: 944 456 8 8
+ - image: solid-color(119, 57, 0, 255, 8, 8)
+ bounds: 952 456 8 8
+ - image: solid-color(120, 57, 0, 255, 8, 8)
+ bounds: 960 456 8 8
+ - image: solid-color(121, 57, 0, 255, 8, 8)
+ bounds: 968 456 8 8
+ - image: solid-color(122, 57, 0, 255, 8, 8)
+ bounds: 976 456 8 8
+ - image: solid-color(123, 57, 0, 255, 8, 8)
+ bounds: 984 456 8 8
+ - image: solid-color(124, 57, 0, 255, 8, 8)
+ bounds: 992 456 8 8
+ - image: solid-color(125, 57, 0, 255, 8, 8)
+ bounds: 1000 456 8 8
+ - image: solid-color(126, 57, 0, 255, 8, 8)
+ bounds: 1008 456 8 8
+ - image: solid-color(127, 57, 0, 255, 8, 8)
+ bounds: 1016 456 8 8
+ - image: solid-color(0, 58, 0, 255, 8, 8)
+ bounds: 0 464 8 8
+ - image: solid-color(1, 58, 0, 255, 8, 8)
+ bounds: 8 464 8 8
+ - image: solid-color(2, 58, 0, 255, 8, 8)
+ bounds: 16 464 8 8
+ - image: solid-color(3, 58, 0, 255, 8, 8)
+ bounds: 24 464 8 8
+ - image: solid-color(4, 58, 0, 255, 8, 8)
+ bounds: 32 464 8 8
+ - image: solid-color(5, 58, 0, 255, 8, 8)
+ bounds: 40 464 8 8
+ - image: solid-color(6, 58, 0, 255, 8, 8)
+ bounds: 48 464 8 8
+ - image: solid-color(7, 58, 0, 255, 8, 8)
+ bounds: 56 464 8 8
+ - image: solid-color(8, 58, 0, 255, 8, 8)
+ bounds: 64 464 8 8
+ - image: solid-color(9, 58, 0, 255, 8, 8)
+ bounds: 72 464 8 8
+ - image: solid-color(10, 58, 0, 255, 8, 8)
+ bounds: 80 464 8 8
+ - image: solid-color(11, 58, 0, 255, 8, 8)
+ bounds: 88 464 8 8
+ - image: solid-color(12, 58, 0, 255, 8, 8)
+ bounds: 96 464 8 8
+ - image: solid-color(13, 58, 0, 255, 8, 8)
+ bounds: 104 464 8 8
+ - image: solid-color(14, 58, 0, 255, 8, 8)
+ bounds: 112 464 8 8
+ - image: solid-color(15, 58, 0, 255, 8, 8)
+ bounds: 120 464 8 8
+ - image: solid-color(16, 58, 0, 255, 8, 8)
+ bounds: 128 464 8 8
+ - image: solid-color(17, 58, 0, 255, 8, 8)
+ bounds: 136 464 8 8
+ - image: solid-color(18, 58, 0, 255, 8, 8)
+ bounds: 144 464 8 8
+ - image: solid-color(19, 58, 0, 255, 8, 8)
+ bounds: 152 464 8 8
+ - image: solid-color(20, 58, 0, 255, 8, 8)
+ bounds: 160 464 8 8
+ - image: solid-color(21, 58, 0, 255, 8, 8)
+ bounds: 168 464 8 8
+ - image: solid-color(22, 58, 0, 255, 8, 8)
+ bounds: 176 464 8 8
+ - image: solid-color(23, 58, 0, 255, 8, 8)
+ bounds: 184 464 8 8
+ - image: solid-color(24, 58, 0, 255, 8, 8)
+ bounds: 192 464 8 8
+ - image: solid-color(25, 58, 0, 255, 8, 8)
+ bounds: 200 464 8 8
+ - image: solid-color(26, 58, 0, 255, 8, 8)
+ bounds: 208 464 8 8
+ - image: solid-color(27, 58, 0, 255, 8, 8)
+ bounds: 216 464 8 8
+ - image: solid-color(28, 58, 0, 255, 8, 8)
+ bounds: 224 464 8 8
+ - image: solid-color(29, 58, 0, 255, 8, 8)
+ bounds: 232 464 8 8
+ - image: solid-color(30, 58, 0, 255, 8, 8)
+ bounds: 240 464 8 8
+ - image: solid-color(31, 58, 0, 255, 8, 8)
+ bounds: 248 464 8 8
+ - image: solid-color(32, 58, 0, 255, 8, 8)
+ bounds: 256 464 8 8
+ - image: solid-color(33, 58, 0, 255, 8, 8)
+ bounds: 264 464 8 8
+ - image: solid-color(34, 58, 0, 255, 8, 8)
+ bounds: 272 464 8 8
+ - image: solid-color(35, 58, 0, 255, 8, 8)
+ bounds: 280 464 8 8
+ - image: solid-color(36, 58, 0, 255, 8, 8)
+ bounds: 288 464 8 8
+ - image: solid-color(37, 58, 0, 255, 8, 8)
+ bounds: 296 464 8 8
+ - image: solid-color(38, 58, 0, 255, 8, 8)
+ bounds: 304 464 8 8
+ - image: solid-color(39, 58, 0, 255, 8, 8)
+ bounds: 312 464 8 8
+ - image: solid-color(40, 58, 0, 255, 8, 8)
+ bounds: 320 464 8 8
+ - image: solid-color(41, 58, 0, 255, 8, 8)
+ bounds: 328 464 8 8
+ - image: solid-color(42, 58, 0, 255, 8, 8)
+ bounds: 336 464 8 8
+ - image: solid-color(43, 58, 0, 255, 8, 8)
+ bounds: 344 464 8 8
+ - image: solid-color(44, 58, 0, 255, 8, 8)
+ bounds: 352 464 8 8
+ - image: solid-color(45, 58, 0, 255, 8, 8)
+ bounds: 360 464 8 8
+ - image: solid-color(46, 58, 0, 255, 8, 8)
+ bounds: 368 464 8 8
+ - image: solid-color(47, 58, 0, 255, 8, 8)
+ bounds: 376 464 8 8
+ - image: solid-color(48, 58, 0, 255, 8, 8)
+ bounds: 384 464 8 8
+ - image: solid-color(49, 58, 0, 255, 8, 8)
+ bounds: 392 464 8 8
+ - image: solid-color(50, 58, 0, 255, 8, 8)
+ bounds: 400 464 8 8
+ - image: solid-color(51, 58, 0, 255, 8, 8)
+ bounds: 408 464 8 8
+ - image: solid-color(52, 58, 0, 255, 8, 8)
+ bounds: 416 464 8 8
+ - image: solid-color(53, 58, 0, 255, 8, 8)
+ bounds: 424 464 8 8
+ - image: solid-color(54, 58, 0, 255, 8, 8)
+ bounds: 432 464 8 8
+ - image: solid-color(55, 58, 0, 255, 8, 8)
+ bounds: 440 464 8 8
+ - image: solid-color(56, 58, 0, 255, 8, 8)
+ bounds: 448 464 8 8
+ - image: solid-color(57, 58, 0, 255, 8, 8)
+ bounds: 456 464 8 8
+ - image: solid-color(58, 58, 0, 255, 8, 8)
+ bounds: 464 464 8 8
+ - image: solid-color(59, 58, 0, 255, 8, 8)
+ bounds: 472 464 8 8
+ - image: solid-color(60, 58, 0, 255, 8, 8)
+ bounds: 480 464 8 8
+ - image: solid-color(61, 58, 0, 255, 8, 8)
+ bounds: 488 464 8 8
+ - image: solid-color(62, 58, 0, 255, 8, 8)
+ bounds: 496 464 8 8
+ - image: solid-color(63, 58, 0, 255, 8, 8)
+ bounds: 504 464 8 8
+ - image: solid-color(64, 58, 0, 255, 8, 8)
+ bounds: 512 464 8 8
+ - image: solid-color(65, 58, 0, 255, 8, 8)
+ bounds: 520 464 8 8
+ - image: solid-color(66, 58, 0, 255, 8, 8)
+ bounds: 528 464 8 8
+ - image: solid-color(67, 58, 0, 255, 8, 8)
+ bounds: 536 464 8 8
+ - image: solid-color(68, 58, 0, 255, 8, 8)
+ bounds: 544 464 8 8
+ - image: solid-color(69, 58, 0, 255, 8, 8)
+ bounds: 552 464 8 8
+ - image: solid-color(70, 58, 0, 255, 8, 8)
+ bounds: 560 464 8 8
+ - image: solid-color(71, 58, 0, 255, 8, 8)
+ bounds: 568 464 8 8
+ - image: solid-color(72, 58, 0, 255, 8, 8)
+ bounds: 576 464 8 8
+ - image: solid-color(73, 58, 0, 255, 8, 8)
+ bounds: 584 464 8 8
+ - image: solid-color(74, 58, 0, 255, 8, 8)
+ bounds: 592 464 8 8
+ - image: solid-color(75, 58, 0, 255, 8, 8)
+ bounds: 600 464 8 8
+ - image: solid-color(76, 58, 0, 255, 8, 8)
+ bounds: 608 464 8 8
+ - image: solid-color(77, 58, 0, 255, 8, 8)
+ bounds: 616 464 8 8
+ - image: solid-color(78, 58, 0, 255, 8, 8)
+ bounds: 624 464 8 8
+ - image: solid-color(79, 58, 0, 255, 8, 8)
+ bounds: 632 464 8 8
+ - image: solid-color(80, 58, 0, 255, 8, 8)
+ bounds: 640 464 8 8
+ - image: solid-color(81, 58, 0, 255, 8, 8)
+ bounds: 648 464 8 8
+ - image: solid-color(82, 58, 0, 255, 8, 8)
+ bounds: 656 464 8 8
+ - image: solid-color(83, 58, 0, 255, 8, 8)
+ bounds: 664 464 8 8
+ - image: solid-color(84, 58, 0, 255, 8, 8)
+ bounds: 672 464 8 8
+ - image: solid-color(85, 58, 0, 255, 8, 8)
+ bounds: 680 464 8 8
+ - image: solid-color(86, 58, 0, 255, 8, 8)
+ bounds: 688 464 8 8
+ - image: solid-color(87, 58, 0, 255, 8, 8)
+ bounds: 696 464 8 8
+ - image: solid-color(88, 58, 0, 255, 8, 8)
+ bounds: 704 464 8 8
+ - image: solid-color(89, 58, 0, 255, 8, 8)
+ bounds: 712 464 8 8
+ - image: solid-color(90, 58, 0, 255, 8, 8)
+ bounds: 720 464 8 8
+ - image: solid-color(91, 58, 0, 255, 8, 8)
+ bounds: 728 464 8 8
+ - image: solid-color(92, 58, 0, 255, 8, 8)
+ bounds: 736 464 8 8
+ - image: solid-color(93, 58, 0, 255, 8, 8)
+ bounds: 744 464 8 8
+ - image: solid-color(94, 58, 0, 255, 8, 8)
+ bounds: 752 464 8 8
+ - image: solid-color(95, 58, 0, 255, 8, 8)
+ bounds: 760 464 8 8
+ - image: solid-color(96, 58, 0, 255, 8, 8)
+ bounds: 768 464 8 8
+ - image: solid-color(97, 58, 0, 255, 8, 8)
+ bounds: 776 464 8 8
+ - image: solid-color(98, 58, 0, 255, 8, 8)
+ bounds: 784 464 8 8
+ - image: solid-color(99, 58, 0, 255, 8, 8)
+ bounds: 792 464 8 8
+ - image: solid-color(100, 58, 0, 255, 8, 8)
+ bounds: 800 464 8 8
+ - image: solid-color(101, 58, 0, 255, 8, 8)
+ bounds: 808 464 8 8
+ - image: solid-color(102, 58, 0, 255, 8, 8)
+ bounds: 816 464 8 8
+ - image: solid-color(103, 58, 0, 255, 8, 8)
+ bounds: 824 464 8 8
+ - image: solid-color(104, 58, 0, 255, 8, 8)
+ bounds: 832 464 8 8
+ - image: solid-color(105, 58, 0, 255, 8, 8)
+ bounds: 840 464 8 8
+ - image: solid-color(106, 58, 0, 255, 8, 8)
+ bounds: 848 464 8 8
+ - image: solid-color(107, 58, 0, 255, 8, 8)
+ bounds: 856 464 8 8
+ - image: solid-color(108, 58, 0, 255, 8, 8)
+ bounds: 864 464 8 8
+ - image: solid-color(109, 58, 0, 255, 8, 8)
+ bounds: 872 464 8 8
+ - image: solid-color(110, 58, 0, 255, 8, 8)
+ bounds: 880 464 8 8
+ - image: solid-color(111, 58, 0, 255, 8, 8)
+ bounds: 888 464 8 8
+ - image: solid-color(112, 58, 0, 255, 8, 8)
+ bounds: 896 464 8 8
+ - image: solid-color(113, 58, 0, 255, 8, 8)
+ bounds: 904 464 8 8
+ - image: solid-color(114, 58, 0, 255, 8, 8)
+ bounds: 912 464 8 8
+ - image: solid-color(115, 58, 0, 255, 8, 8)
+ bounds: 920 464 8 8
+ - image: solid-color(116, 58, 0, 255, 8, 8)
+ bounds: 928 464 8 8
+ - image: solid-color(117, 58, 0, 255, 8, 8)
+ bounds: 936 464 8 8
+ - image: solid-color(118, 58, 0, 255, 8, 8)
+ bounds: 944 464 8 8
+ - image: solid-color(119, 58, 0, 255, 8, 8)
+ bounds: 952 464 8 8
+ - image: solid-color(120, 58, 0, 255, 8, 8)
+ bounds: 960 464 8 8
+ - image: solid-color(121, 58, 0, 255, 8, 8)
+ bounds: 968 464 8 8
+ - image: solid-color(122, 58, 0, 255, 8, 8)
+ bounds: 976 464 8 8
+ - image: solid-color(123, 58, 0, 255, 8, 8)
+ bounds: 984 464 8 8
+ - image: solid-color(124, 58, 0, 255, 8, 8)
+ bounds: 992 464 8 8
+ - image: solid-color(125, 58, 0, 255, 8, 8)
+ bounds: 1000 464 8 8
+ - image: solid-color(126, 58, 0, 255, 8, 8)
+ bounds: 1008 464 8 8
+ - image: solid-color(127, 58, 0, 255, 8, 8)
+ bounds: 1016 464 8 8
+ - image: solid-color(0, 59, 0, 255, 8, 8)
+ bounds: 0 472 8 8
+ - image: solid-color(1, 59, 0, 255, 8, 8)
+ bounds: 8 472 8 8
+ - image: solid-color(2, 59, 0, 255, 8, 8)
+ bounds: 16 472 8 8
+ - image: solid-color(3, 59, 0, 255, 8, 8)
+ bounds: 24 472 8 8
+ - image: solid-color(4, 59, 0, 255, 8, 8)
+ bounds: 32 472 8 8
+ - image: solid-color(5, 59, 0, 255, 8, 8)
+ bounds: 40 472 8 8
+ - image: solid-color(6, 59, 0, 255, 8, 8)
+ bounds: 48 472 8 8
+ - image: solid-color(7, 59, 0, 255, 8, 8)
+ bounds: 56 472 8 8
+ - image: solid-color(8, 59, 0, 255, 8, 8)
+ bounds: 64 472 8 8
+ - image: solid-color(9, 59, 0, 255, 8, 8)
+ bounds: 72 472 8 8
+ - image: solid-color(10, 59, 0, 255, 8, 8)
+ bounds: 80 472 8 8
+ - image: solid-color(11, 59, 0, 255, 8, 8)
+ bounds: 88 472 8 8
+ - image: solid-color(12, 59, 0, 255, 8, 8)
+ bounds: 96 472 8 8
+ - image: solid-color(13, 59, 0, 255, 8, 8)
+ bounds: 104 472 8 8
+ - image: solid-color(14, 59, 0, 255, 8, 8)
+ bounds: 112 472 8 8
+ - image: solid-color(15, 59, 0, 255, 8, 8)
+ bounds: 120 472 8 8
+ - image: solid-color(16, 59, 0, 255, 8, 8)
+ bounds: 128 472 8 8
+ - image: solid-color(17, 59, 0, 255, 8, 8)
+ bounds: 136 472 8 8
+ - image: solid-color(18, 59, 0, 255, 8, 8)
+ bounds: 144 472 8 8
+ - image: solid-color(19, 59, 0, 255, 8, 8)
+ bounds: 152 472 8 8
+ - image: solid-color(20, 59, 0, 255, 8, 8)
+ bounds: 160 472 8 8
+ - image: solid-color(21, 59, 0, 255, 8, 8)
+ bounds: 168 472 8 8
+ - image: solid-color(22, 59, 0, 255, 8, 8)
+ bounds: 176 472 8 8
+ - image: solid-color(23, 59, 0, 255, 8, 8)
+ bounds: 184 472 8 8
+ - image: solid-color(24, 59, 0, 255, 8, 8)
+ bounds: 192 472 8 8
+ - image: solid-color(25, 59, 0, 255, 8, 8)
+ bounds: 200 472 8 8
+ - image: solid-color(26, 59, 0, 255, 8, 8)
+ bounds: 208 472 8 8
+ - image: solid-color(27, 59, 0, 255, 8, 8)
+ bounds: 216 472 8 8
+ - image: solid-color(28, 59, 0, 255, 8, 8)
+ bounds: 224 472 8 8
+ - image: solid-color(29, 59, 0, 255, 8, 8)
+ bounds: 232 472 8 8
+ - image: solid-color(30, 59, 0, 255, 8, 8)
+ bounds: 240 472 8 8
+ - image: solid-color(31, 59, 0, 255, 8, 8)
+ bounds: 248 472 8 8
+ - image: solid-color(32, 59, 0, 255, 8, 8)
+ bounds: 256 472 8 8
+ - image: solid-color(33, 59, 0, 255, 8, 8)
+ bounds: 264 472 8 8
+ - image: solid-color(34, 59, 0, 255, 8, 8)
+ bounds: 272 472 8 8
+ - image: solid-color(35, 59, 0, 255, 8, 8)
+ bounds: 280 472 8 8
+ - image: solid-color(36, 59, 0, 255, 8, 8)
+ bounds: 288 472 8 8
+ - image: solid-color(37, 59, 0, 255, 8, 8)
+ bounds: 296 472 8 8
+ - image: solid-color(38, 59, 0, 255, 8, 8)
+ bounds: 304 472 8 8
+ - image: solid-color(39, 59, 0, 255, 8, 8)
+ bounds: 312 472 8 8
+ - image: solid-color(40, 59, 0, 255, 8, 8)
+ bounds: 320 472 8 8
+ - image: solid-color(41, 59, 0, 255, 8, 8)
+ bounds: 328 472 8 8
+ - image: solid-color(42, 59, 0, 255, 8, 8)
+ bounds: 336 472 8 8
+ - image: solid-color(43, 59, 0, 255, 8, 8)
+ bounds: 344 472 8 8
+ - image: solid-color(44, 59, 0, 255, 8, 8)
+ bounds: 352 472 8 8
+ - image: solid-color(45, 59, 0, 255, 8, 8)
+ bounds: 360 472 8 8
+ - image: solid-color(46, 59, 0, 255, 8, 8)
+ bounds: 368 472 8 8
+ - image: solid-color(47, 59, 0, 255, 8, 8)
+ bounds: 376 472 8 8
+ - image: solid-color(48, 59, 0, 255, 8, 8)
+ bounds: 384 472 8 8
+ - image: solid-color(49, 59, 0, 255, 8, 8)
+ bounds: 392 472 8 8
+ - image: solid-color(50, 59, 0, 255, 8, 8)
+ bounds: 400 472 8 8
+ - image: solid-color(51, 59, 0, 255, 8, 8)
+ bounds: 408 472 8 8
+ - image: solid-color(52, 59, 0, 255, 8, 8)
+ bounds: 416 472 8 8
+ - image: solid-color(53, 59, 0, 255, 8, 8)
+ bounds: 424 472 8 8
+ - image: solid-color(54, 59, 0, 255, 8, 8)
+ bounds: 432 472 8 8
+ - image: solid-color(55, 59, 0, 255, 8, 8)
+ bounds: 440 472 8 8
+ - image: solid-color(56, 59, 0, 255, 8, 8)
+ bounds: 448 472 8 8
+ - image: solid-color(57, 59, 0, 255, 8, 8)
+ bounds: 456 472 8 8
+ - image: solid-color(58, 59, 0, 255, 8, 8)
+ bounds: 464 472 8 8
+ - image: solid-color(59, 59, 0, 255, 8, 8)
+ bounds: 472 472 8 8
+ - image: solid-color(60, 59, 0, 255, 8, 8)
+ bounds: 480 472 8 8
+ - image: solid-color(61, 59, 0, 255, 8, 8)
+ bounds: 488 472 8 8
+ - image: solid-color(62, 59, 0, 255, 8, 8)
+ bounds: 496 472 8 8
+ - image: solid-color(63, 59, 0, 255, 8, 8)
+ bounds: 504 472 8 8
+ - image: solid-color(64, 59, 0, 255, 8, 8)
+ bounds: 512 472 8 8
+ - image: solid-color(65, 59, 0, 255, 8, 8)
+ bounds: 520 472 8 8
+ - image: solid-color(66, 59, 0, 255, 8, 8)
+ bounds: 528 472 8 8
+ - image: solid-color(67, 59, 0, 255, 8, 8)
+ bounds: 536 472 8 8
+ - image: solid-color(68, 59, 0, 255, 8, 8)
+ bounds: 544 472 8 8
+ - image: solid-color(69, 59, 0, 255, 8, 8)
+ bounds: 552 472 8 8
+ - image: solid-color(70, 59, 0, 255, 8, 8)
+ bounds: 560 472 8 8
+ - image: solid-color(71, 59, 0, 255, 8, 8)
+ bounds: 568 472 8 8
+ - image: solid-color(72, 59, 0, 255, 8, 8)
+ bounds: 576 472 8 8
+ - image: solid-color(73, 59, 0, 255, 8, 8)
+ bounds: 584 472 8 8
+ - image: solid-color(74, 59, 0, 255, 8, 8)
+ bounds: 592 472 8 8
+ - image: solid-color(75, 59, 0, 255, 8, 8)
+ bounds: 600 472 8 8
+ - image: solid-color(76, 59, 0, 255, 8, 8)
+ bounds: 608 472 8 8
+ - image: solid-color(77, 59, 0, 255, 8, 8)
+ bounds: 616 472 8 8
+ - image: solid-color(78, 59, 0, 255, 8, 8)
+ bounds: 624 472 8 8
+ - image: solid-color(79, 59, 0, 255, 8, 8)
+ bounds: 632 472 8 8
+ - image: solid-color(80, 59, 0, 255, 8, 8)
+ bounds: 640 472 8 8
+ - image: solid-color(81, 59, 0, 255, 8, 8)
+ bounds: 648 472 8 8
+ - image: solid-color(82, 59, 0, 255, 8, 8)
+ bounds: 656 472 8 8
+ - image: solid-color(83, 59, 0, 255, 8, 8)
+ bounds: 664 472 8 8
+ - image: solid-color(84, 59, 0, 255, 8, 8)
+ bounds: 672 472 8 8
+ - image: solid-color(85, 59, 0, 255, 8, 8)
+ bounds: 680 472 8 8
+ - image: solid-color(86, 59, 0, 255, 8, 8)
+ bounds: 688 472 8 8
+ - image: solid-color(87, 59, 0, 255, 8, 8)
+ bounds: 696 472 8 8
+ - image: solid-color(88, 59, 0, 255, 8, 8)
+ bounds: 704 472 8 8
+ - image: solid-color(89, 59, 0, 255, 8, 8)
+ bounds: 712 472 8 8
+ - image: solid-color(90, 59, 0, 255, 8, 8)
+ bounds: 720 472 8 8
+ - image: solid-color(91, 59, 0, 255, 8, 8)
+ bounds: 728 472 8 8
+ - image: solid-color(92, 59, 0, 255, 8, 8)
+ bounds: 736 472 8 8
+ - image: solid-color(93, 59, 0, 255, 8, 8)
+ bounds: 744 472 8 8
+ - image: solid-color(94, 59, 0, 255, 8, 8)
+ bounds: 752 472 8 8
+ - image: solid-color(95, 59, 0, 255, 8, 8)
+ bounds: 760 472 8 8
+ - image: solid-color(96, 59, 0, 255, 8, 8)
+ bounds: 768 472 8 8
+ - image: solid-color(97, 59, 0, 255, 8, 8)
+ bounds: 776 472 8 8
+ - image: solid-color(98, 59, 0, 255, 8, 8)
+ bounds: 784 472 8 8
+ - image: solid-color(99, 59, 0, 255, 8, 8)
+ bounds: 792 472 8 8
+ - image: solid-color(100, 59, 0, 255, 8, 8)
+ bounds: 800 472 8 8
+ - image: solid-color(101, 59, 0, 255, 8, 8)
+ bounds: 808 472 8 8
+ - image: solid-color(102, 59, 0, 255, 8, 8)
+ bounds: 816 472 8 8
+ - image: solid-color(103, 59, 0, 255, 8, 8)
+ bounds: 824 472 8 8
+ - image: solid-color(104, 59, 0, 255, 8, 8)
+ bounds: 832 472 8 8
+ - image: solid-color(105, 59, 0, 255, 8, 8)
+ bounds: 840 472 8 8
+ - image: solid-color(106, 59, 0, 255, 8, 8)
+ bounds: 848 472 8 8
+ - image: solid-color(107, 59, 0, 255, 8, 8)
+ bounds: 856 472 8 8
+ - image: solid-color(108, 59, 0, 255, 8, 8)
+ bounds: 864 472 8 8
+ - image: solid-color(109, 59, 0, 255, 8, 8)
+ bounds: 872 472 8 8
+ - image: solid-color(110, 59, 0, 255, 8, 8)
+ bounds: 880 472 8 8
+ - image: solid-color(111, 59, 0, 255, 8, 8)
+ bounds: 888 472 8 8
+ - image: solid-color(112, 59, 0, 255, 8, 8)
+ bounds: 896 472 8 8
+ - image: solid-color(113, 59, 0, 255, 8, 8)
+ bounds: 904 472 8 8
+ - image: solid-color(114, 59, 0, 255, 8, 8)
+ bounds: 912 472 8 8
+ - image: solid-color(115, 59, 0, 255, 8, 8)
+ bounds: 920 472 8 8
+ - image: solid-color(116, 59, 0, 255, 8, 8)
+ bounds: 928 472 8 8
+ - image: solid-color(117, 59, 0, 255, 8, 8)
+ bounds: 936 472 8 8
+ - image: solid-color(118, 59, 0, 255, 8, 8)
+ bounds: 944 472 8 8
+ - image: solid-color(119, 59, 0, 255, 8, 8)
+ bounds: 952 472 8 8
+ - image: solid-color(120, 59, 0, 255, 8, 8)
+ bounds: 960 472 8 8
+ - image: solid-color(121, 59, 0, 255, 8, 8)
+ bounds: 968 472 8 8
+ - image: solid-color(122, 59, 0, 255, 8, 8)
+ bounds: 976 472 8 8
+ - image: solid-color(123, 59, 0, 255, 8, 8)
+ bounds: 984 472 8 8
+ - image: solid-color(124, 59, 0, 255, 8, 8)
+ bounds: 992 472 8 8
+ - image: solid-color(125, 59, 0, 255, 8, 8)
+ bounds: 1000 472 8 8
+ - image: solid-color(126, 59, 0, 255, 8, 8)
+ bounds: 1008 472 8 8
+ - image: solid-color(127, 59, 0, 255, 8, 8)
+ bounds: 1016 472 8 8
+ - image: solid-color(0, 60, 0, 255, 8, 8)
+ bounds: 0 480 8 8
+ - image: solid-color(1, 60, 0, 255, 8, 8)
+ bounds: 8 480 8 8
+ - image: solid-color(2, 60, 0, 255, 8, 8)
+ bounds: 16 480 8 8
+ - image: solid-color(3, 60, 0, 255, 8, 8)
+ bounds: 24 480 8 8
+ - image: solid-color(4, 60, 0, 255, 8, 8)
+ bounds: 32 480 8 8
+ - image: solid-color(5, 60, 0, 255, 8, 8)
+ bounds: 40 480 8 8
+ - image: solid-color(6, 60, 0, 255, 8, 8)
+ bounds: 48 480 8 8
+ - image: solid-color(7, 60, 0, 255, 8, 8)
+ bounds: 56 480 8 8
+ - image: solid-color(8, 60, 0, 255, 8, 8)
+ bounds: 64 480 8 8
+ - image: solid-color(9, 60, 0, 255, 8, 8)
+ bounds: 72 480 8 8
+ - image: solid-color(10, 60, 0, 255, 8, 8)
+ bounds: 80 480 8 8
+ - image: solid-color(11, 60, 0, 255, 8, 8)
+ bounds: 88 480 8 8
+ - image: solid-color(12, 60, 0, 255, 8, 8)
+ bounds: 96 480 8 8
+ - image: solid-color(13, 60, 0, 255, 8, 8)
+ bounds: 104 480 8 8
+ - image: solid-color(14, 60, 0, 255, 8, 8)
+ bounds: 112 480 8 8
+ - image: solid-color(15, 60, 0, 255, 8, 8)
+ bounds: 120 480 8 8
+ - image: solid-color(16, 60, 0, 255, 8, 8)
+ bounds: 128 480 8 8
+ - image: solid-color(17, 60, 0, 255, 8, 8)
+ bounds: 136 480 8 8
+ - image: solid-color(18, 60, 0, 255, 8, 8)
+ bounds: 144 480 8 8
+ - image: solid-color(19, 60, 0, 255, 8, 8)
+ bounds: 152 480 8 8
+ - image: solid-color(20, 60, 0, 255, 8, 8)
+ bounds: 160 480 8 8
+ - image: solid-color(21, 60, 0, 255, 8, 8)
+ bounds: 168 480 8 8
+ - image: solid-color(22, 60, 0, 255, 8, 8)
+ bounds: 176 480 8 8
+ - image: solid-color(23, 60, 0, 255, 8, 8)
+ bounds: 184 480 8 8
+ - image: solid-color(24, 60, 0, 255, 8, 8)
+ bounds: 192 480 8 8
+ - image: solid-color(25, 60, 0, 255, 8, 8)
+ bounds: 200 480 8 8
+ - image: solid-color(26, 60, 0, 255, 8, 8)
+ bounds: 208 480 8 8
+ - image: solid-color(27, 60, 0, 255, 8, 8)
+ bounds: 216 480 8 8
+ - image: solid-color(28, 60, 0, 255, 8, 8)
+ bounds: 224 480 8 8
+ - image: solid-color(29, 60, 0, 255, 8, 8)
+ bounds: 232 480 8 8
+ - image: solid-color(30, 60, 0, 255, 8, 8)
+ bounds: 240 480 8 8
+ - image: solid-color(31, 60, 0, 255, 8, 8)
+ bounds: 248 480 8 8
+ - image: solid-color(32, 60, 0, 255, 8, 8)
+ bounds: 256 480 8 8
+ - image: solid-color(33, 60, 0, 255, 8, 8)
+ bounds: 264 480 8 8
+ - image: solid-color(34, 60, 0, 255, 8, 8)
+ bounds: 272 480 8 8
+ - image: solid-color(35, 60, 0, 255, 8, 8)
+ bounds: 280 480 8 8
+ - image: solid-color(36, 60, 0, 255, 8, 8)
+ bounds: 288 480 8 8
+ - image: solid-color(37, 60, 0, 255, 8, 8)
+ bounds: 296 480 8 8
+ - image: solid-color(38, 60, 0, 255, 8, 8)
+ bounds: 304 480 8 8
+ - image: solid-color(39, 60, 0, 255, 8, 8)
+ bounds: 312 480 8 8
+ - image: solid-color(40, 60, 0, 255, 8, 8)
+ bounds: 320 480 8 8
+ - image: solid-color(41, 60, 0, 255, 8, 8)
+ bounds: 328 480 8 8
+ - image: solid-color(42, 60, 0, 255, 8, 8)
+ bounds: 336 480 8 8
+ - image: solid-color(43, 60, 0, 255, 8, 8)
+ bounds: 344 480 8 8
+ - image: solid-color(44, 60, 0, 255, 8, 8)
+ bounds: 352 480 8 8
+ - image: solid-color(45, 60, 0, 255, 8, 8)
+ bounds: 360 480 8 8
+ - image: solid-color(46, 60, 0, 255, 8, 8)
+ bounds: 368 480 8 8
+ - image: solid-color(47, 60, 0, 255, 8, 8)
+ bounds: 376 480 8 8
+ - image: solid-color(48, 60, 0, 255, 8, 8)
+ bounds: 384 480 8 8
+ - image: solid-color(49, 60, 0, 255, 8, 8)
+ bounds: 392 480 8 8
+ - image: solid-color(50, 60, 0, 255, 8, 8)
+ bounds: 400 480 8 8
+ - image: solid-color(51, 60, 0, 255, 8, 8)
+ bounds: 408 480 8 8
+ - image: solid-color(52, 60, 0, 255, 8, 8)
+ bounds: 416 480 8 8
+ - image: solid-color(53, 60, 0, 255, 8, 8)
+ bounds: 424 480 8 8
+ - image: solid-color(54, 60, 0, 255, 8, 8)
+ bounds: 432 480 8 8
+ - image: solid-color(55, 60, 0, 255, 8, 8)
+ bounds: 440 480 8 8
+ - image: solid-color(56, 60, 0, 255, 8, 8)
+ bounds: 448 480 8 8
+ - image: solid-color(57, 60, 0, 255, 8, 8)
+ bounds: 456 480 8 8
+ - image: solid-color(58, 60, 0, 255, 8, 8)
+ bounds: 464 480 8 8
+ - image: solid-color(59, 60, 0, 255, 8, 8)
+ bounds: 472 480 8 8
+ - image: solid-color(60, 60, 0, 255, 8, 8)
+ bounds: 480 480 8 8
+ - image: solid-color(61, 60, 0, 255, 8, 8)
+ bounds: 488 480 8 8
+ - image: solid-color(62, 60, 0, 255, 8, 8)
+ bounds: 496 480 8 8
+ - image: solid-color(63, 60, 0, 255, 8, 8)
+ bounds: 504 480 8 8
+ - image: solid-color(64, 60, 0, 255, 8, 8)
+ bounds: 512 480 8 8
+ - image: solid-color(65, 60, 0, 255, 8, 8)
+ bounds: 520 480 8 8
+ - image: solid-color(66, 60, 0, 255, 8, 8)
+ bounds: 528 480 8 8
+ - image: solid-color(67, 60, 0, 255, 8, 8)
+ bounds: 536 480 8 8
+ - image: solid-color(68, 60, 0, 255, 8, 8)
+ bounds: 544 480 8 8
+ - image: solid-color(69, 60, 0, 255, 8, 8)
+ bounds: 552 480 8 8
+ - image: solid-color(70, 60, 0, 255, 8, 8)
+ bounds: 560 480 8 8
+ - image: solid-color(71, 60, 0, 255, 8, 8)
+ bounds: 568 480 8 8
+ - image: solid-color(72, 60, 0, 255, 8, 8)
+ bounds: 576 480 8 8
+ - image: solid-color(73, 60, 0, 255, 8, 8)
+ bounds: 584 480 8 8
+ - image: solid-color(74, 60, 0, 255, 8, 8)
+ bounds: 592 480 8 8
+ - image: solid-color(75, 60, 0, 255, 8, 8)
+ bounds: 600 480 8 8
+ - image: solid-color(76, 60, 0, 255, 8, 8)
+ bounds: 608 480 8 8
+ - image: solid-color(77, 60, 0, 255, 8, 8)
+ bounds: 616 480 8 8
+ - image: solid-color(78, 60, 0, 255, 8, 8)
+ bounds: 624 480 8 8
+ - image: solid-color(79, 60, 0, 255, 8, 8)
+ bounds: 632 480 8 8
+ - image: solid-color(80, 60, 0, 255, 8, 8)
+ bounds: 640 480 8 8
+ - image: solid-color(81, 60, 0, 255, 8, 8)
+ bounds: 648 480 8 8
+ - image: solid-color(82, 60, 0, 255, 8, 8)
+ bounds: 656 480 8 8
+ - image: solid-color(83, 60, 0, 255, 8, 8)
+ bounds: 664 480 8 8
+ - image: solid-color(84, 60, 0, 255, 8, 8)
+ bounds: 672 480 8 8
+ - image: solid-color(85, 60, 0, 255, 8, 8)
+ bounds: 680 480 8 8
+ - image: solid-color(86, 60, 0, 255, 8, 8)
+ bounds: 688 480 8 8
+ - image: solid-color(87, 60, 0, 255, 8, 8)
+ bounds: 696 480 8 8
+ - image: solid-color(88, 60, 0, 255, 8, 8)
+ bounds: 704 480 8 8
+ - image: solid-color(89, 60, 0, 255, 8, 8)
+ bounds: 712 480 8 8
+ - image: solid-color(90, 60, 0, 255, 8, 8)
+ bounds: 720 480 8 8
+ - image: solid-color(91, 60, 0, 255, 8, 8)
+ bounds: 728 480 8 8
+ - image: solid-color(92, 60, 0, 255, 8, 8)
+ bounds: 736 480 8 8
+ - image: solid-color(93, 60, 0, 255, 8, 8)
+ bounds: 744 480 8 8
+ - image: solid-color(94, 60, 0, 255, 8, 8)
+ bounds: 752 480 8 8
+ - image: solid-color(95, 60, 0, 255, 8, 8)
+ bounds: 760 480 8 8
+ - image: solid-color(96, 60, 0, 255, 8, 8)
+ bounds: 768 480 8 8
+ - image: solid-color(97, 60, 0, 255, 8, 8)
+ bounds: 776 480 8 8
+ - image: solid-color(98, 60, 0, 255, 8, 8)
+ bounds: 784 480 8 8
+ - image: solid-color(99, 60, 0, 255, 8, 8)
+ bounds: 792 480 8 8
+ - image: solid-color(100, 60, 0, 255, 8, 8)
+ bounds: 800 480 8 8
+ - image: solid-color(101, 60, 0, 255, 8, 8)
+ bounds: 808 480 8 8
+ - image: solid-color(102, 60, 0, 255, 8, 8)
+ bounds: 816 480 8 8
+ - image: solid-color(103, 60, 0, 255, 8, 8)
+ bounds: 824 480 8 8
+ - image: solid-color(104, 60, 0, 255, 8, 8)
+ bounds: 832 480 8 8
+ - image: solid-color(105, 60, 0, 255, 8, 8)
+ bounds: 840 480 8 8
+ - image: solid-color(106, 60, 0, 255, 8, 8)
+ bounds: 848 480 8 8
+ - image: solid-color(107, 60, 0, 255, 8, 8)
+ bounds: 856 480 8 8
+ - image: solid-color(108, 60, 0, 255, 8, 8)
+ bounds: 864 480 8 8
+ - image: solid-color(109, 60, 0, 255, 8, 8)
+ bounds: 872 480 8 8
+ - image: solid-color(110, 60, 0, 255, 8, 8)
+ bounds: 880 480 8 8
+ - image: solid-color(111, 60, 0, 255, 8, 8)
+ bounds: 888 480 8 8
+ - image: solid-color(112, 60, 0, 255, 8, 8)
+ bounds: 896 480 8 8
+ - image: solid-color(113, 60, 0, 255, 8, 8)
+ bounds: 904 480 8 8
+ - image: solid-color(114, 60, 0, 255, 8, 8)
+ bounds: 912 480 8 8
+ - image: solid-color(115, 60, 0, 255, 8, 8)
+ bounds: 920 480 8 8
+ - image: solid-color(116, 60, 0, 255, 8, 8)
+ bounds: 928 480 8 8
+ - image: solid-color(117, 60, 0, 255, 8, 8)
+ bounds: 936 480 8 8
+ - image: solid-color(118, 60, 0, 255, 8, 8)
+ bounds: 944 480 8 8
+ - image: solid-color(119, 60, 0, 255, 8, 8)
+ bounds: 952 480 8 8
+ - image: solid-color(120, 60, 0, 255, 8, 8)
+ bounds: 960 480 8 8
+ - image: solid-color(121, 60, 0, 255, 8, 8)
+ bounds: 968 480 8 8
+ - image: solid-color(122, 60, 0, 255, 8, 8)
+ bounds: 976 480 8 8
+ - image: solid-color(123, 60, 0, 255, 8, 8)
+ bounds: 984 480 8 8
+ - image: solid-color(124, 60, 0, 255, 8, 8)
+ bounds: 992 480 8 8
+ - image: solid-color(125, 60, 0, 255, 8, 8)
+ bounds: 1000 480 8 8
+ - image: solid-color(126, 60, 0, 255, 8, 8)
+ bounds: 1008 480 8 8
+ - image: solid-color(127, 60, 0, 255, 8, 8)
+ bounds: 1016 480 8 8
+ - image: solid-color(0, 61, 0, 255, 8, 8)
+ bounds: 0 488 8 8
+ - image: solid-color(1, 61, 0, 255, 8, 8)
+ bounds: 8 488 8 8
+ - image: solid-color(2, 61, 0, 255, 8, 8)
+ bounds: 16 488 8 8
+ - image: solid-color(3, 61, 0, 255, 8, 8)
+ bounds: 24 488 8 8
+ - image: solid-color(4, 61, 0, 255, 8, 8)
+ bounds: 32 488 8 8
+ - image: solid-color(5, 61, 0, 255, 8, 8)
+ bounds: 40 488 8 8
+ - image: solid-color(6, 61, 0, 255, 8, 8)
+ bounds: 48 488 8 8
+ - image: solid-color(7, 61, 0, 255, 8, 8)
+ bounds: 56 488 8 8
+ - image: solid-color(8, 61, 0, 255, 8, 8)
+ bounds: 64 488 8 8
+ - image: solid-color(9, 61, 0, 255, 8, 8)
+ bounds: 72 488 8 8
+ - image: solid-color(10, 61, 0, 255, 8, 8)
+ bounds: 80 488 8 8
+ - image: solid-color(11, 61, 0, 255, 8, 8)
+ bounds: 88 488 8 8
+ - image: solid-color(12, 61, 0, 255, 8, 8)
+ bounds: 96 488 8 8
+ - image: solid-color(13, 61, 0, 255, 8, 8)
+ bounds: 104 488 8 8
+ - image: solid-color(14, 61, 0, 255, 8, 8)
+ bounds: 112 488 8 8
+ - image: solid-color(15, 61, 0, 255, 8, 8)
+ bounds: 120 488 8 8
+ - image: solid-color(16, 61, 0, 255, 8, 8)
+ bounds: 128 488 8 8
+ - image: solid-color(17, 61, 0, 255, 8, 8)
+ bounds: 136 488 8 8
+ - image: solid-color(18, 61, 0, 255, 8, 8)
+ bounds: 144 488 8 8
+ - image: solid-color(19, 61, 0, 255, 8, 8)
+ bounds: 152 488 8 8
+ - image: solid-color(20, 61, 0, 255, 8, 8)
+ bounds: 160 488 8 8
+ - image: solid-color(21, 61, 0, 255, 8, 8)
+ bounds: 168 488 8 8
+ - image: solid-color(22, 61, 0, 255, 8, 8)
+ bounds: 176 488 8 8
+ - image: solid-color(23, 61, 0, 255, 8, 8)
+ bounds: 184 488 8 8
+ - image: solid-color(24, 61, 0, 255, 8, 8)
+ bounds: 192 488 8 8
+ - image: solid-color(25, 61, 0, 255, 8, 8)
+ bounds: 200 488 8 8
+ - image: solid-color(26, 61, 0, 255, 8, 8)
+ bounds: 208 488 8 8
+ - image: solid-color(27, 61, 0, 255, 8, 8)
+ bounds: 216 488 8 8
+ - image: solid-color(28, 61, 0, 255, 8, 8)
+ bounds: 224 488 8 8
+ - image: solid-color(29, 61, 0, 255, 8, 8)
+ bounds: 232 488 8 8
+ - image: solid-color(30, 61, 0, 255, 8, 8)
+ bounds: 240 488 8 8
+ - image: solid-color(31, 61, 0, 255, 8, 8)
+ bounds: 248 488 8 8
+ - image: solid-color(32, 61, 0, 255, 8, 8)
+ bounds: 256 488 8 8
+ - image: solid-color(33, 61, 0, 255, 8, 8)
+ bounds: 264 488 8 8
+ - image: solid-color(34, 61, 0, 255, 8, 8)
+ bounds: 272 488 8 8
+ - image: solid-color(35, 61, 0, 255, 8, 8)
+ bounds: 280 488 8 8
+ - image: solid-color(36, 61, 0, 255, 8, 8)
+ bounds: 288 488 8 8
+ - image: solid-color(37, 61, 0, 255, 8, 8)
+ bounds: 296 488 8 8
+ - image: solid-color(38, 61, 0, 255, 8, 8)
+ bounds: 304 488 8 8
+ - image: solid-color(39, 61, 0, 255, 8, 8)
+ bounds: 312 488 8 8
+ - image: solid-color(40, 61, 0, 255, 8, 8)
+ bounds: 320 488 8 8
+ - image: solid-color(41, 61, 0, 255, 8, 8)
+ bounds: 328 488 8 8
+ - image: solid-color(42, 61, 0, 255, 8, 8)
+ bounds: 336 488 8 8
+ - image: solid-color(43, 61, 0, 255, 8, 8)
+ bounds: 344 488 8 8
+ - image: solid-color(44, 61, 0, 255, 8, 8)
+ bounds: 352 488 8 8
+ - image: solid-color(45, 61, 0, 255, 8, 8)
+ bounds: 360 488 8 8
+ - image: solid-color(46, 61, 0, 255, 8, 8)
+ bounds: 368 488 8 8
+ - image: solid-color(47, 61, 0, 255, 8, 8)
+ bounds: 376 488 8 8
+ - image: solid-color(48, 61, 0, 255, 8, 8)
+ bounds: 384 488 8 8
+ - image: solid-color(49, 61, 0, 255, 8, 8)
+ bounds: 392 488 8 8
+ - image: solid-color(50, 61, 0, 255, 8, 8)
+ bounds: 400 488 8 8
+ - image: solid-color(51, 61, 0, 255, 8, 8)
+ bounds: 408 488 8 8
+ - image: solid-color(52, 61, 0, 255, 8, 8)
+ bounds: 416 488 8 8
+ - image: solid-color(53, 61, 0, 255, 8, 8)
+ bounds: 424 488 8 8
+ - image: solid-color(54, 61, 0, 255, 8, 8)
+ bounds: 432 488 8 8
+ - image: solid-color(55, 61, 0, 255, 8, 8)
+ bounds: 440 488 8 8
+ - image: solid-color(56, 61, 0, 255, 8, 8)
+ bounds: 448 488 8 8
+ - image: solid-color(57, 61, 0, 255, 8, 8)
+ bounds: 456 488 8 8
+ - image: solid-color(58, 61, 0, 255, 8, 8)
+ bounds: 464 488 8 8
+ - image: solid-color(59, 61, 0, 255, 8, 8)
+ bounds: 472 488 8 8
+ - image: solid-color(60, 61, 0, 255, 8, 8)
+ bounds: 480 488 8 8
+ - image: solid-color(61, 61, 0, 255, 8, 8)
+ bounds: 488 488 8 8
+ - image: solid-color(62, 61, 0, 255, 8, 8)
+ bounds: 496 488 8 8
+ - image: solid-color(63, 61, 0, 255, 8, 8)
+ bounds: 504 488 8 8
+ - image: solid-color(64, 61, 0, 255, 8, 8)
+ bounds: 512 488 8 8
+ - image: solid-color(65, 61, 0, 255, 8, 8)
+ bounds: 520 488 8 8
+ - image: solid-color(66, 61, 0, 255, 8, 8)
+ bounds: 528 488 8 8
+ - image: solid-color(67, 61, 0, 255, 8, 8)
+ bounds: 536 488 8 8
+ - image: solid-color(68, 61, 0, 255, 8, 8)
+ bounds: 544 488 8 8
+ - image: solid-color(69, 61, 0, 255, 8, 8)
+ bounds: 552 488 8 8
+ - image: solid-color(70, 61, 0, 255, 8, 8)
+ bounds: 560 488 8 8
+ - image: solid-color(71, 61, 0, 255, 8, 8)
+ bounds: 568 488 8 8
+ - image: solid-color(72, 61, 0, 255, 8, 8)
+ bounds: 576 488 8 8
+ - image: solid-color(73, 61, 0, 255, 8, 8)
+ bounds: 584 488 8 8
+ - image: solid-color(74, 61, 0, 255, 8, 8)
+ bounds: 592 488 8 8
+ - image: solid-color(75, 61, 0, 255, 8, 8)
+ bounds: 600 488 8 8
+ - image: solid-color(76, 61, 0, 255, 8, 8)
+ bounds: 608 488 8 8
+ - image: solid-color(77, 61, 0, 255, 8, 8)
+ bounds: 616 488 8 8
+ - image: solid-color(78, 61, 0, 255, 8, 8)
+ bounds: 624 488 8 8
+ - image: solid-color(79, 61, 0, 255, 8, 8)
+ bounds: 632 488 8 8
+ - image: solid-color(80, 61, 0, 255, 8, 8)
+ bounds: 640 488 8 8
+ - image: solid-color(81, 61, 0, 255, 8, 8)
+ bounds: 648 488 8 8
+ - image: solid-color(82, 61, 0, 255, 8, 8)
+ bounds: 656 488 8 8
+ - image: solid-color(83, 61, 0, 255, 8, 8)
+ bounds: 664 488 8 8
+ - image: solid-color(84, 61, 0, 255, 8, 8)
+ bounds: 672 488 8 8
+ - image: solid-color(85, 61, 0, 255, 8, 8)
+ bounds: 680 488 8 8
+ - image: solid-color(86, 61, 0, 255, 8, 8)
+ bounds: 688 488 8 8
+ - image: solid-color(87, 61, 0, 255, 8, 8)
+ bounds: 696 488 8 8
+ - image: solid-color(88, 61, 0, 255, 8, 8)
+ bounds: 704 488 8 8
+ - image: solid-color(89, 61, 0, 255, 8, 8)
+ bounds: 712 488 8 8
+ - image: solid-color(90, 61, 0, 255, 8, 8)
+ bounds: 720 488 8 8
+ - image: solid-color(91, 61, 0, 255, 8, 8)
+ bounds: 728 488 8 8
+ - image: solid-color(92, 61, 0, 255, 8, 8)
+ bounds: 736 488 8 8
+ - image: solid-color(93, 61, 0, 255, 8, 8)
+ bounds: 744 488 8 8
+ - image: solid-color(94, 61, 0, 255, 8, 8)
+ bounds: 752 488 8 8
+ - image: solid-color(95, 61, 0, 255, 8, 8)
+ bounds: 760 488 8 8
+ - image: solid-color(96, 61, 0, 255, 8, 8)
+ bounds: 768 488 8 8
+ - image: solid-color(97, 61, 0, 255, 8, 8)
+ bounds: 776 488 8 8
+ - image: solid-color(98, 61, 0, 255, 8, 8)
+ bounds: 784 488 8 8
+ - image: solid-color(99, 61, 0, 255, 8, 8)
+ bounds: 792 488 8 8
+ - image: solid-color(100, 61, 0, 255, 8, 8)
+ bounds: 800 488 8 8
+ - image: solid-color(101, 61, 0, 255, 8, 8)
+ bounds: 808 488 8 8
+ - image: solid-color(102, 61, 0, 255, 8, 8)
+ bounds: 816 488 8 8
+ - image: solid-color(103, 61, 0, 255, 8, 8)
+ bounds: 824 488 8 8
+ - image: solid-color(104, 61, 0, 255, 8, 8)
+ bounds: 832 488 8 8
+ - image: solid-color(105, 61, 0, 255, 8, 8)
+ bounds: 840 488 8 8
+ - image: solid-color(106, 61, 0, 255, 8, 8)
+ bounds: 848 488 8 8
+ - image: solid-color(107, 61, 0, 255, 8, 8)
+ bounds: 856 488 8 8
+ - image: solid-color(108, 61, 0, 255, 8, 8)
+ bounds: 864 488 8 8
+ - image: solid-color(109, 61, 0, 255, 8, 8)
+ bounds: 872 488 8 8
+ - image: solid-color(110, 61, 0, 255, 8, 8)
+ bounds: 880 488 8 8
+ - image: solid-color(111, 61, 0, 255, 8, 8)
+ bounds: 888 488 8 8
+ - image: solid-color(112, 61, 0, 255, 8, 8)
+ bounds: 896 488 8 8
+ - image: solid-color(113, 61, 0, 255, 8, 8)
+ bounds: 904 488 8 8
+ - image: solid-color(114, 61, 0, 255, 8, 8)
+ bounds: 912 488 8 8
+ - image: solid-color(115, 61, 0, 255, 8, 8)
+ bounds: 920 488 8 8
+ - image: solid-color(116, 61, 0, 255, 8, 8)
+ bounds: 928 488 8 8
+ - image: solid-color(117, 61, 0, 255, 8, 8)
+ bounds: 936 488 8 8
+ - image: solid-color(118, 61, 0, 255, 8, 8)
+ bounds: 944 488 8 8
+ - image: solid-color(119, 61, 0, 255, 8, 8)
+ bounds: 952 488 8 8
+ - image: solid-color(120, 61, 0, 255, 8, 8)
+ bounds: 960 488 8 8
+ - image: solid-color(121, 61, 0, 255, 8, 8)
+ bounds: 968 488 8 8
+ - image: solid-color(122, 61, 0, 255, 8, 8)
+ bounds: 976 488 8 8
+ - image: solid-color(123, 61, 0, 255, 8, 8)
+ bounds: 984 488 8 8
+ - image: solid-color(124, 61, 0, 255, 8, 8)
+ bounds: 992 488 8 8
+ - image: solid-color(125, 61, 0, 255, 8, 8)
+ bounds: 1000 488 8 8
+ - image: solid-color(126, 61, 0, 255, 8, 8)
+ bounds: 1008 488 8 8
+ - image: solid-color(127, 61, 0, 255, 8, 8)
+ bounds: 1016 488 8 8
+ - image: solid-color(0, 62, 0, 255, 8, 8)
+ bounds: 0 496 8 8
+ - image: solid-color(1, 62, 0, 255, 8, 8)
+ bounds: 8 496 8 8
+ - image: solid-color(2, 62, 0, 255, 8, 8)
+ bounds: 16 496 8 8
+ - image: solid-color(3, 62, 0, 255, 8, 8)
+ bounds: 24 496 8 8
+ - image: solid-color(4, 62, 0, 255, 8, 8)
+ bounds: 32 496 8 8
+ - image: solid-color(5, 62, 0, 255, 8, 8)
+ bounds: 40 496 8 8
+ - image: solid-color(6, 62, 0, 255, 8, 8)
+ bounds: 48 496 8 8
+ - image: solid-color(7, 62, 0, 255, 8, 8)
+ bounds: 56 496 8 8
+ - image: solid-color(8, 62, 0, 255, 8, 8)
+ bounds: 64 496 8 8
+ - image: solid-color(9, 62, 0, 255, 8, 8)
+ bounds: 72 496 8 8
+ - image: solid-color(10, 62, 0, 255, 8, 8)
+ bounds: 80 496 8 8
+ - image: solid-color(11, 62, 0, 255, 8, 8)
+ bounds: 88 496 8 8
+ - image: solid-color(12, 62, 0, 255, 8, 8)
+ bounds: 96 496 8 8
+ - image: solid-color(13, 62, 0, 255, 8, 8)
+ bounds: 104 496 8 8
+ - image: solid-color(14, 62, 0, 255, 8, 8)
+ bounds: 112 496 8 8
+ - image: solid-color(15, 62, 0, 255, 8, 8)
+ bounds: 120 496 8 8
+ - image: solid-color(16, 62, 0, 255, 8, 8)
+ bounds: 128 496 8 8
+ - image: solid-color(17, 62, 0, 255, 8, 8)
+ bounds: 136 496 8 8
+ - image: solid-color(18, 62, 0, 255, 8, 8)
+ bounds: 144 496 8 8
+ - image: solid-color(19, 62, 0, 255, 8, 8)
+ bounds: 152 496 8 8
+ - image: solid-color(20, 62, 0, 255, 8, 8)
+ bounds: 160 496 8 8
+ - image: solid-color(21, 62, 0, 255, 8, 8)
+ bounds: 168 496 8 8
+ - image: solid-color(22, 62, 0, 255, 8, 8)
+ bounds: 176 496 8 8
+ - image: solid-color(23, 62, 0, 255, 8, 8)
+ bounds: 184 496 8 8
+ - image: solid-color(24, 62, 0, 255, 8, 8)
+ bounds: 192 496 8 8
+ - image: solid-color(25, 62, 0, 255, 8, 8)
+ bounds: 200 496 8 8
+ - image: solid-color(26, 62, 0, 255, 8, 8)
+ bounds: 208 496 8 8
+ - image: solid-color(27, 62, 0, 255, 8, 8)
+ bounds: 216 496 8 8
+ - image: solid-color(28, 62, 0, 255, 8, 8)
+ bounds: 224 496 8 8
+ - image: solid-color(29, 62, 0, 255, 8, 8)
+ bounds: 232 496 8 8
+ - image: solid-color(30, 62, 0, 255, 8, 8)
+ bounds: 240 496 8 8
+ - image: solid-color(31, 62, 0, 255, 8, 8)
+ bounds: 248 496 8 8
+ - image: solid-color(32, 62, 0, 255, 8, 8)
+ bounds: 256 496 8 8
+ - image: solid-color(33, 62, 0, 255, 8, 8)
+ bounds: 264 496 8 8
+ - image: solid-color(34, 62, 0, 255, 8, 8)
+ bounds: 272 496 8 8
+ - image: solid-color(35, 62, 0, 255, 8, 8)
+ bounds: 280 496 8 8
+ - image: solid-color(36, 62, 0, 255, 8, 8)
+ bounds: 288 496 8 8
+ - image: solid-color(37, 62, 0, 255, 8, 8)
+ bounds: 296 496 8 8
+ - image: solid-color(38, 62, 0, 255, 8, 8)
+ bounds: 304 496 8 8
+ - image: solid-color(39, 62, 0, 255, 8, 8)
+ bounds: 312 496 8 8
+ - image: solid-color(40, 62, 0, 255, 8, 8)
+ bounds: 320 496 8 8
+ - image: solid-color(41, 62, 0, 255, 8, 8)
+ bounds: 328 496 8 8
+ - image: solid-color(42, 62, 0, 255, 8, 8)
+ bounds: 336 496 8 8
+ - image: solid-color(43, 62, 0, 255, 8, 8)
+ bounds: 344 496 8 8
+ - image: solid-color(44, 62, 0, 255, 8, 8)
+ bounds: 352 496 8 8
+ - image: solid-color(45, 62, 0, 255, 8, 8)
+ bounds: 360 496 8 8
+ - image: solid-color(46, 62, 0, 255, 8, 8)
+ bounds: 368 496 8 8
+ - image: solid-color(47, 62, 0, 255, 8, 8)
+ bounds: 376 496 8 8
+ - image: solid-color(48, 62, 0, 255, 8, 8)
+ bounds: 384 496 8 8
+ - image: solid-color(49, 62, 0, 255, 8, 8)
+ bounds: 392 496 8 8
+ - image: solid-color(50, 62, 0, 255, 8, 8)
+ bounds: 400 496 8 8
+ - image: solid-color(51, 62, 0, 255, 8, 8)
+ bounds: 408 496 8 8
+ - image: solid-color(52, 62, 0, 255, 8, 8)
+ bounds: 416 496 8 8
+ - image: solid-color(53, 62, 0, 255, 8, 8)
+ bounds: 424 496 8 8
+ - image: solid-color(54, 62, 0, 255, 8, 8)
+ bounds: 432 496 8 8
+ - image: solid-color(55, 62, 0, 255, 8, 8)
+ bounds: 440 496 8 8
+ - image: solid-color(56, 62, 0, 255, 8, 8)
+ bounds: 448 496 8 8
+ - image: solid-color(57, 62, 0, 255, 8, 8)
+ bounds: 456 496 8 8
+ - image: solid-color(58, 62, 0, 255, 8, 8)
+ bounds: 464 496 8 8
+ - image: solid-color(59, 62, 0, 255, 8, 8)
+ bounds: 472 496 8 8
+ - image: solid-color(60, 62, 0, 255, 8, 8)
+ bounds: 480 496 8 8
+ - image: solid-color(61, 62, 0, 255, 8, 8)
+ bounds: 488 496 8 8
+ - image: solid-color(62, 62, 0, 255, 8, 8)
+ bounds: 496 496 8 8
+ - image: solid-color(63, 62, 0, 255, 8, 8)
+ bounds: 504 496 8 8
+ - image: solid-color(64, 62, 0, 255, 8, 8)
+ bounds: 512 496 8 8
+ - image: solid-color(65, 62, 0, 255, 8, 8)
+ bounds: 520 496 8 8
+ - image: solid-color(66, 62, 0, 255, 8, 8)
+ bounds: 528 496 8 8
+ - image: solid-color(67, 62, 0, 255, 8, 8)
+ bounds: 536 496 8 8
+ - image: solid-color(68, 62, 0, 255, 8, 8)
+ bounds: 544 496 8 8
+ - image: solid-color(69, 62, 0, 255, 8, 8)
+ bounds: 552 496 8 8
+ - image: solid-color(70, 62, 0, 255, 8, 8)
+ bounds: 560 496 8 8
+ - image: solid-color(71, 62, 0, 255, 8, 8)
+ bounds: 568 496 8 8
+ - image: solid-color(72, 62, 0, 255, 8, 8)
+ bounds: 576 496 8 8
+ - image: solid-color(73, 62, 0, 255, 8, 8)
+ bounds: 584 496 8 8
+ - image: solid-color(74, 62, 0, 255, 8, 8)
+ bounds: 592 496 8 8
+ - image: solid-color(75, 62, 0, 255, 8, 8)
+ bounds: 600 496 8 8
+ - image: solid-color(76, 62, 0, 255, 8, 8)
+ bounds: 608 496 8 8
+ - image: solid-color(77, 62, 0, 255, 8, 8)
+ bounds: 616 496 8 8
+ - image: solid-color(78, 62, 0, 255, 8, 8)
+ bounds: 624 496 8 8
+ - image: solid-color(79, 62, 0, 255, 8, 8)
+ bounds: 632 496 8 8
+ - image: solid-color(80, 62, 0, 255, 8, 8)
+ bounds: 640 496 8 8
+ - image: solid-color(81, 62, 0, 255, 8, 8)
+ bounds: 648 496 8 8
+ - image: solid-color(82, 62, 0, 255, 8, 8)
+ bounds: 656 496 8 8
+ - image: solid-color(83, 62, 0, 255, 8, 8)
+ bounds: 664 496 8 8
+ - image: solid-color(84, 62, 0, 255, 8, 8)
+ bounds: 672 496 8 8
+ - image: solid-color(85, 62, 0, 255, 8, 8)
+ bounds: 680 496 8 8
+ - image: solid-color(86, 62, 0, 255, 8, 8)
+ bounds: 688 496 8 8
+ - image: solid-color(87, 62, 0, 255, 8, 8)
+ bounds: 696 496 8 8
+ - image: solid-color(88, 62, 0, 255, 8, 8)
+ bounds: 704 496 8 8
+ - image: solid-color(89, 62, 0, 255, 8, 8)
+ bounds: 712 496 8 8
+ - image: solid-color(90, 62, 0, 255, 8, 8)
+ bounds: 720 496 8 8
+ - image: solid-color(91, 62, 0, 255, 8, 8)
+ bounds: 728 496 8 8
+ - image: solid-color(92, 62, 0, 255, 8, 8)
+ bounds: 736 496 8 8
+ - image: solid-color(93, 62, 0, 255, 8, 8)
+ bounds: 744 496 8 8
+ - image: solid-color(94, 62, 0, 255, 8, 8)
+ bounds: 752 496 8 8
+ - image: solid-color(95, 62, 0, 255, 8, 8)
+ bounds: 760 496 8 8
+ - image: solid-color(96, 62, 0, 255, 8, 8)
+ bounds: 768 496 8 8
+ - image: solid-color(97, 62, 0, 255, 8, 8)
+ bounds: 776 496 8 8
+ - image: solid-color(98, 62, 0, 255, 8, 8)
+ bounds: 784 496 8 8
+ - image: solid-color(99, 62, 0, 255, 8, 8)
+ bounds: 792 496 8 8
+ - image: solid-color(100, 62, 0, 255, 8, 8)
+ bounds: 800 496 8 8
+ - image: solid-color(101, 62, 0, 255, 8, 8)
+ bounds: 808 496 8 8
+ - image: solid-color(102, 62, 0, 255, 8, 8)
+ bounds: 816 496 8 8
+ - image: solid-color(103, 62, 0, 255, 8, 8)
+ bounds: 824 496 8 8
+ - image: solid-color(104, 62, 0, 255, 8, 8)
+ bounds: 832 496 8 8
+ - image: solid-color(105, 62, 0, 255, 8, 8)
+ bounds: 840 496 8 8
+ - image: solid-color(106, 62, 0, 255, 8, 8)
+ bounds: 848 496 8 8
+ - image: solid-color(107, 62, 0, 255, 8, 8)
+ bounds: 856 496 8 8
+ - image: solid-color(108, 62, 0, 255, 8, 8)
+ bounds: 864 496 8 8
+ - image: solid-color(109, 62, 0, 255, 8, 8)
+ bounds: 872 496 8 8
+ - image: solid-color(110, 62, 0, 255, 8, 8)
+ bounds: 880 496 8 8
+ - image: solid-color(111, 62, 0, 255, 8, 8)
+ bounds: 888 496 8 8
+ - image: solid-color(112, 62, 0, 255, 8, 8)
+ bounds: 896 496 8 8
+ - image: solid-color(113, 62, 0, 255, 8, 8)
+ bounds: 904 496 8 8
+ - image: solid-color(114, 62, 0, 255, 8, 8)
+ bounds: 912 496 8 8
+ - image: solid-color(115, 62, 0, 255, 8, 8)
+ bounds: 920 496 8 8
+ - image: solid-color(116, 62, 0, 255, 8, 8)
+ bounds: 928 496 8 8
+ - image: solid-color(117, 62, 0, 255, 8, 8)
+ bounds: 936 496 8 8
+ - image: solid-color(118, 62, 0, 255, 8, 8)
+ bounds: 944 496 8 8
+ - image: solid-color(119, 62, 0, 255, 8, 8)
+ bounds: 952 496 8 8
+ - image: solid-color(120, 62, 0, 255, 8, 8)
+ bounds: 960 496 8 8
+ - image: solid-color(121, 62, 0, 255, 8, 8)
+ bounds: 968 496 8 8
+ - image: solid-color(122, 62, 0, 255, 8, 8)
+ bounds: 976 496 8 8
+ - image: solid-color(123, 62, 0, 255, 8, 8)
+ bounds: 984 496 8 8
+ - image: solid-color(124, 62, 0, 255, 8, 8)
+ bounds: 992 496 8 8
+ - image: solid-color(125, 62, 0, 255, 8, 8)
+ bounds: 1000 496 8 8
+ - image: solid-color(126, 62, 0, 255, 8, 8)
+ bounds: 1008 496 8 8
+ - image: solid-color(127, 62, 0, 255, 8, 8)
+ bounds: 1016 496 8 8
+ - image: solid-color(0, 63, 0, 255, 8, 8)
+ bounds: 0 504 8 8
+ - image: solid-color(1, 63, 0, 255, 8, 8)
+ bounds: 8 504 8 8
+ - image: solid-color(2, 63, 0, 255, 8, 8)
+ bounds: 16 504 8 8
+ - image: solid-color(3, 63, 0, 255, 8, 8)
+ bounds: 24 504 8 8
+ - image: solid-color(4, 63, 0, 255, 8, 8)
+ bounds: 32 504 8 8
+ - image: solid-color(5, 63, 0, 255, 8, 8)
+ bounds: 40 504 8 8
+ - image: solid-color(6, 63, 0, 255, 8, 8)
+ bounds: 48 504 8 8
+ - image: solid-color(7, 63, 0, 255, 8, 8)
+ bounds: 56 504 8 8
+ - image: solid-color(8, 63, 0, 255, 8, 8)
+ bounds: 64 504 8 8
+ - image: solid-color(9, 63, 0, 255, 8, 8)
+ bounds: 72 504 8 8
+ - image: solid-color(10, 63, 0, 255, 8, 8)
+ bounds: 80 504 8 8
+ - image: solid-color(11, 63, 0, 255, 8, 8)
+ bounds: 88 504 8 8
+ - image: solid-color(12, 63, 0, 255, 8, 8)
+ bounds: 96 504 8 8
+ - image: solid-color(13, 63, 0, 255, 8, 8)
+ bounds: 104 504 8 8
+ - image: solid-color(14, 63, 0, 255, 8, 8)
+ bounds: 112 504 8 8
+ - image: solid-color(15, 63, 0, 255, 8, 8)
+ bounds: 120 504 8 8
+ - image: solid-color(16, 63, 0, 255, 8, 8)
+ bounds: 128 504 8 8
+ - image: solid-color(17, 63, 0, 255, 8, 8)
+ bounds: 136 504 8 8
+ - image: solid-color(18, 63, 0, 255, 8, 8)
+ bounds: 144 504 8 8
+ - image: solid-color(19, 63, 0, 255, 8, 8)
+ bounds: 152 504 8 8
+ - image: solid-color(20, 63, 0, 255, 8, 8)
+ bounds: 160 504 8 8
+ - image: solid-color(21, 63, 0, 255, 8, 8)
+ bounds: 168 504 8 8
+ - image: solid-color(22, 63, 0, 255, 8, 8)
+ bounds: 176 504 8 8
+ - image: solid-color(23, 63, 0, 255, 8, 8)
+ bounds: 184 504 8 8
+ - image: solid-color(24, 63, 0, 255, 8, 8)
+ bounds: 192 504 8 8
+ - image: solid-color(25, 63, 0, 255, 8, 8)
+ bounds: 200 504 8 8
+ - image: solid-color(26, 63, 0, 255, 8, 8)
+ bounds: 208 504 8 8
+ - image: solid-color(27, 63, 0, 255, 8, 8)
+ bounds: 216 504 8 8
+ - image: solid-color(28, 63, 0, 255, 8, 8)
+ bounds: 224 504 8 8
+ - image: solid-color(29, 63, 0, 255, 8, 8)
+ bounds: 232 504 8 8
+ - image: solid-color(30, 63, 0, 255, 8, 8)
+ bounds: 240 504 8 8
+ - image: solid-color(31, 63, 0, 255, 8, 8)
+ bounds: 248 504 8 8
+ - image: solid-color(32, 63, 0, 255, 8, 8)
+ bounds: 256 504 8 8
+ - image: solid-color(33, 63, 0, 255, 8, 8)
+ bounds: 264 504 8 8
+ - image: solid-color(34, 63, 0, 255, 8, 8)
+ bounds: 272 504 8 8
+ - image: solid-color(35, 63, 0, 255, 8, 8)
+ bounds: 280 504 8 8
+ - image: solid-color(36, 63, 0, 255, 8, 8)
+ bounds: 288 504 8 8
+ - image: solid-color(37, 63, 0, 255, 8, 8)
+ bounds: 296 504 8 8
+ - image: solid-color(38, 63, 0, 255, 8, 8)
+ bounds: 304 504 8 8
+ - image: solid-color(39, 63, 0, 255, 8, 8)
+ bounds: 312 504 8 8
+ - image: solid-color(40, 63, 0, 255, 8, 8)
+ bounds: 320 504 8 8
+ - image: solid-color(41, 63, 0, 255, 8, 8)
+ bounds: 328 504 8 8
+ - image: solid-color(42, 63, 0, 255, 8, 8)
+ bounds: 336 504 8 8
+ - image: solid-color(43, 63, 0, 255, 8, 8)
+ bounds: 344 504 8 8
+ - image: solid-color(44, 63, 0, 255, 8, 8)
+ bounds: 352 504 8 8
+ - image: solid-color(45, 63, 0, 255, 8, 8)
+ bounds: 360 504 8 8
+ - image: solid-color(46, 63, 0, 255, 8, 8)
+ bounds: 368 504 8 8
+ - image: solid-color(47, 63, 0, 255, 8, 8)
+ bounds: 376 504 8 8
+ - image: solid-color(48, 63, 0, 255, 8, 8)
+ bounds: 384 504 8 8
+ - image: solid-color(49, 63, 0, 255, 8, 8)
+ bounds: 392 504 8 8
+ - image: solid-color(50, 63, 0, 255, 8, 8)
+ bounds: 400 504 8 8
+ - image: solid-color(51, 63, 0, 255, 8, 8)
+ bounds: 408 504 8 8
+ - image: solid-color(52, 63, 0, 255, 8, 8)
+ bounds: 416 504 8 8
+ - image: solid-color(53, 63, 0, 255, 8, 8)
+ bounds: 424 504 8 8
+ - image: solid-color(54, 63, 0, 255, 8, 8)
+ bounds: 432 504 8 8
+ - image: solid-color(55, 63, 0, 255, 8, 8)
+ bounds: 440 504 8 8
+ - image: solid-color(56, 63, 0, 255, 8, 8)
+ bounds: 448 504 8 8
+ - image: solid-color(57, 63, 0, 255, 8, 8)
+ bounds: 456 504 8 8
+ - image: solid-color(58, 63, 0, 255, 8, 8)
+ bounds: 464 504 8 8
+ - image: solid-color(59, 63, 0, 255, 8, 8)
+ bounds: 472 504 8 8
+ - image: solid-color(60, 63, 0, 255, 8, 8)
+ bounds: 480 504 8 8
+ - image: solid-color(61, 63, 0, 255, 8, 8)
+ bounds: 488 504 8 8
+ - image: solid-color(62, 63, 0, 255, 8, 8)
+ bounds: 496 504 8 8
+ - image: solid-color(63, 63, 0, 255, 8, 8)
+ bounds: 504 504 8 8
+ - image: solid-color(64, 63, 0, 255, 8, 8)
+ bounds: 512 504 8 8
+ - image: solid-color(65, 63, 0, 255, 8, 8)
+ bounds: 520 504 8 8
+ - image: solid-color(66, 63, 0, 255, 8, 8)
+ bounds: 528 504 8 8
+ - image: solid-color(67, 63, 0, 255, 8, 8)
+ bounds: 536 504 8 8
+ - image: solid-color(68, 63, 0, 255, 8, 8)
+ bounds: 544 504 8 8
+ - image: solid-color(69, 63, 0, 255, 8, 8)
+ bounds: 552 504 8 8
+ - image: solid-color(70, 63, 0, 255, 8, 8)
+ bounds: 560 504 8 8
+ - image: solid-color(71, 63, 0, 255, 8, 8)
+ bounds: 568 504 8 8
+ - image: solid-color(72, 63, 0, 255, 8, 8)
+ bounds: 576 504 8 8
+ - image: solid-color(73, 63, 0, 255, 8, 8)
+ bounds: 584 504 8 8
+ - image: solid-color(74, 63, 0, 255, 8, 8)
+ bounds: 592 504 8 8
+ - image: solid-color(75, 63, 0, 255, 8, 8)
+ bounds: 600 504 8 8
+ - image: solid-color(76, 63, 0, 255, 8, 8)
+ bounds: 608 504 8 8
+ - image: solid-color(77, 63, 0, 255, 8, 8)
+ bounds: 616 504 8 8
+ - image: solid-color(78, 63, 0, 255, 8, 8)
+ bounds: 624 504 8 8
+ - image: solid-color(79, 63, 0, 255, 8, 8)
+ bounds: 632 504 8 8
+ - image: solid-color(80, 63, 0, 255, 8, 8)
+ bounds: 640 504 8 8
+ - image: solid-color(81, 63, 0, 255, 8, 8)
+ bounds: 648 504 8 8
+ - image: solid-color(82, 63, 0, 255, 8, 8)
+ bounds: 656 504 8 8
+ - image: solid-color(83, 63, 0, 255, 8, 8)
+ bounds: 664 504 8 8
+ - image: solid-color(84, 63, 0, 255, 8, 8)
+ bounds: 672 504 8 8
+ - image: solid-color(85, 63, 0, 255, 8, 8)
+ bounds: 680 504 8 8
+ - image: solid-color(86, 63, 0, 255, 8, 8)
+ bounds: 688 504 8 8
+ - image: solid-color(87, 63, 0, 255, 8, 8)
+ bounds: 696 504 8 8
+ - image: solid-color(88, 63, 0, 255, 8, 8)
+ bounds: 704 504 8 8
+ - image: solid-color(89, 63, 0, 255, 8, 8)
+ bounds: 712 504 8 8
+ - image: solid-color(90, 63, 0, 255, 8, 8)
+ bounds: 720 504 8 8
+ - image: solid-color(91, 63, 0, 255, 8, 8)
+ bounds: 728 504 8 8
+ - image: solid-color(92, 63, 0, 255, 8, 8)
+ bounds: 736 504 8 8
+ - image: solid-color(93, 63, 0, 255, 8, 8)
+ bounds: 744 504 8 8
+ - image: solid-color(94, 63, 0, 255, 8, 8)
+ bounds: 752 504 8 8
+ - image: solid-color(95, 63, 0, 255, 8, 8)
+ bounds: 760 504 8 8
+ - image: solid-color(96, 63, 0, 255, 8, 8)
+ bounds: 768 504 8 8
+ - image: solid-color(97, 63, 0, 255, 8, 8)
+ bounds: 776 504 8 8
+ - image: solid-color(98, 63, 0, 255, 8, 8)
+ bounds: 784 504 8 8
+ - image: solid-color(99, 63, 0, 255, 8, 8)
+ bounds: 792 504 8 8
+ - image: solid-color(100, 63, 0, 255, 8, 8)
+ bounds: 800 504 8 8
+ - image: solid-color(101, 63, 0, 255, 8, 8)
+ bounds: 808 504 8 8
+ - image: solid-color(102, 63, 0, 255, 8, 8)
+ bounds: 816 504 8 8
+ - image: solid-color(103, 63, 0, 255, 8, 8)
+ bounds: 824 504 8 8
+ - image: solid-color(104, 63, 0, 255, 8, 8)
+ bounds: 832 504 8 8
+ - image: solid-color(105, 63, 0, 255, 8, 8)
+ bounds: 840 504 8 8
+ - image: solid-color(106, 63, 0, 255, 8, 8)
+ bounds: 848 504 8 8
+ - image: solid-color(107, 63, 0, 255, 8, 8)
+ bounds: 856 504 8 8
+ - image: solid-color(108, 63, 0, 255, 8, 8)
+ bounds: 864 504 8 8
+ - image: solid-color(109, 63, 0, 255, 8, 8)
+ bounds: 872 504 8 8
+ - image: solid-color(110, 63, 0, 255, 8, 8)
+ bounds: 880 504 8 8
+ - image: solid-color(111, 63, 0, 255, 8, 8)
+ bounds: 888 504 8 8
+ - image: solid-color(112, 63, 0, 255, 8, 8)
+ bounds: 896 504 8 8
+ - image: solid-color(113, 63, 0, 255, 8, 8)
+ bounds: 904 504 8 8
+ - image: solid-color(114, 63, 0, 255, 8, 8)
+ bounds: 912 504 8 8
+ - image: solid-color(115, 63, 0, 255, 8, 8)
+ bounds: 920 504 8 8
+ - image: solid-color(116, 63, 0, 255, 8, 8)
+ bounds: 928 504 8 8
+ - image: solid-color(117, 63, 0, 255, 8, 8)
+ bounds: 936 504 8 8
+ - image: solid-color(118, 63, 0, 255, 8, 8)
+ bounds: 944 504 8 8
+ - image: solid-color(119, 63, 0, 255, 8, 8)
+ bounds: 952 504 8 8
+ - image: solid-color(120, 63, 0, 255, 8, 8)
+ bounds: 960 504 8 8
+ - image: solid-color(121, 63, 0, 255, 8, 8)
+ bounds: 968 504 8 8
+ - image: solid-color(122, 63, 0, 255, 8, 8)
+ bounds: 976 504 8 8
+ - image: solid-color(123, 63, 0, 255, 8, 8)
+ bounds: 984 504 8 8
+ - image: solid-color(124, 63, 0, 255, 8, 8)
+ bounds: 992 504 8 8
+ - image: solid-color(125, 63, 0, 255, 8, 8)
+ bounds: 1000 504 8 8
+ - image: solid-color(126, 63, 0, 255, 8, 8)
+ bounds: 1008 504 8 8
+ - image: solid-color(127, 63, 0, 255, 8, 8)
+ bounds: 1016 504 8 8
diff --git a/third_party/webrender/wrench/benchmarks/overlapping-text-shadows.yaml b/third_party/webrender/wrench/benchmarks/overlapping-text-shadows.yaml
new file mode 100644
index 00000000000..d32d4aa45c3
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/overlapping-text-shadows.yaml
@@ -0,0 +1,807 @@
+root:
+ items:
+ -
+ type: "shadow"
+ offset: [0, 0]
+ color: red
+ -
+ type: "shadow"
+ offset: [1, 1]
+ color: red
+ -
+ type: "shadow"
+ offset: [2, 2]
+ color: red
+ -
+ type: "shadow"
+ offset: [3, 3]
+ color: red
+ -
+ type: "shadow"
+ offset: [4, 4]
+ color: red
+ -
+ type: "shadow"
+ offset: [5, 5]
+ color: red
+ -
+ type: "shadow"
+ offset: [6, 6]
+ color: red
+ -
+ type: "shadow"
+ offset: [7, 7]
+ color: red
+ -
+ type: "shadow"
+ offset: [8, 8]
+ color: red
+ -
+ type: "shadow"
+ offset: [9, 9]
+ color: red
+ -
+ type: "shadow"
+ offset: [10, 10]
+ color: red
+ -
+ type: "shadow"
+ offset: [11, 11]
+ color: red
+ -
+ type: "shadow"
+ offset: [12, 12]
+ color: red
+ -
+ type: "shadow"
+ offset: [13, 13]
+ color: red
+ -
+ type: "shadow"
+ offset: [14, 14]
+ color: red
+ -
+ type: "shadow"
+ offset: [15, 15]
+ color: red
+ -
+ type: "shadow"
+ offset: [16, 16]
+ color: red
+ -
+ type: "shadow"
+ offset: [17, 17]
+ color: red
+ -
+ type: "shadow"
+ offset: [18, 18]
+ color: red
+ -
+ type: "shadow"
+ offset: [19, 19]
+ color: red
+ -
+ type: "shadow"
+ offset: [20, 20]
+ color: red
+ -
+ type: "shadow"
+ offset: [21, 21]
+ color: red
+ -
+ type: "shadow"
+ offset: [22, 22]
+ color: red
+ -
+ type: "shadow"
+ offset: [23, 23]
+ color: red
+ -
+ type: "shadow"
+ offset: [24, 24]
+ color: red
+ -
+ type: "shadow"
+ offset: [25, 25]
+ color: red
+ -
+ type: "shadow"
+ offset: [26, 26]
+ color: red
+ -
+ type: "shadow"
+ offset: [27, 27]
+ color: red
+ -
+ type: "shadow"
+ offset: [28, 28]
+ color: red
+ -
+ type: "shadow"
+ offset: [29, 29]
+ color: red
+ -
+ type: "shadow"
+ offset: [30, 30]
+ color: red
+ -
+ type: "shadow"
+ offset: [31, 31]
+ color: red
+ -
+ type: "shadow"
+ offset: [32, 32]
+ color: red
+ -
+ type: "shadow"
+ offset: [33, 33]
+ color: red
+ -
+ type: "shadow"
+ offset: [34, 34]
+ color: red
+ -
+ type: "shadow"
+ offset: [35, 35]
+ color: red
+ -
+ type: "shadow"
+ offset: [36, 36]
+ color: red
+ -
+ type: "shadow"
+ offset: [37, 37]
+ color: red
+ -
+ type: "shadow"
+ offset: [38, 38]
+ color: red
+ -
+ type: "shadow"
+ offset: [39, 39]
+ color: red
+ -
+ type: "shadow"
+ offset: [40, 40]
+ color: red
+ -
+ type: "shadow"
+ offset: [41, 41]
+ color: red
+ -
+ type: "shadow"
+ offset: [42, 42]
+ color: red
+ -
+ type: "shadow"
+ offset: [43, 43]
+ color: red
+ -
+ type: "shadow"
+ offset: [44, 44]
+ color: red
+ -
+ type: "shadow"
+ offset: [45, 45]
+ color: red
+ -
+ type: "shadow"
+ offset: [46, 46]
+ color: red
+ -
+ type: "shadow"
+ offset: [47, 47]
+ color: red
+ -
+ type: "shadow"
+ offset: [48, 48]
+ color: red
+ -
+ type: "shadow"
+ offset: [49, 49]
+ color: red
+ -
+ type: "shadow"
+ offset: [50, 50]
+ color: red
+ -
+ type: "shadow"
+ offset: [51, 51]
+ color: red
+ -
+ type: "shadow"
+ offset: [52, 52]
+ color: red
+ -
+ type: "shadow"
+ offset: [53, 53]
+ color: red
+ -
+ type: "shadow"
+ offset: [54, 54]
+ color: red
+ -
+ type: "shadow"
+ offset: [55, 55]
+ color: red
+ -
+ type: "shadow"
+ offset: [56, 56]
+ color: red
+ -
+ type: "shadow"
+ offset: [57, 57]
+ color: red
+ -
+ type: "shadow"
+ offset: [58, 58]
+ color: red
+ -
+ type: "shadow"
+ offset: [59, 59]
+ color: red
+ -
+ type: "shadow"
+ offset: [60, 60]
+ color: red
+ -
+ type: "shadow"
+ offset: [61, 61]
+ color: red
+ -
+ type: "shadow"
+ offset: [62, 62]
+ color: red
+ -
+ type: "shadow"
+ offset: [63, 63]
+ color: red
+ -
+ type: "shadow"
+ offset: [64, 64]
+ color: red
+ -
+ type: "shadow"
+ offset: [65, 65]
+ color: red
+ -
+ type: "shadow"
+ offset: [66, 66]
+ color: red
+ -
+ type: "shadow"
+ offset: [67, 67]
+ color: red
+ -
+ type: "shadow"
+ offset: [68, 68]
+ color: red
+ -
+ type: "shadow"
+ offset: [69, 69]
+ color: red
+ -
+ type: "shadow"
+ offset: [70, 70]
+ color: red
+ -
+ type: "shadow"
+ offset: [71, 71]
+ color: red
+ -
+ type: "shadow"
+ offset: [72, 72]
+ color: red
+ -
+ type: "shadow"
+ offset: [73, 73]
+ color: red
+ -
+ type: "shadow"
+ offset: [74, 74]
+ color: red
+ -
+ type: "shadow"
+ offset: [75, 75]
+ color: red
+ -
+ type: "shadow"
+ offset: [76, 76]
+ color: red
+ -
+ type: "shadow"
+ offset: [77, 77]
+ color: red
+ -
+ type: "shadow"
+ offset: [78, 78]
+ color: red
+ -
+ type: "shadow"
+ offset: [79, 79]
+ color: red
+ -
+ type: "shadow"
+ offset: [80, 80]
+ color: red
+ -
+ type: "shadow"
+ offset: [81, 81]
+ color: red
+ -
+ type: "shadow"
+ offset: [82, 82]
+ color: red
+ -
+ type: "shadow"
+ offset: [83, 83]
+ color: red
+ -
+ type: "shadow"
+ offset: [84, 84]
+ color: red
+ -
+ type: "shadow"
+ offset: [85, 85]
+ color: red
+ -
+ type: "shadow"
+ offset: [86, 86]
+ color: red
+ -
+ type: "shadow"
+ offset: [87, 87]
+ color: red
+ -
+ type: "shadow"
+ offset: [88, 88]
+ color: red
+ -
+ type: "shadow"
+ offset: [89, 89]
+ color: red
+ -
+ type: "shadow"
+ offset: [90, 90]
+ color: red
+ -
+ type: "shadow"
+ offset: [91, 91]
+ color: red
+ -
+ type: "shadow"
+ offset: [92, 92]
+ color: red
+ -
+ type: "shadow"
+ offset: [93, 93]
+ color: red
+ -
+ type: "shadow"
+ offset: [94, 94]
+ color: red
+ -
+ type: "shadow"
+ offset: [95, 95]
+ color: red
+ -
+ type: "shadow"
+ offset: [96, 96]
+ color: red
+ -
+ type: "shadow"
+ offset: [97, 97]
+ color: red
+ -
+ type: "shadow"
+ offset: [98, 98]
+ color: red
+ -
+ type: "shadow"
+ offset: [99, 99]
+ color: red
+ -
+ type: "shadow"
+ offset: [100, 100]
+ color: red
+ -
+ type: "shadow"
+ offset: [101, 101]
+ color: red
+ -
+ type: "shadow"
+ offset: [102, 102]
+ color: red
+ -
+ type: "shadow"
+ offset: [103, 103]
+ color: red
+ -
+ type: "shadow"
+ offset: [104, 104]
+ color: red
+ -
+ type: "shadow"
+ offset: [105, 105]
+ color: red
+ -
+ type: "shadow"
+ offset: [106, 106]
+ color: red
+ -
+ type: "shadow"
+ offset: [107, 107]
+ color: red
+ -
+ type: "shadow"
+ offset: [108, 108]
+ color: red
+ -
+ type: "shadow"
+ offset: [109, 109]
+ color: red
+ -
+ type: "shadow"
+ offset: [110, 110]
+ color: red
+ -
+ type: "shadow"
+ offset: [111, 111]
+ color: red
+ -
+ type: "shadow"
+ offset: [112, 112]
+ color: red
+ -
+ type: "shadow"
+ offset: [113, 113]
+ color: red
+ -
+ type: "shadow"
+ offset: [114, 114]
+ color: red
+ -
+ type: "shadow"
+ offset: [115, 115]
+ color: red
+ -
+ type: "shadow"
+ offset: [116, 116]
+ color: red
+ -
+ type: "shadow"
+ offset: [117, 117]
+ color: red
+ -
+ type: "shadow"
+ offset: [118, 118]
+ color: red
+ -
+ type: "shadow"
+ offset: [119, 119]
+ color: red
+ -
+ type: "shadow"
+ offset: [120, 120]
+ color: red
+ -
+ type: "shadow"
+ offset: [121, 121]
+ color: red
+ -
+ type: "shadow"
+ offset: [122, 122]
+ color: red
+ -
+ type: "shadow"
+ offset: [123, 123]
+ color: red
+ -
+ type: "shadow"
+ offset: [124, 124]
+ color: red
+ -
+ type: "shadow"
+ offset: [125, 125]
+ color: red
+ -
+ type: "shadow"
+ offset: [126, 126]
+ color: red
+ -
+ type: "shadow"
+ offset: [127, 127]
+ color: red
+ -
+ type: "shadow"
+ offset: [128, 128]
+ color: red
+ -
+ type: "shadow"
+ offset: [129, 129]
+ color: red
+ -
+ type: "shadow"
+ offset: [130, 130]
+ color: red
+ -
+ type: "shadow"
+ offset: [131, 131]
+ color: red
+ -
+ type: "shadow"
+ offset: [132, 132]
+ color: red
+ -
+ type: "shadow"
+ offset: [133, 133]
+ color: red
+ -
+ type: "shadow"
+ offset: [134, 134]
+ color: red
+ -
+ type: "shadow"
+ offset: [135, 135]
+ color: red
+ -
+ type: "shadow"
+ offset: [136, 136]
+ color: red
+ -
+ type: "shadow"
+ offset: [137, 137]
+ color: red
+ -
+ type: "shadow"
+ offset: [138, 138]
+ color: red
+ -
+ type: "shadow"
+ offset: [139, 139]
+ color: red
+ -
+ type: "shadow"
+ offset: [140, 140]
+ color: red
+ -
+ type: "shadow"
+ offset: [141, 141]
+ color: red
+ -
+ type: "shadow"
+ offset: [142, 142]
+ color: red
+ -
+ type: "shadow"
+ offset: [143, 143]
+ color: red
+ -
+ type: "shadow"
+ offset: [144, 144]
+ color: red
+ -
+ type: "shadow"
+ offset: [145, 145]
+ color: red
+ -
+ type: "shadow"
+ offset: [146, 146]
+ color: red
+ -
+ type: "shadow"
+ offset: [147, 147]
+ color: red
+ -
+ type: "shadow"
+ offset: [148, 148]
+ color: red
+ -
+ type: "shadow"
+ offset: [149, 149]
+ color: red
+ -
+ type: "shadow"
+ offset: [150, 150]
+ color: red
+ -
+ type: "shadow"
+ offset: [151, 151]
+ color: red
+ -
+ type: "shadow"
+ offset: [152, 152]
+ color: red
+ -
+ type: "shadow"
+ offset: [153, 153]
+ color: red
+ -
+ type: "shadow"
+ offset: [154, 154]
+ color: red
+ -
+ type: "shadow"
+ offset: [155, 155]
+ color: red
+ -
+ type: "shadow"
+ offset: [156, 156]
+ color: red
+ -
+ type: "shadow"
+ offset: [157, 157]
+ color: red
+ -
+ type: "shadow"
+ offset: [158, 158]
+ color: red
+ -
+ type: "shadow"
+ offset: [159, 159]
+ color: red
+ -
+ type: "shadow"
+ offset: [160, 160]
+ color: red
+ -
+ type: "shadow"
+ offset: [161, 161]
+ color: red
+ -
+ type: "shadow"
+ offset: [162, 162]
+ color: red
+ -
+ type: "shadow"
+ offset: [163, 163]
+ color: red
+ -
+ type: "shadow"
+ offset: [164, 164]
+ color: red
+ -
+ type: "shadow"
+ offset: [165, 165]
+ color: red
+ -
+ type: "shadow"
+ offset: [166, 166]
+ color: red
+ -
+ type: "shadow"
+ offset: [167, 167]
+ color: red
+ -
+ type: "shadow"
+ offset: [168, 168]
+ color: red
+ -
+ type: "shadow"
+ offset: [169, 169]
+ color: red
+ -
+ type: "shadow"
+ offset: [170, 170]
+ color: red
+ -
+ type: "shadow"
+ offset: [171, 171]
+ color: red
+ -
+ type: "shadow"
+ offset: [172, 172]
+ color: red
+ -
+ type: "shadow"
+ offset: [173, 173]
+ color: red
+ -
+ type: "shadow"
+ offset: [174, 174]
+ color: red
+ -
+ type: "shadow"
+ offset: [175, 175]
+ color: red
+ -
+ type: "shadow"
+ offset: [176, 176]
+ color: red
+ -
+ type: "shadow"
+ offset: [177, 177]
+ color: red
+ -
+ type: "shadow"
+ offset: [178, 178]
+ color: red
+ -
+ type: "shadow"
+ offset: [179, 179]
+ color: red
+ -
+ type: "shadow"
+ offset: [180, 180]
+ color: red
+ -
+ type: "shadow"
+ offset: [181, 181]
+ color: red
+ -
+ type: "shadow"
+ offset: [182, 182]
+ color: red
+ -
+ type: "shadow"
+ offset: [183, 183]
+ color: red
+ -
+ type: "shadow"
+ offset: [184, 184]
+ color: red
+ -
+ type: "shadow"
+ offset: [185, 185]
+ color: red
+ -
+ type: "shadow"
+ offset: [186, 186]
+ color: red
+ -
+ type: "shadow"
+ offset: [187, 187]
+ color: red
+ -
+ type: "shadow"
+ offset: [188, 188]
+ color: red
+ -
+ type: "shadow"
+ offset: [189, 189]
+ color: red
+ -
+ type: "shadow"
+ offset: [190, 190]
+ color: red
+ -
+ type: "shadow"
+ offset: [191, 191]
+ color: red
+ -
+ type: "shadow"
+ offset: [192, 192]
+ color: red
+ -
+ type: "shadow"
+ offset: [193, 193]
+ color: red
+ -
+ type: "shadow"
+ offset: [194, 194]
+ color: red
+ -
+ type: "shadow"
+ offset: [195, 195]
+ color: red
+ -
+ type: "shadow"
+ offset: [196, 196]
+ color: red
+ -
+ type: "shadow"
+ offset: [197, 197]
+ color: red
+ -
+ type: "shadow"
+ offset: [198, 198]
+ color: red
+ -
+ type: "shadow"
+ offset: [199, 199]
+ color: red
+ - text: "Much overdraw many pixels"
+ origin: 20 70
+ size: 60
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/benchmarks/radial-gradient.yaml b/third_party/webrender/wrench/benchmarks/radial-gradient.yaml
new file mode 100644
index 00000000000..e71d3013718
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/radial-gradient.yaml
@@ -0,0 +1,52 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: [ 0, 0, 1980, 1080]
+ center: [ 990, 540 ]
+ start-radius: 5
+ end-radius: 8000
+ stops: [ 0.0, black, 1.0, white ]
+ repeat: false
+ - type: radial-gradient
+ bounds: [ 0, 0, 1980, 1080]
+ center: [ 990, 540 ]
+ start-radius: 5
+ end-radius: 8000
+ stops: [ 0.0, black, 1.0, white ]
+ repeat: false
+ - type: radial-gradient
+ bounds: [ 0, 0, 1980, 1080]
+ center: [ 990, 540 ]
+ start-radius: 5
+ end-radius: 8000
+ stops: [ 0.0, black, 1.0, white ]
+ repeat: false
+ - type: radial-gradient
+ bounds: [ 0, 0, 1980, 1080]
+ center: [ 990, 540 ]
+ start-radius: 5
+ end-radius: 8000
+ stops: [ 0.0, black, 1.0, white ]
+ repeat: false
+ - type: radial-gradient
+ bounds: [ 0, 0, 1980, 1080]
+ center: [ 990, 540 ]
+ start-radius: 5
+ end-radius: 8000
+ stops: [ 0.0, black, 1.0, white ]
+ repeat: false
+ - type: radial-gradient
+ bounds: [ 0, 0, 1980, 1080]
+ center: [ 990, 540 ]
+ start-radius: 5
+ end-radius: 8000
+ stops: [ 0.0, black, 1.0, white ]
+ repeat: false
+ - type: radial-gradient
+ bounds: [ 0, 0, 1980, 1080]
+ center: [ 990, 540 ]
+ start-radius: 5
+ end-radius: 8000
+ stops: [ 0.0, black, 1.0, white ]
+ repeat: false
diff --git a/third_party/webrender/wrench/benchmarks/simple-batching.yaml b/third_party/webrender/wrench/benchmarks/simple-batching.yaml
new file mode 100644
index 00000000000..4f2cf019b21
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/simple-batching.yaml
@@ -0,0 +1,45 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
+ - type: rect
+ bounds: [0, 0, 512, 512]
+ color: green
diff --git a/third_party/webrender/wrench/benchmarks/text-rendering.yaml b/third_party/webrender/wrench/benchmarks/text-rendering.yaml
new file mode 100644
index 00000000000..6b7ac3fb3ac
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/text-rendering.yaml
@@ -0,0 +1,260 @@
+root:
+ items:
+ - text: "Cats making all the muffins knock over christmas tree"
+ origin: 20 30
+ size: 20
+ - text: "Cat ipsum dolor sit amet, poop in the plant pot and demand to be let outside at once, and expect owner to wait for me as i think about it."
+ origin: 20 50
+ size: 9
+ - text: "Slap owner's face at 5am until human fills food dish licks your face."
+ origin: 20 80
+ size: 18
+ - text: "Play riveting piece on synthesizer keyboard cat snacks, yet meow go back to sleep owner brings food and water tries to"
+ origin: 20 100
+ size: 10
+ - text: "pet on head, so scratch get sprayed by water because bad cat nap all day, kitty scratches couch bad kitty."
+ origin: 20 112
+ size: 10
+ - text: "Touch water with paw then recoil in horror climb a tree, wait for a fireman jump to fireman then"
+ origin: 20 130
+ size: 12
+ - text: "scratch his face and mark territory when in doubt, wash."
+ origin: 20 150
+ size: 12
+ - text: "Friends are not food warm up laptop with butt lick butt fart rainbows until owner yells pee in litter box hiss at cats if it fits,"
+ origin: 20 170
+ size: 10
+ - text: "i sits swat at dog, or chase the pig around the house yet thug cat but hiss and stare at nothing then run suddenly away."
+ origin: 20 180
+ size: 10
+ - text: "Howl uncontrollably for no reason pushes butt to face eat a plant, kill a hand for cough hairball on conveniently placed pants."
+ origin: 20 200
+ size: 10
+ - text: "Wake up human for food at 4am. Decide to want nothing to do with my owner today pelt around the house and up and down stairs chasing phantoms."
+ origin: 20 220
+ size: 8
+ - text: "Poop on grasses."
+ origin: 20 240
+ size: 16
+ - text: "Hunt by meowing loudly at 5am next to human slave food dispenser bleghbleghvomit my"
+ origin: 20 260
+ size: 10
+ - text: "furball really tie the room together and throwup on your pillow, so scamper."
+ origin: 20 270
+ size: 10
+ - text: "Spread kitty litter all over house."
+ origin: 20 290
+ size: 18
+ - text: "Friends are not food curl into a furry donut or going to catch the red"
+ origin: 20 320
+ size: 16
+ - text: "dot today going to catch the red dot today or destroy the blinds or purr."
+ origin: 20 340
+ size: 16
+
+ - text: "Cats making all the muffins knock over christmas tree"
+ origin: 850 30
+ size: 20
+ color: red
+ - text: "Cat ipsum dolor sit amet, poop in the plant pot and demand to be let outside at once, and expect owner to wait for me as i think about it."
+ origin: 850 50
+ size: 9
+ color: red
+ - text: "Slap owner's face at 5am until human fills food dish licks your face."
+ origin: 850 80
+ size: 18
+ color: red
+ - text: "Play riveting piece on synthesizer keyboard cat snacks, yet meow go back to sleep owner brings food and water tries to"
+ origin: 850 100
+ size: 10
+ color: red
+ - text: "pet on head, so scratch get sprayed by water because bad cat nap all day, kitty scratches couch bad kitty."
+ origin: 850 112
+ size: 10
+ color: red
+ - text: "Touch water with paw then recoil in horror climb a tree, wait for a fireman jump to fireman then"
+ origin: 850 130
+ size: 12
+ color: red
+ - text: "scratch his face and mark territory when in doubt, wash."
+ origin: 850 150
+ size: 12
+ color: red
+ - text: "Friends are not food warm up laptop with butt lick butt fart rainbows until owner yells pee in litter box hiss at cats if it fits,"
+ origin: 850 170
+ size: 10
+ color: red
+ - text: "i sits swat at dog, or chase the pig around the house yet thug cat but hiss and stare at nothing then run suddenly away."
+ origin: 850 180
+ size: 10
+ color: red
+ - text: "Howl uncontrollably for no reason pushes butt to face eat a plant, kill a hand for cough hairball on conveniently placed pants."
+ origin: 850 200
+ size: 10
+ color: red
+ - text: "Wake up human for food at 4am. Decide to want nothing to do with my owner today pelt around the house and up and down stairs chasing phantoms."
+ origin: 850 220
+ size: 8
+ color: red
+ - text: "Poop on grasses."
+ origin: 850 240
+ size: 16
+ color: red
+ - text: "Hunt by meowing loudly at 5am next to human slave food dispenser bleghbleghvomit my"
+ origin: 850 260
+ size: 10
+ color: red
+ - text: "furball really tie the room together and throwup on your pillow, so scamper."
+ origin: 850 270
+ size: 10
+ color: red
+ - text: "Spread kitty litter all over house."
+ origin: 850 290
+ size: 18
+ color: red
+ - text: "Friends are not food curl into a furry donut or going to catch the red"
+ origin: 850 320
+ size: 16
+ color: red
+ - text: "dot today going to catch the red dot today or destroy the blinds or purr."
+ origin: 850 340
+ size: 16
+ color: red
+
+ - text: "Cats making all the muffins knock over christmas tree"
+ origin: 20 430
+ size: 20
+ color: green
+ - text: "Cat ipsum dolor sit amet, poop in the plant pot and demand to be let outside at once, and expect owner to wait for me as i think about it."
+ origin: 20 450
+ size: 9
+ color: green
+ - text: "Slap owner's face at 5am until human fills food dish licks your face."
+ origin: 20 480
+ size: 18
+ color: green
+ - text: "Play riveting piece on synthesizer keyboard cat snacks, yet meow go back to sleep owner brings food and water tries to"
+ origin: 20 500
+ size: 10
+ color: green
+ - text: "pet on head, so scratch get sprayed by water because bad cat nap all day, kitty scratches couch bad kitty."
+ origin: 20 512
+ size: 10
+ color: green
+ - text: "Touch water with paw then recoil in horror climb a tree, wait for a fireman jump to fireman then"
+ origin: 20 530
+ size: 12
+ color: green
+ - text: "scratch his face and mark territory when in doubt, wash."
+ origin: 20 550
+ size: 12
+ color: green
+ - text: "Friends are not food warm up laptop with butt lick butt fart rainbows until owner yells pee in litter box hiss at cats if it fits,"
+ origin: 20 570
+ size: 10
+ color: green
+ - text: "i sits swat at dog, or chase the pig around the house yet thug cat but hiss and stare at nothing then run suddenly away."
+ origin: 20 580
+ size: 10
+ color: green
+ - text: "Howl uncontrollably for no reason pushes butt to face eat a plant, kill a hand for cough hairball on conveniently placed pants."
+ origin: 20 600
+ size: 10
+ color: green
+ - text: "Wake up human for food at 4am. Decide to want nothing to do with my owner today pelt around the house and up and down stairs chasing phantoms."
+ origin: 20 620
+ size: 8
+ color: green
+ - text: "Poop on grasses."
+ origin: 20 640
+ size: 16
+ color: green
+ - text: "Hunt by meowing loudly at 5am next to human slave food dispenser bleghbleghvomit my"
+ origin: 20 660
+ size: 10
+ color: green
+ - text: "furball really tie the room together and throwup on your pillow, so scamper."
+ origin: 20 670
+ size: 10
+ color: green
+ - text: "Spread kitty litter all over house."
+ origin: 20 690
+ size: 18
+ color: green
+ - text: "Friends are not food curl into a furry donut or going to catch the red"
+ origin: 20 720
+ size: 16
+ color: green
+ - text: "dot today going to catch the red dot today or destroy the blinds or purr."
+ origin: 20 740
+ size: 16
+ color: green
+
+ - text: "Cats making all the muffins knock over christmas tree"
+ origin: 850 430
+ size: 20
+ color: blue
+ - text: "Cat ipsum dolor sit amet, poop in the plant pot and demand to be let outside at once, and expect owner to wait for me as i think about it."
+ origin: 850 450
+ size: 9
+ color: blue
+ - text: "Slap owner's face at 5am until human fills food dish licks your face."
+ origin: 850 480
+ size: 18
+ color: blue
+ - text: "Play riveting piece on synthesizer keyboard cat snacks, yet meow go back to sleep owner brings food and water tries to"
+ origin: 850 500
+ size: 10
+ color: blue
+ - text: "pet on head, so scratch get sprayed by water because bad cat nap all day, kitty scratches couch bad kitty."
+ origin: 850 512
+ size: 10
+ color: blue
+ - text: "Touch water with paw then recoil in horror climb a tree, wait for a fireman jump to fireman then"
+ origin: 850 530
+ size: 12
+ color: blue
+ - text: "scratch his face and mark territory when in doubt, wash."
+ origin: 850 550
+ size: 12
+ color: blue
+ - text: "Friends are not food warm up laptop with butt lick butt fart rainbows until owner yells pee in litter box hiss at cats if it fits,"
+ origin: 850 570
+ size: 10
+ color: blue
+ - text: "i sits swat at dog, or chase the pig around the house yet thug cat but hiss and stare at nothing then run suddenly away."
+ origin: 850 580
+ size: 10
+ color: blue
+ - text: "Howl uncontrollably for no reason pushes butt to face eat a plant, kill a hand for cough hairball on conveniently placed pants."
+ origin: 850 600
+ size: 10
+ color: blue
+ - text: "Wake up human for food at 4am. Decide to want nothing to do with my owner today pelt around the house and up and down stairs chasing phantoms."
+ origin: 850 620
+ size: 8
+ color: blue
+ - text: "Poop on grasses."
+ origin: 850 640
+ size: 16
+ color: blue
+ - text: "Hunt by meowing loudly at 5am next to human slave food dispenser bleghbleghvomit my"
+ origin: 850 660
+ size: 10
+ color: blue
+ - text: "furball really tie the room together and throwup on your pillow, so scamper."
+ origin: 850 670
+ size: 10
+ color: blue
+ - text: "Spread kitty litter all over house."
+ origin: 850 690
+ size: 18
+ color: blue
+ - text: "Friends are not food curl into a furry donut or going to catch the red"
+ origin: 850 720
+ size: 16
+ color: blue
+ - text: "dot today going to catch the red dot today or destroy the blinds or purr."
+ origin: 850 740
+ size: 16
+ color: blue
diff --git a/third_party/webrender/wrench/benchmarks/transforms-simple.yaml b/third_party/webrender/wrench/benchmarks/transforms-simple.yaml
new file mode 100644
index 00000000000..53956da4015
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/transforms-simple.yaml
@@ -0,0 +1,44 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1024, 1024]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1024, 1024]
+ transform: rotate(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: [255, 0, 0, 0.5]
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: [255, 0, 0, 0.5]
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: [255, 0, 0, 0.5]
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: [255, 0, 0, 0.5]
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: [255, 0, 0, 0.5]
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: [255, 0, 0, 0.5]
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: [255, 0, 0, 0.5]
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: [255, 0, 0, 0.5]
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: [255, 0, 0, 0.5]
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: [255, 0, 0, 0.5]
+ - type: rect
+ bounds: [0, 0, 1024, 1024]
+ color: [255, 0, 0, 0.5]
+
diff --git a/third_party/webrender/wrench/benchmarks/unaligned-gradient.yaml b/third_party/webrender/wrench/benchmarks/unaligned-gradient.yaml
new file mode 100644
index 00000000000..ea7738202d8
--- /dev/null
+++ b/third_party/webrender/wrench/benchmarks/unaligned-gradient.yaml
@@ -0,0 +1,62 @@
+root:
+ items:
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 1, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 1, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 1, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 1, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 1, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 1, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 1, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 1, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 1, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 1, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
diff --git a/third_party/webrender/wrench/build.rs b/third_party/webrender/wrench/build.rs
new file mode 100644
index 00000000000..974ef3180cc
--- /dev/null
+++ b/third_party/webrender/wrench/build.rs
@@ -0,0 +1,28 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use std::env;
+use std::fs;
+use std::path::PathBuf;
+
+fn main() {
+ let target = env::var("TARGET").unwrap();
+ let out_dir = env::var_os("OUT_DIR").unwrap();
+ let out_dir = PathBuf::from(out_dir);
+
+ println!("cargo:rerun-if-changed=res/wrench.exe.manifest");
+ if target.contains("windows") {
+ let src = PathBuf::from("res/wrench.exe.manifest");
+ let mut dst = out_dir
+ .parent()
+ .unwrap()
+ .parent()
+ .unwrap()
+ .parent()
+ .unwrap()
+ .to_owned();
+ dst.push("wrench.exe.manifest");
+ fs::copy(&src, &dst).unwrap();
+ }
+}
diff --git a/third_party/webrender/wrench/examples/animated.anim b/third_party/webrender/wrench/examples/animated.anim
new file mode 100644
index 00000000000..ee834e6cc2c
--- /dev/null
+++ b/third_party/webrender/wrench/examples/animated.anim
@@ -0,0 +1,13 @@
+---
+ anim.color:
+ - red
+ - green
+ - blue
+ rect.pos:
+ - [100, 100, 100, 100]
+ - [100, 100, 120, 100]
+ - [100, 100, 140, 100]
+ bs.offset:
+ - [0, 0]
+ - [2, 0]
+ - [4, 0]
diff --git a/third_party/webrender/wrench/examples/animated.yaml b/third_party/webrender/wrench/examples/animated.yaml
new file mode 100644
index 00000000000..7f9026ad6ed
--- /dev/null
+++ b/third_party/webrender/wrench/examples/animated.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: key(rect.pos)
+ color: key(anim.color)
+ - type: box-shadow
+ bounds: [ 100, 300, 100, 100 ]
+ blur-radius: 3
+ border-radius: 10
+ color: blue
+ clip-mode: outset
+ offset: key(bs.offset)
diff --git a/third_party/webrender/wrench/reftests/aa/aa-dist-bug-ref.yaml b/third_party/webrender/wrench/reftests/aa/aa-dist-bug-ref.yaml
new file mode 100644
index 00000000000..c83fff2a0bd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/aa/aa-dist-bug-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: [340, 184, 50, 20]
diff --git a/third_party/webrender/wrench/reftests/aa/aa-dist-bug.yaml b/third_party/webrender/wrench/reftests/aa/aa-dist-bug.yaml
new file mode 100644
index 00000000000..19b747aabce
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/aa/aa-dist-bug.yaml
@@ -0,0 +1,43 @@
+# Test that when the AA range is > 1, the AA is correctly applied to
+# an ellipse clip. This is a regression test for issue #2576.
+# The rectangles below mask out most of the box shadow and rounded
+# corners, which are not relevant to what is being tested here.
+---
+root:
+ items:
+ - type: stacking-context
+ transform: rotate-z(-45) rotate-x(-60)
+ transform-origin: 300 300
+ items:
+ - type: box-shadow
+ bounds: [0, 0, 150, 150]
+ color: black
+ offset: [150, 50]
+ border-radius: 8
+
+ - type: clip
+ bounds: [90, 0, 150, 150]
+ complex:
+ - rect: [90, 0, 150, 150]
+ radius: 8
+ items:
+ - type: rect
+ color: red
+ border-radius: 8
+ bounds: [90, 0, 150, 150]
+
+ - type: rect
+ color: white
+ bounds: [250, 100, 240, 84]
+
+ - type: rect
+ color: white
+ bounds: [250, 204, 240, 70]
+
+ - type: rect
+ color: white
+ bounds: [240, 100, 100, 150]
+
+ - type: rect
+ color: white
+ bounds: [390, 100, 100, 150]
diff --git a/third_party/webrender/wrench/reftests/aa/fractional-radii-ref.yaml b/third_party/webrender/wrench/reftests/aa/fractional-radii-ref.yaml
new file mode 100644
index 00000000000..364d6e75295
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/aa/fractional-radii-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 20 50 100 100
+ color: blue
+
+ - type: rect
+ bounds: 140 50 100 100
+ color: blue
+
+ - type: rect
+ bounds: 260 50 100 100
+ color: blue
+
+ - type: rect
+ bounds: 380 50 100 100
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/aa/fractional-radii.yaml b/third_party/webrender/wrench/reftests/aa/fractional-radii.yaml
new file mode 100644
index 00000000000..9293c1b1e9f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/aa/fractional-radii.yaml
@@ -0,0 +1,42 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [20, 50, 100, 100]
+ complex:
+ - rect: [20, 50, 100, 100]
+ radius: 0
+ items:
+ - type: rect
+ bounds: 20 50 100 100
+ color: blue
+
+ - type: clip
+ bounds: [140, 50, 100, 100]
+ complex:
+ - rect: [140, 50, 100, 100]
+ radius: 0.001
+ items:
+ - type: rect
+ bounds: 140 50 100 100
+ color: blue
+
+ - type: clip
+ bounds: [260, 50, 100, 100]
+ complex:
+ - rect: [260, 50, 100, 100]
+ radius: 0.01
+ items:
+ - type: rect
+ bounds: 260 50 100 100
+ color: blue
+
+ - type: clip
+ bounds: [380, 50, 100, 100]
+ complex:
+ - rect: [380, 50, 100, 100]
+ radius: 0.1
+ items:
+ - type: rect
+ bounds: 380 50 100 100
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/aa/reftest.list b/third_party/webrender/wrench/reftests/aa/reftest.list
new file mode 100644
index 00000000000..af7f1da1b36
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/aa/reftest.list
@@ -0,0 +1,3 @@
+skip_on(android) == rounded-rects.yaml rounded-rects-ref.png # Too wide for Android
+== aa-dist-bug.yaml aa-dist-bug-ref.yaml
+== fractional-radii.yaml fractional-radii-ref.yaml
diff --git a/third_party/webrender/wrench/reftests/aa/rounded-rects-ref.png b/third_party/webrender/wrench/reftests/aa/rounded-rects-ref.png
new file mode 100644
index 00000000000..441f2ac93d9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/aa/rounded-rects-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/aa/rounded-rects.yaml b/third_party/webrender/wrench/reftests/aa/rounded-rects.yaml
new file mode 100644
index 00000000000..c82349a0081
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/aa/rounded-rects.yaml
@@ -0,0 +1,41 @@
+---
+root:
+ items:
+ -
+ bounds: 0 0 1000 1000
+ type: stacking-context
+ items:
+ - type: clip
+ bounds: [50, 50, 200, 200]
+ complex:
+ - rect: [50, 50, 200, 200]
+ radius: 8
+ items:
+ - type: rect
+ bounds: 50 50 200 200
+ color: red
+
+ - type: clip
+ bounds: [270, 50, 200, 200]
+ complex:
+ - rect: [270, 50, 200, 200]
+ radius: [16, 32, 48, 64]
+ items:
+ - type: rect
+ bounds: 270 50 200 200
+ color: green
+
+ - type: clip
+ bounds: [490, 50, 500, 500]
+ complex:
+ - rect: [490, 50, 500, 500]
+ radius: {
+ top-left: [32, 16],
+ top-right: [40, 24],
+ bottom-left: [48, 64],
+ bottom-right: [52, 80],
+ }
+ items:
+ - type: rect
+ bounds: 490 50 500 500
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/backface/backface-3d-leaf.yaml b/third_party/webrender/wrench/reftests/backface/backface-3d-leaf.yaml
new file mode 100644
index 00000000000..1a7be55eaea
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/backface-3d-leaf.yaml
@@ -0,0 +1,18 @@
+# In this test, the leaf green rectangle has only its back visible
+# due to rotate-x(180) transformation, preserve-3d style,
+# and "backface-visible = false", so it's completely hidden.
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform-style: preserve-3d
+ transform: rotate-x(180)
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
+ backface-visible: false
diff --git a/third_party/webrender/wrench/reftests/backface/backface-both-sides-ref.yaml b/third_party/webrender/wrench/reftests/backface/backface-both-sides-ref.yaml
new file mode 100644
index 00000000000..aa0bd8e57cc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/backface-both-sides-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ color: red
+ bounds: 100 0 100 100
diff --git a/third_party/webrender/wrench/reftests/backface/backface-both-sides.yaml b/third_party/webrender/wrench/reftests/backface/backface-both-sides.yaml
new file mode 100644
index 00000000000..0212c3002db
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/backface-both-sides.yaml
@@ -0,0 +1,25 @@
+# In this test, both rectangles have invisible back faces and are
+# parented to a preserve-3d context that is rotated by 180 degrees.
+# The red one is also rotated 180 degrees, and should be visible.
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: stacking-context
+ transform: rotate-y(180)
+ transform-style: preserve-3d
+ transform-origin: 50 50
+ items:
+ - type: rect
+ color: green
+ bounds: 0 0 100 100
+ backface-visible: false
+ - type: stacking-context
+ transform: rotate-y(180)
+ transform-origin: 0 0
+ backface-visible: false
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 100 100
diff --git a/third_party/webrender/wrench/reftests/backface/backface-double-flip.yaml b/third_party/webrender/wrench/reftests/backface/backface-double-flip.yaml
new file mode 100644
index 00000000000..b242e956279
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/backface-double-flip.yaml
@@ -0,0 +1,21 @@
+# In this test, the red rectangle has backface visibility turned off.
+# However its world transformation makes it front-facing.
+# However it's still invisible because it's back-facing in the picture space
+# of the transformed stacking context.
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: stacking-context
+ transform: rotate-y(180)
+ transform-style: preserve-3d
+ transform-origin: 50 50
+ items:
+ - type: stacking-context
+ transform: rotate-y(180)
+ items:
+ - type: rect
+ color: red
+ backface-visible: false
+ bounds: 0 0 100 100
diff --git a/third_party/webrender/wrench/reftests/backface/backface-hidden.yaml b/third_party/webrender/wrench/reftests/backface/backface-hidden.yaml
new file mode 100644
index 00000000000..afa9d653b87
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/backface-hidden.yaml
@@ -0,0 +1,18 @@
+# In this test, the leaf green rectangle has only its back visible
+# due to rotate-x(180) transformation,
+# and "backface-visible = false", so it's completely hidden.
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform: rotate-x(180)
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 1024 768
+ color: green
+ backface-visible: false
diff --git a/third_party/webrender/wrench/reftests/backface/backface-leaf-ref.yaml b/third_party/webrender/wrench/reftests/backface/backface-leaf-ref.yaml
new file mode 100644
index 00000000000..17d39b4d61b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/backface-leaf-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 568 200 200
+ color: green
diff --git a/third_party/webrender/wrench/reftests/backface/backface-leaf.yaml b/third_party/webrender/wrench/reftests/backface/backface-leaf.yaml
new file mode 100644
index 00000000000..d1c1b893be7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/backface-leaf.yaml
@@ -0,0 +1,16 @@
+# In this test, the leaf green rectangle "backface-visible = false" which is ignored
+# because it doesn't have any transform, and it's not in preserve-3d context.
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform: rotate-x(180)
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
+ backface-visible: false
diff --git a/third_party/webrender/wrench/reftests/backface/backface-picture-ref.yaml b/third_party/webrender/wrench/reftests/backface/backface-picture-ref.yaml
new file mode 100644
index 00000000000..3013f72f207
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/backface-picture-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 100 100
diff --git a/third_party/webrender/wrench/reftests/backface/backface-picture.yaml b/third_party/webrender/wrench/reftests/backface/backface-picture.yaml
new file mode 100644
index 00000000000..189c23d5b54
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/backface-picture.yaml
@@ -0,0 +1,21 @@
+# In this test we ensure that "backface-visiblity" property
+# is not inherited, and the red rect rotated by 180 degrees
+# is still rendered.
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ backface-visible: false
+ items:
+ - type: stacking-context
+ transform: rotate-y(180)
+ transform-origin: 50 50
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 100 100
diff --git a/third_party/webrender/wrench/reftests/backface/backface-ref.yaml b/third_party/webrender/wrench/reftests/backface/backface-ref.yaml
new file mode 100644
index 00000000000..614cf5f4652
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/backface-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
diff --git a/third_party/webrender/wrench/reftests/backface/backface-sc.yaml b/third_party/webrender/wrench/reftests/backface/backface-sc.yaml
new file mode 100644
index 00000000000..350baca592b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/backface-sc.yaml
@@ -0,0 +1,17 @@
+# This test is similar to "backface-leaf.yaml" but with the whole
+# stacking context (containing a green rect) turning invisible
+# because of the "rotate-x(180)" transform.
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 1024 768
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform: rotate-x(180)
+ backface-visible: false
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
diff --git a/third_party/webrender/wrench/reftests/backface/blank.yaml b/third_party/webrender/wrench/reftests/backface/blank.yaml
new file mode 100644
index 00000000000..c4eb3ab6730
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/third_party/webrender/wrench/reftests/backface/reftest.list b/third_party/webrender/wrench/reftests/backface/reftest.list
new file mode 100644
index 00000000000..ec21edb22f9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/backface/reftest.list
@@ -0,0 +1,7 @@
+== backface-leaf.yaml backface-leaf-ref.yaml
+== backface-3d-leaf.yaml backface-ref.yaml
+== backface-hidden.yaml backface-ref.yaml
+== backface-sc.yaml backface-ref.yaml
+== backface-picture.yaml backface-picture-ref.yaml
+== backface-double-flip.yaml blank.yaml
+== backface-both-sides.yaml backface-both-sides-ref.yaml
diff --git a/third_party/webrender/wrench/reftests/blend/blank.yaml b/third_party/webrender/wrench/reftests/blend/blank.yaml
new file mode 100644
index 00000000000..c4eb3ab6730
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/third_party/webrender/wrench/reftests/blend/darken-ref.yaml b/third_party/webrender/wrench/reftests/blend/darken-ref.yaml
new file mode 100644
index 00000000000..a83cf682444
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/darken-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [10, 20, 10]
diff --git a/third_party/webrender/wrench/reftests/blend/darken.yaml b/third_party/webrender/wrench/reftests/blend/darken.yaml
new file mode 100644
index 00000000000..2de68d87240
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/darken.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [10, 20, 30]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: darken
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [30, 20, 10]
diff --git a/third_party/webrender/wrench/reftests/blend/difference-ref.yaml b/third_party/webrender/wrench/reftests/blend/difference-ref.yaml
new file mode 100644
index 00000000000..b913384f24b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/difference-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/blend/difference-transparent-ref.yaml b/third_party/webrender/wrench/reftests/blend/difference-transparent-ref.yaml
new file mode 100644
index 00000000000..8ed801fb15b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/difference-transparent-ref.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+
+ # First blend black rect with green in place
+ # Cs = (1 - αb) x Cs + αb x B(Cb, Cs)
+ # B(Cb, Cs) = | Cb - Cs | = (0, 0, 0)
+ # 0.5 * (0, 255, 0) + 0.5 * (0, 0, 0) = (0, 127.5, 0)
+ #
+ # Now, composite the resulting color with src-over; the alpha is the original alpha for the top layer
+ # while the color is the blending result
+ # co = αs x Fa x Cs + αb x Fb x Cb - this is premultiplied
+ # αo = αs + αb x (1 – αs)
+ # Source over: Fa = 1; Fb = 1 – αs
+ # co = 0.5 * 1 * (0, 127.5, 0) + 0.5 * 0.5 * (0, 255, 0) = (0, 63.5, 0) + 0.25 * (0, 255, 0) = (0, 127.5, 0)
+ # ao = 0.5 + 0.5 * 0.5 = 0.75
+ # Co = co/ao = (0, 127.5, 0) / 0.75
+ #
+ # Now alpha composite on white background
+ # co = 0.75 * 1 * (0, 127.5, 0) / 0.75 + 1 * 0.25 * (255, 255, 255) = (0, 127.5, 0) + (63.75, 63.75, 63.75) = (63.75, 159, 63.75) = (64, 191, 64)
+ color: [64, 191, 64]
diff --git a/third_party/webrender/wrench/reftests/blend/difference-transparent.yaml b/third_party/webrender/wrench/reftests/blend/difference-transparent.yaml
new file mode 100644
index 00000000000..bd828d454aa
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/difference-transparent.yaml
@@ -0,0 +1,22 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: white
+ # this stacking context should create an isolated group for its children
+ # causing the yellow rect to not blend with the green backdrop
+ - type: stacking-context
+ blend-container: true
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 0.5]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 0.5]
diff --git a/third_party/webrender/wrench/reftests/blend/difference.yaml b/third_party/webrender/wrench/reftests/blend/difference.yaml
new file mode 100644
index 00000000000..0c8d0fcd025
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/difference.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/blend/isolated-2-ref.yaml b/third_party/webrender/wrench/reftests/blend/isolated-2-ref.yaml
new file mode 100644
index 00000000000..3226b6edda1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/isolated-2-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 130, 130]
+ color: [255, 255, 0]
+ - type: stacking-context
+ bounds: [10, 10, 130, 130]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
+ - type: stacking-context
+ bounds: [20, 20, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0]
+ - type: rect
+ bounds: [0, 0, 80, 80]
+ color: [0, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/blend/isolated-2.yaml b/third_party/webrender/wrench/reftests/blend/isolated-2.yaml
new file mode 100644
index 00000000000..87bbac3caa7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/isolated-2.yaml
@@ -0,0 +1,25 @@
+# translation of wpt/css-tests/compositing-1_dev/html/mix-blend-mode-stacking-context-creates-isolation.htm
+---
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 130, 130]
+ color: [255, 255, 0]
+ # this stacking context should create an isolated group for its children
+ # inside there should be overlapping red and green rects
+ # where they intersect should be a black rect
+ # the rects should not blend with the yellow backdrop
+ - type: stacking-context
+ blend-container: true
+ bounds: [10, 10, 130, 130]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
+ - type: stacking-context
+ bounds: [20, 20, 100, 100]
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/blend/isolated-premultiplied-2-ref.yaml b/third_party/webrender/wrench/reftests/blend/isolated-premultiplied-2-ref.yaml
new file mode 100644
index 00000000000..f5de6dc33d8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/isolated-premultiplied-2-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [229, 239, 229]
diff --git a/third_party/webrender/wrench/reftests/blend/isolated-premultiplied-2.yaml b/third_party/webrender/wrench/reftests/blend/isolated-premultiplied-2.yaml
new file mode 100644
index 00000000000..4ad5737d8cb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/isolated-premultiplied-2.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: lighten
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 100, 0, 0.1]
diff --git a/third_party/webrender/wrench/reftests/blend/isolated-premultiplied.yaml b/third_party/webrender/wrench/reftests/blend/isolated-premultiplied.yaml
new file mode 100644
index 00000000000..a8d738a389f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/isolated-premultiplied.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ # this stacking context should force its parent to be an isolated group
+ # we don't want it to actually draw anything so just make it draw a white rect
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: lighten
+ items:
+ - type: rect
+ bounds: [500, 500, 100, 100]
+ color: [255, 255, 255]
+
+ # transparent white, should be invisible
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 255, 0.5]
+ # transparent white, should be invisible
+ - type: image
+ bounds: [200, 0, 100, 100]
+ src: "transparent-white.png"
diff --git a/third_party/webrender/wrench/reftests/blend/isolated-ref.yaml b/third_party/webrender/wrench/reftests/blend/isolated-ref.yaml
new file mode 100644
index 00000000000..0f9061997ac
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/isolated-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 0]
diff --git a/third_party/webrender/wrench/reftests/blend/isolated-with-filter.yaml b/third_party/webrender/wrench/reftests/blend/isolated-with-filter.yaml
new file mode 100644
index 00000000000..483d802cc36
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/isolated-with-filter.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0]
+ # the presence of this filter shouldn't break isolated groups
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: opacity(1.0)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 0]
diff --git a/third_party/webrender/wrench/reftests/blend/isolated.yaml b/third_party/webrender/wrench/reftests/blend/isolated.yaml
new file mode 100644
index 00000000000..456adba4b94
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/isolated.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0]
+ # this stacking context should create an isolated group for its children
+ # causing the yellow rect to not blend with the green backdrop
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 0]
diff --git a/third_party/webrender/wrench/reftests/blend/large-ref.yaml b/third_party/webrender/wrench/reftests/blend/large-ref.yaml
new file mode 100644
index 00000000000..c7e8433414e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/large-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 2000 2000
+ items:
+ - type: rect
+ bounds: 0 0 2000 2000
+ color: [0, 128, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/blend/large.yaml b/third_party/webrender/wrench/reftests/blend/large.yaml
new file mode 100644
index 00000000000..81672652364
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/large.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 2000 2000
+ items:
+ - type: stacking-context
+ bounds: 0 0 2000 2000
+ mix-blend-mode: screen
+ items:
+ - type: rect
+ bounds: 0 0 2000 2000
+ color: [0, 128, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/blend/lighten-ref.yaml b/third_party/webrender/wrench/reftests/blend/lighten-ref.yaml
new file mode 100644
index 00000000000..5720f140a66
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/lighten-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [30, 20, 30]
diff --git a/third_party/webrender/wrench/reftests/blend/lighten.yaml b/third_party/webrender/wrench/reftests/blend/lighten.yaml
new file mode 100644
index 00000000000..426e2323b9c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/lighten.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [10, 20, 30]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: lighten
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [30, 20, 10]
diff --git a/third_party/webrender/wrench/reftests/blend/multi-mix-blend-mode-ref.yaml b/third_party/webrender/wrench/reftests/blend/multi-mix-blend-mode-ref.yaml
new file mode 100644
index 00000000000..ae366a09e01
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/multi-mix-blend-mode-ref.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 200
+ color: [255, 0, 0, 1]
+
+ - type: rect
+ bounds: 50 50 100 100
+ color: [255, 255, 0, 1]
+
+ - type: rect
+ bounds: 300 50 400 100
+ color: [255, 0, 255, 1]
diff --git a/third_party/webrender/wrench/reftests/blend/multi-mix-blend-mode.yaml b/third_party/webrender/wrench/reftests/blend/multi-mix-blend-mode.yaml
new file mode 100644
index 00000000000..d3ba8fcaf01
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/multi-mix-blend-mode.yaml
@@ -0,0 +1,25 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: 0 0 800 200
+ color: [255, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: 50 50 100 100
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: [0, 255, 0, 1]
+
+ - type: stacking-context
+ bounds: 300 50 100 100
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: 0 0 400 100
+ color: [0, 0, 255, 1]
diff --git a/third_party/webrender/wrench/reftests/blend/multiply-2-ref.yaml b/third_party/webrender/wrench/reftests/blend/multiply-2-ref.yaml
new file mode 100644
index 00000000000..6d4679a79d5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/multiply-2-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 128, 0]
diff --git a/third_party/webrender/wrench/reftests/blend/multiply-2.yaml b/third_party/webrender/wrench/reftests/blend/multiply-2.yaml
new file mode 100644
index 00000000000..0ad1ef35d6f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/multiply-2.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 128, 0]
diff --git a/third_party/webrender/wrench/reftests/blend/multiply-3.yaml b/third_party/webrender/wrench/reftests/blend/multiply-3.yaml
new file mode 100644
index 00000000000..05e1aa20f64
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/multiply-3.yaml
@@ -0,0 +1,20 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: multiply
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 128, 0]
diff --git a/third_party/webrender/wrench/reftests/blend/multiply-ref.yaml b/third_party/webrender/wrench/reftests/blend/multiply-ref.yaml
new file mode 100644
index 00000000000..0b9aeed9068
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/multiply-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/blend/multiply.yaml b/third_party/webrender/wrench/reftests/blend/multiply.yaml
new file mode 100644
index 00000000000..f9fa6cbb752
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/multiply.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: stacking-context
+ bounds: [25, 25, 50, 50]
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/blend/reftest.list b/third_party/webrender/wrench/reftests/blend/reftest.list
new file mode 100644
index 00000000000..e533e36ce06
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/reftest.list
@@ -0,0 +1,24 @@
+== multiply.yaml multiply-ref.yaml
+fuzzy(1,32) == multiply-2.yaml multiply-2-ref.yaml
+fuzzy(1,32) == color_targets(4) alpha_targets(0) multiply-3.yaml multiply-2-ref.yaml
+== difference.yaml difference-ref.yaml
+fuzzy(1,30000) == difference-transparent.yaml difference-transparent-ref.yaml
+== darken.yaml darken-ref.yaml
+== lighten.yaml lighten-ref.yaml
+
+fuzzy(1,32) == repeated-difference.yaml repeated-difference-ref.yaml
+
+== isolated.yaml isolated-ref.yaml
+fuzzy(3,397) == isolated-2.yaml isolated-2-ref.yaml
+== isolated-with-filter.yaml isolated-ref.yaml
+== isolated-premultiplied.yaml blank.yaml
+== isolated-premultiplied-2.yaml isolated-premultiplied-2-ref.yaml
+
+== large.yaml large-ref.yaml
+
+# fuzzy because dithering is different for gradients
+# drawn in different render targets
+fuzzy(1,2502) == transparent-composite-1.yaml transparent-composite-1-ref.yaml
+fuzzy(1,2502) == transparent-composite-2.yaml transparent-composite-2-ref.yaml
+
+fuzzy(2,324) == multi-mix-blend-mode.yaml multi-mix-blend-mode-ref.yaml
diff --git a/third_party/webrender/wrench/reftests/blend/repeated-difference-ref.yaml b/third_party/webrender/wrench/reftests/blend/repeated-difference-ref.yaml
new file mode 100644
index 00000000000..30d53325bab
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/repeated-difference-ref.yaml
@@ -0,0 +1,7 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: [0, 255, 0]
diff --git a/third_party/webrender/wrench/reftests/blend/repeated-difference.yaml b/third_party/webrender/wrench/reftests/blend/repeated-difference.yaml
new file mode 100644
index 00000000000..a04e6cb2742
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/repeated-difference.yaml
@@ -0,0 +1,31 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: [255, 255, 255]
+ - type: stacking-context
+ blend-container: true
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: stacking-context
+ mix-blend-mode: difference
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: [255, 255, 255]
+ - type: stacking-context
+ blend-container: true
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: stacking-context
+ mix-blend-mode: difference
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: [0, 255, 0]
diff --git a/third_party/webrender/wrench/reftests/blend/transparent-composite-1-ref.yaml b/third_party/webrender/wrench/reftests/blend/transparent-composite-1-ref.yaml
new file mode 100644
index 00000000000..235801c5e1e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/transparent-composite-1-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: [0, 0, 100, 100]
+ start: [0, 0]
+ end: [0, 100]
+ stops: [0.0, [0,0,0,0], 1.0, green]
diff --git a/third_party/webrender/wrench/reftests/blend/transparent-composite-1.yaml b/third_party/webrender/wrench/reftests/blend/transparent-composite-1.yaml
new file mode 100644
index 00000000000..319b6368437
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/transparent-composite-1.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: darken
+ items:
+ - type: gradient
+ bounds: [0, 0, 100, 100]
+ start: [0, 0]
+ end: [0, 100]
+ stops: [0.0, [0,0,0,0], 1.0, green]
diff --git a/third_party/webrender/wrench/reftests/blend/transparent-composite-2-ref.yaml b/third_party/webrender/wrench/reftests/blend/transparent-composite-2-ref.yaml
new file mode 100644
index 00000000000..235801c5e1e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/transparent-composite-2-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: [0, 0, 100, 100]
+ start: [0, 0]
+ end: [0, 100]
+ stops: [0.0, [0,0,0,0], 1.0, green]
diff --git a/third_party/webrender/wrench/reftests/blend/transparent-composite-2.yaml b/third_party/webrender/wrench/reftests/blend/transparent-composite-2.yaml
new file mode 100644
index 00000000000..e064f68f958
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/transparent-composite-2.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: darken
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: darken
+ items:
+ - type: gradient
+ bounds: [0, 0, 100, 100]
+ start: [0, 0]
+ end: [0, 100]
+ stops: [0.0, [0,0,0,0], 1.0, green]
diff --git a/third_party/webrender/wrench/reftests/blend/transparent-white.png b/third_party/webrender/wrench/reftests/blend/transparent-white.png
new file mode 100644
index 00000000000..6019b2b8172
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/blend/transparent-white.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/blank.yaml b/third_party/webrender/wrench/reftests/border/blank.yaml
new file mode 100644
index 00000000000..e3b000bcb2d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/blank.yaml
@@ -0,0 +1,3 @@
+---
+root:
+
diff --git a/third_party/webrender/wrench/reftests/border/border-clamp-corner-radius.png b/third_party/webrender/wrench/reftests/border/border-clamp-corner-radius.png
new file mode 100644
index 00000000000..bdeda438645
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-clamp-corner-radius.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-clamp-corner-radius.yaml b/third_party/webrender/wrench/reftests/border/border-clamp-corner-radius.yaml
new file mode 100644
index 00000000000..10859274c7d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-clamp-corner-radius.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 420, 250]
+ items:
+ - type: border
+ bounds: [ 0, 0, 200, 200 ]
+ width: 10
+ border-type: normal
+ style: solid
+ radius: 180
+ color: blue
+ - type: border
+ bounds: [ 200, 0, 200, 200 ]
+ width: 10
+ border-type: normal
+ style: solid
+ radius:
+ top-left: [180, 180]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [180, 180]
+ color: blue \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/border/border-dashed-dotted-caching.png b/third_party/webrender/wrench/reftests/border/border-dashed-dotted-caching.png
new file mode 100644
index 00000000000..652efde994c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-dashed-dotted-caching.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-dashed-dotted-caching.yaml b/third_party/webrender/wrench/reftests/border/border-dashed-dotted-caching.yaml
new file mode 100644
index 00000000000..ca224852fd3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-dashed-dotted-caching.yaml
@@ -0,0 +1,76 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+
+ - type: border
+ bounds: [ 0, 10, 25, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dashed ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 60, 200, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dashed ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 110, 300, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dashed ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 160, 400, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dashed ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 210, 500, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dashed ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 260, 25, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dotted ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 310, 200, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dotted ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 360, 300, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dotted ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 410, 400, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dotted ]
+ color: [ blue ]
+
+ - type: border
+ bounds: [ 0, 460, 500, 30 ]
+ width: [ 10 ]
+ border-type: normal
+ style: [ dotted ]
+ color: [ blue ]
diff --git a/third_party/webrender/wrench/reftests/border/border-double-1px-ref.yaml b/third_party/webrender/wrench/reftests/border/border-double-1px-ref.yaml
new file mode 100644
index 00000000000..f0c9eca1ca3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-double-1px-ref.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 20 ]
+ width: 1
+ border-type: normal
+ style: solid
+ color: red
+ - type: border
+ bounds: [ 12, 12, 96, 16 ]
+ width: 1
+ border-type: normal
+ style: solid
+ color: red
diff --git a/third_party/webrender/wrench/reftests/border/border-double-1px.yaml b/third_party/webrender/wrench/reftests/border/border-double-1px.yaml
new file mode 100644
index 00000000000..3a5f0841080
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-double-1px.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 20 ]
+ width: 3
+ border-type: normal
+ style: double
+ color: red
diff --git a/third_party/webrender/wrench/reftests/border/border-double-simple-2-ref.yaml b/third_party/webrender/wrench/reftests/border/border-double-simple-2-ref.yaml
new file mode 100644
index 00000000000..e7fa39f125b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-double-simple-2-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 500, 500 ]
+ width: [ 1 ]
+ border-type: normal
+ style: [ solid ]
+ color: [ black ]
diff --git a/third_party/webrender/wrench/reftests/border/border-double-simple-2.yaml b/third_party/webrender/wrench/reftests/border/border-double-simple-2.yaml
new file mode 100644
index 00000000000..6fa6d634cd2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-double-simple-2.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 500, 500 ]
+ width: [ 1 ]
+ border-type: normal
+ style: [ double ]
+ color: [ black ]
diff --git a/third_party/webrender/wrench/reftests/border/border-double-simple-ref.yaml b/third_party/webrender/wrench/reftests/border/border-double-simple-ref.yaml
new file mode 100644
index 00000000000..564e4df1631
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-double-simple-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 4, 4, 4, 4 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ blue, blue, blue, blue ]
+ - type: stacking-context
+ bounds: [8, 8, 34, 34]
+ items:
+ - type: border
+ bounds: [ 0, 0, 34, 34 ]
+ width: [ 4, 4, 4, 4 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ blue, blue, blue, blue ]
diff --git a/third_party/webrender/wrench/reftests/border/border-double-simple.yaml b/third_party/webrender/wrench/reftests/border/border-double-simple.yaml
new file mode 100644
index 00000000000..4830485a8f3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-double-simple.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 12, 12, 12, 12 ]
+ border-type: normal
+ style: [ double, double, double, double ]
+ color: [ blue, blue, blue, blue ]
diff --git a/third_party/webrender/wrench/reftests/border/border-gradient-nine-patch.png b/third_party/webrender/wrench/reftests/border/border-gradient-nine-patch.png
new file mode 100644
index 00000000000..7ab8c3df601
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-gradient-nine-patch.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-gradient-nine-patch.yaml b/third_party/webrender/wrench/reftests/border/border-gradient-nine-patch.yaml
new file mode 100644
index 00000000000..9a2d6991a0a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-gradient-nine-patch.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: border
+ bounds: [ 0, 0, 200, 200 ]
+ width: 30
+ border-type: gradient
+ start: [ 0, 200 ]
+ end: [ 200, 0 ]
+ stops: [ 0.0, red, 0.177, red, 0.177, yellow, 0.50, yellow, 0.50, red ]
+ slice: [ 50 ]
+ outset: 0
diff --git a/third_party/webrender/wrench/reftests/border/border-gradient-simple-ref.yaml b/third_party/webrender/wrench/reftests/border/border-gradient-simple-ref.yaml
new file mode 100644
index 00000000000..d961c120411
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-gradient-simple-ref.yaml
@@ -0,0 +1,55 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: gradient # top left
+ bounds: [ 0, 0, 10, 10]
+ start: [ 25, 0 ]
+ end: [ 25, 50 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # top right
+ bounds: [ 40, 0, 10, 10]
+ start: [ -15, 0 ]
+ end: [ -15, 50 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # bottom left
+ bounds: [ 0, 40, 10, 10]
+ start: [ 25, -40 ]
+ end: [ 25, 10 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # bottom right
+ bounds: [ 40, 40, 10, 10]
+ start: [ -15, -40 ]
+ end: [ -15, 10 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # top
+ bounds: [ 10, 0, 30, 10]
+ start: [ 15, 0 ]
+ end: [ 15, 50 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # right
+ bounds: [ 40, 10, 10, 30]
+ start: [ -15, -10 ]
+ end: [ -15, 40 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # bottom
+ bounds: [ 10, 40, 30, 10]
+ start: [ 15, -40 ]
+ end: [ 15, 10 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: gradient # left
+ bounds: [ 0, 10, 10, 30]
+ start: [ 25, -10 ]
+ end: [ 25, 40 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+
diff --git a/third_party/webrender/wrench/reftests/border/border-gradient-simple.yaml b/third_party/webrender/wrench/reftests/border/border-gradient-simple.yaml
new file mode 100644
index 00000000000..ef2d5a033a2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-gradient-simple.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: gradient
+ start: [ 25, 0 ]
+ end: [ 25, 50 ]
+ stops: [ 0.0, red, 1.0, green ]
+ outset: [ 0, 0, 0, 0 ]
diff --git a/third_party/webrender/wrench/reftests/border/border-groove-simple-ref.yaml b/third_party/webrender/wrench/reftests/border/border-groove-simple-ref.yaml
new file mode 100644
index 00000000000..9dfe5f3358e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-groove-simple-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 6, 6, 6, 6 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ 0 0 170 1.0, 0 0 255 1.0, 0 0 255 1.0, 0 0 170 1.0 ]
+ - type: stacking-context
+ bounds: [6, 6, 38, 38]
+ items:
+ - type: border
+ bounds: [ 0, 0, 38, 38 ]
+ width: [ 6, 6, 6, 6 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ 0 0 255 1.0, 0 0 170 1.0, 0 0 170 1.0, 0 0 255 1.0 ]
diff --git a/third_party/webrender/wrench/reftests/border/border-groove-simple.yaml b/third_party/webrender/wrench/reftests/border/border-groove-simple.yaml
new file mode 100644
index 00000000000..0d992d5dc68
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-groove-simple.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 12, 12, 12, 12 ]
+ border-type: normal
+ style: [ groove, groove, groove, groove ]
+ color: [ blue, blue, blue, blue ]
diff --git a/third_party/webrender/wrench/reftests/border/border-image-crash-ref.yaml b/third_party/webrender/wrench/reftests/border/border-image-crash-ref.yaml
new file mode 100644
index 00000000000..9ea9184348a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-image-crash-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 100, 100, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 32
+ image-height: 32
+ slice: [ 3, 0, 1, 36 ]
+ outset: 0
+ repeat-vertical: stretch
+ repeat-horizontal: stretch
+ fill: true
+ - type: rect
+ bounds: [ 100, 100, 192, 192 ]
+ color: white
diff --git a/third_party/webrender/wrench/reftests/border/border-image-crash.yaml b/third_party/webrender/wrench/reftests/border/border-image-crash.yaml
new file mode 100644
index 00000000000..9ea9184348a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-image-crash.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 100, 100, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 32
+ image-height: 32
+ slice: [ 3, 0, 1, 36 ]
+ outset: 0
+ repeat-vertical: stretch
+ repeat-horizontal: stretch
+ fill: true
+ - type: rect
+ bounds: [ 100, 100, 192, 192 ]
+ color: white
diff --git a/third_party/webrender/wrench/reftests/border/border-image-empty-slice-ref.png b/third_party/webrender/wrench/reftests/border/border-image-empty-slice-ref.png
new file mode 100644
index 00000000000..103fdb57f65
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-image-empty-slice-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-image-empty-slice.yaml b/third_party/webrender/wrench/reftests/border/border-image-empty-slice.yaml
new file mode 100644
index 00000000000..16f22b32f44
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-image-empty-slice.yaml
@@ -0,0 +1,50 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 20, 20, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32, 0, 32, 0 ]
+ outset: 0
+ repeat-vertical: round
+ repeat-horizontal: round
+ - type: border
+ bounds: [ 240, 20, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 0, 32, 0, 32 ]
+ outset: 0
+ repeat-vertical: round
+ repeat-horizontal: round
+ - type: border
+ bounds: [ 20, 240, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32, 0, 0, 32 ]
+ outset: 0
+ repeat-vertical: round
+ repeat-horizontal: round
+ - type: border
+ bounds: [ 240, 240, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 0, 32, 32, 0 ]
+ outset: 0
+ repeat-vertical: round
+ repeat-horizontal: round
diff --git a/third_party/webrender/wrench/reftests/border/border-image-fill-ref.png b/third_party/webrender/wrench/reftests/border/border-image-fill-ref.png
new file mode 100644
index 00000000000..41627d94557
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-image-fill-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-image-fill.yaml b/third_party/webrender/wrench/reftests/border/border-image-fill.yaml
new file mode 100644
index 00000000000..0e27b993c52
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-image-fill.yaml
@@ -0,0 +1,54 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 100, 100, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ outset: 0
+ repeat-vertical: repeat
+ repeat-horizontal: repeat
+ fill: true
+ - type: border
+ bounds: [ 300, 100, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ outset: 0
+ repeat-vertical: stretch
+ repeat-horizontal: repeat
+ fill: true
+ - type: border
+ bounds: [ 100, 300, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ outset: 0
+ repeat-vertical: repeat
+ repeat-horizontal: stretch
+ fill: true
+ - type: border
+ bounds: [ 300, 300, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ outset: 0
+ repeat-vertical: stretch
+ repeat-horizontal: stretch
+ fill: true
diff --git a/third_party/webrender/wrench/reftests/border/border-image-ref.png b/third_party/webrender/wrench/reftests/border/border-image-ref.png
new file mode 100644
index 00000000000..0ae931a7777
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-image-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-image-round-ref.png b/third_party/webrender/wrench/reftests/border/border-image-round-ref.png
new file mode 100644
index 00000000000..46a128f39e5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-image-round-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-image-round.yaml b/third_party/webrender/wrench/reftests/border/border-image-round.yaml
new file mode 100644
index 00000000000..e46a90c056b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-image-round.yaml
@@ -0,0 +1,42 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ # The pattern fits exactly a whole number of times in the border.
+ - type: border
+ bounds: [ 50, 50, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ outset: 0
+ repeat-vertical: round
+ repeat-horizontal: round
+ # The pattern has to be stretched to fit.
+ - type: border
+ bounds: [ 300, 50, 200, 200 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ outset: 0
+ repeat-vertical: round
+ repeat-horizontal: round
+ # The pattern has to be shrunk to fit.
+ - type: border
+ bounds: [ 550, 50, 180, 180 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ outset: 0
+ repeat-vertical: round
+ repeat-horizontal: round
diff --git a/third_party/webrender/wrench/reftests/border/border-image-src.png b/third_party/webrender/wrench/reftests/border/border-image-src.png
new file mode 100644
index 00000000000..128e560d90d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-image-src.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-image.yaml b/third_party/webrender/wrench/reftests/border/border-image.yaml
new file mode 100644
index 00000000000..5dbc0acb1e5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-image.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 100, 100, 192, 192 ]
+ width: 32
+ border-type: image
+ image-source: "border-image-src.png"
+ image-width: 96
+ image-height: 96
+ slice: [ 32 ]
+ outset: 0
+ repeat-vertical: stretch
+ repeat-horizontal: stretch
diff --git a/third_party/webrender/wrench/reftests/border/border-invisible-ref.yaml b/third_party/webrender/wrench/reftests/border/border-invisible-ref.yaml
new file mode 100644
index 00000000000..949868c9b2e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-invisible-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [99, 10, 1, 90]
+ color: black
diff --git a/third_party/webrender/wrench/reftests/border/border-invisible.yaml b/third_party/webrender/wrench/reftests/border/border-invisible.yaml
new file mode 100644
index 00000000000..48387862998
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-invisible.yaml
@@ -0,0 +1,17 @@
+--- # checks that invisible border corners don't render
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: border
+ bounds: [ 10, 10, 90, 90 ]
+ width: [0, 0, 0, 1]
+ border-type: normal
+ style: solid
+ radius:
+ top-left: 10
+ bottom-right: 0
+ top-right: 0
+ bottom-left: 3
+ color: [red, black, red, red]
diff --git a/third_party/webrender/wrench/reftests/border/border-no-bogus-line-ref.png b/third_party/webrender/wrench/reftests/border/border-no-bogus-line-ref.png
new file mode 100644
index 00000000000..fefa2bcbced
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-no-bogus-line-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-no-bogus-line.yaml b/third_party/webrender/wrench/reftests/border/border-no-bogus-line.yaml
new file mode 100644
index 00000000000..a030211da9a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-no-bogus-line.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: border
+ bounds: [ 10, 10, 90, 80 ]
+ width: 3
+ border-type: normal
+ style: solid
+ color: [ black, black, black, black ]
+ radius: 40.5
diff --git a/third_party/webrender/wrench/reftests/border/border-none-ref.yaml b/third_party/webrender/wrench/reftests/border/border-none-ref.yaml
new file mode 100644
index 00000000000..e011c78eb51
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-none-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: rect
+ bounds: [ 0, 0, 500, 12 ]
+ color: black
diff --git a/third_party/webrender/wrench/reftests/border/border-none.yaml b/third_party/webrender/wrench/reftests/border/border-none.yaml
new file mode 100644
index 00000000000..4b423c7da51
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-none.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 500, 500 ]
+ width: [ 12, 12, 12, 12 ]
+ border-type: normal
+ style: [ solid, none, none, none ]
+ color: [ black ]
diff --git a/third_party/webrender/wrench/reftests/border/border-overlapping-corner-ref.yaml b/third_party/webrender/wrench/reftests/border/border-overlapping-corner-ref.yaml
new file mode 100644
index 00000000000..3ffbaacc005
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-overlapping-corner-ref.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ items:
+ - type: clip
+ bounds: [ 0, 0, 200, 200 ]
+ complex:
+ - rect: [ 10, 10, 180, 180 ]
+ radius:
+ top-left: [180, 180]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [180, 180]
+ items:
+ - type: rect
+ bounds: [ 0, 0, 200, 200 ]
+ color: [ 0, 0, 255, 0.5 ]
diff --git a/third_party/webrender/wrench/reftests/border/border-overlapping-corner.yaml b/third_party/webrender/wrench/reftests/border/border-overlapping-corner.yaml
new file mode 100644
index 00000000000..08e71fabef6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-overlapping-corner.yaml
@@ -0,0 +1,17 @@
+--- # Checks that corners are clipped correctly when they overlap with an adjacent corner
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ items:
+ - type: border
+ bounds: [ 10, 10, 180, 180 ]
+ width: 90
+ border-type: normal
+ style: solid
+ radius:
+ top-left: 180
+ bottom-right: 180
+ top-right: 0
+ bottom-left: 0
+ color: [ [0, 0, 255, 0.5] ]
diff --git a/third_party/webrender/wrench/reftests/border/border-overlapping-edge-ref.yaml b/third_party/webrender/wrench/reftests/border/border-overlapping-edge-ref.yaml
new file mode 100644
index 00000000000..5cb34e5ae22
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-overlapping-edge-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 40]
+ items:
+ - type: rect
+ bounds: [ 10, 10, 100, 20 ]
+ color: [ 0, 0, 255, 0.5 ]
diff --git a/third_party/webrender/wrench/reftests/border/border-overlapping-edge.yaml b/third_party/webrender/wrench/reftests/border/border-overlapping-edge.yaml
new file mode 100644
index 00000000000..e39e06fddcd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-overlapping-edge.yaml
@@ -0,0 +1,12 @@
+--- # Checks that segments are clipped correctly when opposite edges of the border overlap
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 40]
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 20 ]
+ width: 15
+ border-type: normal
+ style: solid
+ color: [ [0, 0, 255, 0.5] ]
diff --git a/third_party/webrender/wrench/reftests/border/border-radial-gradient-nine-patch.png b/third_party/webrender/wrench/reftests/border/border-radial-gradient-nine-patch.png
new file mode 100644
index 00000000000..fd1ed84b8db
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-radial-gradient-nine-patch.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-radial-gradient-nine-patch.yaml b/third_party/webrender/wrench/reftests/border/border-radial-gradient-nine-patch.yaml
new file mode 100644
index 00000000000..d3936a7424f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-radial-gradient-nine-patch.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: border
+ bounds: [ 0, 0, 200, 200 ]
+ width: 20
+ border-type: radial-gradient
+ center: [ 100, 100 ]
+ radius: [ 200, 200 ]
+ stops: [ 0.0, red, 0.5, red, 0.5, green ]
+ slice: [ 50 ]
+ outset: 0
diff --git a/third_party/webrender/wrench/reftests/border/border-radial-gradient-simple-ref.yaml b/third_party/webrender/wrench/reftests/border/border-radial-gradient-simple-ref.yaml
new file mode 100644
index 00000000000..7c3e93fd76c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-radial-gradient-simple-ref.yaml
@@ -0,0 +1,54 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: radial-gradient # top left
+ bounds: [ 0, 0, 10, 10]
+ center: [ 25, 25 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # top right
+ bounds: [ 40, 0, 10, 10]
+ center: [ -15, 25 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # bottom left
+ bounds: [ 0, 40, 10, 10]
+ center: [ 25, -15 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # bottom right
+ bounds: [ 40, 40, 10, 10]
+ center: [ -15, -15 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # top
+ bounds: [ 10, 0, 30, 10]
+ center: [ 15, 25 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # right
+ bounds: [ 40, 10, 10, 30]
+ center: [ -15, 15 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # bottom
+ bounds: [ 10, 40, 30, 10]
+ center: [ 15, -15 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
+ - type: radial-gradient # left
+ bounds: [ 0, 10, 10, 30]
+ center: [ 25, 15 ]
+ radius: [50, 50]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
diff --git a/third_party/webrender/wrench/reftests/border/border-radial-gradient-simple.yaml b/third_party/webrender/wrench/reftests/border/border-radial-gradient-simple.yaml
new file mode 100644
index 00000000000..d5110ce4aeb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-radial-gradient-simple.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: radial-gradient
+ center: [ 25, 25 ]
+ radius: [ 50, 50 ]
+ stops: [ 0.0, red, 1.0, green ]
+ outset: [ 0, 0, 0, 0 ]
diff --git a/third_party/webrender/wrench/reftests/border/border-radii.png b/third_party/webrender/wrench/reftests/border/border-radii.png
new file mode 100644
index 00000000000..87d5b674fd9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-radii.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-radii.yaml b/third_party/webrender/wrench/reftests/border/border-radii.yaml
new file mode 100644
index 00000000000..c0b2fda968c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-radii.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: border
+ bounds: [ 10, 10, 90, 90 ]
+ width: 10
+ border-type: normal
+ style: solid
+ radius:
+ top-left: 16
+ bottom-right: 16
+ top-right: 8
+ bottom-left: 8
+ color: [ blue, blue, blue, blue ]
diff --git a/third_party/webrender/wrench/reftests/border/border-ridge-simple-ref.yaml b/third_party/webrender/wrench/reftests/border/border-ridge-simple-ref.yaml
new file mode 100644
index 00000000000..b940962d455
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-ridge-simple-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 6, 6, 6, 6 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ 0 0 255 1.0, 0 0 170 1.0, 0 0 170 1.0, 0 0 255 1.0 ]
+ - type: stacking-context
+ bounds: [6, 6, 38, 38]
+ items:
+ - type: border
+ bounds: [ 0, 0, 38, 38 ]
+ width: [ 6, 6, 6, 6 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ 0 0 170 1.0, 0 0 255 1.0, 0 0 255 1.0, 0 0 170 1.0 ]
diff --git a/third_party/webrender/wrench/reftests/border/border-ridge-simple.yaml b/third_party/webrender/wrench/reftests/border/border-ridge-simple.yaml
new file mode 100644
index 00000000000..906b40fa426
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-ridge-simple.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 12, 12, 12, 12 ]
+ border-type: normal
+ style: [ ridge, ridge, ridge, ridge ]
+ color: [ blue, blue, blue, blue ]
diff --git a/third_party/webrender/wrench/reftests/border/border-suite-2.png b/third_party/webrender/wrench/reftests/border/border-suite-2.png
new file mode 100644
index 00000000000..519e43fc52e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-suite-2.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-suite-2.yaml b/third_party/webrender/wrench/reftests/border/border-suite-2.yaml
new file mode 100644
index 00000000000..f86b20da308
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-suite-2.yaml
@@ -0,0 +1,171 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 0
+ - type: border
+ bounds: [ 120, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 10
+ - type: border
+ bounds: [ 230, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 20
+ - type: border
+ bounds: [ 340, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 30
+ - type: border
+ bounds: [ 450, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 40
+ - type: border
+ bounds: [ 560, 10, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: groove
+ color: [ red, green, blue, yellow ]
+ radius: 50
+
+ - type: border
+ bounds: [ 10, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 0
+ - type: border
+ bounds: [ 120, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 10
+ - type: border
+ bounds: [ 230, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 20
+ - type: border
+ bounds: [ 340, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 30
+ - type: border
+ bounds: [ 450, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 40
+ - type: border
+ bounds: [ 560, 120, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: ridge
+ color: [ red, green, blue, yellow ]
+ radius: 50
+
+ - type: border
+ bounds: [ 10, 230, 100, 100 ]
+ width: 1
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: 16
+ - type: border
+ bounds: [ 120, 230, 100, 100 ]
+ width: 2
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: 32
+ - type: border
+ bounds: [ 230, 230, 100, 100 ]
+ width: 3
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: 32
+ - type: border
+ bounds: [ 340, 230, 100, 100 ]
+ width: 8
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: 32
+ - type: border
+ bounds: [ 450, 230, 200, 100 ]
+ width: 4
+ border-type: normal
+ style: dotted
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [32, 48],
+ top-right: [64, 32],
+ bottom-left: [10, 40],
+ bottom-right: [48, 48],
+ }
+
+ - type: border
+ bounds: [ 10, 340, 200, 200 ]
+ width: [4, 8, 16, 8]
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [32, 64],
+ top-right: [32, 32],
+ bottom-left: [64, 32],
+ bottom-right: [32, 32],
+ }
+ - type: border
+ bounds: [ 230, 340, 200, 200 ]
+ width: 4
+ border-type: normal
+ style: dashed
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [64, 128],
+ top-right: [16, 32],
+ bottom-left: [40, 18],
+ bottom-right: [100, 50],
+ }
+ - type: border
+ bounds: [ 450, 340, 200, 100 ]
+ width: 8
+ border-type: normal
+ style: dotted
+ color: [ red, green, blue, black ]
+ radius: 32
+ - type: border
+ bounds: [ 450, 450, 200, 100 ]
+ width: [8, 8, 12, 12]
+ border-type: normal
+ style: dotted
+ color: [ red, green, blue, black ]
+ radius: 40
diff --git a/third_party/webrender/wrench/reftests/border/border-suite-3.png b/third_party/webrender/wrench/reftests/border/border-suite-3.png
new file mode 100644
index 00000000000..dcd6f5d7602
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-suite-3.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-suite-3.yaml b/third_party/webrender/wrench/reftests/border/border-suite-3.yaml
new file mode 100644
index 00000000000..2deb8210714
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-suite-3.yaml
@@ -0,0 +1,57 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: border
+ bounds: [ 10, 10, 200, 200 ]
+ width: 10
+ border-type: normal
+ style: [ solid, double, solid, double ]
+ color: [ red, green, blue, black ]
+ radius: 16
+ - type: border
+ bounds: [ 230, 10, 200, 200 ]
+ width: 16
+ border-type: normal
+ style: [ solid, double, solid, double ]
+ color: [ red, green, blue, black ]
+ - type: border
+ bounds: [ 450, 10, 200, 200 ]
+ width: 10
+ border-type: normal
+ style: [ solid, double, solid, double ]
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [32, 48],
+ top-right: [64, 32],
+ bottom-left: [10, 40],
+ bottom-right: [48, 48],
+ }
+
+ - type: border
+ bounds: [ 10, 230, 200, 200 ]
+ width: 24
+ border-type: normal
+ style: [ inset, double, ridge, groove ]
+ color: [ red, green, blue, black ]
+ radius: 16
+ - type: border
+ bounds: [ 230, 230, 200, 200 ]
+ width: 32
+ border-type: normal
+ style: [ outset, double, ridge, groove ]
+ color: [ red, green, blue, black ]
+ - type: border
+ bounds: [ 450, 230, 200, 200 ]
+ width: 18
+ border-type: normal
+ style: [ outset, double, ridge, groove ]
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [32, 48],
+ top-right: [64, 32],
+ bottom-left: [10, 40],
+ bottom-right: [48, 48],
+ }
diff --git a/third_party/webrender/wrench/reftests/border/border-suite.png b/third_party/webrender/wrench/reftests/border/border-suite.png
new file mode 100644
index 00000000000..8ab844c5856
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-suite.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/border-suite.yaml b/third_party/webrender/wrench/reftests/border/border-suite.yaml
new file mode 100644
index 00000000000..5c74679a0aa
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/border-suite.yaml
@@ -0,0 +1,351 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 100 ]
+ width: [ 1, 1, 1, 1 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+ - type: border
+ bounds: [ 120, 10, 100, 100 ]
+ width: [ 2, 2, 2, 2 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+ - type: border
+ bounds: [ 230, 10, 100, 100 ]
+ width: [ 3, 3, 3, 3 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+ - type: border
+ bounds: [ 340, 10, 100, 100 ]
+ width: [ 5, 5, 5, 5 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+ - type: border
+ bounds: [ 450, 10, 100, 100 ]
+ width: [ 5, 5, 5, 5 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+ - type: border
+ bounds: [ 560, 10, 100, 100 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: border
+ bounds: [ 10, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: inset
+ color: [ red, green, blue, black ]
+ - type: border
+ bounds: [ 120, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: outset
+ color: [ red, green, blue, black ]
+ - type: border
+ bounds: [ 230, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: inset
+ color: [ red, green, blue, black ]
+ radius: 10
+ - type: border
+ bounds: [ 340, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: outset
+ color: [ red, green, blue, black ]
+ radius: 20
+ - type: border
+ bounds: [ 450, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: outset
+ color: [ red, green, blue, black ]
+ radius: 35
+ - type: border
+ bounds: [ 560, 120, 100, 100 ]
+ width: 10
+ border-type: normal
+ style: outset
+ color: [ red, green, blue, black ]
+ radius: 50
+
+ - type: border
+ bounds: [ 10, 230, 100, 100 ]
+ width: [ 1, 1, 1, 1 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 120, 230, 100, 100 ]
+ width: [ 2, 2, 2, 2 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 230, 230, 100, 100 ]
+ width: [ 3, 3, 3, 3 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 340, 230, 100, 100 ]
+ width: [ 5, 5, 5, 5 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 450, 230, 100, 100 ]
+ width: [ 5, 5, 5, 5 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 560, 230, 100, 100 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+
+ - type: border
+ bounds: [ 10, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 120, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 230, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 340, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 450, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+ - type: border
+ bounds: [ 560, 340, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 40],
+ top-right: [30, 10],
+ bottom-left: [21, 7],
+ bottom-right: [0, 5],
+ }
+
+ - type: border
+ bounds: [ 10, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 0
+ - type: border
+ bounds: [ 120, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 10
+ - type: border
+ bounds: [ 230, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 20
+ - type: border
+ bounds: [ 340, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 30
+ - type: border
+ bounds: [ 450, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 40
+ - type: border
+ bounds: [ 560, 450, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: 50
+
+ - type: border
+ bounds: [ 10, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 0
+ - type: border
+ bounds: [ 120, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 10
+ - type: border
+ bounds: [ 230, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 20
+ - type: border
+ bounds: [ 340, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 30
+ - type: border
+ bounds: [ 450, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 40
+ - type: border
+ bounds: [ 560, 560, 100, 100 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: double
+ color: [ red, green, blue, black ]
+ radius: 50
diff --git a/third_party/webrender/wrench/reftests/border/degenerate-curve.png b/third_party/webrender/wrench/reftests/border/degenerate-curve.png
new file mode 100644
index 00000000000..9c3805e33e5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/degenerate-curve.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/degenerate-curve.yaml b/third_party/webrender/wrench/reftests/border/degenerate-curve.yaml
new file mode 100644
index 00000000000..c66ac6356f2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/degenerate-curve.yaml
@@ -0,0 +1,258 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 1024, 740]
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ "transform-style": flat
+ items:
+ - type: clip
+ bounds: [28, 18, 144, 122]
+ complex:
+ - rect: [28, 18, 144, 122]
+ radius:
+ "top-left": [61, 61]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ items:
+ - type: rect
+ color: 255 0 0 1.0000
+ bounds: [28, 18, 144, 122]
+ -
+ bounds: [28, 18, 144, 122]
+ type: border
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - none
+ radius:
+ "top-left": [61, 61]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ - type: clip
+ bounds: [28, 160, 144, 122]
+ complex:
+ - rect: [28, 160, 144, 122]
+ radius: [61, 61]
+ items:
+ - type: rect
+ bounds: [28, 160, 144, 122]
+ color: 255 0 0 1.0000
+ -
+ bounds: [28, 160, 144, 122]
+ type: border
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - none
+ radius: [61, 61]
+ - type: clip
+ bounds: [28, 302, 154, 122]
+ complex:
+ - rect: [28, 302, 154, 122]
+ radius:
+ "top-left": [0, 0]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ items:
+ - type: rect
+ bounds: [28, 302, 154, 122]
+ color: 255 0 0 1.0000
+ - type: border
+ bounds: [28, 302, 154, 122]
+ width: [18, 0, 18, 10]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - solid
+ radius:
+ "top-left": [0, 0]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ - type: clip
+ bounds: [202, 18, 145, 122]
+ complex:
+ - rect: [202, 18, 144.03334, 122]
+ radius:
+ "top-left": [61, 61]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ items:
+ - type: rect
+ bounds: [202, 18, 144.03334, 122]
+ color: 255 0 0 1.0000
+ - type: border
+ bounds: [202, 18, 144.03334, 122]
+ width: [18, 0.016666668, 18, 0.016666668]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ style: solid
+ radius:
+ "top-left": [61, 61]
+ "top-right": [61, 61]
+ "bottom-left": [0, 0]
+ "bottom-right": [61, 61]
+ - type: clip
+ bounds: [202, 160, 144, 122]
+ complex:
+ - rect: [202, 160, 144, 122]
+ radius: [61, 61]
+ items:
+ - type: rect
+ bounds: [202, 160, 144, 122]
+ color: 255 0 0 1.0000
+ - type: border
+ bounds: [202, 160, 144, 122]
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ style: solid
+ radius: [61, 61]
+ - type: clip
+ bounds: [202, 302, 154, 122]
+ complex:
+ - rect: [202, 302, 154, 122]
+ radius:
+ "top-left": [0, 0]
+ "top-right": [72, 72]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ items:
+ - type: rect
+ bounds: [202, 302, 154, 122]
+ color: 255 0 0 1.0000
+ -
+ bounds: [202, 302, 154, 122]
+ type: border
+ width: [18, 0, 18, 10]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - solid
+ radius:
+ "top-left": [0, 0]
+ "top-right": [72, 72]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ - type: clip
+ bounds: [376, 18, 144, 122]
+ complex:
+ - rect: [376, 18, 144, 122]
+ radius: [61, 61]
+ items:
+ - type: rect
+ bounds: [376, 18, 144, 122]
+ color: 255 0 0 1.0000
+ -
+ bounds: [376, 18, 144, 122]
+ type: border
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ style:
+ - solid
+ - hidden
+ - solid
+ - hidden
+ radius: [61, 61]
+ - type: clip
+ bounds: [376, 160, 144, 122]
+ complex:
+ - rect: [376, 160, 144, 122]
+ radius: [61, 61]
+ items:
+ - type: rect
+ bounds: [376, 160, 144, 122]
+ color: 255 0 0 1.0000
+ -
+ bounds: [376, 160, 144, 122]
+ clip: [-17895698, -17895698, 35791396, 35791396]
+ type: border
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - none
+ radius: [61, 61]
+ - type: clip
+ bounds: [376, 302, 144, 122]
+ complex:
+ - rect: [376, 302, 144, 122]
+ radius:
+ "top-left": [0, 0]
+ "top-right": [72, 72]
+ "bottom-left": [72, 72]
+ "bottom-right": [0, 0]
+ items:
+ - type: rect
+ bounds: [376, 302, 144, 122]
+ color: 255 0 0 1.0000
+ -
+ bounds: [376, 302, 144, 122]
+ type: border
+ width: [18, 0, 18, 0]
+ "border-type": normal
+ color:
+ - 0 0 255 1.0000
+ - 255 0 0 1.0000
+ - 0 0 255 1.0000
+ - 0 0 255 1.0000
+ style:
+ - solid
+ - none
+ - solid
+ - hidden
+ radius:
+ "top-left": [0, 0]
+ "top-right": [72, 72]
+ "bottom-left": [72, 72]
+ "bottom-right": [0, 0]
+ id: [0, 1]
+pipelines: []
diff --git a/third_party/webrender/wrench/reftests/border/discontinued-dash.png b/third_party/webrender/wrench/reftests/border/discontinued-dash.png
new file mode 100644
index 00000000000..67625e19284
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/discontinued-dash.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/discontinued-dash.yaml b/third_party/webrender/wrench/reftests/border/discontinued-dash.yaml
new file mode 100644
index 00000000000..886f9cfe59c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/discontinued-dash.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 10, 10, 300, 300]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: [ dashed, solid, solid, solid ]
+ color: [ black, black, black, black ]
diff --git a/third_party/webrender/wrench/reftests/border/dotted-corner-small-radius.png b/third_party/webrender/wrench/reftests/border/dotted-corner-small-radius.png
new file mode 100644
index 00000000000..303e1719471
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/dotted-corner-small-radius.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/dotted-corner-small-radius.yaml b/third_party/webrender/wrench/reftests/border/dotted-corner-small-radius.yaml
new file mode 100644
index 00000000000..4e40c251e4c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/dotted-corner-small-radius.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - bounds: [5, 5, 490, 490]
+ "clip-rect": [5, 5, 490, 490]
+ "backface-visible": true
+ type: border
+ width: 25
+ "border-type": normal
+ color: black
+ style: dotted
diff --git a/third_party/webrender/wrench/reftests/border/green-square.yaml b/third_party/webrender/wrench/reftests/border/green-square.yaml
new file mode 100644
index 00000000000..2f13625928c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/green-square.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: rect
+ bounds: [ 0, 0, 400, 400 ]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/border/max-scale-ref.yaml b/third_party/webrender/wrench/reftests/border/max-scale-ref.yaml
new file mode 100644
index 00000000000..0647a7a8646
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/max-scale-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: border
+ bounds: [ 0, 0, 4000, 1 ]
+ width: [ 1, 0, 0, 0 ]
+ border-type: normal
+ style: solid
+ color: red
diff --git a/third_party/webrender/wrench/reftests/border/max-scale.yaml b/third_party/webrender/wrench/reftests/border/max-scale.yaml
new file mode 100644
index 00000000000..cf292d57980
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/max-scale.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ transform: scale(3000, 1)
+ items:
+ - type: border
+ bounds: [ 0, 0, 100, 100 ]
+ width: [ 1, 0, 0, 0 ]
+ border-type: normal
+ style: solid
+ color: red
diff --git a/third_party/webrender/wrench/reftests/border/no-aa.yaml b/third_party/webrender/wrench/reftests/border/no-aa.yaml
new file mode 100644
index 00000000000..f937a865f4f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/no-aa.yaml
@@ -0,0 +1,20 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 400, 400 ]
+ width: [ 200, 200, 200, 200 ]
+ border-type: normal
+ style: solid
+ color: [ green, green, transparent, transparent ]
+ do_aa: false
+ - type: border
+ bounds: [ 0, 0, 400, 400 ]
+ width: [ 200, 200, 200, 200 ]
+ border-type: normal
+ style: solid
+ color: [ transparent, transparent, green, green ]
+ do_aa: false
diff --git a/third_party/webrender/wrench/reftests/border/overlapping.png b/third_party/webrender/wrench/reftests/border/overlapping.png
new file mode 100644
index 00000000000..38dcdc79e22
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/overlapping.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/overlapping.yaml b/third_party/webrender/wrench/reftests/border/overlapping.yaml
new file mode 100644
index 00000000000..3340411eff0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/overlapping.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: clip
+ bounds: [ 0, 0, 200, 200 ]
+ complex:
+ - rect: [ 0, 0, 200, 200 ]
+ radius:
+ top-left: [180, 180]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [180, 180]
+ items:
+ - type: rect
+ bounds: [ 0, 0, 200, 200 ]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/border/reftest.list b/third_party/webrender/wrench/reftests/border/reftest.list
new file mode 100644
index 00000000000..3b64eb89bec
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/reftest.list
@@ -0,0 +1,34 @@
+platform(linux,mac) == border-clamp-corner-radius.yaml border-clamp-corner-radius.png
+fuzzy(1,840) == border-gradient-simple.yaml border-gradient-simple-ref.yaml
+platform(linux,mac) == border-gradient-nine-patch.yaml border-gradient-nine-patch.png
+== border-radial-gradient-simple.yaml border-radial-gradient-simple-ref.yaml
+platform(linux,mac) == border-radial-gradient-nine-patch.yaml border-radial-gradient-nine-patch.png
+== border-radii.yaml border-radii.png
+== border-none.yaml border-none-ref.yaml
+fuzzy(128,69) == border-overlapping-corner.yaml border-overlapping-corner-ref.yaml
+== border-overlapping-edge.yaml border-overlapping-edge-ref.yaml
+== border-invisible.yaml border-invisible-ref.yaml
+platform(linux,mac) == border-suite.yaml border-suite.png
+platform(linux,mac) fuzzy(8,80) == border-suite-2.yaml border-suite-2.png
+platform(linux,mac) == border-suite-3.yaml border-suite-3.png
+skip_on(android,device) == border-double-simple.yaml border-double-simple-ref.yaml # Fails on Pixel2
+== border-double-simple-2.yaml border-double-simple-2-ref.yaml
+skip_on(android,device) fuzzy(64,24) == border-groove-simple.yaml border-groove-simple-ref.yaml # Fails on Pixel2
+skip_on(android,device) fuzzy(64,24) == border-ridge-simple.yaml border-ridge-simple-ref.yaml # Fails on Pixel2
+platform(linux,mac) fuzzy(1,3) == degenerate-curve.yaml degenerate-curve.png
+platform(linux,mac) == border-image.yaml border-image-ref.png
+platform(linux,mac) == border-image-empty-slice.yaml border-image-empty-slice-ref.png
+platform(linux,mac) == border-image-round.yaml border-image-round-ref.png
+== border-image-crash.yaml border-image-crash-ref.yaml
+fuzzy(1,5000) == border-image-fill.yaml border-image-fill-ref.png
+== border-no-bogus-line.yaml border-no-bogus-line-ref.png
+platform(linux,mac) == dotted-corner-small-radius.yaml dotted-corner-small-radius.png
+== overlapping.yaml overlapping.png
+== zero-width.yaml blank.yaml
+platform(linux,mac) == small-dotted-border.yaml small-dotted-border.png
+== discontinued-dash.yaml discontinued-dash.png
+platform(linux,mac) == border-dashed-dotted-caching.yaml border-dashed-dotted-caching.png
+!= small-inset-outset.yaml small-inset-outset-notref.yaml
+fuzzy(1,16) == no-aa.yaml green-square.yaml
+skip_on(android,device) == border-double-1px.yaml border-double-1px-ref.yaml # Fails on Pixel2
+== max-scale.yaml max-scale-ref.yaml
diff --git a/third_party/webrender/wrench/reftests/border/small-dotted-border.png b/third_party/webrender/wrench/reftests/border/small-dotted-border.png
new file mode 100644
index 00000000000..adfb6eff508
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/small-dotted-border.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/border/small-dotted-border.yaml b/third_party/webrender/wrench/reftests/border/small-dotted-border.yaml
new file mode 100644
index 00000000000..2fb189bce2c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/small-dotted-border.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 100, 20 ]
+ width: [ 1, 1, 1, 1 ]
+ border-type: normal
+ style: [ dotted, dotted, dotted, dotted ]
+ color: [ black, black, black, black ]
+
+ - type: border
+ bounds: [ 0, 30, 100, 20 ]
+ width: [ 2, 2, 2, 2 ]
+ border-type: normal
+ style: [ dotted, dotted, dotted, dotted ]
+ color: [ black, black, black, black ]
diff --git a/third_party/webrender/wrench/reftests/border/small-inset-outset-notref.yaml b/third_party/webrender/wrench/reftests/border/small-inset-outset-notref.yaml
new file mode 100644
index 00000000000..e55bdc84c6d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/small-inset-outset-notref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 200, 200 ]
+ width: 1
+ border-type: normal
+ style: solid
+ color: black
diff --git a/third_party/webrender/wrench/reftests/border/small-inset-outset.yaml b/third_party/webrender/wrench/reftests/border/small-inset-outset.yaml
new file mode 100644
index 00000000000..f7bc42807b5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/small-inset-outset.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 200, 200 ]
+ width: 1
+ border-type: normal
+ style: inset
+ color: black
diff --git a/third_party/webrender/wrench/reftests/border/zero-width.yaml b/third_party/webrender/wrench/reftests/border/zero-width.yaml
new file mode 100644
index 00000000000..6d12d05bf80
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/border/zero-width.yaml
@@ -0,0 +1,12 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ - type: border
+ bounds: [ 0, 0, 50, 50 ]
+ width: [ 0, 0, 0, 0 ]
+ border-type: normal
+ style: [ solid, solid, solid, solid ]
+ color: [ blue, blue, blue, blue ]
+
diff --git a/third_party/webrender/wrench/reftests/boxshadow/blank.yaml b/third_party/webrender/wrench/reftests/boxshadow/blank.yaml
new file mode 100644
index 00000000000..c4eb3ab6730
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii-ref.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii-ref.yaml
new file mode 100644
index 00000000000..5e2da4fa8a7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii-ref.yaml
@@ -0,0 +1,20 @@
+
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 0, 1, 265, 265 ]
+ color: red
+ clip-mode: outset
+ offset: 350 -1
+ blur-radius: 1
+ spread-radius: -80
+ border-radius:
+ top-left: [185, 185]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [185, 185]
+
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii.yaml
new file mode 100644
index 00000000000..ebc4b263a16
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-blurred-overlapping-radii.yaml
@@ -0,0 +1,19 @@
+
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 0, 1, 265, 265 ]
+ color: red
+ clip-mode: outset
+ offset: 350 -1
+ blur-radius: 1
+ spread-radius: -80
+ border-radius:
+ top-left: [250, 250]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [250, 250]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-border-radii.png b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-border-radii.png
new file mode 100644
index 00000000000..6143955683e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-border-radii.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-border-radii.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-border-radii.yaml
new file mode 100644
index 00000000000..d52601e0196
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-border-radii.yaml
@@ -0,0 +1,36 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 200, 50, 100, 100 ]
+ color: green
+ clip-mode: inset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 350, 50, 100, 100 ]
+ color: blue
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: [ 10, 20, 30, 40 ]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-cache.png b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-cache.png
new file mode 100644
index 00000000000..e70e13c6918
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-cache.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-cache.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-cache.yaml
new file mode 100644
index 00000000000..721c6fe4e0c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-cache.yaml
@@ -0,0 +1,98 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 50, 200, 100, 100 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 50, 350, 100, 100 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 200, 50, 100, 100 ]
+ color: green
+ clip-mode: inset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 200, 200, 100, 100 ]
+ color: green
+ clip-mode: inset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 200, 350, 100, 100 ]
+ color: green
+ clip-mode: inset
+ blur-radius: 10
+ border-radius: {
+ top-left: [20, 30],
+ top-right: [10, 30],
+ bottom-left: [50, 25],
+ bottom-right: [0, 0],
+ }
+
+ - type: box-shadow
+ bounds: [ 350, 50, 100, 100 ]
+ color: blue
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: [ 10, 20, 30, 40 ]
+
+ - type: box-shadow
+ bounds: [ 350, 200, 100, 100 ]
+ color: blue
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: [ 10, 20, 30, 40 ]
+
+ - type: box-shadow
+ bounds: [ 350, 350, 100, 100 ]
+ color: blue
+ clip-mode: outset
+ blur-radius: 10
+ border-radius: [ 10, 20, 30, 40 ]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-clip-ref.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-clip-ref.yaml
new file mode 100644
index 00000000000..7b181c80024
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-clip-ref.yaml
@@ -0,0 +1,40 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: clip
+ bounds: [0, 0, 100, 200]
+ items:
+ - type: box-shadow
+ bounds: [ 20, 20, 200, 80 ]
+ color: blue
+ offset: [10, 20]
+ clip-mode: outset
+ - type: clip
+ bounds: [200, 0, 100, 200]
+ items:
+ - type: box-shadow
+ bounds: [ 220, 20, 200, 80 ]
+ color: red
+ offset: [10, 20]
+ blur-radius: 10
+ clip-mode: outset
+ - type: clip
+ bounds: [0, 200, 100, 200]
+ items:
+ - type: box-shadow
+ bounds: [ 20, 220, 200, 80 ]
+ color: green
+ offset: [10, 20]
+ clip-mode: inset
+ - type: clip
+ bounds: [200, 200, 100, 200]
+ items:
+ - type: box-shadow
+ bounds: [ 220, 220, 200, 80 ]
+ color: yellow
+ offset: [10, 20]
+ blur-radius: 10
+ clip-mode: inset
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-clip.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-clip.yaml
new file mode 100644
index 00000000000..c027b543790
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-clip.yaml
@@ -0,0 +1,32 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 20, 20, 200, 80 ]
+ clip-rect: [0, 0, 100, 200]
+ color: blue
+ offset: [10, 20]
+ clip-mode: outset
+ - type: box-shadow
+ bounds: [ 220, 20, 200, 80 ]
+ clip-rect: [200, 0, 100, 200]
+ color: red
+ offset: [10, 20]
+ blur-radius: 10
+ clip-mode: outset
+ - type: box-shadow
+ bounds: [ 20, 220, 200, 80 ]
+ clip-rect: [0, 200, 100, 200]
+ color: green
+ offset: [10, 20]
+ clip-mode: inset
+ - type: box-shadow
+ bounds: [ 220, 220, 200, 80 ]
+ clip-rect: [200, 200, 100, 200]
+ color: yellow
+ offset: [10, 20]
+ blur-radius: 10
+ clip-mode: inset
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-empty.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-empty.yaml
new file mode 100644
index 00000000000..d3640d53f58
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-empty.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 500, 500]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 400 ]
+ blur-radius: 0
+ clip-mode: outset
+ offset: [0, 0]
+ spread-radius: 0
+ color: [255, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-huge-radius.png b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-huge-radius.png
new file mode 100644
index 00000000000..a28981ba0f9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-huge-radius.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-huge-radius.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-huge-radius.yaml
new file mode 100644
index 00000000000..9ff601af49b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-huge-radius.yaml
@@ -0,0 +1,128 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "clip-and-scroll": "root-scroll-node"
+ "backface-visible": true
+ type: "stacking-context"
+ "transform-style": flat
+ "raster-space": screen
+ filters: []
+ items:
+ -
+ bounds: [0, 148, 1368, 588]
+ "clip-rect": [0, 148, 1368, 588]
+ "clip-and-scroll": "root-scroll-node"
+ "backface-visible": true
+ type: clip
+ id: 2
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "clip-and-scroll": "root-scroll-node"
+ "backface-visible": true
+ type: "clip-chain"
+ id: 3
+ clips: [2]
+ -
+ bounds: [16, 164, 16200, 200]
+ "clip-rect": [40, 188, 1328, 216]
+ "clip-and-scroll": [2, 3]
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [16, 164, 16200, 200]
+ offset: [32, 32]
+ color: 0 0 255 1.0000
+ "blur-radius": 6
+ "spread-radius": 0
+ "border-radius":
+ "top-left": [16200, 200]
+ "top-right": [0, 0]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ "clip-mode": outset
+ -
+ bounds: [16, 164, 1352, 200]
+ "clip-rect": [16, 164, 1352, 200]
+ "clip-and-scroll": "root-scroll-node"
+ "backface-visible": true
+ type: clip
+ id: 4
+ complex:
+ -
+ rect: [16, 164, 16200, 200]
+ radius:
+ "top-left": [16200, 200]
+ "top-right": [0, 0]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ "clip-mode": clip
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "clip-and-scroll": [2, 3]
+ "backface-visible": true
+ type: "clip-chain"
+ id: 5
+ clips: [4]
+ parent: 3
+ -
+ bounds: [16, 164, 16200, 200]
+ "clip-rect": [16, 164, 16200, 200]
+ "clip-and-scroll": [4, 5]
+ "backface-visible": true
+ type: rect
+ color: 255 0 255 1.0000
+ -
+ bounds: [16, 402, 200, 200]
+ "clip-rect": [40, 426, 216, 216]
+ "clip-and-scroll": [2, 3]
+ "backface-visible": true
+ type: "box-shadow"
+ "box-bounds": [16, 402, 200, 200]
+ offset: [32, 32]
+ color: 0 255 255 1.0000
+ "blur-radius": 6
+ "spread-radius": 0
+ "border-radius":
+ "top-left": [0, 0]
+ "top-right": [200, 200]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ "clip-mode": outset
+ -
+ bounds: [16, 402, 200, 200]
+ "clip-rect": [16, 402, 200, 200]
+ "clip-and-scroll": "root-scroll-node"
+ "backface-visible": true
+ type: clip
+ id: 6
+ complex:
+ -
+ rect: [16, 402, 200, 200]
+ radius:
+ "top-left": [0, 0]
+ "top-right": [200, 200]
+ "bottom-left": [0, 0]
+ "bottom-right": [0, 0]
+ "clip-mode": clip
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "clip-and-scroll": [2, 3]
+ "backface-visible": true
+ type: "clip-chain"
+ id: 7
+ clips: [6]
+ parent: 3
+ -
+ bounds: [16, 402, 200, 200]
+ "clip-rect": [16, 402, 200, 200]
+ "clip-and-scroll": [6, 7]
+ "backface-visible": true
+ type: rect
+ color: 0 128 0 1.0000
+ id: [0, 0]
+pipelines: []
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.png b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.png
new file mode 100644
index 00000000000..edea0e497f4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.yaml
new file mode 100644
index 00000000000..0a82cb5bee0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 1500, 200]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 900, 900 ]
+ blur-radius: 5000
+ clip-mode: outset
+ offset: [10, 10]
+ spread-radius: 10
+ color: [255, 0, 0]
+ border-radius: 10
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.png b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.png
new file mode 100644
index 00000000000..a723604095d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.yaml
new file mode 100644
index 00000000000..49d53e721f6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 1500, 200]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 1500, 100 ]
+ blur-radius: 200
+ clip-mode: outset
+ offset: [10, 100]
+ spread-radius: 10
+ color: [255, 0, 0]
+ border-radius: 10
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-ref.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-ref.yaml
new file mode 100644
index 00000000000..29555c8f1dc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 500, 500]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 400 ]
+ blur-radius: 300
+ clip-mode: outset
+ offset: [0, 0]
+ spread-radius: 0
+ color: [255, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius.yaml
new file mode 100644
index 00000000000..13b2239658e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-large-blur-radius.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 500, 500]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 400 ]
+ blur-radius: 2000
+ clip-mode: outset
+ offset: [0, 0]
+ spread-radius: 0
+ color: [255, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread-radii-ref.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread-radii-ref.yaml
new file mode 100644
index 00000000000..e44008fcb50
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread-radii-ref.yaml
@@ -0,0 +1,21 @@
+# This emulates the result of box-shadow-spread.yaml without with a spread
+# amount of 0 compensated by manually inflating and offsetting the rectangle
+# and border radii.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 0, 0, 280, 280 ]
+ color: blue
+ clip-mode: outset
+ offset: 300 20
+ blur-radius: 4
+ spread-radius: 0
+ border-radius:
+ top-left: [0, 0]
+ top-right: [140, 140]
+ bottom-left: [140, 140]
+ bottom-right: [0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread-radii.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread-radii.yaml
new file mode 100644
index 00000000000..902c7d089b8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread-radii.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 0, 0, 200, 200 ]
+ color: blue
+ clip-mode: outset
+ offset: 340 60
+ blur-radius: 4
+ spread-radius: 40
+ border-radius:
+ top-left: [0, 0]
+ top-right: [100, 100]
+ bottom-left: [100, 100]
+ bottom-right: [0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread.png b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread.png
new file mode 100644
index 00000000000..6fbd03aafff
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread.yaml
new file mode 100644
index 00000000000..0add7519107
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-spread.yaml
@@ -0,0 +1,68 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 20, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 20
+
+ - type: box-shadow
+ bounds: [ 120, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 25
+
+ - type: box-shadow
+ bounds: [ 220, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 10
+
+ - type: box-shadow
+ bounds: [ 320, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 9
+
+ - type: box-shadow
+ bounds: [ 420, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 8
+
+ - type: box-shadow
+ bounds: [ 520, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 7
+
+ - type: box-shadow
+ bounds: [ 620, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 6
+
+ - type: box-shadow
+ bounds: [ 720, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 5
+
+ - type: box-shadow
+ bounds: [ 820, 20, 80, 80 ]
+ color: blue
+ clip-mode: inset
+ spread-radius: 10
+ border-radius: 4
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.png b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.png
new file mode 100644
index 00000000000..662079e9f4f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.yaml
new file mode 100644
index 00000000000..225433e4fe4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 800 ]
+ color: red
+ blur-radius: 16
+ border-radius: 32
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.png b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.png
new file mode 100644
index 00000000000..8ba78979873
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.yaml
new file mode 100644
index 00000000000..f90366b79f4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 800, 100 ]
+ color: green
+ clip-mode: inset
+ blur-radius: 16
+ border-radius: 32
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-blur.png b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-blur.png
new file mode 100644
index 00000000000..b1433cb9dbb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-blur.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-blur.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-blur.yaml
new file mode 100644
index 00000000000..29ab5a2a439
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-blur.yaml
@@ -0,0 +1,154 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ # 1st row
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 200, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ offset: 20 0
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 350, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ offset: 0 -40
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 500, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ spread-radius: 30
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 650, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ spread-radius: 30
+ offset: 50 -10
+ blur-radius: 5
+
+ # 2nd row
+ - type: box-shadow
+ bounds: [ 50, 250, 100, 100 ]
+ color: green
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 200, 250, 100, 100 ]
+ color: green
+ offset: 20 0
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 350, 250, 100, 100 ]
+ color: green
+ offset: 0 -40
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 500, 250, 100, 100 ]
+ color: green
+ spread-radius: 30
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 650, 250, 100, 100 ]
+ color: green
+ spread-radius: 30
+ offset: 50 -10
+ border-radius: 32
+ blur-radius: 5
+
+ # 3rd row
+ - type: box-shadow
+ bounds: [ 50, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 200, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 20 0
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 350, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 0 -40
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 500, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 650, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ offset: 50 -10
+ blur-radius: 5
+
+ # 4th row
+ - type: box-shadow
+ bounds: [ 50, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 200, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 20 0
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 350, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 0 -40
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 500, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ border-radius: 32
+ blur-radius: 5
+
+ - type: box-shadow
+ bounds: [ 650, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ offset: 50 -10
+ border-radius: 32
+ blur-radius: 5
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-no-blur.png b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-no-blur.png
new file mode 100644
index 00000000000..a8c3b1d0cab
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-no-blur.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-no-blur.yaml b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-no-blur.yaml
new file mode 100644
index 00000000000..8544da8cccc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/box-shadow-suite-no-blur.yaml
@@ -0,0 +1,134 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ # 1st row
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+
+ - type: box-shadow
+ bounds: [ 200, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ offset: 20 0
+
+ - type: box-shadow
+ bounds: [ 350, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ offset: 0 -40
+
+ - type: box-shadow
+ bounds: [ 500, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ spread-radius: 30
+
+ - type: box-shadow
+ bounds: [ 650, 50, 100, 100 ]
+ color: red
+ clip-mode: outset
+ spread-radius: 30
+ offset: 50 -10
+
+ # 2nd row
+ - type: box-shadow
+ bounds: [ 50, 250, 100, 100 ]
+ color: green
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 200, 250, 100, 100 ]
+ color: green
+ offset: 20 0
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 350, 250, 100, 100 ]
+ color: green
+ offset: 0 -40
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 500, 250, 100, 100 ]
+ color: green
+ spread-radius: 30
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 650, 250, 100, 100 ]
+ color: green
+ spread-radius: 30
+ offset: 50 -10
+ border-radius: 32
+
+ # 3rd row
+ - type: box-shadow
+ bounds: [ 50, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+
+ - type: box-shadow
+ bounds: [ 200, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 20 0
+
+ - type: box-shadow
+ bounds: [ 350, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 0 -40
+
+ - type: box-shadow
+ bounds: [ 500, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+
+ - type: box-shadow
+ bounds: [ 650, 450, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ offset: 50 -10
+
+ # 4th row
+ - type: box-shadow
+ bounds: [ 50, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 200, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 20 0
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 350, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ offset: 0 -40
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 500, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ border-radius: 32
+
+ - type: box-shadow
+ bounds: [ 650, 650, 100, 100 ]
+ color: red
+ clip-mode: inset
+ spread-radius: 30
+ offset: 50 -10
+ border-radius: 32
diff --git a/third_party/webrender/wrench/reftests/boxshadow/boxshadow-spread-only-ref.png b/third_party/webrender/wrench/reftests/boxshadow/boxshadow-spread-only-ref.png
new file mode 100644
index 00000000000..a05bf7314eb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/boxshadow-spread-only-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/boxshadow-spread-only.yaml b/third_party/webrender/wrench/reftests/boxshadow/boxshadow-spread-only.yaml
new file mode 100644
index 00000000000..d8dabde293c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/boxshadow-spread-only.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ items:
+ - type: box-shadow
+ bounds: [ 40, 40, 400, 400 ]
+ blur-radius: 0
+ spread-radius: 20
+ clip-mode: outset
+ border-radius: 200
+ color: black
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-alpha.png b/third_party/webrender/wrench/reftests/boxshadow/inset-alpha.png
new file mode 100644
index 00000000000..4da7a868577
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-alpha.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-alpha.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-alpha.yaml
new file mode 100644
index 00000000000..7764f0a2761
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-alpha.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 0, 0, 100, 100 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 0, 0, 100, 100 ]
+ clip-mode: inset
+ color: [255, 255, 255, 0.1]
+ blur-radius: 100
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-border-radius-ref.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-border-radius-ref.yaml
new file mode 100644
index 00000000000..62d5dd10c99
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-border-radius-ref.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: clip
+ bounds: [0, 0, 100, 100]
+ complex:
+ - rect: [ 10, 10, 80, 80 ]
+ radius: 10
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: inset
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-border-radius.png b/third_party/webrender/wrench/reftests/boxshadow/inset-border-radius.png
new file mode 100644
index 00000000000..b8e3d5034a6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-border-radius.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-border-radius.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-border-radius.yaml
new file mode 100644
index 00000000000..cb5c274f5aa
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-border-radius.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: inset
+ border-radius: 10
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-downscale.png b/third_party/webrender/wrench/reftests/boxshadow/inset-downscale.png
new file mode 100644
index 00000000000..40534805e1d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-downscale.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-downscale.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-downscale.yaml
new file mode 100644
index 00000000000..dd0c3abc2d2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-downscale.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 400, 200]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 200 ]
+ blur-radius: 50
+ clip-mode: inset
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-empty.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-empty.yaml
new file mode 100644
index 00000000000..85d2840546c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-empty.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 500, 500]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 400 ]
+ blur-radius: 0
+ clip-mode: inset
+ offset: [0, 0]
+ spread-radius: 0
+ color: [255, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-large-offset-ref.png b/third_party/webrender/wrench/reftests/boxshadow/inset-large-offset-ref.png
new file mode 100644
index 00000000000..92263830912
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-large-offset-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-large-offset.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-large-offset.yaml
new file mode 100644
index 00000000000..1cc2355d023
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-large-offset.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 500, 500]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 400, 400 ]
+ blur-radius: 1
+ clip-mode: inset
+ offset: [0, 200]
+ spread-radius: 0
+ color: [255, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-mask-region.png b/third_party/webrender/wrench/reftests/boxshadow/inset-mask-region.png
new file mode 100644
index 00000000000..5145148cd33
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-mask-region.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-mask-region.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-mask-region.yaml
new file mode 100644
index 00000000000..08f52af181a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-mask-region.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 400.1, 400.1 ]
+ color: red
+ blur-radius: 10
+ clip-mode: inset
+ border-radius: 185
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-neg-offset.png b/third_party/webrender/wrench/reftests/boxshadow/inset-neg-offset.png
new file mode 100644
index 00000000000..462d46f8503
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-neg-offset.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-neg-offset.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-neg-offset.yaml
new file mode 100644
index 00000000000..9fe63176c06
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-neg-offset.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 22, 22, 200, 80 ]
+ color: blue
+ clip-mode: inset
+ offset: -2 -2
+ blur-radius: 20
+ spread-radius: 0
+ border-radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-no-blur-radius-ref.png b/third_party/webrender/wrench/reftests/boxshadow/inset-no-blur-radius-ref.png
new file mode 100644
index 00000000000..dfc23875e3a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-no-blur-radius-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-no-blur-radius.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-no-blur-radius.yaml
new file mode 100644
index 00000000000..eb9c783718b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-no-blur-radius.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 0
+ clip-mode: inset
+ border-radius: 10
+ offset: 10 10
+ color: [255, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-offset.png b/third_party/webrender/wrench/reftests/boxshadow/inset-offset.png
new file mode 100644
index 00000000000..fed26f950ea
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-offset.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-offset.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-offset.yaml
new file mode 100644
index 00000000000..17fa232f3a6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-offset.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 22, 22, 200, 80 ]
+ color: blue
+ clip-mode: inset
+ offset: 5 5
+ blur-radius: 20
+ spread-radius: 0
+ border-radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-simple-ref.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-simple-ref.yaml
new file mode 100644
index 00000000000..526a1fa4e06
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-simple-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [0, 255, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-simple.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-simple.yaml
new file mode 100644
index 00000000000..78f6ef18c16
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-simple.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: inset
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-spread-large-ref.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-spread-large-ref.yaml
new file mode 100644
index 00000000000..bdeec79e35a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-spread-large-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [255, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-spread-large.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-spread-large.yaml
new file mode 100644
index 00000000000..05cc5e40f2a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-spread-large.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 5
+ clip-mode: inset
+ spread-radius: 200
+ color: [255, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-spread-ref.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-spread-ref.yaml
new file mode 100644
index 00000000000..76802f9db0a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-spread-ref.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [255, 255, 255]
+
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-spread.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-spread.yaml
new file mode 100644
index 00000000000..de09797dcf3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-spread.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ items:
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 5
+ clip-mode: inset
+ spread-radius: 20
+ color: [0, 0, 0]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-subpx.png b/third_party/webrender/wrench/reftests/boxshadow/inset-subpx.png
new file mode 100644
index 00000000000..b15cf63d80c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-subpx.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/inset-subpx.yaml b/third_party/webrender/wrench/reftests/boxshadow/inset-subpx.yaml
new file mode 100644
index 00000000000..22dc3f09594
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/inset-subpx.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 76, 67.5, 59.016666, 39 ]
+ offset: [30, 9]
+ blur-radius: 7
+ color: blue
+ clip-mode: inset
diff --git a/third_party/webrender/wrench/reftests/boxshadow/invalid-ref.yaml b/third_party/webrender/wrench/reftests/boxshadow/invalid-ref.yaml
new file mode 100644
index 00000000000..4f2245ccaae
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/invalid-ref.yaml
@@ -0,0 +1,5 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
diff --git a/third_party/webrender/wrench/reftests/boxshadow/invalid.yaml b/third_party/webrender/wrench/reftests/boxshadow/invalid.yaml
new file mode 100644
index 00000000000..6c1fecb9955
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/invalid.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 100, 100, 200, 10 ]
+ blur-radius: 10.5
+ offset: [15, 15]
+ spread-radius: -15
+ color: red
diff --git a/third_party/webrender/wrench/reftests/boxshadow/no-stretch.png b/third_party/webrender/wrench/reftests/boxshadow/no-stretch.png
new file mode 100644
index 00000000000..c89ec417e6a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/no-stretch.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/no-stretch.yaml b/third_party/webrender/wrench/reftests/boxshadow/no-stretch.yaml
new file mode 100644
index 00000000000..4276ffa929e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/no-stretch.yaml
@@ -0,0 +1,21 @@
+# Test that box-shadows with overlapping corners
+# are drawn with simple mode (not stretched).
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 150, 150 ]
+ color: red
+ clip-mode: outset
+ blur-radius: 2.4
+ offset: [100, 0]
+ spread-radius: -40
+ border-radius: {
+ top-left: 112,
+ top-right: 48,
+ bottom-left: 48,
+ bottom-right: 112,
+ }
diff --git a/third_party/webrender/wrench/reftests/boxshadow/overlap1.png b/third_party/webrender/wrench/reftests/boxshadow/overlap1.png
new file mode 100644
index 00000000000..0ab363f03fb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/overlap1.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/overlap1.yaml b/third_party/webrender/wrench/reftests/boxshadow/overlap1.yaml
new file mode 100644
index 00000000000..1744983da6a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/overlap1.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 50, 10, 200, 80 ]
+ color: black
+ clip-mode: outset
+ offset: 0 150
+ blur-radius: 20
+ border-radius:
+ top-left: [100, 40]
+ top-right: [0, 0]
+ bottom-left: [100, 40]
+ bottom-right: [0, 0]
+
diff --git a/third_party/webrender/wrench/reftests/boxshadow/overlap2.png b/third_party/webrender/wrench/reftests/boxshadow/overlap2.png
new file mode 100644
index 00000000000..33401618904
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/overlap2.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/overlap2.yaml b/third_party/webrender/wrench/reftests/boxshadow/overlap2.yaml
new file mode 100644
index 00000000000..59ffb2c4382
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/overlap2.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: box-shadow
+ bounds: [ 0, 0, 200, 200 ]
+ color: red
+ clip-mode: outset
+ offset: 200 0
+ blur-radius: 1
+ spread-radius: 0
+ border-radius:
+ top-left: [100, 100]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [150, 150]
+
diff --git a/third_party/webrender/wrench/reftests/boxshadow/reftest.list b/third_party/webrender/wrench/reftests/boxshadow/reftest.list
new file mode 100644
index 00000000000..92ff47e495e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/reftest.list
@@ -0,0 +1,37 @@
+!= inset-simple.yaml inset-simple-ref.yaml
+!= inset-spread.yaml inset-spread-ref.yaml
+== inset-no-blur-radius.yaml inset-no-blur-radius-ref.png
+== inset-spread-large.yaml inset-spread-large-ref.yaml
+platform(linux,mac) == inset-alpha.yaml inset-alpha.png
+platform(linux,mac) == boxshadow-spread-only.yaml boxshadow-spread-only-ref.png
+== box-shadow-clip.yaml box-shadow-clip-ref.yaml
+fuzzy(1,396) == inset-large-offset.yaml inset-large-offset-ref.png
+platform(linux,mac) == inset-border-radius.yaml inset-border-radius.png
+platform(linux,mac) == inset-offset.yaml inset-offset.png
+platform(linux,mac) == inset-neg-offset.yaml inset-neg-offset.png
+== box-shadow-empty.yaml blank.yaml
+platform(linux,mac) == box-shadow-suite-no-blur.yaml box-shadow-suite-no-blur.png
+platform(linux,mac) == box-shadow-suite-blur.yaml box-shadow-suite-blur.png
+== box-shadow-large-blur-radius.yaml box-shadow-large-blur-radius-ref.yaml
+fuzzy(1,6388) == rounding.yaml rounding-ref.yaml
+platform(linux,mac) == box-shadow-border-radii.yaml box-shadow-border-radii.png
+skip_on(android) == box-shadow-spread.yaml box-shadow-spread.png # Too wide for Android
+== box-shadow-spread-radii.yaml box-shadow-spread-radii-ref.yaml
+== invalid.yaml invalid-ref.yaml
+== inset-empty.yaml blank.yaml
+platform(linux,mac) == inset-subpx.yaml inset-subpx.png
+platform(linux,mac) fuzzy(1,4) == inset-downscale.yaml inset-downscale.png
+platform(linux,mac) fuzzy(1,979) == box-shadow-cache.yaml box-shadow-cache.png
+platform(linux,mac) fuzzy(1,685) == overlap1.yaml overlap1.png
+fuzzy(2,691) == overlap2.yaml overlap2.png
+platform(linux,mac) fuzzy(1,48) == no-stretch.yaml no-stretch.png
+platform(linux,mac) fuzzy(1,9) == box-shadow-stretch-mode-x.yaml box-shadow-stretch-mode-x.png
+platform(linux,mac) fuzzy(1,41) == box-shadow-stretch-mode-y.yaml box-shadow-stretch-mode-y.png
+platform(linux,mac) fuzzy(1,14) == inset-mask-region.yaml inset-mask-region.png
+== box-shadow-blurred-overlapping-radii.yaml box-shadow-blurred-overlapping-radii-ref.yaml
+
+fuzzy(1,5) platform(linux,mac) == box-shadow-huge-radius.yaml box-shadow-huge-radius.png
+
+platform(linux,mac) == box-shadow-large-blur-radius-2.yaml box-shadow-large-blur-radius-2.png
+platform(linux,mac) == box-shadow-large-blur-radius-3.yaml box-shadow-large-blur-radius-3.png
+platform(linux,mac) fuzzy(1,79) == scale.yaml scale.png
diff --git a/third_party/webrender/wrench/reftests/boxshadow/rounding-ref.yaml b/third_party/webrender/wrench/reftests/boxshadow/rounding-ref.yaml
new file mode 100644
index 00000000000..e6e2fb84643
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/rounding-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: rect
+ bounds: [100, 100, 500, 500]
+ color: green
+ - type: rect
+ bounds: [200, 200, 300, 300]
+ color: black
+ - type: box-shadow
+ bounds: [200, 200, 300, 300]
+ blur-radius: 20
+ clip-mode: inset
+ spread-radius: 100
+ color: green
diff --git a/third_party/webrender/wrench/reftests/boxshadow/rounding.yaml b/third_party/webrender/wrench/reftests/boxshadow/rounding.yaml
new file mode 100644
index 00000000000..8078b2e1d6f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/rounding.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: rect
+ bounds: [100, 100, 500, 500]
+ color: black
+ - type: box-shadow
+ bounds: [100, 100, 500, 500]
+ blur-radius: 20
+ clip-mode: inset
+ spread-radius: 200
+ color: green
diff --git a/third_party/webrender/wrench/reftests/boxshadow/scale.png b/third_party/webrender/wrench/reftests/boxshadow/scale.png
new file mode 100644
index 00000000000..49aa8e8e053
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/scale.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/boxshadow/scale.yaml b/third_party/webrender/wrench/reftests/boxshadow/scale.yaml
new file mode 100644
index 00000000000..12263b4eb91
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/boxshadow/scale.yaml
@@ -0,0 +1,183 @@
+# Test that box shadows are drawn with correct symmetry in
+# a variety of cases. This test checks for various scale
+# factors, in combination with box shadows clipped by the
+# screen rect. It also has come large box shadows that check
+# the symmetry still works with segmentation enabled.
+---
+root:
+ items:
+ - type: stacking-context
+ transform: scale(0.3)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 50, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.4)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 150, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.5)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 250, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.6)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 350, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.7)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 450, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.73)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 550, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.75)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 650, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.77)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 750, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.8)
+ items:
+ - type: box-shadow
+ bounds: [ -70, 850, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ items:
+ - type: box-shadow
+ bounds: [ -70, 800, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+
+ - type: stacking-context
+ transform: scale(0.3)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 50, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.4)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 150, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.5)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 250, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.6)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 350, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.7)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 450, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.73)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 550, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.75)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 650, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.77)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 750, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ transform: scale(0.8)
+ items:
+ - type: box-shadow
+ bounds: [ 50, 850, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+ - type: stacking-context
+ items:
+ - type: box-shadow
+ bounds: [ 50, 800, 100, 100 ]
+ color: black
+ blur-radius: 1
+ clip-mode: inset
+
+ - type: stacking-context
+ items:
+ - type: box-shadow
+ bounds: [ 200, -100, 600, 200 ]
+ color: black
+ blur-radius: 5
+ clip-mode: inset
+
+ - type: stacking-context
+ items:
+ - type: box-shadow
+ bounds: [ 200, 200, 600, 200 ]
+ color: black
+ blur-radius: 5
+ clip-mode: outset
diff --git a/third_party/webrender/wrench/reftests/clip/blank.yaml b/third_party/webrender/wrench/reftests/clip/blank.yaml
new file mode 100644
index 00000000000..c4eb3ab6730
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/third_party/webrender/wrench/reftests/clip/border-with-rounded-clip.png b/third_party/webrender/wrench/reftests/clip/border-with-rounded-clip.png
new file mode 100644
index 00000000000..f3400057149
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/border-with-rounded-clip.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/clip/border-with-rounded-clip.yaml b/third_party/webrender/wrench/reftests/clip/border-with-rounded-clip.yaml
new file mode 100644
index 00000000000..12785ef444d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/border-with-rounded-clip.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ -
+ bounds: [10, 10, 938, 200]
+ clip-rect: [10, 10, 938, 200]
+ type: clip
+ id: 2
+ complex:
+ -
+ rect: [10, 10, 938, 200]
+ radius: [97, 97]
+ "clip-mode": clip
+ -
+ bounds: [10, 10, 100, 200]
+ clip-and-scroll: 2
+ type: border
+ width: [100, 50, 100, 50]
+ border-type: normal
+ color: green
+ style: solid
diff --git a/third_party/webrender/wrench/reftests/clip/clip-3d-transform-ref.yaml b/third_party/webrender/wrench/reftests/clip/clip-3d-transform-ref.yaml
new file mode 100644
index 00000000000..58d66bec5ad
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-3d-transform-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ "clip-rect": [0, 0, 200, 200]
+ type: rect
+ color: green
diff --git a/third_party/webrender/wrench/reftests/clip/clip-3d-transform.yaml b/third_party/webrender/wrench/reftests/clip/clip-3d-transform.yaml
new file mode 100644
index 00000000000..f844b382ad3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-3d-transform.yaml
@@ -0,0 +1,30 @@
+# This tests that clipping works well inside of a transformation with a 3d component that
+# is still axis-aligned and lacking a perspective component. These two spaces should exist
+# within a compatible coordinate system for local clipping (no masking).
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "backface-visible": true
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ transform: [0.5, 0, -0.8660254, 0, 0, 1, 0, 0, 0.8660254, 0, 0.5, 0, 0, 0, 0, 1]
+ "transform-style": flat
+ filters: []
+ items:
+ -
+ bounds: [0, 0, 800, 400]
+ "clip-rect": [0, 0, 800, 400]
+ "backface-visible": true
+ type: clip
+ id: 2
+ "content-size": [800, 400]
+ -
+ bounds: [0, 0, 400, 200]
+ "clip-rect": [0, 0, 400, 200]
+ "backface-visible": true
+ type: rect
+ clip-and-scroll: 2
+ color: green
diff --git a/third_party/webrender/wrench/reftests/clip/clip-45-degree-rotation-ref.png b/third_party/webrender/wrench/reftests/clip/clip-45-degree-rotation-ref.png
new file mode 100644
index 00000000000..620eb49e435
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-45-degree-rotation-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/clip/clip-45-degree-rotation.yaml b/third_party/webrender/wrench/reftests/clip/clip-45-degree-rotation.yaml
new file mode 100644
index 00000000000..316f249a3e0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-45-degree-rotation.yaml
@@ -0,0 +1,32 @@
+# Test that transformed content is clipped properly by clips with a different transform.
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ type: "stacking-context"
+ transform: rotate(-45) translate(200, 0)
+ items:
+ -
+ bounds: [0, 0, 300, 300]
+ "clip-rect": [0, 0, 300, 300]
+ type: rect
+ color: red
+ -
+ bounds: [0, 0, 300, 300]
+ "clip-rect": [0, 0, 300, 300]
+ type: clip
+ id: 5
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ clip-and-scroll: 5
+ type: "stacking-context"
+ transform: rotate(45) translate(-300, 0)
+ items:
+ -
+ bounds: [0, 0, 1598, 1200]
+ "clip-rect": [0, 0, 1598, 1200]
+ type: rect
+ color: green
diff --git a/third_party/webrender/wrench/reftests/clip/clip-and-filter-with-rotation-ref.yaml b/third_party/webrender/wrench/reftests/clip/clip-and-filter-with-rotation-ref.yaml
new file mode 100644
index 00000000000..c092030714e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-and-filter-with-rotation-ref.yaml
@@ -0,0 +1,18 @@
+# Test that filtered content is clipped properly in a rotated context
+---
+root:
+ items:
+ -
+ bounds: [16, 16, 0, 0]
+ type: "reference-frame"
+ transform: rotate(10)
+ id: 7
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 324, 295]
+ type: rect
+ color: red
diff --git a/third_party/webrender/wrench/reftests/clip/clip-and-filter-with-rotation.yaml b/third_party/webrender/wrench/reftests/clip/clip-and-filter-with-rotation.yaml
new file mode 100644
index 00000000000..3c71e0148ff
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-and-filter-with-rotation.yaml
@@ -0,0 +1,35 @@
+# Test that filtered content is clipped properly in a rotated context
+---
+root:
+ items:
+ -
+ bounds: [16, 16, 0, 0]
+ type: "reference-frame"
+ transform: rotate(10)
+ id: 7
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 324, 295]
+ type: clip
+ id: 2
+ # note it's important that we use clip-node here; clip-and-scroll in yaml
+ # defaults to push/pop, but we want to specifically attach this clip-chain
+ # to the stacking context and not the children (as gecko does in the bug)
+ -
+ bounds: [0, 0, 0, 0]
+ clip-node: 2
+ type: "stacking-context"
+ filters: ["contrast(1.1)"] # any blend-style filter will do
+ items:
+ -
+ bounds: [-150, -150, 624, 624]
+ type: rect
+ color: blue
+ -
+ bounds: [0, 0, 324, 295]
+ type: rect
+ color: red
diff --git a/third_party/webrender/wrench/reftests/clip/clip-corner-overlap-ref.yaml b/third_party/webrender/wrench/reftests/clip/clip-corner-overlap-ref.yaml
new file mode 100644
index 00000000000..e9592b58317
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-corner-overlap-ref.yaml
@@ -0,0 +1,113 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: clip
+ bounds: [ 50, 50, 200, 100 ]
+ complex:
+ - rect: [ 50, 50, 200, 100 ]
+ radius:
+ top-left: [200, 100]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
+ items:
+ - type: rect
+ bounds: [ 50, 50, 200, 100 ]
+ color: blue
+ - type: clip
+ bounds: [ 50, 150, 200, 100 ]
+ complex:
+ - rect: [ 50, 150, 200, 100 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [200, 100]
+ bottom-right: [0, 0]
+ items:
+ - type: rect
+ bounds: [ 50, 150, 200, 100 ]
+ color: blue
+
+ - type: clip
+ bounds: [ 300, 50, 100, 200 ]
+ complex:
+ - rect: [ 300, 50, 100, 200 ]
+ radius:
+ top-left: [100, 200]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
+ items:
+ - type: rect
+ bounds: [ 300, 50, 100, 200 ]
+ color: green
+ - type: clip
+ bounds: [ 400, 50, 100, 200 ]
+ complex:
+ - rect: [ 400, 50, 100, 200 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [100, 200]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
+ items:
+ - type: rect
+ bounds: [ 400, 50, 100, 200 ]
+ color: green
+
+ - type: clip
+ bounds: [ 50, 300, 200, 100 ]
+ complex:
+ - rect: [ 50, 300, 200, 100 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [200, 100]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
+ items:
+ - type: rect
+ bounds: [ 50, 300, 200, 100 ]
+ color: red
+ - type: clip
+ bounds: [ 50, 400, 200, 100 ]
+ complex:
+ - rect: [ 50, 400, 200, 100 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [200, 100]
+ items:
+ - type: rect
+ bounds: [ 50, 400, 200, 100 ]
+ color: red
+
+ - type: clip
+ bounds: [ 300, 300, 100, 200 ]
+ complex:
+ - rect: [ 300, 300, 100, 200 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [100, 200]
+ bottom-right: [0, 0]
+ items:
+ - type: rect
+ bounds: [ 300, 300, 100, 200 ]
+ color: yellow
+ - type: clip
+ bounds: [ 400, 300, 100, 200 ]
+ complex:
+ - rect: [ 400, 300, 100, 200 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [0, 0]
+ bottom-right: [100, 200]
+ items:
+ - type: rect
+ bounds: [ 400, 300, 100, 200 ]
+ color: yellow
diff --git a/third_party/webrender/wrench/reftests/clip/clip-corner-overlap.yaml b/third_party/webrender/wrench/reftests/clip/clip-corner-overlap.yaml
new file mode 100644
index 00000000000..2fa2225652f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-corner-overlap.yaml
@@ -0,0 +1,61 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: clip
+ bounds: [ 50, 50, 200, 200 ]
+ complex:
+ - rect: [ 50, 50, 200, 200 ]
+ radius:
+ top-left: [200, 100]
+ top-right: [0, 0]
+ bottom-left: [200, 100]
+ bottom-right: [0, 0]
+ items:
+ - type: rect
+ bounds: [ 50, 50, 200, 200 ]
+ color: blue
+
+ - type: clip
+ bounds: [ 300, 50, 200, 200 ]
+ complex:
+ - rect: [ 300, 50, 200, 200 ]
+ radius:
+ top-left: [100, 200]
+ top-right: [100, 200]
+ bottom-left: [0, 0]
+ bottom-right: [0, 0]
+ items:
+ - type: rect
+ bounds: [ 300, 50, 200, 200 ]
+ color: green
+
+ - type: clip
+ bounds: [ 50, 300, 200, 200 ]
+ complex:
+ - rect: [ 50, 300, 200, 200 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [200, 100]
+ bottom-left: [0, 0]
+ bottom-right: [200, 100]
+ items:
+ - type: rect
+ bounds: [ 50, 300, 200, 200 ]
+ color: red
+
+ - type: clip
+ bounds: [ 300, 300, 200, 200 ]
+ complex:
+ - rect: [ 300, 300, 200, 200 ]
+ radius:
+ top-left: [0, 0]
+ top-right: [0, 0]
+ bottom-left: [100, 200]
+ bottom-right: [100, 200]
+ items:
+ - type: rect
+ bounds: [ 300, 300, 200, 200 ]
+ color: yellow
diff --git a/third_party/webrender/wrench/reftests/clip/clip-ellipse.png b/third_party/webrender/wrench/reftests/clip/clip-ellipse.png
new file mode 100644
index 00000000000..49624825573
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-ellipse.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/clip/clip-ellipse.yaml b/third_party/webrender/wrench/reftests/clip/clip-ellipse.yaml
new file mode 100644
index 00000000000..e0c93c79855
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-ellipse.yaml
@@ -0,0 +1,63 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [20, 20, 100, 100]
+ color: red
+ complex-clip:
+ rect: [20, 20, 100, 100]
+ radius: [32, 16]
+
+ - type: rect
+ bounds: [130, 20, 100, 100]
+ color: green
+ complex-clip:
+ rect: [130, 20, 100, 100]
+ radius: [32, 16]
+ clip-mode: clip-out
+
+ - type: rect
+ bounds: [20, 130, 100, 100]
+ color: red
+ complex-clip:
+ rect: [20, 130, 100, 100]
+ radius: [16, 32]
+
+ - type: rect
+ bounds: [130, 130, 100, 100]
+ color: green
+ complex-clip:
+ rect: [130, 130, 100, 100]
+ radius: [16, 32]
+ clip-mode: clip-out
+
+ - type: rect
+ bounds: [20, 240, 100, 100]
+ color: red
+ complex-clip:
+ rect: [20, 240, 100, 100]
+ radius: [128, 32]
+
+ - type: rect
+ bounds: [130, 240, 100, 100]
+ color: green
+ complex-clip:
+ rect: [130, 240, 100, 100]
+ radius: [128, 32]
+ clip-mode: clip-out
+
+ - type: rect
+ bounds: [20, 350, 100, 100]
+ color: red
+ complex-clip:
+ rect: [20, 350, 100, 100]
+ radius: [32, 128]
+
+ - type: rect
+ bounds: [130, 350, 100, 100]
+ color: green
+ complex-clip:
+ rect: [130, 350, 100, 100]
+ radius: [32, 128]
+ clip-mode: clip-out
+
diff --git a/third_party/webrender/wrench/reftests/clip/clip-empty-inner-rect-ref.yaml b/third_party/webrender/wrench/reftests/clip/clip-empty-inner-rect-ref.yaml
new file mode 100644
index 00000000000..0dea07f57dc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-empty-inner-rect-ref.yaml
@@ -0,0 +1,20 @@
+# In this case, the inner rectangle of the clip is empty, because
+# the size is 200 and each corner radius is 100.
+# The blue rect should be fully invisible
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ bounds: [0, 0, 0, 0]
+ items:
+ -
+ type: clip
+ bounds: [0, 0, 200, 200]
+ complex:
+ - rect: [ 0, 0, 200, 200 ]
+ radius: 100
+ items:
+ - type: rect
+ bounds: [ 0, 0, 200, 200 ]
+ color: red
diff --git a/third_party/webrender/wrench/reftests/clip/clip-empty-inner-rect.yaml b/third_party/webrender/wrench/reftests/clip/clip-empty-inner-rect.yaml
new file mode 100644
index 00000000000..f8165f90d32
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-empty-inner-rect.yaml
@@ -0,0 +1,28 @@
+# In this case, the inner rectangle of the clip is empty, because
+# the size is 200 and each corner radius is 100.
+# The blue rect should be fully invisible
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ bounds: [0, 0, 0, 0]
+ items:
+ -
+ type: clip
+ bounds: [0, 0, 200, 200]
+ complex:
+ - rect: [ 0, 0, 200, 200 ]
+ radius: 100
+ items:
+ - type: rect
+ bounds: [ 0, 0, 200, 200 ]
+ color: red
+ - type: "stacking-context"
+ bounds: [0, 0, 0, 0]
+ transform: translate(0, 0, 1)
+ items:
+ -
+ type: rect
+ bounds: [0, 0, 25, 25]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/clip/clip-mode.png b/third_party/webrender/wrench/reftests/clip/clip-mode.png
new file mode 100644
index 00000000000..69f2b8b4ae8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-mode.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/clip/clip-mode.yaml b/third_party/webrender/wrench/reftests/clip/clip-mode.yaml
new file mode 100644
index 00000000000..9c10cfdb3da
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-mode.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [20, 20, 100, 100]
+ color: red
+ complex-clip:
+ rect: [20, 20, 100, 100]
+ radius: 32
+
+ - type: rect
+ bounds: [130, 20, 100, 100]
+ color: green
+ complex-clip:
+ rect: [130, 20, 100, 100]
+ radius: 32
+ clip-mode: clip-out
diff --git a/third_party/webrender/wrench/reftests/clip/clip-out-rotation.yaml b/third_party/webrender/wrench/reftests/clip/clip-out-rotation.yaml
new file mode 100644
index 00000000000..43d4aa36978
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-out-rotation.yaml
@@ -0,0 +1,41 @@
+# Test that transformed content is clipped out properly by clips with a different transform.
+# Also verifies that we aren't trying to render the clip mask at all for this clip-out case.
+#
+# The clip is a 500x500 rounded cornered rectangle rotated by 15 degrees. It fully contains the
+# bounds of the red rect and has a clip-out mode (within the conservative logic of our
+# `project_inner_rect` transformation), so nothing is visible, and no mask is rendered.
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: "reference-frame"
+ id: 2
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ transform: rotate(-15) translate(200, 0)
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: clip
+ id: 5
+ complex:
+ -
+ rect: [0, 0, 500, 500]
+ radius: [5, 5]
+ clip-mode: clip-out
+ # uncomment this to see the clip area
+ #-
+ # bounds: [0, 0, 500, 500]
+ # type: rect
+ # color: green
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ clip-and-scroll: [2, 5]
+ items:
+ -
+ bounds: [225, 150, 300, 300]
+ type: rect
+ color: red
diff --git a/third_party/webrender/wrench/reftests/clip/clip-thin-rotated-ref.yaml b/third_party/webrender/wrench/reftests/clip/clip-thin-rotated-ref.yaml
new file mode 100644
index 00000000000..e09079424d5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-thin-rotated-ref.yaml
@@ -0,0 +1,13 @@
+# Test checks if a rotated clip with a long and thin rectangle would still
+# correctly affect the primitive with regards to the inner bounds.
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ items:
+ -
+ bounds: [100, 100, 14, 14]
+ type: rect
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/clip/clip-thin-rotated.yaml b/third_party/webrender/wrench/reftests/clip/clip-thin-rotated.yaml
new file mode 100644
index 00000000000..d0e626af91f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clip-thin-rotated.yaml
@@ -0,0 +1,41 @@
+# Test checks if a rotated clip with a long and thin rectangle would still
+# correctly affect the primitive with regards to the inner bounds.
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: "reference-frame"
+ id: 2
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ transform: rotate(45) translate(200, 0)
+ items:
+ -
+ bounds: [0, 0, 20, 1000]
+ type: clip
+ id: 5
+ # uncomment this to see the clip area
+ #-
+ # bounds: [0, 0, 20, 1000]
+ # type: rect
+ # color: green
+ - # we aren't supposed to see this one
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ clip-and-scroll: [2, 5]
+ items:
+ -
+ bounds: [120, 120, 10, 10]
+ type: rect
+ color: red
+ -
+ bounds: [0, 0, 0, 0]
+ type: "stacking-context"
+ clip-and-scroll: [2, 5]
+ items:
+ -
+ bounds: [100, 100, 14, 14]
+ type: rect
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/clip/clipped-occlusion-ref.yaml b/third_party/webrender/wrench/reftests/clip/clipped-occlusion-ref.yaml
new file mode 100644
index 00000000000..69a5fb06246
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clipped-occlusion-ref.yaml
@@ -0,0 +1,7 @@
+---
+root:
+ items:
+ -
+ type: rect
+ bounds: [0, 0, 500, 500]
+ color: red
diff --git a/third_party/webrender/wrench/reftests/clip/clipped-occlusion.yaml b/third_party/webrender/wrench/reftests/clip/clipped-occlusion.yaml
new file mode 100644
index 00000000000..05a055a5a3a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/clipped-occlusion.yaml
@@ -0,0 +1,23 @@
+# This is a regression test for https://bugzilla.mozilla.org/show_bug.cgi?id=1594567
+# The single clip node from the primitive inside the scroll frame will be promoted
+# to a 'shared clip' in the picture cache for the scroll frame. Ensure that this clip
+# (zero sized in this test) is included in the tile occlusion culling.
+---
+root:
+ items:
+ -
+ type: rect
+ bounds: [0, 0, 500, 500]
+ color: red
+ -
+ type: scroll-frame
+ content-size: [1000, 10000]
+ bounds: [0, -5000, 1000, 10000]
+ items:
+ - type: clip
+ bounds: [0, 0, 0, 0]
+ items:
+ -
+ bounds: [0, -5000, 1000, 10000]
+ type: rect
+ color: green
diff --git a/third_party/webrender/wrench/reftests/clip/custom-clip-chain-node-ancestors-ref.yaml b/third_party/webrender/wrench/reftests/clip/custom-clip-chain-node-ancestors-ref.yaml
new file mode 100644
index 00000000000..c84fe7a6125
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/custom-clip-chain-node-ancestors-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ -
+ bounds: [10, 10, 100, 100]
+ "clip-rect": [10, 10, 100, 100]
+ "backface-visible": true
+ type: rect
+ color: 0 255 0 1
diff --git a/third_party/webrender/wrench/reftests/clip/custom-clip-chain-node-ancestors.yaml b/third_party/webrender/wrench/reftests/clip/custom-clip-chain-node-ancestors.yaml
new file mode 100644
index 00000000000..9824da4f9ca
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/custom-clip-chain-node-ancestors.yaml
@@ -0,0 +1,32 @@
+# This test ensures that custom clip chains are not affected by the ancestors
+# of their clipping nodes. In this case the node, 3, will probably be optimized
+# away since its ancestor 2 has a tighter bounding rect. On the other hand, a
+# clip chain which includes 3 should only get the rectangle specified by that
+# node and not be affected by 2 at all.
+---
+root:
+ items:
+ -
+ bounds: [25, 25, 50, 50]
+ "clip-rect": [25, 25, 50, 50]
+ type: clip
+ id: 2
+ -
+ bounds: [10, 10, 100, 100]
+ clip-rect: [10, 10, 100, 100]
+ clip-and-scroll: 2
+ type: clip
+ id: 3
+ "content-size": [800, 1000]
+ -
+ bounds: [0, 0, 0, 0]
+ clip-rect: [0, 0, 0, 0]
+ type: "clip-chain"
+ id: 10
+ clips: [3]
+ -
+ bounds: [0, 0, 200, 200]
+ clip-rect: [0, 0, 200, 200]
+ clip-and-scroll: [root-scroll-node, 10]
+ type: rect
+ color: 0 255 0 1
diff --git a/third_party/webrender/wrench/reftests/clip/custom-clip-chains-ref.yaml b/third_party/webrender/wrench/reftests/clip/custom-clip-chains-ref.yaml
new file mode 100644
index 00000000000..e30bcfd2a4a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/custom-clip-chains-ref.yaml
@@ -0,0 +1,17 @@
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [0, 0, 200, 200]
+ complex:
+ - rect: [0, 0, 200, 200]
+ radius: {
+ top-left: 20,
+ top-right: 20,
+ bottom-left: 20,
+ bottom-right: 20,
+ }
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/clip/custom-clip-chains.yaml b/third_party/webrender/wrench/reftests/clip/custom-clip-chains.yaml
new file mode 100644
index 00000000000..62e2fde8c51
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/custom-clip-chains.yaml
@@ -0,0 +1,62 @@
+# This tests a clip chain (clipid=6) that is composed of two clips (clipid=3
+# and clipid=4) with a parent clip chain (composed of two more clips (clipid=1
+# and clipid=2). This effectively tests a "complex" clip chain that includes
+# and is applied to multiple non-hierarchical reference frames as well as
+# having a similarly complicated parent. Each clip is a rounded corner which,
+# when rotated, clips a box with all corners rounded.
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: stacking-context
+ transform: rotate(180)
+ items:
+ - type: clip
+ id: 10
+ bounds: [0, 0, 200, 200]
+ complex:
+ - rect: [0, 0, 200, 200]
+ radius: {
+ top-left: 20,
+ }
+ - type: clip
+ id: 2
+ bounds: [0, 0, 200, 200]
+ complex:
+ - rect: [0, 0, 200, 200]
+ radius: {
+ top-right: 20,
+ }
+ -
+ bounds: [0, 0, 200, 200]
+ type: stacking-context
+ transform: rotate(-90)
+ items:
+ - type: clip
+ id: 3
+ bounds: [0, 0, 200, 200]
+ complex:
+ - rect: [0, 0, 200, 200]
+ radius: {
+ bottom-left: 20,
+ }
+ - type: clip
+ id: 4
+ bounds: [0, 0, 200, 200]
+ complex:
+ - rect: [0, 0, 200, 200]
+ radius: {
+ top-left: 20,
+ }
+
+ - type: clip-chain
+ id: 5
+ clips: [10, 2]
+ - type: clip-chain
+ id: 6
+ parent: 5
+ clips: [3, 4]
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: green
+ clip-and-scroll: [root-scroll-node, 6]
diff --git a/third_party/webrender/wrench/reftests/clip/fixed-position-clipping-ref.yaml b/third_party/webrender/wrench/reftests/clip/fixed-position-clipping-ref.yaml
new file mode 100644
index 00000000000..abbc91f8978
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/fixed-position-clipping-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ -
+ bounds: [10, 10, 100, 100]
+ clip-rect: [10, 10, 100, 100]
+ type: rect
+ color: 0 255 0 1.0
+ -
+ bounds: [110, 10, 100, 100]
+ clip-rect: [110, 10, 100, 100]
+ type: rect
+ color: 0 255 0 1.0
+ id: [0, 1]
+pipelines: []
diff --git a/third_party/webrender/wrench/reftests/clip/fixed-position-clipping.yaml b/third_party/webrender/wrench/reftests/clip/fixed-position-clipping.yaml
new file mode 100644
index 00000000000..8eaa3887101
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/fixed-position-clipping.yaml
@@ -0,0 +1,49 @@
+# This test ensures that children of fixed position stacking contexts are not
+# clipped by parent clipping nodes. The contents of the fixed position stacking
+# contexts below should not be clipped by their parent clipping nodes, but
+# instead should be promoted to be children of the top-level reference frame.
+---
+root:
+ items:
+ -
+ clip-rect: [15, 15, 30, 30]
+ type: scroll-frame
+ content-size: [60, 60]
+ bounds: [15, 15, 30, 30]
+ items:
+ -
+ bounds: [10, 10, 100, 100]
+ clip-rect: [10, 10, 100, 100]
+ clip-and-scroll: root-reference-frame
+ type: stacking-context
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ clip-rect: [0, 0, 100, 100]
+ clip-and-scroll: root-reference-frame
+ type: rect
+ color: 0 255 0 1.0
+ # The same test as above, except this time the stacking context also starts its
+ # own reference frame.
+ -
+ clip-rect: [115, 15, 30, 30]
+ type: scroll-frame
+ content-size: [60, 60]
+ bounds: [115, 15, 30, 30]
+ items:
+ -
+ bounds: [110, 10, 100, 100]
+ clip-rect: [110, 10, 100, 100]
+ clip-and-scroll: root-reference-frame
+ id: 4
+ type: stacking-context
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ clip-rect: [0, 0, 100, 100]
+ clip-and-scroll: 4
+ type: rect
+ color: 0 255 0 1.0
+ id: [0, 1]
+pipelines: []
diff --git a/third_party/webrender/wrench/reftests/clip/iframe-nested-in-stacking-context-ref.yaml b/third_party/webrender/wrench/reftests/clip/iframe-nested-in-stacking-context-ref.yaml
new file mode 100644
index 00000000000..c8f3148ea54
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/iframe-nested-in-stacking-context-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 50, 100]
+ color: red
diff --git a/third_party/webrender/wrench/reftests/clip/iframe-nested-in-stacking-context.yaml b/third_party/webrender/wrench/reftests/clip/iframe-nested-in-stacking-context.yaml
new file mode 100644
index 00000000000..5976ccd5113
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/iframe-nested-in-stacking-context.yaml
@@ -0,0 +1,23 @@
+# Ensure that a stacking context with a simple clip that encloses
+# an iframe correctly propagates the stacking context clip to the
+# clip on the iframe.
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [50, 50, 50, 100]
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ clip-node: 2
+ items:
+ - type: iframe
+ id: [1, 3]
+ bounds: [0, 0, 100, 100]
+pipelines:
+ -
+ id: [1, 3]
+ items:
+ - type: rect
+ color: red
+ bounds: [0, 0, 100, 100]
diff --git a/third_party/webrender/wrench/reftests/clip/reftest.list b/third_party/webrender/wrench/reftests/clip/reftest.list
new file mode 100644
index 00000000000..8518911a9f4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/reftest.list
@@ -0,0 +1,18 @@
+ platform(linux,mac) == border-with-rounded-clip.yaml border-with-rounded-clip.png
+== clip-mode.yaml clip-mode.png
+== clip-ellipse.yaml clip-ellipse.png
+platform(linux,mac) == clip-45-degree-rotation.yaml clip-45-degree-rotation-ref.png
+== clip-3d-transform.yaml clip-3d-transform-ref.yaml
+fuzzy(1,4) == clip-corner-overlap.yaml clip-corner-overlap-ref.yaml
+fuzzy(8,60) == custom-clip-chains.yaml custom-clip-chains-ref.yaml
+== custom-clip-chain-node-ancestors.yaml custom-clip-chain-node-ancestors-ref.yaml
+== fixed-position-clipping.yaml fixed-position-clipping-ref.yaml
+platform(linux,mac) == segmentation-with-other-coordinate-system-clip.yaml segmentation-with-other-coordinate-system-clip.png
+== segmentation-across-rotation.yaml segmentation-across-rotation-ref.yaml
+skip_on(android,device) == color_targets(3) alpha_targets(1) stacking-context-clip.yaml stacking-context-clip-ref.yaml
+== snapping.yaml snapping-ref.yaml
+fuzzy(70,2400) == clip-and-filter-with-rotation.yaml clip-and-filter-with-rotation-ref.yaml
+color_targets(1) alpha_targets(0) == clip-out-rotation.yaml blank.yaml # Unexpected color targets, see bug 1580795
+== clipped-occlusion.yaml clipped-occlusion-ref.yaml
+== clip-empty-inner-rect.yaml clip-empty-inner-rect-ref.yaml
+== iframe-nested-in-stacking-context.yaml iframe-nested-in-stacking-context-ref.yaml
diff --git a/third_party/webrender/wrench/reftests/clip/segmentation-across-rotation-ref.yaml b/third_party/webrender/wrench/reftests/clip/segmentation-across-rotation-ref.yaml
new file mode 100644
index 00000000000..6d14bab91c6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/segmentation-across-rotation-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: [0, 255, 0, 1]
+ bounds: [100, 100, 100, 100]
diff --git a/third_party/webrender/wrench/reftests/clip/segmentation-across-rotation.yaml b/third_party/webrender/wrench/reftests/clip/segmentation-across-rotation.yaml
new file mode 100644
index 00000000000..c90cf79e4e8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/segmentation-across-rotation.yaml
@@ -0,0 +1,30 @@
+# This test ensures that a clip that is segmented, with segments
+# that have no intersection with the world-space outer bounds of
+# the clip rectangle render correctly. In this case the first clip
+# defines the outer bounds of the clip rectangle and the rotation
+# ensures that the inner clip isn't optimized away completely. The
+# segments of the rounded corner clip don't have any intersection at
+# all with the clip in area from the outer clip, so they shouldn't
+# affect the rendering of the green square.
+---
+root:
+ items:
+ - type: clip
+ bounds: [100, 100, 100, 100]
+ id: 2
+ -
+ type: stacking-context
+ clip-and-scroll: 2
+ transform: rotate(0.25)
+ items:
+ - type: clip
+ bounds: [0, 0, 2400, 900]
+ id: 3
+ complex:
+ - rect: [ 0, 0, 2400, 900 ]
+ radius: 50
+ - type: rect
+ color: [0, 255, 0, 1]
+ bounds: [0, 0, 2400, 900]
+ clip-and-scroll: 3
+
diff --git a/third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip-ref.yaml b/third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip-ref.yaml
new file mode 100644
index 00000000000..8627d2ed746
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ -
+ type: rect
+ color: green
+ bounds: [0, 0, 100, 100]
+ "clip-rect": [0, 0, 100, 100]
diff --git a/third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.png b/third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.png
new file mode 100644
index 00000000000..67507a2573a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.yaml b/third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.yaml
new file mode 100644
index 00000000000..db98da3a3e8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.yaml
@@ -0,0 +1,47 @@
+# This is testing whether a clip properly clips a primitive in another
+# coordinate system that is segmented.
+# See https://github.com/servo/webrender/issues/2294
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ "clip-rect": [0, 0, 100, 100]
+ type: clip
+ items:
+ -
+ type: "stacking-context"
+ transform: [0.98883086, 0.14904226, 0, 0, -0.14904226, 0.98883086, 0, 0, 0, 0, 1, 0, 1533.3134, 109.21605, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform: [0.7818315, 0.6234898, 0, 0, -0.6234898, 0.7818315, 0, 0, 0, 0, 1, 0, 132.98201, -64.04077, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform: [0.93087375, 0.36534107, 0, 0, -0.36534107, 0.93087375, 0, 0, 0, 0, 1, 0, 68.64584, -46.80194, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform: [0.8262389, 0.56332004, 0, 0, -0.56332004, 0.8262389, 0, 0, 0, 0, 1, 0, 116.458824, -61.550323, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform: [0.90096885, 0.43388373, 0, 0, -0.43388373, 0.90096885, 0, 0, 0, 0, 1, 0, 84.200554, -52.906708, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform: [0.98883086, 0.14904226, 0, 0, -0.14904226, 0.98883086, 0, 0, 0, 0, 1, 0, 25.3134, -21.78395, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform: [0.73305184, 0.68017274, 0, 0, -0.68017274, 0.73305184, 0, 0, 0, 0, 1, 0, 149.64511, -65.28949, 0, 1]
+ items:
+ -
+ bounds: [1000, 0, 1000, 1000]
+ "clip-rect": [1000, 0, 1000, 1000]
+ type: rect
+ color: green
diff --git a/third_party/webrender/wrench/reftests/clip/snapping-ref.yaml b/third_party/webrender/wrench/reftests/clip/snapping-ref.yaml
new file mode 100644
index 00000000000..7be527df93e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/snapping-ref.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 1000, 1000]
+ complex:
+ - rect: [50, 50, 100, 100]
+ radius: 16
+ items:
+ - type: rect
+ bounds: 50 50 100 100
+ color: red
+
+ - type: rect
+ bounds: 200 50 100 100
+ color: green
+
diff --git a/third_party/webrender/wrench/reftests/clip/snapping.yaml b/third_party/webrender/wrench/reftests/clip/snapping.yaml
new file mode 100644
index 00000000000..d2ad449ea91
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/snapping.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 1000, 1000]
+ complex:
+ - rect: [50.3, 50.3, 100, 100]
+ radius: 16
+ items:
+ - type: rect
+ bounds: 50.3 50.3 100 100
+ color: red
+
+ - type: rect
+ bounds: 200.3 50.3 100 100
+ color: green
+
diff --git a/third_party/webrender/wrench/reftests/clip/stacking-context-clip-ref.yaml b/third_party/webrender/wrench/reftests/clip/stacking-context-clip-ref.yaml
new file mode 100644
index 00000000000..50fb8facd46
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/stacking-context-clip-ref.yaml
@@ -0,0 +1,32 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [0, 0, 100, 100]
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius: {
+ top-left: 50,
+ top-right: 50,
+ bottom-left: 50,
+ bottom-right: 50,
+ }
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [ 0, 0, 100, 100 ]
+ color: [0, 255, 0]
+ clip-and-scroll: 2
+ - type: clip
+ id: 3
+ bounds: [120, 0, 50, 50]
+ - type: stacking-context
+ bounds: [100, 0, 100, 100]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [ 0, 0, 100, 100 ]
+ color: [0, 255, 0]
+ clip-and-scroll: 3
diff --git a/third_party/webrender/wrench/reftests/clip/stacking-context-clip.yaml b/third_party/webrender/wrench/reftests/clip/stacking-context-clip.yaml
new file mode 100644
index 00000000000..5516b65539c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/clip/stacking-context-clip.yaml
@@ -0,0 +1,36 @@
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: [0, 0, 100, 100]
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius: {
+ top-left: 50,
+ top-right: 50,
+ bottom-left: 50,
+ bottom-right: 50,
+ }
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ clip-node: 2
+ items:
+ - type: rect
+ bounds: [ 0, 0, 100, 100 ]
+ color: [0, 255, 0]
+ # The same test, but this time with hue rotation, which means that the stacking
+ # context is rendered to an intermediate surface first. Unfortunately, we cannot
+ # use a rounded clip here because we want to avoid subpixel differences and avoid
+ # relying on a PNG reference image.
+ - type: clip
+ id: 3
+ bounds: [120, 0, 50, 50]
+ - type: stacking-context
+ bounds: [100, 0, 100, 100]
+ filters: hue-rotate(90)
+ clip-node: 3
+ items:
+ - type: rect
+ bounds: [ 0, 0, 100, 100 ]
+ color: [0, 255, 0]
diff --git a/third_party/webrender/wrench/reftests/filters/backdrop-filter-basic-ref.yaml b/third_party/webrender/wrench/reftests/filters/backdrop-filter-basic-ref.yaml
new file mode 100644
index 00000000000..aec471df212
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/backdrop-filter-basic-ref.yaml
@@ -0,0 +1,11 @@
+
+# Tests that a basic invert backdrop-filter works
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ color: [0, 255, 255, 1]
+ bounds: 0 0 256 256
diff --git a/third_party/webrender/wrench/reftests/filters/backdrop-filter-basic.yaml b/third_party/webrender/wrench/reftests/filters/backdrop-filter-basic.yaml
new file mode 100644
index 00000000000..e71decc659a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/backdrop-filter-basic.yaml
@@ -0,0 +1,21 @@
+# Tests that a basic invert backdrop-filter works
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ color: [255, 0, 0, 1]
+ bounds: 0 0 256 256
+ - type: clip
+ id: 2
+ bounds: 0 0 256 256
+ clip-rect: 0 0 256 256
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: backdrop-filter
+ bounds: 0 0 256 256
+ clip-node: 2
+ filters: invert(1)
diff --git a/third_party/webrender/wrench/reftests/filters/backdrop-filter-perspective.png b/third_party/webrender/wrench/reftests/filters/backdrop-filter-perspective.png
new file mode 100644
index 00000000000..83e181e970b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/backdrop-filter-perspective.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/backdrop-filter-perspective.yaml b/third_party/webrender/wrench/reftests/filters/backdrop-filter-perspective.yaml
new file mode 100644
index 00000000000..43d29ddf1d6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/backdrop-filter-perspective.yaml
@@ -0,0 +1,28 @@
+# Tests that backdrop filter works with a perspective transform
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ perspective: 500
+ items:
+ - type: rect
+ color: [255, 255, 255, 1]
+ bounds: 0 0 1024 1024
+ - image: "firefox.png"
+ bounds: 0 0 256 256
+ - type: stacking-context
+ bounds: 50 50 0 0
+ transform: ["rotate-y(-50)", "rotate-z(-45)"]
+ items:
+ - type: clip
+ id: 2
+ bounds: 0 0 100 100
+ clip-rect: 0 0 100 100
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: backdrop-filter
+ bounds: 0 0 100 100
+ clip-and-scroll: 2
+ filters: invert(1)
diff --git a/third_party/webrender/wrench/reftests/filters/blank.yaml b/third_party/webrender/wrench/reftests/filters/blank.yaml
new file mode 100644
index 00000000000..c4eb3ab6730
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/third_party/webrender/wrench/reftests/filters/blend-clipped.png b/third_party/webrender/wrench/reftests/filters/blend-clipped.png
new file mode 100644
index 00000000000..04b63a8909f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/blend-clipped.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/blend-clipped.yaml b/third_party/webrender/wrench/reftests/filters/blend-clipped.yaml
new file mode 100644
index 00000000000..2fdb4ad51c0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/blend-clipped.yaml
@@ -0,0 +1,105 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 1887, 2081]
+ "clip-rect": [0, 0, 1887, 2081]
+ "backface-visible": true
+ type: clip
+ id: 2
+ "content-size": [1887, 2081]
+ -
+ bounds: [0, 111, 1887, 1970]
+ "clip-rect": [0, 111, 1887, 1970]
+ "backface-visible": true
+ type: clip
+ id: 3
+ "content-size": [1887, 1970]
+ -
+ bounds: [0, 111, 1887, 1971]
+ "clip-rect": [0, 111, 1887, 1971]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ type: iframe
+ id: [1, 3]
+ id: [1, 1]
+pipelines:
+ -
+ id: [1, 3]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 1887, 1971]
+ "clip-rect": [0, 0, 1887, 1971]
+ type: clip
+ id: 10
+ "content-size": [1887, 1971]
+ -
+ "clip-rect": [0, 0, 1887, 1971]
+ "clip-and-scroll": 10
+ type: "scroll-frame"
+ id: 2
+ "content-size": [1887, 1971]
+ bounds: [0, 0, 1887, 1971]
+ -
+ bounds: [0, 0, 1887, 1971]
+ "clip-rect": [0, 0, 1887, 1971]
+ "clip-and-scroll": 2
+ type: clip
+ id: 3
+ "content-size": [1887, 1971]
+ -
+ "clip-and-scroll": 3
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, -186, 1887, 239]
+ "clip-rect": [0, -186, 1887, 239]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ type: clip
+ id: 4
+ "content-size": [1887, 239]
+ -
+ bounds: [-660.45, -186, 0, 0]
+ "clip-rect": [-660.45, -186, 0, 0]
+ "clip-and-scroll": 4
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, -0.57735026, 1, 0, 0, 0, 0, 1, 0, 68.849, 0, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ filters:
+ - opacity(0.8)
+ items:
+ -
+ bounds: [0, 0, 1887, 239]
+ "clip-rect": [0, 0, 1887, 239]
+ type: clip
+ id: 5
+ "content-size": [1887, 239]
+ -
+ bounds: [0, 0, 1887, 239]
+ "clip-rect": [0, 0, 1887, 239]
+ "clip-and-scroll": 5
+ "backface-visible": true
+ type: gradient
+ start: [943.5, -0.00000000000005684342]
+ end: [943.5, 238.5]
+ "tile-size": [1887, 238.5]
+ "tile-spacing": [0, 0]
+ stops:
+ - 0
+ - 0 153 204.00002 1.0000
+ - 0.3
+ - 0 153 204.00002 1.0000
+ - 0.6
+ - 7.0000005 137 194.00002 1.0000
+ - 1
+ - 0 91 137 1.0000
+ repeat: false
diff --git a/third_party/webrender/wrench/reftests/filters/filter-blur-clamping-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-blur-clamping-ref.yaml
new file mode 100644
index 00000000000..cdc6c56a47b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-blur-clamping-ref.yaml
@@ -0,0 +1,18 @@
+# Ensures that blur clamping happens after scale factors are applied
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ filters: blur(100)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 0 255 0 1.0
+ - type: stacking-context
+ bounds: [400, 100, 300, 300]
+ filters: blur(50)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 255 0 0 1.0
diff --git a/third_party/webrender/wrench/reftests/filters/filter-blur-clamping.yaml b/third_party/webrender/wrench/reftests/filters/filter-blur-clamping.yaml
new file mode 100644
index 00000000000..614aa8ee02a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-blur-clamping.yaml
@@ -0,0 +1,30 @@
+# Ensures that blur clamping happens after scale factors are applied
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ transform: scale(10)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 300]
+ # Blur will be 20 * 10(scale) = 200 and it should then be clamped to 100
+ filters: blur(20)
+ items:
+ - type: rect
+ bounds: [0, 0, 10, 10]
+ color: 0 255 0 1.0
+ - type: stacking-context
+ bounds: [400, 100, 300, 300]
+ transform: scale(0.1)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 300]
+ # Blur should be 500 * 0.1(scale) = 50. This tests to make sure clamping
+ # does not occur before applying scale factors, otherwise 500 would be
+ # clamped to 100.
+ filters: blur(500)
+ items:
+ - type: rect
+ bounds: [0, 0, 1000, 1000]
+ color: 255 0 0 1.0
diff --git a/third_party/webrender/wrench/reftests/filters/filter-blur-huge.yaml b/third_party/webrender/wrench/reftests/filters/filter-blur-huge.yaml
new file mode 100644
index 00000000000..2f76dd289ed
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-blur-huge.yaml
@@ -0,0 +1,10 @@
+# Don't crash on very large blur radius!
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 260, 260]
+ filters: blur(1000000)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 10, 260, 260]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-blur-scaled-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-blur-scaled-ref.yaml
new file mode 100644
index 00000000000..82e5b026824
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-blur-scaled-ref.yaml
@@ -0,0 +1,11 @@
+# Ensure scales from enclosing SCs get applied to blurs
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ filters: blur(10)
+ items:
+ - type: rect
+ bounds: [50, 50, 250, 250]
+ color: 0 255 0 1.0
diff --git a/third_party/webrender/wrench/reftests/filters/filter-blur-scaled-xonly.png b/third_party/webrender/wrench/reftests/filters/filter-blur-scaled-xonly.png
new file mode 100644
index 00000000000..6bb0834bc36
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-blur-scaled-xonly.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/filter-blur-scaled-xonly.yaml b/third_party/webrender/wrench/reftests/filters/filter-blur-scaled-xonly.yaml
new file mode 100644
index 00000000000..b244741cda3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-blur-scaled-xonly.yaml
@@ -0,0 +1,16 @@
+# Ensure scales from enclosing SCs get applied to blurs. This one
+# applies a mixed-dimension scale by scaling the x-axis only.
+---
+root:
+ items:
+ - type: reference-frame
+ bounds: [0, 0, 100, 100]
+ transform: [5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: blur(2)
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: 0 255 0 1.0
diff --git a/third_party/webrender/wrench/reftests/filters/filter-blur-scaled.yaml b/third_party/webrender/wrench/reftests/filters/filter-blur-scaled.yaml
new file mode 100644
index 00000000000..b99b6c7f83e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-blur-scaled.yaml
@@ -0,0 +1,15 @@
+# Ensure scales from enclosing SCs get applied to blurs
+---
+root:
+ items:
+ - type: reference-frame
+ bounds: [0, 0, 100, 100]
+ transform: [5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: blur(2)
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: 0 255 0 1.0
diff --git a/third_party/webrender/wrench/reftests/filters/filter-blur.png b/third_party/webrender/wrench/reftests/filters/filter-blur.png
new file mode 100644
index 00000000000..067f8e4af72
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-blur.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/filter-blur.yaml b/third_party/webrender/wrench/reftests/filters/filter-blur.yaml
new file mode 100644
index 00000000000..42762f56d7b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-blur.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ filters: blur(10)
+ items:
+ - image: "firefox.png"
+ bounds: 20 20 256 256
diff --git a/third_party/webrender/wrench/reftests/filters/filter-brightness-2-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-brightness-2-ref.yaml
new file mode 100644
index 00000000000..209dfb3cc3a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-brightness-2-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 0, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-brightness-2.yaml b/third_party/webrender/wrench/reftests/filters/filter-brightness-2.yaml
new file mode 100644
index 00000000000..2bdb20aa1ab
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-brightness-2.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: brightness(0)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-brightness-3-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-brightness-3-ref.yaml
new file mode 100644
index 00000000000..3201170182a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-brightness-3-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 128, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-brightness-3.yaml b/third_party/webrender/wrench/reftests/filters/filter-brightness-3.yaml
new file mode 100644
index 00000000000..8ea1eef5a84
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-brightness-3.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: brightness(4)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 32, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-brightness-4-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-brightness-4-ref.yaml
new file mode 100644
index 00000000000..b300d2a0268
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-brightness-4-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 64, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-brightness-4.yaml b/third_party/webrender/wrench/reftests/filters/filter-brightness-4.yaml
new file mode 100644
index 00000000000..9a15b15895a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-brightness-4.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: brightness(0.25)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-brightness-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-brightness-ref.yaml
new file mode 100644
index 00000000000..98e1bf419a6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-brightness-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [64, 64, 64, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-brightness.yaml b/third_party/webrender/wrench/reftests/filters/filter-brightness.yaml
new file mode 100644
index 00000000000..65da0e0b254
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-brightness.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: brightness(2)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 255, 0.25]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-color-matrix-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-color-matrix-ref.yaml
new file mode 100644
index 00000000000..2d32e5307b8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-color-matrix-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 170]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 170]
+ color: [0, 0, 0, 1]
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: [100, 175, 136, 1]
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: rect
+ bounds: [60, 10, 50, 50]
+ color: [255, 0, 0, 1]
+ - type: rect
+ bounds: [10, 110, 50, 50]
+ color: [0, 0, 128, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-color-matrix.yaml b/third_party/webrender/wrench/reftests/filters/filter-color-matrix.yaml
new file mode 100644
index 00000000000..4deb19b779d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-color-matrix.yaml
@@ -0,0 +1,53 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 170]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 170]
+ color: [0, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 10, 50, 50]
+ filters: color-matrix( 0.393, 0.686, 0.534, 0,
+ 0.189, 0.168, 0.131, 0,
+ 0.349, 0.272, 0, 0,
+ 0, 0, 0, 1,
+ 0, 0, 0, 0 )
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 60, 50, 50]
+ filters: color-matrix( -1, 0, 0, 0,
+ 0, -1, 0, 0,
+ 0, 0, -1, 0,
+ 0, 0, 0, 1,
+ 1, 1, 1, 0 )
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 0, 1]
+ - type: stacking-context
+ bounds: [60, 10, 50, 50]
+ filters: color-matrix( 0, 0, 1, 0,
+ 0, 1, 0, 0,
+ 1, 0, 0, 0,
+ 0, 0, 0, 1,
+ 0, 0, 0, 0 )
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 1]
+ - type: stacking-context
+ bounds: [10, 110, 50, 50]
+ filters: color-matrix( 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0.5,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0 )
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-component-transfer-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-component-transfer-ref.yaml
new file mode 100644
index 00000000000..e578f95b391
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-component-transfer-ref.yaml
@@ -0,0 +1,51 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 170, 250]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: rect
+ bounds: [0, 50, 50, 50]
+ color: [0, 255, 141, 1]
+ - type: rect
+ bounds: [0, 100, 50, 50]
+ color: [255, 255, 0, 1]
+ - type: rect
+ bounds: [0, 150, 50, 50]
+ color: [191, 128, 128, 1]
+ - type: rect
+ bounds: [0, 200, 50, 50]
+ color: [0, 255, 24, 1]
+ - type: rect
+ bounds: [60, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: rect
+ bounds: [60, 50, 50, 50]
+ color: [255, 255, 255, 1]
+ - type: rect
+ bounds: [60, 100, 50, 50]
+ color: [255, 255, 255, 1]
+ - type: rect
+ bounds: [60, 150, 50, 50]
+ color: [223, 191, 191, 1]
+ - type: rect
+ bounds: [60, 200, 50, 50]
+ color: [191, 255, 197, 1]
+ - type: rect
+ bounds: [120, 0, 50, 50]
+ color: [255, 127, 255, 1]
+ - type: rect
+ bounds: [120, 50, 50, 50]
+ color: [128, 255, 198, 1]
+ - type: rect
+ bounds: [120, 100, 50, 50]
+ color: [255, 255, 255, 1]
+ - type: rect
+ bounds: [120, 150, 50, 50]
+ color: [239, 223, 223, 1]
+ - type: rect
+ bounds: [120, 200, 50, 50]
+ color: [63, 255, 81, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-component-transfer.yaml b/third_party/webrender/wrench/reftests/filters/filter-component-transfer.yaml
new file mode 100644
index 00000000000..a573b5587ef
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-component-transfer.yaml
@@ -0,0 +1,352 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 170, 250]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: stacking-context
+ bounds: [0, 50, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Identity
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 1]
+ - type: stacking-context
+ bounds: [0, 100, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Identity
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 1]
+ - type: stacking-context
+ bounds: [0, 150, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Identity
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 1]
+ - type: stacking-context
+ bounds: [0, 200, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Identity
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 1]
+ - type: stacking-context
+ bounds: [60, 0, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: stacking-context
+ bounds: [60, 50, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Table
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 1]
+ - type: stacking-context
+ bounds: [60, 100, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Discrete
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 1]
+ - type: stacking-context
+ bounds: [60, 150, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Linear
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - - "0.5"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 1]
+ - type: stacking-context
+ bounds: [60, 200, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Gamma
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - - "2"
+ - "1"
+ - "-1.75"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 1]
+ - type: stacking-context
+ bounds: [120, 0, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 0.5]
+ - type: stacking-context
+ bounds: [120, 50, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Table
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 0.5]
+ - type: stacking-context
+ bounds: [120, 100, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Discrete
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 0.5]
+ - type: stacking-context
+ bounds: [120, 150, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Linear
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - - "0.5"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 0.5]
+ - type: stacking-context
+ bounds: [120, 200, 50, 50]
+ filters:
+ - component-transfer
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Gamma
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - - "2"
+ - "1"
+ - "-0.25"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 0.5]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-contrast-gray-alpha-1-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-contrast-gray-alpha-1-ref.yaml
new file mode 100644
index 00000000000..6b176d9570e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-contrast-gray-alpha-1-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [255, 255, 255, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [223, 223, 223, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-contrast-gray-alpha-1.yaml b/third_party/webrender/wrench/reftests/filters/filter-contrast-gray-alpha-1.yaml
new file mode 100644
index 00000000000..87758d3f4a2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-contrast-gray-alpha-1.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: contrast(0)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [128, 128, 128, 0.25]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-blur-clamping-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-blur-clamping-ref.yaml
new file mode 100644
index 00000000000..6ffcde5f5b9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-blur-clamping-ref.yaml
@@ -0,0 +1,18 @@
+# Ensures that blur clamping happens after scale factors are applied
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ filters: drop-shadow([0, 0], 100, blue)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 0 255 0 1.0
+ - type: stacking-context
+ bounds: [400, 100, 300, 300]
+ filters: drop-shadow([0, 0], 50, green)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 255 0 0 1.0
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-blur-clamping.yaml b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-blur-clamping.yaml
new file mode 100644
index 00000000000..1d7157a8e63
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-blur-clamping.yaml
@@ -0,0 +1,30 @@
+# Ensures that blur clamping happens after scale factors are applied
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ transform: scale(10)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 300]
+ # Blur will be 20 * 10(scale) = 200 and it should then be clamped to 100
+ filters: drop-shadow([0, 0], 20, blue)
+ items:
+ - type: rect
+ bounds: [0, 0, 10, 10]
+ color: 0 255 0 1.0
+ - type: stacking-context
+ bounds: [400, 100, 300, 300]
+ transform: scale(0.1)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 300]
+ # Blur should be 500 * 0.1(scale) = 50. This tests to make sure clamping
+ # does not occur before applying scale factors, otherwise 500 would be
+ # clamped to 100.
+ filters: drop-shadow([0, 0], 500, green)
+ items:
+ - type: rect
+ bounds: [0, 0, 1000, 1000]
+ color: 255 0 0 1.0
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-2.png b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-2.png
new file mode 100644
index 00000000000..f58e15c5fcc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-2.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml
new file mode 100644
index 00000000000..6aafa731372
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-2.yaml
@@ -0,0 +1,17 @@
+# Bug 1561447: If a clip task is created for a picture, it should take into account the rect of the drop shadow
+---
+root:
+ items:
+ - type: clip
+ id: 2
+ bounds: 10 0 300 300
+ clip-rect: 10 0 300 300
+ - type: stacking-context
+ bounds: 30 30 0 0
+ transform: rotate-z(-45)
+ filters: drop-shadow([15, 0], 0, red)
+ clip-node: 2
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-3.png b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-3.png
new file mode 100644
index 00000000000..4583f5f730c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-3.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml
new file mode 100644
index 00000000000..4b9ad3d36eb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml
@@ -0,0 +1,37 @@
+---
+# WebRender internally clips the stacking context to avoid
+# rendering parts that are off-screen. It has to take shadow
+# offsets into account.
+# This test introduces a 90 degrees rotation to ensure that
+# the clip inflation isn't done in the wrong space.
+root:
+ items:
+ # Rotation inside of the shadowed stacking context.
+ - type: stacking-context
+ bounds: [0, -10, 200, 100]
+ filters: drop-shadow([-10, 200], 5, red)
+ items:
+ - type: stacking-context
+ bounds: [50, -10, 200, 100]
+ transform: rotate-z(-90)
+ items:
+ -
+ bounds: [0, 0, 500, 150]
+ glyphs: [55, 75, 76, 86]
+ offsets: [0, 100, 75, 100, 150, 100, 180, 100]
+ size: 90
+ color: blue
+ font: "../text/VeraBd.ttf"
+ # Rotation applied to the shadowed stacking context directly.
+ - type: stacking-context
+ bounds: [150, 35, 200, 100]
+ filters: drop-shadow([200, 10], 5, red)
+ transform: rotate-z(-90)
+ items:
+ -
+ bounds: [0, 0, 500, 150]
+ glyphs: [55, 75, 76, 86]
+ offsets: [0, 100, 75, 100, 150, 100, 180, 100]
+ size: 90
+ color: blue
+ font: "../text/VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip.png b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip.png
new file mode 100644
index 00000000000..36db8671428
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip.yaml b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip.yaml
new file mode 100644
index 00000000000..c36a4c6847a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-clip.yaml
@@ -0,0 +1,25 @@
+---
+root:
+ items:
+ - type: clip
+ id: 3
+ bounds: [0, 0, 256, 256]
+ complex:
+ - rect: [0, 0, 256, 256]
+ radius: 16
+ - type: clip-chain
+ id: 5
+ clips: [3]
+ - type: clip
+ id: 4
+ bounds: [100, 100, 2000, 2000]
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 0, 0]
+ filters: drop-shadow([50, 50], 25, red)
+ clip-node: 4
+ items:
+ - type: rect
+ bounds: 0 0 256 256
+ color: green
+ clip-and-scroll: [root-scroll-node, 5]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-huge.yaml b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-huge.yaml
new file mode 100644
index 00000000000..dc971a7d3a7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-huge.yaml
@@ -0,0 +1,10 @@
+# Don't crash on very large blur radius!
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 260, 260]
+ filters: drop-shadow([73, 73], 10000000, [255, 0, 0, 1])
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 10, 260, 260]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.png b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.png
new file mode 100644
index 00000000000..f529db8b01d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.yaml b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.yaml
new file mode 100644
index 00000000000..663c03a0de4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-on-viewport-edge.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 400, 400]
+ filters: drop-shadow([10, 10], 20, [255, 0, 0, 1])
+ items:
+ - type: rect
+ bounds: 0 0 256 256
+ color: green
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-scaled-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-scaled-ref.yaml
new file mode 100644
index 00000000000..9173528be48
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-scaled-ref.yaml
@@ -0,0 +1,11 @@
+# Ensure scales from enclosing SCs get applied to drop-shadows
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ filters: drop-shadow([0, 0], 10, [255, 0, 0, 1])
+ items:
+ - type: rect
+ bounds: [50, 50, 250, 250]
+ color: 0 255 0 1.0
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-scaled.yaml b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-scaled.yaml
new file mode 100644
index 00000000000..87fac1ee6d4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-scaled.yaml
@@ -0,0 +1,15 @@
+# Ensure scales from enclosing SCs get applied to drop-shadows
+---
+root:
+ items:
+ - type: reference-frame
+ bounds: [0, 0, 100, 100]
+ transform: [5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 400, 400]
+ filters: drop-shadow([0, 0], 2, [255, 0, 0, 1])
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: 0 255 0 1.0
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-transform-huge.yaml b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-transform-huge.yaml
new file mode 100644
index 00000000000..e46af9dfa40
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow-transform-huge.yaml
@@ -0,0 +1,17 @@
+# Don't crash on large blur radius with large transform!
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ transform: scale-y(100)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 1000]
+ filters: drop-shadow([0, 0], 999999, [255, 0, 0, 1])
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [0, 0, 1000, 1000]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow.png b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow.png
new file mode 100644
index 00000000000..f5c9253dcc1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/filter-drop-shadow.yaml b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow.yaml
new file mode 100644
index 00000000000..59f90b42da4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-drop-shadow.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ filters: drop-shadow([73, 73], 20, [255, 0, 0, 1])
+ items:
+ - image: "firefox.png"
+ bounds: 0 0 256 256
diff --git a/third_party/webrender/wrench/reftests/filters/filter-grayscale-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-grayscale-ref.yaml
new file mode 100644
index 00000000000..6a0baae7d91
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-grayscale-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 200, 200]
+ color: [182, 182, 182]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-grayscale.yaml b/third_party/webrender/wrench/reftests/filters/filter-grayscale.yaml
new file mode 100644
index 00000000000..efa299cc07c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-grayscale.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 200, 200]
+ filters: grayscale(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: [0, 255, 0]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-1-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-1-ref.yaml
new file mode 100644
index 00000000000..a1c40390104
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-1-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: [0, 91, 0, 1]
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: [0, 218, 255, 1]
+ - type: rect
+ bounds: [60, 10, 50, 50]
+ color: [255, 0, 37, 1]
+ - type: rect
+ bounds: [60, 60, 50, 50]
+ color: [128, 128, 128, 1] \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-1.yaml b/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-1.yaml
new file mode 100644
index 00000000000..9934661bbd9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-1.yaml
@@ -0,0 +1,37 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 10, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 60, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 0, 1]
+ - type: stacking-context
+ bounds: [60, 10, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 1]
+ - type: stacking-context
+ bounds: [60, 60, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [128, 128, 128, 1] \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-alpha-1-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-alpha-1-ref.yaml
new file mode 100644
index 00000000000..436f30937ab
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-alpha-1-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: [0, 46, 0, 1]
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: [0, 109, 128, 1]
+ - type: rect
+ bounds: [60, 10, 50, 50]
+ color: [128, 0, 18, 1]
+ - type: rect
+ bounds: [60, 60, 50, 50]
+ color: [64, 64, 64, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-alpha-1.yaml b/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-alpha-1.yaml
new file mode 100644
index 00000000000..b38cb218ff0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-hue-rotate-alpha-1.yaml
@@ -0,0 +1,37 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 10, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 0, 0.5]
+ - type: stacking-context
+ bounds: [10, 60, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 0, 0.5]
+ - type: stacking-context
+ bounds: [60, 10, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 0.5]
+ - type: stacking-context
+ bounds: [60, 60, 50, 50]
+ filters: hue-rotate(90)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [128, 128, 128, 0.5] \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/filters/filter-invert-2-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-invert-2-ref.yaml
new file mode 100644
index 00000000000..08aa94333dc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-invert-2-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 255, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-invert-2.yaml b/third_party/webrender/wrench/reftests/filters/filter-invert-2.yaml
new file mode 100644
index 00000000000..f254816dc5c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-invert-2.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 255, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: invert(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 0, 0.5]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-invert-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-invert-ref.yaml
new file mode 100644
index 00000000000..674ecee969e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-invert-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 0, 0, 0.25]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-invert.yaml b/third_party/webrender/wrench/reftests/filters/filter-invert.yaml
new file mode 100644
index 00000000000..57ebcdb43c6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-invert.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: invert(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 255, 255, 0.25]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-large-blur-radius.png b/third_party/webrender/wrench/reftests/filters/filter-large-blur-radius.png
new file mode 100644
index 00000000000..3b0a501ded5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-large-blur-radius.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/filter-large-blur-radius.yaml b/third_party/webrender/wrench/reftests/filters/filter-large-blur-radius.yaml
new file mode 100644
index 00000000000..87ecb096277
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-large-blur-radius.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 100 100 512 512
+ filters: blur(100)
+ items:
+ - type: rect
+ bounds: 0 0 512 512
+ color: red
diff --git a/third_party/webrender/wrench/reftests/filters/filter-long-chain.png b/third_party/webrender/wrench/reftests/filters/filter-long-chain.png
new file mode 100644
index 00000000000..4de04ead672
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-long-chain.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/filter-long-chain.yaml b/third_party/webrender/wrench/reftests/filters/filter-long-chain.yaml
new file mode 100644
index 00000000000..0fe7bb614ec
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-long-chain.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ filters: [brightness(2),
+ contrast(0.4),
+ grayscale(0.2),
+ hue-rotate(270),
+ invert(0.6),
+ opacity(0.8),
+ saturate(10),
+ sepia(0.4),
+ blur(3),
+ "drop-shadow([73, 73], 3, [0, 255, 0, 1])"]
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 256 256
diff --git a/third_party/webrender/wrench/reftests/filters/filter-mix-blend-mode-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-mix-blend-mode-ref.yaml
new file mode 100644
index 00000000000..0a43095403b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-mix-blend-mode-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: [128, 128, 127, 1]
+ bounds: 100 100 100 100
diff --git a/third_party/webrender/wrench/reftests/filters/filter-mix-blend-mode.yaml b/third_party/webrender/wrench/reftests/filters/filter-mix-blend-mode.yaml
new file mode 100644
index 00000000000..0b6e3eb4684
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-mix-blend-mode.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ color: [128, 128, 128, 1]
+ bounds: 100 100 100 100
+ - type: stacking-context
+ bounds: [100, 100, 100, 100]
+ filters: [invert(1)]
+ mix-blend-mode: exclusion
+ items:
+ - type: rect
+ color: yellow
+ bounds: 0 0 100 100
diff --git a/third_party/webrender/wrench/reftests/filters/filter-mix-blend-scaling-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-mix-blend-scaling-ref.yaml
new file mode 100644
index 00000000000..949da2b16b2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-mix-blend-scaling-ref.yaml
@@ -0,0 +1,11 @@
+
+# Tests that mix-blend mode content renders correctly when in a scaled surface.
+# See bug 1642549
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - rect: 0 0 150 150
+ color: green
diff --git a/third_party/webrender/wrench/reftests/filters/filter-mix-blend-scaling.yaml b/third_party/webrender/wrench/reftests/filters/filter-mix-blend-scaling.yaml
new file mode 100644
index 00000000000..577f4edebfb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-mix-blend-scaling.yaml
@@ -0,0 +1,23 @@
+# Tests that mix-blend mode content renders correctly when in a scaled surface.
+# See bug 1642549
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ # Force WebRender to form a raster root
+ transform: perspective(1000)
+ items:
+ - type: stacking-context
+ bounds: -50 -50 0 0
+ # The raster root will have a 2x scaling factor
+ transform: scale(2)
+ blend-container: true
+ items:
+ - rect: 0 0 100 100
+ color: green
+ - type: stacking-context
+ mix-blend-mode: multiply
+ items:
+ - rect: 0 0 100 100
+ color: white
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-1-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-1-ref.yaml
new file mode 100644
index 00000000000..9b5a96e5423
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-1-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [18, 18, 18, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-1.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-1.yaml
new file mode 100644
index 00000000000..22d47f10e0f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 255, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-2-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-2-ref.yaml
new file mode 100644
index 00000000000..a83166358d2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-2-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [9, 9, 137, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-2.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-2.yaml
new file mode 100644
index 00000000000..0b8cac5609b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-2.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 255, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-3-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-3-ref.yaml
new file mode 100644
index 00000000000..ebb3450e021
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-3-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 0, 255, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-3.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-3.yaml
new file mode 100644
index 00000000000..060d0294ffc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-3.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 255, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-alpha-1-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-alpha-1-ref.yaml
new file mode 100644
index 00000000000..321bea68768
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-alpha-1-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [5, 5, 69, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-alpha-1.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-alpha-1.yaml
new file mode 100644
index 00000000000..1a264cc4580
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-blue-alpha-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 255, 0.5]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-green-1-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-1-ref.yaml
new file mode 100644
index 00000000000..2a710fae152
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-1-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [182, 182, 182, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-green-1.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-1.yaml
new file mode 100644
index 00000000000..4fcfa8174b8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-green-2-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-2-ref.yaml
new file mode 100644
index 00000000000..f13c6e225d2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-2-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [91, 219, 91, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-green-2.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-2.yaml
new file mode 100644
index 00000000000..98f033bb764
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-2.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-green-3-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-3-ref.yaml
new file mode 100644
index 00000000000..00aae63bdce
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-3-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 255, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-green-3.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-3.yaml
new file mode 100644
index 00000000000..c7f35611711
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-3.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-green-alpha-1-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-alpha-1-ref.yaml
new file mode 100644
index 00000000000..e4c5643f29b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-alpha-1-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [46, 110, 46, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-green-alpha-1.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-alpha-1.yaml
new file mode 100644
index 00000000000..042d19d6f56
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-green-alpha-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0, 0.5]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-red-1-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-1-ref.yaml
new file mode 100644
index 00000000000..3b95adb53a3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-1-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [54, 54, 54, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-red-1.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-1.yaml
new file mode 100644
index 00000000000..9dab61a5529
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-red-2-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-2-ref.yaml
new file mode 100644
index 00000000000..f6707424d01
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-2-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [155, 27, 27, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-red-2.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-2.yaml
new file mode 100644
index 00000000000..5810894a2cd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-2.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-red-3-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-3-ref.yaml
new file mode 100644
index 00000000000..0c9e4f4ac2f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-3-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [255, 0, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-red-3.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-3.yaml
new file mode 100644
index 00000000000..ce9ed012d30
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-3.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(1)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-red-alpha-1-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-alpha-1-ref.yaml
new file mode 100644
index 00000000000..bdcd52d3391
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-alpha-1-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [78, 14, 14, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-saturate-red-alpha-1.yaml b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-alpha-1.yaml
new file mode 100644
index 00000000000..11218fcf854
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-saturate-red-alpha-1.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 120]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 120]
+ color: [0, 0, 0, 1]
+
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ filters: saturate(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [255, 0, 0, 0.5]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-segments-ref.yaml b/third_party/webrender/wrench/reftests/filters/filter-segments-ref.yaml
new file mode 100644
index 00000000000..22a5373e2a0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-segments-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [10, 10, 256, 256]
+ complex:
+ - rect: [10, 10, 256, 256]
+ radius: 16
+ items:
+ - type: rect
+ color: [54, 54, 54]
+ bounds: [10, 10, 512, 512]
+ - type: rect
+ color: red
+ bounds: [0, 0, 300, 32]
+ - type: rect
+ color: red
+ bounds: [0, 250, 300, 32]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-segments.yaml b/third_party/webrender/wrench/reftests/filters/filter-segments.yaml
new file mode 100644
index 00000000000..4d422184304
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-segments.yaml
@@ -0,0 +1,24 @@
+# Ensure that picture / filter primitives draw the entire primitive
+# when they are eligible to be segmented. The red rects are used to
+# mask out the corners, since the AA varies between the tests.
+---
+root:
+ items:
+ - type: clip
+ bounds: [10, 10, 256, 256]
+ complex:
+ - rect: [10, 10, 256, 256]
+ radius: 16
+ items:
+ - type: stacking-context
+ filters: grayscale(1)
+ items:
+ - type: rect
+ color: red
+ bounds: [10, 10, 512, 512]
+ - type: rect
+ color: red
+ bounds: [0, 0, 300, 32]
+ - type: rect
+ color: red
+ bounds: [0, 250, 300, 32]
diff --git a/third_party/webrender/wrench/reftests/filters/filter-small-blur-radius.png b/third_party/webrender/wrench/reftests/filters/filter-small-blur-radius.png
new file mode 100644
index 00000000000..bbace6aa22c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-small-blur-radius.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/filter-small-blur-radius.yaml b/third_party/webrender/wrench/reftests/filters/filter-small-blur-radius.yaml
new file mode 100644
index 00000000000..7ebf95545de
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/filter-small-blur-radius.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 100 100 512 512
+ filters: blur(2)
+ items:
+ - type: rect
+ bounds: 0 0 512 512
+ color: red
diff --git a/third_party/webrender/wrench/reftests/filters/firefox.png b/third_party/webrender/wrench/reftests/filters/firefox.png
new file mode 100644
index 00000000000..696ba9c9b54
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/firefox.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/iframe-dropshadow-ref.yaml b/third_party/webrender/wrench/reftests/filters/iframe-dropshadow-ref.yaml
new file mode 100644
index 00000000000..47c71401635
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/iframe-dropshadow-ref.yaml
@@ -0,0 +1,22 @@
+# a drop-shadow in an iframe causes the content to not render
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ bounds: [0, 148, 1920, 1606]
+ items:
+ -
+ type: "rect"
+ color: [255, 0, 0, 1]
+ bounds: [387, 12, 34, 38]
+ clip-rect: [386, 11, 36, 40]
+ -
+ type: "stacking-context"
+ filters: drop-shadow([0, 4], 2, [0, 0, 0, 0.3294117748737335])
+ items:
+ -
+ type: "rect"
+ color: [255, 0, 0, 1]
+ bounds: [345, 12, 34, 38]
+ clip-rect: [344, 11, 36, 40]
diff --git a/third_party/webrender/wrench/reftests/filters/iframe-dropshadow.yaml b/third_party/webrender/wrench/reftests/filters/iframe-dropshadow.yaml
new file mode 100644
index 00000000000..440e757e044
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/iframe-dropshadow.yaml
@@ -0,0 +1,34 @@
+# a drop-shadow in an iframe causes the content to not render
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: iframe
+ id: [1, 2]
+ bounds: [0, 148, 1920, 1606]
+ clip-rect: [0, 148, 1920, 1606]
+
+pipelines:
+ -
+ id: [1, 2]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "rect"
+ color: [255, 0, 0, 1]
+ bounds: [387, 12, 34, 38]
+ clip-rect: [386, 11, 36, 40]
+ -
+ type: "stacking-context"
+ filters: drop-shadow([0, 4], 2, [0, 0, 0, 0.3294117748737335])
+ items:
+ -
+ type: "rect"
+ color: [255, 0, 0, 1]
+ bounds: [345, 12, 34, 38]
+ clip-rect: [344, 11, 36, 40]
diff --git a/third_party/webrender/wrench/reftests/filters/invisible-ref.yaml b/third_party/webrender/wrench/reftests/filters/invisible-ref.yaml
new file mode 100644
index 00000000000..ec31525d31b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/invisible-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/filters/invisible.yaml b/third_party/webrender/wrench/reftests/filters/invisible.yaml
new file mode 100644
index 00000000000..c4a99e64a85
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/invisible.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: opacity(0.0),
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [70, 70, 50, 50]
+ color: green
+ # This display item ensures that the stacking context is skipped, but
+ # later items are not.
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/filters/isolated-ref.yaml b/third_party/webrender/wrench/reftests/filters/isolated-ref.yaml
new file mode 100644
index 00000000000..28c6912a975
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/isolated-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 0]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: opacity(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
diff --git a/third_party/webrender/wrench/reftests/filters/isolated.yaml b/third_party/webrender/wrench/reftests/filters/isolated.yaml
new file mode 100644
index 00000000000..5f61ba2dfa7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/isolated.yaml
@@ -0,0 +1,17 @@
+# this tests that filters don't create isolated groups
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 0, 0]
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ filters: opacity(0.5)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: [0, 255, 0]
diff --git a/third_party/webrender/wrench/reftests/filters/opacity-combined-ref.yaml b/third_party/webrender/wrench/reftests/filters/opacity-combined-ref.yaml
new file mode 100644
index 00000000000..2b008f0a2f2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/opacity-combined-ref.yaml
@@ -0,0 +1,10 @@
+# this tests that opacity combination respets pre-multiplied alpha
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ filters: [opacity(0.25)]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/filters/opacity-combined.yaml b/third_party/webrender/wrench/reftests/filters/opacity-combined.yaml
new file mode 100644
index 00000000000..7d9bfa4ac5c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/opacity-combined.yaml
@@ -0,0 +1,10 @@
+# this tests that opacity combination respects pre-multiplied alpha
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ filters: [opacity(0.50), opacity(0.50)]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/filters/opacity-overlap-ref.yaml b/third_party/webrender/wrench/reftests/filters/opacity-overlap-ref.yaml
new file mode 100644
index 00000000000..d3ad75812ed
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/opacity-overlap-ref.yaml
@@ -0,0 +1,9 @@
+# this tests opacity rectangle overlapping with opaque one
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [32, 0, 96]
diff --git a/third_party/webrender/wrench/reftests/filters/opacity-overlap.yaml b/third_party/webrender/wrench/reftests/filters/opacity-overlap.yaml
new file mode 100644
index 00000000000..94832004a33
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/opacity-overlap.yaml
@@ -0,0 +1,16 @@
+# this tests opacity rectangle overlapping with opaque one
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [128, 0, 0]
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ filters: [opacity(0.75)]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [0, 0, 128]
diff --git a/third_party/webrender/wrench/reftests/filters/opacity-ref.yaml b/third_party/webrender/wrench/reftests/filters/opacity-ref.yaml
new file mode 100644
index 00000000000..ffe06bc5fd7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/opacity-ref.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [255, 255, 209, 1.0]
diff --git a/third_party/webrender/wrench/reftests/filters/opacity.yaml b/third_party/webrender/wrench/reftests/filters/opacity.yaml
new file mode 100644
index 00000000000..838937de2a7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/opacity.yaml
@@ -0,0 +1,10 @@
+# this tests opacity pre-multiplied color
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 500, 500]
+ filters: [opacity(0.9)]
+ items:
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: [255, 255, 0, 0.2]
diff --git a/third_party/webrender/wrench/reftests/filters/reftest.list b/third_party/webrender/wrench/reftests/filters/reftest.list
new file mode 100644
index 00000000000..27da91df11c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/reftest.list
@@ -0,0 +1,68 @@
+== filter-grayscale.yaml filter-grayscale-ref.yaml
+platform(linux,mac) == draw_calls(7) color_targets(7) alpha_targets(0) filter-blur.yaml filter-blur.png
+== isolated.yaml isolated-ref.yaml
+== invisible.yaml invisible-ref.yaml
+== opacity.yaml opacity-ref.yaml
+fuzzy-range(<=1,*10000) == opacity-combined.yaml opacity-combined-ref.yaml
+== opacity-overlap.yaml opacity-overlap-ref.yaml
+== filter-brightness.yaml filter-brightness-ref.yaml
+== filter-brightness-2.yaml filter-brightness-2-ref.yaml
+== filter-brightness-3.yaml filter-brightness-3-ref.yaml
+== filter-brightness-4.yaml filter-brightness-4-ref.yaml
+== filter-component-transfer.yaml filter-component-transfer-ref.yaml
+skip_on(android,device) == filter-color-matrix.yaml filter-color-matrix-ref.yaml # fails on Pixel2
+== filter-contrast-gray-alpha-1.yaml filter-contrast-gray-alpha-1-ref.yaml
+== filter-invert.yaml filter-invert-ref.yaml
+== filter-invert-2.yaml filter-invert-2-ref.yaml
+platform(linux,mac) fuzzy(1,133) == filter-large-blur-radius.yaml filter-large-blur-radius.png
+skip_on(android,device) fuzzy(1,12) == draw_calls(6) color_targets(6) alpha_targets(0) filter-small-blur-radius.yaml filter-small-blur-radius.png # fails on Pixel2
+== filter-saturate-red-1.yaml filter-saturate-red-1-ref.yaml
+== filter-saturate-red-2.yaml filter-saturate-red-2-ref.yaml
+== filter-saturate-red-3.yaml filter-saturate-red-3-ref.yaml
+== filter-saturate-green-1.yaml filter-saturate-green-1-ref.yaml
+== filter-saturate-green-2.yaml filter-saturate-green-2-ref.yaml
+== filter-saturate-green-3.yaml filter-saturate-green-3-ref.yaml
+== filter-saturate-blue-1.yaml filter-saturate-blue-1-ref.yaml
+== filter-saturate-blue-2.yaml filter-saturate-blue-2-ref.yaml
+== filter-saturate-blue-3.yaml filter-saturate-blue-3-ref.yaml
+== filter-saturate-red-alpha-1.yaml filter-saturate-red-alpha-1-ref.yaml
+== filter-saturate-green-alpha-1.yaml filter-saturate-green-alpha-1-ref.yaml
+== filter-saturate-blue-alpha-1.yaml filter-saturate-blue-alpha-1-ref.yaml
+fuzzy(1,14) == filter-hue-rotate-1.yaml filter-hue-rotate-1-ref.yaml
+skip_on(android,device) == filter-hue-rotate-alpha-1.yaml filter-hue-rotate-alpha-1-ref.yaml # Fails on Pixel2
+skip_on(android,device) fuzzy(2,9072) == filter-long-chain.yaml filter-long-chain.png # fails on Pixel2
+platform(linux,mac) == filter-drop-shadow.yaml filter-drop-shadow.png
+platform(linux,mac) == filter-drop-shadow-on-viewport-edge.yaml filter-drop-shadow-on-viewport-edge.png
+platform(linux,mac) == blend-clipped.yaml blend-clipped.png
+platform(linux,mac) == filter-drop-shadow-clip.yaml filter-drop-shadow-clip.png
+fuzzy(2,10) platform(linux,mac) == filter-drop-shadow-clip-2.yaml filter-drop-shadow-clip-2.png
+platform(linux) == filter-drop-shadow-clip-3.yaml filter-drop-shadow-clip-3.png
+fuzzy(5,100000) == filter-drop-shadow-scaled.yaml filter-drop-shadow-scaled-ref.yaml
+== filter-segments.yaml filter-segments-ref.yaml
+== iframe-dropshadow.yaml iframe-dropshadow-ref.yaml
+skip_on(android,device) == filter-mix-blend-mode.yaml filter-mix-blend-mode-ref.yaml # fails on Pixel2
+== fuzzy(3,20000) srgb-to-linear.yaml srgb-to-linear-ref.yaml
+!= srgb-to-linear-2.yaml srgb-to-linear-ref.yaml
+!= filter-blur-huge.yaml blank.yaml
+!= filter-drop-shadow-huge.yaml blank.yaml
+!= filter-drop-shadow-transform-huge.yaml blank.yaml
+fuzzy(3,79400) == filter-drop-shadow-blur-clamping.yaml filter-drop-shadow-blur-clamping-ref.yaml
+== filter-blur-scaled.yaml filter-blur-scaled-ref.yaml
+== filter-blur-clamping.yaml filter-blur-clamping-ref.yaml
+skip_on(android,device) fuzzy(1,104) == filter-blur-scaled-xonly.yaml filter-blur-scaled-xonly.png # fails on Pixel2
+== svg-filter-component-transfer.yaml filter-component-transfer-ref.yaml
+== svg-filter-flood.yaml svg-filter-flood-ref.yaml
+skip_on(android,device) == svg-filter-blend.yaml svg-filter-blend-ref.yaml
+skip_on(android,device) == svg-filter-color-matrix.yaml filter-color-matrix-ref.yaml # fails on Pixel2
+platform(linux,mac) == draw_calls(8) color_targets(8) alpha_targets(0) svg-filter-blur.yaml filter-blur.png # Extra draw call is due to render task graph workaround
+platform(linux,mac) == svg-filter-drop-shadow.yaml svg-filter-drop-shadow.png
+== fuzzy(1,10000) svg-srgb-to-linear.yaml srgb-to-linear-ref.yaml
+platform(linux,mac) == fuzzy(4,28250) svg-filter-drop-shadow-rotate.yaml svg-filter-drop-shadow-rotate-ref.yaml
+platform(linux,mac) fuzzy(3,3184) == svg-filter-blur-transforms.yaml svg-filter-blur-transforms.png
+platform(linux,mac) == svg-filter-drop-shadow-on-viewport-edge.yaml svg-filter-drop-shadow-on-viewport-edge.png
+platform(linux,mac) == svg-filter-drop-shadow-perspective.yaml svg-filter-drop-shadow-perspective.png
+== backdrop-filter-basic.yaml backdrop-filter-basic-ref.yaml
+platform(linux,mac) == backdrop-filter-perspective.yaml backdrop-filter-perspective.png
+platform(linux,max) == svg-filter-offset.yaml svg-filter-offset-ref.yaml
+skip_on(android,device) == fuzzy(1,100) svg-filter-composite.yaml svg-filter-composite-ref.yaml
+skip_on(android,device) == filter-mix-blend-scaling.yaml filter-mix-blend-scaling-ref.yaml
diff --git a/third_party/webrender/wrench/reftests/filters/srgb-to-linear-2.yaml b/third_party/webrender/wrench/reftests/filters/srgb-to-linear-2.yaml
new file mode 100644
index 00000000000..333ef502ae4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/srgb-to-linear-2.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 100]
+ filters: [srgb-to-linear]
+ items:
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [200, 200, 200, 1.0]
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [100, 100, 100, 1.0]
+ - type: rect
+ bounds: [200, 0, 100, 100]
+ color: [50, 50, 50, 1.0]
diff --git a/third_party/webrender/wrench/reftests/filters/srgb-to-linear-ref.yaml b/third_party/webrender/wrench/reftests/filters/srgb-to-linear-ref.yaml
new file mode 100644
index 00000000000..d984523da64
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/srgb-to-linear-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 100]
+ items:
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [200, 200, 200, 1.0]
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [100, 100, 100, 1.0]
+ - type: rect
+ bounds: [200, 0, 100, 100]
+ color: [50, 50, 50, 1.0]
diff --git a/third_party/webrender/wrench/reftests/filters/srgb-to-linear.yaml b/third_party/webrender/wrench/reftests/filters/srgb-to-linear.yaml
new file mode 100644
index 00000000000..67eb35119f4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/srgb-to-linear.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 100]
+ filters: [srgb-to-linear, linear-to-srgb]
+ items:
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [200, 200, 200, 1.0]
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [100, 100, 100, 1.0]
+ - type: rect
+ bounds: [200, 0, 100, 100]
+ color: [50, 50, 50, 1.0]
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-blend-ref.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-blend-ref.yaml
new file mode 100644
index 00000000000..d796f0b85e1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-blend-ref.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 0, 1]
+ - type: rect
+ bounds: [0, 50, 50, 50]
+ color: [40, 20, 2, 1]
+ - type: rect
+ bounds: [0, 100, 50, 50]
+ color: [20, 10, 155, 1]
+ - type: rect
+ bounds: [0, 150, 50, 50]
+ color: [255, 222, 156, 1]
+ - type: rect
+ bounds: [0, 200, 50, 50]
+ color: [255, 245, 151, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-blend.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-blend.yaml
new file mode 100644
index 00000000000..2167013d3c6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-blend.yaml
@@ -0,0 +1,83 @@
+# Tests various blend modes using the blend filter primitive.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ filter-primitives:
+ - type: flood
+ color: [255, 255, 255, 1]
+ color-space: srgb
+ - type: blend
+ in1: original
+ in2: 0
+ color-space: srgb
+ blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ filter-primitives:
+ - type: flood
+ color: [51, 51, 51, 1]
+ color-space: srgb
+ - type: blend
+ in1: original
+ in2: 0
+ color-space: srgb
+ blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 50, 50, 50]
+ color: [200, 100, 10, 1]
+
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ filter-primitives:
+ - type: flood
+ color: [255, 10, 156, 1]
+ color-space: srgb
+ - type: blend
+ in1: original
+ in2: 0
+ color-space: srgb
+ blend-mode: darken
+ items:
+ - type: rect
+ bounds: [0, 100, 50, 50]
+ color: [20, 222, 155, 1]
+
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ filter-primitives:
+ - type: flood
+ color: [255, 10, 156, 1]
+ color-space: srgb
+ - type: blend
+ in1: original
+ in2: 0
+ color-space: srgb
+ blend-mode: lighten
+ items:
+ - type: rect
+ bounds: [0, 150, 50, 50]
+ color: [20, 222, 155, 1]
+
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ filter-primitives:
+ - type: flood
+ color: [255, 10, 156, 1]
+ color-space: srgb
+ - type: blend
+ in1: original
+ in2: 0
+ color-space: srgb
+ blend-mode: exclusion
+ items:
+ - type: rect
+ bounds: [0, 200, 50, 50]
+ color: [0, 255, 24, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-blur-transforms.png b/third_party/webrender/wrench/reftests/filters/svg-filter-blur-transforms.png
new file mode 100644
index 00000000000..7bd8b5c4b67
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-blur-transforms.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-blur-transforms.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-blur-transforms.yaml
new file mode 100644
index 00000000000..4962ecbe130
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-blur-transforms.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 100, 300, 300]
+ transform: scale-x(0.1) rotate-z(-45)
+ filter-primitives:
+ - type: blur
+ radius: 10
+ in: previous
+ color-space: srgb
+ items:
+ - type: rect
+ color: red
+ bounds: 0 0 256 256
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-blur.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-blur.yaml
new file mode 100644
index 00000000000..61381d540f6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-blur.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 300, 300]
+ filter-primitives:
+ - type: blur
+ radius: 10
+ in: previous
+ color-space: srgb
+ items:
+ - image: "firefox.png"
+ bounds: 20 20 256 256
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-color-matrix.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-color-matrix.yaml
new file mode 100644
index 00000000000..60166b7514d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-color-matrix.yaml
@@ -0,0 +1,69 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 120, 170]
+ items:
+ - type: rect
+ bounds: [0, 0, 120, 170]
+ color: [0, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 10, 50, 50]
+ filter-primitives:
+ - type: color-matrix
+ in: previous
+ color-space: srgb
+ matrix: [0.393, 0.686, 0.534, 0,
+ 0.189, 0.168, 0.131, 0,
+ 0.349, 0.272, 0, 0,
+ 0, 0, 0, 1,
+ 0, 0, 0, 0]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 0, 1]
+ - type: stacking-context
+ bounds: [10, 60, 50, 50]
+ filter-primitives:
+ - type: color-matrix
+ in: previous
+ color-space: srgb
+ matrix: [-1, 0, 0, 0,
+ 0, -1, 0, 0,
+ 0, 0, -1, 0,
+ 0, 0, 0, 1,
+ 1, 1, 1, 0]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 0, 1]
+ - type: stacking-context
+ bounds: [60, 10, 50, 50]
+ filter-primitives:
+ - type: color-matrix
+ in: previous
+ color-space: srgb
+ matrix: [0, 0, 1, 0,
+ 0, 1, 0, 0,
+ 1, 0, 0, 0,
+ 0, 0, 0, 1,
+ 0, 0, 0, 0]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 1]
+ - type: stacking-context
+ bounds: [10, 110, 50, 50]
+ filter-primitives:
+ - type: color-matrix
+ in: previous
+ color-space: srgb
+ matrix: [1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0.5,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0]
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 0, 255, 1]
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-component-transfer.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-component-transfer.yaml
new file mode 100644
index 00000000000..88b56a4a258
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-component-transfer.yaml
@@ -0,0 +1,382 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 250]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: stacking-context
+ bounds: [0, 50, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Identity
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 1]
+ - type: stacking-context
+ bounds: [0, 100, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Identity
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 1]
+ - type: stacking-context
+ bounds: [0, 150, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Identity
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 1]
+ - type: stacking-context
+ bounds: [0, 200, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Identity
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 1]
+ - type: stacking-context
+ bounds: [60, 0, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 1]
+ - type: stacking-context
+ bounds: [60, 50, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Table
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 1]
+ - type: stacking-context
+ bounds: [60, 100, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Discrete
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 1]
+ - type: stacking-context
+ bounds: [60, 150, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Linear
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - - "0.5"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 1]
+ - type: stacking-context
+ bounds: [60, 200, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Gamma
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - - "2"
+ - "1"
+ - "-1.75"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 1]
+ - type: stacking-context
+ bounds: [120, 0, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Identity
+ - Identity
+ - Identity
+ - Identity
+ - []
+ - []
+ - []
+ - []
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 0, 255, 0.5]
+ - type: stacking-context
+ bounds: [120, 50, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Table
+ - Table
+ - Table
+ - Table
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [173, 255, 47, 0.5]
+ - type: stacking-context
+ bounds: [120, 100, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Discrete
+ - Discrete
+ - Discrete
+ - Discrete
+ - - "1"
+ - "1"
+ - "0"
+ - "0"
+ - - "0"
+ - "0"
+ - "1"
+ - "1"
+ - - "0"
+ - "1"
+ - "1"
+ - "0"
+ - - "1"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [0, 255, 255, 0.5]
+ - type: stacking-context
+ bounds: [120, 150, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Linear
+ - Linear
+ - Linear
+ - Linear
+ - - "0.5"
+ - "0.25"
+ - - "0.5"
+ - "0"
+ - - "0.5"
+ - "0.5"
+ - - "0.5"
+ - "0"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [255, 255, 0, 0.5]
+ - type: stacking-context
+ bounds: [120, 200, 50, 50]
+ filter-primitives:
+ - type: component-transfer
+ color-space: srgb
+ in: previous
+ filter-datas:
+ - - - Gamma
+ - Gamma
+ - Gamma
+ - Gamma
+ - - "2"
+ - "5"
+ - "-1"
+ - - "2"
+ - "3"
+ - "0"
+ - - "2"
+ - "1"
+ - "-1.75"
+ - - "2"
+ - "1"
+ - "-0.25"
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: [135, 206, 235, 0.5]
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-composite-ref.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-composite-ref.yaml
new file mode 100644
index 00000000000..25d9e7db6aa
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-composite-ref.yaml
@@ -0,0 +1,73 @@
+# Tests the composite SVG filter primitive
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ color: yellow
+ bounds: 10 10 100 100
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 200 0 0 0
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 50 50
+ - type: stacking-context
+ bounds: 400 0 0 0
+ items:
+ - type: rect
+ color: yellow
+ bounds: 10 10 100 100
+ - type: rect
+ color: blue
+ bounds: 60 60 50 50
+ - type: stacking-context
+ bounds: 600 0 0 0
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: rect
+ color: white
+ bounds: 60 60 50 50
+ - type: stacking-context
+ bounds: 0 200 0 0
+ items:
+ - type: rect
+ color: yellow
+ bounds: 10 10 100 100
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: rect
+ color: white
+ bounds: 60 60 50 50
+ - type: stacking-context
+ bounds: 200 200 0 0
+ items:
+ - type: rect
+ color: [255, 0, 0, 1.0]
+ bounds: 10 10 100 100
+ - type: rect
+ color: [0, 0, 255, 1.0]
+ bounds: 60 60 100 100
+ - type: rect
+ color: [255, 0, 255, 1.0]
+ bounds: 60 60 50 50
+ - type: stacking-context
+ bounds: 400 200 0 0
+ items:
+ - type: rect
+ color: [255, 255, 127, 1.0]
+ bounds: 10 10 100 100
+ - type: rect
+ color: [127, 127, 255, 1.0]
+ bounds: 60 60 100 100
+ - type: rect
+ color: [188, 188, 188, 1.0]
+ bounds: 60 60 50 50
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-composite.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-composite.yaml
new file mode 100644
index 00000000000..68f3cc07440
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-composite.yaml
@@ -0,0 +1,124 @@
+# Tests the composite SVG filter primitive
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: over
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 200 0 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: in
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 400 0 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: atop
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 600 0 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: out
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 0 200 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: xor
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 200 200 0 0
+ filter-primitives:
+ - type: flood
+ color: [255, 0, 0, 1.0]
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: lighter
+ items:
+ - type: rect
+ color: [0, 0, 255, 1.0]
+ bounds: 60 60 100 100
+ - type: stacking-context
+ bounds: 400 200 0 0
+ filter-primitives:
+ - type: flood
+ color: yellow
+ in: previous
+ - type: offset
+ offset: -50 -50
+ in: previous
+ - type: composite
+ in1: original
+ in2: 1
+ operator: arithmetic
+ k-values: [0.5, 0.5, 0.5, 0]
+ items:
+ - type: rect
+ color: blue
+ bounds: 60 60 100 100
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.png b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.png
new file mode 100644
index 00000000000..200efc99657
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.yaml
new file mode 100644
index 00000000000..3b1a4da213f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-on-viewport-edge.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 400, 400]
+ filter-primitives:
+ - type: drop-shadow
+ offset: [10, 10]
+ radius: 20
+ color: [255, 0, 0, 1]
+ in: previous
+ color-space: srgb
+ items:
+ - type: rect
+ bounds: 0 0 256 256
+ color: green
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-perspective.png b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-perspective.png
new file mode 100644
index 00000000000..7ae7393f87a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-perspective.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml
new file mode 100644
index 00000000000..744e2f655e5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-perspective.yaml
@@ -0,0 +1,22 @@
+# Tests SVG drop shadows with perspective transforms
+---
+root:
+ items:
+ - type: stacking-context
+ perspective: 100
+ perspective-origin: 100 50
+ items:
+ - type: "stacking-context"
+ transform-origin: 0 250
+ transform: rotate-x(-15)
+ filter-primitives:
+ - type: drop-shadow
+ color: red
+ offset: [20, 20]
+ radius: 10
+ in: previous
+ color-space: srgb
+ items:
+ - type: rect
+ color: blue
+ bounds: 0 0 200 200
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-rotate-ref.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-rotate-ref.yaml
new file mode 100644
index 00000000000..69501250a05
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-rotate-ref.yaml
@@ -0,0 +1,11 @@
+# Tests SVG drop shadows with transforms
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ filters: drop-shadow([73, 73], 20, [255, 0, 0, 1])
+ transform: rotate-z(45)
+ items:
+ - image: "firefox.png"
+ bounds: 0 0 256 256
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-rotate.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-rotate.yaml
new file mode 100644
index 00000000000..71acca0f526
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow-rotate.yaml
@@ -0,0 +1,17 @@
+# Tests SVG drop shadows with transforms
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ transform: rotate-z(45)
+ filter-primitives:
+ - type: drop-shadow
+ in: previous
+ offset: [73, 73]
+ radius: 20
+ color: [255, 0, 0, 1]
+ color-space: srgb
+ items:
+ - image: "firefox.png"
+ bounds: 0 0 256 256
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow.png b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow.png
new file mode 100644
index 00000000000..e6c2c0e49e4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow.yaml
new file mode 100644
index 00000000000..25cdfaf61ed
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-drop-shadow.yaml
@@ -0,0 +1,16 @@
+# Tests that SVG drop shadows are working properly
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ filter-primitives:
+ - type: drop-shadow
+ in: previous
+ offset: [73, 73]
+ radius: 20
+ color: [255, 0, 0, 1]
+ color-space: srgb
+ items:
+ - image: "firefox.png"
+ bounds: 0 0 256 256
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-flood-ref.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-flood-ref.yaml
new file mode 100644
index 00000000000..ae4eb6a0d15
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-flood-ref.yaml
@@ -0,0 +1,10 @@
+# Test that flood filter is equivalent to drawing a rect with the same size and color
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ items:
+ - type: rect
+ bounds: [20, 20, 256, 256]
+ color: [0, 255.0, 0, 0.4]
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-flood.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-flood.yaml
new file mode 100644
index 00000000000..bf896e266f3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-flood.yaml
@@ -0,0 +1,10 @@
+# Test that flood filter is equivalent to drawing a rect with the same size and color
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [100, 100, 400, 400]
+ filters: flood([0, 255.0, 0, 0.4])
+ items:
+ - image: "firefox.png"
+ bounds: 20 20 256 256
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-offset-ref.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-offset-ref.yaml
new file mode 100644
index 00000000000..f6326b51347
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-offset-ref.yaml
@@ -0,0 +1,11 @@
+# Tests the SVG offset filter primitive
+# An offset filter should have the same effect as changing the origin of the rectangle.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ bounds: 20 20 100 100
+ color: red
diff --git a/third_party/webrender/wrench/reftests/filters/svg-filter-offset.yaml b/third_party/webrender/wrench/reftests/filters/svg-filter-offset.yaml
new file mode 100644
index 00000000000..f48fb5104e4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-filter-offset.yaml
@@ -0,0 +1,15 @@
+# Tests the SVG offset filter primitive
+# An offset filter should have the same effect as changing the origin of the rectangle.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ filter-primitives:
+ - type: offset
+ offset: 10 10
+ in: original
+ items:
+ - type: rect
+ bounds: 10 10 100 100
+ color: red
diff --git a/third_party/webrender/wrench/reftests/filters/svg-srgb-to-linear.yaml b/third_party/webrender/wrench/reftests/filters/svg-srgb-to-linear.yaml
new file mode 100644
index 00000000000..f7f33165f54
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/filters/svg-srgb-to-linear.yaml
@@ -0,0 +1,20 @@
+# this test ensures that a sRGB -> linear-RGB -> sRGB results in no change (with exception to rounding error)
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 100]
+ filter-primitives:
+ - type: identity
+ in: previous
+ color-space: linear-rgb
+ items:
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [200, 200, 200, 1.0]
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: [100, 100, 100, 1.0]
+ - type: rect
+ bounds: [200, 0, 100, 100]
+ color: [50, 50, 50, 1.0]
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-angle-wraparound-negative.yaml b/third_party/webrender/wrench/reftests/gradient/conic-angle-wraparound-negative.yaml
new file mode 100644
index 00000000000..f2053c42b6f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-angle-wraparound-negative.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ angle: -5.497787143782138
+ stops: [0.0, red, 1.0, yellow] \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-angle-wraparound.yaml b/third_party/webrender/wrench/reftests/gradient/conic-angle-wraparound.yaml
new file mode 100644
index 00000000000..67a1370eacc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-angle-wraparound.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ angle: 7.0685834705770345
+ stops: [0.0, red, 1.0, yellow] \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-angle.png b/third_party/webrender/wrench/reftests/gradient/conic-angle.png
new file mode 100644
index 00000000000..81ec931cecd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-angle.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-angle.yaml b/third_party/webrender/wrench/reftests/gradient/conic-angle.yaml
new file mode 100644
index 00000000000..11a068c9e6b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-angle.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ angle: 0.7853981633974483
+ stops: [0.0, red, 1.0, yellow] \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-backdrop-ref.yaml b/third_party/webrender/wrench/reftests/gradient/conic-backdrop-ref.yaml
new file mode 100644
index 00000000000..e4d55171d31
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-backdrop-ref.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: conic-gradient
+ bounds: 0 0 800 450
+ center: 400 225
+ angle: 0.0
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-backdrop-with-spacing-ref.yaml b/third_party/webrender/wrench/reftests/gradient/conic-backdrop-with-spacing-ref.yaml
new file mode 100644
index 00000000000..2f9bd2225b2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-backdrop-with-spacing-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: conic-gradient
+ bounds: 0 0 800 450
+ center: 100 100
+ angle: 0.0
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-backdrop-with-spacing.yaml b/third_party/webrender/wrench/reftests/gradient/conic-backdrop-with-spacing.yaml
new file mode 100644
index 00000000000..063492ec95b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-backdrop-with-spacing.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: conic-gradient
+ bounds: 0 0 800 450
+ "clip-and-scroll": 2
+ center: 100 100
+ angle: 0.0
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-backdrop.yaml b/third_party/webrender/wrench/reftests/gradient/conic-backdrop.yaml
new file mode 100644
index 00000000000..fafaacd4fa3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-backdrop.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: conic-gradient
+ bounds: 0 0 800 450
+ "clip-and-scroll": 2
+ center: 400 225
+ angle: 0.0
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-center.png b/third_party/webrender/wrench/reftests/gradient/conic-center.png
new file mode 100644
index 00000000000..aeb0c293981
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-center.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-center.yaml b/third_party/webrender/wrench/reftests/gradient/conic-center.yaml
new file mode 100644
index 00000000000..d01ebc9c8ee
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-center.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ center: 50 50
+ angle: 0.0
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black] \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-color-wheel.png b/third_party/webrender/wrench/reftests/gradient/conic-color-wheel.png
new file mode 100644
index 00000000000..368007c74f6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-color-wheel.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-color-wheel.yaml b/third_party/webrender/wrench/reftests/gradient/conic-color-wheel.yaml
new file mode 100644
index 00000000000..54145295729
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-color-wheel.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [50, 50, 300, 300]
+ complex:
+ - rect: [50, 50, 300, 300]
+ radius: 300
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ angle: 0.0
+ stops: [0.0, red, 0.16666, yellow, 0.33333, green, 0.5, [0,255,255,1], 0.66666, blue, 0.83333, [255,0,255,1], 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-ref.yaml b/third_party/webrender/wrench/reftests/gradient/conic-ref.yaml
new file mode 100644
index 00000000000..c29484ae9cd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 50 50 100 100
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: black
+ - type: rect
+ bounds: 100 0 100 100
+ color: red
+ - type: rect
+ bounds: 100 100 100 100
+ color: green
+ - type: rect
+ bounds: 0 100 100 100
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-simple.png b/third_party/webrender/wrench/reftests/gradient/conic-simple.png
new file mode 100644
index 00000000000..79d0885c402
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-simple.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/conic-simple.yaml b/third_party/webrender/wrench/reftests/gradient/conic-simple.yaml
new file mode 100644
index 00000000000..c40c878403e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic-simple.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ angle: 0.0
+ stops: [0.0, red, 1.0, yellow] \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/gradient/conic.yaml b/third_party/webrender/wrench/reftests/gradient/conic.yaml
new file mode 100644
index 00000000000..ad034d6a9b6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/conic.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ angle: 0.0
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black] \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops.yaml
new file mode 100644
index 00000000000..9acc2620842
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 960 540
+ start: 0 0
+ end: 960 0
+ stops: [0.0, red,
+ 0.25, green,
+ 0.5, blue,
+ 0.75, [40,40,40,1],
+ 1.0, [100,200,50,1]]
+
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_ref.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_ref.yaml
new file mode 100644
index 00000000000..af37ae47078
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [0.0, red,
+ 0.5, green,
+ 1.0, blue]
+ - type: gradient
+ bounds: 480 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [ 0.0, blue,
+ 0.5, [40,40,40,1],
+ 1.0, [100,200,50,1]]
+
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_vertical.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_vertical.yaml
new file mode 100644
index 00000000000..dcfc7f1c20d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_vertical.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 960 540
+ start: 0 0
+ end: 0 540
+ stops: [0.0, red,
+ 0.25, green,
+ 0.5, blue,
+ 0.75, [40,40,40,1],
+ 1.0, [100,200,50,1]]
+
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_vertical_ref.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_vertical_ref.yaml
new file mode 100644
index 00000000000..17597328d9a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_5stops_vertical_ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 960 270
+ start: 0 0
+ end: 0 270
+ stops: [0.0, red,
+ 0.5, green,
+ 1.0, blue]
+ - type: gradient
+ bounds: 0 270 960 270
+ start: 0 0
+ end: 0 270
+ stops: [ 0.0, blue,
+ 0.5, [40,40,40,1],
+ 1.0, [100,200,50,1]]
+
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_clamp.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_clamp.yaml
new file mode 100644
index 00000000000..ab8484a1ca9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_clamp.yaml
@@ -0,0 +1,20 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 400 200
+ start: 0 100
+ end: 100 100
+ stops: [0.0, blue, 1.0, blue, 1.0, red]
+ - type: gradient
+ bounds: 0 300 400 200
+ start: 100 100
+ end: 200 100
+ stops: [0.0, blue, 1.0, blue, 1.0, red]
+ - type: gradient
+ bounds: 0 600 200 400
+ start: 0 100
+ end: 0 300
+ stops: [
+ 0.0, blue,
+ 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_clamp_ref.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_clamp_ref.yaml
new file mode 100644
index 00000000000..4b0dfaeb63b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_clamp_ref.yaml
@@ -0,0 +1,30 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 400 200
+ start: 0 100
+ end: 400 100
+ stops: [
+ 0.0, blue,
+ 0.25, blue,
+ 0.25, red,
+ 1.0, red]
+ - type: gradient
+ bounds: 0 300 400 200
+ start: 0 100
+ end: 400 100
+ stops: [
+ 0.0, blue,
+ 0.5, blue,
+ 0.5, red,
+ 1.0, red]
+ - type: gradient
+ bounds: 0 600 200 400
+ start: 0 0
+ end: 0 400
+ stops: [
+ 0.0, blue,
+ 0.25, blue,
+ 0.75, red,
+ 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop.yaml
new file mode 100644
index 00000000000..15e917eff47
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 960 540
+ start: 0 0
+ end: 960 0
+ stops: [0.0, red,
+ 0.125, yellow,
+ 0.25, red,
+ 0.25, green,
+ 0.375, yellow,
+ 0.5, green,
+ 0.5, blue,
+ 0.625, yellow,
+ 0.75, blue,
+ 0.75, white,
+ 1.0, [100,200,50,1]]
+
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_clip.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_clip.yaml
new file mode 100644
index 00000000000..833853e2d75
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_clip.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 960 540
+ start: 0 0
+ end: 960 0
+ stops: [0.0, red,
+ 0.125, yellow,
+ 0.25, red,
+ 0.25, green,
+ 0.375, yellow,
+ 0.5, green,
+ 0.5, blue,
+ 0.625, yellow,
+ 0.75, blue,
+ 0.75, white,
+ 1.0, [100,200,50,1]]
+ complex-clip:
+ rect: [100, 100, 760, 340]
+ radius: [32, 32]
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_clip_ref.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_clip_ref.yaml
new file mode 100644
index 00000000000..e10cc3a41c3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_clip_ref.yaml
@@ -0,0 +1,28 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [0.0, red,
+ 0.25, yellow,
+ 0.5, red,
+ 0.5, green,
+ 0.75, yellow,
+ 1.0, green]
+ complex-clip:
+ rect: [100, 100, 760, 340]
+ radius: [32, 32]
+ - type: gradient
+ bounds: 480 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [0.0, blue,
+ 0.25, yellow,
+ 0.5, blue,
+ 0.5, white,
+ 1.0, [100,200,50,1]]
+ complex-clip:
+ rect: [100, 100, 760, 340]
+ radius: [32, 32]
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_ref.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_ref.yaml
new file mode 100644
index 00000000000..899e62d8e1e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_hardstop_ref.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 0 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [0.0, red,
+ 0.25, yellow,
+ 0.5, red,
+ 0.5, green,
+ 0.75, yellow,
+ 1.0, green]
+ - type: gradient
+ bounds: 480 0 480 540
+ start: 0 0
+ end: 480 0
+ stops: [0.0, blue,
+ 0.25, yellow,
+ 0.5, blue,
+ 0.5, white,
+ 1.0, [100,200,50,1]]
+
+
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_repeat.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_repeat.yaml
new file mode 100644
index 00000000000..96dc7a40f9b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_repeat.yaml
@@ -0,0 +1,119 @@
+---
+root:
+ items:
+ # non-repeating
+ - type: gradient
+ bounds: 100 50 500 10
+ start: 100 0
+ end: 200 0
+ repeat: false
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # repeat 4 times
+ - type: gradient
+ bounds: 100 100 500 10
+ start: 100 0
+ end: 200 0
+ repeat: true
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # same but start doesn't line up with 0
+ - type: gradient
+ bounds: 100 150 500 10
+ start: 125 0
+ end: 225 0
+ repeat: true
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # more hard stops, non-uniform distribution
+ - type: gradient
+ bounds: 100 250 500 10
+ start: 200 0
+ end: 300 0
+ repeat: false
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # repeat the hard stops
+ - type: gradient
+ bounds: 100 300 500 10
+ start: 200 0
+ end: 300 0
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # same but start doesn't line up with 0
+ - type: gradient
+ bounds: 100 350 500 10
+ start: 175 0
+ end: 275 0
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # the entire gradient from 0 to 1 is
+ # "offscreen", we're only seeing its
+ # repeats. the gradient is 100 wide
+ # and ends at -75, so the first
+ # three-quarters of it would be hidden,
+ # that is, it should start with blue.
+ - type: gradient
+ bounds: 100 400 500 10
+ start: -175 0
+ end: -75 0
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # same but over on the right
+ - type: gradient
+ bounds: 100 450 500 10
+ start: 575 0
+ end: 675 0
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # a repeat, but not really because only part
+ # of the gradient is visible
+ - type: gradient
+ bounds: 100 500 500 10
+ start: -50 0
+ end: 550 0
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
diff --git a/third_party/webrender/wrench/reftests/gradient/gradient_cache_repeat_ref.yaml b/third_party/webrender/wrench/reftests/gradient/gradient_cache_repeat_ref.yaml
new file mode 100644
index 00000000000..3fe749e5456
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/gradient_cache_repeat_ref.yaml
@@ -0,0 +1,119 @@
+---
+root:
+ items:
+ # non-repeating
+ - type: gradient
+ bounds: 100 50 500 10
+ start: 100 0
+ end: 200 0.001
+ repeat: false
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # repeat 4 times
+ - type: gradient
+ bounds: 100 100 500 10
+ start: 100 0
+ end: 200 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # same but start doesn't line up with 0
+ - type: gradient
+ bounds: 100 150 500 10
+ start: 125 0
+ end: 225 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.5, green,
+ 0.5, blue,
+ 1.0, blue ]
+
+ # more hard stops, non-uniform distribution
+ - type: gradient
+ bounds: 100 250 500 10
+ start: 200 0
+ end: 300 0.001
+ repeat: false
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # repeat the hard stops
+ - type: gradient
+ bounds: 100 300 500 10
+ start: 200 0
+ end: 300 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # same but start doesn't line up with 0
+ - type: gradient
+ bounds: 100 350 500 10
+ start: 175 0
+ end: 275 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # the entire gradient from 0 to 1 is
+ # "offscreen", we're only seeing its
+ # repeats. the gradient is 100 wide
+ # and ends at -75, so the first
+ # three-quarters of it would be hidden,
+ # that is, it should start with blue.
+ - type: gradient
+ bounds: 100 400 500 10
+ start: -175 0
+ end: -75 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # same but over on the right
+ - type: gradient
+ bounds: 100 450 500 10
+ start: 575 0
+ end: 675 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
+
+ # a repeat, but not really because only part
+ # of the gradient is visible
+ - type: gradient
+ bounds: 100 500 500 10
+ start: -50 0
+ end: 550 0.001
+ repeat: true
+ stops: [0.0, green,
+ 0.25, green,
+ 0.25, red,
+ 0.75, red,
+ 0.75, blue,
+ 1.0, blue ]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-adjust-tile-size-ref.yaml b/third_party/webrender/wrench/reftests/gradient/linear-adjust-tile-size-ref.yaml
new file mode 100644
index 00000000000..c9145fc5e69
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-adjust-tile-size-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 15.47998046875 18 684.39990234375 643.199951171875
+ start: 10.286011695861816 653.47998046875
+ end: 143.13165283203125 520.7279663085938
+ stops: [0.0, red, 1.0, blue]
+ repeat: true
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-adjust-tile-size.yaml b/third_party/webrender/wrench/reftests/gradient/linear-adjust-tile-size.yaml
new file mode 100644
index 00000000000..4d78b9b99e5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-adjust-tile-size.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 15.47998046875 18 684.39990234375 643.199951171875
+ tile-size: 684.4000244140625 643.2000122070313
+ start: 10.286011695861816 653.47998046875
+ end: 143.13165283203125 520.7279663085938
+ stops: [0.0, red, 1.0, blue]
+ repeat: true
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-aligned-border-radius.png b/third_party/webrender/wrench/reftests/gradient/linear-aligned-border-radius.png
new file mode 100644
index 00000000000..2cdeeb679a8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-aligned-border-radius.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-aligned-border-radius.yaml b/third_party/webrender/wrench/reftests/gradient/linear-aligned-border-radius.yaml
new file mode 100644
index 00000000000..a79b4423c3e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-aligned-border-radius.yaml
@@ -0,0 +1,46 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [20, 20, 100, 100]
+ complex:
+ - rect: [20, 20, 100, 100]
+ radius: 32
+ items:
+ - type: gradient
+ bounds: 20 20 100 100
+ start: 50 0
+ end: 50 100
+ stops: [0.0, red, 1.0, yellow]
+
+ - type: rect
+ bounds: [130, 10, 120, 120]
+ color: blue
+
+ - type: clip
+ bounds: [140, 20, 100, 100]
+ complex:
+ - rect: [140, 20, 100, 100]
+ radius: 32
+ items:
+ - type: gradient
+ bounds: 140 20 100 100
+ start: 50 0
+ end: 50 100
+ stops: [0.0, red, 1.0, yellow]
+
+ - type: rect
+ bounds: [260, 10, 120, 120]
+ color: black
+
+ - type: clip
+ bounds: [270, 20, 100, 100]
+ complex:
+ - rect: [270, 20, 100, 100]
+ radius: 32
+ items:
+ - type: gradient
+ bounds: 270 20 100 100
+ start: 50 0
+ end: 50 100
+ stops: [0.0, red, 1.0, yellow]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-aligned-clip-ref.yaml b/third_party/webrender/wrench/reftests/gradient/linear-aligned-clip-ref.yaml
new file mode 100644
index 00000000000..08a395dc71d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-aligned-clip-ref.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ # an aligned gradient from [0, 400]
+ - type: gradient
+ bounds: 0 0 200 400
+ start: 100 0
+ end: 100 400
+ stops: [0.0, green, 1.0, blue]
+ # manual clipping
+ - type: rect
+ bounds: 0 0 200 100
+ color: white
+ - type: rect
+ bounds: 0 300 200 100
+ color: white
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-aligned-clip.yaml b/third_party/webrender/wrench/reftests/gradient/linear-aligned-clip.yaml
new file mode 100644
index 00000000000..fad030724f2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-aligned-clip.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ # an aligned gradient from [0, 400] and clipped to [100, 300]
+ - type: gradient
+ bounds: 0 100 200 200
+ start: 100 -100
+ end: 100 300
+ stops: [0.0, green, 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-backdrop-ref.yaml b/third_party/webrender/wrench/reftests/gradient/linear-backdrop-ref.yaml
new file mode 100644
index 00000000000..7cc02b573c0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-backdrop-ref.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: gradient
+ bounds: 0 0 800 450
+ start: 100 100
+ end: 700 350
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-backdrop-with-spacing-ref.yaml b/third_party/webrender/wrench/reftests/gradient/linear-backdrop-with-spacing-ref.yaml
new file mode 100644
index 00000000000..e72d1564338
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-backdrop-with-spacing-ref.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: gradient
+ bounds: 0 0 800 450
+ start: 20 20
+ end: 80 50
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
+
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-backdrop-with-spacing.yaml b/third_party/webrender/wrench/reftests/gradient/linear-backdrop-with-spacing.yaml
new file mode 100644
index 00000000000..083222b6ac7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-backdrop-with-spacing.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: gradient
+ bounds: 0 0 800 450
+ "clip-and-scroll": 2
+ start: 20 20
+ end: 80 50
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-backdrop.yaml b/third_party/webrender/wrench/reftests/gradient/linear-backdrop.yaml
new file mode 100644
index 00000000000..4a4eea5b66a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-backdrop.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: gradient
+ bounds: 0 0 800 450
+ "clip-and-scroll": 2
+ start: 100 100
+ end: 700 350
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-clamp-1-ref.yaml b/third_party/webrender/wrench/reftests/gradient/linear-clamp-1-ref.yaml
new file mode 100644
index 00000000000..81c366d8589
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-clamp-1-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, blue, 0.5, blue, 0.5, red, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-clamp-1a.yaml b/third_party/webrender/wrench/reftests/gradient/linear-clamp-1a.yaml
new file mode 100644
index 00000000000..b83963a37a1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-clamp-1a.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 100 100
+ stops: [0.0, blue, 1.0, blue, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-clamp-1b.yaml b/third_party/webrender/wrench/reftests/gradient/linear-clamp-1b.yaml
new file mode 100644
index 00000000000..ffe33919995
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-clamp-1b.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 100 100
+ end: 200 100
+ stops: [0.0, blue, 0.0, red, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-clamp-2-ref.yaml b/third_party/webrender/wrench/reftests/gradient/linear-clamp-2-ref.yaml
new file mode 100644
index 00000000000..8eb475d0a50
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-clamp-2-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, blue, 0.25, blue, 0.25, green, 0.75, green, 0.75, red, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-clamp-2.yaml b/third_party/webrender/wrench/reftests/gradient/linear-clamp-2.yaml
new file mode 100644
index 00000000000..48428b974ac
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-clamp-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 50 100
+ end: 150 100
+ stops: [0.0, blue, 0.0, green, 1.0, green, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-double.yaml b/third_party/webrender/wrench/reftests/gradient/linear-double.yaml
new file mode 100644
index 00000000000..c9e4a44d846
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-double.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 300 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, blue, 1.0, red]
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, green, 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-hard-stop-ref.png b/third_party/webrender/wrench/reftests/gradient/linear-hard-stop-ref.png
new file mode 100644
index 00000000000..a863648a3fd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-hard-stop-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-hard-stop.yaml b/third_party/webrender/wrench/reftests/gradient/linear-hard-stop.yaml
new file mode 100644
index 00000000000..b9249e7f2af
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-hard-stop.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 0
+ end: 0 100
+ stops: [0.0, blue, 0.5 , red, 0.5, green]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-ref.png b/third_party/webrender/wrench/reftests/gradient/linear-ref.png
new file mode 100644
index 00000000000..999c831000d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-ref.yaml b/third_party/webrender/wrench/reftests/gradient/linear-ref.yaml
new file mode 100644
index 00000000000..83d72481662
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 50 50 200 200
+ items:
+ - type: rect
+ bounds: 0 0 50 200
+ color: red
+ - type: rect
+ bounds: 50 0 50 200
+ color: green
+ - type: rect
+ bounds: 100 0 50 200
+ color: blue
+ - type: rect
+ bounds: 150 0 50 200
+ color: black
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-reverse.yaml b/third_party/webrender/wrench/reftests/gradient/linear-reverse.yaml
new file mode 100644
index 00000000000..ecae199e88b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-reverse.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 200 100
+ end: 000 100
+ stops: [0.0, black, 0.25, black,
+ 0.25, blue, 0.5, blue,
+ 0.5, green, 0.75, green,
+ 0.75, red, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-stops-ref.png b/third_party/webrender/wrench/reftests/gradient/linear-stops-ref.png
new file mode 100644
index 00000000000..ed80ec9988b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-stops-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/linear-stops.yaml b/third_party/webrender/wrench/reftests/gradient/linear-stops.yaml
new file mode 100644
index 00000000000..f5b8bfbc990
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear-stops.yaml
@@ -0,0 +1,7 @@
+root:
+ items:
+ - type: gradient
+ bounds: [0, 0, 200, 200]
+ start: 0 100
+ end: 200 100
+ stops: [0.0, red, 0.5, green, 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/linear.yaml b/third_party/webrender/wrench/reftests/gradient/linear.yaml
new file mode 100644
index 00000000000..53d8d512cd2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/linear.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, red, 0.25, red,
+ 0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue,
+ 0.75, black, 1.0, black]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-conic-1-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-conic-1-ref.yaml
new file mode 100644
index 00000000000..a3bb7614638
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-conic-1-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, green, 0.5, green,
+ 0.5, blue, 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-conic-1.yaml b/third_party/webrender/wrench/reftests/gradient/norm-conic-1.yaml
new file mode 100644
index 00000000000..8bf6b734c21
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-conic-1.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-conic-2-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-conic-2-ref.yaml
new file mode 100644
index 00000000000..a3bb7614638
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-conic-2-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, green, 0.5, green,
+ 0.5, blue, 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-conic-2.yaml b/third_party/webrender/wrench/reftests/gradient/norm-conic-2.yaml
new file mode 100644
index 00000000000..ba9b174b51b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-conic-2.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.5, green,
+ 0.5, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-conic-3-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-conic-3-ref.yaml
new file mode 100644
index 00000000000..d5403c498f6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-conic-3-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, blue, 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-conic-3.yaml b/third_party/webrender/wrench/reftests/gradient/norm-conic-3.yaml
new file mode 100644
index 00000000000..962ff4e7aa6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-conic-3.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [-0.5, green,
+ -0.5, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-conic-4-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-conic-4-ref.yaml
new file mode 100644
index 00000000000..6c0b6e508f8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-conic-4-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, green, 1.0, green]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-conic-4.yaml b/third_party/webrender/wrench/reftests/gradient/norm-conic-4.yaml
new file mode 100644
index 00000000000..6564d847216
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-conic-4.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [1.5, green,
+ 1.5, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-conic-degenerate-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-conic-degenerate-ref.yaml
new file mode 100644
index 00000000000..1ba6bd2f9e7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-conic-degenerate-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ angle: 0.0
+ center: 150 150
+ stops: [0.0, red, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-conic-degenerate.yaml b/third_party/webrender/wrench/reftests/gradient/norm-conic-degenerate.yaml
new file mode 100644
index 00000000000..be96200722b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-conic-degenerate.yaml
@@ -0,0 +1,14 @@
+# see: https://www.w3.org/TR/2012/CR-css3-images-20120417/#repeating-gradients
+# the spec says that repeating gradients with color stops in the same offset
+# must render as a solid rect with color equal to the average color of the
+# gradient. Gecko and Blink seem to draw it with color equal to the last stop
+# so that is the behavior tested here
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ angle: 0.0
+ center: 150 150
+ stops: [0.5, blue, 0.5, red]
+ repeat: true
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-linear-1-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-linear-1-ref.yaml
new file mode 100644
index 00000000000..5b8a0b317ac
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-linear-1-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, green, 0.5, green,
+ 0.5, blue, 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-linear-1.yaml b/third_party/webrender/wrench/reftests/gradient/norm-linear-1.yaml
new file mode 100644
index 00000000000..d79b8608b17
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-linear-1.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.25, green, 0.5, green,
+ 0.5, blue, 0.75, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-linear-2-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-linear-2-ref.yaml
new file mode 100644
index 00000000000..5b8a0b317ac
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-linear-2-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, green, 0.5, green,
+ 0.5, blue, 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-linear-2.yaml b/third_party/webrender/wrench/reftests/gradient/norm-linear-2.yaml
new file mode 100644
index 00000000000..aa3aa2afe13
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-linear-2.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.5, green,
+ 0.5, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-linear-3-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-linear-3-ref.yaml
new file mode 100644
index 00000000000..62bfda97e6b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-linear-3-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, blue, 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-linear-3.yaml b/third_party/webrender/wrench/reftests/gradient/norm-linear-3.yaml
new file mode 100644
index 00000000000..cc183715925
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-linear-3.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [-0.5, green,
+ -0.5, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-linear-4-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-linear-4-ref.yaml
new file mode 100644
index 00000000000..bcd84d82943
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-linear-4-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, green, 1.0, green]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-linear-4.yaml b/third_party/webrender/wrench/reftests/gradient/norm-linear-4.yaml
new file mode 100644
index 00000000000..df622bf299f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-linear-4.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [1.5, green,
+ 1.5, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-linear-degenerate-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-linear-degenerate-ref.yaml
new file mode 100644
index 00000000000..ae61c486cbc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-linear-degenerate-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 300 300
+ start: 0 150
+ end: 300 150
+ stops: [0.0, red, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-linear-degenerate.yaml b/third_party/webrender/wrench/reftests/gradient/norm-linear-degenerate.yaml
new file mode 100644
index 00000000000..89b431df326
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-linear-degenerate.yaml
@@ -0,0 +1,14 @@
+# see: https://www.w3.org/TR/2012/CR-css3-images-20120417/#repeating-gradients
+# the spec says that repeating gradients with color stops in the same offset
+# must render as a solid rect with color equal to the average color of the
+# gradient. Gecko and Blink seem to draw it with color equal to the last stop
+# so that is the behavior tested here
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 300 300
+ start: 0 150
+ end: 300 150
+ stops: [0.5, blue, 0.5, red]
+ repeat: true
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-radial-1-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-radial-1-ref.yaml
new file mode 100644
index 00000000000..a67b51ecf8a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-radial-1-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [0.0, red, 0.5, red, 0.5, blue, 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-radial-1.yaml b/third_party/webrender/wrench/reftests/gradient/norm-radial-1.yaml
new file mode 100644
index 00000000000..7ee6caeafaa
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-radial-1.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [0.5, red, 0.5, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-radial-2-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-radial-2-ref.yaml
new file mode 100644
index 00000000000..adfc8d70d49
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-radial-2-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [0.0, blue, 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-radial-2.yaml b/third_party/webrender/wrench/reftests/gradient/norm-radial-2.yaml
new file mode 100644
index 00000000000..dac1b783616
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-radial-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [-0.5, red, -0.5, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-radial-3-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-radial-3-ref.yaml
new file mode 100644
index 00000000000..d90d1ee4f8a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-radial-3-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [0.0, red, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-radial-3.yaml b/third_party/webrender/wrench/reftests/gradient/norm-radial-3.yaml
new file mode 100644
index 00000000000..fbd5dc929fe
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-radial-3.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [1.5, red, 1.5, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-radial-degenerate-ref.yaml b/third_party/webrender/wrench/reftests/gradient/norm-radial-degenerate-ref.yaml
new file mode 100644
index 00000000000..afe59a770b9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-radial-degenerate-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 150 150
+ stops: [0.0, red, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/norm-radial-degenerate.yaml b/third_party/webrender/wrench/reftests/gradient/norm-radial-degenerate.yaml
new file mode 100644
index 00000000000..26d99354756
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/norm-radial-degenerate.yaml
@@ -0,0 +1,14 @@
+# see: https://www.w3.org/TR/2012/CR-css3-images-20120417/#repeating-gradients
+# the spec says that repeating gradients with color stops in the same offset
+# must render as a solid rect with color equal to the average color of the
+# gradient. Gecko and Blink seem to draw it with color equal to the last stop
+# so that is the behavior tested here
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 150 150
+ stops: [0.5, blue, 0.5, red]
+ repeat: true
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned-2.png b/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned-2.png
new file mode 100644
index 00000000000..b27b9df5860
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned-2.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned-2.yaml b/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned-2.yaml
new file mode 100644
index 00000000000..ea8acd5f26e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, [255.0, 0.0, 0.0, 0.5], 0.5, [0.0, 255.0, 0.0, 0.5], 1.0, [0.0, 0.0, 255.0, 0.5]]
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned.png b/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned.png
new file mode 100644
index 00000000000..6fc18cd8c0e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned.yaml b/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned.yaml
new file mode 100644
index 00000000000..a709f845ea1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-aligned.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0.0, red, 0.5, [0.0, 0.0, 0.0, 0.0], 1.0, green]
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-angle-2.png b/third_party/webrender/wrench/reftests/gradient/premultiplied-angle-2.png
new file mode 100644
index 00000000000..ea7a5cf7efd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-angle-2.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-angle-2.yaml b/third_party/webrender/wrench/reftests/gradient/premultiplied-angle-2.yaml
new file mode 100644
index 00000000000..35546b0cd2b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-angle-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 0
+ end: 200 200
+ stops: [0.0, [255.0, 0.0, 0.0, 0.5], 0.5, [0.0, 255.0, 0.0, 0.5], 1.0, [0.0, 0.0, 255.0, 0.5]]
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-angle.png b/third_party/webrender/wrench/reftests/gradient/premultiplied-angle.png
new file mode 100644
index 00000000000..e533843d7d5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-angle.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-angle.yaml b/third_party/webrender/wrench/reftests/gradient/premultiplied-angle.yaml
new file mode 100644
index 00000000000..b665e47150f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-angle.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 0
+ end: 200 200
+ stops: [0.0, red, 0.5, [0.0, 0.0, 0.0, 0.0], 1.0, green]
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-conic-2.png b/third_party/webrender/wrench/reftests/gradient/premultiplied-conic-2.png
new file mode 100644
index 00000000000..e5891686216
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-conic-2.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-conic-2.yaml b/third_party/webrender/wrench/reftests/gradient/premultiplied-conic-2.yaml
new file mode 100644
index 00000000000..dee4cec03bd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-conic-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, [255.0, 0.0, 0.0, 0.5], 0.5, [0.0, 255.0, 0.0, 0.5], 1.0, [0.0, 0.0, 255.0, 0.5]]
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-conic.png b/third_party/webrender/wrench/reftests/gradient/premultiplied-conic.png
new file mode 100644
index 00000000000..678dc9c87fd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-conic.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-conic.yaml b/third_party/webrender/wrench/reftests/gradient/premultiplied-conic.yaml
new file mode 100644
index 00000000000..d4b442bca7b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-conic.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0.0, red, 0.5, [0.0, 0.0, 0.0, 0.0], 1.0, green]
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-radial-2.png b/third_party/webrender/wrench/reftests/gradient/premultiplied-radial-2.png
new file mode 100644
index 00000000000..cfd7ca2aaaf
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-radial-2.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-radial-2.yaml b/third_party/webrender/wrench/reftests/gradient/premultiplied-radial-2.yaml
new file mode 100644
index 00000000000..3e682328d1b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-radial-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0.0, [255.0, 0.0, 0.0, 0.5], 0.5, [0.0, 255.0, 0.0, 0.5], 1.0, [0.0, 0.0, 255.0, 0.5]]
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-radial.png b/third_party/webrender/wrench/reftests/gradient/premultiplied-radial.png
new file mode 100644
index 00000000000..0b2b2c2f21f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-radial.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/premultiplied-radial.yaml b/third_party/webrender/wrench/reftests/gradient/premultiplied-radial.yaml
new file mode 100644
index 00000000000..dc3750abd40
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/premultiplied-radial.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0.0, red, 0.5, [0.0, 0.0, 0.0, 0.0], 1.0, green]
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-backdrop-ref.yaml b/third_party/webrender/wrench/reftests/gradient/radial-backdrop-ref.yaml
new file mode 100644
index 00000000000..a878e2ac0ac
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-backdrop-ref.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: radial-gradient
+ bounds: 0 0 800 450
+ center: 400 225
+ radius: 200 200
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-backdrop-with-spacing-ref.yaml b/third_party/webrender/wrench/reftests/gradient/radial-backdrop-with-spacing-ref.yaml
new file mode 100644
index 00000000000..2aea254d3a7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-backdrop-with-spacing-ref.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: radial-gradient
+ bounds: 0 0 800 450
+ center: 50 50
+ radius: 60 60
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-backdrop-with-spacing.yaml b/third_party/webrender/wrench/reftests/gradient/radial-backdrop-with-spacing.yaml
new file mode 100644
index 00000000000..795c65d0705
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-backdrop-with-spacing.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: radial-gradient
+ bounds: 0 0 800 450
+ "clip-and-scroll": 2
+ center: 50 50
+ radius: 60 60
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
+ tile-size: 100 100
+ tile-spacing: 20 20
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-backdrop.yaml b/third_party/webrender/wrench/reftests/gradient/radial-backdrop.yaml
new file mode 100644
index 00000000000..22e360bf014
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-backdrop.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 800 450
+ color: red
+ - type: "scroll-frame"
+ bounds: 0 0 800 450
+ clip-rect: 0 0 800 450
+ id: 2
+ - type: radial-gradient
+ bounds: 0 0 800 450
+ "clip-and-scroll": 2
+ center: 400 225
+ radius: 200 200
+ stops: [ 0.0, [255, 255, 255, 1], 1.0, [0,0,0,1] ]
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-circle-ref.png b/third_party/webrender/wrench/reftests/gradient/radial-circle-ref.png
new file mode 100644
index 00000000000..7b339707a72
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-circle-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-circle.yaml b/third_party/webrender/wrench/reftests/gradient/radial-circle.yaml
new file mode 100644
index 00000000000..037da7eddc2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-circle.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 200 200
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-ellipse-ref.png b/third_party/webrender/wrench/reftests/gradient/radial-ellipse-ref.png
new file mode 100644
index 00000000000..fd60ec35b7e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-ellipse-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-ellipse.yaml b/third_party/webrender/wrench/reftests/gradient/radial-ellipse.yaml
new file mode 100644
index 00000000000..7c733f72234
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-ellipse.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 100 200
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-zero-size-1.yaml b/third_party/webrender/wrench/reftests/gradient/radial-zero-size-1.yaml
new file mode 100644
index 00000000000..43e4ef323da
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-zero-size-1.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 0
+ stops: [0.0, blue, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-zero-size-2.yaml b/third_party/webrender/wrench/reftests/gradient/radial-zero-size-2.yaml
new file mode 100644
index 00000000000..94bf6eae730
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-zero-size-2.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 0 100
+ stops: [0.0, blue, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-zero-size-3.yaml b/third_party/webrender/wrench/reftests/gradient/radial-zero-size-3.yaml
new file mode 100644
index 00000000000..3efa1ec307d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-zero-size-3.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 50 50 200 200
+ color: red
diff --git a/third_party/webrender/wrench/reftests/gradient/radial-zero-size-ref.yaml b/third_party/webrender/wrench/reftests/gradient/radial-zero-size-ref.yaml
new file mode 100644
index 00000000000..b3770b752e1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/radial-zero-size-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0.0, red, 1.0, red]
diff --git a/third_party/webrender/wrench/reftests/gradient/reftest.list b/third_party/webrender/wrench/reftests/gradient/reftest.list
new file mode 100644
index 00000000000..847c06ea8ee
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/reftest.list
@@ -0,0 +1,106 @@
+platform(linux,mac) == premultiplied-aligned.yaml premultiplied-aligned.png
+platform(linux,mac) == premultiplied-angle.yaml premultiplied-angle.png
+platform(linux,mac) == premultiplied-radial.yaml premultiplied-radial.png
+platform(linux,mac) == premultiplied-conic.yaml premultiplied-conic.png
+
+platform(linux,mac) == premultiplied-aligned-2.yaml premultiplied-aligned-2.png
+platform(linux,mac) == premultiplied-angle-2.yaml premultiplied-angle-2.png
+platform(linux,mac) == premultiplied-radial-2.yaml premultiplied-radial-2.png
+platform(linux,mac) == premultiplied-conic-2.yaml premultiplied-conic-2.png
+
+== linear.yaml linear-ref.png
+== linear-reverse.yaml linear-ref.png
+platform(linux,mac) fuzzy(1,35000) == linear-stops.yaml linear-stops-ref.png
+
+== linear-clamp-1a.yaml linear-clamp-1-ref.yaml
+== linear-clamp-1b.yaml linear-clamp-1-ref.yaml
+== linear-clamp-2.yaml linear-clamp-2-ref.yaml
+
+fuzzy-range(<=1,*4800) == linear-hard-stop.yaml linear-hard-stop-ref.png
+
+# dithering requires us to fuzz here
+fuzzy(1,20000) == linear.yaml linear-ref.yaml
+fuzzy(1,20000) == linear-reverse.yaml linear-ref.yaml
+
+fuzzy(1,15200) == linear-aligned-clip.yaml linear-aligned-clip-ref.yaml
+
+platform(linux,mac) fuzzy(1,80000) == radial-circle.yaml radial-circle-ref.png
+platform(linux,mac) fuzzy(1,80000) == radial-ellipse.yaml radial-ellipse-ref.png
+
+!= radial-circle.yaml radial-ellipse.yaml
+
+== norm-linear-1.yaml norm-linear-1-ref.yaml
+== norm-linear-2.yaml norm-linear-2-ref.yaml
+== norm-linear-3.yaml norm-linear-3-ref.yaml
+== norm-linear-4.yaml norm-linear-4-ref.yaml
+== norm-linear-degenerate.yaml norm-radial-degenerate-ref.yaml
+
+== norm-radial-1.yaml norm-radial-1-ref.yaml
+== norm-radial-2.yaml norm-radial-2-ref.yaml
+== norm-radial-3.yaml norm-radial-3-ref.yaml
+== norm-radial-degenerate.yaml norm-radial-degenerate-ref.yaml
+
+== norm-conic-1.yaml norm-conic-1-ref.yaml
+== norm-conic-2.yaml norm-conic-2-ref.yaml
+== norm-conic-3.yaml norm-conic-3-ref.yaml
+== norm-conic-4.yaml norm-conic-4-ref.yaml
+== norm-conic-degenerate.yaml norm-conic-degenerate-ref.yaml
+
+# fuzzy because of differences from normalization
+# this might be able to be improved
+fuzzy(255,1200) == repeat-linear.yaml repeat-linear-ref.yaml
+fuzzy(255,1200) == repeat-linear-reverse.yaml repeat-linear-ref.yaml
+fuzzy(255,2664) == repeat-radial.yaml repeat-radial-ref.yaml
+fuzzy(255,2664) == repeat-radial-negative.yaml repeat-radial-ref.yaml
+fuzzy(255,1652) == repeat-conic.yaml repeat-conic-ref.yaml
+fuzzy(255,1652) == repeat-conic-negative.yaml repeat-conic-ref.yaml
+
+# fuzzy because of thin spaced out column of pixels that are 1 off
+fuzzy(1,83164) == tiling-linear-1.yaml tiling-linear-1-ref.yaml
+fuzzy(1,46293) == tiling-linear-2.yaml tiling-linear-2-ref.yaml
+fuzzy(1,62154) == tiling-linear-3.yaml tiling-linear-3-ref.yaml
+
+fuzzy(1,17) == tiling-radial-1.yaml tiling-radial-1-ref.yaml
+fuzzy(1,1) == tiling-radial-2.yaml tiling-radial-2-ref.yaml
+fuzzy(1,3) == tiling-radial-3.yaml tiling-radial-3-ref.yaml
+fuzzy(1,17) == tiling-radial-4.yaml tiling-radial-4-ref.yaml
+
+fuzzy(1,17) == tiling-conic-1.yaml tiling-conic-1-ref.yaml
+fuzzy(1,1) == tiling-conic-2.yaml tiling-conic-2-ref.yaml
+fuzzy(1,3) == tiling-conic-3.yaml tiling-conic-3-ref.yaml
+
+== radial-zero-size-1.yaml radial-zero-size-ref.yaml
+== radial-zero-size-2.yaml radial-zero-size-ref.yaml
+== radial-zero-size-3.yaml radial-zero-size-ref.yaml
+
+== linear-adjust-tile-size.yaml linear-adjust-tile-size-ref.yaml
+
+platform(linux,mac) == linear-aligned-border-radius.yaml linear-aligned-border-radius.png
+# interpolation fuzz from sampling texture-baked gradient ramps
+platform(linux,mac) fuzzy-range(<=1,*1404) == repeat-border-radius.yaml repeat-border-radius.png
+
+== conic.yaml conic-ref.yaml
+fuzzy(1,57) == conic-simple.yaml conic-simple.png
+fuzzy(255,166) == conic-angle.yaml conic-angle.png
+== conic-center.yaml conic-center.png
+fuzzy(1,2) == conic-angle-wraparound.yaml conic-angle.yaml
+fuzzy(1,1) == conic-angle-wraparound-negative.yaml conic-angle.yaml
+fuzzy(1,115) == conic-color-wheel.yaml conic-color-wheel.png
+
+# gradient caching tests
+# replaces a computed gradient by a sampled texture, so a lot of off-by-one
+# variation from interpolation, which is fine:
+fuzzy-range(<=1,*195000) == gradient_cache_5stops.yaml gradient_cache_5stops_ref.yaml
+fuzzy-range(<=1,*169000) == gradient_cache_5stops_vertical.yaml gradient_cache_5stops_vertical_ref.yaml
+== gradient_cache_hardstop.yaml gradient_cache_hardstop_ref.yaml
+== gradient_cache_hardstop_clip.yaml gradient_cache_hardstop_clip_ref.yaml
+== gradient_cache_clamp.yaml gradient_cache_clamp_ref.yaml
+== gradient_cache_repeat.yaml gradient_cache_repeat_ref.yaml
+
+# Recognize opaque tiles with gradient backgrounds
+== conic-backdrop-with-spacing.yaml conic-backdrop-with-spacing-ref.yaml
+== conic-backdrop.yaml conic-backdrop-ref.yaml
+== linear-backdrop-with-spacing.yaml linear-backdrop-with-spacing-ref.yaml
+== linear-backdrop.yaml linear-backdrop-ref.yaml
+== radial-backdrop-with-spacing.yaml radial-backdrop-with-spacing-ref.yaml
+== radial-backdrop.yaml radial-backdrop-ref.yaml
diff --git a/third_party/webrender/wrench/reftests/gradient/repeat-border-radius.png b/third_party/webrender/wrench/reftests/gradient/repeat-border-radius.png
new file mode 100644
index 00000000000..7896fa7e2ae
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/repeat-border-radius.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/gradient/repeat-border-radius.yaml b/third_party/webrender/wrench/reftests/gradient/repeat-border-radius.yaml
new file mode 100644
index 00000000000..b578f80b5d3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/repeat-border-radius.yaml
@@ -0,0 +1,137 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [20, 20, 100, 100]
+ complex:
+ - rect: [20, 20, 100, 100]
+ radius: 32
+ items:
+ - type: gradient
+ bounds: 20 20 100 100
+ start: 50 0
+ end: 50 100
+ stops: [0.0, red, 1.0, yellow]
+ repeat: true
+
+ - type: rect
+ bounds: [130, 10, 120, 120]
+ color: blue
+
+ - type: clip
+ bounds: [140, 20, 100, 100]
+ complex:
+ - rect: [140, 20, 100, 100]
+ radius: 32
+ items:
+ - type: gradient
+ bounds: 140 20 100 100
+ start: 50 0
+ end: 50 100
+ stops: [0.2, red, 1.0, yellow]
+
+ - type: rect
+ bounds: [260, 10, 120, 120]
+ color: black
+
+ - type: clip
+ bounds: [270, 20, 100, 100]
+ complex:
+ - rect: [270, 20, 100, 100]
+ radius: 32
+ items:
+ - type: gradient
+ bounds: 270 20 100 100
+ start: 50 0
+ end: 51 100
+ stops: [0.0, red, 1.0, yellow]
+
+ - type: clip
+ bounds: [20, 160, 100, 100]
+ complex:
+ - rect: [20, 160, 100, 100]
+ radius: 32
+ items:
+ - type: radial-gradient
+ bounds: 20 160 100 100
+ center: 50 50
+ radius: 25 25
+ stops: [0.0, red, 1.0, yellow]
+
+ - type: rect
+ bounds: [130, 150, 120, 120]
+ color: blue
+
+ - type: clip
+ bounds: [140, 160, 100, 100]
+ complex:
+ - rect: [140, 160, 100, 100]
+ radius: 32
+ items:
+ - type: radial-gradient
+ bounds: 140 160 100 100
+ center: 50 50
+ radius: 25 25
+ stops: [0.0, red, 1.0, yellow]
+
+ - type: rect
+ bounds: [260, 150, 120, 120]
+ color: black
+
+ - type: clip
+ bounds: [270, 160, 100, 100]
+ complex:
+ - rect: [270, 160, 100, 100]
+ radius: 32
+ items:
+ - type: radial-gradient
+ bounds: 270 160 100 100
+ center: 50 50
+ radius: 25 25
+ stops: [0.0, red, 1.0, yellow]
+
+ - type: clip
+ bounds: [20, 300, 100, 100]
+ complex:
+ - rect: [20, 300, 100, 100]
+ radius: 32
+ items:
+ - type: conic-gradient
+ bounds: 20 300 100 100
+ angle: 0.0
+ center: 50 50
+ stops: [0.0, red, 1.0, yellow]
+ repeat: true
+
+ - type: rect
+ bounds: [130, 290, 120, 120]
+ color: blue
+
+ - type: clip
+ bounds: [140, 300, 100, 100]
+ complex:
+ - rect: [140, 300, 100, 100]
+ radius: 32
+ items:
+ - type: conic-gradient
+ bounds: 140 300 100 100
+ angle: 0.0
+ center: 50 50
+ stops: [0.0, red, 1.0, yellow]
+
+ - type: rect
+ bounds: [260, 290, 120, 120]
+ color: black
+
+ - type: clip
+ bounds: [270, 300, 100, 100]
+ complex:
+ - rect: [270, 300, 100, 100]
+ radius: 32
+ items:
+ - type: conic-gradient
+ bounds: 270 300 100 100
+ angle: 0.0
+ center: 50 50
+ stops: [0.0, red, 1.0, yellow]
+
diff --git a/third_party/webrender/wrench/reftests/gradient/repeat-conic-negative.yaml b/third_party/webrender/wrench/reftests/gradient/repeat-conic-negative.yaml
new file mode 100644
index 00000000000..e1043562da5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/repeat-conic-negative.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ angle: -0.62831853
+ center: 150 150
+ stops: [0.1, red, 0.2, red, 0.2, blue, 0.3, blue]
+ repeat: true
diff --git a/third_party/webrender/wrench/reftests/gradient/repeat-conic-ref.yaml b/third_party/webrender/wrench/reftests/gradient/repeat-conic-ref.yaml
new file mode 100644
index 00000000000..b98cc378a7a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/repeat-conic-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ angle: 0.0
+ center: 150 150
+ stops: [0.0, red,
+ 0.1, red,
+ 0.1, blue,
+ 0.2, blue,
+ 0.2, red,
+ 0.3, red,
+ 0.3, blue,
+ 0.4, blue,
+ 0.4, red,
+ 0.5, red,
+ 0.5, blue,
+ 0.6, blue,
+ 0.6, red,
+ 0.7, red,
+ 0.7, blue,
+ 0.8, blue,
+ 0.8, red,
+ 0.9, red,
+ 0.9, blue,
+ 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/repeat-conic.yaml b/third_party/webrender/wrench/reftests/gradient/repeat-conic.yaml
new file mode 100644
index 00000000000..bbc4202aec2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/repeat-conic.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: conic-gradient
+ bounds: 50 50 300 300
+ angle: 0.0
+ center: 150 150
+ stops: [0.1, blue, 0.2, blue, 0.2, red, 0.3, red]
+ repeat: true
diff --git a/third_party/webrender/wrench/reftests/gradient/repeat-linear-ref.yaml b/third_party/webrender/wrench/reftests/gradient/repeat-linear-ref.yaml
new file mode 100644
index 00000000000..420a08db01f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/repeat-linear-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 300 300
+ start: 0 150
+ end: 300 150
+ stops: [0.0, red,
+ 0.1, red,
+ 0.1, blue,
+ 0.2, blue,
+ 0.2, red,
+ 0.3, red,
+ 0.3, blue,
+ 0.4, blue,
+ 0.4, red,
+ 0.5, red,
+ 0.5, blue,
+ 0.6, blue,
+ 0.6, red,
+ 0.7, red,
+ 0.7, blue,
+ 0.8, blue,
+ 0.8, red,
+ 0.9, red,
+ 0.9, blue,
+ 1.0, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/repeat-linear-reverse.yaml b/third_party/webrender/wrench/reftests/gradient/repeat-linear-reverse.yaml
new file mode 100644
index 00000000000..a81bafe1bdc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/repeat-linear-reverse.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 300 300
+ start: 300 150
+ end: 0 150
+ stops: [0.1, red, 0.2, red, 0.2, blue, 0.3, blue]
+ repeat: true
diff --git a/third_party/webrender/wrench/reftests/gradient/repeat-linear.yaml b/third_party/webrender/wrench/reftests/gradient/repeat-linear.yaml
new file mode 100644
index 00000000000..63e136bc8ea
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/repeat-linear.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: 50 50 300 300
+ start: 0 150
+ end: 300 150
+ stops: [0.1, blue, 0.2, blue, 0.2, red, 0.3, red]
+ repeat: true
diff --git a/third_party/webrender/wrench/reftests/gradient/repeat-radial-negative.yaml b/third_party/webrender/wrench/reftests/gradient/repeat-radial-negative.yaml
new file mode 100644
index 00000000000..949455f8937
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/repeat-radial-negative.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 150 150
+ stops: [-0.3, blue, -0.2, blue, -0.2, red, -0.1, red]
+ repeat: true
diff --git a/third_party/webrender/wrench/reftests/gradient/repeat-radial-ref.yaml b/third_party/webrender/wrench/reftests/gradient/repeat-radial-ref.yaml
new file mode 100644
index 00000000000..d2c0292e6e9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/repeat-radial-ref.yaml
@@ -0,0 +1,38 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 150 150
+ # note: we need stops up to 1.4 because a repeating radial gradient
+ # will fill the whole rect beyond 1.0. So the furthest radius we have
+ # to fill in is the diagonal of the unit square
+ stops: [0.0, red,
+ 0.1, red,
+ 0.1, blue,
+ 0.2, blue,
+ 0.2, red,
+ 0.3, red,
+ 0.3, blue,
+ 0.4, blue,
+ 0.4, red,
+ 0.5, red,
+ 0.5, blue,
+ 0.6, blue,
+ 0.6, red,
+ 0.7, red,
+ 0.7, blue,
+ 0.8, blue,
+ 0.8, red,
+ 0.9, red,
+ 0.9, blue,
+ 1.0, blue,
+ 1.0, red,
+ 1.1, red,
+ 1.1, blue,
+ 1.2, blue,
+ 1.2, red,
+ 1.3, red,
+ 1.3, blue,
+ 1.4, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/repeat-radial.yaml b/third_party/webrender/wrench/reftests/gradient/repeat-radial.yaml
new file mode 100644
index 00000000000..04c676c25bf
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/repeat-radial.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: radial-gradient
+ bounds: 50 50 300 300
+ center: 150 150
+ radius: 150 150
+ stops: [0.1, blue, 0.2, blue, 0.2, red, 0.3, red]
+ repeat: true
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-conic-1-ref.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-conic-1-ref.yaml
new file mode 100644
index 00000000000..6b93e28fa10
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-conic-1-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: conic-gradient
+ bounds: 350 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: conic-gradient
+ bounds: 50 350 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: conic-gradient
+ bounds: 350 350 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-conic-1.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-conic-1.yaml
new file mode 100644
index 00000000000..71ffe80b227
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-conic-1.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # basic - 4 tiles spaced out with no clipping
+ - type: conic-gradient
+ bounds: 50 50 500 500
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-conic-2-ref.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-conic-2-ref.yaml
new file mode 100644
index 00000000000..4360aa204cb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-conic-2-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: conic-gradient
+ bounds: 350 50 100 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: conic-gradient
+ bounds: 50 350 200 100
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: conic-gradient
+ bounds: 350 350 100 100
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-conic-2.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-conic-2.yaml
new file mode 100644
index 00000000000..ba9522a68cb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-conic-2.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # slightly clip the last tile
+ - type: conic-gradient
+ bounds: 50 50 400 400
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-conic-3-ref.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-conic-3-ref.yaml
new file mode 100644
index 00000000000..d7b9541ef4d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-conic-3-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: conic-gradient
+ bounds: 50 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: conic-gradient
+ bounds: 250 50 200 200
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: conic-gradient
+ bounds: 50 250 200 100
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: conic-gradient
+ bounds: 250 250 200 100
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-conic-3.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-conic-3.yaml
new file mode 100644
index 00000000000..77b28a9e22c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-conic-3.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # no spacing with a clip
+ - type: conic-gradient
+ bounds: 50 50 400 300
+ angle: 0.0
+ center: 100 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 0 0
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-linear-1-ref.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-linear-1-ref.yaml
new file mode 100644
index 00000000000..c06e05fb539
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-linear-1-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: gradient
+ bounds: 350 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: gradient
+ bounds: 50 350 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: gradient
+ bounds: 350 350 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-linear-1.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-linear-1.yaml
new file mode 100644
index 00000000000..f388e7c5936
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-linear-1.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # basic - 4 tiles spaced out with no clipping
+ - type: gradient
+ bounds: 50 50 500 500
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-linear-2-ref.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-linear-2-ref.yaml
new file mode 100644
index 00000000000..be7dc774636
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-linear-2-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: gradient
+ bounds: 50 50 200 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: gradient
+ bounds: 350 50 100 200
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: gradient
+ bounds: 50 350 200 100
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: gradient
+ bounds: 350 350 100 100
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-linear-2.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-linear-2.yaml
new file mode 100644
index 00000000000..7a01c062d16
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-linear-2.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # slightly clip the last tile
+ - type: gradient
+ bounds: 50 50 400 400
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-linear-3-ref.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-linear-3-ref.yaml
new file mode 100644
index 00000000000..90b110c8d0c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-linear-3-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ # top left and bottom left
+ - type: gradient
+ bounds: 50 50 200 300
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ # top right and bottom right
+ - type: gradient
+ bounds: 250 50 200 300
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-linear-3.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-linear-3.yaml
new file mode 100644
index 00000000000..a595f3572f7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-linear-3.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # no spacing with a clip
+ - type: gradient
+ bounds: 50 50 400 300
+ start: 0 100
+ end: 200 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 0 0
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-radial-1-ref.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-radial-1-ref.yaml
new file mode 100644
index 00000000000..66f8c035927
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-radial-1-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: radial-gradient
+ bounds: 350 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: radial-gradient
+ bounds: 50 350 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: radial-gradient
+ bounds: 350 350 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-radial-1.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-radial-1.yaml
new file mode 100644
index 00000000000..b832a72f96a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-radial-1.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # basic - 4 tiles spaced out with no clipping
+ - type: radial-gradient
+ bounds: 50 50 500 500
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-radial-2-ref.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-radial-2-ref.yaml
new file mode 100644
index 00000000000..da9bcd1bffc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-radial-2-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: radial-gradient
+ bounds: 350 50 100 200
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: radial-gradient
+ bounds: 50 350 200 100
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: radial-gradient
+ bounds: 350 350 100 100
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-radial-2.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-radial-2.yaml
new file mode 100644
index 00000000000..8b7feb205e7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-radial-2.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # slightly clip the last tile
+ - type: radial-gradient
+ bounds: 50 50 400 400
+ center: 100 100
+ radius: 100 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-radial-3-ref.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-radial-3-ref.yaml
new file mode 100644
index 00000000000..d8564eed645
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-radial-3-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: radial-gradient
+ bounds: 250 50 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: radial-gradient
+ bounds: 50 250 200 100
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: radial-gradient
+ bounds: 250 250 200 100
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-radial-3.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-radial-3.yaml
new file mode 100644
index 00000000000..4ca0886a0df
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-radial-3.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # no spacing with a clip
+ - type: radial-gradient
+ bounds: 50 50 400 300
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 0 0
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-radial-4-ref.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-radial-4-ref.yaml
new file mode 100644
index 00000000000..2ba2a96322c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-radial-4-ref.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ # top left
+ - type: radial-gradient
+ bounds: 50 50 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # top right
+ - type: radial-gradient
+ bounds: 350 50 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # bottom left
+ - type: radial-gradient
+ bounds: 50 350 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ # bottom right
+ - type: radial-gradient
+ bounds: 350 350 200 200
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/gradient/tiling-radial-4.yaml b/third_party/webrender/wrench/reftests/gradient/tiling-radial-4.yaml
new file mode 100644
index 00000000000..724019441f8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/gradient/tiling-radial-4.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ # make sure the ellipse transformation retains square tiles
+ - type: radial-gradient
+ bounds: 50 50 500 500
+ center: 100 100
+ radius: 200 100
+ stops: [0, red, 1, blue]
+ tile-size: 200 200
+ tile-spacing: 100 100
diff --git a/third_party/webrender/wrench/reftests/image/colorrect.png b/third_party/webrender/wrench/reftests/image/colorrect.png
new file mode 100644
index 00000000000..75283ee1f13
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/colorrect.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/image/downscale.png b/third_party/webrender/wrench/reftests/image/downscale.png
new file mode 100644
index 00000000000..877d0e48743
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/downscale.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/image/downscale.yaml b/third_party/webrender/wrench/reftests/image/downscale.yaml
new file mode 100644
index 00000000000..fcaac883c28
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/downscale.yaml
@@ -0,0 +1,15 @@
+# Tests the image quality of using a very large A8 image
+# as a clip mask. It's currently not very good!
+# https://github.com/servo/webrender/issues/2023
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 350, 90]
+ image-mask:
+ image: "firefox.png"
+ rect: [0, 0, 350, 90]
+ repeat: false
+ items:
+ - type: rect
+ bounds: [0, 0, 350, 90]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/image/firefox.png b/third_party/webrender/wrench/reftests/image/firefox.png
new file mode 100644
index 00000000000..f00696789a8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/firefox.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/image/occlusion.png b/third_party/webrender/wrench/reftests/image/occlusion.png
new file mode 100644
index 00000000000..c62a58cdec8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/occlusion.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/image/occlusion.yaml b/third_party/webrender/wrench/reftests/image/occlusion.yaml
new file mode 100644
index 00000000000..4e89a7765b6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/occlusion.yaml
@@ -0,0 +1,15 @@
+# Ensure that the clip rect of a primitive that is promoted to a compositor
+# surface is correctly applied when registering it as an occlusion plane.
+
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: [50, 50, 200, 200]
+
+ - type: yuv-image
+ format: interleaved
+ src: spacex-yuv.png
+ bounds: [50, 50, 200, 200]
+ prefer-compositor-surface: true
+ clip-rect: [75, 75, 150, 150]
diff --git a/third_party/webrender/wrench/reftests/image/reftest.list b/third_party/webrender/wrench/reftests/image/reftest.list
new file mode 100644
index 00000000000..5c3db88404c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/reftest.list
@@ -0,0 +1,14 @@
+== tile-size.yaml tile-size-ref.yaml
+== very-big.yaml very-big-ref.yaml
+== very-big-tile-size.yaml very-big-tile-size-ref.yaml
+== tile-with-spacing.yaml tile-with-spacing-ref.yaml
+skip_on(android,device) fuzzy(1,331264) == tile-repeat-prim-or-decompose.yaml tile-repeat-prim-or-decompose-ref.yaml
+platform(linux,mac) options(allow-mipmaps) == downscale.yaml downscale.png
+skip_on(android,device) == segments.yaml segments.png
+platform(linux,mac) == yuv.yaml yuv.png
+skip_on(android,device) == tiled-clip-chain.yaml tiled-clip-chain-ref.yaml
+skip_on(android,device) == tiled-complex-clip.yaml tiled-complex-clip-ref.yaml
+platform(linux,mac) == texture-rect.yaml texture-rect-ref.yaml
+platform(linux) == occlusion.yaml occlusion.png
+# allow slight lerp change where the squares meet, but catch lerping problems on the boundary (should clamp)
+fuzzy-range(<=1,*450) == rgb_composite.yaml rgb_composite_ref.yaml
diff --git a/third_party/webrender/wrench/reftests/image/rgb_composite.yaml b/third_party/webrender/wrench/reftests/image/rgb_composite.yaml
new file mode 100644
index 00000000000..74db512eedc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/rgb_composite.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: scale(1.5)
+ items:
+ - image: colorrect.png
+ bounds: [0, 0, 100, 100]
+ prefer-compositor-surface: true
diff --git a/third_party/webrender/wrench/reftests/image/rgb_composite_ref.yaml b/third_party/webrender/wrench/reftests/image/rgb_composite_ref.yaml
new file mode 100644
index 00000000000..0bc4a6e436a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/rgb_composite_ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: scale(1.5)
+ items:
+ - image: colorrect.png
+ bounds: [0, 0, 100, 100]
diff --git a/third_party/webrender/wrench/reftests/image/segments.png b/third_party/webrender/wrench/reftests/image/segments.png
new file mode 100644
index 00000000000..168e9348ea0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/segments.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/image/segments.yaml b/third_party/webrender/wrench/reftests/image/segments.yaml
new file mode 100644
index 00000000000..5c4d42825c3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/segments.yaml
@@ -0,0 +1,12 @@
+root:
+ items:
+ - type: clip
+ bounds: [10, 10, 260, 260]
+ complex:
+ - rect: [10, 10, 260, 260]
+ radius: 32
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 10, 260, 260]
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 290, 260, 260]
diff --git a/third_party/webrender/wrench/reftests/image/spacex-u.png b/third_party/webrender/wrench/reftests/image/spacex-u.png
new file mode 100644
index 00000000000..1de9b6ff664
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/spacex-u.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/image/spacex-uv.png b/third_party/webrender/wrench/reftests/image/spacex-uv.png
new file mode 100644
index 00000000000..4b0259900e2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/spacex-uv.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/image/spacex-v.png b/third_party/webrender/wrench/reftests/image/spacex-v.png
new file mode 100644
index 00000000000..1d1a1c0118d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/spacex-v.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/image/spacex-y.png b/third_party/webrender/wrench/reftests/image/spacex-y.png
new file mode 100644
index 00000000000..2256fabecd0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/spacex-y.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/image/spacex-yuv.png b/third_party/webrender/wrench/reftests/image/spacex-yuv.png
new file mode 100644
index 00000000000..6073e71735b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/spacex-yuv.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/image/texture-rect-ref.yaml b/third_party/webrender/wrench/reftests/image/texture-rect-ref.yaml
new file mode 100644
index 00000000000..42d8907434f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/texture-rect-ref.yaml
@@ -0,0 +1,15 @@
+# Reference for test to ensure external images using the textureRect sampler mode work correctly.
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: red
+ - type: rect
+ bounds: [50, 0, 50, 50]
+ color: blue
+ - type: rect
+ bounds: [0, 50, 50, 50]
+ color: green
+ - type: rect
+ bounds: [50, 50, 50, 50]
+ color: white \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/image/texture-rect.yaml b/third_party/webrender/wrench/reftests/image/texture-rect.yaml
new file mode 100644
index 00000000000..78e7ce6e869
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/texture-rect.yaml
@@ -0,0 +1,7 @@
+# Test to ensure external images using the textureRect sampler mode work correctly.
+root:
+ items:
+ - image: colorrect.png
+ bounds: [0, 0, 100, 100]
+ external: true
+ external-target: rect \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/image/tile-repeat-prim-or-decompose-ref.yaml b/third_party/webrender/wrench/reftests/image/tile-repeat-prim-or-decompose-ref.yaml
new file mode 100644
index 00000000000..8b7e801d569
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/tile-repeat-prim-or-decompose-ref.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - image: xy-gradient(500, 50)
+ bounds: 0 0 800 800
+ stretch-size: 50 50
+ - image: xy-gradient(50, 500)
+ bounds: 800 0 800 800
+ stretch-size: 50 50
diff --git a/third_party/webrender/wrench/reftests/image/tile-repeat-prim-or-decompose.yaml b/third_party/webrender/wrench/reftests/image/tile-repeat-prim-or-decompose.yaml
new file mode 100644
index 00000000000..43b12bbd94a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/tile-repeat-prim-or-decompose.yaml
@@ -0,0 +1,17 @@
+# This test aims at exercising the different ways we handle repetition of tiled images.
+root:
+ items:
+ # This should cause the primitive repetition to be decomposed on the cpu along the x axis
+ # but perform the repetition along the y axis on the image shader because the image width
+ # fits within the tile size.
+ - image: xy-gradient(500, 50)
+ bounds: 0 0 800 800
+ stretch-size: 50 50
+ tile-size: 50
+ # This should cause the primitive repetition to be decomposed on the cpu along the y axis
+ # but perform the repetition along the x axis in the image shader because the image height
+ # fits within the tile size.
+ - image: xy-gradient(50, 500)
+ bounds: 800 0 800 800
+ stretch-size: 50 50
+ tile-size: 50
diff --git a/third_party/webrender/wrench/reftests/image/tile-size-ref.yaml b/third_party/webrender/wrench/reftests/image/tile-size-ref.yaml
new file mode 100644
index 00000000000..c90ea8a3419
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/tile-size-ref.yaml
@@ -0,0 +1,14 @@
+root:
+ items:
+ - image: xy-gradient(512, 512)
+ bounds: 0 0 512 512
+ stretch-size: 512 512
+ - image: xy-gradient(512, 512)
+ bounds: 512 0 512 512
+ stretch-size: 512 512
+ - image: xy-gradient(512, 512)
+ bounds: 0 512 512 512
+ stretch-size: 512 512
+ - image: xy-gradient(512, 512)
+ bounds: 512 512 512 512
+ stretch-size: 512 512
diff --git a/third_party/webrender/wrench/reftests/image/tile-size.yaml b/third_party/webrender/wrench/reftests/image/tile-size.yaml
new file mode 100644
index 00000000000..e17a7b53a4c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/tile-size.yaml
@@ -0,0 +1,19 @@
+root:
+ items:
+ - image: xy-gradient(512, 512)
+ bounds: 0 0 512 512
+ stretch-size: 512 512
+ tile-size: 64
+ - image: xy-gradient(512, 512)
+ bounds: 512 0 512 512
+ stretch-size: 512 512
+ tile-size: 128
+ - image: xy-gradient(512, 512)
+ bounds: 0 512 512 512
+ stretch-size: 512 512
+ tile-size: 256
+ # tile size bigger than the image itself
+ - image: xy-gradient(512, 512)
+ bounds: 512 512 512 512
+ stretch-size: 512 512
+ tile-size: 4096
diff --git a/third_party/webrender/wrench/reftests/image/tile-with-spacing-ref.yaml b/third_party/webrender/wrench/reftests/image/tile-with-spacing-ref.yaml
new file mode 100644
index 00000000000..63e1315f0b3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/tile-with-spacing-ref.yaml
@@ -0,0 +1,6 @@
+root:
+ items:
+ - image: solid-color(255, 0, 0, 255, 300, 300)
+ bounds: 0 0 800 800
+ stretch-size: 200 200
+ tile-spacing: 10 10
diff --git a/third_party/webrender/wrench/reftests/image/tile-with-spacing.yaml b/third_party/webrender/wrench/reftests/image/tile-with-spacing.yaml
new file mode 100644
index 00000000000..40bc5802d4c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/tile-with-spacing.yaml
@@ -0,0 +1,12 @@
+root:
+ items:
+ # TODO: This test would be more useful if we used an image with variations instead
+ # of a solid color. To do this we first need to change the way pixel snapping is
+ # applied so that when an image is split into several primitives, so that the latter
+ # all get snapped the same way rather than independently.
+ #- image: xy-gradient(300, 300)
+ - image: solid-color(255, 0, 0, 255, 300, 300)
+ bounds: 0 0 800 800
+ stretch-size: 200 200
+ tile-spacing: 10 10
+ tile-size: 64
diff --git a/third_party/webrender/wrench/reftests/image/tiled-clip-chain-ref.yaml b/third_party/webrender/wrench/reftests/image/tiled-clip-chain-ref.yaml
new file mode 100644
index 00000000000..83b44942694
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/tiled-clip-chain-ref.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 10, 260, 260]
+ - type: rect
+ bounds: [10, 110, 200, 200]
+ color: white
+ - type: rect
+ bounds: [110, 10, 200, 270]
+ color: white \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/image/tiled-clip-chain.yaml b/third_party/webrender/wrench/reftests/image/tiled-clip-chain.yaml
new file mode 100644
index 00000000000..fdc71577535
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/tiled-clip-chain.yaml
@@ -0,0 +1,10 @@
+# Test that local clip rects from clip-chains are correctly
+# propagated into the local clip rect for tiled images.
+root:
+ items:
+ - type: clip
+ bounds: [10, 10, 100, 100]
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 10, 260, 260]
+ tile-size: 64 \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/image/tiled-complex-clip-ref.yaml b/third_party/webrender/wrench/reftests/image/tiled-complex-clip-ref.yaml
new file mode 100644
index 00000000000..9350da23724
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/tiled-complex-clip-ref.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: clip
+ bounds: [10, 10, 100, 100]
+ complex:
+ - rect: [10, 10, 100, 100]
+ radius: 32
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 10, 260, 260]
diff --git a/third_party/webrender/wrench/reftests/image/tiled-complex-clip.yaml b/third_party/webrender/wrench/reftests/image/tiled-complex-clip.yaml
new file mode 100644
index 00000000000..83ad3f1a8fe
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/tiled-complex-clip.yaml
@@ -0,0 +1,13 @@
+# Test that complex clips from clip-chains are correctly
+# taken into account for tiled images.
+root:
+ items:
+ - type: clip
+ bounds: [10, 10, 100, 100]
+ complex:
+ - rect: [10, 10, 100, 100]
+ radius: 32
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [10, 10, 260, 260]
+ tile-size: 64
diff --git a/third_party/webrender/wrench/reftests/image/very-big-ref.yaml b/third_party/webrender/wrench/reftests/image/very-big-ref.yaml
new file mode 100644
index 00000000000..6d7ea1b4b1c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/very-big-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: 0 0 500 500
+ color: red
diff --git a/third_party/webrender/wrench/reftests/image/very-big-tile-size-ref.yaml b/third_party/webrender/wrench/reftests/image/very-big-tile-size-ref.yaml
new file mode 100644
index 00000000000..5001c2812c4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/very-big-tile-size-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: 0 0 500 500
+ color: green
diff --git a/third_party/webrender/wrench/reftests/image/very-big-tile-size.yaml b/third_party/webrender/wrench/reftests/image/very-big-tile-size.yaml
new file mode 100644
index 00000000000..d3bb3b8ec7a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/very-big-tile-size.yaml
@@ -0,0 +1,9 @@
+root:
+ items:
+ - type: rect
+ bounds: 0 0 500 500
+ color: green
+ - image: solid-color(255, 0, 0, 255, 100000, 1000)
+ bounds: 0 0 500 500
+ stretch-size: 1000000 1000
+ tile-size: 60000
diff --git a/third_party/webrender/wrench/reftests/image/very-big.yaml b/third_party/webrender/wrench/reftests/image/very-big.yaml
new file mode 100644
index 00000000000..dc0981d3a44
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/very-big.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - image: solid-color(255, 0, 0, 255, 100000, 1000)
+ bounds: 0 0 500 500
+ stretch-size: 1000000 1000
diff --git a/third_party/webrender/wrench/reftests/image/yuv.png b/third_party/webrender/wrench/reftests/image/yuv.png
new file mode 100644
index 00000000000..56320e4a6ba
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/yuv.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/image/yuv.yaml b/third_party/webrender/wrench/reftests/image/yuv.yaml
new file mode 100644
index 00000000000..8120d93f8cc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/image/yuv.yaml
@@ -0,0 +1,19 @@
+root:
+ items:
+ - type: yuv-image
+ format: planar
+ src-y: spacex-y.png
+ src-u: spacex-u.png
+ src-v: spacex-v.png
+ bounds: [10, 10, 427, 640]
+
+ - type: yuv-image
+ format: interleaved
+ src: spacex-yuv.png
+ bounds: [447, 10, 427, 640]
+
+ - type: yuv-image
+ format: nv12
+ src-y: spacex-y.png
+ src-uv: spacex-uv.png
+ bounds: [887, 10, 427, 640]
diff --git a/third_party/webrender/wrench/reftests/invalidation/one-rounded-rect-green.yaml b/third_party/webrender/wrench/reftests/invalidation/one-rounded-rect-green.yaml
new file mode 100644
index 00000000000..2366913cbdc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/invalidation/one-rounded-rect-green.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ -
+ bounds: 0 0 1000 1000
+ type: stacking-context
+ cache: true
+ items:
+ - type: clip
+ bounds: [50, 50, 200, 200]
+ complex:
+ - rect: [50, 50, 200, 200]
+ radius: 8
+ items:
+ - type: rect
+ bounds: 50 50 200 200
+ color: green
diff --git a/third_party/webrender/wrench/reftests/invalidation/one-rounded-rect.yaml b/third_party/webrender/wrench/reftests/invalidation/one-rounded-rect.yaml
new file mode 100644
index 00000000000..988233e9ed2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/invalidation/one-rounded-rect.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ -
+ bounds: 0 0 1000 1000
+ type: stacking-context
+ cache: true
+ items:
+ - type: clip
+ bounds: [50, 50, 200, 200]
+ complex:
+ - rect: [50, 50, 200, 200]
+ radius: 8
+ items:
+ - type: rect
+ bounds: 50 50 200 200
+ color: red
diff --git a/third_party/webrender/wrench/reftests/invalidation/reftest.list b/third_party/webrender/wrench/reftests/invalidation/reftest.list
new file mode 100644
index 00000000000..5925e61da96
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/invalidation/reftest.list
@@ -0,0 +1 @@
+#dirty([(50,50):256x256]) one-rounded-rect.yaml dirty([(50,50):256x256]) one-rounded-rect-green.yaml dirty([(50,50):256x256]) one-rounded-rect.yaml == one-rounded-rect.yaml
diff --git a/third_party/webrender/wrench/reftests/invalidation/rounded-rects.yaml b/third_party/webrender/wrench/reftests/invalidation/rounded-rects.yaml
new file mode 100644
index 00000000000..8c9b0db2317
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/invalidation/rounded-rects.yaml
@@ -0,0 +1,42 @@
+---
+root:
+ items:
+ -
+ bounds: 0 0 1000 1000
+ type: stacking-context
+ cache: true
+ items:
+ - type: clip
+ bounds: [50, 50, 200, 200]
+ complex:
+ - rect: [50, 50, 200, 200]
+ radius: 8
+ items:
+ - type: rect
+ bounds: 50 50 200 200
+ color: red
+
+ - type: clip
+ bounds: [270, 50, 200, 200]
+ complex:
+ - rect: [270, 50, 200, 200]
+ radius: [16, 32, 48, 64]
+ items:
+ - type: rect
+ bounds: 270 50 200 200
+ color: green
+
+ - type: clip
+ bounds: [490, 50, 500, 500]
+ complex:
+ - rect: [490, 50, 500, 500]
+ radius: {
+ top-left: [32, 16],
+ top-right: [40, 24],
+ bottom-left: [48, 64],
+ bottom-right: [52, 80],
+ }
+ items:
+ - type: rect
+ bounds: 490 50 500 500
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/invalidation/two-rounded-rects.yaml b/third_party/webrender/wrench/reftests/invalidation/two-rounded-rects.yaml
new file mode 100644
index 00000000000..315d6434cdc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/invalidation/two-rounded-rects.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ -
+ bounds: 0 0 1000 1000
+ type: stacking-context
+ cache: true
+ items:
+ - type: clip
+ bounds: [50, 50, 200, 200]
+ complex:
+ - rect: [50, 50, 200, 200]
+ radius: 8
+ items:
+ - type: rect
+ bounds: 50 50 200 200
+ color: red
+
+ - type: clip
+ bounds: [270, 50, 200, 200]
+ complex:
+ - rect: [270, 50, 200, 200]
+ radius: [16, 32, 48, 64]
+ items:
+ - type: rect
+ bounds: 270 50 200 200
+ color: green
diff --git a/third_party/webrender/wrench/reftests/mask/aligned-layer-rect-ref.yaml b/third_party/webrender/wrench/reftests/mask/aligned-layer-rect-ref.yaml
new file mode 100644
index 00000000000..d4ef946d7c0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/aligned-layer-rect-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ bounds: [9, 9, 10, 10]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/aligned-layer-rect.yaml b/third_party/webrender/wrench/reftests/mask/aligned-layer-rect.yaml
new file mode 100644
index 00000000000..a1c6e2f17e9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/aligned-layer-rect.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: scroll-frame
+ bounds: [9, 9, 10, 10]
+ content-size: [95, 88]
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/checkerboard-tiling.yaml b/third_party/webrender/wrench/reftests/mask/checkerboard-tiling.yaml
new file mode 100644
index 00000000000..782babbef6c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/checkerboard-tiling.yaml
@@ -0,0 +1,16 @@
+# Tests a tiled image mask with leftover tile offsets.
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 200, 200]
+ image-mask:
+ image: transparent-checkerboard(2, 16, 16)
+ rect: [0, 0, 200, 200]
+ repeat: false
+ # This is the point of the test, can't be a divisor of 200.
+ tile-size: 37
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/checkerboard.png b/third_party/webrender/wrench/reftests/mask/checkerboard.png
new file mode 100644
index 00000000000..e8a05df95be
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/checkerboard.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/mask/checkerboard.yaml b/third_party/webrender/wrench/reftests/mask/checkerboard.yaml
new file mode 100644
index 00000000000..980bdb13fea
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/checkerboard.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 200, 200]
+ image-mask:
+ image: transparent-checkerboard(2, 16, 16)
+ rect: [0, 0, 200, 200]
+ repeat: false
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/green.yaml b/third_party/webrender/wrench/reftests/mask/green.yaml
new file mode 100644
index 00000000000..0d3df605821
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/green.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/mask/mask-atomicity-ref.yaml b/third_party/webrender/wrench/reftests/mask/mask-atomicity-ref.yaml
new file mode 100644
index 00000000000..81480856c02
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask-atomicity-ref.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [25, 25, 100, 100]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ filters:
+ - "opacity(0.5)"
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: blue
+ - type: rect
+ bounds: [50, 50, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/mask/mask-atomicity-tiling.yaml b/third_party/webrender/wrench/reftests/mask/mask-atomicity-tiling.yaml
new file mode 100644
index 00000000000..f44b4ab3cec
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask-atomicity-tiling.yaml
@@ -0,0 +1,25 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [25, 25, 100, 100]
+ color: red
+ - type: clip
+ bounds: [0, 0, 200, 200]
+ id: 2
+ image-mask:
+ # premultiplied 0.5 alpha white(??)
+ image: solid-color(127,127,127,127,200,200)
+ rect: [0, 0, 200, 200]
+ tile-size: 10
+ repeat: false
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ clip-node: 2
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: blue
+ - type: rect
+ bounds: [50, 50, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/mask/mask-atomicity.yaml b/third_party/webrender/wrench/reftests/mask/mask-atomicity.yaml
new file mode 100644
index 00000000000..269030e3615
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask-atomicity.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [25, 25, 100, 100]
+ color: red
+ - type: clip
+ bounds: [0, 0, 200, 200]
+ id: 2
+ image-mask:
+ # premultiplied 0.5 alpha white(??)
+ image: solid-color(127,127,127,127,200,200)
+ rect: [0, 0, 200, 200]
+ repeat: false
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ clip-node: 2
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: blue
+ - type: rect
+ bounds: [50, 50, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/mask/mask-perspective-tiling.yaml b/third_party/webrender/wrench/reftests/mask/mask-perspective-tiling.yaml
new file mode 100644
index 00000000000..bd0fad7af96
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask-perspective-tiling.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ -
+ type: stacking-context
+ perspective: 1
+ perspective-origin: 0 0
+ items:
+ -
+ type: stacking-context
+ transform: 10 0 0 0 0 10 0 0 0 0 10 0 0 0 -9 1
+ items:
+ - type: clip
+ bounds: [0, 0, 95, 88]
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ tile-size: 5
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/mask-perspective.png b/third_party/webrender/wrench/reftests/mask/mask-perspective.png
new file mode 100644
index 00000000000..02c0cc93ba3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask-perspective.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/mask/mask-perspective.yaml b/third_party/webrender/wrench/reftests/mask/mask-perspective.yaml
new file mode 100644
index 00000000000..e8d8e4d5d44
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask-perspective.yaml
@@ -0,0 +1,22 @@
+---
+root:
+ items:
+ -
+ type: stacking-context
+ perspective: 1
+ perspective-origin: 0 0
+ items:
+ -
+ type: stacking-context
+ transform: 10 0 0 0 0 10 0 0 0 0 10 0 0 0 -9 1
+ items:
+ - type: clip
+ bounds: [0, 0, 95, 88]
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/mask-ref.yaml b/third_party/webrender/wrench/reftests/mask/mask-ref.yaml
new file mode 100644
index 00000000000..01c4e60946b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 95, 88]
+ items:
+ - type: rect
+ bounds: [9, 9, 10, 10]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/mask-tiling.yaml b/third_party/webrender/wrench/reftests/mask/mask-tiling.yaml
new file mode 100644
index 00000000000..021ec9fa288
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask-tiling.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 95, 88]
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ tile-size: 5
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/mask-transformed-to-empty-rect-ref.yaml b/third_party/webrender/wrench/reftests/mask/mask-transformed-to-empty-rect-ref.yaml
new file mode 100644
index 00000000000..1df66453d6b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask-transformed-to-empty-rect-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 0 255 0 1.0
diff --git a/third_party/webrender/wrench/reftests/mask/mask-transformed-to-empty-rect.yaml b/third_party/webrender/wrench/reftests/mask/mask-transformed-to-empty-rect.yaml
new file mode 100644
index 00000000000..a291c1fb96a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask-transformed-to-empty-rect.yaml
@@ -0,0 +1,26 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 300]
+ "scroll-policy": scrollable
+ z-index: 4
+ transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 150, -150, 1]
+ items:
+ - type: clip
+ bounds: [0, 0, 300, 300]
+ # This image mask here assures that we will be forced to try to
+ # mask instead of skipping it due to the mask rect becoming a
+ # zero rect.
+ image-mask:
+ image: "tiny-check-mask.png"
+ rect: [0, 0, 300, 300]
+ repeat: false
+ id: 2
+ items:
+ - type: rect
+ bounds: [0, 0, 300, 300]
+ color: 0 128 0 1.0000
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: 0 255 0 1.0
diff --git a/third_party/webrender/wrench/reftests/mask/mask.png b/third_party/webrender/wrench/reftests/mask/mask.png
new file mode 100644
index 00000000000..ab1bdb9b50d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/mask/mask.yaml b/third_party/webrender/wrench/reftests/mask/mask.yaml
new file mode 100644
index 00000000000..b7432f58274
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/mask.yaml
@@ -0,0 +1,13 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 95, 88]
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/missing-mask-ref.yaml b/third_party/webrender/wrench/reftests/mask/missing-mask-ref.yaml
new file mode 100644
index 00000000000..112da9c9d10
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/missing-mask-ref.yaml
@@ -0,0 +1,7 @@
+# Don't crash when supplied an invalid image key for the mask!
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 35, 35]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/missing-mask.yaml b/third_party/webrender/wrench/reftests/mask/missing-mask.yaml
new file mode 100644
index 00000000000..124c2cd8930
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/missing-mask.yaml
@@ -0,0 +1,14 @@
+# Don't crash when supplied an invalid image key for the mask!
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 95, 88]
+ image-mask:
+ image: invalid
+ rect: [0, 0, 35, 35]
+ repeat: false
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/nested-mask-ref.yaml b/third_party/webrender/wrench/reftests/mask/nested-mask-ref.yaml
new file mode 100644
index 00000000000..c16df79e4cf
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/nested-mask-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 95, 88]
+ items:
+ - type: rect
+ bounds: [13, 13, 6, 6]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/nested-mask-tiling.yaml b/third_party/webrender/wrench/reftests/mask/nested-mask-tiling.yaml
new file mode 100644
index 00000000000..0e70758f582
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/nested-mask-tiling.yaml
@@ -0,0 +1,22 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 95, 88]
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ tile-size: 5
+ items:
+ - type: clip
+ bounds: [0, 0, 95, 88]
+ image-mask:
+ image: "mask.png"
+ rect: [4, 4, 35, 35]
+ repeat: false
+ tile-size: 5
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/nested-mask.yaml b/third_party/webrender/wrench/reftests/mask/nested-mask.yaml
new file mode 100644
index 00000000000..cacbb634346
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/nested-mask.yaml
@@ -0,0 +1,20 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 95, 88]
+ image-mask:
+ image: "mask.png"
+ rect: [0, 0, 35, 35]
+ repeat: false
+ items:
+ - type: clip
+ bounds: [0, 0, 95, 88]
+ image-mask:
+ image: "mask.png"
+ rect: [4, 4, 35, 35]
+ repeat: false
+ items:
+ - type: rect
+ bounds: [0, 0, 95, 88]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/mask/out-of-bounds.yaml b/third_party/webrender/wrench/reftests/mask/out-of-bounds.yaml
new file mode 100644
index 00000000000..8e0eed09e00
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/out-of-bounds.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 10000, 10000]
+ complex:
+ - rect: [0, 0, 10000, 10000]
+ radius:
+ top-left: [30, 30]
+ top-right: [30, 30]
+ bottom-right: [30, 30]
+ bottom-left: [30, 30]
+ items:
+ - type: rect
+ bounds: [0, 0, 10000, 10000]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/mask/reftest.list b/third_party/webrender/wrench/reftests/mask/reftest.list
new file mode 100644
index 00000000000..7a18b4a0108
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/reftest.list
@@ -0,0 +1,16 @@
+== mask.yaml mask-ref.yaml
+== mask-tiling.yaml mask-ref.yaml
+== nested-mask.yaml nested-mask-ref.yaml
+== nested-mask-tiling.yaml nested-mask-ref.yaml
+!= mask.yaml green.yaml
+== aligned-layer-rect.yaml aligned-layer-rect-ref.yaml
+== mask-transformed-to-empty-rect.yaml mask-transformed-to-empty-rect-ref.yaml
+platform(linux,mac) == rounded-corners.yaml rounded-corners.png
+!= mask.yaml out-of-bounds.yaml
+platform(linux,mac) fuzzy(1,17500) color_targets(3) alpha_targets(1) == mask-atomicity.yaml mask-atomicity-ref.yaml
+platform(linux,mac) fuzzy(1,17500) == mask-atomicity-tiling.yaml mask-atomicity-ref.yaml
+platform(linux,mac) == mask-perspective.yaml mask-perspective.png
+== fuzzy(1,11) mask-perspective-tiling.yaml mask-perspective.yaml
+platform(linux,mac) == checkerboard.yaml checkerboard.png
+skip_on(android,device) == checkerboard.yaml checkerboard-tiling.yaml # Fails on a Pixel2
+== missing-mask.yaml missing-mask-ref.yaml
diff --git a/third_party/webrender/wrench/reftests/mask/rounded-corners.png b/third_party/webrender/wrench/reftests/mask/rounded-corners.png
new file mode 100644
index 00000000000..19adfe02ec8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/rounded-corners.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/mask/rounded-corners.yaml b/third_party/webrender/wrench/reftests/mask/rounded-corners.yaml
new file mode 100644
index 00000000000..e26a656cc00
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/rounded-corners.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [0, 0, 100, 100]
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius:
+ top-left: [30, 30]
+ top-right: [30, 30]
+ bottom-right: [30, 30]
+ bottom-left: [30, 30]
+ items:
+ - type: border
+ bounds: [0, 0, 100, 100]
+ width: [5, 5, 5, 5]
+ border-type: normal
+ style: [solid, solid, solid, solid]
+ color: [blue, blue, blue, blue]
+ radius:
+ top-left: [30, 30]
+ top-right: [30, 30]
+ bottom-right: [0, 0]
+ bottom-left: [0, 0]
diff --git a/third_party/webrender/wrench/reftests/mask/tiny-check-mask.png b/third_party/webrender/wrench/reftests/mask/tiny-check-mask.png
new file mode 100644
index 00000000000..d6f6e3548dd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/mask/tiny-check-mask.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/performance/compositor-surface-opaque-slice-ref.yaml b/third_party/webrender/wrench/reftests/performance/compositor-surface-opaque-slice-ref.yaml
new file mode 100644
index 00000000000..7c538488bcb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/performance/compositor-surface-opaque-slice-ref.yaml
@@ -0,0 +1,9 @@
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: [255, 0, 0, 0.5]
diff --git a/third_party/webrender/wrench/reftests/performance/compositor-surface-opaque-slice.yaml b/third_party/webrender/wrench/reftests/performance/compositor-surface-opaque-slice.yaml
new file mode 100644
index 00000000000..a5821973e9a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/performance/compositor-surface-opaque-slice.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: [255, 0, 0, 0.5]
diff --git a/third_party/webrender/wrench/reftests/performance/no-clip-mask.png b/third_party/webrender/wrench/reftests/performance/no-clip-mask.png
new file mode 100644
index 00000000000..1fc4ef0483a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/performance/no-clip-mask.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/performance/no-clip-mask.yaml b/third_party/webrender/wrench/reftests/performance/no-clip-mask.yaml
new file mode 100644
index 00000000000..51d981e2a07
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/performance/no-clip-mask.yaml
@@ -0,0 +1,24 @@
+# In this case, there is no incompatible transform.
+# Therefore, the clip condition should be handled
+# by the vertex shader via the local_clip_rect, and
+# there should be no clip mask generated.
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 111, 1087, 565]
+ "clip-rect": [0, 111, 1087, 565]
+ type: iframe
+ id: [1, 2]
+pipelines:
+ -
+ id: [1, 2]
+ items:
+ -
+ bounds: [1075, -1, 12, 199]
+ "clip-rect": [1075, -1, 12, 199]
+ image: checkerboard(4, 8, 8)
+ stretch-size: 72 72
diff --git a/third_party/webrender/wrench/reftests/performance/reftest.list b/third_party/webrender/wrench/reftests/performance/reftest.list
new file mode 100644
index 00000000000..5ca69146dc2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/performance/reftest.list
@@ -0,0 +1,2 @@
+skip_on(android) == color_targets(2) alpha_targets(0) no-clip-mask.yaml no-clip-mask.png # Too wide for Android
+platform(linux,mac) == compositor-surface-opaque-slice.yaml compositor-surface-opaque-slice-ref.yaml
diff --git a/third_party/webrender/wrench/reftests/reftest.list b/third_party/webrender/wrench/reftests/reftest.list
new file mode 100644
index 00000000000..a3194332021
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/reftest.list
@@ -0,0 +1,18 @@
+include aa/reftest.list
+include backface/reftest.list
+include blend/reftest.list
+include border/reftest.list
+include boxshadow/reftest.list
+include clip/reftest.list
+include filters/reftest.list
+include gradient/reftest.list
+include image/reftest.list
+include invalidation/reftest.list
+include mask/reftest.list
+include performance/reftest.list
+include scrolling/reftest.list
+include snap/reftest.list
+include split/reftest.list
+include text/reftest.list
+include transforms/reftest.list
+include tiles/reftest.list
diff --git a/third_party/webrender/wrench/reftests/scrolling/clip-and-scroll-property-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/clip-and-scroll-property-ref.yaml
new file mode 100644
index 00000000000..a465f412dfe
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/clip-and-scroll-property-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/clip-and-scroll-property.yaml b/third_party/webrender/wrench/reftests/scrolling/clip-and-scroll-property.yaml
new file mode 100644
index 00000000000..ed72c23fcea
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/clip-and-scroll-property.yaml
@@ -0,0 +1,30 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: clip
+ id: 2
+ # Here we are testing that the clip-and-scroll property applies to
+ # both stacking contexts and items.
+ -
+ bounds: [0, 0, 0, 0]
+ content-size: [200, 200]
+ clip-and-scroll: 2
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -100, 0, 0, 1]
+ "transform-style": flat
+ items:
+ -
+ bounds: [100, 0, 200, 200]
+ clip: [-8947849, -8947849, 17895698, 17895698]
+ type: rect
+ color: green
+ id: [0, 0]
+pipelines: []
diff --git a/third_party/webrender/wrench/reftests/scrolling/empty-mask-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/empty-mask-ref.yaml
new file mode 100644
index 00000000000..aca8ccd66cf
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/empty-mask-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/empty-mask.yaml b/third_party/webrender/wrench/reftests/scrolling/empty-mask.yaml
new file mode 100644
index 00000000000..69378dd5ad8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/empty-mask.yaml
@@ -0,0 +1,18 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: clip
+ bounds: [0, 0, 0, 0]
+ content-size: [100, 100]
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius: 20
+ items:
+ - type: rect
+ bounds: [0, 0, 500, 500]
+ color: red
diff --git a/third_party/webrender/wrench/reftests/scrolling/ext-scroll-offset-1-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/ext-scroll-offset-1-ref.yaml
new file mode 100644
index 00000000000..3b8d47e94c9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/ext-scroll-offset-1-ref.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ content-size: [100, 1000]
+ scroll-offset: [0, -50]
+ items:
+ - type: rect
+ color: green
+ bounds: [0, 0, 100, 100]
diff --git a/third_party/webrender/wrench/reftests/scrolling/ext-scroll-offset-1.yaml b/third_party/webrender/wrench/reftests/scrolling/ext-scroll-offset-1.yaml
new file mode 100644
index 00000000000..7803574bede
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/ext-scroll-offset-1.yaml
@@ -0,0 +1,14 @@
+# Test that items with an external scroll offset in both the
+# scroll node and primitive match up with items that have
+# been scrolled without an external scroll offset.
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ content-size: [100, 1000]
+ scroll-offset: [0, 0]
+ external-scroll-offset: [0, 50]
+ items:
+ - type: rect
+ color: green
+ bounds: [0, 50, 100, 100]
diff --git a/third_party/webrender/wrench/reftests/scrolling/fixed-position-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/fixed-position-ref.yaml
new file mode 100644
index 00000000000..aa263878281
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/fixed-position-ref.yaml
@@ -0,0 +1,14 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
+ - type: rect
+ bounds: [60, 0, 50, 50]
+ color: green
+ - type: rect
+ bounds: [120, 0, 50, 50]
+ color: green
+ - type: rect
+ bounds: [180, 0, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/fixed-position-scrolling-clip-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/fixed-position-scrolling-clip-ref.yaml
new file mode 100644
index 00000000000..eb503533142
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/fixed-position-scrolling-clip-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/fixed-position-scrolling-clip.yaml b/third_party/webrender/wrench/reftests/scrolling/fixed-position-scrolling-clip.yaml
new file mode 100644
index 00000000000..63573e5742f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/fixed-position-scrolling-clip.yaml
@@ -0,0 +1,28 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [10, 10, 100, 300]
+ content-size: [100, 700]
+ id: 41
+ scroll-offset: [0, 50]
+ items:
+ # The rectangles below should stay in place even when the parent scroll area scrolls,
+ # because they use the root reference frame as their scroll node (fixed position).
+ # On the other hand, the clip item here will scroll with its parent scroll area. Normally
+ # fixed position items would only be clipped by their reference frame (in this case the
+ # root), but since these items specify an auxiliary clip, they will be clipped by their
+ # sibling clip (42).
+ - type: clip
+ bounds: [10, 60, 50, 50]
+ id: 42
+ - type: stacking-context
+ bounds: [10, 10, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 50]
+ color: green
+ clip-and-scroll: [root-reference-frame, 42]
+ - type: rect
+ bounds: [0, 50, 100, 50]
+ color: red
+ clip-and-scroll: [root-reference-frame, 42]
diff --git a/third_party/webrender/wrench/reftests/scrolling/fixed-position.yaml b/third_party/webrender/wrench/reftests/scrolling/fixed-position.yaml
new file mode 100644
index 00000000000..6fa099b5e37
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/fixed-position.yaml
@@ -0,0 +1,55 @@
+root:
+ bounds: [0, 0, 1024, 10000]
+ scroll-offset: [0, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ # This item should not scroll out of view because it is fixed position.
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
+ clip-and-scroll: root-reference-frame
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ transform: translate(60, 100)
+ id: 100
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 50, 50]
+ items:
+ # Even though there is a custom clip-scroll ID, it should scroll,
+ # because it is fixed relative to its reference frame. The reference frame
+ # of this stacking context is the stacking context parent because it has
+ # a transformation.
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
+ clip-and-scroll: 100
+ - type: stacking-context
+ bounds: [120, 0, 50, 200]
+ transform: translate(0, 0)
+ id: 101
+ items:
+ # This is similar to the previous case, but ensures that this still works
+ # even with an identity transform.
+ - type: stacking-context
+ bounds: [0, 0, 50, 200]
+ items:
+ - type: rect
+ bounds: [0, 100, 50, 50]
+ color: green
+ clip-and-scroll: 101
+ - type: stacking-context
+ bounds: [180, 0, 50, 200]
+ perspective: 1
+ id: 102
+ items:
+ # This is similar to the previous case, but for perspective.
+ - type: stacking-context
+ bounds: [0, 0, 50, 200]
+ items:
+ - type: rect
+ bounds: [0, 100, 50, 50]
+ color: green
+ clip-and-scroll: 102
diff --git a/third_party/webrender/wrench/reftests/scrolling/mask.png b/third_party/webrender/wrench/reftests/scrolling/mask.png
new file mode 100644
index 00000000000..d3cbfe6a63f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/mask.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/scrolling/nested-scroll-offset-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/nested-scroll-offset-ref.yaml
new file mode 100644
index 00000000000..c2f0a30710d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/nested-scroll-offset-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/nested-scroll-offset.yaml b/third_party/webrender/wrench/reftests/scrolling/nested-scroll-offset.yaml
new file mode 100644
index 00000000000..850468f1806
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/nested-scroll-offset.yaml
@@ -0,0 +1,16 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 500, 500]
+ content-size: [1000, 1000]
+ scroll-offset: [0, 300]
+ items:
+ - type: scroll-frame
+ bounds: [0, 300, 50, 50]
+ items:
+ - type: scroll-frame
+ bounds: [0, 300, 50, 50]
+ items:
+ - type: rect
+ bounds: [0, 300, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/nested-stickys-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/nested-stickys-ref.yaml
new file mode 100644
index 00000000000..869ad7e9e18
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/nested-stickys-ref.yaml
@@ -0,0 +1,11 @@
+root:
+ items:
+ # This is a scroll frame with an out-of-viewport rect that should be pushed into the
+ # viewport by its "bottom" sticky constraint.
+ - type: scroll-frame
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: rect
+ bounds: [10, 20, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/nested-stickys.yaml b/third_party/webrender/wrench/reftests/scrolling/nested-stickys.yaml
new file mode 100644
index 00000000000..2082bb25768
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/nested-stickys.yaml
@@ -0,0 +1,20 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 30]
+ items:
+ - type: sticky-frame
+ bounds: [10, 30, 50, 50]
+ margin-top: 5
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: sticky-frame
+ bounds: [10, 30, 50, 50]
+ margin-top: 10
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: rect
+ bounds: [10, 30, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/out-of-bounds-scroll-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/out-of-bounds-scroll-ref.yaml
new file mode 100644
index 00000000000..eb503533142
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/out-of-bounds-scroll-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/out-of-bounds-scroll.yaml b/third_party/webrender/wrench/reftests/scrolling/out-of-bounds-scroll.yaml
new file mode 100644
index 00000000000..8c87bd6f5c5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/out-of-bounds-scroll.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [10, 10, 50, 100]
+ content-size: [50, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/reftest.list b/third_party/webrender/wrench/reftests/scrolling/reftest.list
new file mode 100644
index 00000000000..7f7241330fa
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/reftest.list
@@ -0,0 +1,19 @@
+== empty-mask.yaml empty-mask-ref.yaml
+== fixed-position-scrolling-clip.yaml fixed-position-scrolling-clip-ref.yaml
+== fixed-position.yaml fixed-position-ref.yaml
+== nested-scroll-offset.yaml nested-scroll-offset-ref.yaml
+== out-of-bounds-scroll.yaml out-of-bounds-scroll-ref.yaml
+== root-scroll.yaml root-scroll-ref.yaml
+== scroll-layer.yaml scroll-layer-ref.yaml
+== simple.yaml simple-ref.yaml
+== clip-and-scroll-property.yaml clip-and-scroll-property-ref.yaml
+== translate-nested.yaml translate-nested-ref.yaml
+== sticky.yaml sticky-ref.yaml
+== sticky-nested.yaml sticky-ref.yaml
+== sticky-applied.yaml sticky-applied-ref.yaml
+== sticky-transformed.yaml sticky-transformed-ref.yaml
+== sibling-hidden-clip.yaml sibling-hidden-clip-ref.yaml
+== scale-offsets.yaml scale-offsets-ref.yaml
+== nested-stickys.yaml nested-stickys-ref.yaml
+== viewport-offset.yaml viewport-offset-ref.yaml
+== ext-scroll-offset-1.yaml ext-scroll-offset-1-ref.yaml
diff --git a/third_party/webrender/wrench/reftests/scrolling/root-scroll-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/root-scroll-ref.yaml
new file mode 100644
index 00000000000..d49f063d3a1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/root-scroll-ref.yaml
@@ -0,0 +1,6 @@
+root:
+ bounds: [0, 0, 1024, 10000]
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/root-scroll.yaml b/third_party/webrender/wrench/reftests/scrolling/root-scroll.yaml
new file mode 100644
index 00000000000..d95c7debe16
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/root-scroll.yaml
@@ -0,0 +1,7 @@
+root:
+ bounds: [0, 0, 1024, 10000]
+ scroll-offset: [0, 100]
+ items:
+ - type: rect
+ bounds: [10, 110, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/scale-offsets-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/scale-offsets-ref.yaml
new file mode 100644
index 00000000000..9276ded8f8b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/scale-offsets-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ color: green
+ bounds: [50, 50, 50, 50]
diff --git a/third_party/webrender/wrench/reftests/scrolling/scale-offsets.yaml b/third_party/webrender/wrench/reftests/scrolling/scale-offsets.yaml
new file mode 100644
index 00000000000..5bfc2c22c9f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/scale-offsets.yaml
@@ -0,0 +1,16 @@
+# Test that a scroll-frame nested within a scale
+# transform correctly calculates local offsets.
+root:
+ items:
+ - type: stacking-context
+ transform: scale(0.5)
+ items:
+ - type: scroll-frame
+ bounds: [100, 100, 100, 100]
+ content-size: [260, 260]
+ scroll-offset: [0, 60]
+ items:
+ - type: rect
+ color: green
+ bounds: [100, 100, 260, 260]
+ hit-testing-tag: [0, 0]
diff --git a/third_party/webrender/wrench/reftests/scrolling/scroll-layer-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/scroll-layer-ref.yaml
new file mode 100644
index 00000000000..c2f0a30710d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/scroll-layer-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/scroll-layer.yaml b/third_party/webrender/wrench/reftests/scrolling/scroll-layer.yaml
new file mode 100644
index 00000000000..4956672a776
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/scroll-layer.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 100, 100]
+ content-size: [1000, 1000]
+ scroll-offset: [50, 50]
+ items:
+ - type: rect
+ bounds: [50, 50, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/sibling-hidden-clip-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/sibling-hidden-clip-ref.yaml
new file mode 100644
index 00000000000..f722f6f8158
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/sibling-hidden-clip-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 40, 70]
+ color: red
+ id: [0, 0]
+pipelines: []
diff --git a/third_party/webrender/wrench/reftests/scrolling/sibling-hidden-clip.yaml b/third_party/webrender/wrench/reftests/scrolling/sibling-hidden-clip.yaml
new file mode 100644
index 00000000000..74b735d32a2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/sibling-hidden-clip.yaml
@@ -0,0 +1,20 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ filters: [opacity(0.0)]
+ items:
+ -
+ bounds: [0, 0, 50, 80]
+ type: clip
+ id: 2
+ - type: rect
+ bounds: [10, 10, 100, 100]
+ color: red
+ clip-and-scroll: 2
+
+ id: [0, 0]
+pipelines: []
diff --git a/third_party/webrender/wrench/reftests/scrolling/simple-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/simple-ref.yaml
new file mode 100644
index 00000000000..cb9ddda07fb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/simple-ref.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/simple.yaml b/third_party/webrender/wrench/reftests/scrolling/simple.yaml
new file mode 100644
index 00000000000..b8061dfca94
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/simple.yaml
@@ -0,0 +1,16 @@
+root:
+ items:
+ - type: scroll-frame
+ bounds: [10, 10, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [10, 10, 500, 500]
+ color: green
+ - type: scroll-frame
+ bounds: [70, 10, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [70, 10, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/sticky-applied-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/sticky-applied-ref.yaml
new file mode 100644
index 00000000000..1dd3973c316
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/sticky-applied-ref.yaml
@@ -0,0 +1,70 @@
+root:
+ items:
+ # Reference images are listed in the same order as the test images -
+ # all the "bottom-sticky" ones are first, grouped together.
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [10, 70, 50, 40]
+ color: green
+ - type: rect
+ bounds: [10, 130, 50, 50]
+ color: green
+ - type: rect
+ bounds: [10, 190, 50, 50]
+ color: green
+ - type: rect
+ bounds: [10, 255, 50, 45]
+ color: green
+
+ # Top sticky
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 80, 50, 40]
+ color: green
+ - type: rect
+ bounds: [70, 130, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 190, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 250, 50, 45]
+ color: green
+
+ # Right sticky
+ - type: rect
+ bounds: [130, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [130, 70, 40, 50]
+ color: green
+ - type: rect
+ bounds: [130, 130, 50, 50]
+ color: green
+ - type: rect
+ bounds: [130, 190, 50, 50]
+ color: green
+ - type: rect
+ bounds: [135, 250, 45, 50]
+ color: green
+
+ # Left sticky
+ - type: rect
+ bounds: [190, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [200, 70, 40, 50]
+ color: green
+ - type: rect
+ bounds: [190, 130, 50, 50]
+ color: green
+ - type: rect
+ bounds: [190, 190, 50, 50]
+ color: green
+ - type: rect
+ bounds: [190, 250, 45, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/sticky-applied.yaml b/third_party/webrender/wrench/reftests/scrolling/sticky-applied.yaml
new file mode 100644
index 00000000000..c5ca4ad3c7c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/sticky-applied.yaml
@@ -0,0 +1,307 @@
+root:
+ items:
+ # Tests sticky-positioned items with previously-applied-offsets.
+
+ # This item is bottom-sticky; we indicate to WR that it already has had
+ # a sticky offset of y=-50 applied, and then scroll down by 50 pixels. WR
+ # should unapply the entire 50px that was applied, and leave the rect
+ # visually in the same spot.
+ - type: scroll-frame
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: sticky-frame
+ bounds: [10, 10, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ previously-applied-offset: [0, -50]
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
+ # Same as above, but this time we only indicate a previous-applied-offset
+ # of 40 pixels, so that's the maximum WR will unapply
+ - type: scroll-frame
+ bounds: [10, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: sticky-frame
+ bounds: [10, 70, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ previously-applied-offset: [0, -40]
+ items:
+ - type: rect
+ bounds: [10, 70, 50, 50]
+ color: green
+ # This time we indicate a previously-applied-offset of 50 pixels, but only
+ # scroll by 40 pixels. In this case 40 of the 50 applied-offset pixels will
+ # be unapplied
+ - type: scroll-frame
+ bounds: [10, 130, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 40]
+ items:
+ - type: sticky-frame
+ bounds: [10, 130, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ previously-applied-offset: [0, -50]
+ items:
+ - type: rect
+ bounds: [10, 130, 50, 50]
+ color: green
+ # Here we indicate a previously-applied-offset of 50 pixels, but continue
+ # scrolling in WR in the same direction by another 10 pixels. This effectively
+ # increases the applied offset to 60 pixels.
+ - type: scroll-frame
+ bounds: [10, 190, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, -10]
+ items:
+ - type: sticky-frame
+ bounds: [10, 190, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ previously-applied-offset: [0, -50]
+ items:
+ - type: rect
+ bounds: [10, 190, 50, 50]
+ color: green
+ # Same as previous case, but this time with the vertical-offset-bounds
+ # adjusted to limit the applied offset to only 55 pixels.
+ - type: scroll-frame
+ bounds: [10, 250, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, -10]
+ items:
+ - type: sticky-frame
+ bounds: [10, 250, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-55, 0]
+ previously-applied-offset: [0, -50]
+ items:
+ - type: rect
+ bounds: [10, 250, 50, 50]
+ color: green
+
+ # Repeat all the above cases, for top-sticky
+
+ - type: scroll-frame
+ bounds: [70, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, -50]
+ items:
+ - type: sticky-frame
+ bounds: [70, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ previously-applied-offset: [0, 50]
+ items:
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [70, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, -50]
+ items:
+ - type: sticky-frame
+ bounds: [70, 70, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ previously-applied-offset: [0, 40]
+ items:
+ - type: rect
+ bounds: [70, 70, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [70, 130, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, -40]
+ items:
+ - type: sticky-frame
+ bounds: [70, 130, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ previously-applied-offset: [0, 50]
+ items:
+ - type: rect
+ bounds: [70, 130, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [70, 190, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 10]
+ items:
+ - type: sticky-frame
+ bounds: [70, 190, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ previously-applied-offset: [0, 50]
+ items:
+ - type: rect
+ bounds: [70, 190, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [70, 250, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 10]
+ items:
+ - type: sticky-frame
+ bounds: [70, 250, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 55]
+ previously-applied-offset: [0, 50]
+ items:
+ - type: rect
+ bounds: [70, 250, 50, 50]
+ color: green
+
+ # Repeat all the above cases, for right-sticky
+
+ - type: scroll-frame
+ bounds: [130, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [130, 10, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ previously-applied-offset: [-50, 0]
+ items:
+ - type: rect
+ bounds: [130, 10, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [130, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [130, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ previously-applied-offset: [-40, 0]
+ items:
+ - type: rect
+ bounds: [130, 70, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [130, 130, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [40, 0]
+ items:
+ - type: sticky-frame
+ bounds: [130, 130, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ previously-applied-offset: [-50, 0]
+ items:
+ - type: rect
+ bounds: [130, 130, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [130, 190, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [-10, 0]
+ items:
+ - type: sticky-frame
+ bounds: [130, 190, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ previously-applied-offset: [-50, 0]
+ items:
+ - type: rect
+ bounds: [130, 190, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [130, 250, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [-10, 0]
+ items:
+ - type: sticky-frame
+ bounds: [130, 250, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-55, 0]
+ previously-applied-offset: [-50, 0]
+ items:
+ - type: rect
+ bounds: [130, 250, 50, 50]
+ color: green
+
+ # Repeat all the above cases, for left-sticky
+
+ - type: scroll-frame
+ bounds: [190, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [-50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [190, 10, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ previously-applied-offset: [50, 0]
+ items:
+ - type: rect
+ bounds: [190, 10, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [190, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [-50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [190, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ previously-applied-offset: [40, 0]
+ items:
+ - type: rect
+ bounds: [190, 70, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [190, 130, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [-40, 0]
+ items:
+ - type: sticky-frame
+ bounds: [190, 130, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ previously-applied-offset: [50, 0]
+ items:
+ - type: rect
+ bounds: [190, 130, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [190, 190, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [10, 0]
+ items:
+ - type: sticky-frame
+ bounds: [190, 190, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ previously-applied-offset: [50, 0]
+ items:
+ - type: rect
+ bounds: [190, 190, 50, 50]
+ color: green
+ - type: scroll-frame
+ bounds: [190, 250, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [10, 0]
+ items:
+ - type: sticky-frame
+ bounds: [190, 250, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 55]
+ previously-applied-offset: [50, 0]
+ items:
+ - type: rect
+ bounds: [190, 250, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/sticky-nested.yaml b/third_party/webrender/wrench/reftests/scrolling/sticky-nested.yaml
new file mode 100644
index 00000000000..d52821efebb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/sticky-nested.yaml
@@ -0,0 +1,215 @@
+root:
+ items:
+ # This is a scroll frame with an out-of-viewport rect that should be pushed into the
+ # viewport by its "bottom" sticky constraint.
+ - type: scroll-frame
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [10, 60, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ bounds: [10, 60, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: green
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ bounds: [70, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: sticky-frame
+ bounds: [70, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ bounds: [70, 10, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ bounds: [10, 70, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [60, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ bounds: [60, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [60, 70, 50, 50]
+ color: green
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ bounds: [70, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [70, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ bounds: [70, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [70, 70, 50, 50]
+ color: green
+
+ # The same tests, but this time with a margin.
+ - type: scroll-frame
+ bounds: [130, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [130, 60, 50, 50]
+ margin-bottom: 10
+ vertical-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ bounds: [130, 60, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [130, 60, 50, 50]
+ color: green
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ bounds: [190, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: sticky-frame
+ bounds: [190, 10, 50, 50]
+ margin-top: 10
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ bounds: [190, 10, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [190, 10, 50, 50]
+ color: green
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ bounds: [130, 70, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [180, 70, 50, 50]
+ margin-right: 10
+ horizontal-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ bounds: [180, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [180, 70, 50, 50]
+ color: green
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ bounds: [190, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [190, 70, 50, 50]
+ margin-left: 10
+ horizontal-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ bounds: [190, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [190, 70, 50, 50]
+ color: green
+
+ # The same tests, but this time with a limit.
+ - type: scroll-frame
+ bounds: [250, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [250, 60, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-25, 0]
+ items:
+ - type: clip
+ bounds: [250, 60, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [250, 60, 50, 50]
+ color: green
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ bounds: [310, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: sticky-frame
+ bounds: [310, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 25]
+ items:
+ - type: clip
+ bounds: [310, 10, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [310, 10, 50, 50]
+ color: green
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ bounds: [250, 70, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [300, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-25, 0]
+ items:
+ - type: clip
+ bounds: [300, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [300, 70, 50, 50]
+ color: green
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ bounds: [310, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [310, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 25]
+ items:
+ - type: clip
+ bounds: [310, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [310, 70, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/sticky-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/sticky-ref.yaml
new file mode 100644
index 00000000000..0f7b7b79a61
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/sticky-ref.yaml
@@ -0,0 +1,40 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [10, 70, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
+ - type: rect
+ bounds: [70, 70, 50, 50]
+ color: green
+
+ - type: rect
+ bounds: [130, 10, 50, 40]
+ color: green
+ - type: rect
+ bounds: [130, 70, 40, 50]
+ color: green
+ - type: rect
+ bounds: [190, 20, 50, 40]
+ color: green
+ - type: rect
+ bounds: [200, 70, 40, 50]
+ color: green
+
+ - type: rect
+ bounds: [250, 35, 50, 25]
+ color: green
+ - type: rect
+ bounds: [275, 70, 25, 50]
+ color: green
+ - type: rect
+ bounds: [310, 10, 50, 25]
+ color: green
+ - type: rect
+ bounds: [310, 70, 25, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/sticky-transformed-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/sticky-transformed-ref.yaml
new file mode 100644
index 00000000000..9849a3f3d85
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/sticky-transformed-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 30, 10, 10]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/sticky-transformed.yaml b/third_party/webrender/wrench/reftests/scrolling/sticky-transformed.yaml
new file mode 100644
index 00000000000..0144a7c1c34
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/sticky-transformed.yaml
@@ -0,0 +1,21 @@
+root:
+ items:
+ # There is a new reference frame introduced between the scrollframe and
+ # the sticky item. This tests that the sticky item is still positioned
+ # correctly.
+ - type: scroll-frame
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: stacking-context
+ bounds: [10, 20, 10, 10]
+ transform: translate(0, 10)
+ items:
+ - type: sticky-frame
+ bounds: [0, 0, 10, 10]
+ margin-top: 10
+ vertical-offset-bounds: [0, 200]
+ items:
+ - type: rect
+ bounds: [0, 0, 10, 10]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/sticky.yaml b/third_party/webrender/wrench/reftests/scrolling/sticky.yaml
new file mode 100644
index 00000000000..cdc0a7a1243
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/sticky.yaml
@@ -0,0 +1,167 @@
+root:
+ items:
+ # This is a scroll frame with an out-of-viewport rect that should be pushed into the
+ # viewport by its "bottom" sticky constraint.
+ - type: scroll-frame
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [10, 60, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ items:
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: green
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ bounds: [70, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: sticky-frame
+ bounds: [70, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ bounds: [10, 70, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [60, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ items:
+ - type: rect
+ bounds: [60, 70, 50, 50]
+ color: green
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ bounds: [70, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [70, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ items:
+ - type: rect
+ bounds: [70, 70, 50, 50]
+ color: green
+
+ # The same tests, but this time with a margin.
+ - type: scroll-frame
+ bounds: [130, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [130, 60, 50, 50]
+ margin-bottom: 10
+ vertical-offset-bounds: [-500, 0]
+ items:
+ - type: rect
+ bounds: [130, 60, 50, 50]
+ color: green
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ bounds: [190, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: sticky-frame
+ bounds: [190, 10, 50, 50]
+ margin-top: 10
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: rect
+ bounds: [190, 10, 50, 50]
+ color: green
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ bounds: [130, 70, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [180, 70, 50, 50]
+ margin-right: 10
+ horizontal-offset-bounds: [-500, 0]
+ items:
+ - type: rect
+ bounds: [180, 70, 50, 50]
+ color: green
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ bounds: [190, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [190, 70, 50, 50]
+ margin-left: 10
+ horizontal-offset-bounds: [0, 500]
+ items:
+ - type: rect
+ bounds: [190, 70, 50, 50]
+ color: green
+
+ # The same tests, but this time with a limit.
+ - type: scroll-frame
+ bounds: [250, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [250, 60, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-25, 0]
+ items:
+ - type: rect
+ bounds: [250, 60, 50, 50]
+ color: green
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ bounds: [310, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: sticky-frame
+ bounds: [310, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 25]
+ items:
+ - type: rect
+ bounds: [310, 10, 50, 50]
+ color: green
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ bounds: [250, 70, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [300, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-25, 0]
+ items:
+ - type: rect
+ bounds: [300, 70, 50, 50]
+ color: green
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ bounds: [310, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [310, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 25]
+ items:
+ - type: rect
+ bounds: [310, 70, 50, 50]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/scrolling/translate-nested-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/translate-nested-ref.yaml
new file mode 100644
index 00000000000..f9f6c68209d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/translate-nested-ref.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ -
+ bounds: [8, 8, 500, 500]
+ clip: [0, 0, 0, 0]
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: rect
+ color: green
+ id: [0, 0]
+pipelines: []
diff --git a/third_party/webrender/wrench/reftests/scrolling/translate-nested.yaml b/third_party/webrender/wrench/reftests/scrolling/translate-nested.yaml
new file mode 100644
index 00000000000..74bd647aa7e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/translate-nested.yaml
@@ -0,0 +1,28 @@
+---
+root:
+ items:
+ -
+ bounds: [8, 8, 500, 500]
+ type: "stacking-context"
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: clip
+ id: 2
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: rect
+ color: red
+ -
+ bounds: [0, 0, 200, 200]
+ type: "stacking-context"
+ transform: translate(100, 0)
+ items:
+ -
+ bounds: [-100, 0, 200, 200]
+ clip-rect: [-300, -300, 900, 900]
+ type: rect
+ color: green
+ id: [0, 0]
+pipelines: []
diff --git a/third_party/webrender/wrench/reftests/scrolling/viewport-offset-ref.yaml b/third_party/webrender/wrench/reftests/scrolling/viewport-offset-ref.yaml
new file mode 100644
index 00000000000..b7d697e4e02
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/viewport-offset-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ items:
+ - type: rect
+ color: red
+ bounds: 0 100 1000 50
diff --git a/third_party/webrender/wrench/reftests/scrolling/viewport-offset.yaml b/third_party/webrender/wrench/reftests/scrolling/viewport-offset.yaml
new file mode 100644
index 00000000000..9e807fd5f96
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/scrolling/viewport-offset.yaml
@@ -0,0 +1,20 @@
+# The test assures that the viewport offset is correctly getting
+# the reference_frame_relative_offset applied when flattening
+# a scroll frame.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 100 0 0
+ items:
+ - type: scroll-frame
+ bounds: 0 0 1000 1000
+ items:
+ - type: sticky-frame
+ bounds: 0 -50 1000 50
+ margin-top: -50
+ vertical-offset-bounds: [0, 2000]
+ items:
+ - type: rect
+ bounds: 0 -50 1000 100
+ color: red
diff --git a/third_party/webrender/wrench/reftests/snap/preserve-3d.png b/third_party/webrender/wrench/reftests/snap/preserve-3d.png
new file mode 100644
index 00000000000..d3efa984ee0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/snap/preserve-3d.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/snap/preserve-3d.yaml b/third_party/webrender/wrench/reftests/snap/preserve-3d.yaml
new file mode 100644
index 00000000000..346e881d835
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/snap/preserve-3d.yaml
@@ -0,0 +1,55 @@
+---
+root:
+ items:
+ -
+ bounds: [293, 139, 500, 500]
+ type: reference-frame
+ transform: scale(0.7)
+ items:
+ -
+ bounds: [0, 0, 500, 500]
+ type: stacking-context
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.25416666, -0.23866667, 1, -0.00083333335, 0, 0, 0, 1]
+ "transform-style": preserve-3d
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: stacking-context
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -110, 0, 0, 1]
+ items:
+ -
+ bounds: [24, 539, 24, 24]
+ type: clip
+ complex:
+ -
+ rect: [24, 539, 24, 24]
+ radius: [12, 12]
+ items:
+ -
+ bounds: [24, 539, 24, 24]
+ type: rect
+ color: black
+ -
+ bounds: [24, 770, 24, 24]
+ type: clip
+ complex:
+ -
+ rect: [24, 770, 24, 24]
+ radius: [12, 12]
+ items:
+ -
+ bounds: [24, 770, 24, 24]
+ type: rect
+ color: black
+ -
+ bounds: [24, 847, 24, 24]
+ type: clip
+ complex:
+ -
+ rect: [24, 847, 24, 24]
+ radius: [12, 12]
+ items:
+ -
+ bounds: [24, 847, 24, 24]
+ type: rect
+ color: black
diff --git a/third_party/webrender/wrench/reftests/snap/reftest.list b/third_party/webrender/wrench/reftests/snap/reftest.list
new file mode 100644
index 00000000000..84fe6c4979d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/snap/reftest.list
@@ -0,0 +1,3 @@
+platform(linux,mac) == snap.yaml snap.png
+== transform.yaml transform.png
+platform(linux,mac) == preserve-3d.yaml preserve-3d.png
diff --git a/third_party/webrender/wrench/reftests/snap/snap.png b/third_party/webrender/wrench/reftests/snap/snap.png
new file mode 100644
index 00000000000..1f736082d84
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/snap/snap.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/snap/snap.yaml b/third_party/webrender/wrench/reftests/snap/snap.yaml
new file mode 100644
index 00000000000..f292a728a90
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/snap/snap.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [ 1, 1, 5, 5 ]
+ color: green
+ - type: rect
+ bounds: [ 10.4, 1.8, 5, 5 ]
+ color: green
+ - type: rect
+ bounds: [ 21.5, 1.5, 5, 5 ]
+ color: green
+ - type: rect
+ bounds: [ 31.2, 1.6, 4.3, 5.5 ]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/snap/transform.png b/third_party/webrender/wrench/reftests/snap/transform.png
new file mode 100644
index 00000000000..4e2709effe9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/snap/transform.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/snap/transform.yaml b/third_party/webrender/wrench/reftests/snap/transform.yaml
new file mode 100644
index 00000000000..d1b0579eda3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/snap/transform.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ # 45 degrees result in middle -+ 14.142, rounded to 14
+ - type: stacking-context
+ bounds: [0, 0, 60, 60]
+ transform: rotate-y(45)
+ items:
+ - type: rect
+ bounds: [ 10, 10, 40, 40 ]
+ color: blue
+ # 50 degrees result in middle -+ 12.856, rounded to 13
+ - type: stacking-context
+ bounds: [50, 0, 60, 60]
+ transform: rotate-x(50)
+ items:
+ - type: rect
+ bounds: [ 10, 10, 40, 40 ]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/split/cross-ref.yaml b/third_party/webrender/wrench/reftests/split/cross-ref.yaml
new file mode 100644
index 00000000000..c784e62fce8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/cross-ref.yaml
@@ -0,0 +1,36 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(-45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 100]
+ color: green
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 50, 100]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [50, 0, 50, 100]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(-45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [50, 0, 50, 100]
+ color: green
+
+
diff --git a/third_party/webrender/wrench/reftests/split/cross.yaml b/third_party/webrender/wrench/reftests/split/cross.yaml
new file mode 100644
index 00000000000..e306dbad33e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/cross.yaml
@@ -0,0 +1,24 @@
+# Crossed planes test. Similar to "simple" but has more complex transformations,
+# which puts higher requirements on the precision of arithmetics,
+# and all 4 pieces are visible on screen.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 100, 200]
+ transform: rotate-y(-45) rotate-x(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/filter-ref.yaml b/third_party/webrender/wrench/reftests/split/filter-ref.yaml
new file mode 100644
index 00000000000..01e16b6e8f7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/filter-ref.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: [255, 0, 0, 0.5]
diff --git a/third_party/webrender/wrench/reftests/split/filter.yaml b/third_party/webrender/wrench/reftests/split/filter.yaml
new file mode 100644
index 00000000000..54667c0652e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/filter.yaml
@@ -0,0 +1,21 @@
+# This test ensures that an opacity filter forces the flattening of preserve-3D context.
+# The innermost rectangle has backface visibility disabled. If the parent stacking context
+# is a part of preserve-3D hierarchy, then the item would be backward-facing, thus invisible.
+# With the opacity filter, it's no longer a part of the preserve-3D, thus visible.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ transform-style: preserve-3d
+ transform: rotate-y(180)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ transform-style: preserve-3d
+ filters: [opacity(0.5)]
+ items:
+ - type: rect
+ bounds: [0, 0, 200, 200]
+ color: red
+ backface-visible: false
diff --git a/third_party/webrender/wrench/reftests/split/gradient-ref.yaml b/third_party/webrender/wrench/reftests/split/gradient-ref.yaml
new file mode 100644
index 00000000000..5a461c737d7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/gradient-ref.yaml
@@ -0,0 +1,39 @@
+# Checks the UV interpolation of a preserved 3d stacking context matches
+# a flat stacking context. There are four black rectangles that overlap
+# the edges of the transformed gradient to minimize fuzz.
+---
+root:
+ items:
+ - type: "reference-frame"
+ bounds: [0, 0, 2746, 1408]
+ transform-style: flat
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.4699999988079071, -0.44999998807907104, 1, -0.0012499999720603228, 176, 160, 0, 1]
+ items:
+ - type: "reference-frame"
+ bounds: [0, 0, 2746, 1408]
+ transform-style: flat
+ transform: rotate-y(-53)
+ items:
+ - type: "stacking-context"
+ transform-style: flat
+ items:
+ - type: rect
+ bounds: [0, 0, 300, 300]
+ color: 255 255 255 1.0000
+ - type: gradient
+ bounds: [0, 0, 300, 150]
+ start: [150, 0]
+ end: [150, 150]
+ stops: [0.0, [255, 0, 0, 1], 1.0, [254, 0, 0, 1]]
+ - type: rect
+ bounds: [520, 260, 120, 20]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [520, 336, 120, 3]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [520, 260, 10, 80]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [622, 260, 10, 80]
+ color: 0 0 0 1.0000
diff --git a/third_party/webrender/wrench/reftests/split/gradient.yaml b/third_party/webrender/wrench/reftests/split/gradient.yaml
new file mode 100644
index 00000000000..8da777df039
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/gradient.yaml
@@ -0,0 +1,42 @@
+# Checks the UV interpolation of a preserved 3d stacking context matches
+# a flat stacking context. There are four black rectangles that overlap
+# the edges of the transformed gradient to minimize fuzz.
+---
+root:
+ items:
+ - type: "reference-frame"
+ bounds: [0, 0, 2746, 1408]
+ transform-style: preserve-3d
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.4699999988079071, -0.44999998807907104, 1, -0.0012499999720603228, 176, 160, 0, 1]
+ items:
+ - type: "reference-frame"
+ bounds: [0, 0, 2746, 1408]
+ transform-style: preserve-3d
+ transform: rotate-y(-53)
+ items:
+ - type: "stacking-context"
+ transform-style: preserve-3d
+ items:
+ - type: "stacking-context"
+ transform-style: flat
+ items:
+ - type: rect
+ bounds: [0, 0, 300, 300]
+ color: 255 255 255 1.0000
+ - type: gradient
+ bounds: [0, 0, 300, 150]
+ start: [150, 0]
+ end: [150, 150]
+ stops: [0.0, [255, 0, 0, 1], 1.0, [254, 0, 0, 1]]
+ - type: rect
+ bounds: [520, 260, 120, 20]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [520, 336, 120, 3]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [520, 260, 10, 80]
+ color: 0 0 0 1.0000
+ - type: rect
+ bounds: [622, 260, 10, 80]
+ color: 0 0 0 1.0000
diff --git a/third_party/webrender/wrench/reftests/split/intermediate-1-ref.yaml b/third_party/webrender/wrench/reftests/split/intermediate-1-ref.yaml
new file mode 100644
index 00000000000..2d67df4ead2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/intermediate-1-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 8 36 100 100
+ color: green
+ - type: rect
+ bounds: 108 36 100 100
+ color: blue
+ - type: rect
+ bounds: 208 36 100 100
+ color: yellow
diff --git a/third_party/webrender/wrench/reftests/split/intermediate-1.yaml b/third_party/webrender/wrench/reftests/split/intermediate-1.yaml
new file mode 100644
index 00000000000..0c02fe8e3c9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/intermediate-1.yaml
@@ -0,0 +1,38 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 8 36 300 100
+ color: red
+ - type: stacking-context
+ transform-style: preserve-3d
+ transform: translate(8, 36, 0)
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: green
+ - type: stacking-context # flat, intermediate surface
+ items:
+ - type: stacking-context
+ transform: translate(100, 0, 0)
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: blue
+ - type: stacking-context
+ transform: translate(100, 0, 0)
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: yellow
diff --git a/third_party/webrender/wrench/reftests/split/intermediate-2.yaml b/third_party/webrender/wrench/reftests/split/intermediate-2.yaml
new file mode 100644
index 00000000000..7d926ade4a9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/intermediate-2.yaml
@@ -0,0 +1,34 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 8 36 300 100
+ color: red
+ - type: stacking-context
+ transform-style: preserve-3d
+ transform: translate(8, 36, 0)
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: green
+ - type: stacking-context
+ items:
+ - type: stacking-context
+ transform: translate(100, 0, 0)
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: blue
+ - type: stacking-context
+ transform: translate(100, 0, 0)
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: yellow
diff --git a/third_party/webrender/wrench/reftests/split/mixed-order-ref.yaml b/third_party/webrender/wrench/reftests/split/mixed-order-ref.yaml
new file mode 100644
index 00000000000..e3632665c0d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/mixed-order-ref.yaml
@@ -0,0 +1,22 @@
+# The result should be matching the flat ordering, since there
+# is no variation in Z of the preserve-3D children.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ transform: rotate-x(30)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: stacking-context
+ bounds: [25, 25, 100, 100]
+ #transform: rotate-z(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/split/mixed-order.yaml b/third_party/webrender/wrench/reftests/split/mixed-order.yaml
new file mode 100644
index 00000000000..789621dc5b1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/mixed-order.yaml
@@ -0,0 +1,25 @@
+# The "preserve-3d" context has a mix of children being other stacking contexts and
+# just primitives. The other stacking contexts are also "preserve-3d" but on the same plane,
+# so the result ordering should be exactly matching the way we specify the children.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 200]
+ transform-style: preserve-3d
+ transform: rotate-x(30)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: stacking-context
+ bounds: [25, 25, 100, 100]
+ #TODO: https://github.com/servo/webrender/issues/2946
+ #transform: rotate-z(45)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
+ - type: rect
+ bounds: [100, 0, 100, 100]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/split/near-plane.png b/third_party/webrender/wrench/reftests/split/near-plane.png
new file mode 100644
index 00000000000..c6e81c99837
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/near-plane.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/split/near-plane.yaml b/third_party/webrender/wrench/reftests/split/near-plane.yaml
new file mode 100644
index 00000000000..f1911674caf
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/near-plane.yaml
@@ -0,0 +1,16 @@
+# In this test, there is a single polygon intersecting the near plane.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform-style: preserve-3d
+ perspective: 200
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform: rotate-x(-60.0)
+ items:
+ - type: rect
+ bounds: [000, 0, 600, 600]
+ color: [255, 0, 0, 0.5]
diff --git a/third_party/webrender/wrench/reftests/split/nested-coord-systems-ref.yaml b/third_party/webrender/wrench/reftests/split/nested-coord-systems-ref.yaml
new file mode 100644
index 00000000000..97e2e82fc5d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/nested-coord-systems-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 0 0 150 200
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/nested-coord-systems.yaml b/third_party/webrender/wrench/reftests/split/nested-coord-systems.yaml
new file mode 100644
index 00000000000..5cdc4ab6347
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/nested-coord-systems.yaml
@@ -0,0 +1,28 @@
+# This test checks our ability to have the plane splitting root itself to be rasterized
+# in some local space. Perspective transform forces WR to use the local space.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 400 400
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ bounds: 0 0 400 400
+ transform-style: flat
+ transform: perspective(100) rotate-y(30)
+ transform-origin: 0 0
+ items:
+ - type: stacking-context
+ bounds: 0 0 400 400
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ bounds: 0 0 400 400
+ transform-style: flat
+ transform: perspective(100) rotate-y(30)
+ transform-origin: 0 0
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/nested-preserve3d-crash.yaml b/third_party/webrender/wrench/reftests/split/nested-preserve3d-crash.yaml
new file mode 100644
index 00000000000..68a01ebeb1c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/nested-preserve3d-crash.yaml
@@ -0,0 +1,37 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform-style: preserve-3d
+ transform: rotate-x(180)
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform-style: preserve-3d
+ transform: rotate-x(180)
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 0 200 200
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/nested-ref.yaml b/third_party/webrender/wrench/reftests/split/nested-ref.yaml
new file mode 100644
index 00000000000..798b624356a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/nested-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1024, 1024]
+ items:
+ - type: rect
+ bounds: [150, 0, 300, 600]
+ color: red
+ - type: rect
+ bounds: [150, 0, 300, 200]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/nested.yaml b/third_party/webrender/wrench/reftests/split/nested.yaml
new file mode 100644
index 00000000000..5b93224fda1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/nested.yaml
@@ -0,0 +1,25 @@
+# This tests have a non-preserve3d stacking context nested within
+# preserve-3d sub-tree. This nested context is still getting baked in
+# and participates (as a whole) in plane splitting.
+# It is layed out in the same plane as the parent, so should be ordered
+# last, given that it's coming later than the parent.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1024, 1024]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform-style: preserve-3d
+ transform: rotate-y(60.0)
+ items:
+ - type: rect
+ bounds: [0, 0, 600, 600]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 600, 200]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/order-1-ref.yaml b/third_party/webrender/wrench/reftests/split/order-1-ref.yaml
new file mode 100644
index 00000000000..930ac5c8b9a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/order-1-ref.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/order-1.yaml b/third_party/webrender/wrench/reftests/split/order-1.yaml
new file mode 100644
index 00000000000..7b5613f6d33
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/order-1.yaml
@@ -0,0 +1,20 @@
+# The "preserve-3d" context has a "flat" child. Rotation by 180 degrees and positive Z offset
+# should compensate each other, resulting in a green rectangle.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ transform-style: preserve-3d
+ transform: rotate-x(180)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ transform: translate(0, 0, 10)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
diff --git a/third_party/webrender/wrench/reftests/split/order-2-ref.yaml b/third_party/webrender/wrench/reftests/split/order-2-ref.yaml
new file mode 100644
index 00000000000..930ac5c8b9a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/order-2-ref.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/order-2.yaml b/third_party/webrender/wrench/reftests/split/order-2.yaml
new file mode 100644
index 00000000000..a94d25b8f16
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/order-2.yaml
@@ -0,0 +1,27 @@
+# The "preserve-3d" context has a "flat" child, which contains two other stacking contexts
+# that have their Z modified. The Z should not affect their drawing order, since they
+# are hidden from the 3D hierarchy by the flat parent.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ transform: translate(0, 0, 10)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: red
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ transform: translate(0, 0, -10)
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/order-3-ref.yaml b/third_party/webrender/wrench/reftests/split/order-3-ref.yaml
new file mode 100644
index 00000000000..9d896d9699e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/order-3-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ -
+ type: rect
+ bounds: [8, 8, 200, 200]
+ color: blue
+ -
+ type: rect
+ bounds: [8, 208, 200, 200]
+ color: blue
+ -
+ type: rect
+ bounds: [8, 408, 200, 200]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/split/order-3.yaml b/third_party/webrender/wrench/reftests/split/order-3.yaml
new file mode 100644
index 00000000000..7f80652af6f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/order-3.yaml
@@ -0,0 +1,31 @@
+# Ensure that preserve-3d items are correctly batched with transparent siblings.
+---
+root:
+ items:
+ -
+ type: stacking-context
+ transform-style: "preserve-3d"
+ items:
+ -
+ type: rect
+ bounds: [8, 8, 200, 200]
+ color: blue
+ -
+ type: stacking-context
+ transform-style: "preserve-3d"
+ items:
+ -
+ type: rect
+ bounds: [8, 208, 200, 200]
+ color: blue
+ - type: rect
+ color: [255, 0, 0, 0.5]
+ bounds: [8, 408, 200, 200]
+ -
+ type: stacking-context
+ transform-style: "preserve-3d"
+ items:
+ -
+ type: rect
+ bounds: [8, 408, 200, 200]
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/split/ordering-ref.yaml b/third_party/webrender/wrench/reftests/split/ordering-ref.yaml
new file mode 100644
index 00000000000..33ad5716602
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/ordering-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ -
+ bounds: [15, 15, 150, 300]
+ type: rect
+ color: 255 0 0 1.0000
+ -
+ bounds: [203, 15, 150, 300]
+ type: rect
+ color: 255 0 0 1.0000
+ -
+ bounds: [0, 0, 450, 150]
+ type: rect
+ color: 0 0 0 0.6667
diff --git a/third_party/webrender/wrench/reftests/split/ordering.yaml b/third_party/webrender/wrench/reftests/split/ordering.yaml
new file mode 100644
index 00000000000..28091664541
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/ordering.yaml
@@ -0,0 +1,25 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 15, 15, 0, 1]
+ "transform-style": "preserve-3d"
+ items:
+ -
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.05, -0.1, 1, -0.00066666666, 0, 0, 0, 1]
+ type: "stacking-context"
+ "transform-style": "preserve-3d"
+ items:
+ -
+ bounds: [0, 0, 150, 300]
+ type: rect
+ color: 255 0 0 1.0000
+ -
+ bounds: [203, 15, 150, 300]
+ type: rect
+ color: 255 0 0 1.0000
+ -
+ bounds: [0, 0, 450, 150]
+ type: rect
+ color: 0 0 0 0.6667
diff --git a/third_party/webrender/wrench/reftests/split/perspective-clipping-ref.yaml b/third_party/webrender/wrench/reftests/split/perspective-clipping-ref.yaml
new file mode 100644
index 00000000000..8f6d4a15666
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/perspective-clipping-ref.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 0 1024 768
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/perspective-clipping.yaml b/third_party/webrender/wrench/reftests/split/perspective-clipping.yaml
new file mode 100644
index 00000000000..7135f27c378
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/perspective-clipping.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ items:
+ - type: rect
+ bounds: 0 0 1024 768
+ color: red
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ transform-style: preserve-3d
+ perspective: 300
+ perspective-origin: 0 0
+ items:
+ - type: stacking-context
+ bounds: 0 0 1024 768
+ # translate-Z(-300) scale(2)
+ transform: 2 0 0 0 0 2 0 0 0 0 2 0 0 0 -300 1
+ items:
+ - type: rect
+ bounds: 0 0 1024 768
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/reftest.list b/third_party/webrender/wrench/reftests/split/reftest.list
new file mode 100644
index 00000000000..65692ccd1d9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/reftest.list
@@ -0,0 +1,22 @@
+== simple.yaml simple-ref.yaml
+== order-1.yaml order-1-ref.yaml
+== order-2.yaml order-2-ref.yaml
+== nested.yaml nested-ref.yaml
+# fuzziness is needed due to perspective for the edge
+fuzzy(35,200) == nested-coord-systems.yaml nested-coord-systems-ref.yaml
+== nested-preserve3d-crash.yaml nested-preserve3d-crash.yaml
+== perspective-clipping.yaml perspective-clipping-ref.yaml
+== intermediate-1.yaml intermediate-1-ref.yaml
+== intermediate-2.yaml intermediate-1-ref.yaml
+== split-intersect1.yaml split-intersect1-ref.yaml
+== ordering.yaml ordering-ref.yaml
+fuzzy(1,20) == near-plane.yaml near-plane.png
+# Note: on windows the image is rendered at a slightly different spot.
+# similarly, a lot of tests in "transform" are non-windows. TODO: investigate
+platform(linux,mac) fuzzy(1,20) == same-plane.yaml same-plane.png
+#TODO: https://github.com/servo/webrender/issues/2946
+#== cross.yaml cross-ref.yaml
+== mixed-order.yaml mixed-order-ref.yaml
+fuzzy(1,40000) == filter.yaml filter-ref.yaml
+fuzzy(1,10000) == gradient.yaml gradient-ref.yaml
+== order-3.yaml order-3-ref.yaml
diff --git a/third_party/webrender/wrench/reftests/split/same-plane.png b/third_party/webrender/wrench/reftests/split/same-plane.png
new file mode 100644
index 00000000000..414dc5cd84f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/same-plane.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/split/same-plane.yaml b/third_party/webrender/wrench/reftests/split/same-plane.yaml
new file mode 100644
index 00000000000..277709bad1f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/same-plane.yaml
@@ -0,0 +1,33 @@
+# This test has a number of rectangles placed on the same transformed preserve3d plane.
+# The expected result is that the rectangles are rendered in the order they are listed.
+# This can fail if the primitives are considered outside of the main plane due
+# to floating point precision issues in plane-splitting and transformation.
+---
+root:
+ items:
+ - type: "stacking-context"
+ transform-style: preserve-3d
+ transform: rotate-y(-30) rotate-x(-75) translate(-100, 100, 0)
+ items:
+ - type: "stacking-context"
+ perspective: 400
+ transform-style: preserve-3d
+ items:
+ - type: rect
+ bounds: [0, 0, 450, 300]
+ color: 0 255 0 1.0000
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform: translate(200, 0, 0)
+ items:
+ - type: rect
+ bounds: [-200, 0, 150, 300]
+ color: 255 0 0 1.0000
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform: rotate-z(-90)
+ items:
+ -
+ bounds: [0, 200, 150, 200]
+ type: rect
+ color: 0 0 255 1.0000
diff --git a/third_party/webrender/wrench/reftests/split/simple-ref.yaml b/third_party/webrender/wrench/reftests/split/simple-ref.yaml
new file mode 100644
index 00000000000..de1fad94406
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/simple-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1024, 1024]
+ items:
+ - type: rect
+ bounds: [150, 0, 150, 600]
+ color: [191, 127, 63]
+ - type: rect
+ bounds: [300, 0, 150, 600]
+ color: [127, 191, 63]
diff --git a/third_party/webrender/wrench/reftests/split/simple.yaml b/third_party/webrender/wrench/reftests/split/simple.yaml
new file mode 100644
index 00000000000..b6445780f5f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/simple.yaml
@@ -0,0 +1,24 @@
+# This tests a simple intersection of 2 rotated planes to split properly.
+# If the split doesn't happen, we see a single-colored rectangle.
+# If it does, the rectangle gets split vertically in 2 parts of different colors.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1024, 1024]
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform: rotate-y(-60.0)
+ items:
+ - type: rect
+ bounds: [0, 0, 600, 600]
+ color: [255, 0, 0, 0.5]
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ transform: rotate-y(60.0)
+ items:
+ - type: rect
+ bounds: [0, 0, 600, 600]
+ color: [0, 255, 0, 0.5]
diff --git a/third_party/webrender/wrench/reftests/split/split-intersect1-ref.yaml b/third_party/webrender/wrench/reftests/split/split-intersect1-ref.yaml
new file mode 100644
index 00000000000..134698571c0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/split-intersect1-ref.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: stacking-context
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ bounds: 50 0 50 100
+ color: red
+ - type: stacking-context
+ items:
+ - type: rect
+ bounds: 0 0 50 100
+ color: green
diff --git a/third_party/webrender/wrench/reftests/split/split-intersect1.yaml b/third_party/webrender/wrench/reftests/split/split-intersect1.yaml
new file mode 100644
index 00000000000..dff76387072
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/split/split-intersect1.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: red
+ - type: stacking-context
+ transform: rotate-y(-0.1)
+ bounds: 0 0 100 100
+ items:
+ - type: rect
+ bounds: 0 0 100 100
+ color: green
diff --git a/third_party/webrender/wrench/reftests/text/1658-ref.yaml b/third_party/webrender/wrench/reftests/text/1658-ref.yaml
new file mode 100644
index 00000000000..4f5fbe15c51
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/1658-ref.yaml
@@ -0,0 +1,26 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 5
+ bounds: [14, 18, 205, 35]
+ offset: [0, 0]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 0, 0.0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+ -
+ type: text
+ bounds: [14, 18, 205, 35]
+ glyphs: [55]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 0, 1.0]
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/1658.yaml b/third_party/webrender/wrench/reftests/text/1658.yaml
new file mode 100644
index 00000000000..523e7b11432
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/1658.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 5
+ bounds: [14, 18, 205, 35]
+ offset: [0, 0]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 0, 1.0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+
diff --git a/third_party/webrender/wrench/reftests/text/Ahem.ttf b/third_party/webrender/wrench/reftests/text/Ahem.ttf
new file mode 100644
index 00000000000..4d4785a4123
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/Ahem.ttf
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/FreeSans.ttf b/third_party/webrender/wrench/reftests/text/FreeSans.ttf
new file mode 100644
index 00000000000..9db958532c1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/FreeSans.ttf
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/Proggy-License.txt b/third_party/webrender/wrench/reftests/text/Proggy-License.txt
new file mode 100644
index 00000000000..f45a0d4bedd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/Proggy-License.txt
@@ -0,0 +1,10 @@
+The "Proggy.ttf" font was downloaded from https://proggyfonts.net/download/ on Dec 5, 2017.
+The following license applies to "Proggy.ttf":
+
+Copyright (c) 2004, 2005 Tristan Grimmer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/third_party/webrender/wrench/reftests/text/Proggy.ttf b/third_party/webrender/wrench/reftests/text/Proggy.ttf
new file mode 100644
index 00000000000..308d3e1ac9b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/Proggy.ttf
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/VeraBd.ttf b/third_party/webrender/wrench/reftests/text/VeraBd.ttf
new file mode 100644
index 00000000000..51d6111d722
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/VeraBd.ttf
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/ahem-ref.yaml b/third_party/webrender/wrench/reftests/text/ahem-ref.yaml
new file mode 100644
index 00000000000..061e62abbff
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/ahem-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [ 16, 16, 520, 280 ]
+ color: 128 128 128 1.0
+ - type: rect
+ bounds: [ 56, 56, 440, 200 ]
+ color: white
+ - type: rect
+ bounds: [ 56, 56, 80, 160 ]
+ color: blue
+ - type: rect
+ bounds: [ 56, 216, 120, 40 ]
+ color: black
+ - type: rect
+ bounds: [ 176, 56, 80, 160 ]
+ color: 255 165 0 1.0000
diff --git a/third_party/webrender/wrench/reftests/text/ahem.yaml b/third_party/webrender/wrench/reftests/text/ahem.yaml
new file mode 100644
index 00000000000..94817b6fe0b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/ahem.yaml
@@ -0,0 +1,243 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "backface-visible": true
+ -
+ bounds: [0, 0, 2560, 1294]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ type: rect
+ color: white
+ -
+ bounds: [0, 0, 2560, 1294]
+ "clip-rect": [0, 0, 2560, 1294]
+ "backface-visible": true
+ type: clip
+ id: 10
+ "content-size": [2560, 1294]
+ -
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 10
+ "backface-visible": true
+ type: "scroll-frame"
+ id: 2
+ "content-size": [2560, 1294]
+ bounds: [0, 0, 2560, 1294]
+ -
+ bounds: [0, 0, 2560, 1294]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 2
+ "backface-visible": true
+ type: clip
+ id: 3
+ "content-size": [2560, 1294]
+ -
+ bounds: [0, 0, 2560, 1294]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ type: rect
+ color: white
+ -
+ bounds: [16, 16, 520, 280]
+ "clip-rect": [16, 16, 520, 280]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ type: border
+ width: 40
+ "border-type": normal
+ color: 128 128 128 1.0000
+ style: solid
+ -
+ bounds: [56, 216, 80, 40]
+ "clip-rect": [56, 216, 80, 40]
+ "clip-and-scroll": 2
+ "backface-visible": true
+ type: clip
+ id: 4
+ "content-size": [80, 40]
+ -
+ bounds: [56, 216, 80, 40]
+ "clip-rect": [56, 216, 80, 40]
+ "clip-and-scroll": 4
+ "backface-visible": true
+ type: rect
+ color: black
+ -
+ bounds: [54, 55, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [67, 68]
+ offsets: [56, 88, 96, 88]
+ size: 30
+ color: 0 0 255 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [54, 95, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [69, 70]
+ offsets: [56, 128, 96, 128]
+ size: 30
+ color: 0 0 255 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [54, 135, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [71, 72]
+ offsets: [56, 168, 96, 168]
+ size: 30
+ color: 0 0 255 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [54, 175, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [73, 74]
+ offsets: [56, 208, 96, 208]
+ size: 30
+ color: 0 0 255 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [54, 215, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [19, 20, 21]
+ offsets: [56, 248, 96, 248, 136, 248]
+ size: 30
+ color: black
+ font: "Ahem.ttf"
+ -
+ bounds: [174, 55, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [75, 76]
+ offsets: [176, 88, 216, 88]
+ size: 30
+ color: 255 165 0 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [174, 95, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [77, 78]
+ offsets: [176, 128, 216, 128]
+ size: 30
+ color: 255 165 0 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [174, 135, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [79, 80]
+ offsets: [176, 168, 216, 168]
+ size: 30
+ color: 255 165 0 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [174, 175, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [81, 83]
+ offsets: [176, 208, 216, 208]
+ size: 30
+ color: 255 165 0 1.0000
+ font: "Ahem.ttf"
+ -
+ bounds: [174, 215, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [67, 68]
+ offsets: [176, 248, 216, 248]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [294, 55, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [69, 70]
+ offsets: [296, 88, 336, 88]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [294, 95, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [71, 72]
+ offsets: [296, 128, 336, 128]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [294, 135, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [73, 74]
+ offsets: [296, 168, 336, 168]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [294, 175, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [84, 85]
+ offsets: [296, 208, 336, 208]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [294, 215, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [86, 87]
+ offsets: [296, 248, 336, 248]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [414, 55, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [88, 89]
+ offsets: [416, 88, 456, 88]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [414, 95, 124, 42]
+ "clip-rect": [0, 0, 2560, 1294]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ glyphs: [90, 91]
+ offsets: [416, 128, 456, 128]
+ size: 30
+ color: white
+ font: "Ahem.ttf"
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "clip-and-scroll": root-scroll-node
+ "backface-visible": true
diff --git a/third_party/webrender/wrench/reftests/text/allow-subpixel-ref.yaml b/third_party/webrender/wrench/reftests/text/allow-subpixel-ref.yaml
new file mode 100644
index 00000000000..d99c91b77f6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/allow-subpixel-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - text: "This should not be subpixel text"
+ origin: 20 120
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/allow-subpixel.yaml b/third_party/webrender/wrench/reftests/text/allow-subpixel.yaml
new file mode 100644
index 00000000000..d7bd98a2873
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/allow-subpixel.yaml
@@ -0,0 +1,19 @@
+--- # Verify that subpixel AA is disabled if the text's enclosing stacking context requires an intermediate surface
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 200]
+ blend-container: true
+ items:
+ - text: "This should not be subpixel text"
+ origin: 20 120
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
+ - type: stacking-context
+ bounds: [0, 0, 100, 100]
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [0, 0, 100, 100]
+ color: white
diff --git a/third_party/webrender/wrench/reftests/text/alpha-transform.png b/third_party/webrender/wrench/reftests/text/alpha-transform.png
new file mode 100644
index 00000000000..b5af70dbf88
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/alpha-transform.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/alpha-transform.yaml b/third_party/webrender/wrench/reftests/text/alpha-transform.yaml
new file mode 100644
index 00000000000..8a623b80671
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/alpha-transform.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 660, 210]
+ transform: scale(1.5, 2.5) rotate(-10)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 20 50
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/bg-color-ref.yaml b/third_party/webrender/wrench/reftests/text/bg-color-ref.yaml
new file mode 100644
index 00000000000..01af0e93b6f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/bg-color-ref.yaml
@@ -0,0 +1,8 @@
+---
+root:
+ items:
+ - text: "A"
+ origin: 30 220
+ size: 200
+ color: black
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/bg-color.yaml b/third_party/webrender/wrench/reftests/text/bg-color.yaml
new file mode 100644
index 00000000000..14f53d79be3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/bg-color.yaml
@@ -0,0 +1,15 @@
+# verify that drawing a text run on an off-screen surface with a
+# specified background color gives the same result as drawing a
+# subpixel text run directly on the background.
+---
+root:
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ items:
+ - text: "A"
+ origin: 30 220
+ size: 200
+ color: black
+ font: "FreeSans.ttf"
+ bg-color: white
diff --git a/third_party/webrender/wrench/reftests/text/blank.yaml b/third_party/webrender/wrench/reftests/text/blank.yaml
new file mode 100644
index 00000000000..c4eb3ab6730
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/third_party/webrender/wrench/reftests/text/blurred-shadow-local-clip-rect-ref.png b/third_party/webrender/wrench/reftests/text/blurred-shadow-local-clip-rect-ref.png
new file mode 100644
index 00000000000..895d42eaf5c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/blurred-shadow-local-clip-rect-ref.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/blurred-shadow-local-clip-rect.yaml b/third_party/webrender/wrench/reftests/text/blurred-shadow-local-clip-rect.yaml
new file mode 100644
index 00000000000..bbfc2f1f9fe
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/blurred-shadow-local-clip-rect.yaml
@@ -0,0 +1,48 @@
+# This test ensures that for text that has a shadow and blurred shadow, the
+# shadows are clipped in the same way (via the local clip rect) as the shadowed
+# element.
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [10, 14, 220, 200]
+ blur-radius: 0
+ offset: [0, 50]
+ color: black
+ -
+ type: "shadow"
+ bounds: [10, 14, 220, 100]
+ blur-radius: 3
+ offset: [0, 25]
+ color: black
+ -
+ bounds: [10, 14, 215, 45]
+ clip-rect: [10, 14, 122, 40]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: green
+ font: "VeraBd.ttf"
+ -
+ type: line
+ clip-rect: [10, 14, 122, 40]
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: green
+ style: solid
+ -
+ type: line
+ clip-rect: [10, 14, 122, 40]
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: green
+ style: solid
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/border-radius-alpha.png b/third_party/webrender/wrench/reftests/text/border-radius-alpha.png
new file mode 100644
index 00000000000..cd792b0f673
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/border-radius-alpha.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/border-radius-subpx.png b/third_party/webrender/wrench/reftests/text/border-radius-subpx.png
new file mode 100644
index 00000000000..267b2030a75
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/border-radius-subpx.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/border-radius.yaml b/third_party/webrender/wrench/reftests/text/border-radius.yaml
new file mode 100644
index 00000000000..cda868891d0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/border-radius.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [20, 20, 100, 100]
+ complex:
+ - rect: [20, 20, 100, 100]
+ radius: 32
+ items:
+ - type: rect
+ bounds: [20, 20, 100, 100]
+ color: blue
+ - text: "A"
+ origin: 30 120
+ size: 200
+ color: red
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/clipped-transform.png b/third_party/webrender/wrench/reftests/text/clipped-transform.png
new file mode 100644
index 00000000000..2afb04b8bbd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/clipped-transform.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/clipped-transform.yaml b/third_party/webrender/wrench/reftests/text/clipped-transform.yaml
new file mode 100644
index 00000000000..7f9c9b86617
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/clipped-transform.yaml
@@ -0,0 +1,12 @@
+--- # checks that local clip rects don't inappropriately shear transformed glyphs
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 65, 70]
+ transform: [0.7086478, 0.7055624, 0, 0, -0.7055624, 0.7086478, 0, 0, 0, 0, 1, 0, 40, 10, 0, 1]
+ items:
+ - text: "O"
+ clip-rect: [0, 0, 44, 44]
+ origin: 0 38
+ size: 30
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/color-bitmap-shadow-ref.yaml b/third_party/webrender/wrench/reftests/text/color-bitmap-shadow-ref.yaml
new file mode 100644
index 00000000000..039f3c6edfe
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/color-bitmap-shadow-ref.yaml
@@ -0,0 +1,30 @@
+---
+root:
+ items:
+ -
+ text: "\u263A"
+ origin: [8, 56]
+ size: 36
+ color: white
+ family: "Apple Color Emoji"
+ embedded-bitmaps: true
+ -
+ type: rect
+ bounds: [56, 56, 48, 48]
+ color: yellow
+ -
+ type: rect
+ bounds: [56, 56, 48, 12]
+ color: black
+ -
+ type: rect
+ bounds: [56, 92, 48, 12]
+ color: black
+ -
+ type: rect
+ bounds: [56, 56, 12, 48]
+ color: black
+ -
+ type: rect
+ bounds: [92, 56, 12, 48]
+ color: black
diff --git a/third_party/webrender/wrench/reftests/text/color-bitmap-shadow.yaml b/third_party/webrender/wrench/reftests/text/color-bitmap-shadow.yaml
new file mode 100644
index 00000000000..4ead9270cd4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/color-bitmap-shadow.yaml
@@ -0,0 +1,34 @@
+--- # checks that color emoji fast shadows use the shadow color
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 115, 115]
+ offset: [48, 48]
+ blur-radius: 0
+ color: yellow
+ -
+ text: "\u263A"
+ origin: [8, 56]
+ size: 36
+ color: blue
+ family: "Apple Color Emoji"
+ embedded-bitmaps: true
+ -
+ type: "pop-all-shadows"
+ -
+ type: rect
+ bounds: [56, 56, 48, 12]
+ color: black
+ -
+ type: rect
+ bounds: [56, 92, 48, 12]
+ color: black
+ -
+ type: rect
+ bounds: [56, 56, 12, 48]
+ color: black
+ -
+ type: rect
+ bounds: [92, 56, 12, 48]
+ color: black
diff --git a/third_party/webrender/wrench/reftests/text/colors-alpha.png b/third_party/webrender/wrench/reftests/text/colors-alpha.png
new file mode 100644
index 00000000000..e82f79ddce2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/colors-alpha.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/colors-subpx.png b/third_party/webrender/wrench/reftests/text/colors-subpx.png
new file mode 100644
index 00000000000..8f943b2f80c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/colors-subpx.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/colors.yaml b/third_party/webrender/wrench/reftests/text/colors.yaml
new file mode 100644
index 00000000000..aceb0328981
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/colors.yaml
@@ -0,0 +1,211 @@
+root:
+ items:
+ - type: rect
+ bounds: [10, 10, 250, 50]
+ color: white
+ - text: "A B C a b c"
+ origin: 20 50
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [270, 10, 250, 50]
+ color: red
+ - text: "A B C a b c"
+ origin: 280 50
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [530, 10, 250, 50]
+ color: green
+ - text: "A B C a b c"
+ origin: 540 50
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [10, 70, 250, 50]
+ color: blue
+ - text: "A B C a b c"
+ origin: 20 110
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [270, 70, 250, 50]
+ color: [100, 100, 100]
+ - text: "A B C a b c"
+ origin: 280 110
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [530, 70, 250, 50]
+ color: [200, 100, 150]
+ - text: "A B C a b c"
+ origin: 540 110
+ size: 32
+ font: "FreeSans.ttf"
+
+ - type: rect
+ bounds: [10, 130, 250, 50]
+ color: white
+ - text: "A B C a b c"
+ origin: 20 170
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [270, 130, 250, 50]
+ color: red
+ - text: "A B C a b c"
+ origin: 280 170
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [530, 130, 250, 50]
+ color: green
+ - text: "A B C a b c"
+ origin: 540 170
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [10, 190, 250, 50]
+ color: blue
+ - text: "A B C a b c"
+ origin: 20 230
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [270, 190, 250, 50]
+ color: [100, 100, 100]
+ - text: "A B C a b c"
+ origin: 280 230
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [530, 190, 250, 50]
+ color: [200, 100, 150]
+ - text: "A B C a b c"
+ origin: 540 230
+ size: 32
+ font: "FreeSans.ttf"
+ color: white
+
+ - type: rect
+ bounds: [10, 250, 250, 50]
+ color: white
+ - text: "A B C a b c"
+ origin: 20 290
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [270, 250, 250, 50]
+ color: red
+ - text: "A B C a b c"
+ origin: 280 290
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [530, 250, 250, 50]
+ color: green
+ - text: "A B C a b c"
+ origin: 540 290
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [10, 310, 250, 50]
+ color: blue
+ - text: "A B C a b c"
+ origin: 20 350
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [270, 310, 250, 50]
+ color: [100, 100, 100]
+ - text: "A B C a b c"
+ origin: 280 350
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [530, 310, 250, 50]
+ color: [200, 100, 150]
+ - text: "A B C a b c"
+ origin: 540 350
+ size: 32
+ font: "FreeSans.ttf"
+ color: [200, 180, 200]
+
+ - type: rect
+ bounds: [10, 370, 250, 50]
+ color: white
+ - text: "A B C a b c"
+ origin: 20 410
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
+
+ - type: rect
+ bounds: [270, 370, 250, 50]
+ color: red
+ - text: "A B C a b c"
+ origin: 280 410
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
+
+ - type: rect
+ bounds: [530, 370, 250, 50]
+ color: green
+ - text: "A B C a b c"
+ origin: 540 410
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
+
+ - type: rect
+ bounds: [10, 430, 250, 50]
+ color: blue
+ - text: "A B C a b c"
+ origin: 20 470
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
+
+ - type: rect
+ bounds: [270, 430, 250, 50]
+ color: [100, 100, 100]
+ - text: "A B C a b c"
+ origin: 280 470
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
+
+ - type: rect
+ bounds: [530, 430, 250, 50]
+ color: [200, 100, 150]
+ - text: "A B C a b c"
+ origin: 540 470
+ size: 32
+ font: "FreeSans.ttf"
+ color: [50, 50, 50, 0.5]
diff --git a/third_party/webrender/wrench/reftests/text/decorations-ref.yaml b/third_party/webrender/wrench/reftests/text/decorations-ref.yaml
new file mode 100644
index 00000000000..5ad75109fab
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/decorations-ref.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: rect # short, horizontal
+ bounds: [ 4, 2, 5, 1 ]
+ color: green
+ - type: rect # short, vertical
+ bounds: [ 12, 14, 1, 5 ]
+ color: red
+ style: solid
+ - type: rect # long, horizontal
+ bounds: [ 34, 32, 200, 3 ]
+ color: blue
+ style: solid
+ - type: rect # long, vertical
+ bounds: [ 52, 54, 3, 200 ]
+ color: black
+ style: solid
+
diff --git a/third_party/webrender/wrench/reftests/text/decorations-suite.png b/third_party/webrender/wrench/reftests/text/decorations-suite.png
new file mode 100644
index 00000000000..dc69e0f6d9b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/decorations-suite.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/decorations-suite.yaml b/third_party/webrender/wrench/reftests/text/decorations-suite.yaml
new file mode 100644
index 00000000000..bbe02dcc95a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/decorations-suite.yaml
@@ -0,0 +1,348 @@
+---
+root:
+ items:
+ - type: line
+ baseline: 10
+ start: 10
+ end: 210
+ width: 1
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 20
+ start: 10
+ end: 210
+ width: 1
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 30
+ start: 10
+ end: 210
+ width: 1
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 40
+ start: 10
+ end: 210
+ width: 3
+ thickness: 1
+ orientation: horizontal
+ color: red
+ style: wavy
+
+ - type: line
+ baseline: 50
+ start: 10
+ end: 210
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 65
+ start: 10
+ end: 210
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 80
+ start: 10
+ end: 207 # pruposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 95
+ start: 10
+ end: 210
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [8, 100, 225, 50]
+ blur-radius: 0
+ offset: [2, 2]
+ color: red
+ - type: line
+ baseline: 110
+ start: 10
+ end: 210
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: solid
+ - type: line
+ baseline: 120
+ start: 10
+ end: 210
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dashed
+ - type: line
+ baseline: 130
+ start: 10
+ end: 209
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dotted
+ - type: line
+ baseline: 140
+ start: 10
+ end: 210
+ width: 3
+ thickness: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 145, 225, 65]
+ blur-radius: 1
+ offset: [2, 3]
+ color: red
+ - type: line
+ baseline: 150
+ start: 10
+ end: 210
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 165
+ start: 10
+ end: 210
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 180
+ start: 10
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 195
+ start: 10
+ end: 210
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 220, 225, 40]
+ blur-radius: 0
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 230
+ start: 10
+ end: 210
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 250
+ start: 10
+ end: 210
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 270
+ start: 10
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 290
+ start: 10
+ end: 210
+ width: 12
+ thickness: 3
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [0, 320, 240, 140]
+ blur-radius: 3
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 330
+ start: 10
+ end: 210
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 350
+ start: 10
+ end: 210
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 370
+ start: 10
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 390
+ start: 10
+ end: 210
+ width: 16
+ thickness: 4
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ - type: line
+ baseline: 220
+ start: 10
+ end: 210
+ width: 1
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 230
+ start: 10
+ end: 210
+ width: 1
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 240
+ start: 10
+ end: 210
+ width: 1
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 250
+ start: 10
+ end: 210
+ thickness: 1
+ width: 3
+ orientation: vertical
+ color: red
+ style: wavy
+
+ - type: line
+ baseline: 270
+ start: 10
+ end: 210
+ width: 2
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 290
+ start: 10
+ end: 210
+ width: 2
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 310
+ start: 10
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 330
+ start: 10
+ end: 210
+ thickness: 2
+ width: 6
+ orientation: vertical
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [350, 0, 120, 240]
+ blur-radius: 3
+ offset: [5, 2]
+ color: black
+ - type: line
+ baseline: 380
+ start: 10
+ end: 210
+ width: 8
+ orientation: vertical
+ color: yellow
+ style: solid
+ - type: line
+ baseline: 400
+ start: 10
+ end: 210
+ width: 8
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 420
+ start: 10
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 440
+ start: 10
+ end: 210
+ thickness: 4
+ width: 16
+ orientation: vertical
+ color: red
+ style: wavy
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/decorations.yaml b/third_party/webrender/wrench/reftests/text/decorations.yaml
new file mode 100644
index 00000000000..db15551a74e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/decorations.yaml
@@ -0,0 +1,36 @@
+---
+root:
+ items:
+ - type: line # short, horizontal
+ baseline: 2
+ start: 4
+ end: 9
+ width: 1
+ orientation: horizontal
+ color: green
+ style: solid
+ - type: line # short, vertical
+ baseline: 12
+ start: 14
+ end: 19
+ width: 1
+ orientation: vertical
+ color: red
+ style: solid
+ - type: line # long, horizontal
+ baseline: 32
+ start: 34
+ end: 234
+ width: 3
+ orientation: horizontal
+ color: blue
+ style: solid
+ - type: line # long, vertical
+ baseline: 52
+ start: 54
+ end: 254
+ width: 3
+ orientation: vertical
+ color: black
+ style: solid
+
diff --git a/third_party/webrender/wrench/reftests/text/diacritics-ref.yaml b/third_party/webrender/wrench/reftests/text/diacritics-ref.yaml
new file mode 100644
index 00000000000..334e1899eec
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/diacritics-ref.yaml
@@ -0,0 +1,6 @@
+root:
+ items:
+ - text: "x"
+ origin: 20 30
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/diacritics.yaml b/third_party/webrender/wrench/reftests/text/diacritics.yaml
new file mode 100644
index 00000000000..7c613c3aa6b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/diacritics.yaml
@@ -0,0 +1,6 @@
+root:
+ items:
+ - text: "x̂"
+ origin: 20 30
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/embedded-bitmaps.png b/third_party/webrender/wrench/reftests/text/embedded-bitmaps.png
new file mode 100644
index 00000000000..a8039015a5b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/embedded-bitmaps.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/embedded-bitmaps.yaml b/third_party/webrender/wrench/reftests/text/embedded-bitmaps.yaml
new file mode 100644
index 00000000000..f22b11d95f7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/embedded-bitmaps.yaml
@@ -0,0 +1,9 @@
+--- # checks that embedded bitmaps are rasterized and use a proper layout
+root:
+ items:
+ - text: "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 {}[]()<>$*-+=/#_%^@\\&|~?'\"!,.;:"
+ origin: 20 30
+ bounds: [0, 0, 710, 50]
+ size: 8.25
+ font: "Proggy.ttf"
+ embedded-bitmaps: true
diff --git a/third_party/webrender/wrench/reftests/text/intermediate-transform.yaml b/third_party/webrender/wrench/reftests/text/intermediate-transform.yaml
new file mode 100644
index 00000000000..ab2e51804c5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/intermediate-transform.yaml
@@ -0,0 +1,54 @@
+# This test case makes the text flipped relative to the surface it renders to, but not to the world.
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "reference-frame"
+ transform: [0.7753850221633911, 0, 0, 0, 0, 0.7753850221633911, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "stacking-context"
+ transform-style: "preserve-3d"
+ origin: [237, 246]
+ items:
+ -
+ type: "reference-frame"
+ transform-style: "preserve-3d"
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, -0.09215625375509262, -0.05100416764616966, 1, -0.0001250000059371814, 0, -3, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform-style: "preserve-3d"
+ items:
+ -
+ type: "reference-frame"
+ transform: [-1, 0, 0, 0, 0, -0.9659258127212524, 0.258819043636322, 0, 0, 0.258819043636322, 0.9659258127212524, 0, 1474.5, 802.0977172851563, -105.5981674194336, 1]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ rect: [0, 0, 1475, 408]
+ color: red
+ -
+ type: "reference-frame"
+ transform: [-1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1474.5, 408, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ glyphs: [55,43,40,3,44,54,36,37,40,47,47,36]
+ offsets: [511, 290, 551.2000122070313, 290, 597.066650390625, 290, 637.2666625976563, 290, 656.1333618164063, 290, 682.0999755859375, 290, 716.6333618164063, 290, 759.6666870117188, 290, 799.8666381835938, 290, 840.066650390625, 290, 880.2666625976563, 290, 920.4666748046875, 290]
+ size: 22
+ color: black
+ font: "../text/VeraBd.ttf"
+ bounds: [509, 250, 457, 54]
+ clip-rect: [508, 249, 459, 56]
+
diff --git a/third_party/webrender/wrench/reftests/text/isolated-text.png b/third_party/webrender/wrench/reftests/text/isolated-text.png
new file mode 100644
index 00000000000..7b310e78dcb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/isolated-text.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/isolated-text.yaml b/third_party/webrender/wrench/reftests/text/isolated-text.yaml
new file mode 100644
index 00000000000..897d410a848
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/isolated-text.yaml
@@ -0,0 +1,14 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 100]
+ transform: perspective(1000)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1000, 100]
+ transform-style: preserve-3d
+ items:
+ - text: "Cats making all the muffins knock over christmas tree"
+ origin: 20 30
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/large-glyphs.yaml b/third_party/webrender/wrench/reftests/text/large-glyphs.yaml
new file mode 100644
index 00000000000..4bbd3ee10cf
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/large-glyphs.yaml
@@ -0,0 +1,8 @@
+--- # Verify that large glyphs actually render at all.
+root:
+ items:
+ - text: "HI"
+ origin: 0 1234
+ size: 1234
+ color: black
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/large-line-decoration.yaml b/third_party/webrender/wrench/reftests/text/large-line-decoration.yaml
new file mode 100644
index 00000000000..ec12a5dc310
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/large-line-decoration.yaml
@@ -0,0 +1,43 @@
+---
+root:
+ items:
+ - type: line
+ baseline: 0
+ start: 0
+ end: 50
+ width: 5000
+ thickness: 5000
+ orientation: horizontal
+ color: red
+ style: solid
+
+ - type: line
+ baseline: 0
+ start: 100
+ end: 150
+ width: 5000
+ thickness: 5000
+ orientation: horizontal
+ color: green
+ style: dashed
+
+ - type: line
+ baseline: 0
+ start: 200
+ end: 250
+ width: 5000
+ thickness: 5000
+ orientation: horizontal
+ color: blue
+ style: dotted
+
+ - type: line
+ baseline: 0
+ start: 300
+ end: 350
+ width: 5000
+ thickness: 5000
+ orientation: horizontal
+ color: yellow
+ style: wavy
+
diff --git a/third_party/webrender/wrench/reftests/text/long-text.yaml b/third_party/webrender/wrench/reftests/text/long-text.yaml
new file mode 100644
index 00000000000..e44658ca99c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/long-text.yaml
@@ -0,0 +1,610 @@
+---
+root:
+ items:
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ ]
+ offsets: [16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43, 16, 43,
+ ]
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/negative-pos.yaml b/third_party/webrender/wrench/reftests/text/negative-pos.yaml
new file mode 100644
index 00000000000..7dac5c49619
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/negative-pos.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55]
+ offsets: [-2, 43]
+ size: 24
+ color: black
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/non-opaque-notref.yaml b/third_party/webrender/wrench/reftests/text/non-opaque-notref.yaml
new file mode 100644
index 00000000000..53d878b9581
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/non-opaque-notref.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 500, 500]
+ glyphs: [55]
+ offsets: [200, 200]
+ size: 100
+ color: [0, 0, 0]
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/non-opaque.yaml b/third_party/webrender/wrench/reftests/text/non-opaque.yaml
new file mode 100644
index 00000000000..ff2573dbfad
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/non-opaque.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 500, 500]
+ glyphs: [55]
+ offsets: [200, 200]
+ size: 100
+ color: [0, 0, 0, 0.5]
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/perspective-clip.png b/third_party/webrender/wrench/reftests/text/perspective-clip.png
new file mode 100644
index 00000000000..3a836ecb2a8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/perspective-clip.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/perspective-clip.yaml b/third_party/webrender/wrench/reftests/text/perspective-clip.yaml
new file mode 100644
index 00000000000..1fdf50f529c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/perspective-clip.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ -
+ type: stacking-context
+ perspective: 1
+ perspective-origin: 0 0
+ items:
+ -
+ type: stacking-context
+ transform: 10 0 0 0 0 10 0 0 0 0 10 0 0 0 -9 1
+ items:
+ - type: clip
+ bounds: [50, 50, 200, 200]
+ complex:
+ - rect: [50, 50, 200, 200]
+ radius: 8
+ items:
+ -
+ type: rect
+ bounds: [50, 50, 200, 200]
+ color: green
+ -
+ text: "X"
+ origin: 100 150
+ size: 100
+ font: "Ahem.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/raster-space-snap-ref.yaml b/third_party/webrender/wrench/reftests/text/raster-space-snap-ref.yaml
new file mode 100644
index 00000000000..43e4ccdf469
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/raster-space-snap-ref.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 480, 80]
+ raster-space: screen
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 20.5 50
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/raster-space-snap.yaml b/third_party/webrender/wrench/reftests/text/raster-space-snap.yaml
new file mode 100644
index 00000000000..4ae3f8c99f4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/raster-space-snap.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 480, 80]
+ raster-space: local(1.0)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 20.5 50
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/raster-space.png b/third_party/webrender/wrench/reftests/text/raster-space.png
new file mode 100644
index 00000000000..66fcf7377a3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/raster-space.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/raster-space.yaml b/third_party/webrender/wrench/reftests/text/raster-space.yaml
new file mode 100644
index 00000000000..e6534784123
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/raster-space.yaml
@@ -0,0 +1,28 @@
+root:
+ items:
+ - type: stacking-context
+ transform: scale(5.0) rotate(-45)
+ transform-origin: 300 300
+ raster-space: local(1.0)
+ items:
+ - text: "Local"
+ origin: 20 50
+ size: 20
+ font: "FreeSans.ttf"
+ - type: stacking-context
+ transform: scale(5.0) rotate(-45)
+ transform-origin: 0 400
+ items:
+ - text: "Screen"
+ origin: 20 50
+ size: 20
+ font: "FreeSans.ttf"
+ - type: stacking-context
+ transform: scale(5.0) rotate(-45)
+ transform-origin: -80 240
+ raster-space: local(5.0)
+ items:
+ - text: "Local (scaled)"
+ origin: 20 50
+ size: 10
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/raster_root_C_8192.yaml b/third_party/webrender/wrench/reftests/text/raster_root_C_8192.yaml
new file mode 100644
index 00000000000..a820280f97c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/raster_root_C_8192.yaml
@@ -0,0 +1,385 @@
+root:
+ items:
+ - type: "stacking-context"
+ transform: scale(0.125)
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 50
+ blend-container: true
+ items:
+ - image: checkerboard(0, 512, 16);
+ bounds: [1600, 1600, 8192, 8192]
+ - type: rect
+ color: [180, 140, 120, 0.4]
+ bounds: 2400 2400 8192 8192
+ - type: "stacking-context"
+ bounds: [0, 0, 8192, 8192]
+ filters: [invert(1)]
+ mix-blend-mode: exclusion
+ complex-clip:
+ rect: [1920, 1920, 4096, 4096]
+ radius: [2048, 2048]
+ items:
+ - type: "stacking-context"
+ transform: scale(24)
+ items:
+ - type: line
+ baseline: 16
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 24
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 32
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 40
+ start: 16
+ end: 208
+ width: 4
+ thickness: 1
+ orientation: horizontal
+ color: red
+ style: wavy
+ - type: line
+ baseline: 48
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 64
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 80
+ start: 16
+ end: 207 # pruposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 96
+ start: 16
+ end: 208
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [8, 100, 225, 50]
+ blur-radius: 0
+ offset: [2, 2]
+ color: red
+ - type: line
+ baseline: 112
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: solid
+ - type: line
+ baseline: 120
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dashed
+ - type: line
+ baseline: 128
+ start: 16
+ end: 209
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dotted
+ - type: line
+ baseline: 136
+ start: 16
+ end: 208
+ width: 4
+ thickness: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 145, 225, 65]
+ blur-radius: 1
+ offset: [2, 3]
+ color: red
+ - type: line
+ baseline: 160
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 168
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 184
+ start: 16
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 192
+ start: 16
+ end: 208
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 220, 225, 40]
+ blur-radius: 0
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 232
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 248
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 272
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 296
+ start: 16
+ end: 208
+ width: 12
+ thickness: 3
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [0, 320, 240, 140]
+ blur-radius: 3
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 320
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 352
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 368
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 392
+ start: 16
+ end: 208
+ width: 16
+ thickness: 4
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ - type: line
+ baseline: 224
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 232
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 240
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 256
+ start: 16
+ end: 208
+ thickness: 1
+ width: 4
+ orientation: vertical
+ color: red
+ style: wavy
+
+ - type: line
+ baseline: 272
+ start: 16
+ end: 208
+ width: 2
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 296
+ start: 16
+ end: 208
+ width: 2
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 320
+ start: 16
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 336
+ start: 16
+ end: 208
+ thickness: 2
+ width: 6
+ orientation: vertical
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [350, 0, 120, 240]
+ blur-radius: 3
+ offset: [5, 2]
+ color: black
+ - type: line
+ baseline: 384
+ start: 16
+ end: 208
+ width: 8
+ orientation: vertical
+ color: yellow
+ style: solid
+ - type: line
+ baseline: 400
+ start: 16
+ end: 208
+ width: 8
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 416
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 440
+ start: 16
+ end: 208
+ thickness: 4
+ width: 16
+ orientation: vertical
+ color: red
+ style: wavy
+ -
+ type: "pop-all-shadows"
+ - text: "side-left"
+ origin: 80 120
+ size: 32
+ transpose: true
+ flip-x: true
+ font: "VeraBd.ttf"
+ color: [40,40,40,1.0]
+ - text: "side-right"
+ origin: 240 240
+ size: 32
+ color: [190,180,200,1.0]
+ transpose: true
+ flip-y: true
+ font: "FreeSans.ttf"
+
diff --git a/third_party/webrender/wrench/reftests/text/raster_root_C_ref.yaml b/third_party/webrender/wrench/reftests/text/raster_root_C_ref.yaml
new file mode 100644
index 00000000000..de86e5c543b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/raster_root_C_ref.yaml
@@ -0,0 +1,385 @@
+root:
+ items:
+ - type: "stacking-context"
+ transform: scale(0.5)
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 50
+ blend-container: true
+ items:
+ - image: checkerboard(0, 128, 16);
+ bounds: [400, 400, 2048, 2048]
+ - type: rect
+ color: [180, 140, 120, 0.4]
+ bounds: 600 600 2048 2048
+ - type: "stacking-context"
+ bounds: [0, 0, 2048, 2048]
+ filters: [invert(1)]
+ mix-blend-mode: exclusion
+ complex-clip:
+ rect: [480, 480, 1024, 1024]
+ radius: [512, 512]
+ items:
+ - type: "stacking-context"
+ transform: scale(6)
+ items:
+ - type: line
+ baseline: 16
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 24
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 32
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 40
+ start: 16
+ end: 208
+ width: 4
+ thickness: 1
+ orientation: horizontal
+ color: red
+ style: wavy
+ - type: line
+ baseline: 48
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 64
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 80
+ start: 16
+ end: 207 # pruposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 96
+ start: 16
+ end: 208
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [8, 100, 225, 50]
+ blur-radius: 0
+ offset: [2, 2]
+ color: red
+ - type: line
+ baseline: 112
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: solid
+ - type: line
+ baseline: 120
+ start: 16
+ end: 208
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dashed
+ - type: line
+ baseline: 128
+ start: 16
+ end: 209
+ width: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: dotted
+ - type: line
+ baseline: 136
+ start: 16
+ end: 208
+ width: 4
+ thickness: 1
+ orientation: horizontal
+ color: [0,0,0,0]
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 145, 225, 65]
+ blur-radius: 1
+ offset: [2, 3]
+ color: red
+ - type: line
+ baseline: 160
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 168
+ start: 16
+ end: 208
+ width: 2
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 184
+ start: 16
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 192
+ start: 16
+ end: 208
+ width: 6
+ thickness: 2
+ orientation: horizontal
+ color: red
+ style: wavy
+ -
+ type: pop-all-shadows
+
+ -
+ type: "shadow"
+ bounds: [8, 220, 225, 40]
+ blur-radius: 0
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 232
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 248
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 272
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 296
+ start: 16
+ end: 208
+ width: 12
+ thickness: 3
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [0, 320, 240, 140]
+ blur-radius: 3
+ offset: [5, 7]
+ color: red
+ - type: line
+ baseline: 320
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: black
+ style: solid
+ - type: line
+ baseline: 352
+ start: 16
+ end: 208
+ width: 8
+ orientation: horizontal
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 368
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: horizontal
+ color: green
+ style: dotted
+ - type: line
+ baseline: 392
+ start: 16
+ end: 208
+ width: 16
+ thickness: 4
+ orientation: horizontal
+ color: black
+ style: wavy
+ -
+ type: "pop-all-shadows"
+
+ - type: line
+ baseline: 224
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 232
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 240
+ start: 16
+ end: 208
+ width: 1
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 256
+ start: 16
+ end: 208
+ thickness: 1
+ width: 4
+ orientation: vertical
+ color: red
+ style: wavy
+
+ - type: line
+ baseline: 272
+ start: 16
+ end: 208
+ width: 2
+ orientation: vertical
+ color: black
+ style: solid
+ - type: line
+ baseline: 296
+ start: 16
+ end: 208
+ width: 2
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 320
+ start: 16
+ end: 207 # purposefully cut off
+ width: 2
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 336
+ start: 16
+ end: 208
+ thickness: 2
+ width: 6
+ orientation: vertical
+ color: red
+ style: wavy
+
+ -
+ type: "shadow"
+ bounds: [350, 0, 120, 240]
+ blur-radius: 3
+ offset: [5, 2]
+ color: black
+ - type: line
+ baseline: 384
+ start: 16
+ end: 208
+ width: 8
+ orientation: vertical
+ color: yellow
+ style: solid
+ - type: line
+ baseline: 400
+ start: 16
+ end: 208
+ width: 8
+ orientation: vertical
+ color: blue
+ style: dashed
+ - type: line
+ baseline: 416
+ start: 16
+ end: 205 # purposefully cut off
+ width: 8
+ orientation: vertical
+ color: green
+ style: dotted
+ - type: line
+ baseline: 440
+ start: 16
+ end: 208
+ thickness: 4
+ width: 16
+ orientation: vertical
+ color: red
+ style: wavy
+ -
+ type: "pop-all-shadows"
+ - text: "side-left"
+ origin: 80 120
+ size: 32
+ transpose: true
+ flip-x: true
+ font: "VeraBd.ttf"
+ color: [40,40,40,1.0]
+ - text: "side-right"
+ origin: 240 240
+ size: 32
+ color: [190,180,200,1.0]
+ transpose: true
+ flip-y: true
+ font: "FreeSans.ttf"
+
diff --git a/third_party/webrender/wrench/reftests/text/reftest.list b/third_party/webrender/wrench/reftests/text/reftest.list
new file mode 100644
index 00000000000..d7a51ef42d6
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/reftest.list
@@ -0,0 +1,84 @@
+!= text.yaml blank.yaml
+!= long-text.yaml blank.yaml
+!= negative-pos.yaml blank.yaml
+!= shadow.yaml text.yaml
+!= shadow-single.yaml blank.yaml
+!= shadow-cover-1.yaml blank.yaml
+!= shadow-cover-2.yaml blank.yaml
+
+skip_on(android,device) fuzzy(1,3) == shadow.yaml shadow-ref.yaml # Fails on Pixel2
+fuzzy(1,1) == shadow-huge.yaml shadow-huge-ref.yaml
+!= shadow-cover-1.yaml shadow-cover-2.yaml
+!= shadow-many.yaml shadow.yaml
+!= shadow-complex.yaml shadow-many.yaml
+!= shadow-clipped-text.yaml blank.yaml
+!= non-opaque.yaml non-opaque-notref.yaml
+== decorations.yaml decorations-ref.yaml
+skip_on(android,device) fuzzy(1,3001) == decorations-suite.yaml decorations-suite.png # Fails on Pixel2
+== 1658.yaml 1658-ref.yaml
+fuzzy(1,6) == split-batch.yaml split-batch-ref.yaml
+# Next 3 tests affected by bug 1548099 on Android
+skip_on(android) == shadow-red.yaml shadow-red-ref.yaml
+skip_on(android) fuzzy(1,735) == shadow-grey.yaml shadow-grey-ref.yaml
+skip_on(android) fuzzy(1,663) == shadow-grey-transparent.yaml shadow-grey-ref.yaml
+== subtle-shadow.yaml subtle-shadow-ref.yaml
+fuzzy(1,64) == shadow-atomic.yaml shadow-atomic-ref.yaml
+fuzzy(1,64) == shadow-clip-rect.yaml shadow-atomic-ref.yaml
+fuzzy(1,1) platform(linux) == shadow-ordering.yaml shadow-ordering-ref.yaml
+# Next 6 tests affected by bug 1548099 on Android
+skip_on(android) != synthetic-bold.yaml synthetic-bold-not-ref.yaml
+skip_on(android) fuzzy(1,1786) options(disable-subpixel) == synthetic-bold-transparent.yaml synthetic-bold-transparent-ref.yaml
+skip_on(android) != synthetic-bold-transparent.yaml synthetic-bold.yaml
+skip_on(android) != synthetic-italics.yaml synthetic-italics-ref.yaml
+skip_on(android) != synthetic-italics-custom.yaml synthetic-italics-ref.yaml
+skip_on(android) != synthetic-italics-custom.yaml synthetic-italics.yaml
+options(disable-aa) == ahem.yaml ahem-ref.yaml
+platform(linux) == isolated-text.yaml isolated-text.png
+platform(mac) skip_on(mac,>=10.14) fuzzy(3,67) == white-opacity.yaml white-opacity.png
+fuzzy(1,4) platform(linux) options(disable-subpixel) == colors.yaml colors-alpha.png
+# Run without dual-source blending path, batches are broken when text colors change.
+fuzzy(1,6) platform(linux) options(disable-dual-source-blending) draw_calls(6) == colors.yaml colors-subpx.png
+# Run with both dual-source blending, ensuring batching is improved.
+fuzzy(1,6) platform(linux) draw_calls(3) == colors.yaml colors-subpx.png
+platform(linux) options(disable-subpixel) == border-radius.yaml border-radius-alpha.png
+platform(linux) == border-radius.yaml border-radius-subpx.png
+options(disable-aa) == transparent-no-aa.yaml transparent-no-aa-ref.yaml
+!= diacritics.yaml diacritics-ref.yaml
+fuzzy(1,1) platform(linux) options(disable-subpixel) == text-masking.yaml text-masking-alpha.png
+fuzzy(1,44) platform(linux) == text-masking.yaml text-masking-subpx.png
+platform(linux) options(disable-subpixel) == alpha-transform.yaml alpha-transform.png
+platform(linux) == subpixel-rotate.yaml subpixel-rotate.png
+platform(linux) == subpixel-scale.yaml subpixel-scale.png
+platform(linux) == subpixel-skew.yaml subpixel-skew.png
+fuzzy(1,381) platform(linux) == subpixel-translate.yaml subpixel-translate-ref.yaml
+!= shadow-rotate.yaml blank.yaml
+platform(linux) == embedded-bitmaps.yaml embedded-bitmaps.png
+platform(linux) == clipped-transform.yaml clipped-transform.png
+platform(mac) fuzzy(195,30) == color-bitmap-shadow.yaml color-bitmap-shadow-ref.yaml
+platform(linux) == writing-modes.yaml writing-modes-ref.yaml
+platform(linux) == blurred-shadow-local-clip-rect.yaml blurred-shadow-local-clip-rect-ref.png
+fuzzy(1,1) platform(linux) == two-shadows.yaml two-shadows.png
+== shadow-clip.yaml shadow-clip-ref.yaml
+== shadow-fast-clip.yaml shadow-fast-clip-ref.yaml
+skip_on(android,device) == shadow-partial-glyph.yaml shadow-partial-glyph-ref.yaml # Fails on Pixel2
+fuzzy(1,107) platform(linux) == shadow-transforms.yaml shadow-transforms.png
+fuzzy(1,113) platform(linux) == raster-space.yaml raster-space.png
+skip_on(android) skip_on(mac,>=10.14) != allow-subpixel.yaml allow-subpixel-ref.yaml # Android: we don't enable sub-px aa on this platform.
+skip_on(android,device) == bg-color.yaml bg-color-ref.yaml # Fails on Pixel2
+!= large-glyphs.yaml blank.yaml
+!= large-line-decoration.yaml blank.yaml
+skip_on(android,device) == snap-text-offset.yaml snap-text-offset-ref.yaml
+fuzzy(5,4435) == shadow-border.yaml shadow-solid-ref.yaml
+fuzzy(5,4435) == shadow-image.yaml shadow-solid-ref.yaml
+options(disable-aa) == snap-clip.yaml snap-clip-ref.yaml
+platform(linux) == perspective-clip.yaml perspective-clip.png
+fuzzy(1,39) options(disable-subpixel) == raster-space-snap.yaml raster-space-snap-ref.yaml
+# == intermediate-transform.yaml intermediate-transform-ref.yaml # fails because of AA inavailable with an intermediate surface
+platform(linux) force_subpixel_aa_where_possible(true) == text-fixed-slice.yaml text-fixed-slice-slow.png
+platform(linux) force_subpixel_aa_where_possible(false) == text-fixed-slice.yaml text-fixed-slice-fast.png
+
+# a 8544x8544 raster root vs. 2136x2136
+# most pixels are off by a small amount, but a few pixels on the edge vary by a lot, pushing up the fuzzy max-diff;
+# the main goal of the test is that everything is in the same place, at the same scale, clipped the same way,
+# despite 4x on-the-fly scale change.
+skip_on(android) fuzzy-range(<=3,*20569,<=20,*2525,<=115,*543) == raster_root_C_8192.yaml raster_root_C_ref.yaml
diff --git a/third_party/webrender/wrench/reftests/text/shadow-atomic-ref.yaml b/third_party/webrender/wrench/reftests/text/shadow-atomic-ref.yaml
new file mode 100644
index 00000000000..ccf159b5a78
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-atomic-ref.yaml
@@ -0,0 +1,81 @@
+---
+root:
+ items:
+# equivalent of shadow with [20, 16] offset
+ -
+ type: line
+ baseline: 61
+ start: 34
+ end: 230
+ width: 3
+ orientation: horizontal
+ color: green
+ style: solid
+ -
+ bounds: [34, 34, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [36, 59, 55.533333, 59, 71.533333, 59, 80.4, 59, 92.833336, 59, 100.833336, 59, 109.7, 59, 122.13333, 59, 130.13333, 59, 139, 59, 155, 59, 169.2, 59, 177.2, 59, 193.2, 59, 207.4, 59, 216.26666, 59]
+ size: 18
+ color: green
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 48
+ start: 34
+ end: 230
+ width: 3
+ orientation: horizontal
+ color: green
+ style: solid
+# equivalent of shadow with [10, 8] offset
+ -
+ type: line
+ baseline: 53
+ start: 24
+ end: 220
+ width: 3
+ orientation: horizontal
+ color: black
+ style: solid
+ -
+ bounds: [24, 26, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [26, 51, 45.533333, 51, 61.533333, 51, 70.4, 51, 82.833336, 51, 90.833336, 51, 99.7, 51, 112.13333, 51, 120.13333, 51, 129, 51, 145, 51, 159.2, 51, 167.2, 51, 183.2, 51, 197.4, 51, 206.26666, 51]
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 40
+ start: 24
+ end: 220
+ width: 3
+ orientation: horizontal
+ color: black
+ style: solid
+# same as shadow-atomic.yaml
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: red
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
diff --git a/third_party/webrender/wrench/reftests/text/shadow-atomic.yaml b/third_party/webrender/wrench/reftests/text/shadow-atomic.yaml
new file mode 100644
index 00000000000..21b9eac876a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-atomic.yaml
@@ -0,0 +1,42 @@
+--- # checks that decorations on "real" content and "shadow" content are on seperate, atomic, layers
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [20, 16]
+ color: green
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [10, 8]
+ color: black
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: red
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-border.yaml b/third_party/webrender/wrench/reftests/text/shadow-border.yaml
new file mode 100644
index 00000000000..b05fb88cb50
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-border.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 25
+ bounds: [0, 0, 90, 90]
+ offset: [0, 0]
+ color: [0, 0, 0, 0.8]
+ -
+ type: border
+ bounds: [ 30, 30, 30, 30 ]
+ width: [ 15, 15, 15, 15 ]
+ border-type: normal
+ style: solid
+ color: blue
+ radius: 0
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-clip-rect.yaml b/third_party/webrender/wrench/reftests/text/shadow-clip-rect.yaml
new file mode 100644
index 00000000000..6edf6ccb5aa
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-clip-rect.yaml
@@ -0,0 +1,45 @@
+--- # checks that decorations on "real" content and "shadow" content are on seperate, atomic, layers
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [20, 16]
+ color: green
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [10, 8]
+ color: black
+ -
+ type: line
+ clip-rect: [14, 18, 205, 35]
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: red
+ font: "VeraBd.ttf"
+ -
+ type: line
+ clip-rect: [14, 18, 205, 35]
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-clip-ref.yaml b/third_party/webrender/wrench/reftests/text/shadow-clip-ref.yaml
new file mode 100644
index 00000000000..ff57bfde63b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-clip-ref.yaml
@@ -0,0 +1,11 @@
+# Test that the clip-chain local rect is not applied
+# to the text run being drawn in the shadow. If it was
+# applied, the edges of the quad will be a slightly
+# different color, since the blur will include some
+# clipped out pixels.
+---
+root:
+ items:
+ - type: rect
+ bounds: [28, 28, 80, 80]
+ color: [255, 127, 127, 1]
diff --git a/third_party/webrender/wrench/reftests/text/shadow-clip.yaml b/third_party/webrender/wrench/reftests/text/shadow-clip.yaml
new file mode 100644
index 00000000000..ecfade06dc1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-clip.yaml
@@ -0,0 +1,25 @@
+# Test that the clip-chain local rect is not applied
+# to the text run being drawn in the shadow. If it was
+# applied, the edges of the quad will be a slightly
+# different color, since the blur will include some
+# clipped out pixels.
+---
+root:
+ items:
+ - type: clip
+ bounds: [28, 28, 80, 80]
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 200, 200]
+ blur-radius: 2
+ color: [255, 0, 0, 0.5]
+ -
+ bounds: [6, 6, 132, 133]
+ glyphs: [67]
+ offsets: [8, 111]
+ size: 128
+ color: [0, 0, 0, 0]
+ font: "Ahem.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-clipped-text.yaml b/third_party/webrender/wrench/reftests/text/shadow-clipped-text.yaml
new file mode 100644
index 00000000000..9ab01d0a3fa
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-clipped-text.yaml
@@ -0,0 +1,24 @@
+# Tests that the unclipped parts of a shadow still render even if the associated
+# text is clipped out.
+---
+root:
+ items:
+ - type: scroll-frame
+ bounds: [14, 18, 10, 5]
+ content-size: [10, 5]
+ items:
+ -
+ type: "shadow"
+ bounds: [11, 20, 100, 100]
+ blur-radius: 3
+ offset: [0, 0]
+ color: black
+ -
+ bounds: [14, 23, 100, 100]
+ glyphs: [55]
+ offsets: [16, 43]
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-complex.yaml b/third_party/webrender/wrench/reftests/text/shadow-complex.yaml
new file mode 100644
index 00000000000..e1bfbc1b3ac
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-complex.yaml
@@ -0,0 +1,46 @@
+--- # The same as shadow-many.yaml, except the shadows only apply to parts of the text
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 5
+ offset: [0, 0]
+ color: black
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [2, 3]
+ color: red
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 3
+ offset: [-2, 3.5]
+ color: blue
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [3, 76, 86, 3, 87, 75]
+ offsets: [72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [72, 3, 69, 72, 86, 87]
+ offsets: [135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-cover-1.yaml b/third_party/webrender/wrench/reftests/text/shadow-cover-1.yaml
new file mode 100644
index 00000000000..088c26f1c5c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-cover-1.yaml
@@ -0,0 +1,18 @@
+--- # text covering a shadow
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 3
+ offset: [0, 0]
+ color: red
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: green
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-cover-2.yaml b/third_party/webrender/wrench/reftests/text/shadow-cover-2.yaml
new file mode 100644
index 00000000000..c18e277340b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-cover-2.yaml
@@ -0,0 +1,26 @@
+--- # shadow covering text
+root:
+ items:
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: green
+ font: "VeraBd.ttf"
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 3
+ offset: [0, 0]
+ color: red
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 0] # text transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+
diff --git a/third_party/webrender/wrench/reftests/text/shadow-fast-clip-ref.yaml b/third_party/webrender/wrench/reftests/text/shadow-fast-clip-ref.yaml
new file mode 100644
index 00000000000..3e1b08de5fa
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-fast-clip-ref.yaml
@@ -0,0 +1,21 @@
+# Test that fast shadows actually apply clips
+---
+root:
+ items:
+ - type: clip
+ bounds: [28, 28, 80, 80]
+ items:
+ -
+ bounds: [6, 6, 132, 133]
+ text: "overflow text"
+ origin: [9, 101]
+ size: 12
+ color: [0, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [6, 6, 132, 133]
+ text: "overflow text"
+ origin: [8, 100]
+ size: 12
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-fast-clip.yaml b/third_party/webrender/wrench/reftests/text/shadow-fast-clip.yaml
new file mode 100644
index 00000000000..f28213573cc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-fast-clip.yaml
@@ -0,0 +1,22 @@
+# Test that fast shadows actually apply clips
+---
+root:
+ items:
+ - type: clip
+ bounds: [28, 28, 80, 80]
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 200, 200]
+ blur-radius: 0
+ offset: [1, 1]
+ color: [0, 0, 0, 1]
+ -
+ bounds: [6, 6, 132, 133]
+ text: "overflow text"
+ origin: [8, 100]
+ size: 12
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-grey-ref.yaml b/third_party/webrender/wrench/reftests/text/shadow-grey-ref.yaml
new file mode 100644
index 00000000000..d40d997161b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-grey-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - rect: [14, 10, 205, 38]
+ color: [100, 100, 100, 1.0]
+
diff --git a/third_party/webrender/wrench/reftests/text/shadow-grey-transparent.yaml b/third_party/webrender/wrench/reftests/text/shadow-grey-transparent.yaml
new file mode 100644
index 00000000000..ba54ede1e25
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-grey-transparent.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - rect: [14, 10, 205, 38]
+ color: [100, 100, 100, 1.0]
+ -
+ type: "shadow"
+ blur-radius: 2
+ color: [100, 100, 100, 0.2]
+ bounds: [14, 10, 205, 38]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 24
+ color: [0,0,0,0]
+ -
+ type: "pop-all-shadows"
+
diff --git a/third_party/webrender/wrench/reftests/text/shadow-grey.yaml b/third_party/webrender/wrench/reftests/text/shadow-grey.yaml
new file mode 100644
index 00000000000..a728518ce33
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-grey.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - rect: [14, 10, 205, 38]
+ color: [100, 100, 100, 1.0]
+ -
+ type: "shadow"
+ blur-radius: 2
+ color: [100, 100, 100, 1.0]
+ bounds: [14, 10, 205, 38]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 24
+ color: [0,0,0,0]
+ -
+ type: "pop-all-shadows"
+
diff --git a/third_party/webrender/wrench/reftests/text/shadow-huge-ref.yaml b/third_party/webrender/wrench/reftests/text/shadow-huge-ref.yaml
new file mode 100644
index 00000000000..c0f8332a9e3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-huge-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 600
+ offset: [10, 10]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-huge.yaml b/third_party/webrender/wrench/reftests/text/shadow-huge.yaml
new file mode 100644
index 00000000000..1814dcf1dfc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-huge.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 100000000
+ offset: [10, 10]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-image.yaml b/third_party/webrender/wrench/reftests/text/shadow-image.yaml
new file mode 100644
index 00000000000..4d472aadc49
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-image.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 25
+ bounds: [0, 0, 90, 90]
+ offset: [0, 0]
+ color: [0, 0, 0, 0.8]
+ -
+ bounds: [ 30, 30, 30, 30 ]
+ image: solid-color(0, 0, 255, 255, 30, 30)
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-many.yaml b/third_party/webrender/wrench/reftests/text/shadow-many.yaml
new file mode 100644
index 00000000000..b5daabe669b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-many.yaml
@@ -0,0 +1,30 @@
+--- # the same as shadow.yaml, except there are many shadows with different offsets and colors
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 5
+ offset: [0, 0]
+ color: black
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [2, 3]
+ color: red
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 3
+ offset: [-2, 3.5]
+ color: blue
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-ordering-ref.yaml b/third_party/webrender/wrench/reftests/text/shadow-ordering-ref.yaml
new file mode 100644
index 00000000000..cc0b378cb0d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-ordering-ref.yaml
@@ -0,0 +1,131 @@
+--- # checks that decorations on "real" content and "shadow" content are on seperate, atomic, layers
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [44, 42, 205, 35]
+ blur-radius: 1.0
+ offset: [30, 24]
+ color: blue
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0,0,0,0] # transparent
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [34, 34, 205, 35]
+ blur-radius: 0.0 # no blur to tigger fast shadows
+ offset: [20, 16]
+ color: green
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0,0,0,0] # transparent
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [24, 26, 205, 35]
+ blur-radius: 1.0
+ offset: [10, 8]
+ color: black
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0,0,0,0] # transparent
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: [0,0,0,0] # transparent
+ style: solid
+ -
+ type: "pop-all-shadows"
+
+ # real text
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: red
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
diff --git a/third_party/webrender/wrench/reftests/text/shadow-ordering.yaml b/third_party/webrender/wrench/reftests/text/shadow-ordering.yaml
new file mode 100644
index 00000000000..d1969ef09bc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-ordering.yaml
@@ -0,0 +1,48 @@
+--- # checks that decorations on "real" content and "shadow" content are on seperate, atomic, layers
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [44, 42, 205, 35]
+ blur-radius: 1.0
+ offset: [30, 24]
+ color: blue
+ -
+ type: "shadow"
+ bounds: [34, 34, 205, 35]
+ blur-radius: 0.0 # no blur to tigger fast shadows
+ offset: [20, 16]
+ color: green
+ -
+ type: "shadow"
+ bounds: [24, 26, 205, 35]
+ blur-radius: 1.0
+ offset: [10, 8]
+ color: black
+ -
+ type: line
+ baseline: 45
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: red
+ font: "VeraBd.ttf"
+ -
+ type: line
+ baseline: 32
+ start: 14
+ end: 210
+ width: 3
+ orientation: horizontal
+ color: red
+ style: solid
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-partial-glyph-ref.yaml b/third_party/webrender/wrench/reftests/text/shadow-partial-glyph-ref.yaml
new file mode 100644
index 00000000000..df32d3fd3c9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-partial-glyph-ref.yaml
@@ -0,0 +1,50 @@
+--- # taking the shadow of multiple copies of a glyph with different clips should look the same as the unclipped glyph
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 2
+ bounds: [14, 18, 205, 35]
+ offset: [40, 0]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [16, 18, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [30, 18, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 255, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [16, 32, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 255, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [30, 32, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [255, 0, 255, 1]
+ font: "VeraBd.ttf" \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/text/shadow-partial-glyph.yaml b/third_party/webrender/wrench/reftests/text/shadow-partial-glyph.yaml
new file mode 100644
index 00000000000..4508db9d8b3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-partial-glyph.yaml
@@ -0,0 +1,43 @@
+--- # taking the shadow of multiple copies of a glyph with different clips should look the same as the unclipped glyph
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 2
+ bounds: [14, 18, 205, 35]
+ offset: [40, 0]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [16, 18, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [30, 18, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 255, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [16, 32, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 255, 1]
+ font: "VeraBd.ttf"
+ -
+ bounds: [14, 18, 205, 35]
+ clip-rect: [30, 32, 14, 14]
+ glyphs: [58]
+ offsets: [16, 43]
+ size: 18
+ color: [255, 0, 255, 1]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows" \ No newline at end of file
diff --git a/third_party/webrender/wrench/reftests/text/shadow-red-ref.yaml b/third_party/webrender/wrench/reftests/text/shadow-red-ref.yaml
new file mode 100644
index 00000000000..6c2f50fba01
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-red-ref.yaml
@@ -0,0 +1,5 @@
+---
+root:
+ items:
+ - rect: [14, 10, 205, 38]
+ color: red
diff --git a/third_party/webrender/wrench/reftests/text/shadow-red.yaml b/third_party/webrender/wrench/reftests/text/shadow-red.yaml
new file mode 100644
index 00000000000..62df9fc39c4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-red.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - rect: [14, 10, 205, 38]
+ color: red
+ -
+ type: "shadow"
+ blur-radius: 1
+ color: red
+ bounds: [14, 10, 205, 38]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 24
+ color: [0,0,0,0]
+ -
+ type: "pop-all-shadows"
+
diff --git a/third_party/webrender/wrench/reftests/text/shadow-ref.yaml b/third_party/webrender/wrench/reftests/text/shadow-ref.yaml
new file mode 100644
index 00000000000..efc8d2d9f0d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-ref.yaml
@@ -0,0 +1,25 @@
+---
+root:
+ items:
+ - # Compare non-blurred offset shadow to text with all glyphs offset that much
+ bounds: [16, 21, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [18, 46, 37.533333, 46, 53.533333, 46, 62.4, 46, 74.833336, 46, 82.833336, 46, 91.7, 46, 104.13333, 46, 112.13333, 46, 121, 46, 137, 46, 151.2, 46, 159.2, 46, 175.2, 46, 189.4, 46, 198.26666, 46]
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
+ - # Compare blurred offset shadow to shadow
+ type: "shadow"
+ bounds: [12, 314, 205, 35]
+ blur-radius: 5
+ offset: [0, 0]
+ color: red
+ -
+ bounds: [14, 318, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [14, 339, 33.533333, 339, 49.533333, 339, 58.4, 339, 70.833336, 339, 78.833336, 339, 87.7, 339, 100.13333, 339, 108.13333, 339, 117, 339, 133, 339, 147.2, 339, 155.2, 339, 171.2, 339, 185.4, 339, 194.26666, 339]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-rotate.yaml b/third_party/webrender/wrench/reftests/text/shadow-rotate.yaml
new file mode 100644
index 00000000000..e0ffc9ac03d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-rotate.yaml
@@ -0,0 +1,18 @@
+--- #checks that transformed text shadows can locate glyphs in the glyph cache
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 430, 330]
+ transform: rotate(30)
+ items:
+ - type: "shadow"
+ bounds: [0, 0, 430, 330]
+ blur-radius: 1
+ offset: [0, 1]
+ color: blue
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 50 200
+ size: 20
+ font: "FreeSans.ttf"
+ - type: "pop-all-shadows"
+
diff --git a/third_party/webrender/wrench/reftests/text/shadow-single.yaml b/third_party/webrender/wrench/reftests/text/shadow-single.yaml
new file mode 100644
index 00000000000..1804a073ff0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-single.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 5
+ bounds: [14, 18, 205, 35]
+ offset: [0, 0]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55]
+ offsets: [16, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-solid-ref.yaml b/third_party/webrender/wrench/reftests/text/shadow-solid-ref.yaml
new file mode 100644
index 00000000000..264b1e10962
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-solid-ref.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ blur-radius: 25
+ bounds: [0, 0, 90, 90]
+ offset: [0, 0]
+ color: [0, 0, 0, 0.8]
+ -
+ bounds: [30, 30, 30, 30]
+ type: rect
+ style: solid
+ color: blue
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow-transforms.png b/third_party/webrender/wrench/reftests/text/shadow-transforms.png
new file mode 100644
index 00000000000..71d97bff4c8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-transforms.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/shadow-transforms.yaml b/third_party/webrender/wrench/reftests/text/shadow-transforms.yaml
new file mode 100644
index 00000000000..7a75133dab4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow-transforms.yaml
@@ -0,0 +1,58 @@
+# Various tests for rotated text shadows, such as
+# blur radius, offset, shadow color.
+root:
+ items:
+ - type: stacking-context
+ transform: rotate(-30)
+ transform-origin: 80 80
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 350, 100]
+ blur-radius: 5
+ color: [255, 0, 0, 1]
+ - text: "A red shadow"
+ origin: 50 40
+ size: 20
+ font: "FreeSans.ttf"
+ -
+ type: "pop-all-shadows"
+
+ -
+ type: "shadow"
+ bounds: [100, 100, 350, 100]
+ blur-radius: 2
+ offset: 10 10
+ color: [0, 255, 0, 0.5]
+ - text: "Red text, green shadow"
+ origin: 150 140
+ size: 20
+ font: "FreeSans.ttf"
+ color: red
+ -
+ type: "pop-all-shadows"
+
+ - type: stacking-context
+ perspective: 100
+ perspective-origin: 650 100
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+ transform: rotate-x(-15)
+ items:
+ -
+ type: "shadow"
+ blur-radius: 5
+ color: [255, 0, 0, 1]
+ offset: [0, 20]
+ -
+ type: "shadow"
+ blur-radius: 0
+ color: [0, 0, 255, 1]
+ offset: [0, -20]
+ - text: "PERSPECTIVE!!!"
+ origin: 500 100
+ size: 100
+ font: "FreeSans.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/shadow.yaml b/third_party/webrender/wrench/reftests/text/shadow.yaml
new file mode 100644
index 00000000000..56ffdde93b1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/shadow.yaml
@@ -0,0 +1,33 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [2, 3]
+ color: black
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+ -
+ type: "shadow"
+ bounds: [12, 314, 205, 35]
+ blur-radius: 5
+ offset: [-2, -4]
+ color: red
+ -
+ bounds: [14, 318, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 343, 35.533333, 343, 51.533333, 343, 60.4, 343, 72.833336, 343, 80.833336, 343, 89.7, 343, 102.13333, 343, 110.13333, 343, 119, 343, 135, 343, 149.2, 343, 157.2, 343, 173.2, 343, 187.4, 343, 196.26666, 343]
+ size: 18
+ color: [0, 0, 0, 0] # actual text is transparent
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/snap-clip-ref.yaml b/third_party/webrender/wrench/reftests/text/snap-clip-ref.yaml
new file mode 100644
index 00000000000..676b7c80c57
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/snap-clip-ref.yaml
@@ -0,0 +1,7 @@
+root:
+ items:
+ - bounds: [0, 0, 35, 35]
+ glyphs: [50]
+ offsets: [10, 30]
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/snap-clip.yaml b/third_party/webrender/wrench/reftests/text/snap-clip.yaml
new file mode 100644
index 00000000000..6ee30aa09b2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/snap-clip.yaml
@@ -0,0 +1,8 @@
+root:
+ items:
+ - bounds: [0, 0, 35, 35]
+ glyphs: [50]
+ offsets: [10.3, 30]
+ clip-rect: [0, 0, 29.7, 35]
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/snap-text-offset-ref.yaml b/third_party/webrender/wrench/reftests/text/snap-text-offset-ref.yaml
new file mode 100644
index 00000000000..51b6a8c7c9b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/snap-text-offset-ref.yaml
@@ -0,0 +1,11 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 200, 100]
+ transform: translate(0.5, 0.5)
+ items:
+ - bounds: [0, 0, 200, 100]
+ glyphs: [68, 3, 37, 70, 71, 3, 40, 73, 74, 75]
+ offsets: [20.3, 50, 35, 50, 43, 50.49, 61.2, 50, 75.4, 50, 90.6, 50, 98.8, 50, 116.7, 50, 124.1, 50, 139.5, 50]
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/snap-text-offset.yaml b/third_party/webrender/wrench/reftests/text/snap-text-offset.yaml
new file mode 100644
index 00000000000..df8c3680d8f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/snap-text-offset.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0.5, 0.5, 200, 100]
+ items:
+ - bounds: [0, 0, 200, 100]
+ glyphs: [68, 3, 37, 70, 71, 3, 40, 73, 74, 75]
+ offsets: [20.3, 50, 35, 50, 43, 50.49, 61.2, 50, 75.4, 50, 90.6, 50, 98.8, 50, 116.7, 50, 124.1, 50, 139.5, 50]
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/split-batch-ref.yaml b/third_party/webrender/wrench/reftests/text/split-batch-ref.yaml
new file mode 100644
index 00000000000..687b051607e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/split-batch-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 650, 670]
+ blur-radius: 2
+ offset: [10, 10]
+ color: black
+ -
+ bounds: [0, 0, 650, 670]
+ glyphs: [55, 45]
+ offsets: [20, 500, 400, 500]
+ size: 500
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/split-batch.yaml b/third_party/webrender/wrench/reftests/text/split-batch.yaml
new file mode 100644
index 00000000000..687b051607e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/split-batch.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 650, 670]
+ blur-radius: 2
+ offset: [10, 10]
+ color: black
+ -
+ bounds: [0, 0, 650, 670]
+ glyphs: [55, 45]
+ offsets: [20, 500, 400, 500]
+ size: 500
+ color: [255, 0, 0, 1]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/subpixel-rotate.png b/third_party/webrender/wrench/reftests/text/subpixel-rotate.png
new file mode 100644
index 00000000000..2bff307a8ed
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/subpixel-rotate.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/subpixel-rotate.yaml b/third_party/webrender/wrench/reftests/text/subpixel-rotate.yaml
new file mode 100644
index 00000000000..296afb0d28d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/subpixel-rotate.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 430, 330]
+ transform: rotate(-30)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 50 200
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/subpixel-scale.png b/third_party/webrender/wrench/reftests/text/subpixel-scale.png
new file mode 100644
index 00000000000..f3c245c25ac
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/subpixel-scale.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/subpixel-scale.yaml b/third_party/webrender/wrench/reftests/text/subpixel-scale.yaml
new file mode 100644
index 00000000000..84e7b72bfdb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/subpixel-scale.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 680, 80]
+ transform: scale-x(1.5)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 20 50
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/subpixel-skew.png b/third_party/webrender/wrench/reftests/text/subpixel-skew.png
new file mode 100644
index 00000000000..3e713f16711
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/subpixel-skew.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/subpixel-skew.yaml b/third_party/webrender/wrench/reftests/text/subpixel-skew.yaml
new file mode 100644
index 00000000000..7d06f722b27
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/subpixel-skew.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 480, 80]
+ transform: skew-x(30)
+ items:
+ - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
+ origin: 20 50
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/subpixel-translate-ref.yaml b/third_party/webrender/wrench/reftests/text/subpixel-translate-ref.yaml
new file mode 100644
index 00000000000..a4377ee76d3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/subpixel-translate-ref.yaml
@@ -0,0 +1,12 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ items:
+ -
+ bounds: [0, 0, 500, 500]
+ glyphs: [80, 80, 80, 80, 80]
+ offsets: [50, 100, 71.111, 100, 92.222, 100, 113.333, 100, 134.444, 100]
+ origin: 0 0
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/subpixel-translate.yaml b/third_party/webrender/wrench/reftests/text/subpixel-translate.yaml
new file mode 100644
index 00000000000..940dc6fef7f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/subpixel-translate.yaml
@@ -0,0 +1,13 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 500, 500]
+ transform: translate(0.444, 0)
+ items:
+ -
+ bounds: [0, 0, 500, 500]
+ glyphs: [80, 80, 80, 80, 80]
+ offsets: [50, 100, 71.111, 100, 92.222, 100, 113.333, 100, 134.444, 100]
+ origin: 0 0
+ size: 20
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/subtle-shadow-ref.yaml b/third_party/webrender/wrench/reftests/text/subtle-shadow-ref.yaml
new file mode 100644
index 00000000000..54374e11911
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/subtle-shadow-ref.yaml
@@ -0,0 +1,27 @@
+--- # incredibly faint shadows showing up as opaque black??
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 255, 85]
+ color: [245, 100, 100, 1.0]
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [0, 1]
+ color: [0.0,0.0,0.0, 0.101961]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 12
+ color: [168, 168, 168, 0.0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
+ - bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 12
+ color: [168, 168, 168, 1.0]
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/subtle-shadow.yaml b/third_party/webrender/wrench/reftests/text/subtle-shadow.yaml
new file mode 100644
index 00000000000..67d19e81fd2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/subtle-shadow.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 255, 85]
+ color: [245, 100, 100, 1.0]
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 0
+ offset: [0, 1]
+ color: [0.0,0.0,0.0, 0.101961]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 12
+ color: [168, 168, 168, 1.0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/synthetic-bold-not-ref.yaml b/third_party/webrender/wrench/reftests/text/synthetic-bold-not-ref.yaml
new file mode 100644
index 00000000000..b947bf45979
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/synthetic-bold-not-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - text: "Fake bold is great"
+ origin: 20 40
+ size: 20
diff --git a/third_party/webrender/wrench/reftests/text/synthetic-bold-transparent-ref.yaml b/third_party/webrender/wrench/reftests/text/synthetic-bold-transparent-ref.yaml
new file mode 100644
index 00000000000..c7db0a34263
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/synthetic-bold-transparent-ref.yaml
@@ -0,0 +1,10 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 660, 210]
+ filters: opacity(0.5)
+ items:
+ - text: "Fake bold is great"
+ origin: 20 40
+ size: 20
+ synthetic-bold: true
diff --git a/third_party/webrender/wrench/reftests/text/synthetic-bold-transparent.yaml b/third_party/webrender/wrench/reftests/text/synthetic-bold-transparent.yaml
new file mode 100644
index 00000000000..043a6da781d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/synthetic-bold-transparent.yaml
@@ -0,0 +1,7 @@
+root:
+ items:
+ - text: "Fake bold is great"
+ origin: 20 40
+ size: 20
+ color: [0, 0, 0, 0.5]
+ synthetic-bold: true
diff --git a/third_party/webrender/wrench/reftests/text/synthetic-bold.yaml b/third_party/webrender/wrench/reftests/text/synthetic-bold.yaml
new file mode 100644
index 00000000000..8181dbb84ec
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/synthetic-bold.yaml
@@ -0,0 +1,6 @@
+root:
+ items:
+ - text: "Fake bold is great"
+ origin: 20 40
+ size: 20
+ synthetic-bold: true
diff --git a/third_party/webrender/wrench/reftests/text/synthetic-italics-custom.yaml b/third_party/webrender/wrench/reftests/text/synthetic-italics-custom.yaml
new file mode 100644
index 00000000000..00f30a776f7
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/synthetic-italics-custom.yaml
@@ -0,0 +1,7 @@
+root:
+ items:
+ - text: "Fake italics are great"
+ origin: 20 40
+ size: 20
+ synthetic-italics: 45
+
diff --git a/third_party/webrender/wrench/reftests/text/synthetic-italics-ref.yaml b/third_party/webrender/wrench/reftests/text/synthetic-italics-ref.yaml
new file mode 100644
index 00000000000..5c5be707f7b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/synthetic-italics-ref.yaml
@@ -0,0 +1,5 @@
+root:
+ items:
+ - text: "Fake italics are great"
+ origin: 20 40
+ size: 20
diff --git a/third_party/webrender/wrench/reftests/text/synthetic-italics.yaml b/third_party/webrender/wrench/reftests/text/synthetic-italics.yaml
new file mode 100644
index 00000000000..fa9b78a3f01
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/synthetic-italics.yaml
@@ -0,0 +1,7 @@
+root:
+ items:
+ - text: "Fake italics are great"
+ origin: 20 40
+ size: 20
+ synthetic-italics: true
+
diff --git a/third_party/webrender/wrench/reftests/text/text-fixed-slice-fast.png b/third_party/webrender/wrench/reftests/text/text-fixed-slice-fast.png
new file mode 100644
index 00000000000..7f3ee0ec9d3
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/text-fixed-slice-fast.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/text-fixed-slice-slow.png b/third_party/webrender/wrench/reftests/text/text-fixed-slice-slow.png
new file mode 100644
index 00000000000..4eaa7fc3ad5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/text-fixed-slice-slow.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/text-fixed-slice.yaml b/third_party/webrender/wrench/reftests/text/text-fixed-slice.yaml
new file mode 100644
index 00000000000..902b7c83a75
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/text-fixed-slice.yaml
@@ -0,0 +1,20 @@
+# Verify that the option to configure performance / quality settings for
+# subpixel AA with picture caching is respected.
+root:
+ items:
+ - type: scroll-frame
+ bounds: [0, 0, 500, 200]
+ content-size: [500, 500]
+ id: 2
+ items:
+ - type: rect
+ bounds: [0, 0, 500, 200]
+ color: white
+ - type: rect
+ bounds: [0, 0, 500, 200]
+ color: white
+ - text: "The sun has frightened off the night!"
+ origin: 20 40
+ size: 20
+ font: "FreeSans.ttf"
+ clip-and-scroll: [2, 2]
diff --git a/third_party/webrender/wrench/reftests/text/text-masking-alpha.png b/third_party/webrender/wrench/reftests/text/text-masking-alpha.png
new file mode 100644
index 00000000000..1f02f8bac5d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/text-masking-alpha.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/text-masking-mask.png b/third_party/webrender/wrench/reftests/text/text-masking-mask.png
new file mode 100644
index 00000000000..a27a494849b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/text-masking-mask.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/text-masking-subpx.png b/third_party/webrender/wrench/reftests/text/text-masking-subpx.png
new file mode 100644
index 00000000000..08db66a5376
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/text-masking-subpx.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/text-masking.yaml b/third_party/webrender/wrench/reftests/text/text-masking.yaml
new file mode 100644
index 00000000000..b40d391396a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/text-masking.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ - bounds: [0, 0, 750, 100]
+ "clip-rect": [0, 0, 750, 100]
+ type: rect
+ color: [180, 180, 180]
+ - bounds: [0, 0, 750, 100]
+ "clip-rect": [0, 0, 750, 100]
+ type: clip
+ id: 2
+ "content-size": [750, 100]
+ "image-mask":
+ image: "text-masking-mask.png"
+ rect: [0, 0, 750, 100]
+ repeat: false
+ - text: "Cats making all the muffins knock over christmas tree"
+ origin: 40 40
+ size: 20
+ "clip-and-scroll": 2
+ font: "FreeSans.ttf"
+ - text: "Cats making all the muffins knock over christmas tree"
+ origin: 40 80
+ size: 20
+ color: white
+ "clip-and-scroll": 2
+ font: "FreeSans.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/text.yaml b/third_party/webrender/wrench/reftests/text/text.yaml
new file mode 100644
index 00000000000..35e51fa92f5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/text.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: black
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/transparent-no-aa-ref.yaml b/third_party/webrender/wrench/reftests/text/transparent-no-aa-ref.yaml
new file mode 100644
index 00000000000..800b7a9f2ac
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/transparent-no-aa-ref.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [0, 0, 200, 200]
+ offset: [0, 0]
+ blur-radius: 0
+ color: [0, 0, 0, 0.5]
+ -
+ text: "hello everybody"
+ origin: [10, 20]
+ size: 18
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/transparent-no-aa.yaml b/third_party/webrender/wrench/reftests/text/transparent-no-aa.yaml
new file mode 100644
index 00000000000..3a5376f7a2d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/transparent-no-aa.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ -
+ text: "hello everybody"
+ origin: [10, 20]
+ size: 18
+ color: [0, 0, 0, 0.5]
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/two-shadows.png b/third_party/webrender/wrench/reftests/text/two-shadows.png
new file mode 100644
index 00000000000..1dae24cb84d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/two-shadows.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/two-shadows.yaml b/third_party/webrender/wrench/reftests/text/two-shadows.yaml
new file mode 100644
index 00000000000..cd16bd1fcfa
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/two-shadows.yaml
@@ -0,0 +1,24 @@
+--- # A simple example of two shadows
+root:
+ items:
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 2
+ offset: [-2, -2]
+ color: [255, 0, 0, 1]
+ -
+ type: "shadow"
+ bounds: [14, 18, 205, 35]
+ blur-radius: 2
+ offset: [2, 2]
+ color: [0, 0, 255, 1]
+ -
+ bounds: [14, 18, 205, 35]
+ glyphs: [55, 75, 76, 86, 3, 76, 86, 3, 87, 75, 72, 3, 69, 72, 86, 87]
+ offsets: [16, 43, 35.533333, 43, 51.533333, 43, 60.4, 43, 72.833336, 43, 80.833336, 43, 89.7, 43, 102.13333, 43, 110.13333, 43, 119, 43, 135, 43, 149.2, 43, 157.2, 43, 173.2, 43, 187.4, 43, 196.26666, 43]
+ size: 18
+ color: [0, 0, 0, 0]
+ font: "VeraBd.ttf"
+ -
+ type: "pop-all-shadows"
diff --git a/third_party/webrender/wrench/reftests/text/white-opacity.png b/third_party/webrender/wrench/reftests/text/white-opacity.png
new file mode 100644
index 00000000000..69c76b28aeb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/white-opacity.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/text/white-opacity.yaml b/third_party/webrender/wrench/reftests/text/white-opacity.yaml
new file mode 100644
index 00000000000..0e16856c141
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/white-opacity.yaml
@@ -0,0 +1,17 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [10, 10, 1000, 100]
+ items:
+ - type: rect
+ bounds: [0, 0, 720, 100]
+ color: [211, 211, 211, 1]
+ - type: stacking-context
+ bounds: [0, 0, 500, 100]
+ filters: [opacity(0.4)]
+ items:
+ - text: "Look, no white edges!!"
+ origin: 20 50
+ size: 40
+ color: white
+ font: "VeraBd.ttf"
diff --git a/third_party/webrender/wrench/reftests/text/writing-modes-ref.yaml b/third_party/webrender/wrench/reftests/text/writing-modes-ref.yaml
new file mode 100644
index 00000000000..c392822e607
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/writing-modes-ref.yaml
@@ -0,0 +1,19 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 300, 60]
+ transform: rotate(-90) translate(-120, 160)
+ items:
+ - text: "This is sideways-left"
+ origin: 0 40
+ size: 20
+ font: "FreeSans.ttf"
+ - type: stacking-context
+ bounds: [0, 0, 300, 60]
+ transform: rotate(90) translate(-90, 120)
+ items:
+ - text: "This is sideways-right"
+ origin: 0 40
+ size: 20
+ font: "FreeSans.ttf"
+
diff --git a/third_party/webrender/wrench/reftests/text/writing-modes.yaml b/third_party/webrender/wrench/reftests/text/writing-modes.yaml
new file mode 100644
index 00000000000..2c55e209e0f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/text/writing-modes.yaml
@@ -0,0 +1,15 @@
+root:
+ items:
+ - text: "This is sideways-left"
+ origin: 20 40
+ size: 20
+ transpose: true
+ flip-x: true
+ font: "FreeSans.ttf"
+ - text: "This is sideways-right"
+ origin: 70 300
+ size: 20
+ transpose: true
+ flip-y: true
+ font: "FreeSans.ttf"
+
diff --git a/third_party/webrender/wrench/reftests/tiles/prim-suite.yaml b/third_party/webrender/wrench/reftests/tiles/prim-suite.yaml
new file mode 100644
index 00000000000..2a170f8fc90
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/tiles/prim-suite.yaml
@@ -0,0 +1,45 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: rotate(30)
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: inset
+
+ - type: rect
+ bounds: [ 140, 10, 80, 80 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 140, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: outset
+
+ - type: border
+ bounds: [ 250, 10, 100, 100 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+
+ - bounds: [150, 150, 128, 128]
+ image: checkerboard(4, 15, 8)
+ stretch-size: 128 128
+
+ - type: radial-gradient
+ bounds: 300 150 100 100
+ center: 50 50
+ radius: 50 50
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/tiles/rect.yaml b/third_party/webrender/wrench/reftests/tiles/rect.yaml
new file mode 100644
index 00000000000..e3f71ac9ddb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/tiles/rect.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 50 50 200 200
+ color: red
diff --git a/third_party/webrender/wrench/reftests/tiles/reftest.list b/third_party/webrender/wrench/reftests/tiles/reftest.list
new file mode 100644
index 00000000000..7c04207b183
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/tiles/reftest.list
@@ -0,0 +1,4 @@
+** rect.yaml
+** simple-gradient.yaml
+# TODO: Fix rasterizer inaccuracies so this is the same regardless of tile size!
+!* prim-suite.yaml
diff --git a/third_party/webrender/wrench/reftests/tiles/simple-gradient.yaml b/third_party/webrender/wrench/reftests/tiles/simple-gradient.yaml
new file mode 100644
index 00000000000..0879b2442f0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/tiles/simple-gradient.yaml
@@ -0,0 +1,9 @@
+---
+root:
+ items:
+ - type: gradient
+ bounds: [ 0, 0, 1980, 1080]
+ start: [ 0, -2000 ]
+ end: [ 0, 4000 ]
+ stops: [ 0.0, red, 1.0, green ]
+ repeat: false
diff --git a/third_party/webrender/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml b/third_party/webrender/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml
new file mode 100644
index 00000000000..357981c1030
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [ 0, 0, 200, 44 ]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/transforms/big-axis-aligned-scale.yaml b/third_party/webrender/wrench/reftests/transforms/big-axis-aligned-scale.yaml
new file mode 100644
index 00000000000..4dfb19fbb09
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/big-axis-aligned-scale.yaml
@@ -0,0 +1,10 @@
+---
+root:
+ items:
+ - type: stacking-context
+ transform-style: preserve-3d
+ transform: scale(-2, 44, 44727)
+ items:
+ - type: rect
+ bounds: [ -100, -100, 200, 101 ]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/transforms/blank.yaml b/third_party/webrender/wrench/reftests/transforms/blank.yaml
new file mode 100644
index 00000000000..c4eb3ab6730
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/third_party/webrender/wrench/reftests/transforms/border-scale-2.png b/third_party/webrender/wrench/reftests/transforms/border-scale-2.png
new file mode 100644
index 00000000000..09e81e0b2ae
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/border-scale-2.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/border-scale-2.yaml b/third_party/webrender/wrench/reftests/transforms/border-scale-2.yaml
new file mode 100644
index 00000000000..f8410337668
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/border-scale-2.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: scale(0.5)
+ items:
+ - type: border
+ bounds: [ 100, 100, 400, 200 ]
+ width: [ 20, 20, 20, 20 ]
+ border-type: normal
+ style: solid
+ color: [ blue, blue, blue, blue ]
+ radius: {
+ top-left: [100, 100],
+ top-right: [100, 100],
+ bottom-left: [100, 100],
+ bottom-right: [100, 100],
+ }
diff --git a/third_party/webrender/wrench/reftests/transforms/border-scale-3.png b/third_party/webrender/wrench/reftests/transforms/border-scale-3.png
new file mode 100644
index 00000000000..de110f5334d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/border-scale-3.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/border-scale-3.yaml b/third_party/webrender/wrench/reftests/transforms/border-scale-3.yaml
new file mode 100644
index 00000000000..9308f2471d2
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/border-scale-3.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: [10,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
+ items:
+ - type: border
+ bounds: [ 5, 50, 20, 100 ]
+ width: [ 10, 1, 10, 1 ]
+ border-type: normal
+ style: solid
+ color: blue
+ radius: {
+ top-left: [5, 50],
+ top-right: [5, 50],
+ bottom-left: [5, 50],
+ bottom-right: [5, 50],
+ }
diff --git a/third_party/webrender/wrench/reftests/transforms/border-scale-4.png b/third_party/webrender/wrench/reftests/transforms/border-scale-4.png
new file mode 100644
index 00000000000..a590cb153a0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/border-scale-4.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/border-scale-4.yaml b/third_party/webrender/wrench/reftests/transforms/border-scale-4.yaml
new file mode 100644
index 00000000000..b2e50bbd2cf
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/border-scale-4.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: [1,0,0,0, 0,10,0,0, 0,0,1,0, 0,0,0,1]
+ items:
+ - type: border
+ bounds: [ 50, 5, 200, 10 ]
+ width: [ 1, 10, 1, 10 ]
+ border-type: normal
+ style: solid
+ color: [ blue, blue, blue, blue ]
+ radius: {
+ top-left: [50, 5],
+ top-right: [50, 5],
+ bottom-left: [50, 5],
+ bottom-right: [50, 5],
+ }
diff --git a/third_party/webrender/wrench/reftests/transforms/border-scale.png b/third_party/webrender/wrench/reftests/transforms/border-scale.png
new file mode 100644
index 00000000000..cd88307a678
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/border-scale.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/border-scale.yaml b/third_party/webrender/wrench/reftests/transforms/border-scale.yaml
new file mode 100644
index 00000000000..4bf10c3029c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/border-scale.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: scale(10)
+ items:
+ - type: border
+ bounds: [ 5, 5, 20, 10 ]
+ width: [ 1, 1, 1, 1 ]
+ border-type: normal
+ style: solid
+ color: [ blue, blue, blue, blue ]
+ radius: {
+ top-left: [5, 5],
+ top-right: [5, 5],
+ bottom-left: [5, 5],
+ bottom-right: [5, 5],
+ }
diff --git a/third_party/webrender/wrench/reftests/transforms/border-zoom.png b/third_party/webrender/wrench/reftests/transforms/border-zoom.png
new file mode 100644
index 00000000000..cb634ef97c4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/border-zoom.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/border-zoom.yaml b/third_party/webrender/wrench/reftests/transforms/border-zoom.yaml
new file mode 100644
index 00000000000..f3f472bf211
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/border-zoom.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: rotate(-30)
+ items:
+ - type: border
+ bounds: [ 10, 10, 100, 100 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
diff --git a/third_party/webrender/wrench/reftests/transforms/clip-translate-ref.yaml b/third_party/webrender/wrench/reftests/transforms/clip-translate-ref.yaml
new file mode 100644
index 00000000000..412397d90f1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/clip-translate-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: [6, 168, 18, 18]
diff --git a/third_party/webrender/wrench/reftests/transforms/clip-translate.yaml b/third_party/webrender/wrench/reftests/transforms/clip-translate.yaml
new file mode 100644
index 00000000000..3b278a14aa9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/clip-translate.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform: [0.75, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 8, 224, 0, 1]
+ items:
+ - type: clip
+ bounds: [0, 0, 24, 24]
+ image-mask:
+ image: solid-color(255, 0, 0, 255, 24, 24)
+ rect: [0, 0, 24, 24]
+ repeat: false
+ items:
+ - type: rect
+ color: red
+ bounds: [0, 0, 24, 24]
diff --git a/third_party/webrender/wrench/reftests/transforms/complex-preserve-3d.yaml b/third_party/webrender/wrench/reftests/transforms/complex-preserve-3d.yaml
new file mode 100644
index 00000000000..9aa0884f62d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/complex-preserve-3d.yaml
@@ -0,0 +1,24 @@
+# the root sc should dominate backface-visibility and hide the rect
+
+---
+root:
+ items:
+ -
+ bounds: [300, 300, 300, 300]
+ clip-rect: [300, 300, 300, 300]
+ type: "stacking-context"
+ transform: rotate-y(180)
+ transform-style: flat
+ backface-visible: false
+ items:
+ -
+ type: "stacking-context"
+ transform-style: preserve-3d
+ backface-visible: true
+ items:
+ -
+ bounds: [350, 350, 150, 150]
+ clip-rect: [350, 350, 150, 150]
+ type: rect
+ color: 255 255 0 0.4000
+ backface-visible: true
diff --git a/third_party/webrender/wrench/reftests/transforms/content-offset.png b/third_party/webrender/wrench/reftests/transforms/content-offset.png
new file mode 100644
index 00000000000..16a39791b24
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/content-offset.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/content-offset.yaml b/third_party/webrender/wrench/reftests/transforms/content-offset.yaml
new file mode 100644
index 00000000000..379b269fe61
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/content-offset.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ perspective: 1000
+ perspective-origin: 0 0
+ "transform-style": "preserve-3d"
+ items:
+ -
+ type: "stacking-context"
+ transform: rotate-x(-45) translate(100, 100, 0)
+ "transform-style": "preserve-3d"
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: rect
+ color: red
diff --git a/third_party/webrender/wrench/reftests/transforms/coord-system.png b/third_party/webrender/wrench/reftests/transforms/coord-system.png
new file mode 100644
index 00000000000..d28a562186a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/coord-system.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/coord-system.yaml b/third_party/webrender/wrench/reftests/transforms/coord-system.yaml
new file mode 100644
index 00000000000..6da21170560
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/coord-system.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.102400005, -0.185, 1, -0.0005, 0, 0, 0, 1]
+ items:
+ -
+ type: "scroll-frame"
+ id: 2
+ "content-size": [1024, 740]
+ bounds: [0, 0, 1024, 740]
+ -
+ bounds: [0, 0, 1024, 200]
+ "clip-rect": [0, 0, 1024, 200]
+ "clip-and-scroll": 2
+ type: "stacking-context"
+ transform: [0.70710677, 0, -0.70710677, 0, 0, 1, 0, 0, 0.70710677, 0, 0.70710677, 0, 149.96133, 0, -937.9613, 1]
+ items:
+ -
+ bounds: [0, 0, 1024, 200]
+ "clip-rect": [0, 0, 1024, 200]
+ type: rect
+ color: 0 128 0 1.0000
diff --git a/third_party/webrender/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml b/third_party/webrender/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml
new file mode 100644
index 00000000000..5dbf829e02a
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - bounds: [100, 150, 150, 75]
+ type: rect
+ color: green
diff --git a/third_party/webrender/wrench/reftests/transforms/flatten-preserve-3d-root.yaml b/third_party/webrender/wrench/reftests/transforms/flatten-preserve-3d-root.yaml
new file mode 100644
index 00000000000..b3507a985af
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/flatten-preserve-3d-root.yaml
@@ -0,0 +1,23 @@
+# This test ensures that we flatten the trasformations (i.e. zero out Z coordinates)
+# at the boundaries of preserve-3d hierarchies.
+# If the stacking context isn't flattened at the preserve-3d boundary here,
+# it's non-zero Z component starts affecting the screen space position
+# due to the "rotate-x" transform at the top level.
+---
+root:
+ items:
+ -
+ bounds: [100, 100, 0, 0]
+ type: stacking-context
+ transform: rotate-x(60)
+ transform-style: flat
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(0, 0, 200)
+ transform-style: preserve-3d
+ items:
+ -
+ bounds: [0, 0, 150, 150]
+ type: rect
+ color: green
diff --git a/third_party/webrender/wrench/reftests/transforms/flatten-twice-ref.yaml b/third_party/webrender/wrench/reftests/transforms/flatten-twice-ref.yaml
new file mode 100644
index 00000000000..27e41835552
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/flatten-twice-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [100, 100, 200, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/transforms/flatten-twice.yaml b/third_party/webrender/wrench/reftests/transforms/flatten-twice.yaml
new file mode 100644
index 00000000000..9af750a7c07
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/flatten-twice.yaml
@@ -0,0 +1,21 @@
+# This test ensures that we flatten the "flat" style trasformations.
+# If the flattening doesn't happen here, the rect gets rotated back
+# to the original position.
+---
+root:
+ items:
+ -
+ bounds: [100, 100, 0, 0]
+ type: stacking-context
+ transform: rotate-x(45)
+ transform-origin: 0 0
+ items:
+ -
+ type: "stacking-context"
+ transform: rotate-x(-45)
+ transform-origin: 0 0
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ type: rect
+ color: green
diff --git a/third_party/webrender/wrench/reftests/transforms/image-rotated-clip.png b/third_party/webrender/wrench/reftests/transforms/image-rotated-clip.png
new file mode 100644
index 00000000000..fda2872a3eb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/image-rotated-clip.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/image-rotated-clip.yaml b/third_party/webrender/wrench/reftests/transforms/image-rotated-clip.yaml
new file mode 100644
index 00000000000..31803b5530c
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/image-rotated-clip.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ -
+ bounds: [18, 18, 400, 400]
+ "clip-rect": [18, 18, 400, 400]
+ type: clip
+ id: 2
+ "content-size": [400, 400]
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-and-scroll": 2
+ type: "stacking-context"
+ transform: [0.70710677, 0.70710677, 0, 0, -0.70710677, 0.70710677, 0, 0, 0, 0, 1, 0, 218, -64.84271, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 400, 400]
+ "clip-rect": [0, 0, 400, 400]
+ image: solid-color(255, 0, 0, 255, 400, 400)
diff --git a/third_party/webrender/wrench/reftests/transforms/image.png b/third_party/webrender/wrench/reftests/transforms/image.png
new file mode 100644
index 00000000000..c8ec5aefcc8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/image.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/large-raster-root.yaml b/third_party/webrender/wrench/reftests/transforms/large-raster-root.yaml
new file mode 100644
index 00000000000..0c5176d06d9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/large-raster-root.yaml
@@ -0,0 +1,14 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ perspective: 20
+ items:
+ - type: stacking-context
+ transform: rotate-z(-45) rotate-x(-45)
+ filters: drop-shadow([0, 0], 10000, blue)
+ items:
+ - type: rect
+ bounds: [0, 0, 20000, 100]
+ color: green
diff --git a/third_party/webrender/wrench/reftests/transforms/local-clip.png b/third_party/webrender/wrench/reftests/transforms/local-clip.png
new file mode 100644
index 00000000000..92e25ec5e59
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/local-clip.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/local-clip.yaml b/third_party/webrender/wrench/reftests/transforms/local-clip.yaml
new file mode 100644
index 00000000000..661b40bed73
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/local-clip.yaml
@@ -0,0 +1,26 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ "clip-rect": [0, 0, 1000, 1000]
+ type: clip
+ id: 3
+ "content-size": [1000, 1000]
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-and-scroll": 3
+ type: "stacking-context"
+ transform: rotate(-45) translate(200, 200)
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ "clip-rect": [0, 0, 100, 100]
+ type: clip
+ id: 4
+ "content-size": [100, 100]
+ -
+ bounds: [2, -182, 152, 216]
+ "clip-rect": [2, 0, 152, 34]
+ "clip-and-scroll": 4
+ image: solid-color(255, 0, 0, 255, 100, 100)
diff --git a/third_party/webrender/wrench/reftests/transforms/near-plane-clip.png b/third_party/webrender/wrench/reftests/transforms/near-plane-clip.png
new file mode 100644
index 00000000000..babe22d7482
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/near-plane-clip.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/near-plane-clip.yaml b/third_party/webrender/wrench/reftests/transforms/near-plane-clip.yaml
new file mode 100644
index 00000000000..3bbafca974b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/near-plane-clip.yaml
@@ -0,0 +1,18 @@
+# Test the calculation for screen bounds for transformed primitives that cross the near plane.
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+ perspective: 200
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+ transform: rotate-x(30)
+ items:
+ -
+ bounds: [350, 200, 260, 300]
+ image: checkerboard(2, 16, 16)
+ stretch-size: 260 260
diff --git a/third_party/webrender/wrench/reftests/transforms/nested-preserve-3d.png b/third_party/webrender/wrench/reftests/transforms/nested-preserve-3d.png
new file mode 100644
index 00000000000..3b74c198999
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/nested-preserve-3d.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/nested-preserve-3d.yaml b/third_party/webrender/wrench/reftests/transforms/nested-preserve-3d.yaml
new file mode 100644
index 00000000000..e7f0f054070
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/nested-preserve-3d.yaml
@@ -0,0 +1,28 @@
+---
+root:
+ items:
+ -
+ bounds: [260, 260, 231, 231]
+ "clip-rect": [260, 260, 231, 231]
+ type: border
+ width: 3
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style: dashed
+ -
+ bounds: [300, 300, 0, 0]
+ "clip-rect": [300, 300, 0, 0]
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 75, -75, 1]
+ transform-style: preserve-3d
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0.8660254, -0.5, 0, 0, 0.5, 0.8660254, 0, 0, 10.048096, 37.5, 1]
+ transform-style: preserve-3d
+ items:
+ -
+ bounds: [0, 0, 150, 150]
+ "clip-rect": [0, 0, 150, 150]
+ type: rect
+ color: 255 255 0 0.4000
diff --git a/third_party/webrender/wrench/reftests/transforms/nested-rotate-x-flat.png b/third_party/webrender/wrench/reftests/transforms/nested-rotate-x-flat.png
new file mode 100644
index 00000000000..2134a8ff77d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/nested-rotate-x-flat.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/nested-rotate-x-flat.yaml b/third_party/webrender/wrench/reftests/transforms/nested-rotate-x-flat.yaml
new file mode 100644
index 00000000000..ed25c8f09db
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/nested-rotate-x-flat.yaml
@@ -0,0 +1,27 @@
+# This is the same as nested-rotate-x.yaml but without the preserve-3d.
+---
+root:
+ items:
+ -
+ bounds: [260, 260, 231, 231]
+ "clip-rect": [260, 260, 231, 231]
+ type: border
+ width: 3
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style: dashed
+ -
+ bounds: [300, 300, 0, 0]
+ "clip-rect": [300, 300, 0, 0]
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 75, -75, 1]
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0.8660254, -0.5, 0, 0, 0.5, 0.8660254, 0, 0, 10.048096, 37.5, 1]
+ items:
+ -
+ bounds: [0, 0, 150, 150]
+ "clip-rect": [0, 0, 150, 150]
+ type: rect
+ color: 255 255 0 0.4000
diff --git a/third_party/webrender/wrench/reftests/transforms/nested-rotate-x.png b/third_party/webrender/wrench/reftests/transforms/nested-rotate-x.png
new file mode 100644
index 00000000000..4a6cc2352da
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/nested-rotate-x.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/nested-rotate-x.yaml b/third_party/webrender/wrench/reftests/transforms/nested-rotate-x.yaml
new file mode 100644
index 00000000000..f1f8bd36c95
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/nested-rotate-x.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ -
+ bounds: [260, 260, 231, 231]
+ "clip-rect": [260, 260, 231, 231]
+ type: border
+ width: 3
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style: dashed
+ -
+ bounds: [300, 300, 0, 0]
+ "clip-rect": [300, 300, 0, 0]
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 75, -75, 1]
+ transform-style: preserve-3d
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 0.8660254, -0.5, 0, 0, 0.5, 0.8660254, 0, 0, 10.048096, 37.5, 1]
+ items:
+ -
+ bounds: [0, 0, 150, 150]
+ "clip-rect": [0, 0, 150, 150]
+ type: rect
+ color: 255 255 0 0.4000
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-border-radius.png b/third_party/webrender/wrench/reftests/transforms/perspective-border-radius.png
new file mode 100644
index 00000000000..6868bef4308
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-border-radius.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-border-radius.yaml b/third_party/webrender/wrench/reftests/transforms/perspective-border-radius.yaml
new file mode 100644
index 00000000000..41b43cd48af
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-border-radius.yaml
@@ -0,0 +1,20 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+ perspective: 256
+ items:
+ -
+ bounds: [128, 128, 256, 256]
+ type: "stacking-context"
+ transform: rotate-x(-60) rotate-y(-120)
+ items:
+ -
+ bounds: [128, 128, 256, 256]
+ type: rect
+ color: blue
+ complex-clip:
+ rect: [128, 128, 256, 256]
+ radius: [64, 32]
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-box-shadow-ref.yaml b/third_party/webrender/wrench/reftests/transforms/perspective-box-shadow-ref.yaml
new file mode 100644
index 00000000000..36df831e195
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-box-shadow-ref.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform-style: "preserve-3d"
+ items:
+ -
+ type: "reference-frame"
+ transform: [1, 0, 0, 0, -0.20399817824363708, 0.05275486409664154, 0.9659258127212524, -0.0008049382013268769, -0.05466114357113838, -1.0211405754089355, 0.258819043636322, -0.00021568253578152508, 52.22355651855469, 242.49476623535156, -247.27700805664063, 1.206064224243164]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "box-shadow"
+ bounds: [30, 0, 507, 512]
+ box-bounds: [30, 0, 507, 512]
+ offset: [-14, 4]
+ blur-radius: 8
+ spread-radius: -4
+ border-radius: 256
+ clip-mode: "inset"
+ color: red
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-box-shadow.yaml b/third_party/webrender/wrench/reftests/transforms/perspective-box-shadow.yaml
new file mode 100644
index 00000000000..99e247bf49e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-box-shadow.yaml
@@ -0,0 +1,23 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "reference-frame"
+ transform: [1, 0, 0, 0, -0.20399817824363708, 0.05275486409664154, 0.9659258127212524, -0.0008049382013268769, -0.05466114357113838, -1.0211405754089355, 0.258819043636322, -0.00021568253578152508, 52.22355651855469, 242.49476623535156, -247.27700805664063, 1.206064224243164]
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "box-shadow"
+ bounds: [30, 0, 507, 512]
+ box-bounds: [30, 0, 507, 512]
+ offset: [-14, 4]
+ blur-radius: 8
+ spread-radius: -4
+ border-radius: 256
+ clip-mode: "inset"
+ color: red
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-clip-1.png b/third_party/webrender/wrench/reftests/transforms/perspective-clip-1.png
new file mode 100644
index 00000000000..2708424772d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-clip-1.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-clip-1.yaml b/third_party/webrender/wrench/reftests/transforms/perspective-clip-1.yaml
new file mode 100644
index 00000000000..22220bbf290
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-clip-1.yaml
@@ -0,0 +1,25 @@
+---
+root:
+ items:
+ -
+ type: stacking-context
+ bounds: [0, 0, 0, 0]
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -300, -250, 1, -0.5, 0, 0, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: stacking-context
+ transform: [10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 1, 0, -5382, -3222, -18, 1]
+ items:
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: red
+ -
+ bounds: [0, 0, 100, 100]
+ type: rect
+ color: green
+ complex-clip:
+ rect: [0, 0, 100, 100]
+ radius: 16
+
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-clip.png b/third_party/webrender/wrench/reftests/transforms/perspective-clip.png
new file mode 100644
index 00000000000..97be10064a1
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-clip.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-clip.yaml b/third_party/webrender/wrench/reftests/transforms/perspective-clip.yaml
new file mode 100644
index 00000000000..ae905b8a441
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-clip.yaml
@@ -0,0 +1,27 @@
+# Test that a local space clip is correctly applied to
+# a primitive with a perspective transform.
+---
+root:
+ items:
+ - type: clip
+ bounds: [225, 200, 150, 200]
+ complex:
+ - rect: [225, 200, 150, 200]
+ radius: 32
+ items:
+ -
+ type: "stacking-context"
+ bounds: 0 0 1000 1000
+ perspective: 100
+ perspective-origin: 300 300
+ items:
+ -
+ type: "stacking-context"
+ transform: rotate-x(-10)
+ transform-origin: 300 300
+ filters: identity
+ items:
+ -
+ bounds: [200, 200, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-mask.png b/third_party/webrender/wrench/reftests/transforms/perspective-mask.png
new file mode 100644
index 00000000000..41ef1283dbb
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-mask.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-mask.yaml b/third_party/webrender/wrench/reftests/transforms/perspective-mask.yaml
new file mode 100644
index 00000000000..eadc48e0bab
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-mask.yaml
@@ -0,0 +1,22 @@
+---
+root:
+ items:
+ -
+ type: "scroll-frame"
+ id: 2
+ "content-size": [500, 100]
+ bounds: [0, 0, 500, 100]
+ items:
+ -
+ type: "stacking-context"
+ perspective: 125
+ items:
+ -
+ type: "stacking-context"
+ bounds: [0, 0, 250, 100]
+ transform: rotate-y(54)
+ items:
+ -
+ bounds: [0, 0, 128, 128]
+ type: rect
+ color: red
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-origin.png b/third_party/webrender/wrench/reftests/transforms/perspective-origin.png
new file mode 100644
index 00000000000..bda2d9dac21
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-origin.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-origin.yaml b/third_party/webrender/wrench/reftests/transforms/perspective-origin.yaml
new file mode 100644
index 00000000000..ca5eb5f95cf
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-origin.yaml
@@ -0,0 +1,16 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+ perspective: 200
+ items:
+ -
+ bounds: [0, 0, 1000, 1000]
+ type: "stacking-context"
+ transform: rotate-x(-45)
+ items:
+ -
+ bounds: [350, 400, 260, 260]
+ image: checkerboard(2, 16, 16)
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-shadow.png b/third_party/webrender/wrench/reftests/transforms/perspective-shadow.png
new file mode 100644
index 00000000000..2a0d50806c0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-shadow.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective-shadow.yaml b/third_party/webrender/wrench/reftests/transforms/perspective-shadow.yaml
new file mode 100644
index 00000000000..8b8e7c87d21
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective-shadow.yaml
@@ -0,0 +1,27 @@
+---
+root:
+ items:
+ -
+ type: stacking-context
+ bounds: [0, 0, 0, 0]
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 139, 0, 1]
+ items:
+ -
+ type: stacking-context
+ bounds: [0, 0, 0, 0]
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -299, -250, 1, -0.5, 0, 0, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: stacking-context
+ transform: [10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 1, 0, -5382, -3222, -18, 1]
+ items:
+ -
+ type: box-shadow
+ bounds: [548, 200, 100, 100]
+ color: 0 0 0 0.7020
+ blur-radius: 20
+ -
+ bounds: [548, 200, 100, 100]
+ type: rect
+ color: 0 255 0 1.0000
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective.png b/third_party/webrender/wrench/reftests/transforms/perspective.png
new file mode 100644
index 00000000000..f4ce971d578
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/perspective.yaml b/third_party/webrender/wrench/reftests/transforms/perspective.yaml
new file mode 100644
index 00000000000..2ebd0899c6f
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/perspective.yaml
@@ -0,0 +1,54 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, -1.0606601, -0.35355338, 0.70710677, -0.0035355338, -1.0606601, -1.767767, 0.70710677, -0.0035355338, 306.06604, 335.35535, -70.71068, 1.3535534]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ -
+ type: "stacking-context"
+ transform: [3.1819804, 1.0606601, -0.70710677, 0.0035355338, 0, 1, 0, 0, -1.7677668, -1.0606601, 0.70710677, -0.0035355338, 381.80194, 93.93398, 70.71068, 0.6464466]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ -
+ type: "stacking-context"
+ transform: [3.182372, 1.088346, -0.4353384, 0.002176692, -1.0183089, 0.7350135, 0.10599462, -0.00052997307, -4.481691, -1.2350134, 0.89400536, -0.0044700266, 883.5937, 117.66405, 32.93438, 0.8353281]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ -
+ type: "stacking-context"
+ transform: [0.29134378, -0.9896399, 0.6324555, -0.0015811388, 0.3543281, 1.4948199, -0.31622776, 0.0007905694, -1.1627856, -0.92120904, 0.70710677, -0.0017677669, 235.43283, 649.48206, -31.622776, 1.079057]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ -
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 1, 1, 0, 0, -3.5, -3.5, 1, -0.005, 500, 600, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
+ -
+ type: "stacking-context"
+ transform: [0.82903755, 0.78133285, 0, 0, -0.5591929, 0.67920226, 0, 0, -5.5, -3.5, 1, -0.005, 1073.0155, 553.9465, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ image: checkerboard(2, 16, 12)
+ stretch-size: 200 200
diff --git a/third_party/webrender/wrench/reftests/transforms/prim-suite.png b/third_party/webrender/wrench/reftests/transforms/prim-suite.png
new file mode 100644
index 00000000000..cec3ecc3214
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/prim-suite.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/prim-suite.yaml b/third_party/webrender/wrench/reftests/transforms/prim-suite.yaml
new file mode 100644
index 00000000000..241a2e1c0a5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/prim-suite.yaml
@@ -0,0 +1,45 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 100, 100]
+ transform: rotate(-30)
+ items:
+ - type: rect
+ bounds: [ 10, 10, 80, 80 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 10, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: inset
+
+ - type: rect
+ bounds: [ 140, 10, 80, 80 ]
+ color: [0, 255, 0]
+ - type: box-shadow
+ bounds: [ 140, 10, 80, 80 ]
+ blur-radius: 25
+ clip-mode: outset
+
+ - type: border
+ bounds: [ 250, 10, 100, 100 ]
+ width: [ 10, 10, 10, 10 ]
+ border-type: normal
+ style: solid
+ color: [ red, green, blue, black ]
+ radius: {
+ top-left: [20, 20],
+ top-right: [10, 10],
+ bottom-left: [25, 25],
+ bottom-right: [0, 0],
+ }
+
+ - bounds: [150, 150, 128, 128]
+ image: checkerboard(4, 15, 8)
+ stretch-size: 128 128
+
+ - type: radial-gradient
+ bounds: 300 150 100 100
+ center: 50 50
+ radius: 50 50
+ stops: [0, red, 1, blue]
diff --git a/third_party/webrender/wrench/reftests/transforms/raster-root-huge-scale.yaml b/third_party/webrender/wrench/reftests/transforms/raster-root-huge-scale.yaml
new file mode 100644
index 00000000000..269c71cccaf
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/raster-root-huge-scale.yaml
@@ -0,0 +1,30 @@
+# Tests that raster roots with very large scaling factors do not cause device rects to overflow.
+# See bug 1642440
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ transform: perspective(1) scale(99999999)
+ transform-style: preserve-3d
+ filters: invert(1)
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ transform: perspective(1) scale(0.0000001)
+ transform-style: preserve-3d
+ items:
+ - type: clip
+ bounds: [10, 10, 60000, 60000]
+ clip-rect: [10, 10, 60000, 60000]
+ id: 2
+ complex:
+ - rect: [0, 0, 100, 100]
+ radius: [20, 20]
+ "clip-mode": clip
+ - type: stacking-context
+ bounds: 0 0 0 0
+ clip-and-scroll: 2
+ items:
+ - rect: 0 0 100 100
+ color: red
diff --git a/third_party/webrender/wrench/reftests/transforms/raster-root-large-mask.yaml b/third_party/webrender/wrench/reftests/transforms/raster-root-large-mask.yaml
new file mode 100644
index 00000000000..4517f81651b
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/raster-root-large-mask.yaml
@@ -0,0 +1,29 @@
+# Make sure we don't panic by trying to create an excessively large mask render task
+# See bug 1637796
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ transform: perspective(300)
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ transform-style: preserve-3d
+ transform: ["scale(0.001667, 0.001667)"]
+ items:
+ - type: clip
+ bounds: [10, 10, 60000, 60000]
+ clip-rect: [10, 10, 60000, 60000]
+ id: 2
+ complex:
+ - rect: [10, 10, 60000, 60000]
+ radius: [10000, 10000]
+ "clip-mode": clip
+ - type: stacking-context
+ bounds: 0 0 0 0
+ clip-and-scroll: 2
+ items:
+ - type: rect
+ bounds: 0 0 60000 60000
+ color: blue
diff --git a/third_party/webrender/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml b/third_party/webrender/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml
new file mode 100644
index 00000000000..925d81951e9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml
@@ -0,0 +1,11 @@
+# Tests that the correct device pixel scale is propagated to child surfaces.
+# See bug 1639729
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ filters: invert(1)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [0, 0, 260, 260]
diff --git a/third_party/webrender/wrench/reftests/transforms/raster-root-scaling-2.yaml b/third_party/webrender/wrench/reftests/transforms/raster-root-scaling-2.yaml
new file mode 100644
index 00000000000..6aebd744cec
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/raster-root-scaling-2.yaml
@@ -0,0 +1,22 @@
+# Tests that the correct device pixel scale is propagated to child surfaces.
+# See bug 1639729
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ # Force WebRender to form a raster root
+ transform: perspective(1000)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ transform-style: preserve-3d
+ transform: scale(10,10)
+ items:
+ - type: stacking-context
+ bounds: 0 0 0 0
+ # Create a non-raster root surface
+ filters: invert(1)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [0, 0, 26, 26]
diff --git a/third_party/webrender/wrench/reftests/transforms/raster-root-scaling-ref.yaml b/third_party/webrender/wrench/reftests/transforms/raster-root-scaling-ref.yaml
new file mode 100644
index 00000000000..5088e017566
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/raster-root-scaling-ref.yaml
@@ -0,0 +1,10 @@
+
+# Tests that surfaces created by raster roots are scaled based on the surface to parent transform.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [0, 0, 260, 260]
diff --git a/third_party/webrender/wrench/reftests/transforms/raster-root-scaling.yaml b/third_party/webrender/wrench/reftests/transforms/raster-root-scaling.yaml
new file mode 100644
index 00000000000..3a592635a3d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/raster-root-scaling.yaml
@@ -0,0 +1,16 @@
+# Tests that surfaces created by raster roots are scaled based on the surface to parent transform.
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ # Force WebRender to form a raster root
+ transform: perspective(1000)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 0, 0]
+ transform-style: preserve-3d
+ transform: scale(10,10)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [0, 0, 26, 26]
diff --git a/third_party/webrender/wrench/reftests/transforms/raster_root_A_8192.yaml b/third_party/webrender/wrench/reftests/transforms/raster_root_A_8192.yaml
new file mode 100644
index 00000000000..034631d0314
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/raster_root_A_8192.yaml
@@ -0,0 +1,20 @@
+root:
+ items:
+ - type: "stacking-context"
+ transform: scale(0.125)
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 50
+ items:
+ - image: checkerboard(0, 512, 16);
+ bounds: [1600, 1600, 8192, 8192]
+ - type: "stacking-context"
+ bounds: [0, 0, 8192, 8192]
+ mix-blend-mode: difference
+ complex-clip:
+ rect: [2048, 2048, 4096, 4096]
+ radius: [1024, 1024]
+ items:
+ - image: checkerboard(0, 4096, 2);
+ bounds: [0, 0, 8192, 8192]
diff --git a/third_party/webrender/wrench/reftests/transforms/raster_root_A_ref.yaml b/third_party/webrender/wrench/reftests/transforms/raster_root_A_ref.yaml
new file mode 100644
index 00000000000..b5e28256bf8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/raster_root_A_ref.yaml
@@ -0,0 +1,20 @@
+root:
+ items:
+ - type: "stacking-context"
+ transform: scale(0.5)
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 50
+ items:
+ - image: checkerboard(0, 128, 16);
+ bounds: 400 400 2048 2048
+ - type: "stacking-context"
+ bounds: [0, 0, 2048, 2048]
+ mix-blend-mode: difference
+ complex-clip:
+ rect: [512, 512, 1024, 1024]
+ radius: [256, 256]
+ items:
+ - image: checkerboard(0, 1024, 2);
+ bounds: [0, 0, 2048, 2048]
diff --git a/third_party/webrender/wrench/reftests/transforms/raster_root_B_8192.yaml b/third_party/webrender/wrench/reftests/transforms/raster_root_B_8192.yaml
new file mode 100644
index 00000000000..9f8a58f5cc0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/raster_root_B_8192.yaml
@@ -0,0 +1,14 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ perspective: 100
+ items:
+ - type: stacking-context
+ transform: rotate-z(20) rotate-x(60)
+ filters: [invert(1)]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 20000, 100]
+ color: [20, 120, 18, 1.0]
diff --git a/third_party/webrender/wrench/reftests/transforms/raster_root_B_ref.yaml b/third_party/webrender/wrench/reftests/transforms/raster_root_B_ref.yaml
new file mode 100644
index 00000000000..3fea3a19dbd
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/raster_root_B_ref.yaml
@@ -0,0 +1,14 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 600, 600]
+ perspective: 100
+ items:
+ - type: stacking-context
+ transform: rotate-z(20) rotate-x(60)
+ filters: [invert(1)]
+ mix-blend-mode: difference
+ items:
+ - type: rect
+ bounds: [0, 0, 4000, 100]
+ color: [20, 120, 18, 1.0]
diff --git a/third_party/webrender/wrench/reftests/transforms/reftest.list b/third_party/webrender/wrench/reftests/transforms/reftest.list
new file mode 100644
index 00000000000..5931b7d6e52
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/reftest.list
@@ -0,0 +1,54 @@
+platform(linux,mac) == local-clip.yaml local-clip.png
+platform(linux,mac) == rotated-clip.yaml rotated-clip.png
+platform(linux,mac) == rotated-clip-large.yaml rotated-clip-large.png
+platform(linux,mac) == image-rotated-clip.yaml image-rotated-clip.png
+# Something leaks the state: the test passes if only run `reftest reftests/transform`
+# but fails when all the tests are run
+platform(linux,mac) fuzzy(1,4) == rotated-image.yaml rotated-image.png
+== singular.yaml singular-ref.yaml
+platform(linux) fuzzy(1,630) == perspective.yaml perspective.png
+platform(linux,mac) fuzzy(1,156) == prim-suite.yaml prim-suite.png
+== segments-bug.yaml segments-bug-ref.yaml
+platform(linux,mac) == content-offset.yaml content-offset.png
+platform(linux,mac) == coord-system.yaml coord-system.png
+platform(linux,mac) fuzzy(1,5) zoom(4) == border-zoom.yaml border-zoom.png
+platform(linux) fuzzy(1,520) == perspective-origin.yaml perspective-origin.png
+platform(linux,mac) color_targets(3) alpha_targets(0) fuzzy(1,180) == screen-space-blit.yaml screen-space-blit.png
+platform(linux,mac) fuzzy(1,331) color_targets(2) alpha_targets(0) == screen-space-blit-trivial.yaml screen-space-blit-trivial.png
+platform(linux) fuzzy(11,4592) == screen-space-blur.yaml screen-space-blur.png
+platform(linux,mac) == nested-rotate-x.yaml nested-rotate-x.png
+platform(linux,mac) != nested-rotate-x.yaml nested-rotate-x-flat.yaml
+platform(linux,mac) == nested-rotate-x-flat.yaml nested-rotate-x-flat.png
+platform(linux,mac) == nested-preserve-3d.yaml nested-preserve-3d.png
+platform(linux,mac) fuzzy(1,283) == near-plane-clip.yaml near-plane-clip.png
+platform(linux,mac) == perspective-mask.yaml perspective-mask.png
+== rotate-clip.yaml rotate-clip-ref.yaml
+== clip-translate.yaml clip-translate-ref.yaml
+platform(linux,mac) fuzzy(1,1) == perspective-clip.yaml perspective-clip.png
+platform(linux,mac) fuzzy(1,2) == perspective-clip-1.yaml perspective-clip-1.png
+platform(linux,mac) fuzzy(1,2) == perspective-shadow.yaml perspective-shadow.png
+# The ref YAML here produces significantly worse quality
+fuzzy(200,4200) == perspective-box-shadow.yaml perspective-box-shadow-ref.yaml
+== complex-preserve-3d.yaml blank.yaml
+platform(linux,mac) fuzzy(9,348) == perspective-border-radius.yaml perspective-border-radius.png
+fuzzy(1,38) == snapped-preserve-3d.yaml snapped-preserve-3d-ref.yaml
+platform(linux,mac) fuzzy(1,122) == border-scale.yaml border-scale.png
+platform(linux,mac) fuzzy(1,16) == border-scale-2.yaml border-scale-2.png
+platform(linux,mac) fuzzy(1,69) == border-scale-3.yaml border-scale-3.png
+platform(linux,mac) fuzzy(1,74) == border-scale-4.yaml border-scale-4.png
+# Just make sure we aren't crashing here
+!= large-raster-root.yaml blank.yaml
+== flatten-preserve-3d-root.yaml flatten-preserve-3d-root-ref.yaml
+== flatten-twice.yaml flatten-twice-ref.yaml
+== strange-w.yaml strange-w-ref.yaml
+== big-axis-aligned-scale.yaml big-axis-aligned-scale-ref.yaml
+# Compare ~8K raster root (>MAX_SURFACE_SIZE) with ~2K raster root. fuzzy due to lerping on edges.
+skip_on(android) fuzzy-range(<=3,*3077,<=10,*133,<=93,*490) == raster_root_A_8192.yaml raster_root_A_ref.yaml
+# Same as large-raster-root.yaml but resulting in a 10302×100 raster root (= >4096) vs 4000x100 in ref:
+skip_on(android) fuzzy(60,917) == raster_root_B_8192.yaml raster_root_B_ref.yaml
+# Make sure we don't panic
+!= raster-root-large-mask.yaml blank.yaml
+skip_on(android) == raster-root-scaling.yaml raster-root-scaling-ref.yaml
+skip_on(android) == raster-root-scaling-2.yaml raster-root-scaling-2-ref.yaml
+# Make sure we don't panic
+!= raster-root-huge-scale.yaml blank.yaml
diff --git a/third_party/webrender/wrench/reftests/transforms/rotate-clip-ref.yaml b/third_party/webrender/wrench/reftests/transforms/rotate-clip-ref.yaml
new file mode 100644
index 00000000000..133279fca89
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/rotate-clip-ref.yaml
@@ -0,0 +1,7 @@
+---
+root:
+ items:
+ -
+ bounds: [100, 146, 150, 107]
+ type: rect
+ color: 0 128 0 1.0000
diff --git a/third_party/webrender/wrench/reftests/transforms/rotate-clip.yaml b/third_party/webrender/wrench/reftests/transforms/rotate-clip.yaml
new file mode 100644
index 00000000000..209d53d103e
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/rotate-clip.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ -
+ type: clip
+ bounds: [0, 0, 2000, 2000]
+ clip-rect: [0, 0, 2000, 2000]
+ items:
+ -
+ bounds: [100, 0, 150, 150]
+ type: "stacking-context"
+ transform: rotate-x(45)
+ transform-origin: [0, 500]
+ items:
+ -
+ bounds: [0, 0, 150, 150]
+ type: rect
+ color: 0 128 0 1.0000
diff --git a/third_party/webrender/wrench/reftests/transforms/rotated-clip-large.png b/third_party/webrender/wrench/reftests/transforms/rotated-clip-large.png
new file mode 100644
index 00000000000..c4e48403709
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/rotated-clip-large.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/rotated-clip-large.yaml b/third_party/webrender/wrench/reftests/transforms/rotated-clip-large.yaml
new file mode 100644
index 00000000000..ec57e6c6973
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/rotated-clip-large.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ -
+ bounds: 100 100 300 300
+ items:
+ - type: clip
+ bounds: [20, 20, 200, 200]
+ complex:
+ - rect: [20, 20, 200, 200]
+ radius: 32
+ items:
+ - type: rect
+ bounds: 20 20 200 200
+ color: blue
+ type: stacking-context
+ transform: rotate(-33)
diff --git a/third_party/webrender/wrench/reftests/transforms/rotated-clip.png b/third_party/webrender/wrench/reftests/transforms/rotated-clip.png
new file mode 100644
index 00000000000..33d2771d3a9
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/rotated-clip.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/rotated-clip.yaml b/third_party/webrender/wrench/reftests/transforms/rotated-clip.yaml
new file mode 100644
index 00000000000..a4305e64499
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/rotated-clip.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ -
+ bounds: 100 100 100 100
+ items:
+ - type: clip
+ bounds: [20, 20, 100, 100]
+ complex:
+ - rect: [20, 20, 100, 100]
+ radius: 32
+ items:
+ - type: rect
+ bounds: 20 20 100 100
+ color: blue
+ type: stacking-context
+ transform: rotate(-30)
diff --git a/third_party/webrender/wrench/reftests/transforms/rotated-image.png b/third_party/webrender/wrench/reftests/transforms/rotated-image.png
new file mode 100644
index 00000000000..2bb0d45e48d
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/rotated-image.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/rotated-image.yaml b/third_party/webrender/wrench/reftests/transforms/rotated-image.yaml
new file mode 100644
index 00000000000..5ab5d3b7570
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/rotated-image.yaml
@@ -0,0 +1,75 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 2880, 1482]
+ "clip-rect": [0, 0, 2880, 1482]
+ "backface-visible": true
+ type: rect
+ color: white
+ -
+ bounds: [0, 0, 2880, 1482]
+ "clip-rect": [0, 0, 2880, 1482]
+ "backface-visible": true
+ type: clip
+ id: 10
+ "content-size": [2880, 1482]
+ -
+ "clip-rect": [0, 0, 2880, 1482]
+ "clip-and-scroll": 10
+ "backface-visible": true
+ type: "scroll-frame"
+ id: 2
+ "content-size": [2880, 1482]
+ bounds: [0, 0, 2880, 1482]
+ -
+ bounds: [0, 0, 2880, 1482]
+ "clip-rect": [0, 0, 2880, 1482]
+ "clip-and-scroll": 2
+ "backface-visible": true
+ type: clip
+ id: 3
+ "content-size": [2880, 1482]
+ -
+ bounds: [0, 0, 2880, 1482]
+ "clip-rect": [0, 0, 2880, 1482]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ type: rect
+ color: white
+ -
+ bounds: [0, 0, 0, 0]
+ "clip-rect": [0, 0, 0, 0]
+ "clip-and-scroll": 3
+ "backface-visible": true
+ type: "stacking-context"
+ "scroll-policy": scrollable
+ transform: rotate-z(-1)
+ "transform-style": flat
+ items:
+ -
+ bounds: [2, 2, 200, 200]
+ "clip-rect": [2, 2, 200, 200]
+ "backface-visible": true
+ type: clip
+ id: 4
+ "content-size": [200, 200]
+ -
+ bounds: [2, -182, 152, 216]
+ "clip-rect": [2, 0, 152, 34]
+ "clip-and-scroll": 4
+ "backface-visible": true
+ image: "image.png"
+ "stretch-size": [152, 216]
+ "tile-spacing": [0, 0]
+ -
+ bounds: [0, 0, 204, 204]
+ "clip-rect": [0, 0, 204, 204]
+ "backface-visible": true
+ type: border
+ width: 2
+ "border-type": normal
+ color: 0 0 255 1.0000
+ style: solid
+ id: [1, 1]
+pipelines: []
diff --git a/third_party/webrender/wrench/reftests/transforms/screen-space-blit-trivial.png b/third_party/webrender/wrench/reftests/transforms/screen-space-blit-trivial.png
new file mode 100644
index 00000000000..0c7ed88dd60
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/screen-space-blit-trivial.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/screen-space-blit-trivial.yaml b/third_party/webrender/wrench/reftests/transforms/screen-space-blit-trivial.yaml
new file mode 100644
index 00000000000..76b2578faa5
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/screen-space-blit-trivial.yaml
@@ -0,0 +1,22 @@
+# This test is similar to "screen-space-blit" but without filters,
+# so the implementation doesn't attempt to bake the contents
+# into a separate render target.
+---
+root:
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 100
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+ transform: rotate-x(-15)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [100, 100, 260, 260]
+ - type: "stacking-context"
+ transform-origin: 635 235
+ transform: rotate-z(-45)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [500, 100, 260, 260]
diff --git a/third_party/webrender/wrench/reftests/transforms/screen-space-blit.png b/third_party/webrender/wrench/reftests/transforms/screen-space-blit.png
new file mode 100644
index 00000000000..6479438fe15
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/screen-space-blit.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/screen-space-blit.yaml b/third_party/webrender/wrench/reftests/transforms/screen-space-blit.yaml
new file mode 100644
index 00000000000..0bae3a37361
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/screen-space-blit.yaml
@@ -0,0 +1,22 @@
+# This test uses `identity` filter on a preserve3D context to test how
+# filters mix up with the SC's baking for preserve3d.
+---
+root:
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 100
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+ transform: rotate-x(-15)
+ filters: identity
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [100, 100, 260, 260]
+ - type: "stacking-context"
+ transform-origin: 635 235
+ transform: rotate-z(-45)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [500, 100, 260, 260]
diff --git a/third_party/webrender/wrench/reftests/transforms/screen-space-blur.png b/third_party/webrender/wrench/reftests/transforms/screen-space-blur.png
new file mode 100644
index 00000000000..e4e3df37318
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/screen-space-blur.png
Binary files differ
diff --git a/third_party/webrender/wrench/reftests/transforms/screen-space-blur.yaml b/third_party/webrender/wrench/reftests/transforms/screen-space-blur.yaml
new file mode 100644
index 00000000000..e9c5f5d32dc
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/screen-space-blur.yaml
@@ -0,0 +1,20 @@
+root:
+ items:
+ - type: "stacking-context"
+ perspective: 100
+ perspective-origin: 100 100
+ items:
+ - type: "stacking-context"
+ transform-origin: 235 235
+ transform: rotate-x(-15)
+ filters: blur(3)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [100, 100, 260, 260]
+ - type: "stacking-context"
+ transform-origin: 635 235
+ transform: rotate-z(-45)
+ filters: blur(3)
+ items:
+ - image: checkerboard(2, 16, 16)
+ bounds: [500, 100, 260, 260]
diff --git a/third_party/webrender/wrench/reftests/transforms/segments-bug-ref.yaml b/third_party/webrender/wrench/reftests/transforms/segments-bug-ref.yaml
new file mode 100644
index 00000000000..aad75347ed8
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/segments-bug-ref.yaml
@@ -0,0 +1,24 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [12, 12, 130, 130]
+ type: clip
+ id: 4
+ complex:
+ -
+ rect: [12, 12, 130, 130]
+ radius: 20
+ "clip-mode": clip
+ -
+ clip-and-scroll: 4
+ type: "stacking-context"
+ items:
+ -
+ bounds: [12, 12, 130, 130]
+ clip-and-scroll: 4
+ type: rect
+ color: 0 128 0 1.0000
diff --git a/third_party/webrender/wrench/reftests/transforms/segments-bug.yaml b/third_party/webrender/wrench/reftests/transforms/segments-bug.yaml
new file mode 100644
index 00000000000..72130413fc4
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/segments-bug.yaml
@@ -0,0 +1,27 @@
+# Test that opaque/alpha segments are correctly calculated
+# when the clip is in a different (but compatible) coordinate
+# space from the primitive.
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ items:
+ -
+ bounds: [12, 12, 130, 130]
+ type: clip
+ id: 4
+ complex:
+ -
+ rect: [12, 12, 130, 130]
+ radius: 20
+ "clip-mode": clip
+ -
+ "clip-and-scroll": 4
+ type: "stacking-context"
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 12, 12, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 130, 130]
+ type: rect
+ color: 0 128 0 1.0000
diff --git a/third_party/webrender/wrench/reftests/transforms/singular-ref.yaml b/third_party/webrender/wrench/reftests/transforms/singular-ref.yaml
new file mode 100644
index 00000000000..8401017c0da
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/singular-ref.yaml
@@ -0,0 +1,28 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ "clip-rect": [0, 0, 200, 200]
+ type: clip
+ id: 2
+ "content-size": [200, 200]
+ -
+ bounds: [0, 100, 100, 100]
+ "clip-rect": [0, 100, 100, 100]
+ "clip-and-scroll": 2
+ type: rect
+ color: blue
+ -
+ bounds: [100, 0, 100, 100]
+ "clip-rect": [100, 0, 100, 100]
+ "clip-and-scroll": 2
+ type: rect
+ color: green
+ -
+ bounds: [100, 100, 100, 100]
+ "clip-rect": [100, 100, 100, 100]
+ "clip-and-scroll": 2
+ type: rect
+ color: red
+
diff --git a/third_party/webrender/wrench/reftests/transforms/singular.yaml b/third_party/webrender/wrench/reftests/transforms/singular.yaml
new file mode 100644
index 00000000000..78d133b3ab0
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/singular.yaml
@@ -0,0 +1,39 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 0, 200, 200]
+ "clip-rect": [0, 0, 200, 200]
+ type: clip
+ id: 2
+ "content-size": [200, 200]
+ -
+ bounds: [10, 10, 80, 80]
+ clip-and-scroll: 2
+ type: "stacking-context"
+ transform: [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ items:
+ -
+ bounds: [0, 0, 80, 80]
+ "clip-rect": [0, 0, 80, 80]
+ type: rect
+ color: black
+ -
+ bounds: [0, 100, 100, 100]
+ "clip-rect": [0, 100, 100, 100]
+ clip-and-scroll: 2
+ type: rect
+ color: blue
+ -
+ bounds: [100, 0, 100, 100]
+ "clip-rect": [100, 0, 100, 100]
+ clip-and-scroll: 2
+ type: rect
+ color: green
+ -
+ bounds: [100, 100, 100, 100]
+ "clip-rect": [100, 100, 100, 100]
+ clip-and-scroll: 2
+ type: rect
+ color: red
+
diff --git a/third_party/webrender/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml b/third_party/webrender/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml
new file mode 100644
index 00000000000..a2e89729817
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(10, 10.5, 0)
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(10, 10, 0)
+ items:
+ -
+ bounds: [10, 10.5, 200, 1]
+ type: rect
+ color: red
+ -
+ bounds: [10, 0, 200, 1]
+ type: rect
+ color: red
diff --git a/third_party/webrender/wrench/reftests/transforms/snapped-preserve-3d.yaml b/third_party/webrender/wrench/reftests/transforms/snapped-preserve-3d.yaml
new file mode 100644
index 00000000000..cd2cd8b1a77
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/snapped-preserve-3d.yaml
@@ -0,0 +1,21 @@
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(10, 10.5, 0)
+ "transform-style": "preserve-3d"
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(10, 10, 0)
+ "transform-style": "preserve-3d"
+ items:
+ -
+ bounds: [10, 10.5, 200, 1]
+ type: rect
+ color: red
+ -
+ bounds: [10, 0, 200, 1]
+ type: rect
+ color: red
diff --git a/third_party/webrender/wrench/reftests/transforms/strange-w-ref.yaml b/third_party/webrender/wrench/reftests/transforms/strange-w-ref.yaml
new file mode 100644
index 00000000000..be50589d2aa
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/strange-w-ref.yaml
@@ -0,0 +1,12 @@
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 600, 600]
+ perspective: 20
+ items:
+ - type: stacking-context
+ items:
+ - type: rect
+ bounds: [25, 25, 50, 50]
+ color: red
diff --git a/third_party/webrender/wrench/reftests/transforms/strange-w.yaml b/third_party/webrender/wrench/reftests/transforms/strange-w.yaml
new file mode 100644
index 00000000000..8e2a71b1970
--- /dev/null
+++ b/third_party/webrender/wrench/reftests/transforms/strange-w.yaml
@@ -0,0 +1,15 @@
+# don't assume w=1 when checking if the transform is just a translation
+
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 600, 600]
+ perspective: 20
+ items:
+ - type: stacking-context
+ transform: [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,2]
+ items:
+ - type: rect
+ bounds: [50, 50, 100, 100]
+ color: red
diff --git a/third_party/webrender/wrench/res/wrench.exe.manifest b/third_party/webrender/wrench/res/wrench.exe.manifest
new file mode 100644
index 00000000000..223d04d93fb
--- /dev/null
+++ b/third_party/webrender/wrench/res/wrench.exe.manifest
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
+ manifestVersion="1.0"
+ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+ <assemblyIdentity type="win32"
+ name="webrender.Wrench"
+ version="0.1.0.0"/>
+
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!-- Windows 7 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> <!-- Windows 8 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!-- Windows 8.1 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> <!-- Windows 10 -->
+ </application>
+ </compatibility>
+
+ <asmv3:application>
+ <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
+ <dpiAware>true</dpiAware>
+ </asmv3:windowsSettings>
+ </asmv3:application>
+</assembly>
+
diff --git a/third_party/webrender/wrench/script/benchmark_server.py b/third_party/webrender/wrench/script/benchmark_server.py
new file mode 100644
index 00000000000..b735b4380de
--- /dev/null
+++ b/third_party/webrender/wrench/script/benchmark_server.py
@@ -0,0 +1,59 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import print_function
+import json
+import os
+import subprocess
+import time
+import urllib2
+
+FILE = 'perf.json'
+URL = 'https://wrperf.org/submit'
+
+while True:
+ try:
+ # Remove any previous results
+ try:
+ os.remove(FILE)
+ except:
+ pass
+
+ # Pull latest code
+ subprocess.call(["git", "pull"])
+
+ # Get the git revision of this build
+ revision = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip()
+
+ # Build
+ subprocess.call(["cargo", "build", "--release"])
+
+ # Run benchmarks
+ env = os.environ.copy()
+ # Ensure that vsync is disabled, to get meaningful 'composite' times.
+ env['vblank_mode'] = '0'
+ subprocess.call(["cargo", "run", "--release", "--", "perf", FILE], env=env)
+
+ # Read the results
+ with open(FILE) as file:
+ results = json.load(file)
+
+ # Post the results to server
+ payload = {
+ 'key': env['WEBRENDER_PERF_KEY'],
+ 'revision': revision,
+ 'timestamp': str(time.time()),
+ 'tests': results['tests'],
+ }
+
+ req = urllib2.Request(URL,
+ headers={"Content-Type": "application/json"},
+ data=json.dumps(payload))
+
+ f = urllib2.urlopen(req)
+ except Exception as e:
+ print(e)
+
+ # Delay a bit until next benchmark
+ time.sleep(60 * 60)
diff --git a/third_party/webrender/wrench/script/gen-many-images.py b/third_party/webrender/wrench/script/gen-many-images.py
new file mode 100644
index 00000000000..bd97ad05c2b
--- /dev/null
+++ b/third_party/webrender/wrench/script/gen-many-images.py
@@ -0,0 +1,15 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+SIZE = 8
+
+with open("../benchmarks/many-images.yaml", "w") as text_file:
+ text_file.write("root:\n")
+ text_file.write(" items:\n")
+ for y in range(0, 64):
+ yb = SIZE * y
+ for x in range(0, 128):
+ xb = SIZE * x
+ text_file.write(" - image: solid-color({0}, {1}, 0, 255, {2}, {2})\n".format(x, y, SIZE))
+ text_file.write(" bounds: {0} {1} {2} {2}\n".format(xb, yb, SIZE))
diff --git a/third_party/webrender/wrench/script/headless.py b/third_party/webrender/wrench/script/headless.py
new file mode 100755
index 00000000000..0b98b138626
--- /dev/null
+++ b/third_party/webrender/wrench/script/headless.py
@@ -0,0 +1,154 @@
+#!/usr/bin/python
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# Build and run wrench with off-screen software rendering (OSMesa/LLVMpipe)
+# for platform-independent results. This is good for running reference tests.
+#
+# Usage: headless.py ARGS
+#
+# Pass ARGS through to wrench, after '--headless' and '--no-scissor'.
+#
+# Environment variables:
+#
+# WRENCH_HEADLESS_TARGET: If set, don't rebuild wrench. Instead, the value should
+# be the path to an already-built cargo 'target' directory. This is useful
+# for running a cross-compiled wrench.
+#
+# CARGOFLAGS: Extra flags to be passed to 'cargo build'. Split on whitespace.
+#
+# OPTIMIZED: This script uses the release build by default, but if this variable
+# is set to '0' or 'false', the script uses the debug build.
+#
+# DEBUGGER: If set, run wrench under a debugger. Permitted values are 'rr' (run
+# under 'rr record'), or 'gdb', 'rust-gdb', or 'cgdb' (run under the given
+# debugger, and arrange to supply ARGS to the wrench debuggee, not the
+# debugger)
+
+from __future__ import print_function
+import contextlib
+import os
+import subprocess
+import sys
+from os import path
+from glob import glob
+
+
+@contextlib.contextmanager
+def cd(new_path):
+ """Context manager for changing the current working directory"""
+ previous_path = os.getcwd()
+ try:
+ os.chdir(new_path)
+ yield
+ finally:
+ os.chdir(previous_path)
+
+
+def find_dep_path_newest(package, bin_path):
+ deps_path = path.join(path.split(bin_path)[0], "build")
+ with cd(deps_path):
+ candidates = glob(package + '-*')
+ candidates = (path.join(deps_path, c) for c in candidates)
+ """ For some reason cargo can create an extra osmesa-src without libs """
+ candidates = (c for c in candidates if path.exists(path.join(c, 'out')))
+ candidate_times = sorted(((path.getmtime(c), c) for c in candidates), reverse=True)
+ if len(candidate_times) > 0:
+ return candidate_times[0][1]
+ return None
+
+
+def is_windows():
+ """ Detect windows, mingw, cygwin """
+ return sys.platform == 'win32' or sys.platform == 'msys' or sys.platform == 'cygwin'
+
+
+def is_macos():
+ return sys.platform == 'darwin'
+
+
+def is_linux():
+ return sys.platform.startswith('linux')
+
+
+def debugger():
+ if "DEBUGGER" in os.environ:
+ return os.environ["DEBUGGER"]
+ return None
+
+
+def use_gdb():
+ return debugger() in ['gdb', 'cgdb', 'rust-gdb']
+
+
+def use_rr():
+ return debugger() == 'rr'
+
+
+def optimized_build():
+ if "OPTIMIZED" in os.environ:
+ opt = os.environ["OPTIMIZED"]
+ return opt not in ["0", "false"]
+ return True
+
+
+def set_osmesa_env(bin_path):
+ """Set proper LD_LIBRARY_PATH and DRIVE for software rendering on Linux and OSX"""
+ if is_linux():
+ osmesa_path = path.join(find_dep_path_newest('osmesa-src', bin_path), "out", "lib", "gallium")
+ print(osmesa_path)
+ os.environ["LD_LIBRARY_PATH"] = osmesa_path
+ os.environ["GALLIUM_DRIVER"] = "softpipe"
+ elif is_macos():
+ osmesa_path = path.join(find_dep_path_newest('osmesa-src', bin_path),
+ "out", "src", "gallium", "targets", "osmesa", ".libs")
+ glapi_path = path.join(find_dep_path_newest('osmesa-src', bin_path),
+ "out", "src", "mapi", "shared-glapi", ".libs")
+ os.environ["DYLD_LIBRARY_PATH"] = osmesa_path + ":" + glapi_path
+ os.environ["GALLIUM_DRIVER"] = "softpipe"
+
+
+extra_flags = os.getenv('CARGOFLAGS', None)
+extra_flags = extra_flags.split(' ') if extra_flags else []
+
+wrench_headless_target = os.getenv('WRENCH_HEADLESS_TARGET', None)
+
+if wrench_headless_target:
+ target_folder = wrench_headless_target
+else:
+ target_folder = '../target/'
+
+if optimized_build():
+ target_folder += 'release/'
+else:
+ target_folder += 'debug/'
+
+# For CI purposes, don't build if WRENCH_HEADLESS_TARGET is set.
+# This environment variable is used to point to the location of a cross-compiled
+# wrench for the CI on some platforms.
+if not wrench_headless_target:
+ build_cmd = ['cargo', 'build'] + extra_flags + ['--verbose', '--features', 'headless']
+ if optimized_build():
+ build_cmd += ['--release']
+ subprocess.check_call(build_cmd)
+
+dbg_cmd = []
+if use_rr():
+ dbg_cmd = ['rr', 'record']
+elif use_gdb():
+ dbg_cmd = [debugger(), '--args']
+elif debugger():
+ print("Unknown debugger: " + debugger())
+ sys.exit(1)
+
+set_osmesa_env(target_folder)
+# TODO(gw): We have an occasional accuracy issue or bug (could be WR or OSMesa)
+# where the output of a previous test that uses intermediate targets can
+# cause 1.0 / 255.0 pixel differences in a subsequent test. For now, we
+# run tests with no-scissor mode, which ensures a complete target clear
+# between test runs. But we should investigate this further...
+cmd = dbg_cmd + [target_folder + 'wrench', '--no-scissor', '-h'] + sys.argv[1:]
+print('Running: `' + ' '.join(cmd) + '`')
+subprocess.check_call(cmd)
diff --git a/third_party/webrender/wrench/script/reftest-analyzer.xhtml b/third_party/webrender/wrench/script/reftest-analyzer.xhtml
new file mode 100644
index 00000000000..9fad3544b3d
--- /dev/null
+++ b/third_party/webrender/wrench/script/reftest-analyzer.xhtml
@@ -0,0 +1,857 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- -*- Mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
+<!-- vim: set shiftwidth=2 tabstop=2 autoindent expandtab: -->
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<!--
+
+Features to add:
+* make the left and right parts of the viewer independently scrollable
+* make the test list filterable
+** default to only showing unexpecteds
+* add other ways to highlight differences other than circling?
+* add zoom/pan to images
+* Add ability to load log via XMLHttpRequest (also triggered via URL param)
+* color the test list based on pass/fail and expected/unexpected/random/skip
+* ability to load multiple logs ?
+** rename them by clicking on the name and editing
+** turn the test list into a collapsing tree view
+** move log loading into popup from viewer UI
+
+-->
+<!DOCTYPE html>
+<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Reftest analyzer</title>
+ <style type="text/css"><![CDATA[
+
+ html, body { margin: 0; }
+ html { padding: 0; }
+ body { padding: 4px; }
+
+ #pixelarea, #itemlist, #images { position: absolute; }
+ #itemlist, #images { overflow: auto; }
+ #pixelarea { top: 0; left: 0; width: 320px; height: 84px; overflow: visible }
+ #itemlist { top: 84px; left: 0; width: 320px; bottom: 0; }
+ #images { top: 0; bottom: 0; left: 320px; right: 0; }
+
+ #leftpane { width: 320px; }
+ #images { position: fixed; top: 10px; left: 340px; }
+
+ form#imgcontrols { margin: 0; display: block; }
+
+ #itemlist > table { border-collapse: collapse; }
+ #itemlist > table > tbody > tr > td { border: 1px solid; padding: 1px; }
+ #itemlist td.activeitem { background-color: yellow; }
+
+ /*
+ #itemlist > table > tbody > tr.pass > td.url { background: lime; }
+ #itemlist > table > tbody > tr.fail > td.url { background: red; }
+ */
+
+ #magnification > svg { display: block; width: 84px; height: 84px; }
+
+ #pixelinfo { font: small sans-serif; position: absolute; width: 200px; left: 84px; }
+ #pixelinfo table { border-collapse: collapse; }
+ #pixelinfo table th { white-space: nowrap; text-align: left; padding: 0; }
+ #pixelinfo table td { font-family: monospace; padding: 0 0 0 0.25em; }
+
+ #pixelhint { display: inline; color: #88f; cursor: help; }
+ #pixelhint > * { display: none; position: absolute; margin: 8px 0 0 8px; padding: 4px; width: 400px; background: #ffa; color: black; box-shadow: 3px 3px 2px #888; z-index: 1; }
+ #pixelhint:hover { color: #000; }
+ #pixelhint:hover > * { display: block; }
+ #pixelhint p { margin: 0; }
+ #pixelhint p + p { margin-top: 1em; }
+
+ ]]></style>
+ <script type="text/javascript"><![CDATA[
+
+let heatmapCanvas = null;
+let heatmapUMouse;
+let gl = null;
+
+function heatmap_render_setup(canvas) {
+ gl = canvas.getContext('webgl', {antialias: false, depth: false, preserveDrawingBuffer:false});
+
+ const vertices = [
+ 0, 0,
+ 1, 0,
+ 0, 1,
+ 1, 1,
+ ];
+
+ const vertexBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);
+
+ const vsCode =
+ `
+ attribute vec2 a_vertCoord;
+ varying vec2 v_texCoord;
+ void main(void) {
+ gl_Position = vec4(2.0 * a_vertCoord - 1.0, 0.0, 1.0);
+ v_texCoord = a_vertCoord;
+ }`;
+
+ const VS = gl.createShader(gl.VERTEX_SHADER);
+ gl.shaderSource(VS, vsCode);
+ gl.compileShader(VS);
+
+ const psCode =
+ `
+ precision mediump float;
+ uniform vec2 heatmapUMouse;
+ varying vec2 v_texCoord;
+ uniform sampler2D u_image1, u_image2;
+ void main(void) {
+ vec2 dxy = abs(heatmapUMouse - gl_FragCoord.xy);
+ if(dxy.x < 1.0 || dxy.y < 1.0) { // crosshair
+ gl_FragColor = vec4( 1.0, 1.0, 0.5, 1.0 );
+ return;
+ }
+
+ vec3 img1 = texture2D(u_image1, v_texCoord).rgb;
+ vec3 img2 = texture2D(u_image2, v_texCoord).rgb;
+
+ bool is_top = gl_FragCoord.y > float(heatmapUMouse.y);
+ bool is_left = gl_FragCoord.x < float(heatmapUMouse.x);
+
+ vec3 rgb;
+ if(is_top) {
+ if(is_left) {
+ rgb = img1;
+ } else {
+ rgb = img2;
+ }
+ } else {
+ vec3 diff = abs(img1 - img2);
+ if(is_left) {
+ rgb = diff;
+ } else {
+ float max_diff = max(diff.r, max(diff.g, diff.b));
+ if(max_diff == 0.0) {
+ rgb = vec3(0.0, 0.0, 0.2);
+ } else {
+ // some arbitrary colorization -- transition from green to red
+ // with some contrast tweaks to make red stand out a bit more
+ // at about 0.5'ish
+ rgb = vec3( pow(max_diff, 0.5), pow(1.0 - max_diff, 3.0), 0.0 );
+ }
+ }
+ }
+
+ gl_FragColor = vec4( rgb, 1.0 );
+ }`;
+
+ const FS = gl.createShader(gl.FRAGMENT_SHADER);
+ gl.shaderSource(FS, psCode);
+ gl.compileShader(FS);
+
+ const program = gl.createProgram();
+ gl.attachShader(program, VS);
+ gl.attachShader(program, FS);
+ gl.linkProgram(program);
+ if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
+ console.error('Link failed: ' + gl.getProgramInfoLog(program));
+ console.error('vs info-log: ' + gl.getShaderInfoLog(VS));
+ console.error('fs info-log: ' + gl.getShaderInfoLog(FS));
+ return; // don't assign heatmapCanvas
+ }
+ gl.useProgram(program);
+
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);
+
+ const coord = gl.getAttribLocation(program, "a_vertCoord");
+ gl.vertexAttribPointer(coord, 2, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(coord);
+
+ heatmapUMouse = gl.getUniformLocation(program, "heatmapUMouse");
+
+ gl.uniform1i(gl.getUniformLocation(program, 'u_image1'), 0);
+ gl.uniform1i(gl.getUniformLocation(program, 'u_image2'), 1);
+
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
+ heatmapCanvas = canvas;
+}
+
+function heatmap_change_image(index, image) {
+ if (heatmapCanvas === null) {
+ return;
+ }
+ const texture = gl.createTexture();
+ gl.activeTexture(gl.TEXTURE0 + index);
+ gl.bindTexture (gl.TEXTURE_2D, texture);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texImage2D (gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
+}
+
+function heatmap_render(mouse_x, mouse_y) {
+ if (heatmapCanvas === null) {
+ return;
+ }
+
+ gl.uniform2f(heatmapUMouse, mouse_x, mouse_y);
+
+ // the canvas resizes as user selects different reftests
+ gl.viewport(0, 0, heatmapCanvas.width, heatmapCanvas.height);
+
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
+}
+
+function heatmap_on_mousemove(mousemove_event) {
+ if (heatmapCanvas === null) {
+ return;
+ }
+ const rect = heatmapCanvas.getBoundingClientRect();
+ let x = mousemove_event.clientX - rect.left;
+ let y = mousemove_event.clientY - rect.top;
+ x = x * heatmapCanvas.width / heatmapCanvas.clientWidth;
+ y = y * heatmapCanvas.height / heatmapCanvas.clientHeight;
+
+ // mouse has Y == 0 at the top, GL has it at the bottom:
+ const flip_y = heatmapCanvas.height-1 - y;
+ heatmap_render(x, flip_y);
+
+ return { x:x, y:y };
+}
+
+ ]]></script>
+
+ <script type="text/javascript"><![CDATA[
+
+var XLINK_NS = "http://www.w3.org/1999/xlink";
+var SVG_NS = "http://www.w3.org/2000/svg";
+var IMAGE_NOT_AVAILABLE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAASCAYAAADczdVTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHy0lEQVRoge2aX2hb5xnGf2dYabROgqQkpMuKnWUJLmxHMFaa/SscteQiF5EvUgqLctEVrDJKK1+MolzkQr4IctgW+SLIheJc1BpFpswJw92FbaZsTCGTL0465AtntUekJdJ8lByVHbnnwLsLKbKdSJbiZBVjeuAYn+/P+z3fc97vfd9zbEVEhB566BK+1m0CPfx/o+eAPXQVbR3QqVapOl8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WrNnNiw5uw23T/4o4Xq7FtA29h2My3K9WtETgRZr13UxdIk+pGswkpCcsX0N2OZD9BOgWqFsgWePp20KWb0ywkDgEIa8y55Gq0O5XKHP7cGz++l/haxWylgOuD17aG7eoVpxwL27RX8b27jZ42n1qdahXKrg2bfnUW0eQ7edoD232l+/LPp2pHvNfh8eT2f8/3sO2AZLyRAvns6gqToLOgxP6Uz87HvdoNJDF9E1B6ysLrLw5yW+3PUNvv3dH/L9wX3doNFDl9E1B+yhB+j9O1YPXcZ/AAl9BWJNvZE7AAAAAElFTkSuQmCC";
+
+var gPhases = null;
+
+var gIDCache = {};
+
+var gMagPixPaths = []; // 2D array of array-of-two <path> objects used in the pixel magnifier
+var gMagWidth = 5; // number of zoomed in pixels to show horizontally
+var gMagHeight = 5; // number of zoomed in pixels to show vertically
+var gMagZoom = 16; // size of the zoomed in pixels
+var gImage1Data; // ImageData object for the reference image
+var gImage2Data; // ImageData object for the test output image
+var gFlashingPixels = []; // array of <path> objects that should be flashed due to pixel color mismatch
+var gParams;
+
+function ID(id) {
+ if (!(id in gIDCache))
+ gIDCache[id] = document.getElementById(id);
+ return gIDCache[id];
+}
+
+function hash_parameters() {
+ var result = { };
+ var params = window.location.hash.substr(1).split(/[&;]/);
+ for (var i = 0; i < params.length; i++) {
+ var parts = params[i].split("=");
+ result[parts[0]] = unescape(unescape(parts[1]));
+ }
+ return result;
+}
+
+function load() {
+ gPhases = [ ID("entry"), ID("loading"), ID("viewer") ];
+ build_mag();
+ gParams = hash_parameters();
+ if (gParams.log) {
+ show_phase("loading");
+ process_log(gParams.log);
+ } else if (gParams.logurl) {
+ show_phase("loading");
+ var req = new XMLHttpRequest();
+ req.onreadystatechange = function() {
+ if (req.readyState === 4) {
+ process_log(req.responseText);
+ }
+ };
+ req.open('GET', gParams.logurl, true);
+ req.send();
+ }
+ window.addEventListener('keypress', handle_keyboard_shortcut);
+ ID("image1").addEventListener('error', image_load_error);
+ ID("image2").addEventListener('error', image_load_error);
+}
+
+function image_load_error(e) {
+ e.target.setAttributeNS(XLINK_NS, "xlink:href", IMAGE_NOT_AVAILABLE);
+}
+
+function build_mag() {
+ var mag = ID("mag");
+
+ var r = document.createElementNS(SVG_NS, "rect");
+ r.setAttribute("x", gMagZoom * -gMagWidth / 2);
+ r.setAttribute("y", gMagZoom * -gMagHeight / 2);
+ r.setAttribute("width", gMagZoom * gMagWidth);
+ r.setAttribute("height", gMagZoom * gMagHeight);
+ mag.appendChild(r);
+
+ mag.setAttribute("transform", "translate(" + (gMagZoom * (gMagWidth / 2) + 1) + "," + (gMagZoom * (gMagHeight / 2) + 1) + ")");
+
+ for (var x = 0; x < gMagWidth; x++) {
+ gMagPixPaths[x] = [];
+ for (var y = 0; y < gMagHeight; y++) {
+ var p1 = document.createElementNS(SVG_NS, "path");
+ p1.setAttribute("d", "M" + ((x - gMagWidth / 2) + 1) * gMagZoom + "," + (y - gMagHeight / 2) * gMagZoom + "h" + -gMagZoom + "v" + gMagZoom);
+ p1.setAttribute("stroke", "black");
+ p1.setAttribute("stroke-width", "1px");
+ p1.setAttribute("fill", "#aaa");
+
+ var p2 = document.createElementNS(SVG_NS, "path");
+ p2.setAttribute("d", "M" + ((x - gMagWidth / 2) + 1) * gMagZoom + "," + (y - gMagHeight / 2) * gMagZoom + "v" + gMagZoom + "h" + -gMagZoom);
+ p2.setAttribute("stroke", "black");
+ p2.setAttribute("stroke-width", "1px");
+ p2.setAttribute("fill", "#888");
+
+ mag.appendChild(p1);
+ mag.appendChild(p2);
+ gMagPixPaths[x][y] = [p1, p2];
+ }
+ }
+
+ var flashedOn = false;
+ setInterval(function() {
+ flashedOn = !flashedOn;
+ flash_pixels(flashedOn);
+ }, 500);
+}
+
+function show_phase(phaseid) {
+ for (var i in gPhases) {
+ var phase = gPhases[i];
+ phase.style.display = (phase.id == phaseid) ? "" : "none";
+ }
+
+ if (phase == "viewer")
+ ID("images").style.display = "none";
+}
+
+function fileentry_changed() {
+ show_phase("loading");
+ var input = ID("fileentry");
+ var files = input.files;
+ if (files.length > 0) {
+ // Only handle the first file; don't handle multiple selection.
+ // The parts of the log we care about are ASCII-only. Since we
+ // can ignore lines we don't care about, best to read in as
+ // iso-8859-1, which guarantees we don't get decoding errors.
+ var fileReader = new FileReader();
+ fileReader.onload = function(e) {
+ var log = null;
+
+ log = e.target.result;
+
+ if (log)
+ process_log(log);
+ else
+ show_phase("entry");
+ }
+ fileReader.readAsText(files[0], "iso-8859-1");
+ }
+ // So the user can process the same filename again (after
+ // overwriting the log), clear the value on the form input so we
+ // will always get an onchange event.
+ input.value = "";
+}
+
+function log_pasted() {
+ show_phase("loading");
+ var entry = ID("logentry");
+ var log = entry.value;
+ entry.value = "";
+ process_log(log);
+}
+
+var gTestItems;
+
+function process_log(contents) {
+ var lines = contents.split(/[\r\n]+/);
+ gTestItems = [];
+ for (var j in lines) {
+ var line = lines[j];
+ // Ignore duplicated output in logcat.
+ if (line.match(/I\/Gecko.*?REFTEST/))
+ continue;
+ var match = line.match(/^(?:.*? (?:INFO|ERROR) -\s+)?(?:REFTEST\s+)?(.*)$/);
+ if (!match)
+ continue;
+ line = match[1];
+ match = line.match(/^(TEST-PASS|TEST-UNEXPECTED-PASS|TEST-KNOWN-FAIL|TEST-UNEXPECTED-FAIL|TEST-DEBUG-INFO)(\(EXPECTED RANDOM\)|) \| ([^\|]+) \|(.*)/);
+ if (match) {
+ var state = match[1];
+ var random = match[2];
+ var url = match[3];
+ var extra = match[4];
+ gTestItems.push(
+ {
+ pass: !state.match(/DEBUG-INFO$|FAIL$/),
+ // only one of the following three should ever be true
+ unexpected: !!state.match(/^TEST-UNEXPECTED/),
+ random: (random == "(EXPECTED RANDOM)"),
+ skip: (extra == " (SKIP)"),
+ url: url,
+ images: [],
+ imageLabels: []
+ });
+ continue;
+ }
+ match = line.match(/IMAGE([^:]*): (data:.*)$/);
+ if (match) {
+ var item = gTestItems[gTestItems.length - 1];
+ item.images.push(match[2]);
+ item.imageLabels.push(match[1]);
+ }
+ }
+
+ build_viewer();
+}
+
+function build_viewer() {
+ if (gTestItems.length == 0) {
+ show_phase("entry");
+ return;
+ }
+
+ var cell = ID("itemlist");
+ while (cell.childNodes.length > 0)
+ cell.removeChild(cell.childNodes[cell.childNodes.length - 1]);
+
+ var table = document.createElement("table");
+ var tbody = document.createElement("tbody");
+ table.appendChild(tbody);
+
+ for (var i in gTestItems) {
+ var item = gTestItems[i];
+
+ // optional url filter for only showing unexpected results
+ if (parseInt(gParams.only_show_unexpected) && !item.unexpected)
+ continue;
+
+ // XXX regardless skip expected pass items until we have filtering UI
+ if (item.pass && !item.unexpected)
+ continue;
+
+ var tr = document.createElement("tr");
+ var rowclass = item.pass ? "pass" : "fail";
+ var td;
+ var text;
+
+ td = document.createElement("td");
+ text = "";
+ if (item.unexpected) { text += "!"; rowclass += " unexpected"; }
+ if (item.random) { text += "R"; rowclass += " random"; }
+ if (item.skip) { text += "S"; rowclass += " skip"; }
+ td.appendChild(document.createTextNode(text));
+ tr.appendChild(td);
+
+ td = document.createElement("td");
+ td.id = "item" + i;
+ td.className = "url";
+ // Only display part of URL after "/mozilla/".
+ var match = item.url.match(/\/mozilla\/(.*)/);
+ text = document.createTextNode(match ? match[1] : item.url);
+ if (item.images.length > 0) {
+ var a = document.createElement("a");
+ a.href = "javascript:show_images(" + i + ")";
+ a.appendChild(text);
+ td.appendChild(a);
+ } else {
+ td.appendChild(text);
+ }
+ tr.appendChild(td);
+
+ tbody.appendChild(tr);
+ }
+
+ cell.appendChild(table);
+
+ show_phase("viewer");
+}
+
+function get_image_data(src, whenReady) {
+ var img = new Image();
+ img.onload = function() {
+ var canvas = document.createElement("canvas");
+ canvas.width = img.naturalWidth;
+ canvas.height = img.naturalHeight;
+
+ var ctx = canvas.getContext("2d");
+ ctx.drawImage(img, 0, 0);
+
+ whenReady(ctx.getImageData(0, 0, img.naturalWidth, img.naturalHeight));
+ };
+ img.src = src;
+}
+
+function sync_svg_size(imageData) {
+ // We need the size of the 'svg' and its 'image' elements to match the size
+ // of the ImageData objects that we're going to read pixels from or else our
+ // magnify() function will be very broken.
+ ID("svg").setAttribute("width", imageData.width);
+ ID("svg").setAttribute("height", imageData.height);
+}
+
+function sync_heatmap_size(imageData) {
+ ID("heat_canvas").setAttribute("width" , imageData.width);
+ ID("heat_canvas").setAttribute("height", imageData.height);
+}
+
+function show_images(i) {
+ var item = gTestItems[i];
+ var cell = ID("images");
+
+ // Remove activeitem class from any existing elements
+ var activeItems = document.querySelectorAll(".activeitem");
+ for (var activeItemIdx = activeItems.length; activeItemIdx-- != 0;) {
+ activeItems[activeItemIdx].classList.remove("activeitem");
+ }
+
+ ID("item" + i).classList.add("activeitem");
+ ID("image1").style.display = "";
+ ID("image2").style.display = "none";
+ show_diff_none();
+ ID("imgcontrols").reset();
+ ID("diffcontrols").reset();
+
+ ID("image1").setAttributeNS(XLINK_NS, "xlink:href", item.images[0]);
+ // Making the href be #image1 doesn't seem to work
+ ID("feimage1").setAttributeNS(XLINK_NS, "xlink:href", item.images[0]);
+ if (item.images.length == 1) {
+ ID("imgcontrols").style.display = "none";
+ } else {
+ ID("imgcontrols").style.display = "";
+
+ ID("image2").setAttributeNS(XLINK_NS, "xlink:href", item.images[1]);
+ // Making the href be #image2 doesn't seem to work
+ ID("feimage2").setAttributeNS(XLINK_NS, "xlink:href", item.images[1]);
+
+ ID("label1").textContent = 'Image ' + item.imageLabels[0];
+ ID("label2").textContent = 'Image ' + item.imageLabels[1];
+ }
+
+ cell.style.display = "";
+
+ get_image_data(item.images[0], function(data) { gImage1Data = data; sync_svg_size(gImage1Data); sync_heatmap_size(gImage1Data); heatmap_change_image(0, gImage1Data); });
+ get_image_data(item.images[1], function(data) { gImage2Data = data; heatmap_change_image(1, gImage2Data); });
+}
+
+function show_image(i) {
+ if (i == 1) {
+ ID("image1").style.display = "";
+ ID("image2").style.display = "none";
+ } else {
+ ID("image1").style.display = "none";
+ ID("image2").style.display = "";
+ }
+}
+
+function handle_keyboard_shortcut(event) {
+ switch (event.charCode) {
+ case 49: // "1" key
+ document.getElementById("radio1").checked = true;
+ show_image(1);
+ break;
+ case 50: // "2" key
+ document.getElementById("radio2").checked = true;
+ show_image(2);
+ break;
+ case 100: // "d" key
+ document.getElementById("radio_diff_circle").click();
+ break;
+ case 104: // "h" key
+ document.getElementById("radio_diff_heatmap").click();
+ break;
+ case 112: // "p" key
+ shift_images(-1);
+ break;
+ case 110: // "n" key
+ shift_images(1);
+ break;
+ }
+}
+
+function shift_images(dir) {
+ var activeItem = document.querySelector(".activeitem");
+ if (!activeItem) {
+ return;
+ }
+ for (var elm = activeItem; elm; elm = elm.parentElement) {
+ if (elm.tagName != "tr") {
+ continue;
+ }
+ elm = dir > 0 ? elm.nextElementSibling : elm.previousElementSibling;
+ if (elm) {
+ elm.getElementsByTagName("a")[0].click();
+ }
+ return;
+ }
+}
+
+function show_diff_none() {
+ ID("svg") .style.display = "";
+ ID("diffrect") .style.display = "none";
+ ID("heat_canvas").style.display = "none";
+}
+
+function show_diff_circle() {
+ ID("svg") .style.display = "";
+ ID("diffrect") .style.display = "";
+ ID("heat_canvas").style.display = "none";
+}
+
+function show_diff_heatmap() {
+ ID("svg") .style.display = "none";
+ ID("diffrect") .style.display = "none";
+ ID("heat_canvas").style.display = "";
+
+ if (heatmapCanvas === null) {
+ canvas = document.getElementById('heat_canvas');
+ heatmap_render_setup(canvas);
+ heatmap_change_image(0, gImage1Data);
+ heatmap_change_image(1, gImage2Data);
+ heatmap_render(0, 0);
+
+ window.addEventListener('mousemove', e => {
+ var { x: x, y: y } = heatmap_on_mousemove(e);
+ magnify_around(Math.floor(x), Math.floor(y));
+ });
+ }
+}
+
+function flash_pixels(on) {
+ var stroke = on ? "red" : "black";
+ var strokeWidth = on ? "2px" : "1px";
+ for (var i = 0; i < gFlashingPixels.length; i++) {
+ gFlashingPixels[i].setAttribute("stroke", stroke);
+ gFlashingPixels[i].setAttribute("stroke-width", strokeWidth);
+ }
+}
+
+function cursor_point(evt) {
+ var m = evt.target.getScreenCTM().inverse();
+ var p = ID("svg").createSVGPoint();
+ p.x = evt.clientX;
+ p.y = evt.clientY;
+ p = p.matrixTransform(m);
+ return { x: Math.floor(p.x), y: Math.floor(p.y) };
+}
+
+function hex2(i) {
+ return (i < 16 ? "0" : "") + i.toString(16);
+}
+
+function canvas_pixel_as_hex(data, x, y) {
+ var offset = (y * data.width + x) * 4;
+ var r = data.data[offset];
+ var g = data.data[offset + 1];
+ var b = data.data[offset + 2];
+ return "#" + hex2(r) + hex2(g) + hex2(b);
+}
+
+function hex_as_rgb(hex) {
+ return "rgb(" + [parseInt(hex.substring(1, 3), 16), parseInt(hex.substring(3, 5), 16), parseInt(hex.substring(5, 7), 16)] + ")";
+}
+
+function magnify(evt) {
+ var { x: x, y: y } = cursor_point(evt);
+ magnify_around(x, y);
+}
+
+function magnify_around(x, y) {
+ if (x < 0 || y < 0 || x >= gImage1Data.width || y >= gImage1Data.height) {
+ return;
+ }
+ var centerPixelColor1, centerPixelColor2;
+
+ var dx_lo = -Math.floor(gMagWidth / 2);
+ var dx_hi = Math.floor(gMagWidth / 2);
+ var dy_lo = -Math.floor(gMagHeight / 2);
+ var dy_hi = Math.floor(gMagHeight / 2);
+
+ flash_pixels(false);
+ gFlashingPixels = [];
+ for (var j = dy_lo; j <= dy_hi; j++) {
+ for (var i = dx_lo; i <= dx_hi; i++) {
+ var px = x + i;
+ var py = y + j;
+ var p1 = gMagPixPaths[i + dx_hi][j + dy_hi][0];
+ var p2 = gMagPixPaths[i + dx_hi][j + dy_hi][1];
+ // Here we just use the dimensions of gImage1Data since we expect test
+ // and reference to have the same dimensions.
+ if (px < 0 || py < 0 || px >= gImage1Data.width || py >= gImage1Data.height) {
+ p1.setAttribute("fill", "#aaa");
+ p2.setAttribute("fill", "#888");
+ } else {
+ var color1 = canvas_pixel_as_hex(gImage1Data, x + i, y + j);
+ var color2 = canvas_pixel_as_hex(gImage2Data, x + i, y + j);
+ p1.setAttribute("fill", color1);
+ p2.setAttribute("fill", color2);
+ if (color1 != color2) {
+ gFlashingPixels.push(p1, p2);
+ p1.parentNode.appendChild(p1);
+ p2.parentNode.appendChild(p2);
+ }
+ if (i == 0 && j == 0) {
+ centerPixelColor1 = color1;
+ centerPixelColor2 = color2;
+ }
+ }
+ }
+ }
+ flash_pixels(true);
+ show_pixelinfo(x, y, centerPixelColor1, hex_as_rgb(centerPixelColor1), centerPixelColor2, hex_as_rgb(centerPixelColor2));
+}
+
+function show_pixelinfo(x, y, pix1rgb, pix1hex, pix2rgb, pix2hex) {
+ var pixelinfo = ID("pixelinfo");
+ ID("coords").textContent = [x, y];
+ ID("pix1hex").textContent = pix1hex;
+ ID("pix1rgb").textContent = pix1rgb;
+ ID("pix2hex").textContent = pix2hex;
+ ID("pix2rgb").textContent = pix2rgb;
+}
+
+ ]]></script>
+
+</head>
+<body onload="load()">
+
+<div id="entry">
+
+<h1>Reftest analyzer: load reftest log</h1>
+
+<p>Either paste your log into this textarea:<br />
+<textarea cols="80" rows="10" id="logentry"/><br/>
+<input type="button" value="Process pasted log" onclick="log_pasted()" /></p>
+
+<p>... or load it from a file:<br/>
+<input type="file" id="fileentry" onchange="fileentry_changed()" />
+</p>
+</div>
+
+<div id="loading" style="display:none">Loading log...</div>
+
+<div id="viewer" style="display:none">
+ <div id="pixelarea">
+ <div id="pixelinfo">
+ <table>
+ <tbody>
+ <tr><th>Pixel at:</th><td colspan="2" id="coords"/></tr>
+ <tr><th>Image 1:</th><td id="pix1rgb"></td><td id="pix1hex"></td></tr>
+ <tr><th>Image 2:</th><td id="pix2rgb"></td><td id="pix2hex"></td></tr>
+ </tbody>
+ </table>
+ <div>
+ <div id="pixelhint">★
+ <div>
+ <p>Move the mouse over the reftest image on the right to show
+ magnified pixels on the left. The color information above is for
+ the pixel centered in the magnified view.</p>
+ <p>Image 1 is shown in the upper triangle of each pixel and Image 2
+ is shown in the lower triangle.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="magnification">
+ <svg xmlns="http://www.w3.org/2000/svg" width="84" height="84" shape-rendering="optimizeSpeed">
+ <g id="mag"/>
+ </svg>
+ </div>
+ </div>
+ <div id="itemlist"></div>
+ <div id="images" style="display:none">
+ <form id="imgcontrols">
+ <input id="radio1" type="radio" name="which" value="0" onchange="show_image(1)" checked="checked" /><label id="label1" title="1" for="radio1">Image 1</label>
+ <input id="radio2" type="radio" name="which" value="1" onchange="show_image(2)" /><label id="label2" title="2" for="radio2">Image 2</label>
+ </form>
+
+ <form id="diffcontrols">
+ Differences:
+ <input id="radio_diff_none" name="diff" value="0" type="radio" onchange="show_diff_none()" checked="checked"/>
+ <label for="radio_diff_none">None</label>
+ <input id="radio_diff_circle" name="diff" value="1" type="radio" onchange="show_diff_circle()" />
+ <label for="radio_diff_circle">Circle</label>
+ <input id="radio_diff_heatmap" name="diff" value="2" type="radio" onchange="show_diff_heatmap()" />
+ <label for="radio_diff_heatmap">Heatmap</label>
+ </form>
+
+ <canvas width="800" height="1000" id="heat_canvas" style="display:none;"></canvas>
+
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="800" height="1000" id="svg">
+ <defs>
+ <!-- use sRGB to avoid loss of data -->
+ <filter id="showDifferences" x="0%" y="0%" width="100%" height="100%"
+ style="color-interpolation-filters: sRGB">
+ <feImage id="feimage1" result="img1" xlink:href="#image1" />
+ <feImage id="feimage2" result="img2" xlink:href="#image2" />
+ <!-- inv1 and inv2 are the images with RGB inverted -->
+ <feComponentTransfer result="inv1" in="img1">
+ <feFuncR type="linear" slope="-1" intercept="1" />
+ <feFuncG type="linear" slope="-1" intercept="1" />
+ <feFuncB type="linear" slope="-1" intercept="1" />
+ </feComponentTransfer>
+ <feComponentTransfer result="inv2" in="img2">
+ <feFuncR type="linear" slope="-1" intercept="1" />
+ <feFuncG type="linear" slope="-1" intercept="1" />
+ <feFuncB type="linear" slope="-1" intercept="1" />
+ </feComponentTransfer>
+ <!-- w1 will have non-white pixels anywhere that img2
+ is brighter than img1, and w2 for the reverse.
+ It would be nice not to have to go through these
+ intermediate states, but feComposite
+ type="arithmetic" can't transform the RGB channels
+ and leave the alpha channel untouched. -->
+ <feComposite result="w1" in="img1" in2="inv2" operator="arithmetic" k2="1" k3="1" />
+ <feComposite result="w2" in="img2" in2="inv1" operator="arithmetic" k2="1" k3="1" />
+ <!-- c1 will have non-black pixels anywhere that img2
+ is brighter than img1, and c2 for the reverse -->
+ <feComponentTransfer result="c1" in="w1">
+ <feFuncR type="linear" slope="-1" intercept="1" />
+ <feFuncG type="linear" slope="-1" intercept="1" />
+ <feFuncB type="linear" slope="-1" intercept="1" />
+ </feComponentTransfer>
+ <feComponentTransfer result="c2" in="w2">
+ <feFuncR type="linear" slope="-1" intercept="1" />
+ <feFuncG type="linear" slope="-1" intercept="1" />
+ <feFuncB type="linear" slope="-1" intercept="1" />
+ </feComponentTransfer>
+ <!-- c will be nonblack (and fully on) for every pixel+component where there are differences -->
+ <feComposite result="c" in="c1" in2="c2" operator="arithmetic" k2="255" k3="255" />
+ <!-- a will be opaque for every pixel with differences and transparent for all others -->
+ <feColorMatrix result="a" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0" />
+
+ <!-- a, dilated by 1 pixel -->
+ <feMorphology result="dila1" in="a" operator="dilate" radius="1" />
+ <!-- a, dilated by 2 pixels -->
+ <feMorphology result="dila2" in="dila1" operator="dilate" radius="1" />
+
+ <!-- all the pixels in the 2-pixel dilation of a but not in the 1-pixel dilation, to highlight the diffs -->
+ <feComposite result="highlight" in="dila2" in2="dila1" operator="out" />
+
+ <feFlood result="red" flood-color="red" />
+ <feComposite result="redhighlight" in="red" in2="highlight" operator="in" />
+ <feFlood result="black" flood-color="black" flood-opacity="0.5" />
+ <feMerge>
+ <feMergeNode in="black" />
+ <feMergeNode in="redhighlight" />
+ </feMerge>
+ </filter>
+ </defs>
+ <g onmousemove="magnify(evt)">
+ <image x="0" y="0" width="100%" height="100%" id="image1" />
+ <image x="0" y="0" width="100%" height="100%" id="image2" />
+ </g>
+ <rect id="diffrect" filter="url(#showDifferences)" pointer-events="none" x="0" y="0" width="100%" height="100%" />
+ </svg>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/third_party/webrender/wrench/script/reftest-debugger.py b/third_party/webrender/wrench/script/reftest-debugger.py
new file mode 100755
index 00000000000..19a2a198901
--- /dev/null
+++ b/third_party/webrender/wrench/script/reftest-debugger.py
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import print_function
+import subprocess
+
+with open('reftest.log', "w") as out:
+ try:
+ subprocess.check_call(['script/headless.py', 'reftest'], stdout=out)
+ print("All tests passed.")
+ except subprocess.CalledProcessError as ex:
+ subprocess.check_call(['firefox', 'reftest-analyzer.xhtml#logurl=reftest.log'])
diff --git a/third_party/webrender/wrench/script/wrench_with_renderer.py b/third_party/webrender/wrench/script/wrench_with_renderer.py
new file mode 100755
index 00000000000..e2685e84765
--- /dev/null
+++ b/third_party/webrender/wrench/script/wrench_with_renderer.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+import os
+import subprocess
+import sys
+
+
+def is_linux():
+ return sys.platform.startswith('linux')
+
+
+if is_linux():
+ requested_renderer = sys.argv[1]
+ renderer = "default"
+
+ if requested_renderer == 'hardware':
+ pass
+ elif requested_renderer == 'llvmpipe':
+ os.environ["LIBGL_ALWAYS_SOFTWARE"] = "1"
+ os.environ["GALLIUM_DRIVER"] = "llvmpipe"
+ elif requested_renderer == 'softpipe':
+ os.environ["LIBGL_ALWAYS_SOFTWARE"] = "1"
+ os.environ["GALLIUM_DRIVER"] = "softpipe"
+ elif requested_renderer == 'swiftshader':
+ # TODO: Set up LD_LIBRARY_PATH to SwiftShader libraries automatically.
+ renderer = 'es3'
+ else:
+ print('Unknown renderer ' + requested_renderer)
+ sys.exit(1)
+
+ cmd = [
+ 'cargo',
+ 'run',
+ '--release',
+ '--',
+ '--no-block', # Run as fast as possible, for benchmarking
+ '--no-picture-caching', # Disable picture caching, to test rasterization performance
+ '--no-subpixel-aa', # SwiftShader doesn't support dual source blending
+ '--renderer', # Select GL3/ES3 renderer API
+ renderer,
+ 'load'
+ ]
+
+ cmd += sys.argv[2:]
+ print('Running: ' + ' '.join(cmd))
+ subprocess.check_call(cmd)
+else:
+ print('This script is only supported on Linux')
diff --git a/third_party/webrender/wrench/src/angle.rs b/third_party/webrender/wrench/src/angle.rs
new file mode 100644
index 00000000000..bdd538bda2b
--- /dev/null
+++ b/third_party/webrender/wrench/src/angle.rs
@@ -0,0 +1,62 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use glutin::{self, ContextBuilder, ContextCurrentState, CreationError};
+use winit::{EventsLoop, Window, WindowBuilder};
+
+#[cfg(not(windows))]
+pub enum Context {}
+
+#[cfg(windows)]
+pub use crate::egl::Context;
+
+impl Context {
+ #[cfg(not(windows))]
+ pub fn with_window<T: ContextCurrentState>(
+ _: WindowBuilder,
+ _: ContextBuilder<'_, T>,
+ _: &EventsLoop,
+ ) -> Result<(Window, Self), CreationError> {
+ Err(CreationError::PlatformSpecific(
+ "ANGLE rendering is only supported on Windows".into(),
+ ))
+ }
+
+ #[cfg(windows)]
+ pub fn with_window<T: ContextCurrentState>(
+ window_builder: WindowBuilder,
+ context_builder: ContextBuilder<'_, T>,
+ events_loop: &EventsLoop,
+ ) -> Result<(Window, Self), CreationError> {
+ use winit::os::windows::WindowExt;
+
+ // FIXME: &context_builder.pf_reqs https://github.com/tomaka/glutin/pull/1002
+ let pf_reqs = &glutin::PixelFormatRequirements::default();
+ let gl_attr = &context_builder.gl_attr.map_sharing(|_| unimplemented!());
+ let window = window_builder.build(events_loop)?;
+ Self::new(pf_reqs, gl_attr)
+ .and_then(|p| p.finish(window.get_hwnd() as _))
+ .map(|context| (window, context))
+ }
+
+ #[cfg(not(windows))]
+ pub unsafe fn make_current(&self) -> Result<(), glutin::ContextError> {
+ match *self {}
+ }
+
+ #[cfg(not(windows))]
+ pub fn get_proc_address(&self, _: &str) -> *const () {
+ match *self {}
+ }
+
+ #[cfg(not(windows))]
+ pub fn swap_buffers(&self) -> Result<(), glutin::ContextError> {
+ match *self {}
+ }
+
+ #[cfg(not(windows))]
+ pub fn get_api(&self) -> glutin::Api {
+ match *self {}
+ }
+}
diff --git a/third_party/webrender/wrench/src/args.yaml b/third_party/webrender/wrench/src/args.yaml
new file mode 100644
index 00000000000..d8a263fcca5
--- /dev/null
+++ b/third_party/webrender/wrench/src/args.yaml
@@ -0,0 +1,222 @@
+name: wrench
+version: "0.1"
+author: Vladimir Vukicevic <vladimir@pobox.com>
+about: WebRender testing and debugging utility
+
+args:
+ - precache:
+ short: c
+ long: precache
+ help: Precache shaders
+ - verbose:
+ short: v
+ long: verbose
+ help: Enable verbose display
+ - zoom:
+ short: z
+ long: zoom
+ help: Set zoom factor
+ takes_value: true
+ - shaders:
+ long: shaders
+ help: Override path for shaders
+ takes_value: true
+ - use_unoptimized_shaders:
+ long: use-unoptimized-shaders
+ help: Use unoptimized shaders rather than the shaders optimized at build-time
+ - rebuild:
+ short: r
+ long: rebuild
+ help: Rebuild display list from scratch every frame
+ - save:
+ long: save
+ help: 'Save frames, one of: yaml, json, ron, or binary'
+ takes_value: true
+ - no_subpixel_aa:
+ short: a
+ long: no-subpixel-aa
+ help: Disable subpixel aa
+ - no_picture_caching:
+ long: no-picture-caching
+ help: Disable picture caching
+ - slow_subpixel:
+ long: slow-subpixel
+ help: Disable dual source blending
+ - headless:
+ short: h
+ long: headless
+ help: Enable headless rendering
+ - angle:
+ long: angle
+ help: Enable ANGLE rendering (on Windows only)
+ - software:
+ long: software
+ help: Enable software rendering
+ - dp_ratio:
+ short: p
+ long: device-pixel-ratio
+ help: Device pixel ratio
+ takes_value: true
+ - size:
+ short: s
+ long: size
+ help: Window size, specified as widthxheight (e.g. 1024x768), in pixels
+ takes_value: true
+ - time:
+ short: t
+ long: time
+ help: Time limit (in seconds)
+ takes_value: true
+ - vsync:
+ long: vsync
+ help: Enable vsync for OpenGL window
+ - no_scissor:
+ long: no-scissor
+ help: Disable scissors when clearing render targets
+ - no_batch:
+ long: no-batch
+ help: Disable batching of instanced draw calls
+ - chase:
+ long: chase
+ help: Chase a particular primitive matching the local rect or ID
+ takes_value: true
+ - dump_shader_source:
+ long: dump-shader-source
+ help: Dump the source of the specified shader
+ takes_value: true
+ global: true
+ - renderer:
+ long: renderer
+ help: Select rendering API (gl3, es3)
+ takes_value: true
+ global: true
+ - no_block:
+ long: no-block
+ help: Don't block on UI events - run event loop as fast as possible.
+
+subcommands:
+ - png:
+ about: render frame described by YAML and save it to a png file
+ args:
+ - surface:
+ short: s
+ long: surface
+ help: 'What rendered surface to save as PNG, one of: screen, gpu-cache'
+ takes_value: true
+ - INPUT:
+ help: The input YAML file
+ required: true
+ index: 1
+ - OUTPUT:
+ help: Optional output path to save to.
+ required: false
+ index: 2
+ - show:
+ about: show frame(s) described by YAML, binary recording, or capture
+ aliases: ['load', 'replay']
+ args:
+ - queue:
+ short: q
+ long: queue
+ help: How many frames to submit to WR ahead of time (default 1) (YAML only)
+ takes_value: true
+ - include:
+ long: include
+ help: Include the given element type. Can be specified multiple times. (rect/image/text/glyphs/border) (YAML only)
+ multiple: true
+ takes_value: true
+ - list-resources:
+ long: list-resources
+ help: List the resources used by this render (YAML only)
+ - watch:
+ short: w
+ long: watch
+ help: Watch the given file, reloading whenever it changes (YAML only)
+ - api:
+ long: api
+ help: Reissue Api messages for each frame (binary recording only)
+ - skip-uploads:
+ long: skip-uploads
+ help: Skip re-uploads while reissuing Api messages (BROKEN)
+ - play:
+ long: play
+ help: Play entire recording through, then quit (useful with --save) (binary recording only)
+ - keyframes:
+ short: k
+ long: keyframes
+ takes_value: true
+ help: Provide a keyframes file, that can be used to animate the yaml input file
+ - scene-id:
+ short: s
+ long: scene-id
+ takes_value: true
+ help: Select a starting scene sequence ID (YAML capture sequence only).
+ - frame-id:
+ short: f
+ long: frame-id
+ takes_value: true
+ help: Select a starting frame sequence ID (YAML capture sequence only).
+ - INPUT:
+ help: The input YAML, binary recording, or capture directory
+ required: true
+ index: 1
+ - replay:
+ about: replay binary recording
+ args:
+ - INPUT:
+ help: The input binary file or directory
+ required: true
+ index: 1
+ - reftest:
+ about: run reftests
+ args:
+ - fuzz_tolerance:
+ long: fuzzy
+ takes_value: true
+ help: Add a minimum fuzziness tolerance to all tests.
+ required: false
+ - REFTEST:
+ help: a specific reftest or directory to run
+ required: false
+ index: 1
+ - rawtest:
+ about: run rawtests
+ - perf:
+ about: run benchmarks
+ args:
+ - filename:
+ help: name of the file to save benchmarks to
+ required: true
+ index: 1
+ - benchmark:
+ help: benchmark list filename (default is benchmarks/benchmarks.list)
+ required: false
+ index: 2
+ - auto-filename:
+ long: auto-filename
+ help: generate output filename from date and time (user provided filename is the directory prefix)
+ required: false
+ - csv:
+ long: csv
+ help: save benchmark results as .csv (default is json)
+ required: false
+ - warmup_frames:
+ long: warmup_frames
+ takes_value: true
+ help: number of frames to skip before recording timings
+ required: false
+ - sample_count:
+ long: sample_count
+ takes_value: true
+ help: number of samples to capture
+ - compare_perf:
+ about: compare two benchmark files
+ args:
+ - first_filename:
+ help: first benchmark file to compare
+ required: true
+ index: 1
+ - second_filename:
+ help: second benchmark file to compare
+ required: true
+ index: 2
diff --git a/third_party/webrender/wrench/src/blob.rs b/third_party/webrender/wrench/src/blob.rs
new file mode 100644
index 00000000000..a720d31323b
--- /dev/null
+++ b/third_party/webrender/wrench/src/blob.rs
@@ -0,0 +1,213 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// A very basic BlobImageRasterizer that can only render a checkerboard pattern.
+
+use std::collections::HashMap;
+use std::sync::Arc;
+use std::sync::Mutex;
+use webrender::api::*;
+use webrender::api::units::{BlobDirtyRect, BlobToDeviceTranslation, TileOffset};
+use webrender::api::units::DeviceIntRect;
+
+// Serialize/deserialize the blob.
+
+pub fn serialize_blob(color: ColorU) -> Arc<Vec<u8>> {
+ Arc::new(vec![color.r, color.g, color.b, color.a])
+}
+
+fn deserialize_blob(blob: &[u8]) -> Result<ColorU, ()> {
+ let mut iter = blob.iter();
+ return match (iter.next(), iter.next(), iter.next(), iter.next()) {
+ (Some(&r), Some(&g), Some(&b), Some(&a)) => Ok(ColorU::new(r, g, b, a)),
+ (Some(&a), None, None, None) => Ok(ColorU::new(a, a, a, a)),
+ _ => Err(()),
+ };
+}
+
+// perform floor((x * a) / 255. + 0.5) see "Three wrongs make a right" for derivation
+fn premul(x: u8, a: u8) -> u8 {
+ let t = (x as u32) * (a as u32) + 128;
+ ((t + (t >> 8)) >> 8) as u8
+}
+
+// This is the function that applies the deserialized drawing commands and generates
+// actual image data.
+fn render_blob(
+ color: ColorU,
+ descriptor: &BlobImageDescriptor,
+ tile: TileOffset,
+ _tile_size: TileSize,
+ dirty_rect: &BlobDirtyRect,
+) -> BlobImageResult {
+ // Allocate storage for the result. Right now the resource cache expects the
+ // tiles to have have no stride or offset.
+ let buf_size = descriptor.rect.size.area() *
+ descriptor.format.bytes_per_pixel();
+ let mut texels = vec![0u8; (buf_size) as usize];
+
+ // Generate a per-tile pattern to see it in the demo. For a real use case it would not
+ // make sense for the rendered content to depend on its tile.
+ let tile_checker = (tile.x % 2 == 0) != (tile.y % 2 == 0);
+
+ let dirty_rect = dirty_rect.to_subrect_of(&descriptor.rect);
+
+ // We want the dirty rect local to the tile rather than the whole image.
+ let tx: BlobToDeviceTranslation = (-descriptor.rect.origin.to_vector()).into();
+
+ let rasterized_rect = tx.transform_rect(&dirty_rect);
+
+ for y in rasterized_rect.min_y() .. rasterized_rect.max_y() {
+ for x in rasterized_rect.min_x() .. rasterized_rect.max_x() {
+ // Apply the tile's offset. This is important: all drawing commands should be
+ // translated by this offset to give correct results with tiled blob images.
+ let x2 = x + descriptor.rect.origin.x;
+ let y2 = y + descriptor.rect.origin.y;
+
+ // Render a simple checkerboard pattern
+ let checker = if (x2 % 20 >= 10) != (y2 % 20 >= 10) {
+ 1
+ } else {
+ 0
+ };
+ // ..nested in the per-tile checkerboard pattern
+ let tc = if tile_checker { 0 } else { (1 - checker) * 40 };
+
+ match descriptor.format {
+ ImageFormat::BGRA8 => {
+ let a = color.a * checker + tc;
+ let pixel_offset = ((y * descriptor.rect.size.width + x) * 4) as usize;
+ texels[pixel_offset + 0] = premul(color.b * checker + tc, a);
+ texels[pixel_offset + 1] = premul(color.g * checker + tc, a);
+ texels[pixel_offset + 2] = premul(color.r * checker + tc, a);
+ texels[pixel_offset + 3] = a;
+ }
+ ImageFormat::R8 => {
+ texels[(y * descriptor.rect.size.width + x) as usize] = color.a * checker + tc;
+ }
+ _ => {
+ return Err(BlobImageError::Other(
+ format!("Unsupported image format {:?}", descriptor.format),
+ ));
+ }
+ }
+ }
+ }
+
+ Ok(RasterizedBlobImage {
+ data: Arc::new(texels),
+ rasterized_rect,
+ })
+}
+
+/// See rawtest.rs. We use this to test that blob images are requested the right
+/// amount of times.
+pub struct BlobCallbacks {
+ pub request: Box<dyn Fn(&[BlobImageParams]) + Send + 'static>,
+}
+
+impl BlobCallbacks {
+ pub fn new() -> Self {
+ BlobCallbacks { request: Box::new(|_|()) }
+ }
+}
+
+pub struct CheckerboardRenderer {
+ image_cmds: HashMap<BlobImageKey, (ColorU, TileSize)>,
+ callbacks: Arc<Mutex<BlobCallbacks>>,
+}
+
+impl CheckerboardRenderer {
+ pub fn new(callbacks: Arc<Mutex<BlobCallbacks>>) -> Self {
+ CheckerboardRenderer {
+ callbacks,
+ image_cmds: HashMap::new(),
+ }
+ }
+}
+
+impl BlobImageHandler for CheckerboardRenderer {
+ fn create_similar(&self) -> Box<dyn BlobImageHandler> {
+ Box::new(CheckerboardRenderer::new(Arc::clone(&self.callbacks)))
+ }
+
+ fn add(&mut self, key: BlobImageKey, cmds: Arc<BlobImageData>,
+ _visible_rect: &DeviceIntRect, tile_size: TileSize) {
+ self.image_cmds
+ .insert(key, (deserialize_blob(&cmds[..]).unwrap(), tile_size));
+ }
+
+ fn update(&mut self, key: BlobImageKey, cmds: Arc<BlobImageData>,
+ _visible_rect: &DeviceIntRect, _dirty_rect: &BlobDirtyRect) {
+ // Here, updating is just replacing the current version of the commands with
+ // the new one (no incremental updates).
+ self.image_cmds.get_mut(&key).unwrap().0 = deserialize_blob(&cmds[..]).unwrap();
+ }
+
+ fn delete(&mut self, key: BlobImageKey) {
+ self.image_cmds.remove(&key);
+ }
+
+ fn delete_font(&mut self, _key: FontKey) {}
+
+ fn delete_font_instance(&mut self, _key: FontInstanceKey) {}
+
+ fn clear_namespace(&mut self, _namespace: IdNamespace) {}
+
+ fn prepare_resources(
+ &mut self,
+ _services: &dyn BlobImageResources,
+ requests: &[BlobImageParams],
+ ) {
+ if !requests.is_empty() {
+ (self.callbacks.lock().unwrap().request)(&requests);
+ }
+ }
+
+ fn create_blob_rasterizer(&mut self) -> Box<dyn AsyncBlobImageRasterizer> {
+ Box::new(Rasterizer { image_cmds: self.image_cmds.clone() })
+ }
+
+ fn enable_multithreading(&mut self, _enable: bool) {}
+}
+
+struct Command {
+ request: BlobImageRequest,
+ color: ColorU,
+ descriptor: BlobImageDescriptor,
+ tile: TileOffset,
+ tile_size: TileSize,
+ dirty_rect: BlobDirtyRect,
+}
+
+struct Rasterizer {
+ image_cmds: HashMap<BlobImageKey, (ColorU, TileSize)>,
+}
+
+impl AsyncBlobImageRasterizer for Rasterizer {
+ fn rasterize(
+ &mut self,
+ requests: &[BlobImageParams],
+ _low_priority: bool
+ ) -> Vec<(BlobImageRequest, BlobImageResult)> {
+ let requests: Vec<Command> = requests.into_iter().map(
+ |item| {
+ let (color, tile_size) = self.image_cmds[&item.request.key];
+
+ Command {
+ request: item.request,
+ color,
+ tile_size,
+ tile: item.request.tile,
+ descriptor: item.descriptor,
+ dirty_rect: item.dirty_rect,
+ }
+ }
+ ).collect();
+
+ requests.iter().map(|cmd| {
+ (cmd.request, render_blob(cmd.color, &cmd.descriptor, cmd.tile, cmd.tile_size, &cmd.dirty_rect))
+ }).collect()
+ }
+}
diff --git a/third_party/webrender/wrench/src/egl.rs b/third_party/webrender/wrench/src/egl.rs
new file mode 100644
index 00000000000..4508646b452
--- /dev/null
+++ b/third_party/webrender/wrench/src/egl.rs
@@ -0,0 +1,611 @@
+// Licensed under the Apache License, Version 2.0.
+// This file may not be copied, modified, or distributed except according to those terms.
+
+//! Based on https://github.com/tomaka/glutin/blob/1b2d62c0e9/src/api/egl/mod.rs
+#![cfg(windows)]
+#![allow(unused_variables)]
+
+use glutin::ContextError;
+use glutin::CreationError;
+use glutin::GlAttributes;
+use glutin::GlRequest;
+use glutin::PixelFormat;
+use glutin::PixelFormatRequirements;
+use glutin::ReleaseBehavior;
+use glutin::Robustness;
+use glutin::Api;
+
+use std::ffi::{CStr, CString};
+use std::os::raw::c_int;
+use std::ptr;
+use std::cell::Cell;
+
+use mozangle::egl::ffi as egl;
+mod ffi {
+ pub use mozangle::egl::ffi as egl;
+ pub use mozangle::egl::ffi::*;
+}
+
+pub struct Context {
+ display: ffi::egl::types::EGLDisplay,
+ context: ffi::egl::types::EGLContext,
+ surface: Cell<ffi::egl::types::EGLSurface>,
+ api: Api,
+ pixel_format: PixelFormat,
+}
+
+impl Context {
+ /// Start building an EGL context.
+ ///
+ /// This function initializes some things and chooses the pixel format.
+ ///
+ /// To finish the process, you must call `.finish(window)` on the `ContextPrototype`.
+ pub fn new<'a>(
+ pf_reqs: &PixelFormatRequirements,
+ opengl: &'a GlAttributes<&'a Context>,
+ ) -> Result<ContextPrototype<'a>, CreationError>
+ {
+ if opengl.sharing.is_some() {
+ unimplemented!()
+ }
+
+ // calling `eglGetDisplay` or equivalent
+ let display = unsafe { egl::GetDisplay(ptr::null_mut()) };
+
+ if display.is_null() {
+ return Err(CreationError::PlatformSpecific("Could not create EGL display object".to_string()));
+ }
+
+ let egl_version = unsafe {
+ let mut major: ffi::egl::types::EGLint = 0; // out param
+ let mut minor: ffi::egl::types::EGLint = 0; // out param
+
+ if egl::Initialize(display, &mut major, &mut minor) == 0 {
+ return Err(CreationError::OsError(format!("eglInitialize failed")))
+ }
+
+ (major, minor)
+ };
+
+ // the list of extensions supported by the client once initialized is different from the
+ // list of extensions obtained earlier
+ let extensions = if egl_version >= (1, 2) {
+ let p = unsafe { CStr::from_ptr(egl::QueryString(display, ffi::egl::EXTENSIONS as i32)) };
+ let list = String::from_utf8(p.to_bytes().to_vec()).unwrap_or_else(|_| format!(""));
+ list.split(' ').map(|e| e.to_string()).collect::<Vec<_>>()
+
+ } else {
+ vec![]
+ };
+
+ // binding the right API and choosing the version
+ let (version, api) = unsafe {
+ match opengl.version {
+ GlRequest::Latest => {
+ if egl_version >= (1, 4) {
+ if egl::BindAPI(ffi::egl::OPENGL_API) != 0 {
+ (None, Api::OpenGl)
+ } else if egl::BindAPI(ffi::egl::OPENGL_ES_API) != 0 {
+ (None, Api::OpenGlEs)
+ } else {
+ return Err(CreationError::OpenGlVersionNotSupported);
+ }
+ } else {
+ (None, Api::OpenGlEs)
+ }
+ },
+ GlRequest::Specific(Api::OpenGlEs, version) => {
+ if egl_version >= (1, 2) {
+ if egl::BindAPI(ffi::egl::OPENGL_ES_API) == 0 {
+ return Err(CreationError::OpenGlVersionNotSupported);
+ }
+ }
+ (Some(version), Api::OpenGlEs)
+ },
+ GlRequest::Specific(Api::OpenGl, version) => {
+ if egl_version < (1, 4) {
+ return Err(CreationError::OpenGlVersionNotSupported);
+ }
+ if egl::BindAPI(ffi::egl::OPENGL_API) == 0 {
+ return Err(CreationError::OpenGlVersionNotSupported);
+ }
+ (Some(version), Api::OpenGl)
+ },
+ GlRequest::Specific(_, _) => return Err(CreationError::OpenGlVersionNotSupported),
+ GlRequest::GlThenGles { opengles_version, opengl_version } => {
+ if egl_version >= (1, 4) {
+ if egl::BindAPI(ffi::egl::OPENGL_API) != 0 {
+ (Some(opengl_version), Api::OpenGl)
+ } else if egl::BindAPI(ffi::egl::OPENGL_ES_API) != 0 {
+ (Some(opengles_version), Api::OpenGlEs)
+ } else {
+ return Err(CreationError::OpenGlVersionNotSupported);
+ }
+ } else {
+ (Some(opengles_version), Api::OpenGlEs)
+ }
+ },
+ }
+ };
+
+ let (config_id, pixel_format) = unsafe {
+ choose_fbconfig(display, &egl_version, api, version, pf_reqs)?
+ };
+
+ Ok(ContextPrototype {
+ opengl: opengl,
+ display: display,
+ egl_version: egl_version,
+ extensions: extensions,
+ api: api,
+ version: version,
+ config_id: config_id,
+ pixel_format: pixel_format,
+ })
+ }
+
+ #[inline]
+ pub fn swap_buffers(&self) -> Result<(), ContextError> {
+ if self.surface.get() == ffi::egl::NO_SURFACE {
+ return Err(ContextError::ContextLost);
+ }
+
+ let ret = unsafe {
+ egl::SwapBuffers(self.display, self.surface.get())
+ };
+
+ if ret == 0 {
+ match unsafe { egl::GetError() } as u32 {
+ ffi::egl::CONTEXT_LOST => return Err(ContextError::ContextLost),
+ err => panic!("eglSwapBuffers failed (eglGetError returned 0x{:x})", err)
+ }
+
+ } else {
+ Ok(())
+ }
+ }
+
+ pub unsafe fn make_current(&self) -> Result<(), ContextError> {
+ let ret = egl::MakeCurrent(self.display, self.surface.get(), self.surface.get(), self.context);
+
+ if ret == 0 {
+ match egl::GetError() as u32 {
+ ffi::egl::CONTEXT_LOST => return Err(ContextError::ContextLost),
+ err => panic!("eglMakeCurrent failed (eglGetError returned 0x{:x})", err)
+ }
+
+ } else {
+ Ok(())
+ }
+ }
+
+ #[inline]
+ pub fn is_current(&self) -> bool {
+ unsafe { egl::GetCurrentContext() == self.context }
+ }
+
+ pub fn get_proc_address(&self, addr: &str) -> *const () {
+ let addr = CString::new(addr.as_bytes()).unwrap();
+ let addr = addr.as_ptr();
+ unsafe {
+ egl::GetProcAddress(addr) as *const _
+ }
+ }
+
+ #[inline]
+ pub fn get_api(&self) -> Api {
+ self.api
+ }
+
+ #[inline]
+ pub fn get_pixel_format(&self) -> PixelFormat {
+ self.pixel_format.clone()
+ }
+}
+
+unsafe impl Send for Context {}
+unsafe impl Sync for Context {}
+
+impl Drop for Context {
+ fn drop(&mut self) {
+ unsafe {
+ // we don't call MakeCurrent(0, 0) because we are not sure that the context
+ // is still the current one
+ egl::DestroyContext(self.display, self.context);
+ egl::DestroySurface(self.display, self.surface.get());
+ egl::Terminate(self.display);
+ }
+ }
+}
+
+pub struct ContextPrototype<'a> {
+ opengl: &'a GlAttributes<&'a Context>,
+ display: ffi::egl::types::EGLDisplay,
+ egl_version: (ffi::egl::types::EGLint, ffi::egl::types::EGLint),
+ extensions: Vec<String>,
+ api: Api,
+ version: Option<(u8, u8)>,
+ config_id: ffi::egl::types::EGLConfig,
+ pixel_format: PixelFormat,
+}
+
+impl<'a> ContextPrototype<'a> {
+ pub fn get_native_visual_id(&self) -> ffi::egl::types::EGLint {
+ let mut value = 0;
+ let ret = unsafe { egl::GetConfigAttrib(self.display, self.config_id,
+ ffi::egl::NATIVE_VISUAL_ID
+ as ffi::egl::types::EGLint, &mut value) };
+ if ret == 0 { panic!("eglGetConfigAttrib failed") };
+ value
+ }
+
+ pub fn finish(self, native_window: ffi::EGLNativeWindowType)
+ -> Result<Context, CreationError>
+ {
+ let surface = unsafe {
+ let surface = egl::CreateWindowSurface(self.display, self.config_id, native_window,
+ ptr::null());
+ if surface.is_null() {
+ return Err(CreationError::OsError(format!("eglCreateWindowSurface failed")))
+ }
+ surface
+ };
+
+ self.finish_impl(surface)
+ }
+
+ pub fn finish_pbuffer(self, dimensions: (u32, u32)) -> Result<Context, CreationError> {
+ let attrs = &[
+ ffi::egl::WIDTH as c_int, dimensions.0 as c_int,
+ ffi::egl::HEIGHT as c_int, dimensions.1 as c_int,
+ ffi::egl::NONE as c_int,
+ ];
+
+ let surface = unsafe {
+ let surface = egl::CreatePbufferSurface(self.display, self.config_id,
+ attrs.as_ptr());
+ if surface.is_null() {
+ return Err(CreationError::OsError(format!("eglCreatePbufferSurface failed")))
+ }
+ surface
+ };
+
+ self.finish_impl(surface)
+ }
+
+ fn finish_impl(self, surface: ffi::egl::types::EGLSurface)
+ -> Result<Context, CreationError>
+ {
+ let context = unsafe {
+ if let Some(version) = self.version {
+ create_context(self.display, &self.egl_version,
+ &self.extensions, self.api, version, self.config_id,
+ self.opengl.debug, self.opengl.robustness)?
+
+ } else if self.api == Api::OpenGlEs {
+ if let Ok(ctxt) = create_context(self.display, &self.egl_version,
+ &self.extensions, self.api, (2, 0), self.config_id,
+ self.opengl.debug, self.opengl.robustness)
+ {
+ ctxt
+ } else if let Ok(ctxt) = create_context(self.display, &self.egl_version,
+ &self.extensions, self.api, (1, 0),
+ self.config_id, self.opengl.debug,
+ self.opengl.robustness)
+ {
+ ctxt
+ } else {
+ return Err(CreationError::OpenGlVersionNotSupported);
+ }
+
+ } else {
+ if let Ok(ctxt) = create_context(self.display, &self.egl_version,
+ &self.extensions, self.api, (3, 2), self.config_id,
+ self.opengl.debug, self.opengl.robustness)
+ {
+ ctxt
+ } else if let Ok(ctxt) = create_context(self.display, &self.egl_version,
+ &self.extensions, self.api, (3, 1),
+ self.config_id, self.opengl.debug,
+ self.opengl.robustness)
+ {
+ ctxt
+ } else if let Ok(ctxt) = create_context(self.display, &self.egl_version,
+ &self.extensions, self.api, (1, 0),
+ self.config_id, self.opengl.debug,
+ self.opengl.robustness)
+ {
+ ctxt
+ } else {
+ return Err(CreationError::OpenGlVersionNotSupported);
+ }
+ }
+ };
+
+ Ok(Context {
+ display: self.display,
+ context: context,
+ surface: Cell::new(surface),
+ api: self.api,
+ pixel_format: self.pixel_format,
+ })
+ }
+}
+
+unsafe fn choose_fbconfig(display: ffi::egl::types::EGLDisplay,
+ egl_version: &(ffi::egl::types::EGLint, ffi::egl::types::EGLint),
+ api: Api, version: Option<(u8, u8)>, reqs: &PixelFormatRequirements)
+ -> Result<(ffi::egl::types::EGLConfig, PixelFormat), CreationError>
+{
+ let descriptor = {
+ let mut out: Vec<c_int> = Vec::with_capacity(37);
+
+ if egl_version >= &(1, 2) {
+ out.push(ffi::egl::COLOR_BUFFER_TYPE as c_int);
+ out.push(ffi::egl::RGB_BUFFER as c_int);
+ }
+
+ out.push(ffi::egl::SURFACE_TYPE as c_int);
+ // TODO: Some versions of Mesa report a BAD_ATTRIBUTE error
+ // if we ask for PBUFFER_BIT as well as WINDOW_BIT
+ out.push((ffi::egl::WINDOW_BIT) as c_int);
+
+ match (api, version) {
+ (Api::OpenGlEs, Some((3, _))) => {
+ if egl_version < &(1, 3) { return Err(CreationError::NoAvailablePixelFormat); }
+ out.push(ffi::egl::RENDERABLE_TYPE as c_int);
+ out.push(ffi::egl::OPENGL_ES3_BIT as c_int);
+ out.push(ffi::egl::CONFORMANT as c_int);
+ out.push(ffi::egl::OPENGL_ES3_BIT as c_int);
+ },
+ (Api::OpenGlEs, Some((2, _))) => {
+ if egl_version < &(1, 3) { return Err(CreationError::NoAvailablePixelFormat); }
+ out.push(ffi::egl::RENDERABLE_TYPE as c_int);
+ out.push(ffi::egl::OPENGL_ES2_BIT as c_int);
+ out.push(ffi::egl::CONFORMANT as c_int);
+ out.push(ffi::egl::OPENGL_ES2_BIT as c_int);
+ },
+ (Api::OpenGlEs, Some((1, _))) => {
+ if egl_version >= &(1, 3) {
+ out.push(ffi::egl::RENDERABLE_TYPE as c_int);
+ out.push(ffi::egl::OPENGL_ES_BIT as c_int);
+ out.push(ffi::egl::CONFORMANT as c_int);
+ out.push(ffi::egl::OPENGL_ES_BIT as c_int);
+ }
+ },
+ (Api::OpenGlEs, _) => unimplemented!(),
+ (Api::OpenGl, _) => {
+ if egl_version < &(1, 3) { return Err(CreationError::NoAvailablePixelFormat); }
+ out.push(ffi::egl::RENDERABLE_TYPE as c_int);
+ out.push(ffi::egl::OPENGL_BIT as c_int);
+ out.push(ffi::egl::CONFORMANT as c_int);
+ out.push(ffi::egl::OPENGL_BIT as c_int);
+ },
+ (_, _) => unimplemented!(),
+ };
+
+ if let Some(hardware_accelerated) = reqs.hardware_accelerated {
+ out.push(ffi::egl::CONFIG_CAVEAT as c_int);
+ out.push(if hardware_accelerated {
+ ffi::egl::NONE as c_int
+ } else {
+ ffi::egl::SLOW_CONFIG as c_int
+ });
+ }
+
+ if let Some(color) = reqs.color_bits {
+ out.push(ffi::egl::RED_SIZE as c_int);
+ out.push((color / 3) as c_int);
+ out.push(ffi::egl::GREEN_SIZE as c_int);
+ out.push((color / 3 + if color % 3 != 0 { 1 } else { 0 }) as c_int);
+ out.push(ffi::egl::BLUE_SIZE as c_int);
+ out.push((color / 3 + if color % 3 == 2 { 1 } else { 0 }) as c_int);
+ }
+
+ if let Some(alpha) = reqs.alpha_bits {
+ out.push(ffi::egl::ALPHA_SIZE as c_int);
+ out.push(alpha as c_int);
+ }
+
+ if let Some(depth) = reqs.depth_bits {
+ out.push(ffi::egl::DEPTH_SIZE as c_int);
+ out.push(depth as c_int);
+ }
+
+ if let Some(stencil) = reqs.stencil_bits {
+ out.push(ffi::egl::STENCIL_SIZE as c_int);
+ out.push(stencil as c_int);
+ }
+
+ if let Some(true) = reqs.double_buffer {
+ return Err(CreationError::NoAvailablePixelFormat);
+ }
+
+ if let Some(multisampling) = reqs.multisampling {
+ out.push(ffi::egl::SAMPLES as c_int);
+ out.push(multisampling as c_int);
+ }
+
+ if reqs.stereoscopy {
+ return Err(CreationError::NoAvailablePixelFormat);
+ }
+
+ // FIXME: srgb is not taken into account
+
+ match reqs.release_behavior {
+ ReleaseBehavior::Flush => (),
+ ReleaseBehavior::None => {
+ // TODO: with EGL you need to manually set the behavior
+ unimplemented!()
+ },
+ }
+
+ out.push(ffi::egl::NONE as c_int);
+ out
+ };
+
+ // calling `eglChooseConfig`
+ let mut config_id = ptr::null(); // out param
+ let mut num_configs = 0; // out param
+ if egl::ChooseConfig(display, descriptor.as_ptr(), &mut config_id, 1, &mut num_configs) == 0 {
+ return Err(CreationError::OsError(format!("eglChooseConfig failed")));
+ }
+ if num_configs == 0 {
+ return Err(CreationError::NoAvailablePixelFormat);
+ }
+
+ // analyzing each config
+ macro_rules! attrib {
+ ($display:expr, $config:expr, $attr:expr) => (
+ {
+ let mut value = 0; // out param
+ let res = egl::GetConfigAttrib($display, $config,
+ $attr as ffi::egl::types::EGLint, &mut value);
+ if res == 0 {
+ return Err(CreationError::OsError(format!("eglGetConfigAttrib failed")));
+ }
+ value
+ }
+ )
+ };
+
+ let desc = PixelFormat {
+ hardware_accelerated: attrib!(display, config_id, ffi::egl::CONFIG_CAVEAT)
+ != ffi::egl::SLOW_CONFIG as i32,
+ color_bits: attrib!(display, config_id, ffi::egl::RED_SIZE) as u8 +
+ attrib!(display, config_id, ffi::egl::BLUE_SIZE) as u8 +
+ attrib!(display, config_id, ffi::egl::GREEN_SIZE) as u8,
+ alpha_bits: attrib!(display, config_id, ffi::egl::ALPHA_SIZE) as u8,
+ depth_bits: attrib!(display, config_id, ffi::egl::DEPTH_SIZE) as u8,
+ stencil_bits: attrib!(display, config_id, ffi::egl::STENCIL_SIZE) as u8,
+ stereoscopy: false,
+ double_buffer: true,
+ multisampling: match attrib!(display, config_id, ffi::egl::SAMPLES) {
+ 0 | 1 => None,
+ a => Some(a as u16),
+ },
+ srgb: false, // TODO: use EGL_KHR_gl_colorspace to know that
+ };
+
+ Ok((config_id, desc))
+}
+
+unsafe fn create_context(display: ffi::egl::types::EGLDisplay,
+ egl_version: &(ffi::egl::types::EGLint, ffi::egl::types::EGLint),
+ extensions: &[String], api: Api, version: (u8, u8),
+ config_id: ffi::egl::types::EGLConfig, gl_debug: bool,
+ gl_robustness: Robustness)
+ -> Result<ffi::egl::types::EGLContext, CreationError>
+{
+ let mut context_attributes = Vec::with_capacity(10);
+ let mut flags = 0;
+
+ if egl_version >= &(1, 5) || extensions.iter().find(|s| s == &"EGL_KHR_create_context")
+ .is_some()
+ {
+ context_attributes.push(ffi::egl::CONTEXT_MAJOR_VERSION as i32);
+ context_attributes.push(version.0 as i32);
+ context_attributes.push(ffi::egl::CONTEXT_MINOR_VERSION as i32);
+ context_attributes.push(version.1 as i32);
+
+ // handling robustness
+ let supports_robustness = egl_version >= &(1, 5) ||
+ extensions.iter()
+ .find(|s| s == &"EGL_EXT_create_context_robustness")
+ .is_some();
+
+ match gl_robustness {
+ Robustness::NotRobust => (),
+
+ Robustness::NoError => {
+ if extensions.iter().find(|s| s == &"EGL_KHR_create_context_no_error").is_some() {
+ context_attributes.push(ffi::egl::CONTEXT_OPENGL_NO_ERROR_KHR as c_int);
+ context_attributes.push(1);
+ }
+ },
+
+ Robustness::RobustNoResetNotification => {
+ if supports_robustness {
+ context_attributes.push(ffi::egl::CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY
+ as c_int);
+ context_attributes.push(ffi::egl::NO_RESET_NOTIFICATION as c_int);
+ flags = flags | ffi::egl::CONTEXT_OPENGL_ROBUST_ACCESS as c_int;
+ } else {
+ return Err(CreationError::RobustnessNotSupported);
+ }
+ },
+
+ Robustness::TryRobustNoResetNotification => {
+ if supports_robustness {
+ context_attributes.push(ffi::egl::CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY
+ as c_int);
+ context_attributes.push(ffi::egl::NO_RESET_NOTIFICATION as c_int);
+ flags = flags | ffi::egl::CONTEXT_OPENGL_ROBUST_ACCESS as c_int;
+ }
+ },
+
+ Robustness::RobustLoseContextOnReset => {
+ if supports_robustness {
+ context_attributes.push(ffi::egl::CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY
+ as c_int);
+ context_attributes.push(ffi::egl::LOSE_CONTEXT_ON_RESET as c_int);
+ flags = flags | ffi::egl::CONTEXT_OPENGL_ROBUST_ACCESS as c_int;
+ } else {
+ return Err(CreationError::RobustnessNotSupported);
+ }
+ },
+
+ Robustness::TryRobustLoseContextOnReset => {
+ if supports_robustness {
+ context_attributes.push(ffi::egl::CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY
+ as c_int);
+ context_attributes.push(ffi::egl::LOSE_CONTEXT_ON_RESET as c_int);
+ flags = flags | ffi::egl::CONTEXT_OPENGL_ROBUST_ACCESS as c_int;
+ }
+ },
+ }
+
+ if gl_debug {
+ if egl_version >= &(1, 5) {
+ context_attributes.push(ffi::egl::CONTEXT_OPENGL_DEBUG as i32);
+ context_attributes.push(ffi::egl::TRUE as i32);
+ }
+
+ // TODO: using this flag sometimes generates an error
+ // there was a change in the specs that added this flag, so it may not be
+ // supported everywhere ; however it is not possible to know whether it is
+ // supported or not
+ //flags = flags | ffi::egl::CONTEXT_OPENGL_DEBUG_BIT_KHR as i32;
+ }
+
+ context_attributes.push(ffi::egl::CONTEXT_FLAGS_KHR as i32);
+ context_attributes.push(flags);
+
+ } else if egl_version >= &(1, 3) && api == Api::OpenGlEs {
+ // robustness is not supported
+ match gl_robustness {
+ Robustness::RobustNoResetNotification | Robustness::RobustLoseContextOnReset => {
+ return Err(CreationError::RobustnessNotSupported);
+ },
+ _ => ()
+ }
+
+ context_attributes.push(ffi::egl::CONTEXT_CLIENT_VERSION as i32);
+ context_attributes.push(version.0 as i32);
+ }
+
+ context_attributes.push(ffi::egl::NONE as i32);
+
+ let context = egl::CreateContext(display, config_id, ptr::null(),
+ context_attributes.as_ptr());
+
+ if context.is_null() {
+ match egl::GetError() as u32 {
+ ffi::egl::BAD_ATTRIBUTE => return Err(CreationError::OpenGlVersionNotSupported),
+ e => panic!("eglCreateContext failed: 0x{:x}", e),
+ }
+ }
+
+ Ok(context)
+}
+
diff --git a/third_party/webrender/wrench/src/main.rs b/third_party/webrender/wrench/src/main.rs
new file mode 100644
index 00000000000..9a7dd3bcfea
--- /dev/null
+++ b/third_party/webrender/wrench/src/main.rs
@@ -0,0 +1,1056 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#[macro_use]
+extern crate clap;
+#[macro_use]
+extern crate log;
+#[macro_use]
+extern crate serde;
+
+mod angle;
+mod blob;
+mod egl;
+mod parse_function;
+mod perf;
+mod png;
+mod premultiply;
+mod rawtest;
+mod reftest;
+mod wrench;
+mod yaml_frame_reader;
+mod yaml_helper;
+
+use gleam::gl;
+#[cfg(feature = "software")]
+use gleam::gl::Gl;
+use crate::perf::PerfHarness;
+use crate::png::save_flipped;
+use crate::rawtest::RawtestHarness;
+use crate::reftest::{ReftestHarness, ReftestOptions};
+use std::fs;
+#[cfg(feature = "headless")]
+use std::ffi::CString;
+#[cfg(feature = "headless")]
+use std::mem;
+use std::os::raw::c_void;
+use std::path::{Path, PathBuf};
+use std::process;
+use std::ptr;
+use std::rc::Rc;
+#[cfg(feature = "software")]
+use std::slice;
+use std::sync::mpsc::{channel, Sender, Receiver};
+use webrender::DebugFlags;
+use webrender::api::*;
+use webrender::api::units::*;
+use winit::dpi::{LogicalPosition, LogicalSize};
+use winit::VirtualKeyCode;
+use crate::wrench::{CapturedSequence, Wrench, WrenchThing};
+use crate::yaml_frame_reader::YamlFrameReader;
+
+pub const PLATFORM_DEFAULT_FACE_NAME: &str = "Arial";
+
+pub static mut CURRENT_FRAME_NUMBER: u32 = 0;
+
+#[cfg(feature = "headless")]
+pub struct HeadlessContext {
+ width: i32,
+ height: i32,
+ _context: osmesa_sys::OSMesaContext,
+ _buffer: Vec<u32>,
+}
+
+#[cfg(not(feature = "headless"))]
+pub struct HeadlessContext {
+ width: i32,
+ height: i32,
+}
+
+impl HeadlessContext {
+ #[cfg(feature = "headless")]
+ fn new(width: i32, height: i32) -> Self {
+ let mut attribs = Vec::new();
+
+ attribs.push(osmesa_sys::OSMESA_PROFILE);
+ attribs.push(osmesa_sys::OSMESA_CORE_PROFILE);
+ attribs.push(osmesa_sys::OSMESA_CONTEXT_MAJOR_VERSION);
+ attribs.push(3);
+ attribs.push(osmesa_sys::OSMESA_CONTEXT_MINOR_VERSION);
+ attribs.push(3);
+ attribs.push(osmesa_sys::OSMESA_DEPTH_BITS);
+ attribs.push(24);
+ attribs.push(0);
+
+ let context =
+ unsafe { osmesa_sys::OSMesaCreateContextAttribs(attribs.as_ptr(), ptr::null_mut()) };
+
+ assert!(!context.is_null());
+
+ let mut buffer = vec![0; (width * height) as usize];
+
+ unsafe {
+ let ret = osmesa_sys::OSMesaMakeCurrent(
+ context,
+ buffer.as_mut_ptr() as *mut _,
+ gl::UNSIGNED_BYTE,
+ width,
+ height,
+ );
+ assert!(ret != 0);
+ };
+
+ HeadlessContext {
+ width,
+ height,
+ _context: context,
+ _buffer: buffer,
+ }
+ }
+
+ #[cfg(not(feature = "headless"))]
+ fn new(width: i32, height: i32) -> Self {
+ HeadlessContext { width, height }
+ }
+
+ #[cfg(feature = "headless")]
+ fn get_proc_address(s: &str) -> *const c_void {
+ let c_str = CString::new(s).expect("Unable to create CString");
+ unsafe { mem::transmute(osmesa_sys::OSMesaGetProcAddress(c_str.as_ptr())) }
+ }
+
+ #[cfg(not(feature = "headless"))]
+ fn get_proc_address(_: &str) -> *const c_void {
+ ptr::null() as *const _
+ }
+}
+
+#[cfg(not(feature = "software"))]
+mod swgl {
+ pub struct Context;
+}
+
+pub enum WindowWrapper {
+ WindowedContext(glutin::WindowedContext<glutin::PossiblyCurrent>, Rc<dyn gl::Gl>, Option<swgl::Context>),
+ Angle(winit::Window, angle::Context, Rc<dyn gl::Gl>, Option<swgl::Context>),
+ Headless(HeadlessContext, Rc<dyn gl::Gl>, Option<swgl::Context>),
+}
+
+pub struct HeadlessEventIterater;
+
+impl WindowWrapper {
+ #[cfg(feature = "software")]
+ fn upload_software_to_native(&self) {
+ match *self {
+ WindowWrapper::Headless(..) => return,
+ _ => {}
+ }
+ let swgl = match self.software_gl() {
+ Some(swgl) => swgl,
+ None => return,
+ };
+ swgl.finish();
+ let gl = self.native_gl();
+ let tex = gl.gen_textures(1)[0];
+ gl.bind_texture(gl::TEXTURE_2D, tex);
+ let (data_ptr, w, h) = swgl.get_color_buffer(0, true);
+ let buffer = unsafe { slice::from_raw_parts(data_ptr as *const u8, w as usize * h as usize * 4) };
+ gl.tex_image_2d(gl::TEXTURE_2D, 0, gl::RGBA8 as gl::GLint, w, h, 0, gl::BGRA, gl::UNSIGNED_BYTE, Some(buffer));
+ let fb = gl.gen_framebuffers(1)[0];
+ gl.bind_framebuffer(gl::READ_FRAMEBUFFER, fb);
+ gl.framebuffer_texture_2d(gl::READ_FRAMEBUFFER, gl::COLOR_ATTACHMENT0, gl::TEXTURE_2D, tex, 0);
+ gl.blit_framebuffer(0, 0, w, h, 0, 0, w, h, gl::COLOR_BUFFER_BIT, gl::NEAREST);
+ gl.delete_framebuffers(&[fb]);
+ gl.delete_textures(&[tex]);
+ gl.finish();
+ }
+
+ #[cfg(not(feature = "software"))]
+ fn upload_software_to_native(&self) {
+ }
+
+ fn swap_buffers(&self) {
+ match *self {
+ WindowWrapper::WindowedContext(ref windowed_context, _, _) => {
+ windowed_context.swap_buffers().unwrap()
+ }
+ WindowWrapper::Angle(_, ref context, _, _) => context.swap_buffers().unwrap(),
+ WindowWrapper::Headless(_, _, _) => {}
+ }
+ }
+
+ fn get_inner_size(&self) -> DeviceIntSize {
+ fn inner_size(window: &winit::Window) -> DeviceIntSize {
+ let size = window
+ .get_inner_size()
+ .unwrap()
+ .to_physical(window.get_hidpi_factor());
+ DeviceIntSize::new(size.width as i32, size.height as i32)
+ }
+ match *self {
+ WindowWrapper::WindowedContext(ref windowed_context, ..) => {
+ inner_size(windowed_context.window())
+ }
+ WindowWrapper::Angle(ref window, ..) => inner_size(window),
+ WindowWrapper::Headless(ref context, ..) => DeviceIntSize::new(context.width, context.height),
+ }
+ }
+
+ fn hidpi_factor(&self) -> f32 {
+ match *self {
+ WindowWrapper::WindowedContext(ref windowed_context, ..) => {
+ windowed_context.window().get_hidpi_factor() as f32
+ }
+ WindowWrapper::Angle(ref window, ..) => window.get_hidpi_factor() as f32,
+ WindowWrapper::Headless(..) => 1.0,
+ }
+ }
+
+ fn resize(&mut self, size: DeviceIntSize) {
+ match *self {
+ WindowWrapper::WindowedContext(ref mut windowed_context, ..) => {
+ windowed_context.window()
+ .set_inner_size(LogicalSize::new(size.width as f64, size.height as f64))
+ },
+ WindowWrapper::Angle(ref mut window, ..) => {
+ window.set_inner_size(LogicalSize::new(size.width as f64, size.height as f64))
+ },
+ WindowWrapper::Headless(..) => unimplemented!(), // requites Glutin update
+ }
+ }
+
+ fn set_title(&mut self, title: &str) {
+ match *self {
+ WindowWrapper::WindowedContext(ref windowed_context, ..) => {
+ windowed_context.window().set_title(title)
+ }
+ WindowWrapper::Angle(ref window, ..) => window.set_title(title),
+ WindowWrapper::Headless(..) => (),
+ }
+ }
+
+ pub fn software_gl(&self) -> Option<&swgl::Context> {
+ match *self {
+ WindowWrapper::WindowedContext(_, _, ref swgl) |
+ WindowWrapper::Angle(_, _, _, ref swgl) |
+ WindowWrapper::Headless(_, _, ref swgl) => swgl.as_ref(),
+ }
+ }
+
+ pub fn native_gl(&self) -> &dyn gl::Gl {
+ match *self {
+ WindowWrapper::WindowedContext(_, ref gl, _) |
+ WindowWrapper::Angle(_, _, ref gl, _) |
+ WindowWrapper::Headless(_, ref gl, _) => &**gl,
+ }
+ }
+
+ #[cfg(feature = "software")]
+ pub fn gl(&self) -> &dyn gl::Gl {
+ if let Some(swgl) = self.software_gl() {
+ swgl
+ } else {
+ self.native_gl()
+ }
+ }
+
+ pub fn is_software(&self) -> bool {
+ self.software_gl().is_some()
+ }
+
+ #[cfg(not(feature = "software"))]
+ pub fn gl(&self) -> &dyn gl::Gl {
+ self.native_gl()
+ }
+
+ pub fn clone_gl(&self) -> Rc<dyn gl::Gl> {
+ match *self {
+ WindowWrapper::WindowedContext(_, ref gl, ref swgl) |
+ WindowWrapper::Angle(_, _, ref gl, ref swgl) |
+ WindowWrapper::Headless(_, ref gl, ref swgl) => {
+ match swgl {
+ #[cfg(feature = "software")]
+ Some(ref swgl) => Rc::new(swgl.clone()),
+ None => gl.clone(),
+ #[cfg(not(feature = "software"))]
+ _ => panic!(),
+ }
+ }
+ }
+ }
+
+
+ #[cfg(feature = "software")]
+ fn update_software(&self, dim: DeviceIntSize) {
+ if let Some(swgl) = self.software_gl() {
+ swgl.init_default_framebuffer(dim.width, dim.height);
+ }
+ }
+
+ #[cfg(not(feature = "software"))]
+ fn update_software(&self, _dim: DeviceIntSize) {
+ }
+
+ fn update(&self, wrench: &mut Wrench) {
+ let dim = self.get_inner_size();
+ self.update_software(dim);
+ wrench.update(dim);
+ }
+}
+
+#[cfg(feature = "software")]
+fn make_software_context() -> Option<swgl::Context> {
+ let ctx = swgl::Context::create();
+ ctx.make_current();
+ Some(ctx)
+}
+
+#[cfg(not(feature = "software"))]
+fn make_software_context() -> Option<swgl::Context> {
+ None
+}
+
+fn make_window(
+ size: DeviceIntSize,
+ dp_ratio: Option<f32>,
+ vsync: bool,
+ events_loop: &Option<winit::EventsLoop>,
+ angle: bool,
+ gl_request: glutin::GlRequest,
+ software: bool,
+) -> WindowWrapper {
+ let sw_ctx = if software {
+ make_software_context()
+ } else {
+ None
+ };
+
+ let wrapper = match *events_loop {
+ Some(ref events_loop) => {
+ let context_builder = glutin::ContextBuilder::new()
+ .with_gl(gl_request)
+ .with_vsync(vsync);
+ let window_builder = winit::WindowBuilder::new()
+ .with_title("WRench")
+ .with_multitouch()
+ .with_dimensions(LogicalSize::new(size.width as f64, size.height as f64));
+
+ if angle {
+ let (_window, _context) = angle::Context::with_window(
+ window_builder, context_builder, events_loop
+ ).unwrap();
+
+ unsafe {
+ _context
+ .make_current()
+ .expect("unable to make context current!");
+ }
+
+ let gl = match _context.get_api() {
+ glutin::Api::OpenGl => unsafe {
+ gl::GlFns::load_with(|symbol| _context.get_proc_address(symbol) as *const _)
+ },
+ glutin::Api::OpenGlEs => unsafe {
+ gl::GlesFns::load_with(|symbol| _context.get_proc_address(symbol) as *const _)
+ },
+ glutin::Api::WebGl => unimplemented!(),
+ };
+
+ WindowWrapper::Angle(_window, _context, gl, sw_ctx)
+ } else {
+ let windowed_context = context_builder
+ .build_windowed(window_builder, events_loop)
+ .unwrap();
+
+ let windowed_context = unsafe {
+ windowed_context
+ .make_current()
+ .expect("unable to make context current!")
+ };
+
+ let gl = match windowed_context.get_api() {
+ glutin::Api::OpenGl => unsafe {
+ gl::GlFns::load_with(
+ |symbol| windowed_context.get_proc_address(symbol) as *const _
+ )
+ },
+ glutin::Api::OpenGlEs => unsafe {
+ gl::GlesFns::load_with(
+ |symbol| windowed_context.get_proc_address(symbol) as *const _
+ )
+ },
+ glutin::Api::WebGl => unimplemented!(),
+ };
+
+ WindowWrapper::WindowedContext(windowed_context, gl, sw_ctx)
+ }
+ }
+ None => {
+ let gl = match sw_ctx {
+ #[cfg(feature = "software")]
+ Some(ref sw_ctx) => Rc::new(sw_ctx.clone()),
+ None => {
+ match gl::GlType::default() {
+ gl::GlType::Gl => unsafe {
+ gl::GlFns::load_with(|symbol| {
+ HeadlessContext::get_proc_address(symbol) as *const _
+ })
+ },
+ gl::GlType::Gles => unsafe {
+ gl::GlesFns::load_with(|symbol| {
+ HeadlessContext::get_proc_address(symbol) as *const _
+ })
+ },
+ }
+ }
+ #[cfg(not(feature = "software"))]
+ _ => panic!(),
+ };
+ WindowWrapper::Headless(HeadlessContext::new(size.width, size.height), gl, sw_ctx)
+ }
+ };
+
+ let gl = wrapper.gl();
+
+ gl.clear_color(0.3, 0.0, 0.0, 1.0);
+
+ let gl_version = gl.get_string(gl::VERSION);
+ let gl_renderer = gl.get_string(gl::RENDERER);
+
+ let dp_ratio = dp_ratio.unwrap_or(wrapper.hidpi_factor());
+ println!("OpenGL version {}, {}", gl_version, gl_renderer);
+ println!(
+ "hidpi factor: {} (native {})",
+ dp_ratio,
+ wrapper.hidpi_factor()
+ );
+
+ wrapper
+}
+
+#[derive(Copy, Clone, Debug, PartialEq, Eq)]
+pub enum NotifierEvent {
+ WakeUp,
+ ShutDown,
+}
+
+struct Notifier {
+ tx: Sender<NotifierEvent>,
+}
+
+// setup a notifier so we can wait for frames to be finished
+impl RenderNotifier for Notifier {
+ fn clone(&self) -> Box<dyn RenderNotifier> {
+ Box::new(Notifier {
+ tx: self.tx.clone(),
+ })
+ }
+
+ fn wake_up(&self) {
+ self.tx.send(NotifierEvent::WakeUp).unwrap();
+ }
+
+ fn shut_down(&self) {
+ self.tx.send(NotifierEvent::ShutDown).unwrap();
+ }
+
+ fn new_frame_ready(&self,
+ _: DocumentId,
+ _scrolled: bool,
+ _composite_needed: bool,
+ _render_time: Option<u64>) {
+ // TODO(gw): Refactor wrench so that it can take advantage of cases
+ // where no composite is required when appropriate.
+ self.wake_up();
+ }
+}
+
+fn create_notifier() -> (Box<dyn RenderNotifier>, Receiver<NotifierEvent>) {
+ let (tx, rx) = channel();
+ (Box::new(Notifier { tx: tx }), rx)
+}
+
+fn rawtest(mut wrench: Wrench, window: &mut WindowWrapper, rx: Receiver<NotifierEvent>) {
+ RawtestHarness::new(&mut wrench, window, &rx).run();
+ wrench.shut_down(rx);
+}
+
+fn reftest<'a>(
+ mut wrench: Wrench,
+ window: &mut WindowWrapper,
+ subargs: &clap::ArgMatches<'a>,
+ rx: Receiver<NotifierEvent>
+) -> usize {
+ let dim = window.get_inner_size();
+ let base_manifest = if cfg!(target_os = "android") {
+ Path::new("/sdcard/wrench/reftests/reftest.list")
+ } else {
+ Path::new("reftests/reftest.list")
+ };
+ let specific_reftest = subargs.value_of("REFTEST").map(|x| Path::new(x));
+ let mut reftest_options = ReftestOptions::default();
+ if let Some(allow_max_diff) = subargs.value_of("fuzz_tolerance") {
+ reftest_options.allow_max_difference = allow_max_diff.parse().unwrap_or(1);
+ reftest_options.allow_num_differences = dim.width as usize * dim.height as usize;
+ }
+ let num_failures = ReftestHarness::new(&mut wrench, window, &rx)
+ .run(base_manifest, specific_reftest, &reftest_options);
+ wrench.shut_down(rx);
+ num_failures
+}
+
+fn main() {
+ #[cfg(feature = "env_logger")]
+ env_logger::init();
+
+ #[cfg(target_os = "macos")]
+ {
+ use core_foundation::{self as cf, base::TCFType};
+ let i = cf::bundle::CFBundle::main_bundle().info_dictionary();
+ let mut i = unsafe { i.to_mutable() };
+ i.set(
+ cf::string::CFString::new("NSSupportsAutomaticGraphicsSwitching"),
+ cf::boolean::CFBoolean::true_value().into_CFType(),
+ );
+ }
+
+ let args_yaml = load_yaml!("args.yaml");
+ let clap = clap::App::from_yaml(args_yaml)
+ .setting(clap::AppSettings::ArgRequiredElseHelp);
+
+ // On android devices, attempt to read command line arguments
+ // from a text file located at /sdcard/wrench/args.
+ let args = if cfg!(target_os = "android") {
+ // get full backtraces by default because it's hard to request
+ // externally on android
+ std::env::set_var("RUST_BACKTRACE", "full");
+
+ let mut args = vec!["wrench".to_string()];
+
+ if let Ok(wrench_args) = fs::read_to_string("/sdcard/wrench/args") {
+ for line in wrench_args.lines() {
+ if line.starts_with("env: ") {
+ let envvar = &line[5..];
+ if let Some(ix) = envvar.find('=') {
+ std::env::set_var(&envvar[0..ix], &envvar[ix + 1..]);
+ } else {
+ std::env::set_var(envvar, "");
+ }
+ continue;
+ }
+ for arg in line.split_whitespace() {
+ args.push(arg.to_string());
+ }
+ }
+ }
+
+ clap.get_matches_from(&args)
+ } else {
+ clap.get_matches()
+ };
+
+ // handle some global arguments
+ let res_path = args.value_of("shaders").map(|s| PathBuf::from(s));
+ let dp_ratio = args.value_of("dp_ratio").map(|v| v.parse::<f32>().unwrap());
+ let size = args.value_of("size")
+ .map(|s| if s == "720p" {
+ DeviceIntSize::new(1280, 720)
+ } else if s == "1080p" {
+ DeviceIntSize::new(1920, 1080)
+ } else if s == "4k" {
+ DeviceIntSize::new(3840, 2160)
+ } else {
+ let x = s.find('x').expect(
+ "Size must be specified exactly as 720p, 1080p, 4k, or width x height",
+ );
+ let w = s[0 .. x].parse::<i32>().expect("Invalid size width");
+ let h = s[x + 1 ..].parse::<i32>().expect("Invalid size height");
+ DeviceIntSize::new(w, h)
+ })
+ .unwrap_or(DeviceIntSize::new(1920, 1080));
+ let zoom_factor = args.value_of("zoom").map(|z| z.parse::<f32>().unwrap());
+ let chase_primitive = match args.value_of("chase") {
+ Some(s) => {
+ match s.find(',') {
+ Some(_) => {
+ let items = s
+ .split(',')
+ .map(|s| s.parse::<f32>().unwrap())
+ .collect::<Vec<_>>();
+ let rect = LayoutRect::new(
+ LayoutPoint::new(items[0], items[1]),
+ LayoutSize::new(items[2], items[3]),
+ );
+ webrender::ChasePrimitive::LocalRect(rect)
+ }
+ None => {
+ let id = s.parse::<usize>().unwrap();
+ webrender::ChasePrimitive::Id(webrender::PrimitiveDebugId(id))
+ }
+ }
+ },
+ None => webrender::ChasePrimitive::Nothing,
+ };
+
+ let dump_shader_source = args.value_of("dump_shader_source").map(String::from);
+
+ let mut events_loop = if args.is_present("headless") {
+ None
+ } else {
+ Some(winit::EventsLoop::new())
+ };
+
+ let gl_request = match args.value_of("renderer") {
+ Some("es3") => {
+ glutin::GlRequest::Specific(glutin::Api::OpenGlEs, (3, 0))
+ }
+ Some("gl3") => {
+ glutin::GlRequest::Specific(glutin::Api::OpenGl, (3, 2))
+ }
+ Some("default") | None => {
+ glutin::GlRequest::GlThenGles {
+ opengl_version: (3, 2),
+ opengles_version: (3, 0),
+ }
+ }
+ Some(api) => {
+ panic!("Unexpected renderer string {}", api);
+ }
+ };
+
+ let software = args.is_present("software");
+
+ let mut window = make_window(
+ size,
+ dp_ratio,
+ args.is_present("vsync"),
+ &events_loop,
+ args.is_present("angle"),
+ gl_request,
+ software,
+ );
+ let dp_ratio = dp_ratio.unwrap_or(window.hidpi_factor());
+ let dim = window.get_inner_size();
+
+ let needs_frame_notifier = ["perf", "reftest", "png", "rawtest"]
+ .iter()
+ .any(|s| args.subcommand_matches(s).is_some());
+ let (notifier, rx) = if needs_frame_notifier {
+ let (notifier, rx) = create_notifier();
+ (Some(notifier), Some(rx))
+ } else {
+ (None, None)
+ };
+
+ let mut wrench = Wrench::new(
+ &mut window,
+ events_loop.as_mut().map(|el| el.create_proxy()),
+ res_path,
+ !args.is_present("use_unoptimized_shaders"),
+ dp_ratio,
+ dim,
+ args.is_present("rebuild"),
+ args.is_present("no_subpixel_aa"),
+ args.is_present("no_picture_caching"),
+ args.is_present("verbose"),
+ args.is_present("no_scissor"),
+ args.is_present("no_batch"),
+ args.is_present("precache"),
+ args.is_present("slow_subpixel"),
+ zoom_factor.unwrap_or(1.0),
+ chase_primitive,
+ dump_shader_source,
+ notifier,
+ );
+ window.update(&mut wrench);
+
+ if let Some(window_title) = wrench.take_title() {
+ if !cfg!(windows) {
+ window.set_title(&window_title);
+ }
+ }
+
+ if let Some(subargs) = args.subcommand_matches("show") {
+ let no_block = args.is_present("no_block");
+ let no_batch = args.is_present("no_batch");
+ render(
+ &mut wrench,
+ &mut window,
+ size,
+ &mut events_loop,
+ subargs,
+ no_block,
+ no_batch,
+ );
+ } else if let Some(subargs) = args.subcommand_matches("png") {
+ let surface = match subargs.value_of("surface") {
+ Some("screen") | None => png::ReadSurface::Screen,
+ Some("gpu-cache") => png::ReadSurface::GpuCache,
+ _ => panic!("Unknown surface argument value")
+ };
+ let output_path = subargs.value_of("OUTPUT").map(|s| PathBuf::from(s));
+ let reader = YamlFrameReader::new_from_args(subargs);
+ png::png(&mut wrench, surface, &mut window, reader, rx.unwrap(), output_path);
+ } else if let Some(subargs) = args.subcommand_matches("reftest") {
+ // Exit with an error code in order to ensure the CI job fails.
+ process::exit(reftest(wrench, &mut window, subargs, rx.unwrap()) as _);
+ } else if let Some(_) = args.subcommand_matches("rawtest") {
+ rawtest(wrench, &mut window, rx.unwrap());
+ return;
+ } else if let Some(subargs) = args.subcommand_matches("perf") {
+ // Perf mode wants to benchmark the total cost of drawing
+ // a new displaty list each frame.
+ wrench.rebuild_display_lists = true;
+
+ let as_csv = subargs.is_present("csv");
+ let auto_filename = subargs.is_present("auto-filename");
+
+ let warmup_frames = subargs.value_of("warmup_frames").map(|s| s.parse().unwrap());
+ let sample_count = subargs.value_of("sample_count").map(|s| s.parse().unwrap());
+
+ let harness = PerfHarness::new(&mut wrench,
+ &mut window,
+ rx.unwrap(),
+ warmup_frames,
+ sample_count);
+
+ let benchmark = match subargs.value_of("benchmark") {
+ Some(path) => path,
+ None => "benchmarks/benchmarks.list"
+ };
+ println!("Benchmark: {}", benchmark);
+ let base_manifest = Path::new(benchmark);
+
+ let mut filename = subargs.value_of("filename").unwrap().to_string();
+ if auto_filename {
+ let timestamp = chrono::Local::now().format("%Y-%m-%d-%H-%M-%S");
+ filename.push_str(
+ &format!("/wrench-perf-{}.{}",
+ timestamp,
+ if as_csv { "csv" } else { "json" }));
+ }
+ harness.run(base_manifest, &filename, as_csv);
+ return;
+ } else if let Some(subargs) = args.subcommand_matches("compare_perf") {
+ let first_filename = subargs.value_of("first_filename").unwrap();
+ let second_filename = subargs.value_of("second_filename").unwrap();
+ perf::compare(first_filename, second_filename);
+ return;
+ } else {
+ panic!("Should never have gotten here! {:?}", args);
+ };
+
+ wrench.renderer.deinit();
+}
+
+fn render<'a>(
+ wrench: &mut Wrench,
+ window: &mut WindowWrapper,
+ size: DeviceIntSize,
+ events_loop: &mut Option<winit::EventsLoop>,
+ subargs: &clap::ArgMatches<'a>,
+ no_block: bool,
+ no_batch: bool,
+) {
+ let input_path = subargs.value_of("INPUT").map(PathBuf::from).unwrap();
+
+ // If the input is a directory, we are looking at a capture.
+ let mut thing = if input_path.join("scenes").as_path().is_dir() {
+ let scene_id = subargs.value_of("scene-id").map(|z| z.parse::<u32>().unwrap());
+ let frame_id = subargs.value_of("frame-id").map(|z| z.parse::<u32>().unwrap());
+ Box::new(CapturedSequence::new(
+ input_path,
+ scene_id.unwrap_or(1),
+ frame_id.unwrap_or(1),
+ ))
+ } else if input_path.as_path().is_dir() {
+ let mut documents = wrench.api.load_capture(input_path, None);
+ println!("loaded {:?}", documents.iter().map(|cd| cd.document_id).collect::<Vec<_>>());
+ let captured = documents.swap_remove(0);
+ wrench.document_id = captured.document_id;
+ Box::new(captured) as Box<dyn WrenchThing>
+ } else {
+ let extension = input_path
+ .extension()
+ .expect("Tried to render with an unknown file type.")
+ .to_str()
+ .expect("Tried to render with an unknown file type.");
+
+ match extension {
+ "yaml" => Box::new(YamlFrameReader::new_from_args(subargs)) as Box<dyn WrenchThing>,
+ _ => panic!("Tried to render with an unknown file type."),
+ }
+ };
+
+ let mut show_help = false;
+ let mut do_loop = false;
+ let mut cursor_position = WorldPoint::zero();
+
+ window.update(wrench);
+ thing.do_frame(wrench);
+
+ if let Some(fb_size) = wrench.renderer.device_size() {
+ window.resize(fb_size);
+ }
+
+ let mut debug_flags = DebugFlags::empty();
+ debug_flags.set(DebugFlags::DISABLE_BATCHING, no_batch);
+
+ // Default the profile overlay on for android.
+ if cfg!(target_os = "android") {
+ debug_flags.toggle(DebugFlags::PROFILER_DBG | DebugFlags::COMPACT_PROFILER);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ }
+
+ let mut body = |wrench: &mut Wrench, events: Vec<winit::Event>| {
+ let mut do_frame = false;
+ let mut do_render = false;
+
+ for event in events {
+ match event {
+ winit::Event::Awakened => {
+ do_render = true;
+ }
+ winit::Event::WindowEvent { event, .. } => match event {
+ winit::WindowEvent::CloseRequested => {
+ return winit::ControlFlow::Break;
+ }
+ winit::WindowEvent::Refresh |
+ winit::WindowEvent::Focused(..) => {
+ do_render = true;
+ }
+ winit::WindowEvent::CursorMoved { position: LogicalPosition { x, y }, .. } => {
+ cursor_position = WorldPoint::new(x as f32, y as f32);
+ wrench.renderer.set_cursor_position(
+ DeviceIntPoint::new(
+ (cursor_position.x * wrench.device_pixel_ratio).round() as i32,
+ (cursor_position.y * wrench.device_pixel_ratio).round() as i32,
+ ),
+ );
+ do_render = true;
+ }
+ winit::WindowEvent::KeyboardInput {
+ input: winit::KeyboardInput {
+ state: winit::ElementState::Pressed,
+ virtual_keycode: Some(vk),
+ ..
+ },
+ ..
+ } => match vk {
+ VirtualKeyCode::Escape => {
+ return winit::ControlFlow::Break;
+ }
+ VirtualKeyCode::A => {
+ debug_flags.toggle(DebugFlags::DISABLE_PICTURE_CACHING);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ do_render = true;
+ }
+ VirtualKeyCode::B => {
+ debug_flags.toggle(DebugFlags::INVALIDATION_DBG);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ do_render = true;
+ }
+ VirtualKeyCode::P => {
+ debug_flags.toggle(DebugFlags::PROFILER_DBG);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ do_render = true;
+ }
+ VirtualKeyCode::O => {
+ debug_flags.toggle(DebugFlags::RENDER_TARGET_DBG);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ do_render = true;
+ }
+ VirtualKeyCode::I => {
+ debug_flags.toggle(DebugFlags::TEXTURE_CACHE_DBG);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ do_render = true;
+ }
+ VirtualKeyCode::S => {
+ debug_flags.toggle(DebugFlags::COMPACT_PROFILER);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ do_render = true;
+ }
+ VirtualKeyCode::D => {
+ debug_flags.toggle(DebugFlags::PICTURE_CACHING_DBG);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ do_render = true;
+ }
+ VirtualKeyCode::Q => {
+ debug_flags.toggle(DebugFlags::GPU_TIME_QUERIES | DebugFlags::GPU_SAMPLE_QUERIES);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ do_render = true;
+ }
+ VirtualKeyCode::V => {
+ debug_flags.toggle(DebugFlags::SHOW_OVERDRAW);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ do_render = true;
+ }
+ VirtualKeyCode::G => {
+ debug_flags.toggle(DebugFlags::GPU_CACHE_DBG);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+
+ // force scene rebuild to see the full set of used GPU cache entries
+ let mut txn = Transaction::new();
+ txn.set_root_pipeline(wrench.root_pipeline_id);
+ wrench.api.send_transaction(wrench.document_id, txn);
+
+ do_frame = true;
+ }
+ VirtualKeyCode::R => {
+ wrench.set_page_zoom(ZoomFactor::new(1.0));
+ do_frame = true;
+ }
+ VirtualKeyCode::M => {
+ wrench.api.notify_memory_pressure();
+ do_render = true;
+ }
+ VirtualKeyCode::L => {
+ do_loop = !do_loop;
+ do_render = true;
+ }
+ VirtualKeyCode::Left => {
+ thing.prev_frame();
+ do_frame = true;
+ }
+ VirtualKeyCode::Right => {
+ thing.next_frame();
+ do_frame = true;
+ }
+ VirtualKeyCode::H => {
+ show_help = !show_help;
+ do_render = true;
+ }
+ VirtualKeyCode::C => {
+ let path = PathBuf::from("../captures/wrench");
+ wrench.api.save_capture(path, CaptureBits::all());
+ }
+ VirtualKeyCode::Up | VirtualKeyCode::Down => {
+ let mut txn = Transaction::new();
+
+ let offset = match vk {
+ winit::VirtualKeyCode::Up => LayoutVector2D::new(0.0, 10.0),
+ winit::VirtualKeyCode::Down => LayoutVector2D::new(0.0, -10.0),
+ _ => unreachable!("Should not see non directional keys here.")
+ };
+
+ txn.scroll(ScrollLocation::Delta(offset), cursor_position);
+ txn.generate_frame();
+ wrench.api.send_transaction(wrench.document_id, txn);
+
+ do_frame = true;
+ }
+ VirtualKeyCode::Add => {
+ let current_zoom = wrench.get_page_zoom();
+ let new_zoom_factor = ZoomFactor::new(current_zoom.get() + 0.1);
+ wrench.set_page_zoom(new_zoom_factor);
+ do_frame = true;
+ }
+ VirtualKeyCode::Subtract => {
+ let current_zoom = wrench.get_page_zoom();
+ let new_zoom_factor = ZoomFactor::new((current_zoom.get() - 0.1).max(0.1));
+ wrench.set_page_zoom(new_zoom_factor);
+ do_frame = true;
+ }
+ VirtualKeyCode::X => {
+ let results = wrench.api.hit_test(
+ wrench.document_id,
+ None,
+ cursor_position,
+ HitTestFlags::FIND_ALL
+ );
+
+ println!("Hit test results:");
+ for item in &results.items {
+ println!(" • {:?}", item);
+ }
+ println!("");
+ }
+ VirtualKeyCode::Z => {
+ debug_flags.toggle(DebugFlags::ZOOM_DBG);
+ wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+ do_render = true;
+ }
+ VirtualKeyCode::Y => {
+ println!("Clearing all caches...");
+ wrench.api.send_debug_cmd(DebugCommand::ClearCaches(ClearCache::all()));
+ do_frame = true;
+ }
+ _ => {}
+ }
+ _ => {}
+ },
+ _ => {}
+ }
+ }
+
+ window.update(wrench);
+
+ if do_frame {
+ let frame_num = thing.do_frame(wrench);
+ unsafe {
+ CURRENT_FRAME_NUMBER = frame_num;
+ }
+ }
+
+ if do_render {
+ if show_help {
+ wrench.show_onscreen_help();
+ }
+
+ wrench.render();
+ window.upload_software_to_native();
+ window.swap_buffers();
+
+ if do_loop {
+ thing.next_frame();
+ }
+ }
+
+ winit::ControlFlow::Continue
+ };
+
+ match *events_loop {
+ None => {
+ while body(wrench, vec![winit::Event::Awakened]) == winit::ControlFlow::Continue {}
+ let fb_rect = FramebufferIntSize::new(size.width, size.height).into();
+ let pixels = wrench.renderer.read_pixels_rgba8(fb_rect);
+ save_flipped("screenshot.png", pixels, size);
+ }
+ Some(ref mut events_loop) => {
+ // We want to ensure that we:
+ //
+ // (a) Block the thread when no events are present (for CPU/battery purposes)
+ // (b) Don't lag the input events by having the event queue back up.
+ loop {
+ let mut pending_events = Vec::new();
+
+ // Block the thread until at least one event arrives
+ // On Android, we are generally profiling when running
+ // wrench, and don't want to block on UI events.
+ if !no_block && cfg!(not(target_os = "android")) {
+ events_loop.run_forever(|event| {
+ pending_events.push(event);
+ winit::ControlFlow::Break
+ });
+ }
+
+ // Collect any other pending events that are also available
+ events_loop.poll_events(|event| {
+ pending_events.push(event);
+ });
+
+ // Ensure there is at least one event present so that the
+ // frame gets rendered.
+ if pending_events.is_empty() {
+ pending_events.push(winit::Event::Awakened);
+ }
+
+ // Process all of those pending events in the next vsync period
+ if body(wrench, pending_events) == winit::ControlFlow::Break {
+ break;
+ }
+ }
+ }
+ }
+}
diff --git a/third_party/webrender/wrench/src/parse_function.rs b/third_party/webrender/wrench/src/parse_function.rs
new file mode 100644
index 00000000000..49cf097c41d
--- /dev/null
+++ b/third_party/webrender/wrench/src/parse_function.rs
@@ -0,0 +1,134 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use std::str::CharIndices;
+
+// support arguments like '4', 'ab', '4.0', '>=10.14', '*123'
+fn acceptable_arg_character(c: char) -> bool {
+ c.is_alphanumeric() || c == '.' || c == '-' || c == '<' || c == '>' || c == '=' || c == '*'
+}
+
+// A crappy parser for parsing strings like "translate(1, 3) blahblah"
+// Returns a tuple with three components:
+// - First component is the function name (e.g. "translate")
+// - Second component is the list of arguments (e.g. vec!["1", "3"])
+// - Third component is the rest of the string "blahblah"
+pub fn parse_function(s: &str) -> (&str, Vec<&str>, &str) {
+ // XXX: This is not particularly easy to read. Sorry.
+ struct Parser<'a> {
+ itr: CharIndices<'a>,
+ start: usize,
+ o: Option<(usize, char)>,
+ }
+ impl<'a> Parser<'a> {
+ fn skip_whitespace(&mut self) {
+ while let Some(k) = self.o {
+ if !k.1.is_whitespace() {
+ break;
+ }
+ self.start = k.0 + k.1.len_utf8();
+ self.o = self.itr.next();
+ }
+ }
+ }
+ let mut c = s.char_indices();
+ let o = c.next();
+ let mut p = Parser {
+ itr: c,
+ start: 0,
+ o: o,
+ };
+
+ p.skip_whitespace();
+
+ let mut end = p.start;
+ while let Some(k) = p.o {
+ if !k.1.is_alphabetic() && k.1 != '_' && k.1 != '-' {
+ break;
+ }
+ end = k.0 + k.1.len_utf8();
+ p.o = p.itr.next();
+ }
+
+ let name = &s[p.start .. end];
+ let mut args = Vec::new();
+
+ p.skip_whitespace();
+
+ if let Some(k) = p.o {
+ if k.1 != '(' {
+ return (name, args, &s[p.start ..]);
+ }
+ p.start = k.0 + k.1.len_utf8();
+ p.o = p.itr.next();
+ }
+
+ loop {
+ p.skip_whitespace();
+
+ let mut end = p.start;
+ let mut brackets: Vec<char> = Vec::new();
+ while let Some(k) = p.o {
+ let prev_bracket_count = brackets.len();
+ match k.1 {
+ '[' | '(' => brackets.push(k.1),
+ ']' | ')' => {
+ let open_bracket = match k.1 {
+ ']' => '[',
+ ')' => '(',
+ _ => panic!(),
+ };
+ match brackets.pop() {
+ // Allow final closing ) for command invocation after args
+ None if k.1 == ')' => break,
+ Some(bracket) if bracket == open_bracket => {}
+ _ => panic!("Unexpected closing bracket {}", k.1),
+ }
+ }
+ _ => {}
+ }
+
+ let not_in_bracket = brackets.len() == 0 && prev_bracket_count == 0;
+ if !acceptable_arg_character(k.1) && not_in_bracket {
+ break;
+ }
+ end = k.0 + k.1.len_utf8();
+ p.o = p.itr.next();
+ }
+
+ args.push(&s[p.start .. end]);
+
+ p.skip_whitespace();
+
+ if let Some(k) = p.o {
+ p.start = k.0 + k.1.len_utf8();
+ p.o = p.itr.next();
+ // unless we find a comma we're done
+ if k.1 != ',' {
+ if k.1 != ')' {
+ panic!("Unexpected closing character: {}", k.1);
+ }
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ (name, args, &s[p.start ..])
+}
+
+#[test]
+fn test() {
+ assert_eq!(parse_function("rotate(40)").0, "rotate");
+ assert_eq!(parse_function(" rotate(40)").0, "rotate");
+ assert_eq!(parse_function(" rotate (40)").0, "rotate");
+ assert_eq!(parse_function(" rotate ( 40 )").1[0], "40");
+ assert_eq!(parse_function("rotate(-40.0)").1[0], "-40.0");
+ assert_eq!(parse_function("drop-shadow(0, [1, 2, 3, 4], 5)").1[0], "0");
+ assert_eq!(parse_function("drop-shadow(0, [1, 2, 3, 4], 5)").1[1], "[1, 2, 3, 4]");
+ assert_eq!(parse_function("drop-shadow(0, [1, 2, 3, 4], 5)").1[2], "5");
+ assert_eq!(parse_function("drop-shadow(0, [1, 2, [3, 4]], 5)").1[1], "[1, 2, [3, 4]]");
+ assert_eq!(parse_function("func(nest([1, 2]), [3, 4])").1[0], "nest([1, 2])");
+ assert_eq!(parse_function("func(nest([1, 2]), [nest(3), nest(4)])").1[1], "[nest(3), nest(4)]");
+}
diff --git a/third_party/webrender/wrench/src/perf.rs b/third_party/webrender/wrench/src/perf.rs
new file mode 100644
index 00000000000..bd41ba6016f
--- /dev/null
+++ b/third_party/webrender/wrench/src/perf.rs
@@ -0,0 +1,352 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use crate::NotifierEvent;
+use crate::WindowWrapper;
+use serde_json;
+use std::collections::{HashMap, HashSet};
+use std::fs::File;
+use std::io::{BufRead, BufReader};
+use std::io::{Read, Write};
+use std::path::{Path, PathBuf};
+use std::sync::mpsc::Receiver;
+use crate::wrench::{Wrench, WrenchThing};
+use crate::yaml_frame_reader::YamlFrameReader;
+use webrender::DebugFlags;
+use webrender::api::DebugCommand;
+
+const COLOR_DEFAULT: &str = "\x1b[0m";
+const COLOR_RED: &str = "\x1b[31m";
+const COLOR_GREEN: &str = "\x1b[32m";
+const COLOR_MAGENTA: &str = "\x1b[95m";
+
+const MIN_SAMPLE_COUNT: usize = 50;
+const SAMPLE_EXCLUDE_COUNT: usize = 10;
+
+pub struct Benchmark {
+ pub test: PathBuf,
+}
+
+pub struct BenchmarkManifest {
+ pub benchmarks: Vec<Benchmark>,
+}
+
+impl BenchmarkManifest {
+ pub fn new(manifest: &Path) -> BenchmarkManifest {
+ let dir = manifest.parent().unwrap();
+ let f =
+ File::open(manifest).expect(&format!("couldn't open manifest: {}", manifest.display()));
+ let file = BufReader::new(&f);
+
+ let mut benchmarks = Vec::new();
+
+ for line in file.lines() {
+ let l = line.unwrap();
+
+ // strip the comments
+ let s = &l[0 .. l.find('#').unwrap_or(l.len())];
+ let s = s.trim();
+ if s.is_empty() {
+ continue;
+ }
+
+ let mut items = s.split_whitespace();
+
+ match items.next() {
+ Some("include") => {
+ let include = dir.join(items.next().unwrap());
+
+ benchmarks.append(&mut BenchmarkManifest::new(include.as_path()).benchmarks);
+ }
+ Some(name) => {
+ let test = dir.join(name);
+ benchmarks.push(Benchmark { test });
+ }
+ _ => panic!(),
+ };
+ }
+
+ BenchmarkManifest {
+ benchmarks: benchmarks,
+ }
+ }
+}
+
+#[derive(Clone, Serialize, Deserialize)]
+struct TestProfileRange {
+ min: u64,
+ avg: u64,
+ max: u64,
+}
+
+#[derive(Clone, Serialize, Deserialize)]
+struct TestProfile {
+ name: String,
+ backend_time_ns: TestProfileRange,
+ composite_time_ns: TestProfileRange,
+ paint_time_ns: TestProfileRange,
+ draw_calls: usize,
+}
+
+impl TestProfile {
+ fn csv_header() -> String {
+ "name,\
+ backend_time_ns min, avg, max,\
+ composite_time_ns min, avg, max,\
+ paint_time_ns min, avg, max,\
+ draw_calls\n".to_string()
+ }
+
+ fn convert_to_csv(&self) -> String {
+ format!("{},\
+ {},{},{},\
+ {},{},{},\
+ {},{},{},\
+ {}\n",
+ self.name,
+ self.backend_time_ns.min, self.backend_time_ns.avg, self.backend_time_ns.max,
+ self.composite_time_ns.min, self.composite_time_ns.avg, self.composite_time_ns.max,
+ self.paint_time_ns.min, self.paint_time_ns.avg, self.paint_time_ns.max,
+ self.draw_calls)
+ }
+}
+
+#[derive(Serialize, Deserialize)]
+struct Profile {
+ tests: Vec<TestProfile>,
+}
+
+impl Profile {
+ fn new() -> Profile {
+ Profile { tests: Vec::new() }
+ }
+
+ fn add(&mut self, profile: TestProfile) {
+ self.tests.push(profile);
+ }
+
+ fn save(&self, filename: &str, as_csv: bool) {
+ let mut file = File::create(&filename).unwrap();
+ if as_csv {
+ file.write_all(&TestProfile::csv_header().into_bytes()).unwrap();
+ for test in &self.tests {
+ file.write_all(&test.convert_to_csv().into_bytes()).unwrap();
+ }
+ } else {
+ let s = serde_json::to_string_pretty(self).unwrap();
+ file.write_all(&s.into_bytes()).unwrap();
+ file.write_all(b"\n").unwrap();
+ }
+ }
+
+ fn load(filename: &str) -> Profile {
+ let mut file = File::open(&filename).unwrap();
+ let mut string = String::new();
+ file.read_to_string(&mut string).unwrap();
+ serde_json::from_str(&string).expect("Unable to load profile!")
+ }
+
+ fn build_set_and_map_of_tests(&self) -> (HashSet<String>, HashMap<String, TestProfile>) {
+ let mut hash_set = HashSet::new();
+ let mut hash_map = HashMap::new();
+
+ for test in &self.tests {
+ hash_set.insert(test.name.clone());
+ hash_map.insert(test.name.clone(), test.clone());
+ }
+
+ (hash_set, hash_map)
+ }
+}
+
+pub struct PerfHarness<'a> {
+ wrench: &'a mut Wrench,
+ window: &'a mut WindowWrapper,
+ rx: Receiver<NotifierEvent>,
+ warmup_frames: usize,
+ sample_count: usize,
+}
+
+impl<'a> PerfHarness<'a> {
+ pub fn new(wrench: &'a mut Wrench,
+ window: &'a mut WindowWrapper,
+ rx: Receiver<NotifierEvent>,
+ warmup_frames: Option<usize>,
+ sample_count: Option<usize>) -> Self {
+ PerfHarness {
+ wrench,
+ window,
+ rx,
+ warmup_frames: warmup_frames.unwrap_or(0usize),
+ sample_count: sample_count.unwrap_or(MIN_SAMPLE_COUNT),
+ }
+ }
+
+ pub fn run(mut self, base_manifest: &Path, filename: &str, as_csv: bool) {
+ let manifest = BenchmarkManifest::new(base_manifest);
+
+ let mut profile = Profile::new();
+
+ for t in manifest.benchmarks {
+ let stats = self.render_yaml(t.test.as_path());
+ profile.add(stats);
+ }
+
+ profile.save(filename, as_csv);
+ }
+
+ fn render_yaml(&mut self, filename: &Path) -> TestProfile {
+ let mut reader = YamlFrameReader::new(filename);
+
+ // Loop until we get a reasonable number of CPU and GPU
+ // frame profiles. Then take the mean.
+ let mut cpu_frame_profiles = Vec::new();
+ let mut gpu_frame_profiles = Vec::new();
+
+ let mut debug_flags = DebugFlags::empty();
+ debug_flags.set(DebugFlags::GPU_TIME_QUERIES | DebugFlags::GPU_SAMPLE_QUERIES, true);
+ self.wrench.api.send_debug_cmd(DebugCommand::SetFlags(debug_flags));
+
+ let mut frame_count = 0;
+
+ while cpu_frame_profiles.len() < self.sample_count ||
+ gpu_frame_profiles.len() < self.sample_count
+ {
+ reader.do_frame(self.wrench);
+ self.rx.recv().unwrap();
+ self.wrench.render();
+ self.window.swap_buffers();
+ let (cpu_profiles, gpu_profiles) = self.wrench.get_frame_profiles();
+ if frame_count >= self.warmup_frames {
+ cpu_frame_profiles.extend(cpu_profiles);
+ gpu_frame_profiles.extend(gpu_profiles);
+ }
+ frame_count = frame_count + 1;
+ }
+
+ // Ensure the draw calls match in every sample.
+ let draw_calls = cpu_frame_profiles[0].draw_calls;
+ let draw_calls_same =
+ cpu_frame_profiles
+ .iter()
+ .all(|s| s.draw_calls == draw_calls);
+
+ // this can be normal in cases where some elements are cached (eg. linear
+ // gradients), but print a warning in case it's not (which could make the
+ // benchmark produce unexpected results).
+ if !draw_calls_same {
+ println!("Warning: not every frame has the same number of draw calls");
+ }
+
+ let composite_time_ns = extract_sample(&mut cpu_frame_profiles, |a| a.composite_time_ns);
+ let paint_time_ns = extract_sample(&mut gpu_frame_profiles, |a| a.paint_time_ns);
+ let backend_time_ns = extract_sample(&mut cpu_frame_profiles, |a| a.backend_time_ns);
+
+ TestProfile {
+ name: filename.to_str().unwrap().to_string(),
+ composite_time_ns,
+ paint_time_ns,
+ backend_time_ns,
+ draw_calls,
+ }
+ }
+}
+
+// returns min, average, max, after removing the lowest and highest SAMPLE_EXCLUDE_COUNT
+// samples (each).
+fn extract_sample<F, T>(profiles: &mut [T], f: F) -> TestProfileRange
+where
+ F: Fn(&T) -> u64,
+{
+ let mut samples: Vec<u64> = profiles.iter().map(f).collect();
+ samples.sort();
+ let useful_samples = &samples[SAMPLE_EXCLUDE_COUNT .. samples.len() - SAMPLE_EXCLUDE_COUNT];
+ let total_time: u64 = useful_samples.iter().sum();
+ TestProfileRange {
+ min: useful_samples[0],
+ avg: total_time / useful_samples.len() as u64,
+ max: useful_samples[useful_samples.len()-1]
+ }
+}
+
+fn select_color(base: f32, value: f32) -> &'static str {
+ let tolerance = base * 0.1;
+ if (value - base).abs() < tolerance {
+ COLOR_DEFAULT
+ } else if value > base {
+ COLOR_RED
+ } else {
+ COLOR_GREEN
+ }
+}
+
+pub fn compare(first_filename: &str, second_filename: &str) {
+ let profile0 = Profile::load(first_filename);
+ let profile1 = Profile::load(second_filename);
+
+ let (set0, map0) = profile0.build_set_and_map_of_tests();
+ let (set1, map1) = profile1.build_set_and_map_of_tests();
+
+ print!("+------------------------------------------------");
+ println!("+--------------+------------------+------------------+");
+ print!("| Test name ");
+ println!("| Draw Calls | Composite (ms) | Paint (ms) |");
+ print!("+------------------------------------------------");
+ println!("+--------------+------------------+------------------+");
+
+ for test_name in set0.symmetric_difference(&set1) {
+ println!(
+ "| {}{:47}{}|{:14}|{:18}|{:18}|",
+ COLOR_MAGENTA,
+ test_name,
+ COLOR_DEFAULT,
+ " -",
+ " -",
+ " -"
+ );
+ }
+
+ for test_name in set0.intersection(&set1) {
+ let test0 = &map0[test_name];
+ let test1 = &map1[test_name];
+
+ let composite_time0 = test0.composite_time_ns.avg as f32 / 1000000.0;
+ let composite_time1 = test1.composite_time_ns.avg as f32 / 1000000.0;
+
+ let paint_time0 = test0.paint_time_ns.avg as f32 / 1000000.0;
+ let paint_time1 = test1.paint_time_ns.avg as f32 / 1000000.0;
+
+ let draw_calls_color = if test0.draw_calls == test1.draw_calls {
+ COLOR_DEFAULT
+ } else if test0.draw_calls > test1.draw_calls {
+ COLOR_GREEN
+ } else {
+ COLOR_RED
+ };
+
+ let composite_time_color = select_color(composite_time0, composite_time1);
+ let paint_time_color = select_color(paint_time0, paint_time1);
+
+ let draw_call_string = format!(" {} -> {}", test0.draw_calls, test1.draw_calls);
+ let composite_time_string = format!(" {:.2} -> {:.2}", composite_time0, composite_time1);
+ let paint_time_string = format!(" {:.2} -> {:.2}", paint_time0, paint_time1);
+
+ println!(
+ "| {:47}|{}{:14}{}|{}{:18}{}|{}{:18}{}|",
+ test_name,
+ draw_calls_color,
+ draw_call_string,
+ COLOR_DEFAULT,
+ composite_time_color,
+ composite_time_string,
+ COLOR_DEFAULT,
+ paint_time_color,
+ paint_time_string,
+ COLOR_DEFAULT
+ );
+ }
+
+ print!("+------------------------------------------------");
+ println!("+--------------+------------------+------------------+");
+}
diff --git a/third_party/webrender/wrench/src/png.rs b/third_party/webrender/wrench/src/png.rs
new file mode 100644
index 00000000000..6a7dfd94f85
--- /dev/null
+++ b/third_party/webrender/wrench/src/png.rs
@@ -0,0 +1,118 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use crate::{WindowWrapper, NotifierEvent};
+use image::png::PNGEncoder;
+use image::{self, ColorType, GenericImageView};
+use std::fs::File;
+use std::path::{Path, PathBuf};
+use std::sync::mpsc::Receiver;
+use webrender::api::units::*;
+use crate::wrench::{Wrench, WrenchThing};
+use crate::yaml_frame_reader::YamlFrameReader;
+
+pub enum ReadSurface {
+ Screen,
+ GpuCache,
+}
+
+pub struct SaveSettings {
+ pub flip_vertical: bool,
+ pub try_crop: bool,
+}
+
+pub fn save<P: Clone + AsRef<Path>>(
+ path: P,
+ orig_pixels: Vec<u8>,
+ size: DeviceIntSize,
+ settings: SaveSettings
+) {
+ let mut width = size.width as u32;
+ let mut height = size.height as u32;
+ let mut buffer = image::RgbaImage::from_raw(
+ width,
+ height,
+ orig_pixels,
+ ).expect("bug: unable to construct image buffer");
+
+ if settings.flip_vertical {
+ // flip image vertically (texture is upside down)
+ buffer = image::imageops::flip_vertical(&buffer);
+ }
+
+ if settings.try_crop {
+ if let Ok(existing_image) = image::open(path.clone()) {
+ let old_dims = existing_image.dimensions();
+ println!("Crop from {:?} to {:?}", size, old_dims);
+ width = old_dims.0;
+ height = old_dims.1;
+ buffer = image::imageops::crop(
+ &mut buffer,
+ 0,
+ 0,
+ width,
+ height
+ ).to_image();
+ }
+ }
+
+ let encoder = PNGEncoder::new(File::create(path).unwrap());
+ encoder
+ .encode(&buffer, width, height, ColorType::Rgba8)
+ .expect("Unable to encode PNG!");
+}
+
+pub fn save_flipped<P: Clone + AsRef<Path>>(
+ path: P,
+ orig_pixels: Vec<u8>,
+ size: DeviceIntSize,
+) {
+ save(path, orig_pixels, size, SaveSettings {
+ flip_vertical: true,
+ try_crop: true,
+ })
+}
+
+pub fn png(
+ wrench: &mut Wrench,
+ surface: ReadSurface,
+ window: &mut WindowWrapper,
+ mut reader: YamlFrameReader,
+ rx: Receiver<NotifierEvent>,
+ out_path: Option<PathBuf>,
+) {
+ reader.do_frame(wrench);
+
+ // wait for the frame
+ rx.recv().unwrap();
+ wrench.render();
+
+ let (fb_size, data, settings) = match surface {
+ ReadSurface::Screen => {
+ let dim = window.get_inner_size();
+ let rect = FramebufferIntSize::new(dim.width, dim.height).into();
+ let data = wrench.renderer.read_pixels_rgba8(rect);
+ (dim, data, SaveSettings {
+ flip_vertical: true,
+ try_crop: true,
+ })
+ }
+ ReadSurface::GpuCache => {
+ let (size, data) = wrench.renderer
+ .read_gpu_cache();
+ (size, data, SaveSettings {
+ flip_vertical: false,
+ try_crop: false,
+ })
+ }
+ };
+
+ let out_path = out_path.unwrap_or_else(|| {
+ let mut path = reader.yaml_path().clone();
+ path.set_extension("png");
+ path
+ });
+
+ save(out_path, data, fb_size, settings);
+}
diff --git a/third_party/webrender/wrench/src/premultiply.rs b/third_party/webrender/wrench/src/premultiply.rs
new file mode 100644
index 00000000000..04f43add566
--- /dev/null
+++ b/third_party/webrender/wrench/src/premultiply.rs
@@ -0,0 +1,56 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// These are slow. Gecko's gfx/2d/Swizzle.cpp has better versions
+pub fn premultiply(data: &mut [u8]) {
+ for pixel in data.chunks_mut(4) {
+ let a = pixel[3] as u32;
+ let b = pixel[2] as u32;
+ let g = pixel[1] as u32;
+ let r = pixel[0] as u32;
+
+ pixel[3] = a as u8;
+ pixel[2] = ((r * a + 128) / 255) as u8;
+ pixel[1] = ((g * a + 128) / 255) as u8;
+ pixel[0] = ((b * a + 128) / 255) as u8;
+ }
+}
+
+#[allow(unused)]
+pub fn unpremultiply(data: &mut [u8]) {
+ for pixel in data.chunks_mut(4) {
+ let a = pixel[3] as u32;
+ let mut b = pixel[2] as u32;
+ let mut g = pixel[1] as u32;
+ let mut r = pixel[0] as u32;
+
+ if a > 0 {
+ r = r * 255 / a;
+ g = g * 255 / a;
+ b = b * 255 / a;
+ }
+
+ pixel[3] = a as u8;
+ pixel[2] = r as u8;
+ pixel[1] = g as u8;
+ pixel[0] = b as u8;
+ }
+}
+
+#[test]
+fn it_works() {
+ let mut f = [0xff, 0xff, 0xff, 0x80, 0x00, 0xff, 0x00, 0x80];
+ premultiply(&mut f);
+ println!("{:?}", f);
+ assert!(
+ f[0] == 0x80 && f[1] == 0x80 && f[2] == 0x80 && f[3] == 0x80 && f[4] == 0x00 &&
+ f[5] == 0x80 && f[6] == 0x00 && f[7] == 0x80
+ );
+ unpremultiply(&mut f);
+ println!("{:?}", f);
+ assert!(
+ f[0] == 0xff && f[1] == 0xff && f[2] == 0xff && f[3] == 0x80 && f[4] == 0x00 &&
+ f[5] == 0xff && f[6] == 0x00 && f[7] == 0x80
+ );
+}
diff --git a/third_party/webrender/wrench/src/rawtest.rs b/third_party/webrender/wrench/src/rawtest.rs
new file mode 100644
index 00000000000..f0315155b17
--- /dev/null
+++ b/third_party/webrender/wrench/src/rawtest.rs
@@ -0,0 +1,1463 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use euclid::{point2, size2, rect};
+use std::sync::Arc;
+use std::sync::atomic::{AtomicIsize, Ordering};
+use std::sync::mpsc::Receiver;
+use webrender::api::*;
+use webrender::api::units::*;
+use crate::{WindowWrapper, NotifierEvent};
+use crate::blob;
+use crate::reftest::{ReftestImage, ReftestImageComparison};
+use crate::wrench::Wrench;
+
+pub struct RawtestHarness<'a> {
+ wrench: &'a mut Wrench,
+ rx: &'a Receiver<NotifierEvent>,
+ window: &'a mut WindowWrapper,
+}
+
+
+impl<'a> RawtestHarness<'a> {
+ pub fn new(wrench: &'a mut Wrench,
+ window: &'a mut WindowWrapper,
+ rx: &'a Receiver<NotifierEvent>) -> Self {
+ RawtestHarness {
+ wrench,
+ rx,
+ window,
+ }
+ }
+
+ pub fn run(mut self) {
+ self.test_hit_testing();
+ self.test_resize_image();
+ self.test_retained_blob_images_test();
+ self.test_blob_update_test();
+ self.test_blob_update_epoch_test();
+ self.test_tile_decomposition();
+ self.test_very_large_blob();
+ self.test_blob_visible_area();
+ self.test_blob_set_visible_area();
+ self.test_offscreen_blob();
+ self.test_save_restore();
+ self.test_blur_cache();
+ self.test_capture();
+ self.test_zero_height_window();
+ self.test_clear_cache();
+ }
+
+ fn render_and_get_pixels(&mut self, window_rect: FramebufferIntRect) -> Vec<u8> {
+ self.rx.recv().unwrap();
+ self.wrench.render();
+ self.wrench.renderer.read_pixels_rgba8(window_rect)
+ }
+
+ fn compare_pixels(&self, data1: Vec<u8>, data2: Vec<u8>, size: FramebufferIntSize) {
+ let size = DeviceIntSize::new(size.width, size.height);
+ let image1 = ReftestImage {
+ data: data1,
+ size,
+ };
+ let image2 = ReftestImage {
+ data: data2,
+ size,
+ };
+
+ match image1.compare(&image2) {
+ ReftestImageComparison::Equal => {}
+ ReftestImageComparison::NotEqual { max_difference, count_different, .. } => {
+ let t = "rawtest";
+ println!(
+ "{} | {} | {}: {}, {}: {}",
+ "REFTEST TEST-UNEXPECTED-FAIL",
+ t,
+ "image comparison, max difference",
+ max_difference,
+ "number of differing pixels",
+ count_different
+ );
+ println!("REFTEST IMAGE 1: {}", image1.create_data_uri());
+ println!("REFTEST IMAGE 2: {}", image2.create_data_uri());
+ println!("REFTEST TEST-END | {}", t);
+ panic!();
+ }
+ }
+ }
+
+ fn submit_dl(
+ &mut self,
+ epoch: &mut Epoch,
+ layout_size: LayoutSize,
+ builder: DisplayListBuilder,
+ mut txn: Transaction,
+ ) {
+ let root_background_color = Some(ColorF::new(1.0, 1.0, 1.0, 1.0));
+ txn.use_scene_builder_thread();
+
+ txn.set_display_list(
+ *epoch,
+ root_background_color,
+ layout_size,
+ builder.finalize(),
+ false,
+ );
+ epoch.0 += 1;
+
+ txn.generate_frame();
+ self.wrench.api.send_transaction(self.wrench.document_id, txn);
+ }
+
+ fn make_common_properties(&self, clip_rect: LayoutRect) -> CommonItemProperties {
+ let space_and_clip = SpaceAndClipInfo::root_scroll(self.wrench.root_pipeline_id);
+ CommonItemProperties {
+ clip_rect,
+ clip_id: space_and_clip.clip_id,
+ spatial_id: space_and_clip.spatial_id,
+ flags: PrimitiveFlags::default(),
+ hit_info: None,
+ }
+ }
+
+ fn make_common_properties_with_clip_and_spatial(
+ &self,
+ clip_rect: LayoutRect,
+ clip_id: ClipId,
+ spatial_id: SpatialId
+ ) -> CommonItemProperties {
+ CommonItemProperties {
+ clip_rect,
+ clip_id,
+ spatial_id,
+ flags: PrimitiveFlags::default(),
+ hit_info: None,
+ }
+ }
+
+ fn test_resize_image(&mut self) {
+ println!("\tresize image...");
+ // This test changes the size of an image to make it go switch back and forth
+ // between tiled and non-tiled.
+ // The resource cache should be able to handle this without crashing.
+
+ let layout_size = LayoutSize::new(800., 800.);
+
+ let mut txn = Transaction::new();
+ let img = self.wrench.api.generate_image_key();
+
+ // Start with a non-tiled image.
+ txn.add_image(
+ img,
+ ImageDescriptor::new(64, 64, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(vec![255; 64 * 64 * 4]),
+ None,
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ let info = self.make_common_properties(rect(0.0, 0.0, 64.0, 64.0));
+
+ builder.push_image(
+ &info,
+ info.clip_rect,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ img,
+ ColorF::WHITE,
+ );
+
+ let mut epoch = Epoch(0);
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+ self.rx.recv().unwrap();
+ self.wrench.render();
+
+ let mut txn = Transaction::new();
+ // Resize the image to something bigger than the max texture size (8196) to force tiling.
+ txn.update_image(
+ img,
+ ImageDescriptor::new(8200, 32, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(vec![255; 8200 * 32 * 4]),
+ &DirtyRect::All,
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ let info = self.make_common_properties(rect(0.0, 0.0, 1024.0, 1024.0));
+
+ builder.push_image(
+ &info,
+ info.clip_rect,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ img,
+ ColorF::WHITE,
+ );
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+ self.rx.recv().unwrap();
+ self.wrench.render();
+
+ let mut txn = Transaction::new();
+ // Resize back to something doesn't require tiling.
+ txn.update_image(
+ img,
+ ImageDescriptor::new(64, 64, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(vec![64; 64 * 64 * 4]),
+ &DirtyRect::All,
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ let info = self.make_common_properties(rect(0.0, 0.0, 1024.0, 1024.0));
+
+ builder.push_image(
+ &info,
+ info.clip_rect,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ img,
+ ColorF::WHITE,
+ );
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+ self.rx.recv().unwrap();
+ self.wrench.render();
+
+ txn = Transaction::new();
+ txn.delete_image(img);
+ self.wrench.api.send_transaction(self.wrench.document_id, txn);
+ }
+
+ fn test_tile_decomposition(&mut self) {
+ println!("\ttile decomposition...");
+ // This exposes a crash in tile decomposition
+ let layout_size = LayoutSize::new(800., 800.);
+ let mut txn = Transaction::new();
+
+ let blob_img = self.wrench.api.generate_blob_image_key();
+ txn.add_blob_image(
+ blob_img,
+ ImageDescriptor::new(151, 56, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ rect(0, 0, 151, 56),
+ Some(128),
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let info = self.make_common_properties(rect(448.899994, 74.0, 151.000031, 56.));
+
+ // setup some malicious image size parameters
+ builder.push_repeating_image(
+ &info,
+ info.clip_rect,
+ size2(151., 56.0),
+ size2(151.0, 56.0),
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+
+ let mut epoch = Epoch(0);
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+
+ self.rx.recv().unwrap();
+ self.wrench.render();
+
+ // Leaving a tiled blob image in the resource cache
+ // confuses the `test_capture`. TODO: remove this
+ txn = Transaction::new();
+ txn.delete_blob_image(blob_img);
+ self.wrench.api.send_transaction(self.wrench.document_id, txn);
+ }
+
+ fn test_very_large_blob(&mut self) {
+ println!("\tvery large blob...");
+
+ assert_eq!(self.wrench.device_pixel_ratio, 1.);
+
+ let window_size = self.window.get_inner_size();
+
+ let test_size = FramebufferIntSize::new(800, 800);
+
+ let window_rect = FramebufferIntRect::new(
+ FramebufferIntPoint::new(0, window_size.height - test_size.height),
+ test_size,
+ );
+
+ // This exposes a crash in tile decomposition
+ let layout_size = LayoutSize::new(800., 800.);
+ let mut txn = Transaction::new();
+
+ let blob_img = self.wrench.api.generate_blob_image_key();
+ txn.add_blob_image(
+ blob_img,
+ ImageDescriptor::new(15000, 15000, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ rect(0, 0, 15000, 15000),
+ Some(100),
+ );
+
+ let called = Arc::new(AtomicIsize::new(0));
+ let called_inner = Arc::clone(&called);
+
+ self.wrench.callbacks.lock().unwrap().request = Box::new(move |_| {
+ called_inner.fetch_add(1, Ordering::SeqCst);
+ });
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let root_space_and_clip = SpaceAndClipInfo::root_scroll(self.wrench.root_pipeline_id);
+ let clip_id = builder.define_clip_rect(
+ &root_space_and_clip,
+ rect(40., 41., 200., 201.),
+ );
+
+ let info = CommonItemProperties {
+ clip_rect: rect(0.0, 0.0, 800.0, 800.0),
+ clip_id,
+ spatial_id: root_space_and_clip.spatial_id,
+ flags: PrimitiveFlags::default(),
+ hit_info: None,
+ };
+
+ // setup some malicious image size parameters
+ builder.push_repeating_image(
+ &info,
+ size2(15000.0, 15000.0).into(),
+ size2(15000.0, 15000.0),
+ size2(0.0, 0.0),
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+
+ let mut epoch = Epoch(0);
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+
+ let pixels = self.render_and_get_pixels(window_rect);
+
+ // make sure we didn't request too many blobs
+ assert!(called.load(Ordering::SeqCst) < 20);
+
+ //use crate::png;
+ //png::save_flipped("out.png", pixels.clone(), size2(window_rect.size.width, window_rect.size.height));
+
+ // make sure things are in the right spot
+ let w = window_rect.size.width as usize;
+ let h = window_rect.size.height as usize;
+ let p1 = (40 + (h - 100) * w) * 4;
+ assert_eq!(pixels[p1 + 0], 50);
+ assert_eq!(pixels[p1 + 1], 50);
+ assert_eq!(pixels[p1 + 2], 150);
+ assert_eq!(pixels[p1 + 3], 255);
+
+ // Leaving a tiled blob image in the resource cache
+ // confuses the `test_capture`. TODO: remove this
+ txn = Transaction::new();
+ txn.delete_blob_image(blob_img);
+ self.wrench.api.send_transaction(self.wrench.document_id, txn);
+
+ *self.wrench.callbacks.lock().unwrap() = blob::BlobCallbacks::new();
+ }
+
+ fn test_blob_visible_area(&mut self) {
+ println!("\tblob visible area...");
+
+ assert_eq!(self.wrench.device_pixel_ratio, 1.0);
+
+ let window_size = self.window.get_inner_size();
+ let test_size = FramebufferIntSize::new(800, 800);
+ let window_rect = FramebufferIntRect::new(
+ FramebufferIntPoint::new(0, window_size.height - test_size.height),
+ test_size,
+ );
+ let layout_size = LayoutSize::new(800.0, 800.0);
+ let mut txn = Transaction::new();
+
+ let blob_img = self.wrench.api.generate_blob_image_key();
+ txn.add_blob_image(
+ blob_img,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ DeviceIntRect {
+ origin: point2(50, 20),
+ size: size2(400, 400),
+ },
+ Some(100),
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let image_size = size2(400.0, 400.0);
+
+ let root_space_and_clip = SpaceAndClipInfo::root_scroll(self.wrench.root_pipeline_id);
+ let clip_id = builder.define_clip_rect(
+ &root_space_and_clip,
+ rect(-1000.0, -1000.0, 2000.0, 2000.0),
+ );
+
+ let info = CommonItemProperties {
+ clip_rect: rect(10.0, 10.0, 400.0, 400.0),
+ clip_id,
+ spatial_id: root_space_and_clip.spatial_id,
+ flags: PrimitiveFlags::default(),
+ hit_info: None,
+ };
+
+ builder.push_repeating_image(
+ &info,
+ info.clip_rect,
+ image_size,
+ image_size,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+ let mut epoch = Epoch(0);
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+
+ let pixels = self.render_and_get_pixels(window_rect);
+
+ //use super::png;
+ //png::save_flipped("out.png", pixels.clone(), size2(window_rect.size.width, window_rect.size.height));
+
+
+ // make sure things are in the right spot
+ let w = window_rect.size.width as usize;
+ let h = window_rect.size.height as usize;
+ let p1 = (65 + (h - 15) * w) * 4;
+ assert_eq!(pixels[p1 + 0], 255);
+ assert_eq!(pixels[p1 + 1], 255);
+ assert_eq!(pixels[p1 + 2], 255);
+ assert_eq!(pixels[p1 + 3], 255);
+
+ let p2 = (25 + (h - 15) * w) * 4;
+ assert_eq!(pixels[p2 + 0], 221);
+ assert_eq!(pixels[p2 + 1], 221);
+ assert_eq!(pixels[p2 + 2], 221);
+ assert_eq!(pixels[p2 + 3], 255);
+
+ let p3 = (15 + (h - 15) * w) * 4;
+ assert_eq!(pixels[p3 + 0], 50);
+ assert_eq!(pixels[p3 + 1], 50);
+ assert_eq!(pixels[p3 + 2], 150);
+ assert_eq!(pixels[p3 + 3], 255);
+
+ // Leaving a tiled blob image in the resource cache
+ // confuses the `test_capture`. TODO: remove this
+ txn = Transaction::new();
+ txn.delete_blob_image(blob_img);
+ self.wrench.api.send_transaction(self.wrench.document_id, txn);
+
+ *self.wrench.callbacks.lock().unwrap() = blob::BlobCallbacks::new();
+ }
+
+ fn test_blob_set_visible_area(&mut self) {
+ // In this test we first render a blob with a certain visible area,
+ // then change the visible area without updating the blob image.
+
+ println!("\tblob visible area update...");
+
+ assert_eq!(self.wrench.device_pixel_ratio, 1.0);
+
+ let window_size = self.window.get_inner_size();
+ let test_size = FramebufferIntSize::new(800, 800);
+ let window_rect = FramebufferIntRect::new(
+ FramebufferIntPoint::new(0, window_size.height - test_size.height),
+ test_size,
+ );
+ let layout_size = LayoutSize::new(800.0, 800.0);
+ let mut txn = Transaction::new();
+
+ let blob_img = self.wrench.api.generate_blob_image_key();
+ txn.add_blob_image(
+ blob_img,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ DeviceIntRect {
+ origin: point2(0, 0),
+ size: size2(500, 500),
+ },
+ Some(128),
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let root_space_and_clip = SpaceAndClipInfo::root_scroll(self.wrench.root_pipeline_id);
+ let clip_id = builder.define_clip_rect(
+ &root_space_and_clip,
+ rect(-1000.0, -1000.0, 2000.0, 2000.0),
+ );
+
+ let info = CommonItemProperties {
+ clip_rect: rect(0.0, 0.0, 1000.0, 1000.0),
+ clip_id,
+ spatial_id: root_space_and_clip.spatial_id,
+ flags: PrimitiveFlags::default(),
+ hit_info: None,
+ };
+
+ builder.push_repeating_image(
+ &info,
+ rect(0.0, 0.0, 500.0, 500.0),
+ size2(500.0, 500.0),
+ size2(500.0, 500.0),
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+ let mut epoch = Epoch(0);
+
+ // Render the first display list. We don't care about the result but we
+ // want to make sure the next display list updates an already rendered
+ // state.
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+ let _ = self.render_and_get_pixels(window_rect);
+
+ // Now render a similar scene with an updated blob visible area.
+ // In this test we care about the fact that the visible area was updated
+ // without using update_blob_image.
+
+ let mut txn = Transaction::new();
+
+ txn.set_blob_image_visible_area(blob_img, DeviceIntRect {
+ origin: point2(50, 50),
+ size: size2(400, 400),
+ });
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let root_space_and_clip = SpaceAndClipInfo::root_scroll(self.wrench.root_pipeline_id);
+ let clip_id = builder.define_clip_rect(
+ &root_space_and_clip,
+ rect(-1000.0, -1000.0, 2000.0, 2000.0),
+ );
+
+ let info = CommonItemProperties {
+ clip_rect: rect(0.0, 0.0, 1000.0, 1000.0),
+ clip_id,
+ spatial_id: root_space_and_clip.spatial_id,
+ flags: PrimitiveFlags::default(),
+ hit_info: None,
+ };
+
+ builder.push_repeating_image(
+ &info,
+ rect(50.0, 50.0, 400.0, 400.0),
+ size2(400.0, 400.0),
+ size2(400.0, 400.0),
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+ let resized_pixels = self.render_and_get_pixels(window_rect);
+
+ // Now render the same scene with a new blob image created with the same
+ // visible area as the previous scene, without going through an update.
+
+ let mut txn = Transaction::new();
+
+ let blob_img2 = self.wrench.api.generate_blob_image_key();
+ txn.add_blob_image(
+ blob_img2,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ DeviceIntRect {
+ origin: point2(50, 50),
+ size: size2(400, 400),
+ },
+ Some(128),
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let root_space_and_clip = SpaceAndClipInfo::root_scroll(self.wrench.root_pipeline_id);
+ let clip_id = builder.define_clip_rect(
+ &root_space_and_clip,
+ rect(-1000.0, -1000.0, 2000.0, 2000.0),
+ );
+
+ let info = CommonItemProperties {
+ clip_rect: rect(0.0, 0.0, 1000.0, 1000.0),
+ clip_id,
+ spatial_id: root_space_and_clip.spatial_id,
+ flags: PrimitiveFlags::default(),
+ hit_info: None,
+ };
+
+ builder.push_repeating_image(
+ &info,
+ rect(50.0, 50.0, 400.0, 400.0),
+ size2(400.0, 400.0),
+ size2(400.0, 400.0),
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img2.as_image(),
+ ColorF::WHITE,
+ );
+ let mut epoch = Epoch(0);
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+
+ let reference_pixels = self.render_and_get_pixels(window_rect);
+
+ assert_eq!(resized_pixels, reference_pixels);
+
+ txn = Transaction::new();
+ txn.delete_blob_image(blob_img);
+ txn.delete_blob_image(blob_img2);
+ self.wrench.api.send_transaction(self.wrench.document_id, txn);
+ }
+
+ fn test_offscreen_blob(&mut self) {
+ println!("\toffscreen blob update...");
+
+ assert_eq!(self.wrench.device_pixel_ratio, 1.);
+
+ let window_size = self.window.get_inner_size();
+
+ let test_size = FramebufferIntSize::new(800, 800);
+ let window_rect = FramebufferIntRect::new(
+ point2(0, window_size.height - test_size.height),
+ test_size,
+ );
+
+ // This exposes a crash in tile decomposition
+ let mut txn = Transaction::new();
+ let layout_size = LayoutSize::new(800., 800.);
+
+ let blob_img = self.wrench.api.generate_blob_image_key();
+ txn.add_blob_image(
+ blob_img,
+ ImageDescriptor::new(1510, 1510, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ rect(0, 0, 1510, 1510),
+ None,
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let info = self.make_common_properties(rect(0., 0.0, 1510., 1510.));
+
+ let image_size = size2(1510., 1510.);
+
+ // setup some malicious image size parameters
+ builder.push_repeating_image(
+ &info,
+ info.clip_rect,
+ image_size,
+ image_size,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+
+ let mut epoch = Epoch(0);
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+
+ let original_pixels = self.render_and_get_pixels(window_rect);
+
+ let mut epoch = Epoch(1);
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let info = self.make_common_properties(rect(-10000., 0.0, 1510., 1510.));
+
+ let image_size = size2(1510., 1510.);
+
+ // setup some malicious image size parameters
+ builder.push_repeating_image(
+ &info,
+ info.clip_rect,
+ image_size,
+ image_size,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+
+ self.submit_dl(&mut epoch, layout_size, builder, Transaction::new());
+
+ let _offscreen_pixels = self.render_and_get_pixels(window_rect);
+
+ let mut txn = Transaction::new();
+
+ txn.update_blob_image(
+ blob_img,
+ ImageDescriptor::new(1510, 1510, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ rect(0, 0, 1510, 1510),
+ &rect(10, 10, 100, 100).into(),
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let info = self.make_common_properties(rect(0., 0.0, 1510., 1510.));
+
+ let image_size = size2(1510., 1510.);
+
+ // setup some malicious image size parameters
+ builder.push_repeating_image(
+ &info,
+ info.clip_rect,
+ image_size,
+ image_size,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+
+ let mut epoch = Epoch(2);
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+
+ let pixels = self.render_and_get_pixels(window_rect);
+
+ self.compare_pixels(original_pixels, pixels, window_rect.size);
+
+ // Leaving a tiled blob image in the resource cache
+ // confuses the `test_capture`. TODO: remove this
+ txn = Transaction::new();
+ txn.delete_blob_image(blob_img);
+ self.wrench.api.send_transaction(self.wrench.document_id, txn);
+ }
+
+ fn test_retained_blob_images_test(&mut self) {
+ println!("\tretained blob images test...");
+ let blob_img;
+ let window_size = self.window.get_inner_size();
+
+ let test_size = FramebufferIntSize::new(400, 400);
+ let window_rect = FramebufferIntRect::new(
+ FramebufferIntPoint::new(0, window_size.height - test_size.height),
+ test_size,
+ );
+ let layout_size = LayoutSize::new(400., 400.);
+
+ let mut txn = Transaction::new();
+ {
+ let api = &self.wrench.api;
+
+ blob_img = api.generate_blob_image_key();
+ txn.add_blob_image(
+ blob_img,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ rect(0, 0, 500, 500),
+ None,
+ );
+ }
+
+ let called = Arc::new(AtomicIsize::new(0));
+ let called_inner = Arc::clone(&called);
+
+ self.wrench.callbacks.lock().unwrap().request = Box::new(move |_| {
+ assert_eq!(0, called_inner.fetch_add(1, Ordering::SeqCst));
+ });
+
+ // draw the blob the first time
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ let info = self.make_common_properties(rect(0.0, 60.0, 200.0, 200.0));
+
+ builder.push_image(
+ &info,
+ info.clip_rect,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+
+ let mut epoch = Epoch(0);
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+
+ let pixels_first = self.render_and_get_pixels(window_rect);
+
+ assert_eq!(1, called.load(Ordering::SeqCst));
+
+ // draw the blob image a second time at a different location
+
+ // make a new display list that refers to the first image
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ let info = self.make_common_properties(rect(1.0, 60.0, 200.0, 200.0));
+ builder.push_image(
+ &info,
+ info.clip_rect,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+
+ let mut txn = Transaction::new();
+ txn.resource_updates.clear();
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+
+ let pixels_second = self.render_and_get_pixels(window_rect);
+
+ // make sure we only requested once
+ assert_eq!(1, called.load(Ordering::SeqCst));
+
+ // use png;
+ // png::save_flipped("out1.png", &pixels_first, window_rect.size);
+ // png::save_flipped("out2.png", &pixels_second, window_rect.size);
+ assert!(pixels_first != pixels_second);
+
+ // cleanup
+ *self.wrench.callbacks.lock().unwrap() = blob::BlobCallbacks::new();
+ }
+
+ fn test_blob_update_epoch_test(&mut self) {
+ println!("\tblob update epoch test...");
+ let (blob_img, blob_img2);
+ let window_size = self.window.get_inner_size();
+
+ let test_size = FramebufferIntSize::new(400, 400);
+ let window_rect = FramebufferIntRect::new(
+ point2(0, window_size.height - test_size.height),
+ test_size,
+ );
+ let layout_size = LayoutSize::new(400., 400.);
+
+ let mut txn = Transaction::new();
+ let (blob_img, blob_img2) = {
+ let api = &self.wrench.api;
+
+ blob_img = api.generate_blob_image_key();
+ txn.add_blob_image(
+ blob_img,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ rect(0, 0, 500, 500),
+ None,
+ );
+ blob_img2 = api.generate_blob_image_key();
+ txn.add_blob_image(
+ blob_img2,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(80, 50, 150, 255)),
+ rect(0, 0, 500, 500),
+ None,
+ );
+ (blob_img, blob_img2)
+ };
+
+ // setup some counters to count how many times each image is requested
+ let img1_requested = Arc::new(AtomicIsize::new(0));
+ let img1_requested_inner = Arc::clone(&img1_requested);
+ let img2_requested = Arc::new(AtomicIsize::new(0));
+ let img2_requested_inner = Arc::clone(&img2_requested);
+
+ // track the number of times that the second image has been requested
+ self.wrench.callbacks.lock().unwrap().request = Box::new(move |requests| {
+ for item in requests {
+ if item.request.key == blob_img {
+ img1_requested_inner.fetch_add(1, Ordering::SeqCst);
+ }
+ if item.request.key == blob_img2 {
+ img2_requested_inner.fetch_add(1, Ordering::SeqCst);
+ }
+ }
+ });
+
+ // create two blob images and draw them
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ let info = self.make_common_properties(rect(0.0, 60.0, 200.0, 200.0));
+ let info2 = self.make_common_properties(rect(200.0, 60.0, 200.0, 200.0));
+ let push_images = |builder: &mut DisplayListBuilder| {
+ builder.push_image(
+ &info,
+ info.clip_rect,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+ builder.push_image(
+ &info2,
+ info2.clip_rect,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img2.as_image(),
+ ColorF::WHITE,
+ );
+ };
+
+ push_images(&mut builder);
+
+ let mut epoch = Epoch(0);
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+ let _pixels_first = self.render_and_get_pixels(window_rect);
+
+ // update and redraw both images
+ let mut txn = Transaction::new();
+ txn.update_blob_image(
+ blob_img,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ rect(0, 0, 500, 500),
+ &rect(100, 100, 100, 100).into(),
+ );
+ txn.update_blob_image(
+ blob_img2,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(59, 50, 150, 255)),
+ rect(0, 0, 500, 500),
+ &rect(100, 100, 100, 100).into(),
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ push_images(&mut builder);
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+ let _pixels_second = self.render_and_get_pixels(window_rect);
+
+ // only update the first image
+ let mut txn = Transaction::new();
+ txn.update_blob_image(
+ blob_img,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 150, 150, 255)),
+ rect(0, 0, 500, 500),
+ &rect(200, 200, 100, 100).into(),
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ push_images(&mut builder);
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+ let _pixels_third = self.render_and_get_pixels(window_rect);
+
+ // the first image should be requested 3 times
+ assert_eq!(img1_requested.load(Ordering::SeqCst), 3);
+ // the second image should've been requested twice
+ assert_eq!(img2_requested.load(Ordering::SeqCst), 2);
+
+ // cleanup
+ *self.wrench.callbacks.lock().unwrap() = blob::BlobCallbacks::new();
+ }
+
+ fn test_blob_update_test(&mut self) {
+ println!("\tblob update test...");
+ let window_size = self.window.get_inner_size();
+
+ let test_size = FramebufferIntSize::new(400, 400);
+ let window_rect = FramebufferIntRect::new(
+ point2(0, window_size.height - test_size.height),
+ test_size,
+ );
+ let layout_size = LayoutSize::new(400., 400.);
+ let mut txn = Transaction::new();
+
+ let blob_img = {
+ let img = self.wrench.api.generate_blob_image_key();
+ txn.add_blob_image(
+ img,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ rect(0, 0, 500, 500),
+ None,
+ );
+ img
+ };
+
+ // draw the blobs the first time
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ let info = self.make_common_properties(rect(0.0, 60.0, 200.0, 200.0));
+
+ builder.push_image(
+ &info,
+ info.clip_rect,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+
+ let mut epoch = Epoch(0);
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+ let pixels_first = self.render_and_get_pixels(window_rect);
+
+ // draw the blob image a second time after updating it with the same color
+ let mut txn = Transaction::new();
+ txn.update_blob_image(
+ blob_img,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 50, 150, 255)),
+ rect(0, 0, 500, 500),
+ &rect(100, 100, 100, 100).into(),
+ );
+
+ // make a new display list that refers to the first image
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ let info = self.make_common_properties(rect(0.0, 60.0, 200.0, 200.0));
+ builder.push_image(
+ &info,
+ info.clip_rect,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+ let pixels_second = self.render_and_get_pixels(window_rect);
+
+ // draw the blob image a third time after updating it with a different color
+ let mut txn = Transaction::new();
+ txn.update_blob_image(
+ blob_img,
+ ImageDescriptor::new(500, 500, ImageFormat::BGRA8, ImageDescriptorFlags::empty()),
+ blob::serialize_blob(ColorU::new(50, 150, 150, 255)),
+ rect(0, 0, 500, 500),
+ &rect(200, 200, 100, 100).into(),
+ );
+
+ // make a new display list that refers to the first image
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ let info = self.make_common_properties(rect(0.0, 60.0, 200.0, 200.0));
+ builder.push_image(
+ &info,
+ info.clip_rect,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ blob_img.as_image(),
+ ColorF::WHITE,
+ );
+
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+ let pixels_third = self.render_and_get_pixels(window_rect);
+
+ assert!(pixels_first != pixels_third);
+ self.compare_pixels(pixels_first, pixels_second, window_rect.size);
+ }
+
+ // Ensures that content doing a save-restore produces the same results as not
+ fn test_save_restore(&mut self) {
+ println!("\tsave/restore...");
+ let window_size = self.window.get_inner_size();
+
+ let test_size = FramebufferIntSize::new(400, 400);
+ let window_rect = FramebufferIntRect::new(
+ point2(0, window_size.height - test_size.height),
+ test_size,
+ );
+ let layout_size = LayoutSize::new(400., 400.);
+
+ let mut do_test = |should_try_and_fail| {
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let spatial_id = SpatialId::root_scroll_node(self.wrench.root_pipeline_id);
+ let clip_id = builder.define_clip_rect(
+ &SpaceAndClipInfo::root_scroll(self.wrench.root_pipeline_id),
+ rect(110., 120., 200., 200.),
+ );
+ builder.push_rect(
+ &self.make_common_properties_with_clip_and_spatial(
+ rect(100., 100., 100., 100.),
+ clip_id,
+ spatial_id),
+ rect(100., 100., 100., 100.),
+ ColorF::new(0.0, 0.0, 1.0, 1.0),
+ );
+
+ if should_try_and_fail {
+ builder.save();
+ let clip_id = builder.define_clip_rect(
+ &SpaceAndClipInfo { spatial_id, clip_id },
+ rect(80., 80., 90., 90.),
+ );
+ let space_and_clip = SpaceAndClipInfo {
+ spatial_id,
+ clip_id
+ };
+ builder.push_rect(
+ &self.make_common_properties_with_clip_and_spatial(
+ rect(110., 110., 50., 50.),
+ clip_id,
+ spatial_id),
+ rect(110., 110., 50., 50.),
+ ColorF::new(0.0, 1.0, 0.0, 1.0),
+ );
+ builder.push_shadow(
+ &space_and_clip,
+ Shadow {
+ offset: LayoutVector2D::new(1.0, 1.0),
+ blur_radius: 1.0,
+ color: ColorF::new(0.0, 0.0, 0.0, 1.0),
+ },
+ true,
+ );
+ let info = CommonItemProperties {
+ clip_rect: rect(110., 110., 50., 2.),
+ clip_id,
+ spatial_id,
+ flags: PrimitiveFlags::default(),
+ hit_info: None,
+ };
+ builder.push_line(
+ &info,
+ &info.clip_rect,
+ 0.0, LineOrientation::Horizontal,
+ &ColorF::new(0.0, 0.0, 0.0, 1.0),
+ LineStyle::Solid,
+ );
+ builder.restore();
+ }
+
+ {
+ builder.save();
+ let clip_id = builder.define_clip_rect(
+ &SpaceAndClipInfo { spatial_id, clip_id },
+ rect(80., 80., 100., 100.),
+ );
+ builder.push_rect(
+ &self.make_common_properties_with_clip_and_spatial(
+ rect(150., 150., 100., 100.),
+ clip_id,
+ spatial_id),
+ rect(150., 150., 100., 100.),
+ ColorF::new(0.0, 0.0, 1.0, 1.0),
+ );
+ builder.clear_save();
+ }
+
+ let txn = Transaction::new();
+
+ self.submit_dl(&mut Epoch(0), layout_size, builder, txn);
+
+ self.render_and_get_pixels(window_rect)
+ };
+
+ let first = do_test(false);
+ let second = do_test(true);
+
+ self.compare_pixels(first, second, window_rect.size);
+ }
+
+ // regression test for #2769
+ // "async scene building: cache collisions from reused picture ids"
+ fn test_blur_cache(&mut self) {
+ println!("\tblur cache...");
+ let window_size = self.window.get_inner_size();
+
+ let test_size = FramebufferIntSize::new(400, 400);
+ let window_rect = FramebufferIntRect::new(
+ point2(0, window_size.height - test_size.height),
+ test_size,
+ );
+ let layout_size = LayoutSize::new(400., 400.);
+
+ let mut do_test = |shadow_is_red| {
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ let shadow_color = if shadow_is_red {
+ ColorF::new(1.0, 0.0, 0.0, 1.0)
+ } else {
+ ColorF::new(0.0, 1.0, 0.0, 1.0)
+ };
+
+ builder.push_shadow(
+ &SpaceAndClipInfo::root_scroll(self.wrench.root_pipeline_id),
+ Shadow {
+ offset: LayoutVector2D::new(1.0, 1.0),
+ blur_radius: 1.0,
+ color: shadow_color,
+ },
+ true,
+ );
+ let info = self.make_common_properties(rect(110., 110., 50., 2.));
+ builder.push_line(
+ &info,
+ &info.clip_rect,
+ 0.0, LineOrientation::Horizontal,
+ &ColorF::new(0.0, 0.0, 0.0, 1.0),
+ LineStyle::Solid,
+ );
+ builder.pop_all_shadows();
+
+ let txn = Transaction::new();
+ self.submit_dl(&mut Epoch(0), layout_size, builder, txn);
+
+ self.render_and_get_pixels(window_rect)
+ };
+
+ let first = do_test(false);
+ let second = do_test(true);
+
+ assert_ne!(first, second);
+ }
+
+ fn test_capture(&mut self) {
+ println!("\tcapture...");
+ let path = "../captures/test";
+ let layout_size = LayoutSize::new(400., 400.);
+ let dim = self.window.get_inner_size();
+ let window_rect = FramebufferIntRect::new(
+ point2(0, dim.height - layout_size.height as i32),
+ size2(layout_size.width as i32, layout_size.height as i32),
+ );
+
+ // 1. render some scene
+
+ let mut txn = Transaction::new();
+ let image = self.wrench.api.generate_image_key();
+ txn.add_image(
+ image,
+ ImageDescriptor::new(1, 1, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(vec![0xFF, 0, 0, 0xFF]),
+ None,
+ );
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let info = self.make_common_properties(rect(300.0, 70.0, 150.0, 50.0));
+ builder.push_image(
+ &info,
+ info.clip_rect,
+ ImageRendering::Auto,
+ AlphaType::PremultipliedAlpha,
+ image,
+ ColorF::WHITE,
+ );
+
+ let mut txn = Transaction::new();
+
+ txn.set_display_list(
+ Epoch(0),
+ Some(ColorF::new(1.0, 1.0, 1.0, 1.0)),
+ layout_size,
+ builder.finalize(),
+ false,
+ );
+ txn.generate_frame();
+
+ self.wrench.api.send_transaction(self.wrench.document_id, txn);
+
+ let pixels0 = self.render_and_get_pixels(window_rect);
+
+ // 2. capture it
+ self.wrench.api.save_capture(path.into(), CaptureBits::all());
+
+ // 3. set a different scene
+
+ builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let mut txn = Transaction::new();
+ txn.set_display_list(
+ Epoch(1),
+ Some(ColorF::new(1.0, 0.0, 0.0, 1.0)),
+ layout_size,
+ builder.finalize(),
+ false,
+ );
+ self.wrench.api.send_transaction(self.wrench.document_id, txn);
+
+ // 4. load the first one
+
+ let mut documents = self.wrench.api.load_capture(path.into(), None);
+ let captured = documents.swap_remove(0);
+
+ // 5. render the built frame and compare
+ let pixels1 = self.render_and_get_pixels(window_rect);
+ self.compare_pixels(pixels0.clone(), pixels1, window_rect.size);
+
+ // 6. rebuild the scene and compare again
+ let mut txn = Transaction::new();
+ txn.set_root_pipeline(captured.root_pipeline_id.unwrap());
+ txn.generate_frame();
+ self.wrench.api.send_transaction(captured.document_id, txn);
+ let pixels2 = self.render_and_get_pixels(window_rect);
+ self.compare_pixels(pixels0, pixels2, window_rect.size);
+ }
+
+ fn test_zero_height_window(&mut self) {
+ println!("\tzero height test...");
+
+ let layout_size = LayoutSize::new(120.0, 0.0);
+ let window_size = DeviceIntSize::new(layout_size.width as i32, layout_size.height as i32);
+ let doc_id = self.wrench.api.add_document(window_size, 1);
+
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+ let info = self.make_common_properties(LayoutRect::new(LayoutPoint::zero(),
+ LayoutSize::new(100.0, 100.0)));
+ builder.push_rect(
+ &info,
+ info.clip_rect,
+ ColorF::new(0.0, 1.0, 0.0, 1.0),
+ );
+
+ let mut txn = Transaction::new();
+ txn.set_root_pipeline(self.wrench.root_pipeline_id);
+ txn.set_display_list(
+ Epoch(1),
+ Some(ColorF::new(1.0, 0.0, 0.0, 1.0)),
+ layout_size,
+ builder.finalize(),
+ false,
+ );
+ txn.generate_frame();
+ self.wrench.api.send_transaction(doc_id, txn);
+
+ // Ensure we get a notification from rendering the above, even though
+ // there are zero visible pixels
+ assert!(self.rx.recv().unwrap() == NotifierEvent::WakeUp);
+ }
+
+
+ fn test_hit_testing(&mut self) {
+ println!("\thit testing test...");
+
+ let layout_size = LayoutSize::new(400., 400.);
+ let mut builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ // Add a rectangle that covers the entire scene.
+ let mut info = self.make_common_properties(LayoutRect::new(LayoutPoint::zero(), layout_size));
+ info.hit_info = Some((0, 1));
+ builder.push_rect(&info, info.clip_rect, ColorF::new(1.0, 1.0, 1.0, 1.0));
+
+ // Add a simple 100x100 rectangle at 100,0.
+ let mut info = self.make_common_properties(LayoutRect::new(
+ LayoutPoint::new(100., 0.),
+ LayoutSize::new(100., 100.)
+ ));
+ info.hit_info = Some((0, 2));
+ builder.push_rect(&info, info.clip_rect, ColorF::new(1.0, 1.0, 1.0, 1.0));
+
+ let space_and_clip = SpaceAndClipInfo::root_scroll(self.wrench.root_pipeline_id);
+
+ let make_rounded_complex_clip = |rect: &LayoutRect, radius: f32| -> ComplexClipRegion {
+ ComplexClipRegion::new(
+ *rect,
+ BorderRadius::uniform_size(LayoutSize::new(radius, radius)),
+ ClipMode::Clip
+ )
+ };
+
+ // Add a rectangle that is clipped by a rounded rect clip item.
+ let rect = LayoutRect::new(LayoutPoint::new(100., 100.), LayoutSize::new(100., 100.));
+ let temp_clip_id = builder.define_clip_rounded_rect(
+ &space_and_clip,
+ make_rounded_complex_clip(&rect, 20.),
+ );
+ builder.push_rect(
+ &CommonItemProperties {
+ hit_info: Some((0, 4)),
+ clip_rect: rect,
+ clip_id: temp_clip_id,
+ spatial_id: space_and_clip.spatial_id,
+ flags: PrimitiveFlags::default(),
+ },
+ rect,
+ ColorF::new(1.0, 1.0, 1.0, 1.0),
+ );
+
+ // Add a rectangle that is clipped by a ClipChain containing a rounded rect.
+ let rect = LayoutRect::new(LayoutPoint::new(200., 100.), LayoutSize::new(100., 100.));
+ let clip_id = builder.define_clip_rounded_rect(
+ &space_and_clip,
+ make_rounded_complex_clip(&rect, 20.),
+ );
+ let clip_chain_id = builder.define_clip_chain(None, vec![clip_id]);
+ builder.push_rect(
+ &CommonItemProperties {
+ hit_info: Some((0, 5)),
+ clip_rect: rect,
+ clip_id: ClipId::ClipChain(clip_chain_id),
+ spatial_id: space_and_clip.spatial_id,
+ flags: PrimitiveFlags::default(),
+ },
+ rect,
+ ColorF::new(1.0, 1.0, 1.0, 1.0),
+ );
+
+ let mut epoch = Epoch(0);
+ let txn = Transaction::new();
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+
+ // We render to ensure that the hit tester is up to date with the current scene.
+ self.rx.recv().unwrap();
+ self.wrench.render();
+
+ let hit_test = |point: WorldPoint| -> HitTestResult {
+ self.wrench.api.hit_test(
+ self.wrench.document_id,
+ None,
+ point,
+ HitTestFlags::FIND_ALL,
+ )
+ };
+
+ let assert_hit_test = |point: WorldPoint, tags: Vec<ItemTag>| {
+ let result = hit_test(point);
+ assert_eq!(result.items.len(), tags.len());
+
+ for (hit_test_item, item_b) in result.items.iter().zip(tags.iter()) {
+ assert_eq!(hit_test_item.tag, *item_b);
+ }
+ };
+
+ // We should not have any hits outside the boundaries of the scene.
+ assert_hit_test(WorldPoint::new(-10., -10.), Vec::new());
+ assert_hit_test(WorldPoint::new(-10., 10.), Vec::new());
+ assert_hit_test(WorldPoint::new(450., 450.), Vec::new());
+ assert_hit_test(WorldPoint::new(100., 450.), Vec::new());
+
+ // The top left corner of the scene should only contain the background.
+ assert_hit_test(WorldPoint::new(50., 50.), vec![(0, 1)]);
+
+ // The middle of the normal rectangle should be hit.
+ assert_hit_test(WorldPoint::new(150., 50.), vec![(0, 2), (0, 1)]);
+
+ let test_rounded_rectangle = |point: WorldPoint, size: WorldSize, tag: ItemTag| {
+ // The cut out corners of the rounded rectangle should not be hit.
+ let top_left = point + WorldVector2D::new(5., 5.);
+ let bottom_right = point + size.to_vector() - WorldVector2D::new(5., 5.);
+
+ assert_hit_test(
+ WorldPoint::new(point.x + (size.width / 2.), point.y + (size.height / 2.)),
+ vec![tag, (0, 1)]
+ );
+
+ assert_hit_test(top_left, vec![(0, 1)]);
+ assert_hit_test(WorldPoint::new(bottom_right.x, top_left.y), vec![(0, 1)]);
+ assert_hit_test(WorldPoint::new(top_left.x, bottom_right.y), vec![(0, 1)]);
+ assert_hit_test(bottom_right, vec![(0, 1)]);
+ };
+
+ test_rounded_rectangle(WorldPoint::new(100., 100.), WorldSize::new(100., 100.), (0, 4));
+ test_rounded_rectangle(WorldPoint::new(200., 100.), WorldSize::new(100., 100.), (0, 5));
+ }
+
+ fn test_clear_cache(&mut self) {
+ println!("\tclear cache test...");
+
+ self.wrench.api.send_message(ApiMsg::DebugCommand(DebugCommand::ClearCaches(ClearCache::all())));
+
+ let layout_size = LayoutSize::new(400., 400.);
+ let builder = DisplayListBuilder::new(self.wrench.root_pipeline_id, layout_size);
+
+ let txn = Transaction::new();
+ let mut epoch = Epoch(0);
+ self.submit_dl(&mut epoch, layout_size, builder, txn);
+
+ self.rx.recv().unwrap();
+ self.wrench.render();
+ }
+}
diff --git a/third_party/webrender/wrench/src/reftest.rs b/third_party/webrender/wrench/src/reftest.rs
new file mode 100644
index 00000000000..e05f194105a
--- /dev/null
+++ b/third_party/webrender/wrench/src/reftest.rs
@@ -0,0 +1,995 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use crate::{WindowWrapper, NotifierEvent};
+use base64;
+use semver;
+use image::load as load_piston_image;
+use image::png::PNGEncoder;
+use image::{ColorType, ImageFormat};
+use crate::parse_function::parse_function;
+use crate::png::save_flipped;
+use std::{cmp, env};
+use std::fmt::{Display, Error, Formatter};
+use std::fs::File;
+use std::io::{BufRead, BufReader};
+use std::path::{Path, PathBuf};
+use std::process::Command;
+use std::sync::mpsc::Receiver;
+use webrender::RenderResults;
+use webrender::api::*;
+use webrender::api::units::*;
+use crate::wrench::{Wrench, WrenchThing};
+use crate::yaml_frame_reader::YamlFrameReader;
+
+
+const OPTION_DISABLE_SUBPX: &str = "disable-subpixel";
+const OPTION_DISABLE_AA: &str = "disable-aa";
+const OPTION_DISABLE_DUAL_SOURCE_BLENDING: &str = "disable-dual-source-blending";
+const OPTION_ALLOW_MIPMAPS: &str = "allow-mipmaps";
+
+pub struct ReftestOptions {
+ // These override values that are lower.
+ pub allow_max_difference: usize,
+ pub allow_num_differences: usize,
+}
+
+impl ReftestOptions {
+ pub fn default() -> Self {
+ ReftestOptions {
+ allow_max_difference: 0,
+ allow_num_differences: 0,
+ }
+ }
+}
+
+#[derive(Debug, Copy, Clone)]
+pub enum ReftestOp {
+ /// Expect that the images match the reference
+ Equal,
+ /// Expect that the images *don't* match the reference
+ NotEqual,
+ /// Expect that drawing the reference at different tiles sizes gives the same pixel exact result.
+ Accurate,
+ /// Expect that drawing the reference at different tiles sizes gives a *different* pixel exact result.
+ Inaccurate,
+}
+
+impl Display for ReftestOp {
+ fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {
+ write!(
+ f,
+ "{}",
+ match *self {
+ ReftestOp::Equal => "==".to_owned(),
+ ReftestOp::NotEqual => "!=".to_owned(),
+ ReftestOp::Accurate => "**".to_owned(),
+ ReftestOp::Inaccurate => "!*".to_owned(),
+ }
+ )
+ }
+}
+
+#[derive(Debug)]
+enum ExtraCheck {
+ DrawCalls(usize),
+ AlphaTargets(usize),
+ ColorTargets(usize),
+ /// Checks the dirty region when rendering the test at |index| in the
+ /// sequence, and compares its serialization to |region|.
+ DirtyRegion { index: usize, region: String },
+}
+
+impl ExtraCheck {
+ fn run(&self, results: &[RenderResults]) -> bool {
+ match *self {
+ ExtraCheck::DrawCalls(x) =>
+ x == results.last().unwrap().stats.total_draw_calls,
+ ExtraCheck::AlphaTargets(x) =>
+ x == results.last().unwrap().stats.alpha_target_count,
+ ExtraCheck::ColorTargets(x) =>
+ x == results.last().unwrap().stats.color_target_count,
+ ExtraCheck::DirtyRegion { index, ref region } => {
+ *region == format!("{}", results[index].recorded_dirty_regions[0])
+ }
+ }
+ }
+}
+
+pub struct RefTestFuzzy {
+ max_difference: usize,
+ num_differences: usize,
+}
+
+pub struct Reftest {
+ op: ReftestOp,
+ test: Vec<PathBuf>,
+ reference: PathBuf,
+ font_render_mode: Option<FontRenderMode>,
+ fuzziness: Vec<RefTestFuzzy>,
+ extra_checks: Vec<ExtraCheck>,
+ disable_dual_source_blending: bool,
+ allow_mipmaps: bool,
+ zoom_factor: f32,
+ force_subpixel_aa_where_possible: Option<bool>,
+}
+
+impl Reftest {
+ /// Check the positive case (expecting equality) and report details if different
+ fn check_and_report_equality_failure(
+ &self,
+ comparison: ReftestImageComparison,
+ test: &ReftestImage,
+ reference: &ReftestImage,
+ ) -> bool {
+ match comparison {
+ ReftestImageComparison::Equal => {
+ true
+ }
+ ReftestImageComparison::NotEqual { difference_histogram, max_difference, count_different } => {
+ // Each entry in the sorted self.fuzziness list represents a bucket which
+ // allows at most num_differences pixels with a difference of at most
+ // max_difference -- but with the caveat that a difference which is small
+ // enough to be less than a max_difference of an earlier bucket, must be
+ // counted against that bucket.
+ //
+ // Thus the test will fail if the number of pixels with a difference
+ // > fuzzy[j-1].max_difference and <= fuzzy[j].max_difference
+ // exceeds fuzzy[j].num_differences.
+ //
+ // (For the first entry, consider fuzzy[j-1] to allow zero pixels of zero
+ // difference).
+ //
+ // For example, say we have this histogram of differences:
+ //
+ // | [0] [1] [2] [3] [4] [5] [6] ... [255]
+ // ------+------------------------------------------
+ // Hist. | 0 3 2 1 6 2 0 ... 0
+ //
+ // Ie. image comparison found 3 pixels that differ by 1, 2 that differ by 2, etc.
+ // (Note that entry 0 is always zero, we don't count matching pixels.)
+ //
+ // First we calculate an inclusive prefix sum:
+ //
+ // | [0] [1] [2] [3] [4] [5] [6] ... [255]
+ // ------+------------------------------------------
+ // Hist. | 0 3 2 1 6 2 0 ... 0
+ // Sum | 0 3 5 6 12 14 14 ... 14
+ //
+ // Let's say the fuzzy statements are:
+ // Fuzzy( 2, 6 ) -- allow up to 6 pixels that differ by 2 or less
+ // Fuzzy( 4, 8 ) -- allow up to 8 pixels that differ by 4 or less _but_
+ // also by more than 2 (= by 3 or 4).
+ //
+ // The first check is Sum[2] <= max 6 which passes: 5 <= 6.
+ // The second check is Sum[4] - Sum[2] <= max 8 which passes: 12-5 <= 8.
+ // Finally we check if there are any pixels that exceed the max difference (4)
+ // by checking Sum[255] - Sum[4] which shows there are 14-12 == 2 so we fail.
+
+ let prefix_sum = difference_histogram.iter()
+ .scan(0, |sum, i| { *sum += i; Some(*sum) })
+ .collect::<Vec<_>>();
+
+ // check each fuzzy statement for violations.
+ assert_eq!(0, difference_histogram[0]);
+ assert_eq!(0, prefix_sum[0]);
+
+ // loop invariant: this is the max_difference of the previous iteration's 'fuzzy'
+ let mut previous_max_diff = 0;
+
+ // loop invariant: this is the number of pixels to ignore as they have been counted
+ // against previous iterations' fuzzy statements.
+ let mut previous_sum_fail = 0; // == prefix_sum[previous_max_diff]
+
+ let mut is_failing = false;
+ let mut fail_text = String::new();
+
+ for fuzzy in &self.fuzziness {
+ let fuzzy_max_difference = cmp::min(255, fuzzy.max_difference);
+ let num_differences = prefix_sum[fuzzy_max_difference] - previous_sum_fail;
+ if num_differences > fuzzy.num_differences {
+ fail_text.push_str(
+ &format!("{} differences > {} and <= {} (allowed {}); ",
+ num_differences,
+ previous_max_diff, fuzzy_max_difference,
+ fuzzy.num_differences));
+ is_failing = true;
+ }
+ previous_max_diff = fuzzy_max_difference;
+ previous_sum_fail = prefix_sum[previous_max_diff];
+ }
+ // do we have any pixels with a difference above the highest allowed
+ // max difference? if so, we fail the test:
+ let num_differences = prefix_sum[255] - previous_sum_fail;
+ if num_differences > 0 {
+ fail_text.push_str(
+ &format!("{} num_differences > {} and <= {} (allowed {}); ",
+ num_differences,
+ previous_max_diff, 255,
+ 0));
+ is_failing = true;
+ }
+
+ if is_failing {
+ println!(
+ "{} | {} | {}: {}, {}: {} | {}",
+ "REFTEST TEST-UNEXPECTED-FAIL",
+ self,
+ "image comparison, max difference",
+ max_difference,
+ "number of differing pixels",
+ count_different,
+ fail_text,
+ );
+ println!("REFTEST IMAGE 1 (TEST): {}", test.clone().create_data_uri());
+ println!(
+ "REFTEST IMAGE 2 (REFERENCE): {}",
+ reference.clone().create_data_uri()
+ );
+ println!("REFTEST TEST-END | {}", self);
+
+ false
+ } else {
+ true
+ }
+ }
+ }
+ }
+
+ /// Report details of the negative case
+ fn report_unexpected_equality(&self) {
+ println!("REFTEST TEST-UNEXPECTED-FAIL | {} | image comparison", self);
+ println!("REFTEST TEST-END | {}", self);
+ }
+}
+
+impl Display for Reftest {
+ fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {
+ let paths: Vec<String> = self.test.iter().map(|t| t.display().to_string()).collect();
+ write!(
+ f,
+ "{} {} {}",
+ paths.join(", "),
+ self.op,
+ self.reference.display()
+ )
+ }
+}
+
+#[derive(Clone)]
+pub struct ReftestImage {
+ pub data: Vec<u8>,
+ pub size: DeviceIntSize,
+}
+
+#[derive(Debug, Clone)]
+pub enum ReftestImageComparison {
+ Equal,
+ NotEqual {
+ /// entry[j] = number of pixels with a difference of exactly j
+ difference_histogram: Vec<usize>,
+ max_difference: usize,
+ count_different: usize,
+ },
+}
+
+impl ReftestImage {
+ pub fn compare(&self, other: &ReftestImage) -> ReftestImageComparison {
+ assert_eq!(self.size, other.size);
+ assert_eq!(self.data.len(), other.data.len());
+ assert_eq!(self.data.len() % 4, 0);
+
+ let mut histogram = [0usize; 256];
+ let mut count = 0;
+ let mut max = 0;
+
+ for (a, b) in self.data.chunks(4).zip(other.data.chunks(4)) {
+ if a != b {
+ let pixel_max = a.iter()
+ .zip(b.iter())
+ .map(|(x, y)| (*x as isize - *y as isize).abs() as usize)
+ .max()
+ .unwrap();
+
+ count += 1;
+ assert!(pixel_max < 256, "pixel values are not 8 bit, update the histogram binning code");
+ // deliberately avoid counting pixels that match --
+ // histogram[0] stays at zero.
+ // this helps our prefix sum later during analysis to
+ // only count actual differences.
+ histogram[pixel_max as usize] += 1;
+ max = cmp::max(max, pixel_max);
+ }
+ }
+
+ if count != 0 {
+ ReftestImageComparison::NotEqual {
+ difference_histogram: histogram.to_vec(),
+ max_difference: max,
+ count_different: count,
+ }
+ } else {
+ ReftestImageComparison::Equal
+ }
+ }
+
+ pub fn create_data_uri(mut self) -> String {
+ let width = self.size.width;
+ let height = self.size.height;
+
+ // flip image vertically (texture is upside down)
+ let orig_pixels = self.data.clone();
+ let stride = width as usize * 4;
+ for y in 0 .. height as usize {
+ let dst_start = y * stride;
+ let src_start = (height as usize - y - 1) * stride;
+ let src_slice = &orig_pixels[src_start .. src_start + stride];
+ (&mut self.data[dst_start .. dst_start + stride])
+ .clone_from_slice(&src_slice[.. stride]);
+ }
+
+ let mut png: Vec<u8> = vec![];
+ {
+ let encoder = PNGEncoder::new(&mut png);
+ encoder
+ .encode(&self.data[..], width as u32, height as u32, ColorType::Rgba8)
+ .expect("Unable to encode PNG!");
+ }
+ let png_base64 = base64::encode(&png);
+ format!("data:image/png;base64,{}", png_base64)
+ }
+}
+
+struct ReftestManifest {
+ reftests: Vec<Reftest>,
+}
+impl ReftestManifest {
+ fn new(manifest: &Path, environment: &ReftestEnvironment, options: &ReftestOptions) -> ReftestManifest {
+ let dir = manifest.parent().unwrap();
+ let f =
+ File::open(manifest).expect(&format!("couldn't open manifest: {}", manifest.display()));
+ let file = BufReader::new(&f);
+
+ let mut reftests = Vec::new();
+
+ for line in file.lines() {
+ let l = line.unwrap();
+
+ // strip the comments
+ let s = &l[0 .. l.find('#').unwrap_or(l.len())];
+ let s = s.trim();
+ if s.is_empty() {
+ continue;
+ }
+
+ let tokens: Vec<&str> = s.split_whitespace().collect();
+
+ let mut fuzziness = Vec::new();
+ let mut op = None;
+ let mut font_render_mode = None;
+ let mut extra_checks = vec![];
+ let mut disable_dual_source_blending = false;
+ let mut zoom_factor = 1.0;
+ let mut allow_mipmaps = false;
+ let mut dirty_region_index = 0;
+ let mut force_subpixel_aa_where_possible = None;
+
+ let mut parse_command = |token: &str| -> bool {
+ match token {
+ function if function.starts_with("zoom(") => {
+ let (_, args, _) = parse_function(function);
+ zoom_factor = args[0].parse().unwrap();
+ }
+ function if function.starts_with("force_subpixel_aa_where_possible(") => {
+ let (_, args, _) = parse_function(function);
+ force_subpixel_aa_where_possible = Some(args[0].parse().unwrap());
+ }
+ function if function.starts_with("fuzzy-range(") ||
+ function.starts_with("fuzzy-range-if(") => {
+ let (_, mut args, _) = parse_function(function);
+ if function.starts_with("fuzzy-range-if(") {
+ if !environment.parse_condition(args.remove(0)).expect("unknown condition") {
+ return true;
+ }
+ fuzziness.clear();
+ }
+ let num_range = args.len() / 2;
+ for range in 0..num_range {
+ let mut max = args[range * 2 + 0];
+ let mut num = args[range * 2 + 1];
+ if max.starts_with("<=") { // trim_start_matches would allow <=<=123
+ max = &max[2..];
+ }
+ if num.starts_with("*") {
+ num = &num[1..];
+ }
+ let max_difference = max.parse().unwrap();
+ let num_differences = num.parse().unwrap();
+ fuzziness.push(RefTestFuzzy { max_difference, num_differences });
+ }
+ }
+ function if function.starts_with("fuzzy(") ||
+ function.starts_with("fuzzy-if(") => {
+ let (_, mut args, _) = parse_function(function);
+ if function.starts_with("fuzzy-if(") {
+ if !environment.parse_condition(args.remove(0)).expect("unknown condition") {
+ return true;
+ }
+ fuzziness.clear();
+ }
+ let max_difference = args[0].parse().unwrap();
+ let num_differences = args[1].parse().unwrap();
+ assert!(fuzziness.is_empty()); // if this fires, consider fuzzy-range instead
+ fuzziness.push(RefTestFuzzy { max_difference, num_differences });
+ }
+ function if function.starts_with("draw_calls(") => {
+ let (_, args, _) = parse_function(function);
+ extra_checks.push(ExtraCheck::DrawCalls(args[0].parse().unwrap()));
+ }
+ function if function.starts_with("alpha_targets(") => {
+ let (_, args, _) = parse_function(function);
+ extra_checks.push(ExtraCheck::AlphaTargets(args[0].parse().unwrap()));
+ }
+ function if function.starts_with("color_targets(") => {
+ let (_, args, _) = parse_function(function);
+ extra_checks.push(ExtraCheck::ColorTargets(args[0].parse().unwrap()));
+ }
+ function if function.starts_with("dirty(") => {
+ let (_, args, _) = parse_function(function);
+ let region: String = args[0].parse().unwrap();
+ extra_checks.push(ExtraCheck::DirtyRegion {
+ index: dirty_region_index,
+ region,
+ });
+ dirty_region_index += 1;
+ }
+ options if options.starts_with("options(") => {
+ let (_, args, _) = parse_function(options);
+ if args.iter().any(|arg| arg == &OPTION_DISABLE_SUBPX) {
+ font_render_mode = Some(FontRenderMode::Alpha);
+ }
+ if args.iter().any(|arg| arg == &OPTION_DISABLE_AA) {
+ font_render_mode = Some(FontRenderMode::Mono);
+ }
+ if args.iter().any(|arg| arg == &OPTION_DISABLE_DUAL_SOURCE_BLENDING) {
+ disable_dual_source_blending = true;
+ }
+ if args.iter().any(|arg| arg == &OPTION_ALLOW_MIPMAPS) {
+ allow_mipmaps = true;
+ }
+ }
+ _ => return false,
+ }
+ return true;
+ };
+
+ let mut paths = vec![];
+ for (i, token) in tokens.iter().enumerate() {
+ match *token {
+ "include" => {
+ assert!(i == 0, "include must be by itself");
+ let include = dir.join(tokens[1]);
+
+ reftests.append(
+ &mut ReftestManifest::new(include.as_path(), environment, options).reftests,
+ );
+
+ break;
+ }
+ "==" => {
+ op = Some(ReftestOp::Equal);
+ }
+ "!=" => {
+ op = Some(ReftestOp::NotEqual);
+ }
+ "**" => {
+ op = Some(ReftestOp::Accurate);
+ }
+ "!*" => {
+ op = Some(ReftestOp::Inaccurate);
+ }
+ cond if cond.starts_with("if(") => {
+ let (_, args, _) = parse_function(cond);
+ if environment.parse_condition(args[0]).expect("unknown condition") {
+ for command in &args[1..] {
+ parse_command(command);
+ }
+ }
+ }
+ command if parse_command(command) => {}
+ _ => {
+ match environment.parse_condition(*token) {
+ Some(true) => {}
+ Some(false) => break,
+ _ => paths.push(dir.join(*token)),
+ }
+ }
+ }
+ }
+
+ // Don't try to add tests for include lines.
+ let op = match op {
+ Some(op) => op,
+ None => {
+ assert!(paths.is_empty(), format!("paths = {:?}", paths));
+ continue;
+ }
+ };
+
+ // The reference is the last path provided. If multiple paths are
+ // passed for the test, they render sequentially before being
+ // compared to the reference, which is useful for testing
+ // invalidation.
+ let reference = paths.pop().unwrap();
+ let test = paths;
+
+ // to avoid changing the meaning of existing tests, the case of
+ // only a single (or no) 'fuzzy' keyword means we use the max
+ // of that fuzzy and options.allow_.. (we don't want that to
+ // turn into a test that allows fuzzy.allow_ *plus* options.allow_):
+ match fuzziness.len() {
+ 0 => fuzziness.push(RefTestFuzzy {
+ max_difference: options.allow_max_difference,
+ num_differences: options.allow_num_differences }),
+ 1 => {
+ let mut fuzzy = &mut fuzziness[0];
+ fuzzy.max_difference = cmp::max(fuzzy.max_difference, options.allow_max_difference);
+ fuzzy.num_differences = cmp::max(fuzzy.num_differences, options.allow_num_differences);
+ },
+ _ => {
+ // ignore options, use multiple fuzzy keywords instead. make sure
+ // the list is sorted to speed up counting violations.
+ fuzziness.sort_by(|a, b| a.max_difference.cmp(&b.max_difference));
+ for pair in fuzziness.windows(2) {
+ if pair[0].max_difference == pair[1].max_difference {
+ println!("Warning: repeated fuzzy of max_difference {} ignored.",
+ pair[1].max_difference);
+ }
+ }
+ }
+ }
+
+ reftests.push(Reftest {
+ op,
+ test,
+ reference,
+ font_render_mode,
+ fuzziness,
+ extra_checks,
+ disable_dual_source_blending,
+ allow_mipmaps,
+ zoom_factor,
+ force_subpixel_aa_where_possible,
+ });
+ }
+
+ ReftestManifest { reftests: reftests }
+ }
+
+ fn find(&self, prefix: &Path) -> Vec<&Reftest> {
+ self.reftests
+ .iter()
+ .filter(|x| {
+ x.test.iter().any(|t| t.starts_with(prefix)) || x.reference.starts_with(prefix)
+ })
+ .collect()
+ }
+}
+
+struct YamlRenderOutput {
+ image: ReftestImage,
+ results: RenderResults,
+}
+
+struct ReftestEnvironment {
+ pub platform: &'static str,
+ pub version: Option<semver::Version>,
+ pub mode: &'static str,
+}
+
+impl ReftestEnvironment {
+ fn new(wrench: &Wrench, window: &WindowWrapper) -> Self {
+ Self {
+ platform: Self::platform(wrench, window),
+ version: Self::version(wrench, window),
+ mode: Self::mode(),
+ }
+ }
+
+ fn has(&self, condition: &str) -> bool {
+ if self.platform == condition || self.mode == condition {
+ return true;
+ }
+ match (&self.version, &semver::VersionReq::parse(condition)) {
+ (Some(v), Ok(r)) => {
+ if r.matches(v) {
+ return true;
+ }
+ },
+ _ => (),
+ };
+ let envkey = format!("WRENCH_REFTEST_CONDITION_{}", condition.to_uppercase());
+ env::var(envkey).is_ok()
+ }
+
+ fn platform(_wrench: &Wrench, window: &WindowWrapper) -> &'static str {
+ if window.is_software() {
+ "swgl"
+ } else if cfg!(target_os = "windows") {
+ "win"
+ } else if cfg!(target_os = "linux") {
+ "linux"
+ } else if cfg!(target_os = "macos") {
+ "mac"
+ } else if cfg!(target_os = "android") {
+ "android"
+ } else {
+ "other"
+ }
+ }
+
+ fn version(_wrench: &Wrench, window: &WindowWrapper) -> Option<semver::Version> {
+ if window.is_software() {
+ None
+ } else if cfg!(target_os = "macos") {
+ use std::str;
+ let version_bytes = Command::new("defaults")
+ .arg("read")
+ .arg("loginwindow")
+ .arg("SystemVersionStampAsString")
+ .output()
+ .expect("Failed to get macOS version")
+ .stdout;
+ let mut version_string = str::from_utf8(&version_bytes)
+ .expect("Failed to read macOS version")
+ .trim()
+ .to_string();
+ // On some machines this produces just the major.minor and on
+ // some machines this gives major.minor.patch. But semver requires
+ // the patch so we fake one if it's not there.
+ if version_string.chars().filter(|c| *c == '.').count() == 1 {
+ version_string.push_str(".0");
+ }
+ Some(semver::Version::parse(&version_string)
+ .expect(&format!("Failed to parse macOS version {}", version_string)))
+ } else {
+ None
+ }
+ }
+
+ fn mode() -> &'static str {
+ if cfg!(debug_assertions) {
+ "debug"
+ } else {
+ "release"
+ }
+ }
+
+ fn parse_condition(&self, token: &str) -> Option<bool> {
+ match token {
+ platform if platform.starts_with("skip_on(") => {
+ // e.g. skip_on(android,debug) will skip only when
+ // running on a debug android build.
+ let (_, args, _) = parse_function(platform);
+ Some(!args.iter().all(|arg| self.has(arg)))
+ }
+ platform if platform.starts_with("env(") => {
+ // non-negated version of skip_on for nested conditions
+ let (_, args, _) = parse_function(platform);
+ Some(args.iter().all(|arg| self.has(arg)))
+ }
+ platform if platform.starts_with("platform(") => {
+ let (_, args, _) = parse_function(platform);
+ // Skip due to platform not matching
+ Some(args.iter().any(|arg| arg == &self.platform))
+ }
+ op if op.starts_with("not(") => {
+ let (_, args, _) = parse_function(op);
+ Some(!self.parse_condition(args[0]).expect("unknown condition"))
+ }
+ op if op.starts_with("or(") => {
+ let (_, args, _) = parse_function(op);
+ Some(args.iter().any(|arg| self.parse_condition(arg).expect("unknown condition")))
+ }
+ op if op.starts_with("and(") => {
+ let (_, args, _) = parse_function(op);
+ Some(args.iter().all(|arg| self.parse_condition(arg).expect("unknown condition")))
+ }
+ _ => None,
+ }
+ }
+}
+
+pub struct ReftestHarness<'a> {
+ wrench: &'a mut Wrench,
+ window: &'a mut WindowWrapper,
+ rx: &'a Receiver<NotifierEvent>,
+ environment: ReftestEnvironment,
+}
+impl<'a> ReftestHarness<'a> {
+ pub fn new(wrench: &'a mut Wrench, window: &'a mut WindowWrapper, rx: &'a Receiver<NotifierEvent>) -> Self {
+ let environment = ReftestEnvironment::new(wrench, window);
+ ReftestHarness { wrench, window, rx, environment }
+ }
+
+ pub fn run(mut self, base_manifest: &Path, reftests: Option<&Path>, options: &ReftestOptions) -> usize {
+ let manifest = ReftestManifest::new(base_manifest, &self.environment, options);
+ let reftests = manifest.find(reftests.unwrap_or(&PathBuf::new()));
+
+ let mut total_passing = 0;
+ let mut failing = Vec::new();
+
+ for t in reftests {
+ if self.run_reftest(t) {
+ total_passing += 1;
+ } else {
+ failing.push(t);
+ }
+ }
+
+ println!(
+ "REFTEST INFO | {} passing, {} failing",
+ total_passing,
+ failing.len()
+ );
+
+ if !failing.is_empty() {
+ println!("\nReftests with unexpected results:");
+
+ for reftest in &failing {
+ println!("\t{}", reftest);
+ }
+ }
+
+ failing.len()
+ }
+
+ fn run_reftest(&mut self, t: &Reftest) -> bool {
+ println!("REFTEST {}", t);
+
+ self.wrench
+ .api
+ .send_debug_cmd(
+ DebugCommand::ClearCaches(ClearCache::all())
+ );
+
+ let quality_settings = match t.force_subpixel_aa_where_possible {
+ Some(force_subpixel_aa_where_possible) => {
+ QualitySettings {
+ force_subpixel_aa_where_possible,
+ }
+ }
+ None => {
+ QualitySettings::default()
+ }
+ };
+
+ self.wrench.set_quality_settings(quality_settings);
+ self.wrench.set_page_zoom(ZoomFactor::new(t.zoom_factor));
+
+ if t.disable_dual_source_blending {
+ self.wrench
+ .api
+ .send_debug_cmd(
+ DebugCommand::EnableDualSourceBlending(false)
+ );
+ }
+
+ let window_size = self.window.get_inner_size();
+ let reference_image = match t.reference.extension().unwrap().to_str().unwrap() {
+ "yaml" => None,
+ "png" => Some(self.load_image(t.reference.as_path(), ImageFormat::Png)),
+ other => panic!("Unknown reftest extension: {}", other),
+ };
+ let test_size = reference_image.as_ref().map_or(window_size, |img| img.size);
+
+ // The reference can be smaller than the window size, in which case
+ // we only compare the intersection.
+ //
+ // Note also that, when we have multiple test scenes in sequence, we
+ // want to test the picture caching machinery. But since picture caching
+ // only takes effect after the result has been the same several frames in
+ // a row, we need to render the scene multiple times.
+ let mut images = vec![];
+ let mut results = vec![];
+
+ match t.op {
+ ReftestOp::Equal | ReftestOp::NotEqual => {
+ // For equality tests, render each test image and store result
+ for filename in t.test.iter() {
+ let output = self.render_yaml(
+ &filename,
+ test_size,
+ t.font_render_mode,
+ t.allow_mipmaps,
+ );
+ images.push(output.image);
+ results.push(output.results);
+ }
+ }
+ ReftestOp::Accurate | ReftestOp::Inaccurate => {
+ // For accuracy tests, render the reference yaml at an arbitrary series
+ // of tile sizes, and compare to the reference drawn at normal tile size.
+ let tile_sizes = [
+ DeviceIntSize::new(128, 128),
+ DeviceIntSize::new(256, 256),
+ DeviceIntSize::new(512, 512),
+ ];
+
+ for tile_size in &tile_sizes {
+ self.wrench
+ .api
+ .send_debug_cmd(
+ DebugCommand::SetPictureTileSize(Some(*tile_size))
+ );
+
+ let output = self.render_yaml(
+ &t.reference,
+ test_size,
+ t.font_render_mode,
+ t.allow_mipmaps,
+ );
+ images.push(output.image);
+ results.push(output.results);
+ }
+
+ self.wrench
+ .api
+ .send_debug_cmd(
+ DebugCommand::SetPictureTileSize(None)
+ );
+ }
+ }
+
+ let reference = match reference_image {
+ Some(image) => image,
+ None => {
+ let output = self.render_yaml(
+ &t.reference,
+ test_size,
+ t.font_render_mode,
+ t.allow_mipmaps,
+ );
+ output.image
+ }
+ };
+
+ if t.disable_dual_source_blending {
+ self.wrench
+ .api
+ .send_debug_cmd(
+ DebugCommand::EnableDualSourceBlending(true)
+ );
+ }
+
+ for extra_check in t.extra_checks.iter() {
+ if !extra_check.run(&results) {
+ println!(
+ "REFTEST TEST-UNEXPECTED-FAIL | {} | Failing Check: {:?} | Actual Results: {:?}",
+ t,
+ extra_check,
+ results,
+ );
+ println!("REFTEST TEST-END | {}", t);
+ return false;
+ }
+ }
+
+ match t.op {
+ ReftestOp::Equal => {
+ // Ensure that the final image matches the reference
+ let test = images.pop().unwrap();
+ let comparison = test.compare(&reference);
+ t.check_and_report_equality_failure(
+ comparison,
+ &test,
+ &reference,
+ )
+ }
+ ReftestOp::NotEqual => {
+ // Ensure that the final image *doesn't* match the reference
+ let test = images.pop().unwrap();
+ let comparison = test.compare(&reference);
+ match comparison {
+ ReftestImageComparison::Equal => {
+ t.report_unexpected_equality();
+ false
+ }
+ ReftestImageComparison::NotEqual { .. } => {
+ true
+ }
+ }
+ }
+ ReftestOp::Accurate => {
+ // Ensure that *all* images match the reference
+ for test in images.drain(..) {
+ let comparison = test.compare(&reference);
+
+ if !t.check_and_report_equality_failure(
+ comparison,
+ &test,
+ &reference,
+ ) {
+ return false;
+ }
+ }
+
+ true
+ }
+ ReftestOp::Inaccurate => {
+ // Ensure that at least one of the images doesn't match the reference
+ let all_same = images.iter().all(|image| {
+ match image.compare(&reference) {
+ ReftestImageComparison::Equal => true,
+ ReftestImageComparison::NotEqual { .. } => false,
+ }
+ });
+
+ if all_same {
+ t.report_unexpected_equality();
+ }
+
+ !all_same
+ }
+ }
+ }
+
+ fn load_image(&mut self, filename: &Path, format: ImageFormat) -> ReftestImage {
+ let file = BufReader::new(File::open(filename).unwrap());
+ let img_raw = load_piston_image(file, format).unwrap();
+ let img = img_raw.flipv().to_rgba();
+ let size = img.dimensions();
+ ReftestImage {
+ data: img.into_raw(),
+ size: DeviceIntSize::new(size.0 as i32, size.1 as i32),
+ }
+ }
+
+ fn render_yaml(
+ &mut self,
+ filename: &Path,
+ size: DeviceIntSize,
+ font_render_mode: Option<FontRenderMode>,
+ allow_mipmaps: bool,
+ ) -> YamlRenderOutput {
+ let mut reader = YamlFrameReader::new(filename);
+ reader.set_font_render_mode(font_render_mode);
+ reader.allow_mipmaps(allow_mipmaps);
+ reader.do_frame(self.wrench);
+
+ self.wrench.api.flush_scene_builder();
+
+ // wait for the frame
+ self.rx.recv().unwrap();
+ let results = self.wrench.render();
+
+ let window_size = self.window.get_inner_size();
+ assert!(
+ size.width <= window_size.width &&
+ size.height <= window_size.height,
+ format!("size={:?} ws={:?}", size, window_size)
+ );
+
+ // taking the bottom left sub-rectangle
+ let rect = FramebufferIntRect::new(
+ FramebufferIntPoint::new(0, window_size.height - size.height),
+ FramebufferIntSize::new(size.width, size.height),
+ );
+ let pixels = self.wrench.renderer.read_pixels_rgba8(rect);
+ self.window.swap_buffers();
+
+ let write_debug_images = false;
+ if write_debug_images {
+ let debug_path = filename.with_extension("yaml.png");
+ save_flipped(debug_path, pixels.clone(), size);
+ }
+
+ reader.deinit(self.wrench);
+
+ YamlRenderOutput {
+ image: ReftestImage { data: pixels, size },
+ results,
+ }
+ }
+}
diff --git a/third_party/webrender/wrench/src/wrench.rs b/third_party/webrender/wrench/src/wrench.rs
new file mode 100644
index 00000000000..bce7ef6e476
--- /dev/null
+++ b/third_party/webrender/wrench/src/wrench.rs
@@ -0,0 +1,681 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+
+use crate::blob;
+use crossbeam::sync::chase_lev;
+#[cfg(windows)]
+use dwrote;
+#[cfg(all(unix, not(target_os = "android")))]
+use font_loader::system_fonts;
+use winit::EventsLoopProxy;
+use std::collections::HashMap;
+use std::path::PathBuf;
+use std::sync::{Arc, Mutex};
+use std::sync::mpsc::Receiver;
+use time;
+use webrender;
+use webrender::api::*;
+use webrender::api::units::*;
+use webrender::{DebugFlags, RenderResults, ShaderPrecacheFlags};
+use crate::{WindowWrapper, NotifierEvent};
+
+// TODO(gw): This descriptor matches what we currently support for fonts
+// but is quite a mess. We should at least document and
+// use better types for things like the style and stretch.
+#[derive(Debug, Clone, Hash, PartialEq, Eq)]
+pub enum FontDescriptor {
+ Path { path: PathBuf, font_index: u32 },
+ Family { name: String },
+ Properties {
+ family: String,
+ weight: u32,
+ style: u32,
+ stretch: u32,
+ },
+}
+
+struct NotifierData {
+ events_loop_proxy: Option<EventsLoopProxy>,
+ frames_notified: u32,
+ timing_receiver: chase_lev::Stealer<time::SteadyTime>,
+ verbose: bool,
+}
+
+impl NotifierData {
+ fn new(
+ events_loop_proxy: Option<EventsLoopProxy>,
+ timing_receiver: chase_lev::Stealer<time::SteadyTime>,
+ verbose: bool,
+ ) -> Self {
+ NotifierData {
+ events_loop_proxy,
+ frames_notified: 0,
+ timing_receiver,
+ verbose,
+ }
+ }
+}
+
+struct Notifier(Arc<Mutex<NotifierData>>);
+
+impl Notifier {
+ fn update(&self, check_document: bool) {
+ let mut data = self.0.lock();
+ let data = data.as_mut().unwrap();
+ if check_document {
+ match data.timing_receiver.steal() {
+ chase_lev::Steal::Data(last_timing) => {
+ data.frames_notified += 1;
+ if data.verbose && data.frames_notified == 600 {
+ let elapsed = time::SteadyTime::now() - last_timing;
+ println!(
+ "frame latency (consider queue depth here): {:3.6} ms",
+ elapsed.num_microseconds().unwrap() as f64 / 1000.
+ );
+ data.frames_notified = 0;
+ }
+ }
+ _ => {
+ println!("Notified of frame, but no frame was ready?");
+ }
+ }
+ }
+
+ if let Some(ref _elp) = data.events_loop_proxy {
+ #[cfg(not(target_os = "android"))]
+ let _ = _elp.wakeup();
+ }
+ }
+}
+
+impl RenderNotifier for Notifier {
+ fn clone(&self) -> Box<dyn RenderNotifier> {
+ Box::new(Notifier(self.0.clone()))
+ }
+
+ fn wake_up(&self) {
+ self.update(false);
+ }
+
+ fn new_frame_ready(&self, _: DocumentId,
+ scrolled: bool,
+ _composite_needed: bool,
+ _render_time: Option<u64>) {
+ self.update(!scrolled);
+ }
+}
+
+pub trait WrenchThing {
+ fn next_frame(&mut self);
+ fn prev_frame(&mut self);
+ fn do_frame(&mut self, _: &mut Wrench) -> u32;
+}
+
+impl WrenchThing for CapturedDocument {
+ fn next_frame(&mut self) {}
+ fn prev_frame(&mut self) {}
+ fn do_frame(&mut self, wrench: &mut Wrench) -> u32 {
+ match self.root_pipeline_id.take() {
+ Some(root_pipeline_id) => {
+ // skip the first frame - to not overwrite the loaded one
+ let mut txn = Transaction::new();
+ txn.set_root_pipeline(root_pipeline_id);
+ wrench.api.send_transaction(self.document_id, txn);
+ }
+ None => {
+ wrench.refresh();
+ }
+ }
+ 0
+ }
+}
+
+pub struct CapturedSequence {
+ root: PathBuf,
+ frame: usize,
+ frame_set: Vec<(u32, u32)>,
+}
+
+impl CapturedSequence {
+ pub fn new(root: PathBuf, scene_start: u32, frame_start: u32) -> Self {
+ // Build set of a scene and frame IDs.
+ let mut scene = scene_start;
+ let mut frame = frame_start;
+ let mut frame_set = Vec::new();
+ while Self::scene_root(&root, scene).as_path().is_dir() {
+ while Self::frame_root(&root, scene, frame).as_path().is_dir() {
+ frame_set.push((scene, frame));
+ frame += 1;
+ }
+ scene += 1;
+ frame = 1;
+ }
+
+ assert!(!frame_set.is_empty());
+
+ Self {
+ root,
+ frame: 0,
+ frame_set,
+ }
+ }
+
+ fn scene_root(root: &PathBuf, scene: u32) -> PathBuf {
+ let path = format!("scenes/{:05}", scene);
+ root.join(path)
+ }
+
+ fn frame_root(root: &PathBuf, scene: u32, frame: u32) -> PathBuf {
+ let path = format!("scenes/{:05}/frames/{:05}", scene, frame);
+ root.join(path)
+ }
+}
+
+impl WrenchThing for CapturedSequence {
+ fn next_frame(&mut self) {
+ if self.frame + 1 < self.frame_set.len() {
+ self.frame += 1;
+ }
+ }
+
+ fn prev_frame(&mut self) {
+ if self.frame > 0 {
+ self.frame -= 1;
+ }
+ }
+
+ fn do_frame(&mut self, wrench: &mut Wrench) -> u32 {
+ let mut documents = wrench.api.load_capture(self.root.clone(), Some(self.frame_set[self.frame]));
+ println!("loaded {:?} from {:?}",
+ documents.iter().map(|cd| cd.document_id).collect::<Vec<_>>(),
+ self.frame_set[self.frame]);
+ let captured = documents.swap_remove(0);
+ wrench.document_id = captured.document_id;
+ self.frame as u32
+ }
+}
+
+pub struct Wrench {
+ window_size: DeviceIntSize,
+ pub device_pixel_ratio: f32,
+ page_zoom_factor: ZoomFactor,
+
+ pub renderer: webrender::Renderer,
+ pub api: RenderApi,
+ pub document_id: DocumentId,
+ pub root_pipeline_id: PipelineId,
+
+ window_title_to_set: Option<String>,
+
+ graphics_api: webrender::GraphicsApiInfo,
+
+ pub rebuild_display_lists: bool,
+ pub verbose: bool,
+
+ pub frame_start_sender: chase_lev::Worker<time::SteadyTime>,
+
+ pub callbacks: Arc<Mutex<blob::BlobCallbacks>>,
+}
+
+impl Wrench {
+ pub fn new(
+ window: &mut WindowWrapper,
+ proxy: Option<EventsLoopProxy>,
+ shader_override_path: Option<PathBuf>,
+ use_optimized_shaders: bool,
+ dp_ratio: f32,
+ size: DeviceIntSize,
+ do_rebuild: bool,
+ no_subpixel_aa: bool,
+ no_picture_caching: bool,
+ verbose: bool,
+ no_scissor: bool,
+ no_batch: bool,
+ precache_shaders: bool,
+ disable_dual_source_blending: bool,
+ zoom_factor: f32,
+ chase_primitive: webrender::ChasePrimitive,
+ dump_shader_source: Option<String>,
+ notifier: Option<Box<dyn RenderNotifier>>,
+ ) -> Self {
+ println!("Shader override path: {:?}", shader_override_path);
+
+ let mut debug_flags = DebugFlags::ECHO_DRIVER_MESSAGES;
+ debug_flags.set(DebugFlags::DISABLE_BATCHING, no_batch);
+ let callbacks = Arc::new(Mutex::new(blob::BlobCallbacks::new()));
+
+ let precache_flags = if precache_shaders {
+ ShaderPrecacheFlags::FULL_COMPILE
+ } else {
+ ShaderPrecacheFlags::empty()
+ };
+
+ let opts = webrender::RendererOptions {
+ device_pixel_ratio: dp_ratio,
+ resource_override_path: shader_override_path,
+ use_optimized_shaders,
+ enable_subpixel_aa: !no_subpixel_aa,
+ debug_flags,
+ enable_clear_scissor: !no_scissor,
+ max_recorded_profiles: 16,
+ precache_flags,
+ blob_image_handler: Some(Box::new(blob::CheckerboardRenderer::new(callbacks.clone()))),
+ chase_primitive,
+ enable_picture_caching: !no_picture_caching,
+ testing: true,
+ max_texture_size: Some(8196), // Needed for rawtest::test_resize_image.
+ allow_dual_source_blending: !disable_dual_source_blending,
+ allow_advanced_blend_equation: true,
+ dump_shader_source,
+ ..Default::default()
+ };
+
+ // put an Awakened event into the queue to kick off the first frame
+ if let Some(ref _elp) = proxy {
+ #[cfg(not(target_os = "android"))]
+ let _ = _elp.wakeup();
+ }
+
+ let (timing_sender, timing_receiver) = chase_lev::deque();
+ let notifier = notifier.unwrap_or_else(|| {
+ let data = Arc::new(Mutex::new(NotifierData::new(proxy, timing_receiver, verbose)));
+ Box::new(Notifier(data))
+ });
+
+ let (renderer, sender) = webrender::Renderer::new(
+ window.clone_gl(),
+ notifier,
+ opts,
+ None,
+ size,
+ ).unwrap();
+
+ let api = sender.create_api();
+ let document_id = api.add_document(size, 0);
+
+ let graphics_api = renderer.get_graphics_api_info();
+ let zoom_factor = ZoomFactor::new(zoom_factor);
+
+ let mut wrench = Wrench {
+ window_size: size,
+
+ renderer,
+ api,
+ document_id,
+ window_title_to_set: None,
+
+ rebuild_display_lists: do_rebuild,
+ verbose,
+ device_pixel_ratio: dp_ratio,
+ page_zoom_factor: ZoomFactor::new(0.0),
+
+ root_pipeline_id: PipelineId(0, 0),
+
+ graphics_api,
+ frame_start_sender: timing_sender,
+
+ callbacks,
+ };
+
+ wrench.set_page_zoom(zoom_factor);
+ wrench.set_title("start");
+ let mut txn = Transaction::new();
+ txn.set_root_pipeline(wrench.root_pipeline_id);
+ wrench.api.send_transaction(wrench.document_id, txn);
+
+ wrench
+ }
+
+ pub fn set_quality_settings(&mut self, settings: QualitySettings) {
+ let mut txn = Transaction::new();
+ txn.set_quality_settings(settings);
+ self.api.send_transaction(self.document_id, txn);
+ }
+
+ pub fn get_page_zoom(&self) -> ZoomFactor {
+ self.page_zoom_factor
+ }
+
+ pub fn set_page_zoom(&mut self, zoom_factor: ZoomFactor) {
+ if self.page_zoom_factor.get() != zoom_factor.get() {
+ self.page_zoom_factor = zoom_factor;
+ let mut txn = Transaction::new();
+ txn.set_page_zoom(self.page_zoom_factor);
+ self.api.send_transaction(self.document_id, txn);
+ self.set_title("");
+ }
+ }
+
+ pub fn layout_simple_ascii(
+ &mut self,
+ font_key: FontKey,
+ instance_key: FontInstanceKey,
+ text: &str,
+ size: f32,
+ origin: LayoutPoint,
+ flags: FontInstanceFlags,
+ ) -> (Vec<u32>, Vec<LayoutPoint>, LayoutRect) {
+ // Map the string codepoints to glyph indices in this font.
+ // Just drop any glyph that isn't present in this font.
+ let indices: Vec<u32> = self.api
+ .get_glyph_indices(font_key, text)
+ .iter()
+ .filter_map(|idx| *idx)
+ .collect();
+
+ // Retrieve the metrics for each glyph.
+ let metrics = self.api.get_glyph_dimensions(instance_key, indices.clone());
+
+ let mut bounding_rect = LayoutRect::zero();
+ let mut positions = Vec::new();
+
+ let mut cursor = origin;
+ let direction = if flags.contains(FontInstanceFlags::TRANSPOSE) {
+ LayoutVector2D::new(
+ 0.0,
+ if flags.contains(FontInstanceFlags::FLIP_Y) { -1.0 } else { 1.0 },
+ )
+ } else {
+ LayoutVector2D::new(
+ if flags.contains(FontInstanceFlags::FLIP_X) { -1.0 } else { 1.0 },
+ 0.0,
+ )
+ };
+ for metric in metrics {
+ positions.push(cursor);
+
+ match metric {
+ Some(metric) => {
+ let glyph_rect = LayoutRect::new(
+ LayoutPoint::new(cursor.x + metric.left as f32, cursor.y - metric.top as f32),
+ LayoutSize::new(metric.width as f32, metric.height as f32)
+ );
+ bounding_rect = bounding_rect.union(&glyph_rect);
+ cursor += direction * metric.advance;
+ }
+ None => {
+ // Extract the advances from the metrics. The get_glyph_dimensions API
+ // has a limitation that it can't currently get dimensions for non-renderable
+ // glyphs (e.g. spaces), so just use a rough estimate in that case.
+ let space_advance = size / 3.0;
+ cursor += direction * space_advance;
+ }
+ }
+ }
+
+ // The platform font implementations don't always handle
+ // the exact dimensions used when subpixel AA is enabled
+ // on glyphs. As a workaround, inflate the bounds by
+ // 2 pixels on either side, to give a slightly less
+ // tight fitting bounding rect.
+ let bounding_rect = bounding_rect.inflate(2.0, 2.0);
+
+ (indices, positions, bounding_rect)
+ }
+
+ pub fn set_title(&mut self, extra: &str) {
+ self.window_title_to_set = Some(format!(
+ "Wrench: {} ({}x zoom={}) - {} - {}",
+ extra,
+ self.device_pixel_ratio,
+ self.page_zoom_factor.get(),
+ self.graphics_api.renderer,
+ self.graphics_api.version
+ ));
+ }
+
+ pub fn take_title(&mut self) -> Option<String> {
+ self.window_title_to_set.take()
+ }
+
+ pub fn should_rebuild_display_lists(&self) -> bool {
+ self.rebuild_display_lists
+ }
+
+ pub fn window_size_f32(&self) -> LayoutSize {
+ LayoutSize::new(
+ self.window_size.width as f32,
+ self.window_size.height as f32,
+ )
+ }
+
+ #[cfg(target_os = "windows")]
+ pub fn font_key_from_native_handle(&mut self, descriptor: &NativeFontHandle) -> FontKey {
+ let key = self.api.generate_font_key();
+ let mut txn = Transaction::new();
+ txn.add_native_font(key, descriptor.clone());
+ self.api.send_transaction(self.document_id, txn);
+ key
+ }
+
+ #[cfg(target_os = "windows")]
+ pub fn font_key_from_name(&mut self, font_name: &str) -> FontKey {
+ self.font_key_from_properties(
+ font_name,
+ dwrote::FontWeight::Regular.to_u32(),
+ dwrote::FontStyle::Normal.to_u32(),
+ dwrote::FontStretch::Normal.to_u32(),
+ )
+ }
+
+ #[cfg(target_os = "windows")]
+ pub fn font_key_from_properties(
+ &mut self,
+ family: &str,
+ weight: u32,
+ style: u32,
+ stretch: u32,
+ ) -> FontKey {
+ let weight = dwrote::FontWeight::from_u32(weight);
+ let style = dwrote::FontStyle::from_u32(style);
+ let stretch = dwrote::FontStretch::from_u32(stretch);
+ let desc = dwrote::FontDescriptor {
+ family_name: family.to_owned(),
+ weight,
+ style,
+ stretch,
+ };
+ let system_fc = dwrote::FontCollection::system();
+ if let Some(font) = system_fc.get_font_from_descriptor(&desc) {
+ let face = font.create_font_face();
+ let files = face.get_files();
+ if files.len() == 1 {
+ if let Some(path) = files[0].get_font_file_path() {
+ return self.font_key_from_native_handle(&NativeFontHandle {
+ path,
+ index: face.get_index(),
+ });
+ }
+ }
+ }
+ panic!("failed loading font from properties {:?}", desc)
+ }
+
+ #[cfg(all(unix, not(target_os = "android")))]
+ pub fn font_key_from_properties(
+ &mut self,
+ family: &str,
+ _weight: u32,
+ _style: u32,
+ _stretch: u32,
+ ) -> FontKey {
+ let property = system_fonts::FontPropertyBuilder::new()
+ .family(family)
+ .build();
+ let (font, index) = system_fonts::get(&property).unwrap();
+ self.font_key_from_bytes(font, index as u32)
+ }
+
+ #[cfg(target_os = "android")]
+ pub fn font_key_from_properties(
+ &mut self,
+ _family: &str,
+ _weight: u32,
+ _style: u32,
+ _stretch: u32,
+ ) -> FontKey {
+ unimplemented!()
+ }
+
+ #[cfg(all(unix, not(target_os = "android")))]
+ pub fn font_key_from_name(&mut self, font_name: &str) -> FontKey {
+ let property = system_fonts::FontPropertyBuilder::new()
+ .family(font_name)
+ .build();
+ let (font, index) = system_fonts::get(&property).unwrap();
+ self.font_key_from_bytes(font, index as u32)
+ }
+
+ #[cfg(target_os = "android")]
+ pub fn font_key_from_name(&mut self, _font_name: &str) -> FontKey {
+ unimplemented!()
+ }
+
+ pub fn font_key_from_bytes(&mut self, bytes: Vec<u8>, index: u32) -> FontKey {
+ let key = self.api.generate_font_key();
+ let mut txn = Transaction::new();
+ txn.add_raw_font(key, bytes, index);
+ self.api.send_transaction(self.document_id, txn);
+ key
+ }
+
+ pub fn add_font_instance(&mut self,
+ font_key: FontKey,
+ size: f32,
+ flags: FontInstanceFlags,
+ render_mode: Option<FontRenderMode>,
+ bg_color: Option<ColorU>,
+ synthetic_italics: SyntheticItalics,
+ ) -> FontInstanceKey {
+ let key = self.api.generate_font_instance_key();
+ let mut txn = Transaction::new();
+ let mut options: FontInstanceOptions = Default::default();
+ options.flags |= flags;
+ if let Some(render_mode) = render_mode {
+ options.render_mode = render_mode;
+ }
+ if let Some(bg_color) = bg_color {
+ options.bg_color = bg_color;
+ }
+ options.synthetic_italics = synthetic_italics;
+ txn.add_font_instance(key, font_key, size, Some(options), None, Vec::new());
+ self.api.send_transaction(self.document_id, txn);
+ key
+ }
+
+ #[allow(dead_code)]
+ pub fn delete_font_instance(&mut self, key: FontInstanceKey) {
+ let mut txn = Transaction::new();
+ txn.delete_font_instance(key);
+ self.api.send_transaction(self.document_id, txn);
+ }
+
+ pub fn update(&mut self, dim: DeviceIntSize) {
+ if dim != self.window_size {
+ self.window_size = dim;
+ }
+ }
+
+ pub fn begin_frame(&mut self) {
+ self.frame_start_sender.push(time::SteadyTime::now());
+ }
+
+ pub fn send_lists(
+ &mut self,
+ frame_number: u32,
+ display_lists: Vec<(PipelineId, LayoutSize, BuiltDisplayList)>,
+ scroll_offsets: &HashMap<ExternalScrollId, LayoutPoint>,
+ ) {
+ let root_background_color = Some(ColorF::new(1.0, 1.0, 1.0, 1.0));
+
+ let mut txn = Transaction::new();
+ for display_list in display_lists {
+ txn.set_display_list(
+ Epoch(frame_number),
+ root_background_color,
+ self.window_size_f32(),
+ display_list,
+ false,
+ );
+ }
+
+ for (id, offset) in scroll_offsets {
+ txn.scroll_node_with_id(*offset, *id, ScrollClamping::NoClamping);
+ }
+
+ txn.generate_frame();
+ self.api.send_transaction(self.document_id, txn);
+ }
+
+ pub fn get_frame_profiles(
+ &mut self,
+ ) -> (Vec<webrender::CpuProfile>, Vec<webrender::GpuProfile>) {
+ self.renderer.get_frame_profiles()
+ }
+
+ pub fn render(&mut self) -> RenderResults {
+ self.renderer.update();
+ let _ = self.renderer.flush_pipeline_info();
+ self.renderer
+ .render(self.window_size)
+ .expect("errors encountered during render!")
+ }
+
+ pub fn refresh(&mut self) {
+ self.begin_frame();
+ let mut txn = Transaction::new();
+ txn.generate_frame();
+ self.api.send_transaction(self.document_id, txn);
+ }
+
+ pub fn show_onscreen_help(&mut self) {
+ let help_lines = [
+ "Esc - Quit",
+ "H - Toggle help",
+ "R - Toggle recreating display items each frame",
+ "P - Toggle profiler",
+ "O - Toggle showing intermediate targets",
+ "I - Toggle showing texture caches",
+ "B - Toggle showing alpha primitive rects",
+ "V - Toggle showing overdraw",
+ "G - Toggle showing gpu cache updates",
+ "S - Toggle compact profiler",
+ "Q - Toggle GPU queries for time and samples",
+ "M - Trigger memory pressure event",
+ "T - Save CPU profile to a file",
+ "C - Save a capture to captures/wrench/",
+ "X - Do a hit test at the current cursor position",
+ "Y - Clear all caches",
+ ];
+
+ let color_and_offset = [(ColorF::BLACK, 2.0), (ColorF::WHITE, 0.0)];
+ self.renderer.device.begin_frame(); // next line might compile shaders:
+ let dr = self.renderer.debug_renderer().unwrap();
+
+ for ref co in &color_and_offset {
+ let x = self.device_pixel_ratio * (15.0 + co.1);
+ let mut y = self.device_pixel_ratio * (15.0 + co.1 + dr.line_height());
+ for ref line in &help_lines {
+ dr.add_text(x, y, line, co.0.into(), None);
+ y += self.device_pixel_ratio * dr.line_height();
+ }
+ }
+ self.renderer.device.end_frame();
+ }
+
+ pub fn shut_down(self, rx: Receiver<NotifierEvent>) {
+ self.api.shut_down(true);
+
+ loop {
+ match rx.recv() {
+ Ok(NotifierEvent::ShutDown) => { break; }
+ Ok(_) => {}
+ Err(e) => { panic!("Did not shut down properly: {:?}.", e); }
+ }
+ }
+
+ self.renderer.deinit();
+ }
+}
diff --git a/third_party/webrender/wrench/src/yaml_frame_reader.rs b/third_party/webrender/wrench/src/yaml_frame_reader.rs
new file mode 100644
index 00000000000..e3bf04ed42e
--- /dev/null
+++ b/third_party/webrender/wrench/src/yaml_frame_reader.rs
@@ -0,0 +1,2245 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use clap;
+use euclid::SideOffsets2D;
+use gleam::gl;
+use image;
+use image::GenericImageView;
+use crate::parse_function::parse_function;
+use crate::premultiply::premultiply;
+use std::collections::HashMap;
+use std::fs::File;
+use std::io::Read;
+use std::path::{Path, PathBuf};
+use std::usize;
+use webrender::api::*;
+use webrender::api::units::*;
+use crate::wrench::{FontDescriptor, Wrench, WrenchThing};
+use crate::yaml_helper::{StringEnum, YamlHelper, make_perspective};
+use yaml_rust::{Yaml, YamlLoader};
+use crate::PLATFORM_DEFAULT_FACE_NAME;
+
+macro_rules! try_intersect {
+ ($first: expr, $second: expr) => {
+ if let Some(rect) = ($first).intersection($second) {
+ rect
+ } else {
+ warn!("skipping item with non-intersecting bounds and clip_rect");
+ return;
+ };
+ }
+}
+
+fn rsrc_path(item: &Yaml, aux_dir: &PathBuf) -> PathBuf {
+ let filename = item.as_str().unwrap();
+ let mut file = aux_dir.clone();
+ file.push(filename);
+ file
+}
+
+impl FontDescriptor {
+ fn from_yaml(item: &Yaml, aux_dir: &PathBuf) -> FontDescriptor {
+ if !item["family"].is_badvalue() {
+ FontDescriptor::Properties {
+ family: item["family"].as_str().unwrap().to_owned(),
+ weight: item["weight"].as_i64().unwrap_or(400) as u32,
+ style: item["style"].as_i64().unwrap_or(0) as u32,
+ stretch: item["stretch"].as_i64().unwrap_or(5) as u32,
+ }
+ } else if !item["font"].is_badvalue() {
+ let path = rsrc_path(&item["font"], aux_dir);
+ FontDescriptor::Path {
+ path,
+ font_index: item["font-index"].as_i64().unwrap_or(0) as u32,
+ }
+ } else {
+ FontDescriptor::Family {
+ name: PLATFORM_DEFAULT_FACE_NAME.to_string(),
+ }
+ }
+ }
+}
+
+struct LocalExternalImageHandler {
+ texture_ids: Vec<(gl::GLuint, ImageDescriptor)>,
+}
+
+impl LocalExternalImageHandler {
+ pub fn new() -> LocalExternalImageHandler {
+ LocalExternalImageHandler {
+ texture_ids: Vec::new(),
+ }
+ }
+
+ fn init_gl_texture(
+ id: gl::GLuint,
+ gl_target: gl::GLuint,
+ format_desc: webrender::FormatDesc,
+ width: gl::GLint,
+ height: gl::GLint,
+ bytes: &[u8],
+ gl: &dyn gl::Gl,
+ ) {
+ gl.bind_texture(gl_target, id);
+ gl.tex_parameter_i(gl_target, gl::TEXTURE_MAG_FILTER, gl::LINEAR as gl::GLint);
+ gl.tex_parameter_i(gl_target, gl::TEXTURE_MIN_FILTER, gl::LINEAR as gl::GLint);
+ gl.tex_parameter_i(gl_target, gl::TEXTURE_WRAP_S, gl::CLAMP_TO_EDGE as gl::GLint);
+ gl.tex_parameter_i(gl_target, gl::TEXTURE_WRAP_T, gl::CLAMP_TO_EDGE as gl::GLint);
+ gl.tex_image_2d(
+ gl_target,
+ 0,
+ format_desc.internal as gl::GLint,
+ width,
+ height,
+ 0,
+ format_desc.external,
+ format_desc.pixel_type,
+ Some(bytes),
+ );
+ gl.bind_texture(gl_target, 0);
+ }
+
+ pub fn add_image(&mut self,
+ device: &webrender::Device,
+ desc: ImageDescriptor,
+ target: TextureTarget,
+ image_data: ImageData,
+ ) -> ImageData {
+ let (image_id, channel_idx) = match image_data {
+ ImageData::Raw(ref data) => {
+ let gl = device.gl();
+ let texture_ids = gl.gen_textures(1);
+ let format_desc = if desc.format == ImageFormat::BGRA8 {
+ // Force BGRA8 data to RGBA8 layout to avoid potential
+ // need for usage of texture-swizzle.
+ webrender::FormatDesc {
+ external: gl::BGRA,
+ .. device.gl_describe_format(ImageFormat::RGBA8)
+ }
+ } else {
+ device.gl_describe_format(desc.format)
+ };
+
+ LocalExternalImageHandler::init_gl_texture(
+ texture_ids[0],
+ webrender::get_gl_target(target),
+ format_desc,
+ desc.size.width as gl::GLint,
+ desc.size.height as gl::GLint,
+ &data,
+ gl,
+ );
+ self.texture_ids.push((texture_ids[0], desc));
+ (ExternalImageId((self.texture_ids.len() - 1) as u64), 0)
+ },
+ _ => panic!("unsupported!"),
+ };
+
+ ImageData::External(
+ ExternalImageData {
+ id: image_id,
+ channel_index: channel_idx,
+ image_type: ExternalImageType::TextureHandle(target)
+ }
+ )
+ }
+}
+
+impl ExternalImageHandler for LocalExternalImageHandler {
+ fn lock(
+ &mut self,
+ key: ExternalImageId,
+ _channel_index: u8,
+ _rendering: ImageRendering,
+ ) -> ExternalImage {
+ let (id, desc) = self.texture_ids[key.0 as usize];
+ ExternalImage {
+ uv: TexelRect::new(0.0, 0.0, desc.size.width as f32, desc.size.height as f32),
+ source: ExternalImageSource::NativeTexture(id),
+ }
+ }
+ fn unlock(&mut self, _key: ExternalImageId, _channel_index: u8) {}
+}
+
+fn broadcast<T: Clone>(base_vals: &[T], num_items: usize) -> Vec<T> {
+ if base_vals.len() == num_items {
+ return base_vals.to_vec();
+ }
+
+ assert_eq!(
+ num_items % base_vals.len(),
+ 0,
+ "Cannot broadcast {} elements into {}",
+ base_vals.len(),
+ num_items
+ );
+
+ let mut vals = vec![];
+ loop {
+ if vals.len() == num_items {
+ break;
+ }
+ vals.extend_from_slice(base_vals);
+ }
+ vals
+}
+
+enum CheckerboardKind {
+ BlackGrey,
+ BlackTransparent,
+}
+
+fn generate_checkerboard_image(
+ border: u32,
+ tile_x_size: u32,
+ tile_y_size: u32,
+ tile_x_count: u32,
+ tile_y_count: u32,
+ kind: CheckerboardKind,
+) -> (ImageDescriptor, ImageData) {
+ let width = 2 * border + tile_x_size * tile_x_count;
+ let height = 2 * border + tile_y_size * tile_y_count;
+ let mut pixels = Vec::new();
+
+ for y in 0 .. height {
+ for x in 0 .. width {
+ if y < border || y >= (height - border) ||
+ x < border || x >= (width - border) {
+ pixels.push(0);
+ pixels.push(0);
+ pixels.push(0xff);
+ pixels.push(0xff);
+ } else {
+ let xon = ((x - border) % (2 * tile_x_size)) < tile_x_size;
+ let yon = ((y - border) % (2 * tile_y_size)) < tile_y_size;
+ match kind {
+ CheckerboardKind::BlackGrey => {
+ let value = if xon ^ yon { 0xff } else { 0x7f };
+ pixels.push(value);
+ pixels.push(value);
+ pixels.push(value);
+ pixels.push(0xff);
+ }
+ CheckerboardKind::BlackTransparent => {
+ let value = if xon ^ yon { 0xff } else { 0x00 };
+ pixels.push(value);
+ pixels.push(value);
+ pixels.push(value);
+ pixels.push(value);
+ }
+ }
+ }
+ }
+ }
+
+ (
+ ImageDescriptor::new(width as i32, height as i32, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(pixels),
+ )
+}
+
+fn generate_xy_gradient_image(w: u32, h: u32) -> (ImageDescriptor, ImageData) {
+ let mut pixels = Vec::with_capacity((w * h * 4) as usize);
+ for y in 0 .. h {
+ for x in 0 .. w {
+ let grid = if x % 100 < 3 || y % 100 < 3 { 0.9 } else { 1.0 };
+ pixels.push((y as f32 / h as f32 * 255.0 * grid) as u8);
+ pixels.push(0);
+ pixels.push((x as f32 / w as f32 * 255.0 * grid) as u8);
+ pixels.push(255);
+ }
+ }
+
+ (
+ ImageDescriptor::new(w as i32, h as i32, ImageFormat::BGRA8, ImageDescriptorFlags::IS_OPAQUE),
+ ImageData::new(pixels),
+ )
+}
+
+fn generate_solid_color_image(
+ r: u8,
+ g: u8,
+ b: u8,
+ a: u8,
+ w: u32,
+ h: u32,
+) -> (ImageDescriptor, ImageData) {
+ let buf_size = (w * h * 4) as usize;
+ let mut pixels = Vec::with_capacity(buf_size);
+ // Unsafely filling the buffer is horrible. Unfortunately doing this idiomatically
+ // is terribly slow in debug builds to the point that reftests/image/very-big.yaml
+ // takes more than 20 seconds to run on a recent laptop.
+ unsafe {
+ pixels.set_len(buf_size);
+ let color: u32 = ::std::mem::transmute([b, g, r, a]);
+ let mut ptr: *mut u32 = ::std::mem::transmute(&mut pixels[0]);
+ let end = ptr.offset((w * h) as isize);
+ while ptr < end {
+ *ptr = color;
+ ptr = ptr.offset(1);
+ }
+ }
+
+ let mut flags = ImageDescriptorFlags::empty();
+ if a == 255 {
+ flags |= ImageDescriptorFlags::IS_OPAQUE;
+ }
+
+ (
+ ImageDescriptor::new(w as i32, h as i32, ImageFormat::BGRA8, flags),
+ ImageData::new(pixels),
+ )
+}
+
+
+
+fn is_image_opaque(format: ImageFormat, bytes: &[u8]) -> bool {
+ match format {
+ ImageFormat::BGRA8 |
+ ImageFormat::RGBA8 => {
+ let mut is_opaque = true;
+ for i in 0 .. (bytes.len() / 4) {
+ if bytes[i * 4 + 3] != 255 {
+ is_opaque = false;
+ break;
+ }
+ }
+ is_opaque
+ }
+ ImageFormat::RG8 => true,
+ ImageFormat::RG16 => true,
+ ImageFormat::R8 => false,
+ ImageFormat::R16 => false,
+ ImageFormat::RGBAF32 |
+ ImageFormat::RGBAI32 => unreachable!(),
+ }
+}
+
+pub struct YamlFrameReader {
+ yaml_path: PathBuf,
+ aux_dir: PathBuf,
+ frame_count: u32,
+
+ display_lists: Vec<(PipelineId, LayoutSize, BuiltDisplayList)>,
+
+ include_only: Vec<String>,
+
+ watch_source: bool,
+ list_resources: bool,
+
+ /// A HashMap of offsets which specify what scroll offsets particular
+ /// scroll layers should be initialized with.
+ scroll_offsets: HashMap<ExternalScrollId, LayoutPoint>,
+
+ image_map: HashMap<(PathBuf, Option<i64>), (ImageKey, LayoutSize)>,
+
+ fonts: HashMap<FontDescriptor, FontKey>,
+ font_instances: HashMap<(FontKey, FontSize, FontInstanceFlags, Option<ColorU>, SyntheticItalics), FontInstanceKey>,
+ font_render_mode: Option<FontRenderMode>,
+ allow_mipmaps: bool,
+
+ /// A HashMap that allows specifying a numeric id for clip and clip chains in YAML
+ /// and having each of those ids correspond to a unique ClipId.
+ user_clip_id_map: HashMap<u64, ClipId>,
+ user_spatial_id_map: HashMap<u64, SpatialId>,
+
+ clip_id_stack: Vec<ClipId>,
+ spatial_id_stack: Vec<SpatialId>,
+
+ requested_frame: usize,
+ built_frame: usize,
+
+ yaml_string: String,
+ keyframes: Option<Yaml>,
+
+ external_image_handler: Option<Box<LocalExternalImageHandler>>,
+}
+
+impl YamlFrameReader {
+ pub fn new(yaml_path: &Path) -> YamlFrameReader {
+ YamlFrameReader {
+ watch_source: false,
+ list_resources: false,
+ yaml_path: yaml_path.to_owned(),
+ aux_dir: yaml_path.parent().unwrap().to_owned(),
+ frame_count: 0,
+ display_lists: Vec::new(),
+ include_only: vec![],
+ scroll_offsets: HashMap::new(),
+ fonts: HashMap::new(),
+ font_instances: HashMap::new(),
+ font_render_mode: None,
+ allow_mipmaps: false,
+ image_map: HashMap::new(),
+ user_clip_id_map: HashMap::new(),
+ user_spatial_id_map: HashMap::new(),
+ clip_id_stack: Vec::new(),
+ spatial_id_stack: Vec::new(),
+ yaml_string: String::new(),
+ requested_frame: 0,
+ built_frame: usize::MAX,
+ keyframes: None,
+ external_image_handler: Some(Box::new(LocalExternalImageHandler::new())),
+ }
+ }
+
+ pub fn deinit(mut self, wrench: &mut Wrench) {
+ let mut txn = Transaction::new();
+
+ for (_, font_instance) in self.font_instances.drain() {
+ txn.delete_font_instance(font_instance);
+ }
+
+ for (_, font) in self.fonts.drain() {
+ txn.delete_font(font);
+ }
+
+ wrench.api.send_transaction(wrench.document_id, txn);
+ }
+
+ fn top_space_and_clip(&self) -> SpaceAndClipInfo {
+ SpaceAndClipInfo {
+ spatial_id: *self.spatial_id_stack.last().unwrap(),
+ clip_id: *self.clip_id_stack.last().unwrap(),
+ }
+ }
+
+ pub fn yaml_path(&self) -> &PathBuf {
+ &self.yaml_path
+ }
+
+ pub fn new_from_args(args: &clap::ArgMatches) -> YamlFrameReader {
+ let yaml_file = args.value_of("INPUT").map(|s| PathBuf::from(s)).unwrap();
+
+ let mut y = YamlFrameReader::new(&yaml_file);
+
+ y.keyframes = args.value_of("keyframes").map(|path| {
+ let mut file = File::open(&path).unwrap();
+ let mut keyframes_string = String::new();
+ file.read_to_string(&mut keyframes_string).unwrap();
+ YamlLoader::load_from_str(&keyframes_string)
+ .expect("Failed to parse keyframes file")
+ .pop()
+ .unwrap()
+ });
+ y.list_resources = args.is_present("list-resources");
+ y.watch_source = args.is_present("watch");
+ y.include_only = args.values_of("include")
+ .map(|v| v.map(|s| s.to_owned()).collect())
+ .unwrap_or(vec![]);
+ y
+ }
+
+ pub fn reset(&mut self) {
+ self.scroll_offsets.clear();
+ self.display_lists.clear();
+ }
+
+ fn build(&mut self, wrench: &mut Wrench) {
+ let mut yaml_doc = YamlLoader::load_from_str(&self.yaml_string)
+ .expect("Failed to parse YAML file");
+ assert_eq!(yaml_doc.len(), 1);
+
+ self.reset();
+
+ let yaml = yaml_doc.pop().unwrap();
+ if let Some(pipelines) = yaml["pipelines"].as_vec() {
+ for pipeline in pipelines {
+ self.build_pipeline(wrench, pipeline["id"].as_pipeline_id().unwrap(), pipeline);
+ }
+ }
+
+ assert!(!yaml["root"].is_badvalue(), "Missing root stacking context");
+ let root_pipeline_id = wrench.root_pipeline_id;
+ self.build_pipeline(wrench, root_pipeline_id, &yaml["root"]);
+
+ // If replaying the same frame during interactive use, the frame gets rebuilt,
+ // but the external image handler has already been consumed by the renderer.
+ if let Some(external_image_handler) = self.external_image_handler.take() {
+ wrench.renderer.set_external_image_handler(external_image_handler);
+ }
+ }
+
+ fn build_pipeline(
+ &mut self,
+ wrench: &mut Wrench,
+ pipeline_id: PipelineId,
+ yaml: &Yaml
+ ) {
+ // Don't allow referencing clips between pipelines for now.
+ self.user_clip_id_map.clear();
+ self.user_spatial_id_map.clear();
+ self.clip_id_stack.clear();
+ self.clip_id_stack.push(ClipId::root(pipeline_id));
+ self.spatial_id_stack.clear();
+ self.spatial_id_stack.push(SpatialId::root_scroll_node(pipeline_id));
+
+ let content_size = self.get_root_size_from_yaml(wrench, yaml);
+ let mut builder = DisplayListBuilder::new(pipeline_id, content_size);
+ let mut info = CommonItemProperties {
+ clip_rect: LayoutRect::zero(),
+ clip_id: ClipId::invalid(),
+ spatial_id: SpatialId::new(0, PipelineId::dummy()),
+ flags: PrimitiveFlags::default(),
+ hit_info: None,
+ };
+ self.add_stacking_context_from_yaml(&mut builder, wrench, yaml, true, &mut info);
+ self.display_lists.push(builder.finalize());
+
+ assert_eq!(self.clip_id_stack.len(), 1);
+ assert_eq!(self.spatial_id_stack.len(), 1);
+ }
+
+ fn to_complex_clip_region(&mut self, item: &Yaml) -> ComplexClipRegion {
+ let rect = item["rect"]
+ .as_rect()
+ .expect("Complex clip entry must have rect");
+ let radius = item["radius"]
+ .as_border_radius()
+ .unwrap_or(BorderRadius::zero());
+ let mode = item["clip-mode"]
+ .as_clip_mode()
+ .unwrap_or(ClipMode::Clip);
+ ComplexClipRegion::new(rect, radius, mode)
+ }
+
+ fn to_complex_clip_regions(&mut self, item: &Yaml) -> Vec<ComplexClipRegion> {
+ match *item {
+ Yaml::Array(ref array) => array
+ .iter()
+ .map(|entry| self.to_complex_clip_region(entry))
+ .collect(),
+ Yaml::BadValue => vec![],
+ _ => {
+ println!("Unable to parse complex clip region {:?}", item);
+ vec![]
+ }
+ }
+ }
+
+ fn to_sticky_offset_bounds(&mut self, item: &Yaml) -> StickyOffsetBounds {
+ match *item {
+ Yaml::Array(ref array) => StickyOffsetBounds::new(
+ array[0].as_f32().unwrap_or(0.0),
+ array[1].as_f32().unwrap_or(0.0),
+ ),
+ _ => StickyOffsetBounds::new(0.0, 0.0),
+ }
+ }
+
+ fn to_clip_id(&self, item: &Yaml, pipeline_id: PipelineId) -> Option<ClipId> {
+ match *item {
+ Yaml::Integer(value) => Some(self.user_clip_id_map[&(value as u64)]),
+ Yaml::String(ref id_string) if id_string == "root_clip" =>
+ Some(ClipId::root(pipeline_id)),
+ _ => None,
+ }
+ }
+
+ fn to_spatial_id(&self, item: &Yaml, pipeline_id: PipelineId) -> SpatialId {
+ match *item {
+ Yaml::Integer(value) => self.user_spatial_id_map[&(value as u64)],
+ Yaml::String(ref id_string) if id_string == "root-reference-frame" =>
+ SpatialId::root_reference_frame(pipeline_id),
+ Yaml::String(ref id_string) if id_string == "root-scroll-node" =>
+ SpatialId::root_scroll_node(pipeline_id),
+ _ => {
+ println!("Unable to parse SpatialId {:?}", item);
+ SpatialId::root_reference_frame(pipeline_id)
+ }
+ }
+ }
+
+ fn add_clip_id_mapping(&mut self, numeric_id: u64, real_id: ClipId) {
+ assert_ne!(numeric_id, 0, "id=0 is reserved for the root clip");
+ self.user_clip_id_map.insert(numeric_id, real_id);
+ }
+
+ fn add_spatial_id_mapping(&mut self, numeric_id: u64, real_id: SpatialId) {
+ assert_ne!(numeric_id, 0, "id=0 is reserved for the root reference frame");
+ assert_ne!(numeric_id, 1, "id=1 is reserved for the root scroll node");
+ self.user_spatial_id_map.insert(numeric_id, real_id);
+ }
+
+ fn to_clip_and_scroll_info(
+ &self,
+ item: &Yaml,
+ pipeline_id: PipelineId
+ ) -> (Option<ClipId>, Option<SpatialId>) {
+ // Note: this is tricky. In the old code the single ID could be used either way
+ // for clip/scroll. In the new code we are trying to reflect that and not break
+ // all the reftests. Ultimately we'd want the clip and scroll nodes to be
+ // provided separately in YAML.
+ match *item {
+ Yaml::BadValue => (None, None),
+ Yaml::Array(ref array) if array.len() == 2 => {
+ let scroll_id = self.to_spatial_id(&array[0], pipeline_id);
+ let clip_id = self.to_clip_id(&array[1], pipeline_id);
+ (clip_id, Some(scroll_id))
+ }
+ Yaml::String(ref id_string) if id_string == "root-reference-frame" => {
+ let scroll_id = SpatialId::root_reference_frame(pipeline_id);
+ let clip_id = ClipId::root(pipeline_id);
+ (Some(clip_id), Some(scroll_id))
+ }
+ Yaml::String(ref id_string) if id_string == "root-scroll-node" => {
+ let scroll_id = SpatialId::root_scroll_node(pipeline_id);
+ (None, Some(scroll_id))
+ }
+ Yaml::String(ref id_string) if id_string == "root_clip" => {
+ let clip_id = ClipId::root(pipeline_id);
+ (Some(clip_id), None)
+ }
+ Yaml::Integer(value) => {
+ let scroll_id = self.user_spatial_id_map
+ .get(&(value as u64))
+ .cloned();
+ let clip_id = self.user_clip_id_map
+ .get(&(value as u64))
+ .cloned();
+ assert!(scroll_id.is_some() || clip_id.is_some(),
+ "clip-and-scroll index not found: {}", value);
+ (clip_id, scroll_id)
+ }
+ _ => {
+ println!("Unable to parse clip/scroll {:?}", item);
+ (None, None)
+ }
+ }
+ }
+
+ fn to_hit_testing_tag(&self, item: &Yaml) -> Option<ItemTag> {
+ match *item {
+ Yaml::Array(ref array) if array.len() == 2 => {
+ match (array[0].as_i64(), array[1].as_i64()) {
+ (Some(first), Some(second)) => Some((first as u64, second as u16)),
+ _ => None,
+ }
+ }
+ _ => None,
+ }
+
+ }
+
+ fn add_or_get_image(
+ &mut self,
+ file: &Path,
+ tiling: Option<i64>,
+ item: &Yaml,
+ wrench: &mut Wrench,
+ ) -> (ImageKey, LayoutSize) {
+ let key = (file.to_owned(), tiling);
+ if let Some(k) = self.image_map.get(&key) {
+ return *k;
+ }
+
+ if self.list_resources { println!("{}", file.to_string_lossy()); }
+ let (descriptor, image_data) = match image::open(file) {
+ Ok(image) => {
+ let (image_width, image_height) = image.dimensions();
+ let (format, bytes) = match image {
+ image::DynamicImage::ImageLuma8(_) => {
+ (ImageFormat::R8, image.to_bytes())
+ }
+ image::DynamicImage::ImageRgba8(_) => {
+ let mut pixels = image.to_bytes();
+ premultiply(pixels.as_mut_slice());
+ (ImageFormat::BGRA8, pixels)
+ }
+ image::DynamicImage::ImageRgb8(_) => {
+ let bytes = image.to_bytes();
+ let mut pixels = Vec::with_capacity(image_width as usize * image_height as usize * 4);
+ for bgr in bytes.chunks(3) {
+ pixels.extend_from_slice(&[
+ bgr[2],
+ bgr[1],
+ bgr[0],
+ 0xff
+ ]);
+ }
+ (ImageFormat::BGRA8, pixels)
+ }
+ _ => panic!("We don't support whatever your crazy image type is, come on"),
+ };
+ let mut flags = ImageDescriptorFlags::empty();
+ if is_image_opaque(format, &bytes[..]) {
+ flags |= ImageDescriptorFlags::IS_OPAQUE;
+ }
+ if self.allow_mipmaps {
+ flags |= ImageDescriptorFlags::ALLOW_MIPMAPS;
+ }
+ let descriptor = ImageDescriptor::new(
+ image_width as i32,
+ image_height as i32,
+ format,
+ flags,
+ );
+ let data = ImageData::new(bytes);
+ (descriptor, data)
+ }
+ _ => {
+ // This is a hack but it is convenient when generating test cases and avoids
+ // bloating the repository.
+ match parse_function(
+ file.components()
+ .last()
+ .unwrap()
+ .as_os_str()
+ .to_str()
+ .unwrap(),
+ ) {
+ ("xy-gradient", args, _) => generate_xy_gradient_image(
+ args.get(0).unwrap_or(&"1000").parse::<u32>().unwrap(),
+ args.get(1).unwrap_or(&"1000").parse::<u32>().unwrap(),
+ ),
+ ("solid-color", args, _) => generate_solid_color_image(
+ args.get(0).unwrap_or(&"255").parse::<u8>().unwrap(),
+ args.get(1).unwrap_or(&"255").parse::<u8>().unwrap(),
+ args.get(2).unwrap_or(&"255").parse::<u8>().unwrap(),
+ args.get(3).unwrap_or(&"255").parse::<u8>().unwrap(),
+ args.get(4).unwrap_or(&"1000").parse::<u32>().unwrap(),
+ args.get(5).unwrap_or(&"1000").parse::<u32>().unwrap(),
+ ),
+ (name @ "transparent-checkerboard", args, _) |
+ (name @ "checkerboard", args, _) => {
+ let border = args.get(0).unwrap_or(&"4").parse::<u32>().unwrap();
+
+ let (x_size, y_size, x_count, y_count) = match args.len() {
+ 3 => {
+ let size = args.get(1).unwrap_or(&"32").parse::<u32>().unwrap();
+ let count = args.get(2).unwrap_or(&"8").parse::<u32>().unwrap();
+ (size, size, count, count)
+ }
+ 5 => {
+ let x_size = args.get(1).unwrap_or(&"32").parse::<u32>().unwrap();
+ let y_size = args.get(2).unwrap_or(&"32").parse::<u32>().unwrap();
+ let x_count = args.get(3).unwrap_or(&"8").parse::<u32>().unwrap();
+ let y_count = args.get(4).unwrap_or(&"8").parse::<u32>().unwrap();
+ (x_size, y_size, x_count, y_count)
+ }
+ _ => {
+ panic!("invalid checkerboard function");
+ }
+ };
+
+ let kind = if name == "transparent-checkerboard" {
+ CheckerboardKind::BlackTransparent
+ } else {
+ CheckerboardKind::BlackGrey
+ };
+
+ generate_checkerboard_image(
+ border,
+ x_size,
+ y_size,
+ x_count,
+ y_count,
+ kind,
+ )
+ }
+ _ => {
+ panic!("Failed to load image {:?}", file.to_str());
+ }
+ }
+ }
+ };
+ let tiling = tiling.map(|tile_size| tile_size as u16);
+ let image_key = wrench.api.generate_image_key();
+ let mut txn = Transaction::new();
+
+ let external = item["external"].as_bool().unwrap_or(false);
+ if external {
+ // This indicates we want to simulate an external texture,
+ // ensure it gets created as such
+ let external_target = match item["external-target"].as_str() {
+ Some(ref s) => match &s[..] {
+ "2d" => TextureTarget::Default,
+ "array" => TextureTarget::Array,
+ "rect" => TextureTarget::Rect,
+ _ => panic!("Unsupported external texture target."),
+ }
+ None => {
+ TextureTarget::Default
+ }
+ };
+
+ let external_image_data =
+ self.external_image_handler.as_mut().unwrap().add_image(
+ &wrench.renderer.device,
+ descriptor,
+ external_target,
+ image_data
+ );
+ txn.add_image(image_key, descriptor, external_image_data, tiling);
+ } else {
+ txn.add_image(image_key, descriptor, image_data, tiling);
+ }
+
+ wrench.api.send_transaction(wrench.document_id, txn);
+ let val = (
+ image_key,
+ LayoutSize::new(descriptor.size.width as f32, descriptor.size.height as f32),
+ );
+ self.image_map.insert(key, val);
+ val
+ }
+
+ fn get_or_create_font(&mut self, desc: FontDescriptor, wrench: &mut Wrench) -> FontKey {
+ let list_resources = self.list_resources;
+ *self.fonts
+ .entry(desc.clone())
+ .or_insert_with(|| match desc {
+ FontDescriptor::Path {
+ ref path,
+ font_index,
+ } => {
+ if list_resources { println!("{}", path.to_string_lossy()); }
+ let mut file = File::open(path).expect("Couldn't open font file");
+ let mut bytes = vec![];
+ file.read_to_end(&mut bytes)
+ .expect("failed to read font file");
+ wrench.font_key_from_bytes(bytes, font_index)
+ }
+ FontDescriptor::Family { ref name } => wrench.font_key_from_name(name),
+ FontDescriptor::Properties {
+ ref family,
+ weight,
+ style,
+ stretch,
+ } => wrench.font_key_from_properties(family, weight, style, stretch),
+ })
+ }
+
+ pub fn allow_mipmaps(&mut self, allow_mipmaps: bool) {
+ self.allow_mipmaps = allow_mipmaps;
+ }
+
+ pub fn set_font_render_mode(&mut self, render_mode: Option<FontRenderMode>) {
+ self.font_render_mode = render_mode;
+ }
+
+ fn get_or_create_font_instance(
+ &mut self,
+ font_key: FontKey,
+ size: f32,
+ bg_color: Option<ColorU>,
+ flags: FontInstanceFlags,
+ synthetic_italics: SyntheticItalics,
+ wrench: &mut Wrench,
+ ) -> FontInstanceKey {
+ let font_render_mode = self.font_render_mode;
+
+ *self.font_instances
+ .entry((font_key, size.into(), flags, bg_color, synthetic_italics))
+ .or_insert_with(|| {
+ wrench.add_font_instance(
+ font_key,
+ size,
+ flags,
+ font_render_mode,
+ bg_color,
+ synthetic_italics,
+ )
+ })
+ }
+
+ fn to_image_mask(&mut self, item: &Yaml, wrench: &mut Wrench) -> Option<ImageMask> {
+ if item.as_hash().is_none() {
+ return None;
+ }
+
+ let tiling = item["tile-size"].as_i64();
+
+ let (image_key, image_dims) = match item["image"].as_str() {
+ Some(filename) => {
+ if filename == "invalid" {
+ (ImageKey::DUMMY, LayoutSize::new(100.0, 100.0))
+ } else {
+ let mut file = self.aux_dir.clone();
+ file.push(filename);
+ self.add_or_get_image(&file, tiling, item, wrench)
+ }
+ }
+ None => {
+ warn!("No image provided for the image-mask!");
+ return None;
+ }
+ };
+
+ let image_rect = item["rect"]
+ .as_rect()
+ .unwrap_or(LayoutRect::new(LayoutPoint::zero(), image_dims));
+ let image_repeat = item["repeat"].as_bool().expect("Expected boolean");
+ Some(ImageMask {
+ image: image_key,
+ rect: image_rect,
+ repeat: image_repeat,
+ })
+ }
+
+ fn to_gradient(&mut self, dl: &mut DisplayListBuilder, item: &Yaml) -> Gradient {
+ let start = item["start"].as_point().expect("gradient must have start");
+ let end = item["end"].as_point().expect("gradient must have end");
+ let stops = item["stops"]
+ .as_vec()
+ .expect("gradient must have stops")
+ .chunks(2)
+ .map(|chunk| {
+ GradientStop {
+ offset: chunk[0]
+ .as_force_f32()
+ .expect("gradient stop offset is not f32"),
+ color: chunk[1]
+ .as_colorf()
+ .expect("gradient stop color is not color"),
+ }
+ })
+ .collect::<Vec<_>>();
+ let extend_mode = if item["repeat"].as_bool().unwrap_or(false) {
+ ExtendMode::Repeat
+ } else {
+ ExtendMode::Clamp
+ };
+
+ dl.create_gradient(start, end, stops, extend_mode)
+ }
+
+ fn to_radial_gradient(&mut self, dl: &mut DisplayListBuilder, item: &Yaml) -> RadialGradient {
+ let center = item["center"].as_point().expect("radial gradient must have center");
+ let radius = item["radius"].as_size().expect("radial gradient must have a radius");
+ let stops = item["stops"]
+ .as_vec()
+ .expect("radial gradient must have stops")
+ .chunks(2)
+ .map(|chunk| {
+ GradientStop {
+ offset: chunk[0]
+ .as_force_f32()
+ .expect("gradient stop offset is not f32"),
+ color: chunk[1]
+ .as_colorf()
+ .expect("gradient stop color is not color"),
+ }
+ })
+ .collect::<Vec<_>>();
+ let extend_mode = if item["repeat"].as_bool().unwrap_or(false) {
+ ExtendMode::Repeat
+ } else {
+ ExtendMode::Clamp
+ };
+
+ dl.create_radial_gradient(center, radius, stops, extend_mode)
+ }
+
+ fn to_conic_gradient(&mut self, dl: &mut DisplayListBuilder, item: &Yaml) -> ConicGradient {
+ let center = item["center"].as_point().expect("conic gradient must have center");
+ let angle = item["angle"].as_force_f32().expect("conic gradient must have an angle");
+ let stops = item["stops"]
+ .as_vec()
+ .expect("conic gradient must have stops")
+ .chunks(2)
+ .map(|chunk| {
+ GradientStop {
+ offset: chunk[0]
+ .as_force_f32()
+ .expect("gradient stop offset is not f32"),
+ color: chunk[1]
+ .as_colorf()
+ .expect("gradient stop color is not color"),
+ }
+ })
+ .collect::<Vec<_>>();
+ let extend_mode = if item["repeat"].as_bool().unwrap_or(false) {
+ ExtendMode::Repeat
+ } else {
+ ExtendMode::Clamp
+ };
+
+ dl.create_conic_gradient(center, angle, stops, extend_mode)
+ }
+
+ fn handle_rect(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ item: &Yaml,
+ info: &CommonItemProperties,
+ ) {
+ let bounds_key = if item["type"].is_badvalue() {
+ "rect"
+ } else {
+ "bounds"
+ };
+
+ let bounds = self.resolve_rect(&item[bounds_key]);
+ let color = self.resolve_colorf(&item["color"], ColorF::BLACK);
+ dl.push_rect(&info, bounds, color);
+ }
+
+ fn handle_clear_rect(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ item: &Yaml,
+ info: &CommonItemProperties,
+ ) {
+ let bounds = item["bounds"].as_rect().expect("clear-rect type must have bounds");
+ dl.push_clear_rect(&info, bounds);
+ }
+
+ fn handle_hit_test(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ info.clip_rect = try_intersect!(
+ item["bounds"].as_rect().expect("hit-test type must have bounds"),
+ &info.clip_rect
+ );
+
+ dl.push_hit_test(&info);
+ }
+
+ fn handle_line(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ let color = item["color"].as_colorf().unwrap_or(ColorF::BLACK);
+ let orientation = item["orientation"]
+ .as_str()
+ .and_then(LineOrientation::from_str)
+ .expect("line must have orientation");
+ let style = item["style"]
+ .as_str()
+ .and_then(LineStyle::from_str)
+ .expect("line must have style");
+
+ let wavy_line_thickness = if let LineStyle::Wavy = style {
+ item["thickness"].as_f32().expect("wavy lines must have a thickness")
+ } else {
+ 0.0
+ };
+
+ let area;
+ if item["baseline"].is_badvalue() {
+ let bounds_key = if item["type"].is_badvalue() {
+ "rect"
+ } else {
+ "bounds"
+ };
+
+ area = item[bounds_key]
+ .as_rect()
+ .expect("line type must have bounds");
+ } else {
+ // Legacy line representation
+ let baseline = item["baseline"].as_f32().expect("line must have baseline");
+ let start = item["start"].as_f32().expect("line must have start");
+ let end = item["end"].as_f32().expect("line must have end");
+ let width = item["width"].as_f32().expect("line must have width");
+
+ area = match orientation {
+ LineOrientation::Horizontal => {
+ LayoutRect::new(LayoutPoint::new(start, baseline),
+ LayoutSize::new(end - start, width))
+ }
+ LineOrientation::Vertical => {
+ LayoutRect::new(LayoutPoint::new(baseline, start),
+ LayoutSize::new(width, end - start))
+ }
+ };
+ }
+
+ dl.push_line(
+ &info,
+ &area,
+ wavy_line_thickness,
+ orientation,
+ &color,
+ style,
+ );
+ }
+
+ fn handle_gradient(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ let bounds_key = if item["type"].is_badvalue() {
+ "gradient"
+ } else {
+ "bounds"
+ };
+ let bounds = item[bounds_key]
+ .as_rect()
+ .expect("gradient must have bounds");
+
+ let gradient = self.to_gradient(dl, item);
+ let tile_size = item["tile-size"].as_size().unwrap_or(bounds.size);
+ let tile_spacing = item["tile-spacing"].as_size().unwrap_or(LayoutSize::zero());
+
+ dl.push_gradient(
+ &info,
+ bounds,
+ gradient,
+ tile_size,
+ tile_spacing
+ );
+ }
+
+ fn handle_radial_gradient(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ let bounds_key = if item["type"].is_badvalue() {
+ "radial-gradient"
+ } else {
+ "bounds"
+ };
+ let bounds = item[bounds_key]
+ .as_rect()
+ .expect("radial gradient must have bounds");
+ let gradient = self.to_radial_gradient(dl, item);
+ let tile_size = item["tile-size"].as_size().unwrap_or(bounds.size);
+ let tile_spacing = item["tile-spacing"].as_size().unwrap_or(LayoutSize::zero());
+
+ dl.push_radial_gradient(
+ &info,
+ bounds,
+ gradient,
+ tile_size,
+ tile_spacing,
+ );
+ }
+
+ fn handle_conic_gradient(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ let bounds_key = if item["type"].is_badvalue() {
+ "conic-gradient"
+ } else {
+ "bounds"
+ };
+ let bounds = item[bounds_key]
+ .as_rect()
+ .expect("conic gradient must have bounds");
+ let gradient = self.to_conic_gradient(dl, item);
+ let tile_size = item["tile-size"].as_size().unwrap_or(bounds.size);
+ let tile_spacing = item["tile-spacing"].as_size().unwrap_or(LayoutSize::zero());
+
+ dl.push_conic_gradient(
+ &info,
+ bounds,
+ gradient,
+ tile_size,
+ tile_spacing,
+ );
+ }
+
+ fn handle_border(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ wrench: &mut Wrench,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ let bounds_key = if item["type"].is_badvalue() {
+ "border"
+ } else {
+ "bounds"
+ };
+ let bounds = item[bounds_key].as_rect().expect("borders must have bounds");
+ let widths = item["width"]
+ .as_vec_f32()
+ .expect("borders must have width(s)");
+ let widths = broadcast(&widths, 4);
+ let widths = LayoutSideOffsets::new(widths[0], widths[3], widths[2], widths[1]);
+ let border_details = if let Some(border_type) = item["border-type"].as_str() {
+ match border_type {
+ "normal" => {
+ let colors = item["color"]
+ .as_vec_colorf()
+ .expect("borders must have color(s)");
+ let styles = item["style"]
+ .as_vec_string()
+ .expect("borders must have style(s)");
+ let styles = styles
+ .iter()
+ .map(|s| match s.as_str() {
+ "none" => BorderStyle::None,
+ "solid" => BorderStyle::Solid,
+ "double" => BorderStyle::Double,
+ "dotted" => BorderStyle::Dotted,
+ "dashed" => BorderStyle::Dashed,
+ "hidden" => BorderStyle::Hidden,
+ "ridge" => BorderStyle::Ridge,
+ "inset" => BorderStyle::Inset,
+ "outset" => BorderStyle::Outset,
+ "groove" => BorderStyle::Groove,
+ s => {
+ panic!("Unknown border style '{}'", s);
+ }
+ })
+ .collect::<Vec<BorderStyle>>();
+ let radius = item["radius"]
+ .as_border_radius()
+ .unwrap_or(BorderRadius::zero());
+
+ let colors = broadcast(&colors, 4);
+ let styles = broadcast(&styles, 4);
+
+ let top = BorderSide {
+ color: colors[0],
+ style: styles[0],
+ };
+ let right = BorderSide {
+ color: colors[1],
+ style: styles[1],
+ };
+ let bottom = BorderSide {
+ color: colors[2],
+ style: styles[2],
+ };
+ let left = BorderSide {
+ color: colors[3],
+ style: styles[3],
+ };
+ let do_aa = item["do_aa"].as_bool().unwrap_or(true);
+ Some(BorderDetails::Normal(NormalBorder {
+ top,
+ left,
+ bottom,
+ right,
+ radius,
+ do_aa,
+ }))
+ }
+ "image" | "gradient" | "radial-gradient" | "conic-gradient" => {
+ let image_width = item["image-width"]
+ .as_i64()
+ .unwrap_or(bounds.size.width as i64);
+ let image_height = item["image-height"]
+ .as_i64()
+ .unwrap_or(bounds.size.height as i64);
+ let fill = item["fill"].as_bool().unwrap_or(false);
+
+ let slice = item["slice"].as_vec_u32();
+ let slice = match slice {
+ Some(slice) => broadcast(&slice, 4),
+ None => vec![widths.top as u32, widths.left as u32, widths.bottom as u32, widths.right as u32],
+ };
+
+ let outset = item["outset"]
+ .as_vec_f32()
+ .expect("border must have outset");
+ let outset = broadcast(&outset, 4);
+ let repeat_horizontal = match item["repeat-horizontal"]
+ .as_str()
+ .unwrap_or("stretch")
+ {
+ "stretch" => RepeatMode::Stretch,
+ "repeat" => RepeatMode::Repeat,
+ "round" => RepeatMode::Round,
+ "space" => RepeatMode::Space,
+ s => panic!("Unknown box border image repeat mode {}", s),
+ };
+ let repeat_vertical = match item["repeat-vertical"]
+ .as_str()
+ .unwrap_or("stretch")
+ {
+ "stretch" => RepeatMode::Stretch,
+ "repeat" => RepeatMode::Repeat,
+ "round" => RepeatMode::Round,
+ "space" => RepeatMode::Space,
+ s => panic!("Unknown box border image repeat mode {}", s),
+ };
+ let source = match border_type {
+ "image" => {
+ let file = rsrc_path(&item["image-source"], &self.aux_dir);
+ let (image_key, _) = self
+ .add_or_get_image(&file, None, item, wrench);
+ NinePatchBorderSource::Image(image_key)
+ }
+ "gradient" => {
+ let gradient = self.to_gradient(dl, item);
+ NinePatchBorderSource::Gradient(gradient)
+ }
+ "radial-gradient" => {
+ let gradient = self.to_radial_gradient(dl, item);
+ NinePatchBorderSource::RadialGradient(gradient)
+ }
+ "conic-gradient" => {
+ let gradient = self.to_conic_gradient(dl, item);
+ NinePatchBorderSource::ConicGradient(gradient)
+ }
+ _ => unreachable!("Unexpected border type"),
+ };
+
+ Some(BorderDetails::NinePatch(NinePatchBorder {
+ source,
+ width: image_width as i32,
+ height: image_height as i32,
+ slice: SideOffsets2D::new(slice[0] as i32, slice[1] as i32, slice[2] as i32, slice[3] as i32),
+ fill,
+ repeat_horizontal,
+ repeat_vertical,
+ outset: SideOffsets2D::new(outset[0], outset[1], outset[2], outset[3]),
+ }))
+ }
+ _ => {
+ println!("Unable to parse border {:?}", item);
+ None
+ }
+ }
+ } else {
+ println!("Unable to parse border {:?}", item);
+ None
+ };
+ if let Some(details) = border_details {
+ dl.push_border(&info, bounds, widths, details);
+ }
+ }
+
+ fn handle_box_shadow(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ let bounds_key = if item["type"].is_badvalue() {
+ "box-shadow"
+ } else {
+ "bounds"
+ };
+ let bounds = item[bounds_key]
+ .as_rect()
+ .expect("box shadow must have bounds");
+ let box_bounds = item["box-bounds"].as_rect().unwrap_or(bounds);
+ let offset = self.resolve_vector(&item["offset"], LayoutVector2D::zero());
+ let color = item["color"]
+ .as_colorf()
+ .unwrap_or(ColorF::new(0.0, 0.0, 0.0, 1.0));
+ let blur_radius = item["blur-radius"].as_force_f32().unwrap_or(0.0);
+ let spread_radius = item["spread-radius"].as_force_f32().unwrap_or(0.0);
+ let border_radius = item["border-radius"]
+ .as_border_radius()
+ .unwrap_or(BorderRadius::zero());
+ let clip_mode = if let Some(mode) = item["clip-mode"].as_str() {
+ match mode {
+ "outset" => BoxShadowClipMode::Outset,
+ "inset" => BoxShadowClipMode::Inset,
+ s => panic!("Unknown box shadow clip mode {}", s),
+ }
+ } else {
+ BoxShadowClipMode::Outset
+ };
+
+ dl.push_box_shadow(
+ &info,
+ box_bounds,
+ offset,
+ color,
+ blur_radius,
+ spread_radius,
+ border_radius,
+ clip_mode,
+ );
+ }
+
+ fn handle_yuv_image(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ wrench: &mut Wrench,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ // TODO(gw): Support other YUV color depth and spaces.
+ let color_depth = ColorDepth::Color8;
+ let color_space = YuvColorSpace::Rec709;
+ let color_range = ColorRange::Limited;
+
+ let yuv_data = match item["format"].as_str().expect("no format supplied") {
+ "planar" => {
+ let y_path = rsrc_path(&item["src-y"], &self.aux_dir);
+ let (y_key, _) = self.add_or_get_image(&y_path, None, item, wrench);
+
+ let u_path = rsrc_path(&item["src-u"], &self.aux_dir);
+ let (u_key, _) = self.add_or_get_image(&u_path, None, item, wrench);
+
+ let v_path = rsrc_path(&item["src-v"], &self.aux_dir);
+ let (v_key, _) = self.add_or_get_image(&v_path, None, item, wrench);
+
+ YuvData::PlanarYCbCr(y_key, u_key, v_key)
+ }
+ "nv12" => {
+ let y_path = rsrc_path(&item["src-y"], &self.aux_dir);
+ let (y_key, _) = self.add_or_get_image(&y_path, None, item, wrench);
+
+ let uv_path = rsrc_path(&item["src-uv"], &self.aux_dir);
+ let (uv_key, _) = self.add_or_get_image(&uv_path, None, item, wrench);
+
+ YuvData::NV12(y_key, uv_key)
+ }
+ "interleaved" => {
+ let yuv_path = rsrc_path(&item["src"], &self.aux_dir);
+ let (yuv_key, _) = self.add_or_get_image(&yuv_path, None, item, wrench);
+
+ YuvData::InterleavedYCbCr(yuv_key)
+ }
+ _ => {
+ panic!("unexpected yuv format");
+ }
+ };
+
+ let bounds = item["bounds"].as_vec_f32().unwrap();
+ let bounds = LayoutRect::new(
+ LayoutPoint::new(bounds[0], bounds[1]),
+ LayoutSize::new(bounds[2], bounds[3]),
+ );
+
+ dl.push_yuv_image(
+ &info,
+ bounds,
+ yuv_data,
+ color_depth,
+ color_space,
+ color_range,
+ ImageRendering::Auto,
+ );
+ }
+
+ fn handle_image(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ wrench: &mut Wrench,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ let filename = &item[if item["type"].is_badvalue() {
+ "image"
+ } else {
+ "src"
+ }];
+ let tiling = item["tile-size"].as_i64();
+ let file = rsrc_path(filename, &self.aux_dir);
+ let (image_key, image_dims) =
+ self.add_or_get_image(&file, tiling, item, wrench);
+
+ let bounds_raws = item["bounds"].as_vec_f32().unwrap();
+ let bounds = if bounds_raws.len() == 2 {
+ LayoutRect::new(LayoutPoint::new(bounds_raws[0], bounds_raws[1]), image_dims)
+ } else if bounds_raws.len() == 4 {
+ LayoutRect::new(
+ LayoutPoint::new(bounds_raws[0], bounds_raws[1]),
+ LayoutSize::new(bounds_raws[2], bounds_raws[3]),
+ )
+ } else {
+ panic!(
+ "image expected 2 or 4 values in bounds, got '{:?}'",
+ item["bounds"]
+ );
+ };
+ let rendering = match item["rendering"].as_str() {
+ Some("auto") | None => ImageRendering::Auto,
+ Some("crisp-edges") => ImageRendering::CrispEdges,
+ Some("pixelated") => ImageRendering::Pixelated,
+ Some(_) => panic!(
+ "ImageRendering can be auto, crisp-edges, or pixelated -- got {:?}",
+ item
+ ),
+ };
+ let alpha_type = match item["alpha-type"].as_str() {
+ Some("premultiplied-alpha") | None => AlphaType::PremultipliedAlpha,
+ Some("alpha") => AlphaType::Alpha,
+ Some(_) => panic!(
+ "AlphaType can be premultiplied-alpha or alpha -- got {:?}",
+ item
+ ),
+ };
+ let stretch_size = item["stretch-size"].as_size();
+ let tile_spacing = item["tile-spacing"].as_size();
+ if stretch_size.is_none() && tile_spacing.is_none() {
+ dl.push_image(
+ &info,
+ bounds,
+ rendering,
+ alpha_type,
+ image_key,
+ ColorF::WHITE,
+ );
+ } else {
+ dl.push_repeating_image(
+ &info,
+ bounds,
+ stretch_size.unwrap_or(image_dims),
+ tile_spacing.unwrap_or(LayoutSize::zero()),
+ rendering,
+ alpha_type,
+ image_key,
+ ColorF::WHITE,
+ );
+ }
+ }
+
+ fn handle_text(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ wrench: &mut Wrench,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ let size = item["size"].as_pt_to_f32().unwrap_or(16.0);
+ let color = item["color"].as_colorf().unwrap_or(ColorF::BLACK);
+ let bg_color = item["bg-color"].as_colorf().map(|c| c.into());
+ let synthetic_italics = if let Some(angle) = item["synthetic-italics"].as_f32() {
+ SyntheticItalics::from_degrees(angle)
+ } else if item["synthetic-italics"].as_bool().unwrap_or(false) {
+ SyntheticItalics::enabled()
+ } else {
+ SyntheticItalics::disabled()
+ };
+
+ let mut flags = FontInstanceFlags::empty();
+ if item["synthetic-bold"].as_bool().unwrap_or(false) {
+ flags |= FontInstanceFlags::SYNTHETIC_BOLD;
+ }
+ if item["embedded-bitmaps"].as_bool().unwrap_or(false) {
+ flags |= FontInstanceFlags::EMBEDDED_BITMAPS;
+ }
+ if item["transpose"].as_bool().unwrap_or(false) {
+ flags |= FontInstanceFlags::TRANSPOSE;
+ }
+ if item["flip-x"].as_bool().unwrap_or(false) {
+ flags |= FontInstanceFlags::FLIP_X;
+ }
+ if item["flip-y"].as_bool().unwrap_or(false) {
+ flags |= FontInstanceFlags::FLIP_Y;
+ }
+
+ assert!(
+ item["blur-radius"].is_badvalue(),
+ "text no longer has a blur radius, use PushShadow and PopAllShadows"
+ );
+
+ let desc = FontDescriptor::from_yaml(item, &self.aux_dir);
+ let font_key = self.get_or_create_font(desc, wrench);
+ let font_instance_key = self.get_or_create_font_instance(font_key,
+ size,
+ bg_color,
+ flags,
+ synthetic_italics,
+ wrench);
+
+ assert!(
+ !(item["glyphs"].is_badvalue() && item["text"].is_badvalue()),
+ "text item had neither text nor glyphs!"
+ );
+
+ let (glyphs, rect) = if item["text"].is_badvalue() {
+ // if glyphs are specified, then the glyph positions can have the
+ // origin baked in.
+ let origin = item["origin"]
+ .as_point()
+ .unwrap_or(LayoutPoint::new(0.0, 0.0));
+ let glyph_indices = item["glyphs"].as_vec_u32().unwrap();
+ let glyph_offsets = item["offsets"].as_vec_f32().unwrap();
+ assert_eq!(glyph_offsets.len(), glyph_indices.len() * 2);
+
+ let glyphs = glyph_indices
+ .iter()
+ .enumerate()
+ .map(|k| {
+ GlyphInstance {
+ index: *k.1,
+ // In the future we want to change the API to be relative, eliminating this
+ point: LayoutPoint::new(
+ origin.x + glyph_offsets[k.0 * 2],
+ origin.y + glyph_offsets[k.0 * 2 + 1],
+ ),
+ }
+ })
+ .collect::<Vec<_>>();
+ // TODO(gw): We could optionally use the WR API to query glyph dimensions
+ // here and calculate the bounding region here if we want to.
+ let rect = item["bounds"]
+ .as_rect()
+ .expect("Text items with glyphs require bounds [for now]");
+ (glyphs, rect)
+ } else {
+ let text = item["text"].as_str().unwrap();
+ let origin = item["origin"]
+ .as_point()
+ .expect("origin required for text without glyphs");
+ let (glyph_indices, glyph_positions, bounds) = wrench.layout_simple_ascii(
+ font_key,
+ font_instance_key,
+ text,
+ size,
+ origin,
+ flags,
+ );
+
+ let glyphs = glyph_indices
+ .iter()
+ .zip(glyph_positions)
+ .map(|arg| {
+ let gi = GlyphInstance {
+ index: *arg.0 as u32,
+ point: arg.1,
+ };
+ gi
+ })
+ .collect::<Vec<_>>();
+ (glyphs, bounds)
+ };
+
+ dl.push_text(
+ &info,
+ rect,
+ &glyphs,
+ font_instance_key,
+ color,
+ None,
+ );
+ }
+
+ fn handle_iframe(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ let bounds = item["bounds"].as_rect().expect("iframe must have bounds");
+ let pipeline_id = item["id"].as_pipeline_id().unwrap();
+ let ignore = item["ignore_missing_pipeline"].as_bool().unwrap_or(true);
+ dl.push_iframe(
+ bounds,
+ info.clip_rect,
+ &SpaceAndClipInfo {
+ spatial_id: info.spatial_id,
+ clip_id: info.clip_id
+ },
+ pipeline_id,
+ ignore
+ );
+ }
+
+ fn get_complex_clip_for_item(&mut self, yaml: &Yaml) -> Option<ComplexClipRegion> {
+ let complex_clip = &yaml["complex-clip"];
+ if complex_clip.is_badvalue() {
+ return None;
+ }
+ Some(self.to_complex_clip_region(complex_clip))
+ }
+
+ fn get_item_type_from_yaml(item: &Yaml) -> &str {
+ let shorthands = [
+ "rect",
+ "image",
+ "text",
+ "glyphs",
+ "box-shadow", // Note: box_shadow shorthand check has to come before border.
+ "border",
+ "gradient",
+ "radial-gradient",
+ "conic-gradient"
+ ];
+
+ for shorthand in shorthands.iter() {
+ if !item[*shorthand].is_badvalue() {
+ return shorthand;
+ }
+ }
+ item["type"].as_str().unwrap_or("unknown")
+ }
+
+ fn add_display_list_items_from_yaml(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ wrench: &mut Wrench,
+ yaml: &Yaml,
+ ) {
+ // A very large number (but safely far away from finite limits of f32)
+ let big_number = 1.0e30;
+ // A rect that should in practical terms serve as a no-op for clipping
+ let full_clip = LayoutRect::new(
+ LayoutPoint::new(-big_number / 2.0, -big_number / 2.0),
+ LayoutSize::new(big_number, big_number));
+
+ for item in yaml.as_vec().unwrap() {
+ let item_type = Self::get_item_type_from_yaml(item);
+
+ // We never skip stacking contexts and reference frames because
+ // they are structural elements of the display list.
+ if item_type != "stacking-context" &&
+ item_type != "reference-frame" &&
+ self.include_only.contains(&item_type.to_owned()) {
+ continue;
+ }
+
+ let (set_clip_id, set_scroll_id) = self.to_clip_and_scroll_info(
+ &item["clip-and-scroll"],
+ dl.pipeline_id
+ );
+ if let Some(clip_id) = set_clip_id {
+ self.clip_id_stack.push(clip_id);
+ }
+ if let Some(scroll_id) = set_scroll_id {
+ self.spatial_id_stack.push(scroll_id);
+ }
+
+ let complex_clip = self.get_complex_clip_for_item(item);
+ let clip_rect = item["clip-rect"].as_rect().unwrap_or(full_clip);
+
+ let mut pushed_clip = false;
+ if let Some(complex_clip) = complex_clip {
+ match item_type {
+ "clip" | "clip-chain" | "scroll-frame" => {},
+ _ => {
+ let id = dl.define_clip_rounded_rect(
+ &self.top_space_and_clip(),
+ complex_clip,
+ );
+ self.clip_id_stack.push(id);
+ pushed_clip = true;
+ }
+ }
+ }
+
+ let space_and_clip = self.top_space_and_clip();
+ let mut flags = PrimitiveFlags::default();
+ if let Some(is_backface_visible) = item["backface-visible"].as_bool() {
+ if is_backface_visible {
+ flags.insert(PrimitiveFlags::IS_BACKFACE_VISIBLE);
+ } else {
+ flags.remove(PrimitiveFlags::IS_BACKFACE_VISIBLE);
+ }
+ }
+ if let Some(is_scrollbar_container) = item["scrollbar-container"].as_bool() {
+ if is_scrollbar_container {
+ flags.insert(PrimitiveFlags::IS_SCROLLBAR_CONTAINER);
+ } else {
+ flags.remove(PrimitiveFlags::IS_SCROLLBAR_CONTAINER);
+ }
+ }
+ if let Some(prefer_compositor_surface) = item["prefer-compositor-surface"].as_bool() {
+ if prefer_compositor_surface {
+ flags.insert(PrimitiveFlags::PREFER_COMPOSITOR_SURFACE);
+ } else {
+ flags.remove(PrimitiveFlags::PREFER_COMPOSITOR_SURFACE);
+ }
+ }
+
+ let mut info = CommonItemProperties {
+ clip_rect,
+ clip_id: space_and_clip.clip_id,
+ spatial_id: space_and_clip.spatial_id,
+ hit_info: self.to_hit_testing_tag(&item["hit-testing-tag"]),
+ flags,
+ };
+
+ match item_type {
+ "rect" => self.handle_rect(dl, item, &mut info),
+ "hit-test" => self.handle_hit_test(dl, item, &mut info),
+ "clear-rect" => self.handle_clear_rect(dl, item, &mut info),
+ "line" => self.handle_line(dl, item, &mut info),
+ "image" => self.handle_image(dl, wrench, item, &mut info),
+ "yuv-image" => self.handle_yuv_image(dl, wrench, item, &mut info),
+ "text" | "glyphs" => self.handle_text(dl, wrench, item, &mut info),
+ "scroll-frame" => self.handle_scroll_frame(dl, wrench, item),
+ "sticky-frame" => self.handle_sticky_frame(dl, wrench, item),
+ "clip" => self.handle_clip(dl, wrench, item),
+ "clip-chain" => self.handle_clip_chain(dl, item),
+ "border" => self.handle_border(dl, wrench, item, &mut info),
+ "gradient" => self.handle_gradient(dl, item, &mut info),
+ "radial-gradient" => self.handle_radial_gradient(dl, item, &mut info),
+ "conic-gradient" => self.handle_conic_gradient(dl, item, &mut info),
+ "box-shadow" => self.handle_box_shadow(dl, item, &mut info),
+ "iframe" => self.handle_iframe(dl, item, &mut info),
+ "stacking-context" => {
+ self.add_stacking_context_from_yaml(dl, wrench, item, false, &mut info)
+ }
+ "reference-frame" => self.handle_reference_frame(dl, wrench, item),
+ "shadow" => self.handle_push_shadow(dl, item, &mut info),
+ "pop-all-shadows" => self.handle_pop_all_shadows(dl),
+ "backdrop-filter" => self.handle_backdrop_filter(dl, item, &mut info),
+ _ => println!("Skipping unknown item type: {:?}", item),
+ }
+
+ if pushed_clip {
+ self.clip_id_stack.pop().unwrap();
+ }
+ if set_clip_id.is_some() {
+ self.clip_id_stack.pop().unwrap();
+ }
+ if set_scroll_id.is_some() {
+ self.spatial_id_stack.pop().unwrap();
+ }
+ }
+ }
+
+ fn handle_scroll_frame(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ wrench: &mut Wrench,
+ yaml: &Yaml,
+ ) {
+ let clip_rect = yaml["bounds"]
+ .as_rect()
+ .expect("scroll frame must have a bounds");
+ let content_size = yaml["content-size"].as_size().unwrap_or(clip_rect.size);
+ let content_rect = LayoutRect::new(clip_rect.origin, content_size);
+ let external_scroll_offset = yaml["external-scroll-offset"].as_vector().unwrap_or(LayoutVector2D::zero());
+
+ let numeric_id = yaml["id"].as_i64().map(|id| id as u64);
+
+ let external_id = yaml["scroll-offset"].as_point().map(|size| {
+ let id = ExternalScrollId((self.scroll_offsets.len() + 1) as u64, dl.pipeline_id);
+ self.scroll_offsets.insert(id, LayoutPoint::new(size.x, size.y));
+ id
+ });
+
+ let space_and_clip = dl.define_scroll_frame(
+ &self.top_space_and_clip(),
+ external_id,
+ content_rect,
+ clip_rect,
+ ScrollSensitivity::ScriptAndInputEvents,
+ external_scroll_offset,
+ );
+ if let Some(numeric_id) = numeric_id {
+ self.add_spatial_id_mapping(numeric_id, space_and_clip.spatial_id);
+ self.add_clip_id_mapping(numeric_id, space_and_clip.clip_id);
+ }
+
+ if !yaml["items"].is_badvalue() {
+ self.spatial_id_stack.push(space_and_clip.spatial_id);
+ self.clip_id_stack.push(space_and_clip.clip_id);
+ self.add_display_list_items_from_yaml(dl, wrench, &yaml["items"]);
+ self.clip_id_stack.pop().unwrap();
+ self.spatial_id_stack.pop().unwrap();
+ }
+ }
+
+ fn handle_sticky_frame(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ wrench: &mut Wrench,
+ yaml: &Yaml,
+ ) {
+ let bounds = yaml["bounds"].as_rect().expect("sticky frame must have a bounds");
+ let numeric_id = yaml["id"].as_i64().map(|id| id as u64);
+
+ let real_id = dl.define_sticky_frame(
+ *self.spatial_id_stack.last().unwrap(),
+ bounds,
+ SideOffsets2D::new(
+ yaml["margin-top"].as_f32(),
+ yaml["margin-right"].as_f32(),
+ yaml["margin-bottom"].as_f32(),
+ yaml["margin-left"].as_f32(),
+ ),
+ self.to_sticky_offset_bounds(&yaml["vertical-offset-bounds"]),
+ self.to_sticky_offset_bounds(&yaml["horizontal-offset-bounds"]),
+ yaml["previously-applied-offset"].as_vector().unwrap_or(LayoutVector2D::zero()),
+ );
+
+ if let Some(numeric_id) = numeric_id {
+ self.add_spatial_id_mapping(numeric_id, real_id);
+ }
+
+ if !yaml["items"].is_badvalue() {
+ self.spatial_id_stack.push(real_id);
+ self.add_display_list_items_from_yaml(dl, wrench, &yaml["items"]);
+ self.spatial_id_stack.pop().unwrap();
+ }
+ }
+
+ fn resolve_binding<'a>(
+ &'a self,
+ yaml: &'a Yaml,
+ ) -> &'a Yaml {
+ if let Some(ref keyframes) = self.keyframes {
+ if let Some(s) = yaml.as_str() {
+ let prefix: &str = "key(";
+ let suffix: &str = ")";
+ if s.starts_with(prefix) && s.ends_with(suffix) {
+ let key = &s[prefix.len() .. s.len() - 1];
+ return &keyframes[key][self.requested_frame];
+ }
+ }
+ }
+
+ yaml
+ }
+
+ fn resolve_colorf(
+ &self,
+ yaml: &Yaml,
+ default: ColorF,
+ ) -> ColorF {
+ self.resolve_binding(yaml)
+ .as_colorf()
+ .unwrap_or(default)
+ }
+
+ fn resolve_rect(
+ &self,
+ yaml: &Yaml,
+ ) -> LayoutRect {
+ self.resolve_binding(yaml)
+ .as_rect()
+ .expect(&format!("invalid rect {:?}", yaml))
+ }
+
+ fn resolve_vector(
+ &self,
+ yaml: &Yaml,
+ default: LayoutVector2D,
+ ) -> LayoutVector2D {
+ self.resolve_binding(yaml)
+ .as_vector()
+ .unwrap_or(default)
+ }
+
+ fn handle_push_shadow(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ yaml: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ let blur_radius = yaml["blur-radius"].as_f32().unwrap_or(0.0);
+ let offset = yaml["offset"].as_vector().unwrap_or(LayoutVector2D::zero());
+ let color = yaml["color"].as_colorf().unwrap_or(ColorF::BLACK);
+
+ dl.push_shadow(
+ &SpaceAndClipInfo { spatial_id: info.spatial_id, clip_id: info.clip_id },
+ Shadow {
+ blur_radius,
+ offset,
+ color,
+ },
+ true,
+ );
+ }
+
+ fn handle_pop_all_shadows(&mut self, dl: &mut DisplayListBuilder) {
+ dl.pop_all_shadows();
+ }
+
+ fn handle_clip_chain(&mut self, builder: &mut DisplayListBuilder, yaml: &Yaml) {
+ let numeric_id = yaml["id"].as_i64().expect("clip chains must have an id");
+ let clip_ids: Vec<ClipId> = yaml["clips"]
+ .as_vec_u64()
+ .unwrap_or_default()
+ .iter()
+ .map(|id| self.user_clip_id_map[id])
+ .collect();
+
+ let parent = self.to_clip_id(&yaml["parent"], builder.pipeline_id);
+ let parent = match parent {
+ Some(ClipId::ClipChain(clip_chain_id)) => Some(clip_chain_id),
+ Some(_) => panic!("Tried to create a ClipChain with a non-ClipChain parent"),
+ None => None,
+ };
+
+ let real_id = builder.define_clip_chain(parent, clip_ids);
+ self.add_clip_id_mapping(numeric_id as u64, ClipId::ClipChain(real_id));
+ }
+
+ fn handle_clip(&mut self, dl: &mut DisplayListBuilder, wrench: &mut Wrench, yaml: &Yaml) {
+ let numeric_id = yaml["id"].as_i64();
+ let complex_clips = self.to_complex_clip_regions(&yaml["complex"]);
+ let mut space_and_clip = self.top_space_and_clip();
+
+ if let Some(clip_rect) = yaml["bounds"].as_rect() {
+ space_and_clip.clip_id = dl.define_clip_rect(
+ &space_and_clip,
+ clip_rect,
+ );
+ }
+
+ if let Some(image_mask) = self.to_image_mask(&yaml["image-mask"], wrench) {
+ space_and_clip.clip_id = dl.define_clip_image_mask(
+ &space_and_clip,
+ image_mask,
+ );
+ }
+
+ for complex_clip in complex_clips {
+ space_and_clip.clip_id = dl.define_clip_rounded_rect(
+ &space_and_clip,
+ complex_clip,
+ );
+ }
+
+ if let Some(numeric_id) = numeric_id {
+ self.add_clip_id_mapping(numeric_id as u64, space_and_clip.clip_id);
+ self.add_spatial_id_mapping(numeric_id as u64, space_and_clip.spatial_id);
+ }
+
+ if !yaml["items"].is_badvalue() {
+ self.clip_id_stack.push(space_and_clip.clip_id);
+ self.add_display_list_items_from_yaml(dl, wrench, &yaml["items"]);
+ self.clip_id_stack.pop().unwrap();
+ }
+ }
+
+ fn get_root_size_from_yaml(&mut self, wrench: &mut Wrench, yaml: &Yaml) -> LayoutSize {
+ yaml["bounds"]
+ .as_rect()
+ .map(|rect| rect.size)
+ .unwrap_or(wrench.window_size_f32())
+ }
+
+ fn push_reference_frame(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ wrench: &mut Wrench,
+ yaml: &Yaml,
+ ) -> SpatialId {
+ let default_bounds = LayoutRect::new(LayoutPoint::zero(), wrench.window_size_f32());
+ let bounds = yaml["bounds"].as_rect().unwrap_or(default_bounds);
+ let default_transform_origin = LayoutPoint::new(
+ bounds.origin.x + bounds.size.width * 0.5,
+ bounds.origin.y + bounds.size.height * 0.5,
+ );
+
+ let transform_style = yaml["transform-style"]
+ .as_transform_style()
+ .unwrap_or(TransformStyle::Flat);
+
+ let transform_origin = yaml["transform-origin"]
+ .as_point()
+ .unwrap_or(default_transform_origin);
+
+ let perspective_origin = yaml["perspective-origin"]
+ .as_point()
+ .unwrap_or(default_transform_origin);
+
+ assert!(
+ yaml["transform"].is_badvalue() ||
+ yaml["perspective"].is_badvalue(),
+ "Should have one of either transform or perspective"
+ );
+
+ let reference_frame_kind = if !yaml["perspective"].is_badvalue() {
+ ReferenceFrameKind::Perspective { scrolling_relative_to: None }
+ } else {
+ ReferenceFrameKind::Transform
+ };
+
+ let transform = yaml["transform"]
+ .as_transform(&transform_origin);
+
+ let perspective = match yaml["perspective"].as_f32() {
+ Some(value) if value != 0.0 => {
+ Some(make_perspective(perspective_origin, value as f32))
+ }
+ Some(..) => None,
+ _ => yaml["perspective"].as_matrix4d(),
+ };
+
+ let reference_frame_id = dl.push_reference_frame(
+ bounds.origin,
+ *self.spatial_id_stack.last().unwrap(),
+ transform_style,
+ transform.or_else(|| perspective).unwrap_or_default().into(),
+ reference_frame_kind,
+ );
+
+ let numeric_id = yaml["id"].as_i64();
+ if let Some(numeric_id) = numeric_id {
+ self.add_spatial_id_mapping(numeric_id as u64, reference_frame_id);
+ }
+
+ reference_frame_id
+ }
+
+ fn handle_reference_frame(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ wrench: &mut Wrench,
+ yaml: &Yaml,
+ ) {
+ let real_id = self.push_reference_frame(dl, wrench, yaml);
+ self.spatial_id_stack.push(real_id);
+
+ if !yaml["items"].is_badvalue() {
+ self.add_display_list_items_from_yaml(dl, wrench, &yaml["items"]);
+ }
+
+ self.spatial_id_stack.pop().unwrap();
+ dl.pop_reference_frame();
+ }
+
+ fn add_stacking_context_from_yaml(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ wrench: &mut Wrench,
+ yaml: &Yaml,
+ is_root: bool,
+ info: &mut CommonItemProperties,
+ ) {
+ let default_bounds = LayoutRect::new(LayoutPoint::zero(), wrench.window_size_f32());
+ let mut bounds = yaml["bounds"].as_rect().unwrap_or(default_bounds);
+
+ let reference_frame_id = if !yaml["transform"].is_badvalue() ||
+ !yaml["perspective"].is_badvalue() {
+ let reference_frame_id = self.push_reference_frame(dl, wrench, yaml);
+ self.spatial_id_stack.push(reference_frame_id);
+ bounds.origin = LayoutPoint::zero();
+ Some(reference_frame_id)
+ } else {
+ None
+ };
+
+ let clip_node_id = self.to_clip_id(&yaml["clip-node"], dl.pipeline_id);
+
+ let transform_style = yaml["transform-style"]
+ .as_transform_style()
+ .unwrap_or(TransformStyle::Flat);
+ let mix_blend_mode = yaml["mix-blend-mode"]
+ .as_mix_blend_mode()
+ .unwrap_or(MixBlendMode::Normal);
+ let raster_space = yaml["raster-space"]
+ .as_raster_space()
+ .unwrap_or(RasterSpace::Screen);
+ let is_backdrop_root = yaml["backdrop-root"].as_bool().unwrap_or(false);
+ let is_blend_container = yaml["blend-container"].as_bool().unwrap_or(false);
+
+ if is_root {
+ if let Some(size) = yaml["scroll-offset"].as_point() {
+ let external_id = ExternalScrollId(0, dl.pipeline_id);
+ self.scroll_offsets.insert(external_id, LayoutPoint::new(size.x, size.y));
+ }
+ }
+
+ let filters = yaml["filters"].as_vec_filter_op().unwrap_or(vec![]);
+ let filter_datas = yaml["filter-datas"].as_vec_filter_data().unwrap_or(vec![]);
+ let filter_primitives = yaml["filter-primitives"].as_vec_filter_primitive().unwrap_or(vec![]);
+
+ let mut flags = StackingContextFlags::empty();
+ if is_backdrop_root {
+ flags |= StackingContextFlags::IS_BACKDROP_ROOT;
+ }
+ if is_blend_container {
+ flags |= StackingContextFlags::IS_BLEND_CONTAINER;
+ }
+
+ dl.push_stacking_context(
+ bounds.origin,
+ *self.spatial_id_stack.last().unwrap(),
+ info.flags,
+ clip_node_id,
+ transform_style,
+ mix_blend_mode,
+ &filters,
+ &filter_datas,
+ &filter_primitives,
+ raster_space,
+ flags,
+ );
+
+ if !yaml["items"].is_badvalue() {
+ self.add_display_list_items_from_yaml(dl, wrench, &yaml["items"]);
+ }
+
+ dl.pop_stacking_context();
+
+ if reference_frame_id.is_some() {
+ self.spatial_id_stack.pop().unwrap();
+ dl.pop_reference_frame();
+ }
+ }
+
+ fn handle_backdrop_filter(
+ &mut self,
+ dl: &mut DisplayListBuilder,
+ item: &Yaml,
+ info: &mut CommonItemProperties,
+ ) {
+ info.clip_rect = try_intersect!(
+ self.resolve_rect(&item["bounds"]),
+ &info.clip_rect
+ );
+
+ let filters = item["filters"].as_vec_filter_op().unwrap_or(vec![]);
+ let filter_datas = item["filter-datas"].as_vec_filter_data().unwrap_or(vec![]);
+ let filter_primitives = item["filter-primitives"].as_vec_filter_primitive().unwrap_or(vec![]);
+
+ dl.push_backdrop_filter(
+ &info,
+ &filters,
+ &filter_datas,
+ &filter_primitives,
+ );
+ }
+}
+
+impl WrenchThing for YamlFrameReader {
+ fn do_frame(&mut self, wrench: &mut Wrench) -> u32 {
+ let mut should_build_yaml = false;
+
+ // If YAML isn't read yet, or watching source file, reload from disk.
+ if self.yaml_string.is_empty() || self.watch_source {
+ let mut file = File::open(&self.yaml_path).unwrap();
+ self.yaml_string.clear();
+ file.read_to_string(&mut self.yaml_string).unwrap();
+ should_build_yaml = true;
+ }
+
+ // Evaluate conditions that require parsing the YAML.
+ if self.built_frame != self.requested_frame {
+ // Requested frame has changed
+ should_build_yaml = true;
+ }
+
+ // Build the DL from YAML if required
+ if should_build_yaml {
+ self.build(wrench);
+ }
+
+ // Determine whether to send a new DL, or just refresh.
+ if should_build_yaml || wrench.should_rebuild_display_lists() {
+ wrench.begin_frame();
+ wrench.send_lists(
+ self.frame_count,
+ self.display_lists.clone(),
+ &self.scroll_offsets,
+ );
+ } else {
+ wrench.refresh();
+ }
+
+ self.frame_count += 1;
+ self.frame_count
+ }
+
+ fn next_frame(&mut self) {
+ let mut max_frame_count = 0;
+ if let Some(ref keyframes) = self.keyframes {
+ for (_, values) in keyframes.as_hash().unwrap() {
+ max_frame_count = max_frame_count.max(values.as_vec().unwrap().len());
+ }
+ }
+ if self.requested_frame + 1 < max_frame_count {
+ self.requested_frame += 1;
+ }
+ }
+
+ fn prev_frame(&mut self) {
+ if self.requested_frame > 0 {
+ self.requested_frame -= 1;
+ }
+ }
+}
diff --git a/third_party/webrender/wrench/src/yaml_helper.rs b/third_party/webrender/wrench/src/yaml_helper.rs
new file mode 100644
index 00000000000..d82f863e9cc
--- /dev/null
+++ b/third_party/webrender/wrench/src/yaml_helper.rs
@@ -0,0 +1,805 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use euclid::{Angle, Size2D};
+use crate::parse_function::parse_function;
+use std::f32;
+use std::str::FromStr;
+use webrender::api::*;
+use webrender::api::units::*;
+use yaml_rust::{Yaml, YamlLoader};
+
+pub trait YamlHelper {
+ fn as_f32(&self) -> Option<f32>;
+ fn as_force_f32(&self) -> Option<f32>;
+ fn as_vec_f32(&self) -> Option<Vec<f32>>;
+ fn as_vec_u32(&self) -> Option<Vec<u32>>;
+ fn as_vec_u64(&self) -> Option<Vec<u64>>;
+ fn as_pipeline_id(&self) -> Option<PipelineId>;
+ fn as_rect(&self) -> Option<LayoutRect>;
+ fn as_size(&self) -> Option<LayoutSize>;
+ fn as_point(&self) -> Option<LayoutPoint>;
+ fn as_vector(&self) -> Option<LayoutVector2D>;
+ fn as_matrix4d(&self) -> Option<LayoutTransform>;
+ fn as_transform(&self, transform_origin: &LayoutPoint) -> Option<LayoutTransform>;
+ fn as_colorf(&self) -> Option<ColorF>;
+ fn as_vec_colorf(&self) -> Option<Vec<ColorF>>;
+ fn as_px_to_f32(&self) -> Option<f32>;
+ fn as_pt_to_f32(&self) -> Option<f32>;
+ fn as_vec_string(&self) -> Option<Vec<String>>;
+ fn as_border_radius_component(&self) -> LayoutSize;
+ fn as_border_radius(&self) -> Option<BorderRadius>;
+ fn as_transform_style(&self) -> Option<TransformStyle>;
+ fn as_raster_space(&self) -> Option<RasterSpace>;
+ fn as_clip_mode(&self) -> Option<ClipMode>;
+ fn as_mix_blend_mode(&self) -> Option<MixBlendMode>;
+ fn as_filter_op(&self) -> Option<FilterOp>;
+ fn as_vec_filter_op(&self) -> Option<Vec<FilterOp>>;
+ fn as_filter_data(&self) -> Option<FilterData>;
+ fn as_vec_filter_data(&self) -> Option<Vec<FilterData>>;
+ fn as_filter_input(&self) -> Option<FilterPrimitiveInput>;
+ fn as_filter_primitive(&self) -> Option<FilterPrimitive>;
+ fn as_vec_filter_primitive(&self) -> Option<Vec<FilterPrimitive>>;
+ fn as_color_space(&self) -> Option<ColorSpace>;
+}
+
+fn string_to_color(color: &str) -> Option<ColorF> {
+ match color {
+ "red" => Some(ColorF::new(1.0, 0.0, 0.0, 1.0)),
+ "green" => Some(ColorF::new(0.0, 1.0, 0.0, 1.0)),
+ "blue" => Some(ColorF::new(0.0, 0.0, 1.0, 1.0)),
+ "white" => Some(ColorF::new(1.0, 1.0, 1.0, 1.0)),
+ "black" => Some(ColorF::new(0.0, 0.0, 0.0, 1.0)),
+ "yellow" => Some(ColorF::new(1.0, 1.0, 0.0, 1.0)),
+ "transparent" => Some(ColorF::new(1.0, 1.0, 1.0, 0.0)),
+ s => {
+ let items: Vec<f32> = s.split_whitespace()
+ .map(|s| f32::from_str(s).unwrap())
+ .collect();
+ if items.len() == 3 {
+ Some(ColorF::new(
+ items[0] / 255.0,
+ items[1] / 255.0,
+ items[2] / 255.0,
+ 1.0,
+ ))
+ } else if items.len() == 4 {
+ Some(ColorF::new(
+ items[0] / 255.0,
+ items[1] / 255.0,
+ items[2] / 255.0,
+ items[3],
+ ))
+ } else {
+ None
+ }
+ }
+ }
+}
+
+pub trait StringEnum: Sized {
+ fn from_str(_: &str) -> Option<Self>;
+ fn as_str(&self) -> &'static str;
+}
+
+macro_rules! define_string_enum {
+ ($T:ident, [ $( $y:ident = $x:expr ),* ]) => {
+ impl StringEnum for $T {
+ fn from_str(text: &str) -> Option<$T> {
+ match text {
+ $( $x => Some($T::$y), )*
+ _ => {
+ println!("Unrecognized {} value '{}'", stringify!($T), text);
+ None
+ }
+ }
+ }
+ fn as_str(&self) -> &'static str {
+ match *self {
+ $( $T::$y => $x, )*
+ }
+ }
+ }
+ }
+}
+
+define_string_enum!(TransformStyle, [Flat = "flat", Preserve3D = "preserve-3d"]);
+
+define_string_enum!(
+ MixBlendMode,
+ [
+ Normal = "normal",
+ Multiply = "multiply",
+ Screen = "screen",
+ Overlay = "overlay",
+ Darken = "darken",
+ Lighten = "lighten",
+ ColorDodge = "color-dodge",
+ ColorBurn = "color-burn",
+ HardLight = "hard-light",
+ SoftLight = "soft-light",
+ Difference = "difference",
+ Exclusion = "exclusion",
+ Hue = "hue",
+ Saturation = "saturation",
+ Color = "color",
+ Luminosity = "luminosity"
+ ]
+);
+
+define_string_enum!(
+ LineOrientation,
+ [Horizontal = "horizontal", Vertical = "vertical"]
+);
+
+define_string_enum!(
+ LineStyle,
+ [
+ Solid = "solid",
+ Dotted = "dotted",
+ Dashed = "dashed",
+ Wavy = "wavy"
+ ]
+);
+
+define_string_enum!(ClipMode, [Clip = "clip", ClipOut = "clip-out"]);
+
+define_string_enum!(
+ ComponentTransferFuncType,
+ [
+ Identity = "Identity",
+ Table = "Table",
+ Discrete = "Discrete",
+ Linear = "Linear",
+ Gamma = "Gamma"
+ ]
+);
+
+define_string_enum!(
+ ColorSpace,
+ [
+ Srgb = "srgb",
+ LinearRgb = "linear-rgb"
+ ]
+);
+
+// Rotate around `axis` by `degrees` angle
+fn make_rotation(
+ origin: &LayoutPoint,
+ degrees: f32,
+ axis_x: f32,
+ axis_y: f32,
+ axis_z: f32,
+) -> LayoutTransform {
+ let pre_transform = LayoutTransform::translation(-origin.x, -origin.y, -0.0);
+ let post_transform = LayoutTransform::translation(origin.x, origin.y, 0.0);
+
+ let theta = 2.0f32 * f32::consts::PI - degrees.to_radians();
+ let transform =
+ LayoutTransform::identity().pre_rotate(axis_x, axis_y, axis_z, Angle::radians(theta));
+
+ pre_transform.then(&transform).then(&post_transform)
+}
+
+pub fn make_perspective(
+ origin: LayoutPoint,
+ perspective: f32,
+) -> LayoutTransform {
+ let pre_transform = LayoutTransform::translation(-origin.x, -origin.y, -0.0);
+ let post_transform = LayoutTransform::translation(origin.x, origin.y, 0.0);
+ let transform = LayoutTransform::perspective(perspective);
+ pre_transform.then(&transform).then(&post_transform)
+}
+
+// Create a skew matrix, specified in degrees.
+fn make_skew(
+ skew_x: f32,
+ skew_y: f32,
+) -> LayoutTransform {
+ let alpha = Angle::radians(skew_x.to_radians());
+ let beta = Angle::radians(skew_y.to_radians());
+ LayoutTransform::skew(alpha, beta)
+}
+
+impl YamlHelper for Yaml {
+ fn as_f32(&self) -> Option<f32> {
+ match *self {
+ Yaml::Integer(iv) => Some(iv as f32),
+ Yaml::Real(ref sv) => f32::from_str(sv.as_str()).ok(),
+ _ => None,
+ }
+ }
+
+ fn as_force_f32(&self) -> Option<f32> {
+ match *self {
+ Yaml::Integer(iv) => Some(iv as f32),
+ Yaml::String(ref sv) | Yaml::Real(ref sv) => f32::from_str(sv.as_str()).ok(),
+ _ => None,
+ }
+ }
+
+ fn as_vec_f32(&self) -> Option<Vec<f32>> {
+ match *self {
+ Yaml::String(ref s) | Yaml::Real(ref s) => s.split_whitespace()
+ .map(|v| f32::from_str(v))
+ .collect::<Result<Vec<_>, _>>()
+ .ok(),
+ Yaml::Array(ref v) => v.iter()
+ .map(|v| match *v {
+ Yaml::Integer(k) => Ok(k as f32),
+ Yaml::String(ref k) | Yaml::Real(ref k) => f32::from_str(k).map_err(|_| false),
+ _ => Err(false),
+ })
+ .collect::<Result<Vec<_>, _>>()
+ .ok(),
+ Yaml::Integer(k) => Some(vec![k as f32]),
+ _ => None,
+ }
+ }
+
+ fn as_vec_u32(&self) -> Option<Vec<u32>> {
+ if let Some(v) = self.as_vec() {
+ Some(v.iter().map(|v| v.as_i64().unwrap() as u32).collect())
+ } else {
+ None
+ }
+ }
+
+ fn as_vec_u64(&self) -> Option<Vec<u64>> {
+ if let Some(v) = self.as_vec() {
+ Some(v.iter().map(|v| v.as_i64().unwrap() as u64).collect())
+ } else {
+ None
+ }
+ }
+
+ fn as_pipeline_id(&self) -> Option<PipelineId> {
+ if let Some(v) = self.as_vec() {
+ let a = v.get(0).and_then(|v| v.as_i64()).map(|v| v as u32);
+ let b = v.get(1).and_then(|v| v.as_i64()).map(|v| v as u32);
+ match (a, b) {
+ (Some(a), Some(b)) if v.len() == 2 => Some(PipelineId(a, b)),
+ _ => None,
+ }
+ } else {
+ None
+ }
+ }
+
+ fn as_px_to_f32(&self) -> Option<f32> {
+ self.as_force_f32()
+ }
+
+ fn as_pt_to_f32(&self) -> Option<f32> {
+ self.as_force_f32().map(|fv| fv * 16. / 12.)
+ }
+
+ fn as_rect(&self) -> Option<LayoutRect> {
+ if self.is_badvalue() {
+ return None;
+ }
+
+ if let Some(nums) = self.as_vec_f32() {
+ if nums.len() == 4 {
+ return Some(LayoutRect::new(
+ LayoutPoint::new(nums[0], nums[1]),
+ LayoutSize::new(nums[2], nums[3]),
+ ));
+ }
+ }
+
+ None
+ }
+
+ fn as_size(&self) -> Option<LayoutSize> {
+ if self.is_badvalue() {
+ return None;
+ }
+
+ if let Some(nums) = self.as_vec_f32() {
+ if nums.len() == 2 {
+ return Some(LayoutSize::new(nums[0], nums[1]));
+ }
+ }
+
+ None
+ }
+
+ fn as_point(&self) -> Option<LayoutPoint> {
+ if self.is_badvalue() {
+ return None;
+ }
+
+ if let Some(nums) = self.as_vec_f32() {
+ if nums.len() == 2 {
+ return Some(LayoutPoint::new(nums[0], nums[1]));
+ }
+ }
+
+ None
+ }
+
+ fn as_vector(&self) -> Option<LayoutVector2D> {
+ self.as_point().map(|p| p.to_vector())
+ }
+
+ fn as_matrix4d(&self) -> Option<LayoutTransform> {
+ if let Some(nums) = self.as_vec_f32() {
+ assert_eq!(nums.len(), 16, "expected 16 floats, got '{:?}'", self);
+ Some(LayoutTransform::new(
+ nums[0], nums[1], nums[2], nums[3],
+ nums[4], nums[5], nums[6], nums[7],
+ nums[8], nums[9], nums[10], nums[11],
+ nums[12], nums[13], nums[14], nums[15],
+ ))
+ } else {
+ None
+ }
+ }
+
+ fn as_transform(&self, transform_origin: &LayoutPoint) -> Option<LayoutTransform> {
+ if let Some(transform) = self.as_matrix4d() {
+ return Some(transform);
+ }
+
+ match *self {
+ Yaml::String(ref string) => {
+ let mut slice = string.as_str();
+ let mut transform = LayoutTransform::identity();
+ while !slice.is_empty() {
+ let (function, ref args, reminder) = parse_function(slice);
+ slice = reminder;
+ let mx = match function {
+ "translate" if args.len() >= 2 => {
+ let z = args.get(2).and_then(|a| a.parse().ok()).unwrap_or(0.);
+ LayoutTransform::translation(
+ args[0].parse().unwrap(),
+ args[1].parse().unwrap(),
+ z,
+ )
+ }
+ "rotate" | "rotate-z" if args.len() == 1 => {
+ make_rotation(transform_origin, args[0].parse().unwrap(), 0.0, 0.0, 1.0)
+ }
+ "rotate-x" if args.len() == 1 => {
+ make_rotation(transform_origin, args[0].parse().unwrap(), 1.0, 0.0, 0.0)
+ }
+ "rotate-y" if args.len() == 1 => {
+ make_rotation(transform_origin, args[0].parse().unwrap(), 0.0, 1.0, 0.0)
+ }
+ "scale" if args.len() >= 1 => {
+ let x = args[0].parse().unwrap();
+ // Default to uniform X/Y scale if Y unspecified.
+ let y = args.get(1).and_then(|a| a.parse().ok()).unwrap_or(x);
+ // Default to no Z scale if unspecified.
+ let z = args.get(2).and_then(|a| a.parse().ok()).unwrap_or(1.0);
+ LayoutTransform::scale(x, y, z)
+ }
+ "scale-x" if args.len() == 1 => {
+ LayoutTransform::scale(args[0].parse().unwrap(), 1.0, 1.0)
+ }
+ "scale-y" if args.len() == 1 => {
+ LayoutTransform::scale(1.0, args[0].parse().unwrap(), 1.0)
+ }
+ "scale-z" if args.len() == 1 => {
+ LayoutTransform::scale(1.0, 1.0, args[0].parse().unwrap())
+ }
+ "skew" if args.len() >= 1 => {
+ // Default to no Y skew if unspecified.
+ let skew_y = args.get(1).and_then(|a| a.parse().ok()).unwrap_or(0.0);
+ make_skew(args[0].parse().unwrap(), skew_y)
+ }
+ "skew-x" if args.len() == 1 => {
+ make_skew(args[0].parse().unwrap(), 0.0)
+ }
+ "skew-y" if args.len() == 1 => {
+ make_skew(0.0, args[0].parse().unwrap())
+ }
+ "perspective" if args.len() == 1 => {
+ LayoutTransform::perspective(args[0].parse().unwrap())
+ }
+ _ => {
+ println!("unknown function {}", function);
+ break;
+ }
+ };
+ transform = transform.then(&mx);
+ }
+ Some(transform)
+ }
+ Yaml::Array(ref array) => {
+ let transform = array.iter().fold(
+ LayoutTransform::identity(),
+ |u, yaml| match yaml.as_transform(transform_origin) {
+ Some(ref transform) => transform.then(&u),
+ None => u,
+ },
+ );
+ Some(transform)
+ }
+ Yaml::BadValue => None,
+ _ => {
+ println!("unknown transform {:?}", self);
+ None
+ }
+ }
+ }
+
+ fn as_colorf(&self) -> Option<ColorF> {
+ if let Some(mut nums) = self.as_vec_f32() {
+ assert!(
+ nums.len() == 3 || nums.len() == 4,
+ "color expected a color name, or 3-4 floats; got '{:?}'",
+ self
+ );
+
+ if nums.len() == 3 {
+ nums.push(1.0);
+ }
+ assert!(nums[3] >= 0.0 && nums[3] <= 1.0,
+ "alpha value should be in the 0-1 range, got {:?}",
+ nums[3]);
+ return Some(ColorF::new(
+ nums[0] / 255.0,
+ nums[1] / 255.0,
+ nums[2] / 255.0,
+ nums[3],
+ ));
+ }
+
+ if let Some(s) = self.as_str() {
+ string_to_color(s)
+ } else {
+ None
+ }
+ }
+
+ fn as_vec_colorf(&self) -> Option<Vec<ColorF>> {
+ if let Some(v) = self.as_vec() {
+ Some(v.iter().map(|v| v.as_colorf().unwrap()).collect())
+ } else if let Some(color) = self.as_colorf() {
+ Some(vec![color])
+ } else {
+ None
+ }
+ }
+
+ fn as_vec_string(&self) -> Option<Vec<String>> {
+ if let Some(v) = self.as_vec() {
+ Some(v.iter().map(|v| v.as_str().unwrap().to_owned()).collect())
+ } else if let Some(s) = self.as_str() {
+ Some(vec![s.to_owned()])
+ } else {
+ None
+ }
+ }
+
+ fn as_border_radius_component(&self) -> LayoutSize {
+ if let Yaml::Integer(integer) = *self {
+ return LayoutSize::new(integer as f32, integer as f32);
+ }
+ self.as_size().unwrap_or(Size2D::zero())
+ }
+
+ fn as_border_radius(&self) -> Option<BorderRadius> {
+ if let Some(size) = self.as_size() {
+ return Some(BorderRadius::uniform_size(size));
+ }
+
+ match *self {
+ Yaml::BadValue => None,
+ Yaml::String(ref s) | Yaml::Real(ref s) => {
+ let fv = f32::from_str(s).unwrap();
+ Some(BorderRadius::uniform(fv))
+ }
+ Yaml::Integer(v) => Some(BorderRadius::uniform(v as f32)),
+ Yaml::Array(ref array) if array.len() == 4 => {
+ let top_left = array[0].as_border_radius_component();
+ let top_right = array[1].as_border_radius_component();
+ let bottom_left = array[2].as_border_radius_component();
+ let bottom_right = array[3].as_border_radius_component();
+ Some(BorderRadius {
+ top_left,
+ top_right,
+ bottom_left,
+ bottom_right,
+ })
+ }
+ Yaml::Hash(_) => {
+ let top_left = self["top-left"].as_border_radius_component();
+ let top_right = self["top-right"].as_border_radius_component();
+ let bottom_left = self["bottom-left"].as_border_radius_component();
+ let bottom_right = self["bottom-right"].as_border_radius_component();
+ Some(BorderRadius {
+ top_left,
+ top_right,
+ bottom_left,
+ bottom_right,
+ })
+ }
+ _ => {
+ panic!("Invalid border radius specified: {:?}", self);
+ }
+ }
+ }
+
+ fn as_transform_style(&self) -> Option<TransformStyle> {
+ self.as_str().and_then(|x| StringEnum::from_str(x))
+ }
+
+ fn as_raster_space(&self) -> Option<RasterSpace> {
+ self.as_str().and_then(|s| {
+ match parse_function(s) {
+ ("screen", _, _) => {
+ Some(RasterSpace::Screen)
+ }
+ ("local", ref args, _) if args.len() == 1 => {
+ Some(RasterSpace::Local(args[0].parse().unwrap()))
+ }
+ f => {
+ panic!("error parsing raster space {:?}", f);
+ }
+ }
+ })
+ }
+
+ fn as_mix_blend_mode(&self) -> Option<MixBlendMode> {
+ self.as_str().and_then(|x| StringEnum::from_str(x))
+ }
+
+ fn as_clip_mode(&self) -> Option<ClipMode> {
+ self.as_str().and_then(|x| StringEnum::from_str(x))
+ }
+
+ fn as_filter_op(&self) -> Option<FilterOp> {
+ if let Some(s) = self.as_str() {
+ match parse_function(s) {
+ ("identity", _, _) => {
+ Some(FilterOp::Identity)
+ }
+ ("component-transfer", _, _) => {
+ Some(FilterOp::ComponentTransfer)
+ }
+ ("blur", ref args, _) if args.len() == 1 => {
+ Some(FilterOp::Blur(args[0].parse().unwrap()))
+ }
+ ("brightness", ref args, _) if args.len() == 1 => {
+ Some(FilterOp::Brightness(args[0].parse().unwrap()))
+ }
+ ("contrast", ref args, _) if args.len() == 1 => {
+ Some(FilterOp::Contrast(args[0].parse().unwrap()))
+ }
+ ("grayscale", ref args, _) if args.len() == 1 => {
+ Some(FilterOp::Grayscale(args[0].parse().unwrap()))
+ }
+ ("hue-rotate", ref args, _) if args.len() == 1 => {
+ Some(FilterOp::HueRotate(args[0].parse().unwrap()))
+ }
+ ("invert", ref args, _) if args.len() == 1 => {
+ Some(FilterOp::Invert(args[0].parse().unwrap()))
+ }
+ ("opacity", ref args, _) if args.len() == 1 => {
+ let amount: f32 = args[0].parse().unwrap();
+ Some(FilterOp::Opacity(amount.into(), amount))
+ }
+ ("saturate", ref args, _) if args.len() == 1 => {
+ Some(FilterOp::Saturate(args[0].parse().unwrap()))
+ }
+ ("sepia", ref args, _) if args.len() == 1 => {
+ Some(FilterOp::Sepia(args[0].parse().unwrap()))
+ }
+ ("srgb-to-linear", _, _) => Some(FilterOp::SrgbToLinear),
+ ("linear-to-srgb", _, _) => Some(FilterOp::LinearToSrgb),
+ ("drop-shadow", ref args, _) if args.len() == 3 => {
+ let str = format!("---\noffset: {}\nblur-radius: {}\ncolor: {}\n", args[0], args[1], args[2]);
+ let mut yaml_doc = YamlLoader::load_from_str(&str).expect("Failed to parse drop-shadow");
+ let yaml = yaml_doc.pop().unwrap();
+ Some(FilterOp::DropShadow(Shadow {
+ offset: yaml["offset"].as_vector().unwrap(),
+ blur_radius: yaml["blur-radius"].as_f32().unwrap(),
+ color: yaml["color"].as_colorf().unwrap()
+ }))
+ }
+ ("color-matrix", ref args, _) if args.len() == 20 => {
+ let m: Vec<f32> = args.iter().map(|f| f.parse().unwrap()).collect();
+ let mut matrix: [f32; 20] = [0.0; 20];
+ matrix.clone_from_slice(&m);
+ Some(FilterOp::ColorMatrix(matrix))
+ }
+ ("flood", ref args, _) if args.len() == 1 => {
+ let str = format!("---\ncolor: {}\n", args[0]);
+ let mut yaml_doc = YamlLoader::load_from_str(&str).expect("Failed to parse flood");
+ let yaml = yaml_doc.pop().unwrap();
+ Some(FilterOp::Flood(yaml["color"].as_colorf().unwrap()))
+ }
+ (_, _, _) => None,
+ }
+ } else {
+ None
+ }
+ }
+
+ fn as_vec_filter_op(&self) -> Option<Vec<FilterOp>> {
+ if let Some(v) = self.as_vec() {
+ Some(v.iter().map(|x| x.as_filter_op().unwrap()).collect())
+ } else {
+ self.as_filter_op().map(|op| vec![op])
+ }
+ }
+
+ fn as_filter_data(&self) -> Option<FilterData> {
+ // Parse an array with five entries. First entry is an array of func types (4).
+ // The remaining entries are arrays of floats.
+ if let Yaml::Array(ref array) = *self {
+ if array.len() != 5 {
+ panic!("Invalid filter data specified, base array doesn't have five entries: {:?}", self);
+ }
+ if let Some(func_types_p) = array[0].as_vec_string() {
+ if func_types_p.len() != 4 {
+ panic!("Invalid filter data specified, func type array doesn't have five entries: {:?}", self);
+ }
+ let func_types: Vec<ComponentTransferFuncType> =
+ func_types_p.into_iter().map(|x| { match StringEnum::from_str(&x) {
+ Some(y) => y,
+ None => panic!("Invalid filter data specified, invalid func type name: {:?}", self),
+ }}).collect();
+ if let Some(r_values_p) = array[1].as_vec_f32() {
+ if let Some(g_values_p) = array[2].as_vec_f32() {
+ if let Some(b_values_p) = array[3].as_vec_f32() {
+ if let Some(a_values_p) = array[4].as_vec_f32() {
+ let filter_data = FilterData {
+ func_r_type: func_types[0],
+ r_values: r_values_p,
+ func_g_type: func_types[1],
+ g_values: g_values_p,
+ func_b_type: func_types[2],
+ b_values: b_values_p,
+ func_a_type: func_types[3],
+ a_values: a_values_p,
+ };
+ return Some(filter_data)
+ }
+ }
+ }
+ }
+ }
+ }
+ None
+ }
+
+ fn as_filter_input(&self) -> Option<FilterPrimitiveInput> {
+ if let Some(input) = self.as_str() {
+ match input {
+ "original" => Some(FilterPrimitiveInput::Original),
+ "previous" => Some(FilterPrimitiveInput::Previous),
+ _ => None,
+ }
+ } else if let Some(index) = self.as_i64() {
+ if index >= 0 {
+ Some(FilterPrimitiveInput::OutputOfPrimitiveIndex(index as usize))
+ } else {
+ panic!("Filter input index cannot be negative");
+ }
+ } else {
+ panic!("Invalid filter input");
+ }
+ }
+
+ fn as_vec_filter_data(&self) -> Option<Vec<FilterData>> {
+ if let Some(v) = self.as_vec() {
+ Some(v.iter().map(|x| x.as_filter_data().unwrap()).collect())
+ } else {
+ self.as_filter_data().map(|data| vec![data])
+ }
+ }
+
+ fn as_filter_primitive(&self) -> Option<FilterPrimitive> {
+ if let Some(filter_type) = self["type"].as_str() {
+ let kind = match filter_type {
+ "identity" => {
+ FilterPrimitiveKind::Identity(IdentityPrimitive {
+ input: self["in"].as_filter_input().unwrap(),
+ })
+ }
+ "blend" => {
+ FilterPrimitiveKind::Blend(BlendPrimitive {
+ input1: self["in1"].as_filter_input().unwrap(),
+ input2: self["in2"].as_filter_input().unwrap(),
+ mode: self["blend-mode"].as_mix_blend_mode().unwrap(),
+ })
+ }
+ "flood" => {
+ FilterPrimitiveKind::Flood(FloodPrimitive {
+ color: self["color"].as_colorf().unwrap(),
+ })
+ }
+ "blur" => {
+ FilterPrimitiveKind::Blur(BlurPrimitive {
+ input: self["in"].as_filter_input().unwrap(),
+ radius: self["radius"].as_f32().unwrap(),
+ })
+ }
+ "opacity" => {
+ FilterPrimitiveKind::Opacity(OpacityPrimitive {
+ input: self["in"].as_filter_input().unwrap(),
+ opacity: self["opacity"].as_f32().unwrap(),
+ })
+ }
+ "color-matrix" => {
+ let m: Vec<f32> = self["matrix"].as_vec_f32().unwrap();
+ let mut matrix: [f32; 20] = [0.0; 20];
+ matrix.clone_from_slice(&m);
+
+ FilterPrimitiveKind::ColorMatrix(ColorMatrixPrimitive {
+ input: self["in"].as_filter_input().unwrap(),
+ matrix,
+ })
+ }
+ "drop-shadow" => {
+ FilterPrimitiveKind::DropShadow(DropShadowPrimitive {
+ input: self["in"].as_filter_input().unwrap(),
+ shadow: Shadow {
+ offset: self["offset"].as_vector().unwrap(),
+ color: self["color"].as_colorf().unwrap(),
+ blur_radius: self["radius"].as_f32().unwrap(),
+ }
+ })
+ }
+ "component-transfer" => {
+ FilterPrimitiveKind::ComponentTransfer(ComponentTransferPrimitive {
+ input: self["in"].as_filter_input().unwrap(),
+ })
+ }
+ "offset" => {
+ FilterPrimitiveKind::Offset(OffsetPrimitive {
+ input: self["in"].as_filter_input().unwrap(),
+ offset: self["offset"].as_vector().unwrap(),
+ })
+ }
+ "composite" => {
+ let operator = match self["operator"].as_str().unwrap() {
+ "over" => CompositeOperator::Over,
+ "in" => CompositeOperator::In,
+ "out" => CompositeOperator::Out,
+ "atop" => CompositeOperator::Atop,
+ "xor" => CompositeOperator::Xor,
+ "lighter" => CompositeOperator::Lighter,
+ "arithmetic" => {
+ let k_vals = self["k-values"].as_vec_f32().unwrap();
+ assert!(k_vals.len() == 4, "Must be 4 k values for arithmetic composite operator");
+ let k_vals = [k_vals[0], k_vals[1], k_vals[2], k_vals[3]];
+ CompositeOperator::Arithmetic(k_vals)
+ }
+ _ => panic!("Invalid composite operator"),
+ };
+ FilterPrimitiveKind::Composite(CompositePrimitive {
+ input1: self["in1"].as_filter_input().unwrap(),
+ input2: self["in2"].as_filter_input().unwrap(),
+ operator,
+ })
+ }
+ _ => return None,
+ };
+
+ Some(FilterPrimitive {
+ kind,
+ color_space: self["color-space"].as_color_space().unwrap_or(ColorSpace::LinearRgb),
+ })
+ } else {
+ None
+ }
+ }
+
+ fn as_vec_filter_primitive(&self) -> Option<Vec<FilterPrimitive>> {
+ if let Some(v) = self.as_vec() {
+ Some(v.iter().map(|x| x.as_filter_primitive().unwrap()).collect())
+ } else {
+ self.as_filter_primitive().map(|data| vec![data])
+ }
+ }
+
+ fn as_color_space(&self) -> Option<ColorSpace> {
+ self.as_str().and_then(|x| StringEnum::from_str(x))
+ }
+}