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

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

Issue 1421493003: tunnel down texture-size-constraint to imagefilters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix formating Created 5 years, 1 month 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/SkGpuBlurUtils.h » ('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 17 matching lines...) Expand all
28 SkBitmap* result, 28 SkBitmap* result,
29 SkIPoint* offset) const { 29 SkIPoint* offset) const {
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 Context outerContext(outerMatrix, ctx.clipBounds(), ctx.cache()); 38 Context outerContext(outerMatrix, ctx.clipBounds(), ctx.cache(), ctx.sizeCon straint());
39 if (!this->filterInput(0, proxy, tmp, outerContext, result, &outerOffset)) { 39 if (!this->filterInput(0, proxy, tmp, outerContext, result, &outerOffset, fa lse)) {
40 return false; 40 return false;
41 } 41 }
42 42
43 *offset = innerOffset + outerOffset; 43 *offset = innerOffset + outerOffset;
44 return true; 44 return true;
45 } 45 }
46 46
47 bool SkComposeImageFilter::onFilterBounds(const SkIRect& src, 47 bool SkComposeImageFilter::onFilterBounds(const SkIRect& src,
48 const SkMatrix& ctm, 48 const SkMatrix& ctm,
49 SkIRect* dst) const { 49 SkIRect* dst) const {
(...skipping 18 matching lines...) Expand all
68 68
69 str->appendf("outer: "); 69 str->appendf("outer: ");
70 outer->toString(str); 70 outer->toString(str);
71 71
72 str->appendf("inner: "); 72 str->appendf("inner: ");
73 inner->toString(str); 73 inner->toString(str);
74 74
75 str->appendf(")"); 75 str->appendf(")");
76 } 76 }
77 #endif 77 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkGpuBlurUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698