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

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     2 /*
     3  * Copyright 2011 Google Inc.
     4  *
     5  * Use of this source code is governed by a BSD-style license that can be
     6  * found in the LICENSE file.
     7  */
     9 #ifndef SkTrace_DEFINED
    10 #define SkTrace_DEFINED
    12 #ifdef SK_USER_TRACE_INCLUDE_FILE
    14 /* If your system embeds skia and has complex event logging, in
    15    src/config/SkUserConfig.h:
    16      - define the three SK_TRACE_EVENT macros to map to your system's
    17        equivalents,
    18      - define the name of the include file in SK_USER_TRACE_INCLUDE_FILE
    19    A trivial example is given in src/utils/SkDebugTrace.h.
    21    All arguments are const char*. Skia typically passes the name of
    22    the object and function (and sometimes region of interest within
    23    the function) separated by double colons for 'event'.
    25    SK_TRACE_EVENT1 and SK_TRACE_EVENT2 take one or two arbitrary
    26    name-value pairs that you also want to log. SkStringPrintf() is useful
    27    for formatting these values.
    29    For example:
    30     SK_TRACE_EVENT0("GrContext::createAndLockTexture");
    31     SK_TRACE_EVENT1("GrDefaultPathRenderer::onDrawPath::renderPasses",
    32                     "verts", SkStringPrintf("%i", vert - base).c_str());
    33 */
    35     #include SK_USER_TRACE_INCLUDE_FILE
    37 #else
    39     #define SK_TRACE_EVENT0(event)
    40     #define SK_TRACE_EVENT1(event, name1, value1)
    41     #define SK_TRACE_EVENT2(event, name1, value1, name2, value2)
    43 #endif
    45 #endif

mercurial