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

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

Issue 1709753002: Mark existing image filter entry points that will be going away with Deprecated (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 4 years, 10 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkMagnifierImageFilter.h" 9 #include "SkMagnifierImageFilter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 buffer.readRect(&src); 287 buffer.readRect(&src);
288 return Create(src, buffer.readScalar(), common.getInput(0)); 288 return Create(src, buffer.readScalar(), common.getInput(0));
289 } 289 }
290 290
291 void SkMagnifierImageFilter::flatten(SkWriteBuffer& buffer) const { 291 void SkMagnifierImageFilter::flatten(SkWriteBuffer& buffer) const {
292 this->INHERITED::flatten(buffer); 292 this->INHERITED::flatten(buffer);
293 buffer.writeRect(fSrcRect); 293 buffer.writeRect(fSrcRect);
294 buffer.writeScalar(fInset); 294 buffer.writeScalar(fInset);
295 } 295 }
296 296
297 bool SkMagnifierImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, 297 bool SkMagnifierImageFilter::onFilterImageDeprecated(Proxy* proxy, const SkBitma p& src,
298 const Context&, SkBitmap* dst, 298 const Context&, SkBitmap* d st,
299 SkIPoint* offset) const { 299 SkIPoint* offset) const {
300 if ((src.colorType() != kN32_SkColorType) || 300 if ((src.colorType() != kN32_SkColorType) ||
301 (fSrcRect.width() >= src.width()) || 301 (fSrcRect.width() >= src.width()) ||
302 (fSrcRect.height() >= src.height())) { 302 (fSrcRect.height() >= src.height())) {
303 return false; 303 return false;
304 } 304 }
305 305
306 SkAutoLockPixels alp(src); 306 SkAutoLockPixels alp(src);
307 SkASSERT(src.getPixels()); 307 SkASSERT(src.getPixels());
308 if (!src.getPixels() || src.width() <= 0 || src.height() <= 0) { 308 if (!src.getPixels() || src.width() <= 0 || src.height() <= 0) {
309 return false; 309 return false;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 365
366 #ifndef SK_IGNORE_TO_STRING 366 #ifndef SK_IGNORE_TO_STRING
367 void SkMagnifierImageFilter::toString(SkString* str) const { 367 void SkMagnifierImageFilter::toString(SkString* str) const {
368 str->appendf("SkMagnifierImageFilter: ("); 368 str->appendf("SkMagnifierImageFilter: (");
369 str->appendf("src: (%f,%f,%f,%f) ", 369 str->appendf("src: (%f,%f,%f,%f) ",
370 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m); 370 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m);
371 str->appendf("inset: %f", fInset); 371 str->appendf("inset: %f", fInset);
372 str->append(")"); 372 str->append(")");
373 } 373 }
374 #endif 374 #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