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

Side by Side Diff: src/core/SkCanvas.cpp

Issue 1888243003: Remove deprecated paths from image filter infrastructure. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove some spurious printfs 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 | « include/core/SkImageFilter.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 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 if (nullptr == paint) { 1401 if (nullptr == paint) {
1402 paint = &tmp; 1402 paint = &tmp;
1403 } 1403 }
1404 1404
1405 LOOPER_BEGIN_DRAWDEVICE(*paint, SkDrawFilter::kBitmap_Type) 1405 LOOPER_BEGIN_DRAWDEVICE(*paint, SkDrawFilter::kBitmap_Type)
1406 while (iter.next()) { 1406 while (iter.next()) {
1407 SkBaseDevice* dstDev = iter.fDevice; 1407 SkBaseDevice* dstDev = iter.fDevice;
1408 paint = &looper.paint(); 1408 paint = &looper.paint();
1409 SkImageFilter* filter = paint->getImageFilter(); 1409 SkImageFilter* filter = paint->getImageFilter();
1410 SkIPoint pos = { x - iter.getX(), y - iter.getY() }; 1410 SkIPoint pos = { x - iter.getX(), y - iter.getY() };
1411 if (filter && !dstDev->canHandleImageFilter(filter)) { 1411 if (filter) {
1412 SkImageFilter::DeviceProxy proxy(dstDev); 1412 SkImageFilter::DeviceProxy proxy(dstDev);
1413 SkIPoint offset = SkIPoint::Make(0, 0); 1413 SkIPoint offset = SkIPoint::Make(0, 0);
1414 const SkBitmap& srcBM = srcDev->accessBitmap(false); 1414 const SkBitmap& srcBM = srcDev->accessBitmap(false);
1415 SkMatrix matrix = *iter.fMatrix; 1415 SkMatrix matrix = *iter.fMatrix;
1416 matrix.postTranslate(SkIntToScalar(-pos.x()), SkIntToScalar(-pos.y() )); 1416 matrix.postTranslate(SkIntToScalar(-pos.x()), SkIntToScalar(-pos.y() ));
1417 const SkIRect clipBounds = iter.fClip->getBounds().makeOffset(-pos.x (), -pos.y()); 1417 const SkIRect clipBounds = iter.fClip->getBounds().makeOffset(-pos.x (), -pos.y());
1418 SkAutoTUnref<SkImageFilter::Cache> cache(dstDev->getImageFilterCache ()); 1418 SkAutoTUnref<SkImageFilter::Cache> cache(dstDev->getImageFilterCache ());
1419 SkImageFilter::Context ctx(matrix, clipBounds, cache.get()); 1419 SkImageFilter::Context ctx(matrix, clipBounds, cache.get());
1420 1420
1421 sk_sp<SkSpecialImage> srcImg(SkSpecialImage::internal_fromBM(&proxy, srcBM, 1421 sk_sp<SkSpecialImage> srcImg(SkSpecialImage::internal_fromBM(&proxy, srcBM,
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
3053 3053
3054 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 3054 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
3055 fCanvas->restoreToCount(fSaveCount); 3055 fCanvas->restoreToCount(fSaveCount);
3056 } 3056 }
3057 3057
3058 #ifdef SK_SUPPORT_LEGACY_NEW_SURFACE_API 3058 #ifdef SK_SUPPORT_LEGACY_NEW_SURFACE_API
3059 SkSurface* SkCanvas::newSurface(const SkImageInfo& info, const SkSurfaceProps* p rops) { 3059 SkSurface* SkCanvas::newSurface(const SkImageInfo& info, const SkSurfaceProps* p rops) {
3060 return this->makeSurface(info, props).release(); 3060 return this->makeSurface(info, props).release();
3061 } 3061 }
3062 #endif 3062 #endif
OLDNEW
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698