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

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

Issue 1853803003: Fix padding bug in SkTileImageFilter. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix overlength lines. Created 4 years, 8 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 | « gm/tileimagefilter.cpp ('k') | 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return false; 75 return false;
76 } 76 }
77 } else { 77 } else {
78 SkAutoTUnref<SkBaseDevice> device(proxy->createDevice(srcIRect.width(), 78 SkAutoTUnref<SkBaseDevice> device(proxy->createDevice(srcIRect.width(),
79 srcIRect.height(), 79 srcIRect.height(),
80 kPossible_TileUsag e)); 80 kPossible_TileUsag e));
81 if (!device) { 81 if (!device) {
82 return false; 82 return false;
83 } 83 }
84 SkCanvas canvas(device); 84 SkCanvas canvas(device);
85 canvas.drawBitmap(src, SkIntToScalar(srcOffset.x()), 85 canvas.drawBitmap(source, SkIntToScalar(srcOffset.x()),
86 SkIntToScalar(srcOffset.y())); 86 SkIntToScalar(srcOffset.y()));
87 subset = device->accessBitmap(false); 87 subset = device->accessBitmap(false);
88 } 88 }
89 SkASSERT(subset.width() == srcIRect.width()); 89 SkASSERT(subset.width() == srcIRect.width());
90 SkASSERT(subset.height() == srcIRect.height()); 90 SkASSERT(subset.height() == srcIRect.height());
91 91
92 SkAutoTUnref<SkBaseDevice> device(proxy->createDevice(w, h)); 92 SkAutoTUnref<SkBaseDevice> device(proxy->createDevice(w, h));
93 if (nullptr == device.get()) { 93 if (nullptr == device.get()) {
94 return false; 94 return false;
95 } 95 }
96 SkCanvas canvas(device); 96 SkCanvas canvas(device);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 str->appendf(" dst: %.2f %.2f %.2f %.2f", 144 str->appendf(" dst: %.2f %.2f %.2f %.2f",
145 fDstRect.fLeft, fDstRect.fTop, fDstRect.fRight, fDstRect.fBotto m); 145 fDstRect.fLeft, fDstRect.fTop, fDstRect.fRight, fDstRect.fBotto m);
146 if (this->getInput(0)) { 146 if (this->getInput(0)) {
147 str->appendf("input: ("); 147 str->appendf("input: (");
148 this->getInput(0)->toString(str); 148 this->getInput(0)->toString(str);
149 str->appendf(")"); 149 str->appendf(")");
150 } 150 }
151 str->append(")"); 151 str->append(")");
152 } 152 }
153 #endif 153 #endif
OLDNEW
« no previous file with comments | « gm/tileimagefilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698