| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 | 9 |
| 10 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 }; | 413 }; |
| 414 | 414 |
| 415 for (int y = 0; y < kNumTilesY; ++y) { | 415 for (int y = 0; y < kNumTilesY; ++y) { |
| 416 for (int x = 0; x < kNumTilesX; ++x) { | 416 for (int x = 0; x < kNumTilesX; ++x) { |
| 417 ComposeStep& step = composeSteps->push_back(); | 417 ComposeStep& step = composeSteps->push_back(); |
| 418 | 418 |
| 419 step.fX = SkIntToScalar(x*kTileWidth); | 419 step.fX = SkIntToScalar(x*kTileWidth); |
| 420 step.fY = SkIntToScalar(y*kTileHeight); | 420 step.fY = SkIntToScalar(y*kTileHeight); |
| 421 step.fPaint = new SkPaint; | 421 step.fPaint = new SkPaint; |
| 422 step.fPaint->setColorFilter( | 422 step.fPaint->setColorFilter( |
| 423 SkColorFilter::MakeModeFilter(colors[x][y], SkXfermode::kModulat
e_Mode)); | 423 SkColorFilter::CreateModeFilter(colors[x][y], SkXfermode::kModul
ate_Mode))->unref(); |
| 424 | 424 |
| 425 step.fSurf = create_compat_surface(finalCanvas, kTileWidth, kTileHei
ght); | 425 step.fSurf = create_compat_surface(finalCanvas, kTileWidth, kTileHei
ght); |
| 426 | 426 |
| 427 SkCanvas* subCanvas = step.fSurf->getCanvas(); | 427 SkCanvas* subCanvas = step.fSurf->getCanvas(); |
| 428 | 428 |
| 429 const SkMatrix trans = SkMatrix::MakeTrans(-SkIntToScalar(x*kTileWid
th), | 429 const SkMatrix trans = SkMatrix::MakeTrans(-SkIntToScalar(x*kTileWid
th), |
| 430 -SkIntToScalar(y*kTileHei
ght)); | 430 -SkIntToScalar(y*kTileHei
ght)); |
| 431 | 431 |
| 432 create_content(mpd, pfGen, pictures, subCanvas, trans); | 432 create_content(mpd, pfGen, pictures, subCanvas, trans); |
| 433 } | 433 } |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 MultiPictureDraw::kTiled_Layout);) | 565 MultiPictureDraw::kTiled_Layout);) |
| 566 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kPathClipMulti_Content, | 566 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kPathClipMulti_Content, |
| 567 MultiPictureDraw::kTiled_Layout);) | 567 MultiPictureDraw::kTiled_Layout);) |
| 568 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kInvPathClipMulti_Conte
nt, | 568 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kInvPathClipMulti_Conte
nt, |
| 569 MultiPictureDraw::kTiled_Layout);) | 569 MultiPictureDraw::kTiled_Layout);) |
| 570 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kSierpinski_Content, | 570 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kSierpinski_Content, |
| 571 MultiPictureDraw::kTiled_Layout);) | 571 MultiPictureDraw::kTiled_Layout);) |
| 572 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kBigLayer_Content, | 572 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kBigLayer_Content, |
| 573 MultiPictureDraw::kTiled_Layout);) | 573 MultiPictureDraw::kTiled_Layout);) |
| 574 } | 574 } |
| OLD | NEW |