You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
MediaCodec: make use of GtkGraphicsOffload when gtk >= 4.14
This replaces our custom subsurface implementation and has the advantages, that the subsurface gets repositioned automatically and it also supports underlay surfaces, so that the application can put control widgets on top of the SurfaceView. Our custom subsurface implementation will still be used for GL rendering
This commit is contained in:
@@ -40,6 +40,9 @@ static guint signals[LAST_SIGNAL] = { 0, };
|
||||
static void surface_view_widget_size_allocate(GtkWidget *widget, int width, int height, int baseline)
|
||||
{
|
||||
g_signal_emit(widget, signals[RESIZE], 0, width, height);
|
||||
for (GtkWidget *child = gtk_widget_get_first_child(widget); child; child = gtk_widget_get_next_sibling(child)) {
|
||||
gtk_widget_size_allocate(child, &(GtkAllocation){.x=0, .y=0, .width=width, .height=height}, baseline);
|
||||
}
|
||||
}
|
||||
|
||||
static void surface_view_widget_class_init(SurfaceViewWidgetClass *class)
|
||||
|
||||
Reference in New Issue
Block a user