This is a minor cleanup that exposes the test metal surface to tests via
EmbedderTestContextMeta::GetTestMetalSurface for parity with the
GetTestMetalContext method which exposes the test metal context. This
eliminates the need for the more specific GetTextureInfo method since
the texture info is accessible via the test context.
This is a test refactoring with no semantic differences to the engine.
Issue: https://github.com/flutter/flutter/issues/116381
This is a followup to flutter/engine#38038.
In that patch, a destruction callback for textures created via the
FlutterRendererConfig callbacks (as opposed to by the FlutterCompositor
callbacks) was added and passed through to the texture info attached to
the SurfaceFrame generated in
GPUSurfaceMetalSkia::AcquireFrameFromMTLTexture (called via
GPUSurfaceMetalSkia::GetMTLTexture, which invokes the
get_next_drawable_callback), however, in order for the destruction
callback to make it to the presented Skia texture, it needs to be passed
through to the present callback here:
960af0a350/shell/gpu/gpu_surface_metal_skia.mm (LL233)
which is invoked by the submit callback passed to Skia:
960af0a350/shell/gpu/gpu_surface_metal_skia.mm (LL239)
The present callback is implemented in EmbedderSurface::PresentTexture,
which invokes the present callback registered in
FlutterMetalRendererConfig.present_drawable_callback. This patch ensures
that the destruction callback is passed through to Skia's present
callback so destruction occurs in the right place.
Issue: https://github.com/flutter/flutter/issues/116381
* Initial
* Comment TODOs
* Shim windowsx
* Comment testing
* UIA works at most basic
* Get Native target in win delegate
* Rework events
* FlutterWindowsView unit tests for UIA
* Enable UIA unit tests
* Conditional UIA implementation
* Text selection MSAA event
* License
* PR
* Before change to AccessibilityBridgeWindows
* AccessibilityBridgeWindows in FlutterWindowsEngine
* Use AccessibilityBridgeWindows for AXFragmentRootDelegateWin
* Format
* Remove unneeded windowsx_shim imports
* PR Comment
* Remove uses of --no-sound-null-safety in preparation for the Dart 3.0
roll.
* Update quiver package to latest.
* Run Fuchsia engine in null safe mode.
* Run Fuchsia engine in non null safe mode.
* Update Dart version to 3.0
* Address review comments.
This is useful for java test debugging.
Audit of all java tests shows only 4 logged lines so this should
not add log spam but will aid in contributor test debugging.
This ensures FlutterMetalTexture.destruction_callback gets called.
FlutterRendererConfig.get_next_drawable_callback holds a callback used by the embedder API to request a drawable; in the case of Metal, this drawable is a FlutterMetalTexture.
FlutterMetalTexture.destruction_callback should be called when it's safe to release resources associated with the FlutterMetalTexture. This callback is not currently invoked for textures returned via FlutterRendererConfig.get_next_drawable_callback; instead we unpack the returned struct and pass it on.
In the compositor codepath, we do create an SkSurface that triggers the destruction callback, here:
bbdb5d6a3e/shell/platform/embedder/embedder.cc (L868-L881)
Issue: https://github.com/flutter/flutter/issues/116381
This adds explicit strong/copy Objective-C property annotations where
they were previously implied on NSObject properties and fixes on case
where it was previously improperly specified.
Previously there were two conventions for test filenames in the macOS
embedder: some ended in Unittests.mm and others eneded in Test.mm. This
applies a consistent naming convention, which is also consistent with
the iOS and common Darwin tests. Stock C++ unittests should continue to
use the _unittests.cc convention.
* [Impeller] use uniform array for more efficient small gradients
* ++
* Make this work on Android
* ++
* ++
* ++
* compiler support and basic feature detection
* ++
* ++
* rename to ssbo_fill, move to context
* ++
* ++
* ++
* tests
* ++
* ++
* only clip when necessary
tests
fix tests
format
review
fix
add scenario tset
more scenario tests
add docs and comments
use offset.zero
* remove mistakenly checked-in code
Now that OpenGL support has been removed from the macOS embedder, we
merge FlutterRenderBackingStore and its only implementing subclass,
FlutterMetalRenderBackingStore, and similarly
FlutterRenderBackingStoreProvider and its only implementing subclass
FlutterMetalRenderBackingStoreProvider.
Issue: https://github.com/flutter/flutter/issues/108304
Issue: https://github.com/flutter/flutter/issues/114445
Previously, FlutterSurfaceManager was a protocol with two concrete
implementations: FlutterGLSurfaceManager and FlutterMetalSurfaceManager.
Most of the implementation was in a shared superclass,
FlutterIOSurfaceManager, which called into the OpenGL or Metal-specific
subclass when backend-specific operations (such as allocating textures)
was required. It did so via a delegate pattern, wherein the subclasses
both implemented the FlutterIOSurfaceManagerDelegate protocol that
exposed the backend-specific functionality.
Now that only the Metal implementation remains, the delegate code can be
inlined into the calling functions, and the class hierarchy can be
squashed into a single concrete implementation class,
FlutterSurfaceManager, similar to how it was originally implemented in
https://github.com/flutter/engine/pull/21525 before we had two backends.
Issue: https://github.com/flutter/flutter/issues/108304
Issue: https://github.com/flutter/flutter/issues/114445
Previously, external textures were modelled in the macOS embedder by a
top-level FlutterMacOSExternalTexture protocol with a single textureID
getter, and two implementations: FlutterExternalTextureGL and
FlutterExternalTextureMetal.
With the removal of OpenGL support from the macOS embedder, the only
remaining external texture implementation is Metal. This patch squashes
this set of types into a single FlutterExternalTexture class.
Issue: https://github.com/flutter/flutter/issues/108304
Issue: https://github.com/flutter/flutter/issues/114445
In the Virtual Display codepath for Android platform views, resize
completes asynchronously. Currently it is attempting to access the
Context in the completion handler, but there is no guarantee that it
is still present at that point, leading to possible null pointer
crashes.
This adds a check for the current state of the Context, and uses a
fallback if it's not available.
Fixes https://github.com/flutter/flutter/issues/114095
Now that OpenGL support in Flutter on macOS has been removed, the only
FlutterCompositor implementation is the Metal-based compositor. This
patch merges it into the FlutterCompositor base class since there's no
longer any reason to keep the interface separate from its implementation.
This patch will be followed by similar patches for the renderer, surface
manager, and external textures.
Issue: https://github.com/flutter/flutter/issues/108304
Issue: https://github.com/flutter/flutter/issues/114445