Title: [133723] trunk/Source/WebKit2
Revision
133723
Author
[email protected]
Date
2012-11-06 22:31:20 -0800 (Tue, 06 Nov 2012)

Log Message

[EFL][WK2] API test crash with accelerated compositing on.
https://bugs.webkit.org/show_bug.cgi?id=101384

Patch by Viatcheslav Ostapenko <[email protected]> on 2012-11-06
Reviewed by Gyuyoung Kim.

If accelerated compositing is enabled API tests should create GL evas engine
instead of default one.
Also, in API tests first window resize and display often comes earlier
than enterAcceleratedCompositingMode call, so let's create GL surface in
_ewk_view_smart_calculate on first window resize.

* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_smart_calculate):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::SetUp):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (133722 => 133723)


--- trunk/Source/WebKit2/ChangeLog	2012-11-07 06:29:43 UTC (rev 133722)
+++ trunk/Source/WebKit2/ChangeLog	2012-11-07 06:31:20 UTC (rev 133723)
@@ -1,3 +1,21 @@
+2012-11-06  Viatcheslav Ostapenko  <[email protected]>
+
+        [EFL][WK2] API test crash with accelerated compositing on.
+        https://bugs.webkit.org/show_bug.cgi?id=101384
+
+        Reviewed by Gyuyoung Kim.
+
+        If accelerated compositing is enabled API tests should create GL evas engine
+        instead of default one.
+        Also, in API tests first window resize and display often comes earlier
+        than enterAcceleratedCompositingMode call, so let's create GL surface in
+        _ewk_view_smart_calculate on first window resize.
+
+        * UIProcess/API/efl/ewk_view.cpp:
+        (_ewk_view_smart_calculate):
+        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
+        (EWK2UnitTest::EWK2UnitTestBase::SetUp):
+
 2012-11-06  Anders Carlsson  <[email protected]>
 
         Update Java related WKSI function names

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp (133722 => 133723)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-11-07 06:29:43 UTC (rev 133722)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-11-07 06:31:20 UTC (rev 133723)
@@ -387,10 +387,10 @@
 
 #if USE(ACCELERATED_COMPOSITING)
         // Recreate surface if needed.
-        if (impl->evasGLSurface()) {
+        if (impl->evasGLSurface())
             impl->clearEvasGLSurface();
-            impl->createGLSurface(IntSize(width, height));
-        }
+
+        impl->createGLSurface(IntSize(width, height));
 #endif
 #if USE(TILED_BACKING_STORE)
         impl->pageClient()->updateViewportSize(IntSize(width, height));

Modified: trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp (133722 => 133723)


--- trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp	2012-11-07 06:29:43 UTC (rev 133722)
+++ trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp	2012-11-07 06:31:20 UTC (rev 133723)
@@ -48,7 +48,12 @@
     unsigned int width = environment->defaultWidth();
     unsigned int height = environment->defaultHeight();
 
+#if defined(WTF_USE_ACCELERATED_COMPOSITING) && defined(HAVE_ECORE_X)
+    const char* engine = "opengl_x11";
+    m_ecoreEvas = ecore_evas_new(engine, 0, 0, width, height, 0);
+#else
     m_ecoreEvas = ecore_evas_new(0, 0, 0, width, height, 0);
+#endif
 
     ecore_evas_show(m_ecoreEvas);
     Evas* evas = ecore_evas_get(m_ecoreEvas);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to