Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bdero committed Nov 12, 2021
1 parent ce0ec13 commit 48b7b09
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DEPS
Expand Up @@ -27,7 +27,7 @@ vars = {
'skia_git': 'https://skia.googlesource.com',
# OCMock is for testing only so there is no google clone
'ocmock_git': 'https://github.com/erikdoe/ocmock.git',
'skia_revision': '220b8fcf06fc0c0f6a4d0b34ce62083ac1b2ce22',
'skia_revision': 'ef7ef26b53fe4cd4be270427a1bafb7fe64b10cb',

# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/embedder/tests/embedder_unittests_gl.cc
Expand Up @@ -47,7 +47,7 @@ using EmbedderTest = testing::EmbedderTest;
///
TEST_F(EmbedderTest, CanInitializeTestVulkanContext) {
TestVulkanContext ctx;
ASSERT_TRUE(ctx.is_valid());
ASSERT_TRUE(ctx.IsValid());
}

TEST_F(EmbedderTest, CanCreateOpenGLRenderingEngine) {
Expand Down
2 changes: 1 addition & 1 deletion testing/test_vulkan_context.cc
Expand Up @@ -45,7 +45,7 @@ TestVulkanContext::TestVulkanContext() : valid_(false) {

TestVulkanContext::~TestVulkanContext() = default;

bool TestVulkanContext::is_valid() {
bool TestVulkanContext::IsValid() {
return valid_;
}

Expand Down
6 changes: 4 additions & 2 deletions testing/test_vulkan_context.h
Expand Up @@ -17,13 +17,15 @@ class TestVulkanContext {
public:
TestVulkanContext();
~TestVulkanContext();
bool is_valid();
bool IsValid();

private:
bool valid_;
bool valid_ = false;
fml::RefPtr<vulkan::VulkanProcTable> vk_;
std::unique_ptr<vulkan::VulkanApplication> application_;
std::unique_ptr<vulkan::VulkanDevice> logical_device_;

FML_DISALLOW_COPY_AND_ASSIGN(TestVulkanContext);
};

} // namespace flutter
Expand Down
15 changes: 10 additions & 5 deletions tools/gn
Expand Up @@ -308,11 +308,16 @@ def to_gn_args(args):
gn_args['skia_use_metal'] = True
gn_args['shell_enable_metal'] = True

# Enable Vulkan on all platforms.
gn_args['skia_use_vulkan'] = True
gn_args['shell_enable_vulkan'] = True
if args.target_os == 'ios' or sys.platform.startswith(('cygwin', 'win')):
gn_args['skia_enable_vma_shared_mutex'] = False
# Enable Vulkan on all platforms except for Android and iOS. This is just
# to save on mobile binary size, as there's no reason the Vulkan embedder
# features can't work on these platforms.
if args.target_os not in ['android', 'ios']
gn_args['skia_use_vulkan'] = True
gn_args['shell_enable_vulkan'] = True
# Disable VMA's use of std::shared_mutex in environments where the
# standard library doesn't support it.
if args.target_os == 'ios' or sys.platform.startswith(('cygwin', 'win')):
gn_args['skia_disable_vma_stl_shared_mutex'] = True

if sys.platform.startswith(('cygwin', 'win')):
# The buildroot currently isn't set up to support Vulkan in the
Expand Down

0 comments on commit 48b7b09

Please sign in to comment.