95 Commits

Author SHA1 Message Date
xster
e618085f1c Share Android surface GrDirectContext (flutter/engine#23798) 2021-01-22 12:44:02 -08:00
Basit Ayantunde
2d809abbb3 removed variable-sized array (flutter/engine#23102)
This is undefined behavior. I've replaced it with std::vector instead

Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>
2021-01-14 14:33:29 -08:00
Jason Simmons
b76d246acb Reformat some files that were not auto-formatted (flutter/engine#21940) 2020-10-23 18:57:03 -07:00
Chris Bracken
9482036304 Revert "Define SK_VULKAN for clang-tidy runs (#21927)" (flutter/engine#22012)
This breaks linting on other targets that include skia headers that do
ifdef checks on SK_VULKAN.

This reverts commit 939c3de58aa3ebeed23221b84883aa7bd7365f2e.
2020-10-20 15:17:05 -07:00
Chris Bracken
939c3de58a Define SK_VULKAN for clang-tidy runs (flutter/engine#21927)
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
2020-10-19 16:31:07 -07:00
Chris Bracken
aa0ad5a83e Update FLUTTER_NOLINT uses to include issue link (flutter/engine#21921)
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
2020-10-16 16:08:36 -07:00
Chris Bracken
ef868edd36 Eliminate FLUTTER_NOLINT where possible (flutter/engine#21904)
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.
2020-10-16 12:44:49 -07:00
egdaniel
19f8afc6bc Update flutter to pass Skia the VkImageUsageFlags and Samples (flutter/engine#21842)
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.
2020-10-14 13:55:09 -07:00
bungeman
fd93916c27 Replace kLegacyFontHost_InitType with kUnknown_SkPixelGeometry. (flutter/engine#21474)
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.
2020-09-29 12:46:08 -04:00
Chris Bracken
2586db3b22 Clean up C++ includes (flutter/engine#21127)
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.
2020-09-11 21:18:35 -07:00
egdaniel
0ee7007d63 Remove use of ctors on Skia Vulkan struct (flutter/engine#20630)
Skia is removing the ctors on these structs so removing them.
2020-08-19 13:18:25 -04:00
David Worsham
4e60afdf2a Fix broken shell_unittests on Fuchsia (flutter/engine#20422)
Fixes https://github.com/flutter/flutter/issues/53399
2020-08-11 17:31:25 -07:00
Greg Spencer
3a0464eb42 Fix lint errors in vulkan directory. (flutter/engine#19991)
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.
2020-08-10 09:50:28 -07:00
Adlai Holler
e5614964f4 Use the GrDirectContext factories instead of deprecated GrContext ones (flutter/engine#19962)
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.
2020-07-28 13:32:09 -07:00
gaaclarke
ee0e1788d9 Made the linter print out more information in its output and fixed bugs (flutter/engine#19895) 2020-07-22 15:38:09 -07:00
David Worsham
cbd3cd9c0d fuchsia: Enable most unittests (flutter/engine#19583)
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
2020-07-13 17:36:19 -07:00
David Reveman
e14e4ad37f [fuchsia] Use memory_requirements_2 extension. (flutter/engine#19678)
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>
2020-07-13 17:37:20 -04:00
Guruji Panda
0ffadc0eaa Fix include paths to help building flutter runner for Fuchsia in Google3. (flutter/engine#18840)
Include header file without absolute path if the header file belongs to
the same directory as source file.
2020-06-06 16:05:04 -07:00
egdaniel
077e9639c5 Update flutter skia flush calls to new flush and submit api (flutter/engine#18421)
* 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
2020-05-15 11:40:21 -04:00
George Wright
56bdcec5ae Enable Vulkan validation layers for shell_test (flutter/engine#17684) 2020-04-17 13:00:02 -07:00
George Wright
3e1e1b342d Use VK_LAYER_KHRONOS_validation only on Fuchsia (flutter/engine#17683) 2020-04-13 16:45:03 -07:00
Chinmay Garde
929fb3f825 Remove checks for the always true using_fuchsia_sdk flag in all GN files. (flutter/engine#17261) 2020-03-23 18:31:02 -07:00
Chinmay Garde
8f5f888826 Use the standard [[nodiscard]] attribute instead of an FML macro. (flutter/engine#17100) 2020-03-11 13:36:01 -07:00
George Wright
69e635c0fc Enable shell_unittests on Fuchsia with Vulkan dependencies. (flutter/engine#16376)
This also adds a dependency on SwiftShader's Vulkan frontend.
2020-02-06 15:07:01 -08:00
George Wright
726dfa2685 Refactor of Vulkan GPUSurface code (flutter/engine#16224)
Co-authored-by: David Worsham <arbreng@gmail.com>
2020-02-04 10:44:35 -08:00
Chinmay Garde
426c48aaac Remove all uses of the redundant flutter_root variable. (flutter/engine#16311)
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.
2020-01-31 21:49:48 -08:00
Dan Field
62a99c60c5 the the fix (flutter/engine#15973) 2020-01-24 12:43:32 -08:00
Kaushik Iska
d6b2b657eb [vulkan] Bundle vulkan validation layer so files (flutter/engine#13930)
Enable vulkan validation for Fuchsia in debug mode as well.
2019-11-25 16:09:56 -08:00
gaaclarke
43dce83fc1 Refactor to passing functions by const ref (flutter/engine#13975)
Moved our code to passing functions by const ref
2019-11-22 12:20:02 -08:00
Chinmay Garde
56e7bf84b1 Wire up Fuchsia SDK related updated for shell dependencies. #8869
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.
2019-05-06 18:01:59 -07:00
Craig Stout
1eb2e9231d Remove old Fuchsia external mem,sem extensions 2019-03-29 11:00:18 -07:00
Craig Stout
1ca8afa1bc [vulkan] Add FUCHSIA external sem/mem extensions
The KHR versions will be renamed once references are removed.

MA-510 #comment
2019-03-26 12:51:40 -07:00
Craig Stout
9be12e78ce [vulkan] Fix Fuchsia build
Stub out VulkanSwapchain.

Test:Fuchsia release *and* debug builds
2018-12-14 14:08:43 -08:00
Craig Stout
50efc8bc35 [vulkan] Define VK_USE_PLATFORM_FUCHSIA
VK_USE_PLATFORM_MAGMA_KHR is old and will be removed.
2018-12-10 10:09:53 -08:00
Craig Stout
981e3e84d3 [vulkan] Remove magma native surface
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
2018-12-10 10:09:53 -08:00
Chinmay Garde
e0fa0cb73c Dont attempt to log names of extensions as these change depending on the header used. (flutter/engine#6949) 2018-11-26 15:30:03 -08:00
Jason Simmons
708c487c14 Update Vulkan headers to 1.1 (flutter/engine#6806) 2018-11-09 12:01:57 -08:00
Mehmet Fidanboylu
e8d852bac0 Skia Cleanup (flutter/engine#6786) 2018-11-07 15:29:52 -08:00
Michael Goderbauer
0def82ddb0 Unify copyright lines (flutter/engine#6757) 2018-11-07 12:24:35 -08:00
John Bauman
5c40c82966 Enable VK_KHR_get_physical_device_properties2 (flutter/engine#5982) 2018-08-10 15:33:21 -07:00
John Bauman
0ed9c458bf Add VK_ERROR_FRAGMENTATION_EXT (flutter/engine#5981) 2018-08-10 15:33:03 -07:00
Chinmay Garde
6ab2c166fd Remove all dependencies on Garnet. (flutter/engine#5869) 2018-07-26 12:49:34 -07:00
egdaniel
192aaabd4d Remove unused function CreateSkiaInterface (flutter/engine#5812)
* Remove unused function CreateSkiaInterface.

* Remove include.
2018-07-23 18:27:41 -04:00
egdaniel
4b47ba0110 Remove use of GrVkInterface in vulkan. (flutter/engine#5764) 2018-07-17 08:59:36 -04:00
egdaniel
d019976b47 Nosksp backend context (flutter/engine#5544)
* Use new vulkan factory of GrContext which doens't take an sk_sp.

* remove unneeded member.
2018-06-15 14:53:50 -04:00
Zachary Anderson
18f4c34c51 Revert: Remove uses of ReleaseOwnership from vulkan backend (flutter/engine#5484) 2018-06-07 10:42:48 -07:00
egdaniel
c853d53156 Remove uses of ReleaseOwnership from vulkan backend (flutter/engine#5458)
* 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
2018-06-04 15:46:24 -04:00
egdaniel
800005b4c9 Update GrVkBackendContext to no longer own the VkInstance and VkDevice (flutter/engine#5457)
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.
2018-06-04 14:46:12 -04:00
Chinmay Garde
7293d4cef9 Fixup Fuchsia content handler post shell refactor. (flutter/engine#5072) 2018-04-23 20:16:01 -07:00
egdaniel
ad967fceb2 Call SkSurface::flush instead of getting a backend handle in vulkan_swapchain. (flutter/engine#5012)
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.
2018-04-16 10:21:53 -04:00