1628 Commits

Author SHA1 Message Date
James Clarke
51a376d73b
[Windows] Update API for alternative Windows shell platform implementation (#11327)
* Begin API evolution to a more native win32 API

* Child-window based hosting

* Plumb through an initial size for child window to avoid reallocated surface on start

* Windows API cleanup part 1

* Fix wrapper tests

* Ensure flutter's HWND resources are destroyed

* Final API cleanup

* Fix dynamic DPI handling

* Cleanup

* Fix a bug that was causing engine to not be shutdown correctly

* CR feedback

* auto format

* CR feedback: combine FlutterView and FlutterViewController

* The one that clang-format seems to always get wrong

* expletive

* fix sources for licesnse file

* CR Feedback

* cleanup

* Update GetNativeWindow() to return an HWND rather than a long

* fix formatting
2019-09-02 17:55:42 -07:00
gaaclarke
daf1a27d46
Started logging warnings if we drop platform messages. (#11792) 2019-08-30 12:48:03 -07:00
Kaushik Iska
766125b4f2
Roll fuchsia/clang/linux-amd64 from wGyr4... to -mnHl... (#11790)
* Roll fuchsia/clang/linux-amd64 from wGyr4... to -mnHl...

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-toolchain-flutter-engine
Please CC  on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

* Fix dangling pointer
2019-08-30 11:38:12 -07:00
Kaushik Iska
25ffa223b9
Roll fuchsia/sdk/core/linux-amd64 from -UaaS... to fSXZ0... (#11784)
* Roll fuchsia/sdk/core/linux-amd64 from -UaaS... to fSXZ0...

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine
Please CC  on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

* Fix deprecated usage
2019-08-30 10:34:06 -07:00
Kaushik Iska
d426031811
[flutter_runner] Port over all the changes to the dart_runner cmx files (#11776)
* Port over all the changes to the dart_runner cmx files

* Update vmservice.cmx
2019-08-30 10:19:08 -07:00
Matt Carroll
dce8a34048
Revert "Notify framework to clear input connection when app is backgrounded (#35054) (#9498)" (#11720)
This reverts commit 4003fbc3ed48865cf6993d01be60749c3cabeff5.
2019-08-29 15:42:11 -07:00
Dan Field
101e03c1c8
Return a JSON value for the Skia channel (#11717) 2019-08-29 14:03:55 -07:00
Shi-Hao Hong
7024722e38
Android 10+ View.setSystemGestureExclusionRects (#11441)
* Implement SystemGesture.setSystemGestureExclusionRects platform channel

* Add PlatformChannelTest.java

* Fix typo in android/test/README.md
2019-08-29 17:00:42 -04:00
Martin Kustermann
74a3c73e3c
Roll src/third_party/dart 35382f9b14..05c28c6115 (#11702)
* Roll src/third_party/dart 35382f9b14..05c28c6115

dart-lang/sdk@05c28c6115 Reland "Scaffolding for dart:wasm"
dart-lang/sdk@d57a8f7451 [vm/bytecode] Remove DebugCheck in synthetic non-local transfer (no source pos).
dart-lang/sdk@b565c8c20f Don't serialize not serializable constant variable initializers.
dart-lang/sdk@ce12a2722d Migration: handle named parameters in _substituteFunctionAfterFormals.
dart-lang/sdk@a290271dea [vm/bytecode] Throw should be 'debug checked', but not ReThrow.
dart-lang/sdk@63133a2a8c [cfe] Handle extension instance method tearoff
dart-lang/sdk@a147d4e8d2 [cfe] Handle simple use of extension instance members
dart-lang/sdk@e9fdeb2db8 Migration: add support for creating instances without supplying type arguments.
dart-lang/sdk@66e349da9c Migration: Clean up substitution logic in getOrComputeElementType
dart-lang/sdk@e9a44ba6a8 fix extension instance field error
dart-lang/sdk@15a7b57d8e split endFields into endClass/Mixin/ExtensionFields events
dart-lang/sdk@ed1b4ffba1 Add tests of extensions of mixins
dart-lang/sdk@ef36f1ba0d [vm/fuzzer] Reduce limit on methods and classes
dart-lang/sdk@7b17602c74 [vm/bytecode] Include function name into source fingerprints
dart-lang/sdk@851701d2a4 add BREAK suggestions to switch cases
dart-lang/sdk@57f7941eef [cfe] Remove 'functionNestingLevel' for VariableDeclaration.forValue
2019-08-29 22:06:42 +02:00
Chinmay Garde
d5242ff205
Append newlines to EOF of all translation units. (#11654)
We are switching to -Wnewline-eof soon and these will become errors. Anyway, this was undefined behavior.
2019-08-28 15:06:49 -07:00
Kaushik Iska
9d61b9a31a
[flutter] Port: Run handle wait completers on the microtask queue (#11649)
Change-Id: I66c39d9ef7d534094148212940eef45754559d04
2019-08-28 14:02:11 -07:00
Kaushik Iska
03318327d2
[flutter_runner] Port Expose ViewBound Wireframe Functionality (#11635)
Expose scenic's ability to toggle wireframe debug
rendering of view bounds in flutter_runner. This is done
by registering a new function on the platform_views channel
with the PlatformView.

Note: Unittests have not been enabled, will enable once we
have sufficient infra.

SCN-1351 #done

Change-Id: Id4c8ef65cc39a967087d7fa6c9f595da8cfe5f01
2019-08-28 12:46:24 -07:00
Kaushik Iska
728ff715e8
[fidl][flutter_runner] Port Migrate to new fit::optional compatible APIs (#11636)
* [fidl][flutter_runner] Port Migrate to new fit::optional compatible APIs

Updated all call-sites.

See: https://fuchsia-review.googlesource.com/c/fuchsia/+/304389

FIDL-564 #comment

Change-Id: I831712ffd4a47b8fc9cf1fe237b709a1b983109f

* fix observatory port and re-sync cmx files
2019-08-28 12:31:07 -07:00
Brian Osman
0b614aff4c
Update CanvasSpy::onDrawEdgeAAQuad for Skia API change (#11638) 2019-08-28 14:31:23 -04:00
Dan Field
4ceaafc0a8
Make Skia cache size channel respond with a value (#11550) 2019-08-27 17:52:35 -07:00
Maurice Parrish
ccdadb1dac
Add check to enable metal for import (#11537) 2019-08-27 14:47:14 -07:00
P.Y. Laligand
aba340af5c
Update label of Fuchsia FIDL targets. (#11514) 2019-08-27 13:54:38 -07:00
Chris Bracken
37a4af0ca8
Reuse texture cache in ios_external_texture_gl (#11524)
In current implementation, external texture data flow is a
producer-consumer model. When painting external texture, it always asks
registered external texture object to produce new CVPixelBuffer, then
transforms it to texture. `MarkNewFrameAvailable` function is ignored.
This commit changes the dataflow. Now ios_external_texture_gl caches
previous opengl texture, if no new frame are available, it do not
`copyPixelBuffer` method, just uses cached opengl texture to draw.

This is a re-land of flutter/engine#9806, which was previously reverted
in flutter/engine#11522.
2019-08-27 11:03:24 -07:00
Chris Bracken
bf7796611d
Revert "Reuse texture cache in ios_external_texture_gl. (#9806)" (#11522)
Broke iOS builds:

    ../../flutter/shell/platform/darwin/ios/ios_external_texture_gl.mm:56:28: error: out-of-line definition of 'NeedUpdateTexture' does not match any declaration in 'flutter::IOSExternalTextureGL'
    bool IOSExternalTextureGL::NeedUpdateTexture(bool freeze) {
                           ^~~~~~~~~~~~~~~~~

This reverts commit 94b31749436e23bef0596f48bdf63e682670486c.
2019-08-27 09:39:48 -07:00
LiuJiLong
94b3174943 Reuse texture cache in ios_external_texture_gl. (#9806)
In current implementation, external texture data flow is a producer-consumer model. When painting external texture, it always asks registered external texture object to produce new CVPixelBuffer, then transforms it to texture. `MarkNewFrameAvailable` function is ignored. This commit changes the dataflow. Now ios_external_texture_gl caches previous opengl texture, if no new frame are available, it do not `copyPixelBuffer` method, just uses cached opengl texture to draw.
2019-08-27 02:00:09 -07:00
Chris Bracken
92c63e848a
Ensure trailing newline before EOF in C++ sources (#11489)
In generated text fixture location lookup code:
When the second argument to write_file() is a list, it is written one
item per line to the path specified by the first argument. This ensures
that we emit a trailing newline at EOF to comply with -Wnewline-eof.

Elsewhere:
Lack of a newline at EOF was undefined behaviour prior to C++11. The
Fuchsia tree sets -Wnewline-eof in its buildroot, so we plan to do the
same. This cleans up remaining first-party C++ sources that don't
include a trailing newline.
2019-08-27 00:13:00 -07:00
xster
fd25f80a1d
make it possible to disable debug symbols stripping (#11265) 2019-08-26 16:53:00 -07:00
Tong Mu
ba1a303ae2
Patch buttons for chromebook touchpad (#11420)
Changes irregular events of touchpad scrolling on Chromebook to have buttons: 1.
2019-08-26 11:49:55 -07:00
Amir Hardon
a34f9a811c
Skip empty platform view overlays. (#11427)
This change sets up a "spying canvas" to try and detect empty canvases.
When using platform views with a custom embedder, if a platform view
overlay canvas is known to be empty we skip creating a compositor layer
for that overlay.
2019-08-26 11:40:49 -07:00
Qxyat
11e3ade157 Release _ongoingTouches when FlutterViewController dealloc (#11049) 2019-08-26 10:49:54 -07:00
Dan Field
d4932ba714
update method for skia (#11436) 2019-08-25 20:06:12 -07:00
liyuqian
4d83ef8c7f
Support non-60 refresh rate on PerformanceOverlay (#11419)
So we can get the correct graph on 90fps/120fps devices :)

See https://github.com/flutter/flutter/issues/37888
2019-08-24 15:22:52 -07:00
Jim Graham
00b72a1475
Add tracing of the number of frames in flight in the pipeline. (#11423) 2019-08-23 16:50:03 -07:00
Dan Field
66636eaded
Platform View implemenation for Metal (#11070) 2019-08-23 16:15:41 -07:00
Chinmay Garde
139a9a799c
Avoid root surface acquisition during custom composition with software renderer. (#11394)
Uses the same technique used during OpenGL composition to elide root surface access. The refactoring of this approach is tracked in https://github.com/flutter/flutter/issues/38466

Fixes https://github.com/flutter/flutter/issues/39009.
2019-08-23 13:52:06 -07:00
Chinmay Garde
b7d03138ed
Remove deprecated ThreadTest::GetThreadTaskRunner and use the newer CreateNewThread API. (#11395)
We will end up creating fewer threads in tests.
2019-08-23 12:21:46 -07:00
Kaushik Iska
1e828b2326
Ios simulator unittests seem to not consider the full compilation unit (#11413)
They only reference the headers, so temporarily declaring and defining
in the header
2019-08-23 09:32:00 -07:00
Chinmay Garde
fcc158fd3f
Wire up software rendering in the test compositor. (#11392) 2019-08-22 20:27:34 -07:00
stuartmorgan
4f6f390b51
Allow overriding the GLFW pixel ratio (#11388)
Allows a client to set a specific pixel ratio rather than using one
computed based on the screen details.

Fixes https://github.com/flutter/flutter/issues/37620
2019-08-22 16:49:23 -07:00
stuartmorgan
6f911ab372
Allow non-resizable windows in GLFW embedding (#11386)
Adds a flag to create non-resizeable windows.

Since the number of parameters is getting awkward, extracts
window-related parameters and engine-related parameters into structs for
clarity. This also removes some duplication in method signatures.

The window parameters struct change is also made to the C++ wrapper,
making this a breaking change for the runners.

Fixes https://github.com/flutter/flutter/issues/37623
2019-08-22 16:48:22 -07:00
stuartmorgan
fa161274fb
Switch to an incremental runloop for GLFW (#11368)
Rather than running the runloop forever, have the API expose an incremental runloop. This allows clients to do other processing if they need it.

This allows for removing the odd construction of having knowledge of GTK event handling built into the library even though nothing in the library uses it; instead runner applications that use GTK plugins (such as FDE's testbed) can do that processing at the application level instead.
2019-08-22 11:39:00 -07:00
stuartmorgan
5f03c7e35d
Use of App.framework in macOS FlutterDartProject (#11380)
Adds initial use of App.framework in the macOS project configuration,
using that rather than the main bundle as the default Dart bundle, and
expecting flutter_resources to be located there.

This is an incremental step toward aligning with the behvaior of the iOS
version of this class.

Fixes https://github.com/flutter/flutter/issues/38363
2019-08-22 10:40:18 -07:00
Amir Hardon
0345967a19
Include Java stack trace in method channel invocations (#11361) 2019-08-22 09:02:31 -07:00
Chinmay Garde
ccf5d619b5
Dry up fixture comparison in embedder unit-tests. (#11359)
No functional change. Just makes testing with fixture images easier. Adding a
whole lot more tests that use this path for the embedder surface rotation
patches. Want to land stuff in smaller chunks.
2019-08-21 16:03:38 -07:00
Tamir Duberstein
29469f39c1 [lsc] Remove fuchsia.net.SocketProvider (#11316)
fuchsia.net.SocketProvider has been replaced with fuchsia.net.NameLookup
and fuchsia.posix.socket.Provider.
2019-08-21 07:38:25 -07:00
Emmanuel Garcia
4f8b166905
Remove engine hash from the output artifact (#11330) 2019-08-21 13:27:55 +00:00
stuartmorgan
9f8b1d223e
Clean up Windows and Linux build output (#11324)
Final portion of reworking the names of the Linux and Windows desktop build outputs.

See flutter/flutter#38589
2019-08-21 05:53:38 -07:00
stuartmorgan
a9b47638a7
Fix change_install_name.py to be GN-friendly (#11309)
change_install_name.py was operating on framework library files
in-place, which breaks GN's timestamp analysis handling since a file
can't be both an input and output of an action. As a result no-op builds
on macOS were not actually no-ops.

This changes the script to operate on an output copy, both fixing the
no-op build issue, and simplifying the GN framework construction scripts
by combining the copy step and the install-name step.

Fixes https://github.com/flutter/flutter/issues/33465
2019-08-20 21:15:42 -07:00
Chinmay Garde
51bdf83420
Migrate Embedder API documentation to Doxygen format. (#11255)
Fixes https://github.com/flutter/flutter/issues/38870
2019-08-20 20:20:06 -07:00
Chinmay Garde
9b1f6d37a7
When using a custom compositor, ensure the root canvas is flushed. (#11310)
The root canvas is managed by the external view embedder when using a custom
compositor. Due to this, frame submission on the surface will not end up
flushing the same (because the surface doesn’t have it to begin with). Fixed
with tests.
2019-08-20 17:06:57 -07:00
Francisco Magdaleno
a79a31a627
[glfw] Send the glfw key data to the framework. (#9386) 2019-08-20 15:55:51 -07:00
stuartmorgan
f310ec580e
Set FlutterMacOS podspec min version to 10.11 (#11306)
The framework is built using 10.11 as the deployment version; update the
podspec accordingly.

See https://github.com/flutter/flutter/issues/33200
2019-08-20 14:51:16 -07:00
Jason Simmons
0e90cb4082
Fix a segfault in EmbedderTest.CanSpecifyCustomTaskRunner (#11305)
This test queues tasks to a custom task runner that runs the tasks on the
platform thread.  After shutting down the engine, the test must wait until
these tasks are drained before the test exits.
2019-08-20 14:11:45 -07:00
Matt Carroll
df178fd936
Remove dart entrypoint Intent parameter from FlutterActivity. (#38713) (#11239) 2019-08-19 17:21:21 -07:00
Chinmay Garde
99ee3c2b0d
Provide a placeholder queue ID for the custom embedder task runner. (#11062)
This issue would only manifest when a custom task runner was being used with
a custom compositor. Both were tested separately but not together. A new
test has been added for this. We still create the GPU thread merger
unnecessarily but I can patch that later. I also cleaned up the existing
custom task runner test to not submit tasks on a dead engine as they just
log errors unnecessarily.

Filed new: https://github.com/flutter/flutter/issues/38844
2019-08-19 15:56:58 -07:00