aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkQuadTreePicture.h
blob: 0427b394a033e1576b3a9b22170c904c20efa974 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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