Skip to content

Commit

Permalink
Account for updated macro name in //flutter/fml/build_config.h (flutt…
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaygarde authored and dnfield committed Apr 27, 2022
1 parent 4e323c6 commit c11f408
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion impeller/geometry/matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct Matrix {
};

//----------------------------------------------------------------------------
/// Construts a default identity matrix.
/// Constructs a default identity matrix.
///
constexpr Matrix()
// clang-format off
Expand Down
6 changes: 3 additions & 3 deletions impeller/renderer/allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ bool Allocator::RequiresExplicitHostSynchronization(StorageMode mode) {
return false;
}

#if OS_IOS
#if FML_OS_IOS
// StorageMode::kHostVisible is MTLStorageModeShared already.
return false;
#else // OS_IOS
#else // FML_OS_IOS
// StorageMode::kHostVisible is MTLResourceStorageModeManaged.
return true;
#endif // OS_IOS
#endif // FML_OS_IOS
}

} // namespace impeller
8 changes: 4 additions & 4 deletions impeller/renderer/backend/metal/allocator_mtl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
static MTLResourceOptions ToMTLResourceOptions(StorageMode type) {
switch (type) {
case StorageMode::kHostVisible:
#if OS_IOS
#if FML_OS_IOS
return MTLResourceStorageModeShared;
#else
return MTLResourceStorageModeManaged;
#endif
case StorageMode::kDevicePrivate:
return MTLResourceStorageModePrivate;
case StorageMode::kDeviceTransient:
#if OS_IOS
#if FML_OS_IOS
if (@available(iOS 10.0, *)) {
return MTLResourceStorageModeMemoryless;
} else {
Expand All @@ -57,15 +57,15 @@ static MTLResourceOptions ToMTLResourceOptions(StorageMode type) {
static MTLStorageMode ToMTLStorageMode(StorageMode mode) {
switch (mode) {
case StorageMode::kHostVisible:
#if OS_IOS
#if FML_OS_IOS
return MTLStorageModeShared;
#else
return MTLStorageModeManaged;
#endif
case StorageMode::kDevicePrivate:
return MTLStorageModePrivate;
case StorageMode::kDeviceTransient:
#if OS_IOS
#if FML_OS_IOS
if (@available(iOS 10.0, *)) {
return MTLStorageModeMemoryless;
} else {
Expand Down
2 changes: 1 addition & 1 deletion impeller/renderer/backend/metal/device_buffer_mtl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
// Making this call is never necessary on iOS because there is no
// MTLResourceStorageModeManaged mode. Only the MTLStorageModeShared mode is
// available.
#if !OS_IOS
#if !FML_OS_IOS
if (Allocator::RequiresExplicitHostSynchronization(mode_)) {
[buffer_ didModifyRange:NSMakeRange(offset, source_range.length)];
}
Expand Down
2 changes: 1 addition & 1 deletion impeller/renderer/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace impeller {

constexpr size_t DefaultUniformAlignment() {
#if OS_IOS
#if FML_OS_IOS
return 16u;
#elif FML_OS_MACOSX
return 256u;
Expand Down

0 comments on commit c11f408

Please sign in to comment.