How chromium perform the 3D frame drawing

318 views
Skip to first unread message

Rahul Patel

unread,
May 17, 2024, 3:41:54 PMMay 17
to Graphics-dev
Hello,

I am trying to understand how chromium perform the frame drawing (not the swap/present) for linux perform today. Could someone please help on the following?
  1. My understanding is chromium perform the frame drawing on buffer wherein swapping happen on the surface interface? is it true if so then could you please share the code link for the reference, also where does chromium create this buffer and does it use platform specific gl_buffer or a default one?
    1. I think it uses platform one specific: https://source.chromium.org/chromium/chromium/src/+/main:components/viz/service/display_embedder/skia_output_device_gl.cc;l=109 
  2. Does drawing happen in compositor thread or on GPU thread , or both.  based on the below code reference it looks like drawing happen in both compositor and GPU thread. Can you please confirm ?
    1. BegingFrameDrawing: https://source.chromium.org/chromium/chromium/src/+/main:components/viz/service/display/direct_renderer.cc;l=260 
    2. FinishFrameDrawing: https://source.chromium.org/chromium/chromium/src/+/main:components/viz/service/display/direct_renderer.cc;l=418 
    3. https://source.chromium.org/chromium/chromium/src/+/main:components/viz/service/display/direct_renderer.cc;l=710

Thanks,
 Rahul

Rahul Patel

unread,
May 21, 2024, 12:34:22 AMMay 21
to Graphics-dev
I think i found it, this is where chromium perform the draw operation https://source.chromium.org/chromium/chromium/src/+/main:components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc;l=529

Could someone please confirm? 

Thanks,
 Rahul

To unsubscribe from this group and stop receiving emails from it, send an email to graphics-dev...@chromium.org.
Reply all
Reply to author
Forward
0 new messages