Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
impeller::PlaygroundImplGLES Class Referencefinal

#include <playground_impl_gles.h>

Inheritance diagram for impeller::PlaygroundImplGLES:
impeller::PlaygroundImpl

Classes

class  ReactorWorker
 
struct  ShareableContext
 

Public Member Functions

 PlaygroundImplGLES (PlaygroundSwitches switches)
 
 ~PlaygroundImplGLES ()
 
fml::Status SetCapabilities (const std::shared_ptr< Capabilities > &capabilities) override
 
- Public Member Functions inherited from impeller::PlaygroundImpl
virtual ~PlaygroundImpl ()
 
Vector2 GetContentScale () const
 
virtual Playground::VKProcAddressResolver CreateVKProcAddressResolver () const
 
virtual void SetGPUDisabled (bool disabled) const
 

Additional Inherited Members

- Public Types inherited from impeller::PlaygroundImpl
using WindowHandle = void *
 
- Static Public Member Functions inherited from impeller::PlaygroundImpl
static std::unique_ptr< PlaygroundImplCreate (PlaygroundBackend backend, PlaygroundSwitches switches)
 
- Protected Member Functions inherited from impeller::PlaygroundImpl
 PlaygroundImpl (PlaygroundSwitches switches)
 
- Protected Attributes inherited from impeller::PlaygroundImpl
const PlaygroundSwitches switches_
 

Detailed Description

Definition at line 16 of file playground_impl_gles.h.

Constructor & Destructor Documentation

◆ PlaygroundImplGLES()

impeller::PlaygroundImplGLES::PlaygroundImplGLES ( PlaygroundSwitches  switches)
explicit

Definition at line 122 of file playground_impl_gles.cc.

123 : PlaygroundImpl(switches),
124 handle_(nullptr, &DestroyWindowHandle),
125 use_angle_(switches.use_angle) {
126 if (use_angle_) {
127#if IMPELLER_PLAYGROUND_SUPPORTS_ANGLE
128 angle_glesv2_ = dlopen("libGLESv2.dylib", RTLD_LAZY);
129#endif
130 FML_CHECK(angle_glesv2_ != nullptr);
131 }
132
133 std::unique_ptr<PlaygroundImplGLES::ShareableContext>& shared_context =
134 GetShareableContext();
135 if (!shared_context) {
136 shared_context = MakeShareableContext(switches_);
137 if (!shared_context) {
138 FML_LOG(ERROR) << "Could not create GLES context.";
139 return;
140 }
141 }
142
143 context_ = shared_context->context;
144
145 auto window = CreateGLWindow(switches_, shared_context->window.get());
146 handle_.reset(window);
147
148 shared_context->context->GetGPUTracer()->Reset();
149}
PlaygroundImpl(PlaygroundSwitches switches)
const PlaygroundSwitches switches_
GLFWwindow * window
Definition main.cc:60
#define FML_LOG(severity)
Definition logging.h:101
#define FML_CHECK(condition)
Definition logging.h:104

References FML_CHECK, FML_LOG, impeller::PlaygroundImpl::switches_, and window.

◆ ~PlaygroundImplGLES()

impeller::PlaygroundImplGLES::~PlaygroundImplGLES ( )

Definition at line 267 of file playground_impl_gles.cc.

267 {
268 if (context_ && handle_) {
269 ::glfwMakeContextCurrent(handle_.get());
270 [[maybe_unused]] auto result = context_->FlushCommandBuffers();
271 }
272}

Member Function Documentation

◆ SetCapabilities()

fml::Status impeller::PlaygroundImplGLES::SetCapabilities ( const std::shared_ptr< Capabilities > &  capabilities)
overridevirtual

Implements impeller::PlaygroundImpl.

Definition at line 374 of file playground_impl_gles.cc.

375 {
376 return fml::Status(
378 "PlaygroundImplGLES doesn't support setting the capabilities.");
379}

References fml::kUnimplemented.


The documentation for this class was generated from the following files: