| Index: src/pdf/SkPDFDevice.h
|
| diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h
|
| index 31f6de11eefd7b561d247a722d4391772f30d82d..24b14258338c9ea7ad78b3b2a3748c5f41498b91 100644
|
| --- a/src/pdf/SkPDFDevice.h
|
| +++ b/src/pdf/SkPDFDevice.h
|
| @@ -11,6 +11,7 @@
|
| #include "SkBitmap.h"
|
| #include "SkCanvas.h"
|
| #include "SkClipStack.h"
|
| +#include "SkData.h"
|
| #include "SkDevice.h"
|
| #include "SkPaint.h"
|
| #include "SkPath.h"
|
| @@ -37,8 +38,6 @@ class SkRRect;
|
| // Private classes.
|
| struct ContentEntry;
|
| struct GraphicStateEntry;
|
| -struct NamedDestination;
|
| -struct RectWithData;
|
|
|
| /** \class SkPDFDevice
|
|
|
| @@ -199,6 +198,20 @@ protected:
|
| SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override;
|
|
|
| private:
|
| + struct RectWithData {
|
| + SkRect rect;
|
| + sk_sp<const SkData> data;
|
| + RectWithData(const SkRect& rect, const SkData* data)
|
| + : rect(rect), data(SkRef(data)) {}
|
| + };
|
| +
|
| + struct NamedDestination {
|
| + sk_sp<const SkData> nameData;
|
| + SkPoint point;
|
| + NamedDestination(const SkData* nameData, const SkPoint& point)
|
| + : nameData(SkRef(nameData)), point(point) {}
|
| + };
|
| +
|
| // TODO(vandebo): push most of SkPDFDevice's state into a core object in
|
| // order to get the right access levels without using friend.
|
| friend class ScopedContentEntry;
|
| @@ -209,9 +222,9 @@ private:
|
| SkClipStack fExistingClipStack;
|
| SkRegion fExistingClipRegion;
|
|
|
| - SkTDArray<RectWithData*> fLinkToURLs;
|
| - SkTDArray<RectWithData*> fLinkToDestinations;
|
| - SkTDArray<NamedDestination*> fNamedDestinations;
|
| + SkTArray<RectWithData> fLinkToURLs;
|
| + SkTArray<RectWithData> fLinkToDestinations;
|
| + SkTArray<NamedDestination> fNamedDestinations;
|
|
|
| SkTDArray<SkPDFObject*> fGraphicStateResources;
|
| SkTDArray<SkPDFObject*> fXObjectResources;
|
|
|