Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Finish landing missing/incorrect header guards across flutter/engine #50069

Merged
merged 3 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions impeller/aiks/aiks_playground_inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_IMPELLER_AIKS_AIKS_PLAYGROUND_INSPECTOR_H_
#define FLUTTER_IMPELLER_AIKS_AIKS_PLAYGROUND_INSPECTOR_H_

#include <functional>
#include <optional>

Expand Down Expand Up @@ -48,3 +51,5 @@ class AiksInspector {
};

}; // namespace impeller

#endif // FLUTTER_IMPELLER_AIKS_AIKS_PLAYGROUND_INSPECTOR_H_
5 changes: 5 additions & 0 deletions impeller/compiler/shader_bundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_IMPELLER_COMPILER_SHADER_BUNDLE_H_
#define FLUTTER_IMPELLER_COMPILER_SHADER_BUNDLE_H_

#include "impeller/compiler/source_options.h"
#include "impeller/compiler/switches.h"
#include "impeller/shader_bundle/shader_bundle_flatbuffers.h"
Expand Down Expand Up @@ -33,3 +36,5 @@ bool GenerateShaderBundle(Switches& switches);

} // namespace compiler
} // namespace impeller

#endif // FLUTTER_IMPELLER_COMPILER_SHADER_BUNDLE_H_
5 changes: 5 additions & 0 deletions impeller/renderer/backend/gles/test/mock_gles.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_TEST_MOCK_GLES_H_
#define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_TEST_MOCK_GLES_H_

#include <memory>
#include <optional>
#include "fml/macros.h"
Expand Down Expand Up @@ -60,3 +63,5 @@ class MockGLES final {

} // namespace testing
} // namespace impeller

#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_TEST_MOCK_GLES_H_
5 changes: 5 additions & 0 deletions impeller/renderer/backend/vulkan/gpu_tracer_vk.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_GPU_TRACER_VK_H_
#define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_GPU_TRACER_VK_H_

#include <memory>
#include <thread>

Expand Down Expand Up @@ -115,3 +118,5 @@ class GPUProbe {
};

} // namespace impeller

#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_GPU_TRACER_VK_H_
6 changes: 3 additions & 3 deletions impeller/renderer/texture_mipmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_IMPELLER_TEXTURE_MIPMAP_H_
#define FLUTTER_IMPELLER_TEXTURE_MIPMAP_H_
#ifndef FLUTTER_IMPELLER_RENDERER_TEXTURE_MIPMAP_H_
#define FLUTTER_IMPELLER_RENDERER_TEXTURE_MIPMAP_H_

#include "flutter/fml/status.h"
#include "impeller/core/texture.h"
Expand All @@ -20,4 +20,4 @@ namespace impeller {

} // namespace impeller

#endif // FLUTTER_IMPELLER_TEXTURE_MIPMAP_H_
#endif // FLUTTER_IMPELLER_RENDERER_TEXTURE_MIPMAP_H_
9 changes: 7 additions & 2 deletions lib/gpu/fixtures.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_LIB_GPU_FIXTURES_H_
#define FLUTTER_LIB_GPU_FIXTURES_H_

#include "impeller/core/shader_types.h"

struct FlutterGPUUnlitVertexShader {
struct PerVertexData {
impeller::Point position; // (offset 0, size 8)
}; // struct PerVertexData (size 8)
}; // struct PerVertexData (size 8)

static constexpr auto kInputPosition = impeller::ShaderStageIOSlot{
// position
Expand Down Expand Up @@ -46,7 +49,7 @@ struct FlutterGPUTextureVertexShader {
impeller::Vector3 position; // (offset 0, size 12)
impeller::Point texture_coords; // (offset 12, size 8)
impeller::Vector4 color; // (offset 20, size 16)
}; // struct PerVertexData (size 36)
}; // struct PerVertexData (size 36)

