Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
core
SkATrace.h
Go to the documentation of this file.
1
/*
2
* Copyright 2016 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#ifndef SkATrace_DEFINED
9
#define SkATrace_DEFINED
10
11
#include "
include/utils/SkEventTracer.h
"
12
13
#include <cstdint>
14
15
/**
16
* This class is used to support ATrace in android apps. It hooks into the SkEventTracer system. It
17
* currently supports the macros TRACE_EVENT*, TRACE_EVENT_INSTANT*, and TRACE_EVENT_BEGIN/END*.
18
* For versions of these calls that take additoinal args and value pairs we currently just drop them
19
* and report only the name. Since ATrace is a simple push and pop system (all traces are fully
20
* nested), if using BEGIN and END you should also make sure your calls are properly nested (i.e. if
21
* startA is before startB, then endB is before endA).
22
*/
23
class
SkATrace
:
public
SkEventTracer
{
24
public
:
25
SkATrace
();
26
27
SkEventTracer::Handle
addTraceEvent
(
char
phase,
28
const
uint8_t* categoryEnabledFlag,
29
const
char
*
name
,
30
uint64_t
id
,
31
int
numArgs,
32
const
char
** argNames,
33
const
uint8_t* argTypes,
34
const
uint64_t* argValues,
35
uint8_t
flags
)
override
;
36
37
38
void
updateTraceEventDuration
(
const
uint8_t* categoryEnabledFlag,
39
const
char
*
name
,
40
SkEventTracer::Handle
handle)
override
;
41
42
const
uint8_t*
getCategoryGroupEnabled
(
const
char
*
name
)
override
;
43
44
const
char
*
getCategoryGroupName
(
const
uint8_t* categoryEnabledFlag)
override
{
45
static
const
char
* category =
"skiaATrace"
;
46
return
category;
47
}
48
49
// Atrace does not yet support splitting up trace output into sections.
50
void
newTracingSection
(
const
char
*
name
)
override
{}
51
52
private
:
53
SkATrace
(
const
SkATrace
&) =
delete
;
54
SkATrace
& operator=(
const
SkATrace
&) =
delete
;
55
56
void (*fBeginSection)(
const
char
*);
57
void (*fEndSection)(void);
58
bool (*fIsEnabled)(void);
59
};
60
61
#endif
SkEventTracer.h
SkATrace
Definition
SkATrace.h:23
SkATrace::addTraceEvent
SkEventTracer::Handle addTraceEvent(char phase, const uint8_t *categoryEnabledFlag, const char *name, uint64_t id, int numArgs, const char **argNames, const uint8_t *argTypes, const uint64_t *argValues, uint8_t flags) override
Definition
SkATrace.cpp:39
SkATrace::getCategoryGroupEnabled
const uint8_t * getCategoryGroupEnabled(const char *name) override
Definition
SkATrace.cpp:70
SkATrace::getCategoryGroupName
const char * getCategoryGroupName(const uint8_t *categoryEnabledFlag) override
Definition
SkATrace.h:44
SkATrace::SkATrace
SkATrace()
Definition
SkATrace.cpp:21
SkATrace::updateTraceEventDuration
void updateTraceEventDuration(const uint8_t *categoryEnabledFlag, const char *name, SkEventTracer::Handle handle) override
Definition
SkATrace.cpp:61
SkATrace::newTracingSection
void newTracingSection(const char *name) override
Definition
SkATrace.h:50
SkEventTracer
Definition
SkEventTracer.h:23
SkEventTracer::Handle
uint64_t Handle
Definition
SkEventTracer.h:26
flags
FlutterSemanticsFlag flags
Definition
fl_accessible_node.cc:105
name
const char * name
Definition
fuchsia.cc:50
Generated on Fri Apr 26 2024 06:16:34 for Flutter Engine by
1.9.8