Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrPersistentCacheUtils.h
Go to the documentation of this file.
1/*
2 * Copyright 2019 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef GrPersistentCacheEntry_DEFINED
9#define GrPersistentCacheEntry_DEFINED
10
11#include "include/core/SkData.h"
15
16#include <string>
17
18class SkReadBuffer;
19namespace SkSL { struct ProgramSettings; }
20
21// The GrPersistentCache stores opaque blobs, as far as clients are concerned. It's helpful to
22// inspect certain kinds of cached data within our tools, so for those cases (GLSL, SPIR-V), we
23// put the serialization logic here, to be shared by the backend code and the tool code.
24namespace GrPersistentCacheUtils {
25
32
34
36 const std::string shaders[],
38 int numInterfaces,
39 const ShaderMetadata* meta = nullptr);
40
42
44 std::string shaders[],
46 int numInterfaces,
47 ShaderMetadata* meta = nullptr);
48
49} // namespace GrPersistentCacheUtils
50
51#endif
uint32_t SkFourByteTag
Definition SkTypes.h:166
sk_sp< SkData > PackCachedShaders(SkFourByteTag shaderType, const std::string shaders[], const SkSL::Program::Interface interfaces[], int numInterfaces, const ShaderMetadata *meta)
bool UnpackCachedShaders(SkReadBuffer *reader, std::string shaders[], SkSL::Program::Interface interfaces[], int numInterfaces, ShaderMetadata *meta)
SkFourByteTag GetType(SkReadBuffer *reader)
skia_private::TArray< std::string > fAttributeNames