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

Side by Side Diff: gm/localmatriximagefilter.cpp

Issue 1402133002: change back to method for localmatrix imagefilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add comment for const-cast Created 5 years, 2 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 | include/core/SkImageFilter.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkBlurImageFilter.h" 10 #include "SkBlurImageFilter.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 const SkScalar spacer = image0->width() * 3.0f / 2; 80 const SkScalar spacer = image0->width() * 3.0f / 2;
81 81
82 canvas->translate(40, 40); 82 canvas->translate(40, 40);
83 for (auto&& factory : factories) { 83 for (auto&& factory : factories) {
84 SkAutoTUnref<SkImageFilter> filter(factory()); 84 SkAutoTUnref<SkImageFilter> filter(factory());
85 85
86 canvas->save(); 86 canvas->save();
87 show_image(canvas, image0, filter); 87 show_image(canvas, image0, filter);
88 for (const auto& matrix : matrices) { 88 for (const auto& matrix : matrices) {
89 SkAutoTUnref<SkImageFilter> localFilter( 89 SkAutoTUnref<SkImageFilter> localFilter(filter->newWithLocalMatr ix(matrix));
90 SkImageFilter::CreateLocalMatrixFilter(matrix, filter));
91 canvas->translate(spacer, 0); 90 canvas->translate(spacer, 0);
92 show_image(canvas, image0, localFilter); 91 show_image(canvas, image0, localFilter);
93 } 92 }
94 canvas->restore(); 93 canvas->restore();
95 canvas->translate(0, spacer); 94 canvas->translate(0, spacer);
96 } 95 }
97 } 96 }
98 97
99 private: 98 private:
100 typedef GM INHERITED; 99 typedef GM INHERITED;
101 }; 100 };
102 DEF_GM( return new LocalMatrixImageFilterGM; ) 101 DEF_GM( return new LocalMatrixImageFilterGM; )
103 102
OLDNEW
« no previous file with comments | « no previous file | include/core/SkImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698