aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkTileGridPicture.h
diff options
context:
space:
mode:
authorGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-08 21:03:30 +0000
committerGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-08 21:03:30 +0000
commitf507c410e3a2a7ef7dab84152d836da5e5a8a5e9 (patch)
tree4e35b3361898c98a003ee0b0a9c1734876440390 /include/core/SkTileGridPicture.h
parentf729a711a7eb66504e891a5bfc463d09620f92fe (diff)
Adding option to SkTileGrid for specifying border pixels.
The purpose of this patch is to make it possible for the chromium compositor to generate a TileGrid structure that is better suited for scaled playback. Review URL: https://codereview.appspot.com/7300072 git-svn-id: http://skia.googlecode.com/svn/trunk@7680 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkTileGridPicture.h')
-rw-r--r--include/core/SkTileGridPicture.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/core/SkTileGridPicture.h b/include/core/SkTileGridPicture.h
index 6263ecb46d..77189bbc4f 100644
--- a/include/core/SkTileGridPicture.h
+++ b/include/core/SkTileGridPicture.h
@@ -20,10 +20,21 @@
*/
class SK_API SkTileGridPicture : public SkPicture {
public:
- SkTileGridPicture(int tileWidth, int tileHeight, int width, int height);
+ /**
+ * Constructor
+ * @param tileWidth horizontal stride between consecutive tiles
+ * @param tileHeight vertical stride between consecutive tiles
+ * @param width recording canvas width in device pixels
+ * @param height recording canvas height in device pixels
+ * @param borderPixels pixels of overlap between adjacent tiles. Set this
+ * value to match the border overlap that is applied to tiles by user
+ * code. Properly setting this value will help improve performance
+ * when performing tile-aligned playbacks.
+ */
+ SkTileGridPicture(int tileWidth, int tileHeight, int width, int height, int borderPixels = 0);
virtual SkBBoxHierarchy* createBBoxHierarchy() const SK_OVERRIDE;
private:
- int fTileWidth, fTileHeight, fXTileCount, fYTileCount;
+ int fTileWidth, fTileHeight, fXTileCount, fYTileCount, fBorderPixels;
};
#endif