Flutter Engine
 
Loading...
Searching...
No Matches
texture.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_TOOLKIT_GLES_TEXTURE_H_
6#define FLUTTER_IMPELLER_TOOLKIT_GLES_TEXTURE_H_
7
10
11namespace impeller {
12
13// Simple holder of an GLTexture and the owning EGLDisplay.
14struct GLTexture {
16
17 constexpr bool operator==(const GLTexture& other) const = default;
18};
19
21 static GLTexture InvalidValue() { return {0}; }
22
23 static bool IsValid(const GLTexture& value) {
24 return value != InvalidValue();
25 }
26
27 static void Free(GLTexture image) {
28 glDeleteTextures(1, &image.texture_name);
29 }
30};
31
33
34} // namespace impeller
35
36#endif // FLUTTER_IMPELLER_TOOLKIT_GLES_TEXTURE_H_
int32_t value
FlutterVulkanImage * image
constexpr bool operator==(const GLTexture &other) const =default
GLuint texture_name
Definition texture.h:15
static void Free(GLTexture image)
Definition texture.h:27
static GLTexture InvalidValue()
Definition texture.h:21
static bool IsValid(const GLTexture &value)
Definition texture.h:23