diff options
author | caryclark <caryclark@google.com> | 2015-06-15 05:28:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-15 05:28:00 -0700 |
commit | 0bdb08b1ba8fbd18c4838f86a23f1ef4b3a3bfdf (patch) | |
tree | 39b221971fc0b5b1540d2c7fba9e6860fdada3b6 /tools/sk_tool_utils.cpp | |
parent | be7f768a357aefb39c42d24b81b24d647bb6ab70 (diff) |
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
Review URL: https://codereview.chromium.org/1184123002
Diffstat (limited to 'tools/sk_tool_utils.cpp')
-rw-r--r-- | tools/sk_tool_utils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp index 4d0e0bde68..ec7942b165 100644 --- a/tools/sk_tool_utils.cpp +++ b/tools/sk_tool_utils.cpp @@ -34,10 +34,10 @@ const char* colortype_name(SkColorType ct) { } } -SkColor color_to_565(SkColor color) { - SkPMColor pmColor = SkPreMultiplyColor(color); +void color_to_565(SkColor* color) { + SkPMColor pmColor = SkPreMultiplyColor(*color); U16CPU color16 = SkPixel32ToPixel16(pmColor); - return SkPixel16ToColor(color16); + *color = SkPixel16ToColor(color16); } SkTypeface* create_portable_typeface(const char* name, SkTypeface::Style style) { |