Merge "Fix text encoding in some macrobench tests"
This commit is contained in:
committed by
Android (Google) Code Review
commit
22b94c3f0f
@@ -738,6 +738,7 @@ void SkiaCanvas::drawGlyphs(ReadGlyphFunc glyphFunc, int count, const SkPaint& p
|
||||
// care of all alignment.
|
||||
SkPaint paintCopy(paint);
|
||||
paintCopy.setTextAlign(SkPaint::kLeft_Align);
|
||||
SkASSERT(paintCopy.getTextEncoding() == SkPaint::kGlyphID_TextEncoding);
|
||||
|
||||
SkRect bounds =
|
||||
SkRect::MakeLTRB(boundsLeft + x, boundsTop + y, boundsRight + x, boundsBottom + y);
|
||||
|
||||
@@ -36,6 +36,7 @@ class ListOfFadedTextAnimation : public TestListViewSceneBase {
|
||||
SkPaint textPaint;
|
||||
textPaint.setTextSize(dp(20));
|
||||
textPaint.setAntiAlias(true);
|
||||
textPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
|
||||
TestUtils::drawUtf8ToCanvas(&canvas, "not that long long text", textPaint, dp(10), dp(30));
|
||||
|
||||
SkPoint pts[2];
|
||||
|
||||
@@ -42,8 +42,10 @@ public:
|
||||
|
||||
mBluePaint.setColor(SkColorSetARGB(255, 0, 0, 255));
|
||||
mBluePaint.setTextSize(padding);
|
||||
mBluePaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
|
||||
mGreenPaint.setColor(SkColorSetARGB(255, 0, 255, 0));
|
||||
mGreenPaint.setTextSize(padding);
|
||||
mGreenPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
|
||||
|
||||
// interleave drawText and drawRect with saveLayer ops
|
||||
for (int i = 0; i < regions; i++, top += smallRectHeight) {
|
||||
|
||||
Reference in New Issue
Block a user