Skip to content

Commit

Permalink
Fix lint errors in vulkan directory
Browse files Browse the repository at this point in the history
  • Loading branch information
gspencergoog committed Jul 30, 2020
1 parent 0380e8f commit dda4917
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 337 deletions.
362 changes: 45 additions & 317 deletions ci/lint.dart

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ci/lint.sh
Expand Up @@ -7,4 +7,4 @@ if [ ! -f $COMPILE_COMMANDS ]; then
./flutter/tools/gn
fi

dart --enable-experiment=non-nullable flutter/ci/lint.dart $COMPILE_COMMANDS flutter/
dart flutter/ci/lint.dart $COMPILE_COMMANDS flutter/
2 changes: 1 addition & 1 deletion vulkan/BUILD.gn
Expand Up @@ -11,7 +11,7 @@ config("vulkan_config") {
include_dirs += [ "$fuchsia_sdk_root/vulkan/include" ]
defines += [ "VK_USE_PLATFORM_FUCHSIA=1" ]
} else {
include_dirs += [ "//third_party/vulkan/src" ]
include_dirs += [ "//third_party/vulkan/src", "//third_party/vulkan/include" ]
}
}

Expand Down
3 changes: 1 addition & 2 deletions vulkan/vulkan_application.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_application.h"

Expand All @@ -15,7 +14,7 @@
namespace vulkan {

VulkanApplication::VulkanApplication(
VulkanProcTable& p_vk,
VulkanProcTable& p_vk, // NOLINT
const std::string& application_name,
std::vector<std::string> enabled_extensions,
uint32_t application_version,
Expand Down
2 changes: 1 addition & 1 deletion vulkan/vulkan_application.h
Expand Up @@ -24,7 +24,7 @@ class VulkanProcTable;
/// create a VkInstance (with debug reporting optionally enabled).
class VulkanApplication {
public:
VulkanApplication(VulkanProcTable& vk,
VulkanApplication(VulkanProcTable& vk, // NOLINT
const std::string& application_name,
std::vector<std::string> enabled_extensions,
uint32_t application_version = VK_MAKE_VERSION(1, 0, 0),
Expand Down
1 change: 0 additions & 1 deletion vulkan/vulkan_backbuffer.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_backbuffer.h"

Expand Down
1 change: 0 additions & 1 deletion vulkan/vulkan_command_buffer.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_command_buffer.h"

Expand Down
4 changes: 2 additions & 2 deletions vulkan/vulkan_debug_report.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_debug_report.h"

Expand Down Expand Up @@ -192,8 +191,9 @@ VulkanDebugReport::VulkanDebugReport(
}

VkDebugReportFlagsEXT flags = kVulkanErrorFlags;
if (ValidationLayerInfoMessagesEnabled())
if (ValidationLayerInfoMessagesEnabled()) {
flags |= kVulkanInfoFlags;
}
const VkDebugReportCallbackCreateInfoEXT create_info = {
.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT,
.pNext = nullptr,
Expand Down
1 change: 0 additions & 1 deletion vulkan/vulkan_device.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_device.h"

Expand Down
1 change: 0 additions & 1 deletion vulkan/vulkan_handle.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_handle.h"

Expand Down
1 change: 0 additions & 1 deletion vulkan/vulkan_image.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_image.h"

Expand Down
1 change: 0 additions & 1 deletion vulkan/vulkan_interface.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_interface.h"

Expand Down
1 change: 0 additions & 1 deletion vulkan/vulkan_native_surface.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_native_surface.h"

Expand Down
1 change: 0 additions & 1 deletion vulkan/vulkan_proc_table.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_proc_table.h"

Expand Down
5 changes: 2 additions & 3 deletions vulkan/vulkan_surface.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_surface.h"

Expand All @@ -11,8 +10,8 @@
namespace vulkan {

VulkanSurface::VulkanSurface(
VulkanProcTable& p_vk,
VulkanApplication& application,
VulkanProcTable& p_vk, // NOLINT
VulkanApplication& application, // NOLINT
std::unique_ptr<VulkanNativeSurface> native_surface)
: vk(p_vk),
application_(application),
Expand Down
1 change: 0 additions & 1 deletion vulkan/vulkan_utilities.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_utilities.h"
#include "flutter/fml/build_config.h"
Expand Down
7 changes: 6 additions & 1 deletion vulkan/vulkan_window.cc
@@ -1,7 +1,6 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// FLUTTER_NOLINT

#include "vulkan_window.h"

Expand Down Expand Up @@ -109,7 +108,13 @@ bool VulkanWindow::CreateSkiaGrContext() {
return false;
}

// This is just to make lint happy: MakeVulkan isn't defined unless SK_VULKAN is
// defined, and lint doesn't define SK_VULKAN.
#ifdef SK_VULKAN
sk_sp<GrDirectContext> context = GrDirectContext::MakeVulkan(backend_context);
#else
sk_sp<GrDirectContext> context = nullptr;
#endif

if (context == nullptr) {
return false;
Expand Down

0 comments on commit dda4917

Please sign in to comment.