- 26 9月, 2019 1 次提交
-
-
由 David Worsham 提交于
On Fuchsia, add a build flag for compositing OpacityLayers using the system compositor vs Skia, which exposes a fastpath for opacity via Scenic. This will only work under certain circumstances, in particular nested OpacityLayers will not render correctly! On Fuchsia, add a build flag for compositing PhysicalShapeLayers using the system compositor vs Skia. Set to off by default, which restores performant shadows on Fuchsia. Remove the opacity exposed from ChildView, as that was added mistakenly. Finally, we centralize the logic for switching between the system-composited and in-process-composited paths inside of ContainerLayer. We also centralize the logic for computing elevation there. This allows the removal of many OS_FUCHSIA-specific code-paths. Test: Ran workstation on Fuchsia; benchmarked before and after Bug: 23711 Bug: 24163 * Fix broken tests
-
- 18 9月, 2019 2 次提交
-
-
由 Chinmay Garde 提交于
Account for root surface transformation on the surfaces managed by the external view embedder. (#11384) The earlier design speculated that embedders could affect the same transformations on the layers post engine compositor presentation but before final composition. However, the linked issue points out that this design is not suitable for use with hardware overlay planes. When rendering to the same, to affect the transformation before composition, embedders would have to render to an off-screen render target and then apply the transformation before presentation. This patch negates the need for that off-screen render pass. To be clear, the previous architecture is still fully viable. Embedders still have full control over layer transformations before composition. This is an optimization for the hardware overlay planes use-case. Fixes b/139758641
-
由 gaaclarke 提交于
Added channel buffers to 'ui' so that messages have a place to go until message handling is setup.
-
- 17 9月, 2019 1 次提交
-
-
由 Michael Goderbauer 提交于
-
- 06 9月, 2019 1 次提交
-
-
由 liyuqian 提交于
This reverts commit e97ed36e. Reason for revert: Stream is considered a bad API: https://github.com/flutter/engine/pull/11041#issuecomment-526892247
-
- 31 8月, 2019 1 次提交
-
-
由 gaaclarke 提交于
-
- 29 8月, 2019 1 次提交
-
-
由 Gary Qian 提交于
-
- 27 8月, 2019 2 次提交
-
-
由 Chris Bracken 提交于
This was required by the C++ spec pre-C++11 and still gets picked up in the Fuchsia tree due to -Wnewline-eof. It fixes: ../../third_party/flutter/lib/ui/text/line_metrics.h:75:47: error: no newline at end of file [-Werror,-Wnewline-eof] #endif // FLUTTER_LIB_UI_TEXT_LINE_METRICS_H_
-
由 Gary Qian 提交于
-
- 24 8月, 2019 1 次提交
-
-
由 Chinmay Garde 提交于
We will end up creating fewer threads in tests.
-
- 20 8月, 2019 1 次提交
-
-
由 liyuqian 提交于
Without this, developers have to override `onReportTimings` to listen for `FrameTiming`. That can potentially break previous `onReportTimings` listeners if they forget to call the old listener in their new callback. This PR replaces the similar RP in the framework: https://github.com/flutter/flutter/pull/38574 Once this PR landed, we'll have to create another framework PR to use the stream to replace `onReportTimings` usages. Once that's done, we can then propose the breaking change of removing the deprecated `onReportTimings`.
-
- 17 8月, 2019 2 次提交
-
-
由 Shi-Hao Hong 提交于
* Pass Android Q system gesture inset information from insets.systemGestureInsets to Window.systemGestureInsets
-
由 Brian Osman 提交于
-
- 16 8月, 2019 1 次提交
-
-
由 Jason Simmons 提交于
ParagraphImpl was used to switch between libtxt and Blink implementations of text rendering and is now obsolete.
-
- 14 8月, 2019 1 次提交
-
-
由 Chinmay Garde 提交于
This patch allows embedders to split the Flutter layer tree into multiple chunks. These chunks are meant to be composed one on top of another. This gives embedders a chance to interleave their own contents between these chunks. The Flutter embedder API already provides hooks for the specification of textures for the Flutter engine to compose within its own hierarchy (for camera feeds, video, etc..). However, not all embedders can render the contents of such sources into textures the Flutter engine can accept. Moreover, this composition model may have overheads that are non-trivial for certain use cases. In such cases, the embedder may choose to specify multiple render target for Flutter to render into instead of just one. The use of this API allows embedders to perform composition very similar to the iOS embedder. This composition model is used on that platform for the embedding of UIKit view such and web view and map views within the Flutter hierarchy. However, do note that iOS also has threading configurations that are currently not available to custom embedders. The embedder API updates in this patch are ABI stable and existing embedders will continue to work are normal. For embedders that want to enable this composition mode, the API is designed to make it easy to opt into the same in an incremental manner. Rendering of contents into the “root” rendering surface remains unchanged. However, now the application can push “platform views” via a scene builder. These platform views need to handled by a FlutterCompositor specified in a new field at the end of the FlutterProjectArgs struct. When a new platform view in introduced within the layer tree, the compositor will ask the embedder to create a new render target for that platform view. Render targets can currently be OpenGL framebuffers, OpenGL textures or software buffers. The type of the render target returned by the embedder must be compatible with the root render surface. That is, if the root render surface is an OpenGL framebuffer, the render target for each platform view must either be a texture or a framebuffer in the same OpenGL context. New render target types as well as root renderers for newer APIs like Metal & Vulkan can and will be added in the future. The addition of these APIs will be done in an ABI & API stable manner. As Flutter renders frames, it gives the embedder a callback with information about the position of the various platform views in the effective hierarchy. The embedder is then meant to put the contents of the render targets that it setup and had previously given to the engine onto the screen (of course interleaving the contents of the platform views). Unit-tests have been added that test not only the structure and properties of layer hierarchy given to the compositor, but also the contents of the texels rendered by a test compositor using both the OpenGL and software rendering backends. Fixes b/132812775 Fixes flutter/flutter#35410
-
- 03 8月, 2019 1 次提交
-
-
由 Dan Field 提交于
-
- 01 8月, 2019 1 次提交
-
-
由 Jason Simmons 提交于
SingleFrameCodec had been holding a persistent handle to the peer Dart object while waiting for the decoder callback. However, Dart code could call Codec.dispose during that interval, which would cause the Dart peer to drop its reference to the SingleFrameCodec and potentially delete the SingleFrameCodec. Fixes https://github.com/flutter/flutter/issues/36631
-
- 24 7月, 2019 1 次提交
-
-
由 Jason Simmons 提交于
Change ParagraphBuilder to replace the parent style's font families with the child style's font families (#10074) Previously ParagraphBuilder was concatenating the child's fonts to the parent's font list, causing the parent's fonts to take precedence. Fixes https://github.com/flutter/flutter/issues/35992
-
- 20 7月, 2019 1 次提交
-
-
由 Jason Simmons 提交于
-
- 19 7月, 2019 4 次提交
-
-
由 Jason Simmons 提交于
After the frame is decoded SingleFrameCodec will invoke pending callbacks from calls to getNextFrame. The callbacks could result in more calls to getNextFrame. Those calls should receive the frame instead of being added to the pending list.
-
-
由 Jason Simmons 提交于
-
由 Mouad Debbar 提交于
-
- 18 7月, 2019 3 次提交
-
-
由 Chinmay Garde 提交于
Adds a unit-test asserting this behavior.
-
由 Jason Simmons 提交于
The codec will retain a reference to the decoded frame so it can be returned in repeated calls to getNextFrame. Also change the compressed image buffer to use an anonymous mapping on Android. This is a workaround for high consumption of native heap pages by Android's malloc when buffers are allocated on one thread and freed on another thread. See https://github.com/flutter/flutter/issues/36079
-
由 Mouad Debbar 提交于
-
- 16 7月, 2019 2 次提交
-
-
由 gaaclarke 提交于
Made Picture::toImage happen on the IO thread with no need for a surface.
-
由 Tim Sneath 提交于
Add typography sample from the Flutter 1.7 announcement blog.
-
- 13 7月, 2019 1 次提交
-
-
由 Chinmay Garde 提交于
Fixes UB which caused failures on Windows on the unit-test run.
-
- 12 7月, 2019 3 次提交
- 11 7月, 2019 4 次提交
-
-
由 Jason Simmons 提交于
This converts the libtxt Paragraph and ParagraphBuilder classes into interfaces with Minikin and SkShaper/SkParagraph based implementations. Use the --enable-skshaper GN flag to select the Skia shaper implementation at build time.
-
由 Jason Simmons 提交于
-
由 Dan Field 提交于
-
由 Chinmay Garde 提交于
-
- 10 7月, 2019 2 次提交
-
-
由 Siva 提交于
* Roll src/third_party/dart 06c3d7ad3a...09fc76bc51 dart-lang/sdk@09fc76bc51 [vm, compiler] Remove dead _classRangeCheckNegative. dart-lang/sdk@b472d7a9be Unnecessary null aware spread hint dart-lang/sdk@f939ad3964 library scope extensions dart-lang/sdk@9503969664 [vm/bytecode] Add DebugCheck bytecode instruction dart-lang/sdk@fc542be6b4 Issue 36682. Check that selection offset/length is valid in Extract Method refactoring. dart-lang/sdk@803658a6d8 [corelib_2] fix bigint_from_test for web platforms dart-lang/sdk@ad6b1ebbd6 Support for 'double' fields in protocol. dart-lang/sdk@5479175012 Remove incorrect test. dart-lang/sdk@058092b5f6 [vm] Fix simarm_x64 build on mac dart-lang/sdk@307ca3f3b6 [vm/bytecode] Improve single stepping and breakpoint setting in bytecode. dart-lang/sdk@855830f324 Update LSP spec dart-lang/sdk@d992f55094 [dartfix] Bump pedantic dep to v1.8.0 and cleanup lint violations dart-lang/sdk@41330f3e34 gitignore .clangd dart-lang/sdk@8d07009931 [ VM / Gardening ] Mark disassemble_determinism_test as slow on Windows dart-lang/sdk@1b82367ed6 Update CHANGELOG to reflect breaking change #36765 dart-lang/sdk@a86db84e0a [fasta] Preserve information about const constructors in outline. dart-lang/sdk@25319ef7a6 Fix bug in codegen/string_escapes_test.dart. dart-lang/sdk@7acecda2cc [vm/ffi] Fix FFI Utf8 example. dart-lang/sdk@e3b3c6fa28 [vm] Rename 3head flutter patch after re-land of concurrency change dart-lang/sdk@2cb5303782 [infra] Update checked in SDKs to 2.4.0 dart-lang/sdk@fce43ebc4e [ddk] Pass environmentDefines to CFE through CompilerOptions dart-lang/sdk@5450d08ca1 Add support for analyzer static error tests. dart-lang/sdk@0425997b31 Second attempt to reland "[vm/concurrency] Introduce concept of Isolate Groups" dart-lang/sdk@5470159054 [vm, gc] Produce a proper error message when crashing due to lack of memory at isolate startup. dart-lang/sdk@bfc7d21da6 Remove useless dart2js_extra/class_test dart-lang/sdk@572619b639 [vm, bytecode] Fix vm/cc/CompileFunctionOnHelperThread. dart-lang/sdk@4de495fccc [vm, compiler] Remove dead stub ICCallThroughFunction. dart-lang/sdk@8a1dcdae68 Graduate 'flutter' domain from experimental, remove unused methods and fields. dart-lang/sdk@a945888627 Discard constructors and fields temporarily to get valid code compiling * Fix analyzer warning.
-
由 Chinmay Garde 提交于
This patch reworks image decompression and collection in the following ways because of misbehavior in the described edge cases. The current flow for realizing a texture on the GPU from a blob of compressed bytes is to first pass it to the IO thread for image decompression and then upload to the GPU. The handle to the texture on the GPU is then passed back to the UI thread so that it can be included in subsequent layer trees for rendering. The GPU contexts on the Render & IO threads are in the same sharegroup so the texture ends up being visible to the Render Thread context during rendering. This works fine and does not block the UI thread. All references to the image are owned on UI thread by Dart objects. When the final reference to the image is dropped, the texture cannot be collected on the UI thread (because it has not GPU context). Instead, it must be passed to either the GPU or IO threads. The GPU thread is usually in the middle of a frame workload so we redirect the same to the IO thread for eventual collection. While texture collections are usually (comparatively) fast, texture decompression and upload are slow (order of magnitude of frame intervals). For application that end up creating (by not necessarily using) numerous large textures in straight-line execution, it could be the case that texture collection tasks are pending on the IO task runner after all the image decompressions (and upload) are done. Put simply, the collection of the first image could be waiting for the decompression and upload of the last image in the queue. This is exacerbated by two other hacks added to workaround unrelated issues. * First, creating a codec with a single image frame immediately kicks of decompression and upload of that frame image (even if the frame was never request from the codec). This hack was added because we wanted to get rid of the compressed image allocation ASAP. The expectation was codecs would only be created with the sole purpose of getting the decompressed image bytes. However, for applications that only create codecs to get image sizes (but never actually decompress the same), we would end up replacing the compressed image allocation with a larger allocation (device resident no less) for no obvious use. This issue is particularly insidious when you consider that the codec is usually asked for the native image size first before the frame is requested at a smaller size (usually using a new codec with same data but new targetsize). This would cause the creation of a whole extra texture (at 1:1) when the caller was trying to “optimize” for memory use by requesting a texture of a smaller size. * Second, all image collections we delayed in by the unref queue by 250ms because of observations that the calling thread (the UI thread) was being descheduled unnecessarily when a task with a timeout of zero was posted from the same (recall that a task has to be posted to the IO thread for the collection of that texture). 250ms is multiple frame intervals worth of potentially unnecessary textures. The net result of these issues is that we may end up creating textures when all that the application needs is to ask it’s codec for details about the same (but not necessarily access its bytes). Texture collection could also be delayed behind other jobs to decompress the textures on the IO thread. Also, all texture collections are delayed for an arbitrary amount of time. These issues cause applications to be susceptible to OOM situations. These situations manifest in various ways. Host memory exhaustion causes the usual OOM issues. Device memory exhaustion seems to manifest in different ways on iOS and Android. On Android, allocation of a new texture seems to be causing an assertion (in the driver). On iOS, the call hangs (presumably waiting for another thread to release textures which we won’t do because those tasks are blocked behind the current task completing). To address peak memory usage, the following changes have been made: * Image decompression and upload/collection no longer happen on the same thread. All image decompression will now be handled on a workqueue. The number of worker threads in this workqueue is equal to the number of processors on the device. These threads have a lower priority that either the UI or Render threads. These workers are shared between all Flutter applications in the process. * Both the images and their codec now report the correct allocation size to Dart for GC purposes. The Dart VM uses this to pick objects for collection. Earlier the image allocation was assumed to 32bpp with no mipmapping overhead reported. Now, the correct image size is reported and the mipmapping overhead is accounted for. Image codec sizes were not reported to the VM earlier and now are. Expect “External” VM allocations to be higher than previously reported and the numbers in Observatory to line up more closely with actual memory usage (device and host). * Decoding images to a specific size used to decode to 1:1 before performing a resize to the correct dimensions before texture upload. This has now been reworked so that images are first decompressed to a smaller size supported natively by the codec before final resizing to the requested target size. The intermediate copy is now smaller and more promptly collected. Resizing also happens on the workqueue worker. * The drain interval of the unref queue is now sub-frame-interval. I am hesitant to remove the delay entirely because I have not been able to instrument the performance overhead of the same. That is next on my list. But now, multiple frame intervals worth of textures no longer stick around. The following issues have been addressed: * https://github.com/flutter/flutter/issues/34070 Since this was the first usage of the concurrent message loops, the number of idle wakes were determined to be too high and this component has been rewritten to be simpler and not use the existing task runner and MessageLoopImpl interface. * Image decoding had no tests. The new `ui_unittests` harness has been added that sets up a GPU test harness on the host using SwiftShader. Tests have been added for image decompression, upload and resizing. * The device memory exhaustion in this benchmark has been addressed. That benchmark is still not viable for inclusion in any harness however because it creates 9 million codecs in straight-line execution. Because these codecs are destroyed in the microtask callbacks, these are referenced till those callbacks are executed. So now, instead of device memory exhaustion, this will lead to (slower) exhaustion of host memory. This is expected and working as intended. This patch only addresses peak memory use and makes collection of unused images and textures more prompt. It does NOT address memory use by images referenced strongly by the application or framework.
-
- 09 7月, 2019 2 次提交