Flutter Impeller
unique_handle_gles.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_RENDERER_BACKEND_GLES_UNIQUE_HANDLE_GLES_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_UNIQUE_HANDLE_GLES_H_
7 
10 
11 namespace impeller {
12 
13 //------------------------------------------------------------------------------
14 /// @brief A unique handle to an OpenGL object. The collection of this
15 /// handle scheduled the destruction of the associated OpenGL object
16 /// in the reactor.
17 ///
19  public:
20  UniqueHandleGLES(std::shared_ptr<ReactorGLES> reactor, HandleType type);
21 
22  static UniqueHandleGLES MakeUntracked(std::shared_ptr<ReactorGLES> reactor,
24 
25  UniqueHandleGLES(std::shared_ptr<ReactorGLES> reactor, HandleGLES handle);
26 
28 
30 
32 
34 
35  const HandleGLES& Get() const;
36 
37  bool IsValid() const;
38 
39  private:
40  std::shared_ptr<ReactorGLES> reactor_ = nullptr;
42 };
43 
44 } // namespace impeller
45 
46 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_UNIQUE_HANDLE_GLES_H_
GLenum type
Represents a handle to an underlying OpenGL object. Unlike OpenGL object handles, these handles can b...
Definition: handle_gles.h:37
static HandleGLES DeadHandle()
Creates a dead handle.
Definition: handle_gles.h:44
A unique handle to an OpenGL object. The collection of this handle scheduled the destruction of the a...
static UniqueHandleGLES MakeUntracked(std::shared_ptr< ReactorGLES > reactor, HandleType type)
UniqueHandleGLES(std::shared_ptr< ReactorGLES > reactor, HandleType type)
UniqueHandleGLES & operator=(const UniqueHandleGLES &)=delete
const HandleGLES & Get() const
UniqueHandleGLES(const UniqueHandleGLES &)=delete