|
|
|
|
|
|
|
|
|
|
void UIWidgetsPanel::OnRenderTexture(void* native_texture_ptr, size_t width, |
|
|
|
size_t height, float device_pixel_ratio) { |
|
|
|
fml::AutoResetWaitableEvent latch; |
|
|
|
[this, native_texture_ptr]() -> void { |
|
|
|
[&latch, this, native_texture_ptr]() -> void { |
|
|
|
surface_manager_->MakeCurrent(EGL_NO_DISPLAY); |
|
|
|
|
|
|
|
if (fbo_) { |
|
|
|
|
|
|
fbo_ = surface_manager_->CreateRenderSurface(native_texture_ptr); |
|
|
|
|
|
|
|
surface_manager_->ClearCurrent(); |
|
|
|
latch.Signal(); |
|
|
|
latch.Wait(); |
|
|
|
|
|
|
|
ViewportMetrics metrics; |
|
|
|
metrics.physical_width = static_cast<float>(width); |
|
|
|