зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1355612 - Make WrGlyphInstance hold a Point2D instead of raw x/y to match the Rust side. r=jrmuizel
MozReview-Commit-ID: 7OtctQ4gWyv
This commit is contained in:
Родитель
8050498fed
Коммит
db665d693b
|
@ -197,8 +197,8 @@ WebRenderBridgeChild::PushGlyphs(wr::DisplayListBuilder& aBuilder, const nsTArra
|
|||
|
||||
for (size_t j = 0; j < glyphs.Length(); j++) {
|
||||
wr_glyph_instances[j].index = glyphs[j].mIndex;
|
||||
wr_glyph_instances[j].x = glyphs[j].mPosition.x - aOffset.x;
|
||||
wr_glyph_instances[j].y = glyphs[j].mPosition.y - aOffset.y;
|
||||
wr_glyph_instances[j].point.x = glyphs[j].mPosition.x - aOffset.x;
|
||||
wr_glyph_instances[j].point.y = glyphs[j].mPosition.y - aOffset.y;
|
||||
}
|
||||
aBuilder.PushText(wr::ToWrRect(aBounds),
|
||||
clipRegion,
|
||||
|
|
|
@ -181,6 +181,7 @@ enum class WrRepeatMode : uint32_t
|
|||
// -----
|
||||
|
||||
typedef uint64_t WrExternalImageId;
|
||||
typedef mozilla::gfx::Point Point2D; // TODO: get rid of this somehow
|
||||
|
||||
// -----
|
||||
// Structs used in C++ code with corresponding types in Rust code
|
||||
|
@ -262,14 +263,12 @@ struct WrColor
|
|||
struct WrGlyphInstance
|
||||
{
|
||||
uint32_t index;
|
||||
float x;
|
||||
float y;
|
||||
Point2D point;
|
||||
|
||||
bool operator==(const WrGlyphInstance& other) const
|
||||
{
|
||||
return index == other.index &&
|
||||
x == other.x &&
|
||||
y == other.y;
|
||||
point == other.point;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче