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

Side by Side Diff: src/core/SkCanvas.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 | « include/effects/SkXfermodeImageFilter.h ('k') | src/core/SkDevice.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 2008 The Android Open Source Project 2 * Copyright 2008 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 "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkCanvasPriv.h" 10 #include "SkCanvasPriv.h"
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 if (filter && !dstDev->canHandleImageFilter(filter)) { 1375 if (filter && !dstDev->canHandleImageFilter(filter)) {
1376 SkImageFilter::DeviceProxy proxy(dstDev); 1376 SkImageFilter::DeviceProxy proxy(dstDev);
1377 SkBitmap dst; 1377 SkBitmap dst;
1378 SkIPoint offset = SkIPoint::Make(0, 0); 1378 SkIPoint offset = SkIPoint::Make(0, 0);
1379 const SkBitmap& src = srcDev->accessBitmap(false); 1379 const SkBitmap& src = srcDev->accessBitmap(false);
1380 SkMatrix matrix = *iter.fMatrix; 1380 SkMatrix matrix = *iter.fMatrix;
1381 matrix.postTranslate(SkIntToScalar(-pos.x()), SkIntToScalar(-pos.y() )); 1381 matrix.postTranslate(SkIntToScalar(-pos.x()), SkIntToScalar(-pos.y() ));
1382 SkIRect clipBounds = iter.fClip->getBounds().makeOffset(-pos.x(), -p os.y()); 1382 SkIRect clipBounds = iter.fClip->getBounds().makeOffset(-pos.x(), -p os.y());
1383 SkAutoTUnref<SkImageFilter::Cache> cache(dstDev->getImageFilterCache ()); 1383 SkAutoTUnref<SkImageFilter::Cache> cache(dstDev->getImageFilterCache ());
1384 SkImageFilter::Context ctx(matrix, clipBounds, cache.get()); 1384 SkImageFilter::Context ctx(matrix, clipBounds, cache.get());
1385 if (filter->filterImage(&proxy, src, ctx, &dst, &offset)) { 1385 if (filter->filterImageDeprecated(&proxy, src, ctx, &dst, &offset)) {
1386 SkPaint tmpUnfiltered(*paint); 1386 SkPaint tmpUnfiltered(*paint);
1387 tmpUnfiltered.setImageFilter(nullptr); 1387 tmpUnfiltered.setImageFilter(nullptr);
1388 dstDev->drawSprite(iter, dst, pos.x() + offset.x(), pos.y() + of fset.y(), 1388 dstDev->drawSprite(iter, dst, pos.x() + offset.x(), pos.y() + of fset.y(),
1389 tmpUnfiltered); 1389 tmpUnfiltered);
1390 } 1390 }
1391 } else if (deviceIsBitmapDevice) { 1391 } else if (deviceIsBitmapDevice) {
1392 const SkBitmap& src = static_cast<SkBitmapDevice*>(srcDev)->fBitmap; 1392 const SkBitmap& src = static_cast<SkBitmapDevice*>(srcDev)->fBitmap;
1393 dstDev->drawSprite(iter, src, pos.x(), pos.y(), *paint); 1393 dstDev->drawSprite(iter, src, pos.x(), pos.y(), *paint);
1394 } else { 1394 } else {
1395 dstDev->drawDevice(iter, srcDev, pos.x(), pos.y(), *paint); 1395 dstDev->drawDevice(iter, srcDev, pos.x(), pos.y(), *paint);
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
2964 } 2964 }
2965 2965
2966 if (matrix) { 2966 if (matrix) {
2967 canvas->concat(*matrix); 2967 canvas->concat(*matrix);
2968 } 2968 }
2969 } 2969 }
2970 2970
2971 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2971 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2972 fCanvas->restoreToCount(fSaveCount); 2972 fCanvas->restoreToCount(fSaveCount);
2973 } 2973 }
OLDNEW
« no previous file with comments | « include/effects/SkXfermodeImageFilter.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698