| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkArithmeticMode.h" | 9 #include "SkArithmeticMode.h" |
| 10 #include "SkPath.h" | 10 #include "SkPath.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 canvas->restore(); | 155 canvas->restore(); |
| 156 canvas->translate(kXfermodeTypeSpacing, 0); | 156 canvas->translate(kXfermodeTypeSpacing, 0); |
| 157 } | 157 } |
| 158 | 158 |
| 159 canvas->restore(); | 159 canvas->restore(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 void onDraw(SkCanvas* canvas) override { | 162 void onDraw(SkCanvas* canvas) override { |
| 163 draw_pass(canvas, kCheckerboard_Pass); | 163 draw_pass(canvas, kCheckerboard_Pass); |
| 164 canvas->saveLayer(NULL, NULL); | 164 canvas->saveLayer(nullptr, nullptr); |
| 165 | 165 |
| 166 canvas->translate(kMargin, kMargin); | 166 canvas->translate(kMargin, kMargin); |
| 167 draw_pass(canvas, kBackground_Pass); | 167 draw_pass(canvas, kBackground_Pass); |
| 168 | 168 |
| 169 SkPaint titlePaint(fLabelPaint); | 169 SkPaint titlePaint(fLabelPaint); |
| 170 titlePaint.setTextSize(9 * titlePaint.getTextSize() / 8); | 170 titlePaint.setTextSize(9 * titlePaint.getTextSize() / 8); |
| 171 titlePaint.setFakeBoldText(true); | 171 titlePaint.setFakeBoldText(true); |
| 172 titlePaint.setTextAlign(SkPaint::kCenter_Align); | 172 titlePaint.setTextAlign(SkPaint::kCenter_Align); |
| 173 canvas->drawText("Porter Duff", sizeof("Porter Duff") - 1, | 173 canvas->drawText("Porter Duff", sizeof("Porter Duff") - 1, |
| 174 kLabelSpacing + 3 * kShapeTypeSpacing, | 174 kLabelSpacing + 3 * kShapeTypeSpacing, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 typedef GM INHERITED; | 263 typedef GM INHERITED; |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 ////////////////////////////////////////////////////////////////////////////// | 266 ////////////////////////////////////////////////////////////////////////////// |
| 267 | 267 |
| 268 static GM* MyFactory(void*) { return new AAXfermodesGM; } | 268 static GM* MyFactory(void*) { return new AAXfermodesGM; } |
| 269 static GMRegistry reg(MyFactory); | 269 static GMRegistry reg(MyFactory); |
| 270 | 270 |
| 271 } | 271 } |
| OLD | NEW |