1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/core/SkQuadTreePicture.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +/* 1.5 + * Copyright 2014 Google Inc. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license that can be 1.8 + * found in the LICENSE file. 1.9 + */ 1.10 + 1.11 +#ifndef SkQuadTreePicture_DEFINED 1.12 +#define SkQuadTreePicture_DEFINED 1.13 + 1.14 +#include "SkPicture.h" 1.15 +#include "SkRect.h" 1.16 + 1.17 +/** 1.18 + * Subclass of SkPicture that override the behavior of the 1.19 + * kOptimizeForClippedPlayback_RecordingFlag by creating an SkQuadGrid 1.20 + * structure rather than an R-Tree. The quad tree has generally faster 1.21 + * tree creation time, but slightly slower query times, as compared to 1.22 + * R-Tree, so some cases may be faster and some cases slower. 1.23 + */ 1.24 +class SK_API SkQuadTreePicture : public SkPicture { 1.25 +public: 1.26 + SkQuadTreePicture(const SkIRect& bounds) : fBounds(bounds) {} 1.27 + virtual SkBBoxHierarchy* createBBoxHierarchy() const SK_OVERRIDE; 1.28 +private: 1.29 + SkIRect fBounds; 1.30 +}; 1.31 + 1.32 +#endif