Skia usage in Chromium

734 views
Skip to first unread message

David Ventura

unread,
Mar 4, 2014, 4:37:02 AM3/4/14
to chromium...@chromium.org
Hello,

I know Chromium uses Skia to render certain parts of the application, though my understanding is that is varies by platform.  

I am using Skia for another project and employing it for rendering most of my UI (widgets, text, controls, etc.).  I was hoping to find some examples in Chromium of how Skia is used to render content, and the result (SkBitmap?) is cached and manipulated via the GPU backend (for example scrolling text or images as a user scrolls down a page) to prevent redrawing the SkCanvas contents for simple translations across the screen.  Does Chromium use Skia in this way, or is it just around the tool bar/static elements?  I tried reading the design docs and searching through the code, but it's a bit overwhelming so I'd appreciate some help to decide if I should continue studying Chromium's use of Skia or move on to something else.

Thanks for the help!
David

Stephen Chenney

unread,
Mar 4, 2014, 8:17:18 PM3/4/14
to ichiro....@gmail.com, Chromium-discuss
David,

Skia is used in the rendering pipeline for all Chromium content on all platforms. The code for rendering the web page content is in the Blink codebase, in combination with the cc (compositor) code. The UI code also uses Skia directly.

Chromium's use of Skia is complex due to the multi-threaded nature of Chromium and the fact that there are at least 3 different ways that Chromium gets content onto the screen depending on the platform and runtime flags. It is not a good case study if you are looking for basic usage in a single threaded application with a single rendering codepath.

Cheers,
Stephen.


--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss


Philip Rogers

unread,
Mar 4, 2014, 8:41:30 PM3/4/14
to Stephen Chenney, ichiro....@gmail.com, Chromium-discuss
David,

You may find chrome://tracing useful for understanding some of the details of how Chrome and Skia interact. See http://dev.chromium.org/developers/how-tos/trace-event-profiling-tool (the little presentation on this page goes over the high-level features).


To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

David Ventura

unread,
Mar 6, 2014, 8:11:31 AM3/6/14
to chromium...@chromium.org, ichiro....@gmail.com
Thanks Stephen for confirming this.

David Ventura

unread,
Mar 6, 2014, 8:12:14 AM3/6/14
to chromium...@chromium.org, Stephen Chenney, ichiro....@gmail.com, p...@chromium.org
Thanks for pointing this out Philip, I'll take a look.
Reply all
Reply to author
Forward
0 new messages