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

Unified Diff: src/core/SkTileGrid.cpp

Issue 620093006: Use +- 2B for unbounded draw ops. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: constant Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTileGrid.cpp
diff --git a/src/core/SkTileGrid.cpp b/src/core/SkTileGrid.cpp
index 317d74a2d76297bda4d43649c2c458bb6b7dba90..00d459f8345c6d56cbec7b9ea172cb2b14b417f9 100644
--- a/src/core/SkTileGrid.cpp
+++ b/src/core/SkTileGrid.cpp
@@ -25,16 +25,11 @@ SkTileGrid::~SkTileGrid() {
void SkTileGrid::insert(unsigned opIndex, const SkRect& fbounds, bool) {
SkASSERT(!fbounds.isEmpty());
+
SkIRect dilatedBounds;
- if (fbounds.isLargest()) {
- // Dilating the largest SkIRect will overflow. Other nearly-largest rects may overflow too,
- // but we don't make active use of them like we do the largest.
- dilatedBounds.setLargest();
- } else {
- fbounds.roundOut(&dilatedBounds);
- dilatedBounds.outset(fInfo.fMargin.width(), fInfo.fMargin.height());
- dilatedBounds.offset(fInfo.fOffset);
- }
+ fbounds.roundOut(&dilatedBounds);
+ dilatedBounds.outset(fInfo.fMargin.width(), fInfo.fMargin.height());
+ dilatedBounds.offset(fInfo.fOffset);
const SkIRect gridBounds =
{ 0, 0, fInfo.fTileInterval.width() * fXTiles, fInfo.fTileInterval.height() * fYTiles };
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698