forked from AuroraMiddleware/gtk
[broadway] Copy regions on last_surface during translations too
This will help make scrolling more efficient
This commit is contained in:
parent
60cf2d53eb
commit
f02b7c9ed2
@ -1120,21 +1120,11 @@ _gdk_broadway_window_queue_antiexpose (GdkWindow *window,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_window_translate (GdkWindow *window,
|
||||
static void
|
||||
copy_region (cairo_surface_t *surface,
|
||||
cairo_region_t *area,
|
||||
gint dx,
|
||||
gint dy)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkWindowImplBroadway *impl;
|
||||
cairo_surface_t *surface;
|
||||
|
||||
private = (GdkWindowObject *)window;
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (private->impl);
|
||||
|
||||
surface = GDK_DRAWABLE_IMPL_BROADWAY (impl)->surface;
|
||||
if (surface)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
@ -1158,6 +1148,28 @@ _gdk_broadway_window_translate (GdkWindow *window,
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_window_translate (GdkWindow *window,
|
||||
cairo_region_t *area,
|
||||
gint dx,
|
||||
gint dy)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkDrawableImplBroadway *impl;
|
||||
|
||||
private = (GdkWindowObject *)window;
|
||||
impl = GDK_DRAWABLE_IMPL_BROADWAY (private->impl);
|
||||
|
||||
if (impl->surface)
|
||||
{
|
||||
copy_region (impl->surface, area, dx, dy);
|
||||
if (GDK_WINDOW_IMPL_BROADWAY (impl)->last_synced)
|
||||
{
|
||||
copy_region (impl->last_surface, area, dx, dy);
|
||||
/* TODO: Send copy-rects */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user