Changeset 82960 in webkit


Ignore:
Timestamp:
Apr 5, 2011 11:01:52 AM (13 years ago)
Author:
Adam Roben
Message:

Make accelerated compositing work in WebKit2 on Windows

LayerTreeHostCAWin uses WKCACFView to render each frame to an image, then has
DrawingAreaImpl send that image over to the UI process (just like it does for
non-accelerated rendering). It's unfortunate that this requires reading every frame back
from the GPU into system memory. More efficient solutions can be explored in the future.

Fixes <http://webkit.org/b/45567>.

Reviewed by Anders Carlsson.

  • DerivedSources.make: Added $(WebKit2) to the VPATH so that DerivedSources.make can be

found when used as a target dependency. Added rules to generate a HeaderDetection.h file on
Windows. If we can find WebKitQuartzCoreAdditions headers, we define HAVE_WKQCA in
HeaderDetection.h.

  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::setLayerHostNeedsDisplay):

  • WebProcess/WebPage/DrawingAreaImpl.h:

Added setLayerHostNeedsDisplay. Lets the layer host tell the DrawingAreaImpl that it has a
new frame to render. This should only be called by layer hosts that participate in
DrawingAreaImpl's display mechanism.

  • WebProcess/WebPage/LayerTreeHost.cpp:

(WebKit::LayerTreeHost::create): Only try to instantiate LayerTreeHostCAWin if we have
WebKitQuartzCoreAdditions, since it depends on that library.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences): Removed code that forced accelerated compositing to be
disabled on Windows.

  • WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:

(WebKit::registerDummyWindowClass): Registers the window class we use for the dummy window.
(WebKit::createDummyWindow): Creates the dummy window we pass to WKCACFView so that D3D can
determine the display mode, etc. (The window is never shown on screen.)
(WebKit::LayerTreeHostCAWin::LayerTreeHostCAWin): Initialize new members.
(WebKit::LayerTreeHostCAWin::platformInitialize): Create our dummy window and view and
associate the two. We set ourselves as the view's context's user data so that
PlatformCALayer can get our AbstractCACFLayerTreeHost pointer as needed.
(WebKit::LayerTreeHostCAWin::invalidate): Cancel any pending flushes, tear down our view,
and destroy the dummy window if no other layer host is using it.
(WebKit::LayerTreeHostCAWin::scheduleLayerFlush): Ask LayerChangesFlusher to call us back
soon to perform the flush.
(WebKit::LayerTreeHostCAWin::participatesInDisplay): Added. Returns true, since we render
each frame to an image.
(WebKit::LayerTreeHostCAWin::needsDisplay): Added. Returns true if it's now time to
displayReturns true if it's now time to display.
(WebKit::LayerTreeHostCAWin::timeUntilNextDisplay): Added. Returns how many seconds remain
before we need to display again.
(WebKit::size): Added. Helper function to get the size of a WKCACFImage.
(WebKit::toShareableBitmap): Added. Helper function to convert a WKCACFImage to a
ShareableBitmap.
(WebKit::LayerTreeHostCAWin::display): Added. Renders the next frame to an image and stuffs
the image into the UpdateInfo struct.
(WebKit::LayerTreeHostCAWin::sizeDidChange): Added. Tells the view about the new size.
(WebKit::LayerTreeHostCAWin::forceRepaint): Added. Flushes any pending changes to the view.
(WebKit::LayerTreeHostCAWin::contextDidChangeCallback): Added. WKCACFView calls this
whenever any changes made to the view or its layer tree have been flushed. Just calls
through to contextDidChange.
(WebKit::LayerTreeHostCAWin::contextDidChange): Added. Tells layers that they've started
animating, and tells the DrawingAreaImpl that we need to display again.
(WebKit::LayerTreeHostCAWin::rootLayer): Added. Gets the root layer's PlatformCALayer.
(WebKit::LayerTreeHostCAWin::addPendingAnimatedLayer): Added. Stores the layer so that we
can tell it animations have started the next time we get a contextDidChange callback.
(WebKit::LayerTreeHostCAWin::layerTreeDidChange): Added. Schedules a flush, unless we're
already in the process of flushing. This code came from WebCore::WKCACFViewLayerTreeHost.
(WebKit::LayerTreeHostCAWin::flushPendingLayerChangesNow): Added. Performs the flush. This
code was adapted from WebCore::WKCACFViewLayerTreeHost.

  • WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Wrapped this whole header in HAVE(WKQCA),

