aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GpuLayerCacheTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/GpuLayerCacheTest.cpp')
-rw-r--r--tests/GpuLayerCacheTest.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/GpuLayerCacheTest.cpp b/tests/GpuLayerCacheTest.cpp
index 6b3084b641..efb1ec1c20 100644
--- a/tests/GpuLayerCacheTest.cpp
+++ b/tests/GpuLayerCacheTest.cpp
@@ -111,7 +111,10 @@ DEF_GPUTEST(GpuLayerCache, reporter, factory) {
}
SkPictureRecorder recorder;
- recorder.beginRecording(1, 1);
+ SkCanvas* c = recorder.beginRecording(1, 1);
+ // Draw something, anything, to prevent an empty-picture optimization,
+ // which is a singleton and never purged.
+ c->drawRect(SkRect::MakeWH(1,1), SkPaint());
SkAutoTUnref<const SkPicture> picture(recorder.endRecording());
GrLayerCache cache(context);