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.

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

mercurial