Modify SkEventTracer::SetInstance to fail rather than assert if a tracer has already...
authorBrian Salomon <bsalomon@google.com>
Fri, 12 May 2017 16:02:50 +0000 (12:02 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Fri, 12 May 2017 16:49:07 +0000 (16:49 +0000)
commit175f588831c3d9f76349af8c27c64ceaa4460871
treefd7733ec3dcc8caae5b4aa732ea1e665b643d909
parentebb1b5c297e394ab19f99d807095672b7f5d8aef
Modify SkEventTracer::SetInstance to fail rather than assert if a tracer has already been installed.

Chromium usually calls SetInstance once per process. However, when run in single process more renderer threads will try to set the instance after the browser process already has done so. This allows them to fail gracefully without asserting.

Bug: skia:6603
Change-Id: Ic8a35422d787335aa67eefc07d0658f0fbe73db4
Reviewed-on: https://skia-review.googlesource.com/16664
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
include/utils/SkEventTracer.h
src/utils/SkEventTracer.cpp
tools/viewer/Viewer.cpp