Index: tests/GpuLayerCacheTest.cpp |
diff --git a/tests/GpuLayerCacheTest.cpp b/tests/GpuLayerCacheTest.cpp |
index 62f6ec7a8c207888e4c74feb67bb028c89ef78c1..0a8d0d2442468a39a181ab7844351f90e6e97c35 100644 |
--- a/tests/GpuLayerCacheTest.cpp |
+++ b/tests/GpuLayerCacheTest.cpp |
@@ -66,10 +66,14 @@ static void lock_layer(skiatest::Reporter* reporter, |
desc.fHeight = 512; |
desc.fConfig = kSkia8888_GrPixelConfig; |
- bool needsRerendering = cache->lock(layer, desc, false); |
+ bool needsRerendering; |
+ bool inAtlas = cache->tryToAtlas(layer, desc, &needsRerendering); |
+ if (!inAtlas) { |
+ cache->lock(layer, desc, &needsRerendering); |
+ } |
REPORTER_ASSERT(reporter, needsRerendering); |
- needsRerendering = cache->lock(layer, desc, false); |
+ cache->lock(layer, desc, &needsRerendering); |
REPORTER_ASSERT(reporter, !needsRerendering); |
REPORTER_ASSERT(reporter, layer->texture()); |