gtk4: Do scaling with append_texture()

This is equivalent, but will be needed for the scaling filter support.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1309>
This commit is contained in:
Ivan Molodetskikh 2023-08-22 10:20:22 +04:00 committed by Sebastian Dröge
parent 92891a61e8
commit 3423d05f77

View file

@ -177,7 +177,6 @@ impl PaintableImpl for Paintable {
);
snapshot.translate(&graphene::Point::new(trans_x as f32, trans_y as f32));
snapshot.scale(scale_x as f32, scale_y as f32);
for Texture {
texture,
@ -191,7 +190,9 @@ impl PaintableImpl for Paintable {
{
snapshot.push_opacity(*global_alpha as f64);
let bounds = graphene::Rect::new(*x, *y, *paintable_width, *paintable_height);
let texture_width = *paintable_width * scale_x as f32;
let texture_height = *paintable_height * scale_y as f32;
let bounds = graphene::Rect::new(*x, *y, texture_width, texture_height);
// Only premultiply GL textures that expect to be in premultiplied RGBA format.
//