Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
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
13
14namespace impeller {
15
16class PipelineLibraryGLES;
17
18namespace testing {
19class RenderPassGLESCommandTest;
20} // namespace testing
21
22class PipelineGLES final
23 : public Pipeline<PipelineDescriptor>,
24 public BackendCast<PipelineGLES, Pipeline<PipelineDescriptor>> {
25 public:
26 // |Pipeline|
27 ~PipelineGLES() override;
28
29 const HandleGLES& GetProgramHandle() const;
30
31 const std::shared_ptr<UniqueHandleGLES> GetSharedHandle() const;
32
33 [[nodiscard]] bool BindProgram() const;
34
35 [[nodiscard]] bool UnbindProgram() const;
36
38
39 [[nodiscard]] bool BuildVertexDescriptor(const ProcTableGLES& gl,
40 GLuint program);
41
42 // GL location of the `_impeller_y_flip` uniform (flutter/flutter#186554),
43 // cached at link time. -1 if the shader doesn't declare it.
44 GLint GetYFlipUniformLocation() const { return y_flip_uniform_location_; }
45
46 private:
49
50 std::shared_ptr<ReactorGLES> reactor_;
51 std::shared_ptr<UniqueHandleGLES> handle_;
52 std::unique_ptr<BufferBindingsGLES> buffer_bindings_;
53 GLint y_flip_uniform_location_ = -1;
54 bool is_valid_ = false;
55
56 // |Pipeline|
57 bool IsValid() const override;
58
59 PipelineGLES(std::shared_ptr<ReactorGLES> reactor,
60 std::weak_ptr<PipelineLibrary> library,
61 const PipelineDescriptor& desc,
62 std::shared_ptr<UniqueHandleGLES> handle);
63
64 PipelineGLES(const PipelineGLES&) = delete;
65
66 PipelineGLES& operator=(const PipelineGLES&) = delete;
67};
68
69} // namespace impeller
70
71#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_PIPELINE_GLES_H_
Sets up stage bindings for single draw call in the OpenGLES backend.
Represents a handle to an underlying OpenGL object. Unlike OpenGL object handles, these handles can b...
Definition handle_gles.h:42
GLint GetYFlipUniformLocation() const
const HandleGLES & GetProgramHandle() const
const std::shared_ptr< UniqueHandleGLES > GetSharedHandle() const
BufferBindingsGLES * GetBufferBindings() const
bool BuildVertexDescriptor(const ProcTableGLES &gl, GLuint program)
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
Definition pipeline.h:53
fuchsia::ui::composition::ParentViewportWatcherHandle handle_
std::shared_ptr< ReactorGLES > reactor