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 (const 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
 

Static Public Member Functions

static void OnTearDownTestEnvironment ()
 
- Static Public Member Functions inherited from impeller::PlaygroundImpl
static std::unique_ptr< PlaygroundImplCreate (PlaygroundBackend backend, PlaygroundSwitches switches)
 
static void OnTearDownTestEnvironment ()
 

Additional Inherited Members

- Public Types inherited from impeller::PlaygroundImpl
using WindowHandle = void *
 
- Protected Member Functions inherited from impeller::PlaygroundImpl
 PlaygroundImpl (const 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 ( const PlaygroundSwitches switches)
explicit

Definition at line 116 of file playground_impl_gles.cc.

117 : PlaygroundImpl(switches),
118 handle_(nullptr, &DestroyWindowHandle),
119 use_angle_(switches.use_angle) {
120 if (use_angle_) {
121#if IMPELLER_PLAYGROUND_SUPPORTS_ANGLE
122 angle_glesv2_ = dlopen("libGLESv2.dylib", RTLD_LAZY);
123#endif
124 FML_CHECK(angle_glesv2_ != nullptr);
125 }
126
127 std::unique_ptr<PlaygroundImplGLES::ShareableContext>& shared_context =
128 GetShareableContext();
129 if (!shared_context) {
130 shared_context = MakeShareableContext(switches_);
131 if (!shared_context) {
132 FML_LOG(ERROR) << "Could not create GLES context.";
133 return;
134 }
135 }
136
137 context_ = shared_context->context;
138
139 auto window = CreateGLWindow(switches_, shared_context->window.get());
140 handle_.reset(window);
141
142 shared_context->context->GetGPUTracer()->Reset();
143}
const PlaygroundSwitches switches_
PlaygroundImpl(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 259 of file playground_impl_gles.cc.

259 {
260 if (context_ && handle_) {
261 ::glfwMakeContextCurrent(handle_.get());
262 [[maybe_unused]] auto result = context_->FlushCommandBuffers();
263 }
264}

Member Function Documentation

◆ OnTearDownTestEnvironment()

void impeller::PlaygroundImplGLES::OnTearDownTestEnvironment ( )
static

Definition at line 101 of file playground_impl_gles.cc.

101 {
102 shared_context_msaa_.reset();
103 shared_context_sdf_.reset();
104}

Referenced by impeller::PlaygroundImpl::OnTearDownTestEnvironment().

◆ SetCapabilities()

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

Implements impeller::PlaygroundImpl.

Definition at line 366 of file playground_impl_gles.cc.

367 {
368 return fml::Status(
370 "PlaygroundImplGLES doesn't support setting the capabilities.");
371}

References fml::kUnimplemented.


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