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

Side by Side Diff: src/effects/SkColorFilterImageFilter.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/SkBlurImageFilter.cpp ('k') | src/effects/SkComposeImageFilter.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 "SkColorFilterImageFilter.h" 8 #include "SkColorFilterImageFilter.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 26 matching lines...) Expand all
37 SkColorFilterImageFilter::SkColorFilterImageFilter(SkColorFilter* cf, 37 SkColorFilterImageFilter::SkColorFilterImageFilter(SkColorFilter* cf,
38 SkImageFilter* input, 38 SkImageFilter* input,
39 const CropRect* cropRect) 39 const CropRect* cropRect)
40 : INHERITED(1, &input, cropRect) 40 : INHERITED(1, &input, cropRect)
41 , fColorFilter(SkRef(cf)) { 41 , fColorFilter(SkRef(cf)) {
42 } 42 }
43 43
44 SkFlattenable* SkColorFilterImageFilter::CreateProc(SkReadBuffer& buffer) { 44 SkFlattenable* SkColorFilterImageFilter::CreateProc(SkReadBuffer& buffer) {
45 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); 45 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
46 sk_sp<SkColorFilter> cf(buffer.readColorFilter()); 46 sk_sp<SkColorFilter> cf(buffer.readColorFilter());
47 return Create(cf.get(), common.getInput(0), &common.cropRect()); 47 return Create(cf.get(), common.getInput(0).get(), &common.cropRect());
48 } 48 }
49 49
50 void SkColorFilterImageFilter::flatten(SkWriteBuffer& buffer) const { 50 void SkColorFilterImageFilter::flatten(SkWriteBuffer& buffer) const {
51 this->INHERITED::flatten(buffer); 51 this->INHERITED::flatten(buffer);
52 buffer.writeFlattenable(fColorFilter.get()); 52 buffer.writeFlattenable(fColorFilter.get());
53 } 53 }
54 54
55 sk_sp<SkSpecialImage> SkColorFilterImageFilter::onFilterImage(SkSpecialImage* so urce, 55 sk_sp<SkSpecialImage> SkColorFilterImageFilter::onFilterImage(SkSpecialImage* so urce,
56 const Context& ctx , 56 const Context& ctx ,
57 SkIPoint* offset) const { 57 SkIPoint* offset) const {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 if (this->getInput(0)) { 122 if (this->getInput(0)) {
123 this->getInput(0)->toString(str); 123 this->getInput(0)->toString(str);
124 } 124 }
125 125
126 str->appendf(") color filter: "); 126 str->appendf(") color filter: ");
127 fColorFilter->toString(str); 127 fColorFilter->toString(str);
128 128
129 str->append(")"); 129 str->append(")");
130 } 130 }
131 #endif 131 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBlurImageFilter.cpp ('k') | src/effects/SkComposeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698