diff options
author | 2012-11-01 17:10:32 +0000 | |
---|---|---|
committer | 2012-11-01 17:10:32 +0000 | |
commit | 35ac048e357aefa6289485c8f6a50fadce23c0d2 (patch) | |
tree | e3411b4224959e9cf4938a1c52b5238144dde912 /include/core | |
parent | d8b5faca043100d7a1e4594b4d10e462532af390 (diff) |
Refactoring RTree integration to support SkBBoxHierarchy polymorphism in SkPicture.
This moves the rtree creation into a virtual method.
Review URL: https://codereview.appspot.com/6811057
git-svn-id: http://skia.googlecode.com/svn/trunk@6242 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkPicture.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index 72e0f5c4a7..06c99b1415 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -13,6 +13,7 @@ #include "SkRefCnt.h" #include "SkSerializationHelpers.h" +class SkBBoxHierarchy; class SkBitmap; class SkCanvas; class SkPicturePlayback; @@ -154,16 +155,13 @@ protected: SkPictureRecord* fRecord; int fWidth, fHeight; + // For testing. Derived classes may instantiate an alternate + // SkBBoxHierarchy implementation + virtual SkBBoxHierarchy* createBBoxHierarchy() const; + private: SkPicturePlayback* fPlayback; - /** Used by the R-Tree when kOptimizeForClippedPlayback_RecordingFlag is - set, these were empirically determined to produce reasonable performance - in most cases. - */ - static const int kRTreeMinChildren = 6; - static const int kRTreeMaxChildren = 11; - friend class SkFlatPicture; friend class SkPicturePlayback; |