michael@0: /* michael@0: * Copyright 2014 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #ifndef SkQuadTreePicture_DEFINED michael@0: #define SkQuadTreePicture_DEFINED michael@0: michael@0: #include "SkPicture.h" michael@0: #include "SkRect.h" michael@0: michael@0: /** michael@0: * Subclass of SkPicture that override the behavior of the michael@0: * kOptimizeForClippedPlayback_RecordingFlag by creating an SkQuadGrid michael@0: * structure rather than an R-Tree. The quad tree has generally faster michael@0: * tree creation time, but slightly slower query times, as compared to michael@0: * R-Tree, so some cases may be faster and some cases slower. michael@0: */ michael@0: class SK_API SkQuadTreePicture : public SkPicture { michael@0: public: michael@0: SkQuadTreePicture(const SkIRect& bounds) : fBounds(bounds) {} michael@0: virtual SkBBoxHierarchy* createBBoxHierarchy() const SK_OVERRIDE; michael@0: private: michael@0: SkIRect fBounds; michael@0: }; michael@0: michael@0: #endif