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

Side by Side Diff: gm/matriximagefilter.cpp

Issue 281383013: skiagm::make_isize -> SkISize::Make (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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/mixedxfermodes.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 "SkMatrixImageFilter.h" 10 #include "SkMatrixImageFilter.h"
(...skipping 16 matching lines...) Expand all
27 SkAutoTUnref<SkImageFilter> imageFilter( 27 SkAutoTUnref<SkImageFilter> imageFilter(
28 SkMatrixImageFilter::Create(matrix, filterLevel)); 28 SkMatrixImageFilter::Create(matrix, filterLevel));
29 SkPaint paint; 29 SkPaint paint;
30 paint.setImageFilter(imageFilter.get()); 30 paint.setImageFilter(imageFilter.get());
31 canvas->saveLayer(&rect, &paint); 31 canvas->saveLayer(&rect, &paint);
32 canvas->drawBitmap(bitmap, 0, 0); 32 canvas->drawBitmap(bitmap, 0, 0);
33 canvas->restore(); 33 canvas->restore();
34 } 34 }
35 35
36 virtual SkISize onISize() { 36 virtual SkISize onISize() {
37 return make_isize(420, 100); 37 return SkISize::Make(420, 100);
38 } 38 }
39 39
40 void make_checkerboard(SkBitmap* bitmap) { 40 void make_checkerboard(SkBitmap* bitmap) {
41 bitmap->allocN32Pixels(64, 64); 41 bitmap->allocN32Pixels(64, 64);
42 SkCanvas canvas(*bitmap); 42 SkCanvas canvas(*bitmap);
43 SkPaint darkPaint; 43 SkPaint darkPaint;
44 darkPaint.setColor(0xFF404040); 44 darkPaint.setColor(0xFF404040);
45 SkPaint lightPaint; 45 SkPaint lightPaint;
46 lightPaint.setColor(0xFFA0A0A0); 46 lightPaint.setColor(0xFFA0A0A0);
47 for (int y = 0; y < 64; y += 32) { 47 for (int y = 0; y < 64; y += 32) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/mixedxfermodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698