Commit bc7c2770 authored by aroben@apple.com's avatar aroben@apple.com
Browse files

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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 862e3837
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
......@@ -557,6 +557,10 @@
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"
>
......@@ -573,10 +577,6 @@
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"
>
......@@ -24897,10 +24897,6 @@
<Filter
Name="loader"
>
<File
RelativePath="..\loader\ResourceLoadScheduler.h"
>
</File>
<File
RelativePath="..\loader\CrossOriginAccessControl.cpp"
>
......@@ -25129,6 +25125,10 @@
RelativePath="..\loader\ResourceLoadScheduler.cpp"
>
</File>
<File
RelativePath="..\loader\ResourceLoadScheduler.h"
>
</File>
<File
RelativePath="..\loader\SinkDocument.cpp"
>
......@@ -25477,7 +25477,7 @@
RelativePath="..\platform\ContentType.h"
>
</File>
<File
<File
RelativePath="..\platform\ContextMenu.cpp"
>
</File>
......@@ -25485,7 +25485,7 @@
RelativePath="..\platform\ContextMenu.h"
>
</File>
<File
<File
RelativePath="..\platform\ContextMenuItem.cpp"
>
</File>
......@@ -27395,46 +27395,6 @@
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"
>
......@@ -28952,7 +28912,7 @@
</File>
</Filter>
</Filter>
</Filter>
</Filter>
<Filter
Name="network"
>
......@@ -38528,88 +38488,88 @@
>
</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"
......@@ -43697,7 +43657,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_Cairo_CFLite|Win32"
Name="Debug_All|Win32"
ExcludedFromBuild="true"
>
<Tool
......@@ -43705,7 +43665,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release_Cairo_CFLite|Win32"
Name="Debug_Cairo_CFLite|Win32"
ExcludedFromBuild="true"
>
<Tool
......@@ -43713,7 +43673,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_All|Win32"
Name="Release_Cairo_CFLite|Win32"
ExcludedFromBuild="true"
>
<Tool
......@@ -43721,7 +43681,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release_LTCG|Win32"
Name="Debug_All|Win32"
ExcludedFromBuild="true"
>
<Tool
......@@ -43734,7 +43694,7 @@
>
</File>
<File
RelativePath="..\dom\EventTarget.cpp"
RelativePath="..\dom\EventQueue.cpp"
>
<FileConfiguration
Name="Debug|Win32"
......@@ -43769,7 +43729,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_All|Win32"
Name="Release_LTCG|Win32"
ExcludedFromBuild="true"
>
<Tool
......@@ -43789,8 +43749,8 @@
RelativePath="..\dom\EventTarget.h"
>
</File>
<File
RelativePath="..\dom\EventQueue.cpp"
<File
RelativePath="..\dom\EventTarget.cpp"
>
<FileConfiguration
Name="Debug|Win32"
/*
* 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)
/*
* 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
......@@ -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();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment