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

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

Issue 234833003: Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 const SkBitmap& source, 253 const SkBitmap& source,
254 const Context& ctx, 254 const Context& ctx,
255 SkBitmap* result, 255 SkBitmap* result,
256 SkIPoint* offset) const { 256 SkIPoint* offset) const {
257 SkBitmap src = source; 257 SkBitmap src = source;
258 SkIPoint srcOffset = SkIPoint::Make(0, 0); 258 SkIPoint srcOffset = SkIPoint::Make(0, 0);
259 if (getInput(0) && !getInput(0)->filterImage(proxy, source, ctx, &src, &srcO ffset)) { 259 if (getInput(0) && !getInput(0)->filterImage(proxy, source, ctx, &src, &srcO ffset)) {
260 return false; 260 return false;
261 } 261 }
262 262
263 if (src.colorType() != kN32_SkColorType) { 263 if (src.colorType() != kPMColor_SkColorType) {
264 return false; 264 return false;
265 } 265 }
266 266
267 SkIRect bounds; 267 SkIRect bounds;
268 if (!this->applyCropRect(ctx, proxy, src, &srcOffset, &bounds, &src)) { 268 if (!this->applyCropRect(ctx, proxy, src, &srcOffset, &bounds, &src)) {
269 return false; 269 return false;
270 } 270 }
271 271
272 if (!fConvolveAlpha && !src.isOpaque()) { 272 if (!fConvolveAlpha && !src.isOpaque()) {
273 src = unpremultiplyBitmap(src); 273 src = unpremultiplyBitmap(src);
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 fBias, 662 fBias,
663 fKernelOffset, 663 fKernelOffset,
664 fTileMode, 664 fTileMode,
665 fConvolveAlpha); 665 fConvolveAlpha);
666 return true; 666 return true;
667 } 667 }
668 668
669 /////////////////////////////////////////////////////////////////////////////// 669 ///////////////////////////////////////////////////////////////////////////////
670 670
671 #endif 671 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698