blob: 74d9e1d4bc8121c07a564e9012e4da645499817d [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "impeller/renderer/allocator.h"
namespace impeller {
Allocator::Allocator() = default;
Allocator::~Allocator() = default;
bool Allocator::RequiresExplicitHostSynchronization(StorageMode mode) {
if (mode != StorageMode::kHostVisible) {
return false;
}
#if FML_OS_IOS
// StorageMode::kHostVisible is MTLStorageModeShared already.
return false;
#else // FML_OS_IOS
// StorageMode::kHostVisible is MTLResourceStorageModeManaged.
return true;
#endif // FML_OS_IOS
}
} // namespace impeller