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

Side by Side Diff: src/effects/SkMatrixConvolutionImageFilter.cpp

Issue 789163006: Add toString methods to SkImageFilter-derived classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make sure leading 0's aren't stripped off colors Created 6 years 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 | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkMatrixImageFilter.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 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 "SkMatrixConvolutionImageFilter.h" 8 #include "SkMatrixConvolutionImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 fKernelSize, 362 fKernelSize,
363 fKernel, 363 fKernel,
364 fGain, 364 fGain,
365 fBias, 365 fBias,
366 fKernelOffset, 366 fKernelOffset,
367 convert_tilemodes(fTileMode), 367 convert_tilemodes(fTileMode),
368 fConvolveAlpha); 368 fConvolveAlpha);
369 return true; 369 return true;
370 } 370 }
371 #endif 371 #endif
372
373 #ifndef SK_IGNORE_TO_STRING
374 void SkMatrixConvolutionImageFilter::toString(SkString* str) const {
375 str->appendf("SkMatrixConvolutionImageFilter: (");
376 str->appendf("size: (%d,%d) kernel: (", fKernelSize.width(), fKernelSize.hei ght());
377 for (int y = 0; y < fKernelSize.height(); y++) {
378 for (int x = 0; x < fKernelSize.width(); x++) {
379 str->appendf("%f ", fKernel[y * fKernelSize.width() + x]);
380 }
381 }
382 str->appendf(")");
383 str->appendf("gain: %f bias: %f ", fGain, fBias);
384 str->appendf("offset: (%d, %d) ", fKernelOffset.fX, fKernelOffset.fY);
385 str->appendf("convolveAlpha: %s", fConvolveAlpha ? "true" : "false");
386 str->append(")");
387 }
388 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkMatrixImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698