Index: src/core/SkRTreePicture.cpp |
=================================================================== |
--- src/core/SkRTreePicture.cpp (revision 0) |
+++ src/core/SkRTreePicture.cpp (revision 0) |
@@ -0,0 +1,25 @@ |
+/* |
+ * Copyright 2014 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#include "SkRTreePicture.h" |
+ |
+#include "SkRTree.h" |
+ |
+ |
+SkBBoxHierarchy* SkRTreePicture::createBBoxHierarchy() 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(fWidth), |
+ SkIntToScalar(fHeight)); |
+ bool sortDraws = false; // Do not sort draw calls when bulk loading. |
+ |
+ return SkRTree::Create(kRTreeMinChildren, kRTreeMaxChildren, |
+ aspectRatio, sortDraws); |
+} |
Property changes on: src\core\SkRTreePicture.cpp |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |