This breaks linting on other targets that include skia headers that do
ifdef checks on SK_VULKAN.
This reverts commit 939c3de58aa3ebeed23221b84883aa7bd7365f2e.
When linting flutter/vulkan/vulkan_window.cc, the call to
GrDirectContext::MakeVulkan is undefined when SK_VULKAN is not defined,
triggering a lint error.
Bug: https://github.com/flutter/flutter/issues/68331
In an upcoming patch, we'll enable enforcement that all FLUTTER_NOLINT
comments include an issue link. This migrates the remaining uses to that
format.
Bug: https://github.com/flutter/flutter/issues/68273
This removes most of the remaining FLUTTER_NOLINT comments and opts
these files back into linter enforcement.
I've filed https://github.com/flutter/flutter/issues/68273 to require
that all FLUTTER_NOLINT comments be followed by a GitHub issue URL
describing the problem to be fixed.
Previously Skia did not require the clients to pass in the usage flags and Skia would just assumed they contained specific ones depending on how the client wrapped the VkImage. Now Skia allows the client to pass in the specific usage flags used so that Skia knows exactly what type of operations are legal without having to guess/assume what the client did.
Also update to set the sample count as well while I'm in here.
Skia is removing the deprecated legacy display setting globals and
associated kLegacyFontHost_InitType. This change replaces all such uses
with default surface properties with no special flags and an unknown
pixel geometry. Flutter never set the associated globals, leaving them
with their initial default values, which were no special flags and
horizontal RGB pixel geometry. The values used here are different but
this change should make no difference as Flutter never mentions
SkFont::kSubpixelAntiAlias to take advantage of the pixel geometry.
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.
Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.
Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676
This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
This fixes lint errors in the vulkan directory. This might be a little more controversial, but the reason that the lints were failing here was because of an include path problem that I think I solved.
This is part of a larger effort to expose the difference between GrDirectContext,
which runs on the GPU thread and can directly perform operations like uploading
textures, and GrRecordingContext, which can only queue up work to be delivered
to the GrDirectContext later.
Tweak the primary flutter build rule so that fuchsia is more similar to
other platforms in how tests and the shell are built.
Only embedder_unittests and GLFW tests are disabled on Fuchsia now.
TEST: Ran unittests on host/fuchsia; workstation on fuchsia
BUG: fxb/53847, fxb/54056
This is required by some Vulkan 1.0 drivers. For example,
MoltenVK through goldfish ICD when running in the emulator.
Co-authored-by: David Reveman <reveman@google.com>
* Update flutter to use new skia flushing/submit api
This has no functional change, just moving to the new api calls.
* Update vulkan_swapchain.cc
* Update embedder_external_view_embedder.cc
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
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.
The Vulkan surface extension as used here is meant for testing only.
Since this isn't used, remove it so we don't have to maintain it.
Also remove the attempt to locate all related Vulkan entry points.
Test:
pixelbook:build topaz, launch a spinning cube
* Remove uses of ReleaseOwnership from vulkan backend.
Flutter no longer needs to release ownership of objects to skia so this change removes the api calls.
* Remove Release call from vulkan_device.cc
* Update vulkan_application.h
* Update vulkan_application.cc
* Update vulkan_handle.h
This changes the ownership of the VkInstance and VkDevice back to the flutter's objects. I am trying to move skia into a world where GrVkBackendContext is purely a description of the vulkan context skia should use and is just passed in during GrContext creation. It shouldn't need to be ref counted or actually do work in destructor (those changes to come later). This is just a first step towards getting there.
The old code called getBackendRenderTargetHandle() with a Read access to trigger the surface to flush, however the returned GrVkImageInfo was never used. This how process is equivalent to just calling flush on the surface so do that instead.