aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/flippity.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-11-01 14:05:12 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-01 19:35:20 +0000
commitf0a30d71ad242b350d12d8c2d93cc825199ee0f8 (patch)
tree8869536345f586bac5cf1c842ae8af28f6a22731 /gm/flippity.cpp
parent8f21f2172f2f747c0bbe2e3c1784f906689ee8fd (diff)
Make matrix flip GM easier to triage
TBR=bsalomon@google.com Change-Id: Ie6a4d82d330ac9371df21820a13c65c0ee67faef Reviewed-on: https://skia-review.googlesource.com/66157 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'gm/flippity.cpp')
-rw-r--r--gm/flippity.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/gm/flippity.cpp b/gm/flippity.cpp
index 53dfd25fec..f4358382c3 100644
--- a/gm/flippity.cpp
+++ b/gm/flippity.cpp
@@ -59,6 +59,7 @@ static const SkMatrix kUVMatrices[kNumMatrices] = {
// Create a fixed size text label like "LL" or "LR".
static sk_sp<SkImage> make_text_image(GrContext* context, const char* text, SkColor color) {
SkPaint paint;
+ sk_tool_utils::set_portable_typeface(&paint);
paint.setAntiAlias(true);
paint.setTextSize(32);
paint.setColor(color);
@@ -254,6 +255,8 @@ protected:
this->makeLabels(context);
+ canvas->save();
+
// Top row gets TL image
this->drawRow(context, canvas, false, false, false);
@@ -272,8 +275,12 @@ protected:
// Fourth row gets scaled subsets of BL images
this->drawRow(context, canvas, true, true, true);
+ canvas->restore();
+
// separator grid
- canvas->drawLine(0, kCellSize, kGMWidth, kCellSize, SkPaint());
+ for (int i = 0; i < 4; ++i) {
+ canvas->drawLine(0, i * kCellSize, kGMWidth, i * kCellSize, SkPaint());
+ }
for (int i = 0; i < kNumMatrices; ++i) {
canvas->drawLine(i * kCellSize, 0, i * kCellSize, kGMHeight, SkPaint());
}