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

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

Issue 227433009: Rename kPMColor_SkColorType to kN32_SkColorType. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/SkBicubicImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.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 2011 The Android Open Source Project 2 * Copyright 2011 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkBlurImageFilter.h" 9 #include "SkBlurImageFilter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 bool SkBlurImageFilter::onFilterImage(Proxy* proxy, 143 bool SkBlurImageFilter::onFilterImage(Proxy* proxy,
144 const SkBitmap& source, const Context& ctx , 144 const SkBitmap& source, const Context& ctx ,
145 SkBitmap* dst, SkIPoint* offset) const { 145 SkBitmap* dst, SkIPoint* offset) const {
146 SkBitmap src = source; 146 SkBitmap src = source;
147 SkIPoint srcOffset = SkIPoint::Make(0, 0); 147 SkIPoint srcOffset = SkIPoint::Make(0, 0);
148 if (getInput(0) && !getInput(0)->filterImage(proxy, source, ctx, &src, &srcO ffset)) { 148 if (getInput(0) && !getInput(0)->filterImage(proxy, source, ctx, &src, &srcO ffset)) {
149 return false; 149 return false;
150 } 150 }
151 151
152 if (src.colorType() != kPMColor_SkColorType) { 152 if (src.colorType() != kN32_SkColorType) {
153 return false; 153 return false;
154 } 154 }
155 155
156 SkIRect srcBounds, dstBounds; 156 SkIRect srcBounds, dstBounds;
157 if (!this->applyCropRect(ctx, proxy, src, &srcOffset, &srcBounds, &src)) { 157 if (!this->applyCropRect(ctx, proxy, src, &srcOffset, &srcBounds, &src)) {
158 return false; 158 return false;
159 } 159 }
160 160
161 SkAutoLockPixels alp(src); 161 SkAutoLockPixels alp(src);
162 if (!src.getPixels()) { 162 if (!src.getPixels()) {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 true, 284 true,
285 sigma.x(), 285 sigma.x(),
286 sigma.y())); 286 sigma.y()));
287 WrapTexture(tex, rect.width(), rect.height(), result); 287 WrapTexture(tex, rect.width(), rect.height(), result);
288 return true; 288 return true;
289 #else 289 #else
290 SkDEBUGFAIL("Should not call in GPU-less build"); 290 SkDEBUGFAIL("Should not call in GPU-less build");
291 return false; 291 return false;
292 #endif 292 #endif
293 } 293 }
OLDNEW
« no previous file with comments | « src/effects/SkBicubicImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698