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

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

Issue 1580843002: Remove #ifdef SK_DISABLE_TILE_IMAGE_FILTER_OPTIMIZATION. (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 | « no previous file | no next file » | 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 "SkTileImageFilter.h" 8 #include "SkTileImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 28 matching lines...) Expand all
39 const Context& ctx, 39 const Context& ctx,
40 SkBitmap* dst, SkIPoint* offset) const { 40 SkBitmap* dst, SkIPoint* offset) const {
41 SkBitmap source = src; 41 SkBitmap source = src;
42 SkIPoint srcOffset = SkIPoint::Make(0, 0); 42 SkIPoint srcOffset = SkIPoint::Make(0, 0);
43 if (!this->filterInput(0, proxy, src, ctx, &source, &srcOffset)) { 43 if (!this->filterInput(0, proxy, src, ctx, &source, &srcOffset)) {
44 return false; 44 return false;
45 } 45 }
46 46
47 SkRect dstRect; 47 SkRect dstRect;
48 ctx.ctm().mapRect(&dstRect, fDstRect); 48 ctx.ctm().mapRect(&dstRect, fDstRect);
49 #ifndef SK_DISABLE_TILE_IMAGE_FILTER_DEST_OPTIMIZATION
50 if (!dstRect.intersect(SkRect::Make(ctx.clipBounds()))) { 49 if (!dstRect.intersect(SkRect::Make(ctx.clipBounds()))) {
51 offset->fX = offset->fY = 0; 50 offset->fX = offset->fY = 0;
52 return true; 51 return true;
53 } 52 }
54 #endif
55 const SkIRect dstIRect = dstRect.roundOut(); 53 const SkIRect dstIRect = dstRect.roundOut();
56 int w = dstIRect.width(); 54 int w = dstIRect.width();
57 int h = dstIRect.height(); 55 int h = dstIRect.height();
58 if (!fSrcRect.width() || !fSrcRect.height() || !w || !h) { 56 if (!fSrcRect.width() || !fSrcRect.height() || !w || !h) {
59 return false; 57 return false;
60 } 58 }
61 59
62 SkRect srcRect; 60 SkRect srcRect;
63 ctx.ctm().mapRect(&srcRect, fSrcRect); 61 ctx.ctm().mapRect(&srcRect, fSrcRect);
64 SkIRect srcIRect; 62 SkIRect srcIRect;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 str->appendf(" dst: %.2f %.2f %.2f %.2f", 156 str->appendf(" dst: %.2f %.2f %.2f %.2f",
159 fDstRect.fLeft, fDstRect.fTop, fDstRect.fRight, fDstRect.fBotto m); 157 fDstRect.fLeft, fDstRect.fTop, fDstRect.fRight, fDstRect.fBotto m);
160 if (this->getInput(0)) { 158 if (this->getInput(0)) {
161 str->appendf("input: ("); 159 str->appendf("input: (");
162 this->getInput(0)->toString(str); 160 this->getInput(0)->toString(str);
163 str->appendf(")"); 161 str->appendf(")");
164 } 162 }
165 str->append(")"); 163 str->append(")");
166 } 164 }
167 #endif 165 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698