aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBBHFactory.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-01-09 06:41:48 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-09 06:41:48 -0800
commit703dd2ed187b9788c5bb0f2d313f2d07695603d6 (patch)
treee2314099eb0729896a8c919556852413f209aaeb /src/core/SkBBHFactory.cpp
parent9250543c559bb756e7749a13bdea6c3be3861f2b (diff)
Remove SkTileGrid (except for TileGridInfo).
TBR=reed@google.com BUG=skia:3085 Review URL: https://codereview.chromium.org/845623002
Diffstat (limited to 'src/core/SkBBHFactory.cpp')
-rw-r--r--src/core/SkBBHFactory.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/core/SkBBHFactory.cpp b/src/core/SkBBHFactory.cpp
index 4b9ae558e2..ce5026ca70 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));
-}