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

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

Issue 503833002: Reimplement deserialization of SkImageFilter's uniqueID. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/SkOffsetImageFilter.cpp ('k') | src/effects/SkRectShaderImageFilter.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 "SkWriteBuffer.h" 12 #include "SkWriteBuffer.h"
13 #include "SkValidationUtils.h" 13 #include "SkValidationUtils.h"
14 14
15 SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture) 15 SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, uint32_t un iqueID)
16 : INHERITED(0, 0), 16 : INHERITED(0, 0, NULL, uniqueID),
17 fPicture(picture), 17 fPicture(picture),
18 fCropRect(SkRect::MakeWH(picture ? SkIntToScalar(picture->width()) : 0, 18 fCropRect(SkRect::MakeWH(picture ? SkIntToScalar(picture->width()) : 0,
19 picture ? SkIntToScalar(picture->height()) : 0)) { 19 picture ? SkIntToScalar(picture->height()) : 0)) {
20 SkSafeRef(fPicture); 20 SkSafeRef(fPicture);
21 } 21 }
22 22
23 SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, const SkRec t& cropRect) 23 SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, const SkRec t& cropRect,
24 : INHERITED(0, 0), 24 uint32_t uniqueID)
25 : INHERITED(0, 0, NULL, uniqueID),
25 fPicture(picture), 26 fPicture(picture),
26 fCropRect(cropRect) { 27 fCropRect(cropRect) {
27 SkSafeRef(fPicture); 28 SkSafeRef(fPicture);
28 } 29 }
29 30
30 SkPictureImageFilter::~SkPictureImageFilter() { 31 SkPictureImageFilter::~SkPictureImageFilter() {
31 SkSafeUnref(fPicture); 32 SkSafeUnref(fPicture);
32 } 33 }
33 34
34 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING 35 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 offset->fY = bounds.fTop; 113 offset->fY = bounds.fTop;
113 return true; 114 return true;
114 } 115 }
115 116
116 bool SkPictureImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ct m, 117 bool SkPictureImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ct m,
117 SkIRect* dst) const { 118 SkIRect* dst) const {
118 *dst = src; 119 *dst = src;
119 return true; 120 return true;
120 } 121 }
121 122
OLDNEW
« no previous file with comments | « src/effects/SkOffsetImageFilter.cpp ('k') | src/effects/SkRectShaderImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698