Go to the source code of this file.
◆ DEF_TEST()
Definition at line 190 of file TracingTest.cpp.
190 {
194}
static void test_trace_objects()
static void test_trace_counters()
static void test_trace_simple()
◆ DEFINE_bool()
static DEFINE_bool |
( |
slowTracingTest |
, |
|
|
false |
, |
|
|
"Artificially slow down tracing test to produce nicer JSON" |
|
|
) |
| |
|
static |
◆ do_work()
static void do_work |
( |
int |
howMuchWork | ) |
|
|
static |
Definition at line 85 of file TracingTest.cpp.
85 {
86
87 if (FLAGS_slowTracingTest) {
88 for (
int i = 0;
i < howMuchWork * 100; ++
i) {
90 }
91 }
92}
#define SkScalarSin(radians)
static SkScalar gTracingTestWorkSink
◆ test_trace_counters()
static void test_trace_counters |
( |
| ) |
|
|
static |
Definition at line 117 of file TracingTest.cpp.
117 {
119
120 {
122
123
124
125 for (
int i = 0;
i < 180; ++
i) {
129 }
130 }
131
132 {
134
135
136 for (
int i = 0;
i < 180; ++
i) {
141 }
142 }
143
144 {
146
147
148
149 for (
int i = 0;
i < 180; ++
i) {
155 }
156 }
157}
#define SkDegreesToRadians(degrees)
#define SkScalarCos(radians)
#define TRACE_COUNTER1(category_group, name, value)
#define TRACE_COUNTER2(category_group, name, value1_name, value1_val, value2_name, value2_val)
static void do_work(int howMuchWork)
#define TRACE_EVENT0(category_group, name)
◆ test_trace_objects()
static void test_trace_objects |
( |
| ) |
|
|
static |
Definition at line 159 of file TracingTest.cpp.
159 {
161
162
163
164
165 TracingCircle* circle =
new TracingCircle(
SkPoint::Make(20, 20), 15);
166 circle->traceSnapshot();
168
169
171 rect->traceSnapshot();
173
174
175 circle->fCenter.offset(10, 10);
176 circle->traceSnapshot();
177
178 {
179
180
181
182 TRACE_EVENT1(
"skia",
"Processing Shape",
"#shape", circle);
184 }
185
186 delete circle;
188}
sk_sp< SkBlender > blender SkRect rect
static constexpr SkPoint Make(float x, float y)
static constexpr SkRect MakeWH(float w, float h)
#define TRACE_EVENT1(category_group, name, arg1_name, arg1_val)
◆ test_trace_simple()
static void test_trace_simple |
( |
| ) |
|
|
static |
Definition at line 94 of file TracingTest.cpp.
94 {
95
96
98
99 {
100
101
102
106 }
107
108 {
109
110
114 }
115}
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
#define TRACE_STR_COPY(str)
◆ gTracingTestWorkSink