Drop unused mpGlyphPositions array
Change-Id: I858832a41ef140fa9916e05548edf2df6b0af451
This commit is contained in:
parent
81ec93f844
commit
e4088a68aa
@ -81,7 +81,6 @@ private:
|
|||||||
|
|
||||||
mutable CGSize* mpGlyphAdvances;
|
mutable CGSize* mpGlyphAdvances;
|
||||||
|
|
||||||
mutable CGPoint* mpGlyphPositions;
|
|
||||||
mutable CTTypesetterRef mpTypesetter;
|
mutable CTTypesetterRef mpTypesetter;
|
||||||
mutable CTLineRef mpLine;
|
mutable CTLineRef mpLine;
|
||||||
mutable bool mbHasBoundRectangle;
|
mutable bool mbHasBoundRectangle;
|
||||||
@ -108,7 +107,6 @@ CoreTextLayout::CoreTextLayout(CoreTextStyleInfo* style) :
|
|||||||
mpCharWidths(NULL),
|
mpCharWidths(NULL),
|
||||||
mpGlyphs2Chars(NULL),
|
mpGlyphs2Chars(NULL),
|
||||||
mpGlyphAdvances(NULL),
|
mpGlyphAdvances(NULL),
|
||||||
mpGlyphPositions(NULL),
|
|
||||||
mpTypesetter(NULL),
|
mpTypesetter(NULL),
|
||||||
mpLine(NULL),
|
mpLine(NULL),
|
||||||
mbHasBoundRectangle(false),
|
mbHasBoundRectangle(false),
|
||||||
@ -196,10 +194,6 @@ void CoreTextLayout::InvalidateMeasurements()
|
|||||||
delete[] mpGlyphAdvances;
|
delete[] mpGlyphAdvances;
|
||||||
mpGlyphAdvances = NULL;
|
mpGlyphAdvances = NULL;
|
||||||
}
|
}
|
||||||
if( mpGlyphPositions ) {
|
|
||||||
delete[] mpGlyphPositions;
|
|
||||||
mpGlyphPositions = NULL;
|
|
||||||
}
|
|
||||||
mbHasBoundRectangle = false;
|
mbHasBoundRectangle = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -601,7 +595,6 @@ void CoreTextLayout::GetMeasurements()
|
|||||||
mpCharWidths = new CGFloat[ mnCharCount ];
|
mpCharWidths = new CGFloat[ mnCharCount ];
|
||||||
mpGlyphs2Chars = new int[ mnGlyphCount ];
|
mpGlyphs2Chars = new int[ mnGlyphCount ];
|
||||||
mpGlyphAdvances = new CGSize[ mnGlyphCount ];
|
mpGlyphAdvances = new CGSize[ mnGlyphCount ];
|
||||||
mpGlyphPositions = new CGPoint[ mnGlyphCount ];
|
|
||||||
|
|
||||||
CFArrayRef runs = CTLineGetGlyphRuns( mpLine );
|
CFArrayRef runs = CTLineGetGlyphRuns( mpLine );
|
||||||
const CFIndex nRuns = CFArrayGetCount( runs );
|
const CFIndex nRuns = CFArrayGetCount( runs );
|
||||||
@ -630,7 +623,6 @@ void CoreTextLayout::GetMeasurements()
|
|||||||
|
|
||||||
CTRunGetGlyphs( run, CFRangeMake( 0, 0 ), &mpGlyphs[ lineGlyphIx ] );
|
CTRunGetGlyphs( run, CFRangeMake( 0, 0 ), &mpGlyphs[ lineGlyphIx ] );
|
||||||
|
|
||||||
CTRunGetPositions( run, CFRangeMake( 0, 0 ), &mpGlyphPositions[ lineGlyphIx ] );
|
|
||||||
CTRunGetAdvances( run, CFRangeMake( 0, 0 ), &mpGlyphAdvances[ lineGlyphIx ] );
|
CTRunGetAdvances( run, CFRangeMake( 0, 0 ), &mpGlyphAdvances[ lineGlyphIx ] );
|
||||||
|
|
||||||
for ( CFIndex runGlyphIx = 0 ; runGlyphIx < runGlyphCount; lineGlyphIx++, runGlyphIx++ )
|
for ( CFIndex runGlyphIx = 0 ; runGlyphIx < runGlyphCount; lineGlyphIx++, runGlyphIx++ )
|
||||||
@ -645,7 +637,7 @@ void CoreTextLayout::GetMeasurements()
|
|||||||
for ( int i = 0; i < runGlyphCount; i++ ) {
|
for ( int i = 0; i < runGlyphCount; i++ ) {
|
||||||
const int ix = lineRunGlyphStartIx + i;
|
const int ix = lineRunGlyphStartIx + i;
|
||||||
if ( i < 7 ) {
|
if ( i < 7 ) {
|
||||||
glyphPositionInfo << " " << mpGlyphs[ ix ] << "@" << mpGlyphPositions[ ix ];
|
glyphPositionInfo << " " << mpGlyphs[ ix ];
|
||||||
glyphAdvancesInfo << " " << mpGlyphAdvances[ ix ];
|
glyphAdvancesInfo << " " << mpGlyphAdvances[ ix ];
|
||||||
} else if (i == 7 ) {
|
} else if (i == 7 ) {
|
||||||
glyphPositionInfo << "...";
|
glyphPositionInfo << "...";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user