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

Side by Side Diff: src/core/SkDevice.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/core/SkCanvas.cpp ('k') | src/core/SkImageFilter.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 Google Inc. 2 * Copyright 2011 Google Inc.
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 "SkColorFilter.h" 8 #include "SkColorFilter.h"
9 #include "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkDraw.h" 10 #include "SkDraw.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 SkImageFilter* filter = paint.getImageFilter(); 408 SkImageFilter* filter = paint.getImageFilter();
409 if (filter && !this->canHandleImageFilter(filter)) { 409 if (filter && !this->canHandleImageFilter(filter)) {
410 SkImageFilter::DeviceProxy proxy(this); 410 SkImageFilter::DeviceProxy proxy(this);
411 SkBitmap dst; 411 SkBitmap dst;
412 SkIPoint offset = SkIPoint::Make(0, 0); 412 SkIPoint offset = SkIPoint::Make(0, 0);
413 SkMatrix matrix = *draw.fMatrix; 413 SkMatrix matrix = *draw.fMatrix;
414 matrix.postTranslate(SkIntToScalar(-x), SkIntToScalar(-y)); 414 matrix.postTranslate(SkIntToScalar(-x), SkIntToScalar(-y));
415 const SkIRect clipBounds = draw.fClip->getBounds().makeOffset(-x, -y); 415 const SkIRect clipBounds = draw.fClip->getBounds().makeOffset(-x, -y);
416 SkAutoTUnref<SkImageFilter::Cache> cache(this->getImageFilterCache()); 416 SkAutoTUnref<SkImageFilter::Cache> cache(this->getImageFilterCache());
417 SkImageFilter::Context ctx(matrix, clipBounds, cache.get()); 417 SkImageFilter::Context ctx(matrix, clipBounds, cache.get());
418 if (filter->filterImage(&proxy, bitmap, ctx, &dst, &offset)) { 418 if (filter->filterImageDeprecated(&proxy, bitmap, ctx, &dst, &offset)) {
419 SkPaint tmpUnfiltered(paint); 419 SkPaint tmpUnfiltered(paint);
420 tmpUnfiltered.setImageFilter(nullptr); 420 tmpUnfiltered.setImageFilter(nullptr);
421 this->drawSprite(draw, dst, x + offset.x(), y + offset.y(), tmpUnfil tered); 421 this->drawSprite(draw, dst, x + offset.x(), y + offset.y(), tmpUnfil tered);
422 } 422 }
423 } else { 423 } else {
424 this->drawSprite(draw, bitmap, x, y, paint); 424 this->drawSprite(draw, bitmap, x, y, paint);
425 } 425 }
426 } 426 }
427 427
428 uint32_t SkBaseDevice::filterTextFlags(const SkPaint& paint) const { 428 uint32_t SkBaseDevice::filterTextFlags(const SkPaint& paint) const {
429 uint32_t flags = paint.getFlags(); 429 uint32_t flags = paint.getFlags();
430 430
431 if (!paint.isLCDRenderText() || !paint.isAntiAlias()) { 431 if (!paint.isLCDRenderText() || !paint.isAntiAlias()) {
432 return flags; 432 return flags;
433 } 433 }
434 434
435 if (kUnknown_SkPixelGeometry == fSurfaceProps.pixelGeometry() 435 if (kUnknown_SkPixelGeometry == fSurfaceProps.pixelGeometry()
436 || this->onShouldDisableLCD(paint)) { 436 || this->onShouldDisableLCD(paint)) {
437 437
438 flags &= ~SkPaint::kLCDRenderText_Flag; 438 flags &= ~SkPaint::kLCDRenderText_Flag;
439 flags |= SkPaint::kGenA8FromLCD_Flag; 439 flags |= SkPaint::kGenA8FromLCD_Flag;
440 } 440 }
441 441
442 return flags; 442 return flags;
443 } 443 }
444 444
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698