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

Side by Side Diff: gm/matriximagefilter.cpp

Issue 1077763002: Change some more GMs to clear to opaque black, not transparent black. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/matrixconvolution.cpp ('k') | gm/offsetimagefilter.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 #include "SkColor.h" 9 #include "SkColor.h"
10 #include "SkImageFilter.h" 10 #include "SkImageFilter.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 canvas.drawRect(SkRect::MakeXYWH(0, 0, 16, 16), darkPaint); 51 canvas.drawRect(SkRect::MakeXYWH(0, 0, 16, 16), darkPaint);
52 canvas.drawRect(SkRect::MakeXYWH(16, 0, 16, 16), lightPaint); 52 canvas.drawRect(SkRect::MakeXYWH(16, 0, 16, 16), lightPaint);
53 canvas.drawRect(SkRect::MakeXYWH(0, 16, 16, 16), lightPaint); 53 canvas.drawRect(SkRect::MakeXYWH(0, 16, 16, 16), lightPaint);
54 canvas.drawRect(SkRect::MakeXYWH(16, 16, 16, 16), darkPaint); 54 canvas.drawRect(SkRect::MakeXYWH(16, 16, 16, 16), darkPaint);
55 canvas.restore(); 55 canvas.restore();
56 } 56 }
57 } 57 }
58 } 58 }
59 59
60 virtual void onDraw(SkCanvas* canvas) { 60 virtual void onDraw(SkCanvas* canvas) {
61 canvas->clear(0x00000000); 61 canvas->clear(SK_ColorBLACK);
62 SkMatrix matrix; 62 SkMatrix matrix;
63 SkScalar margin = SkIntToScalar(10); 63 SkScalar margin = SkIntToScalar(10);
64 matrix.setSkew(SkDoubleToScalar(0.5), SkDoubleToScalar(0.2)); 64 matrix.setSkew(SkDoubleToScalar(0.5), SkDoubleToScalar(0.2));
65 SkBitmap checkerboard; 65 SkBitmap checkerboard;
66 make_checkerboard(&checkerboard); 66 make_checkerboard(&checkerboard);
67 67
68 SkRect srcRect = SkRect::MakeWH(96, 96); 68 SkRect srcRect = SkRect::MakeWH(96, 96);
69 69
70 canvas->translate(margin, margin); 70 canvas->translate(margin, margin);
71 draw(canvas, srcRect, checkerboard, matrix, kNone_SkFilterQuality); 71 draw(canvas, srcRect, checkerboard, matrix, kNone_SkFilterQuality);
(...skipping 14 matching lines...) Expand all
86 private: 86 private:
87 typedef GM INHERITED; 87 typedef GM INHERITED;
88 }; 88 };
89 89
90 ////////////////////////////////////////////////////////////////////////////// 90 //////////////////////////////////////////////////////////////////////////////
91 91
92 static GM* MyFactory(void*) { return new MatrixImageFilterGM; } 92 static GM* MyFactory(void*) { return new MatrixImageFilterGM; }
93 static GMRegistry reg(MyFactory); 93 static GMRegistry reg(MyFactory);
94 94
95 } 95 }
OLDNEW
« no previous file with comments | « gm/matrixconvolution.cpp ('k') | gm/offsetimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698