[graphite] Add ResourceProvider to Gpu
Bug: skia:12466 Change-Id: I1224ad193bb9d866439673161075e29adedc0008 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456475 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
daa3c703b0
commit
1190301c3d
@ -30,10 +30,10 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
Gpu(sk_sp<const Caps>);
|
Gpu(sk_sp<const Caps>);
|
||||||
|
|
||||||
|
std::unique_ptr<ResourceProvider> fResourceProvider;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
sk_sp<const Caps> fCaps;
|
sk_sp<const Caps> fCaps;
|
||||||
|
|
||||||
std::unique_ptr<ResourceProvider> fResourceProvider;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace skgpu
|
} // namespace skgpu
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "experimental/graphite/src/mtl/MtlGpu.h"
|
#include "experimental/graphite/src/mtl/MtlGpu.h"
|
||||||
|
|
||||||
#include "experimental/graphite/src/Caps.h"
|
#include "experimental/graphite/src/Caps.h"
|
||||||
|
#include "experimental/graphite/src/mtl/MtlResourceProvider.h"
|
||||||
|
|
||||||
namespace skgpu::mtl {
|
namespace skgpu::mtl {
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ Gpu::Gpu(sk_cfp<id<MTLDevice>> device, sk_cfp<id<MTLCommandQueue>> queue, sk_sp<
|
|||||||
: skgpu::Gpu(std::move(caps))
|
: skgpu::Gpu(std::move(caps))
|
||||||
, fDevice(std::move(device))
|
, fDevice(std::move(device))
|
||||||
, fQueue(std::move(queue)) {
|
, fQueue(std::move(queue)) {
|
||||||
|
fResourceProvider.reset(new ResourceProvider(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
Gpu::~Gpu() {
|
Gpu::~Gpu() {
|
||||||
|
Loading…
Reference in New Issue
Block a user