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

Unified Diff: Source/core/fetch/FontResource.cpp

Issue 63713002: Initiate webfont download right after style recalc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix zoom-zoom-coords.xhtml Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« Source/core/css/CSSFontFaceSource.cpp ('K') | « Source/core/fetch/FontResource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/FontResource.cpp
diff --git a/Source/core/fetch/FontResource.cpp b/Source/core/fetch/FontResource.cpp
index de1688b9c51135f0f26d58241af07371671d5666..cbe9aab0eb108011a4b397c84b5d32ee8e8b232d 100644
--- a/Source/core/fetch/FontResource.cpp
+++ b/Source/core/fetch/FontResource.cpp
@@ -79,7 +79,6 @@ void FontResource::beginLoadIfNeeded(ResourceFetcher* dl)
ResourceClientWalker<FontResourceClient> walker(m_clients);
while (FontResourceClient* client = walker.next())
client->didStartFontLoad(this);
- m_histograms.loadStarted();
}
}
@@ -165,36 +164,4 @@ void FontResource::checkNotify()
c->fontLoaded(this);
}
-void FontResource::willUseFontData()
-{
- if (!isLoaded())
- m_histograms.willUseFontData();
-}
-
-FontResource::FontResourceHistograms::~FontResourceHistograms()
-{
- if (m_styledTime > 0)
- blink::Platform::current()->histogramEnumeration("WebFont.Resource.UsageType", StyledButNotUsed, UsageTypeMax);
-}
-
-void FontResource::FontResourceHistograms::willUseFontData()
-{
- if (!m_styledTime)
- m_styledTime = currentTimeMS();
-}
-
-void FontResource::FontResourceHistograms::loadStarted()
-{
- if (m_styledTime < 0)
- return;
- if (!m_styledTime) {
- blink::Platform::current()->histogramEnumeration("WebFont.Resource.UsageType", NotStyledButUsed, UsageTypeMax);
- } else {
- int duration = static_cast<int>(currentTimeMS() - m_styledTime);
- blink::Platform::current()->histogramCustomCounts("WebFont.Resource.StyleRecalcToDownloadLatency", duration, 0, 10000, 50);
- blink::Platform::current()->histogramEnumeration("WebFont.Resource.UsageType", StyledAndUsed, UsageTypeMax);
- }
- m_styledTime = -1;
-}
-
}
« Source/core/css/CSSFontFaceSource.cpp ('K') | « Source/core/fetch/FontResource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698