Fade effect when switching tabs

764 views
Skip to first unread message

Ben Rockefeller

unread,
Jan 1, 2011, 3:32:35 PM1/1/11
to Chromium-dev
Greetings,

I am working with Linux-gtk Chromium and trying to make a change which
would create a fade effect while transitioning from one tab to
another. Currently, webkit paints a white background before loading a
new page and rendering it. Instead of this white background, I want to
create a fade out of the previous tab content image before the now
current tab page is rendered.

Note I dont want to do this in Javascript. The point of the effort is
to make tab transitions on slower embedded systems smoother to the
user. I have looked at cairo alpha APIs but I am not currently sure
where the change should be in chromium sources. Any pointers on what
is the best way to go about this? Much appreciated.

Thanks!

Brett Wilson

unread,
Jan 1, 2011, 3:53:28 PM1/1/11
to benrock...@gmail.com, Chromium-dev

Painting to the screen happens in
chrome/browser/renderer_host/backing_store and
render_widget_host_view_*

Your change will be challenging because this code has no knowledge of
page transitions and such. Even if it did, it will be difficult to
come up with a good definition of "page transition" to key off of.
Most knowledge of the pages is in
browser/tab_contents/navigation_controller.h

Brett

Scott Violet

unread,
Jan 4, 2011, 12:23:04 PM1/4/11
to benrock...@gmail.com, Chromium-dev
On Sat, Jan 1, 2011 at 12:32 PM, Ben Rockefeller
<benrock...@gmail.com> wrote:

Take a look at TabContents::FadeForInstant. It fades out the
background. You might be able to use something like this to get the
effect you're after.

-Scott

Reply all
Reply to author
Forward
0 new messages