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

Unified Diff: src/core/SkQuadTreePicture.h

Issue 131343011: Initial QuadTree implementation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed SkScalar conversion issue Created 6 years, 11 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
« no previous file with comments | « src/core/SkQuadTree.cpp ('k') | src/core/SkQuadTreePicture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkQuadTreePicture.h
diff --git a/src/core/SkQuadTreePicture.h b/src/core/SkQuadTreePicture.h
new file mode 100644
index 0000000000000000000000000000000000000000..0427b394a033e1576b3a9b22170c904c20efa974
--- /dev/null
+++ b/src/core/SkQuadTreePicture.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkQuadTreePicture_DEFINED
+#define SkQuadTreePicture_DEFINED
+
+#include "SkPicture.h"
+#include "SkRect.h"
+
+/**
+ * Subclass of SkPicture that override the behavior of the
+ * kOptimizeForClippedPlayback_RecordingFlag by creating an SkQuadGrid
+ * structure rather than an R-Tree. The quad tree has generally faster
+ * tree creation time, but slightly slower query times, as compared to
+ * R-Tree, so some cases may be faster and some cases slower.
+ */
+class SK_API SkQuadTreePicture : public SkPicture {
+public:
+ SkQuadTreePicture(const SkIRect& bounds) : fBounds(bounds) {}
+ virtual SkBBoxHierarchy* createBBoxHierarchy() const SK_OVERRIDE;
+private:
+ SkIRect fBounds;
+};
+
+#endif
« no previous file with comments | « src/core/SkQuadTree.cpp ('k') | src/core/SkQuadTreePicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698