static constexpr auto kInputTextureCoords = impeller::ShaderStageIOSlot{
// texture_coords
Expand Down Expand Up @@ -107,3 +110,5 @@ extern unsigned char kFlutterGPUTextureVertIPLR[];

constexpr unsigned int kFlutterGPUTextureFragIPLRLength = 800;
extern unsigned char kFlutterGPUTextureFragIPLR[];

#endif // FLUTTER_LIB_GPU_FIXTURES_H_
5 changes: 5 additions & 0 deletions lib/gpu/formats.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_LIB_GPU_FORMATS_H_
#define FLUTTER_LIB_GPU_FORMATS_H_

#include "fml/logging.h"
#include "impeller/core/formats.h"
#include "impeller/core/shader_types.h"
Expand Down Expand Up @@ -500,3 +503,5 @@ constexpr impeller::StencilOperation ToImpellerStencilOperation(int value) {

} // namespace gpu
} // namespace flutter

#endif // FLUTTER_LIB_GPU_FORMATS_H_
5 changes: 5 additions & 0 deletions lib/ui/painting/image_decoder_no_gl_unittests.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_LIB_UI_PAINTING_IMAGE_DECODER_NO_GL_UNITTESTS_H_
#define FLUTTER_LIB_UI_PAINTING_IMAGE_DECODER_NO_GL_UNITTESTS_H_

#include <stdint.h>

#include "flutter/impeller/core/allocator.h"
Expand Down Expand Up @@ -99,3 +102,5 @@ float DecodeBGR10(uint32_t x);

} // namespace testing
} // namespace flutter

#endif // FLUTTER_LIB_UI_PAINTING_IMAGE_DECODER_NO_GL_UNITTESTS_H_
5 changes: 5 additions & 0 deletions lib/web_ui/skwasm/skwasm_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_LIB_WEB_UI_SKWASM_SKWASM_SUPPORT_H_
#define FLUTTER_LIB_WEB_UI_SKWASM_SKWASM_SUPPORT_H_

#include <emscripten/threading.h>
#include <cinttypes>
#include "third_party/skia/include/core/SkPicture.h"
Expand Down Expand Up @@ -36,3 +39,5 @@ extern unsigned int skwasm_createGlTextureFromTextureSource(
int width,
int height);
}

#endif // FLUTTER_LIB_WEB_UI_SKWASM_SKWASM_SUPPORT_H_
4 changes: 2 additions & 2 deletions shell/common/vsync_waiters_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#define FML_USED_ON_EMBEDDER

#ifndef FLUTTER_SHELL_COMMON_VSYNC_WAITERS_TEST_H_
#define FLUTTER_SHELL_COMMON_VSYNC_WAITERS_TEST_H_

#define FML_USED_ON_EMBEDDER

#include <utility>

#include "flutter/shell/common/shell.h"
Expand Down
5 changes: 5 additions & 0 deletions shell/platform/darwin/common/availability_version_check.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_AVAILABILITY_VERSION_CHECK_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_AVAILABILITY_VERSION_CHECK_H_

#include <cstdint>
#include <optional>
#include <tuple>
Expand All @@ -16,3 +19,5 @@ std::optional<ProductVersion> ProductVersionFromSystemVersionPList();
bool IsEncodedVersionLessThanOrSame(uint32_t encoded_lhs, ProductVersion rhs);

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_AVAILABILITY_VERSION_CHECK_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_GRAPHICS_FLUTTERDARWINEXTERNALTEXTUREMETAL_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_GRAPHICS_FLUTTERDARWINEXTERNALTEXTUREMETAL_H_

#import <Foundation/Foundation.h>
#import <Metal/Metal.h>

Expand Down Expand Up @@ -49,3 +52,5 @@
@property(nonatomic, readonly) int64_t textureID;

@end

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_GRAPHICS_FLUTTERDARWINEXTERNALTEXTUREMETAL_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERENGINEGROUP_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERENGINEGROUP_H_

#import <Foundation/Foundation.h>

#import "FlutterEngine.h"
Expand Down Expand Up @@ -108,3 +111,5 @@ FLUTTER_DARWIN_EXPORT
@end

NS_ASSUME_NONNULL_END

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERENGINEGROUP_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERAPPDELEGATE_TEST_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERAPPDELEGATE_TEST_H_

