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

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

Issue 643743003: Create helper functions to use in computeInvariantOutput calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update blurMaskFilter Created 6 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 | « src/effects/SkLumaColorFilter.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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkMagnifierImageFilter.h" 9 #include "SkMagnifierImageFilter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 this->fXOffset == s.fXOffset && 222 this->fXOffset == s.fXOffset &&
223 this->fYOffset == s.fYOffset && 223 this->fYOffset == s.fYOffset &&
224 this->fXInvZoom == s.fXInvZoom && 224 this->fXInvZoom == s.fXInvZoom &&
225 this->fYInvZoom == s.fYInvZoom && 225 this->fYInvZoom == s.fYInvZoom &&
226 this->fXInvInset == s.fXInvInset && 226 this->fXInvInset == s.fXInvInset &&
227 this->fYInvInset == s.fYInvInset); 227 this->fYInvInset == s.fYInvInset);
228 } 228 }
229 229
230 void GrMagnifierEffect::onComputeInvariantOutput(InvariantOutput* inout) const { 230 void GrMagnifierEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
231 this->updateInvariantOutputForModulation(inout); 231 this->updateInvariantOutputForModulation(inout);
232 inout->fIsSingleComponent = false;
233 } 232 }
234 233
235 #endif 234 #endif
236 235
237 //////////////////////////////////////////////////////////////////////////////// 236 ////////////////////////////////////////////////////////////////////////////////
238 237
239 SkImageFilter* SkMagnifierImageFilter::Create(const SkRect& srcRect, SkScalar in set, 238 SkImageFilter* SkMagnifierImageFilter::Create(const SkRect& srcRect, SkScalar in set,
240 SkImageFilter* input) { 239 SkImageFilter* input) {
241 240
242 if (!SkScalarIsFinite(inset) || !SkIsValidRect(srcRect)) { 241 if (!SkScalarIsFinite(inset) || !SkIsValidRect(srcRect)) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 365
367 int x_val = SkPin32(SkScalarFloorToInt(x_interp), 0, width - 1); 366 int x_val = SkPin32(SkScalarFloorToInt(x_interp), 0, width - 1);
368 int y_val = SkPin32(SkScalarFloorToInt(y_interp), 0, height - 1); 367 int y_val = SkPin32(SkScalarFloorToInt(y_interp), 0, height - 1);
369 368
370 *dptr = sptr[y_val * width + x_val]; 369 *dptr = sptr[y_val * width + x_val];
371 dptr++; 370 dptr++;
372 } 371 }
373 } 372 }
374 return true; 373 return true;
375 } 374 }
OLDNEW
« no previous file with comments | « src/effects/SkLumaColorFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698