From 3509f050810ab95cc36265f3b486b9569799041d Mon Sep 17 00:00:00 2001 From: "vandebo@chromium.org" Date: Mon, 30 May 2011 20:52:33 +0000 Subject: [PATCH] Add more SK_API declarations to fix Chrome. TBR=ctguil@chromium.org Review URL: http://codereview.appspot.com/4526088 git-svn-id: http://skia.googlecode.com/svn/trunk@1445 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/pdf/SkPDFDevice.h | 14 ++++++++------ include/pdf/SkPDFFont.h | 17 +++++++++-------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h index 5e050211be..6e4d8db725 100644 --- a/include/pdf/SkPDFDevice.h +++ b/include/pdf/SkPDFDevice.h @@ -120,27 +120,29 @@ public: /** Returns a reference to the resource dictionary for this device. */ - const SkRefPtr& getResourceDict(); + SK_API const SkRefPtr& getResourceDict(); /** Get the list of resources (PDF objects) used on this page. * @param resourceList A list to append the resources to. */ - void getResources(SkTDArray* resourceList) const; + SK_API void getResources(SkTDArray* resourceList) const; /** Get the fonts used on this device. */ - const SkTDArray& getFontResources() const; + SK_API const SkTDArray& getFontResources() const; /** Returns the media box for this device. */ - SkRefPtr getMediaBox() const; + SK_API SkRefPtr getMediaBox() const; /** Returns a SkStream with the page contents. The caller is responsible for a reference to the returned value. */ - SkStream* content() const; + SK_API SkStream* content() const; - const SkMatrix& initialTransform() const { return fInitialTransform; } + SK_API const SkMatrix& initialTransform() const { + return fInitialTransform; + } protected: // override diff --git a/include/pdf/SkPDFFont.h b/include/pdf/SkPDFFont.h index 9ba32e330c..93a72f173b 100644 --- a/include/pdf/SkPDFFont.h +++ b/include/pdf/SkPDFFont.h @@ -33,27 +33,27 @@ class SkPaint; */ class SkPDFFont : public SkPDFDict { public: - virtual ~SkPDFFont(); + SK_API virtual ~SkPDFFont(); - virtual void getResources(SkTDArray* resourceList); + SK_API virtual void getResources(SkTDArray* resourceList); /** Returns the typeface represented by this class. Returns NULL for the * default typeface. */ - SkTypeface* typeface(); + SK_API SkTypeface* typeface(); /** Returns the font type represented in this font. For Type0 fonts, * returns the type of the decendant font. */ - SkAdvancedTypefaceMetrics::FontType getType(); + SK_API SkAdvancedTypefaceMetrics::FontType getType(); /** Return true if this font has an encoding for the passed glyph id. */ - bool hasGlyph(uint16_t glyphID); + SK_API bool hasGlyph(uint16_t glyphID); /** Returns true if this font encoding supports glyph IDs above 255. */ - bool multiByteGlyphs(); + SK_API bool multiByteGlyphs(); /** Convert (in place) the input glyph IDs into the font encoding. If the * font has more glyphs than can be encoded (like a type 1 font with more @@ -63,7 +63,7 @@ public: * @param numGlyphs The number of input glyphs. * @return Returns the number of glyphs consumed. */ - size_t glyphsToPDFFontEncoding(uint16_t* glyphIDs, size_t numGlyphs); + SK_API size_t glyphsToPDFFontEncoding(uint16_t* glyphIDs, size_t numGlyphs); /** Get the font resource for the passed typeface and glyphID. The * reference count of the object is incremented and it is the caller's @@ -73,7 +73,8 @@ public: * @param typeface The typeface to find. * @param glyphID Specify which section of a large font is of interest. */ - static SkPDFFont* getFontResource(SkTypeface* typeface, uint16_t glyphID); + SK_API static SkPDFFont* getFontResource(SkTypeface* typeface, + uint16_t glyphID); private: SkRefPtr fTypeface;