Bug 45124 - [chromium] Gracefully switch over to software compositing when layer renderer fails to initialize
Summary: [chromium] Gracefully switch over to software compositing when layer renderer...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Vangelis Kokkevis
Depends on:
Reported: 2010-09-02 12:56 PDT by Vangelis Kokkevis
Modified: 2010-09-03 16:24 PDT (History)
1 user (show)

See Also:

Proposed patch (7.87 KB, patch)
2010-09-02 22:36 PDT, Vangelis Kokkevis
fishd: review+
fishd: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vangelis Kokkevis 2010-09-02 12:56:53 PDT
Currently if the accelerated compositor fails to initialize (e.g. failed to get a gl context), page renders without the composited layers. The correct behavior would be to switch over to software compositing.
Comment 1 Vangelis Kokkevis 2010-09-02 22:36:55 PDT
Created attachment 66470 [details]
Proposed patch
Comment 2 Darin Fisher (:fishd, Google) 2010-09-03 11:37:51 PDT
Comment on attachment 66470 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=66470&action=prettypatch

> WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:83
> +    PassOwnPtr<LayerRendererChromium> layerRenderer(new LayerRendererChromium(gles2Context));
nit: this should be changed to use OwnPtr, like so:

  OwnPtr<LayerRenderChromium> layerRenderer(new LayerRendererChromium(gles2Context));

Then you should use the .release() method of OwnPtr<T> to finally return a PassOwnPtr<T>.

> WebKit/chromium/src/WebViewImpl.cpp:2110
> +    if (m_compositorCreationFailed)
nit: I think the body of this function should just be changed to:

   return !m_compositorCreationFailed;

R=me with those nits fixed
Comment 3 Vangelis Kokkevis 2010-09-03 16:24:49 PDT
Committed r66777: <http://trac.webkit.org/changeset/66777>