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

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

Issue 1842793002: Switch SkLocalMatrixImageFilter and SkPaintImageFilter over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Ooops 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/SkPaintImageFilter.cpp ('k') | tests/ImageFilterTest.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 2013 The Android Open Source Project 2 * Copyright 2013 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 "SkPictureImageFilter.h" 8 #include "SkPictureImageFilter.h"
9 #include "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
11 #include "SkReadBuffer.h" 11 #include "SkReadBuffer.h"
12 #include "SkSurfaceProps.h" 12 #include "SkSurfaceProps.h"
13 #include "SkWriteBuffer.h" 13 #include "SkWriteBuffer.h"
14 #include "SkValidationUtils.h" 14 #include "SkValidationUtils.h"
15 15
16 SkPictureImageFilter::SkPictureImageFilter(sk_sp<SkPicture> picture) 16 SkPictureImageFilter::SkPictureImageFilter(sk_sp<SkPicture> picture)
17 : INHERITED(0, 0, nullptr) 17 : INHERITED(nullptr, 0, nullptr)
18 , fPicture(std::move(picture)) 18 , fPicture(std::move(picture))
19 , fCropRect(fPicture ? fPicture->cullRect() : SkRect::MakeEmpty()) 19 , fCropRect(fPicture ? fPicture->cullRect() : SkRect::MakeEmpty())
20 , fPictureResolution(kDeviceSpace_PictureResolution) 20 , fPictureResolution(kDeviceSpace_PictureResolution)
21 , fFilterQuality(kLow_SkFilterQuality) { 21 , fFilterQuality(kLow_SkFilterQuality) {
22 } 22 }
23 23
24 SkPictureImageFilter::SkPictureImageFilter(sk_sp<SkPicture> picture, const SkRec t& cropRect, 24 SkPictureImageFilter::SkPictureImageFilter(sk_sp<SkPicture> picture, const SkRec t& cropRect,
25 PictureResolution pictureResolution, 25 PictureResolution pictureResolution,
26 SkFilterQuality filterQuality) 26 SkFilterQuality filterQuality)
27 : INHERITED(0, 0, nullptr) 27 : INHERITED(nullptr, 0, nullptr)
28 , fPicture(std::move(picture)) 28 , fPicture(std::move(picture))
29 , fCropRect(cropRect) 29 , fCropRect(cropRect)
30 , fPictureResolution(pictureResolution) 30 , fPictureResolution(pictureResolution)
31 , fFilterQuality(filterQuality) { 31 , fFilterQuality(filterQuality) {
32 } 32 }
33 33
34 SkFlattenable* SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) { 34 SkFlattenable* SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) {
35 sk_sp<SkPicture> picture; 35 sk_sp<SkPicture> picture;
36 SkRect cropRect; 36 SkRect cropRect;
37 37
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 str->appendf("crop: (%f,%f,%f,%f) ", 164 str->appendf("crop: (%f,%f,%f,%f) ",
165 fCropRect.fLeft, fCropRect.fTop, fCropRect.fRight, fCropRect.fB ottom); 165 fCropRect.fLeft, fCropRect.fTop, fCropRect.fRight, fCropRect.fB ottom);
166 if (fPicture) { 166 if (fPicture) {
167 str->appendf("picture: (%f,%f,%f,%f)", 167 str->appendf("picture: (%f,%f,%f,%f)",
168 fPicture->cullRect().fLeft, fPicture->cullRect().fTop, 168 fPicture->cullRect().fLeft, fPicture->cullRect().fTop,
169 fPicture->cullRect().fRight, fPicture->cullRect().fBottom); 169 fPicture->cullRect().fRight, fPicture->cullRect().fBottom);
170 } 170 }
171 str->append(")"); 171 str->append(")");
172 } 172 }
173 #endif 173 #endif
OLDNEW
« no previous file with comments | « src/effects/SkPaintImageFilter.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698