Some ports of WebKit may want to enable WebGL even if accelerated compositing is not enabled. The code in HTMLCanvasElement which gates the creation of the WebGL context based on the enabling of accelerated compositing should be made conditional. The recent change to support the accelerated compositing flag in Chromium broke that port. The safest change is to ignore the accelerated compositing flag only on Chromium; other ports may opt in to this logic if they choose.
Created attachment 57710 [details] Patch From the ChangeLog: Conditionalize the code which prevents a WebGL rendering context from being created if accelerated compositing is disabled. Currently Chromium is the only port which will create a context if accelerated compositing is disabled; other ports may opt in to this code path if desired.
Comment on attachment 57710 [details] Patch WebCore/html/HTMLCanvasElement.cpp:160 + #if !PLATFORM(CHROMIUM) perhaps a more specific ENABLE(3D_CANVAS_REQUIRES_ACCELERATED_COMPOSITING) ?
(In reply to comment #2) > (From update of attachment 57710 [details]) > WebCore/html/HTMLCanvasElement.cpp:160 > + #if !PLATFORM(CHROMIUM) > perhaps a more specific ENABLE(3D_CANVAS_REQUIRES_ACCELERATED_COMPOSITING) ? I would rather fix this with a small change now than plumb a new enable flag through the build system. WebGL is currently broken in Chromium and I want to fix that ASAP.
Comment on attachment 57710 [details] Patch OK, r=me since this fixes the bots, but we should avoid littering cross platform code with PLATFORM(CHROMIUM). What is the plan for eliminating this?
(In reply to comment #4) > (From update of attachment 57710 [details]) > OK, r=me since this fixes the bots, but we should avoid littering cross > platform code with PLATFORM(CHROMIUM). What is the plan for eliminating > this? We can add a new enable flag. I know the test of the flag was originally added specifically for the Mac (Safari) port, but it seems that other ports like Qt are happy with the test of the accelerated compositing flag. When adding the new enable flag we'll need to be careful not to accidentally enable WebGL for ports which didn't expect it in certain situations.
Committed r60582: <http://trac.webkit.org/changeset/60582>