Chromium Code Reviews| Index: content/common/font_config_ipc_linux.cc |
| diff --git a/content/common/font_config_ipc_linux.cc b/content/common/font_config_ipc_linux.cc |
| index 08fed236fa59c561f92885d9cd065667ea26d264..fff2fb95c898d7c0653719a58ce7d42386a1f8e2 100644 |
| --- a/content/common/font_config_ipc_linux.cc |
| +++ b/content/common/font_config_ipc_linux.cc |
| @@ -64,10 +64,10 @@ FontConfigIPC::~FontConfigIPC() { |
| } |
| bool FontConfigIPC::matchFamilyName(const char familyName[], |
| - SkTypeface::Style requestedStyle, |
| + SkFontStyle requestedStyle, |
| FontIdentity* outFontIdentity, |
| SkString* outFamilyName, |
| - SkTypeface::Style* outStyle) { |
| + SkFontStyle* outStyle) { |
| TRACE_EVENT0("sandbox_ipc", "FontConfigIPC::matchFamilyName"); |
| size_t familyNameLen = familyName ? strlen(familyName) : 0; |
| if (familyNameLen > kMaxFontFamilyLength) |
| @@ -76,7 +76,7 @@ bool FontConfigIPC::matchFamilyName(const char familyName[], |
| base::Pickle request; |
| request.WriteInt(METHOD_MATCH); |
| request.WriteData(familyName, familyNameLen); |
| - request.WriteUInt32(requestedStyle); |
| + skia::WriteSkFontStyle(&request, requestedStyle); |
| uint8_t reply_buf[2048]; |
| const ssize_t r = base::UnixDomainSocket::SendRecvMsg( |
| @@ -94,10 +94,10 @@ bool FontConfigIPC::matchFamilyName(const char familyName[], |
| SkString reply_family; |
| FontIdentity reply_identity; |
| - uint32_t reply_style; |
| + SkFontStyle reply_style; |
| if (!skia::ReadSkString(&iter, &reply_family) || |
| !skia::ReadSkFontIdentity(&iter, &reply_identity) || |
| - !iter.ReadUInt32(&reply_style)) { |
| + !skia::ReadSkFontStyle(&iter, &reply_style)) { |
| return false; |
| } |
| @@ -106,7 +106,7 @@ bool FontConfigIPC::matchFamilyName(const char familyName[], |
| if (outFamilyName) |
| *outFamilyName = reply_family; |
| if (outStyle) |
| - *outStyle = static_cast<SkTypeface::Style>(reply_style); |
| + *outStyle = reply_style; |
|
dcheng
2016/04/12 00:01:24
I don't think I conveyed my intent clearly: if the
bungeman-chromium
2016/04/12 16:35:36
This is a hard sell to Skia though. The uint32_t c
|
| return true; |
| } |