Skip to content

Commit

Permalink
update for new wayfire transformer api
Browse files Browse the repository at this point in the history
  • Loading branch information
ammen99 committed Mar 24, 2024
1 parent e2e6c6e commit b1f7b20
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/keycolor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class keycolor_custom_data_t : public wf::custom_data_t
OpenGL::program_t program;
};

class simple_node_render_instance_t : public wf::scene::transformer_render_instance_t<node_t>
class simple_node_render_instance_t : public wf::scene::transformer_render_instance_t<transformer_base_node_t>
{
wf::signal::connection_t<node_damage_signal> on_node_damaged =
[=] (node_damage_signal *ev)
Expand All @@ -107,8 +107,8 @@ class simple_node_render_instance_t : public wf::scene::transformer_render_insta
wf::option_wrapper_t<double> threshold{"keycolor/threshold"};

public:
simple_node_render_instance_t(node_t *self, damage_callback push_damage,
wayfire_view view) : wf::scene::transformer_render_instance_t<node_t>(self,
simple_node_render_instance_t(transformer_base_node_t *self, damage_callback push_damage,
wayfire_view view) : wf::scene::transformer_render_instance_t<transformer_base_node_t>(self,
push_damage,
view->get_output())
{
Expand Down Expand Up @@ -176,7 +176,7 @@ class simple_node_render_instance_t : public wf::scene::transformer_render_insta
((wf::color_t)color).g,
((wf::color_t)color).b,
(double)opacity};
auto src_tex = wf::scene::transformer_render_instance_t<node_t>::get_texture(
auto src_tex = wf::scene::transformer_render_instance_t<transformer_base_node_t>::get_texture(
1.0);
data->program.use(src_tex.type);
data->program.uniform4f("color", color_data);
Expand Down
6 changes: 3 additions & 3 deletions src/obs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class wf_obs : public wf::scene::view_2d_transformer_t
std::unique_ptr<wf::animation::simple_animation_t> saturation;

public:
class simple_node_render_instance_t : public wf::scene::transformer_render_instance_t<node_t>
class simple_node_render_instance_t : public wf::scene::transformer_render_instance_t<wf_obs>
{
wf::signal::connection_t<node_damage_signal> on_node_damaged =
[=] (node_damage_signal *ev)
Expand All @@ -123,7 +123,7 @@ class wf_obs : public wf::scene::view_2d_transformer_t

public:
simple_node_render_instance_t(wf_obs *self, damage_callback push_damage,
wayfire_view view) : wf::scene::transformer_render_instance_t<node_t>(self,
wayfire_view view) : wf::scene::transformer_render_instance_t<wf_obs>(self,
push_damage,
view->get_output())
{
Expand Down Expand Up @@ -207,7 +207,7 @@ class wf_obs : public wf::scene::view_2d_transformer_t
OpenGL::render_begin(target);

/* Upload data to shader */
auto src_tex = wf::scene::transformer_render_instance_t<node_t>::get_texture(
auto src_tex = wf::scene::transformer_render_instance_t<wf_obs>::get_texture(
1.0);
this->self->program->use(src_tex.type);
this->self->program->uniform1f("opacity", this->self->get_opacity());
Expand Down
8 changes: 4 additions & 4 deletions src/window-zoom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static wf::pointf_t get_center(wf::geometry_t view)
};
}

class simple_node_render_instance_t : public transformer_render_instance_t<node_t>
class simple_node_render_instance_t : public transformer_render_instance_t<transformer_base_node_t>
{
wf::signal::connection_t<node_damage_signal> on_node_damaged =
[=] (node_damage_signal *ev)
Expand All @@ -65,10 +65,10 @@ class simple_node_render_instance_t : public transformer_render_instance_t<node_
wf::option_wrapper_t<bool> nearest_filtering{"winzoom/nearest_filtering"};

public:
simple_node_render_instance_t(node_t *self, damage_callback push_damage,
simple_node_render_instance_t(transformer_base_node_t *self, damage_callback push_damage,
wayfire_toplevel_view view, float *scale_x, float *scale_y,
wlr_box *transformed_view_geometry) :
transformer_render_instance_t<node_t>(self, push_damage,
transformer_render_instance_t<transformer_base_node_t>(self, push_damage,
view->get_output())
{
this->self = self;
Expand Down Expand Up @@ -122,7 +122,7 @@ class simple_node_render_instance_t : public transformer_render_instance_t<node_
void render(const wf::render_target_t& target,
const wf::region_t& region) override
{
auto src_tex = transformer_render_instance_t<node_t>::get_texture(1.0);
auto src_tex = transformer_render_instance_t<transformer_base_node_t>::get_texture(1.0);

OpenGL::render_begin(target);
GL_CALL(glBindTexture(GL_TEXTURE_2D, src_tex.tex_id));
Expand Down

0 comments on commit b1f7b20

Please sign in to comment.