Removes remaining SetPlatform APIs from being exposed in native.

Bug: dawn:1374
Change-Id: I252c1e686d6ba31fbf81c6ea990e553222907d47
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132269
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Loko Kung 2023-05-17 18:25:28 +00:00 committed by Dawn LUCI CQ
parent 82db91ac96
commit 7511bf6334
3 changed files with 2 additions and 11 deletions

View File

@ -180,9 +180,6 @@ class DAWN_NATIVE_EXPORT Instance {
// Enable / disable the adapter blocklist.
void EnableAdapterBlocklist(bool enable);
// TODO(dawn:1374) Deprecate this once it is passed via the descriptor.
void SetPlatform(dawn::platform::Platform* platform);
uint64_t GetDeviceCountForTesting() const;
// Returns the underlying WGPUInstance object.

View File

@ -205,11 +205,6 @@ void Instance::EnableAdapterBlocklist(bool enable) {
mImpl->EnableAdapterBlocklist(enable);
}
// TODO(dawn:1374) Deprecate this once it is passed via the descriptor.
void Instance::SetPlatform(dawn::platform::Platform* platform) {
mImpl->SetPlatform(platform);
}
uint64_t Instance::GetDeviceCountForTesting() const {
return mImpl->GetDeviceCountForTesting();
}

View File

@ -99,9 +99,7 @@ class InstanceBase final : public RefCountedWithExternalCount {
void EnableAdapterBlocklist(bool enable);
bool IsAdapterBlocklistEnabled() const;
// TODO(dawn:1374): SetPlatform should become a private helper, and SetPlatformForTesting
// will become the NOT thread-safe testing version exposed for special testing cases.
void SetPlatform(dawn::platform::Platform* platform);
// Testing only API that is NOT thread-safe.
void SetPlatformForTesting(dawn::platform::Platform* platform);
dawn::platform::Platform* GetPlatform();
BlobCache* GetBlobCache(bool enabled = true);
@ -131,6 +129,7 @@ class InstanceBase final : public RefCountedWithExternalCount {
InstanceBase& operator=(const InstanceBase& other) = delete;
MaybeError Initialize(const InstanceDescriptor* descriptor);
void SetPlatform(dawn::platform::Platform* platform);
// Lazily creates connections to all backends that have been compiled.
void EnsureBackendConnection(wgpu::BackendType backendType);