OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 | 9 |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 SkISize size = canvas->getDeviceSize(); | 352 SkISize size = canvas->getDeviceSize(); |
353 SkRect dst = SkRect::MakeWH(size.width(), size.height()); | 353 SkRect dst = SkRect::MakeWH(size.width(), size.height()); |
354 SkRect src = SkRect::MakeWH(640, 480); | 354 SkRect src = SkRect::MakeWH(640, 480); |
355 SkMatrix matrix; | 355 SkMatrix matrix; |
356 matrix.setRectToRect(src, dst, SkMatrix::kCenter_ScaleToFit); | 356 matrix.setRectToRect(src, dst, SkMatrix::kCenter_ScaleToFit); |
357 | 357 |
358 canvas->concat(matrix); | 358 canvas->concat(matrix); |
359 fProc(canvas, fShowGL, fFlags); | 359 fProc(canvas, fShowGL, fFlags); |
360 } | 360 } |
361 | 361 |
362 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 362 uint32_t onGetFlags() const SK_OVERRIDE { |
363 return kSkipPDF_Flag | kSkipPicture_Flag | kSkipPipe_Flag | kSkipTiled_
Flag; | 363 return kSkipPDF_Flag | kSkipPicture_Flag | kSkipPipe_Flag | kSkipTiled_
Flag; |
364 } | 364 } |
365 | 365 |
366 private: | 366 private: |
367 typedef skiagm::GM INHERITED; | 367 typedef skiagm::GM INHERITED; |
368 }; | 368 }; |
369 | 369 |
370 ////////////////////////////////////////////////////////////////////////////// | 370 ////////////////////////////////////////////////////////////////////////////// |
371 | 371 |
372 #define GM_CONCAT(X,Y) GM_CONCAT_IMPL(X,Y) | 372 #define GM_CONCAT(X,Y) GM_CONCAT_IMPL(X,Y) |
(...skipping 15 matching lines...) Expand all Loading... |
388 ADD_GM(TalkGM, (2, true, 1)) | 388 ADD_GM(TalkGM, (2, true, 1)) |
389 ADD_GM(TalkGM, (2, true, 2)) | 389 ADD_GM(TalkGM, (2, true, 2)) |
390 ADD_GM(TalkGM, (2, true, 3)) | 390 ADD_GM(TalkGM, (2, true, 3)) |
391 ADD_GM(TalkGM, (3, false)) | 391 ADD_GM(TalkGM, (3, false)) |
392 ADD_GM(TalkGM, (3, true)) | 392 ADD_GM(TalkGM, (3, true)) |
393 ADD_GM(TalkGM, (4, false)) | 393 ADD_GM(TalkGM, (4, false)) |
394 ADD_GM(TalkGM, (4, true)) | 394 ADD_GM(TalkGM, (4, true)) |
395 | 395 |
396 //static GM* MyFactory(void*) { return new TalkGM(0, false); } | 396 //static GM* MyFactory(void*) { return new TalkGM(0, false); } |
397 //static GMRegistry reg(MyFactory); | 397 //static GMRegistry reg(MyFactory); |
OLD | NEW |