Flutter Engine
The Flutter Engine
MutableTextureStatePriv.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 skgpu_MutableTextureStatePriv_DEFINED
9#define skgpu_MutableTextureStatePriv_DEFINED
10
13
14namespace skgpu {
15enum class BackendApi : unsigned int;
16
18public:
20
21#if defined(SK_DEBUG)
22 virtual BackendApi type() const = 0;
23#endif
24protected:
27
29
30private:
31 friend class MutableTextureState;
32 virtual void copyTo(AnyStateData&) const = 0;
33};
34
36public:
37 template <typename StateData>
39 const StateData& data) {
41 }
42
44 return mts.fStateData.get();
45 }
46
48 SkASSERT(mts);
49 return mts->fStateData.get();
50 }
51
53 SkASSERT(mts);
54 return mts->fStateData.get();
55 }
56};
57} // namespace skgpu
58
59#endif
const char * backend
#define SkASSERT(cond)
Definition: SkAssert.h:116
GLenum type
const Base * get() const
Definition: SkAnySubclass.h:55
MutableTextureStateData(const MutableTextureStateData &)=default
virtual void copyTo(AnyStateData &) const =0
static const MutableTextureStateData * GetStateData(const MutableTextureState &mts)
static MutableTextureState MakeMutableTextureState(BackendApi backend, const StateData &data)
static MutableTextureStateData * GetStateData(MutableTextureState *mts)
static const MutableTextureStateData * GetStateData(const MutableTextureState *mts)
Definition: GpuTools.h:21
BackendApi
Definition: GpuTypes.h:22
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63