<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[166637] trunk/Source/WebKit/efl</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/166637">166637</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-04-02 02:23:10 -0700 (Wed, 02 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[EFL] Composite all layers into one evas_object using TextureMapper.
https://bugs.webkit.org/show_bug.cgi?id=130969

Patch by Hyowon Kim &lt;hw1008.kim@samsung.com&gt; on 2014-04-02
Reviewed by Gyuyoung Kim.

The EFL port uses two evas_objects to render the entire webpage: backing_store and compositingObject.
backing_store is used to paint a non-composited layer with ewk functions,
whereas compositingObject is used to paint other layers with TextureMapper.
These evas_objects are eventually composited into the window buffer by Evas.

This patch moves to use only one evas_object by integrating these two evas_objects,
and makes that TextureMapper handles all rendering paths like WebKit2.

* WebCoreSupport/AcceleratedCompositingContextEfl.cpp:
(WebCore::AcceleratedCompositingContext::AcceleratedCompositingContext):
(WebCore::AcceleratedCompositingContext::~AcceleratedCompositingContext):
(WebCore::AcceleratedCompositingContext::resize):
(WebCore::AcceleratedCompositingContext::flushAndRenderLayers):
(WebCore::AcceleratedCompositingContext::flushPendingLayerChanges):
(WebCore::AcceleratedCompositingContext::paintToGraphicsContext):
(WebCore::AcceleratedCompositingContext::paintToCurrentGLContext):
(WebCore::AcceleratedCompositingContext::compositeLayers):
(WebCore::AcceleratedCompositingContext::initialize): Deleted.
(WebCore::AcceleratedCompositingContext::canComposite): Deleted.
(WebCore::AcceleratedCompositingContext::compositeLayersToContext): Deleted.
(WebCore::AcceleratedCompositingContext::attachRootGraphicsLayer): Deleted.
* WebCoreSupport/AcceleratedCompositingContextEfl.h:
(WebCore::AcceleratedCompositingContext::setRootGraphicsLayer):
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):
(_ewk_view_accelerated_compositing_cb):
(_ewk_view_smart_add):
(_ewk_view_smart_resize):
(_ewk_view_smart_calculate):
(_ewk_view_smart_show):
(_ewk_view_smart_hide):
(_ewk_view_smart_flush):
(_ewk_view_smart_zoom_weak_set):
(_ewk_view_smart_zoom_weak_smooth_scale_set):
(ewk_view_bg_color_set):
(ewk_view_scroll):
(ewk_view_root_graphics_layer_set):
(ewk_view_mark_for_sync):
(_ewk_view_scrolls_flush): Deleted.
(_ewk_view_scroll_process): Deleted.
(_ewk_view_smart_scrolls_process): Deleted.
(_ewk_view_smart_repaints_process): Deleted.
(ewk_view_scrolls_process): Deleted.
(_ewk_view_accelerated_compositing_context_create_if_needed): Deleted.
(_ewk_view_accelerated_compositing_object_create_if_needed): Deleted.
* ewk/ewk_view.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKiteflChangeLog">trunk/Source/WebKit/efl/ChangeLog</a></li>
<li><a href="#trunkSourceWebKiteflWebCoreSupportAcceleratedCompositingContextEflcpp">trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp</a></li>
<li><a href="#trunkSourceWebKiteflWebCoreSupportAcceleratedCompositingContextEflh">trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.h</a></li>
<li><a href="#trunkSourceWebKiteflewkewk_viewcpp">trunk/Source/WebKit/efl/ewk/ewk_view.cpp</a></li>
<li><a href="#trunkSourceWebKiteflewkewk_viewh">trunk/Source/WebKit/efl/ewk/ewk_view.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKiteflChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ChangeLog (166636 => 166637)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ChangeLog        2014-04-02 09:14:36 UTC (rev 166636)
+++ trunk/Source/WebKit/efl/ChangeLog        2014-04-02 09:23:10 UTC (rev 166637)
</span><span class="lines">@@ -1,3 +1,57 @@
</span><ins>+2014-04-02  Hyowon Kim  &lt;hw1008.kim@samsung.com&gt;
+
+        [EFL] Composite all layers into one evas_object using TextureMapper.
+        https://bugs.webkit.org/show_bug.cgi?id=130969
+
+        Reviewed by Gyuyoung Kim.
+
+        The EFL port uses two evas_objects to render the entire webpage: backing_store and compositingObject.
+        backing_store is used to paint a non-composited layer with ewk functions,
+        whereas compositingObject is used to paint other layers with TextureMapper.
+        These evas_objects are eventually composited into the window buffer by Evas.
+
+        This patch moves to use only one evas_object by integrating these two evas_objects,
+        and makes that TextureMapper handles all rendering paths like WebKit2.
+
+        * WebCoreSupport/AcceleratedCompositingContextEfl.cpp:
+        (WebCore::AcceleratedCompositingContext::AcceleratedCompositingContext):
+        (WebCore::AcceleratedCompositingContext::~AcceleratedCompositingContext):
+        (WebCore::AcceleratedCompositingContext::resize):
+        (WebCore::AcceleratedCompositingContext::flushAndRenderLayers):
+        (WebCore::AcceleratedCompositingContext::flushPendingLayerChanges):
+        (WebCore::AcceleratedCompositingContext::paintToGraphicsContext):
+        (WebCore::AcceleratedCompositingContext::paintToCurrentGLContext):
+        (WebCore::AcceleratedCompositingContext::compositeLayers):
+        (WebCore::AcceleratedCompositingContext::initialize): Deleted.
+        (WebCore::AcceleratedCompositingContext::canComposite): Deleted.
+        (WebCore::AcceleratedCompositingContext::compositeLayersToContext): Deleted.
+        (WebCore::AcceleratedCompositingContext::attachRootGraphicsLayer): Deleted.
+        * WebCoreSupport/AcceleratedCompositingContextEfl.h:
+        (WebCore::AcceleratedCompositingContext::setRootGraphicsLayer):
+        * ewk/ewk_view.cpp:
+        (_ewk_view_priv_new):
+        (_ewk_view_accelerated_compositing_cb):
+        (_ewk_view_smart_add):
+        (_ewk_view_smart_resize):
+        (_ewk_view_smart_calculate):
+        (_ewk_view_smart_show):
+        (_ewk_view_smart_hide):
+        (_ewk_view_smart_flush):
+        (_ewk_view_smart_zoom_weak_set):
+        (_ewk_view_smart_zoom_weak_smooth_scale_set):
+        (ewk_view_bg_color_set):
+        (ewk_view_scroll):
+        (ewk_view_root_graphics_layer_set):
+        (ewk_view_mark_for_sync):
+        (_ewk_view_scrolls_flush): Deleted.
+        (_ewk_view_scroll_process): Deleted.
+        (_ewk_view_smart_scrolls_process): Deleted.
+        (_ewk_view_smart_repaints_process): Deleted.
+        (ewk_view_scrolls_process): Deleted.
+        (_ewk_view_accelerated_compositing_context_create_if_needed): Deleted.
+        (_ewk_view_accelerated_compositing_object_create_if_needed): Deleted.
+        * ewk/ewk_view.h:
+
</ins><span class="cx"> 2014-03-23  Hyowon Kim  &lt;hw1008.kim@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Move all EFL typedefs into EflTypedefs.h.
</span></span></pre></div>
<a id="trunkSourceWebKiteflWebCoreSupportAcceleratedCompositingContextEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp (166636 => 166637)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp        2014-04-02 09:14:36 UTC (rev 166636)
+++ trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp        2014-04-02 09:23:10 UTC (rev 166637)
</span><span class="lines">@@ -22,10 +22,13 @@
</span><span class="cx"> #if USE(TEXTURE_MAPPER_GL)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;AcceleratedCompositingContextEfl.h&quot;
</span><ins>+#include &quot;CairoUtilitiesEfl.h&quot;
</ins><span class="cx"> #include &quot;GraphicsLayerTextureMapper.h&quot;
</span><span class="cx"> #include &quot;MainFrame.h&quot;
</span><ins>+#include &quot;PlatformContextCairo.h&quot;
</ins><span class="cx"> #include &quot;TextureMapperGL.h&quot;
</span><span class="cx"> #include &quot;TextureMapperLayer.h&quot;
</span><ins>+#include &quot;ewk_private.h&quot;
</ins><span class="cx"> #include &quot;ewk_view_private.h&quot;
</span><span class="cx"> 
</span><span class="cx"> const double compositingFrameRate = 60;
</span><span class="lines">@@ -35,44 +38,44 @@
</span><span class="cx"> AcceleratedCompositingContext::AcceleratedCompositingContext(Evas_Object* ewkView, Evas_Object* compositingObject)
</span><span class="cx">     : m_view(ewkView)
</span><span class="cx">     , m_compositingObject(compositingObject)
</span><ins>+    , m_rootLayer(nullptr)
</ins><span class="cx">     , m_syncTimer(this, &amp;AcceleratedCompositingContext::syncLayers)
</span><ins>+    , m_isAccelerated(true)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_view);
</span><span class="cx">     ASSERT(m_compositingObject);
</span><ins>+
+    Evas* evas = evas_object_evas_get(m_view);
+    const char* engine = ecore_evas_engine_name_get(ecore_evas_ecore_evas_get(evas));
+    if (!strncmp(engine, &quot;opengl_x11&quot;, strlen(&quot;opengl_x11&quot;))) {
+        m_evasGL = EflUniquePtr&lt;Evas_GL&gt;(evas_gl_new(evas_object_evas_get(m_view)));
+        if (m_evasGL)
+            m_evasGLContext = EvasGLContext::create(m_evasGL.get());
+    }
+
+    if (!m_evasGLContext)
+        m_isAccelerated = false;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> AcceleratedCompositingContext::~AcceleratedCompositingContext()
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool AcceleratedCompositingContext::initialize()
-{
-    m_evasGL = EflUniquePtr&lt;Evas_GL&gt;(evas_gl_new(evas_object_evas_get(m_view)));
-    if (!m_evasGL)
-        return false;
-
-    m_evasGLContext = EvasGLContext::create(m_evasGL.get());
-    if (!m_evasGLContext)
-        return false;
-
-    Evas_Coord width = 0;
-    Evas_Coord height = 0;
-    evas_object_geometry_get(m_view, 0, 0, &amp;width, &amp;height);
-
-    IntSize webViewSize(width, height);
-    if (webViewSize.isEmpty())
-        return false;
-
-    return resize(webViewSize);
-}
-
</del><span class="cx"> void AcceleratedCompositingContext::syncLayers(Timer&lt;AcceleratedCompositingContext&gt;*)
</span><span class="cx"> {
</span><span class="cx">     ewk_view_mark_for_sync(m_view);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool AcceleratedCompositingContext::resize(const IntSize&amp; size)
</del><ins>+void AcceleratedCompositingContext::resize(const IntSize&amp; size)
</ins><span class="cx"> {
</span><ins>+    if (m_viewSize == size)
+        return;
+
+    m_viewSize = size;
+
+    if (!m_isAccelerated)
+        return;
+
</ins><span class="cx">     static Evas_GL_Config evasGLConfig = {
</span><span class="cx">         EVAS_GL_RGBA_8888,
</span><span class="cx">         EVAS_GL_DEPTH_BIT_8,
</span><span class="lines">@@ -82,91 +85,102 @@
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     m_evasGLSurface = EvasGLSurface::create(m_evasGL.get(), &amp;evasGLConfig, size);
</span><del>-    if (!m_evasGLSurface)
-        return false;
</del><ins>+    if (!m_evasGLSurface) {
+        ERR(&quot;Failed to create a EvasGLSurface.&quot;);
+        return;
+    }
</ins><span class="cx"> 
</span><span class="cx">     Evas_Native_Surface nativeSurface;
</span><span class="cx">     evas_gl_native_surface_get(m_evasGL.get(), m_evasGLSurface-&gt;surface(), &amp;nativeSurface);
</span><span class="cx">     evas_object_image_native_surface_set(m_compositingObject, &amp;nativeSurface);
</span><del>-    return true;
-}
</del><span class="cx"> 
</span><del>-bool AcceleratedCompositingContext::canComposite()
-{
-    return m_rootGraphicsLayer &amp;&amp; m_textureMapper;
</del><ins>+    if (!evas_gl_make_current(m_evasGL.get(), m_evasGLSurface-&gt;surface(), m_evasGLContext-&gt;context())) {
+        ERR(&quot;Failed to evas_gl_make_current.&quot;);
+        return;
+    }
+
+    evas_gl_api_get(m_evasGL.get())-&gt;glViewport(0, 0, size.width(), size.height());
+    evas_gl_api_get(m_evasGL.get())-&gt;glClearColor(1, 1, 1, 1);
+    evas_gl_api_get(m_evasGL.get())-&gt;glClear(GL_COLOR_BUFFER_BIT);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AcceleratedCompositingContext::flushAndRenderLayers()
</span><span class="cx"> {
</span><del>-    if (!canComposite())
-        return;
-
</del><span class="cx">     MainFrame&amp; frame = EWKPrivate::corePage(m_view)-&gt;mainFrame();
</span><span class="cx">     if (!frame.contentRenderer() || !frame.view())
</span><span class="cx">         return;
</span><span class="cx">     frame.view()-&gt;updateLayoutAndStyleIfNeededRecursive();
</span><span class="cx"> 
</span><del>-    if (!canComposite())
-        return;
-
-    if (!evas_gl_make_current(m_evasGL.get(), m_evasGLSurface-&gt;surface(), m_evasGLContext-&gt;context()))
-        return;
-
</del><span class="cx">     if (!flushPendingLayerChanges())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    compositeLayersToContext();
-
-    if (toTextureMapperLayer(m_rootGraphicsLayer.get())-&gt;descendantsOrSelfHaveRunningAnimations() &amp;&amp; !m_syncTimer.isActive())
-        m_syncTimer.startOneShot(1 / compositingFrameRate);
</del><ins>+    if (m_isAccelerated)
+        paintToCurrentGLContext();
+    else
+        paintToGraphicsContext();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool AcceleratedCompositingContext::flushPendingLayerChanges()
</span><span class="cx"> {
</span><del>-    m_rootGraphicsLayer-&gt;flushCompositingStateForThisLayerOnly();
</del><ins>+    if (!m_rootLayer)
+        return false;
+
+    m_rootLayer-&gt;flushCompositingStateForThisLayerOnly();
</ins><span class="cx">     return EWKPrivate::corePage(m_view)-&gt;mainFrame().view()-&gt;flushCompositingStateIncludingSubframes();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void AcceleratedCompositingContext::compositeLayersToContext()
</del><ins>+void AcceleratedCompositingContext::paintToGraphicsContext()
</ins><span class="cx"> {
</span><del>-    Evas_Coord width = 0;
-    Evas_Coord height = 0;
-    evas_object_geometry_get(m_view, 0, 0, &amp;width, &amp;height);
</del><ins>+    if (!m_textureMapper)
+        m_textureMapper = TextureMapper::create(TextureMapper::SoftwareMode);
</ins><span class="cx"> 
</span><del>-    evas_gl_api_get(m_evasGL.get())-&gt;glViewport(0, 0, width, height);
-    evas_gl_api_get(m_evasGL.get())-&gt;glClear(GL_COLOR_BUFFER_BIT);
</del><ins>+    RefPtr&lt;cairo_surface_t&gt; surface = createSurfaceForImage(m_compositingObject);
+    if (!surface)
+        return;
</ins><span class="cx"> 
</span><del>-    m_textureMapper-&gt;beginPainting();
-    m_textureMapper-&gt;beginClip(TransformationMatrix(), FloatRect(0, 0, width, height));
-    toTextureMapperLayer(m_rootGraphicsLayer.get())-&gt;paint();
-    m_fpsCounter.updateFPSAndDisplay(m_textureMapper.get());
-    m_textureMapper-&gt;endClip();
-    m_textureMapper-&gt;endPainting();
</del><ins>+    PlatformContextCairo platformContext(cairo_create(surface.get()));
+    GraphicsContext context(&amp;platformContext);
+    m_textureMapper-&gt;setGraphicsContext(&amp;context);
+
+    compositeLayers();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void AcceleratedCompositingContext::attachRootGraphicsLayer(GraphicsLayer* rootLayer)
</del><ins>+void AcceleratedCompositingContext::paintToCurrentGLContext()
</ins><span class="cx"> {
</span><del>-    if (!rootLayer) {
-        m_rootGraphicsLayer = nullptr;
-        return;
-    }
-
</del><span class="cx">     if (!m_textureMapper) {
</span><del>-        evas_gl_make_current(m_evasGL.get(), m_evasGLSurface-&gt;surface(), m_evasGLContext-&gt;context());
-        m_textureMapper = TextureMapperGL::create();
</del><ins>+        m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode);
+        static_cast&lt;TextureMapperGL*&gt;(m_textureMapper.get())-&gt;setEnableEdgeDistanceAntialiasing(true);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_rootGraphicsLayer = GraphicsLayer::create(0, 0);
-    m_rootGraphicsLayer-&gt;addChild(rootLayer);
-    m_rootGraphicsLayer-&gt;setDrawsContent(false);
-    m_rootGraphicsLayer-&gt;setMasksToBounds(false);
-    m_rootGraphicsLayer-&gt;setSize(IntSize(1, 1));
</del><ins>+    if (!evas_gl_make_current(m_evasGL.get(), m_evasGLSurface-&gt;surface(), m_evasGLContext-&gt;context()))
+        return;
</ins><span class="cx"> 
</span><del>-    toTextureMapperLayer(m_rootGraphicsLayer.get())-&gt;setTextureMapper(m_textureMapper.get());
</del><ins>+    evas_gl_api_get(m_evasGL.get())-&gt;glViewport(0, 0, m_viewSize.width(), m_viewSize.height());
+    evas_gl_api_get(m_evasGL.get())-&gt;glClear(GL_COLOR_BUFFER_BIT);
</ins><span class="cx"> 
</span><del>-    m_rootGraphicsLayer-&gt;flushCompositingStateForThisLayerOnly();
</del><ins>+    compositeLayers();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void AcceleratedCompositingContext::compositeLayers()
+{
+    TextureMapperLayer* currentRootLayer = toTextureMapperLayer(m_rootLayer);
+    if (!currentRootLayer)
+        return;
+
+    currentRootLayer-&gt;setTextureMapper(m_textureMapper.get());
+    currentRootLayer-&gt;applyAnimationsRecursively();
+
+    m_textureMapper-&gt;beginPainting();
+    m_textureMapper-&gt;beginClip(TransformationMatrix(), FloatRect(FloatPoint(), m_viewSize));
+    currentRootLayer-&gt;paint();
+    m_fpsCounter.updateFPSAndDisplay(m_textureMapper.get());
+    m_textureMapper-&gt;endClip();
+    m_textureMapper-&gt;endPainting();
+
+    if (currentRootLayer-&gt;descendantsOrSelfHaveRunningAnimations() &amp;&amp; !m_syncTimer.isActive())
+        m_syncTimer.startOneShot(1 / compositingFrameRate);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // USE(TEXTURE_MAPPER_GL)
</span></span></pre></div>
<a id="trunkSourceWebKiteflWebCoreSupportAcceleratedCompositingContextEflh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.h (166636 => 166637)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.h        2014-04-02 09:14:36 UTC (rev 166636)
+++ trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.h        2014-04-02 09:23:10 UTC (rev 166637)
</span><span class="lines">@@ -42,25 +42,23 @@
</span><span class="cx">     AcceleratedCompositingContext(Evas_Object* ewkView, Evas_Object* compositingObject);
</span><span class="cx">     ~AcceleratedCompositingContext();
</span><span class="cx"> 
</span><del>-    bool initialize();
</del><ins>+    void setRootGraphicsLayer(GraphicsLayer* rootLayer) { m_rootLayer = rootLayer; }
+    void resize(const IntSize&amp;);
+    void flushAndRenderLayers();
</ins><span class="cx"> 
</span><del>-    bool resize(const IntSize&amp;);
-    void attachRootGraphicsLayer(GraphicsLayer* rootLayer);
</del><ins>+private:
+    void paintToGraphicsContext();
+    void paintToCurrentGLContext();
+    void compositeLayers();
</ins><span class="cx"> 
</span><del>-    void flushAndRenderLayers();
</del><span class="cx">     bool flushPendingLayerChanges();
</span><del>-    void compositeLayersToContext();
-
-    bool canComposite();
-
</del><span class="cx">     void syncLayers(Timer&lt;AcceleratedCompositingContext&gt;*);
</span><span class="cx"> 
</span><del>-private:
</del><span class="cx">     Evas_Object* m_view;
</span><span class="cx">     Evas_Object* m_compositingObject;
</span><span class="cx"> 
</span><span class="cx">     OwnPtr&lt;TextureMapper&gt; m_textureMapper;
</span><del>-    std::unique_ptr&lt;GraphicsLayer&gt; m_rootGraphicsLayer;
</del><ins>+    GraphicsLayer* m_rootLayer;
</ins><span class="cx">     Timer&lt;AcceleratedCompositingContext&gt; m_syncTimer;
</span><span class="cx"> 
</span><span class="cx">     EflUniquePtr&lt;Evas_GL&gt; m_evasGL;
</span><span class="lines">@@ -68,6 +66,9 @@
</span><span class="cx">     std::unique_ptr&lt;EvasGLSurface&gt; m_evasGLSurface;
</span><span class="cx"> 
</span><span class="cx">     TextureMapperFPSCounter m_fpsCounter;
</span><ins>+
+    IntSize m_viewSize;
+    bool m_isAccelerated;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebKiteflewkewk_viewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (166636 => 166637)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp        2014-04-02 09:14:36 UTC (rev 166636)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp        2014-04-02 09:23:10 UTC (rev 166637)
</span><span class="lines">@@ -255,8 +255,6 @@
</span><span class="cx">     WebCore::ViewportArguments viewportArguments;
</span><span class="cx">     Ewk_History* history;
</span><span class="cx">     std::unique_ptr&lt;WebCore::AcceleratedCompositingContext&gt; acceleratedCompositingContext;
</span><del>-    bool isCompositingActive;
-    RefPtr&lt;Evas_Object&gt; compositingObject;
</del><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR)
</span><span class="cx">     WebCore::ColorChooserClient* colorChooserClient;
</span><span class="cx"> #endif
</span><span class="lines">@@ -272,8 +270,6 @@
</span><span class="cx">         size_t count;
</span><span class="cx">         size_t allocated;
</span><span class="cx">     } repaints;
</span><del>-    WTF::Vector&lt;WebCore::IntRect&gt; m_rectsToScroll;
-    WTF::Vector&lt;WebCore::IntSize&gt; m_scrollOffsets;
</del><span class="cx">     unsigned int imh; /**&lt; input method hints */
</span><span class="cx">     struct {
</span><span class="cx">         bool viewCleared : 1;
</span><span class="lines">@@ -472,12 +468,6 @@
</span><span class="cx">     _ewk_view_repaints_resize(priv, ewkViewRepaintsSizeMaximumFree);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void _ewk_view_scrolls_flush(Ewk_View_Private_Data* priv)
-{
-    priv-&gt;m_scrollOffsets.clear();
-    priv-&gt;m_rectsToScroll.clear();
-}
-
</del><span class="cx"> // Default Event Handling //////////////////////////////////////////////
</span><span class="cx"> static Eina_Bool _ewk_view_smart_focus_in(Ewk_View_Smart_Data* smartData)
</span><span class="cx"> {
</span><span class="lines">@@ -747,6 +737,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     pageSettings.setInteractiveFormValidationEnabled(true);
</span><span class="cx">     pageSettings.setAcceleratedCompositingEnabled(true);
</span><ins>+    pageSettings.setForceCompositingMode(true);
</ins><span class="cx">     char* debugVisualsEnvironment = getenv(&quot;WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS&quot;);
</span><span class="cx">     bool showDebugVisuals = debugVisualsEnvironment &amp;&amp; !strcmp(debugVisualsEnvironment, &quot;1&quot;);
</span><span class="cx">     pageSettings.setShowDebugBorders(showDebugVisuals);
</span><span class="lines">@@ -834,8 +825,6 @@
</span><span class="cx">     priv-&gt;contextMenu = 0;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    priv-&gt;isCompositingActive = false;
-
</del><span class="cx">     return priv;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -878,6 +867,11 @@
</span><span class="cx">     delete priv;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void _ewk_view_accelerated_compositing_cb(void* data, Evas_Object*)
+{
+    static_cast&lt;WebCore::AcceleratedCompositingContext*&gt;(data)-&gt;flushAndRenderLayers();
+}
+
</ins><span class="cx"> static void _ewk_view_smart_add(Evas_Object* ewkView)
</span><span class="cx"> {
</span><span class="cx">     const Evas_Smart* smart = evas_object_smart_smart_get(ewkView);
</span><span class="lines">@@ -910,23 +904,24 @@
</span><span class="cx"> 
</span><span class="cx">     EWK_VIEW_PRIV_GET(smartData, priv);
</span><span class="cx"> 
</span><del>-    smartData-&gt;backing_store = evas_object_image_add(smartData-&gt;base.evas);
-    if (EINA_UNLIKELY(!smartData-&gt;backing_store)) {
</del><ins>+    smartData-&gt;image = evas_object_image_add(smartData-&gt;base.evas);
+    if (EINA_UNLIKELY(!smartData-&gt;image)) {
</ins><span class="cx">         ERR(&quot;Could not create backing store object.&quot;);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    const Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(smartData-&gt;base.evas);
-    const char* engine = ecore_evas_engine_name_get(ecoreEvas);
-    if (!strncmp(engine, &quot;opengl_x11&quot;, strlen(&quot;opengl_x11&quot;)))
-        evas_object_image_content_hint_set(smartData-&gt;backing_store, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
</del><ins>+    evas_object_image_alpha_set(smartData-&gt;image, false);
+    evas_object_image_filled_set(smartData-&gt;image, true);
+    evas_object_image_smooth_scale_set(smartData-&gt;image, smartData-&gt;zoom_weak_smooth_scale);
+    evas_object_pass_events_set(smartData-&gt;image, true);
+    evas_object_smart_member_add(smartData-&gt;image, ewkView);
+    evas_object_show(smartData-&gt;image);
</ins><span class="cx"> 
</span><del>-    evas_object_image_alpha_set(smartData-&gt;backing_store, false);
-    evas_object_image_smooth_scale_set(smartData-&gt;backing_store, smartData-&gt;zoom_weak_smooth_scale);
-    evas_object_pass_events_set(smartData-&gt;backing_store, true);
-    evas_object_smart_member_add(smartData-&gt;backing_store, ewkView);
-    evas_object_show(smartData-&gt;backing_store);
</del><ins>+    priv-&gt;acceleratedCompositingContext = std::make_unique&lt;WebCore::AcceleratedCompositingContext&gt;(ewkView, smartData-&gt;image);
</ins><span class="cx"> 
</span><ins>+    // Set the pixel get callback.
+    evas_object_image_pixels_get_callback_set(smartData-&gt;image, _ewk_view_accelerated_compositing_cb, priv-&gt;acceleratedCompositingContext.get());
+
</ins><span class="cx">     smartData-&gt;events_rect = evas_object_rectangle_add(smartData-&gt;base.evas);
</span><span class="cx">     evas_object_color_set(smartData-&gt;events_rect, 0, 0, 0, 0);
</span><span class="cx">     evas_object_smart_member_add(smartData-&gt;events_rect, ewkView);
</span><span class="lines">@@ -981,34 +976,14 @@
</span><span class="cx">     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
</span><span class="cx"> 
</span><span class="cx">     // these should be queued and processed in calculate as well!
</span><del>-    evas_object_resize(smartData-&gt;backing_store, width, height);
-    evas_object_image_size_set(smartData-&gt;backing_store, width, height);
</del><ins>+    evas_object_resize(smartData-&gt;image, width, height);
+    evas_object_image_size_set(smartData-&gt;image, width, height);
+    evas_object_image_fill_set(smartData-&gt;image, 0, 0, width, height);
</ins><span class="cx"> 
</span><del>-    if (priv-&gt;compositingObject) {
-        evas_object_resize(priv-&gt;compositingObject.get(), width, height);
-        evas_object_image_size_set(priv-&gt;compositingObject.get(), width, height);
-        evas_object_image_fill_set(priv-&gt;compositingObject.get(), 0, 0, width, height);
</del><ins>+    priv-&gt;acceleratedCompositingContext-&gt;resize(WebCore::IntSize(width, height));
</ins><span class="cx"> 
</span><del>-        if (priv-&gt;acceleratedCompositingContext)
-            priv-&gt;acceleratedCompositingContext-&gt;resize(WebCore::IntSize(width, height));
-    }
-
</del><span class="cx">     smartData-&gt;changed.size = true;
</span><span class="cx">     _ewk_view_smart_changed(smartData);
</span><del>-
-    if (smartData-&gt;animated_zoom.zoom.current &lt; std::numeric_limits&lt;float&gt;::epsilon()) {
-        Evas_Object* clip = evas_object_clip_get(smartData-&gt;backing_store);
-        Evas_Coord x, y, contentWidth, contentHeight;
-        evas_object_image_fill_set(smartData-&gt;backing_store, 0, 0, width, height);
-        evas_object_geometry_get(smartData-&gt;backing_store, &amp;x, &amp;y, 0, 0);
-        evas_object_move(clip, x, y);
-        ewk_frame_contents_size_get(smartData-&gt;main_frame, &amp;contentWidth, &amp;contentHeight);
-        if (width &gt; contentWidth)
-            width = contentWidth;
-        if (height &gt; contentHeight)
-            height = contentHeight;
-        evas_object_resize(clip, width, height);
-    }
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void _ewk_view_smart_move(Evas_Object* ewkView, Evas_Coord /*x*/, Evas_Coord /*y*/)
</span><span class="lines">@@ -1053,173 +1028,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline void _ewk_view_scroll_process(Ewk_View_Smart_Data* smartData, void* pixels, Evas_Coord width, Evas_Coord height, const WebCore::IntSize&amp; scrollOffset, const WebCore::IntRect&amp; rectToScroll)
-{
-    int scrollX = rectToScroll.x();
-    int scrollY = rectToScroll.y();
-    int scrollWidth = rectToScroll.width();
-    int scrollHeight = rectToScroll.height();
-
-    if (abs(scrollOffset.width()) &gt;= scrollWidth || abs(scrollOffset.height()) &gt;= scrollHeight) {
-        ewk_view_repaint_add(smartData-&gt;_priv, scrollX, scrollY, scrollWidth, scrollHeight);
-        return;
-    }
-
-    if (scrollX &lt; 0) {
-        scrollWidth += scrollX;
-        scrollX = 0;
-    }
-    if (scrollY &lt; 0) {
-        scrollHeight += scrollY;
-        scrollY = 0;
-    }
-
-    if (scrollX + scrollWidth &gt; width)
-        scrollWidth = width - scrollX;
-    if (scrollY + scrollHeight &gt; height)
-        scrollHeight = height - scrollY;
-
-    if (scrollWidth &lt;= 0 || scrollHeight &lt;= 0)
-        return;
-
-    int sourceX = scrollOffset.width() &lt; 0 ? abs(scrollOffset.width()) : 0;
-    int sourceY = scrollOffset.height() &lt; 0 ? abs(scrollOffset.height()) : 0;
-    int destinationX = scrollOffset.width() &lt; 0 ? 0 : scrollOffset.width();
-    int destinationY = scrollOffset.height() &lt; 0 ? 0 : scrollOffset.height();
-    int copyWidth = scrollWidth - abs(scrollOffset.width());
-    int copyHeight = scrollHeight - abs(scrollOffset.height());
-    if (scrollOffset.width() || scrollOffset.height()) {
-        _ewk_view_screen_move(static_cast&lt;uint32_t*&gt;(pixels), destinationX, destinationY, sourceX, sourceY, copyWidth, copyHeight, width);
-        evas_object_image_data_update_add(smartData-&gt;backing_store, destinationX, destinationY, copyWidth, copyHeight);
-    }
-
-    Eina_Rectangle verticalUpdate;
-    verticalUpdate.x = destinationX ? 0 : copyWidth - 1;
-    verticalUpdate.y = 0;
-    verticalUpdate.w = abs(scrollOffset.width());
-    verticalUpdate.h = scrollHeight;
-    if (verticalUpdate.w &amp;&amp; verticalUpdate.h)
-        ewk_view_repaint_add(smartData-&gt;_priv, verticalUpdate.x, verticalUpdate.y, verticalUpdate.w, verticalUpdate.h);
-
-    Eina_Rectangle horizontalUpdate;
-    horizontalUpdate.x = destinationX;
-    horizontalUpdate.y = destinationY ? 0 : copyHeight - 1;
-    horizontalUpdate.w = copyWidth;
-    horizontalUpdate.h = abs(scrollOffset.height());
-    if (horizontalUpdate.w &amp;&amp; horizontalUpdate.h)
-        ewk_view_repaint_add(smartData-&gt;_priv, horizontalUpdate.x, horizontalUpdate.y, horizontalUpdate.w, horizontalUpdate.h);
-}
-
-static void _ewk_view_smart_scrolls_process(Ewk_View_Smart_Data* smartData)
-{
-    Evas_Coord imageWidth, imageHeight;
-    const WTF::Vector&lt;WebCore::IntSize&gt;&amp; scrollOffsets = smartData-&gt;_priv-&gt;m_scrollOffsets;
-    const WTF::Vector&lt;WebCore::IntRect&gt;&amp; rectsToScroll = smartData-&gt;_priv-&gt;m_rectsToScroll;
-
-    if (!scrollOffsets.size())
-        return;
-
-    evas_object_image_size_get(smartData-&gt;backing_store, &amp;imageWidth, &amp;imageHeight);
-
-    WebCore::IntRect rectToScroll(0, 0, imageWidth, imageHeight);
-    WebCore::IntSize scrollOffset;
-    for (size_t i = 0; i &lt; scrollOffsets.size(); ++i) {
-        rectToScroll.intersect(rectsToScroll[i]);
-        scrollOffset += scrollOffsets[i];
-    }
-
-    if (scrollOffset.isZero())
-        return;
-
-    void* pixels = evas_object_image_data_get(smartData-&gt;backing_store, 1);
-    _ewk_view_scroll_process(smartData, pixels, imageWidth, imageHeight, scrollOffset, rectToScroll);
-
-    evas_object_image_data_set(smartData-&gt;backing_store, pixels);
-
-    return;
-}
-
-static bool _ewk_view_smart_repaints_process(Ewk_View_Smart_Data* smartData)
-{
-    EWK_VIEW_PRIV_GET(smartData, priv);
-
-    if (smartData-&gt;animated_zoom.zoom.current &lt; std::numeric_limits&lt;float&gt;::epsilon()) {
-        Evas_Object* clip = evas_object_clip_get(smartData-&gt;backing_store);
-
-        // reset effects of zoom_weak_set()
-        evas_object_image_fill_set(smartData-&gt;backing_store, 0, 0, smartData-&gt;view.w, smartData-&gt;view.h);
-        evas_object_move(clip, smartData-&gt;view.x, smartData-&gt;view.y);
-
-        Evas_Coord width = smartData-&gt;view.w;
-        Evas_Coord height = smartData-&gt;view.h;
-
-        Evas_Coord centerWidth, centerHeight;
-        ewk_frame_contents_size_get(smartData-&gt;main_frame, &amp;centerWidth, &amp;centerHeight);
-        if (width &gt; centerWidth)
-            width = centerWidth;
-
-        if (height &gt; centerHeight)
-            height = centerHeight;
-
-        evas_object_resize(clip, width, height);
-    }
-
-    Evas_Coord imageWidth, imageHeight;
-    evas_object_image_size_get(smartData-&gt;backing_store, &amp;imageWidth, &amp;imageHeight);
-
-    Eina_Tiler* tiler = eina_tiler_new(imageWidth, imageHeight);
-    if (!tiler) {
-        ERR(&quot;could not create tiler %dx%d&quot;, imageWidth, imageHeight);
-        return false;
-    }
-
-    ewk_view_layout_if_needed_recursive(priv);
-
-    size_t count;
-    const Eina_Rectangle* paintRequest = ewk_view_repaints_pop(priv, &amp;count);
-    const Eina_Rectangle* paintRequestEnd = paintRequest + count;
-    for (; paintRequest &lt; paintRequestEnd; paintRequest++)
-        eina_tiler_rect_add(tiler, paintRequest);
-
-    Eina_Iterator* iterator = eina_tiler_iterator_new(tiler);
-    if (!iterator) {
-        ERR(&quot;could not get iterator for tiler&quot;);
-        eina_tiler_free(tiler);
-        return false;
-    }
-
-#if USE(TILED_BACKING_STORE)
-    if (priv-&gt;page-&gt;mainFrame().tiledBackingStore())
-        priv-&gt;page-&gt;mainFrame().tiledBackingStore()-&gt;coverWithTilesIfNeeded();
-#endif
-
-    Ewk_Paint_Context* context = ewk_paint_context_from_image_new(smartData-&gt;backing_store);
-    ewk_paint_context_save(context);
-
-    Eina_Rectangle* rect;
-    EINA_ITERATOR_FOREACH(iterator, rect) {
-        ewk_view_paint(smartData-&gt;_priv, context, rect);
-        evas_object_image_data_update_add(smartData-&gt;backing_store, rect-&gt;x, rect-&gt;y, rect-&gt;w, rect-&gt;h);
-    }
-
-#if ENABLE(INSPECTOR)
-    WebCore::Page* page = EWKPrivate::corePage(smartData-&gt;self);
-    if (page) {
-        WebCore::InspectorController&amp; controller = page-&gt;inspectorController();
-        if (controller.highlightedNode())
-            controller.drawHighlight(*context-&gt;graphicContext);
-    }
-#endif
-
-    ewk_paint_context_restore(context);
-    ewk_paint_context_free(context);
-
-    eina_tiler_free(tiler);
-    eina_iterator_free(iterator);
-
-    return true;
-}
-
</del><span class="cx"> static void _ewk_view_smart_calculate(Evas_Object* ewkView)
</span><span class="cx"> {
</span><span class="cx">     EWK_VIEW_SD_GET(ewkView, smartData);
</span><span class="lines">@@ -1258,7 +1066,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (smartData-&gt;changed.position &amp;&amp; ((x != smartData-&gt;view.x) || (y != smartData-&gt;view.y))) {
</span><span class="cx">         evas_object_move(smartData-&gt;main_frame, x, y);
</span><del>-        evas_object_move(smartData-&gt;backing_store, x, y);
</del><ins>+        evas_object_move(smartData-&gt;image, x, y);
</ins><span class="cx">         evas_object_move(smartData-&gt;events_rect, x, y);
</span><span class="cx">         smartData-&gt;changed.frame_rect = true;
</span><span class="cx">         smartData-&gt;view.x = x;
</span><span class="lines">@@ -1266,12 +1074,6 @@
</span><span class="cx">     }
</span><span class="cx">     smartData-&gt;changed.position = false;
</span><span class="cx"> 
</span><del>-    _ewk_view_smart_scrolls_process(smartData);
-    _ewk_view_scrolls_flush(priv);
-
-    if (!_ewk_view_smart_repaints_process(smartData))
-        ERR(&quot;failed to process repaints.&quot;);
-
</del><span class="cx">     if (smartData-&gt;changed.frame_rect) {
</span><span class="cx">         priv-&gt;page-&gt;mainFrame().view()-&gt;frameRectsChanged();
</span><span class="cx">         smartData-&gt;changed.frame_rect = false;
</span><span class="lines">@@ -1285,10 +1087,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (evas_object_clipees_get(smartData-&gt;base.clipper))
</span><span class="cx">         evas_object_show(smartData-&gt;base.clipper);
</span><del>-    evas_object_show(smartData-&gt;backing_store);
-
-    if (priv-&gt;isCompositingActive)
-        evas_object_show(priv-&gt;compositingObject.get());
</del><ins>+    evas_object_show(smartData-&gt;image);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void _ewk_view_smart_hide(Evas_Object* ewkView)
</span><span class="lines">@@ -1297,10 +1096,7 @@
</span><span class="cx">     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
</span><span class="cx"> 
</span><span class="cx">     evas_object_hide(smartData-&gt;base.clipper);
</span><del>-    evas_object_hide(smartData-&gt;backing_store);
-
-    if (priv-&gt;isCompositingActive)
-        evas_object_hide(priv-&gt;compositingObject.get());
</del><ins>+    evas_object_hide(smartData-&gt;image);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static Eina_Bool _ewk_view_smart_contents_resize(Ewk_View_Smart_Data*, int /*width*/, int /*height*/)
</span><span class="lines">@@ -1340,7 +1136,6 @@
</span><span class="cx"> {
</span><span class="cx">     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
</span><span class="cx">     _ewk_view_repaints_flush(priv);
</span><del>-    _ewk_view_scrolls_flush(priv);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void _ewk_view_zoom_animated_mark_stop(Ewk_View_Smart_Data* smartData)
</span><span class="lines">@@ -1381,7 +1176,7 @@
</span><span class="cx">     Evas_Coord w = smartData-&gt;view.w * scale;
</span><span class="cx">     Evas_Coord h = smartData-&gt;view.h * scale;
</span><span class="cx">     Evas_Coord deltaX, deltaY, contentWidth, contentHeight;
</span><del>-    Evas_Object* clip = evas_object_clip_get(smartData-&gt;backing_store);
</del><ins>+    Evas_Object* clip = evas_object_clip_get(smartData-&gt;image);
</ins><span class="cx"> 
</span><span class="cx">     ewk_frame_contents_size_get(smartData-&gt;main_frame, &amp;contentWidth, &amp;contentHeight);
</span><span class="cx">     if (smartData-&gt;view.w &gt; 0 &amp;&amp; smartData-&gt;view.h &gt; 0) {
</span><span class="lines">@@ -1392,7 +1187,7 @@
</span><span class="cx">         deltaY = 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    evas_object_image_fill_set(smartData-&gt;backing_store, centerX + deltaX, centerY + deltaY, w, h);
</del><ins>+    evas_object_image_fill_set(smartData-&gt;image, centerX + deltaX, centerY + deltaY, w, h);
</ins><span class="cx"> 
</span><span class="cx">     if (smartData-&gt;view.w &gt; 0 &amp;&amp; smartData-&gt;view.h &gt; 0) {
</span><span class="cx">         deltaX = ((smartData-&gt;view.w - w) * centerX) / smartData-&gt;view.w;
</span><span class="lines">@@ -1414,7 +1209,7 @@
</span><span class="cx"> 
</span><span class="cx"> static void _ewk_view_smart_zoom_weak_smooth_scale_set(Ewk_View_Smart_Data* smartData, Eina_Bool smooth_scale)
</span><span class="cx"> {
</span><del>-    evas_object_image_smooth_scale_set(smartData-&gt;backing_store, smooth_scale);
</del><ins>+    evas_object_image_smooth_scale_set(smartData-&gt;image, smooth_scale);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static Eina_Bool _ewk_view_zoom_animator_cb(void* data)
</span><span class="lines">@@ -1698,7 +1493,7 @@
</span><span class="cx">     smartData-&gt;bg_color.b = blue;
</span><span class="cx">     smartData-&gt;bg_color.a = alpha;
</span><span class="cx"> 
</span><del>-    evas_object_image_alpha_set(smartData-&gt;backing_store, alpha &lt; 255);
</del><ins>+    evas_object_image_alpha_set(smartData-&gt;image, alpha &lt; 255);
</ins><span class="cx"> 
</span><span class="cx">     WebCore::FrameView* view = smartData-&gt;_priv-&gt;page-&gt;mainFrame().view();
</span><span class="cx">     if (view) {
</span><span class="lines">@@ -2939,15 +2734,6 @@
</span><span class="cx">     view-&gt;updateLayoutAndStyleIfNeededRecursive();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ewk_view_scrolls_process(Ewk_View_Smart_Data* smartData)
-{
-    EINA_SAFETY_ON_NULL_RETURN(smartData);
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
-
-    _ewk_view_smart_scrolls_process(smartData);
-    _ewk_view_scrolls_flush(priv);
-}
-
</del><span class="cx"> /* internal methods ****************************************************/
</span><span class="cx"> /**
</span><span class="cx">  * @internal
</span><span class="lines">@@ -3743,15 +3529,7 @@
</span><span class="cx">     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
</span><span class="cx">     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
</span><span class="cx"> 
</span><del>-    priv-&gt;m_rectsToScroll.append(rectToScroll);
-    priv-&gt;m_scrollOffsets.append(delta);
-
-    for (size_t i = 0; i &lt; priv-&gt;repaints.count; ++i) {
-        priv-&gt;repaints.array[i].x += delta.width();
-        priv-&gt;repaints.array[i].y += delta.height();
-    }
-
-    _ewk_view_smart_changed(smartData);
</del><ins>+    ewk_view_mark_for_sync(ewkView);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -4626,79 +4404,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void _ewk_view_accelerated_compositing_cb(void* data, Evas_Object*)
-{
-    Ewk_View_Private_Data* priv = static_cast&lt;Ewk_View_Private_Data*&gt;(data);
-
-    if (priv-&gt;isCompositingActive)
-        priv-&gt;acceleratedCompositingContext-&gt;flushAndRenderLayers();
-}
-
-bool _ewk_view_accelerated_compositing_context_create_if_needed(Evas_Object* ewkView)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
-
-    if (!priv-&gt;acceleratedCompositingContext) {
-        priv-&gt;acceleratedCompositingContext = std::make_unique&lt;WebCore::AcceleratedCompositingContext&gt;(ewkView, priv-&gt;compositingObject.get());
-        if (!priv-&gt;acceleratedCompositingContext-&gt;initialize()) {
-            priv-&gt;acceleratedCompositingContext = nullptr;
-            return false;
-        }
-    }
-    return true;
-}
-
-void _ewk_view_accelerated_compositing_object_create_if_needed(Evas_Object* ewkView)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
-
-    if (!priv-&gt;compositingObject) {
-        priv-&gt;compositingObject = adoptRef(evas_object_image_add(smartData-&gt;base.evas));
-
-        evas_object_pass_events_set(priv-&gt;compositingObject.get(), true); // Just for rendering, ignore events.
-        evas_object_image_alpha_set(priv-&gt;compositingObject.get(), true);
-        evas_object_image_content_hint_set(priv-&gt;compositingObject.get(), EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
-
-        // Set the pixel get callback.
-        evas_object_image_pixels_get_callback_set(priv-&gt;compositingObject.get(), _ewk_view_accelerated_compositing_cb, priv);
-
-        evas_object_smart_member_add(priv-&gt;compositingObject.get(), ewkView);
-    }
-
-    evas_object_image_size_set(priv-&gt;compositingObject.get(), smartData-&gt;view.w, smartData-&gt;view.h);
-    evas_object_image_fill_set(priv-&gt;compositingObject.get(), 0, 0, smartData-&gt;view.w, smartData-&gt;view.h);
-
-    evas_object_move(priv-&gt;compositingObject.get(), smartData-&gt;view.x, smartData-&gt;view.y);
-    evas_object_resize(priv-&gt;compositingObject.get(), smartData-&gt;view.w, smartData-&gt;view.h);
-    evas_object_hide(priv-&gt;compositingObject.get());
-}
-
</del><span class="cx"> void ewk_view_root_graphics_layer_set(Evas_Object* ewkView, WebCore::GraphicsLayer* rootLayer)
</span><span class="cx"> {
</span><span class="cx">     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
</span><span class="cx">     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
</span><span class="cx"> 
</span><del>-    bool active = !!rootLayer;
-    if (priv-&gt;isCompositingActive == active)
-        return;
-
-    priv-&gt;isCompositingActive = active;
-
-    if (priv-&gt;isCompositingActive) {
-        _ewk_view_accelerated_compositing_object_create_if_needed(ewkView);
-        if (_ewk_view_accelerated_compositing_context_create_if_needed(ewkView))
-            evas_object_show(priv-&gt;compositingObject.get());
-        else
-            priv-&gt;isCompositingActive = false;
-    }
-
-    if (!priv-&gt;isCompositingActive)
-        evas_object_hide(priv-&gt;compositingObject.get());
-
-    if (priv-&gt;acceleratedCompositingContext)
-        priv-&gt;acceleratedCompositingContext-&gt;attachRootGraphicsLayer(rootLayer);
</del><ins>+    priv-&gt;acceleratedCompositingContext-&gt;setRootGraphicsLayer(rootLayer);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ewk_view_mark_for_sync(Evas_Object* ewkView)
</span><span class="lines">@@ -4708,7 +4419,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Mark the image as &quot;dirty&quot; meaning it needs an update next time evas renders.
</span><span class="cx">     // It will call the pixel get callback then.
</span><del>-    evas_object_image_pixels_dirty_set(priv-&gt;compositingObject.get(), true);
</del><ins>+    evas_object_image_pixels_dirty_set(smartData-&gt;image, true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ewk_view_cursor_set(Evas_Object* ewkView, const WebCore::Cursor&amp; cursor)
</span></span></pre></div>
<a id="trunkSourceWebKiteflewkewk_viewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ewk/ewk_view.h (166636 => 166637)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ewk/ewk_view.h        2014-04-02 09:14:36 UTC (rev 166636)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.h        2014-04-02 09:23:10 UTC (rev 166637)
</span><span class="lines">@@ -370,7 +370,7 @@
</span><span class="cx">     const Ewk_View_Smart_Class *api; /**&lt; Reference to casted class instance. */
</span><span class="cx">     Evas_Object *self; /**&lt; Reference to owner object. */
</span><span class="cx">     Evas_Object *main_frame; /**&lt; Reference to main frame object. */
</span><del>-    Evas_Object *backing_store; /**&lt; Reference to backing store. */
</del><ins>+    Evas_Object *image; /**&lt; Reference to evas_object_image for drawing web content */
</ins><span class="cx">     Evas_Object *events_rect; /**&lt; The rectangle that receives mouse events. */
</span><span class="cx">     Ewk_View_Private_Data *_priv; /**&lt; Should @b never be accessed, c++ stuff. */
</span><span class="cx">     struct {
</span></span></pre>
</div>
</div>

</body>
</html>