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

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

Issue 1561633002: Relocate ShapeResult's GlyphBuffer helpers to ShapeResultBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 11 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/CachingWordShaper.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.cpp b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.cpp
index 5dc59b295619e8d69353cbc290f7ac5f9874b7bb..f89d9178e9fb29d38886069ff0b9f5ae87f49124 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.cpp
@@ -29,6 +29,7 @@
#include "platform/fonts/shaping/CachingWordShapeIterator.h"
#include "platform/fonts/shaping/HarfBuzzShaper.h"
#include "platform/fonts/shaping/ShapeCache.h"
+#include "platform/fonts/shaping/ShapeResultBuffer.h"
#include "wtf/text/CharacterNames.h"
namespace blink {
@@ -81,7 +82,7 @@ int CachingWordShaper::offsetForPosition(const Font* font, const TextRun& run, f
ShapeResultBuffer buffer;
shapeResultsForRun(m_shapeCache, font, run, nullptr, &buffer);
- return ShapeResult::offsetForPosition(buffer, run, targetX);
+ return buffer.offsetForPosition(run, targetX);
}
float CachingWordShaper::fillGlyphBuffer(const Font* font, const TextRun& run,
@@ -91,7 +92,7 @@ float CachingWordShaper::fillGlyphBuffer(const Font* font, const TextRun& run,
ShapeResultBuffer buffer;
shapeResultsForRun(m_shapeCache, font, run, fallbackFonts, &buffer);
- return ShapeResult::fillGlyphBuffer(buffer, glyphBuffer, run, from, to);
+ return buffer.fillGlyphBuffer(glyphBuffer, run, from, to);
}
float CachingWordShaper::fillGlyphBufferForTextEmphasis(const Font* font,
@@ -101,8 +102,7 @@ float CachingWordShaper::fillGlyphBufferForTextEmphasis(const Font* font,
ShapeResultBuffer buffer;
shapeResultsForRun(m_shapeCache, font, run, nullptr, &buffer);
- return ShapeResult::fillGlyphBufferForTextEmphasis(buffer, glyphBuffer,
- run, emphasisData, from, to);
+ return buffer.fillGlyphBufferForTextEmphasis(glyphBuffer, run, emphasisData, from, to);
}
FloatRect CachingWordShaper::selectionRect(const Font* font, const TextRun& run,
@@ -112,8 +112,7 @@ FloatRect CachingWordShaper::selectionRect(const Font* font, const TextRun& run,
float totalWidth = shapeResultsForRun(m_shapeCache, font, run, nullptr,
&buffer);
- return ShapeResult::selectionRect(buffer, run.direction(), totalWidth,
- point, height, from, to);
+ return buffer.selectionRect(run.direction(), totalWidth, point, height, from, to);
}
}; // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/blink_platform.gypi ('k') | third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698