2021-09-29 18:29:32 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2021 Google LLC
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
2021-10-11 15:28:21 +00:00
|
|
|
#ifndef skiatest_graphite_GraphiteTestContext_DEFINED
|
|
|
|
#define skiatest_graphite_GraphiteTestContext_DEFINED
|
2021-09-29 18:29:32 +00:00
|
|
|
|
|
|
|
#include "experimental/graphite/include/GraphiteTypes.h"
|
|
|
|
#include "include/core/SkRefCnt.h"
|
|
|
|
|
|
|
|
namespace skgpu { class Context; }
|
|
|
|
|
2021-10-11 15:28:21 +00:00
|
|
|
namespace skiatest::graphite {
|
2021-09-29 18:29:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* An offscreen 3D context. This class is intended for Skia's internal testing needs and not
|
|
|
|
* for general use.
|
|
|
|
*/
|
|
|
|
class GraphiteTestContext {
|
|
|
|
public:
|
|
|
|
GraphiteTestContext(const GraphiteTestContext&) = delete;
|
|
|
|
GraphiteTestContext& operator=(const GraphiteTestContext&) = delete;
|
|
|
|
|
|
|
|
virtual ~GraphiteTestContext();
|
|
|
|
|
|
|
|
virtual skgpu::BackendApi backend() = 0;
|
|
|
|
|
|
|
|
virtual sk_sp<skgpu::Context> makeContext() = 0;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
GraphiteTestContext();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-10-11 15:28:21 +00:00
|
|
|
} // namespace skiatest::graphite
|
2021-09-29 18:29:32 +00:00
|
|
|
|
2021-10-11 15:28:21 +00:00
|
|
|
#endif // skiatest_graphite_GraphiteTestContext_DEFINED
|