crosswalk-project/crosswalk — pull request #1207 by ds-hwang (2013-11-28 15:38:59+00:00)
Title: [Tizen][Performance] Enable Accelerated 2D Canvas.

If GPU context can be lost, Accelerated 2D Canvas is disabled, because there is
no way to recover Accelerated 2D Canvas when GPU crashes. Currently, only EGL
backend marks GPUInfo::can_lose_context true (means Accelerated 2D Canvas cannot
be enabled). However, interestingly, Android and ChromeOS mark it false to take
advantage of Accelerated 2D Canvas without fallback solution. They just take a
risk.

So Tizen also takes a risk like Android and ChromeOS. It is worth to do it
because performance improvement is very significant (2~3 times).

HOW:
CollectContextGraphicsInfo(GPUInfo* gpu_info) in gpu_info_collector_x11.cc is
the right place to mark GPUInfo::can_lose_context false as ChromeOS does.
However, this PR add small hack into Crosswalk code because this hack can make
us not change chromium-crosswalk. XWalkContentClient::SetGpuInfo() is originally
intended to only read gpu info, not write.

Measurement data:
1. http://www.craftymind.com/factory/guimark3/vector/GM3_JS_Vector.html
Software Canvas : 14.91 FPS
Accelerated 2D Canvas : 44.82 FPS
2. http://www.craftymind.com/factory/guimark3/bitmap/GM3_JS_Bitmap.html
Software Canvas : 17.16 FPS
Accelerated 2D Canvas : 54.58 FPS
3. http://www.craftymind.com/factory/guimark3/compute/GM3_JS_Compute.html
Software Canvas : 19.36 FPS
Accelerated 2D Canvas : 39.18 FPS

BUG=https://crosswalk-project.org/jira/browse/XWALK-531,
https://crosswalk-project.org/jira/browse/XWALK-73