| Flutter Impeller |

pipeline_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_PIPELINE_GLES_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_PIPELINE_GLES_H_
7
8 #include "impeller/base/backend_cast.h"
9 #include "impeller/renderer/backend/gles/buffer_bindings_gles.h"
10 #include "impeller/renderer/backend/gles/reactor_gles.h"
11 #include "impeller/renderer/backend/gles/unique_handle_gles.h"
12 #include "impeller/renderer/pipeline.h"
13
14 namespace impeller {
15
16 class PipelineLibraryGLES;
17
18 class PipelineGLES final
19 : public Pipeline<PipelineDescriptor>,
20 public BackendCast<PipelineGLES, Pipeline<PipelineDescriptor>> {
21 public:
22 // |Pipeline|
23 ~PipelineGLES() override;
24
25 const HandleGLES& GetProgramHandle() const;
26
27 const std::shared_ptr<UniqueHandleGLES> GetSharedHandle() const;
28
29 [[nodiscard]] bool BindProgram() const;
30
31 [[nodiscard]] bool UnbindProgram() const;
32
33 BufferBindingsGLES* GetBufferBindings() const;
34
35 [[nodiscard]] bool BuildVertexDescriptor(const ProcTableGLES& gl,
36 GLuint program);
37
38 private:
39 friend PipelineLibraryGLES;
40
41 std::shared_ptr<ReactorGLES> reactor_;
42 std::shared_ptr<UniqueHandleGLES> handle_;
43 std::unique_ptr<BufferBindingsGLES> buffer_bindings_;
44 bool is_valid_ = false;
45
46 // |Pipeline|
47 bool IsValid() const override;
48
49 PipelineGLES(std::shared_ptr<ReactorGLES> reactor,
50 std::weak_ptr<PipelineLibrary> library,
51 const PipelineDescriptor& desc,
52 std::shared_ptr<UniqueHandleGLES> handle);
53
54 PipelineGLES(const PipelineGLES&) = delete;
55
56 PipelineGLES& operator=(const PipelineGLES&) = delete;
57 };
58
59 } // namespace impeller
60
61 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_PIPELINE_GLES_H_
backend_cast.h
buffer_bindings_gles.h
impeller::BackendCast
Definition: backend_cast.h:11
impeller::BufferBindingsGLES
Sets up stage bindings for single draw call in the OpenGLES backend.
Definition: buffer_bindings_gles.h:28
impeller::HandleGLES
Represents a handle to an underlying OpenGL object. Unlike OpenGL object handles, these handles can b...
Definition: handle_gles.h:42
impeller::PipelineDescriptor
Definition: pipeline_descriptor.h:24
impeller::PipelineGLES
Definition: pipeline_gles.h:20
impeller::PipelineGLES::~PipelineGLES
~PipelineGLES() override
impeller::PipelineGLES::GetProgramHandle
const HandleGLES & GetProgramHandle() const
Definition: pipeline_gles.cc:30
impeller::PipelineGLES::GetSharedHandle
const std::shared_ptr< UniqueHandleGLES > GetSharedHandle() const
Definition: pipeline_gles.cc:34
impeller::PipelineGLES::GetBufferBindings
BufferBindingsGLES * GetBufferBindings() const
Definition: pipeline_gles.cc:38
impeller::PipelineGLES::UnbindProgram
bool UnbindProgram() const
Definition: pipeline_gles.cc:72
impeller::PipelineGLES::BindProgram
bool BindProgram() const
Definition: pipeline_gles.cc:60
impeller::PipelineGLES::BuildVertexDescriptor
bool BuildVertexDescriptor(const ProcTableGLES &gl, GLuint program)
Definition: pipeline_gles.cc:42
impeller::Pipeline
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
Definition: pipeline.h:53
impeller::PipelineLibraryGLES
Definition: pipeline_library_gles.h:25
impeller::ProcTableGLES
Definition: proc_table_gles.h:296
impeller
Definition: allocation.cc:12
pipeline.h
reactor_gles.h
unique_handle_gles.h