Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/canvas/CanvasFontCache.h" 5 #include "core/html/canvas/CanvasFontCache.h"
6 6
7 #include "core/css/parser/CSSParser.h" 7 #include "core/css/parser/CSSParser.h"
8 #include "core/css/resolver/StyleResolver.h" 8 #include "core/css/resolver/StyleResolver.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/style/ComputedStyle.h" 10 #include "core/style/ComputedStyle.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 126 }
127 m_mainCachePurgePreventer.reset(); 127 m_mainCachePurgePreventer.reset();
128 Platform::current()->currentThread()->removeTaskObserver(this); 128 Platform::current()->currentThread()->removeTaskObserver(this);
129 m_pruningScheduled = false; 129 m_pruningScheduled = false;
130 } 130 }
131 131
132 void CanvasFontCache::schedulePruningIfNeeded() { 132 void CanvasFontCache::schedulePruningIfNeeded() {
133 if (m_pruningScheduled) 133 if (m_pruningScheduled)
134 return; 134 return;
135 ASSERT(!m_mainCachePurgePreventer); 135 ASSERT(!m_mainCachePurgePreventer);
136 m_mainCachePurgePreventer = wrapUnique(new FontCachePurgePreventer); 136 m_mainCachePurgePreventer = WTF::wrapUnique(new FontCachePurgePreventer);
137 Platform::current()->currentThread()->addTaskObserver(this); 137 Platform::current()->currentThread()->addTaskObserver(this);
138 m_pruningScheduled = true; 138 m_pruningScheduled = true;
139 } 139 }
140 140
141 bool CanvasFontCache::isInCache(const String& fontString) { 141 bool CanvasFontCache::isInCache(const String& fontString) {
142 return m_fetchedFonts.find(fontString) != m_fetchedFonts.end(); 142 return m_fetchedFonts.find(fontString) != m_fetchedFonts.end();
143 } 143 }
144 144
145 void CanvasFontCache::pruneAll() { 145 void CanvasFontCache::pruneAll() {
146 m_fetchedFonts.clear(); 146 m_fetchedFonts.clear();
147 m_fontLRUList.clear(); 147 m_fontLRUList.clear();
148 m_fontsResolvedUsingDefaultStyle.clear(); 148 m_fontsResolvedUsingDefaultStyle.clear();
149 } 149 }
150 150
151 DEFINE_TRACE(CanvasFontCache) { 151 DEFINE_TRACE(CanvasFontCache) {
152 visitor->trace(m_fetchedFonts); 152 visitor->trace(m_fetchedFonts);
153 visitor->trace(m_document); 153 visitor->trace(m_document);
154 } 154 }
155 155
156 } // namespace blink 156 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698