Index: gm/drawatlascolor.cpp |
diff --git a/gm/drawatlascolor.cpp b/gm/drawatlascolor.cpp |
index e8fd23608cb9b279778bc06c216ad607db7aa58d..0e85055402863048f58158cdcbd7248792598d5b 100644 |
--- a/gm/drawatlascolor.cpp |
+++ b/gm/drawatlascolor.cpp |
@@ -29,22 +29,22 @@ static sk_sp<SkImage> make_atlas(SkCanvas* caller, int atlasSize) { |
paint.setXfermode(SkXfermode::Create(SkXfermode::kSrc_Mode)); |
paint.setColor(SK_ColorWHITE); |
- SkRect r = SkRect::MakeXYWH(0, 0, |
+ SkRect r = SkRect::MakeXYWH(0, 0, |
SkIntToScalar(kBlockSize), SkIntToScalar(kBlockSize)); |
canvas->drawRect(r, paint); |
paint.setColor(SK_ColorRED); |
- r = SkRect::MakeXYWH(SkIntToScalar(kBlockSize), 0, |
+ r = SkRect::MakeXYWH(SkIntToScalar(kBlockSize), 0, |
SkIntToScalar(kBlockSize), SkIntToScalar(kBlockSize)); |
canvas->drawRect(r, paint); |
paint.setColor(SK_ColorGREEN); |
- r = SkRect::MakeXYWH(0, SkIntToScalar(kBlockSize), |
+ r = SkRect::MakeXYWH(0, SkIntToScalar(kBlockSize), |
SkIntToScalar(kBlockSize), SkIntToScalar(kBlockSize)); |
canvas->drawRect(r, paint); |
paint.setColor(SK_ColorTRANSPARENT); |
- r = SkRect::MakeXYWH(SkIntToScalar(kBlockSize), SkIntToScalar(kBlockSize), |
+ r = SkRect::MakeXYWH(SkIntToScalar(kBlockSize), SkIntToScalar(kBlockSize), |
SkIntToScalar(kBlockSize), SkIntToScalar(kBlockSize)); |
canvas->drawRect(r, paint); |
@@ -58,17 +58,17 @@ public: |
DrawAtlasColorsGM() { |
this->setBGColor(sk_tool_utils::color_to_565(0xFFCCCCCC)); |
} |
- |
+ |
protected: |
SkString onShortName() override { |
return SkString("draw-atlas-colors"); |
} |
- |
+ |
SkISize onISize() override { |
return SkISize::Make(kNumXferModes * (kAtlasSize + kPad) + kPad, |
2 * kNumColors * (kAtlasSize + kPad) + kTextPad + kPad); |
} |
- |
+ |
void onDraw(SkCanvas* canvas) override { |
const SkRect target = SkRect::MakeWH(SkIntToScalar(kAtlasSize), SkIntToScalar(kAtlasSize)); |
@@ -147,7 +147,7 @@ protected: |
} |
for (int i = 0; i < numModes; ++i) { |
- canvas->save(); |
+ canvas->save(); |
canvas->translate(SkIntToScalar(i*(target.height()+kPad)), |
SkIntToScalar(kTextPad+kPad)); |
// w/o a paint |
@@ -157,10 +157,10 @@ protected: |
// w a paint |
canvas->drawAtlas(fAtlas.get(), xforms, rects, quadColors, numColors, |
gModes[i].fMode, nullptr, &paint); |
- canvas->restore(); |
+ canvas->restore(); |
} |
} |
- |
+ |
private: |
static const int kNumXferModes = 29; |
static const int kNumColors = 4; |
@@ -174,4 +174,3 @@ private: |
typedef GM INHERITED; |
}; |
DEF_GM( return new DrawAtlasColorsGM; ) |
- |