diff options
author | mtklein <mtklein@chromium.org> | 2016-04-19 12:42:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-19 12:42:24 -0700 |
commit | 05db63b5fc262136da9b289418b871180cd1359b (patch) | |
tree | 6b4a4dadaaafbd09d5f398a6119e6601cdfe014c /tools/skiaserve | |
parent | a7c9d6303a4bd3bda9d7b3f73334f182b11338c4 (diff) |
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
Diffstat (limited to 'tools/skiaserve')
-rw-r--r-- | tools/skiaserve/skiaserve.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; |