#include <surface.h>
Definition at line 18 of file surface.h.
◆ Surface() [1/2]
Definition at line 15 of file surface.cc.
16 : context_(
Ref(&context)), surface_(std::move(surface)) {
18 context_ && context_->IsValid() && surface_ && surface_->IsValid();
ScopedObject< Object > Ref(Object *object)
◆ ~Surface()
| impeller::interop::Surface::~Surface |
( |
| ) |
|
|
overridedefault |
◆ Surface() [2/2]
| impeller::interop::Surface::Surface |
( |
const Surface & |
| ) |
|
|
delete |
◆ DrawDisplayList()
| bool impeller::interop::Surface::DrawDisplayList |
( |
const DisplayList & |
dl | ) |
const |
Definition at line 52 of file surface.cc.
53 if (!
IsValid() || !dl.IsValid()) {
57 auto display_list = dl.GetDisplayList();
58 auto& content_context = context_->GetAiksContext().GetContentContext();
59 auto render_target = surface_->GetRenderTarget();
63 SkIRect::MakeWH(cull_rect.GetWidth(), cull_rect.GetHeight());
65 auto result =
RenderToTarget(content_context, render_target, display_list,
66 skia_cull_rect,
true);
67 context_->GetContext()->ResetThreadLocalState();
bool RenderToTarget(ContentContext &context, RenderTarget render_target, const sk_sp< flutter::DisplayList > &display_list, SkIRect cull_rect, bool reset_host_buffer, bool is_onscreen)
Render the provided display list to the render target.
constexpr static TRect MakeSize(const TSize< U > &size)
References impeller::interop::DisplayList::GetDisplayList(), impeller::interop::DisplayList::IsValid(), IsValid(), impeller::TRect< T >::MakeSize(), and impeller::RenderToTarget().
◆ IsValid()
| bool impeller::interop::Surface::IsValid |
( |
| ) |
const |
◆ operator=()
◆ WrapFBO()
Definition at line 23 of file surface.cc.
27 if (context.GetContext()->GetBackendType() !=
34 context.GetContext(), []() { return true; }, fbo, color_format, size);
35 if (!impeller_surface || !impeller_surface->IsValid()) {
40 auto surface = Create<Surface>(context, std::move(impeller_surface));
41 if (!surface->IsValid()) {
static std::unique_ptr< Surface > WrapFBO(const std::shared_ptr< Context > &context, SwapCallback swap_callback, GLuint fbo, PixelFormat color_format, ISize fbo_size)
References impeller::interop::Context::GetContext(), impeller::Context::kOpenGLES, VALIDATION_LOG, and impeller::SurfaceGLES::WrapFBO().
Referenced by impeller::interop::ImpellerSurfaceCreateWrappedFBONew().
The documentation for this class was generated from the following files: