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

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

Issue 1571033002: remove imagefilter::sizeconstraint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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/SkBlurMaskFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.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 Google Inc. 2 * Copyright 2013 Google Inc.
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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkComposeImageFilter.h" 9 #include "SkComposeImageFilter.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 19 matching lines...) Expand all
30 SkBitmap tmp; 30 SkBitmap tmp;
31 SkIPoint innerOffset = SkIPoint::Make(0, 0); 31 SkIPoint innerOffset = SkIPoint::Make(0, 0);
32 SkIPoint outerOffset = SkIPoint::Make(0, 0); 32 SkIPoint outerOffset = SkIPoint::Make(0, 0);
33 if (!this->filterInput(1, proxy, src, ctx, &tmp, &innerOffset)) 33 if (!this->filterInput(1, proxy, src, ctx, &tmp, &innerOffset))
34 return false; 34 return false;
35 35
36 SkMatrix outerMatrix(ctx.ctm()); 36 SkMatrix outerMatrix(ctx.ctm());
37 outerMatrix.postTranslate(SkIntToScalar(-innerOffset.x()), SkIntToScalar(-in nerOffset.y())); 37 outerMatrix.postTranslate(SkIntToScalar(-innerOffset.x()), SkIntToScalar(-in nerOffset.y()));
38 SkIRect clipBounds = ctx.clipBounds(); 38 SkIRect clipBounds = ctx.clipBounds();
39 clipBounds.offset(-innerOffset.x(), -innerOffset.y()); 39 clipBounds.offset(-innerOffset.x(), -innerOffset.y());
40 Context outerContext(outerMatrix, clipBounds, ctx.cache(), ctx.sizeConstrain t()); 40 Context outerContext(outerMatrix, clipBounds, ctx.cache());
41 if (!this->filterInput(0, proxy, tmp, outerContext, result, &outerOffset, fa lse)) { 41 if (!this->filterInput(0, proxy, tmp, outerContext, result, &outerOffset)) {
42 return false; 42 return false;
43 } 43 }
44 44
45 *offset = innerOffset + outerOffset; 45 *offset = innerOffset + outerOffset;
46 return true; 46 return true;
47 } 47 }
48 48
49 bool SkComposeImageFilter::onFilterBounds(const SkIRect& src, 49 bool SkComposeImageFilter::onFilterBounds(const SkIRect& src,
50 const SkMatrix& ctm, 50 const SkMatrix& ctm,
51 SkIRect* dst) const { 51 SkIRect* dst) const {
(...skipping 18 matching lines...) Expand all
70 70
71 str->appendf("outer: "); 71 str->appendf("outer: ");
72 outer->toString(str); 72 outer->toString(str);
73 73
74 str->appendf("inner: "); 74 str->appendf("inner: ");
75 inner->toString(str); 75 inner->toString(str);
76 76
77 str->appendf(")"); 77 str->appendf(")");
78 } 78 }
79 #endif 79 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698