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

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

Issue 1847583002: Update SkMergeImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to To 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/SkMergeImageFilter.cpp ('k') | src/effects/SkOffsetImageFilter.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 "SkMorphologyImageFilter.h" 8 #include "SkMorphologyImageFilter.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 SkVector radius = SkVector::Make(SkIntToScalar(this->radius().width()), 69 SkVector radius = SkVector::Make(SkIntToScalar(this->radius().width()),
70 SkIntToScalar(this->radius().height())); 70 SkIntToScalar(this->radius().height()));
71 ctm.mapVectors(&radius, 1); 71 ctm.mapVectors(&radius, 1);
72 return src.makeOutset(SkScalarCeilToInt(radius.x()), SkScalarCeilToInt(radiu s.y())); 72 return src.makeOutset(SkScalarCeilToInt(radius.x()), SkScalarCeilToInt(radiu s.y()));
73 } 73 }
74 74
75 SkFlattenable* SkErodeImageFilter::CreateProc(SkReadBuffer& buffer) { 75 SkFlattenable* SkErodeImageFilter::CreateProc(SkReadBuffer& buffer) {
76 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); 76 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
77 const int width = buffer.readInt(); 77 const int width = buffer.readInt();
78 const int height = buffer.readInt(); 78 const int height = buffer.readInt();
79 return Create(width, height, common.getInput(0), &common.cropRect()); 79 return Create(width, height, common.getInput(0).get(), &common.cropRect());
80 } 80 }
81 81
82 SkFlattenable* SkDilateImageFilter::CreateProc(SkReadBuffer& buffer) { 82 SkFlattenable* SkDilateImageFilter::CreateProc(SkReadBuffer& buffer) {
83 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); 83 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
84 const int width = buffer.readInt(); 84 const int width = buffer.readInt();
85 const int height = buffer.readInt(); 85 const int height = buffer.readInt();
86 return Create(width, height, common.getInput(0), &common.cropRect()); 86 return Create(width, height, common.getInput(0).get(), &common.cropRect());
87 } 87 }
88 88
89 #ifndef SK_IGNORE_TO_STRING 89 #ifndef SK_IGNORE_TO_STRING
90 void SkErodeImageFilter::toString(SkString* str) const { 90 void SkErodeImageFilter::toString(SkString* str) const {
91 str->appendf("SkErodeImageFilter: ("); 91 str->appendf("SkErodeImageFilter: (");
92 str->appendf("radius: (%d,%d)", this->radius().fWidth, this->radius().fHeigh t); 92 str->appendf("radius: (%d,%d)", this->radius().fWidth, this->radius().fHeigh t);
93 str->append(")"); 93 str->append(")");
94 } 94 }
95 #endif 95 #endif
96 96
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 inputPixmap.rowBytesAsPixels(), 614 inputPixmap.rowBytesAsPixels(),
615 &dst, height, srcBounds); 615 &dst, height, srcBounds);
616 } 616 }
617 offset->fX = bounds.left(); 617 offset->fX = bounds.left();
618 offset->fY = bounds.top(); 618 offset->fY = bounds.top();
619 619
620 return SkSpecialImage::MakeFromRaster(source->internal_getProxy(), 620 return SkSpecialImage::MakeFromRaster(source->internal_getProxy(),
621 SkIRect::MakeWH(bounds.width(), bounds .height()), 621 SkIRect::MakeWH(bounds.width(), bounds .height()),
622 dst); 622 dst);
623 } 623 }
OLDNEW
« no previous file with comments | « src/effects/SkMergeImageFilter.cpp ('k') | src/effects/SkOffsetImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698