Canvas & HTML5 3D CSS acceleration

84 views
Skip to first unread message

Shirish S

unread,
Jun 19, 2011, 11:29:36 PM6/19/11
to Chromium OS dev
Hello All,

I am working on the Chromium OS version 0.14.607.2011_06_07_1344 for ARM platform.

I am looking out for GPU based hardware acceleration for Canvas and 3D CSS based demos.

In my current setup where i am considering the below as benchmarking demos

http://www.kevs3d.co.uk/dev/asteroids/                                 For Canvas
http://www.chromeexperiments.com/shaunthesheep               For 3D CSS

My Observation so far is :-

  • I get the FPS counter(top left corner) only if i add the --force-compositing-mode flag else i dont get it for asteroids,but i get it for 3D CSS demos.
  • Even if i add the flag there is no major performance improvement.

i further did a code analysis to find that :

 In the file "chromium/src/third_party/WebKit/Source/WebCore/rendering/RenderLayerCompositor.cpp"  the function 
"bool RenderLayerCompositor::requiresCompositingForCanvas(RenderObject* renderer)" does not enter the loop 
"if (renderer->isCanvas())"
 hence i think this is the reason canvas is not accelerated.

 Please tell me if i am correct??

Also i find that whenever a canvas demo is played the control goes to isStyleChanged() code where as if any video is played in browser it goes to isContentChanged() code part.

From all the above observation i want to know the below queries:
  1. Is the Canvas/3D CSS GPU accelerated for my version of chromium OS , or is the development still going on??
  2. How is the Skia accelerated in case of 2D  which can be in turn used to accelerate canvas?? (my hardware has 2D acceleration  through X driver)

Any comments or suggestion w r t the above issues will be greatly helpful.

Thanks in advance,
-Shirish S

Shirish S

unread,
Jun 24, 2011, 1:13:44 AM6/24/11
to Chromium OS dev
Hello All,

I found 
// Enable hardware accelerated page drawing.
// Please note that this flag is honored only if chromium is compiled with
// SKIA_GPU flag, which can be enabled by setting use_skia_gpu variable to 1
// in build/features_override.gypi.
const char kEnableAcceleratedDrawing[]      = "enable-accelerated-drawing";
so i enabled the use_skia_gpu variable in the gypi file and compiled my browser and also added the flag of enable-accelerated-drawing in the session manager script.
This did not fetch anything ,the GPU process also is not used for rendering the Canvas demos.
But on analysing the code i found that the SKIA requires 
	        extensions->ensureEnabled("GL_EXT_texture_format_BGRA8888");
	        extensions->ensureEnabled("GL_EXT_read_format_bgra");
My doubt : 
Is it that SKIA can be GPU accelerated only through OpenGL backend or is it possible through GLES also as my gpu driver is OpenGLES based?
If no then is the work going one for supporting the GLES backend also for chromium.

Regards,
Shirish 
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages