Skip to content

Commit 7e5364a

Browse files
chinmaygardednfield
authored andcommitted
Minor: Account for macro namespacing.
1 parent f282f41 commit 7e5364a

File tree

9 files changed

+25
-19
lines changed

9 files changed

+25
-19
lines changed

impeller/entity/BUILD.gn

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ impeller_component("entity") {
3333
"entity_pass_delegate.h",
3434
]
3535

36-
deps = [ ":entity_shaders" ]
37-
3836
public_deps = [
37+
":entity_shaders",
3938
"../archivist",
4039
"../image",
4140
"../renderer",

impeller/renderer/allocator.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ bool Allocator::RequiresExplicitHostSynchronization(StorageMode mode) {
1515
return false;
1616
}
1717

18-
#if OS_IOS
18+
#if FML_OS_IOS
1919
// StorageMode::kHostVisible is MTLStorageModeShared already.
2020
return false;
2121
#else // OS_IOS

impeller/renderer/backend/metal/allocator_mtl.mm

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@
3232
static MTLResourceOptions ToMTLResourceOptions(StorageMode type) {
3333
switch (type) {
3434
case StorageMode::kHostVisible:
35-
#if OS_IOS
35+
#if FML_OS_IOS
3636
return MTLResourceStorageModeShared;
3737
#else
3838
return MTLResourceStorageModeManaged;
3939
#endif
4040
case StorageMode::kDevicePrivate:
4141
return MTLResourceStorageModePrivate;
4242
case StorageMode::kDeviceTransient:
43-
#if OS_IOS
43+
#if FML_OS_IOS
4444
if (@available(iOS 10.0, *)) {
4545
return MTLResourceStorageModeMemoryless;
4646
} else {
@@ -57,15 +57,15 @@ static MTLResourceOptions ToMTLResourceOptions(StorageMode type) {
5757
static MTLStorageMode ToMTLStorageMode(StorageMode mode) {
5858
switch (mode) {
5959
case StorageMode::kHostVisible:
60-
#if OS_IOS
60+
#if FML_OS_IOS
6161
return MTLStorageModeShared;
6262
#else
6363
return MTLStorageModeManaged;
6464
#endif
6565
case StorageMode::kDevicePrivate:
6666
return MTLStorageModePrivate;
6767
case StorageMode::kDeviceTransient:
68-
#if OS_IOS
68+
#if FML_OS_IOS
6969
if (@available(iOS 10.0, *)) {
7070
return MTLStorageModeMemoryless;
7171
} else {

impeller/renderer/backend/metal/formats_mtl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ constexpr MTLClearColor ToMTLClearColor(const Color& color) {
275275

276276
constexpr MTLTextureType ToMTLTextureType(TextureType type) {
277277
switch (type) {
278-
case TextureType::k2D:
278+
case TextureType::kTexture2D:
279279
return MTLTextureType2D;
280-
case TextureType::k2DMultisample:
280+
case TextureType::kTexture2DMultisample:
281281
return MTLTextureType2DMultisample;
282282
}
283283
return MTLTextureType2D;

impeller/renderer/backend/metal/surface_mtl.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}
3838

3939
TextureDescriptor color0_tex_desc;
40-
color0_tex_desc.type = TextureType::k2DMultisample;
40+
color0_tex_desc.type = TextureType::kTexture2DMultisample;
4141
color0_tex_desc.sample_count = SampleCount::kCount4;
4242
color0_tex_desc.format = color_format;
4343
color0_tex_desc.size = {
@@ -69,7 +69,7 @@
6969
color0_resolve_tex_desc, current_drawable.texture);
7070

7171
TextureDescriptor stencil0_tex;
72-
stencil0_tex.type = TextureType::k2DMultisample;
72+
stencil0_tex.type = TextureType::kTexture2DMultisample;
7373
stencil0_tex.sample_count = SampleCount::kCount4;
7474
stencil0_tex.format = PixelFormat::kDefaultStencil;
7575
stencil0_tex.size = color0_tex_desc.size;

impeller/renderer/command_buffer.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ class RenderTarget;
2525
/// `RenderPass` describes the configuration of the various
2626
/// attachments when the command is submitted.
2727
///
28-
/// A command buffer is only meant to be used on a single thread.
28+
/// A command buffer is only meant to be used on a single thread. If
29+
/// a frame workload needs to be encoded from multiple threads,
30+
/// setup and record into multiple command buffers. The order of
31+
/// submission of commands encoded in multiple command buffers can
32+
/// be controlled via either the order in which the command buffers
33+
/// were created, or, using the `ReserveSpotInQueue` command which
34+
/// allows for encoding commands for submission in an order that is
35+
/// different from the encoding order.
2936
///
3037
class CommandBuffer {
3138
public:

impeller/renderer/formats.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ enum class StoreAction {
100100
};
101101

102102
enum class TextureType {
103-
k2D,
104-
k2DMultisample,
103+
kTexture2D,
104+
kTexture2DMultisample,
105105
};
106106

107107
constexpr bool IsMultisampleCapable(TextureType type) {
108108
switch (type) {
109-
case TextureType::k2D:
109+
case TextureType::kTexture2D:
110110
return false;
111-
case TextureType::k2DMultisample:
111+
case TextureType::kTexture2DMultisample:
112112
return true;
113113
}
114114
return false;

impeller/renderer/platform.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
namespace impeller {
1313

1414
constexpr size_t DefaultUniformAlignment() {
15-
#if OS_IOS
15+
#if FML_OS_IOS
1616
return 16u;
17-
#elif OS_MACOSX
17+
#elif FML_OS_MACOSX
1818
return 256u;
1919
#else
2020
#error "Unsupported platform".

impeller/renderer/texture_descriptor.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace impeller {
1414

1515
struct TextureDescriptor {
16-
TextureType type = TextureType::k2D;
16+
TextureType type = TextureType::kTexture2D;
1717
PixelFormat format = PixelFormat::kUnknown;
1818
ISize size;
1919
size_t mip_count = 1u; // Size::MipCount is usually appropriate.

0 commit comments

Comments
 (0)