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; |
} |