Remove WKCACFContextFlusher
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 17:12:56 +0000 (17:12 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 17:12:56 +0000 (17:12 +0000)
It wasn't doing anything.

Fixes <http://webkit.org/b/52752> WKCACFContextFlusher is unused

Reviewed by Simon Fraser.

* WebCore.vcproj/WebCore.vcproj: Removed WKCACFContextFlusher. Also let VS have its way with
the file.

* platform/graphics/win/WKCACFContextFlusher.cpp: Removed.
* platform/graphics/win/WKCACFContextFlusher.h: Removed.

* platform/graphics/win/WKCACFLayerRenderer.cpp:
(WebCore::WKCACFLayerRenderer::~WKCACFLayerRenderer):
(WebCore::WKCACFLayerRenderer::layerTreeDidChange):
Stop telling WKCACFContextFlusher about our context, since it never did anything with it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@76258 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/platform/graphics/win/WKCACFContextFlusher.cpp [deleted file]
Source/WebCore/platform/graphics/win/WKCACFContextFlusher.h [deleted file]
Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp

index 927322de9e216ed795796b80967e2f337bd16e9f..35fb363e7165c12073ec9bc0855771281d448b2a 100644 (file)
@@ -1,3 +1,24 @@
+2011-01-19  Adam Roben  <aroben@apple.com>
+
+        Remove WKCACFContextFlusher
+
+        It wasn't doing anything.
+
+        Fixes <http://webkit.org/b/52752> WKCACFContextFlusher is unused
+
+        Reviewed by Simon Fraser.
+
+        * WebCore.vcproj/WebCore.vcproj: Removed WKCACFContextFlusher. Also let VS have its way with
+        the file.
+
+        * platform/graphics/win/WKCACFContextFlusher.cpp: Removed.
+        * platform/graphics/win/WKCACFContextFlusher.h: Removed.
+
+        * platform/graphics/win/WKCACFLayerRenderer.cpp:
+        (WebCore::WKCACFLayerRenderer::~WKCACFLayerRenderer):
+        (WebCore::WKCACFLayerRenderer::layerTreeDidChange):
+        Stop telling WKCACFContextFlusher about our context, since it never did anything with it.
+
 2011-01-19  Adam Roben  <aroben@apple.com>
 
         Only flush our own context when we get resized
index e1a13a555561d95e9b375265d63bf723319fc5b4..5c30699f9f8939eb0eb294c364f1afc04fbca650 100755 (executable)
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\HTMLNames.h"
                                >
                        </File>
+                       <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\InjectedScriptSource.h"
+                               >
+                       </File>
                        <File
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\InspectorBackendDispatcher.cpp"
                                >
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\InspectorFrontend.h"
                                >
                        </File>
-                       <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\InjectedScriptSource.h"
-                               >
-                       </File>
                        <File
                                RelativePath="$(ConfigurationBuildDir)\obj\WebCore\DerivedSources\JSAbstractWorker.cpp"
                                >
                <Filter
                        Name="loader"
                        >
-                       <File
-                               RelativePath="..\loader\ResourceLoadScheduler.h"
-                               >
-                       </File>
                        <File
                                RelativePath="..\loader\CrossOriginAccessControl.cpp"
                                >
                                RelativePath="..\loader\ResourceLoadScheduler.cpp"
                                >
                        </File>
+                       <File
+                               RelativePath="..\loader\ResourceLoadScheduler.h"
+                               >
+                       </File>
                        <File
                                RelativePath="..\loader\SinkDocument.cpp"
                                >
                                RelativePath="..\platform\ContentType.h"
                                >
                        </File>
-            <File
+                       <File
                                RelativePath="..\platform\ContextMenu.cpp"
                                >
                        </File>
                                RelativePath="..\platform\ContextMenu.h"
                                >
                        </File>
-            <File
+                       <File
                                RelativePath="..\platform\ContextMenuItem.cpp"
                                >
                        </File>
                                                RelativePath="..\platform\graphics\win\UniscribeController.h"
                                                >
                                        </File>
-                                       <File
-                                               RelativePath="..\platform\graphics\win\WKCACFContextFlusher.cpp"
-                                               >
-                                               <FileConfiguration
-                                                       Name="Debug_Cairo_CFLite|Win32"
-                                                       ExcludedFromBuild="true"
-                                                       >
-                                                       <Tool
-                                                               Name="VCCLCompilerTool"
-                                                       />
-                                               </FileConfiguration>
-                                               <FileConfiguration
-                                                       Name="Release_Cairo_CFLite|Win32"
-                                                       ExcludedFromBuild="true"
-                                                       >
-                                                       <Tool
-                                                               Name="VCCLCompilerTool"
-                                                       />
-                                               </FileConfiguration>
-                                       </File>
-                                       <File
-                                               RelativePath="..\platform\graphics\win\WKCACFContextFlusher.h"
-                                               >
-                                               <FileConfiguration
-                                                       Name="Debug_Cairo_CFLite|Win32"
-                                                       ExcludedFromBuild="true"
-                                                       >
-                                                       <Tool
-                                                               Name="VCCustomBuildTool"
-                                                       />
-                                               </FileConfiguration>
-                                               <FileConfiguration
-                                                       Name="Release_Cairo_CFLite|Win32"
-                                                       ExcludedFromBuild="true"
-                                                       >
-                                                       <Tool
-                                                               Name="VCCustomBuildTool"
-                                                       />
-                                               </FileConfiguration>
-                                       </File>
                                        <File
                                                RelativePath="..\platform\graphics\win\WKCACFLayerRenderer.cpp"
                                                >
                                                </File>
                                        </Filter>
                                </Filter>
-            </Filter>
+                       </Filter>
                        <Filter
                                Name="network"
                                >
                                >
                        </File>
                        <Filter
-                           Name="mathml"
-                           >
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLBlock.cpp"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLBlock.h"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLFenced.cpp"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLFenced.h"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLFraction.cpp"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLFraction.h"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLMath.cpp"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLMath.h"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLOperator.cpp"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLOperator.h"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLRoot.cpp"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLRoot.h"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLRow.cpp"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLRow.h"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLSquareRoot.cpp"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLSquareRoot.h"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLSubSup.cpp"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLSubSup.h"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLUnderOver.cpp"
-                                   >
-                           </File>
-                           <File
-                                   RelativePath="..\rendering\mathml\RenderMathMLUnderOver.h"
-                                   >
-                           </File>
+                               Name="mathml"
+                               >
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLBlock.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLBlock.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLFenced.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLFenced.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLFraction.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLFraction.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLMath.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLMath.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLOperator.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLOperator.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLRoot.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLRoot.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLRow.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLRow.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLSquareRoot.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLSquareRoot.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLSubSup.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLSubSup.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLUnderOver.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\rendering\mathml\RenderMathMLUnderOver.h"
+                                       >
+                               </File>
                        </Filter>
                        <Filter
                                Name="style"
                                        />
                                </FileConfiguration>
                                <FileConfiguration
-                                       Name="Debug_Cairo_CFLite|Win32"
+                                       Name="Debug_All|Win32"
                                        ExcludedFromBuild="true"
                                        >
                                        <Tool
                                        />
                                </FileConfiguration>
                                <FileConfiguration
-                                       Name="Release_Cairo_CFLite|Win32"
+                                       Name="Debug_Cairo_CFLite|Win32"
                                        ExcludedFromBuild="true"
                                        >
                                        <Tool
                                        />
                                </FileConfiguration>
                                <FileConfiguration
-                                       Name="Debug_All|Win32"
+                                       Name="Release_Cairo_CFLite|Win32"
                                        ExcludedFromBuild="true"
                                        >
                                        <Tool
                                        />
                                </FileConfiguration>
                                <FileConfiguration
-                                       Name="Release_LTCG|Win32"
+                                       Name="Debug_All|Win32"
                                        ExcludedFromBuild="true"
                                        >
                                        <Tool
                                >
                        </File>
                        <File
-                               RelativePath="..\dom\EventTarget.cpp"
+                               RelativePath="..\dom\EventQueue.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                        />
                                </FileConfiguration>
                                <FileConfiguration
-                                       Name="Debug_All|Win32"
+                                       Name="Release_LTCG|Win32"
                                        ExcludedFromBuild="true"
                                        >
                                        <Tool
                                RelativePath="..\dom\EventTarget.h"
                                >
                        </File>
-                 <File
-                               RelativePath="..\dom\EventQueue.cpp"
+                       <File
+                               RelativePath="..\dom\EventTarget.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
diff --git a/Source/WebCore/platform/graphics/win/WKCACFContextFlusher.cpp b/Source/WebCore/platform/graphics/win/WKCACFContextFlusher.cpp
deleted file mode 100644 (file)
index d75c854..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#include "config.h"
-
-#if USE(ACCELERATED_COMPOSITING)
-
-#include "WKCACFContextFlusher.h"
-
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
-#include <wtf/StdLibExtras.h>
-
-namespace WebCore {
-
-WKCACFContextFlusher& WKCACFContextFlusher::shared()
-{
-    DEFINE_STATIC_LOCAL(WKCACFContextFlusher, flusher, ());
-    return flusher;
-}
-
-WKCACFContextFlusher::WKCACFContextFlusher()
-{
-}
-
-WKCACFContextFlusher::~WKCACFContextFlusher()
-{
-}
-
-void WKCACFContextFlusher::addContext(WKCACFContext* context)
-{
-    ASSERT(context);
-
-    m_contexts.add(context);
-}
-
-void WKCACFContextFlusher::removeContext(WKCACFContext* context)
-{
-    ASSERT(context);
-
-    m_contexts.remove(context);
-}
-
-void WKCACFContextFlusher::flushAllContexts()
-{
-    // addContext might get called beneath CACFContextFlush, and we don't want m_contexts to change while
-    // we're iterating over it, so we move the contexts into a local ContextSet and iterate over that instead.
-    ContextSet contextsToFlush;
-    contextsToFlush.swap(m_contexts);
-
-    ContextSet::const_iterator end = contextsToFlush.end();
-    for (ContextSet::const_iterator it = contextsToFlush.begin(); it != end; ++it)
-        wkCACFContextFlush(*it);
-}
-
-}
-
-#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/Source/WebCore/platform/graphics/win/WKCACFContextFlusher.h b/Source/WebCore/platform/graphics/win/WKCACFContextFlusher.h
deleted file mode 100644 (file)
index 78e848b..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#ifndef WKCACFContextFlusher_h
-#define WKCACFContextFlusher_h
-
-#if USE(ACCELERATED_COMPOSITING)
-
-#include <wtf/Noncopyable.h>
-
-#include <wtf/HashSet.h>
-
-struct WKCACFContext;
-
-namespace WebCore {
-
-class WKCACFContextFlusher {
-    WTF_MAKE_NONCOPYABLE(WKCACFContextFlusher);
-public:
-    static WKCACFContextFlusher& shared();
-
-    void addContext(WKCACFContext*);
-    void removeContext(WKCACFContext*);
-
-    void flushAllContexts();
-
-private:
-    WKCACFContextFlusher();
-    ~WKCACFContextFlusher();
-
-    typedef HashSet<WKCACFContext*> ContextSet;
-    ContextSet m_contexts;
-};
-
-}
-
-#endif // USE(ACCELERATED_COMPOSITING)
-
-#endif // WKCACFContextFlusher_h
index ba804b9aa66e3e5791637637e19871d8ea67417b..74172d6f78a289c2645c0d69c13d5aafb9fc8169 100644 (file)
@@ -34,7 +34,6 @@
 #include "WKCACFLayerRenderer.h"
 
 #include "PlatformCALayer.h"
-#include "WKCACFContextFlusher.h"
 #include "WebCoreInstanceHandle.h"
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
 #include <limits.h>
@@ -224,7 +223,6 @@ WKCACFLayerRenderer::WKCACFLayerRenderer()
 WKCACFLayerRenderer::~WKCACFLayerRenderer()
 {
     setHostWindow(0);
-    WKCACFContextFlusher::shared().removeContext(m_context);
     wkCACFContextDestroy(m_context);
 }
 
@@ -262,7 +260,6 @@ void WKCACFLayerRenderer::setRootChildLayer(PlatformCALayer* layer)
    
 void WKCACFLayerRenderer::layerTreeDidChange()
 {
-    WKCACFContextFlusher::shared().addContext(m_context);
     renderSoon();
 }