Changeset 76370 in webkit


Ignore:
Timestamp:
Jan 21, 2011 11:32:59 AM (13 years ago)
Author:
Adam Roben
Message:

Rename WKCACFLayerRenderer[Client] to CACFLayerTreeHost[Client]

Also renamed a few functions and data members to match.

Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't

Reviewed by Simon Fraser.

Source/WebCore:

  • WebCore.vcproj/WebCore.vcproj: Updated files' names and paths.
  • WebCore.vcproj/WebCoreQuartzCore.vsprops: Added platform/graphics/ca/win to the include

path.

  • WebCore.vcproj/copyForwardingHeaders.cmd: Copy headers from platform/graphics/ca/win, too.
  • platform/graphics/ca/win/CACFLayerTreeHost.cpp: Renamed from Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp.
  • platform/graphics/ca/win/CACFLayerTreeHost.h: Renamed from Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.h.
  • platform/graphics/ca/win/PlatformCALayerWin.cpp:
  • platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
  • platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:

Updated for renames.

Source/WebKit/win:

Update for WKCACFLayerRenderer -> CACFLayerTreeHost rename

Also renamed WebView::m_layerRenderer to WebView::m_layerTreeHost to match.

  • WebPreferences.cpp:
  • WebView.cpp:

(WebView::setAcceleratedCompositing): Also made sure to remove our HWND from the layer tree
host before we get rid of the layer tree host itself.

  • WebView.h:

Source/WebKit2:

Update for WKCACFLayerRenderer -> CACFLayerView rename

  • WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Just removed all the unnecessary #includes.
