42f710f3fa
This is a reland of commit ae5e846047
Original change's description:
> [graphite] Move Graphite into Skia base directories.
>
> Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Ia575fd49206ad0b665a6a9153317e738bb321446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529059
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
40 lines
1015 B
C++
40 lines
1015 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 skgpu_graphite_Recording_DEFINED
|
|
#define skgpu_graphite_Recording_DEFINED
|
|
|
|
#include "include/core/SkRefCnt.h"
|
|
|
|
class SkTextureDataBlock;
|
|
|
|
namespace skgpu::graphite {
|
|
|
|
class CommandBuffer;
|
|
template<typename StorageT, typename BaseT> class PipelineDataCache;
|
|
using TextureDataCache = PipelineDataCache<std::unique_ptr<SkTextureDataBlock>, SkTextureDataBlock>;
|
|
|
|
class Recording final {
|
|
public:
|
|
~Recording();
|
|
|
|
protected:
|
|
private:
|
|
friend class Context; // for access fCommandBuffer
|
|
friend class Recorder; // for ctor
|
|
Recording(sk_sp<CommandBuffer>, std::unique_ptr<TextureDataCache>);
|
|
|
|
sk_sp<CommandBuffer> fCommandBuffer;
|
|
|
|
// The TextureDataCache holds all the Textures and Samplers used in this Recording.
|
|
std::unique_ptr<TextureDataCache> fTextureDataCache;
|
|
};
|
|
|
|
} // namespace skgpu::graphite
|
|
|
|
#endif // skgpu_graphite_Recording_DEFINED
|