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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp

Issue 2718043003: Refactor InspectorCSSAgent to avoid an intermediate GlyphBuffer (Closed)
Patch Set: review Created 3 years, 10 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
Index: third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
index 1c0b74dc21e59da00a9e9a7a7fe1f5ae8a650905..934a1d5380ed450b3262ba782199d7f7a81420b8 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
@@ -488,4 +488,17 @@ int ShapeResultBuffer::offsetForPosition(const TextRun& run,
return totalOffset;
}
+Vector<std::tuple<SimpleFontData*, size_t>>
+ShapeResultBuffer::getRunFontData() const {
+ Vector<std::tuple<SimpleFontData*, size_t>> fontData;
+
+ for (const auto& result : m_results) {
+ for (const auto& run : result->m_runs) {
+ fontData.push_back(std::make_tuple(run->m_fontData.get(),
+ run->m_glyphData.size()));
+ }
+ }
+ return fontData;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698