Changeset 64990 in webkit


Ignore:
Timestamp:
Aug 9, 2010 10:39:47 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-08-09 Vangelis Kokkevis <vangelis@chromium.org>

Reviewed by Dimitri Glazkov.

Skip the slow software rendering path of GraphicsContext3D if accelerated
compositing is active. This fixes an issue with WebGL and the compositor
in which the software rendering of WebGL would cause the current GL context
to change while the compositor was processing layers. Tested by running
several WebGL samples both with the compositor enabled and disabled.
https://bugs.webkit.org/show_bug.cgi?id=43644

  • src/GraphicsContext3D.cpp: (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): (WebCore::GraphicsContext3DInternal::initialize): (WebCore::GraphicsContext3DInternal::beginPaint):
Location:
trunk/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/chromium/ChangeLog

    r64988 r64990  
     12010-08-09  Vangelis Kokkevis  <vangelis@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Skip the slow software rendering path of GraphicsContext3D if accelerated
     6        compositing is active. This fixes an issue with WebGL and the compositor
     7        in which the software rendering of WebGL would cause the current GL context
     8        to change while the compositor was processing layers. Tested by running
     9        several WebGL samples both with the compositor enabled and disabled.
     10        https://bugs.webkit.org/show_bug.cgi?id=43644
     11
     12        * src/GraphicsContext3D.cpp:
     13        (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
     14        (WebCore::GraphicsContext3DInternal::initialize):
     15        (WebCore::GraphicsContext3DInternal::beginPaint):
     16
    1172010-08-06  James Hawkins  <jhawkins@chromium.org>
    218
  • trunk/WebKit/chromium/src/GraphicsContext3D.cpp

    r64870 r64990  
    304304private:
    305305    OwnPtr<WebKit::WebGraphicsContext3D> m_impl;
     306    WebKit::WebViewImpl* m_webViewImpl;
    306307#if USE(ACCELERATED_COMPOSITING)
    307308    RefPtr<CanvasLayerChromium> m_compositingLayer;
     
    322323
    323324GraphicsContext3DInternal::GraphicsContext3DInternal()
     325    : m_webViewImpl(0)
    324326#if PLATFORM(SKIA)
    325327#elif PLATFORM(CG)
    326     : m_renderOutput(0)
     328    , m_renderOutput(0)
    327329#else
    328330#error Must port to your platform
     
    355357    WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(chrome->client());
    356358
    357     WebKit::WebViewImpl* webView = chromeClientImpl->webView();
    358 
    359     if (!webView)
     359    m_webViewImpl = chromeClientImpl->webView();
     360
     361    if (!m_webViewImpl)
    360362        return false;
    361     if (!webContext->initialize(webAttributes, webView)) {
     363    if (!webContext->initialize(webAttributes, m_webViewImpl)) {
    362364        delete webContext;
    363365        return false;
     
    453455void GraphicsContext3DInternal::beginPaint(CanvasRenderingContext* context)
    454456{
     457    // If the gpu compositor is on then skip the readback and software rendering path.
     458    if (m_webViewImpl->isAcceleratedCompositingActive())
     459        return;
     460
    455461    paintRenderingResultsToCanvas(context);
    456462}
Note: See TracChangeset for help on using the changeset viewer.