At a quick glance, one could easily think of the "engine_time" as the
GPU thread time and the "frame_time" as the UI thread time because the
GPU thread time is mainly spent on the engine while the UI thread time
is mainly spent on the Dart framework to generate the frame.
But it's actually the other way. The "engine_time" is UI thread time and
the "frame_time" is the GPU thread time.
To avoid the confusion, rename them to "ui_time" and "raster_time"
respectively. I avoided the "gpu_time" because the rasterization may be
purely on a CPU backed software Skia backend.
When backgrounding an app in debug mode, we make a request for
additional background time for the app with a background task. This
prevents us from losing the devfs session used for hot reload. In the
case where the app is backgrounded beyond the additional time provided
by iOS, it's required that we end the background task or the app will
be terminated by the OS.
We previously ended the background task only on foregrounding, but
failed to do so on expiry of the task.
This PR updated the forwarding gesture recognizer to pass the touch events directly to the FlutterViewContoller instead of FlutterView which ensures the touches events are passed to the framework.
Partially fix the issue in flutter/flutter#30804. This only fixes the focus issue for other platform views (Google maps and other custom platform views), but the same issue on WebView is not fixed.
Before the change, the a11y tree with platform view looks like
```
<some parent a11y container>
<SemanticsObject for platform view>
<FlutterPlatformViewSemanticsContainer>
<platform view>
```
After the change, it looks like
```
<some parent a11y container>
<FlutterPlatformViewSemanticsContainer>
<SemanticsObject>
<platform view>
```
This PR also updated the implementation of FlutterPlatformViewSemanticsContainer to use A11yContainer protocol to implement the details on various a11y attribute including the accessibilityFrame and accessibilityScroll.
This does not actually import the runners into the engine. It only sets up the targets so they need no modifications are necessary when the migration is done. The engine has been verified to build in both buildroots.
Adds methods to get and set the window size, as well as to query the
window's scale factor. This is useful both for custom clients, and for
building a window resize plugin to prototype what will eventually likely
be a system channel.
Plugins may need to be able to access functions affecting the GLFW
window (e.g., a plugin to resize the window). This restructures the API
to create a distinction at both the C and C++ level between the window
controller, which provides access to high-level behaviors driving the
Flutter application, and the window, which provides access to functions
to affect the UI state of the window (i.e., wrapped GLFWwindow
functions).
Also provides a PluginRegistrar extension for plugins that need access
to GLFW-specific functionality.
* Re-create texture from pixel buffer onGrContextCreate
OnGrContextDestroy we destroy the texture, this is because
we can not access it from the potentially new context that
we get on bringing the app back to foreground.
To show a valid texture on fg, we need to preserve the pixel
buffer, using which we will create the new texture.
* ensure texture cache exists
* only reset pixel buffer if not null.
Class.newInstance() propagates any exception thrown by the nullary
constructor, including a checked exception. This effectively bypasses
the compile-time exception checking that would otherwise be performed by
the compiler. The Constructor.newInstance method avoids this problem by
wrapping any exception thrown by the constructor in a (checked)
InvocationTargetException.