Changeset 128372 in webkit


Ignore:
Timestamp:
Sep 12, 2012 3:36:08 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Source/WebCore: [GTK] Protect RedirectedXCompositeWindow with USE(GLX) when building the clutter AC backend
https://bugs.webkit.org/show_bug.cgi?id=96165

Patch by Siraj Razick <siraj.razick@collabora.co.uk> on 2012-09-12
Reviewed by Martin Robinson.

RedirectedXCompositeWindow.cpp and RedirectedXCompositeWindow.h files requies openGL specific
headers to compile so when we build webkit clutter AC backend these files failed to compile,
This patch protects these two files with USE(GLX) when building webkit with Clutter AC backend.

No new tests since this is a build fix

  • platform/gtk/RedirectedXCompositeWindow.cpp:
  • platform/gtk/RedirectedXCompositeWindow.h:

protects both the files with USE(GLX)

Source/WebKit/gtk: [GTK] Update AcceleratedCompositingContextClutter to match AcceleratedCompositingContext.h API update
https://bugs.webkit.org/show_bug.cgi?id=96165

Patch by Siraj Razick <siraj.razick@collabora.co.uk> on 2012-09-12
Reviewed by Martin Robinson.

Due to the refactoring done in bug #90085 AcceleratedCompositingContext API changed, as a result
AcceleratedCompositingContextClutter doesn't compile anymore. This patch is to update the
AcceleratedCompositingContextClutter implementations to match the API update, and Make webkit
AC backend compile again.

  • WebCoreSupport/AcceleratedCompositingContextClutter.cpp:

(WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
(WebKit::AcceleratedCompositingContext::~AcceleratedCompositingContext):
(WebKit::AcceleratedCompositingContext::setRootCompositingLayer):
(WebKit::AcceleratedCompositingContext::setNonCompositedContentsNeedDisplay):
(WebKit::flushAndRenderLayersCallback):
(WebKit::AcceleratedCompositingContext::scheduleLayerFlush):
(WebKit::AcceleratedCompositingContext::flushPendingLayerChanges):
(WebKit::AcceleratedCompositingContext::flushAndRenderLayers):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r128371 r128372  
     12012-09-12  Siraj Razick  <siraj.razick@collabora.co.uk>
     2
     3        [GTK] Protect RedirectedXCompositeWindow with USE(GLX) when building the clutter AC backend
     4        https://bugs.webkit.org/show_bug.cgi?id=96165
     5
     6        Reviewed by Martin Robinson.
     7
     8        RedirectedXCompositeWindow.cpp and RedirectedXCompositeWindow.h files requies openGL specific
     9        headers to compile so when we build webkit clutter AC backend these files failed to compile,
     10        This patch protects these two files with USE(GLX) when building webkit with Clutter AC backend.
     11
     12        No new tests since this is a build fix
     13
     14        * platform/gtk/RedirectedXCompositeWindow.cpp:
     15        * platform/gtk/RedirectedXCompositeWindow.h:
     16        protects both the files with USE(GLX)
     17
    1182012-09-12  Ojan Vafai  <ojan@chromium.org>
    219
  • trunk/Source/WebCore/platform/gtk/RedirectedXCompositeWindow.cpp

    r126182 r128372  
    2828#include "RedirectedXCompositeWindow.h"
    2929
     30#if USE(GLX)
    3031#include "GLContextGLX.h"
    3132#include <GL/glx.h>
     
    215216
    216217} // namespace WebCore
     218
     219#endif // USE(GLX)
  • trunk/Source/WebCore/platform/gtk/RedirectedXCompositeWindow.h

    r126182 r128372  
    2727#ifndef  RedirectedXCompositeWindow_h
    2828#define  RedirectedXCompositeWindow_h
     29
     30#if USE(GLX)
    2931
    3032#include "GLContextGLX.h"
     
    6971} // namespace WebCore
    7072
     73#endif // USE(GLX)
     74
    7175#endif // RedirectedXCompositeWindow_h
  • trunk/Source/WebKit/gtk/ChangeLog

    r128231 r128372  
     12012-09-12  Siraj Razick  <siraj.razick@collabora.co.uk>
     2
     3        [GTK] Update AcceleratedCompositingContextClutter to match AcceleratedCompositingContext.h API update
     4        https://bugs.webkit.org/show_bug.cgi?id=96165
     5
     6        Reviewed by Martin Robinson.
     7
     8        Due to the refactoring done in bug #90085 AcceleratedCompositingContext API changed, as a result
     9        AcceleratedCompositingContextClutter doesn't compile anymore. This patch is to update the
     10        AcceleratedCompositingContextClutter implementations to match the API update, and Make webkit
     11        AC backend compile again.
     12
     13        * WebCoreSupport/AcceleratedCompositingContextClutter.cpp:
     14        (WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
     15        (WebKit::AcceleratedCompositingContext::~AcceleratedCompositingContext):
     16        (WebKit::AcceleratedCompositingContext::setRootCompositingLayer):
     17        (WebKit::AcceleratedCompositingContext::setNonCompositedContentsNeedDisplay):
     18        (WebKit::flushAndRenderLayersCallback):
     19        (WebKit::AcceleratedCompositingContext::scheduleLayerFlush):
     20        (WebKit::AcceleratedCompositingContext::flushPendingLayerChanges):
     21        (WebKit::AcceleratedCompositingContext::flushAndRenderLayers):
     22
    1232012-09-11  Arnaud Renevier  <a.renevier@sisa.samsung.com>
    224
  • trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp

    r120359 r128372  
    3737AcceleratedCompositingContext::AcceleratedCompositingContext(WebKitWebView* webView)
    3838    : m_webView(webView)
    39     , m_syncTimerCallbackId(0)
     39    , m_layerFlushTimerCallbackId(0)
    4040    , m_rootGraphicsLayer(0)
    4141    , m_rootLayerEmbedder(0)
     
    4545AcceleratedCompositingContext::~AcceleratedCompositingContext()
    4646{
    47     if (m_syncTimerCallbackId)
    48         g_source_remove(m_syncTimerCallbackId);
     47    if (m_layerFlushTimerCallbackId)
     48        g_source_remove(m_layerFlushTimerCallbackId);
    4949}
    5050
     
    6060}
    6161
    62 void AcceleratedCompositingContext::attachRootGraphicsLayer(GraphicsLayer* graphicsLayer)
     62void AcceleratedCompositingContext::setRootCompositingLayer(GraphicsLayer* graphicsLayer)
    6363{
    6464    if (!graphicsLayer) {
     
    8787}
    8888
    89 void AcceleratedCompositingContext::scheduleRootLayerRepaint(const IntRect& rect)
     89void AcceleratedCompositingContext::setNonCompositedContentsNeedDisplay(const IntRect& rect)
    9090{
    9191    if (!m_rootGraphicsLayer)
     
    113113}
    114114
    115 static gboolean syncLayersTimeoutCallback(AcceleratedCompositingContext* context)
     115static gboolean flushAndRenderLayersCallback(AcceleratedCompositingContext* context)
    116116{
    117     context->syncLayersTimeout();
     117    context->flushAndRenderLayers();
    118118    return FALSE;
    119119}
    120120
    121 void AcceleratedCompositingContext::markForSync()
     121void AcceleratedCompositingContext::scheduleLayerFlush()
    122122{
    123     if (m_syncTimerCallbackId)
     123    if (m_layerFlushTimerCallbackId)
    124124        return;
    125125
    126126    // We use a GLib timer because otherwise GTK+ event handling during
    127127    // dragging can starve WebCore timers, which have a lower priority.
    128     m_syncTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 0, reinterpret_cast<GSourceFunc>(syncLayersTimeoutCallback), this, 0);
     128    m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 0, reinterpret_cast<GSourceFunc>(flushAndRenderLayersCallback), this, 0);
    129129}
    130130
    131 void AcceleratedCompositingContext::syncLayersNow()
     131bool AcceleratedCompositingContext::flushPendingLayerChanges()
    132132{
    133133    if (m_rootGraphicsLayer)
    134134        m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
    135135
    136     core(m_webView)->mainFrame()->view()->syncCompositingStateIncludingSubframes();
     136    return core(m_webView)->mainFrame()->view()->syncCompositingStateIncludingSubframes();
    137137}
    138138
    139 void AcceleratedCompositingContext::syncLayersTimeout()
     139void AcceleratedCompositingContext::flushAndRenderLayers()
    140140{
    141     m_syncTimerCallbackId = 0;
    142     syncLayersNow();
     141    m_layerFlushTimerCallbackId = 0;
     142    flushPendingLayerChanges();
    143143    if (!m_rootGraphicsLayer)
    144144        return;
Note: See TracChangeset for help on using the changeset viewer.