aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/atlastext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/atlastext.cpp')
-rw-r--r--gm/atlastext.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/gm/atlastext.cpp b/gm/atlastext.cpp
index 6ee092b49f..832a604e6e 100644
--- a/gm/atlastext.cpp
+++ b/gm/atlastext.cpp
@@ -112,6 +112,11 @@ private:
uint32_t color = random.nextU();
x = size + draw_string(fTarget.get(), text, x, y, color, typeface, size);
x = SkScalarCeilToScalar(x);
+ // Flush periodically to test continued drawing after a flush. Using color
+ // to avoid churning the RNG and having to rebaseline images.
+ if (!(color & 0xf)) {
+ fTarget->flush();
+ }
if (x + 100 > kSize) {
x = 0;
y += SkScalarCeilToScalar(size + 3);