Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: tests/GpuLayerCacheTest.cpp

Issue 657383004: Alter layer hoisting to only hoist layers for one canvas at a time (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix noGPU build Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698