Log trace event for webfont decode

This will make it easy to tell when the main thread is busy decoding
webfonts.

BUG=none

Review URL: https://codereview.chromium.org/1161923003

git-svn-id: svn://svn.chromium.org/blink/trunk@200627 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 1db08596
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "ots-memory-stream.h" #include "ots-memory-stream.h"
#include "platform/SharedBuffer.h" #include "platform/SharedBuffer.h"
#include "platform/TraceEvent.h"
#include "public/platform/Platform.h" #include "public/platform/Platform.h"
#include "wtf/CurrentTime.h" #include "wtf/CurrentTime.h"
...@@ -83,7 +84,11 @@ PassRefPtr<SharedBuffer> OpenTypeSanitizer::sanitize() ...@@ -83,7 +84,11 @@ PassRefPtr<SharedBuffer> OpenTypeSanitizer::sanitize()
double start = currentTime(); double start = currentTime();
BlinkOTSContext otsContext; 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()); setErrorString(otsContext.getErrorString());
return nullptr; return nullptr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment