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

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

Issue 1421493003: tunnel down texture-size-constraint to imagefilters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 SkVector sigma = mapSigma(fSigma, ctx.ctm()); 211 SkVector sigma = mapSigma(fSigma, ctx.ctm());
212 offset->fX = rect.fLeft; 212 offset->fX = rect.fLeft;
213 offset->fY = rect.fTop; 213 offset->fY = rect.fTop;
214 rect.offset(-srcOffset); 214 rect.offset(-srcOffset);
215 SkAutoTUnref<GrTexture> tex(SkGpuBlurUtils::GaussianBlur(source->getContext( ), 215 SkAutoTUnref<GrTexture> tex(SkGpuBlurUtils::GaussianBlur(source->getContext( ),
216 source, 216 source,
217 false, 217 false,
218 SkRect::Make(rect), 218 SkRect::Make(rect),
219 true, 219 true,
220 sigma.x(), 220 sigma.x(),
221 sigma.y())); 221 sigma.y(),
222 proxy->getSizeConst raint()));
222 if (!tex) { 223 if (!tex) {
223 return false; 224 return false;
224 } 225 }
225 WrapTexture(tex, rect.width(), rect.height(), result); 226 WrapTexture(tex, rect.width(), rect.height(), result);
226 return true; 227 return true;
227 #else 228 #else
228 SkDEBUGFAIL("Should not call in GPU-less build"); 229 SkDEBUGFAIL("Should not call in GPU-less build");
229 return false; 230 return false;
230 #endif 231 #endif
231 } 232 }
232 233
233 #ifndef SK_IGNORE_TO_STRING 234 #ifndef SK_IGNORE_TO_STRING
234 void SkBlurImageFilter::toString(SkString* str) const { 235 void SkBlurImageFilter::toString(SkString* str) const {
235 str->appendf("SkBlurImageFilter: ("); 236 str->appendf("SkBlurImageFilter: (");
236 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight); 237 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight);
237 238
238 if (this->getInput(0)) { 239 if (this->getInput(0)) {
239 this->getInput(0)->toString(str); 240 this->getInput(0)->toString(str);
240 } 241 }
241 242
242 str->append("))"); 243 str->append("))");
243 } 244 }
244 #endif 245 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698