3cc8d4fb7f
The new webgpu_cpp.h hotness for native apps brings with it a new namespace: wgpu. This is a straight substitution. Note: no Skia API changes. Change-Id: I12b26417e76838cd8fa2b39b8161cbaa2cd8fa78 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251660 Commit-Queue: Stephen White <senorblanco@chromium.org> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
43 lines
815 B
C++
43 lines
815 B
C++
/*
|
|
* Copyright 2019 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef DawnTestContext_DEFINED
|
|
#define DawnTestContext_DEFINED
|
|
|
|
#include "tools/gpu/TestContext.h"
|
|
|
|
#ifdef SK_DAWN
|
|
|
|
namespace sk_gpu_test {
|
|
class DawnTestContext : public TestContext {
|
|
public:
|
|
virtual GrBackend backend() override { return GrBackendApi::kDawn; }
|
|
|
|
const wgpu::Device& getDevice() {
|
|
return fDevice;
|
|
}
|
|
|
|
protected:
|
|
DawnTestContext(const wgpu::Device& device) : fDevice(device) {}
|
|
|
|
wgpu::Device fDevice;
|
|
|
|
private:
|
|
typedef TestContext INHERITED;
|
|
};
|
|
|
|
/**
|
|
* Creates Dawn context object bound to the Dawn library.
|
|
*/
|
|
DawnTestContext* CreatePlatformDawnTestContext(DawnTestContext*);
|
|
|
|
} // namespace sk_gpu_test
|
|
|
|
#endif
|
|
|
|
#endif
|