Account for updated macro name in //flutter/fml/build_config.h (flutter/engine#44)

This commit is contained in:
Chinmay Garde 2022-02-28 13:52:11 -08:00 committed by Dan Field
parent 34af9e57f1
commit 7cc6c2588a
5 changed files with 10 additions and 10 deletions

View File

@ -39,7 +39,7 @@ struct Matrix {
};
//----------------------------------------------------------------------------
/// Construts a default identity matrix.
/// Constructs a default identity matrix.
///
constexpr Matrix()
// clang-format off

View File

@ -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

View File

@ -32,7 +32,7 @@ bool AllocatorMTL::IsValid() const {
static MTLResourceOptions ToMTLResourceOptions(StorageMode type) {
switch (type) {
case StorageMode::kHostVisible:
#if OS_IOS
#if FML_OS_IOS
return MTLResourceStorageModeShared;
#else
return MTLResourceStorageModeManaged;
@ -40,7 +40,7 @@ static MTLResourceOptions ToMTLResourceOptions(StorageMode type) {
case StorageMode::kDevicePrivate:
return MTLResourceStorageModePrivate;
case StorageMode::kDeviceTransient:
#if OS_IOS
#if FML_OS_IOS
if (@available(iOS 10.0, *)) {
return MTLResourceStorageModeMemoryless;
} else {
@ -57,7 +57,7 @@ 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;
@ -65,7 +65,7 @@ static MTLStorageMode ToMTLStorageMode(StorageMode mode) {
case StorageMode::kDevicePrivate:
return MTLStorageModePrivate;
case StorageMode::kDeviceTransient:
#if OS_IOS
#if FML_OS_IOS
if (@available(iOS 10.0, *)) {
return MTLStorageModeMemoryless;
} else {

View File

@ -79,7 +79,7 @@ std::shared_ptr<Texture> DeviceBufferMTL::MakeTexture(TextureDescriptor desc,
// 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)];
}

View File

@ -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;