Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkYUVPlanesCache.h
Go to the documentation of this file.
1/*
2 * Copyright 2015 Google Inc.
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 SkYUVPlanesCache_DEFINED
9#define SkYUVPlanesCache_DEFINED
10
12
13#include <cstdint>
14
15class SkCachedData;
16class SkResourceCache;
17class SkYUVAPixmaps;
18
20public:
21 /**
22 * On success, return a ref to the SkCachedData that holds the pixel data. The SkYUVAPixmaps
23 * contains a description of the YUVA data and has a SkPixmap for each plane that points
24 * into the SkCachedData.
25 *
26 * On failure, return nullptr.
27 */
28 static SkCachedData* FindAndRef(uint32_t genID,
29 SkYUVAPixmaps* pixmaps,
30 SkResourceCache* localCache = nullptr);
31
32 /**
33 * Add a pixelRef ID and its YUV planes data to the cache. The SkYUVAPixmaps should contain
34 * SkPixmaps that store their pixel data in the SkCachedData.
35 */
36 static void Add(uint32_t genID, SkCachedData* data, const SkYUVAPixmaps& pixmaps,
37 SkResourceCache* localCache = nullptr);
38};
39
40#endif
static void Add(uint32_t genID, SkCachedData *data, const SkYUVAPixmaps &pixmaps, SkResourceCache *localCache=nullptr)
static SkCachedData * FindAndRef(uint32_t genID, SkYUVAPixmaps *pixmaps, SkResourceCache *localCache=nullptr)