gfx/skia/trunk/include/core/SkTrace.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/include/core/SkTrace.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,45 @@
     1.4 +
     1.5 +/*
     1.6 + * Copyright 2011 Google Inc.
     1.7 + *
     1.8 + * Use of this source code is governed by a BSD-style license that can be
     1.9 + * found in the LICENSE file.
    1.10 + */
    1.11 +
    1.12 +#ifndef SkTrace_DEFINED
    1.13 +#define SkTrace_DEFINED
    1.14 +
    1.15 +#ifdef SK_USER_TRACE_INCLUDE_FILE
    1.16 +
    1.17 +/* If your system embeds skia and has complex event logging, in
    1.18 +   src/config/SkUserConfig.h:
    1.19 +     - define the three SK_TRACE_EVENT macros to map to your system's
    1.20 +       equivalents,
    1.21 +     - define the name of the include file in SK_USER_TRACE_INCLUDE_FILE
    1.22 +   A trivial example is given in src/utils/SkDebugTrace.h.
    1.23 +
    1.24 +   All arguments are const char*. Skia typically passes the name of
    1.25 +   the object and function (and sometimes region of interest within
    1.26 +   the function) separated by double colons for 'event'.
    1.27 +
    1.28 +   SK_TRACE_EVENT1 and SK_TRACE_EVENT2 take one or two arbitrary
    1.29 +   name-value pairs that you also want to log. SkStringPrintf() is useful
    1.30 +   for formatting these values.
    1.31 +
    1.32 +   For example:
    1.33 +    SK_TRACE_EVENT0("GrContext::createAndLockTexture");
    1.34 +    SK_TRACE_EVENT1("GrDefaultPathRenderer::onDrawPath::renderPasses",
    1.35 +                    "verts", SkStringPrintf("%i", vert - base).c_str());
    1.36 +*/
    1.37 +
    1.38 +    #include SK_USER_TRACE_INCLUDE_FILE
    1.39 +
    1.40 +#else
    1.41 +
    1.42 +    #define SK_TRACE_EVENT0(event)
    1.43 +    #define SK_TRACE_EVENT1(event, name1, value1)
    1.44 +    #define SK_TRACE_EVENT2(event, name1, value1, name2, value2)
    1.45 +
    1.46 +#endif
    1.47 +
    1.48 +#endif

mercurial