15 const std::shared_ptr<Context>& context,
20 TRACE_EVENT0(
"impeller",
"SurfaceGLES::WrapOnScreenFBO");
22 if (context ==
nullptr || !context->IsValid() || !swap_callback) {
30 color0_tex.
format = color_format;
31 color0_tex.
size = fbo_size;
45 depth_stencil_texture_desc.
format = color_format;
46 depth_stencil_texture_desc.
size = fbo_size;
50 auto depth_stencil_tex =
52 depth_stencil_texture_desc
57 depth0.
texture = depth_stencil_tex;
63 stencil0.
texture = depth_stencil_tex;
74 gl_context.GetGPUTracer()->RecordRasterThread();
78 return std::unique_ptr<SurfaceGLES>(
79 new SurfaceGLES(std::move(swap_callback), render_target_desc));
static std::shared_ptr< TextureGLES > WrapFBO(std::shared_ptr< ReactorGLES > reactor, TextureDescriptor desc, GLuint fbo)
Create a texture by wrapping an external framebuffer object whose lifecycle is owned by the caller.
static std::shared_ptr< TextureGLES > CreatePlaceholder(std::shared_ptr< ReactorGLES > reactor, TextureDescriptor desc)
Create a "texture" that is never expected to be bound/unbound explicitly or initialized in any way....
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...