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

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

Issue 1896383003: Begin removing deprecated (and now, unused) ImageFilter code paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comment Created 4 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/SkLightingImageFilter.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.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 "SkMagnifierImageFilter.h" 8 #include "SkMagnifierImageFilter.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 fSrcRect.x() / inputText ure->width(), 330 fSrcRect.x() / inputText ure->width(),
331 yOffset / inputTexture-> height(), 331 yOffset / inputTexture-> height(),
332 invXZoom, 332 invXZoom,
333 invYZoom, 333 invYZoom,
334 bounds.width() * invInse t, 334 bounds.width() * invInse t,
335 bounds.height() * invIns et)); 335 bounds.height() * invIns et));
336 if (!fp) { 336 if (!fp) {
337 return nullptr; 337 return nullptr;
338 } 338 }
339 339
340 return DrawWithFP(context, std::move(fp), bounds, source->internal_getPr oxy()); 340 return DrawWithFP(context, std::move(fp), bounds);
341 } 341 }
342 #endif 342 #endif
343 343
344 SkBitmap inputBM; 344 SkBitmap inputBM;
345 345
346 if (!input->getROPixels(&inputBM)) { 346 if (!input->getROPixels(&inputBM)) {
347 return nullptr; 347 return nullptr;
348 } 348 }
349 349
350 if ((inputBM.colorType() != kN32_SkColorType) || 350 if ((inputBM.colorType() != kN32_SkColorType) ||
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 int x_val = SkTPin(bounds.x() + SkScalarFloorToInt(x_interp), 0, inp utBM.width() - 1); 401 int x_val = SkTPin(bounds.x() + SkScalarFloorToInt(x_interp), 0, inp utBM.width() - 1);
402 int y_val = SkTPin(bounds.y() + SkScalarFloorToInt(y_interp), 0, inp utBM.height() - 1); 402 int y_val = SkTPin(bounds.y() + SkScalarFloorToInt(y_interp), 0, inp utBM.height() - 1);
403 403
404 *dptr = *inputBM.getAddr32(x_val, y_val); 404 *dptr = *inputBM.getAddr32(x_val, y_val);
405 dptr++; 405 dptr++;
406 } 406 }
407 } 407 }
408 408
409 offset->fX = bounds.left(); 409 offset->fX = bounds.left();
410 offset->fY = bounds.top(); 410 offset->fY = bounds.top();
411 return SkSpecialImage::MakeFromRaster(source->internal_getProxy(), 411 return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(bounds.width(), bounds .height()),
412 SkIRect::MakeWH(bounds.width(), bounds .height()),
413 dst); 412 dst);
414 } 413 }
415 414
416 #ifndef SK_IGNORE_TO_STRING 415 #ifndef SK_IGNORE_TO_STRING
417 void SkMagnifierImageFilter::toString(SkString* str) const { 416 void SkMagnifierImageFilter::toString(SkString* str) const {
418 str->appendf("SkMagnifierImageFilter: ("); 417 str->appendf("SkMagnifierImageFilter: (");
419 str->appendf("src: (%f,%f,%f,%f) ", 418 str->appendf("src: (%f,%f,%f,%f) ",
420 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m); 419 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m);
421 str->appendf("inset: %f", fInset); 420 str->appendf("inset: %f", fInset);
422 str->append(")"); 421 str->append(")");
423 } 422 }
424 #endif 423 #endif
OLDNEW
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698