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

Unified Diff: ui/gfx/test/fontconfig_util_linux.cc

Issue 2104653002: Fix content shell layout test failure related to Fontconfig (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/test/fontconfig_util_linux.cc
diff --git a/ui/gfx/test/fontconfig_util_linux.cc b/ui/gfx/test/fontconfig_util_linux.cc
index 6f2da0be9c94017b8ad1330d9f53927b35e3ecd2..0e61627a0e58582c624ff4fd4861afeb3b5f7d2c 100644
--- a/ui/gfx/test/fontconfig_util_linux.cc
+++ b/ui/gfx/test/fontconfig_util_linux.cc
@@ -5,7 +5,6 @@
#include "ui/gfx/test/fontconfig_util_linux.h"
#include <fontconfig/fontconfig.h>
-
msw 2016/06/27 22:14:45 nit: keep this blank line between include types?
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/macros.h"
@@ -64,17 +63,8 @@ const char kFontconfigMatchPatternHeader[] = " <match target=\"pattern\">\n";
const char kFontconfigMatchFooter[] = " </match>\n";
void SetUpFontconfig() {
- FcInit();
-
- // A primer on undocumented FcConfig reference-counting:
- //
- // - FcConfigCreate() creates a config with a refcount of 1.
- // - FcConfigReference() increments a config's refcount.
- // - FcConfigDestroy() decrements a config's refcount, deallocating the
- // config when the count reaches 0.
- // - FcConfigSetCurrent() calls FcConfigDestroy() on the old config, but
- // interestingly does not call FcConfigReference() on the new config.
- CHECK(FcConfigSetCurrent(FcConfigCreate()));
+ CHECK(FcInit());
+ CHECK(FcConfigGetCurrent());
}
void TearDownFontconfig() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698