From 05db63b5fc262136da9b289418b871180cd1359b Mon Sep 17 00:00:00 2001 From: mtklein Date: Tue, 19 Apr 2016 12:42:24 -0700 Subject: Remove static initializer for SkOpts::Init() Static initializers run in a confusing unspecified order, so it's best to have as few of them as possible. Most tools and clients I can find already call SkGraphics::Init(), (or equivalently create an SkAutoGraphics) which calls SkOpts::Init(): - Chrome - Chrome renderer - Android - DM - nanobench - SampleApp - VisualBench - the old debugger Seems like the only thing relying on this static initializer today is the new debugger, fixed here. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1903503002 Review URL: https://codereview.chromium.org/1903503002 --- tools/skiaserve/skiaserve.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/skiaserve') diff --git a/tools/skiaserve/skiaserve.cpp b/tools/skiaserve/skiaserve.cpp index e71be0f31e..fc3018141e 100644 --- a/tools/skiaserve/skiaserve.cpp +++ b/tools/skiaserve/skiaserve.cpp @@ -9,6 +9,7 @@ #include "Response.h" #include "SkCommandLineFlags.h" +#include "SkGraphics.h" #include "microhttpd.h" @@ -80,6 +81,7 @@ int answer_to_connection(void* cls, struct MHD_Connection* connection, } int skiaserve_main() { + SkGraphics::Init(); Request request(SkString("/data")); // This simple server has one request struct sockaddr_in address; -- cgit v1.2.3