since this class only works when WebKitQuartzCoreAdditions is available. Added a bunch of
new members.

Location:
trunk/Source/WebKit2
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r82959 r82960  
     12011-04-05  Adam Roben  <aroben@apple.com>
     2
     3        Make accelerated compositing work in WebKit2 on Windows
     4
     5        LayerTreeHostCAWin uses WKCACFView to render each frame to an image, then has
     6        DrawingAreaImpl send that image over to the UI process (just like it does for
     7        non-accelerated rendering). It's unfortunate that this requires reading every frame back
     8        from the GPU into system memory. More efficient solutions can be explored in the future.
     9
     10        Fixes <http://webkit.org/b/45567>.
     11
     12        Reviewed by Anders Carlsson.
     13
     14        * DerivedSources.make: Added $(WebKit2) to the VPATH so that DerivedSources.make can be
     15        found when used as a target dependency. Added rules to generate a HeaderDetection.h file on
     16        Windows. If we can find WebKitQuartzCoreAdditions headers, we define HAVE_WKQCA in
     17        HeaderDetection.h.
     18
     19        * WebProcess/WebPage/DrawingAreaImpl.cpp:
     20        (WebKit::DrawingAreaImpl::setLayerHostNeedsDisplay):
     21        * WebProcess/WebPage/DrawingAreaImpl.h:
     22        Added setLayerHostNeedsDisplay. Lets the layer host tell the DrawingAreaImpl that it has a
     23        new frame to render. This should only be called by layer hosts that participate in
     24        DrawingAreaImpl's display mechanism.
     25
     26        * WebProcess/WebPage/LayerTreeHost.cpp:
     27        (WebKit::LayerTreeHost::create): Only try to instantiate LayerTreeHostCAWin if we have
     28        WebKitQuartzCoreAdditions, since it depends on that library.
     29
     30        * WebProcess/WebPage/WebPage.cpp:
     31        (WebKit::WebPage::updatePreferences): Removed code that forced accelerated compositing to be
     32        disabled on Windows.
     33
     34        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
     35        (WebKit::registerDummyWindowClass): Registers the window class we use for the dummy window.
     36        (WebKit::createDummyWindow): Creates the dummy window we pass to WKCACFView so that D3D can
     37        determine the display mode, etc. (The window is never shown on screen.)
     38        (WebKit::LayerTreeHostCAWin::LayerTreeHostCAWin): Initialize new members.
     39        (WebKit::LayerTreeHostCAWin::platformInitialize): Create our dummy window and view and
     40        associate the two. We set ourselves as the view's context's user data so that
     41        PlatformCALayer can get our AbstractCACFLayerTreeHost pointer as needed.
     42        (WebKit::LayerTreeHostCAWin::invalidate): Cancel any pending flushes, tear down our view,
     43        and destroy the dummy window if no other layer host is using it.
     44        (WebKit::LayerTreeHostCAWin::scheduleLayerFlush): Ask LayerChangesFlusher to call us back
     45        soon to perform the flush.
     46        (WebKit::LayerTreeHostCAWin::participatesInDisplay): Added. Returns true, since we render
     47        each frame to an image.
     48        (WebKit::LayerTreeHostCAWin::needsDisplay): Added. Returns true if it's now time to
     49        displayReturns true if it's now time to display.
     50        (WebKit::LayerTreeHostCAWin::timeUntilNextDisplay): Added. Returns how many seconds remain
     51        before we need to display again.
     52        (WebKit::size): Added. Helper function to get the size of a WKCACFImage.
     53        (WebKit::toShareableBitmap): Added. Helper function to convert a WKCACFImage to a
     54        ShareableBitmap.
     55        (WebKit::LayerTreeHostCAWin::display): Added. Renders the next frame to an image and stuffs
     56        the image into the UpdateInfo struct.
     57        (WebKit::LayerTreeHostCAWin::sizeDidChange): Added. Tells the view about the new size.
     58        (WebKit::LayerTreeHostCAWin::forceRepaint): Added. Flushes any pending changes to the view.
     59        (WebKit::LayerTreeHostCAWin::contextDidChangeCallback): Added. WKCACFView calls this
     60        whenever any changes made to the view or its layer tree have been flushed. Just calls
     61        through to contextDidChange.
     62        (WebKit::LayerTreeHostCAWin::contextDidChange): Added. Tells layers that they've started
     63        animating, and tells the DrawingAreaImpl that we need to display again.
     64        (WebKit::LayerTreeHostCAWin::rootLayer): Added. Gets the root layer's PlatformCALayer.
     65        (WebKit::LayerTreeHostCAWin::addPendingAnimatedLayer): Added. Stores the layer so that we
     66        can tell it animations have started the next time we get a contextDidChange callback.
     67        (WebKit::LayerTreeHostCAWin::layerTreeDidChange): Added. Schedules a flush, unless we're
     68        already in the process of flushing. This code came from WebCore::WKCACFViewLayerTreeHost.
     69        (WebKit::LayerTreeHostCAWin::flushPendingLayerChangesNow): Added. Performs the flush. This
     70        code was adapted from WebCore::WKCACFViewLayerTreeHost.
     71
     72        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Wrapped this whole header in HAVE(WKQCA),
     73        since this class only works when WebKitQuartzCoreAdditions is available. Added a bunch of
     74        new members.
     75
    1762011-04-04  Adam Roben  <aroben@apple.com>
    277
  • trunk/Source/WebKit2/DerivedSources.make

    r81788 r82960  
    2222
    2323VPATH = \
     24    $(WebKit2) \
    2425    $(WebKit2)/PluginProcess \
    2526    $(WebKit2)/Shared/Plugins \
     
    101102        @echo Generating message receiver for $*...
    102103        @python $(WebKit2)/Scripts/generate-messages-header.py $< > $@
     104
     105# ------------------------
     106
     107# Windows-specific rules
     108
     109ifeq ($(OS),Windows_NT)
     110
     111all : HeaderDetection.h
     112
     113HeaderDetection.h : DerivedSources.make
     114        if [ -f "$(WEBKITLIBRARIESDIR)/include/WebKitQuartzCoreAdditions/WebKitQuartzCoreAdditionsBase.h" ]; then echo "#define HAVE_WKQCA 1" > $@; else echo > $@; fi
     115
     116endif # Windows_NT
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp

    r82959 r82960  
    193193}
    194194
     195void DrawingAreaImpl::setLayerHostNeedsDisplay()
     196{
     197    ASSERT(m_layerTreeHost);
     198    ASSERT(m_layerTreeHost->participatesInDisplay());
     199    scheduleDisplay();
     200}
     201
    195202void DrawingAreaImpl::layerHostDidFlushLayers()
    196203{
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h

    r80917 r82960  
    4141    virtual ~DrawingAreaImpl();
    4242
     43    void setLayerHostNeedsDisplay();
    4344    void layerHostDidFlushLayers();
    4445
  • trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp

    r82677 r82960  
    4545PassRefPtr<LayerTreeHost> LayerTreeHost::create(WebPage* webPage)
    4646{
    47 #if PLATFORM(CA)
    4847#if PLATFORM(MAC)
    4948    return LayerTreeHostCAMac::create(webPage);
    50 #elif PLATFORM(WIN)
     49#elif PLATFORM(WIN) && HAVE(WKQCA)
    5150    return LayerTreeHostCAWin::create(webPage);
    52 #endif
    5351#else
    5452    return 0;
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r82929 r82960  
    14121412    settings->setDefaultFixedFontSize(store.getUInt32ValueForKey(WebPreferencesKey::defaultFixedFontSizeKey()));
    14131413
    1414 #if PLATFORM(WIN)
    1415     // Temporarily turn off accelerated compositing until we have a good solution for rendering it.
    1416     settings->setAcceleratedCompositingEnabled(false);
    1417     settings->setAcceleratedDrawingEnabled(false);
    1418     settings->setCanvasUsesAcceleratedDrawing(false);
    1419 #else
    14201414    settings->setAcceleratedCompositingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedCompositingEnabledKey()));
    14211415    settings->setAcceleratedDrawingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedDrawingEnabledKey()));
    14221416    settings->setCanvasUsesAcceleratedDrawing(store.getBoolValueForKey(WebPreferencesKey::canvasUsesAcceleratedDrawingKey()));
    1423 #endif
    14241417    settings->setShowDebugBorders(store.getBoolValueForKey(WebPreferencesKey::compositingBordersVisibleKey()));
    14251418    settings->setShowRepaintCounter(store.getBoolValueForKey(WebPreferencesKey::compositingRepaintCountersVisibleKey()));
  • trunk/Source/WebKit2/WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp

    r82675 r82960  
    2727#include "LayerTreeHostCAWin.h"
    2828
    29 #include <WebCore/NotImplemented.h>
    30 #include <wtf/RefPtr.h>
     29#if HAVE(WKQCA)
     30
     31#include "DrawingAreaImpl.h"
     32#include "ShareableBitmap.h"
     33#include "UpdateInfo.h"
     34#include "WebPage.h"
     35#include <WebCore/GraphicsLayerCA.h>
     36#include <WebCore/LayerChangesFlusher.h>
     37#include <WebCore/PlatformCALayer.h>
     38#include <WebCore/WebCoreInstanceHandle.h>
     39#include <WebKitQuartzCoreAdditions/WKCACFImage.h>
     40#include <WebKitQuartzCoreAdditions/WKCACFView.h>
     41#include <wtf/CurrentTime.h>
     42
     43#ifdef DEBUG_ALL
     44#pragma comment(lib, "WebKitQuartzCoreAdditions_debug")
     45#else
     46#pragma comment(lib, "WebKitQuartzCoreAdditions")
     47#endif
     48
     49using namespace WebCore;
    3150
    3251namespace WebKit {
     52
     53static HWND dummyWindow;
     54static LPCWSTR dummyWindowClass = L"LayerTreeHostCAWindowClass";
     55static size_t validLayerTreeHostCount;
     56
     57static void registerDummyWindowClass()
     58{
     59    static bool didRegister;
     60    if (didRegister)
     61        return;
     62    didRegister = true;
     63
     64    WNDCLASSW wndClass = {0};
     65    wndClass.lpszClassName = dummyWindowClass;
     66    wndClass.lpfnWndProc = ::DefWindowProcW;
     67    wndClass.hInstance = instanceHandle();
     68
     69    ::RegisterClassW(&wndClass);
     70}
     71
     72// This window is never shown. It is only needed so that D3D can determine the display mode, etc.
     73static HWND createDummyWindow()
     74{
     75    registerDummyWindowClass();
     76    return ::CreateWindowW(dummyWindowClass, 0, WS_POPUP, 0, 0, 10, 10, 0, 0, instanceHandle(), 0);
     77}
    3378
    3479PassRefPtr<LayerTreeHostCAWin> LayerTreeHostCAWin::create(WebPage* webPage)
     
    4186LayerTreeHostCAWin::LayerTreeHostCAWin(WebPage* webPage)
    4287    : LayerTreeHostCA(webPage)
     88    , m_isFlushingLayerChanges(false)
     89    , m_nextDisplayTime(0)
    4390{
    4491}
     
    5097void LayerTreeHostCAWin::platformInitialize(LayerTreeContext&)
    5198{
    52     // FIXME: <http://webkit.org/b/45567> Implement this!
    53     notImplemented();
     99    ++validLayerTreeHostCount;
     100    if (!dummyWindow)
     101        dummyWindow = createDummyWindow();
     102
     103    m_view.adoptCF(WKCACFViewCreate(kWKCACFViewDrawingDestinationImage));
     104    WKCACFViewSetContextUserData(m_view.get(), static_cast<AbstractCACFLayerTreeHost*>(this));
     105    WKCACFViewSetLayer(m_view.get(), rootLayer()->platformLayer());
     106    WKCACFViewSetContextDidChangeCallback(m_view.get(), contextDidChangeCallback, this);
     107
     108    CGRect bounds = m_webPage->bounds();
     109    WKCACFViewUpdate(m_view.get(), dummyWindow, &bounds);
     110}
     111
     112void LayerTreeHostCAWin::invalidate()
     113{
     114    LayerChangesFlusher::shared().cancelPendingFlush(this);
     115
     116    WKCACFViewUpdate(m_view.get(), 0, 0);
     117    WKCACFViewSetContextUserData(m_view.get(), 0);
     118    WKCACFViewSetLayer(m_view.get(), 0);
     119    WKCACFViewSetContextDidChangeCallback(m_view.get(), 0, 0);
     120
     121    LayerTreeHostCA::invalidate();
     122
     123    if (--validLayerTreeHostCount)
     124        return;
     125    ::DestroyWindow(dummyWindow);
     126    dummyWindow = 0;
    54127}
    55128
    56129void LayerTreeHostCAWin::scheduleLayerFlush()
    57130{
    58     // FIXME: <http://webkit.org/b/45567> Implement this!
    59     notImplemented();
     131    LayerChangesFlusher::shared().flushPendingLayerChangesSoon(this);
     132}
     133
     134bool LayerTreeHostCAWin::participatesInDisplay()
     135{
     136    return true;
     137}
     138
     139bool LayerTreeHostCAWin::needsDisplay()
     140{
     141    return timeUntilNextDisplay() <= 0;
     142}
     143
     144double LayerTreeHostCAWin::timeUntilNextDisplay()
     145{
     146    return m_nextDisplayTime - currentTime();
     147}
     148
     149static IntSize size(WKCACFImageRef image)
     150{
     151    return IntSize(WKCACFImageGetWidth(image), WKCACFImageGetHeight(image));
     152}
     153
     154static PassRefPtr<ShareableBitmap> toShareableBitmap(WKCACFImageRef image)
     155{
     156    size_t fileMappingSize;
     157    HANDLE mapping = WKCACFImageCopyFileMapping(image, &fileMappingSize);
     158    if (!mapping)
     159        return 0;
     160
     161    RefPtr<SharedMemory> sharedMemory = SharedMemory::adopt(mapping, fileMappingSize, SharedMemory::ReadWrite);
     162    if (!sharedMemory) {
     163        ::CloseHandle(mapping);
     164        return 0;
     165    }
     166
     167    // WKCACFImage never has an alpha channel.
     168    return ShareableBitmap::create(size(image), 0, sharedMemory.release());
     169}
     170
     171void LayerTreeHostCAWin::display(UpdateInfo& updateInfo)
     172{
     173    CGPoint imageOrigin;
     174    CFTimeInterval nextDrawTime;
     175    RetainPtr<WKCACFImageRef> image(AdoptCF, WKCACFViewCopyDrawnImage(m_view.get(), &imageOrigin, &nextDrawTime));
     176    m_nextDisplayTime = nextDrawTime - CACurrentMediaTime() + currentTime();
     177    if (!image)
     178        return;
     179    RefPtr<ShareableBitmap> bitmap = toShareableBitmap(image.get());
     180    if (!bitmap)
     181        return;
     182    if (!bitmap->createHandle(updateInfo.bitmapHandle))
     183        return;
     184    updateInfo.updateRectBounds = IntRect(IntPoint(imageOrigin.x, m_webPage->size().height() - imageOrigin.y - bitmap->size().height()), bitmap->size());
     185    updateInfo.updateRects.append(updateInfo.updateRectBounds);
     186}
     187
     188void LayerTreeHostCAWin::sizeDidChange(const IntSize& newSize)
     189{
     190    LayerTreeHostCA::sizeDidChange(newSize);
     191    CGRect bounds = CGRectMake(0, 0, newSize.width(), newSize.height());
     192    WKCACFViewUpdate(m_view.get(), dummyWindow, &bounds);
     193    WKCACFViewFlushContext(m_view.get());
     194}
     195
     196void LayerTreeHostCAWin::forceRepaint()
     197{
     198    LayerTreeHostCA::forceRepaint();
     199    WKCACFViewFlushContext(m_view.get());
     200}
     201
     202void LayerTreeHostCAWin::contextDidChangeCallback(WKCACFViewRef view, void* info)
     203{
     204    LayerTreeHostCAWin* host = static_cast<LayerTreeHostCAWin*>(info);
     205    ASSERT_ARG(view, view == host->m_view);
     206    host->contextDidChange();
     207}
     208
     209void LayerTreeHostCAWin::contextDidChange()
     210{
     211    // Send currentTime to the pending animations. This function is called by CACF in a callback
     212    // which occurs after the drawInContext calls. So currentTime is very close to the time
     213    // the animations actually start
     214    double currentTime = WTF::currentTime();
     215
     216    HashSet<RefPtr<PlatformCALayer> >::iterator end = m_pendingAnimatedLayers.end();
     217    for (HashSet<RefPtr<PlatformCALayer> >::iterator it = m_pendingAnimatedLayers.begin(); it != end; ++it)
     218        (*it)->animationStarted(currentTime);
     219
     220    m_pendingAnimatedLayers.clear();
     221
     222    m_nextDisplayTime = 0;
     223    static_cast<DrawingAreaImpl*>(m_webPage->drawingArea())->setLayerHostNeedsDisplay();
     224}
     225
     226PlatformCALayer* LayerTreeHostCAWin::rootLayer() const
     227{
     228    return static_cast<GraphicsLayerCA*>(LayerTreeHostCA::rootLayer())->platformCALayer();
     229}
     230
     231void LayerTreeHostCAWin::addPendingAnimatedLayer(PassRefPtr<PlatformCALayer> layer)
     232{
     233    m_pendingAnimatedLayers.add(layer);
     234}
     235
     236void LayerTreeHostCAWin::layerTreeDidChange()
     237{
     238    if (m_isFlushingLayerChanges) {
     239        // The layer tree is changing as a result of flushing GraphicsLayer changes to their
     240        // underlying PlatformCALayers. We'll flush those changes to the context as part of that
     241        // process, so there's no need to schedule another flush here.
     242        return;
     243    }
     244
     245    // The layer tree is changing as a result of someone modifying a PlatformCALayer that doesn't
     246    // have a corresponding GraphicsLayer. Schedule a flush since we won't schedule one through the
     247    // normal GraphicsLayer mechanisms.
     248    LayerChangesFlusher::shared().flushPendingLayerChangesSoon(this);
     249}
     250
     251void LayerTreeHostCAWin::flushPendingLayerChangesNow()
     252{
     253    RefPtr<LayerTreeHostCA> protector(this);
     254
     255    m_isFlushingLayerChanges = true;
     256
     257    // Flush changes stored up in GraphicsLayers to their underlying PlatformCALayers, if
     258    // requested.
     259    performScheduledLayerFlush();
     260
     261    // Flush changes stored up in PlatformCALayers to the context so they will be rendered.
     262    WKCACFViewFlushContext(m_view.get());
     263
     264    m_isFlushingLayerChanges = false;
    60265}
    61266
    62267} // namespace WebKit
     268
     269#endif // HAVE(WKQCA)
  • trunk/Source/WebKit2/WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h

    r82675 r82960  
    2727#define LayerTreeHostCAWin_h
    2828
     29#include "HeaderDetection.h"
     30
     31#if HAVE(WKQCA)
     32
    2933#include "LayerTreeHostCA.h"
     34#include <WebCore/AbstractCACFLayerTreeHost.h>
     35#include <wtf/HashSet.h>
     36#include <wtf/RetainPtr.h>
     37
     38typedef struct _WKCACFView* WKCACFViewRef;
    3039
    3140namespace WebKit {
    3241
    33 class LayerTreeHostCAWin : public LayerTreeHostCA {
     42class LayerTreeHostCAWin : public LayerTreeHostCA, private WebCore::AbstractCACFLayerTreeHost {
    3443public:
    3544    static PassRefPtr<LayerTreeHostCAWin> create(WebPage*);
     
    3948    explicit LayerTreeHostCAWin(WebPage*);
    4049
     50    static void contextDidChangeCallback(WKCACFViewRef, void* info);
     51    void contextDidChange();
     52
    4153    // LayerTreeHost
     54    virtual void invalidate();
     55    virtual void forceRepaint();
     56    virtual void sizeDidChange(const WebCore::IntSize& newSize);
    4257    virtual void scheduleLayerFlush();
     58    virtual bool participatesInDisplay();
     59    virtual bool needsDisplay();
     60    virtual double timeUntilNextDisplay();
     61    virtual void display(UpdateInfo&);
    4362
    4463    // LayerTreeHostCA
    4564    virtual void platformInitialize(LayerTreeContext&);
     65
     66    // AbstractCACFLayerTreeHost
     67    virtual WebCore::PlatformCALayer* rootLayer() const;
     68    virtual void addPendingAnimatedLayer(PassRefPtr<WebCore::PlatformCALayer>);
     69    virtual void layerTreeDidChange();
     70    virtual void flushPendingLayerChangesNow();
     71
     72    RetainPtr<WKCACFViewRef> m_view;
     73    HashSet<RefPtr<WebCore::PlatformCALayer> > m_pendingAnimatedLayers;
     74    bool m_isFlushingLayerChanges;
     75    double m_nextDisplayTime;
    4676};
    4777
    4878} // namespace WebKit
    4979
     80#endif // HAVE(WKQCA)
     81
    5082#endif // LayerTreeHostCAWin_h
Note: See TracChangeset for help on using the changeset viewer.