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

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

Issue 1709753002: Mark existing image filter entry points that will be going away with Deprecated (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 4 years, 10 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') | src/effects/SkTestImageFilters.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"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 fPicture->flatten(buffer); 77 fPicture->flatten(buffer);
78 } 78 }
79 } 79 }
80 buffer.writeRect(fCropRect); 80 buffer.writeRect(fCropRect);
81 buffer.writeInt(fPictureResolution); 81 buffer.writeInt(fPictureResolution);
82 if (kLocalSpace_PictureResolution == fPictureResolution) { 82 if (kLocalSpace_PictureResolution == fPictureResolution) {
83 buffer.writeInt(fFilterQuality); 83 buffer.writeInt(fFilterQuality);
84 } 84 }
85 } 85 }
86 86
87 bool SkPictureImageFilter::onFilterImage(Proxy* proxy, const SkBitmap&, const Co ntext& ctx, 87 bool SkPictureImageFilter::onFilterImageDeprecated(Proxy* proxy, const SkBitmap& ,
88 SkBitmap* result, SkIPoint* offset) con st { 88 const Context& ctx,
89 SkBitmap* result, SkIPoint* o ffset) const {
89 if (!fPicture) { 90 if (!fPicture) {
90 offset->fX = offset->fY = 0; 91 offset->fX = offset->fY = 0;
91 return true; 92 return true;
92 } 93 }
93 94
94 SkRect floatBounds; 95 SkRect floatBounds;
95 ctx.ctm().mapRect(&floatBounds, fCropRect); 96 ctx.ctm().mapRect(&floatBounds, fCropRect);
96 SkIRect bounds = floatBounds.roundOut(); 97 SkIRect bounds = floatBounds.roundOut();
97 if (!bounds.intersect(ctx.clipBounds())) { 98 if (!bounds.intersect(ctx.clipBounds())) {
98 return false; 99 return false;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 str->appendf("crop: (%f,%f,%f,%f) ", 168 str->appendf("crop: (%f,%f,%f,%f) ",
168 fCropRect.fLeft, fCropRect.fTop, fCropRect.fRight, fCropRect.fB ottom); 169 fCropRect.fLeft, fCropRect.fTop, fCropRect.fRight, fCropRect.fB ottom);
169 if (fPicture) { 170 if (fPicture) {
170 str->appendf("picture: (%f,%f,%f,%f)", 171 str->appendf("picture: (%f,%f,%f,%f)",
171 fPicture->cullRect().fLeft, fPicture->cullRect().fTop, 172 fPicture->cullRect().fLeft, fPicture->cullRect().fTop,
172 fPicture->cullRect().fRight, fPicture->cullRect().fBottom); 173 fPicture->cullRect().fRight, fPicture->cullRect().fBottom);
173 } 174 }
174 str->append(")"); 175 str->append(")");
175 } 176 }
176 #endif 177 #endif
OLDNEW
« no previous file with comments | « src/effects/SkPaintImageFilter.cpp ('k') | src/effects/SkTestImageFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698