Rename Buffer::IsMapWritable to Buffer::IsMappableAtCreation

Renaming method to better reflect the actual usage.

Bug: none
Change-Id: I3fcdeffaa06fceae9d5818f79c3b7985fb1885ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24701
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Enrico Galli
2020-07-12 16:16:01 +00:00
committed by Commit Bot service account
parent eafdef3818
commit b9285f69ba
12 changed files with 15 additions and 15 deletions

View File

@@ -280,7 +280,7 @@ namespace dawn_native { namespace null {
ToBackend(GetDevice())->DecrementMemoryUsage(GetSize());
}
bool Buffer::IsMapWritable() const {
bool Buffer::IsMappableAtCreation() const {
// Only return true for mappable buffers so we can test cases that need / don't need a
// staging buffer.
return (GetUsage() & (wgpu::BufferUsage::MapRead | wgpu::BufferUsage::MapWrite)) != 0;

View File

@@ -204,7 +204,7 @@ namespace dawn_native { namespace null {
void UnmapImpl() override;
void DestroyImpl() override;
bool IsMapWritable() const override;
bool IsMappableAtCreation() const override;
MaybeError MapAtCreationImpl() override;
void* GetMappedPointerImpl() override;