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

Unified Diff: components/font_service/public/cpp/font_loader.cc

Issue 1421483003: mandoline: Start adding trace events for mandoline stuff. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT Created 5 years, 2 months 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
« no previous file with comments | « no previous file | components/html_viewer/html_document.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/font_service/public/cpp/font_loader.cc
diff --git a/components/font_service/public/cpp/font_loader.cc b/components/font_service/public/cpp/font_loader.cc
index 840f2982cbb59e426447bc4e8e14085b426b9a19..f029349b998210b23cb275826528603d3714bfa0 100644
--- a/components/font_service/public/cpp/font_loader.cc
+++ b/components/font_service/public/cpp/font_loader.cc
@@ -5,6 +5,7 @@
#include "components/font_service/public/cpp/font_loader.h"
#include "base/bind.h"
+#include "base/trace_event/trace_event.h"
#include "components/font_service/public/cpp/font_service_thread.h"
#include "mojo/application/public/cpp/application_impl.h"
#include "mojo/application/public/cpp/connect.h"
@@ -49,11 +50,16 @@ bool FontLoader::matchFamilyName(const char family_name[],
FontIdentity* out_font_identifier,
SkString* out_family_name,
SkTypeface::Style* out_style) {
+ TRACE_EVENT1("font_service", "FontServiceThread::MatchFamilyName",
+ "family_name", family_name);
return thread_->MatchFamilyName(family_name, requested, out_font_identifier,
out_family_name, out_style);
}
SkStreamAsset* FontLoader::openStream(const FontIdentity& identity) {
+ TRACE_EVENT2("font_loader", "FontLoader::openStream",
+ "identity", identity.fID,
+ "name", identity.fString.c_str());
{
base::AutoLock lock(lock_);
auto mapped_font_files_it = mapped_font_files_.find(identity.fID);
@@ -80,6 +86,8 @@ SkStreamAsset* FontLoader::openStream(const FontIdentity& identity) {
}
void FontLoader::OnMappedFontFileDestroyed(internal::MappedFontFile* f) {
+ TRACE_EVENT1("font_loader", "FontLoader::OnMappedFontFileDestroyed",
+ "identity", f->font_id());
base::AutoLock lock(lock_);
mapped_font_files_.erase(f->font_id());
}
« no previous file with comments | « no previous file | components/html_viewer/html_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698