#include "SkColor.h"
#include "SkPaint.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkPoint.h"
#include "SkRect.h"
#include "SkString.h"
#include "SkColor.h"
#include "SkPaint.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkPoint.h"
#include "SkRandom.h"
#include "SkRect.h"
#include "SkImageEncoder.h"
#include "SkOSFile.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkString.h"
#include "SkSurface.h"
*/
#include "SkDebugger.h"
+#include "SkPictureRecorder.h"
#include "SkString.h"
#include "DMWriteTask.h"
#include "DMUtil.h"
+#include "SkBBHFactory.h"
#include "SkCommandLineFlags.h"
#include "SkPicture.h"
-#include "SkRTreePicture.h"
DEFINE_bool(replay, true, "If true, run picture replay tests.");
DEFINE_bool(rtree, true, "If true, run picture replay tests with an rtree.");
#include "DMWriteTask.h"
#include "DMUtil.h"
+#include "SkBBHFactory.h"
#include "SkCommandLineFlags.h"
#include "SkPicture.h"
-#include "SkTileGridPicture.h"
// TODO(mtklein): Tile grid tests are currently failing. (Skia issue 1198). When fixed, -> true.
DEFINE_bool(tileGrid, false, "If true, run picture replay tests with a tile grid.");
#include "DMUtil.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
namespace DM {
#include "gm.h"
#include "SkCanvas.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
namespace skiagm {
#include "SkOSFile.h"
#include "SkPDFRasterizer.h"
#include "SkPicture.h"
-#include "SkQuadTreePicture.h"
+#include "SkPictureRecorder.h"
#include "SkRefCnt.h"
-#include "SkRTreePicture.h"
#include "SkScalar.h"
#include "SkStream.h"
#include "SkString.h"
#include "SkSurface.h"
#include "SkTArray.h"
#include "SkTDict.h"
-#include "SkTileGridPicture.h"
#include "SamplePipeControllers.h"
#ifdef SK_DEBUG
#include "gm.h"
#include "SkDebugCanvas.h"
#include "SkPictureFlat.h"
+#include "SkPictureRecorder.h"
#define WARN(msg) \
SkDebugf("%s:%d: %s\n", __FILE__, __LINE__, msg);
#include "SkPath.h"
#include "SkPathOps.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkRect.h"
namespace skiagm {
#include "gm.h"
#include "SkPictureImageFilter.h"
+#include "SkPictureRecorder.h"
// This GM exercises the SkPictureImageFilter ImageFilter class.
#include "SkBitmap.h"
#include "SkPaint.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkShader.h"
namespace skiagm {
'SK_SUPPORT_LEGACY_PICTURE_CAN_RECORD',
'SK_SUPPORT_DEPRECATED_RECORD_FLAGS',
'SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES',
+ 'SK_SUPPORT_LEGACY_PICTURE_HEADERS',
'SK_SUPPORT_LEGACY_BLURDRAWLOOPERCONSTRUCTORS',
],
}],
'<(skia_src_path)/core/SkAdvancedTypefaceMetrics.cpp',
'<(skia_src_path)/core/SkAlphaRuns.cpp',
'<(skia_src_path)/core/SkAntiRun.h',
+ '<(skia_src_path)/core/SkBBHFactory.cpp',
'<(skia_src_path)/core/SkBBoxHierarchy.h',
'<(skia_src_path)/core/SkBBoxRecord.cpp',
'<(skia_src_path)/core/SkBBoxRecord.h',
'<(skia_src_path)/core/SkPicturePlayback.h',
'<(skia_src_path)/core/SkPictureRecord.cpp',
'<(skia_src_path)/core/SkPictureRecord.h',
+ '<(skia_src_path)/core/SkPictureRecorder.cpp',
'<(skia_src_path)/core/SkPictureShader.cpp',
'<(skia_src_path)/core/SkPictureShader.h',
'<(skia_src_path)/core/SkPictureStateTree.cpp',
'<(skia_src_path)/pipe/SkGPipeWrite.cpp',
'<(skia_include_path)/core/SkAdvancedTypefaceMetrics.h',
+ '<(skia_include_path)/core/SkBBHFactory.h',
'<(skia_include_path)/core/SkBitmap.h',
'<(skia_include_path)/core/SkBitmapDevice.h',
'<(skia_include_path)/core/SkBlitRow.h',
'<(skia_include_path)/core/SkPathMeasure.h',
'<(skia_include_path)/core/SkPathRef.h',
'<(skia_include_path)/core/SkPicture.h',
+ '<(skia_include_path)/core/SkPictureRecorder.h',
'<(skia_include_path)/core/SkPixelRef.h',
'<(skia_include_path)/core/SkPoint.h',
'<(skia_include_path)/core/SkPreConfig.h',
'SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES',
'SK_SUPPORT_LEGACY_N32_NAME',
'SK_SUPPORT_LEGACY_PROCXFERMODE',
+ 'SK_SUPPORT_LEGACY_PICTURE_HEADERS',
],
},
}
--- /dev/null
+/*
+ * 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 SkBBHFactory_DEFINED
+#define SkBBHFactory_DEFINED
+
+#include "SkSize.h"
+#include "SkPoint.h"
+
+class SkBBoxHierarchy;
+
+class SkBBHFactory {
+public:
+ /**
+ * Allocate a new SkBBoxHierarchy. Return NULL on failure.
+ */
+ virtual SkBBoxHierarchy* operator()(int width, int height) const = 0;
+ virtual ~SkBBHFactory() {};
+};
+
+class SkQuadTreeFactory : public SkBBHFactory {
+public:
+ virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE;
+private:
+ typedef SkBBHFactory INHERITED;
+};
+
+
+class SkRTreeFactory : public SkBBHFactory {
+public:
+ virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE;
+private:
+ typedef SkBBHFactory INHERITED;
+};
+
+class SkTileGridFactory : public SkBBHFactory {
+public:
+ struct TileGridInfo {
+ /** Tile placement interval */
+ SkISize fTileInterval;
+
+ /** Pixel coverage overlap between adjacent tiles */
+ SkISize fMargin;
+
+ /** Offset added to device-space bounding box positions to convert
+ * them to tile-grid space. This can be used to adjust the "phase"
+ * of the tile grid to match probable query rectangles that will be
+ * used to search into the tile grid. As long as the offset is smaller
+ * or equal to the margin, there is no need to extend the domain of
+ * the tile grid to prevent data loss.
+ */
+ SkIPoint fOffset;
+ };
+
+ SkTileGridFactory(const TileGridInfo& info) : fInfo(info) { }
+
+ virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE;
+
+private:
+ TileGridInfo fInfo;
+
+ typedef SkBBHFactory INHERITED;
+};
+
+#endif
#endif
-class SkBBHFactory {
-public:
- /**
- * Allocate a new SkBBoxHierarchy. Return NULL on failure.
- */
- virtual SkBBoxHierarchy* operator()(int width, int height) const = 0;
- virtual ~SkBBHFactory() {};
-};
-
-class SK_API SkPictureRecorder : SkNoncopyable {
-public:
-#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
-
- SkPictureRecorder(SkPictureFactory* factory = NULL) {
- fFactory.reset(factory);
- if (NULL != fFactory.get()) {
- fFactory.get()->ref();
- }
- }
-
- /** Returns the canvas that records the drawing commands.
- @param width the base width for the picture, as if the recording
- canvas' bitmap had this width.
- @param height the base width for the picture, as if the recording
- canvas' bitmap had this height.
- @param recordFlags optional flags that control recording.
- @return the canvas.
- */
- SkCanvas* beginRecording(int width, int height, uint32_t recordFlags = 0) {
- if (NULL != fFactory) {
- fPicture.reset(fFactory->create(width, height));
- recordFlags |= SkPicture::kOptimizeForClippedPlayback_RecordingFlag;
- } else {
- fPicture.reset(SkNEW(SkPicture));
- }
-
- return fPicture->beginRecording(width, height, recordFlags);
- }
+#ifdef SK_SUPPORT_LEGACY_PICTURE_HEADERS
+#include "SkPictureRecorder.h"
#endif
- /** Returns the canvas that records the drawing commands.
- @param width the base width for the picture, as if the recording
- canvas' bitmap had this width.
- @param height the base width for the picture, as if the recording
- canvas' bitmap had this height.
- @param bbhFactory factory to create desired acceleration structure
- @param recordFlags optional flags that control recording.
- @return the canvas.
- */
- // TODO: allow default parameters once the other beginRecoding entry point is gone
- SkCanvas* beginRecording(int width, int height,
- SkBBHFactory* bbhFactory /* = NULL */,
- uint32_t recordFlags /* = 0 */) {
- fPicture.reset(SkNEW(SkPicture));
- return fPicture->beginRecording(width, height, bbhFactory, recordFlags);
- }
-
- /** Returns the recording canvas if one is active, or NULL if recording is
- not active. This does not alter the refcnt on the canvas (if present).
- */
- SkCanvas* getRecordingCanvas() {
- if (NULL != fPicture.get()) {
- return fPicture->getRecordingCanvas();
- }
- return NULL;
- }
-
- /** Signal that the caller is done recording. This invalidates the canvas
- returned by beginRecording/getRecordingCanvas, and returns the
- created SkPicture. Note that the returned picture has its creation
- ref which the caller must take ownership of.
- */
- SkPicture* endRecording() {
- if (NULL != fPicture.get()) {
- fPicture->endRecording();
- return fPicture.detach();
- }
- return NULL;
- }
-
- /** Enable/disable all the picture recording optimizations (i.e.,
- those in SkPictureRecord). It is mainly intended for testing the
- existing optimizations (i.e., to actually have the pattern
- appear in an .skp we have to disable the optimization). Call right
- after 'beginRecording'.
- */
- void internalOnly_EnableOpts(bool enableOpts) {
- if (NULL != fPicture.get()) {
- fPicture->internalOnly_EnableOpts(enableOpts);
- }
- }
-
-private:
-#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
- SkAutoTUnref<SkPictureFactory> fFactory;
-#endif
-
- SkAutoTUnref<SkPicture> fPicture;
-
- typedef SkNoncopyable INHERITED;
-};
-
#endif
--- /dev/null
+/*
+ * 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 SkPictureRecorder_DEFINED
+#define SkPictureRecorder_DEFINED
+
+#include "SkBBHFactory.h"
+#include "SkPicture.h"
+#include "SkRefCnt.h"
+
+class SkCanvas;
+
+class SK_API SkPictureRecorder : SkNoncopyable {
+public:
+#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
+
+ SkPictureRecorder(SkPictureFactory* factory = NULL) {
+ fFactory.reset(factory);
+ if (NULL != fFactory.get()) {
+ fFactory.get()->ref();
+ }
+ }
+
+ /** Returns the canvas that records the drawing commands.
+ @param width the base width for the picture, as if the recording
+ canvas' bitmap had this width.
+ @param height the base width for the picture, as if the recording
+ canvas' bitmap had this height.
+ @param recordFlags optional flags that control recording.
+ @return the canvas.
+ */
+ SkCanvas* beginRecording(int width, int height, uint32_t recordFlags = 0) {
+ if (NULL != fFactory) {
+ fPicture.reset(fFactory->create(width, height));
+ recordFlags |= SkPicture::kOptimizeForClippedPlayback_RecordingFlag;
+ } else {
+ fPicture.reset(SkNEW(SkPicture));
+ }
+
+ return fPicture->beginRecording(width, height, recordFlags);
+ }
+#endif
+
+ /** Returns the canvas that records the drawing commands.
+ @param width the base width for the picture, as if the recording
+ canvas' bitmap had this width.
+ @param height the base width for the picture, as if the recording
+ canvas' bitmap had this height.
+ @param bbhFactory factory to create desired acceleration structure
+ @param recordFlags optional flags that control recording.
+ @return the canvas.
+ */
+ // TODO: allow default parameters once the other beginRecoding entry point is gone
+ SkCanvas* beginRecording(int width, int height,
+ SkBBHFactory* bbhFactory /* = NULL */,
+ uint32_t recordFlags /* = 0 */);
+
+ /** Returns the recording canvas if one is active, or NULL if recording is
+ not active. This does not alter the refcnt on the canvas (if present).
+ */
+ SkCanvas* getRecordingCanvas() {
+ if (NULL != fPicture.get()) {
+ return fPicture->getRecordingCanvas();
+ }
+ return NULL;
+ }
+
+ /** Signal that the caller is done recording. This invalidates the canvas
+ returned by beginRecording/getRecordingCanvas, and returns the
+ created SkPicture. Note that the returned picture has its creation
+ ref which the caller must take ownership of.
+ */
+ SkPicture* endRecording() {
+ if (NULL != fPicture.get()) {
+ fPicture->endRecording();
+ return fPicture.detach();
+ }
+ return NULL;
+ }
+
+ /** Enable/disable all the picture recording optimizations (i.e.,
+ those in SkPictureRecord). It is mainly intended for testing the
+ existing optimizations (i.e., to actually have the pattern
+ appear in an .skp we have to disable the optimization). Call right
+ after 'beginRecording'.
+ */
+ void internalOnly_EnableOpts(bool enableOpts) {
+ if (NULL != fPicture.get()) {
+ fPicture->internalOnly_EnableOpts(enableOpts);
+ }
+ }
+
+private:
+#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
+ SkAutoTUnref<SkPictureFactory> fFactory;
+#endif
+
+ SkAutoTUnref<SkPicture> fPicture;
+
+ typedef SkNoncopyable INHERITED;
+};
+
+#endif
#ifndef SkRTreePicture_DEFINED
#define SkRTreePicture_DEFINED
-#include "SkPicture.h"
-
-class SkRTreeFactory : public SkBBHFactory {
-public:
- virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE;
-private:
- typedef SkBBHFactory INHERITED;
-};
+#ifdef SK_SUPPORT_LEGACY_PICTURE_HEADERS
+#include "SkBBHFactory.h"
+#endif
#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
+
+#include "SkPicture.h"
+
/**
* Subclass of SkPicture that creates an RTree acceleration structure.
*/
#ifndef SkTileGridPicture_DEFINED
#define SkTileGridPicture_DEFINED
+#ifdef SK_SUPPORT_LEGACY_PICTURE_HEADERS
+#include "SkBBHFactory.h"
+#endif
+
+#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
+
#include "SkPicture.h"
#include "SkPoint.h"
#include "SkSize.h"
-class SkTileGridFactory : public SkBBHFactory {
-public:
- struct TileGridInfo {
- /** Tile placement interval */
- SkISize fTileInterval;
-
- /** Pixel coverage overlap between adjacent tiles */
- SkISize fMargin;
-
- /** Offset added to device-space bounding box positions to convert
- * them to tile-grid space. This can be used to adjust the "phase"
- * of the tile grid to match probable query rectangles that will be
- * used to search into the tile grid. As long as the offset is smaller
- * or equal to the margin, there is no need to extend the domain of
- * the tile grid to prevent data loss.
- */
- SkIPoint fOffset;
- };
-
- SkTileGridFactory(const TileGridInfo& info) : fInfo(info) { }
-
- virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE;
-
-private:
- TileGridInfo fInfo;
-
- typedef SkBBHFactory INHERITED;
-};
-
-#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
-
/**
* Subclass of SkPicture that creates an SkTileGrid. The tile grid has lower recording
* and playback costs then rTree, but is less effective at eliminating extraneous
#include "SkLayerRasterizer.h"
#include "SkMath.h"
#include "SkPath.h"
+#include "SkPictureRecorder.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkComposeShader.h"
#include "SkImageEncoder.h"
#include "SkPaint.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkStream.h"
#include "SkTSort.h"
#include "SkTime.h"
#include "SkOSMenu.h"
#include "SkPath.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkScalar.h"
#include "SkTDArray.h"
#include "SkTouchGesture.h"
#include "SkOSFile.h"
#include "SkPath.h"
#include "SkPicture.h"
-#include "SkQuadTreePicture.h"
+#include "SkPictureRecorder.h"
#include "SkRandom.h"
#include "SkRegion.h"
-#include "SkRTreePicture.h"
#include "SkShader.h"
-#include "SkTileGridPicture.h"
#include "SkUtils.h"
#include "SkColorPriv.h"
#include "SkColorFilter.h"
#include "SkOSFile.h"
#include "SkPath.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkRandom.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkPath.h"
+#include "SkPictureRecorder.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkUtils.h"
--- /dev/null
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkBBHFactory.h"
+#include "SkPictureStateTree.h"
+#include "SkQuadTree.h"
+#include "SkRTree.h"
+#include "SkTileGrid.h"
+
+
+SkBBoxHierarchy* SkQuadTreeFactory::operator()(int width, int height) const {
+ return SkNEW_ARGS(SkQuadTree, (SkIRect::MakeWH(width, height)));
+}
+
+SkBBoxHierarchy* SkRTreeFactory::operator()(int width, int height) const {
+ // These values were empirically determined to produce reasonable
+ // performance in most cases.
+ static const int kRTreeMinChildren = 6;
+ static const int kRTreeMaxChildren = 11;
+
+ SkScalar aspectRatio = SkScalarDiv(SkIntToScalar(width),
+ SkIntToScalar(height));
+ bool sortDraws = false; // Do not sort draw calls when bulk loading.
+
+ return SkRTree::Create(kRTreeMinChildren, kRTreeMaxChildren,
+ aspectRatio, sortDraws);
+}
+
+SkBBoxHierarchy* SkTileGridFactory::operator()(int width, int height) const {
+ SkASSERT(fInfo.fMargin.width() >= 0);
+ SkASSERT(fInfo.fMargin.height() >= 0);
+ // Note: SkIRects are non-inclusive of the right() column and bottom() row.
+ // For example, an SkIRect at 0,0 with a size of (1,1) will only have
+ // content at pixel (0,0) and will report left=0 and right=1, hence the
+ // "-1"s below.
+ int xTileCount = (width + fInfo.fTileInterval.width() - 1) / fInfo.fTileInterval.width();
+ int yTileCount = (height + fInfo.fTileInterval.height() - 1) / fInfo.fTileInterval.height();
+ return SkNEW_ARGS(SkTileGrid, (xTileCount, yTileCount, fInfo,
+ SkTileGridNextDatum<SkPictureStateTree::Draw>));
+}
#include "SkPicturePlayback.h"
#include "SkPictureRecord.h"
+#include "SkBBHFactory.h"
#include "SkBitmapDevice.h"
#include "SkCanvas.h"
#include "SkChunkAlloc.h"
--- /dev/null
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkPictureRecorder.h"
+
+SkCanvas* SkPictureRecorder::beginRecording(int width, int height,
+ SkBBHFactory* bbhFactory /* = NULL */,
+ uint32_t recordFlags /* = 0 */) {
+ fPicture.reset(SkNEW(SkPicture));
+ return fPicture->beginRecording(width, height, bbhFactory, recordFlags);
+}
* found in the LICENSE file.
*/
+#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
+
#include "SkQuadTreePicture.h"
#include "SkQuadTree.h"
-SkBBoxHierarchy* SkQuadTreeFactory::operator()(int width, int height) const {
- return SkNEW_ARGS(SkQuadTree, (SkIRect::MakeWH(width, height)));
-}
-
-#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
-
SkBBoxHierarchy* SkQuadTreePicture::createBBoxHierarchy() const {
return SkNEW_ARGS(SkQuadTree, (fBounds));
}
#ifndef SkQuadTreePicture_DEFINED
#define SkQuadTreePicture_DEFINED
-#include "SkPicture.h"
-
-class SkQuadTreeFactory : public SkBBHFactory {
-public:
- virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE;
-private:
- typedef SkBBHFactory INHERITED;
-};
+#ifdef SK_SUPPORT_LEGACY_PICTURE_HEADERS
+#include "SkBBHFactory.h"
+#endif
#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
+#include "SkPicture.h"
#include "SkRect.h"
/**
* found in the LICENSE file.
*/
+#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
+
#include "SkRTreePicture.h"
#include "SkRTree.h"
-SkBBoxHierarchy* SkRTreeFactory::operator()(int width, int height) const {
- // These values were empirically determined to produce reasonable
- // performance in most cases.
- static const int kRTreeMinChildren = 6;
- static const int kRTreeMaxChildren = 11;
-
- SkScalar aspectRatio = SkScalarDiv(SkIntToScalar(width),
- SkIntToScalar(height));
- bool sortDraws = false; // Do not sort draw calls when bulk loading.
-
- return SkRTree::Create(kRTreeMinChildren, kRTreeMaxChildren,
- aspectRatio, sortDraws);
-}
-
-#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
-
SkBBoxHierarchy* SkRTreePicture::createBBoxHierarchy() const {
// These values were empirically determined to produce reasonable
// performance in most cases.
#ifndef SkTileGrid_DEFINED
#define SkTileGrid_DEFINED
+#include "SkBBHFactory.h"
#include "SkBBoxHierarchy.h"
#include "SkPictureStateTree.h"
-#include "SkTileGridPicture.h" // for TileGridInfo
/**
* Subclass of SkBBoxHierarchy that stores elements in buckets that correspond
* found in the LICENSE file.
*/
+#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
+
#include "SkTileGridPicture.h"
#include "SkPictureStateTree.h"
#include "SkTileGrid.h"
-
-SkBBoxHierarchy* SkTileGridFactory::operator()(int width, int height) const {
- SkASSERT(fInfo.fMargin.width() >= 0);
- SkASSERT(fInfo.fMargin.height() >= 0);
- // Note: SkIRects are non-inclusive of the right() column and bottom() row.
- // For example, an SkIRect at 0,0 with a size of (1,1) will only have
- // content at pixel (0,0) and will report left=0 and right=1, hence the
- // "-1"s below.
- int xTileCount = (width + fInfo.fTileInterval.width() - 1) / fInfo.fTileInterval.width();
- int yTileCount = (height + fInfo.fTileInterval.height() - 1) / fInfo.fTileInterval.height();
- return SkNEW_ARGS(SkTileGrid, (xTileCount, yTileCount, fInfo,
- SkTileGridNextDatum<SkPictureStateTree::Draw>));
-}
-
-#ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
-
SkTileGridPicture::SkTileGridPicture(int width, int height,
const SkTileGridFactory::TileGridInfo& info) {
SkASSERT(info.fMargin.width() >= 0);
#include "SkPath.h"
#include "SkPicture.h"
#include "SkPictureRecord.h"
+#include "SkPictureRecorder.h"
#include "SkProxyCanvas.h"
#include "SkRect.h"
#include "SkRegion.h"
#include "SkMorphologyImageFilter.h"
#include "SkOffsetImageFilter.h"
#include "SkPicture.h"
-#include "SkRTreePicture.h"
+#include "SkPictureRecorder.h"
#include "SkRect.h"
#include "SkTileImageFilter.h"
#include "SkXfermodeImageFilter.h"
#include "SkImageGenerator.h"
#include "SkPaint.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkPictureUtils.h"
-#include "SkQuadTreePicture.h"
#include "SkRRect.h"
#include "SkRandom.h"
-#include "SkRTreePicture.h"
#include "SkShader.h"
#include "SkStream.h"
-#include "SkTileGrid.h"
#include "Test.h"
static const int gColorScale = 30;
#include "SkBitmapSource.h"
#include "SkCanvas.h"
#include "SkMallocPixelRef.h"
+#include "SkPictureRecorder.h"
#include "SkTemplates.h"
#include "SkWriteBuffer.h"
#include "SkValidatingReadBuffer.h"
#include "SkBitmapDevice.h"
#include "SkCanvas.h"
+#include "SkPictureRecorder.h"
#include "SkTileGrid.h"
-#include "SkTileGridPicture.h"
#include "Test.h"
enum Tile {
#include "SkMatrix.h"
#include "SkOSFile.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkPictureUtils.h"
#include "SkPixelRef.h"
-#include "SkQuadTree.h"
-#include "SkQuadTreePicture.h"
-#include "SkRTreePicture.h"
#include "SkScalar.h"
#include "SkStream.h"
#include "SkString.h"
#include "SkTemplates.h"
-#include "SkTileGridPicture.h"
#include "SkTDArray.h"
#include "SkThreadUtils.h"
#include "SkTypes.h"
#include "SkMath.h"
#include "SkPaint.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkRect.h"
#include "SkRefCnt.h"
#include "SkRunnable.h"
#include "SkString.h"
#include "SkTDArray.h"
#include "SkThreadPool.h"
-#include "SkTileGridPicture.h"
#include "SkTypes.h"
#if SK_SUPPORT_GPU
#include "SkGraphics.h"
#include "SkOSFile.h"
#include "SkPicture.h"
-#include "SkQuadTreePicture.h"
+#include "SkPictureRecorder.h"
#include "SkRecording.h"
-#include "SkRTreePicture.h"
#include "SkStream.h"
#include "SkString.h"
-#include "SkTileGridPicture.h"
#include "SkTime.h"
#include "LazyDecodeBitmap.h"
#include "SkPicture.h"
#include "SkPicturePlayback.h"
#include "SkPictureRecord.h"
+#include "SkPictureRecorder.h"
#include "SkStream.h"
#include "picture_utils.h"
#include "path_utils.h"
#include "SkMath.h"
#include "SkOSFile.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkStream.h"
#include "SkString.h"
#include "PictureRenderer.h"
#include "SkCommandLineFlags.h"
#include "SkPaint.h"
#include "SkPicture.h"
+#include "SkPictureRecorder.h"
#include "SkScalar.h"
#include "SkStream.h"