9a7acd43c4
Bug: skia:12794 Change-Id: I445144f25e9573d0d9ec55d12c3a9d372772c3bd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503348 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
41 lines
989 B
C++
41 lines
989 B
C++
/*
|
|
* Copyright 2021 Google LLC
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef skiatest_graphite_GraphiteTestContext_DEFINED
|
|
#define skiatest_graphite_GraphiteTestContext_DEFINED
|
|
|
|
#include "experimental/graphite/include/GraphiteTypes.h"
|
|
#include "include/core/SkRefCnt.h"
|
|
|
|
namespace skgpu { class Context; }
|
|
|
|
namespace skiatest::graphite {
|
|
|
|
/**
|
|
* 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 std::unique_ptr<skgpu::Context> makeContext() = 0;
|
|
|
|
protected:
|
|
GraphiteTestContext();
|
|
};
|
|
|
|
|
|
} // namespace skiatest::graphite
|
|
|
|
#endif // skiatest_graphite_GraphiteTestContext_DEFINED
|