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

Unified Diff: src/core/SkBruteBBH.h

Issue 653023003: Try out SkTree in nanobench. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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
Index: src/core/SkBruteBBH.h
diff --git a/src/core/SkBruteBBH.h b/src/core/SkBruteBBH.h
new file mode 100644
index 0000000000000000000000000000000000000000..6df0b747a8aec1dff280b6f9bf6934019a6b4f53
--- /dev/null
+++ b/src/core/SkBruteBBH.h
@@ -0,0 +1,27 @@
+#ifndef SkBruteBBH_DEFINED
robertphillips 2014/10/29 20:48:11 header!
+#define SkBruteBBH_DEFINED
+
+// A bounding box hierarchy that brute-force intersects its query with all known bounds.
+
+#include "SkBBoxHierarchy.h"
+
+class SkBruteBBH : public SkBBoxHierarchy {
+public:
+ SkBruteBBH();
+ virtual ~SkBruteBBH();
+ virtual void insert(SkAutoTMalloc<SkRect>*, int) SK_OVERRIDE;
+ virtual void search(const SkRect&, SkTDArray<unsigned>*) const SK_OVERRIDE;
+private:
+ SkRect* fBBs;
+ int fNumBBs;
+};
+
+// While experimental we leave its factory Skia-internal. Might as well live right here.
+
+#include "SkBBHFactory.h"
+
+class SK_API SkBruteFactory : public SkBBHFactory {
+ virtual SkBBoxHierarchy* operator()(int, int) const SK_OVERRIDE { return SkNEW(SkBruteBBH); }
+};
+
+#endif//SkBruteBBH_DEFINED
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkBruteBBH.cpp » ('j') | src/core/SkBruteBBH.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698