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

Unified Diff: src/core/SkBBHFactory.cpp

Issue 845623002: Remove SkTileGrid (except for TileGridInfo). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: kill gridSupported Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SamplePictFile.cpp ('k') | src/core/SkTileGrid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBBHFactory.cpp
diff --git a/src/core/SkBBHFactory.cpp b/src/core/SkBBHFactory.cpp
index 4b9ae558e2c4317c077620cb3ece471c28513382..ce5026ca7032f669af960bb7bc8874841c66d23f 100644
--- a/src/core/SkBBHFactory.cpp
+++ b/src/core/SkBBHFactory.cpp
@@ -7,27 +7,8 @@
#include "SkBBHFactory.h"
#include "SkRTree.h"
-#include "SkTileGrid.h"
SkBBoxHierarchy* SkRTreeFactory::operator()(const SkRect& bounds) const {
SkScalar aspectRatio = bounds.width() / bounds.height();
return SkNEW_ARGS(SkRTree, (aspectRatio));
}
-
-SkBBoxHierarchy* SkTileGridFactory::operator()(const SkRect& bounds) const {
- SkASSERT(fInfo.fMargin.width() >= 0);
- SkASSERT(fInfo.fMargin.height() >= 0);
-
- // We want a conservative answer for the size...
- const SkIRect ibounds = bounds.roundOut();
- const int width = ibounds.width();
- const int height = ibounds.height();
-
- // Note: SkIRects are non-inclusive of the right() column and bottom() row.
- // For example, an SkIRect at 0,0 with a size of (1,1) will only have
- // content at pixel (0,0) and will report left=0 and right=1, hence the
- // "-1"s below.
- int xTileCount = (width + fInfo.fTileInterval.width() - 1) / fInfo.fTileInterval.width();
- int yTileCount = (height + fInfo.fTileInterval.height() - 1) / fInfo.fTileInterval.height();
- return SkNEW_ARGS(SkTileGrid, (xTileCount, yTileCount, fInfo));
-}
« no previous file with comments | « samplecode/SamplePictFile.cpp ('k') | src/core/SkTileGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698