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

Side by Side Diff: src/core/SkMaskFilter.cpp

Issue 742663002: add roundOut that returns its result (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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/core/SkImageFilter.cpp ('k') | src/core/SkRasterClip.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkMaskFilter.h" 10 #include "SkMaskFilter.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 GrTexture** result, 330 GrTexture** result,
331 bool canOverwriteSrc) const { 331 bool canOverwriteSrc) const {
332 return false; 332 return false;
333 } 333 }
334 #endif 334 #endif
335 335
336 void SkMaskFilter::computeFastBounds(const SkRect& src, SkRect* dst) const { 336 void SkMaskFilter::computeFastBounds(const SkRect& src, SkRect* dst) const {
337 SkMask srcM, dstM; 337 SkMask srcM, dstM;
338 338
339 srcM.fImage = NULL; 339 srcM.fImage = NULL;
340 src.roundOut(&srcM.fBounds); 340 srcM.fBounds = src.roundOut();
341 srcM.fRowBytes = 0; 341 srcM.fRowBytes = 0;
342 srcM.fFormat = SkMask::kA8_Format; 342 srcM.fFormat = SkMask::kA8_Format;
343 343
344 SkIPoint margin; // ignored 344 SkIPoint margin; // ignored
345 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) { 345 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) {
346 dst->set(dstM.fBounds); 346 dst->set(dstM.fBounds);
347 } else { 347 } else {
348 dst->set(srcM.fBounds); 348 dst->set(srcM.fBounds);
349 } 349 }
350 } 350 }
OLDNEW
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/core/SkRasterClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698