Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: gm/multipicturedraw.cpp

Issue 1827433002: Reland of [2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gm/modecolorfilters.cpp ('k') | gm/recordopts.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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::CreateModeFilter(colors[x][y], SkXfermode::kModul ate_Mode))->unref(); 423 SkColorFilter::MakeModeFilter(colors[x][y], SkXfermode::kModulat e_Mode));
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
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 }
OLDNEW
« no previous file with comments | « gm/modecolorfilters.cpp ('k') | gm/recordopts.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698