Revert of Revert of make gm background colors 565 compatible (patchset #1 id:1 of https://codereview.chromium.org/1184123002/)
Reason for revert:
underlying problem with portable refs deleted more than once fixed
Original issue's description:
> Revert of make gm background colors 565 compatible (patchset #2 id:20001 of https://codereview.chromium.org/1176243006/)
>
> Reason for revert:
> breaks many bots with refcnt error
>
> Original issue's description:
> > make gm background colors 565 compatible
> >
> > Change a batch of GM tests to convert their background color
> > so that it is representable in 8888 and 565.
> >
> > Enable portable text in those same tests to minimize platform
> > differences.
> >
> > In a couple of bitmap tests, use portable typefaces instead of
> > choosing 'Times' which may or may not be available on the platform.
> >
> > R=borenet@google.com
> >
> > Committed: https://skia.googlesource.com/skia/+/be7f768a357aefb39c42d24b81b24d647bb6ab70
>
> TBR=borenet@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/0bdb08b1ba8fbd18c4838f86a23f1ef4b3a3bfdf
TBR=borenet@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1182403003
diff --git a/gm/simpleaaclip.cpp b/gm/simpleaaclip.cpp
index c232a25..c0aa515 100644
--- a/gm/simpleaaclip.cpp
+++ b/gm/simpleaaclip.cpp
@@ -64,7 +64,7 @@
fBasePath.addRoundRect(fBase, SkIntToScalar(5), SkIntToScalar(5));
fRectPath.addRoundRect(fRect, SkIntToScalar(5), SkIntToScalar(5));
- INHERITED::setBGColor(0xFFDDDDDD);
+ INHERITED::setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD));
}
void buildRgn(SkAAClip* clip, SkRegion::Op op) {
@@ -156,7 +156,7 @@
SkPaint textPaint;
textPaint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&textPaint);
+ sk_tool_utils::set_portable_typeface_always(&textPaint);
textPaint.setTextSize(SK_Scalar1*24);
int xOff = 0;