Flutter Engine
The Flutter Engine
SkImage_RasterPinnable.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 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 SkImage_RasterPinnable_DEFINED
9#define SkImage_RasterPinnable_DEFINED
10
16
17#include <cstdint>
18#include <memory>
19#include <tuple>
20
22class SkBitmap;
23enum class GrImageTexGenPolicy : int;
24
25namespace skgpu {
26enum class Mipmapped : bool;
27}
28
29struct PinnedData {
31 int32_t fPinnedCount = 0;
35};
36
38public:
40 : SkImage_Raster(bm, /*bitmapMayBeMutable = */ true) {}
41
42 std::tuple<GrSurfaceProxyView, GrColorType> asView(GrRecordingContext*,
45
47
48 std::unique_ptr<PinnedData> fPinnedData;
49};
50
51#endif
GrColorType
Definition: GrTypesPriv.h:540
GrImageTexGenPolicy
Definition: SkGr.h:141
static constexpr uint32_t SK_InvalidUniqueID
Definition: SkTypes.h:196
std::tuple< GrSurfaceProxyView, GrColorType > asView(GrRecordingContext *, skgpu::Mipmapped, GrImageTexGenPolicy) const
std::unique_ptr< PinnedData > fPinnedData
SkImage_Base::Type type() const override
SkImage_RasterPinnable(const SkBitmap &bm)
Definition: GpuTools.h:21
Mipmapped
Definition: GpuTypes.h:53
GrColorType fPinnedColorType
uint32_t fPinnedUniqueID
GrSurfaceProxyView fPinnedView
uint32_t fPinnedContextID