| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Torch Mobile, Inc. | 3 * Copyright (C) 2009 Torch Mobile, Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "core/loader/resource/FontResource.h" | 27 #include "core/loader/resource/FontResource.h" |
| 28 | 28 |
| 29 #include "platform/Histogram.h" | 29 #include "platform/Histogram.h" |
| 30 #include "platform/SharedBuffer.h" | 30 #include "platform/SharedBuffer.h" |
| 31 #include "platform/fonts/FontCustomPlatformData.h" | 31 #include "platform/fonts/FontCustomPlatformData.h" |
| 32 #include "platform/fonts/FontPlatformData.h" | 32 #include "platform/fonts/FontPlatformData.h" |
| 33 #include "platform/loader/fetch/FetchRequest.h" | 33 #include "platform/loader/fetch/FetchRequest.h" |
| 34 #include "platform/loader/fetch/ResourceClientWalker.h" | 34 #include "platform/loader/fetch/ResourceClientWalker.h" |
| 35 #include "platform/loader/fetch/ResourceFetcher.h" | 35 #include "platform/loader/fetch/ResourceFetcher.h" |
| 36 #include "platform/loader/fetch/ResourceLoader.h" | 36 #include "platform/loader/fetch/ResourceLoader.h" |
| 37 #include "wtf/CurrentTime.h" | 37 #include "platform/wtf/CurrentTime.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 // Durations of font-display periods. | 41 // Durations of font-display periods. |
| 42 // https://tabatkins.github.io/specs/css-font-display/#font-display-desc | 42 // https://tabatkins.github.io/specs/css-font-display/#font-display-desc |
| 43 // TODO(toyoshim): Revisit short limit value once cache-aware font display is | 43 // TODO(toyoshim): Revisit short limit value once cache-aware font display is |
| 44 // launched. crbug.com/570205 | 44 // launched. crbug.com/570205 |
| 45 static const double kFontLoadWaitShortLimitSec = 0.1; | 45 static const double kFontLoadWaitShortLimitSec = 0.1; |
| 46 static const double kFontLoadWaitLongLimitSec = 3.0; | 46 static const double kFontLoadWaitLongLimitSec = 3.0; |
| 47 | 47 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 Resource::OnMemoryDump(level, memory_dump); | 226 Resource::OnMemoryDump(level, memory_dump); |
| 227 if (!font_data_) | 227 if (!font_data_) |
| 228 return; | 228 return; |
| 229 const String name = GetMemoryDumpName() + "/decoded_webfont"; | 229 const String name = GetMemoryDumpName() + "/decoded_webfont"; |
| 230 WebMemoryAllocatorDump* dump = memory_dump->CreateMemoryAllocatorDump(name); | 230 WebMemoryAllocatorDump* dump = memory_dump->CreateMemoryAllocatorDump(name); |
| 231 dump->AddScalar("size", "bytes", font_data_->DataSize()); | 231 dump->AddScalar("size", "bytes", font_data_->DataSize()); |
| 232 memory_dump->AddSuballocation(dump->Guid(), "malloc"); | 232 memory_dump->AddSuballocation(dump->Guid(), "malloc"); |
| 233 } | 233 } |
| 234 | 234 |
| 235 } // namespace blink | 235 } // namespace blink |
| OLD | NEW |