Re: [g-a-devel] gnome-mag: zoom_region_scroll_smooth flickers



On Fri, 2006-03-31 at 16:03 -0300, Carlos Eduardo Rodrigues Diógenes
wrote:
> I thinks I realized what is happen. The problem is that the parts that are
> exposed aren't in the off-screen pixmap. So it will only be update after
> when zoom_region_scroll make the calls to zoom_region_queue_update.

I was thinking how this can be resolved, but I want to hear some other
opinions.

Today, zoom_region_update receives an source area to be update in the
magnified screen. This area is clipped to the actual bounds that the
magnified screen is representing, so this image is captured, scaled and
saved in a off-screen pixmap and then updated in the magnified screen.

My idea is split the zoom_region_update code, so we create a new
function called zoom_region_update_pixmap that will receive a
source_area to update and do the work to capture, scale and save this
image in the off-screen pixmap. Now, zoom_region_update will depend on
this function to do his work.

Other aspect that is affected is the zoom_region_scroll. I think that if
we cannot scroll we really must queue an update, but in the else we must
avoid these queues, so the zoom_region_scroll_smooth code can call the
zoom_region_update_pixmap in the areas that was exposed before the
expose_handler, that will use these informations actualized in the
pixmaps to update the magnifier screen. This way we avoid the flicks.

Other approach that I think was create a flag in zoom_region_update, so
when we are making an scroll we can set this, so zoom_region_update does
not double buffer the update and updates it's results in the buffer
created by zoom_region_update (in this case we must remove the calls to
queue updates when we can scroll and put after the
gdk_window_invalidate_rect calls to zoom_region_update) and when
gdk_window_end_paint the enterily magnified screen is updated in a shot,
then we turn off the double buffer flag.

I think that the first one is more clarity and simple.

Other thing, how relevant is these scroll policies? I have already asked
it, but without any response. The code in zoom_region_scroll_smooth
works better, so why not make this the only one?

Thanks.
-- 
Carlos Eduardo Rodrigues Diógenes




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]