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

Unified Diff: src/core/SkBBHFactory.cpp

Issue 734723002: Prune SkRTree (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nits 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/RTreeBench.cpp ('k') | src/core/SkRTree.h » ('j') | src/core/SkRTree.h » ('J')
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 c895ff60fbc83be722c2ebce76b70c0260d9a284..22f816c4d9570b7760d64c198bde853f470320c7 100644
--- a/src/core/SkBBHFactory.cpp
+++ b/src/core/SkBBHFactory.cpp
@@ -11,17 +11,8 @@
SkBBoxHierarchy* SkRTreeFactory::operator()(int width, int height) const {
- // These values were empirically determined to produce reasonable
- // performance in most cases.
- static const int kRTreeMinChildren = 6;
- static const int kRTreeMaxChildren = 11;
-
- SkScalar aspectRatio = SkScalarDiv(SkIntToScalar(width),
- SkIntToScalar(height));
- bool sortDraws = false; // Do not sort draw calls when bulk loading.
-
- return SkRTree::Create(kRTreeMinChildren, kRTreeMaxChildren,
- aspectRatio, sortDraws);
+ SkScalar aspectRatio = SkScalarDiv(SkIntToScalar(width), SkIntToScalar(height));
+ return SkNEW_ARGS(SkRTree, (aspectRatio));
}
SkBBoxHierarchy* SkTileGridFactory::operator()(int width, int height) const {
« no previous file with comments | « bench/RTreeBench.cpp ('k') | src/core/SkRTree.h » ('j') | src/core/SkRTree.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698