diff options
author | Ben Murdoch <benm@google.com> | 2010-10-22 13:02:20 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-10-26 15:21:41 +0100 |
commit | a94275402997c11dd2e778633dacf4b7e630a35d (patch) | |
tree | e66f56c67e3b01f22c9c23cd932271ee9ac558ed /WebCore/platform/graphics/win/WKCACFContextFlusher.cpp | |
parent | 09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff) | |
download | external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2 |
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'WebCore/platform/graphics/win/WKCACFContextFlusher.cpp')
-rw-r--r-- | WebCore/platform/graphics/win/WKCACFContextFlusher.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
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 <WebKitSystemInterface/WebKitSystemInterface.h> #include <wtf/StdLibExtras.h> -#include <QuartzCore/CACFContext.h> 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); } } |