From a94275402997c11dd2e778633dacf4b7e630a35d Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Fri, 22 Oct 2010 13:02:20 +0100 Subject: Merge WebKit at r70209: Initial merge by Git Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e --- .../platform/graphics/win/WKCACFContextFlusher.cpp | 23 +++++++--------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'WebCore/platform/graphics/win/WKCACFContextFlusher.cpp') diff --git a/WebCore/platform/graphics/win/WKCACFContextFlusher.cpp b/WebCore/platform/graphics/win/WKCACFContextFlusher.cpp index 1685a30..d75c854 100644 --- a/WebCore/platform/graphics/win/WKCACFContextFlusher.cpp +++ b/WebCore/platform/graphics/win/WKCACFContextFlusher.cpp @@ -29,8 +29,8 @@ #include "WKCACFContextFlusher.h" +#include #include -#include namespace WebCore { @@ -48,24 +48,18 @@ WKCACFContextFlusher::~WKCACFContextFlusher() { } -void WKCACFContextFlusher::addContext(CACFContextRef context) +void WKCACFContextFlusher::addContext(WKCACFContext* context) { ASSERT(context); - if (m_contexts.add(context).second) - CFRetain(context); + m_contexts.add(context); } -void WKCACFContextFlusher::removeContext(CACFContextRef context) +void WKCACFContextFlusher::removeContext(WKCACFContext* context) { ASSERT(context); - ContextSet::iterator found = m_contexts.find(context); - if (found == m_contexts.end()) - return; - - CFRelease(*found); - m_contexts.remove(found); + m_contexts.remove(context); } void WKCACFContextFlusher::flushAllContexts() @@ -76,11 +70,8 @@ void WKCACFContextFlusher::flushAllContexts() contextsToFlush.swap(m_contexts); ContextSet::const_iterator end = contextsToFlush.end(); - for (ContextSet::const_iterator it = contextsToFlush.begin(); it != end; ++it) { - CACFContextRef context = *it; - CACFContextFlush(context); - CFRelease(context); - } + for (ContextSet::const_iterator it = contextsToFlush.begin(); it != end; ++it) + wkCACFContextFlush(*it); } } -- cgit v1.1