Flutter Engine
The Flutter Engine
MutableTextureState.cpp
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 */
8
11
12namespace skgpu {
13
15 fBackend(BackendApi::kUnsupported),
16 fIsValid(false) {}
18
20 this->set(that);
21}
22
24 if (this != &that) {
25 this->set(that);
26 }
27 return *this;
28}
29
31 SkASSERT(!fIsValid || this->fBackend == that.fBackend);
32 fIsValid = that.fIsValid;
33 fBackend = that.fBackend;
34 if (!fIsValid) {
35 return;
36 }
37 fStateData.reset();
38 switch (fBackend) {
40 that.fStateData->copyTo(fStateData);
41 break;
42 default:
43 SK_ABORT("Unknown BackendApi");
44 }
45}
46
48
49} // namespace skgpu
#define SK_ABORT(message,...)
Definition: SkAssert.h:70
#define SkASSERT(cond)
Definition: SkAssert.h:116
MutableTextureState & operator=(const MutableTextureState &that)
void set(const MutableTextureState &that)
Definition: GpuTools.h:21
BackendApi
Definition: GpuTypes.h:22