985741a554
First draft of (mostly stubbed-out) GrDawnGpu. Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget. First draft of DawnTestContext. First draft of psuedo-fences for Dawn, implemented with MapReadAsync. Change-Id: I443f3370522639e82f2fa0eebe6b206c372f13a4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228137 Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Brian Salomon <bsalomon@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 dawn::Device& getDevice() {
|
|
return fDevice;
|
|
}
|
|
|
|
protected:
|
|
DawnTestContext(const dawn::Device& device) : fDevice(device) {}
|
|
|
|
dawn::Device fDevice;
|
|
|
|
private:
|
|
typedef TestContext INHERITED;
|
|
};
|
|
|
|
/**
|
|
* Creates Dawn context object bound to the Dawn library.
|
|
*/
|
|
DawnTestContext* CreatePlatformDawnTestContext(DawnTestContext*);
|
|
|
|
} // namespace sk_gpu_test
|
|
|
|
#endif
|
|
|
|
#endif
|