mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Account for updated macro name in //flutter/fml/build_config.h (flutter/engine#44)
This commit is contained in:
parent
34af9e57f1
commit
7cc6c2588a
@ -39,7 +39,7 @@ struct Matrix {
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
/// Construts a default identity matrix.
|
||||
/// Constructs a default identity matrix.
|
||||
///
|
||||
constexpr Matrix()
|
||||
// clang-format off
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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)];
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user