Index: src/utils/debugger/SkDrawCommand.cpp |
diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp |
index a9415dd924ef97bb54be03f20ab85b498931cd56..20aad3b9a510b6824d92b63a60d71034631e7d29 100644 |
--- a/src/utils/debugger/SkDrawCommand.cpp |
+++ b/src/utils/debugger/SkDrawCommand.cpp |
@@ -130,7 +130,25 @@ void render_bitmap(SkCanvas* canvas, const SkBitmap& input, const SkRect* srcRec |
xScale * input.width(), |
yScale * input.height()); |
+ static const int kNumBlocks = 8; |
+ |
canvas->clear(0xFFFFFFFF); |
+ SkISize block = { |
+ canvas->imageInfo().width()/kNumBlocks, |
+ canvas->imageInfo().height()/kNumBlocks |
+ }; |
+ for (int y = 0; y < kNumBlocks; ++y) { |
+ for (int x = 0; x < kNumBlocks; ++x) { |
+ SkPaint paint; |
+ paint.setColor((x+y)%2 ? SK_ColorLTGRAY : SK_ColorDKGRAY); |
+ SkRect r = SkRect::MakeXYWH(SkIntToScalar(x*block.width()), |
+ SkIntToScalar(y*block.height()), |
+ SkIntToScalar(block.width()), |
+ SkIntToScalar(block.height())); |
+ canvas->drawRect(r, paint); |
+ } |
+ } |
+ |
canvas->drawBitmapRect(input, dst, nullptr); |
if (srcRect) { |