Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: content/common/font_config_ipc_linux.cc

Issue 10836242: Made result_filefaceid output optional in FontConfigIPC::Match. There are cases when we are only in… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | skia/ext/SkFontHost_fontconfig_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/font_config_ipc_linux.h" 5 #include "content/common/font_config_ipc_linux.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <unistd.h> 8 #include <unistd.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 uint32_t reply_filefaceid; 63 uint32_t reply_filefaceid;
64 std::string reply_family; 64 std::string reply_family;
65 bool resulting_bold, resulting_italic; 65 bool resulting_bold, resulting_italic;
66 if (!reply.ReadUInt32(&iter, &reply_filefaceid) || 66 if (!reply.ReadUInt32(&iter, &reply_filefaceid) ||
67 !reply.ReadString(&iter, &reply_family) || 67 !reply.ReadString(&iter, &reply_family) ||
68 !reply.ReadBool(&iter, &resulting_bold) || 68 !reply.ReadBool(&iter, &resulting_bold) ||
69 !reply.ReadBool(&iter, &resulting_italic)) { 69 !reply.ReadBool(&iter, &resulting_italic)) {
70 return false; 70 return false;
71 } 71 }
72 72
73 *result_filefaceid = reply_filefaceid; 73 if (result_filefaceid)
74 *result_filefaceid = reply_filefaceid;
74 if (result_family) 75 if (result_family)
75 *result_family = reply_family; 76 *result_family = reply_family;
76 77
77 if (is_bold) 78 if (is_bold)
78 *is_bold = resulting_bold; 79 *is_bold = resulting_bold;
79 if (is_italic) 80 if (is_italic)
80 *is_italic = resulting_italic; 81 *is_italic = resulting_italic;
81 82
82 return true; 83 return true;
83 } 84 }
(...skipping 17 matching lines...) Expand all
101 PickleIterator iter(reply); 102 PickleIterator iter(reply);
102 if (!reply.ReadBool(&iter, &result) || 103 if (!reply.ReadBool(&iter, &result) ||
103 !result) { 104 !result) {
104 if (result_fd) 105 if (result_fd)
105 close(result_fd); 106 close(result_fd);
106 return -1; 107 return -1;
107 } 108 }
108 109
109 return result_fd; 110 return result_fd;
110 } 111 }
OLDNEW
« no previous file with comments | « no previous file | skia/ext/SkFontHost_fontconfig_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698