Changeset 136234 in webkit


Ignore:
Timestamp:
Nov 30, 2012 6:20:37 AM (11 years ago)
Author:
joone.hur@intel.com
Message:

[EFL]Drawing artifacts while resizing the view
https://bugs.webkit.org/show_bug.cgi?id=101288

Reviewed by Kenneth Rohde Christiansen.

An Evas GL surface is recreated when the window is resized, but the update of the surface is
asynchronously done, which gives Evas a chance of painting the empty surface on the screen.
As a result, the flickering problem happens while resizing the view.
So this patch allows to create an Evas GL surface synchronously with the update of the surface.

  • UIProcess/API/efl/EwkViewImpl.cpp:

(EwkViewImpl::EwkViewImpl): Set m_pendingSurfaceResize to false.
(EwkViewImpl::displayTimerFired): Create an Evas GL surface.

  • UIProcess/API/efl/EwkViewImpl.h:

(EwkViewImpl::setNeedsSurfaceResize): Added.
(EwkViewImpl):

  • UIProcess/API/efl/ewk_view.cpp:

(_ewk_view_smart_calculate): Set m_pendingSurfaceResize to true.

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r136231 r136234  
     12012-11-30  Joone Hur  <joone.hur@intel.com>
     2
     3        [EFL]Drawing artifacts while resizing the view
     4        https://bugs.webkit.org/show_bug.cgi?id=101288
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        An Evas GL surface is recreated when the window is resized, but the update of the surface is
     9        asynchronously done, which gives Evas a chance of painting the empty surface on the screen.
     10        As a result, the flickering problem happens while resizing the view.
     11        So this patch allows to create an Evas GL surface synchronously with the update of the surface.
     12
     13        * UIProcess/API/efl/EwkViewImpl.cpp:
     14        (EwkViewImpl::EwkViewImpl): Set m_pendingSurfaceResize to false.
     15        (EwkViewImpl::displayTimerFired): Create an Evas GL surface.
     16        * UIProcess/API/efl/EwkViewImpl.h:
     17        (EwkViewImpl::setNeedsSurfaceResize): Added.
     18        (EwkViewImpl):
     19        * UIProcess/API/efl/ewk_view.cpp:
     20        (_ewk_view_smart_calculate): Set m_pendingSurfaceResize to true.
     21
    1222012-11-30  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
    223
  • trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp

    r136000 r136234  
    115115    : m_view(view)
    116116    , m_context(context)
     117#if USE(ACCELERATED_COMPOSITING)
     118    , m_pendingSurfaceResize(false)
     119#endif
    117120    , m_pageClient(behavior == DefaultBehavior ? PageClientDefaultImpl::create(this) : PageClientLegacyImpl::create(this))
    118121    , m_pageProxy(m_context->webContext()->createWebPage(m_pageClient.get(), pageGroup.get()))
     
    362365    Ewk_View_Smart_Data* sd = smartData();
    363366
    364     evas_gl_make_current(m_evasGL.get(), evasGLSurface(), evasGLContext());
     367    if (m_pendingSurfaceResize) {
     368        // Create a GL surface here so that Evas has no chance of painting to an empty GL surface.
     369        createGLSurface(IntSize(sd->view.w, sd->view.h));
     370        m_pendingSurfaceResize = false;
     371    } else
     372        evas_gl_make_current(m_evasGL.get(), evasGLSurface(), evasGLContext());
    365373
    366374    // We are supposed to clip to the actual viewport, nothing less.
  • trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h

    r136000 r136234  
    162162    bool enterAcceleratedCompositingMode();
    163163    bool exitAcceleratedCompositingMode();
     164    void setNeedsSurfaceResize() { m_pendingSurfaceResize = true; }
    164165#endif
    165166
     
    247248    OwnPtr<WebKit::EvasGLContext> m_evasGLContext;
    248249    OwnPtr<WebKit::EvasGLSurface> m_evasGLSurface;
     250    bool m_pendingSurfaceResize;
    249251#endif
    250252    OwnPtr<WebKit::PageClientBase> m_pageClient;
  • trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp

    r136102 r136234  
    388388
    389389#if USE(ACCELERATED_COMPOSITING)
    390         if (width && height)
    391             impl->createGLSurface(IntSize(width, height));
     390        impl->setNeedsSurfaceResize();
    392391#endif
    393392#if USE(TILED_BACKING_STORE)
Note: See TracChangeset for help on using the changeset viewer.