@class FlutterViewController;

@interface FlutterAppDelegate (Test)
@property(nonatomic, copy) FlutterViewController* (^rootFlutterViewControllerGetter)(void);

@end

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERAPPDELEGATE_TEST_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERENGINE_TEST_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERENGINE_TEST_H_

#import "flutter/shell/common/shell.h"
#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngine.h"
#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputDelegate.h"
Expand Down Expand Up @@ -41,3 +44,5 @@ class ThreadHost;
- (void)applicationDidEnterBackground:(NSNotification*)notification;

@end

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERENGINE_TEST_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERMETALLAYER_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERMETALLAYER_H_

#import <QuartzCore/QuartzCore.h>

/// Drop-in replacement (as far as Flutter is concerned) for CAMetalLayer
Expand All @@ -24,3 +27,5 @@
+ (BOOL)enabled;

@end

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERMETALLAYER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_INTERNAL_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_INTERNAL_H_

@interface FlutterPluginAppLifeCycleDelegate ()

/**
Expand All @@ -16,3 +19,5 @@

@end
;

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_INTERNAL_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTUREREGISTRYRELAY_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTUREREGISTRYRELAY_H_

#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"
#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterTexture.h"

Expand All @@ -22,3 +25,5 @@ FLUTTER_DARWIN_EXPORT
@property(nonatomic, assign) NSObject<FlutterTextureRegistry>* parent;
- (instancetype)initWithParent:(NSObject<FlutterTextureRegistry>*)parent;
@end

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTUREREGISTRYRELAY_H_
5 changes: 5 additions & 0 deletions shell/platform/darwin/macos/framework/Headers/FlutterMacOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERMACOS_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERMACOS_H_

#import "FlutterAppDelegate.h"
#import "FlutterAppLifecycleDelegate.h"
#import "FlutterBinaryMessenger.h"
Expand All @@ -14,3 +17,5 @@
#import "FlutterPluginRegistrarMacOS.h"
#import "FlutterTexture.h"
#import "FlutterViewController.h"

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERMACOS_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERPLUGINMACOS_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERPLUGINMACOS_H_

#import <Foundation/Foundation.h>

#import "FlutterAppLifecycleDelegate.h"
Expand Down Expand Up @@ -49,3 +52,5 @@ FLUTTER_DARWIN_EXPORT
NS_ASSUME_NONNULL_END

@end

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERPLUGINMACOS_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERPLUGINREGISTRARMACOS_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERPLUGINREGISTRARMACOS_H_

#import <Cocoa/Cocoa.h>

#import "FlutterBinaryMessenger.h"
Expand Down Expand Up @@ -144,3 +147,5 @@ FLUTTER_DARWIN_EXPORT
- (nullable NSObject*)valuePublishedByPlugin:(nonnull NSString*)pluginKey;

@end

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERPLUGINREGISTRARMACOS_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERVIEWCONTROLLER_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERVIEWCONTROLLER_H_

#import <Cocoa/Cocoa.h>

#import "FlutterEngine.h"
Expand Down Expand Up @@ -188,3 +191,5 @@ FLUTTER_DARWIN_EXPORT
@property(readwrite, nonatomic, nullable, copy) NSColor* backgroundColor;

@end

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_HEADERS_FLUTTERVIEWCONTROLLER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERBACKINGSTORE_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERBACKINGSTORE_H_

#import <Cocoa/Cocoa.h>
#import <Metal/Metal.h>

Expand All @@ -22,3 +25,5 @@
- (nonnull instancetype)initWithTexture:(nonnull id<MTLTexture>)texture;

@end

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERBACKINGSTORE_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERCHANNELKEYRESPONDER_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERCHANNELKEYRESPONDER_H_

#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterKeyPrimaryResponder.h"

#import <Cocoa/Cocoa.h>
Expand All @@ -22,3 +25,5 @@
- (nonnull instancetype)initWithChannel:(nonnull FlutterBasicMessageChannel*)channel;

@end

#endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERCHANNELKEYRESPONDER_H_
Loading