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

Side by Side Diff: gm/multipicturedraw.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/mipmap.cpp ('k') | gm/ninepatchstretch.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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 step.fX = SkIntToScalar(x*kTileWidth); 417 step.fX = SkIntToScalar(x*kTileWidth);
418 step.fY = SkIntToScalar(y*kTileHeight); 418 step.fY = SkIntToScalar(y*kTileHeight);
419 step.fPaint = new SkPaint; 419 step.fPaint = new SkPaint;
420 step.fPaint->setColorFilter( 420 step.fPaint->setColorFilter(
421 SkColorFilter::MakeModeFilter(colors[x][y], SkXfermode::kModulat e_Mode)); 421 SkColorFilter::MakeModeFilter(colors[x][y], SkXfermode::kModulat e_Mode));
422 422
423 step.fSurf = create_compat_surface(finalCanvas, kTileWidth, kTileHei ght); 423 step.fSurf = create_compat_surface(finalCanvas, kTileWidth, kTileHei ght);
424 424
425 SkCanvas* subCanvas = step.fSurf->getCanvas(); 425 SkCanvas* subCanvas = step.fSurf->getCanvas();
426 426
427 const SkMatrix trans = SkMatrix::MakeTrans(-SkIntToScalar(x*kTileWid th), 427 const SkMatrix trans = SkMatrix::MakeTrans(-SkIntToScalar(x*kTileWid th),
428 -SkIntToScalar(y*kTileHei ght)); 428 -SkIntToScalar(y*kTileHei ght));
429 429
430 create_content(mpd, pfGen, pictures, subCanvas, trans); 430 create_content(mpd, pfGen, pictures, subCanvas, trans);
431 } 431 }
432 } 432 }
433 } 433 }
434 434
435 static const PFLayoutMtd gLayoutMthds[] = { simple, tiled }; 435 static const PFLayoutMtd gLayoutMthds[] = { simple, tiled };
436 436
437 namespace skiagm { 437 namespace skiagm {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 511
512 canvas->drawImage(step.fSurf->makeImageSnapshot().get(), 512 canvas->drawImage(step.fSurf->makeImageSnapshot().get(),
513 step.fX, step.fY, step.fPaint); 513 step.fX, step.fY, step.fPaint);
514 } 514 }
515 } 515 }
516 516
517 SkISize onISize() override { return SkISize::Make(kPicWidth, kPicHeight) ; } 517 SkISize onISize() override { return SkISize::Make(kPicWidth, kPicHeight) ; }
518 518
519 SkString onShortName() override { 519 SkString onShortName() override {
520 static const char* gContentNames[] = { 520 static const char* gContentNames[] = {
521 "noclip", "rectclip", "rrectclip", "pathclip", 521 "noclip", "rectclip", "rrectclip", "pathclip",
522 "invpathclip", "sierpinski", "biglayer" 522 "invpathclip", "sierpinski", "biglayer"
523 }; 523 };
524 static const char* gLayoutNames[] = { "simple", "tiled" }; 524 static const char* gLayoutNames[] = { "simple", "tiled" };
525 525
526 SkASSERT(SK_ARRAY_COUNT(gLayoutNames) == kLayoutCnt); 526 SkASSERT(SK_ARRAY_COUNT(gLayoutNames) == kLayoutCnt);
527 SkASSERT(SK_ARRAY_COUNT(gContentNames) == kContentCnt); 527 SkASSERT(SK_ARRAY_COUNT(gContentNames) == kContentCnt);
528 528
529 SkString name("multipicturedraw_"); 529 SkString name("multipicturedraw_");
530 530
531 name.append(gContentNames[fContent]); 531 name.append(gContentNames[fContent]);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 MultiPictureDraw::kTiled_Layout);) 563 MultiPictureDraw::kTiled_Layout);)
564 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kPathClipMulti_Content, 564 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kPathClipMulti_Content,
565 MultiPictureDraw::kTiled_Layout);) 565 MultiPictureDraw::kTiled_Layout);)
566 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kInvPathClipMulti_Conte nt, 566 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kInvPathClipMulti_Conte nt,
567 MultiPictureDraw::kTiled_Layout);) 567 MultiPictureDraw::kTiled_Layout);)
568 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kSierpinski_Content, 568 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kSierpinski_Content,
569 MultiPictureDraw::kTiled_Layout);) 569 MultiPictureDraw::kTiled_Layout);)
570 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kBigLayer_Content, 570 DEF_GM(return new MultiPictureDraw(MultiPictureDraw::kBigLayer_Content,
571 MultiPictureDraw::kTiled_Layout);) 571 MultiPictureDraw::kTiled_Layout);)
572 } 572 }
OLDNEW
« no previous file with comments | « gm/mipmap.cpp ('k') | gm/ninepatchstretch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698