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

Side by Side Diff: src/core/SkMatrixImageFilter.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/core/SkLocalMatrixImageFilter.cpp ('k') | src/effects/SkAlphaThresholdFilter.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 2014 The Android Open Source Project 2 * Copyright 2014 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 "SkMatrixImageFilter.h" 8 #include "SkMatrixImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 16 matching lines...) Expand all
27 SkFilterQuality filterQuality, 27 SkFilterQuality filterQuality,
28 SkImageFilter* input) { 28 SkImageFilter* input) {
29 return new SkMatrixImageFilter(transform, filterQuality, input); 29 return new SkMatrixImageFilter(transform, filterQuality, input);
30 } 30 }
31 31
32 SkFlattenable* SkMatrixImageFilter::CreateProc(SkReadBuffer& buffer) { 32 SkFlattenable* SkMatrixImageFilter::CreateProc(SkReadBuffer& buffer) {
33 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); 33 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
34 SkMatrix matrix; 34 SkMatrix matrix;
35 buffer.readMatrix(&matrix); 35 buffer.readMatrix(&matrix);
36 SkFilterQuality quality = static_cast<SkFilterQuality>(buffer.readInt()); 36 SkFilterQuality quality = static_cast<SkFilterQuality>(buffer.readInt());
37 return Create(matrix, quality, common.getInput(0)); 37 return Create(matrix, quality, common.getInput(0).get());
38 } 38 }
39 39
40 void SkMatrixImageFilter::flatten(SkWriteBuffer& buffer) const { 40 void SkMatrixImageFilter::flatten(SkWriteBuffer& buffer) const {
41 this->INHERITED::flatten(buffer); 41 this->INHERITED::flatten(buffer);
42 buffer.writeMatrix(fTransform); 42 buffer.writeMatrix(fTransform);
43 buffer.writeInt(fFilterQuality); 43 buffer.writeInt(fFilterQuality);
44 } 44 }
45 45
46 SkMatrixImageFilter::~SkMatrixImageFilter() { 46 SkMatrixImageFilter::~SkMatrixImageFilter() {
47 } 47 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 fTransform[SkMatrix::kMPersp2]); 135 fTransform[SkMatrix::kMPersp2]);
136 136
137 str->append("<dt>FilterLevel:</dt><dd>"); 137 str->append("<dt>FilterLevel:</dt><dd>");
138 static const char* gFilterLevelStrings[] = { "None", "Low", "Medium", "High" }; 138 static const char* gFilterLevelStrings[] = { "None", "Low", "Medium", "High" };
139 str->append(gFilterLevelStrings[fFilterQuality]); 139 str->append(gFilterLevelStrings[fFilterQuality]);
140 str->append("</dd>"); 140 str->append("</dd>");
141 141
142 str->appendf(")"); 142 str->appendf(")");
143 } 143 }
144 #endif 144 #endif
OLDNEW
« no previous file with comments | « src/core/SkLocalMatrixImageFilter.cpp ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698