MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / clear

Method clear

src/render.cpp:468–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468void wf::render_pass_t::clear(const wf::region_t& region, const wf::color_t& color)
469{
470 auto box = wf::construct_box({0, 0}, params.target.get_size());
471 auto damage = params.target.framebuffer_region_from_geometry_region(region);
472
473 wlr_render_rect_options opts;
474 opts.blend_mode = WLR_RENDER_BLEND_MODE_NONE;
475 opts.box = box;
476 opts.clip = damage.to_pixman();
477 opts.color = {
478 .r = static_cast<float>(color.r),
479 .g = static_cast<float>(color.g),
480 .b = static_cast<float>(color.b),
481 .a = static_cast<float>(color.a),
482 };
483
484 wlr_render_pass_add_rect(pass, &opts);
485}
486
487void wf::render_pass_t::add_texture(const wf::texture_t& texture, const wf::render_target_t& adjusted_target,
488 const wlr_fbox& geometry, const wf::region_t& damage, float alpha)

Callers

nothing calls this directly

Calls 3

to_pixmanMethod · 0.80
get_sizeMethod · 0.45

Tested by

no test coverage detected