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

Unified Diff: Source/platform/fonts/opentype/OpenTypeSanitizer.cpp

Issue 1161923003: Log trace event for webfont decode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/opentype/OpenTypeSanitizer.cpp
diff --git a/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp b/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp
index a48dd5addd1ec599c25b9742f6a12b0b28c1cfb4..d01193b0c5254929d1b8b64f6a4a29afc0465b78 100644
--- a/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp
+++ b/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp
@@ -33,6 +33,7 @@
#include "ots-memory-stream.h"
#include "platform/SharedBuffer.h"
+#include "platform/TraceEvent.h"
#include "public/platform/Platform.h"
#include "wtf/CurrentTime.h"
@@ -83,7 +84,11 @@ PassRefPtr<SharedBuffer> OpenTypeSanitizer::sanitize()
double start = currentTime();
BlinkOTSContext otsContext;
- if (!otsContext.Process(&output, reinterpret_cast<const uint8_t*>(m_buffer->data()), m_buffer->size())) {
+ TRACE_EVENT_BEGIN0("blink", "DecodeFont");
+ bool ok = otsContext.Process(&output, reinterpret_cast<const uint8_t*>(m_buffer->data()), m_buffer->size());
+ TRACE_EVENT_END0("blink", "DecodeFont");
+
+ if (!ok) {
setErrorString(otsContext.getErrorString());
return nullptr;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698