Graphite: Add stubs for Gpu and Caps

Bug: skia:12466
Change-Id: I1267d3a387e74dc510ee4d00925049a4e7ac9edd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/452557
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
Jim Van Verth 2021-09-24 11:09:08 -04:00 committed by SkCQ
parent a25328177a
commit 1e90b88e45
5 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,15 @@
/*
* Copyright 2021 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "experimental/graphite/src/Caps.h"
namespace skgpu {
Caps::Caps() {
}
} // namespace skgpu

View File

@ -0,0 +1,27 @@
/*
* 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 skgpu_Caps_DEFINED
#define skgpu_Caps_DEFINED
#include "include/core/SkRefCnt.h"
namespace skgpu {
class Caps : public SkRefCnt {
public:
~Caps() override {}
protected:
Caps();
private:
};
} // namespace skgpu
#endif // skgpu_Caps_DEFINED

View File

@ -0,0 +1,20 @@
/*
* Copyright 2021 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "experimental/graphite/src/Gpu.h"
#include "experimental/graphite/src/Caps.h"
namespace skgpu {
Gpu::Gpu() {
}
Gpu::~Gpu() {
}
} // namespace skgpu

View File

@ -0,0 +1,36 @@
/*
* 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 skgpu_Gpu_DEFINED
#define skgpu_Gpu_DEFINED
#include "include/core/SkRefCnt.h"
namespace skgpu {
class Caps;
class Gpu : public SkRefCnt {
public:
~Gpu() override;
/**
* Gets the capabilities of the draw target.
*/
const Caps* caps() const { return fCaps.get(); }
sk_sp<const Caps> refCaps() const { return fCaps; }
protected:
Gpu();
private:
sk_sp<const Caps> fCaps;
};
} // namespace skgpu
#endif // skgpu_Gpu_DEFINED

View File

@ -13,10 +13,14 @@ skia_graphite_sources = [
"$_include/Context.h",
"$_include/SkStuff.h",
"$_src/BoundsManager.h",
"$_src/Caps.cpp",
"$_src/Caps.h",
"$_src/Context.cpp",
"$_src/Device.cpp",
"$_src/Device.h",
"$_src/DrawCommandList.h",
"$_src/Gpu.cpp",
"$_src/Gpu.h",
"$_src/Image_Graphite.cpp",
"$_src/Image_Graphite.h",
"$_src/SDCTask.cpp",