Lines Matching refs:reporter
49 static void create_layers(skiatest::Reporter* reporter,
64 REPORTER_ASSERT(reporter, layer);
67 REPORTER_ASSERT(reporter, temp == layer);
69 REPORTER_ASSERT(reporter, TestingAccess::NumLayers(cache) == idOffset + i + 1);
71 REPORTER_ASSERT(reporter, picture.uniqueID() == layer->pictureID());
72 REPORTER_ASSERT(reporter, layer->start() == idOffset + i + 1);
73 REPORTER_ASSERT(reporter, layer->stop() == idOffset + i + 2);
74 REPORTER_ASSERT(reporter, !layer->texture());
75 REPORTER_ASSERT(reporter, !layer->paint());
76 REPORTER_ASSERT(reporter, !layer->isAtlased());
80 static void lock_layer(skiatest::Reporter* reporter,
95 REPORTER_ASSERT(reporter, needsRerendering);
98 REPORTER_ASSERT(reporter, !needsRerendering);
100 REPORTER_ASSERT(reporter, layer->texture());
101 REPORTER_ASSERT(reporter, layer->locked());
105 REPORTER_ASSERT(reporter, 1 == TestingAccess::Uses(layer));
112 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GpuLayerCache, reporter, ctxInfo) {
135 create_layers(reporter, &cache, *picture, kInitialNumLayers, 0);
141 REPORTER_ASSERT(reporter, layer);
143 lock_layer(reporter, &cache, layer);
151 REPORTER_ASSERT(reporter, layer->isAtlased());
153 REPORTER_ASSERT(reporter, 1 == stats.fTotal);
157 REPORTER_ASSERT(reporter, !layer->isAtlased());
159 REPORTER_ASSERT(reporter, 2 == stats.fTotal);
170 REPORTER_ASSERT(reporter, layer);
176 REPORTER_ASSERT(reporter, 2 == stats.fTotal);
178 REPORTER_ASSERT(reporter, 1 == stats.fNumPurgeable);
179 REPORTER_ASSERT(reporter, 1 == stats.fNumNonPurgeable);
187 REPORTER_ASSERT(reporter, layer);
190 REPORTER_ASSERT(reporter, !layer->locked());
197 REPORTER_ASSERT(reporter, layer->texture());
198 REPORTER_ASSERT(reporter, layer->isAtlased());
202 REPORTER_ASSERT(reporter, !layer->texture());
203 REPORTER_ASSERT(reporter, !layer->isAtlased());
211 REPORTER_ASSERT(reporter, nullptr == TestingAccess::GetBackingTexture(&cache));
215 REPORTER_ASSERT(reporter, 2 == stats.fTotal);
217 REPORTER_ASSERT(reporter, 2 == stats.fNumPurgeable);
222 REPORTER_ASSERT(reporter, TestingAccess::GetBackingTexture(&cache));
226 REPORTER_ASSERT(reporter, 2 == stats.fTotal);
228 REPORTER_ASSERT(reporter, 1 == stats.fNumPurgeable);
229 REPORTER_ASSERT(reporter, 1 == stats.fNumNonPurgeable);
237 create_layers(reporter, &cache, *picture, 1, kInitialNumLayers);
240 REPORTER_ASSERT(reporter, layer);
242 lock_layer(reporter, &cache, layer);
254 REPORTER_ASSERT(reporter, layer);
255 REPORTER_ASSERT(reporter, !layer->locked());
256 REPORTER_ASSERT(reporter, layer->texture());
257 REPORTER_ASSERT(reporter, layer->isAtlased());
261 REPORTER_ASSERT(reporter, layer);
263 REPORTER_ASSERT(reporter, !layer->texture());
264 REPORTER_ASSERT(reporter, !layer->isAtlased());
268 REPORTER_ASSERT(reporter, nullptr == layer);
278 REPORTER_ASSERT(reporter, TestingAccess::NumLayers(&cache) == 0);
282 REPORTER_ASSERT(reporter, 2 == stats.fTotal);
284 REPORTER_ASSERT(reporter, 1 == stats.fNumPurgeable);
285 REPORTER_ASSERT(reporter, 1 == stats.fNumNonPurgeable);
292 create_layers(reporter, &cache, *picture, kInitialNumLayers, 0);
297 REPORTER_ASSERT(reporter, TestingAccess::NumLayers(&cache) == 0);
299 REPORTER_ASSERT(reporter, nullptr == TestingAccess::GetBackingTexture(&cache));
303 REPORTER_ASSERT(reporter, 2 == stats.fTotal);
304 REPORTER_ASSERT(reporter, 2 == stats.fNumPurgeable);
312 REPORTER_ASSERT(reporter, 0 == stats.fTotal);
317 REPORTER_ASSERT(reporter, nullptr == TestingAccess::GetBackingTexture(&cache));
322 create_layers(reporter, &cache, *picture, kInitialNumLayers, 0);
329 REPORTER_ASSERT(reporter, layer);
331 lock_layer(reporter, &cache, layer);
336 REPORTER_ASSERT(reporter, 2 == stats.fTotal);
337 REPORTER_ASSERT(reporter, 2 == stats.fNumNonPurgeable);
346 REPORTER_ASSERT(reporter, layer);
353 REPORTER_ASSERT(reporter, TestingAccess::NumLayers(&cache) == 0);
357 REPORTER_ASSERT(reporter, 2 == stats.fTotal);
358 REPORTER_ASSERT(reporter, 1 == stats.fNumPurgeable);
359 REPORTER_ASSERT(reporter, 1 == stats.fNumNonPurgeable);
366 REPORTER_ASSERT(reporter, 2 == stats.fTotal);
367 REPORTER_ASSERT(reporter, 2 == stats.fNumPurgeable);