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

Side by Side Diff: gm/shapes.cpp

Issue 2031113003: Don't use complex blend mode for shapes gm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | 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 2016 Google Inc. 2 * Copyright 2016 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 #include "SkRandom.h" 9 #include "SkRandom.h"
10 #include "SkRRect.h" 10 #include "SkRRect.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 if (!antialias) { 53 if (!antialias) {
54 fName.append("_bw"); 54 fName.append("_bw");
55 } 55 }
56 } 56 }
57 57
58 SkString onShortName() override final { return fName; } 58 SkString onShortName() override final { return fName; }
59 SkISize onISize() override { return SkISize::Make(500, 500); } 59 SkISize onISize() override { return SkISize::Make(500, 500); }
60 60
61 void onOnceBeforeDraw() override { 61 void onOnceBeforeDraw() override {
62 fPaint.setXfermodeMode(SkXfermode::kDarken_Mode);
63 fPaint.setAntiAlias(fAntialias); 62 fPaint.setAntiAlias(fAntialias);
64 } 63 }
65 64
66 void onDraw(SkCanvas* canvas) override { 65 void onDraw(SkCanvas* canvas) override {
67 canvas->clear(SK_ColorWHITE); 66 canvas->clear(SK_ColorWHITE);
68 67
69 canvas->save(); 68 canvas->save();
70 canvas->translate(canvas->imageInfo().width() / 2.f, canvas->imageInfo() .height() / 2.f); 69 canvas->translate(canvas->imageInfo().width() / 2.f, canvas->imageInfo() .height() / 2.f);
71 this->drawShapes(canvas); 70 this->drawShapes(canvas);
72 canvas->restore(); 71 canvas->restore();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 }; 153 };
155 154
156 ////////////////////////////////////////////////////////////////////////////// 155 //////////////////////////////////////////////////////////////////////////////
157 156
158 DEF_GM( return new SimpleShapesGM(true); ) 157 DEF_GM( return new SimpleShapesGM(true); )
159 DEF_GM( return new SimpleShapesGM(false); ) 158 DEF_GM( return new SimpleShapesGM(false); )
160 DEF_GM( return new InnerShapesGM(true); ) 159 DEF_GM( return new InnerShapesGM(true); )
161 DEF_GM( return new InnerShapesGM(false); ) 160 DEF_GM( return new InnerShapesGM(false); )
162 161
163 } 162 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698