Commit 36745299 authored by Mike Reed's avatar Mike Reed Committed by Commit Bot

skia vertical-text never used, is going away, so remove all references

to that skia api

Bug: skia:8487
Change-Id: I00bce640b6c34736f0e89988421965ba86464689
Reviewed-on: https://chromium-review.googlesource.com/c/1291816Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Reviewed-by: default avatarFlorin Malita <fmalita@chromium.org>
Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Mike Reed <reed@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601667}
parent 7dc48d78
......@@ -62,12 +62,6 @@ class CC_PAINT_EXPORT PaintFlags {
ALWAYS_INLINE void setAntiAlias(bool aa) {
SetInternalFlag(aa, SkPaint::kAntiAlias_Flag);
}
ALWAYS_INLINE bool isVerticalText() const {
return !!(bitfields_.flags_ & SkPaint::kVerticalText_Flag);
}
ALWAYS_INLINE void setVerticalText(bool vertical) {
SetInternalFlag(vertical, SkPaint::kVerticalText_Flag);
}
ALWAYS_INLINE bool isSubpixelText() const {
return !!(bitfields_.flags_ & SkPaint::kSubpixelText_Flag);
}
......
......@@ -65,7 +65,7 @@ TEST(PaintOpHelper, DrawDRRectToString) {
str,
"DrawDRRectOp(outer=[bounded by 1.000,2.000 3.000x4.000], inner=[bounded "
"by 5.000,6.000 7.000x8.000], flags=[color=rgba(0, 0, 0, 255), "
"blendMode=kSrcOver, isAntiAlias=false, isVerticalText=false, "
"blendMode=kSrcOver, isAntiAlias=false, "
"isSubpixelText=false, isLCDRenderText=false, hinting=kNormal_Hinting, "
"isAutohinted=false, isDither=false, textEncoding=kUTF8_TextEncoding, "
"textSize=12.000, filterQuality=kNone_SkFilterQuality, "
......@@ -84,7 +84,7 @@ TEST(PaintOpHelper, DrawImageToString) {
str,
"DrawImageOp(image=<paint image>, left=10.500, top=20.300, "
"flags=[color=rgba(0, 0, 0, 255), blendMode=kSrcOver, isAntiAlias=false, "
"isVerticalText=false, isSubpixelText=false, isLCDRenderText=false, "
"isSubpixelText=false, isLCDRenderText=false, "
"hinting=kNormal_Hinting, isAutohinted=false, isDither=false, "
"textEncoding=kUTF8_TextEncoding, textSize=12.000, "
"filterQuality=kNone_SkFilterQuality, strokeWidth=0.000, "
......@@ -105,7 +105,7 @@ TEST(PaintOpHelper, DrawImageRectToString) {
"DrawImageRectOp(image=<paint image>, src=[1.000,2.000 3.000x4.000], "
"dst=[5.000,6.000 7.000x8.000], constraint=kStrict_SrcRectConstraint, "
"flags=[color=rgba(0, 0, 0, 255), blendMode=kSrcOver, isAntiAlias=false, "
"isVerticalText=false, isSubpixelText=false, isLCDRenderText=false, "
"isSubpixelText=false, isLCDRenderText=false, "
"hinting=kNormal_Hinting, isAutohinted=false, isDither=false, "
"textEncoding=kUTF8_TextEncoding, textSize=12.000, "
"filterQuality=kNone_SkFilterQuality, strokeWidth=0.000, "
......@@ -121,7 +121,7 @@ TEST(PaintOpHelper, DrawIRectToString) {
std::string str = PaintOpHelper::ToString(&op);
EXPECT_EQ(str,
"DrawIRectOp(rect=[1,2 3x4], flags=[color=rgba(0, 0, 0, 255), "
"blendMode=kSrcOver, isAntiAlias=false, isVerticalText=false, "
"blendMode=kSrcOver, isAntiAlias=false, "
"isSubpixelText=false, isLCDRenderText=false, "
"hinting=kNormal_Hinting, isAutohinted=false, isDither=false, "
"textEncoding=kUTF8_TextEncoding, textSize=12.000, "
......@@ -141,7 +141,7 @@ TEST(PaintOpHelper, DrawLineToString) {
str,
"DrawLineOp(x0=1.100, y0=2.200, x1=3.300, y1=4.400, flags=[color=rgba(0, "
"0, 0, 255), blendMode=kSrcOver, isAntiAlias=false, "
"isVerticalText=false, isSubpixelText=false, isLCDRenderText=false, "
"isSubpixelText=false, isLCDRenderText=false, "
"hinting=kNormal_Hinting, isAutohinted=false, isDither=false, "
"textEncoding=kUTF8_TextEncoding, textSize=12.000, "
"filterQuality=kNone_SkFilterQuality, strokeWidth=0.000, "
......@@ -159,7 +159,7 @@ TEST(PaintOpHelper, DrawOvalToString) {
str,
"DrawOvalOp(oval=[100.000,200.000 300.000x400.000], flags=[color=rgba(0, "
"0, 0, 255), blendMode=kSrcOver, isAntiAlias=false, "
"isVerticalText=false, isSubpixelText=false, isLCDRenderText=false, "
"isSubpixelText=false, isLCDRenderText=false, "
"hinting=kNormal_Hinting, isAutohinted=false, isDither=false, "
"textEncoding=kUTF8_TextEncoding, textSize=12.000, "
"filterQuality=kNone_SkFilterQuality, strokeWidth=0.000, "
......@@ -176,7 +176,7 @@ TEST(PaintOpHelper, DrawPathToString) {
std::string str = PaintOpHelper::ToString(&op);
EXPECT_EQ(str,
"DrawPathOp(path=<SkPath>, flags=[color=rgba(0, 0, 0, 255), "
"blendMode=kSrcOver, isAntiAlias=false, isVerticalText=false, "
"blendMode=kSrcOver, isAntiAlias=false, "
"isSubpixelText=false, isLCDRenderText=false, "
"hinting=kNormal_Hinting, isAutohinted=false, isDither=false, "
"textEncoding=kUTF8_TextEncoding, textSize=12.000, "
......@@ -201,7 +201,7 @@ TEST(PaintOpHelper, DrawRectToString) {
EXPECT_EQ(
str,
"DrawRectOp(rect=[-1.000,-2.000 -3.000x-4.000], flags=[color=rgba(0, 0, "
"0, 255), blendMode=kSrcOver, isAntiAlias=false, isVerticalText=false, "
"0, 255), blendMode=kSrcOver, isAntiAlias=false, "
"isSubpixelText=false, isLCDRenderText=false, hinting=kNormal_Hinting, "
"isAutohinted=false, isDither=false, textEncoding=kUTF8_TextEncoding, "
"textSize=12.000, filterQuality=kNone_SkFilterQuality, "
......@@ -221,7 +221,7 @@ TEST(PaintOpHelper, DrawRRectToString) {
str,
"DrawRRectOp(rrect=[bounded by -1.000,-2.000 3.000x4.000], "
"flags=[color=rgba(0, 0, 0, 255), blendMode=kSrcOver, isAntiAlias=false, "
"isVerticalText=false, isSubpixelText=false, isLCDRenderText=false, "
"isSubpixelText=false, isLCDRenderText=false, "
"hinting=kNormal_Hinting, isAutohinted=false, isDither=false, "
"textEncoding=kUTF8_TextEncoding, textSize=12.000, "
"filterQuality=kNone_SkFilterQuality, strokeWidth=0.000, "
......@@ -239,7 +239,7 @@ TEST(PaintOpHelper, DrawTextBlobToString) {
str,
"DrawTextBlobOp(blob=(nil), x=100.000, y=-222.000, flags=[color=rgba(0, "
"0, 0, 255), blendMode=kSrcOver, isAntiAlias=false, "
"isVerticalText=false, isSubpixelText=false, isLCDRenderText=false, "
"isSubpixelText=false, isLCDRenderText=false, "
"hinting=kNormal_Hinting, isAutohinted=false, isDither=false, "
"textEncoding=kUTF8_TextEncoding, textSize=12.000, "
"filterQuality=kNone_SkFilterQuality, strokeWidth=0.000, "
......@@ -281,7 +281,7 @@ TEST(PaintOpHelper, SaveLayerToString) {
EXPECT_EQ(
str,
"SaveLayerOp(bounds=[1.000,2.000 3.000x4.000], flags=[color=rgba(0, 0, "
"0, 255), blendMode=kSrcOver, isAntiAlias=false, isVerticalText=false, "
"0, 255), blendMode=kSrcOver, isAntiAlias=false, "
"isSubpixelText=false, isLCDRenderText=false, hinting=kNormal_Hinting, "
"isAutohinted=false, isDither=false, textEncoding=kUTF8_TextEncoding, "
"textSize=12.000, filterQuality=kNone_SkFilterQuality, "
......
......@@ -606,7 +606,6 @@ class PaintOpHelper {
str << ", blendMode="
<< PaintOpHelper::SkiaTypeToString(flags.getBlendMode());
str << ", isAntiAlias=" << flags.isAntiAlias();
str << ", isVerticalText=" << flags.isVerticalText();
str << ", isSubpixelText=" << flags.isSubpixelText();
str << ", isLCDRenderText=" << flags.isLCDRenderText();
str << ", hinting=" << PaintOpHelper::SkiaTypeToString(flags.getHinting());
......
......@@ -216,7 +216,6 @@ std::unique_ptr<base::Value> AsValue(const SkPaint& paint) {
builder.addFlag(paint.isLCDRenderText(), "LCDRenderText");
builder.addFlag(paint.isEmbeddedBitmapText(), "EmbeddedBitmapText");
builder.addFlag(paint.isAutohinted(), "Autohinted");
builder.addFlag(paint.isVerticalText(), "VerticalText");
val->SetString("Flags", builder.str());
}
......
......@@ -200,10 +200,6 @@ static hb_position_t HarfBuzzGetGlyphHorizontalKerning(
void*) {
HarfBuzzFontData* hb_font_data =
reinterpret_cast<HarfBuzzFontData*>(font_data);
if (hb_font_data->paint_.isVerticalText()) {
// We don't support cross-stream kerning
return 0;
}
SkTypeface* typeface = hb_font_data->paint_.getTypeface();
......
......@@ -354,7 +354,6 @@ String StringForSkPaintFlags(const SkPaint& paint) {
AppendFlagToString(&flags_string, paint.isEmbeddedBitmapText(),
"EmbeddedBitmapText");
AppendFlagToString(&flags_string, paint.isAutohinted(), "Autohinted");
AppendFlagToString(&flags_string, paint.isVerticalText(), "VerticalText");
return flags_string;
}
......
......@@ -153,11 +153,6 @@ hb_position_t GetGlyphHorizontalKerning(hb_font_t* font,
hb_codepoint_t right_glyph,
void* user_data) {
FontData* font_data = reinterpret_cast<FontData*>(data);
if (font_data->flags_.isVerticalText()) {
// We don't support cross-stream kerning.
return 0;
}
return GetGlyphKerning(font_data, left_glyph, right_glyph);
}
......@@ -167,11 +162,6 @@ hb_position_t GetGlyphVerticalKerning(hb_font_t* font,
hb_codepoint_t bottom_glyph,
void* user_data) {
FontData* font_data = reinterpret_cast<FontData*>(data);
if (!font_data->flags_.isVerticalText()) {
// We don't support cross-stream kerning.
return 0;
}
return GetGlyphKerning(font_data, top_glyph, bottom_glyph);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment