diff options
author | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-13 16:39:53 +0000 |
---|---|---|
committer | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-13 16:39:53 +0000 |
commit | 3cb834bd27a16cc60ff30adae96659558c2dc91f (patch) | |
tree | 1122324a71c09a0c4b772ec4ac04d9f3ce8a567c /include/core | |
parent | 4c1f091b6835a771dc86f5a784dce693de4f4555 (diff) |
Modifying SkTileGrid to support arbitrary query rectangles.
Exposing SkTileGrid functionality in the public API through SkTileGridPicture.
This patch also makes TileGrid and Rtree testable in gm, which revealed errors.
TEST=gm with '--tileGrid'
BUG=http://code.google.com/p/chromium/issues/detail?id=164636
Review URL: https://codereview.appspot.com/6933044
git-svn-id: http://skia.googlecode.com/svn/trunk@6783 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkTileGridPicture.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/core/SkTileGridPicture.h b/include/core/SkTileGridPicture.h new file mode 100644 index 0000000000..ef42f8c40b --- /dev/null +++ b/include/core/SkTileGridPicture.h @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SkTileGridPicture_DEFINED +#define SkTileGridPicture_DEFINED + +#include "SkPicture.h" + +/** + * Subclass of SkPicture that override the behavior of the + * kOptimizeForClippedPlayback_RecordingFlag by creating an SkTileGrid + * structure rather than an R-Tree. The tile grid has lower recording + * and playback costs, but is less effective at eliminating extraneous + * primitives for arbitrary query rectangles. It is most effective for + * tiled playback when the tile structure is known at record time. + */ +class SkTileGridPicture : public SkPicture { +public: + SkTileGridPicture(int tileWidth, int tileHeight, int width, int height); + virtual SkBBoxHierarchy* createBBoxHierarchy() const SK_OVERRIDE; +private: + int fTileWidth, fTileHeight, fXTileCount, fYTileCount; +}; + +#endif
\ No newline at end of file |