Location:
trunk/Source
Files:
13 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r76368 r76370  
     12011-01-21  Adam Roben  <aroben@apple.com>
     2
     3        Rename WKCACFLayerRenderer[Client] to CACFLayerTreeHost[Client]
     4
     5        Also renamed a few functions and data members to match.
     6
     7        Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
     8
     9        Reviewed by Simon Fraser.
     10
     11        * WebCore.vcproj/WebCore.vcproj: Updated files' names and paths.
     12
     13        * WebCore.vcproj/WebCoreQuartzCore.vsprops: Added platform/graphics/ca/win to the include
     14        path.
     15
     16        * WebCore.vcproj/copyForwardingHeaders.cmd: Copy headers from platform/graphics/ca/win, too.
     17
     18        * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Renamed from Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp.
     19        * platform/graphics/ca/win/CACFLayerTreeHost.h: Renamed from Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.h.
     20
     21        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
     22        * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
     23        * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
     24        Updated for renames.
     25
    1262011-01-21  Patrick Gansterer  <paroga@paroga.com>
    227
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r76258 r76370  
    2739727397                                        </File>
    2739827398                                        <File
    27399                                                 RelativePath="..\platform\graphics\win\WKCACFLayerRenderer.cpp"
    27400                                                 >
    27401                                                 <FileConfiguration
    27402                                                         Name="Debug_Cairo_CFLite|Win32"
    27403                                                         ExcludedFromBuild="true"
    27404                                                         >
    27405                                                         <Tool
    27406                                                                 Name="VCCLCompilerTool"
    27407                                                         />
    27408                                                 </FileConfiguration>
    27409                                                 <FileConfiguration
    27410                                                         Name="Release_Cairo_CFLite|Win32"
    27411                                                         ExcludedFromBuild="true"
    27412                                                         >
    27413                                                         <Tool
    27414                                                                 Name="VCCLCompilerTool"
    27415                                                         />
    27416                                                 </FileConfiguration>
    27417                                         </File>
    27418                                         <File
    27419                                                 RelativePath="..\platform\graphics\win\WKCACFLayerRenderer.h"
    27420                                                 >
    27421                                                 <FileConfiguration
    27422                                                         Name="Debug_Cairo_CFLite|Win32"
    27423                                                         ExcludedFromBuild="true"
    27424                                                         >
    27425                                                         <Tool
    27426                                                                 Name="VCCustomBuildTool"
    27427                                                         />
    27428                                                 </FileConfiguration>
    27429                                                 <FileConfiguration
    27430                                                         Name="Release_Cairo_CFLite|Win32"
    27431                                                         ExcludedFromBuild="true"
    27432                                                         >
    27433                                                         <Tool
    27434                                                                 Name="VCCustomBuildTool"
    27435                                                         />
    27436                                                 </FileConfiguration>
    27437                                         </File>
    27438                                         <File
    2743927399                                                RelativePath="..\platform\graphics\win\WKCAImageQueue.cpp"
    2744027400                                                >
     
    2889528855                                                Name="win"
    2889628856                                                >
     28857                                                <File
     28858                                                        RelativePath="..\platform\graphics\ca\win\CACFLayerTreeHost.cpp"
     28859                                                        >
     28860                                                        <FileConfiguration
     28861                                                                Name="Debug_Cairo_CFLite|Win32"
     28862                                                                ExcludedFromBuild="true"
     28863                                                                >
     28864                                                                <Tool
     28865                                                                        Name="VCCLCompilerTool"
     28866                                                                />
     28867                                                        </FileConfiguration>
     28868                                                        <FileConfiguration
     28869                                                                Name="Release_Cairo_CFLite|Win32"
     28870                                                                ExcludedFromBuild="true"
     28871                                                                >
     28872                                                                <Tool
     28873                                                                        Name="VCCLCompilerTool"
     28874                                                                />
     28875                                                        </FileConfiguration>
     28876                                                </File>
     28877                                                <File
     28878                                                        RelativePath="..\platform\graphics\ca\win\CACFLayerTreeHost.h"
     28879                                                        >
     28880                                                        <FileConfiguration
     28881                                                                Name="Debug_Cairo_CFLite|Win32"
     28882                                                                ExcludedFromBuild="true"
     28883                                                                >
     28884                                                                <Tool
     28885                                                                        Name="VCCustomBuildTool"
     28886                                                                />
     28887                                                        </FileConfiguration>
     28888                                                        <FileConfiguration
     28889                                                                Name="Release_Cairo_CFLite|Win32"
     28890                                                                ExcludedFromBuild="true"
     28891                                                                >
     28892                                                                <Tool
     28893                                                                        Name="VCCustomBuildTool"
     28894                                                                />
     28895                                                        </FileConfiguration>
     28896                                                </File>
    2889728897                                                <File
    2889828898                                                        RelativePath="..\platform\graphics\ca\win\PlatformCAAnimationWin.cpp"
  • trunk/Source/WebCore/WebCore.vcproj/WebCoreQuartzCore.vsprops

    r73060 r76370  
    77        <Tool
    88                Name="VCCLCompilerTool"
    9                 AdditionalIncludeDirectories="&quot;$(DXSDK_DIR)\Include&quot;"
     9                AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\platform\graphics\ca\win&quot;;&quot;$(DXSDK_DIR)\Include&quot;"
    1010                PreprocessorDefinitions="QUARTZCORE_DLL"
    1111        />
  • trunk/Source/WebCore/WebCore.vcproj/copyForwardingHeaders.cmd

    r75262 r76370  
    4040xcopy /y /d "%ProjectDir%..\platform\graphics\transforms\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
    4141xcopy /y /d "%ProjectDir%..\platform\graphics\ca\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
     42xcopy /y /d "%ProjectDir%..\platform\graphics\ca\win\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
    4243xcopy /y /d "%ProjectDir%..\platform\graphics\win\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
    4344xcopy /y /d "%ProjectDir%..\platform\graphics\win\%1\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
  • trunk/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp

    r76368 r76370  
    3232#endif
    3333
    34 #include "WKCACFLayerRenderer.h"
     34#include "CACFLayerTreeHost.h"
    3535
    3636#include "PlatformCALayer.h"
     
    117117}
    118118
    119 bool WKCACFLayerRenderer::acceleratedCompositingAvailable()
     119bool CACFLayerTreeHost::acceleratedCompositingAvailable()
    120120{
    121121    static bool available;
     
    165165    }
    166166
    167     RefPtr<WKCACFLayerRenderer> testLayerRenderer = WKCACFLayerRenderer::create();
    168     testLayerRenderer->setHostWindow(testWindow);
    169     available = testLayerRenderer->createRenderer();
     167    RefPtr<CACFLayerTreeHost> host = CACFLayerTreeHost::create();
     168    host->setWindow(testWindow);
     169    available = host->createRenderer();
    170170    ::DestroyWindow(testWindow);
    171171
     
    173173}
    174174
    175 PassRefPtr<WKCACFLayerRenderer> WKCACFLayerRenderer::create()
     175PassRefPtr<CACFLayerTreeHost> CACFLayerTreeHost::create()
    176176{
    177177    if (!acceleratedCompositingAvailable())
    178178        return 0;
    179     return adoptRef(new WKCACFLayerRenderer());
    180 }
    181 
    182 WKCACFLayerRenderer::WKCACFLayerRenderer()
     179    return adoptRef(new CACFLayerTreeHost());
     180}
     181
     182CACFLayerTreeHost::CACFLayerTreeHost()
    183183    : m_client(0)
    184184    , m_mightBeAbleToCreateDeviceLater(true)
    185185    , m_rootLayer(PlatformCALayer::create(PlatformCALayer::LayerTypeRootLayer, 0))
    186186    , m_context(wkCACFContextCreate())
    187     , m_hostWindow(0)
    188     , m_renderTimer(this, &WKCACFLayerRenderer::renderTimerFired)
     187    , m_window(0)
     188    , m_renderTimer(this, &CACFLayerTreeHost::renderTimerFired)
    189189    , m_mustResetLostDeviceBeforeRendering(false)
    190190    , m_shouldFlushPendingGraphicsLayerChanges(false)
     
    202202    // Scrolling will affect only the position of the scroll layer without affecting the bounds.
    203203
    204     m_rootLayer->setName("WKCACFLayerRenderer rootLayer");
     204    m_rootLayer->setName("CACFLayerTreeHost rootLayer");
    205205    m_rootLayer->setAnchorPoint(FloatPoint3D(0, 0, 0));
    206206    m_rootLayer->setGeometryFlipped(true);
     
    221221}
    222222
    223 WKCACFLayerRenderer::~WKCACFLayerRenderer()
    224 {
    225     setHostWindow(0);
     223CACFLayerTreeHost::~CACFLayerTreeHost()
     224{
     225    setWindow(0);
    226226    wkCACFContextDestroy(m_context);
    227227}
    228228
    229 void WKCACFLayerRenderer::setHostWindow(HWND window)
    230 {
    231     if (window == m_hostWindow)
    232         return;
    233 
    234     if (m_hostWindow)
     229void CACFLayerTreeHost::setWindow(HWND window)
     230{
     231    if (window == m_window)
     232        return;
     233
     234    if (m_window)
    235235        destroyRenderer();
    236236
    237     m_hostWindow = window;
    238 
    239     if (m_hostWindow)
     237    m_window = window;
     238
     239    if (m_window)
    240240        createRenderer();
    241241}
    242242
    243 PlatformCALayer* WKCACFLayerRenderer::rootLayer() const
     243PlatformCALayer* CACFLayerTreeHost::rootLayer() const
    244244{
    245245    return m_rootLayer.get();
    246246}
    247247
    248 void WKCACFLayerRenderer::addPendingAnimatedLayer(PassRefPtr<PlatformCALayer> layer)
     248void CACFLayerTreeHost::addPendingAnimatedLayer(PassRefPtr<PlatformCALayer> layer)
    249249{
    250250    m_pendingAnimatedLayers.add(layer);
    251251}
    252252
    253 void WKCACFLayerRenderer::setRootChildLayer(PlatformCALayer* layer)
     253void CACFLayerTreeHost::setRootChildLayer(PlatformCALayer* layer)
    254254{
    255255    m_rootLayer->removeAllSublayers();
     
    259259}
    260260   
    261 void WKCACFLayerRenderer::layerTreeDidChange()
     261void CACFLayerTreeHost::layerTreeDidChange()
    262262{
    263263    renderSoon();
    264264}
    265265
    266 bool WKCACFLayerRenderer::createRenderer()
     266bool CACFLayerTreeHost::createRenderer()
    267267{
    268268    if (m_d3dDevice || !m_mightBeAbleToCreateDeviceLater)
     
    272272    D3DPRESENT_PARAMETERS parameters = initialPresentationParameters();
    273273
    274     if (!d3d() || !::IsWindow(m_hostWindow))
     274    if (!d3d() || !::IsWindow(m_window))
    275275        return false;
    276276
     
    279279    // size eventually, and then the backbuffer size will get reset.
    280280    RECT rect;
    281     GetClientRect(m_hostWindow, &rect);
     281    GetClientRect(m_window, &rect);
    282282
    283283    if (rect.left-rect.right == 0 || rect.bottom-rect.top == 0) {
     
    297297
    298298    COMPtr<IDirect3DDevice9> device;
    299     if (FAILED(d3d()->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, m_hostWindow, behaviorFlags, &parameters, &device))) {
     299    if (FAILED(d3d()->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, m_window, behaviorFlags, &parameters, &device))) {
    300300        // In certain situations (e.g., shortly after waking from sleep), Direct3DCreate9() will
    301301        // return an IDirect3D9 for which IDirect3D9::CreateDevice will always fail. In case we
     
    330330    wkCACFContextSetD3DDevice(m_context, m_d3dDevice.get());
    331331
    332     if (IsWindow(m_hostWindow))
     332    if (IsWindow(m_window))
    333333        m_rootLayer->setBounds(bounds());
    334334
     
    336336}
    337337
    338 void WKCACFLayerRenderer::destroyRenderer()
     338void CACFLayerTreeHost::destroyRenderer()
    339339{
    340340    wkCACFContextSetLayer(m_context, m_rootLayer->platformLayer());
     
    352352}
    353353
    354 void WKCACFLayerRenderer::resize()
     354void CACFLayerTreeHost::resize()
    355355{
    356356    if (!m_d3dDevice)
     
    397397}
    398398
    399 void WKCACFLayerRenderer::renderTimerFired(Timer<WKCACFLayerRenderer>*)
     399void CACFLayerTreeHost::renderTimerFired(Timer<CACFLayerTreeHost>*)
    400400{
    401401    paint();
    402402}
    403403
    404 void WKCACFLayerRenderer::paint()
     404void CACFLayerTreeHost::paint()
    405405{
    406406    createRenderer();
     
    412412
    413413    Vector<CGRect> dirtyRects;
    414     getDirtyRects(m_hostWindow, dirtyRects);
     414    getDirtyRects(m_window, dirtyRects);
    415415    render(dirtyRects);
    416416}
    417417
    418 void WKCACFLayerRenderer::render(const Vector<CGRect>& windowDirtyRects)
     418void CACFLayerTreeHost::render(const Vector<CGRect>& windowDirtyRects)
    419419{
    420420    ASSERT(m_d3dDevice);
     
    518518}
    519519
    520 void WKCACFLayerRenderer::renderSoon()
     520void CACFLayerTreeHost::renderSoon()
    521521{
    522522    if (!m_renderTimer.isActive())
     
    524524}
    525525
    526 void WKCACFLayerRenderer::flushPendingGraphicsLayerChangesSoon()
     526void CACFLayerTreeHost::flushPendingGraphicsLayerChangesSoon()
    527527{
    528528    m_shouldFlushPendingGraphicsLayerChanges = true;
     
    530530}
    531531
    532 CGRect WKCACFLayerRenderer::bounds() const
     532CGRect CACFLayerTreeHost::bounds() const
    533533{
    534534    RECT clientRect;
    535     GetClientRect(m_hostWindow, &clientRect);
     535    GetClientRect(m_window, &clientRect);
    536536
    537537    return winRectToCGRect(clientRect);
    538538}
    539539
    540 void WKCACFLayerRenderer::initD3DGeometry()
     540void CACFLayerTreeHost::initD3DGeometry()
    541541{
    542542    ASSERT(m_d3dDevice);
     
    555555}
    556556
    557 bool WKCACFLayerRenderer::resetDevice(ResetReason reason)
     557bool CACFLayerTreeHost::resetDevice(ResetReason reason)
    558558{
    559559    ASSERT(m_d3dDevice);
  • trunk/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.h

    r76368 r76370  
    2424 */
    2525
    26 #ifndef WKCACFLayerRenderer_h
    27 #define WKCACFLayerRenderer_h
     26#ifndef CACFLayerTreeHost_h
     27#define CACFLayerTreeHost_h
    2828
    2929#if USE(ACCELERATED_COMPOSITING)
     
    5050class PlatformCALayer;
    5151
    52 class WKCACFLayerRendererClient {
     52class CACFLayerTreeHostClient {
    5353public:
    54     virtual ~WKCACFLayerRendererClient() { }
     54    virtual ~CACFLayerTreeHostClient() { }
    5555    virtual bool shouldRender() const = 0;
    5656    virtual void flushPendingGraphicsLayerChanges() { }
    5757};
    5858
    59 // FIXME: Currently there is a WKCACFLayerRenderer for each WebView and each
     59// FIXME: Currently there is a CACFLayerTreeHost for each WebView and each
    6060// has its own CARenderOGLContext and Direct3DDevice9, which is inefficient.
    6161// (https://bugs.webkit.org/show_bug.cgi?id=31855)
    62 class WKCACFLayerRenderer : public RefCounted<WKCACFLayerRenderer> {
     62class CACFLayerTreeHost : public RefCounted<CACFLayerTreeHost> {
    6363    friend PlatformCALayer;
    6464
    6565public:
    66     static PassRefPtr<WKCACFLayerRenderer> create();
    67     ~WKCACFLayerRenderer();
     66    static PassRefPtr<CACFLayerTreeHost> create();
     67    ~CACFLayerTreeHost();
    6868
    6969    static bool acceleratedCompositingAvailable();
    7070
    71     void setClient(WKCACFLayerRendererClient* client) { m_client = client; }
     71    void setClient(CACFLayerTreeHostClient* client) { m_client = client; }
    7272
    7373    void setRootChildLayer(PlatformCALayer*);
    7474    void layerTreeDidChange();
    75     void setHostWindow(HWND);
     75    void setWindow(HWND);
    7676    void paint();
    7777    void resize();
     
    8383
    8484private:
    85     WKCACFLayerRenderer();
     85    CACFLayerTreeHost();
    8686
    8787    bool createRenderer();
    8888    void destroyRenderer();
    8989    void renderSoon();
    90     void renderTimerFired(Timer<WKCACFLayerRenderer>*);
     90    void renderTimerFired(Timer<CACFLayerTreeHost>*);
    9191
    9292    CGRect bounds() const;
     
    102102    void render(const Vector<CGRect>& dirtyRects = Vector<CGRect>());
    103103
    104     WKCACFLayerRendererClient* m_client;
     104    CACFLayerTreeHostClient* m_client;
    105105    bool m_mightBeAbleToCreateDeviceLater;
    106106    COMPtr<IDirect3DDevice9> m_d3dDevice;
     
    108108    RefPtr<PlatformCALayer> m_rootChildLayer;
    109109    WKCACFContext* m_context;
    110     HWND m_hostWindow;
    111     Timer<WKCACFLayerRenderer> m_renderTimer;
     110    HWND m_window;
     111    Timer<CACFLayerTreeHost> m_renderTimer;
    112112    bool m_mustResetLostDeviceBeforeRendering;
    113113    bool m_shouldFlushPendingGraphicsLayerChanges;
     
    123123#endif // USE(ACCELERATED_COMPOSITING)
    124124
    125 #endif // WKCACFLayerRenderer_h
     125#endif // CACFLayerTreeHost_h
  • trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp

    r75985 r76370  
    3030#include "PlatformCALayer.h"
    3131
     32#include "CACFLayerTreeHost.h"
    3233#include "Font.h"
    3334#include "GraphicsContext.h"
    3435#include "PlatformCALayerWinInternal.h"
    35 #include "WKCACFLayerRenderer.h"
    3636#include <QuartzCore/CoreAnimationCF.h>
    3737#include <WebKitSystemInterface/WebKitSystemInterface.h>
     
    6666}
    6767
    68 static WKCACFLayerRenderer* rendererForLayer(const PlatformCALayer* layer)
    69 {
    70     // We need the WKCACFLayerRenderer associated with this layer, which is stored in the UserData of the CACFContext
     68static CACFLayerTreeHost* layerTreeHostForLayer(const PlatformCALayer* layer)
     69{
     70    // We need the CACFLayerTreeHost associated with this layer, which is stored in the UserData of the CACFContext
    7171    void* userData = wkCACFLayerGetContextUserData(layer->platformLayer());
    7272    if (!userData)
    7373        return 0;
    7474
    75     return static_cast<WKCACFLayerRenderer*>(userData);
     75    return static_cast<CACFLayerTreeHost*>(userData);
    7676}
    7777
     
    157157PlatformCALayer* PlatformCALayer::rootLayer() const
    158158{
    159     WKCACFLayerRenderer* renderer = rendererForLayer(this);
    160     return renderer ? renderer->rootLayer() : 0;
     159    CACFLayerTreeHost* host = layerTreeHostForLayer(this);
     160    return host ? host->rootLayer() : 0;
    161161}
    162162
     
    168168void PlatformCALayer::setNeedsCommit()
    169169{
    170     WKCACFLayerRenderer* renderer = rendererForLayer(this);
    171     if (renderer)
    172         renderer->layerTreeDidChange();
     170    CACFLayerTreeHost* host = layerTreeHostForLayer(this);
     171    if (host)
     172        host->layerTreeDidChange();
    173173}
    174174
     
    270270    setNeedsCommit();
    271271
    272     // Tell the renderer about it so we can fire the start animation event
    273     WKCACFLayerRenderer* renderer = rendererForLayer(this);
    274     if (renderer)
    275         renderer->addPendingAnimatedLayer(this);
     272    // Tell the host about it so we can fire the start animation event
     273    CACFLayerTreeHost* host = layerTreeHostForLayer(this);
     274    if (host)
     275        host->addPendingAnimatedLayer(this);
    276276}
    277277
     
    284284    CACFLayerRemoveAnimation(m_layer.get(), s.get());
    285285
    286     // We don't "remove" a layer from WKCACFLayerRenderer when it loses an animation.
     286    // We don't "remove" a layer from CACFLayerTreeHost when it loses an animation.
    287287    // There may be other active animations on the layer and if an animation
    288288    // callback is fired on a layer without any animations no harm is done.
  • trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp

    r76256 r76370  
    4141    , m_hwnd(0)
    4242#if USE(ACCELERATED_COMPOSITING)
    43     , m_layerRenderer(WKCACFLayerRenderer::create())
     43    , m_layerTreeHost(CACFLayerTreeHost::create())
    4444#endif
    4545{
     
    8282
    8383#if USE(ACCELERATED_COMPOSITING)
    84     m_layerRenderer->setHostWindow(m_hwnd);
     84    m_layerTreeHost->setWindow(m_hwnd);
    8585#endif
    8686
     
    108108        return;
    109109
    110     m_layerRenderer->setRootChildLayer(m_rootChild.get());
     110    m_layerTreeHost->setRootChildLayer(m_rootChild.get());
    111111    PlatformCALayer* rootLayer = m_rootChild->rootLayer();
    112112    CGRect rootBounds = m_rootChild->rootLayer()->bounds();
     
    148148        m_hwnd = 0;
    149149#if USE(ACCELERATED_COMPOSITING)
    150         m_layerRenderer->setHostWindow(0);
     150        m_layerTreeHost->setWindow(0);
    151151#endif
    152152        break;
     
    157157                break;
    158158#if USE(ACCELERATED_COMPOSITING)
    159             m_layerRenderer->resize();
     159            m_layerTreeHost->resize();
    160160            PlatformCALayer* rootLayer = m_rootChild->rootLayer();
    161161            CGRect rootBounds = m_rootChild->rootLayer()->bounds();
     
    167167    case WM_PAINT:
    168168#if USE(ACCELERATED_COMPOSITING)
    169         m_layerRenderer->paint();
     169        m_layerTreeHost->paint();
    170170        ::ValidateRect(m_hwnd, 0);
    171171#endif
  • trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h

    r76256 r76370  
    2828
    2929#if USE(ACCELERATED_COMPOSITING)
     30#include "CACFLayerTreeHost.h"
    3031#include "PlatformCALayer.h"
    31 #include "WKCACFLayerRenderer.h"
    3232#endif
    3333
     
    5959
    6060#if USE(ACCELERATED_COMPOSITING)
    61     WKCACFLayerRenderer* layerRenderer() const { return m_layerRenderer.get(); }
     61    CACFLayerTreeHost* layerView() const { return m_layerTreeHost.get(); }
    6262
    6363    PlatformCALayer* rootChildLayer() const { return m_rootChild.get(); }
     
    7171    MediaPlayerPrivateFullscreenClient* m_client;
    7272#if USE(ACCELERATED_COMPOSITING)
    73     RefPtr<WKCACFLayerRenderer> m_layerRenderer;
     73    RefPtr<CACFLayerTreeHost> m_layerTreeHost;
    7474    RefPtr<PlatformCALayer> m_rootChild;
    7575#endif
  • trunk/Source/WebKit/win/ChangeLog

    r76359 r76370  
     12011-01-21  Adam Roben  <aroben@apple.com>
     2
     3        Update for WKCACFLayerRenderer -> CACFLayerTreeHost rename
     4
     5        Also renamed WebView::m_layerRenderer to WebView::m_layerTreeHost to match.
     6
     7        Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
     8
     9        Reviewed by Simon Fraser.
     10
     11        * WebPreferences.cpp:
     12        * WebView.cpp:
     13        (WebView::setAcceleratedCompositing): Also made sure to remove our HWND from the layer tree
     14        host before we get rid of the layer tree host itself.
     15        * WebView.h:
     16
    1172011-01-21  Adam Roben  <aroben@apple.com>
    218
  • trunk/Source/WebKit/win/WebPreferences.cpp

    r74041 r76370  
    3030
    3131#include "COMPtr.h"
     32#include "WebLocalizableStrings.h"
    3233#include "WebNotificationCenter.h"
    3334#include "WebPreferenceKeysPrivate.h"
    3435
    35 #include <wtf/text/StringHash.h>
     36#include <CoreFoundation/CoreFoundation.h>
     37#include <WebCore/CACFLayerTreeHost.h>
    3638#include <WebCore/FileSystem.h>
    3739#include <WebCore/Font.h>
    3840#include <WebCore/PlatformString.h>
    39 #include <WebCore/WKCACFLayerRenderer.h>
    40 #include "WebLocalizableStrings.h"
    41 
    42 #include <CoreFoundation/CoreFoundation.h>
    4341#include <limits>
    4442#include <shlobj.h>
     
    4745#include <wtf/OwnArrayPtr.h>
    4846#include <wtf/text/CString.h>
     47#include <wtf/text/StringHash.h>
    4948
    5049#if PLATFORM(CG)
     
    14471446{
    14481447#if USE(ACCELERATED_COMPOSITING)
    1449     *enabled = WKCACFLayerRenderer::acceleratedCompositingAvailable() && boolValueForKey(CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey));
     1448    *enabled = CACFLayerTreeHost::acceleratedCompositingAvailable() && boolValueForKey(CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey));
    14501449#else
    14511450    *enabled = FALSE;
  • trunk/Source/WebKit/win/WebView.cpp

    r76359 r76370  
    389389
    390390#if USE(ACCELERATED_COMPOSITING)
    391     ASSERT(!m_layerRenderer);
     391    ASSERT(!m_layerTreeHost);
    392392    ASSERT(!m_backingLayer);
    393393#endif
     
    884884
    885885#if USE(ACCELERATED_COMPOSITING)
    886     if (m_layerRenderer)
    887         m_layerRenderer->resize();
     886    if (m_layerTreeHost)
     887        m_layerTreeHost->resize();
    888888    if (m_backingLayer) {
    889889        m_backingLayer->setSize(newSize);
     
    995995        if (isAcceleratedCompositing()) {
    996996            // FIXME: We need to paint into dc (if provided). <http://webkit.org/b/52578>
    997             m_layerRenderer->paint();
     997            m_layerTreeHost->paint();
    998998            ::ValidateRect(m_viewWindow, 0);
    999999            return;
     
    62756275void WebView::flushPendingGraphicsLayerChangesSoon()
    62766276{
    6277     if (!m_layerRenderer)
     6277    if (!m_layerTreeHost)
    62786278        return;
    6279     m_layerRenderer->flushPendingGraphicsLayerChangesSoon();
     6279    m_layerTreeHost->flushPendingGraphicsLayerChangesSoon();
    62806280}
    62816281
    62826282void WebView::setAcceleratedCompositing(bool accelerated)
    62836283{
    6284     if (m_isAcceleratedCompositing == accelerated || !WKCACFLayerRenderer::acceleratedCompositingAvailable())
     6284    if (m_isAcceleratedCompositing == accelerated || !CACFLayerTreeHost::acceleratedCompositingAvailable())
    62856285        return;
    62866286
    62876287    if (accelerated) {
    6288         m_layerRenderer = WKCACFLayerRenderer::create();
    6289         if (m_layerRenderer) {
     6288        m_layerTreeHost = CACFLayerTreeHost::create();
     6289        if (m_layerTreeHost) {
    62906290            m_isAcceleratedCompositing = true;
    62916291
    6292             m_layerRenderer->setClient(this);
     6292            m_layerTreeHost->setClient(this);
    62936293            ASSERT(m_viewWindow);
    6294             m_layerRenderer->setHostWindow(m_viewWindow);
     6294            m_layerTreeHost->setWindow(m_viewWindow);
    62956295
    62966296            // FIXME: We could perhaps get better performance by never allowing this layer to
     
    63056305            m_backingLayer->setNeedsDisplay();
    63066306
    6307             m_layerRenderer->setRootChildLayer(PlatformCALayer::platformCALayer(m_backingLayer->platformLayer()));
     6307            m_layerTreeHost->setRootChildLayer(PlatformCALayer::platformCALayer(m_backingLayer->platformLayer()));
    63086308
    63096309            // We aren't going to be using our backing store while we're in accelerated compositing
     
    63136313        }
    63146314    } else {
    6315         ASSERT(m_layerRenderer);
    6316         m_layerRenderer->setClient(0);
    6317         m_layerRenderer = 0;
     6315        ASSERT(m_layerTreeHost);
     6316        m_layerTreeHost->setClient(0);
     6317        m_layerTreeHost->setWindow(0);
     6318        m_layerTreeHost = 0;
    63186319        m_backingLayer = 0;
    63196320        m_isAcceleratedCompositing = false;
  • trunk/Source/WebKit/win/WebView.h

    r76359 r76370  
    4141
    4242#if USE(ACCELERATED_COMPOSITING)
     43#include <WebCore/CACFLayerTreeHost.h>
    4344#include <WebCore/PlatformCALayer.h>
    44 #include <WebCore/WKCACFLayerRenderer.h>
    4545#endif
    4646
     
    7272#if USE(ACCELERATED_COMPOSITING)
    7373    , WebCore::GraphicsLayerClient
    74     , WebCore::WKCACFLayerRendererClient
     74    , WebCore::CACFLayerTreeHostClient
    7575#endif
    7676{
     
    948948    virtual bool showRepaintCounter() const;
    949949
    950     // WKCACFLayerRendererClient
     950    // CACFLayerTreeHostClient
    951951    virtual bool shouldRender() const;
    952952    virtual void flushPendingGraphicsLayerChanges();
     
    10571057    void setAcceleratedCompositing(bool);
    10581058
    1059     RefPtr<WebCore::WKCACFLayerRenderer> m_layerRenderer;
     1059    RefPtr<WebCore::CACFLayerTreeHost> m_layerTreeHost;
    10601060    OwnPtr<WebCore::GraphicsLayer> m_backingLayer;
    10611061    bool m_isAcceleratedCompositing;
  • trunk/Source/WebKit2/ChangeLog

    r76361 r76370  
     12011-01-21  Adam Roben  <aroben@apple.com>
     2
     3        Update for WKCACFLayerRenderer -> CACFLayerView rename
     4
     5        Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
     6
     7        Reviewed by Simon Fraser.
     8
     9        * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Just removed all the unnecessary
     10        #includes.
     11
    1122011-01-20  Darin Adler  <darin@apple.com>
    213
  • trunk/Source/WebKit2/WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp

    r72212 r76370  
    2727
    2828#include "LayerBackedDrawingArea.h"
    29 
    30 #include "DrawingAreaProxyMessageKinds.h"
    31 #include "WebPage.h"
    32 #include "WebProcess.h"
    33 #include <WebCore/Frame.h>
    34 #include <WebCore/FrameView.h>
    35 #include <WebCore/GraphicsLayer.h>
    36 #include <WebCore/Page.h>
    37 #include <WebCore/WKCACFLayerRenderer.h>
    38 #include <WebCore/WebCoreInstanceHandle.h>
    3929
    4030using namespace WebCore;
Note: See TracChangeset for help on using the changeset viewer.